var wN=Object.defineProperty;var xN=(n,e,a)=>e in n?wN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[e]=a;var SN=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var qe=(n,e,a)=>xN(n,typeof e!="symbol"?e+"":e,a);var c_=SN((m_,ev)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function a(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(s){if(s.ep)return;s.ep=!0;const c=a(s);fetch(s.href,c)}})();try{}catch(n){console.error("[wxt] Failed to initialize plugins",n)}function Ji(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function TN(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var a=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};a.prototype=e.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var s=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(a,i,s.get?s:{enumerable:!0,get:function(){return n[i]}})}),a}var kg={exports:{}},bl={};/**
 * @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 Z0;function kN(){if(Z0)return bl;Z0=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function a(i,s,c){var d=null;if(c!==void 0&&(d=""+c),s.key!==void 0&&(d=""+s.key),"key"in s){c={};for(var m in s)m!=="key"&&(c[m]=s[m])}else c=s;return s=c.ref,{$$typeof:n,type:i,key:d,ref:s!==void 0?s:null,props:c}}return bl.Fragment=e,bl.jsx=a,bl.jsxs=a,bl}var ey;function LN(){return ey||(ey=1,kg.exports=kN()),kg.exports}var l=LN(),Lg={exports:{}},Il={},Rg={exports:{}},Dg={};/**
 * @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 ty;function RN(){return ty||(ty=1,function(n){function e(X,ie){var ce=X.length;X.push(ie);e:for(;0<ce;){var ye=ce-1>>>1,_=X[ye];if(0<s(_,ie))X[ye]=ie,X[ce]=_,ce=ye;else break e}}function a(X){return X.length===0?null:X[0]}function i(X){if(X.length===0)return null;var ie=X[0],ce=X.pop();if(ce!==ie){X[0]=ce;e:for(var ye=0,_=X.length,q=_>>>1;ye<q;){var ee=2*(ye+1)-1,ne=X[ee],Ie=ee+1,we=X[Ie];if(0>s(ne,ce))Ie<_&&0>s(we,ne)?(X[ye]=we,X[Ie]=ce,ye=Ie):(X[ye]=ne,X[ee]=ce,ye=ee);else if(Ie<_&&0>s(we,ce))X[ye]=we,X[Ie]=ce,ye=Ie;else break e}}return ie}function s(X,ie){var ce=X.sortIndex-ie.sortIndex;return ce!==0?ce:X.id-ie.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var f=[],g=[],E=1,p=null,C=3,N=!1,x=!1,S=!1,T=!1,k=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function P(X){for(var ie=a(g);ie!==null;){if(ie.callback===null)i(g);else if(ie.startTime<=X)i(g),ie.sortIndex=ie.expirationTime,e(f,ie);else break;ie=a(g)}}function M(X){if(S=!1,P(X),!x)if(a(f)!==null)x=!0,j||(j=!0,$());else{var ie=a(g);ie!==null&&Ae(M,ie.startTime-X)}}var j=!1,Q=-1,H=5,V=-1;function G(){return T?!0:!(n.unstable_now()-V<H)}function K(){if(T=!1,j){var X=n.unstable_now();V=X;var ie=!0;try{e:{x=!1,S&&(S=!1,U(Q),Q=-1),N=!0;var ce=C;try{t:{for(P(X),p=a(f);p!==null&&!(p.expirationTime>X&&G());){var ye=p.callback;if(typeof ye=="function"){p.callback=null,C=p.priorityLevel;var _=ye(p.expirationTime<=X);if(X=n.unstable_now(),typeof _=="function"){p.callback=_,P(X),ie=!0;break t}p===a(f)&&i(f),P(X)}else i(f);p=a(f)}if(p!==null)ie=!0;else{var q=a(g);q!==null&&Ae(M,q.startTime-X),ie=!1}}break e}finally{p=null,C=ce,N=!1}ie=void 0}}finally{ie?$():j=!1}}}var $;if(typeof R=="function")$=function(){R(K)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,re=J.port2;J.port1.onmessage=K,$=function(){re.postMessage(null)}}else $=function(){k(K,0)};function Ae(X,ie){Q=k(function(){X(n.unstable_now())},ie)}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(X){X.callback=null},n.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<X?Math.floor(1e3/X):5},n.unstable_getCurrentPriorityLevel=function(){return C},n.unstable_next=function(X){switch(C){case 1:case 2:case 3:var ie=3;break;default:ie=C}var ce=C;C=ie;try{return X()}finally{C=ce}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(X,ie){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var ce=C;C=X;try{return ie()}finally{C=ce}},n.unstable_scheduleCallback=function(X,ie,ce){var ye=n.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?ye+ce:ye):ce=ye,X){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=ce+_,X={id:E++,callback:ie,priorityLevel:X,startTime:ce,expirationTime:_,sortIndex:-1},ce>ye?(X.sortIndex=ce,e(g,X),a(f)===null&&X===a(g)&&(S?(U(Q),Q=-1):S=!0,Ae(M,ce-ye))):(X.sortIndex=_,e(f,X),x||N||(x=!0,j||(j=!0,$()))),X},n.unstable_shouldYield=G,n.unstable_wrapCallback=function(X){var ie=C;return function(){var ce=C;C=ie;try{return X.apply(this,arguments)}finally{C=ce}}}}(Dg)),Dg}var ay;function DN(){return ay||(ay=1,Rg.exports=RN()),Rg.exports}var Bg={exports:{}},vt={};/**
 * @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 ny;function BN(){if(ny)return vt;ny=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),p=Symbol.iterator;function C(_){return _===null||typeof _!="object"?null:(_=p&&_[p]||_["@@iterator"],typeof _=="function"?_:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function T(_,q,ee){this.props=_,this.context=q,this.refs=S,this.updater=ee||N}T.prototype.isReactComponent={},T.prototype.setState=function(_,q){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,q,"setState")},T.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function k(){}k.prototype=T.prototype;function U(_,q,ee){this.props=_,this.context=q,this.refs=S,this.updater=ee||N}var R=U.prototype=new k;R.constructor=U,x(R,T.prototype),R.isPureReactComponent=!0;var P=Array.isArray,M={H:null,A:null,T:null,S:null,V:null},j=Object.prototype.hasOwnProperty;function Q(_,q,ee,ne,Ie,we){return ee=we.ref,{$$typeof:n,type:_,key:q,ref:ee!==void 0?ee:null,props:we}}function H(_,q){return Q(_.type,q,void 0,void 0,void 0,_.props)}function V(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function G(_){var q={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(ee){return q[ee]})}var K=/\/+/g;function $(_,q){return typeof _=="object"&&_!==null&&_.key!=null?G(""+_.key):q.toString(36)}function J(){}function re(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(J,J):(_.status="pending",_.then(function(q){_.status==="pending"&&(_.status="fulfilled",_.value=q)},function(q){_.status==="pending"&&(_.status="rejected",_.reason=q)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function Ae(_,q,ee,ne,Ie){var we=typeof _;(we==="undefined"||we==="boolean")&&(_=null);var Re=!1;if(_===null)Re=!0;else switch(we){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(_.$$typeof){case n:case e:Re=!0;break;case E:return Re=_._init,Ae(Re(_._payload),q,ee,ne,Ie)}}if(Re)return Ie=Ie(_),Re=ne===""?"."+$(_,0):ne,P(Ie)?(ee="",Re!=null&&(ee=Re.replace(K,"$&/")+"/"),Ae(Ie,q,ee,"",function(ze){return ze})):Ie!=null&&(V(Ie)&&(Ie=H(Ie,ee+(Ie.key==null||_&&_.key===Ie.key?"":(""+Ie.key).replace(K,"$&/")+"/")+Re)),q.push(Ie)),1;Re=0;var Be=ne===""?".":ne+":";if(P(_))for(var xe=0;xe<_.length;xe++)ne=_[xe],we=Be+$(ne,xe),Re+=Ae(ne,q,ee,we,Ie);else if(xe=C(_),typeof xe=="function")for(_=xe.call(_),xe=0;!(ne=_.next()).done;)ne=ne.value,we=Be+$(ne,xe++),Re+=Ae(ne,q,ee,we,Ie);else if(we==="object"){if(typeof _.then=="function")return Ae(re(_),q,ee,ne,Ie);throw q=String(_),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Re}function X(_,q,ee){if(_==null)return _;var ne=[],Ie=0;return Ae(_,ne,"","",function(we){return q.call(ee,we,Ie++)}),ne}function ie(_){if(_._status===-1){var q=_._result;q=q(),q.then(function(ee){(_._status===0||_._status===-1)&&(_._status=1,_._result=ee)},function(ee){(_._status===0||_._status===-1)&&(_._status=2,_._result=ee)}),_._status===-1&&(_._status=0,_._result=q)}if(_._status===1)return _._result.default;throw _._result}var ce=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)};function ye(){}return vt.Children={map:X,forEach:function(_,q,ee){X(_,function(){q.apply(this,arguments)},ee)},count:function(_){var q=0;return X(_,function(){q++}),q},toArray:function(_){return X(_,function(q){return q})||[]},only:function(_){if(!V(_))throw Error("React.Children.only expected to receive a single React element child.");return _}},vt.Component=T,vt.Fragment=a,vt.Profiler=s,vt.PureComponent=U,vt.StrictMode=i,vt.Suspense=f,vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,vt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return M.H.useMemoCache(_)}},vt.cache=function(_){return function(){return _.apply(null,arguments)}},vt.cloneElement=function(_,q,ee){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var ne=x({},_.props),Ie=_.key,we=void 0;if(q!=null)for(Re in q.ref!==void 0&&(we=void 0),q.key!==void 0&&(Ie=""+q.key),q)!j.call(q,Re)||Re==="key"||Re==="__self"||Re==="__source"||Re==="ref"&&q.ref===void 0||(ne[Re]=q[Re]);var Re=arguments.length-2;if(Re===1)ne.children=ee;else if(1<Re){for(var Be=Array(Re),xe=0;xe<Re;xe++)Be[xe]=arguments[xe+2];ne.children=Be}return Q(_.type,Ie,void 0,void 0,we,ne)},vt.createContext=function(_){return _={$$typeof:d,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:c,_context:_},_},vt.createElement=function(_,q,ee){var ne,Ie={},we=null;if(q!=null)for(ne in q.key!==void 0&&(we=""+q.key),q)j.call(q,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(Ie[ne]=q[ne]);var Re=arguments.length-2;if(Re===1)Ie.children=ee;else if(1<Re){for(var Be=Array(Re),xe=0;xe<Re;xe++)Be[xe]=arguments[xe+2];Ie.children=Be}if(_&&_.defaultProps)for(ne in Re=_.defaultProps,Re)Ie[ne]===void 0&&(Ie[ne]=Re[ne]);return Q(_,we,void 0,void 0,null,Ie)},vt.createRef=function(){return{current:null}},vt.forwardRef=function(_){return{$$typeof:m,render:_}},vt.isValidElement=V,vt.lazy=function(_){return{$$typeof:E,_payload:{_status:-1,_result:_},_init:ie}},vt.memo=function(_,q){return{$$typeof:g,type:_,compare:q===void 0?null:q}},vt.startTransition=function(_){var q=M.T,ee={};M.T=ee;try{var ne=_(),Ie=M.S;Ie!==null&&Ie(ee,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(ye,ce)}catch(we){ce(we)}finally{M.T=q}},vt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},vt.use=function(_){return M.H.use(_)},vt.useActionState=function(_,q,ee){return M.H.useActionState(_,q,ee)},vt.useCallback=function(_,q){return M.H.useCallback(_,q)},vt.useContext=function(_){return M.H.useContext(_)},vt.useDebugValue=function(){},vt.useDeferredValue=function(_,q){return M.H.useDeferredValue(_,q)},vt.useEffect=function(_,q,ee){var ne=M.H;if(typeof ee=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return ne.useEffect(_,q)},vt.useId=function(){return M.H.useId()},vt.useImperativeHandle=function(_,q,ee){return M.H.useImperativeHandle(_,q,ee)},vt.useInsertionEffect=function(_,q){return M.H.useInsertionEffect(_,q)},vt.useLayoutEffect=function(_,q){return M.H.useLayoutEffect(_,q)},vt.useMemo=function(_,q){return M.H.useMemo(_,q)},vt.useOptimistic=function(_,q){return M.H.useOptimistic(_,q)},vt.useReducer=function(_,q,ee){return M.H.useReducer(_,q,ee)},vt.useRef=function(_){return M.H.useRef(_)},vt.useState=function(_){return M.H.useState(_)},vt.useSyncExternalStore=function(_,q,ee){return M.H.useSyncExternalStore(_,q,ee)},vt.useTransition=function(){return M.H.useTransition()},vt.version="19.1.0",vt}var ry;function ch(){return ry||(ry=1,Bg.exports=BN()),Bg.exports}var Ug={exports:{}},on={};/**
 * @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 iy;function UN(){if(iy)return on;iy=1;var n=ch();function e(f){var g="https://react.dev/errors/"+f;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)g+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+f+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var i={d:{f:a,r:function(){throw Error(e(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(f,g,E){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:f,containerInfo:g,implementation:E}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(f,g){if(f==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return on.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,on.createPortal=function(f,g){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(e(299));return c(f,g,null,E)},on.flushSync=function(f){var g=d.T,E=i.p;try{if(d.T=null,i.p=2,f)return f()}finally{d.T=g,i.p=E,i.d.f()}},on.preconnect=function(f,g){typeof f=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(f,g))},on.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},on.preinit=function(f,g){if(typeof f=="string"&&g&&typeof g.as=="string"){var E=g.as,p=m(E,g.crossOrigin),C=typeof g.integrity=="string"?g.integrity:void 0,N=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;E==="style"?i.d.S(f,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:C,fetchPriority:N}):E==="script"&&i.d.X(f,{crossOrigin:p,integrity:C,fetchPriority:N,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},on.preinitModule=function(f,g){if(typeof f=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var E=m(g.as,g.crossOrigin);i.d.M(f,{crossOrigin:E,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(f)},on.preload=function(f,g){if(typeof f=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var E=g.as,p=m(E,g.crossOrigin);i.d.L(f,E,{crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},on.preloadModule=function(f,g){if(typeof f=="string")if(g){var E=m(g.as,g.crossOrigin);i.d.m(f,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:E,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(f)},on.requestFormReset=function(f){i.d.r(f)},on.unstable_batchedUpdates=function(f,g){return f(g)},on.useFormState=function(f,g,E){return d.H.useFormState(f,g,E)},on.useFormStatus=function(){return d.H.useHostTransitionStatus()},on.version="19.1.0",on}var sy;function MN(){if(sy)return Ug.exports;sy=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(e){console.error(e)}}return n(),Ug.exports=UN(),Ug.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 oy;function _N(){if(oy)return Il;oy=1;var n=DN(),e=ch(),a=MN();function i(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)r+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var r=t,o=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(o=r.return),t=r.return;while(t)}return r.tag===3?o:null}function d(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function m(t){if(c(t)!==t)throw Error(i(188))}function f(t){var r=t.alternate;if(!r){if(r=c(t),r===null)throw Error(i(188));return r!==t?null:t}for(var o=t,u=r;;){var h=o.return;if(h===null)break;var y=h.alternate;if(y===null){if(u=h.return,u!==null){o=u;continue}break}if(h.child===y.child){for(y=h.child;y;){if(y===o)return m(h),t;if(y===u)return m(h),r;y=y.sibling}throw Error(i(188))}if(o.return!==u.return)o=h,u=y;else{for(var L=!1,F=h.child;F;){if(F===o){L=!0,o=h,u=y;break}if(F===u){L=!0,u=h,o=y;break}F=F.sibling}if(!L){for(F=y.child;F;){if(F===o){L=!0,o=y,u=h;break}if(F===u){L=!0,u=y,o=h;break}F=F.sibling}if(!L)throw Error(i(189))}}if(o.alternate!==u)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?t:r}function g(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=g(t),r!==null)return r;t=t.sibling}return null}var E=Object.assign,p=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),U=Symbol.for("react.consumer"),R=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function $(t){return t===null||typeof t!="object"?null:(t=K&&t[K]||t["@@iterator"],typeof t=="function"?t:null)}var J=Symbol.for("react.client.reference");function re(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===J?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case x:return"Fragment";case T:return"Profiler";case S:return"StrictMode";case M:return"Suspense";case j:return"SuspenseList";case V:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case N:return"Portal";case R:return(t.displayName||"Context")+".Provider";case U:return(t._context.displayName||"Context")+".Consumer";case P:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Q:return r=t.displayName||null,r!==null?r:re(t.type)||"Memo";case H:r=t._payload,t=t._init;try{return re(t(r))}catch{}}return null}var Ae=Array.isArray,X=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},ye=[],_=-1;function q(t){return{current:t}}function ee(t){0>_||(t.current=ye[_],ye[_]=null,_--)}function ne(t,r){_++,ye[_]=t.current,t.current=r}var Ie=q(null),we=q(null),Re=q(null),Be=q(null);function xe(t,r){switch(ne(Re,r),ne(we,t),ne(Ie,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?S0(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=S0(r),t=T0(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}ee(Ie),ne(Ie,t)}function ze(){ee(Ie),ee(we),ee(Re)}function At(t){t.memoizedState!==null&&ne(Be,t);var r=Ie.current,o=T0(r,t.type);r!==o&&(ne(we,t),ne(Ie,o))}function Lt(t){we.current===t&&(ee(Ie),ee(we)),Be.current===t&&(ee(Be),hl._currentValue=ce)}var Ut=Object.prototype.hasOwnProperty,et=n.unstable_scheduleCallback,nt=n.unstable_cancelCallback,Pt=n.unstable_shouldYield,Ne=n.unstable_requestPaint,se=n.unstable_now,De=n.unstable_getCurrentPriorityLevel,je=n.unstable_ImmediatePriority,Qe=n.unstable_UserBlockingPriority,Ye=n.unstable_NormalPriority,ut=n.unstable_LowPriority,Mt=n.unstable_IdlePriority,jt=n.log,Vt=n.unstable_setDisableYieldValue,ia=null,B=null;function v(t){if(typeof jt=="function"&&Vt(t),B&&typeof B.setStrictMode=="function")try{B.setStrictMode(ia,t)}catch{}}var w=Math.clz32?Math.clz32:he,z=Math.log,ae=Math.LN2;function he(t){return t>>>=0,t===0?32:31-(z(t)/ae|0)|0}var be=256,Ue=4194304;function gt(t){var r=t&42;if(r!==0)return r;switch(t&-t){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 t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function pt(t,r,o){var u=t.pendingLanes;if(u===0)return 0;var h=0,y=t.suspendedLanes,L=t.pingedLanes;t=t.warmLanes;var F=u&134217727;return F!==0?(u=F&~y,u!==0?h=gt(u):(L&=F,L!==0?h=gt(L):o||(o=F&~t,o!==0&&(h=gt(o))))):(F=u&~y,F!==0?h=gt(F):L!==0?h=gt(L):o||(o=u&~t,o!==0&&(h=gt(o)))),h===0?0:r!==0&&r!==h&&(r&y)===0&&(y=h&-h,o=r&-r,y>=o||y===32&&(o&4194048)!==0)?r:h}function wt(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function dt(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 fr(){var t=be;return be<<=1,(be&4194048)===0&&(be=256),t}function sa(){var t=Ue;return Ue<<=1,(Ue&62914560)===0&&(Ue=4194304),t}function nn(t){for(var r=[],o=0;31>o;o++)r.push(t);return r}function Pn(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Hn(t,r,o,u,h,y){var L=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var F=t.entanglements,W=t.expirationTimes,ge=t.hiddenUpdates;for(o=L&~o;0<o;){var ve=31-w(o),ke=1<<ve;F[ve]=0,W[ve]=-1;var fe=ge[ve];if(fe!==null)for(ge[ve]=null,ve=0;ve<fe.length;ve++){var pe=fe[ve];pe!==null&&(pe.lane&=-536870913)}o&=~ke}u!==0&&Oe(t,u,0),y!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=y&~(L&~r))}function Oe(t,r,o){t.pendingLanes|=r,t.suspendedLanes&=~r;var u=31-w(r);t.entangledLanes|=r,t.entanglements[u]=t.entanglements[u]|1073741824|o&4194090}function ui(t,r){var o=t.entangledLanes|=r;for(t=t.entanglements;o;){var u=31-w(o),h=1<<u;h&r|t[u]&r&&(t[u]|=r),o&=~h}}function ta(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function la(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function nr(){var t=ie.p;return t!==0?t:(t=window.event,t===void 0?32:q0(t.type))}function rr(t,r){var o=ie.p;try{return ie.p=t,r()}finally{ie.p=o}}var Ua=Math.random().toString(36).slice(2),qt="__reactFiber$"+Ua,Ea="__reactProps$"+Ua,Jt="__reactContainer$"+Ua,Ma="__reactEvents$"+Ua,za="__reactListeners$"+Ua,Ur="__reactHandles$"+Ua,le="__reactResources$"+Ua,_e="__reactMarker$"+Ua;function Me(t){delete t[qt],delete t[Ea],delete t[Ma],delete t[za],delete t[Ur]}function Xe(t){var r=t[qt];if(r)return r;for(var o=t.parentNode;o;){if(r=o[Jt]||o[qt]){if(o=r.alternate,r.child!==null||o!==null&&o.child!==null)for(t=D0(t);t!==null;){if(o=t[qt])return o;t=D0(t)}return r}t=o,o=t.parentNode}return null}function xt(t){if(t=t[qt]||t[Jt]){var r=t.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return t}return null}function yt(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(i(33))}function rt(t){var r=t[le];return r||(r=t[le]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function it(t){t[_e]=!0}var un=new Set,Fe={};function Z(t,r){Te(t,r),Te(t+"Capture",r)}function Te(t,r){for(Fe[t]=r,t=0;t<r.length;t++)un.add(r[t])}var Pe=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]*$"),Ft={},da={};function ca(t){return Ut.call(da,t)?!0:Ut.call(Ft,t)?!1:Pe.test(t)?da[t]=!0:(Ft[t]=!0,!1)}function ua(t,r,o){if(ca(r))if(o===null)t.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+o)}}function Wa(t,r,o){if(o===null)t.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+o)}}function Ca(t,r,o,u){if(u===null)t.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttributeNS(r,o,""+u)}}var hr,aa;function Sn(t){if(hr===void 0)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);hr=r&&r[1]||"",aa=-1<o.stack.indexOf(`
    at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
`+hr+t+aa}var Mr=!1;function Ts(t,r){if(!t||Mr)return"";Mr=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var ke=function(){throw Error()};if(Object.defineProperty(ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ke,[])}catch(pe){var fe=pe}Reflect.construct(t,[],ke)}else{try{ke.call()}catch(pe){fe=pe}t.call(ke.prototype)}}else{try{throw Error()}catch(pe){fe=pe}(ke=t())&&typeof ke.catch=="function"&&ke.catch(function(){})}}catch(pe){if(pe&&fe&&typeof pe.stack=="string")return[pe.stack,fe.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),L=y[0],F=y[1];if(L&&F){var W=L.split(`
`),ge=F.split(`
`);for(h=u=0;u<W.length&&!W[u].includes("DetermineComponentFrameRoot");)u++;for(;h<ge.length&&!ge[h].includes("DetermineComponentFrameRoot");)h++;if(u===W.length||h===ge.length)for(u=W.length-1,h=ge.length-1;1<=u&&0<=h&&W[u]!==ge[h];)h--;for(;1<=u&&0<=h;u--,h--)if(W[u]!==ge[h]){if(u!==1||h!==1)do if(u--,h--,0>h||W[u]!==ge[h]){var ve=`
`+W[u].replace(" at new "," at ");return t.displayName&&ve.includes("<anonymous>")&&(ve=ve.replace("<anonymous>",t.displayName)),ve}while(1<=u&&0<=h);break}}}finally{Mr=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?Sn(o):""}function rc(t){switch(t.tag){case 26:case 27:case 5:return Sn(t.type);case 16:return Sn("Lazy");case 13:return Sn("Suspense");case 19:return Sn("SuspenseList");case 0:case 15:return Ts(t.type,!1);case 11:return Ts(t.type.render,!1);case 1:return Ts(t.type,!0);case 31:return Sn("Activity");default:return""}}function ic(t){try{var r="";do r+=rc(t),t=t.return;while(t);return r}catch(o){return`
Error generating stack: `+o.message+`
`+o.stack}}function wa(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Xt(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function _r(t){var r=Xt(t)?"checked":"value",o=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),u=""+t[r];if(!t.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,y=o.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(L){u=""+L,y.call(this,L)}}),Object.defineProperty(t,r,{enumerable:o.enumerable}),{getValue:function(){return u},setValue:function(L){u=""+L},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Fr(t){t._valueTracker||(t._valueTracker=_r(t))}function Xi(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var o=r.getValue(),u="";return t&&(u=Xt(t)?t.checked?"true":"false":t.value),t=u,t!==o?(r.setValue(t),!0):!1}function Or(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var wo=/[\n"\\]/g;function pn(t){return t.replace(wo,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function xo(t,r,o,u,h,y,L,F){t.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?t.type=L:t.removeAttribute("type"),r!=null?L==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+wa(r)):t.value!==""+wa(r)&&(t.value=""+wa(r)):L!=="submit"&&L!=="reset"||t.removeAttribute("value"),r!=null?ks(t,L,wa(r)):o!=null?ks(t,L,wa(o)):u!=null&&t.removeAttribute("value"),h==null&&y!=null&&(t.defaultChecked=!!y),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?t.name=""+wa(F):t.removeAttribute("name")}function di(t,r,o,u,h,y,L,F){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.type=y),r!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||r!=null))return;o=o!=null?""+wa(o):"",r=r!=null?""+wa(r):o,F||r===t.value||(t.value=r),t.defaultValue=r}u=u??h,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=F?t.checked:!!u,t.defaultChecked=!!u,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(t.name=L)}function ks(t,r,o){r==="number"&&Or(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function mi(t,r,o,u){if(t=t.options,r){r={};for(var h=0;h<o.length;h++)r["$"+o[h]]=!0;for(o=0;o<t.length;o++)h=r.hasOwnProperty("$"+t[o].value),t[o].selected!==h&&(t[o].selected=h),h&&u&&(t[o].defaultSelected=!0)}else{for(o=""+wa(o),r=null,h=0;h<t.length;h++){if(t[h].value===o){t[h].selected=!0,u&&(t[h].defaultSelected=!0);return}r!==null||t[h].disabled||(r=t[h])}r!==null&&(r.selected=!0)}}function Ls(t,r,o){if(r!=null&&(r=""+wa(r),r!==t.value&&(t.value=r),o==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=o!=null?""+wa(o):""}function So(t,r,o,u){if(r==null){if(u!=null){if(o!=null)throw Error(i(92));if(Ae(u)){if(1<u.length)throw Error(i(93));u=u[0]}o=u}o==null&&(o=""),r=o}o=wa(r),t.defaultValue=o,u=t.textContent,u===o&&u!==""&&u!==null&&(t.value=u)}function Ar(t,r){if(r){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=r;return}}t.textContent=r}var To=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 sc(t,r,o){var u=r.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":u?t.setProperty(r,o):typeof o!="number"||o===0||To.has(r)?r==="float"?t.cssFloat=o:t[r]=(""+o).trim():t[r]=o+"px"}function $i(t,r,o){if(r!=null&&typeof r!="object")throw Error(i(62));if(t=t.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var h in r)u=r[h],r.hasOwnProperty(h)&&o[h]!==u&&sc(t,h,u)}else for(var y in r)r.hasOwnProperty(y)&&sc(t,y,r[y])}function gi(t){if(t.indexOf("-")===-1)return!1;switch(t){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 jr=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"]]),ko=/^[\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 yn(t){return ko.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var zn=null;function Pr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var fi=null,Je=null;function Rs(t){var r=xt(t);if(r&&(t=r.stateNode)){var o=t[Ea]||null;e:switch(t=r.stateNode,r.type){case"input":if(xo(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),r=o.name,o.type==="radio"&&r!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+pn(""+r)+'"][type="radio"]'),r=0;r<o.length;r++){var u=o[r];if(u!==t&&u.form===t.form){var h=u[Ea]||null;if(!h)throw Error(i(90));xo(u,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<o.length;r++)u=o[r],u.form===t.form&&Xi(u)}break e;case"textarea":Ls(t,o.value,o.defaultValue);break e;case"select":r=o.value,r!=null&&mi(t,!!o.multiple,r,!1)}}}var hi=!1;function Lo(t,r,o){if(hi)return t(r,o);hi=!0;try{var u=t(r);return u}finally{if(hi=!1,(fi!==null||Je!==null)&&(Kc(),fi&&(r=fi,t=Je,Je=fi=null,Rs(r),t)))for(r=0;r<t.length;r++)Rs(t[r])}}function Ai(t,r){var o=t.stateNode;if(o===null)return null;var u=o[Ea]||null;if(u===null)return null;o=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(i(231,r,typeof o));return o}var dn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qn=!1;if(dn)try{var ir={};Object.defineProperty(ir,"passive",{get:function(){Qn=!0}}),window.addEventListener("test",ir,ir),window.removeEventListener("test",ir,ir)}catch{Qn=!1}var Vn=null,A=null,b=null;function D(){if(b)return b;var t,r=A,o=r.length,u,h="value"in Vn?Vn.value:Vn.textContent,y=h.length;for(t=0;t<o&&r[t]===h[t];t++);var L=o-t;for(u=1;u<=L&&r[o-u]===h[y-u];u++);return b=h.slice(t,1<u?1-u:void 0)}function O(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Y(){return!0}function de(){return!1}function Ee(t){function r(o,u,h,y,L){this._reactName=o,this._targetInst=h,this.type=u,this.nativeEvent=y,this.target=L,this.currentTarget=null;for(var F in t)t.hasOwnProperty(F)&&(o=t[F],this[F]=o?o(y):y[F]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Y:de,this.isPropagationStopped=de,this}return E(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Y)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Y)},persist:function(){},isPersistent:Y}),r}var Ve={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Et=Ee(Ve),ft=E({},Ve,{view:0,detail:0}),ma=Ee(ft),Qa,Ds,Zi,es=E({},ft,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bo,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Zi&&(Zi&&t.type==="mousemove"?(Qa=t.screenX-Zi.screenX,Ds=t.screenY-Zi.screenY):Ds=Qa=0,Zi=t),Qa)},movementY:function(t){return"movementY"in t?t.movementY:Ds}}),oc=Ee(es),lc=E({},es,{dataTransfer:0}),pd=Ee(lc),yd=E({},ft,{relatedTarget:0}),Ro=Ee(yd),Ed=E({},Ve,{animationName:0,elapsedTime:0,pseudoElement:0}),bd=Ee(Ed),Id=E({},Ve,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),vd=Ee(Id),Nd=E({},Ve,{data:0}),Do=Ee(Nd),Cd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wd={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"},xd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sd(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=xd[t])?!!r[t]:!1}function Bo(){return Sd}var Td=E({},ft,{key:function(t){if(t.key){var r=Cd[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=O(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?wd[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bo,charCode:function(t){return t.type==="keypress"?O(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?O(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),kd=Ee(Td),cc=E({},es,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uc=Ee(cc),Ld=E({},ft,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bo}),Rd=Ee(Ld),Dd=E({},Ve,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bd=Ee(Dd),Ud=E({},es,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),dc=Ee(Ud),Md=E({},Ve,{newState:0,oldState:0}),_d=Ee(Md),Fd=[9,13,27,32],pi=dn&&"CompositionEvent"in window,yi=null;dn&&"documentMode"in document&&(yi=document.documentMode);var mc=dn&&"TextEvent"in window&&!yi,Uo=dn&&(!pi||yi&&8<yi&&11>=yi),ue=" ",Le=!1;function Ge(t,r){switch(t){case"keyup":return Fd.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function at(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ot=!1;function zt(t,r){switch(t){case"compositionend":return at(r);case"keypress":return r.which!==32?null:(Le=!0,ue);case"textInput":return t=r.data,t===ue&&Le?null:t;default:return null}}function Tn(t,r){if(ot)return t==="compositionend"||!pi&&Ge(t,r)?(t=D(),b=A=Vn=null,ot=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Uo&&r.locale!=="ko"?null:r.data;default:return null}}var En={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 rn(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!En[t.type]:r==="textarea"}function bn(t,r,o,u){fi?Je?Je.push(u):Je=[u]:fi=u,r=$c(r,"onChange"),0<r.length&&(o=new Et("onChange","change",null,o,u),t.push({event:o,listeners:r}))}var Hr=null,kn=null;function Od(t){v0(t,0)}function gc(t){var r=yt(t);if(Xi(r))return t}function Qh(t,r){if(t==="change")return r}var Vh=!1;if(dn){var jd;if(dn){var Pd="oninput"in document;if(!Pd){var Gh=document.createElement("div");Gh.setAttribute("oninput","return;"),Pd=typeof Gh.oninput=="function"}jd=Pd}else jd=!1;Vh=jd&&(!document.documentMode||9<document.documentMode)}function Kh(){Hr&&(Hr.detachEvent("onpropertychange",qh),kn=Hr=null)}function qh(t){if(t.propertyName==="value"&&gc(kn)){var r=[];bn(r,kn,t,Pr(t)),Lo(Od,r)}}function tv(t,r,o){t==="focusin"?(Kh(),Hr=r,kn=o,Hr.attachEvent("onpropertychange",qh)):t==="focusout"&&Kh()}function av(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return gc(kn)}function nv(t,r){if(t==="click")return gc(r)}function rv(t,r){if(t==="input"||t==="change")return gc(r)}function iv(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Ln=typeof Object.is=="function"?Object.is:iv;function Mo(t,r){if(Ln(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var o=Object.keys(t),u=Object.keys(r);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var h=o[u];if(!Ut.call(r,h)||!Ln(t[h],r[h]))return!1}return!0}function Wh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Yh(t,r){var o=Wh(t);t=0;for(var u;o;){if(o.nodeType===3){if(u=t+o.textContent.length,t<=r&&u>=r)return{node:o,offset:r-t};t=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Wh(o)}}function Jh(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Jh(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Xh(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=Or(t.document);r instanceof t.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)t=r.contentWindow;else break;r=Or(t.document)}return r}function Hd(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var sv=dn&&"documentMode"in document&&11>=document.documentMode,Bs=null,zd=null,_o=null,Qd=!1;function $h(t,r,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Qd||Bs==null||Bs!==Or(u)||(u=Bs,"selectionStart"in u&&Hd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),_o&&Mo(_o,u)||(_o=u,u=$c(zd,"onSelect"),0<u.length&&(r=new Et("onSelect","select",null,r,o),t.push({event:r,listeners:u}),r.target=Bs)))}function ts(t,r){var o={};return o[t.toLowerCase()]=r.toLowerCase(),o["Webkit"+t]="webkit"+r,o["Moz"+t]="moz"+r,o}var Us={animationend:ts("Animation","AnimationEnd"),animationiteration:ts("Animation","AnimationIteration"),animationstart:ts("Animation","AnimationStart"),transitionrun:ts("Transition","TransitionRun"),transitionstart:ts("Transition","TransitionStart"),transitioncancel:ts("Transition","TransitionCancel"),transitionend:ts("Transition","TransitionEnd")},Vd={},Zh={};dn&&(Zh=document.createElement("div").style,"AnimationEvent"in window||(delete Us.animationend.animation,delete Us.animationiteration.animation,delete Us.animationstart.animation),"TransitionEvent"in window||delete Us.transitionend.transition);function as(t){if(Vd[t])return Vd[t];if(!Us[t])return t;var r=Us[t],o;for(o in r)if(r.hasOwnProperty(o)&&o in Zh)return Vd[t]=r[o];return t}var eA=as("animationend"),tA=as("animationiteration"),aA=as("animationstart"),ov=as("transitionrun"),lv=as("transitionstart"),cv=as("transitioncancel"),nA=as("transitionend"),rA=new Map,Gd="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(" ");Gd.push("scrollEnd");function sr(t,r){rA.set(t,r),Z(r,[t])}var iA=new WeakMap;function Gn(t,r){if(typeof t=="object"&&t!==null){var o=iA.get(t);return o!==void 0?o:(r={value:t,source:r,stack:ic(r)},iA.set(t,r),r)}return{value:t,source:r,stack:ic(r)}}var Kn=[],Ms=0,Kd=0;function fc(){for(var t=Ms,r=Kd=Ms=0;r<t;){var o=Kn[r];Kn[r++]=null;var u=Kn[r];Kn[r++]=null;var h=Kn[r];Kn[r++]=null;var y=Kn[r];if(Kn[r++]=null,u!==null&&h!==null){var L=u.pending;L===null?h.next=h:(h.next=L.next,L.next=h),u.pending=h}y!==0&&sA(o,h,y)}}function hc(t,r,o,u){Kn[Ms++]=t,Kn[Ms++]=r,Kn[Ms++]=o,Kn[Ms++]=u,Kd|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function qd(t,r,o,u){return hc(t,r,o,u),Ac(t)}function _s(t,r){return hc(t,null,null,r),Ac(t)}function sA(t,r,o){t.lanes|=o;var u=t.alternate;u!==null&&(u.lanes|=o);for(var h=!1,y=t.return;y!==null;)y.childLanes|=o,u=y.alternate,u!==null&&(u.childLanes|=o),y.tag===22&&(t=y.stateNode,t===null||t._visibility&1||(h=!0)),t=y,y=y.return;return t.tag===3?(y=t.stateNode,h&&r!==null&&(h=31-w(o),t=y.hiddenUpdates,u=t[h],u===null?t[h]=[r]:u.push(r),r.lane=o|536870912),y):null}function Ac(t){if(50<ol)throw ol=0,Zm=null,Error(i(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Fs={};function uv(t,r,o,u){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rn(t,r,o,u){return new uv(t,r,o,u)}function Wd(t){return t=t.prototype,!(!t||!t.isReactComponent)}function zr(t,r){var o=t.alternate;return o===null?(o=Rn(t.tag,r,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=r,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&65011712,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,r=t.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function oA(t,r){t.flags&=65011714;var o=t.alternate;return o===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=o.childLanes,t.lanes=o.lanes,t.child=o.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=o.memoizedProps,t.memoizedState=o.memoizedState,t.updateQueue=o.updateQueue,t.type=o.type,r=o.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function pc(t,r,o,u,h,y){var L=0;if(u=t,typeof t=="function")Wd(t)&&(L=1);else if(typeof t=="string")L=mN(t,o,Ie.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case V:return t=Rn(31,o,r,h),t.elementType=V,t.lanes=y,t;case x:return ns(o.children,h,y,r);case S:L=8,h|=24;break;case T:return t=Rn(12,o,r,h|2),t.elementType=T,t.lanes=y,t;case M:return t=Rn(13,o,r,h),t.elementType=M,t.lanes=y,t;case j:return t=Rn(19,o,r,h),t.elementType=j,t.lanes=y,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case k:case R:L=10;break e;case U:L=9;break e;case P:L=11;break e;case Q:L=14;break e;case H:L=16,u=null;break e}L=29,o=Error(i(130,t===null?"null":typeof t,"")),u=null}return r=Rn(L,o,r,h),r.elementType=t,r.type=u,r.lanes=y,r}function ns(t,r,o,u){return t=Rn(7,t,u,r),t.lanes=o,t}function Yd(t,r,o){return t=Rn(6,t,null,r),t.lanes=o,t}function Jd(t,r,o){return r=Rn(4,t.children!==null?t.children:[],t.key,r),r.lanes=o,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Os=[],js=0,yc=null,Ec=0,qn=[],Wn=0,rs=null,Qr=1,Vr="";function is(t,r){Os[js++]=Ec,Os[js++]=yc,yc=t,Ec=r}function lA(t,r,o){qn[Wn++]=Qr,qn[Wn++]=Vr,qn[Wn++]=rs,rs=t;var u=Qr;t=Vr;var h=32-w(u)-1;u&=~(1<<h),o+=1;var y=32-w(r)+h;if(30<y){var L=h-h%5;y=(u&(1<<L)-1).toString(32),u>>=L,h-=L,Qr=1<<32-w(r)+h|o<<h|u,Vr=y+t}else Qr=1<<y|o<<h|u,Vr=t}function Xd(t){t.return!==null&&(is(t,1),lA(t,1,0))}function $d(t){for(;t===yc;)yc=Os[--js],Os[js]=null,Ec=Os[--js],Os[js]=null;for(;t===rs;)rs=qn[--Wn],qn[Wn]=null,Vr=qn[--Wn],qn[Wn]=null,Qr=qn[--Wn],qn[Wn]=null}var mn=null,ba=null,Qt=!1,ss=null,pr=!1,Zd=Error(i(519));function os(t){var r=Error(i(418,""));throw jo(Gn(r,t)),Zd}function cA(t){var r=t.stateNode,o=t.type,u=t.memoizedProps;switch(r[qt]=t,r[Ea]=u,o){case"dialog":Dt("cancel",r),Dt("close",r);break;case"iframe":case"object":case"embed":Dt("load",r);break;case"video":case"audio":for(o=0;o<cl.length;o++)Dt(cl[o],r);break;case"source":Dt("error",r);break;case"img":case"image":case"link":Dt("error",r),Dt("load",r);break;case"details":Dt("toggle",r);break;case"input":Dt("invalid",r),di(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Fr(r);break;case"select":Dt("invalid",r);break;case"textarea":Dt("invalid",r),So(r,u.value,u.defaultValue,u.children),Fr(r)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||r.textContent===""+o||u.suppressHydrationWarning===!0||x0(r.textContent,o)?(u.popover!=null&&(Dt("beforetoggle",r),Dt("toggle",r)),u.onScroll!=null&&Dt("scroll",r),u.onScrollEnd!=null&&Dt("scrollend",r),u.onClick!=null&&(r.onclick=Zc),r=!0):r=!1,r||os(t)}function uA(t){for(mn=t.return;mn;)switch(mn.tag){case 5:case 13:pr=!1;return;case 27:case 3:pr=!0;return;default:mn=mn.return}}function Fo(t){if(t!==mn)return!1;if(!Qt)return uA(t),Qt=!0,!1;var r=t.tag,o;if((o=r!==3&&r!==27)&&((o=r===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||hg(t.type,t.memoizedProps)),o=!o),o&&ba&&os(t),uA(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8)if(o=t.data,o==="/$"){if(r===0){ba=lr(t.nextSibling);break e}r--}else o!=="$"&&o!=="$!"&&o!=="$?"||r++;t=t.nextSibling}ba=null}}else r===27?(r=ba,Ui(t.type)?(t=Eg,Eg=null,ba=t):ba=r):ba=mn?lr(t.stateNode.nextSibling):null;return!0}function Oo(){ba=mn=null,Qt=!1}function dA(){var t=ss;return t!==null&&(Nn===null?Nn=t:Nn.push.apply(Nn,t),ss=null),t}function jo(t){ss===null?ss=[t]:ss.push(t)}var em=q(null),ls=null,Gr=null;function Ei(t,r,o){ne(em,r._currentValue),r._currentValue=o}function Kr(t){t._currentValue=em.current,ee(em)}function tm(t,r,o){for(;t!==null;){var u=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),t===o)break;t=t.return}}function am(t,r,o,u){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var y=h.dependencies;if(y!==null){var L=h.child;y=y.firstContext;e:for(;y!==null;){var F=y;y=h;for(var W=0;W<r.length;W++)if(F.context===r[W]){y.lanes|=o,F=y.alternate,F!==null&&(F.lanes|=o),tm(y.return,o,t),u||(L=null);break e}y=F.next}}else if(h.tag===18){if(L=h.return,L===null)throw Error(i(341));L.lanes|=o,y=L.alternate,y!==null&&(y.lanes|=o),tm(L,o,t),L=null}else L=h.child;if(L!==null)L.return=h;else for(L=h;L!==null;){if(L===t){L=null;break}if(h=L.sibling,h!==null){h.return=L.return,L=h;break}L=L.return}h=L}}function Po(t,r,o,u){t=null;for(var h=r,y=!1;h!==null;){if(!y){if((h.flags&524288)!==0)y=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var L=h.alternate;if(L===null)throw Error(i(387));if(L=L.memoizedProps,L!==null){var F=h.type;Ln(h.pendingProps.value,L.value)||(t!==null?t.push(F):t=[F])}}else if(h===Be.current){if(L=h.alternate,L===null)throw Error(i(387));L.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(hl):t=[hl])}h=h.return}t!==null&&am(r,t,o,u),r.flags|=262144}function bc(t){for(t=t.firstContext;t!==null;){if(!Ln(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function cs(t){ls=t,Gr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function sn(t){return mA(ls,t)}function Ic(t,r){return ls===null&&cs(t),mA(t,r)}function mA(t,r){var o=r._currentValue;if(r={context:r,memoizedValue:o,next:null},Gr===null){if(t===null)throw Error(i(308));Gr=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Gr=Gr.next=r;return o}var dv=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(o,u){t.push(u)}};this.abort=function(){r.aborted=!0,t.forEach(function(o){return o()})}},mv=n.unstable_scheduleCallback,gv=n.unstable_NormalPriority,_a={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nm(){return{controller:new dv,data:new Map,refCount:0}}function Ho(t){t.refCount--,t.refCount===0&&mv(gv,function(){t.controller.abort()})}var zo=null,rm=0,Ps=0,Hs=null;function fv(t,r){if(zo===null){var o=zo=[];rm=0,Ps=sg(),Hs={status:"pending",value:void 0,then:function(u){o.push(u)}}}return rm++,r.then(gA,gA),r}function gA(){if(--rm===0&&zo!==null){Hs!==null&&(Hs.status="fulfilled");var t=zo;zo=null,Ps=0,Hs=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function hv(t,r){var o=[],u={status:"pending",value:null,reason:null,then:function(h){o.push(h)}};return t.then(function(){u.status="fulfilled",u.value=r;for(var h=0;h<o.length;h++)(0,o[h])(r)},function(h){for(u.status="rejected",u.reason=h,h=0;h<o.length;h++)(0,o[h])(void 0)}),u}var fA=X.S;X.S=function(t,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&fv(t,r),fA!==null&&fA(t,r)};var us=q(null);function im(){var t=us.current;return t!==null?t:oa.pooledCache}function vc(t,r){r===null?ne(us,us.current):ne(us,r.pool)}function hA(){var t=im();return t===null?null:{parent:_a._currentValue,pool:t}}var Qo=Error(i(460)),AA=Error(i(474)),Nc=Error(i(542)),sm={then:function(){}};function pA(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Cc(){}function yA(t,r,o){switch(o=t[o],o===void 0?t.push(r):o!==r&&(r.then(Cc,Cc),r=o),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,bA(t),t;default:if(typeof r.status=="string")r.then(Cc,Cc);else{if(t=oa,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=r,t.status="pending",t.then(function(u){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=u}},function(u){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,bA(t),t}throw Vo=r,Qo}}var Vo=null;function EA(){if(Vo===null)throw Error(i(459));var t=Vo;return Vo=null,t}function bA(t){if(t===Qo||t===Nc)throw Error(i(483))}var bi=!1;function om(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lm(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Ii(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function vi(t,r,o){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(Wt&2)!==0){var h=u.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),u.pending=r,r=Ac(t),sA(t,null,o),r}return hc(t,u,r,o),Ac(t)}function Go(t,r,o){if(r=r.updateQueue,r!==null&&(r=r.shared,(o&4194048)!==0)){var u=r.lanes;u&=t.pendingLanes,o|=u,r.lanes=o,ui(t,o)}}function cm(t,r){var o=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var h=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var L={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?h=y=L:y=y.next=L,o=o.next}while(o!==null);y===null?h=y=r:y=y.next=r}else h=y=r;o={baseState:u.baseState,firstBaseUpdate:h,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=r:t.next=r,o.lastBaseUpdate=r}var um=!1;function Ko(){if(um){var t=Hs;if(t!==null)throw t}}function qo(t,r,o,u){um=!1;var h=t.updateQueue;bi=!1;var y=h.firstBaseUpdate,L=h.lastBaseUpdate,F=h.shared.pending;if(F!==null){h.shared.pending=null;var W=F,ge=W.next;W.next=null,L===null?y=ge:L.next=ge,L=W;var ve=t.alternate;ve!==null&&(ve=ve.updateQueue,F=ve.lastBaseUpdate,F!==L&&(F===null?ve.firstBaseUpdate=ge:F.next=ge,ve.lastBaseUpdate=W))}if(y!==null){var ke=h.baseState;L=0,ve=ge=W=null,F=y;do{var fe=F.lane&-536870913,pe=fe!==F.lane;if(pe?(Ot&fe)===fe:(u&fe)===fe){fe!==0&&fe===Ps&&(um=!0),ve!==null&&(ve=ve.next={lane:0,tag:F.tag,payload:F.payload,callback:null,next:null});e:{var mt=t,st=F;fe=r;var ea=o;switch(st.tag){case 1:if(mt=st.payload,typeof mt=="function"){ke=mt.call(ea,ke,fe);break e}ke=mt;break e;case 3:mt.flags=mt.flags&-65537|128;case 0:if(mt=st.payload,fe=typeof mt=="function"?mt.call(ea,ke,fe):mt,fe==null)break e;ke=E({},ke,fe);break e;case 2:bi=!0}}fe=F.callback,fe!==null&&(t.flags|=64,pe&&(t.flags|=8192),pe=h.callbacks,pe===null?h.callbacks=[fe]:pe.push(fe))}else pe={lane:fe,tag:F.tag,payload:F.payload,callback:F.callback,next:null},ve===null?(ge=ve=pe,W=ke):ve=ve.next=pe,L|=fe;if(F=F.next,F===null){if(F=h.shared.pending,F===null)break;pe=F,F=pe.next,pe.next=null,h.lastBaseUpdate=pe,h.shared.pending=null}}while(!0);ve===null&&(W=ke),h.baseState=W,h.firstBaseUpdate=ge,h.lastBaseUpdate=ve,y===null&&(h.shared.lanes=0),Li|=L,t.lanes=L,t.memoizedState=ke}}function IA(t,r){if(typeof t!="function")throw Error(i(191,t));t.call(r)}function vA(t,r){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)IA(o[t],r)}var zs=q(null),wc=q(0);function NA(t,r){t=Zr,ne(wc,t),ne(zs,r),Zr=t|r.baseLanes}function dm(){ne(wc,Zr),ne(zs,zs.current)}function mm(){Zr=wc.current,ee(zs),ee(wc)}var Ni=0,Ct=null,$t=null,ka=null,xc=!1,Qs=!1,ds=!1,Sc=0,Wo=0,Vs=null,Av=0;function xa(){throw Error(i(321))}function gm(t,r){if(r===null)return!1;for(var o=0;o<r.length&&o<t.length;o++)if(!Ln(t[o],r[o]))return!1;return!0}function fm(t,r,o,u,h,y){return Ni=y,Ct=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,X.H=t===null||t.memoizedState===null?sp:op,ds=!1,y=o(u,h),ds=!1,Qs&&(y=wA(r,o,u,h)),CA(t),y}function CA(t){X.H=Bc;var r=$t!==null&&$t.next!==null;if(Ni=0,ka=$t=Ct=null,xc=!1,Wo=0,Vs=null,r)throw Error(i(300));t===null||Va||(t=t.dependencies,t!==null&&bc(t)&&(Va=!0))}function wA(t,r,o,u){Ct=t;var h=0;do{if(Qs&&(Vs=null),Wo=0,Qs=!1,25<=h)throw Error(i(301));if(h+=1,ka=$t=null,t.updateQueue!=null){var y=t.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}X.H=Nv,y=r(o,u)}while(Qs);return y}function pv(){var t=X.H,r=t.useState()[0];return r=typeof r.then=="function"?Yo(r):r,t=t.useState()[0],($t!==null?$t.memoizedState:null)!==t&&(Ct.flags|=1024),r}function hm(){var t=Sc!==0;return Sc=0,t}function Am(t,r,o){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~o}function pm(t){if(xc){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}xc=!1}Ni=0,ka=$t=Ct=null,Qs=!1,Wo=Sc=0,Vs=null}function In(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ka===null?Ct.memoizedState=ka=t:ka=ka.next=t,ka}function La(){if($t===null){var t=Ct.alternate;t=t!==null?t.memoizedState:null}else t=$t.next;var r=ka===null?Ct.memoizedState:ka.next;if(r!==null)ka=r,$t=t;else{if(t===null)throw Ct.alternate===null?Error(i(467)):Error(i(310));$t=t,t={memoizedState:$t.memoizedState,baseState:$t.baseState,baseQueue:$t.baseQueue,queue:$t.queue,next:null},ka===null?Ct.memoizedState=ka=t:ka=ka.next=t}return ka}function ym(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yo(t){var r=Wo;return Wo+=1,Vs===null&&(Vs=[]),t=yA(Vs,t,r),r=Ct,(ka===null?r.memoizedState:ka.next)===null&&(r=r.alternate,X.H=r===null||r.memoizedState===null?sp:op),t}function Tc(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Yo(t);if(t.$$typeof===R)return sn(t)}throw Error(i(438,String(t)))}function Em(t){var r=null,o=Ct.updateQueue;if(o!==null&&(r=o.memoCache),r==null){var u=Ct.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),o===null&&(o=ym(),Ct.updateQueue=o),o.memoCache=r,o=r.data[r.index],o===void 0)for(o=r.data[r.index]=Array(t),u=0;u<t;u++)o[u]=G;return r.index++,o}function qr(t,r){return typeof r=="function"?r(t):r}function kc(t){var r=La();return bm(r,$t,t)}function bm(t,r,o){var u=t.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var h=t.baseQueue,y=u.pending;if(y!==null){if(h!==null){var L=h.next;h.next=y.next,y.next=L}r.baseQueue=h=y,u.pending=null}if(y=t.baseState,h===null)t.memoizedState=y;else{r=h.next;var F=L=null,W=null,ge=r,ve=!1;do{var ke=ge.lane&-536870913;if(ke!==ge.lane?(Ot&ke)===ke:(Ni&ke)===ke){var fe=ge.revertLane;if(fe===0)W!==null&&(W=W.next={lane:0,revertLane:0,action:ge.action,hasEagerState:ge.hasEagerState,eagerState:ge.eagerState,next:null}),ke===Ps&&(ve=!0);else if((Ni&fe)===fe){ge=ge.next,fe===Ps&&(ve=!0);continue}else ke={lane:0,revertLane:ge.revertLane,action:ge.action,hasEagerState:ge.hasEagerState,eagerState:ge.eagerState,next:null},W===null?(F=W=ke,L=y):W=W.next=ke,Ct.lanes|=fe,Li|=fe;ke=ge.action,ds&&o(y,ke),y=ge.hasEagerState?ge.eagerState:o(y,ke)}else fe={lane:ke,revertLane:ge.revertLane,action:ge.action,hasEagerState:ge.hasEagerState,eagerState:ge.eagerState,next:null},W===null?(F=W=fe,L=y):W=W.next=fe,Ct.lanes|=ke,Li|=ke;ge=ge.next}while(ge!==null&&ge!==r);if(W===null?L=y:W.next=F,!Ln(y,t.memoizedState)&&(Va=!0,ve&&(o=Hs,o!==null)))throw o;t.memoizedState=y,t.baseState=L,t.baseQueue=W,u.lastRenderedState=y}return h===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function Im(t){var r=La(),o=r.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=t;var u=o.dispatch,h=o.pending,y=r.memoizedState;if(h!==null){o.pending=null;var L=h=h.next;do y=t(y,L.action),L=L.next;while(L!==h);Ln(y,r.memoizedState)||(Va=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),o.lastRenderedState=y}return[y,u]}function xA(t,r,o){var u=Ct,h=La(),y=Qt;if(y){if(o===void 0)throw Error(i(407));o=o()}else o=r();var L=!Ln(($t||h).memoizedState,o);L&&(h.memoizedState=o,Va=!0),h=h.queue;var F=kA.bind(null,u,h,t);if(Jo(2048,8,F,[t]),h.getSnapshot!==r||L||ka!==null&&ka.memoizedState.tag&1){if(u.flags|=2048,Gs(9,Lc(),TA.bind(null,u,h,o,r),null),oa===null)throw Error(i(349));y||(Ni&124)!==0||SA(u,r,o)}return o}function SA(t,r,o){t.flags|=16384,t={getSnapshot:r,value:o},r=Ct.updateQueue,r===null?(r=ym(),Ct.updateQueue=r,r.stores=[t]):(o=r.stores,o===null?r.stores=[t]:o.push(t))}function TA(t,r,o,u){r.value=o,r.getSnapshot=u,LA(r)&&RA(t)}function kA(t,r,o){return o(function(){LA(r)&&RA(t)})}function LA(t){var r=t.getSnapshot;t=t.value;try{var o=r();return!Ln(t,o)}catch{return!0}}function RA(t){var r=_s(t,2);r!==null&&_n(r,t,2)}function vm(t){var r=In();if(typeof t=="function"){var o=t;if(t=o(),ds){v(!0);try{o()}finally{v(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qr,lastRenderedState:t},r}function DA(t,r,o,u){return t.baseState=o,bm(t,$t,typeof u=="function"?u:qr)}function yv(t,r,o,u,h){if(Dc(t))throw Error(i(485));if(t=r.action,t!==null){var y={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){y.listeners.push(L)}};X.T!==null?o(!0):y.isTransition=!1,u(y),o=r.pending,o===null?(y.next=r.pending=y,BA(r,y)):(y.next=o.next,r.pending=o.next=y)}}function BA(t,r){var o=r.action,u=r.payload,h=t.state;if(r.isTransition){var y=X.T,L={};X.T=L;try{var F=o(h,u),W=X.S;W!==null&&W(L,F),UA(t,r,F)}catch(ge){Nm(t,r,ge)}finally{X.T=y}}else try{y=o(h,u),UA(t,r,y)}catch(ge){Nm(t,r,ge)}}function UA(t,r,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){MA(t,r,u)},function(u){return Nm(t,r,u)}):MA(t,r,o)}function MA(t,r,o){r.status="fulfilled",r.value=o,_A(r),t.state=o,r=t.pending,r!==null&&(o=r.next,o===r?t.pending=null:(o=o.next,r.next=o,BA(t,o)))}function Nm(t,r,o){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=o,_A(r),r=r.next;while(r!==u)}t.action=null}function _A(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function FA(t,r){return r}function OA(t,r){if(Qt){var o=oa.formState;if(o!==null){e:{var u=Ct;if(Qt){if(ba){t:{for(var h=ba,y=pr;h.nodeType!==8;){if(!y){h=null;break t}if(h=lr(h.nextSibling),h===null){h=null;break t}}y=h.data,h=y==="F!"||y==="F"?h:null}if(h){ba=lr(h.nextSibling),u=h.data==="F!";break e}}os(u)}u=!1}u&&(r=o[0])}}return o=In(),o.memoizedState=o.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:FA,lastRenderedState:r},o.queue=u,o=np.bind(null,Ct,u),u.dispatch=o,u=vm(!1),y=Tm.bind(null,Ct,!1,u.queue),u=In(),h={state:r,dispatch:null,action:t,pending:null},u.queue=h,o=yv.bind(null,Ct,h,y,o),h.dispatch=o,u.memoizedState=t,[r,o,!1]}function jA(t){var r=La();return PA(r,$t,t)}function PA(t,r,o){if(r=bm(t,r,FA)[0],t=kc(qr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Yo(r)}catch(L){throw L===Qo?Nc:L}else u=r;r=La();var h=r.queue,y=h.dispatch;return o!==r.memoizedState&&(Ct.flags|=2048,Gs(9,Lc(),Ev.bind(null,h,o),null)),[u,y,t]}function Ev(t,r){t.action=r}function HA(t){var r=La(),o=$t;if(o!==null)return PA(r,o,t);La(),r=r.memoizedState,o=La();var u=o.queue.dispatch;return o.memoizedState=t,[r,u,!1]}function Gs(t,r,o,u){return t={tag:t,create:o,deps:u,inst:r,next:null},r=Ct.updateQueue,r===null&&(r=ym(),Ct.updateQueue=r),o=r.lastEffect,o===null?r.lastEffect=t.next=t:(u=o.next,o.next=t,t.next=u,r.lastEffect=t),t}function Lc(){return{destroy:void 0,resource:void 0}}function zA(){return La().memoizedState}function Rc(t,r,o,u){var h=In();u=u===void 0?null:u,Ct.flags|=t,h.memoizedState=Gs(1|r,Lc(),o,u)}function Jo(t,r,o,u){var h=La();u=u===void 0?null:u;var y=h.memoizedState.inst;$t!==null&&u!==null&&gm(u,$t.memoizedState.deps)?h.memoizedState=Gs(r,y,o,u):(Ct.flags|=t,h.memoizedState=Gs(1|r,y,o,u))}function QA(t,r){Rc(8390656,8,t,r)}function VA(t,r){Jo(2048,8,t,r)}function GA(t,r){return Jo(4,2,t,r)}function KA(t,r){return Jo(4,4,t,r)}function qA(t,r){if(typeof r=="function"){t=t();var o=r(t);return function(){typeof o=="function"?o():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function WA(t,r,o){o=o!=null?o.concat([t]):null,Jo(4,4,qA.bind(null,r,t),o)}function Cm(){}function YA(t,r){var o=La();r=r===void 0?null:r;var u=o.memoizedState;return r!==null&&gm(r,u[1])?u[0]:(o.memoizedState=[t,r],t)}function JA(t,r){var o=La();r=r===void 0?null:r;var u=o.memoizedState;if(r!==null&&gm(r,u[1]))return u[0];if(u=t(),ds){v(!0);try{t()}finally{v(!1)}}return o.memoizedState=[u,r],u}function wm(t,r,o){return o===void 0||(Ni&1073741824)!==0?t.memoizedState=r:(t.memoizedState=o,t=Zp(),Ct.lanes|=t,Li|=t,o)}function XA(t,r,o,u){return Ln(o,r)?o:zs.current!==null?(t=wm(t,o,u),Ln(t,r)||(Va=!0),t):(Ni&42)===0?(Va=!0,t.memoizedState=o):(t=Zp(),Ct.lanes|=t,Li|=t,r)}function $A(t,r,o,u,h){var y=ie.p;ie.p=y!==0&&8>y?y:8;var L=X.T,F={};X.T=F,Tm(t,!1,r,o);try{var W=h(),ge=X.S;if(ge!==null&&ge(F,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var ve=hv(W,u);Xo(t,r,ve,Mn(t))}else Xo(t,r,u,Mn(t))}catch(ke){Xo(t,r,{then:function(){},status:"rejected",reason:ke},Mn())}finally{ie.p=y,X.T=L}}function bv(){}function xm(t,r,o,u){if(t.tag!==5)throw Error(i(476));var h=ZA(t).queue;$A(t,h,r,ce,o===null?bv:function(){return ep(t),o(u)})}function ZA(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qr,lastRenderedState:ce},next:null};var o={};return r.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qr,lastRenderedState:o},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function ep(t){var r=ZA(t).next.queue;Xo(t,r,{},Mn())}function Sm(){return sn(hl)}function tp(){return La().memoizedState}function ap(){return La().memoizedState}function Iv(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var o=Mn();t=Ii(o);var u=vi(r,t,o);u!==null&&(_n(u,r,o),Go(u,r,o)),r={cache:nm()},t.payload=r;return}r=r.return}}function vv(t,r,o){var u=Mn();o={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null},Dc(t)?rp(r,o):(o=qd(t,r,o,u),o!==null&&(_n(o,t,u),ip(o,r,u)))}function np(t,r,o){var u=Mn();Xo(t,r,o,u)}function Xo(t,r,o,u){var h={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null};if(Dc(t))rp(r,h);else{var y=t.alternate;if(t.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var L=r.lastRenderedState,F=y(L,o);if(h.hasEagerState=!0,h.eagerState=F,Ln(F,L))return hc(t,r,h,0),oa===null&&fc(),!1}catch{}finally{}if(o=qd(t,r,h,u),o!==null)return _n(o,t,u),ip(o,r,u),!0}return!1}function Tm(t,r,o,u){if(u={lane:2,revertLane:sg(),action:u,hasEagerState:!1,eagerState:null,next:null},Dc(t)){if(r)throw Error(i(479))}else r=qd(t,o,u,2),r!==null&&_n(r,t,2)}function Dc(t){var r=t.alternate;return t===Ct||r!==null&&r===Ct}function rp(t,r){Qs=xc=!0;var o=t.pending;o===null?r.next=r:(r.next=o.next,o.next=r),t.pending=r}function ip(t,r,o){if((o&4194048)!==0){var u=r.lanes;u&=t.pendingLanes,o|=u,r.lanes=o,ui(t,o)}}var Bc={readContext:sn,use:Tc,useCallback:xa,useContext:xa,useEffect:xa,useImperativeHandle:xa,useLayoutEffect:xa,useInsertionEffect:xa,useMemo:xa,useReducer:xa,useRef:xa,useState:xa,useDebugValue:xa,useDeferredValue:xa,useTransition:xa,useSyncExternalStore:xa,useId:xa,useHostTransitionStatus:xa,useFormState:xa,useActionState:xa,useOptimistic:xa,useMemoCache:xa,useCacheRefresh:xa},sp={readContext:sn,use:Tc,useCallback:function(t,r){return In().memoizedState=[t,r===void 0?null:r],t},useContext:sn,useEffect:QA,useImperativeHandle:function(t,r,o){o=o!=null?o.concat([t]):null,Rc(4194308,4,qA.bind(null,r,t),o)},useLayoutEffect:function(t,r){return Rc(4194308,4,t,r)},useInsertionEffect:function(t,r){Rc(4,2,t,r)},useMemo:function(t,r){var o=In();r=r===void 0?null:r;var u=t();if(ds){v(!0);try{t()}finally{v(!1)}}return o.memoizedState=[u,r],u},useReducer:function(t,r,o){var u=In();if(o!==void 0){var h=o(r);if(ds){v(!0);try{o(r)}finally{v(!1)}}}else h=r;return u.memoizedState=u.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},u.queue=t,t=t.dispatch=vv.bind(null,Ct,t),[u.memoizedState,t]},useRef:function(t){var r=In();return t={current:t},r.memoizedState=t},useState:function(t){t=vm(t);var r=t.queue,o=np.bind(null,Ct,r);return r.dispatch=o,[t.memoizedState,o]},useDebugValue:Cm,useDeferredValue:function(t,r){var o=In();return wm(o,t,r)},useTransition:function(){var t=vm(!1);return t=$A.bind(null,Ct,t.queue,!0,!1),In().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,o){var u=Ct,h=In();if(Qt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=r(),oa===null)throw Error(i(349));(Ot&124)!==0||SA(u,r,o)}h.memoizedState=o;var y={value:o,getSnapshot:r};return h.queue=y,QA(kA.bind(null,u,y,t),[t]),u.flags|=2048,Gs(9,Lc(),TA.bind(null,u,y,o,r),null),o},useId:function(){var t=In(),r=oa.identifierPrefix;if(Qt){var o=Vr,u=Qr;o=(u&~(1<<32-w(u)-1)).toString(32)+o,r="«"+r+"R"+o,o=Sc++,0<o&&(r+="H"+o.toString(32)),r+="»"}else o=Av++,r="«"+r+"r"+o.toString(32)+"»";return t.memoizedState=r},useHostTransitionStatus:Sm,useFormState:OA,useActionState:OA,useOptimistic:function(t){var r=In();r.memoizedState=r.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=o,r=Tm.bind(null,Ct,!0,o),o.dispatch=r,[t,r]},useMemoCache:Em,useCacheRefresh:function(){return In().memoizedState=Iv.bind(null,Ct)}},op={readContext:sn,use:Tc,useCallback:YA,useContext:sn,useEffect:VA,useImperativeHandle:WA,useInsertionEffect:GA,useLayoutEffect:KA,useMemo:JA,useReducer:kc,useRef:zA,useState:function(){return kc(qr)},useDebugValue:Cm,useDeferredValue:function(t,r){var o=La();return XA(o,$t.memoizedState,t,r)},useTransition:function(){var t=kc(qr)[0],r=La().memoizedState;return[typeof t=="boolean"?t:Yo(t),r]},useSyncExternalStore:xA,useId:tp,useHostTransitionStatus:Sm,useFormState:jA,useActionState:jA,useOptimistic:function(t,r){var o=La();return DA(o,$t,t,r)},useMemoCache:Em,useCacheRefresh:ap},Nv={readContext:sn,use:Tc,useCallback:YA,useContext:sn,useEffect:VA,useImperativeHandle:WA,useInsertionEffect:GA,useLayoutEffect:KA,useMemo:JA,useReducer:Im,useRef:zA,useState:function(){return Im(qr)},useDebugValue:Cm,useDeferredValue:function(t,r){var o=La();return $t===null?wm(o,t,r):XA(o,$t.memoizedState,t,r)},useTransition:function(){var t=Im(qr)[0],r=La().memoizedState;return[typeof t=="boolean"?t:Yo(t),r]},useSyncExternalStore:xA,useId:tp,useHostTransitionStatus:Sm,useFormState:HA,useActionState:HA,useOptimistic:function(t,r){var o=La();return $t!==null?DA(o,$t,t,r):(o.baseState=t,[t,o.queue.dispatch])},useMemoCache:Em,useCacheRefresh:ap},Ks=null,$o=0;function Uc(t){var r=$o;return $o+=1,Ks===null&&(Ks=[]),yA(Ks,t,r)}function Zo(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Mc(t,r){throw r.$$typeof===p?Error(i(525)):(t=Object.prototype.toString.call(r),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function lp(t){var r=t._init;return r(t._payload)}function cp(t){function r(oe,te){if(t){var me=oe.deletions;me===null?(oe.deletions=[te],oe.flags|=16):me.push(te)}}function o(oe,te){if(!t)return null;for(;te!==null;)r(oe,te),te=te.sibling;return null}function u(oe){for(var te=new Map;oe!==null;)oe.key!==null?te.set(oe.key,oe):te.set(oe.index,oe),oe=oe.sibling;return te}function h(oe,te){return oe=zr(oe,te),oe.index=0,oe.sibling=null,oe}function y(oe,te,me){return oe.index=me,t?(me=oe.alternate,me!==null?(me=me.index,me<te?(oe.flags|=67108866,te):me):(oe.flags|=67108866,te)):(oe.flags|=1048576,te)}function L(oe){return t&&oe.alternate===null&&(oe.flags|=67108866),oe}function F(oe,te,me,Ce){return te===null||te.tag!==6?(te=Yd(me,oe.mode,Ce),te.return=oe,te):(te=h(te,me),te.return=oe,te)}function W(oe,te,me,Ce){var Ke=me.type;return Ke===x?ve(oe,te,me.props.children,Ce,me.key):te!==null&&(te.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===H&&lp(Ke)===te.type)?(te=h(te,me.props),Zo(te,me),te.return=oe,te):(te=pc(me.type,me.key,me.props,null,oe.mode,Ce),Zo(te,me),te.return=oe,te)}function ge(oe,te,me,Ce){return te===null||te.tag!==4||te.stateNode.containerInfo!==me.containerInfo||te.stateNode.implementation!==me.implementation?(te=Jd(me,oe.mode,Ce),te.return=oe,te):(te=h(te,me.children||[]),te.return=oe,te)}function ve(oe,te,me,Ce,Ke){return te===null||te.tag!==7?(te=ns(me,oe.mode,Ce,Ke),te.return=oe,te):(te=h(te,me),te.return=oe,te)}function ke(oe,te,me){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Yd(""+te,oe.mode,me),te.return=oe,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case C:return me=pc(te.type,te.key,te.props,null,oe.mode,me),Zo(me,te),me.return=oe,me;case N:return te=Jd(te,oe.mode,me),te.return=oe,te;case H:var Ce=te._init;return te=Ce(te._payload),ke(oe,te,me)}if(Ae(te)||$(te))return te=ns(te,oe.mode,me,null),te.return=oe,te;if(typeof te.then=="function")return ke(oe,Uc(te),me);if(te.$$typeof===R)return ke(oe,Ic(oe,te),me);Mc(oe,te)}return null}function fe(oe,te,me,Ce){var Ke=te!==null?te.key:null;if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return Ke!==null?null:F(oe,te,""+me,Ce);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case C:return me.key===Ke?W(oe,te,me,Ce):null;case N:return me.key===Ke?ge(oe,te,me,Ce):null;case H:return Ke=me._init,me=Ke(me._payload),fe(oe,te,me,Ce)}if(Ae(me)||$(me))return Ke!==null?null:ve(oe,te,me,Ce,null);if(typeof me.then=="function")return fe(oe,te,Uc(me),Ce);if(me.$$typeof===R)return fe(oe,te,Ic(oe,me),Ce);Mc(oe,me)}return null}function pe(oe,te,me,Ce,Ke){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return oe=oe.get(me)||null,F(te,oe,""+Ce,Ke);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case C:return oe=oe.get(Ce.key===null?me:Ce.key)||null,W(te,oe,Ce,Ke);case N:return oe=oe.get(Ce.key===null?me:Ce.key)||null,ge(te,oe,Ce,Ke);case H:var St=Ce._init;return Ce=St(Ce._payload),pe(oe,te,me,Ce,Ke)}if(Ae(Ce)||$(Ce))return oe=oe.get(me)||null,ve(te,oe,Ce,Ke,null);if(typeof Ce.then=="function")return pe(oe,te,me,Uc(Ce),Ke);if(Ce.$$typeof===R)return pe(oe,te,me,Ic(te,Ce),Ke);Mc(te,Ce)}return null}function mt(oe,te,me,Ce){for(var Ke=null,St=null,tt=te,lt=te=0,Ka=null;tt!==null&&lt<me.length;lt++){tt.index>lt?(Ka=tt,tt=null):Ka=tt.sibling;var Ht=fe(oe,tt,me[lt],Ce);if(Ht===null){tt===null&&(tt=Ka);break}t&&tt&&Ht.alternate===null&&r(oe,tt),te=y(Ht,te,lt),St===null?Ke=Ht:St.sibling=Ht,St=Ht,tt=Ka}if(lt===me.length)return o(oe,tt),Qt&&is(oe,lt),Ke;if(tt===null){for(;lt<me.length;lt++)tt=ke(oe,me[lt],Ce),tt!==null&&(te=y(tt,te,lt),St===null?Ke=tt:St.sibling=tt,St=tt);return Qt&&is(oe,lt),Ke}for(tt=u(tt);lt<me.length;lt++)Ka=pe(tt,oe,lt,me[lt],Ce),Ka!==null&&(t&&Ka.alternate!==null&&tt.delete(Ka.key===null?lt:Ka.key),te=y(Ka,te,lt),St===null?Ke=Ka:St.sibling=Ka,St=Ka);return t&&tt.forEach(function(ji){return r(oe,ji)}),Qt&&is(oe,lt),Ke}function st(oe,te,me,Ce){if(me==null)throw Error(i(151));for(var Ke=null,St=null,tt=te,lt=te=0,Ka=null,Ht=me.next();tt!==null&&!Ht.done;lt++,Ht=me.next()){tt.index>lt?(Ka=tt,tt=null):Ka=tt.sibling;var ji=fe(oe,tt,Ht.value,Ce);if(ji===null){tt===null&&(tt=Ka);break}t&&tt&&ji.alternate===null&&r(oe,tt),te=y(ji,te,lt),St===null?Ke=ji:St.sibling=ji,St=ji,tt=Ka}if(Ht.done)return o(oe,tt),Qt&&is(oe,lt),Ke;if(tt===null){for(;!Ht.done;lt++,Ht=me.next())Ht=ke(oe,Ht.value,Ce),Ht!==null&&(te=y(Ht,te,lt),St===null?Ke=Ht:St.sibling=Ht,St=Ht);return Qt&&is(oe,lt),Ke}for(tt=u(tt);!Ht.done;lt++,Ht=me.next())Ht=pe(tt,oe,lt,Ht.value,Ce),Ht!==null&&(t&&Ht.alternate!==null&&tt.delete(Ht.key===null?lt:Ht.key),te=y(Ht,te,lt),St===null?Ke=Ht:St.sibling=Ht,St=Ht);return t&&tt.forEach(function(CN){return r(oe,CN)}),Qt&&is(oe,lt),Ke}function ea(oe,te,me,Ce){if(typeof me=="object"&&me!==null&&me.type===x&&me.key===null&&(me=me.props.children),typeof me=="object"&&me!==null){switch(me.$$typeof){case C:e:{for(var Ke=me.key;te!==null;){if(te.key===Ke){if(Ke=me.type,Ke===x){if(te.tag===7){o(oe,te.sibling),Ce=h(te,me.props.children),Ce.return=oe,oe=Ce;break e}}else if(te.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===H&&lp(Ke)===te.type){o(oe,te.sibling),Ce=h(te,me.props),Zo(Ce,me),Ce.return=oe,oe=Ce;break e}o(oe,te);break}else r(oe,te);te=te.sibling}me.type===x?(Ce=ns(me.props.children,oe.mode,Ce,me.key),Ce.return=oe,oe=Ce):(Ce=pc(me.type,me.key,me.props,null,oe.mode,Ce),Zo(Ce,me),Ce.return=oe,oe=Ce)}return L(oe);case N:e:{for(Ke=me.key;te!==null;){if(te.key===Ke)if(te.tag===4&&te.stateNode.containerInfo===me.containerInfo&&te.stateNode.implementation===me.implementation){o(oe,te.sibling),Ce=h(te,me.children||[]),Ce.return=oe,oe=Ce;break e}else{o(oe,te);break}else r(oe,te);te=te.sibling}Ce=Jd(me,oe.mode,Ce),Ce.return=oe,oe=Ce}return L(oe);case H:return Ke=me._init,me=Ke(me._payload),ea(oe,te,me,Ce)}if(Ae(me))return mt(oe,te,me,Ce);if($(me)){if(Ke=$(me),typeof Ke!="function")throw Error(i(150));return me=Ke.call(me),st(oe,te,me,Ce)}if(typeof me.then=="function")return ea(oe,te,Uc(me),Ce);if(me.$$typeof===R)return ea(oe,te,Ic(oe,me),Ce);Mc(oe,me)}return typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint"?(me=""+me,te!==null&&te.tag===6?(o(oe,te.sibling),Ce=h(te,me),Ce.return=oe,oe=Ce):(o(oe,te),Ce=Yd(me,oe.mode,Ce),Ce.return=oe,oe=Ce),L(oe)):o(oe,te)}return function(oe,te,me,Ce){try{$o=0;var Ke=ea(oe,te,me,Ce);return Ks=null,Ke}catch(tt){if(tt===Qo||tt===Nc)throw tt;var St=Rn(29,tt,null,oe.mode);return St.lanes=Ce,St.return=oe,St}finally{}}}var qs=cp(!0),up=cp(!1),Yn=q(null),yr=null;function Ci(t){var r=t.alternate;ne(Fa,Fa.current&1),ne(Yn,t),yr===null&&(r===null||zs.current!==null||r.memoizedState!==null)&&(yr=t)}function dp(t){if(t.tag===22){if(ne(Fa,Fa.current),ne(Yn,t),yr===null){var r=t.alternate;r!==null&&r.memoizedState!==null&&(yr=t)}}else wi()}function wi(){ne(Fa,Fa.current),ne(Yn,Yn.current)}function Wr(t){ee(Yn),yr===t&&(yr=null),ee(Fa)}var Fa=q(0);function _c(t){for(var r=t;r!==null;){if(r.tag===13){var o=r.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||yg(o)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function km(t,r,o,u){r=t.memoizedState,o=o(u,r),o=o==null?r:E({},r,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var Lm={enqueueSetState:function(t,r,o){t=t._reactInternals;var u=Mn(),h=Ii(u);h.payload=r,o!=null&&(h.callback=o),r=vi(t,h,u),r!==null&&(_n(r,t,u),Go(r,t,u))},enqueueReplaceState:function(t,r,o){t=t._reactInternals;var u=Mn(),h=Ii(u);h.tag=1,h.payload=r,o!=null&&(h.callback=o),r=vi(t,h,u),r!==null&&(_n(r,t,u),Go(r,t,u))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var o=Mn(),u=Ii(o);u.tag=2,r!=null&&(u.callback=r),r=vi(t,u,o),r!==null&&(_n(r,t,o),Go(r,t,o))}};function mp(t,r,o,u,h,y,L){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,y,L):r.prototype&&r.prototype.isPureReactComponent?!Mo(o,u)||!Mo(h,y):!0}function gp(t,r,o,u){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(o,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(o,u),r.state!==t&&Lm.enqueueReplaceState(r,r.state,null)}function ms(t,r){var o=r;if("ref"in r){o={};for(var u in r)u!=="ref"&&(o[u]=r[u])}if(t=t.defaultProps){o===r&&(o=E({},o));for(var h in t)o[h]===void 0&&(o[h]=t[h])}return o}var Fc=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function fp(t){Fc(t)}function hp(t){console.error(t)}function Ap(t){Fc(t)}function Oc(t,r){try{var o=t.onUncaughtError;o(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function pp(t,r,o){try{var u=t.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Rm(t,r,o){return o=Ii(o),o.tag=3,o.payload={element:null},o.callback=function(){Oc(t,r)},o}function yp(t){return t=Ii(t),t.tag=3,t}function Ep(t,r,o,u){var h=o.type.getDerivedStateFromError;if(typeof h=="function"){var y=u.value;t.payload=function(){return h(y)},t.callback=function(){pp(r,o,u)}}var L=o.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(t.callback=function(){pp(r,o,u),typeof h!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var F=u.stack;this.componentDidCatch(u.value,{componentStack:F!==null?F:""})})}function Cv(t,r,o,u,h){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=o.alternate,r!==null&&Po(r,o,h,!0),o=Yn.current,o!==null){switch(o.tag){case 13:return yr===null?tg():o.alternate===null&&Ia===0&&(Ia=3),o.flags&=-257,o.flags|=65536,o.lanes=h,u===sm?o.flags|=16384:(r=o.updateQueue,r===null?o.updateQueue=new Set([u]):r.add(u),ng(t,u,h)),!1;case 22:return o.flags|=65536,u===sm?o.flags|=16384:(r=o.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=r):(o=r.retryQueue,o===null?r.retryQueue=new Set([u]):o.add(u)),ng(t,u,h)),!1}throw Error(i(435,o.tag))}return ng(t,u,h),tg(),!1}if(Qt)return r=Yn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,u!==Zd&&(t=Error(i(422),{cause:u}),jo(Gn(t,o)))):(u!==Zd&&(r=Error(i(423),{cause:u}),jo(Gn(r,o))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,u=Gn(u,o),h=Rm(t.stateNode,u,h),cm(t,h),Ia!==4&&(Ia=2)),!1;var y=Error(i(520),{cause:u});if(y=Gn(y,o),sl===null?sl=[y]:sl.push(y),Ia!==4&&(Ia=2),r===null)return!0;u=Gn(u,o),o=r;do{switch(o.tag){case 3:return o.flags|=65536,t=h&-h,o.lanes|=t,t=Rm(o.stateNode,u,t),cm(o,t),!1;case 1:if(r=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Ri===null||!Ri.has(y))))return o.flags|=65536,h&=-h,o.lanes|=h,h=yp(h),Ep(h,t,o,u),cm(o,h),!1}o=o.return}while(o!==null);return!1}var bp=Error(i(461)),Va=!1;function Ya(t,r,o,u){r.child=t===null?up(r,null,o,u):qs(r,t.child,o,u)}function Ip(t,r,o,u,h){o=o.render;var y=r.ref;if("ref"in u){var L={};for(var F in u)F!=="ref"&&(L[F]=u[F])}else L=u;return cs(r),u=fm(t,r,o,L,y,h),F=hm(),t!==null&&!Va?(Am(t,r,h),Yr(t,r,h)):(Qt&&F&&Xd(r),r.flags|=1,Ya(t,r,u,h),r.child)}function vp(t,r,o,u,h){if(t===null){var y=o.type;return typeof y=="function"&&!Wd(y)&&y.defaultProps===void 0&&o.compare===null?(r.tag=15,r.type=y,Np(t,r,y,u,h)):(t=pc(o.type,null,u,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(y=t.child,!jm(t,h)){var L=y.memoizedProps;if(o=o.compare,o=o!==null?o:Mo,o(L,u)&&t.ref===r.ref)return Yr(t,r,h)}return r.flags|=1,t=zr(y,u),t.ref=r.ref,t.return=r,r.child=t}function Np(t,r,o,u,h){if(t!==null){var y=t.memoizedProps;if(Mo(y,u)&&t.ref===r.ref)if(Va=!1,r.pendingProps=u=y,jm(t,h))(t.flags&131072)!==0&&(Va=!0);else return r.lanes=t.lanes,Yr(t,r,h)}return Dm(t,r,o,u,h)}function Cp(t,r,o){var u=r.pendingProps,h=u.children,y=t!==null?t.memoizedState:null;if(u.mode==="hidden"){if((r.flags&128)!==0){if(u=y!==null?y.baseLanes|o:o,t!==null){for(h=r.child=t.child,y=0;h!==null;)y=y|h.lanes|h.childLanes,h=h.sibling;r.childLanes=y&~u}else r.childLanes=0,r.child=null;return wp(t,r,u,o)}if((o&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&vc(r,y!==null?y.cachePool:null),y!==null?NA(r,y):dm(),dp(r);else return r.lanes=r.childLanes=536870912,wp(t,r,y!==null?y.baseLanes|o:o,o)}else y!==null?(vc(r,y.cachePool),NA(r,y),wi(),r.memoizedState=null):(t!==null&&vc(r,null),dm(),wi());return Ya(t,r,h,o),r.child}function wp(t,r,o,u){var h=im();return h=h===null?null:{parent:_a._currentValue,pool:h},r.memoizedState={baseLanes:o,cachePool:h},t!==null&&vc(r,null),dm(),dp(r),t!==null&&Po(t,r,u,!0),null}function jc(t,r){var o=r.ref;if(o===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(t===null||t.ref!==o)&&(r.flags|=4194816)}}function Dm(t,r,o,u,h){return cs(r),o=fm(t,r,o,u,void 0,h),u=hm(),t!==null&&!Va?(Am(t,r,h),Yr(t,r,h)):(Qt&&u&&Xd(r),r.flags|=1,Ya(t,r,o,h),r.child)}function xp(t,r,o,u,h,y){return cs(r),r.updateQueue=null,o=wA(r,u,o,h),CA(t),u=hm(),t!==null&&!Va?(Am(t,r,y),Yr(t,r,y)):(Qt&&u&&Xd(r),r.flags|=1,Ya(t,r,o,y),r.child)}function Sp(t,r,o,u,h){if(cs(r),r.stateNode===null){var y=Fs,L=o.contextType;typeof L=="object"&&L!==null&&(y=sn(L)),y=new o(u,y),r.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Lm,r.stateNode=y,y._reactInternals=r,y=r.stateNode,y.props=u,y.state=r.memoizedState,y.refs={},om(r),L=o.contextType,y.context=typeof L=="object"&&L!==null?sn(L):Fs,y.state=r.memoizedState,L=o.getDerivedStateFromProps,typeof L=="function"&&(km(r,o,L,u),y.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(L=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),L!==y.state&&Lm.enqueueReplaceState(y,y.state,null),qo(r,u,y,h),Ko(),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(t===null){y=r.stateNode;var F=r.memoizedProps,W=ms(o,F);y.props=W;var ge=y.context,ve=o.contextType;L=Fs,typeof ve=="object"&&ve!==null&&(L=sn(ve));var ke=o.getDerivedStateFromProps;ve=typeof ke=="function"||typeof y.getSnapshotBeforeUpdate=="function",F=r.pendingProps!==F,ve||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(F||ge!==L)&&gp(r,y,u,L),bi=!1;var fe=r.memoizedState;y.state=fe,qo(r,u,y,h),Ko(),ge=r.memoizedState,F||fe!==ge||bi?(typeof ke=="function"&&(km(r,o,ke,u),ge=r.memoizedState),(W=bi||mp(r,o,W,u,fe,ge,L))?(ve||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(r.flags|=4194308)):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=ge),y.props=u,y.state=ge,y.context=L,u=W):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{y=r.stateNode,lm(t,r),L=r.memoizedProps,ve=ms(o,L),y.props=ve,ke=r.pendingProps,fe=y.context,ge=o.contextType,W=Fs,typeof ge=="object"&&ge!==null&&(W=sn(ge)),F=o.getDerivedStateFromProps,(ge=typeof F=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(L!==ke||fe!==W)&&gp(r,y,u,W),bi=!1,fe=r.memoizedState,y.state=fe,qo(r,u,y,h),Ko();var pe=r.memoizedState;L!==ke||fe!==pe||bi||t!==null&&t.dependencies!==null&&bc(t.dependencies)?(typeof F=="function"&&(km(r,o,F,u),pe=r.memoizedState),(ve=bi||mp(r,o,ve,u,fe,pe,W)||t!==null&&t.dependencies!==null&&bc(t.dependencies))?(ge||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,pe,W),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,pe,W)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||L===t.memoizedProps&&fe===t.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||L===t.memoizedProps&&fe===t.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=pe),y.props=u,y.state=pe,y.context=W,u=ve):(typeof y.componentDidUpdate!="function"||L===t.memoizedProps&&fe===t.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||L===t.memoizedProps&&fe===t.memoizedState||(r.flags|=1024),u=!1)}return y=u,jc(t,r),u=(r.flags&128)!==0,y||u?(y=r.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),r.flags|=1,t!==null&&u?(r.child=qs(r,t.child,null,h),r.child=qs(r,null,o,h)):Ya(t,r,o,h),r.memoizedState=y.state,t=r.child):t=Yr(t,r,h),t}function Tp(t,r,o,u){return Oo(),r.flags|=256,Ya(t,r,o,u),r.child}var Bm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Um(t){return{baseLanes:t,cachePool:hA()}}function Mm(t,r,o){return t=t!==null?t.childLanes&~o:0,r&&(t|=Jn),t}function kp(t,r,o){var u=r.pendingProps,h=!1,y=(r.flags&128)!==0,L;if((L=y)||(L=t!==null&&t.memoizedState===null?!1:(Fa.current&2)!==0),L&&(h=!0,r.flags&=-129),L=(r.flags&32)!==0,r.flags&=-33,t===null){if(Qt){if(h?Ci(r):wi(),Qt){var F=ba,W;if(W=F){e:{for(W=F,F=pr;W.nodeType!==8;){if(!F){F=null;break e}if(W=lr(W.nextSibling),W===null){F=null;break e}}F=W}F!==null?(r.memoizedState={dehydrated:F,treeContext:rs!==null?{id:Qr,overflow:Vr}:null,retryLane:536870912,hydrationErrors:null},W=Rn(18,null,null,0),W.stateNode=F,W.return=r,r.child=W,mn=r,ba=null,W=!0):W=!1}W||os(r)}if(F=r.memoizedState,F!==null&&(F=F.dehydrated,F!==null))return yg(F)?r.lanes=32:r.lanes=536870912,null;Wr(r)}return F=u.children,u=u.fallback,h?(wi(),h=r.mode,F=Pc({mode:"hidden",children:F},h),u=ns(u,h,o,null),F.return=r,u.return=r,F.sibling=u,r.child=F,h=r.child,h.memoizedState=Um(o),h.childLanes=Mm(t,L,o),r.memoizedState=Bm,u):(Ci(r),_m(r,F))}if(W=t.memoizedState,W!==null&&(F=W.dehydrated,F!==null)){if(y)r.flags&256?(Ci(r),r.flags&=-257,r=Fm(t,r,o)):r.memoizedState!==null?(wi(),r.child=t.child,r.flags|=128,r=null):(wi(),h=u.fallback,F=r.mode,u=Pc({mode:"visible",children:u.children},F),h=ns(h,F,o,null),h.flags|=2,u.return=r,h.return=r,u.sibling=h,r.child=u,qs(r,t.child,null,o),u=r.child,u.memoizedState=Um(o),u.childLanes=Mm(t,L,o),r.memoizedState=Bm,r=h);else if(Ci(r),yg(F)){if(L=F.nextSibling&&F.nextSibling.dataset,L)var ge=L.dgst;L=ge,u=Error(i(419)),u.stack="",u.digest=L,jo({value:u,source:null,stack:null}),r=Fm(t,r,o)}else if(Va||Po(t,r,o,!1),L=(o&t.childLanes)!==0,Va||L){if(L=oa,L!==null&&(u=o&-o,u=(u&42)!==0?1:ta(u),u=(u&(L.suspendedLanes|o))!==0?0:u,u!==0&&u!==W.retryLane))throw W.retryLane=u,_s(t,u),_n(L,t,u),bp;F.data==="$?"||tg(),r=Fm(t,r,o)}else F.data==="$?"?(r.flags|=192,r.child=t.child,r=null):(t=W.treeContext,ba=lr(F.nextSibling),mn=r,Qt=!0,ss=null,pr=!1,t!==null&&(qn[Wn++]=Qr,qn[Wn++]=Vr,qn[Wn++]=rs,Qr=t.id,Vr=t.overflow,rs=r),r=_m(r,u.children),r.flags|=4096);return r}return h?(wi(),h=u.fallback,F=r.mode,W=t.child,ge=W.sibling,u=zr(W,{mode:"hidden",children:u.children}),u.subtreeFlags=W.subtreeFlags&65011712,ge!==null?h=zr(ge,h):(h=ns(h,F,o,null),h.flags|=2),h.return=r,u.return=r,u.sibling=h,r.child=u,u=h,h=r.child,F=t.child.memoizedState,F===null?F=Um(o):(W=F.cachePool,W!==null?(ge=_a._currentValue,W=W.parent!==ge?{parent:ge,pool:ge}:W):W=hA(),F={baseLanes:F.baseLanes|o,cachePool:W}),h.memoizedState=F,h.childLanes=Mm(t,L,o),r.memoizedState=Bm,u):(Ci(r),o=t.child,t=o.sibling,o=zr(o,{mode:"visible",children:u.children}),o.return=r,o.sibling=null,t!==null&&(L=r.deletions,L===null?(r.deletions=[t],r.flags|=16):L.push(t)),r.child=o,r.memoizedState=null,o)}function _m(t,r){return r=Pc({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Pc(t,r){return t=Rn(22,t,null,r),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Fm(t,r,o){return qs(r,t.child,null,o),t=_m(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Lp(t,r,o){t.lanes|=r;var u=t.alternate;u!==null&&(u.lanes|=r),tm(t.return,r,o)}function Om(t,r,o,u,h){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:h}:(y.isBackwards=r,y.rendering=null,y.renderingStartTime=0,y.last=u,y.tail=o,y.tailMode=h)}function Rp(t,r,o){var u=r.pendingProps,h=u.revealOrder,y=u.tail;if(Ya(t,r,u.children,o),u=Fa.current,(u&2)!==0)u=u&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Lp(t,o,r);else if(t.tag===19)Lp(t,o,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}u&=1}switch(ne(Fa,u),h){case"forwards":for(o=r.child,h=null;o!==null;)t=o.alternate,t!==null&&_c(t)===null&&(h=o),o=o.sibling;o=h,o===null?(h=r.child,r.child=null):(h=o.sibling,o.sibling=null),Om(r,!1,h,o,y);break;case"backwards":for(o=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&_c(t)===null){r.child=h;break}t=h.sibling,h.sibling=o,o=h,h=t}Om(r,!0,o,null,y);break;case"together":Om(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Yr(t,r,o){if(t!==null&&(r.dependencies=t.dependencies),Li|=r.lanes,(o&r.childLanes)===0)if(t!==null){if(Po(t,r,o,!1),(o&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(i(153));if(r.child!==null){for(t=r.child,o=zr(t,t.pendingProps),r.child=o,o.return=r;t.sibling!==null;)t=t.sibling,o=o.sibling=zr(t,t.pendingProps),o.return=r;o.sibling=null}return r.child}function jm(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&bc(t)))}function wv(t,r,o){switch(r.tag){case 3:xe(r,r.stateNode.containerInfo),Ei(r,_a,t.memoizedState.cache),Oo();break;case 27:case 5:At(r);break;case 4:xe(r,r.stateNode.containerInfo);break;case 10:Ei(r,r.type,r.memoizedProps.value);break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Ci(r),r.flags|=128,null):(o&r.child.childLanes)!==0?kp(t,r,o):(Ci(r),t=Yr(t,r,o),t!==null?t.sibling:null);Ci(r);break;case 19:var h=(t.flags&128)!==0;if(u=(o&r.childLanes)!==0,u||(Po(t,r,o,!1),u=(o&r.childLanes)!==0),h){if(u)return Rp(t,r,o);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),ne(Fa,Fa.current),u)break;return null;case 22:case 23:return r.lanes=0,Cp(t,r,o);case 24:Ei(r,_a,t.memoizedState.cache)}return Yr(t,r,o)}function Dp(t,r,o){if(t!==null)if(t.memoizedProps!==r.pendingProps)Va=!0;else{if(!jm(t,o)&&(r.flags&128)===0)return Va=!1,wv(t,r,o);Va=(t.flags&131072)!==0}else Va=!1,Qt&&(r.flags&1048576)!==0&&lA(r,Ec,r.index);switch(r.lanes=0,r.tag){case 16:e:{t=r.pendingProps;var u=r.elementType,h=u._init;if(u=h(u._payload),r.type=u,typeof u=="function")Wd(u)?(t=ms(u,t),r.tag=1,r=Sp(null,r,u,t,o)):(r.tag=0,r=Dm(null,r,u,t,o));else{if(u!=null){if(h=u.$$typeof,h===P){r.tag=11,r=Ip(null,r,u,t,o);break e}else if(h===Q){r.tag=14,r=vp(null,r,u,t,o);break e}}throw r=re(u)||u,Error(i(306,r,""))}}return r;case 0:return Dm(t,r,r.type,r.pendingProps,o);case 1:return u=r.type,h=ms(u,r.pendingProps),Sp(t,r,u,h,o);case 3:e:{if(xe(r,r.stateNode.containerInfo),t===null)throw Error(i(387));u=r.pendingProps;var y=r.memoizedState;h=y.element,lm(t,r),qo(r,u,null,o);var L=r.memoizedState;if(u=L.cache,Ei(r,_a,u),u!==y.cache&&am(r,[_a],o,!0),Ko(),u=L.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:L.cache},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){r=Tp(t,r,u,o);break e}else if(u!==h){h=Gn(Error(i(424)),r),jo(h),r=Tp(t,r,u,o);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(ba=lr(t.firstChild),mn=r,Qt=!0,ss=null,pr=!0,o=up(r,null,u,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(Oo(),u===h){r=Yr(t,r,o);break e}Ya(t,r,u,o)}r=r.child}return r;case 26:return jc(t,r),t===null?(o=_0(r.type,null,r.pendingProps,null))?r.memoizedState=o:Qt||(o=r.type,t=r.pendingProps,u=eu(Re.current).createElement(o),u[qt]=r,u[Ea]=t,Xa(u,o,t),it(u),r.stateNode=u):r.memoizedState=_0(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return At(r),t===null&&Qt&&(u=r.stateNode=B0(r.type,r.pendingProps,Re.current),mn=r,pr=!0,h=ba,Ui(r.type)?(Eg=h,ba=lr(u.firstChild)):ba=h),Ya(t,r,r.pendingProps.children,o),jc(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Qt&&((h=u=ba)&&(u=Zv(u,r.type,r.pendingProps,pr),u!==null?(r.stateNode=u,mn=r,ba=lr(u.firstChild),pr=!1,h=!0):h=!1),h||os(r)),At(r),h=r.type,y=r.pendingProps,L=t!==null?t.memoizedProps:null,u=y.children,hg(h,y)?u=null:L!==null&&hg(h,L)&&(r.flags|=32),r.memoizedState!==null&&(h=fm(t,r,pv,null,null,o),hl._currentValue=h),jc(t,r),Ya(t,r,u,o),r.child;case 6:return t===null&&Qt&&((t=o=ba)&&(o=eN(o,r.pendingProps,pr),o!==null?(r.stateNode=o,mn=r,ba=null,t=!0):t=!1),t||os(r)),null;case 13:return kp(t,r,o);case 4:return xe(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=qs(r,null,u,o):Ya(t,r,u,o),r.child;case 11:return Ip(t,r,r.type,r.pendingProps,o);case 7:return Ya(t,r,r.pendingProps,o),r.child;case 8:return Ya(t,r,r.pendingProps.children,o),r.child;case 12:return Ya(t,r,r.pendingProps.children,o),r.child;case 10:return u=r.pendingProps,Ei(r,r.type,u.value),Ya(t,r,u.children,o),r.child;case 9:return h=r.type._context,u=r.pendingProps.children,cs(r),h=sn(h),u=u(h),r.flags|=1,Ya(t,r,u,o),r.child;case 14:return vp(t,r,r.type,r.pendingProps,o);case 15:return Np(t,r,r.type,r.pendingProps,o);case 19:return Rp(t,r,o);case 31:return u=r.pendingProps,o=r.mode,u={mode:u.mode,children:u.children},t===null?(o=Pc(u,o),o.ref=r.ref,r.child=o,o.return=r,r=o):(o=zr(t.child,u),o.ref=r.ref,r.child=o,o.return=r,r=o),r;case 22:return Cp(t,r,o);case 24:return cs(r),u=sn(_a),t===null?(h=im(),h===null&&(h=oa,y=nm(),h.pooledCache=y,y.refCount++,y!==null&&(h.pooledCacheLanes|=o),h=y),r.memoizedState={parent:u,cache:h},om(r),Ei(r,_a,h)):((t.lanes&o)!==0&&(lm(t,r),qo(r,null,null,o),Ko()),h=t.memoizedState,y=r.memoizedState,h.parent!==u?(h={parent:u,cache:u},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),Ei(r,_a,u)):(u=y.cache,Ei(r,_a,u),u!==h.cache&&am(r,[_a],o,!0))),Ya(t,r,r.pendingProps.children,o),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function Jr(t){t.flags|=4}function Bp(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!H0(r)){if(r=Yn.current,r!==null&&((Ot&4194048)===Ot?yr!==null:(Ot&62914560)!==Ot&&(Ot&536870912)===0||r!==yr))throw Vo=sm,AA;t.flags|=8192}}function Hc(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?sa():536870912,t.lanes|=r,Xs|=r)}function el(t,r){if(!Qt)switch(t.tailMode){case"hidden":r=t.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function pa(t){var r=t.alternate!==null&&t.alternate.child===t.child,o=0,u=0;if(r)for(var h=t.child;h!==null;)o|=h.lanes|h.childLanes,u|=h.subtreeFlags&65011712,u|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)o|=h.lanes|h.childLanes,u|=h.subtreeFlags,u|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=u,t.childLanes=o,r}function xv(t,r,o){var u=r.pendingProps;switch($d(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pa(r),null;case 1:return pa(r),null;case 3:return o=r.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),Kr(_a),ze(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(Fo(r)?Jr(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,dA())),pa(r),null;case 26:return o=r.memoizedState,t===null?(Jr(r),o!==null?(pa(r),Bp(r,o)):(pa(r),r.flags&=-16777217)):o?o!==t.memoizedState?(Jr(r),pa(r),Bp(r,o)):(pa(r),r.flags&=-16777217):(t.memoizedProps!==u&&Jr(r),pa(r),r.flags&=-16777217),null;case 27:Lt(r),o=Re.current;var h=r.type;if(t!==null&&r.stateNode!=null)t.memoizedProps!==u&&Jr(r);else{if(!u){if(r.stateNode===null)throw Error(i(166));return pa(r),null}t=Ie.current,Fo(r)?cA(r):(t=B0(h,u,o),r.stateNode=t,Jr(r))}return pa(r),null;case 5:if(Lt(r),o=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&Jr(r);else{if(!u){if(r.stateNode===null)throw Error(i(166));return pa(r),null}if(t=Ie.current,Fo(r))cA(r);else{switch(h=eu(Re.current),t){case 1:t=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:t=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":t=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":t=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":t=h.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof u.is=="string"?h.createElement("select",{is:u.is}):h.createElement("select"),u.multiple?t.multiple=!0:u.size&&(t.size=u.size);break;default:t=typeof u.is=="string"?h.createElement(o,{is:u.is}):h.createElement(o)}}t[qt]=r,t[Ea]=u;e:for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)t.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break e;for(;h.sibling===null;){if(h.return===null||h.return===r)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}r.stateNode=t;e:switch(Xa(t,o,u),o){case"button":case"input":case"select":case"textarea":t=!!u.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&Jr(r)}}return pa(r),r.flags&=-16777217,null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==u&&Jr(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(i(166));if(t=Re.current,Fo(r)){if(t=r.stateNode,o=r.memoizedProps,u=null,h=mn,h!==null)switch(h.tag){case 27:case 5:u=h.memoizedProps}t[qt]=r,t=!!(t.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||x0(t.nodeValue,o)),t||os(r)}else t=eu(t).createTextNode(u),t[qt]=r,r.stateNode=t}return pa(r),null;case 13:if(u=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Fo(r),u!==null&&u.dehydrated!==null){if(t===null){if(!h)throw Error(i(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[qt]=r}else Oo(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;pa(r),h=!1}else h=dA(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Wr(r),r):(Wr(r),null)}if(Wr(r),(r.flags&128)!==0)return r.lanes=o,r;if(o=u!==null,t=t!==null&&t.memoizedState!==null,o){u=r.child,h=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(h=u.alternate.memoizedState.cachePool.pool);var y=null;u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==h&&(u.flags|=2048)}return o!==t&&o&&(r.child.flags|=8192),Hc(r,r.updateQueue),pa(r),null;case 4:return ze(),t===null&&ug(r.stateNode.containerInfo),pa(r),null;case 10:return Kr(r.type),pa(r),null;case 19:if(ee(Fa),h=r.memoizedState,h===null)return pa(r),null;if(u=(r.flags&128)!==0,y=h.rendering,y===null)if(u)el(h,!1);else{if(Ia!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(y=_c(t),y!==null){for(r.flags|=128,el(h,!1),t=y.updateQueue,r.updateQueue=t,Hc(r,t),r.subtreeFlags=0,t=o,o=r.child;o!==null;)oA(o,t),o=o.sibling;return ne(Fa,Fa.current&1|2),r.child}t=t.sibling}h.tail!==null&&se()>Vc&&(r.flags|=128,u=!0,el(h,!1),r.lanes=4194304)}else{if(!u)if(t=_c(y),t!==null){if(r.flags|=128,u=!0,t=t.updateQueue,r.updateQueue=t,Hc(r,t),el(h,!0),h.tail===null&&h.tailMode==="hidden"&&!y.alternate&&!Qt)return pa(r),null}else 2*se()-h.renderingStartTime>Vc&&o!==536870912&&(r.flags|=128,u=!0,el(h,!1),r.lanes=4194304);h.isBackwards?(y.sibling=r.child,r.child=y):(t=h.last,t!==null?t.sibling=y:r.child=y,h.last=y)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=se(),r.sibling=null,t=Fa.current,ne(Fa,u?t&1|2:t&1),r):(pa(r),null);case 22:case 23:return Wr(r),mm(),u=r.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(o&536870912)!==0&&(r.flags&128)===0&&(pa(r),r.subtreeFlags&6&&(r.flags|=8192)):pa(r),o=r.updateQueue,o!==null&&Hc(r,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==o&&(r.flags|=2048),t!==null&&ee(us),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),Kr(_a),pa(r),null;case 25:return null;case 30:return null}throw Error(i(156,r.tag))}function Sv(t,r){switch($d(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Kr(_a),ze(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return Lt(r),null;case 13:if(Wr(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(i(340));Oo()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return ee(Fa),null;case 4:return ze(),null;case 10:return Kr(r.type),null;case 22:case 23:return Wr(r),mm(),t!==null&&ee(us),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Kr(_a),null;case 25:return null;default:return null}}function Up(t,r){switch($d(r),r.tag){case 3:Kr(_a),ze();break;case 26:case 27:case 5:Lt(r);break;case 4:ze();break;case 13:Wr(r);break;case 19:ee(Fa);break;case 10:Kr(r.type);break;case 22:case 23:Wr(r),mm(),t!==null&&ee(us);break;case 24:Kr(_a)}}function tl(t,r){try{var o=r.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var h=u.next;o=h;do{if((o.tag&t)===t){u=void 0;var y=o.create,L=o.inst;u=y(),L.destroy=u}o=o.next}while(o!==h)}}catch(F){na(r,r.return,F)}}function xi(t,r,o){try{var u=r.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var y=h.next;u=y;do{if((u.tag&t)===t){var L=u.inst,F=L.destroy;if(F!==void 0){L.destroy=void 0,h=r;var W=o,ge=F;try{ge()}catch(ve){na(h,W,ve)}}}u=u.next}while(u!==y)}}catch(ve){na(r,r.return,ve)}}function Mp(t){var r=t.updateQueue;if(r!==null){var o=t.stateNode;try{vA(r,o)}catch(u){na(t,t.return,u)}}}function _p(t,r,o){o.props=ms(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(u){na(t,r,u)}}function al(t,r){try{var o=t.ref;if(o!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof o=="function"?t.refCleanup=o(u):o.current=u}}catch(h){na(t,r,h)}}function Er(t,r){var o=t.ref,u=t.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(h){na(t,r,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(h){na(t,r,h)}else o.current=null}function Fp(t){var r=t.type,o=t.memoizedProps,u=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(h){na(t,t.return,h)}}function Pm(t,r,o){try{var u=t.stateNode;Wv(u,t.type,o,r),u[Ea]=r}catch(h){na(t,t.return,h)}}function Op(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ui(t.type)||t.tag===4}function Hm(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Op(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ui(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function zm(t,r,o){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(t,r):(r=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,r.appendChild(t),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=Zc));else if(u!==4&&(u===27&&Ui(t.type)&&(o=t.stateNode,r=null),t=t.child,t!==null))for(zm(t,r,o),t=t.sibling;t!==null;)zm(t,r,o),t=t.sibling}function zc(t,r,o){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?o.insertBefore(t,r):o.appendChild(t);else if(u!==4&&(u===27&&Ui(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(zc(t,r,o),t=t.sibling;t!==null;)zc(t,r,o),t=t.sibling}function jp(t){var r=t.stateNode,o=t.memoizedProps;try{for(var u=t.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);Xa(r,u,o),r[qt]=t,r[Ea]=o}catch(y){na(t,t.return,y)}}var Xr=!1,Sa=!1,Qm=!1,Pp=typeof WeakSet=="function"?WeakSet:Set,Ga=null;function Tv(t,r){if(t=t.containerInfo,gg=su,t=Xh(t),Hd(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var h=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var L=0,F=-1,W=-1,ge=0,ve=0,ke=t,fe=null;t:for(;;){for(var pe;ke!==o||h!==0&&ke.nodeType!==3||(F=L+h),ke!==y||u!==0&&ke.nodeType!==3||(W=L+u),ke.nodeType===3&&(L+=ke.nodeValue.length),(pe=ke.firstChild)!==null;)fe=ke,ke=pe;for(;;){if(ke===t)break t;if(fe===o&&++ge===h&&(F=L),fe===y&&++ve===u&&(W=L),(pe=ke.nextSibling)!==null)break;ke=fe,fe=ke.parentNode}ke=pe}o=F===-1||W===-1?null:{start:F,end:W}}else o=null}o=o||{start:0,end:0}}else o=null;for(fg={focusedElem:t,selectionRange:o},su=!1,Ga=r;Ga!==null;)if(r=Ga,t=r.child,(r.subtreeFlags&1024)!==0&&t!==null)t.return=r,Ga=t;else for(;Ga!==null;){switch(r=Ga,y=r.alternate,t=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&y!==null){t=void 0,o=r,h=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var mt=ms(o.type,h,o.elementType===o.type);t=u.getSnapshotBeforeUpdate(mt,y),u.__reactInternalSnapshotBeforeUpdate=t}catch(st){na(o,o.return,st)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,o=t.nodeType,o===9)pg(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":pg(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(i(163))}if(t=r.sibling,t!==null){t.return=r.return,Ga=t;break}Ga=r.return}}function Hp(t,r,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:Si(t,o),u&4&&tl(5,o);break;case 1:if(Si(t,o),u&4)if(t=o.stateNode,r===null)try{t.componentDidMount()}catch(L){na(o,o.return,L)}else{var h=ms(o.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(h,r,t.__reactInternalSnapshotBeforeUpdate)}catch(L){na(o,o.return,L)}}u&64&&Mp(o),u&512&&al(o,o.return);break;case 3:if(Si(t,o),u&64&&(t=o.updateQueue,t!==null)){if(r=null,o.child!==null)switch(o.child.tag){case 27:case 5:r=o.child.stateNode;break;case 1:r=o.child.stateNode}try{vA(t,r)}catch(L){na(o,o.return,L)}}break;case 27:r===null&&u&4&&jp(o);case 26:case 5:Si(t,o),r===null&&u&4&&Fp(o),u&512&&al(o,o.return);break;case 12:Si(t,o);break;case 13:Si(t,o),u&4&&Vp(t,o),u&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=Fv.bind(null,o),tN(t,o))));break;case 22:if(u=o.memoizedState!==null||Xr,!u){r=r!==null&&r.memoizedState!==null||Sa,h=Xr;var y=Sa;Xr=u,(Sa=r)&&!y?Ti(t,o,(o.subtreeFlags&8772)!==0):Si(t,o),Xr=h,Sa=y}break;case 30:break;default:Si(t,o)}}function zp(t){var r=t.alternate;r!==null&&(t.alternate=null,zp(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Me(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ga=null,vn=!1;function $r(t,r,o){for(o=o.child;o!==null;)Qp(t,r,o),o=o.sibling}function Qp(t,r,o){if(B&&typeof B.onCommitFiberUnmount=="function")try{B.onCommitFiberUnmount(ia,o)}catch{}switch(o.tag){case 26:Sa||Er(o,r),$r(t,r,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Sa||Er(o,r);var u=ga,h=vn;Ui(o.type)&&(ga=o.stateNode,vn=!1),$r(t,r,o),dl(o.stateNode),ga=u,vn=h;break;case 5:Sa||Er(o,r);case 6:if(u=ga,h=vn,ga=null,$r(t,r,o),ga=u,vn=h,ga!==null)if(vn)try{(ga.nodeType===9?ga.body:ga.nodeName==="HTML"?ga.ownerDocument.body:ga).removeChild(o.stateNode)}catch(y){na(o,r,y)}else try{ga.removeChild(o.stateNode)}catch(y){na(o,r,y)}break;case 18:ga!==null&&(vn?(t=ga,R0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),El(t)):R0(ga,o.stateNode));break;case 4:u=ga,h=vn,ga=o.stateNode.containerInfo,vn=!0,$r(t,r,o),ga=u,vn=h;break;case 0:case 11:case 14:case 15:Sa||xi(2,o,r),Sa||xi(4,o,r),$r(t,r,o);break;case 1:Sa||(Er(o,r),u=o.stateNode,typeof u.componentWillUnmount=="function"&&_p(o,r,u)),$r(t,r,o);break;case 21:$r(t,r,o);break;case 22:Sa=(u=Sa)||o.memoizedState!==null,$r(t,r,o),Sa=u;break;default:$r(t,r,o)}}function Vp(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{El(t)}catch(o){na(r,r.return,o)}}function kv(t){switch(t.tag){case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Pp),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Pp),r;default:throw Error(i(435,t.tag))}}function Vm(t,r){var o=kv(t);r.forEach(function(u){var h=Ov.bind(null,t,u);o.has(u)||(o.add(u),u.then(h,h))})}function Dn(t,r){var o=r.deletions;if(o!==null)for(var u=0;u<o.length;u++){var h=o[u],y=t,L=r,F=L;e:for(;F!==null;){switch(F.tag){case 27:if(Ui(F.type)){ga=F.stateNode,vn=!1;break e}break;case 5:ga=F.stateNode,vn=!1;break e;case 3:case 4:ga=F.stateNode.containerInfo,vn=!0;break e}F=F.return}if(ga===null)throw Error(i(160));Qp(y,L,h),ga=null,vn=!1,y=h.alternate,y!==null&&(y.return=null),h.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)Gp(r,t),r=r.sibling}var or=null;function Gp(t,r){var o=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Dn(r,t),Bn(t),u&4&&(xi(3,t,t.return),tl(3,t),xi(5,t,t.return));break;case 1:Dn(r,t),Bn(t),u&512&&(Sa||o===null||Er(o,o.return)),u&64&&Xr&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(o=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var h=or;if(Dn(r,t),Bn(t),u&512&&(Sa||o===null||Er(o,o.return)),u&4){var y=o!==null?o.memoizedState:null;if(u=t.memoizedState,o===null)if(u===null)if(t.stateNode===null){e:{u=t.type,o=t.memoizedProps,h=h.ownerDocument||h;t:switch(u){case"title":y=h.getElementsByTagName("title")[0],(!y||y[_e]||y[qt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=h.createElement(u),h.head.insertBefore(y,h.querySelector("head > title"))),Xa(y,u,o),y[qt]=t,it(y),u=y;break e;case"link":var L=j0("link","href",h).get(u+(o.href||""));if(L){for(var F=0;F<L.length;F++)if(y=L[F],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){L.splice(F,1);break t}}y=h.createElement(u),Xa(y,u,o),h.head.appendChild(y);break;case"meta":if(L=j0("meta","content",h).get(u+(o.content||""))){for(F=0;F<L.length;F++)if(y=L[F],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){L.splice(F,1);break t}}y=h.createElement(u),Xa(y,u,o),h.head.appendChild(y);break;default:throw Error(i(468,u))}y[qt]=t,it(y),u=y}t.stateNode=u}else P0(h,t.type,t.stateNode);else t.stateNode=O0(h,u,t.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?P0(h,t.type,t.stateNode):O0(h,u,t.memoizedProps)):u===null&&t.stateNode!==null&&Pm(t,t.memoizedProps,o.memoizedProps)}break;case 27:Dn(r,t),Bn(t),u&512&&(Sa||o===null||Er(o,o.return)),o!==null&&u&4&&Pm(t,t.memoizedProps,o.memoizedProps);break;case 5:if(Dn(r,t),Bn(t),u&512&&(Sa||o===null||Er(o,o.return)),t.flags&32){h=t.stateNode;try{Ar(h,"")}catch(pe){na(t,t.return,pe)}}u&4&&t.stateNode!=null&&(h=t.memoizedProps,Pm(t,h,o!==null?o.memoizedProps:h)),u&1024&&(Qm=!0);break;case 6:if(Dn(r,t),Bn(t),u&4){if(t.stateNode===null)throw Error(i(162));u=t.memoizedProps,o=t.stateNode;try{o.nodeValue=u}catch(pe){na(t,t.return,pe)}}break;case 3:if(nu=null,h=or,or=tu(r.containerInfo),Dn(r,t),or=h,Bn(t),u&4&&o!==null&&o.memoizedState.isDehydrated)try{El(r.containerInfo)}catch(pe){na(t,t.return,pe)}Qm&&(Qm=!1,Kp(t));break;case 4:u=or,or=tu(t.stateNode.containerInfo),Dn(r,t),Bn(t),or=u;break;case 12:Dn(r,t),Bn(t);break;case 13:Dn(r,t),Bn(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Jm=se()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Vm(t,u)));break;case 22:h=t.memoizedState!==null;var W=o!==null&&o.memoizedState!==null,ge=Xr,ve=Sa;if(Xr=ge||h,Sa=ve||W,Dn(r,t),Sa=ve,Xr=ge,Bn(t),u&8192)e:for(r=t.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(o===null||W||Xr||Sa||gs(t)),o=null,r=t;;){if(r.tag===5||r.tag===26){if(o===null){W=o=r;try{if(y=W.stateNode,h)L=y.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{F=W.stateNode;var ke=W.memoizedProps.style,fe=ke!=null&&ke.hasOwnProperty("display")?ke.display:null;F.style.display=fe==null||typeof fe=="boolean"?"":(""+fe).trim()}}catch(pe){na(W,W.return,pe)}}}else if(r.tag===6){if(o===null){W=r;try{W.stateNode.nodeValue=h?"":W.memoizedProps}catch(pe){na(W,W.return,pe)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;o===r&&(o=null),r=r.return}o===r&&(o=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=t.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Vm(t,o))));break;case 19:Dn(r,t),Bn(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Vm(t,u)));break;case 30:break;case 21:break;default:Dn(r,t),Bn(t)}}function Bn(t){var r=t.flags;if(r&2){try{for(var o,u=t.return;u!==null;){if(Op(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var h=o.stateNode,y=Hm(t);zc(t,y,h);break;case 5:var L=o.stateNode;o.flags&32&&(Ar(L,""),o.flags&=-33);var F=Hm(t);zc(t,F,L);break;case 3:case 4:var W=o.stateNode.containerInfo,ge=Hm(t);zm(t,ge,W);break;default:throw Error(i(161))}}catch(ve){na(t,t.return,ve)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function Kp(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;Kp(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function Si(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Hp(t,r.alternate,r),r=r.sibling}function gs(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:xi(4,r,r.return),gs(r);break;case 1:Er(r,r.return);var o=r.stateNode;typeof o.componentWillUnmount=="function"&&_p(r,r.return,o),gs(r);break;case 27:dl(r.stateNode);case 26:case 5:Er(r,r.return),gs(r);break;case 22:r.memoizedState===null&&gs(r);break;case 30:gs(r);break;default:gs(r)}t=t.sibling}}function Ti(t,r,o){for(o=o&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,h=t,y=r,L=y.flags;switch(y.tag){case 0:case 11:case 15:Ti(h,y,o),tl(4,y);break;case 1:if(Ti(h,y,o),u=y,h=u.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(ge){na(u,u.return,ge)}if(u=y,h=u.updateQueue,h!==null){var F=u.stateNode;try{var W=h.shared.hiddenCallbacks;if(W!==null)for(h.shared.hiddenCallbacks=null,h=0;h<W.length;h++)IA(W[h],F)}catch(ge){na(u,u.return,ge)}}o&&L&64&&Mp(y),al(y,y.return);break;case 27:jp(y);case 26:case 5:Ti(h,y,o),o&&u===null&&L&4&&Fp(y),al(y,y.return);break;case 12:Ti(h,y,o);break;case 13:Ti(h,y,o),o&&L&4&&Vp(h,y);break;case 22:y.memoizedState===null&&Ti(h,y,o),al(y,y.return);break;case 30:break;default:Ti(h,y,o)}r=r.sibling}}function Gm(t,r){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&Ho(o))}function Km(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Ho(t))}function br(t,r,o,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)qp(t,r,o,u),r=r.sibling}function qp(t,r,o,u){var h=r.flags;switch(r.tag){case 0:case 11:case 15:br(t,r,o,u),h&2048&&tl(9,r);break;case 1:br(t,r,o,u);break;case 3:br(t,r,o,u),h&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Ho(t)));break;case 12:if(h&2048){br(t,r,o,u),t=r.stateNode;try{var y=r.memoizedProps,L=y.id,F=y.onPostCommit;typeof F=="function"&&F(L,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(W){na(r,r.return,W)}}else br(t,r,o,u);break;case 13:br(t,r,o,u);break;case 23:break;case 22:y=r.stateNode,L=r.alternate,r.memoizedState!==null?y._visibility&2?br(t,r,o,u):nl(t,r):y._visibility&2?br(t,r,o,u):(y._visibility|=2,Ws(t,r,o,u,(r.subtreeFlags&10256)!==0)),h&2048&&Gm(L,r);break;case 24:br(t,r,o,u),h&2048&&Km(r.alternate,r);break;default:br(t,r,o,u)}}function Ws(t,r,o,u,h){for(h=h&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var y=t,L=r,F=o,W=u,ge=L.flags;switch(L.tag){case 0:case 11:case 15:Ws(y,L,F,W,h),tl(8,L);break;case 23:break;case 22:var ve=L.stateNode;L.memoizedState!==null?ve._visibility&2?Ws(y,L,F,W,h):nl(y,L):(ve._visibility|=2,Ws(y,L,F,W,h)),h&&ge&2048&&Gm(L.alternate,L);break;case 24:Ws(y,L,F,W,h),h&&ge&2048&&Km(L.alternate,L);break;default:Ws(y,L,F,W,h)}r=r.sibling}}function nl(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var o=t,u=r,h=u.flags;switch(u.tag){case 22:nl(o,u),h&2048&&Gm(u.alternate,u);break;case 24:nl(o,u),h&2048&&Km(u.alternate,u);break;default:nl(o,u)}r=r.sibling}}var rl=8192;function Ys(t){if(t.subtreeFlags&rl)for(t=t.child;t!==null;)Wp(t),t=t.sibling}function Wp(t){switch(t.tag){case 26:Ys(t),t.flags&rl&&t.memoizedState!==null&&fN(or,t.memoizedState,t.memoizedProps);break;case 5:Ys(t);break;case 3:case 4:var r=or;or=tu(t.stateNode.containerInfo),Ys(t),or=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=rl,rl=16777216,Ys(t),rl=r):Ys(t));break;default:Ys(t)}}function Yp(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function il(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var o=0;o<r.length;o++){var u=r[o];Ga=u,Xp(u,t)}Yp(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Jp(t),t=t.sibling}function Jp(t){switch(t.tag){case 0:case 11:case 15:il(t),t.flags&2048&&xi(9,t,t.return);break;case 3:il(t);break;case 12:il(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Qc(t)):il(t);break;default:il(t)}}function Qc(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var o=0;o<r.length;o++){var u=r[o];Ga=u,Xp(u,t)}Yp(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:xi(8,r,r.return),Qc(r);break;case 22:o=r.stateNode,o._visibility&2&&(o._visibility&=-3,Qc(r));break;default:Qc(r)}t=t.sibling}}function Xp(t,r){for(;Ga!==null;){var o=Ga;switch(o.tag){case 0:case 11:case 15:xi(8,o,r);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Ho(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,Ga=u;else e:for(o=t;Ga!==null;){u=Ga;var h=u.sibling,y=u.return;if(zp(u),u===o){Ga=null;break e}if(h!==null){h.return=y,Ga=h;break e}Ga=y}}}var Lv={getCacheForType:function(t){var r=sn(_a),o=r.data.get(t);return o===void 0&&(o=t(),r.data.set(t,o)),o}},Rv=typeof WeakMap=="function"?WeakMap:Map,Wt=0,oa=null,Rt=null,Ot=0,Yt=0,Un=null,ki=!1,Js=!1,qm=!1,Zr=0,Ia=0,Li=0,fs=0,Wm=0,Jn=0,Xs=0,sl=null,Nn=null,Ym=!1,Jm=0,Vc=1/0,Gc=null,Ri=null,Ja=0,Di=null,$s=null,Zs=0,Xm=0,$m=null,$p=null,ol=0,Zm=null;function Mn(){if((Wt&2)!==0&&Ot!==0)return Ot&-Ot;if(X.T!==null){var t=Ps;return t!==0?t:sg()}return nr()}function Zp(){Jn===0&&(Jn=(Ot&536870912)===0||Qt?fr():536870912);var t=Yn.current;return t!==null&&(t.flags|=32),Jn}function _n(t,r,o){(t===oa&&(Yt===2||Yt===9)||t.cancelPendingCommit!==null)&&(eo(t,0),Bi(t,Ot,Jn,!1)),Pn(t,o),((Wt&2)===0||t!==oa)&&(t===oa&&((Wt&2)===0&&(fs|=o),Ia===4&&Bi(t,Ot,Jn,!1)),Ir(t))}function e0(t,r,o){if((Wt&6)!==0)throw Error(i(327));var u=!o&&(r&124)===0&&(r&t.expiredLanes)===0||wt(t,r),h=u?Uv(t,r):ag(t,r,!0),y=u;do{if(h===0){Js&&!u&&Bi(t,r,0,!1);break}else{if(o=t.current.alternate,y&&!Dv(o)){h=ag(t,r,!1),y=!1;continue}if(h===2){if(y=r,t.errorRecoveryDisabledLanes&y)var L=0;else L=t.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){r=L;e:{var F=t;h=sl;var W=F.current.memoizedState.isDehydrated;if(W&&(eo(F,L).flags|=256),L=ag(F,L,!1),L!==2){if(qm&&!W){F.errorRecoveryDisabledLanes|=y,fs|=y,h=4;break e}y=Nn,Nn=h,y!==null&&(Nn===null?Nn=y:Nn.push.apply(Nn,y))}h=L}if(y=!1,h!==2)continue}}if(h===1){eo(t,0),Bi(t,r,0,!0);break}e:{switch(u=t,y=h,y){case 0:case 1:throw Error(i(345));case 4:if((r&4194048)!==r)break;case 6:Bi(u,r,Jn,!ki);break e;case 2:Nn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((r&62914560)===r&&(h=Jm+300-se(),10<h)){if(Bi(u,r,Jn,!ki),pt(u,0,!0)!==0)break e;u.timeoutHandle=k0(t0.bind(null,u,o,Nn,Gc,Ym,r,Jn,fs,Xs,ki,y,2,-0,0),h);break e}t0(u,o,Nn,Gc,Ym,r,Jn,fs,Xs,ki,y,0,-0,0)}}break}while(!0);Ir(t)}function t0(t,r,o,u,h,y,L,F,W,ge,ve,ke,fe,pe){if(t.timeoutHandle=-1,ke=r.subtreeFlags,(ke&8192||(ke&16785408)===16785408)&&(fl={stylesheets:null,count:0,unsuspend:gN},Wp(r),ke=hN(),ke!==null)){t.cancelPendingCommit=ke(l0.bind(null,t,r,y,o,u,h,L,F,W,ve,1,fe,pe)),Bi(t,y,L,!ge);return}l0(t,r,y,o,u,h,L,F,W)}function Dv(t){for(var r=t;;){var o=r.tag;if((o===0||o===11||o===15)&&r.flags&16384&&(o=r.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var h=o[u],y=h.getSnapshot;h=h.value;try{if(!Ln(y(),h))return!1}catch{return!1}}if(o=r.child,r.subtreeFlags&16384&&o!==null)o.return=r,r=o;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Bi(t,r,o,u){r&=~Wm,r&=~fs,t.suspendedLanes|=r,t.pingedLanes&=~r,u&&(t.warmLanes|=r),u=t.expirationTimes;for(var h=r;0<h;){var y=31-w(h),L=1<<y;u[y]=-1,h&=~L}o!==0&&Oe(t,o,r)}function Kc(){return(Wt&6)===0?(ll(0),!1):!0}function eg(){if(Rt!==null){if(Yt===0)var t=Rt.return;else t=Rt,Gr=ls=null,pm(t),Ks=null,$o=0,t=Rt;for(;t!==null;)Up(t.alternate,t),t=t.return;Rt=null}}function eo(t,r){var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,Jv(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),eg(),oa=t,Rt=o=zr(t.current,null),Ot=r,Yt=0,Un=null,ki=!1,Js=wt(t,r),qm=!1,Xs=Jn=Wm=fs=Li=Ia=0,Nn=sl=null,Ym=!1,(r&8)!==0&&(r|=r&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=r;0<u;){var h=31-w(u),y=1<<h;r|=t[h],u&=~y}return Zr=r,fc(),o}function a0(t,r){Ct=null,X.H=Bc,r===Qo||r===Nc?(r=EA(),Yt=3):r===AA?(r=EA(),Yt=4):Yt=r===bp?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Un=r,Rt===null&&(Ia=1,Oc(t,Gn(r,t.current)))}function n0(){var t=X.H;return X.H=Bc,t===null?Bc:t}function r0(){var t=X.A;return X.A=Lv,t}function tg(){Ia=4,ki||(Ot&4194048)!==Ot&&Yn.current!==null||(Js=!0),(Li&134217727)===0&&(fs&134217727)===0||oa===null||Bi(oa,Ot,Jn,!1)}function ag(t,r,o){var u=Wt;Wt|=2;var h=n0(),y=r0();(oa!==t||Ot!==r)&&(Gc=null,eo(t,r)),r=!1;var L=Ia;e:do try{if(Yt!==0&&Rt!==null){var F=Rt,W=Un;switch(Yt){case 8:eg(),L=6;break e;case 3:case 2:case 9:case 6:Yn.current===null&&(r=!0);var ge=Yt;if(Yt=0,Un=null,to(t,F,W,ge),o&&Js){L=0;break e}break;default:ge=Yt,Yt=0,Un=null,to(t,F,W,ge)}}Bv(),L=Ia;break}catch(ve){a0(t,ve)}while(!0);return r&&t.shellSuspendCounter++,Gr=ls=null,Wt=u,X.H=h,X.A=y,Rt===null&&(oa=null,Ot=0,fc()),L}function Bv(){for(;Rt!==null;)i0(Rt)}function Uv(t,r){var o=Wt;Wt|=2;var u=n0(),h=r0();oa!==t||Ot!==r?(Gc=null,Vc=se()+500,eo(t,r)):Js=wt(t,r);e:do try{if(Yt!==0&&Rt!==null){r=Rt;var y=Un;t:switch(Yt){case 1:Yt=0,Un=null,to(t,r,y,1);break;case 2:case 9:if(pA(y)){Yt=0,Un=null,s0(r);break}r=function(){Yt!==2&&Yt!==9||oa!==t||(Yt=7),Ir(t)},y.then(r,r);break e;case 3:Yt=7;break e;case 4:Yt=5;break e;case 7:pA(y)?(Yt=0,Un=null,s0(r)):(Yt=0,Un=null,to(t,r,y,7));break;case 5:var L=null;switch(Rt.tag){case 26:L=Rt.memoizedState;case 5:case 27:var F=Rt;if(!L||H0(L)){Yt=0,Un=null;var W=F.sibling;if(W!==null)Rt=W;else{var ge=F.return;ge!==null?(Rt=ge,qc(ge)):Rt=null}break t}}Yt=0,Un=null,to(t,r,y,5);break;case 6:Yt=0,Un=null,to(t,r,y,6);break;case 8:eg(),Ia=6;break e;default:throw Error(i(462))}}Mv();break}catch(ve){a0(t,ve)}while(!0);return Gr=ls=null,X.H=u,X.A=h,Wt=o,Rt!==null?0:(oa=null,Ot=0,fc(),Ia)}function Mv(){for(;Rt!==null&&!Pt();)i0(Rt)}function i0(t){var r=Dp(t.alternate,t,Zr);t.memoizedProps=t.pendingProps,r===null?qc(t):Rt=r}function s0(t){var r=t,o=r.alternate;switch(r.tag){case 15:case 0:r=xp(o,r,r.pendingProps,r.type,void 0,Ot);break;case 11:r=xp(o,r,r.pendingProps,r.type.render,r.ref,Ot);break;case 5:pm(r);default:Up(o,r),r=Rt=oA(r,Zr),r=Dp(o,r,Zr)}t.memoizedProps=t.pendingProps,r===null?qc(t):Rt=r}function to(t,r,o,u){Gr=ls=null,pm(r),Ks=null,$o=0;var h=r.return;try{if(Cv(t,h,r,o,Ot)){Ia=1,Oc(t,Gn(o,t.current)),Rt=null;return}}catch(y){if(h!==null)throw Rt=h,y;Ia=1,Oc(t,Gn(o,t.current)),Rt=null;return}r.flags&32768?(Qt||u===1?t=!0:Js||(Ot&536870912)!==0?t=!1:(ki=t=!0,(u===2||u===9||u===3||u===6)&&(u=Yn.current,u!==null&&u.tag===13&&(u.flags|=16384))),o0(r,t)):qc(r)}function qc(t){var r=t;do{if((r.flags&32768)!==0){o0(r,ki);return}t=r.return;var o=xv(r.alternate,r,Zr);if(o!==null){Rt=o;return}if(r=r.sibling,r!==null){Rt=r;return}Rt=r=t}while(r!==null);Ia===0&&(Ia=5)}function o0(t,r){do{var o=Sv(t.alternate,t);if(o!==null){o.flags&=32767,Rt=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!r&&(t=t.sibling,t!==null)){Rt=t;return}Rt=t=o}while(t!==null);Ia=6,Rt=null}function l0(t,r,o,u,h,y,L,F,W){t.cancelPendingCommit=null;do Wc();while(Ja!==0);if((Wt&6)!==0)throw Error(i(327));if(r!==null){if(r===t.current)throw Error(i(177));if(y=r.lanes|r.childLanes,y|=Kd,Hn(t,o,y,L,F,W),t===oa&&(Rt=oa=null,Ot=0),$s=r,Di=t,Zs=o,Xm=y,$m=h,$p=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,jv(Ye,function(){return g0(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=X.T,X.T=null,h=ie.p,ie.p=2,L=Wt,Wt|=4;try{Tv(t,r,o)}finally{Wt=L,ie.p=h,X.T=u}}Ja=1,c0(),u0(),d0()}}function c0(){if(Ja===1){Ja=0;var t=Di,r=$s,o=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||o){o=X.T,X.T=null;var u=ie.p;ie.p=2;var h=Wt;Wt|=4;try{Gp(r,t);var y=fg,L=Xh(t.containerInfo),F=y.focusedElem,W=y.selectionRange;if(L!==F&&F&&F.ownerDocument&&Jh(F.ownerDocument.documentElement,F)){if(W!==null&&Hd(F)){var ge=W.start,ve=W.end;if(ve===void 0&&(ve=ge),"selectionStart"in F)F.selectionStart=ge,F.selectionEnd=Math.min(ve,F.value.length);else{var ke=F.ownerDocument||document,fe=ke&&ke.defaultView||window;if(fe.getSelection){var pe=fe.getSelection(),mt=F.textContent.length,st=Math.min(W.start,mt),ea=W.end===void 0?st:Math.min(W.end,mt);!pe.extend&&st>ea&&(L=ea,ea=st,st=L);var oe=Yh(F,st),te=Yh(F,ea);if(oe&&te&&(pe.rangeCount!==1||pe.anchorNode!==oe.node||pe.anchorOffset!==oe.offset||pe.focusNode!==te.node||pe.focusOffset!==te.offset)){var me=ke.createRange();me.setStart(oe.node,oe.offset),pe.removeAllRanges(),st>ea?(pe.addRange(me),pe.extend(te.node,te.offset)):(me.setEnd(te.node,te.offset),pe.addRange(me))}}}}for(ke=[],pe=F;pe=pe.parentNode;)pe.nodeType===1&&ke.push({element:pe,left:pe.scrollLeft,top:pe.scrollTop});for(typeof F.focus=="function"&&F.focus(),F=0;F<ke.length;F++){var Ce=ke[F];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}su=!!gg,fg=gg=null}finally{Wt=h,ie.p=u,X.T=o}}t.current=r,Ja=2}}function u0(){if(Ja===2){Ja=0;var t=Di,r=$s,o=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||o){o=X.T,X.T=null;var u=ie.p;ie.p=2;var h=Wt;Wt|=4;try{Hp(t,r.alternate,r)}finally{Wt=h,ie.p=u,X.T=o}}Ja=3}}function d0(){if(Ja===4||Ja===3){Ja=0,Ne();var t=Di,r=$s,o=Zs,u=$p;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Ja=5:(Ja=0,$s=Di=null,m0(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(Ri=null),la(o),r=r.stateNode,B&&typeof B.onCommitFiberRoot=="function")try{B.onCommitFiberRoot(ia,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=X.T,h=ie.p,ie.p=2,X.T=null;try{for(var y=t.onRecoverableError,L=0;L<u.length;L++){var F=u[L];y(F.value,{componentStack:F.stack})}}finally{X.T=r,ie.p=h}}(Zs&3)!==0&&Wc(),Ir(t),h=t.pendingLanes,(o&4194090)!==0&&(h&42)!==0?t===Zm?ol++:(ol=0,Zm=t):ol=0,ll(0)}}function m0(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,Ho(r)))}function Wc(t){return c0(),u0(),d0(),g0()}function g0(){if(Ja!==5)return!1;var t=Di,r=Xm;Xm=0;var o=la(Zs),u=X.T,h=ie.p;try{ie.p=32>o?32:o,X.T=null,o=$m,$m=null;var y=Di,L=Zs;if(Ja=0,$s=Di=null,Zs=0,(Wt&6)!==0)throw Error(i(331));var F=Wt;if(Wt|=4,Jp(y.current),qp(y,y.current,L,o),Wt=F,ll(0,!1),B&&typeof B.onPostCommitFiberRoot=="function")try{B.onPostCommitFiberRoot(ia,y)}catch{}return!0}finally{ie.p=h,X.T=u,m0(t,r)}}function f0(t,r,o){r=Gn(o,r),r=Rm(t.stateNode,r,2),t=vi(t,r,2),t!==null&&(Pn(t,2),Ir(t))}function na(t,r,o){if(t.tag===3)f0(t,t,o);else for(;r!==null;){if(r.tag===3){f0(r,t,o);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ri===null||!Ri.has(u))){t=Gn(o,t),o=yp(2),u=vi(r,o,2),u!==null&&(Ep(o,u,r,t),Pn(u,2),Ir(u));break}}r=r.return}}function ng(t,r,o){var u=t.pingCache;if(u===null){u=t.pingCache=new Rv;var h=new Set;u.set(r,h)}else h=u.get(r),h===void 0&&(h=new Set,u.set(r,h));h.has(o)||(qm=!0,h.add(o),t=_v.bind(null,t,r,o),r.then(t,t))}function _v(t,r,o){var u=t.pingCache;u!==null&&u.delete(r),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,oa===t&&(Ot&o)===o&&(Ia===4||Ia===3&&(Ot&62914560)===Ot&&300>se()-Jm?(Wt&2)===0&&eo(t,0):Wm|=o,Xs===Ot&&(Xs=0)),Ir(t)}function h0(t,r){r===0&&(r=sa()),t=_s(t,r),t!==null&&(Pn(t,r),Ir(t))}function Fv(t){var r=t.memoizedState,o=0;r!==null&&(o=r.retryLane),h0(t,o)}function Ov(t,r){var o=0;switch(t.tag){case 13:var u=t.stateNode,h=t.memoizedState;h!==null&&(o=h.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(r),h0(t,o)}function jv(t,r){return et(t,r)}var Yc=null,ao=null,rg=!1,Jc=!1,ig=!1,hs=0;function Ir(t){t!==ao&&t.next===null&&(ao===null?Yc=ao=t:ao=ao.next=t),Jc=!0,rg||(rg=!0,Hv())}function ll(t,r){if(!ig&&Jc){ig=!0;do for(var o=!1,u=Yc;u!==null;){if(t!==0){var h=u.pendingLanes;if(h===0)var y=0;else{var L=u.suspendedLanes,F=u.pingedLanes;y=(1<<31-w(42|t)+1)-1,y&=h&~(L&~F),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,E0(u,y))}else y=Ot,y=pt(u,u===oa?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||wt(u,y)||(o=!0,E0(u,y));u=u.next}while(o);ig=!1}}function Pv(){A0()}function A0(){Jc=rg=!1;var t=0;hs!==0&&(Yv()&&(t=hs),hs=0);for(var r=se(),o=null,u=Yc;u!==null;){var h=u.next,y=p0(u,r);y===0?(u.next=null,o===null?Yc=h:o.next=h,h===null&&(ao=o)):(o=u,(t!==0||(y&3)!==0)&&(Jc=!0)),u=h}ll(t)}function p0(t,r){for(var o=t.suspendedLanes,u=t.pingedLanes,h=t.expirationTimes,y=t.pendingLanes&-62914561;0<y;){var L=31-w(y),F=1<<L,W=h[L];W===-1?((F&o)===0||(F&u)!==0)&&(h[L]=dt(F,r)):W<=r&&(t.expiredLanes|=F),y&=~F}if(r=oa,o=Ot,o=pt(t,t===r?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,o===0||t===r&&(Yt===2||Yt===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&nt(u),t.callbackNode=null,t.callbackPriority=0;if((o&3)===0||wt(t,o)){if(r=o&-o,r===t.callbackPriority)return r;switch(u!==null&&nt(u),la(o)){case 2:case 8:o=Qe;break;case 32:o=Ye;break;case 268435456:o=Mt;break;default:o=Ye}return u=y0.bind(null,t),o=et(o,u),t.callbackPriority=r,t.callbackNode=o,r}return u!==null&&u!==null&&nt(u),t.callbackPriority=2,t.callbackNode=null,2}function y0(t,r){if(Ja!==0&&Ja!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(Wc()&&t.callbackNode!==o)return null;var u=Ot;return u=pt(t,t===oa?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(e0(t,u,r),p0(t,se()),t.callbackNode!=null&&t.callbackNode===o?y0.bind(null,t):null)}function E0(t,r){if(Wc())return null;e0(t,r,!0)}function Hv(){Xv(function(){(Wt&6)!==0?et(je,Pv):A0()})}function sg(){return hs===0&&(hs=fr()),hs}function b0(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:yn(""+t)}function I0(t,r){var o=r.ownerDocument.createElement("input");return o.name=r.name,o.value=r.value,t.id&&o.setAttribute("form",t.id),r.parentNode.insertBefore(o,r),t=new FormData(t),o.parentNode.removeChild(o),t}function zv(t,r,o,u,h){if(r==="submit"&&o&&o.stateNode===h){var y=b0((h[Ea]||null).action),L=u.submitter;L&&(r=(r=L[Ea]||null)?b0(r.formAction):L.getAttribute("formAction"),r!==null&&(y=r,L=null));var F=new Et("action","action",null,u,h);t.push({event:F,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(hs!==0){var W=L?I0(h,L):new FormData(h);xm(o,{pending:!0,data:W,method:h.method,action:y},null,W)}}else typeof y=="function"&&(F.preventDefault(),W=L?I0(h,L):new FormData(h),xm(o,{pending:!0,data:W,method:h.method,action:y},y,W))},currentTarget:h}]})}}for(var og=0;og<Gd.length;og++){var lg=Gd[og],Qv=lg.toLowerCase(),Vv=lg[0].toUpperCase()+lg.slice(1);sr(Qv,"on"+Vv)}sr(eA,"onAnimationEnd"),sr(tA,"onAnimationIteration"),sr(aA,"onAnimationStart"),sr("dblclick","onDoubleClick"),sr("focusin","onFocus"),sr("focusout","onBlur"),sr(ov,"onTransitionRun"),sr(lv,"onTransitionStart"),sr(cv,"onTransitionCancel"),sr(nA,"onTransitionEnd"),Te("onMouseEnter",["mouseout","mouseover"]),Te("onMouseLeave",["mouseout","mouseover"]),Te("onPointerEnter",["pointerout","pointerover"]),Te("onPointerLeave",["pointerout","pointerover"]),Z("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Z("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Z("onBeforeInput",["compositionend","keypress","textInput","paste"]),Z("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Z("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Z("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cl="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(" "),Gv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cl));function v0(t,r){r=(r&4)!==0;for(var o=0;o<t.length;o++){var u=t[o],h=u.event;u=u.listeners;e:{var y=void 0;if(r)for(var L=u.length-1;0<=L;L--){var F=u[L],W=F.instance,ge=F.currentTarget;if(F=F.listener,W!==y&&h.isPropagationStopped())break e;y=F,h.currentTarget=ge;try{y(h)}catch(ve){Fc(ve)}h.currentTarget=null,y=W}else for(L=0;L<u.length;L++){if(F=u[L],W=F.instance,ge=F.currentTarget,F=F.listener,W!==y&&h.isPropagationStopped())break e;y=F,h.currentTarget=ge;try{y(h)}catch(ve){Fc(ve)}h.currentTarget=null,y=W}}}}function Dt(t,r){var o=r[Ma];o===void 0&&(o=r[Ma]=new Set);var u=t+"__bubble";o.has(u)||(N0(r,t,2,!1),o.add(u))}function cg(t,r,o){var u=0;r&&(u|=4),N0(o,t,u,r)}var Xc="_reactListening"+Math.random().toString(36).slice(2);function ug(t){if(!t[Xc]){t[Xc]=!0,un.forEach(function(o){o!=="selectionchange"&&(Gv.has(o)||cg(o,!1,t),cg(o,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Xc]||(r[Xc]=!0,cg("selectionchange",!1,r))}}function N0(t,r,o,u){switch(q0(r)){case 2:var h=yN;break;case 8:h=EN;break;default:h=Cg}o=h.bind(null,r,o,t),h=void 0,!Qn||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),u?h!==void 0?t.addEventListener(r,o,{capture:!0,passive:h}):t.addEventListener(r,o,!0):h!==void 0?t.addEventListener(r,o,{passive:h}):t.addEventListener(r,o,!1)}function dg(t,r,o,u,h){var y=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var L=u.tag;if(L===3||L===4){var F=u.stateNode.containerInfo;if(F===h)break;if(L===4)for(L=u.return;L!==null;){var W=L.tag;if((W===3||W===4)&&L.stateNode.containerInfo===h)return;L=L.return}for(;F!==null;){if(L=Xe(F),L===null)return;if(W=L.tag,W===5||W===6||W===26||W===27){u=y=L;continue e}F=F.parentNode}}u=u.return}Lo(function(){var ge=y,ve=Pr(o),ke=[];e:{var fe=rA.get(t);if(fe!==void 0){var pe=Et,mt=t;switch(t){case"keypress":if(O(o)===0)break e;case"keydown":case"keyup":pe=kd;break;case"focusin":mt="focus",pe=Ro;break;case"focusout":mt="blur",pe=Ro;break;case"beforeblur":case"afterblur":pe=Ro;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=oc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=pd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=Rd;break;case eA:case tA:case aA:pe=bd;break;case nA:pe=Bd;break;case"scroll":case"scrollend":pe=ma;break;case"wheel":pe=dc;break;case"copy":case"cut":case"paste":pe=vd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=uc;break;case"toggle":case"beforetoggle":pe=_d}var st=(r&4)!==0,ea=!st&&(t==="scroll"||t==="scrollend"),oe=st?fe!==null?fe+"Capture":null:fe;st=[];for(var te=ge,me;te!==null;){var Ce=te;if(me=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||me===null||oe===null||(Ce=Ai(te,oe),Ce!=null&&st.push(ul(te,Ce,me))),ea)break;te=te.return}0<st.length&&(fe=new pe(fe,mt,null,o,ve),ke.push({event:fe,listeners:st}))}}if((r&7)===0){e:{if(fe=t==="mouseover"||t==="pointerover",pe=t==="mouseout"||t==="pointerout",fe&&o!==zn&&(mt=o.relatedTarget||o.fromElement)&&(Xe(mt)||mt[Jt]))break e;if((pe||fe)&&(fe=ve.window===ve?ve:(fe=ve.ownerDocument)?fe.defaultView||fe.parentWindow:window,pe?(mt=o.relatedTarget||o.toElement,pe=ge,mt=mt?Xe(mt):null,mt!==null&&(ea=c(mt),st=mt.tag,mt!==ea||st!==5&&st!==27&&st!==6)&&(mt=null)):(pe=null,mt=ge),pe!==mt)){if(st=oc,Ce="onMouseLeave",oe="onMouseEnter",te="mouse",(t==="pointerout"||t==="pointerover")&&(st=uc,Ce="onPointerLeave",oe="onPointerEnter",te="pointer"),ea=pe==null?fe:yt(pe),me=mt==null?fe:yt(mt),fe=new st(Ce,te+"leave",pe,o,ve),fe.target=ea,fe.relatedTarget=me,Ce=null,Xe(ve)===ge&&(st=new st(oe,te+"enter",mt,o,ve),st.target=me,st.relatedTarget=ea,Ce=st),ea=Ce,pe&&mt)t:{for(st=pe,oe=mt,te=0,me=st;me;me=no(me))te++;for(me=0,Ce=oe;Ce;Ce=no(Ce))me++;for(;0<te-me;)st=no(st),te--;for(;0<me-te;)oe=no(oe),me--;for(;te--;){if(st===oe||oe!==null&&st===oe.alternate)break t;st=no(st),oe=no(oe)}st=null}else st=null;pe!==null&&C0(ke,fe,pe,st,!1),mt!==null&&ea!==null&&C0(ke,ea,mt,st,!0)}}e:{if(fe=ge?yt(ge):window,pe=fe.nodeName&&fe.nodeName.toLowerCase(),pe==="select"||pe==="input"&&fe.type==="file")var Ke=Qh;else if(rn(fe))if(Vh)Ke=rv;else{Ke=av;var St=tv}else pe=fe.nodeName,!pe||pe.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?ge&&gi(ge.elementType)&&(Ke=Qh):Ke=nv;if(Ke&&(Ke=Ke(t,ge))){bn(ke,Ke,o,ve);break e}St&&St(t,fe,ge),t==="focusout"&&ge&&fe.type==="number"&&ge.memoizedProps.value!=null&&ks(fe,"number",fe.value)}switch(St=ge?yt(ge):window,t){case"focusin":(rn(St)||St.contentEditable==="true")&&(Bs=St,zd=ge,_o=null);break;case"focusout":_o=zd=Bs=null;break;case"mousedown":Qd=!0;break;case"contextmenu":case"mouseup":case"dragend":Qd=!1,$h(ke,o,ve);break;case"selectionchange":if(sv)break;case"keydown":case"keyup":$h(ke,o,ve)}var tt;if(pi)e:{switch(t){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else ot?Ge(t,o)&&(lt="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(lt="onCompositionStart");lt&&(Uo&&o.locale!=="ko"&&(ot||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&ot&&(tt=D()):(Vn=ve,A="value"in Vn?Vn.value:Vn.textContent,ot=!0)),St=$c(ge,lt),0<St.length&&(lt=new Do(lt,t,null,o,ve),ke.push({event:lt,listeners:St}),tt?lt.data=tt:(tt=at(o),tt!==null&&(lt.data=tt)))),(tt=mc?zt(t,o):Tn(t,o))&&(lt=$c(ge,"onBeforeInput"),0<lt.length&&(St=new Do("onBeforeInput","beforeinput",null,o,ve),ke.push({event:St,listeners:lt}),St.data=tt)),zv(ke,t,ge,o,ve)}v0(ke,r)})}function ul(t,r,o){return{instance:t,listener:r,currentTarget:o}}function $c(t,r){for(var o=r+"Capture",u=[];t!==null;){var h=t,y=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||y===null||(h=Ai(t,o),h!=null&&u.unshift(ul(t,h,y)),h=Ai(t,r),h!=null&&u.push(ul(t,h,y))),t.tag===3)return u;t=t.return}return[]}function no(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function C0(t,r,o,u,h){for(var y=r._reactName,L=[];o!==null&&o!==u;){var F=o,W=F.alternate,ge=F.stateNode;if(F=F.tag,W!==null&&W===u)break;F!==5&&F!==26&&F!==27||ge===null||(W=ge,h?(ge=Ai(o,y),ge!=null&&L.unshift(ul(o,ge,W))):h||(ge=Ai(o,y),ge!=null&&L.push(ul(o,ge,W)))),o=o.return}L.length!==0&&t.push({event:r,listeners:L})}var Kv=/\r\n?/g,qv=/\u0000|\uFFFD/g;function w0(t){return(typeof t=="string"?t:""+t).replace(Kv,`
`).replace(qv,"")}function x0(t,r){return r=w0(r),w0(t)===r}function Zc(){}function Zt(t,r,o,u,h,y){switch(o){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Ar(t,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Ar(t,""+u);break;case"className":Wa(t,"class",u);break;case"tabIndex":Wa(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Wa(t,o,u);break;case"style":$i(t,u,y);break;case"data":if(r!=="object"){Wa(t,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||o!=="href")){t.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=yn(""+u),t.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(o,"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 y=="function"&&(o==="formAction"?(r!=="input"&&Zt(t,r,"name",h.name,h,null),Zt(t,r,"formEncType",h.formEncType,h,null),Zt(t,r,"formMethod",h.formMethod,h,null),Zt(t,r,"formTarget",h.formTarget,h,null)):(Zt(t,r,"encType",h.encType,h,null),Zt(t,r,"method",h.method,h,null),Zt(t,r,"target",h.target,h,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=yn(""+u),t.setAttribute(o,u);break;case"onClick":u!=null&&(t.onclick=Zc);break;case"onScroll":u!=null&&Dt("scroll",t);break;case"onScrollEnd":u!=null&&Dt("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(h.children!=null)throw Error(i(60));t.innerHTML=o}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}o=yn(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""+u):t.removeAttribute(o);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":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":u===!0?t.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,u):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(o,u):t.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(o):t.setAttribute(o,u);break;case"popover":Dt("beforetoggle",t),Dt("toggle",t),ua(t,"popover",u);break;case"xlinkActuate":Ca(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Ca(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Ca(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Ca(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Ca(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Ca(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Ca(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Ca(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Ca(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":ua(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=jr.get(o)||o,ua(t,o,u))}}function mg(t,r,o,u,h,y){switch(o){case"style":$i(t,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(h.children!=null)throw Error(i(60));t.innerHTML=o}}break;case"children":typeof u=="string"?Ar(t,u):(typeof u=="number"||typeof u=="bigint")&&Ar(t,""+u);break;case"onScroll":u!=null&&Dt("scroll",t);break;case"onScrollEnd":u!=null&&Dt("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Zc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fe.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(h=o.endsWith("Capture"),r=o.slice(2,h?o.length-7:void 0),y=t[Ea]||null,y=y!=null?y[o]:null,typeof y=="function"&&t.removeEventListener(r,y,h),typeof u=="function")){typeof y!="function"&&y!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(r,u,h);break e}o in t?t[o]=u:u===!0?t.setAttribute(o,""):ua(t,o,u)}}}function Xa(t,r,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Dt("error",t),Dt("load",t);var u=!1,h=!1,y;for(y in o)if(o.hasOwnProperty(y)){var L=o[y];if(L!=null)switch(y){case"src":u=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:Zt(t,r,y,L,o,null)}}h&&Zt(t,r,"srcSet",o.srcSet,o,null),u&&Zt(t,r,"src",o.src,o,null);return;case"input":Dt("invalid",t);var F=y=L=h=null,W=null,ge=null;for(u in o)if(o.hasOwnProperty(u)){var ve=o[u];if(ve!=null)switch(u){case"name":h=ve;break;case"type":L=ve;break;case"checked":W=ve;break;case"defaultChecked":ge=ve;break;case"value":y=ve;break;case"defaultValue":F=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(i(137,r));break;default:Zt(t,r,u,ve,o,null)}}di(t,y,F,W,ge,L,h,!1),Fr(t);return;case"select":Dt("invalid",t),u=L=y=null;for(h in o)if(o.hasOwnProperty(h)&&(F=o[h],F!=null))switch(h){case"value":y=F;break;case"defaultValue":L=F;break;case"multiple":u=F;default:Zt(t,r,h,F,o,null)}r=y,o=L,t.multiple=!!u,r!=null?mi(t,!!u,r,!1):o!=null&&mi(t,!!u,o,!0);return;case"textarea":Dt("invalid",t),y=h=u=null;for(L in o)if(o.hasOwnProperty(L)&&(F=o[L],F!=null))switch(L){case"value":u=F;break;case"defaultValue":h=F;break;case"children":y=F;break;case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(91));break;default:Zt(t,r,L,F,o,null)}So(t,u,h,y),Fr(t);return;case"option":for(W in o)if(o.hasOwnProperty(W)&&(u=o[W],u!=null))switch(W){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Zt(t,r,W,u,o,null)}return;case"dialog":Dt("beforetoggle",t),Dt("toggle",t),Dt("cancel",t),Dt("close",t);break;case"iframe":case"object":Dt("load",t);break;case"video":case"audio":for(u=0;u<cl.length;u++)Dt(cl[u],t);break;case"image":Dt("error",t),Dt("load",t);break;case"details":Dt("toggle",t);break;case"embed":case"source":case"link":Dt("error",t),Dt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ge in o)if(o.hasOwnProperty(ge)&&(u=o[ge],u!=null))switch(ge){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:Zt(t,r,ge,u,o,null)}return;default:if(gi(r)){for(ve in o)o.hasOwnProperty(ve)&&(u=o[ve],u!==void 0&&mg(t,r,ve,u,o,void 0));return}}for(F in o)o.hasOwnProperty(F)&&(u=o[F],u!=null&&Zt(t,r,F,u,o,null))}function Wv(t,r,o,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,y=null,L=null,F=null,W=null,ge=null,ve=null;for(pe in o){var ke=o[pe];if(o.hasOwnProperty(pe)&&ke!=null)switch(pe){case"checked":break;case"value":break;case"defaultValue":W=ke;default:u.hasOwnProperty(pe)||Zt(t,r,pe,null,u,ke)}}for(var fe in u){var pe=u[fe];if(ke=o[fe],u.hasOwnProperty(fe)&&(pe!=null||ke!=null))switch(fe){case"type":y=pe;break;case"name":h=pe;break;case"checked":ge=pe;break;case"defaultChecked":ve=pe;break;case"value":L=pe;break;case"defaultValue":F=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(i(137,r));break;default:pe!==ke&&Zt(t,r,fe,pe,u,ke)}}xo(t,L,F,W,ge,ve,y,h);return;case"select":pe=L=F=fe=null;for(y in o)if(W=o[y],o.hasOwnProperty(y)&&W!=null)switch(y){case"value":break;case"multiple":pe=W;default:u.hasOwnProperty(y)||Zt(t,r,y,null,u,W)}for(h in u)if(y=u[h],W=o[h],u.hasOwnProperty(h)&&(y!=null||W!=null))switch(h){case"value":fe=y;break;case"defaultValue":F=y;break;case"multiple":L=y;default:y!==W&&Zt(t,r,h,y,u,W)}r=F,o=L,u=pe,fe!=null?mi(t,!!o,fe,!1):!!u!=!!o&&(r!=null?mi(t,!!o,r,!0):mi(t,!!o,o?[]:"",!1));return;case"textarea":pe=fe=null;for(F in o)if(h=o[F],o.hasOwnProperty(F)&&h!=null&&!u.hasOwnProperty(F))switch(F){case"value":break;case"children":break;default:Zt(t,r,F,null,u,h)}for(L in u)if(h=u[L],y=o[L],u.hasOwnProperty(L)&&(h!=null||y!=null))switch(L){case"value":fe=h;break;case"defaultValue":pe=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(i(91));break;default:h!==y&&Zt(t,r,L,h,u,y)}Ls(t,fe,pe);return;case"option":for(var mt in o)if(fe=o[mt],o.hasOwnProperty(mt)&&fe!=null&&!u.hasOwnProperty(mt))switch(mt){case"selected":t.selected=!1;break;default:Zt(t,r,mt,null,u,fe)}for(W in u)if(fe=u[W],pe=o[W],u.hasOwnProperty(W)&&fe!==pe&&(fe!=null||pe!=null))switch(W){case"selected":t.selected=fe&&typeof fe!="function"&&typeof fe!="symbol";break;default:Zt(t,r,W,fe,u,pe)}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 st in o)fe=o[st],o.hasOwnProperty(st)&&fe!=null&&!u.hasOwnProperty(st)&&Zt(t,r,st,null,u,fe);for(ge in u)if(fe=u[ge],pe=o[ge],u.hasOwnProperty(ge)&&fe!==pe&&(fe!=null||pe!=null))switch(ge){case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(i(137,r));break;default:Zt(t,r,ge,fe,u,pe)}return;default:if(gi(r)){for(var ea in o)fe=o[ea],o.hasOwnProperty(ea)&&fe!==void 0&&!u.hasOwnProperty(ea)&&mg(t,r,ea,void 0,u,fe);for(ve in u)fe=u[ve],pe=o[ve],!u.hasOwnProperty(ve)||fe===pe||fe===void 0&&pe===void 0||mg(t,r,ve,fe,u,pe);return}}for(var oe in o)fe=o[oe],o.hasOwnProperty(oe)&&fe!=null&&!u.hasOwnProperty(oe)&&Zt(t,r,oe,null,u,fe);for(ke in u)fe=u[ke],pe=o[ke],!u.hasOwnProperty(ke)||fe===pe||fe==null&&pe==null||Zt(t,r,ke,fe,u,pe)}var gg=null,fg=null;function eu(t){return t.nodeType===9?t:t.ownerDocument}function S0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function T0(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function hg(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Ag=null;function Yv(){var t=window.event;return t&&t.type==="popstate"?t===Ag?!1:(Ag=t,!0):(Ag=null,!1)}var k0=typeof setTimeout=="function"?setTimeout:void 0,Jv=typeof clearTimeout=="function"?clearTimeout:void 0,L0=typeof Promise=="function"?Promise:void 0,Xv=typeof queueMicrotask=="function"?queueMicrotask:typeof L0<"u"?function(t){return L0.resolve(null).then(t).catch($v)}:k0;function $v(t){setTimeout(function(){throw t})}function Ui(t){return t==="head"}function R0(t,r){var o=r,u=0,h=0;do{var y=o.nextSibling;if(t.removeChild(o),y&&y.nodeType===8)if(o=y.data,o==="/$"){if(0<u&&8>u){o=u;var L=t.ownerDocument;if(o&1&&dl(L.documentElement),o&2&&dl(L.body),o&4)for(o=L.head,dl(o),L=o.firstChild;L;){var F=L.nextSibling,W=L.nodeName;L[_e]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&L.rel.toLowerCase()==="stylesheet"||o.removeChild(L),L=F}}if(h===0){t.removeChild(y),El(r);return}h--}else o==="$"||o==="$?"||o==="$!"?h++:u=o.charCodeAt(0)-48;else u=0;o=y}while(o);El(r)}function pg(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var o=r;switch(r=r.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":pg(o),Me(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function Zv(t,r,o,u){for(;t.nodeType===1;){var h=o;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[_e])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(y=t.getAttribute("rel"),y==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(y!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(y=t.getAttribute("src"),(y!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&y&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var y=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===y)return t}else return t;if(t=lr(t.nextSibling),t===null)break}return null}function eN(t,r,o){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=lr(t.nextSibling),t===null))return null;return t}function yg(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function tN(t,r){var o=t.ownerDocument;if(t.data!=="$?"||o.readyState==="complete")r();else{var u=function(){r(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function lr(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return t}var Eg=null;function D0(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"){if(r===0)return t;r--}else o==="/$"&&r++}t=t.previousSibling}return null}function B0(t,r,o){switch(r=eu(o),t){case"html":if(t=r.documentElement,!t)throw Error(i(452));return t;case"head":if(t=r.head,!t)throw Error(i(453));return t;case"body":if(t=r.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function dl(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Me(t)}var Xn=new Map,U0=new Set;function tu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var ei=ie.d;ie.d={f:aN,r:nN,D:rN,C:iN,L:sN,m:oN,X:cN,S:lN,M:uN};function aN(){var t=ei.f(),r=Kc();return t||r}function nN(t){var r=xt(t);r!==null&&r.tag===5&&r.type==="form"?ep(r):ei.r(t)}var ro=typeof document>"u"?null:document;function M0(t,r,o){var u=ro;if(u&&typeof r=="string"&&r){var h=pn(r);h='link[rel="'+t+'"][href="'+h+'"]',typeof o=="string"&&(h+='[crossorigin="'+o+'"]'),U0.has(h)||(U0.add(h),t={rel:t,crossOrigin:o,href:r},u.querySelector(h)===null&&(r=u.createElement("link"),Xa(r,"link",t),it(r),u.head.appendChild(r)))}}function rN(t){ei.D(t),M0("dns-prefetch",t,null)}function iN(t,r){ei.C(t,r),M0("preconnect",t,r)}function sN(t,r,o){ei.L(t,r,o);var u=ro;if(u&&t&&r){var h='link[rel="preload"][as="'+pn(r)+'"]';r==="image"&&o&&o.imageSrcSet?(h+='[imagesrcset="'+pn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(h+='[imagesizes="'+pn(o.imageSizes)+'"]')):h+='[href="'+pn(t)+'"]';var y=h;switch(r){case"style":y=io(t);break;case"script":y=so(t)}Xn.has(y)||(t=E({rel:"preload",href:r==="image"&&o&&o.imageSrcSet?void 0:t,as:r},o),Xn.set(y,t),u.querySelector(h)!==null||r==="style"&&u.querySelector(ml(y))||r==="script"&&u.querySelector(gl(y))||(r=u.createElement("link"),Xa(r,"link",t),it(r),u.head.appendChild(r)))}}function oN(t,r){ei.m(t,r);var o=ro;if(o&&t){var u=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+pn(u)+'"][href="'+pn(t)+'"]',y=h;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=so(t)}if(!Xn.has(y)&&(t=E({rel:"modulepreload",href:t},r),Xn.set(y,t),o.querySelector(h)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(gl(y)))return}u=o.createElement("link"),Xa(u,"link",t),it(u),o.head.appendChild(u)}}}function lN(t,r,o){ei.S(t,r,o);var u=ro;if(u&&t){var h=rt(u).hoistableStyles,y=io(t);r=r||"default";var L=h.get(y);if(!L){var F={loading:0,preload:null};if(L=u.querySelector(ml(y)))F.loading=5;else{t=E({rel:"stylesheet",href:t,"data-precedence":r},o),(o=Xn.get(y))&&bg(t,o);var W=L=u.createElement("link");it(W),Xa(W,"link",t),W._p=new Promise(function(ge,ve){W.onload=ge,W.onerror=ve}),W.addEventListener("load",function(){F.loading|=1}),W.addEventListener("error",function(){F.loading|=2}),F.loading|=4,au(L,r,u)}L={type:"stylesheet",instance:L,count:1,state:F},h.set(y,L)}}}function cN(t,r){ei.X(t,r);var o=ro;if(o&&t){var u=rt(o).hoistableScripts,h=so(t),y=u.get(h);y||(y=o.querySelector(gl(h)),y||(t=E({src:t,async:!0},r),(r=Xn.get(h))&&Ig(t,r),y=o.createElement("script"),it(y),Xa(y,"link",t),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(h,y))}}function uN(t,r){ei.M(t,r);var o=ro;if(o&&t){var u=rt(o).hoistableScripts,h=so(t),y=u.get(h);y||(y=o.querySelector(gl(h)),y||(t=E({src:t,async:!0,type:"module"},r),(r=Xn.get(h))&&Ig(t,r),y=o.createElement("script"),it(y),Xa(y,"link",t),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(h,y))}}function _0(t,r,o,u){var h=(h=Re.current)?tu(h):null;if(!h)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(r=io(o.href),o=rt(h).hoistableStyles,u=o.get(r),u||(u={type:"style",instance:null,count:0,state:null},o.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=io(o.href);var y=rt(h).hoistableStyles,L=y.get(t);if(L||(h=h.ownerDocument||h,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(t,L),(y=h.querySelector(ml(t)))&&!y._p&&(L.instance=y,L.state.loading=5),Xn.has(t)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Xn.set(t,o),y||dN(h,t,o,L.state))),r&&u===null)throw Error(i(528,""));return L}if(r&&u!==null)throw Error(i(529,""));return null;case"script":return r=o.async,o=o.src,typeof o=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=so(o),o=rt(h).hoistableScripts,u=o.get(r),u||(u={type:"script",instance:null,count:0,state:null},o.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function io(t){return'href="'+pn(t)+'"'}function ml(t){return'link[rel="stylesheet"]['+t+"]"}function F0(t){return E({},t,{"data-precedence":t.precedence,precedence:null})}function dN(t,r,o,u){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=t.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),Xa(r,"link",o),it(r),t.head.appendChild(r))}function so(t){return'[src="'+pn(t)+'"]'}function gl(t){return"script[async]"+t}function O0(t,r,o){if(r.count++,r.instance===null)switch(r.type){case"style":var u=t.querySelector('style[data-href~="'+pn(o.href)+'"]');if(u)return r.instance=u,it(u),u;var h=E({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),it(u),Xa(u,"style",h),au(u,o.precedence,t),r.instance=u;case"stylesheet":h=io(o.href);var y=t.querySelector(ml(h));if(y)return r.state.loading|=4,r.instance=y,it(y),y;u=F0(o),(h=Xn.get(h))&&bg(u,h),y=(t.ownerDocument||t).createElement("link"),it(y);var L=y;return L._p=new Promise(function(F,W){L.onload=F,L.onerror=W}),Xa(y,"link",u),r.state.loading|=4,au(y,o.precedence,t),r.instance=y;case"script":return y=so(o.src),(h=t.querySelector(gl(y)))?(r.instance=h,it(h),h):(u=o,(h=Xn.get(y))&&(u=E({},o),Ig(u,h)),t=t.ownerDocument||t,h=t.createElement("script"),it(h),Xa(h,"link",u),t.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(i(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,au(u,o.precedence,t));return r.instance}function au(t,r,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=u.length?u[u.length-1]:null,y=h,L=0;L<u.length;L++){var F=u[L];if(F.dataset.precedence===r)y=F;else if(y!==h)break}y?y.parentNode.insertBefore(t,y.nextSibling):(r=o.nodeType===9?o.head:o,r.insertBefore(t,r.firstChild))}function bg(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function Ig(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var nu=null;function j0(t,r,o){if(nu===null){var u=new Map,h=nu=new Map;h.set(o,u)}else h=nu,u=h.get(o),u||(u=new Map,h.set(o,u));if(u.has(t))return u;for(u.set(t,null),o=o.getElementsByTagName(t),h=0;h<o.length;h++){var y=o[h];if(!(y[_e]||y[qt]||t==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var L=y.getAttribute(r)||"";L=t+L;var F=u.get(L);F?F.push(y):u.set(L,[y])}}return u}function P0(t,r,o){t=t.ownerDocument||t,t.head.insertBefore(o,r==="title"?t.querySelector("head > title"):null)}function mN(t,r,o){if(o===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function H0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var fl=null;function gN(){}function fN(t,r,o){if(fl===null)throw Error(i(475));var u=fl;if(r.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var h=io(o.href),y=t.querySelector(ml(h));if(y){t=y._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(u.count++,u=ru.bind(u),t.then(u,u)),r.state.loading|=4,r.instance=y,it(y);return}y=t.ownerDocument||t,o=F0(o),(h=Xn.get(h))&&bg(o,h),y=y.createElement("link"),it(y);var L=y;L._p=new Promise(function(F,W){L.onload=F,L.onerror=W}),Xa(y,"link",o),r.instance=y}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(u.count++,r=ru.bind(u),t.addEventListener("load",r),t.addEventListener("error",r))}}function hN(){if(fl===null)throw Error(i(475));var t=fl;return t.stylesheets&&t.count===0&&vg(t,t.stylesheets),0<t.count?function(r){var o=setTimeout(function(){if(t.stylesheets&&vg(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(o)}}:null}function ru(){if(this.count--,this.count===0){if(this.stylesheets)vg(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var iu=null;function vg(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,iu=new Map,r.forEach(AN,t),iu=null,ru.call(t))}function AN(t,r){if(!(r.state.loading&4)){var o=iu.get(t);if(o)var u=o.get(null);else{o=new Map,iu.set(t,o);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<h.length;y++){var L=h[y];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(o.set(L.dataset.precedence,L),u=L)}u&&o.set(null,u)}h=r.instance,L=h.getAttribute("data-precedence"),y=o.get(L)||u,y===u&&o.set(null,h),o.set(L,h),this.count++,u=ru.bind(this),h.addEventListener("load",u),h.addEventListener("error",u),y?y.parentNode.insertBefore(h,y.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),r.state.loading|=4}}var hl={$$typeof:R,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function pN(t,r,o,u,h,y,L,F){this.tag=1,this.containerInfo=t,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=nn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nn(0),this.hiddenUpdates=nn(null),this.identifierPrefix=u,this.onUncaughtError=h,this.onCaughtError=y,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function z0(t,r,o,u,h,y,L,F,W,ge,ve,ke){return t=new pN(t,r,o,L,F,W,ge,ke),r=1,y===!0&&(r|=24),y=Rn(3,null,null,r),t.current=y,y.stateNode=t,r=nm(),r.refCount++,t.pooledCache=r,r.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:r},om(y),t}function Q0(t){return t?(t=Fs,t):Fs}function V0(t,r,o,u,h,y){h=Q0(h),u.context===null?u.context=h:u.pendingContext=h,u=Ii(r),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=vi(t,u,r),o!==null&&(_n(o,t,r),Go(o,t,r))}function G0(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<r?o:r}}function Ng(t,r){G0(t,r),(t=t.alternate)&&G0(t,r)}function K0(t){if(t.tag===13){var r=_s(t,67108864);r!==null&&_n(r,t,67108864),Ng(t,67108864)}}var su=!0;function yN(t,r,o,u){var h=X.T;X.T=null;var y=ie.p;try{ie.p=2,Cg(t,r,o,u)}finally{ie.p=y,X.T=h}}function EN(t,r,o,u){var h=X.T;X.T=null;var y=ie.p;try{ie.p=8,Cg(t,r,o,u)}finally{ie.p=y,X.T=h}}function Cg(t,r,o,u){if(su){var h=wg(u);if(h===null)dg(t,r,u,ou,o),W0(t,u);else if(IN(h,t,r,o,u))u.stopPropagation();else if(W0(t,u),r&4&&-1<bN.indexOf(t)){for(;h!==null;){var y=xt(h);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var L=gt(y.pendingLanes);if(L!==0){var F=y;for(F.pendingLanes|=2,F.entangledLanes|=2;L;){var W=1<<31-w(L);F.entanglements[1]|=W,L&=~W}Ir(y),(Wt&6)===0&&(Vc=se()+500,ll(0))}}break;case 13:F=_s(y,2),F!==null&&_n(F,y,2),Kc(),Ng(y,2)}if(y=wg(u),y===null&&dg(t,r,u,ou,o),y===h)break;h=y}h!==null&&u.stopPropagation()}else dg(t,r,u,null,o)}}function wg(t){return t=Pr(t),xg(t)}var ou=null;function xg(t){if(ou=null,t=Xe(t),t!==null){var r=c(t);if(r===null)t=null;else{var o=r.tag;if(o===13){if(t=d(r),t!==null)return t;t=null}else if(o===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return ou=t,null}function q0(t){switch(t){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(De()){case je:return 2;case Qe:return 8;case Ye:case ut:return 32;case Mt:return 268435456;default:return 32}default:return 32}}var Sg=!1,Mi=null,_i=null,Fi=null,Al=new Map,pl=new Map,Oi=[],bN="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 W0(t,r){switch(t){case"focusin":case"focusout":Mi=null;break;case"dragenter":case"dragleave":_i=null;break;case"mouseover":case"mouseout":Fi=null;break;case"pointerover":case"pointerout":Al.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":pl.delete(r.pointerId)}}function yl(t,r,o,u,h,y){return t===null||t.nativeEvent!==y?(t={blockedOn:r,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[h]},r!==null&&(r=xt(r),r!==null&&K0(r)),t):(t.eventSystemFlags|=u,r=t.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),t)}function IN(t,r,o,u,h){switch(r){case"focusin":return Mi=yl(Mi,t,r,o,u,h),!0;case"dragenter":return _i=yl(_i,t,r,o,u,h),!0;case"mouseover":return Fi=yl(Fi,t,r,o,u,h),!0;case"pointerover":var y=h.pointerId;return Al.set(y,yl(Al.get(y)||null,t,r,o,u,h)),!0;case"gotpointercapture":return y=h.pointerId,pl.set(y,yl(pl.get(y)||null,t,r,o,u,h)),!0}return!1}function Y0(t){var r=Xe(t.target);if(r!==null){var o=c(r);if(o!==null){if(r=o.tag,r===13){if(r=d(o),r!==null){t.blockedOn=r,rr(t.priority,function(){if(o.tag===13){var u=Mn();u=ta(u);var h=_s(o,u);h!==null&&_n(h,o,u),Ng(o,u)}});return}}else if(r===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function lu(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var o=wg(t.nativeEvent);if(o===null){o=t.nativeEvent;var u=new o.constructor(o.type,o);zn=u,o.target.dispatchEvent(u),zn=null}else return r=xt(o),r!==null&&K0(r),t.blockedOn=o,!1;r.shift()}return!0}function J0(t,r,o){lu(t)&&o.delete(r)}function vN(){Sg=!1,Mi!==null&&lu(Mi)&&(Mi=null),_i!==null&&lu(_i)&&(_i=null),Fi!==null&&lu(Fi)&&(Fi=null),Al.forEach(J0),pl.forEach(J0)}function cu(t,r){t.blockedOn===r&&(t.blockedOn=null,Sg||(Sg=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,vN)))}var uu=null;function X0(t){uu!==t&&(uu=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){uu===t&&(uu=null);for(var r=0;r<t.length;r+=3){var o=t[r],u=t[r+1],h=t[r+2];if(typeof u!="function"){if(xg(u||o)===null)continue;break}var y=xt(o);y!==null&&(t.splice(r,3),r-=3,xm(y,{pending:!0,data:h,method:o.method,action:u},u,h))}}))}function El(t){function r(W){return cu(W,t)}Mi!==null&&cu(Mi,t),_i!==null&&cu(_i,t),Fi!==null&&cu(Fi,t),Al.forEach(r),pl.forEach(r);for(var o=0;o<Oi.length;o++){var u=Oi[o];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Oi.length&&(o=Oi[0],o.blockedOn===null);)Y0(o),o.blockedOn===null&&Oi.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var h=o[u],y=o[u+1],L=h[Ea]||null;if(typeof y=="function")L||X0(o);else if(L){var F=null;if(y&&y.hasAttribute("formAction")){if(h=y,L=y[Ea]||null)F=L.formAction;else if(xg(h)!==null)continue}else F=L.action;typeof F=="function"?o[u+1]=F:(o.splice(u,3),u-=3),X0(o)}}}function Tg(t){this._internalRoot=t}du.prototype.render=Tg.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(i(409));var o=r.current,u=Mn();V0(o,u,t,r,null,null)},du.prototype.unmount=Tg.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;V0(t.current,2,null,t,null,null),Kc(),r[Jt]=null}};function du(t){this._internalRoot=t}du.prototype.unstable_scheduleHydration=function(t){if(t){var r=nr();t={blockedOn:null,target:t,priority:r};for(var o=0;o<Oi.length&&r!==0&&r<Oi[o].priority;o++);Oi.splice(o,0,t),o===0&&Y0(t)}};var $0=e.version;if($0!=="19.1.0")throw Error(i(527,$0,"19.1.0"));ie.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=f(r),t=t!==null?g(t):null,t=t===null?null:t.stateNode,t};var NN={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:X,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mu.isDisabled&&mu.supportsFiber)try{ia=mu.inject(NN),B=mu}catch{}}return Il.createRoot=function(t,r){if(!s(t))throw Error(i(299));var o=!1,u="",h=fp,y=hp,L=Ap,F=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(y=r.onCaughtError),r.onRecoverableError!==void 0&&(L=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(F=r.unstable_transitionCallbacks)),r=z0(t,1,!1,null,null,o,u,h,y,L,F,null),t[Jt]=r.current,ug(t),new Tg(r)},Il.hydrateRoot=function(t,r,o){if(!s(t))throw Error(i(299));var u=!1,h="",y=fp,L=hp,F=Ap,W=null,ge=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(L=o.onCaughtError),o.onRecoverableError!==void 0&&(F=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&(W=o.unstable_transitionCallbacks),o.formState!==void 0&&(ge=o.formState)),r=z0(t,1,!0,r,o??null,u,h,y,L,F,W,ge),r.context=Q0(null),o=r.current,u=Mn(),u=ta(u),h=Ii(u),h.callback=null,vi(o,h,u),o=u,r.current.lanes=o,Pn(r,o),Ir(r),t[Jt]=r.current,ug(t),new du(r)},Il.version="19.1.0",Il}var ly;function FN(){if(ly)return Lg.exports;ly=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(e){console.error(e)}}return n(),Lg.exports=_N(),Lg.exports}var ON=FN();const jN=Ji(ON);var I=ch();const od=Ji(I),PN=(n,e,a,i)=>{var c,d,m,f;const s=[a,{code:e,...i||{}}];if((d=(c=n==null?void 0:n.services)==null?void 0:c.logger)!=null&&d.forward)return n.services.logger.forward(s,"warn","react-i18next::",!0);Is(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(f=(m=n==null?void 0:n.services)==null?void 0:m.logger)!=null&&f.warn?n.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},cy={},Ff=(n,e,a,i)=>{Is(a)&&cy[a]||(Is(a)&&(cy[a]=new Date),PN(n,e,a,i))},yb=(n,e)=>()=>{if(n.isInitialized)e();else{const a=()=>{setTimeout(()=>{n.off("initialized",a)},0),e()};n.on("initialized",a)}},Of=(n,e,a)=>{n.loadNamespaces(e,yb(n,a))},uy=(n,e,a,i)=>{if(Is(a)&&(a=[a]),n.options.preload&&n.options.preload.indexOf(e)>-1)return Of(n,a,i);a.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(e,yb(n,i))},HN=(n,e,a={})=>!e.languages||!e.languages.length?(Ff(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(n,{lng:a.lng,precheck:(i,s)=>{var c;if(((c=a.bindI18n)==null?void 0:c.indexOf("languageChanging"))>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,n))return!1}}),Is=n=>typeof n=="string",zN=n=>typeof n=="object"&&n!==null,QN=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,VN={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},GN=n=>VN[n],KN=n=>n.replace(QN,GN);let jf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:KN};const qN=(n={})=>{jf={...jf,...n}},WN=()=>jf;let Eb;const YN=n=>{Eb=n},JN=()=>Eb,XN={type:"3rdParty",init(n){qN(n.options.react),YN(n)}},$N=I.createContext();class ZN{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const eC=(n,e)=>{const a=I.useRef();return I.useEffect(()=>{a.current=n},[n,e]),a.current},bb=(n,e,a,i)=>n.getFixedT(e,a,i),tC=(n,e,a,i)=>I.useCallback(bb(n,e,a,i),[n,e,a,i]),Ze=(n,e={})=>{var P,M,j,Q;const{i18n:a}=e,{i18n:i,defaultNS:s}=I.useContext($N)||{},c=a||i||JN();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new ZN),!c){Ff(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const H=(G,K)=>Is(K)?K:zN(K)&&Is(K.defaultValue)?K.defaultValue:Array.isArray(G)?G[G.length-1]:G,V=[H,{},!1];return V.t=H,V.i18n={},V.ready=!1,V}(P=c.options.react)!=null&&P.wait&&Ff(c,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const d={...WN(),...c.options.react,...e},{useSuspense:m,keyPrefix:f}=d;let g=s||((M=c.options)==null?void 0:M.defaultNS);g=Is(g)?[g]:g||["translation"],(Q=(j=c.reportNamespaces).addUsedNamespaces)==null||Q.call(j,g);const E=(c.isInitialized||c.initializedStoreOnce)&&g.every(H=>HN(H,c,d)),p=tC(c,e.lng||null,d.nsMode==="fallback"?g:g[0],f),C=()=>p,N=()=>bb(c,e.lng||null,d.nsMode==="fallback"?g:g[0],f),[x,S]=I.useState(C);let T=g.join();e.lng&&(T=`${e.lng}${T}`);const k=eC(T),U=I.useRef(!0);I.useEffect(()=>{const{bindI18n:H,bindI18nStore:V}=d;U.current=!0,!E&&!m&&(e.lng?uy(c,e.lng,g,()=>{U.current&&S(N)}):Of(c,g,()=>{U.current&&S(N)})),E&&k&&k!==T&&U.current&&S(N);const G=()=>{U.current&&S(N)};return H&&(c==null||c.on(H,G)),V&&(c==null||c.store.on(V,G)),()=>{U.current=!1,c&&(H==null||H.split(" ").forEach(K=>c.off(K,G))),V&&c&&V.split(" ").forEach(K=>c.store.off(K,G))}},[c,T]),I.useEffect(()=>{U.current&&E&&S(C)},[c,f,E]);const R=[x,c,E];if(R.t=x,R.i18n=c,R.ready=E,E||!E&&!m)return R;throw new Promise(H=>{e.lng?uy(c,e.lng,g,()=>H()):Of(c,g,()=>H())})};/**
 * react-router v7.12.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var dy="popstate";function aC(n={}){function e(s,c){let{pathname:d="/",search:m="",hash:f=""}=Ns(s.location.hash.substring(1));return!d.startsWith("/")&&!d.startsWith(".")&&(d="/"+d),Pf("",{pathname:d,search:m,hash:f},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function a(s,c){let d=s.document.querySelector("base"),m="";if(d&&d.getAttribute("href")){let f=s.location.href,g=f.indexOf("#");m=g===-1?f:f.slice(0,g)}return m+"#"+(typeof c=="string"?c:Wl(c))}function i(s,c){wn(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(c)})`)}return rC(e,a,i,n)}function ha(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function wn(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function nC(){return Math.random().toString(36).substring(2,10)}function my(n,e){return{usr:n.state,key:n.key,idx:e}}function Pf(n,e,a=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof e=="string"?Ns(e):e,state:a,key:e&&e.key||i||nC()}}function Wl({pathname:n="/",search:e="",hash:a=""}){return e&&e!=="?"&&(n+=e.charAt(0)==="?"?e:"?"+e),a&&a!=="#"&&(n+=a.charAt(0)==="#"?a:"#"+a),n}function Ns(n){let e={};if(n){let a=n.indexOf("#");a>=0&&(e.hash=n.substring(a),n=n.substring(0,a));let i=n.indexOf("?");i>=0&&(e.search=n.substring(i),n=n.substring(0,i)),n&&(e.pathname=n)}return e}function rC(n,e,a,i={}){let{window:s=document.defaultView,v5Compat:c=!1}=i,d=s.history,m="POP",f=null,g=E();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function E(){return(d.state||{idx:null}).idx}function p(){m="POP";let T=E(),k=T==null?null:T-g;g=T,f&&f({action:m,location:S.location,delta:k})}function C(T,k){m="PUSH";let U=Pf(S.location,T,k);a&&a(U,T),g=E()+1;let R=my(U,g),P=S.createHref(U);try{d.pushState(R,"",P)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;s.location.assign(P)}c&&f&&f({action:m,location:S.location,delta:1})}function N(T,k){m="REPLACE";let U=Pf(S.location,T,k);a&&a(U,T),g=E();let R=my(U,g),P=S.createHref(U);d.replaceState(R,"",P),c&&f&&f({action:m,location:S.location,delta:0})}function x(T){return iC(T)}let S={get action(){return m},get location(){return n(s,d)},listen(T){if(f)throw new Error("A history only accepts one active listener");return s.addEventListener(dy,p),f=T,()=>{s.removeEventListener(dy,p),f=null}},createHref(T){return e(s,T)},createURL:x,encodeLocation(T){let k=x(T);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:C,replace:N,go(T){return d.go(T)}};return S}function iC(n,e=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),ha(a,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:Wl(n);return i=i.replace(/ $/,"%20"),!e&&i.startsWith("//")&&(i=a+i),new URL(i,a)}function Ib(n,e,a="/"){return sC(n,e,a,!1)}function sC(n,e,a,i){let s=typeof e=="string"?Ns(e):e,c=ci(s.pathname||"/",a);if(c==null)return null;let d=vb(n);oC(d);let m=null;for(let f=0;m==null&&f<d.length;++f){let g=yC(c);m=AC(d[f],g,i)}return m}function vb(n,e=[],a=[],i="",s=!1){let c=(d,m,f=s,g)=>{let E={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(i)&&f)return;ha(E.relativePath.startsWith(i),`Absolute route path "${E.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(i.length)}let p=li([i,E.relativePath]),C=a.concat(E);d.children&&d.children.length>0&&(ha(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),vb(d.children,e,C,p,f)),!(d.path==null&&!d.index)&&e.push({path:p,score:fC(p,d.index),routesMeta:C})};return n.forEach((d,m)=>{var f;if(d.path===""||!((f=d.path)!=null&&f.includes("?")))c(d,m);else for(let g of Nb(d.path))c(d,m,!0,g)}),e}function Nb(n){let e=n.split("/");if(e.length===0)return[];let[a,...i]=e,s=a.endsWith("?"),c=a.replace(/\?$/,"");if(i.length===0)return s?[c,""]:[c];let d=Nb(i.join("/")),m=[];return m.push(...d.map(f=>f===""?c:[c,f].join("/"))),s&&m.push(...d),m.map(f=>n.startsWith("/")&&f===""?"/":f)}function oC(n){n.sort((e,a)=>e.score!==a.score?a.score-e.score:hC(e.routesMeta.map(i=>i.childrenIndex),a.routesMeta.map(i=>i.childrenIndex)))}var lC=/^:[\w-]+$/,cC=3,uC=2,dC=1,mC=10,gC=-2,gy=n=>n==="*";function fC(n,e){let a=n.split("/"),i=a.length;return a.some(gy)&&(i+=gC),e&&(i+=uC),a.filter(s=>!gy(s)).reduce((s,c)=>s+(lC.test(c)?cC:c===""?dC:mC),i)}function hC(n,e){return n.length===e.length&&n.slice(0,-1).every((i,s)=>i===e[s])?n[n.length-1]-e[e.length-1]:0}function AC(n,e,a=!1){let{routesMeta:i}=n,s={},c="/",d=[];for(let m=0;m<i.length;++m){let f=i[m],g=m===i.length-1,E=c==="/"?e:e.slice(c.length)||"/",p=Gu({path:f.relativePath,caseSensitive:f.caseSensitive,end:g},E),C=f.route;if(!p&&g&&a&&!i[i.length-1].route.index&&(p=Gu({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},E)),!p)return null;Object.assign(s,p.params),d.push({params:s,pathname:li([c,p.pathname]),pathnameBase:vC(li([c,p.pathnameBase])),route:C}),p.pathnameBase!=="/"&&(c=li([c,p.pathnameBase]))}return d}function Gu(n,e){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[a,i]=pC(n.path,n.caseSensitive,n.end),s=e.match(a);if(!s)return null;let c=s[0],d=c.replace(/(.)\/+$/,"$1"),m=s.slice(1);return{params:i.reduce((g,{paramName:E,isOptional:p},C)=>{if(E==="*"){let x=m[C]||"";d=c.slice(0,c.length-x.length).replace(/(.)\/+$/,"$1")}const N=m[C];return p&&!N?g[E]=void 0:g[E]=(N||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:d,pattern:n}}function pC(n,e=!1,a=!0){wn(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 i=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,f)=>(i.push({paramName:m,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(i.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),i]}function yC(n){try{return n.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return wn(!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 (${e}).`),n}}function ci(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,i=n.charAt(a);return i&&i!=="/"?null:n.slice(a)||"/"}var Cb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,EC=n=>Cb.test(n);function bC(n,e="/"){let{pathname:a,search:i="",hash:s=""}=typeof n=="string"?Ns(n):n,c;if(a)if(EC(a))c=a;else{if(a.includes("//")){let d=a;a=a.replace(/\/\/+/g,"/"),wn(!1,`Pathnames cannot have embedded double slashes - normalizing ${d} -> ${a}`)}a.startsWith("/")?c=fy(a.substring(1),"/"):c=fy(a,e)}else c=e;return{pathname:c,search:NC(i),hash:CC(s)}}function fy(n,e){let a=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(s=>{s===".."?a.length>1&&a.pop():s!=="."&&a.push(s)}),a.length>1?a.join("/"):"/"}function Mg(n,e,a,i){return`Cannot include a '${n}' character in a manually specified \`to.${e}\` field [${JSON.stringify(i)}].  Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function IC(n){return n.filter((e,a)=>a===0||e.route.path&&e.route.path.length>0)}function uh(n){let e=IC(n);return e.map((a,i)=>i===e.length-1?a.pathname:a.pathnameBase)}function dh(n,e,a,i=!1){let s;typeof n=="string"?s=Ns(n):(s={...n},ha(!s.pathname||!s.pathname.includes("?"),Mg("?","pathname","search",s)),ha(!s.pathname||!s.pathname.includes("#"),Mg("#","pathname","hash",s)),ha(!s.search||!s.search.includes("#"),Mg("#","search","hash",s)));let c=n===""||s.pathname==="",d=c?"/":s.pathname,m;if(d==null)m=a;else{let p=e.length-1;if(!i&&d.startsWith("..")){let C=d.split("/");for(;C[0]==="..";)C.shift(),p-=1;s.pathname=C.join("/")}m=p>=0?e[p]:"/"}let f=bC(s,m),g=d&&d!=="/"&&d.endsWith("/"),E=(c||d===".")&&a.endsWith("/");return!f.pathname.endsWith("/")&&(g||E)&&(f.pathname+="/"),f}var li=n=>n.join("/").replace(/\/\/+/g,"/"),vC=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),NC=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,CC=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,wC=class{constructor(n,e,a,i=!1){this.status=n,this.statusText=e||"",this.internal=i,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function xC(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function SC(n){return n.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var wb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function xb(n,e){let a=n;if(typeof a!="string"||!Cb.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let i=a,s=!1;if(wb)try{let c=new URL(window.location.href),d=a.startsWith("//")?new URL(c.protocol+a):new URL(a),m=ci(d.pathname,e);d.origin===c.origin&&m!=null?a=m+d.search+d.hash:s=!0}catch{wn(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:s,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Sb=["POST","PUT","PATCH","DELETE"];new Set(Sb);var TC=["GET",...Sb];new Set(TC);var Io=I.createContext(null);Io.displayName="DataRouter";var ld=I.createContext(null);ld.displayName="DataRouterState";var kC=I.createContext(!1),Tb=I.createContext({isTransitioning:!1});Tb.displayName="ViewTransition";var LC=I.createContext(new Map);LC.displayName="Fetchers";var RC=I.createContext(null);RC.displayName="Await";var jn=I.createContext(null);jn.displayName="Navigation";var Zl=I.createContext(null);Zl.displayName="Location";var dr=I.createContext({outlet:null,matches:[],isDataRoute:!1});dr.displayName="Route";var mh=I.createContext(null);mh.displayName="RouteError";var kb="REACT_ROUTER_ERROR",DC="REDIRECT",BC="ROUTE_ERROR_RESPONSE";function UC(n){if(n.startsWith(`${kb}:${DC}:{`))try{let e=JSON.parse(n.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function MC(n){if(n.startsWith(`${kb}:${BC}:{`))try{let e=JSON.parse(n.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new wC(e.status,e.statusText,e.data)}catch{}}function _C(n,{relative:e}={}){ha(vo(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:i}=I.useContext(jn),{hash:s,pathname:c,search:d}=ec(n,{relative:e}),m=c;return a!=="/"&&(m=c==="/"?a:li([a,c])),i.createHref({pathname:m,search:d,hash:s})}function vo(){return I.useContext(Zl)!=null}function qa(){return ha(vo(),"useLocation() may be used only in the context of a <Router> component."),I.useContext(Zl).location}var Lb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Rb(n){I.useContext(jn).static||I.useLayoutEffect(n)}function Ba(){let{isDataRoute:n}=I.useContext(dr);return n?YC():FC()}function FC(){ha(vo(),"useNavigate() may be used only in the context of a <Router> component.");let n=I.useContext(Io),{basename:e,navigator:a}=I.useContext(jn),{matches:i}=I.useContext(dr),{pathname:s}=qa(),c=JSON.stringify(uh(i)),d=I.useRef(!1);return Rb(()=>{d.current=!0}),I.useCallback((f,g={})=>{if(wn(d.current,Lb),!d.current)return;if(typeof f=="number"){a.go(f);return}let E=dh(f,JSON.parse(c),s,g.relative==="path");n==null&&e!=="/"&&(E.pathname=E.pathname==="/"?e:li([e,E.pathname])),(g.replace?a.replace:a.push)(E,g.state,g)},[e,a,c,s,n])}I.createContext(null);function cd(){let{matches:n}=I.useContext(dr),e=n[n.length-1];return e?e.params:{}}function ec(n,{relative:e}={}){let{matches:a}=I.useContext(dr),{pathname:i}=qa(),s=JSON.stringify(uh(a));return I.useMemo(()=>dh(n,JSON.parse(s),i,e==="path"),[n,s,i,e])}function OC(n,e){return Db(n,e)}function Db(n,e,a,i,s){var U;ha(vo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=I.useContext(jn),{matches:d}=I.useContext(dr),m=d[d.length-1],f=m?m.params:{},g=m?m.pathname:"/",E=m?m.pathnameBase:"/",p=m&&m.route;{let R=p&&p.path||"";Ub(g,!p||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${R}">) 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="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let C=qa(),N;if(e){let R=typeof e=="string"?Ns(e):e;ha(E==="/"||((U=R.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 "${R.pathname}" was given in the \`location\` prop.`),N=R}else N=C;let x=N.pathname||"/",S=x;if(E!=="/"){let R=E.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(R.length).join("/")}let T=Ib(n,{pathname:S});wn(p||T!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),wn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.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 k=QC(T&&T.map(R=>Object.assign({},R,{params:Object.assign({},f,R.params),pathname:li([E,c.encodeLocation?c.encodeLocation(R.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?E:li([E,c.encodeLocation?c.encodeLocation(R.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),d,a,i,s);return e&&k?I.createElement(Zl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...N},navigationType:"POP"}},k):k}function jC(){let n=WC(),e=xC(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),a=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},c={padding:"2px 4px",backgroundColor:i},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=I.createElement(I.Fragment,null,I.createElement("p",null,"💿 Hey developer 👋"),I.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",I.createElement("code",{style:c},"ErrorBoundary")," or"," ",I.createElement("code",{style:c},"errorElement")," prop on your route.")),I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},e),a?I.createElement("pre",{style:s},a):null,d)}var PC=I.createElement(jC,null),Bb=class extends I.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,e){return e.location!==n.location||e.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:e.error,location:e.location,revalidation:n.revalidation||e.revalidation}}componentDidCatch(n,e){this.props.onError?this.props.onError(n,e):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const a=MC(n.digest);a&&(n=a)}let e=n!==void 0?I.createElement(dr.Provider,{value:this.props.routeContext},I.createElement(mh.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?I.createElement(HC,{error:n},e):e}};Bb.contextType=kC;var _g=new WeakMap;function HC({children:n,error:e}){let{basename:a}=I.useContext(jn);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let i=UC(e.digest);if(i){let s=_g.get(e);if(s)throw s;let c=xb(i.location,a);if(wb&&!_g.get(e))if(c.isExternal||i.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:i.replace}));throw _g.set(e,d),d}return I.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return n}function zC({routeContext:n,match:e,children:a}){let i=I.useContext(Io);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),I.createElement(dr.Provider,{value:n},a)}function QC(n,e=[],a=null,i=null,s=null){if(n==null){if(!a)return null;if(a.errors)n=a.matches;else if(e.length===0&&!a.initialized&&a.matches.length>0)n=a.matches;else return null}let c=n,d=a==null?void 0:a.errors;if(d!=null){let E=c.findIndex(p=>p.route.id&&(d==null?void 0:d[p.route.id])!==void 0);ha(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,E+1))}let m=!1,f=-1;if(a)for(let E=0;E<c.length;E++){let p=c[E];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(f=E),p.route.id){let{loaderData:C,errors:N}=a,x=p.route.loader&&!C.hasOwnProperty(p.route.id)&&(!N||N[p.route.id]===void 0);if(p.route.lazy||x){m=!0,f>=0?c=c.slice(0,f+1):c=[c[0]];break}}}let g=a&&i?(E,p)=>{var C,N;i(E,{location:a.location,params:((N=(C=a.matches)==null?void 0:C[0])==null?void 0:N.params)??{},unstable_pattern:SC(a.matches),errorInfo:p})}:void 0;return c.reduceRight((E,p,C)=>{let N,x=!1,S=null,T=null;a&&(N=d&&p.route.id?d[p.route.id]:void 0,S=p.route.errorElement||PC,m&&(f<0&&C===0?(Ub("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,T=null):f===C&&(x=!0,T=p.route.hydrateFallbackElement||null)));let k=e.concat(c.slice(0,C+1)),U=()=>{let R;return N?R=S:x?R=T:p.route.Component?R=I.createElement(p.route.Component,null):p.route.element?R=p.route.element:R=E,I.createElement(zC,{match:p,routeContext:{outlet:E,matches:k,isDataRoute:a!=null},children:R})};return a&&(p.route.ErrorBoundary||p.route.errorElement||C===0)?I.createElement(Bb,{location:a.location,revalidation:a.revalidation,component:S,error:N,children:U(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:g}):U()},null)}function gh(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function VC(n){let e=I.useContext(Io);return ha(e,gh(n)),e}function GC(n){let e=I.useContext(ld);return ha(e,gh(n)),e}function KC(n){let e=I.useContext(dr);return ha(e,gh(n)),e}function fh(n){let e=KC(n),a=e.matches[e.matches.length-1];return ha(a.route.id,`${n} can only be used on routes that contain a unique "id"`),a.route.id}function qC(){return fh("useRouteId")}function WC(){var i;let n=I.useContext(mh),e=GC("useRouteError"),a=fh("useRouteError");return n!==void 0?n:(i=e.errors)==null?void 0:i[a]}function YC(){let{router:n}=VC("useNavigate"),e=fh("useNavigate"),a=I.useRef(!1);return Rb(()=>{a.current=!0}),I.useCallback(async(s,c={})=>{wn(a.current,Lb),a.current&&(typeof s=="number"?await n.navigate(s):await n.navigate(s,{fromRouteId:e,...c}))},[n,e])}var hy={};function Ub(n,e,a){!e&&!hy[n]&&(hy[n]=!0,wn(!1,a))}I.memo(JC);function JC({routes:n,future:e,state:a,onError:i}){return Db(n,void 0,a,i,e)}function XC({to:n,replace:e,state:a,relative:i}){ha(vo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=I.useContext(jn);wn(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=I.useContext(dr),{pathname:d}=qa(),m=Ba(),f=dh(n,uh(c),d,i==="path"),g=JSON.stringify(f);return I.useEffect(()=>{m(JSON.parse(g),{replace:e,state:a,relative:i})},[m,g,i,e,a]),null}function hh(n){ha(!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 $C({basename:n="/",children:e=null,location:a,navigationType:i="POP",navigator:s,static:c=!1,unstable_useTransitions:d}){ha(!vo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),f=I.useMemo(()=>({basename:m,navigator:s,static:c,unstable_useTransitions:d,future:{}}),[m,s,c,d]);typeof a=="string"&&(a=Ns(a));let{pathname:g="/",search:E="",hash:p="",state:C=null,key:N="default"}=a,x=I.useMemo(()=>{let S=ci(g,m);return S==null?null:{location:{pathname:S,search:E,hash:p,state:C,key:N},navigationType:i}},[m,g,E,p,C,N,i]);return wn(x!=null,`<Router basename="${m}"> is not able to match the URL "${g}${E}${p}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:I.createElement(jn.Provider,{value:f},I.createElement(Zl.Provider,{children:e,value:x}))}function Mb({children:n,location:e}){return OC(Hf(n),e)}function Hf(n,e=[]){let a=[];return I.Children.forEach(n,(i,s)=>{if(!I.isValidElement(i))return;let c=[...e,s];if(i.type===I.Fragment){a.push.apply(a,Hf(i.props.children,c));return}ha(i.type===hh,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ha(!i.props.index||!i.props.children,"An index route cannot have child routes.");let d={id:i.props.id||c.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=Hf(i.props.children,c)),a.push(d)}),a}var Bu="get",Uu="application/x-www-form-urlencoded";function ud(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function ZC(n){return ud(n)&&n.tagName.toLowerCase()==="button"}function ew(n){return ud(n)&&n.tagName.toLowerCase()==="form"}function tw(n){return ud(n)&&n.tagName.toLowerCase()==="input"}function aw(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function nw(n,e){return n.button===0&&(!e||e==="_self")&&!aw(n)}function zf(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((e,a)=>{let i=n[a];return e.concat(Array.isArray(i)?i.map(s=>[a,s]):[[a,i]])},[]))}function rw(n,e){let a=zf(n);return e&&e.forEach((i,s)=>{a.has(s)||e.getAll(s).forEach(c=>{a.append(s,c)})}),a}var gu=null;function iw(){if(gu===null)try{new FormData(document.createElement("form"),0),gu=!1}catch{gu=!0}return gu}var sw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fg(n){return n!=null&&!sw.has(n)?(wn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Uu}"`),null):n}function ow(n,e){let a,i,s,c,d;if(ew(n)){let m=n.getAttribute("action");i=m?ci(m,e):null,a=n.getAttribute("method")||Bu,s=Fg(n.getAttribute("enctype"))||Uu,c=new FormData(n)}else if(ZC(n)||tw(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=n.getAttribute("formaction")||m.getAttribute("action");if(i=f?ci(f,e):null,a=n.getAttribute("formmethod")||m.getAttribute("method")||Bu,s=Fg(n.getAttribute("formenctype"))||Fg(m.getAttribute("enctype"))||Uu,c=new FormData(m,n),!iw()){let{name:g,type:E,value:p}=n;if(E==="image"){let C=g?`${g}.`:"";c.append(`${C}x`,"0"),c.append(`${C}y`,"0")}else g&&c.append(g,p)}}else{if(ud(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Bu,i=null,s=Uu,d=n}return c&&s==="text/plain"&&(d=c,c=void 0),{action:i,method:a.toLowerCase(),encType:s,formData:c,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ah(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function lw(n,e,a,i){let s=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return a?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${i}`:s.pathname=`${s.pathname}.${i}`:s.pathname==="/"?s.pathname=`_root.${i}`:e&&ci(s.pathname,e)==="/"?s.pathname=`${e.replace(/\/$/,"")}/_root.${i}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${i}`,s}async function cw(n,e){if(n.id in e)return e[n.id];try{let a=await import(n.module);return e[n.id]=a,a}catch(a){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function uw(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 dw(n,e,a){let i=await Promise.all(n.map(async s=>{let c=e.routes[s.route.id];if(c){let d=await cw(c,a);return d.links?d.links():[]}return[]}));return hw(i.flat(1).filter(uw).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Ay(n,e,a,i,s,c){let d=(f,g)=>a[g]?f.route.id!==a[g].route.id:!0,m=(f,g)=>{var E;return a[g].pathname!==f.pathname||((E=a[g].route.path)==null?void 0:E.endsWith("*"))&&a[g].params["*"]!==f.params["*"]};return c==="assets"?e.filter((f,g)=>d(f,g)||m(f,g)):c==="data"?e.filter((f,g)=>{var p;let E=i.routes[f.route.id];if(!E||!E.hasLoader)return!1;if(d(f,g)||m(f,g))return!0;if(f.route.shouldRevalidate){let C=f.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((p=a[0])==null?void 0:p.params)||{},nextUrl:new URL(n,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function mw(n,e,{includeHydrateFallback:a}={}){return gw(n.map(i=>{let s=e.routes[i.route.id];if(!s)return[];let c=[s.module];return s.clientActionModule&&(c=c.concat(s.clientActionModule)),s.clientLoaderModule&&(c=c.concat(s.clientLoaderModule)),a&&s.hydrateFallbackModule&&(c=c.concat(s.hydrateFallbackModule)),s.imports&&(c=c.concat(s.imports)),c}).flat(1))}function gw(n){return[...new Set(n)]}function fw(n){let e={},a=Object.keys(n).sort();for(let i of a)e[i]=n[i];return e}function hw(n,e){let a=new Set;return new Set(e),n.reduce((i,s)=>{let c=JSON.stringify(fw(s));return a.has(c)||(a.add(c),i.push({key:c,link:s})),i},[])}function _b(){let n=I.useContext(Io);return Ah(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Aw(){let n=I.useContext(ld);return Ah(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var ph=I.createContext(void 0);ph.displayName="FrameworkContext";function Fb(){let n=I.useContext(ph);return Ah(n,"You must render this element inside a <HydratedRouter> element"),n}function pw(n,e){let a=I.useContext(ph),[i,s]=I.useState(!1),[c,d]=I.useState(!1),{onFocus:m,onBlur:f,onMouseEnter:g,onMouseLeave:E,onTouchStart:p}=e,C=I.useRef(null);I.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let S=k=>{k.forEach(U=>{d(U.isIntersecting)})},T=new IntersectionObserver(S,{threshold:.5});return C.current&&T.observe(C.current),()=>{T.disconnect()}}},[n]),I.useEffect(()=>{if(i){let S=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(S)}}},[i]);let N=()=>{s(!0)},x=()=>{s(!1),d(!1)};return a?n!=="intent"?[c,C,{}]:[c,C,{onFocus:vl(m,N),onBlur:vl(f,x),onMouseEnter:vl(g,N),onMouseLeave:vl(E,x),onTouchStart:vl(p,N)}]:[!1,C,{}]}function vl(n,e){return a=>{n&&n(a),a.defaultPrevented||e(a)}}function yw({page:n,...e}){let{router:a}=_b(),i=I.useMemo(()=>Ib(a.routes,n,a.basename),[a.routes,n,a.basename]);return i?I.createElement(bw,{page:n,matches:i,...e}):null}function Ew(n){let{manifest:e,routeModules:a}=Fb(),[i,s]=I.useState([]);return I.useEffect(()=>{let c=!1;return dw(n,e,a).then(d=>{c||s(d)}),()=>{c=!0}},[n,e,a]),i}function bw({page:n,matches:e,...a}){let i=qa(),{future:s,manifest:c,routeModules:d}=Fb(),{basename:m}=_b(),{loaderData:f,matches:g}=Aw(),E=I.useMemo(()=>Ay(n,e,g,c,i,"data"),[n,e,g,c,i]),p=I.useMemo(()=>Ay(n,e,g,c,i,"assets"),[n,e,g,c,i]),C=I.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let S=new Set,T=!1;if(e.forEach(U=>{var P;let R=c.routes[U.route.id];!R||!R.hasLoader||(!E.some(M=>M.route.id===U.route.id)&&U.route.id in f&&((P=d[U.route.id])!=null&&P.shouldRevalidate)||R.hasClientLoader?T=!0:S.add(U.route.id))}),S.size===0)return[];let k=lw(n,m,s.unstable_trailingSlashAwareDataRequests,"data");return T&&S.size>0&&k.searchParams.set("_routes",e.filter(U=>S.has(U.route.id)).map(U=>U.route.id).join(",")),[k.pathname+k.search]},[m,s.unstable_trailingSlashAwareDataRequests,f,i,c,E,e,n,d]),N=I.useMemo(()=>mw(p,c),[p,c]),x=Ew(p);return I.createElement(I.Fragment,null,C.map(S=>I.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...a})),N.map(S=>I.createElement("link",{key:S,rel:"modulepreload",href:S,...a})),x.map(({key:S,link:T})=>I.createElement("link",{key:S,nonce:a.nonce,...T})))}function Iw(...n){return e=>{n.forEach(a=>{typeof a=="function"?a(e):a!=null&&(a.current=e)})}}var vw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vw&&(window.__reactRouterVersion="7.12.0")}catch{}function Nw({basename:n,children:e,unstable_useTransitions:a,window:i}){let s=I.useRef();s.current==null&&(s.current=aC({window:i,v5Compat:!0}));let c=s.current,[d,m]=I.useState({action:c.action,location:c.location}),f=I.useCallback(g=>{a===!1?m(g):I.startTransition(()=>m(g))},[a]);return I.useLayoutEffect(()=>c.listen(f),[c,f]),I.createElement($C,{basename:n,children:e,location:d.location,navigationType:d.action,navigator:c,unstable_useTransitions:a})}var Ob=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dd=I.forwardRef(function({onClick:e,discover:a="render",prefetch:i="none",relative:s,reloadDocument:c,replace:d,state:m,target:f,to:g,preventScrollReset:E,viewTransition:p,unstable_defaultShouldRevalidate:C,...N},x){let{basename:S,unstable_useTransitions:T}=I.useContext(jn),k=typeof g=="string"&&Ob.test(g),U=xb(g,S);g=U.to;let R=_C(g,{relative:s}),[P,M,j]=pw(i,N),Q=Sw(g,{replace:d,state:m,target:f,preventScrollReset:E,relative:s,viewTransition:p,unstable_defaultShouldRevalidate:C,unstable_useTransitions:T});function H(G){e&&e(G),G.defaultPrevented||Q(G)}let V=I.createElement("a",{...N,...j,href:U.absoluteURL||R,onClick:U.isExternal||c?e:H,ref:Iw(x,M),target:f,"data-discover":!k&&a==="render"?"true":void 0});return P&&!k?I.createElement(I.Fragment,null,V,I.createElement(yw,{page:R})):V});dd.displayName="Link";var Cw=I.forwardRef(function({"aria-current":e="page",caseSensitive:a=!1,className:i="",end:s=!1,style:c,to:d,viewTransition:m,children:f,...g},E){let p=ec(d,{relative:g.relative}),C=qa(),N=I.useContext(ld),{navigator:x,basename:S}=I.useContext(jn),T=N!=null&&Dw(p)&&m===!0,k=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,U=C.pathname,R=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;a||(U=U.toLowerCase(),R=R?R.toLowerCase():null,k=k.toLowerCase()),R&&S&&(R=ci(R,S)||R);const P=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let M=U===k||!s&&U.startsWith(k)&&U.charAt(P)==="/",j=R!=null&&(R===k||!s&&R.startsWith(k)&&R.charAt(k.length)==="/"),Q={isActive:M,isPending:j,isTransitioning:T},H=M?e:void 0,V;typeof i=="function"?V=i(Q):V=[i,M?"active":null,j?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let G=typeof c=="function"?c(Q):c;return I.createElement(dd,{...g,"aria-current":H,className:V,ref:E,style:G,to:d,viewTransition:m},typeof f=="function"?f(Q):f)});Cw.displayName="NavLink";var ww=I.forwardRef(({discover:n="render",fetcherKey:e,navigate:a,reloadDocument:i,replace:s,state:c,method:d=Bu,action:m,onSubmit:f,relative:g,preventScrollReset:E,viewTransition:p,unstable_defaultShouldRevalidate:C,...N},x)=>{let{unstable_useTransitions:S}=I.useContext(jn),T=Lw(),k=Rw(m,{relative:g}),U=d.toLowerCase()==="get"?"get":"post",R=typeof m=="string"&&Ob.test(m),P=M=>{if(f&&f(M),M.defaultPrevented)return;M.preventDefault();let j=M.nativeEvent.submitter,Q=(j==null?void 0:j.getAttribute("formmethod"))||d,H=()=>T(j||M.currentTarget,{fetcherKey:e,method:Q,navigate:a,replace:s,state:c,relative:g,preventScrollReset:E,viewTransition:p,unstable_defaultShouldRevalidate:C});S&&a!==!1?I.startTransition(()=>H()):H()};return I.createElement("form",{ref:x,method:U,action:k,onSubmit:i?f:P,...N,"data-discover":!R&&n==="render"?"true":void 0})});ww.displayName="Form";function xw(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function jb(n){let e=I.useContext(Io);return ha(e,xw(n)),e}function Sw(n,{target:e,replace:a,state:i,preventScrollReset:s,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:m,unstable_useTransitions:f}={}){let g=Ba(),E=qa(),p=ec(n,{relative:c});return I.useCallback(C=>{if(nw(C,e)){C.preventDefault();let N=a!==void 0?a:Wl(E)===Wl(p),x=()=>g(n,{replace:N,state:i,preventScrollReset:s,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:m});f?I.startTransition(()=>x()):x()}},[E,g,p,a,i,e,n,s,c,d,m,f])}function Pb(n){wn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let e=I.useRef(zf(n)),a=I.useRef(!1),i=qa(),s=I.useMemo(()=>rw(i.search,a.current?null:e.current),[i.search]),c=Ba(),d=I.useCallback((m,f)=>{const g=zf(typeof m=="function"?m(new URLSearchParams(s)):m);a.current=!0,c("?"+g,f)},[c,s]);return[s,d]}var Tw=0,kw=()=>`__${String(++Tw)}__`;function Lw(){let{router:n}=jb("useSubmit"),{basename:e}=I.useContext(jn),a=qC(),i=n.fetch,s=n.navigate;return I.useCallback(async(c,d={})=>{let{action:m,method:f,encType:g,formData:E,body:p}=ow(c,e);if(d.navigate===!1){let C=d.fetcherKey||kw();await i(C,a,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:E,body:p,formMethod:d.method||f,formEncType:d.encType||g,flushSync:d.flushSync})}else await s(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:E,body:p,formMethod:d.method||f,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:a,flushSync:d.flushSync,viewTransition:d.viewTransition})},[i,s,e,a])}function Rw(n,{relative:e}={}){let{basename:a}=I.useContext(jn),i=I.useContext(dr);ha(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),c={...ec(n||".",{relative:e})},d=qa();if(n==null){c.search=d.search;let m=new URLSearchParams(c.search),f=m.getAll("index");if(f.some(E=>E==="")){m.delete("index"),f.filter(p=>p).forEach(p=>m.append("index",p));let E=m.toString();c.search=E?`?${E}`:""}}return(!n||n===".")&&s.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(c.pathname=c.pathname==="/"?a:li([a,c.pathname])),Wl(c)}function Dw(n,{relative:e}={}){let a=I.useContext(Tb);ha(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=jb("useViewTransitionState"),s=ec(n,{relative:e});if(!a.isTransitioning)return!1;let c=ci(a.currentLocation.pathname,i)||a.currentLocation.pathname,d=ci(a.nextLocation.pathname,i)||a.nextLocation.pathname;return Gu(s.pathname,d)!=null||Gu(s.pathname,c)!=null}var fu={exports:{}},py;function Bw(){if(py)return fu.exports;py=1;const n=a=>typeof crypto<"u"&&typeof crypto.getRandomValues=="function"?()=>{const i=crypto.getRandomValues(new Uint8Array(1))[0];return(i>=a?i%a:i).toString(a)}:()=>Math.floor(Math.random()*a).toString(a),e=(a=7,i=!1)=>Array.from({length:a},n(i?16:36)).join("");return fu.exports=e,fu.exports.default=e,fu.exports}var Uw=Bw();const Ku=Ji(Uw);var Mw=()=>`uid::${Ku(7)}`,_w=(n,e=["endpointName","fingerprint"])=>typeof n=="object"&&n!==null&&e.every(a=>a in n),Fw=n=>{if(!_w(n))throw new TypeError("Invalid connection args");return JSON.stringify(n)},Ow=()=>{let n=[];return{add:(...e)=>{n=[...n,...e]},remove:e=>{n=typeof e=="string"?n.filter(a=>a.message.transactionId!==e):n.filter(a=>!e.includes(a))},entries:()=>n}},Og=class{static toBackground(n,e){return n.postMessage(e)}static toExtensionContext(n,e){return n.postMessage(e)}},Mu={exports:{}},jw=Mu.exports,yy;function Pw(){return yy||(yy=1,function(n,e){(function(a,i){i(n)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:jw,function(a){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 i="The message port closed before a response was received.",s="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)",c=d=>{const m={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(m).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class f extends WeakMap{constructor(V,G=void 0){super(G),this.createItem=V}get(V){return this.has(V)||this.set(V,this.createItem(V)),super.get(V)}}const g=H=>H&&typeof H=="object"&&typeof H.then=="function",E=(H,V)=>(...G)=>{d.runtime.lastError?H.reject(new Error(d.runtime.lastError.message)):V.singleCallbackArg||G.length<=1&&V.singleCallbackArg!==!1?H.resolve(G[0]):H.resolve(G)},p=H=>H==1?"argument":"arguments",C=(H,V)=>function(K,...$){if($.length<V.minArgs)throw new Error(`Expected at least ${V.minArgs} ${p(V.minArgs)} for ${H}(), got ${$.length}`);if($.length>V.maxArgs)throw new Error(`Expected at most ${V.maxArgs} ${p(V.maxArgs)} for ${H}(), got ${$.length}`);return new Promise((J,re)=>{if(V.fallbackToNoCallback)try{K[H](...$,E({resolve:J,reject:re},V))}catch(Ae){console.warn(`${H} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,Ae),K[H](...$),V.fallbackToNoCallback=!1,V.noCallback=!0,J()}else V.noCallback?(K[H](...$),J()):K[H](...$,E({resolve:J,reject:re},V))})},N=(H,V,G)=>new Proxy(V,{apply(K,$,J){return G.call($,H,...J)}});let x=Function.call.bind(Object.prototype.hasOwnProperty);const S=(H,V={},G={})=>{let K=Object.create(null),$={has(re,Ae){return Ae in H||Ae in K},get(re,Ae,X){if(Ae in K)return K[Ae];if(!(Ae in H))return;let ie=H[Ae];if(typeof ie=="function")if(typeof V[Ae]=="function")ie=N(H,H[Ae],V[Ae]);else if(x(G,Ae)){let ce=C(Ae,G[Ae]);ie=N(H,H[Ae],ce)}else ie=ie.bind(H);else if(typeof ie=="object"&&ie!==null&&(x(V,Ae)||x(G,Ae)))ie=S(ie,V[Ae],G[Ae]);else if(x(G,"*"))ie=S(ie,V[Ae],G["*"]);else return Object.defineProperty(K,Ae,{configurable:!0,enumerable:!0,get(){return H[Ae]},set(ce){H[Ae]=ce}}),ie;return K[Ae]=ie,ie},set(re,Ae,X,ie){return Ae in K?K[Ae]=X:H[Ae]=X,!0},defineProperty(re,Ae,X){return Reflect.defineProperty(K,Ae,X)},deleteProperty(re,Ae){return Reflect.deleteProperty(K,Ae)}},J=Object.create(H);return new Proxy(J,$)},T=H=>({addListener(V,G,...K){V.addListener(H.get(G),...K)},hasListener(V,G){return V.hasListener(H.get(G))},removeListener(V,G){V.removeListener(H.get(G))}}),k=new f(H=>typeof H!="function"?H:function(G){const K=S(G,{},{getContent:{minArgs:0,maxArgs:0}});H(K)});let U=!1;const R=new f(H=>typeof H!="function"?H:function(G,K,$){let J=!1,re,Ae=new Promise(ye=>{re=function(_){U||(console.warn(s,new Error().stack),U=!0),J=!0,ye(_)}}),X;try{X=H(G,K,re)}catch(ye){X=Promise.reject(ye)}const ie=X!==!0&&g(X);if(X!==!0&&!ie&&!J)return!1;const ce=ye=>{ye.then(_=>{$(_)},_=>{let q;_&&(_ instanceof Error||typeof _.message=="string")?q=_.message:q="An unexpected error occurred",$({__mozWebExtensionPolyfillReject__:!0,message:q})}).catch(_=>{console.error("Failed to send onMessage rejected reply",_)})};return ce(ie?X:Ae),!0}),P=({reject:H,resolve:V},G)=>{d.runtime.lastError?d.runtime.lastError.message===i?V():H(new Error(d.runtime.lastError.message)):G&&G.__mozWebExtensionPolyfillReject__?H(new Error(G.message)):V(G)},M=(H,V,G,...K)=>{if(K.length<V.minArgs)throw new Error(`Expected at least ${V.minArgs} ${p(V.minArgs)} for ${H}(), got ${K.length}`);if(K.length>V.maxArgs)throw new Error(`Expected at most ${V.maxArgs} ${p(V.maxArgs)} for ${H}(), got ${K.length}`);return new Promise(($,J)=>{const re=P.bind(null,{resolve:$,reject:J});K.push(re),G.sendMessage(...K)})},j={devtools:{network:{onRequestFinished:T(k)}},runtime:{onMessage:T(R),onMessageExternal:T(R),sendMessage:M.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:M.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},Q={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return m.privacy={network:{"*":Q},services:{"*":Q},websites:{"*":Q}},S(d,j,m)};a.exports=c(chrome)}else a.exports=globalThis.browser})}(Mu)),Mu.exports}var Hw=Pw();const zw=Ji(Hw);var Qw=(n="")=>{const e=Mw();let a,i=[];const s=Ow(),c=new Set,d=new Set,m=(g,E)=>{switch(g.status){case"undeliverable":i.some(p=>p.message.messageID===g.message.messageID)||(i=[...i,{message:g.message,resolvedDestination:g.resolvedDestination}]);return;case"deliverable":i=i.reduce((p,C)=>C.resolvedDestination===g.deliverableTo?(Og.toBackground(E,{type:"deliver",message:C.message}),p):[...p,C],[]);return;case"delivered":g.receipt.message.messageType==="message"&&s.add(g.receipt);return;case"incoming":g.message.messageType==="reply"&&s.remove(g.message.messageID),c.forEach(p=>p(g.message,E));return;case"terminated":{const p=s.entries().filter(C=>g.fingerprint===C.to);s.remove(p),p.forEach(({message:C})=>d.forEach(N=>N(C)))}}},f=()=>{a=zw.runtime.connect({name:Fw({endpointName:n,fingerprint:e})}),a.onMessage.addListener(m),a.onDisconnect.addListener(f),Og.toBackground(a,{type:"sync",pendingResponses:s.entries(),pendingDeliveries:[...new Set(i.map(({resolvedDestination:g})=>g))]})};return f(),{onFailure(g){d.add(g)},onMessage(g){c.add(g)},postMessage(g){Og.toBackground(a,{type:"deliver",message:g})}}},Vw=Object.defineProperty,Gw=Object.defineProperties,Kw=Object.getOwnPropertyDescriptors,Ey=Object.getOwnPropertySymbols,qw=Object.prototype.hasOwnProperty,Ww=Object.prototype.propertyIsEnumerable,by=(n,e,a)=>e in n?Vw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[e]=a,Hb=(n,e)=>{for(var a in e||(e={}))qw.call(e,a)&&by(n,a,e[a]);if(Ey)for(var a of Ey(e))Ww.call(e,a)&&by(n,a,e[a]);return n},zb=(n,e)=>Gw(n,Kw(e)),Yw=/^((?:background$)|devtools|popup|options|content-script|window)(?:@(\d+)(?:\.(\d+))?)?$/,Qb=n=>{const[,e,a,i]=n.match(Yw)||[];return{context:e,tabId:+a,frameId:i?+i:void 0}};const Jw=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],Qf=Symbol(".toJSON was called"),Xw=n=>{n[Qf]=!0;const e=n.toJSON();return delete n[Qf],e},Vb=({from:n,seen:e,to_:a,forceEnumerable:i,maxDepth:s,depth:c})=>{const d=a||(Array.isArray(n)?[]:{});if(e.push(n),c>=s)return d;if(typeof n.toJSON=="function"&&n[Qf]!==!0)return Xw(n);for(const[m,f]of Object.entries(n)){if(typeof Buffer=="function"&&Buffer.isBuffer(f)){d[m]="[object Buffer]";continue}if(f!==null&&typeof f=="object"&&typeof f.pipe=="function"){d[m]="[object Stream]";continue}if(typeof f!="function"){if(!f||typeof f!="object"){d[m]=f;continue}if(!e.includes(n[m])){c++,d[m]=Vb({from:n[m],seen:[...e],forceEnumerable:i,maxDepth:s,depth:c});continue}d[m]="[Circular]"}}for(const{property:m,enumerable:f}of Jw)typeof n[m]=="string"&&Object.defineProperty(d,m,{value:n[m],enumerable:!0,configurable:!0,writable:!0});return d};function $w(n,e={}){const{maxDepth:a=Number.POSITIVE_INFINITY}=e;return typeof n=="object"&&n!==null?Vb({from:n,seen:[],forceEnumerable:!0,maxDepth:a,depth:0}):typeof n=="function"?`[Function: ${n.name||"anonymous"}]`:n}let Gb=()=>({events:{},emit(n,...e){(this.events[n]||[]).forEach(a=>a(...e))},on(n,e){return(this.events[n]=this.events[n]||[]).push(e),()=>this.events[n]=(this.events[n]||[]).filter(a=>a!==e)}});var Zw=(n,e,a)=>{const i=Ku(),s=new Map,c=new Map,d=m=>{if(m.destination.context===n&&!m.destination.frameId&&!m.destination.tabId){const{transactionId:f,messageID:g,messageType:E}=m,p=()=>{const N=s.get(f);if(N){const{err:x,data:S}=m;if(x){const T=x,k=self[T.name],U=new(typeof k=="function"?k:Error)(T.message);for(const R in T)U[R]=T[R];N.reject(U)}else N.resolve(S);s.delete(f)}},C=async()=>{let N,x,S=!1;try{const T=c.get(g);if(typeof T=="function")N=await T({sender:m.origin,id:g,data:m.data,timestamp:m.timestamp});else throw S=!0,new Error(`[webext-bridge] No handler registered in '${n}' to accept messages with id '${g}'`)}catch(T){x=T}finally{if(x&&(m.err=$w(x)),d(zb(Hb({},m),{messageType:"reply",data:N,origin:{context:n,tabId:null},destination:m.origin,hops:[]})),x&&!S)throw N}};switch(E){case"reply":return p();case"message":return C()}}return m.hops.push(`${n}::${i}`),e(m)};return{handleMessage:d,endTransaction:m=>{const f=s.get(m);f==null||f.reject("Transaction was ended before it could complete"),s.delete(m)},sendMessage:(m,f,g="background")=>{const E=typeof g=="string"?Qb(g):g,p="Bridge#sendMessage ->";if(!E.context)throw new TypeError(`${p} Destination must be any one of known destinations`);return new Promise((C,N)=>{const x={messageID:m,data:f,destination:E,messageType:"message",transactionId:Ku(),origin:{context:n,tabId:null},hops:[],timestamp:Date.now()};s.set(x.transactionId,{resolve:C,reject:N});try{d(x)}catch(S){s.delete(x.transactionId),N(S)}})},onMessage:(m,f)=>(c.set(m,f),()=>c.delete(m))}},mo=class{constructor(n,e){this.endpointRuntime=n,this.streamInfo=e,this.emitter=Gb(),this.isClosed=!1,this.handleStreamClose=()=>{this.isClosed||(this.isClosed=!0,this.emitter.emit("closed",!0),this.emitter.events={})},mo.initDone||(n.onMessage("__crx_bridge_stream_transfer__",a=>{const{streamId:i,streamTransfer:s,action:c}=a.data,d=mo.openStreams.get(i);d&&!d.isClosed&&(c==="transfer"&&d.emitter.emit("message",s),c==="close"&&(mo.openStreams.delete(i),d.handleStreamClose()))}),mo.initDone=!0),mo.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,e){const a=this.emitter.on(n,e);return Object.assign(a,{dispose:a,close:a})}},qu=mo;qu.initDone=!1;qu.openStreams=new Map;var ex=n=>{const e=new Map,a=new Map,i=Gb();n.onMessage("__crx_bridge_stream_open__",d=>new Promise(m=>{const{sender:f,data:g}=d,{channel:E}=g;let p=!1,C=()=>{};const N=()=>{const x=a.get(E);typeof x=="function"?(x(new qu(n,zb(Hb({},g),{endpoint:f}))),p&&C(),m(!0)):p||(p=!0,C=i.on("did-change-stream-callbacks",N))};N()}));async function s(d,m){if(e.has(d))throw new Error("webext-bridge: A Stream is already open at this channel");const f=typeof m=="string"?Qb(m):m,g={streamId:Ku(),channel:d,endpoint:f},E=new qu(n,g);return E.onClose(()=>e.delete(d)),await n.sendMessage("__crx_bridge_stream_open__",g,f),e.set(d,E),E}function c(d,m){if(a.has(d))throw new Error("webext-bridge: This channel has already been claimed. Stream allows only one-on-one communication");a.set(d,m),i.emit("did-change-stream-callbacks")}return{openStream:s,onOpenStreamChannel:c}},Kb=Qw("popup"),yh=Zw("popup",n=>Kb.postMessage(n));Kb.onMessage(yh.handleMessage);var{sendMessage:Bt,onMessage:jg}=yh;ex(yh);const tx=()=>{const[n,e]=I.useState(!1),a=I.useRef(null),i=I.useRef(0),s=(c,d)=>{setTimeout(()=>{if(a.current){const m=c/d*100;a.current.style.transition="none",a.current.style.width=`${m}%`,a.current.offsetHeight,requestAnimationFrame(()=>{a.current&&(a.current.style.transition=`width ${c}s linear`,a.current.style.width="0%")})}},10)};return I.useEffect(()=>{Bt("GET_CLIPBOARD_COUNTDOWN_STATE",{},"background").then(f=>{const g=f;g&&g.remaining>0&&(i.current=g.id,e(!0),s(g.remaining,g.total))}).catch(()=>{});const c=jg("CLIPBOARD_COUNTDOWN",({data:f})=>{const{remaining:g,total:E,id:p}=f;e(g>0),p!==i.current&&g>0&&(i.current=p,s(g,E))}),d=jg("CLIPBOARD_CLEARED",()=>{e(!1),i.current=0,a.current&&(a.current.style.transition="none",a.current.style.width="0%")}),m=jg("CLIPBOARD_COUNTDOWN_CANCELLED",()=>{e(!1),i.current=0,a.current&&(a.current.style.transition="none",a.current.style.width="0%")});return()=>{c(),d(),m()}},[]),n?l.jsx("div",{className:"fixed top-0 left-0 right-0 z-[60] h-1 bg-gray-200 dark:bg-gray-700",children:l.jsx("div",{ref:a,className:"h-full bg-orange-500",style:{width:"100%",transition:"none"}})}):null},ax=()=>{const{t:n}=Ze(),e=Ba(),a=qa(),[i,s]=I.useState("items");I.useEffect(()=>{const E=a.pathname.substring(1),C=["items","emails","settings"].find(N=>E===N||E.startsWith(`${N}/`));C&&s(C)},[a]);const c=E=>{s(E),E==="items"?e(`/${E}`,{state:{resetFilters:!0}}):e(`/${E}`)};return["/","/login","/auth-settings","/unlock","/unlock-success","/upgrade"].includes(a.pathname)||new URLSearchParams(window.location.search).get("mode")==="inline_unlock"?null:l.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:l.jsxs("div",{className:"flex justify-around items-center h-14",children:[l.jsxs("button",{onClick:()=>c("items"),id:"nav-vault",className:`flex flex-col items-center justify-center w-1/3 h-full ${i==="items"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[l.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.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"})}),l.jsx("span",{className:"text-sm mt-1",children:n("menu.vault")})]}),l.jsxs("button",{onClick:()=>c("emails"),id:"nav-emails",className:`flex flex-col items-center justify-center w-1/3 h-full ${i==="emails"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[l.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.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"})}),l.jsx("span",{className:"text-sm mt-1",children:n("menu.emails")})]}),l.jsxs("button",{onClick:()=>c("settings"),id:"nav-settings",className:`flex flex-col items-center justify-center w-1/3 h-full ${i==="settings"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[l.jsxs("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[l.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"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),l.jsx("span",{className:"text-sm mt-1",children:n("common.settings")})]})]})})},qb=({className:n="",width:e=200,height:a=50,showText:i=!0,color:s="currentColor"})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",version:"1.1",viewBox:"0 0 2000 500",width:e,height:a,className:n,children:[l.jsx("path",{d:"m459.87 294.95c0.016205 5.4005 0.03241 10.801-0.35022 16.873-1.111 6.3392-1.1941 12.173-2.6351 17.649-10.922 41.508-36.731 69.481-77.351 83.408-7.2157 2.4739-14.972 3.3702-22.479 4.995-23.629 0.042205-47.257 0.11453-70.886 0.12027-46.762 0.011322-93.523-0.01416-140.95-0.43411-8.59-2.0024-16.766-2.8352-24.398-5.3326-21.595-7.0666-39.523-19.656-53.708-37.552-10.227-12.903-17.579-27.17-21.28-43.221-1.475-6.3967-2.4711-12.904-3.6852-19.361-0.051849-5.747-0.1037-11.494 0.26915-17.886 4.159-42.973 27.68-71.638 63.562-92.153 0-0.70761-0.001961-1.6988 3.12e-4 -2.69 0.022484-9.8293-1.3071-19.894 0.35664-29.438 3.2391-18.579 11.08-35.272 23.763-49.773 12.098-13.832 26.457-23.989 43.609-30.029 7.813-2.7512 16.14-4.0417 24.234-5.9948 7.392-0.025734 14.784-0.05146 22.835 0.32253 4.1959 0.95392 7.7946 1.2538 11.258 2.1053 17.16 4.2192 32.287 12.176 45.469 24.104 2.2558 2.0411 4.372 6.6241 9.621 3.868 16.839-8.8419 34.718-11.597 53.603-8.594 16.791 2.6699 31.602 9.4308 44.236 20.636 11.531 10.227 19.84 22.841 25.393 37.236 6.3436 16.445 10.389 33.163 6.0798 49.389 7.9587 8.9321 15.807 16.704 22.421 25.414 9.162 12.065 15.33 25.746 18.144 40.776 0.97046 5.1848 1.9111 10.375 2.8654 15.563m-71.597 71.012c5.5615-5.2284 12.002-9.7986 16.508-15.817 10.474-13.992 14.333-29.916 11.288-47.446-2.2496-12.95-8.1973-24.076-17.243-33.063-12.746-12.663-28.865-18.614-46.786-18.569-69.912 0.17712-139.82 0.56831-209.74 0.96176-15.922 0.089599-29.168 7.4209-39.685 18.296-14.45 14.944-20.408 33.343-16.655 54.368 2.2763 12.754 8.2167 23.748 17.158 32.66 13.299 13.255 30.097 18.653 48.728 18.651 59.321-0.005188 118.64 0.042358 177.96-0.046601 9.5912-0.014374 19.181-0.86588 28.773-0.88855 10.649-0.025146 19.978-3.825 29.687-9.1074z",fill:"#EEC170"}),l.jsx("path",{d:"m162.77 293c15.654 4.3883 20.627 22.967 10.304 34.98-5.3104 6.1795-14.817 8.3208-24.278 5.0472-7.0723-2.4471-12.332-10.362-12.876-17.933-1.0451-14.542 11.089-23.176 21.705-23.046 1.5794 0.019287 3.1517 0.61566 5.1461 0.95184z",fill:"#EEC170"}),l.jsx("path",{d:"m227.18 293.64c7.8499 2.3973 11.938 8.2143 13.524 15.077 1.8591 8.0439-0.44817 15.706-7.1588 21.121-6.7633 5.4572-14.417 6.8794-22.578 3.1483-8.2972-3.7933-12.836-10.849-12.736-19.438 0.1687-14.497 14.13-25.368 28.948-19.908z",fill:"#EEC170"}),l.jsx("path",{d:"m261.57 319.07c-2.495-14.418 4.6853-22.603 14.596-26.108 9.8945-3.4995 23.181 3.4303 26.267 13.779 4.6504 15.591-7.1651 29.064-21.665 28.161-8.5254-0.53088-17.202-6.5094-19.198-15.831z",fill:"#EEC170"}),l.jsx("path",{d:"m336.91 333.41c-9.0175-4.2491-15.337-14.349-13.829-21.682 3.0825-14.989 13.341-20.304 23.018-19.585 10.653 0.79141 17.93 7.407 19.765 17.547 1.9588 10.824-4.1171 19.939-13.494 23.703-5.272 2.1162-10.091 1.5086-15.46 0.017883z",fill:"#EEC170"}),i&&l.jsx("text",{x:"550",y:"355",fontFamily:"Arial, Helvetica, sans-serif",fontWeight:"700",fontSize:"290",letterSpacing:"-7",fill:s,children:"AliasVault"})]});var Iy=Object.prototype.hasOwnProperty;function Vf(n,e){var a,i;if(n===e)return!0;if(n&&e&&(a=n.constructor)===e.constructor){if(a===Date)return n.getTime()===e.getTime();if(a===RegExp)return n.toString()===e.toString();if(a===Array){if((i=n.length)===e.length)for(;i--&&Vf(n[i],e[i]););return i===-1}if(!a||typeof n=="object"){i=0;for(a in n)if(Iy.call(n,a)&&++i&&!Iy.call(e,a)||!(a in e)||!Vf(n[a],e[a]))return!1;return Object.keys(e).length===i}}return n!==n&&e!==e}const nx=new Error("request for lock canceled");var rx=function(n,e,a,i){function s(c){return c instanceof a?c:new a(function(d){d(c)})}return new(a||(a=Promise))(function(c,d){function m(E){try{g(i.next(E))}catch(p){d(p)}}function f(E){try{g(i.throw(E))}catch(p){d(p)}}function g(E){E.done?c(E.value):s(E.value).then(m,f)}g((i=i.apply(n,e||[])).next())})};class ix{constructor(e,a=nx){this._value=e,this._cancelError=a,this._queue=[],this._weightedWaiters=[]}acquire(e=1,a=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((i,s)=>{const c={resolve:i,reject:s,weight:e,priority:a},d=Wb(this._queue,m=>a<=m.priority);d===-1&&e<=this._value?this._dispatchItem(c):this._queue.splice(d+1,0,c)})}runExclusive(e){return rx(this,arguments,void 0,function*(a,i=1,s=0){const[c,d]=yield this.acquire(i,s);try{return yield a(c)}finally{d()}})}waitForUnlock(e=1,a=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,a)?Promise.resolve():new Promise(i=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),sx(this._weightedWaiters[e-1],{resolve:i,priority:a})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.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(e){const a=this._value;this._value-=e.weight,e.resolve([a,this._newReleaser(e.weight)])}_newReleaser(e){let a=!1;return()=>{a||(a=!0,this.release(e))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let e=this._value;e>0;e--){const a=this._weightedWaiters[e-1];a&&(a.forEach(i=>i.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let a=this._value;a>0;a--){const i=this._weightedWaiters[a-1];if(!i)continue;const s=i.findIndex(c=>c.priority<=e);(s===-1?i:i.splice(0,s)).forEach(c=>c.resolve())}}}_couldLockImmediately(e,a){return(this._queue.length===0||this._queue[0].priority<a)&&e<=this._value}}function sx(n,e){const a=Wb(n,i=>e.priority<=i.priority);n.splice(a+1,0,e)}function Wb(n,e){for(let a=n.length-1;a>=0;a--)if(e(n[a]))return a;return-1}var ox=function(n,e,a,i){function s(c){return c instanceof a?c:new a(function(d){d(c)})}return new(a||(a=Promise))(function(c,d){function m(E){try{g(i.next(E))}catch(p){d(p)}}function f(E){try{g(i.throw(E))}catch(p){d(p)}}function g(E){E.done?c(E.value):s(E.value).then(m,f)}g((i=i.apply(n,e||[])).next())})};class lx{constructor(e){this._semaphore=new ix(1,e)}acquire(){return ox(this,arguments,void 0,function*(e=0){const[,a]=yield this._semaphore.acquire(1,e);return a})}runExclusive(e,a=0){return this._semaphore.runExclusive(()=>e(),1,a)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}var fb,hb;const _u=((hb=(fb=globalThis.browser)==null?void 0:fb.runtime)==null?void 0:hb.id)==null?globalThis.chrome:globalThis.browser,Se=cx();function cx(){const n={local:hu("local"),session:hu("session"),sync:hu("sync"),managed:hu("managed")},e=S=>{const T=n[S];if(T==null){const k=Object.keys(n).join(", ");throw Error(`Invalid area "${S}". Options: ${k}`)}return T},a=S=>{const T=S.indexOf(":"),k=S.substring(0,T),U=S.substring(T+1);if(U==null)throw Error(`Storage key should be in the form of "area:key", but received "${S}"`);return{driverArea:k,driverKey:U,driver:e(k)}},i=S=>S+"$",s=(S,T)=>{const k={...S};return Object.entries(T).forEach(([U,R])=>{R==null?delete k[U]:k[U]=R}),k},c=(S,T)=>S??T??null,d=S=>typeof S=="object"&&!Array.isArray(S)?S:{},m=async(S,T,k)=>{const U=await S.getItem(T);return c(U,(k==null?void 0:k.fallback)??(k==null?void 0:k.defaultValue))},f=async(S,T)=>{const k=i(T),U=await S.getItem(k);return d(U)},g=async(S,T,k)=>{await S.setItem(T,k??null)},E=async(S,T,k)=>{const U=i(T),R=d(await S.getItem(U));await S.setItem(U,s(R,k))},p=async(S,T,k)=>{if(await S.removeItem(T),k!=null&&k.removeMeta){const U=i(T);await S.removeItem(U)}},C=async(S,T,k)=>{const U=i(T);if(k==null)await S.removeItem(U);else{const R=d(await S.getItem(U));[k].flat().forEach(P=>delete R[P]),await S.setItem(U,R)}},N=(S,T,k)=>S.watch(T,k);return{getItem:async(S,T)=>{const{driver:k,driverKey:U}=a(S);return await m(k,U,T)},getItems:async S=>{const T=new Map,k=new Map,U=[];S.forEach(P=>{let M,j;typeof P=="string"?M=P:"getValue"in P?(M=P.key,j={fallback:P.fallback}):(M=P.key,j=P.options),U.push(M);const{driverArea:Q,driverKey:H}=a(M),V=T.get(Q)??[];T.set(Q,V.concat(H)),k.set(M,j)});const R=new Map;return await Promise.all(Array.from(T.entries()).map(async([P,M])=>{(await n[P].getItems(M)).forEach(Q=>{const H=`${P}:${Q.key}`,V=k.get(H),G=c(Q.value,(V==null?void 0:V.fallback)??(V==null?void 0:V.defaultValue));R.set(H,G)})})),U.map(P=>({key:P,value:R.get(P)}))},getMeta:async S=>{const{driver:T,driverKey:k}=a(S);return await f(T,k)},getMetas:async S=>{const T=S.map(R=>{const P=typeof R=="string"?R:R.key,{driverArea:M,driverKey:j}=a(P);return{key:P,driverArea:M,driverKey:j,driverMetaKey:i(j)}}),k=T.reduce((R,P)=>{var M;return R[M=P.driverArea]??(R[M]=[]),R[P.driverArea].push(P),R},{}),U={};return await Promise.all(Object.entries(k).map(async([R,P])=>{const M=await _u.storage[R].get(P.map(j=>j.driverMetaKey));P.forEach(j=>{U[j.key]=M[j.driverMetaKey]??{}})})),T.map(R=>({key:R.key,meta:U[R.key]}))},setItem:async(S,T)=>{const{driver:k,driverKey:U}=a(S);await g(k,U,T)},setItems:async S=>{const T={};S.forEach(k=>{const{driverArea:U,driverKey:R}=a("key"in k?k.key:k.item.key);T[U]??(T[U]=[]),T[U].push({key:R,value:k.value})}),await Promise.all(Object.entries(T).map(async([k,U])=>{await e(k).setItems(U)}))},setMeta:async(S,T)=>{const{driver:k,driverKey:U}=a(S);await E(k,U,T)},setMetas:async S=>{const T={};S.forEach(k=>{const{driverArea:U,driverKey:R}=a("key"in k?k.key:k.item.key);T[U]??(T[U]=[]),T[U].push({key:R,properties:k.meta})}),await Promise.all(Object.entries(T).map(async([k,U])=>{const R=e(k),P=U.map(({key:H})=>i(H));console.log(k,P);const M=await R.getItems(P),j=Object.fromEntries(M.map(({key:H,value:V})=>[H,d(V)])),Q=U.map(({key:H,properties:V})=>{const G=i(H);return{key:G,value:s(j[G]??{},V)}});await R.setItems(Q)}))},removeItem:async(S,T)=>{const{driver:k,driverKey:U}=a(S);await p(k,U,T)},removeItems:async S=>{const T={};S.forEach(k=>{let U,R;typeof k=="string"?U=k:"getValue"in k?U=k.key:"item"in k?(U=k.item.key,R=k.options):(U=k.key,R=k.options);const{driverArea:P,driverKey:M}=a(U);T[P]??(T[P]=[]),T[P].push(M),R!=null&&R.removeMeta&&T[P].push(i(M))}),await Promise.all(Object.entries(T).map(async([k,U])=>{await e(k).removeItems(U)}))},clear:async S=>{await e(S).clear()},removeMeta:async(S,T)=>{const{driver:k,driverKey:U}=a(S);await C(k,U,T)},snapshot:async(S,T)=>{var R;const U=await e(S).snapshot();return(R=T==null?void 0:T.excludeKeys)==null||R.forEach(P=>{delete U[P],delete U[i(P)]}),U},restoreSnapshot:async(S,T)=>{await e(S).restoreSnapshot(T)},watch:(S,T)=>{const{driver:k,driverKey:U}=a(S);return N(k,U,T)},unwatch(){Object.values(n).forEach(S=>{S.unwatch()})},defineItem:(S,T)=>{const{driver:k,driverKey:U}=a(S),{version:R=1,migrations:P={}}=T??{};if(R<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const M=async()=>{var X;const G=i(U),[{value:K},{value:$}]=await k.getItems([U,G]);if(K==null)return;const J=($==null?void 0:$.v)??1;if(J>R)throw Error(`Version downgrade detected (v${J} -> v${R}) for "${S}"`);if(J===R)return;console.debug(`[@wxt-dev/storage] Running storage migration for ${S}: v${J} -> v${R}`);const re=Array.from({length:R-J},(ie,ce)=>J+ce+1);let Ae=K;for(const ie of re)try{Ae=await((X=P==null?void 0:P[ie])==null?void 0:X.call(P,Ae))??Ae}catch(ce){throw new ux(S,ie,{cause:ce})}await k.setItems([{key:U,value:Ae},{key:G,value:{...$,v:R}}]),console.debug(`[@wxt-dev/storage] Storage migration completed for ${S} v${R}`,{migratedValue:Ae})},j=(T==null?void 0:T.migrations)==null?Promise.resolve():M().catch(G=>{console.error(`[@wxt-dev/storage] Migration failed for ${S}`,G)}),Q=new lx,H=()=>(T==null?void 0:T.fallback)??(T==null?void 0:T.defaultValue)??null,V=()=>Q.runExclusive(async()=>{const G=await k.getItem(U);if(G!=null||(T==null?void 0:T.init)==null)return G;const K=await T.init();return await k.setItem(U,K),K});return j.then(V),{key:S,get defaultValue(){return H()},get fallback(){return H()},getValue:async()=>(await j,T!=null&&T.init?await V():await m(k,U,T)),getMeta:async()=>(await j,await f(k,U)),setValue:async G=>(await j,await g(k,U,G)),setMeta:async G=>(await j,await E(k,U,G)),removeValue:async G=>(await j,await p(k,U,G)),removeMeta:async G=>(await j,await C(k,U,G)),watch:G=>N(k,U,(K,$)=>G(K??H(),$??H())),migrate:M}}}}function hu(n){const e=()=>{if(_u.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(_u.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const i=_u.storage[n];if(i==null)throw Error(`"browser.storage.${n}" is undefined`);return i},a=new Set;return{getItem:async i=>(await e().get(i))[i],getItems:async i=>{const s=await e().get(i);return i.map(c=>({key:c,value:s[c]??null}))},setItem:async(i,s)=>{s==null?await e().remove(i):await e().set({[i]:s})},setItems:async i=>{const s=i.reduce((c,{key:d,value:m})=>(c[d]=m,c),{});await e().set(s)},removeItem:async i=>{await e().remove(i)},removeItems:async i=>{await e().remove(i)},clear:async()=>{await e().clear()},snapshot:async()=>await e().get(),restoreSnapshot:async i=>{await e().set(i)},watch(i,s){const c=d=>{const m=d[i];m!=null&&(Vf(m.newValue,m.oldValue)||s(m.newValue??null,m.oldValue??null))};return e().onChanged.addListener(c),a.add(c),()=>{e().onChanged.removeListener(c),a.delete(c)}},unwatch(){a.forEach(i=>{e().onChanged.removeListener(i)}),a.clear()}}}class ux extends Error{constructor(e,a,i){super(`v${a} migration failed for "${e}"`,i),this.key=e,this.version=a}}var Pg={exports:{}};const dx={},mx=Object.freeze(Object.defineProperty({__proto__:null,default:dx},Symbol.toStringTag,{value:"Module"})),vy=TN(mx);var Ny;function gx(){return Ny||(Ny=1,function(n,e){var a=void 0,i=function(s){return a||(a=new Promise(function(c,d){var m=typeof s<"u"?s:{},f=m.onAbort;m.onAbort=function(A){d(new Error(A)),f&&f(A)},m.postRun=m.postRun||[],m.postRun.push(function(){c(m)}),n=void 0;var g;g||(g=typeof m<"u"?m:{});var E=typeof window=="object",p=typeof WorkerGlobalScope<"u",C=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";g.onRuntimeInitialized=function(){function A(ue,Le){switch(typeof Le){case"boolean":Fd(ue,Le?1:0);break;case"number":Ud(ue,Le);break;case"string":Md(ue,Le,-1,-1);break;case"object":if(Le===null)dc(ue);else if(Le.length!=null){var Ge=gi(Le,$i);_d(ue,Ge,Le.length,-1),hi(Ge)}else pi(ue,"Wrong API use : tried to return a value of an unknown type ("+Le+").",-1);break;default:dc(ue)}}function b(ue,Le){for(var Ge=[],at=0;at<ue;at+=1){var ot=Ut(Le+4*at,"i32"),zt=uc(ot);if(zt===1||zt===2)ot=Bd(ot);else if(zt===3)ot=Rd(ot);else if(zt===4){zt=ot,ot=Ld(zt),zt=Dd(zt);for(var Tn=new Uint8Array(ot),En=0;En<ot;En+=1)Tn[En]=G[zt+En];ot=Tn}else ot=null;Ge.push(ot)}return Ge}function D(ue,Le){this.Qa=ue,this.db=Le,this.Oa=1,this.lb=[]}function O(ue,Le){if(this.db=Le,Le=ia(ue)+1,this.eb=Rs(Le),this.eb===null)throw Error("Unable to allocate memory for the SQL string");B(ue,K,this.eb,Le),this.kb=this.eb,this.Za=this.pb=null}function Y(ue){if(this.filename="dbfile_"+(4294967295*Math.random()>>>0),ue!=null){var Le=this.filename,Ge="/",at=Le;if(Ge&&(Ge=typeof Ge=="string"?Ge:nr(Ge),at=Le?je(Ge+"/"+Le):Ge),Le=gt(!0,!0),at=Z(at,Le),ue){if(typeof ue=="string"){Ge=Array(ue.length);for(var ot=0,zt=ue.length;ot<zt;++ot)Ge[ot]=ue.charCodeAt(ot);ue=Ge}Ca(at,Le|146),Ge=aa(at,577),rc(Ge,ue,0,ue.length,0),Sn(Ge),Ca(at,Le)}}this.handleError(Ve(this.filename,de)),this.db=Ut(de,"i32"),mc(this.db),this.fb={},this.Sa={}}var de=Qn(4),Ee=g.cwrap,Ve=Ee("sqlite3_open","number",["string","number"]),Et=Ee("sqlite3_close_v2","number",["number"]),ft=Ee("sqlite3_exec","number",["number","string","number","number","number"]),ma=Ee("sqlite3_changes","number",["number"]),Qa=Ee("sqlite3_prepare_v2","number",["number","string","number","number","number"]),Ds=Ee("sqlite3_sql","string",["number"]),Zi=Ee("sqlite3_normalized_sql","string",["number"]),es=Ee("sqlite3_prepare_v2","number",["number","number","number","number","number"]),oc=Ee("sqlite3_bind_text","number",["number","number","number","number","number"]),lc=Ee("sqlite3_bind_blob","number",["number","number","number","number","number"]),pd=Ee("sqlite3_bind_double","number",["number","number","number"]),yd=Ee("sqlite3_bind_int","number",["number","number","number"]),Ro=Ee("sqlite3_bind_parameter_index","number",["number","string"]),Ed=Ee("sqlite3_step","number",["number"]),bd=Ee("sqlite3_errmsg","string",["number"]),Id=Ee("sqlite3_column_count","number",["number"]),vd=Ee("sqlite3_data_count","number",["number"]),Nd=Ee("sqlite3_column_double","number",["number","number"]),Do=Ee("sqlite3_column_text","string",["number","number"]),Cd=Ee("sqlite3_column_blob","number",["number","number"]),wd=Ee("sqlite3_column_bytes","number",["number","number"]),xd=Ee("sqlite3_column_type","number",["number","number"]),Sd=Ee("sqlite3_column_name","string",["number","number"]),Bo=Ee("sqlite3_reset","number",["number"]),Td=Ee("sqlite3_clear_bindings","number",["number"]),kd=Ee("sqlite3_finalize","number",["number"]),cc=Ee("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),uc=Ee("sqlite3_value_type","number",["number"]),Ld=Ee("sqlite3_value_bytes","number",["number"]),Rd=Ee("sqlite3_value_text","string",["number"]),Dd=Ee("sqlite3_value_blob","number",["number"]),Bd=Ee("sqlite3_value_double","number",["number"]),Ud=Ee("sqlite3_result_double","",["number","number"]),dc=Ee("sqlite3_result_null","",["number"]),Md=Ee("sqlite3_result_text","",["number","string","number","number"]),_d=Ee("sqlite3_result_blob","",["number","number","number","number"]),Fd=Ee("sqlite3_result_int","",["number","number"]),pi=Ee("sqlite3_result_error","",["number","string","number"]),yi=Ee("sqlite3_aggregate_context","number",["number","number"]),mc=Ee("RegisterExtensionFunctions","number",["number"]),Uo=Ee("sqlite3_update_hook","number",["number","number","number"]);D.prototype.bind=function(ue){if(!this.Qa)throw"Statement closed";return this.reset(),Array.isArray(ue)?this.Cb(ue):ue!=null&&typeof ue=="object"?this.Db(ue):!0},D.prototype.step=function(){if(!this.Qa)throw"Statement closed";this.Oa=1;var ue=Ed(this.Qa);switch(ue){case 100:return!0;case 101:return!1;default:throw this.db.handleError(ue)}},D.prototype.wb=function(ue){return ue==null&&(ue=this.Oa,this.Oa+=1),Nd(this.Qa,ue)},D.prototype.Gb=function(ue){if(ue==null&&(ue=this.Oa,this.Oa+=1),ue=Do(this.Qa,ue),typeof BigInt!="function")throw Error("BigInt is not supported");return BigInt(ue)},D.prototype.Hb=function(ue){return ue==null&&(ue=this.Oa,this.Oa+=1),Do(this.Qa,ue)},D.prototype.getBlob=function(ue){ue==null&&(ue=this.Oa,this.Oa+=1);var Le=wd(this.Qa,ue);ue=Cd(this.Qa,ue);for(var Ge=new Uint8Array(Le),at=0;at<Le;at+=1)Ge[at]=G[ue+at];return Ge},D.prototype.get=function(ue,Le){Le=Le||{},ue!=null&&this.bind(ue)&&this.step(),ue=[];for(var Ge=vd(this.Qa),at=0;at<Ge;at+=1)switch(xd(this.Qa,at)){case 1:var ot=Le.useBigInt?this.Gb(at):this.wb(at);ue.push(ot);break;case 2:ue.push(this.wb(at));break;case 3:ue.push(this.Hb(at));break;case 4:ue.push(this.getBlob(at));break;default:ue.push(null)}return ue},D.prototype.getColumnNames=function(){for(var ue=[],Le=Id(this.Qa),Ge=0;Ge<Le;Ge+=1)ue.push(Sd(this.Qa,Ge));return ue},D.prototype.getAsObject=function(ue,Le){ue=this.get(ue,Le),Le=this.getColumnNames();for(var Ge={},at=0;at<Le.length;at+=1)Ge[Le[at]]=ue[at];return Ge},D.prototype.getSQL=function(){return Ds(this.Qa)},D.prototype.getNormalizedSQL=function(){return Zi(this.Qa)},D.prototype.run=function(ue){return ue!=null&&this.bind(ue),this.step(),this.reset()},D.prototype.sb=function(ue,Le){Le==null&&(Le=this.Oa,this.Oa+=1),ue=v(ue);var Ge=gi(ue,$i);this.lb.push(Ge),this.db.handleError(oc(this.Qa,Le,Ge,ue.length-1,0))},D.prototype.Bb=function(ue,Le){Le==null&&(Le=this.Oa,this.Oa+=1);var Ge=gi(ue,$i);this.lb.push(Ge),this.db.handleError(lc(this.Qa,Le,Ge,ue.length,0))},D.prototype.rb=function(ue,Le){Le==null&&(Le=this.Oa,this.Oa+=1),this.db.handleError((ue===(ue|0)?yd:pd)(this.Qa,Le,ue))},D.prototype.Eb=function(ue){ue==null&&(ue=this.Oa,this.Oa+=1),lc(this.Qa,ue,0,0,0)},D.prototype.tb=function(ue,Le){switch(Le==null&&(Le=this.Oa,this.Oa+=1),typeof ue){case"string":this.sb(ue,Le);return;case"number":this.rb(ue,Le);return;case"bigint":this.sb(ue.toString(),Le);return;case"boolean":this.rb(ue+0,Le);return;case"object":if(ue===null){this.Eb(Le);return}if(ue.length!=null){this.Bb(ue,Le);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+ue+")."},D.prototype.Db=function(ue){var Le=this;return Object.keys(ue).forEach(function(Ge){var at=Ro(Le.Qa,Ge);at!==0&&Le.tb(ue[Ge],at)}),!0},D.prototype.Cb=function(ue){for(var Le=0;Le<ue.length;Le+=1)this.tb(ue[Le],Le+1);return!0},D.prototype.reset=function(){return this.freemem(),Td(this.Qa)===0&&Bo(this.Qa)===0},D.prototype.freemem=function(){for(var ue;(ue=this.lb.pop())!==void 0;)hi(ue)},D.prototype.free=function(){this.freemem();var ue=kd(this.Qa)===0;return delete this.db.fb[this.Qa],this.Qa=0,ue},O.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 ue=ir(),Le=Qn(4);nt(de),nt(Le);try{this.db.handleError(es(this.db.db,this.kb,-1,de,Le)),this.kb=Ut(Le,"i32");var Ge=Ut(de,"i32");return Ge===0?(this.mb(),{done:!0}):(this.Za=new D(Ge,this.db),this.db.fb[Ge]=this.Za,{value:this.Za,done:!1})}catch(at){throw this.pb=se(this.kb),this.mb(),at}finally{dn(ue)}},O.prototype.mb=function(){hi(this.eb),this.eb=null},O.prototype.getRemainingSQL=function(){return this.pb!==null?this.pb:se(this.kb)},typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"&&(O.prototype[Symbol.iterator]=function(){return this}),Y.prototype.run=function(ue,Le){if(!this.db)throw"Database closed";if(Le){ue=this.prepare(ue,Le);try{ue.step()}finally{ue.free()}}else this.handleError(ft(this.db,ue,0,0,de));return this},Y.prototype.exec=function(ue,Le,Ge){if(!this.db)throw"Database closed";var at=ir(),ot=null;try{var zt=To(ue),Tn=Qn(4);for(ue=[];Ut(zt,"i8")!==0;){nt(de),nt(Tn),this.handleError(es(this.db,zt,-1,de,Tn));var En=Ut(de,"i32");if(zt=Ut(Tn,"i32"),En!==0){var rn=null;for(ot=new D(En,this),Le!=null&&ot.bind(Le);ot.step();)rn===null&&(rn={columns:ot.getColumnNames(),values:[]},ue.push(rn)),rn.values.push(ot.get(null,Ge));ot.free()}}return ue}catch(bn){throw ot&&ot.free(),bn}finally{dn(at)}},Y.prototype.each=function(ue,Le,Ge,at,ot){typeof Le=="function"&&(at=Ge,Ge=Le,Le=void 0),ue=this.prepare(ue,Le);try{for(;ue.step();)Ge(ue.getAsObject(null,ot))}finally{ue.free()}if(typeof at=="function")return at()},Y.prototype.prepare=function(ue,Le){if(nt(de),this.handleError(Qa(this.db,ue,-1,de,0)),ue=Ut(de,"i32"),ue===0)throw"Nothing to prepare";var Ge=new D(ue,this);return Le!=null&&Ge.bind(Le),this.fb[ue]=Ge},Y.prototype.iterateStatements=function(ue){return new O(ue,this)},Y.prototype.export=function(){Object.values(this.fb).forEach(function(Le){Le.free()}),Object.values(this.Sa).forEach(zn),this.Sa={},this.handleError(Et(this.db));var ue=ic(this.filename);return this.handleError(Ve(this.filename,de)),this.db=Ut(de,"i32"),mc(this.db),ue},Y.prototype.close=function(){this.db!==null&&(Object.values(this.fb).forEach(function(ue){ue.free()}),Object.values(this.Sa).forEach(zn),this.Sa={},this.Ya&&(zn(this.Ya),this.Ya=void 0),this.handleError(Et(this.db)),ca("/"+this.filename),this.db=null)},Y.prototype.handleError=function(ue){if(ue===0)return null;throw ue=bd(this.db),Error(ue)},Y.prototype.getRowsModified=function(){return ma(this.db)},Y.prototype.create_function=function(ue,Le){Object.prototype.hasOwnProperty.call(this.Sa,ue)&&(zn(this.Sa[ue]),delete this.Sa[ue]);var Ge=Pr(function(at,ot,zt){ot=b(ot,zt);try{var Tn=Le.apply(null,ot)}catch(En){pi(at,En,-1);return}A(at,Tn)},"viii");return this.Sa[ue]=Ge,this.handleError(cc(this.db,ue,Le.length,1,0,Ge,0,0,0)),this},Y.prototype.create_aggregate=function(ue,Le){var Ge=Le.init||function(){return null},at=Le.finalize||function(rn){return rn},ot=Le.step;if(!ot)throw"An aggregate function must have a step function in "+ue;var zt={};Object.hasOwnProperty.call(this.Sa,ue)&&(zn(this.Sa[ue]),delete this.Sa[ue]),Le=ue+"__finalize",Object.hasOwnProperty.call(this.Sa,Le)&&(zn(this.Sa[Le]),delete this.Sa[Le]);var Tn=Pr(function(rn,bn,Hr){var kn=yi(rn,1);Object.hasOwnProperty.call(zt,kn)||(zt[kn]=Ge()),bn=b(bn,Hr),bn=[zt[kn]].concat(bn);try{zt[kn]=ot.apply(null,bn)}catch(Od){delete zt[kn],pi(rn,Od,-1)}},"viii"),En=Pr(function(rn){var bn=yi(rn,1);try{var Hr=at(zt[bn])}catch(kn){delete zt[bn],pi(rn,kn,-1);return}A(rn,Hr),delete zt[bn]},"vi");return this.Sa[ue]=Tn,this.Sa[Le]=En,this.handleError(cc(this.db,ue,ot.length-1,1,0,0,Tn,En,0)),this},Y.prototype.updateHook=function(ue){this.Ya&&(Uo(this.db,0,0),zn(this.Ya),this.Ya=void 0),ue&&(this.Ya=Pr(function(Le,Ge,at,ot,zt){switch(Ge){case 18:Le="insert";break;case 23:Le="update";break;case 9:Le="delete";break;default:throw"unknown operationCode in updateHook callback: "+Ge}if(at=at?Ne(K,at):"",ot=ot?Ne(K,ot):"",zt>Number.MAX_SAFE_INTEGER)throw"rowId too big to fit inside a Number";ue(Le,at,ot,Number(zt))},"viiiij"),Uo(this.db,this.Ya,0))},g.Database=Y};var N={...g},x="./this.program",S=(A,b)=>{throw b},T="",k,U;if(C){var R=vy;T=__dirname+"/",U=A=>(A=ce(A)?new URL(A):A,R.readFileSync(A)),k=async A=>(A=ce(A)?new URL(A):A,R.readFileSync(A,void 0)),!g.thisProgram&&1<process.argv.length&&(x=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),n.exports=g,S=(A,b)=>{throw process.exitCode=A,b}}else(E||p)&&(p?T=self.location.href:typeof document<"u"&&document.currentScript&&(T=document.currentScript.src),T=T.startsWith("blob:")?"":T.slice(0,T.replace(/[?#].*/,"").lastIndexOf("/")+1),p&&(U=A=>{var b=new XMLHttpRequest;return b.open("GET",A,!1),b.responseType="arraybuffer",b.send(null),new Uint8Array(b.response)}),k=async A=>{if(ce(A))return new Promise((D,O)=>{var Y=new XMLHttpRequest;Y.open("GET",A,!0),Y.responseType="arraybuffer",Y.onload=()=>{Y.status==200||Y.status==0&&Y.response?D(Y.response):O(Y.status)},Y.onerror=O,Y.send(null)});var b=await fetch(A,{credentials:"same-origin"});if(b.ok)return b.arrayBuffer();throw Error(b.status+" : "+b.url)});var P=g.print||console.log.bind(console),M=g.printErr||console.error.bind(console);Object.assign(g,N),N=null,g.thisProgram&&(x=g.thisProgram);var j=g.wasmBinary,Q,H=!1,V,G,K,$,J,re,Ae,X,ie,ce=A=>A.startsWith("file://");function ye(){var A=Q.buffer;g.HEAP8=G=new Int8Array(A),g.HEAP16=$=new Int16Array(A),g.HEAPU8=K=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAP32=J=new Int32Array(A),g.HEAPU32=re=new Uint32Array(A),g.HEAPF32=Ae=new Float32Array(A),g.HEAPF64=ie=new Float64Array(A),g.HEAP64=X=new BigInt64Array(A),g.HEAPU64=new BigUint64Array(A)}var _=0,q=null;function ee(A){var b;throw(b=g.onAbort)==null||b.call(g,A),A="Aborted("+A+")",M(A),H=!0,new WebAssembly.RuntimeError(A+". Build with -sASSERTIONS for more info.")}var ne;async function Ie(A){if(!j)try{var b=await k(A);return new Uint8Array(b)}catch{}if(A==ne&&j)A=new Uint8Array(j);else if(U)A=U(A);else throw"both async and sync fetching of the wasm failed";return A}async function we(A,b){try{var D=await Ie(A);return await WebAssembly.instantiate(D,b)}catch(O){M(`failed to asynchronously prepare wasm: ${O}`),ee(O)}}async function Re(A){var b=ne;if(!j&&typeof WebAssembly.instantiateStreaming=="function"&&!ce(b)&&!C)try{var D=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(D,A)}catch(O){M(`wasm streaming compile failed: ${O}`),M("falling back to ArrayBuffer instantiation")}return we(b,A)}class Be{constructor(b){qe(this,"name","ExitStatus");this.message=`Program terminated with exit(${b})`,this.status=b}}var xe=A=>{for(;0<A.length;)A.shift()(g)},ze=[],At=[],Lt=()=>{var A=g.preRun.shift();At.unshift(A)};function Ut(A,b="i8"){switch(b.endsWith("*")&&(b="*"),b){case"i1":return G[A];case"i8":return G[A];case"i16":return $[A>>1];case"i32":return J[A>>2];case"i64":return X[A>>3];case"float":return Ae[A>>2];case"double":return ie[A>>3];case"*":return re[A>>2];default:ee(`invalid type for getValue: ${b}`)}}var et=g.noExitRuntime||!0;function nt(A){var b="i32";switch(b.endsWith("*")&&(b="*"),b){case"i1":G[A]=0;break;case"i8":G[A]=0;break;case"i16":$[A>>1]=0;break;case"i32":J[A>>2]=0;break;case"i64":X[A>>3]=BigInt(0);break;case"float":Ae[A>>2]=0;break;case"double":ie[A>>3]=0;break;case"*":re[A>>2]=0;break;default:ee(`invalid type for setValue: ${b}`)}}var Pt=typeof TextDecoder<"u"?new TextDecoder:void 0,Ne=(A,b=0,D=NaN)=>{var O=b+D;for(D=b;A[D]&&!(D>=O);)++D;if(16<D-b&&A.buffer&&Pt)return Pt.decode(A.subarray(b,D));for(O="";b<D;){var Y=A[b++];if(Y&128){var de=A[b++]&63;if((Y&224)==192)O+=String.fromCharCode((Y&31)<<6|de);else{var Ee=A[b++]&63;Y=(Y&240)==224?(Y&15)<<12|de<<6|Ee:(Y&7)<<18|de<<12|Ee<<6|A[b++]&63,65536>Y?O+=String.fromCharCode(Y):(Y-=65536,O+=String.fromCharCode(55296|Y>>10,56320|Y&1023))}}else O+=String.fromCharCode(Y)}return O},se=(A,b)=>A?Ne(K,A,b):"",De=(A,b)=>{for(var D=0,O=A.length-1;0<=O;O--){var Y=A[O];Y==="."?A.splice(O,1):Y===".."?(A.splice(O,1),D++):D&&(A.splice(O,1),D--)}if(b)for(;D;D--)A.unshift("..");return A},je=A=>{var b=A.charAt(0)==="/",D=A.slice(-1)==="/";return(A=De(A.split("/").filter(O=>!!O),!b).join("/"))||b||(A="."),A&&D&&(A+="/"),(b?"/":"")+A},Qe=A=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(A).slice(1);return A=b[0],b=b[1],!A&&!b?".":(b&&(b=b.slice(0,-1)),A+b)},Ye=A=>A&&A.match(/([^\/]+|\/)\/*$/)[1],ut=()=>{if(C){var A=vy;return b=>A.randomFillSync(b)}return b=>crypto.getRandomValues(b)},Mt=A=>{(Mt=ut())(A)},jt=(...A)=>{for(var b="",D=!1,O=A.length-1;-1<=O&&!D;O--){if(D=0<=O?A[O]:"/",typeof D!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!D)return"";b=D+"/"+b,D=D.charAt(0)==="/"}return b=De(b.split("/").filter(Y=>!!Y),!D).join("/"),(D?"/":"")+b||"."},Vt=[],ia=A=>{for(var b=0,D=0;D<A.length;++D){var O=A.charCodeAt(D);127>=O?b++:2047>=O?b+=2:55296<=O&&57343>=O?(b+=4,++D):b+=3}return b},B=(A,b,D,O)=>{if(!(0<O))return 0;var Y=D;O=D+O-1;for(var de=0;de<A.length;++de){var Ee=A.charCodeAt(de);if(55296<=Ee&&57343>=Ee){var Ve=A.charCodeAt(++de);Ee=65536+((Ee&1023)<<10)|Ve&1023}if(127>=Ee){if(D>=O)break;b[D++]=Ee}else{if(2047>=Ee){if(D+1>=O)break;b[D++]=192|Ee>>6}else{if(65535>=Ee){if(D+2>=O)break;b[D++]=224|Ee>>12}else{if(D+3>=O)break;b[D++]=240|Ee>>18,b[D++]=128|Ee>>12&63}b[D++]=128|Ee>>6&63}b[D++]=128|Ee&63}}return b[D]=0,D-Y},v=(A,b)=>{var D=Array(ia(A)+1);return A=B(A,D,0,D.length),b&&(D.length=A),D},w=[];function z(A,b){w[A]={input:[],output:[],cb:b},it(A,ae)}var ae={open(A){var b=w[A.node.rdev];if(!b)throw new Oe(43);A.tty=b,A.seekable=!1},close(A){A.tty.cb.fsync(A.tty)},fsync(A){A.tty.cb.fsync(A.tty)},read(A,b,D,O){if(!A.tty||!A.tty.cb.xb)throw new Oe(60);for(var Y=0,de=0;de<O;de++){try{var Ee=A.tty.cb.xb(A.tty)}catch{throw new Oe(29)}if(Ee===void 0&&Y===0)throw new Oe(6);if(Ee==null)break;Y++,b[D+de]=Ee}return Y&&(A.node.atime=Date.now()),Y},write(A,b,D,O){if(!A.tty||!A.tty.cb.qb)throw new Oe(60);try{for(var Y=0;Y<O;Y++)A.tty.cb.qb(A.tty,b[D+Y])}catch{throw new Oe(29)}return O&&(A.node.mtime=A.node.ctime=Date.now()),Y}},he={xb(){e:{if(!Vt.length){var A=null;if(C){var b=Buffer.alloc(256),D=0,O=process.stdin.fd;try{D=R.readSync(O,b,0,256)}catch(Y){if(Y.toString().includes("EOF"))D=0;else throw Y}0<D&&(A=b.slice(0,D).toString("utf-8"))}else typeof window<"u"&&typeof window.prompt=="function"&&(A=window.prompt("Input: "),A!==null&&(A+=`
`));if(!A){A=null;break e}Vt=v(A,!0)}A=Vt.shift()}return A},qb(A,b){b===null||b===10?(P(Ne(A.output)),A.output=[]):b!=0&&A.output.push(b)},fsync(A){var b;0<((b=A.output)==null?void 0:b.length)&&(P(Ne(A.output)),A.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(A,b){b===null||b===10?(M(Ne(A.output)),A.output=[]):b!=0&&A.output.push(b)},fsync(A){var b;0<((b=A.output)==null?void 0:b.length)&&(M(Ne(A.output)),A.output=[])}},Ue={Wa:null,Xa(){return Ue.createNode(null,"/",16895,0)},createNode(A,b,D,O){if((D&61440)===24576||(D&61440)===4096)throw new Oe(63);return Ue.Wa||(Ue.Wa={dir:{node:{Ta:Ue.La.Ta,Ua:Ue.La.Ua,lookup:Ue.La.lookup,hb:Ue.La.hb,rename:Ue.La.rename,unlink:Ue.La.unlink,rmdir:Ue.La.rmdir,readdir:Ue.La.readdir,symlink:Ue.La.symlink},stream:{Va:Ue.Ma.Va}},file:{node:{Ta:Ue.La.Ta,Ua:Ue.La.Ua},stream:{Va:Ue.Ma.Va,read:Ue.Ma.read,write:Ue.Ma.write,ib:Ue.Ma.ib,jb:Ue.Ma.jb}},link:{node:{Ta:Ue.La.Ta,Ua:Ue.La.Ua,readlink:Ue.La.readlink},stream:{}},ub:{node:{Ta:Ue.La.Ta,Ua:Ue.La.Ua},stream:rt}}),D=Ea(A,b,D,O),Jt(D.mode)?(D.La=Ue.Wa.dir.node,D.Ma=Ue.Wa.dir.stream,D.Na={}):(D.mode&61440)===32768?(D.La=Ue.Wa.file.node,D.Ma=Ue.Wa.file.stream,D.Ra=0,D.Na=null):(D.mode&61440)===40960?(D.La=Ue.Wa.link.node,D.Ma=Ue.Wa.link.stream):(D.mode&61440)===8192&&(D.La=Ue.Wa.ub.node,D.Ma=Ue.Wa.ub.stream),D.atime=D.mtime=D.ctime=Date.now(),A&&(A.Na[b]=D,A.atime=A.mtime=A.ctime=D.atime),D},Sb(A){return A.Na?A.Na.subarray?A.Na.subarray(0,A.Ra):new Uint8Array(A.Na):new Uint8Array(0)},La:{Ta(A){var b={};return b.dev=(A.mode&61440)===8192?A.id:1,b.ino=A.id,b.mode=A.mode,b.nlink=1,b.uid=0,b.gid=0,b.rdev=A.rdev,Jt(A.mode)?b.size=4096:(A.mode&61440)===32768?b.size=A.Ra:(A.mode&61440)===40960?b.size=A.link.length:b.size=0,b.atime=new Date(A.atime),b.mtime=new Date(A.mtime),b.ctime=new Date(A.ctime),b.blksize=4096,b.blocks=Math.ceil(b.size/b.blksize),b},Ua(A,b){for(var D of["mode","atime","mtime","ctime"])b[D]!=null&&(A[D]=b[D]);b.size!==void 0&&(b=b.size,A.Ra!=b&&(b==0?(A.Na=null,A.Ra=0):(D=A.Na,A.Na=new Uint8Array(b),D&&A.Na.set(D.subarray(0,Math.min(b,A.Ra))),A.Ra=b)))},lookup(){throw Ue.vb},hb(A,b,D,O){return Ue.createNode(A,b,D,O)},rename(A,b,D){try{var O=qt(b,D)}catch{}if(O){if(Jt(A.mode))for(var Y in O.Na)throw new Oe(55);Ua(O)}delete A.parent.Na[A.name],b.Na[D]=A,A.name=D,b.ctime=b.mtime=A.parent.ctime=A.parent.mtime=Date.now()},unlink(A,b){delete A.Na[b],A.ctime=A.mtime=Date.now()},rmdir(A,b){var D=qt(A,b),O;for(O in D.Na)throw new Oe(55);delete A.Na[b],A.ctime=A.mtime=Date.now()},readdir(A){return[".","..",...Object.keys(A.Na)]},symlink(A,b,D){return A=Ue.createNode(A,b,41471,0),A.link=D,A},readlink(A){if((A.mode&61440)!==40960)throw new Oe(28);return A.link}},Ma:{read(A,b,D,O,Y){var de=A.node.Na;if(Y>=A.node.Ra)return 0;if(A=Math.min(A.node.Ra-Y,O),8<A&&de.subarray)b.set(de.subarray(Y,Y+A),D);else for(O=0;O<A;O++)b[D+O]=de[Y+O];return A},write(A,b,D,O,Y,de){if(b.buffer===G.buffer&&(de=!1),!O)return 0;if(A=A.node,A.mtime=A.ctime=Date.now(),b.subarray&&(!A.Na||A.Na.subarray)){if(de)return A.Na=b.subarray(D,D+O),A.Ra=O;if(A.Ra===0&&Y===0)return A.Na=b.slice(D,D+O),A.Ra=O;if(Y+O<=A.Ra)return A.Na.set(b.subarray(D,D+O),Y),O}de=Y+O;var Ee=A.Na?A.Na.length:0;if(Ee>=de||(de=Math.max(de,Ee*(1048576>Ee?2:1.125)>>>0),Ee!=0&&(de=Math.max(de,256)),Ee=A.Na,A.Na=new Uint8Array(de),0<A.Ra&&A.Na.set(Ee.subarray(0,A.Ra),0)),A.Na.subarray&&b.subarray)A.Na.set(b.subarray(D,D+O),Y);else for(de=0;de<O;de++)A.Na[Y+de]=b[D+de];return A.Ra=Math.max(A.Ra,Y+O),O},Va(A,b,D){if(D===1?b+=A.position:D===2&&(A.node.mode&61440)===32768&&(b+=A.node.Ra),0>b)throw new Oe(28);return b},ib(A,b,D,O,Y){if((A.node.mode&61440)!==32768)throw new Oe(43);if(A=A.node.Na,Y&2||!A||A.buffer!==G.buffer){Y=!0,O=65536*Math.ceil(b/65536);var de=Lo(65536,O);if(de&&K.fill(0,de,de+O),O=de,!O)throw new Oe(48);A&&((0<D||D+b<A.length)&&(A.subarray?A=A.subarray(D,D+b):A=Array.prototype.slice.call(A,D,D+b)),G.set(A,O))}else Y=!1,O=A.byteOffset;return{Kb:O,Ab:Y}},jb(A,b,D,O){return Ue.Ma.write(A,b,0,O,D,!1),0}}},gt=(A,b)=>{var D=0;return A&&(D|=365),b&&(D|=146),D},pt=null,wt={},dt=[],fr=1,sa=null,nn=!1,Pn=!0,Hn={},Oe=class{constructor(A){qe(this,"name","ErrnoError");this.Pa=A}},ui=class{constructor(){qe(this,"gb",{});qe(this,"node",null)}get flags(){return this.gb.flags}set flags(A){this.gb.flags=A}get position(){return this.gb.position}set position(A){this.gb.position=A}},ta=class{constructor(A,b,D,O){qe(this,"La",{});qe(this,"Ma",{});qe(this,"ab",null);A||(A=this),this.parent=A,this.Xa=A.Xa,this.id=fr++,this.name=b,this.mode=D,this.rdev=O,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&365)===365}set read(A){A?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)===146}set write(A){A?this.mode|=146:this.mode&=-147}};function la(A,b={}){if(!A)throw new Oe(44);b.nb??(b.nb=!0),A.charAt(0)==="/"||(A="//"+A);var D=0;e:for(;40>D;D++){A=A.split("/").filter(Ve=>!!Ve);for(var O=pt,Y="/",de=0;de<A.length;de++){var Ee=de===A.length-1;if(Ee&&b.parent)break;if(A[de]!==".")if(A[de]==="..")Y=Qe(Y),O=O.parent;else{Y=je(Y+"/"+A[de]);try{O=qt(O,A[de])}catch(Ve){if((Ve==null?void 0:Ve.Pa)===44&&Ee&&b.Jb)return{path:Y};throw Ve}if(!O.ab||Ee&&!b.nb||(O=O.ab.root),(O.mode&61440)===40960&&(!Ee||b.$a)){if(!O.La.readlink)throw new Oe(52);O=O.La.readlink(O),O.charAt(0)==="/"||(O=Qe(Y)+"/"+O),A=O+"/"+A.slice(de+1).join("/");continue e}}}return{path:Y,node:O}}throw new Oe(32)}function nr(A){for(var b;;){if(A===A.parent)return A=A.Xa.zb,b?A[A.length-1]!=="/"?`${A}/${b}`:A+b:A;b=b?`${A.name}/${b}`:A.name,A=A.parent}}function rr(A,b){for(var D=0,O=0;O<b.length;O++)D=(D<<5)-D+b.charCodeAt(O)|0;return(A+D>>>0)%sa.length}function Ua(A){var b=rr(A.parent.id,A.name);if(sa[b]===A)sa[b]=A.bb;else for(b=sa[b];b;){if(b.bb===A){b.bb=A.bb;break}b=b.bb}}function qt(A,b){var D=Jt(A.mode)?(D=za(A,"x"))?D:A.La.lookup?0:2:54;if(D)throw new Oe(D);for(D=sa[rr(A.id,b)];D;D=D.bb){var O=D.name;if(D.parent.id===A.id&&O===b)return D}return A.La.lookup(A,b)}function Ea(A,b,D,O){return A=new ta(A,b,D,O),b=rr(A.parent.id,A.name),A.bb=sa[b],sa[b]=A}function Jt(A){return(A&61440)===16384}function Ma(A){var b=["r","w","rw"][A&3];return A&512&&(b+="w"),b}function za(A,b){if(Pn)return 0;if(!b.includes("r")||A.mode&292){if(b.includes("w")&&!(A.mode&146)||b.includes("x")&&!(A.mode&73))return 2}else return 2;return 0}function Ur(A,b){if(!Jt(A.mode))return 54;try{return qt(A,b),20}catch{}return za(A,"wx")}function le(A,b,D){try{var O=qt(A,b)}catch(Y){return Y.Pa}if(A=za(A,"wx"))return A;if(D){if(!Jt(O.mode))return 54;if(O===O.parent||nr(O)==="/")return 10}else if(Jt(O.mode))return 31;return 0}function _e(A){if(!A)throw new Oe(63);return A}function Me(A){if(A=dt[A],!A)throw new Oe(8);return A}function Xe(A,b=-1){if(A=Object.assign(new ui,A),b==-1)e:{for(b=0;4096>=b;b++)if(!dt[b])break e;throw new Oe(33)}return A.fd=b,dt[b]=A}function xt(A,b=-1){var D,O;return A=Xe(A,b),(O=(D=A.Ma)==null?void 0:D.Rb)==null||O.call(D,A),A}function yt(A,b,D){var O=A==null?void 0:A.Ma.Ua;A=O?A:b,O??(O=b.La.Ua),_e(O),O(A,D)}var rt={open(A){var b,D;A.Ma=wt[A.node.rdev].Ma,(D=(b=A.Ma).open)==null||D.call(b,A)},Va(){throw new Oe(70)}};function it(A,b){wt[A]={Ma:b}}function un(A,b){var D=b==="/";if(D&&pt)throw new Oe(10);if(!D&&b){var O=la(b,{nb:!1});if(b=O.path,O=O.node,O.ab)throw new Oe(10);if(!Jt(O.mode))throw new Oe(54)}b={type:A,Wb:{},zb:b,Ib:[]},A=A.Xa(b),A.Xa=b,b.root=A,D?pt=A:O&&(O.ab=b,O.Xa&&O.Xa.Ib.push(b))}function Fe(A,b,D){var O=la(A,{parent:!0}).node;if(A=Ye(A),!A)throw new Oe(28);if(A==="."||A==="..")throw new Oe(20);var Y=Ur(O,A);if(Y)throw new Oe(Y);if(!O.La.hb)throw new Oe(63);return O.La.hb(O,A,b,D)}function Z(A,b=438){return Fe(A,b&4095|32768,0)}function Te(A,b=511){return Fe(A,b&1023|16384,0)}function Pe(A,b,D){typeof D>"u"&&(D=b,b=438),Fe(A,b|8192,D)}function Ft(A,b){if(!jt(A))throw new Oe(44);var D=la(b,{parent:!0}).node;if(!D)throw new Oe(44);b=Ye(b);var O=Ur(D,b);if(O)throw new Oe(O);if(!D.La.symlink)throw new Oe(63);D.La.symlink(D,b,A)}function da(A){var b=la(A,{parent:!0}).node;A=Ye(A);var D=qt(b,A),O=le(b,A,!0);if(O)throw new Oe(O);if(!b.La.rmdir)throw new Oe(63);if(D.ab)throw new Oe(10);b.La.rmdir(b,A),Ua(D)}function ca(A){var b=la(A,{parent:!0}).node;if(!b)throw new Oe(44);A=Ye(A);var D=qt(b,A),O=le(b,A,!1);if(O)throw new Oe(O);if(!b.La.unlink)throw new Oe(63);if(D.ab)throw new Oe(10);b.La.unlink(b,A),Ua(D)}function ua(A,b){return A=la(A,{$a:!b}).node,_e(A.La.Ta)(A)}function Wa(A,b,D,O){yt(A,b,{mode:D&4095|b.mode&-4096,ctime:Date.now(),Fb:O})}function Ca(A,b){A=typeof A=="string"?la(A,{$a:!0}).node:A,Wa(null,A,b)}function hr(A,b,D){if(Jt(b.mode))throw new Oe(31);if((b.mode&61440)!==32768)throw new Oe(28);var O=za(b,"w");if(O)throw new Oe(O);yt(A,b,{size:D,timestamp:Date.now()})}function aa(A,b,D=438){if(A==="")throw new Oe(44);if(typeof b=="string"){var O={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if(typeof O>"u")throw Error(`Unknown file open mode: ${b}`);b=O}if(D=b&64?D&4095|32768:0,typeof A=="object")O=A;else{var Y=A.endsWith("/");A=la(A,{$a:!(b&131072),Jb:!0}),O=A.node,A=A.path}var de=!1;if(b&64)if(O){if(b&128)throw new Oe(20)}else{if(Y)throw new Oe(31);O=Fe(A,D|511,0),de=!0}if(!O)throw new Oe(44);if((O.mode&61440)===8192&&(b&=-513),b&65536&&!Jt(O.mode))throw new Oe(54);if(!de&&(Y=O?(O.mode&61440)===40960?32:Jt(O.mode)&&(Ma(b)!=="r"||b&576)?31:za(O,Ma(b)):44))throw new Oe(Y);return b&512&&!de&&(Y=O,Y=typeof Y=="string"?la(Y,{$a:!0}).node:Y,hr(null,Y,0)),b&=-131713,Y=Xe({node:O,path:nr(O),flags:b,seekable:!0,position:0,Ma:O.Ma,Lb:[],error:!1}),Y.Ma.open&&Y.Ma.open(Y),de&&Ca(O,D&511),!g.logReadFiles||b&1||A in Hn||(Hn[A]=1),Y}function Sn(A){if(A.fd===null)throw new Oe(8);A.ob&&(A.ob=null);try{A.Ma.close&&A.Ma.close(A)}catch(b){throw b}finally{dt[A.fd]=null}A.fd=null}function Mr(A,b,D){if(A.fd===null)throw new Oe(8);if(!A.seekable||!A.Ma.Va)throw new Oe(70);if(D!=0&&D!=1&&D!=2)throw new Oe(28);A.position=A.Ma.Va(A,b,D),A.Lb=[]}function Ts(A,b,D,O,Y){if(0>O||0>Y)throw new Oe(28);if(A.fd===null)throw new Oe(8);if((A.flags&2097155)===1)throw new Oe(8);if(Jt(A.node.mode))throw new Oe(31);if(!A.Ma.read)throw new Oe(28);var de=typeof Y<"u";if(!de)Y=A.position;else if(!A.seekable)throw new Oe(70);return b=A.Ma.read(A,b,D,O,Y),de||(A.position+=b),b}function rc(A,b,D,O,Y){if(0>O||0>Y)throw new Oe(28);if(A.fd===null)throw new Oe(8);if((A.flags&2097155)===0)throw new Oe(8);if(Jt(A.node.mode))throw new Oe(31);if(!A.Ma.write)throw new Oe(28);A.seekable&&A.flags&1024&&Mr(A,0,2);var de=typeof Y<"u";if(!de)Y=A.position;else if(!A.seekable)throw new Oe(70);return b=A.Ma.write(A,b,D,O,Y,void 0),de||(A.position+=b),b}function ic(A){var b,D=aa(A,D||0);A=ua(A).size;var O=new Uint8Array(A);return Ts(D,O,0,A,0),b=O,Sn(D),b}function wa(A,b,D){A=je("/dev/"+A);var O=gt(!!b,!!D);wa.yb??(wa.yb=64);var Y=wa.yb++<<8|0;it(Y,{open(de){de.seekable=!1},close(){var de;(de=D==null?void 0:D.buffer)!=null&&de.length&&D(10)},read(de,Ee,Ve,Et){for(var ft=0,ma=0;ma<Et;ma++){try{var Qa=b()}catch{throw new Oe(29)}if(Qa===void 0&&ft===0)throw new Oe(6);if(Qa==null)break;ft++,Ee[Ve+ma]=Qa}return ft&&(de.node.atime=Date.now()),ft},write(de,Ee,Ve,Et){for(var ft=0;ft<Et;ft++)try{D(Ee[Ve+ft])}catch{throw new Oe(29)}return Et&&(de.node.mtime=de.node.ctime=Date.now()),ft}}),Pe(A,O,Y)}var Xt={};function _r(A,b,D){if(b.charAt(0)==="/")return b;if(A=A===-100?"/":Me(A).path,b.length==0){if(!D)throw new Oe(44);return A}return A+"/"+b}function Fr(A,b){J[A>>2]=b.dev,J[A+4>>2]=b.mode,re[A+8>>2]=b.nlink,J[A+12>>2]=b.uid,J[A+16>>2]=b.gid,J[A+20>>2]=b.rdev,X[A+24>>3]=BigInt(b.size),J[A+32>>2]=4096,J[A+36>>2]=b.blocks;var D=b.atime.getTime(),O=b.mtime.getTime(),Y=b.ctime.getTime();return X[A+40>>3]=BigInt(Math.floor(D/1e3)),re[A+48>>2]=D%1e3*1e6,X[A+56>>3]=BigInt(Math.floor(O/1e3)),re[A+64>>2]=O%1e3*1e6,X[A+72>>3]=BigInt(Math.floor(Y/1e3)),re[A+80>>2]=Y%1e3*1e6,X[A+88>>3]=BigInt(b.ino),0}var Xi=void 0,Or=()=>{var A=J[+Xi>>2];return Xi+=4,A},wo=0,pn=[0,31,60,91,121,152,182,213,244,274,305,335],xo=[0,31,59,90,120,151,181,212,243,273,304,334],di={},ks=A=>{var b;V=A,et||0<wo||((b=g.onExit)==null||b.call(g,A),H=!0),S(A,new Be(A))},mi=A=>{if(!H)try{if(A(),!(et||0<wo))try{V=A=V,ks(A)}catch(b){b instanceof Be||b=="unwind"||S(1,b)}}catch(b){b instanceof Be||b=="unwind"||S(1,b)}},Ls={},So=()=>{if(!Ar){var A={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",_:x||"./this.program"},b;for(b in Ls)Ls[b]===void 0?delete A[b]:A[b]=Ls[b];var D=[];for(b in A)D.push(`${b}=${A[b]}`);Ar=D}return Ar},Ar,To=A=>{var b=ia(A)+1,D=Qn(b);return B(A,K,D,b),D},sc=(A,b,D,O)=>{var Y={string:ft=>{var ma=0;return ft!=null&&ft!==0&&(ma=To(ft)),ma},array:ft=>{var ma=Qn(ft.length);return G.set(ft,ma),ma}};A=g["_"+A];var de=[],Ee=0;if(O)for(var Ve=0;Ve<O.length;Ve++){var Et=Y[D[Ve]];Et?(Ee===0&&(Ee=ir()),de[Ve]=Et(O[Ve])):de[Ve]=O[Ve]}return D=A(...de),D=function(ft){return Ee!==0&&dn(Ee),b==="string"?ft?Ne(K,ft):"":b==="boolean"?!!ft:ft}(D)},$i=0,gi=(A,b)=>(b=b==1?Qn(A.length):Rs(A.length),A.subarray||A.slice||(A=new Uint8Array(A)),K.set(A,b),b),jr,ko=[],yn,zn=A=>{jr.delete(yn.get(A)),yn.set(A,null),ko.push(A)},Pr=(A,b)=>{if(!jr){jr=new WeakMap;var D=yn.length;if(jr)for(var O=0;O<0+D;O++){var Y=yn.get(O);Y&&jr.set(Y,O)}}if(D=jr.get(A)||0)return D;if(ko.length)D=ko.pop();else{try{yn.grow(1)}catch(Et){throw Et instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":Et}D=yn.length-1}try{yn.set(D,A)}catch(Et){if(!(Et instanceof TypeError))throw Et;if(typeof WebAssembly.Function=="function"){var de=WebAssembly.Function;O={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},Y={parameters:[],results:b[0]=="v"?[]:[O[b[0]]]};for(var Ee=1;Ee<b.length;++Ee)Y.parameters.push(O[b[Ee]]);b=new de(Y,A)}else{O=[1],Y=b.slice(0,1),b=b.slice(1),Ee={i:127,p:127,j:126,f:125,d:124,e:111},O.push(96);var Ve=b.length;128>Ve?O.push(Ve):O.push(Ve%128|128,Ve>>7);for(de of b)O.push(Ee[de]);Y=="v"?O.push(0):O.push(1,Ee[Y]),b=[0,97,115,109,1,0,0,0,1],de=O.length,128>de?b.push(de):b.push(de%128|128,de>>7),b.push(...O),b.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),b=new WebAssembly.Module(new Uint8Array(b)),b=new WebAssembly.Instance(b,{e:{f:A}}).exports.f}yn.set(D,b)}return jr.set(A,D),D};sa=Array(4096),un(Ue,"/"),Te("/tmp"),Te("/home"),Te("/home/web_user"),function(){Te("/dev"),it(259,{read:()=>0,write:(O,Y,de,Ee)=>Ee,Va:()=>0}),Pe("/dev/null",259),z(1280,he),z(1536,be),Pe("/dev/tty",1280),Pe("/dev/tty1",1536);var A=new Uint8Array(1024),b=0,D=()=>(b===0&&(Mt(A),b=A.byteLength),A[--b]);wa("random",D),wa("urandom",D),Te("/dev/shm"),Te("/dev/shm/tmp")}(),function(){Te("/proc");var A=Te("/proc/self");Te("/proc/self/fd"),un({Xa(){var b=Ea(A,"fd",16895,73);return b.Ma={Va:Ue.Ma.Va},b.La={lookup(D,O){D=+O;var Y=Me(D);return D={parent:null,Xa:{zb:"fake"},La:{readlink:()=>Y.path},id:D+1},D.parent=D},readdir(){return Array.from(dt.entries()).filter(([,D])=>D).map(([D])=>D.toString())}},b}},"/proc/self/fd")}(),Ue.vb=new Oe(44),Ue.vb.stack="<generic error, no stack>";var fi={a:(A,b,D,O)=>ee(`Assertion failed: ${A?Ne(K,A):""}, at: `+[b?b?Ne(K,b):"":"unknown filename",D,O?O?Ne(K,O):"":"unknown function"]),i:function(A,b){try{return A=A?Ne(K,A):"",Ca(A,b),0}catch(D){if(typeof Xt>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},L:function(A,b,D){try{if(b=b?Ne(K,b):"",b=_r(A,b),D&-8)return-28;var O=la(b,{$a:!0}).node;return O?(A="",D&4&&(A+="r"),D&2&&(A+="w"),D&1&&(A+="x"),A&&za(O,A)?-2:0):-44}catch(Y){if(typeof Xt>"u"||Y.name!=="ErrnoError")throw Y;return-Y.Pa}},j:function(A,b){try{var D=Me(A);return Wa(D,D.node,b,!1),0}catch(O){if(typeof Xt>"u"||O.name!=="ErrnoError")throw O;return-O.Pa}},h:function(A){try{var b=Me(A);return yt(b,b.node,{timestamp:Date.now(),Fb:!1}),0}catch(D){if(typeof Xt>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},b:function(A,b,D){Xi=D;try{var O=Me(A);switch(b){case 0:var Y=Or();if(0>Y)break;for(;dt[Y];)Y++;return xt(O,Y).fd;case 1:case 2:return 0;case 3:return O.flags;case 4:return Y=Or(),O.flags|=Y,0;case 12:return Y=Or(),$[Y+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(de){if(typeof Xt>"u"||de.name!=="ErrnoError")throw de;return-de.Pa}},g:function(A,b){try{var D=Me(A),O=D.node,Y=D.Ma.Ta;A=Y?D:O,Y??(Y=O.La.Ta),_e(Y);var de=Y(A);return Fr(b,de)}catch(Ee){if(typeof Xt>"u"||Ee.name!=="ErrnoError")throw Ee;return-Ee.Pa}},H:function(A,b){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var D=Me(A);if(0>b||(D.flags&2097155)===0)throw new Oe(28);return hr(D,D.node,b),0}catch(O){if(typeof Xt>"u"||O.name!=="ErrnoError")throw O;return-O.Pa}},G:function(A,b){try{if(b===0)return-28;var D=ia("/")+1;return b<D?-68:(B("/",K,A,b),D)}catch(O){if(typeof Xt>"u"||O.name!=="ErrnoError")throw O;return-O.Pa}},K:function(A,b){try{return A=A?Ne(K,A):"",Fr(b,ua(A,!0))}catch(D){if(typeof Xt>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},C:function(A,b,D){try{return b=b?Ne(K,b):"",b=_r(A,b),Te(b,D),0}catch(O){if(typeof Xt>"u"||O.name!=="ErrnoError")throw O;return-O.Pa}},J:function(A,b,D,O){try{b=b?Ne(K,b):"";var Y=O&256;return b=_r(A,b,O&4096),Fr(D,Y?ua(b,!0):ua(b))}catch(de){if(typeof Xt>"u"||de.name!=="ErrnoError")throw de;return-de.Pa}},x:function(A,b,D,O){Xi=O;try{b=b?Ne(K,b):"",b=_r(A,b);var Y=O?Or():0;return aa(b,D,Y).fd}catch(de){if(typeof Xt>"u"||de.name!=="ErrnoError")throw de;return-de.Pa}},v:function(A,b,D,O){try{if(b=b?Ne(K,b):"",b=_r(A,b),0>=O)return-28;var Y=la(b).node;if(!Y)throw new Oe(44);if(!Y.La.readlink)throw new Oe(28);var de=Y.La.readlink(Y),Ee=Math.min(O,ia(de)),Ve=G[D+Ee];return B(de,K,D,O+1),G[D+Ee]=Ve,Ee}catch(Et){if(typeof Xt>"u"||Et.name!=="ErrnoError")throw Et;return-Et.Pa}},u:function(A){try{return A=A?Ne(K,A):"",da(A),0}catch(b){if(typeof Xt>"u"||b.name!=="ErrnoError")throw b;return-b.Pa}},f:function(A,b){try{return A=A?Ne(K,A):"",Fr(b,ua(A))}catch(D){if(typeof Xt>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},r:function(A,b,D){try{return b=b?Ne(K,b):"",b=_r(A,b),D===0?ca(b):D===512?da(b):ee("Invalid flags passed to unlinkat"),0}catch(O){if(typeof Xt>"u"||O.name!=="ErrnoError")throw O;return-O.Pa}},q:function(A,b,D){try{b=b?Ne(K,b):"",b=_r(A,b,!0);var O=Date.now(),Y,de;if(D){var Ee=re[D>>2]+4294967296*J[D+4>>2],Ve=J[D+8>>2];Ve==1073741823?Y=O:Ve==1073741822?Y=null:Y=1e3*Ee+Ve/1e6,D+=16,Ee=re[D>>2]+4294967296*J[D+4>>2],Ve=J[D+8>>2],Ve==1073741823?de=O:Ve==1073741822?de=null:de=1e3*Ee+Ve/1e6}else de=Y=O;if((de??Y)!==null){A=Y;var Et=la(b,{$a:!0}).node;_e(Et.La.Ua)(Et,{atime:A,mtime:de})}return 0}catch(ft){if(typeof Xt>"u"||ft.name!=="ErrnoError")throw ft;return-ft.Pa}},m:()=>ee(""),l:()=>{et=!1,wo=0},A:function(A,b){A=-9007199254740992>A||9007199254740992<A?NaN:Number(A),A=new Date(1e3*A),J[b>>2]=A.getSeconds(),J[b+4>>2]=A.getMinutes(),J[b+8>>2]=A.getHours(),J[b+12>>2]=A.getDate(),J[b+16>>2]=A.getMonth(),J[b+20>>2]=A.getFullYear()-1900,J[b+24>>2]=A.getDay();var D=A.getFullYear();J[b+28>>2]=(D%4!==0||D%100===0&&D%400!==0?xo:pn)[A.getMonth()]+A.getDate()-1|0,J[b+36>>2]=-(60*A.getTimezoneOffset()),D=new Date(A.getFullYear(),6,1).getTimezoneOffset();var O=new Date(A.getFullYear(),0,1).getTimezoneOffset();J[b+32>>2]=(D!=O&&A.getTimezoneOffset()==Math.min(O,D))|0},y:function(A,b,D,O,Y,de,Ee){Y=-9007199254740992>Y||9007199254740992<Y?NaN:Number(Y);try{if(isNaN(Y))return 61;var Ve=Me(O);if((b&2)!==0&&(D&2)===0&&(Ve.flags&2097155)!==2)throw new Oe(2);if((Ve.flags&2097155)===1)throw new Oe(2);if(!Ve.Ma.ib)throw new Oe(43);if(!A)throw new Oe(28);var Et=Ve.Ma.ib(Ve,A,Y,b,D),ft=Et.Kb;return J[de>>2]=Et.Ab,re[Ee>>2]=ft,0}catch(ma){if(typeof Xt>"u"||ma.name!=="ErrnoError")throw ma;return-ma.Pa}},z:function(A,b,D,O,Y,de){de=-9007199254740992>de||9007199254740992<de?NaN:Number(de);try{var Ee=Me(Y);if(D&2){if(D=de,(Ee.node.mode&61440)!==32768)throw new Oe(43);if(!(O&2)){var Ve=K.slice(A,A+b);Ee.Ma.jb&&Ee.Ma.jb(Ee,Ve,D,b,O)}}}catch(Et){if(typeof Xt>"u"||Et.name!=="ErrnoError")throw Et;return-Et.Pa}},n:(A,b)=>{if(di[A]&&(clearTimeout(di[A].id),delete di[A]),!b)return 0;var D=setTimeout(()=>{delete di[A],mi(()=>Ai(A,performance.now()))},b);return di[A]={id:D,Xb:b},0},B:(A,b,D,O)=>{var Y=new Date().getFullYear(),de=new Date(Y,0,1).getTimezoneOffset();Y=new Date(Y,6,1).getTimezoneOffset(),re[A>>2]=60*Math.max(de,Y),J[b>>2]=+(de!=Y),b=Ee=>{var Ve=Math.abs(Ee);return`UTC${0<=Ee?"-":"+"}${String(Math.floor(Ve/60)).padStart(2,"0")}${String(Ve%60).padStart(2,"0")}`},A=b(de),b=b(Y),Y<de?(B(A,K,D,17),B(b,K,O,17)):(B(A,K,O,17),B(b,K,D,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:A=>{var b=K.length;if(A>>>=0,2147483648<A)return!1;for(var D=1;4>=D;D*=2){var O=b*(1+.2/D);O=Math.min(O,A+100663296);e:{O=(Math.min(2147483648,65536*Math.ceil(Math.max(A,O)/65536))-Q.buffer.byteLength+65535)/65536|0;try{Q.grow(O),ye();var Y=1;break e}catch{}Y=void 0}if(Y)return!0}return!1},E:(A,b)=>{var D=0;return So().forEach((O,Y)=>{var de=b+D;for(Y=re[A+4*Y>>2]=de,de=0;de<O.length;++de)G[Y++]=O.charCodeAt(de);G[Y]=0,D+=O.length+1}),0},F:(A,b)=>{var D=So();re[A>>2]=D.length;var O=0;return D.forEach(Y=>O+=Y.length+1),re[b>>2]=O,0},e:function(A){try{var b=Me(A);return Sn(b),0}catch(D){if(typeof Xt>"u"||D.name!=="ErrnoError")throw D;return D.Pa}},p:function(A,b){try{var D=Me(A);return G[b]=D.tty?2:Jt(D.mode)?3:(D.mode&61440)===40960?7:4,$[b+2>>1]=0,X[b+8>>3]=BigInt(0),X[b+16>>3]=BigInt(0),0}catch(O){if(typeof Xt>"u"||O.name!=="ErrnoError")throw O;return O.Pa}},w:function(A,b,D,O){try{e:{var Y=Me(A);A=b;for(var de,Ee=b=0;Ee<D;Ee++){var Ve=re[A>>2],Et=re[A+4>>2];A+=8;var ft=Ts(Y,G,Ve,Et,de);if(0>ft){var ma=-1;break e}if(b+=ft,ft<Et)break;typeof de<"u"&&(de+=ft)}ma=b}return re[O>>2]=ma,0}catch(Qa){if(typeof Xt>"u"||Qa.name!=="ErrnoError")throw Qa;return Qa.Pa}},D:function(A,b,D,O){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var Y=Me(A);return Mr(Y,b,D),X[O>>3]=BigInt(Y.position),Y.ob&&b===0&&D===0&&(Y.ob=null),0}catch(de){if(typeof Xt>"u"||de.name!=="ErrnoError")throw de;return de.Pa}},I:function(A){var D;try{var b=Me(A);return(D=b.Ma)!=null&&D.fsync?b.Ma.fsync(b):0}catch(O){if(typeof Xt>"u"||O.name!=="ErrnoError")throw O;return O.Pa}},t:function(A,b,D,O){try{e:{var Y=Me(A);A=b;for(var de,Ee=b=0;Ee<D;Ee++){var Ve=re[A>>2],Et=re[A+4>>2];A+=8;var ft=rc(Y,G,Ve,Et,de);if(0>ft){var ma=-1;break e}if(b+=ft,ft<Et)break;typeof de<"u"&&(de+=ft)}ma=b}return re[O>>2]=ma,0}catch(Qa){if(typeof Xt>"u"||Qa.name!=="ErrnoError")throw Qa;return Qa.Pa}},k:ks},Je;(async function(){var D;function A(O){var Y;return Je=O.exports,Q=Je.M,ye(),yn=Je.O,_--,(Y=g.monitorRunDependencies)==null||Y.call(g,_),_==0&&q&&(O=q,q=null,O()),Je}_++,(D=g.monitorRunDependencies)==null||D.call(g,_);var b={a:fi};return g.instantiateWasm?new Promise(O=>{g.instantiateWasm(b,(Y,de)=>{A(Y),O(Y.exports)})}):(ne??(ne=g.locateFile?g.locateFile("sql-wasm.wasm",T):T+"sql-wasm.wasm"),A((await Re(b)).instance))})(),g._sqlite3_free=A=>(g._sqlite3_free=Je.P)(A),g._sqlite3_value_text=A=>(g._sqlite3_value_text=Je.Q)(A),g._sqlite3_prepare_v2=(A,b,D,O,Y)=>(g._sqlite3_prepare_v2=Je.R)(A,b,D,O,Y),g._sqlite3_step=A=>(g._sqlite3_step=Je.S)(A),g._sqlite3_reset=A=>(g._sqlite3_reset=Je.T)(A),g._sqlite3_exec=(A,b,D,O,Y)=>(g._sqlite3_exec=Je.U)(A,b,D,O,Y),g._sqlite3_finalize=A=>(g._sqlite3_finalize=Je.V)(A),g._sqlite3_column_name=(A,b)=>(g._sqlite3_column_name=Je.W)(A,b),g._sqlite3_column_text=(A,b)=>(g._sqlite3_column_text=Je.X)(A,b),g._sqlite3_column_type=(A,b)=>(g._sqlite3_column_type=Je.Y)(A,b),g._sqlite3_errmsg=A=>(g._sqlite3_errmsg=Je.Z)(A),g._sqlite3_clear_bindings=A=>(g._sqlite3_clear_bindings=Je._)(A),g._sqlite3_value_blob=A=>(g._sqlite3_value_blob=Je.$)(A),g._sqlite3_value_bytes=A=>(g._sqlite3_value_bytes=Je.aa)(A),g._sqlite3_value_double=A=>(g._sqlite3_value_double=Je.ba)(A),g._sqlite3_value_int=A=>(g._sqlite3_value_int=Je.ca)(A),g._sqlite3_value_type=A=>(g._sqlite3_value_type=Je.da)(A),g._sqlite3_result_blob=(A,b,D,O)=>(g._sqlite3_result_blob=Je.ea)(A,b,D,O),g._sqlite3_result_double=(A,b)=>(g._sqlite3_result_double=Je.fa)(A,b),g._sqlite3_result_error=(A,b,D)=>(g._sqlite3_result_error=Je.ga)(A,b,D),g._sqlite3_result_int=(A,b)=>(g._sqlite3_result_int=Je.ha)(A,b),g._sqlite3_result_int64=(A,b)=>(g._sqlite3_result_int64=Je.ia)(A,b),g._sqlite3_result_null=A=>(g._sqlite3_result_null=Je.ja)(A),g._sqlite3_result_text=(A,b,D,O)=>(g._sqlite3_result_text=Je.ka)(A,b,D,O),g._sqlite3_aggregate_context=(A,b)=>(g._sqlite3_aggregate_context=Je.la)(A,b),g._sqlite3_column_count=A=>(g._sqlite3_column_count=Je.ma)(A),g._sqlite3_data_count=A=>(g._sqlite3_data_count=Je.na)(A),g._sqlite3_column_blob=(A,b)=>(g._sqlite3_column_blob=Je.oa)(A,b),g._sqlite3_column_bytes=(A,b)=>(g._sqlite3_column_bytes=Je.pa)(A,b),g._sqlite3_column_double=(A,b)=>(g._sqlite3_column_double=Je.qa)(A,b),g._sqlite3_bind_blob=(A,b,D,O,Y)=>(g._sqlite3_bind_blob=Je.ra)(A,b,D,O,Y),g._sqlite3_bind_double=(A,b,D)=>(g._sqlite3_bind_double=Je.sa)(A,b,D),g._sqlite3_bind_int=(A,b,D)=>(g._sqlite3_bind_int=Je.ta)(A,b,D),g._sqlite3_bind_text=(A,b,D,O,Y)=>(g._sqlite3_bind_text=Je.ua)(A,b,D,O,Y),g._sqlite3_bind_parameter_index=(A,b)=>(g._sqlite3_bind_parameter_index=Je.va)(A,b),g._sqlite3_sql=A=>(g._sqlite3_sql=Je.wa)(A),g._sqlite3_normalized_sql=A=>(g._sqlite3_normalized_sql=Je.xa)(A),g._sqlite3_changes=A=>(g._sqlite3_changes=Je.ya)(A),g._sqlite3_close_v2=A=>(g._sqlite3_close_v2=Je.za)(A),g._sqlite3_create_function_v2=(A,b,D,O,Y,de,Ee,Ve,Et)=>(g._sqlite3_create_function_v2=Je.Aa)(A,b,D,O,Y,de,Ee,Ve,Et),g._sqlite3_update_hook=(A,b,D)=>(g._sqlite3_update_hook=Je.Ba)(A,b,D),g._sqlite3_open=(A,b)=>(g._sqlite3_open=Je.Ca)(A,b);var Rs=g._malloc=A=>(Rs=g._malloc=Je.Da)(A),hi=g._free=A=>(hi=g._free=Je.Ea)(A);g._RegisterExtensionFunctions=A=>(g._RegisterExtensionFunctions=Je.Fa)(A);var Lo=(A,b)=>(Lo=Je.Ga)(A,b),Ai=(A,b)=>(Ai=Je.Ha)(A,b),dn=A=>(dn=Je.Ia)(A),Qn=A=>(Qn=Je.Ja)(A),ir=()=>(ir=Je.Ka)();g.stackSave=()=>ir(),g.stackRestore=A=>dn(A),g.stackAlloc=A=>Qn(A),g.cwrap=(A,b,D,O)=>{var Y=!D||D.every(de=>de==="number"||de==="boolean");return b!=="string"&&Y&&!O?g["_"+A]:(...de)=>sc(A,b,D,de)},g.addFunction=Pr,g.removeFunction=zn,g.UTF8ToString=se,g.ALLOC_NORMAL=$i,g.allocate=gi,g.allocateUTF8OnStack=To;function Vn(){function A(){var Y;if(g.calledRun=!0,!H){if(!g.noFSInit&&!nn){var b,D;nn=!0,O??(O=g.stdin),b??(b=g.stdout),D??(D=g.stderr),O?wa("stdin",O):Ft("/dev/tty","/dev/stdin"),b?wa("stdout",null,b):Ft("/dev/tty","/dev/stdout"),D?wa("stderr",null,D):Ft("/dev/tty1","/dev/stderr"),aa("/dev/stdin",0),aa("/dev/stdout",1),aa("/dev/stderr",1)}if(Je.N(),Pn=!1,(Y=g.onRuntimeInitialized)==null||Y.call(g),g.postRun)for(typeof g.postRun=="function"&&(g.postRun=[g.postRun]);g.postRun.length;){var O=g.postRun.shift();ze.unshift(O)}xe(ze)}}if(0<_)q=Vn;else{if(g.preRun)for(typeof g.preRun=="function"&&(g.preRun=[g.preRun]);g.preRun.length;)Lt();xe(At),0<_?q=Vn:g.setStatus?(g.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>g.setStatus(""),1),A()},1)):A()}}if(g.preInit)for(typeof g.preInit=="function"&&(g.preInit=[g.preInit]);0<g.preInit.length;)g.preInit.pop()();return Vn(),m}),a)};n.exports=i,n.exports.default=i}(Pg)),Pg.exports}var fx=gx();const hx=Ji(fx);var Cy=`
\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');


PRAGMA foreign_keys = OFF;

-- Clean up any existing temp tables first
DROP TABLE IF EXISTS "__EFMigrationsHistory_temp";
DROP TABLE IF EXISTS "Aliases_temp";
DROP TABLE IF EXISTS "Services_temp";
DROP TABLE IF EXISTS "EncryptionKeys_temp";
DROP TABLE IF EXISTS "Settings_temp";
DROP TABLE IF EXISTS "Credentials_temp";
DROP TABLE IF EXISTS "Attachments_temp";
DROP TABLE IF EXISTS "Passwords_temp";
DROP TABLE IF EXISTS "TotpCodes_temp";

-- Create backup tables for all data
CREATE TABLE "__EFMigrationsHistory_temp" AS SELECT * FROM "__EFMigrationsHistory";
CREATE TABLE "Aliases_temp" AS SELECT * FROM "Aliases";
CREATE TABLE "Services_temp" AS SELECT * FROM "Services";
CREATE TABLE "EncryptionKeys_temp" AS SELECT * FROM "EncryptionKeys";
CREATE TABLE "Settings_temp" AS SELECT * FROM "Settings";
CREATE TABLE "Credentials_temp" AS SELECT * FROM "Credentials";
CREATE TABLE "Attachments_temp" AS SELECT * FROM "Attachments";
CREATE TABLE "Passwords_temp" AS SELECT * FROM "Passwords";
CREATE TABLE "TotpCodes_temp" AS SELECT * FROM "TotpCodes";

-- Delete orphaned records that do not have a valid FK to the credential object
DELETE FROM "Attachments_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "Passwords_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "TotpCodes_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");

-- Delete orphaned credentials that do not have valid FKs to alias or service objects
DELETE FROM "Credentials_temp" WHERE "AliasId" NOT IN (SELECT "Id" FROM "Aliases_temp");
DELETE FROM "Credentials_temp" WHERE "ServiceId" NOT IN (SELECT "Id" FROM "Services_temp");

-- After cleaning credentials, clean dependent tables again in case we removed credentials
DELETE FROM "Attachments_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "Passwords_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "TotpCodes_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");

-- Drop all existing tables
DROP TABLE "TotpCodes";
DROP TABLE "Passwords";
DROP TABLE "Attachments";
DROP TABLE "Credentials";
DROP TABLE "Settings";
DROP TABLE "EncryptionKeys";
DROP TABLE "Services";
DROP TABLE "Aliases";
DROP TABLE "__EFMigrationsHistory";

-- Recreate tables with proper constraints (no dependencies first)
CREATE TABLE "__EFMigrationsHistory" (
    "MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY,
    "ProductVersion" TEXT NOT NULL
);

CREATE TABLE "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,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

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,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

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,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

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

-- Tables with foreign keys
CREATE TABLE "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,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    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 "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 DEFAULT 0,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_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,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    CONSTRAINT "FK_Passwords_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

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 DEFAULT 0,
    CONSTRAINT "FK_TotpCodes_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);


-- Restore data from temp tables
INSERT INTO "__EFMigrationsHistory" SELECT * FROM "__EFMigrationsHistory_temp";
INSERT INTO "Aliases" SELECT * FROM "Aliases_temp";
INSERT INTO "Services" SELECT * FROM "Services_temp";
INSERT INTO "EncryptionKeys" SELECT * FROM "EncryptionKeys_temp";
INSERT INTO "Settings" SELECT * FROM "Settings_temp";
INSERT INTO "Credentials" SELECT * FROM "Credentials_temp";
INSERT INTO "Attachments" SELECT * FROM "Attachments_temp";
INSERT INTO "Passwords" SELECT * FROM "Passwords_temp";
INSERT INTO "TotpCodes" SELECT * FROM "TotpCodes_temp";

-- =====================================================================================
-- Date Format Normalization Migration
-- =====================================================================================
-- This migration normalizes ALL date fields to the standard format: 'yyyy-MM-dd HH:mm:ss.fff'
-- Previously the different clients used different date formats which complicate date parsing.
-- From version 0.24.0 onwards, all new dates are stored in this standard format.

-- Update Aliases table (CreatedAt, UpdatedAt, BirthDate)
UPDATE "Aliases" SET "CreatedAt" =
    CASE
        -- Already in correct format (yyyy-MM-dd HH:mm:ss.fff) - no change
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"

        -- ISO 8601 with milliseconds (yyyy-MM-ddTHH:mm:ss.fffZ) -> Replace T with space, remove Z and everything after .fff
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)

        -- Without milliseconds (yyyy-MM-dd HH:mm:ss or yyyy-MM-ddTHH:mm:ssZ) -> Add .000
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'

        -- Fallback: if none match, keep as-is (edge case)
        ELSE "CreatedAt"
    END;

UPDATE "Aliases" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- BirthDate: Always set time to 00:00:00 (no milliseconds for birth dates)
UPDATE "Aliases" SET "BirthDate" =
    CASE
        -- If empty or already '0001-01-01 00:00:00', keep as-is
        WHEN "BirthDate" = '' OR "BirthDate" = '0001-01-01 00:00:00'
            THEN "BirthDate"

        -- If already in correct format (yyyy-MM-dd 00:00:00), keep as-is
        WHEN "BirthDate" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] 00:00:00'
            THEN "BirthDate"

        -- Extract date part and set time to 00:00:00
        WHEN "BirthDate" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]*'
            THEN substr("BirthDate", 1, 10) || ' 00:00:00'

        -- Fallback
        ELSE "BirthDate"
    END;

-- Update Services table (CreatedAt, UpdatedAt)
UPDATE "Services" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Services" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update EncryptionKeys table (CreatedAt, UpdatedAt)
UPDATE "EncryptionKeys" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "EncryptionKeys" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Settings table (CreatedAt, UpdatedAt)
UPDATE "Settings" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Settings" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Credentials table (CreatedAt, UpdatedAt)
UPDATE "Credentials" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Credentials" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Attachments table (CreatedAt, UpdatedAt)
UPDATE "Attachments" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Attachments" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Passwords table (CreatedAt, UpdatedAt)
UPDATE "Passwords" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Passwords" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update TotpCodes table (CreatedAt, UpdatedAt)
UPDATE "TotpCodes" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "TotpCodes" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- =====================================================================================
-- End of Date Format Normalization Migration
-- =====================================================================================

-- Recreate indexes
CREATE INDEX "IX_Credentials_AliasId" ON "Credentials" ("AliasId");
CREATE INDEX "IX_Credentials_ServiceId" ON "Credentials" ("ServiceId");
CREATE INDEX "IX_Attachments_CredentialId" ON "Attachments" ("CredentialId");
CREATE INDEX "IX_Passwords_CredentialId" ON "Passwords" ("CredentialId");
CREATE INDEX "IX_TotpCodes_CredentialId" ON "TotpCodes" ("CredentialId");

-- Clean up temp tables
DROP TABLE "__EFMigrationsHistory_temp";
DROP TABLE "Aliases_temp";
DROP TABLE "Services_temp";
DROP TABLE "EncryptionKeys_temp";
DROP TABLE "Settings_temp";
DROP TABLE "Credentials_temp";
DROP TABLE "Attachments_temp";
DROP TABLE "Passwords_temp";
DROP TABLE "TotpCodes_temp";

PRAGMA foreign_keys = ON;


CREATE TABLE "Passkeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passkeys" PRIMARY KEY,
    "RpId" TEXT COLLATE NOCASE NOT NULL,
    "UserHandle" BLOB NOT NULL,
    "PublicKey" TEXT NOT NULL,
    "PrivateKey" TEXT NOT NULL,
    "PrfKey" BLOB NULL,
    "DisplayName" TEXT NOT NULL,
    "AdditionalData" BLOB NULL,
    "CredentialId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Passkeys_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_Passkeys_CredentialId" ON "Passkeys" ("CredentialId");

CREATE INDEX "IX_Passkeys_RpId" ON "Passkeys" ("RpId");

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20251014122838_1.6.0-AddPasskeys', '9.0.4');

COMMIT;

PRAGMA foreign_keys = OFF;

BEGIN TRANSACTION;
ALTER TABLE "TotpCodes" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_TotpCodes_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_TotpCodes_ItemId" ON "TotpCodes" ("ItemId");

ALTER TABLE "Passkeys" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_Passkeys_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_Passkeys_ItemId" ON "Passkeys" ("ItemId");

ALTER TABLE "Attachments" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_Attachments_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_Attachments_ItemId" ON "Attachments" ("ItemId");

CREATE TABLE "FieldDefinitions" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldDefinitions" PRIMARY KEY,
    "FieldType" TEXT NOT NULL,
    "Label" TEXT NOT NULL,
    "IsMultiValue" INTEGER NOT NULL,
    "IsHidden" INTEGER NOT NULL,
    "EnableHistory" INTEGER NOT NULL,
    "Weight" INTEGER NOT NULL,
    "ApplicableToTypes" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Folders" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Folders" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "ParentFolderId" TEXT NULL,
    "Weight" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Folders_Folders_ParentFolderId" FOREIGN KEY ("ParentFolderId") REFERENCES "Folders" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Logos" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Logos" PRIMARY KEY,
    "Source" TEXT NOT NULL,
    "FileData" BLOB NULL,
    "MimeType" TEXT NULL,
    "FetchedAt" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Tags" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Tags" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "Color" TEXT NULL,
    "DisplayOrder" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Items" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Items" PRIMARY KEY,
    "Name" TEXT NULL,
    "ItemType" TEXT NOT NULL,
    "LogoId" TEXT NULL,
    "DeletedAt" TEXT NULL,
    "FolderId" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Items_Folders_FolderId" FOREIGN KEY ("FolderId") REFERENCES "Folders" ("Id") ON DELETE SET NULL,
    CONSTRAINT "FK_Items_Logos_LogoId" FOREIGN KEY ("LogoId") REFERENCES "Logos" ("Id") ON DELETE SET NULL
);

CREATE TABLE "FieldHistories" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldHistories" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "FieldDefinitionId" TEXT NULL,
    "FieldKey" TEXT NULL,
    "ValueSnapshot" TEXT NOT NULL,
    "ChangedAt" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_FieldHistories_FieldDefinitions_FieldDefinitionId" FOREIGN KEY ("FieldDefinitionId") REFERENCES "FieldDefinitions" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_FieldHistories_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

CREATE TABLE "FieldValues" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldValues" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "FieldDefinitionId" TEXT NULL,
    "FieldKey" TEXT NULL,
    "Value" TEXT NULL,
    "Weight" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_FieldValues_FieldDefinitions_FieldDefinitionId" FOREIGN KEY ("FieldDefinitionId") REFERENCES "FieldDefinitions" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_FieldValues_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

CREATE TABLE "ItemTags" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_ItemTags" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "TagId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_ItemTags_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_ItemTags_Tags_TagId" FOREIGN KEY ("TagId") REFERENCES "Tags" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_FieldHistories_FieldDefinitionId" ON "FieldHistories" ("FieldDefinitionId");

CREATE INDEX "IX_FieldHistories_ItemId" ON "FieldHistories" ("ItemId");

CREATE INDEX "IX_FieldValues_FieldDefinitionId" ON "FieldValues" ("FieldDefinitionId");

CREATE INDEX "IX_FieldValues_FieldKey" ON "FieldValues" ("FieldKey");

CREATE INDEX "IX_FieldValues_ItemId" ON "FieldValues" ("ItemId");

CREATE INDEX "IX_FieldValues_ItemId_FieldDefinitionId_Weight" ON "FieldValues" ("ItemId", "FieldDefinitionId", "Weight");

CREATE INDEX "IX_FieldValues_ItemId_FieldKey" ON "FieldValues" ("ItemId", "FieldKey");

CREATE INDEX "IX_Folders_ParentFolderId" ON "Folders" ("ParentFolderId");

CREATE INDEX "IX_Items_FolderId" ON "Items" ("FolderId");

CREATE INDEX "IX_Items_LogoId" ON "Items" ("LogoId");

CREATE INDEX "IX_ItemTags_ItemId" ON "ItemTags" ("ItemId");

CREATE UNIQUE INDEX "IX_ItemTags_ItemId_TagId" ON "ItemTags" ("ItemId", "TagId");

CREATE INDEX "IX_ItemTags_TagId" ON "ItemTags" ("TagId");

CREATE UNIQUE INDEX "IX_Logos_Source" ON "Logos" ("Source");

CREATE INDEX "IX_Tags_Name" ON "Tags" ("Name");


                INSERT INTO Items (Id, Name, ItemType, LogoId, FolderId, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  c.Id,
                  s.Name AS Name,
                  CASE
                    WHEN a.Id IS NOT NULL AND (
                      (a.FirstName IS NOT NULL AND a.FirstName != '') OR
                      (a.LastName IS NOT NULL AND a.LastName != '') OR
                      (a.Gender IS NOT NULL AND a.Gender != '') OR
                      (a.BirthDate IS NOT NULL AND a.BirthDate != '' AND a.BirthDate NOT LIKE '0001-%')
                    ) THEN 'Alias'
                    ELSE 'Login'
                  END AS ItemType,
                  NULL AS LogoId,
                  NULL AS FolderId,
                  c.CreatedAt,
                  c.UpdatedAt,
                  c.IsDeleted
                FROM Credentials c
                LEFT JOIN Services s ON s.Id = c.ServiceId
                LEFT JOIN Aliases a ON a.Id = c.AliasId;
            


                INSERT INTO Logos (Id, Source, FileData, MimeType, FetchedAt, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  -- Extract and normalize hostname: remove protocol, path, lowercase, and www. prefix
                  REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  ) AS Source,
                  s.Logo AS FileData,
                  'image/png' AS MimeType,
                  NULL AS FetchedAt,
                  MIN(s.CreatedAt) AS CreatedAt,
                  MAX(s.UpdatedAt) AS UpdatedAt,
                  0 AS IsDeleted
                FROM Services s
                WHERE s.Logo IS NOT NULL AND s.Url IS NOT NULL AND s.Url != ''
                GROUP BY REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  );
            


                UPDATE Items
                SET LogoId = (
                  SELECT l.Id FROM Logos l
                  INNER JOIN Services s ON REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  ) = l.Source
                  INNER JOIN Credentials c ON c.ServiceId = s.Id
                  WHERE c.Id = Items.Id
                  LIMIT 1
                )
                WHERE EXISTS (
                  SELECT 1 FROM Credentials c
                  INNER JOIN Services s ON s.Id = c.ServiceId
                  WHERE c.Id = Items.Id AND s.Logo IS NOT NULL
                );
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.url' AS FieldKey,
                  s.Url AS Value,
                  0 AS Weight,
                  s.UpdatedAt AS CreatedAt,
                  s.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Services s ON s.Id = c.ServiceId
                WHERE s.Url IS NOT NULL AND s.Url != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.username' AS FieldKey,
                  c.Username AS Value,
                  0 AS Weight,
                  c.UpdatedAt AS CreatedAt,
                  c.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                WHERE c.Username IS NOT NULL AND c.Username != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'notes.content' AS FieldKey,
                  c.Notes AS Value,
                  0 AS Weight,
                  c.UpdatedAt AS CreatedAt,
                  c.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                WHERE c.Notes IS NOT NULL AND c.Notes != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  p.CredentialId AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.password' AS FieldKey,
                  p.Value AS Value,
                  0 AS Weight,
                  p.UpdatedAt AS CreatedAt,
                  p.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Passwords p
                INNER JOIN (
                  SELECT CredentialId, MAX(UpdatedAt) AS MaxUpdated, MAX(Id) AS MaxId
                  FROM Passwords
                  WHERE IsDeleted = 0
                  GROUP BY CredentialId
                ) pm ON p.CredentialId = pm.CredentialId AND p.UpdatedAt = pm.MaxUpdated AND p.Id = pm.MaxId
                WHERE p.IsDeleted = 0;
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.email' AS FieldKey,
                  a.Email AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.Email IS NOT NULL AND a.Email != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.first_name' AS FieldKey,
                  a.FirstName AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.FirstName IS NOT NULL AND a.FirstName != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.last_name' AS FieldKey,
                  a.LastName AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.LastName IS NOT NULL AND a.LastName != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.gender' AS FieldKey,
                  a.Gender AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.Gender IS NOT NULL AND a.Gender != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.birthdate' AS FieldKey,
                  SUBSTR(a.BirthDate, 1, 10) AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.BirthDate IS NOT NULL AND a.BirthDate != '' AND a.BirthDate NOT LIKE '0001-%';
            

DROP TABLE "Passwords";

DROP TABLE "Credentials";

DROP TABLE "Aliases";

DROP TABLE "Services";

COMMIT;

PRAGMA foreign_keys = ON;

BEGIN TRANSACTION;
CREATE TABLE "ef_temp_Attachments" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachments" PRIMARY KEY,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Filename" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

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

CREATE TABLE "ef_temp_Passkeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passkeys" PRIMARY KEY,
    "AdditionalData" BLOB NULL,
    "CreatedAt" TEXT NOT NULL,
    "DisplayName" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "PrfKey" BLOB NULL,
    "PrivateKey" TEXT NOT NULL,
    "PublicKey" TEXT NOT NULL,
    "RpId" TEXT COLLATE NOCASE NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "UserHandle" BLOB NOT NULL,
    CONSTRAINT "FK_Passkeys_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Passkeys" ("Id", "AdditionalData", "CreatedAt", "DisplayName", "IsDeleted", "ItemId", "PrfKey", "PrivateKey", "PublicKey", "RpId", "UpdatedAt", "UserHandle")
SELECT "Id", "AdditionalData", "CreatedAt", "DisplayName", "IsDeleted", "ItemId", "PrfKey", "PrivateKey", "PublicKey", "RpId", "UpdatedAt", "UserHandle"
FROM "Passkeys";

CREATE TABLE "ef_temp_TotpCodes" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_TotpCodes" PRIMARY KEY,
    "CreatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "Name" TEXT NOT NULL,
    "SecretKey" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_TotpCodes_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_TotpCodes" ("Id", "CreatedAt", "IsDeleted", "ItemId", "Name", "SecretKey", "UpdatedAt")
SELECT "Id", "CreatedAt", "IsDeleted", "ItemId", "Name", "SecretKey", "UpdatedAt"
FROM "TotpCodes";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Attachments";

ALTER TABLE "ef_temp_Attachments" RENAME TO "Attachments";

DROP TABLE "Passkeys";

ALTER TABLE "ef_temp_Passkeys" RENAME TO "Passkeys";

DROP TABLE "TotpCodes";

ALTER TABLE "ef_temp_TotpCodes" RENAME TO "TotpCodes";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Attachments_ItemId" ON "Attachments" ("ItemId");

CREATE INDEX "IX_Passkeys_ItemId" ON "Passkeys" ("ItemId");

CREATE INDEX "IX_Passkeys_RpId" ON "Passkeys" ("RpId");

CREATE INDEX "IX_TotpCodes_ItemId" ON "TotpCodes" ("ItemId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20251213111207_1.7.0-FieldBasedDataModelUpdate', '9.0.4');

BEGIN TRANSACTION;
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20260130221620_2.0.0-MajorVersionBump', '9.0.4');

COMMIT;
`,wy={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;`,10:`\uFEFFBEGIN TRANSACTION;

PRAGMA foreign_keys = OFF;

-- Clean up any existing temp tables first
DROP TABLE IF EXISTS "__EFMigrationsHistory_temp";
DROP TABLE IF EXISTS "Aliases_temp";
DROP TABLE IF EXISTS "Services_temp";
DROP TABLE IF EXISTS "EncryptionKeys_temp";
DROP TABLE IF EXISTS "Settings_temp";
DROP TABLE IF EXISTS "Credentials_temp";
DROP TABLE IF EXISTS "Attachments_temp";
DROP TABLE IF EXISTS "Passwords_temp";
DROP TABLE IF EXISTS "TotpCodes_temp";

-- Create backup tables for all data
CREATE TABLE "__EFMigrationsHistory_temp" AS SELECT * FROM "__EFMigrationsHistory";
CREATE TABLE "Aliases_temp" AS SELECT * FROM "Aliases";
CREATE TABLE "Services_temp" AS SELECT * FROM "Services";
CREATE TABLE "EncryptionKeys_temp" AS SELECT * FROM "EncryptionKeys";
CREATE TABLE "Settings_temp" AS SELECT * FROM "Settings";
CREATE TABLE "Credentials_temp" AS SELECT * FROM "Credentials";
CREATE TABLE "Attachments_temp" AS SELECT * FROM "Attachments";
CREATE TABLE "Passwords_temp" AS SELECT * FROM "Passwords";
CREATE TABLE "TotpCodes_temp" AS SELECT * FROM "TotpCodes";

-- Delete orphaned records that do not have a valid FK to the credential object
DELETE FROM "Attachments_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "Passwords_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "TotpCodes_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");

-- Delete orphaned credentials that do not have valid FKs to alias or service objects
DELETE FROM "Credentials_temp" WHERE "AliasId" NOT IN (SELECT "Id" FROM "Aliases_temp");
DELETE FROM "Credentials_temp" WHERE "ServiceId" NOT IN (SELECT "Id" FROM "Services_temp");

-- After cleaning credentials, clean dependent tables again in case we removed credentials
DELETE FROM "Attachments_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "Passwords_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "TotpCodes_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");

-- Drop all existing tables
DROP TABLE "TotpCodes";
DROP TABLE "Passwords";
DROP TABLE "Attachments";
DROP TABLE "Credentials";
DROP TABLE "Settings";
DROP TABLE "EncryptionKeys";
DROP TABLE "Services";
DROP TABLE "Aliases";
DROP TABLE "__EFMigrationsHistory";

-- Recreate tables with proper constraints (no dependencies first)
CREATE TABLE "__EFMigrationsHistory" (
    "MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY,
    "ProductVersion" TEXT NOT NULL
);

CREATE TABLE "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,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

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,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

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,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

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

-- Tables with foreign keys
CREATE TABLE "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,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    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 "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 DEFAULT 0,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_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,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    CONSTRAINT "FK_Passwords_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

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 DEFAULT 0,
    CONSTRAINT "FK_TotpCodes_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);


-- Restore data from temp tables
INSERT INTO "__EFMigrationsHistory" SELECT * FROM "__EFMigrationsHistory_temp";
INSERT INTO "Aliases" SELECT * FROM "Aliases_temp";
INSERT INTO "Services" SELECT * FROM "Services_temp";
INSERT INTO "EncryptionKeys" SELECT * FROM "EncryptionKeys_temp";
INSERT INTO "Settings" SELECT * FROM "Settings_temp";
INSERT INTO "Credentials" SELECT * FROM "Credentials_temp";
INSERT INTO "Attachments" SELECT * FROM "Attachments_temp";
INSERT INTO "Passwords" SELECT * FROM "Passwords_temp";
INSERT INTO "TotpCodes" SELECT * FROM "TotpCodes_temp";

-- =====================================================================================
-- Date Format Normalization Migration
-- =====================================================================================
-- This migration normalizes ALL date fields to the standard format: 'yyyy-MM-dd HH:mm:ss.fff'
-- Previously the different clients used different date formats which complicate date parsing.
-- From version 0.24.0 onwards, all new dates are stored in this standard format.

-- Update Aliases table (CreatedAt, UpdatedAt, BirthDate)
UPDATE "Aliases" SET "CreatedAt" =
    CASE
        -- Already in correct format (yyyy-MM-dd HH:mm:ss.fff) - no change
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"

        -- ISO 8601 with milliseconds (yyyy-MM-ddTHH:mm:ss.fffZ) -> Replace T with space, remove Z and everything after .fff
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)

        -- Without milliseconds (yyyy-MM-dd HH:mm:ss or yyyy-MM-ddTHH:mm:ssZ) -> Add .000
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'

        -- Fallback: if none match, keep as-is (edge case)
        ELSE "CreatedAt"
    END;

UPDATE "Aliases" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- BirthDate: Always set time to 00:00:00 (no milliseconds for birth dates)
UPDATE "Aliases" SET "BirthDate" =
    CASE
        -- If empty or already '0001-01-01 00:00:00', keep as-is
        WHEN "BirthDate" = '' OR "BirthDate" = '0001-01-01 00:00:00'
            THEN "BirthDate"

        -- If already in correct format (yyyy-MM-dd 00:00:00), keep as-is
        WHEN "BirthDate" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] 00:00:00'
            THEN "BirthDate"

        -- Extract date part and set time to 00:00:00
        WHEN "BirthDate" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]*'
            THEN substr("BirthDate", 1, 10) || ' 00:00:00'

        -- Fallback
        ELSE "BirthDate"
    END;

-- Update Services table (CreatedAt, UpdatedAt)
UPDATE "Services" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Services" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update EncryptionKeys table (CreatedAt, UpdatedAt)
UPDATE "EncryptionKeys" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "EncryptionKeys" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Settings table (CreatedAt, UpdatedAt)
UPDATE "Settings" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Settings" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Credentials table (CreatedAt, UpdatedAt)
UPDATE "Credentials" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Credentials" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Attachments table (CreatedAt, UpdatedAt)
UPDATE "Attachments" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Attachments" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Passwords table (CreatedAt, UpdatedAt)
UPDATE "Passwords" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Passwords" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update TotpCodes table (CreatedAt, UpdatedAt)
UPDATE "TotpCodes" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "TotpCodes" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- =====================================================================================
-- End of Date Format Normalization Migration
-- =====================================================================================

-- Recreate indexes
CREATE INDEX "IX_Credentials_AliasId" ON "Credentials" ("AliasId");
CREATE INDEX "IX_Credentials_ServiceId" ON "Credentials" ("ServiceId");
CREATE INDEX "IX_Attachments_CredentialId" ON "Attachments" ("CredentialId");
CREATE INDEX "IX_Passwords_CredentialId" ON "Passwords" ("CredentialId");
CREATE INDEX "IX_TotpCodes_CredentialId" ON "TotpCodes" ("CredentialId");

-- Clean up temp tables
DROP TABLE "__EFMigrationsHistory_temp";
DROP TABLE "Aliases_temp";
DROP TABLE "Services_temp";
DROP TABLE "EncryptionKeys_temp";
DROP TABLE "Settings_temp";
DROP TABLE "Credentials_temp";
DROP TABLE "Attachments_temp";
DROP TABLE "Passwords_temp";
DROP TABLE "TotpCodes_temp";

PRAGMA foreign_keys = ON;


CREATE TABLE "Passkeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passkeys" PRIMARY KEY,
    "RpId" TEXT COLLATE NOCASE NOT NULL,
    "UserHandle" BLOB NOT NULL,
    "PublicKey" TEXT NOT NULL,
    "PrivateKey" TEXT NOT NULL,
    "PrfKey" BLOB NULL,
    "DisplayName" TEXT NOT NULL,
    "AdditionalData" BLOB NULL,
    "CredentialId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Passkeys_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_Passkeys_CredentialId" ON "Passkeys" ("CredentialId");

CREATE INDEX "IX_Passkeys_RpId" ON "Passkeys" ("RpId");

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20251014122838_1.6.0-AddPasskeys', '9.0.4');

COMMIT;`,11:`\uFEFFPRAGMA foreign_keys = OFF;

BEGIN TRANSACTION;
ALTER TABLE "TotpCodes" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_TotpCodes_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_TotpCodes_ItemId" ON "TotpCodes" ("ItemId");

ALTER TABLE "Passkeys" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_Passkeys_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_Passkeys_ItemId" ON "Passkeys" ("ItemId");

ALTER TABLE "Attachments" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_Attachments_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_Attachments_ItemId" ON "Attachments" ("ItemId");

CREATE TABLE "FieldDefinitions" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldDefinitions" PRIMARY KEY,
    "FieldType" TEXT NOT NULL,
    "Label" TEXT NOT NULL,
    "IsMultiValue" INTEGER NOT NULL,
    "IsHidden" INTEGER NOT NULL,
    "EnableHistory" INTEGER NOT NULL,
    "Weight" INTEGER NOT NULL,
    "ApplicableToTypes" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Folders" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Folders" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "ParentFolderId" TEXT NULL,
    "Weight" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Folders_Folders_ParentFolderId" FOREIGN KEY ("ParentFolderId") REFERENCES "Folders" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Logos" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Logos" PRIMARY KEY,
    "Source" TEXT NOT NULL,
    "FileData" BLOB NULL,
    "MimeType" TEXT NULL,
    "FetchedAt" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Tags" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Tags" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "Color" TEXT NULL,
    "DisplayOrder" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Items" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Items" PRIMARY KEY,
    "Name" TEXT NULL,
    "ItemType" TEXT NOT NULL,
    "LogoId" TEXT NULL,
    "DeletedAt" TEXT NULL,
    "FolderId" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Items_Folders_FolderId" FOREIGN KEY ("FolderId") REFERENCES "Folders" ("Id") ON DELETE SET NULL,
    CONSTRAINT "FK_Items_Logos_LogoId" FOREIGN KEY ("LogoId") REFERENCES "Logos" ("Id") ON DELETE SET NULL
);

CREATE TABLE "FieldHistories" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldHistories" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "FieldDefinitionId" TEXT NULL,
    "FieldKey" TEXT NULL,
    "ValueSnapshot" TEXT NOT NULL,
    "ChangedAt" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_FieldHistories_FieldDefinitions_FieldDefinitionId" FOREIGN KEY ("FieldDefinitionId") REFERENCES "FieldDefinitions" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_FieldHistories_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

CREATE TABLE "FieldValues" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldValues" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "FieldDefinitionId" TEXT NULL,
    "FieldKey" TEXT NULL,
    "Value" TEXT NULL,
    "Weight" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_FieldValues_FieldDefinitions_FieldDefinitionId" FOREIGN KEY ("FieldDefinitionId") REFERENCES "FieldDefinitions" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_FieldValues_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

CREATE TABLE "ItemTags" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_ItemTags" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "TagId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_ItemTags_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_ItemTags_Tags_TagId" FOREIGN KEY ("TagId") REFERENCES "Tags" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_FieldHistories_FieldDefinitionId" ON "FieldHistories" ("FieldDefinitionId");

CREATE INDEX "IX_FieldHistories_ItemId" ON "FieldHistories" ("ItemId");

CREATE INDEX "IX_FieldValues_FieldDefinitionId" ON "FieldValues" ("FieldDefinitionId");

CREATE INDEX "IX_FieldValues_FieldKey" ON "FieldValues" ("FieldKey");

CREATE INDEX "IX_FieldValues_ItemId" ON "FieldValues" ("ItemId");

CREATE INDEX "IX_FieldValues_ItemId_FieldDefinitionId_Weight" ON "FieldValues" ("ItemId", "FieldDefinitionId", "Weight");

CREATE INDEX "IX_FieldValues_ItemId_FieldKey" ON "FieldValues" ("ItemId", "FieldKey");

CREATE INDEX "IX_Folders_ParentFolderId" ON "Folders" ("ParentFolderId");

CREATE INDEX "IX_Items_FolderId" ON "Items" ("FolderId");

CREATE INDEX "IX_Items_LogoId" ON "Items" ("LogoId");

CREATE INDEX "IX_ItemTags_ItemId" ON "ItemTags" ("ItemId");

CREATE UNIQUE INDEX "IX_ItemTags_ItemId_TagId" ON "ItemTags" ("ItemId", "TagId");

CREATE INDEX "IX_ItemTags_TagId" ON "ItemTags" ("TagId");

CREATE UNIQUE INDEX "IX_Logos_Source" ON "Logos" ("Source");

CREATE INDEX "IX_Tags_Name" ON "Tags" ("Name");


                INSERT INTO Items (Id, Name, ItemType, LogoId, FolderId, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  c.Id,
                  s.Name AS Name,
                  CASE
                    WHEN a.Id IS NOT NULL AND (
                      (a.FirstName IS NOT NULL AND a.FirstName != '') OR
                      (a.LastName IS NOT NULL AND a.LastName != '') OR
                      (a.Gender IS NOT NULL AND a.Gender != '') OR
                      (a.BirthDate IS NOT NULL AND a.BirthDate != '' AND a.BirthDate NOT LIKE '0001-%')
                    ) THEN 'Alias'
                    ELSE 'Login'
                  END AS ItemType,
                  NULL AS LogoId,
                  NULL AS FolderId,
                  c.CreatedAt,
                  c.UpdatedAt,
                  c.IsDeleted
                FROM Credentials c
                LEFT JOIN Services s ON s.Id = c.ServiceId
                LEFT JOIN Aliases a ON a.Id = c.AliasId;
            


                INSERT INTO Logos (Id, Source, FileData, MimeType, FetchedAt, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  -- Extract and normalize hostname: remove protocol, path, lowercase, and www. prefix
                  REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  ) AS Source,
                  s.Logo AS FileData,
                  'image/png' AS MimeType,
                  NULL AS FetchedAt,
                  MIN(s.CreatedAt) AS CreatedAt,
                  MAX(s.UpdatedAt) AS UpdatedAt,
                  0 AS IsDeleted
                FROM Services s
                WHERE s.Logo IS NOT NULL AND s.Url IS NOT NULL AND s.Url != ''
                GROUP BY REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  );
            


                UPDATE Items
                SET LogoId = (
                  SELECT l.Id FROM Logos l
                  INNER JOIN Services s ON REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  ) = l.Source
                  INNER JOIN Credentials c ON c.ServiceId = s.Id
                  WHERE c.Id = Items.Id
                  LIMIT 1
                )
                WHERE EXISTS (
                  SELECT 1 FROM Credentials c
                  INNER JOIN Services s ON s.Id = c.ServiceId
                  WHERE c.Id = Items.Id AND s.Logo IS NOT NULL
                );
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.url' AS FieldKey,
                  s.Url AS Value,
                  0 AS Weight,
                  s.UpdatedAt AS CreatedAt,
                  s.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Services s ON s.Id = c.ServiceId
                WHERE s.Url IS NOT NULL AND s.Url != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.username' AS FieldKey,
                  c.Username AS Value,
                  0 AS Weight,
                  c.UpdatedAt AS CreatedAt,
                  c.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                WHERE c.Username IS NOT NULL AND c.Username != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'notes.content' AS FieldKey,
                  c.Notes AS Value,
                  0 AS Weight,
                  c.UpdatedAt AS CreatedAt,
                  c.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                WHERE c.Notes IS NOT NULL AND c.Notes != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  p.CredentialId AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.password' AS FieldKey,
                  p.Value AS Value,
                  0 AS Weight,
                  p.UpdatedAt AS CreatedAt,
                  p.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Passwords p
                INNER JOIN (
                  SELECT CredentialId, MAX(UpdatedAt) AS MaxUpdated, MAX(Id) AS MaxId
                  FROM Passwords
                  WHERE IsDeleted = 0
                  GROUP BY CredentialId
                ) pm ON p.CredentialId = pm.CredentialId AND p.UpdatedAt = pm.MaxUpdated AND p.Id = pm.MaxId
                WHERE p.IsDeleted = 0;
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.email' AS FieldKey,
                  a.Email AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.Email IS NOT NULL AND a.Email != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.first_name' AS FieldKey,
                  a.FirstName AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.FirstName IS NOT NULL AND a.FirstName != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.last_name' AS FieldKey,
                  a.LastName AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.LastName IS NOT NULL AND a.LastName != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.gender' AS FieldKey,
                  a.Gender AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.Gender IS NOT NULL AND a.Gender != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.birthdate' AS FieldKey,
                  SUBSTR(a.BirthDate, 1, 10) AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.BirthDate IS NOT NULL AND a.BirthDate != '' AND a.BirthDate NOT LIKE '0001-%';
            

DROP TABLE "Passwords";

DROP TABLE "Credentials";

DROP TABLE "Aliases";

DROP TABLE "Services";

COMMIT;

PRAGMA foreign_keys = ON;

BEGIN TRANSACTION;
CREATE TABLE "ef_temp_Attachments" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachments" PRIMARY KEY,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Filename" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

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

CREATE TABLE "ef_temp_Passkeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passkeys" PRIMARY KEY,
    "AdditionalData" BLOB NULL,
    "CreatedAt" TEXT NOT NULL,
    "DisplayName" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "PrfKey" BLOB NULL,
    "PrivateKey" TEXT NOT NULL,
    "PublicKey" TEXT NOT NULL,
    "RpId" TEXT COLLATE NOCASE NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "UserHandle" BLOB NOT NULL,
    CONSTRAINT "FK_Passkeys_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Passkeys" ("Id", "AdditionalData", "CreatedAt", "DisplayName", "IsDeleted", "ItemId", "PrfKey", "PrivateKey", "PublicKey", "RpId", "UpdatedAt", "UserHandle")
SELECT "Id", "AdditionalData", "CreatedAt", "DisplayName", "IsDeleted", "ItemId", "PrfKey", "PrivateKey", "PublicKey", "RpId", "UpdatedAt", "UserHandle"
FROM "Passkeys";

CREATE TABLE "ef_temp_TotpCodes" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_TotpCodes" PRIMARY KEY,
    "CreatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "Name" TEXT NOT NULL,
    "SecretKey" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_TotpCodes_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_TotpCodes" ("Id", "CreatedAt", "IsDeleted", "ItemId", "Name", "SecretKey", "UpdatedAt")
SELECT "Id", "CreatedAt", "IsDeleted", "ItemId", "Name", "SecretKey", "UpdatedAt"
FROM "TotpCodes";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Attachments";

ALTER TABLE "ef_temp_Attachments" RENAME TO "Attachments";

DROP TABLE "Passkeys";

ALTER TABLE "ef_temp_Passkeys" RENAME TO "Passkeys";

DROP TABLE "TotpCodes";

ALTER TABLE "ef_temp_TotpCodes" RENAME TO "TotpCodes";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Attachments_ItemId" ON "Attachments" ("ItemId");

CREATE INDEX "IX_Passkeys_ItemId" ON "Passkeys" ("ItemId");

CREATE INDEX "IX_Passkeys_RpId" ON "Passkeys" ("RpId");

CREATE INDEX "IX_TotpCodes_ItemId" ON "TotpCodes" ("ItemId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20251213111207_1.7.0-FieldBasedDataModelUpdate', '9.0.4');`,12:`\uFEFFBEGIN TRANSACTION;
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20260130221620_2.0.0-MajorVersionBump', '9.0.4');

COMMIT;`},ja=[{revision:1,version:"1.0.0",description:"Initial Migration",releaseVersion:"0.1.0",compatibleUpToVersion:"0.0.0"},{revision:2,version:"1.0.1",description:"Empty Test Migration",releaseVersion:"0.2.0",compatibleUpToVersion:"0.1.0"},{revision:3,version:"1.0.2",description:"Change Email Column",releaseVersion:"0.3.0",compatibleUpToVersion:"0.2.0"},{revision:4,version:"1.1.0",description:"Add Pki Tables",releaseVersion:"0.4.0",compatibleUpToVersion:"0.3.0"},{revision:5,version:"1.2.0",description:"Add Settings Table",releaseVersion:"0.4.0",compatibleUpToVersion:"0.3.0"},{revision:6,version:"1.3.0",description:"Update Identity Structure",releaseVersion:"0.5.0",compatibleUpToVersion:"0.4.0"},{revision:7,version:"1.3.1",description:"Make Username Optional",releaseVersion:"0.5.0",compatibleUpToVersion:"0.4.0"},{revision:8,version:"1.4.0",description:"Add Sync Support",releaseVersion:"0.6.0",compatibleUpToVersion:"0.5.0"},{revision:9,version:"1.4.1",description:"Rename Attachments Plural",releaseVersion:"0.6.0",compatibleUpToVersion:"0.13.0"},{revision:10,version:"1.5.0",description:"Add 2FA Tokens to credentials",releaseVersion:"0.14.0",compatibleUpToVersion:"0.23.0"},{revision:11,version:"1.6.0",description:"Add Passkey support",releaseVersion:"0.24.0",compatibleUpToVersion:"0.25.0"},{revision:12,version:"1.7.0",description:"Update to Field-Based Data Model",releaseVersion:"0.26.0",compatibleUpToVersion:"0.25.0"},{revision:13,version:"2.0.0",description:"Update to Field-Based Data Model",releaseVersion:"0.26.1",compatibleUpToVersion:"0.25.0"}],Gf=class{getCreateVaultSql(){try{return{success:!0,sqlCommands:[Cy],version:ja[ja.length-1].version,migrationNumber:ja[ja.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,e){try{const a=e??ja[ja.length-1].revision,i=ja.find(d=>d.revision===a);if(!i)return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:`Target migration number ${a} not found`};if(n>=a)return{success:!0,sqlCommands:[],version:i.version,migrationNumber:a};const s=ja.filter(d=>d.revision>n&&d.revision<=a),c=[];for(const d of s){const m=d.revision-1,f=wy[m];f&&c.push(f)}return{success:!0,sqlCommands:c,version:i.version,migrationNumber:a}}catch(a){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:a instanceof Error?a.message:"Unknown error generating upgrade SQL"}}}getUpgradeToLatestSql(n){return this.getUpgradeVaultSql(n)}getUpgradeToVersionSql(n,e){const a=ja.find(i=>i.version===e);return a?this.getUpgradeVaultSql(n,a.revision):{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:`Target version ${e} 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,e,a){let i="0.0.0",s=0;n&&(e?i=e:(i="1.0.0",s=1),a&&(s=parseInt(a,10)));const c=ja[ja.length-1],d=s<c.revision,m=ja.filter(f=>f.revision>s);return{currentVersion:i,currentMigrationNumber:s,targetVersion:c.version,targetMigrationNumber:c.revision,needsUpgrade:d,availableUpgrades:m}}validateVaultStructure(n){const e=["Aliases","Services","Credentials","Passwords","Attachments","EncryptionKeys","Settings","TotpCodes"];return n.filter(i=>e.includes(i)).length>=5}getAllVersions(){return[...ja]}getLatestVersion(){return ja[ja.length-1]}getMigrationSql(n){return wy[n]}getCompleteSchemaSql(){return Cy}};function xy(n){const a=/^(\d+)\.(\d+)\.(\d+)$/.exec(n);return a?{major:parseInt(a[1],10),minor:parseInt(a[2],10),patch:parseInt(a[3],10)}:null}function Ax(n,e){const a=xy(n);if(!a)return{isCompatible:!1,databaseVersion:n,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const i=ja.find(g=>g.version===n);if(i)return{isCompatible:!0,databaseVersion:n,clientVersion:i,isKnownVersion:!0,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const s=e?ja.find(g=>g.version===e)??Sy():Sy(),c=xy(s.version);if(!c)return{isCompatible:!1,databaseVersion:n,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const d=a.major!==c.major,m=!d&&(a.minor!==c.minor||a.patch!==c.patch);return{isCompatible:!d,databaseVersion:n,clientVersion:s,isKnownVersion:!1,isMajorVersionDifference:d,isMinorVersionDifference:m}}function Sy(){return ja[ja.length-1]}function px(n){const a=/_(\d+\.\d+\.\d+)-/.exec(n);return(a==null?void 0:a[1])??null}class Yl extends Error{constructor(e){super(e),this.name="VaultVersionIncompatibleError",Object.setPrototypeOf(this,Yl.prototype)}}const yx={loginTitle:"Bei AliasVault anmelden",username:"Benutzername oder E-Mail-Adresse",usernamePlaceholder:"Name / name@unternehmen.com",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",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:"Entsperren",unlockWithPin:"Mit PIN entsperren",enterPinToUnlock:"Bitte gib Deine PIN zum Entsperren des Tresors ein",useMasterPassword:"Master-Passwort benutzen",unlockTitle:"Entsperre Deinen Tresor",logoutConfirm:"Bist Du sicher, dass Du Dich abmelden möchtest?",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?",loginWithMobile:"Mit mobiler App anmelden",unlockWithMobile:"Mit mobiler App entsperren",scanQrCode:"Scanne diesen QR-Code mit Deiner AliasVault-App, um Dich anzumelden und Deinen Tresor zu entsperren."},Ex={vault:"Tresor",emails:"E-Mails"},bx={loading:"Laden...",notice:"Hinweis",error:"Fehler",cancel:"Abbrechen",confirm:"Bestätigen",back:"Zurück",next:"Weiter",use:"Benutzen",add:"Hinzufügen",delete:"Löschen",undo:"Rückgängig machen",save:"Speichern",saving:"Wird gespeichert ...",create:"Erstellen",or:"Oder",close:"Schließen",logout:"Abmelden",copied:"Kopiert!",openInNewWindow:"In neuem Fenster öffnen",enabled:"Aktiviert",disabled:"Deaktiviert",showPassword:"Passwort anzeigen",hidePassword:"Passwort verbergen",showDetails:"Details anzeigen",hideDetails:"Details ausblenden",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",credentials:"Zugangsdaten",customFields:"Benutzerdefinierte Felder",twoFactorAuthentication:"Zwei-Faktor-Authentifizierung",alias:"Alias",notes:"Notizen",email:"E-Mail-Adresse",username:"Benutzername",password:"Passwort",generate:"Generieren",serviceName:"Name des Dienstes",loggedIn:"Angemeldet",syncingVault:"Tresor wird synchronisiert",checkingVaultUpdates:"Prüfe auf Tresor-Updates",syncingUpdatedVault:"Aktualisierter Tresor wird synchronisiert",loadMore:"Mehr laden",offline:"Offline",offlineMode:"Im Offline-Modus arbeiten",pendingSync:"Synchronisierung läuft...",mergingVaultChanges:"Tresor Änderungen zusammenführen...",uploadingVault:"Tresor wird gespeichert...",errors:{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.",browserExtensionOutdated:"Diese Browser-Erweiterung ist veraltet und kann nicht verwendet werden, um auf diesen Tresor zuzugreifen. Bitte aktualisiere die Browser-Erweiterung, um fortzufahren.",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.",serverVersionTooOld:"Der AliasVault-Server muss auf eine neuere Version aktualisiert werden, um dieses Feature nutzen zu können. Bitte kontaktiere den Administrator des Servers, falls Du Hilfe benötigst.",unknownError:"Ein unbekannter Fehler ist aufgetreten",unknownErrorTryAgain:"Ein unbekannter Fehler ist aufgetreten. Bitte versuche es erneut.",vaultNotAvailable:"Tresor nicht verfügbar",vaultIsLocked:"Der Tresor ist gesperrt.",passwordChanged:"Dein Passwort hat sich seit Deiner letzten Anmeldung geändert. Bitte melden Dich aus Sicherheitsgründen erneut an.",syncConflictMaxRetries:"Tresor konnte nach mehreren Versuchen nicht synchronisiert werden. Bitte versuche es später erneut.",mergeFailed:"Fehler beim Zusammenführen der Tresoränderungen. Bitte versuchen Sie es erneut.",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.",wrongPassword:"Incorrect password. Please try again.",sessionExpired:"Your session has expired. Please log in again.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."},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.",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."}},Ix={or:"oder",new:"Neu",vaultLocked:"AliasVault ist gesperrt.",creatingNewAlias:"Neuen Alias erstellen...",noMatchesFound:"Keine Treffer gefunden",searchVault:"Tresor durchsuchen...",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",openAliasVaultToUpgrade:"Zum Aktualisieren AliasVault öffnen ",vaultUpgradeRequired:"Aktualisierung des Tresors erforderlich.",dismissPopup:"Popup schliessen"},vx={title:"Titel",itemName:"Name",loginCredentials:"Zugangsdaten",cardInformation:"Karteninformationen",addItem:"Eintrag hinzufügen",addNewItem:"Neues Element hinzufügen",saveItem:"Element speichern",itemDetails:"Details",editItem:"Element bearbeiten",untitled:"Untitled",newFolder:"Neuer Ordner",createFolder:"Ordner erstellen",editFolder:"Ordner bearbeiten",folderName:"Ordnername",folderNameRequired:"Ordnername ist erforderlich",folder:"Ordner",welcomeTitle:"Welcome to 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.",noPasskeysFound:"Es wurden noch kein Passkey erstellt. Ein Passkey wird durch den Besuch einer Website erzeugt, die Passkeys als Authentifizierungsmethode anbietet.",noAttachmentsFound:"Keine Elemente mit Anhängen gefunden",noItemsOfTypeFound:"Keine {{type}} Elemente gefunden",noMatchingItems:"Kein passendes Element gefunden",noMatchingItemsSearch:'Keine passenden Elemente "{{search}}"',noMatchingItemsWithFilter:'Keine {{filter}} Elemente passend zu "{{search}}"',clearSearch:"Suche löschen",clearFilter:"Filter löschen",emptyFolderHint:"Dieser Ordner ist leer. Um Elemente in diesen Ordner zu verschieben, bearbeiten Sie das Element und wählen Sie diesen Ordner.",allItemsInFolders:"Alle Ihre Einträge sind in Ordnern organisiert. Tippen Sie auf einen Ordner oben, um Ihre Anmeldedaten anzuzeigen, oder verwenden Sie die Suche, um bestimmte Einträge zu finden.",deleteFolder:"Ordner löschen",deleteFolderKeepItems:"Nur Ordner löschen",deleteFolderKeepItemsDescription:"Items will be moved back to the main list.",deleteFolderAndItems:"Ordner und alle Einträge löschen",deleteFolderAndItemsDescription:"{{count}} item(s) will be moved to Recently Deleted.",filters:{folders:"Folders",passkeys:"Passkeys"},sort:{title:"Sortieren nach",oldestFirst:"Älteste zuerst",newestFirst:"Neuste zuerst",alphabetical:"Alphabetisch (A-Z)"},deleteItemTitle:"Eintrag löschen",deleteItemConfirm:"Bist Du sicher, dass Du diesen Eintrag löschen möchtest?",viewHistory:"Historie ansehen",history:"Historie",noHistoryAvailable:"Keine Historie verfügbar",tags:"Schlagwörter",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",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.",validation:{required:"Dieses Feld ist ein Pflichtfeld"}},Nx={selectType:"Neuen Eintrag hinzufügen",typeLabel:"Item Type",creating:"Wird erstellt",editing:"Bearbeiten",regenerateAlias:"Alias neu generieren",addCustomField:"Benutzerdefiniertes Feld hinzufügen",fieldLabel:"Feldbezeichnung",enterFieldName:"Feldnamen eingeben",fieldType:"Feldtyp",fieldTypes:{text:"Text",hidden:"Versteckt (versteckter Text)",email:"E-Mail",url:"URL",phone:"Telefon",number:"Nummer",date:"Date",textArea:"Mehrzeiliger Text"},login:{title:"Anmelden"},alias:{title:"Alias"},creditCard:{title:"Kreditkarte"},note:{title:"Sichere Notiz"}},Cx={"login.url":"Website URL","login.username":"Username","login.password":"Passwort","alias.first_name":"Vorname","alias.last_name":"Nachname","alias.gender":"Geschlecht","alias.birthdate":"Geburtsdatum","login.email":"E-Mail","notes.content":"Notizen","card.cardholder_name":"Name des Karteninhabers","card.number":"Kartennummer","card.expiry_month":"Ablaufmonat","card.expiry_year":"Ablaufjahr","card.cvv":"Sicherheitscode","card.pin":"PIN"},wx={addCode:"2FA-Code hinzufügen",instructions:"Gib den Secret-Key ein, der von der Website angezeigt wird, bei der Du die Zwei-Faktor-Authentifizierung hinzufügen möchtest.",nameOptional:"Name (optional)",secretKey:"Secret-Key",saveToViewCode:"Speichern, um den Code anzuzeigen",defaultName:"Authenticator",errors:{invalidSecretKey:"Ungültiges Format des Secret-Key"}},xx={uploading:"Hochladen...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},Sx={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",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.",offlineMessage:"Keine Verbindung. Bitte verbinde Dich mit dem Internet, um Deine E-Mails zu laden.",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"},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."}},Tx={serverUrl:"URL des Servers",language:"Sprache",autofillEnabled:"Autofill aktivieren",version:"Version",openWebApp:"Web-App öffnen",lock:"Sperren",globalSettings:"Allgemeine Einstellungen",autofillPopup:"Autofill-Popup",activeOnAllSites:"Auf allen Seiten aktiv (sofern nicht unten deaktiviert)",disabledOnAllSites:"Auf allen Seiten 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",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 ",autofillSettings:"Autofill-Einstellungen",clipboardSettings:"Zwischenablage-Einstellungen",contextMenuSettings:"Kontextmenü-Einstellungen",passkeySettings:"Passkey-Einstellungen",contextMenu:"Kontextmenü",contextMenuEnabled:"Kontextmenü ist aktiviert",contextMenuDisabled:"Kontextmenü ist deaktiviert",contextMenuDescription:"Rechtsklicke auf Eingabefelder, um auf AliasVault-Optionen zuzugreifen",selectLanguage:"Sprache auswählen",serverConfiguration:"Serverkonfiguration",serverConfigurationDescription:"AliasVault-Server-URL für selbstgehostete Instanzen konfigurieren",customApiUrl:"API-URL",customClientUrl:"Client-URL",apiUrlHint:"Die API-Endpunkt-URL (normalerweise Client-URL + /api)",clientUrlHint:"Die URL der Webschnittstelle Deiner selbst gehosteten Instanz",autofillSettingsDescription:"Aktiviere oder deaktiviere das Autofill-Popup auf Webseiten",autofillEnabledDescription:"Autofill-Vorschläge werden auf den Anmeldeformularen angezeigt",autofillDisabledDescription:"Autofill-Vorschläge sind global deaktiviert",languageSettings:"Sprache",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"},identityGenerator:"Identitätsgenerator",identityGeneratorSettings:{description:"Lege die Standardsprache und Geschlechtspräferenz für die Erstellung neuer Identitäten fest.",languageSection:"Sprache",languageDescription:"Lege die Sprache fest, die bei der Erstellung neuer Identitäten verwendet wird.",genderSection:"Geschlecht",genderDescription:"Lege die Geschlechtspräferenz für die Erstellung neuer Identitäten fest.",ageRangeSection:"Altersspanne",ageRangeDescription:"Lege die Altersspanne für die Erstellung neuer Identitäten fest.",genderOptions:{random:"Zufällig",male:"Männlich",female:"Weiblich"}},unlockMethod:{title:"Methode zum Entsperren des Tresors",introText:"Wähle, wie Du Deinen Tresor entsperren möchtest. Du kannst Dein Master-Passwort verwenden (immer verfügbar) oder einen PIN-Code für einen schnelleren Zugriff einrichten. Nach drei fehlgeschlagenen PIN-Versuchen musst Du Dein Master-Passwort verwenden.",password:"Master-Passwort",pin:"PIN-Code",pinDescription:"Tresor mit PIN entsperren",setupPin:"PIN-Code einrichten",enterNewPinDescription:"PIN-Code aus mindestens 6 Ziffern eingeben",confirmPin:"PIN bestätigen",confirmPinDescription:"Zur Bestätigung PIN erneut eingeben",invalidPinFormat:"Ungültiges PIN-Format",pinMismatch:"PINs stimmen nicht überein",incorrectPin:"Falsche PIN. {{attemptsRemaining}} verbleibende Versuche.",incorrectPinSingular:"Falsche PIN. Ein Versuch übrig.",enableSuccess:"PIN-Sperre erfolgreich aktiviert!",pinLocked:"Die PIN-Sperre wurde deaktiviert. Bitte nutze Dein Master-Passwort, um Deinen Tresor zu entsperren.",pinSecurityWarning:"Die PIN-Entsperre in der Browser-Erweiterung kann weniger sicher Dein Master-Passwort sein, da PINs typischerweise eine niedrigere Entropie haben und möglicherweise gebruteforced werden können, wenn Dein Gerät kompromittiert wird. Benutze es nur auf Geräten, denen Du vollkommen vertraust."}},kx={passkey:"Passkey",site:"Seite",helpText:"Passkeys werden auf der Webseite erzeugt. Sie können nicht manuell erstellt oder bearbeitet werden. Um diesen Passkey zu entfernen, kannst Du ihn von diesem Zugang löschen. Um einen Passkey zu ersetzen oder neu zu erstellen, rufe die entsprechende Webseite auf und folge den dortigen Anweisungen.",passkeyMarkedForDeletion:"Passkey zum Löschen vorgemerkt",passkeyWillBeDeleted:"Dieser Passkey wird gelöscht, wenn Du den Zugang speicherst.",useBrowserPasskey:"Browser-Passkey verwenden",bypass:{description:"Wie lange möchtest Du den Passkey-Anbieter des Browsers für {{origin}} verwenden?",thisTimeOnly:"Nur dieses Mal",alwaysForSite:"Für diese Seite immer"},authenticate:{title:"Mit Passkey anmelden",signInFor:"Mit Passkey anmelden für",selectPasskey:"Wähle einen Passkey zum Anmelden aus:",noPasskeysFound:"Kein Passkey für diese Seite gefunden"},create:{title:"Passkey erstellen",createFor:"Neuen Passkey erstellen für",titleLabel:"Titel",titlePlaceholder:"Gib einen Namen für diesen Passkey ein",createButton:"Passkey erstellen",selectPasskeyToReplace:"Wähle einen Passkey zum Ersetzen:",createNewPasskey:"Neuen Passkey erstellen",replacingPasskey:"Ersetzen des Passkeys: {{displayName}}",confirmReplace:"Ersetzen bestätigen",selectExistingLogin:"Add to existing login:",selectExistingLoginDescription:"Attach this passkey to an existing login credential for this site.",attachingToCredential:"Passkey zu {{serviceName}} hinzufügen",attachPasskey:"Passkey hinzufügen"},settings:{passkeyProvider:"Passkey-Anbieter",passkeyProviderOn:"Passkey-Anbieter an "}},Lx={title:"Kürzlich gelöscht",noItems:"Keine gelöschten Elemente",noItemsDescription:"Elemente, die du löscht, werden hier 30 Tage lang erscheinen, bevor sie endgültig entfernt werden.",description:"These items will be permanently deleted after 30 days. You can restore them or delete them immediately.",restore:"Restore",deletePermanently:"Dauerhaft löschen",emptyAll:"Empty All",daysRemaining_one:"{{count}} day remaining",daysRemaining_other:"Noch {{count}} Tage",expiringSoon:"Läuft bald ab",confirmDeleteTitle:"Dauerhaft löschen?",confirmDeleteMessage:"Dieses Element wird dauerhaft gelöscht und kann nicht wiederhergestellt werden.",confirmEmptyAllTitle:"Zuletzt gelöscht leeren?",confirmEmptyAllMessage:"Alle {{count}} Elemente werden dauerhaft gelöscht und können nicht wiederhergestellt werden."},Rx={title:"Tresor aktualisieren",subtitle:"AliasVault wurde aktualisiert. Dadurch muss auch Dein Tresor aktualisiert werden. Dies sollte nur wenige Sekunden dauern.",versionInformation:"Versionsinformationen",yourVault:"Version Deines Tresors:",newVersion:"Neue verfügbare Version:",upgrade:"Tresor aktualisieren",upgrading:"Aktualisieren...",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.",alerts:{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.",continueUpgrade:"Aktualisierung fortsetzen",upgradeFailed:"Aktualisierung fehlgeschlagen",failedToApplyMigration:"Migration fehlgeschlagen ({{current}} von {{total}})"}},Dx={unsyncedChangesTitle:"Nicht synchronisierte Änderungen",unsyncedChangesWarning:"Sie haben nicht synchronisierte Änderungen, die verloren gehen, wenn Sie sich jetzt abmelden. Sind Sie sicher, dass Sie fortfahren möchten?",logoutAnyway:"Trotzdem abmelden"},Bx={offline:"Offline",tapToRetry:"Tap to retry sync"},Ux={auth:yx,menu:Ex,common:bx,content:Ix,items:vx,itemTypes:Nx,fieldLabels:Cx,totp:wx,attachmentUploader:xx,emails:Sx,settings:Tx,passkeys:kx,recentlyDeleted:Lx,upgrade:Rx,logout:Dx,sync:Bx},Mx={loginTitle:"Log in to AliasVault",username:"Username or email",usernamePlaceholder:"name / name@company.com",passwordPlaceholder:"Enter your password",rememberMe:"Remember me",loginButton:"Log in",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",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",unlockWithPin:"Unlock with PIN",enterPinToUnlock:"Enter your PIN to unlock your vault",useMasterPassword:"Use Master Password",unlockTitle:"Unlock Your Vault",logoutConfirm:"Are you sure you want to logout?",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?",loginWithMobile:"Log in using Mobile App",unlockWithMobile:"Unlock using Mobile App",scanQrCode:"Scan this QR code with your AliasVault mobile app to log in and unlock your vault."},_x={vault:"Vault",emails:"Emails"},Fx={loading:"Loading...",notice:"Notice",error:"Error",cancel:"Cancel",confirm:"Confirm",back:"Back",next:"Next",use:"Use",add:"Add",delete:"Delete",undo:"Undo",save:"Save",saving:"Saving...",create:"Create",or:"Or",close:"Close",logout:"Logout",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",showDetails:"Show details",hideDetails:"Hide details",copyToClipboard:"Copy to clipboard",loadingEmails:"Loading emails...",loadingTotpCodes:"Loading TOTP codes...",attachments:"Attachments",loadingAttachments:"Loading attachments...",settings:"Settings",recentEmails:"Recent emails",credentials:"Credentials",customFields:"Custom Fields",twoFactorAuthentication:"Two-factor authentication",alias:"Alias",notes:"Notes",email:"Email",username:"Username",password:"Password",generate:"Generate",serviceName:"Service Name",loggedIn:"Logged in",syncingVault:"Syncing vault",checkingVaultUpdates:"Checking for vault updates",syncingUpdatedVault:"Syncing updated vault",loadMore:"Load more",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Merging vault changes...",uploadingVault:"Uploading vault...",errors:{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.",browserExtensionOutdated:"This browser extension is outdated and cannot be used to access this vault. Please update this browser extension to continue.",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.",serverVersionTooOld:"The AliasVault server needs to be updated to a newer version in order to use this feature. Please contact the server admin if you need help.",unknownError:"An unknown error occurred",unknownErrorTryAgain:"An unknown error occurred. Please try again.",vaultNotAvailable:"Vault not available",vaultIsLocked:"Vault is locked",passwordChanged:"Your password has changed since the last time you logged in. Please login again for security reasons.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again.",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.",wrongPassword:"Incorrect password. Please try again.",sessionExpired:"Your session has expired. Please log in again.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."},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.",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."}},Ox={or:"or",new:"New",vaultLocked:"AliasVault is locked.",creatingNewAlias:"Creating new alias...",noMatchesFound:"No matches found",searchVault:"Search vault...",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",openAliasVaultToUpgrade:"Open AliasVault to upgrade",vaultUpgradeRequired:"Vault upgrade required.",dismissPopup:"Dismiss popup"},jx={title:"Items",itemName:"Name",loginCredentials:"Login Credentials",cardInformation:"Card Information",addItem:"Add Item",addNewItem:"Add new item",saveItem:"Save Item",itemDetails:"Item Details",editItem:"Edit Item",untitled:"Untitled",newFolder:"New Folder",createFolder:"Create Folder",editFolder:"Edit Folder",folderName:"Folder Name",folderNameRequired:"Folder name is required",folder:"Folder",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.",noPasskeysFound:"No passkeys have been created yet. Passkeys are created by visiting a website that offers passkeys as an authentication method.",noAttachmentsFound:"No items with attachments found",noItemsOfTypeFound:"No {{type}} items found",noMatchingItems:"No matching items found",noMatchingItemsSearch:'No items matching "{{search}}"',noMatchingItemsWithFilter:'No {{filter}} items matching "{{search}}"',clearSearch:"Clear search",clearFilter:"Clear filter",emptyFolderHint:"This folder is empty. To move items to this folder, edit the item and tap the folder icon in the name field.",allItemsInFolders:"All your items are organized in folders. Click a folder above to view your credentials, or use the search to find specific items.",deleteFolder:"Delete Folder",deleteFolderKeepItems:"Delete folder only",deleteFolderKeepItemsDescription:"Items will be moved back to the main list.",deleteFolderAndItems:"Delete folder and all items",deleteFolderAndItemsDescription:"{{count}} item(s) will be moved to Recently Deleted.",filters:{folders:"Folders",passkeys:"Passkeys"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Delete Item",deleteItemConfirm:"Are you sure you want to delete this item?",viewHistory:"View history",history:"History",noHistoryAvailable:"No history available",tags:"Tags",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.)",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.",validation:{required:"This field is required"}},Px={selectType:"Add New Item",typeLabel:"Item Type",creating:"Creating",editing:"Editing",regenerateAlias:"Regenerate alias",addCustomField:"Add custom field",fieldLabel:"Field Label",enterFieldName:"Enter field name",fieldType:"Field Type",fieldTypes:{text:"Text",hidden:"Hidden (masked text)",email:"Email",url:"URL",phone:"Phone",number:"Number",date:"Date",textArea:"Text Area"},login:{title:"Login"},alias:{title:"Alias"},creditCard:{title:"Credit Card"},note:{title:"Secure Note"}},Hx={"login.url":"Website URL","login.username":"Username","login.password":"Password","alias.first_name":"First Name","alias.last_name":"Last Name","alias.gender":"Gender","alias.birthdate":"Birthdate","login.email":"Email","notes.content":"Notes","card.cardholder_name":"Cardholder Name","card.number":"Card Number","card.expiry_month":"Expiry Month","card.expiry_year":"Expiry Year","card.cvv":"CVV","card.pin":"PIN"},zx={addCode:"Add 2FA Code",instructions:"Enter the secret key shown by the website where you want to add two-factor authentication.",nameOptional:"Name (optional)",secretKey:"Secret Key",saveToViewCode:"Save to view code",defaultName:"Authenticator",errors:{invalidSecretKey:"Invalid secret key format."}},Qx={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},Vx={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",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.",offlineMessage:"You are offline. Please connect to the internet to load your emails.",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"},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."}},Gx={serverUrl:"Server URL",language:"Language",autofillEnabled:"Enable Autofill",version:"Version",openWebApp:"Open web app",lock:"Lock",globalSettings:"Global Settings",autofillPopup:"Autofill popup",activeOnAllSites:"Active on all sites (unless disabled below)",disabledOnAllSites:"Disabled on all sites",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",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 ",autofillSettings:"Autofill Settings",clipboardSettings:"Clipboard Settings",contextMenuSettings:"Context Menu Settings",passkeySettings:"Passkey 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",serverConfiguration:"Server Configuration",serverConfigurationDescription:"Configure the AliasVault server URL for self-hosted instances",customApiUrl:"API URL",customClientUrl:"Client URL",apiUrlHint:"The API endpoint URL (usually client URL + /api)",clientUrlHint:"The web interface URL of your self-hosted instance",autofillSettingsDescription:"Enable or disable the autofill popup on web pages",autofillEnabledDescription:"Autofill suggestions will appear on login forms",autofillDisabledDescription:"Autofill suggestions are disabled globally",languageSettings:"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"},identityGenerator:"Identity Generator",identityGeneratorSettings:{description:"Configure the default language and gender preference for generating new identities.",languageSection:"Language",languageDescription:"Set the language that will be used when generating new identities.",genderSection:"Gender",genderDescription:"Set the gender preference for generating new identities.",ageRangeSection:"Age Range",ageRangeDescription:"Set the age range for generating new identities.",genderOptions:{random:"Random",male:"Male",female:"Female"}},unlockMethod:{title:"Vault Unlock Method",introText:"Choose how you want to unlock your vault. You can use your master password (always available) or set up a PIN code for faster access. After 3 failed PIN attempts, you'll need to use your master password.",password:"Master Password",pin:"PIN Code",pinDescription:"Unlock vault with PIN code",setupPin:"Setup PIN Code",enterNewPinDescription:"Enter a PIN code consisting of minimum 6 digits",confirmPin:"Confirm PIN",confirmPinDescription:"Enter your PIN again to confirm",invalidPinFormat:"Invalid PIN format",pinMismatch:"PINs do not match",incorrectPin:"Incorrect PIN. {{attemptsRemaining}} attempts remaining.",incorrectPinSingular:"Incorrect PIN. 1 attempt remaining.",enableSuccess:"PIN unlock enabled successfully!",pinLocked:"PIN unlock has been disabled. Please use your master password to unlock your vault.",pinSecurityWarning:"PIN unlock in the browser extension can be less secure than your master password, as PINs typically have lower entropy and may be brute-forced if your device is compromised. Use it only on devices you fully trust."}},Kx={passkey:"Passkey",site:"Site",helpText:"Passkeys are created on the website when prompted. They cannot be manually edited. To remove this passkey, you can delete it from this credential. To replace this passkey or create a new one, visit the website and follow its prompts.",passkeyMarkedForDeletion:"Passkey marked for deletion",passkeyWillBeDeleted:"This passkey will be deleted when you save this credential.",useBrowserPasskey:"Use Browser Passkey",bypass:{description:"How long would you like to use the browser's passkey provider for {{origin}}?",thisTimeOnly:"This time only",alwaysForSite:"Always for this site"},authenticate:{title:"Sign in with Passkey",signInFor:"Sign in with passkey for",selectPasskey:"Select a passkey to sign in:",noPasskeysFound:"No passkeys found for this site"},create:{title:"Create Passkey",createFor:"Create a new passkey for",titleLabel:"Title",titlePlaceholder:"Enter a name for this passkey",createButton:"Create Passkey",selectPasskeyToReplace:"Select a passkey to replace:",createNewPasskey:"Create New Passkey",replacingPasskey:"Replacing passkey: {{displayName}}",confirmReplace:"Confirm Replace",selectExistingLogin:"Add to existing login:",selectExistingLoginDescription:"Attach this passkey to an existing login credential for this site.",attachingToCredential:"Adding passkey to: {{serviceName}}",attachPasskey:"Add Passkey"},settings:{passkeyProvider:"Passkey Provider",passkeyProviderOn:"Passkey Provider on "}},qx={title:"Recently Deleted",noItems:"No deleted items",noItemsDescription:"Items you delete will appear here for 30 days before being permanently removed.",description:"These items will be permanently deleted after 30 days. You can restore them or delete them immediately.",restore:"Restore",deletePermanently:"Delete Permanently",emptyAll:"Empty All",daysRemaining_one:"{{count}} day remaining",daysRemaining_other:"{{count}} days remaining",expiringSoon:"Expiring soon",confirmDeleteTitle:"Delete Permanently?",confirmDeleteMessage:"This item will be permanently deleted and cannot be recovered.",confirmEmptyAllTitle:"Empty Recently Deleted?",confirmEmptyAllMessage:"All {{count}} items will be permanently deleted and cannot be recovered."},Wx={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 version:",newVersion:"New available version:",upgrade:"Upgrade Vault",upgrading:"Upgrading...",whatsNew:"What's New",whatsNewDescription:"An upgrade is required to support the following changes:",noDescriptionAvailable:"No description available for this version.",alerts:{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.",continueUpgrade:"Continue Upgrade",upgradeFailed:"Upgrade Failed",failedToApplyMigration:"Failed to apply migration ({{current}} of {{total}})"}},Yx={unsyncedChangesTitle:"Unsynced Changes",unsyncedChangesWarning:"You have unsynced changes that will be lost if you log out now. Are you sure you want to continue?",logoutAnyway:"Log out anyway"},Jx={offline:"Offline",tapToRetry:"Tap to retry sync"},Xx={auth:Mx,menu:_x,common:Fx,content:Ox,items:jx,itemTypes:Px,fieldLabels:Hx,totp:zx,attachmentUploader:Qx,emails:Vx,settings:Gx,passkeys:Kx,recentlyDeleted:qx,upgrade:Wx,logout:Yx,sync:Jx},$x={loginTitle:"Iniciar sesión en AliasVault",username:"Nombre de usuario o correo electrónico",usernamePlaceholder:"nombre / nombre@empresa.com",passwordPlaceholder:"Introduzca su contraseña",rememberMe:"Recordar mis datos",loginButton:"Iniciar sesión",noAccount:"¿Sin cuenta todavía?",createVault:"Crear nueva bóveda",twoFactorTitle:"Por favor, introduzca el código de autenticación de su aplicación de autenticación.",authCode:"Código de autenticación",authCodePlaceholder:"Introduzca código de 6 dígitos",verify:"Verificar",twoFactorNote:"Nota: si no tiene acceso a su dispositivo de autenticación, puede restablecer su 2FA con un código de recuperación iniciando sesión a través del sitio web.",masterPassword:"Contraseña Maestra",unlockVault:"Desbloquear",unlockWithPin:"Desbloquear con PIN",enterPinToUnlock:"Introduzca su PIN para desbloquear su bóveda",useMasterPassword:"Usar Contraseña Maestra",unlockTitle:"Desbloquear tu Bóveda",logoutConfirm:"¿Estás seguro de que quieres cerrar sesión?",unlockSuccessTitle:"Tu bóveda se ha desbloqueado correctamente",unlockSuccessDescription:"Ahora puede utilizar el autocompletado en los formularios de inicio de sesión en su navegador.",closePopup:"Cerrar esta ventana emergente",browseVault:"Navegar en el contenido de la bóveda",connectingTo:"Conectando con",switchAccounts:"¿Cambiar de cuenta?",loginWithMobile:"Iniciar sesión con la aplicación móvil",unlockWithMobile:"Desbloquear con la aplicación móvil",scanQrCode:"Escanea este código QR con tu aplicación móvil de AliasVault para iniciar sesión y desbloquear tu bóveda."},Zx={vault:"Bóveda",emails:"Correos electrónicos"},eS={loading:"Cargando...",notice:"Aviso",error:"Error",cancel:"Cancelar",confirm:"Confirmar",back:"Atrás",next:"Siguiente",use:"Usar",add:"Añadir",delete:"Borrar",undo:"Deshacer",save:"Guardar",saving:"Guardando...",create:"Crear",or:"O",close:"Cerrar",logout:"Cerrar sesión",copied:"¡Copiado!",openInNewWindow:"Abrir en una ventana nueva",enabled:"Habilitado",disabled:"Desactivado",showPassword:"Mostrar contraseña",hidePassword:"Ocultar contraseña",showDetails:"Mostrar detalles",hideDetails:"Ocultar detalles",copyToClipboard:"Copiar al portapapeles",loadingEmails:"Cargando email...",loadingTotpCodes:"Cargando códigos TOTP...",attachments:"Archivos adjuntos",loadingAttachments:"Cargando archivos adjuntos...",settings:"Configuración",recentEmails:"Correos recientes",credentials:"Credenciales",customFields:"Campos Personalizados",twoFactorAuthentication:"Autenticación de doble factor",alias:"Alias",notes:"Notas",email:"Email",username:"Nombre de usuario",password:"Contraseña",generate:"Generar",serviceName:"Nombre del servicio",loggedIn:"Sesión iniciada",syncingVault:"Sincronizando bóveda",checkingVaultUpdates:"Comprobando actualizaciones de bóveda",syncingUpdatedVault:"Sincronizando bóveda actualizada",loadMore:"Cargar más",offline:"Desconectado",offlineMode:"Funcionando en modo sin conexión",pendingSync:"Sincronizando...",mergingVaultChanges:"Combinando cambios en la bóveda...",uploadingVault:"Subiendo bóveda...",errors:{serverNotAvailable:"El servidor AliasVault no está disponible. Por favor, inténtelo de nuevo más tarde o póngase en contacto con el soporte técnico si el problema persiste.",clientVersionNotSupported:"Esta versión de la extensión del navegador AliasVault ya no es compatible con el servidor. Por favor, actualice la extensión de su navegador a la última versión.",browserExtensionOutdated:"Esta extensión del navegador está desactualizada y no se puede utilizar para acceder a esta bóveda. Por favor, actualice esta extensión del navegador para continuar.",serverVersionNotSupported:"El servidor AliasVault necesita ser actualizado a una versión más reciente para poder usar esta extensión del navegador. Póngase en contacto con el soporte si necesita ayuda.",serverVersionTooOld:"El servidor AliasVault necesita ser actualizado a una versión más reciente para poder utilizar esta característica. Por favor, contacte con el administrador del servidor si necesita ayuda.",unknownError:"Se produjo un error desconocido",unknownErrorTryAgain:"Se ha producido un error desconocido. Por favor, inténtelo de nuevo.",vaultNotAvailable:"Bóveda no disponible",vaultIsLocked:"La bóveda está bloqueada",passwordChanged:"Tu contraseña ha cambiado desde la última vez que iniciaste sesión. Por favor, inicia sesión de nuevo por razones de seguridad.",syncConflictMaxRetries:"No se pudo sincronizar la bóveda después de múltiples intentos. Inténtalo de nuevo más tarde.",mergeFailed:"Error al combinar cambios en la bóveda. Por favor, inténtalo de nuevo.",invalidCode:"Por favor, introduzca un código de autenticación de 6 dígitos válido.",serverError:"No se pudo llegar al servidor AliasVault. Por favor, inténtelo de nuevo más tarde o póngase en contacto con el soporte si el problema persiste.",wrongPassword:"Contraseña incorrecta. Por favor, inténtelo de nuevo.",sessionExpired:"Su sesión ha caducado. Por favor, inicie sesión de nuevo.",mobileLoginRequestExpired:"Se ha agotado el tiempo de inicio de sesión del móvil. Por favor, vuelva a cargar la página e inténtelo de nuevo."},apiErrors:{UNKNOWN_ERROR:"Se ha producido un error desconocido. Por favor, inténtelo de nuevo.",ACCOUNT_LOCKED:"Cuenta bloqueada temporalmente debido a demasiados intentos fallidos. Por favor, inténtelo de nuevo.",ACCOUNT_BLOCKED:"Tu cuenta ha sido desactivada. Si crees que esto es un error, ponte en contacto con soporte.",USER_NOT_FOUND:"Nombre de usuario o contraseña no válidos. Por favor, inténtelo de nuevo.",INVALID_AUTHENTICATOR_CODE:"Código de autenticación inválido. Por favor, inténtelo de nuevo.",INVALID_RECOVERY_CODE:"Código de recuperación inválido. Por favor, inténtelo de nuevo.",REFRESH_TOKEN_REQUIRED:"Se requiere un token de actualización.",INVALID_REFRESH_TOKEN:"Token de actualización inválido.",PUBLIC_REGISTRATION_DISABLED:"El registro de nueva cuenta está actualmente deshabilitado en este servidor. Por favor, contacte con el administrador.",USERNAME_REQUIRED:"Se requiere un nombre de usuario.",USERNAME_ALREADY_IN_USE:"El nombre de usuario ya está en uso.",USERNAME_AVAILABLE:"El nombre de usuario está disponible.",USERNAME_MISMATCH:"El nombre de usuario no coincide con el usuario actual.",PASSWORD_MISMATCH:"La contraseña proporcionada no coincide con su contraseña actual.",ACCOUNT_SUCCESSFULLY_DELETED:"Cuenta eliminada con éxito.",USERNAME_EMPTY_OR_WHITESPACE:"El nombre de usuario no puede estar vacío o en blanco.",USERNAME_TOO_SHORT:"Nombre de usuario demasiado corto: debe tener al menos 3 caracteres.",USERNAME_TOO_LONG:"Nombre de usuario demasiado largo: no puede tener más de 40 caracteres.",USERNAME_INVALID_EMAIL:"Dirección de correo electrónico inválida.",USERNAME_INVALID_CHARACTERS:"El nombre de usuario inválido, solo puede contener letras o dígitos.",VAULT_NOT_UP_TO_DATE:"Su bóveda no está actualizada. Por favor, sincronice su bóveda e inténtelo de nuevo.",INTERNAL_SERVER_ERROR:"Error interno del servidor.",VAULT_ERROR:"La bóveda local no está actualizada. Por favor, sincronice su bóveda actualizando la página e inténtelo de nuevo."}},tS={or:"o",new:"Nuevo",vaultLocked:"AliasVault está bloqueado.",creatingNewAlias:"Creando nuevo alias...",noMatchesFound:"No se han encontrado resultados",searchVault:"Buscar bóveda...",enterServiceName:"Introduzca el nombre del servicio",enterEmailAddress:"Introduzca la dirección de correo electrónico",enterUsername:"Introduzca nombre de usuario",hideFor1Hour:"Ocultar durante 1 hora (sitio actual)",hidePermanently:"Ocultar permanentemente (sitio actual)",createRandomAlias:"Crear alias aleatorio",createUsernamePassword:"Crear nombre de usuario / contraseña",randomAlias:"Alias aleatorio",usernamePassword:"Nombre de usuario/Contraseña",createAndSaveAlias:"Crear y guardar alias",createAndSaveCredential:"Crear y guardar credencial",randomIdentityDescription:"Generar una identidad aleatoria con una dirección de correo electrónico aleatoria accesible en AliasVault.",randomIdentityDescriptionDropdown:"Identidad aleatoria con correo electrónico aleatorio",manualCredentialDescription:"Especifique su propia dirección de correo electrónico y nombre de usuario.",manualCredentialDescriptionDropdown:"Nombre de usuario y contraseña manual",failedToCreateIdentity:"Error al crear la identidad. Por favor, inténtalo de nuevo.",enterEmailAndOrUsername:"Introduzca email y/o nombre de usuario",autofillWithAliasVault:"AutoFill con AliasVault",generateRandomPassword:"Generar contraseña aleatoria (copiar al portapapeles)",generateNewPassword:"Generar nueva contraseña",togglePasswordVisibility:"Cambiar la visibilidad de la contraseña",passwordCopiedToClipboard:"Contraseña copiada al portapapeles",openAliasVaultToUpgrade:"Abrir AliasVault para actualizar",vaultUpgradeRequired:"Actualización de bóveda requerida.",dismissPopup:"Descartar aviso"},aS={title:"Elementos",itemName:"Nombre",loginCredentials:"Credenciales de inicio de sesión",cardInformation:"Información de la tarjeta",addItem:"Añadir elemento",addNewItem:"Añadir nuevo elemento",saveItem:"Guardar elemento",itemDetails:"Detalles del elemento",editItem:"Editar elemento",untitled:"Untitled",newFolder:"Nueva carpeta",createFolder:"Create Folder",editFolder:"Editar carpeta",folderName:"Nombre de la carpeta",folderNameRequired:"El nombre de la carpeta es obligatorio",folder:"Folder",welcomeTitle:"¡Bienvenido a AliasVault!",welcomeDescription:"Para utilizar la extensión del navegador AliasVault: vaya a un sitio web y utilice la ventana de autocompletado de AliasVault para crear una nueva credencial.",noPasskeysFound:"No se han creado llaves de acceso todavía. Las llaves se crean visitando un sitio web que ofrece llaves de acceso como método de autenticación.",noAttachmentsFound:"No hay elementos con archivos adjuntos",noItemsOfTypeFound:"No se encontraron elementos {{type}}",noMatchingItems:"No hay elementos coincidentes",noMatchingItemsSearch:'No hay elementos que coincidan con "{{search}}"',noMatchingItemsWithFilter:'No hay elementos {{filter}} que coincidan con "{{search}}"',clearSearch:"Limpiar búsqueda",clearFilter:"Eliminar filtros",emptyFolderHint:"Esta carpeta está vacía. Para mover elementos a esta carpeta, edite el elemento y pulse el icono de la carpeta en el campo nombre.",allItemsInFolders:"Todos sus elementos están organizados en carpetas. Haga clic en una carpeta para ver sus credenciales o utilice la búsqueda para encontrar elementos específicos.",deleteFolder:"Borrar carpeta",deleteFolderKeepItems:"Eliminar solo la carpeta",deleteFolderKeepItemsDescription:"Los elementos se moverán de nuevo a la lista principal.",deleteFolderAndItems:"Eliminar carpeta y todos los elementos",deleteFolderAndItemsDescription:"{{count}} elemento(s) serán movidos a Borrados Recientemente.",filters:{folders:"Carpetas",passkeys:"Llaves de acceso"},sort:{title:"Ordenar por",oldestFirst:"Más antiguos primero",newestFirst:"Más nuevos primero",alphabetical:"Alfabéticamente (A-Z)"},deleteItemTitle:"Eliminar elemento",deleteItemConfirm:"¿Está seguro de querer borrar este ítem?",viewHistory:"Ver historial",history:"Historial",noHistoryAvailable:"Sin historial disponible",tags:"Tags",changePasswordComplexity:"Cambiar complejidad de contraseña",passwordLength:"Longitud de la contraseña",includeLowercase:"Incluye letras minúsculas",includeUppercase:"Incluye letras mayúsculas",includeNumbers:"Incluye números",includeSpecialChars:"Incluye caracteres especiales",avoidAmbiguousChars:"Evita caracteres ambiguos (o, 0, etc.)",privateEmailTitle:"Correo electrónico privado",privateEmailAliasVaultServer:"Servidor AliasVault",privateEmailDescription:"E2E cifrado, totalmente privado.",publicEmailTitle:"Proveedores de Correo Temporal Públicos",publicEmailDescription:"Privacidad anónima pero limitada. Contenido de correo electrónico puede ser leído por cualquiera que conozca la dirección.",validation:{required:"Se requiere este campo"}},nS={selectType:"Añadir nuevo elemento",typeLabel:"Tipo de elemento",creating:"Creando",editing:"Editando",regenerateAlias:"Regenerar alias",addCustomField:"Añadir campo personalizado",fieldLabel:"Etiqueta del campo",enterFieldName:"Introduzca el nombre del campo",fieldType:"Tipo de campo",fieldTypes:{text:"Texto",hidden:"Oculto (texto enmascarado)",email:"Correo",url:"URL",phone:"Teléfono",number:"Número",date:"Date",textArea:"Área de texto"},login:{title:"Iniciar sesión"},alias:{title:"Alias"},creditCard:{title:"Tarjeta de crédito"},note:{title:"Nota segura"}},rS={"login.url":"URL de la web","login.username":"Nombre de usuario","login.password":"Contraseña","alias.first_name":"Nombre","alias.last_name":"Apellido","alias.gender":"Género","alias.birthdate":"Fecha de nacimiento","login.email":"Correo","notes.content":"Notas","card.cardholder_name":"Nombre titular","card.number":"Número de Tarjeta","card.expiry_month":"Mes de expiración","card.expiry_year":"Año de expiración","card.cvv":"CVV","card.pin":"PIN"},iS={addCode:"Añadir código 2FA",instructions:"Introduzca la clave secreta mostrada por el sitio web donde desea añadir autenticación de dos factores.",nameOptional:"Nombre (Opcional)",secretKey:"Clave secreta",saveToViewCode:"Guardar para ver el código",defaultName:"Autentificador",errors:{invalidSecretKey:"Formato de clave secreta inválida."}},sS={uploading:"Subiendo...",uploadSuccess:"Archivos subidos con éxito.",deleteSuccess:"Adjunto eliminado correctamente.",firefoxExpandRequired:"Para subir archivos, utilice la ventana ampliada.",openExpandedWindow:"Abrir ventana ampliada"},oS={title:"Correos electrónicos",deleteEmailTitle:"Eliminar correo",deleteEmailConfirm:"¿Está seguro que desea eliminar permanentemente este correo electrónico?",from:"De",to:"Para",date:"Fecha",emailContent:"Contenido del correo electrónico",emailNotFound:"Correo electrónico no encontrado",noEmails:"No se han encontrado correos electrónicos",noEmailsDescription:"No has recibido ningún correo electrónico en tus direcciones privadas todavía. Cuando recibas un nuevo correo electrónico, aparecerá aquí.",offlineMessage:"Está desconectado. Por favor, conéctese a Internet para cargar sus correos electrónicos.",dateFormat:{justNow:"ahora mismo",minutesAgo_single:"Hace {{count}} min",minutesAgo_plural:"Hace {{count}} min",hoursAgo_single:"Hace {{count}} h",hoursAgo_plural:"Hace {{count}} h",yesterday:"ayer"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"La dirección de correo electrónico elegida actualmente ya está en uso. Por favor, cambie la dirección de correo electrónico editando esta credencial.",CLAIM_DOES_NOT_EXIST:"Ocurrió un error mientras se trataba de cargar los correos electrónicos. Por favor, intente editar y guardar la entrada de credenciales para sincronizar la base de datos, y vuelva a intentarlo."}},lS={serverUrl:"URL del servidor",language:"Idioma",autofillEnabled:"Activar autocompletado",version:"Versión",openWebApp:"Abrir la aplicación web",lock:"Bloquear",globalSettings:"Ajustes globales",autofillPopup:"Ventana de autorrellenado",activeOnAllSites:"Activo en todos los sitios (a menos que se deshabilite debajo)",disabledOnAllSites:"Deshabilitado en todos los sitios",rightClickContextMenu:"Menú contextual del clic derecho",autofillMatching:"Coincidencia de autocompletado",autofillMatchingMode:"Modo de coincidencia de autocompletado",autofillMatchingModeDescription:"Determina qué credenciales se consideran coincidentes y se muestran como sugerencias en el popup de autorrelleno de un sitio web determinado.",autofillMatchingDefault:"URL + subdominio + nombre wildcard",autofillMatchingUrlSubdomain:"URL + subdominio",autofillMatchingUrlExact:"Solo URL exacta",siteSpecificSettings:"Ajustes específicos del sitio",autofillPopupOn:"Ventana de autorrelleno ",enabledForThisSite:"Habilitado para este sitio",disabledForThisSite:"Deshabilitado para este sitio",temporarilyDisabledUntil:"Deshabilitado temporalmente hasta ",resetAllSiteSettings:"Reiniciar todos los ajustes específicos del sitio",appearance:"Apariencia",theme:"Tema",useDefault:"Uso por defecto",light:"Claro",dark:"Oscuro",keyboardShortcuts:"Atajos de teclado",configureKeyboardShortcuts:"Configurar atajos de teclado",configure:"Configurar",clipboardClearTimeout:"Limpiar portapapeles después de copiar",clipboardClearTimeoutDescription:"Limpiar automáticamente el portapapeles después de copiar datos sensibles",clipboardClearDisabled:"Nunca limpiar",clipboardClear5Seconds:"Limpiar después 5 segundos",clipboardClear10Seconds:"Limpiar después 10 segundos",clipboardClear15Seconds:"Limpiar después 15 segundos",autoLockTimeout:"Tiempo de bloqueo automático",autoLockTimeoutDescription:"Bloquear automáticamente la bóveda después de un período de inactividad",autoLockTimeoutHelp:"La bóveda sólo se bloqueará después del período especificado de inactividad (no se abrirá el uso de autocompletado o la ventana emergente). La bóveda siempre se bloqueará cuando el navegador esté cerrado, independientemente de esta configuración.",autoLockNever:"Nunca",autoLock15Seconds:"15 segundos",autoLock1Minute:"1 minuto",autoLock5Minutes:"5 minutos",autoLock15Minutes:"15 minutos",autoLock30Minutes:"30 minutos",autoLock1Hour:"1 hora",autoLock4Hours:"4 horas",autoLock8Hours:"8 horas",autoLock24Hours:"24 horas",versionPrefix:"Versión ",autofillSettings:"Ajustes de autocompletado",clipboardSettings:"Ajustes del portapapeles",contextMenuSettings:"Ajustes del menú contextual",passkeySettings:"Ajustes de llaves de acceso",contextMenu:"Menú Contextual",contextMenuEnabled:"El menú contextual está activado",contextMenuDisabled:"El menú contextual está desactivado",contextMenuDescription:"Haga clic derecho en los campos de entrada para acceder a las opciones de AliasVault",selectLanguage:"Seleccionar idioma",serverConfiguration:"Configuración del servidor",serverConfigurationDescription:"Configurar la URL del servidor AliasVault para instancias self-hosted",customApiUrl:"API URL",customClientUrl:"URL de Cliente",apiUrlHint:"La URL del endpoint de la API (generalmente URL del cliente + /api)",clientUrlHint:"La URL de la interfaz web de su instancia self-hosted",autofillSettingsDescription:"Activar o desactivar la ventana emergente de autorrelleno en páginas web",autofillEnabledDescription:"Las sugerencias de autorrelleno aparecerán en los formularios de inicio de sesión",autofillDisabledDescription:"Las sugerencias de autorrelleno están desactivadas globalmente",languageSettings:"Idioma",validation:{apiUrlRequired:"La URL de la API es necesaria",apiUrlInvalid:"Por favor, introduzca una URL de API válida",clientUrlRequired:"La URL de cliente es necesaria",clientUrlInvalid:"Por favor, introduzca una URL de cliente válida"},identityGenerator:"Generador de identidad",identityGeneratorSettings:{description:"Configurar el idioma por defecto y la preferencia de género para generar nuevas identidades.",languageSection:"Idioma",languageDescription:"Establece el idioma que se utilizará al generar nuevas identidades.",genderSection:"Género",genderDescription:"Establecer la preferencia de género para generar nuevas identidades.",ageRangeSection:"Rango de edad",ageRangeDescription:"Establecer el rango de edad para generar nuevas identidades.",genderOptions:{random:"Aleatorio",male:"Hombre",female:"Mujer"}},unlockMethod:{title:"Método de desbloqueo de la bóveda",introText:"Elija cómo desea desbloquear su bóveda. Puede utilizar su contraseña maestra (siempre disponible) o configurar un código PIN para un acceso más rápido. Después de 3 intentos fallidos de PIN, necesitarás usar tu contraseña maestra.",password:"Contraseña Maestra",pin:"Código PIN",pinDescription:"Desbloquear bóveda con código PIN",setupPin:"Configurar código PIN",enterNewPinDescription:"Introduzca un código PIN que contenga un mínimo de 6 dígitos",confirmPin:"Confirmar PIN",confirmPinDescription:"Introduzca su PIN de nuevo para confirmar",invalidPinFormat:"Formato PIN inválido",pinMismatch:"Los PINs no coinciden",incorrectPin:"PIN incorrecto, {{attemptsRemaining}} intentos restantes.",incorrectPinSingular:"PIN incorrecto. 1 intento restante.",enableSuccess:"¡PIN activado con éxito!",pinLocked:"El desbloqueo con PIN ha sido deshabilitado. Por favor, utiliza tu contraseña maestra para desbloquear tu bóveda.",pinSecurityWarning:"El PIN de desbloqueo en la extensión del navegador puede ser menos seguro que su contraseña maestra, ya que los PIN típicamente tienen menos entropía y se pueden obtener por fuerza bruta si su dispositivo está en peligro. Úselo sólo en dispositivos en los que confíe plenamente."}},cS={passkey:"Llave de acceso",site:"Sitio",helpText:"Las llaves de acceso se crean en el sitio web cuando se le solicite. No pueden ser editadas manualmente. Para eliminar esta clave, puede eliminarla de esta credencial. Para reemplazar esta clave de acceso o crear una nueva, visite el sitio web y siga sus indicaciones.",passkeyMarkedForDeletion:"Llave de acceso marcada para eliminar",passkeyWillBeDeleted:"Esta llave de acceso se eliminará cuando guarde esta credencial.",useBrowserPasskey:"Usar llave de acceso del navegador",bypass:{description:"¿Cuánto tiempo quieres usar el proveedor de llaves de acceso del navegador para {{origin}}?",thisTimeOnly:"Solo esta vez",alwaysForSite:"Siempre para este sitio"},authenticate:{title:"Iniciar sesión con llave de acceso",signInFor:"Iniciar sesión con llave para",selectPasskey:"Seleccione una llave de acceso para iniciar sesión:",noPasskeysFound:"No se encontraron llaves de acceso para este sitio"},create:{title:"Crear llave de acceso",createFor:"Crear nueva llave de acceso para",titleLabel:"Título",titlePlaceholder:"Introduzca un nombre para esta llave de acceso",createButton:"Crear llave de acceso",selectPasskeyToReplace:"Seleccione una llave de acceso para reemplazar:",createNewPasskey:"Crear nueva llave de acceso",replacingPasskey:"Reemplazando llave de acceso: {{displayName}}",confirmReplace:"Confirmar reemplazo",selectExistingLogin:"Añadir al inicio de sesión existente:",selectExistingLoginDescription:"Adjuntar esta llave a una credencial de inicio de sesión existente para este sitio.",attachingToCredential:"Añadiendo llave a: {{serviceName}}",attachPasskey:"Añadir llave de acceso"},settings:{passkeyProvider:"Proveedor de llave de acceso",passkeyProviderOn:"Proveedor de llave de acceso en "}},uS={title:"Eliminados recientemente",noItems:"No hay elementos eliminados",noItemsDescription:"Los elementos que elimines aparecerán aquí durante 30 días antes de ser eliminados permanentemente.",description:"Estos elementos se eliminarán permanentemente después de 30 días. Puede restaurarlos o eliminarlos inmediatamente.",restore:"Restaurar",deletePermanently:"Eliminar permanentemente",emptyAll:"Vaciar todo",daysRemaining_one:"{{count}} día restante",daysRemaining_other:"{{count}} días restantes",expiringSoon:"Caduca pronto",confirmDeleteTitle:"¿Eliminar permanentemente?",confirmDeleteMessage:"Este elemento se eliminará permanentemente y no se puede recuperar.",confirmEmptyAllTitle:"¿Vaciar los recientemente eliminados?",confirmEmptyAllMessage:"Todos los elementos {{count}} se eliminarán permanentemente y no se podrán recuperar."},dS={title:"Actualizar bóveda",subtitle:"AliasVault se ha actualizado y tu bóveda necesita ser actualizada. Esto solo debería tardar unos segundos.",versionInformation:"Información de versión",yourVault:"Tu versión de bóveda:",newVersion:"Nueva versión disponible:",upgrade:"Actualizar bóveda",upgrading:"Actualizando...",whatsNew:"Novedades",whatsNewDescription:"Se requiere una actualización para soportar los siguientes cambios:",noDescriptionAvailable:"Ninguna descripción disponible para esta versión.",alerts:{unableToGetVersionInfo:"No se pudo obtener información de la versión. Por favor, inténtalo de nuevo.",selfHostedServer:"Servidor autoalojado",selfHostedWarning:"Si está utilizando un servidor autoalojado, asegúrese de actualizar su instancia autoalojada, ya que de lo contrario iniciar sesión en el cliente web dejará de funcionar.",continueUpgrade:"Continuar actualización",upgradeFailed:"Actualización fallida",failedToApplyMigration:"Error al migrar de ({{current}} a {{total}})"}},mS={unsyncedChangesTitle:"Cambios no sincronizados",unsyncedChangesWarning:"Tienes cambios no sincronizados que se perderán si te desconectas ahora. ¿Estás seguro de que quieres continuar?",logoutAnyway:"Cerrar sesión de todos modos"},gS={offline:"Sin conexión",tapToRetry:"Toca para reintentar sincronizar"},fS={auth:$x,menu:Zx,common:eS,content:tS,items:aS,itemTypes:nS,fieldLabels:rS,totp:iS,attachmentUploader:sS,emails:oS,settings:lS,passkeys:cS,recentlyDeleted:uS,upgrade:dS,logout:mS,sync:gS},hS={loginTitle:"Kirjaudu sisään AliasVaultiin",username:"Käyttäjänimi tai sähköposti",usernamePlaceholder:"nimi / nimi@yritys.fi",passwordPlaceholder:"Syötä salasanasi",rememberMe:"Muista minut",loginButton:"Kirjaudu sisään",noAccount:"Eikö tiliä vielä ole?",createVault:"Luo uusi holvi",twoFactorTitle:"Syötä tunnistautumiskoodi tunnistautumissovelluksestasi.",authCode:"Tunnistautumiskoodi",authCodePlaceholder:"Syötä 6-numeroinen koodi",verify:"Vahvista",twoFactorNote:"Huomautus: jos sinulla ei ole pääsyä tunnistautumislaitteeseen, voit palauttaa 2FA:n palautuskoodilla kirjautumalla sisään sivuston kautta.",masterPassword:"Pääsalasana",unlockVault:"Avaa lukitus",unlockWithPin:"Avaa PIN-koodilla",enterPinToUnlock:"Syötä PIN-koodi avataksesi holvisi",useMasterPassword:"Käytä pääsalasanaa",unlockTitle:"Avaa holvisi lukitus",logoutConfirm:"Oletko varma, että haluat kirjautua ulos?",unlockSuccessTitle:"Holvisi lukitus on avattu",unlockSuccessDescription:"Voit nyt käyttää automaattista täyttöä sisäänkirjautumislomakkeissa selaimessasi.",closePopup:"Sulje tämä ponnahdusikkuna",browseVault:"Selaa holvin sisältöä",connectingTo:"Yhdistetään kohteeseen",switchAccounts:"Vaihdetaanko tiliä?",loginWithMobile:"Kirjaudu sisään mobiilisovelluksella",unlockWithMobile:"Avaa käyttämällä mobiilisovellusta",scanQrCode:"Skannaa tämä QR-koodi AliasVault-mobiilisovelluksellasi kirjautuaksesi sisään ja avataksesi holvisi."},AS={vault:"Holvi",emails:"Sähköpostit"},pS={loading:"Ladataan...",notice:"Huomautus",error:"Virhe",cancel:"Peruuta",confirm:"Vahvista",back:"Takaisin",next:"Seuraava",use:"Käytä",add:"Lisää",delete:"Poista",undo:"Kumoa",save:"Tallenna",saving:"Saving...",create:"Luo",or:"Tai",close:"Sulje",logout:"Uloskirjautuminen",copied:"Kopioitu!",openInNewWindow:"Avaa uudessa ikkunassa",enabled:"Otettu käyttöön",disabled:"Pois käytöstä",showPassword:"Näytä salasana",hidePassword:"Piilota salasana",showDetails:"Näytä tiedot",hideDetails:"Piilota tiedot",copyToClipboard:"Kopioi leikepöydälle",loadingEmails:"Ladataan sähköposteja...",loadingTotpCodes:"Ladataan TOTP-koodeja...",attachments:"Liitteet",loadingAttachments:"Ladataan liitteitä...",settings:"Asetukset",recentEmails:"Viimeaikaiset sähköpostit",credentials:"Tunnistetiedot",customFields:"Räätälöidyt kentät",twoFactorAuthentication:"Kaksivaiheinen tunnistautuminen",alias:"Alias",notes:"Huomautukset",email:"Sähköposti",username:"Käyttäjänimi",password:"Salasana",generate:"Generate",serviceName:"Palvelun nimi",loggedIn:"Sisäänkirjautuneena",syncingVault:"Synkronoidaan holvia",checkingVaultUpdates:"Tarkistetaan holvin päivitysten varalta",syncingUpdatedVault:"Synkronoidaan päivitettyä holvia",loadMore:"Lataa lisää",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Yhdistetään holvin muutoksia...",uploadingVault:"Uploading vault...",errors:{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. Päivitä selaimen laajennus uusimpaan versioon.",browserExtensionOutdated:"Tämä selainlaajennus on vanhentunut, eikä sillä voi saada pääsyä tähän holviin. Päivitä tämä selainlaajennus jatkaaksesi.",serverVersionNotSupported:"AliasVault-palvelin on päivitettävä uudempaan versioon, jotta voit käyttää tätä selainlaajennusta. Ota yhteyttä tukeen, jos tarvitset apua.",serverVersionTooOld:"AliasVault-palvelin on päivitettävä uudempaan versioon, jotta se voi käyttää tätä ominaisuutta. Ota yhteyttä palvelimen ylläpitäjään jos tarvitset apua.",unknownError:"Tapahtui tuntematon virhe",unknownErrorTryAgain:"Tapahtui tuntematon virhe. Yritä uudelleen.",vaultNotAvailable:"Holvi ei käytettävissä",vaultIsLocked:"Holvi on lukittu",passwordChanged:"Salasanasi on muuttunut edellisen sisäänkirjautumisen jälkeen. Kirjaudu sisään uudelleen turvallisuussyistä.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again.",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.",wrongPassword:"Incorrect password. Please try again.",sessionExpired:"Your session has expired. Please log in again.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."},apiErrors:{UNKNOWN_ERROR:"Tapahtui tuntematon virhe. Yritä uudelleen.",ACCOUNT_LOCKED:"Tili 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:"Virkistyspoletti vaaditaan.",INVALID_REFRESH_TOKEN:"Virheellinen virkistyspoletti.",PUBLIC_REGISTRATION_DISABLED:"Uuden tilin rekisteröinti on tällä hetkellä 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änimi 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:"Tili poistettu.",USERNAME_EMPTY_OR_WHITESPACE:"Käyttäjänimi ei voi olla tyhjä eikä siinä voi olla välilyöntejä.",USERNAME_TOO_SHORT:"Käyttäjänimi liian lyhyt: sen on oltava vähintään 3 merkkiä pitkä.",USERNAME_TOO_LONG:"Käyttäjänimi liian pitkä: ei saa olla yli 40 merkkiä pidempi.",USERNAME_INVALID_EMAIL:"Virheellinen sähköpostiosoite.",USERNAME_INVALID_CHARACTERS:"Käyttäjänimi 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 virkistämällä sivu ja yritä uudelleen."}},yS={or:"tai",new:"Uusi",vaultLocked:"AliasVault on lukittu.",creatingNewAlias:"Luodaan uutta aliasta...",noMatchesFound:"Osumia ei löytynyt",searchVault:"Etsi holvi...",enterServiceName:"Syötä palvelun nimi",enterEmailAddress:"Syötä sähköpostiosoite",enterUsername:"Syötä käyttäjänimi",hideFor1Hour:"Piilota tunnin ajan (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 tunnistetieto",randomIdentityDescription:"Luo satunnainen identiteetti, jolla on satunnainen sähköpostiosoite, johon on pääsy AliasVaultissa.",randomIdentityDescriptionDropdown:"Satunnainen identiteetti satunnaisen sähköpostiosoitteen kanssa",manualCredentialDescription:"Määritä oma sähköpostiosoitteesi ja käyttäjänimesi.",manualCredentialDescriptionDropdown:"Manuaalinen käyttäjänimi ja salasana",failedToCreateIdentity:"Identiteetin luominen 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:"Salasanan näkyvyyden päälle/pois päältä kytkeminen",passwordCopiedToClipboard:"Salasana kopioitu leikepöydälle",openAliasVaultToUpgrade:"Avaa AliasVault päivittääksesi",vaultUpgradeRequired:"Holvin päivitys vaaditaan.",dismissPopup:"Hylkää ponnahdusikkuna"},ES={title:"Tiedot",itemName:"Nimi",loginCredentials:"Sisäänkirjautumistunnistetiedot",cardInformation:"Korttitiedot",addItem:"Lisää tieto",addNewItem:"Lisää uusi tieto",saveItem:"Tallenna tieto",itemDetails:"Näytä yksityiskohdat",editItem:"Muokkaa tietoa",untitled:"Nimetön",newFolder:"New Folder",createFolder:"Luo kansio",editFolder:"Edit Folder",folderName:"Folder Name",folderNameRequired:"Folder name is required",folder:"Kansio",welcomeTitle:"Tervetuloa AliasVaultiin!",welcomeDescription:"Käyttääksesi AliasVault-selainlaajennusta, siirry jollekin verkkosivustolle ja käytä AliasVaultin automaattisen täytön ponnahdusikkunaa luodaksesi uuden tunnistetiedon.",noPasskeysFound:"Todennusavaimia ei ole vielä luotu. Todennusavaimet on luotu vierailemalla verkkosivustolla, joka tarjoaa todennusavaimia todennusmenetelmänä.",noAttachmentsFound:"Liitteitä sisältäviä tietoja ei löytynyt",noItemsOfTypeFound:"No {{type}} tietoja ei löydy",noMatchingItems:"Vastaavia tietoja ei löytynyt",noMatchingItemsSearch:'No items matching "{{search}}"',noMatchingItemsWithFilter:'No {{filter}} items matching "{{search}}"',clearSearch:"Clear search",clearFilter:"Clear filter",emptyFolderHint:"This folder is empty. To move items to this folder, edit the item and tap the folder icon in the name field.",allItemsInFolders:"All your items are organized in folders. Click a folder above to view your credentials, or use the search to find specific items.",deleteFolder:"Delete Folder",deleteFolderKeepItems:"Delete folder only",deleteFolderKeepItemsDescription:"Items will be moved back to the main list.",deleteFolderAndItems:"Delete folder and all items",deleteFolderAndItemsDescription:"{{count}} item(s) will be moved to Recently Deleted.",filters:{folders:"Folders",passkeys:"Sala-avaimet"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Poista kohde",deleteItemConfirm:"Haluatko varmasti poistaa tämän kohteen?",viewHistory:"View history",history:"History",noHistoryAvailable:"No history available",tags:"Tunnisteet",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.)",privateEmailTitle:"Yksityinen sähköposti",privateEmailAliasVaultServer:"AliasVault-palvelin",privateEmailDescription:"Päästä päähän (E2E) salattu, täysin yksityinen.",publicEmailTitle:"Julkiset väliaikaisten sähköpostiosoitteiden tarjoajat (PTEP)",publicEmailDescription:"Anonyymi, mutta rajoitettu yksityisyys. Sähköpostin sisällön voi lukea kuka tahansa, joka tietää osoitteen.",validation:{required:"Tämä kenttä on pakollinen"}},bS={selectType:"Add New Item",typeLabel:"Item Type",creating:"Luodaan",editing:"Muokaataan",regenerateAlias:"Regenerate alias",addCustomField:"Add custom field",fieldLabel:"Kentän otsikko",enterFieldName:"Anna kentän nimi",fieldType:"Kentän tyyppi",fieldTypes:{text:"Teksti",hidden:"Hidden (masked text)",email:"Sähköposti",url:"URL",phone:"Puhelin",number:"Numero",date:"Päivämäärä",textArea:"Tekstialue"},login:{title:"Kirjaudu sisään"},alias:{title:"Alias"},creditCard:{title:"Luottokortti"},note:{title:"Secure Note"}},IS={"login.url":"Web-sivuston URL-osoite","login.username":"Käyttäjänimi","login.password":"Salasana","alias.first_name":"Etunimi","alias.last_name":"Sukunimi","alias.gender":"Sukupuoli","alias.birthdate":"Syntymäpäivä","login.email":"Sähköposti","notes.content":"Huomautukset","card.cardholder_name":"Kortinhaltijan nimi","card.number":"Kortin numero","card.expiry_month":"Vanhenemiskuukausi","card.expiry_year":"Vanhenemisvuosi","card.cvv":"CVV","card.pin":"PIN-koodi"},vS={addCode:"Lisää 2FA TOTP -koodi",instructions:"Syötä salainen avain, joka näkyy sivustossa, jossa haluat lisätä kaksivaiheisen tunnistautumisen",nameOptional:"Nimi (valinnainen)",secretKey:"Salainen avain",saveToViewCode:"Tallenna nähdäksesi koodin",defaultName:"Authenticator",errors:{invalidSecretKey:"Virheellinen salatun avaimen muoto."}},NS={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},CS={title:"Sähköpostit",deleteEmailTitle:"Poista sähköposti",deleteEmailConfirm:"Oletko varma, että haluat poistaa tämän sähköpostin pysyvästi?",from:"Lähettäjä",to:"Vastaanottaja",date:"Päivämäärä",emailContent:"Sähköpostin sisältö",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ä.",offlineMessage:"Olet offline-tilassa. Ole hyvä ja yhdistä internetiin ladataksesi sähköpostiosoitteesi.",dateFormat:{justNow:"juuri nyt",minutesAgo_single:"{{count}} min sitten",minutesAgo_plural:"{{count}} minuuttia sitten",hoursAgo_single:"{{count}} tunti sitten",hoursAgo_plural:"{{count}} tuntia sitten",yesterday:"eilen"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Nykyinen valittu sähköpostiosoite on jo käytössä. Vaihda sähköpostiosoite muokkaamalla tätä tunnistetietoa.",CLAIM_DOES_NOT_EXIST:"Tapahtui virhe ladattaessa sähköposteja. Yritä muokata ja tallentaa tunnistetiedot synkronoidaksesi tietokannan, ja yritä sitten uudelleen."}},wS={serverUrl:"Palvelimen URL-osoite",language:"Kieli",autofillEnabled:"Ota automaattinen täyttö käyttöön",version:"Versio",openWebApp:"Avaa verkkosovellus",lock:"Lukitse",globalSettings:"Yleisesti pätevät asetukset",autofillPopup:"Automaattisen täytön ponnahdusikkuna",activeOnAllSites:"Aktiivisena kaikilla sivustoilla (ellei sitä ole poistettu käytöstä alla)",disabledOnAllSites:"Pois käytöstä kaikilla sivustoilla",rightClickContextMenu:"Oikea-napsauta kontekstivalikkoa",autofillMatching:"Automaattisen täytön täsmäytys",autofillMatchingMode:"Automaattisen täytön täsmäytystila",autofillMatchingModeDescription:"Määrittää, mitkä tunnistetiedot katsotaan osumiksi ja näytetään ehdotuksina tietyn verkkosivuston automaattisen täytön ponnahdusikkunassa.",autofillMatchingDefault:"URL + aliverkkotunnus + nimi jokerimerkki",autofillMatchingUrlSubdomain:"URL + aliverkkotunnus",autofillMatchingUrlExact:"Tarkka URL-verkkotunnus vain",siteSpecificSettings:"Sivustokohtaiset asetukset",autofillPopupOn:"Automaattisen täytön ponnahdusikkuna päällä: ",enabledForThisSite:"Otettu käyttöön tällä sivustolla",disabledForThisSite:"Poistettu käytöstä tällä sivustolla",temporarilyDisabledUntil:"Väliaikaisesti pois käytöstä, kunnes ",resetAllSiteSettings:"Nollaa kaikki sivustokohtaiset asetukset",appearance:"Ulkoasu",theme:"Teema",useDefault:"Käytä oletusta",light:"Vaalea",dark:"Tumma",keyboardShortcuts:"Näppäimistön pikanppäimet",configureKeyboardShortcuts:"Määritä näppäimistön pikanäppäimet",configure:"Määritä",clipboardClearTimeout:"Tyhjennä leikepöytä kopioimisen jälkeen",clipboardClearTimeoutDescription:"Tyhjennä leikepöytä automaattisesti arkaluonteisten tietojen kopioimisen jälkeen",clipboardClearDisabled:"Älä koskaan tyhjennä",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ömyysjakson jälkeen",autoLockTimeoutHelp:"Holvi lukittuu vasta määritetyn käyttämättömyysjakson jälkeen (ei automaattista täyttöä tai laajennusten ponnahdusikkunoita ole avattu). Holvi lukittuu aina, kun selain suljetaan, 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",autofillSettings:"Automaatisen täytön asetukset",clipboardSettings:"Leikepöydän asetukset",contextMenuSettings:"Kontekstivalikon asetukset",passkeySettings:"Todennusavainten asetukset",contextMenu:"Sisältövalikko",contextMenuEnabled:"Kontekstivalikko on otettu käyttöön",contextMenuDisabled:"Kontekstivalikko on poistettu käytöstä",contextMenuDescription:"Oikea-napsauta syöttökenttiä päästäksesi AliasVaultin vaihtoehtoihin",selectLanguage:"Valitse kieli",serverConfiguration:"Palvelimen asetukset",serverConfigurationDescription:"Määritä AliasVault-palvelimen URL-osoite itse isännöityille instanssille",customApiUrl:"API-URL-osoite",customClientUrl:"Asiakas-URL-osoite",apiUrlHint:"API päätepisteen URL (yleensä asiakkaan URL + /api)",clientUrlHint:"Web-käyttöliittymän URL-osoite itse isännöidyssä instanssissa",autofillSettingsDescription:"Ota käyttöön tai poista käytöstä automaattisen täytön ponnahdusikkuna verkkosivuilta",autofillEnabledDescription:"Automaattisen täytön ehdotukset näkyvät kirjautumislomakkeissa",autofillDisabledDescription:"Automaattitäyttöehdotukset on poistettu käytöstä kaikkialla",languageSettings:"Keili",validation:{apiUrlRequired:"API-URL-osoite vaaditaan",apiUrlInvalid:"Syötä kelvollinen API-URL-osoite",clientUrlRequired:"Asiakkaan URL-osoite vaaditaan",clientUrlInvalid:"Syötä kelvollinen asiakas-URL-osoite"},identityGenerator:"Identiteetin luonti",identityGeneratorSettings:{description:"Määritä oletuskieli- ja sukupuoliasetukset uusien käyttäjätunnusten luontia varten.",languageSection:"Kieli",languageDescription:"Aseta kieli, jota käytetään luotaessa uusia henkilöllisyyksiä.",genderSection:"Sukupuoli",genderDescription:"Aseta oletussukupuoli uusien henkilöllisyyksien luomiseksi. ",ageRangeSection:"Ikähaarukka",ageRangeDescription:"Aseta ikähaarukka uusia henkilöllisyyksien luomisessa",genderOptions:{random:"Satunnainen",male:"Mies",female:"Nainen"}},unlockMethod:{title:"Holvin lukituksen avausmenetelmä",introText:"Valitse, miten haluat avata holvisi. Voit käyttää pääsalasanaa (aina saatavilla) tai määrittää nopean 4-8 numeroisen PIN-koodin nopeampaa käyttöä varten. Kolmen epäonnistuneen PIN-yrityksen jälkeen sinun on käytettävä pääsalasanaa.",password:"Pääsalasana",pin:"PIN-koodi",pinDescription:"Avaa holvi PIN-koodilla",setupPin:"PIN-koodin määrittäminen",enterNewPinDescription:"Syötä PIN-koodi, jossa on vähintään 6 numeroa",confirmPin:"Vahvista PIN",confirmPinDescription:"Syötä PIN-koodi uudelleen vahvistaaksesi",invalidPinFormat:"Virheellinen PIN-muoto",pinMismatch:"PIN-koodit eivät täsmää",incorrectPin:"Väärä PIN-koodi. {{attemptsRemaining}} yritystä jäljellä.",incorrectPinSingular:"Virheellinen PIN-koodi. 1 yritys jäljellä.",enableSuccess:"PIN-lukituksen avaus käytössä onnistuneesti!",pinLocked:"PIN-lukituksen avaus on poistettu käytöstä. Ole hyvä ja käytä pääsalasanaa avataksesi holvisi.",pinSecurityWarning:"PIN-koodin lukituksen poisto selaimen laajennuksessa voi olla vähemmän turvallista kuin pääsalasana, koska PIN-koodit ovat tyypillisesti alempia entropia ja voi olla brute-pakko jos laite on vaarassa. Käytä sitä vain laitteissa, joihin täysin luotat."}},xS={passkey:"Sala-avain",site:"Sivusto",helpText:"Todennusavaimet, Passkeys, luodaan sivustolle pyydettäessä. Niitä ei voi manuaalisesti muokata. Voit poistaa tämän salasanan, voit poistaa sen tästä käyttäjätunnuksesta. Voit korvata tämän salasanan tai luoda uuden, käy verkkosivuilla ja seuraa sen kehotuksia.",passkeyMarkedForDeletion:"Todennusavain merkitty poistettavaksi",passkeyWillBeDeleted:"Tämä todennusavain poistetaan, kun tallennat tämän käyttäjätiedon.",useBrowserPasskey:"Käytä selaimen sala-avainta",bypass:{description:"Kuinka kauan haluat käyttää selaimen todennusavaimen tarjoajaa {{origin}}?",thisTimeOnly:"Vain tällä kertaa",alwaysForSite:"Aina tällä sivustolla"},authenticate:{title:"Kirjaudu sisään todennusavaimella",signInFor:"Kirjaudu sisään todennusavaimella saadaksesi",selectPasskey:"Valitse todennusavain jolla kirjaudutaan",noPasskeysFound:"Tällä sivustolla ei löytynyt todennusavaimia"},create:{title:"Luo Passkey, todennusavain",createFor:"Luo uusi Passkey, todennusavain",titleLabel:"Otsikko",titlePlaceholder:"Anna nimi tälle todennusavaimelle",createButton:"Luo todennusavain, Passkey",selectPasskeyToReplace:"Valitse todennusavain, johon korvataan",createNewPasskey:"Luo uusi sala-avain",replacingPasskey:"Korvaava todennusavain: {{displayName}}",confirmReplace:"Vahvista korvaaminen",selectExistingLogin:"Add to existing login:",selectExistingLoginDescription:"Attach this passkey to an existing login credential for this site.",attachingToCredential:"Adding passkey to: {{serviceName}}",attachPasskey:"Add Passkey"},settings:{passkeyProvider:"Todennusavaimen toimittaja",passkeyProviderOn:"Todennusavaimen toimittaja käytössä "}},SS={title:"Recently Deleted",noItems:"No deleted items",noItemsDescription:"Items you delete will appear here for 30 days before being permanently removed.",description:"These items will be permanently deleted after 30 days. You can restore them or delete them immediately.",restore:"Restore",deletePermanently:"Delete Permanently",emptyAll:"Empty All",daysRemaining_one:"{{count}} day remaining",daysRemaining_other:"{{count}} days remaining",expiringSoon:"Expiring soon",confirmDeleteTitle:"Delete Permanently?",confirmDeleteMessage:"This item will be permanently deleted and cannot be recovered.",confirmEmptyAllTitle:"Empty Recently Deleted?",confirmEmptyAllMessage:"All {{count}} items will be permanently deleted and cannot be recovered."},TS={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:"Holvisi versio:",newVersion:"Uusi saatavilla oleva versio:",upgrade:"Päivitä holvi",upgrading:"Päivitetään...",whatsNew:"Mitä uutta?",whatsNewDescription:"Päivitys vaaditaan seuraavien muutosten tukemiseksi:",noDescriptionAvailable:"Tälle versiolle ei ole saatavilla kuvausta.",alerts:{unableToGetVersionInfo:"Versiotietojen hakeminen epäonnistui. Yritä uudelleen.",selfHostedServer:"Itseisännöity palvelin",selfHostedWarning:"Jos käytät itseisännöityä palvelinta, muista päivittää myös itseisännöity instanssisi, koska muuten verkkoasiakassovellukseen kirjautuminen lakkaa toimimasta.",continueUpgrade:"Jatka päivitystä",upgradeFailed:"Päivitys epäonnistui",failedToApplyMigration:"Siirron käyttöönotto epäonnistui ({{current}} / {{total}})"}},kS={unsyncedChangesTitle:"Synkronoimattomat muutokset",unsyncedChangesWarning:"Sinulla on synkronoimattomia muutoksia, jotka menetetään, jos kirjaudut ulos nyt. Oletko varma, että haluat jatkaa?",logoutAnyway:"Kirjaudu ulos joka tapauksessa"},LS={offline:"Offline",tapToRetry:"Tap to retry sync"},RS={auth:hS,menu:AS,common:pS,content:yS,items:ES,itemTypes:bS,fieldLabels:IS,totp:vS,attachmentUploader:NS,emails:CS,settings:wS,passkeys:xS,recentlyDeleted:SS,upgrade:TS,logout:kS,sync:LS},DS={loginTitle:"Se connecter à AliasVault",username:"Nom d'utilisateur ou email",usernamePlaceholder:"nom / nom@entreprise.com",passwordPlaceholder:"Saisissez votre mot de passe",rememberMe:"Se souvenir de moi",loginButton:"Se connecter",noAccount:"Pas de compte ?",createVault:"Créer un nouveau coffre",twoFactorTitle:"Veuillez entrer le code d'authentification de votre application d'authentification.",authCode:"Code d'authentification",authCodePlaceholder:"Saisissez le code à 6 chiffres",verify:"Vérifier",twoFactorNote:"Remarque : si vous n'avez pas accès à votre appareil d'authentification, vous pouvez réinitialiser votre authentification à double facteur avec un code de récupération en vous connectant via le site web.",masterPassword:"Mot de passe principal",unlockVault:"Déverrouiller",unlockWithPin:"Déverrouiller avec un code PIN",enterPinToUnlock:"Entrez votre code PIN pour déverrouiller votre coffre",useMasterPassword:"Utiliser le mot de passe principal",unlockTitle:"Déverrouiller votre coffre",logoutConfirm:"Êtes-vous sûr de vouloir vous déconnecter ?",unlockSuccessTitle:"Votre coffre a été déverrouillé avec succès",unlockSuccessDescription:"Vous pouvez maintenant utiliser le remplissage automatique des formulaires de connexion dans votre navigateur.",closePopup:"Fermer cette popup",browseVault:"Parcourir le contenu du coffre",connectingTo:"Connexion à",switchAccounts:"Changer de compte ?",loginWithMobile:"Se connecter à l'aide de l'application mobile",unlockWithMobile:"Déverrouiller en utilisant l'application mobile",scanQrCode:"Scannez ce code QR avec votre application mobile AliasVault pour vous connecter et déverrouiller votre coffre."},BS={vault:"Coffre-fort",emails:"Emails"},US={loading:"Chargement...",notice:"Notification",error:"Erreur",cancel:"Annuler",confirm:"Confirmer",back:"Retour",next:"Suivant",use:"Utiliser",add:"Ajouter",delete:"Supprimer",undo:"Annuler",save:"Sauvegarder",saving:"Sauvegarde...",create:"Créer",or:"Ou",close:"Fermer",logout:"Déconnexion",copied:"Copié !",openInNewWindow:"Ouvrir dans une nouvelle fenêtre",enabled:"Activé",disabled:"Désactivé",showPassword:"Afficher le mot de passe",hidePassword:"Cacher le mot de passe",showDetails:"Afficher les détails",hideDetails:"Masquer les détails",copyToClipboard:"Copier dans le presse-papiers",loadingEmails:"Chargement des emails...",loadingTotpCodes:"Chargement des codes TOTP...",attachments:"Pièces jointes",loadingAttachments:"Chargement des pièces jointes...",settings:"Réglages",recentEmails:"Emails récents",credentials:"Identifiants",customFields:"Champs Personnalisés",twoFactorAuthentication:"Authentification à double facteur",alias:"Alias",notes:"Notes",email:"Email",username:"Nom d'utilisateur",password:"Mot de passe",generate:"Générer",serviceName:"Nom du service",loggedIn:"Connecté(e)",syncingVault:"Synchronisation du coffre",checkingVaultUpdates:"Vérification des mises à jour du coffre",syncingUpdatedVault:"Synchronisation du coffre mis à jour",loadMore:"Voir plus",offline:"Hors ligne",offlineMode:"Fonctionnement en mode hors ligne",pendingSync:"Synchronisation...",mergingVaultChanges:"Fusion des modifications du coffre...",uploadingVault:"Envoi du coffre...",errors:{serverNotAvailable:"Le serveur d'AliasVault n'est pas disponible. Veuillez réessayer plus tard ou contacter le support si le problème persiste.",clientVersionNotSupported:"Cette version de l'extension de navigateur AliasVault n'est plus prise en charge par le serveur. Veuillez mettre à jour votre extension de navigateur à la dernière version.",browserExtensionOutdated:"Cette extension de navigateur est obsolète et ne peut pas être utilisée pour accéder à ce coffre-fort. Veuillez la mettre à jour pour continuer.",serverVersionNotSupported:"Le serveur d'AliasVault doit être mis à jour vers une version plus récente afin d'utiliser cette extension de navigateur. Veuillez contacter le support si vous avez besoin d'aide.",serverVersionTooOld:"Le serveur AliasVault doit être mis à jour vers une version plus récente pour pouvoir utiliser cette fonctionnalité. Veuillez contacter l'administrateur du serveur si vous avez besoin d'aide.",unknownError:"Une erreur inconnue s'est produite",unknownErrorTryAgain:"Une erreur inconnue s'est produite. Merci de réessayer.",vaultNotAvailable:"Coffre non disponible",vaultIsLocked:"Le coffre est verrouillé",passwordChanged:"Votre mot de passe a changé depuis la dernière fois que vous vous êtes connecté. Veuillez vous reconnecter pour des raisons de sécurité.",syncConflictMaxRetries:"Impossible de synchroniser le coffre après plusieurs tentatives. Veuillez réessayer plus tard.",mergeFailed:"Impossible de fusionner les modifications du coffre. Veuillez réessayer.",invalidCode:"Veuillez entrer un code d'authentification valide à 6 chiffres.",serverError:"Impossible d'accéder au serveur AliasVault. Veuillez réessayer plus tard ou contacter le support si le problème persiste.",wrongPassword:"Mot de passe incorrect, veuillez réessayer.",sessionExpired:"Votre session a expiré. Veuillez vous reconnecter.",mobileLoginRequestExpired:"La demande de connexion de l'application mobile a expiré. Veuillez recharger la page et réessayer."},apiErrors:{UNKNOWN_ERROR:"Une erreur inconnue s'est produite. Merci de réessayer.",ACCOUNT_LOCKED:"Compte temporairement verrouillé en raison d'un trop grand nombre de tentatives infructueuses. Veuillez réessayer plus tard.",ACCOUNT_BLOCKED:"Votre compte a été désactivé. Si vous pensez que c'est une erreur, veuillez contacter le support.",USER_NOT_FOUND:"Nom d'utilisateur ou mot de passe invalide. Veuillez réessayer.",INVALID_AUTHENTICATOR_CODE:"Code d'authentification invalide. Veuillez réessayer.",INVALID_RECOVERY_CODE:"Code de récupération invalide. Veuillez réessayer.",REFRESH_TOKEN_REQUIRED:"Un jeton d'actualisation est requis.",INVALID_REFRESH_TOKEN:"Jeton d'actualisation invalide.",PUBLIC_REGISTRATION_DISABLED:"L'enregistrement d'un nouveau compte est actuellement désactivé sur ce serveur. Veuillez contacter l'administrateur.",USERNAME_REQUIRED:"Nom d’utilisateur requis.",USERNAME_ALREADY_IN_USE:"Nom d'utilisateur déjà utilisé.",USERNAME_AVAILABLE:"Ce nom d'utilisateur est disponible.",USERNAME_MISMATCH:"Le nom d'utilisateur ne correspond pas à l'utilisateur actuel.",PASSWORD_MISMATCH:"Le mot de passe indiqué ne correspond pas à votre mot de passe actuel.",ACCOUNT_SUCCESSFULLY_DELETED:"Compte supprimé avec succès.",USERNAME_EMPTY_OR_WHITESPACE:"Le nom d'utilisateur ne peut pas être vide ou contenir un espace.",USERNAME_TOO_SHORT:"Le nom d'utilisateur est trop court : il doit comporter au moins 3 caractères.",USERNAME_TOO_LONG:"Le nom d'utilisateur est trop long : il ne peut pas contenir plus de 40 caractères.",USERNAME_INVALID_EMAIL:"Adresse e-mail invalide.",USERNAME_INVALID_CHARACTERS:"Le nom d'utilisateur n'est pas valide, il ne peut contenir que des lettres ou des chiffres.",VAULT_NOT_UP_TO_DATE:"Votre coffre n'est pas à jour. Veuillez synchroniser votre coffre et réessayer.",INTERNAL_SERVER_ERROR:"Erreur interne du serveur.",VAULT_ERROR:"Le coffre local n'est pas à jour. Veuillez synchroniser votre coffre en rafraîchissant la page et réessayez."}},MS={or:"ou",new:"Nouveautés",vaultLocked:"AliasVault est verrouillé.",creatingNewAlias:"Création de nouveaux alias...",noMatchesFound:"Aucun résultat trouvé",searchVault:"Rechercher dans le coffre...",enterServiceName:"Entrez le nom du service",enterEmailAddress:"Entrer l'adresse email",enterUsername:"Entrez le nom d'utilisateur",hideFor1Hour:"Cacher pendant 1 heure (site actuel)",hidePermanently:"Masquer définitivement (site actuel)",createRandomAlias:"Créer un alias aléatoire",createUsernamePassword:"Créer un nom d'utilisateur/mot de passe",randomAlias:"Alias aléatoire",usernamePassword:"Nom d’utilisateur / mot de passe",createAndSaveAlias:"Créer et enregistrer l'alias",createAndSaveCredential:"Créer et enregistrer les identifiants",randomIdentityDescription:"Générer une identité aléatoire avec une adresse email aléatoire accessible dans AliasVault.",randomIdentityDescriptionDropdown:"Identité aléatoire avec email aléatoire",manualCredentialDescription:"Spécifiez votre propre adresse email et nom d'utilisateur.",manualCredentialDescriptionDropdown:"Identifiant et mot de passe manuels",failedToCreateIdentity:"Échec de la création de l'identité. Veuillez réessayer.",enterEmailAndOrUsername:"Entrez l'adresse email et/ou le nom d'utilisateur",autofillWithAliasVault:"Remplissage automatique avec AliasVault",generateRandomPassword:"Générer un mot de passe aléatoire (copier dans le presse-papier)",generateNewPassword:"Générer un nouveau mot de passe",togglePasswordVisibility:"Afficher ou masquer le mot de passe",passwordCopiedToClipboard:"Mot de passe copié dans le presse-papiers",openAliasVaultToUpgrade:"Ouvrez AliasVault pour améliorer",vaultUpgradeRequired:"Mise à niveau du coffre requise.",dismissPopup:"Fermer"},_S={title:"Éléments",itemName:"Nom",loginCredentials:"Identifiants de connexion",cardInformation:"Informations de la carte",addItem:"Ajouter un élément",addNewItem:"Ajouter un nouvel élément",saveItem:"Enregistrer l'élément",itemDetails:"Détails de l’élément",editItem:"Editer l'élément",untitled:"Untitled",newFolder:"Nouveau dossier",createFolder:"Nouveau dossier",editFolder:"Éditer le dossier",folderName:"Nom du dossier",folderNameRequired:"Le nom du dossier est requis",folder:"Dossier",welcomeTitle:"Bienvenue dans AliasVault !",welcomeDescription:"Pour utiliser l'extension de navigateur AliasVault : accédez à un site web et utilisez la fenêtre de saisie automatique AliasVault pour créer un nouvel identifiant.",noPasskeysFound:"Aucune clé d'accès n'a encore été créée. Les clés d'accès sont créés en visitant un site Web qui propose des clés d'accès comme méthode d'authentification.",noAttachmentsFound:"Aucun élément avec pièces jointes trouvé",noItemsOfTypeFound:"Aucun élément {{type}} trouvé",noMatchingItems:"Aucun élément correspondant trouvé",noMatchingItemsSearch:'Aucun élément correspondant à "{{search}}"',noMatchingItemsWithFilter:'Aucun élément {{filter}} correspondant à "{{search}}"',clearSearch:"Effacer la recherche",clearFilter:"Effacer le filtre",emptyFolderHint:"Ce dossier est vide. Pour déplacer des éléments vers ce dossier, éditez l'élément et appuyez sur l'icône du dossier dans le champ nom.",allItemsInFolders:"Tous vos éléments sont organisés dans des dossiers. Appuyez sur un dossier ci-dessus pour voir vos identifiants, ou utilisez la recherche pour trouver des éléments spécifiques.",deleteFolder:"Supprimer le dossier",deleteFolderKeepItems:"Supprimer le dossier uniquement",deleteFolderKeepItemsDescription:"Les éléments seront déplacés dans la liste principale.",deleteFolderAndItems:"Supprimer le dossier et tous les éléments",deleteFolderAndItemsDescription:"{{count}} élément(s) vont être déplacés vers Récemment supprimés.",filters:{folders:"Dossiers",passkeys:"Clés d'accès"},sort:{title:"Trier par",oldestFirst:"Plus anciens en premier",newestFirst:"Les plus récents en premier",alphabetical:"Alphabétique (A-Z)"},deleteItemTitle:"Supprimer l'élement",deleteItemConfirm:"Êtes-vous certain de vouloir supprimer cet élément?",viewHistory:"Voir l'historique",history:"Historique",noHistoryAvailable:"Pas d'historique disponible",tags:"Mots-clés",changePasswordComplexity:"Changer la complexité du mot de passe",passwordLength:"Longueur du mot de passe",includeLowercase:"Inclure les lettres minuscules",includeUppercase:"Inclure les lettres majuscules",includeNumbers:"Inclure des chiffres",includeSpecialChars:"Inclure des caractères spéciaux",avoidAmbiguousChars:"Éviter les caractères ambigus (o, 0, etc.)",privateEmailTitle:"E-mail privé",privateEmailAliasVaultServer:"Serveur AliasVault",privateEmailDescription:"E2E chiffré, entièrement privé.",publicEmailTitle:"Fournisseurs d'email public temporaires",publicEmailDescription:"Anonyme mais confidentiel limitée. Le contenu des e-mails est lisible par toute personne qui connaît l'adresse.",validation:{required:"Ce champ est requis"}},FS={selectType:"Ajouter un nouvel élément",typeLabel:"Type d'élément",creating:"Création",editing:"Édition",regenerateAlias:"Régénérer l'alias",addCustomField:"Ajouter un champ personnalisé",fieldLabel:"Intitulé du champ",enterFieldName:"Entrez le nom du champ",fieldType:"Type de champ",fieldTypes:{text:"Texte",hidden:"Caché (texte masqué)",email:"Email",url:"URL",phone:"Téléphone",number:"Numéro",date:"Date",textArea:"Zone de texte"},login:{title:"Se connecter"},alias:{title:"Alias"},creditCard:{title:"Carte de crédit"},note:{title:"Note sécurisée"}},OS={"login.url":"URL du site","login.username":"Username","login.password":"Mot de passe","alias.first_name":"Prénom","alias.last_name":"Nom","alias.gender":"Genre","alias.birthdate":"Date de naissance","login.email":"Email","notes.content":"Notes","card.cardholder_name":"Nom du titulaire de la carte","card.number":"Numéro de la carte","card.expiry_month":"Mois d'expiration","card.expiry_year":"Année d'expiration","card.cvv":"CVV","card.pin":"PIN"},jS={addCode:"Ajouter un code 2FA",instructions:"Entrez la clé secrète affichée par le site Web où vous souhaitez ajouter l'authentification à deux facteurs.",nameOptional:"Nom (facultatif)",secretKey:"Clé secrète",saveToViewCode:"Enregistrer pour afficher le code",defaultName:"Authentificateur",errors:{invalidSecretKey:"Format de clé secrète invalide."}},PS={uploading:"Envoi...",uploadSuccess:"Fichiers envoyés avec succès.",deleteSuccess:"Pièce jointe supprimée avec succès.",firefoxExpandRequired:"Pour envoyer des fichiers, utilisez la fenêtre étendue.",openExpandedWindow:"Ouvrir la fenêtre étendue"},HS={title:"Emails",deleteEmailTitle:"Supprimer l'email",deleteEmailConfirm:"Êtes-vous sûr de vouloir supprimer définitivement cet email ?",from:"De",to:"À",date:"Date",emailContent:"Contenu de l'email",emailNotFound:"Email introuvable",noEmails:"Aucun email trouvé",noEmailsDescription:"Vous n'avez pas encore reçu d'emails dans vos adresses email privées. Quand vous recevez un nouvel email, il apparaîtra ici.",offlineMessage:"Vous êtes déconnecté. Veuillez vous connecter à internet pour charger vos e-mails.",dateFormat:{justNow:"maintenant",minutesAgo_single:"Il y a {{count}} minute",minutesAgo_plural:"Il y a {{count}} minutes",hoursAgo_single:"Il y a {{count}} heure",hoursAgo_plural:"Il y a {{count}} heures",yesterday:"hier"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"L'adresse email actuelle est déjà utilisée. Veuillez modifier l'adresse email en modifiant cet identifiant.",CLAIM_DOES_NOT_EXIST:"Une erreur s'est produite en essayant de charger les emails. Veuillez essayer de modifier et enregistrer les informations d'identification pour synchroniser la base de données, puis réessayez."}},zS={serverUrl:"URL du serveur",language:"Langue",autofillEnabled:"Activer le remplissage automatique",version:"Version",openWebApp:"Ouvrir l’application web",lock:"Verrouiller",globalSettings:"Paramètres généraux",autofillPopup:"Remplissage automatique de la popup",activeOnAllSites:"Activé sur tous les sites (sauf si désactivé ci-dessous)",disabledOnAllSites:"Désactivé sur tous les sites",rightClickContextMenu:"Clic-droit sur le menu contextuel",autofillMatching:"Correspondance de remplissage automatique",autofillMatchingMode:"Remplir automatiquement le mode correspondant",autofillMatchingModeDescription:"Détermine quels identifiants sont considérés comme une correspondance et sont affichés comme des suggestions dans la fenêtre de saisie automatique pour un site web donné.",autofillMatchingDefault:"URL + sous-domaine + nom générique",autofillMatchingUrlSubdomain:"URL + sous-domaine",autofillMatchingUrlExact:"Domaine d'URL exact uniquement",siteSpecificSettings:"Paramètres spécifiques au site",autofillPopupOn:"Popup de saisie automatique sur:  ",enabledForThisSite:"Activé pour ce site",disabledForThisSite:"Désactivé pour ce site",temporarilyDisabledUntil:"Temporairement désactivé jusqu'au ",resetAllSiteSettings:"Réinitialiser tous les paramètres spécifiques au site",appearance:"Apparence",theme:"Thème",useDefault:"Utiliser par défaut",light:"Clair",dark:"Sombre",keyboardShortcuts:"Raccourcis clavier",configureKeyboardShortcuts:"Configurer les raccourcis clavier",configure:"Configurer",clipboardClearTimeout:"Effacer le presse-papiers après copie",clipboardClearTimeoutDescription:"Effacer automatiquement le presse-papiers après copie des données sensibles",clipboardClearDisabled:"Ne jamais effacer",clipboardClear5Seconds:"Effacer après 5 secondes",clipboardClear10Seconds:"Effacer après 10 secondes",clipboardClear15Seconds:"Effacer après 15 secondes",autoLockTimeout:"Délai de verrouillage automatique",autoLockTimeoutDescription:"Verrouiller automatiquement le coffre après une période d'inactivité",autoLockTimeoutHelp:"Le coffre ne se verrouille qu'après la période d'inactivité spécifiée (aucune fenêtre pop-up de saisie automatique ou d'extension). Le coffre sera toujours verrouillé lorsque le navigateur sera fermé, quel que soit ce paramètre.",autoLockNever:"Jamais",autoLock15Seconds:"15 secondes",autoLock1Minute:"1 minute",autoLock5Minutes:"5 minutes",autoLock15Minutes:"15 minutes",autoLock30Minutes:"30 minutes",autoLock1Hour:"1 heure",autoLock4Hours:"4 heures",autoLock8Hours:"8 heures",autoLock24Hours:"24 heures",versionPrefix:"Version ",autofillSettings:"Paramètres du remplissage automatique",clipboardSettings:"Paramètres du presse-papiers",contextMenuSettings:"Paramètres du menu contextuel",passkeySettings:"Paramètres de la clé d'accès",contextMenu:"Menu contextuel",contextMenuEnabled:"Le menu contextuel est activé",contextMenuDisabled:"Le menu contextuel est désactivé",contextMenuDescription:"Faites un clic droit sur les champs de saisie pour accéder aux options d'AliasVault",selectLanguage:"Sélectionner une langue",serverConfiguration:"Configuration du serveur",serverConfigurationDescription:"Configurer l'URL du serveur AliasVault pour les instances auto-hébergées",customApiUrl:"URL de l'API",customClientUrl:"URL du client",apiUrlHint:"L'URL du point de terminaison de l'API (généralement l'URL du client + /api)",clientUrlHint:"L'URL de l'interface web de votre instance auto-hébergée",autofillSettingsDescription:"Activer ou désactiver la popup de saisie automatique sur les pages web",autofillEnabledDescription:"Les suggestions de saisie automatique apparaîtront dans les formulaires de connexion",autofillDisabledDescription:"Les suggestions de saisie automatique sont désactivées globalement",languageSettings:"Langue",validation:{apiUrlRequired:"L'URL de l'API est requise",apiUrlInvalid:"Veuillez entrer une URL d'API valide",clientUrlRequired:"L'URL du client est requise",clientUrlInvalid:"Veuillez entrer une URL de client valide"},identityGenerator:"Générateur d'identité",identityGeneratorSettings:{description:"Configurer la langue par défaut et la préférence de genre pour la génération de nouvelles identités.",languageSection:"Langue",languageDescription:"Définit la langue qui sera utilisée lors de la génération de nouvelles identités.",genderSection:"Genre",genderDescription:"Définissez la préférence de genre pour la génération de nouvelles identités.",ageRangeSection:"Tranche d'âge",ageRangeDescription:"Définit la tranche d'âge pour la génération de nouvelles identités.",genderOptions:{random:"Aléatoire",male:"Homme",female:"Femme"}},unlockMethod:{title:"Méthode de déverrouillage du coffre",introText:"Choisissez comment vous voulez déverrouiller votre coffre. Vous pouvez utiliser votre mot de passe principal (toujours disponible) ou configurer un code PIN pour un accès rapide. Après 3 tentatives de PIN échouées, vous devrez utiliser votre mot de passe maître.",password:"Mot de passe maître",pin:"Code PIN",pinDescription:"Déverrouiller le coffre avec le code PIN",setupPin:"Configurer le code PIN",enterNewPinDescription:"Entrez un code PIN composé d'au moins 6 chiffres",confirmPin:"Confirmer le code PIN",confirmPinDescription:"Saisissez à nouveau votre code PIN pour confirmer",invalidPinFormat:"Format de code PIN invalide",pinMismatch:"Les codes PIN ne correspondent pas",incorrectPin:"Code PIN incorrect, {{attemptsRemaining}} tentatives restantes.",incorrectPinSingular:"Code PIN incorrect. 1 tentative restante.",enableSuccess:"Déverrouillage par code PIN activé avec succès!",pinLocked:"Le déverrouillage par code PIN a été désactivé. Veuillez utiliser votre mot de passe maître pour déverrouiller votre coffre.",pinSecurityWarning:"Le déverrouillage par code PIN dans l'extension du navigateur peut être moins sécurisé que votre mot de passe principal, car les codes PIN ont généralement une entropie plus faible et peuvent être trouvés par brute force si votre appareil est compromis. Ne l'utilisez que sur les appareils de confiance totale."}},QS={passkey:"Clé d'accès",site:"Site",helpText:"Les clés d'accès sont créées sur le site Web lorsque vous y êtes invité. Elles ne peuvent pas être modifiées manuellement. Pour supprimer cette clé d'accès, vous pouvez la supprimer de cet identifiant. Pour remplacer cette clé d'accès ou en créer une nouvelle, visitez le site Web et suivez ses instructions.",passkeyMarkedForDeletion:"Clé d'accès marquée pour suppression",passkeyWillBeDeleted:"Cette clé d'accès sera supprimée lorsque vous enregistrerez cet identifiant.",useBrowserPasskey:"Utiliser la clé d'accès du navigateur",bypass:{description:"Combien de temps souhaitez-vous utiliser le fournisseur de clé d'accès du navigateur pour {{origin}}?",thisTimeOnly:"Cette fois seulement",alwaysForSite:"Toujours pour ce site"},authenticate:{title:"Se connecter avec une clé d’accès",signInFor:"Se connecter avec une clé d’accès pour",selectPasskey:"Sélectionnez une clé d'accès pour vous connecter:",noPasskeysFound:"Aucune clé d'accès trouvée pour ce site"},create:{title:"Créer une clé d'accès",createFor:"Créer une nouvelle clé d'accès pour",titleLabel:"Titre",titlePlaceholder:"Entrez un nom pour cette clé d'accès",createButton:"Créer clé d'accès",selectPasskeyToReplace:"Sélectionnez une clé d'accès à remplacer:",createNewPasskey:"Créer une nouvelle clé d'accès",replacingPasskey:"Remplacement de la clé d'accès : {{displayName}}",confirmReplace:"Confirmer le remplacement",selectExistingLogin:"Ajouter à l'identifiant existant :",selectExistingLoginDescription:"Joindre cette clé d'accès à un identifiant de connexion existant pour ce site.",attachingToCredential:"Ajout de la clé d'accès à : {{serviceName}}",attachPasskey:"Ajouter une clé d'accès"},settings:{passkeyProvider:"Fournisseur de clés d'accès",passkeyProviderOn:"Fournisseur de clé d'accès activé "}},VS={title:"Supprimé récemment",noItems:"Aucun élément supprimé",noItemsDescription:"Les éléments que vous supprimez apparaîtront ici pendant 30 jours avant d'être définitivement supprimés.",description:"Ces éléments seront définitivement supprimés après 30 jours. Vous pouvez les restaurer ou les supprimer immédiatement.",restore:"Restaurer",deletePermanently:"Supprimer définitivement",emptyAll:"Vider tout",daysRemaining_one:"{{count}} jour restant",daysRemaining_other:"{{count}} jours restants",expiringSoon:"Expirant bientôt",confirmDeleteTitle:"Supprimer définitivement?",confirmDeleteMessage:"Cet élément sera définitivement supprimé et ne pourra pas être récupéré.",confirmEmptyAllTitle:"Vider récemment supprimé ?",confirmEmptyAllMessage:"Tous les {{count}} éléments seront définitivement supprimés et ne pourront pas être récupérés."},GS={title:"Mettre à niveau le coffre",subtitle:"AliasVault a mis à jour et votre coffre doit être mis à niveau. Cela ne devrait prendre que quelques secondes.",versionInformation:"Informations de version",yourVault:"Votre version de coffre-fort :",newVersion:"Nouvelle version valable :",upgrade:"Mettre le coffre à niveau",upgrading:"Mise à niveau...",whatsNew:"Nouveautés",whatsNewDescription:"Une mise à niveau est nécessaire pour prendre en charge les modifications suivantes :",noDescriptionAvailable:"Aucune description disponible pour cette version.",alerts:{unableToGetVersionInfo:"Impossible d'obtenir les informations de version. Veuillez réessayer.",selfHostedServer:"Serveur auto-hébergé",selfHostedWarning:"Si vous utilisez un serveur auto-hébergé, assurez-vous également de mettre à jour votre instance auto-hébergée, sinon la connexion au client web cessera de fonctionner.",continueUpgrade:"Continuer la mise à jour",upgradeFailed:"Échec de la mise à niveau",failedToApplyMigration:"Impossible d'appliquer la migration ({{current}} sur {{total}})"}},KS={unsyncedChangesTitle:"Changements non synchronisés",unsyncedChangesWarning:"Vous avez des modifications non synchronisées qui seront perdues si vous vous déconnectez maintenant. Êtes-vous sûr de vouloir continuer ?",logoutAnyway:"Se déconnecter quand même"},qS={offline:"Hors ligne",tapToRetry:"Appuyez pour réessayer"},WS={auth:DS,menu:BS,common:US,content:MS,items:_S,itemTypes:FS,fieldLabels:OS,totp:jS,attachmentUploader:PS,emails:HS,settings:zS,passkeys:QS,recentlyDeleted:VS,upgrade:GS,logout:KS,sync:qS},YS={loginTitle:"כניסה ל־AliasVault",username:"שם משתמש או דוא״ל",usernamePlaceholder:"שם / name@company.com",passwordPlaceholder:"נא למלא את הסיסמה שלך",rememberMe:"לזכור אותי",loginButton:"כניסה",noAccount:"אין לך חשבון עדיין?",createVault:"יצירת כספת חדשה",twoFactorTitle:"נא למלא את קוד האימות מיישומון המאמת שלך.",authCode:"קוד אימות",authCodePlaceholder:"נא למלא קוד באורך 6 ספרות",verify:"אימות",twoFactorNote:"לתשומת ליבך: אם אין לך גישה להתקן המאמת (authenticator) שלך, אפשר לאפס אימות דו־שלבי עם קוד שחזור על ידי כניסה דרך האתר.",masterPassword:"סיסמת על",unlockVault:"שחרור נעילה",unlockWithPin:"שחרור נעילה עם קוד אישי",enterPinToUnlock:"נא למלא את הקוד האישי שלך כדי לשחרר את הכספת שלך",useMasterPassword:"להשתמש בסיסמה על",unlockTitle:"שחרור נעילת הכספת שלך",logoutConfirm:"לצאת?",unlockSuccessTitle:"נעילת הכספת שלך נפתחה בהצלחה",unlockSuccessDescription:"מעתה ניתן להשתמש בהשלמה אוטומטית בטופסי כניסה בדפדפן שלך.",closePopup:"סגירת החלונית הצצה הזאת",browseVault:"עיון בתוכן הכספת",connectingTo:"מתבצעת התחברות אל",switchAccounts:"להחליף חשבונות?",loginWithMobile:"Log in using Mobile App",unlockWithMobile:"Unlock using Mobile App",scanQrCode:"Scan this QR code with your AliasVault mobile app to log in and unlock your vault."},JS={vault:"Vault",emails:"הודעות דוא״ל"},XS={loading:"בטעינה…",notice:"לתשומת ליבך",error:"שגיאה",cancel:"ביטול",confirm:"אישור",back:"חזרה",next:"הבא",use:"להשתמש",add:"Add",delete:"מחיקה",undo:"הסגה",save:"שמירה",saving:"Saving...",create:"יצירה",or:"או",close:"סגירה",logout:"יציאה",copied:"הועתק!",openInNewWindow:"פתיחה בחלון חדש",enabled:"פעיל",disabled:"כבוי",showPassword:"הצגת סיסמה",hidePassword:"הסתרת סיסמה",showDetails:"הצגת פרטים",hideDetails:"הסתרת פרטים",copyToClipboard:"העתקה ללוח הגזירים",loadingEmails:"הודעות הדוא״ל נטענות…",loadingTotpCodes:"הקודים החד־פעמיים הזמניים נטענים…",attachments:"צרופות",loadingAttachments:"הצרופות נטענות…",settings:"הגדרות",recentEmails:"הודעות דוא״ל אחרונות",credentials:"פרטי גישה",customFields:"Custom Fields",twoFactorAuthentication:"אימות דו־שלבי",alias:"כינוי",notes:"הערות",email:"דוא״ל",username:"שם משתמש",password:"סיסמה",generate:"Generate",serviceName:"שם השירות",loggedIn:"נכנסת",syncingVault:"הכספת מסתנכרת",checkingVaultUpdates:"מתבצעת בדיקה לשינויים בכספת",syncingUpdatedVault:"הכספת העדכנית מסתנכרת",loadMore:"לטעון עוד",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Merging vault changes...",uploadingVault:"Uploading vault...",errors:{serverNotAvailable:"שרת ה־AliasVault לא זמין. נא לנסות שוב מאוחר יותר או ליצור קשר עם התמיכה אם הבעיה נשנית.",clientVersionNotSupported:"הגרסה הזאת של הרחבת הדפדפן של AliasVault לא נתמכת עוד על ידי השרת. נא לעדכן את הרחבת הדפדפן שלך לגרסה העדכנית ביותר.",browserExtensionOutdated:"הרחבת הדפדפן הזאת לא עדכנית ואי אפשר להשתמש בה כדי לגשת לכספת הזאת. נא לעדכן את הרחבת הדפדפן הזאת כדי להמשיך.",serverVersionNotSupported:"יש לעדכן את שרת AliasVault לגרסה חדשה יותר כדי להשתמש בהרחבת הדפדפן הזאת. נא ליצור קשר עם התמיכה לקבלת עזרה.",serverVersionTooOld:"The AliasVault server needs to be updated to a newer version in order to use this feature. Please contact the server admin if you need help.",unknownError:"אירעה שגיאה לא ידועה",unknownErrorTryAgain:"אירעה שגיאה לא ידועה, נא לנסות שוב.",vaultNotAvailable:"הכספת לא זמינה",vaultIsLocked:"הכספת נעולה",passwordChanged:"הסיסמה שלך השתנתה מאז הפעם האחרונה שנכנסת למערכת. נא להיכנס שוב מטעמי אבטחת מידע.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again.",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.",wrongPassword:"Incorrect password. Please try again.",sessionExpired:"Your session has expired. Please log in again.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."},apiErrors:{UNKNOWN_ERROR:"אירעה שגיאה לא ידועה, נא לנסות שוב.",ACCOUNT_LOCKED:"החשבון נעול זמנית עקב ריבוי ניסיונות כושלים. נא לנסות שוב מאוחר יותר.",ACCOUNT_BLOCKED:"החשבון שלך הושבת. אם לדעתך מדובר בטעות, נא ליצור קשר עם התמיכה.",USER_NOT_FOUND:"שם המשתמש או הסיסמה שגויים. נא לנסות שוב.",INVALID_AUTHENTICATOR_CODE:"קוד מאמת שגוי. נא לנסות שוב.",INVALID_RECOVERY_CODE:"קוד שחזור שגוי. נא לנסות שוב.",REFRESH_TOKEN_REQUIRED:"אסימון ריענון חובה.",INVALID_REFRESH_TOKEN:"אסימון ריענון שגוי.",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:"הכספת המקומית אינה עדכנית. נא לסנכרן את הכספת שלך על ידי ריענון העמוד ולנסות שוב."}},$S={or:"או",new:"חדש",vaultLocked:"AliasVault נעול.",creatingNewAlias:"נוצר כינוי חדש...",noMatchesFound:"לא נמצאו תוצאות",searchVault:"חיפוש בכספת…",enterServiceName:"נא למלא את שם השירות",enterEmailAddress:"נא למלא כתובת דוא״ל",enterUsername:"נא למלא שם משתמש",hideFor1Hour:"הסתרה למשך שעה (האתר הנוכחי)",hidePermanently:"הסתרה לצמיתות (האתר הנוכחי)",createRandomAlias:"יצירת כינוי אקראי",createUsernamePassword:"יצירת שם משתמש/סיסמה",randomAlias:"כינוי אקראי",usernamePassword:"שם משתמש/סיסמה",createAndSaveAlias:"יצירה ושמירה של כינוי",createAndSaveCredential:"יצירה ושמירה של פרטי גישה",randomIdentityDescription:"יצירת זהות אקראית עם כתובת דוא״ל אקראית שנגישה דרך AliasVault.",randomIdentityDescriptionDropdown:"זהות אקראיות עם דוא״ל אקראי",manualCredentialDescription:"נא לציין כתובת דוא״ל ושם משתמש משלך.",manualCredentialDescriptionDropdown:"שם משתמש וסיסמה ידניים",failedToCreateIdentity:"יצירת הזהות נכשלה. נא לנסות שוב.",enterEmailAndOrUsername:"נא למלא דוא״ל ו/או שם משתמש",autofillWithAliasVault:"השלמה אוטומטית עם AliasVault",generateRandomPassword:"יצירת סיסמה אקראית (העתקה ללוח הגזירים)",generateNewPassword:"יצירת סיסמה חדשה",togglePasswordVisibility:"הצגת/הסתרת סיסמה",passwordCopiedToClipboard:"הסיסמה הועתקה ללוח הגזירים",openAliasVaultToUpgrade:"יש לפתוח את AliasVault כדי לשדרג",vaultUpgradeRequired:"יש לשדרג את הכספת.",dismissPopup:"התעלמות מחלונית"},ZS={title:"Items",itemName:"שם",loginCredentials:"פרטי הגישה",cardInformation:"Card Information",addItem:"Add Item",addNewItem:"Add new item",saveItem:"Save Item",itemDetails:"Item Details",editItem:"Edit Item",untitled:"Untitled",newFolder:"New Folder",createFolder:"יצירת תיקייה",editFolder:"Edit Folder",folderName:"Folder Name",folderNameRequired:"Folder name is required",folder:"תיקייה",welcomeTitle:"ברוך בואך ל־AliasVault!",welcomeDescription:"כדי להשתמש בהרחבת הדפדפן של AliasVault: יש לנווט לאתר ולהשתמש בחלונית ההשלמה האוטומטית של AliasVault כדי ליצור פרטי גישה חדשים.",noPasskeysFound:"No passkeys have been created yet. Passkeys are created by visiting a website that offers passkeys as an authentication method.",noAttachmentsFound:"No items with attachments found",noItemsOfTypeFound:"No {{type}} items found",noMatchingItems:"No matching items found",noMatchingItemsSearch:'No items matching "{{search}}"',noMatchingItemsWithFilter:'No {{filter}} items matching "{{search}}"',clearSearch:"Clear search",clearFilter:"Clear filter",emptyFolderHint:"This folder is empty. To move items to this folder, edit the item and tap the folder icon in the name field.",allItemsInFolders:"All your items are organized in folders. Click a folder above to view your credentials, or use the search to find specific items.",deleteFolder:"Delete Folder",deleteFolderKeepItems:"Delete folder only",deleteFolderKeepItemsDescription:"Items will be moved back to the main list.",deleteFolderAndItems:"Delete folder and all items",deleteFolderAndItemsDescription:"{{count}} item(s) will be moved to Recently Deleted.",filters:{folders:"Folders",passkeys:"Passkeys"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Delete Item",deleteItemConfirm:"Are you sure you want to delete this item?",viewHistory:"View history",history:"History",noHistoryAvailable:"No history available",tags:"תגיות",changePasswordComplexity:"החלפת מורכבת הסיסמה",passwordLength:"אורך הסיסמה",includeLowercase:"לכלול אותיות קטנות",includeUppercase:"לכלול אותיות גדולות",includeNumbers:"לכלול מספרים",includeSpecialChars:"לכלול תווים מיוחדים",avoidAmbiguousChars:"עדיף להימנע מאותיות וספרות שדומים זה לזה (o,‏ 0 וכו׳)",privateEmailTitle:"כתובת דוא״ל פרטית",privateEmailAliasVaultServer:"שרת AliasVault",privateEmailDescription:"הצפנה מקצה לקצה, פרטיות מלאה.",publicEmailTitle:"ספקי תיבת דוא״ל זמנית ציבוריים",publicEmailDescription:"פרטיות אלמונית אך מוגבלת. תוכן הדוא״ל נגיש לכל מי שיודע את הכתובת.",validation:{required:"שדה חובה"}},eT={selectType:"Add New Item",typeLabel:"Item Type",creating:"Creating",editing:"Editing",regenerateAlias:"Regenerate alias",addCustomField:"Add custom field",fieldLabel:"Field Label",enterFieldName:"Enter field name",fieldType:"Field Type",fieldTypes:{text:"Text",hidden:"Hidden (masked text)",email:"דוא״ל",url:"URL",phone:"Phone",number:"Number",date:"תאריך",textArea:"Text Area"},login:{title:"כניסה"},alias:{title:"כינוי"},creditCard:{title:"Credit Card"},note:{title:"Secure Note"}},tT={"login.url":"Website URL","login.username":"שם משתמש","login.password":"סיסמה","alias.first_name":"שם פרטי","alias.last_name":"שם משפחה","alias.gender":"מגדר","alias.birthdate":"תאריך לידה","login.email":"דוא״ל","notes.content":"הערות","card.cardholder_name":"Cardholder Name","card.number":"Card Number","card.expiry_month":"Expiry Month","card.expiry_year":"Expiry Year","card.cvv":"CVV","card.pin":"PIN"},aT={addCode:"Add 2FA Code",instructions:"Enter the secret key shown by the website where you want to add two-factor authentication.",nameOptional:"שם (רשות)",secretKey:"מפתח סודי",saveToViewCode:"יש לשמור כדי לצפות בקוד",defaultName:"Authenticator",errors:{invalidSecretKey:"Invalid secret key format."}},nT={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},rT={title:"הודעות דוא״ל",deleteEmailTitle:"מחיקת הודעת דוא״ל",deleteEmailConfirm:"למחוק את הודעת הדוא״ל הזאת לצמיתות?",from:"מאת",to:"אל",date:"תאריך",emailContent:"תוכן הודעת דוא״ל",emailNotFound:"הודעת הדוא״ל לא נמצאה",noEmails:"לא נמצאו הודעות דוא״ל",noEmailsDescription:"לא קיבלת הודעות דוא״ל כלשהן לכתובות הדוא״ל הפרטיות שלך עדיין. כשמגיעה הודעה חדשה היא תופיע כאן.",offlineMessage:"החיבור שלך מנותק. נא להתחבר לאינטרנט כדי לטעון את הודעות הדוא״ל שלך.",dateFormat:{justNow:"ממש הרגע",minutesAgo_single:"לפני דקה",minutesAgo_plural:"לפני {{count}} דקות",hoursAgo_single:"לפני שעה",hoursAgo_plural:"לפני {{count}} שעות",yesterday:"אתמול"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"כתובת הדוא״ל שנבחרה תפוסה. נא לשנות את כתובת הדוא״ל על ידי עריכת פרטי הגישה.",CLAIM_DOES_NOT_EXIST:"אירעה שגיאה בניסיון לטעון את הודעות הדוא״ל. נא לנסות לערוך ולשמור את רשומת פרטי הקשר כדי לסנכרן את מסד הנתונים ואז לנסות שוב."}},iT={serverUrl:"כתובת שרת",language:"שפה",autofillEnabled:"הפעלת השלמה אוטומטית",version:"גרסה",openWebApp:"פתיחת אתר",lock:"נעילה",globalSettings:"הגדרות מקיפות",autofillPopup:"חלונית השלמה אוטומטית",activeOnAllSites:"פעיל בכל האתרים (למעט אם נכבה להלן)",disabledOnAllSites:"כבוי בכל האתרים",rightClickContextMenu:"תפריט הקשר בלחיצה ימנית",autofillMatching:"התאמת השלמה אוטומטית",autofillMatchingMode:"מצב התאמת השלמה אוטומטית",autofillMatchingModeDescription:"הגדרה אילו פרטי גישה נחשבים תואמים ויופיעו כהצעות בחלונית ההשלמה האוטומטית לאתר מסוים.",autofillMatchingDefault:"כתובת + שם תת־תחום + תו כל על שם",autofillMatchingUrlSubdomain:"כתובת + שם תת־תחום",autofillMatchingUrlExact:"תחום כתובת מדויקת בלבד",siteSpecificSettings:"הגדרות תואמות אתר",autofillPopupOn:"חלונית השלמה אוטומטית ב־: ",enabledForThisSite:"פעיל לאתר הזה",disabledForThisSite:"כבוי לאתר הזה",temporarilyDisabledUntil:"כבוי זמנית עד ",resetAllSiteSettings:"איפוס כל ההגדרות הנקודתיות לאתרים",appearance:"מראה",theme:"ערכת עיצוב",useDefault:"להשתמש בברירת המחדל",light:"בהירה",dark:"כהה",keyboardShortcuts:"קיצורי מקלדת",configureKeyboardShortcuts:"הגדרת קיצורי מקלדת",configure:"הגדרה",clipboardClearTimeout:"לפנות את לוח הגזירים לאחר העתקה",clipboardClearTimeoutDescription:"לפנות את לוח הגזירים אוטומטית לאחר העתקת נתונים רגישים",clipboardClearDisabled:"אף פעם לא לפנות",clipboardClear5Seconds:"לפנות אחרי 5 שניות",clipboardClear10Seconds:"לפנות אחרי 10 שניות",clipboardClear15Seconds:"לפנות אחרי 15 שניות",autoLockTimeout:"תום המתנה לנעילה אוטומטית",autoLockTimeoutDescription:"לנעול את הכספת אוטומטית לאחר פרק זמן של חוסר פעילות",autoLockTimeoutHelp:"הכספת תינעל רק לאחר משך זמן של חוסר פעילות (אין שימוש בהשלמה אוטומטית או פתיחת חלונית הרחבה). הכספת תמיד תינעל עם סגירת הדפדפן, ללא תלות בהגדרה הזאת.",autoLockNever:"אף פעם",autoLock15Seconds:"15 שניות",autoLock1Minute:"דקה",autoLock5Minutes:"5 דקות",autoLock15Minutes:"15 דקות",autoLock30Minutes:"30 דקות",autoLock1Hour:"שעה",autoLock4Hours:"4 שעות",autoLock8Hours:"8 שעות",autoLock24Hours:"24 שעות",versionPrefix:"גרסה ",autofillSettings:"הגדרות השלמה אוטומטית",clipboardSettings:"הגדרות לוח הגזירים",contextMenuSettings:"הגדרות תפריט הקשר",passkeySettings:"Passkey Settings",contextMenu:"תפריט הקשר",contextMenuEnabled:"תפריט הקשר פעיל",contextMenuDisabled:"תפריט הקשר כבוי",contextMenuDescription:"ניתן ללחוץ על שדה עם הלחצן הימני כדי לגשת לאפשרויות AliasVault",selectLanguage:"בחירת שפה",serverConfiguration:"הגדרות שרת",serverConfigurationDescription:"הגדרת כתובת שרת AliasVault לעותקים באירוח עצמי",customApiUrl:"כתובת API",customClientUrl:"כתובת לקוח",apiUrlHint:"נקודת הקצה של ה־API (בדרך כלל כתובת לקוח + ‎/api)",clientUrlHint:"כתובת ממשק המשתמש הדפדפני של העותק באירוע העצמי שלך",autofillSettingsDescription:"הפעלת או כיבוי חלוניות השלמה אוטומטית בעמודי אתרים",autofillEnabledDescription:"הצעות השלמה אוטומטית בטופסי כניסה למערכות",autofillDisabledDescription:"הצעות השלמה אוטומטית כבויות באופן מקיף",languageSettings:"שפה",validation:{apiUrlRequired:"כתובת API חובה",apiUrlInvalid:"נא למלא כתובת API תקפה",clientUrlRequired:"כתובת לקוח חובה",clientUrlInvalid:"נא למלא כתובת לקוח תקפה"},identityGenerator:"מייצר זהויות",identityGeneratorSettings:{description:"להגדיר את העדפת השפה והמגדר ליצירת זהויות חדשות כברירת מחדל.",languageSection:"שפה",languageDescription:"נא להגדיר את השפה שתשמש ליצירת זהויות חדשות.",genderSection:"מגדר",genderDescription:"להגדיר את אפשרויות המגדר ליצירת זהויות חדשות.",ageRangeSection:"טווח גילים",ageRangeDescription:"הגדרת טווח גילים ליצירת זהויות חדשות.",genderOptions:{random:"אקראי",male:"זכר",female:"נקבה"}},unlockMethod:{title:"שיטת שחרור נעילת כספת",introText:"Choose how you want to unlock your vault. You can use your master password (always available) or set up a PIN code for faster access. After 3 failed PIN attempts, you'll need to use your master password.",password:"סיסמת על",pin:"קוד אישי",pinDescription:"שחרור כספת עם קוד אישי",setupPin:"הגדרת קוד גישה אישי",enterNewPinDescription:"נא למלא קוד אישי שמורכב מ־6 ספרות לפחות",confirmPin:"אישור קוד אישי",confirmPinDescription:"נא למלא את הקוד האישי שלך שוב לאישור",invalidPinFormat:"תבנית הקוד האישי שגויה",pinMismatch:"הקודים האישיים לא תואמים",incorrectPin:"קוד אישי שגוי. נותרו {{attemptsRemaining}} ניסיונות.",incorrectPinSingular:"קוד אישי שגוי. נותר עוד ניסיון.",enableSuccess:"שחרור קוד אישי הופעל בהצלחה!",pinLocked:"שחרור נעילה עם קוד אישי הושבתה. נא להשתמש בסיסמת העל שלך כדי לשחרר את הכספת שלך.",pinSecurityWarning:"PIN unlock in the browser extension can be less secure than your master password, as PINs typically have lower entropy and may be brute-forced if your device is compromised. Use it only on devices you fully trust."}},sT={passkey:"Passkey",site:"אתר",helpText:"Passkeys are created on the website when prompted. They cannot be manually edited. To remove this passkey, you can delete it from this credential. To replace this passkey or create a new one, visit the website and follow its prompts.",passkeyMarkedForDeletion:"Passkey marked for deletion",passkeyWillBeDeleted:"This passkey will be deleted when you save this credential.",useBrowserPasskey:"Use Browser Passkey",bypass:{description:"How long would you like to use the browser's passkey provider for {{origin}}?",thisTimeOnly:"בפעם הזאת בלבד",alwaysForSite:"תמיד לאתר הזה"},authenticate:{title:"Sign in with Passkey",signInFor:"Sign in with passkey for",selectPasskey:"Select a passkey to sign in:",noPasskeysFound:"No passkeys found for this site"},create:{title:"Create Passkey",createFor:"Create a new passkey for",titleLabel:"כותרת",titlePlaceholder:"Enter a name for this passkey",createButton:"Create Passkey",selectPasskeyToReplace:"Select a passkey to replace:",createNewPasskey:"Create New Passkey",replacingPasskey:"Replacing passkey: {{displayName}}",confirmReplace:"אישור החלפה",selectExistingLogin:"Add to existing login:",selectExistingLoginDescription:"Attach this passkey to an existing login credential for this site.",attachingToCredential:"Adding passkey to: {{serviceName}}",attachPasskey:"Add Passkey"},settings:{passkeyProvider:"Passkey Provider",passkeyProviderOn:"Passkey Provider on "}},oT={title:"Recently Deleted",noItems:"No deleted items",noItemsDescription:"Items you delete will appear here for 30 days before being permanently removed.",description:"These items will be permanently deleted after 30 days. You can restore them or delete them immediately.",restore:"Restore",deletePermanently:"Delete Permanently",emptyAll:"Empty All",daysRemaining_one:"{{count}} day remaining",daysRemaining_other:"{{count}} days remaining",expiringSoon:"Expiring soon",confirmDeleteTitle:"Delete Permanently?",confirmDeleteMessage:"This item will be permanently deleted and cannot be recovered.",confirmEmptyAllTitle:"Empty Recently Deleted?",confirmEmptyAllMessage:"All {{count}} items will be permanently deleted and cannot be recovered."},lT={title:"שדרוג כספת",subtitle:"AliasVault התעדכן וצריך לשדרג את הכספת שלך. הפעולה הזאת אמורה לארוך מספר שניות.",versionInformation:"פרטי גרסה",yourVault:"גרסת הכספת שלך:",newVersion:"הגרסה החדשה הזמינה:",upgrade:"שדרוג כספת",upgrading:"משתדרגת…",whatsNew:"מה חדש",whatsNewDescription:"יש לשדרג כדי שתהיה תמיכה בשינויים הבאים:",noDescriptionAvailable:"אין תיאור זמין לגרסה הזאת.",alerts:{unableToGetVersionInfo:"לא ניתן לקבל את פרטי הגרסה. נא לנסות שוב מאוחר יותר.",selfHostedServer:"שרת באירוח עצמי",selfHostedWarning:"אם מדובר בשרת שמתארח עצמאית, נא לוודא שהעותק שמתארח אצלך גם כן מתעדכן כי אחרת הכניסה לאתר תפסיק לעבוד.",continueUpgrade:"להמשיך בשדרוג",upgradeFailed:"השדרוג נכשל",failedToApplyMigration:"החלת ההסבה נכשלה ({{current}} מתוך {{total}})"}},cT={unsyncedChangesTitle:"Unsynced Changes",unsyncedChangesWarning:"You have unsynced changes that will be lost if you log out now. Are you sure you want to continue?",logoutAnyway:"Log out anyway"},uT={offline:"Offline",tapToRetry:"Tap to retry sync"},dT={auth:YS,menu:JS,common:XS,content:$S,items:ZS,itemTypes:eT,fieldLabels:tT,totp:aT,attachmentUploader:nT,emails:rT,settings:iT,passkeys:sT,recentlyDeleted:oT,upgrade:lT,logout:cT,sync:uT},mT={loginTitle:"Accedi ad AliasVaultriem",username:"Nome utente o mail",usernamePlaceholder:"nome / nome@azienda.com",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",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",unlockWithPin:"Sblocca con PIN",enterPinToUnlock:"Inserisci il PIN per sbloccare la cassaforte",useMasterPassword:"Usa La Password Principale",unlockTitle:"Sblocca la tua cassaforte",logoutConfirm:"Sei sicuro di volerti disconnettere?",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",loginWithMobile:"Accedi con l'App Mobile",unlockWithMobile:"Sblocca con l'App Mobile",scanQrCode:"Scansiona questo codice QR con l'app mobile di AliasVault per accedere e sbloccare la cassaforte."},gT={vault:"Cassaforte",emails:"E-Mail"},fT={loading:"Caricamento in corso...",notice:"Avviso",error:"Errore",cancel:"Annulla",confirm:"Conferma",back:"Indietro",next:"Avanti",use:"Usa",add:"Aggiungi",delete:"Elimina",undo:"Annulla",save:"Salva",saving:"Salvataggio...",create:"Creare",or:"O",close:"Chiudi",logout:"Esci",copied:"Copiato!",openInNewWindow:"Apri in una nuova finestra",enabled:"Abilitato",disabled:"Disabilitato",showPassword:"Mostra password",hidePassword:"Nascondi password",showDetails:"Mostra dettagli",hideDetails:"Nascondi dettagli",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",credentials:"Credenziali",customFields:"Campi Personalizzati",twoFactorAuthentication:"Autenticazione a due fattori",alias:"Alias",notes:"Note",email:"E-mail",username:"Nome utente",password:"Password",generate:"Genera",serviceName:"Nome Servizio",loggedIn:"Accesso effettuato",syncingVault:"Sincronizzazione cassaforte",checkingVaultUpdates:"Controllo aggiornamenti cassaforte",syncingUpdatedVault:"Sincronizzazione cassaforte aggiornata",loadMore:"Carica altro",offline:"Offline",offlineMode:"Funzionamento in modalità offline",pendingSync:"Sincronizzazione...",mergingVaultChanges:"Sincronizzzazione modifiche della cassaforte...",uploadingVault:"Caricamento cassaforte in corso...",errors:{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.",browserExtensionOutdated:"Questa estensione del browser è obsoleta e non può essere utilizzata per accedere a questa cassaforte. Si prega di aggiornare questa estensione per continuare.",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.",serverVersionTooOld:"Il server AliasVault deve essere aggiornato a una versione più recente per poter utilizzare questa app mobile. Se hai bisogno di aiuto, contatta il supporto.",unknownError:"Si è verificato un errore sconosciuto",unknownErrorTryAgain:"Si è verificato un errore sconosciuto. Riprova.",vaultNotAvailable:"Cassaforte non disponibile",vaultIsLocked:"La cassaforte è bloccata",passwordChanged:"La tua password è cambiata dall'ultima volta che hai effettuato l'accesso. Effettua nuovamente l'accesso per motivi di sicurezza.",syncConflictMaxRetries:"Impossibile sincronizzare la cassaforte dopo più tentativi. Riprova più tardi.",mergeFailed:"Sincronizzazione della cassaforte non riuscita. Riprovare.",invalidCode:"Inserisci un codice di autenticazione a 6 cifre valido.",serverError:"Impossibile raggiungere il server AliasVault. Riprova più tardi o contatta il supporto se il problema persiste.",wrongPassword:"Password errata. Riprovare.",sessionExpired:"La tua sessione è scaduta. Effettua di nuovo il login.",mobileLoginRequestExpired:"Richiesta di accesso mobile scaduta. Ricarica la pagina e riprova."},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",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."}},hT={or:"o",new:"Nuovo",vaultLocked:"AliasVault è bloccato.",creatingNewAlias:"Creazione nuovo alias...",noMatchesFound:"Nessun risultato trovato",searchVault:"Cerca nella cassaforte...",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",openAliasVaultToUpgrade:"Apri AliasVault per aggiornare",vaultUpgradeRequired:"Aggiornamento della cassaforte richiesto.",dismissPopup:"Chiudi finestra"},AT={title:"Elementi",itemName:"Nome",loginCredentials:"Credenziali di accesso",cardInformation:"Informazioni sulla scheda",addItem:"Aggiungi Elemento",addNewItem:"Aggiungi nuovo elemento",saveItem:"Salva Elemento",itemDetails:"Dettagli Elemento",editItem:"Modifica Elemento",untitled:"Senza titolo",newFolder:"Nuova Cartella",createFolder:"Crea cartella",editFolder:"Modifica Cartella",folderName:"Nome Cartella",folderNameRequired:"Il nome della cartella è obbligatorio",folder:"Cartella",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.",noPasskeysFound:"Non sono state ancora create passkey. Le passkey vengono create visitando un sito web che offre le passkey come metodo di autenticazione.",noAttachmentsFound:"Nessun elemento con allegati trovato",noItemsOfTypeFound:"Nessun elemento {{type}} trovato",noMatchingItems:"Nessun elemento corrispondente trovato",noMatchingItemsSearch:'Nessun elemento corrispondente "{{search}}"',noMatchingItemsWithFilter:'Nessun elemento {{filter}} corrispondente "{{search}}"',clearSearch:"Cancella ricerca",clearFilter:"Cancella filtro",emptyFolderHint:"Questa cartella è vuota. Per spostare gli elementi in questa cartella, modificare l'elemento e toccare l'icona della cartella nel campo nome.",allItemsInFolders:"Tutti gli elementi sono organizzati in cartelle. Fare clic su una cartella qui sopra per visualizzare le credenziali o utilizzare la ricerca per trovare elementi specifici.",deleteFolder:"Elimina Cartella",deleteFolderKeepItems:"Elimina solo la cartella",deleteFolderKeepItemsDescription:"Gli elementi verranno spostati nella lista principale.",deleteFolderAndItems:"Elimina cartella e tutti gli elementi",deleteFolderAndItemsDescription:"{{count}} oggetto(i) verrà spostato in Eliminato Recentemente.",filters:{folders:"Cartelle",passkeys:"Passkey"},sort:{title:"Ordina per",oldestFirst:"Prima i più vecchi",newestFirst:"Prima i più recenti",alphabetical:"Alfabetico (A-Z)"},deleteItemTitle:"Elimina elemento",deleteItemConfirm:"Sei sicuro di voler rimuovere questo elemento?",viewHistory:"Visualizza cronologia",history:"Cronologia",noHistoryAvailable:"Nessuna cronologia disponibile",tags:"Tags",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.)",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.",validation:{required:"Campo obbligatorio"}},pT={selectType:"Aggiungi Nuovo Elemento",typeLabel:"Tipo Elemento",creating:"Creazione in corso",editing:"Modifica",regenerateAlias:"Rigenera alias",addCustomField:"Aggiungere un campo personalizzato",fieldLabel:"Etichetta del campo",enterFieldName:"Inserisci il nome del campo",fieldType:"Tipo di campo",fieldTypes:{text:"Testo",hidden:"Nascosto (testo mascherato)",email:"Email",url:"URL",phone:"Telefono",number:"Numero",date:"Data",textArea:"Area di testo"},login:{title:"Accesso"},alias:{title:"Alias"},creditCard:{title:"Carta Di Credito"},note:{title:"Nota sicura"}},yT={"login.url":"URL del sito","login.username":"Nome Utente","login.password":"Password","alias.first_name":"Nome","alias.last_name":"Cognome","alias.gender":"Genere","alias.birthdate":"Data di nascita","login.email":"Email","notes.content":"Note","card.cardholder_name":"Nome del titolare della carta","card.number":"Numero della Carta","card.expiry_month":"Mese di Scadenza","card.expiry_year":"Anno di Scadenza","card.cvv":"CVV","card.pin":"PIN"},ET={addCode:"Aggiungi Codice 2FA",instructions:"Inserisci la chiave segreta mostrata dal sito in cui vuoi aggiungere un'autenticazione a due fattori.",nameOptional:"Nome (facoltativo)",secretKey:"Chiave segreta",saveToViewCode:"Salva per visualizzare il codice",defaultName:"Autenticazione",errors:{invalidSecretKey:"Formato chiave segreta non valido."}},bT={uploading:"Caricamento...",uploadSuccess:"File caricati correttamente",deleteSuccess:"Allegato eliminato con successo.",firefoxExpandRequired:"Per caricare i file, usa la finestra estesa.",openExpandedWindow:"Apri Finestra Estesa"},IT={title:"Email",deleteEmailTitle:"Elimina Email",deleteEmailConfirm:"Sei sicuro di voler eliminare definitivamente questa email?",from:"Da",to:"A",date:"Data",emailContent:"Contenuto email",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.",offlineMessage:"Sei offline. Collegati a internet per caricare le email.",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"},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."}},vT={serverUrl:"URL del server",language:"Lingua",autofillEnabled:"Abilita compilazione automatica",version:"Versione",openWebApp:"Apri app web",lock:"Blocca",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",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",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 ",autofillSettings:"Impostazioni di riempimento automatico",clipboardSettings:"Impostazioni appunti",contextMenuSettings:"Preferenze menu contestuale",passkeySettings:"Impostazioni Passkey",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",serverConfiguration:"Configurazione del server",serverConfigurationDescription:"Configurare l'URL del server AliasVault per le istanze self-hosted",customApiUrl:"API URL",customClientUrl:"Url Client",apiUrlHint:"L'URL endpoint API (di solito URL client + /api)",clientUrlHint:"L'URL dell'interfaccia web della tua istanza self-hosted",autofillSettingsDescription:"Abilita o disabilita il popup di riempimento automatico sulle pagine web",autofillEnabledDescription:"I suggerimenti di riempimento automatico appariranno nei moduli di accesso",autofillDisabledDescription:"I suggerimenti di riempimento automatico sono disabilitati",languageSettings:"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"},identityGenerator:"Generatore di identità",identityGeneratorSettings:{description:"Configura lingua e preferenze di genere per la generazione di nuove identità.",languageSection:"Lingua",languageDescription:"Imposta la lingua usata per generare nuove identità.",genderSection:"Genere",genderDescription:"Imposta la preferenza di genere per generare nuove identità.",ageRangeSection:"Fascia d'età",ageRangeDescription:"Imposta la fascia di età per generare nuove identità.",genderOptions:{random:"Casuale",male:"Maschio",female:"Femmina"}},unlockMethod:{title:"Metodo di sblocco cassaforte",introText:"Scegli come sbloccare la cassaforte. Puoi usare la tua password principale (sempre disponibile) o impostare un codice PIN per un accesso più veloce. Dopo 3 tentativi di PIN falliti, è necessario utilizzare la password principale.",password:"Password Principale",pin:"Codice PIN",pinDescription:"Sblocca la cassaforte con codice PIN",setupPin:"Imposta Codice Pin",enterNewPinDescription:"Inserisci un codice PIN composto da almeno 6 cifre",confirmPin:"Conferma PIN",confirmPinDescription:"Inserisci di nuovo il tuo PIN per confermare",invalidPinFormat:"Formato PIN non valido",pinMismatch:"I PIN non corrispondono",incorrectPin:"PIN errato. {{attemptsRemaining}} tentativi rimanenti.",incorrectPinSingular:"Pin non corretto. 1 tentativo rimanente.",enableSuccess:"Sblocco PIN abilitato con successo!",pinLocked:"Il PIN sblocco è stato disabilitato. Utilizza la tua password principale per sbloccare la cassaforte.",pinSecurityWarning:"Lo sblocco PIN nell'estensione del browser può essere meno sicuro della tua password principale, poichè i PIN hanno tipicamente entropia inferiore e possono essere brutalmente forzati se il dispositivo è compromesso. Usalo solo su dispositivi che ti fidi completamente."}},NT={passkey:"Passkey",site:"Sito",helpText:"Le chiavi di accesso vengono create sul sito web quando richiesto. Non possono essere modificate manualmente. Per rimuovere questa chiave di accesso, è possibile eliminarla da questa credenziale. Per sostituire questa passkey o crearne una nuova, visitare il sito web e seguire i relativi suggerimenti.",passkeyMarkedForDeletion:"Passkey contrassegnata per l'eliminazione",passkeyWillBeDeleted:"Questa passkey verrà eliminata quando si salva questa credenziale.",useBrowserPasskey:"Usa Browser Passkey",bypass:{description:"Per quanto tempo vorresti usare il provider di chiavi di accesso del browser per {{origin}}?",thisTimeOnly:"Solo questa volta",alwaysForSite:"Sempre per questo sito"},authenticate:{title:"Accedi con Passkey",signInFor:"Accedi con passkey per",selectPasskey:"Selezionare una passkey per accedere:",noPasskeysFound:"Nessuna passkey trovata per questo sito"},create:{title:"Crea Passkey",createFor:"Crea una nuova passkey per",titleLabel:"Titolo",titlePlaceholder:"Inserisci un nome per questa passkey",createButton:"Crea Passkey",selectPasskeyToReplace:"Selezionare una chiave di accesso da sostituire:",createNewPasskey:"Crea Nuova Passkey",replacingPasskey:"Sostituzione passkey: {{displayName}}",confirmReplace:"Conferma la sostituzione",selectExistingLogin:"Aggiungere al login esistente:",selectExistingLoginDescription:"Allega questa passkey a una credenziale di accesso esistente per questo sito.",attachingToCredential:"Aggiunta passkey a: {{serviceName}}",attachPasskey:"Aggiungi Passkey"},settings:{passkeyProvider:"Provider Passkey",passkeyProviderOn:"Passkey Provider attivo"}},CT={title:"Eliminato di Recente",noItems:"Nessun elemento eliminato",noItemsDescription:"Gli elementi cancellati appariranno qui per 30 giorni prima di essere rimossi definitivamente.",description:"Questi elementi verranno eliminati definitivamente dopo 30 giorni. È possibile ripristinarli o eliminarli immediatamente.",restore:"Ripristina",deletePermanently:"Elimina Definitivamente",emptyAll:"Svuota Tutto",daysRemaining_one:"{{count}} giorno rimanente",daysRemaining_other:"{{count}} giorni rimanenti",expiringSoon:"In scadenza a breve",confirmDeleteTitle:"Elimina definitivamente?",confirmDeleteMessage:"Questo elemento verrà eliminato definitivamente e non può essere recuperato.",confirmEmptyAllTitle:'Svuotare "Eliminati di recente"?',confirmEmptyAllMessage:"Questi {{count}} elementi verranno eliminati permanentemente e non potranno essere recuperati."},wT={title:"Aggiorna Cassaforte",subtitle:"AliasVault è stato aggiornato e la tua cassaforte deve essere aggiornata. Dovrebbe richiedere solo pochi secondi.",versionInformation:"Informazioni sulla versione",yourVault:"Versione della tua cassaforte:",newVersion:"Nuova versione disponibile:",upgrade:"Aggiorna cassaforte",upgrading:"Aggiornamento in corso...",whatsNew:"Novità",whatsNewDescription:"È richiesto un aggiornamento per supportare le seguenti modifiche:",noDescriptionAvailable:"Nessuna descrizione disponibile per questa versione.",alerts:{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.",continueUpgrade:"Continua aggiornamento",upgradeFailed:"Aggiornamento non riuscito",failedToApplyMigration:"Impossibile eseguire la migrazione ({{current}} di {{total}})"}},xT={unsyncedChangesTitle:"Modifiche non Sincronizzate",unsyncedChangesWarning:"Hai delle modifiche non sincronizzate che andranno perse se ti disconnetti ora. Sei sicuro di voler continuare?",logoutAnyway:"Esci comunque"},ST={offline:"Offline",tapToRetry:"Tocca per riprovare la sincronizzazione"},TT={auth:mT,menu:gT,common:fT,content:hT,items:AT,itemTypes:pT,fieldLabels:yT,totp:ET,attachmentUploader:bT,emails:IT,settings:vT,passkeys:NT,recentlyDeleted:CT,upgrade:wT,logout:xT,sync:ST},kT={loginTitle:"Inloggen bij AliasVault",username:"Gebruikersnaam of e-mail",usernamePlaceholder:"naam / naam@bedrijf.com",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",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:"Ontgrendelen",unlockWithPin:"Ontgrendelen met PIN",enterPinToUnlock:"Voer je pincode in om je vault te ontgrendelen",useMasterPassword:"Gebruik hoofdwachtwoord",unlockTitle:"Ontgrendel je vault",logoutConfirm:"Weet je zeker dat je wilt uitloggen?",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?",loginWithMobile:"Log in via de mobiele app",unlockWithMobile:"Ontgrendel met mobiele app",scanQrCode:"Scan deze QR-code met de AliasVault mobiele app om in te loggen en je kluis te ontgrendelen."},LT={vault:"Vault",emails:"E-mails"},RT={loading:"Laden...",notice:"Melding",error:"Fout",cancel:"Annuleren",confirm:"Bevestigen",back:"Terug",next:"Volgende",use:"Gebruik",add:"Toevoegen",delete:"Verwijderen",undo:"Ongedaan maken",save:"Opslaan",saving:"Opslaan...",create:"Aanmaken",or:"Of",close:"Sluiten",logout:"Uitloggen",copied:"Gekopieerd!",openInNewWindow:"Openen in nieuw venster",enabled:"Ingeschakeld",disabled:"Uitgeschakeld",showPassword:"Wachtwoord tonen",hidePassword:"Wachtwoord verbergen",showDetails:"Toon details",hideDetails:"Verberg details",copyToClipboard:"Naar klembord kopiëren",loadingEmails:"E-mails laden...",loadingTotpCodes:"TOTP-codes laden...",attachments:"Bijlagen",loadingAttachments:"Bijlagen laden...",settings:"Instellingen",recentEmails:"Recente e-mails",credentials:"Credentials",customFields:"Extra velden",twoFactorAuthentication:"Tweestapsverificatie",alias:"Alias",notes:"Notities",email:"E-mail",username:"Gebruikersnaam",password:"Wachtwoord",generate:"Genereren",serviceName:"Naam",loggedIn:"Ingelogd",syncingVault:"Vault synchroniseren",checkingVaultUpdates:"Controleren op vault updates",syncingUpdatedVault:"Bijgewerkte vault synchroniseren",loadMore:"Laad meer",offline:"Offline",offlineMode:"Offline modus",pendingSync:"Synchroniseren...",mergingVaultChanges:"Vault wijzigingen mergen...",uploadingVault:"Vault opslaan...",errors:{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.",browserExtensionOutdated:"Deze browserextensie is verouderd en kan niet worden gebruikt om toegang te krijgen tot deze vault. Update deze browserextensie om door te gaan.",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.",serverVersionTooOld:"De AliasVault server moet bijgewerkt worden naar een nieuwere versie om deze functie te kunnen gebruiken. Neem contact op met support als je hulp nodig hebt.",unknownError:"Er is een onbekende fout opgetreden",unknownErrorTryAgain:"Er is een onbekende fout opgetreden. Probeer het opnieuw.",vaultNotAvailable:"Vault niet beschikbaar",vaultIsLocked:"Vault is vergrendeld",passwordChanged:"Je wachtwoord is veranderd sinds de laatste keer dat je bent ingelogd. Log opnieuw in.",syncConflictMaxRetries:"Kan de vault niet synchroniseren na meerdere pogingen. Probeer het later opnieuw.",mergeFailed:"Samenvoegen vault wijzigingen mislukt. Probeer het opnieuw.",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.",wrongPassword:"Onjuist wachtwoord. Probeer het opnieuw.",sessionExpired:"Je sessie is verlopen. Log opnieuw in.",mobileLoginRequestExpired:"De QR-code is verlopen. Herlaad de pagina en probeer opnieuw."},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.",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."}},DT={or:"of",new:"Nieuw",vaultLocked:"AliasVault is vergrendeld.",creatingNewAlias:"Nieuwe alias aanmaken...",noMatchesFound:"Geen resultaten gevonden",searchVault:"Vault doorzoeken...",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",openAliasVaultToUpgrade:"Open AliasVault om te upgraden",vaultUpgradeRequired:"Update is vereist.",dismissPopup:"Pop-up sluiten"},BT={title:"Items",itemName:"Naam",loginCredentials:"Inloggegevens",cardInformation:"Kaartgegevens",addItem:"Item toevoegen",addNewItem:"Nieuw item toevoegen",saveItem:"Item opslaan",itemDetails:"Item details",editItem:"Item bewerken",untitled:"Naamloos",newFolder:"Nieuwe map",createFolder:"Map aanmaken",editFolder:"Map bewerken",folderName:"Mapnaam",folderNameRequired:"Mapnaam is verplicht",folder:"Map",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.",noPasskeysFound:"Er zijn nog geen passkeys aangemaakt. Passkeys worden gemaakt door een website te bezoeken die passkeys als een authenticatiemethode biedt.",noAttachmentsFound:"Geen items gevonden met bijlagen",noItemsOfTypeFound:"Geen {{type}} items gevonden",noMatchingItems:"Geen items gevonden",noMatchingItemsSearch:'Geen items die overeenkomen met "{{search}}"',noMatchingItemsWithFilter:'Geen {{filter}} items die overeenkomen met "{{search}}"',clearSearch:"Wis zoekopdracht",clearFilter:"Wis filter",emptyFolderHint:"Deze map is leeg. Om items naar deze map te verplaatsen, wijzig het item en selecteer deze map.",allItemsInFolders:"Al je items zijn georganiseerd in mappen. Klik op een map hierboven om je gegevens te bekijken, of gebruik de zoekopdracht om specifieke items te vinden.",deleteFolder:"Map verwijderen",deleteFolderKeepItems:"Verwijder alleen map",deleteFolderKeepItemsDescription:"Items zullen terug worden verplaatst naar de hoofdlijst.",deleteFolderAndItems:"Verwijder map en alle items",deleteFolderAndItemsDescription:"{{count}} item(s) zullen worden verplaatst naar recent verwijderd.",filters:{folders:"Mappen",passkeys:"Passkeys"},sort:{title:"Sorteren op",oldestFirst:"Oudste eerst",newestFirst:"Nieuwste eerst",alphabetical:"Alfabetisch (A-Z)"},deleteItemTitle:"Verwijder item",deleteItemConfirm:"Weet je zeker dat je dit item wilt verwijderen?",viewHistory:"Toon geschiedenis",history:"Geschiedenis",noHistoryAvailable:"Nog geen geschiedenis",tags:"Labels",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.)",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.",validation:{required:"Dit veld is verplicht"}},UT={selectType:"Nieuw item toevoegen",typeLabel:"Itemtype",creating:"Aanmaken",editing:"Bewerken",regenerateAlias:"Alias opnieuw genereren",addCustomField:"Voeg eigen veld toe",fieldLabel:"Veldlabel",enterFieldName:"Voer de veldnaam in",fieldType:"Veldtype",fieldTypes:{text:"Tekst",hidden:"Verborgen (gemaskeerde tekst)",email:"E-mail",url:"URL",phone:"Telefoon",number:"Nummer",date:"Datum",textArea:"Tekstvak"},login:{title:"Login"},alias:{title:"Alias"},creditCard:{title:"Creditcard"},note:{title:"Veilige notitie"}},MT={"login.url":"Website URL","login.username":"Gebruikersnaam","login.password":"Wachtwoord","alias.first_name":"Voornaam","alias.last_name":"Achternaam","alias.gender":"Geslacht","alias.birthdate":"Geboortedatum","login.email":"E-mail","notes.content":"Notities","card.cardholder_name":"Naam kaarthouder","card.number":"Kaartnummer","card.expiry_month":"Vervalmaand","card.expiry_year":"Vervaljaar","card.cvv":"CVV","card.pin":"Pincode"},_T={addCode:"2FA-code toevoegen",instructions:"Voer de secret key in die door de website wordt weergegeven waar je tweestapsverificatie wilt toevoegen.",nameOptional:"Naam (optioneel)",secretKey:"Secret key",saveToViewCode:"Opslaan om code te bekijken",defaultName:"Authenticator",errors:{invalidSecretKey:"Ongeldig formaat."}},FT={uploading:"Uploaden...",uploadSuccess:"Bestand succesvol geüpload.",deleteSuccess:"Bijlage is succesvol verwijderd.",firefoxExpandRequired:"Gebruik het grote venster om bestanden te uploaden.",openExpandedWindow:"Open groot venster"},OT={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",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.",offlineMessage:"Je bent offline. Maak verbinding met het internet om je e-mails te laden.",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"},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."}},jT={serverUrl:"Server URL",language:"Taal",autofillEnabled:"Autofill",version:"Versie",openWebApp:"Web-app openen",lock:"Vergrendelen",globalSettings:"Globale Instellingen",autofillPopup:"Autofill popup",activeOnAllSites:"Actief voor alle sites (tenzij hieronder uitgeschakeld)",disabledOnAllSites:"Uitgeschakeld op alle sites",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",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 ",autofillSettings:"Autofill instellingen",clipboardSettings:"Klembord instellingen",contextMenuSettings:"Context menu instellingen",passkeySettings:"Passkey 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",serverConfiguration:"Serverconfiguratie",serverConfigurationDescription:"Configureer de AliasVault server URL voor self-hosted omgevingen",customApiUrl:"API URL",customClientUrl:"Client URL",apiUrlHint:"De API endpoint URL (meestal client URL + /api)",clientUrlHint:"De webinterface URL van je self-hosted omgeving",autofillSettingsDescription:"Schakel de autofill pop-up in of uit op webpagina's",autofillEnabledDescription:"Autofill suggesties verschijnen op login formulieren",autofillDisabledDescription:"Autofill suggesties zijn uitgeschakeld",languageSettings:"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"},identityGenerator:"Identiteit generator",identityGeneratorSettings:{description:"Configureer de standaardtaal en geslachtsvoorkeur voor het genereren van nieuwe identiteiten.",languageSection:"Taal",languageDescription:"Stel de taal in die wordt gebruikt bij het genereren van nieuwe identiteiten.",genderSection:"Geslacht",genderDescription:"Stel de geslachtsvoorkeur in voor het genereren van nieuwe identiteiten.",ageRangeSection:"Leeftijdsrange",ageRangeDescription:"Stel de standaard leeftijdsrange in voor het genereren van nieuwe identiteiten.",genderOptions:{random:"Willekeurig",male:"Mannelijk",female:"Vrouwelijk"}},unlockMethod:{title:"Vault ontgrendelmethode",introText:"Kies hoe je je vault wilt ontgrendelen. Je kunt je hoofdwachtwoord gebruiken (altijd beschikbaar) of een pincode instellen voor snellere toegang. Na 3 mislukte PIN-pogingen moet je je hoofdwachtwoord gebruiken.",password:"Hoofdwachtwoord",pin:"Pincode",pinDescription:"Ontgrendel vault met pincode",setupPin:"Pincode instellen",enterNewPinDescription:"Voer een pincode in van minimaal 6 cijfers",confirmPin:"Bevestig pincode",confirmPinDescription:"Voer je pincode nogmaals in om te bevestigen",invalidPinFormat:"Ongeldige pincode",pinMismatch:"Pincodes komen niet overeen",incorrectPin:"Onjuiste PIN. {{attemptsRemaining}} pogingen resterend.",incorrectPinSingular:"Onjuiste PIN. 1 poging resterend.",enableSuccess:"Pincode succesvol ingeschakeld!",pinLocked:"Pincode is uitgeschakeld. Gebruik je hoofdwachtwoord om je kluis te ontgrendelen.",pinSecurityWarning:"Pincode ontgrendeling in de browserextensie kan minder veilig zijn dan je hoofdwachtwoord, omdat een pincode makkelijker kan worden gebruteforced als iemand toegang heeft tot je apparaat. Gebruik deze optie daarom alleen op apparaten die je volledig vertrouwt."}},PT={passkey:"Passkey",site:"Website",helpText:"Passkeys worden aangemaakt op de website wanneer er om wordt gevraagd. Ze kunnen niet handmatig worden bewerkt. Om deze toegangssleutel te verwijderen, kun je deze verwijderen uit deze credential. Om deze passkey te vervangen of een nieuwe te maken, bezoek de website in kwestie en volg de instructies.",passkeyMarkedForDeletion:"Passkey gemarkeerd om te verwijderen",passkeyWillBeDeleted:"Deze passkey zal worden verwijderd wanneer je deze credential opslaat.",useBrowserPasskey:"Gebruik browser passkey",bypass:{description:"Hoe lang wilt je de browser passkey voor {{origin}} gebruiken?",thisTimeOnly:"Alleen deze keer",alwaysForSite:"Altijd voor deze site"},authenticate:{title:"Inloggen met passkey",signInFor:"Inloggen met passkey voor",selectPasskey:"Selecteer een passkey om in te loggen:",noPasskeysFound:"Geen passkeys gevonden voor deze site"},create:{title:"Passkey aanmaken",createFor:"Maak een nieuwe passkey voor",titleLabel:"Titel",titlePlaceholder:"Voer een naam in voor deze passkey",createButton:"Passkey aanmaken",selectPasskeyToReplace:"Selecteer een passkey om te vervangen:",createNewPasskey:"Passkey aanmaken",replacingPasskey:"Passkey vervangen: {{displayName}}",confirmReplace:"Bevestig vervanging",selectExistingLogin:"Toevoegen aan bestaande login:",selectExistingLoginDescription:"Deze passkey toevoegen aan een bestaande inloggegevens voor deze site.",attachingToCredential:"Passkey toevoegen aan: {{serviceName}}",attachPasskey:"Passkey toevoegen"},settings:{passkeyProvider:"Passkey provider",passkeyProviderOn:"Passkey provider ingeschakeld"}},HT={title:"Recent verwijderd",noItems:"Geen verwijderde items",noItemsDescription:"Items die je verwijdert verschijnen hier gedurende 30 dagen voordat ze definitief verwijderd worden.",description:"Deze items zullen na 30 dagen permanent verwijderd worden. Je kunt ze herstellen of ze direct verwijderen.",restore:"Herstel",deletePermanently:"Permanent verwijderen",emptyAll:"Alles verwijderen",daysRemaining_one:"{{count}} dag resterend",daysRemaining_other:"{{count}} dagen resterend",expiringSoon:"Vervalt binnenkort",confirmDeleteTitle:"Permanent verwijderen?",confirmDeleteMessage:"Dit item zal permanent worden verwijderd en kan niet worden hersteld.",confirmEmptyAllTitle:"Recent verwijderd leegmaken?",confirmEmptyAllMessage:"Alle {{count}} items zullen permanent worden verwijderd en kunnen niet worden hersteld."},zT={title:"Vault upgraden",subtitle:"AliasVault is vernieuwd en je vault moet worden bijgewerkt. Dit kan enkele seconden duren.",versionInformation:"Versie-informatie",yourVault:"Jouw vault versie:",newVersion:"Nieuwe beschikbare versie:",upgrade:"Vault upgraden",upgrading:"Aan het upgraden...",whatsNew:"Wat is er nieuw",whatsNewDescription:"Een upgrade is vereist vanwege de volgende wijzigingen:",noDescriptionAvailable:"Voor deze versie is geen beschrijving beschikbaar.",alerts:{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.",continueUpgrade:"Verdergaan",upgradeFailed:"Upgrade mislukt",failedToApplyMigration:"Kon migratie niet toepassen ({{current}} van {{total}})"}},QT={unsyncedChangesTitle:"Niet-gesynchroniseerde wijzigingen",unsyncedChangesWarning:"Er zijn niet gesynchroniseerde wijzigingen die verloren zullen gaan als je nu uitlogt. Weet je zeker dat je wilt doorgaan?",logoutAnyway:"Toch uitloggen"},VT={offline:"Offline",tapToRetry:"Probeer sync opnieuw"},GT={auth:kT,menu:LT,common:RT,content:DT,items:BT,itemTypes:UT,fieldLabels:MT,totp:_T,attachmentUploader:FT,emails:OT,settings:jT,passkeys:PT,recentlyDeleted:HT,upgrade:zT,logout:QT,sync:VT},KT={loginTitle:"Zaloguj się do AliasVault",username:"Nazwa użytkownika lub e-mail",usernamePlaceholder:"nazwa / nazwa@firma.com",passwordPlaceholder:"Wprowadź swoje hasło ",rememberMe:"Zapamiętaj mnie",loginButton:"Zaloguj się",noAccount:"Nie masz jeszcze konta?",createVault:"Utwórz nowy sejf",twoFactorTitle:"Wprowadź kod uwierzytelniający z aplikacji uwierzytelniającej.",authCode:"Kod uwierzytelniania",authCodePlaceholder:"Wpisz 6-cyfrowy kod",verify:"Potwierdź",twoFactorNote:"Uwaga: Jeśli nie masz dostępu do swojego urządzenia uwierzytelniającego, możesz zresetować swój kod 2FA za pomocą kodu odzyskiwania, logując się za pośrednictwem strony internetowej.",masterPassword:"Hasło główne",unlockVault:"Odblokuj",unlockWithPin:"Odblokuj za pomocą kodu PIN",enterPinToUnlock:"Wprowadź swój kod PIN, aby odblokować sejf",useMasterPassword:"Użyj hasła głównego",unlockTitle:"Odblokuj swój sejf",logoutConfirm:"Czy na pewno chcesz się wylogować?",unlockSuccessTitle:"Twój sejf został pomyślnie odblokowany.",unlockSuccessDescription:"Możesz teraz używać automatycznego uzupełniania w formularzach logowania w przeglądarce.",closePopup:"Zamknij to okno.",browseVault:"Przeglądaj zawartość sejfu",connectingTo:"Łączenie z",switchAccounts:"Przełącz konto",loginWithMobile:"Zaloguj się za pomocą aplikacji mobilnej",unlockWithMobile:"Odblokuj za pomocą aplikacji mobilnej",scanQrCode:"Zeskanuj ten kod QR za pomocą aplikacji mobilnej AliasVault, aby się zalogować i odblokować sejf."},qT={vault:"Sejf",emails:"Skrzynka odbiorcza"},WT={loading:"Wczytywanie…",notice:"Uwaga",error:"Błąd",cancel:"Anuluj",confirm:"Potwierdź",back:"Powrót",next:"Dalej",use:"Użyj",add:"Dodaj",delete:"Usuń",undo:"Cofnij",save:"Zapisz",saving:"Zapisywanie...",create:"Utwórz",or:"lub",close:"Zamknąć",logout:"Wyloguj się",copied:"Skopiowano",openInNewWindow:"Otwórz w nowym oknie.",enabled:"Aktywne",disabled:"Nie aktywne",showPassword:"Pokaż hasło",hidePassword:"Ukryj hasło",showDetails:"Pokaż szczegóły",hideDetails:"Ukryj szczegóły",copyToClipboard:"Skopiuj do schowka",loadingEmails:"Ładowanie wiadomości e-mail...",loadingTotpCodes:"Ładowanie kodów TOTP...",attachments:"Załączniki",loadingAttachments:"Ładowanie załączników...",settings:"Ustawienia",recentEmails:"Ostatnie wiadomości e-mail",credentials:"Dane logowania",customFields:"Pola niestandardowe",twoFactorAuthentication:"Weryfikacja dwuetapowa (2FA)",alias:"Alias",notes:"Notatki",email:"Adres e-mail",username:"Nazwa użytkownika",password:"Hasło",generate:"Wygeneruj",serviceName:"Nazwa usługi",loggedIn:"Zalogowano",syncingVault:"Synchronizacja sejfu",checkingVaultUpdates:"Sprawdzanie aktualizacji sejfu",syncingUpdatedVault:"Synchronizacja zaktualizowanego sejfu",loadMore:"Załaduj więcej",offline:"Jesteś w trybie offline",offlineMode:"Praca w trybie offline",pendingSync:"Synchronizowanie...",mergingVaultChanges:"Łączenie zmian w sejfie...",uploadingVault:"Ładowanie sejfu...",errors:{serverNotAvailable:"Serwer AliasVault jest niedostępny. Spróbuj ponownie później lub skontaktuj się z pomocą techniczną, jeśli problem nadal występuje.",clientVersionNotSupported:"Ta wersja rozszerzenia przeglądarki AliasVault nie jest już obsługiwana przez serwer. Zaktualizuj rozszerzenie przeglądarki do najnowszej wersji.",browserExtensionOutdated:"To rozszerzenie przeglądarki jest nieaktualne i nie można go używać do uzyskania dostępu do tego sejfu. Aby kontynuować, zaktualizuj to rozszerzenie przeglądarki.",serverVersionNotSupported:"Aby korzystać z tego rozszerzenia przeglądarki, należy zaktualizować serwer AliasVault do nowszej wersji. Jeśli potrzebujesz pomocy, skontaktuj się z działem pomocy technicznej.",serverVersionTooOld:"Aby korzystać z tej funkcji, serwer AliasVault musi zostać zaktualizowany do nowszej wersji. Jeśli potrzebujesz pomocy, skontaktuj się z administratorem serwera.",unknownError:"Wystąpił nieznany błąd",unknownErrorTryAgain:"Wystąpił nieznany błąd. Spróbuj ponownie.",vaultNotAvailable:"Sejf niedostępny",vaultIsLocked:"Sejf jest zablokowany",passwordChanged:"Twoje hasło uległo zmianie od czasu ostatniego logowania. Ze względów bezpieczeństwa prosimy o ponowne zalogowanie się.",syncConflictMaxRetries:"Nie można zsynchronizować sejfu po wielu próbach. Spróbuj ponownie później.",mergeFailed:"Nie udało się scalić zmian w sejfie. Spróbuj ponownie.",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.",wrongPassword:"Incorrect password. Please try again.",sessionExpired:"Your session has expired. Please log in again.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."},apiErrors:{UNKNOWN_ERROR:"Wystąpił nieznany błąd. Spróbuj ponownie.",ACCOUNT_LOCKED:"Konto zostało tymczasowo zablokowane z powodu zbyt wielu nieudanych prób. Spróbuj ponownie później.",ACCOUNT_BLOCKED:"Twoje konto zostało zablokowane. Jeśli uważasz, że to pomyłka, skontaktuj się z pomocą techniczną.",USER_NOT_FOUND:"Nieprawidłowa nazwa użytkownika lub hasło. Spróbuj ponownie.",INVALID_AUTHENTICATOR_CODE:"Nieprawidłowy kod uwierzytelniający. Spróbuj ponownie.",INVALID_RECOVERY_CODE:"Nieprawidłowy kod odzyskiwania. Spróbuj ponownie.",REFRESH_TOKEN_REQUIRED:"Wymagany jest token odświeżania.",INVALID_REFRESH_TOKEN:"Nieprawidłowy token odświeżania.",PUBLIC_REGISTRATION_DISABLED:"Rejestracja nowych kont jest obecnie wyłączona na tym serwerze. Skontaktuj się z administratorem.",USERNAME_REQUIRED:"Wymagane jest podanie nazwy użytkownika.",USERNAME_ALREADY_IN_USE:"Nazwa użytkownika jest już używana.",USERNAME_AVAILABLE:"Nazwa użytkownika jest już używana.",USERNAME_MISMATCH:"Nazwa użytkownika nie pasuje do aktualnego użytkownika.",PASSWORD_MISMATCH:"Podane hasło nie zgadza się z Twoim aktualnym hasłem.",ACCOUNT_SUCCESSFULLY_DELETED:"Konto zostało pomyślnie usunięte.",USERNAME_EMPTY_OR_WHITESPACE:"Nazwa użytkownika nie może być pusta ani zawierać spacji.",USERNAME_TOO_SHORT:"Nazwa użytkownika jest zbyt krótka: musi mieć co najmniej 3 znaki.",USERNAME_TOO_LONG:"Nazwa użytkownika jest zbyt długa: nie może przekraczać 40 znaków.",USERNAME_INVALID_EMAIL:"Nieprawidłowy adres e-mail.",USERNAME_INVALID_CHARACTERS:"Nazwa użytkownika jest nieprawidłowa, może zawierać tylko litery lub cyfry.",VAULT_NOT_UP_TO_DATE:"Twój sejf nie jest aktualny. Zsynchronizuj sejf i spróbuj ponownie.",INTERNAL_SERVER_ERROR:"Wewnętrzny błąd serwera.",VAULT_ERROR:"Lokalny sejf nie jest aktualny. Zsynchronizuj sejf, odświeżając stronę, i spróbuj ponownie."}},YT={or:"lub",new:"Nowy",vaultLocked:"AliasVault jest zablokowany.",creatingNewAlias:"Tworzenie nowego aliasu...",noMatchesFound:"Nie znaleziono żadnych wyników",searchVault:"Przeszukaj sejf...",enterServiceName:"Wprowadź nazwę usługi",enterEmailAddress:"Wprowadź adres e-mail",enterUsername:"Wprowadź nazwę użytkownika",hideFor1Hour:"Ukryj na 1 godzinę (bieżąca strona)",hidePermanently:"Ukryj na stałe (bieżąca strona)",createRandomAlias:"Utwórz losowy alias",createUsernamePassword:"Utwórz nazwę użytkownika/hasło",randomAlias:"Losowy alias",usernamePassword:"Nazwa użytkownika/hasło",createAndSaveAlias:"Utwórz i zapisz alias",createAndSaveCredential:"Utwórz i zapisz dane uwierzytelniające",randomIdentityDescription:"Wygeneruj losową tożsamość z losowym adresem e-mail dostępnym w AliasVault.",randomIdentityDescriptionDropdown:"Losowa tożsamość z losowym adresem e-mail",manualCredentialDescription:"Określ swój adres e-mail i nazwę użytkownika.",manualCredentialDescriptionDropdown:"Ręczne wprowadzanie nazwy użytkownika i hasła",failedToCreateIdentity:"Nie udało się utworzyć tożsamości. Spróbuj ponownie.",enterEmailAndOrUsername:"Wprowadź adres e-mail i/lub nazwę użytkownika",autofillWithAliasVault:"Autouzupełnianie za pomocą AliasVault",generateRandomPassword:"Wygeneruj losowe hasło (skopiuj do schowka)",generateNewPassword:"Wygeneruj nowe hasło",togglePasswordVisibility:"Przełącz widoczność hasła",passwordCopiedToClipboard:"Hasło skopiowane do schowka",openAliasVaultToUpgrade:"Otwórz AliasVault, aby dokonać aktualizacji",vaultUpgradeRequired:"Wymagana aktualizacja sejfu.",dismissPopup:"Zamknij wyskakujące okienko"},JT={title:"Elementy",itemName:"Nazwa",loginCredentials:"Dane logowania",cardInformation:"Informacje o karcie",addItem:"Dodaj element",addNewItem:"Dodaj nowy element",saveItem:"Zapisz element",itemDetails:"Szczegóły produktu",editItem:"Edytuj element",untitled:"Bez tytułu",newFolder:"Nowy folder",createFolder:"Utwórz folder",editFolder:"Edytuj folder",folderName:"Nazwa folderu",folderNameRequired:"Nazwa folderu jest wymagana",folder:"Katalog",welcomeTitle:"Witamy w AliasVault!",welcomeDescription:"Aby skorzystać z rozszerzenia przeglądarki AliasVault - przejdź do strony internetowej i użyj okienka autozupelniania, aby utworzyć nowa tożsamość.",noPasskeysFound:"Nie utworzono jeszcze żadnych kluczy dostępu. Klucze dostępu tworzy się, odwiedzając stronę internetową, która oferuje klucze dostępu jako metodę uwierzytelniania.",noAttachmentsFound:"Nie znaleziono żadnych elementów z załącznikami.",noItemsOfTypeFound:"Nie znaleziono elementów {{type}}",noMatchingItems:"Nie znaleziono pasujących elementów",noMatchingItemsSearch:"Nie znaleziono żadnych elementów pasujących do „{{search}}”",noMatchingItemsWithFilter:"Brak elementów {{filter}} pasujących do „{{search}}”",clearSearch:"Wyczyść wyszukiwanie",clearFilter:"Usuń filtr",emptyFolderHint:"Ten folder jest pusty. Aby przenieść elementy do tego folderu, edytuj element i wybierz ten folder.",allItemsInFolders:"Wszystkie Twoje elementy są uporządkowane w folderach. Kliknij folder powyżej, aby wyświetlić swoje dane logowania, lub skorzystaj z wyszukiwarki, aby znaleźć konkretne elementy.",deleteFolder:"Usuń folder",deleteFolderKeepItems:"Usuń tylko folder",deleteFolderKeepItemsDescription:"Elementy zostaną przeniesione z powrotem do listy głównej.",deleteFolderAndItems:"Usuń folder i wszystkie elementy",deleteFolderAndItemsDescription:"{{count}} element(ów) zostaną przeniesione do Ostatnio usunięte.",filters:{folders:"Foldery",passkeys:"Klucze dostępu"},sort:{title:"Sortuj według",oldestFirst:"Od najstarszych",newestFirst:"Od najnowszych",alphabetical:"Alfabetycznie (A-Z)"},deleteItemTitle:"Usuń element",deleteItemConfirm:"Czy na pewno chcesz usunąć ten element?",viewHistory:"Pokaż historię",history:"Historia",noHistoryAvailable:"Brak dostępnej historii",tags:"Znaczniki",changePasswordComplexity:"Zmień komplikację hasła",passwordLength:"Długość hasła",includeLowercase:"Uwzględnij małe litery",includeUppercase:"Uwzględnij wielkie litery",includeNumbers:"Uwzględnij numery",includeSpecialChars:"Uwzględnij znaki specjalne",avoidAmbiguousChars:"Unikaj dwuznacznych znaków (o, 0, itp.)",privateEmailTitle:"Prywatny adres e-mail",privateEmailAliasVaultServer:"Serwer AliasVault",privateEmailDescription:"Szyfrowane E2E, w pełni prywatne.",publicEmailTitle:"Publiczni dostawcy tymczasowych adresów e-mail",publicEmailDescription:"Anonimowe, ale ograniczają prywatność. Treść wiadomości e-mail jest dostępna dla każdego, kto zna adres.",validation:{required:"To pole jest wymagane"}},XT={selectType:"Dodaj nowy element",typeLabel:"Typ elementu",creating:"Tworzenie",editing:"Edytowanie",regenerateAlias:"Ponownie wygeneruj alias",addCustomField:"Dodaj pole niestandardowe",fieldLabel:"Etykieta pola",enterFieldName:"Wprowadź nazwę pola",fieldType:"Typ pola",fieldTypes:{text:"Tekst",hidden:"Ukryty (zamaskowany tekst)",email:"Skrzynka odbiorcza",url:"adres URL",phone:"Numer telefonu",number:"Numer",date:"Data",textArea:"Obszar tekst"},login:{title:"Zaloguj się"},alias:{title:"Tożsamość (Alias)"},creditCard:{title:"Karta płatnicza"},note:{title:"Bezpieczna notatka"}},$T={"login.url":"URL strony internetowej","login.username":"Nazwa użytkownika","login.password":"Hasło","alias.first_name":"Imię","alias.last_name":"Nazwisko","alias.gender":"Płeć","alias.birthdate":"Data urodzenia","login.email":"Skrzynka odbiorcza","notes.content":"Notatki","card.cardholder_name":"Imię i nazwisko posiadacza karty","card.number":"Numer karty","card.expiry_month":"Miesiąc wygaśnięcia","card.expiry_year":"Rok wygaśnięcia","card.cvv":"Kod CVV","card.pin":"Kod PIN"},ZT={addCode:"Dodaj kod 2FA",instructions:"Wprowadź tajny klucz wyświetlony na stronie internetowej, na której chcesz dodać uwierzytelnianie dwuskładnikowe.",nameOptional:"Nazwa (opcjonalnie)",secretKey:"Tajny klucz",saveToViewCode:"Zapisz, aby wyświetlić kod",defaultName:"Uwierzytelnianie",errors:{invalidSecretKey:"Nieprawidłowy format tajnego klucza."}},e1={uploading:"Przesyłanie...",uploadSuccess:"Plik został przesłany pomyślnie.",deleteSuccess:"Element został pomyślnie usunięty.",firefoxExpandRequired:"Aby przesłać pliki, użyj rozszerzonego okna.",openExpandedWindow:"Otwórz rozszerzone okno"},t1={title:"Skrzynka odbiorcza",deleteEmailTitle:"Usuń e-mail",deleteEmailConfirm:"Czy na pewno chcesz trwale usunąć ten e-mail?",from:"Od",to:"Do",date:"Data",emailContent:"Treść wiadomości e-mail",emailNotFound:"Nie znaleziono wiadomości e-mail",noEmails:"Nie znaleziono wiadomości e-mail",noEmailsDescription:"Nie otrzymałeś jeszcze żadnych wiadomości e-mail na prywatne adresy e-mail. Kiedy otrzymasz nowy e-mail, pojawi się on tutaj.",offlineMessage:"Jesteś offline. Połącz się z Internetem, aby załadować wiadomości e-mail.",dateFormat:{justNow:"w tej chwili",minutesAgo_single:"{{count}} minut temu",minutesAgo_plural:"{{count}} minut temu",hoursAgo_single:"{{count}} godzinę temu",hoursAgo_plural:"{{count}} godzin temu",yesterday:"wczoraj"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Wybrany adres e-mail jest już w użyciu. Proszę zmienić adres e-mail poprzez edycję danych logowania.",CLAIM_DOES_NOT_EXIST:"Wystąpił błąd podczas próby załadowania wiadomości e-mail. Spróbuj edytować i zapisać wpis logowania, aby zsynchronizować bazę danych, a następnie spróbuj ponownie."}},a1={serverUrl:"Adres URL serwera",language:"Język",autofillEnabled:"Włącz autouzupełnianie",version:"Wersja",openWebApp:"Otwórz aplikację internetową",lock:"Zablokuj",globalSettings:"Ustawienia ogólne",autofillPopup:"Okno autouzupełniania",activeOnAllSites:"Aktywne we wszystkich witrynach (chyba że jest wyłączone)",disabledOnAllSites:"Wyłączone na wszystkich witrynach",rightClickContextMenu:"Aktywacja menu kontekstowego",autofillMatching:"Dopasowanie autouzupełniania",autofillMatchingMode:"Tryb dopasowania autouzupełniania",autofillMatchingModeDescription:"Określa, które dane logowania są uważane za dopasowane i wyświetlane jako sugestie w oknie autouzupełniania dla danej strony internetowej.",autofillMatchingDefault:"Adres URL + subdomena + nazwa wieloznaczna",autofillMatchingUrlSubdomain:"Adres URL + subdomena",autofillMatchingUrlExact:"Dokładna domena adresu URL",siteSpecificSettings:"Ustawienia dotyczące witryny",autofillPopupOn:"Wyskakujące okno autouzupełniania: ",enabledForThisSite:"Włączone dla tej witryny",disabledForThisSite:"Wyłączone dla tej witryny",temporarilyDisabledUntil:"Tymczasowo nieaktywne do ",resetAllSiteSettings:"Zresetuj wszystkie ustawienia witryny",appearance:"Wygląd",theme:"Motyw",useDefault:"Użyj domyślnego",light:"Jasny",dark:"Ciemny",keyboardShortcuts:"Skróty klawiaturowe",configureKeyboardShortcuts:"Skonfiguruj skróty klawiaturowe",configure:"Konfiguracja",clipboardClearTimeout:"Wyczyść schowek po skopiowaniu",clipboardClearTimeoutDescription:"Automatycznie wyczyść schowek po skopiowaniu poufnych danych",clipboardClearDisabled:"Nigdy nie czyść",clipboardClear5Seconds:"Wyczyść po 5 sekundach",clipboardClear10Seconds:"Wyczyść po 10 sekundach",clipboardClear15Seconds:"Wyczyść po 15 sekundach",autoLockTimeout:"Blokada rozszerzenia",autoLockTimeoutDescription:"Automatycznie zablokuj sejf po okresie bezczynności",autoLockTimeoutHelp:"Sejf zostanie zablokowany dopiero po określonym okresie nieaktywności (żadne użycie autouzupełniania lub okienko rozszerzenia nie zostało otwarte). Sejf zostanie zablokowany, gdy przeglądarka zostanie zamknięta, niezależnie od tego ustawienia.",autoLockNever:"Nigdy",autoLock15Seconds:"15 sekund",autoLock1Minute:"1 minuta",autoLock5Minutes:"5 minut",autoLock15Minutes:"15 minut",autoLock30Minutes:"30 minut",autoLock1Hour:"1 godzina",autoLock4Hours:"4 godziny",autoLock8Hours:"8 godzin",autoLock24Hours:"24 godziny",versionPrefix:"Wersja ",autofillSettings:"Ustawienia autouzupełniania",clipboardSettings:"Ustawienia schowka",contextMenuSettings:"Ustawienia menu kontekstowego",passkeySettings:"Ustawienia kluczy dostępu",contextMenu:"Menu kontekstowe",contextMenuEnabled:"Menu kontekstowe jest włączone",contextMenuDisabled:"Menu kontekstowe jest wyłączone",contextMenuDescription:"Kliknij prawym przyciskiem myszy na pola wejściowe, aby uzyskać dostęp do opcji AliasVault",selectLanguage:"Wybierz język",serverConfiguration:"Konfiguracja serwera",serverConfigurationDescription:"Skonfiguruj adres URL serwera sejfu AliasVault",customApiUrl:"Adres URL interfejsu API",customClientUrl:"Adresy URL klienta",apiUrlHint:"Adres URL punktu końcowego API (zazwyczaj adres URL klienta + /api)",clientUrlHint:"Adres URL interfejsu sieci web dla twojej samodzielnej instancji",autofillSettingsDescription:"Włącz lub wyłącz okno autouzupełniania na stronach internetowych",autofillEnabledDescription:"Sugestie autouzupełniania pojawią się na formularzach logowania",autofillDisabledDescription:"Podpowiedzi wyłączone we wszystkich polach",languageSettings:"Język",validation:{apiUrlRequired:"API URL jest wymagane",apiUrlInvalid:"Wprowadź poprawny adres URL API",clientUrlRequired:"Adres URL klienta jest wymagany",clientUrlInvalid:"Wprowadź prawidłowy adres URL klienta"},identityGenerator:"Generator tożsamości",identityGeneratorSettings:{description:"Skonfiguruj domyślny język i preferencje dotyczące płci dla generowania nowych tożsamości.",languageSection:"Wybierz język",languageDescription:"Ustaw język, który będzie używany podczas generowania nowych tożsamości.",genderSection:"Płeć",genderDescription:"Ustaw preferencje dotyczące płci dla generowania nowych tożsamości.",ageRangeSection:"Zakres wieku",ageRangeDescription:"Ustaw zakres wieku dla generowania nowych tożsamości.",genderOptions:{random:"Losowy",male:"Mężczyzna",female:"Kobieta"}},unlockMethod:{title:"Metoda odblokowania skarbca",introText:"Wybierz sposób odblokowania sejfu. Możesz użyć hasła głównego (zawsze dostępnego) lub skonfigurować kod PIN, aby uzyskać szybszy dostęp. Po 3 nieudanych próbach wprowadzenia kodu PIN konieczne będzie użycie hasła głównego.",password:"Hasło główne",pin:"Kod PIN",pinDescription:"Odblokuj sejf za pomocą kodu PIN",setupPin:"Ustaw kod PIN",enterNewPinDescription:"Wprowadź kod PIN składający się z co najmniej 6 cyfr",confirmPin:"Potwierdź kod PIN",confirmPinDescription:"Wprowadź ponownie swój kod PIN, aby potwierdzić",invalidPinFormat:"Nieprawidłowy format kodu PIN",pinMismatch:"Kody PIN nie są zgodne",incorrectPin:"Nieprawidłowy kod PIN. Pozostało {{attemptsRemaining}} prób.",incorrectPinSingular:"Nieprawidłowy kod PIN. Pozostała 1 próba.",enableSuccess:"Odblokowanie za pomocą kodu PIN zostało aktywowane!",pinLocked:"Odblokowanie za pomocą kodu PIN zostało wyłączone. Aby odblokować sejf, użyj hasła głównego.",pinSecurityWarning:"Odblokowanie za pomocą kodu PIN w rozszerzeniu przeglądarki może być mniej bezpieczne niż hasło główne, ponieważ kody PIN mają zazwyczaj niższą entropię i mogą zostać złamane metodą Brute-Force, jeśli urządzenie zostanie naruszone. Używaj tej funkcji tylko na urządzeniach, którym w pełni ufasz."}},n1={passkey:"Kod dostępu",site:"Strona internetowa",helpText:"Klucze dostępu są tworzone na stronie internetowej po wyświetleniu monitu. Nie można ich edytować ręcznie. Aby usunąć ten klucz dostępu, można go usunąć z tych poświadczeń. Aby zastąpić ten klucz dostępu lub utworzyć nowy, należy odwiedzić stronę internetową i postępować zgodnie z wyświetlanymi instrukcjami.",passkeyMarkedForDeletion:"Klucz dostępu oznaczony do usunięcia",passkeyWillBeDeleted:"To hasło zostanie usunięte po zapisaniu tych danych logowania.",useBrowserPasskey:"Użyj klucza dostępu przeglądarki",bypass:{description:"Jak długo chcesz korzystać z dostawcy kluczy przeglądarki dla {{origin}}?",thisTimeOnly:"Tylko tym razem",alwaysForSite:"Zawsze dla tej witryny"},authenticate:{title:"Zaloguj się za pomocą klucza bezpieczeństwa",signInFor:"Zaloguj się za pomocą klucza bezpieczeństwa dla",selectPasskey:"Wybierz klucz dostępu, aby się zalogować:",noPasskeysFound:"Nie znaleziono kluczy dostępu dla tej witryny"},create:{title:"Utwórz klucz dostępu",createFor:"Utwórz nowy klucz dostępu dla",titleLabel:"Tytuł",titlePlaceholder:"Wprowadź nazwę dla tego klucza dostępu",createButton:"Utwórz klucz dostępu",selectPasskeyToReplace:"Wybierz klucz dostępu, który chcesz zastąpić:",createNewPasskey:"Utwórz nowy klucz dostępu",replacingPasskey:"Zamiana klucza dostępu: {{displayName}}",confirmReplace:"Potwierdź zamianę",selectExistingLogin:"Dodaj do istniejącego loginu:",selectExistingLoginDescription:"Dołącz ten klucz dostępu do istniejącego logowania dla tej witryny.",attachingToCredential:"Dodawanie klucza dostępu do: {{serviceName}}",attachPasskey:"Dodaj klucz dostępu"},settings:{passkeyProvider:"Dostawca klucza dostępu",passkeyProviderOn:"Dostawca klucza dostępu włączony "}},r1={title:"Ostatnio usunięte",noItems:"Brak usuniętych elementów",noItemsDescription:"Usunięte elementy pojawią się tutaj na 30 dni, zanim zostaną trwale usunięte.",description:"Te elementy zostaną trwale usunięte po 30 dniach. Możesz je przywrócić lub natychmiast usunąć.",restore:"Przywróć",deletePermanently:"Usuń bezpowrotnie",emptyAll:"Opróżnij wszystkie",daysRemaining_one:"Pozostało {{count}} dni",daysRemaining_other:"Pozostało {{count}} dni",expiringSoon:"Wkrótce wygasa",confirmDeleteTitle:"Usunąć trwale?",confirmDeleteMessage:"Ten element zostanie trwale usunięty i nie będzie można go odzyskać.",confirmEmptyAllTitle:"Opróżnij ostatnio usunięte?",confirmEmptyAllMessage:"Wszystkie elementy {{count}} zostaną trwale usunięte i nie mogą zostać odzyskane."},i1={title:"Aktualizacja sejfu",subtitle:"Wersja AliasVault jest nieaktualna i konieczna jest aktualizacja Twojego sejfu. Zajmie to tylko kilka sekund.",versionInformation:"Informacje o wersji",yourVault:"Twoja wersja sejfu:",newVersion:"Nowa dostępna wersja:",upgrade:"Aktualizuj sejf",upgrading:"Aktualizacja...",whatsNew:"Co nowego",whatsNewDescription:"Uaktualnienie jest wymagane do obsługi następujących zmian:",noDescriptionAvailable:"Brak dostępnego opisu dla tej wersji.",alerts:{unableToGetVersionInfo:"Nie można uzyskać informacji o wersji. Spróbuj ponownie.",selfHostedServer:"Serwer własny",selfHostedWarning:"Jeśli używasz własnego serwera, upewnij się, że zaktualizujesz swoją samodzielną instancję, ponieważ w przeciwnym razie logowanie się do klienta internetowego przestanie działać.",continueUpgrade:"Kontynuuj aktualizację",upgradeFailed:"Aktualizacja nie powiodła się",failedToApplyMigration:"Nie udało się zastosować migracji ({{current}} of {{total}})"}},s1={unsyncedChangesTitle:"Zmiany niesynchronizowane",unsyncedChangesWarning:"Masz niezsynchronizowane zmiany, które zostaną utracone, jeśli się teraz wylogujesz. Czy na pewno chcesz kontynuować?",logoutAnyway:"Wyloguj się mimo wszystko"},o1={offline:"Jesteś w trybie offline",tapToRetry:"Tap to retry sync"},l1={auth:KT,menu:qT,common:WT,content:YT,items:JT,itemTypes:XT,fieldLabels:$T,totp:ZT,attachmentUploader:e1,emails:t1,settings:a1,passkeys:n1,recentlyDeleted:r1,upgrade:i1,logout:s1,sync:o1},c1={loginTitle:"Fazer login no AliasVault",username:"Nome de usuário ou e-mai",usernamePlaceholder:"nome / nome@empresa.com",passwordPlaceholder:"Digite sua senha",rememberMe:"Lembrar-me",loginButton:"Entrar",noAccount:"Não possui conta?",createVault:"Criar novo cofre",twoFactorTitle:"Por favor, insira o código de autenticação do seu aplicativo de autenticação.",authCode:"Código de Autenticação",authCodePlaceholder:"Digite o código de 6 dígitos",verify:"Verificar",twoFactorNote:"Nota: se você não tem acesso ao seu aparelho de verificação, você pode resetar seu 2FA com um código de recuperação fazendo login no site.",masterPassword:"Senha Mestre",unlockVault:"Desbloquear",unlockWithPin:"Desbloquear com PIN",enterPinToUnlock:"Digite seu PIN para desbloquear seu cofre",useMasterPassword:"Utilizar Senha Mestre",unlockTitle:"Desbloquear Seu Cofre",logoutConfirm:"Tem certeza que deseja sair?",unlockSuccessTitle:"O seu cofre foi desbloqueado com sucesso",unlockSuccessDescription:"Agora você pode utilizar o preenchimento automático nos formulários de login no seu navegador.",closePopup:"Fechar este pop-up",browseVault:"Navegar por conteúdo do cofre",connectingTo:"Conectando à",switchAccounts:"Mudar de conta?",loginWithMobile:"Entrar utilizado Dispositivo Móvel",unlockWithMobile:"Desbloquear utilizando Dispositivo Móvel",scanQrCode:"Escaneie este código QR com seu aplicativo AliasVault para dispositivo móvel para entrar e desbloquear seu cofre."},u1={vault:"Cofre",emails:"E-mails"},d1={loading:"Carregando...",notice:"Aviso",error:"Erro",cancel:"Cancelar",confirm:"Confirmar",back:"Voltar",next:"Próximo",use:"Utilizar",add:"Adicionar",delete:"Excluir",undo:"Desfazer",save:"Salvar",saving:"Salvando...",create:"Criar",or:"Ou",close:"Fechar",logout:"Sair",copied:"Copiado!",openInNewWindow:"Abrir em uma nova janela",enabled:"Habilitado",disabled:"Desabilitado",showPassword:"Mostrar senha",hidePassword:"Ocultar senha",showDetails:"Exibir detalhes",hideDetails:"Esconder detalhes",copyToClipboard:"Copiar para a área de transferência",loadingEmails:"Carregando e-mails...",loadingTotpCodes:"Carregando códigos TOTP...",attachments:"Anexos",loadingAttachments:"Carregando anexos...",settings:"Configurações",recentEmails:"E-mails recentes",credentials:"Credenciais",customFields:"Campos Personalizados",twoFactorAuthentication:"Autenticação de dois fatores",alias:"Alias",notes:"Notas",email:"E-mail",username:"Nome de Usuário",password:"Senha",generate:"Gerar",serviceName:"Nome do Serviço",loggedIn:"Logado",syncingVault:"Sincronizando cofre",checkingVaultUpdates:"Verificando atualizações do cofre",syncingUpdatedVault:"Sincronizando cofre atualizado",loadMore:"Carregar mais",offline:"Offline",offlineMode:"Operando em modo offline",pendingSync:"Sincronizando...",mergingVaultChanges:"Integrando mudanças do cofre...",uploadingVault:"Fazendo upload do cofre...",errors:{serverNotAvailable:"O servidor AliasVault não está disponível. Por favor, tente novamente mais tarde ou entre em contato com o suporte caso o problema persista.",clientVersionNotSupported:"Esta versão da extensão AliasVault para o navegador não é mais suportada pelo servidor. Por favor, atualize sua extensão para a última versão.",browserExtensionOutdated:"Esta extensão do navegador está desatualizada e não pode ser utilizada para acessar este cofre. Por favor, atualize esta extensão para continuar.",serverVersionNotSupported:"O servidor AliasVault precisa ser atualizado para uma nova versão para poder utilizar esta extensão de navegador. Por favor, entre em contato com o suporte caso precise de ajuda.",serverVersionTooOld:"O servidor do AliasVault deve ser atualizado para uma versão mais recente para utilizar esta função. Por favor, entre em contato com o administrador do servidor se precisar de ajuda.",unknownError:"Ocorreu um erro desconhecido",unknownErrorTryAgain:"Ocorreu um erro inesperado. Por favor, tente novamente.",vaultNotAvailable:"Cofre não disponível",vaultIsLocked:"O cofre está bloqueado",passwordChanged:"Sua senha mudou desde o último login. Por favor, realize login novamente por questões de segurança.",syncConflictMaxRetries:"Não foi possível sincronizar seu cofre após várias tentativas. Por favor, tente novamente mais tarde.",mergeFailed:"Falha ao combinar mudanças do cofre. Por favor, tente novamente.",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.",wrongPassword:"Incorrect password. Please try again.",sessionExpired:"Your session has expired. Please log in again.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."},apiErrors:{UNKNOWN_ERROR:"Um erro desconhecido ocorreu. Por favor, tente novamente.",ACCOUNT_LOCKED:"Conta temporariamente bloqueada por muitas tentativas de login falhas. Por favor, tente novamente mais tarde.",ACCOUNT_BLOCKED:"Sua conta foi desabilitada. Se você acredita que isto foi um erro, por favor, entre em contato com o suporte.",USER_NOT_FOUND:"Usuário ou senha incorretos. Por favor, tente novamente.",INVALID_AUTHENTICATOR_CODE:"Código de autenticação incorreto. Por favor, tente novamente.",INVALID_RECOVERY_CODE:"Código de recuperação inválido. Por favor, tente novamente.",REFRESH_TOKEN_REQUIRED:"Token de atualização é obrigatório.",INVALID_REFRESH_TOKEN:"Token de atualização inválido.",PUBLIC_REGISTRATION_DISABLED:"Registro de novas contas está atualmente desabilitado neste servidor. Por favor entre em contato com o administrador.",USERNAME_REQUIRED:"Nome de usuário é obrigatório.",USERNAME_ALREADY_IN_USE:"Nome de usuário já está em uso.",USERNAME_AVAILABLE:"Nome de usuário está disponível.",USERNAME_MISMATCH:"Nome de usuário não corresponde ao usuário atual.",PASSWORD_MISMATCH:"A senha digitada não corresponde á sua senha atual.",ACCOUNT_SUCCESSFULLY_DELETED:"Conta excluída com sucesso.",USERNAME_EMPTY_OR_WHITESPACE:"Nome de usuário não pode estar vazio ou em branco.",USERNAME_TOO_SHORT:"Nome de usuário muito curto: deve ter pelo menos 3 caracteres.",USERNAME_TOO_LONG:"Nome de usuário muito longo: não pode conter mais de 40 caracteres.",USERNAME_INVALID_EMAIL:"Endereço de e-mail inválido.",USERNAME_INVALID_CHARACTERS:"Nome de usuário é inválido, deve conter apenas letras ou números.",VAULT_NOT_UP_TO_DATE:"Seu cofre não está atualizado. Por favor, sincronize seu cofre e tente novamente.",INTERNAL_SERVER_ERROR:"Erro intero do servidor.",VAULT_ERROR:"O cofre local não está atualizado. Por favor, sincronize seu cofre recarregando a página e tente novamente."}},m1={or:"ou",new:"Novo",vaultLocked:"AliasVault está bloqueado.",creatingNewAlias:"Criando novo alias...",noMatchesFound:"Nenhum resultado encontrado",searchVault:"Pesquisar cofre...",enterServiceName:"Digite o nome do serviço",enterEmailAddress:"Digite o endereço de e-mail",enterUsername:"Digite o nome de usuário",hideFor1Hour:"Ocultar por 1 hora (site atual)",hidePermanently:"Ocultar permanentemente (site atual)",createRandomAlias:"Criar alias aleatório",createUsernamePassword:"Criar nome de usuário/senha",randomAlias:"Alias aleatório",usernamePassword:"Nome de usuário/senha",createAndSaveAlias:"Criar e salvar alias",createAndSaveCredential:"Criar e salvar credencial",randomIdentityDescription:"Gerar uma identidade aleatória com um endereço de e-mail aleatório acessível pelo AliasVault.",randomIdentityDescriptionDropdown:"Identidade aleatória com e-mail aleatório",manualCredentialDescription:"Especifique seu próprio endereço de e-mail e nome de usuário.",manualCredentialDescriptionDropdown:"Nome de usuário e senha manuais",failedToCreateIdentity:"Falha ao criar identidade. Por favor, tente novamente.",enterEmailAndOrUsername:"Digite o e-mail e/ou nome de usuário",autofillWithAliasVault:"Preenchimento Automático com AliasVault",generateRandomPassword:"Gerar senha aleatória (copiar para a área de transferência)",generateNewPassword:"Gerar nova senha",togglePasswordVisibility:"Alternar visibilidade da senha",passwordCopiedToClipboard:"Senha copiada para a área de transferência",openAliasVaultToUpgrade:"Abra o AliasVault para atualizar",vaultUpgradeRequired:"Atualização de cofre necessária.",dismissPopup:"Ignorar pop-up"},g1={title:"Itens",itemName:"Nome",loginCredentials:"Credenciais de Login",cardInformation:"Informações do Cartão",addItem:"Adicionar Item",addNewItem:"Adicionar novo item",saveItem:"Salvar Item",itemDetails:"Detalhes do Item",editItem:"Editar Item",untitled:"Sem Título",newFolder:"Nova Pasta",createFolder:"Criar Pasta",editFolder:"Editar Pasta",folderName:"Nome da Pasta",folderNameRequired:"Nome da pasta é obrigatório",folder:"Pasta",welcomeTitle:"Boas-vindas ao AliasVault!",welcomeDescription:"Para utilizar a extensão de navegador do AliasVault: navegue para um site e utilize o pop-up de preenchimento automático do AliasVault para criar uma nova credencial.",noPasskeysFound:"Nenhuma passkey foi criada ainda. Passkeys são veiadas visitando um website que ofereça passkey como método de autenticação.",noAttachmentsFound:"Nenhum item com anexos foi encontrado",noItemsOfTypeFound:"Nenhum item do tipo {{type}} foi encontrado",noMatchingItems:"Nenhum ítem correspondente encontrado",noMatchingItemsSearch:'Nenhum item corresponde à "{{search}}"',noMatchingItemsWithFilter:'Nenhum item com o filtro {{filter}} corresponde à "{{search}}"',clearSearch:"Limpar pesquisa",clearFilter:"Limpar filtro",emptyFolderHint:"Esta pasta está vazia. Para mover itens para esta pasta, edite o item e toque no ícone da pasta no campo de nome.",allItemsInFolders:"Todos os seus itens estão organizados em pastas. Clique em uma pasta acima para ver suas credenciais, ou utilize a busca para encontrar itens específicos.",deleteFolder:"Excluir Pasta",deleteFolderKeepItems:"Excluir apenas a pasta",deleteFolderKeepItemsDescription:"Itens serão movidos de volta para a lista principal.",deleteFolderAndItems:"Excluir pasta e todos os itens",deleteFolderAndItemsDescription:"{{count}} item(s) será(ão) movido(s) para Recentemente Excluídos.",filters:{folders:"Folders",passkeys:"Passkeys"},sort:{title:"Ordenar por",oldestFirst:"Mais antigos primeiro",newestFirst:"Mais novos primeiro",alphabetical:"Ordem Alfabética (A-Z)"},deleteItemTitle:"Excluir Item",deleteItemConfirm:"Tem certeza que deseja excluir este item?",viewHistory:"Visualizar histórico",history:"Histórico",noHistoryAvailable:"Histórico não disponível",tags:"Tags",changePasswordComplexity:"Alterar complexidade de senha",passwordLength:"Tamanho da senha",includeLowercase:"Incluir letras minúsculas",includeUppercase:"Incluir letras maiúsculas",includeNumbers:"Incluir números",includeSpecialChars:"Incluir caracteres especiais",avoidAmbiguousChars:"Evitar caracteres ambíguos (o, 0, etc.)",privateEmailTitle:"E-mail Privado",privateEmailAliasVaultServer:"Servidor AliasVault",privateEmailDescription:"Criptografia E2E, totalmente privado.",publicEmailTitle:"Provedores Públicos de E-mail Temporário",publicEmailDescription:"Anônimo mas com privacidade limitada. Conteúdo do e-mail pode ser lido por qualquer um que souber o endereço.",validation:{required:"Este campo é obrigatório"}},f1={selectType:"Adicionar Novo Item",typeLabel:"Tipo do Item",creating:"Criando",editing:"Editando",regenerateAlias:"Gerar alias novamente",addCustomField:"Adicionar campo personalizado",fieldLabel:"Nome do Campo",enterFieldName:"Digite o nome do campo",fieldType:"Tipo do Campo",fieldTypes:{text:"Texto",hidden:"Escondido (texto mascarado)",email:"E-mail",url:"URL",phone:"Telefone",number:"Número",date:"Data",textArea:"Área de Texto"},login:{title:"Login"},alias:{title:"Alias"},creditCard:{title:"Cartão de Crédito"},note:{title:"Nota Segura"}},h1={"login.url":"URL do Website","login.username":"Nome de usuário","login.password":"Senha","alias.first_name":"Primeiro Nome","alias.last_name":"Sobrenome","alias.gender":"Gênero","alias.birthdate":"Data de nascimento","login.email":"E-mail","notes.content":"Notas","card.cardholder_name":"Nome do Titular do Cartão","card.number":"Número do Cartão","card.expiry_month":"Mês de Expiração","card.expiry_year":"Ano de Expiração","card.cvv":"CVV","card.pin":"Senha"},A1={addCode:"Adicionar Código de Autenticação de Dois Fatores",instructions:"Digite a chave secreta exibida pelo website que você quer adicionar a autenticação de dois fatores.",nameOptional:"Nome (opcional)",secretKey:"Chave Secreta",saveToViewCode:"Salvar para ver código",defaultName:"Autenticador",errors:{invalidSecretKey:"Formato de chave secreta inválido."}},p1={uploading:"Fazendo upload...",uploadSuccess:"Arquivos enviados com sucesso.",deleteSuccess:"Anexo excluído com sucesso.",firefoxExpandRequired:"Para fazer o upload dr arquivos, use a tela expandida.",openExpandedWindow:"Abrir Tela Expandida"},y1={title:"E-mails",deleteEmailTitle:"Excluir E-mail",deleteEmailConfirm:"Tem certeza de que deseja excluir permanentemente este e-mail?",from:"De",to:"Para",date:"Data",emailContent:"Conteúdo do email",emailNotFound:"E-mail não encontrado",noEmails:"Nenhum e-mail encontrado",noEmailsDescription:"Você ainda não recebeu nenhum e-mail em seus endereços de e-mail privados. Quando receber um novo e-mail, ele aparecerá aqui.",offlineMessage:"Você está offline. Por favor, conecte-se à internet para carregar seus e-mails.",dateFormat:{justNow:"agora",minutesAgo_single:"há {{count}} minuto",minutesAgo_plural:"há {{count}} minutos",hoursAgo_single:"há {{count}} hora",hoursAgo_plural:"há {{count}} horas",yesterday:"ontem"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"O e-mail escolhido já está em uso. Por favor, altere o endereço de e-mail editando esta credencial.",CLAIM_DOES_NOT_EXIST:"Ocorreu um erro ao tentar carregar os e-mails. Por favor, tente editar e salvar a credencial para sincronizar com o banco de dados, e tente novamente."}},E1={serverUrl:"URL do servidor",language:"Idioma",autofillEnabled:"Ativar o Preenchimento Automático",version:"Versão",openWebApp:"Abrir aplicativo web",lock:"Bloquear",globalSettings:"Configurações Gerais",autofillPopup:"Pop-up de preenchimento automático",activeOnAllSites:"Ativado em todos os sites (a menos que esteja desabilitado abaixo)",disabledOnAllSites:"Desativado em todos os sites",rightClickContextMenu:"Menu do botão direito",autofillMatching:"Correspondência de Preenchimento Automático",autofillMatchingMode:"Modo de correspondência de preenchimento automático",autofillMatchingModeDescription:"Determina quais credenciais são consideradas uma correspondência e mostradas como sugestões no pop-up de preenchimento automático para um determinado site.",autofillMatchingDefault:"Wildcard URL + subdomínio + nome",autofillMatchingUrlSubdomain:"URL + subdomínio",autofillMatchingUrlExact:"Apenas URL exato do domínio",siteSpecificSettings:"Configurações Específicas do Site",autofillPopupOn:"Pop-up de preenchimento automático em: ",enabledForThisSite:"Habilitado para este site",disabledForThisSite:"Desabilitado para este site",temporarilyDisabledUntil:"Temporariamente desabilitado até ",resetAllSiteSettings:"Redefinir todas as configurações específicas do site",appearance:"Aparência",theme:"Tema",useDefault:"Utilizar padrão",light:"Claro",dark:"Escuro",keyboardShortcuts:"Atalhos do Teclado",configureKeyboardShortcuts:"Configurar atalhos do teclado",configure:"Configurar",clipboardClearTimeout:"Limpar área de transferência após copiar",clipboardClearTimeoutDescription:"Limpar automaticamente a área de transferência após copiar dados sensíveis",clipboardClearDisabled:"Nunca limpar",clipboardClear5Seconds:"Limpar após 5 segundos",clipboardClear10Seconds:"Limpar após 10 segundos",clipboardClear15Seconds:"Limpar após 15 segundos",autoLockTimeout:"Tempo para bloqueio automático",autoLockTimeoutDescription:"Bloquear o cofre automaticamente após período de inatividade",autoLockTimeoutHelp:"O cofre será bloqueado apenas após o período de inatividade especificado (nenhuma utilização de preenchimento automático ou pop-up da extensão abertos). O cofre sempre será bloqueado quando o navegador for fechado, independentemente desta configuração.",autoLockNever:"Nunca",autoLock15Seconds:"15 segundos",autoLock1Minute:"1 minuto",autoLock5Minutes:"5 minutos",autoLock15Minutes:"15 minutos",autoLock30Minutes:"30 minutos",autoLock1Hour:"1 hora",autoLock4Hours:"4 horas",autoLock8Hours:"8 horas",autoLock24Hours:"24 horas",versionPrefix:"Versão ",autofillSettings:"Configurações de Preenchimento Automático",clipboardSettings:"Configurações da Área de Transferência",contextMenuSettings:"Configurações do Menu de Contexto",passkeySettings:"Configurações de Passkey",contextMenu:"Menu de Contexto",contextMenuEnabled:"Menu de contexto está habilitado",contextMenuDisabled:"Menu de contexto está desabilitado",contextMenuDescription:"Clique com o botão direito nos campos para acessar as opções do AliasVault",selectLanguage:"Selecionar Idioma",serverConfiguration:"Configurações do Servidor",serverConfigurationDescription:"Configure o URL do servidor do AliasVault para instâncias self-hosted",customApiUrl:"URL da API",customClientUrl:"URL do Cliente",apiUrlHint:"O URL do endpoint da API (geralmente o URL do cliente + /api)",clientUrlHint:"O URL da interface web da sua instância self-hosted",autofillSettingsDescription:"Habilite ou desabilite o popup de autopreenchimento em páginas web",autofillEnabledDescription:"Sugestões de autopreenchimento aparecerão em formulários de login",autofillDisabledDescription:"Sugestões de autopreenchimento estão desabilitadas globalmente",languageSettings:"Idioma",validation:{apiUrlRequired:"URL de API é obrigatório",apiUrlInvalid:"Por favor, digite um URL de API válido",clientUrlRequired:"URL de Cliente é obrigatório",clientUrlInvalid:"Por favor, digite um URL de cliente válido"},identityGenerator:"Gerador de Identidade",identityGeneratorSettings:{description:"Configure o idioma padrão e preferência de gênero para geração de novas identidades.",languageSection:"Idioma",languageDescription:"Defina o idioma que será utilizado ao gerar novas identidades.",genderSection:"Gênero",genderDescription:"Defina a preferência de gênero para geração de novas identidades.",ageRangeSection:"Faixa Etária",ageRangeDescription:"Selecione a faixa etária para geração de novas identidades.",genderOptions:{random:"Aleatório",male:"Masculino",female:"Feminino"}},unlockMethod:{title:"Método de Desbloqueio do Cofre",introText:"Escolha como você quer desbloquear seu cofre. Você pode utilizar sua senha mestre (sempre disponível), ou configurar um PIN para facilitar o acesso. Após 3 tentativas incorretas de PIN, você deverá utilizar sua senha mestre.",password:"Senha Mestre",pin:"Código PIN",pinDescription:"Desbloquear cofre com código PIN",setupPin:"Configurar Código PIN",enterNewPinDescription:"Digite um PIN que consista de, pelo menos, 6 dígitos",confirmPin:"Confirmar PIN",confirmPinDescription:"Digite seu PIN novamente para confirmar",invalidPinFormat:"Formato de PIN inválido",pinMismatch:"PINs não correspondem",incorrectPin:"PIN incorreto. {{attemptsRemaining}} tentativas restantes.",incorrectPinSingular:"PIN incorreto. 1 tentativa restante.",enableSuccess:"Desbloqueio por PIN habilitado com sucesso!",pinLocked:"Desbloqueio por PIN foi desabilitado. Por favor, utilize sua senha mestre para desbloquear o cofre.",pinSecurityWarning:"Desbloqueio por PIN na extensão de navegador pode ser menos segura que sua senha mestre, uma vez que PINs geralmente tem uma entropia menor e podem ser vulneráveis à tentativas forçadas caso seu dispositivo esteja comprometido. Utilize apenas em dispositivos que tenha total confiança."}},b1={passkey:"Passkey",site:"Site",helpText:"Passkeys são criadas no website quando solicitado. Elas não podem ser editadas manualmente. Para remover esta passkey, você pode excluí-la desta credencial. Para trocar esta passkey ou gerar uma nova, visite o website e siga as instruções.",passkeyMarkedForDeletion:"Passkey marcada para ser excluída",passkeyWillBeDeleted:"Esta passkey será excluída quando você salvar esta credencial.",useBrowserPasskey:"Utilizar Passkey do Navegador",bypass:{description:"Por quanto tempo você deseja utilizar o provedor de passkey do navegador para {{origin}}?",thisTimeOnly:"Apenas desta vez",alwaysForSite:"Sempre para este site"},authenticate:{title:"Fazer login com uma Passkey",signInFor:"Fazer login com uma passkey para",selectPasskey:"Selecione uma passkey para fazer login:",noPasskeysFound:"Nenhuma passkey foi encontrada para este site"},create:{title:"Criar Passkey",createFor:"Criar nova passkey para",titleLabel:"Título",titlePlaceholder:"Digite um nome para esta passkey",createButton:"Criar Passkey",selectPasskeyToReplace:"Selecione uma passkey para alterar:",createNewPasskey:"Criar Nova Passkey",replacingPasskey:"Alternado passkey: {{displayName}}",confirmReplace:"Confirmar Alterações",selectExistingLogin:"Adicionar à login existente:",selectExistingLoginDescription:"Adicionar este passkey em uma credencial de login para este site.",attachingToCredential:"Adicionando passkey em: {{serviceName}}",attachPasskey:"Adicionar Passkey"},settings:{passkeyProvider:"Provedor de Passkey",passkeyProviderOn:"Provedor de Passkey em "}},I1={title:"Recentemente Excluídos",noItems:"Nenhum item excluído",noItemsDescription:"Itens que você excluir aparecerão aqui por 30 dias, antes de serem removidos permanentemente.",description:"Estes itens serão excluídos permanentemente após 30 dias. Você pode restaurá-los ou excluí-los imediatamente.",restore:"Restaurar",deletePermanently:"Excluir Permanentemente",emptyAll:"Esvaziar Tudo",daysRemaining_one:"{{count}} dia restante",daysRemaining_other:"{{count}} dias restantes",expiringSoon:"Expirando em breve",confirmDeleteTitle:"Excluir Permanentemente?",confirmDeleteMessage:"Este item será excluído permanentemente, e não poderá ser restaurado.",confirmEmptyAllTitle:"Esvaziar Recentemente Excluídos?",confirmEmptyAllMessage:"Todos os {{count}} itens serão excluídos permanentemente, e não poderão ser restaurados."},v1={title:"Atualizar Cofre",subtitle:"AliasVault foi atualizado e seu cofre precisa ser atualizado. Isso deve levar apenas alguns segundos.",versionInformation:"Informação de Versão",yourVault:"Versão do seu cofre:",newVersion:"Nova versão disponível:",upgrade:"Atualizar Cofre",upgrading:"Atualizando...",whatsNew:"O Que Há de Novo",whatsNewDescription:"Uma atualização é necessária para utilizar as seguintes mudanças:",noDescriptionAvailable:"Nenhuma descrição disponível para esta versão.",alerts:{unableToGetVersionInfo:"Não foi possível solicitar informações da versão. Por favor, tente novamente.",selfHostedServer:"Servidor Self-Hosted",selfHostedWarning:"Se você está utilizando um servidor self-hosted, faça também a atualização da instância self-hosted, caso contrário o login no cliente web vai parar de funcionar.",continueUpgrade:"Continuar Atualização",upgradeFailed:"Atualização Falhou",failedToApplyMigration:"Falha ao aplicar migração ({{current}} de {{total}})"}},N1={unsyncedChangesTitle:"Alterações Dessincronizadas",unsyncedChangesWarning:"Você tem alterações dessincronizadas que serão perdidas caso você saia da sua conta agora. Têm certeza que deseja continuar?",logoutAnyway:"Sair assim mesmo"},C1={offline:"Offline",tapToRetry:"Tap to retry sync"},w1={auth:c1,menu:u1,common:d1,content:m1,items:g1,itemTypes:f1,fieldLabels:h1,totp:A1,attachmentUploader:p1,emails:y1,settings:E1,passkeys:b1,recentlyDeleted:I1,upgrade:v1,logout:N1,sync:C1},x1={loginTitle:"Autentificare în AliasVault",username:"Numele de utilizator sau adresa de e-mail",usernamePlaceholder:"nume / nume@companie.com",passwordPlaceholder:"Introdu parola",rememberMe:"Ține-mă minte",loginButton:"Autentificare",noAccount:"Nu ai încă un cont?",createVault:"Creează un seif nou",twoFactorTitle:"Introdu codul de autentificare din aplicația ta de autentificare.",authCode:"Cod de autentificare",authCodePlaceholder:"Introdu codul din 6 cifre",verify:"Verifică",twoFactorNote:"Notă: dacă nu ai acces la dispozitivul de autentificare, poți reseta 2FA cu un cod de recuperare autentificându-te prin intermediul site-ului web.",masterPassword:"Parolă principală",unlockVault:"Deblochează",unlockWithPin:"Deblochează cu PIN",enterPinToUnlock:"Introdu codul PIN pentru a debloca seiful",useMasterPassword:"Folosește parola principală",unlockTitle:"Deblochează seiful",logoutConfirm:"Sigur vrei să te deconectezi?",unlockSuccessTitle:"Seiful a fost deblocat cu succes",unlockSuccessDescription:"Acum poți folosi completarea automată pentru câmpurile cu date de autentificare în browserul tău.",closePopup:"Închide această fereastră",browseVault:"Răsfoiește conținutul seifului",connectingTo:"Conectare la",switchAccounts:"Treci la alt cont?",loginWithMobile:"Autentificare prin aplicația mobilă",unlockWithMobile:"Deblochează prin aplicația mobilă",scanQrCode:"Scanează acest cod QR cu aplicația mobilă AliasVault pentru a te autentifica și debloca seiful."},S1={vault:"Seif",emails:"E-mailuri"},T1={loading:"Se încarcă...",notice:"Notificare",error:"Eroare",cancel:"Anulează",confirm:"Confirmă",back:"Înapoi",next:"Înainte",use:"Folosește",add:"Adaugă",delete:"Șterge",undo:"Revocă",save:"Salvează",saving:"Se salvează...",create:"Creează",or:"Sau",close:"Închide",logout:"Deconectare",copied:"Copiat!",openInNewWindow:"Deschide în fereastră nouă",enabled:"Activat",disabled:"Dezactivat",showPassword:"Afișează parola",hidePassword:"Ascunde parola",showDetails:"Afișează detalii",hideDetails:"Ascunde detalii",copyToClipboard:"Copiază în clipboard",loadingEmails:"Se încarcă e-mailurile...",loadingTotpCodes:"Se încarcă codurile TOTP...",attachments:"Atașamente",loadingAttachments:"Se încarcă atașamentele...",settings:"Setări",recentEmails:"E-mailuri recente",credentials:"Date de autentificare",customFields:"Câmpuri personalizate",twoFactorAuthentication:"Autentificare cu doi factori",alias:"Alias",notes:"Note",email:"E-mail",username:"Utilizator",password:"Parolă",generate:"Generează",serviceName:"Nume Serviciu",loggedIn:"Autentificat",syncingVault:"Se sincronizează seiful",checkingVaultUpdates:"Se verifică actualizările seifului",syncingUpdatedVault:"Se sincronizează seiful actualizat",loadMore:"Încarcă mai multe",offline:"Deconectat",offlineMode:"Funcționează în modul offline",pendingSync:"Se sincronizează...",mergingVaultChanges:"Se îmbină modificările seifului...",uploadingVault:"Se încarcă seiful...",errors:{serverNotAvailable:"Serverul AliasVault nu este disponibil. Încearcă mai târziu sau contactează asistența.",clientVersionNotSupported:"Această versiune a extensiei AliasVault nu mai este compatibilă cu serverul. Actualizează extensia la cea mai recentă versiune.",browserExtensionOutdated:"Versiune extensie incompatibilă. Pentru a accesa seiful, actualizează extensia AliasVault la ultima versiune disponibilă.",serverVersionNotSupported:"Serverul AliasVault trebuie actualizat la o versiune mai nouă pentru a folosi această extensie. Contactează asistența pentru ajutor.",serverVersionTooOld:"Serverul AliasVault trebuie actualizat la o versiune mai nouă pentru a folosi această funcție. Contactează administratorul serverului.",unknownError:"A apărut o eroare necunoscută",unknownErrorTryAgain:"A apărut o eroare necunoscută. Încearcă din nou.",vaultNotAvailable:"Seiful nu este disponibil",vaultIsLocked:"Seiful este blocat",passwordChanged:"Parola ta a fost schimbată de la ultima autentificare. Autentifică-te din nou din motive de securitate.",syncConflictMaxRetries:"Sincronizarea seifului a eșuat după mai multe încercări. Reîncearcă mai târziu.",mergeFailed:"Îmbinarea modificărilor seifului a eșuat. Încearcă din nou.",invalidCode:"Introdu un cod de autentificare valid din 6 cifre.",serverError:"Nu s-a putut stabili conexiunea cu serverul AliasVault. Încearcă din nou mai târziu sau contactează asistența dacă problema persistă.",wrongPassword:"Parolă incorectă. Încearcă din nou.",sessionExpired:"Sesiunea ta a expirat. Autentifică-te din nou.",mobileLoginRequestExpired:"Cererea de autentificare de pe dispozitivul mobil a expirat. Reîncarcă pagina și încearcă din nou."},apiErrors:{UNKNOWN_ERROR:"A apărut o eroare necunoscută. Încearcă din nou.",ACCOUNT_LOCKED:"Cont blocat temporar din cauza prea multor încercări eșuate. Reîncearcă mai târziu.",ACCOUNT_BLOCKED:"Contul tău a fost dezactivat. Dacă crezi că este o greșeală, contactează asistența.",USER_NOT_FOUND:"Utilizator sau parolă invalidă. Încearcă din nou.",INVALID_AUTHENTICATOR_CODE:"Cod de autentificare invalid. Încearcă din nou.",INVALID_RECOVERY_CODE:"Cod de recuperare invalid. Încearcă din nou.",REFRESH_TOKEN_REQUIRED:"Este necesar un token de actualizare.",INVALID_REFRESH_TOKEN:"Token de actualizare nevalid.",PUBLIC_REGISTRATION_DISABLED:"Înregistrarea conturilor noi este dezactivată pe acest server. Contactează administratorul.",USERNAME_REQUIRED:"Numele de utilizator este obligatoriu.",USERNAME_ALREADY_IN_USE:"Numele de utilizator este deja folosit.",USERNAME_AVAILABLE:"Numele de utilizator este disponibil.",USERNAME_MISMATCH:"Numele de utilizator nu se potrivește cu utilizatorul curent.",PASSWORD_MISMATCH:"Parola furnizată nu se potrivește cu parola ta curentă.",ACCOUNT_SUCCESSFULLY_DELETED:"Cont șters cu succes.",USERNAME_EMPTY_OR_WHITESPACE:"Numele de utilizator nu poate fi necompletat sau format doar din spații.",USERNAME_TOO_SHORT:"Nume prea scurt: trebuie să aibă cel puțin 3 caractere.",USERNAME_TOO_LONG:"Nume prea lung: nu poate depăși 40 de caractere.",USERNAME_INVALID_EMAIL:"Adresă de e-mail invalidă.",USERNAME_INVALID_CHARACTERS:"Numele de utilizator este invalid, poate conține doar litere sau cifre.",VAULT_NOT_UP_TO_DATE:"Seiful tău nu este actualizat. Sincronizează seiful și încearcă din nou.",INTERNAL_SERVER_ERROR:"Eroare internă de server.",VAULT_ERROR:"Seiful local nu este actualizat. Sincronizează seiful prin reîmprospătarea paginii și încearcă din nou."}},k1={or:"sau",new:"Nou",vaultLocked:"AliasVault este blocat.",creatingNewAlias:"Se creează un alias nou...",noMatchesFound:"Nicio potrivire găsită",searchVault:"Caută în seif...",enterServiceName:"Introdu numele serviciului",enterEmailAddress:"Introdu adresa de e-mail",enterUsername:"Introdu numele de utilizator",hideFor1Hour:"Ascunde pentru 1 oră (site-ul curent)",hidePermanently:"Ascunde definitiv (site-ul curent)",createRandomAlias:"Creează un alias aleatoriu",createUsernamePassword:"Creează utilizator/parolă",randomAlias:"Alias aleatoriu",usernamePassword:"Utilizator/parolă",createAndSaveAlias:"Creează și salvează alias",createAndSaveCredential:"Creează și salvează datele de autentificare",randomIdentityDescription:"Generează o identitate aleatorie cu o adresă de e-mail aleatorie accesibilă în AliasVault.",randomIdentityDescriptionDropdown:"Identitate aleatorie cu e-mail aleatoriu",manualCredentialDescription:"Specifică propria adresă de e-mail și numele de utilizator.",manualCredentialDescriptionDropdown:"Nume de utilizator și parolă introduse manual",failedToCreateIdentity:"Eșec la crearea identității. Încearcă din nou.",enterEmailAndOrUsername:"Introdu adresa de e-mail și/sau numele de utilizator",autofillWithAliasVault:"Completare automată cu AliasVault",generateRandomPassword:"Generează o parolă aleatorie (copiază în clipboard)",generateNewPassword:"Generează parolă nouă",togglePasswordVisibility:"Comută vizibilitatea parolei",passwordCopiedToClipboard:"Parolă copiată în clipboard",openAliasVaultToUpgrade:"Deschide AliasVault pentru actualizare",vaultUpgradeRequired:"Este necesară actualizarea seifului.",dismissPopup:"Închide fereastra"},L1={title:"Elemente",itemName:"Nume",loginCredentials:"Date de autentificare",cardInformation:"Informații Card",addItem:"Adaugă element",addNewItem:"Adaugă element nou",saveItem:"Salvează element",itemDetails:"Detalii element",editItem:"Editează element",untitled:"Fără titlu",newFolder:"Dosar nou",createFolder:"Creează dosar",editFolder:"Editează dosarul",folderName:"Nume dosar",folderNameRequired:"Numele dosarului este obligatoriu",folder:"Dosar",welcomeTitle:"Bun venit în AliasVault!",welcomeDescription:"Pentru a utiliza extensia de browser AliasVault: accesează un site web și folosește fereastra pop-up de completare automată AliasVault pentru a crea noi date de autentificare.",noPasskeysFound:"Nu a fost creat niciun passkey încă. Passkey-urile sunt create vizitând site-uri care oferă această metodă de autentificare.",noAttachmentsFound:"Nu s-au găsit elemente cu atașamente",noItemsOfTypeFound:"Nu s-au găsit elemente de tip {{type}}",noMatchingItems:"Nu s-au găsit elemente care să se potrivească",noMatchingItemsSearch:"Nu s-au găsit elemente pentru „{{search}}”",noMatchingItemsWithFilter:"Niciun element {{filter}} nu se potrivește cu „{{search}}”",clearSearch:"Șterge căutarea",clearFilter:"Șterge filtrul",emptyFolderHint:"Acest dosar este gol. Pentru a muta elemente aici, editează elementul și apasă pe pictograma folderului din câmpul de nume.",allItemsInFolders:"Toate elementele tale sunt organizate în dosare. Apasă pe un dosar de mai sus pentru a vizualiza datele de autentificare sau folosește căutarea pentru a găsi elemente specifice.",deleteFolder:"Șterge dosarul",deleteFolderKeepItems:"Șterge doar dosarul",deleteFolderKeepItemsDescription:"Elementele vor fi mutate înapoi în lista principală.",deleteFolderAndItems:"Șterge dosarul și toate elementele",deleteFolderAndItemsDescription:"{{count}} element(e) vor fi mutate la Șterse Recent.",filters:{folders:"Dosare",passkeys:"Passkeys"},sort:{title:"Filtrează după",oldestFirst:"Cele mai vechi primele",newestFirst:"Cele mai noi primele",alphabetical:"Alfabetic (A-Z)"},deleteItemTitle:"Șterge element",deleteItemConfirm:"Sigur vrei să ștergi acest element?",viewHistory:"Vezi istoric",history:"Istoric",noHistoryAvailable:"Niciun istoric disponibil",tags:"Etichete",changePasswordComplexity:"Schimbă complexitatea parolei",passwordLength:"Lungime parolă",includeLowercase:"Include litere mici",includeUppercase:"Include litere mari",includeNumbers:"Include cifre",includeSpecialChars:"Include caractere speciale",avoidAmbiguousChars:"Evită caracterele ambigue (o, 0, etc.)",privateEmailTitle:"E-mail Privat",privateEmailAliasVaultServer:"Server AliasVault",privateEmailDescription:"Criptat E2E, complet privat.",publicEmailTitle:"Furnizori Publici de E-mail Temporar",publicEmailDescription:"Anonim, dar cu confidențialitate limitată. Conținutul poate fi citit de oricine cunoaște adresa.",validation:{required:"Acest câmp este obligatoriu"}},R1={selectType:"Adaugă element nou",typeLabel:"Tip element",creating:"Creare",editing:"Editare",regenerateAlias:"Regenerează alias",addCustomField:"Adaugă câmp personalizat",fieldLabel:"Etichetă câmp",enterFieldName:"Introdu numele câmpului",fieldType:"Tip câmp",fieldTypes:{text:"Text",hidden:"Ascuns (text mascat)",email:"E-mail",url:"URL",phone:"Telefon",number:"Număr",date:"Dată",textArea:"Zonă text"},login:{title:"Autentificare"},alias:{title:"Alias"},creditCard:{title:"Card de credit"},note:{title:"Notă securizată"}},D1={"login.url":"URL Website","login.username":"Utilizator","login.password":"Parolă","alias.first_name":"Prenume","alias.last_name":"Nume","alias.gender":"Gen","alias.birthdate":"Data nașterii","login.email":"E-mail","notes.content":"Note","card.cardholder_name":"Nume Titular","card.number":"Număr card","card.expiry_month":"Lună expirare","card.expiry_year":"An expirare","card.cvv":"CVV","card.pin":"PIN"},B1={addCode:"Adaugă cod 2FA",instructions:"Introdu cheia secretă afișată de site-ul unde dorești să activezi autentificarea cu doi factori.",nameOptional:"Nume (opțional)",secretKey:"Cheie Secretă",saveToViewCode:"Salvează pentru a vedea codul",defaultName:"Authenticator",errors:{invalidSecretKey:"Format cheie secretă invalid."}},U1={uploading:"Se încarcă...",uploadSuccess:"Fișiere încărcate cu succes.",deleteSuccess:"Atașament șters cu succes.",firefoxExpandRequired:"Pentru a încărca fișiere, folosește fereastra extinsă.",openExpandedWindow:"Deschide fereastra extinsă"},M1={title:"E-mailuri",deleteEmailTitle:"Șterge e-mail",deleteEmailConfirm:"Sigur vrei să ștergi definitiv acest e-mail?",from:"De la",to:"Către",date:"Data",emailContent:"Conținut e-mail",emailNotFound:"E-mailul nu a fost găsit",noEmails:"Nu s-au găsit e-mailuri",noEmailsDescription:"Nu ai primit încă niciun e-mail pe adresele tale private. Atunci când vei primi un e-mail nou, acesta va apărea aici.",offlineMessage:"Sunteți offline. Conectează-te la internet pentru a încărca e-mailurile.",dateFormat:{justNow:"acum",minutesAgo_single:"{{count}} minut în urmă",minutesAgo_plural:"{{count}} minute în urmă",hoursAgo_single:"{{count}} oră în urmă",hoursAgo_plural:"{{count}} ore în urmă",yesterday:"ieri"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Adresa de e-mail aleasă este deja utilizată. Schimbă adresa de e-mail prin editarea acestor date de autentificare.",CLAIM_DOES_NOT_EXIST:"A apărut o eroare la încărcarea e-mailurilor. Editează și salvează datele de autentificare pentru a sincroniza baza de date, apoi încearcă din nou."}},_1={serverUrl:"URL Server",language:"Limbă",autofillEnabled:"Activează completarea automată",version:"Versiune",openWebApp:"Deschide aplicația web",lock:"Blochează",globalSettings:"Setări Globale",autofillPopup:"Fereastra de completare automată",activeOnAllSites:"Activă pe toate site-urile (cu excepțiile de mai jos)",disabledOnAllSites:"Dezactivat pe toate site-urile",rightClickContextMenu:"Meniu contextual (clic dreapta)",autofillMatching:"Potrivire completare automată",autofillMatchingMode:"Mod de potrivire a completării automate",autofillMatchingModeDescription:"Determină care date de autentificare sunt considerate potrivite și afișate ca sugestii în fereastra de completare automată pentru un anumit site web.",autofillMatchingDefault:"URL + subdomeniu + nume (wildcard)",autofillMatchingUrlSubdomain:"URL + subdomeniu",autofillMatchingUrlExact:"Doar domeniul exact al URL-ului",siteSpecificSettings:"Setări specifice site-ului",autofillPopupOn:"Fereastra de completare automată pe: ",enabledForThisSite:"Activat pentru acest site",disabledForThisSite:"Dezactivat pentru acest site",temporarilyDisabledUntil:"Dezactivat temporar până la ",resetAllSiteSettings:"Resetează toate setările specifice site-ului",appearance:"Aspect",theme:"Temă",useDefault:"Implicită",light:"Luminoasă",dark:"Întunecată",keyboardShortcuts:"Comenzi rapide de tastatură",configureKeyboardShortcuts:"Configurează comenzile rapide de la tastatură",configure:"Configurează",clipboardClearTimeout:"Golește clipboardul după copiere",clipboardClearTimeoutDescription:"Golește automat clipboardul după copierea datelor sensibile",clipboardClearDisabled:"Niciodată",clipboardClear5Seconds:"După 5 secunde",clipboardClear10Seconds:"După 10 secunde",clipboardClear15Seconds:"După 15 secunde",autoLockTimeout:"Interval auto-blocare",autoLockTimeoutDescription:"Blochează automat seiful după o perioadă de inactivitate",autoLockTimeoutHelp:"Seiful se va bloca doar după perioada de inactivitate specificată (fără completare automată sau deschiderea extensiei). Seiful se va bloca întotdeauna la închiderea browserului.",autoLockNever:"Niciodată",autoLock15Seconds:"15 secunde",autoLock1Minute:"1 minut",autoLock5Minutes:"5 minute",autoLock15Minutes:"15 minute",autoLock30Minutes:"30 minute",autoLock1Hour:"1 oră",autoLock4Hours:"4 ore",autoLock8Hours:"8 ore",autoLock24Hours:"24 ore",versionPrefix:"Versiune ",autofillSettings:"Setări completare automată",clipboardSettings:"Setări clipboard",contextMenuSettings:"Setări meniu contextual",passkeySettings:"Setări passkey",contextMenu:"Meniu Contextual",contextMenuEnabled:"Meniul contextual este activat",contextMenuDisabled:"Meniul contextual este dezactivat",contextMenuDescription:"Clic dreapta pe câmpurile de introducere pentru a accesa opțiunile AliasVault",selectLanguage:"Selectează limba",serverConfiguration:"Configurare Server",serverConfigurationDescription:"Configurează URL-ul serverului AliasVault pentru instanțele self-hosted",customApiUrl:"URL API",customClientUrl:"URL Client",apiUrlHint:"URL-ul endpoint-ului API (de obicei URL client + /api)",clientUrlHint:"URL-ul interfeței web a instanței tale",autofillSettingsDescription:"Activează sau dezactivează fereastra de completare automată",autofillEnabledDescription:"Sugestiile de completare automată vor apărea în câmpurile de autentificare",autofillDisabledDescription:"Sugestiile sunt dezactivate global",languageSettings:"Limbă",validation:{apiUrlRequired:"URL-ul API este obligatoriu",apiUrlInvalid:"Introdu un URL API valid",clientUrlRequired:"URL-ul Client este obligatoriu",clientUrlInvalid:"Introdu un URL Client valid"},identityGenerator:"Generator de Identitate",identityGeneratorSettings:{description:"Configurează limba și genul implicit pentru generarea de noi identități.",languageSection:"Limbă",languageDescription:"Setează limba care va fi utilizată la generarea noilor identități.",genderSection:"Gen",genderDescription:"Setează preferința de gen pentru generarea noilor identități.",ageRangeSection:"Interval de vârstă",ageRangeDescription:"Setează intervalul de vârstă pentru generarea noilor identități.",genderOptions:{random:"Aleatoriu",male:"Masculin",female:"Feminin"}},unlockMethod:{title:"Metodă deblocare seif",introText:"Alege cum dorești să îți deblochezi seiful. Poți folosi parola principală (întotdeauna disponibilă) sau poți configura un cod PIN pentru acces rapid. După 3 încercări eșuate ale PIN-ului, va trebui să folosești parola principală.",password:"Parolă principală",pin:"Cod PIN",pinDescription:"Deblochează seiful cu codul PIN",setupPin:"Configurează Cod PIN",enterNewPinDescription:"Introdu un cod PIN de cel puțin 6 cifre",confirmPin:"Confirmă PIN",confirmPinDescription:"Introdu PIN-ul din nou pentru confirmare",invalidPinFormat:"Format PIN invalid",pinMismatch:"PIN-urile nu se potrivesc",incorrectPin:"PIN incorect. {{attemptsRemaining}} încercări rămase.",incorrectPinSingular:"PIN incorect. 1 încercare rămasă.",enableSuccess:"Deblocarea prin PIN a fost activată!",pinLocked:"Deblocarea prin PIN a fost dezactivată. Folosește parola principală.",pinSecurityWarning:"Deblocarea prin PIN în extensia de browser poate fi mai puțin sigură decât parola principală. PIN-urile au o entropie mai scăzută, fiind vulnerabile la atacuri de tip brute-force dacă dispozitivul este compromis. Folosește-o doar pe dispozitive în care ai încredere deplină."}},F1={passkey:"Passkey",site:"Site",helpText:"Passkey-urile sunt create pe site-uri când este solicitat. Nu pot fi editate manual. Pentru a înlocui un passkey, vizitează site-ul respectiv.",passkeyMarkedForDeletion:"Passkey marcat pentru ștergere",passkeyWillBeDeleted:"Acest passkey va fi șters atunci când salvezi aceste date de autentificare.",useBrowserPasskey:"Folosește Passkey-ul Browserului",bypass:{description:"Cât timp dorești să folosești furnizorul de passkey al browserului pentru {{origin}}?",thisTimeOnly:"Doar de data aceasta",alwaysForSite:"Întotdeauna pentru acest site"},authenticate:{title:"Autentificare cu Passkey",signInFor:"Autentificare cu passkey pentru",selectPasskey:"Selectează un passkey pentru autentificare:",noPasskeysFound:"Nu s-au găsit passkey-uri pentru acest site"},create:{title:"Creează Passkey",createFor:"Creează un passkey nou pentru",titleLabel:"Titlu",titlePlaceholder:"Introdu un nume pentru acest passkey",createButton:"Creează Passkey",selectPasskeyToReplace:"Selectează un passkey pentru a-l înlocui:",createNewPasskey:"Creează Passkey Nou",replacingPasskey:"Se înlocuiește passkey-ul: {{displayName}}",confirmReplace:"Confirmă Înlocuirea",selectExistingLogin:"Adaugă la o autentificare existentă:",selectExistingLoginDescription:"Atașează acest passkey unor date de autentificare existente pentru acest site.",attachingToCredential:"Se adaugă passkey-ul la: {{serviceName}}",attachPasskey:"Adaugă Passkey"},settings:{passkeyProvider:"Furnizor Passkey",passkeyProviderOn:"Furnizor Passkey pe "}},O1={title:"Șterse Recent",noItems:"Niciun element șters",noItemsDescription:"Elementele șterse vor apărea aici timp de 30 de zile înainte de a fi eliminate definitiv.",description:"Aceste elemente vor fi șterse definitiv după 30 de zile. Le poți restaura sau șterge imediat.",restore:"Restaurează",deletePermanently:"Șterge Definitiv",emptyAll:"Golește tot",daysRemaining_one:"{{count}} zi rămasă",daysRemaining_other:"{{count}} zile rămase",expiringSoon:"Expiră curând",confirmDeleteTitle:"Ștergi Definitiv?",confirmDeleteMessage:"Acest element va fi șters definitiv și nu va putea fi recuperat.",confirmEmptyAllTitle:"Golești elementele șterse recent?",confirmEmptyAllMessage:"Toate cele {{count}} elemente vor fi șterse definitiv și nu vor putea fi recuperate."},j1={title:"Actualizare Seif",subtitle:"AliasVault s-a actualizat și seiful tău trebuie actualizat. Aceasta va dura doar câteva secunde.",versionInformation:"Informații Versiune",yourVault:"Versiunea seifului tău:",newVersion:"Versiune nouă disponibilă:",upgrade:"Actualizează Seiful",upgrading:"Se actualizează...",whatsNew:"Ce este nou",whatsNewDescription:"Este necesară o actualizare pentru a permite următoarele modificări:",noDescriptionAvailable:"Nicio descriere disponibilă pentru această versiune.",alerts:{unableToGetVersionInfo:"Informațiile despre versiune nu au putut fi obținute. Reîncearcă.",selfHostedServer:"Server Self-Hosted",selfHostedWarning:"Dacă folosești un server self-hosted, asigură-te că actualizezi și instanța serverului, altfel autentificarea în clientul web nu va mai funcționa.",continueUpgrade:"Continuă Actualizarea",upgradeFailed:"Actualizare Eșuată",failedToApplyMigration:"Eșec la aplicarea migrării ({{current}} din {{total}})"}},P1={unsyncedChangesTitle:"Modificări Nesincronizate",unsyncedChangesWarning:"Ai modificări nesincronizate care se vor pierde dacă te deconectezi acum. Sigur vrei să continui?",logoutAnyway:"Deconectează-te oricum"},H1={offline:"Offline",tapToRetry:"Apasă pentru a reîncerca sincronizarea"},z1={auth:x1,menu:S1,common:T1,content:k1,items:L1,itemTypes:R1,fieldLabels:D1,totp:B1,attachmentUploader:U1,emails:M1,settings:_1,passkeys:F1,recentlyDeleted:O1,upgrade:j1,logout:P1,sync:H1},Q1={loginTitle:"Войдите в AliasVault",username:"Имя пользователя или почта",usernamePlaceholder:"имя / имя@company.com",passwordPlaceholder:"Введите ваш пароль",rememberMe:"Запомнить меня",loginButton:"Войти",noAccount:"Нет аккаунта?",createVault:"Создать новое хранилище",twoFactorTitle:"Пожалуйста, введите код аутентификации из вашего приложения-аутентификатора.",authCode:"Код аутентификации",authCodePlaceholder:"Введите 6-значный код",verify:"Проверить",twoFactorNote:"Примечание: если у вас нет доступа к устройству аутентификации, вы можете сбросить ваш 2FA с помощью кода восстановления, войдя в систему через сайт.",masterPassword:"Мастер пароль",unlockVault:"Разблокировать",unlockWithPin:"Разблокировать ПИН-кодом\uFEFF",enterPinToUnlock:"Введите ПИН-код для разблокировки хранилища",useMasterPassword:"Использовать мастер-пароль",unlockTitle:"Разблокировать ваше хранилище",logoutConfirm:"Вы уверены, что хотите выйти?",unlockSuccessTitle:"Ваше хранилище успешно разблокировано",unlockSuccessDescription:"Теперь вы можете использовать автозаполнение форм входа в Вашем браузере.",closePopup:"Закрыть окно",browseVault:"Обзор содержимого хранилища",connectingTo:"Подключение к",switchAccounts:"Переключить аккаунт?",loginWithMobile:"Войти с помощью мобильного приложения",unlockWithMobile:"Разблокировать через мобильное приложение",scanQrCode:"Сканируйте QR-код в приложении AliasVault, чтобы войти."},V1={vault:"Хранилище",emails:"Почта"},G1={loading:"Загрузка...",notice:"Примечание",error:"Ошибка",cancel:"Отмена",confirm:"Подтвердить",back:"Назад",next:"Далее",use:"Использовать",add:"Добавить",delete:"Удалить",undo:"Отменить",save:"Сохранить",saving:"Сохраняем...",create:"Создать",or:"Или",close:"Закрыть",logout:"Выйти",copied:"Скопировано!",openInNewWindow:"Открыть в новом окне",enabled:"Включено",disabled:"Отключено",showPassword:"Показать пароль",hidePassword:"Скрыть пароль",showDetails:"Показать подробности",hideDetails:"Скрыть подробности",copyToClipboard:"Скопировать в буфер обмена",loadingEmails:"Загрузка писем...",loadingTotpCodes:"Загрузка TOTP кодов...",attachments:"Вложения",loadingAttachments:"Загрузка вложений...",settings:"Настройки",recentEmails:"Последние письма",credentials:"Учетные записи",customFields:"Пользовательские поля",twoFactorAuthentication:"Двухфакторная аутентификация",alias:"Псевдоним",notes:"Заметки",email:"Электронная почта",username:"Имя пользователя",password:"Пароль",generate:"Сгенерировать",serviceName:"Название сервиса",loggedIn:"Вход выполнен",syncingVault:"Синхронизация хранилища",checkingVaultUpdates:"Проверка наличия обновлений в хранилище",syncingUpdatedVault:"Синхронизация обновленного хранилища",loadMore:"Загрузить ещё",offline:"Офлайн",offlineMode:"Работа в автономном режиме",pendingSync:"Синхронизация...",mergingVaultChanges:"Объединение изменений в хранилище...",uploadingVault:"Загрузка хранилища...",errors:{serverNotAvailable:"Сервер AliasVault недоступен. Пожалуйста, повторите попытку позже или обратитесь в службу поддержки, если проблема не устранится.",clientVersionNotSupported:"Эта версия браузерного расширения AliasVault больше не поддерживается сервером. Пожалуйста, обновите расширение вашего браузера до последней версии.",browserExtensionOutdated:"Это расширение браузера устарело и не может быть использовано для доступа к этому хранилищу. Пожалуйста, обновите расширение, чтобы продолжить.",serverVersionNotSupported:"Чтобы использовать это расширение для браузера, сервер AliasVault необходимо обновить до более новой версии. Пожалуйста, обратитесь в службу поддержки, если вам нужна помощь.",serverVersionTooOld:"Сервер AliasVault необходимо обновить до более новой версии, чтобы использовать эту функцию. Если вам нужна помощь, обратитесь к администратору сервера.",unknownError:"Произошла неизвестная ошибка",unknownErrorTryAgain:"Произошла неизвестная ошибка. Попробуйте снова.",vaultNotAvailable:"Хранилище недоступно",vaultIsLocked:"Хранилище заблокировано",passwordChanged:"С момента вашего последнего входа ваш пароль изменился. Пожалуйста, войдите еще раз в целях безопасности.",syncConflictMaxRetries:"Ошибка синхронизации хранилища. Повторите попытку позже.",mergeFailed:"Не удалось объединить изменения. Попробуйте снова.",invalidCode:"Введите корректный 6-значный код подтверждения.",serverError:"Сервер AliasVault недоступен. Повторите попытку позже или свяжитесь с техподдержкой.",wrongPassword:"Неверный пароль. Повторите попытку.",sessionExpired:"Срок действия сессии истек. Войдите снова.",mobileLoginRequestExpired:"Срок запроса на вход истек. Обновите страницу и попробуйте снова."},apiErrors:{UNKNOWN_ERROR:"Произошла неизвестная ошибка. Пожалуйста, попробуйте снова.",ACCOUNT_LOCKED:"Учетная запись временно заблокирована из-за слишком большого количества неудачных попыток. Пожалуйста, повторите попытку позже.",ACCOUNT_BLOCKED:"Ваша учетная запись была заблокирована. Если вы считаете, что это ошибка, пожалуйста, свяжитесь со службой поддержки.",USER_NOT_FOUND:"Неверное имя пользователя или пароль. Пожалуйста, попробуйте снова.",INVALID_AUTHENTICATOR_CODE:"Неверный код аутентификатора. Пожалуйста, попробуйте снова.",INVALID_RECOVERY_CODE:"Неверный код восстановления. Пожалуйста, попробуйте снова.",REFRESH_TOKEN_REQUIRED:"Требуется токен обновления.",INVALID_REFRESH_TOKEN:"Недопустимый токен обновления.",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:"Локальное хранилище не обновлено. Пожалуйста, синхронизируйте ваше хранилище, обновив страницу, и повторите попытку."}},K1={or:"или",new:"Новый",vaultLocked:"AliasVault заблокирован.",creatingNewAlias:"Создание нового псевдонима...",noMatchesFound:"Совпадений не найдено",searchVault:"Поиск хранилища...",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:"Пароль скопирован в буфер обмена",openAliasVaultToUpgrade:"Откройте AliasVault для обновления",vaultUpgradeRequired:"Требуется обновление хранилища.",dismissPopup:"Закрыть окно"},q1={title:"Записи",itemName:"Имя",loginCredentials:"Учетные данные для авторизации",cardInformation:"Данные карты",addItem:"Добавить запись",addNewItem:"Добавить запись",saveItem:"Сохранить запись",itemDetails:"Детали записи",editItem:"Редактировать запись",untitled:"Без названия",newFolder:"Новая папка",createFolder:"Создать папку",editFolder:"Изменить папку",folderName:"Название папки",folderNameRequired:"Название папки обязательно",folder:"Папка",welcomeTitle:"Добро пожаловать в AliasVault!",welcomeDescription:"Чтобы использовать браузерное расширение AliasVault: перейдите на сайт и используйте всплывающее окно автозаполнения AliasVault для создания новых учетных данных.",noPasskeysFound:"Ключи доступа еще не созданы. Ключи доступа создаются при посещении веб-сайта, который предлагает их в качестве метода аутентификации.",noAttachmentsFound:"Элементы с вложениями не найдены",noItemsOfTypeFound:"Элементы типа «{{type}}» не найдены",noMatchingItems:"Совпадений не найдено",noMatchingItemsSearch:'По запросу "{{search}}" ничего не найдено',noMatchingItemsWithFilter:'Ничего не найдено в "{{filter}}" по запросу "{{search}}"',clearSearch:"Очистить поиск",clearFilter:"Сбросить фильтр",emptyFolderHint:"Эта папка пуста. Чтобы переместить сюда записи, перейдите в режим редактирования записи и нажмите на иконку папки в поле имени.",allItemsInFolders:"Все ваши данные разложены по папкам. Выберите нужную папку выше или воспользуйтесь поиском, чтобы найти конкретную запись.",deleteFolder:"Удалить папку",deleteFolderKeepItems:"Удалить только папку",deleteFolderKeepItemsDescription:"Элементы будут перемещены обратно в основной список.",deleteFolderAndItems:"Удалить папку и все элементы",deleteFolderAndItemsDescription:"{{count}} объект(ов) будет перемещено в раздел «Недавно удалённые».",filters:{folders:"Папки",passkeys:"Ключи доступа"},sort:{title:"Сортировка",oldestFirst:"Сначала старые",newestFirst:"Сначала новые",alphabetical:"По алфавиту (А–Я)"},deleteItemTitle:"Удалить элемент",deleteItemConfirm:"Вы уверены, что хотите удалить этот элемент?",viewHistory:"Посмотреть историю",history:"История",noHistoryAvailable:"История пока пуста",tags:"Теги",changePasswordComplexity:"Изменить сложность пароля",passwordLength:"Длина пароля",includeLowercase:"Включить строчные буквы",includeUppercase:"Включить заглавные буквы",includeNumbers:"Включить числа",includeSpecialChars:"Включить специальные символы",avoidAmbiguousChars:"Избегать двусмысленных символов (o, 0 и т.д.)",privateEmailTitle:"Личная электронная почта",privateEmailAliasVaultServer:"Сервер AliasVault",privateEmailDescription:"Шифрование E2E, полностью приватный.",publicEmailTitle:"Общедоступные временные поставщики электронной почты",publicEmailDescription:"Анонимность, но ограниченная конфиденциальность. Содержимое письма может прочитать любой, кому известен адрес.",validation:{required:"Это поле является обязательным"}},W1={selectType:"Добавить новую запись",typeLabel:"Тип записи",creating:"Создание",editing:"Редактирование",regenerateAlias:"Перегенерировать псевдоним",addCustomField:"Добавить свое поле",fieldLabel:"Название поля",enterFieldName:"Введите название поля",fieldType:"Тип поля",fieldTypes:{text:"Текст",hidden:"Скрыто (маскированный текст)",email:"Почта",url:"URL",phone:"Телефон",number:"Номер",date:"Дата",textArea:"Текстовая область"},login:{title:"Логин"},alias:{title:"Псевдоним"},creditCard:{title:"Банковская карта"},note:{title:"Защищенная заметка"}},Y1={"login.url":"URL веб-сайта","login.username":"Логин","login.password":"Пароль","alias.first_name":"Имя","alias.last_name":"Фамилия","alias.gender":"Пол","alias.birthdate":"Дата рождения","login.email":"Почта","notes.content":"Примечание","card.cardholder_name":"Имя держателя карты","card.number":"Номер карты","card.expiry_month":"Месяц окончания","card.expiry_year":"Год окончания","card.cvv":"CVV-код","card.pin":"PIN"},J1={addCode:"Добавить код 2FA",instructions:"Введите секретный ключ, указанный на веб-сайте, где вы хотите добавить двухфакторную аутентификацию.",nameOptional:"Имя (необязательно)",secretKey:"Секретный ключ",saveToViewCode:"Сохранить для просмотра кода",defaultName:"Аутентификатор",errors:{invalidSecretKey:"Неверный формат секретного ключа."}},X1={uploading:"Загрузка...",uploadSuccess:"Файлы успешно загружены.",deleteSuccess:"Вложение успешно удалено.",firefoxExpandRequired:"Для загрузки файлов используйте расширенное окно.",openExpandedWindow:"Открыть расширенное окно"},$1={title:"Письма",deleteEmailTitle:"Удалить письмо",deleteEmailConfirm:"Вы уверены, что хотите навсегда удалить это письмо?",from:"От",to:"К",date:"Дата",emailContent:"Содержимое письма",emailNotFound:"Адрес электронной почты не найден",noEmails:"Электронные письма не найдены",noEmailsDescription:"Вы еще не получали никаких электронных писем на свои личные адреса электронной почты. Когда вы получите новое электронное письмо, оно появится здесь.",offlineMessage:"Вы не в сети. Пожалуйста, подключитесь к Интернету, чтобы загрузить свои электронные письма.",dateFormat:{justNow:"прямо сейчас",minutesAgo_single:"{{count}} мин назад",minutesAgo_plural:"{{count}} минут назад",hoursAgo_single:"{{count}} часов назад",hoursAgo_plural:"{{count}} часов назад",yesterday:"вчера"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Текущий выбранный адрес электронной почты уже используется. Пожалуйста, измените адрес электронной почты, отредактировав эти учетные данные.",CLAIM_DOES_NOT_EXIST:"При попытке загрузить письма произошла ошибка. Пожалуйста, попробуйте отредактировать и сохранить данные для синхронизации базы данных, затем повторите попытку."}},Z1={serverUrl:"URL-адрес сервера",language:"Язык",autofillEnabled:"Включить автозаполнение",version:"Версия",openWebApp:"Открыть веб-приложение",lock:"Заблокировать",globalSettings:"Глобальные настройки",autofillPopup:"Всплывающее окно автозаполнения",activeOnAllSites:"Активен на всех сайтах (если не отключен ниже)",disabledOnAllSites:"Отключено на всех сайтах",rightClickContextMenu:"Контекстное меню правым щелчком мыши",autofillMatching:"Соответствие автозаполнения",autofillMatchingMode:"Режим сопоставления автозаполнения",autofillMatchingModeDescription:"Определяет, какие учетные данные считаются соответствующими и отображаются в качестве предложений во всплывающем окне автозаполнения для данного веб-сайта.",autofillMatchingDefault:"URL + поддомен + подстановочный знак в названии",autofillMatchingUrlSubdomain:"URL + поддомен",autofillMatchingUrlExact:"Только точный URL-адрес домена",siteSpecificSettings:"Настройки для конкретного сайта",autofillPopupOn:"Всплывающее окно автозаполнения: ",enabledForThisSite:"Включено для этого сайта",disabledForThisSite:"Отключено для этого сайта",temporarilyDisabledUntil:"Временно отключен до тех пор, пока",resetAllSiteSettings:"Сбросить все настройки для сайтов",appearance:"Внешний вид",theme:"Тема",useDefault:"Использовать по умолчанию",light:"Светлая",dark:"Темная",keyboardShortcuts:"Горячие клавиши",configureKeyboardShortcuts:"Настройка горячих клавиш",configure:"Настройка",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:"Версия ",autofillSettings:"Настройки автозаполнения",clipboardSettings:"Настройки буфера обмена",contextMenuSettings:"Настройки контекстного меню",passkeySettings:"Настройки ключа доступа",contextMenu:"Контекстное меню",contextMenuEnabled:"Контекстное меню включено",contextMenuDisabled:"Контекстное меню отключено",contextMenuDescription:"Щелкните правой кнопкой мыши на полях ввода, чтобы получить доступ к параметрам AliasVault",selectLanguage:"Выбрать язык",serverConfiguration:"Конфигурация сервера",serverConfigurationDescription:"Настройте URL-адрес сервера AliasVault для самостоятельно размещенных экземпляров",customApiUrl:"URL-адрес API",customClientUrl:"URL-адрес клиента\uFEFF",apiUrlHint:"URL-адрес конечной точки API (обычно URL-адрес клиента + /api)\uFEFF",clientUrlHint:"URL-адрес веб-интерфейса вашего самостоятельно размещенного экземпляра",autofillSettingsDescription:"Включить или отключить всплывающее окно автозаполнения на веб-страницах",autofillEnabledDescription:"В формах входа будут появляться подсказки для автозаполнения",autofillDisabledDescription:"Подсказки автозаполнения отключены глобально",languageSettings:"Язык",validation:{apiUrlRequired:"Требуется URL-адрес API",apiUrlInvalid:"Пожалуйста, введите корректный URL-адрес API",clientUrlRequired:"Требуется URL-адрес клиента",clientUrlInvalid:"Пожалуйста, введите корректный URL-адрес клиента"},identityGenerator:"Генератор личности",identityGeneratorSettings:{description:"Настройте язык и гендерные предпочтения по умолчанию для создания новых личностей.",languageSection:"Язык",languageDescription:"Установите язык, который будет использоваться при создании новых личностей.",genderSection:"Пол",genderDescription:"Установите гендерные предпочтения для создания новых личностей.",ageRangeSection:"Возрастной диапазон",ageRangeDescription:"Установите диапазон возраста для генерации новых личностей.",genderOptions:{random:"Случайный",male:"Мужской",female:"Женский"}},unlockMethod:{title:"Способ разблокировки хранилища",introText:"Выберите способ разблокировки хранилища. Вы можете использовать свой мастер-пароль (он доступен всегда) или установить ПИН-код для быстрого доступа. После 3 неудачных попыток ввода ПИН-кода необходимо будет ввести мастер-пароль.",password:"Мастер-пароль",pin:"ПИН-код",pinDescription:"Разблокировать хранилище ПИН-кодом",setupPin:"Установить ПИН-код",enterNewPinDescription:"Введите ПИН-код, состоящий как минимум из 6 цифр",confirmPin:"Подтвердите ПИН-код\uFEFF",confirmPinDescription:"Повторите ПИН-код для подтверждения",invalidPinFormat:"Неверный формат ПИН-кода\uFEFF",pinMismatch:"ПИН-коды не совпадают",incorrectPin:"Неверный ПИН-код. Осталось {{attemptsRemaining}} попытки.",incorrectPinSingular:"Неверный ПИН-код. Осталась 1 попытка.",enableSuccess:"Разблокировка по ПИН-коду успешно включена",pinLocked:"Разблокировка по ПИН-коду отключена. Пожалуйста, используйте ваш мастер-пароль для разблокировки хранилища.",pinSecurityWarning:"Разблокировка с помощью ПИН-кода в расширении для браузера может быть менее безопасной, чем использование вашего мастер-пароля, поскольку ПИН-коды обычно имеют более низкую энтропию и могут быть подобраны методом перебора (брутфорс), если ваше устройство будет скомпрометировано. Используйте этот способ только на устройствах, которым вы полностью доверяете."}},ek={passkey:"Ключ доступа",site:"Сайт",helpText:"Ключи доступа создаются на веб-сайте по запросу. Их нельзя редактировать вручную. Чтобы удалить этот ключ доступа, вы можете удалить его из этой учетной записи. Чтобы заменить этот ключ доступа или создать новый, посетите веб-сайт и следуйте его инструкциям.",passkeyMarkedForDeletion:"Ключ доступа помечен на удаление\uFEFF",passkeyWillBeDeleted:"Этот ключ доступа будет удален при сохранении этой учетной записи.",useBrowserPasskey:"Использовать ключ доступа из браузера\uFEFF",bypass:{description:"На какой срок вы хотите предоставить сайту {{origin}} доступ к ключам, сохраненным в браузере?",thisTimeOnly:"Только в этот раз",alwaysForSite:"Всегда для этого сайта"},authenticate:{title:"Вход с помощью ключа доступа",signInFor:"Вход с ключом доступа для",selectPasskey:"Выберите ключ доступа для входа:",noPasskeysFound:"Ключи доступа для этого сайта не найдены"},create:{title:"Создание ключа доступа",createFor:"Создайте новый ключ доступа для",titleLabel:"Название",titlePlaceholder:"Укажите название для этого ключа доступа",createButton:"Создать ключ доступа",selectPasskeyToReplace:"Выберите ключ доступа для замены:",createNewPasskey:"Создать новый ключ доступа",replacingPasskey:"Замена ключа доступа: {{displayName}}",confirmReplace:"Подтвердить замену",selectExistingLogin:"Привязать к логину:",selectExistingLoginDescription:"Привяжите этот ключ доступа к существующей учетной записи для этого сайта.",attachingToCredential:"Добавление ключа доступа для: {{serviceName}}",attachPasskey:"Добавить ключ доступа"},settings:{passkeyProvider:"Провайдер ключей доступа",passkeyProviderOn:"Провайдер ключей доступа включен "}},tk={title:"Недавно удаленные",noItems:"Нет удаленных элементов",noItemsDescription:"Удаленные элементы будут храниться здесь 30 дней, после чего они будут удалены безвозвратно.",description:"Эти элементы будут безвозвратно удалены через 30 дней. Вы можете восстановить их или удалить немедленно.",restore:"Восстановить",deletePermanently:"Удалить безвозвратно",emptyAll:"Очистить все",daysRemaining_one:"Остался {{count}} день",daysRemaining_other:"Осталось {{count}} дней",expiringSoon:"Скоро будут удалены",confirmDeleteTitle:"Удалить безвозвратно?",confirmDeleteMessage:"Этот элемент будет удален навсегда без возможности восстановления.",confirmEmptyAllTitle:"Очистить «Недавно удалённые»?",confirmEmptyAllMessage:"Все элементы {{count}} будут удалены навсегда без возможности восстановления."},ak={title:"Обновить хранилище",subtitle:"AliasVault обновился, и ваше хранилище необходимо обновить. Это займет всего несколько секунд.",versionInformation:"Информация о версии",yourVault:"Версия вашего хранилища:",newVersion:"Доступна новая версия:",upgrade:"Обновить хранилище",upgrading:"Обновление...",whatsNew:"Что нового",whatsNewDescription:"Для поддержки следующих изменений требуется обновление:",noDescriptionAvailable:"Описание для этой версии недоступно.",alerts:{unableToGetVersionInfo:"Не удалось получить информацию о версии. Пожалуйста, попробуйте снова.",selfHostedServer:"Автономный сервер",selfHostedWarning:"Если вы используете автономный сервер, обязательно обновите свой автономный экземпляр, так как в противном случае вход в веб-клиент перестанет работать.",continueUpgrade:"Продолжить обновление",upgradeFailed:"Ошибка обновления",failedToApplyMigration:"Не удалось применить перенос ({{current}} из {{total}})"}},nk={unsyncedChangesTitle:"Несинхронизированные изменения",unsyncedChangesWarning:"У вас есть несинхронизированные изменения, которые будут потеряны, если вы выйдете из аккаунта сейчас. Вы уверены, что хотите продолжить?",logoutAnyway:"Все равно выйти"},rk={offline:"Офлайн",tapToRetry:"Повторить синхронизацию"},ik={auth:Q1,menu:V1,common:G1,content:K1,items:q1,itemTypes:W1,fieldLabels:Y1,totp:J1,attachmentUploader:X1,emails:$1,settings:Z1,passkeys:ek,recentlyDeleted:tk,upgrade:ak,logout:nk,sync:rk},sk={loginTitle:"Logga in på AliasVault",username:"Användarnamn eller e-post",usernamePlaceholder:"namn / namn@företag.com",passwordPlaceholder:"Ange ditt lösenord",rememberMe:"Förbli inloggad",loginButton:"Logga in",noAccount:"Inget konto än?",createVault:"Skapa ett nytt valv",twoFactorTitle:"Vänligen ange autentiseringskoden från din autentiseringsapp.",authCode:"Autentiseringskod",authCodePlaceholder:"Ange 6-siffrig kod",verify:"Bekräfta",twoFactorNote:"Obs! Om du inte har tillgång till din autentiseringsenhet kan du återställa din 2FA med en återställningskod genom att logga in via webbplatsen.",masterPassword:"Huvudlösenord",unlockVault:"Lås upp",unlockWithPin:"Lås upp med PIN-kod",enterPinToUnlock:"Ange din PIN-kod för att låsa upp valvet",useMasterPassword:"Använd huvudlösenord",unlockTitle:"Lås upp ditt valv",logoutConfirm:"Är du säker på att du vill logga ut?",unlockSuccessTitle:"Ditt valv har låsts upp",unlockSuccessDescription:"Du kan nu använda autofyll av inloggningsformulär i din webbläsare.",closePopup:"Stäng detta popup-fönster",browseVault:"Bläddra bland valvets innehåll",connectingTo:"Ansluter till",switchAccounts:"Växla konton?",loginWithMobile:"Logga in med hjälp av mobilapp",unlockWithMobile:"Lås upp med hjälp av mobilapp",scanQrCode:"Skanna denna QR-kod med din AliasVault-mobilapp för att logga in och låsa upp ditt valv."},ok={vault:"Valv",emails:"E-postadresser"},lk={loading:"Laddar...",notice:"Meddelande",error:"Fel",cancel:"Avbryt",confirm:"Bekräfta",back:"Tillbaka",next:"Nästa",use:"Använd",add:"Lägg till",delete:"Radera",undo:"Ångra",save:"Spara",saving:"Sparar...",create:"Skapa",or:"Eller",close:"Stäng",logout:"Logga ut",copied:"Kopierad!",openInNewWindow:"Öppna i nytt fönster",enabled:"Aktiverad",disabled:"Inaktiverad",showPassword:"Visa lösenord",hidePassword:"Dölj lösenord",showDetails:"Visa detaljer",hideDetails:"Dölj detaljer",copyToClipboard:"Kopiera till urklipp",loadingEmails:"Laddar e-post...",loadingTotpCodes:"Laddar TOTP-koder...",attachments:"Bifogade filer",loadingAttachments:"Laddar bifogade filer...",settings:"Inställningar",recentEmails:"Senaste e-postmeddelanden",credentials:"Inloggningsuppgifter",customFields:"Anpassade fält",twoFactorAuthentication:"Tvåfaktorsautentisering",alias:"Alias",notes:"Anteckningar",email:"E-post",username:"Användarnamn",password:"Lösenord",generate:"Generera",serviceName:"Tjänstens namn",loggedIn:"Inloggad",syncingVault:"Synkroniserar valv",checkingVaultUpdates:"Söker efter valvuppdateringar",syncingUpdatedVault:"Synkroniserar uppdaterat valv",loadMore:"Läs in fler",offline:"Offline",offlineMode:"Arbetar i offline-läge",pendingSync:"Synkroniserar...",mergingVaultChanges:"Sammanfogar valvförändringar...",uploadingVault:"Laddar upp valvet...",errors:{serverNotAvailable:"AliasVault-servern är inte tillgänglig. Försök igen senare eller kontakta support om problemet kvarstår.",clientVersionNotSupported:"Denna version av webbläsartillägget AliasVault stöds inte längre av servern. Vänligen uppdatera ditt webbläsartillägg till den senaste versionen.",browserExtensionOutdated:"Detta webbläsartillägg är föråldrat och kan inte användas för att komma åt detta valv. Uppdatera detta webbläsartillägg för att fortsätta.",serverVersionNotSupported:"AliasVault-servern behöver uppdateras till en nyare version för att kunna använda detta webbläsartillägg. Kontakta support om du behöver hjälp.",serverVersionTooOld:"AliasVault-servern behöver uppdateras till en nyare version för att kunna använda denna funktion. Vänligen kontakta serveradministratören om du behöver hjälp.",unknownError:"Ett okänt fel har inträffat",unknownErrorTryAgain:"Ett okänt fel inträffade. Försök igen.",vaultNotAvailable:"Valvet är inte tillgängligt",vaultIsLocked:"Valvet är låst",passwordChanged:"Ditt lösenord har ändrats sedan du senast loggade in. Vänligen logga in igen av säkerhetsskäl.",syncConflictMaxRetries:"Kunde inte synkronisera valvet trots flera försök. Försök igen senare.",mergeFailed:"Det gick inte att sammanfoga valvförändringar. Försök igen.",invalidCode:"Ange en giltig 6-siffrig autentiseringskod.",serverError:"Kunde inte nå AliasVault-servern. Försök igen senare eller kontakta support om problemet kvarstår.",wrongPassword:"Felaktigt lösenord. Försök igen.",sessionExpired:"Din session har löpt ut. Logga in igen.",mobileLoginRequestExpired:"Mobil inloggningsbegäran har löpt ut. Ladda om sidan och försök igen."},apiErrors:{UNKNOWN_ERROR:"Ett okänt fel inträffade. Försök igen.",ACCOUNT_LOCKED:"Kontot är tillfälligt låst på grund av för många misslyckade försök. Försök igen senare.",ACCOUNT_BLOCKED:"Ditt konto har inaktiverats. Om du tror att detta är ett misstag, kontakta support.",USER_NOT_FOUND:"Felaktigt användarnamn eller lösenord. Försök igen.",INVALID_AUTHENTICATOR_CODE:"Ogiltig autentiseringskod. Försök igen.",INVALID_RECOVERY_CODE:"Ogiltig återställningskod. Försök igen.",REFRESH_TOKEN_REQUIRED:"Uppdateringstoken krävs.",INVALID_REFRESH_TOKEN:"Ogiltigt uppdateringstoken",PUBLIC_REGISTRATION_DISABLED:"Registrering av nytt konto är för närvarande inaktiverat på denna server. Kontakta administratören.",USERNAME_REQUIRED:"Ett användarnamn krävs.",USERNAME_ALREADY_IN_USE:"Användarnamnet används redan",USERNAME_AVAILABLE:"Användarnamnet är tillgängligt",USERNAME_MISMATCH:"Användarnamnet stämmer inte överens med den nuvarande användaren.",PASSWORD_MISMATCH:"Det angivna lösenordet stämmer inte överens med ditt nuvarande lösenord",ACCOUNT_SUCCESSFULLY_DELETED:"Kontot har raderats.",USERNAME_EMPTY_OR_WHITESPACE:"Användarnamnet kan inte vara tomt eller blanksteg.",USERNAME_TOO_SHORT:"Användarnamnet är för kort: måste vara minst 3 tecken långt.",USERNAME_TOO_LONG:"Användarnamnet är för långt: får inte vara längre än 40 tecken.",USERNAME_INVALID_EMAIL:"Ogiltig e-postadress.",USERNAME_INVALID_CHARACTERS:"Användarnamnet är ogiltigt, kan endast innehålla bokstäver eller siffror.",VAULT_NOT_UP_TO_DATE:"Ditt valv är inte uppdaterat. Synkronisera ditt valv och försök igen.",INTERNAL_SERVER_ERROR:"Internt serverfel.",VAULT_ERROR:"Det lokala valvet är inte uppdaterat. Synkronisera valvet genom att uppdatera sidan och försök igen."}},ck={or:"eller",new:"Nytt",vaultLocked:"AliasVault är låst.",creatingNewAlias:"Skapar nytt alias...",noMatchesFound:"Inga träffar hittades",searchVault:"Sök i valvet...",enterServiceName:"Ange tjänstens namn",enterEmailAddress:"Ange e-postadress",enterUsername:"Ange användarnamn",hideFor1Hour:"Dölj i 1 timme (nuvarande webbplats)",hidePermanently:"Dölj permanent (nuvarande webbplats)",createRandomAlias:"Skapa slumpmässigt alias",createUsernamePassword:"Skapa användarnamn/lösenord",randomAlias:"Slumpmässigt alias",usernamePassword:"Användarnamn/Lösenord",createAndSaveAlias:"Skapa och spara alias",createAndSaveCredential:"Skapa och spara autentiseringsuppgifter",randomIdentityDescription:"Generera en slumpmässig identitet med en slumpmässig e-postadress tillgänglig i AliasVault.",randomIdentityDescriptionDropdown:"Slumpmässig identitet med slumpmässig e-post",manualCredentialDescription:"Ange din egen e-postadress och användarnamn.",manualCredentialDescriptionDropdown:"Manuellt användarnamn och lösenord",failedToCreateIdentity:"Det gick inte att skapa identitet. Försök igen.",enterEmailAndOrUsername:"Ange e-postadress och/eller användarnamn",autofillWithAliasVault:"Autofyll med AliasVault",generateRandomPassword:"Generera slumpmässigt lösenord (kopiera till urklipp)",generateNewPassword:"Generera nytt lösenord",togglePasswordVisibility:"Visa/dölj lösenordet",passwordCopiedToClipboard:"Lösenord har kopierats till urklipp",openAliasVaultToUpgrade:"Öppna AliasVault för att uppgradera",vaultUpgradeRequired:"Uppgradering av valv krävs.",dismissPopup:"Avvisa popup"},uk={title:"Objekt",itemName:"Namn",loginCredentials:"Inloggningsuppgifter",cardInformation:"Kortinformation",addItem:"Lägg till objekt",addNewItem:"Lägg till nytt objekt",saveItem:"Spara objekt",itemDetails:"Objektdetaljer",editItem:"Redigera objekt",untitled:"Ingen titel",newFolder:"Ny mapp",createFolder:"Skapa mapp",editFolder:"Redigera mapp",folderName:"Mappens namn",folderNameRequired:"Mappnamn krävs",folder:"Mapp",welcomeTitle:"Välkommen till AliasVault!",welcomeDescription:"För att använda webbläsartillägget AliasVault: navigera till en webbplats och använd AliasVault-popup-fönstret för att skapa en ny inloggningsuppgift.",noPasskeysFound:"Inga passkeys har skapats än. Passkeys skapas genom att besöka en webbplats som erbjuder passkeys som en autentiseringsmetod.",noAttachmentsFound:"Inga objekt med bifogade filer hittades",noItemsOfTypeFound:"Inga {{type}} objekt hittades",noMatchingItems:"Inga matchande objekt hittades",noMatchingItemsSearch:'Inga objekt matchar "{{search}}"',noMatchingItemsWithFilter:'Inga {{filter}} objekt som matchar "{{search}}"',clearSearch:"Rensa sökning",clearFilter:"Rensa filter",emptyFolderHint:"Mappen är tom. För att flytta objekt till den här mappen, redigera objektet och tryck på mappikonen i namnfältet.",allItemsInFolders:"Alla dina objekt är organiserade i mappar. Klicka på en mapp ovan för att visa dina uppgifter, eller använd sökningen för att hitta specifika objekt.",deleteFolder:"Radera mapp",deleteFolderKeepItems:"Ta endast bort mappen",deleteFolderKeepItemsDescription:"Objekt kommer att flyttas tillbaka till huvudlistan.",deleteFolderAndItems:"Radera mapp och alla objekt",deleteFolderAndItemsDescription:"{{count}} objekt kommer att flyttas till Nyligen borttagen.",filters:{folders:"Mappar",passkeys:"Passkeys"},sort:{title:"Sortera efter",oldestFirst:"Äldst först",newestFirst:"Nyast först",alphabetical:"Alfabetiskt (A-Z)"},deleteItemTitle:"Radera objekt",deleteItemConfirm:"Är du säker på att du vill radera det här objektet?",viewHistory:"Visa historik",history:"Historik",noHistoryAvailable:"Ingen historik är tillgänglig",tags:"Taggar",changePasswordComplexity:"Ändra lösenordets komplexitet",passwordLength:"Lösenordslängd",includeLowercase:"Inkludera små bokstäver",includeUppercase:"Inkludera stora bokstäver",includeNumbers:"Inkludera siffror",includeSpecialChars:"Inkludera specialtecken",avoidAmbiguousChars:"Undvik tvetydiga tecken (o, 0, etc.)",privateEmailTitle:"Privat e-post",privateEmailAliasVaultServer:"AliasVault server",privateEmailDescription:"E2E krypterad, helt privat.",publicEmailTitle:"Offentliga Temp e-postleverantörer",publicEmailDescription:"Anonym men begränsad integritet. E-postinnehåll kan läsas av alla som känner till adressen.",validation:{required:"Detta fält är obligatoriskt"}},dk={selectType:"Lägg till nytt objekt",typeLabel:"Objekttyp",creating:"Skapar",editing:"Redigerar",regenerateAlias:"Återskapa alias",addCustomField:"Lägg till anpassad fält",fieldLabel:"Fältetikett",enterFieldName:"Ange fältets namn",fieldType:"Fälttyp",fieldTypes:{text:"Text",hidden:"Dold (maskerad text)",email:"E-post",url:"Webbadress",phone:"Telefon",number:"Nummer",date:"Datum",textArea:"Textfält"},login:{title:"Inloggning"},alias:{title:"Alias"},creditCard:{title:"Betalkort"},note:{title:"Säker anteckning"}},mk={"login.url":"Webbplatsadress","login.username":"Användarnamn","login.password":"Lösenord","alias.first_name":"Förnamn","alias.last_name":"Efternamn","alias.gender":"Kön","alias.birthdate":"Födelsedatum","login.email":"E-postadress","notes.content":"Anteckningar","card.cardholder_name":"Kortinnehavarens namn","card.number":"Kortnummer","card.expiry_month":"Utgångsmånad","card.expiry_year":"Utgångsår","card.cvv":"Säkerhetskod","card.pin":"PIN-kod"},gk={addCode:"Lägg till 2FA kod",instructions:"Ange den hemliga nyckeln som visas av webbplatsen där du vill lägga till tvåfaktorsautentisering.",nameOptional:"Namn (valfritt)",secretKey:"Hemlig nyckel",saveToViewCode:"Spara för att visa kod",defaultName:"Autentiserare",errors:{invalidSecretKey:"Ogiltigt format för hemlig nyckel."}},fk={uploading:"Laddar upp...",uploadSuccess:"Filerna har laddats upp.",deleteSuccess:"Bifogade filen har raderats.",firefoxExpandRequired:"För att ladda upp filer, använd det utökade fönstret.",openExpandedWindow:"Öppna utökat fönster"},hk={title:"E-post",deleteEmailTitle:"Radera e-post",deleteEmailConfirm:"Är du säker på att du vill radera detta meddelande permanent?",from:"Från",to:"Till",date:"Datum",emailContent:"E-postinnehåll",emailNotFound:"E-post hittades inte",noEmails:"Inga e-postmeddelanden hittades",noEmailsDescription:"Du har inte mottagit några e-postmeddelanden på dina privata e-postadresser än. När du fått ett nytt e-postmeddelande så visas det här.",offlineMessage:"Du är offline. Anslut till internet för att ladda dina e-postmeddelanden.",dateFormat:{justNow:"precis nu",minutesAgo_single:"{{count}} minut sedan",minutesAgo_plural:"{{count}} minuter sedan",hoursAgo_single:"{{count}} timme sedan",hoursAgo_plural:"{{count}} timmar sedan",yesterday:"igår"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Den aktuella valda e-postadressen används redan. Vänligen ändra e-postadressen genom att redigera denna post.",CLAIM_DOES_NOT_EXIST:"Ett fel inträffade när e-posten skulle laddas. Försök att redigera och spara posten för att synkronisera databasen, och försök sedan igen."}},Ak={serverUrl:"Serverns webbadress",language:"Språk",autofillEnabled:"Aktivera Autofyll",version:"Version",openWebApp:"Öppna webbapp",lock:"Lås",globalSettings:"Globala inställningar",autofillPopup:"Autofyll popup",activeOnAllSites:"Aktiv på alla webbplatser (om inte inaktiverat nedan)",disabledOnAllSites:"Inaktiverad på alla webbplatser",rightClickContextMenu:"Högerklicksmeny",autofillMatching:"Autofyllsmatchning",autofillMatchingMode:"Autofyll matchningsläge",autofillMatchingModeDescription:"Avgör vilka uppgifter som anses vara en matchning och visas som förslag i autofill popup för en viss webbplats.",autofillMatchingDefault:"URL + subdomän + namn wildcard",autofillMatchingUrlSubdomain:"URL + subdomän",autofillMatchingUrlExact:"Endast exakt URL domän",siteSpecificSettings:"Site-specifika Inställningar",autofillPopupOn:"Autofyll popup-fönster på: ",enabledForThisSite:"Aktiverad för denna webbplats",disabledForThisSite:"Inaktiverad för denna webbplats",temporarilyDisabledUntil:"Tillfälligt inaktiverad tills",resetAllSiteSettings:"Återställ alla webbplatsspecifika inställningar",appearance:"Utseende",theme:"Tema",useDefault:"Använd standard",light:"Ljust",dark:"Mörkt",keyboardShortcuts:"Kortkommandon",configureKeyboardShortcuts:"Konfigurera kortkommandon",configure:"Konfigurera",clipboardClearTimeout:"Rensa urklipp efter kopiering",clipboardClearTimeoutDescription:"Rensa urklipp automatiskt efter kopiering av känsliga data",clipboardClearDisabled:"Rensa aldrig",clipboardClear5Seconds:"Rensa efter 5 sekunder",clipboardClear10Seconds:"Rensa efter 10 sekunder",clipboardClear15Seconds:"Rensa efter 15 sekunder",autoLockTimeout:"Timeout för automatisk låsning",autoLockTimeoutDescription:"Lås valvet automatiskt efter en period av inaktivitet",autoLockTimeoutHelp:"Valvet kommer endast att låsas efter den angivna perioden av inaktivitet (ingen användning av autofyll eller öppnande av tilläggspopup). Valvet kommer alltid att låsa när webbläsaren stängs, oavsett inställning.",autoLockNever:"Aldrig",autoLock15Seconds:"15 sekunder",autoLock1Minute:"1 minut",autoLock5Minutes:"5 minuter",autoLock15Minutes:"15 minuter",autoLock30Minutes:"30 minuter",autoLock1Hour:"1 timme",autoLock4Hours:"4 timmar",autoLock8Hours:"8 timmar",autoLock24Hours:"24 timmar",versionPrefix:"Version ",autofillSettings:"Inställningar för Autofyll",clipboardSettings:"Urklippsinställningar",contextMenuSettings:"Inställningar för snabbmenyn",passkeySettings:"Passkey inställningar",contextMenu:"Snabbmeny",contextMenuEnabled:"Snabbmenyn är aktiverad",contextMenuDisabled:"Snabbmenyn är inaktiverad",contextMenuDescription:"Högerklicka på inmatningsfält för att komma åt AliasVault alternativ",selectLanguage:"Välj Språk",serverConfiguration:"Serverkonfiguration",serverConfigurationDescription:"Konfigurera AliasVault-serverns URL för egenhostade instanser",customApiUrl:"API URL",customClientUrl:"Klientens URL",apiUrlHint:"API slutpunkts-URL (vanligtvis klientens URL + /api)",clientUrlHint:"Webbgränssnittets URL för din egenhostade instans",autofillSettingsDescription:"Aktivera eller inaktivera popup för autofyll på webbsidor",autofillEnabledDescription:"Autofyll förslag visas på inloggningsformulär",autofillDisabledDescription:"Autofyll förslag är inaktiverade globalt",languageSettings:"Språk",validation:{apiUrlRequired:"API-URL krävs",apiUrlInvalid:"Ange en giltig API-URL",clientUrlRequired:"Klientens URL krävs",clientUrlInvalid:"Ange en giltig klient-URL"},identityGenerator:"Identitets Generator",identityGeneratorSettings:{description:"Konfigurera standardspråk och könspreferens för att generera nya identiteter.",languageSection:"Språk",languageDescription:"Ange det språk som ska användas för att generera nya identiteter.",genderSection:"Kön",genderDescription:"Ställ in könspreferensen för att generera nya identiteter.",ageRangeSection:"Åldersintervall",ageRangeDescription:"Ange åldersintervallet för att generera nya identiteter.",genderOptions:{random:"Slumpad",male:"Man",female:"Kvinna"}},unlockMethod:{title:"Valvupplåsningsmetod",introText:"Välj hur du vill låsa upp ditt valv. Du kan använda ditt huvudlösenord (alltid tillgängligt) eller ange en PIN-kod för snabbare åtkomst. Efter 3 misslyckade PIN-försök måste du använda ditt huvudlösenord.",password:"Huvudlösenord",pin:"PIN-Kod",pinDescription:"Lås upp valv med PIN-kod",setupPin:"Ställ in PIN-kod",enterNewPinDescription:"Ange en PIN-kod som består av minst 6 siffror",confirmPin:"Bekräfta PIN-kod",confirmPinDescription:"Ange din PIN-kod igen för att bekräfta",invalidPinFormat:"Ogiltigt PIN-format",pinMismatch:"PIN-koder matchar inte",incorrectPin:"Felaktig PIN-kod. {{attemptsRemaining}} försök återstår.",incorrectPinSingular:"Felaktig PIN-kod. 1 försök återstår.",enableSuccess:"PIN-upplåsning har aktiverats!",pinLocked:"PIN-upplåsning har inaktiverats. Använd ditt huvudlösenord för att låsa upp ditt valv.",pinSecurityWarning:'PIN-upplåsning i webbläsartillägget kan vara mindre säkert än ditt huvudlösenord, eftersom PIN-koder vanligtvis har lägre entropi och kan bli "brute-forcead" om din enhet äventyras. Använd den endast på enheter som du litar på.'}},pk={passkey:"Passkey",site:"Webbplats",helpText:"Passkeys skapas på webbplatsen när du blir tillfrågad. De kan inte redigeras manuellt. För att radera denna passkey, kan du ta bort det från denna posten. För att byta ut denna passkey eller skapa en ny, besök webbplatsen och följ dess anvisningar.",passkeyMarkedForDeletion:"Passkey markerad för borttagning",passkeyWillBeDeleted:"Denna passkey kommer att tas bort när du sparar dessa uppgifter.",useBrowserPasskey:"Använd Webbläsar Passkey",bypass:{description:"Hur länge vill du använda webbläsarens passkey leverantör till {{origin}}?",thisTimeOnly:"Endast denna gång",alwaysForSite:"Alltid för denna webbplats"},authenticate:{title:"Logga in med Passkey",signInFor:"Logga in med Passkey till",selectPasskey:"Välj en passkey för att logga in:",noPasskeysFound:"Inga passkeys hittades för denna webbplats"},create:{title:"Skapa Passkey",createFor:"Skapa ett nytt passkey till",titleLabel:"Titel",titlePlaceholder:"Ange ett namn för denna Passkey",createButton:"Skapa Passkey",selectPasskeyToReplace:"Välj en passkey att ersätta:",createNewPasskey:"Skapa ny Passkey",replacingPasskey:"Ersätter passkey: {{displayName}}",confirmReplace:"Bekräfta ersättande",selectExistingLogin:"Lägg till i befintlig inloggning:",selectExistingLoginDescription:"Bifoga denna passkey till en befintlig inloggningsuppgift för den här webbplatsen.",attachingToCredential:"Lägger till passkey till: {{serviceName}}",attachPasskey:"Lägg till Passkey"},settings:{passkeyProvider:"Passkey-leverantör",passkeyProviderOn:"Passkey-Leverantör på "}},yk={title:"Senast raderade",noItems:"Inga raderade objekt",noItemsDescription:"Objekt som du tar bort visas här i 30 dagar innan de tas bort permanent.",description:"Dessa objekt kommer att raderas permanent efter 30 dagar. Du kan återställa dem eller ta bort dem omedelbart.",restore:"Återställ",deletePermanently:"Radera permanent",emptyAll:"Töm alla",daysRemaining_one:"{{count}} dag återstår",daysRemaining_other:"{{count}} dagar återstår",expiringSoon:"Löper snart ut",confirmDeleteTitle:"Radera permanent?",confirmDeleteMessage:"Detta objekt kommer att raderas permanent och kan inte återställas.",confirmEmptyAllTitle:"Töm nyligen borttagna?",confirmEmptyAllMessage:"Alla {{count}} objekt kommer att raderas permanent och kommer inte kunna återställas."},Ek={title:"Uppgradera valv",subtitle:"AliasVault har uppdaterats och ditt valv måste uppgraderas. Detta bör bara ta några sekunder.",versionInformation:"Versionsinformation",yourVault:"Din valvversion:",newVersion:"Ny tillgänglig version:",upgrade:"Uppgradera valv",upgrading:"Uppgraderar ...",whatsNew:"Vad är nytt",whatsNewDescription:"En uppgradering krävs för att stödja följande ändringar:",noDescriptionAvailable:"Ingen beskrivning tillgänglig för denna version.",alerts:{unableToGetVersionInfo:"Det gick inte att hämta versionsinformation. Försök igen.",selfHostedServer:"Egenhostad server",selfHostedWarning:"Om du använder en egenhostad server, se till att även uppdatera din egenhostade instans eftersom inloggning på webbklienten annars kommer att sluta fungera.",continueUpgrade:"Fortsätt uppgraderingen",upgradeFailed:"Uppgraderingen misslyckades",failedToApplyMigration:"Misslyckades att tillämpa migrering ({{current}} av {{total}})"}},bk={unsyncedChangesTitle:"Osynkade ändringar",unsyncedChangesWarning:"Du har osynkade ändringar som kommer att gå förlorade om du loggar ut nu. Är du säker på att du vill fortsätta?",logoutAnyway:"Logga ut ändå"},Ik={offline:"Offline",tapToRetry:"Tryck för att försöka synka igen"},vk={auth:sk,menu:ok,common:lk,content:ck,items:uk,itemTypes:dk,fieldLabels:mk,totp:gk,attachmentUploader:fk,emails:hk,settings:Ak,passkeys:pk,recentlyDeleted:yk,upgrade:Ek,logout:bk,sync:Ik},Nk={loginTitle:"Увійти до AliasVault",username:"Ім'я користувача або електронна пошта",usernamePlaceholder:"ім'я / name@company.com",passwordPlaceholder:"Введіть ваш пароль",rememberMe:"Запам'ятати мене",loginButton:"Увійти",noAccount:"Ще не маєте облікового запису?",createVault:"Створити нове сховище",twoFactorTitle:"Будь ласка, введіть код автентифікації з вашого застосунку для автентифікації.",authCode:"Код автентифікації",authCodePlaceholder:"Введіть 6-значний код",verify:"Перевірка",twoFactorNote:"Примітка: якщо у вас немає доступу до вашого пристрою автентифікатора, ви можете скинути налаштування 2FA за допомогою коду відновлення, увійшовши через вебсайт.",masterPassword:"Головний пароль",unlockVault:"Розблокувати",unlockWithPin:"Розблокувати за допомогою ПІН-коду",enterPinToUnlock:"Введіть свій ПІН-код, щоб розблокувати сховище",useMasterPassword:"Використовуйте головний пароль",unlockTitle:"Розблокувати своє сховище",logoutConfirm:"Ви впевнені, що хочете вийти?",unlockSuccessTitle:"Ваше сховище успішно розблоковано",unlockSuccessDescription:"Тепер ви можете використовувати автозаповнення форм входу у вашому браузері.",closePopup:"Закрити цю підказку",browseVault:"Переглянути вміст сховища",connectingTo:"Підключення до",switchAccounts:"Змінити обліковий запис?",loginWithMobile:"Увійти за допомогою мобільного додатку",unlockWithMobile:"Розблокувати за допомогою мобільного додатку",scanQrCode:"Проскануйте цей QR-код за допомогою мобільного додатка AliasVault, щоб увійти та розблокувати сховище."},Ck={vault:"Vault",emails:"Електронні адреси"},wk={loading:"Завантаження даних...",notice:"Примітка",error:"Помилка",cancel:"Скасувати",confirm:"Підтвердити",back:"Назад",next:"Далі",use:"Використовувати",add:"Add",delete:"Видалити",undo:"Скасувати",save:"Зберегти",saving:"Saving...",create:"Створити",or:"Або",close:"Закрити",logout:"Вихід",copied:"Скопійовано!",openInNewWindow:"Відкрити у новому вікні",enabled:"Увімкнено",disabled:"Вимкнено",showPassword:"Показати пароль",hidePassword:"Приховати пароль",showDetails:"Показати подробиці",hideDetails:"Приховати подробиці",copyToClipboard:"Копіювати до буфера обміну",loadingEmails:"Завантаження електронних адрес...",loadingTotpCodes:"Завантаження кодів TOTP...",attachments:"Вкладення",loadingAttachments:"Завантаження вкладень...",settings:"Налаштування",recentEmails:"Останні електронні листи",credentials:"Облікові дані",customFields:"Custom Fields",twoFactorAuthentication:"Двофакторна автентифікація",alias:"Псевдонім",notes:"Нотатки",email:"Електронна пошта",username:"Ім'я користувача",password:"Пароль",generate:"Generate",serviceName:"Назва сервісу",loggedIn:"Вхід виконано",syncingVault:"Синхронізація сховища",checkingVaultUpdates:"Перевірка оновлень сховища",syncingUpdatedVault:"Синхронізація оновленого сховища",loadMore:"Завантажити ще",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Merging vault changes...",uploadingVault:"Uploading vault...",errors:{serverNotAvailable:"Не вдалося зв’язатися зі сервером AliasVault. Будь ласка, спробуйте пізніше або зверніться до служби підтримки, якщо проблема не зникне.",clientVersionNotSupported:"Ця версія розширення браузера AliasVault більше не підтримується сервером. Будь ласка, оновіть розширення браузера до останньої версії.",browserExtensionOutdated:"Це розширення браузера застаріло, і його не можна використовувати для доступу до цього сховища. Щоб продовжити, оновіть це розширення браузера.",serverVersionNotSupported:"Щоб використовувати це розширення браузера, потрібно оновити сервер AliasVault до новішої версії. Зверніться до служби підтримки, якщо вам потрібна допомога.",serverVersionTooOld:"Щоб скористатися цією функцією, потрібно оновити сервер AliasVault до нової версії. Якщо вам потрібна допомога, будь ласка, зверніться до адміністратора сервера.",unknownError:"Сталася невідома помилка",unknownErrorTryAgain:"Сталася невідома помилка. Будь ласка, спробуйте ще раз.",vaultNotAvailable:"Сховище недоступне",vaultIsLocked:"Сховище заблоковано",passwordChanged:"Ваш пароль змінився з моменту останнього входу. З міркувань безпеки, будь ласка, увійдіть ще раз.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again.",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.",wrongPassword:"Incorrect password. Please try again.",sessionExpired:"Your session has expired. Please log in again.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."},apiErrors:{UNKNOWN_ERROR:"Сталася невідома помилка. Будь ласка, спробуйте ще раз.",ACCOUNT_LOCKED:"Обліковий запис тимчасово заблоковано через занадто багато невдалих спроб. Будь ласка, спробуйте пізніше.",ACCOUNT_BLOCKED:"Ваш обліковий запис вимкнено. Якщо ви вважаєте, що це помилка, зверніться до служби підтримки.",USER_NOT_FOUND:"Недійсне ім'я користувача або пароль. Спробуйте ще раз.",INVALID_AUTHENTICATOR_CODE:"Недійсний код автентифікатора. Спробуйте ще раз.",INVALID_RECOVERY_CODE:"Недійсний код відновлення. Будь ласка, спробуйте ще раз.",REFRESH_TOKEN_REQUIRED:"Необхідне оновлення токена.",INVALID_REFRESH_TOKEN:"Оновлення токена невдале.",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:"Локальне сховище не оновлене. Синхронізуйте своє сховище, оновивши сторінку, та повторіть спробу."}},xk={or:"або",new:"Новий",vaultLocked:"AliasVault заблоковано.",creatingNewAlias:"Створення нового псевдоніму...",noMatchesFound:"Збігів не знайдено",searchVault:"Пошук сховища...",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:"Пароль скопійовано в буфер обміну",openAliasVaultToUpgrade:"Відкрити AliasVault для покращення",vaultUpgradeRequired:"Потрібне оновлення сховища.",dismissPopup:"Закрити спливаюче вікно"},Sk={title:"Items",itemName:"Назва",loginCredentials:"Дані для входу",cardInformation:"Card Information",addItem:"Add Item",addNewItem:"Add new item",saveItem:"Save Item",itemDetails:"Item Details",editItem:"Edit Item",untitled:"Untitled",newFolder:"New Folder",createFolder:"Створити теку",editFolder:"Edit Folder",folderName:"Folder Name",folderNameRequired:"Folder name is required",folder:"Тека",welcomeTitle:"Ласкаво просимо до AliasVult!",welcomeDescription:"Щоб скористатися розширенням браузера AliasVault: перейдіть на вебсайт і скористайтеся спливаючим вікном автозаповнення AliasVault, щоб створити нові облікові дані.",noPasskeysFound:"Ключі доступу ще не створено. Ключі доступу створюються під час відвідування вебсайту, який пропонує ключі доступу як спосіб автентифікації.",noAttachmentsFound:"No items with attachments found",noItemsOfTypeFound:"No {{type}} items found",noMatchingItems:"No matching items found",noMatchingItemsSearch:'No items matching "{{search}}"',noMatchingItemsWithFilter:'No {{filter}} items matching "{{search}}"',clearSearch:"Clear search",clearFilter:"Clear filter",emptyFolderHint:"This folder is empty. To move items to this folder, edit the item and tap the folder icon in the name field.",allItemsInFolders:"All your items are organized in folders. Click a folder above to view your credentials, or use the search to find specific items.",deleteFolder:"Delete Folder",deleteFolderKeepItems:"Delete folder only",deleteFolderKeepItemsDescription:"Items will be moved back to the main list.",deleteFolderAndItems:"Delete folder and all items",deleteFolderAndItemsDescription:"{{count}} item(s) will be moved to Recently Deleted.",filters:{folders:"Folders",passkeys:"Ключі доступу"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Delete Item",deleteItemConfirm:"Are you sure you want to delete this item?",viewHistory:"View history",history:"History",noHistoryAvailable:"No history available",tags:"Теги",changePasswordComplexity:"Зміна складності пароля",passwordLength:"Довжина пароля",includeLowercase:"Включити малі літери",includeUppercase:"Включити великі літери",includeNumbers:"Включити числа",includeSpecialChars:"Включити спеціальні символи",avoidAmbiguousChars:"Уникайте неоднозначних символів (o, 0 тощо)",privateEmailTitle:"Приватна електронна адреса",privateEmailAliasVaultServer:"Сервер AliasVault",privateEmailDescription:"Наскрізне шифрування, повністю конфіденційно.",publicEmailTitle:"Публічні тимчасові постачальники електронної пошти",publicEmailDescription:"Анонімно, але обмежена конфіденційність. Зміст електронного листа може прочитати будь-хто, хто знає адресу.",validation:{required:"Це поле обов'язкове"}},Tk={selectType:"Add New Item",typeLabel:"Item Type",creating:"Creating",editing:"Editing",regenerateAlias:"Regenerate alias",addCustomField:"Add custom field",fieldLabel:"Field Label",enterFieldName:"Enter field name",fieldType:"Field Type",fieldTypes:{text:"Text",hidden:"Hidden (masked text)",email:"Електронна пошта",url:"URL",phone:"Phone",number:"Number",date:"Date",textArea:"Text Area"},login:{title:"Увійти"},alias:{title:"Псевдонім"},creditCard:{title:"Credit Card"},note:{title:"Secure Note"}},kk={"login.url":"Website URL","login.username":"Username","login.password":"Пароль","alias.first_name":"Ім’я","alias.last_name":"Прізвище","alias.gender":"Стать","alias.birthdate":"Birthdate","login.email":"Пошта","notes.content":"Нотатки","card.cardholder_name":"Cardholder Name","card.number":"Card Number","card.expiry_month":"Expiry Month","card.expiry_year":"Expiry Year","card.cvv":"CVV","card.pin":"PIN"},Lk={addCode:"Add 2FA Code",instructions:"Enter the secret key shown by the website where you want to add two-factor authentication.",nameOptional:"Ім'я (необов'язково)",secretKey:"Секретний ключ",saveToViewCode:"Зберегти для перегляду коду",defaultName:"Authenticator",errors:{invalidSecretKey:"Invalid secret key format."}},Rk={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},Dk={title:"Електронні листи",deleteEmailTitle:"Видалити електронного листа",deleteEmailConfirm:"Ви впевнені, що хочете остаточно видалити цей електронний лист?",from:"Від",to:"До",date:"Дата",emailContent:"Вміст електронного листа",emailNotFound:"Електронний лист не знайдено",noEmails:"Електронних листів не знайдено",noEmailsDescription:"Ви ще не отримували жодних листів на свої приватні адреси електронної пошти. Коли ви отримаєте новий лист, він з’явиться тут.",offlineMessage:"Ви офлайн. Будь ласка, приєднайтесь до Інтернету, щоб завантажити свої електронні листи.",dateFormat:{justNow:"щойно",minutesAgo_single:"{{count}} хвилина тому",minutesAgo_plural:"{{count}} хвилин тому",hoursAgo_single:"{{count}} година тому",hoursAgo_plural:"{{count}} годин тому",yesterday:"учора"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Поточна вибрана електронна адреса вже використовується. Змініть електронну адресу, відредагувавши ці облікові дані.",CLAIM_DOES_NOT_EXIST:"Під час спроби завантажити електронні листи сталася помилка. Спробуйте відредагувати та зберегти запис облікових даних, щоб синхронізувати базу даних, а потім повторіть спробу."}},Bk={serverUrl:"URL-адреса сервера",language:"Мова",autofillEnabled:"Увімкнути автозаповнення",version:"Версія",openWebApp:"Відкрити веб додаток",lock:"Заблокувати",globalSettings:"Глобальні налаштування",autofillPopup:"Спливаюче вікно автозаповнення",activeOnAllSites:"Активно на всіх сайтах (якщо не вимкнено нижче)",disabledOnAllSites:"Вимкнено на всіх сайтах",rightClickContextMenu:"Контекстне меню правою кнопкою миші",autofillMatching:"Автозаповнення відповідності",autofillMatchingMode:"Режим автозаповнення відповідностей",autofillMatchingModeDescription:"Визначає, які облікові дані вважаються відповідними та будуть показуватися як пропозиції у спливному вікні автозаповнення для певного вебсайту.",autofillMatchingDefault:"URL-адреса + піддомен + універсальне ім'я",autofillMatchingUrlSubdomain:"URL-адреса + піддомен",autofillMatchingUrlExact:"Лише точний домен URL-адреси",siteSpecificSettings:"Налаштування, специфічні для сайту",autofillPopupOn:"Спливаюче вікно автозаповнення на: ",enabledForThisSite:"Увімкнено для цього сайту",disabledForThisSite:"Вимкнено для цього сайту",temporarilyDisabledUntil:"Тимчасово вимкнено до ",resetAllSiteSettings:"Скинути всі налаштування, характерні для сайту",appearance:"Зовнішній вигляд",theme:"Тема",useDefault:"Використовувати за замовчуванням",light:"Світла",dark:"Темна",keyboardShortcuts:"Комбінації клавіш",configureKeyboardShortcuts:"Налаштування комбінацій клавіш",configure:"Налаштування",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:"Версія ",autofillSettings:"Налаштування автозаповнення",clipboardSettings:"Параметри буфера обміну",contextMenuSettings:"Налаштування контекстного меню",passkeySettings:"Налаштування ключа доступу",contextMenu:"Контекстне меню",contextMenuEnabled:"Контекстне меню увімкнено",contextMenuDisabled:"Контекстне меню вимкнено",contextMenuDescription:"Натисніть правою кнопкою миші на поля введення, щоб отримати доступ до параметрів AliasVault",selectLanguage:"Виберіть мову",serverConfiguration:"Конфігурація сервера",serverConfigurationDescription:"Налаштування URL-адреси сервера AliasVault для самостійно розміщених екземплярів",customApiUrl:"URL-адреса API",customClientUrl:"URL-адреса клієнта",apiUrlHint:"URL-адреса кінцевої точки API (зазвичай URL-адреса клієнта + /api)",clientUrlHint:"URL-адреса вебінтерфейсу вашого самостійного екземпляра",autofillSettingsDescription:"Увімкнення або вимкнення спливаючого вікна автозаповнення на вебсторінках",autofillEnabledDescription:"",autofillDisabledDescription:"Autofill suggestions are disabled globally",languageSettings:"Мова",validation:{apiUrlRequired:"URL-адреса API обов'язкова",apiUrlInvalid:"Будь ласка, введіть дійсну URL-адресу API",clientUrlRequired:"URL-адреса клієнта обов'язкова",clientUrlInvalid:"Будь ласка, введіть дійсну URL-адресу клієнта"},identityGenerator:"Генератор ідентифікаційних даних",identityGeneratorSettings:{description:"Налаштуйте мову та стать за замовчуванням для створення нових ідентифікаційних даних.",languageSection:"Мова",languageDescription:"Встановіть мову, яка використовуватиметься під час створення нових ідентифікаторів.",genderSection:"Стать",genderDescription:"Встановити параметри гендеру для генерації нових ідентифікацій.",ageRangeSection:"Віковий діапазон",ageRangeDescription:"Встановіть віковий діапазон для створення нових ідентифікаційних даних.",genderOptions:{random:"Випадкова",male:"Чоловіча",female:"Жіноча"}},unlockMethod:{title:"Метод розблокування сховища",introText:"Choose how you want to unlock your vault. You can use your master password (always available) or set up a PIN code for faster access. After 3 failed PIN attempts, you'll need to use your master password.",password:"Головний пароль",pin:"ПІН-код",pinDescription:"Unlock vault with PIN code",setupPin:"Setup PIN Code",enterNewPinDescription:"Enter a PIN code consisting of minimum 6 digits",confirmPin:"Підтвердити ПІН-код",confirmPinDescription:"Enter your PIN again to confirm",invalidPinFormat:"Invalid PIN format",pinMismatch:"PINs do not match",incorrectPin:"Incorrect PIN. {{attemptsRemaining}} attempts remaining.",incorrectPinSingular:"Incorrect PIN. 1 attempt remaining.",enableSuccess:"Розблокування PIN-кодом успішно ввімкнено!",pinLocked:"PIN unlock has been disabled. Please use your master password to unlock your vault.",pinSecurityWarning:"PIN unlock in the browser extension can be less secure than your master password, as PINs typically have lower entropy and may be brute-forced if your device is compromised. Use it only on devices you fully trust."}},Uk={passkey:"Ключ доступу",site:"Вебсайт",helpText:"Passkeys are created on the website when prompted. They cannot be manually edited. To remove this passkey, you can delete it from this credential. To replace this passkey or create a new one, visit the website and follow its prompts.",passkeyMarkedForDeletion:"Ключ доступу позначено для видалення",passkeyWillBeDeleted:"Цей ключ доступу буде видалено, коли ви збережете ці облікові дані.",useBrowserPasskey:"Use Browser Passkey",bypass:{description:"How long would you like to use the browser's passkey provider for {{origin}}?",thisTimeOnly:"This time only",alwaysForSite:"Always for this site"},authenticate:{title:"Sign in with Passkey",signInFor:"Sign in with passkey for",selectPasskey:"Select a passkey to sign in:",noPasskeysFound:"No passkeys found for this site"},create:{title:"Create Passkey",createFor:"Create a new passkey for",titleLabel:"Заголовок",titlePlaceholder:"Enter a name for this passkey",createButton:"Create Passkey",selectPasskeyToReplace:"Select a passkey to replace:",createNewPasskey:"Create New Passkey",replacingPasskey:"Replacing passkey: {{displayName}}",confirmReplace:"Confirm Replace",selectExistingLogin:"Add to existing login:",selectExistingLoginDescription:"Attach this passkey to an existing login credential for this site.",attachingToCredential:"Adding passkey to: {{serviceName}}",attachPasskey:"Add Passkey"},settings:{passkeyProvider:"Passkey Provider",passkeyProviderOn:"Passkey Provider on "}},Mk={title:"Recently Deleted",noItems:"No deleted items",noItemsDescription:"Items you delete will appear here for 30 days before being permanently removed.",description:"These items will be permanently deleted after 30 days. You can restore them or delete them immediately.",restore:"Restore",deletePermanently:"Delete Permanently",emptyAll:"Empty All",daysRemaining_one:"{{count}} day remaining",daysRemaining_other:"{{count}} days remaining",expiringSoon:"Expiring soon",confirmDeleteTitle:"Delete Permanently?",confirmDeleteMessage:"This item will be permanently deleted and cannot be recovered.",confirmEmptyAllTitle:"Empty Recently Deleted?",confirmEmptyAllMessage:"All {{count}} items will be permanently deleted and cannot be recovered."},_k={title:"Оновлення сховища",subtitle:"AliasVault оновлено, і ваше сховище потрібно оновити. Це займе лише кілька секунд.",versionInformation:"Інформація про версію",yourVault:"Ваша версія сховища:",newVersion:"Доступна нова версія:",upgrade:"Оновлення сховища",upgrading:"Оновлення...",whatsNew:"Що нового",whatsNewDescription:"Для підтримки таких змін потрібне оновлення:",noDescriptionAvailable:"Для цієї версії немає опису.",alerts:{unableToGetVersionInfo:"Не вдалося отримати інформацію про версію. Спробуйте ще раз.",selfHostedServer:"Сервер із самостійним розміщенням",selfHostedWarning:"Якщо ви використовуєте власний сервер, обов’язково оновіть і свій власний екземпляр, інакше вхід до вебклієнта перестане працювати.",continueUpgrade:"Продовжити оновлення",upgradeFailed:"Помилка оновлення",failedToApplyMigration:"Не вдалося застосувати міграцію ({{current}} з {{total}})"}},Fk={unsyncedChangesTitle:"Unsynced Changes",unsyncedChangesWarning:"You have unsynced changes that will be lost if you log out now. Are you sure you want to continue?",logoutAnyway:"Log out anyway"},Ok={offline:"Offline",tapToRetry:"Tap to retry sync"},jk={auth:Nk,menu:Ck,common:wk,content:xk,items:Sk,itemTypes:Tk,fieldLabels:kk,totp:Lk,attachmentUploader:Rk,emails:Dk,settings:Bk,passkeys:Uk,recentlyDeleted:Mk,upgrade:_k,logout:Fk,sync:Ok},Pk={loginTitle:"登录到 AliasVault",username:"用户名或邮箱",usernamePlaceholder:"姓名 / name@company.com",passwordPlaceholder:"输入您的密码",rememberMe:"记住我",loginButton:"登录",noAccount:"还没有账户？",createVault:"创建新密码库",twoFactorTitle:"请输入来自您身份验证器应用的身份验证码",authCode:"身份验证码",authCodePlaceholder:"输入 6 位数代码",verify:"验证",twoFactorNote:"注意：如果无法访问您的认证设备，您可以通过网站登录，使用恢复码重置两步验证（2FA）。",masterPassword:"主密码",unlockVault:"解锁",unlockWithPin:"使用 PIN 解锁",enterPinToUnlock:"输入您的 PIN 以解锁密码库",useMasterPassword:"使用主密码",unlockTitle:"解锁您的密码库",logoutConfirm:"确定要退出登录吗？",unlockSuccessTitle:"您的密码库已成功解锁",unlockSuccessDescription:"现在您可以在浏览器的登录表单中使用自动填充功能了。",closePopup:"关闭此弹窗",browseVault:"浏览密码库内容",connectingTo:"正在连接",switchAccounts:"切换账户？",loginWithMobile:"使用移动应用登录",unlockWithMobile:"使用移动应用解锁",scanQrCode:"使用 AliasVault 移动端应用扫描该二维码，即可登录并解锁您的密码库。"},Hk={vault:"密码库",emails:"邮件"},zk={loading:"加载中…",notice:"注意",error:"错误",cancel:"取消",confirm:"确认",back:"返回",next:"下一步",use:"使用",add:"添加",delete:"删除",undo:"撤销",save:"保存",saving:"保存中…",create:"创建",or:"或",close:"关闭",logout:"退出登录",copied:"已复制！",openInNewWindow:"在新窗口中打开",enabled:"启用",disabled:"禁用",showPassword:"显示密码",hidePassword:"隐藏密码",showDetails:"显示详情",hideDetails:"隐藏详情",copyToClipboard:"复制到剪贴板",loadingEmails:"加载邮件中…",loadingTotpCodes:"加载TOTP验证码中…",attachments:"附件",loadingAttachments:"加载附件中…",settings:"设置",recentEmails:"近期邮件",credentials:"凭据",customFields:"自定义字段",twoFactorAuthentication:"两步验证（2FA）",alias:"别名",notes:"备注",email:"邮箱",username:"用户名",password:"密码",generate:"生成",serviceName:"服务名称",loggedIn:"已登录",syncingVault:"正在同步密码库",checkingVaultUpdates:"检查密码库更新中",syncingUpdatedVault:"同步更新后的密码库",loadMore:"加载更多",offline:"离线",offlineMode:"正在离线模式运行",pendingSync:"同步中…",mergingVaultChanges:"正在合并密码库更改...",uploadingVault:"正在上传密码库…",errors:{serverNotAvailable:"AliasVault服务器不可用。请稍后重试，若问题持续请联系支持人员。",clientVersionNotSupported:"此版本的AliasVault浏览器扩展已不被服务器支持。请将浏览器扩展更新到最新版本。",browserExtensionOutdated:"此浏览器扩展已过时，无法用于访问此密码库。请更新此浏览器扩展以继续。",serverVersionNotSupported:"AliasVault服务器需要更新到新版本才能使用此浏览器扩展。如需帮助，请联系支持人员。",serverVersionTooOld:"AliasVault 服务器需要更新到更高版本才能使用此功能。如需帮助，请联系服务器管理员。",unknownError:"发生未知错误",unknownErrorTryAgain:"发生未知错误，请重试。",vaultNotAvailable:"密码库不可用",vaultIsLocked:"密码库已锁定",passwordChanged:"登录密码已更新，请重新登录以确保账户安全。",syncConflictMaxRetries:"多次尝试后仍无法同步密码库，请稍后重试。",mergeFailed:"合并密码库更改失败，请重试。",invalidCode:"请输入有效的 6 位身份验证码。",serverError:"无法访问 AliasVault 服务器。请稍后重试，若问题依旧，请联系支持人员。",wrongPassword:"密码错误，请重试。",sessionExpired:"您的会话已过期。请重新登录。",mobileLoginRequestExpired:"移动端登录请求超时，请重新加载页面后重试。"},apiErrors:{UNKNOWN_ERROR:"发生未知错误。请重试。",ACCOUNT_LOCKED:"由于多次尝试失败，账户已暂时锁定。请稍后重试。",ACCOUNT_BLOCKED:"您的账户已被停用。若您认为此操作有误，请联系支持人员。",USER_NOT_FOUND:"用户名或密码无效。请重试。",INVALID_AUTHENTICATOR_CODE:"身份验证器验证码无效。请重试。",INVALID_RECOVERY_CODE:"恢复码无效。请重试。",REFRESH_TOKEN_REQUIRED:"刷新令牌为必填项。",INVALID_REFRESH_TOKEN:"刷新令牌无效。",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:"本地密码库不是最新的。请刷新页面同步密码库后重试。"}},Qk={or:"或",new:"新建",vaultLocked:"AliasVault已锁定。",creatingNewAlias:"正在创建新别名…",noMatchesFound:"未找到匹配项",searchVault:"搜索密码库…",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:"密码已复制到剪贴板",openAliasVaultToUpgrade:"打开AliasVault进行升级",vaultUpgradeRequired:"需要升级密码库。",dismissPopup:"关闭弹窗"},Vk={title:"项目",itemName:"名称",loginCredentials:"登录凭据",cardInformation:"卡信息",addItem:"添加项目",addNewItem:"添加新项目",saveItem:"保存项目",itemDetails:"项目详情",editItem:"编辑项目",untitled:"无标题",newFolder:"新建文件夹",createFolder:"创建文件夹",editFolder:"编辑文件夹",folderName:"文件夹名称",folderNameRequired:"文件夹名称为必填项",folder:"文件夹",welcomeTitle:"欢迎使用 AliasVault!",welcomeDescription:"要使用AliasVault浏览器扩展：导航到某个网站，使用AliasVault自动填充弹窗创建新凭据。",noPasskeysFound:"尚未创建通行密钥。访问以通行密钥为认证方式的网站才能创建通行密钥。",noAttachmentsFound:"未找到带附件的项目",noItemsOfTypeFound:"未找到 {{type}} 项目",noMatchingItems:"未找到匹配的项目",noMatchingItemsSearch:"未找到匹配“{{search}}”的项目",noMatchingItemsWithFilter:"未找到匹配“{{search}}”的 {{filter}} 项目",clearSearch:"清除搜索",clearFilter:"清除筛选器",emptyFolderHint:"此文件夹为空。要将项目移动到此文件夹，请编辑该项目，然后点击名称字段中的文件夹图标。",allItemsInFolders:"您的所有项目都已整理到文件夹中。点击上方文件夹即可查看您的凭据，或使用搜索查找特定的项目。",deleteFolder:"删除文件夹",deleteFolderKeepItems:"仅删除文件夹",deleteFolderKeepItemsDescription:"项目将被移回主列表。",deleteFolderAndItems:"删除文件夹和所有项目",deleteFolderAndItemsDescription:"{{count}} 个项目将被移至“近期删除”。",filters:{folders:"文件夹",passkeys:"通行密钥"},sort:{title:"排序方式",oldestFirst:"最早在前",newestFirst:"最新在前",alphabetical:"字母顺序（A-Z）"},deleteItemTitle:"删除项目",deleteItemConfirm:"您确定要删除此项目吗？",viewHistory:"查看历史记录",history:"历史记录",noHistoryAvailable:"暂无历史记录",tags:"标签",changePasswordComplexity:"更改密码复杂度",passwordLength:"密码长度",includeLowercase:"包含小写字母",includeUppercase:"包含大写字母",includeNumbers:"包含数字",includeSpecialChars:"包含特殊字符",avoidAmbiguousChars:"避免易混淆字符（o、0 等）",privateEmailTitle:"私人邮箱",privateEmailAliasVaultServer:"AliasVault 服务器",privateEmailDescription:"端到端加密，完全私密。",publicEmailTitle:"公共临时邮箱提供商",publicEmailDescription:"匿名但隐私性有限，任何知晓其地址的人均可读取邮件内容。",validation:{required:"此字段为必填项"}},Gk={selectType:"添加新项目",typeLabel:"项目类型",creating:"创建",editing:"编辑",regenerateAlias:"重新生成别名",addCustomField:"添加自定义字段",fieldLabel:"字段标签",enterFieldName:"输入字段名称",fieldType:"字段类型",fieldTypes:{text:"文本",hidden:"隐藏（已遮挡文本）",email:"邮箱",url:"URL",phone:"手机",number:"号码",date:"日期",textArea:"文本区域"},login:{title:"登录"},alias:{title:"别名"},creditCard:{title:"信用卡"},note:{title:"安全笔记"}},Kk={"login.url":"网站 URL","login.username":"用户名","login.password":"密码","alias.first_name":"名","alias.last_name":"姓","alias.gender":"性别","alias.birthdate":"出生日期","login.email":"邮箱","notes.content":"备注","card.cardholder_name":"持卡人姓名","card.number":"卡号","card.expiry_month":"到期月份","card.expiry_year":"到期年份","card.cvv":"CVV","card.pin":"PIN"},qk={addCode:"添加两步验证码",instructions:"输入要添加两步验证的网站显示的密钥。",nameOptional:"名称（可选）",secretKey:"密钥",saveToViewCode:"保存以查看验证码",defaultName:"身份验证器",errors:{invalidSecretKey:"密钥格式无效。"}},Wk={uploading:"上传中…",uploadSuccess:"文件上传成功。",deleteSuccess:"附件删除成功。",firefoxExpandRequired:"要上传文件，请使用展开的窗口。",openExpandedWindow:"打开展开的窗口"},Yk={title:"邮件",deleteEmailTitle:"删除邮件",deleteEmailConfirm:"确定要永久删除此邮件吗？",from:"发件人",to:"收件人",date:"日期",emailContent:"邮件内容",emailNotFound:"未找到邮件",noEmails:"未找到邮件",noEmailsDescription:"您的私人邮箱地址尚未收到任何邮件。当您收到新邮件时，会显示在这里。",offlineMessage:"您处于离线状态。请连接互联网以加载邮件。",dateFormat:{justNow:"刚刚",minutesAgo_single:"{{count}}分钟前",minutesAgo_plural:"{{count}}分钟前",hoursAgo_single:"{{count}}小时前",hoursAgo_plural:"{{count}}小时前",yesterday:"昨天"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"当前选择的邮箱地址已被使用。请通过编辑此凭据修改邮箱地址。",CLAIM_DOES_NOT_EXIST:"加载邮件时发生错误。请尝试编辑并保存凭据条目以同步数据库，然后重试。"}},Jk={serverUrl:"服务器 URL",language:"语言",autofillEnabled:"启用自动填充",version:"版本",openWebApp:"打开网页应用",lock:"锁定",globalSettings:"全局设置",autofillPopup:"自动填充弹窗",activeOnAllSites:"在所有网站上激活（除非在下方禁用）",disabledOnAllSites:"在所有网站上禁用",rightClickContextMenu:"右键上下文菜单",autofillMatching:"自动填充匹配",autofillMatchingMode:"自动填充匹配模式",autofillMatchingModeDescription:"用于判定哪些凭据会被视为匹配项，并在指定网站的自动填充弹窗中显示为建议选项。",autofillMatchingDefault:"URL + 子域名 + 名称通配符",autofillMatchingUrlSubdomain:"URL + 子域名",autofillMatchingUrlExact:"精确匹配URL域名",siteSpecificSettings:"网站特定设置",autofillPopupOn:"自动填充弹窗在以下位置： ",enabledForThisSite:"对此网站启用",disabledForThisSite:"对此网站禁用",temporarilyDisabledUntil:"暂时禁用至 ",resetAllSiteSettings:"重置所有网站特定设置",appearance:"外观",theme:"主题",useDefault:"使用默认",light:"浅色",dark:"深色",keyboardShortcuts:"键盘快捷键",configureKeyboardShortcuts:"配置键盘快捷键",configure:"配置",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:"版本 ",autofillSettings:"自动填充设置",clipboardSettings:"剪贴板设置",contextMenuSettings:"上下文菜单设置",passkeySettings:"通行密钥设置",contextMenu:"上下文菜单",contextMenuEnabled:"上下文菜单已启用",contextMenuDisabled:"上下文菜单已停用",contextMenuDescription:"右键点击输入字段即可访问 AliasVault 选项",selectLanguage:"选择语言",serverConfiguration:"服务器配置",serverConfigurationDescription:"为自托管实例配置 AliasVault 服务器 URL",customApiUrl:"API URL",customClientUrl:"客户端 URL",apiUrlHint:"API 端点 URL（通常为客户端 URL + /api）",clientUrlHint:"您自托管实例的 Web 界面 URL",autofillSettingsDescription:"启用或禁用网页上的自动填充弹出窗口",autofillEnabledDescription:"自动填充建议将显示在登录表单上",autofillDisabledDescription:"自动填充建议已全局禁用",languageSettings:"语言",validation:{apiUrlRequired:"API URL 为必填项",apiUrlInvalid:"请输入有效的 API URL",clientUrlRequired:"客户端 URL 为必填项",clientUrlInvalid:"请输入有效的客户端 URL"},identityGenerator:"身份生成器",identityGeneratorSettings:{description:"配置生成新身份的默认语言和性别偏好。",languageSection:"语言",languageDescription:"设置生成新身份将使用的语言。",genderSection:"性别",genderDescription:"设置生成新身份的性别偏好。",ageRangeSection:"年龄范围",ageRangeDescription:"设置生成新身份的年龄范围。",genderOptions:{random:"随机",male:"男",female:"女"}},unlockMethod:{title:"密码库解锁方式",introText:"选择您解锁密码库的方式。您可以使用主密码（始终可用），也可以设置 PIN 码以便快捷访问。PIN 码输入错误 3 次后，您需要使用主密码。",password:"主密码",pin:"PIN 码",pinDescription:"使用 PIN 码解锁密码库",setupPin:"设置 PIN 码",enterNewPinDescription:"请输入至少 6 位数的 PIN 码",confirmPin:"确认 PIN",confirmPinDescription:"再次输入您的 PIN 以确认",invalidPinFormat:"PIN 格式无效",pinMismatch:"PIN 不一致",incorrectPin:"PIN 码错误，剩余 {{attemptsRemaining}} 次尝试。",incorrectPinSingular:"PIN 码错误，剩余 1 次尝试。",enableSuccess:"PIN 码解锁已成功启用！",pinLocked:"PIN 码解锁已禁用，请使用您的主密码解锁您的密码库。",pinSecurityWarning:"浏览器扩展中的 PIN 码解锁可能不如您的主密码安全，因为 PIN 码的熵值通常较低，若您的设备遭到入侵，则可能被暴力破解。请仅在您完全信任的设备上使用该方式。"}},Xk={passkey:"通行密钥",site:"网站",helpText:"通行密钥会在网站提示时自动生成，无法手动编辑。要移除此通行密钥，您可以在此凭据中进行删除。要替换或创建新的通行密钥，请访问网站并按照其提示操作。",passkeyMarkedForDeletion:"通行密钥已标记为删除",passkeyWillBeDeleted:"保存此凭据后，此通行密钥将被删除。",useBrowserPasskey:"使用浏览器通行密钥",bypass:{description:"对于 {{origin}}，您希望使用浏览器的密码提供程序多长时间？",thisTimeOnly:"仅一次",alwaysForSite:"始终为此网站"},authenticate:{title:"使用通行密钥登录",signInFor:"使用通行密钥登录或",selectPasskey:"选择要登录的通行密钥：",noPasskeysFound:"未找到此网站的通行密钥"},create:{title:"创建通行密钥",createFor:"创建新通行密钥用于",titleLabel:"标题",titlePlaceholder:"输入此通行密钥的名称",createButton:"创建通行密钥",selectPasskeyToReplace:"选择要替换的通行密钥：",createNewPasskey:"创建新通行密钥",replacingPasskey:"替换通行密钥：{{displayName}}",confirmReplace:"确认替换",selectExistingLogin:"添加到现有登录：",selectExistingLoginDescription:"将此通行密钥附加到此站点的现有登录凭据中。",attachingToCredential:"正在将通行密钥添加到：{{serviceName}}",attachPasskey:"添加通行密钥"},settings:{passkeyProvider:"通行密钥提供程序",passkeyProviderOn:"通行密钥提供程序于"}},$k={title:"近期删除",noItems:"没有删除的项目",noItemsDescription:"您删除的项目将在此处停留 30 天，随后永久移除。",description:"这些项目将在 30 天后永久删除。您可以立即还原或永久删除。",restore:"还原",deletePermanently:"永久删除",emptyAll:"全部清空",daysRemaining_one:"剩余 {{count}} 天",daysRemaining_other:"剩余 {{count}} 天",expiringSoon:"即将到期",confirmDeleteTitle:"永久删除吗？",confirmDeleteMessage:"此项目将被永久删除，且无法恢复。",confirmEmptyAllTitle:"清空“近期删除”吗？",confirmEmptyAllMessage:"所有 {{count}} 个项目将被永久删除，且无法恢复。"},Zk={title:"升级密码库",subtitle:"AliasVault已更新，您的密码库需要升级，仅需数秒。",versionInformation:"版本信息",yourVault:"您的密码库版本：",newVersion:"新可用版本：",upgrade:"升级密码库",upgrading:"升级中…",whatsNew:"新功能",whatsNewDescription:"需要升级才能支持以下更改：",noDescriptionAvailable:"此版本无可用说明。",alerts:{unableToGetVersionInfo:"无法获取版本信息。请重试。",selfHostedServer:"自托管服务器",selfHostedWarning:"如果您使用的是自托管服务器，请确保同时更新您的自托管实例，否则将无法登录网页客户端。",continueUpgrade:"继续升级",upgradeFailed:"升级失败",failedToApplyMigration:"应用迁移失败（{{current}} / {{total}}）"}},eL={unsyncedChangesTitle:"未同步的更改",unsyncedChangesWarning:"您有更改尚未同步，若您现在退出登录，这些更改将会丢失。您确定要继续吗？",logoutAnyway:"仍要退出登录"},tL={offline:"离线",tapToRetry:"点击重试同步"},aL={auth:Pk,menu:Hk,common:zk,content:Qk,items:Vk,itemTypes:Gk,fieldLabels:Kk,totp:qk,attachmentUploader:Wk,emails:Yk,settings:Jk,passkeys:Xk,recentlyDeleted:$k,upgrade:Zk,logout:eL,sync:tL},_l={de:{translation:Ux},en:{translation:Xx},es:{translation:fS},fi:{translation:RS},fr:{translation:WS},he:{translation:dT},it:{translation:TT},nl:{translation:GT},pl:{translation:l1},pt:{translation:w1},ro:{translation:z1},ru:{translation:ik},sv:{translation:vk},uk:{translation:jk},zh:{translation:aL}},Pl=[{code:"de",name:"German",nativeName:"Deutsch",flag:"🇩🇪"},{code:"en",name:"English",nativeName:"English",flag:"🇺🇸"},{code:"es",name:"Spanish",nativeName:"Español",flag:"🇪🇸"},{code:"fi",name:"Finnish",nativeName:"Suomi",flag:"🇫🇮"},{code:"fr",name:"French",nativeName:"Français",flag:"🇫🇷"},{code:"he",name:"Hebrew",nativeName:"עברית",flag:"🇮🇱"},{code:"it",name:"Italian",nativeName:"Italiano",flag:"🇮🇹"},{code:"nl",name:"Dutch",nativeName:"Nederlands",flag:"🇳🇱"},{code:"pl",name:"Polish",nativeName:"Polski",flag:"🇵🇱"},{code:"pt",name:"Portuguese Brazilian",nativeName:"Português Brasileiro",flag:"🇧🇷"},{code:"ro",name:"Romanian",nativeName:"Română",flag:"🇷🇴"},{code:"ru",name:"Russian",nativeName:"Русский",flag:"🇷🇺"},{code:"sv",name:"Swedish",nativeName:"Svenska",flag:"🇸🇪"},{code:"uk",name:"Ukrainian",nativeName:"Українська",flag:"🇺🇦"},{code:"zh",name:"Chinese",nativeName:"简体中文",flag:"🇨🇳"}],kr="en",Wu=Pl.map(n=>n.code),Au=new Map;async function Ty(n){const e=`all:${n}`;if(Au.has(e))return Au.get(e);if(_l[n]){const a=_l[n].translation;return Au.set(e,a),a}if(n!==kr&&_l[kr]){console.warn(`Translations not found for ${n}, falling back to ${kr}`);const a=_l[kr].translation;return Au.set(e,a),a}return console.warn(`No translations found for ${n} and no fallback available`),{}}function nL(n){return Pl.find(e=>e.code===n)}function ky(n,e){return e.split(".").reduce((a,i)=>a&&typeof a=="object"&&a!==null&&i in a?a[i]:void 0,n)}async function rL(){try{const n=await Se.getItem("local:language");if(n&&Wu.includes(n))return n;const e=navigator.language.split("-")[0],a=Wu.includes(e)?e:kr;return await Se.setItem("local:language",a),a}catch(n){return console.error("Failed to get current language:",n),kr}}async function iL(n,e){try{const a=await rL(),i=await Ty(a),s=ky(i,n);if(s&&typeof s=="string")return s;if(a!==kr){const c=await Ty(kr),d=ky(c,n);if(d&&typeof d=="string")return d}return e||n}catch(a){return console.error("Translation error:",a),e||n}}function sL(n){return n.toISOString().replace("T"," ").replace("Z","").substring(0,23)}function Hg(){return sL(new Date)}class tc{constructor(e){this.client=e}async withTransaction(e){this.client.beginTransaction();try{const a=await e();return await this.client.commitTransaction(),a}catch(a){throw this.client.rollbackTransaction(),a}}softDelete(e,a){const i=Hg();return this.client.executeUpdate(`UPDATE ${e} SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?`,[i,a])}softDeleteByForeignKey(e,a,i){const s=Hg();return this.client.executeUpdate(`UPDATE ${e} SET IsDeleted = 1, UpdatedAt = ? WHERE ${a} = ?`,[s,i])}hardDelete(e,a){return this.client.executeUpdate(`DELETE FROM ${e} WHERE Id = ?`,[a])}hardDeleteByForeignKey(e,a,i){return this.client.executeUpdate(`DELETE FROM ${e} WHERE ${a} = ?`,[i])}tableExists(e){return this.client.executeQuery("SELECT name FROM sqlite_master WHERE type='table' AND name=?",[e]).length>0}generateId(){return crypto.randomUUID().toUpperCase()}now(){return Hg()}buildInClause(e){return{placeholders:e.map(()=>"?").join(","),values:e}}}var en={LoginUsername:"login.username",LoginPassword:"login.password",LoginEmail:"login.email",LoginUrl:"login.url",CardNumber:"card.number",CardCardholderName:"card.cardholder_name",CardExpiryMonth:"card.expiry_month",CardExpiryYear:"card.expiry_year",CardCvv:"card.cvv",CardPin:"card.pin",AliasFirstName:"alias.first_name",AliasLastName:"alias.last_name",AliasGender:"alias.gender",AliasBirthdate:"alias.birthdate",NotesContent:"notes.content"},fa={Login:"Login",Alias:"Alias",CreditCard:"CreditCard",Note:"Note"},ra={Text:"Text",Password:"Password",Hidden:"Hidden",Email:"Email",URL:"URL",Date:"Date",Number:"Number",Phone:"Phone",TextArea:"TextArea"},ct={Primary:"Primary",Login:"Login",Alias:"Alias",Card:"Card",Custom:"Custom",Notes:"Notes",Metadata:"Metadata"},Eh={"login.email":{FieldKey:"login.email",FieldType:"Email",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!1},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:ct.Login,DefaultDisplayOrder:10},"login.username":{FieldKey:"login.username",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:ct.Login,DefaultDisplayOrder:15},"login.password":{FieldKey:"login.password",FieldType:"Password",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:ct.Login,DefaultDisplayOrder:20},"login.url":{FieldKey:"login.url",FieldType:"URL",IsHidden:!1,IsMultiValue:!0,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:ct.Primary,DefaultDisplayOrder:5},"alias.first_name":{FieldKey:"alias.first_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:ct.Alias,DefaultDisplayOrder:20},"alias.last_name":{FieldKey:"alias.last_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:ct.Alias,DefaultDisplayOrder:30},"alias.gender":{FieldKey:"alias.gender",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:ct.Alias,DefaultDisplayOrder:50},"alias.birthdate":{FieldKey:"alias.birthdate",FieldType:"Date",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:ct.Alias,DefaultDisplayOrder:60},"card.cardholder_name":{FieldKey:"card.cardholder_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:ct.Card,DefaultDisplayOrder:10},"card.number":{FieldKey:"card.number",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:ct.Card,DefaultDisplayOrder:20},"card.expiry_month":{FieldKey:"card.expiry_month",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:ct.Card,DefaultDisplayOrder:30},"card.expiry_year":{FieldKey:"card.expiry_year",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:ct.Card,DefaultDisplayOrder:40},"card.cvv":{FieldKey:"card.cvv",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:ct.Card,DefaultDisplayOrder:50},"card.pin":{FieldKey:"card.pin",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!1}},EnableHistory:!1,Category:ct.Card,DefaultDisplayOrder:60},"notes.content":{FieldKey:"notes.content",FieldType:"TextArea",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!1},Alias:{ShowByDefault:!1},CreditCard:{ShowByDefault:!1},Note:{ShowByDefault:!0}},EnableHistory:!1,Category:ct.Notes,DefaultDisplayOrder:100}};function fo(n){return Eh[n]}function Hl(n,e){return e in n.ApplicableToTypes}function Fl(n,e){const a=n.ApplicableToTypes[e];return(a==null?void 0:a.ShowByDefault)??!1}function oL(n){return Object.values(Eh).filter(e=>Hl(e,n)).sort((e,a)=>e.DefaultDisplayOrder-a.DefaultDisplayOrder)}function lL(n){return Object.values(Eh).filter(e=>Hl(e,n)&&!Fl(e,n)).sort((e,a)=>e.DefaultDisplayOrder-a.DefaultDisplayOrder)}function pu(n,e){const a=n.Fields.find(i=>i.FieldKey===e);if(a)return Array.isArray(a.Value)?a.Value[0]:a.Value}function cL(n,e){const a={};return n.Fields.forEach(i=>{const s=e(i);a[s]||(a[s]=[]),a[s].push(i)}),a}function uL(n){const e=cL(n,a=>a.FieldKey.startsWith("login.")?ct.Login:a.FieldKey.startsWith("alias.")?ct.Alias:a.FieldKey.startsWith("card.")?ct.Card:a.FieldKey.startsWith("notes.")?ct.Notes:a.FieldKey.startsWith("metadata.")?ct.Metadata:ct.Custom);for(const a of Object.keys(e))e[a].sort((i,s)=>(i.DisplayOrder??0)-(s.DisplayOrder??0));return e}function yu(n,e){const a=fo(n);if(!a)throw new Error(`Unknown system field: ${n}. Use createCustomField for custom fields.`);return{FieldKey:n,Label:e.label??n,FieldType:a.FieldType,Value:e.value,IsHidden:a.IsHidden,DisplayOrder:e.displayOrder??a.DefaultDisplayOrder,IsCustomField:!1,EnableHistory:a.EnableHistory}}var zg=10;class Qg{static processFieldRows(e){const a=e.map(c=>this.processFieldRow(c)),i=new Map,s=new Map;for(const c of a){const d=`${c.ItemId}_${c.FieldKey}`;s.has(d)||s.set(d,[]),s.get(d).push(c.Value),i.has(c.ItemId)||i.set(c.ItemId,[]);const m=i.get(c.ItemId);m.find(g=>g.FieldKey===c.FieldKey)||m.push({FieldKey:c.FieldKey,Label:c.Label,FieldType:c.FieldType,Value:"",IsHidden:c.IsHidden===1,DisplayOrder:c.DisplayOrder,IsCustomField:c.IsCustomField,EnableHistory:c.EnableHistory})}for(const[c,d]of i)for(const m of d){const f=`${c}_${m.FieldKey}`,g=s.get(f)||[];g.length===1?m.Value=g[0]:m.Value=g}return i}static processFieldRow(e){if(e.FieldKey){const a=fo(e.FieldKey);return{ItemId:e.ItemId,FieldKey:e.FieldKey,Label:e.FieldKey,FieldType:(a==null?void 0:a.FieldType)||ra.Text,IsHidden:a!=null&&a.IsHidden?1:0,Value:e.Value,DisplayOrder:(a==null?void 0:a.DefaultDisplayOrder)??e.DisplayOrder,IsCustomField:!1,EnableHistory:(a==null?void 0:a.EnableHistory)??!1}}else return{ItemId:e.ItemId,FieldKey:e.FieldDefinitionId||"",Label:e.CustomLabel||"",FieldType:e.CustomFieldType||ra.Text,IsHidden:e.CustomIsHidden||0,Value:e.Value,DisplayOrder:e.DisplayOrder,IsCustomField:!0,EnableHistory:e.CustomEnableHistory===1}}static processFieldRowsForSingleItem(e){const a=new Map,i=new Map;for(const s of e){const c=s.FieldKey||s.FieldDefinitionId||"";if(a.has(c)||a.set(c,[]),a.get(c).push(s.Value),!i.has(c))if(s.FieldKey){const d=fo(s.FieldKey);i.set(c,{FieldKey:s.FieldKey,Label:s.FieldKey,FieldType:(d==null?void 0:d.FieldType)||ra.Text,IsHidden:d!=null&&d.IsHidden?1:0,DisplayOrder:(d==null?void 0:d.DefaultDisplayOrder)??s.DisplayOrder,IsCustomField:!1,EnableHistory:(d==null?void 0:d.EnableHistory)??!1})}else i.set(c,{FieldKey:c,Label:s.CustomLabel||"",FieldType:s.CustomFieldType||ra.Text,IsHidden:s.CustomIsHidden||0,DisplayOrder:s.DisplayOrder,IsCustomField:!0,EnableHistory:s.CustomEnableHistory===1})}return Array.from(i.entries()).map(([s,c])=>{const d=a.get(s)||[];return{...c,FieldType:c.FieldType,Value:d.length===1?d[0]:d,IsHidden:c.IsHidden===1,IsCustomField:c.IsCustomField,EnableHistory:c.EnableHistory}})}}class Nl{static mapRow(e,a=[],i=[]){return{Id:e.Id,Name:e.Name,ItemType:e.ItemType,Logo:e.Logo??void 0,FolderId:e.FolderId,FolderPath:e.FolderPath||null,Tags:i,Fields:a,HasPasskey:e.HasPasskey===1,HasAttachment:e.HasAttachment===1,HasTotp:e.HasTotp===1,CreatedAt:e.CreatedAt,UpdatedAt:e.UpdatedAt}}static mapRows(e,a,i){return e.map(s=>this.mapRow(s,a.get(s.Id)||[],i.get(s.Id)||[]))}static groupTagsByItem(e){const a=new Map;for(const i of e)a.has(i.ItemId)||a.set(i.ItemId,[]),a.get(i.ItemId).push({Id:i.Id,Name:i.Name,Color:i.Color||void 0});return a}static mapTagRows(e){return e.map(a=>({Id:a.Id,Name:a.Name,Color:a.Color||void 0}))}static mapDeletedItemRow(e,a=[]){return{Id:e.Id,Name:e.Name,ItemType:e.ItemType,Logo:e.Logo?new Uint8Array(e.Logo):void 0,FolderId:e.FolderId,FolderPath:e.FolderPath,DeletedAt:e.DeletedAt,HasPasskey:e.HasPasskey===1,HasAttachment:e.HasAttachment===1,HasTotp:e.HasTotp===1,Fields:a,CreatedAt:e.CreatedAt,UpdatedAt:e.UpdatedAt}}}function Ly(n){return new Date(n).getTime()}class Vg{static mapRow(e){return{Id:e.Id,ItemId:e.ItemId,RpId:e.RpId,UserHandle:e.UserHandle??void 0,PublicKey:e.PublicKey,PrivateKey:e.PrivateKey,DisplayName:e.DisplayName,PrfKey:e.PrfKey??void 0,AdditionalData:e.AdditionalData,CreatedAt:Ly(e.CreatedAt),UpdatedAt:Ly(e.UpdatedAt),IsDeleted:e.IsDeleted}}static mapRowWithItem(e){return{...this.mapRow(e),Username:e.Username,ServiceName:e.ServiceName}}static mapRows(e){return e.map(a=>this.mapRow(a))}static mapRowsWithItem(e){return e.map(a=>this.mapRowWithItem(a))}}const Oa=class Oa{static getFieldValuesForItems(e){return`
      SELECT
        fv.ItemId,
        fv.FieldKey,
        fv.FieldDefinitionId,
        fd.Label as CustomLabel,
        fd.FieldType as CustomFieldType,
        fd.IsHidden as CustomIsHidden,
        fd.EnableHistory as CustomEnableHistory,
        fv.Value,
        fv.Weight as DisplayOrder
      FROM FieldValues fv
      LEFT JOIN FieldDefinitions fd ON fv.FieldDefinitionId = fd.Id
      WHERE fv.ItemId IN (${Array(e).fill("?").join(",")})
        AND fv.IsDeleted = 0
      ORDER BY fv.ItemId, fv.Weight`}static getTagsForItems(e){return`
      SELECT
        it.ItemId,
        t.Id,
        t.Name,
        t.Color
      FROM ItemTags it
      INNER JOIN Tags t ON it.TagId = t.Id
      WHERE it.ItemId IN (${Array(e).fill("?").join(",")})
        AND it.IsDeleted = 0
        AND t.IsDeleted = 0
      ORDER BY t.DisplayOrder, t.Name`}};qe(Oa,"BASE_SELECT",`
    SELECT DISTINCT
      i.Id,
      i.Name,
      i.ItemType,
      i.FolderId,
      f.Name as FolderPath,
      l.FileData as Logo,
      CASE WHEN EXISTS (SELECT 1 FROM Passkeys pk WHERE pk.ItemId = i.Id AND pk.IsDeleted = 0) THEN 1 ELSE 0 END as HasPasskey,
      CASE WHEN EXISTS (SELECT 1 FROM Attachments att WHERE att.ItemId = i.Id AND att.IsDeleted = 0) THEN 1 ELSE 0 END as HasAttachment,
      CASE WHEN EXISTS (SELECT 1 FROM TotpCodes tc WHERE tc.ItemId = i.Id AND tc.IsDeleted = 0) THEN 1 ELSE 0 END as HasTotp,
      i.CreatedAt,
      i.UpdatedAt
    FROM Items i
    LEFT JOIN Logos l ON i.LogoId = l.Id
    LEFT JOIN Folders f ON i.FolderId = f.Id`),qe(Oa,"GET_ALL_ACTIVE",`
    ${Oa.BASE_SELECT}
    WHERE i.IsDeleted = 0 AND i.DeletedAt IS NULL
    ORDER BY i.CreatedAt DESC`),qe(Oa,"GET_BY_ID",`
    SELECT
      i.Id,
      i.Name,
      i.ItemType,
      i.FolderId,
      l.FileData as Logo,
      CASE WHEN EXISTS (SELECT 1 FROM Passkeys pk WHERE pk.ItemId = i.Id AND pk.IsDeleted = 0) THEN 1 ELSE 0 END as HasPasskey,
      CASE WHEN EXISTS (SELECT 1 FROM Attachments att WHERE att.ItemId = i.Id AND att.IsDeleted = 0) THEN 1 ELSE 0 END as HasAttachment,
      CASE WHEN EXISTS (SELECT 1 FROM TotpCodes tc WHERE tc.ItemId = i.Id AND tc.IsDeleted = 0) THEN 1 ELSE 0 END as HasTotp,
      i.CreatedAt,
      i.UpdatedAt
    FROM Items i
    LEFT JOIN Logos l ON i.LogoId = l.Id
    WHERE i.Id = ? AND i.IsDeleted = 0`),qe(Oa,"GET_RECENTLY_DELETED",`
    ${Oa.BASE_SELECT},
      i.DeletedAt
    FROM Items i
    LEFT JOIN Logos l ON i.LogoId = l.Id
    LEFT JOIN Folders f ON i.FolderId = f.Id
    WHERE i.IsDeleted = 0 AND i.DeletedAt IS NOT NULL
    ORDER BY i.DeletedAt DESC`),qe(Oa,"COUNT_RECENTLY_DELETED",`
    SELECT COUNT(*) as count
    FROM Items
    WHERE IsDeleted = 0 AND DeletedAt IS NOT NULL`),qe(Oa,"GET_FIELD_VALUES_FOR_ITEM",`
    SELECT
      fv.FieldKey,
      fv.FieldDefinitionId,
      fd.Label as CustomLabel,
      fd.FieldType as CustomFieldType,
      fd.IsHidden as CustomIsHidden,
      fd.EnableHistory as CustomEnableHistory,
      fv.Value,
      fv.Weight as DisplayOrder
    FROM FieldValues fv
    LEFT JOIN FieldDefinitions fd ON fv.FieldDefinitionId = fd.Id
    WHERE fv.ItemId = ? AND fv.IsDeleted = 0
    ORDER BY fv.Weight`),qe(Oa,"GET_TAGS_FOR_ITEM",`
    SELECT
      t.Id,
      t.Name,
      t.Color
    FROM ItemTags it
    INNER JOIN Tags t ON it.TagId = t.Id
    WHERE it.ItemId = ? AND it.IsDeleted = 0 AND t.IsDeleted = 0
    ORDER BY t.DisplayOrder, t.Name`),qe(Oa,"INSERT_ITEM",`
    INSERT INTO Items (Id, Name, ItemType, LogoId, FolderId, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?)`),qe(Oa,"UPDATE_ITEM",`
    UPDATE Items
    SET Name = ?,
        ItemType = ?,
        FolderId = ?,
        LogoId = COALESCE(?, LogoId),
        UpdatedAt = ?
    WHERE Id = ?`),qe(Oa,"UPDATE_ITEM_WITH_LOGO",`
    UPDATE Items
    SET Name = ?,
        ItemType = ?,
        FolderId = ?,
        LogoId = ?,
        UpdatedAt = ?
    WHERE Id = ?`),qe(Oa,"TRASH_ITEM",`
    UPDATE Items
    SET DeletedAt = ?,
        UpdatedAt = ?
    WHERE Id = ? AND IsDeleted = 0`),qe(Oa,"RESTORE_ITEM",`
    UPDATE Items
    SET DeletedAt = NULL,
        UpdatedAt = ?
    WHERE Id = ? AND IsDeleted = 0 AND DeletedAt IS NOT NULL`),qe(Oa,"TOMBSTONE_ITEM",`
    UPDATE Items
    SET IsDeleted = 1,
        Name = NULL,
        LogoId = NULL,
        FolderId = NULL,
        UpdatedAt = ?
    WHERE Id = ?`),qe(Oa,"GET_LOGO_ID",`
    SELECT LogoId FROM Items WHERE Id = ?`),qe(Oa,"GET_ALL_EMAIL_ADDRESSES",`
    SELECT DISTINCT fv.Value as Email
    FROM FieldValues fv
    INNER JOIN Items i ON fv.ItemId = i.Id
    WHERE fv.FieldKey = ?
      AND fv.Value IS NOT NULL
      AND fv.Value != ''
      AND fv.IsDeleted = 0
      AND i.IsDeleted = 0`);let $a=Oa;class ur{}qe(ur,"GET_EXISTING_FOR_ITEM",`
    SELECT Id, FieldKey, FieldDefinitionId, Value
    FROM FieldValues
    WHERE ItemId = ? AND IsDeleted = 0`),qe(ur,"INSERT",`
    INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`),qe(ur,"UPDATE",`
    UPDATE FieldValues
    SET Value = ?,
        Weight = ?,
        UpdatedAt = ?
    WHERE Id = ?`),qe(ur,"SOFT_DELETE",`
    UPDATE FieldValues
    SET IsDeleted = 1,
        UpdatedAt = ?
    WHERE Id = ?`),qe(ur,"GET_FOR_HISTORY",`
    SELECT FieldKey, Value
    FROM FieldValues
    WHERE ItemId = ? AND IsDeleted = 0 AND FieldKey IS NOT NULL`);class ii{}qe(ii,"EXISTS",`
    SELECT Id FROM FieldDefinitions WHERE Id = ?`),qe(ii,"EXISTS_ACTIVE",`
    SELECT Id FROM FieldDefinitions WHERE Id = ? AND IsDeleted = 0`),qe(ii,"INSERT",`
    INSERT INTO FieldDefinitions (Id, FieldType, Label, IsMultiValue, IsHidden, EnableHistory, Weight, ApplicableToTypes, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`),qe(ii,"UPDATE",`
    UPDATE FieldDefinitions
    SET Label = ?,
        FieldType = ?,
        IsHidden = ?,
        Weight = ?,
        UpdatedAt = ?
    WHERE Id = ?`);class Sr{static softDeleteOld(e){return`
      UPDATE FieldHistories
      SET IsDeleted = 1, UpdatedAt = ?
      WHERE Id IN (${Array(e).fill("?").join(",")})`}}qe(Sr,"INSERT",`
    INSERT INTO FieldHistories (Id, ItemId, FieldDefinitionId, FieldKey, ValueSnapshot, ChangedAt, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`),qe(Sr,"GET_FOR_FIELD",`
    SELECT
      Id,
      ItemId,
      FieldKey,
      ValueSnapshot,
      ChangedAt,
      CreatedAt,
      UpdatedAt
    FROM FieldHistories
    WHERE ItemId = ? AND FieldKey = ? AND IsDeleted = 0
    ORDER BY ChangedAt DESC
    LIMIT ?`),qe(Sr,"GET_FOR_PRUNING",`
    SELECT Id, ChangedAt
    FROM FieldHistories
    WHERE ItemId = ? AND FieldKey = ? AND IsDeleted = 0
    ORDER BY ChangedAt DESC`),qe(Sr,"SOFT_DELETE",`
    UPDATE FieldHistories
    SET IsDeleted = 1, UpdatedAt = ?
    WHERE Id = ?`);class dL extends tc{constructor(e,a){super(e),this.logoRepository=a}getAll(){let e;try{e=this.client.executeQuery($a.GET_ALL_ACTIVE)}catch(m){if(m instanceof Error&&m.message.includes("no such table"))return[];throw m}if(e.length===0)return[];const a=e.map(m=>m.Id),i=this.client.executeQuery($a.getFieldValuesForItems(a.length),a),s=Qg.processFieldRows(i),c=this.client.executeQuery($a.getTagsForItems(a.length),a),d=Nl.groupTagsByItem(c);return Nl.mapRows(e,s,d)}getById(e){const a=this.client.executeQuery($a.GET_BY_ID,[e]);if(a.length===0)return null;const i=this.client.executeQuery($a.GET_FIELD_VALUES_FOR_ITEM,[e]),s=Qg.processFieldRowsForSingleItem(i),c=this.client.executeQuery($a.GET_TAGS_FOR_ITEM,[e]),d=Nl.mapTagRows(c);return Nl.mapRow(a[0],s,d)}getAllEmailAddresses(){return this.client.executeQuery($a.GET_ALL_EMAIL_ADDRESSES,[en.LoginEmail]).map(a=>a.Email)}async create(e,a=[],i=[]){return this.withTransaction(async()=>{const s=this.now(),c=e.Id||this.generateId(),d=this.resolveLogoId(e,s);return this.client.executeUpdate($a.INSERT_ITEM,[c,e.Name??null,e.ItemType,d,e.FolderId??null,s,s,0]),e.Fields&&e.Fields.length>0&&this.insertFieldValues(c,e.Fields,e.ItemType,s),this.insertTotpCodes(c,i,s),this.insertAttachments(c,a,s),c})}async update(e,a=[],i=[],s=[],c=[]){return this.withTransaction(async()=>{const d=this.now(),m=this.resolveLogoId(e,d),f=this.client.executeQuery("SELECT Name, ItemType, FolderId, LogoId FROM Items WHERE Id = ?",[e.Id])[0];if(f){const g=(e.Name??null)!==f.Name,E=String(e.ItemType)!==String(f.ItemType),p=(e.FolderId??null)!==f.FolderId,C=m!==f.LogoId;(g||E||p||C)&&this.client.executeUpdate($a.UPDATE_ITEM_WITH_LOGO,[e.Name??null,e.ItemType,e.FolderId??null,m,d,e.Id])}return await this.trackFieldHistory(e.Id,e.Fields,d),this.updateFieldValues(e,d),this.handleTotpCodes(e.Id,c,s,d),this.handleAttachments(e.Id,i,a,d),1})}async trash(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate($a.TRASH_ITEM,[a,a,e])})}async restore(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate($a.RESTORE_ITEM,[a,e])})}async permanentlyDelete(e){return this.withTransaction(async()=>{const a=this.now(),i=this.client.executeQuery($a.GET_LOGO_ID,[e]),s=i.length>0?i[0].LogoId:null;this.hardDeleteByForeignKey("FieldValues","ItemId",e),this.hardDeleteByForeignKey("FieldHistories","ItemId",e),this.hardDeleteByForeignKey("Passkeys","ItemId",e),this.hardDeleteByForeignKey("TotpCodes","ItemId",e),this.hardDeleteByForeignKey("Attachments","ItemId",e),this.hardDeleteByForeignKey("ItemTags","ItemId",e);const c=this.client.executeUpdate($a.TOMBSTONE_ITEM,[a,e]);return s&&this.logoRepository.cleanupOrphanedLogo(s),c})}getRecentlyDeleted(){let e;try{e=this.client.executeQuery(`
        SELECT DISTINCT
          i.Id,
          i.Name,
          i.ItemType,
          i.FolderId,
          f.Name as FolderPath,
          l.FileData as Logo,
          i.DeletedAt,
          CASE WHEN EXISTS (SELECT 1 FROM Passkeys pk WHERE pk.ItemId = i.Id AND pk.IsDeleted = 0) THEN 1 ELSE 0 END as HasPasskey,
          CASE WHEN EXISTS (SELECT 1 FROM Attachments att WHERE att.ItemId = i.Id AND att.IsDeleted = 0) THEN 1 ELSE 0 END as HasAttachment,
          CASE WHEN EXISTS (SELECT 1 FROM TotpCodes tc WHERE tc.ItemId = i.Id AND tc.IsDeleted = 0) THEN 1 ELSE 0 END as HasTotp,
          i.CreatedAt,
          i.UpdatedAt
        FROM Items i
        LEFT JOIN Logos l ON i.LogoId = l.Id
        LEFT JOIN Folders f ON i.FolderId = f.Id
        WHERE i.IsDeleted = 0 AND i.DeletedAt IS NOT NULL
        ORDER BY i.DeletedAt DESC`)}catch(c){if(c instanceof Error&&c.message.includes("no such table"))return[];throw c}if(e.length===0)return[];const a=e.map(c=>c.Id),i=this.client.executeQuery($a.getFieldValuesForItems(a.length),a),s=Qg.processFieldRows(i);return e.map(c=>Nl.mapDeletedItemRow(c,s.get(c.Id)||[]))}getRecentlyDeletedCount(){var e;try{return((e=this.client.executeQuery($a.COUNT_RECENTLY_DELETED)[0])==null?void 0:e.count)||0}catch(a){if(a instanceof Error&&a.message.includes("no such table"))return 0;throw a}}getFieldHistory(e,a){return this.client.executeQuery(Sr.GET_FOR_FIELD,[e,a,zg]).map(s=>({Id:s.Id,ItemId:s.ItemId,FieldKey:s.FieldKey,ValueSnapshot:s.ValueSnapshot,ChangedAt:s.ChangedAt,CreatedAt:s.CreatedAt,UpdatedAt:s.UpdatedAt}))}async deleteFieldHistory(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(Sr.SOFT_DELETE,[a,e])})}resolveLogoId(e,a){var m;const i=(m=e.Fields)==null?void 0:m.find(f=>f.FieldKey==="login.url"),s=i==null?void 0:i.Value,c=Array.isArray(s)?s[0]:s,d=this.logoRepository.extractSourceFromUrl(c);if(e.Logo){const f=this.logoRepository.convertLogoToUint8Array(e.Logo);if(f)return this.logoRepository.getOrCreate(d,f,a)}else if(d!=="unknown")return this.logoRepository.getIdForSource(d);return null}insertFieldValues(e,a,i,s){for(const c of a){if((!c.Value||typeof c.Value=="string"&&c.Value.trim()==="")&&!c.IsCustomField)continue;let m=null;c.IsCustomField&&(m=this.ensureFieldDefinition(c,i,s));const g=(Array.isArray(c.Value)?c.Value:[c.Value]).filter(p=>p&&p.trim()!==""),E=c.IsCustomField&&g.length===0?[""]:g;for(const p of E)this.client.executeUpdate(ur.INSERT,[this.generateId(),e,m,c.IsCustomField?null:c.FieldKey,p,c.DisplayOrder??0,s,s,0]);if(c.EnableHistory&&g.length>0){const p=this.generateId(),C=JSON.stringify(g);this.client.executeUpdate(Sr.INSERT,[p,e,null,c.FieldKey,C,s,s,s,0])}}}ensureFieldDefinition(e,a,i){return this.client.executeQuery(ii.EXISTS,[e.FieldKey]).length===0&&this.client.executeUpdate(ii.INSERT,[e.FieldKey,e.FieldType,e.Label,0,e.IsHidden?1:0,0,e.DisplayOrder??0,a,i,i,0]),e.FieldKey}updateFieldValues(e,a){const i=this.client.executeQuery(ur.GET_EXISTING_FOR_ITEM,[e.Id]),s=new Map,c=new Map;for(const m of i){const f=m.FieldKey||m.FieldDefinitionId||"",g=c.get(f)||0;s.set(`${f}:${g}`,{Id:m.Id,Value:m.Value}),c.set(f,g+1)}const d=new Set;if(e.Fields&&e.Fields.length>0)for(const m of e.Fields){if((!m.Value||typeof m.Value=="string"&&m.Value.trim()==="")&&!m.IsCustomField)continue;let g=null;m.IsCustomField&&(g=this.ensureOrUpdateFieldDefinition(m,e.ItemType,a));const E=Array.isArray(m.Value)?m.Value:[m.Value],p=m.FieldKey,C=E.filter(x=>x&&(typeof x!="string"||x.trim()!=="")),N=m.IsCustomField&&C.length===0?[""]:C;for(let x=0;x<N.length;x++){const S=N[x],T=`${p}:${x}`,k=s.get(T);k?(d.add(k.Id),k.Value!==S&&this.client.executeUpdate(ur.UPDATE,[S,m.DisplayOrder??0,a,k.Id])):this.client.executeUpdate(ur.INSERT,[this.generateId(),e.Id,g,m.IsCustomField?null:m.FieldKey,S,m.DisplayOrder??0,a,a,0])}}for(const m of i)d.has(m.Id)||this.client.executeUpdate(ur.SOFT_DELETE,[a,m.Id])}ensureOrUpdateFieldDefinition(e,a,i){return this.client.executeQuery(ii.EXISTS_ACTIVE,[e.FieldKey]).length===0?this.client.executeUpdate(ii.INSERT,[e.FieldKey,e.FieldType,e.Label,0,e.IsHidden?1:0,0,e.DisplayOrder??0,a,i,i,0]):this.client.executeUpdate(ii.UPDATE,[e.Label,e.FieldType,e.IsHidden?1:0,e.DisplayOrder??0,i,e.FieldKey]),e.FieldKey}async trackFieldHistory(e,a,i){const s=this.client.executeQuery(ur.GET_FOR_HISTORY,[e]),c={};for(const d of s)c[d.FieldKey]||(c[d.FieldKey]=[]),c[d.FieldKey].push(d.Value);for(const d of a){if(!d.EnableHistory)continue;const m=c[d.FieldKey]||[],g=(Array.isArray(d.Value)?d.Value:[d.Value]).filter(p=>p&&p.trim()!=="");if((m.length!==g.length||!m.every((p,C)=>p===g[C]))&&g.length>0){const p=this.generateId(),C=JSON.stringify(g);this.client.executeUpdate(Sr.INSERT,[p,e,null,d.FieldKey,C,i,i,i,0]),await this.pruneFieldHistory(e,d.FieldKey,i)}}}async pruneFieldHistory(e,a,i){const s=this.client.executeQuery(Sr.GET_FOR_PRUNING,[e,a]);if(s.length>zg){const d=s.slice(zg).map(m=>m.Id);d.length>0&&this.client.executeUpdate(Sr.softDeleteOld(d.length),[i,...d])}}insertTotpCodes(e,a,i){for(const s of a)this.client.executeUpdate(`INSERT INTO TotpCodes (Id, Name, SecretKey, ItemId, CreatedAt, UpdatedAt, IsDeleted)
         VALUES (?, ?, ?, ?, ?, ?, ?)`,[s.Id||this.generateId(),s.Name,s.SecretKey,e,i,i,0])}handleTotpCodes(e,a,i,s){const c=this.client.executeQuery("SELECT Id, Name, SecretKey FROM TotpCodes WHERE ItemId = ? AND IsDeleted = 0",[e]),d=new Map(c.map(m=>[m.Id,m]));for(const m of a){const f=i.includes(m.Id);if(m.IsDeleted)f&&this.client.executeUpdate("UPDATE TotpCodes SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?",[s,m.Id]);else if(f){const g=d.get(m.Id);g&&(g.Name!==m.Name||g.SecretKey!==m.SecretKey)&&this.client.executeUpdate("UPDATE TotpCodes SET Name = ?, SecretKey = ?, UpdatedAt = ? WHERE Id = ?",[m.Name,m.SecretKey,s,m.Id])}else this.client.executeUpdate(`INSERT INTO TotpCodes (Id, Name, SecretKey, ItemId, CreatedAt, UpdatedAt, IsDeleted)
           VALUES (?, ?, ?, ?, ?, ?, ?)`,[m.Id||this.generateId(),m.Name,m.SecretKey,e,s,s,0])}}insertAttachments(e,a,i){for(const s of a){const c=s.Blob instanceof Uint8Array?s.Blob:new Uint8Array(s.Blob);this.client.executeUpdate(`INSERT INTO Attachments (Id, Filename, Blob, ItemId, CreatedAt, UpdatedAt, IsDeleted)
         VALUES (?, ?, ?, ?, ?, ?, ?)`,[s.Id||this.generateId(),s.Filename,c,e,i,i,0])}}handleAttachments(e,a,i,s){const c=new Set(a.map(d=>d.Id));for(const d of i)c.has(d)||this.client.executeUpdate("UPDATE Attachments SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?",[s,d]);for(const d of a){const m=i.includes(d.Id);if(d.IsDeleted)m&&this.client.executeUpdate("UPDATE Attachments SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?",[s,d.Id]);else if(!m){const f=d.Blob instanceof Uint8Array?d.Blob:new Uint8Array(d.Blob);this.client.executeUpdate(`INSERT INTO Attachments (Id, Filename, Blob, ItemId, CreatedAt, UpdatedAt, IsDeleted)
           VALUES (?, ?, ?, ?, ?, ?, ?)`,[d.Id||this.generateId(),d.Filename,f,e,s,s,0])}}}}const As={GET_BY_RP_ID:`
    SELECT
      p.Id,
      p.ItemId,
      p.RpId,
      p.UserHandle,
      p.PublicKey,
      p.PrivateKey,
      p.DisplayName,
      p.PrfKey,
      p.AdditionalData,
      p.CreatedAt,
      p.UpdatedAt,
      p.IsDeleted,
      i.Name as ServiceName,
      (SELECT fv.Value FROM FieldValues fv WHERE fv.ItemId = i.Id AND fv.FieldKey = '${en.LoginUsername}' AND fv.IsDeleted = 0 LIMIT 1) as Username
    FROM Passkeys p
    INNER JOIN Items i ON p.ItemId = i.Id
    WHERE p.RpId = ? AND p.IsDeleted = 0
      AND i.IsDeleted = 0 AND i.DeletedAt IS NULL
    ORDER BY p.CreatedAt DESC`,GET_BY_ID_WITH_ITEM:`
    SELECT
      p.Id,
      p.ItemId,
      p.RpId,
      p.UserHandle,
      p.PublicKey,
      p.PrivateKey,
      p.DisplayName,
      p.PrfKey,
      p.AdditionalData,
      p.CreatedAt,
      p.UpdatedAt,
      p.IsDeleted,
      i.Name as ServiceName,
      (SELECT fv.Value FROM FieldValues fv WHERE fv.ItemId = i.Id AND fv.FieldKey = '${en.LoginUsername}' AND fv.IsDeleted = 0 LIMIT 1) as Username
    FROM Passkeys p
    INNER JOIN Items i ON p.ItemId = i.Id
    WHERE p.Id = ? AND p.IsDeleted = 0
      AND i.IsDeleted = 0 AND i.DeletedAt IS NULL`,GET_BY_ITEM_ID:`
    SELECT
      p.Id,
      p.ItemId,
      p.RpId,
      p.UserHandle,
      p.PublicKey,
      p.PrivateKey,
      p.DisplayName,
      p.PrfKey,
      p.AdditionalData,
      p.CreatedAt,
      p.UpdatedAt,
      p.IsDeleted
    FROM Passkeys p
    WHERE p.ItemId = ? AND p.IsDeleted = 0
    ORDER BY p.CreatedAt DESC`,INSERT:`
    INSERT INTO Passkeys (
      Id, ItemId, RpId, UserHandle, PublicKey, PrivateKey,
      PrfKey, DisplayName, AdditionalData, CreatedAt, UpdatedAt, IsDeleted
    )
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,UPDATE_DISPLAY_NAME:`
    UPDATE Passkeys
    SET DisplayName = ?,
        UpdatedAt = ?
    WHERE Id = ?`,SOFT_DELETE:`
    UPDATE Passkeys
    SET IsDeleted = 1,
        UpdatedAt = ?
    WHERE Id = ?`,SOFT_DELETE_BY_ITEM:`
    UPDATE Passkeys
    SET IsDeleted = 1,
        UpdatedAt = ?
    WHERE ItemId = ?`};class mL extends tc{getByRpId(e){const a=this.client.executeQuery(As.GET_BY_RP_ID,[e]);return Vg.mapRowsWithItem(a)}getById(e){const a=this.client.executeQuery(As.GET_BY_ID_WITH_ITEM,[e]);return a.length===0?null:Vg.mapRowWithItem(a[0])}getByItemId(e){const a=this.client.executeQuery(As.GET_BY_ITEM_ID,[e]);return Vg.mapRows(a)}async create(e){return this.withTransaction(async()=>{const a=this.now();let i=null;e.PrfKey&&(i=e.PrfKey instanceof Uint8Array?e.PrfKey:new Uint8Array(e.PrfKey));let s=null;e.UserHandle&&(s=e.UserHandle instanceof Uint8Array?e.UserHandle:new Uint8Array(e.UserHandle)),this.client.executeUpdate(As.INSERT,[e.Id,e.ItemId,e.RpId,s,e.PublicKey,e.PrivateKey,i,e.DisplayName,e.AdditionalData??null,a,a,0])})}async deleteById(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(As.SOFT_DELETE,[a,e])})}async deleteByItemId(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(As.SOFT_DELETE_BY_ITEM,[a,e])})}async updateDisplayName(e,a){return this.withTransaction(async()=>{const i=this.now();return this.client.executeUpdate(As.UPDATE_DISPLAY_NAME,[a,i,e])})}}const ti={GET_ALL:`
    SELECT Id, Name, ParentFolderId, Weight
    FROM Folders
    WHERE IsDeleted = 0
    ORDER BY Weight, Name`,GET_BY_ID:`
    SELECT Id, Name, ParentFolderId
    FROM Folders
    WHERE Id = ? AND IsDeleted = 0`,INSERT:`
    INSERT INTO Folders (Id, Name, ParentFolderId, Weight, IsDeleted, CreatedAt, UpdatedAt)
    VALUES (?, ?, ?, 0, 0, ?, ?)`,UPDATE_NAME:`
    UPDATE Folders
    SET Name = ?,
        UpdatedAt = ?
    WHERE Id = ?`,SOFT_DELETE:`
    UPDATE Folders
    SET IsDeleted = 1,
        UpdatedAt = ?
    WHERE Id = ?`,CLEAR_ITEMS_FOLDER:`
    UPDATE Items
    SET FolderId = NULL,
        UpdatedAt = ?
    WHERE FolderId = ?`,TRASH_ITEMS_IN_FOLDER:`
    UPDATE Items
    SET DeletedAt = ?,
        UpdatedAt = ?,
        FolderId = NULL
    WHERE FolderId = ? AND IsDeleted = 0 AND DeletedAt IS NULL`,MOVE_ITEM:`
    UPDATE Items
    SET FolderId = ?,
        UpdatedAt = ?
    WHERE Id = ?`};class gL extends tc{async create(e,a){return this.withTransaction(async()=>{const i=crypto.randomUUID().toUpperCase(),s=this.now();return this.client.executeUpdate(ti.INSERT,[i,e,a||null,s,s]),i})}getAll(){try{return this.client.executeQuery(ti.GET_ALL)}catch(e){if(e instanceof Error&&e.message.includes("no such table"))return[];throw e}}getById(e){const a=this.client.executeQuery(ti.GET_BY_ID,[e]);return a.length>0?a[0]:null}async update(e,a){return this.withTransaction(async()=>{const i=this.now();return this.client.executeUpdate(ti.UPDATE_NAME,[a,i,e])})}async delete(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(ti.CLEAR_ITEMS_FOLDER,[a,e]),this.client.executeUpdate(ti.SOFT_DELETE,[a,e])})}async deleteWithContents(e){return this.withTransaction(async()=>{const a=this.now(),i=this.client.executeUpdate(ti.TRASH_ITEMS_IN_FOLDER,[a,a,e]);return this.client.executeUpdate(ti.SOFT_DELETE,[a,e]),i})}async moveItem(e,a){return this.withTransaction(async()=>{const i=this.now();return this.client.executeUpdate(ti.MOVE_ITEM,[a,i,e])})}}const Eu={GET_SETTING:`
    SELECT s.Value
    FROM Settings s
    WHERE s.Key = ?`,GET_ENCRYPTION_KEYS:`
    SELECT
      x.PublicKey,
      x.PrivateKey,
      x.IsPrimary
    FROM EncryptionKeys x`,GET_TOTP_FOR_ITEM:`
    SELECT
      Id,
      Name,
      SecretKey,
      ItemId
    FROM TotpCodes
    WHERE ItemId = ? AND IsDeleted = 0`,GET_ATTACHMENTS_FOR_ITEM:`
    SELECT
      Id,
      Filename,
      Blob,
      ItemId,
      CreatedAt,
      UpdatedAt,
      IsDeleted
    FROM Attachments
    WHERE ItemId = ? AND IsDeleted = 0`};class fL extends tc{getSetting(e,a=""){const i=this.client.executeQuery(Eu.GET_SETTING,[e]);return i.length>0?i[0].Value:a}getDefaultIdentityLanguage(){return this.getSetting("DefaultIdentityLanguage")}getDefaultIdentityGender(){return this.getSetting("DefaultIdentityGender","random")}getDefaultIdentityAgeRange(){return this.getSetting("DefaultIdentityAgeRange","random")}getPasswordSettings(){const e=this.getSetting("PasswordGenerationSettings"),a={Length:18,UseLowercase:!0,UseUppercase:!0,UseNumbers:!0,UseSpecialChars:!0,UseNonAmbiguousChars:!1};try{if(e)return{...a,...JSON.parse(e)}}catch(i){console.warn("Failed to parse password settings:",i)}return a}getAllEncryptionKeys(){return this.client.executeQuery(Eu.GET_ENCRYPTION_KEYS)}getTotpCodesForItem(e){try{return this.tableExists("TotpCodes")?this.client.executeQuery(Eu.GET_TOTP_FOR_ITEM,[e]):[]}catch(a){return console.error("Error getting TOTP codes for item:",a),[]}}getAttachmentsForItem(e){try{return this.tableExists("Attachments")?this.client.executeQuery(Eu.GET_ATTACHMENTS_FOR_ITEM,[e]):[]}catch(a){return console.error("Error getting attachments for item:",a),[]}}getDefaultEmailDomain(){return this.getSetting("DefaultEmailDomain")}getEffectiveIdentityLanguage(){const e=this.getDefaultIdentityLanguage();return e||navigator.language.substring(0,2)}getCredentialsSortOrder(){const e=this.getSetting("CredentialsSortOrder","OldestFirst");return e==="OldestFirst"||e==="NewestFirst"||e==="Alphabetical"?e:"OldestFirst"}updateSetting(e,a){var d;const i=this.now();((d=this.client.executeQuery("SELECT COUNT(*) as count FROM Settings WHERE Key = ?",[e])[0])==null?void 0:d.count)>0?this.client.executeUpdate("UPDATE Settings SET Value = ?, UpdatedAt = ? WHERE Key = ?",[a,i,e]):this.client.executeUpdate("INSERT INTO Settings (Key, Value, CreatedAt, UpdatedAt, IsDeleted) VALUES (?, ?, ?, ?, ?)",[e,a,i,i,0])}setCredentialsSortOrder(e){this.updateSetting("CredentialsSortOrder",e)}}const Cl={GET_ID_FOR_SOURCE:`
    SELECT Id FROM Logos
    WHERE Source = ? AND IsDeleted = 0
    LIMIT 1`,INSERT:`
    INSERT INTO Logos (Id, Source, FileData, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?)`,COUNT_USAGE:`
    SELECT COUNT(*) as count FROM Items
    WHERE LogoId = ? AND IsDeleted = 0`,HARD_DELETE:`
    DELETE FROM Logos WHERE Id = ?`};class hL extends tc{hasLogoForSource(e){return this.client.executeQuery(Cl.GET_ID_FOR_SOURCE,[e]).length>0}getIdForSource(e){const a=this.client.executeQuery(Cl.GET_ID_FOR_SOURCE,[e]);return a.length>0?a[0].Id:null}getOrCreate(e,a,i){const s=this.getIdForSource(e);if(s)return s;const c=this.generateId();return this.client.executeUpdate(Cl.INSERT,[c,e,a,i,i,0]),c}cleanupOrphanedLogo(e){const a=this.client.executeQuery(Cl.COUNT_USAGE,[e]);(a.length>0?a[0].count:0)===0&&(this.client.executeUpdate(Cl.HARD_DELETE,[e]),console.debug(`[LogoRepository] Deleted orphaned logo: ${e}`))}extractSourceFromUrl(e){if(!e)return"unknown";try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname.toLowerCase().replace(/^www\./,"")}catch{return"unknown"}}convertLogoToUint8Array(e){if(!e)return null;try{if(typeof e=="object"&&!ArrayBuffer.isView(e)&&!Array.isArray(e)){const a=Object.values(e);return new Uint8Array(a)}if(Array.isArray(e)||e instanceof ArrayBuffer||e instanceof Uint8Array)return new Uint8Array(e)}catch(a){console.warn("Failed to convert logo to Uint8Array:",a)}return null}}class Kf{constructor(){qe(this,"db",null);qe(this,"isInTransaction",!1);qe(this,"_items",null);qe(this,"_passkeys",null);qe(this,"_folders",null);qe(this,"_settings",null);qe(this,"_logos",null)}get items(){return this._items||(this._items=new dL(this,this.logos)),this._items}get passkeys(){return this._passkeys||(this._passkeys=new mL(this)),this._passkeys}get folders(){return this._folders||(this._folders=new gL(this)),this._folders}get settings(){return this._settings||(this._settings=new fL(this)),this._settings}get logos(){return this._logos||(this._logos=new hL(this)),this._logos}getDb(){return this.db}async initializeFromBase64(e){try{const a=atob(e),i=new Uint8Array(a.length);for(let c=0;c<a.length;c++)i[c]=a.charCodeAt(c);const s=await hx({locateFile:c=>`src/${c}`});this.db=new s.Database(i),this._items=null,this._passkeys=null,this._folders=null,this._settings=null,this._logos=null}catch(a){throw console.error("Error initializing SQLite database:",a),a}}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(e){throw console.error("Error beginning transaction:",e),e}}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(e){throw console.error("Error committing transaction:",e),e}}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(e){throw console.error("Error rolling back transaction:",e),e}}exportToBase64(){if(!this.db)throw new Error("Database not initialized");try{this.db.run("VACUUM");const e=this.db.export();let a="";for(let i=0;i<e.length;i++)a+=String.fromCharCode(e[i]);return btoa(a)}catch(e){throw console.error("Error exporting SQLite database:",e),e}}executeQuery(e,a=[]){if(!this.db)throw new Error("Database not initialized");try{const i=this.db.prepare(e);i.bind(a);const s=[];for(;i.step();)s.push(i.getAsObject());return i.free(),s}catch(i){throw console.error("Error executing query:",i),i}}executeUpdate(e,a=[]){if(!this.db)throw new Error("Database not initialized");try{const i=this.db.prepare(e);i.bind(a),i.step();const s=this.db.getRowsModified();return i.free(),s}catch(i){throw console.error("Error executing update:",i),i}}executeRaw(e){if(!this.db)throw new Error("Database not initialized");try{const a=e.split(";");for(const i of a){const s=i.trim();s.length===0||s.toUpperCase().startsWith("BEGIN TRANSACTION")||s.toUpperCase().startsWith("COMMIT")||s.toUpperCase().startsWith("ROLLBACK")||this.db.run(s)}}catch(a){throw console.error("Error executing raw SQL:",a),a}}close(){this.db&&(this.db.close(),this.db=null)}async getDatabaseVersion(){if(!this.db)throw new Error("Database not initialized");try{const e=this.executeQuery(`
        SELECT MigrationId
        FROM __EFMigrationsHistory
        ORDER BY MigrationId DESC
        LIMIT 1`);if(e.length===0)throw new Error("No migrations found in the database.");const a=e[0].MigrationId,i=px(a);if(!i)throw new Error("Could not extract version from migration ID");const s=Ax(i);if(!s.isCompatible){const m=await iL("common.errors.browserExtensionOutdated");throw new Yl(m)}if(s.isKnownVersion&&s.clientVersion)return s.clientVersion;const d=new Gf().getLatestVersion();return{revision:d.revision,version:i,description:`Unknown version ${i} (backwards compatible)`,releaseVersion:d.releaseVersion,compatibleUpToVersion:d.compatibleUpToVersion}}catch(e){throw console.error("Error getting database version:",e),e}}async getLatestDatabaseVersion(){const a=new Gf().getAllVersions();return a[a.length-1]}async hasPendingMigrations(){try{const e=await this.getDatabaseVersion(),a=await this.getLatestDatabaseVersion();return e.revision<a.revision}catch(e){throw console.error("Error checking pending migrations:",e),e}}static imgSrcFromBytes(e){if(!e||Array.isArray(e)&&e.length===0||e instanceof Uint8Array&&e.length===0)return null;try{const a=this.toUint8Array(e),i=this.base64Encode(a);return i?`data:${this.detectMimeType(a)};base64,${i}`:null}catch(a){return console.error("Error setting logo:",a),null}}static extractSourceFromUrl(e){if(!e)return"unknown";try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname.toLowerCase().replace(/^www\./,"")}catch{return"unknown"}}static detectMimeType(e){const a=()=>{const c=new TextDecoder().decode(e.slice(0,5)).toLowerCase();return c.includes("<?xml")||c.includes("<svg")},i=()=>e[0]===0&&e[1]===0&&e[2]===1&&e[3]===0,s=()=>e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71;return a()?"image/svg+xml":i()?"image/x-icon":s()?"image/png":"image/x-icon"}static toUint8Array(e){if(e instanceof Uint8Array)return e;if(Array.isArray(e))return new Uint8Array(e);const a=Object.keys(e).length,i=new Uint8Array(a);for(let s=0;s<a;s++)i[s]=e[s];return i}static base64Encode(e){try{const a=Array.from(this.toUint8Array(e));return btoa(a.reduce((i,s)=>i+String.fromCharCode(s),""))}catch(a){return console.error("Error encoding to base64:",a),null}}}const Ry={"local:publicEmailDomains":"session:publicEmailDomains","local:privateEmailDomains":"session:privateEmailDomains","local:hiddenPrivateEmailDomains":"session:hiddenPrivateEmailDomains","local:encryptionKeyDerivationParams":"session:encryptionKeyDerivationParams"};async function zl(n){let e=await Se.getItem(n);if(e===null&&n in Ry){const a=Ry[n];e=await Se.getItem(a),e!==null&&(await Se.setItem(n,e),await Se.removeItem(a))}return e}const Yb=I.createContext(void 0),AL=({children:n})=>{const[e,a]=I.useState(null),[i,s]=I.useState(!1),[c,d]=I.useState(!1),[m,f]=I.useState(!1),g=I.useRef(!1),[E,p]=I.useState(!1),[C,N]=I.useState(!1),[x,S]=I.useState(0),T=I.useCallback(()=>E||C,[E,C]),k=I.useCallback(async $=>{g.current=$,f($),await Se.setItem("local:isOfflineMode",$)},[]);I.useEffect(()=>{(async()=>{const[J,re,Ae]=await Promise.all([Se.getItem("local:isOfflineMode"),Se.getItem("local:isDirty"),Se.getItem("local:serverRevision")]);g.current=J??!1,f(J??!1),p(re??!1),S(Ae??0)})()},[]);const U=I.useCallback(async $=>{const J=new Kf;return await J.initializeFromBase64($),a(J),s(!0),d(!0),J},[]),R=I.useCallback(async()=>{try{const $=await Bt("GET_VAULT",{},"background");if(!($!=null&&$.success)&&($!=null&&$.error))throw new Error($.error);if($!=null&&$.vault){const J=new Kf;return await J.initializeFromBase64($.vault),a(J),s(!0),d(!0),J}else return s(!0),d(!1),null}catch($){throw console.error("Error retrieving vault from background:",$),s(!0),d(!1),$}},[]),P=I.useCallback(async()=>{try{const $=await zl("local:publicEmailDomains"),J=await zl("local:privateEmailDomains"),re=await zl("local:hiddenPrivateEmailDomains"),Ae=await Se.getItem("local:serverRevision");return!$&&!J?null:{publicEmailDomains:$??[],privateEmailDomains:J??[],hiddenPrivateEmailDomains:re??[],serverRevision:Ae??0}}catch($){return console.error("Error getting vault metadata from local storage:",$),null}},[]),M=I.useCallback(async()=>{const[$,J]=await Promise.all([Se.getItem("local:isDirty"),Se.getItem("local:serverRevision")]);p($??!1),S(J??0)},[]),j=I.useCallback(async()=>e?await e.hasPendingMigrations():!1,[e]);I.useEffect(()=>{i||R()},[i,R]);const Q=I.useCallback(async $=>{await Bt("STORE_ENCRYPTION_KEY",$,"background")},[]),H=I.useCallback(async $=>{await Bt("STORE_ENCRYPTION_KEY_DERIVATION_PARAMS",$,"background")},[]),V=I.useCallback(()=>{a(null),s(!1),d(!1)},[]),G=I.useCallback(()=>g.current,[]),K=I.useMemo(()=>({sqliteClient:e,dbInitialized:i,dbAvailable:c,isOffline:m,getIsOffline:G,isDirty:E,isSyncing:C,serverRevision:x,setIsOffline:k,setIsSyncing:N,shouldSuppressEmailErrors:T,loadDatabase:U,loadStoredDatabase:R,storeEncryptionKey:Q,storeEncryptionKeyDerivationParams:H,clearDatabase:V,getVaultMetadata:P,refreshSyncState:M,hasPendingMigrations:j}),[e,i,c,m,G,E,C,x,k,T,U,R,Q,H,V,P,M,j]);return l.jsx(Yb.Provider,{value:K,children:n})},Kt=()=>{const n=I.useContext(Yb);if(n===void 0)throw new Error("useDb must be used within a DbProvider");return n},It={DISABLED_SITES:"local:aliasvault_disabled_sites",TEMPORARY_DISABLED_SITES:"local:aliasvault_temporary_disabled_sites",PASSKEY_DISABLED_SITES:"local:aliasvault_passkey_disabled_sites",GLOBAL_AUTOFILL_POPUP_ENABLED:"local:aliasvault_global_autofill_popup_enabled",GLOBAL_CONTEXT_MENU_ENABLED:"local:aliasvault_global_context_menu_enabled",PASSKEY_PROVIDER_ENABLED:"local:aliasvault_passkey_provider_enabled",CLIPBOARD_CLEAR_TIMEOUT:"local:aliasvault_clipboard_clear_timeout",AUTO_LOCK_TIMEOUT:"local:aliasvault_auto_lock_timeout",VAULT_LOCKED_DISMISS_UNTIL:"local:aliasvault_vault_locked_dismiss_until",AUTOFILL_MATCHING_MODE:"local:aliasvault_autofill_matching_mode",CUSTOM_EMAIL_HISTORY:"local:aliasvault_custom_email_history",CUSTOM_USERNAME_HISTORY:"local:aliasvault_custom_username_history",SHOW_FOLDERS:"local:aliasvault_show_folders",PENDING_REDIRECT_URL:"session:pendingRedirectUrl",SKIP_FORM_RESTORE:"local:aliasvault_skip_form_restore"};var Ol=(n=>(n.DEFAULT="default",n.URL_SUBDOMAIN="url_subdomain",n.URL_EXACT="url_exact",n))(Ol||{});const bt={async getShowFolders(){return await Se.getItem(It.SHOW_FOLDERS)??!0},async setShowFolders(n){await Se.setItem(It.SHOW_FOLDERS,n)},async getGlobalAutofillPopupEnabled(){return await Se.getItem(It.GLOBAL_AUTOFILL_POPUP_ENABLED)!==!1},async setGlobalAutofillPopupEnabled(n){await Se.setItem(It.GLOBAL_AUTOFILL_POPUP_ENABLED,n)},async getAutofillMatchingMode(){return await Se.getItem(It.AUTOFILL_MATCHING_MODE)??"default"},async setAutofillMatchingMode(n){await Se.setItem(It.AUTOFILL_MATCHING_MODE,n)},async getDisabledSites(){return await Se.getItem(It.DISABLED_SITES)??[]},async setDisabledSites(n){await Se.setItem(It.DISABLED_SITES,n)},async getTemporaryDisabledSites(){return await Se.getItem(It.TEMPORARY_DISABLED_SITES)??{}},async setTemporaryDisabledSites(n){await Se.setItem(It.TEMPORARY_DISABLED_SITES,n)},async getGlobalContextMenuEnabled(){return await Se.getItem(It.GLOBAL_CONTEXT_MENU_ENABLED)!==!1},async setGlobalContextMenuEnabled(n){await Se.setItem(It.GLOBAL_CONTEXT_MENU_ENABLED,n)},async getPasskeyProviderEnabled(){return await Se.getItem(It.PASSKEY_PROVIDER_ENABLED)!==!1},async setPasskeyProviderEnabled(n){await Se.setItem(It.PASSKEY_PROVIDER_ENABLED,n)},async getPasskeyDisabledSites(){return await Se.getItem(It.PASSKEY_DISABLED_SITES)??[]},async setPasskeyDisabledSites(n){await Se.setItem(It.PASSKEY_DISABLED_SITES,n)},async getClipboardClearTimeout(){return await Se.getItem(It.CLIPBOARD_CLEAR_TIMEOUT)??10},async setClipboardClearTimeout(n){await Se.setItem(It.CLIPBOARD_CLEAR_TIMEOUT,n)},async getAutoLockTimeout(){return await Se.getItem(It.AUTO_LOCK_TIMEOUT)??0},async setAutoLockTimeout(n){await Se.setItem(It.AUTO_LOCK_TIMEOUT,n)},async getVaultLockedDismissUntil(){return await Se.getItem(It.VAULT_LOCKED_DISMISS_UNTIL)??0},async setVaultLockedDismissUntil(n){await Se.setItem(It.VAULT_LOCKED_DISMISS_UNTIL,n)},async getCustomEmailHistory(){return await Se.getItem(It.CUSTOM_EMAIL_HISTORY)??[]},async setCustomEmailHistory(n){await Se.setItem(It.CUSTOM_EMAIL_HISTORY,n)},async getCustomUsernameHistory(){return await Se.getItem(It.CUSTOM_USERNAME_HISTORY)??[]},async setCustomUsernameHistory(n){await Se.setItem(It.CUSTOM_USERNAME_HISTORY,n)},async clearUiPreferences(){await Se.removeItem(It.SHOW_FOLDERS)},async resetAllSiteSettings(){await Se.setItem(It.DISABLED_SITES,[]),await Se.setItem(It.TEMPORARY_DISABLED_SITES,{}),await Se.setItem(It.PASSKEY_DISABLED_SITES,[])},async clearAll(){await Promise.all([Se.removeItem(It.SHOW_FOLDERS),Se.removeItem(It.DISABLED_SITES),Se.removeItem(It.TEMPORARY_DISABLED_SITES),Se.removeItem(It.PASSKEY_DISABLED_SITES),Se.removeItem(It.VAULT_LOCKED_DISMISS_UNTIL),Se.removeItem(It.CUSTOM_EMAIL_HISTORY),Se.removeItem(It.CUSTOM_USERNAME_HISTORY)])},async getPendingRedirectUrl(){return await Se.getItem(It.PENDING_REDIRECT_URL)??null},async setPendingRedirectUrl(n){n===null?await Se.removeItem(It.PENDING_REDIRECT_URL):await Se.setItem(It.PENDING_REDIRECT_URL,n)},async getSkipFormRestore(){return await Se.getItem(It.SKIP_FORM_RESTORE)??!1},async setSkipFormRestore(n){await Se.setItem(It.SKIP_FORM_RESTORE,n)}};var Fu={exports:{}},pL=Fu.exports,Dy;function yL(){return Dy||(Dy=1,function(n,e){(function(a,i){n.exports=i()})(pL,function(){return(()=>{var a,i,s={773:(m,f,g)=>{var E,p=typeof self<"u"&&self.Module!==void 0?self.Module:{},C={};for(E in p)p.hasOwnProperty(E)&&(C[E]=p[E]);var N,x,S,T;N=typeof window=="object",x=typeof importScripts=="function",S=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",T=!N&&!S&&!x;var k,U,R,P,M,j="";S?(j=x?g(967).dirname(j)+"/":"//",k=function(Ne,se){return P||(P=g(145)),M||(M=g(967)),Ne=M.normalize(Ne),P.readFileSync(Ne,se?null:"utf8")},R=function(Ne){var se=k(Ne,!0);return se.buffer||(se=new Uint8Array(se)),K(se.buffer),se},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),m.exports=p,process.on("uncaughtException",function(Ne){if(!(Ne instanceof nt))throw Ne}),process.on("unhandledRejection",ee),p.inspect=function(){return"[Emscripten Module object]"}):T?(typeof read<"u"&&(k=function(Ne){return read(Ne)}),R=function(Ne){var se;return typeof readbuffer=="function"?new Uint8Array(readbuffer(Ne)):(K(typeof(se=read(Ne,"binary"))=="object"),se)},typeof scriptArgs<"u"&&scriptArgs,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(N||x)&&(x?j=self.location.href:typeof document<"u"&&document.currentScript&&(j=document.currentScript.src),j=j.indexOf("blob:")!==0?j.substr(0,j.lastIndexOf("/")+1):"",k=function(Ne){var se=new XMLHttpRequest;return se.open("GET",Ne,!1),se.send(null),se.responseText},x&&(R=function(Ne){var se=new XMLHttpRequest;return se.open("GET",Ne,!1),se.responseType="arraybuffer",se.send(null),new Uint8Array(se.response)}),U=function(Ne,se,De){var je=new XMLHttpRequest;je.open("GET",Ne,!0),je.responseType="arraybuffer",je.onload=function(){je.status==200||je.status==0&&je.response?se(je.response):De()},je.onerror=De,je.send(null)}),p.print||console.log.bind(console);var Q,H,V=p.printErr||console.warn.bind(console);for(E in C)C.hasOwnProperty(E)&&(p[E]=C[E]);C=null,p.arguments&&p.arguments,p.thisProgram&&p.thisProgram,p.quit&&p.quit,p.wasmBinary&&(Q=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&ee("no native wasm support detected");var G=!1;function K(Ne,se){Ne||ee("Assertion failed: "+se)}var $,J,re=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Ae(Ne){$=Ne,p.HEAP8=new Int8Array(Ne),p.HEAP16=new Int16Array(Ne),p.HEAP32=new Int32Array(Ne),p.HEAPU8=J=new Uint8Array(Ne),p.HEAPU16=new Uint16Array(Ne),p.HEAPU32=new Uint32Array(Ne),p.HEAPF32=new Float32Array(Ne),p.HEAPF64=new Float64Array(Ne)}p.INITIAL_MEMORY;var X,ie=[],ce=[],ye=[],_=0,q=null;function ee(Ne){throw p.onAbort&&p.onAbort(Ne),V(Ne+=""),G=!0,Ne="abort("+Ne+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(Ne)}function ne(Ne){return Ne.startsWith("data:application/octet-stream;base64,")}function Ie(Ne){return Ne.startsWith("file://")}p.preloadedImages={},p.preloadedAudios={};var we,Re="argon2.wasm";function Be(Ne){try{if(Ne==Re&&Q)return new Uint8Array(Q);if(R)return R(Ne);throw"both async and sync fetching of the wasm failed"}catch(se){ee(se)}}function xe(Ne){for(;Ne.length>0;){var se=Ne.shift();if(typeof se!="function"){var De=se.func;typeof De=="number"?se.arg===void 0?X.get(De)():X.get(De)(se.arg):De(se.arg===void 0?null:se.arg)}else se(p)}}function ze(Ne){try{return H.grow(Ne-$.byteLength+65535>>>16),Ae(H.buffer),1}catch{}}ne(Re)||(we=Re,Re=p.locateFile?p.locateFile(we,j):j+we);var At,Lt={a:function(Ne,se,De){J.copyWithin(Ne,se,se+De)},b:function(Ne){var se,De=J.length,je=2147418112;if((Ne>>>=0)>je)return!1;for(var Qe=1;Qe<=4;Qe*=2){var Ye=De*(1+.2/Qe);if(Ye=Math.min(Ye,Ne+100663296),ze(Math.min(je,((se=Math.max(Ne,Ye))%65536>0&&(se+=65536-se%65536),se))))return!0}return!1}},Ut=(function(){var Ne={a:Lt};function se(Qe,Ye){var ut,Mt=Qe.exports;p.asm=Mt,Ae((H=p.asm.c).buffer),X=p.asm.k,ut=p.asm.d,ce.unshift(ut),function(jt){if(_--,p.monitorRunDependencies&&p.monitorRunDependencies(_),_==0&&q){var Vt=q;q=null,Vt()}}()}function De(Qe){se(Qe.instance)}function je(Qe){return function(){if(!Q&&(N||x)){if(typeof fetch=="function"&&!Ie(Re))return fetch(Re,{credentials:"same-origin"}).then(function(Ye){if(!Ye.ok)throw"failed to load wasm binary file at '"+Re+"'";return Ye.arrayBuffer()}).catch(function(){return Be(Re)});if(U)return new Promise(function(Ye,ut){U(Re,function(Mt){Ye(new Uint8Array(Mt))},ut)})}return Promise.resolve().then(function(){return Be(Re)})}().then(function(Ye){return WebAssembly.instantiate(Ye,Ne)}).then(Qe,function(Ye){V("failed to asynchronously prepare wasm: "+Ye),ee(Ye)})}if(_++,p.monitorRunDependencies&&p.monitorRunDependencies(_),p.instantiateWasm)try{return p.instantiateWasm(Ne,se)}catch(Qe){return V("Module.instantiateWasm callback failed with error: "+Qe),!1}Q||typeof WebAssembly.instantiateStreaming!="function"||ne(Re)||Ie(Re)||typeof fetch!="function"?je(De):fetch(Re,{credentials:"same-origin"}).then(function(Qe){return WebAssembly.instantiateStreaming(Qe,Ne).then(De,function(Ye){return V("wasm streaming compile failed: "+Ye),V("falling back to ArrayBuffer instantiation"),je(De)})})}(),p.___wasm_call_ctors=function(){return(p.___wasm_call_ctors=p.asm.d).apply(null,arguments)},p._argon2_hash=function(){return(p._argon2_hash=p.asm.e).apply(null,arguments)},p._malloc=function(){return(Ut=p._malloc=p.asm.f).apply(null,arguments)}),et=(p._free=function(){return(p._free=p.asm.g).apply(null,arguments)},p._argon2_verify=function(){return(p._argon2_verify=p.asm.h).apply(null,arguments)},p._argon2_error_message=function(){return(p._argon2_error_message=p.asm.i).apply(null,arguments)},p._argon2_encodedlen=function(){return(p._argon2_encodedlen=p.asm.j).apply(null,arguments)},p._argon2_hash_ext=function(){return(p._argon2_hash_ext=p.asm.l).apply(null,arguments)},p._argon2_verify_ext=function(){return(p._argon2_verify_ext=p.asm.m).apply(null,arguments)},p.stackAlloc=function(){return(et=p.stackAlloc=p.asm.n).apply(null,arguments)});function nt(Ne){this.name="ExitStatus",this.message="Program terminated with exit("+Ne+")",this.status=Ne}function Pt(Ne){function se(){At||(At=!0,p.calledRun=!0,G||(xe(ce),p.onRuntimeInitialized&&p.onRuntimeInitialized(),function(){if(p.postRun)for(typeof p.postRun=="function"&&(p.postRun=[p.postRun]);p.postRun.length;)De=p.postRun.shift(),ye.unshift(De);var De;xe(ye)}()))}_>0||(function(){if(p.preRun)for(typeof p.preRun=="function"&&(p.preRun=[p.preRun]);p.preRun.length;)De=p.preRun.shift(),ie.unshift(De);var De;xe(ie)}(),_>0||(p.setStatus?(p.setStatus("Running..."),setTimeout(function(){setTimeout(function(){p.setStatus("")},1),se()},1)):se()))}if(p.allocate=function(Ne,se){var De;return De=se==1?et(Ne.length):Ut(Ne.length),Ne.subarray||Ne.slice?J.set(Ne,De):J.set(new Uint8Array(Ne),De),De},p.UTF8ToString=function(Ne,se){return Ne?function(De,je,Qe){for(var Ye=je+Qe,ut=je;De[ut]&&!(ut>=Ye);)++ut;if(ut-je>16&&De.subarray&&re)return re.decode(De.subarray(je,ut));for(var Mt="";je<ut;){var jt=De[je++];if(128&jt){var Vt=63&De[je++];if((224&jt)!=192){var ia=63&De[je++];if((jt=(240&jt)==224?(15&jt)<<12|Vt<<6|ia:(7&jt)<<18|Vt<<12|ia<<6|63&De[je++])<65536)Mt+=String.fromCharCode(jt);else{var B=jt-65536;Mt+=String.fromCharCode(55296|B>>10,56320|1023&B)}}else Mt+=String.fromCharCode((31&jt)<<6|Vt)}else Mt+=String.fromCharCode(jt)}return Mt}(J,Ne,se):""},p.ALLOC_NORMAL=0,q=function Ne(){At||Pt(),At||(q=Ne)},p.run=Pt,p.preInit)for(typeof p.preInit=="function"&&(p.preInit=[p.preInit]);p.preInit.length>0;)p.preInit.pop()();Pt(),m.exports=p,p.unloadRuntime=function(){typeof self<"u"&&delete self.Module,p=H=X=$=J=void 0,delete m.exports}},631:function(m,f,g){var E,p;(p=typeof(E=function(){const C=typeof self<"u"?self:this,N={Argon2d:0,Argon2i:1,Argon2id:2};function x(R){if(x._promise)return x._promise;if(x._module)return Promise.resolve(x._module);let P;return P=C.process&&C.process.versions&&C.process.versions.node?S().then(M=>new Promise(j=>{M.postRun=()=>j(M)})):(C.loadArgon2WasmBinary?C.loadArgon2WasmBinary():Promise.resolve(g(721)).then(M=>function(j){const Q=atob(j),H=new Uint8Array(new ArrayBuffer(Q.length));for(let V=0;V<Q.length;V++)H[V]=Q.charCodeAt(V);return H}(M))).then(M=>function(j,Q){return new Promise(H=>(C.Module={wasmBinary:j,wasmMemory:Q,postRun(){H(Module)}},S()))}(M,R?function(j){const G=Math.min(Math.max(Math.ceil(j*1024/65536),256)+256,32767);return new WebAssembly.Memory({initial:G,maximum:32767})}(R):void 0)),x._promise=P,P.then(M=>(x._module=M,delete x._promise,M))}function S(){return C.loadArgon2WasmModule?C.loadArgon2WasmModule():Promise.resolve(g(773))}function T(R,P){return R.allocate(P,"i8",R.ALLOC_NORMAL)}function k(R,P){return T(R,new Uint8Array([...P,0]))}function U(R){if(typeof R!="string")return R;if(typeof TextEncoder=="function")return new TextEncoder().encode(R);if(typeof Buffer=="function")return Buffer.from(R);throw new Error("Don't know how to encode UTF8")}return{ArgonType:N,hash:function(R){const P=R.mem||1024;return x(P).then(M=>{const j=R.time||1,Q=R.parallelism||1,H=U(R.pass),V=k(M,H),G=H.length,K=U(R.salt),$=k(M,K),J=K.length,re=R.type||N.Argon2d,Ae=M.allocate(new Array(R.hashLen||24),"i8",M.ALLOC_NORMAL),X=R.secret?T(M,R.secret):0,ie=R.secret?R.secret.byteLength:0,ce=R.ad?T(M,R.ad):0,ye=R.ad?R.ad.byteLength:0,_=R.hashLen||24,q=M._argon2_encodedlen(j,P,Q,J,_,re),ee=M.allocate(new Array(q+1),"i8",M.ALLOC_NORMAL);let ne,Ie,we;try{Ie=M._argon2_hash_ext(j,P,Q,V,G,$,J,Ae,_,ee,q,re,X,ie,ce,ye,19)}catch(Re){ne=Re}if(Ie!==0||ne){try{ne||(ne=M.UTF8ToString(M._argon2_error_message(Ie)))}catch{}we={message:ne,code:Ie}}else{let Re="";const Be=new Uint8Array(_);for(let xe=0;xe<_;xe++){const ze=M.HEAP8[Ae+xe];Be[xe]=ze,Re+=("0"+(255&ze).toString(16)).slice(-2)}we={hash:Be,hashHex:Re,encoded:M.UTF8ToString(ee)}}try{M._free(V),M._free($),M._free(Ae),M._free(ee),ce&&M._free(ce),X&&M._free(X)}catch{}if(ne)throw we;return we})},verify:function(R){return x().then(P=>{const M=U(R.pass),j=k(P,M),Q=M.length,H=R.secret?T(P,R.secret):0,V=R.secret?R.secret.byteLength:0,G=R.ad?T(P,R.ad):0,K=R.ad?R.ad.byteLength:0,$=k(P,U(R.encoded));let J,re,Ae,X=R.type;if(X===void 0){let ie=R.encoded.split("$")[1];ie&&(ie=ie.replace("a","A"),X=N[ie]||N.Argon2d)}try{re=P._argon2_verify_ext($,j,Q,H,V,G,K,X)}catch(ie){J=ie}if(re||J){try{J||(J=P.UTF8ToString(P._argon2_error_message(re)))}catch{}Ae={message:J,code:re}}try{P._free(j),P._free($)}catch{}if(J)throw Ae;return Ae})},unloadRuntime:function(){x._module&&(x._module.unloadRuntime(),delete x._promise,delete x._module)}}})=="function"?E.apply(f,[]):E)===void 0||(m.exports=p)},721:function(m,f){m.exports=" "},145:()=>{},967:()=>{}},c={};function d(m){var f=c[m];if(f!==void 0)return f.exports;var g=c[m]={exports:{}};return s[m].call(g.exports,g,g.exports,d),g.exports}return i=Object.getPrototypeOf?m=>Object.getPrototypeOf(m):m=>m.__proto__,d.t=function(m,f){if(1&f&&(m=this(m)),8&f||typeof m=="object"&&m&&(4&f&&m.__esModule||16&f&&typeof m.then=="function"))return m;var g=Object.create(null);d.r(g);var E={};a=a||[null,i({}),i([]),i(i)];for(var p=2&f&&m;typeof p=="object"&&!~a.indexOf(p);p=i(p))Object.getOwnPropertyNames(p).forEach(C=>E[C]=()=>m[C]);return E.default=()=>m,d.d(g,E),g},d.d=(m,f)=>{for(var g in f)d.o(f,g)&&!d.o(m,g)&&Object.defineProperty(m,g,{enumerable:!0,get:f[g]})},d.o=(m,f)=>Object.prototype.hasOwnProperty.call(m,f),d.r=m=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},d(631)})()})}(Fu)),Fu.exports}var EL=yL();const Jb=Ji(EL);var Ab,pb;const bL=(pb=(Ab=globalThis.browser)==null?void 0:Ab.runtime)!=null&&pb.id?globalThis.browser:globalThis.chrome,No=bL,bh="local:aliasvault_pin_enabled",Ih="local:aliasvault_pin_encrypted_key",vh="local:aliasvault_pin_salt",Nh="local:aliasvault_pin_length",yo="local:aliasvault_pin_failed_attempts",qf=4;class Ou extends Error{constructor(){super("PIN locked after too many failed attempts"),this.name="PinLockedError"}}class Jl extends Error{constructor(){super("Invalid PIN format"),this.name="InvalidPinFormatError"}}class Wf extends Error{constructor(a){super(`Incorrect PIN. ${a} attempts remaining.`);qe(this,"attemptsRemaining");this.name="IncorrectPinError",this.attemptsRemaining=a}}async function Xb(){try{return await Se.getItem(bh)===!0}catch{return!1}}async function IL(){try{return await Se.getItem(Nh)||null}catch{return null}}function Ch(n){return/^\d{6,8}$/.test(n)}async function $b(){try{return await Se.getItem(yo)||0}catch{return 0}}async function Zb(){return await $b()>=qf}async function vL(n,e){if(!Ch(n))throw new Jl;try{const a=crypto.getRandomValues(new Uint8Array(16)),i=Yf(a.buffer),s=await eI(a),c=await tI(n,s),d=crypto.getRandomValues(new Uint8Array(12)),m=await crypto.subtle.encrypt({name:"AES-GCM",iv:d},c,new TextEncoder().encode(e)),f=new Uint8Array(d.length+m.byteLength);f.set(d,0),f.set(new Uint8Array(m),d.length);const g=Yf(f.buffer);await Promise.all([Se.setItem(bh,!0),Se.setItem(Ih,g),Se.setItem(vh,i),Se.setItem(Nh,n.length),Se.setItem(yo,0)])}catch(a){throw a instanceof Jl||console.error("[PinUnlockService] Failed to setup PIN:",a),a}}async function NL(n){if(!Ch(n))throw new Jl;if(await Zb())throw new Ou;try{const[e,a]=await Promise.all([Se.getItem(Ih),Se.getItem(vh)]);if(!e||!a)throw new Ou;const i=new Uint8Array(Uy(e)),s=i.slice(0,12),c=i.slice(12),d=new Uint8Array(Uy(a)),m=await eI(d),f=await tI(n,m),g=await crypto.subtle.decrypt({name:"AES-GCM",iv:s},f,c),E=new TextDecoder().decode(g);return await Se.setItem(yo,0),E}catch{const a=await $b()+1;throw await Se.setItem(yo,a),a>=qf?(await wh(),new Ou):new Wf(qf-a)}}async function wh(){try{await Promise.all([Se.removeItem(bh),Se.removeItem(Ih),Se.removeItem(vh),Se.removeItem(Nh),Se.removeItem(yo)])}catch(n){throw console.error("[PinUnlockService] Failed to disable PIN:",n),n}}async function By(){try{await Se.setItem(yo,0)}catch(n){console.error("[PinUnlockService] Failed to reset failed attempts:",n)}}async function CL(){const n=No.runtime.id,e=new TextEncoder().encode(n),a=await crypto.subtle.digest("SHA-256",e);return new Uint8Array(a)}async function eI(n){const e=await CL(),a=new Uint8Array(n.length+e.length);return a.set(n,0),a.set(e,n.length),a}async function tI(n,e){const a=Yf(e.buffer),i=await Jb.hash({pass:n,salt:a,time:3,mem:65536,parallelism:1,hashLen:32,type:2});return await crypto.subtle.importKey("raw",i.hash,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}function Yf(n){const e=new Uint8Array(n);let a="";for(let i=0;i<e.byteLength;i++)a+=String.fromCharCode(e[i]);return btoa(a)}function Uy(n){const e=atob(n),a=new Uint8Array(e.length);for(let i=0;i<e.length;i++)a[i]=e.charCodeAt(i);return a.buffer}const aI=I.createContext(void 0),wL=({children:n})=>{const[e,a]=I.useState(!1),[i,s]=I.useState(null),[c,d]=I.useState(null),m=Kt(),f=I.useCallback(async()=>{const x=await Se.getItem("local:accessToken"),S=await Se.getItem("local:refreshToken"),T=await Se.getItem("local:username");return a(!0),x&&S&&T?(s(T),!0):!1},[s]),g=I.useCallback(async(x,S,T)=>{await Se.setItem("local:username",x),await Se.setItem("local:accessToken",S),await Se.setItem("local:refreshToken",T),await bt.setVaultLockedDismissUntil(0),s(x)},[]),E=I.useCallback(async x=>{await Bt("CLEAR_SESSION",{},"background"),m==null||m.clearDatabase();try{await wh()}catch(S){console.error("Failed to remove PIN data:",S)}x&&d(x)},[m]),p=I.useCallback(async x=>{await E(x),await Bt("CLEAR_VAULT_DATA",{},"background"),s(null)},[E]),C=I.useCallback(()=>{d(null)},[]),N=I.useMemo(()=>({isInitialized:e,username:i,initializeAuth:f,setAuthTokens:g,clearAuthUserInitiated:p,clearAuthForced:E,globalMessage:c,clearGlobalMessage:C}),[e,i,f,c,g,p,E,C]);return l.jsx(aI.Provider,{value:N,children:n})},ac=()=>{const n=I.useContext(aI);if(n===void 0)throw new Error("useAuth must be used within an AuthProvider");return n};class xL{constructor(){qe(this,"listeners",new Set)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}emit(e){this.listeners.forEach(a=>{try{a(e)}catch(i){console.error("Error in logout listener:",i)}})}}const nI=new xL,ri=class ri{constructor(){}static isServerVersionSupported(e){return this.versionGreaterThanOrEqualTo(e,this.MIN_SERVER_VERSION)}static versionGreaterThanOrEqualTo(e,a){const[i,s]=e.split("-"),[c,d]=a.split("-"),m=i.split(".").map(Number),f=c.split(".").map(Number);for(let g=0;g<Math.max(m.length,f.length);g++){const E=m[g]??0,p=f[g]??0;if(E>p)return!0;if(E<p)return!1}return!s&&d?!0:s&&!d?!1:!s&&!d?!0:s>=d}};qe(ri,"VERSION","0.26.3"),qe(ri,"API_VERSION",ri.VERSION.split("-")[0]),qe(ri,"MIN_SERVER_VERSION","0.12.0-dev"),qe(ri,"CLIENT_NAME","edge"),qe(ri,"DEFAULT_CLIENT_URL","https://app.aliasvault.net"),qe(ri,"DEFAULT_API_URL","https://app.aliasvault.net/api");let tn=ri;class Wi extends Error{constructor(e){super(e),this.name="ApiAuthError"}}class Ql extends Error{constructor(e="Network error",a){super(e),this.name="NetworkError",this.cause=a,Object.setPrototypeOf(this,Ql.prototype)}}class SL{async getBaseUrl(){return(await this.getApiUrl()).replace(/\/$/,"")+"/v1/"}async isSelfHosted(){return await this.getApiUrl()!==tn.DEFAULT_API_URL}async authFetch(e,a={},i=!0,s=!0){const c=new Headers(a.headers??{}),d=await this.getAccessToken();d&&c.set("Authorization",`Bearer ${d}`);const m={...a,headers:c};try{const f=await this.rawFetch(e,m);if(f.status===401){const g=await this.refreshAccessToken();if(g.token){c.set("Authorization",`Bearer ${g.token}`);const E=await this.rawFetch(e,{...m,headers:c});if(!E.ok)throw new Wi("Request failed after token refresh");return i?E.json():E}else throw g.isAuthError?(nI.emit("common.errors.sessionExpired"),new Wi("Session expired")):new Ql("Token refresh failed due to network error")}if(!f.ok&&s)throw new Error(`HTTP error! status: ${f.status}`);return i?f.json():f}catch(f){throw console.error("API request failed:",f),f}}async rawFetch(e,a={}){const s=await this.getBaseUrl()+e,c=new Headers(a.headers??{});c.set("X-AliasVault-Client",`${tn.CLIENT_NAME}-${tn.API_VERSION}`);const d={...a,headers:c};try{return await fetch(s,d)}catch(m){throw console.error("API request failed:",m),new Ql(m instanceof Error?m.message:"Network request failed",m instanceof Error?m:void 0)}}async get(e){return this.authFetch(e,{method:"GET"})}async downloadBlob(e){try{const i=await(await this.authFetch(e,{method:"GET",headers:{Accept:"application/octet-stream"}},!1)).arrayBuffer();return new Uint8Array(i)}catch(a){throw console.error("Error downloading blob:",a),a}}async post(e,a,i=!0){return this.authFetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)},i)}async put(e,a){return this.authFetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}async delete(e){return this.authFetch(e,{method:"DELETE"},!1)}async revokeTokens(){try{const e=await this.getRefreshToken();e&&await this.post("Auth/revoke",{token:await this.getAccessToken(),refreshToken:e},!1)}catch(e){console.error("WebApi revoke tokens error:",e)}}async getStatus(){try{return await this.get("Auth/status")}catch(e){if(e instanceof Wi)throw e;return{clientVersionSupported:!0,serverVersion:"0.0.0",vaultRevision:0,srpSalt:""}}}validateStatusResponse(e){return e.clientVersionSupported?tn.isServerVersionSupported(e.serverVersion)?null:"serverVersionNotSupported":"clientVersionNotSupported"}async refreshAccessToken(){const e=await this.getRefreshToken();if(!e)return{token:null,isAuthError:!0};try{const a=await this.rawFetch("Auth/refresh",{method:"POST",headers:{"Content-Type":"application/json","X-Ignore-Failure":"true"},body:JSON.stringify({token:await this.getAccessToken(),refreshToken:e})});if(a.ok){const i=await a.json();return this.updateTokens(i.token,i.refreshToken),{token:i.token,isAuthError:!1}}return a.status===401||a.status===403?{token:null,isAuthError:!0}:(console.warn(`Token refresh failed with status ${a.status}, treating as offline`),{token:null,isAuthError:!1})}catch(a){return a instanceof Ql?(console.warn("Token refresh failed due to network error, treating as offline"),{token:null,isAuthError:!1}):(console.error("Unexpected error during token refresh:",a),{token:null,isAuthError:!0})}}async getAccessToken(){return await Se.getItem("local:accessToken")??null}async getRefreshToken(){return await Se.getItem("local:refreshToken")??null}async updateTokens(e,a){await Se.setItem("local:accessToken",e),await Se.setItem("local:refreshToken",a)}async getApiUrl(){const e=await Se.getItem("local:apiUrl");return!e||e.length===0?tn.DEFAULT_API_URL:e}}const rI=I.createContext(null),TL=({children:n})=>{const[e,a]=I.useState(null);return I.useEffect(()=>{const i=new SL;a(i)},[]),e?l.jsx(rI.Provider,{value:e,children:n}):null},Dr=()=>{const n=I.useContext(rI);if(!n)throw new Error("useWebApi must be used within a WebApiProvider");return n},iI=I.createContext(void 0),kL=({children:n})=>{const e=ac(),a=Dr(),[i,s]=I.useState(!1),c=I.useRef(!1),{t:d}=Ze(),m=I.useCallback(async p=>{if(!c.current)try{c.current=!0,await a.revokeTokens(),await e.clearAuthForced(p)}catch(C){console.error("Error during logout:",C)}finally{c.current=!1,s(!1)}},[e,a]),f=I.useCallback(async()=>{const p=await e.initializeAuth();return s(p),p},[e]),g=I.useCallback(async(p,C,N)=>{await e.setAuthTokens(p,C,N),s(!0)},[e]);I.useEffect(()=>nI.subscribe(async C=>{await m(d(C))}),[m,d]),I.useEffect(()=>{f()},[f]);const E=I.useMemo(()=>({isInitialized:e.isInitialized,username:e.username,globalMessage:e.globalMessage,logout:m,initializeAuth:f,setAuthTokens:g,clearGlobalMessage:e.clearGlobalMessage,isLoggedIn:i}),[e.isInitialized,e.username,e.globalMessage,e.clearGlobalMessage,m,f,g,i]);return l.jsx(iI.Provider,{value:E,children:n})},mr=()=>{const n=I.useContext(iI);if(n===void 0)throw new Error("useApp must be used within an AppProvider");return n};class Ta{static isPopup(){return new URLSearchParams(window.location.search).get("expanded")==="true"?!0:window.innerWidth>390}static getReturnPath(){return new URLSearchParams(window.location.search).get("returnTo")}static openInNewPopup(e,a){const c=window.screen.width/2-400,d=window.screen.height/2-1e3/2,m=e||window.location.hash.replace("#",""),f=new URLSearchParams;f.set("expanded","true"),a&&f.set("returnTo",a);const g=`popup.html?${f.toString()}#${m}`;window.open(g,"AliasVaultPopup",`width=800,height=1000,left=${c},top=${d},popup=true`),window.close()}}const LL=1e3,RL=()=>{const{t:n}=Ze(),e=mr(),a=Kt(),[i,s]=I.useState(!1),[c,d]=I.useState(!1),m=I.useRef(null);I.useEffect(()=>{if(a.isSyncing)d(!0),m.current=Date.now();else if(m.current!==null){const g=Date.now()-m.current,E=LL-g;if(E>0){const p=setTimeout(()=>{d(!1),m.current=null},E);return()=>{clearTimeout(p)}}else d(!1),m.current=null}},[a.isSyncing]);const f=I.useCallback(async()=>{if(!i){s(!0);try{const g=await Bt("FULL_VAULT_SYNC",{},"background");if(g.requiresLogout){const E=g.errorKey?n("common.errors."+g.errorKey):g.error;await e.logout(E);return}g.wasOffline?await a.setIsOffline(!0):a.isOffline&&await a.setIsOffline(!1),g.hasNewVault&&await a.loadStoredDatabase(),await a.refreshSyncState()}catch(g){console.error("Retry sync error:",g)}finally{s(!1)}}},[i,a,e,n]);return!e.isLoggedIn||!a.dbAvailable?null:a.isOffline?l.jsxs("button",{onClick:f,disabled:i,className:"flex items-center gap-1.5 px-2 py-1 bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-400 rounded-md text-xs font-medium cursor-pointer hover:opacity-80 active:opacity-60 transition-colors",title:n("sync.tapToRetry"),children:[l.jsx("div",{className:"relative",children:i?l.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})}):l.jsxs(l.Fragment,{children:[l.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18.364 5.636a9 9 0 010 12.728m0 0l-2.829-2.829m2.829 2.829L21 21M15.536 8.464a5 5 0 010 7.072m0 0l-2.829-2.829m-4.243 2.829a4.978 4.978 0 01-1.414-2.83m-1.414 5.658a9 9 0 01-2.167-9.238m7.824 2.167a1 1 0 111.414 1.414m-1.414-1.414L3 3m8.293 8.293l1.414 1.414"})}),a.isDirty&&l.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-2 h-2 bg-red-500 rounded-full"})]})}),l.jsx("span",{children:n("sync.offline")})]}):c?l.jsx("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 rounded-md text-xs font-medium",title:n("common.syncingVault"),children:l.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})}):a.isDirty?l.jsx("button",{onClick:f,disabled:i,className:"flex items-center gap-1.5 px-2 py-1 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400 rounded-md text-xs font-medium cursor-pointer hover:opacity-80 active:opacity-60 transition-colors",title:n("sync.tapToRetry"),children:i?l.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})}):l.jsxs("div",{className:"relative",children:[l.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),l.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-2 h-2 bg-blue-500 dark:bg-blue-400 rounded-full animate-pulse"})]})}):null},sI=({routes:n=[],rightButtons:e})=>{const{t:a}=Ze(),i=mr(),s=Ba(),c=qa(),d=n==null?void 0:n.find(E=>{const p=E.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${p}$`).test(c.pathname)}),m=I.useCallback(()=>{const E=Ta.getReturnPath();E&&Ta.isPopup()&&window.history.length<=2?s(E):s(-1)},[s]),f=()=>{s("/auth-settings")},g=()=>{c.pathname==="/upgrade"||c.pathname==="/login"||c.pathname==="/unlock"||(i.isLoggedIn?s("/items"):s("/"))};return l.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:l.jsxs("div",{className:"flex items-center h-16 px-4",children:[d!=null&&d.showBackButton?l.jsx("button",{id:"back",onClick:m,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:l.jsxs("div",{className:"flex items-center",children:[l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),d.title&&l.jsx("h1",{className:"text-lg font-medium text-gray-900 dark:text-white ml-2",children:d.title})]})}):l.jsx("div",{className:"flex items-center",children:l.jsxs("button",{onClick:()=>g(),className:"flex items-center hover:opacity-80 transition-opacity",children:[l.jsx(qb,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),l.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),l.jsx("div",{className:"flex-grow"}),l.jsx(RL,{}),l.jsx("div",{className:"flex items-center gap-2",children:i.isLoggedIn?e:l.jsxs(l.Fragment,{children:[e,l.jsxs("button",{id:"settings",onClick:f,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:[l.jsx("span",{className:"sr-only",children:a("common.settings")}),l.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:l.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"})})]})]})})]})})},DL=({routes:n,headerButtons:e,message:a,children:i})=>{const s=I.useRef(null),c=qa();return I.useEffect(()=>{s.current&&(s.current.scrollTop=0)},[c.pathname]),l.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[l.jsx(tx,{}),l.jsx(sI,{routes:n,rightButtons:e}),l.jsx("main",{ref:s,className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px",height:"calc(100% - 120px)"},children:l.jsxs("div",{className:"px-4 pb-4 pt-2 mb-16",children:[a&&l.jsx("p",{className:"text-red-500 mb-4",children:a}),i||l.jsx(Mb,{children:n.map(d=>l.jsx(hh,{path:d.path,element:d.element},d.path))})]})}),l.jsx(ax,{})]})},BL=({children:n})=>l.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[l.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:l.jsxs("div",{className:"flex items-center justify-center h-16 px-4",children:[l.jsx(qb,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),l.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),l.jsx("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px"},children:l.jsx("div",{className:"p-4",children:n})})]}),er=()=>{const n={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},e=l.jsxs(l.Fragment,{children:[l.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),l.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:n})]});return l.jsx("div",{className:"inline-flex items-center",children:e})},oI=I.createContext(void 0),UL=({children:n})=>{const[e,a]=I.useState(null),i=I.useCallback(c=>{a(c)},[]),s=I.useMemo(()=>({setHeaderButtons:i,headerButtons:e}),[i,e]);return l.jsx(oI.Provider,{value:s,children:n})},gr=()=>{const n=I.useContext(oI);if(n===void 0)throw new Error("useHeaderButtons must be used within a HeaderButtonsProvider");return n},ML=()=>{const{isLoading:n}=Aa();if(!n)return null;const e={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},a=l.jsxs(l.Fragment,{children:[l.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),l.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:e})]});return l.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:l.jsx("div",{className:"relative",children:a})})},lI=I.createContext(void 0),_L=({children:n})=>{const[e,a]=I.useState(!0),[i,s]=I.useState(!1),[c,d]=I.useState(void 0),m=E=>{s(!0),d(E)},f=()=>{s(!1),d(void 0)},g=I.useMemo(()=>({isLoading:i,loadingMessage:c,showLoading:m,hideLoading:f,isInitialLoading:e,setIsInitialLoading:a}),[i,c,e]);return l.jsxs(lI.Provider,{value:g,children:[l.jsx(ML,{message:c}),n]})},Aa=()=>{const n=I.useContext(lI);if(n===void 0)throw new Error("useLoading must be used within a LoadingProvider");return n},FL="session:lastVisitedPage",OL="session:lastVisitedTime",jL="session:navigationHistory",cI=I.createContext(void 0),PL=({children:n})=>{const e=qa(),a=Ba(),{isInitialized:i,isLoggedIn:s}=mr(),{dbInitialized:c,dbAvailable:d}=Kt(),m=i&&c,f=m&&(!s||!d),g=I.useCallback(async()=>{if(m&&!f&&!["/","/reinitialize","/login","/unlock","/unlock-success","/auth-settings","/upgrade","/passkeys/create","/passkeys/authenticate"].includes(e.pathname)){const C=e.pathname.split("/").filter(Boolean),N=[];let x="";for(let S=0;S<C.length;S++)x+="/"+C[S],N.push({pathname:x,search:e.search,hash:e.hash});await Promise.all([Se.setItem(FL,e.pathname),Se.setItem(OL,Date.now()),Se.setItem(jL,N)])}},[e,m,f]);I.useEffect(()=>{m&&g()},[e.pathname,e.search,e.hash,m,g]),I.useEffect(()=>{m&&!s&&a("/login",{replace:!0})},[m,s]);const E=I.useMemo(()=>({storeCurrentPage:g,isFullyInitialized:m,requiresAuth:f}),[g,m,f]);return l.jsx(cI.Provider,{value:E,children:n})},HL=()=>{const n=I.useContext(cI);if(n===void 0)throw new Error("useNavigation must be used within a NavigationProvider");return n};var Gg,My;function zL(){if(My)return Gg;My=1;function n(k){this._maxSize=k,this.clear()}n.prototype.clear=function(){this._size=0,this._values=Object.create(null)},n.prototype.get=function(k){return this._values[k]},n.prototype.set=function(k,U){return this._size>=this._maxSize&&this.clear(),k in this._values||this._size++,this._values[k]=U};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,a=/^\d+$/,i=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,c=/^\s*(['"]?)(.*?)(\1)\s*$/,d=512,m=new n(d),f=new n(d),g=new n(d);Gg={Cache:n,split:p,normalizePath:E,setter:function(k){var U=E(k);return f.get(k)||f.set(k,function(P,M){for(var j=0,Q=U.length,H=P;j<Q-1;){var V=U[j];if(V==="__proto__"||V==="constructor"||V==="prototype")return P;H=H[U[j++]]}H[U[j]]=M})},getter:function(k,U){var R=E(k);return g.get(k)||g.set(k,function(M){for(var j=0,Q=R.length;j<Q;)if(M!=null||!U)M=M[R[j++]];else return;return M})},join:function(k){return k.reduce(function(U,R){return U+(N(R)||a.test(R)?"["+R+"]":(U?".":"")+R)},"")},forEach:function(k,U,R){C(Array.isArray(k)?k:p(k),U,R)}};function E(k){return m.get(k)||m.set(k,p(k).map(function(U){return U.replace(c,"$2")}))}function p(k){return k.match(e)||[""]}function C(k,U,R){var P=k.length,M,j,Q,H;for(j=0;j<P;j++)M=k[j],M&&(T(M)&&(M='"'+M+'"'),H=N(M),Q=!H&&/^\d+$/.test(M),U.call(R,M,H,Q,j,k))}function N(k){return typeof k=="string"&&k&&["'",'"'].indexOf(k.charAt(0))!==-1}function x(k){return k.match(i)&&!k.match(a)}function S(k){return s.test(k)}function T(k){return!N(k)&&(x(k)||S(k))}return Gg}var vs=zL(),Kg,_y;function QL(){if(_y)return Kg;_y=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,e=E=>E.match(n)||[],a=E=>E[0].toUpperCase()+E.slice(1),i=(E,p)=>e(E).join(p).toLowerCase(),s=E=>e(E).reduce((p,C)=>`${p}${p?C[0].toUpperCase()+C.slice(1).toLowerCase():C.toLowerCase()}`,"");return Kg={words:e,upperFirst:a,camelCase:s,pascalCase:E=>a(s(E)),snakeCase:E=>i(E,"_"),kebabCase:E=>i(E,"-"),sentenceCase:E=>a(i(E," ")),titleCase:E=>e(E).map(a).join(" ")},Kg}var qg=QL(),bu={exports:{}},Fy;function VL(){if(Fy)return bu.exports;Fy=1,bu.exports=function(s){return n(e(s),s)},bu.exports.array=n;function n(s,c){var d=s.length,m=new Array(d),f={},g=d,E=a(c),p=i(s);for(c.forEach(function(N){if(!p.has(N[0])||!p.has(N[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});g--;)f[g]||C(s[g],g,new Set);return m;function C(N,x,S){if(S.has(N)){var T;try{T=", node was:"+JSON.stringify(N)}catch{T=""}throw new Error("Cyclic dependency"+T)}if(!p.has(N))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(N));if(!f[x]){f[x]=!0;var k=E.get(N)||new Set;if(k=Array.from(k),x=k.length){S.add(N);do{var U=k[--x];C(U,p.get(U),S)}while(x);S.delete(N)}m[--d]=N}}}function e(s){for(var c=new Set,d=0,m=s.length;d<m;d++){var f=s[d];c.add(f[0]),c.add(f[1])}return Array.from(c)}function a(s){for(var c=new Map,d=0,m=s.length;d<m;d++){var f=s[d];c.has(f[0])||c.set(f[0],new Set),c.has(f[1])||c.set(f[1],new Set),c.get(f[0]).add(f[1])}return c}function i(s){for(var c=new Map,d=0,m=s.length;d<m;d++)c.set(s[d],d);return c}return bu.exports}var GL=VL();const KL=Ji(GL),qL=Object.prototype.toString,WL=Error.prototype.toString,YL=RegExp.prototype.toString,JL=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",XL=/^Symbol\((.*)\)(.*)$/;function $L(n){return n!=+n?"NaN":n===0&&1/n<0?"-0":""+n}function Oy(n,e=!1){if(n==null||n===!0||n===!1)return""+n;const a=typeof n;if(a==="number")return $L(n);if(a==="string")return e?`"${n}"`:n;if(a==="function")return"[Function "+(n.name||"anonymous")+"]";if(a==="symbol")return JL.call(n).replace(XL,"Symbol($1)");const i=qL.call(n).slice(8,-1);return i==="Date"?isNaN(n.getTime())?""+n:n.toISOString(n):i==="Error"||n instanceof Error?"["+WL.call(n)+"]":i==="RegExp"?YL.call(n):null}function Yi(n,e){let a=Oy(n,e);return a!==null?a:JSON.stringify(n,function(i,s){let c=Oy(this[i],e);return c!==null?c:s},2)}function uI(n){return n==null?[]:[].concat(n)}let dI,mI,gI,ZL=/\$\{\s*(\w+)\s*\}/g;dI=Symbol.toStringTag;class jy{constructor(e,a,i,s){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[dI]="Error",this.name="ValidationError",this.value=a,this.path=i,this.type=s,this.errors=[],this.inner=[],uI(e).forEach(c=>{if(cn.isError(c)){this.errors.push(...c.errors);const d=c.inner.length?c.inner:[c];this.inner.push(...d)}else this.errors.push(c)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}mI=Symbol.hasInstance;gI=Symbol.toStringTag;class cn extends Error{static formatError(e,a){const i=a.label||a.path||"this";return a=Object.assign({},a,{path:i,originalPath:a.path}),typeof e=="string"?e.replace(ZL,(s,c)=>Yi(a[c])):typeof e=="function"?e(a):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,a,i,s,c){const d=new jy(e,a,i,s);if(c)return d;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[gI]="Error",this.name=d.name,this.message=d.message,this.type=d.type,this.value=d.value,this.path=d.path,this.errors=d.errors,this.inner=d.inner,Error.captureStackTrace&&Error.captureStackTrace(this,cn)}static[mI](e){return jy[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let xr={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:e,value:a,originalValue:i})=>{const s=i!=null&&i!==a?` (cast from the value \`${Yi(i,!0)}\`).`:".";return e!=="mixed"?`${n} must be a \`${e}\` type, but the final value was: \`${Yi(a,!0)}\``+s:`${n} must match the configured type. The validated value was: \`${Yi(a,!0)}\``+s}},Cn={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"},e2={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"},Jf={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},t2={isValue:"${path} field must be ${value}"},ju={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},a2={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"},n2={notType:n=>{const{path:e,value:a,spec:i}=n,s=i.types.length;if(Array.isArray(a)){if(a.length<s)return`${e} tuple value has too few items, expected a length of ${s} but got ${a.length} for value: \`${Yi(a,!0)}\``;if(a.length>s)return`${e} tuple value has too many items, expected a length of ${s} but got ${a.length} for value: \`${Yi(a,!0)}\``}return cn.formatError(xr.notType,n)}};Object.assign(Object.create(null),{mixed:xr,string:Cn,number:e2,date:Jf,object:ju,array:a2,boolean:t2,tuple:n2});const xh=n=>n&&n.__isYupSchema__;class Yu{static fromOptions(e,a){if(!a.then&&!a.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:i,then:s,otherwise:c}=a,d=typeof i=="function"?i:(...m)=>m.every(f=>f===i);return new Yu(e,(m,f)=>{var g;let E=d(...m)?s:c;return(g=E==null?void 0:E(f))!=null?g:f})}constructor(e,a){this.fn=void 0,this.refs=e,this.refs=e,this.fn=a}resolve(e,a){let i=this.refs.map(c=>c.getValue(a==null?void 0:a.value,a==null?void 0:a.parent,a==null?void 0:a.context)),s=this.fn(i,e,a);if(s===void 0||s===e)return e;if(!xh(s))throw new TypeError("conditions must return a schema object");return s.resolve(a)}}const Iu={context:"$",value:"."};class Cs{constructor(e,a={}){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 e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")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 i=this.isContext?Iu.context:this.isValue?Iu.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&vs.getter(this.path,!0),this.map=a.map}getValue(e,a,i){let s=this.isContext?i:this.isValue?e:a;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(e,a){return this.getValue(e,a==null?void 0:a.parent,a==null?void 0:a.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Cs.prototype.__isYupRef=!0;const bs=n=>n==null;function oo(n){function e({value:a,path:i="",options:s,originalValue:c,schema:d},m,f){const{name:g,test:E,params:p,message:C,skipAbsent:N}=n;let{parent:x,context:S,abortEarly:T=d.spec.abortEarly,disableStackTrace:k=d.spec.disableStackTrace}=s;function U(K){return Cs.isRef(K)?K.getValue(a,x,S):K}function R(K={}){const $=Object.assign({value:a,originalValue:c,label:d.spec.label,path:K.path||i,spec:d.spec,disableStackTrace:K.disableStackTrace||k},p,K.params);for(const re of Object.keys($))$[re]=U($[re]);const J=new cn(cn.formatError(K.message||C,$),a,$.path,K.type||g,$.disableStackTrace);return J.params=$,J}const P=T?m:f;let M={path:i,parent:x,type:g,from:s.from,createError:R,resolve:U,options:s,originalValue:c,schema:d};const j=K=>{cn.isError(K)?P(K):K?f(null):P(R())},Q=K=>{cn.isError(K)?P(K):m(K)};if(N&&bs(a))return j(!0);let V;try{var G;if(V=E.call(M,a,M),typeof((G=V)==null?void 0:G.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${M.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(V).then(j,Q)}}catch(K){Q(K);return}j(V)}return e.OPTIONS=n,e}function r2(n,e,a,i=a){let s,c,d;return e?(vs.forEach(e,(m,f,g)=>{let E=f?m.slice(1,m.length-1):m;n=n.resolve({context:i,parent:s,value:a});let p=n.type==="tuple",C=g?parseInt(E,10):0;if(n.innerType||p){if(p&&!g)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${d}" must contain an index to the tuple element, e.g. "${d}[0]"`);if(a&&C>=a.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${m}, in the path: ${e}. because there is no value at that index. `);s=a,a=a&&a[C],n=p?n.spec.types[C]:n.innerType}if(!g){if(!n.fields||!n.fields[E])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${d} which is a type: "${n.type}")`);s=a,a=a&&a[E],n=n.fields[E]}c=E,d=f?"["+m+"]":"."+m}),{schema:n,parent:s,parentPath:c}):{parent:s,parentPath:e,schema:n}}class Ju extends Set{describe(){const e=[];for(const a of this.values())e.push(Cs.isRef(a)?a.describe():a);return e}resolveAll(e){let a=[];for(const i of this.values())a.push(e(i));return a}clone(){return new Ju(this.values())}merge(e,a){const i=this.clone();return e.forEach(s=>i.add(s)),a.forEach(s=>i.delete(s)),i}}function go(n,e=new Map){if(xh(n)||!n||typeof n!="object")return n;if(e.has(n))return e.get(n);let a;if(n instanceof Date)a=new Date(n.getTime()),e.set(n,a);else if(n instanceof RegExp)a=new RegExp(n),e.set(n,a);else if(Array.isArray(n)){a=new Array(n.length),e.set(n,a);for(let i=0;i<n.length;i++)a[i]=go(n[i],e)}else if(n instanceof Map){a=new Map,e.set(n,a);for(const[i,s]of n.entries())a.set(i,go(s,e))}else if(n instanceof Set){a=new Set,e.set(n,a);for(const i of n)a.add(go(i,e))}else if(n instanceof Object){a={},e.set(n,a);for(const[i,s]of Object.entries(n))a[i]=go(s,e)}else throw Error(`Unable to clone ${n}`);return a}class Rr{constructor(e){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 Ju,this._blacklist=new Ju,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(xr.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(a=>{a.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const a=Object.create(Object.getPrototypeOf(this));return a.type=this.type,a._typeCheck=this._typeCheck,a._whitelist=this._whitelist.clone(),a._blacklist=this._blacklist.clone(),a.internalTests=Object.assign({},this.internalTests),a.exclusiveTests=Object.assign({},this.exclusiveTests),a.deps=[...this.deps],a.conditions=[...this.conditions],a.tests=[...this.tests],a.transforms=[...this.transforms],a.spec=go(Object.assign({},this.spec,e)),a}label(e){let a=this.clone();return a.spec.label=e,a}meta(...e){if(e.length===0)return this.spec.meta;let a=this.clone();return a.spec.meta=Object.assign(a.spec.meta||{},e[0]),a}withMutation(e){let a=this._mutate;this._mutate=!0;let i=e(this);return this._mutate=a,i}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let a=this,i=e.clone();const s=Object.assign({},a.spec,i.spec);return i.spec=s,i.internalTests=Object.assign({},a.internalTests,i.internalTests),i._whitelist=a._whitelist.merge(e._whitelist,e._blacklist),i._blacklist=a._blacklist.merge(e._blacklist,e._whitelist),i.tests=a.tests,i.exclusiveTests=a.exclusiveTests,i.withMutation(c=>{e.tests.forEach(d=>{c.test(d.OPTIONS)})}),i.transforms=[...a.transforms,...i.transforms],i}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let a=this;if(a.conditions.length){let i=a.conditions;a=a.clone(),a.conditions=[],a=i.reduce((s,c)=>c.resolve(s,e),a),a=a.resolve(e)}return a}resolveOptions(e){var a,i,s,c;return Object.assign({},e,{from:e.from||[],strict:(a=e.strict)!=null?a:this.spec.strict,abortEarly:(i=e.abortEarly)!=null?i:this.spec.abortEarly,recursive:(s=e.recursive)!=null?s:this.spec.recursive,disableStackTrace:(c=e.disableStackTrace)!=null?c:this.spec.disableStackTrace})}cast(e,a={}){let i=this.resolve(Object.assign({value:e},a)),s=a.assert==="ignore-optionality",c=i._cast(e,a);if(a.assert!==!1&&!i.isType(c)){if(s&&bs(c))return c;let d=Yi(e),m=Yi(c);throw new TypeError(`The value of ${a.path||"field"} could not be cast to a value that satisfies the schema type: "${i.type}". 

attempted value: ${d} 
`+(m!==d?`result of cast: ${m}`:""))}return c}_cast(e,a){let i=e===void 0?e:this.transforms.reduce((s,c)=>c.call(this,s,e,this),e);return i===void 0&&(i=this.getDefault(a)),i}_validate(e,a={},i,s){let{path:c,originalValue:d=e,strict:m=this.spec.strict}=a,f=e;m||(f=this._cast(f,Object.assign({assert:!1},a)));let g=[];for(let E of Object.values(this.internalTests))E&&g.push(E);this.runTests({path:c,value:f,originalValue:d,options:a,tests:g},i,E=>{if(E.length)return s(E,f);this.runTests({path:c,value:f,originalValue:d,options:a,tests:this.tests},i,s)})}runTests(e,a,i){let s=!1,{tests:c,value:d,originalValue:m,path:f,options:g}=e,E=S=>{s||(s=!0,a(S,d))},p=S=>{s||(s=!0,i(S,d))},C=c.length,N=[];if(!C)return p([]);let x={value:d,originalValue:m,path:f,options:g,schema:this};for(let S=0;S<c.length;S++){const T=c[S];T(x,E,function(U){U&&(Array.isArray(U)?N.push(...U):N.push(U)),--C<=0&&p(N)})}}asNestedTest({key:e,index:a,parent:i,parentPath:s,originalParent:c,options:d}){const m=e??a;if(m==null)throw TypeError("Must include `key` or `index` for nested validations");const f=typeof m=="number";let g=i[m];const E=Object.assign({},d,{strict:!0,parent:i,value:g,originalValue:c[m],key:void 0,[f?"index":"key"]:m,path:f||m.includes(".")?`${s||""}[${f?m:`"${m}"`}]`:(s?`${s}.`:"")+e});return(p,C,N)=>this.resolve(E)._validate(g,E,C,N)}validate(e,a){var i;let s=this.resolve(Object.assign({},a,{value:e})),c=(i=a==null?void 0:a.disableStackTrace)!=null?i:s.spec.disableStackTrace;return new Promise((d,m)=>s._validate(e,a,(f,g)=>{cn.isError(f)&&(f.value=g),m(f)},(f,g)=>{f.length?m(new cn(f,g,void 0,void 0,c)):d(g)}))}validateSync(e,a){var i;let s=this.resolve(Object.assign({},a,{value:e})),c,d=(i=a==null?void 0:a.disableStackTrace)!=null?i:s.spec.disableStackTrace;return s._validate(e,Object.assign({},a,{sync:!0}),(m,f)=>{throw cn.isError(m)&&(m.value=f),m},(m,f)=>{if(m.length)throw new cn(m,e,void 0,void 0,d);c=f}),c}isValid(e,a){return this.validate(e,a).then(()=>!0,i=>{if(cn.isError(i))return!1;throw i})}isValidSync(e,a){try{return this.validateSync(e,a),!0}catch(i){if(cn.isError(i))return!1;throw i}}_getDefault(e){let a=this.spec.default;return a==null?a:typeof a=="function"?a.call(this,e):go(a)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,a){const i=this.clone({nullable:e});return i.internalTests.nullable=oo({message:a,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),i}optionality(e,a){const i=this.clone({optional:e});return i.internalTests.optionality=oo({message:a,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),i}optional(){return this.optionality(!0)}defined(e=xr.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=xr.notNull){return this.nullability(!1,e)}required(e=xr.required){return this.clone().withMutation(a=>a.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let a=this.clone();return a.transforms.push(e),a}test(...e){let a;if(e.length===1?typeof e[0]=="function"?a={test:e[0]}:a=e[0]:e.length===2?a={name:e[0],test:e[1]}:a={name:e[0],message:e[1],test:e[2]},a.message===void 0&&(a.message=xr.default),typeof a.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),s=oo(a),c=a.exclusive||a.name&&i.exclusiveTests[a.name]===!0;if(a.exclusive&&!a.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return a.name&&(i.exclusiveTests[a.name]=!!a.exclusive),i.tests=i.tests.filter(d=>!(d.OPTIONS.name===a.name&&(c||d.OPTIONS.test===s.OPTIONS.test))),i.tests.push(s),i}when(e,a){!Array.isArray(e)&&typeof e!="string"&&(a=e,e=".");let i=this.clone(),s=uI(e).map(c=>new Cs(c));return s.forEach(c=>{c.isSibling&&i.deps.push(c.key)}),i.conditions.push(typeof a=="function"?new Yu(s,a):Yu.fromOptions(s,a)),i}typeError(e){let a=this.clone();return a.internalTests.typeError=oo({message:e,name:"typeError",skipAbsent:!0,test(i){return this.schema._typeCheck(i)?!0:this.createError({params:{type:this.schema.type}})}}),a}oneOf(e,a=xr.oneOf){let i=this.clone();return e.forEach(s=>{i._whitelist.add(s),i._blacklist.delete(s)}),i.internalTests.whiteList=oo({message:a,name:"oneOf",skipAbsent:!0,test(s){let c=this.schema._whitelist,d=c.resolveAll(this.resolve);return d.includes(s)?!0:this.createError({params:{values:Array.from(c).join(", "),resolved:d}})}}),i}notOneOf(e,a=xr.notOneOf){let i=this.clone();return e.forEach(s=>{i._blacklist.add(s),i._whitelist.delete(s)}),i.internalTests.blacklist=oo({message:a,name:"notOneOf",test(s){let c=this.schema._blacklist,d=c.resolveAll(this.resolve);return d.includes(s)?this.createError({params:{values:Array.from(c).join(", "),resolved:d}}):!0}}),i}strip(e=!0){let a=this.clone();return a.spec.strip=e,a}describe(e){const a=(e?this.resolve(e):this).clone(),{label:i,meta:s,optional:c,nullable:d}=a.spec;return{meta:s,label:i,optional:c,nullable:d,default:a.getDefault(e),type:a.type,oneOf:a._whitelist.describe(),notOneOf:a._blacklist.describe(),tests:a.tests.map(f=>({name:f.OPTIONS.name,params:f.OPTIONS.params})).filter((f,g,E)=>E.findIndex(p=>p.name===f.name)===g)}}}Rr.prototype.__isYupSchema__=!0;for(const n of["validate","validateSync"])Rr.prototype[`${n}At`]=function(e,a,i={}){const{parent:s,parentPath:c,schema:d}=r2(this,e,a,i.context);return d[n](s&&s[c],Object.assign({},i,{parent:s,path:e}))};for(const n of["equals","is"])Rr.prototype[n]=Rr.prototype.oneOf;for(const n of["not","nope"])Rr.prototype[n]=Rr.prototype.notOneOf;const i2=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function s2(n){const e=Xf(n);if(!e)return Date.parse?Date.parse(n):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let a=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(a=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(a=0-a)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+a,e.second,e.millisecond)}function Xf(n){var e,a;const i=i2.exec(n);return i?{year:ai(i[1]),month:ai(i[2],1)-1,day:ai(i[3],1),hour:ai(i[4]),minute:ai(i[5]),second:ai(i[6]),millisecond:i[7]?ai(i[7].substring(0,3)):0,precision:(e=(a=i[7])==null?void 0:a.length)!=null?e:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:ai(i[10]),minuteOffset:ai(i[11])}:null}function ai(n,e=0){return Number(n)||e}let o2=/^[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])?)*$/,l2=/^((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,c2=/^(?:[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,u2="^\\d{4}-\\d{2}-\\d{2}",d2="\\d{2}:\\d{2}:\\d{2}",m2="(([+-]\\d{2}(:?\\d{2})?)|Z)",g2=new RegExp(`${u2}T${d2}(\\.\\d+)?${m2}$`),f2=n=>bs(n)||n===n.trim(),h2={}.toString();function $f(){return new fI}class fI extends Rr{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,a,i)=>{if(!i.spec.coerce||i.isType(e)||Array.isArray(e))return e;const s=e!=null&&e.toString?e.toString():e;return s===h2?e:s})})}required(e){return super.required(e).withMutation(a=>a.test({message:e||xr.required,name:"required",skipAbsent:!0,test:i=>!!i.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(a=>a.OPTIONS.name!=="required"),e))}length(e,a=Cn.length){return this.test({message:a,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(i){return i.length===this.resolve(e)}})}min(e,a=Cn.min){return this.test({message:a,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(i){return i.length>=this.resolve(e)}})}max(e,a=Cn.max){return this.test({name:"max",exclusive:!0,message:a,params:{max:e},skipAbsent:!0,test(i){return i.length<=this.resolve(e)}})}matches(e,a){let i=!1,s,c;return a&&(typeof a=="object"?{excludeEmptyString:i=!1,message:s,name:c}=a:s=a),this.test({name:c||"matches",message:s||Cn.matches,params:{regex:e},skipAbsent:!0,test:d=>d===""&&i||d.search(e)!==-1})}email(e=Cn.email){return this.matches(o2,{name:"email",message:e,excludeEmptyString:!0})}url(e=Cn.url){return this.matches(l2,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Cn.uuid){return this.matches(c2,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let a="",i,s;return e&&(typeof e=="object"?{message:a="",allowOffset:i=!1,precision:s=void 0}=e:a=e),this.matches(g2,{name:"datetime",message:a||Cn.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:a||Cn.datetime_offset,params:{allowOffset:i},skipAbsent:!0,test:c=>{if(!c||i)return!0;const d=Xf(c);return d?!!d.z:!1}}).test({name:"datetime_precision",message:a||Cn.datetime_precision,params:{precision:s},skipAbsent:!0,test:c=>{if(!c||s==null)return!0;const d=Xf(c);return d?d.precision===s:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Cn.trim){return this.transform(a=>a!=null?a.trim():a).test({message:e,name:"trim",test:f2})}lowercase(e=Cn.lowercase){return this.transform(a=>bs(a)?a:a.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:a=>bs(a)||a===a.toLowerCase()})}uppercase(e=Cn.uppercase){return this.transform(a=>bs(a)?a:a.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:a=>bs(a)||a===a.toUpperCase()})}}$f.prototype=fI.prototype;let A2=new Date(""),p2=n=>Object.prototype.toString.call(n)==="[object Date]";class Sh extends Rr{constructor(){super({type:"date",check(e){return p2(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,a,i)=>!i.spec.coerce||i.isType(e)||e===null?e:(e=s2(e),isNaN(e)?Sh.INVALID_DATE:new Date(e)))})}prepareParam(e,a){let i;if(Cs.isRef(e))i=e;else{let s=this.cast(e);if(!this._typeCheck(s))throw new TypeError(`\`${a}\` must be a Date or a value that can be \`cast()\` to a Date`);i=s}return i}min(e,a=Jf.min){let i=this.prepareParam(e,"min");return this.test({message:a,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s>=this.resolve(i)}})}max(e,a=Jf.max){let i=this.prepareParam(e,"max");return this.test({message:a,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(s){return s<=this.resolve(i)}})}}Sh.INVALID_DATE=A2;function y2(n,e=[]){let a=[],i=new Set,s=new Set(e.map(([d,m])=>`${d}-${m}`));function c(d,m){let f=vs.split(d)[0];i.add(f),s.has(`${m}-${f}`)||a.push([m,f])}for(const d of Object.keys(n)){let m=n[d];i.add(d),Cs.isRef(m)&&m.isSibling?c(m.path,d):xh(m)&&"deps"in m&&m.deps.forEach(f=>c(f,d))}return KL.array(Array.from(i),a).reverse()}function Py(n,e){let a=1/0;return n.some((i,s)=>{var c;if((c=e.path)!=null&&c.includes(i))return a=s,!0}),a}function hI(n){return(e,a)=>Py(n,e)-Py(n,a)}const E2=(n,e,a)=>{if(typeof n!="string")return n;let i=n;try{i=JSON.parse(n)}catch{}return a.isType(i)?i:n};function Pu(n){if("fields"in n){const e={};for(const[a,i]of Object.entries(n.fields))e[a]=Pu(i);return n.setFields(e)}if(n.type==="array"){const e=n.optional();return e.innerType&&(e.innerType=Pu(e.innerType)),e}return n.type==="tuple"?n.optional().clone({types:n.spec.types.map(Pu)}):"optional"in n?n.optional():n}const b2=(n,e)=>{const a=[...vs.normalizePath(e)];if(a.length===1)return a[0]in n;let i=a.pop(),s=vs.getter(vs.join(a),!0)(n);return!!(s&&i in s)};let Hy=n=>Object.prototype.toString.call(n)==="[object Object]";function zy(n,e){let a=Object.keys(n.fields);return Object.keys(e).filter(i=>a.indexOf(i)===-1)}const I2=hI([]);function AI(n){return new pI(n)}class pI extends Rr{constructor(e){super({type:"object",check(a){return Hy(a)||typeof a=="function"}}),this.fields=Object.create(null),this._sortErrors=I2,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,a={}){var i;let s=super._cast(e,a);if(s===void 0)return this.getDefault(a);if(!this._typeCheck(s))return s;let c=this.fields,d=(i=a.stripUnknown)!=null?i:this.spec.noUnknown,m=[].concat(this._nodes,Object.keys(s).filter(p=>!this._nodes.includes(p))),f={},g=Object.assign({},a,{parent:f,__validating:a.__validating||!1}),E=!1;for(const p of m){let C=c[p],N=p in s;if(C){let x,S=s[p];g.path=(a.path?`${a.path}.`:"")+p,C=C.resolve({value:S,context:a.context,parent:f});let T=C instanceof Rr?C.spec:void 0,k=T==null?void 0:T.strict;if(T!=null&&T.strip){E=E||p in s;continue}x=!a.__validating||!k?C.cast(s[p],g):s[p],x!==void 0&&(f[p]=x)}else N&&!d&&(f[p]=s[p]);(N!==p in f||f[p]!==s[p])&&(E=!0)}return E?f:s}_validate(e,a={},i,s){let{from:c=[],originalValue:d=e,recursive:m=this.spec.recursive}=a;a.from=[{schema:this,value:d},...c],a.__validating=!0,a.originalValue=d,super._validate(e,a,i,(f,g)=>{if(!m||!Hy(g)){s(f,g);return}d=d||g;let E=[];for(let p of this._nodes){let C=this.fields[p];!C||Cs.isRef(C)||E.push(C.asNestedTest({options:a,key:p,parent:g,parentPath:a.path,originalParent:d}))}this.runTests({tests:E,value:g,originalValue:d,options:a},i,p=>{s(p.sort(this._sortErrors).concat(f),g)})})}clone(e){const a=super.clone(e);return a.fields=Object.assign({},this.fields),a._nodes=this._nodes,a._excludedEdges=this._excludedEdges,a._sortErrors=this._sortErrors,a}concat(e){let a=super.concat(e),i=a.fields;for(let[s,c]of Object.entries(this.fields)){const d=i[s];i[s]=d===void 0?c:d}return a.withMutation(s=>s.setFields(i,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let a={};return this._nodes.forEach(i=>{var s;const c=this.fields[i];let d=e;(s=d)!=null&&s.value&&(d=Object.assign({},d,{parent:d.value,value:d.value[i]})),a[i]=c&&"getDefault"in c?c.getDefault(d):void 0}),a}setFields(e,a){let i=this.clone();return i.fields=e,i._nodes=y2(e,a),i._sortErrors=hI(Object.keys(e)),a&&(i._excludedEdges=a),i}shape(e,a=[]){return this.clone().withMutation(i=>{let s=i._excludedEdges;return a.length&&(Array.isArray(a[0])||(a=[a]),s=[...i._excludedEdges,...a]),i.setFields(Object.assign(i.fields,e),s)})}partial(){const e={};for(const[a,i]of Object.entries(this.fields))e[a]="optional"in i&&i.optional instanceof Function?i.optional():i;return this.setFields(e)}deepPartial(){return Pu(this)}pick(e){const a={};for(const i of e)this.fields[i]&&(a[i]=this.fields[i]);return this.setFields(a,this._excludedEdges.filter(([i,s])=>e.includes(i)&&e.includes(s)))}omit(e){const a=[];for(const i of Object.keys(this.fields))e.includes(i)||a.push(i);return this.pick(a)}from(e,a,i){let s=vs.getter(e,!0);return this.transform(c=>{if(!c)return c;let d=c;return b2(c,e)&&(d=Object.assign({},c),i||delete d[e],d[a]=s(c)),d})}json(){return this.transform(E2)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||ju.exact,test(a){if(a==null)return!0;const i=zy(this.schema,a);return i.length===0||this.createError({params:{properties:i.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,a=ju.noUnknown){typeof e!="boolean"&&(a=e,e=!0);let i=this.test({name:"noUnknown",exclusive:!0,message:a,test(s){if(s==null)return!0;const c=zy(this.schema,s);return!e||c.length===0||this.createError({params:{unknown:c.join(", ")}})}});return i.spec.noUnknown=e,i}unknown(e=!0,a=ju.noUnknown){return this.noUnknown(!e,a)}transformKeys(e){return this.transform(a=>{if(!a)return a;const i={};for(const s of Object.keys(a))i[e(s)]=a[s];return i})}camelCase(){return this.transformKeys(qg.camelCase)}snakeCase(){return this.transformKeys(qg.snakeCase)}constantCase(){return this.transformKeys(e=>qg.snakeCase(e).toUpperCase())}describe(e){const a=(e?this.resolve(e):this).clone(),i=super.describe(e);i.fields={};for(const[c,d]of Object.entries(a.fields)){var s;let m=e;(s=m)!=null&&s.value&&(m=Object.assign({},m,{parent:m.value,value:m.value[c]})),i.fields[c]=d.describe(m)}return i}}AI.prototype=pI.prototype;const yI=({variant:n="dropdown",size:e="md"})=>{const{i18n:a}=Ze(),[i,s]=I.useState(!1),c=I.useRef(null),d=nL(a.language)||Pl[0];I.useEffect(()=>{const f=g=>{c.current&&!c.current.contains(g.target)&&s(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]);const m=async f=>{await a.changeLanguage(f),await Se.setItem("local:language",f),s(!1),a.emit("languageChanged",f)};return n==="buttons"?l.jsx("div",{className:"flex space-x-2",children:Pl.map(f=>l.jsxs("button",{onClick:()=>m(f.code),className:`flex items-center space-x-1 px-2 py-1 text-xs rounded transition-colors ${a.language===f.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:f.nativeName,children:[l.jsx("span",{className:"text-sm",children:f.flag}),l.jsx("span",{children:f.code.toUpperCase()})]},f.code))}):l.jsxs("div",{className:"relative",ref:c,children:[l.jsxs("button",{onClick:()=>s(!i),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 ${e==="sm"?"text-sm":"text-base"}`,children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{className:"text-lg",children:d.flag}),l.jsx("span",{children:d.nativeName})]}),l.jsx("svg",{className:`w-4 h-4 transition-transform duration-200 ${i?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),i&&l.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:Pl.map(f=>l.jsxs("button",{onClick:()=>m(f.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 ${e==="sm"?"text-sm":"text-base"}`,children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{className:"text-lg",children:f.flag}),l.jsx("span",{className:"text-gray-700 dark:text-gray-200",children:f.nativeName})]}),a.language===f.code&&l.jsx("svg",{className:"w-4 h-4 text-primary-500",fill:"currentColor",viewBox:"0 0 20 20",children:l.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"})})]},f.code))})]})},Wg=[{label:"Aliasvault.net",value:tn.DEFAULT_API_URL},{label:"Self-hosted",value:"custom"}],v2=n=>AI().shape({apiUrl:$f().required(n("settings.validation.apiUrlRequired")).test("is-valid-api-url",n("settings.validation.apiUrlInvalid"),e=>{if(!e)return!0;try{const a=new URL(e);return a.protocol==="http:"||a.protocol==="https:"}catch{return!1}}),clientUrl:$f().required(n("settings.validation.clientUrlRequired")).test("is-valid-client-url",n("settings.validation.clientUrlInvalid"),e=>{if(!e)return!0;try{const a=new URL(e);return a.protocol==="http:"||a.protocol==="https:"}catch{return!1}})}),N2=()=>{const{t:n}=Ze(),[e,a]=I.useState(""),[i,s]=I.useState(""),[c,d]=I.useState(""),[m,f]=I.useState(!0),[g,E]=I.useState({}),{setIsInitialLoading:p}=Aa(),C=v2(n),N=I.useRef(null),x=I.useRef(null),S=I.useRef(null),T=I.useRef(null);I.useEffect(()=>()=>{if(N.current&&clearTimeout(N.current),x.current&&clearTimeout(x.current),S.current!==null){const M=S.current;Se.setItem("local:apiUrl",M)}if(T.current!==null){const M=T.current;Se.setItem("local:clientUrl",M)}},[]),I.useEffect(()=>{(async()=>{const j=await Se.getItem("local:apiUrl"),Q=await Se.getItem("local:clientUrl"),H=await bt.getGlobalAutofillPopupEnabled(),V=await bt.getVaultLockedDismissUntil();f(V?!1:H);const G=Wg.find(K=>K.value===j);G?a(G.value):j?(a("custom"),s(j),d(Q??"")):a(Wg[0].value),p(!1)})()},[p]);const k=async M=>{const j=M.target.value;a(j),j!=="custom"&&(await Se.setItem("local:apiUrl",""),await Se.setItem("local:clientUrl",""),s(""),d(""),E({}))},U=I.useCallback(M=>{const j=M.target.value;s(j),S.current=j,N.current&&clearTimeout(N.current),N.current=setTimeout(async()=>{try{await C.validateAt("apiUrl",{apiUrl:j}),E(Q=>({...Q,apiUrl:void 0})),await Se.setItem("local:apiUrl",j),S.current=null}catch(Q){Q instanceof cn&&(E(H=>({...H,apiUrl:Q.message})),await Se.setItem("local:apiUrl",tn.DEFAULT_API_URL),await Se.setItem("local:clientUrl",tn.DEFAULT_CLIENT_URL),S.current=null)}},150)},[C]),R=I.useCallback(M=>{const j=M.target.value;d(j),T.current=j,x.current&&clearTimeout(x.current),x.current=setTimeout(async()=>{try{await C.validateAt("clientUrl",{clientUrl:j}),E(Q=>({...Q,clientUrl:void 0})),await Se.setItem("local:clientUrl",j),T.current=null}catch(Q){Q instanceof cn&&(E(H=>({...H,clientUrl:Q.message})),T.current=null)}},150)},[C]),P=async()=>{const M=!m;await bt.setGlobalAutofillPopupEnabled(M),M&&(await bt.setDisabledSites([]),await bt.setVaultLockedDismissUntil(0)),f(M)};return l.jsxs("div",{className:"p-4 space-y-6",children:[l.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:n("settings.serverConfiguration","Server Configuration")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n("settings.serverConfigurationDescription","Configure the AliasVault server URL for self-hosted instances")})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"api-connection",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:n("settings.serverUrl")}),l.jsx("select",{id:"api-connection",value:e,onChange:k,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:Wg.map(M=>l.jsx("option",{value:M.value,children:M.label},M.value))})]}),e==="custom"&&l.jsxs("div",{className:"space-y-4 pl-4 border-l-2 border-primary-500",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"custom-api-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:n("settings.customApiUrl","API URL")}),l.jsx("input",{id:"custom-api-url",type:"text",value:i,onChange:U,placeholder:"https://vault.example.com/api",className:`w-full bg-gray-50 border ${g.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`}),g.apiUrl&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:g.apiUrl}),l.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:n("settings.apiUrlHint","The API endpoint URL (usually client URL + /api)")})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"custom-client-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:n("settings.customClientUrl","Client URL")}),l.jsx("input",{id:"custom-client-url",type:"text",value:c,onChange:R,placeholder:"https://vault.example.com",className:`w-full bg-gray-50 border ${g.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`}),g.clientUrl&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:g.clientUrl}),l.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:n("settings.clientUrlHint","The web interface URL of your self-hosted instance")})]})]})]}),l.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:n("settings.autofillSettings","Autofill Settings")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n("settings.autofillSettingsDescription","Enable or disable the autofill popup on web pages")})]}),l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n("settings.autofillEnabled")}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:m?n("settings.autofillEnabledDescription","Autofill suggestions will appear on login forms"):n("settings.autofillDisabledDescription","Autofill suggestions are disabled globally")})]}),l.jsx("button",{onClick:P,className:`px-4 py-2 rounded-md transition-colors font-medium text-sm ${m?"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:m?n("common.enabled","Enabled"):n("common.disabled","Disabled")})]})]}),l.jsxs("div",{className:"space-y-4 pb-6",children:[l.jsx("div",{children:l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:n("settings.languageSettings","Language")})}),l.jsx("div",{children:l.jsx(yI,{variant:"dropdown",size:"sm"})})]}),l.jsxs("div",{className:"text-center text-xs text-gray-400 dark:text-gray-600 pt-4 border-t border-gray-200 dark:border-gray-700",children:[n("settings.version"),": ",tn.VERSION]})]})},ya=I.forwardRef(({onClick:n,id:e,children:a,type:i="button",variant:s="primary"},c)=>{const d={primary:"bg-primary-500 hover:bg-primary-600",secondary:"bg-gray-500 hover:bg-gray-600"};return l.jsx("button",{ref:c,className:`${d[s]} text-white font-medium rounded-lg px-4 py-2 text-sm w-full`,onClick:n,type:i,id:e,children:a})});ya.displayName="Button";var lo={},Yg,Qy;function C2(){return Qy||(Qy=1,Yg=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Yg}var Jg={},Pi={},Vy;function ws(){if(Vy)return Pi;Vy=1;let n;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Pi.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},Pi.getSymbolTotalCodewords=function(i){return e[i]},Pi.getBCHDigit=function(a){let i=0;for(;a!==0;)i++,a>>>=1;return i},Pi.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');n=i},Pi.isKanjiModeEnabled=function(){return typeof n<"u"},Pi.toSJIS=function(i){return n(i)},Pi}var Xg={},Gy;function Th(){return Gy||(Gy=1,function(n){n.L={bit:1},n.M={bit:0},n.Q={bit:3},n.H={bit:2};function e(a){if(typeof a!="string")throw new Error("Param is not a string");switch(a.toLowerCase()){case"l":case"low":return n.L;case"m":case"medium":return n.M;case"q":case"quartile":return n.Q;case"h":case"high":return n.H;default:throw new Error("Unknown EC Level: "+a)}}n.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},n.from=function(i,s){if(n.isValid(i))return i;try{return e(i)}catch{return s}}}(Xg)),Xg}var $g,Ky;function w2(){if(Ky)return $g;Ky=1;function n(){this.buffer=[],this.length=0}return n.prototype={get:function(e){const a=Math.floor(e/8);return(this.buffer[a]>>>7-e%8&1)===1},put:function(e,a){for(let i=0;i<a;i++)this.putBit((e>>>a-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const a=Math.floor(this.length/8);this.buffer.length<=a&&this.buffer.push(0),e&&(this.buffer[a]|=128>>>this.length%8),this.length++}},$g=n,$g}var Zg,qy;function x2(){if(qy)return Zg;qy=1;function n(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return n.prototype.set=function(e,a,i,s){const c=e*this.size+a;this.data[c]=i,s&&(this.reservedBit[c]=!0)},n.prototype.get=function(e,a){return this.data[e*this.size+a]},n.prototype.xor=function(e,a,i){this.data[e*this.size+a]^=i},n.prototype.isReserved=function(e,a){return this.reservedBit[e*this.size+a]},Zg=n,Zg}var ef={},Wy;function S2(){return Wy||(Wy=1,function(n){const e=ws().getSymbolSize;n.getRowColCoords=function(i){if(i===1)return[];const s=Math.floor(i/7)+2,c=e(i),d=c===145?26:Math.ceil((c-13)/(2*s-2))*2,m=[c-7];for(let f=1;f<s-1;f++)m[f]=m[f-1]-d;return m.push(6),m.reverse()},n.getPositions=function(i){const s=[],c=n.getRowColCoords(i),d=c.length;for(let m=0;m<d;m++)for(let f=0;f<d;f++)m===0&&f===0||m===0&&f===d-1||m===d-1&&f===0||s.push([c[m],c[f]]);return s}}(ef)),ef}var tf={},Yy;function T2(){if(Yy)return tf;Yy=1;const n=ws().getSymbolSize,e=7;return tf.getPositions=function(i){const s=n(i);return[[0,0],[s-e,0],[0,s-e]]},tf}var af={},Jy;function k2(){return Jy||(Jy=1,function(n){n.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};n.isValid=function(s){return s!=null&&s!==""&&!isNaN(s)&&s>=0&&s<=7},n.from=function(s){return n.isValid(s)?parseInt(s,10):void 0},n.getPenaltyN1=function(s){const c=s.size;let d=0,m=0,f=0,g=null,E=null;for(let p=0;p<c;p++){m=f=0,g=E=null;for(let C=0;C<c;C++){let N=s.get(p,C);N===g?m++:(m>=5&&(d+=e.N1+(m-5)),g=N,m=1),N=s.get(C,p),N===E?f++:(f>=5&&(d+=e.N1+(f-5)),E=N,f=1)}m>=5&&(d+=e.N1+(m-5)),f>=5&&(d+=e.N1+(f-5))}return d},n.getPenaltyN2=function(s){const c=s.size;let d=0;for(let m=0;m<c-1;m++)for(let f=0;f<c-1;f++){const g=s.get(m,f)+s.get(m,f+1)+s.get(m+1,f)+s.get(m+1,f+1);(g===4||g===0)&&d++}return d*e.N2},n.getPenaltyN3=function(s){const c=s.size;let d=0,m=0,f=0;for(let g=0;g<c;g++){m=f=0;for(let E=0;E<c;E++)m=m<<1&2047|s.get(g,E),E>=10&&(m===1488||m===93)&&d++,f=f<<1&2047|s.get(E,g),E>=10&&(f===1488||f===93)&&d++}return d*e.N3},n.getPenaltyN4=function(s){let c=0;const d=s.data.length;for(let f=0;f<d;f++)c+=s.data[f];return Math.abs(Math.ceil(c*100/d/5)-10)*e.N4};function a(i,s,c){switch(i){case n.Patterns.PATTERN000:return(s+c)%2===0;case n.Patterns.PATTERN001:return s%2===0;case n.Patterns.PATTERN010:return c%3===0;case n.Patterns.PATTERN011:return(s+c)%3===0;case n.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(c/3))%2===0;case n.Patterns.PATTERN101:return s*c%2+s*c%3===0;case n.Patterns.PATTERN110:return(s*c%2+s*c%3)%2===0;case n.Patterns.PATTERN111:return(s*c%3+(s+c)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}n.applyMask=function(s,c){const d=c.size;for(let m=0;m<d;m++)for(let f=0;f<d;f++)c.isReserved(f,m)||c.xor(f,m,a(s,f,m))},n.getBestMask=function(s,c){const d=Object.keys(n.Patterns).length;let m=0,f=1/0;for(let g=0;g<d;g++){c(g),n.applyMask(g,s);const E=n.getPenaltyN1(s)+n.getPenaltyN2(s)+n.getPenaltyN3(s)+n.getPenaltyN4(s);n.applyMask(g,s),E<f&&(f=E,m=g)}return m}}(af)),af}var vu={},Xy;function EI(){if(Xy)return vu;Xy=1;const n=Th(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],a=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return vu.getBlocksCount=function(s,c){switch(c){case n.L:return e[(s-1)*4+0];case n.M:return e[(s-1)*4+1];case n.Q:return e[(s-1)*4+2];case n.H:return e[(s-1)*4+3];default:return}},vu.getTotalCodewordsCount=function(s,c){switch(c){case n.L:return a[(s-1)*4+0];case n.M:return a[(s-1)*4+1];case n.Q:return a[(s-1)*4+2];case n.H:return a[(s-1)*4+3];default:return}},vu}var nf={},wl={},$y;function L2(){if($y)return wl;$y=1;const n=new Uint8Array(512),e=new Uint8Array(256);return function(){let i=1;for(let s=0;s<255;s++)n[s]=i,e[i]=s,i<<=1,i&256&&(i^=285);for(let s=255;s<512;s++)n[s]=n[s-255]}(),wl.log=function(i){if(i<1)throw new Error("log("+i+")");return e[i]},wl.exp=function(i){return n[i]},wl.mul=function(i,s){return i===0||s===0?0:n[e[i]+e[s]]},wl}var Zy;function R2(){return Zy||(Zy=1,function(n){const e=L2();n.mul=function(i,s){const c=new Uint8Array(i.length+s.length-1);for(let d=0;d<i.length;d++)for(let m=0;m<s.length;m++)c[d+m]^=e.mul(i[d],s[m]);return c},n.mod=function(i,s){let c=new Uint8Array(i);for(;c.length-s.length>=0;){const d=c[0];for(let f=0;f<s.length;f++)c[f]^=e.mul(s[f],d);let m=0;for(;m<c.length&&c[m]===0;)m++;c=c.slice(m)}return c},n.generateECPolynomial=function(i){let s=new Uint8Array([1]);for(let c=0;c<i;c++)s=n.mul(s,new Uint8Array([1,e.exp(c)]));return s}}(nf)),nf}var rf,eE;function D2(){if(eE)return rf;eE=1;const n=R2();function e(a){this.genPoly=void 0,this.degree=a,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(i){this.degree=i,this.genPoly=n.generateECPolynomial(this.degree)},e.prototype.encode=function(i){if(!this.genPoly)throw new Error("Encoder not initialized");const s=new Uint8Array(i.length+this.degree);s.set(i);const c=n.mod(s,this.genPoly),d=this.degree-c.length;if(d>0){const m=new Uint8Array(this.degree);return m.set(c,d),m}return c},rf=e,rf}var sf={},of={},lf={},tE;function bI(){return tE||(tE=1,lf.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),lf}var vr={},aE;function II(){if(aE)return vr;aE=1;const n="[0-9]+",e="[A-Z $%*+\\-./:]+";let a="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";a=a.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+a+`)(?:.|[\r
]))+`;vr.KANJI=new RegExp(a,"g"),vr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),vr.BYTE=new RegExp(i,"g"),vr.NUMERIC=new RegExp(n,"g"),vr.ALPHANUMERIC=new RegExp(e,"g");const s=new RegExp("^"+a+"$"),c=new RegExp("^"+n+"$"),d=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return vr.testKanji=function(f){return s.test(f)},vr.testNumeric=function(f){return c.test(f)},vr.testAlphanumeric=function(f){return d.test(f)},vr}var nE;function xs(){return nE||(nE=1,function(n){const e=bI(),a=II();n.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},n.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},n.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},n.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},n.MIXED={bit:-1},n.getCharCountIndicator=function(c,d){if(!c.ccBits)throw new Error("Invalid mode: "+c);if(!e.isValid(d))throw new Error("Invalid version: "+d);return d>=1&&d<10?c.ccBits[0]:d<27?c.ccBits[1]:c.ccBits[2]},n.getBestModeForData=function(c){return a.testNumeric(c)?n.NUMERIC:a.testAlphanumeric(c)?n.ALPHANUMERIC:a.testKanji(c)?n.KANJI:n.BYTE},n.toString=function(c){if(c&&c.id)return c.id;throw new Error("Invalid mode")},n.isValid=function(c){return c&&c.bit&&c.ccBits};function i(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return n.NUMERIC;case"alphanumeric":return n.ALPHANUMERIC;case"kanji":return n.KANJI;case"byte":return n.BYTE;default:throw new Error("Unknown mode: "+s)}}n.from=function(c,d){if(n.isValid(c))return c;try{return i(c)}catch{return d}}}(of)),of}var rE;function B2(){return rE||(rE=1,function(n){const e=ws(),a=EI(),i=Th(),s=xs(),c=bI(),d=7973,m=e.getBCHDigit(d);function f(C,N,x){for(let S=1;S<=40;S++)if(N<=n.getCapacity(S,x,C))return S}function g(C,N){return s.getCharCountIndicator(C,N)+4}function E(C,N){let x=0;return C.forEach(function(S){const T=g(S.mode,N);x+=T+S.getBitsLength()}),x}function p(C,N){for(let x=1;x<=40;x++)if(E(C,x)<=n.getCapacity(x,N,s.MIXED))return x}n.from=function(N,x){return c.isValid(N)?parseInt(N,10):x},n.getCapacity=function(N,x,S){if(!c.isValid(N))throw new Error("Invalid QR Code version");typeof S>"u"&&(S=s.BYTE);const T=e.getSymbolTotalCodewords(N),k=a.getTotalCodewordsCount(N,x),U=(T-k)*8;if(S===s.MIXED)return U;const R=U-g(S,N);switch(S){case s.NUMERIC:return Math.floor(R/10*3);case s.ALPHANUMERIC:return Math.floor(R/11*2);case s.KANJI:return Math.floor(R/13);case s.BYTE:default:return Math.floor(R/8)}},n.getBestVersionForData=function(N,x){let S;const T=i.from(x,i.M);if(Array.isArray(N)){if(N.length>1)return p(N,T);if(N.length===0)return 1;S=N[0]}else S=N;return f(S.mode,S.getLength(),T)},n.getEncodedBits=function(N){if(!c.isValid(N)||N<7)throw new Error("Invalid QR Code version");let x=N<<12;for(;e.getBCHDigit(x)-m>=0;)x^=d<<e.getBCHDigit(x)-m;return N<<12|x}}(sf)),sf}var cf={},iE;function U2(){if(iE)return cf;iE=1;const n=ws(),e=1335,a=21522,i=n.getBCHDigit(e);return cf.getEncodedBits=function(c,d){const m=c.bit<<3|d;let f=m<<10;for(;n.getBCHDigit(f)-i>=0;)f^=e<<n.getBCHDigit(f)-i;return(m<<10|f)^a},cf}var uf={},df,sE;function M2(){if(sE)return df;sE=1;const n=xs();function e(a){this.mode=n.NUMERIC,this.data=a.toString()}return e.getBitsLength=function(i){return 10*Math.floor(i/3)+(i%3?i%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(i){let s,c,d;for(s=0;s+3<=this.data.length;s+=3)c=this.data.substr(s,3),d=parseInt(c,10),i.put(d,10);const m=this.data.length-s;m>0&&(c=this.data.substr(s),d=parseInt(c,10),i.put(d,m*3+1))},df=e,df}var mf,oE;function _2(){if(oE)return mf;oE=1;const n=xs(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function a(i){this.mode=n.ALPHANUMERIC,this.data=i}return a.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(s){let c;for(c=0;c+2<=this.data.length;c+=2){let d=e.indexOf(this.data[c])*45;d+=e.indexOf(this.data[c+1]),s.put(d,11)}this.data.length%2&&s.put(e.indexOf(this.data[c]),6)},mf=a,mf}var gf,lE;function F2(){if(lE)return gf;lE=1;const n=xs();function e(a){this.mode=n.BYTE,typeof a=="string"?this.data=new TextEncoder().encode(a):this.data=new Uint8Array(a)}return e.getBitsLength=function(i){return i*8},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(a){for(let i=0,s=this.data.length;i<s;i++)a.put(this.data[i],8)},gf=e,gf}var ff,cE;function O2(){if(cE)return ff;cE=1;const n=xs(),e=ws();function a(i){this.mode=n.KANJI,this.data=i}return a.getBitsLength=function(s){return s*13},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(i){let s;for(s=0;s<this.data.length;s++){let c=e.toSJIS(this.data[s]);if(c>=33088&&c<=40956)c-=33088;else if(c>=57408&&c<=60351)c-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+`
Make sure your charset is UTF-8`);c=(c>>>8&255)*192+(c&255),i.put(c,13)}},ff=a,ff}var hf={exports:{}},uE;function j2(){return uE||(uE=1,function(n){var e={single_source_shortest_paths:function(a,i,s){var c={},d={};d[i]=0;var m=e.PriorityQueue.make();m.push(i,0);for(var f,g,E,p,C,N,x,S,T;!m.empty();){f=m.pop(),g=f.value,p=f.cost,C=a[g]||{};for(E in C)C.hasOwnProperty(E)&&(N=C[E],x=p+N,S=d[E],T=typeof d[E]>"u",(T||S>x)&&(d[E]=x,m.push(E,x),c[E]=g))}if(typeof s<"u"&&typeof d[s]>"u"){var k=["Could not find a path from ",i," to ",s,"."].join("");throw new Error(k)}return c},extract_shortest_path_from_predecessor_list:function(a,i){for(var s=[],c=i;c;)s.push(c),a[c],c=a[c];return s.reverse(),s},find_path:function(a,i,s){var c=e.single_source_shortest_paths(a,i,s);return e.extract_shortest_path_from_predecessor_list(c,s)},PriorityQueue:{make:function(a){var i=e.PriorityQueue,s={},c;a=a||{};for(c in i)i.hasOwnProperty(c)&&(s[c]=i[c]);return s.queue=[],s.sorter=a.sorter||i.default_sorter,s},default_sorter:function(a,i){return a.cost-i.cost},push:function(a,i){var s={value:a,cost:i};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};n.exports=e}(hf)),hf.exports}var dE;function P2(){return dE||(dE=1,function(n){const e=xs(),a=M2(),i=_2(),s=F2(),c=O2(),d=II(),m=ws(),f=j2();function g(k){return unescape(encodeURIComponent(k)).length}function E(k,U,R){const P=[];let M;for(;(M=k.exec(R))!==null;)P.push({data:M[0],index:M.index,mode:U,length:M[0].length});return P}function p(k){const U=E(d.NUMERIC,e.NUMERIC,k),R=E(d.ALPHANUMERIC,e.ALPHANUMERIC,k);let P,M;return m.isKanjiModeEnabled()?(P=E(d.BYTE,e.BYTE,k),M=E(d.KANJI,e.KANJI,k)):(P=E(d.BYTE_KANJI,e.BYTE,k),M=[]),U.concat(R,P,M).sort(function(Q,H){return Q.index-H.index}).map(function(Q){return{data:Q.data,mode:Q.mode,length:Q.length}})}function C(k,U){switch(U){case e.NUMERIC:return a.getBitsLength(k);case e.ALPHANUMERIC:return i.getBitsLength(k);case e.KANJI:return c.getBitsLength(k);case e.BYTE:return s.getBitsLength(k)}}function N(k){return k.reduce(function(U,R){const P=U.length-1>=0?U[U.length-1]:null;return P&&P.mode===R.mode?(U[U.length-1].data+=R.data,U):(U.push(R),U)},[])}function x(k){const U=[];for(let R=0;R<k.length;R++){const P=k[R];switch(P.mode){case e.NUMERIC:U.push([P,{data:P.data,mode:e.ALPHANUMERIC,length:P.length},{data:P.data,mode:e.BYTE,length:P.length}]);break;case e.ALPHANUMERIC:U.push([P,{data:P.data,mode:e.BYTE,length:P.length}]);break;case e.KANJI:U.push([P,{data:P.data,mode:e.BYTE,length:g(P.data)}]);break;case e.BYTE:U.push([{data:P.data,mode:e.BYTE,length:g(P.data)}])}}return U}function S(k,U){const R={},P={start:{}};let M=["start"];for(let j=0;j<k.length;j++){const Q=k[j],H=[];for(let V=0;V<Q.length;V++){const G=Q[V],K=""+j+V;H.push(K),R[K]={node:G,lastCount:0},P[K]={};for(let $=0;$<M.length;$++){const J=M[$];R[J]&&R[J].node.mode===G.mode?(P[J][K]=C(R[J].lastCount+G.length,G.mode)-C(R[J].lastCount,G.mode),R[J].lastCount+=G.length):(R[J]&&(R[J].lastCount=G.length),P[J][K]=C(G.length,G.mode)+4+e.getCharCountIndicator(G.mode,U))}}M=H}for(let j=0;j<M.length;j++)P[M[j]].end=0;return{map:P,table:R}}function T(k,U){let R;const P=e.getBestModeForData(k);if(R=e.from(U,P),R!==e.BYTE&&R.bit<P.bit)throw new Error('"'+k+'" cannot be encoded with mode '+e.toString(R)+`.
 Suggested mode is: `+e.toString(P));switch(R===e.KANJI&&!m.isKanjiModeEnabled()&&(R=e.BYTE),R){case e.NUMERIC:return new a(k);case e.ALPHANUMERIC:return new i(k);case e.KANJI:return new c(k);case e.BYTE:return new s(k)}}n.fromArray=function(U){return U.reduce(function(R,P){return typeof P=="string"?R.push(T(P,null)):P.data&&R.push(T(P.data,P.mode)),R},[])},n.fromString=function(U,R){const P=p(U,m.isKanjiModeEnabled()),M=x(P),j=S(M,R),Q=f.find_path(j.map,"start","end"),H=[];for(let V=1;V<Q.length-1;V++)H.push(j.table[Q[V]].node);return n.fromArray(N(H))},n.rawSplit=function(U){return n.fromArray(p(U,m.isKanjiModeEnabled()))}}(uf)),uf}var mE;function H2(){if(mE)return Jg;mE=1;const n=ws(),e=Th(),a=w2(),i=x2(),s=S2(),c=T2(),d=k2(),m=EI(),f=D2(),g=B2(),E=U2(),p=xs(),C=P2();function N(j,Q){const H=j.size,V=c.getPositions(Q);for(let G=0;G<V.length;G++){const K=V[G][0],$=V[G][1];for(let J=-1;J<=7;J++)if(!(K+J<=-1||H<=K+J))for(let re=-1;re<=7;re++)$+re<=-1||H<=$+re||(J>=0&&J<=6&&(re===0||re===6)||re>=0&&re<=6&&(J===0||J===6)||J>=2&&J<=4&&re>=2&&re<=4?j.set(K+J,$+re,!0,!0):j.set(K+J,$+re,!1,!0))}}function x(j){const Q=j.size;for(let H=8;H<Q-8;H++){const V=H%2===0;j.set(H,6,V,!0),j.set(6,H,V,!0)}}function S(j,Q){const H=s.getPositions(Q);for(let V=0;V<H.length;V++){const G=H[V][0],K=H[V][1];for(let $=-2;$<=2;$++)for(let J=-2;J<=2;J++)$===-2||$===2||J===-2||J===2||$===0&&J===0?j.set(G+$,K+J,!0,!0):j.set(G+$,K+J,!1,!0)}}function T(j,Q){const H=j.size,V=g.getEncodedBits(Q);let G,K,$;for(let J=0;J<18;J++)G=Math.floor(J/3),K=J%3+H-8-3,$=(V>>J&1)===1,j.set(G,K,$,!0),j.set(K,G,$,!0)}function k(j,Q,H){const V=j.size,G=E.getEncodedBits(Q,H);let K,$;for(K=0;K<15;K++)$=(G>>K&1)===1,K<6?j.set(K,8,$,!0):K<8?j.set(K+1,8,$,!0):j.set(V-15+K,8,$,!0),K<8?j.set(8,V-K-1,$,!0):K<9?j.set(8,15-K-1+1,$,!0):j.set(8,15-K-1,$,!0);j.set(V-8,8,1,!0)}function U(j,Q){const H=j.size;let V=-1,G=H-1,K=7,$=0;for(let J=H-1;J>0;J-=2)for(J===6&&J--;;){for(let re=0;re<2;re++)if(!j.isReserved(G,J-re)){let Ae=!1;$<Q.length&&(Ae=(Q[$]>>>K&1)===1),j.set(G,J-re,Ae),K--,K===-1&&($++,K=7)}if(G+=V,G<0||H<=G){G-=V,V=-V;break}}}function R(j,Q,H){const V=new a;H.forEach(function(re){V.put(re.mode.bit,4),V.put(re.getLength(),p.getCharCountIndicator(re.mode,j)),re.write(V)});const G=n.getSymbolTotalCodewords(j),K=m.getTotalCodewordsCount(j,Q),$=(G-K)*8;for(V.getLengthInBits()+4<=$&&V.put(0,4);V.getLengthInBits()%8!==0;)V.putBit(0);const J=($-V.getLengthInBits())/8;for(let re=0;re<J;re++)V.put(re%2?17:236,8);return P(V,j,Q)}function P(j,Q,H){const V=n.getSymbolTotalCodewords(Q),G=m.getTotalCodewordsCount(Q,H),K=V-G,$=m.getBlocksCount(Q,H),J=V%$,re=$-J,Ae=Math.floor(V/$),X=Math.floor(K/$),ie=X+1,ce=Ae-X,ye=new f(ce);let _=0;const q=new Array($),ee=new Array($);let ne=0;const Ie=new Uint8Array(j.buffer);for(let ze=0;ze<$;ze++){const At=ze<re?X:ie;q[ze]=Ie.slice(_,_+At),ee[ze]=ye.encode(q[ze]),_+=At,ne=Math.max(ne,At)}const we=new Uint8Array(V);let Re=0,Be,xe;for(Be=0;Be<ne;Be++)for(xe=0;xe<$;xe++)Be<q[xe].length&&(we[Re++]=q[xe][Be]);for(Be=0;Be<ce;Be++)for(xe=0;xe<$;xe++)we[Re++]=ee[xe][Be];return we}function M(j,Q,H,V){let G;if(Array.isArray(j))G=C.fromArray(j);else if(typeof j=="string"){let Ae=Q;if(!Ae){const X=C.rawSplit(j);Ae=g.getBestVersionForData(X,H)}G=C.fromString(j,Ae||40)}else throw new Error("Invalid data");const K=g.getBestVersionForData(G,H);if(!K)throw new Error("The amount of data is too big to be stored in a QR Code");if(!Q)Q=K;else if(Q<K)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+K+`.
`);const $=R(Q,H,G),J=n.getSymbolSize(Q),re=new i(J);return N(re,Q),x(re),S(re,Q),k(re,H,0),Q>=7&&T(re,Q),U(re,$),isNaN(V)&&(V=d.getBestMask(re,k.bind(null,re,H))),d.applyMask(V,re),k(re,H,V),{modules:re,version:Q,errorCorrectionLevel:H,maskPattern:V,segments:G}}return Jg.create=function(Q,H){if(typeof Q>"u"||Q==="")throw new Error("No input text");let V=e.M,G,K;return typeof H<"u"&&(V=e.from(H.errorCorrectionLevel,e.M),G=g.from(H.version),K=d.from(H.maskPattern),H.toSJISFunc&&n.setToSJISFunction(H.toSJISFunc)),M(Q,G,V,K)},Jg}var Af={},pf={},gE;function vI(){return gE||(gE=1,function(n){function e(a){if(typeof a=="number"&&(a=a.toString()),typeof a!="string")throw new Error("Color should be defined as hex string");let i=a.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+a);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(c){return[c,c]}))),i.length===6&&i.push("F","F");const s=parseInt(i.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+i.slice(0,6).join("")}}n.getOptions=function(i){i||(i={}),i.color||(i.color={});const s=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,c=i.width&&i.width>=21?i.width:void 0,d=i.scale||4;return{width:c,scale:c?4:d,margin:s,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},n.getScale=function(i,s){return s.width&&s.width>=i+s.margin*2?s.width/(i+s.margin*2):s.scale},n.getImageWidth=function(i,s){const c=n.getScale(i,s);return Math.floor((i+s.margin*2)*c)},n.qrToImageData=function(i,s,c){const d=s.modules.size,m=s.modules.data,f=n.getScale(d,c),g=Math.floor((d+c.margin*2)*f),E=c.margin*f,p=[c.color.light,c.color.dark];for(let C=0;C<g;C++)for(let N=0;N<g;N++){let x=(C*g+N)*4,S=c.color.light;if(C>=E&&N>=E&&C<g-E&&N<g-E){const T=Math.floor((C-E)/f),k=Math.floor((N-E)/f);S=p[m[T*d+k]?1:0]}i[x++]=S.r,i[x++]=S.g,i[x++]=S.b,i[x]=S.a}}}(pf)),pf}var fE;function z2(){return fE||(fE=1,function(n){const e=vI();function a(s,c,d){s.clearRect(0,0,c.width,c.height),c.style||(c.style={}),c.height=d,c.width=d,c.style.height=d+"px",c.style.width=d+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}n.render=function(c,d,m){let f=m,g=d;typeof f>"u"&&(!d||!d.getContext)&&(f=d,d=void 0),d||(g=i()),f=e.getOptions(f);const E=e.getImageWidth(c.modules.size,f),p=g.getContext("2d"),C=p.createImageData(E,E);return e.qrToImageData(C.data,c,f),a(p,g,E),p.putImageData(C,0,0),g},n.renderToDataURL=function(c,d,m){let f=m;typeof f>"u"&&(!d||!d.getContext)&&(f=d,d=void 0),f||(f={});const g=n.render(c,d,f),E=f.type||"image/png",p=f.rendererOpts||{};return g.toDataURL(E,p.quality)}}(Af)),Af}var yf={},hE;function Q2(){if(hE)return yf;hE=1;const n=vI();function e(s,c){const d=s.a/255,m=c+'="'+s.hex+'"';return d<1?m+" "+c+'-opacity="'+d.toFixed(2).slice(1)+'"':m}function a(s,c,d){let m=s+c;return typeof d<"u"&&(m+=" "+d),m}function i(s,c,d){let m="",f=0,g=!1,E=0;for(let p=0;p<s.length;p++){const C=Math.floor(p%c),N=Math.floor(p/c);!C&&!g&&(g=!0),s[p]?(E++,p>0&&C>0&&s[p-1]||(m+=g?a("M",C+d,.5+N+d):a("m",f,0),f=0,g=!1),C+1<c&&s[p+1]||(m+=a("h",E),E=0)):f++}return m}return yf.render=function(c,d,m){const f=n.getOptions(d),g=c.modules.size,E=c.modules.data,p=g+f.margin*2,C=f.color.light.a?"<path "+e(f.color.light,"fill")+' d="M0 0h'+p+"v"+p+'H0z"/>':"",N="<path "+e(f.color.dark,"stroke")+' d="'+i(E,g,f.margin)+'"/>',x='viewBox="0 0 '+p+" "+p+'"',T='<svg xmlns="http://www.w3.org/2000/svg" '+(f.width?'width="'+f.width+'" height="'+f.width+'" ':"")+x+' shape-rendering="crispEdges">'+C+N+`</svg>
`;return typeof m=="function"&&m(null,T),T},yf}var AE;function V2(){if(AE)return lo;AE=1;const n=C2(),e=H2(),a=z2(),i=Q2();function s(c,d,m,f,g){const E=[].slice.call(arguments,1),p=E.length,C=typeof E[p-1]=="function";if(!C&&!n())throw new Error("Callback required as last argument");if(C){if(p<2)throw new Error("Too few arguments provided");p===2?(g=m,m=d,d=f=void 0):p===3&&(d.getContext&&typeof g>"u"?(g=f,f=void 0):(g=f,f=m,m=d,d=void 0))}else{if(p<1)throw new Error("Too few arguments provided");return p===1?(m=d,d=f=void 0):p===2&&!d.getContext&&(f=m,m=d,d=void 0),new Promise(function(N,x){try{const S=e.create(m,f);N(c(S,d,f))}catch(S){x(S)}})}try{const N=e.create(m,f);g(null,c(N,d,f))}catch(N){g(N)}}return lo.create=e.create,lo.toCanvas=s.bind(null,a.render),lo.toDataURL=s.bind(null,a.renderToDataURL),lo.toString=s.bind(null,function(c,d,m){return i.render(c,m)}),lo}var G2=V2();const K2=Ji(G2),tr=({isOpen:n,onClose:e,title:a,children:i,maxWidth:s="max-w-md",showCloseButton:c=!0,footer:d,showHeaderBorder:m=!0,bodyClassName:f="px-6 py-4"})=>{const{t:g}=Ze(),E=I.useCallback(C=>{C.key==="Escape"&&e()},[e]);if(I.useEffect(()=>{if(n)return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}},[n,E]),!n)return null;const p=C=>{C.target===C.currentTarget&&e()};return l.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[l.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-80 transition-opacity",onClick:e}),l.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:p,children:l.jsxs("div",{className:`relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow-xl transition-all w-full ${s} mx-4`,children:[a&&l.jsxs("div",{className:`px-6 py-4 flex items-center justify-between ${m?"border-b border-gray-200 dark:border-gray-700":""}`,children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:a}),c&&l.jsxs("button",{type:"button",className:"text-gray-400 hover:text-gray-500 focus:outline-none",onClick:e,children:[l.jsx("span",{className:"sr-only",children:g("common.close")}),l.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})]}),!a&&c&&l.jsxs("button",{type:"button",className:"absolute top-3 right-3 text-gray-400 hover:text-gray-500 focus:outline-none z-10",onClick:e,children:[l.jsx("span",{className:"sr-only",children:g("common.close")}),l.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]}),l.jsx("div",{className:f,children:i}),d&&l.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:d})]})})]})};var Fn=(n=>(n.TIMEOUT="TIMEOUT",n.GENERIC="GENERIC",n))(Fn||{}),Ef={},xl={},pE;function q2(){if(pE)return xl;pE=1,xl.byteLength=m,xl.toByteArray=g,xl.fromByteArray=C;for(var n=[],e=[],a=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=i.length;s<c;++s)n[s]=i[s],e[i.charCodeAt(s)]=s;e[45]=62,e[95]=63;function d(N){var x=N.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=N.indexOf("=");S===-1&&(S=x);var T=S===x?0:4-S%4;return[S,T]}function m(N){var x=d(N),S=x[0],T=x[1];return(S+T)*3/4-T}function f(N,x,S){return(x+S)*3/4-S}function g(N){var x,S=d(N),T=S[0],k=S[1],U=new a(f(N,T,k)),R=0,P=k>0?T-4:T,M;for(M=0;M<P;M+=4)x=e[N.charCodeAt(M)]<<18|e[N.charCodeAt(M+1)]<<12|e[N.charCodeAt(M+2)]<<6|e[N.charCodeAt(M+3)],U[R++]=x>>16&255,U[R++]=x>>8&255,U[R++]=x&255;return k===2&&(x=e[N.charCodeAt(M)]<<2|e[N.charCodeAt(M+1)]>>4,U[R++]=x&255),k===1&&(x=e[N.charCodeAt(M)]<<10|e[N.charCodeAt(M+1)]<<4|e[N.charCodeAt(M+2)]>>2,U[R++]=x>>8&255,U[R++]=x&255),U}function E(N){return n[N>>18&63]+n[N>>12&63]+n[N>>6&63]+n[N&63]}function p(N,x,S){for(var T,k=[],U=x;U<S;U+=3)T=(N[U]<<16&16711680)+(N[U+1]<<8&65280)+(N[U+2]&255),k.push(E(T));return k.join("")}function C(N){for(var x,S=N.length,T=S%3,k=[],U=16383,R=0,P=S-T;R<P;R+=U)k.push(p(N,R,R+U>P?P:R+U));return T===1?(x=N[S-1],k.push(n[x>>2]+n[x<<4&63]+"==")):T===2&&(x=(N[S-2]<<8)+N[S-1],k.push(n[x>>10]+n[x>>4&63]+n[x<<2&63]+"=")),k.join("")}return xl}var Nu={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var yE;function W2(){return yE||(yE=1,Nu.read=function(n,e,a,i,s){var c,d,m=s*8-i-1,f=(1<<m)-1,g=f>>1,E=-7,p=a?s-1:0,C=a?-1:1,N=n[e+p];for(p+=C,c=N&(1<<-E)-1,N>>=-E,E+=m;E>0;c=c*256+n[e+p],p+=C,E-=8);for(d=c&(1<<-E)-1,c>>=-E,E+=i;E>0;d=d*256+n[e+p],p+=C,E-=8);if(c===0)c=1-g;else{if(c===f)return d?NaN:(N?-1:1)*(1/0);d=d+Math.pow(2,i),c=c-g}return(N?-1:1)*d*Math.pow(2,c-i)},Nu.write=function(n,e,a,i,s,c){var d,m,f,g=c*8-s-1,E=(1<<g)-1,p=E>>1,C=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,N=i?0:c-1,x=i?1:-1,S=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(m=isNaN(e)?1:0,d=E):(d=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-d))<1&&(d--,f*=2),d+p>=1?e+=C/f:e+=C*Math.pow(2,1-p),e*f>=2&&(d++,f/=2),d+p>=E?(m=0,d=E):d+p>=1?(m=(e*f-1)*Math.pow(2,s),d=d+p):(m=e*Math.pow(2,p-1)*Math.pow(2,s),d=0));s>=8;n[a+N]=m&255,N+=x,m/=256,s-=8);for(d=d<<s|m,g+=s;g>0;n[a+N]=d&255,N+=x,d/=256,g-=8);n[a+N-x]|=S*128}),Nu}/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var EE;function Y2(){return EE||(EE=1,function(n){const e=q2(),a=W2(),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=m,n.SlowBuffer=U,n.INSPECT_MAX_BYTES=50;const s=2147483647;n.kMaxLength=s,m.TYPED_ARRAY_SUPPORT=c(),!m.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 c(){try{const B=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(B,v),B.foo()===42}catch{return!1}}Object.defineProperty(m.prototype,"parent",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.buffer}}),Object.defineProperty(m.prototype,"offset",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.byteOffset}});function d(B){if(B>s)throw new RangeError('The value "'+B+'" is invalid for option "size"');const v=new Uint8Array(B);return Object.setPrototypeOf(v,m.prototype),v}function m(B,v,w){if(typeof B=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(B)}return f(B,v,w)}m.poolSize=8192;function f(B,v,w){if(typeof B=="string")return C(B,v);if(ArrayBuffer.isView(B))return x(B);if(B==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof B);if(ut(B,ArrayBuffer)||B&&ut(B.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ut(B,SharedArrayBuffer)||B&&ut(B.buffer,SharedArrayBuffer)))return S(B,v,w);if(typeof B=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const z=B.valueOf&&B.valueOf();if(z!=null&&z!==B)return m.from(z,v,w);const ae=T(B);if(ae)return ae;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof B[Symbol.toPrimitive]=="function")return m.from(B[Symbol.toPrimitive]("string"),v,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof B)}m.from=function(B,v,w){return f(B,v,w)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array);function g(B){if(typeof B!="number")throw new TypeError('"size" argument must be of type number');if(B<0)throw new RangeError('The value "'+B+'" is invalid for option "size"')}function E(B,v,w){return g(B),B<=0?d(B):v!==void 0?typeof w=="string"?d(B).fill(v,w):d(B).fill(v):d(B)}m.alloc=function(B,v,w){return E(B,v,w)};function p(B){return g(B),d(B<0?0:k(B)|0)}m.allocUnsafe=function(B){return p(B)},m.allocUnsafeSlow=function(B){return p(B)};function C(B,v){if((typeof v!="string"||v==="")&&(v="utf8"),!m.isEncoding(v))throw new TypeError("Unknown encoding: "+v);const w=R(B,v)|0;let z=d(w);const ae=z.write(B,v);return ae!==w&&(z=z.slice(0,ae)),z}function N(B){const v=B.length<0?0:k(B.length)|0,w=d(v);for(let z=0;z<v;z+=1)w[z]=B[z]&255;return w}function x(B){if(ut(B,Uint8Array)){const v=new Uint8Array(B);return S(v.buffer,v.byteOffset,v.byteLength)}return N(B)}function S(B,v,w){if(v<0||B.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(B.byteLength<v+(w||0))throw new RangeError('"length" is outside of buffer bounds');let z;return v===void 0&&w===void 0?z=new Uint8Array(B):w===void 0?z=new Uint8Array(B,v):z=new Uint8Array(B,v,w),Object.setPrototypeOf(z,m.prototype),z}function T(B){if(m.isBuffer(B)){const v=k(B.length)|0,w=d(v);return w.length===0||B.copy(w,0,0,v),w}if(B.length!==void 0)return typeof B.length!="number"||Mt(B.length)?d(0):N(B);if(B.type==="Buffer"&&Array.isArray(B.data))return N(B.data)}function k(B){if(B>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return B|0}function U(B){return+B!=B&&(B=0),m.alloc(+B)}m.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==m.prototype},m.compare=function(v,w){if(ut(v,Uint8Array)&&(v=m.from(v,v.offset,v.byteLength)),ut(w,Uint8Array)&&(w=m.from(w,w.offset,w.byteLength)),!m.isBuffer(v)||!m.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===w)return 0;let z=v.length,ae=w.length;for(let he=0,be=Math.min(z,ae);he<be;++he)if(v[he]!==w[he]){z=v[he],ae=w[he];break}return z<ae?-1:ae<z?1:0},m.isEncoding=function(v){switch(String(v).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}},m.concat=function(v,w){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return m.alloc(0);let z;if(w===void 0)for(w=0,z=0;z<v.length;++z)w+=v[z].length;const ae=m.allocUnsafe(w);let he=0;for(z=0;z<v.length;++z){let be=v[z];if(ut(be,Uint8Array))he+be.length>ae.length?(m.isBuffer(be)||(be=m.from(be)),be.copy(ae,he)):Uint8Array.prototype.set.call(ae,be,he);else if(m.isBuffer(be))be.copy(ae,he);else throw new TypeError('"list" argument must be an Array of Buffers');he+=be.length}return ae};function R(B,v){if(m.isBuffer(B))return B.length;if(ArrayBuffer.isView(B)||ut(B,ArrayBuffer))return B.byteLength;if(typeof B!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof B);const w=B.length,z=arguments.length>2&&arguments[2]===!0;if(!z&&w===0)return 0;let ae=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return se(B).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return Qe(B).length;default:if(ae)return z?-1:se(B).length;v=(""+v).toLowerCase(),ae=!0}}m.byteLength=R;function P(B,v,w){let z=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,v>>>=0,w<=v))return"";for(B||(B="utf8");;)switch(B){case"hex":return ye(this,v,w);case"utf8":case"utf-8":return re(this,v,w);case"ascii":return ie(this,v,w);case"latin1":case"binary":return ce(this,v,w);case"base64":return J(this,v,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,v,w);default:if(z)throw new TypeError("Unknown encoding: "+B);B=(B+"").toLowerCase(),z=!0}}m.prototype._isBuffer=!0;function M(B,v,w){const z=B[v];B[v]=B[w],B[w]=z}m.prototype.swap16=function(){const v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<v;w+=2)M(this,w,w+1);return this},m.prototype.swap32=function(){const v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<v;w+=4)M(this,w,w+3),M(this,w+1,w+2);return this},m.prototype.swap64=function(){const v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<v;w+=8)M(this,w,w+7),M(this,w+1,w+6),M(this,w+2,w+5),M(this,w+3,w+4);return this},m.prototype.toString=function(){const v=this.length;return v===0?"":arguments.length===0?re(this,0,v):P.apply(this,arguments)},m.prototype.toLocaleString=m.prototype.toString,m.prototype.equals=function(v){if(!m.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:m.compare(this,v)===0},m.prototype.inspect=function(){let v="";const w=n.INSPECT_MAX_BYTES;return v=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(v+=" ... "),"<Buffer "+v+">"},i&&(m.prototype[i]=m.prototype.inspect),m.prototype.compare=function(v,w,z,ae,he){if(ut(v,Uint8Array)&&(v=m.from(v,v.offset,v.byteLength)),!m.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(w===void 0&&(w=0),z===void 0&&(z=v?v.length:0),ae===void 0&&(ae=0),he===void 0&&(he=this.length),w<0||z>v.length||ae<0||he>this.length)throw new RangeError("out of range index");if(ae>=he&&w>=z)return 0;if(ae>=he)return-1;if(w>=z)return 1;if(w>>>=0,z>>>=0,ae>>>=0,he>>>=0,this===v)return 0;let be=he-ae,Ue=z-w;const gt=Math.min(be,Ue),pt=this.slice(ae,he),wt=v.slice(w,z);for(let dt=0;dt<gt;++dt)if(pt[dt]!==wt[dt]){be=pt[dt],Ue=wt[dt];break}return be<Ue?-1:Ue<be?1:0};function j(B,v,w,z,ae){if(B.length===0)return-1;if(typeof w=="string"?(z=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,Mt(w)&&(w=ae?0:B.length-1),w<0&&(w=B.length+w),w>=B.length){if(ae)return-1;w=B.length-1}else if(w<0)if(ae)w=0;else return-1;if(typeof v=="string"&&(v=m.from(v,z)),m.isBuffer(v))return v.length===0?-1:Q(B,v,w,z,ae);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?ae?Uint8Array.prototype.indexOf.call(B,v,w):Uint8Array.prototype.lastIndexOf.call(B,v,w):Q(B,[v],w,z,ae);throw new TypeError("val must be string, number or Buffer")}function Q(B,v,w,z,ae){let he=1,be=B.length,Ue=v.length;if(z!==void 0&&(z=String(z).toLowerCase(),z==="ucs2"||z==="ucs-2"||z==="utf16le"||z==="utf-16le")){if(B.length<2||v.length<2)return-1;he=2,be/=2,Ue/=2,w/=2}function gt(wt,dt){return he===1?wt[dt]:wt.readUInt16BE(dt*he)}let pt;if(ae){let wt=-1;for(pt=w;pt<be;pt++)if(gt(B,pt)===gt(v,wt===-1?0:pt-wt)){if(wt===-1&&(wt=pt),pt-wt+1===Ue)return wt*he}else wt!==-1&&(pt-=pt-wt),wt=-1}else for(w+Ue>be&&(w=be-Ue),pt=w;pt>=0;pt--){let wt=!0;for(let dt=0;dt<Ue;dt++)if(gt(B,pt+dt)!==gt(v,dt)){wt=!1;break}if(wt)return pt}return-1}m.prototype.includes=function(v,w,z){return this.indexOf(v,w,z)!==-1},m.prototype.indexOf=function(v,w,z){return j(this,v,w,z,!0)},m.prototype.lastIndexOf=function(v,w,z){return j(this,v,w,z,!1)};function H(B,v,w,z){w=Number(w)||0;const ae=B.length-w;z?(z=Number(z),z>ae&&(z=ae)):z=ae;const he=v.length;z>he/2&&(z=he/2);let be;for(be=0;be<z;++be){const Ue=parseInt(v.substr(be*2,2),16);if(Mt(Ue))return be;B[w+be]=Ue}return be}function V(B,v,w,z){return Ye(se(v,B.length-w),B,w,z)}function G(B,v,w,z){return Ye(De(v),B,w,z)}function K(B,v,w,z){return Ye(Qe(v),B,w,z)}function $(B,v,w,z){return Ye(je(v,B.length-w),B,w,z)}m.prototype.write=function(v,w,z,ae){if(w===void 0)ae="utf8",z=this.length,w=0;else if(z===void 0&&typeof w=="string")ae=w,z=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(z)?(z=z>>>0,ae===void 0&&(ae="utf8")):(ae=z,z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const he=this.length-w;if((z===void 0||z>he)&&(z=he),v.length>0&&(z<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");ae||(ae="utf8");let be=!1;for(;;)switch(ae){case"hex":return H(this,v,w,z);case"utf8":case"utf-8":return V(this,v,w,z);case"ascii":case"latin1":case"binary":return G(this,v,w,z);case"base64":return K(this,v,w,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,v,w,z);default:if(be)throw new TypeError("Unknown encoding: "+ae);ae=(""+ae).toLowerCase(),be=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(B,v,w){return v===0&&w===B.length?e.fromByteArray(B):e.fromByteArray(B.slice(v,w))}function re(B,v,w){w=Math.min(B.length,w);const z=[];let ae=v;for(;ae<w;){const he=B[ae];let be=null,Ue=he>239?4:he>223?3:he>191?2:1;if(ae+Ue<=w){let gt,pt,wt,dt;switch(Ue){case 1:he<128&&(be=he);break;case 2:gt=B[ae+1],(gt&192)===128&&(dt=(he&31)<<6|gt&63,dt>127&&(be=dt));break;case 3:gt=B[ae+1],pt=B[ae+2],(gt&192)===128&&(pt&192)===128&&(dt=(he&15)<<12|(gt&63)<<6|pt&63,dt>2047&&(dt<55296||dt>57343)&&(be=dt));break;case 4:gt=B[ae+1],pt=B[ae+2],wt=B[ae+3],(gt&192)===128&&(pt&192)===128&&(wt&192)===128&&(dt=(he&15)<<18|(gt&63)<<12|(pt&63)<<6|wt&63,dt>65535&&dt<1114112&&(be=dt))}}be===null?(be=65533,Ue=1):be>65535&&(be-=65536,z.push(be>>>10&1023|55296),be=56320|be&1023),z.push(be),ae+=Ue}return X(z)}const Ae=4096;function X(B){const v=B.length;if(v<=Ae)return String.fromCharCode.apply(String,B);let w="",z=0;for(;z<v;)w+=String.fromCharCode.apply(String,B.slice(z,z+=Ae));return w}function ie(B,v,w){let z="";w=Math.min(B.length,w);for(let ae=v;ae<w;++ae)z+=String.fromCharCode(B[ae]&127);return z}function ce(B,v,w){let z="";w=Math.min(B.length,w);for(let ae=v;ae<w;++ae)z+=String.fromCharCode(B[ae]);return z}function ye(B,v,w){const z=B.length;(!v||v<0)&&(v=0),(!w||w<0||w>z)&&(w=z);let ae="";for(let he=v;he<w;++he)ae+=jt[B[he]];return ae}function _(B,v,w){const z=B.slice(v,w);let ae="";for(let he=0;he<z.length-1;he+=2)ae+=String.fromCharCode(z[he]+z[he+1]*256);return ae}m.prototype.slice=function(v,w){const z=this.length;v=~~v,w=w===void 0?z:~~w,v<0?(v+=z,v<0&&(v=0)):v>z&&(v=z),w<0?(w+=z,w<0&&(w=0)):w>z&&(w=z),w<v&&(w=v);const ae=this.subarray(v,w);return Object.setPrototypeOf(ae,m.prototype),ae};function q(B,v,w){if(B%1!==0||B<0)throw new RangeError("offset is not uint");if(B+v>w)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(v,w,z){v=v>>>0,w=w>>>0,z||q(v,w,this.length);let ae=this[v],he=1,be=0;for(;++be<w&&(he*=256);)ae+=this[v+be]*he;return ae},m.prototype.readUintBE=m.prototype.readUIntBE=function(v,w,z){v=v>>>0,w=w>>>0,z||q(v,w,this.length);let ae=this[v+--w],he=1;for(;w>0&&(he*=256);)ae+=this[v+--w]*he;return ae},m.prototype.readUint8=m.prototype.readUInt8=function(v,w){return v=v>>>0,w||q(v,1,this.length),this[v]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(v,w){return v=v>>>0,w||q(v,2,this.length),this[v]|this[v+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(v,w){return v=v>>>0,w||q(v,2,this.length),this[v]<<8|this[v+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(v,w){return v=v>>>0,w||q(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},m.prototype.readUint32BE=m.prototype.readUInt32BE=function(v,w){return v=v>>>0,w||q(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},m.prototype.readBigUInt64LE=Vt(function(v){v=v>>>0,et(v,"offset");const w=this[v],z=this[v+7];(w===void 0||z===void 0)&&nt(v,this.length-8);const ae=w+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24,he=this[++v]+this[++v]*2**8+this[++v]*2**16+z*2**24;return BigInt(ae)+(BigInt(he)<<BigInt(32))}),m.prototype.readBigUInt64BE=Vt(function(v){v=v>>>0,et(v,"offset");const w=this[v],z=this[v+7];(w===void 0||z===void 0)&&nt(v,this.length-8);const ae=w*2**24+this[++v]*2**16+this[++v]*2**8+this[++v],he=this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+z;return(BigInt(ae)<<BigInt(32))+BigInt(he)}),m.prototype.readIntLE=function(v,w,z){v=v>>>0,w=w>>>0,z||q(v,w,this.length);let ae=this[v],he=1,be=0;for(;++be<w&&(he*=256);)ae+=this[v+be]*he;return he*=128,ae>=he&&(ae-=Math.pow(2,8*w)),ae},m.prototype.readIntBE=function(v,w,z){v=v>>>0,w=w>>>0,z||q(v,w,this.length);let ae=w,he=1,be=this[v+--ae];for(;ae>0&&(he*=256);)be+=this[v+--ae]*he;return he*=128,be>=he&&(be-=Math.pow(2,8*w)),be},m.prototype.readInt8=function(v,w){return v=v>>>0,w||q(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},m.prototype.readInt16LE=function(v,w){v=v>>>0,w||q(v,2,this.length);const z=this[v]|this[v+1]<<8;return z&32768?z|4294901760:z},m.prototype.readInt16BE=function(v,w){v=v>>>0,w||q(v,2,this.length);const z=this[v+1]|this[v]<<8;return z&32768?z|4294901760:z},m.prototype.readInt32LE=function(v,w){return v=v>>>0,w||q(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},m.prototype.readInt32BE=function(v,w){return v=v>>>0,w||q(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},m.prototype.readBigInt64LE=Vt(function(v){v=v>>>0,et(v,"offset");const w=this[v],z=this[v+7];(w===void 0||z===void 0)&&nt(v,this.length-8);const ae=this[v+4]+this[v+5]*2**8+this[v+6]*2**16+(z<<24);return(BigInt(ae)<<BigInt(32))+BigInt(w+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24)}),m.prototype.readBigInt64BE=Vt(function(v){v=v>>>0,et(v,"offset");const w=this[v],z=this[v+7];(w===void 0||z===void 0)&&nt(v,this.length-8);const ae=(w<<24)+this[++v]*2**16+this[++v]*2**8+this[++v];return(BigInt(ae)<<BigInt(32))+BigInt(this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+z)}),m.prototype.readFloatLE=function(v,w){return v=v>>>0,w||q(v,4,this.length),a.read(this,v,!0,23,4)},m.prototype.readFloatBE=function(v,w){return v=v>>>0,w||q(v,4,this.length),a.read(this,v,!1,23,4)},m.prototype.readDoubleLE=function(v,w){return v=v>>>0,w||q(v,8,this.length),a.read(this,v,!0,52,8)},m.prototype.readDoubleBE=function(v,w){return v=v>>>0,w||q(v,8,this.length),a.read(this,v,!1,52,8)};function ee(B,v,w,z,ae,he){if(!m.isBuffer(B))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>ae||v<he)throw new RangeError('"value" argument is out of bounds');if(w+z>B.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(v,w,z,ae){if(v=+v,w=w>>>0,z=z>>>0,!ae){const Ue=Math.pow(2,8*z)-1;ee(this,v,w,z,Ue,0)}let he=1,be=0;for(this[w]=v&255;++be<z&&(he*=256);)this[w+be]=v/he&255;return w+z},m.prototype.writeUintBE=m.prototype.writeUIntBE=function(v,w,z,ae){if(v=+v,w=w>>>0,z=z>>>0,!ae){const Ue=Math.pow(2,8*z)-1;ee(this,v,w,z,Ue,0)}let he=z-1,be=1;for(this[w+he]=v&255;--he>=0&&(be*=256);)this[w+he]=v/be&255;return w+z},m.prototype.writeUint8=m.prototype.writeUInt8=function(v,w,z){return v=+v,w=w>>>0,z||ee(this,v,w,1,255,0),this[w]=v&255,w+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(v,w,z){return v=+v,w=w>>>0,z||ee(this,v,w,2,65535,0),this[w]=v&255,this[w+1]=v>>>8,w+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(v,w,z){return v=+v,w=w>>>0,z||ee(this,v,w,2,65535,0),this[w]=v>>>8,this[w+1]=v&255,w+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(v,w,z){return v=+v,w=w>>>0,z||ee(this,v,w,4,4294967295,0),this[w+3]=v>>>24,this[w+2]=v>>>16,this[w+1]=v>>>8,this[w]=v&255,w+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(v,w,z){return v=+v,w=w>>>0,z||ee(this,v,w,4,4294967295,0),this[w]=v>>>24,this[w+1]=v>>>16,this[w+2]=v>>>8,this[w+3]=v&255,w+4};function ne(B,v,w,z,ae){Ut(v,z,ae,B,w,7);let he=Number(v&BigInt(4294967295));B[w++]=he,he=he>>8,B[w++]=he,he=he>>8,B[w++]=he,he=he>>8,B[w++]=he;let be=Number(v>>BigInt(32)&BigInt(4294967295));return B[w++]=be,be=be>>8,B[w++]=be,be=be>>8,B[w++]=be,be=be>>8,B[w++]=be,w}function Ie(B,v,w,z,ae){Ut(v,z,ae,B,w,7);let he=Number(v&BigInt(4294967295));B[w+7]=he,he=he>>8,B[w+6]=he,he=he>>8,B[w+5]=he,he=he>>8,B[w+4]=he;let be=Number(v>>BigInt(32)&BigInt(4294967295));return B[w+3]=be,be=be>>8,B[w+2]=be,be=be>>8,B[w+1]=be,be=be>>8,B[w]=be,w+8}m.prototype.writeBigUInt64LE=Vt(function(v,w=0){return ne(this,v,w,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeBigUInt64BE=Vt(function(v,w=0){return Ie(this,v,w,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeIntLE=function(v,w,z,ae){if(v=+v,w=w>>>0,!ae){const gt=Math.pow(2,8*z-1);ee(this,v,w,z,gt-1,-gt)}let he=0,be=1,Ue=0;for(this[w]=v&255;++he<z&&(be*=256);)v<0&&Ue===0&&this[w+he-1]!==0&&(Ue=1),this[w+he]=(v/be>>0)-Ue&255;return w+z},m.prototype.writeIntBE=function(v,w,z,ae){if(v=+v,w=w>>>0,!ae){const gt=Math.pow(2,8*z-1);ee(this,v,w,z,gt-1,-gt)}let he=z-1,be=1,Ue=0;for(this[w+he]=v&255;--he>=0&&(be*=256);)v<0&&Ue===0&&this[w+he+1]!==0&&(Ue=1),this[w+he]=(v/be>>0)-Ue&255;return w+z},m.prototype.writeInt8=function(v,w,z){return v=+v,w=w>>>0,z||ee(this,v,w,1,127,-128),v<0&&(v=255+v+1),this[w]=v&255,w+1},m.prototype.writeInt16LE=function(v,w,z){return v=+v,w=w>>>0,z||ee(this,v,w,2,32767,-32768),this[w]=v&255,this[w+1]=v>>>8,w+2},m.prototype.writeInt16BE=function(v,w,z){return v=+v,w=w>>>0,z||ee(this,v,w,2,32767,-32768),this[w]=v>>>8,this[w+1]=v&255,w+2},m.prototype.writeInt32LE=function(v,w,z){return v=+v,w=w>>>0,z||ee(this,v,w,4,2147483647,-2147483648),this[w]=v&255,this[w+1]=v>>>8,this[w+2]=v>>>16,this[w+3]=v>>>24,w+4},m.prototype.writeInt32BE=function(v,w,z){return v=+v,w=w>>>0,z||ee(this,v,w,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[w]=v>>>24,this[w+1]=v>>>16,this[w+2]=v>>>8,this[w+3]=v&255,w+4},m.prototype.writeBigInt64LE=Vt(function(v,w=0){return ne(this,v,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),m.prototype.writeBigInt64BE=Vt(function(v,w=0){return Ie(this,v,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function we(B,v,w,z,ae,he){if(w+z>B.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function Re(B,v,w,z,ae){return v=+v,w=w>>>0,ae||we(B,v,w,4),a.write(B,v,w,z,23,4),w+4}m.prototype.writeFloatLE=function(v,w,z){return Re(this,v,w,!0,z)},m.prototype.writeFloatBE=function(v,w,z){return Re(this,v,w,!1,z)};function Be(B,v,w,z,ae){return v=+v,w=w>>>0,ae||we(B,v,w,8),a.write(B,v,w,z,52,8),w+8}m.prototype.writeDoubleLE=function(v,w,z){return Be(this,v,w,!0,z)},m.prototype.writeDoubleBE=function(v,w,z){return Be(this,v,w,!1,z)},m.prototype.copy=function(v,w,z,ae){if(!m.isBuffer(v))throw new TypeError("argument should be a Buffer");if(z||(z=0),!ae&&ae!==0&&(ae=this.length),w>=v.length&&(w=v.length),w||(w=0),ae>0&&ae<z&&(ae=z),ae===z||v.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(z<0||z>=this.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("sourceEnd out of bounds");ae>this.length&&(ae=this.length),v.length-w<ae-z&&(ae=v.length-w+z);const he=ae-z;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(w,z,ae):Uint8Array.prototype.set.call(v,this.subarray(z,ae),w),he},m.prototype.fill=function(v,w,z,ae){if(typeof v=="string"){if(typeof w=="string"?(ae=w,w=0,z=this.length):typeof z=="string"&&(ae=z,z=this.length),ae!==void 0&&typeof ae!="string")throw new TypeError("encoding must be a string");if(typeof ae=="string"&&!m.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);if(v.length===1){const be=v.charCodeAt(0);(ae==="utf8"&&be<128||ae==="latin1")&&(v=be)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(w<0||this.length<w||this.length<z)throw new RangeError("Out of range index");if(z<=w)return this;w=w>>>0,z=z===void 0?this.length:z>>>0,v||(v=0);let he;if(typeof v=="number")for(he=w;he<z;++he)this[he]=v;else{const be=m.isBuffer(v)?v:m.from(v,ae),Ue=be.length;if(Ue===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(he=0;he<z-w;++he)this[he+w]=be[he%Ue]}return this};const xe={};function ze(B,v,w){xe[B]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:v.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${B}]`,this.stack,delete this.name}get code(){return B}set code(ae){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ae,writable:!0})}toString(){return`${this.name} [${B}]: ${this.message}`}}}ze("ERR_BUFFER_OUT_OF_BOUNDS",function(B){return B?`${B} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ze("ERR_INVALID_ARG_TYPE",function(B,v){return`The "${B}" argument must be of type number. Received type ${typeof v}`},TypeError),ze("ERR_OUT_OF_RANGE",function(B,v,w){let z=`The value of "${B}" is out of range.`,ae=w;return Number.isInteger(w)&&Math.abs(w)>2**32?ae=At(String(w)):typeof w=="bigint"&&(ae=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(ae=At(ae)),ae+="n"),z+=` It must be ${v}. Received ${ae}`,z},RangeError);function At(B){let v="",w=B.length;const z=B[0]==="-"?1:0;for(;w>=z+4;w-=3)v=`_${B.slice(w-3,w)}${v}`;return`${B.slice(0,w)}${v}`}function Lt(B,v,w){et(v,"offset"),(B[v]===void 0||B[v+w]===void 0)&&nt(v,B.length-(w+1))}function Ut(B,v,w,z,ae,he){if(B>w||B<v){const be=typeof v=="bigint"?"n":"";let Ue;throw v===0||v===BigInt(0)?Ue=`>= 0${be} and < 2${be} ** ${(he+1)*8}${be}`:Ue=`>= -(2${be} ** ${(he+1)*8-1}${be}) and < 2 ** ${(he+1)*8-1}${be}`,new xe.ERR_OUT_OF_RANGE("value",Ue,B)}Lt(z,ae,he)}function et(B,v){if(typeof B!="number")throw new xe.ERR_INVALID_ARG_TYPE(v,"number",B)}function nt(B,v,w){throw Math.floor(B)!==B?(et(B,w),new xe.ERR_OUT_OF_RANGE("offset","an integer",B)):v<0?new xe.ERR_BUFFER_OUT_OF_BOUNDS:new xe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${v}`,B)}const Pt=/[^+/0-9A-Za-z-_]/g;function Ne(B){if(B=B.split("=")[0],B=B.trim().replace(Pt,""),B.length<2)return"";for(;B.length%4!==0;)B=B+"=";return B}function se(B,v){v=v||1/0;let w;const z=B.length;let ae=null;const he=[];for(let be=0;be<z;++be){if(w=B.charCodeAt(be),w>55295&&w<57344){if(!ae){if(w>56319){(v-=3)>-1&&he.push(239,191,189);continue}else if(be+1===z){(v-=3)>-1&&he.push(239,191,189);continue}ae=w;continue}if(w<56320){(v-=3)>-1&&he.push(239,191,189),ae=w;continue}w=(ae-55296<<10|w-56320)+65536}else ae&&(v-=3)>-1&&he.push(239,191,189);if(ae=null,w<128){if((v-=1)<0)break;he.push(w)}else if(w<2048){if((v-=2)<0)break;he.push(w>>6|192,w&63|128)}else if(w<65536){if((v-=3)<0)break;he.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((v-=4)<0)break;he.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return he}function De(B){const v=[];for(let w=0;w<B.length;++w)v.push(B.charCodeAt(w)&255);return v}function je(B,v){let w,z,ae;const he=[];for(let be=0;be<B.length&&!((v-=2)<0);++be)w=B.charCodeAt(be),z=w>>8,ae=w%256,he.push(ae),he.push(z);return he}function Qe(B){return e.toByteArray(Ne(B))}function Ye(B,v,w,z){let ae;for(ae=0;ae<z&&!(ae+w>=v.length||ae>=B.length);++ae)v[ae+w]=B[ae];return ae}function ut(B,v){return B instanceof v||B!=null&&B.constructor!=null&&B.constructor.name!=null&&B.constructor.name===v.name}function Mt(B){return B!==B}const jt=function(){const B="0123456789abcdef",v=new Array(256);for(let w=0;w<16;++w){const z=w*16;for(let ae=0;ae<16;++ae)v[z+ae]=B[w]+B[ae]}return v}();function Vt(B){return typeof BigInt>"u"?ia:B}function ia(){throw new Error("BigInt not supported")}}(Ef)),Ef}var ho=Y2();class Gt{static async deriveKeyFromPassword(e,a,i="Argon2Id",s='{"Iterations":2,"MemorySize":19456,"DegreeOfParallelism":1}'){const c=JSON.parse(s);try{if(i!=="Argon2Id")throw new Error("Unsupported encryption type");return(await Jb.hash({pass:e,salt:a,time:c.Iterations,mem:c.MemorySize,parallelism:c.DegreeOfParallelism,hashLen:32,type:2})).hash}catch(d){throw console.error("Argon2 hashing failed:",d),d}}static async symmetricEncrypt(e,a){if(!e)return e;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(a),g=>g.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["encrypt"]),s=crypto.getRandomValues(new Uint8Array(12)),d=new TextEncoder().encode(e),m=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,d),f=new Uint8Array(s.length+m.byteLength);return f.set(s,0),f.set(new Uint8Array(m),s.length),btoa(Array.from(f).map(g=>String.fromCharCode(g)).join(""))}static async symmetricDecrypt(e,a){if(!e)return e;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(a),g=>g.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),s=Uint8Array.from(atob(e),g=>g.charCodeAt(0)),c=s.slice(0,12),d=s.slice(12),m=await crypto.subtle.decrypt({name:"AES-GCM",iv:c},i,d);return new TextDecoder().decode(m)}static async symmetricDecryptBytes(e,a){if(!e||e.length===0)return e;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(a),m=>m.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),s=e.slice(0,12),c=e.slice(12),d=await crypto.subtle.decrypt({name:"AES-GCM",iv:s},i,c);return new Uint8Array(d)}static async generateRsaKeyPair(){const e=await crypto.subtle.generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!0,["encrypt","decrypt"]),a=await crypto.subtle.exportKey("jwk",e.publicKey),i=await crypto.subtle.exportKey("jwk",e.privateKey);return{publicKey:JSON.stringify(a),privateKey:JSON.stringify(i)}}static async encryptWithPublicKey(e,a){const i=await crypto.subtle.importKey("jwk",JSON.parse(a),{name:"RSA-OAEP",hash:"SHA-256"},!1,["encrypt"]),s=new TextEncoder().encode(e),c=await crypto.subtle.encrypt({name:"RSA-OAEP"},i,s);return btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(c))))}static async decryptWithPrivateKey(e,a){try{const i=await crypto.subtle.importKey("jwk",JSON.parse(a),{name:"RSA-OAEP",hash:"SHA-256"},!0,["decrypt"]),s=Uint8Array.from(atob(e),d=>d.charCodeAt(0)),c=await crypto.subtle.decrypt({name:"RSA-OAEP"},i,s);return new Uint8Array(c)}catch(i){throw console.error("RSA decryption failed:",i),new Error(`Failed to decrypt: ${i instanceof Error?i.message:"Unknown error"}`)}}static async decryptEmail(e,a){try{const i=a.find(m=>m.PublicKey===e.encryptionKey);if(!i)throw new Error("Encryption key not found");const s=await Gt.decryptWithPrivateKey(e.encryptedSymmetricKey,i.PrivateKey),c=ho.Buffer.from(s).toString("base64"),d={...e};return d.subject=await Gt.symmetricDecrypt(e.subject,c),d.fromDisplay=await Gt.symmetricDecrypt(e.fromDisplay,c),d.fromDomain=await Gt.symmetricDecrypt(e.fromDomain,c),d.fromLocal=await Gt.symmetricDecrypt(e.fromLocal,c),e.messageHtml&&(d.messageHtml=await Gt.symmetricDecrypt(e.messageHtml,c)),e.messagePlain&&(d.messagePlain=await Gt.symmetricDecrypt(e.messagePlain,c)),d}catch(i){throw new Error(i instanceof Error?i.message:"Failed to decrypt email")}}static async decryptEmailList(e,a){return Promise.all(e.map(async i=>{try{const s=a.find(f=>f.PublicKey===i.encryptionKey);if(!s)throw new Error("Encryption key not found");const c=await Gt.decryptWithPrivateKey(i.encryptedSymmetricKey,s.PrivateKey),d=ho.Buffer.from(c).toString("base64"),m={...i};return m.subject=await Gt.symmetricDecrypt(i.subject,d),m.fromDisplay=await Gt.symmetricDecrypt(i.fromDisplay,d),m.fromDomain=await Gt.symmetricDecrypt(i.fromDomain,d),m.fromLocal=await Gt.symmetricDecrypt(i.fromLocal,d),i.messagePreview&&(m.messagePreview=await Gt.symmetricDecrypt(i.messagePreview,d)),m}catch(s){throw new Error(s instanceof Error?s.message:"Failed to decrypt email")}}))}static async decryptAttachment(e,a,i){try{const s=i.find(m=>m.PublicKey===a.encryptionKey);if(!s)throw new Error("Encryption key not found");const c=await Gt.decryptWithPrivateKey(a.encryptedSymmetricKey,s.PrivateKey),d=ho.Buffer.from(c).toString("base64");return await Gt.symmetricDecryptBytes(e,d)}catch(s){throw new Error(s instanceof Error?s.message:"Failed to decrypt attachment")}}}class J2{constructor(e){qe(this,"webApi");qe(this,"pollingInterval",null);qe(this,"requestId",null);qe(this,"privateKey",null);this.webApi=e}async initiate(){try{const e=await Gt.generateRsaKeyPair();this.privateKey=e.privateKey;const a=await this.webApi.rawFetch("auth/mobile-login/initiate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientPublicKey:e.publicKey})});if(!a.ok)throw Fn.GENERIC;const i=await a.json();return this.requestId=i.requestId,this.requestId}catch(e){throw typeof e=="string"&&Object.values(Fn).includes(e)?e:Fn.GENERIC}}async startPolling(e,a){if(!this.requestId||!this.privateKey)throw new Error("Must call initiate() before starting polling");const i=async()=>{try{if(!this.requestId){this.stopPolling();return}const s=await this.webApi.rawFetch(`auth/mobile-login/poll/${this.requestId}`,{method:"GET"});if(!s.ok){if(s.status===404){this.stopPolling(),this.privateKey=null,this.requestId=null,a(Fn.TIMEOUT);return}throw new Error(`Polling failed: ${s.status}`)}const c=await s.json();if(c.fulfilled&&c.encryptedSymmetricKey){this.stopPolling();const d=await Gt.decryptWithPrivateKey(c.encryptedDecryptionKey,this.privateKey),m=ho.Buffer.from(d).toString("base64"),f=await Gt.decryptWithPrivateKey(c.encryptedSymmetricKey,this.privateKey),g=ho.Buffer.from(f).toString("base64"),E=await Gt.symmetricDecrypt(c.encryptedToken,g),p=await Gt.symmetricDecrypt(c.encryptedRefreshToken,g),C=await Gt.symmetricDecrypt(c.encryptedUsername,g);this.privateKey=null,this.requestId=null;const N=await this.webApi.rawFetch("auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:C})});if(!N.ok){a(Fn.GENERIC);return}const x=await N.json(),S={username:C,token:E,refreshToken:p,decryptionKey:m,salt:x.salt,encryptionType:x.encryptionType,encryptionSettings:x.encryptionSettings};e(S)}}catch{this.stopPolling(),this.privateKey=null,this.requestId=null,a(Fn.GENERIC)}};this.pollingInterval=setInterval(i,3e3),setTimeout(()=>{this.pollingInterval&&(this.stopPolling(),this.privateKey=null,this.requestId=null,a(Fn.TIMEOUT))},21e4)}stopPolling(){this.pollingInterval&&(clearInterval(this.pollingInterval),this.pollingInterval=null)}cleanup(){this.stopPolling(),this.privateKey=null,this.requestId=null}}const NI=({isOpen:n,onClose:e,onSuccess:a,webApi:i,mode:s="login"})=>{const{t:c}=Ze(),[d,m]=I.useState(null),[f,g]=I.useState(null),[E,p]=I.useState(120),C=I.useRef(null),N=I.useRef(null),x=R=>{switch(R){case Fn.TIMEOUT:return c("common.errors.mobileLoginRequestExpired");case Fn.GENERIC:default:return c("common.errors.unknownError")}};I.useEffect(()=>{if(d&&E>0&&n)return N.current=setInterval(()=>{p(R=>R<=1?(N.current&&clearInterval(N.current),0):R-1)},1e3),()=>{N.current&&clearInterval(N.current)}},[d,E,n]),I.useEffect(()=>n?((async()=>{try{g(null),m(null),p(120),C.current||(C.current=new J2(i));const M=`aliasvault://open/mobile-unlock/${await C.current.initiate()}`,j=await K2.toDataURL(M,{width:256,margin:2});m(j),await C.current.startPolling(async Q=>{try{await a(Q),S()}catch{m(null),g(Fn.GENERIC)}},Q=>{m(null),g(Q)})}catch(P){typeof P=="string"&&Object.values(Fn).includes(P)?g(P):g(Fn.GENERIC)}})(),()=>{C.current&&C.current.cleanup(),N.current&&clearInterval(N.current)}):void 0,[n]);const S=()=>{C.current&&C.current.cleanup(),N.current&&clearInterval(N.current),m(null),g(null),p(120),e()},T=R=>{const P=Math.floor(R/60),M=R%60;return`${P}:${M.toString().padStart(2,"0")}`},k=c(s==="unlock"?"auth.unlockWithMobile":"auth.loginWithMobile"),U=c("auth.scanQrCode");return l.jsxs(tr,{isOpen:n,onClose:S,title:k,showHeaderBorder:!1,bodyClassName:"px-6 pb-6",children:[l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:U}),f&&l.jsx("div",{className:"mb-4 p-3 bg-red-100 dark:bg-red-900/30 border border-red-400 dark:border-red-700 rounded text-red-700 dark:text-red-400 text-sm",children:x(f)}),d&&l.jsxs("div",{className:"flex flex-col items-center mb-4",children:[l.jsx("img",{src:d,alt:"QR Code",className:"border-4 border-gray-200 dark:border-gray-600 rounded mb-3"}),l.jsx("div",{className:"text-gray-700 dark:text-gray-300 text-sm font-medium",children:T(E)})]}),!d&&!f&&l.jsx("div",{className:"flex justify-center py-8",children:l.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}),l.jsx("button",{type:"button",onClick:S,className:"mt-4 w-full inline-flex 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",children:c("common.cancel")})]})};var Pa=(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.EYE="eye",n.EYE_OFF="eye_off",n))(Pa||{});const kh=({type:n,className:e="w-5 h-5"})=>({expand:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.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:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.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:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.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:l.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[l.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"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),reload:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.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:l.jsxs("svg",{className:e,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[l.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"}),l.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:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),plus:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),tab:l.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[l.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"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z"})]}),eye:l.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),l.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"})]}),eye_off:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.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"})})})[n]||null,xn=({onClick:n,title:e,iconType:a,variant:i="default",id:s})=>{const c={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 l.jsx("button",{id:s,onClick:n,className:`p-2 rounded-lg ${c[i]}`,title:e,children:l.jsx(kh,{type:a})})},CI=()=>{const[n,e]=I.useState(tn.DEFAULT_API_URL);return{apiUrl:n,setApiUrl:e,loadApiUrl:async()=>{const s=await Se.getItem("local:apiUrl");s&&s.length>0?e(s):e(tn.DEFAULT_API_URL)},getDisplayUrl:()=>{const s=n.replace("https://","").replace("http://","").replace(":443","").replace("/api","");return s==="app.aliasvault.net"?"aliasvault.net":s}}},X2=()=>{const{loadApiUrl:n,getDisplayUrl:e}=CI(),a=Ba(),{t:i}=Ze();I.useEffect(()=>{n()},[n]);const s=()=>{a("/auth-settings")};return l.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:["(",i("auth.connectingTo")," ",l.jsx("button",{onClick:s,type:"button",className:"text-orange-500 hover:text-orange-600 dark:text-orange-400 dark:hover:text-orange-500 underline",children:e()}),")"]})};let He;function kt(n){Gl===si.length&&si.push(si.length+1);const e=Gl;return Gl=si[e],si[e]=n,e}function Zf(n){const e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){const s=n.description;return s==null?"Symbol":`Symbol(${s})`}if(e=="function"){const s=n.name;return typeof s=="string"&&s.length>0?`Function(${s})`:"Function"}if(Array.isArray(n)){const s=n.length;let c="[";s>0&&(c+=Zf(n[0]));for(let d=1;d<s;d++)c+=", "+Zf(n[d]);return c+="]",c}const a=/\[object ([^\]]+)\]/.exec(toString.call(n));let i;if(a&&a.length>1)i=a[1];else return toString.call(n);if(i=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
${n.stack}`:i}function $2(n){n<132||(si[n]=Gl,Gl=n)}function bE(n,e){return n=n>>>0,Vl().subarray(n/1,n/1+e)}let ys=null;function _t(){return(ys===null||ys.buffer.detached===!0||ys.buffer.detached===void 0&&ys.buffer!==He.memory.buffer)&&(ys=new DataView(He.memory.buffer)),ys}function Tr(n,e){return n=n>>>0,eR(n,e)}let jl=null;function Vl(){return(jl===null||jl.byteLength===0)&&(jl=new Uint8Array(He.memory.buffer)),jl}function $e(n){return si[n]}function ps(n,e){try{return n.apply(this,e)}catch(a){He.__wbindgen_export3(kt(a))}}let si=new Array(128).fill(void 0);si.push(void 0,null,!0,!1);let Gl=si.length;function Nr(n){return n==null}function fn(n,e,a){if(a===void 0){const m=Kl.encode(n),f=e(m.length,1)>>>0;return Vl().subarray(f,f+m.length).set(m),an=m.length,f}let i=n.length,s=e(i,1)>>>0;const c=Vl();let d=0;for(;d<i;d++){const m=n.charCodeAt(d);if(m>127)break;c[s+d]=m}if(d!==i){d!==0&&(n=n.slice(d)),s=a(s,i,i=d+n.length*3,1)>>>0;const m=Vl().subarray(s+d,s+i),f=Kl.encodeInto(n,m);d+=f.written,s=a(s,i,d,1)>>>0}return an=d,s}function On(n){const e=$e(n);return $2(n),e}let Hu=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Hu.decode();const Z2=2146435072;let bf=0;function eR(n,e){return bf+=e,bf>=Z2&&(Hu=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Hu.decode(),bf=e),Hu.decode(Vl().subarray(n,n+e))}const Kl=new TextEncoder;"encodeInto"in Kl||(Kl.encodeInto=function(n,e){const a=Kl.encode(n);return e.set(a),{read:n.length,written:a.length}});let an=0;function tR(n){let e,a;try{const c=He.__wbindgen_add_to_stack_pointer(-16),d=fn(n,He.__wbindgen_export,He.__wbindgen_export2),m=an;He.extractDomain(c,d,m);var i=_t().getInt32(c+4*0,!0),s=_t().getInt32(c+4*1,!0);return e=i,a=s,Tr(i,s)}finally{He.__wbindgen_add_to_stack_pointer(16),He.__wbindgen_export4(e,a,1)}}function aR(n){let e,a;try{const c=He.__wbindgen_add_to_stack_pointer(-16),d=fn(n,He.__wbindgen_export,He.__wbindgen_export2),m=an;He.extractRootDomain(c,d,m);var i=_t().getInt32(c+4*0,!0),s=_t().getInt32(c+4*1,!0);return e=i,a=s,Tr(i,s)}finally{He.__wbindgen_add_to_stack_pointer(16),He.__wbindgen_export4(e,a,1)}}function nR(n){try{const s=He.__wbindgen_add_to_stack_pointer(-16);He.filterCredentials(s,kt(n));var e=_t().getInt32(s+4*0,!0),a=_t().getInt32(s+4*1,!0),i=_t().getInt32(s+4*2,!0);if(i)throw On(a);return On(e)}finally{He.__wbindgen_add_to_stack_pointer(16)}}function rR(n,e,a){let i,s;try{const p=He.__wbindgen_add_to_stack_pointer(-16),C=fn(n,He.__wbindgen_export,He.__wbindgen_export2),N=an,x=fn(e,He.__wbindgen_export,He.__wbindgen_export2),S=an,T=fn(a,He.__wbindgen_export,He.__wbindgen_export2),k=an;He.srpDerivePrivateKey(p,C,N,x,S,T,k);var c=_t().getInt32(p+4*0,!0),d=_t().getInt32(p+4*1,!0),m=_t().getInt32(p+4*2,!0),f=_t().getInt32(p+4*3,!0),g=c,E=d;if(f)throw g=0,E=0,On(m);return i=g,s=E,Tr(g,E)}finally{He.__wbindgen_add_to_stack_pointer(16),He.__wbindgen_export4(i,s,1)}}function iR(n,e,a,i,s){try{const f=He.__wbindgen_add_to_stack_pointer(-16),g=fn(n,He.__wbindgen_export,He.__wbindgen_export2),E=an,p=fn(e,He.__wbindgen_export,He.__wbindgen_export2),C=an,N=fn(a,He.__wbindgen_export,He.__wbindgen_export2),x=an,S=fn(i,He.__wbindgen_export,He.__wbindgen_export2),T=an,k=fn(s,He.__wbindgen_export,He.__wbindgen_export2),U=an;He.srpDeriveSession(f,g,E,p,C,N,x,S,T,k,U);var c=_t().getInt32(f+4*0,!0),d=_t().getInt32(f+4*1,!0),m=_t().getInt32(f+4*2,!0);if(m)throw On(d);return On(c)}finally{He.__wbindgen_add_to_stack_pointer(16)}}function sR(n){let e,a;try{const g=He.__wbindgen_add_to_stack_pointer(-16),E=fn(n,He.__wbindgen_export,He.__wbindgen_export2),p=an;He.srpDeriveVerifier(g,E,p);var i=_t().getInt32(g+4*0,!0),s=_t().getInt32(g+4*1,!0),c=_t().getInt32(g+4*2,!0),d=_t().getInt32(g+4*3,!0),m=i,f=s;if(d)throw m=0,f=0,On(c);return e=m,a=f,Tr(m,f)}finally{He.__wbindgen_add_to_stack_pointer(16),He.__wbindgen_export4(e,a,1)}}function oR(){try{const i=He.__wbindgen_add_to_stack_pointer(-16);He.srpGenerateEphemeral(i);var n=_t().getInt32(i+4*0,!0),e=_t().getInt32(i+4*1,!0),a=_t().getInt32(i+4*2,!0);if(a)throw On(e);return On(n)}finally{He.__wbindgen_add_to_stack_pointer(16)}}function lR(){let n,e;try{const s=He.__wbindgen_add_to_stack_pointer(-16);He.srpGenerateSalt(s);var a=_t().getInt32(s+4*0,!0),i=_t().getInt32(s+4*1,!0);return n=a,e=i,Tr(a,i)}finally{He.__wbindgen_add_to_stack_pointer(16),He.__wbindgen_export4(n,e,1)}}const cR=new Set(["basic","cors","default"]);async function uR(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(i){if(n.ok&&cR.has(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",i);else throw i}const a=await n.arrayBuffer();return await WebAssembly.instantiate(a,e)}else{const a=await WebAssembly.instantiate(n,e);return a instanceof WebAssembly.Instance?{instance:a,module:n}:a}}function dR(){const n={};return n.wbg={},n.wbg.__wbg_Error_52673b7de5a0ca89=function(e,a){const i=Error(Tr(e,a));return kt(i)},n.wbg.__wbg_Number_2d1dcfcf4ec51736=function(e){return Number($e(e))},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,a){const i=String($e(a)),s=fn(i,He.__wbindgen_export,He.__wbindgen_export2),c=an;_t().setInt32(e+4*1,c,!0),_t().setInt32(e+4*0,s,!0)},n.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d=function(e,a){const i=$e(a),s=typeof i=="bigint"?i:void 0;_t().setBigInt64(e+8*1,Nr(s)?BigInt(0):s,!0),_t().setInt32(e+4*0,!Nr(s),!0)},n.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b=function(e){const a=$e(e),i=typeof a=="boolean"?a:void 0;return Nr(i)?16777215:i?1:0},n.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6=function(e,a){const i=Zf($e(a)),s=fn(i,He.__wbindgen_export,He.__wbindgen_export2),c=an;_t().setInt32(e+4*1,c,!0),_t().setInt32(e+4*0,s,!0)},n.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317=function(e,a){return $e(e)in $e(a)},n.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27=function(e){return typeof $e(e)=="bigint"},n.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd=function(e){return typeof $e(e)=="function"},n.wbg.__wbg___wbindgen_is_object_ce774f3490692386=function(e){const a=$e(e);return typeof a=="object"&&a!==null},n.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030=function(e){return typeof $e(e)=="string"},n.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269=function(e){return $e(e)===void 0},n.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36=function(e,a){return $e(e)===$e(a)},n.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d=function(e,a){return $e(e)==$e(a)},n.wbg.__wbg___wbindgen_number_get_9619185a74197f95=function(e,a){const i=$e(a),s=typeof i=="number"?i:void 0;_t().setFloat64(e+8*1,Nr(s)?0:s,!0),_t().setInt32(e+4*0,!Nr(s),!0)},n.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42=function(e,a){const i=$e(a),s=typeof i=="string"?i:void 0;var c=Nr(s)?0:fn(s,He.__wbindgen_export,He.__wbindgen_export2),d=an;_t().setInt32(e+4*1,d,!0),_t().setInt32(e+4*0,c,!0)},n.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(e,a){throw new Error(Tr(e,a))},n.wbg.__wbg_call_3020136f7a2d6e44=function(){return ps(function(e,a,i){const s=$e(e).call($e(a),$e(i));return kt(s)},arguments)},n.wbg.__wbg_call_abb4ff46ce38be40=function(){return ps(function(e,a){const i=$e(e).call($e(a));return kt(i)},arguments)},n.wbg.__wbg_crypto_86f2631e91b51511=function(e){const a=$e(e).crypto;return kt(a)},n.wbg.__wbg_done_62ea16af4ce34b24=function(e){return $e(e).done},n.wbg.__wbg_entries_83c79938054e065f=function(e){const a=Object.entries($e(e));return kt(a)},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,a){let i,s;try{i=e,s=a,console.error(Tr(e,a))}finally{He.__wbindgen_export4(i,s,1)}},n.wbg.__wbg_getRandomValues_b3f15fcbfabb0f8b=function(){return ps(function(e,a){$e(e).getRandomValues($e(a))},arguments)},n.wbg.__wbg_get_6b7bd52aca3f9671=function(e,a){const i=$e(e)[a>>>0];return kt(i)},n.wbg.__wbg_get_af9dab7e9603ea93=function(){return ps(function(e,a){const i=Reflect.get($e(e),$e(a));return kt(i)},arguments)},n.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,a){const i=$e(e)[$e(a)];return kt(i)},n.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355=function(e){let a;try{a=$e(e)instanceof ArrayBuffer}catch{a=!1}return a},n.wbg.__wbg_instanceof_Map_084be8da74364158=function(e){let a;try{a=$e(e)instanceof Map}catch{a=!1}return a},n.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434=function(e){let a;try{a=$e(e)instanceof Uint8Array}catch{a=!1}return a},n.wbg.__wbg_isArray_51fd9e6422c0a395=function(e){return Array.isArray($e(e))},n.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16=function(e){return Number.isSafeInteger($e(e))},n.wbg.__wbg_iterator_27b7c8b35ab3e86b=function(){return kt(Symbol.iterator)},n.wbg.__wbg_length_22ac23eaec9d8053=function(e){return $e(e).length},n.wbg.__wbg_length_d45040a40c570362=function(e){return $e(e).length},n.wbg.__wbg_msCrypto_d562bbe83e0d4b91=function(e){const a=$e(e).msCrypto;return kt(a)},n.wbg.__wbg_new_1ba21ce319a06297=function(){const e=new Object;return kt(e)},n.wbg.__wbg_new_25f239778d6112b9=function(){const e=new Array;return kt(e)},n.wbg.__wbg_new_6421f6084cc5bc5a=function(e){const a=new Uint8Array($e(e));return kt(a)},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){const e=new Error;return kt(e)},n.wbg.__wbg_new_b546ae120718850e=function(){return kt(new Map)},n.wbg.__wbg_new_no_args_cb138f77cf6151ee=function(e,a){const i=new Function(Tr(e,a));return kt(i)},n.wbg.__wbg_new_with_length_aa5eaf41d35235e5=function(e){const a=new Uint8Array(e>>>0);return kt(a)},n.wbg.__wbg_next_138a17bbf04e926c=function(e){const a=$e(e).next;return kt(a)},n.wbg.__wbg_next_3cfe5c0fe2a4cc53=function(){return ps(function(e){const a=$e(e).next();return kt(a)},arguments)},n.wbg.__wbg_node_e1f24f89a7336c2e=function(e){const a=$e(e).node;return kt(a)},n.wbg.__wbg_process_3975fd6c72f520aa=function(e){const a=$e(e).process;return kt(a)},n.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd=function(e,a,i){Uint8Array.prototype.set.call(bE(e,a),$e(i))},n.wbg.__wbg_randomFillSync_f8c153b79f285817=function(){return ps(function(e,a){$e(e).randomFillSync(On(a))},arguments)},n.wbg.__wbg_require_b74f47fc2d022fd6=function(){return ps(function(){const e=ev.require;return kt(e)},arguments)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,a,i){$e(e)[On(a)]=On(i)},n.wbg.__wbg_set_7df433eea03a5c14=function(e,a,i){$e(e)[a>>>0]=On(i)},n.wbg.__wbg_set_efaaf145b9377369=function(e,a,i){const s=$e(e).set($e(a),$e(i));return kt(s)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,a){const i=$e(a).stack,s=fn(i,He.__wbindgen_export,He.__wbindgen_export2),c=an;_t().setInt32(e+4*1,c,!0),_t().setInt32(e+4*0,s,!0)},n.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335=function(){const e=typeof global>"u"?null:global;return Nr(e)?0:kt(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1=function(){const e=typeof globalThis>"u"?null:globalThis;return Nr(e)?0:kt(e)},n.wbg.__wbg_static_accessor_SELF_08f5a74c69739274=function(){const e=typeof self>"u"?null:self;return Nr(e)?0:kt(e)},n.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024=function(){const e=typeof window>"u"?null:window;return Nr(e)?0:kt(e)},n.wbg.__wbg_subarray_845f2f5bce7d061a=function(e,a,i){const s=$e(e).subarray(a>>>0,i>>>0);return kt(s)},n.wbg.__wbg_value_57b7b035e117f7ee=function(e){const a=$e(e).value;return kt(a)},n.wbg.__wbg_versions_4e31226f5e8dc909=function(e){const a=$e(e).versions;return kt(a)},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,a){const i=Tr(e,a);return kt(i)},n.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(e){const a=BigInt.asUintN(64,e);return kt(a)},n.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return kt(e)},n.wbg.__wbindgen_cast_cb9088102bce6b30=function(e,a){const i=bE(e,a);return kt(i)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return kt(e)},n.wbg.__wbindgen_object_clone_ref=function(e){const a=$e(e);return kt(a)},n.wbg.__wbindgen_object_drop_ref=function(e){On(e)},n}function mR(n,e){return He=n.exports,Lh.__wbindgen_wasm_module=e,ys=null,jl=null,He.__wbindgen_start(),He}async function Lh(n){if(He!==void 0)return He;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("aliasvault_core_bg.wasm",self.location.href));const e=dR();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:a,module:i}=await uR(await n,e);return mR(a,i)}const Cu={type:"Argon2Id",settings:JSON.stringify({DegreeOfParallelism:1,MemorySize:19456,Iterations:2})},Ra=class Ra{static async initWasm(){if(!this.wasmInitialized)return this.wasmInitPromise?this.wasmInitPromise:(this.wasmInitPromise=(async()=>{try{const e=No.runtime.getURL("src/aliasvault_core_bg.wasm"),i=await(await fetch(e)).arrayBuffer();await Lh({module_or_path:i}),this.wasmInitialized=!0}catch(e){throw this.wasmInitPromise=null,e}})(),this.wasmInitPromise)}static normalizeUsername(e){return e.toLowerCase().trim()}static async generateSalt(){return await this.initWasm(),lR()}static bytesToHexString(e){return Array.from(e).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase()}static bytesToBase64(e){return btoa(String.fromCharCode(...e))}static async derivePrivateKey(e,a,i){return await this.initWasm(),rR(e,Ra.normalizeUsername(a),i)}static async deriveVerifier(e){return await this.initWasm(),sR(e)}static async generateEphemeral(){return await this.initWasm(),oR()}static async deriveSession(e,a,i,s,c){return await this.initWasm(),iR(e,a,i,Ra.normalizeUsername(s),c)}static async prepareCredentials(e,a,i,s){const c=await Gt.deriveKeyFromPassword(e,a,i,s);return{passwordHashString:Ra.bytesToHexString(c),passwordHashBase64:Ra.bytesToBase64(c)}}static generateSrpIdentity(){return crypto.randomUUID()}static async prepareRegistration(e,a){const i=Ra.normalizeUsername(e),s=await Ra.generateSalt(),c=Ra.generateSrpIdentity(),d=await Ra.prepareCredentials(a,s,Cu.type,Cu.settings),m=await Ra.derivePrivateKey(s,c,d.passwordHashString),f=await Ra.deriveVerifier(m);return{username:i,salt:s,verifier:f,encryptionType:Cu.type,encryptionSettings:Cu.settings,srpIdentity:c}}static async registerUser(e,a,i){try{const s=await Ra.prepareRegistration(a,i),c=e.replace(/\/$/,"")+"/v1/",d=await fetch(`${c}Auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!d.ok){const f=await d.text();let g=`Registration failed with status ${d.status}`;try{g=JSON.parse(f).title||g}catch{g=f||g}return{success:!1,error:g}}return{success:!0,token:await d.json()}}catch(s){return{success:!1,error:s instanceof Error?s.message:"Unknown error occurred"}}}static async login(e,a,i,s=!1){try{const c=e.replace(/\/$/,"")+"/v1/",d=Ra.normalizeUsername(a),m=await fetch(`${c}Auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:d})});if(!m.ok){const T=await m.text();try{return{success:!1,error:JSON.parse(T).title}}catch{return{success:!1,error:T||"Login initiation failed"}}}const f=await m.json(),g=f.srpIdentity??d,E=await Ra.prepareCredentials(i,f.salt,f.encryptionType,f.encryptionSettings),p=await Ra.generateEphemeral(),C=await Ra.derivePrivateKey(f.salt,g,E.passwordHashString),N=await Ra.deriveSession(p.secret,f.serverEphemeral,f.salt,g,C),x=await fetch(`${c}Auth/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:d,rememberMe:s,clientPublicEphemeral:p.public,clientSessionProof:N.proof})});if(!x.ok){const T=await x.text();try{return{success:!1,error:JSON.parse(T).title}}catch{return{success:!1,error:T||"Login validation failed"}}}const S=await x.json();return S.requiresTwoFactor?{success:!1,requiresTwoFactor:!0,loginResponse:f,passwordHashBase64:E.passwordHashBase64}:{success:!0,token:S.token,passwordHashBase64:E.passwordHashBase64,loginResponse:f}}catch(c){return{success:!1,error:c instanceof Error?c.message:"Unknown error occurred"}}}};qe(Ra,"wasmInitialized",!1),qe(Ra,"wasmInitPromise",null);let ln=Ra;class wI{constructor(e){qe(this,"webApiService");this.webApiService=e}async initiateLogin(e){const a=ln.normalizeUsername(e),i=await this.webApiService.rawFetch("Auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:a})});if(i.status===400){const c=await i.json();throw new Wi(c.title)}return await i.json()}async validateLogin(e,a,i,s){const c=ln.normalizeUsername(e),d=s.srpIdentity??c,m=await ln.generateEphemeral(),f=await ln.derivePrivateKey(s.salt,d,a),g=await ln.deriveSession(m.secret,s.serverEphemeral,s.salt,d,f),E={username:c,rememberMe:i,clientPublicEphemeral:m.public,clientSessionProof:g.proof},p=await this.webApiService.rawFetch("Auth/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)});if(p.status===400){const N=await p.json();throw new Wi(N.title)}return await p.json()}async validateLogin2Fa(e,a,i,s,c){const d=ln.normalizeUsername(e),m=s.srpIdentity??d,f=await ln.generateEphemeral(),g=await ln.derivePrivateKey(s.salt,m,a),E=await ln.deriveSession(f.secret,s.serverEphemeral,s.salt,m,g),p={username:d,rememberMe:i,clientPublicEphemeral:f.public,clientSessionProof:E.proof,code2Fa:c},C=await this.webApiService.rawFetch("Auth/validate-2fa",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)});if(C.status===400){const x=await C.json();throw new Wi(x.title)}return await C.json()}}var Xu=(n=>(n.UNKNOWN_ERROR="E-001",n.AUTH_STATUS_CHECK_FAILED="E-101",n.AUTH_STATUS_MIGRATION_CHECK_FAILED="E-102",n.AUTH_VERSION_CHECK_FAILED="E-103",n.VAULT_NOT_FOUND="E-201",n.VAULT_LOCKED="E-202",n.VAULT_DECRYPT_FAILED="E-203",n.VAULT_METADATA_READ_FAILED="E-204",n.ITEM_CREATE_FAILED="E-301",n.ITEM_UPDATE_FAILED="E-302",n.ITEM_DELETE_FAILED="E-303",n.ITEM_READ_FAILED="E-304",n.PASSKEY_CREATE_FAILED="E-401",n.PASSKEY_GET_FAILED="E-402",n.SYNC_STATUS_CHECK_FAILED="E-501",n.SYNC_VAULT_FETCH_FAILED="E-502",n.SYNC_VAULT_DECRYPT_FAILED="E-503",n.SYNC_STORE_FAILED="E-504",n.STORAGE_READ_FAILED="E-601",n.STORAGE_WRITE_FAILED="E-602",n.DATABASE_INIT_FAILED="E-603",n.ENCRYPTION_KEY_NOT_FOUND="E-604",n.MERGE_FAILED="E-701",n.MERGE_CONFLICT="E-702",n.MERGE_UPLOAD_FAILED="E-703",n.UPLOAD_FAILED="E-801",n.UPLOAD_OUTDATED="E-802",n.UPLOAD_ENCRYPT_FAILED="E-803",n.MIGRATION_CHECK_FAILED="E-901",n.VERSION_INCOMPATIBLE="E-902",n))(Xu||{});const gR=new Set(Object.values(Xu));function fR(n){return gR.has(n)}function $u(n){const e=n.match(/E-\d{3}/);return e&&fR(e[0])?e[0]:null}function Ao(n){return n instanceof Error?$u(n.message)!==null:typeof n=="string"?$u(n)!==null:!1}function qi(n,e){return n instanceof Error?n.message:typeof n=="string"?n:e}let If=!1;const hR=()=>{const{t:n}=Ze(),e=Ba(),a=mr(),i=Kt(),{setHeaderButtons:s}=gr(),[c,d]=I.useState({username:"",password:""}),{showLoading:m,hideLoading:f,setIsInitialLoading:g}=Aa(),[E,p]=I.useState(!0),[C,N]=I.useState(!1),[x,S]=I.useState(null),[T,k]=I.useState(null),[U,R]=I.useState(null),[P,M]=I.useState(!1),[j,Q]=I.useState(""),[H,V]=I.useState(null),[G,K]=I.useState(null),[$,J]=I.useState(!1),re=Dr(),Ae=new wI(re),X=async(ee,ne)=>{const Ie=await Se.getItem("local:encryptedVault"),we=await Se.getItem("local:serverRevision");let Re=ee.vault.blob;if(Ie&&we!==null)try{const xe=await Gt.symmetricDecrypt(Ie,ne);if(we>=ee.vault.currentRevisionNumber){console.info(`Existing vault is more advanced (rev ${we} >= ${ee.vault.currentRevisionNumber}), preserving local vault and will upload to server`),Re=Ie,await Bt("STORE_VAULT_METADATA",{publicEmailDomainList:ee.vault.publicEmailDomainList,privateEmailDomainList:ee.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:ee.vault.hiddenPrivateEmailDomainList},"background"),await i.loadDatabase(xe);return}console.info(`Server vault is more advanced (rev ${ee.vault.currentRevisionNumber} > ${we}), using server vault`)}catch{console.info("Existing vault could not be decrypted (password changed), using server vault")}await Bt("STORE_ENCRYPTED_VAULT",{vaultBlob:ee.vault.blob,serverRevision:ee.vault.currentRevisionNumber},"background"),await Bt("STORE_VAULT_METADATA",{publicEmailDomainList:ee.vault.publicEmailDomainList,privateEmailDomainList:ee.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:ee.vault.hiddenPrivateEmailDomainList},"background");const Be=await Gt.symmetricDecrypt(Re,ne);await i.loadDatabase(Be)},ie=async(ee,ne,Ie,we,Re)=>{const Be=await re.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${ne}`}});await a.setAuthTokens(ee,ne,Ie),await i.storeEncryptionKey(we),await i.storeEncryptionKeyDerivationParams({salt:Re.salt,encryptionType:Re.encryptionType,encryptionSettings:Re.encryptionSettings}),await X(Be,we),If=!1,e("/reinitialize",{replace:!0}),f()};I.useEffect(()=>{(async()=>{const ne=await Se.getItem("local:clientUrl");let Ie=tn.DEFAULT_CLIENT_URL;if(ne&&ne.length>0&&(Ie=ne),V(Ie),!If){If=!0;const we=await Se.getItem("local:username");we&&d(Re=>({...Re,username:we}))}g(!1)})()},[g]),I.useEffect(()=>{const ee=Ta.isPopup()?null:l.jsx(l.Fragment,{children:l.jsx(xn,{onClick:()=>Ta.openInNewPopup(),title:"Open in new window",iconType:Pa.EXPAND})});return s(ee),()=>{s(null)}},[s]);const ce=async ee=>{ee.preventDefault(),K(null);try{m(),a.clearGlobalMessage();const ne=ln.normalizeUsername(c.username),Ie=await Ae.initiateLogin(ne),{passwordHashString:we,passwordHashBase64:Re}=await ln.prepareCredentials(c.password,Ie.salt,Ie.encryptionType,Ie.encryptionSettings),Be=await Ae.validateLogin(ne,we,E,Ie);if(Be.requiresTwoFactor){S(Ie),k(we),R(Re),M(!0),f();return}if(!Be.token)throw new Error(n("common.errors.unknownError"));await ie(ne,Be.token.token,Be.token.refreshToken,Re,Ie)}catch(ne){ne instanceof Wi?K(n("common.apiErrors."+ne.message)):Ao(ne)?K(qi(ne,n("common.errors.serverError"))):K(n("common.errors.serverError")),f()}},ye=async ee=>{ee.preventDefault(),K(null);try{if(m(),!T||!U||!x)throw new Error(n("common.errors.unknownError"));const ne=j.trim();if(!/^\d{6}$/.test(ne))throw new Error(n("common.errors.invalidCode"));const Ie=ln.normalizeUsername(c.username),we=await Ae.validateLogin2Fa(Ie,T,E,x,parseInt(j));if(!we.token)throw new Error(n("common.errors.unknownError"));await ie(Ie,we.token.token,we.token.refreshToken,U,x),M(!1),Q(""),k(null),R(null),S(null)}catch(ne){console.error("2FA error:",ne),ne instanceof Wi?K(n("common.apiErrors."+ne.message)):Ao(ne)?K(qi(ne,n("common.errors.serverError"))):K(n("common.errors.serverError")),f()}},_=async ee=>{m();try{a.clearGlobalMessage();const ne=await re.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${ee.token}`}});await a.setAuthTokens(ee.username,ee.token,ee.refreshToken),await i.storeEncryptionKey(ee.decryptionKey),await i.storeEncryptionKeyDerivationParams({salt:ee.salt,encryptionType:ee.encryptionType,encryptionSettings:ee.encryptionSettings}),await X(ne,ee.decryptionKey),f(),g(!1),e("/reinitialize",{replace:!0})}catch(ne){throw K(ne instanceof Error?ne.message:n("common.errors.unknownError")),f(),ne}},q=ee=>{const{name:ne,value:Ie}=ee.target;d(we=>({...we,[ne]:Ie}))};return P?l.jsx("div",{children:l.jsxs("form",{onSubmit:ye,className:"bg-white dark:bg-gray-700 w-full shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[G&&l.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:G}),l.jsxs("div",{className:"mb-6",children:[l.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:n("auth.twoFactorTitle")}),l.jsx("label",{className:"block text-gray-700 dark:text-gray-200 text-sm font-bold mb-2",htmlFor:"twoFactorCode",children:n("auth.authCode")}),l.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:j,onChange:ee=>Q(ee.target.value),placeholder:n("auth.authCodePlaceholder"),required:!0})]}),l.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[l.jsx(ya,{type:"submit",children:n("auth.verify")}),l.jsx(ya,{type:"button",onClick:()=>{d({username:"",password:""}),M(!1),Q(""),k(null),R(null),S(null),K(null)},variant:"secondary",children:n("common.cancel")})]}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-4 text-center",children:n("auth.twoFactorNote")})]})}):l.jsx("div",{className:"flex flex-col items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-md",children:[l.jsxs("form",{onSubmit:ce,className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[l.jsxs("div",{className:"text-center mb-6",children:[l.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:n("auth.loginTitle")}),l.jsx(X2,{})]}),G&&l.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:G}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"username",children:n("auth.username")}),l.jsx("input",{className:"shadow appearance-none border rounded-lg w-full py-2 px-3 text-gray-700 dark:text-gray-200 dark:bg-gray-700 dark:border-gray-600 leading-tight focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",id:"username",type:"text",name:"username",placeholder:n("auth.usernamePlaceholder"),value:c.username,onChange:q,required:!0})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"password",children:n("common.password")}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{className:"shadow appearance-none border rounded-lg w-full py-2 px-3 pr-10 text-gray-700 dark:text-gray-200 dark:bg-gray-700 dark:border-gray-600 leading-tight focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",id:"password",type:C?"text":"password",name:"password",placeholder:n("auth.passwordPlaceholder"),value:c.password,onChange:q,required:!0}),l.jsx("button",{type:"button",className:"absolute right-2 top-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",onClick:()=>N(!C),tabIndex:-1,children:l.jsx(kh,{type:C?Pa.EYE_OFF:Pa.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),l.jsx("div",{className:"mb-6",children:l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"checkbox",checked:E,onChange:ee=>p(ee.target.checked),className:"mr-2"}),l.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-200",children:n("auth.rememberMe")})]})}),l.jsx(ya,{type:"submit",children:l.jsx("div",{className:"flex items-center justify-center gap-2",children:n("auth.loginButton")})}),l.jsxs("button",{type:"button",onClick:()=>J(!0),className:"w-full max-w-md mt-4 px-4 py-2 text-sm font-medium text-center text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 dark:bg-gray-600 dark:text-white dark:border-gray-500 dark:hover:bg-gray-500 dark:focus:ring-gray-700 flex items-center justify-center gap-2",children:[l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"})}),n("auth.loginWithMobile")]}),l.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[n("auth.noAccount")," ",l.jsx("a",{href:H??"",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")})]})]}),l.jsx(NI,{isOpen:$,onClose:()=>J(!1),onSuccess:_,webApi:re,mode:"login"})]})})},Es=({type:n,message:e,className:a=""})=>{const i=()=>{const s="p-3 border rounded-md text-sm";switch(n){case"error":return`${s} bg-red-100 dark:bg-red-900/30 border-red-300 dark:border-red-700 text-red-800 dark:text-red-300`;case"success":return`${s} bg-green-100 dark:bg-green-900/30 border-green-300 dark:border-green-700 text-green-800 dark:text-green-300`;case"warning":return`${s} bg-yellow-100 dark:bg-yellow-900/30 border-yellow-300 dark:border-yellow-700 text-yellow-800 dark:text-yellow-300`;case"info":return`${s} bg-blue-100 dark:bg-blue-900/30 border-blue-300 dark:border-blue-700 text-blue-800 dark:text-blue-300`;default:return s}};return l.jsx("div",{className:`${i()} ${a}`,children:e})},Rh=({isOpen:n,onClose:e,onConfirm:a})=>{const{t:i}=Ze(),[s,c]=I.useState(null),d=I.useCallback(async()=>{try{const m=await Bt("GET_SYNC_STATE",{},"background");c(m.isDirty)}catch(m){console.error("Failed to check sync state:",m),c(!1)}},[]);return I.useEffect(()=>{n&&(c(null),d())},[n,d]),!n||s===null?null:s?l.jsxs(tr,{isOpen:n,onClose:e,maxWidth:"max-w-sm",showHeaderBorder:!1,showCloseButton:!1,bodyClassName:"p-6",children:[l.jsxs("div",{className:"flex items-start mb-4",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("svg",{className:"h-6 w-6 text-amber-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.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"})})}),l.jsx("div",{className:"ml-3",children:l.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:i("logout.unsyncedChangesTitle")})})]}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:i("logout.unsyncedChangesWarning")}),l.jsxs("div",{className:"flex gap-3",children:[l.jsx("button",{onClick:e,className:"flex-1 px-4 py-2 bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-white rounded-md transition-colors",children:i("common.cancel")}),l.jsx("button",{onClick:a,className:"flex-1 px-4 py-2 bg-red-500 hover:bg-red-600 text-white rounded-md transition-colors",children:i("logout.logoutAnyway")})]})]}):l.jsxs(tr,{isOpen:n,onClose:e,maxWidth:"max-w-sm",showHeaderBorder:!1,showCloseButton:!1,bodyClassName:"p-6",children:[l.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:i("common.logout")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:i("auth.logoutConfirm")}),l.jsxs("div",{className:"flex gap-3",children:[l.jsx("button",{onClick:e,className:"flex-1 px-4 py-2 bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-white rounded-md transition-colors",children:i("common.cancel")}),l.jsx("button",{onClick:a,className:"flex-1 px-4 py-2 bg-red-500 hover:bg-red-600 text-white rounded-md transition-colors",children:i("common.logout")})]})]})},IE=()=>{var a;const{t:n}=Ze(),{username:e}=ac();return l.jsxs("div",{className:"flex flex-col items-center mb-6",children:[l.jsx("div",{className:"w-12 h-12 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center mb-3",children:l.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-2xl font-medium",children:((a=e==null?void 0:e[0])==null?void 0:a.toUpperCase())||"?"})}),l.jsx("p",{className:"font-medium text-gray-900 dark:text-white text-base",children:e}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n("common.loggedIn")})]})},AR=()=>{const{t:n}=Ze(),e=mr(),a=ac(),i=Kt(),s=Ba(),{setHeaderButtons:c}=gr(),d=Dr(),m=new wI(d),[f,g]=I.useState("password"),[E,p]=I.useState(!1),[C,N]=I.useState(""),[x,S]=I.useState(!1),[T,k]=I.useState(""),[U,R]=I.useState(6),P=I.useRef(null),M=I.useRef(null),[j,Q]=I.useState(null),{showLoading:H,hideLoading:V,setIsInitialLoading:G}=Aa(),[K,$]=I.useState(!1),[J,re]=I.useState(!1),Ae=async()=>{try{const Be=await d.getStatus();if(Be.serverVersion==="0.0.0")return G(!1),await i.setIsOffline(!0),{online:!1,error:null};const xe=d.validateStatusResponse(Be);return xe!==null?(await e.logout(n("common.errors."+xe)),{online:!1,error:xe}):(G(!1),await i.setIsOffline(!1),{online:!0,error:null})}catch{return G(!1),{online:!1,error:"sessionExpired"}}};I.useEffect(()=>{(async()=>{const[xe,ze]=await Promise.all([Xb(),IL()]);p(xe),R(ze||6),g(xe?"pin":"password"),await Ae()})()},[]),I.useEffect(()=>{const Be=Ta.isPopup()?null:l.jsx(xn,{onClick:()=>Ta.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Pa.EXPAND});return c(Be),()=>{c(null)}},[c,n]),I.useEffect(()=>{if(f!=="pin")return;const Be=()=>{P.current&&P.current.focus()},xe=()=>{Be()},ze=()=>{Be()};Be();const At=M.current;return At&&At.addEventListener("click",xe),window.addEventListener("focus",ze),()=>{At&&At.removeEventListener("click",xe),window.removeEventListener("focus",ze)}},[f]);const X=async Be=>{Be.preventDefault(),Q(null),H();const xe=await Ae();if(xe.error){V();return}try{let ze;if(xe.online){const Lt=await m.initiateLogin(a.username);ze=(await ln.prepareCredentials(C,Lt.salt,Lt.encryptionType,Lt.encryptionSettings)).passwordHashBase64,await i.storeEncryptionKeyDerivationParams({salt:Lt.salt,encryptionType:Lt.encryptionType,encryptionSettings:Lt.encryptionSettings})}else{const Lt=await Bt("GET_ENCRYPTION_KEY_DERIVATION_PARAMS",{},"background");if(!Lt){Q(n("common.errors.serverNotAvailable")),V();return}ze=(await ln.prepareCredentials(C,Lt.salt,Lt.encryptionType,Lt.encryptionSettings)).passwordHashBase64,await i.setIsOffline(!0)}await i.storeEncryptionKey(ze);const At=await i.loadStoredDatabase();if(!At)throw new Error(n("common.errors.wrongPassword"));if(await At.hasPendingMigrations()){s("/upgrade",{replace:!0}),V();return}await bt.setVaultLockedDismissUntil(0),await By(),s("/reinitialize",{replace:!0})}catch(ze){ze instanceof Yl?await e.logout(ze.message):Ao(ze)?$u(qi(ze,""))===Xu.VAULT_DECRYPT_FAILED?Q(n("common.errors.wrongPassword")):Q(qi(ze,n("common.errors.wrongPassword"))):Q(n("common.errors.wrongPassword")),console.error("Unlock error:",ze)}finally{V()}},ie=I.useCallback(async Be=>{k(Be),Q(null),Be.length===U&&(await new Promise(xe=>setTimeout(xe,50)),await _(Be))},[U]),ce=Be=>{T.length<8&&ie(T+Be)},ye=()=>{k(T.slice(0,-1)),Q(null)},_=async(Be=T)=>{if(Be.length===U){Q(null),H();try{const xe=await NL(Be);(await Ae()).online||await i.setIsOffline(!0),await i.storeEncryptionKey(xe);const At=await i.loadStoredDatabase();if(!At)throw new Wf(3);if(await At.hasPendingMigrations()){s("/upgrade",{replace:!0}),V();return}await bt.setVaultLockedDismissUntil(0),s("/reinitialize",{replace:!0}),V()}catch(xe){if(xe instanceof Ou)p(!1),g("password"),Q(n("settings.unlockMethod.pinLocked"));else if(xe instanceof Wf){const ze=xe.attemptsRemaining;Q(ze===1?n("settings.unlockMethod.incorrectPinSingular"):n("settings.unlockMethod.incorrectPin",{attemptsRemaining:ze})),k("")}else xe instanceof Jl?(Q(n("settings.unlockMethod.invalidPinFormat")),k("")):Ao(xe)?($u(qi(xe,""))===Xu.VAULT_DECRYPT_FAILED?(console.error("PIN unlock failed (decryption error):",xe),Q(n("settings.unlockMethod.incorrectPin",{attemptsRemaining:3}))):(console.error("PIN unlock failed:",xe),Q(qi(xe,n("common.errors.unknownErrorTryAgain")))),k("")):(console.error("PIN unlock failed:",xe),Q(n("common.errors.unknownErrorTryAgain")),k(""));V()}}},q=()=>{re(!0)},ee=async()=>{re(!1);try{await d.revokeTokens(),await a.clearAuthUserInitiated()}catch(Be){console.error("Error during logout:",Be)}},ne=async Be=>{H();try{await d.revokeTokens(),await a.setAuthTokens(Be.username,Be.token,Be.refreshToken),await i.storeEncryptionKey(Be.decryptionKey),await i.storeEncryptionKeyDerivationParams({salt:Be.salt,encryptionType:Be.encryptionType,encryptionSettings:Be.encryptionSettings});const xe=await i.loadStoredDatabase();if(!xe)throw new Error(n("common.errors.unknownErrorTryAgain"));if(await xe.hasPendingMigrations()){s("/upgrade",{replace:!0}),V();return}await bt.setVaultLockedDismissUntil(0),await By(),s("/reinitialize",{replace:!0})}catch(xe){xe instanceof Yl?await e.logout(xe.message):Ao(xe)?Q(qi(xe,n("common.errors.unknownErrorTryAgain"))):Q(n("common.errors.unknownErrorTryAgain")),console.error("Mobile unlock error:",xe)}finally{V()}},Ie=()=>{g("password"),Q(null)},we=()=>{g("pin"),Q(null)},Re=Array.from({length:U},(Be,xe)=>l.jsx("div",{className:`w-4 h-4 rounded-full border-2 transition-all ${xe<T.length?"bg-primary-500 border-primary-500":"bg-transparent border-gray-300 dark:border-gray-600"}`},xe));return f==="pin"?l.jsx("div",{ref:M,className:"flex flex-col items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-md",children:[l.jsx(IE,{}),l.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[l.jsxs("div",{className:"text-center mb-4",children:[l.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white mb-1",children:n("auth.unlockTitle")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("auth.enterPinToUnlock")})]}),l.jsx("div",{className:"flex justify-center gap-2 mb-4",children:Re}),j&&l.jsx(Es,{type:"error",message:j,className:"mb-3 text-center"}),l.jsx("input",{ref:P,type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:T,onChange:Be=>ie(Be.target.value.replace(/\D/g,"")),className:"w-0 h-0 opacity-0 absolute",autoFocus:!0,"aria-label":"PIN input"}),l.jsx("div",{children:l.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[[1,2,3,4,5,6,7,8,9].map(Be=>l.jsx("button",{type:"button",onClick:()=>ce(Be.toString()),className:"h-12 flex items-center justify-center text-xl font-semibold bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-white rounded-lg transition-colors active:scale-95",children:Be},Be)),l.jsx("div",{}),l.jsx("button",{type:"button",onClick:()=>ce("0"),className:"h-12 flex items-center justify-center text-xl font-semibold bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-white rounded-lg transition-colors active:scale-95",children:"0"}),l.jsx("button",{type:"button",onClick:ye,className:"h-12 flex items-center justify-center bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-white rounded-lg transition-colors active:scale-95","aria-label":"Backspace",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2M3 12l6.414 6.414a2 2 0 001.414.586H19a2 2 0 002-2V7a2 2 0 00-2-2h-8.172a2 2 0 00-1.414.586L3 12z"})})})]})})]}),l.jsx("div",{className:"mt-4",children:l.jsx("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:l.jsx("button",{type:"button",onClick:Ie,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:n("auth.useMasterPassword")})})})]})}):l.jsxs("div",{className:"flex flex-col items-center justify-center p-4",children:[l.jsxs("div",{className:"w-full max-w-md",children:[l.jsx(IE,{}),l.jsxs("form",{onSubmit:X,className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[l.jsx("div",{className:"text-center mb-6",children:l.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:n("auth.unlockTitle")})}),j&&l.jsx(Es,{type:"error",message:j,className:"mb-4 text-center"}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"password",children:n("auth.masterPassword")}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{className:"shadow appearance-none border rounded-lg w-full py-2 px-3 pr-10 text-gray-700 dark:text-gray-200 dark:bg-gray-700 dark:border-gray-600 leading-tight focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",id:"password",type:x?"text":"password",value:C,onChange:Be=>N(Be.target.value),placeholder:n("auth.passwordPlaceholder"),required:!0,autoFocus:!0}),l.jsx("button",{type:"button",className:"absolute right-2 top-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",onClick:()=>S(!x),tabIndex:-1,children:l.jsx(kh,{type:x?Pa.EYE_OFF:Pa.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),l.jsx(ya,{type:"submit",children:n("auth.unlockVault")}),!i.isOffline&&l.jsxs("button",{type:"button",onClick:()=>$(!0),className:"w-full max-w-md mt-4 px-4 py-2 text-sm font-medium text-center text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 dark:bg-gray-600 dark:text-white dark:border-gray-500 dark:hover:bg-gray-500 dark:focus:ring-gray-700 flex items-center justify-center gap-2",children:[l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"})}),n("auth.unlockWithMobile")]}),l.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[n("auth.switchAccounts")," ",l.jsx("button",{type:"button",onClick:q,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:n("common.logout")})]})]})]}),E&&l.jsx("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:l.jsx("button",{type:"button",onClick:we,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:n("auth.unlockWithPin")})}),l.jsx(NI,{isOpen:K,onClose:()=>$(!1),onSuccess:ne,webApi:d,mode:"unlock"}),l.jsx(Rh,{isOpen:J,onClose:()=>re(!1),onConfirm:ee})]})},pR=()=>{const n=Ba(),{t:e}=Ze(),a=()=>{const i=new URL(window.location.href);i.searchParams.delete("mode"),window.history.replaceState({},"",i),n("/items")};return l.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center",children:[l.jsx("div",{className:"mb-4 text-green-600 dark:text-green-400",children:l.jsx("svg",{className:"w-12 h-12 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})}),l.jsx("h2",{className:"text-xl font-semibold mb-4 text-gray-900 dark:text-white",children:e("auth.unlockSuccessTitle")}),l.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-400",children:e("auth.unlockSuccessDescription")}),l.jsxs("div",{className:"space-y-3 w-full",children:[l.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:e("auth.closePopup")}),l.jsx("button",{onClick:a,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:e("auth.browseVault")})]})]})},Zu=({isOpen:n,onClose:e,onConfirm:a,title:i,message:s,confirmText:c="",cancelText:d="",variant:m="default"})=>{const f=m==="danger"?"bg-red-600 hover:bg-red-700 focus:ring-red-500":"bg-primary-600 hover:bg-primary-700 focus:ring-primary-500";return l.jsxs(tr,{isOpen:n,onClose:e,maxWidth:"max-w-lg",showHeaderBorder:!1,bodyClassName:"px-4 pb-4 pt-5",children:[l.jsxs("div",{className:"sm:flex sm:items-start",children:[m==="danger"&&l.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:l.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:l.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"})})}),l.jsxs("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[l.jsx("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white",children:i}),l.jsx("div",{className:"mt-2",children:l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})})]})]}),l.jsxs("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[c&&l.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 ${f}`,onClick:a,children:c}),d&&l.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:e,children:d})]})]})};function Ss(){const n=Kt(),e=I.useCallback(async s=>{await s();const c=n.sqliteClient.exportToBase64(),d=await Bt("GET_ENCRYPTION_KEY",{},"background"),m=await Gt.symmetricEncrypt(c,d);await Bt("STORE_ENCRYPTED_VAULT",{vaultBlob:m,markDirty:!0},"background"),await n.refreshSyncState()},[n]),a=I.useCallback(()=>{Bt("FULL_VAULT_SYNC",{},"background").then(async s=>{s.hasNewVault&&await n.loadStoredDatabase(),await n.refreshSyncState()}).catch(s=>{console.error("Background sync error:",s)})},[n]);return{executeVaultMutationAsync:I.useCallback(async s=>{await e(s),a()},[e,a])}}const Dh=()=>{const{t:n}=Ze(),e=mr(),a=Kt();return{syncVault:I.useCallback(async(s={})=>{const{onSuccess:c,onError:d,onStatus:m,onOffline:f,onUpgradeRequired:g}=s;try{if(!await e.initializeAuth())return!1;m==null||m(n("common.checkingVaultUpdates"));const p=await Bt("FULL_VAULT_SYNC",{},"background");if(p.requiresLogout){const C=p.errorKey?n("common.errors."+p.errorKey):p.error;return await e.logout(C),!1}if(p.wasOffline)return await a.setIsOffline(!0),m==null||m(n("common.offlineMode")),f==null||f(),c==null||c(!1),!0;if(a.isOffline&&await a.setIsOffline(!1),p.upgradeRequired)return g==null||g(),!1;if(!p.success){const C=p.errorKey?n("common.errors."+p.errorKey):p.error??n("common.errors.unknownError");return d==null||d(C),!1}return p.hasNewVault&&(a.setIsSyncing(!0),m==null||m(n("common.syncingUpdatedVault")),await a.loadStoredDatabase()),await a.refreshSyncState(),c==null||c(p.hasNewVault),!0}catch(E){const p=E instanceof Error?E.message:"Unknown error during vault sync";return console.error("Vault sync error:",E),d==null||d(p),!1}finally{a.setIsSyncing(!1)}},[e,a,n])}},yR=()=>{var X;const{t:n}=Ze(),{username:e}=mr(),a=ac(),i=Kt(),{sqliteClient:s}=i,{setHeaderButtons:c}=gr(),[d,m]=I.useState(!1),[f,g]=I.useState(null),[E,p]=I.useState(null),[C,N]=I.useState(null),[x,S]=I.useState(!1),[T,k]=I.useState(!1),[U,R]=I.useState(!1),{setIsInitialLoading:P}=Aa(),M=Dr(),{executeVaultMutationAsync:j}=Ss(),{syncVault:Q}=Dh(),H=Ba();I.useEffect(()=>{const ie=Ta.isPopup()?null:l.jsx(l.Fragment,{children:l.jsx(xn,{onClick:()=>Ta.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Pa.EXPAND})});return c(ie),()=>{c(null)}},[c,n]);const V=I.useCallback(async()=>{try{if(s){const ie=await s.getDatabaseVersion(),ce=await s.getLatestDatabaseVersion();g(ie),p(ce)}}catch(ie){console.error("Failed to load version information:",ie),N(n("upgrade.alerts.unableToGetVersionInfo"))}finally{P(!1)}},[s,P,n]);I.useEffect(()=>{V()},[V]);const G=async()=>{if(!s||!f||!E){N(n("upgrade.alerts.unableToGetVersionInfo"));return}if(await M.isSelfHosted()){S(!0);return}await K()},K=async()=>{if(!s||!f||!E){N(n("upgrade.alerts.unableToGetVersionInfo"));return}m(!0),N(null);try{const ce=new Gf().getUpgradeVaultSql(f.revision,E.revision);if(!ce.success)throw new Error(ce.error??n("upgrade.alerts.upgradeFailed"));if(ce.sqlCommands.length===0){await $();return}await j(async()=>{for(let ye=0;ye<ce.sqlCommands.length;ye++){const _=ce.sqlCommands[ye];try{s.executeRaw(_)}catch(q){throw console.error(`Error executing SQL command ${ye+1}:`,_,q),new Error(n("upgrade.alerts.failedToApplyMigration",{current:ye+1,total:ce.sqlCommands.length}))}}}),await $()}catch(ie){console.error("Upgrade failed:",ie),N(ie instanceof Error?ie.message:n("common.errors.unknownError"))}finally{m(!1)}},$=async()=>{try{await Q({onSuccess:()=>{H("/items")},onError:ie=>{console.error("Sync error after upgrade:",ie),H("/items")}})}catch(ie){console.error("Error during post-upgrade sync:",ie),H("/items")}},J=()=>{R(!0)},re=async()=>{R(!1);try{await M.revokeTokens(),await a.clearAuthUserInitiated()}catch(ie){console.error("Error during logout:",ie)}},Ae=()=>{k(!0)};return l.jsxs("div",{children:[d&&l.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:[l.jsx(er,{}),l.jsx("div",{className:"text-sm text-gray-500 mt-2",children:n("upgrade.upgrading")})]}),l.jsx(Zu,{isOpen:x,onClose:()=>S(!1),onConfirm:()=>{S(!1),K()},title:n("upgrade.alerts.selfHostedServer"),message:n("upgrade.alerts.selfHostedWarning"),confirmText:n("upgrade.alerts.continueUpgrade"),cancelText:n("common.cancel")}),l.jsx(Zu,{isOpen:T,onClose:()=>k(!1),onConfirm:()=>k(!1),title:n("upgrade.whatsNew"),message:`${n("upgrade.whatsNewDescription")}

${(E==null?void 0:E.description)??n("upgrade.noDescriptionAvailable")}`}),l.jsxs("form",{className:"w-full px-2 pt-2 pb-2 mb-4",children:[C&&l.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400",children:C}),l.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:l.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((X=e==null?void 0:e[0])==null?void 0:X.toUpperCase())||"?"})})}),l.jsx("div",{children:l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:e})})]}),l.jsx("h2",{className:"text-xl font-bold dark:text-gray-200 mb-4",children:n("upgrade.title")}),l.jsxs("div",{className:"mb-6",children:[l.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:n("upgrade.subtitle")}),l.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded p-4 mb-4",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("span",{className:"font-medium text-gray-700 dark:text-gray-200",children:n("upgrade.versionInformation")}),l.jsx("button",{type:"button",onClick:Ae,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:"?"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("upgrade.yourVault")}),l.jsx("span",{className:"text-sm font-bold text-orange-600 dark:text-orange-400",children:(f==null?void 0:f.compatibleUpToVersion)??"..."})]}),l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("upgrade.newVersion")}),l.jsx("span",{className:"text-sm font-bold text-green-600 dark:text-green-400",children:(E==null?void 0:E.releaseVersion)??"..."})]})]})]})]}),l.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[l.jsx(ya,{type:"button",id:"upgrade-button",onClick:G,children:n(d?"upgrade.upgrading":"upgrade.upgrade")}),l.jsx("button",{type:"button",onClick:J,className:"text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 text-sm font-medium py-2",disabled:d,children:n("common.logout")})]})]}),l.jsx(Rh,{isOpen:U,onClose:()=>R(!1),onConfirm:re})]})};/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:xI,setPrototypeOf:vE,isFrozen:ER,getPrototypeOf:bR,getOwnPropertyDescriptor:IR}=Object;let{freeze:hn,seal:ar,create:eh}=Object,{apply:th,construct:ah}=typeof Reflect<"u"&&Reflect;hn||(hn=function(e){return e});ar||(ar=function(e){return e});th||(th=function(e,a){for(var i=arguments.length,s=new Array(i>2?i-2:0),c=2;c<i;c++)s[c-2]=arguments[c];return e.apply(a,s)});ah||(ah=function(e){for(var a=arguments.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=arguments[s];return new e(...i)});const wu=An(Array.prototype.forEach),vR=An(Array.prototype.lastIndexOf),NE=An(Array.prototype.pop),Sl=An(Array.prototype.push),NR=An(Array.prototype.splice),zu=An(String.prototype.toLowerCase),vf=An(String.prototype.toString),Nf=An(String.prototype.match),Tl=An(String.prototype.replace),CR=An(String.prototype.indexOf),wR=An(String.prototype.trim),cr=An(Object.prototype.hasOwnProperty),gn=An(RegExp.prototype.test),kl=xR(TypeError);function An(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var a=arguments.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=arguments[s];return th(n,e,i)}}function xR(n){return function(){for(var e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];return ah(n,a)}}function Tt(n,e){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zu;vE&&vE(n,null);let i=e.length;for(;i--;){let s=e[i];if(typeof s=="string"){const c=a(s);c!==s&&(ER(e)||(e[i]=c),s=c)}n[s]=!0}return n}function SR(n){for(let e=0;e<n.length;e++)cr(n,e)||(n[e]=null);return n}function wr(n){const e=eh(null);for(const[a,i]of xI(n))cr(n,a)&&(Array.isArray(i)?e[a]=SR(i):i&&typeof i=="object"&&i.constructor===Object?e[a]=wr(i):e[a]=i);return e}function Ll(n,e){for(;n!==null;){const i=IR(n,e);if(i){if(i.get)return An(i.get);if(typeof i.value=="function")return An(i.value)}n=bR(n)}function a(){return null}return a}const CE=hn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Cf=hn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wf=hn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),TR=hn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),xf=hn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),kR=hn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),wE=hn(["#text"]),xE=hn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Sf=hn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),SE=hn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xu=hn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),LR=ar(/\{\{[\w\W]*|[\w\W]*\}\}/gm),RR=ar(/<%[\w\W]*|[\w\W]*%>/gm),DR=ar(/\$\{[\w\W]*/gm),BR=ar(/^data-[\-\w.\u00B7-\uFFFF]+$/),UR=ar(/^aria-[\-\w]+$/),SI=ar(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),MR=ar(/^(?:\w+script|data):/i),_R=ar(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),TI=ar(/^html$/i),FR=ar(/^[a-z][.\w]*(-[.\w]+)+$/i);var TE=Object.freeze({__proto__:null,ARIA_ATTR:UR,ATTR_WHITESPACE:_R,CUSTOM_ELEMENT:FR,DATA_ATTR:BR,DOCTYPE_NAME:TI,ERB_EXPR:RR,IS_ALLOWED_URI:SI,IS_SCRIPT_OR_DATA:MR,MUSTACHE_EXPR:LR,TMPLIT_EXPR:DR});const Rl={element:1,text:3,progressingInstruction:7,comment:8,document:9},OR=function(){return typeof window>"u"?null:window},jR=function(e,a){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";a&&a.hasAttribute(s)&&(i=a.getAttribute(s));const c="dompurify"+(i?"#"+i:"");try{return e.createPolicy(c,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}},kE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function kI(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:OR();const e=Fe=>kI(Fe);if(e.version="3.3.1",e.removed=[],!n||!n.document||n.document.nodeType!==Rl.document||!n.Element)return e.isSupported=!1,e;let{document:a}=n;const i=a,s=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:d,Node:m,Element:f,NodeFilter:g,NamedNodeMap:E=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:p,DOMParser:C,trustedTypes:N}=n,x=f.prototype,S=Ll(x,"cloneNode"),T=Ll(x,"remove"),k=Ll(x,"nextSibling"),U=Ll(x,"childNodes"),R=Ll(x,"parentNode");if(typeof d=="function"){const Fe=a.createElement("template");Fe.content&&Fe.content.ownerDocument&&(a=Fe.content.ownerDocument)}let P,M="";const{implementation:j,createNodeIterator:Q,createDocumentFragment:H,getElementsByTagName:V}=a,{importNode:G}=i;let K=kE();e.isSupported=typeof xI=="function"&&typeof R=="function"&&j&&j.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:$,ERB_EXPR:J,TMPLIT_EXPR:re,DATA_ATTR:Ae,ARIA_ATTR:X,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:ce,CUSTOM_ELEMENT:ye}=TE;let{IS_ALLOWED_URI:_}=TE,q=null;const ee=Tt({},[...CE,...Cf,...wf,...xf,...wE]);let ne=null;const Ie=Tt({},[...xE,...Sf,...SE,...xu]);let we=Object.seal(eh(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,Be=null;const xe=Object.seal(eh(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ze=!0,At=!0,Lt=!1,Ut=!0,et=!1,nt=!0,Pt=!1,Ne=!1,se=!1,De=!1,je=!1,Qe=!1,Ye=!0,ut=!1;const Mt="user-content-";let jt=!0,Vt=!1,ia={},B=null;const v=Tt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let w=null;const z=Tt({},["audio","video","img","source","image","track"]);let ae=null;const he=Tt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),be="http://www.w3.org/1998/Math/MathML",Ue="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml";let pt=gt,wt=!1,dt=null;const fr=Tt({},[be,Ue,gt],vf);let sa=Tt({},["mi","mo","mn","ms","mtext"]),nn=Tt({},["annotation-xml"]);const Pn=Tt({},["title","style","font","a","script"]);let Hn=null;const Oe=["application/xhtml+xml","text/html"],ui="text/html";let ta=null,la=null;const nr=a.createElement("form"),rr=function(Z){return Z instanceof RegExp||Z instanceof Function},Ua=function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(la&&la===Z)){if((!Z||typeof Z!="object")&&(Z={}),Z=wr(Z),Hn=Oe.indexOf(Z.PARSER_MEDIA_TYPE)===-1?ui:Z.PARSER_MEDIA_TYPE,ta=Hn==="application/xhtml+xml"?vf:zu,q=cr(Z,"ALLOWED_TAGS")?Tt({},Z.ALLOWED_TAGS,ta):ee,ne=cr(Z,"ALLOWED_ATTR")?Tt({},Z.ALLOWED_ATTR,ta):Ie,dt=cr(Z,"ALLOWED_NAMESPACES")?Tt({},Z.ALLOWED_NAMESPACES,vf):fr,ae=cr(Z,"ADD_URI_SAFE_ATTR")?Tt(wr(he),Z.ADD_URI_SAFE_ATTR,ta):he,w=cr(Z,"ADD_DATA_URI_TAGS")?Tt(wr(z),Z.ADD_DATA_URI_TAGS,ta):z,B=cr(Z,"FORBID_CONTENTS")?Tt({},Z.FORBID_CONTENTS,ta):v,Re=cr(Z,"FORBID_TAGS")?Tt({},Z.FORBID_TAGS,ta):wr({}),Be=cr(Z,"FORBID_ATTR")?Tt({},Z.FORBID_ATTR,ta):wr({}),ia=cr(Z,"USE_PROFILES")?Z.USE_PROFILES:!1,ze=Z.ALLOW_ARIA_ATTR!==!1,At=Z.ALLOW_DATA_ATTR!==!1,Lt=Z.ALLOW_UNKNOWN_PROTOCOLS||!1,Ut=Z.ALLOW_SELF_CLOSE_IN_ATTR!==!1,et=Z.SAFE_FOR_TEMPLATES||!1,nt=Z.SAFE_FOR_XML!==!1,Pt=Z.WHOLE_DOCUMENT||!1,De=Z.RETURN_DOM||!1,je=Z.RETURN_DOM_FRAGMENT||!1,Qe=Z.RETURN_TRUSTED_TYPE||!1,se=Z.FORCE_BODY||!1,Ye=Z.SANITIZE_DOM!==!1,ut=Z.SANITIZE_NAMED_PROPS||!1,jt=Z.KEEP_CONTENT!==!1,Vt=Z.IN_PLACE||!1,_=Z.ALLOWED_URI_REGEXP||SI,pt=Z.NAMESPACE||gt,sa=Z.MATHML_TEXT_INTEGRATION_POINTS||sa,nn=Z.HTML_INTEGRATION_POINTS||nn,we=Z.CUSTOM_ELEMENT_HANDLING||{},Z.CUSTOM_ELEMENT_HANDLING&&rr(Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&rr(Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&typeof Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(we.allowCustomizedBuiltInElements=Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),et&&(At=!1),je&&(De=!0),ia&&(q=Tt({},wE),ne=[],ia.html===!0&&(Tt(q,CE),Tt(ne,xE)),ia.svg===!0&&(Tt(q,Cf),Tt(ne,Sf),Tt(ne,xu)),ia.svgFilters===!0&&(Tt(q,wf),Tt(ne,Sf),Tt(ne,xu)),ia.mathMl===!0&&(Tt(q,xf),Tt(ne,SE),Tt(ne,xu))),Z.ADD_TAGS&&(typeof Z.ADD_TAGS=="function"?xe.tagCheck=Z.ADD_TAGS:(q===ee&&(q=wr(q)),Tt(q,Z.ADD_TAGS,ta))),Z.ADD_ATTR&&(typeof Z.ADD_ATTR=="function"?xe.attributeCheck=Z.ADD_ATTR:(ne===Ie&&(ne=wr(ne)),Tt(ne,Z.ADD_ATTR,ta))),Z.ADD_URI_SAFE_ATTR&&Tt(ae,Z.ADD_URI_SAFE_ATTR,ta),Z.FORBID_CONTENTS&&(B===v&&(B=wr(B)),Tt(B,Z.FORBID_CONTENTS,ta)),Z.ADD_FORBID_CONTENTS&&(B===v&&(B=wr(B)),Tt(B,Z.ADD_FORBID_CONTENTS,ta)),jt&&(q["#text"]=!0),Pt&&Tt(q,["html","head","body"]),q.table&&(Tt(q,["tbody"]),delete Re.tbody),Z.TRUSTED_TYPES_POLICY){if(typeof Z.TRUSTED_TYPES_POLICY.createHTML!="function")throw kl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Z.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw kl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');P=Z.TRUSTED_TYPES_POLICY,M=P.createHTML("")}else P===void 0&&(P=jR(N,s)),P!==null&&typeof M=="string"&&(M=P.createHTML(""));hn&&hn(Z),la=Z}},qt=Tt({},[...Cf,...wf,...TR]),Ea=Tt({},[...xf,...kR]),Jt=function(Z){let Te=R(Z);(!Te||!Te.tagName)&&(Te={namespaceURI:pt,tagName:"template"});const Pe=zu(Z.tagName),Ft=zu(Te.tagName);return dt[Z.namespaceURI]?Z.namespaceURI===Ue?Te.namespaceURI===gt?Pe==="svg":Te.namespaceURI===be?Pe==="svg"&&(Ft==="annotation-xml"||sa[Ft]):!!qt[Pe]:Z.namespaceURI===be?Te.namespaceURI===gt?Pe==="math":Te.namespaceURI===Ue?Pe==="math"&&nn[Ft]:!!Ea[Pe]:Z.namespaceURI===gt?Te.namespaceURI===Ue&&!nn[Ft]||Te.namespaceURI===be&&!sa[Ft]?!1:!Ea[Pe]&&(Pn[Pe]||!qt[Pe]):!!(Hn==="application/xhtml+xml"&&dt[Z.namespaceURI]):!1},Ma=function(Z){Sl(e.removed,{element:Z});try{R(Z).removeChild(Z)}catch{T(Z)}},za=function(Z,Te){try{Sl(e.removed,{attribute:Te.getAttributeNode(Z),from:Te})}catch{Sl(e.removed,{attribute:null,from:Te})}if(Te.removeAttribute(Z),Z==="is")if(De||je)try{Ma(Te)}catch{}else try{Te.setAttribute(Z,"")}catch{}},Ur=function(Z){let Te=null,Pe=null;if(se)Z="<remove></remove>"+Z;else{const ca=Nf(Z,/^[\r\n\t ]+/);Pe=ca&&ca[0]}Hn==="application/xhtml+xml"&&pt===gt&&(Z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Z+"</body></html>");const Ft=P?P.createHTML(Z):Z;if(pt===gt)try{Te=new C().parseFromString(Ft,Hn)}catch{}if(!Te||!Te.documentElement){Te=j.createDocument(pt,"template",null);try{Te.documentElement.innerHTML=wt?M:Ft}catch{}}const da=Te.body||Te.documentElement;return Z&&Pe&&da.insertBefore(a.createTextNode(Pe),da.childNodes[0]||null),pt===gt?V.call(Te,Pt?"html":"body")[0]:Pt?Te.documentElement:da},le=function(Z){return Q.call(Z.ownerDocument||Z,Z,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},_e=function(Z){return Z instanceof p&&(typeof Z.nodeName!="string"||typeof Z.textContent!="string"||typeof Z.removeChild!="function"||!(Z.attributes instanceof E)||typeof Z.removeAttribute!="function"||typeof Z.setAttribute!="function"||typeof Z.namespaceURI!="string"||typeof Z.insertBefore!="function"||typeof Z.hasChildNodes!="function")},Me=function(Z){return typeof m=="function"&&Z instanceof m};function Xe(Fe,Z,Te){wu(Fe,Pe=>{Pe.call(e,Z,Te,la)})}const xt=function(Z){let Te=null;if(Xe(K.beforeSanitizeElements,Z,null),_e(Z))return Ma(Z),!0;const Pe=ta(Z.nodeName);if(Xe(K.uponSanitizeElement,Z,{tagName:Pe,allowedTags:q}),nt&&Z.hasChildNodes()&&!Me(Z.firstElementChild)&&gn(/<[/\w!]/g,Z.innerHTML)&&gn(/<[/\w!]/g,Z.textContent)||Z.nodeType===Rl.progressingInstruction||nt&&Z.nodeType===Rl.comment&&gn(/<[/\w]/g,Z.data))return Ma(Z),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(Pe))&&(!q[Pe]||Re[Pe])){if(!Re[Pe]&&rt(Pe)&&(we.tagNameCheck instanceof RegExp&&gn(we.tagNameCheck,Pe)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Pe)))return!1;if(jt&&!B[Pe]){const Ft=R(Z)||Z.parentNode,da=U(Z)||Z.childNodes;if(da&&Ft){const ca=da.length;for(let ua=ca-1;ua>=0;--ua){const Wa=S(da[ua],!0);Wa.__removalCount=(Z.__removalCount||0)+1,Ft.insertBefore(Wa,k(Z))}}}return Ma(Z),!0}return Z instanceof f&&!Jt(Z)||(Pe==="noscript"||Pe==="noembed"||Pe==="noframes")&&gn(/<\/no(script|embed|frames)/i,Z.innerHTML)?(Ma(Z),!0):(et&&Z.nodeType===Rl.text&&(Te=Z.textContent,wu([$,J,re],Ft=>{Te=Tl(Te,Ft," ")}),Z.textContent!==Te&&(Sl(e.removed,{element:Z.cloneNode()}),Z.textContent=Te)),Xe(K.afterSanitizeElements,Z,null),!1)},yt=function(Z,Te,Pe){if(Ye&&(Te==="id"||Te==="name")&&(Pe in a||Pe in nr))return!1;if(!(At&&!Be[Te]&&gn(Ae,Te))){if(!(ze&&gn(X,Te))){if(!(xe.attributeCheck instanceof Function&&xe.attributeCheck(Te,Z))){if(!ne[Te]||Be[Te]){if(!(rt(Z)&&(we.tagNameCheck instanceof RegExp&&gn(we.tagNameCheck,Z)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Z))&&(we.attributeNameCheck instanceof RegExp&&gn(we.attributeNameCheck,Te)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(Te,Z))||Te==="is"&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&gn(we.tagNameCheck,Pe)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Pe))))return!1}else if(!ae[Te]){if(!gn(_,Tl(Pe,ce,""))){if(!((Te==="src"||Te==="xlink:href"||Te==="href")&&Z!=="script"&&CR(Pe,"data:")===0&&w[Z])){if(!(Lt&&!gn(ie,Tl(Pe,ce,"")))){if(Pe)return!1}}}}}}}return!0},rt=function(Z){return Z!=="annotation-xml"&&Nf(Z,ye)},it=function(Z){Xe(K.beforeSanitizeAttributes,Z,null);const{attributes:Te}=Z;if(!Te||_e(Z))return;const Pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0};let Ft=Te.length;for(;Ft--;){const da=Te[Ft],{name:ca,namespaceURI:ua,value:Wa}=da,Ca=ta(ca),hr=Wa;let aa=ca==="value"?hr:wR(hr);if(Pe.attrName=Ca,Pe.attrValue=aa,Pe.keepAttr=!0,Pe.forceKeepAttr=void 0,Xe(K.uponSanitizeAttribute,Z,Pe),aa=Pe.attrValue,ut&&(Ca==="id"||Ca==="name")&&(za(ca,Z),aa=Mt+aa),nt&&gn(/((--!?|])>)|<\/(style|title|textarea)/i,aa)){za(ca,Z);continue}if(Ca==="attributename"&&Nf(aa,"href")){za(ca,Z);continue}if(Pe.forceKeepAttr)continue;if(!Pe.keepAttr){za(ca,Z);continue}if(!Ut&&gn(/\/>/i,aa)){za(ca,Z);continue}et&&wu([$,J,re],Mr=>{aa=Tl(aa,Mr," ")});const Sn=ta(Z.nodeName);if(!yt(Sn,Ca,aa)){za(ca,Z);continue}if(P&&typeof N=="object"&&typeof N.getAttributeType=="function"&&!ua)switch(N.getAttributeType(Sn,Ca)){case"TrustedHTML":{aa=P.createHTML(aa);break}case"TrustedScriptURL":{aa=P.createScriptURL(aa);break}}if(aa!==hr)try{ua?Z.setAttributeNS(ua,ca,aa):Z.setAttribute(ca,aa),_e(Z)?Ma(Z):NE(e.removed)}catch{za(ca,Z)}}Xe(K.afterSanitizeAttributes,Z,null)},un=function Fe(Z){let Te=null;const Pe=le(Z);for(Xe(K.beforeSanitizeShadowDOM,Z,null);Te=Pe.nextNode();)Xe(K.uponSanitizeShadowNode,Te,null),xt(Te),it(Te),Te.content instanceof c&&Fe(Te.content);Xe(K.afterSanitizeShadowDOM,Z,null)};return e.sanitize=function(Fe){let Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Te=null,Pe=null,Ft=null,da=null;if(wt=!Fe,wt&&(Fe="<!-->"),typeof Fe!="string"&&!Me(Fe))if(typeof Fe.toString=="function"){if(Fe=Fe.toString(),typeof Fe!="string")throw kl("dirty is not a string, aborting")}else throw kl("toString is not a function");if(!e.isSupported)return Fe;if(Ne||Ua(Z),e.removed=[],typeof Fe=="string"&&(Vt=!1),Vt){if(Fe.nodeName){const Wa=ta(Fe.nodeName);if(!q[Wa]||Re[Wa])throw kl("root node is forbidden and cannot be sanitized in-place")}}else if(Fe instanceof m)Te=Ur("<!---->"),Pe=Te.ownerDocument.importNode(Fe,!0),Pe.nodeType===Rl.element&&Pe.nodeName==="BODY"||Pe.nodeName==="HTML"?Te=Pe:Te.appendChild(Pe);else{if(!De&&!et&&!Pt&&Fe.indexOf("<")===-1)return P&&Qe?P.createHTML(Fe):Fe;if(Te=Ur(Fe),!Te)return De?null:Qe?M:""}Te&&se&&Ma(Te.firstChild);const ca=le(Vt?Fe:Te);for(;Ft=ca.nextNode();)xt(Ft),it(Ft),Ft.content instanceof c&&un(Ft.content);if(Vt)return Fe;if(De){if(je)for(da=H.call(Te.ownerDocument);Te.firstChild;)da.appendChild(Te.firstChild);else da=Te;return(ne.shadowroot||ne.shadowrootmode)&&(da=G.call(i,da,!0)),da}let ua=Pt?Te.outerHTML:Te.innerHTML;return Pt&&q["!doctype"]&&Te.ownerDocument&&Te.ownerDocument.doctype&&Te.ownerDocument.doctype.name&&gn(TI,Te.ownerDocument.doctype.name)&&(ua="<!DOCTYPE "+Te.ownerDocument.doctype.name+`>
`+ua),et&&wu([$,J,re],Wa=>{ua=Tl(ua,Wa," ")}),P&&Qe?P.createHTML(ua):ua},e.setConfig=function(){let Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ua(Fe),Ne=!0},e.clearConfig=function(){la=null,Ne=!1},e.isValidAttribute=function(Fe,Z,Te){la||Ua({});const Pe=ta(Fe),Ft=ta(Z);return yt(Pe,Ft,Te)},e.addHook=function(Fe,Z){typeof Z=="function"&&Sl(K[Fe],Z)},e.removeHook=function(Fe,Z){if(Z!==void 0){const Te=vR(K[Fe],Z);return Te===-1?void 0:NR(K[Fe],Te,1)[0]}return NE(K[Fe])},e.removeHooks=function(Fe){K[Fe]=[]},e.removeAllHooks=function(){K=kE()},e}var PR=kI();const HR={ALLOWED_TAGS:["div","span","p","br","hr","h1","h2","h3","h4","h5","h6","ul","ol","li","table","thead","tbody","tfoot","tr","th","td","a","img","b","i","u","s","strike","strong","em","small","sub","sup","blockquote","pre","code","font","center"],ALLOWED_ATTR:["style","class","id","width","height","align","valign","bgcolor","color","border","cellpadding","cellspacing","colspan","rowspan","face","size","href","target","rel","src","alt","title"],ALLOW_DATA_ATTR:!1,ADD_ATTR:["target"],FORBID_TAGS:["script","object","embed","iframe","frame","frameset","form","input","button","textarea","select","option","link","meta","base","applet"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onmouseout","onfocus","onblur","onchange","onsubmit","onreset","onkeydown","onkeyup","onkeypress","ondblclick","oncontextmenu","onmousedown","onmouseup","onmousemove","ondrag","ondrop"]};class zR{sanitizeHtmlForEmailViewing(e){if(!e||e.trim()==="")return e;try{return PR.sanitize(e,HR)}catch(a){return console.error(`Error in sanitizeHtmlForEmailViewing: ${a instanceof Error?a.message:String(a)}`),""}}sanitizeAndPrepareEmailHtml(e){if(!e||e.trim()==="")return e;const a=this.sanitizeHtmlForEmailViewing(e);return this.convertAnchorTagsToOpenInNewTab(a)}convertAnchorTagsToOpenInNewTab(e){try{const i=new DOMParser().parseFromString(e,"text/html"),s=i.querySelectorAll("a[href]");return s.length>0&&s.forEach(c=>{if((!c.hasAttribute("target")||c.getAttribute("target")!=="_blank")&&c.setAttribute("target","_blank"),!c.hasAttribute("rel"))c.setAttribute("rel","noopener noreferrer");else{const d=c.getAttribute("rel")??"",m=new Set(d.split(" ").filter(f=>f.trim()!==""));m.add("noopener"),m.add("noreferrer"),c.setAttribute("rel",Array.from(m).join(" "))}}),i.documentElement.outerHTML}catch(a){return console.error(`Error in convertAnchorTagsToOpenInNewTab: ${a instanceof Error?a.message:String(a)}`),e}}normalizeUsername(e){return e.toLowerCase().trim()}}const QR=new zR,nc=(n=!1,e=300)=>{const[a,i]=I.useState(n),s=I.useRef(null),c=I.useRef(null),d=I.useCallback(m=>{if(m)i(!0),c.current=Date.now();else{const f=c.current?Date.now()-c.current:0,g=Math.max(0,e-f);g===0?i(!1):(s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{i(!1)},g))}},[e]);return I.useEffect(()=>{n&&(i(!0),c.current=Date.now())},[n,i]),I.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),[a,d]},VR=()=>{const{t:n}=Ze(),{id:e}=cd(),a=Ba(),i=Kt(),s=Dr(),[c,d]=I.useState(null),[m,f]=I.useState(null),[g,E]=nc(!0,150),[p,C]=I.useState(!1),[N,x]=I.useState(!1),{setIsInitialLoading:S}=Aa(),{setHeaderButtons:T}=gr(),[k,U]=I.useState(!1);I.useEffect(()=>{Ta.isPopup()&&(window.history.replaceState({},"","popup.html#/emails"),window.history.pushState({},"",`popup.html#/emails/${e}`)),(async()=>{try{if(E(!0),d(null),!(i!=null&&i.sqliteClient)||!e)return;if(i.isOffline){d(n("emails.offlineMessage")),E(!1),S(!1);return}const Q=await s.get(`Email/${e}`),H=i.sqliteClient.settings.getAllEncryptionKeys(),V=await Gt.decryptEmail(Q,H);f(V)}catch(Q){d(Q instanceof Error?Q.message:"An error occurred")}finally{E(!1),S(!1)}})()},[e,i==null?void 0:i.sqliteClient,i.isOffline,n,s,E,S]);const R=I.useCallback(async()=>{try{await s.delete(`Email/${e}`),Ta.isPopup()?window.close():a("/emails")}catch(j){d(j instanceof Error?j.message:"Failed to delete email")}},[e,s,a]),P=I.useCallback(()=>{Ta.openInNewPopup(`/emails/${e}`)},[e]),M=async j=>{try{const Q=await s.downloadBlob(`Email/${e}/attachments/${j.id}`);if(!(i!=null&&i.sqliteClient)||!m){d("Database context or email not available");return}const H=i.sqliteClient.settings.getAllEncryptionKeys(),V=await Gt.decryptAttachment(Q,m,H);if(!V){d("Failed to decrypt attachment");return}const G=new Blob([new Uint8Array(V)],{type:j.mimeType??"application/octet-stream"}),K=window.URL.createObjectURL(G),$=document.createElement("a");$.href=K,$.download=j.filename,document.body.appendChild($),$.click(),window.URL.revokeObjectURL(K),document.body.removeChild($)}catch(Q){console.error("handleDownloadAttachment error",Q),d(Q instanceof Error?Q.message:"Failed to download attachment")}};return I.useEffect(()=>{if(!k){const j=l.jsxs("div",{className:"flex items-center gap-2",children:[!Ta.isPopup()&&l.jsx(xn,{onClick:P,title:n("common.openInNewWindow"),iconType:Pa.EXPAND}),l.jsx(xn,{onClick:()=>C(!0),title:n("emails.deleteEmailTitle"),iconType:Pa.DELETE,variant:"danger"})]});T(j),U(!0)}return()=>{}},[T,k,P,n]),I.useEffect(()=>()=>T(null),[T]),g?l.jsx("div",{className:"flex justify-center items-center p-8",children:l.jsx(er,{})}):c?l.jsxs("div",{className:"text-red-500",children:[n("common.error")," ",c]}):m?l.jsxs("div",{className:"max-w-4xl mx-auto",children:[l.jsx(Zu,{isOpen:p,onClose:()=>C(!1),onConfirm:()=>{C(!1),R()},title:n("emails.deleteEmailTitle"),message:n("emails.deleteEmailConfirm"),confirmText:n("common.delete"),cancelText:n("common.cancel"),variant:"danger"}),l.jsxs("div",{children:[l.jsxs("div",{children:[l.jsx("div",{className:"flex justify-between items-start",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:m.subject}),l.jsx("button",{onClick:()=>x(!N),className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",title:n(N?"common.hideDetails":"common.showDetails"),children:l.jsx("svg",{className:`w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform ${N?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})]})}),N&&l.jsxs("div",{className:"space-y-1 text-sm text-gray-600 dark:text-gray-400 mt-2",children:[l.jsxs("p",{children:[l.jsx("span",{className:"font-bold",children:n("emails.from")})," ",l.jsx("span",{title:m.fromLocal+"@"+m.fromDomain,children:m.fromDisplay})]}),l.jsxs("p",{children:[l.jsx("span",{className:"font-bold",children:n("emails.to")})," ",l.jsxs("span",{title:m.toLocal+"@"+m.toDomain,children:[m.toLocal,"@",m.toDomain]})]}),l.jsxs("p",{children:[l.jsx("span",{className:"font-bold",children:n("emails.date")})," ",new Date(m.dateSystem).toLocaleString()]})]})]}),l.jsx("div",{className:"bg-white mt-4",children:m.messageHtml?l.jsx("iframe",{srcDoc:QR.sanitizeAndPrepareEmailHtml(m.messageHtml),className:"w-full min-h-[500px] border-0",title:n("emails.emailContent"),sandbox:"allow-popups allow-popups-to-escape-sandbox"}):l.jsx("pre",{className:"whitespace-pre-wrap text-gray-800 p-3",children:m.messagePlain})}),m.attachments&&m.attachments.length>0&&l.jsxs("div",{className:"p-6 border-t border-gray-200 dark:border-gray-700",children:[l.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("common.attachments")}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4",children:m.attachments.map(j=>l.jsxs("button",{onClick:()=>M(j),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:[l.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})}),l.jsxs("span",{children:[j.filename," (",Math.ceil(j.filesize/1024)," KB)"]})]},j.id))})]})]})]}):l.jsx("div",{className:"text-gray-500",children:n("emails.emailNotFound")})},nh=({onClick:n})=>l.jsxs("div",{className:"px-2 items-center",children:[l.jsxs("div",{className:"relative inline-flex items-center",children:[l.jsx("button",{id:"reload-vault",onClick:n,className:"absolute p-2 hover:bg-gray-200 rounded-2xl",children:l.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:l.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"})})}),l.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:[l.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"}),l.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"})]})]}),l.jsx("span",{className:"sr-only",children:"Loading..."})]}),GR=()=>{const{t:n}=Ze(),e=Kt(),a=Dr(),{setHeaderButtons:i}=gr(),[s,c]=I.useState(null),[d,m]=I.useState([]),{setIsInitialLoading:f}=Aa(),[g,E]=nc(!0,100),p=I.useCallback(async()=>{try{if(E(!0),c(null),!(e!=null&&e.sqliteClient))return;if(e.isOffline){E(!1),f(!1);return}const N=e.sqliteClient.items.getAllEmailAddresses();try{const x=await a.post("EmailBox/bulk",{addresses:N,page:1,pageSize:50}),S=e.sqliteClient.settings.getAllEncryptionKeys(),T=await Gt.decryptEmailList(x.mails,S);m(T)}catch(x){throw console.error(x),new Error(n("common.errors.unknownError"))}}catch(N){c(N instanceof Error?N.message:n("common.errors.unknownError"))}finally{E(!1),f(!1)}},[e==null?void 0:e.sqliteClient,e.isOffline,a,E,f,n]);I.useEffect(()=>{p()},[p]),I.useEffect(()=>{const N=Ta.isPopup()?null:l.jsx(xn,{onClick:()=>Ta.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Pa.EXPAND});return i(N),()=>{i(null)}},[i,n]);const C=N=>{const x=new Date,S=new Date(N),T=Math.floor((x.getTime()-S.getTime())/1e3);if(T<60)return n("emails.dateFormat.justNow");if(T<3600){const k=Math.floor(T/60);return k===1?n("emails.dateFormat.minutesAgo_single",{count:k}):n("emails.dateFormat.minutesAgo_plural",{count:k})}else if(T<86400){const k=Math.floor(T/3600);return k===1?n("emails.dateFormat.hoursAgo_single",{count:k}):n("emails.dateFormat.hoursAgo_plural",{count:k})}else return T<172800?n("emails.dateFormat.yesterday"):S.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit"})};return g?l.jsx("div",{className:"flex justify-center items-center p-8",children:l.jsx(er,{})}):s?l.jsxs("div",{className:"text-red-500",children:[n("common.error"),": ",s]}):e.isOffline?l.jsxs("div",{children:[l.jsx("div",{className:"flex justify-between items-center mb-4",children:l.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("emails.title")})}),l.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:l.jsx("p",{className:"text-sm",children:n("emails.offlineMessage")})})]}):d.length===0?l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("emails.title")}),l.jsx(nh,{onClick:p})]}),l.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:l.jsx("p",{className:"text-sm",children:n("emails.noEmailsDescription")})})]}):l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("emails.title")}),l.jsx(nh,{onClick:p})]}),l.jsx("div",{className:"space-y-2",children:d.map(N=>l.jsxs(dd,{to:`/emails/${N.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:[l.jsxs("div",{className:"flex justify-between items-start mb-2",children:[l.jsx("div",{className:"text-gray-900 dark:text-white mb-1 font-bold",children:N.subject}),l.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:C(N.dateSystem)})]}),l.jsx("div",{className:"text-gray-600 text-sm dark:text-gray-300 line-clamp-2",children:N.messagePreview})]},N.id))})]})},KR=()=>{const{isFullyInitialized:n}=HL();return n?l.jsx(XC,{to:"/reinitialize",replace:!0}):null},qR=()=>l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),WR=()=>l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),YR=()=>l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})}),ed=()=>l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),JR=n=>{switch(n){case ct.Notes:return l.jsx(qR,{});default:return l.jsx(ed,{})}},XR=n=>{switch(n){case"2fa":return l.jsx(WR,{});case"attachments":return l.jsx(YR,{});default:return l.jsx(ed,{})}},$R=({optionalSystemFields:n,visibleFieldKeys:e,optionalSections:a,callbacks:i})=>{const{t:s}=Ze(),[c,d]=I.useState(!1),[m,f]=I.useState(!1),[g,E]=I.useState(""),[p,C]=I.useState("Text"),N=I.useCallback(()=>{f(!0),d(!1)},[]),x=I.useCallback(()=>{g.trim()&&(i.onAddCustomField(g,p),E(""),C("Text"),f(!1))},[g,p,i]),S=I.useCallback(()=>{E(""),C("Text"),f(!1)},[]),T=I.useCallback(R=>{i.onAddSystemField(R),d(!1)},[i]),k=I.useCallback(R=>{R(),d(!1)},[]),U=I.useMemo(()=>{const R=[];return n.forEach(P=>{e.has(P.FieldKey)||R.push({key:P.FieldKey,label:s(`fieldLabels.${P.FieldKey}`,{defaultValue:P.FieldKey}),icon:JR(P.Category),action:()=>T(P.FieldKey)})}),a.forEach(P=>{P.isVisible||R.push({key:P.key,label:s(`common.${P.key==="2fa"?"twoFactorAuthentication":P.key}`),icon:XR(P.key),action:()=>k(P.onAdd)})}),R},[n,e,a,s,T,k]);return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"relative",children:[l.jsx("button",{type:"button",id:"add-field-menu",onClick:()=>d(!c),className:"w-full px-4 py-2 border-2 border-dashed border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-400 rounded-md hover:border-primary-500 hover:text-primary-600 dark:hover:text-primary-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 transition-colors flex items-center justify-center gap-2",children:l.jsx(ed,{})}),c&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50",onClick:()=>d(!1)}),l.jsxs("div",{className:"absolute bottom-full left-0 right-0 mb-1 z-20 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-md shadow-lg overflow-hidden",children:[U.map(R=>l.jsxs("button",{type:"button",onClick:R.action,className:"w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 border-b border-gray-100 dark:border-gray-700 last:border-b-0 text-gray-700 dark:text-gray-300",children:[l.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:R.icon}),l.jsx("span",{children:R.label})]},R.key)),l.jsxs("button",{type:"button",onClick:N,className:"w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 border-b border-gray-100 dark:border-gray-700 last:border-b-0 text-gray-700 dark:text-gray-300",children:[l.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:l.jsx(ed,{})}),l.jsx("span",{children:s("itemTypes.addCustomField")})]})]})]})]}),l.jsx(tr,{isOpen:m,onClose:S,title:s("itemTypes.addCustomField"),footer:l.jsxs("div",{className:"flex gap-3",children:[l.jsx("button",{type:"button",onClick:x,disabled:!g.trim(),className:"flex-1 px-4 py-2 bg-primary-600 text-white rounded-md hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed",children:s("common.add")}),l.jsx("button",{type:"button",onClick:S,className:"px-4 py-2 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 rounded-md hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500",children:s("common.cancel")})]}),children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:s("itemTypes.fieldLabel")}),l.jsx("input",{type:"text",value:g,onChange:R=>E(R.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white",placeholder:s("itemTypes.enterFieldName"),autoFocus:!0})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:s("itemTypes.fieldType")}),l.jsxs("select",{value:p,onChange:R=>C(R.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white",children:[l.jsx("option",{value:"Text",children:s("itemTypes.fieldTypes.text")}),l.jsx("option",{value:"Hidden",children:s("itemTypes.fieldTypes.hidden")}),l.jsx("option",{value:"Email",children:s("itemTypes.fieldTypes.email")}),l.jsx("option",{value:"URL",children:s("itemTypes.fieldTypes.url")}),l.jsx("option",{value:"Phone",children:s("itemTypes.fieldTypes.phone")}),l.jsx("option",{value:"Number",children:s("itemTypes.fieldTypes.number")}),l.jsx("option",{value:"Date",children:s("itemTypes.fieldTypes.date")}),l.jsx("option",{value:"TextArea",children:s("itemTypes.fieldTypes.textArea")})]})]})]})})]})},ZR=({htmlFor:n,label:e,onLabelChange:a,onDelete:i})=>{const[s,c]=I.useState(!1),[d,m]=I.useState(e),f=()=>{d.trim()&&(a(d.trim()),c(!1))},g=()=>{m(e),c(!1)},E=p=>{p.key==="Enter"?f():p.key==="Escape"&&g()};return s?l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("input",{type:"text",value:d,onChange:p=>m(p.target.value),onKeyDown:E,onBlur:f,className:"flex-1 px-2 py-1 text-sm font-medium text-gray-700 dark:text-gray-300 border border-primary-500 rounded focus:outline-none focus:ring-1 focus:ring-primary-500 dark:bg-gray-700 dark:border-primary-400",placeholder:"Field label",autoFocus:!0}),l.jsx("button",{type:"button",onClick:f,className:"text-green-600 dark:text-green-400 hover:text-green-700 dark:hover:text-green-300 text-xs px-2 py-1",children:"✓"}),l.jsx("button",{type:"button",onClick:g,className:"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 text-xs px-2 py-1",children:"✕"})]}):l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("label",{htmlFor:n,className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:e}),l.jsx("button",{type:"button",onClick:()=>c(!0),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-xs",title:"Edit label",children:l.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})})}),i&&l.jsx("button",{type:"button",onClick:i,className:"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 text-xs",title:"Delete field",children:l.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})})]})},eD=({id:n,value:e,onChange:a,error:i,required:s=!1,onRemove:c,onGenerateAlias:d,isEmailMode:m,onEmailModeChange:f})=>{const{t:g}=Ze(),E=Kt(),p=m!==void 0,[C,N]=I.useState(!0),x=p?m:C,S=I.useCallback(ye=>{const _=typeof ye=="function"?ye(x):ye;p&&f?f(_):N(_)},[p,f,x]),[T,k]=I.useState(""),[U,R]=I.useState(""),[P,M]=I.useState(!1),[j,Q]=I.useState([]),[H,V]=I.useState([]),[G,K]=I.useState([]),$=I.useRef(null),J=I.useRef(!1);I.useEffect(()=>{(async()=>{const _=await E.getVaultMetadata();Q((_==null?void 0:_.publicEmailDomains)??[]),V((_==null?void 0:_.privateEmailDomains)??[]),K((_==null?void 0:_.hiddenPrivateEmailDomains)??[])})()},[E]);const re=I.useMemo(()=>H.length>0&&!(H.length===1&&(H[0]==="DISABLED.TLD"||H[0]==="")),[H]);I.useEffect(()=>{if(!e){k(""),U||(re&&H[0]?R(H[0]):j[0]&&R(j[0]));return}if(e.includes("@")){const[ye,_]=e.split("@");if(k(ye),R(_),!J.current){const q=j.includes(_)||H.includes(_)||G.includes(_);p&&f?f(!q):p||S(!q)}}else k(e),!U&&!e.includes("@")&&(re&&H[0]?R(H[0]):j[0]&&R(j[0]))},[e,j,H,G,re,p,f,U,S]),I.useEffect(()=>{if(J.current||!e||!e.includes("@"))return;const ye=e.split("@")[1];if(!ye)return;const _=j.includes(ye)||H.includes(ye)||G.includes(ye);p&&f?f(!_):p||_&&x&&S(!1)},[j,H,G,e,x,p,f,S]),I.useEffect(()=>{if(!x&&e&&!e.includes("@")&&e.trim()){const ye=re&&H[0]?H[0]:j[0],_=U||ye;_&&(!U&&ye&&R(ye),a(`${e}@${_}`))}},[e,x,U,re,H,j,a]);const Ae=I.useCallback(ye=>{const _=ye.target.value;if(J.current=!1,x){a(_);return}if(_.includes("@")){S(!0),a(_);return}if(k(_),!_||_.trim()==="")a("");else{const q=U||(re&&H[0]?H[0]:j[0]||"");q?(a(`${_}@${q}`),U||R(q)):a(_)}},[x,U,a,S,re,H,j]),X=I.useCallback(ye=>{R(ye);const _=T.includes("@")?T.split("@")[0]:T;!_||_.trim()===""?a(""):a(`${_}@${ye}`),S(!1),M(!1)},[T,a,S]),ie=I.useCallback(()=>{J.current=!0;const ye=!x;if(S(ye),ye)a(""),k("");else{const _=re&&H[0]?H[0]:j[0];R(_),k(""),a("")}},[x,re,j,H,a,S]);I.useEffect(()=>{const ye=_=>{$.current&&!$.current.contains(_.target)&&M(!1)};if(P)return document.addEventListener("mousedown",ye),()=>{document.removeEventListener("mousedown",ye)}},[P]);const ce=I.useCallback(()=>{J.current=!0,S(!1);const ye=re&&H[0]?H[0]:j[0];ye&&R(ye),k(""),a(""),d&&d()},[d,S,re,H,j,a]);return l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"flex items-center",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("button",{type:"button",onClick:x?void 0:ie,className:`text-sm font-medium transition-colors ${x?"text-primary-600 dark:text-primary-400":"text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-400 cursor-pointer"}`,children:g("common.email")}),l.jsx("span",{className:"mx-2 text-gray-400 dark:text-gray-500",children:"/"}),l.jsx("button",{type:"button",onClick:x?ce:void 0,className:`text-sm font-medium transition-colors ${x?"text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-400 cursor-pointer":"text-primary-600 dark:text-primary-400"}`,children:g("common.alias")}),s&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}),c&&l.jsx("button",{type:"button",onClick:c,className:"w-5 h-5 flex items-center justify-center text-gray-300 hover:text-red-400 dark:text-gray-500 dark:hover:text-red-400 transition-colors",title:g("common.delete"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),l.jsxs("div",{className:"relative w-full",children:[l.jsxs("div",{className:"flex w-full",children:[l.jsx("input",{type:"text",id:n,className:`flex-1 min-w-0 px-3 py-2 border text-sm ${i?"border-red-500":"border-gray-300 dark:border-gray-600"} ${x?"rounded-md":"rounded-l-md"} focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white`,value:x?e:T,onChange:Ae}),!x&&l.jsxs("button",{type:"button",onClick:()=>M(!P),className:`inline-flex items-center px-2 py-2 border border-l-0 border-gray-300 dark:border-gray-600 ${d?"":"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:[l.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"@"}),l.jsx("span",{className:"truncate ml-0.5",children:U})]}),!x&&d&&l.jsx("button",{type:"button",onClick:d,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:g("common.generate"),children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})})]}),P&&!x&&l.jsx("div",{ref:$,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:l.jsxs("div",{className:"p-4",children:[re&&l.jsxs("div",{className:"mb-4",children:[l.jsxs("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:[g("items.privateEmailTitle")," ",l.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",g("items.privateEmailAliasVaultServer"),")"]})]}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:g("items.privateEmailDescription")}),l.jsx("div",{className:"flex flex-wrap gap-2",children:H.filter(ye=>!G.includes(ye)).map(ye=>l.jsx("button",{type:"button",onClick:()=>X(ye),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${U===ye?"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:ye},ye))})]}),l.jsxs("div",{className:re?"border-t border-gray-200 dark:border-gray-600 pt-4":"",children:[l.jsx("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:g("items.publicEmailTitle")}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:g("items.publicEmailDescription")}),l.jsx("div",{className:"flex flex-wrap gap-2",children:j.map(ye=>l.jsx("button",{type:"button",onClick:()=>X(ye),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${U===ye?"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:ye},ye))})]})]})})]}),i&&l.jsx("p",{className:"text-sm text-red-500 mt-1",children:i})]})},tD=({name:n})=>{switch(n){case"visibility":return l.jsxs(l.Fragment,{children:[l.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),l.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return l.jsxs(l.Fragment,{children:[l.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"}),l.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"refresh":return l.jsxs(l.Fragment,{children:[l.jsx("path",{d:"M23 4v6h-6"}),l.jsx("path",{d:"M1 20v-6h6"}),l.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 l.jsxs(l.Fragment,{children:[l.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"}),l.jsx("path",{d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]});default:return null}},md=I.forwardRef(({id:n,label:e,value:a,onChange:i,type:s="text",placeholder:c,required:d=!1,multiline:m=!1,rows:f=1,error:g,buttons:E=[],showPassword:p,onShowPasswordChange:C},N)=>{const{t:x}=Ze(),[S,T]=od.useState(!1),k=p!==void 0?p:S,U=M=>{p!==void 0?C==null||C(M):T(M)},R=`mt-1 block text-sm w-full rounded-md ${g?"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=s==="password"?[...E,{icon:k?"visibility-off":"visibility",onClick:()=>U(!k),title:x(k?"common.hidePassword":"common.showPassword")}]:E;return l.jsxs("div",{children:[l.jsxs("label",{htmlFor:n,className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:[e,d&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),l.jsxs("div",{className:"relative",children:[m?l.jsx("textarea",{id:n,value:a,onChange:M=>i(M.target.value),rows:f,placeholder:c,className:R}):l.jsx("input",{ref:N,type:s==="password"&&!k?"password":"text",id:n,value:a,onChange:M=>i(M.target.value),placeholder:c,className:R}),P.length>0&&l.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:P.map((M,j)=>l.jsx("button",{type:"button",onClick:M.onClick,title:M.title,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",children:l.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx(tD,{name:M.icon})})},j))})]}),g&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:g})]})});md.displayName="FormInput";const Su=({title:n,children:e,actions:a})=>l.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[n&&l.jsxs("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white flex items-center justify-between",children:[typeof n=="string"?l.jsx("span",{children:n}):n,a&&l.jsx("div",{className:"flex items-center gap-2",children:a})]}),l.jsx("div",{className:"space-y-4",children:e})]}),aD=({id:n,label:e,value:a,onChange:i,placeholder:s,error:c,showValue:d,onShowValueChange:m})=>{const{t:f}=Ze(),[g,E]=I.useState(!1),p=d!==void 0?d:g,C=I.useCallback(x=>{d!==void 0?m==null||m(x):E(x)},[d,m]),N=I.useCallback(()=>{C(!p)},[p,C]);return l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),l.jsxs("div",{className:"flex",children:[l.jsx("div",{className:"relative flex-grow",children:l.jsx("input",{type:p?"text":"password",id:n,value:a,onChange:x=>i(x.target.value),placeholder:s,className:"outline-0 text-sm 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"})}),l.jsx("div",{className:"flex",children:l.jsx("button",{type:"button",onClick:N,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:f(p?"common.hidePassword":"common.showPassword"),children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p?l.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"}):l.jsxs(l.Fragment,{children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),l.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"})]})})})})]}),c&&l.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:c})]})};var nD=class{constructor(n){this.lowercaseChars="abcdefghijklmnopqrstuvwxyz",this.uppercaseChars="ABCDEFGHIJKLMNOPQRSTUVWXYZ",this.numberChars="0123456789",this.specialChars="!@#$%^&*()_+-=[]{}|;:,.<>?",this.ambiguousChars="Il1O0oZzSsBbGg2568|[]{}()<>;:,.`'\"_-",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 e=Math.floor(4294967296/n)*n;for(;;){const a=new Uint32Array(1);crypto.getRandomValues(a);const i=a[0];if(i<e)return i%n}}generateRandomPassword(){const n=this.buildCharacterSet();let e=this.generateInitialPassword(n);return e=this.ensureRequirements(e),e}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 e of this.ambiguousChars)n=n.replace(e,"");return n}generateInitialPassword(n){let e="";for(let a=0;a<this.length;a++)e+=n[this.getUnbiasedRandomIndex(n.length)];return e}ensureRequirements(n){return this.useLowercase&&!/[a-z]/.exec(n)&&(n=this.addCharacterFromSet(n,this.getSafeCharacterSet(this.lowercaseChars))),this.useUppercase&&!/[A-Z]/.exec(n)&&(n=this.addCharacterFromSet(n,this.getSafeCharacterSet(this.uppercaseChars))),this.useNumbers&&!/\d/.exec(n)&&(n=this.addCharacterFromSet(n,this.getSafeCharacterSet(this.numberChars))),this.useSpecial&&!/[!@#$%^&*()_+\-=[\]{}|;:,.<>?]/.exec(n)&&(n=this.addCharacterFromSet(n,this.getSafeCharacterSet(this.specialChars))),n}getSafeCharacterSet(n){return this.useNonAmbiguous?this.removeAmbiguousCharacters(n):n}addCharacterFromSet(n,e){const a=this.getUnbiasedRandomIndex(this.length),i=e[this.getUnbiasedRandomIndex(e.length)];return n.substring(0,a)+i+n.substring(a+1)}},Bh=n=>new nD(n);const rD=({isOpen:n,onClose:e,onSave:a,onSettingsChange:i,initialSettings:s})=>{const{t:c}=Ze(),[d,m]=I.useState(s),[f,g]=I.useState(""),E=I.useCallback(x=>{try{const T=Bh(x).generateRandomPassword();g(T)}catch(S){console.error("Error generating preview password:",S),g("")}},[]);I.useEffect(()=>{n&&(m({...s}),E({...s}))},[n,s,E]);const p=I.useCallback((x,S)=>{const T={...d,[x]:S};m(T),E(T),i==null||i(T)},[d,E,i]),C=I.useCallback(()=>{E(d)},[d,E]),N=I.useCallback(()=>{a(f),e()},[f,a,e]);return l.jsx(tr,{isOpen:n,onClose:e,title:c("items.changePasswordComplexity"),maxWidth:"max-w-lg",footer:l.jsx("div",{className:"flex justify-end",children:l.jsxs("button",{type:"button",className:"inline-flex 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",onClick:N,children:[l.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})}),c("common.use")]})}),children:l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",value:f,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"}),l.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:c("common.generate"),children:l.jsx("svg",{className:"w-4 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})})]})}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[l.jsx("button",{type:"button",onClick:()=>p("UseLowercase",!d.UseLowercase),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${d.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:c("items.includeLowercase"),children:l.jsx("span",{className:"font-mono text-base",children:"a-z"})}),l.jsx("button",{type:"button",onClick:()=>p("UseUppercase",!d.UseUppercase),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${d.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:c("items.includeUppercase"),children:l.jsx("span",{className:"font-mono text-base",children:"A-Z"})}),l.jsx("button",{type:"button",onClick:()=>p("UseNumbers",!d.UseNumbers),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${d.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:c("items.includeNumbers"),children:l.jsx("span",{className:"font-mono text-base",children:"0-9"})}),l.jsx("button",{type:"button",onClick:()=>p("UseSpecialChars",!d.UseSpecialChars),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${d.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:c("items.includeSpecialChars"),children:l.jsx("span",{className:"font-mono text-base",children:"!@#"})})]}),l.jsxs("div",{className:"flex items-center",children:[l.jsx("input",{id:"use-non-ambiguous",type:"checkbox",checked:d.UseNonAmbiguousChars,onChange:x=>p("UseNonAmbiguousChars",x.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"}),l.jsx("label",{htmlFor:"use-non-ambiguous",className:"ml-2 text-sm text-gray-700 dark:text-gray-300",children:c("items.avoidAmbiguousChars")})]})]})]})})},iD=({id:n,label:e,value:a,onChange:i,placeholder:s,error:c,showPassword:d,onShowPasswordChange:m,initialSettings:f,onSettingsChange:g})=>{const{t:E}=Ze(),p=Kt(),[C,N]=I.useState(!1),[x,S]=I.useState(!1),[T,k]=I.useState(null),[U,R]=I.useState(!1),P=d!==void 0?d:C,M=I.useCallback(J=>{d!==void 0?m==null||m(J):N(J)},[d,m]);I.useEffect(()=>{(async()=>{try{if(p.sqliteClient){if(f!==void 0)k(f);else{const re=p.sqliteClient.settings.getPasswordSettings();k(re)}R(!0)}}catch(re){console.error("Error loading password settings:",re)}})()},[p.sqliteClient,f]);const j=I.useCallback(J=>{try{const Ae=Bh(J).generateRandomPassword();i(Ae),M(!0)}catch(re){console.error("Error generating password:",re)}},[i,M]),Q=I.useCallback(J=>{if(!T)return;const re=parseInt(J.target.value,10),Ae={...T,Length:re};k(Ae),g==null||g(Ae),j(Ae)},[T,j,g]),H=I.useCallback(()=>{T&&j(T)},[j,T]),V=I.useCallback(J=>{i(J),M(!0)},[i,M]),G=I.useCallback(J=>{k(J),g==null||g(J)},[g]),K=I.useCallback(()=>{M(!P)},[P,M]),$=I.useCallback(()=>{S(!0)},[]);return!T||!U?l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),l.jsx("div",{className:"animate-pulse bg-gray-200 dark:bg-gray-700 h-10 rounded-lg"})]}):l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),l.jsxs("div",{className:"flex",children:[l.jsx("div",{className:"relative flex-grow",children:l.jsx("input",{type:P?"text":"password",id:n,value:a,onChange:J=>i(J.target.value),placeholder:s,className:"outline-0 text-sm 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"})}),l.jsxs("div",{className:"flex",children:[l.jsx("button",{type:"button",onClick:K,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:E(P?"common.hidePassword":"common.showPassword"),children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P?l.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"}):l.jsxs(l.Fragment,{children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),l.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"})]})})}),l.jsx("button",{type:"button",onClick:H,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:E("common.generate"),children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})})]})]}),l.jsxs("div",{className:"pt-2",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("label",{htmlFor:`${n}-length`,className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:E("items.passwordLength")}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 font-mono",children:T.Length}),l.jsx("button",{type:"button",onClick:$,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300",title:E("items.changePasswordComplexity"),children:l.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[l.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"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})]}),l.jsx("input",{type:"range",id:`${n}-length`,min:"8",max:"64",value:T.Length,onChange:Q,className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"})]}),c&&l.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:c}),l.jsx(rD,{isOpen:x,onClose:()=>S(!1),onSave:V,onSettingsChange:G,initialSettings:T})]})},sD=({id:n,label:e,value:a,onChange:i,placeholder:s,error:c,onRegenerate:d})=>{const{t:m}=Ze(),f=I.useCallback(E=>{i(E.target.value)},[i]),g=I.useCallback(()=>{d()},[d]);return l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),l.jsxs("div",{className:"flex",children:[l.jsx("div",{className:"relative flex-grow",children:l.jsx("input",{type:"text",id:n,value:a,onChange:f,placeholder:s,className:"outline-0 text-sm 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"})}),l.jsx("div",{className:"flex",children:l.jsx("button",{type:"button",onClick:g,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:m("common.generate"),children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})})})]}),c&&l.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:c})]})},oD=({attachments:n,onAttachmentsChange:e,itemId:a})=>{const{t:i}=Ze(),[s,c]=I.useState(""),d=async g=>{const E=g.target.files;if(!(!E||E.length===0)){c(i("attachmentUploader.uploading"));try{const p=[...n];for(const C of Array.from(E)){const N=await C.arrayBuffer(),x=new Uint8Array(N),S={Id:crypto.randomUUID().toUpperCase(),Filename:C.name,Blob:x,ItemId:"",CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString(),IsDeleted:!1};p.push(S)}e(p),c(i("attachmentUploader.uploadSuccess")),setTimeout(()=>c(""),3e3)}catch(p){console.error("Error uploading files:",p),c(i("common.errors.unknownErrorTryAgain")),setTimeout(()=>c(""),3e3)}g.target.value=""}},m=g=>{try{const E=[...n],p=E.findIndex(C=>C.Id===g.Id);p!==-1&&E.splice(p,1),e(E),c(i("attachmentUploader.deleteSuccess")),setTimeout(()=>c(""),3e3)}catch(E){console.error("Error deleting attachment:",E),c(i("common.errors.unknownErrorTryAgain")),setTimeout(()=>c(""),3e3)}},f=n.filter(g=>!g.IsDeleted);return l.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[l.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:i("common.attachments")}),l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{children:l.jsx("input",{type:"file",multiple:!0,onChange:d,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&&l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s}),f.length>0&&l.jsx("div",{children:l.jsx("div",{className:"space-y-2",children:f.map(g=>l.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:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:g.Filename}),l.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(g.CreatedAt).toLocaleDateString()})]}),l.jsx("button",{type:"button",onClick:()=>m(g),className:"text-red-500 hover:text-red-700 focus:outline-none","aria-label":`Delete ${g.Filename}`,children:l.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})})]},g.Id))})})]})]})},rh=({className:n="w-5 h-5"})=>l.jsx("svg",{className:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"})}),lD=({itemId:n})=>{const{t:e}=Ze(),a=Kt(),[i,s]=I.useState([]),[c,d]=I.useState(!0);return I.useEffect(()=>{if(!(a!=null&&a.sqliteClient)||!n){d(!1);return}try{const m=a.sqliteClient.passkeys.getByItemId(n);s(m)}catch(m){console.error("Error loading passkeys:",m)}finally{d(!1)}},[a==null?void 0:a.sqliteClient,n]),c?l.jsx("div",{className:"flex justify-center p-2",children:l.jsx(er,{})}):i.length===0?null:l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:e("passkeys.passkey")}),i.map(m=>l.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(rh,{className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5 flex-shrink-0"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"mb-1",children:l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:m.DisplayName||e("passkeys.passkey")})}),l.jsx("div",{className:"space-y-1 mb-2",children:m.RpId&&l.jsxs("div",{children:[l.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[e("passkeys.site"),":"," "]}),l.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:m.RpId})]})}),l.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:e("passkeys.helpText")})]})]})},m.Id))]})},cD=({itemId:n,passkeyIdsMarkedForDeletion:e,onPasskeyMarkedForDeletion:a})=>{const{t:i}=Ze(),s=Kt(),[c,d]=I.useState([]),[m,f]=I.useState(!0);I.useEffect(()=>{if(!(s!=null&&s.sqliteClient)||!n){f(!1);return}try{const p=s.sqliteClient.passkeys.getByItemId(n);d(p)}catch(p){console.error("Error loading passkeys:",p)}finally{f(!1)}},[s==null?void 0:s.sqliteClient,n]);const g=p=>{e.includes(p)||a([...e,p])},E=p=>{a(e.filter(C=>C!==p))};return m?l.jsx("div",{className:"flex justify-center p-2",children:l.jsx(er,{})}):c.length===0?null:l.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[l.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:i("passkeys.passkey")}),l.jsx("div",{className:"space-y-3",children:c.map(p=>e.includes(p.Id)?l.jsx("div",{className:"p-3 rounded bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(rh,{className:"w-5 h-5 text-red-600 dark:text-red-400 mt-0.5 flex-shrink-0"}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium text-red-900 dark:text-red-100",children:i("passkeys.passkeyMarkedForDeletion")}),l.jsx("button",{type:"button",onClick:()=>E(p.Id),className:"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300",title:i("common.undo"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M3 7v6h6"}),l.jsx("path",{d:"M21 17a9 9 0 00-9-9 9 9 0 00-6 2.3L3 13"})]})})]}),l.jsx("p",{className:"text-xs text-red-800 dark:text-red-200",children:i("passkeys.passkeyWillBeDeleted")})]})]})},p.Id):l.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(rh,{className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5 flex-shrink-0"}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:p.DisplayName||i("passkeys.passkey")}),l.jsx("button",{type:"button",onClick:()=>g(p.Id),className:"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300",title:i("common.delete"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("polyline",{points:"3 6 5 6 21 6"}),l.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}),l.jsx("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),l.jsx("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]})})]}),l.jsx("div",{className:"space-y-1 mb-2",children:p.RpId&&l.jsxs("div",{children:[l.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[i("passkeys.site"),":"," "]}),l.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:p.RpId})]})}),l.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:i("passkeys.helpText")})]})]})},p.Id))})]})};//! 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 uD=n=>{const e=new ArrayBuffer(8),a=new Uint8Array(e);let i=n;for(let s=7;s>=0&&i!==0;s--)a[s]=i&255,i-=a[s],i/=256;return a};function td(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function dD(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function gd(n,...e){if(!dD(n))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(n.length))throw new Error("Uint8Array expected of length "+e+", got length="+n.length)}function mD(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");td(n.outputLen),td(n.blockLen)}function Eo(n,e=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(e&&n.finished)throw new Error("Hash#digest() has already been called")}function LI(n,e){gd(n);const a=e.outputLen;if(n.length<a)throw new Error("digestInto() expects output buffer of length at least "+a)}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function gD(n){return new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4))}function Tf(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function Cr(n,e){return n<<32-e|n>>>e}function kf(n,e){return n<<e|n>>>32-e>>>0}const LE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function fD(n){return n<<24&4278190080|n<<8&16711680|n>>>8&65280|n>>>24&255}function RE(n){for(let e=0;e<n.length;e++)n[e]=fD(n[e])}function hD(n){if(typeof n!="string")throw new Error("utf8ToBytes expected string, got "+typeof n);return new Uint8Array(new TextEncoder().encode(n))}function fd(n){return typeof n=="string"&&(n=hD(n)),gd(n),n}class Uh{clone(){return this._cloneInto()}}function Co(n){const e=i=>n().update(fd(i)).digest(),a=n();return e.outputLen=a.outputLen,e.blockLen=a.blockLen,e.create=()=>n(),e}class RI extends Uh{update(e){return Eo(this),this.iHash.update(e),this}digestInto(e){Eo(this),gd(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:a,iHash:i,finished:s,destroyed:c,blockLen:d,outputLen:m}=this;return e=e,e.finished=s,e.destroyed=c,e.blockLen=d,e.outputLen=m,e.oHash=a._cloneInto(e.oHash),e.iHash=i._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(e,a){super(),this.finished=!1,this.destroyed=!1,mD(e);const i=fd(a);if(this.iHash=e.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 s=this.blockLen,c=new Uint8Array(s);c.set(i.length>s?e.create().update(i).digest():i);for(let d=0;d<c.length;d++)c[d]^=54;this.iHash.update(c),this.oHash=e.create();for(let d=0;d<c.length;d++)c[d]^=106;this.oHash.update(c),c.fill(0)}}const ih=(n,e,a)=>new RI(n,e).update(a).digest();ih.create=(n,e)=>new RI(n,e);function AD(n,e,a,i){if(typeof n.setBigUint64=="function")return n.setBigUint64(e,a,i);const s=BigInt(32),c=BigInt(4294967295),d=Number(a>>s&c),m=Number(a&c),f=i?4:0,g=i?0:4;n.setUint32(e+f,d,i),n.setUint32(e+g,m,i)}function DI(n,e,a){return n&e^~n&a}function BI(n,e,a){return n&e^n&a^e&a}class Mh extends Uh{update(e){Eo(this);const{view:a,buffer:i,blockLen:s}=this;e=fd(e);const c=e.length;for(let d=0;d<c;){const m=Math.min(s-this.pos,c-d);if(m===s){const f=Tf(e);for(;s<=c-d;d+=s)this.process(f,d);continue}i.set(e.subarray(d,d+m),this.pos),this.pos+=m,d+=m,this.pos===s&&(this.process(a,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Eo(this),LI(e,this),this.finished=!0;const{buffer:a,view:i,blockLen:s,isLE:c}=this;let{pos:d}=this;a[d++]=128,this.buffer.subarray(d).fill(0),this.padOffset>s-d&&(this.process(i,0),d=0);for(let p=d;p<s;p++)a[p]=0;AD(i,s-8,BigInt(this.length*8),c),this.process(i,0);const m=Tf(e),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const g=f/4,E=this.get();if(g>E.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<g;p++)m.setUint32(4*p,E[p],c)}digest(){const{buffer:e,outputLen:a}=this;this.digestInto(e);const i=e.slice(0,a);return this.destroy(),i}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:a,buffer:i,length:s,finished:c,destroyed:d,pos:m}=this;return e.length=s,e.pos=m,e.finished=c,e.destroyed=d,s%a&&e.buffer.set(i),e}constructor(e,a,i,s){super(),this.blockLen=e,this.outputLen=a,this.padOffset=i,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Tf(this.buffer)}}const Dl=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),Hi=new Uint32Array(80);class pD extends Mh{get(){const{A:e,B:a,C:i,D:s,E:c}=this;return[e,a,i,s,c]}set(e,a,i,s,c){this.A=e|0,this.B=a|0,this.C=i|0,this.D=s|0,this.E=c|0}process(e,a){for(let f=0;f<16;f++,a+=4)Hi[f]=e.getUint32(a,!1);for(let f=16;f<80;f++)Hi[f]=kf(Hi[f-3]^Hi[f-8]^Hi[f-14]^Hi[f-16],1);let{A:i,B:s,C:c,D:d,E:m}=this;for(let f=0;f<80;f++){let g,E;f<20?(g=DI(s,c,d),E=1518500249):f<40?(g=s^c^d,E=1859775393):f<60?(g=BI(s,c,d),E=2400959708):(g=s^c^d,E=3395469782);const p=kf(i,5)+g+m+E+Hi[f]|0;m=d,d=c,c=kf(s,30),s=i,i=p}i=i+this.A|0,s=s+this.B|0,c=c+this.C|0,d=d+this.D|0,m=m+this.E|0,this.set(i,s,c,d,m)}roundClean(){Hi.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}constructor(){super(64,20,8,!1),this.A=Dl[0]|0,this.B=Dl[1]|0,this.C=Dl[2]|0,this.D=Dl[3]|0,this.E=Dl[4]|0}}const yD=Co(()=>new pD),ED=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]),zi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Qi=new Uint32Array(64);class UI extends Mh{get(){const{A:e,B:a,C:i,D:s,E:c,F:d,G:m,H:f}=this;return[e,a,i,s,c,d,m,f]}set(e,a,i,s,c,d,m,f){this.A=e|0,this.B=a|0,this.C=i|0,this.D=s|0,this.E=c|0,this.F=d|0,this.G=m|0,this.H=f|0}process(e,a){for(let p=0;p<16;p++,a+=4)Qi[p]=e.getUint32(a,!1);for(let p=16;p<64;p++){const C=Qi[p-15],N=Qi[p-2],x=Cr(C,7)^Cr(C,18)^C>>>3,S=Cr(N,17)^Cr(N,19)^N>>>10;Qi[p]=S+Qi[p-7]+x+Qi[p-16]|0}let{A:i,B:s,C:c,D:d,E:m,F:f,G:g,H:E}=this;for(let p=0;p<64;p++){const C=Cr(m,6)^Cr(m,11)^Cr(m,25),N=E+C+DI(m,f,g)+ED[p]+Qi[p]|0,S=(Cr(i,2)^Cr(i,13)^Cr(i,22))+BI(i,s,c)|0;E=g,g=f,f=m,m=d+N|0,d=c,c=s,s=i,i=N+S|0}i=i+this.A|0,s=s+this.B|0,c=c+this.C|0,d=d+this.D|0,m=m+this.E|0,f=f+this.F|0,g=g+this.G|0,E=E+this.H|0,this.set(i,s,c,d,m,f,g,E)}roundClean(){Qi.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=zi[0]|0,this.B=zi[1]|0,this.C=zi[2]|0,this.D=zi[3]|0,this.E=zi[4]|0,this.F=zi[5]|0,this.G=zi[6]|0,this.H=zi[7]|0}}class bD extends UI{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 ID=Co(()=>new UI),vD=Co(()=>new bD),Tu=BigInt(2**32-1),sh=BigInt(32);function MI(n,e=!1){return e?{h:Number(n&Tu),l:Number(n>>sh&Tu)}:{h:Number(n>>sh&Tu)|0,l:Number(n&Tu)|0}}function _I(n,e=!1){let a=new Uint32Array(n.length),i=new Uint32Array(n.length);for(let s=0;s<n.length;s++){const{h:c,l:d}=MI(n[s],e);[a[s],i[s]]=[c,d]}return[a,i]}const ND=(n,e)=>BigInt(n>>>0)<<sh|BigInt(e>>>0),CD=(n,e,a)=>n>>>a,wD=(n,e,a)=>n<<32-a|e>>>a,xD=(n,e,a)=>n>>>a|e<<32-a,SD=(n,e,a)=>n<<32-a|e>>>a,TD=(n,e,a)=>n<<64-a|e>>>a-32,kD=(n,e,a)=>n>>>a-32|e<<64-a,LD=(n,e)=>e,RD=(n,e)=>n,FI=(n,e,a)=>n<<a|e>>>32-a,OI=(n,e,a)=>e<<a|n>>>32-a,jI=(n,e,a)=>e<<a-32|n>>>64-a,PI=(n,e,a)=>n<<a-32|e>>>64-a;function DD(n,e,a,i){const s=(e>>>0)+(i>>>0);return{h:n+a+(s/2**32|0)|0,l:s|0}}const BD=(n,e,a)=>(n>>>0)+(e>>>0)+(a>>>0),UD=(n,e,a,i)=>e+a+i+(n/2**32|0)|0,MD=(n,e,a,i)=>(n>>>0)+(e>>>0)+(a>>>0)+(i>>>0),_D=(n,e,a,i,s)=>e+a+i+s+(n/2**32|0)|0,FD=(n,e,a,i,s)=>(n>>>0)+(e>>>0)+(a>>>0)+(i>>>0)+(s>>>0),OD=(n,e,a,i,s,c)=>e+a+i+s+c+(n/2**32|0)|0,Nt={fromBig:MI,split:_I,toBig:ND,shrSH:CD,shrSL:wD,rotrSH:xD,rotrSL:SD,rotrBH:TD,rotrBL:kD,rotr32H:LD,rotr32L:RD,rotlSH:FI,rotlSL:OI,rotlBH:jI,rotlBL:PI,add:DD,add3L:BD,add3H:UD,add4L:MD,add4H:_D,add5H:OD,add5L:FD},[jD,PD]=Nt.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))),Vi=new Uint32Array(80),Gi=new Uint32Array(80);class HI extends Mh{get(){const{Ah:e,Al:a,Bh:i,Bl:s,Ch:c,Cl:d,Dh:m,Dl:f,Eh:g,El:E,Fh:p,Fl:C,Gh:N,Gl:x,Hh:S,Hl:T}=this;return[e,a,i,s,c,d,m,f,g,E,p,C,N,x,S,T]}set(e,a,i,s,c,d,m,f,g,E,p,C,N,x,S,T){this.Ah=e|0,this.Al=a|0,this.Bh=i|0,this.Bl=s|0,this.Ch=c|0,this.Cl=d|0,this.Dh=m|0,this.Dl=f|0,this.Eh=g|0,this.El=E|0,this.Fh=p|0,this.Fl=C|0,this.Gh=N|0,this.Gl=x|0,this.Hh=S|0,this.Hl=T|0}process(e,a){for(let R=0;R<16;R++,a+=4)Vi[R]=e.getUint32(a),Gi[R]=e.getUint32(a+=4);for(let R=16;R<80;R++){const P=Vi[R-15]|0,M=Gi[R-15]|0,j=Nt.rotrSH(P,M,1)^Nt.rotrSH(P,M,8)^Nt.shrSH(P,M,7),Q=Nt.rotrSL(P,M,1)^Nt.rotrSL(P,M,8)^Nt.shrSL(P,M,7),H=Vi[R-2]|0,V=Gi[R-2]|0,G=Nt.rotrSH(H,V,19)^Nt.rotrBH(H,V,61)^Nt.shrSH(H,V,6),K=Nt.rotrSL(H,V,19)^Nt.rotrBL(H,V,61)^Nt.shrSL(H,V,6),$=Nt.add4L(Q,K,Gi[R-7],Gi[R-16]),J=Nt.add4H($,j,G,Vi[R-7],Vi[R-16]);Vi[R]=J|0,Gi[R]=$|0}let{Ah:i,Al:s,Bh:c,Bl:d,Ch:m,Cl:f,Dh:g,Dl:E,Eh:p,El:C,Fh:N,Fl:x,Gh:S,Gl:T,Hh:k,Hl:U}=this;for(let R=0;R<80;R++){const P=Nt.rotrSH(p,C,14)^Nt.rotrSH(p,C,18)^Nt.rotrBH(p,C,41),M=Nt.rotrSL(p,C,14)^Nt.rotrSL(p,C,18)^Nt.rotrBL(p,C,41),j=p&N^~p&S,Q=C&x^~C&T,H=Nt.add5L(U,M,Q,PD[R],Gi[R]),V=Nt.add5H(H,k,P,j,jD[R],Vi[R]),G=H|0,K=Nt.rotrSH(i,s,28)^Nt.rotrBH(i,s,34)^Nt.rotrBH(i,s,39),$=Nt.rotrSL(i,s,28)^Nt.rotrBL(i,s,34)^Nt.rotrBL(i,s,39),J=i&c^i&m^c&m,re=s&d^s&f^d&f;k=S|0,U=T|0,S=N|0,T=x|0,N=p|0,x=C|0,{h:p,l:C}=Nt.add(g|0,E|0,V|0,G|0),g=m|0,E=f|0,m=c|0,f=d|0,c=i|0,d=s|0;const Ae=Nt.add3L(G,$,re);i=Nt.add3H(Ae,V,K,J),s=Ae|0}({h:i,l:s}=Nt.add(this.Ah|0,this.Al|0,i|0,s|0)),{h:c,l:d}=Nt.add(this.Bh|0,this.Bl|0,c|0,d|0),{h:m,l:f}=Nt.add(this.Ch|0,this.Cl|0,m|0,f|0),{h:g,l:E}=Nt.add(this.Dh|0,this.Dl|0,g|0,E|0),{h:p,l:C}=Nt.add(this.Eh|0,this.El|0,p|0,C|0),{h:N,l:x}=Nt.add(this.Fh|0,this.Fl|0,N|0,x|0),{h:S,l:T}=Nt.add(this.Gh|0,this.Gl|0,S|0,T|0),{h:k,l:U}=Nt.add(this.Hh|0,this.Hl|0,k|0,U|0),this.set(i,s,c,d,m,f,g,E,p,C,N,x,S,T,k,U)}roundClean(){Vi.fill(0),Gi.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 HD extends HI{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 zD=Co(()=>new HI),QD=Co(()=>new HD),zI=[],QI=[],VI=[],VD=BigInt(0),Bl=BigInt(1),GD=BigInt(2),KD=BigInt(7),qD=BigInt(256),WD=BigInt(113);for(let n=0,e=Bl,a=1,i=0;n<24;n++){[a,i]=[i,(2*a+3*i)%5],zI.push(2*(5*i+a)),QI.push((n+1)*(n+2)/2%64);let s=VD;for(let c=0;c<7;c++)e=(e<<Bl^(e>>KD)*WD)%qD,e&GD&&(s^=Bl<<(Bl<<BigInt(c))-Bl);VI.push(s)}const[YD,JD]=_I(VI,!0),DE=(n,e,a)=>a>32?jI(n,e,a):FI(n,e,a),BE=(n,e,a)=>a>32?PI(n,e,a):OI(n,e,a);function XD(n,e=24){const a=new Uint32Array(10);for(let i=24-e;i<24;i++){for(let d=0;d<10;d++)a[d]=n[d]^n[d+10]^n[d+20]^n[d+30]^n[d+40];for(let d=0;d<10;d+=2){const m=(d+8)%10,f=(d+2)%10,g=a[f],E=a[f+1],p=DE(g,E,1)^a[m],C=BE(g,E,1)^a[m+1];for(let N=0;N<50;N+=10)n[d+N]^=p,n[d+N+1]^=C}let s=n[2],c=n[3];for(let d=0;d<24;d++){const m=QI[d],f=DE(s,c,m),g=BE(s,c,m),E=zI[d];s=n[E],c=n[E+1],n[E]=f,n[E+1]=g}for(let d=0;d<50;d+=10){for(let m=0;m<10;m++)a[m]=n[d+m];for(let m=0;m<10;m++)n[d+m]^=~a[(m+2)%10]&a[(m+4)%10]}n[0]^=YD[i],n[1]^=JD[i]}a.fill(0)}class _h extends Uh{keccak(){LE||RE(this.state32),XD(this.state32,this.rounds),LE||RE(this.state32),this.posOut=0,this.pos=0}update(e){Eo(this);const{blockLen:a,state:i}=this;e=fd(e);const s=e.length;for(let c=0;c<s;){const d=Math.min(a-this.pos,s-c);for(let m=0;m<d;m++)i[this.pos++]^=e[c++];this.pos===a&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:a,pos:i,blockLen:s}=this;e[i]^=a,(a&128)!==0&&i===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){Eo(this,!1),gd(e),this.finish();const a=this.state,{blockLen:i}=this;for(let s=0,c=e.length;s<c;){this.posOut>=i&&this.keccak();const d=Math.min(i-this.posOut,c-s);e.set(a.subarray(this.posOut,this.posOut+d),s),this.posOut+=d,s+=d}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return td(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(LI(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:a,suffix:i,outputLen:s,rounds:c,enableXOF:d}=this;return e||(e=new _h(a,i,s,d,c)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=c,e.suffix=i,e.outputLen=s,e.enableXOF=d,e.destroyed=this.destroyed,e}constructor(e,a,i,s=!1,c=24){if(super(),this.blockLen=e,this.suffix=a,this.outputLen=i,this.enableXOF=s,this.rounds=c,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,td(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=gD(this.state)}}const hd=(n,e,a)=>Co(()=>new _h(e,n,a)),$D=hd(6,144,224/8),ZD=hd(6,136,256/8),eB=hd(6,104,384/8),tB=hd(6,72,512/8),bo=(()=>{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})(),UE={SHA1:yD,SHA224:vD,SHA256:ID,SHA384:QD,SHA512:zD,"SHA3-224":$D,"SHA3-256":ZD,"SHA3-384":eB,"SHA3-512":tB},Fh=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}`)}},aB=(n,e,a)=>{if(ih){const i=UE[n]??UE[Fh(n)];return ih(i,e,a)}else throw new Error("Missing HMAC function")},oh="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",nB=n=>{n=n.replace(/ /g,"");let e=n.length;for(;n[e-1]==="=";)--e;n=(e<n.length?n.substring(0,e):n).toUpperCase();const a=new ArrayBuffer(n.length*5/8|0),i=new Uint8Array(a);let s=0,c=0,d=0;for(let m=0;m<n.length;m++){const f=oh.indexOf(n[m]);if(f===-1)throw new TypeError(`Invalid character found: ${n[m]}`);c=c<<5|f,s+=5,s>=8&&(s-=8,i[d++]=c>>>s)}return i},rB=n=>{let e=0,a=0,i="";for(let s=0;s<n.length;s++)for(a=a<<8|n[s],e+=8;e>=5;)i+=oh[a>>>e-5&31],e-=5;return e>0&&(i+=oh[a<<5-e&31]),i},iB=n=>{n=n.replace(/ /g,"");const e=new ArrayBuffer(n.length/2),a=new Uint8Array(e);for(let i=0;i<n.length;i+=2)a[i/2]=parseInt(n.substring(i,i+2),16);return a},sB=n=>{let e="";for(let a=0;a<n.length;a++){const i=n[a].toString(16);i.length===1&&(e+="0"),e+=i}return e.toUpperCase()},oB=n=>{const e=new ArrayBuffer(n.length),a=new Uint8Array(e);for(let i=0;i<n.length;i++)a[i]=n.charCodeAt(i)&255;return a},lB=n=>{let e="";for(let a=0;a<n.length;a++)e+=String.fromCharCode(n[a]);return e},ME=bo.TextEncoder?new bo.TextEncoder:null,_E=bo.TextDecoder?new bo.TextDecoder:null,cB=n=>{if(!ME)throw new Error("Encoding API not available");return ME.encode(n)},uB=n=>{if(!_E)throw new Error("Encoding API not available");return _E.decode(n)},dB=n=>{var e;if((e=bo.crypto)!=null&&e.getRandomValues)return bo.crypto.getRandomValues(new Uint8Array(n));throw new Error("Cryptography API not available")};class oi{static fromLatin1(e){return new oi({buffer:oB(e).buffer})}static fromUTF8(e){return new oi({buffer:cB(e).buffer})}static fromBase32(e){return new oi({buffer:nB(e).buffer})}static fromHex(e){return new oi({buffer:iB(e).buffer})}get buffer(){return this.bytes.buffer}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,writable:!1,configurable:!1,value:lB(this.bytes)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,writable:!1,configurable:!1,value:uB(this.bytes)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,writable:!1,configurable:!1,value:rB(this.bytes)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,writable:!1,configurable:!1,value:sB(this.bytes)}),this.hex}constructor({buffer:e,size:a=20}={}){this.bytes=typeof e>"u"?dB(a):new Uint8Array(e),Object.defineProperty(this,"bytes",{enumerable:!0,writable:!1,configurable:!1,value:this.bytes})}}const mB=(n,e)=>{{if(n.length!==e.length)throw new TypeError("Input strings must have the same length");let a=-1,i=0;for(;++a<n.length;)i|=n.charCodeAt(a)^e.charCodeAt(a);return i===0}};class Da{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,counter:0,window:1}}static generate({secret:e,algorithm:a=Da.defaults.algorithm,digits:i=Da.defaults.digits,counter:s=Da.defaults.counter}){const c=aB(a,e.bytes,uD(s)),d=c[c.byteLength-1]&15;return(((c[d]&127)<<24|(c[d+1]&255)<<16|(c[d+2]&255)<<8|c[d+3]&255)%10**i).toString().padStart(i,"0")}generate({counter:e=this.counter++}={}){return Da.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:e})}static validate({token:e,secret:a,algorithm:i,digits:s=Da.defaults.digits,counter:c=Da.defaults.counter,window:d=Da.defaults.window}){if(e.length!==s)return null;let m=null;const f=g=>{const E=Da.generate({secret:a,algorithm:i,digits:s,counter:g});mB(e,E)&&(m=g-c)};f(c);for(let g=1;g<=d&&m===null&&(f(c-g),!(m!==null||(f(c+g),m!==null)));++g);return m}validate({token:e,counter:a=this.counter,window:i}){return Da.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:a,window:i})}toString(){const e=encodeURIComponent;return`otpauth://hotp/${this.issuer.length>0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&counter=${e(this.counter)}`}constructor({issuer:e=Da.defaults.issuer,label:a=Da.defaults.label,issuerInLabel:i=Da.defaults.issuerInLabel,secret:s=new oi,algorithm:c=Da.defaults.algorithm,digits:d=Da.defaults.digits,counter:m=Da.defaults.counter}={}){this.issuer=e,this.label=a,this.issuerInLabel=i,this.secret=typeof s=="string"?oi.fromBase32(s):s,this.algorithm=Fh(c),this.digits=d,this.counter=m}}class Na{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}static counter({period:e=Na.defaults.period,timestamp:a=Date.now()}={}){return Math.floor(a/1e3/e)}counter({timestamp:e=Date.now()}={}){return Na.counter({period:this.period,timestamp:e})}static remaining({period:e=Na.defaults.period,timestamp:a=Date.now()}={}){return e*1e3-a%(e*1e3)}remaining({timestamp:e=Date.now()}={}){return Na.remaining({period:this.period,timestamp:e})}static generate({secret:e,algorithm:a,digits:i,period:s=Na.defaults.period,timestamp:c=Date.now()}){return Da.generate({secret:e,algorithm:a,digits:i,counter:Na.counter({period:s,timestamp:c})})}generate({timestamp:e=Date.now()}={}){return Na.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:e})}static validate({token:e,secret:a,algorithm:i,digits:s,period:c=Na.defaults.period,timestamp:d=Date.now(),window:m}){return Da.validate({token:e,secret:a,algorithm:i,digits:s,counter:Na.counter({period:c,timestamp:d}),window:m})}validate({token:e,timestamp:a,window:i}){return Na.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:a,window:i})}toString(){const e=encodeURIComponent;return`otpauth://totp/${this.issuer.length>0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&period=${e(this.period)}`}constructor({issuer:e=Na.defaults.issuer,label:a=Na.defaults.label,issuerInLabel:i=Na.defaults.issuerInLabel,secret:s=new oi,algorithm:c=Na.defaults.algorithm,digits:d=Na.defaults.digits,period:m=Na.defaults.period}={}){this.issuer=e,this.label=a,this.issuerInLabel=i,this.secret=typeof s=="string"?oi.fromBase32(s):s,this.algorithm=Fh(c),this.digits=d,this.period=m}}const gB=/^otpauth:\/\/([ht]otp)\/(.+)\?([A-Z0-9.~_-]+=[^?&]*(?:&[A-Z0-9.~_-]+=[^?&]*)*)$/i,fB=/^[2-7A-Z]+=*$/i,hB=/^SHA(?:1|224|256|384|512|3-224|3-256|3-384|3-512)$/i,AB=/^[+-]?\d+$/,FE=/^\+?[1-9]\d*$/;class pB{static parse(e){let a;try{a=e.match(gB)}catch{}if(!Array.isArray(a))throw new URIError("Invalid URI format");const i=a[1].toLowerCase(),s=a[2].split(/(?::|%3A) *(.+)/i,2).map(decodeURIComponent),c=a[3].split("&").reduce((f,g)=>{const E=g.split(/=(.*)/,2).map(decodeURIComponent),p=E[0].toLowerCase(),C=E[1],N=f;return N[p]=C,N},{});let d;const m={};if(i==="hotp")if(d=Da,typeof c.counter<"u"&&AB.test(c.counter))m.counter=parseInt(c.counter,10);else throw new TypeError("Missing or invalid 'counter' parameter");else if(i==="totp"){if(d=Na,typeof c.period<"u")if(FE.test(c.period))m.period=parseInt(c.period,10);else throw new TypeError("Invalid 'period' parameter")}else throw new TypeError("Unknown OTP type");if(typeof c.issuer<"u"&&(m.issuer=c.issuer),s.length===2?(m.label=s[1],typeof m.issuer>"u"||m.issuer===""?m.issuer=s[0]:s[0]===""&&(m.issuerInLabel=!1)):(m.label=s[0],typeof m.issuer<"u"&&m.issuer!==""&&(m.issuerInLabel=!1)),typeof c.secret<"u"&&fB.test(c.secret))m.secret=c.secret;else throw new TypeError("Missing or invalid 'secret' parameter");if(typeof c.algorithm<"u")if(hB.test(c.algorithm))m.algorithm=c.algorithm;else throw new TypeError("Invalid 'algorithm' parameter");if(typeof c.digits<"u")if(FE.test(c.digits))m.digits=parseInt(c.digits,10);else throw new TypeError("Invalid 'digits' parameter");return new d(m)}static stringify(e){if(e instanceof Da||e instanceof Na)return e.toString();throw new TypeError("Invalid 'HOTP/TOTP' object")}}const yB=({totpCodes:n,onTotpCodesChange:e,originalTotpCodeIds:a,isAddFormVisible:i,formData:s,onStateChange:c})=>{const{t:d}=Ze(),[m,f]=I.useState(null),g=(k,U)=>{let R=k.trim(),P=U.trim();if(R.toLowerCase().startsWith("otpauth://totp/"))try{const M=pB.parse(R);M instanceof Na&&(R=M.secret.base32,!P&&M.label&&(P=M.label))}catch{throw new Error(d("totp.errors.invalidSecretKey"))}if(R=R.replace(/\s/g,""),!/^[A-Z2-7]+=*$/i.test(R))throw new Error(d("totp.errors.invalidSecretKey"));return{secretKey:R,name:P||d("totp.defaultName")}},E=()=>{c({isAddFormVisible:!0,formData:{name:"",secretKey:""}}),f(null)},p=()=>{c({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),f(null)},C=k=>{c({isAddFormVisible:i,formData:{...s,...k}})},N=k=>{if(k==null||k.preventDefault(),f(null),!s.secretKey){f(d("items.validation.required"));return}try{const{secretKey:U,name:R}=g(s.secretKey,s.name),P={Id:crypto.randomUUID().toUpperCase(),Name:R,SecretKey:U,ItemId:""},M=[...n,P];e(M),p()}catch(U){U instanceof Error?f(U.message):f(d("common.errors.unknownErrorTryAgain"))}},x=k=>{const U=a.includes(k.Id);let R;U?R=n.map(P=>P.Id===k.Id?{...P,IsDeleted:!0}:P):R=n.filter(P=>P.Id!==k.Id),e(R)},S=n.filter(k=>!k.IsDeleted),T=S.length>0;return l.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:d("common.twoFactorAuthentication")}),T&&!i&&l.jsx("button",{type:"button",onClick:E,className:"w-8 h-8 flex items-center justify-center text-primary-700 hover:text-white border border-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg dark:border-primary-500 dark:text-primary-500 dark:hover:text-white dark:hover:bg-primary-600 dark:focus:ring-primary-800",title:d("totp.addCode"),children:l.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),l.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]}),!T&&!i&&l.jsxs("button",{type:"button",onClick:E,className:"w-full py-1.5 px-4 flex items-center justify-center gap-2 text-primary-700 hover:text-white border border-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg dark:border-primary-500 dark:text-primary-500 dark:hover:text-white dark:hover:bg-primary-600 dark:focus:ring-primary-800",children:[l.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),l.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),l.jsx("span",{children:d("totp.addCode")})]}),i&&l.jsxs("div",{className:"p-4 mb-4 bg-gray-50 border border-gray-200 rounded-lg dark:bg-gray-700 dark:border-gray-600",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("h4",{className:"text-lg font-medium text-gray-900 dark:text-white",children:d("totp.addCode")}),T&&l.jsx("button",{type:"button",onClick:p,className:"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white",children:l.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 14 14",children:l.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})})})]}),l.jsx("p",{className:"mb-4 text-sm text-gray-500 dark:text-gray-400",children:d("totp.instructions")}),m&&l.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg dark:bg-red-900/20 dark:border-red-800",children:l.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:m})}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{htmlFor:"totp-name",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:d("totp.nameOptional")}),l.jsx("input",{id:"totp-name",type:"text",value:s.name,onChange:k=>C({name:k.target.value}),className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{htmlFor:"totp-secret",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:d("totp.secretKey")}),l.jsx("input",{id:"totp-secret",type:"text",value:s.secretKey,onChange:k=>C({secretKey:k.target.value}),onKeyDown:k=>{k.key==="Enter"&&(k.preventDefault(),N(k))},className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx("button",{type:"button",onClick:k=>N(k),className:"text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800",children:d("common.save")})})]}),T&&l.jsx("div",{className:"grid grid-cols-1 gap-4 mt-4",children:S.map(k=>l.jsx("div",{className:"p-2 ps-3 pe-3 bg-gray-50 border border-gray-200 rounded-lg dark:bg-gray-700 dark:border-gray-600",children:l.jsxs("div",{className:"flex justify-between items-center gap-2",children:[l.jsx("div",{className:"flex items-center flex-1",children:l.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:k.Name})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"flex flex-col items-end",children:l.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:d("totp.saveToViewCode")})}),l.jsx("button",{type:"button",onClick:()=>x(k),className:"text-red-600 hover:text-red-800 dark:text-red-500 dark:hover:text-red-400",children:l.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z",clipRule:"evenodd"})})})]})]})},k.Id))})]})},EB=({inputRef:n,value:e,onChange:a,folders:i,selectedFolderId:s,onFolderChange:c})=>{const{t:d}=Ze(),[m,f]=I.useState(!1),g=i.find(x=>x.Id===s),E=I.useCallback(x=>{c(x),f(!1)},[c]),p=I.useCallback(x=>{a(x.target.value)},[a]),C=I.useCallback(()=>{f(!0)},[]),N=I.useCallback(()=>{f(!1)},[]);return l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"itemName",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:[d("items.itemName")," ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{ref:n,id:"itemName",type:"text",value:e,onChange:p,className:`w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white ${s?"pr-28":"pr-10"}`,required:!0}),l.jsxs("button",{type:"button",onClick:C,className:`absolute right-1 z-10 flex items-center gap-1 px-2 py-1 rounded transition-colors text-xs ${s?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 hover:bg-primary-200 dark:hover:bg-primary-900/50":"text-gray-500 dark:text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-600"}`,title:(g==null?void 0:g.Name)||"-",children:[l.jsx("svg",{className:"w-4 h-4 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),s&&l.jsx("span",{className:"max-w-16 truncate",children:g==null?void 0:g.Name})]})]})]}),m&&l.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[l.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-80 transition-opacity",onClick:N}),l.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:l.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-sm",children:[l.jsxs("button",{type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-500 focus:outline-none",onClick:N,children:[l.jsx("span",{className:"sr-only",children:d("common.close")}),l.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]}),l.jsx("div",{className:"mb-4",children:l.jsx("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white",children:d("items.folder")})}),l.jsxs("div",{className:"space-y-1 max-h-64 overflow-y-auto",children:[l.jsxs("button",{type:"button",onClick:()=>E(null),className:`w-full px-3 py-2 text-left rounded-md flex items-center gap-3 transition-colors ${s?"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700":"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300"}`,children:[l.jsx("svg",{className:`w-5 h-5 ${s?"text-gray-400":"text-primary-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"})}),l.jsx("span",{className:"font-medium",children:"—"}),!s&&l.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.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"})})]}),i.map(x=>l.jsxs("button",{type:"button",onClick:()=>E(x.Id),className:`w-full px-3 py-2 text-left rounded-md flex items-center gap-3 transition-colors ${s===x.Id?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"}`,children:[l.jsx("svg",{className:`w-5 h-5 ${s===x.Id?"text-primary-500":"text-gray-400"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),l.jsx("span",{className:"font-medium",children:x.Name}),s===x.Id&&l.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.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"})})]},x.Id))]})]})})]})]})},ad=[{type:fa.Login,titleKey:"itemTypes.login.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})},{type:fa.Alias,titleKey:"itemTypes.alias.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})},{type:fa.CreditCard,titleKey:"itemTypes.creditCard.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})})},{type:fa.Note,titleKey:"itemTypes.note.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})})}],bB=({selectedType:n,isEditMode:e,showDropdown:a,onDropdownToggle:i,onTypeChange:s,onRegenerateAlias:c})=>{const{t:d}=Ze(),m=ad.find(f=>f.type===n);return l.jsxs("div",{className:"relative",children:[l.jsxs("div",{className:"w-full px-4 py-2 bg-primary-50 dark:bg-primary-900/20 border border-primary-200 dark:border-primary-800 rounded-lg flex items-center gap-2",children:[l.jsxs("button",{type:"button",onClick:()=>i(!a),className:"flex-1 flex items-center justify-between hover:opacity-80 transition-opacity",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-primary-600 dark:text-primary-400",children:m==null?void 0:m.iconSvg}),l.jsxs("span",{className:"text-primary-700 dark:text-primary-300 font-medium text-sm",children:[d(e?"itemTypes.editing":"itemTypes.creating")," ",m?d(m.titleKey):""]})]}),l.jsx("svg",{className:`w-4 h-4 text-primary-500 transition-transform ${a?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),n===fa.Alias&&!e&&c&&l.jsx("button",{type:"button",onClick:f=>{f.stopPropagation(),c()},className:"flex-shrink-0 p-1.5 text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 hover:bg-primary-100 dark:hover:bg-primary-900/40 rounded transition-colors",title:d("itemTypes.regenerateAlias"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M23 4v6h-6"}),l.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})})]}),a&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),l.jsx("div",{className:"absolute z-20 mt-1 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-md shadow-lg",children:ad.map(f=>l.jsxs("button",{type:"button",onClick:()=>s(f.type),className:`w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 border-b border-gray-100 dark:border-gray-700 last:border-b-0 ${n===f.type?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300":"text-gray-900 dark:text-white"}`,children:[l.jsx("span",{className:n===f.type?"text-primary-600 dark:text-primary-400":"text-gray-500 dark:text-gray-400",children:f.iconSvg}),l.jsx("span",{className:"font-medium",children:d(f.titleKey)}),n===f.type&&l.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.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"})})]},f.type))})]})]})};var GI=(n=>(n.Male="Male",n.Female="Female",n.Other="Other",n))(GI||{}),Oh=class ni{constructor(){this.symbols=[".","-"]}generateUsername(e){let a=this.generateEmailPrefix(e);return a=a.replace(/[^a-zA-Z0-9]/g,""),a.length<ni.MIN_LENGTH?a+=this.generateRandomString(ni.MIN_LENGTH-a.length):a.length>ni.MAX_LENGTH&&(a=a.substring(0,ni.MAX_LENGTH)),a}generateEmailPrefix(e){const a=[];switch(typeof e.birthDate=="string"&&(e.birthDate=new Date(e.birthDate)),this.getSecureRandom(4)){case 0:a.push(e.firstName.substring(0,1).toLowerCase()+e.lastName.toLowerCase());break;case 1:a.push((e.firstName+e.lastName).toLowerCase());break;case 2:a.push(e.firstName.toLowerCase()+e.lastName.substring(0,1).toLowerCase());break;case 3:a.push(e.firstName.substring(0,Math.min(3,e.firstName.length)).toLowerCase()+e.lastName.toLowerCase());break}switch(this.getSecureRandom(2)){case 0:a.push(e.birthDate.getFullYear().toString());break;case 1:a.push(e.birthDate.getFullYear().toString().substring(2));break}let i=a.join(this.getRandomSymbol());if(this.getSecureRandom(2)===0){const s=this.getSecureRandom(i.length);i=i.slice(0,s)+this.getRandomSymbol()+i.slice(s)}return i=this.sanitizeEmailPrefix(i),i.length<ni.MIN_LENGTH?i+=this.generateRandomString(ni.MIN_LENGTH-i.length):i.length>ni.MAX_LENGTH&&(i=i.substring(0,ni.MAX_LENGTH)),i}generateRandomEmailPrefix(e=14){return this.generateRandomString(e)}sanitizeEmailPrefix(e){let a=e.replace(/[^a-zA-Z0-9._-]/g,"");return a=a.replace(/[-_.]{2,}/g,i=>i[0]),a=a.replace(/^[-._]+/,""),a=a.replace(/[-._]*$/,""),a}getRandomSymbol(){return this.getSecureRandom(3)===0?this.symbols[this.getSecureRandom(this.symbols.length)]:""}generateRandomString(e){const a="abcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e},()=>a.charAt(this.getSecureRandom(a.length))).join("")}getSecureRandom(e){const a=new Uint32Array(1);return crypto.getRandomValues(a),a[0]%e}};Oh.MIN_LENGTH=6;Oh.MAX_LENGTH=20;var jh=Oh,Br=class{constructor(){this.firstNamesMale=[],this.firstNamesFemale=[],this.lastNames=[],this.random=Math.random,this.firstNamesMale=this.getFirstNamesMaleJson(),this.firstNamesFemale=this.getFirstNamesFemaleJson(),this.lastNames=this.getLastNamesJson()}getFirstNamesMaleByDecade(){return[]}getFirstNamesFemaleByDecade(){return[]}generateRandomDateOfBirth(n){if(n){const{targetYear:m,yearDeviation:f}=n;if(f===0){const g=new Date(m,0,1),E=new Date(m,11,31),p=g.getTime()+this.random()*(E.getTime()-g.getTime());return new Date(p)}else{const g=m-f,E=m+f,p=new Date(g,0,1),C=new Date(E,11,31),N=p.getTime()+this.random()*(C.getTime()-p.getTime());return new Date(N)}}const e=new Date,a=21,i=65,s=new Date(e.getFullYear()-i,e.getMonth(),e.getDate()),c=new Date(e.getFullYear()-a,e.getMonth(),e.getDate()),d=s.getTime()+this.random()*(c.getTime()-s.getTime());return new Date(d)}selectFirstnamesForBirthdate(n,e){const a=n.getFullYear(),i=e?this.getFirstNamesMaleByDecade():this.getFirstNamesFemaleByDecade();if(i.length===0)return e?this.firstNamesMale:this.firstNamesFemale;const s=i.filter(d=>a>=d.startYear&&a<=d.endYear);if(s.length>0){const d=[];return s.forEach(m=>d.push(...m.names)),d}const c=[];return i.forEach(d=>c.push(...d.names)),c.length>0?c:e?this.firstNamesMale:this.firstNamesFemale}generateRandomIdentity(n,e){const a={firstName:"",lastName:"",gender:"Male",birthDate:new Date,emailPrefix:"",nickName:""};let i;n==="random"||n===void 0?i=this.random()<.5?"Male":"Female":n==="male"?i="Male":n==="female"?i="Female":i="Male",a.gender=i,a.birthDate=this.generateRandomDateOfBirth(e);let s;if(i==="Male")s=this.selectFirstnamesForBirthdate(a.birthDate,!0);else if(i==="Female")s=this.selectFirstnamesForBirthdate(a.birthDate,!1);else{const d=this.random()<.5;s=this.selectFirstnamesForBirthdate(a.birthDate,d)}a.firstName=s[Math.floor(this.random()*s.length)],a.lastName=this.lastNames[Math.floor(this.random()*this.lastNames.length)];const c=new jh;return a.emailPrefix=c.generateEmailPrefix(a),a.nickName=c.generateUsername(a),a}},IB=["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"],vB=["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"],NB=["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"],OE=class extends Br{getFirstNamesMaleJson(){return IB}getFirstNamesFemaleJson(){return vB}getLastNamesJson(){return NB}},CB=["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"],wB=["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"],xB=["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"],SB=class extends Br{getFirstNamesMaleJson(){return CB}getFirstNamesFemaleJson(){return wB}getLastNamesJson(){return xB}},TB=["Müller","Schmidt","Schneider","Fischer","Weber","Meyer","Wagner","Schulz","Becker","Hoffmann","Schäfer","Koch","Richter","Bauer","Klein","Wolf","Schröder","Neumann","Schwarz","Zimmermann","Braun","Hofmann","Krüger","Hartmann","Lange","Schmitt","Werner","Schmitz","Krause","Meier","Lehmann","Schmid","Schulze","Maier","Köhler","Herrmann","Walter","König","Mayer","Huber","Kaiser","Fuchs","Peters","Lang","Scholz","Möller","Weiß","Jung","Hahn","Schubert","Vogel","Friedrich","Günther","Keller","Winkler","Frank","Berger","Roth","Beck","Lorenz","Baumann","Franke","Albrecht","Schuster","Simon","Ludwig","Böhm","Winter","Kraus","Martin","Schumacher","Krämer","Vogt","Otto","Jäger","Stein","Groß","Sommer","Seidel","Heinrich","Haas","Brandt","Schreiber","Graf","Dietrich","Schulte","Kühn","Ziegler","Kuhn","Pohl","Engel","Horn","Bergmann","Voigt","Busch","Thomas","Sauer","Arnold","Pfeiffer","Wolff","Beyer","Seifert","Ernst","Lindner","Hübner","Kramer","Jansen","Franz","Peter","Hansen","Wenzel","Götz","Paul","Riedel","Barth","Kern","Hermann","Nagel","Wilhelm","Ott","Bock","Langer","Grimm","Ritter","Haase","Lenz","Förster","Mohr","Kruse","Schumann","Jahn","Thiel","Kaufmann","Zimmer","Hoppe","Petersen","Fiedler","Berg","Arndt","Marx","Lutz","Fritz","Kraft","Michel","Walther","Böttcher","Schütz","Eckert","Sander","Thiele","Reuter","Reinhardt","Schindler","Ebert","Kunz","Schilling","Schramm","Voß","Nowak","Hein","Hesse","Frey","Rudolph","Fröhlich","Beckmann","Kunze","Herzog","Bayer","Behrens","Stephan","Büttner","Gruber","Adam","Gärtner","Witt","Maurer","Bender","Bachmann","Schultz","Seitz","Geiger","Stahl","Steiner","Scherer","Kirchner","Dietz","Ullrich","Kurz","Breuer","Gerlach","Ulrich","Brinkmann","Fink","Heinz","Löffler","Reichert","Naumann","Böhme","Schröter","Blum","Göbel","Moser","Schlüter","Brunner","Körner","Schenk","Wirth","Wegner","Brand","Wendt","Stark","Schwab","Krebs","Heller","Wolter","Reimann","Rieger","Unger","Binder","Bruns","Döring","Menzel","Buchholz","Ackermann","Rose","Meißner","Janssen","Bartsch","May","Hirsch","Jakob","Schiller","Kopp","John","Hinz","Bach","Pfeifer","Bischoff","Engelhardt","Wilke","Sturm","Hildebrandt","Siebert","Urban","Link","Rohde","Kohl","Linke","Wittmann","Fricke","Köster","Gebhardt","Weiss","Vetter","Freitag","Nickel","Hennig","Rau","Münch","Witte","Noack","Renner","Westphal","Reich","Will","Baier","Kolb","Brückner","Marquardt","Kiefer","Keil","Henning","Heinze","Funk","Lemke","Ahrens","Esser","Pieper","Baum","Conrad","Schlegel","Fuhrmann","Decker","Jacob","Held","Röder","Berndt","Hanke","Kirsch","Neubauer","Hammer","Stoll","Erdmann","Mann","Philipp","Schön","Wiese","Kremer","Bartels","Klose","Mertens","Schreiner","Dittrich","Krieger","Kröger","Krug","Harms","Henke","Großmann","Martens","Heß","Schrader","Strauß","Adler","Herbst","Kühne","Heine","Konrad","Kluge","Henkel","Wiedemann","Albert","Popp","Wimmer","Karl","Wahl","Stadler","Hamann","Kuhlmann","Steffen","Lindemann","Fritsch","Bernhardt","Burkhardt","Preuß","Metzger","Bader","Nolte","Hauser","Blank","Beier","Klaus","Probst","Hess","Zander","Miller","Niemann","Funke","Haupt","Burger","Bode","Holz","Jost","Rauch","Rothe","Herold","Jordan","Anders","Fleischer","Wiegand","Hartung","Janßen","Lohmann","Krauß","Vollmer","Baur","Heinemann","Wild","Brenner","Reichel","Wetzel","Christ","Rausch","Hummel","Reiter","Mayr","Knoll","Kroll","Wegener","Beer","Schade","Neubert","Merz","Schüler","Strobel","Diehl","Behrendt","Glaser","Feldmann","Hagen","Jacobs","Rupp","Geißler","Straub","Hohmann","Römer","Stock","Haag","Meister","Freund","Dörr","Kessler","Betz","Seiler","Altmann","Weise","Metz","Eder","Busse","Mai","Wunderlich","Schütte","Hentschel","Voss","Weis","Heck","Born","Falk","Raab","Lauer","Völker","Bittner","Merkel","Sonntag","Moritz","Ehlers","Bertram","Hartwig","Rapp","Gerber","Zeller","Scharf","Pietsch","Kellner","Bär","Eichhorn","Giese","Wulf","Block","Opitz","Gottschalk","Jürgens","Greiner","Wieland","Benz","Keßler","Steffens","Heil","Seeger","Stumpf","Gross","Bühler","Eberhardt","Hiller","Buck","Weigel","Schweizer","Albers","Heuer","Pape","Hempel","Schott","Schütze","Scheffler","Engelmann","Wiesner","Runge","Geyer","Neuhaus","Forster","Oswald","Radtke","Heim","Geisler","Appel","Weidner","Seidl","Moll","Dorn","Klemm","Barthel","Gabriel","Springer","Timm","Engels","Kretschmer","Reimer","Steinbach","Hensel","Wichmann","Eichler","Hecht","Winkelmann","Heise","Noll","Fleischmann","Neugebauer","Hinrichs","Schaller","Lechner","Brandl","Mack","Gebauer","Siegel","Zahn","Singer","Michels","Schuler","Scholl","Uhlig","Brüggemann","Specht","Bürger","Eggert","Baumgartner","Weller","Schnell","Börner","Brauer","Kohler","Pfaff","Auer","Drescher","Otte","Frenzel","Petzold","Rother","Hagemann","Sattler","Wirtz","Ruf","Schirmer","Sauter","Schürmann","Junker","Walz","Dreyer","Sievers","Haller","Prinz","Stolz","Hausmann","Dick","Lux","Schnabel","Elsner","Kühl","Gerhardt","Klotz","Rabe","Schick","Faber","Riedl","Kranz","Fries","Reichelt","Rösch","Langner","Maaß","Wittig","Geier","Finke","Kasper","Maas","Bremer","Rath","Knapp","Dittmann","Kahl","Volk","Faust","Harder","Biermann","Pütz","Kempf","Mielke","Michaelis","Yilmaz","Abel","Thieme","Schütt","Hauck","Cordes","Eberle","Schaefer","Wehner","Haug","Fritzsche","Kilian","Eggers","Große","Matthes","Reinhold","Paulus","Dürr","Bohn","Thoma","Schober","Koller","Korn","Höhne","Hering","Gerdes","Ullmann","Jensen","Endres","Bernhard","Leonhardt","Eckhardt","Schaaf","Höfer","Junge","Rademacher","Pilz","Hellwig","Knorr","Helbig","Melzer","Lippert","Evers","Bahr","Klinger","Heitmann","Ehrhardt","Heinrichs","Horstmann","Behr","Stöhr","Drews","Rudolf","Sieber","Theis","Groth","Hecker","Weiler","Kemper","Rost","Lück","Claus","Hildebrand","Steinmetz","Götze","Trautmann","Blume","Kurth","Augustin","Nitsche","Janke","Jahnke","Klug","Damm","Heimann","Strauch","Schlosser","Uhl","Böhmer","Ries","Hellmann","Höhn","Hertel","Dreher","Borchert","Huth","Sperling","Just","Stenzel","Kunkel","Lau","Sprenger","Schönfeld","Pohlmann","Heilmann","Wacker","Lehner","Teichmann","Kaminski","Vogl","Gehrke","Hartl","Vogler","Schroeder","Thomsen","Nitschke","Engler","Liedtke","Wille","Starke","Friedrichs","Kirchhoff","Schwarze","Balzer","Reinhard","Heinen","Lotz","Küster","Kretzschmar","Schöne","Clemens","Hornung","Ulbrich","Renz","Hofer","Ruppert","Lohse","Schuh","Amann","Westermann","Stiller","Burmeister","Alt","Hampel","Brockmann","Wessel","Späth","Hoyer","Mader","Bartel","Rößler","Krieg","Grote","Schwarzer","Schweitzer","Scheer","Bosch","Zink","Roos","Wagener","Oppermann","Henze","Lehnert","Seemann","Trapp","Reiß","David","Pfeffer","Grau","Horst","Diekmann","Korte","Rehm","Wilde","Schleicher","Lampe","Grundmann","Veit","Daniel","Eisele","Hafner","Steinert","Sachs","Pfister","Kühnel","Schüller","Klatt","Bischof","Wendel","Tietz","Frick","Buschmann","Steinke","Menke","Baumeister","Kirschner","Loos","Ebner","Kastner","Wolters","Orth","Stange","Becher","Helm","Knobloch","Wörner","Heyer","Nguyen","Baumgärtner","Grund","Brüning","Ostermann","Cremer","Schauer","Jacobi","Ewald","Fürst","Widmann","Otten","Büchner","Petri","Fritsche","Kock","Ehlert","Kleine","Eckstein","Hacker","Brandes","Buchner","Hagedorn","Keck","Häusler","Muth","Apel","Heuser","Bastian","Kersten","Stamm","Niemeyer","Berthold","Gehrmann","Weinert","Schatz","Hager","Volkmann","Michael","Wieczorek","Wilms","Burghardt","Schultze","Merten","Schwartz","Kling","Rode","Neu","Mende","Thies","Böttger","Schell","Spindler","Pabst","Grün","Weiland","Mühlbauer","Hanisch","Doll","Janzen","Adams","Hermes","Haack","Cramer","Spies","Stern","Kugler","Budde","Jakobs","Scheller","Rösler","Reiser","Jonas","Herr","Ebeling","Wulff","Pauli","Löhr","Lukas","Rahn","Sachse","Köhn","Backhaus","Mahler","Hille","Kowalski","Heidrich","Brück","Gottwald","Heidenreich","Baumgarten","Hamm","Körber","Kübler","Frisch","Hardt","Enders","Bräuer","Seidler","Küpper","Lauterbach","Zeidler","Eckardt","Kreuzer","Schiffer","Schaper","Gehring","Hannemann","Ortmann","Petry","Thiemann","Tiedemann","Grünewald","Johannsen","Scheel","Volz","Kunert","Dieckmann","Bormann","Obermeier","Knauer","Schaub","Eilers","Berner","Pahl","Reinecke","Herz","Henn","Brehm","Hoff","Resch","Ochs","Krohn","Lerch","Raabe","Ehrlich","Hack","Friedl","Reis","Rogge","Meurer","Thelen","Drechsler","Hölscher","Morgenstern","Sommerfeld","Ebel","Kellermann","Rupprecht","Post","Hillebrand","Hill","Paulsen","Grabowski","Bolz","Lorenzen","Welsch","Seibel","Kleinert","Schröer","Jaeger","Wächter","Boldt","Palm","Kratz","Reimers","Pusch","Exner","Dietze","Wüst","Andres","Heide","Kaya","Reichardt","Kummer","Metzner","Grube","Ewert","Grunwald","Habermann","Zorn","Fichtner","Emmerich","Mangold","Reif","Ahlers","Kästner","Küppers","Petermann","Stratmann","Sailer","Schuhmacher","Hoch","Struck","Buchmann","Rauscher","Lüdtke","Wendler","Dreier","Zöller","Bucher","Siegert","Finger","Hopf","Rieck","Friese","Hopp","Sahin","Henrich","Spengler"],kB=["Michael","Peter","Hans","Klaus","Wolfgang","Thomas","Jürgen","Andreas","Bernd","Manfred","Rainer","Uwe","Dieter","Joachim","Karl","Holger","Werner","Ralf","Frank","Norbert","Ulrich","Rolf","Jörg","Gerhard","Günther","Helmut","Harald","Jens","Horst","Heinz","Reinhardt","Martin","Detlef","Stefan","Matthias","Volker","Christian","Gerd","Rüdiger","Alexander","Bernhard","Hartmut","Walter","Herbert","Georg","Ronald","Axel","Roland","Dirk","Josef","Lothar","Wilfried","Jan","Karsten","Udo","Ingo","Hermann","Kurt","Olaf","Franz","Siegfried","Dietmar","Mohammed","Heinrich","Alfred","Christoph","Viktor","Lutz","Johannes","Torsten","Kai","Rudolf","Richard","Waldemar","Robert","Jörn","Johann","Ernst","Reinhold","Eckhard","Friedrich","Burghard","Wilhelm","Heiko","Jochen","Harry","Hubert","Paul","Erich","Fred","Achim","Ali","Wolf","Erwin","Mario","Andre","Eberhard","Winfried","Heino","Sven","Willi","Ulf","Bodo","Henry","Vladimir","Dietrich","John","Armin","Edgar","Friedhelm","Gunnar","Arno","Fritz","Gerald","Henning","Abdul","Karlheinz","Andrzej","Markus","Otto","Roman","Knut","Wolfram","Nobert","Gunther","Konrad","Heiner","Mehmet","Nils","Bruno"],LB=["Thomas","Michael","Andreas","Stefan","Frank","Torsten","Peter","Jörg","Ralf","Matthias","Christian","Dirk","Jens","Martin","Klaus","Jürgen","Karsten","Uwe","Bernd","Markus","Oliver","Sven","Wolfgang","Holger","Olaf","Hans","Rainer","Kai","Jan","Volker","Joachim","Christoph","Alexander","Axel","Heiko","Norbert","Manfred","Andre","Dieter","Robert","Ulrich","Detlef","Harald","Ingo","Marc","Roland","Lars","Rolf","Marco","Jochen","Guido","Mike","Jörn","Georg","Gerhard","Rüdiger","Mario","Lutz","Bernhard","Nils","Udo","Dietmar","Gerd","Karl","Horst","Günther","Steffen","Johannes","Werner","Ronald","Arne","Daniel","Helmut","Achim","Mohammed","René","Ulf","Hartmut","Björn","Erik","Heinz","Patrick","Viktor","Walter","Ali","Gerald","Reinhardt","Henning","Tobias","Mehmet","Armin","Sebastian","Helge","Gunnar","Richard","Waldemar","Josef","Knut","Boris","Hermann","Paul","Burghard","Florian","Lothar","Sönke","Tim","Philipp","Franz","Clemens","Wilfried","Siegfried","Johann","Ahmet","Eckhard","Fred","Heinrich","Roman","John","Arno","Mustafa","Hasan","Gregor","Alfred","Arnd","Rudolf","Sergej","David","Manuel","Marcel","Friedrich","José","Marek","Mirko","Sascha","Thilo","Bodo","Darius","Hendrik","Herbert","Nikolai","Wolf","Nikola","Roger","Edgar","Ernst","Henry","Wolfram","Christopher","Vladimir","Gunther","Hüseyin","Harry","Hauke","Wilhelm","Arthur","Winfried","Henrik","Antonio","Felix","Anton","Bruno","Igor","Götz","Tom","Heino","Abdul","Miroslaw","Sören","Bert","Elmar","Hubert","Kurt","Ole","Tillmann","Ahmad","Andrej","Dennis","Adam","Ibrahim","Malte","Raphael","Reinhold","Eduard","Erwin","Marius","Nikolaus","Carlos","Ismail","Nico","Gernot","Jacek","Nicolas","Peer","Albert","Heiner","Timo","Andrzej","Jean","Berthold","Hanno"],RB=["Christian","Michael","Stefan","Andreas","Markus","Thomas","Matthias","Sven","Jan","Alexander","Oliver","Martin","Torsten","Frank","Marco","Marc","Jens","Daniel","Karsten","Andre","Sebastian","Lars","Dirk","Tobias","Jörg","Sascha","Kai","Florian","Christoph","Björn","Peter","Dennis","Mike","Ralf","Patrick","Robert","Holger","René","Nils","Heiko","Mario","Philipp","Olaf","Steffen","Tim","Timo","Ingo","Jürgen","Volker","Marcel","Benjamin","Bernd","Axel","Arne","Klaus","David","Jörn","Felix","Boris","Henning","Wolfgang","Uwe","Mirko","Torben","Johannes","Nico","Manuel","Jochen","Hans","Ali","Joachim","Malte","Mohammed","Roland","Simon","Rainer","Fabian","Gunnar","Ulrich","Ronny","Mehmet","Erik","Guido","Sergej","Hendrik","Viktor","Dominik","Roman","Georg","Bastian","Murat","Helge","Sören","Christopher","Karl","Andrej","Mustafa","Ulf","Lutz","Ole","Ahmet","Moritz","Enrico","Nicolas","Sönke","Paul","Harald","Norbert","Henrik","Raphael","Nikolai","Tom","Danny","Gerrit","Hasan","Gregor","Arthur","Bernhard","Marius","Konstantin","Achim","Norman","John","Thilo","Waldemar","Julian","Clemens","Hakan","Till","Ronald","Eduard","Erkan","Hauke","Manfred","Rüdiger","Adam","Ahmad","Klaas","Ibrahim","Vladimir","Adrian","Eugen","Falk","Maximilian","Richard","Andy","Frederik","Marek","Tino","Kevin","Knut","Pascal","Arnd","Detlef","Gerald","Max","Darius","Heinrich","Hüseyin","Igor","Alexej","Dieter","Eike","Tomasz","Wilhelm","Dietmar","Franz","Gerhard","Johann","Antonio","José","Rolf","Abdul","Peer","Ismail","Nikola","Bülent","Gerd","Jakob","Lukas","Niklas","Robin","Gordon","Friedrich","Jonas","Leif","Michel","Hermann","Oleg","Sandro","Tillmann","Burghard","Henry","Jean","Steven","Benedikt","Nikolaus","Ricardo","Roberto","Vitali","Amir","Günther","Helmut","Ivan","Rico","Falko","Jacek","Kim","Krzysztof","Piotr","Said","Silvio","Udo","Vitalij","Werner","Armin","Ayhan","Bodo","Carlos","Cengiz","Josef","Pierre","Ömer","Arno","Atilla","Birger","Dimitri","Georgios","Götz","Hagen","Hannes","Hartmut","Juan","Kolja","Marcin","Toni","Louis","Metin","Paulo","Pawel","Yusuf","Albert","Alex","Chris","Gunther","Lasse","Orhan","Ramazan","Rudolf","Walter"],DB=["Christian","Sebastian","Jan","Daniel","Stefan","Alexander","Michael","Dennis","Martin","Florian","Tobias","Matthias","Philipp","Patrick","Thomas","Benjamin","Andreas","Markus","Christoph","Marcel","Sven","Sascha","Tim","David","Felix","Johannes","Robert","Marco","Andre","Marc","Oliver","Christopher","Nils","Fabian","Simon","Björn","Timo","René","Dominik","Julian","Jens","Lars","Peter","Steffen","Manuel","Lukas","Moritz","Maximilian","Jonas","Mike","Kai","Frank","Paul","Kevin","Torben","Nico","Karsten","Torsten","Mario","Malte","Bastian","Hendrik","Max","Dirk","Pascal","Erik","Sören","Arne","Jakob","Nicolas","Konstantin","Niklas","Marius","Frederik","Roman","Henning","Jörg","Mirko","Mohammed","Viktor","Ali","Ralf","Raphael","Adrian","Danny","Steven","Ole","Hannes","Lennard","Benedikt","Georg","Marvin","Eugen","Robin","Jochen","Tom","Arthur","Heiko","Nikolai","Jannik","Till","Hans","Richard","Henrik","Pierre","Ronny","Sergej","Holger","Jannis","John","Boris","Jörn","Michel","Johann","Gregor","Klaus","Norman","Clemens","Hauke","Jonathan","Vincent","Enrico","Kim","Axel","Andrej","Toni","Karl","Waldemar","Bernd","Mehmet","Anton","Wolfgang","Ahmad","Mustafa","Andy","Ahmet","Lasse","Tino","Eike","Gerrit","Konrad","Joachim","Steve","Julius","Eduard","Murat","Dimitri","Friedrich","Gunnar","Jürgen","Adam","Ibrahim","Maurice","Klaas","Sönke","Bernhard","Igor","Tillmann","Alexej","Chris","Vladimir","Serkan","Thilo","Helge","Olaf","Roland","Gabriel","Nick","Falk","Nikola","Rico","Kolja","Leif","Pawel","Amir","Ingo","Jascha","Alex","Fatih","Gökhan","Hakan","Hasan","Kamil","Lutz","Marcin","Uwe","Achim","Finn","Samuel","Valentin","Vitali","Damian","Dustin","Franz","Leon","Darius","Erkan","Henry","Maxim","Peer"],BB=["Jan","Lukas","Philipp","Tim","Alexander","Daniel","Tobias","Dennis","Marcel","Felix","Kevin","Florian","Maximilian","Niklas","Jonas","Sebastian","Patrick","Fabian","Christian","Jannik","Julian","David","Marvin","Timo","Marc","Nico","Simon","Finn","Dominik","Nils","Leon","Pascal","Lennard","Max","Tom","Christopher","Benjamin","Moritz","Paul","Lars","Marco","Sven","Christoph","Robin","Johannes","Malte","Michael","Torben","Jakob","Matthias","Martin","Stefan","Mike","Andre","Jannis","Hendrik","Luca","Björn","Nicolas","Markus","René","Vincent","Jonathan","Steven","Frederik","Sascha","Thomas","Erik","Robert","Oliver","Andreas","Nick","Marius","Kai","Ole","Manuel","Joshua","Justin","Steffen","Adrian","Konstantin","Benedikt","Lasse","Louis","Maurice","Julius","Mirko","Anton","Till","John","Henrik","Henry","Bastian","Sören","Leonard","Raphael","Johann","Arne","Hannes","Michel","Karl","Mario","Ben","Mohammed","Viktor","Linus","Nikolai","Dustin","Aaron","Valentin","Peter","Toni","Henning","Marlon","Clemens","Danny","Justus","Jasper","Julien","Chris","Jens","Joel","Hauke","Kim","Richard","Gerrit","Cedric","Pierre","Karsten","Thore","Vivian","Mats","Ricardo","Arthur","Bennet","Fabio","Jannek","Kilian","Leo","Melvin","Noah","Samuel","Timon","Eike","Ali","Leif","Peer","Jean","Hans","Jeremy","Merlin","Jannes","Calvin","Jona","Elias","Lorenz","Marten","Can","Dario","Georg","Ahmet","Enrico","Oskar","Tristan","Jascha","Roman","Colin","Gabriel","Jason","Klaas","Morten","Nikola","Phil","Sönke","Alex","Cem","Konrad","Mattis","Rico","Armin","Brian","Frank","Gregor","Ralf","Thies","Norman","Ruben","Ahmad","Emre","Levin","Mehmet","Torge","Torsten","Bjarne","Kornelius","Steve","Jerome","Marek","Sandro","Thilo","Franz","Kenneth","Axel","Burak","Jörn","Kjell","Milan","Tjark","Kolja","Miguel","Tillmann","Emil","Friedrich","Lion","Rasmus","Tino","Caspar","Mert","Amir","Ibrahim","Joe","Leonhard","Mustafa","Onur","Ferdinand","Joscha","Laurenz","Maxim","Sam","Yasin","Antonio","Jeffrey","Jendrik","Nikolaus","Philippe","Sinan","Damian","Dirk","Fritz","Helge","Juri","Leander","Matti","Michele","Nino","Rouven","Said","Tarek","Theo","Timothy"],UB=["Leon","Lukas","Luca","Jonas","Tim","Finn","Paul","Felix","Maximilian","Louis","Niklas","Max","Ben","Julian","Jan","Philipp","Elias","Moritz","Noah","Jannik","Jannis","Tom","Nico","Simon","David","Alexander","Fabian","Erik","Jakob","Florian","Nils","Justin","Lennard","Nick","Linus","Daniel","Tobias","Jason","Dominik","Colin","Marvin","Mika","Sebastian","Kevin","Johannes","Julius","Robin","Jonathan","Henry","Hannes","Anton","Vincent","Benjamin","Marlon","Timo","Lenny","Adrian","Marc","Joel","Raphael","Dennis","Till","Joshua","Aaron","Emil","Pascal","Ole","Leonard","Leo","Lasse","Marcel","Samuel","Konstantin","Karl","Oskar","Lars","Lennox","Mattis","Jona","Kilian","Christian","Maurice","Justus","Jamie","Oliver","Malte","Silas","Michael","Mohammed","Jeremy","John","Phil","Bastian","Maxim","Johann","Liam","Nicolas","Mike","Levin","Benedikt","Marco","Noel","Luke","Bennet","Cedric","Gabriel","Theo","Matteo","Tyler","Valentin","Fabio","Marius","Jayden","Toni","Richard","Mats","Hendrik","Jannes","Henrik","Julien","Manuel","Arthur","Patrick","Matthias","Frederik","Connor","Tristan","Torben","Markus","Kai","Martin","Arda","Andreas","Damian","Timon","Franz","Michel","Levi","Finley","Robert","Thomas","Ian","Arne","Dustin","Christopher","Christoph","Bruno","Diego","Matti","Clemens","Leander","Magnus","Milan","Danny","Laurin","Lorenz","Laurenz","Sven","Ali","Leandro","Steven","Chris","Dean","Lenn","Pepe","Jasper","Konrad","Devin","Can","Domenik","Friedrich","Sean","Kian","Sam","Kjell","Ryan","Andre","Bjarne","Ruben","Stefan","Nikita","René","Peter","Hugo","Melvin","Jean","Leopold","Malik","Willi","Fritz","Leonardo","Quentin","Ahmet","Enrico","Emilio","Brian","Ferdinand","Antonio","Marten","Nevio","Thore","Joris","Leonhard","Roman","Anthony","Viktor","Henning","Sascha","Alex","Adam","Elia","Josef","Theodor","Jaron","Leif","Georg","Piet","Alessandro","Kaan","Lion","Miguel","Alessio","Carlos","Luan","Ilyas","Ricardo","Yusuf","Jannek","Mert","Peer","Yasin","Enes","Marek","Nino","Arian","Carlo","Janne","Gustav","Hasan","Mattes","Mustafa","William","Jerome","Milo","Dario","Mehmet","Hans","Thilo","Neo","Sören","Mirko","Sandro","Tamino","Emilian","Björn","Korbinian","Pierre","Emanuel","Bela","Benno","Merlin","Tino","Keno","Ludwig","Emre","Jordan","Kerem","Gianluca","Ibrahim","Jesse","Mario","Tjark","Eddy","Lian","Fiete","Etienne","Klaas","Marian","Efe","Jack","Calvin","Semih","Rico","Mick","Darian","Joost","Tommy","Angelo","Romeo","Keanu","Kurt","Raik","Tammo","Dylan","Nikolai","Thies","Armin","Darius","Maddox","Rasmus"],MB=["Ben","Leon","Paul","Jonas","Finn","Lukas","Louis","Luca","Noah","Elias","Felix","Maximilian","Max","Henry","Julian","Moritz","Tim","Emil","Jakob","Philipp","Niklas","Oskar","David","Anton","Alexander","Liam","Matteo","Theo","Tom","Jan"],_B=["Noah","Matteo","Leon","Elias","Finn","Paul","Luca","Emil","Louis","Theo","Henry","Felix","Ben","Liam","Leo","Lukas","Jonas","Jakob","Anton","Oskar","Maximilian","Mohammed","Levi","Milan","Jona","David","Karl","Jannis","Lio","Moritz","Adam","Max","Samuel","Mats","Alexander","Jonathan","Raphael","Aaron","Linus","Julian","Milo","Theodor","Carlo","Philipp","Valentin","Leonard","Erik","Mika","Johann","Niklas"],FB=["Angelika","Monika","Sabine","Karin","Petra","Gabriele","Birgit","Brigitte","Renate","Susanne","Barbara","Ursula","Ute","Marion","Jutta","Ingrid","Cornelia","Heike","Maria","Regina","Elke","Silvia","Andrea","Ulrike","Gisela","Angela","Bärbel","Christine","Martina","Christiane","Doris","Helga","Dagmar","Sigrid","Christa","Gudrun","Beate","Rita","Hannelore","Marlies","Eva","Claudia","Anke","Marianne","Annette","Elisabeth","Astrid","Erika","Heidi","Christel","Rosemarie","Anna","Bettina","Gabriela","Roswita","Ilona","Annegret","Evelyn","Sonja","Inge","Christina","Carmen","Irene","Kirsten","Lydia","Silke","Marina","Margret","Marita","Ruth","Maren","Sibylle","Waltraud","Ingeborg","Katharina","Vera","Heidemarie","Kerstin","Heidrun","Margrit","Carola","Iris","Antje","Katrin","Margit","Manuela","Veronika","Olga","Anne","Dorothea","Hildegard","Irmgard","Edith","Uta","Regine","Margarete","Anita","Frauke","Karen","Valentina","Anja","Tatjana","Ellen","Edeltraud","Verena","Dörte","Ilse","Gerda","Ines","Britta","Corinna","Elvira","Michaela","Annemarie","Anneliese","Gertrud","Gitta","Marie","Susann","Maike","Stefanie","Danuta","Gunda","Margot","Johanna","Irina","Ina","Theresa","Nina","Wiebke"],OB=["Sabine","Susanne","Petra","Andrea","Claudia","Birgit","Martina","Anja","Heike","Kerstin","Bettina","Gabriele","Katrin","Silke","Ute","Christine","Stefanie","Monika","Britta","Ulrike","Barbara","Kirsten","Silvia","Karin","Annette","Christiane","Beate","Manuela","Angela","Anke","Nicole","Marion","Cornelia","Christina","Angelika","Astrid","Elke","Michaela","Regina","Dagmar","Katja","Brigitte","Maria","Iris","Jutta","Antje","Tanja","Doris","Maike","Simone","Maren","Corinna","Sonja","Daniela","Carola","Alexandra","Eva","Ursula","Carmen","Sandra","Karen","Ines","Marina","Katharina","Elisabeth","Bärbel","Renate","Gaby","Anne","Anna","Gabriela","Sibylle","Heidi","Uta","Ina","Sigrid","Frauke","Ilona","Ingrid","Gudrun","Wiebke","Tatjana","Yvonne","Carolin","Patricia","Dörte","Susann","Birte","Rita","Julia","Irina","Bianca","Nikola","Ilka","Olga","Jeanette","Marlies","Helga","Melanie","Verena","Vera","Regine","Kirstin","Evelyn","Irene","Lydia","Christa","Annett","Marianne","Dorothea","Annegret","Elena","Gisela","Imke","Isabell","Heidrun","Viola","Diana","Esther","Susan","Inga","Judith","Ruth","Cordula","Jacqueline","Kai","Veronika","Carina","Roswita","Constanze","Marita","Natalie","Ramona","Ellen","Erika","Fatma","Nina","Svetlana","Dorothee","Inge","Nadja","Jasmin","Anita","Franziska","Friederike","Marie","Svenja","Jessica","Natascha","Rosemarie","Valentina","Ayse","Linda","Beatrix","Johanna","Ariane","Gesa","Larissa","Malgorzata","Miriam","Gunda","Margarete","Natalia","Almut","Ewa","Gitta","Jolanta","Babette","Beatrice","Christel","Christin","Sabrina","Dorit","Jana","Juliane","Hilke","Margret","Beata","Galina","Liane","Danuta","Elvira","Ingeborg","Rosa","Emine","Grit","Hannah","Sabina","Agnes","Edith","Gundula","Inken","Maja","Margit","Bozena","Helena","Theresa","Elzbieta","Hannelore","Tina"],jB=["Nicole","Stefanie","Sandra","Katrin","Claudia","Tanja","Anja","Melanie","Andrea","Daniela","Julia","Susanne","Katja","Christina","Kerstin","Silke","Sabine","Alexandra","Yvonne","Sonja","Nadine","Nina","Simone","Maike","Petra","Christine","Britta","Martina","Anna","Michaela","Manuela","Bianca","Katharina","Silvia","Bettina","Heike","Ulrike","Birgit","Anke","Christiane","Jessica","Monika","Maren","Eva","Anne","Antje","Diana","Jana","Cornelia","Wiebke","Kirsten","Miriam","Tina","Carolin","Astrid","Annette","Maria","Annika","Jennifer","Tatjana","Angela","Corinna","Barbara","Verena","Elena","Jasmin","Birte","Inga","Olga","Natalie","Ines","Iris","Ina","Marion","Beate","Irina","Svenja","Judith","Carina","Sarah","Patricia","Karin","Carmen","Franziska","Janine","Juliane","Saskia","Carola","Doreen","Frauke","Marina","Ute","Isabell","Annett","Christin","Karen","Mandy","Nadja","Svetlana","Natalia","Gabriele","Sabrina","Elke","Ramona","Natascha","Friederike","Ilka","Vanessa","Dagmar","Imke","Jeanette","Dörte","Angelika","Nikola","Rebecca","Regina","Janina","Kirstin","Johanna","Jutta","Elisabeth","Anita","Mareike","Sibylle","Maja","Esther","Vera","Agnieszka","Jenny","Peggy","Ariane","Hannah","Steffi","Joana","Victoria","Magdalena","Fatma","Lena","Sina","Doris","Uta","Larissa","Marie","Evelyn","Ann","Constanze","Jacqueline","Kati","Lydia","Agnes","Dana","Dorothea","Ilona","Kim","Ayse","Gaby","Katarzyna","Mirja","Pamela","Heidi","Helena","Viola","Isabella","Susann","Cindy","Cordula","Emine","Kathleen","Nancy","Beata","Denise","Susan","Ursula","Veronika","Brigitte","Gesa","Martha","Mirjam","Beatrice","Hatice","Dorothee","Linda","Malgorzata","Pia","Grit","Irene","Filiz","Yasemin","Berit","Ellen","Janet","Laura","Lisa","Renate","Ruth","Ewa","Gabriela","Ingrid","Liane","Mariam","Monique","Tamara","Antonia","Svantje","Alice","Margarete","Nele","Manja","Nora","Oksana","Özlem","Nadia","Ricarda","Bärbel","Carolina","Hülya","Inken","Rita","Sophie","Valentina","Violetta","Vivien","Britt","Inna","Leyla","Arzu","Kai","Natalja","Sandy","Silvana","Sophia","Beatrix","Ludmilla","Romy","Selma","Elvira","Helene","Henrike","Oxana","Rabea","Sabina","Wenke","Annegret","Aylin","Charlotte","Dorit","Emma","Jeannine","Marianne","Mona"],PB=["Julia","Stefanie","Anna","Katharina","Katrin","Sarah","Sandra","Nadine","Melanie","Christina","Jennifer","Nicole","Sabrina","Jessica","Annika","Claudia","Nina","Anne","Daniela","Franziska","Anja","Carolin","Jasmin","Christin","Katja","Janina","Jana","Janine","Yvonne","Alexandra","Svenja","Maike","Lena","Laura","Maria","Tanja","Susanne","Lisa","Andrea","Christine","Miriam","Sonja","Johanna","Ann","Sabine","Vanessa","Kerstin","Natalie","Bianca","Eva","Mareike","Marie","Verena","Jacqueline","Isabell","Hannah","Saskia","Simone","Tina","Juliane","Maren","Elena","Rebecca","Martina","Christiane","Carina","Mandy","Olga","Denise","Wiebke","Diana","Marina","Tatjana","Jenny","Manuela","Linda","Michaela","Nadja","Inga","Antje","Corinna","Patricia","Silvia","Ulrike","Kim","Judith","Ines","Monika","Birte","Ina","Victoria","Elisabeth","Theresa","Sina","Irina","Sophie","Silke","Friederike","Britta","Nora","Lea","Nele","Natascha","Bettina","Doreen","Barbara","Angela","Ramona","Cornelia","Anke","Natalia","Magdalena","Nancy","Annette","Astrid","Aylin","Susann","Kathleen","Alina","Lydia","Joana","Kirsten","Jeanette","Martha","Heike","Mona","Anita","Dana","Veronika","Yasemin","Sophia","Carolina","Svetlana","Esther","Charlotte","Antonia","Constanze","Vivien","Luisa","Svantje","Helena","Petra","Steffi","Pia","Susan","Monique","Lina","Mariam","Vera","Merle","Angelika","Karin","Maja","Frauke","Agnes","Isabella","Josephine","Frederike","Michelle","Carmen","Carola","Cindy","Madeleine","Janna","Larissa","Gina","Marlene","Anastasia","Elisa","Regina","Viola","Özlem","Alice","Evelyn","Marleen","Dominique","Lara","Karen","Nikola","Marion","Annabell","Annett","Dorothea","Iris","Henrike","Kira","Mirja","Camilla","Ronja","Valentina","Alena","Ariane","Dorothee","Fatma","Gesa","Agnieszka","Birgit","Ricarda","Sandy","Beate"],HB=["Julia","Anna","Sarah","Lisa","Laura","Katharina","Lena","Vanessa","Annika","Jennifer","Jana","Lea","Marie","Jasmin","Franziska","Hannah","Jessica","Michelle","Nina","Alina","Johanna","Carolin","Christina","Kim","Nadine","Jacqueline","Ann","Luisa","Sophie","Lara","Natalie","Svenja","Sabrina","Isabell","Sandra","Janina","Melanie","Leonie","Antonia","Saskia","Stefanie","Aylin","Denise","Nele","Pia","Alexandra","Katrin","Sophia","Sina","Melina","Janine","Vivien","Rebecca","Anne","Miriam","Victoria","Nicole","Mareike","Lina","Josephine","Merle","Clara","Maria","Maike","Charlotte","Celina","Paula","Carina","Larissa","Christin","Linda","Mandy","Theresa","Kimberly","Elena","Melissa","Jule","Celine","Daniela","Jenny","Kira","Patricia","Ronja","Bianca","Eva","Sonja","Joana","Gina","Tanja","Nora","Yvonne","Pauline","Emily","Natascha","Anja","Marina","Friederike","Angelina","Nadja","Paulina","Lynn","Alicia","Svea","Amelie","Katja","Juliane","Lilly","Marlene","Verena","Chantal","Milena","Maja","Chiara","Selina","Alena","Carlotta","Mona","Annabell","Carla","Claudia","Tatjana","Maren","Elisabeth","Emma","Helena","Inga","Luise","Tamara","Christine","Fiona","Judith","Frederike","Finja","Jill","Fenja","Tina","Cindy","Ina","Janne","Marleen","Mia","Samantha","Annalena","Janika","Henrike","Wiebke","Elisa","Esther","Ricarda","Janna","Stella","Carolina","Dana","Helen","Madeleine","Mara","Simone","Corinna","Diana","Fabienne","Monique","Samira","Sandy","Tabea","Valerie","Malin","Andrea","Birte","Swantje","Veronika","Kerstin","Magdalena","Ramona","Susanne","Greta","Juli","Kaja","Lucy","Zoe","Angelique","Jasmina","Tessa","Lydia","Sabine","Dominique","Malina","Michaela","Charline","Monika","Karen","Mira","Yasemin","Alica","Alice","Alisa","Angelika","Emilia","Henriette","Marieke","Vera","Anneke","Felicia","Giulia","Liza","Maxi","Viola","Annkatrin","Lotta","Olivia","Anastasia","Dilara","Felicitas","Mariam","Marisa","Rieke","Rosa","Beatrice","Constanze","Dorothea","Isabella","Juliana","Katerina","Martina","Merve","Philine","Valentina","Justine","Melisa","Michele","Mika","Nancy","Selin","Alissa","Angela","Cara","Charleen","Deborah","Ellen","Imke","Irina","Jeanette","Leona","Lorena","Manuela","Martha","Silvia","Viviane","Aline","Desiree","Xenia"],zB=["Hannah","Leonie","Anna","Lea","Lena","Mia","Emily","Laura","Lara","Sarah","Emma","Lilly","Marie","Sophie","Nele","Johanna","Lina","Julia","Maja","Sophia","Lisa","Amelie","Alina","Luisa","Leni","Clara","Jana","Charlotte","Paula","Emilia","Jasmin","Zoe","Annika","Katharina","Chiara","Pia","Finja","Josephine","Angelina","Jule","Lucy","Melina","Antonia","Vanessa","Emely","Victoria","Celina","Michelle","Nina","Isabell","Franziska","Fiona","Amy","Celine","Maria","Pauline","Stella","Carolin","Lia","Marlene","Melissa","Ida","Greta","Selina","Helena","Aylin","Merle","Ronja","Sina","Vivien","Mara","Eva","Kim","Elisa","Theresa","Jolina","Mathilda","Jette","Lotta","Luise","Elena","Carla","Jessica","Larissa","Luna","Nelly","Alicia","Lana","Linda","Milena","Miriam","Samira","Frieda","Magdalena","Carlotta","Alexandra","Fabienne","Kira","Helene","Nora","Elisabeth","Natalie","Tabea","Romy","Anne","Paulina","Juli","Christina","Annalena","Kimberly","Samantha","Annabell","Ella","Lynn","Mira","Letizia","Jennifer","Carina","Aaliyah","Rebecca","Anastasia","Dana","Isabella","Diana","Olivia","Lenja","Mariella","Mila","Lucia","Martha","Leyla","Joana","Elina","Carolina","Xenia","Gina","Nicole","Janina","Saskia","Evelyn","Anni","Marleen","Melanie","Svenja","Svea","Chantal","Tessa","Maike","Fenja","Leona","Josie","Joline","Cheyenne","Lorena","Noemi","Helen","Ann","Alissa","Malin","Lilian","Lotte","Mina","Felicitas","Liv","Jenny","Jill","Valentina","Veronika","Alexa","Kaja","Rieke","Yara","Dilara","Tuana","Laila","Tamara","Alisa","Ela","Marina","Alessia","Luana","Patricia","Lene","Jacqueline","Janne","Henriette","Ashley","Franka","Milla","Florentine","Selin","Selma","Giulia","Mona","Lisann","Aleyna","Rosalie","Sonja","Elif","Thea","Maren","Enya","Nadine","Alisha","Freya","Jamie","Denise","Aurelia","Ina","Christin","Judith","Lilith","Alena","Felicia","Juliana","Sandra","Zoey","Linnea","Soraya","Nisa","Stefanie","Juliane","Daria","Jasmina","Josefin","Friederike","Marla","Rosa","Cara","Nika","Naomi","Vivian","Amina","Elli","Cora","Luca","Madita","Mailin","Marieke","Tara","Amira","Liana","Lydia","Joy","Madlen","Nike","Hailey","Madeleine","Mareike","Aimee","Cassandra","Heidi","Joyce","Alea","Janine","Jonna","Sydney","Alia","Ilayda","Livia","Maira","Leana","Valerie","Thalia","Ellen","Emmi","Melisa","Inga","Julina","Smilla","Katja","Melinda","Valeria","Anouk","Liliana","Sabrina","Wiebke","Joleen","Leandra","Zeynep","Katrin","Tamina","Jenna","Levke","Salome","Annelie","Cecilia","Annemarie","Jona","Mary","Mirja","Collien","Alice","Azra","Ceylin","Lavinia","Maxi","Anja","Henrike","Mariam"],QB=["Mia","Emma","Hannah","Sophia","Emilia","Anna","Lea","Lina","Marie","Lena","Leonie","Emily","Amelie","Luisa","Johanna","Clara","Sophie","Lilly","Mila","Leni","Laura","Lara","Nele","Maja","Charlotte","Sarah","Ella","Ida","Mathilda","Frieda"],VB=["Emilia","Sophia","Emma","Hannah","Mia","Lina","Mila","Ella","Clara","Lea","Marie","Leni","Lia","Mathilda","Ida","Anna","Frieda","Leonie","Emily","Maja","Lilly","Luisa","Charlotte","Amelie","Sophie","Lena","Johanna","Lara","Mira","Nora","Nele","Sarah","Malia","Lotta","Juna","Paula","Luna","Elisa","Maria","Romy","Laura","Helena","Thea","Mara","Victoria","Antonia","Elena","Tilda","Carla","Eva"],GB=class extends Br{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return TB}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:kB},{startYear:1960,endYear:1969,names:LB},{startYear:1970,endYear:1979,names:RB},{startYear:1980,endYear:1989,names:DB},{startYear:1990,endYear:1999,names:BB},{startYear:2e3,endYear:2009,names:UB},{startYear:2010,endYear:2019,names:MB},{startYear:2020,endYear:2029,names:_B}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:FB},{startYear:1960,endYear:1969,names:OB},{startYear:1970,endYear:1979,names:jB},{startYear:1980,endYear:1989,names:PB},{startYear:1990,endYear:1999,names:HB},{startYear:2e3,endYear:2009,names:zB},{startYear:2010,endYear:2019,names:QB},{startYear:2020,endYear:2029,names:VB}]}},KB=["Rossi","Russo","Ferrari","Esposito","Bianchi","Romano","Colombo","Ricci","Marino","Greco","Bruno","Gallo","Conti","De Luca","Mancini","Costa","Giordano","Rizzo","Lombardi","Moretti","Barbieri","Fontana","Santoro","Mariani","Rinaldi","Caruso","Ferrara","Galli","Martini","Leone","Longo","Gentile","Martinelli","Vitale","Serra","Coppola","De Santis","D'Angelo","Marchetti","Parisi","Villa","Conte","Ferraro","Ferri","Fabbri","Bianco","Marini","Grasso","Valentini","Messina"],qB=["Giuseppe","Giovanni","Antonio","Mario","Luigi","Francesco","Angelo","Vincenzo","Pietro","Salvatore","Carlo","Franco","Pasquale","Domenico","Raffaele","Carmelo","Paolo","Sergio","Bruno","Luciano","Giorgio","Aldo","Renato","Piero","Guido","Nicola","Rosario","Vittorio","Michele","Umberto","Romano","Gino","Silvano","Renzo","Attilio","Augusto","Benito","Biagio","Cesare","Corrado","Dino","Egidio","Elio","Enzo","Ettore","Fausto","Felice","Ferdinando","Ferruccio","Gaetano","Gastone","Gennaro","Gerardo","Germano","Italo","Lino","Marino","Nello","Nino","Orazio","Orlando","Osvaldo","Ottavio","Primo","Remo","Rinaldo","Rocco","Ruggero","Severino","Silvio","Ugo","Valerio","Vasco","Walter","Agostino","Alfredo","Armando","Arturo","Claudio","Enrico","Giancarlo","Gianfranco","Alberto","Marcello","Roberto","Stefano","Mauro","Fabio","Maurizio","Massimo","Alessandro","Lorenzo","Andrea","Marco","Giuliano","Adriano","Gianni","Sandro","Leone"],WB=["Roberto","Stefano","Paolo","Marco","Luca","Alessandro","Massimo","Mauro","Fabrizio","Maurizio","Gianluca","Claudio","Giorgio","Piero","Gianfranco","Gianni","Valter","Ivan","Danilo","Moreno","Loris","Sandro","Dario","Nicola","Enrico","Alberto","Fabio","Giuseppe","Antonio","Giovanni","Francesco","Andrea","Michele","Daniele","Emanuele","Vittorio","Silvano","Romano","Giuliano","Tiziano","Massimiliano","Antonello","Arrigo","Aurelio","Bernardo","Carlo","Cesare","Corrado","Costantino","Damiano","Diego","Dino","Donatello","Duccio","Edmondo","Egidio","Elio","Enea","Ercole","Ermanno","Eros","Ezio","Fausto","Ferdinando","Fiorello","Flavio","Floriano","Folco","Franco","Fulvio","Gabriele","Gaetano","Gastone","Giacomo","Gianbattista","Giancarlo","Gianmaria","Gianpaolo","Gianpiero","Gilberto","Gino","Giordano","Gualtiero","Guido","Gustavo","Iacopo","Igor","Ilario","Italo","Ivano","Jacopo","Lamberto","Lando","Lanfranco","Lazzaro","Leo","Leonardo","Leone"],YB=["Alessandro","Andrea","Marco","Luca","Stefano","Davide","Gianluca","Fabio","Francesco","Massimo","Roberto","Simone","Daniele","Emanuele","Christian","Riccardo","Federico","Matteo","Gabriele","Michele","Lorenzo","Alessio","Nicola","Alberto","Fabrizio","Massimiliano","Giorgio","Enrico","Claudio","Paolo","Ivan","Mirko","Manuel","Denis","Igor","Omar","Cristian","Yuri","Alex","Samuel","Mattia","Pietro","Vincenzo","Angelo","Salvatore","Luigi","Domenico","Raffaele","Rosario","Carmelo","Pasquale","Diego","Dario","Giulio","Valerio","Maurizio","Gianni","Sandro","Loris","Moreno","Danilo","Tiziano","Antonello","Bernardo","Carlo","Cesare","Corrado","Costantino","Damiano","Demetrio","Dino","Edoardo","Elia","Emilio","Enzo","Ermanno","Eros","Eugenio","Fausto","Flavio","Fulvio","Gaetano","Gerardo","Gianbattista","Gianmaria","Gianpaolo","Gilberto","Giuliano","Iacopo","Leonardo","Marcello","Martino","Niccolò","Piero","Rinaldo","Ruggero","Samuele","Saverio","Sebastiano","Tommaso"],JB=["Marco","Andrea","Luca","Alessandro","Stefano","Daniele","Simone","Davide","Matteo","Francesco","Lorenzo","Federico","Gianluca","Fabio","Massimo","Emanuele","Riccardo","Nicola","Christian","Roberto","Michele","Giuseppe","Antonio","Giovanni","Paolo","Alberto","Filippo","Giorgio","Enrico","Tommaso","Giacomo","Mattia","Gabriele","Samuele","Pietro","Vincenzo","Angelo","Raffaele","Domenico","Rosario","Salvatore","Luigi","Mario","Carmelo","Pasquale","Alessio","Cristian","Manuel","Mirko","Ivan","Omar","Denis","Igor","Yuri","Alex","Samuel","Jacopo","Nicolò","Edoardo","Leonardo","Diego","Dario","Giulio","Valerio","Claudio","Mauro","Fabrizio","Maurizio","Gianni","Piero","Sandro","Loris","Moreno","Danilo","Valter","Silvano","Romano","Giuliano","Tiziano","Massimiliano","Antonello","Arrigo","Aurelio","Bernardo","Carlo","Cesare","Corrado","Costantino","Damiano","Demetrio","Dino","Elia","Emilio","Enzo","Ermanno","Eros","Eugenio","Fausto"],XB=["Matteo","Andrea","Luca","Alessandro","Davide","Lorenzo","Francesco","Simone","Marco","Mattia","Federico","Riccardo","Gabriele","Stefano","Daniele","Nicola","Christian","Giacomo","Filippo","Tommaso","Emanuele","Michele","Giuseppe","Antonio","Giovanni","Alberto","Giorgio","Enrico","Pietro","Samuele","Alessio","Edoardo","Leonardo","Diego","Nicolò","Manuel","Mirko","Ivan","Jacopo","Giulio","Valerio","Claudio","Paolo","Roberto","Vincenzo","Angelo","Raffaele","Domenico","Rosario","Salvatore","Luigi","Mario","Carmelo","Pasquale","Massimo","Fabio","Gianluca","Maurizio","Fabrizio","Mauro","Gianni","Piero","Sandro","Loris","Moreno","Danilo","Valter","Silvano","Romano","Giuliano","Tiziano","Massimiliano","Antonello","Arrigo","Aurelio","Bernardo","Carlo","Cesare","Corrado","Costantino","Damiano","Dino","Elia","Emilio","Enea","Ettore","Eugenio","Flavio","Gaetano","Gerardo","Gianmaria","Gianpaolo","Gilberto","Gualtiero","Guido","Gustavo","Iacopo","Igor"],$B=["Francesco","Alessandro","Andrea","Matteo","Lorenzo","Mattia","Davide","Simone","Luca","Gabriele","Riccardo","Federico","Marco","Tommaso","Leonardo","Giuseppe","Antonio","Giovanni","Filippo","Giacomo","Christian","Edoardo","Samuele","Alessio","Michele","Daniele","Stefano","Nicola","Pietro","Giorgio","Enrico","Emanuele","Alberto","Diego","Nicolò","Manuel","Jacopo","Giulio","Valerio","Paolo","Roberto","Vincenzo","Angelo","Raffaele","Domenico","Rosario","Salvatore","Luigi","Mario","Carmelo","Pasquale","Kevin","Thomas","Nicholas","Samuel","Gabriel","Daniel","David","Jonathan","Michael","Patrick","Simon","Steven","William","Anthony","Christopher","George","Harry","Jack","James","Joseph","Joshua","Matthew","Oliver","Oscar","Richard","Robert","Ryan","Elia","Gioele","Enea","Liam","Noah","Ethan","Bryan","Nathan","Aron","Zeno","Leone","Brando","Tancredi","Manfredi","Dante","Lapo","Romeo","Ettore","Achille","Michelangelo","Orlando"],ZB=["Francesco","Alessandro","Leonardo","Lorenzo","Mattia","Andrea","Gabriele","Matteo","Riccardo","Tommaso","Edoardo","Giuseppe","Antonio","Davide","Federico","Diego","Giovanni","Marco","Nicolò","Samuele","Michele","Pietro","Luca","Simone","Filippo","Giacomo","Christian","Alessio","Emanuele","Daniele","Stefano","Nicola","Giorgio","Enrico","Alberto","Manuel","Jacopo","Giulio","Valerio","Paolo","Roberto","Vincenzo","Angelo","Raffaele","Domenico","Rosario","Salvatore","Luigi","Mario","Carmelo","Pasquale","Nathan","Liam","Noah","Ethan","Mason","Logan","Lucas","Oliver","Elijah","Aiden","James","Benjamin","William","Alexander","Michael","Daniel","Henry","Jackson","Sebastian","Jack","Samuel","David","Joseph","Carter","Owen","Wyatt","John","Matthew","Luke","Julian","Gioele","Elia","Enea","Leone","Brando","Tancredi","Manfredi","Dante","Lapo","Romeo","Ettore","Achille","Michelangelo","Orlando","Cesare","Vittorio","Augusto","Sebastiano","Damiano","Gregorio","Ludovico","Martino","Niccolò","Rocco","Santo","Saverio","Tiziano","Valentino","Vasco","Zaccaria"],eU=["Maria","Anna","Rosa","Giuseppina","Angela","Giovanna","Teresa","Lucia","Carmela","Caterina","Francesca","Antonietta","Carla","Rita","Paola","Luisa","Fernanda","Franca","Gabriella","Giuliana","Lina","Mirella","Bruna","Adriana","Silvana","Marisa","Iolanda","Ines","Ida","Ester","Elvira","Elsa","Elena","Edda","Dina","Delia","Clara","Bice","Bianca","Assunta","Antonia","Annunziata","Amelia","Amalia","Agata","Ada","Adele","Adelina","Albina","Alda","Alma","Anita","Armida","Aurelia","Aurora","Beatrice","Celeste","Cesira","Clelia","Clotilde","Concetta","Costanza","Daria","Deanna","Dolores","Domenica","Dora","Edvige","Elda","Eleonora","Elisabetta","Emma","Enrica","Ersilia","Eugenia","Evelina","Fabiola","Fiammetta","Filomena","Flora","Floriana","Fulvia","Gemma","Gilda","Gina","Gioia","Grazia","Graziella","Immacolata","Irene","Irma","Isa","Jolanda","Laura","Lidia"],tU=["Roberta","Patrizia","Cinzia","Daniela","Lorella","Nadia","Monica","Susanna","Tiziana","Donatella","Simonetta","Antonella","Sabrina","Loredana","Marina","Barbara","Paola","Laura","Cristina","Rossella","Simona","Stefania","Manuela","Sonia","Sandra","Loretta","Orietta","Gigliola","Fiorella","Gabriella","Raffaella","Isabella","Marta","Elisabetta","Claudia","Alessandra","Federica","Michela","Serena","Valeria","Cecilia","Letizia","Luciana","Mara","Marcella","Margherita","Mariella","Marilena","Marisa","Milena","Mirella","Natalia","Nicoletta","Norma","Novella","Olga","Ombretta","Oriana","Ornella","Ottavia","Pamela","Piera","Priscilla","Rachele","Rebecca","Regina","Renata","Rita","Romina","Rosalina","Rosanna","Rosetta","Rosina","Santina","Savina","Silvia","Sofia","Speranza","Tina","Vanda","Vanna","Velia","Vera","Vilma","Vincenza","Violante","Virginia","Vittoria","Viviana","Wanda","Zita"],aU=["Barbara","Katia","Debora","Erika","Pamela","Samantha","Moira","Natascia","Tamara","Tatiana","Jessica","Valentina","Ilaria","Serena","Chiara","Silvia","Elena","Elisa","Francesca","Alessia","Federica","Giorgia","Martina","Giulia","Sara","Alice","Veronica","Eleonora","Vanessa","Sabrina","Sonia","Tiziana","Loredana","Antonella","Annamaria","Mariangela","Rosaria","Concetta","Assunta","Domenica","Vincenza","Filomena","Maddalena","Teresa","Lucia","Carmela","Caterina","Antonietta","Carla","Rita","Franca","Marinella","Silvana","Patrizia","Luisa","Monica","Manuela","Michela","Simona","Stefania","Claudia","Valeria","Roberta","Laura","Cristina","Daniela","Paola","Alessandra","Cecilia","Letizia","Marta","Elisabetta","Raffaella","Gabriella","Cinzia","Nadia","Donatella","Lorella","Susanna","Simonetta","Marina","Rossella","Sandra","Loretta","Orietta","Fiorella","Isabella","Gigliola","Margherita","Agnese"],nU=["Valentina","Francesca","Alessandra","Chiara","Silvia","Elena","Laura","Cristina","Roberta","Sara","Giulia","Martina","Alice","Ilaria","Serena","Federica","Michela","Simona","Manuela","Monica","Daniela","Paola","Barbara","Stefania","Claudia","Valeria","Eleonora","Veronica","Elisa","Giorgia","Alessia","Noemi","Giada","Aurora","Sofia","Ludovica","Ginevra","Beatrice","Matilde","Vittoria","Emma","Nicole","Gaia","Camilla","Bianca","Arianna","Melissa","Vanessa","Sabrina","Sonia","Tiziana","Loredana","Antonella","Annamaria","Mariangela","Rosaria","Concetta","Assunta","Domenica","Vincenza","Filomena","Maddalena","Teresa","Lucia","Carmela","Caterina","Antonietta","Carla","Rita","Franca","Marinella","Silvana","Patrizia","Luisa","Katia","Debora","Erika","Pamela","Samantha","Moira","Natascia","Tamara","Tatiana","Jessica","Greta","Rachele","Rebecca","Angelica","Benedetta","Costanza","Diletta","Lucrezia","Marta","Miriam","Asia","Desiree","Sharon","Denise","Chanel"],rU=["Giulia","Chiara","Martina","Sara","Francesca","Alessia","Silvia","Valentina","Alice","Federica","Giorgia","Elena","Laura","Elisa","Ilaria","Eleonora","Serena","Roberta","Cristina","Veronica","Simona","Michela","Manuela","Monica","Daniela","Paola","Barbara","Stefania","Claudia","Valeria","Noemi","Giada","Aurora","Sofia","Ludovica","Ginevra","Beatrice","Matilde","Vittoria","Emma","Nicole","Gaia","Camilla","Bianca","Arianna","Melissa","Vanessa","Sabrina","Sonia","Tiziana","Loredana","Antonella","Annamaria","Mariangela","Rosaria","Concetta","Assunta","Domenica","Vincenza","Filomena","Maddalena","Teresa","Lucia","Carmela","Caterina","Antonietta","Carla","Rita","Anna","Maria","Greta","Rachele","Rebecca","Angelica","Benedetta","Costanza","Diletta","Lucrezia","Marta","Miriam","Asia","Desiree","Sharon","Denise","Chanel","Emily","Jennifer","Jasmine","Luna","Maya","Mia","Michelle","Siria","Sole","Stella","Viola","Virginia","Zoe","Adele","Agata"],iU=["Giulia","Sofia","Martina","Sara","Chiara","Aurora","Alice","Alessia","Francesca","Giorgia","Ginevra","Ludovica","Greta","Gaia","Emma","Beatrice","Matilde","Vittoria","Noemi","Giada","Elena","Elisa","Anna","Maria","Nicole","Valentina","Federica","Silvia","Laura","Ilaria","Eleonora","Serena","Roberta","Cristina","Veronica","Simona","Michela","Manuela","Monica","Daniela","Paola","Barbara","Stefania","Claudia","Valeria","Arianna","Melissa","Vanessa","Sabrina","Sonia","Tiziana","Loredana","Antonella","Annamaria","Mariangela","Rosaria","Concetta","Assunta","Domenica","Vincenza","Filomena","Maddalena","Teresa","Lucia","Carmela","Caterina","Antonietta","Carla","Rita","Franca","Rachele","Rebecca","Angelica","Benedetta","Costanza","Diletta","Lucrezia","Marta","Miriam","Asia","Desiree","Sharon","Denise","Chanel","Emily","Jennifer","Jasmine","Luna","Maya","Mia","Michelle","Siria","Sole","Stella","Viola","Virginia","Zoe","Adele","Agata","Ambra","Cecilia"],sU=["Sofia","Aurora","Giulia","Ginevra","Alice","Giorgia","Emma","Greta","Martina","Beatrice","Matilde","Ludovica","Vittoria","Nicole","Chiara","Anna","Sara","Bianca","Gaia","Noemi","Francesca","Alessia","Elena","Elisa","Maria","Adele","Viola","Mia","Ambra","Cecilia","Margherita","Linda","Eleonora","Elisabetta","Valeria","Veronica","Vanessa","Sabrina","Pamela","Debora","Nadia","Sonia","Tiziana","Loredana","Antonella","Annamaria","Mariangela","Rosaria","Concetta","Assunta","Domenica","Vincenza","Filomena","Maddalena","Teresa","Lucia","Carmela","Caterina","Antonietta","Carla","Rita","Franca","Marinella","Silvana","Patrizia","Luisa","Ilaria","Monica","Manuela","Michela","Simona","Barbara","Agnese","Anita","Isabel","Chloe","Emily","Luna","Sole","Stella","Azzurra","Gioia","Diletta","Benedetta","Costanza","Angelica","Lucrezia","Marta","Miriam","Rachele","Rebecca","Serena","Zoe","Agata","Cloe","Dafne","Diana","Eva","Flora","Frida","Glenda","Irene","Iris"],oU=class extends Br{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return KB}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:qB},{startYear:1960,endYear:1969,names:WB},{startYear:1970,endYear:1979,names:YB},{startYear:1980,endYear:1989,names:JB},{startYear:1990,endYear:1999,names:XB},{startYear:2e3,endYear:2009,names:$B},{startYear:2010,endYear:2019,names:ZB}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:eU},{startYear:1960,endYear:1969,names:tU},{startYear:1970,endYear:1979,names:aU},{startYear:1980,endYear:1989,names:nU},{startYear:1990,endYear:1999,names:rU},{startYear:2e3,endYear:2009,names:iU},{startYear:2010,endYear:2019,names:sU}]}},lU=["Mateo","Leo","Lucas","Hugo","Martín","Enzo","Thiago","Óliver","Manuel","Luca","Daniel","Liam","Mario","Gabriel","Adrián","Alejandro","Dylan","Noah","Pablo","Álvaro","David","Gael","Gonzalo","Rafael","Julen","Miguel","Aarón","Bruno","Marc","Marco","Eric","Izan","Juan","Antonio","Darío","Santiago","Iván","Teo","Alex","Andrés","Jaime","Javier","Leonardo","Marcos","Mathias","Adonay","Kai","Nathan","Pau","Aimar","Biel","Carlos","Dakar","Diego","Fabio","Leandro","Nico","Nil","Rodrigo","Sergio","Aleix","Dante","Derek","Eithan","Ian","Iker","Lorenzo","Pol","Rubén","Samuel","Ángel","Ares","Axel","Haitam","Ismael","José María","Kylian","Luis","Maximiliano","Pedro","Telmo","Unai","Abel","Adam","Aitor","Arnau","Asier","Ignacio","Isaac","Jesús","Joel","Jon","Nael","Raúl","Romeo","Saúl","Yeray","Adria","Alan","Alonso"],cU=["Sofía","Emma","Alma","Lucía","Olivia","Vega","Mía","Valeria","Julia","Lola","Martina","Noa","Alana","Triana","Adhara","Carla","Laia","Carmen","Gala","Paula","Adriane","Daniela","Lía","Alba","Candela","Isabella","Lara","Vera","Aitana","María","Cloe","Luna","Nora","Sara","Victoria","Zoe","Alejandra","Camila","Alicia","Manuela","Mar","Valentina","Ángela","Aina","Amara","Ana","Aria","Bianca","Claudia","Elena","Macarena","Maya","Abril","Blanca","Carolina","Catalina","Gabriela","Violeta","Amaia","Aurora","Cataleya","Gema","Inés","Irati","Jade","Julieta","Ainara","Alaia","Arlet","Atenea","Clara","Marta","Ona","Rocío","Sabela","Amelia","Antonella","Cristina","Elsa","Eva","Georgina","Haizea","India","Iris","Jana","Leyre","Marina","Naia","Sienna","Sol","Zaira","Africa","Alessia","Arabia","Aroa","Diana","Eira","Encarna","Gaia","Gianna"],uU=["García","Rodríguez","González","Fernández","López","Martínez","Sánchez","Pérez","Gómez","Martín","Jimenez","Hernández","Ruiz","Díaz","Moreno","Muñoz","Álvarez","Romero","Gutiérrez","Alonso","Navarro","Torres","Domínguez","Ramos","Vázquez","Ramírez","Gil","Serrano","Morales","Molina","Blanco","Suárez","Castro","Ortega","Delgado","Ortiz","Marin","Rubio","Nuñez","Medina","Sanz","Castillo","Iglesias","Cortés","Garrido","Santos","Guerrero","Lozano","Cano","Cruz","Méndez","Flores","Prieto","Herrera","Peña","León","Márquez","Cabrera","Gallego","Calvo","Vidal","Campos","Reyes","Vega","Fuentes","Carrasco","Diez","Aguilar","Caballero","Nieto","Santana","Vargas","Pascual","Giménez","Herrero","Hidalgo","Montero","Lorenzo","Santiago","Benitez","Duran","Ibáñez","Arias","Mora","Ferrer","Carmona","Vicente","Rojas","Soto","Crespo","Roman","Pastor","Velasco","Parra","Sáez","Moya","Bravo","Rivera","Gallardo","Soler"],dU=class extends Br{getFirstNamesMaleJson(){return lU}getFirstNamesFemaleJson(){return cU}getLastNamesJson(){return uU}},mU=["Ababei","Apostol","Ardelean","Avram","Baciu","Badea","Balan","Barbu","Bejan","Bicu","Blaga","Boboc","Bogdan","Boroș","Botezatu","Bradea","Bratu","Bucur","Burlacu","Butnaru","Călin","Căpățână","Caragea","Cazan","Ceaușu","Cercel","Cernat","Chiriac","Chirila","Chiriță","Chis","Ciobanu","Ciocan","Ciorbea","Cojocaru","Coman","Constantin","Constantinescu","Cornea","Cosma","Costache","Costin","Cozma","Crăciun","Crețu","Crisan","Cristea","Croitoru","Cuza","Danciu","Danila","Dascălu","David","Diaconescu","Diaconu","Dima","Dincă","Dinu","Dobre","Dobrescu","Dogaru","Drăgan","Drăghici","Drăghicescu","Dumitrascu","Dumitrescu","Dumitru","Duta","Enache","Ene","Farcas","Filimon","Filip","Florea","Florescu","Frățilă","Gabor","Gavrila","Georgescu","Gheorghe","Gheorghita","Gheorghiu","Gherman","Ghiță","Giurgiu","Gliga","Goga","Goran","Grigoras","Grigore","Grigorescu","Grosu","Groza","Hanganu","Hodor","Hossu","Iacob","Iancu","Ieremia","Ilie","Iliuta","Ion","Ionescu","Ioniță","Iordache","Iordănescu","Iorgu","Iosif","Iovu","Irimia","Isac","Istrate","Ivan","Ivascu","Jianu","Lazar","Luca","Luchian","Lungu","Lupu","Macovei","Maftei","Man","Manea","Manole","Manolache","Manolea","Marcu","Marian","Marin","Marinescu","Marta","Matei","Mateescu","Mărgărit","Micu","Mihai","Mihăilescu","Miloș","Mirea","Mirică","Miron","Moise","Moldovan","Moldoveanu","Morar","Moraru","Muntean","Munteanu","Mureșan","Mușat","Năstase","Neacșu","Neagoe","Neagu","Neamțu","Necula","Nedelcu","Negrea","Negrescu","Negru","Nica","Nichita","Nicolae","Nicolescu","Nistor","Niță","Olaru","Oltean","Olteanu","Oprea","Oproiu","Pârvu","Pascu","Pătrașcu","Păun","Pavel","Petre","Petrescu","Pîrvu","Pop","Popa","Popescu","Popovici","Preda","Puiu","Radu","Radulescu","Roman","Roșca","Roșu","Rus","Rusu","Sandu","Sârbu","Sava","Savu","Simion","Simionescu","Socol","Solomon","Spânu","Stan","Stanciu","Stancu","Stănescu","Ștefan","Ștefănescu","Stoian","Stoica","Stroe","Suciu","Tănase","Tătaru","Teodorescu","Ticu","Toma","Tomescu","Trandafir","Trifan","Tudor","Tudoran","Tudose","Ungureanu","Ursu","Vaduva","Varga","Vasile","Vasilescu","Vasiliu","Vatamanu","Vâlcu","Vintilă","Vișan","Vlad","Voicu","Voinea","Zaharia","Zamfir"],gU=["Ion","Gheorghe","Vasile","Constantin","Nicolae","Dumitru","Petre","Ioan","Alexandru","Ștefan","Grigore","Marin","Victor","Cornel","Traian","Ilie","Mircea","Radu","Tudor","Pavel","Costică","Viorel","Aurel","Valeriu","Emil","Andrei","Mihai","Iuliu","Stan","Anghel","Zaharia","Zamfir","Haralambie","Iordache","Savu","Panait","Spiridon","Chiriac","Avram","Axente"],fU=["Mihai","Alexandru","Ion","Ioan","Gheorghe","Vasile","Viorel","Mircea","Ionel","Dan","Valeriu","Emil","Marian","Aurel","Doru","Virgil","Florin","Adrian","Petrică","Nicolae","Ștefan","Constantin","Dumitru","Gelu","Stelian","Silviu","Cezar","Ovidiu","Liviu","Valentin","Romeo","Lucian","Nelu","Gicu","Relu","Tiberiu","Eugen","Corneliu","Dorel","Tănase"],hU=["Cristian","Marius","Gabriel","Daniel","Sorin","Claudiu","Ciprian","Laurențiu","Bogdan","Cosmin","Răzvan","Cătălin","George","Alin","Robert","Leonard","Nicușor","Costel","Paul","Remus","Sergiu","Mugurel","Călin","Horia","Codrin","Septimiu","Sever","Silvestru","Teofil","Valer","Benone","Mihai","Alexandru","Ion","Ioan","Adrian","Florin","Silviu","Ovidiu","Liviu"],AU=["Ionuț","Andrei","Alexandru","Bogdan","Răzvan","Adrian","Cătălin","George","Robert","Cristian","Mihai","Gabriel","Paul","Ion","Ioan","Ștefan","Daniel","Marius","Florin","Cosmin","Claudiu","Ciprian","Alin","Silviu","Vlad","Valentin","Iulian","Marian","Lucian","Doru","Horațiu","Gruia","Glad","Decebal","Dacian","Arcadie","Aristide","Apolodor","Cazimir","Filaret"],pU=["Alexandru","Andrei","Vlad","Robert","Ștefan","Ionuț","Cristian","Mihai","Gabriel","Bogdan","Adrian","Cătălin","Darius","Sebastian","Raul","Denis","Cosmin","George","Alin","Marian","Valentin","Emanuel","Rareș","David","Octavian","Mădălin","Răzvan","Eduard","Ion","Ioan","Basarab","Sabin","Marcel","Narcis","Codruț","Bujor","Camil","Cantemir","Carol","Lorin"],yU=["David","Matei","Luca","Andrei","Alexandru","Ștefan","Darius","Rareș","Eduard","Gabriel","Mario","Nicolas","Iustin","Tudor","Cristian","Ion","Ioan","Teodor","Filip","Ianis","Antonio","Denis","Sebastian","Raul","Victor","Ionuț","Robert","Vlad","Yannis","Mihai","Patrick","Albert","Eric","Vladimir","Iancu","Dominic","Matias","Casian","Damian","Ayan"],EU=["Andrei","David","Matei","Alexandru","Ștefan","Tudor","Filip","Luca","Nicolas","Patrick","Ianis","Albert","Eric","Vladimir","Iancu","Ion","Ioan","Dominic","Matias","Casian","Cezar","Damian","Ayan","Marc","Tomas","Lucas","Victor","Sebastian","Edward","Aris","Mateo","Rian","Beniamin","Clement","Achim","Adam","Adelin","Angel","Anton","Antoniu"],bU=["Maria","Elena","Ana","Floarea","Georgeta","Elisabeta","Marioara","Rodica","Silvia","Constanța","Victoria","Ecaterina","Ileana","Stana","Aurica","Sanda","Viorica","Stela","Anica","Paraschiva","Gherghina","Ioana","Anca","Livia","Lucia","Catrina","Eugenia","Verona","Smaranda","Mioara","Domnica","Olga","Parasca","Profira","Safta","Solomia","Zenovia","Aglaia","Catinca","Chira"],IU=["Maria","Elena","Ana","Mihaela","Doina","Mariana","Angela","Gabriela","Daniela","Viorica","Adriana","Steliana","Eugenia","Lucia","Paula","Carmen","Veronica","Tatiana","Luminița","Camelia","Liliana","Cornelia","Felicia","Simona","Mirela","Geta","Lidia","Adina","Violeta","Otilia","Valeria","Sidonia","Marilena","Julieta","Hortensia","Grațiela","Despina","Cezara","Brândușa","Sonia"],vU=["Maria","Elena","Ana","Monica","Alina","Claudia","Nicoleta","Florentina","Cristina","Ramona","Loredana","Corina","Dana","Oana","Roxana","Alis","Magdalena","Raluca","Delia","Manuela","Ionela","Geanina","Iuliana","Andreea","Valentina","Ruxandra","Lavinia","Denisa","Crina","Codruța","Cosmina","Letiția","Minerva","Medeea","Mirabela","Mihaela","Gabriela","Daniela","Simona","Camelia"],NU=["Maria","Elena","Ana","Andreea","Alexandra","Diana","Roxana","Oana","Adina","Bianca","Raluca","Irina","Mădălina","Denisa","Georgiana","Ioana","Ana-Maria","Laura","Cosmina","Simona","Alina","Cristina","Nicoleta","Mihaela","Ramona","Loredana","Mirela","Daniela","Camelia","Florentina","Sabina","Narcisa","Iulia","Catrinel","Daciana","Steluța","Nora","Malvina","Rada","Zoița"],CU=["Maria","Elena","Ana","Alexandra","Denisa","Bianca","Larisa","Sabrina","Rebeca","Roberta","Beatrice","Patricia","Lorena","Mihaela","Gabriela","Paula","Diana","Laura","Iulia","Mădălina","Georgiana","Andra","Roxana","Oana","Raluca","Corina","Alina","Camelia","Cristina","Nicoleta","Ștefania","Karina","Marta","Ofelia","Melania","Isabela","Riana","Dora","Iasmine","Andrada"],wU=["Maria","Elena","Ana","Ioana","Andra","Daria","Teodora","Alessia","Sara","Maya","Antonia","Eva","Miruna","Erika","Iulia","Alexandra","Andreea","Denisa","Bianca","Deea","Amalia","Carina","Sonia","Catinca","Ilinca","Rebeca","Roberta","Ariana","Medeea","Sofia","Noemi","Aida","Nectaria","Ilona","Agata","Amora","Xenia","Malina","Zenaida","Adora"],xU=["Maria","Elena","Ana","Sofia","Anastasia","Eva","Natalia","Emma","Antonia","Ingrid","Raisa","Anais","Ilinca","Medeea","Teodora","Carla","Amalia","Ines","Irina","Ania","Petra","Cezara","Gloria","Iris","Ema","Clara","Zoe","Adeline","Evelina","Damaris","Arina","Mina","Evelin","Luna","Kira","Tessa","Sia","Ina","Thea","Lia","Sora","Roza","Vanda","Mona","Eliza","Hrisanti","Casiana"],SU=class extends Br{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return mU}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:gU},{startYear:1960,endYear:1969,names:fU},{startYear:1970,endYear:1979,names:hU},{startYear:1980,endYear:1989,names:AU},{startYear:1990,endYear:1999,names:pU},{startYear:2e3,endYear:2009,names:yU},{startYear:2010,endYear:2019,names:EU}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:bU},{startYear:1960,endYear:1969,names:IU},{startYear:1970,endYear:1979,names:vU},{startYear:1980,endYear:1989,names:NU},{startYear:1990,endYear:1999,names:CU},{startYear:2e3,endYear:2009,names:wU},{startYear:2010,endYear:2019,names:xU}]}},TU=["Abbas","Abbasali","Abbasreza","Abdolrahman","Abdolreza","Ahmad","Ali","Aliakbar","Alihossein","Alireza","Aliyar","Amin","Amir","Amirreza","Anoushirvan","Arad","Arash","Arashmehr","Ardeshir","Arian","Arman","Armin","Arvand","Arvin","Arya","Aryan","Ashkan","Attar","Avan","Babak","Bahador","Bahman","Bahram","Barad","Behnam","Behzad","Bijan","Darian","Davood","Dena","Ebrahim","Ehsan","Ehsanali","Ehsanollah","Elyas","Esmaeil","Esmat","Ezatollah","Faramarz","Farbod","Farhad","Fariborz","Farrokh","Farzad","Farzin","Fazel","Fereydoun","Gholamreza","Habib","Hadi","Hafez","Hamid","Hassan","Hooman","Hormoz","Hossein","Hosseinreza","Ilia","Iman","Jamshid","Javad","Kambiz","Kamran","Kamyar","Karim","Kaveh","Kazem","Keyghobad","Keyhan","Keyvan","Khashayar","Khosrow","Kia","Kian","Kiyan","Kourosh","Latif","Mahan","Mahmoud","Majid","Manouchehr","Masih","Masoud","Matin","Mehdi","Mehrab","Mehrdad","Mehrshad","Mehrshid","Mehrzad","Milad","Mohammad","Mohammadali","Mohammadreza","Mohsen","Morteza","Mostafa","Nader","Naser","Navab","Navid","Nikan","Nima","Nosrat","Nouri","Omran","Parham","Parviz","Payam","Peyman","Pouya","Pouyan","Qasem","Radin","Rahim","Ramin","Rasoul","Rayan","Reza","Rezaali","Roham","Rohollah","Rostam","Rumi","Saadi","Sadegh","Saeed","Sahand","Sahra","Saleh","Samad","Saman","Samyar","Sattar","Seyed","Shahab","Shahin","Shahram","Shahryar","Shahzad","Shaparak","Shapour","Shayan","Shayanmehr","Shervin","Siavash","Siawash","Sina","Sohrab","Soroush","Taghi","Taha","Vahid","Yaghoub","Yahya","Yasin","Yavar","Yazdan","Younes","Yousef"],kU=["Afsaneh","Afsoon","Afsoun","Afsun","Amineh","Anahita","Arezoo","Arezou","Arezu","Asal","Ashraf","Atefeh","Atousa","Ava","Azadeh","Azar","Azra","Bahar","Baran","Behnaz","Behnoosh","Behnoush","Dana","Darya","Delara","Delshad","Donya","Elaheh","Elham","Esmat","Fahimeh","Farah","Fariba","Farideh","Farnaz","Farzaneh","Fatemeh","Fereshteh","Firoozeh","Firouzeh","Firuzeh","Forough","Ghoncheh","Gohar","Gol","Golbahar","Golnar","Golnaz","Golshah","Golshan","Golzar","Hajar","Hamide","Hamideh","Hanieh","Hayat","Hedieh","Helia","Hoda","Homa","Jahanara","Jaleh","Jamileh","Katayoun","Katayun","Khadijeh","Khorshid","Kimia","Ladan","Laleh","Leila","Leili","Leyla","Leyli","Mahboubeh","Mahin","Mahine","Mahnaz","Mahsa","Mahtab","Mahvash","Maliheh","Manijeh","Mansoureh","Marjan","Maryam","Marzieh","Masoomeh","Masoumeh","Mehr","Mehri","Mehrnaz","Mina","Minoo","Minu","Mitra","Mojdeh","Mojgan","Morvarid","Mozhdeh","Mozhgan","Naheed","Nahid","Najmeh","Narges","Nasrin","Nastaran","Nazanin","Nazli","Neda","Negar","Negin","Nika","Niloofar","Niloufar","Niousha","Niusha","Nooshin","Nousha","Noushin","Paniz","Pantea","Parastoo","Parastu","Pari","Parisa","Parvaneh","Parvin","Pegah","Pouran","Raheleh","Rana","Razieh","Reyhaneh","Robab","Robabeh","Roghayeh","Roshan","Roshanak","Roshanara","Roya","Saba","Sadaf","Safa","Sahar","Sakineh","Samaneh","Samira","Sanaz","Sara","Sedigheh","Sepideh","Setare","Setareh","Shabnam","Shadi","Shahla","Shahnaz","Shahrazad","Shahrbanoo","Shahrzad","Shams","Shereen","Shideh","Shireen","Shirin","Shiva","Shohre","Shohreh","Shokoufeh","Shokufeh","Shukria","Sima","Simin","Soheila","Solmaz","Somayeh","Soodeh","Soraya","Soudeh","Sudabeh","Tahereh","Tahmineh","Taraneh","Tayebeh","Vida","Yalda","Yasaman","Yasamin","Zahra","Zeinab","Zeynab","Zhaleh","Ziba","Zinat","Zohreh"],LU=["Abbasi","Abedi","Abhari","Abtahi","Abadi","Abdollahi","Abedzadeh","Adibi","Afkari","Afsari","Afshar","Ahadi","Ahmadi","Ahmadpour","Ajami","Akbari","Akbarian","Akhavan","Akhtar","Alaei","Alamouti","Alavi","Alinejad","Alizadeh","Almasi","Amini","Aminzadeh","Amiri","Amouzgar","Ansari","Anvari","Arabi","Araki","Arbab","Ardalan","Aref","Armand","Arshi","Asadi","Asgari","Asghari","Asgharzadeh","Ashna","Ashrafi","Ashtari","Askari","Asl","Aslani","Attar","Azad","Azadi","Azar","Azari","Azimi","Azizi","Azmoudeh","Babaei","Badr","Badri","Bagheri","Bagherian","Bahar","Bahmani","Bahrami","Bakhshi","Bakhtiari","Banifaz","Baraghani","Barati","Bastani","Bayani","Bayat","Beheshti","Behnam","Behrouz","Behzadi","Besharat","Bijani","Binesh","Boniadi","Borna","Bostani","Choopan","Dabagh","Darya","Dadashi","Daei","Daneshvar","Darvish","Dehghan","Dehkordi","Dorri","Ebrahimi","Eghbali","Ejlali","Elahi","Emadi","Emami","Entezami","Esfahani","Eshraghi","Eskandari","Esmaili","Estesami","Etemad","Fakhar","Falah","Falahi","Fallah","Fanaei","Far","Farah","Farahani","Faraji","Farhadi","Farhang","Farjami","Farrokh","Farsad","Farshad","Farshid","Farsi","Fatehi","Fayyaz","Fazli","Feiz","Ferdowsi","Fereshteh","Fikri","Firouz","Firouzpour","Foroughi","Foroutan","Ghaderi","Ghaffari","Ghasemi","Ghazizadeh","Ghezavat","Ghobadi","Ghorbani","Golzar","Goodarzi","Gorji","Goya","Habibi","Haghighat","Hajati","Hakami","Hakimi","Halimi","Hamidi","Hariri","Hasani","Hashemi","Hassani","Hassanipour","Hosseini","Hatami","Hedayat","Hejazi","Hekmat","Heydari","Hijazi","Homayoun","Hossein","Imani","Irani","Isfahani","Izadi","Jabari","Jabbari","Jafari","Jahanbani","Jahangiri","Jalali","Jaleh","Jalili","Jam","Jamali","Jamshidi","Janati","Javadi","Jobrani","Kanani","Kar","Karami","Kargar","Karimi","Karimian","Kashani","Kashi","Kaveh","Kayhan","Kazemi","Keramat","Keyhan","Khadem","Khalaf","Khalili","Khamenei","Khani","Khorasani","Khorram","Khorsandi","Kia","Kiani","Kianian","Kiarostami","Kimiaei","Kord","Kordestani","Lotfi","Maadi","Madani","Mahdavi","Mahini","Mahjoub","Mahmoudi","Majd","Majidi","Makhdoom","Makki","Malakian","Maleki","Malekzadeh","Manavi","Mansour","Mansouri","Marashi","Marjani","Marzban","Mashhadi","Matin","Mazhari","Maziar","Mazloom","Mehraban","Mehrabi","Mehrabian","Mehrad","Mehran","Mehrdad","Mehri","Mehrzad","Memar","Meshkat","Milani","Miri","Moghadam","Mohammad","Mohammadi","Moini","Mojarad","Mokhtari","Mokri","Molavi","Moradi","Moridi","Mosheli","Mousavi","Nabavi","Naceri","Nader","Naderi","Nafari","Nafisi","Najafi","Namazi","Namdar","Namvar","Naqdi","Naqshbandi","Naqvi","Nariman","Nasab","Naseri","Naserian","Nasiri","Nasri","Navabi","Navaz","Navid","Nayeri","Nazari","Nazarian","Nazem","Nazeri","Negahban","Nejad","Neshat","Niazi","Nik","Nili","Nori","Norouzi","Nouri","Noury","Nozad","Omidyar","Osanloo","Ostad","Pahlavan","Paknia","Panahi","Parastui","Parsa","Parvin","Parvizi","Pashaei","Pedrad","Pejman","Peyman","Pezeshkzad","Pezeshkian","Piran","Qasemi","Rahimi","Ranjbar","Rashidi","Rezaei","Rostami","Rouhani","Sadeghi","Saeedi","Safavi","Sharifi","Shirazi","Tabatabaei","Tabrizi","Tavakoli","Tehrani","Yazdi","Yousefi","Zamani","Zarei"],RU=class extends Br{getFirstNamesMaleJson(){return TU}getFirstNamesFemaleJson(){return kU}getLastNamesJson(){return LU}},DU=["Gabriel","Raphaël","Léo","Louis","Noah","Arthur","Adam","Jules","Maël","Eden","Léon","Liam","Isaac","Sacha","Marceau","Elio","Noé","Lucas","Gabin","Mohamed","Aaron","Imrân","Ayden","Malo","Paul","Ethan","Hugo","Naël","Ibrahim","Marius","Eliott","Nathan","Victor","Théo","Martin","Tom","Ezio","Gaspard","Mathis","Ismaël","Côme","Léandre","Amir","Augustin","Lyam","Aylan","Nino","Antoine","Milo","Robin"],BU=["Louise","Jade","Ambre","Alba","Emma","Alma","Romy","Rose","Alice","Anna","Mia","Lou","Inaya","Adèle","Lina","Eva","Julia","Iris","Agathe","Elena","Giulia","Léna","Noûr","Jeanne","Olivia","Luna","Victoire","Juliette","Léonie","Zoé","Chloé","Nina","Sofia","Léa","Alya","Charlotte","Romane","Victoria","Inès","Esmée","Ava","Lucie","Lola","Lya","Albane","Emy","Mila","Margot","Lyna","Gabrielle"],UU=["Martin","Bernard","Thomas","Petit","Robert","Richard","Durand","Dubois","Moreau","Laurent","Simon","Michel","Lefebvre","Leroy","Roux","David","Bertrand","Morel","Fournier","Girard","Bonnet","Dupont","Lambert","Fontaine","Rousseau","Vincent","Muller","Lefevre","Faure","Andre","Mercier","Blanc","Guerin","Boyer","Garnier","Chevalier","Francois","Legrand","Gauthier","Garcia","Perrin","Robin","Clement","Morin","Nicolas","Henry","Roussel","Mathieu","Gautier","Masson","Marchand","Duval","Denis","Dumont","Marie","Lemaire","Noel","Meyer","Dufour","Meunier","Brun","Blanchard","Giraud","Joly","Riviere","Lucas","Brunet","Gaillard","Barbier","Arnaud","Martinez","Gerard","Roche","Renard","Schmitt","Roy","Leroux","Colin","Vidal","Caron","Picard","Roger","Fabre","Aubert","Lemoine","Renaud","Dumas","Lacroix","Olivier","Philippe","Bourgeois","Pierre","Benoit","Rey","Leclerc","Payet","Rolland","Leclercq","Guillaume","Lecomte"],MU=class extends Br{getFirstNamesMaleJson(){return DU}getFirstNamesFemaleJson(){return BU}getLastNamesJson(){return UU}},_U=["Adam","Adrian","Albin","Alex","Alexander","Alf","Alfred","Ali","Allan","Alvin","Anders","André","Andreas","Anton","Arne","Aron","Arthur","Arvid","August","Axel","Bengt","Benjamin","Bernt","Bertil","Billy","Birger","Bjarne","Björn","Bo","Börje","Carl","Casper","Christer","Christian","Christoffer","Claes","Conny","Curt","Dan","Daniel","David","Dennis","Dick","Douglas","Eddie","Edvin","Einar","Elias","Elliot","Elton","Emil","Eric","Erik","Erland","Evert","Felix","Filip","Folke","Frank","Fredrik","Gabriel","Gert","Glenn","Gunnar","Gustaf","Gustav","Göran","Gösta","Hampus","Hans","Harald","Harry","Hasse","Helge","Henrik","Herbert","Hjalmar","Holger","Hugo","Håkan","Ingemar","Ingvar","Isak","Ivan","Ivar","Jack","Jacob","Jakob","Jan","Jan-Erik","Jan-Olof","Jens","Jerry","Jesper","Jimmy","Joachim","Joakim","Joel","Johan","Johannes","John","Johnny","Jon","Jonas","Jonathan","Josef","Julian","Jörgen","Kaj","Kalle","Karl","Karl-Erik","Karl-Johan","Kenneth","Kent","Kevin","Kjell","Knut","Krister","Kristian","Kristoffer","Kurt","Lars","Lars-Erik","Lars-Göran","Lars-Olof","Leif","Lennart","Leo","Leon","Liam","Linus","Love","Lucas","Ludvig","Lukas","Magnus","Malte","Manfred","Marcus","Markus","Martin","Mathias","Mats","Matteo","Mattias","Max","Melker","Melvin","Mikael","Milo","Milton","Morgan","Måns","Mårten","Nicklas","Niclas","Niklas","Nils","Noah","Noel","Ola","Oliver","Olle","Olof","Olov","Oscar","Oskar","Ove","Patrik","Paul","Peder","Per","Per-Anders","Per-Arne","Per-Erik","Per-Olof","Peter","Petter","Philip","Pierre","Pontus","Pär","Ralf","Rasmus","Reine","Rickard","Rikard","Robert","Robin","Roger","Roland","Rolf","Ronny","Roy","Ruben","Rune","Samuel","Sebastian","Sigge","Simon","Sixten","Sonny","Staffan","Stefan","Sten","Stig","Sture","Sune","Svante","Sven","Sven-Erik","Sören","Tage","Ted","Teodor","Theo","Theodor","Thomas","Tim","Timmie","Tobias","Tomas","Tommy","Tony","Torbjörn","Tord","Tore","Torsten","Ulf","Uno","Urban","Valter","Verner","Victor","Vidar","Viggo","Viktor","Vilhelm","Vilgot","Vincent","Walter","William","Willy","Åke","Örjan"],FU=["Agnes","Agneta","Alexandra","Alice","Alicia","Alma","Alva","Amanda","Andrea","Anette","Angela","Angelica","Anita","Ann","Ann-Charlott","Ann-Christin","Ann-Kristin","Ann-Louise","Ann-Marie","Ann-Sofie","Anna","Anna-Carin","Anna-Karin","Anna-Lena","Anna-Maria","Anne","Anneli","Annelie","Annika","Astrid","Barbro","Beatrice","Berit","Bettan","Birgit","Birgitta","Bodil","Britt","Britt-Inger","Britt-Marie","Britta","Camilla","Carina","Carita","Carola","Caroline","Catarina","Catrin","Cecilia","Charlotta","Charlotte","Christina","Cornelia","Daniela","Desirée","Doris","Ebba","Edit","Eivor","Elena","Elin","Elina","Elisabet","Elisabeth","Ella","Ellen","Ellinor","Elsa","Elvira","Emelie","Emilia","Emma","Erika","Eva","Eva-Lena","Eva-Marie","Ewa","Fanny","Felicia","Filippa","Freja","Frida","Gabriella","Gerd","Gertrud","Gull-Britt","Gun","Gun-Britt","Gunborg","Gunhild","Gunilla","Gunnel","Hanna","Harriet","Helen","Helena","Helene","Hilma","Ida","Ines","Inga","Inga-Lill","Ingeborg","Ingegärd","Inger","Ingrid","Irene","Iris","Isabell","Isabella","Isabelle","Jeanette","Jennie","Jennifer","Jenny","Jessica","Jill","Joanna","Johanna","Jonna","Josefin","Josephine","Judith","Julia","Kajsa","Karin","Karolina","Katarina","Kerstin","Klara","Kristin","Kristina","Laila","Lena","Lilian","Lilly","Lina","Linda","Linn","Linnea","Linnéa","Lisa","Liselotte","Lisbeth","Liv","Lotta","Louise","Lovisa","Madeleine","Magdalena","Maj","Maj-Britt","Maja","Malin","Margareta","Margit","Margot","Maria","Marianne","Marie","Marie-Louise","Marina","Marita","Marlene","Martina","Matilda","Maud","Melissa","Mikaela","Mimmi","Moa","Molly","Mona","Monica","Märta","Nathalie","Nellie","Nicole","Nicki","Nikki","Nina","Nora","Nova","Olivia","Patricia","Paula","Paulina","Pernilla","Petra","Pia","Rakel","Rebecca","Rebecka","Regina","Renée","Rigmor","Ronja","Rose-Marie","Rosita","Rut","Sabina","Saga","Sandra","Sanna","Sara","Selma","Signe","Sigrid","Siri","Siv","Siw","Sofia","Sofie","Solveig","Sonja","Stella","Stina","Susanne","Svea","Sylvia","Tanja","Terese","Teresia","Therese","Tilde","Tindra","Tina","Tove","Tyra","Ulla","Ulla-Britt","Ulrika","Vanja","Vera","Veronica","Victoria","Viola","Viktoria","Wilma","Yvonne","Åsa","Åse"],OU=["Abrahamsson","Adamsson","Adolfsson","Ahl","Ahlberg","Ahlgren","Ahlqvist","Ahlström","Alexandersson","Alfredsson","Alm","Almgren","Almquist","Almqvist","Andersson","Andreasson","Arvidsson","Asplund","Augustsson","Axelsson","Backman","Bengtsson","Berg","Berggren","Bergh","Berglund","Bergman","Bergqvist","Bergsten","Bergström","Björk","Björklund","Björkman","Blom","Blomberg","Blomgren","Blomqvist","Boberg","Boman","Borg","Boström","Bäckman","Bäckström","Carlsson","Claesson","Dahl","Dahlberg","Dahlgren","Dahlin","Dahlqvist","Dahlström","Danielsson","Davidsson","Edlund","Ek","Ekberg","Ekblad","Eklund","Ekman","Ekström","Eliasson","Elm","Engberg","Englund","Engman","Engström","Eriksson","Erlandsson","Fagerberg","Falk","Fors","Forsberg","Forsgren","Forslund","Forsman","Fransson","Fredriksson","Friberg","Frisk","Grahn","Granberg","Granlund","Gunnarsson","Gustafsson","Göransson","Hagberg","Haglund","Hagman","Hagström","Hall","Hallberg","Hallgren","Hammar","Hammarström","Hansson","Hedin","Hedlund","Hedman","Hellberg","Hellgren","Hellman","Hellqvist","Hellström","Henriksson","Hermansson","Hjort","Holm","Holmberg","Holmgren","Holmqvist","Holmström","Håkansson","Hägg","Hägglund","Högberg","Höglund","Ingvarsson","Isaksson","Israelson","Ivarsson","Jakobsson","Jansson","Jensen","Johannesson","Johansson","Johnsson","Jonas","Jonsson","Jönsson","Karlsson","Karlström","Kjellberg","Knutsson","Kristiansson","Kron","Kullberg","Lager","Landgren","Lantz","Larsson","Leander","Lennartsson","Lilja","Liljeblad","Liljedahl","Liljegren","Lind","Lindberg","Lindblad","Lindblom","Lindell","Lindén","Linder","Lindgren","Lindholm","Lindkvist","Lindman","Lindqvist","Lindstedt","Lindström","Lindvall","Ljung","Ljungberg","Ljunggren","Lund","Lundberg","Lundblad","Lundgren","Lundh","Lundin","Lundmark","Lundqvist","Lundstedt","Lundström","Löfgren","Magnusson","Malm","Malmberg","Malmgren","Malmqvist","Malmström","Martinsson","Mattsson","Melin","Moberg","Molin","Månsson","Mårtensson","Nilsson","Norberg","Nordin","Nordlund","Nordström","Norén","Norlin","Norman","Nyberg","Nygren","Nylander","Nyman","Nyström","Ohlsson","Olofsson","Olsson","Ottosson","Palm","Palmqvist","Paulsson","Persson","Pettersson","Pihl","Pålsson","Rickardsson","Ring","Robertsson","Rosell","Rosén","Rosenberg","Rundqvist","Rydberg","Rydén","Sahlin","Samuelsson","Sandberg","Sandell","Sandin","Sandström","Sjöberg","Sjögren","Sjöholm","Sjölander","Sjölund","Sjöstedt","Sjöström","Skog","Skoglund","Sköld","Stenberg","Stenlund","Stenström","Strand","Strandberg","Ström","Strömberg","Sundberg","Sundell","Sundgren","Sundin","Sundqvist","Sundström","Svanberg","Svedberg","Svensson","Svärd","Söderberg","Södergren","Söderholm","Söderlund","Söderqvist","Söderström","Tholin","Thor","Thulin","Thunberg","Törnblom","Törnqvist","Ullberg","Wahlberg","Wahlgren","Wahlström","Wall","Wallén","Wallgren","Wallin","Wennberg","Wennerberg","Werner","Westberg","Wester","Westerberg","Westerlund","Westin","Westlund","Westman","Wiberg","Wickman","Widén","Wiklund","Wikström","Åberg","Ågren","Åkerberg","Åkerlund","Åkerman","Åkerström","Ålund","Åsberg","Åström","Öberg","Ögren","Öhlin","Öhman","Östberg","Östlund","Östman"],jU=class extends Br{getFirstNamesMaleJson(){return _U}getFirstNamesFemaleJson(){return FU}getLastNamesJson(){return OU}},PU=["Aabid","Aadil","Aaftab","Aahad","Aalam","Aamir","Aarif","Aariz","Aasim","Aatif","Abaan","Abbas","Abdul","Abdul Ahad","Abdul Aziz","Abdul Basit","Abdul Ghafoor","Abdul Hameed","Abdul Hannan","Abdul Jabbar","Abdul Kareem","Abdul Latif","Abdul Malik","Abdul Mannan","Abdul Qadir","Abdul Rahim","Abdul Rashid","Abdul Rauf","Abdul Rehman","Abdul Sattar","Abdul Wahab","Abdullah","Abid","Abrar","Absaar","Adil","Adnan","Afaq","Afzal","Agha","Ahad","Ahmad","Ahmar","Ahsen","Ahsan","Aijaz","Akbar","Akhtar","Akif","Alauddin","Alam","Ali","Altaf","Amaan","Ameen","Amir","Ammar","Anas","Anis","Anwar","Aqeel","Arif","Arman","Arqam","Arsalan","Asad","Ashar","Ashfaq","Ashraf","Asif","Asim","Ata","Athar","Ateeq","Atif","Aun","Aurangzeb","Awais","Ayaz","Azam","Azhar","Aziz","Babar","Babur","Badar","Badr","Badruddin","Bahadur","Bahram","Bakhtiar","Baligh","Baqir","Bari","Bashar","Bashir","Basheer","Basit","Bayazid","Bihzad","Bilal","Binyamin","Bismil","Burhan","Burhanuddin","Cemal","Chaman","Chand","Changez","Chaudhry","Chiragh","Daamir","Daanish","Dabir","Daniyal","Danyal","Dar","Dara","Danish","Daud","Dawood","Deen","Dilawar","Dildar","Dost","Faakhir","Faaris","Faazil","Fahad","Fahim","Faizan","Fakhar","Fakhruddin","Falah","Faran","Faraz","Fareed","Farhad","Faris","Farooq","Farrukh","Faryad","Fateh","Fayyaz","Feroz","Fida","Firdous","Firoz","Furqan","Jabbar","Jabir","Jafar","Jahan","Jahangir","Jahanzaib","Jahanzeb","Jalal","Jalaluddin","Jalib","Jamal","Jameel","Jamshaid","Jamshed","Javed","Jawad","Jibran","Junaid","Kabeer","Kabir","Kaleem","Kamal","Kamil","Kashif","Kazim","Khaleel","Khalid","Khalil","Khan","Khizr","Khurshid","Khurram","Kifayat","Kiran","Kisra","Kumail","Labeeb","Laeeq","Laith","Lais","Latif","Liaqat","Lutf","Lutfi","Lutfullah","Luqman","Maaz","Mahboob","Mahdi","Mahmood","Majid","Malik","Mansoor","Maqbool","Masood","Mehmood","Mehdi","Mehrab","Mian","Mir","Mirza","Mohammad","Mohib","Mohsin","Mohtashim","Moiz","Mubarak","Mubashir","Mudassir","Mufeed","Mujahid","Mukarram","Mukhtar","Mumtaz","Munawar","Munir","Murad","Mustafa","Muzaffar","Nadeem","Nadir","Naeem","Naim","Najam","Najib","Najeeb","Naseem","Nashit","Nasir","Natiq","Nawab","Naveed","Nazim","Nihal","Noor","Nouman","Obaid","Omair","Omar","Osama","Owais","Parsa","Parvez","Pervez","Pervaiz","Qadir","Qaiser","Qasim","Qazi","Qudrat","Qudratullah","Qurban","Qutbuddin","Rabbani","Rafi","Rafique","Rahim","Rahman","Rais","Rajab","Rameez","Rashid","Rauf","Rehan","Riaz","Rizwan","Rohail","Rumi","Sabit","Sadiq","Saeed","Safdar","Safi","Sahir","Salam","Salman","Sameer","Sami","Sarmad","Sarwar","Shabbir","Shafaq","Shahid","Shaheen","Shahbaz","Shahzaib","Shahnawaz","Shahryar","Shams","Sharif","Shaukat","Shehryar","Shoaib","Sibtain","Sikandar","Siraj","Sohail","Suhail","Suleman","Tabish","Tahir","Taj","Talat","Talha","Tameem","Tanveer","Tariq","Tasawwar","Taufiq","Tauqeer","Tayyab","Tufail","Turab","Ubaid","Ubaidullah","Ubayd","Ulfat","Umar","Umair","Usama","Usman","Uwais","Vali","Vasif","Waheed","Wahid","Wajahat","Wajid","Waleed","Wali","Wasif","Waqas","Yaqub","Yahya","Yameen","Yasir","Yaseen","Yousaf","Yousuf","Yunus","Zafar","Zahid","Zahir","Zain","Zakir","Zaman","Zeeshan","Zia","Zubair","Zulfiqar"],HU=["Aabida","Aafiya","Aaliya","Aamina","Aamira","Aaniya","Aarifa","Aasia","Aasiya","Abeer","Abeera","Adeelah","Adeena","Adila","Afifa","Afiya","Afsana","Aiman","Aina","Ainy","Aisha","Aiza","Ajwa","Akira","Aleena","Alia","Alina","Alishba","Almas","Amal","Amani","Ameena","Amira","Anabia","Anam","Anaya","Aneeqa","Anisa","Anum","Aqsa","Arfa","Arisha","Arooba","Arsala","Asfiya","Asma","Atika","Ayesha","Azka","Baano","Bahar","Bahira","Bakhtawar","Balqees","Bano","Bareera","Basma","Batool","Beena","Behjat","Benazir","Bibi","Bisma","Bushra","Cahira","Chahat","Chaman","Chanda","Chandni","Chand","Chinar","Dabira","Dalia","Dania","Dareen","Darina","Deeba","Dilara","Dilawar","Dilnasheen","Dina","Durdanah","Durre","Durriya","Eeman","Eesha","Efa","Ehraam","Eila","Eiliya","Eiman","Eira","Emaan","Eman","Eram","Erisha","Erum","Eshaal","Eshal","Eshita","Faariha","Fabiha","Fahima","Faiza","Fakhira","Falaq","Fareeha","Fariha","Farisa","Fariya","Farzana","Faryal","Fasiha","Fatemah","Fatima","Fawzia","Fehmida","Feroza","Fiza","Gehna","Ghazal","Ghazala","Gohar","Gul","Gulab","Gulalai","Gulbahar","Gulbano","Gulchehra","Gulchin","Gulnar","Gulnaz","Gulraiz","Gulshan","Gulsaba","Gulzar","Habeeba","Habiba","Hadia","Hafsa","Haleema","Hamda","Hameeda","Hania","Hareem","Haseena","Hasna","Haya","Hiba","Hifza","Hina","Hira","Hoor","Huda","Huma","Ibadah","Iffat","Ifra","Ijlal","Ikra","Ila","Ilma","Iman","Inaya","Iqra","Irha","Irum","Isra","Izza","Jabeen","Jahan","Jahanara","Jalila","Jamila","Jannat","Jasmin","Javeria","Jiya","Joya","Juleeha","Kaif","Kainat","Kalsoom","Kanza","Kashaf","Kashifa","Kausar","Khadija","Khalida","Khanam","Khansa","Khawla","Khizra","Kinza","Kiran","Komal","Kubra","Kulsoom","Labeeba","Ladan","Laila","Laiba","Laraib","Latifa","Lina","Liyana","Lubna","Lujaina","Luma","Luqia","Maham","Maheen","Mahira","Mahjabeen","Mahnoor","Mahveen","Malaika","Manahil","Marwa","Maryam","Mehak","Meher","Mehreen","Mehvish","Mishal","Momina","Muneeza","Munira","Naaila","Nabeela","Nadia","Naeema","Naila","Nashita","Nashmia","Natasha","Nazia","Neema","Nighat","Nihal","Nida","Nimra","Nooreen","Nosheen","Omaima","Omera","Ommarah","Omnia","Oraina","Owaiza","Parisa","Parveen","Parvin","Pervaiz","Parween","Parizay","Pehlaaj","Perveen","Pinar","Qamar","Qandeel","Qanita","Qasia","Qirat","Qudsia","Qurratulain","Quratulain","Rabia","Rafia","Rahat","Raima","Rakhshanda","Ramsha","Rania","Rashida","Reema","Rida","Rimsha","Rizwana","Rubab","Rubina","Rukhsana","Saba","Sabeena","Sabreen","Sadia","Safiya","Sahar","Sajida","Sakina","Saliha","Samaira","Sameena","Sanober","Saniya","Saraab","Savera","Sehar","Shabana","Shagufta","Shaheena","Shaista","Shanza","Sharmeen","Shazma","Shehla","Shehnaz","Sidra","Sobia","Sumbal","Sumaira","Sundas","Tabassum","Tahira","Tahseen","Tajwar","Tamanna","Tania","Tasneem","Tayyaba","Tazeen","Tehmina","Tehreem","Tooba","Tuba","Ulfat","Ulya","Umara","Ummara","Ummehabiba","Ummehani","Ummehuma","Ummejaveria","Urooj","Uzma","Vaneeza","Veena","Vibha","Wajiha","Waheeda","Wahida","Waniya","Warda","Wardah","Waseela","Waseema","Widad","Yamna","Yara","Yasira","Yasmeen","Yasmin","Yumna","Zahida","Zahra","Zaiba","Zainab","Zakia","Zamurrad","Zara","Zareena","Zarmeen","Zaynab","Zeba","Zehra","Zohra","Zoya","Zubia","Zulekha","Zunaira"],zU=["Abbasi","Abbas","Abidi","Afridi","Agha","Ahmad","Ahmed","Akbar","Akhtar","Ali","Alvi","Amrohi","Ansari","Anwar","Arain","Ashraf","Asghar","Attari","Awan","Azam","Babar","Badayuni","Bajwa","Bakhtiar","Baloch","Bangash","Barlas","Bashir","Batool","Beg","Behzad","Bengali","Bukhari","Bundi","Butt","Chandio","Chaudhary","Chauhan","Chishti","Chughtai","Chundrigar","Dahri","Dakhani","Dalvi","Dard","Dars","Daud","Dehlavi","Dhariwal","Durrani","Edhi","Ehsan","Ejaz","Elahi","Ebrahim","Farooqi","Faruqi","Fateh","Faizi","Fakhri","Firdausi","Gardezi","Gilani","Ghaznavi","Ghauri","Gondal","Habib","Haider","Hakeem","Hamdani","Hashmi","Hassan","Hussain","Hyder","Ibrahim","Idrisi","Iftikhar","Ilahi","Imami","Isfahani","Jafri","Jahangir","Jalali","Jalal","Jamali","Jatoi","Jilani","Junaidi","Kakakhel","Kamal","Kashif","Kazmi","Khan","Khurshid","Kirmani","Kiyani","Lahori","Lakhnavi","Lari","Leghari","Lughari","Madani","Mahmood","Malik","Mansoor","Marvi","Mashhadi","Masoodi","Mir","Mirza","Mughal","Mufti","Nadvi","Naqvi","Nasir","Niazi","Nizami","Noori","Noorani","Osmani","Panhwar","Paracha","Parvez","Pirzada","Qadri","Qasmi","Qureshi","Rabbani","Rafique","Rahman","Rashid","Rizvi","Sabri","Sadiqi","Saeed","Safi","Safvi","Samarqandi","Siddiqui","Syed","Tabrizi","Tajik","Tariq","Thanvi","Tirmizi","Usmani","Yousafzai","Yunus","Zaidi","Zubairi"],QU=class extends Br{getFirstNamesMaleJson(){return PU}getFirstNamesFemaleJson(){return HU}getLastNamesJson(){return zU}},VU=class{static normalizeBirthDate(n){if(!n||n.trim()===""||n.startsWith("0001-01-01"))return"";const e=n.trim(),a=e.match(/^(\d{4})-(\d{2})-(\d{2})/);if(a){const[,s,c,d]=a;return`${s}-${c}-${d}`}const i=new Date(e);if(!isNaN(i.getTime())){const s=i.getFullYear().toString().padStart(4,"0"),c=(i.getMonth()+1).toString().padStart(2,"0"),d=i.getDate().toString().padStart(2,"0");return`${s}-${c}-${d}`}return""}static isValidBirthDate(n){if(!n||n.trim()===""||n.startsWith("0001-01-01"))return!1;const e=new Date(n);return isNaN(e.getTime())?!1:e.getFullYear()>1&&e.getFullYear()<9999}};function GU(){return[{value:"random",label:"Random"},{value:"21-25",label:"21-25"},{value:"26-30",label:"26-30"},{value:"31-35",label:"31-35"},{value:"36-40",label:"36-40"},{value:"41-45",label:"41-45"},{value:"46-50",label:"46-50"},{value:"51-55",label:"51-55"},{value:"56-60",label:"56-60"},{value:"61-65",label:"61-65"}]}function KU(n){if(n==="random"||!n)return null;const e=n.split("-");if(e.length!==2)return null;const a=parseInt(e[0],10),i=parseInt(e[1],10);if(isNaN(a)||isNaN(i))return null;const s=new Date().getFullYear(),c=Math.floor((a+i)/2),d=s-c,m=Math.floor((i-a)/2);return{targetYear:d,yearDeviation:m}}function qU(){return[{value:"de",label:"Deutsch",flag:"🇩🇪",alternativeCodes:["de-DE","de-AT","de-CH","de-LU","de-LI"]},{value:"en",label:"English",flag:"🇬🇧",alternativeCodes:["en-US","en-GB","en-CA","en-AU","en-NZ","en-IE","en-ZA","en-SG","en-IN"]},{value:"es",label:"Español",flag:"🇪🇸",alternativeCodes:["es-ES","es-MX","es-AR","es-CO","es-CL","es-PE","es-VE","es-EC","es-GT","es-CU","es-BO","es-DO","es-HN","es-PY","es-SV","es-NI","es-CR","es-PA","es-UY","es-PR"]},{value:"fr",label:"Français",flag:"🇫🇷",alternativeCodes:["fr-FR","fr-CA","fr-BE","fr-CH","fr-LU","fr-MC"]},{value:"it",label:"Italiano",flag:"🇮🇹",alternativeCodes:["it-IT","it-CH","it-SM","it-VA"]},{value:"nl",label:"Nederlands",flag:"🇳🇱",alternativeCodes:["nl-NL","nl-BE"]},{value:"ro",label:"Română",flag:"🇷🇴",alternativeCodes:["ro-RO","ro-MD"]},{value:"sv",label:"Svenska",flag:"🇸🇪",alternativeCodes:["sv-SE","sv-FI"]},{value:"ur",label:"اردو",flag:"🇵🇰",alternativeCodes:["ur-PK","ur-IN"]},{value:"fa",label:"فارسی",flag:"🇮🇷",alternativeCodes:["fa-IR","fa-AF"]}].sort((e,a)=>e.label.localeCompare(a.label))}var WU=n=>{switch(n.toLowerCase()){case"en":return new OE;case"nl":return new SB;case"de":return new GB;case"it":return new oU;case"es":return new dU;case"ro":return new SU;case"fa":return new RU;case"fr":return new MU;case"sv":return new jU;case"ur":return new QU;default:return console.warn(`Language '${n}' is not supported. Falling back to English.`),new OE}};const YU=()=>{const n=Kt(),[e,a]=I.useState({username:null,password:null,email:null}),i=I.useCallback(async()=>{if(!(n!=null&&n.sqliteClient))throw new Error("Database not initialized");const d=n.sqliteClient.settings.getEffectiveIdentityLanguage(),m=WU(d),f=n.sqliteClient.settings.getPasswordSettings(),g=Bh(f);return{identityGenerator:m,passwordGenerator:g}},[n==null?void 0:n.sqliteClient]),s=I.useCallback(async()=>{if(!(n!=null&&n.sqliteClient))return null;try{const{identityGenerator:d,passwordGenerator:m}=await i(),f=n.sqliteClient.settings.getDefaultIdentityGender(),g=n.sqliteClient.settings.getDefaultIdentityAgeRange(),E=KU(g),p=d.generateRandomIdentity(f,E),C=m.generateRandomPassword(),N=n.sqliteClient.settings.getDefaultEmailDomain(),x=N?`${p.emailPrefix}@${N}`:p.emailPrefix,S={email:x,firstName:p.firstName,lastName:p.lastName,gender:p.gender,birthdate:VU.normalizeBirthDate(p.birthDate.toISOString()),username:p.nickName,password:C};return a({username:p.nickName,password:C,email:x}),S}catch(d){return console.error("Error generating random alias:",d),null}},[n==null?void 0:n.sqliteClient,i]),c=I.useCallback(()=>new jh().generateRandomEmailPrefix(),[]);return{generateAlias:s,generateRandomEmailPrefix:c,lastGeneratedValues:e,setLastGeneratedValues:a}},JU=({formId:n,isLoading:e,formData:a,onRestore:i,skipRestore:s=!1})=>{const c=I.useRef(!1),d=I.useCallback(async()=>{if(e)return;await Bt("PERSIST_FORM_VALUES",JSON.stringify({formId:n,data:a}),"background")},[n,a,e]),m=I.useCallback(async()=>{if(s||c.current)return!1;const g=await Bt("GET_PERSISTED_FORM_VALUES",null,"background");try{if(!g)return!1;let E=null;try{E=JSON.parse(g)}catch(C){return console.error("Error parsing persisted form data:",C),!1}return E.formId===n?(c.current=!0,i(E.data),!0):!1}catch(E){return console.error("Error loading persisted form data:",E),!1}},[n,i,s]),f=I.useCallback(async()=>{await Bt("CLEAR_PERSISTED_FORM_VALUES",null,"background")},[]);return I.useEffect(()=>{e||d()},[e,d]),I.useEffect(()=>()=>{f()},[f]),{loadPersistedValues:m,clearPersistedValues:f,persistFormValues:d}},$n={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:["-day","birthdate_d","birthdayday","_day","day"],birthDateMonth:["-month","birthdate_m","birthdaymonth","_month","month"],birthDateYear:["-year","birthdate_y","birthdayyear","_year","year"]},Lf={male:["male","man","m","gender1","mr","mr."],female:["female","woman","f","gender2","mrs","mrs.","ms","ms."],other:["other","diverse","custom","prefer not","unknown","gender3"]},XU=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"]),Zn={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"]},Rf={male:["man","mannelijk","heer"],female:["vrouw","vrouwelijk","mevrouw"],other:["anders","iets","overig","onbekend"]},$U=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"]),va={username:[...new Set([...$n.username,...Zn.username])],fullName:[...new Set([...$n.fullName,...Zn.fullName])],firstName:[...new Set([...$n.firstName,...Zn.firstName])],lastName:[...new Set([...$n.lastName,...Zn.lastName])],email:[...new Set([...Zn.email,...$n.email])],emailConfirm:[...new Set([...$n.emailConfirm,...Zn.emailConfirm])],password:[...new Set([...$n.password,...Zn.password])],birthdate:[...new Set([...$n.birthdate,...Zn.birthdate])],gender:[...new Set([...$n.gender,...Zn.gender])],birthDateDay:[...new Set([...$n.birthDateDay,...Zn.birthDateDay])],birthDateMonth:[...new Set([...$n.birthDateMonth,...Zn.birthDateMonth])],birthDateYear:[...new Set([...$n.birthDateYear,...Zn.birthDateYear])]},Ul={male:[...new Set([...Lf.male,...Rf.male])],female:[...new Set([...Lf.female,...Rf.female])],other:[...new Set([...Lf.other,...Rf.other])]},jE=new Set([...XU,...$U]);class PE{constructor(e,a){qe(this,"document");qe(this,"clickedElement");qe(this,"visibilityCache");this.document=e,this.clickedElement=a??null,this.visibilityCache=new Map}containsLoginForm(){let e=this.getFormWrapper();return(e==null?void 0:e.getAttribute("role"))==="dialog"&&(e=e.querySelector("form")??e),e||(e=this.document.body),e.querySelectorAll("input").length>200?!1:!!(this.containsPasswordField(e)||this.containsLikelyUsernameOrEmailField(e))}getForm(){if(!this.clickedElement)return null;const e=this.getFormWrapper();return this.detectFormFields(e)}static getSuggestedServiceName(e,a){const i=e.title,s=4,c=50,d=x=>{const S=x.length>=3&&x.length<=c,T=x.split(/[\s|\-—/\\]+/).length<=s;return S&&T},m=x=>{const S=x.toLowerCase().split(" ").map(U=>U.toLowerCase());let T=0;for(;T<S.length&&jE.has(S[T].toLowerCase());)T++;let k=S.length-1;for(;k>T&&jE.has(S[k].toLowerCase());)k--;return S.slice(T,k+1)},f=(x,S)=>x.split(/[\s|]+/).filter(T=>S.includes(T.toLowerCase())).join(" "),g=a.hostname.replace(/^www\./,""),p=/[|\-—/\\:]/.exec(i);if(p){const x=p.index,S=i.substring(0,x).trim(),T=i.substring(x+1).trim(),k=m(S),U=m(T),R=f(S,k),P=f(T,U),M=d(R),j=d(P);if(M&&j)return[R,P,g];if(M)return[R,g];if(j)return[P,g]}const C=m(i),N=f(i,C);return d(N)?[N,g]:[g]}getFormWrapper(){var e;return(e=this.clickedElement)==null?void 0:e.closest('form, [role="dialog"]')}getActualInputElement(e){if(e.tagName.toLowerCase()==="input")return e;const a=e;if(a.shadowRoot){const s=a.shadowRoot.querySelector("input, textarea");if(s)return s}const i=e.querySelector("input, textarea");return i||e}isElementVisible(e){var i;if(!e)return!1;if(this.visibilityCache.has(e))return this.visibilityCache.get(e);let a=e;for(;a;){try{const s=(i=this.document.defaultView)==null?void 0:i.getComputedStyle(a);if(!s){let c=a;for(;c;)this.visibilityCache.set(c,!0),c=c.parentElement;return!0}if(s.display==="none"){let c=a;for(;c;)this.visibilityCache.set(c,!1),c=c.parentElement;return!1}if(s.visibility==="hidden"){let c=a;for(;c;)this.visibilityCache.set(c,!1),c=c.parentElement;return!1}if(parseFloat(s.opacity)===0){let c=a;for(;c;)this.visibilityCache.set(c,!1),c=c.parentElement;return!1}}catch{let s=a;for(;s;)this.visibilityCache.set(s,!0),s=s.parentElement;return!0}a=a.parentElement}return this.visibilityCache.set(e,!0),!0}findAllInputFields(e,a,i,s=[]){var p,C,N,x,S,T,k,U,R,P,M;const c=e?Array.from(e.querySelectorAll("input, select, [type]")):Array.from(this.document.querySelectorAll("input, select, [type]")),m=(e?Array.from(e.querySelectorAll("*")):Array.from(this.document.querySelectorAll("*"))).filter(j=>{const Q=j;return Q.shadowRoot?Q.shadowRoot.querySelector("input, textarea")!==null:!1}),g=[...c,...m].filter((j,Q,H)=>H.indexOf(j)===Q),E=[];for(const j of Array.from(g)){if(s.includes(j)||!this.isElementVisible(j))continue;let H=j.tagName.toLowerCase()==="select"?"select":((p=j.type)==null?void 0:p.toLowerCase())||((C=j.getAttribute("type"))==null?void 0:C.toLowerCase())||"";const V=j,G=V.shadowRoot&&V.shadowRoot.querySelector("input, textarea");if(G&&!H){const _=V.shadowRoot.querySelector("input, textarea");_&&(H=((N=_.type)==null?void 0:N.toLowerCase())||"text")}if(!i.includes(H)&&!(G&&i.includes("text")&&!H))continue;if(i.includes("email")&&H==="email"){E.push({input:j,score:-1});continue}const K=((x=j.getAttribute("data-av-autocomplete")??j.getAttribute("autocomplete"))==null?void 0:x.toLowerCase())??"";if(K){if(a===va.username&&K==="username"){E.push({input:j,score:-2});continue}if(a===va.email&&K==="email"){E.push({input:j,score:-2});continue}if(a===va.password&&(K==="current-password"||K==="new-password")){E.push({input:j,score:-2});continue}}const $=((S=j.getAttribute("aria-describedby"))==null?void 0:S.toLowerCase())??"";if($&&a===va.username&&$.includes("username")){E.push({input:j,score:-2});continue}const J=[j.id,j.getAttribute("name"),j.getAttribute("placeholder"),K].map(_=>(_==null?void 0:_.toLowerCase())??"");if(j.id||j.getAttribute("name")){const _=this.document.querySelector(`label[for="${j.id||j.getAttribute("name")}"]`);_&&J.push(((T=_.textContent)==null?void 0:T.toLowerCase())??"")}const re=j.getAttribute("aria-describedby");if(re){const _=re.split(/\s+/);for(const q of _){const ee=this.document.getElementById(q);ee&&J.push(((k=ee.textContent)==null?void 0:k.toLowerCase())??"")}}const Ae=j.getAttribute("aria-label");Ae&&J.push(Ae.toLowerCase());let X=j;for(let _=0;_<3&&X;_++){const q=X.querySelectorAll('[slot="label"], [slot="helper-text"]');for(const ee of Array.from(q)){const ne=((U=ee.textContent)==null?void 0:U.toLowerCase())??"";ne&&J.push(ne)}if(X.shadowRoot){const ee=X.shadowRoot.querySelectorAll('slot[name="label"], slot[name="helper-text"]');for(const ne of Array.from(ee)){const Ie=ne.assignedNodes();for(const we of Ie)we.textContent&&J.push(we.textContent.toLowerCase())}}X=X.parentElement}const ie=j.parentElement;if(ie)for(const _ of Array.from(ie.children))_!==j&&Array.from(_.classList).some(q=>q.toLowerCase().includes("label"))&&J.push(((R=_.textContent)==null?void 0:R.toLowerCase())??"");let ce=j;for(let _=0;_<5&&ce&&!(ce.children.length>15);_++){const q=ce.querySelector("label");if(q){J.push(((P=q.textContent)==null?void 0:P.toLowerCase())??"");break}const ee=ce.closest("td");if(ee){const ne=ee.closest("tr");if(ne){for(const Ie of Array.from(ne.querySelectorAll("td")))if(Ie!==ee){J.push(((M=Ie.textContent)==null?void 0:M.toLowerCase())??"");break}}break}ce=ce.parentElement}let ye=a.length;for(let _=0;_<a.length;_++)if(J.some(q=>q.includes(a[_]))){ye=_;break}ye<a.length&&E.push({input:j,score:ye})}return E.sort((j,Q)=>j.score-Q.score).map(j=>j.input)}findInputField(e,a,i,s=[]){const c=this.findAllInputFields(e,a,i,s),d=this.filterOutNestedDuplicates(c,s);if(i.includes("email")){const m=d.find(f=>(f.type||"").toLowerCase()==="email");if(m)return m}return d.length>0?d[0]:null}findEmailField(e){const a=this.findAllInputFields(e,va.email,["text","email"]),s=this.filterOutNestedDuplicates(a)[0]??null,c=s?this.findAllInputFields(e,va.emailConfirm,["text","email"],[s]):[],m=this.filterOutNestedDuplicates(c)[0]??null;return{primary:s,confirm:m}}findBirthdateFields(e,a=[]){const i=this.findInputField(e,va.birthdate,["date","text"],a);let s="yyyy-mm-dd";if(e&&i){const f=i.closest("div");if(f){const E=[...Array.from(f.getElementsByTagName("label")),...Array.from(f.getElementsByTagName("span")),f].map(p=>{var C;return((C=p.textContent)==null?void 0:C.toLowerCase())??""}).join(" ").replace(/[\s\u00A0]/g,"").toLowerCase();if(/dd[-/]mm[-/]jj/i.test(E)||/dd[-/]mm[-/]yyyy/i.test(E)?s=E.includes("/")?"dd/mm/yyyy":"dd-mm-yyyy":/mm[-/]dd[-/]yyyy/i.test(E)?s=E.includes("/")?"mm/dd/yyyy":"mm-dd-yyyy":/yyyy[-/]mm[-/]dd/i.test(E)&&(s=E.includes("/")?"yyyy/mm/dd":"yyyy-mm-dd"),s==="yyyy-mm-dd"&&i.placeholder){const p=i.placeholder.toLowerCase();/dd[-/]mm/i.test(p)?s=p.includes("/")?"dd/mm/yyyy":"dd-mm-yyyy":/mm[-/]dd/i.test(p)&&(s=p.includes("/")?"mm/dd/yyyy":"mm-dd-yyyy")}}}if(i)return{single:i,format:s,day:null,month:null,year:null};const c=this.findInputField(e,va.birthDateDay,["text","number","select"],a),d=this.findInputField(e,va.birthDateMonth,["text","number","select"],a),m=this.findInputField(e,va.birthDateYear,["text","number","select"],a);return{single:null,format:"yyyy-mm-dd",day:c,month:d,year:m}}findGenderField(e,a=[]){const i=this.findInputField(e,va.gender,["select"],a);if((i==null?void 0:i.tagName.toLowerCase())==="select")return{type:"select",field:i};const s=e?e.querySelectorAll('input[type="radio"][name*="gender"], input[type="radio"][name*="sex"]'):null;if(s&&s.length>0){const d=(m,f=!1)=>Array.from(s).find(g=>{var p,C;const E=[g.value,g.id,g.name,((C=(p=g.labels)==null?void 0:p[0])==null?void 0:C.textContent)??""].map(N=>(N==null?void 0:N.toLowerCase())??"");return f&&(Ul.male.some(N=>E.some(x=>x.includes(N)))||Ul.female.some(N=>E.some(x=>x.includes(N))))?!1:m.some(N=>E.some(x=>x.includes(N)))})??null;return{type:"radio",field:null,radioButtons:{male:d(Ul.male),female:d(Ul.female),other:d(Ul.other)}}}return{type:"text",field:this.findInputField(e,va.gender,["text"],a)}}filterOutNestedDuplicates(e,a=[]){if(e.length===0)return e;const i=[];for(const s of e){let c=!0;for(const d of a){if(s===d){c=!1;break}if(d.contains(s)){c=!1;break}if(s.contains(d)){c=!1;break}const m=s,f=d;if(f.shadowRoot&&f.shadowRoot.contains(s)){c=!1;break}if(m.shadowRoot&&m.shadowRoot.contains(d)){c=!1;break}const g=this.getActualInputElement(s),E=this.getActualInputElement(d);if(g===E){c=!1;break}}if(c){for(const d of e)if(s!==d){if(s.contains(d)){c=!1;break}const m=s;if(m.shadowRoot&&m.shadowRoot.contains(d)){c=!1;break}}if(c){const d=this.getActualInputElement(s);if(d!==s&&e.includes(d))continue;i.push(s)}}}return i}findPasswordField(e){const a=this.findAllInputFields(e,va.password,["password"]),i=this.filterOutNestedDuplicates(a);return{primary:i[0]??null,confirm:i[1]??null}}containsPasswordField(e){const a=this.findPasswordField(e);return!!(a.primary&&this.isElementVisible(a.primary))}containsLikelyUsernameOrEmailField(e){const a=this.findEmailField(e);if(a.primary&&this.isElementVisible(a.primary))return!0;const i=this.findInputField(e,va.username,["text"],[]);if(i&&this.isElementVisible(i))return!0;const s=this.findInputField(e,va.firstName,["text"],[]);if(s&&this.isElementVisible(s))return!0;const c=this.findInputField(e,va.lastName,["text"],[]);return!!(c&&this.isElementVisible(c))}isAutofillTriggerableField(){return this.getDetectedFieldType()!==null}getDetectedFieldType(){if(!this.clickedElement)return null;const e=this.clickedElement.getAttribute("data-av-field-type");if(e)return e;const a=this.getActualInputElement(this.clickedElement);if(a!==this.clickedElement){const f=a.getAttribute("data-av-field-type");if(f)return f}const i=this.getFormWrapper(),s=[this.clickedElement,a].filter((f,g,E)=>f&&E.indexOf(f)===g);if(this.findAllInputFields(i,va.username,["text"]).some(f=>s.includes(f)))return"username";const d=this.findPasswordField(i);return d.primary&&s.includes(d.primary)||d.confirm&&s.includes(d.confirm)?"password":this.findAllInputFields(i,va.email,["text","email"]).some(f=>s.includes(f))?"email":null}detectFormFields(e){const a=[],i=this.findEmailField(e);i.primary&&a.push(i.primary),i.confirm&&a.push(i.confirm);const s=this.findPasswordField(e);s.primary&&a.push(s.primary),s.confirm&&a.push(s.confirm);const c=this.findInputField(e,va.username,["text"],a);c&&a.push(c);const d=this.findInputField(e,va.fullName,["text"],a);d&&a.push(d);const m=this.findInputField(e,va.lastName,["text"],a);m&&a.push(m);const f=this.findInputField(e,va.firstName,["text"],a);f&&a.push(f);const g=this.findBirthdateFields(e,a);g.single&&a.push(g.single),g.day&&a.push(g.day),g.month&&a.push(g.month),g.year&&a.push(g.year);const E=this.findGenderField(e,a);return E.field&&a.push(E.field),{form:e,emailField:i.primary,emailConfirmField:i.confirm,usernameField:c,passwordField:s.primary,passwordConfirmField:s.confirm,fullNameField:d,firstNameField:f,lastNameField:m,birthdateField:g,genderField:E}}}class HE{static getServiceInfo(e,a){const i=PE.getSuggestedServiceName(e,a),s=a.href;let c="";try{const d=new URL(s);(d.protocol==="http:"||d.protocol==="https:")&&(c=d.origin+d.pathname,c.endsWith("/")&&(c=c.slice(0,-1)))}catch(d){console.error("Error parsing current URL:",d)}return{suggestedNames:i,currentUrl:s,serviceUrl:c,domain:a.hostname.replace(/^www\./,"")}}static getServiceInfoFromTab(e,a){try{const i=new URL(e),s={href:e,hostname:i.hostname,protocol:i.protocol,pathname:i.pathname,origin:i.origin},c={title:a||i.hostname},d=PE.getSuggestedServiceName(c,s);let m="";return(i.protocol==="http:"||i.protocol==="https:")&&(m=i.origin+i.pathname,m.endsWith("/")&&(m=m.slice(0,-1))),{suggestedNames:d,currentUrl:e,serviceUrl:m,domain:i.hostname.replace(/^www\./,"")}}catch(i){console.error("Error parsing tab URL:",i);const s=e.replace(/^https?:\/\/(www\.)?/,"").split("/")[0];return{suggestedNames:[s],currentUrl:e,serviceUrl:e,domain:s}}}static getEncodedServiceInfo(e,a){const i=this.getServiceInfo(e,a);return{serviceName:i.suggestedNames.length>0?encodeURIComponent(i.suggestedNames[0]):"",serviceUrl:i.serviceUrl?encodeURIComponent(i.serviceUrl):"",currentUrl:encodeURIComponent(i.currentUrl),domain:encodeURIComponent(i.domain)}}static getEncodedServiceInfoFromTab(e,a){const i=this.getServiceInfoFromTab(e,a);return{serviceName:i.suggestedNames.length>0?encodeURIComponent(i.suggestedNames[0]):"",serviceUrl:i.serviceUrl?encodeURIComponent(i.serviceUrl):"",currentUrl:encodeURIComponent(i.currentUrl),domain:encodeURIComponent(i.domain)}}}const ZU=()=>{const[n]=Pb();return{detectService:I.useCallback(async a=>{let i=a||"",s="";try{const c=n.get("serviceName"),d=n.get("serviceUrl"),m=n.get("currentUrl");if(c||d||m){if(c&&(i=decodeURIComponent(c)),d&&(s=decodeURIComponent(d)),m&&(!c||!d)){const f=decodeURIComponent(m),g=HE.getServiceInfoFromTab(f);!c&&g.suggestedNames.length>0&&(i=g.suggestedNames[0]),!d&&g.serviceUrl&&(s=g.serviceUrl)}}else{const[f]=await No.tabs.query({active:!0,currentWindow:!0});if(f!=null&&f.url){const g=HE.getServiceInfoFromTab(f.url,f.title);g.suggestedNames.length>0&&!i&&(i=g.suggestedNames[0]),g.serviceUrl&&(s=g.serviceUrl)}}}catch(c){console.error("Error detecting service information:",c)}return{serviceName:i,serviceUrl:s}},[n])}},eM=5e3;class Ki{static extractSourceFromUrl(e){if(!e)return"unknown";try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname.toLowerCase().replace(/^www\./,"")}catch{return"unknown"}}static normalizeUrl(e){if(!e)return;const a=e.trim();if(a&&!(!a.startsWith("http://")&&!a.startsWith("https://")&&!a.startsWith("www.")))return a.startsWith("www.")?`https://${a}`:a}static extractFirstValidUrl(e){if(!e)return;const i=(Array.isArray(e)?e:[e]).find(s=>{const c=s==null?void 0:s.trim();return c&&(c.startsWith("http://")||c.startsWith("https://")||c.startsWith("www."))});return Ki.normalizeUrl(i)}static hasLogoForUrl(e,a){if(!e)return!1;const i=Ki.extractSourceFromUrl(e);return i==="unknown"?!1:a.logos.hasLogoForSource(i)}static async fetchFavicon(e,a,i,s=eM){const c=Ki.normalizeUrl(e);if(!c)return{success:!1,error:"Invalid URL"};const d=Ki.extractSourceFromUrl(c);if(d==="unknown")return{success:!1,error:"Could not extract domain from URL"};if(a.logos.hasLogoForSource(d))return{success:!1,skipped:!0};try{const m=new Promise((E,p)=>setTimeout(()=>p(new Error("Favicon extraction timed out")),s)),f=i.get(`Favicon/Extract?url=${encodeURIComponent(c)}`),g=await Promise.race([f,m]);return g!=null&&g.image?{success:!0,imageData:Uint8Array.from(ho.Buffer.from(g.image,"base64"))}:{success:!1,error:"No favicon returned from server"}}catch(m){const f=m instanceof Error?m.message:"Unknown error";return console.error("[Favicon] Error extracting favicon:",f),{success:!1,error:f}}}static async fetchAndAttachFavicon(e,a,i,s){const c=Ki.extractFirstValidUrl(a);if(!c)return{...e,Logo:void 0};const d=await Ki.fetchFavicon(c,i,s);return d.success&&d.imageData?{...e,Logo:d.imageData}:e}}const tM=[fa.Login,fa.Alias,fa.CreditCard,fa.Note],aM=fa.Login,zE=()=>{const{t:n}=Ze(),{id:e}=cd(),[a]=Pb(),i=Ba(),s=Kt(),c=e!==void 0&&e.length>0,d=a.get("type"),m=a.get("name"),f=a.get("folderId"),{executeVaultMutationAsync:g}=Ss(),{setHeaderButtons:E}=gr(),{setIsInitialLoading:p}=Aa(),{generateAlias:C,generateRandomEmailPrefix:N,lastGeneratedValues:x}=YU(),{detectService:S}=ZU(),T=Dr(),[k,U]=I.useState(!0),[R,P]=I.useState(!1),[M,j]=I.useState(null),[Q,H]=I.useState({}),[V,G]=I.useState([]),[K,$]=I.useState([]),[J,re]=I.useState(!1),[Ae,X]=I.useState(!1),[ie,ce]=I.useState(!1),ye=I.useRef(!1),_=I.useRef(null),[q,ee]=I.useState(!1),[ne,Ie]=I.useState(new Set),[we,Re]=I.useState(new Set),[Be,xe]=I.useState([]),[ze,At]=I.useState([]),[Lt,Ut]=I.useState({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),[et,nt]=I.useState([]),[Pt,Ne]=I.useState([]),[se,De]=I.useState([]),[je,Qe]=I.useState(!0),[Ye,ut]=I.useState(void 0),[Mt]=I.useState(!1),jt=I.useCallback(le=>{le.item&&j(le.item),le.fieldValues&&H(le.fieldValues),le.customFields&&G(le.customFields),le.totpEditorState&&Ut(le.totpEditorState),le.show2FA!==void 0&&X(le.show2FA),le.showAttachments!==void 0&&ce(le.showAttachments),le.manuallyAddedFields&&Ie(new Set(le.manuallyAddedFields)),le.isLoginEmailInEmailMode!==void 0&&Qe(le.isLoginEmailInEmailMode),le.passwordSettings!==void 0&&ut(le.passwordSettings)},[]),{loadPersistedValues:Vt,clearPersistedValues:ia}=JU({formId:e||null,isLoading:k,formData:{item:M,fieldValues:Q,customFields:V,totpEditorState:Lt,show2FA:Ae,showAttachments:ie,manuallyAddedFields:Array.from(ne),isLoginEmailInEmailMode:je,passwordSettings:Ye},onRestore:jt,skipRestore:Mt}),B=I.useMemo(()=>M?oL(M.ItemType):[],[M]),v=I.useMemo(()=>B.find(le=>le.FieldKey==="notes.content"),[B]),w=I.useMemo(()=>M?lL(M.ItemType):[],[M]),z=I.useMemo(()=>{const le=new Set;return B.forEach(_e=>{M&&Fl(_e,M.ItemType)&&le.add(_e.FieldKey)}),ne.forEach(_e=>le.add(_e)),we.forEach(_e=>le.add(_e)),Object.keys(Q).forEach(_e=>{const Me=Q[_e];Me&&(Array.isArray(Me)?Me.length>0:Me.toString().trim()!=="")&&le.add(_e)}),le},[M,B,ne,we,Q]),ae=I.useCallback(le=>{if(!M)return!1;if(ne.has(le.FieldKey)||we.has(le.FieldKey))return!0;const _e=B.find(Me=>Me.FieldKey===le.FieldKey);return _e?Fl(_e,M.ItemType):!0},[M,B,ne,we]),he=I.useMemo(()=>B.filter(le=>le.Category===ct.Primary),[B]),be=I.useMemo(()=>{const le={};return B.forEach(_e=>{if(_e.Category===ct.Notes||_e.Category===ct.Metadata||_e.Category===ct.Primary)return;const Me=_e.Category;le[Me]||(le[Me]=[]),le[Me].push(_e)}),le},[B]);I.useEffect(()=>{if(!(s!=null&&s.sqliteClient)||!e||!c){const le=d&&tM.includes(d)?d:aM;(async()=>{const{serviceName:Me,serviceUrl:Xe}=await S(m),xt={Id:crypto.randomUUID().toUpperCase(),Name:Me,ItemType:le,FolderId:f||null,Fields:[],CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString()};if(j(xt),Qe(le===fa.Login),Xe&&H(rt=>({...rt,"login.url":Xe})),s!=null&&s.sqliteClient){const rt=s.sqliteClient.folders.getAll();$(rt)}await bt.getSkipFormRestore()?await bt.setSkipFormRestore(!1):await Vt(),U(!1),p(!1)})();return}try{const le=s.sqliteClient.items.getById(e);if(le){j(le);const _e=s.sqliteClient.folders.getAll();$(_e);const Me={},Xe=[],xt=new Set;le.Fields.forEach(it=>{Me[it.FieldKey]=it.Value,xt.add(it.FieldKey),it.IsCustomField&&Xe.push({tempId:it.FieldKey,label:it.Label,fieldType:it.FieldType,isHidden:it.IsHidden,displayOrder:it.DisplayOrder})}),H(Me),G(Xe),Re(xt);const yt=s.sqliteClient.settings.getTotpCodesForItem(e);xe(yt),At(yt.map(it=>it.Id)),yt.length>0&&X(!0);const rt=s.sqliteClient.settings.getAttachmentsForItem(e);nt(rt),Ne(rt.map(it=>it.Id)),rt.length>0&&ce(!0),U(!1),p(!1)}else console.error("Item not found"),i("/items")}catch(le){console.error("Error loading item:",le),U(!1),p(!1)}},[s==null?void 0:s.sqliteClient,e,c,d,m,f,i,p,S,Vt]);const Ue=I.useCallback(async()=>{const le=await C();le&&(H(_e=>{const Me=_e["login.username"]||"",Xe=_e["login.password"]||"",xt=_e["login.email"]||"",yt={..._e,"alias.first_name":le.firstName,"alias.last_name":le.lastName,"alias.gender":le.gender,"alias.birthdate":le.birthdate};return(!xt||xt===x.email)&&(yt["login.email"]=le.email),(!Me||Me===x.username)&&(yt["login.username"]=le.username),(!Xe||Xe===x.password)&&(yt["login.password"]=le.password),yt}),ee(!0))},[C,x]),gt=I.useCallback(()=>{if(!(s!=null&&s.sqliteClient))return;const le=Q["alias.first_name"]||"",_e=Q["alias.last_name"]||"";let Me;if(!le.trim()&&!_e.trim())Me=N();else{const yt=Q["alias.gender"]||GI.Other,rt=Q["alias.birthdate"]||"";Me=new jh().generateEmailPrefix({firstName:le,lastName:_e,gender:yt,birthDate:rt?new Date(rt):new Date,emailPrefix:"",nickName:""})}const Xe=s.sqliteClient.settings.getDefaultEmailDomain(),xt=Xe?`${Me}@${Xe}`:Me;H(yt=>({...yt,"login.email":xt}))},[s==null?void 0:s.sqliteClient,Q,N]),pt=I.useCallback(()=>{if(!(s!=null&&s.sqliteClient))return;const le=N(),_e=s.sqliteClient.settings.getDefaultEmailDomain(),Me=_e?`${le}@${_e}`:le;H(Xe=>({...Xe,"login.email":Me}))},[s==null?void 0:s.sqliteClient,N]),wt=I.useCallback(async()=>{const le=await C();le&&H(_e=>({..._e,"login.username":le.username}))},[C]),dt=I.useMemo(()=>{if(!M)return!1;const le=B.find(_e=>_e.FieldKey==="alias.first_name");return le?Fl(le,M.ItemType):!1},[M,B]),fr=I.useMemo(()=>B.some(le=>le.FieldKey==="login.username"||le.FieldKey==="login.password"),[B]);I.useEffect(()=>{!c&&dt&&!k&&(s!=null&&s.sqliteClient)&&!ye.current&&(ye.current=!0,Ue())},[c,dt,k,s==null?void 0:s.sqliteClient,Ue]),I.useEffect(()=>{!c&&!k&&_.current&&_.current.focus()},[c,k]);const sa=I.useCallback((le,_e)=>{H(Me=>({...Me,[le]:_e}))},[]),nn=I.useCallback(async()=>{if(M)try{const le=[];B.forEach(Me=>{const Xe=Q[Me.FieldKey];Xe&&(Array.isArray(Xe)?Xe.length>0:Xe.trim()!=="")&&le.push({FieldKey:Me.FieldKey,Label:Me.FieldKey,FieldType:Me.FieldType,Value:Xe,IsHidden:Me.IsHidden,DisplayOrder:Me.DefaultDisplayOrder,IsCustomField:!1,EnableHistory:Me.EnableHistory})}),V.forEach(Me=>{const Xe=Q[Me.tempId]||"";le.push({FieldKey:Me.tempId,Label:Me.label,FieldType:Me.fieldType,Value:Xe,IsHidden:Me.isHidden,DisplayOrder:Me.displayOrder,IsCustomField:!0,EnableHistory:!1})});let _e={...M,Id:c?M.Id:crypto.randomUUID().toUpperCase(),Fields:le,UpdatedAt:new Date().toISOString()};if(s!=null&&s.sqliteClient&&(U(!0),_e=await Ki.fetchAndAttachFavicon(_e,Q["login.url"],s.sqliteClient,T)),!(s!=null&&s.sqliteClient))throw new Error("Database not initialized");await g(async()=>{if(U(!1),c){if(await s.sqliteClient.items.update(_e,Pt,et,ze,Be),se.length>0)for(const Me of se)await s.sqliteClient.passkeys.deleteById(Me)}else await s.sqliteClient.items.create(_e,et,Be)}),ia(),c?i(-1):i(`/items/${_e.Id}`,{replace:!0})}catch(le){console.error("Error saving item:",le)}},[M,Q,B,V,s,c,g,i,Pt,et,ze,Be,se,T,ia]),Pn=I.useCallback(async()=>{if(!(!M||!c||!(s!=null&&s.sqliteClient)))try{await g(async()=>{await s.sqliteClient.items.trash(M.Id)}),i("/items")}catch(le){console.error("Error deleting item:",le)}finally{P(!1)}},[M,c,s,g,i]),Hn=I.useCallback((le,_e)=>{const Xe={tempId:crypto.randomUUID(),label:le,fieldType:_e,isHidden:!1,displayOrder:B.length+V.length+1};G(xt=>[...xt,Xe])},[B.length,V.length]),Oe=I.useCallback(le=>{G(_e=>_e.filter(Me=>Me.tempId!==le)),H(_e=>{const Me={..._e};return delete Me[le],Me})},[]),ui=I.useCallback((le,_e)=>{G(Me=>Me.map(Xe=>Xe.tempId===le?{...Xe,label:_e}:Xe))},[]),ta=I.useCallback(le=>{if(!M)return;const _e=M.ItemType;!c&&_e!==le&&(H(Me=>{const Xe={};return Object.entries(Me).forEach(([xt,yt])=>{const rt=fo(xt);rt?Hl(rt,le)&&(Xe[xt]=yt):Xe[xt]=yt}),Xe}),Ie(Me=>{const Xe=new Set;return Me.forEach(xt=>{const yt=fo(xt);(!yt||Hl(yt,le))&&Xe.add(xt)}),Xe}),Re(Me=>{const Xe=new Set;return Me.forEach(xt=>{const yt=fo(xt);(!yt||Hl(yt,le))&&Xe.add(xt)}),Xe})),ye.current=!1,Qe(le===fa.Login),j({...M,ItemType:le,Fields:c?M.Fields:[]}),re(!1)},[M,c]),la=I.useCallback(()=>{H(le=>({...le,"notes.content":""})),Ie(le=>{const _e=new Set(le);return _e.delete("notes.content"),_e})},[]),nr=I.useCallback(()=>{X(!0),Ut({isAddFormVisible:!0,formData:{name:"",secretKey:""}})},[]),rr=I.useCallback(()=>{ce(!0)},[]),Ua=I.useCallback(le=>{Ie(_e=>new Set(_e).add(le))},[]),qt=I.useMemo(()=>{const le=[];return fr&&le.push({key:"2fa",isVisible:Ae,onAdd:nr}),le.push({key:"attachments",isVisible:ie,onAdd:rr}),le},[fr,Ae,ie,nr,rr]),Ea=I.useCallback(le=>{Ie(_e=>{const Me=new Set(_e);return Me.delete(le),Me}),H(_e=>{const Me={..._e};return delete Me[le],Me})},[]);I.useEffect(()=>{const le=l.jsxs("div",{className:"flex items-center gap-2",children:[c&&l.jsx(xn,{onClick:()=>P(!0),title:n("items.deleteItemTitle"),iconType:Pa.DELETE,variant:"danger"}),l.jsx(xn,{id:"save-credential",onClick:nn,title:n("items.saveItem"),iconType:Pa.SAVE})]});return E(le),()=>E(null)},[E,c,n,nn]);const Jt=I.useCallback((le,_e,Me,Xe,xt,yt)=>{const rt=Q[le]||"";if(xt){const Fe=Array.isArray(rt)&&rt.length>0?rt:rt?[rt]:[""];return l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:_e}),Fe.map((Z,Te)=>l.jsxs("div",{className:"relative",children:[l.jsx("input",{id:`${le}-${Te}`,type:"text",value:Z,onChange:Pe=>{const Ft=[...Fe];Ft[Te]=Pe.target.value,sa(le,Ft.filter(da=>da.trim()!==""))},className:"w-full px-3 py-2 pr-10 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white"}),Te===Fe.length-1&&l.jsx("button",{type:"button",onClick:()=>sa(le,[...Fe,""]),className:"absolute right-2 top-1/2 -translate-y-1/2 w-6 h-6 flex items-center justify-center text-gray-400 hover:text-primary-500 dark:hover:text-primary-400 transition-colors",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})})]},`${le}-${Te}`))]})}const it=Array.isArray(rt)?rt[0]||"":rt,un=(Fe,Z=!0)=>yt?l.jsxs("div",{className:"relative",children:[Fe,l.jsx("button",{type:"button",onClick:yt,className:`absolute right-2 ${Z?"top-[38px]":"top-1/2"} -translate-y-1/2 w-6 h-6 flex items-center justify-center text-gray-300 hover:text-red-400 dark:text-gray-500 dark:hover:text-red-400 transition-colors`,title:n("common.delete"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}):Fe;switch(Me){case ra.Password:return un(l.jsx(iD,{id:le,label:_e,value:it,onChange:Fe=>sa(le,Fe),showPassword:q,onShowPasswordChange:ee,initialSettings:Ye,onSettingsChange:ut}));case ra.Hidden:return un(l.jsx(aD,{id:le,label:_e,value:it,onChange:Fe=>sa(le,Fe)}));case ra.TextArea:return un(l.jsxs("div",{children:[_e&&l.jsx("label",{htmlFor:le,className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:_e}),l.jsx("textarea",{id:le,value:it,onChange:Fe=>sa(le,Fe.target.value),rows:4,className:`w-full px-3 py-2 ${yt?"pr-10":""} border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white`})]}));case ra.Email:return l.jsx(eD,{id:le,value:it,onChange:Fe=>sa(le,Fe),onRemove:yt,onGenerateAlias:dt?gt:pt,isEmailMode:je,onEmailModeChange:Qe});case ra.URL:case ra.Phone:case ra.Number:case ra.Date:case ra.Text:default:return le==="login.username"&&dt?l.jsx(sD,{id:le,label:_e,value:it,onChange:Fe=>sa(le,Fe),onRegenerate:wt}):un(l.jsx(md,{id:le,label:_e,value:it,onChange:Fe=>sa(le,Fe),type:"text"}))}},[Q,sa,q,n,gt,pt,dt,wt,je,Ye]),Ma=I.useCallback(le=>{le.preventDefault(),nn()},[nn]),za=I.useCallback(le=>{switch(le){case ct.Login:return n("items.loginCredentials");case ct.Alias:return n("common.alias");case ct.Card:return n("items.cardInformation");default:return le}},[n]),Ur=I.useCallback(le=>le===ct.Alias&&dt?l.jsx(l.Fragment,{children:l.jsx("button",{type:"button",onClick:Ue,className:"p-1.5 text-gray-400 hover:text-primary-500 focus:outline-none",title:n("common.generate"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M23 4v6h-6"}),l.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})})}):null,[dt,Ue,n]);return k||!M?l.jsx("div",{className:"flex justify-center items-center p-8",children:l.jsx(er,{})}):l.jsxs("form",{onSubmit:Ma,className:"space-y-4",children:[l.jsx(bB,{selectedType:M.ItemType,isEditMode:c,showDropdown:J,onDropdownToggle:re,onTypeChange:ta,onRegenerateAlias:dt&&!c?Ue:void 0}),l.jsxs(Su,{children:[l.jsx(EB,{inputRef:_,value:M.Name||"",onChange:le=>j({...M,Name:le}),folders:K,selectedFolderId:M.FolderId,onFolderChange:le=>j({...M,FolderId:le})}),he.map(le=>l.jsx("div",{children:Jt(le.FieldKey,n(`fieldLabels.${le.FieldKey}`,{defaultValue:le.FieldKey}),le.FieldType,le.IsHidden,le.IsMultiValue)},le.FieldKey))]}),c&&M.HasPasskey&&l.jsx(cD,{itemId:M.Id,passkeyIdsMarkedForDeletion:se,onPasskeyMarkedForDeletion:De}),Object.keys(be).map(le=>{const _e=be[le],Me=_e.filter(rt=>ae(rt)),Xe=le===ct.Login?_e.find(rt=>rt.FieldKey==="login.email"):null,xt=Xe&&!ae(Xe),yt=le===ct.Login?[...Me].sort((rt,it)=>{const un={"login.email":0,"login.username":1,"login.password":2},Fe=un[rt.FieldKey]??99,Z=un[it.FieldKey]??99;return Fe-Z}):Me;return yt.length===0&&!xt?null:l.jsx(Su,{title:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{children:za(le)}),xt&&l.jsxs("button",{type:"button",onClick:()=>Ua("login.email"),className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs rounded-full transition-colors focus:outline-none text-gray-500 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400 border border-dashed border-gray-300 dark:border-gray-600 hover:border-primary-400 dark:hover:border-primary-500",children:[l.jsxs("svg",{className:"w-2.5 h-2.5 -ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[l.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),l.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),l.jsx("span",{children:n("common.email")})]})]}),actions:Ur(le),children:yt.map(rt=>{const it=M&&ne.has(rt.FieldKey)&&!Fl(rt,M.ItemType);return l.jsx(od.Fragment,{children:Jt(rt.FieldKey,n(`fieldLabels.${rt.FieldKey}`,{defaultValue:rt.FieldKey}),rt.FieldType,rt.IsHidden,rt.IsMultiValue,it?()=>Ea(rt.FieldKey):void 0)},rt.FieldKey)})},le)}),v&&z.has("notes.content")&&l.jsx(Su,{title:n("common.notes"),actions:ae(v)?void 0:l.jsx("button",{type:"button",onClick:la,className:"p-1.5 text-gray-400 hover:text-red-500 focus:outline-none",title:n("common.delete"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),children:Jt(v.FieldKey,"",v.FieldType,v.IsHidden,v.IsMultiValue)}),V.length>0&&l.jsx(Su,{title:n("common.customFields"),children:V.map(le=>l.jsxs("div",{children:[l.jsx(ZR,{htmlFor:le.tempId,label:le.label,onLabelChange:_e=>ui(le.tempId,_e),onDelete:()=>Oe(le.tempId)}),Jt(le.tempId,"",le.fieldType,le.isHidden,!1)]},le.tempId))}),Ae&&fr&&l.jsx(yB,{totpCodes:Be,onTotpCodesChange:xe,originalTotpCodeIds:ze,isAddFormVisible:Lt.isAddFormVisible,formData:Lt.formData,onStateChange:Ut}),ie&&l.jsx(oD,{attachments:et,onAttachmentsChange:nt,itemId:c?e:void 0}),l.jsx($R,{optionalSystemFields:w,visibleFieldKeys:z,optionalSections:qt,callbacks:{onAddSystemField:Ua,onAddCustomField:Hn}}),c&&l.jsx(Zu,{isOpen:R,onClose:()=>P(!1),title:n("items.deleteItemTitle"),message:n("items.deleteItemConfirm"),confirmText:n("common.delete"),cancelText:n("common.cancel"),onConfirm:Pn,variant:"danger"})]})},nM=({itemId:n})=>{const{t:e}=Ze(),[a,i]=I.useState([]),[s,c]=I.useState(!0),d=Kt(),m=f=>{try{const g=f.Blob instanceof Uint8Array?f.Blob:new Uint8Array(f.Blob),E=new Blob([g]),p=URL.createObjectURL(E),C=document.createElement("a");C.href=p,C.download=f.Filename,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(p)}catch(g){console.error("Error downloading attachment:",g)}};return I.useEffect(()=>{(async()=>{if(!(!(d!=null&&d.sqliteClient)||!n))try{const g=d.sqliteClient.settings.getAttachmentsForItem(n);i(g)}catch(g){console.error("Error loading attachments:",g)}finally{c(!1)}})()},[n,d==null?void 0:d.sqliteClient]),s?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:e("common.attachments")}),e("common.loadingAttachments")]}):a.length===0?null:l.jsx("div",{className:"mb-4",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:e("common.attachments")}),l.jsx("div",{className:"grid grid-cols-1 gap-2",children:a.map(f=>l.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:()=>m(f),"aria-label":`Download ${f.Filename}`,children:l.jsxs("div",{className:"flex justify-between items-center gap-2",children:[l.jsx("div",{className:"flex items-center flex-1",children:l.jsxs("div",{className:"flex flex-col",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:f.Filename}),l.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(f.CreatedAt).toLocaleDateString()})]})}),l.jsx("div",{className:"flex items-center",children:l.jsx("svg",{className:"w-4 h-4 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})})]})},f.Id))})]})})};class rM{constructor(){qe(this,"currentCopiedId","");qe(this,"onCopyCallbacks",[])}setCopied(e){this.currentCopiedId=e,this.notifySubscribers()}getCopiedId(){return this.currentCopiedId}subscribe(e){return this.onCopyCallbacks.push(e),()=>{this.onCopyCallbacks=this.onCopyCallbacks.filter(a=>a!==e)}}notifySubscribers(){this.onCopyCallbacks.forEach(e=>e(this.currentCopiedId))}}const ku=new rM,Df=({name:n})=>{switch(n){case"visibility":return l.jsxs(l.Fragment,{children:[l.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),l.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return l.jsxs(l.Fragment,{children:[l.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"}),l.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"copy":return l.jsxs(l.Fragment,{children:[l.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),l.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 l.jsx(l.Fragment,{children:l.jsx("polyline",{points:"20 6 9 17 4 12"})});default:return null}},Qu=({id:n,label:e,value:a,type:i="text",labelSuffix:s})=>{const{t:c}=Ze(),[d,m]=I.useState(!1),[f,g]=I.useState(!1);I.useEffect(()=>{const p=ku.subscribe(C=>{g(C===n)});return()=>{p()}},[n]);const E=async()=>{try{await navigator.clipboard.writeText(a),ku.setCopied(n),await Bt("CLIPBOARD_COPIED",{value:a},"background"),setTimeout(()=>{ku.getCopiedId()===n&&ku.setCopied("")},2e3)}catch(p){console.error("Failed to copy text:",p)}};return l.jsxs("div",{children:[l.jsxs("label",{htmlFor:n,className:"block mb-2 text-sm font-medium text-gray-700 dark:text-gray-300",children:[e,s]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:i==="password"&&!d?"password":"text",id:n,readOnly:!0,value:a,onClick:E,className:`w-full px-3 py-2.5 bg-white border ${f?"border-green-500 border-2":"border-gray-300"} text-gray-900 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`}),l.jsxs("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:[f?l.jsx("button",{type:"button",className:"p-1 text-green-500 dark:text-green-400 transition-colors duration-200",title:c("common.copied"),children:l.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx(Df,{name:"check"})})}):l.jsx("button",{type:"button",onClick:E,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:c("common.copyToClipboard"),children:l.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx(Df,{name:"copy"})})}),i==="password"&&l.jsx("button",{type:"button",onClick:()=>m(!d),className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:c(d?"common.hidePassword":"common.showPassword"),children:l.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx(Df,{name:d?"visibility-off":"visibility"})})})]})]})]})},iM=({isOpen:n,onClose:e,itemId:a,fieldKey:i,fieldLabel:s,fieldType:c,isHidden:d})=>{const{t:m}=Ze(),f=Kt(),{executeVaultMutationAsync:g}=Ss(),[E,p]=I.useState([]),[C,N]=I.useState(!0),[x,S]=I.useState(null),T=d||c===ra.Password||c===ra.Hidden,k=I.useCallback(async()=>{if(f!=null&&f.sqliteClient)try{N(!0);const M=f.sqliteClient.items.getFieldHistory(a,i);p(M)}catch(M){console.error("Error loading field history:",M)}finally{N(!1)}},[f==null?void 0:f.sqliteClient,a,i]);I.useEffect(()=>{n&&k()},[n,f==null?void 0:f.sqliteClient,a,i,k]);const U=M=>{try{return new Date(M).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return M}},R=M=>{try{return JSON.parse(M)}catch{return[M]}},P=async M=>{if(f!=null&&f.sqliteClient)try{await g(async()=>{await f.sqliteClient.items.deleteFieldHistory(M)}),k(),S(null)}catch(j){console.error("Error deleting field history:",j)}};return l.jsx(tr,{isOpen:n,onClose:e,title:`${s} ${m("items.history")}`,maxWidth:"max-w-2xl",bodyClassName:"px-4 pb-4 pt-4 overflow-y-auto max-h-[60vh]",children:C?l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):E.length===0?l.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:m("items.noHistoryAvailable")}):l.jsx("div",{className:"space-y-3",children:E.map(M=>{const j=R(M.ValueSnapshot),Q=x===M.Id;return l.jsxs("div",{className:"rounded-lg p-4 border border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:U(M.ChangedAt)}),Q?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{type:"button",onClick:()=>P(M.Id),className:"text-xs px-2 py-1 text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 font-medium",children:m("common.confirm")}),l.jsx("button",{type:"button",onClick:()=>S(null),className:"text-xs px-2 py-1 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",children:m("common.cancel")})]}):l.jsx("button",{type:"button",onClick:()=>S(M.Id),className:"text-xs px-2 py-1 text-gray-500 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400 transition-colors",title:m("common.delete"),children:l.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})})})]}),j.map((H,V)=>l.jsx("div",{className:"mt-2",children:l.jsx(Qu,{id:`history-${M.Id}-${V}`,label:"",value:H,type:T?"password":"text"})},V))]},M.Id)})})})},QE=/(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,sM=n=>{const e=[];let a=0,i;for(QE.lastIndex=0;(i=QE.exec(n))!==null;){i.index>a&&e.push({type:"text",content:n.slice(a,i.index)});const s=i[0],c=s.startsWith("http")?s:`http://${s}`;e.push({type:"url",content:s,href:c}),a=i.index+s.length}return a<n.length&&e.push({type:"text",content:n.slice(a)}),e},oM=({text:n})=>{const e=sM(n);return l.jsx(l.Fragment,{children:e.map((a,i)=>a.type==="url"?l.jsx("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300",children:a.content},i):l.jsx(od.Fragment,{children:a.content},i))})},co=({field:n,itemId:e,hideLabel:a=!1})=>{const{t:i}=Ze(),s=Kt(),[c,d]=I.useState(!1),[m,f]=I.useState(0),g=n.IsCustomField?n.Label||n.FieldKey:i(`fieldLabels.${n.FieldKey}`,{defaultValue:n.FieldKey}),E=n.EnableHistory===!0;if(I.useEffect(()=>{if(E&&e&&(s!=null&&s.sqliteClient))try{const S=s.sqliteClient.items.getFieldHistory(e,n.FieldKey);if(S.length>1)f(S.length);else if(S.length===1){const T=Array.isArray(n.Value)?n.Value:[n.Value],k=JSON.stringify(T.filter(R=>R&&R.trim()!=="")),U=S[0].ValueSnapshot;f(k!==U?1:0)}else f(0)}catch(S){console.error("[FieldBlock] Error checking history:",S)}},[E,e,n.FieldKey,n.Value,s==null?void 0:s.sqliteClient]),!n.Value||typeof n.Value=="string"&&n.Value.trim()==="")return null;const p=Array.isArray(n.Value)?n.Value:[n.Value];if(p.length>1)return l.jsx("div",{className:"space-y-2",children:p.map((S,T)=>l.jsx(Qu,{id:`${n.FieldKey}-${T}`,label:T===0?g:`${g} ${T+1}`,value:S,type:n.FieldType===ra.Password?"password":"text"},`${n.FieldKey}-${T}`))});const C=p[0],N=m>0&&e?l.jsx("button",{type:"button",onClick:()=>d(!0),className:"ml-2 inline-flex items-center text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 focus:outline-none",title:i("items.viewHistory"),children:l.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})})}):null,x=c&&e?l.jsx(iM,{isOpen:c,onClose:()=>d(!1),itemId:e,fieldKey:n.FieldKey,fieldLabel:g,fieldType:n.FieldType,isHidden:n.IsHidden}):null;switch(n.FieldType){case ra.Password:case ra.Hidden:return l.jsxs(l.Fragment,{children:[l.jsx(Qu,{id:n.FieldKey,label:g,value:C,type:"password",labelSuffix:N}),x]});case ra.TextArea:return l.jsxs("div",{children:[!a&&l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:g}),l.jsx("div",{className:"p-4 bg-gray-50 rounded-lg dark:bg-gray-700",children:l.jsx("p",{className:"text-gray-900 dark:text-gray-100 whitespace-pre-wrap",children:l.jsx(oM,{text:C})})})]});case ra.Email:case ra.URL:case ra.Phone:case ra.Date:case ra.Number:case ra.Text:default:return l.jsxs(l.Fragment,{children:[l.jsx(Qu,{id:n.FieldKey,label:g,value:C,type:"text",labelSuffix:N}),x]})}},lM=({itemId:n})=>{const{t:e}=Ze(),[a,i]=I.useState([]),[s,c]=I.useState(!0),[d,m]=I.useState({}),[f,g]=I.useState(null),E=Kt(),p=(S=30)=>{const T=new Na({secret:"dummy",algorithm:"SHA1",digits:6,period:S});return T.period-Math.floor(Date.now()/1e3)%T.period},C=()=>{const S=p();return Math.floor((30-S)/30*100)},N=S=>{try{return new Na({secret:S,algorithm:"SHA1",digits:6,period:30}).generate()}catch(T){return console.error("Error generating TOTP code:",T),"Error"}},x=async(S,T)=>{try{await navigator.clipboard.writeText(S),g(T),await Bt("CLIPBOARD_COPIED",{value:S},"background"),setTimeout(()=>{g(null)},2e3)}catch(k){console.error("Failed to copy:",k)}};return I.useEffect(()=>{(async()=>{if(!(!(E!=null&&E.sqliteClient)||!n))try{const T=E.sqliteClient.settings.getTotpCodesForItem(n);i(T)}catch(T){console.error("Error loading TOTP codes:",T)}finally{c(!1)}})()},[n,E==null?void 0:E.sqliteClient]),I.useEffect(()=>{const S=U=>{const R={};return a.forEach(P=>{const M=N(P.SecretKey);M!=="Error"?R[P.Id]=M:R[P.Id]=U[P.Id]??"Error"}),R},T={};a.forEach(U=>{T[U.Id]=N(U.SecretKey)}),m(T);const k=setInterval(()=>{m(S)},1e3);return()=>{clearInterval(k)}},[a]),s?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:e("common.twoFactorAuthentication")}),e("common.loadingTotpCodes")]}):a.length===0?null:l.jsx("div",{className:"mb-4",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:e("common.twoFactorAuthentication")}),l.jsx("div",{className:"grid grid-cols-1 gap-2",children:a.map(S=>l.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:()=>x(d[S.Id],S.Id),"aria-label":`Copy ${S.Name} code`,children:l.jsxs("div",{className:"flex justify-between items-center gap-2",children:[l.jsx("div",{className:"flex items-center flex-1",children:l.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:S.Name})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex flex-col items-end",children:[l.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:d[S.Id]}),l.jsx("div",{className:"text-xs",children:f===S.Id?l.jsx("span",{className:"text-green-600 dark:text-green-400",children:e("common.copied")}):l.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[p(),"s"]})})]}),l.jsx("div",{className:"w-1 h-6 bg-gray-200 rounded-full dark:bg-gray-600",children:l.jsx("div",{className:"bg-blue-600 rounded-full transition-all",style:{height:`${C()}%`,width:"100%"}})})]})]})},S.Id))})]})})};var Vu={Placeholder:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <circle cx="10" cy="10" r="6.5" fill="none" stroke="#f49541" stroke-width="2.5"/>
  <circle cx="10" cy="10" r="2.5" fill="none" stroke="#f49541" stroke-width="2"/>
  <path d="M15 15L27 27" stroke="#f49541" stroke-width="2.5" stroke-linecap="round"/>
  <path d="M19 19L23 15" stroke="#f49541" stroke-width="2.5" stroke-linecap="round"/>
  <path d="M24 24L28 20" stroke="#f49541" stroke-width="2.5" stroke-linecap="round"/>
</svg>`,Note:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path d="M8 4C6.9 4 6 4.9 6 6V26C6 27.1 6.9 28 8 28H24C25.1 28 26 27.1 26 26V11L19 4H8Z" fill="#f49541"/>
  <path d="M19 4V11H26L19 4Z" fill="#d68338"/>
  <rect x="10" y="14" width="12" height="1.5" rx="0.75" fill="#ffe096"/>
  <rect x="10" y="18" width="10" height="1.5" rx="0.75" fill="#ffe096"/>
  <rect x="10" y="22" width="8" height="1.5" rx="0.75" fill="#ffe096"/>
</svg>`,CreditCard:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect x="2" y="6" width="28" height="20" rx="3" fill="#f49541"/>
  <rect x="2" y="11" width="28" height="4" fill="#d68338"/>
  <rect x="5" y="18" width="8" height="2" rx="1" fill="#ffe096"/>
  <rect x="5" y="22" width="5" height="1.5" rx="0.75" fill="#fbcb74"/>
</svg>`,Visa:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect x="2" y="6" width="28" height="20" rx="3" fill="#f49541"/>
  <path d="M13.5 13L11.5 19H10L8.5 14.5C8.5 14.5 8.35 14 8 14C7.65 14 7 13.8 7 13.8L7.05 13.5H9.5C9.85 13.5 10.15 13.75 10.2 14.1L10.8 17L12.5 13.5H13.5V13ZM15 19H14L15 13H16L15 19ZM20 13.5C20 13.5 19.4 13.3 18.7 13.3C17.35 13.3 16.4 14 16.4 15C16.4 15.8 17.1 16.2 17.65 16.5C18.2 16.8 18.4 17 18.4 17.2C18.4 17.5 18.05 17.7 17.6 17.7C17 17.7 16.5 17.5 16.5 17.5L16.3 18.7C16.3 18.7 16.9 19 17.7 19C19.2 19 20.1 18.2 20.1 17.1C20.1 15.7 18.4 15.6 18.4 15C18.4 14.7 18.7 14.5 19.15 14.5C19.6 14.5 20.1 14.7 20.1 14.7L20.3 13.5H20V13.5ZM24 19L23.1 13.5H22C21.7 13.5 21.45 13.7 21.35 13.95L19 19H20.5L20.8 18H22.7L22.9 19H24ZM21.2 17L22 14.5L22.45 17H21.2Z" fill="#ffe096"/>
</svg>`,Mastercard:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect x="2" y="6" width="28" height="20" rx="3" fill="#f49541"/>
  <circle cx="13" cy="16" r="5" fill="#d68338"/>
  <circle cx="19" cy="16" r="5" fill="#ffe096"/>
  <path d="M16 12.5C17.1 13.4 17.8 14.6 17.8 16C17.8 17.4 17.1 18.6 16 19.5C14.9 18.6 14.2 17.4 14.2 16C14.2 14.6 14.9 13.4 16 12.5Z" fill="#fbcb74"/>
</svg>`,Amex:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect x="2" y="6" width="28" height="20" rx="3" fill="#f49541"/>
  <text x="16" y="18" text-anchor="middle" fill="#ffe096" font-size="8" font-weight="bold" font-family="Arial, sans-serif">AMEX</text>
</svg>`,Discover:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect x="2" y="6" width="28" height="20" rx="3" fill="#f49541"/>
  <circle cx="20" cy="16" r="4" fill="#ffe096"/>
  <path d="M7 14H8.5C9.3 14 10 14.7 10 15.5C10 16.3 9.3 17 8.5 17H7V14Z" fill="#ffe096"/>
  <rect x="11" y="14" width="1.5" height="3" fill="#ffe096"/>
  <path d="M14 15C14 14.4 14.4 14 15 14C15.3 14 15.5 14.1 15.7 14.3L16.5 13.5C16.1 13.2 15.6 13 15 13C13.9 13 13 13.9 13 15C13 16.1 13.9 17 15 17C15.6 17 16.1 16.8 16.5 16.5L15.7 15.7C15.5 15.9 15.3 16 15 16C14.4 16 14 15.6 14 15Z" fill="#ffe096"/>
</svg>`};const Bf=({svg:n,className:e="w-8 h-8"})=>l.jsx("div",{className:`${e} flex-shrink-0`,dangerouslySetInnerHTML:{__html:n}}),cM=n=>{if(!n)return"CreditCard";const e=n.replace(/[\s-]/g,"");return/^\d{4,}/.test(e)?/^4/.test(e)?"Visa":/^5[1-5]/.test(e)||/^2[2-7]/.test(e)?"Mastercard":/^3[47]/.test(e)?"Amex":/^6(?:011|22|4[4-9]|5)/.test(e)?"Discover":"CreditCard":"CreditCard"},uM=n=>Vu[cM(n)],KI=({item:n,className:e="w-8 h-8"})=>{var i;if(n.ItemType===fa.Note)return l.jsx(Bf,{svg:Vu.Note,className:e});if(n.ItemType===fa.CreditCard){const s=(i=n.Fields)==null?void 0:i.find(d=>d.FieldKey===en.CardNumber),c=s!=null&&s.Value?Array.isArray(s.Value)?s.Value[0]:s.Value:void 0;return l.jsx(Bf,{svg:uM(c),className:e})}const a=n.Logo&&n.Logo.length>0?Kf.imgSrcFromBytes(n.Logo):null;return a?l.jsx("img",{src:a,alt:n.Name||"Item",className:`${e} flex-shrink-0`,onError:s=>{const c=s.target;c.style.display="none";const d=c.parentElement;if(d){const m=document.createElement("div");m.className=e,m.innerHTML=Vu.Placeholder,d.insertBefore(m,c)}}}):l.jsx(Bf,{svg:Vu.Placeholder,className:e})},dM=({email:n})=>{const{t:e}=Ze(),[a,i]=I.useState([]),[s,c]=I.useState([]),[d,m]=I.useState(!0),[f,g]=I.useState(0),[E,p]=I.useState(!1),[C,N]=I.useState(null),[x,S]=I.useState(!1),[T,k]=I.useState(2),U=Dr(),R=Kt(),P=3,M=T<a.length,j=(G,K)=>{const $=G.slice(0,K);c($)},Q=()=>{const G=Math.min(T+P,a.length);k(G),j(a,G)},H=async G=>(await zl("local:publicEmailDomains")??[]).some($=>G.toLowerCase().endsWith(`@${$.toLowerCase()}`)),V=async G=>(await zl("local:privateEmailDomains")??[]).some($=>G.toLowerCase().endsWith(`@${$.toLowerCase()}`));return I.useEffect(()=>{const G=async()=>{var $;try{if(R.isOffline){m(!1);return}N(null);const J=await H(n),re=await V(n),Ae=J||re;if(p(J),S(Ae),!Ae)return;if(J){const X=n.split("@")[0],ie=await fetch(`https://api.spamok.com/v2/EmailBox/${X}`,{headers:{"X-Asdasd-Platform-Id":"av-chrome","X-Asdasd-Platform-Version":tn.VERSION}});if(!ie.ok){N(e("common.errors.unknownError"));return}const ce=await ie.json(),ye=(($=ce==null?void 0:ce.mails)==null?void 0:$.toSorted((_,q)=>new Date(q.dateSystem).getTime()-new Date(_.dateSystem).getTime()))??[];d&&ye.length>0&&g(ye[0].id),i(_=>JSON.stringify(_.map(ee=>ee.id))!==JSON.stringify(ye.map(ee=>ee.id))?(j(ye,T),ye):_)}else if(re)try{const X=await U.authFetch(`EmailBox/${n}`,{method:"GET"},!0,!1);try{const ce=X.mails.toSorted((ye,_)=>new Date(_.dateSystem).getTime()-new Date(ye.dateSystem).getTime());if(ce){const ye=await Gt.decryptEmailList(ce,R.sqliteClient.settings.getAllEncryptionKeys());d&&ye.length>0&&g(ye[0].id),i(_=>JSON.stringify(_.map(ee=>ee.id))!==JSON.stringify(ye.map(ee=>ee.id))?(j(ye,T),ye):_),N(null)}}catch{const ie=X;if(R.shouldSuppressEmailErrors())return;N(e("emails.apiErrors."+(ie==null?void 0:ie.code)));return}}catch{if(R.shouldSuppressEmailErrors())return;N(e("common.errors.unknownError"));return}}catch(J){console.error("Error loading emails:",J),N(e("common.errors.unknownError"))}m(!1)};G();const K=setInterval(G,2e3);return()=>clearInterval(K)},[n,d,U,R,e,T]),x?R.isOffline?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[l.jsx("div",{className:"flex items-center gap-2 mb-2",children:l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")})}),l.jsx("p",{className:"text-sm",children:e("emails.offlineMessage")})]}):C?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[l.jsx("div",{className:"flex items-center gap-2 mb-2",children:l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")})}),l.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded",children:l.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:C})})]}):d?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),l.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),e("common.loadingEmails")]}):a.length===0?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4 text-sm",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),l.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),e("emails.noEmails")]}):l.jsxs("div",{className:"space-y-2 mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),l.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),s.map(G=>E?l.jsxs("a",{href:`https://spamok.com/${n.split("@")[0]}/${G.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 ${G.id>f?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[l.jsx("div",{className:"truncate flex-1",children:l.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[G.subject.substring(0,30),G.subject.length>30?"...":""]})}),l.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(G.dateSystem).toLocaleDateString()})]},G.id):l.jsxs(dd,{to:`/emails/${G.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 ${G.id>f?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[l.jsx("span",{className:"truncate flex-1",children:l.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[G.subject.substring(0,30),G.subject.length>30?"...":""]})}),l.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(G.dateSystem).toLocaleDateString()})]},G.id)),M&&l.jsxs("button",{onClick:Q,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:[l.jsx("span",{children:e("common.loadMore")}),l.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}):null},mM=()=>{const{t:n}=Ze(),{id:e}=cd(),a=Ba(),i=Kt(),[s,c]=I.useState(null),{setIsInitialLoading:d}=Aa(),{setHeaderButtons:m}=gr(),f=I.useCallback(()=>{Ta.openInNewPopup(`/items/${e}`)},[e]),g=I.useCallback(()=>{a(`/items/${e}/edit`)},[e,a]);if(I.useEffect(()=>{if(Ta.isPopup()&&(window.history.replaceState({},"","popup.html#/items"),window.history.pushState({},"",`popup.html#/items/${e}`)),!(!(i!=null&&i.sqliteClient)||!e))try{const N=i.sqliteClient.items.getById(e);N?(c(N),d(!1)):(console.error("Item not found"),a("/items"))}catch(N){console.error("Error loading item:",N)}},[i.sqliteClient,e,a,d]),I.useEffect(()=>{const N=l.jsxs("div",{className:"flex items-center gap-2",children:[!Ta.isPopup()&&l.jsx(xn,{onClick:f,title:n("common.openInNewWindow"),iconType:Pa.EXPAND}),l.jsx(xn,{onClick:g,title:n("items.editItem"),iconType:Pa.EDIT})]});return m(N),()=>{}},[m,g,f,n]),I.useEffect(()=>()=>m(null),[m]),!s)return l.jsx("div",{children:n("common.loading")});const E=s.Fields.filter(N=>N.FieldType===ra.URL&&N.Value),p={...s,Fields:s.Fields.filter(N=>N.FieldType!==ra.URL)},C=uL(p);return l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{className:"flex justify-between items-start",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(KI,{item:s,className:"w-12 h-12 rounded-lg"}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.Name||n("items.untitled")}),E.length>0&&l.jsx("div",{className:"mt-1 space-y-1",children:E.flatMap(N=>(Array.isArray(N.Value)?N.Value:[N.Value]).map((S,T)=>/^https?:\/\//i.test(S)?l.jsx("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"block text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300 break-all text-sm",children:S},`${N.FieldKey}-${T}`):l.jsx("span",{className:"block text-gray-500 dark:text-gray-300 break-all text-sm",children:S},`${N.FieldKey}-${T}`)))})]})]})}),(s.ItemType===fa.Login||s.ItemType===fa.Alias)&&(()=>{const N=s.Fields.find(T=>T.FieldKey==="login.email"),x=N==null?void 0:N.Value,S=Array.isArray(x)?x[0]:x;return S?l.jsx(dM,{email:S}):null})(),(s.ItemType===fa.Login||s.ItemType===fa.Alias)&&l.jsx(lM,{itemId:s.Id}),(s.ItemType===fa.Login||s.ItemType===fa.Alias)&&s.HasPasskey&&l.jsx(lD,{itemId:s.Id}),s.ItemType===fa.Note&&C[ct.Notes]&&C[ct.Notes].length>0&&C[ct.Notes].map(N=>l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:n(`fieldLabels.${N.FieldKey}`,{defaultValue:N.Label||N.FieldKey})}),l.jsx(co,{field:N,itemId:s.Id,hideLabel:!0})]},N.FieldKey)),Object.keys(C).length>0&&l.jsxs(l.Fragment,{children:[C[ct.Login]&&C[ct.Login].length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:n("common.credentials")}),C[ct.Login].map(N=>l.jsx(co,{field:N,itemId:s.Id},N.FieldKey))]}),C[ct.Alias]&&C[ct.Alias].length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:n("common.alias")}),C[ct.Alias].map(N=>l.jsx(co,{field:N,itemId:s.Id},N.FieldKey))]}),C[ct.Card]&&C[ct.Card].length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:n("items.cardInformation")}),C[ct.Card].map(N=>l.jsx(co,{field:N,itemId:s.Id},N.FieldKey))]}),s.ItemType!==fa.Note&&C[ct.Notes]&&C[ct.Notes].length>0&&C[ct.Notes].map(N=>l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:n(`fieldLabels.${N.FieldKey}`,{defaultValue:N.Label||N.FieldKey})}),l.jsx(co,{field:N,itemId:s.Id,hideLabel:!0})]},N.FieldKey)),C[ct.Custom]&&C[ct.Custom].length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:n("common.customFields")}),C[ct.Custom].map(N=>l.jsx(co,{field:N,itemId:s.Id},N.FieldKey))]})]}),l.jsx(nM,{itemId:s.Id}),s.Tags&&s.Tags.length>0&&l.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-4",children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:n("items.tags")}),l.jsx("div",{className:"flex flex-wrap gap-2",children:s.Tags.map(N=>l.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",children:N.Name},N.Id))})]})]})},gM=({isOpen:n,onClose:e,onDeleteFolderOnly:a,onDeleteFolderAndContents:i,itemCount:s})=>{const{t:c}=Ze(),[d,m]=I.useState(!1),f=async()=>{m(!0);try{await a(),e()}catch(p){console.error("Error deleting folder:",p)}finally{m(!1)}},g=async()=>{m(!0);try{await i(),e()}catch(p){console.error("Error deleting folder with contents:",p)}finally{m(!1)}},E=()=>{d||e()};return l.jsx(tr,{isOpen:n,onClose:E,title:c("items.deleteFolder"),footer:l.jsx("div",{className:"flex justify-end",children:l.jsx("button",{type:"button",onClick:E,disabled:d,className:"px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50",children:c("common.cancel")})}),children:l.jsx("div",{className:"space-y-4",children:l.jsxs("div",{className:"space-y-3 pt-2",children:[l.jsx("button",{type:"button",onClick:f,disabled:d,className:"w-full p-3 text-left border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors disabled:opacity-50",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"mt-0.5 text-orange-500",children:l.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 14l2 2 4-4"})]})}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:c("items.deleteFolderKeepItems")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:c("items.deleteFolderKeepItemsDescription")})]})]})}),s>0&&l.jsx("button",{type:"button",onClick:g,disabled:d,className:"w-full p-3 text-left border border-red-300 dark:border-red-700 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors disabled:opacity-50",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"mt-0.5 text-red-500",children:l.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[l.jsx("polyline",{points:"3 6 5 6 21 6"}),l.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-red-600 dark:text-red-400",children:c("items.deleteFolderAndItems")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:c("items.deleteFolderAndItemsDescription",{count:s})})]})]})})]})})})},VE=({isOpen:n,onClose:e,onSave:a,initialName:i="",mode:s})=>{const{t:c}=Ze(),[d,m]=I.useState(i),[f,g]=I.useState(!1),[E,p]=I.useState(null);I.useEffect(()=>{n&&(m(i),p(null))},[n,i]);const C=async N=>{N.preventDefault();const x=d.trim();if(!x){p(c("items.folderNameRequired"));return}g(!0),p(null);try{await a(x),e()}catch(S){Ao(S)?p(qi(S,c("common.errors.unknownErrorTryAgain"))):p(c("common.errors.unknownErrorTryAgain")),console.error("Error saving folder:",S)}finally{g(!1)}};return l.jsx(tr,{isOpen:n,onClose:e,title:c(s==="create"?"items.createFolder":"items.editFolder"),footer:l.jsxs("div",{className:"flex justify-end gap-3",children:[l.jsx("button",{type:"button",onClick:e,disabled:f,className:"px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50",children:c("common.cancel")}),l.jsx("button",{type:"submit",form:"folder-form",disabled:f,className:"px-4 py-2 text-sm font-medium text-white bg-orange-600 hover:bg-orange-700 rounded focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-orange-500 disabled:opacity-50",children:c(f?"common.saving":s==="create"?"common.create":"common.save")})]}),children:l.jsxs("form",{id:"folder-form",onSubmit:C,children:[l.jsx("label",{htmlFor:"folderName",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:c("items.folderName")}),l.jsx("input",{id:"folderName",type:"text",value:d,onChange:N=>m(N.target.value),autoFocus:!0,className:"w-full p-2 border dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:ring-blue-500 focus:border-blue-500"}),E&&l.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:E})]})})},GE=({folder:n,onClick:e})=>l.jsxs("button",{onClick:e,className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-white dark:bg-gray-700/50 hover:bg-gray-50 dark:hover:bg-gray-600/50 border border-gray-200 dark:border-gray-600 rounded-full text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-orange-500/50",children:[l.jsx("svg",{className:"w-3.5 h-3.5 text-orange-500 dark:text-orange-400 flex-shrink-0",viewBox:"0 0 24 24",fill:"currentColor",children:l.jsx("path",{d:"M10 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-8l-2-2z"})}),l.jsx("span",{className:"text-gray-700 dark:text-gray-200 font-medium truncate max-w-[120px]",children:n.name}),n.itemCount>0&&l.jsx("span",{className:"text-gray-400 dark:text-gray-500 text-xs",children:n.itemCount})]}),fM=({item:n,showFolderPath:e=!1})=>{const{t:a}=Ze(),i=Ba(),s=d=>{var g,E;let m="";const f=(g=d.Fields)==null?void 0:g.find(p=>p.FieldKey===en.LoginUsername);if(f&&f.Value&&(m=Array.isArray(f.Value)?f.Value[0]:f.Value),!m){const p=(E=d.Fields)==null?void 0:E.find(C=>C.FieldKey===en.LoginEmail);p&&p.Value&&(m=Array.isArray(p.Value)?p.Value[0]:p.Value)}return m.length>33?m.slice(0,30)+"...":m},c=d=>{let m=a("items.untitled");return d.Name&&(m=d.Name),m.length>33?m.slice(0,30)+"...":m};return l.jsx("li",{children:l.jsxs("button",{onClick:()=>i(`/items/${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:[l.jsx("div",{className:"w-8 h-8 mr-2 flex-shrink-0",children:l.jsx(KI,{item:n,className:"w-8 h-8"})}),l.jsxs("div",{className:"text-left flex-1",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:e&&n.FolderPath?l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"text-gray-500 dark:text-gray-400 text-sm",children:[n.FolderPath," > "]}),c(n)]}):c(n)}),n.HasPasskey&&l.jsx("svg",{className:"w-3.5 h-3.5 text-gray-500 dark:text-gray-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-label":"Has passkey",children:l.jsx("path",{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"})}),n.HasAttachment&&l.jsx("svg",{className:"w-3.5 h-3.5 text-gray-500 dark:text-gray-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-label":"Has attachments",children:l.jsx("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"})}),n.HasTotp&&l.jsx("svg",{className:"w-3.5 h-3.5 text-gray-500 dark:text-gray-400",viewBox:"0 -960 960 960",fill:"currentColor","aria-label":"Has 2FA",children:l.jsx("path",{d:"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm100-200h46v-240h-36l-70 50 24 36 36-26v180Zm124 0h156v-40h-94l-2-2q21-20 34.5-34t21.5-22q18-18 27-36t9-38q0-29-22-48.5T458-600q-26 0-47 15t-29 39l40 16q5-13 14.5-20.5T458-558q15 0 24.5 8t9.5 20q0 11-4 20.5T470-486l-32 32-54 54v40Zm296 0q36 0 58-20t22-52q0-18-10-32t-28-22v-2q14-8 22-20.5t8-29.5q0-27-21-44.5T678-600q-25 0-46.5 14.5T604-550l40 16q4-12 13-19t21-7q13 0 21.5 7.5T708-534q0 14-10 22t-26 8h-18v40h20q20 0 31 8t11 22q0 13-11 22.5t-25 9.5q-17 0-26-7.5T638-436l-40 16q7 29 28.5 44.5T680-360ZM160-240h640v-480H160v480Zm0 0v-480 480Z"})})]}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s(n)})]})]})})},po="items-filter",hM=5*60*1e3,AM=[{value:"OldestFirst",labelKey:"items.sort.oldestFirst"},{value:"NewestFirst",labelKey:"items.sort.newestFirst"},{value:"Alphabetical",labelKey:"items.sort.alphabetical"}],pM=()=>{try{const n=localStorage.getItem(po);if(!n)return"all";const{filter:e,timestamp:a}=JSON.parse(n);return Date.now()-a>hM?(localStorage.removeItem(po),"all"):e}catch{return"all"}},Lu=n=>{try{localStorage.setItem(po,JSON.stringify({filter:n,timestamp:Date.now()}))}catch{}},Ru=n=>Object.values(fa).includes(n),KE=()=>{const{t:n}=Ze(),{folderId:e}=cd(),a=qa(),i=Kt(),s=mr(),c=Ba(),{syncVault:d}=Dh(),{executeVaultMutationAsync:m}=Ss(),{setHeaderButtons:f}=gr(),[g,E]=I.useState([]),[p,C]=I.useState(""),[N,x]=I.useState(pM()),[S,T]=I.useState(!1),[k,U]=I.useState(!1),[R,P]=I.useState(!1),[M,j]=I.useState(!1),[Q,H]=I.useState(0),[V,G]=I.useState(0),[K,$]=I.useState("OldestFirst"),[J,re]=I.useState(!1),[Ae,X]=I.useState(!0),{setIsInitialLoading:ie}=Aa();I.useEffect(()=>{bt.getShowFolders().then(X)},[]);const ce=e??null,ye=I.useMemo(()=>{if(!ce||!(i!=null&&i.sqliteClient))return null;const De=i.sqliteClient.folders.getAll().find(je=>je.Id===ce);return(De==null?void 0:De.Name)??null},[ce,i==null?void 0:i.sqliteClient,V]),[_,q]=nc(!0,100);I.useEffect(()=>{const se=a.state;se!=null&&se.resetFilters&&(C(""),x("all"),localStorage.removeItem(po),c(a.pathname,{replace:!0,state:{}}))},[a.state,a.pathname,c]);const ee=I.useCallback(()=>{const se=new URLSearchParams;Ru(N)&&se.set("type",N),ce&&se.set("folderId",ce);const De=se.toString();c(De?`/items/add?${De}`:"/items/add")},[c,N,ce]),ne=I.useCallback(()=>{U(!0)},[]),Ie=I.useCallback(async se=>{if(!(i!=null&&i.sqliteClient)){console.error("[FOLDER DEBUG] No sqliteClient available");return}await m(async()=>{await i.sqliteClient.folders.create(se,ce)});const De=i.sqliteClient.items.getAll();E(De)},[i,ce,m]),we=I.useCallback(async()=>{if(!(i!=null&&i.sqliteClient)||!ce)return;await m(async()=>{await i.sqliteClient.folders.delete(ce)});const se=i.sqliteClient.items.getAll();E(se);const De=i.sqliteClient.items.getRecentlyDeletedCount();H(De),c("/items")},[i,ce,m,c]),Re=I.useCallback(async()=>{if(!(i!=null&&i.sqliteClient)||!ce)return;await m(async()=>{await i.sqliteClient.folders.deleteWithContents(ce)});const se=i.sqliteClient.items.getAll();E(se);const De=i.sqliteClient.items.getRecentlyDeletedCount();H(De),c("/items")},[i,ce,m,c]),Be=I.useCallback(async se=>{!(i!=null&&i.sqliteClient)||!ce||(await m(async()=>{await i.sqliteClient.folders.update(ce,se)}),G(De=>De+1),j(!1))},[i,ce,m]),xe=I.useCallback(async()=>{if(i!=null&&i.sqliteClient)try{await d({onSuccess:async se=>{},onOffline:()=>{},onError:async se=>{console.error("Error syncing vault:",se)}})}catch(se){console.error("Error refreshing items:",se),await s.logout("Error while syncing vault, please re-authenticate.")}},[i,s,d]),ze=I.useCallback(async()=>{q(!0),await xe(),q(!1)},[xe,q]);I.useEffect(()=>{const se=l.jsxs("div",{className:"flex items-center gap-2",children:[!Ta.isPopup()&&l.jsx(xn,{onClick:()=>Ta.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Pa.EXPAND}),l.jsx(xn,{onClick:ee,title:n("items.addNewItem"),iconType:Pa.PLUS})]});return f(se),()=>f(null)},[f,ee,n]),I.useEffect(()=>{(async()=>{var De,je,Qe;if(i!=null&&i.sqliteClient){q(!0);const Ye=((De=i.sqliteClient)==null?void 0:De.items.getAll())??[];E(Ye);const ut=((je=i.sqliteClient)==null?void 0:je.items.getRecentlyDeletedCount())??0;H(ut);const Mt=((Qe=i.sqliteClient)==null?void 0:Qe.settings.getCredentialsSortOrder())??"OldestFirst";$(Mt),q(!1),ie(!1)}})()},[i==null?void 0:i.sqliteClient,q,ie]);const At=()=>{if(ce&&ye)return ye;switch(N){case"passkeys":return n("items.filters.passkeys");case"attachments":return n("common.attachments");case"all":return n("items.title");default:if(Ru(N)){const se=ad.find(De=>De.type===N);if(se)return n(se.titleKey)}return n("items.title")}},Lt=I.useCallback((se,De)=>{C(""),c(`/items/folder/${se}`)},[c]),Ut=()=>{if(ce||p)return[];if(!(i!=null&&i.sqliteClient))return[];const se=i.sqliteClient.folders.getAll(),De=new Map;return g.forEach(Qe=>{Qe.FolderId&&De.set(Qe.FolderId,(De.get(Qe.FolderId)||0)+1)}),se.map(Qe=>({id:Qe.Id,name:Qe.Name,itemCount:De.get(Qe.Id)||0})).sort((Qe,Ye)=>Qe.name.localeCompare(Ye.name))},et=g.filter(se=>{var ut,Mt;if(ce!==null){if(se.FolderId!==ce)return!1}else if(!p&&Ae&&se.FolderId)return!1;let De=!0;if(N==="passkeys"?De=se.HasPasskey===!0:N==="attachments"?De=se.HasAttachment===!0:Ru(N)&&(De=se.ItemType===N),!De)return!1;const je=p.toLowerCase().trim();return!!(!je||(((ut=se.Name)==null?void 0:ut.toLowerCase())||"").includes(je)||((Mt=se.Fields)==null?void 0:Mt.some(jt=>(Array.isArray(jt.Value)?jt.Value.join(" ").toLowerCase():(jt.Value||"").toLowerCase()).includes(je)||jt.Label.toLowerCase().includes(je))))}),nt=I.useMemo(()=>{const se=[...et];switch(K){case"NewestFirst":return se.sort((De,je)=>new Date(je.CreatedAt||0).getTime()-new Date(De.CreatedAt||0).getTime());case"Alphabetical":return se.sort((De,je)=>(De.Name||"").localeCompare(je.Name||""));case"OldestFirst":default:return se.sort((De,je)=>new Date(De.CreatedAt||0).getTime()-new Date(je.CreatedAt||0).getTime())}},[et,K]),Pt=Ut(),Ne=g.length>0&&g.every(se=>se.FolderId!==null);return _?l.jsx("div",{className:"flex justify-center items-center p-8",children:l.jsx(er,{})}):l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center gap-2 mb-4",children:[l.jsxs("div",{className:"relative min-w-0 flex-1 flex items-center gap-2",children:[l.jsxs("button",{onClick:()=>T(!S),className:"flex items-center gap-1 text-gray-900 dark:text-white text-xl hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none min-w-0",children:[l.jsxs("h2",{className:"flex items-baseline gap-1.5 min-w-0 overflow-hidden",children:[l.jsx("span",{className:"truncate",children:At()}),l.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400 shrink-0",children:["(",et.length,")"]})]}),l.jsx("svg",{className:"w-4 h-4 mt-1 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),ce&&l.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[l.jsx("button",{onClick:()=>j(!0),title:n("items.editFolder"),className:"p-1.5 text-gray-400 hover:text-orange-500 dark:text-gray-500 dark:hover:text-orange-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:l.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})}),l.jsx("button",{onClick:()=>P(!0),title:n("items.deleteFolder"),className:"p-1.5 text-gray-400 hover:text-red-500 dark:text-gray-500 dark:hover:text-red-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:l.jsxs("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[l.jsx("polyline",{points:"3 6 5 6 21 6"}),l.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]}),S&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>{T(!1)}}),l.jsx("div",{className:"absolute left-0 top-full mt-1 w-72 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-xl ring-1 ring-black/5 dark:ring-white/10 z-20",children:l.jsxs("div",{className:"py-1",children:[l.jsxs("div",{className:"relative",children:[l.jsx("button",{onClick:()=>{const se="all";x(se),Lu(se),T(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${N==="all"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:n("items.title")}),!ce&&l.jsxs("button",{onClick:se=>{se.stopPropagation();const De=!Ae;X(De),bt.setShowFolders(De),T(!1)},className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1.5 px-2 py-1 text-xs text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 rounded hover:bg-gray-200 dark:hover:bg-gray-600",children:[l.jsx("span",{children:n("items.filters.folders")}),l.jsxs("svg",{className:`w-5 h-5 ${Ae?"text-orange-500 dark:text-orange-400":"text-gray-400 dark:text-gray-500"}`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),Ae&&l.jsx("polyline",{points:"7 12 10 15 17 8"})]})]})]}),l.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),ad.map(se=>l.jsxs("button",{onClick:()=>{const De=se.type;x(De),Lu(De),T(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2 ${N===se.type?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:[l.jsx("span",{className:N===se.type?"text-orange-500 dark:text-orange-400":"text-gray-400 dark:text-gray-500",children:se.iconSvg}),n(se.titleKey)]},se.type)),l.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),l.jsx("button",{onClick:()=>{const se="passkeys";x(se),Lu(se),T(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${N==="passkeys"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:n("items.filters.passkeys")}),l.jsx("button",{onClick:()=>{const se="attachments";x(se),Lu(se),T(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${N==="attachments"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:n("common.attachments")}),l.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),l.jsxs("button",{onClick:()=>{T(!1),c("/items/deleted")},className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300 flex items-center justify-between",children:[l.jsx("span",{children:n("recentlyDeleted.title")}),Q>0&&l.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:Q})]})]})})]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs("div",{className:"relative",children:[l.jsx("button",{onClick:()=>re(!J),className:"p-1.5 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",title:n("items.sort.title"),children:l.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"4",y1:"6",x2:"16",y2:"6"}),l.jsx("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),l.jsx("line",{x1:"4",y1:"18",x2:"8",y2:"18"}),l.jsx("polyline",{points:"15 15 18 18 21 15"}),l.jsx("line",{x1:"18",y1:"12",x2:"18",y2:"18"})]})}),J&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>re(!1)}),l.jsx("div",{className:"absolute right-0 top-full mt-1 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-xl ring-1 ring-black/5 dark:ring-white/10 z-20",children:l.jsx("div",{className:"py-1",children:AM.map(se=>l.jsxs("button",{onClick:async()=>{$(se.value),re(!1),await m(async()=>{var De;(De=i.sqliteClient)==null||De.settings.setCredentialsSortOrder(se.value)})},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2 ${K===se.value?"text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:[K===se.value?l.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"20 6 9 17 4 12"})}):l.jsx("span",{className:"w-4"}),l.jsx("span",{children:n(se.labelKey)})]},se.value))})})]})]}),l.jsx(nh,{onClick:ze})]})]}),g.length>0?l.jsx("div",{className:"mb-4",children:l.jsx("input",{type:"text",value:p,onChange:se=>C(se.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"})}):l.jsx(l.Fragment,{}),g.length===0?l.jsx(l.Fragment,{children:l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:[l.jsx("p",{children:n("items.welcomeTitle")}),l.jsx("p",{children:n("items.welcomeDescription")})]})}):et.length===0&&Pt.length===0&&!Ne?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-3 mb-10",children:[(N!=="all"||p)&&l.jsxs(l.Fragment,{children:[l.jsx("p",{children:p&&N!=="all"?n("items.noMatchingItemsWithFilter",{filter:At(),search:p}):p?n("items.noMatchingItemsSearch",{search:p}):N==="passkeys"?n("items.noPasskeysFound"):N==="attachments"?n("items.noAttachmentsFound"):Ru(N)?n("items.noItemsOfTypeFound",{type:At()}):n("items.noMatchingItems")}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[p&&l.jsxs("button",{onClick:()=>C(""),className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-300 rounded-lg transition-colors",children:[l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),n("items.clearSearch")]}),N!=="all"&&l.jsxs("button",{onClick:()=>{x("all"),localStorage.removeItem(po)},className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-orange-100 dark:bg-orange-900/30 hover:bg-orange-200 dark:hover:bg-orange-900/50 text-orange-700 dark:text-orange-300 rounded-lg transition-colors",children:[l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),n("items.clearFilter")]})]})]}),ce&&l.jsx("p",{className:"text-sm",children:n("items.emptyFolderHint")})]}):Ne&&et.length===0&&!ce&&!p?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[Pt.map(se=>l.jsx(GE,{folder:se,onClick:()=>Lt(se.id,se.name)},se.id)),l.jsxs("button",{onClick:ne,className:"inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded-full transition-colors focus:outline-none text-gray-500 dark:text-gray-400 hover:text-orange-600 dark:hover:text-orange-400 hover:bg-gray-100 dark:hover:bg-gray-700/50",children:[l.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),l.jsxs("svg",{className:"w-3 h-3 -ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[l.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),l.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})]})]}),l.jsx("div",{className:"text-gray-500 dark:text-gray-400 text-sm",children:l.jsx("p",{children:n("items.allItemsInFolders")})})]}):l.jsxs(l.Fragment,{children:[!ce&&!p&&Ae&&l.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[Pt.map(se=>l.jsx(GE,{folder:se,onClick:()=>Lt(se.id,se.name)},se.id)),l.jsxs("button",{onClick:ne,className:`inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded-full transition-colors focus:outline-none ${Pt.length>0?"text-gray-500 dark:text-gray-400 hover:text-orange-600 dark:hover:text-orange-400 hover:bg-gray-100 dark:hover:bg-gray-700/50":"text-gray-400 dark:text-gray-500 border border-dashed border-gray-300 dark:border-gray-600 hover:border-orange-400 dark:hover:border-orange-500 hover:text-orange-600 dark:hover:text-orange-400"}`,children:[l.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),l.jsxs("svg",{className:"w-3 h-3 -ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[l.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),l.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),Pt.length===0&&l.jsx("span",{children:n("items.newFolder")})]})]}),nt.length>0&&l.jsx("ul",{id:"items-list",className:"space-y-2",children:nt.map(se=>l.jsx(fM,{item:se,showFolderPath:!!p&&!!se.FolderPath},se.Id))}),(N!=="all"||p)&&l.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mt-4 pt-4",children:[p&&l.jsxs("button",{onClick:()=>C(""),className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-300 rounded-lg transition-colors",children:[l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),n("items.clearSearch")]}),N!=="all"&&l.jsxs("button",{onClick:()=>{x("all"),localStorage.removeItem(po)},className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-orange-100 dark:bg-orange-900/30 hover:bg-orange-200 dark:hover:bg-orange-900/50 text-orange-700 dark:text-orange-300 rounded-lg transition-colors",children:[l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),n("items.clearFilter")]})]})]}),l.jsx(VE,{isOpen:k,onClose:()=>U(!1),onSave:Ie,mode:"create"}),l.jsx(VE,{isOpen:M,onClose:()=>j(!1),onSave:Be,initialName:ye||"",mode:"edit"}),l.jsx(gM,{isOpen:R,onClose:()=>P(!1),onDeleteFolderOnly:we,onDeleteFolderAndContents:Re,itemCount:et.length})]})},qE=[{type:"Login",titleKey:"itemTypes.login.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.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"})})},{type:"Alias",titleKey:"itemTypes.alias.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})},{type:"CreditCard",titleKey:"itemTypes.creditCard.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})})},{type:"Note",titleKey:"itemTypes.note.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})})}],yM=()=>{const{t:n}=Ze(),e=Ba(),{setIsInitialLoading:a}=Aa(),[i,s]=I.useState(""),[c,d]=I.useState("Login"),[m,f]=I.useState(!1);I.useEffect(()=>{a(!1)},[a]);const g=I.useCallback(()=>{const C=new URLSearchParams;C.set("type",c),i.trim()&&C.set("name",i.trim()),e(`/items/add?${C.toString()}`)},[c,i,e]),E=I.useCallback(C=>{d(C),f(!1)},[]),p=qE.find(C=>C.type===c);return l.jsxs("div",{className:"p-4 space-y-6",children:[l.jsx("div",{children:l.jsx(md,{id:"itemName",label:n("common.serviceName"),value:i,onChange:s,type:"text",placeholder:n("common.serviceName")})}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:n("itemTypes.typeLabel")}),l.jsxs("div",{className:"relative",children:[l.jsxs("button",{type:"button",onClick:()=>f(!m),className:"w-full px-4 py-3 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-primary-600 dark:text-primary-400",children:p==null?void 0:p.iconSvg}),l.jsx("span",{className:"font-medium",children:p?n(p.titleKey):""})]}),l.jsx("svg",{className:`w-5 h-5 text-gray-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>f(!1)}),l.jsx("div",{className:"absolute z-20 mt-1 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-md shadow-lg",children:qE.map(C=>l.jsxs("button",{type:"button",onClick:()=>E(C.type),className:`w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 border-b border-gray-100 dark:border-gray-700 last:border-b-0 ${c===C.type?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300":"text-gray-900 dark:text-white"}`,children:[l.jsx("span",{className:c===C.type?"text-primary-600 dark:text-primary-400":"text-gray-500 dark:text-gray-400",children:C.iconSvg}),l.jsx("span",{className:"font-medium",children:n(C.titleKey)}),c===C.type&&l.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.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"})})]},C.type))})]})]})]}),l.jsx("button",{type:"button",onClick:g,className:"w-full px-4 py-3 bg-primary-600 text-white rounded-md hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 font-medium",children:n("common.next")})]})},WE=({isOpen:n,onClose:e,onConfirm:a,title:i,message:s,confirmText:c})=>{const{t:d}=Ze();return l.jsx(tr,{isOpen:n,onClose:e,title:i,maxWidth:"max-w-sm",footer:l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx("button",{onClick:e,className:"px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded",children:d("common.cancel")}),l.jsx("button",{onClick:a,className:"px-4 py-2 text-sm bg-red-600 text-white rounded hover:bg-red-700",children:c})]}),children:l.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:s})})},EM=(n,e=30)=>{const a=new Date(n),i=new Date(a.getTime()+e*24*60*60*1e3),s=new Date,c=Math.ceil((i.getTime()-s.getTime())/(24*60*60*1e3));return Math.max(0,c)},bM=()=>{const{t:n}=Ze(),e=Kt(),{executeVaultMutationAsync:a}=Ss(),{setHeaderButtons:i}=gr(),[s,c]=I.useState([]),[d,m]=I.useState(null),[f,g]=I.useState(!1),[E,p]=I.useState(!1),[C,N]=nc(!0,100),x=I.useCallback(()=>{if(e!=null&&e.sqliteClient){const R=e.sqliteClient.items.getRecentlyDeleted();c(R)}},[e==null?void 0:e.sqliteClient]),S=I.useCallback(async R=>{e!=null&&e.sqliteClient&&(await a(async()=>{await e.sqliteClient.items.restore(R)}),x())},[e==null?void 0:e.sqliteClient,a,x]),T=I.useCallback(async()=>{!(e!=null&&e.sqliteClient)||!d||(await a(async()=>{await e.sqliteClient.items.permanentlyDelete(d)}),x(),g(!1),m(null))},[e==null?void 0:e.sqliteClient,a,x,d]),k=I.useCallback(async()=>{e!=null&&e.sqliteClient&&(await a(async()=>{for(const R of s)await e.sqliteClient.items.permanentlyDelete(R.Id)}),x(),p(!1))},[e==null?void 0:e.sqliteClient,a,s,x]);I.useEffect(()=>(i(null),()=>i(null)),[i]),I.useEffect(()=>{(async()=>{e!=null&&e.sqliteClient&&(N(!0),x(),N(!1))})()},[e==null?void 0:e.sqliteClient,N,x]);const U=I.useCallback(()=>{g(!1),m(null)},[]);return C?l.jsx("div",{className:"flex justify-center items-center p-8",children:l.jsx(er,{})}):l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsxs("h2",{className:"flex items-baseline gap-1.5 text-gray-900 dark:text-white text-xl",children:[n("recentlyDeleted.title"),l.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["(",s.length,")"]})]}),s.length>0&&l.jsx("button",{onClick:()=>p(!0),className:"text-sm text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300",children:n("recentlyDeleted.emptyAll")})]}),s.length===0?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:[l.jsx("p",{children:n("recentlyDeleted.noItems")}),l.jsx("p",{className:"text-sm",children:n("recentlyDeleted.noItemsDescription")})]}):l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-4",children:n("recentlyDeleted.description")}),l.jsx("ul",{className:"space-y-2",children:s.map(R=>{const P=R.DeletedAt,M=P?EM(P):30;return l.jsx("li",{className:"relative",children:l.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[R.Logo&&l.jsx("img",{src:`data:image/png;base64,${btoa(String.fromCharCode(...R.Logo))}`,alt:"",className:"w-6 h-6 rounded"}),l.jsx("span",{className:"font-medium text-gray-900 dark:text-white truncate",children:R.Name||n("items.untitled")})]}),l.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:M>0?n("recentlyDeleted.daysRemaining",{count:M}):l.jsx("span",{className:"text-red-500",children:n("recentlyDeleted.expiringSoon")})})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:()=>S(R.Id),className:"px-3 py-1 text-sm bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 rounded hover:bg-green-200 dark:hover:bg-green-900/50",children:n("recentlyDeleted.restore")}),l.jsx("button",{onClick:()=>{m(R.Id),g(!0)},className:"px-3 py-1 text-sm bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400 rounded hover:bg-red-200 dark:hover:bg-red-900/50",children:n("common.delete")})]})]})})},R.Id)})})]}),l.jsx(WE,{isOpen:f&&!!d,onClose:U,onConfirm:T,title:n("recentlyDeleted.confirmDeleteTitle"),message:n("recentlyDeleted.confirmDeleteMessage"),confirmText:n("recentlyDeleted.deletePermanently")}),l.jsx(WE,{isOpen:E,onClose:()=>p(!1),onConfirm:k,title:n("recentlyDeleted.confirmEmptyAllTitle"),message:n("recentlyDeleted.confirmEmptyAllMessage",{count:s.length}),confirmText:n("recentlyDeleted.emptyAll")})]})},qI=({isOpen:n,origin:e,onChoice:a,onCancel:i})=>{const{t:s}=Ze();return l.jsxs(tr,{isOpen:n,onClose:i,title:s("passkeys.useBrowserPasskey"),showCloseButton:!0,children:[l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:s("passkeys.bypass.description",{origin:e})}),l.jsxs("div",{className:"space-y-3",children:[l.jsx(ya,{variant:"primary",onClick:()=>a("once"),children:s("passkeys.bypass.thisTimeOnly")}),l.jsx(ya,{variant:"secondary",onClick:()=>a("always"),children:s("passkeys.bypass.alwaysForSite")}),l.jsx(ya,{variant:"secondary",onClick:i,children:s("common.cancel")})]})]})};function WI(n={}){const{enabled:e=!0}=n,a=qa(),i=Ba(),{dbInitialized:s,dbAvailable:c}=Kt();return I.useEffect(()=>{if(!(!e||!s)&&!c){const d=`${a.pathname}${a.search}`;bt.setPendingRedirectUrl(d),i("/unlock")}},[e,s,c,a,i]),{isLocked:s&&!c}}async function IM(){const n=await bt.getPendingRedirectUrl();return n&&await bt.setPendingRedirectUrl(null),n}async function vM(){await bt.setPendingRedirectUrl(null)}var YI=(n=>(n.DEFAULT="default",n.URL_EXACT="url_exact",n.URL_SUBDOMAIN="url_subdomain",n))(YI||{});let Uf=null;async function Ph(){return Uf||(Uf=(async()=>{const n=No.runtime.getURL("src/aliasvault_core_bg.wasm"),e=await(await fetch(n)).arrayBuffer();await Lh(e)})()),Uf}function NM(n,e){var i;const a=(i=n.Fields)==null?void 0:i.find(s=>s.FieldKey===e);return a?Array.isArray(a.Value)?a.Value.filter(s=>s&&s.length>0):a.Value?[a.Value]:[]:[]}async function CM(n,e,a,i="default"){await Ph();const s=n.map(d=>({Id:d.Id,ItemName:d.Name??"",ItemUrls:NM(d,en.LoginUrl)}));return nR({credentials:s,current_url:e,page_title:a,matching_mode:i}).matched_ids.map(d=>n.find(m=>m.Id===d)).filter(d=>d!==void 0)}async function Hh(n){return await Ph(),tR(n)}async function zh(n){return await Ph(),aR(n)}const We=class We{constructor(){}static async createPasskey(e,a,i){var re,Ae,X,ie,ce;We.pickSupportedAlgorithm(a.publicKey.pubKeyCredParams);const s=((re=a.publicKey.rp)==null?void 0:re.id)||new URL(a.origin).hostname,c=new Uint8Array(await crypto.subtle.digest("SHA-256",We.te(s))),d=await crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"]),m=await crypto.subtle.exportKey("jwk",d.publicKey),f=await crypto.subtle.exportKey("jwk",d.privateKey),g=We.toB64u(e),E=We.buildCoseEc2Es256(m);let p=65;const C=(Ae=a.publicKey.authenticatorSelection)==null?void 0:Ae.userVerification,N=!!(i!=null&&i.uvPerformed);(C==="required"||C==="preferred"&&N)&&(p|=4),p|=8,p|=16;const x=new Uint8Array([0,0,0,0]),S=new Uint8Array([e.length>>8&255,e.length&255]),T=We.concat(We.AAGUID,S,e,E),k=We.concat(c,new Uint8Array([p]),x,T),R={type:"webauthn.create",challenge:We.challengeToB64u(a.publicKey.challenge),origin:a.origin,crossOrigin:!1},P=JSON.stringify(R),M=We.te(P),j=a.publicKey.attestation||"none",Q=j==="none"||j==="indirect"?We.buildAttObjNone(k):await We.buildAttObjPackedSelf(k,M,d.privateKey);let H=null;(X=a.publicKey.user)!=null&&X.id&&(H=typeof a.publicKey.user.id=="string"?a.publicKey.user.id:We.toB64(a.publicKey.user.id instanceof Uint8Array?a.publicKey.user.id:new Uint8Array(a.publicKey.user.id)));let V,G=!1,K;if(i!=null&&i.enablePrf){const ye=new Uint8Array(32);if(crypto.getRandomValues(ye),V=We.toB64u(ye),G=!0,i!=null&&i.prfInputs){const _=We.fromB64u(i.prfInputs.first);if(K={first:await We.evaluatePrf(ye,_)},i.prfInputs.second){const q=We.fromB64u(i.prfInputs.second);K.second=await We.evaluatePrf(ye,q)}}}const $={rpId:s,credentialId:g,publicKey:m,privateKey:f,userId:H,userName:(ie=a.publicKey.user)==null?void 0:ie.name,userDisplayName:(ce=a.publicKey.user)==null?void 0:ce.displayName,prfSecret:V};return{credential:{id:g,rawId:g,response:{clientDataJSON:We.toB64u(M),attestationObject:We.toB64u(Q)},type:"public-key"},stored:$,prfEnabled:G,prfResults:K}}static async getAssertion(e,a,i){const s=a,c=e.publicKey.rpId||new URL(e.origin).hostname,d=new Uint8Array(await crypto.subtle.digest("SHA-256",We.te(c)));let m=1;const f=e.publicKey.userVerification,g=!!(i!=null&&i.uvPerformed);(f==="required"||f==="preferred"&&g)&&(m|=4),((i==null?void 0:i.includeBEBS)??!0)&&(m|=8,m|=16);const E=new Uint8Array([0,0,0,0]),p=We.concat(d,new Uint8Array([m]),E),N={type:"webauthn.get",challenge:We.challengeToB64u(e.publicKey.challenge),origin:e.origin,crossOrigin:!1},x=JSON.stringify(N),S=We.te(x),T=new Uint8Array(await crypto.subtle.digest("SHA-256",S)),k=We.concat(p,T),U=await crypto.subtle.importKey("jwk",s.privateKey,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]),R=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},U,k)),P=We.ecdsaRawToDer(R);let M=null;s.userId&&(M=s.userId.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""));let j;if(i!=null&&i.prfInputs&&s.prfSecret){const Q=We.fromB64u(s.prfSecret);if(j={first:await We.evaluatePrf(Q,i.prfInputs.first)},i.prfInputs.second){const V=await We.evaluatePrf(Q,i.prfInputs.second);j.second=V}}return{id:s.credentialId,rawId:s.credentialId,clientDataJSON:We.toB64u(S),authenticatorData:We.toB64u(p),signature:We.toB64u(P),userHandle:M,prfResults:j}}static async evaluatePrf(e,a){const i=a instanceof Uint8Array?a:new Uint8Array(a),s=We.te("WebAuthn PRF\0"),c=We.concat(s,i),d=await crypto.subtle.digest("SHA-256",c),m=await crypto.subtle.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return await crypto.subtle.sign("HMAC",m,d)}static pickSupportedAlgorithm(e){if(!e||e.length===0)return-7;if(!e.some(i=>i.type==="public-key"&&i.alg===-7))throw new Error("No supported algorithm (ES256) in pubKeyCredParams");return-7}static buildCoseEc2Es256(e){const a=We.pad32(We.fromB64u(e.x)),i=We.pad32(We.fromB64u(e.y));return new Uint8Array([165,1,2,3,38,32,1,33,88,32,...a,34,88,32,...i])}static buildAttObjNone(e){const a=We.cborText("fmt"),i=We.cborText("none"),s=We.cborText("attStmt"),c=new Uint8Array([160]),d=We.cborText("authData"),m=We.cborBstr(e);return We.concat(new Uint8Array([163]),a,i,s,c,d,m)}static async buildAttObjPackedSelf(e,a,i){const s=new Uint8Array(await crypto.subtle.digest("SHA-256",a)),c=We.concat(e,s),d=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},i,c)),m=We.ecdsaRawToDer(d),f=We.concat(We.cborText("alg"),new Uint8Array([38]),We.cborText("sig"),We.cborBstr(m)),g=We.concat(new Uint8Array([162]),f),E=We.cborText("fmt"),p=We.cborText("packed"),C=We.cborText("attStmt"),N=We.cborText("authData"),x=We.cborBstr(e);return We.concat(new Uint8Array([163]),E,p,C,g,N,x)}static cborText(e){const a=We.te(e);return a.length<=23?new Uint8Array([96|a.length,...a]):a.length<=255?new Uint8Array([120,a.length,...a]):new Uint8Array([121,a.length>>8&255,a.length&255,...a])}static cborBstr(e){return e.length<=23?new Uint8Array([64|e.length,...e]):e.length<=255?new Uint8Array([88,e.length,...e]):new Uint8Array([89,e.length>>8&255,e.length&255,...e])}static ecdsaRawToDer(e){if(e.length!==64)throw new Error("Unexpected ECDSA signature length");const a=e.slice(0,32),i=e.slice(32,64),s=We.derInt(a),c=We.derInt(i);return new Uint8Array([48,s.length+c.length,...s,...c])}static derInt(e){let a=0;for(;a<e.length-1&&e[a]===0;)a++;let i=e.slice(a);if((i[0]&128)!==0){const s=new Uint8Array(i.length+1);s[0]=0,s.set(i,1),i=s}return new Uint8Array([2,i.length,...i])}static te(e){return new TextEncoder().encode(e)}static toB64(e){let a="";for(let i=0;i<e.length;i++)a+=String.fromCharCode(e[i]);return btoa(a)}static toB64u(e){return We.toB64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}static fromB64u(e){const a=e.replace(/-/g,"+").replace(/_/g,"/"),i=a.length%4===2?"==":a.length%4===3?"=":"",s=atob(a+i),c=new Uint8Array(s.length);for(let d=0;d<s.length;d++)c[d]=s.charCodeAt(d);return c}static challengeToB64u(e){if(typeof e=="string")return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");const a=e instanceof Uint8Array?e:new Uint8Array(e);return We.toB64u(a)}static pad32(e){if(e.length===32)return e;const a=new Uint8Array(32);return a.set(e,32-e.length),a}static concat(...e){const a=e.reduce((c,d)=>c+d.length,0),i=new Uint8Array(a);let s=0;for(const c of e)i.set(c,s),s+=c.length;return i}};qe(We,"AAGUID",new Uint8Array([161,26,95,170,159,50,75,140,140,93,47,125,19,232,201,66]));let nd=We;class Za{constructor(){}static guidToBytes(e){const a=e.replace(/-/g,"");if(a.length!==32)throw new Error("Invalid GUID format");const i=new Uint8Array(16);for(let s=0;s<16;s++)i[s]=parseInt(a.substr(s*2,2),16);return i}static bytesToGuid(e){if(e.length!==16)throw new Error("Invalid byte length for GUID");const a=Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("");return[a.substr(0,8),a.substr(8,4),a.substr(12,4),a.substr(16,4),a.substr(20)].join("-").toUpperCase()}static bytesToBase64Url(e){let a="";return e.forEach(s=>a+=String.fromCharCode(s)),btoa(a).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}static base64UrlToBytes(e){let i=e.replace(/=+$/,"").replace(/-/g,"+").replace(/_/g,"/");for(;i.length%4;)i+="=";const s=atob(i),c=new Uint8Array(s.length);for(let d=0;d<s.length;d++)c[d]=s.charCodeAt(d);return c}static guidToBase64url(e){return this.bytesToBase64Url(this.guidToBytes(e))}static base64urlToGuid(e){return this.bytesToGuid(this.base64UrlToBytes(e))}static arrayBufferToBase64(e){const a=new Uint8Array(e);let i="";for(let s=0;s<a.length;s++)i+=String.fromCharCode(a[s]);return btoa(i)}static bytesToBase64url(e){const a=e instanceof Uint8Array?e:new Uint8Array(e);return this.bytesToBase64Url(a)}static base64urlToBytes(e){return this.base64UrlToBytes(e)}}const wM=()=>{const{t:n}=Ze(),e=qa(),{setIsInitialLoading:a}=Aa(),i=Kt(),[s,c]=I.useState(null),[d,m]=I.useState(!1),[f,g]=I.useState(null),[E,p]=I.useState([]),[C,N]=I.useState(!1),{isLocked:x}=WI(),S=I.useRef(null);I.useEffect(()=>{(async()=>{if(!i.dbInitialized||x)return;const j=new URLSearchParams(e.search).get("requestId");if(j)try{const Q=await Bt("GET_REQUEST_DATA",{requestId:j},"background");if(Q&&Q.type==="get"){c(Q);const H=Q.publicKey.rpId||new URL(Q.origin).hostname,V=i.sqliteClient.passkeys.getByRpId(H);let G=V;if(Q.publicKey.allowCredentials&&Q.publicKey.allowCredentials.length>0){const K=new Set(Q.publicKey.allowCredentials.map($=>{try{return Za.base64urlToGuid($.id)}catch(J){return console.warn("Failed to convert credential ID to GUID:",$.id,J),null}}).filter($=>$!==null));G=V.filter($=>K.has($.Id))}p(G.map(K=>({id:K.Id,displayName:K.DisplayName,serviceName:K.ServiceName,rpId:K.RpId,username:K.Username})))}}catch(Q){console.error("Failed to fetch request data:",Q),g(n("common.errors.unknownError"))}a(!1)})()},[e,a,i.dbInitialized,x,i.sqliteClient,n]),I.useEffect(()=>{E.length>0&&S.current&&S.current.focus()},[E.length]),I.useEffect(()=>{const P=M=>{M.key==="Enter"&&!d&&E.length>0&&T(E[0].id)};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[d,E]);const T=async P=>{var M,j;if(!(!s||!i.sqliteClient)){m(!0),g(null);try{const Q=i.sqliteClient.passkeys.getById(P);if(!Q)throw new Error(n("common.errors.unknownError"));const H=JSON.parse(Q.PublicKey),V=JSON.parse(Q.PrivateKey);let G;if(Q.PrfKey)try{G=Za.bytesToBase64url(Q.PrfKey)}catch(ce){console.warn("Failed to convert PrfKey to base64url",ce)}let K=null;if(Q.UserHandle)try{const ce=Q.UserHandle instanceof Uint8Array?Q.UserHandle:new Uint8Array(Q.UserHandle);K=Za.bytesToBase64url(ce)}catch(ce){console.warn("Failed to convert UserHandle to base64",ce)}const $={rpId:Q.RpId,credentialId:Za.guidToBase64url(Q.Id),publicKey:H,privateKey:V,userId:K,userName:Q.Username??void 0,userDisplayName:Q.ServiceName??void 0,prfSecret:G},J={origin:s.origin,requestId:s.requestId,publicKey:{rpId:s.publicKey.rpId,challenge:s.publicKey.challenge,userVerification:s.publicKey.userVerification}};let re;if((j=(M=s.publicKey.extensions)==null?void 0:M.prf)!=null&&j.eval){const ce=s.publicKey.extensions.prf.eval.first;let ye;if(typeof ce=="object"&&ce!==null&&!Array.isArray(ce)){const _=Object.keys(ce).map(Number).sort((q,ee)=>q-ee);ye=new Uint8Array(_.length);for(let q=0;q<_.length;q++)ye[q]=ce[q]}else if(typeof ce=="string"){const _=atob(ce);ye=new Uint8Array(_.length);for(let q=0;q<_.length;q++)ye[q]=_.charCodeAt(q)}else throw new Error("Unknown PRF input format");if(re={first:ye},s.publicKey.extensions.prf.eval.second){const _=s.publicKey.extensions.prf.eval.second;let q;if(typeof _=="object"&&_!==null&&!Array.isArray(_)){const ee=Object.keys(_).map(Number).sort((ne,Ie)=>ne-Ie);q=new Uint8Array(ee.length);for(let ne=0;ne<ee.length;ne++)q[ne]=_[ne]}else if(typeof _=="string"){const ee=atob(_);q=new Uint8Array(ee.length);for(let ne=0;ne<ee.length;ne++)q[ne]=ee.charCodeAt(ne)}else throw console.error("[PasskeyAuth] Unknown PRF second input type:",typeof _),new Error("Unknown PRF second input format");re.second=q}}const Ae=await nd.getAssertion(J,$,{uvPerformed:!0,includeBEBS:!0,prfInputs:re});let X;Ae.prfResults&&(X={first:Za.arrayBufferToBase64(Ae.prfResults.first)},Ae.prfResults.second&&(X.second=Za.arrayBufferToBase64(Ae.prfResults.second)));const ie={id:Ae.id,rawId:Ae.rawId,clientDataJSON:Ae.clientDataJSON,authenticatorData:Ae.authenticatorData,signature:Ae.signature,userHandle:Ae.userHandle,prfResults:X};await Bt("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,credential:ie},"background")}catch(Q){console.error("PasskeyAuthenticate: Error during authentication",Q),m(!1),g(n("common.errors.unknownError"))}}},k=async()=>{N(!0)},U=async P=>{if(s){if(P==="always"){const M=new URL(s.origin).hostname,j=await zh(await Hh(M)),Q=await bt.getPasskeyDisabledSites();Q.includes(j)||(Q.push(j),await bt.setPasskeyDisabledSites(Q))}await Bt("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,fallback:!0},"background")}},R=async()=>{s&&await Bt("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,cancelled:!0},"background")};return s?l.jsxs(l.Fragment,{children:[l.jsx(qI,{isOpen:C&&!!s,origin:s?new URL(s.origin).hostname:"",onChoice:U,onCancel:()=>N(!1)}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:n("passkeys.authenticate.title")}),l.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[n("passkeys.authenticate.signInFor")," ",l.jsx("strong",{children:s.origin})]})]}),f&&l.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:l.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:f})}),l.jsx("div",{className:"space-y-4",children:E&&E.length>0?l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:n("passkeys.authenticate.selectPasskey")}),l.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto border rounded-lg p-2 bg-gray-50 dark:bg-gray-800",children:E.map((P,M)=>l.jsxs("div",{ref:M===0?S:null,tabIndex:0,className:"p-3 rounded-lg border cursor-pointer transition-colors bg-white border-gray-200 hover:bg-gray-100 hover:border-gray-300 dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:border-gray-500 focus:outline-none focus:ring-1 focus:ring-primary-500 focus:border-primary-500",onClick:()=>!d&&T(P.id),onKeyDown:j=>{j.key==="Enter"&&!d&&T(P.id)},children:[l.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:P.serviceName}),l.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:l.jsx("span",{className:"truncate",children:P.displayName})})]},P.id))})]}):l.jsx("div",{className:"text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg",children:l.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:n("passkeys.authenticate.noPasskeysFound")})})}),l.jsxs("div",{className:"space-y-3",children:[l.jsx(ya,{variant:"secondary",onClick:k,children:n("passkeys.useBrowserPasskey")}),l.jsx(ya,{variant:"secondary",onClick:R,children:n("common.cancel")})]})]})]}):l.jsx("div",{className:"flex justify-center py-8",children:l.jsx(er,{})})},Mf=({variant:n,children:e,className:a=""})=>{const i={info:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800 text-blue-800 dark:text-blue-200",warning:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800 text-yellow-800 dark:text-yellow-200",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800 text-red-800 dark:text-red-200",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800 text-green-800 dark:text-green-200"};return l.jsx("div",{className:`p-3 border rounded-lg ${i[n]} ${a}`,children:l.jsx("p",{className:"text-sm",children:e})})},xM=()=>{var _,q;const{t:n}=Ze(),e=qa(),{setIsInitialLoading:a}=Aa(),i=Kt(),s=Dr(),{executeVaultMutationAsync:c}=Ss(),[d,m]=I.useState(null),[f,g]=I.useState(""),[E,p]=I.useState(null),{isLocked:C}=WI(),[N,x]=I.useState([]),[S,T]=I.useState([]),[k,U]=I.useState(null),[R,P]=I.useState(null),[M,j]=I.useState(!1),[Q,H]=I.useState(!1),[V,G]=I.useState(!1),K=I.useRef(null),$=I.useRef(null);I.useEffect(()=>{(async()=>{var we,Re,Be,xe,ze,At,Lt,Ut;if(!i.dbInitialized||C)return;const Ie=new URLSearchParams(e.search).get("requestId");if(Ie)try{const et=await Bt("GET_REQUEST_DATA",{requestId:Ie},"background");if(et&&et.type==="create"){m(et);const nt=((Re=(we=et.publicKey)==null?void 0:we.rp)==null?void 0:Re.name)||((xe=(Be=et.publicKey)==null?void 0:Be.rp)==null?void 0:xe.id)||"Passkey";if(g(nt),i.sqliteClient&&((At=(ze=et.publicKey)==null?void 0:ze.rp)!=null&&At.id)){const Pt=i.sqliteClient.passkeys.getByRpId(et.publicKey.rp.id);let Ne=Pt;if(((Lt=et.publicKey.user)!=null&&Lt.id||(Ut=et.publicKey.user)!=null&&Ut.name)&&(Ne=Pt.filter(se=>{var De,je;if((De=et.publicKey.user)!=null&&De.id&&se.UserHandle)try{const Qe=Za.base64urlToBytes(et.publicKey.user.id),Ye=se.UserHandle instanceof Uint8Array?se.UserHandle:new Uint8Array(se.UserHandle);if(Qe.length===Ye.length&&Qe.every((ut,Mt)=>ut===Ye[Mt]))return!0}catch{}return!!((je=et.publicKey.user)!=null&&je.name&&se.Username&&se.Username===et.publicKey.user.name)})),x(Ne),Ne.length===0){const De=i.sqliteClient.items.getAll().filter(Qe=>{const Ye=pu(Qe,en.LoginUsername),ut=pu(Qe,en.LoginPassword);return!Ye&&!ut?!1:!Qe.HasPasskey});let je=[];De.length>0&&(je=await CM(De,et.origin,et.publicKey.rp.name||"",YI.URL_SUBDOMAIN),T(je)),je.length===0&&j(!0)}}}}catch(et){console.error("Failed to fetch request data:",et),p(n("common.errors.unknownError"))}a(!1)})()},[e,a,i.dbInitialized,i.sqliteClient,C,n]),I.useEffect(()=>{M&&$.current?$.current.focus():!M&&N.length>0&&K.current&&K.current.focus()},[M,N.length]),I.useEffect(()=>{const ee=ne=>{ne.key==="Enter"&&!Q&&M&&X()};return window.addEventListener("keydown",ee),()=>window.removeEventListener("keydown",ee)},[M,Q]);const J=()=>{U(null),P(null),j(!0)},re=ee=>{U(ee),P(null),j(!0)},Ae=ee=>{P(ee),U(null),j(!0)},X=async()=>{var ee,ne;if(!(!d||!i.sqliteClient)){p(null);try{let Ie;if(d.origin){H(!0);try{const je=new Promise((ut,Mt)=>setTimeout(()=>Mt(new Error("Favicon extraction timed out")),5e3)),Qe=s.get("Favicon/Extract?url="+d.origin),Ye=await Promise.race([Qe,je]);if(Ye!=null&&Ye.image){const ut=atob(Ye.image),Mt=new Uint8Array(ut.length);for(let jt=0;jt<ut.length;jt++)Mt[jt]=ut.charCodeAt(jt);Ie=Mt}}catch{}}const we={origin:d.origin,requestId:d.requestId,publicKey:{rp:d.publicKey.rp,user:d.publicKey.user,challenge:d.publicKey.challenge,pubKeyCredParams:d.publicKey.pubKeyCredParams,attestation:d.publicKey.attestation,authenticatorSelection:d.publicKey.authenticatorSelection}},Re=crypto.randomUUID().toUpperCase(),Be=Za.guidToBytes(Re),xe=Za.guidToBase64url(Re),ze=(ne=(ee=d.publicKey)==null?void 0:ee.extensions)==null?void 0:ne.prf,At=!!ze,Lt=ze==null?void 0:ze.eval,Ut=await nd.createPasskey(Be,we,{uvPerformed:!0,credentialIdBytes:16,enablePrf:At,prfInputs:Lt}),{credential:et,stored:nt,prfEnabled:Pt,prfResults:Ne}=Ut;await c(async()=>{if(k){const je=i.sqliteClient.passkeys.getById(k);if(je){const Qe=i.sqliteClient.items.getById(je.ItemId);Qe&&await i.sqliteClient.items.update({...Qe,Name:f,Logo:Ie??Qe.Logo,Fields:[...(Qe.Fields||[]).filter(ut=>ut.FieldKey!==en.LoginUrl&&ut.FieldKey!==en.LoginUsername),yu(en.LoginUrl,{value:d.origin}),yu(en.LoginUsername,{value:d.publicKey.user.name})]},[],[]),await i.sqliteClient.passkeys.deleteById(k);let Ye=null;if(nt.userId)try{Ye=Za.base64urlToBytes(nt.userId)}catch{Ye=null}await i.sqliteClient.passkeys.create({Id:Re,ItemId:je.ItemId,RpId:nt.rpId,UserHandle:Ye,PublicKey:JSON.stringify(nt.publicKey),PrivateKey:JSON.stringify(nt.privateKey),DisplayName:d.publicKey.user.displayName||d.publicKey.user.name||"",PrfKey:nt.prfSecret?Za.base64urlToBytes(nt.prfSecret):void 0,AdditionalData:null})}}else if(R){let je=null;if(nt.userId)try{je=Za.base64urlToBytes(nt.userId)}catch{je=null}await i.sqliteClient.passkeys.create({Id:Re,ItemId:R,RpId:nt.rpId,UserHandle:je,PublicKey:JSON.stringify(nt.publicKey),PrivateKey:JSON.stringify(nt.privateKey),DisplayName:d.publicKey.user.displayName||d.publicKey.user.name||"",PrfKey:nt.prfSecret?Za.base64urlToBytes(nt.prfSecret):void 0,AdditionalData:null})}else{const je={Id:"",Name:f,ItemType:fa.Login,Logo:Ie,Fields:[yu(en.LoginUrl,{value:d.origin}),yu(en.LoginUsername,{value:d.publicKey.user.name})],CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString()},Qe=await i.sqliteClient.items.create(je,[]);let Ye=null;if(nt.userId)try{Ye=Za.base64urlToBytes(nt.userId)}catch{Ye=null}await i.sqliteClient.passkeys.create({Id:Re,ItemId:Qe,RpId:nt.rpId,UserHandle:Ye,PublicKey:JSON.stringify(nt.publicKey),PrivateKey:JSON.stringify(nt.privateKey),DisplayName:d.publicKey.user.displayName||d.publicKey.user.name||"",PrfKey:nt.prfSecret?Za.base64urlToBytes(nt.prfSecret):void 0,AdditionalData:null})}});let se;Pt&&(se={prf:{enabled:!0,results:Ne?{first:Za.bytesToBase64url(new Uint8Array(Ne.first)),second:Ne.second?Za.bytesToBase64url(new Uint8Array(Ne.second)):void 0}:void 0}});const De={id:xe,rawId:xe,clientDataJSON:et.response.clientDataJSON,attestationObject:et.response.attestationObject,extensions:se};await Bt("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,credential:De},"background"),H(!1)}catch(Ie){console.error("PasskeyCreate: Error creating passkey",Ie),p(n("common.errors.unknownError"))}}},ie=async()=>{G(!0)},ce=async ee=>{if(d){if(ee==="always"){const ne=new URL(d.origin).hostname,Ie=await zh(await Hh(ne)),we=await bt.getPasskeyDisabledSites();we.includes(Ie)||(we.push(Ie),await bt.setPasskeyDisabledSites(we))}await Bt("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,fallback:!0},"background")}},ye=async()=>{d&&await Bt("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,cancelled:!0},"background")};return d?l.jsxs(l.Fragment,{children:[l.jsx(qI,{isOpen:V&&!!d,origin:d?new URL(d.origin).hostname:"",onChoice:ce,onCancel:()=>G(!1)}),Q&&l.jsx("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:l.jsx(er,{})}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:n("passkeys.create.title")}),l.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[n("passkeys.create.createFor")," ",l.jsx("strong",{children:d.origin})]})]}),E&&l.jsx(Mf,{variant:"error",children:E}),!M&&N.length>0&&l.jsxs("div",{className:"space-y-4",children:[l.jsx(ya,{variant:"primary",onClick:J,ref:K,children:n("passkeys.create.createNewPasskey")}),l.jsx(ya,{variant:"secondary",onClick:ie,children:n("passkeys.useBrowserPasskey")}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),l.jsx("div",{className:"relative flex justify-center text-sm",children:l.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:n("common.or")})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:n("passkeys.create.selectPasskeyToReplace")}),l.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto border rounded-lg p-2 bg-gray-50 dark:bg-gray-800",children:N.map(ee=>l.jsx("button",{onClick:()=>re(ee.Id),className:"w-full p-3 text-left rounded-lg border cursor-pointer transition-colors bg-white border-gray-200 hover:bg-gray-100 hover:border-gray-300 dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:border-gray-500 focus:outline-none focus:ring-1 focus:ring-primary-500 focus:border-primary-500",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:ee.ServiceName}),l.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:l.jsx("span",{className:"truncate",children:ee.DisplayName})})]}),l.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},ee.Id))})]}),l.jsx(ya,{variant:"secondary",onClick:ye,children:n("common.cancel")})]}),!M&&N.length===0&&S.length>0&&l.jsxs("div",{className:"space-y-4",children:[l.jsx(ya,{variant:"primary",onClick:J,ref:K,children:n("passkeys.create.createNewPasskey")}),l.jsx(ya,{variant:"secondary",onClick:ie,children:n("passkeys.useBrowserPasskey")}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),l.jsx("div",{className:"relative flex justify-center text-sm",children:l.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:n("common.or")})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:n("passkeys.create.selectExistingLogin")}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:n("passkeys.create.selectExistingLoginDescription")}),l.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto border rounded-lg p-2 bg-gray-50 dark:bg-gray-800",children:S.map(ee=>l.jsx("button",{onClick:()=>Ae(ee.Id),className:"w-full p-3 text-left rounded-lg border cursor-pointer transition-colors bg-white border-gray-200 hover:bg-gray-100 hover:border-gray-300 dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:border-gray-500 focus:outline-none focus:ring-1 focus:ring-primary-500 focus:border-primary-500",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"flex items-center flex-1 min-w-0",children:l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:ee.Name}),pu(ee,en.LoginUsername)&&l.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:pu(ee,en.LoginUsername)})]})}),l.jsx("svg",{className:"w-5 h-5 text-gray-400 flex-shrink-0 ml-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},ee.Id))})]}),l.jsx(ya,{variant:"secondary",onClick:ye,children:n("common.cancel")})]}),M&&l.jsxs("div",{className:"space-y-4",children:[k&&l.jsx(Mf,{variant:"warning",children:n("passkeys.create.replacingPasskey",{displayName:((_=N.find(ee=>ee.Id===k))==null?void 0:_.DisplayName)||""})}),R&&l.jsx(Mf,{variant:"info",children:n("passkeys.create.attachingToCredential",{serviceName:((q=S.find(ee=>ee.Id===R))==null?void 0:q.Name)||""})}),!R&&l.jsx(md,{id:"displayName",label:n("passkeys.create.titleLabel"),value:f,onChange:g,placeholder:n("passkeys.create.titlePlaceholder"),ref:$}),l.jsxs("div",{className:"space-y-3",children:[l.jsx(ya,{variant:"primary",onClick:X,children:n(k?"passkeys.create.confirmReplace":R?"passkeys.create.attachPasskey":"passkeys.create.createButton")}),N.length>0||S.length>0?l.jsx(ya,{variant:"secondary",onClick:()=>{j(!1),U(null),P(null)},children:n("common.back")}):l.jsxs(l.Fragment,{children:[l.jsx(ya,{variant:"secondary",onClick:ie,children:n("passkeys.useBrowserPasskey")}),l.jsx(ya,{variant:"secondary",onClick:ye,children:n("common.cancel")})]})]})]})]})]}):l.jsx("div",{className:"flex justify-center py-8",children:l.jsx(er,{})})},YE="session:lastVisitedPage",JE="session:lastVisitedTime",XE="session:navigationHistory",SM=120*1e3,TM=()=>{const n=Ba(),{setIsInitialLoading:e}=Aa(),{syncVault:a}=Dh(),i=I.useRef(!1),{isInitialized:s,isLoggedIn:c}=mr(),{dbInitialized:d,dbAvailable:m,refreshSyncState:f,hasPendingMigrations:g}=Kt(),E=s&&d,p=E&&(!c||!m),C=I.useCallback(async()=>{const[N,x,S]=await Promise.all([Se.getItem(YE),Se.getItem(JE),Se.getItem(XE)]);if(N&&x&&Date.now()-x<=SM){(S==null?void 0:S.length)>1?(n(S[0].pathname,{replace:!0}),n(N,{replace:!1})):n(N,{replace:!0});return}await Promise.all([Se.removeItem(YE),Se.removeItem(JE),Se.removeItem(XE),Bt("CLEAR_PERSISTED_FORM_VALUES",null,"background")]),n("/items",{replace:!0})},[n]);return I.useEffect(()=>{(async()=>{const S=new URLSearchParams(window.location.search).get("mode")==="inline_unlock",T=await IM();if(!E)return;const k=!i.current;if(p)e(!1),c?m||n("/unlock",{replace:!0}):n("/login",{replace:!0});else if(k){if(i.current=!0,await g()){e(!1),n("/upgrade",{replace:!0});return}e(!1),S?n("/unlock-success",{replace:!0}):T?n(T,{replace:!0}):await C(),a({onSuccess:async U=>{await f()},onUpgradeRequired:()=>{n("/upgrade",{replace:!0})},onError:U=>{console.error("Background vault sync error:",U)}})}else e(!1),C()})()},[E,p,c,m,n,e,a,C,f,g]),null},kM=()=>{const{t:n}=Ze(),{setIsInitialLoading:e}=Aa(),[a,i]=I.useState({disabledUrls:[],temporaryDisabledUrls:{},currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),[s,c]=I.useState(Ol.DEFAULT),d=async()=>{const C={active:!0,currentWindow:!0},[N]=await No.tabs.query(C);return N},m=I.useCallback(async()=>{const C=await d(),N=new URL(C.url??"").hostname,x=await bt.getDisabledSites(),S=await bt.getTemporaryDisabledSites(),T=await bt.getGlobalAutofillPopupEnabled(),k=Date.now(),U=Object.fromEntries(Object.entries(S).filter(([P,M])=>M>k));Object.keys(U).length!==Object.keys(S).length&&await bt.setTemporaryDisabledSites(U);const R=await bt.getAutofillMatchingMode();c(R),i({disabledUrls:x,temporaryDisabledUrls:U,currentUrl:N,isEnabled:!x.includes(N)&&!(N in U),isGloballyEnabled:T}),e(!1)},[e]);I.useEffect(()=>{m()},[m]);const f=async()=>{const{currentUrl:C,disabledUrls:N,temporaryDisabledUrls:x,isEnabled:S}=a;let T=[...N],k={...x};S?(T.includes(C)||T.push(C),delete k[C]):(T=T.filter(U=>U!==C),delete k[C]),await bt.setDisabledSites(T),await bt.setTemporaryDisabledSites(k),i(U=>({...U,disabledUrls:T,temporaryDisabledUrls:k,isEnabled:!S}))},g=async()=>{await bt.setDisabledSites([]),await bt.setTemporaryDisabledSites({}),i(C=>({...C,disabledUrls:[],temporaryDisabledUrls:{},isEnabled:!0}))},E=async()=>{const C=!a.isGloballyEnabled;await bt.setGlobalAutofillPopupEnabled(C),i(N=>({...N,isGloballyEnabled:C}))},p=async C=>{await bt.setAutofillMatchingMode(C),c(C)};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.globalSettings")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.autofillPopup")}),l.jsx("p",{className:`text-sm mt-1 ${a.isGloballyEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:a.isGloballyEnabled?n("settings.activeOnAllSites"):n("settings.disabledOnAllSites")})]}),l.jsx("button",{onClick:E,className:`px-4 py-2 rounded-md transition-colors ${a.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:a.isGloballyEnabled?n("common.enabled"):n("common.disabled")})]})})})]}),a.isGloballyEnabled&&l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.siteSpecificSettings")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"p-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:[n("settings.autofillPopupOn"),a.currentUrl]}),l.jsx("p",{className:`text-sm mt-1 ${a.isEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:a.isEnabled?n("settings.enabledForThisSite"):n("settings.disabledForThisSite")}),!a.isEnabled&&a.temporaryDisabledUrls[a.currentUrl]&&l.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:[n("settings.temporarilyDisabledUntil"),new Date(a.temporaryDisabledUrls[a.currentUrl]).toLocaleTimeString()]})]}),a.isGloballyEnabled&&l.jsx("button",{onClick:f,className:`px-4 py-2 ml-1 rounded-md transition-colors ${a.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:a.isEnabled?n("common.enabled"):n("common.disabled")})]}),l.jsx("div",{className:"mt-4",children:l.jsx("button",{onClick:g,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")})})]})})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.autofillMatching")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.autofillMatchingMode")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.autofillMatchingModeDescription")}),l.jsxs("select",{value:s,onChange:C=>p(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:[l.jsx("option",{value:Ol.DEFAULT,children:n("settings.autofillMatchingDefault")}),l.jsx("option",{value:Ol.URL_SUBDOMAIN,children:n("settings.autofillMatchingUrlSubdomain")}),l.jsx("option",{value:Ol.URL_EXACT,children:n("settings.autofillMatchingUrlExact")})]})]})})})]})]})},JI=({title:n,content:e,className:a=""})=>{const[i,s]=I.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx("button",{onClick:()=>s(!0),className:`${a}`,type:"button","aria-label":"Help",children:l.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:l.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"})})}),l.jsx(tr,{isOpen:i,onClose:()=>s(!1),title:n,children:l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:e})})]})},LM=()=>{const{t:n}=Ze(),{setIsInitialLoading:e}=Aa(),[a,i]=I.useState(0);I.useEffect(()=>{(async()=>{const d=await bt.getAutoLockTimeout();i(d),e(!1)})()},[e]);const s=async c=>{await bt.setAutoLockTimeout(c),await Bt("SET_AUTO_LOCK_TIMEOUT",c,"background"),i(c)};return l.jsx("div",{className:"space-y-6",children:l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.autoLockTimeout")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center mb-2",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.autoLockTimeout")}),l.jsx(JI,{title:n("settings.autoLockTimeout"),content:n("settings.autoLockTimeoutHelp"),className:"ml-2"})]}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.autoLockTimeoutDescription")}),l.jsxs("select",{value:a,onChange:c=>s(Number(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:[l.jsx("option",{value:"0",children:n("settings.autoLockNever")}),l.jsx("option",{value:"15",children:n("settings.autoLock15Seconds")}),l.jsx("option",{value:"60",children:n("settings.autoLock1Minute")}),l.jsx("option",{value:"300",children:n("settings.autoLock5Minutes")}),l.jsx("option",{value:"900",children:n("settings.autoLock15Minutes")}),l.jsx("option",{value:"1800",children:n("settings.autoLock30Minutes")}),l.jsx("option",{value:"3600",children:n("settings.autoLock1Hour")}),l.jsx("option",{value:"14400",children:n("settings.autoLock4Hours")}),l.jsx("option",{value:"28800",children:n("settings.autoLock8Hours")}),l.jsx("option",{value:"86400",children:n("settings.autoLock24Hours")})]})]})})})]})})},RM=()=>{const{t:n}=Ze(),{setIsInitialLoading:e}=Aa(),[a,i]=I.useState(10);I.useEffect(()=>{(async()=>{const d=await bt.getClipboardClearTimeout();i(d),e(!1)})()},[e]);const s=async c=>{await bt.setClipboardClearTimeout(c),await Bt("SET_CLIPBOARD_CLEAR_TIMEOUT",c,"background"),i(c)};return l.jsx("div",{className:"space-y-6",children:l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.clipboardSettings")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.clipboardClearTimeout")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.clipboardClearTimeoutDescription")}),l.jsxs("select",{value:a,onChange:c=>s(Number(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:[l.jsx("option",{value:"0",children:n("settings.clipboardClearDisabled")}),l.jsx("option",{value:"5",children:n("settings.clipboardClear5Seconds")}),l.jsx("option",{value:"10",children:n("settings.clipboardClear10Seconds")}),l.jsx("option",{value:"15",children:n("settings.clipboardClear15Seconds")})]})]})})})]})})},DM=()=>{const{t:n}=Ze(),{setIsInitialLoading:e}=Aa(),[a,i]=I.useState(!0),s=I.useCallback(async()=>{const d=await bt.getGlobalContextMenuEnabled();i(d),e(!1)},[e]);I.useEffect(()=>{s()},[s]);const c=async()=>{const d=!a;await bt.setGlobalContextMenuEnabled(d),await Bt("TOGGLE_CONTEXT_MENU",{enabled:d},"background"),i(d)};return l.jsx("div",{className:"space-y-6",children:l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.contextMenu")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.rightClickContextMenu")}),l.jsx("p",{className:`text-sm mt-1 ${a?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:n(a?"settings.contextMenuEnabled":"settings.contextMenuDisabled")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:n("settings.contextMenuDescription")})]}),l.jsx("button",{onClick:c,className:`px-4 py-2 rounded-md transition-colors ${a?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:n(a?"common.enabled":"common.disabled")})]})})})]})})},BM=()=>{const{t:n}=Ze(),{setIsInitialLoading:e}=Aa(),a=Kt(),{executeVaultMutationAsync:i}=Ss(),[s,c]=I.useState("en"),[d,m]=I.useState("random"),[f,g]=I.useState("random"),[E,p]=I.useState([]),[C,N]=I.useState([]),x=[{label:n("settings.identityGeneratorSettings.genderOptions.random"),value:"random"},{label:n("settings.identityGeneratorSettings.genderOptions.male"),value:"male"},{label:n("settings.identityGeneratorSettings.genderOptions.female"),value:"female"}];I.useEffect(()=>{const U=qU(),R=GU();if(p(U),N(R),a!=null&&a.sqliteClient){const P=a.sqliteClient.settings.getEffectiveIdentityLanguage(),M=a.sqliteClient.settings.getDefaultIdentityGender(),j=a.sqliteClient.settings.getDefaultIdentityAgeRange();c(P),m(M),g(j)}e(!1)},[a==null?void 0:a.sqliteClient,e]);const S=I.useCallback(async U=>{c(U),a!=null&&a.sqliteClient&&await i(async()=>{a.sqliteClient.settings.updateSetting("DefaultIdentityLanguage",U)})},[a==null?void 0:a.sqliteClient,i]),T=I.useCallback(async U=>{m(U),a!=null&&a.sqliteClient&&await i(async()=>{a.sqliteClient.settings.updateSetting("DefaultIdentityGender",U)})},[a==null?void 0:a.sqliteClient,i]),k=I.useCallback(async U=>{g(U),a!=null&&a.sqliteClient&&await i(async()=>{a.sqliteClient.settings.updateSetting("DefaultIdentityAgeRange",U)})},[a==null?void 0:a.sqliteClient,i]);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.identityGeneratorSettings.languageSection")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"p-4",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.identityGeneratorSettings.languageSection")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.identityGeneratorSettings.languageDescription")}),l.jsx("select",{value:s,onChange:U=>S(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:E.map(U=>l.jsxs("option",{value:U.value,children:[U.flag," ",U.label]},U.value))})]})})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.identityGeneratorSettings.genderSection")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"p-4",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.identityGeneratorSettings.genderSection")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.identityGeneratorSettings.genderDescription")}),l.jsx("select",{value:d,onChange:U=>T(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:x.map(U=>l.jsx("option",{value:U.value,children:U.label},U.value))})]})})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.identityGeneratorSettings.ageRangeSection")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"p-4",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.identityGeneratorSettings.ageRangeSection")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.identityGeneratorSettings.ageRangeDescription")}),l.jsx("select",{value:f,onChange:U=>k(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:C.map(U=>l.jsx("option",{value:U.value,children:U.value==="random"?n("settings.identityGeneratorSettings.genderOptions.random"):U.label},U.value))})]})})]})]})},UM=()=>{const{t:n}=Ze(),{setIsInitialLoading:e}=Aa();return I.useEffect(()=>{e(!1)},[e]),l.jsx("div",{className:"space-y-6",children:l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.language")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-3",children:n("settings.selectLanguage")}),l.jsx(yI,{variant:"dropdown",size:"sm"})]})})})]})})},MM=()=>{const{t:n}=Ze(),{setIsInitialLoading:e}=Aa(),[a,i]=I.useState({disabledUrls:[],currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),s=async()=>{const g={active:!0,currentWindow:!0},[E]=await No.tabs.query(g);return E},c=I.useCallback(async()=>{const g=await s(),E=new URL(g.url??"").hostname,p=await zh(await Hh(E)),C=await bt.getPasskeyDisabledSites(),N=await bt.getPasskeyProviderEnabled(),x=!C.includes(p);i({disabledUrls:C,currentUrl:p,isEnabled:x,isGloballyEnabled:N}),e(!1)},[e]);I.useEffect(()=>{c()},[c]);const d=async()=>{const{currentUrl:g,disabledUrls:E,isEnabled:p}=a;let C=[...E];p?C.includes(g)||C.push(g):C=C.filter(N=>N!==g),await bt.setPasskeyDisabledSites(C),i(N=>({...N,disabledUrls:C,isEnabled:!p}))},m=async()=>{await bt.setPasskeyDisabledSites([]),i(g=>({...g,disabledUrls:[],isEnabled:!0}))},f=async()=>{const g=!a.isGloballyEnabled;await bt.setPasskeyProviderEnabled(g),i(E=>({...E,isGloballyEnabled:g}))};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.globalSettings")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("passkeys.settings.passkeyProvider")}),l.jsx("p",{className:`text-sm mt-1 ${a.isGloballyEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:a.isGloballyEnabled?n("settings.activeOnAllSites"):n("settings.disabledOnAllSites")})]}),l.jsx("button",{onClick:f,className:`px-4 py-2 rounded-md transition-colors ${a.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:a.isGloballyEnabled?n("common.enabled"):n("common.disabled")})]})})})]}),a.isGloballyEnabled&&l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.siteSpecificSettings")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"p-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:[n("passkeys.settings.passkeyProviderOn"),a.currentUrl]}),l.jsx("p",{className:`text-sm mt-1 ${a.isEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:a.isEnabled?n("settings.enabledForThisSite"):n("settings.disabledForThisSite")})]}),a.isGloballyEnabled&&l.jsx("button",{onClick:d,className:`px-4 py-2 ml-1 rounded-md transition-colors ${a.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:a.isEnabled?n("common.enabled"):n("common.disabled")})]}),l.jsx("div",{className:"mt-4",children:l.jsx("button",{onClick:m,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")})})]})})]})]})},$E="local:theme",XI=I.createContext(void 0),_M=({children:n})=>{const[e,a]=I.useState("system"),[i,s]=I.useState(!1);I.useEffect(()=>{(async()=>{const E=await d();a(E)})()},[]);const c=I.useCallback(g=>{a(g),m(g)},[]),d=async()=>await Se.getItem($E)||"system",m=async g=>{await Se.setItem($E,g)};I.useEffect(()=>{const g=()=>{if(e==="system"){const E=window.matchMedia("(prefers-color-scheme: dark)").matches;s(E),document.documentElement.classList.toggle("dark",E)}else{const E=e==="dark";s(E),document.documentElement.classList.toggle("dark",E)}};if(g(),e==="system"){const E=window.matchMedia("(prefers-color-scheme: dark)"),p=()=>g();return E.addEventListener("change",p),()=>E.removeEventListener("change",p)}},[e]);const f=I.useMemo(()=>({theme:e,setTheme:c,isDarkMode:i}),[e,i,c]);return l.jsx(XI.Provider,{value:f,children:n})},FM=()=>{const n=I.useContext(XI);if(n===void 0)throw new Error("useTheme must be used within a ThemeProvider");return n},OM=()=>{var K,$;const{t:n}=Ze(),{theme:e,setTheme:a}=FM(),i=mr(),s=ac(),c=Dr(),{setHeaderButtons:d}=gr(),{setIsInitialLoading:m}=Aa(),{loadApiUrl:f,getDisplayUrl:g}=CI(),E=Ba(),[p,C]=I.useState(!1),N=async()=>{const J=await Se.getItem("local:clientUrl");let re=tn.DEFAULT_CLIENT_URL;J&&J.length>0&&(re=J),window.open(re,"_blank")};I.useEffect(()=>{const J=l.jsxs("div",{className:"flex items-center gap-2",children:[!Ta.isPopup()&&l.jsx(l.Fragment,{children:l.jsx(xn,{onClick:()=>Ta.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Pa.EXPAND})}),l.jsx(xn,{onClick:N,title:n("settings.openWebApp"),iconType:Pa.EXTERNAL_LINK})]});return d(J),()=>d(null)},[d,n]);const x=I.useCallback(async()=>{await f(),m(!1)},[m,f]);I.useEffect(()=>{x()},[x]);const S=async J=>{a(J)},T=()=>{C(!0)},k=async()=>{C(!1);try{await c.revokeTokens(),await s.clearAuthUserInitiated()}catch(J){console.error("Error during logout:",J)}},U=async()=>{await Bt("LOCK_VAULT",{},"background"),E("/unlock")},R=()=>{E("/settings/autofill")},P=()=>{E("/settings/clipboard")},M=()=>{E("/settings/language")},j=()=>{E("/settings/auto-lock")},Q=()=>{E("/settings/unlock-method")},H=()=>{E("/settings/context-menu")},V=()=>{E("/settings/passkeys")},G=()=>{E("/settings/identity-generator")};return l.jsxs(l.Fragment,{children:[l.jsx(Rh,{isOpen:p,onClose:()=>C(!1),onConfirm:k}),l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex justify-between items-center mb-4",children:l.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("common.settings")})}),l.jsx("section",{children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:l.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:(($=(K=i.username)==null?void 0:K[0])==null?void 0:$.toUpperCase())||"?"})})}),l.jsxs("div",{children:[l.jsx("p",{className:"text font-medium text-gray-900 dark:text-white",children:i.username}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n("common.loggedIn")})]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:U,title:n("settings.lock"),className:"p-2 bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-600 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 rounded-md transition-colors",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":n("settings.lock"),children:l.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"})})}),l.jsx("button",{onClick:T,title:n("common.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:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":n("common.logout"),children:l.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"})})})]})]})})})}),l.jsx("section",{children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[l.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:[l.jsxs("div",{className:"flex items-center",children:[l.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:l.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"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:n("settings.autofillSettings")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:V,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",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"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:n("settings.passkeySettings")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:Q,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:n("settings.unlockMethod.title")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:j,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.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:l.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"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:n("settings.autoLockTimeout")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:P,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.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:l.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"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:n("settings.clipboardSettings")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:M,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.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:l.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"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:n("settings.language")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})}),l.jsx("section",{children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[l.jsxs("button",{onClick:G,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:n("settings.identityGenerator")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:H,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16m-7 6h7"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:n("settings.contextMenuSettings")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.appearance")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.theme")}),l.jsxs("div",{className:"flex flex-col space-y-2",children:[l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"radio",name:"theme",value:"system",checked:e==="system",onChange:()=>S("system"),className:"mr-2"}),l.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:n("settings.useDefault")})]}),l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"radio",name:"theme",value:"light",checked:e==="light",onChange:()=>S("light"),className:"mr-2"}),l.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:n("settings.light")})]}),l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"radio",name:"theme",value:"dark",checked:e==="dark",onChange:()=>S("dark"),className:"mr-2"}),l.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:n("settings.dark")})]})]})]})})})]}),!1,l.jsxs("div",{className:"text-center text-gray-400 dark:text-gray-600",children:[n("settings.versionPrefix"),tn.VERSION," (",g(),")"]})]})]})},jM=()=>{const{t:n}=Ze(),e=Kt(),{setIsInitialLoading:a,showLoading:i,hideLoading:s}=Aa(),[c,d]=I.useState(void 0),[m,f]=I.useState(null),[g,E]=I.useState(null),[p,C]=I.useState(!1),[N,x]=I.useState(1),[S,T]=I.useState(""),[k,U]=I.useState(""),[R,P]=I.useState(!1),M=I.useCallback(async()=>{try{const[G,K]=await Promise.all([Xb(),Zb()]);d(G),P(K),a(!1)}catch(G){console.error("Failed to load PIN settings:",G),f(n("common.errors.unknownErrorTryAgain")),a(!1)}},[a,n]);I.useEffect(()=>{M()},[M]);const j=()=>{if(f(null),E(null),!e.dbAvailable){f(n("common.errors.unknownErrorTryAgain"));return}x(1),T(""),U(""),C(!0)},Q=G=>{if(G.preventDefault(),f(null),!Ch(S)){f(n("settings.unlockMethod.invalidPinFormat"));return}x(2)},H=async G=>{if(G.preventDefault(),f(null),E(null),S!==k){f(n("settings.unlockMethod.pinMismatch"));return}try{i();const $=await Se.getItem("session:encryptionKey");if(!$){f(n("common.errors.unknownErrorTryAgain")),s();return}await vL(S,$),d(!0),C(!1),x(1),T(""),U(""),E(n("settings.unlockMethod.enableSuccess")),s()}catch(K){console.error("Failed to enable PIN:",K),K instanceof Jl?f(n("settings.unlockMethod.invalidPinFormat")):f(n("common.errors.unknownErrorTryAgain")),s()}},V=async()=>{f(null),E(null);try{i(),await wh(),d(!1),P(!1),s()}catch(G){console.error("Failed to disable PIN:",G),f(n("common.errors.unknownErrorTryAgain")),s()}};return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"flex items-start gap-2",children:l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("settings.unlockMethod.introText")})}),l.jsxs("div",{className:"mt-6",children:[m&&l.jsx(Es,{type:"error",message:m,className:"mb-4"}),g&&l.jsx(Es,{type:"success",message:g,className:"mb-4"}),R&&l.jsx(Es,{type:"warning",message:n("settings.unlockMethod.pinLocked"),className:"mb-4"}),l.jsx("section",{children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.unlockMethod.pin")}),l.jsx(JI,{title:n("common.notice"),content:n("settings.unlockMethod.pinSecurityWarning"),className:"ml-2"})]}),l.jsx("p",{className:"text-sm mt-1 text-gray-600 dark:text-gray-400",children:n("settings.unlockMethod.pinDescription")})]})]}),c!==void 0&&l.jsx("button",{onClick:c&&!R?V:j,className:`px-4 py-2 rounded-md transition-colors ${c&&!R?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:n(c&&!R?"common.enabled":"common.disabled")})]})})})}),l.jsx("section",{className:"mt-4",children:l.jsx("div",{className:"bg-gray-50 dark:bg-gray-700/30 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),l.jsx("div",{children:l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.unlockMethod.password")})})]}),l.jsx("div",{className:"px-4 py-2 rounded-md bg-green-500 text-white hover:bg-green-600 cursor-not-allowed",children:n("common.enabled")})]})})})}),p&&l.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:l.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg p-6 max-w-md w-full mx-4 relative",children:[l.jsx("button",{type:"button",onClick:()=>{C(!1),x(1),T(""),U(""),f(null)},className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 transition-colors","aria-label":"Cancel",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),N===1&&l.jsxs(l.Fragment,{children:[l.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 pr-8",children:n("settings.unlockMethod.setupPin")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:n("settings.unlockMethod.enterNewPinDescription")}),l.jsxs("form",{onSubmit:Q,children:[l.jsx("div",{className:"mb-4",children:l.jsx("input",{type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:S,onChange:G=>T(G.target.value.replace(/\D/g,"")),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-center text-2xl tracking-widest",autoFocus:!0})}),m&&l.jsx(Es,{type:"error",message:m,className:"mb-4"}),l.jsx(ya,{type:"submit",children:n("common.next")})]})]}),N===2&&l.jsxs(l.Fragment,{children:[l.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 pr-8",children:n("settings.unlockMethod.confirmPin")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:n("settings.unlockMethod.confirmPinDescription")}),l.jsxs("form",{onSubmit:H,children:[l.jsx("div",{className:"mb-4",children:l.jsx("input",{type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:k,onChange:G=>U(G.target.value.replace(/\D/g,"")),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-center text-2xl tracking-widest",autoFocus:!0})}),m&&l.jsx(Es,{type:"error",message:m,className:"mb-4"}),l.jsx(ya,{type:"submit",children:n("common.confirm")})]})]})]})})]})]})},PM=({routes:n,isLoading:e,message:a,headerButtons:i})=>{const s=qa(),c=n.find(g=>{const E=g.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${E}$`).test(s.pathname)}),d=(c==null?void 0:c.layout)??"default",m=e&&l.jsx("div",{className:"fixed inset-0 bg-white dark:bg-gray-900 z-50 flex items-center justify-center",children:l.jsx(er,{})}),f=l.jsx(Mb,{children:n.map(g=>l.jsx(hh,{path:g.path,element:g.element},g.path))});switch(d){case"passkey":return l.jsxs(BL,{children:[m,a&&l.jsx("p",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:a}),f]});case"auth":return l.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[m,l.jsx(sI,{routes:n,rightButtons:i}),l.jsxs("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px",height:"100%"},children:[a&&l.jsx("div",{className:"px-4 pt-0",children:l.jsx("p",{className:"text-red-500 dark:text-red-400 text-sm",children:a})}),f]})]});case"default":default:return l.jsxs(l.Fragment,{children:[m,l.jsx(DL,{routes:n,headerButtons:i,message:a,children:f})]})}},HM=()=>{const{t:n}=Ze(),e=mr(),{isInitialLoading:a}=Aa(),[i,s]=nc(!0,150),[c,d]=I.useState(null),{headerButtons:m}=gr(),f=od.useMemo(()=>[{path:"/",element:l.jsx(KR,{}),showBackButton:!1},{path:"/reinitialize",element:l.jsx(TM,{}),showBackButton:!1},{path:"/login",element:l.jsx(hR,{}),showBackButton:!1,layout:"auth"},{path:"/unlock",element:l.jsx(AR,{}),showBackButton:!1,layout:"auth"},{path:"/unlock-success",element:l.jsx(pR,{}),showBackButton:!1},{path:"/upgrade",element:l.jsx(yR,{}),showBackButton:!1},{path:"/auth-settings",element:l.jsx(N2,{}),showBackButton:!0,title:n("common.settings")},{path:"/items",element:l.jsx(KE,{}),showBackButton:!1},{path:"/items/folder/:folderId",element:l.jsx(KE,{}),showBackButton:!0,title:n("items.title")},{path:"/items/select-type",element:l.jsx(yM,{}),showBackButton:!0,title:n("itemTypes.selectType")},{path:"/items/add",element:l.jsx(zE,{}),showBackButton:!0,title:n("items.addItem")},{path:"/items/deleted",element:l.jsx(bM,{}),showBackButton:!0,title:n("recentlyDeleted.title")},{path:"/items/:id",element:l.jsx(mM,{}),showBackButton:!0,title:n("items.itemDetails")},{path:"/items/:id/edit",element:l.jsx(zE,{}),showBackButton:!0,title:n("items.editItem")},{path:"/passkeys/create",element:l.jsx(xM,{}),layout:"passkey"},{path:"/passkeys/authenticate",element:l.jsx(wM,{}),layout:"passkey"},{path:"/emails",element:l.jsx(GR,{}),showBackButton:!1},{path:"/emails/:id",element:l.jsx(VR,{}),showBackButton:!0,title:n("emails.title")},{path:"/settings",element:l.jsx(OM,{}),showBackButton:!1},{path:"/settings/unlock-method",element:l.jsx(jM,{}),showBackButton:!0,title:n("settings.unlockMethod.title")},{path:"/settings/autofill",element:l.jsx(kM,{}),showBackButton:!0,title:n("settings.autofillSettings")},{path:"/settings/context-menu",element:l.jsx(DM,{}),showBackButton:!0,title:n("settings.contextMenuSettings")},{path:"/settings/clipboard",element:l.jsx(RM,{}),showBackButton:!0,title:n("settings.clipboardSettings")},{path:"/settings/language",element:l.jsx(UM,{}),showBackButton:!0,title:n("settings.language")},{path:"/settings/auto-lock",element:l.jsx(LM,{}),showBackButton:!0,title:n("settings.autoLockTimeout")},{path:"/settings/passkeys",element:l.jsx(MM,{}),showBackButton:!0,title:n("settings.passkeySettings")},{path:"/settings/identity-generator",element:l.jsx(BM,{}),showBackButton:!0,title:n("settings.identityGenerator")}],[n]);return I.useEffect(()=>{a||s(!1)},[a,s]),I.useEffect(()=>{Bt("POPUP_HEARTBEAT",{},"background").catch(()=>{});const g=setInterval(()=>{Bt("POPUP_HEARTBEAT",{},"background").catch(()=>{})},5e3);return()=>{clearInterval(g)}},[]),I.useEffect(()=>{window.location.hash&&window.location.hash!=="#/"&&window.location.hash!=="#"||vM()},[]),I.useEffect(()=>{e.globalMessage?d(e.globalMessage):d(null)},[e,e.globalMessage]),l.jsx(Nw,{children:l.jsx(PL,{children:l.jsx(PM,{routes:f,isLoading:i,message:c,headerButtons:m})})})},ht=n=>typeof n=="string",Ml=()=>{let n,e;const a=new Promise((i,s)=>{n=i,e=s});return a.resolve=n,a.reject=e,a},ZE=n=>n==null?"":""+n,zM=(n,e,a)=>{n.forEach(i=>{e[i]&&(a[i]=e[i])})},QM=/###/g,eb=n=>n&&n.indexOf("###")>-1?n.replace(QM,"."):n,tb=n=>!n||ht(n),ql=(n,e,a)=>{const i=ht(e)?e.split("."):e;let s=0;for(;s<i.length-1;){if(tb(n))return{};const c=eb(i[s]);!n[c]&&a&&(n[c]=new a),Object.prototype.hasOwnProperty.call(n,c)?n=n[c]:n={},++s}return tb(n)?{}:{obj:n,k:eb(i[s])}},ab=(n,e,a)=>{const{obj:i,k:s}=ql(n,e,Object);if(i!==void 0||e.length===1){i[s]=a;return}let c=e[e.length-1],d=e.slice(0,e.length-1),m=ql(n,d,Object);for(;m.obj===void 0&&d.length;)c=`${d[d.length-1]}.${c}`,d=d.slice(0,d.length-1),m=ql(n,d,Object),m!=null&&m.obj&&typeof m.obj[`${m.k}.${c}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${c}`]=a},VM=(n,e,a,i)=>{const{obj:s,k:c}=ql(n,e,Object);s[c]=s[c]||[],s[c].push(a)},rd=(n,e)=>{const{obj:a,k:i}=ql(n,e);if(a&&Object.prototype.hasOwnProperty.call(a,i))return a[i]},GM=(n,e,a)=>{const i=rd(n,a);return i!==void 0?i:rd(e,a)},$I=(n,e,a)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in n?ht(n[i])||n[i]instanceof String||ht(e[i])||e[i]instanceof String?a&&(n[i]=e[i]):$I(n[i],e[i],a):n[i]=e[i]);return n},uo=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var KM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const qM=n=>ht(n)?n.replace(/[&<>"'\/]/g,e=>KM[e]):n;class WM{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const a=this.regExpMap.get(e);if(a!==void 0)return a;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const YM=[" ",",","?","!",";"],JM=new WM(20),XM=(n,e,a)=>{e=e||"",a=a||"";const i=YM.filter(d=>e.indexOf(d)<0&&a.indexOf(d)<0);if(i.length===0)return!0;const s=JM.getRegExp(`(${i.map(d=>d==="?"?"\\?":d).join("|")})`);let c=!s.test(n);if(!c){const d=n.indexOf(a);d>0&&!s.test(n.substring(0,d))&&(c=!0)}return c},lh=(n,e,a=".")=>{if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const i=e.split(a);let s=n;for(let c=0;c<i.length;){if(!s||typeof s!="object")return;let d,m="";for(let f=c;f<i.length;++f)if(f!==c&&(m+=a),m+=i[f],d=s[m],d!==void 0){if(["string","number","boolean"].indexOf(typeof d)>-1&&f<i.length-1)continue;c+=f-c+1;break}s=d}return s},Xl=n=>n==null?void 0:n.replace("_","-"),$M={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var a,i;(i=(a=console==null?void 0:console[n])==null?void 0:a.apply)==null||i.call(a,console,e)}};class id{constructor(e,a={}){this.init(e,a)}init(e,a={}){this.prefix=a.prefix||"i18next:",this.logger=e||$M,this.options=a,this.debug=a.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,a,i,s){return s&&!this.debug?null:(ht(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[a](e))}create(e){return new id(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new id(this.logger,e)}}var Lr=new id;class Ad{constructor(){this.observers={}}on(e,a){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(a)||0;this.observers[i].set(a,s+1)}),this}off(e,a){if(this.observers[e]){if(!a){delete this.observers[e];return}this.observers[e].delete(a)}}emit(e,...a){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,c])=>{for(let d=0;d<c;d++)s(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,c])=>{for(let d=0;d<c;d++)s.apply(s,[e,...a])})}}class nb extends Ad{constructor(e,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const a=this.options.ns.indexOf(e);a>-1&&this.options.ns.splice(a,1)}getResource(e,a,i,s={}){var g,E;const c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,d=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;e.indexOf(".")>-1?m=e.split("."):(m=[e,a],i&&(Array.isArray(i)?m.push(...i):ht(i)&&c?m.push(...i.split(c)):m.push(i)));const f=rd(this.data,m);return!f&&!a&&!i&&e.indexOf(".")>-1&&(e=m[0],a=m[1],i=m.slice(2).join(".")),f||!d||!ht(i)?f:lh((E=(g=this.data)==null?void 0:g[e])==null?void 0:E[a],i,c)}addResource(e,a,i,s,c={silent:!1}){const d=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let m=[e,a];i&&(m=m.concat(d?i.split(d):i)),e.indexOf(".")>-1&&(m=e.split("."),s=a,a=m[1]),this.addNamespaces(a),ab(this.data,m,s),c.silent||this.emit("added",e,a,i,s)}addResources(e,a,i,s={silent:!1}){for(const c in i)(ht(i[c])||Array.isArray(i[c]))&&this.addResource(e,a,c,i[c],{silent:!0});s.silent||this.emit("added",e,a,i)}addResourceBundle(e,a,i,s,c,d={silent:!1,skipCopy:!1}){let m=[e,a];e.indexOf(".")>-1&&(m=e.split("."),s=i,i=a,a=m[1]),this.addNamespaces(a);let f=rd(this.data,m)||{};d.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?$I(f,i,c):f={...f,...i},ab(this.data,m,f),d.silent||this.emit("added",e,a,i)}removeResourceBundle(e,a){this.hasResourceBundle(e,a)&&delete this.data[e][a],this.removeNamespaces(a),this.emit("removed",e,a)}hasResourceBundle(e,a){return this.getResource(e,a)!==void 0}getResourceBundle(e,a){return a||(a=this.options.defaultNS),this.getResource(e,a)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const a=this.getDataByLanguage(e);return!!(a&&Object.keys(a)||[]).find(s=>a[s]&&Object.keys(a[s]).length>0)}toJSON(){return this.data}}var ZI={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,a,i,s){return n.forEach(c=>{var d;e=((d=this.processors[c])==null?void 0:d.process(e,a,i,s))??e}),e}};const rb={},ib=n=>!ht(n)&&typeof n!="boolean"&&typeof n!="number";class sd extends Ad{constructor(e,a={}){super(),zM(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Lr.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,a={interpolation:{}}){const i={...a};if(e==null)return!1;const s=this.resolve(e,i);return(s==null?void 0:s.res)!==void 0}extractFromKey(e,a){let i=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=a.ns||this.options.defaultNS||[];const d=i&&e.indexOf(i)>-1,m=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!XM(e,i,s);if(d&&!m){const f=e.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:e,namespaces:ht(c)?[c]:c};const g=e.split(i);(i!==s||i===s&&this.options.ns.indexOf(g[0])>-1)&&(c=g.shift()),e=g.join(s)}return{key:e,namespaces:ht(c)?[c]:c}}translate(e,a,i){let s=typeof a=="object"?{...a}:a;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const c=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,d=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:m,namespaces:f}=this.extractFromKey(e[e.length-1],s),g=f[f.length-1];let E=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;E===void 0&&(E=":");const p=s.lng||this.language,C=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return C?c?{res:`${g}${E}${m}`,usedKey:m,exactUsedKey:m,usedLng:p,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:`${g}${E}${m}`:c?{res:m,usedKey:m,exactUsedKey:m,usedLng:p,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:m;const N=this.resolve(e,s);let x=N==null?void 0:N.res;const S=(N==null?void 0:N.usedKey)||m,T=(N==null?void 0:N.exactUsedKey)||m,k=["[object Number]","[object Function]","[object RegExp]"],U=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,P=s.count!==void 0&&!ht(s.count),M=sd.hasDefaultValue(s),j=P?this.pluralResolver.getSuffix(p,s.count,s):"",Q=s.ordinal&&P?this.pluralResolver.getSuffix(p,s.count,{ordinal:!1}):"",H=P&&!s.ordinal&&s.count===0,V=H&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${j}`]||s[`defaultValue${Q}`]||s.defaultValue;let G=x;R&&!x&&M&&(G=V);const K=ib(G),$=Object.prototype.toString.apply(G);if(R&&G&&K&&k.indexOf($)<0&&!(ht(U)&&Array.isArray(G))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const J=this.options.returnedObjectHandler?this.options.returnedObjectHandler(S,G,{...s,ns:f}):`key '${m} (${this.language})' returned an object instead of string.`;return c?(N.res=J,N.usedParams=this.getUsedParamsDetails(s),N):J}if(d){const J=Array.isArray(G),re=J?[]:{},Ae=J?T:S;for(const X in G)if(Object.prototype.hasOwnProperty.call(G,X)){const ie=`${Ae}${d}${X}`;M&&!x?re[X]=this.translate(ie,{...s,defaultValue:ib(V)?V[X]:void 0,joinArrays:!1,ns:f}):re[X]=this.translate(ie,{...s,joinArrays:!1,ns:f}),re[X]===ie&&(re[X]=G[X])}x=re}}else if(R&&ht(U)&&Array.isArray(x))x=x.join(U),x&&(x=this.extendTranslation(x,e,s,i));else{let J=!1,re=!1;!this.isValidLookup(x)&&M&&(J=!0,x=V),this.isValidLookup(x)||(re=!0,x=m);const X=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&re?void 0:x,ie=M&&V!==x&&this.options.updateMissing;if(re||J||ie){if(this.logger.log(ie?"updateKey":"missingKey",p,g,m,ie?V:x),d){const q=this.resolve(m,{...s,keySeparator:!1});q&&q.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 ce=[];const ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ye&&ye[0])for(let q=0;q<ye.length;q++)ce.push(ye[q]);else this.options.saveMissingTo==="all"?ce=this.languageUtils.toResolveHierarchy(s.lng||this.language):ce.push(s.lng||this.language);const _=(q,ee,ne)=>{var we;const Ie=M&&ne!==x?ne:X;this.options.missingKeyHandler?this.options.missingKeyHandler(q,g,ee,Ie,ie,s):(we=this.backendConnector)!=null&&we.saveMissing&&this.backendConnector.saveMissing(q,g,ee,Ie,ie,s),this.emit("missingKey",q,g,ee,x)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?ce.forEach(q=>{const ee=this.pluralResolver.getSuffixes(q,s);H&&s[`defaultValue${this.options.pluralSeparator}zero`]&&ee.indexOf(`${this.options.pluralSeparator}zero`)<0&&ee.push(`${this.options.pluralSeparator}zero`),ee.forEach(ne=>{_([q],m+ne,s[`defaultValue${ne}`]||V)})}):_(ce,m,V))}x=this.extendTranslation(x,e,s,N,i),re&&x===m&&this.options.appendNamespaceToMissingKey&&(x=`${g}${E}${m}`),(re||J)&&this.options.parseMissingKeyHandler&&(x=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${E}${m}`:m,J?x:void 0,s))}return c?(N.res=x,N.usedParams=this.getUsedParamsDetails(s),N):x}extendTranslation(e,a,i,s,c){var f,g;if((f=this.i18nFormat)!=null&&f.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const E=ht(e)&&(((g=i==null?void 0:i.interpolation)==null?void 0:g.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(E){const N=e.match(this.interpolator.nestingRegexp);p=N&&N.length}let C=i.replace&&!ht(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(C={...this.options.interpolation.defaultVariables,...C}),e=this.interpolator.interpolate(e,C,i.lng||this.language||s.usedLng,i),E){const N=e.match(this.interpolator.nestingRegexp),x=N&&N.length;p<x&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,(...N)=>(c==null?void 0:c[0])===N[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${N[0]} in key: ${a[0]}`),null):this.translate(...N,a),i)),i.interpolation&&this.interpolator.reset()}const d=i.postProcess||this.options.postProcess,m=ht(d)?[d]:d;return e!=null&&(m!=null&&m.length)&&i.applyPostProcessor!==!1&&(e=ZI.handle(m,e,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,a={}){let i,s,c,d,m;return ht(e)&&(e=[e]),e.forEach(f=>{if(this.isValidLookup(i))return;const g=this.extractFromKey(f,a),E=g.key;s=E;let p=g.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const C=a.count!==void 0&&!ht(a.count),N=C&&!a.ordinal&&a.count===0,x=a.context!==void 0&&(ht(a.context)||typeof a.context=="number")&&a.context!=="",S=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);p.forEach(T=>{var k,U;this.isValidLookup(i)||(m=T,!rb[`${S[0]}-${T}`]&&((k=this.utils)!=null&&k.hasLoadedNamespace)&&!((U=this.utils)!=null&&U.hasLoadedNamespace(m))&&(rb[`${S[0]}-${T}`]=!0,this.logger.warn(`key "${s}" for languages "${S.join(", ")}" won't get resolved as namespace "${m}" 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!!!")),S.forEach(R=>{var j;if(this.isValidLookup(i))return;d=R;const P=[E];if((j=this.i18nFormat)!=null&&j.addLookupKeys)this.i18nFormat.addLookupKeys(P,E,R,T,a);else{let Q;C&&(Q=this.pluralResolver.getSuffix(R,a.count,a));const H=`${this.options.pluralSeparator}zero`,V=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(C&&(P.push(E+Q),a.ordinal&&Q.indexOf(V)===0&&P.push(E+Q.replace(V,this.options.pluralSeparator)),N&&P.push(E+H)),x){const G=`${E}${this.options.contextSeparator}${a.context}`;P.push(G),C&&(P.push(G+Q),a.ordinal&&Q.indexOf(V)===0&&P.push(G+Q.replace(V,this.options.pluralSeparator)),N&&P.push(G+H))}}let M;for(;M=P.pop();)this.isValidLookup(i)||(c=M,i=this.getResource(R,T,M,a))}))})}),{res:i,usedKey:s,exactUsedKey:c,usedLng:d,usedNS:m}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,a,i,s={}){var c;return(c=this.i18nFormat)!=null&&c.getResource?this.i18nFormat.getResource(e,a,i,s):this.resourceStore.getResource(e,a,i,s)}getUsedParamsDetails(e={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!ht(e.replace);let s=i?e.replace:e;if(i&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const c of a)delete s[c]}return s}static hasDefaultValue(e){const a="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&a===i.substring(0,a.length)&&e[i]!==void 0)return!0;return!1}}class sb{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Lr.create("languageUtils")}getScriptPartFromCode(e){if(e=Xl(e),!e||e.indexOf("-")<0)return null;const a=e.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(e){if(e=Xl(e),!e||e.indexOf("-")<0)return e;const a=e.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(e){if(ht(e)&&e.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(e)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let a;return e.forEach(i=>{if(a)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(a=s)}),!a&&this.options.supportedLngs&&e.forEach(i=>{if(a)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return a=s;const c=this.getLanguagePartFromCode(i);if(this.isSupportedCode(c))return a=c;a=this.options.supportedLngs.find(d=>{if(d===c)return d;if(!(d.indexOf("-")<0&&c.indexOf("-")<0)&&(d.indexOf("-")>0&&c.indexOf("-")<0&&d.substring(0,d.indexOf("-"))===c||d.indexOf(c)===0&&c.length>1))return d})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(e,a){if(!e)return[];if(typeof e=="function"&&(e=e(a)),ht(e)&&(e=[e]),Array.isArray(e))return e;if(!a)return e.default||[];let i=e[a];return i||(i=e[this.getScriptPartFromCode(a)]),i||(i=e[this.formatLanguageCode(a)]),i||(i=e[this.getLanguagePartFromCode(a)]),i||(i=e.default),i||[]}toResolveHierarchy(e,a){const i=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],e),s=[],c=d=>{d&&(this.isSupportedCode(d)?s.push(d):this.logger.warn(`rejecting language code not found in supportedLngs: ${d}`))};return ht(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(e))):ht(e)&&c(this.formatLanguageCode(e)),i.forEach(d=>{s.indexOf(d)<0&&c(this.formatLanguageCode(d))}),s}}const ob={zero:0,one:1,two:2,few:3,many:4,other:5},lb={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ZM{constructor(e,a={}){this.languageUtils=e,this.options=a,this.logger=Lr.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,a){this.rules[e]=a}clearCache(){this.pluralRulesCache={}}getRule(e,a={}){const i=Xl(e==="dev"?"en":e),s=a.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:i,type:s});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let d;try{d=new Intl.PluralRules(i,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),lb;if(!e.match(/-|_/))return lb;const f=this.languageUtils.getLanguagePartFromCode(e);d=this.getRule(f,a)}return this.pluralRulesCache[c]=d,d}needsPlural(e,a={}){let i=this.getRule(e,a);return i||(i=this.getRule("dev",a)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,a,i={}){return this.getSuffixes(e,i).map(s=>`${a}${s}`)}getSuffixes(e,a={}){let i=this.getRule(e,a);return i||(i=this.getRule("dev",a)),i?i.resolvedOptions().pluralCategories.sort((s,c)=>ob[s]-ob[c]).map(s=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,a,i={}){const s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(a)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",a,i))}}const cb=(n,e,a,i=".",s=!0)=>{let c=GM(n,e,a);return!c&&s&&ht(a)&&(c=lh(n,a,i),c===void 0&&(c=lh(e,a,i))),c},_f=n=>n.replace(/\$/g,"$$$$");class e_{constructor(e={}){var a;this.logger=Lr.create("interpolator"),this.options=e,this.format=((a=e==null?void 0:e.interpolation)==null?void 0:a.format)||(i=>i),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:a,escapeValue:i,useRawValueToEscape:s,prefix:c,prefixEscaped:d,suffix:m,suffixEscaped:f,formatSeparator:g,unescapeSuffix:E,unescapePrefix:p,nestingPrefix:C,nestingPrefixEscaped:N,nestingSuffix:x,nestingSuffixEscaped:S,nestingOptionsSeparator:T,maxReplaces:k,alwaysFormat:U}=e.interpolation;this.escape=a!==void 0?a:qM,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=c?uo(c):d||"{{",this.suffix=m?uo(m):f||"}}",this.formatSeparator=g||",",this.unescapePrefix=E?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":E||"",this.nestingPrefix=C?uo(C):N||uo("$t("),this.nestingSuffix=x?uo(x):S||uo(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=k||1e3,this.alwaysFormat=U!==void 0?U:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(a,i)=>(a==null?void 0:a.source)===i?(a.lastIndex=0,a):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,a,i,s){var N;let c,d,m;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=x=>{if(x.indexOf(this.formatSeparator)<0){const U=cb(a,f,x,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(U,void 0,i,{...s,...a,interpolationkey:x}):U}const S=x.split(this.formatSeparator),T=S.shift().trim(),k=S.join(this.formatSeparator).trim();return this.format(cb(a,f,T,this.options.keySeparator,this.options.ignoreJSONStructure),k,i,{...s,...a,interpolationkey:T})};this.resetRegExp();const E=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((N=s==null?void 0:s.interpolation)==null?void 0:N.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:x=>_f(x)},{regex:this.regexp,safeValue:x=>this.escapeValue?_f(this.escape(x)):_f(x)}].forEach(x=>{for(m=0;c=x.regex.exec(e);){const S=c[1].trim();if(d=g(S),d===void 0)if(typeof E=="function"){const k=E(e,c,s);d=ht(k)?k:""}else if(s&&Object.prototype.hasOwnProperty.call(s,S))d="";else if(p){d=c[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${e}`),d="";else!ht(d)&&!this.useRawValueToEscape&&(d=ZE(d));const T=x.safeValue(d);if(e=e.replace(c[0],T),p?(x.regex.lastIndex+=d.length,x.regex.lastIndex-=c[0].length):x.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),e}nest(e,a,i={}){let s,c,d;const m=(f,g)=>{const E=this.nestingOptionsSeparator;if(f.indexOf(E)<0)return f;const p=f.split(new RegExp(`${E}[ ]*{`));let C=`{${p[1]}`;f=p[0],C=this.interpolate(C,d);const N=C.match(/'/g),x=C.match(/"/g);(((N==null?void 0:N.length)??0)%2===0&&!x||x.length%2!==0)&&(C=C.replace(/'/g,'"'));try{d=JSON.parse(C),g&&(d={...g,...d})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,S),`${f}${E}${C}`}return d.defaultValue&&d.defaultValue.indexOf(this.prefix)>-1&&delete d.defaultValue,f};for(;s=this.nestingRegexp.exec(e);){let f=[];d={...i},d=d.replace&&!ht(d.replace)?d.replace:d,d.applyPostProcessor=!1,delete d.defaultValue;const g=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(g!==-1&&(f=s[1].slice(g).split(this.formatSeparator).map(E=>E.trim()).filter(Boolean),s[1]=s[1].slice(0,g)),c=a(m.call(this,s[1].trim(),d),d),c&&s[0]===e&&!ht(c))return c;ht(c)||(c=ZE(c)),c||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),c=""),f.length&&(c=f.reduce((E,p)=>this.format(E,p,i.lng,{...i,interpolationkey:s[1].trim()}),c.trim())),e=e.replace(s[0],c),this.regexp.lastIndex=0}return e}}const t_=n=>{let e=n.toLowerCase().trim();const a={};if(n.indexOf("(")>-1){const i=n.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);e==="currency"&&s.indexOf(":")<0?a.currency||(a.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?a.range||(a.range=s.trim()):s.split(";").forEach(d=>{if(d){const[m,...f]=d.split(":"),g=f.join(":").trim().replace(/^'+|'+$/g,""),E=m.trim();a[E]||(a[E]=g),g==="false"&&(a[E]=!1),g==="true"&&(a[E]=!0),isNaN(g)||(a[E]=parseInt(g,10))}})}return{formatName:e,formatOptions:a}},ub=n=>{const e={};return(a,i,s)=>{let c=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(c={...c,[s.interpolationkey]:void 0});const d=i+JSON.stringify(c);let m=e[d];return m||(m=n(Xl(i),s),e[d]=m),m(a)}},a_=n=>(e,a,i)=>n(Xl(a),i)(e);class n_{constructor(e={}){this.logger=Lr.create("formatter"),this.options=e,this.init(e)}init(e,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const i=a.cacheInBuiltFormats?ub:a_;this.formats={number:i((s,c)=>{const d=new Intl.NumberFormat(s,{...c});return m=>d.format(m)}),currency:i((s,c)=>{const d=new Intl.NumberFormat(s,{...c,style:"currency"});return m=>d.format(m)}),datetime:i((s,c)=>{const d=new Intl.DateTimeFormat(s,{...c});return m=>d.format(m)}),relativetime:i((s,c)=>{const d=new Intl.RelativeTimeFormat(s,{...c});return m=>d.format(m,c.range||"day")}),list:i((s,c)=>{const d=new Intl.ListFormat(s,{...c});return m=>d.format(m)})}}add(e,a){this.formats[e.toLowerCase().trim()]=a}addCached(e,a){this.formats[e.toLowerCase().trim()]=ub(a)}format(e,a,i,s={}){const c=a.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&c[0].indexOf(")")<0&&c.find(m=>m.indexOf(")")>-1)){const m=c.findIndex(f=>f.indexOf(")")>-1);c[0]=[c[0],...c.splice(1,m)].join(this.formatSeparator)}return c.reduce((m,f)=>{var p;const{formatName:g,formatOptions:E}=t_(f);if(this.formats[g]){let C=m;try{const N=((p=s==null?void 0:s.formatParams)==null?void 0:p[s.interpolationkey])||{},x=N.locale||N.lng||s.locale||s.lng||i;C=this.formats[g](m,x,{...E,...s,...N})}catch(N){this.logger.warn(N)}return C}else this.logger.warn(`there was no format function for ${g}`);return m},e)}}const r_=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class i_ extends Ad{constructor(e,a,i,s={}){var c,d;super(),this.backend=e,this.store=a,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=Lr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(d=(c=this.backend)==null?void 0:c.init)==null||d.call(c,i,s.backend,s)}queueLoad(e,a,i,s){const c={},d={},m={},f={};return e.forEach(g=>{let E=!0;a.forEach(p=>{const C=`${g}|${p}`;!i.reload&&this.store.hasResourceBundle(g,p)?this.state[C]=2:this.state[C]<0||(this.state[C]===1?d[C]===void 0&&(d[C]=!0):(this.state[C]=1,E=!1,d[C]===void 0&&(d[C]=!0),c[C]===void 0&&(c[C]=!0),f[p]===void 0&&(f[p]=!0)))}),E||(m[g]=!0)}),(Object.keys(c).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(d),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(f)}}loaded(e,a,i){const s=e.split("|"),c=s[0],d=s[1];a&&this.emit("failedLoading",c,d,a),!a&&i&&this.store.addResourceBundle(c,d,i,void 0,void 0,{skipCopy:!0}),this.state[e]=a?-1:2,a&&i&&(this.state[e]=0);const m={};this.queue.forEach(f=>{VM(f.loaded,[c],d),r_(f,e),a&&f.errors.push(a),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(g=>{m[g]||(m[g]={});const E=f.loaded[g];E.length&&E.forEach(p=>{m[g][p]===void 0&&(m[g][p]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(f=>!f.done)}read(e,a,i,s=0,c=this.retryTimeout,d){if(!e.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:a,fcName:i,tried:s,wait:c,callback:d});return}this.readingCalls++;const m=(g,E)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(g&&E&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,a,i,s+1,c*2,d)},c);return}d(g,E)},f=this.backend[i].bind(this.backend);if(f.length===2){try{const g=f(e,a);g&&typeof g.then=="function"?g.then(E=>m(null,E)).catch(m):m(null,g)}catch(g){m(g)}return}return f(e,a,m)}prepareLoading(e,a,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();ht(e)&&(e=this.languageUtils.toResolveHierarchy(e)),ht(a)&&(a=[a]);const c=this.queueLoad(e,a,i,s);if(!c.toLoad.length)return c.pending.length||s(),null;c.toLoad.forEach(d=>{this.loadOne(d)})}load(e,a,i){this.prepareLoading(e,a,{},i)}reload(e,a,i){this.prepareLoading(e,a,{reload:!0},i)}loadOne(e,a=""){const i=e.split("|"),s=i[0],c=i[1];this.read(s,c,"read",void 0,void 0,(d,m)=>{d&&this.logger.warn(`${a}loading namespace ${c} for language ${s} failed`,d),!d&&m&&this.logger.log(`${a}loaded namespace ${c} for language ${s}`,m),this.loaded(e,d,m)})}saveMissing(e,a,i,s,c,d={},m=()=>{}){var f,g,E,p,C;if((g=(f=this.services)==null?void 0:f.utils)!=null&&g.hasLoadedNamespace&&!((p=(E=this.services)==null?void 0:E.utils)!=null&&p.hasLoadedNamespace(a))){this.logger.warn(`did not save key "${i}" as the namespace "${a}" 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(!(i==null||i==="")){if((C=this.backend)!=null&&C.create){const N={...d,isUpdate:c},x=this.backend.create.bind(this.backend);if(x.length<6)try{let S;x.length===5?S=x(e,a,i,s,N):S=x(e,a,i,s),S&&typeof S.then=="function"?S.then(T=>m(null,T)).catch(m):m(null,S)}catch(S){m(S)}else x(e,a,i,s,m,N)}!e||!e[0]||this.store.addResource(e[0],a,i,s)}}}const db=()=>({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 e={};if(typeof n[1]=="object"&&(e=n[1]),ht(n[1])&&(e.defaultValue=n[1]),ht(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const a=n[3]||n[2];Object.keys(a).forEach(i=>{e[i]=a[i]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),mb=n=>{var e,a;return ht(n.ns)&&(n.ns=[n.ns]),ht(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),ht(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((a=(e=n.supportedLngs)==null?void 0:e.indexOf)==null?void 0:a.call(e,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},Du=()=>{},s_=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(a=>{typeof n[a]=="function"&&(n[a]=n[a].bind(n))})};class $l extends Ad{constructor(e={},a){if(super(),this.options=mb(e),this.services={},this.logger=Lr,this.modules={external:[]},s_(this),a&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,a),this;setTimeout(()=>{this.init(e,a)},0)}}init(e={},a){this.isInitializing=!0,typeof e=="function"&&(a=e,e={}),e.defaultNS==null&&e.ns&&(ht(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=db();this.options={...i,...this.options,...mb(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?Lr.init(s(this.modules.logger),this.options):Lr.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=n_;const E=new sb(this.options);this.store=new nb(this.options.resources,this.options);const p=this.services;p.logger=Lr,p.resourceStore=this.store,p.languageUtils=E,p.pluralResolver=new ZM(E,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.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"),g&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=s(g),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new e_(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new i_(s(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(N,...x)=>{this.emit(N,...x)}),this.modules.languageDetector&&(p.languageDetector=s(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=s(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new sd(this.services,this.options),this.translator.on("*",(N,...x)=>{this.emit(N,...x)}),this.modules.external.forEach(N=>{N.init&&N.init(this)})}if(this.format=this.options.interpolation.format,a||(a=Du),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=(...E)=>this.store[g](...E)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...E)=>(this.store[g](...E),this)});const m=Ml(),f=()=>{const g=(E,p)=>{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),m.resolve(p),a(E,p)};if(this.languages&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),m}loadResources(e,a=Du){var c,d;let i=a;const s=ht(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const m=[],f=g=>{if(!g||g==="cimode")return;this.services.languageUtils.toResolveHierarchy(g).forEach(p=>{p!=="cimode"&&m.indexOf(p)<0&&m.push(p)})};s?f(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(E=>f(E)),(d=(c=this.options.preload)==null?void 0:c.forEach)==null||d.call(c,g=>f(g)),this.services.backendConnector.load(m,this.options.ns,g=>{!g&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(g)})}else i(null)}reloadResources(e,a,i){const s=Ml();return typeof e=="function"&&(i=e,e=void 0),typeof a=="function"&&(i=a,a=void 0),e||(e=this.languages),a||(a=this.options.ns),i||(i=Du),this.services.backendConnector.reload(e,a,c=>{s.resolve(),i(c)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&ZI.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let a=0;a<this.languages.length;a++){const i=this.languages[a];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,a){this.isLanguageChangingTo=e;const i=Ml();this.emit("languageChanging",e);const s=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},c=(m,f)=>{f?this.isLanguageChangingTo===e&&(s(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,i.resolve((...g)=>this.t(...g)),a&&a(m,(...g)=>this.t(...g))},d=m=>{var E,p;!e&&!m&&this.services.languageDetector&&(m=[]);const f=ht(m)?m:m&&m[0],g=this.store.hasLanguageSomeTranslations(f)?f:this.services.languageUtils.getBestMatchFromCodes(ht(m)?[m]:m);g&&(this.language||s(g),this.translator.language||this.translator.changeLanguage(g),(p=(E=this.services.languageDetector)==null?void 0:E.cacheUserLanguage)==null||p.call(E,g)),this.loadResources(g,C=>{c(C,g)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(e),i}getFixedT(e,a,i){const s=(c,d,...m)=>{let f;typeof d!="object"?f=this.options.overloadTranslationOptionHandler([c,d].concat(m)):f={...d},f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs,f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||i||s.keyPrefix);const g=this.options.keySeparator||".";let E;return f.keyPrefix&&Array.isArray(c)?E=c.map(p=>`${f.keyPrefix}${g}${p}`):E=f.keyPrefix?`${f.keyPrefix}${g}${c}`:c,this.t(E,f)};return ht(e)?s.lng=e:s.lngs=e,s.ns=a,s.keyPrefix=i,s}t(...e){var a;return(a=this.translator)==null?void 0:a.translate(...e)}exists(...e){var a;return(a=this.translator)==null?void 0:a.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,a={}){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 i=a.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const d=(m,f)=>{const g=this.services.backendConnector.state[`${m}|${f}`];return g===-1||g===0||g===2};if(a.precheck){const m=a.precheck(this,d);if(m!==void 0)return m}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(i,e)&&(!s||d(c,e)))}loadNamespaces(e,a){const i=Ml();return this.options.ns?(ht(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),a&&a(s)}),i):(a&&a(),Promise.resolve())}loadLanguages(e,a){const i=Ml();ht(e)&&(e=[e]);const s=this.options.preload||[],c=e.filter(d=>s.indexOf(d)<0&&this.services.languageUtils.isSupportedCode(d));return c.length?(this.options.preload=s.concat(c),this.loadResources(d=>{i.resolve(),a&&a(d)}),i):(a&&a(),Promise.resolve())}dir(e){var s,c;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";if(Intl.Locale){const d=new Intl.Locale(e);if(d&&d.getTextInfo){const m=d.getTextInfo();if(m&&m.direction)return m.direction}}const a=["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"],i=((c=this.services)==null?void 0:c.languageUtils)||new sb(db());return e.toLowerCase().indexOf("-latn")>1?"ltr":a.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},a){return new $l(e,a)}cloneInstance(e={},a=Du){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},c=new $l(s);if((e.debug!==void 0||e.prefix!==void 0)&&(c.logger=c.logger.clone(e)),["store","services","language"].forEach(m=>{c[m]=this[m]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},i){const m=Object.keys(this.store.data).reduce((f,g)=>(f[g]={...this.store.data[g]},f[g]=Object.keys(f[g]).reduce((E,p)=>(E[p]={...f[g][p]},E),f[g]),f),{});c.store=new nb(m,s),c.services.resourceStore=c.store}return c.translator=new sd(c.services,s),c.translator.on("*",(m,...f)=>{c.emit(m,...f)}),c.init(s,a),c.translator.options=s,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ha=$l.createInstance();Ha.createInstance=$l.createInstance;Ha.createInstance;Ha.dir;Ha.init;Ha.loadResources;Ha.reloadResources;Ha.use;Ha.changeLanguage;Ha.getFixedT;Ha.t;Ha.exists;Ha.setDefaultNamespace;Ha.hasLoadedNamespace;Ha.loadNamespaces;Ha.loadLanguages;const o_=async()=>{const n=await Se.getItem("local:language");if(n&&Wu.includes(n))return n;const e=navigator.language.split("-")[0];return Wu.includes(e)?e:kr},l_=async()=>{const n=await o_();await Ha.use(XN).init({resources:_l,lng:n,fallbackLng:kr,debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1,bindI18n:"languageChanged loaded",bindI18nStore:""}})};l_().catch(n=>{console.error("Failed to initialize i18n:",n),Ha.emit("initialized")});const gb=()=>{jN.createRoot(document.getElementById("root")).render(l.jsx(AL,{children:l.jsx(TL,{children:l.jsx(wL,{children:l.jsx(kL,{children:l.jsx(_L,{children:l.jsx(UL,{children:l.jsx(_M,{children:l.jsx(HM,{})})})})})})})}))};Ha.isInitialized?gb():Ha.on("initialized",gb)});export default c_();
