var vC=Object.defineProperty;var CC=(r,e,a)=>e in r?vC(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a;var wC=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var ze=(r,e,a)=>CC(r,typeof e!="symbol"?e+"":e,a);var E_=wC((v_,XI)=>{(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(r){console.error("[wxt] Failed to initialize plugins",r)}function Wi(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function NC(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.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(r).forEach(function(i){var s=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(a,i,s.get?s:{enumerable:!0,get:function(){return r[i]}})}),a}var Tg={exports:{}},El={};/**
 * @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 X0;function xC(){if(X0)return El;X0=1;var r=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:r,type:i,key:d,ref:s!==void 0?s:null,props:c}}return El.Fragment=e,El.jsx=a,El.jsxs=a,El}var $0;function TC(){return $0||($0=1,Tg.exports=xC()),Tg.exports}var l=TC(),Sg={exports:{}},bl={},kg={exports:{}},Lg={};/**
 * @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 Z0;function SC(){return Z0||(Z0=1,function(r){function e(X,ie){var ce=X.length;X.push(ie);e:for(;0<ce;){var ye=ce-1>>>1,M=X[ye];if(0<s(M,ie))X[ye]=ie,X[ce]=M,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,M=X.length,q=M>>>1;ye<q;){var ee=2*(ye+1)-1,ne=X[ee],Ie=ee+1,we=X[Ie];if(0>s(ne,ce))Ie<M&&0>s(we,ne)?(X[ye]=we,X[Ie]=ce,ye=Ie):(X[ye]=ne,X[ee]=ce,ye=ee);else if(Ie<M&&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(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;r.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();r.unstable_now=function(){return d.now()-m}}var f=[],g=[],E=1,p=null,w=3,v=!1,x=!1,T=!1,S=!1,k=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,L=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 _(X){if(T=!1,P(X),!x)if(a(f)!==null)x=!0,j||(j=!0,$());else{var ie=a(g);ie!==null&&Ae(_,ie.startTime-X)}}var j=!1,V=-1,H=5,Q=-1;function G(){return S?!0:!(r.unstable_now()-Q<H)}function K(){if(S=!1,j){var X=r.unstable_now();Q=X;var ie=!0;try{e:{x=!1,T&&(T=!1,B(V),V=-1),v=!0;var ce=w;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,w=p.priorityLevel;var M=ye(p.expirationTime<=X);if(X=r.unstable_now(),typeof M=="function"){p.callback=M,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(_,q.startTime-X),ie=!1}}break e}finally{p=null,w=ce,v=!1}ie=void 0}}finally{ie?$():j=!1}}}var $;if(typeof L=="function")$=function(){L(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){V=k(function(){X(r.unstable_now())},ie)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(X){X.callback=null},r.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},r.unstable_getCurrentPriorityLevel=function(){return w},r.unstable_next=function(X){switch(w){case 1:case 2:case 3:var ie=3;break;default:ie=w}var ce=w;w=ie;try{return X()}finally{w=ce}},r.unstable_requestPaint=function(){S=!0},r.unstable_runWithPriority=function(X,ie){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var ce=w;w=X;try{return ie()}finally{w=ce}},r.unstable_scheduleCallback=function(X,ie,ce){var ye=r.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 M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=ce+M,X={id:E++,callback:ie,priorityLevel:X,startTime:ce,expirationTime:M,sortIndex:-1},ce>ye?(X.sortIndex=ce,e(g,X),a(f)===null&&X===a(g)&&(T?(B(V),V=-1):T=!0,Ae(_,ce-ye))):(X.sortIndex=M,e(f,X),x||v||(x=!0,j||(j=!0,$()))),X},r.unstable_shouldYield=G,r.unstable_wrapCallback=function(X){var ie=w;return function(){var ce=w;w=ie;try{return X.apply(this,arguments)}finally{w=ce}}}}(Lg)),Lg}var ey;function kC(){return ey||(ey=1,kg.exports=SC()),kg.exports}var Rg={exports:{}},wt={};/**
 * @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 ty;function LC(){if(ty)return wt;ty=1;var r=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 w(M){return M===null||typeof M!="object"?null:(M=p&&M[p]||M["@@iterator"],typeof M=="function"?M:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,T={};function S(M,q,ee){this.props=M,this.context=q,this.refs=T,this.updater=ee||v}S.prototype.isReactComponent={},S.prototype.setState=function(M,q){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,q,"setState")},S.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function k(){}k.prototype=S.prototype;function B(M,q,ee){this.props=M,this.context=q,this.refs=T,this.updater=ee||v}var L=B.prototype=new k;L.constructor=B,x(L,S.prototype),L.isPureReactComponent=!0;var P=Array.isArray,_={H:null,A:null,T:null,S:null,V:null},j=Object.prototype.hasOwnProperty;function V(M,q,ee,ne,Ie,we){return ee=we.ref,{$$typeof:r,type:M,key:q,ref:ee!==void 0?ee:null,props:we}}function H(M,q){return V(M.type,q,void 0,void 0,void 0,M.props)}function Q(M){return typeof M=="object"&&M!==null&&M.$$typeof===r}function G(M){var q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(ee){return q[ee]})}var K=/\/+/g;function $(M,q){return typeof M=="object"&&M!==null&&M.key!=null?G(""+M.key):q.toString(36)}function J(){}function re(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(J,J):(M.status="pending",M.then(function(q){M.status==="pending"&&(M.status="fulfilled",M.value=q)},function(q){M.status==="pending"&&(M.status="rejected",M.reason=q)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function Ae(M,q,ee,ne,Ie){var we=typeof M;(we==="undefined"||we==="boolean")&&(M=null);var Re=!1;if(M===null)Re=!0;else switch(we){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(M.$$typeof){case r:case e:Re=!0;break;case E:return Re=M._init,Ae(Re(M._payload),q,ee,ne,Ie)}}if(Re)return Ie=Ie(M),Re=ne===""?"."+$(M,0):ne,P(Ie)?(ee="",Re!=null&&(ee=Re.replace(K,"$&/")+"/"),Ae(Ie,q,ee,"",function(Qe){return Qe})):Ie!=null&&(Q(Ie)&&(Ie=H(Ie,ee+(Ie.key==null||M&&M.key===Ie.key?"":(""+Ie.key).replace(K,"$&/")+"/")+Re)),q.push(Ie)),1;Re=0;var Be=ne===""?".":ne+":";if(P(M))for(var ke=0;ke<M.length;ke++)ne=M[ke],we=Be+$(ne,ke),Re+=Ae(ne,q,ee,we,Ie);else if(ke=w(M),typeof ke=="function")for(M=ke.call(M),ke=0;!(ne=M.next()).done;)ne=ne.value,we=Be+$(ne,ke++),Re+=Ae(ne,q,ee,we,Ie);else if(we==="object"){if(typeof M.then=="function")return Ae(re(M),q,ee,ne,Ie);throw q=String(M),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Re}function X(M,q,ee){if(M==null)return M;var ne=[],Ie=0;return Ae(M,ne,"","",function(we){return q.call(ee,we,Ie++)}),ne}function ie(M){if(M._status===-1){var q=M._result;q=q(),q.then(function(ee){(M._status===0||M._status===-1)&&(M._status=1,M._result=ee)},function(ee){(M._status===0||M._status===-1)&&(M._status=2,M._result=ee)}),M._status===-1&&(M._status=0,M._result=q)}if(M._status===1)return M._result.default;throw M._result}var ce=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)};function ye(){}return wt.Children={map:X,forEach:function(M,q,ee){X(M,function(){q.apply(this,arguments)},ee)},count:function(M){var q=0;return X(M,function(){q++}),q},toArray:function(M){return X(M,function(q){return q})||[]},only:function(M){if(!Q(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},wt.Component=S,wt.Fragment=a,wt.Profiler=s,wt.PureComponent=B,wt.StrictMode=i,wt.Suspense=f,wt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,wt.__COMPILER_RUNTIME={__proto__:null,c:function(M){return _.H.useMemoCache(M)}},wt.cache=function(M){return function(){return M.apply(null,arguments)}},wt.cloneElement=function(M,q,ee){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var ne=x({},M.props),Ie=M.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),ke=0;ke<Re;ke++)Be[ke]=arguments[ke+2];ne.children=Be}return V(M.type,Ie,void 0,void 0,we,ne)},wt.createContext=function(M){return M={$$typeof:d,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:c,_context:M},M},wt.createElement=function(M,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),ke=0;ke<Re;ke++)Be[ke]=arguments[ke+2];Ie.children=Be}if(M&&M.defaultProps)for(ne in Re=M.defaultProps,Re)Ie[ne]===void 0&&(Ie[ne]=Re[ne]);return V(M,we,void 0,void 0,null,Ie)},wt.createRef=function(){return{current:null}},wt.forwardRef=function(M){return{$$typeof:m,render:M}},wt.isValidElement=Q,wt.lazy=function(M){return{$$typeof:E,_payload:{_status:-1,_result:M},_init:ie}},wt.memo=function(M,q){return{$$typeof:g,type:M,compare:q===void 0?null:q}},wt.startTransition=function(M){var q=_.T,ee={};_.T=ee;try{var ne=M(),Ie=_.S;Ie!==null&&Ie(ee,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(ye,ce)}catch(we){ce(we)}finally{_.T=q}},wt.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},wt.use=function(M){return _.H.use(M)},wt.useActionState=function(M,q,ee){return _.H.useActionState(M,q,ee)},wt.useCallback=function(M,q){return _.H.useCallback(M,q)},wt.useContext=function(M){return _.H.useContext(M)},wt.useDebugValue=function(){},wt.useDeferredValue=function(M,q){return _.H.useDeferredValue(M,q)},wt.useEffect=function(M,q,ee){var ne=_.H;if(typeof ee=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return ne.useEffect(M,q)},wt.useId=function(){return _.H.useId()},wt.useImperativeHandle=function(M,q,ee){return _.H.useImperativeHandle(M,q,ee)},wt.useInsertionEffect=function(M,q){return _.H.useInsertionEffect(M,q)},wt.useLayoutEffect=function(M,q){return _.H.useLayoutEffect(M,q)},wt.useMemo=function(M,q){return _.H.useMemo(M,q)},wt.useOptimistic=function(M,q){return _.H.useOptimistic(M,q)},wt.useReducer=function(M,q,ee){return _.H.useReducer(M,q,ee)},wt.useRef=function(M){return _.H.useRef(M)},wt.useState=function(M){return _.H.useState(M)},wt.useSyncExternalStore=function(M,q,ee){return _.H.useSyncExternalStore(M,q,ee)},wt.useTransition=function(){return _.H.useTransition()},wt.version="19.1.0",wt}var ay;function ch(){return ay||(ay=1,Rg.exports=LC()),Rg.exports}var Dg={exports:{}},ln={};/**
 * @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 ny;function RC(){if(ny)return ln;ny=1;var r=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=r.__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 ln.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,ln.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)},ln.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()}},ln.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))},ln.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},ln.preinit=function(f,g){if(typeof f=="string"&&g&&typeof g.as=="string"){var E=g.as,p=m(E,g.crossOrigin),w=typeof g.integrity=="string"?g.integrity:void 0,v=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:w,fetchPriority:v}):E==="script"&&i.d.X(f,{crossOrigin:p,integrity:w,fetchPriority:v,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ln.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)},ln.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})}},ln.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)},ln.requestFormReset=function(f){i.d.r(f)},ln.unstable_batchedUpdates=function(f,g){return f(g)},ln.useFormState=function(f,g,E){return d.H.useFormState(f,g,E)},ln.useFormStatus=function(){return d.H.useHostTransitionStatus()},ln.version="19.1.0",ln}var ry;function DC(){if(ry)return Dg.exports;ry=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),Dg.exports=RC(),Dg.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 iy;function BC(){if(iy)return bl;iy=1;var r=kC(),e=ch(),a=DC();function i(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+n+" 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 n=t,o=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(o=n.return),t=n.return;while(t)}return n.tag===3?o:null}function d(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function m(t){if(c(t)!==t)throw Error(i(188))}function f(t){var n=t.alternate;if(!n){if(n=c(t),n===null)throw Error(i(188));return n!==t?null:t}for(var o=t,u=n;;){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),n;y=y.sibling}throw Error(i(188))}if(o.return!==u.return)o=h,u=y;else{for(var R=!1,F=h.child;F;){if(F===o){R=!0,o=h,u=y;break}if(F===u){R=!0,u=h,o=y;break}F=F.sibling}if(!R){for(F=y.child;F;){if(F===o){R=!0,o=y,u=h;break}if(F===u){R=!0,u=y,o=h;break}F=F.sibling}if(!R)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:n}function g(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=g(t),n!==null)return n;t=t.sibling}return null}var E=Object.assign,p=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),B=Symbol.for("react.consumer"),L=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),Q=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 S:return"Profiler";case T:return"StrictMode";case _:return"Suspense";case j:return"SuspenseList";case Q:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case v:return"Portal";case L:return(t.displayName||"Context")+".Provider";case B:return(t._context.displayName||"Context")+".Consumer";case P:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V:return n=t.displayName||null,n!==null?n:re(t.type)||"Memo";case H:n=t._payload,t=t._init;try{return re(t(n))}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=[],M=-1;function q(t){return{current:t}}function ee(t){0>M||(t.current=ye[M],ye[M]=null,M--)}function ne(t,n){M++,ye[M]=t.current,t.current=n}var Ie=q(null),we=q(null),Re=q(null),Be=q(null);function ke(t,n){switch(ne(Re,n),ne(we,t),ne(Ie,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?N0(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=N0(n),t=x0(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}ee(Ie),ne(Ie,t)}function Qe(){ee(Ie),ee(we),ee(Re)}function pt(t){t.memoizedState!==null&&ne(Be,t);var n=Ie.current,o=x0(n,t.type);n!==o&&(ne(we,t),ne(Ie,o))}function Dt(t){we.current===t&&(ee(Ie),ee(we)),Be.current===t&&(ee(Be),fl._currentValue=ce)}var _t=Object.prototype.hasOwnProperty,et=r.unstable_scheduleCallback,nt=r.unstable_cancelCallback,Ht=r.unstable_shouldYield,Ce=r.unstable_requestPaint,se=r.unstable_now,De=r.unstable_getCurrentPriorityLevel,je=r.unstable_ImmediatePriority,Ve=r.unstable_UserBlockingPriority,Ye=r.unstable_NormalPriority,ut=r.unstable_LowPriority,Mt=r.unstable_IdlePriority,Pt=r.log,Gt=r.unstable_setDisableYieldValue,ia=null,U=null;function C(t){if(typeof Pt=="function"&&Gt(t),U&&typeof U.setStrictMode=="function")try{U.setStrictMode(ia,t)}catch{}}var N=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 ft(t){var n=t&42;if(n!==0)return n;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 Et(t,n,o){var u=t.pendingLanes;if(u===0)return 0;var h=0,y=t.suspendedLanes,R=t.pingedLanes;t=t.warmLanes;var F=u&134217727;return F!==0?(u=F&~y,u!==0?h=ft(u):(R&=F,R!==0?h=ft(R):o||(o=F&~t,o!==0&&(h=ft(o))))):(F=u&~y,F!==0?h=ft(F):R!==0?h=ft(R):o||(o=u&~t,o!==0&&(h=ft(o)))),h===0?0:n!==0&&n!==h&&(n&y)===0&&(y=h&-h,o=n&-n,y>=o||y===32&&(o&4194048)!==0)?n:h}function St(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function dt(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 hr(){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 rn(t){for(var n=[],o=0;31>o;o++)n.push(t);return n}function Pn(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Hn(t,n,o,u,h,y){var R=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=R&~o;0<o;){var ve=31-N(o),Se=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&=~Se}u!==0&&Oe(t,u,0),y!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=y&~(R&~n))}function Oe(t,n,o){t.pendingLanes|=n,t.suspendedLanes&=~n;var u=31-N(n);t.entangledLanes|=n,t.entanglements[u]=t.entanglements[u]|1073741824|o&4194090}function ui(t,n){var o=t.entangledLanes|=n;for(t=t.entanglements;o;){var u=31-N(o),h=1<<u;h&n|t[u]&n&&(t[u]|=n),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:G0(t.type))}function rr(t,n){var o=ie.p;try{return ie.p=t,n()}finally{ie.p=o}}var Ua=Math.random().toString(36).slice(2),qt="__reactFiber$"+Ua,Ea="__reactProps$"+Ua,Jt="__reactContainer$"+Ua,_a="__reactEvents$"+Ua,za="__reactListeners$"+Ua,Br="__reactHandles$"+Ua,le="__reactResources$"+Ua,Me="__reactMarker$"+Ua;function _e(t){delete t[qt],delete t[Ea],delete t[_a],delete t[za],delete t[Br]}function Xe(t){var n=t[qt];if(n)return n;for(var o=t.parentNode;o;){if(n=o[Jt]||o[qt]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(t=L0(t);t!==null;){if(o=t[qt])return o;t=L0(t)}return n}t=o,o=t.parentNode}return null}function kt(t){if(t=t[qt]||t[Jt]){var n=t.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return t}return null}function bt(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(i(33))}function rt(t){var n=t[le];return n||(n=t[le]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function it(t){t[Me]=!0}var dn=new Set,Fe={};function Z(t,n){Te(t,n),Te(t+"Capture",n)}function Te(t,n){for(Fe[t]=n,t=0;t<n.length;t++)dn.add(n[t])}var He=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 _t.call(da,t)?!0:_t.call(Ft,t)?!1:He.test(t)?da[t]=!0:(Ft[t]=!0,!1)}function ua(t,n,o){if(ca(n))if(o===null)t.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+o)}}function Ya(t,n,o){if(o===null)t.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+o)}}function wa(t,n,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(n,o,""+u)}}var Ar,aa;function Sn(t){if(Ar===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);Ar=n&&n[1]||"",aa=-1<o.stack.indexOf(`
    at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Ar+t+aa}var Ur=!1;function ks(t,n){if(!t||Ur)return"";Ur=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(pe){var fe=pe}Reflect.construct(t,[],Se)}else{try{Se.call()}catch(pe){fe=pe}t.call(Se.prototype)}}else{try{throw Error()}catch(pe){fe=pe}(Se=t())&&typeof Se.catch=="function"&&Se.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(),R=y[0],F=y[1];if(R&&F){var W=R.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{Ur=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?Sn(o):""}function tc(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 ks(t.type,!1);case 11:return ks(t.type.render,!1);case 1:return ks(t.type,!0);case 31:return Sn("Activity");default:return""}}function ac(t){try{var n="";do n+=tc(t),t=t.return;while(t);return n}catch(o){return`
Error generating stack: `+o.message+`
`+o.stack}}function Na(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 n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function _r(t){var n=Xt(t)?"checked":"value",o=Object.getOwnPropertyDescriptor(t.constructor.prototype,n),u=""+t[n];if(!t.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,y=o.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(R){u=""+R,y.call(this,R)}}),Object.defineProperty(t,n,{enumerable:o.enumerable}),{getValue:function(){return u},setValue:function(R){u=""+R},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Mr(t){t._valueTracker||(t._valueTracker=_r(t))}function Yi(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var o=n.getValue(),u="";return t&&(u=Xt(t)?t.checked?"true":"false":t.value),t=u,t!==o?(n.setValue(t),!0):!1}function Fr(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 yn(t){return t.replace(wo,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function No(t,n,o,u,h,y,R,F){t.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?t.type=R:t.removeAttribute("type"),n!=null?R==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Na(n)):t.value!==""+Na(n)&&(t.value=""+Na(n)):R!=="submit"&&R!=="reset"||t.removeAttribute("value"),n!=null?Ls(t,R,Na(n)):o!=null?Ls(t,R,Na(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=""+Na(F):t.removeAttribute("name")}function di(t,n,o,u,h,y,R,F){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.type=y),n!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||n!=null))return;o=o!=null?""+Na(o):"",n=n!=null?""+Na(n):o,F||n===t.value||(t.value=n),t.defaultValue=n}u=u??h,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=F?t.checked:!!u,t.defaultChecked=!!u,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(t.name=R)}function Ls(t,n,o){n==="number"&&Fr(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function mi(t,n,o,u){if(t=t.options,n){n={};for(var h=0;h<o.length;h++)n["$"+o[h]]=!0;for(o=0;o<t.length;o++)h=n.hasOwnProperty("$"+t[o].value),t[o].selected!==h&&(t[o].selected=h),h&&u&&(t[o].defaultSelected=!0)}else{for(o=""+Na(o),n=null,h=0;h<t.length;h++){if(t[h].value===o){t[h].selected=!0,u&&(t[h].defaultSelected=!0);return}n!==null||t[h].disabled||(n=t[h])}n!==null&&(n.selected=!0)}}function Rs(t,n,o){if(n!=null&&(n=""+Na(n),n!==t.value&&(t.value=n),o==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=o!=null?""+Na(o):""}function xo(t,n,o,u){if(n==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=""),n=o}o=Na(n),t.defaultValue=o,u=t.textContent,u===o&&u!==""&&u!==null&&(t.value=u)}function pr(t,n){if(n){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=n;return}}t.textContent=n}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 nc(t,n,o){var u=n.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":u?t.setProperty(n,o):typeof o!="number"||o===0||To.has(n)?n==="float"?t.cssFloat=o:t[n]=(""+o).trim():t[n]=o+"px"}function Ji(t,n,o){if(n!=null&&typeof n!="object")throw Error(i(62));if(t=t.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var h in n)u=n[h],n.hasOwnProperty(h)&&o[h]!==u&&nc(t,h,u)}else for(var y in n)n.hasOwnProperty(y)&&nc(t,y,n[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 Or=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"]]),So=/^[\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 En(t){return So.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var zn=null;function jr(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 Ds(t){var n=kt(t);if(n&&(t=n.stateNode)){var o=t[Ea]||null;e:switch(t=n.stateNode,n.type){case"input":if(No(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),n=o.name,o.type==="radio"&&n!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+yn(""+n)+'"][type="radio"]'),n=0;n<o.length;n++){var u=o[n];if(u!==t&&u.form===t.form){var h=u[Ea]||null;if(!h)throw Error(i(90));No(u,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<o.length;n++)u=o[n],u.form===t.form&&Yi(u)}break e;case"textarea":Rs(t,o.value,o.defaultValue);break e;case"select":n=o.value,n!=null&&mi(t,!!o.multiple,n,!1)}}}var hi=!1;function ko(t,n,o){if(hi)return t(n,o);hi=!0;try{var u=t(n);return u}finally{if(hi=!1,(fi!==null||Je!==null)&&(Qc(),fi&&(n=fi,t=Je,Je=fi=null,Ds(n),t)))for(n=0;n<t.length;n++)Ds(t[n])}}function Ai(t,n){var o=t.stateNode;if(o===null)return null;var u=o[Ea]||null;if(u===null)return null;o=u[n];e:switch(n){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,n,typeof o));return o}var mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qn=!1;if(mn)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,n=A,o=n.length,u,h="value"in Vn?Vn.value:Vn.textContent,y=h.length;for(t=0;t<o&&n[t]===h[t];t++);var R=o-t;for(u=1;u<=R&&n[o-u]===h[y-u];u++);return b=h.slice(t,1<u?1-u:void 0)}function O(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function Y(){return!0}function de(){return!1}function Ee(t){function n(o,u,h,y,R){this._reactName=o,this._targetInst=h,this.type=u,this.nativeEvent=y,this.target=R,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(n.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}),n}var Ge={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},It=Ee(Ge),ht=E({},Ge,{view:0,detail:0}),ma=Ee(ht),Qa,Bs,Xi,$i=E({},ht,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Do,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!==Xi&&(Xi&&t.type==="mousemove"?(Qa=t.screenX-Xi.screenX,Bs=t.screenY-Xi.screenY):Bs=Qa=0,Xi=t),Qa)},movementY:function(t){return"movementY"in t?t.movementY:Bs}}),rc=Ee($i),ic=E({},$i,{dataTransfer:0}),hd=Ee(ic),Ad=E({},ht,{relatedTarget:0}),Lo=Ee(Ad),pd=E({},Ge,{animationName:0,elapsedTime:0,pseudoElement:0}),yd=Ee(pd),Ed=E({},Ge,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),bd=Ee(Ed),Id=E({},Ge,{data:0}),Ro=Ee(Id),vd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cd={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"},wd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Nd(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=wd[t])?!!n[t]:!1}function Do(){return Nd}var xd=E({},ht,{key:function(t){if(t.key){var n=vd[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=O(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Cd[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Do,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}}),Td=Ee(xd),sc=E({},$i,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oc=Ee(sc),Sd=E({},ht,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Do}),kd=Ee(Sd),Ld=E({},Ge,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rd=Ee(Ld),Dd=E({},$i,{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}),lc=Ee(Dd),Bd=E({},Ge,{newState:0,oldState:0}),Ud=Ee(Bd),_d=[9,13,27,32],pi=mn&&"CompositionEvent"in window,yi=null;mn&&"documentMode"in document&&(yi=document.documentMode);var cc=mn&&"TextEvent"in window&&!yi,Bo=mn&&(!pi||yi&&8<yi&&11>=yi),ue=" ",Le=!1;function Ke(t,n){switch(t){case"keyup":return _d.indexOf(n.keyCode)!==-1;case"keydown":return n.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 Qt(t,n){switch(t){case"compositionend":return at(n);case"keypress":return n.which!==32?null:(Le=!0,ue);case"textInput":return t=n.data,t===ue&&Le?null:t;default:return null}}function kn(t,n){if(ot)return t==="compositionend"||!pi&&Ke(t,n)?(t=D(),b=A=Vn=null,ot=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Bo&&n.locale!=="ko"?null:n.data;default:return null}}var bn={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 sn(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!bn[t.type]:n==="textarea"}function In(t,n,o,u){fi?Je?Je.push(u):Je=[u]:fi=u,n=Yc(n,"onChange"),0<n.length&&(o=new It("onChange","change",null,o,u),t.push({event:o,listeners:n}))}var Pr=null,Ln=null;function Md(t){b0(t,0)}function uc(t){var n=bt(t);if(Yi(n))return t}function Hh(t,n){if(t==="change")return n}var zh=!1;if(mn){var Fd;if(mn){var Od="oninput"in document;if(!Od){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),Od=typeof Qh.oninput=="function"}Fd=Od}else Fd=!1;zh=Fd&&(!document.documentMode||9<document.documentMode)}function Vh(){Pr&&(Pr.detachEvent("onpropertychange",Gh),Ln=Pr=null)}function Gh(t){if(t.propertyName==="value"&&uc(Ln)){var n=[];In(n,Ln,t,jr(t)),ko(Md,n)}}function $I(t,n,o){t==="focusin"?(Vh(),Pr=n,Ln=o,Pr.attachEvent("onpropertychange",Gh)):t==="focusout"&&Vh()}function ZI(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return uc(Ln)}function ev(t,n){if(t==="click")return uc(n)}function tv(t,n){if(t==="input"||t==="change")return uc(n)}function av(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var Rn=typeof Object.is=="function"?Object.is:av;function Uo(t,n){if(Rn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var o=Object.keys(t),u=Object.keys(n);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var h=o[u];if(!_t.call(n,h)||!Rn(t[h],n[h]))return!1}return!0}function Kh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function qh(t,n){var o=Kh(t);t=0;for(var u;o;){if(o.nodeType===3){if(u=t+o.textContent.length,t<=n&&u>=n)return{node:o,offset:n-t};t=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Kh(o)}}function Wh(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Wh(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Yh(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=Fr(t.document);n instanceof t.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)t=n.contentWindow;else break;n=Fr(t.document)}return n}function jd(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var nv=mn&&"documentMode"in document&&11>=document.documentMode,Us=null,Pd=null,_o=null,Hd=!1;function Jh(t,n,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Hd||Us==null||Us!==Fr(u)||(u=Us,"selectionStart"in u&&jd(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&&Uo(_o,u)||(_o=u,u=Yc(Pd,"onSelect"),0<u.length&&(n=new It("onSelect","select",null,n,o),t.push({event:n,listeners:u}),n.target=Us)))}function Zi(t,n){var o={};return o[t.toLowerCase()]=n.toLowerCase(),o["Webkit"+t]="webkit"+n,o["Moz"+t]="moz"+n,o}var _s={animationend:Zi("Animation","AnimationEnd"),animationiteration:Zi("Animation","AnimationIteration"),animationstart:Zi("Animation","AnimationStart"),transitionrun:Zi("Transition","TransitionRun"),transitionstart:Zi("Transition","TransitionStart"),transitioncancel:Zi("Transition","TransitionCancel"),transitionend:Zi("Transition","TransitionEnd")},zd={},Xh={};mn&&(Xh=document.createElement("div").style,"AnimationEvent"in window||(delete _s.animationend.animation,delete _s.animationiteration.animation,delete _s.animationstart.animation),"TransitionEvent"in window||delete _s.transitionend.transition);function es(t){if(zd[t])return zd[t];if(!_s[t])return t;var n=_s[t],o;for(o in n)if(n.hasOwnProperty(o)&&o in Xh)return zd[t]=n[o];return t}var $h=es("animationend"),Zh=es("animationiteration"),eA=es("animationstart"),rv=es("transitionrun"),iv=es("transitionstart"),sv=es("transitioncancel"),tA=es("transitionend"),aA=new Map,Qd="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(" ");Qd.push("scrollEnd");function sr(t,n){aA.set(t,n),Z(n,[t])}var nA=new WeakMap;function Gn(t,n){if(typeof t=="object"&&t!==null){var o=nA.get(t);return o!==void 0?o:(n={value:t,source:n,stack:ac(n)},nA.set(t,n),n)}return{value:t,source:n,stack:ac(n)}}var Kn=[],Ms=0,Vd=0;function dc(){for(var t=Ms,n=Vd=Ms=0;n<t;){var o=Kn[n];Kn[n++]=null;var u=Kn[n];Kn[n++]=null;var h=Kn[n];Kn[n++]=null;var y=Kn[n];if(Kn[n++]=null,u!==null&&h!==null){var R=u.pending;R===null?h.next=h:(h.next=R.next,R.next=h),u.pending=h}y!==0&&rA(o,h,y)}}function mc(t,n,o,u){Kn[Ms++]=t,Kn[Ms++]=n,Kn[Ms++]=o,Kn[Ms++]=u,Vd|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function Gd(t,n,o,u){return mc(t,n,o,u),gc(t)}function Fs(t,n){return mc(t,null,null,n),gc(t)}function rA(t,n,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&&n!==null&&(h=31-N(o),t=y.hiddenUpdates,u=t[h],u===null?t[h]=[n]:u.push(n),n.lane=o|536870912),y):null}function gc(t){if(50<sl)throw sl=0,Xm=null,Error(i(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var Os={};function ov(t,n,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=n,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 Dn(t,n,o,u){return new ov(t,n,o,u)}function Kd(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Hr(t,n){var o=t.alternate;return o===null?(o=Dn(t.tag,n,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=n,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,n=t.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function iA(t,n){t.flags&=65011714;var o=t.alternate;return o===null?(t.childLanes=0,t.lanes=n,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,n=o.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function fc(t,n,o,u,h,y){var R=0;if(u=t,typeof t=="function")Kd(t)&&(R=1);else if(typeof t=="string")R=cC(t,o,Ie.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case Q:return t=Dn(31,o,n,h),t.elementType=Q,t.lanes=y,t;case x:return ts(o.children,h,y,n);case T:R=8,h|=24;break;case S:return t=Dn(12,o,n,h|2),t.elementType=S,t.lanes=y,t;case _:return t=Dn(13,o,n,h),t.elementType=_,t.lanes=y,t;case j:return t=Dn(19,o,n,h),t.elementType=j,t.lanes=y,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case k:case L:R=10;break e;case B:R=9;break e;case P:R=11;break e;case V:R=14;break e;case H:R=16,u=null;break e}R=29,o=Error(i(130,t===null?"null":typeof t,"")),u=null}return n=Dn(R,o,n,h),n.elementType=t,n.type=u,n.lanes=y,n}function ts(t,n,o,u){return t=Dn(7,t,u,n),t.lanes=o,t}function qd(t,n,o){return t=Dn(6,t,null,n),t.lanes=o,t}function Wd(t,n,o){return n=Dn(4,t.children!==null?t.children:[],t.key,n),n.lanes=o,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var js=[],Ps=0,hc=null,Ac=0,qn=[],Wn=0,as=null,zr=1,Qr="";function ns(t,n){js[Ps++]=Ac,js[Ps++]=hc,hc=t,Ac=n}function sA(t,n,o){qn[Wn++]=zr,qn[Wn++]=Qr,qn[Wn++]=as,as=t;var u=zr;t=Qr;var h=32-N(u)-1;u&=~(1<<h),o+=1;var y=32-N(n)+h;if(30<y){var R=h-h%5;y=(u&(1<<R)-1).toString(32),u>>=R,h-=R,zr=1<<32-N(n)+h|o<<h|u,Qr=y+t}else zr=1<<y|o<<h|u,Qr=t}function Yd(t){t.return!==null&&(ns(t,1),sA(t,1,0))}function Jd(t){for(;t===hc;)hc=js[--Ps],js[Ps]=null,Ac=js[--Ps],js[Ps]=null;for(;t===as;)as=qn[--Wn],qn[Wn]=null,Qr=qn[--Wn],qn[Wn]=null,zr=qn[--Wn],qn[Wn]=null}var gn=null,ba=null,Vt=!1,rs=null,yr=!1,Xd=Error(i(519));function is(t){var n=Error(i(418,""));throw Oo(Gn(n,t)),Xd}function oA(t){var n=t.stateNode,o=t.type,u=t.memoizedProps;switch(n[qt]=t,n[Ea]=u,o){case"dialog":Ut("cancel",n),Ut("close",n);break;case"iframe":case"object":case"embed":Ut("load",n);break;case"video":case"audio":for(o=0;o<ll.length;o++)Ut(ll[o],n);break;case"source":Ut("error",n);break;case"img":case"image":case"link":Ut("error",n),Ut("load",n);break;case"details":Ut("toggle",n);break;case"input":Ut("invalid",n),di(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Mr(n);break;case"select":Ut("invalid",n);break;case"textarea":Ut("invalid",n),xo(n,u.value,u.defaultValue,u.children),Mr(n)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||n.textContent===""+o||u.suppressHydrationWarning===!0||w0(n.textContent,o)?(u.popover!=null&&(Ut("beforetoggle",n),Ut("toggle",n)),u.onScroll!=null&&Ut("scroll",n),u.onScrollEnd!=null&&Ut("scrollend",n),u.onClick!=null&&(n.onclick=Jc),n=!0):n=!1,n||is(t)}function lA(t){for(gn=t.return;gn;)switch(gn.tag){case 5:case 13:yr=!1;return;case 27:case 3:yr=!0;return;default:gn=gn.return}}function Mo(t){if(t!==gn)return!1;if(!Vt)return lA(t),Vt=!0,!1;var n=t.tag,o;if((o=n!==3&&n!==27)&&((o=n===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||gg(t.type,t.memoizedProps)),o=!o),o&&ba&&is(t),lA(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));e:{for(t=t.nextSibling,n=0;t;){if(t.nodeType===8)if(o=t.data,o==="/$"){if(n===0){ba=lr(t.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++;t=t.nextSibling}ba=null}}else n===27?(n=ba,Ui(t.type)?(t=pg,pg=null,ba=t):ba=n):ba=gn?lr(t.stateNode.nextSibling):null;return!0}function Fo(){ba=gn=null,Vt=!1}function cA(){var t=rs;return t!==null&&(wn===null?wn=t:wn.push.apply(wn,t),rs=null),t}function Oo(t){rs===null?rs=[t]:rs.push(t)}var $d=q(null),ss=null,Vr=null;function Ei(t,n,o){ne($d,n._currentValue),n._currentValue=o}function Gr(t){t._currentValue=$d.current,ee($d)}function Zd(t,n,o){for(;t!==null;){var u=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),t===o)break;t=t.return}}function em(t,n,o,u){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var y=h.dependencies;if(y!==null){var R=h.child;y=y.firstContext;e:for(;y!==null;){var F=y;y=h;for(var W=0;W<n.length;W++)if(F.context===n[W]){y.lanes|=o,F=y.alternate,F!==null&&(F.lanes|=o),Zd(y.return,o,t),u||(R=null);break e}y=F.next}}else if(h.tag===18){if(R=h.return,R===null)throw Error(i(341));R.lanes|=o,y=R.alternate,y!==null&&(y.lanes|=o),Zd(R,o,t),R=null}else R=h.child;if(R!==null)R.return=h;else for(R=h;R!==null;){if(R===t){R=null;break}if(h=R.sibling,h!==null){h.return=R.return,R=h;break}R=R.return}h=R}}function jo(t,n,o,u){t=null;for(var h=n,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 R=h.alternate;if(R===null)throw Error(i(387));if(R=R.memoizedProps,R!==null){var F=h.type;Rn(h.pendingProps.value,R.value)||(t!==null?t.push(F):t=[F])}}else if(h===Be.current){if(R=h.alternate,R===null)throw Error(i(387));R.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(fl):t=[fl])}h=h.return}t!==null&&em(n,t,o,u),n.flags|=262144}function pc(t){for(t=t.firstContext;t!==null;){if(!Rn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function os(t){ss=t,Vr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function on(t){return uA(ss,t)}function yc(t,n){return ss===null&&os(t),uA(t,n)}function uA(t,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},Vr===null){if(t===null)throw Error(i(308));Vr=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else Vr=Vr.next=n;return o}var lv=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(o,u){t.push(u)}};this.abort=function(){n.aborted=!0,t.forEach(function(o){return o()})}},cv=r.unstable_scheduleCallback,uv=r.unstable_NormalPriority,Ma={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tm(){return{controller:new lv,data:new Map,refCount:0}}function Po(t){t.refCount--,t.refCount===0&&cv(uv,function(){t.controller.abort()})}var Ho=null,am=0,Hs=0,zs=null;function dv(t,n){if(Ho===null){var o=Ho=[];am=0,Hs=rg(),zs={status:"pending",value:void 0,then:function(u){o.push(u)}}}return am++,n.then(dA,dA),n}function dA(){if(--am===0&&Ho!==null){zs!==null&&(zs.status="fulfilled");var t=Ho;Ho=null,Hs=0,zs=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function mv(t,n){var o=[],u={status:"pending",value:null,reason:null,then:function(h){o.push(h)}};return t.then(function(){u.status="fulfilled",u.value=n;for(var h=0;h<o.length;h++)(0,o[h])(n)},function(h){for(u.status="rejected",u.reason=h,h=0;h<o.length;h++)(0,o[h])(void 0)}),u}var mA=X.S;X.S=function(t,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&dv(t,n),mA!==null&&mA(t,n)};var ls=q(null);function nm(){var t=ls.current;return t!==null?t:oa.pooledCache}function Ec(t,n){n===null?ne(ls,ls.current):ne(ls,n.pool)}function gA(){var t=nm();return t===null?null:{parent:Ma._currentValue,pool:t}}var zo=Error(i(460)),fA=Error(i(474)),bc=Error(i(542)),rm={then:function(){}};function hA(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Ic(){}function AA(t,n,o){switch(o=t[o],o===void 0?t.push(n):o!==n&&(n.then(Ic,Ic),n=o),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,yA(t),t;default:if(typeof n.status=="string")n.then(Ic,Ic);else{if(t=oa,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=n,t.status="pending",t.then(function(u){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=u}},function(u){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,yA(t),t}throw Qo=n,zo}}var Qo=null;function pA(){if(Qo===null)throw Error(i(459));var t=Qo;return Qo=null,t}function yA(t){if(t===zo||t===bc)throw Error(i(483))}var bi=!1;function im(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sm(t,n){t=t.updateQueue,n.updateQueue===t&&(n.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,n,o){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(Wt&2)!==0){var h=u.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),u.pending=n,n=gc(t),rA(t,null,o),n}return mc(t,u,n,o),gc(t)}function Vo(t,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194048)!==0)){var u=n.lanes;u&=t.pendingLanes,o|=u,n.lanes=o,ui(t,o)}}function om(t,n){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 R={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?h=y=R:y=y.next=R,o=o.next}while(o!==null);y===null?h=y=n:y=y.next=n}else h=y=n;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=n:t.next=n,o.lastBaseUpdate=n}var lm=!1;function Go(){if(lm){var t=zs;if(t!==null)throw t}}function Ko(t,n,o,u){lm=!1;var h=t.updateQueue;bi=!1;var y=h.firstBaseUpdate,R=h.lastBaseUpdate,F=h.shared.pending;if(F!==null){h.shared.pending=null;var W=F,ge=W.next;W.next=null,R===null?y=ge:R.next=ge,R=W;var ve=t.alternate;ve!==null&&(ve=ve.updateQueue,F=ve.lastBaseUpdate,F!==R&&(F===null?ve.firstBaseUpdate=ge:F.next=ge,ve.lastBaseUpdate=W))}if(y!==null){var Se=h.baseState;R=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===Hs&&(lm=!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=n;var ea=o;switch(st.tag){case 1:if(mt=st.payload,typeof mt=="function"){Se=mt.call(ea,Se,fe);break e}Se=mt;break e;case 3:mt.flags=mt.flags&-65537|128;case 0:if(mt=st.payload,fe=typeof mt=="function"?mt.call(ea,Se,fe):mt,fe==null)break e;Se=E({},Se,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=Se):ve=ve.next=pe,R|=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=Se),h.baseState=W,h.firstBaseUpdate=ge,h.lastBaseUpdate=ve,y===null&&(h.shared.lanes=0),Li|=R,t.lanes=R,t.memoizedState=Se}}function EA(t,n){if(typeof t!="function")throw Error(i(191,t));t.call(n)}function bA(t,n){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)EA(o[t],n)}var Qs=q(null),vc=q(0);function IA(t,n){t=$r,ne(vc,t),ne(Qs,n),$r=t|n.baseLanes}function cm(){ne(vc,$r),ne(Qs,Qs.current)}function um(){$r=vc.current,ee(Qs),ee(vc)}var Ci=0,Tt=null,$t=null,ka=null,Cc=!1,Vs=!1,cs=!1,wc=0,qo=0,Gs=null,gv=0;function xa(){throw Error(i(321))}function dm(t,n){if(n===null)return!1;for(var o=0;o<n.length&&o<t.length;o++)if(!Rn(t[o],n[o]))return!1;return!0}function mm(t,n,o,u,h,y){return Ci=y,Tt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,X.H=t===null||t.memoizedState===null?rp:ip,cs=!1,y=o(u,h),cs=!1,Vs&&(y=CA(n,o,u,h)),vA(t),y}function vA(t){X.H=Lc;var n=$t!==null&&$t.next!==null;if(Ci=0,ka=$t=Tt=null,Cc=!1,qo=0,Gs=null,n)throw Error(i(300));t===null||Va||(t=t.dependencies,t!==null&&pc(t)&&(Va=!0))}function CA(t,n,o,u){Tt=t;var h=0;do{if(Vs&&(Gs=null),qo=0,Vs=!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=bv,y=n(o,u)}while(Vs);return y}function fv(){var t=X.H,n=t.useState()[0];return n=typeof n.then=="function"?Wo(n):n,t=t.useState()[0],($t!==null?$t.memoizedState:null)!==t&&(Tt.flags|=1024),n}function gm(){var t=wc!==0;return wc=0,t}function fm(t,n,o){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~o}function hm(t){if(Cc){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Cc=!1}Ci=0,ka=$t=Tt=null,Vs=!1,qo=wc=0,Gs=null}function vn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ka===null?Tt.memoizedState=ka=t:ka=ka.next=t,ka}function La(){if($t===null){var t=Tt.alternate;t=t!==null?t.memoizedState:null}else t=$t.next;var n=ka===null?Tt.memoizedState:ka.next;if(n!==null)ka=n,$t=t;else{if(t===null)throw Tt.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?Tt.memoizedState=ka=t:ka=ka.next=t}return ka}function Am(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wo(t){var n=qo;return qo+=1,Gs===null&&(Gs=[]),t=AA(Gs,t,n),n=Tt,(ka===null?n.memoizedState:ka.next)===null&&(n=n.alternate,X.H=n===null||n.memoizedState===null?rp:ip),t}function Nc(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Wo(t);if(t.$$typeof===L)return on(t)}throw Error(i(438,String(t)))}function pm(t){var n=null,o=Tt.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var u=Tt.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),o===null&&(o=Am(),Tt.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0)for(o=n.data[n.index]=Array(t),u=0;u<t;u++)o[u]=G;return n.index++,o}function Kr(t,n){return typeof n=="function"?n(t):n}function xc(t){var n=La();return ym(n,$t,t)}function ym(t,n,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 R=h.next;h.next=y.next,y.next=R}n.baseQueue=h=y,u.pending=null}if(y=t.baseState,h===null)t.memoizedState=y;else{n=h.next;var F=R=null,W=null,ge=n,ve=!1;do{var Se=ge.lane&-536870913;if(Se!==ge.lane?(Ot&Se)===Se:(Ci&Se)===Se){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}),Se===Hs&&(ve=!0);else if((Ci&fe)===fe){ge=ge.next,fe===Hs&&(ve=!0);continue}else Se={lane:0,revertLane:ge.revertLane,action:ge.action,hasEagerState:ge.hasEagerState,eagerState:ge.eagerState,next:null},W===null?(F=W=Se,R=y):W=W.next=Se,Tt.lanes|=fe,Li|=fe;Se=ge.action,cs&&o(y,Se),y=ge.hasEagerState?ge.eagerState:o(y,Se)}else fe={lane:Se,revertLane:ge.revertLane,action:ge.action,hasEagerState:ge.hasEagerState,eagerState:ge.eagerState,next:null},W===null?(F=W=fe,R=y):W=W.next=fe,Tt.lanes|=Se,Li|=Se;ge=ge.next}while(ge!==null&&ge!==n);if(W===null?R=y:W.next=F,!Rn(y,t.memoizedState)&&(Va=!0,ve&&(o=zs,o!==null)))throw o;t.memoizedState=y,t.baseState=R,t.baseQueue=W,u.lastRenderedState=y}return h===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function Em(t){var n=La(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=t;var u=o.dispatch,h=o.pending,y=n.memoizedState;if(h!==null){o.pending=null;var R=h=h.next;do y=t(y,R.action),R=R.next;while(R!==h);Rn(y,n.memoizedState)||(Va=!0),n.memoizedState=y,n.baseQueue===null&&(n.baseState=y),o.lastRenderedState=y}return[y,u]}function wA(t,n,o){var u=Tt,h=La(),y=Vt;if(y){if(o===void 0)throw Error(i(407));o=o()}else o=n();var R=!Rn(($t||h).memoizedState,o);R&&(h.memoizedState=o,Va=!0),h=h.queue;var F=TA.bind(null,u,h,t);if(Yo(2048,8,F,[t]),h.getSnapshot!==n||R||ka!==null&&ka.memoizedState.tag&1){if(u.flags|=2048,Ks(9,Tc(),xA.bind(null,u,h,o,n),null),oa===null)throw Error(i(349));y||(Ci&124)!==0||NA(u,n,o)}return o}function NA(t,n,o){t.flags|=16384,t={getSnapshot:n,value:o},n=Tt.updateQueue,n===null?(n=Am(),Tt.updateQueue=n,n.stores=[t]):(o=n.stores,o===null?n.stores=[t]:o.push(t))}function xA(t,n,o,u){n.value=o,n.getSnapshot=u,SA(n)&&kA(t)}function TA(t,n,o){return o(function(){SA(n)&&kA(t)})}function SA(t){var n=t.getSnapshot;t=t.value;try{var o=n();return!Rn(t,o)}catch{return!0}}function kA(t){var n=Fs(t,2);n!==null&&Fn(n,t,2)}function bm(t){var n=vn();if(typeof t=="function"){var o=t;if(t=o(),cs){C(!0);try{o()}finally{C(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kr,lastRenderedState:t},n}function LA(t,n,o,u){return t.baseState=o,ym(t,$t,typeof u=="function"?u:Kr)}function hv(t,n,o,u,h){if(kc(t))throw Error(i(485));if(t=n.action,t!==null){var y={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){y.listeners.push(R)}};X.T!==null?o(!0):y.isTransition=!1,u(y),o=n.pending,o===null?(y.next=n.pending=y,RA(n,y)):(y.next=o.next,n.pending=o.next=y)}}function RA(t,n){var o=n.action,u=n.payload,h=t.state;if(n.isTransition){var y=X.T,R={};X.T=R;try{var F=o(h,u),W=X.S;W!==null&&W(R,F),DA(t,n,F)}catch(ge){Im(t,n,ge)}finally{X.T=y}}else try{y=o(h,u),DA(t,n,y)}catch(ge){Im(t,n,ge)}}function DA(t,n,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){BA(t,n,u)},function(u){return Im(t,n,u)}):BA(t,n,o)}function BA(t,n,o){n.status="fulfilled",n.value=o,UA(n),t.state=o,n=t.pending,n!==null&&(o=n.next,o===n?t.pending=null:(o=o.next,n.next=o,RA(t,o)))}function Im(t,n,o){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=o,UA(n),n=n.next;while(n!==u)}t.action=null}function UA(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function _A(t,n){return n}function MA(t,n){if(Vt){var o=oa.formState;if(o!==null){e:{var u=Tt;if(Vt){if(ba){t:{for(var h=ba,y=yr;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}}is(u)}u=!1}u&&(n=o[0])}}return o=vn(),o.memoizedState=o.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_A,lastRenderedState:n},o.queue=u,o=tp.bind(null,Tt,u),u.dispatch=o,u=bm(!1),y=xm.bind(null,Tt,!1,u.queue),u=vn(),h={state:n,dispatch:null,action:t,pending:null},u.queue=h,o=hv.bind(null,Tt,h,y,o),h.dispatch=o,u.memoizedState=t,[n,o,!1]}function FA(t){var n=La();return OA(n,$t,t)}function OA(t,n,o){if(n=ym(t,n,_A)[0],t=xc(Kr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Wo(n)}catch(R){throw R===zo?bc:R}else u=n;n=La();var h=n.queue,y=h.dispatch;return o!==n.memoizedState&&(Tt.flags|=2048,Ks(9,Tc(),Av.bind(null,h,o),null)),[u,y,t]}function Av(t,n){t.action=n}function jA(t){var n=La(),o=$t;if(o!==null)return OA(n,o,t);La(),n=n.memoizedState,o=La();var u=o.queue.dispatch;return o.memoizedState=t,[n,u,!1]}function Ks(t,n,o,u){return t={tag:t,create:o,deps:u,inst:n,next:null},n=Tt.updateQueue,n===null&&(n=Am(),Tt.updateQueue=n),o=n.lastEffect,o===null?n.lastEffect=t.next=t:(u=o.next,o.next=t,t.next=u,n.lastEffect=t),t}function Tc(){return{destroy:void 0,resource:void 0}}function PA(){return La().memoizedState}function Sc(t,n,o,u){var h=vn();u=u===void 0?null:u,Tt.flags|=t,h.memoizedState=Ks(1|n,Tc(),o,u)}function Yo(t,n,o,u){var h=La();u=u===void 0?null:u;var y=h.memoizedState.inst;$t!==null&&u!==null&&dm(u,$t.memoizedState.deps)?h.memoizedState=Ks(n,y,o,u):(Tt.flags|=t,h.memoizedState=Ks(1|n,y,o,u))}function HA(t,n){Sc(8390656,8,t,n)}function zA(t,n){Yo(2048,8,t,n)}function QA(t,n){return Yo(4,2,t,n)}function VA(t,n){return Yo(4,4,t,n)}function GA(t,n){if(typeof n=="function"){t=t();var o=n(t);return function(){typeof o=="function"?o():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function KA(t,n,o){o=o!=null?o.concat([t]):null,Yo(4,4,GA.bind(null,n,t),o)}function vm(){}function qA(t,n){var o=La();n=n===void 0?null:n;var u=o.memoizedState;return n!==null&&dm(n,u[1])?u[0]:(o.memoizedState=[t,n],t)}function WA(t,n){var o=La();n=n===void 0?null:n;var u=o.memoizedState;if(n!==null&&dm(n,u[1]))return u[0];if(u=t(),cs){C(!0);try{t()}finally{C(!1)}}return o.memoizedState=[u,n],u}function Cm(t,n,o){return o===void 0||(Ci&1073741824)!==0?t.memoizedState=n:(t.memoizedState=o,t=Xp(),Tt.lanes|=t,Li|=t,o)}function YA(t,n,o,u){return Rn(o,n)?o:Qs.current!==null?(t=Cm(t,o,u),Rn(t,n)||(Va=!0),t):(Ci&42)===0?(Va=!0,t.memoizedState=o):(t=Xp(),Tt.lanes|=t,Li|=t,n)}function JA(t,n,o,u,h){var y=ie.p;ie.p=y!==0&&8>y?y:8;var R=X.T,F={};X.T=F,xm(t,!1,n,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=mv(W,u);Jo(t,n,ve,Mn(t))}else Jo(t,n,u,Mn(t))}catch(Se){Jo(t,n,{then:function(){},status:"rejected",reason:Se},Mn())}finally{ie.p=y,X.T=R}}function pv(){}function wm(t,n,o,u){if(t.tag!==5)throw Error(i(476));var h=XA(t).queue;JA(t,h,n,ce,o===null?pv:function(){return $A(t),o(u)})}function XA(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kr,lastRenderedState:ce},next:null};var o={};return n.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kr,lastRenderedState:o},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function $A(t){var n=XA(t).next.queue;Jo(t,n,{},Mn())}function Nm(){return on(fl)}function ZA(){return La().memoizedState}function ep(){return La().memoizedState}function yv(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var o=Mn();t=Ii(o);var u=vi(n,t,o);u!==null&&(Fn(u,n,o),Vo(u,n,o)),n={cache:tm()},t.payload=n;return}n=n.return}}function Ev(t,n,o){var u=Mn();o={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null},kc(t)?ap(n,o):(o=Gd(t,n,o,u),o!==null&&(Fn(o,t,u),np(o,n,u)))}function tp(t,n,o){var u=Mn();Jo(t,n,o,u)}function Jo(t,n,o,u){var h={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null};if(kc(t))ap(n,h);else{var y=t.alternate;if(t.lanes===0&&(y===null||y.lanes===0)&&(y=n.lastRenderedReducer,y!==null))try{var R=n.lastRenderedState,F=y(R,o);if(h.hasEagerState=!0,h.eagerState=F,Rn(F,R))return mc(t,n,h,0),oa===null&&dc(),!1}catch{}finally{}if(o=Gd(t,n,h,u),o!==null)return Fn(o,t,u),np(o,n,u),!0}return!1}function xm(t,n,o,u){if(u={lane:2,revertLane:rg(),action:u,hasEagerState:!1,eagerState:null,next:null},kc(t)){if(n)throw Error(i(479))}else n=Gd(t,o,u,2),n!==null&&Fn(n,t,2)}function kc(t){var n=t.alternate;return t===Tt||n!==null&&n===Tt}function ap(t,n){Vs=Cc=!0;var o=t.pending;o===null?n.next=n:(n.next=o.next,o.next=n),t.pending=n}function np(t,n,o){if((o&4194048)!==0){var u=n.lanes;u&=t.pendingLanes,o|=u,n.lanes=o,ui(t,o)}}var Lc={readContext:on,use:Nc,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},rp={readContext:on,use:Nc,useCallback:function(t,n){return vn().memoizedState=[t,n===void 0?null:n],t},useContext:on,useEffect:HA,useImperativeHandle:function(t,n,o){o=o!=null?o.concat([t]):null,Sc(4194308,4,GA.bind(null,n,t),o)},useLayoutEffect:function(t,n){return Sc(4194308,4,t,n)},useInsertionEffect:function(t,n){Sc(4,2,t,n)},useMemo:function(t,n){var o=vn();n=n===void 0?null:n;var u=t();if(cs){C(!0);try{t()}finally{C(!1)}}return o.memoizedState=[u,n],u},useReducer:function(t,n,o){var u=vn();if(o!==void 0){var h=o(n);if(cs){C(!0);try{o(n)}finally{C(!1)}}}else h=n;return u.memoizedState=u.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},u.queue=t,t=t.dispatch=Ev.bind(null,Tt,t),[u.memoizedState,t]},useRef:function(t){var n=vn();return t={current:t},n.memoizedState=t},useState:function(t){t=bm(t);var n=t.queue,o=tp.bind(null,Tt,n);return n.dispatch=o,[t.memoizedState,o]},useDebugValue:vm,useDeferredValue:function(t,n){var o=vn();return Cm(o,t,n)},useTransition:function(){var t=bm(!1);return t=JA.bind(null,Tt,t.queue,!0,!1),vn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,o){var u=Tt,h=vn();if(Vt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=n(),oa===null)throw Error(i(349));(Ot&124)!==0||NA(u,n,o)}h.memoizedState=o;var y={value:o,getSnapshot:n};return h.queue=y,HA(TA.bind(null,u,y,t),[t]),u.flags|=2048,Ks(9,Tc(),xA.bind(null,u,y,o,n),null),o},useId:function(){var t=vn(),n=oa.identifierPrefix;if(Vt){var o=Qr,u=zr;o=(u&~(1<<32-N(u)-1)).toString(32)+o,n="«"+n+"R"+o,o=wc++,0<o&&(n+="H"+o.toString(32)),n+="»"}else o=gv++,n="«"+n+"r"+o.toString(32)+"»";return t.memoizedState=n},useHostTransitionStatus:Nm,useFormState:MA,useActionState:MA,useOptimistic:function(t){var n=vn();n.memoizedState=n.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=xm.bind(null,Tt,!0,o),o.dispatch=n,[t,n]},useMemoCache:pm,useCacheRefresh:function(){return vn().memoizedState=yv.bind(null,Tt)}},ip={readContext:on,use:Nc,useCallback:qA,useContext:on,useEffect:zA,useImperativeHandle:KA,useInsertionEffect:QA,useLayoutEffect:VA,useMemo:WA,useReducer:xc,useRef:PA,useState:function(){return xc(Kr)},useDebugValue:vm,useDeferredValue:function(t,n){var o=La();return YA(o,$t.memoizedState,t,n)},useTransition:function(){var t=xc(Kr)[0],n=La().memoizedState;return[typeof t=="boolean"?t:Wo(t),n]},useSyncExternalStore:wA,useId:ZA,useHostTransitionStatus:Nm,useFormState:FA,useActionState:FA,useOptimistic:function(t,n){var o=La();return LA(o,$t,t,n)},useMemoCache:pm,useCacheRefresh:ep},bv={readContext:on,use:Nc,useCallback:qA,useContext:on,useEffect:zA,useImperativeHandle:KA,useInsertionEffect:QA,useLayoutEffect:VA,useMemo:WA,useReducer:Em,useRef:PA,useState:function(){return Em(Kr)},useDebugValue:vm,useDeferredValue:function(t,n){var o=La();return $t===null?Cm(o,t,n):YA(o,$t.memoizedState,t,n)},useTransition:function(){var t=Em(Kr)[0],n=La().memoizedState;return[typeof t=="boolean"?t:Wo(t),n]},useSyncExternalStore:wA,useId:ZA,useHostTransitionStatus:Nm,useFormState:jA,useActionState:jA,useOptimistic:function(t,n){var o=La();return $t!==null?LA(o,$t,t,n):(o.baseState=t,[t,o.queue.dispatch])},useMemoCache:pm,useCacheRefresh:ep},qs=null,Xo=0;function Rc(t){var n=Xo;return Xo+=1,qs===null&&(qs=[]),AA(qs,t,n)}function $o(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Dc(t,n){throw n.$$typeof===p?Error(i(525)):(t=Object.prototype.toString.call(n),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function sp(t){var n=t._init;return n(t._payload)}function op(t){function n(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;)n(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=Hr(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 R(oe){return t&&oe.alternate===null&&(oe.flags|=67108866),oe}function F(oe,te,me,Ne){return te===null||te.tag!==6?(te=qd(me,oe.mode,Ne),te.return=oe,te):(te=h(te,me),te.return=oe,te)}function W(oe,te,me,Ne){var qe=me.type;return qe===x?ve(oe,te,me.props.children,Ne,me.key):te!==null&&(te.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===H&&sp(qe)===te.type)?(te=h(te,me.props),$o(te,me),te.return=oe,te):(te=fc(me.type,me.key,me.props,null,oe.mode,Ne),$o(te,me),te.return=oe,te)}function ge(oe,te,me,Ne){return te===null||te.tag!==4||te.stateNode.containerInfo!==me.containerInfo||te.stateNode.implementation!==me.implementation?(te=Wd(me,oe.mode,Ne),te.return=oe,te):(te=h(te,me.children||[]),te.return=oe,te)}function ve(oe,te,me,Ne,qe){return te===null||te.tag!==7?(te=ts(me,oe.mode,Ne,qe),te.return=oe,te):(te=h(te,me),te.return=oe,te)}function Se(oe,te,me){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=qd(""+te,oe.mode,me),te.return=oe,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case w:return me=fc(te.type,te.key,te.props,null,oe.mode,me),$o(me,te),me.return=oe,me;case v:return te=Wd(te,oe.mode,me),te.return=oe,te;case H:var Ne=te._init;return te=Ne(te._payload),Se(oe,te,me)}if(Ae(te)||$(te))return te=ts(te,oe.mode,me,null),te.return=oe,te;if(typeof te.then=="function")return Se(oe,Rc(te),me);if(te.$$typeof===L)return Se(oe,yc(oe,te),me);Dc(oe,te)}return null}function fe(oe,te,me,Ne){var qe=te!==null?te.key:null;if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return qe!==null?null:F(oe,te,""+me,Ne);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case w:return me.key===qe?W(oe,te,me,Ne):null;case v:return me.key===qe?ge(oe,te,me,Ne):null;case H:return qe=me._init,me=qe(me._payload),fe(oe,te,me,Ne)}if(Ae(me)||$(me))return qe!==null?null:ve(oe,te,me,Ne,null);if(typeof me.then=="function")return fe(oe,te,Rc(me),Ne);if(me.$$typeof===L)return fe(oe,te,yc(oe,me),Ne);Dc(oe,me)}return null}function pe(oe,te,me,Ne,qe){if(typeof Ne=="string"&&Ne!==""||typeof Ne=="number"||typeof Ne=="bigint")return oe=oe.get(me)||null,F(te,oe,""+Ne,qe);if(typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case w:return oe=oe.get(Ne.key===null?me:Ne.key)||null,W(te,oe,Ne,qe);case v:return oe=oe.get(Ne.key===null?me:Ne.key)||null,ge(te,oe,Ne,qe);case H:var Lt=Ne._init;return Ne=Lt(Ne._payload),pe(oe,te,me,Ne,qe)}if(Ae(Ne)||$(Ne))return oe=oe.get(me)||null,ve(te,oe,Ne,qe,null);if(typeof Ne.then=="function")return pe(oe,te,me,Rc(Ne),qe);if(Ne.$$typeof===L)return pe(oe,te,me,yc(te,Ne),qe);Dc(te,Ne)}return null}function mt(oe,te,me,Ne){for(var qe=null,Lt=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 zt=fe(oe,tt,me[lt],Ne);if(zt===null){tt===null&&(tt=Ka);break}t&&tt&&zt.alternate===null&&n(oe,tt),te=y(zt,te,lt),Lt===null?qe=zt:Lt.sibling=zt,Lt=zt,tt=Ka}if(lt===me.length)return o(oe,tt),Vt&&ns(oe,lt),qe;if(tt===null){for(;lt<me.length;lt++)tt=Se(oe,me[lt],Ne),tt!==null&&(te=y(tt,te,lt),Lt===null?qe=tt:Lt.sibling=tt,Lt=tt);return Vt&&ns(oe,lt),qe}for(tt=u(tt);lt<me.length;lt++)Ka=pe(tt,oe,lt,me[lt],Ne),Ka!==null&&(t&&Ka.alternate!==null&&tt.delete(Ka.key===null?lt:Ka.key),te=y(Ka,te,lt),Lt===null?qe=Ka:Lt.sibling=Ka,Lt=Ka);return t&&tt.forEach(function(ji){return n(oe,ji)}),Vt&&ns(oe,lt),qe}function st(oe,te,me,Ne){if(me==null)throw Error(i(151));for(var qe=null,Lt=null,tt=te,lt=te=0,Ka=null,zt=me.next();tt!==null&&!zt.done;lt++,zt=me.next()){tt.index>lt?(Ka=tt,tt=null):Ka=tt.sibling;var ji=fe(oe,tt,zt.value,Ne);if(ji===null){tt===null&&(tt=Ka);break}t&&tt&&ji.alternate===null&&n(oe,tt),te=y(ji,te,lt),Lt===null?qe=ji:Lt.sibling=ji,Lt=ji,tt=Ka}if(zt.done)return o(oe,tt),Vt&&ns(oe,lt),qe;if(tt===null){for(;!zt.done;lt++,zt=me.next())zt=Se(oe,zt.value,Ne),zt!==null&&(te=y(zt,te,lt),Lt===null?qe=zt:Lt.sibling=zt,Lt=zt);return Vt&&ns(oe,lt),qe}for(tt=u(tt);!zt.done;lt++,zt=me.next())zt=pe(tt,oe,lt,zt.value,Ne),zt!==null&&(t&&zt.alternate!==null&&tt.delete(zt.key===null?lt:zt.key),te=y(zt,te,lt),Lt===null?qe=zt:Lt.sibling=zt,Lt=zt);return t&&tt.forEach(function(IC){return n(oe,IC)}),Vt&&ns(oe,lt),qe}function ea(oe,te,me,Ne){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 w:e:{for(var qe=me.key;te!==null;){if(te.key===qe){if(qe=me.type,qe===x){if(te.tag===7){o(oe,te.sibling),Ne=h(te,me.props.children),Ne.return=oe,oe=Ne;break e}}else if(te.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===H&&sp(qe)===te.type){o(oe,te.sibling),Ne=h(te,me.props),$o(Ne,me),Ne.return=oe,oe=Ne;break e}o(oe,te);break}else n(oe,te);te=te.sibling}me.type===x?(Ne=ts(me.props.children,oe.mode,Ne,me.key),Ne.return=oe,oe=Ne):(Ne=fc(me.type,me.key,me.props,null,oe.mode,Ne),$o(Ne,me),Ne.return=oe,oe=Ne)}return R(oe);case v:e:{for(qe=me.key;te!==null;){if(te.key===qe)if(te.tag===4&&te.stateNode.containerInfo===me.containerInfo&&te.stateNode.implementation===me.implementation){o(oe,te.sibling),Ne=h(te,me.children||[]),Ne.return=oe,oe=Ne;break e}else{o(oe,te);break}else n(oe,te);te=te.sibling}Ne=Wd(me,oe.mode,Ne),Ne.return=oe,oe=Ne}return R(oe);case H:return qe=me._init,me=qe(me._payload),ea(oe,te,me,Ne)}if(Ae(me))return mt(oe,te,me,Ne);if($(me)){if(qe=$(me),typeof qe!="function")throw Error(i(150));return me=qe.call(me),st(oe,te,me,Ne)}if(typeof me.then=="function")return ea(oe,te,Rc(me),Ne);if(me.$$typeof===L)return ea(oe,te,yc(oe,me),Ne);Dc(oe,me)}return typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint"?(me=""+me,te!==null&&te.tag===6?(o(oe,te.sibling),Ne=h(te,me),Ne.return=oe,oe=Ne):(o(oe,te),Ne=qd(me,oe.mode,Ne),Ne.return=oe,oe=Ne),R(oe)):o(oe,te)}return function(oe,te,me,Ne){try{Xo=0;var qe=ea(oe,te,me,Ne);return qs=null,qe}catch(tt){if(tt===zo||tt===bc)throw tt;var Lt=Dn(29,tt,null,oe.mode);return Lt.lanes=Ne,Lt.return=oe,Lt}finally{}}}var Ws=op(!0),lp=op(!1),Yn=q(null),Er=null;function wi(t){var n=t.alternate;ne(Fa,Fa.current&1),ne(Yn,t),Er===null&&(n===null||Qs.current!==null||n.memoizedState!==null)&&(Er=t)}function cp(t){if(t.tag===22){if(ne(Fa,Fa.current),ne(Yn,t),Er===null){var n=t.alternate;n!==null&&n.memoizedState!==null&&(Er=t)}}else Ni()}function Ni(){ne(Fa,Fa.current),ne(Yn,Yn.current)}function qr(t){ee(Yn),Er===t&&(Er=null),ee(Fa)}var Fa=q(0);function Bc(t){for(var n=t;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||Ag(o)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function Tm(t,n,o,u){n=t.memoizedState,o=o(u,n),o=o==null?n:E({},n,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var Sm={enqueueSetState:function(t,n,o){t=t._reactInternals;var u=Mn(),h=Ii(u);h.payload=n,o!=null&&(h.callback=o),n=vi(t,h,u),n!==null&&(Fn(n,t,u),Vo(n,t,u))},enqueueReplaceState:function(t,n,o){t=t._reactInternals;var u=Mn(),h=Ii(u);h.tag=1,h.payload=n,o!=null&&(h.callback=o),n=vi(t,h,u),n!==null&&(Fn(n,t,u),Vo(n,t,u))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var o=Mn(),u=Ii(o);u.tag=2,n!=null&&(u.callback=n),n=vi(t,u,o),n!==null&&(Fn(n,t,o),Vo(n,t,o))}};function up(t,n,o,u,h,y,R){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,y,R):n.prototype&&n.prototype.isPureReactComponent?!Uo(o,u)||!Uo(h,y):!0}function dp(t,n,o,u){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,u),n.state!==t&&Sm.enqueueReplaceState(n,n.state,null)}function us(t,n){var o=n;if("ref"in n){o={};for(var u in n)u!=="ref"&&(o[u]=n[u])}if(t=t.defaultProps){o===n&&(o=E({},o));for(var h in t)o[h]===void 0&&(o[h]=t[h])}return o}var Uc=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=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(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function mp(t){Uc(t)}function gp(t){console.error(t)}function fp(t){Uc(t)}function _c(t,n){try{var o=t.onUncaughtError;o(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function hp(t,n,o){try{var u=t.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function km(t,n,o){return o=Ii(o),o.tag=3,o.payload={element:null},o.callback=function(){_c(t,n)},o}function Ap(t){return t=Ii(t),t.tag=3,t}function pp(t,n,o,u){var h=o.type.getDerivedStateFromError;if(typeof h=="function"){var y=u.value;t.payload=function(){return h(y)},t.callback=function(){hp(n,o,u)}}var R=o.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(t.callback=function(){hp(n,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 Iv(t,n,o,u,h){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=o.alternate,n!==null&&jo(n,o,h,!0),o=Yn.current,o!==null){switch(o.tag){case 13:return Er===null?Zm():o.alternate===null&&Ia===0&&(Ia=3),o.flags&=-257,o.flags|=65536,o.lanes=h,u===rm?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([u]):n.add(u),tg(t,u,h)),!1;case 22:return o.flags|=65536,u===rm?o.flags|=16384:(n=o.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=n):(o=n.retryQueue,o===null?n.retryQueue=new Set([u]):o.add(u)),tg(t,u,h)),!1}throw Error(i(435,o.tag))}return tg(t,u,h),Zm(),!1}if(Vt)return n=Yn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,u!==Xd&&(t=Error(i(422),{cause:u}),Oo(Gn(t,o)))):(u!==Xd&&(n=Error(i(423),{cause:u}),Oo(Gn(n,o))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,u=Gn(u,o),h=km(t.stateNode,u,h),om(t,h),Ia!==4&&(Ia=2)),!1;var y=Error(i(520),{cause:u});if(y=Gn(y,o),il===null?il=[y]:il.push(y),Ia!==4&&(Ia=2),n===null)return!0;u=Gn(u,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,t=h&-h,o.lanes|=t,t=km(o.stateNode,u,t),om(o,t),!1;case 1:if(n=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Ri===null||!Ri.has(y))))return o.flags|=65536,h&=-h,o.lanes|=h,h=Ap(h),pp(h,t,o,u),om(o,h),!1}o=o.return}while(o!==null);return!1}var yp=Error(i(461)),Va=!1;function Ja(t,n,o,u){n.child=t===null?lp(n,null,o,u):Ws(n,t.child,o,u)}function Ep(t,n,o,u,h){o=o.render;var y=n.ref;if("ref"in u){var R={};for(var F in u)F!=="ref"&&(R[F]=u[F])}else R=u;return os(n),u=mm(t,n,o,R,y,h),F=gm(),t!==null&&!Va?(fm(t,n,h),Wr(t,n,h)):(Vt&&F&&Yd(n),n.flags|=1,Ja(t,n,u,h),n.child)}function bp(t,n,o,u,h){if(t===null){var y=o.type;return typeof y=="function"&&!Kd(y)&&y.defaultProps===void 0&&o.compare===null?(n.tag=15,n.type=y,Ip(t,n,y,u,h)):(t=fc(o.type,null,u,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(y=t.child,!Fm(t,h)){var R=y.memoizedProps;if(o=o.compare,o=o!==null?o:Uo,o(R,u)&&t.ref===n.ref)return Wr(t,n,h)}return n.flags|=1,t=Hr(y,u),t.ref=n.ref,t.return=n,n.child=t}function Ip(t,n,o,u,h){if(t!==null){var y=t.memoizedProps;if(Uo(y,u)&&t.ref===n.ref)if(Va=!1,n.pendingProps=u=y,Fm(t,h))(t.flags&131072)!==0&&(Va=!0);else return n.lanes=t.lanes,Wr(t,n,h)}return Lm(t,n,o,u,h)}function vp(t,n,o){var u=n.pendingProps,h=u.children,y=t!==null?t.memoizedState:null;if(u.mode==="hidden"){if((n.flags&128)!==0){if(u=y!==null?y.baseLanes|o:o,t!==null){for(h=n.child=t.child,y=0;h!==null;)y=y|h.lanes|h.childLanes,h=h.sibling;n.childLanes=y&~u}else n.childLanes=0,n.child=null;return Cp(t,n,u,o)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ec(n,y!==null?y.cachePool:null),y!==null?IA(n,y):cm(),cp(n);else return n.lanes=n.childLanes=536870912,Cp(t,n,y!==null?y.baseLanes|o:o,o)}else y!==null?(Ec(n,y.cachePool),IA(n,y),Ni(),n.memoizedState=null):(t!==null&&Ec(n,null),cm(),Ni());return Ja(t,n,h,o),n.child}function Cp(t,n,o,u){var h=nm();return h=h===null?null:{parent:Ma._currentValue,pool:h},n.memoizedState={baseLanes:o,cachePool:h},t!==null&&Ec(n,null),cm(),cp(n),t!==null&&jo(t,n,u,!0),null}function Mc(t,n){var o=n.ref;if(o===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(t===null||t.ref!==o)&&(n.flags|=4194816)}}function Lm(t,n,o,u,h){return os(n),o=mm(t,n,o,u,void 0,h),u=gm(),t!==null&&!Va?(fm(t,n,h),Wr(t,n,h)):(Vt&&u&&Yd(n),n.flags|=1,Ja(t,n,o,h),n.child)}function wp(t,n,o,u,h,y){return os(n),n.updateQueue=null,o=CA(n,u,o,h),vA(t),u=gm(),t!==null&&!Va?(fm(t,n,y),Wr(t,n,y)):(Vt&&u&&Yd(n),n.flags|=1,Ja(t,n,o,y),n.child)}function Np(t,n,o,u,h){if(os(n),n.stateNode===null){var y=Os,R=o.contextType;typeof R=="object"&&R!==null&&(y=on(R)),y=new o(u,y),n.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Sm,n.stateNode=y,y._reactInternals=n,y=n.stateNode,y.props=u,y.state=n.memoizedState,y.refs={},im(n),R=o.contextType,y.context=typeof R=="object"&&R!==null?on(R):Os,y.state=n.memoizedState,R=o.getDerivedStateFromProps,typeof R=="function"&&(Tm(n,o,R,u),y.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(R=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),R!==y.state&&Sm.enqueueReplaceState(y,y.state,null),Ko(n,u,y,h),Go(),y.state=n.memoizedState),typeof y.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(t===null){y=n.stateNode;var F=n.memoizedProps,W=us(o,F);y.props=W;var ge=y.context,ve=o.contextType;R=Os,typeof ve=="object"&&ve!==null&&(R=on(ve));var Se=o.getDerivedStateFromProps;ve=typeof Se=="function"||typeof y.getSnapshotBeforeUpdate=="function",F=n.pendingProps!==F,ve||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(F||ge!==R)&&dp(n,y,u,R),bi=!1;var fe=n.memoizedState;y.state=fe,Ko(n,u,y,h),Go(),ge=n.memoizedState,F||fe!==ge||bi?(typeof Se=="function"&&(Tm(n,o,Se,u),ge=n.memoizedState),(W=bi||up(n,o,W,u,fe,ge,R))?(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"&&(n.flags|=4194308)):(typeof y.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=ge),y.props=u,y.state=ge,y.context=R,u=W):(typeof y.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{y=n.stateNode,sm(t,n),R=n.memoizedProps,ve=us(o,R),y.props=ve,Se=n.pendingProps,fe=y.context,ge=o.contextType,W=Os,typeof ge=="object"&&ge!==null&&(W=on(ge)),F=o.getDerivedStateFromProps,(ge=typeof F=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(R!==Se||fe!==W)&&dp(n,y,u,W),bi=!1,fe=n.memoizedState,y.state=fe,Ko(n,u,y,h),Go();var pe=n.memoizedState;R!==Se||fe!==pe||bi||t!==null&&t.dependencies!==null&&pc(t.dependencies)?(typeof F=="function"&&(Tm(n,o,F,u),pe=n.memoizedState),(ve=bi||up(n,o,ve,u,fe,pe,W)||t!==null&&t.dependencies!==null&&pc(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"&&(n.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof y.componentDidUpdate!="function"||R===t.memoizedProps&&fe===t.memoizedState||(n.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||R===t.memoizedProps&&fe===t.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=pe),y.props=u,y.state=pe,y.context=W,u=ve):(typeof y.componentDidUpdate!="function"||R===t.memoizedProps&&fe===t.memoizedState||(n.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||R===t.memoizedProps&&fe===t.memoizedState||(n.flags|=1024),u=!1)}return y=u,Mc(t,n),u=(n.flags&128)!==0,y||u?(y=n.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),n.flags|=1,t!==null&&u?(n.child=Ws(n,t.child,null,h),n.child=Ws(n,null,o,h)):Ja(t,n,o,h),n.memoizedState=y.state,t=n.child):t=Wr(t,n,h),t}function xp(t,n,o,u){return Fo(),n.flags|=256,Ja(t,n,o,u),n.child}var Rm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dm(t){return{baseLanes:t,cachePool:gA()}}function Bm(t,n,o){return t=t!==null?t.childLanes&~o:0,n&&(t|=Jn),t}function Tp(t,n,o){var u=n.pendingProps,h=!1,y=(n.flags&128)!==0,R;if((R=y)||(R=t!==null&&t.memoizedState===null?!1:(Fa.current&2)!==0),R&&(h=!0,n.flags&=-129),R=(n.flags&32)!==0,n.flags&=-33,t===null){if(Vt){if(h?wi(n):Ni(),Vt){var F=ba,W;if(W=F){e:{for(W=F,F=yr;W.nodeType!==8;){if(!F){F=null;break e}if(W=lr(W.nextSibling),W===null){F=null;break e}}F=W}F!==null?(n.memoizedState={dehydrated:F,treeContext:as!==null?{id:zr,overflow:Qr}:null,retryLane:536870912,hydrationErrors:null},W=Dn(18,null,null,0),W.stateNode=F,W.return=n,n.child=W,gn=n,ba=null,W=!0):W=!1}W||is(n)}if(F=n.memoizedState,F!==null&&(F=F.dehydrated,F!==null))return Ag(F)?n.lanes=32:n.lanes=536870912,null;qr(n)}return F=u.children,u=u.fallback,h?(Ni(),h=n.mode,F=Fc({mode:"hidden",children:F},h),u=ts(u,h,o,null),F.return=n,u.return=n,F.sibling=u,n.child=F,h=n.child,h.memoizedState=Dm(o),h.childLanes=Bm(t,R,o),n.memoizedState=Rm,u):(wi(n),Um(n,F))}if(W=t.memoizedState,W!==null&&(F=W.dehydrated,F!==null)){if(y)n.flags&256?(wi(n),n.flags&=-257,n=_m(t,n,o)):n.memoizedState!==null?(Ni(),n.child=t.child,n.flags|=128,n=null):(Ni(),h=u.fallback,F=n.mode,u=Fc({mode:"visible",children:u.children},F),h=ts(h,F,o,null),h.flags|=2,u.return=n,h.return=n,u.sibling=h,n.child=u,Ws(n,t.child,null,o),u=n.child,u.memoizedState=Dm(o),u.childLanes=Bm(t,R,o),n.memoizedState=Rm,n=h);else if(wi(n),Ag(F)){if(R=F.nextSibling&&F.nextSibling.dataset,R)var ge=R.dgst;R=ge,u=Error(i(419)),u.stack="",u.digest=R,Oo({value:u,source:null,stack:null}),n=_m(t,n,o)}else if(Va||jo(t,n,o,!1),R=(o&t.childLanes)!==0,Va||R){if(R=oa,R!==null&&(u=o&-o,u=(u&42)!==0?1:ta(u),u=(u&(R.suspendedLanes|o))!==0?0:u,u!==0&&u!==W.retryLane))throw W.retryLane=u,Fs(t,u),Fn(R,t,u),yp;F.data==="$?"||Zm(),n=_m(t,n,o)}else F.data==="$?"?(n.flags|=192,n.child=t.child,n=null):(t=W.treeContext,ba=lr(F.nextSibling),gn=n,Vt=!0,rs=null,yr=!1,t!==null&&(qn[Wn++]=zr,qn[Wn++]=Qr,qn[Wn++]=as,zr=t.id,Qr=t.overflow,as=n),n=Um(n,u.children),n.flags|=4096);return n}return h?(Ni(),h=u.fallback,F=n.mode,W=t.child,ge=W.sibling,u=Hr(W,{mode:"hidden",children:u.children}),u.subtreeFlags=W.subtreeFlags&65011712,ge!==null?h=Hr(ge,h):(h=ts(h,F,o,null),h.flags|=2),h.return=n,u.return=n,u.sibling=h,n.child=u,u=h,h=n.child,F=t.child.memoizedState,F===null?F=Dm(o):(W=F.cachePool,W!==null?(ge=Ma._currentValue,W=W.parent!==ge?{parent:ge,pool:ge}:W):W=gA(),F={baseLanes:F.baseLanes|o,cachePool:W}),h.memoizedState=F,h.childLanes=Bm(t,R,o),n.memoizedState=Rm,u):(wi(n),o=t.child,t=o.sibling,o=Hr(o,{mode:"visible",children:u.children}),o.return=n,o.sibling=null,t!==null&&(R=n.deletions,R===null?(n.deletions=[t],n.flags|=16):R.push(t)),n.child=o,n.memoizedState=null,o)}function Um(t,n){return n=Fc({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Fc(t,n){return t=Dn(22,t,null,n),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function _m(t,n,o){return Ws(n,t.child,null,o),t=Um(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Sp(t,n,o){t.lanes|=n;var u=t.alternate;u!==null&&(u.lanes|=n),Zd(t.return,n,o)}function Mm(t,n,o,u,h){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:h}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=u,y.tail=o,y.tailMode=h)}function kp(t,n,o){var u=n.pendingProps,h=u.revealOrder,y=u.tail;if(Ja(t,n,u.children,o),u=Fa.current,(u&2)!==0)u=u&1|2,n.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Sp(t,o,n);else if(t.tag===19)Sp(t,o,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}u&=1}switch(ne(Fa,u),h){case"forwards":for(o=n.child,h=null;o!==null;)t=o.alternate,t!==null&&Bc(t)===null&&(h=o),o=o.sibling;o=h,o===null?(h=n.child,n.child=null):(h=o.sibling,o.sibling=null),Mm(n,!1,h,o,y);break;case"backwards":for(o=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&Bc(t)===null){n.child=h;break}t=h.sibling,h.sibling=o,o=h,h=t}Mm(n,!0,o,null,y);break;case"together":Mm(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Wr(t,n,o){if(t!==null&&(n.dependencies=t.dependencies),Li|=n.lanes,(o&n.childLanes)===0)if(t!==null){if(jo(t,n,o,!1),(o&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(i(153));if(n.child!==null){for(t=n.child,o=Hr(t,t.pendingProps),n.child=o,o.return=n;t.sibling!==null;)t=t.sibling,o=o.sibling=Hr(t,t.pendingProps),o.return=n;o.sibling=null}return n.child}function Fm(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&pc(t)))}function vv(t,n,o){switch(n.tag){case 3:ke(n,n.stateNode.containerInfo),Ei(n,Ma,t.memoizedState.cache),Fo();break;case 27:case 5:pt(n);break;case 4:ke(n,n.stateNode.containerInfo);break;case 10:Ei(n,n.type,n.memoizedProps.value);break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(wi(n),n.flags|=128,null):(o&n.child.childLanes)!==0?Tp(t,n,o):(wi(n),t=Wr(t,n,o),t!==null?t.sibling:null);wi(n);break;case 19:var h=(t.flags&128)!==0;if(u=(o&n.childLanes)!==0,u||(jo(t,n,o,!1),u=(o&n.childLanes)!==0),h){if(u)return kp(t,n,o);n.flags|=128}if(h=n.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 n.lanes=0,vp(t,n,o);case 24:Ei(n,Ma,t.memoizedState.cache)}return Wr(t,n,o)}function Lp(t,n,o){if(t!==null)if(t.memoizedProps!==n.pendingProps)Va=!0;else{if(!Fm(t,o)&&(n.flags&128)===0)return Va=!1,vv(t,n,o);Va=(t.flags&131072)!==0}else Va=!1,Vt&&(n.flags&1048576)!==0&&sA(n,Ac,n.index);switch(n.lanes=0,n.tag){case 16:e:{t=n.pendingProps;var u=n.elementType,h=u._init;if(u=h(u._payload),n.type=u,typeof u=="function")Kd(u)?(t=us(u,t),n.tag=1,n=Np(null,n,u,t,o)):(n.tag=0,n=Lm(null,n,u,t,o));else{if(u!=null){if(h=u.$$typeof,h===P){n.tag=11,n=Ep(null,n,u,t,o);break e}else if(h===V){n.tag=14,n=bp(null,n,u,t,o);break e}}throw n=re(u)||u,Error(i(306,n,""))}}return n;case 0:return Lm(t,n,n.type,n.pendingProps,o);case 1:return u=n.type,h=us(u,n.pendingProps),Np(t,n,u,h,o);case 3:e:{if(ke(n,n.stateNode.containerInfo),t===null)throw Error(i(387));u=n.pendingProps;var y=n.memoizedState;h=y.element,sm(t,n),Ko(n,u,null,o);var R=n.memoizedState;if(u=R.cache,Ei(n,Ma,u),u!==y.cache&&em(n,[Ma],o,!0),Go(),u=R.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:R.cache},n.updateQueue.baseState=y,n.memoizedState=y,n.flags&256){n=xp(t,n,u,o);break e}else if(u!==h){h=Gn(Error(i(424)),n),Oo(h),n=xp(t,n,u,o);break e}else{switch(t=n.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(ba=lr(t.firstChild),gn=n,Vt=!0,rs=null,yr=!0,o=lp(n,null,u,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(Fo(),u===h){n=Wr(t,n,o);break e}Ja(t,n,u,o)}n=n.child}return n;case 26:return Mc(t,n),t===null?(o=U0(n.type,null,n.pendingProps,null))?n.memoizedState=o:Vt||(o=n.type,t=n.pendingProps,u=Xc(Re.current).createElement(o),u[qt]=n,u[Ea]=t,$a(u,o,t),it(u),n.stateNode=u):n.memoizedState=U0(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return pt(n),t===null&&Vt&&(u=n.stateNode=R0(n.type,n.pendingProps,Re.current),gn=n,yr=!0,h=ba,Ui(n.type)?(pg=h,ba=lr(u.firstChild)):ba=h),Ja(t,n,n.pendingProps.children,o),Mc(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&Vt&&((h=u=ba)&&(u=Jv(u,n.type,n.pendingProps,yr),u!==null?(n.stateNode=u,gn=n,ba=lr(u.firstChild),yr=!1,h=!0):h=!1),h||is(n)),pt(n),h=n.type,y=n.pendingProps,R=t!==null?t.memoizedProps:null,u=y.children,gg(h,y)?u=null:R!==null&&gg(h,R)&&(n.flags|=32),n.memoizedState!==null&&(h=mm(t,n,fv,null,null,o),fl._currentValue=h),Mc(t,n),Ja(t,n,u,o),n.child;case 6:return t===null&&Vt&&((t=o=ba)&&(o=Xv(o,n.pendingProps,yr),o!==null?(n.stateNode=o,gn=n,ba=null,t=!0):t=!1),t||is(n)),null;case 13:return Tp(t,n,o);case 4:return ke(n,n.stateNode.containerInfo),u=n.pendingProps,t===null?n.child=Ws(n,null,u,o):Ja(t,n,u,o),n.child;case 11:return Ep(t,n,n.type,n.pendingProps,o);case 7:return Ja(t,n,n.pendingProps,o),n.child;case 8:return Ja(t,n,n.pendingProps.children,o),n.child;case 12:return Ja(t,n,n.pendingProps.children,o),n.child;case 10:return u=n.pendingProps,Ei(n,n.type,u.value),Ja(t,n,u.children,o),n.child;case 9:return h=n.type._context,u=n.pendingProps.children,os(n),h=on(h),u=u(h),n.flags|=1,Ja(t,n,u,o),n.child;case 14:return bp(t,n,n.type,n.pendingProps,o);case 15:return Ip(t,n,n.type,n.pendingProps,o);case 19:return kp(t,n,o);case 31:return u=n.pendingProps,o=n.mode,u={mode:u.mode,children:u.children},t===null?(o=Fc(u,o),o.ref=n.ref,n.child=o,o.return=n,n=o):(o=Hr(t.child,u),o.ref=n.ref,n.child=o,o.return=n,n=o),n;case 22:return vp(t,n,o);case 24:return os(n),u=on(Ma),t===null?(h=nm(),h===null&&(h=oa,y=tm(),h.pooledCache=y,y.refCount++,y!==null&&(h.pooledCacheLanes|=o),h=y),n.memoizedState={parent:u,cache:h},im(n),Ei(n,Ma,h)):((t.lanes&o)!==0&&(sm(t,n),Ko(n,null,null,o),Go()),h=t.memoizedState,y=n.memoizedState,h.parent!==u?(h={parent:u,cache:u},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),Ei(n,Ma,u)):(u=y.cache,Ei(n,Ma,u),u!==h.cache&&em(n,[Ma],o,!0))),Ja(t,n,n.pendingProps.children,o),n.child;case 29:throw n.pendingProps}throw Error(i(156,n.tag))}function Yr(t){t.flags|=4}function Rp(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!j0(n)){if(n=Yn.current,n!==null&&((Ot&4194048)===Ot?Er!==null:(Ot&62914560)!==Ot&&(Ot&536870912)===0||n!==Er))throw Qo=rm,fA;t.flags|=8192}}function Oc(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?sa():536870912,t.lanes|=n,$s|=n)}function Zo(t,n){if(!Vt)switch(t.tailMode){case"hidden":n=t.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.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?n||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function pa(t){var n=t.alternate!==null&&t.alternate.child===t.child,o=0,u=0;if(n)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,n}function Cv(t,n,o){var u=n.pendingProps;switch(Jd(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pa(n),null;case 1:return pa(n),null;case 3:return o=n.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),Gr(Ma),Qe(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(Mo(n)?Yr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,cA())),pa(n),null;case 26:return o=n.memoizedState,t===null?(Yr(n),o!==null?(pa(n),Rp(n,o)):(pa(n),n.flags&=-16777217)):o?o!==t.memoizedState?(Yr(n),pa(n),Rp(n,o)):(pa(n),n.flags&=-16777217):(t.memoizedProps!==u&&Yr(n),pa(n),n.flags&=-16777217),null;case 27:Dt(n),o=Re.current;var h=n.type;if(t!==null&&n.stateNode!=null)t.memoizedProps!==u&&Yr(n);else{if(!u){if(n.stateNode===null)throw Error(i(166));return pa(n),null}t=Ie.current,Mo(n)?oA(n):(t=R0(h,u,o),n.stateNode=t,Yr(n))}return pa(n),null;case 5:if(Dt(n),o=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==u&&Yr(n);else{if(!u){if(n.stateNode===null)throw Error(i(166));return pa(n),null}if(t=Ie.current,Mo(n))oA(n);else{switch(h=Xc(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]=n,t[Ea]=u;e:for(h=n.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===n)break e;for(;h.sibling===null;){if(h.return===null||h.return===n)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}n.stateNode=t;e:switch($a(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&&Yr(n)}}return pa(n),n.flags&=-16777217,null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==u&&Yr(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(i(166));if(t=Re.current,Mo(n)){if(t=n.stateNode,o=n.memoizedProps,u=null,h=gn,h!==null)switch(h.tag){case 27:case 5:u=h.memoizedProps}t[qt]=n,t=!!(t.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||w0(t.nodeValue,o)),t||is(n)}else t=Xc(t).createTextNode(u),t[qt]=n,n.stateNode=t}return pa(n),null;case 13:if(u=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Mo(n),u!==null&&u.dehydrated!==null){if(t===null){if(!h)throw Error(i(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[qt]=n}else Fo(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;pa(n),h=!1}else h=cA(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(qr(n),n):(qr(n),null)}if(qr(n),(n.flags&128)!==0)return n.lanes=o,n;if(o=u!==null,t=t!==null&&t.memoizedState!==null,o){u=n.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&&(n.child.flags|=8192),Oc(n,n.updateQueue),pa(n),null;case 4:return Qe(),t===null&&lg(n.stateNode.containerInfo),pa(n),null;case 10:return Gr(n.type),pa(n),null;case 19:if(ee(Fa),h=n.memoizedState,h===null)return pa(n),null;if(u=(n.flags&128)!==0,y=h.rendering,y===null)if(u)Zo(h,!1);else{if(Ia!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(y=Bc(t),y!==null){for(n.flags|=128,Zo(h,!1),t=y.updateQueue,n.updateQueue=t,Oc(n,t),n.subtreeFlags=0,t=o,o=n.child;o!==null;)iA(o,t),o=o.sibling;return ne(Fa,Fa.current&1|2),n.child}t=t.sibling}h.tail!==null&&se()>Hc&&(n.flags|=128,u=!0,Zo(h,!1),n.lanes=4194304)}else{if(!u)if(t=Bc(y),t!==null){if(n.flags|=128,u=!0,t=t.updateQueue,n.updateQueue=t,Oc(n,t),Zo(h,!0),h.tail===null&&h.tailMode==="hidden"&&!y.alternate&&!Vt)return pa(n),null}else 2*se()-h.renderingStartTime>Hc&&o!==536870912&&(n.flags|=128,u=!0,Zo(h,!1),n.lanes=4194304);h.isBackwards?(y.sibling=n.child,n.child=y):(t=h.last,t!==null?t.sibling=y:n.child=y,h.last=y)}return h.tail!==null?(n=h.tail,h.rendering=n,h.tail=n.sibling,h.renderingStartTime=se(),n.sibling=null,t=Fa.current,ne(Fa,u?t&1|2:t&1),n):(pa(n),null);case 22:case 23:return qr(n),um(),u=n.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(o&536870912)!==0&&(n.flags&128)===0&&(pa(n),n.subtreeFlags&6&&(n.flags|=8192)):pa(n),o=n.updateQueue,o!==null&&Oc(n,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==o&&(n.flags|=2048),t!==null&&ee(ls),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Gr(Ma),pa(n),null;case 25:return null;case 30:return null}throw Error(i(156,n.tag))}function wv(t,n){switch(Jd(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return Gr(Ma),Qe(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return Dt(n),null;case 13:if(qr(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(i(340));Fo()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return ee(Fa),null;case 4:return Qe(),null;case 10:return Gr(n.type),null;case 22:case 23:return qr(n),um(),t!==null&&ee(ls),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return Gr(Ma),null;case 25:return null;default:return null}}function Dp(t,n){switch(Jd(n),n.tag){case 3:Gr(Ma),Qe();break;case 26:case 27:case 5:Dt(n);break;case 4:Qe();break;case 13:qr(n);break;case 19:ee(Fa);break;case 10:Gr(n.type);break;case 22:case 23:qr(n),um(),t!==null&&ee(ls);break;case 24:Gr(Ma)}}function el(t,n){try{var o=n.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,R=o.inst;u=y(),R.destroy=u}o=o.next}while(o!==h)}}catch(F){na(n,n.return,F)}}function xi(t,n,o){try{var u=n.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var y=h.next;u=y;do{if((u.tag&t)===t){var R=u.inst,F=R.destroy;if(F!==void 0){R.destroy=void 0,h=n;var W=o,ge=F;try{ge()}catch(ve){na(h,W,ve)}}}u=u.next}while(u!==y)}}catch(ve){na(n,n.return,ve)}}function Bp(t){var n=t.updateQueue;if(n!==null){var o=t.stateNode;try{bA(n,o)}catch(u){na(t,t.return,u)}}}function Up(t,n,o){o.props=us(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(u){na(t,n,u)}}function tl(t,n){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,n,h)}}function br(t,n){var o=t.ref,u=t.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(h){na(t,n,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,n,h)}else o.current=null}function _p(t){var n=t.type,o=t.memoizedProps,u=t.stateNode;try{e:switch(n){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 Om(t,n,o){try{var u=t.stateNode;Gv(u,t.type,o,n),u[Ea]=n}catch(h){na(t,t.return,h)}}function Mp(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ui(t.type)||t.tag===4}function jm(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Mp(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 Pm(t,n,o){var u=t.tag;if(u===5||u===6)t=t.stateNode,n?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(t,n):(n=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,n.appendChild(t),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=Jc));else if(u!==4&&(u===27&&Ui(t.type)&&(o=t.stateNode,n=null),t=t.child,t!==null))for(Pm(t,n,o),t=t.sibling;t!==null;)Pm(t,n,o),t=t.sibling}function jc(t,n,o){var u=t.tag;if(u===5||u===6)t=t.stateNode,n?o.insertBefore(t,n):o.appendChild(t);else if(u!==4&&(u===27&&Ui(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(jc(t,n,o),t=t.sibling;t!==null;)jc(t,n,o),t=t.sibling}function Fp(t){var n=t.stateNode,o=t.memoizedProps;try{for(var u=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);$a(n,u,o),n[qt]=t,n[Ea]=o}catch(y){na(t,t.return,y)}}var Jr=!1,Ta=!1,Hm=!1,Op=typeof WeakSet=="function"?WeakSet:Set,Ga=null;function Nv(t,n){if(t=t.containerInfo,dg=nu,t=Yh(t),jd(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 R=0,F=-1,W=-1,ge=0,ve=0,Se=t,fe=null;t:for(;;){for(var pe;Se!==o||h!==0&&Se.nodeType!==3||(F=R+h),Se!==y||u!==0&&Se.nodeType!==3||(W=R+u),Se.nodeType===3&&(R+=Se.nodeValue.length),(pe=Se.firstChild)!==null;)fe=Se,Se=pe;for(;;){if(Se===t)break t;if(fe===o&&++ge===h&&(F=R),fe===y&&++ve===u&&(W=R),(pe=Se.nextSibling)!==null)break;Se=fe,fe=Se.parentNode}Se=pe}o=F===-1||W===-1?null:{start:F,end:W}}else o=null}o=o||{start:0,end:0}}else o=null;for(mg={focusedElem:t,selectionRange:o},nu=!1,Ga=n;Ga!==null;)if(n=Ga,t=n.child,(n.subtreeFlags&1024)!==0&&t!==null)t.return=n,Ga=t;else for(;Ga!==null;){switch(n=Ga,y=n.alternate,t=n.flags,n.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&y!==null){t=void 0,o=n,h=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var mt=us(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=n.stateNode.containerInfo,o=t.nodeType,o===9)hg(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":hg(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=n.sibling,t!==null){t.return=n.return,Ga=t;break}Ga=n.return}}function jp(t,n,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:Ti(t,o),u&4&&el(5,o);break;case 1:if(Ti(t,o),u&4)if(t=o.stateNode,n===null)try{t.componentDidMount()}catch(R){na(o,o.return,R)}else{var h=us(o.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(R){na(o,o.return,R)}}u&64&&Bp(o),u&512&&tl(o,o.return);break;case 3:if(Ti(t,o),u&64&&(t=o.updateQueue,t!==null)){if(n=null,o.child!==null)switch(o.child.tag){case 27:case 5:n=o.child.stateNode;break;case 1:n=o.child.stateNode}try{bA(t,n)}catch(R){na(o,o.return,R)}}break;case 27:n===null&&u&4&&Fp(o);case 26:case 5:Ti(t,o),n===null&&u&4&&_p(o),u&512&&tl(o,o.return);break;case 12:Ti(t,o);break;case 13:Ti(t,o),u&4&&zp(t,o),u&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=Uv.bind(null,o),$v(t,o))));break;case 22:if(u=o.memoizedState!==null||Jr,!u){n=n!==null&&n.memoizedState!==null||Ta,h=Jr;var y=Ta;Jr=u,(Ta=n)&&!y?Si(t,o,(o.subtreeFlags&8772)!==0):Ti(t,o),Jr=h,Ta=y}break;case 30:break;default:Ti(t,o)}}function Pp(t){var n=t.alternate;n!==null&&(t.alternate=null,Pp(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&_e(n)),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,Cn=!1;function Xr(t,n,o){for(o=o.child;o!==null;)Hp(t,n,o),o=o.sibling}function Hp(t,n,o){if(U&&typeof U.onCommitFiberUnmount=="function")try{U.onCommitFiberUnmount(ia,o)}catch{}switch(o.tag){case 26:Ta||br(o,n),Xr(t,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Ta||br(o,n);var u=ga,h=Cn;Ui(o.type)&&(ga=o.stateNode,Cn=!1),Xr(t,n,o),ul(o.stateNode),ga=u,Cn=h;break;case 5:Ta||br(o,n);case 6:if(u=ga,h=Cn,ga=null,Xr(t,n,o),ga=u,Cn=h,ga!==null)if(Cn)try{(ga.nodeType===9?ga.body:ga.nodeName==="HTML"?ga.ownerDocument.body:ga).removeChild(o.stateNode)}catch(y){na(o,n,y)}else try{ga.removeChild(o.stateNode)}catch(y){na(o,n,y)}break;case 18:ga!==null&&(Cn?(t=ga,k0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),yl(t)):k0(ga,o.stateNode));break;case 4:u=ga,h=Cn,ga=o.stateNode.containerInfo,Cn=!0,Xr(t,n,o),ga=u,Cn=h;break;case 0:case 11:case 14:case 15:Ta||xi(2,o,n),Ta||xi(4,o,n),Xr(t,n,o);break;case 1:Ta||(br(o,n),u=o.stateNode,typeof u.componentWillUnmount=="function"&&Up(o,n,u)),Xr(t,n,o);break;case 21:Xr(t,n,o);break;case 22:Ta=(u=Ta)||o.memoizedState!==null,Xr(t,n,o),Ta=u;break;default:Xr(t,n,o)}}function zp(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{yl(t)}catch(o){na(n,n.return,o)}}function xv(t){switch(t.tag){case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new Op),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new Op),n;default:throw Error(i(435,t.tag))}}function zm(t,n){var o=xv(t);n.forEach(function(u){var h=_v.bind(null,t,u);o.has(u)||(o.add(u),u.then(h,h))})}function Bn(t,n){var o=n.deletions;if(o!==null)for(var u=0;u<o.length;u++){var h=o[u],y=t,R=n,F=R;e:for(;F!==null;){switch(F.tag){case 27:if(Ui(F.type)){ga=F.stateNode,Cn=!1;break e}break;case 5:ga=F.stateNode,Cn=!1;break e;case 3:case 4:ga=F.stateNode.containerInfo,Cn=!0;break e}F=F.return}if(ga===null)throw Error(i(160));Hp(y,R,h),ga=null,Cn=!1,y=h.alternate,y!==null&&(y.return=null),h.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)Qp(n,t),n=n.sibling}var or=null;function Qp(t,n){var o=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Bn(n,t),Un(t),u&4&&(xi(3,t,t.return),el(3,t),xi(5,t,t.return));break;case 1:Bn(n,t),Un(t),u&512&&(Ta||o===null||br(o,o.return)),u&64&&Jr&&(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(Bn(n,t),Un(t),u&512&&(Ta||o===null||br(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[Me]||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"))),$a(y,u,o),y[qt]=t,it(y),u=y;break e;case"link":var R=F0("link","href",h).get(u+(o.href||""));if(R){for(var F=0;F<R.length;F++)if(y=R[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)){R.splice(F,1);break t}}y=h.createElement(u),$a(y,u,o),h.head.appendChild(y);break;case"meta":if(R=F0("meta","content",h).get(u+(o.content||""))){for(F=0;F<R.length;F++)if(y=R[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)){R.splice(F,1);break t}}y=h.createElement(u),$a(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 O0(h,t.type,t.stateNode);else t.stateNode=M0(h,u,t.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?O0(h,t.type,t.stateNode):M0(h,u,t.memoizedProps)):u===null&&t.stateNode!==null&&Om(t,t.memoizedProps,o.memoizedProps)}break;case 27:Bn(n,t),Un(t),u&512&&(Ta||o===null||br(o,o.return)),o!==null&&u&4&&Om(t,t.memoizedProps,o.memoizedProps);break;case 5:if(Bn(n,t),Un(t),u&512&&(Ta||o===null||br(o,o.return)),t.flags&32){h=t.stateNode;try{pr(h,"")}catch(pe){na(t,t.return,pe)}}u&4&&t.stateNode!=null&&(h=t.memoizedProps,Om(t,h,o!==null?o.memoizedProps:h)),u&1024&&(Hm=!0);break;case 6:if(Bn(n,t),Un(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(eu=null,h=or,or=$c(n.containerInfo),Bn(n,t),or=h,Un(t),u&4&&o!==null&&o.memoizedState.isDehydrated)try{yl(n.containerInfo)}catch(pe){na(t,t.return,pe)}Hm&&(Hm=!1,Vp(t));break;case 4:u=or,or=$c(t.stateNode.containerInfo),Bn(n,t),Un(t),or=u;break;case 12:Bn(n,t),Un(t);break;case 13:Bn(n,t),Un(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Wm=se()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,zm(t,u)));break;case 22:h=t.memoizedState!==null;var W=o!==null&&o.memoizedState!==null,ge=Jr,ve=Ta;if(Jr=ge||h,Ta=ve||W,Bn(n,t),Ta=ve,Jr=ge,Un(t),u&8192)e:for(n=t.stateNode,n._visibility=h?n._visibility&-2:n._visibility|1,h&&(o===null||W||Jr||Ta||ds(t)),o=null,n=t;;){if(n.tag===5||n.tag===26){if(o===null){W=o=n;try{if(y=W.stateNode,h)R=y.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{F=W.stateNode;var Se=W.memoizedProps.style,fe=Se!=null&&Se.hasOwnProperty("display")?Se.display:null;F.style.display=fe==null||typeof fe=="boolean"?"":(""+fe).trim()}}catch(pe){na(W,W.return,pe)}}}else if(n.tag===6){if(o===null){W=n;try{W.stateNode.nodeValue=h?"":W.memoizedProps}catch(pe){na(W,W.return,pe)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;o===n&&(o=null),n=n.return}o===n&&(o=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=t.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,zm(t,o))));break;case 19:Bn(n,t),Un(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,zm(t,u)));break;case 30:break;case 21:break;default:Bn(n,t),Un(t)}}function Un(t){var n=t.flags;if(n&2){try{for(var o,u=t.return;u!==null;){if(Mp(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var h=o.stateNode,y=jm(t);jc(t,y,h);break;case 5:var R=o.stateNode;o.flags&32&&(pr(R,""),o.flags&=-33);var F=jm(t);jc(t,F,R);break;case 3:case 4:var W=o.stateNode.containerInfo,ge=jm(t);Pm(t,ge,W);break;default:throw Error(i(161))}}catch(ve){na(t,t.return,ve)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function Vp(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;Vp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function Ti(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)jp(t,n.alternate,n),n=n.sibling}function ds(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:xi(4,n,n.return),ds(n);break;case 1:br(n,n.return);var o=n.stateNode;typeof o.componentWillUnmount=="function"&&Up(n,n.return,o),ds(n);break;case 27:ul(n.stateNode);case 26:case 5:br(n,n.return),ds(n);break;case 22:n.memoizedState===null&&ds(n);break;case 30:ds(n);break;default:ds(n)}t=t.sibling}}function Si(t,n,o){for(o=o&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,h=t,y=n,R=y.flags;switch(y.tag){case 0:case 11:case 15:Si(h,y,o),el(4,y);break;case 1:if(Si(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++)EA(W[h],F)}catch(ge){na(u,u.return,ge)}}o&&R&64&&Bp(y),tl(y,y.return);break;case 27:Fp(y);case 26:case 5:Si(h,y,o),o&&u===null&&R&4&&_p(y),tl(y,y.return);break;case 12:Si(h,y,o);break;case 13:Si(h,y,o),o&&R&4&&zp(h,y);break;case 22:y.memoizedState===null&&Si(h,y,o),tl(y,y.return);break;case 30:break;default:Si(h,y,o)}n=n.sibling}}function Qm(t,n){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&Po(o))}function Vm(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Po(t))}function Ir(t,n,o,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Gp(t,n,o,u),n=n.sibling}function Gp(t,n,o,u){var h=n.flags;switch(n.tag){case 0:case 11:case 15:Ir(t,n,o,u),h&2048&&el(9,n);break;case 1:Ir(t,n,o,u);break;case 3:Ir(t,n,o,u),h&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Po(t)));break;case 12:if(h&2048){Ir(t,n,o,u),t=n.stateNode;try{var y=n.memoizedProps,R=y.id,F=y.onPostCommit;typeof F=="function"&&F(R,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(W){na(n,n.return,W)}}else Ir(t,n,o,u);break;case 13:Ir(t,n,o,u);break;case 23:break;case 22:y=n.stateNode,R=n.alternate,n.memoizedState!==null?y._visibility&2?Ir(t,n,o,u):al(t,n):y._visibility&2?Ir(t,n,o,u):(y._visibility|=2,Ys(t,n,o,u,(n.subtreeFlags&10256)!==0)),h&2048&&Qm(R,n);break;case 24:Ir(t,n,o,u),h&2048&&Vm(n.alternate,n);break;default:Ir(t,n,o,u)}}function Ys(t,n,o,u,h){for(h=h&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;){var y=t,R=n,F=o,W=u,ge=R.flags;switch(R.tag){case 0:case 11:case 15:Ys(y,R,F,W,h),el(8,R);break;case 23:break;case 22:var ve=R.stateNode;R.memoizedState!==null?ve._visibility&2?Ys(y,R,F,W,h):al(y,R):(ve._visibility|=2,Ys(y,R,F,W,h)),h&&ge&2048&&Qm(R.alternate,R);break;case 24:Ys(y,R,F,W,h),h&&ge&2048&&Vm(R.alternate,R);break;default:Ys(y,R,F,W,h)}n=n.sibling}}function al(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var o=t,u=n,h=u.flags;switch(u.tag){case 22:al(o,u),h&2048&&Qm(u.alternate,u);break;case 24:al(o,u),h&2048&&Vm(u.alternate,u);break;default:al(o,u)}n=n.sibling}}var nl=8192;function Js(t){if(t.subtreeFlags&nl)for(t=t.child;t!==null;)Kp(t),t=t.sibling}function Kp(t){switch(t.tag){case 26:Js(t),t.flags&nl&&t.memoizedState!==null&&dC(or,t.memoizedState,t.memoizedProps);break;case 5:Js(t);break;case 3:case 4:var n=or;or=$c(t.stateNode.containerInfo),Js(t),or=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=nl,nl=16777216,Js(t),nl=n):Js(t));break;default:Js(t)}}function qp(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function rl(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var u=n[o];Ga=u,Yp(u,t)}qp(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Wp(t),t=t.sibling}function Wp(t){switch(t.tag){case 0:case 11:case 15:rl(t),t.flags&2048&&xi(9,t,t.return);break;case 3:rl(t);break;case 12:rl(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Pc(t)):rl(t);break;default:rl(t)}}function Pc(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var u=n[o];Ga=u,Yp(u,t)}qp(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:xi(8,n,n.return),Pc(n);break;case 22:o=n.stateNode,o._visibility&2&&(o._visibility&=-3,Pc(n));break;default:Pc(n)}t=t.sibling}}function Yp(t,n){for(;Ga!==null;){var o=Ga;switch(o.tag){case 0:case 11:case 15:xi(8,o,n);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:Po(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(Pp(u),u===o){Ga=null;break e}if(h!==null){h.return=y,Ga=h;break e}Ga=y}}}var Tv={getCacheForType:function(t){var n=on(Ma),o=n.data.get(t);return o===void 0&&(o=t(),n.data.set(t,o)),o}},Sv=typeof WeakMap=="function"?WeakMap:Map,Wt=0,oa=null,Bt=null,Ot=0,Yt=0,_n=null,ki=!1,Xs=!1,Gm=!1,$r=0,Ia=0,Li=0,ms=0,Km=0,Jn=0,$s=0,il=null,wn=null,qm=!1,Wm=0,Hc=1/0,zc=null,Ri=null,Xa=0,Di=null,Zs=null,eo=0,Ym=0,Jm=null,Jp=null,sl=0,Xm=null;function Mn(){if((Wt&2)!==0&&Ot!==0)return Ot&-Ot;if(X.T!==null){var t=Hs;return t!==0?t:rg()}return nr()}function Xp(){Jn===0&&(Jn=(Ot&536870912)===0||Vt?hr():536870912);var t=Yn.current;return t!==null&&(t.flags|=32),Jn}function Fn(t,n,o){(t===oa&&(Yt===2||Yt===9)||t.cancelPendingCommit!==null)&&(to(t,0),Bi(t,Ot,Jn,!1)),Pn(t,o),((Wt&2)===0||t!==oa)&&(t===oa&&((Wt&2)===0&&(ms|=o),Ia===4&&Bi(t,Ot,Jn,!1)),vr(t))}function $p(t,n,o){if((Wt&6)!==0)throw Error(i(327));var u=!o&&(n&124)===0&&(n&t.expiredLanes)===0||St(t,n),h=u?Rv(t,n):eg(t,n,!0),y=u;do{if(h===0){Xs&&!u&&Bi(t,n,0,!1);break}else{if(o=t.current.alternate,y&&!kv(o)){h=eg(t,n,!1),y=!1;continue}if(h===2){if(y=n,t.errorRecoveryDisabledLanes&y)var R=0;else R=t.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){n=R;e:{var F=t;h=il;var W=F.current.memoizedState.isDehydrated;if(W&&(to(F,R).flags|=256),R=eg(F,R,!1),R!==2){if(Gm&&!W){F.errorRecoveryDisabledLanes|=y,ms|=y,h=4;break e}y=wn,wn=h,y!==null&&(wn===null?wn=y:wn.push.apply(wn,y))}h=R}if(y=!1,h!==2)continue}}if(h===1){to(t,0),Bi(t,n,0,!0);break}e:{switch(u=t,y=h,y){case 0:case 1:throw Error(i(345));case 4:if((n&4194048)!==n)break;case 6:Bi(u,n,Jn,!ki);break e;case 2:wn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((n&62914560)===n&&(h=Wm+300-se(),10<h)){if(Bi(u,n,Jn,!ki),Et(u,0,!0)!==0)break e;u.timeoutHandle=T0(Zp.bind(null,u,o,wn,zc,qm,n,Jn,ms,$s,ki,y,2,-0,0),h);break e}Zp(u,o,wn,zc,qm,n,Jn,ms,$s,ki,y,0,-0,0)}}break}while(!0);vr(t)}function Zp(t,n,o,u,h,y,R,F,W,ge,ve,Se,fe,pe){if(t.timeoutHandle=-1,Se=n.subtreeFlags,(Se&8192||(Se&16785408)===16785408)&&(gl={stylesheets:null,count:0,unsuspend:uC},Kp(n),Se=mC(),Se!==null)){t.cancelPendingCommit=Se(s0.bind(null,t,n,y,o,u,h,R,F,W,ve,1,fe,pe)),Bi(t,y,R,!ge);return}s0(t,n,y,o,u,h,R,F,W)}function kv(t){for(var n=t;;){var o=n.tag;if((o===0||o===11||o===15)&&n.flags&16384&&(o=n.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(!Rn(y(),h))return!1}catch{return!1}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Bi(t,n,o,u){n&=~Km,n&=~ms,t.suspendedLanes|=n,t.pingedLanes&=~n,u&&(t.warmLanes|=n),u=t.expirationTimes;for(var h=n;0<h;){var y=31-N(h),R=1<<y;u[y]=-1,h&=~R}o!==0&&Oe(t,o,n)}function Qc(){return(Wt&6)===0?(ol(0),!1):!0}function $m(){if(Bt!==null){if(Yt===0)var t=Bt.return;else t=Bt,Vr=ss=null,hm(t),qs=null,Xo=0,t=Bt;for(;t!==null;)Dp(t.alternate,t),t=t.return;Bt=null}}function to(t,n){var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,qv(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),$m(),oa=t,Bt=o=Hr(t.current,null),Ot=n,Yt=0,_n=null,ki=!1,Xs=St(t,n),Gm=!1,$s=Jn=Km=ms=Li=Ia=0,wn=il=null,qm=!1,(n&8)!==0&&(n|=n&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=n;0<u;){var h=31-N(u),y=1<<h;n|=t[h],u&=~y}return $r=n,dc(),o}function e0(t,n){Tt=null,X.H=Lc,n===zo||n===bc?(n=pA(),Yt=3):n===fA?(n=pA(),Yt=4):Yt=n===yp?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,_n=n,Bt===null&&(Ia=1,_c(t,Gn(n,t.current)))}function t0(){var t=X.H;return X.H=Lc,t===null?Lc:t}function a0(){var t=X.A;return X.A=Tv,t}function Zm(){Ia=4,ki||(Ot&4194048)!==Ot&&Yn.current!==null||(Xs=!0),(Li&134217727)===0&&(ms&134217727)===0||oa===null||Bi(oa,Ot,Jn,!1)}function eg(t,n,o){var u=Wt;Wt|=2;var h=t0(),y=a0();(oa!==t||Ot!==n)&&(zc=null,to(t,n)),n=!1;var R=Ia;e:do try{if(Yt!==0&&Bt!==null){var F=Bt,W=_n;switch(Yt){case 8:$m(),R=6;break e;case 3:case 2:case 9:case 6:Yn.current===null&&(n=!0);var ge=Yt;if(Yt=0,_n=null,ao(t,F,W,ge),o&&Xs){R=0;break e}break;default:ge=Yt,Yt=0,_n=null,ao(t,F,W,ge)}}Lv(),R=Ia;break}catch(ve){e0(t,ve)}while(!0);return n&&t.shellSuspendCounter++,Vr=ss=null,Wt=u,X.H=h,X.A=y,Bt===null&&(oa=null,Ot=0,dc()),R}function Lv(){for(;Bt!==null;)n0(Bt)}function Rv(t,n){var o=Wt;Wt|=2;var u=t0(),h=a0();oa!==t||Ot!==n?(zc=null,Hc=se()+500,to(t,n)):Xs=St(t,n);e:do try{if(Yt!==0&&Bt!==null){n=Bt;var y=_n;t:switch(Yt){case 1:Yt=0,_n=null,ao(t,n,y,1);break;case 2:case 9:if(hA(y)){Yt=0,_n=null,r0(n);break}n=function(){Yt!==2&&Yt!==9||oa!==t||(Yt=7),vr(t)},y.then(n,n);break e;case 3:Yt=7;break e;case 4:Yt=5;break e;case 7:hA(y)?(Yt=0,_n=null,r0(n)):(Yt=0,_n=null,ao(t,n,y,7));break;case 5:var R=null;switch(Bt.tag){case 26:R=Bt.memoizedState;case 5:case 27:var F=Bt;if(!R||j0(R)){Yt=0,_n=null;var W=F.sibling;if(W!==null)Bt=W;else{var ge=F.return;ge!==null?(Bt=ge,Vc(ge)):Bt=null}break t}}Yt=0,_n=null,ao(t,n,y,5);break;case 6:Yt=0,_n=null,ao(t,n,y,6);break;case 8:$m(),Ia=6;break e;default:throw Error(i(462))}}Dv();break}catch(ve){e0(t,ve)}while(!0);return Vr=ss=null,X.H=u,X.A=h,Wt=o,Bt!==null?0:(oa=null,Ot=0,dc(),Ia)}function Dv(){for(;Bt!==null&&!Ht();)n0(Bt)}function n0(t){var n=Lp(t.alternate,t,$r);t.memoizedProps=t.pendingProps,n===null?Vc(t):Bt=n}function r0(t){var n=t,o=n.alternate;switch(n.tag){case 15:case 0:n=wp(o,n,n.pendingProps,n.type,void 0,Ot);break;case 11:n=wp(o,n,n.pendingProps,n.type.render,n.ref,Ot);break;case 5:hm(n);default:Dp(o,n),n=Bt=iA(n,$r),n=Lp(o,n,$r)}t.memoizedProps=t.pendingProps,n===null?Vc(t):Bt=n}function ao(t,n,o,u){Vr=ss=null,hm(n),qs=null,Xo=0;var h=n.return;try{if(Iv(t,h,n,o,Ot)){Ia=1,_c(t,Gn(o,t.current)),Bt=null;return}}catch(y){if(h!==null)throw Bt=h,y;Ia=1,_c(t,Gn(o,t.current)),Bt=null;return}n.flags&32768?(Vt||u===1?t=!0:Xs||(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))),i0(n,t)):Vc(n)}function Vc(t){var n=t;do{if((n.flags&32768)!==0){i0(n,ki);return}t=n.return;var o=Cv(n.alternate,n,$r);if(o!==null){Bt=o;return}if(n=n.sibling,n!==null){Bt=n;return}Bt=n=t}while(n!==null);Ia===0&&(Ia=5)}function i0(t,n){do{var o=wv(t.alternate,t);if(o!==null){o.flags&=32767,Bt=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!n&&(t=t.sibling,t!==null)){Bt=t;return}Bt=t=o}while(t!==null);Ia=6,Bt=null}function s0(t,n,o,u,h,y,R,F,W){t.cancelPendingCommit=null;do Gc();while(Xa!==0);if((Wt&6)!==0)throw Error(i(327));if(n!==null){if(n===t.current)throw Error(i(177));if(y=n.lanes|n.childLanes,y|=Vd,Hn(t,o,y,R,F,W),t===oa&&(Bt=oa=null,Ot=0),Zs=n,Di=t,eo=o,Ym=y,Jm=h,Jp=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Mv(Ye,function(){return d0(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=X.T,X.T=null,h=ie.p,ie.p=2,R=Wt,Wt|=4;try{Nv(t,n,o)}finally{Wt=R,ie.p=h,X.T=u}}Xa=1,o0(),l0(),c0()}}function o0(){if(Xa===1){Xa=0;var t=Di,n=Zs,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=X.T,X.T=null;var u=ie.p;ie.p=2;var h=Wt;Wt|=4;try{Qp(n,t);var y=mg,R=Yh(t.containerInfo),F=y.focusedElem,W=y.selectionRange;if(R!==F&&F&&F.ownerDocument&&Wh(F.ownerDocument.documentElement,F)){if(W!==null&&jd(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 Se=F.ownerDocument||document,fe=Se&&Se.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&&(R=ea,ea=st,st=R);var oe=qh(F,st),te=qh(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=Se.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(Se=[],pe=F;pe=pe.parentNode;)pe.nodeType===1&&Se.push({element:pe,left:pe.scrollLeft,top:pe.scrollTop});for(typeof F.focus=="function"&&F.focus(),F=0;F<Se.length;F++){var Ne=Se[F];Ne.element.scrollLeft=Ne.left,Ne.element.scrollTop=Ne.top}}nu=!!dg,mg=dg=null}finally{Wt=h,ie.p=u,X.T=o}}t.current=n,Xa=2}}function l0(){if(Xa===2){Xa=0;var t=Di,n=Zs,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=X.T,X.T=null;var u=ie.p;ie.p=2;var h=Wt;Wt|=4;try{jp(t,n.alternate,n)}finally{Wt=h,ie.p=u,X.T=o}}Xa=3}}function c0(){if(Xa===4||Xa===3){Xa=0,Ce();var t=Di,n=Zs,o=eo,u=Jp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Xa=5:(Xa=0,Zs=Di=null,u0(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(Ri=null),la(o),n=n.stateNode,U&&typeof U.onCommitFiberRoot=="function")try{U.onCommitFiberRoot(ia,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=X.T,h=ie.p,ie.p=2,X.T=null;try{for(var y=t.onRecoverableError,R=0;R<u.length;R++){var F=u[R];y(F.value,{componentStack:F.stack})}}finally{X.T=n,ie.p=h}}(eo&3)!==0&&Gc(),vr(t),h=t.pendingLanes,(o&4194090)!==0&&(h&42)!==0?t===Xm?sl++:(sl=0,Xm=t):sl=0,ol(0)}}function u0(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Po(n)))}function Gc(t){return o0(),l0(),c0(),d0()}function d0(){if(Xa!==5)return!1;var t=Di,n=Ym;Ym=0;var o=la(eo),u=X.T,h=ie.p;try{ie.p=32>o?32:o,X.T=null,o=Jm,Jm=null;var y=Di,R=eo;if(Xa=0,Zs=Di=null,eo=0,(Wt&6)!==0)throw Error(i(331));var F=Wt;if(Wt|=4,Wp(y.current),Gp(y,y.current,R,o),Wt=F,ol(0,!1),U&&typeof U.onPostCommitFiberRoot=="function")try{U.onPostCommitFiberRoot(ia,y)}catch{}return!0}finally{ie.p=h,X.T=u,u0(t,n)}}function m0(t,n,o){n=Gn(o,n),n=km(t.stateNode,n,2),t=vi(t,n,2),t!==null&&(Pn(t,2),vr(t))}function na(t,n,o){if(t.tag===3)m0(t,t,o);else for(;n!==null;){if(n.tag===3){m0(n,t,o);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ri===null||!Ri.has(u))){t=Gn(o,t),o=Ap(2),u=vi(n,o,2),u!==null&&(pp(o,u,n,t),Pn(u,2),vr(u));break}}n=n.return}}function tg(t,n,o){var u=t.pingCache;if(u===null){u=t.pingCache=new Sv;var h=new Set;u.set(n,h)}else h=u.get(n),h===void 0&&(h=new Set,u.set(n,h));h.has(o)||(Gm=!0,h.add(o),t=Bv.bind(null,t,n,o),n.then(t,t))}function Bv(t,n,o){var u=t.pingCache;u!==null&&u.delete(n),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,oa===t&&(Ot&o)===o&&(Ia===4||Ia===3&&(Ot&62914560)===Ot&&300>se()-Wm?(Wt&2)===0&&to(t,0):Km|=o,$s===Ot&&($s=0)),vr(t)}function g0(t,n){n===0&&(n=sa()),t=Fs(t,n),t!==null&&(Pn(t,n),vr(t))}function Uv(t){var n=t.memoizedState,o=0;n!==null&&(o=n.retryLane),g0(t,o)}function _v(t,n){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(n),g0(t,o)}function Mv(t,n){return et(t,n)}var Kc=null,no=null,ag=!1,qc=!1,ng=!1,gs=0;function vr(t){t!==no&&t.next===null&&(no===null?Kc=no=t:no=no.next=t),qc=!0,ag||(ag=!0,Ov())}function ol(t,n){if(!ng&&qc){ng=!0;do for(var o=!1,u=Kc;u!==null;){if(t!==0){var h=u.pendingLanes;if(h===0)var y=0;else{var R=u.suspendedLanes,F=u.pingedLanes;y=(1<<31-N(42|t)+1)-1,y&=h&~(R&~F),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,p0(u,y))}else y=Ot,y=Et(u,u===oa?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||St(u,y)||(o=!0,p0(u,y));u=u.next}while(o);ng=!1}}function Fv(){f0()}function f0(){qc=ag=!1;var t=0;gs!==0&&(Kv()&&(t=gs),gs=0);for(var n=se(),o=null,u=Kc;u!==null;){var h=u.next,y=h0(u,n);y===0?(u.next=null,o===null?Kc=h:o.next=h,h===null&&(no=o)):(o=u,(t!==0||(y&3)!==0)&&(qc=!0)),u=h}ol(t)}function h0(t,n){for(var o=t.suspendedLanes,u=t.pingedLanes,h=t.expirationTimes,y=t.pendingLanes&-62914561;0<y;){var R=31-N(y),F=1<<R,W=h[R];W===-1?((F&o)===0||(F&u)!==0)&&(h[R]=dt(F,n)):W<=n&&(t.expiredLanes|=F),y&=~F}if(n=oa,o=Ot,o=Et(t,t===n?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,o===0||t===n&&(Yt===2||Yt===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&nt(u),t.callbackNode=null,t.callbackPriority=0;if((o&3)===0||St(t,o)){if(n=o&-o,n===t.callbackPriority)return n;switch(u!==null&&nt(u),la(o)){case 2:case 8:o=Ve;break;case 32:o=Ye;break;case 268435456:o=Mt;break;default:o=Ye}return u=A0.bind(null,t),o=et(o,u),t.callbackPriority=n,t.callbackNode=o,n}return u!==null&&u!==null&&nt(u),t.callbackPriority=2,t.callbackNode=null,2}function A0(t,n){if(Xa!==0&&Xa!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(Gc()&&t.callbackNode!==o)return null;var u=Ot;return u=Et(t,t===oa?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:($p(t,u,n),h0(t,se()),t.callbackNode!=null&&t.callbackNode===o?A0.bind(null,t):null)}function p0(t,n){if(Gc())return null;$p(t,n,!0)}function Ov(){Wv(function(){(Wt&6)!==0?et(je,Fv):f0()})}function rg(){return gs===0&&(gs=hr()),gs}function y0(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:En(""+t)}function E0(t,n){var o=n.ownerDocument.createElement("input");return o.name=n.name,o.value=n.value,t.id&&o.setAttribute("form",t.id),n.parentNode.insertBefore(o,n),t=new FormData(t),o.parentNode.removeChild(o),t}function jv(t,n,o,u,h){if(n==="submit"&&o&&o.stateNode===h){var y=y0((h[Ea]||null).action),R=u.submitter;R&&(n=(n=R[Ea]||null)?y0(n.formAction):R.getAttribute("formAction"),n!==null&&(y=n,R=null));var F=new It("action","action",null,u,h);t.push({event:F,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(gs!==0){var W=R?E0(h,R):new FormData(h);wm(o,{pending:!0,data:W,method:h.method,action:y},null,W)}}else typeof y=="function"&&(F.preventDefault(),W=R?E0(h,R):new FormData(h),wm(o,{pending:!0,data:W,method:h.method,action:y},y,W))},currentTarget:h}]})}}for(var ig=0;ig<Qd.length;ig++){var sg=Qd[ig],Pv=sg.toLowerCase(),Hv=sg[0].toUpperCase()+sg.slice(1);sr(Pv,"on"+Hv)}sr($h,"onAnimationEnd"),sr(Zh,"onAnimationIteration"),sr(eA,"onAnimationStart"),sr("dblclick","onDoubleClick"),sr("focusin","onFocus"),sr("focusout","onBlur"),sr(rv,"onTransitionRun"),sr(iv,"onTransitionStart"),sr(sv,"onTransitionCancel"),sr(tA,"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 ll="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(" "),zv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ll));function b0(t,n){n=(n&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(n)for(var R=u.length-1;0<=R;R--){var F=u[R],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){Uc(ve)}h.currentTarget=null,y=W}else for(R=0;R<u.length;R++){if(F=u[R],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){Uc(ve)}h.currentTarget=null,y=W}}}}function Ut(t,n){var o=n[_a];o===void 0&&(o=n[_a]=new Set);var u=t+"__bubble";o.has(u)||(I0(n,t,2,!1),o.add(u))}function og(t,n,o){var u=0;n&&(u|=4),I0(o,t,u,n)}var Wc="_reactListening"+Math.random().toString(36).slice(2);function lg(t){if(!t[Wc]){t[Wc]=!0,dn.forEach(function(o){o!=="selectionchange"&&(zv.has(o)||og(o,!1,t),og(o,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Wc]||(n[Wc]=!0,og("selectionchange",!1,n))}}function I0(t,n,o,u){switch(G0(n)){case 2:var h=hC;break;case 8:h=AC;break;default:h=vg}o=h.bind(null,n,o,t),h=void 0,!Qn||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),u?h!==void 0?t.addEventListener(n,o,{capture:!0,passive:h}):t.addEventListener(n,o,!0):h!==void 0?t.addEventListener(n,o,{passive:h}):t.addEventListener(n,o,!1)}function cg(t,n,o,u,h){var y=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var R=u.tag;if(R===3||R===4){var F=u.stateNode.containerInfo;if(F===h)break;if(R===4)for(R=u.return;R!==null;){var W=R.tag;if((W===3||W===4)&&R.stateNode.containerInfo===h)return;R=R.return}for(;F!==null;){if(R=Xe(F),R===null)return;if(W=R.tag,W===5||W===6||W===26||W===27){u=y=R;continue e}F=F.parentNode}}u=u.return}ko(function(){var ge=y,ve=jr(o),Se=[];e:{var fe=aA.get(t);if(fe!==void 0){var pe=It,mt=t;switch(t){case"keypress":if(O(o)===0)break e;case"keydown":case"keyup":pe=Td;break;case"focusin":mt="focus",pe=Lo;break;case"focusout":mt="blur",pe=Lo;break;case"beforeblur":case"afterblur":pe=Lo;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=rc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=hd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=kd;break;case $h:case Zh:case eA:pe=yd;break;case tA:pe=Rd;break;case"scroll":case"scrollend":pe=ma;break;case"wheel":pe=lc;break;case"copy":case"cut":case"paste":pe=bd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=oc;break;case"toggle":case"beforetoggle":pe=Ud}var st=(n&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 Ne=te;if(me=Ne.stateNode,Ne=Ne.tag,Ne!==5&&Ne!==26&&Ne!==27||me===null||oe===null||(Ne=Ai(te,oe),Ne!=null&&st.push(cl(te,Ne,me))),ea)break;te=te.return}0<st.length&&(fe=new pe(fe,mt,null,o,ve),Se.push({event:fe,listeners:st}))}}if((n&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=rc,Ne="onMouseLeave",oe="onMouseEnter",te="mouse",(t==="pointerout"||t==="pointerover")&&(st=oc,Ne="onPointerLeave",oe="onPointerEnter",te="pointer"),ea=pe==null?fe:bt(pe),me=mt==null?fe:bt(mt),fe=new st(Ne,te+"leave",pe,o,ve),fe.target=ea,fe.relatedTarget=me,Ne=null,Xe(ve)===ge&&(st=new st(oe,te+"enter",mt,o,ve),st.target=me,st.relatedTarget=ea,Ne=st),ea=Ne,pe&&mt)t:{for(st=pe,oe=mt,te=0,me=st;me;me=ro(me))te++;for(me=0,Ne=oe;Ne;Ne=ro(Ne))me++;for(;0<te-me;)st=ro(st),te--;for(;0<me-te;)oe=ro(oe),me--;for(;te--;){if(st===oe||oe!==null&&st===oe.alternate)break t;st=ro(st),oe=ro(oe)}st=null}else st=null;pe!==null&&v0(Se,fe,pe,st,!1),mt!==null&&ea!==null&&v0(Se,ea,mt,st,!0)}}e:{if(fe=ge?bt(ge):window,pe=fe.nodeName&&fe.nodeName.toLowerCase(),pe==="select"||pe==="input"&&fe.type==="file")var qe=Hh;else if(sn(fe))if(zh)qe=tv;else{qe=ZI;var Lt=$I}else pe=fe.nodeName,!pe||pe.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?ge&&gi(ge.elementType)&&(qe=Hh):qe=ev;if(qe&&(qe=qe(t,ge))){In(Se,qe,o,ve);break e}Lt&&Lt(t,fe,ge),t==="focusout"&&ge&&fe.type==="number"&&ge.memoizedProps.value!=null&&Ls(fe,"number",fe.value)}switch(Lt=ge?bt(ge):window,t){case"focusin":(sn(Lt)||Lt.contentEditable==="true")&&(Us=Lt,Pd=ge,_o=null);break;case"focusout":_o=Pd=Us=null;break;case"mousedown":Hd=!0;break;case"contextmenu":case"mouseup":case"dragend":Hd=!1,Jh(Se,o,ve);break;case"selectionchange":if(nv)break;case"keydown":case"keyup":Jh(Se,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?Ke(t,o)&&(lt="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(lt="onCompositionStart");lt&&(Bo&&o.locale!=="ko"&&(ot||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&ot&&(tt=D()):(Vn=ve,A="value"in Vn?Vn.value:Vn.textContent,ot=!0)),Lt=Yc(ge,lt),0<Lt.length&&(lt=new Ro(lt,t,null,o,ve),Se.push({event:lt,listeners:Lt}),tt?lt.data=tt:(tt=at(o),tt!==null&&(lt.data=tt)))),(tt=cc?Qt(t,o):kn(t,o))&&(lt=Yc(ge,"onBeforeInput"),0<lt.length&&(Lt=new Ro("onBeforeInput","beforeinput",null,o,ve),Se.push({event:Lt,listeners:lt}),Lt.data=tt)),jv(Se,t,ge,o,ve)}b0(Se,n)})}function cl(t,n,o){return{instance:t,listener:n,currentTarget:o}}function Yc(t,n){for(var o=n+"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(cl(t,h,y)),h=Ai(t,n),h!=null&&u.push(cl(t,h,y))),t.tag===3)return u;t=t.return}return[]}function ro(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function v0(t,n,o,u,h){for(var y=n._reactName,R=[];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&&R.unshift(cl(o,ge,W))):h||(ge=Ai(o,y),ge!=null&&R.push(cl(o,ge,W)))),o=o.return}R.length!==0&&t.push({event:n,listeners:R})}var Qv=/\r\n?/g,Vv=/\u0000|\uFFFD/g;function C0(t){return(typeof t=="string"?t:""+t).replace(Qv,`
`).replace(Vv,"")}function w0(t,n){return n=C0(n),C0(t)===n}function Jc(){}function Zt(t,n,o,u,h,y){switch(o){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||pr(t,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&pr(t,""+u);break;case"className":Ya(t,"class",u);break;case"tabIndex":Ya(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Ya(t,o,u);break;case"style":Ji(t,u,y);break;case"data":if(n!=="object"){Ya(t,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||o!=="href")){t.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=En(""+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"?(n!=="input"&&Zt(t,n,"name",h.name,h,null),Zt(t,n,"formEncType",h.formEncType,h,null),Zt(t,n,"formMethod",h.formMethod,h,null),Zt(t,n,"formTarget",h.formTarget,h,null)):(Zt(t,n,"encType",h.encType,h,null),Zt(t,n,"method",h.method,h,null),Zt(t,n,"target",h.target,h,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=En(""+u),t.setAttribute(o,u);break;case"onClick":u!=null&&(t.onclick=Jc);break;case"onScroll":u!=null&&Ut("scroll",t);break;case"onScrollEnd":u!=null&&Ut("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=En(""+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":Ut("beforetoggle",t),Ut("toggle",t),ua(t,"popover",u);break;case"xlinkActuate":wa(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":wa(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":wa(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":wa(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":wa(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":wa(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":wa(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":wa(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":wa(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=Or.get(o)||o,ua(t,o,u))}}function ug(t,n,o,u,h,y){switch(o){case"style":Ji(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"?pr(t,u):(typeof u=="number"||typeof u=="bigint")&&pr(t,""+u);break;case"onScroll":u!=null&&Ut("scroll",t);break;case"onScrollEnd":u!=null&&Ut("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Jc);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"),n=o.slice(2,h?o.length-7:void 0),y=t[Ea]||null,y=y!=null?y[o]:null,typeof y=="function"&&t.removeEventListener(n,y,h),typeof u=="function")){typeof y!="function"&&y!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(n,u,h);break e}o in t?t[o]=u:u===!0?t.setAttribute(o,""):ua(t,o,u)}}}function $a(t,n,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ut("error",t),Ut("load",t);var u=!1,h=!1,y;for(y in o)if(o.hasOwnProperty(y)){var R=o[y];if(R!=null)switch(y){case"src":u=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:Zt(t,n,y,R,o,null)}}h&&Zt(t,n,"srcSet",o.srcSet,o,null),u&&Zt(t,n,"src",o.src,o,null);return;case"input":Ut("invalid",t);var F=y=R=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":R=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,n));break;default:Zt(t,n,u,ve,o,null)}}di(t,y,F,W,ge,R,h,!1),Mr(t);return;case"select":Ut("invalid",t),u=R=y=null;for(h in o)if(o.hasOwnProperty(h)&&(F=o[h],F!=null))switch(h){case"value":y=F;break;case"defaultValue":R=F;break;case"multiple":u=F;default:Zt(t,n,h,F,o,null)}n=y,o=R,t.multiple=!!u,n!=null?mi(t,!!u,n,!1):o!=null&&mi(t,!!u,o,!0);return;case"textarea":Ut("invalid",t),y=h=u=null;for(R in o)if(o.hasOwnProperty(R)&&(F=o[R],F!=null))switch(R){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,n,R,F,o,null)}xo(t,u,h,y),Mr(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,n,W,u,o,null)}return;case"dialog":Ut("beforetoggle",t),Ut("toggle",t),Ut("cancel",t),Ut("close",t);break;case"iframe":case"object":Ut("load",t);break;case"video":case"audio":for(u=0;u<ll.length;u++)Ut(ll[u],t);break;case"image":Ut("error",t),Ut("load",t);break;case"details":Ut("toggle",t);break;case"embed":case"source":case"link":Ut("error",t),Ut("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,n));default:Zt(t,n,ge,u,o,null)}return;default:if(gi(n)){for(ve in o)o.hasOwnProperty(ve)&&(u=o[ve],u!==void 0&&ug(t,n,ve,u,o,void 0));return}}for(F in o)o.hasOwnProperty(F)&&(u=o[F],u!=null&&Zt(t,n,F,u,o,null))}function Gv(t,n,o,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,y=null,R=null,F=null,W=null,ge=null,ve=null;for(pe in o){var Se=o[pe];if(o.hasOwnProperty(pe)&&Se!=null)switch(pe){case"checked":break;case"value":break;case"defaultValue":W=Se;default:u.hasOwnProperty(pe)||Zt(t,n,pe,null,u,Se)}}for(var fe in u){var pe=u[fe];if(Se=o[fe],u.hasOwnProperty(fe)&&(pe!=null||Se!=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":R=pe;break;case"defaultValue":F=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(i(137,n));break;default:pe!==Se&&Zt(t,n,fe,pe,u,Se)}}No(t,R,F,W,ge,ve,y,h);return;case"select":pe=R=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,n,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":R=y;default:y!==W&&Zt(t,n,h,y,u,W)}n=F,o=R,u=pe,fe!=null?mi(t,!!o,fe,!1):!!u!=!!o&&(n!=null?mi(t,!!o,n,!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,n,F,null,u,h)}for(R in u)if(h=u[R],y=o[R],u.hasOwnProperty(R)&&(h!=null||y!=null))switch(R){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,n,R,h,u,y)}Rs(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,n,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,n,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,n,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,n));break;default:Zt(t,n,ge,fe,u,pe)}return;default:if(gi(n)){for(var ea in o)fe=o[ea],o.hasOwnProperty(ea)&&fe!==void 0&&!u.hasOwnProperty(ea)&&ug(t,n,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||ug(t,n,ve,fe,u,pe);return}}for(var oe in o)fe=o[oe],o.hasOwnProperty(oe)&&fe!=null&&!u.hasOwnProperty(oe)&&Zt(t,n,oe,null,u,fe);for(Se in u)fe=u[Se],pe=o[Se],!u.hasOwnProperty(Se)||fe===pe||fe==null&&pe==null||Zt(t,n,Se,fe,u,pe)}var dg=null,mg=null;function Xc(t){return t.nodeType===9?t:t.ownerDocument}function N0(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 x0(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function gg(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var fg=null;function Kv(){var t=window.event;return t&&t.type==="popstate"?t===fg?!1:(fg=t,!0):(fg=null,!1)}var T0=typeof setTimeout=="function"?setTimeout:void 0,qv=typeof clearTimeout=="function"?clearTimeout:void 0,S0=typeof Promise=="function"?Promise:void 0,Wv=typeof queueMicrotask=="function"?queueMicrotask:typeof S0<"u"?function(t){return S0.resolve(null).then(t).catch(Yv)}:T0;function Yv(t){setTimeout(function(){throw t})}function Ui(t){return t==="head"}function k0(t,n){var o=n,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 R=t.ownerDocument;if(o&1&&ul(R.documentElement),o&2&&ul(R.body),o&4)for(o=R.head,ul(o),R=o.firstChild;R;){var F=R.nextSibling,W=R.nodeName;R[Me]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&R.rel.toLowerCase()==="stylesheet"||o.removeChild(R),R=F}}if(h===0){t.removeChild(y),yl(n);return}h--}else o==="$"||o==="$?"||o==="$!"?h++:u=o.charCodeAt(0)-48;else u=0;o=y}while(o);yl(n)}function hg(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var o=n;switch(n=n.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":hg(o),_e(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function Jv(t,n,o,u){for(;t.nodeType===1;){var h=o;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[Me])switch(n){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(n==="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 Xv(t,n,o){if(n==="")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 Ag(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function $v(t,n){var o=t.ownerDocument;if(t.data!=="$?"||o.readyState==="complete")n();else{var u=function(){n(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function lr(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="F!"||n==="F")break;if(n==="/$")return null}}return t}var pg=null;function L0(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return t;n--}else o==="/$"&&n++}t=t.previousSibling}return null}function R0(t,n,o){switch(n=Xc(o),t){case"html":if(t=n.documentElement,!t)throw Error(i(452));return t;case"head":if(t=n.head,!t)throw Error(i(453));return t;case"body":if(t=n.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function ul(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);_e(t)}var Xn=new Map,D0=new Set;function $c(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Zr=ie.d;ie.d={f:Zv,r:eC,D:tC,C:aC,L:nC,m:rC,X:sC,S:iC,M:oC};function Zv(){var t=Zr.f(),n=Qc();return t||n}function eC(t){var n=kt(t);n!==null&&n.tag===5&&n.type==="form"?$A(n):Zr.r(t)}var io=typeof document>"u"?null:document;function B0(t,n,o){var u=io;if(u&&typeof n=="string"&&n){var h=yn(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof o=="string"&&(h+='[crossorigin="'+o+'"]'),D0.has(h)||(D0.add(h),t={rel:t,crossOrigin:o,href:n},u.querySelector(h)===null&&(n=u.createElement("link"),$a(n,"link",t),it(n),u.head.appendChild(n)))}}function tC(t){Zr.D(t),B0("dns-prefetch",t,null)}function aC(t,n){Zr.C(t,n),B0("preconnect",t,n)}function nC(t,n,o){Zr.L(t,n,o);var u=io;if(u&&t&&n){var h='link[rel="preload"][as="'+yn(n)+'"]';n==="image"&&o&&o.imageSrcSet?(h+='[imagesrcset="'+yn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(h+='[imagesizes="'+yn(o.imageSizes)+'"]')):h+='[href="'+yn(t)+'"]';var y=h;switch(n){case"style":y=so(t);break;case"script":y=oo(t)}Xn.has(y)||(t=E({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:t,as:n},o),Xn.set(y,t),u.querySelector(h)!==null||n==="style"&&u.querySelector(dl(y))||n==="script"&&u.querySelector(ml(y))||(n=u.createElement("link"),$a(n,"link",t),it(n),u.head.appendChild(n)))}}function rC(t,n){Zr.m(t,n);var o=io;if(o&&t){var u=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+yn(u)+'"][href="'+yn(t)+'"]',y=h;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=oo(t)}if(!Xn.has(y)&&(t=E({rel:"modulepreload",href:t},n),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(ml(y)))return}u=o.createElement("link"),$a(u,"link",t),it(u),o.head.appendChild(u)}}}function iC(t,n,o){Zr.S(t,n,o);var u=io;if(u&&t){var h=rt(u).hoistableStyles,y=so(t);n=n||"default";var R=h.get(y);if(!R){var F={loading:0,preload:null};if(R=u.querySelector(dl(y)))F.loading=5;else{t=E({rel:"stylesheet",href:t,"data-precedence":n},o),(o=Xn.get(y))&&yg(t,o);var W=R=u.createElement("link");it(W),$a(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,Zc(R,n,u)}R={type:"stylesheet",instance:R,count:1,state:F},h.set(y,R)}}}function sC(t,n){Zr.X(t,n);var o=io;if(o&&t){var u=rt(o).hoistableScripts,h=oo(t),y=u.get(h);y||(y=o.querySelector(ml(h)),y||(t=E({src:t,async:!0},n),(n=Xn.get(h))&&Eg(t,n),y=o.createElement("script"),it(y),$a(y,"link",t),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(h,y))}}function oC(t,n){Zr.M(t,n);var o=io;if(o&&t){var u=rt(o).hoistableScripts,h=oo(t),y=u.get(h);y||(y=o.querySelector(ml(h)),y||(t=E({src:t,async:!0,type:"module"},n),(n=Xn.get(h))&&Eg(t,n),y=o.createElement("script"),it(y),$a(y,"link",t),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(h,y))}}function U0(t,n,o,u){var h=(h=Re.current)?$c(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"?(n=so(o.href),o=rt(h).hoistableStyles,u=o.get(n),u||(u={type:"style",instance:null,count:0,state:null},o.set(n,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=so(o.href);var y=rt(h).hoistableStyles,R=y.get(t);if(R||(h=h.ownerDocument||h,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(t,R),(y=h.querySelector(dl(t)))&&!y._p&&(R.instance=y,R.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||lC(h,t,o,R.state))),n&&u===null)throw Error(i(528,""));return R}if(n&&u!==null)throw Error(i(529,""));return null;case"script":return n=o.async,o=o.src,typeof o=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=oo(o),o=rt(h).hoistableScripts,u=o.get(n),u||(u={type:"script",instance:null,count:0,state:null},o.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function so(t){return'href="'+yn(t)+'"'}function dl(t){return'link[rel="stylesheet"]['+t+"]"}function _0(t){return E({},t,{"data-precedence":t.precedence,precedence:null})}function lC(t,n,o,u){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=t.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),$a(n,"link",o),it(n),t.head.appendChild(n))}function oo(t){return'[src="'+yn(t)+'"]'}function ml(t){return"script[async]"+t}function M0(t,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var u=t.querySelector('style[data-href~="'+yn(o.href)+'"]');if(u)return n.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),$a(u,"style",h),Zc(u,o.precedence,t),n.instance=u;case"stylesheet":h=so(o.href);var y=t.querySelector(dl(h));if(y)return n.state.loading|=4,n.instance=y,it(y),y;u=_0(o),(h=Xn.get(h))&&yg(u,h),y=(t.ownerDocument||t).createElement("link"),it(y);var R=y;return R._p=new Promise(function(F,W){R.onload=F,R.onerror=W}),$a(y,"link",u),n.state.loading|=4,Zc(y,o.precedence,t),n.instance=y;case"script":return y=oo(o.src),(h=t.querySelector(ml(y)))?(n.instance=h,it(h),h):(u=o,(h=Xn.get(y))&&(u=E({},o),Eg(u,h)),t=t.ownerDocument||t,h=t.createElement("script"),it(h),$a(h,"link",u),t.head.appendChild(h),n.instance=h);case"void":return null;default:throw Error(i(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,Zc(u,o.precedence,t));return n.instance}function Zc(t,n,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=u.length?u[u.length-1]:null,y=h,R=0;R<u.length;R++){var F=u[R];if(F.dataset.precedence===n)y=F;else if(y!==h)break}y?y.parentNode.insertBefore(t,y.nextSibling):(n=o.nodeType===9?o.head:o,n.insertBefore(t,n.firstChild))}function yg(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Eg(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var eu=null;function F0(t,n,o){if(eu===null){var u=new Map,h=eu=new Map;h.set(o,u)}else h=eu,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[Me]||y[qt]||t==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var R=y.getAttribute(n)||"";R=t+R;var F=u.get(R);F?F.push(y):u.set(R,[y])}}return u}function O0(t,n,o){t=t.ownerDocument||t,t.head.insertBefore(o,n==="title"?t.querySelector("head > title"):null)}function cC(t,n,o){if(o===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return t=n.disabled,typeof n.precedence=="string"&&t==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function j0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var gl=null;function uC(){}function dC(t,n,o){if(gl===null)throw Error(i(475));var u=gl;if(n.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var h=so(o.href),y=t.querySelector(dl(h));if(y){t=y._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(u.count++,u=tu.bind(u),t.then(u,u)),n.state.loading|=4,n.instance=y,it(y);return}y=t.ownerDocument||t,o=_0(o),(h=Xn.get(h))&&yg(o,h),y=y.createElement("link"),it(y);var R=y;R._p=new Promise(function(F,W){R.onload=F,R.onerror=W}),$a(y,"link",o),n.instance=y}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(u.count++,n=tu.bind(u),t.addEventListener("load",n),t.addEventListener("error",n))}}function mC(){if(gl===null)throw Error(i(475));var t=gl;return t.stylesheets&&t.count===0&&bg(t,t.stylesheets),0<t.count?function(n){var o=setTimeout(function(){if(t.stylesheets&&bg(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(o)}}:null}function tu(){if(this.count--,this.count===0){if(this.stylesheets)bg(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var au=null;function bg(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,au=new Map,n.forEach(gC,t),au=null,tu.call(t))}function gC(t,n){if(!(n.state.loading&4)){var o=au.get(t);if(o)var u=o.get(null);else{o=new Map,au.set(t,o);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<h.length;y++){var R=h[y];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(o.set(R.dataset.precedence,R),u=R)}u&&o.set(null,u)}h=n.instance,R=h.getAttribute("data-precedence"),y=o.get(R)||u,y===u&&o.set(null,h),o.set(R,h),this.count++,u=tu.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)),n.state.loading|=4}}var fl={$$typeof:L,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function fC(t,n,o,u,h,y,R,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=rn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rn(0),this.hiddenUpdates=rn(null),this.identifierPrefix=u,this.onUncaughtError=h,this.onCaughtError=y,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function P0(t,n,o,u,h,y,R,F,W,ge,ve,Se){return t=new fC(t,n,o,R,F,W,ge,Se),n=1,y===!0&&(n|=24),y=Dn(3,null,null,n),t.current=y,y.stateNode=t,n=tm(),n.refCount++,t.pooledCache=n,n.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:n},im(y),t}function H0(t){return t?(t=Os,t):Os}function z0(t,n,o,u,h,y){h=H0(h),u.context===null?u.context=h:u.pendingContext=h,u=Ii(n),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=vi(t,u,n),o!==null&&(Fn(o,t,n),Vo(o,t,n))}function Q0(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<n?o:n}}function Ig(t,n){Q0(t,n),(t=t.alternate)&&Q0(t,n)}function V0(t){if(t.tag===13){var n=Fs(t,67108864);n!==null&&Fn(n,t,67108864),Ig(t,67108864)}}var nu=!0;function hC(t,n,o,u){var h=X.T;X.T=null;var y=ie.p;try{ie.p=2,vg(t,n,o,u)}finally{ie.p=y,X.T=h}}function AC(t,n,o,u){var h=X.T;X.T=null;var y=ie.p;try{ie.p=8,vg(t,n,o,u)}finally{ie.p=y,X.T=h}}function vg(t,n,o,u){if(nu){var h=Cg(u);if(h===null)cg(t,n,u,ru,o),K0(t,u);else if(yC(h,t,n,o,u))u.stopPropagation();else if(K0(t,u),n&4&&-1<pC.indexOf(t)){for(;h!==null;){var y=kt(h);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var R=ft(y.pendingLanes);if(R!==0){var F=y;for(F.pendingLanes|=2,F.entangledLanes|=2;R;){var W=1<<31-N(R);F.entanglements[1]|=W,R&=~W}vr(y),(Wt&6)===0&&(Hc=se()+500,ol(0))}}break;case 13:F=Fs(y,2),F!==null&&Fn(F,y,2),Qc(),Ig(y,2)}if(y=Cg(u),y===null&&cg(t,n,u,ru,o),y===h)break;h=y}h!==null&&u.stopPropagation()}else cg(t,n,u,null,o)}}function Cg(t){return t=jr(t),wg(t)}var ru=null;function wg(t){if(ru=null,t=Xe(t),t!==null){var n=c(t);if(n===null)t=null;else{var o=n.tag;if(o===13){if(t=d(n),t!==null)return t;t=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return ru=t,null}function G0(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 Ve:return 8;case Ye:case ut:return 32;case Mt:return 268435456;default:return 32}default:return 32}}var Ng=!1,_i=null,Mi=null,Fi=null,hl=new Map,Al=new Map,Oi=[],pC="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 K0(t,n){switch(t){case"focusin":case"focusout":_i=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":Fi=null;break;case"pointerover":case"pointerout":hl.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Al.delete(n.pointerId)}}function pl(t,n,o,u,h,y){return t===null||t.nativeEvent!==y?(t={blockedOn:n,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[h]},n!==null&&(n=kt(n),n!==null&&V0(n)),t):(t.eventSystemFlags|=u,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function yC(t,n,o,u,h){switch(n){case"focusin":return _i=pl(_i,t,n,o,u,h),!0;case"dragenter":return Mi=pl(Mi,t,n,o,u,h),!0;case"mouseover":return Fi=pl(Fi,t,n,o,u,h),!0;case"pointerover":var y=h.pointerId;return hl.set(y,pl(hl.get(y)||null,t,n,o,u,h)),!0;case"gotpointercapture":return y=h.pointerId,Al.set(y,pl(Al.get(y)||null,t,n,o,u,h)),!0}return!1}function q0(t){var n=Xe(t.target);if(n!==null){var o=c(n);if(o!==null){if(n=o.tag,n===13){if(n=d(o),n!==null){t.blockedOn=n,rr(t.priority,function(){if(o.tag===13){var u=Mn();u=ta(u);var h=Fs(o,u);h!==null&&Fn(h,o,u),Ig(o,u)}});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function iu(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var o=Cg(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 n=kt(o),n!==null&&V0(n),t.blockedOn=o,!1;n.shift()}return!0}function W0(t,n,o){iu(t)&&o.delete(n)}function EC(){Ng=!1,_i!==null&&iu(_i)&&(_i=null),Mi!==null&&iu(Mi)&&(Mi=null),Fi!==null&&iu(Fi)&&(Fi=null),hl.forEach(W0),Al.forEach(W0)}function su(t,n){t.blockedOn===n&&(t.blockedOn=null,Ng||(Ng=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,EC)))}var ou=null;function Y0(t){ou!==t&&(ou=t,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){ou===t&&(ou=null);for(var n=0;n<t.length;n+=3){var o=t[n],u=t[n+1],h=t[n+2];if(typeof u!="function"){if(wg(u||o)===null)continue;break}var y=kt(o);y!==null&&(t.splice(n,3),n-=3,wm(y,{pending:!0,data:h,method:o.method,action:u},u,h))}}))}function yl(t){function n(W){return su(W,t)}_i!==null&&su(_i,t),Mi!==null&&su(Mi,t),Fi!==null&&su(Fi,t),hl.forEach(n),Al.forEach(n);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);)q0(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],R=h[Ea]||null;if(typeof y=="function")R||Y0(o);else if(R){var F=null;if(y&&y.hasAttribute("formAction")){if(h=y,R=y[Ea]||null)F=R.formAction;else if(wg(h)!==null)continue}else F=R.action;typeof F=="function"?o[u+1]=F:(o.splice(u,3),u-=3),Y0(o)}}}function xg(t){this._internalRoot=t}lu.prototype.render=xg.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(i(409));var o=n.current,u=Mn();z0(o,u,t,n,null,null)},lu.prototype.unmount=xg.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;z0(t.current,2,null,t,null,null),Qc(),n[Jt]=null}};function lu(t){this._internalRoot=t}lu.prototype.unstable_scheduleHydration=function(t){if(t){var n=nr();t={blockedOn:null,target:t,priority:n};for(var o=0;o<Oi.length&&n!==0&&n<Oi[o].priority;o++);Oi.splice(o,0,t),o===0&&q0(t)}};var J0=e.version;if(J0!=="19.1.0")throw Error(i(527,J0,"19.1.0"));ie.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=f(n),t=t!==null?g(t):null,t=t===null?null:t.stateNode,t};var bC={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:X,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cu.isDisabled&&cu.supportsFiber)try{ia=cu.inject(bC),U=cu}catch{}}return bl.createRoot=function(t,n){if(!s(t))throw Error(i(299));var o=!1,u="",h=mp,y=gp,R=fp,F=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(y=n.onCaughtError),n.onRecoverableError!==void 0&&(R=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(F=n.unstable_transitionCallbacks)),n=P0(t,1,!1,null,null,o,u,h,y,R,F,null),t[Jt]=n.current,lg(t),new xg(n)},bl.hydrateRoot=function(t,n,o){if(!s(t))throw Error(i(299));var u=!1,h="",y=mp,R=gp,F=fp,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&&(R=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)),n=P0(t,1,!0,n,o??null,u,h,y,R,F,W,ge),n.context=H0(null),o=n.current,u=Mn(),u=ta(u),h=Ii(u),h.callback=null,vi(o,h,u),o=u,n.current.lanes=o,Pn(n,o),vr(n),t[Jt]=n.current,lg(t),new lu(n)},bl.version="19.1.0",bl}var sy;function UC(){if(sy)return Sg.exports;sy=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),Sg.exports=BC(),Sg.exports}var _C=UC();const MC=Wi(_C);var I=ch();const ad=Wi(I),FC=(r,e,a,i)=>{var c,d,m,f;const s=[a,{code:e,...i||{}}];if((d=(c=r==null?void 0:r.services)==null?void 0:c.logger)!=null&&d.forward)return r.services.logger.forward(s,"warn","react-i18next::",!0);Es(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(f=(m=r==null?void 0:r.services)==null?void 0:m.logger)!=null&&f.warn?r.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},oy={},_f=(r,e,a,i)=>{Es(a)&&oy[a]||(Es(a)&&(oy[a]=new Date),FC(r,e,a,i))},Ab=(r,e)=>()=>{if(r.isInitialized)e();else{const a=()=>{setTimeout(()=>{r.off("initialized",a)},0),e()};r.on("initialized",a)}},Mf=(r,e,a)=>{r.loadNamespaces(e,Ab(r,a))},ly=(r,e,a,i)=>{if(Es(a)&&(a=[a]),r.options.preload&&r.options.preload.indexOf(e)>-1)return Mf(r,a,i);a.forEach(s=>{r.options.ns.indexOf(s)<0&&r.options.ns.push(s)}),r.loadLanguages(e,Ab(r,i))},OC=(r,e,a={})=>!e.languages||!e.languages.length?(_f(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{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,r))return!1}}),Es=r=>typeof r=="string",jC=r=>typeof r=="object"&&r!==null,PC=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,HC={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},zC=r=>HC[r],QC=r=>r.replace(PC,zC);let Ff={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:QC};const VC=(r={})=>{Ff={...Ff,...r}},GC=()=>Ff;let pb;const KC=r=>{pb=r},qC=()=>pb,WC={type:"3rdParty",init(r){VC(r.options.react),KC(r)}},YC=I.createContext();class JC{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const XC=(r,e)=>{const a=I.useRef();return I.useEffect(()=>{a.current=r},[r,e]),a.current},yb=(r,e,a,i)=>r.getFixedT(e,a,i),$C=(r,e,a,i)=>I.useCallback(yb(r,e,a,i),[r,e,a,i]),Ze=(r,e={})=>{var P,_,j,V;const{i18n:a}=e,{i18n:i,defaultNS:s}=I.useContext(YC)||{},c=a||i||qC();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new JC),!c){_f(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const H=(G,K)=>Es(K)?K:jC(K)&&Es(K.defaultValue)?K.defaultValue:Array.isArray(G)?G[G.length-1]:G,Q=[H,{},!1];return Q.t=H,Q.i18n={},Q.ready=!1,Q}(P=c.options.react)!=null&&P.wait&&_f(c,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const d={...GC(),...c.options.react,...e},{useSuspense:m,keyPrefix:f}=d;let g=s||((_=c.options)==null?void 0:_.defaultNS);g=Es(g)?[g]:g||["translation"],(V=(j=c.reportNamespaces).addUsedNamespaces)==null||V.call(j,g);const E=(c.isInitialized||c.initializedStoreOnce)&&g.every(H=>OC(H,c,d)),p=$C(c,e.lng||null,d.nsMode==="fallback"?g:g[0],f),w=()=>p,v=()=>yb(c,e.lng||null,d.nsMode==="fallback"?g:g[0],f),[x,T]=I.useState(w);let S=g.join();e.lng&&(S=`${e.lng}${S}`);const k=XC(S),B=I.useRef(!0);I.useEffect(()=>{const{bindI18n:H,bindI18nStore:Q}=d;B.current=!0,!E&&!m&&(e.lng?ly(c,e.lng,g,()=>{B.current&&T(v)}):Mf(c,g,()=>{B.current&&T(v)})),E&&k&&k!==S&&B.current&&T(v);const G=()=>{B.current&&T(v)};return H&&(c==null||c.on(H,G)),Q&&(c==null||c.store.on(Q,G)),()=>{B.current=!1,c&&(H==null||H.split(" ").forEach(K=>c.off(K,G))),Q&&c&&Q.split(" ").forEach(K=>c.store.off(K,G))}},[c,S]),I.useEffect(()=>{B.current&&E&&T(w)},[c,f,E]);const L=[x,c,E];if(L.t=x,L.i18n=c,L.ready=E,E||!E&&!m)return L;throw new Promise(H=>{e.lng?ly(c,e.lng,g,()=>H()):Mf(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 cy="popstate";function ZC(r={}){function e(s,c){let{pathname:d="/",search:m="",hash:f=""}=vs(s.location.hash.substring(1));return!d.startsWith("/")&&!d.startsWith(".")&&(d="/"+d),Of("",{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:Kl(c))}function i(s,c){xn(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(c)})`)}return tw(e,a,i,r)}function ha(r,e){if(r===!1||r===null||typeof r>"u")throw new Error(e)}function xn(r,e){if(!r){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function ew(){return Math.random().toString(36).substring(2,10)}function uy(r,e){return{usr:r.state,key:r.key,idx:e}}function Of(r,e,a=null,i){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof e=="string"?vs(e):e,state:a,key:e&&e.key||i||ew()}}function Kl({pathname:r="/",search:e="",hash:a=""}){return e&&e!=="?"&&(r+=e.charAt(0)==="?"?e:"?"+e),a&&a!=="#"&&(r+=a.charAt(0)==="#"?a:"#"+a),r}function vs(r){let e={};if(r){let a=r.indexOf("#");a>=0&&(e.hash=r.substring(a),r=r.substring(0,a));let i=r.indexOf("?");i>=0&&(e.search=r.substring(i),r=r.substring(0,i)),r&&(e.pathname=r)}return e}function tw(r,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 S=E(),k=S==null?null:S-g;g=S,f&&f({action:m,location:T.location,delta:k})}function w(S,k){m="PUSH";let B=Of(T.location,S,k);a&&a(B,S),g=E()+1;let L=uy(B,g),P=T.createHref(B);try{d.pushState(L,"",P)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(P)}c&&f&&f({action:m,location:T.location,delta:1})}function v(S,k){m="REPLACE";let B=Of(T.location,S,k);a&&a(B,S),g=E();let L=uy(B,g),P=T.createHref(B);d.replaceState(L,"",P),c&&f&&f({action:m,location:T.location,delta:0})}function x(S){return aw(S)}let T={get action(){return m},get location(){return r(s,d)},listen(S){if(f)throw new Error("A history only accepts one active listener");return s.addEventListener(cy,p),f=S,()=>{s.removeEventListener(cy,p),f=null}},createHref(S){return e(s,S)},createURL:x,encodeLocation(S){let k=x(S);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:w,replace:v,go(S){return d.go(S)}};return T}function aw(r,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 r=="string"?r:Kl(r);return i=i.replace(/ $/,"%20"),!e&&i.startsWith("//")&&(i=a+i),new URL(i,a)}function Eb(r,e,a="/"){return nw(r,e,a,!1)}function nw(r,e,a,i){let s=typeof e=="string"?vs(e):e,c=ci(s.pathname||"/",a);if(c==null)return null;let d=bb(r);rw(d);let m=null;for(let f=0;m==null&&f<d.length;++f){let g=hw(c);m=gw(d[f],g,i)}return m}function bb(r,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=oi([i,E.relativePath]),w=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}".`),bb(d.children,e,w,p,f)),!(d.path==null&&!d.index)&&e.push({path:p,score:dw(p,d.index),routesMeta:w})};return r.forEach((d,m)=>{var f;if(d.path===""||!((f=d.path)!=null&&f.includes("?")))c(d,m);else for(let g of Ib(d.path))c(d,m,!0,g)}),e}function Ib(r){let e=r.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=Ib(i.join("/")),m=[];return m.push(...d.map(f=>f===""?c:[c,f].join("/"))),s&&m.push(...d),m.map(f=>r.startsWith("/")&&f===""?"/":f)}function rw(r){r.sort((e,a)=>e.score!==a.score?a.score-e.score:mw(e.routesMeta.map(i=>i.childrenIndex),a.routesMeta.map(i=>i.childrenIndex)))}var iw=/^:[\w-]+$/,sw=3,ow=2,lw=1,cw=10,uw=-2,dy=r=>r==="*";function dw(r,e){let a=r.split("/"),i=a.length;return a.some(dy)&&(i+=uw),e&&(i+=ow),a.filter(s=>!dy(s)).reduce((s,c)=>s+(iw.test(c)?sw:c===""?lw:cw),i)}function mw(r,e){return r.length===e.length&&r.slice(0,-1).every((i,s)=>i===e[s])?r[r.length-1]-e[e.length-1]:0}function gw(r,e,a=!1){let{routesMeta:i}=r,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=zu({path:f.relativePath,caseSensitive:f.caseSensitive,end:g},E),w=f.route;if(!p&&g&&a&&!i[i.length-1].route.index&&(p=zu({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},E)),!p)return null;Object.assign(s,p.params),d.push({params:s,pathname:oi([c,p.pathname]),pathnameBase:Ew(oi([c,p.pathnameBase])),route:w}),p.pathnameBase!=="/"&&(c=oi([c,p.pathnameBase]))}return d}function zu(r,e){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[a,i]=fw(r.path,r.caseSensitive,r.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},w)=>{if(E==="*"){let x=m[w]||"";d=c.slice(0,c.length-x.length).replace(/(.)\/+$/,"$1")}const v=m[w];return p&&!v?g[E]=void 0:g[E]=(v||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:d,pattern:r}}function fw(r,e=!1,a=!0){xn(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let i=[],s="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,f)=>(i.push({paramName:m,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(i.push({paramName:"*"}),s+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":r!==""&&r!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),i]}function hw(r){try{return r.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return xn(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),r}}function ci(r,e){if(e==="/")return r;if(!r.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,i=r.charAt(a);return i&&i!=="/"?null:r.slice(a)||"/"}var vb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Aw=r=>vb.test(r);function pw(r,e="/"){let{pathname:a,search:i="",hash:s=""}=typeof r=="string"?vs(r):r,c;if(a)if(Aw(a))c=a;else{if(a.includes("//")){let d=a;a=a.replace(/\/\/+/g,"/"),xn(!1,`Pathnames cannot have embedded double slashes - normalizing ${d} -> ${a}`)}a.startsWith("/")?c=my(a.substring(1),"/"):c=my(a,e)}else c=e;return{pathname:c,search:bw(i),hash:Iw(s)}}function my(r,e){let a=e.replace(/\/+$/,"").split("/");return r.split("/").forEach(s=>{s===".."?a.length>1&&a.pop():s!=="."&&a.push(s)}),a.length>1?a.join("/"):"/"}function Bg(r,e,a,i){return`Cannot include a '${r}' 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 yw(r){return r.filter((e,a)=>a===0||e.route.path&&e.route.path.length>0)}function uh(r){let e=yw(r);return e.map((a,i)=>i===e.length-1?a.pathname:a.pathnameBase)}function dh(r,e,a,i=!1){let s;typeof r=="string"?s=vs(r):(s={...r},ha(!s.pathname||!s.pathname.includes("?"),Bg("?","pathname","search",s)),ha(!s.pathname||!s.pathname.includes("#"),Bg("#","pathname","hash",s)),ha(!s.search||!s.search.includes("#"),Bg("#","search","hash",s)));let c=r===""||s.pathname==="",d=c?"/":s.pathname,m;if(d==null)m=a;else{let p=e.length-1;if(!i&&d.startsWith("..")){let w=d.split("/");for(;w[0]==="..";)w.shift(),p-=1;s.pathname=w.join("/")}m=p>=0?e[p]:"/"}let f=pw(s,m),g=d&&d!=="/"&&d.endsWith("/"),E=(c||d===".")&&a.endsWith("/");return!f.pathname.endsWith("/")&&(g||E)&&(f.pathname+="/"),f}var oi=r=>r.join("/").replace(/\/\/+/g,"/"),Ew=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),bw=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,Iw=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,vw=class{constructor(r,e,a,i=!1){this.status=r,this.statusText=e||"",this.internal=i,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function Cw(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function ww(r){return r.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Cb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wb(r,e){let a=r;if(typeof a!="string"||!vb.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let i=a,s=!1;if(Cb)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{xn(!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 Nb=["POST","PUT","PATCH","DELETE"];new Set(Nb);var Nw=["GET",...Nb];new Set(Nw);var Io=I.createContext(null);Io.displayName="DataRouter";var nd=I.createContext(null);nd.displayName="DataRouterState";var xw=I.createContext(!1),xb=I.createContext({isTransitioning:!1});xb.displayName="ViewTransition";var Tw=I.createContext(new Map);Tw.displayName="Fetchers";var Sw=I.createContext(null);Sw.displayName="Await";var jn=I.createContext(null);jn.displayName="Navigation";var Jl=I.createContext(null);Jl.displayName="Location";var dr=I.createContext({outlet:null,matches:[],isDataRoute:!1});dr.displayName="Route";var mh=I.createContext(null);mh.displayName="RouteError";var Tb="REACT_ROUTER_ERROR",kw="REDIRECT",Lw="ROUTE_ERROR_RESPONSE";function Rw(r){if(r.startsWith(`${Tb}:${kw}:{`))try{let e=JSON.parse(r.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 Dw(r){if(r.startsWith(`${Tb}:${Lw}:{`))try{let e=JSON.parse(r.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new vw(e.status,e.statusText,e.data)}catch{}}function Bw(r,{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}=Xl(r,{relative:e}),m=c;return a!=="/"&&(m=c==="/"?a:oi([a,c])),i.createHref({pathname:m,search:d,hash:s})}function vo(){return I.useContext(Jl)!=null}function Wa(){return ha(vo(),"useLocation() may be used only in the context of a <Router> component."),I.useContext(Jl).location}var Sb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function kb(r){I.useContext(jn).static||I.useLayoutEffect(r)}function Ba(){let{isDataRoute:r}=I.useContext(dr);return r?Kw():Uw()}function Uw(){ha(vo(),"useNavigate() may be used only in the context of a <Router> component.");let r=I.useContext(Io),{basename:e,navigator:a}=I.useContext(jn),{matches:i}=I.useContext(dr),{pathname:s}=Wa(),c=JSON.stringify(uh(i)),d=I.useRef(!1);return kb(()=>{d.current=!0}),I.useCallback((f,g={})=>{if(xn(d.current,Sb),!d.current)return;if(typeof f=="number"){a.go(f);return}let E=dh(f,JSON.parse(c),s,g.relative==="path");r==null&&e!=="/"&&(E.pathname=E.pathname==="/"?e:oi([e,E.pathname])),(g.replace?a.replace:a.push)(E,g.state,g)},[e,a,c,s,r])}I.createContext(null);function rd(){let{matches:r}=I.useContext(dr),e=r[r.length-1];return e?e.params:{}}function Xl(r,{relative:e}={}){let{matches:a}=I.useContext(dr),{pathname:i}=Wa(),s=JSON.stringify(uh(a));return I.useMemo(()=>dh(r,JSON.parse(s),i,e==="path"),[r,s,i,e])}function _w(r,e){return Lb(r,e)}function Lb(r,e,a,i,s){var B;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 L=p&&p.path||"";Db(g,!p||L.endsWith("*")||L.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${L}">) 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="${L}"> to <Route path="${L==="/"?"*":`${L}/*`}">.`)}let w=Wa(),v;if(e){let L=typeof e=="string"?vs(e):e;ha(E==="/"||((B=L.pathname)==null?void 0:B.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 "${L.pathname}" was given in the \`location\` prop.`),v=L}else v=w;let x=v.pathname||"/",T=x;if(E!=="/"){let L=E.replace(/^\//,"").split("/");T="/"+x.replace(/^\//,"").split("/").slice(L.length).join("/")}let S=Eb(r,{pathname:T});xn(p||S!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),xn(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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=Pw(S&&S.map(L=>Object.assign({},L,{params:Object.assign({},f,L.params),pathname:oi([E,c.encodeLocation?c.encodeLocation(L.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathname]),pathnameBase:L.pathnameBase==="/"?E:oi([E,c.encodeLocation?c.encodeLocation(L.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathnameBase])})),d,a,i,s);return e&&k?I.createElement(Jl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},k):k}function Mw(){let r=Gw(),e=Cw(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),a=r instanceof Error?r.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:",r),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 Fw=I.createElement(Mw,null),Rb=class extends I.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,e){return e.location!==r.location||e.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:e.error,location:e.location,revalidation:r.revalidation||e.revalidation}}componentDidCatch(r,e){this.props.onError?this.props.onError(r,e):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const a=Dw(r.digest);a&&(r=a)}let e=r!==void 0?I.createElement(dr.Provider,{value:this.props.routeContext},I.createElement(mh.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?I.createElement(Ow,{error:r},e):e}};Rb.contextType=xw;var Ug=new WeakMap;function Ow({children:r,error:e}){let{basename:a}=I.useContext(jn);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let i=Rw(e.digest);if(i){let s=Ug.get(e);if(s)throw s;let c=wb(i.location,a);if(Cb&&!Ug.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 Ug.set(e,d),d}return I.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return r}function jw({routeContext:r,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:r},a)}function Pw(r,e=[],a=null,i=null,s=null){if(r==null){if(!a)return null;if(a.errors)r=a.matches;else if(e.length===0&&!a.initialized&&a.matches.length>0)r=a.matches;else return null}let c=r,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:w,errors:v}=a,x=p.route.loader&&!w.hasOwnProperty(p.route.id)&&(!v||v[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 w,v;i(E,{location:a.location,params:((v=(w=a.matches)==null?void 0:w[0])==null?void 0:v.params)??{},unstable_pattern:ww(a.matches),errorInfo:p})}:void 0;return c.reduceRight((E,p,w)=>{let v,x=!1,T=null,S=null;a&&(v=d&&p.route.id?d[p.route.id]:void 0,T=p.route.errorElement||Fw,m&&(f<0&&w===0?(Db("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,S=null):f===w&&(x=!0,S=p.route.hydrateFallbackElement||null)));let k=e.concat(c.slice(0,w+1)),B=()=>{let L;return v?L=T:x?L=S:p.route.Component?L=I.createElement(p.route.Component,null):p.route.element?L=p.route.element:L=E,I.createElement(jw,{match:p,routeContext:{outlet:E,matches:k,isDataRoute:a!=null},children:L})};return a&&(p.route.ErrorBoundary||p.route.errorElement||w===0)?I.createElement(Rb,{location:a.location,revalidation:a.revalidation,component:T,error:v,children:B(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:g}):B()},null)}function gh(r){return`${r} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hw(r){let e=I.useContext(Io);return ha(e,gh(r)),e}function zw(r){let e=I.useContext(nd);return ha(e,gh(r)),e}function Qw(r){let e=I.useContext(dr);return ha(e,gh(r)),e}function fh(r){let e=Qw(r),a=e.matches[e.matches.length-1];return ha(a.route.id,`${r} can only be used on routes that contain a unique "id"`),a.route.id}function Vw(){return fh("useRouteId")}function Gw(){var i;let r=I.useContext(mh),e=zw("useRouteError"),a=fh("useRouteError");return r!==void 0?r:(i=e.errors)==null?void 0:i[a]}function Kw(){let{router:r}=Hw("useNavigate"),e=fh("useNavigate"),a=I.useRef(!1);return kb(()=>{a.current=!0}),I.useCallback(async(s,c={})=>{xn(a.current,Sb),a.current&&(typeof s=="number"?await r.navigate(s):await r.navigate(s,{fromRouteId:e,...c}))},[r,e])}var gy={};function Db(r,e,a){!e&&!gy[r]&&(gy[r]=!0,xn(!1,a))}I.memo(qw);function qw({routes:r,future:e,state:a,onError:i}){return Lb(r,void 0,a,i,e)}function Ww({to:r,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);xn(!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}=Wa(),m=Ba(),f=dh(r,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(r){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 Yw({basename:r="/",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=r.replace(/^\/*/,"/"),f=I.useMemo(()=>({basename:m,navigator:s,static:c,unstable_useTransitions:d,future:{}}),[m,s,c,d]);typeof a=="string"&&(a=vs(a));let{pathname:g="/",search:E="",hash:p="",state:w=null,key:v="default"}=a,x=I.useMemo(()=>{let T=ci(g,m);return T==null?null:{location:{pathname:T,search:E,hash:p,state:w,key:v},navigationType:i}},[m,g,E,p,w,v,i]);return xn(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(Jl.Provider,{children:e,value:x}))}function Bb({children:r,location:e}){return _w(jf(r),e)}function jf(r,e=[]){let a=[];return I.Children.forEach(r,(i,s)=>{if(!I.isValidElement(i))return;let c=[...e,s];if(i.type===I.Fragment){a.push.apply(a,jf(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=jf(i.props.children,c)),a.push(d)}),a}var Lu="get",Ru="application/x-www-form-urlencoded";function id(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function Jw(r){return id(r)&&r.tagName.toLowerCase()==="button"}function Xw(r){return id(r)&&r.tagName.toLowerCase()==="form"}function $w(r){return id(r)&&r.tagName.toLowerCase()==="input"}function Zw(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function eN(r,e){return r.button===0&&(!e||e==="_self")&&!Zw(r)}function Pf(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((e,a)=>{let i=r[a];return e.concat(Array.isArray(i)?i.map(s=>[a,s]):[[a,i]])},[]))}function tN(r,e){let a=Pf(r);return e&&e.forEach((i,s)=>{a.has(s)||e.getAll(s).forEach(c=>{a.append(s,c)})}),a}var uu=null;function aN(){if(uu===null)try{new FormData(document.createElement("form"),0),uu=!1}catch{uu=!0}return uu}var nN=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _g(r){return r!=null&&!nN.has(r)?(xn(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ru}"`),null):r}function rN(r,e){let a,i,s,c,d;if(Xw(r)){let m=r.getAttribute("action");i=m?ci(m,e):null,a=r.getAttribute("method")||Lu,s=_g(r.getAttribute("enctype"))||Ru,c=new FormData(r)}else if(Jw(r)||$w(r)&&(r.type==="submit"||r.type==="image")){let m=r.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=r.getAttribute("formaction")||m.getAttribute("action");if(i=f?ci(f,e):null,a=r.getAttribute("formmethod")||m.getAttribute("method")||Lu,s=_g(r.getAttribute("formenctype"))||_g(m.getAttribute("enctype"))||Ru,c=new FormData(m,r),!aN()){let{name:g,type:E,value:p}=r;if(E==="image"){let w=g?`${g}.`:"";c.append(`${w}x`,"0"),c.append(`${w}y`,"0")}else g&&c.append(g,p)}}else{if(id(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Lu,i=null,s=Ru,d=r}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(r,e){if(r===!1||r===null||typeof r>"u")throw new Error(e)}function iN(r,e,a,i){let s=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;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 sN(r,e){if(r.id in e)return e[r.id];try{let a=await import(r.module);return e[r.id]=a,a}catch(a){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function oN(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function lN(r,e,a){let i=await Promise.all(r.map(async s=>{let c=e.routes[s.route.id];if(c){let d=await sN(c,a);return d.links?d.links():[]}return[]}));return mN(i.flat(1).filter(oN).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function fy(r,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 w=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(r,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function cN(r,e,{includeHydrateFallback:a}={}){return uN(r.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 uN(r){return[...new Set(r)]}function dN(r){let e={},a=Object.keys(r).sort();for(let i of a)e[i]=r[i];return e}function mN(r,e){let a=new Set;return new Set(e),r.reduce((i,s)=>{let c=JSON.stringify(dN(s));return a.has(c)||(a.add(c),i.push({key:c,link:s})),i},[])}function Ub(){let r=I.useContext(Io);return Ah(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function gN(){let r=I.useContext(nd);return Ah(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var ph=I.createContext(void 0);ph.displayName="FrameworkContext";function _b(){let r=I.useContext(ph);return Ah(r,"You must render this element inside a <HydratedRouter> element"),r}function fN(r,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,w=I.useRef(null);I.useEffect(()=>{if(r==="render"&&d(!0),r==="viewport"){let T=k=>{k.forEach(B=>{d(B.isIntersecting)})},S=new IntersectionObserver(T,{threshold:.5});return w.current&&S.observe(w.current),()=>{S.disconnect()}}},[r]),I.useEffect(()=>{if(i){let T=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(T)}}},[i]);let v=()=>{s(!0)},x=()=>{s(!1),d(!1)};return a?r!=="intent"?[c,w,{}]:[c,w,{onFocus:Il(m,v),onBlur:Il(f,x),onMouseEnter:Il(g,v),onMouseLeave:Il(E,x),onTouchStart:Il(p,v)}]:[!1,w,{}]}function Il(r,e){return a=>{r&&r(a),a.defaultPrevented||e(a)}}function hN({page:r,...e}){let{router:a}=Ub(),i=I.useMemo(()=>Eb(a.routes,r,a.basename),[a.routes,r,a.basename]);return i?I.createElement(pN,{page:r,matches:i,...e}):null}function AN(r){let{manifest:e,routeModules:a}=_b(),[i,s]=I.useState([]);return I.useEffect(()=>{let c=!1;return lN(r,e,a).then(d=>{c||s(d)}),()=>{c=!0}},[r,e,a]),i}function pN({page:r,matches:e,...a}){let i=Wa(),{future:s,manifest:c,routeModules:d}=_b(),{basename:m}=Ub(),{loaderData:f,matches:g}=gN(),E=I.useMemo(()=>fy(r,e,g,c,i,"data"),[r,e,g,c,i]),p=I.useMemo(()=>fy(r,e,g,c,i,"assets"),[r,e,g,c,i]),w=I.useMemo(()=>{if(r===i.pathname+i.search+i.hash)return[];let T=new Set,S=!1;if(e.forEach(B=>{var P;let L=c.routes[B.route.id];!L||!L.hasLoader||(!E.some(_=>_.route.id===B.route.id)&&B.route.id in f&&((P=d[B.route.id])!=null&&P.shouldRevalidate)||L.hasClientLoader?S=!0:T.add(B.route.id))}),T.size===0)return[];let k=iN(r,m,s.unstable_trailingSlashAwareDataRequests,"data");return S&&T.size>0&&k.searchParams.set("_routes",e.filter(B=>T.has(B.route.id)).map(B=>B.route.id).join(",")),[k.pathname+k.search]},[m,s.unstable_trailingSlashAwareDataRequests,f,i,c,E,e,r,d]),v=I.useMemo(()=>cN(p,c),[p,c]),x=AN(p);return I.createElement(I.Fragment,null,w.map(T=>I.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...a})),v.map(T=>I.createElement("link",{key:T,rel:"modulepreload",href:T,...a})),x.map(({key:T,link:S})=>I.createElement("link",{key:T,nonce:a.nonce,...S})))}function yN(...r){return e=>{r.forEach(a=>{typeof a=="function"?a(e):a!=null&&(a.current=e)})}}var EN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{EN&&(window.__reactRouterVersion="7.12.0")}catch{}function bN({basename:r,children:e,unstable_useTransitions:a,window:i}){let s=I.useRef();s.current==null&&(s.current=ZC({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(Yw,{basename:r,children:e,location:d.location,navigationType:d.action,navigator:c,unstable_useTransitions:a})}var Mb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sd=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:w,...v},x){let{basename:T,unstable_useTransitions:S}=I.useContext(jn),k=typeof g=="string"&&Mb.test(g),B=wb(g,T);g=B.to;let L=Bw(g,{relative:s}),[P,_,j]=fN(i,v),V=wN(g,{replace:d,state:m,target:f,preventScrollReset:E,relative:s,viewTransition:p,unstable_defaultShouldRevalidate:w,unstable_useTransitions:S});function H(G){e&&e(G),G.defaultPrevented||V(G)}let Q=I.createElement("a",{...v,...j,href:B.absoluteURL||L,onClick:B.isExternal||c?e:H,ref:yN(x,_),target:f,"data-discover":!k&&a==="render"?"true":void 0});return P&&!k?I.createElement(I.Fragment,null,Q,I.createElement(hN,{page:L})):Q});sd.displayName="Link";var IN=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=Xl(d,{relative:g.relative}),w=Wa(),v=I.useContext(nd),{navigator:x,basename:T}=I.useContext(jn),S=v!=null&&kN(p)&&m===!0,k=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,B=w.pathname,L=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;a||(B=B.toLowerCase(),L=L?L.toLowerCase():null,k=k.toLowerCase()),L&&T&&(L=ci(L,T)||L);const P=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let _=B===k||!s&&B.startsWith(k)&&B.charAt(P)==="/",j=L!=null&&(L===k||!s&&L.startsWith(k)&&L.charAt(k.length)==="/"),V={isActive:_,isPending:j,isTransitioning:S},H=_?e:void 0,Q;typeof i=="function"?Q=i(V):Q=[i,_?"active":null,j?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let G=typeof c=="function"?c(V):c;return I.createElement(sd,{...g,"aria-current":H,className:Q,ref:E,style:G,to:d,viewTransition:m},typeof f=="function"?f(V):f)});IN.displayName="NavLink";var vN=I.forwardRef(({discover:r="render",fetcherKey:e,navigate:a,reloadDocument:i,replace:s,state:c,method:d=Lu,action:m,onSubmit:f,relative:g,preventScrollReset:E,viewTransition:p,unstable_defaultShouldRevalidate:w,...v},x)=>{let{unstable_useTransitions:T}=I.useContext(jn),S=TN(),k=SN(m,{relative:g}),B=d.toLowerCase()==="get"?"get":"post",L=typeof m=="string"&&Mb.test(m),P=_=>{if(f&&f(_),_.defaultPrevented)return;_.preventDefault();let j=_.nativeEvent.submitter,V=(j==null?void 0:j.getAttribute("formmethod"))||d,H=()=>S(j||_.currentTarget,{fetcherKey:e,method:V,navigate:a,replace:s,state:c,relative:g,preventScrollReset:E,viewTransition:p,unstable_defaultShouldRevalidate:w});T&&a!==!1?I.startTransition(()=>H()):H()};return I.createElement("form",{ref:x,method:B,action:k,onSubmit:i?f:P,...v,"data-discover":!L&&r==="render"?"true":void 0})});vN.displayName="Form";function CN(r){return`${r} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fb(r){let e=I.useContext(Io);return ha(e,CN(r)),e}function wN(r,{target:e,replace:a,state:i,preventScrollReset:s,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:m,unstable_useTransitions:f}={}){let g=Ba(),E=Wa(),p=Xl(r,{relative:c});return I.useCallback(w=>{if(eN(w,e)){w.preventDefault();let v=a!==void 0?a:Kl(E)===Kl(p),x=()=>g(r,{replace:v,state:i,preventScrollReset:s,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:m});f?I.startTransition(()=>x()):x()}},[E,g,p,a,i,e,r,s,c,d,m,f])}function Ob(r){xn(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(Pf(r)),a=I.useRef(!1),i=Wa(),s=I.useMemo(()=>tN(i.search,a.current?null:e.current),[i.search]),c=Ba(),d=I.useCallback((m,f)=>{const g=Pf(typeof m=="function"?m(new URLSearchParams(s)):m);a.current=!0,c("?"+g,f)},[c,s]);return[s,d]}var NN=0,xN=()=>`__${String(++NN)}__`;function TN(){let{router:r}=Fb("useSubmit"),{basename:e}=I.useContext(jn),a=Vw(),i=r.fetch,s=r.navigate;return I.useCallback(async(c,d={})=>{let{action:m,method:f,encType:g,formData:E,body:p}=rN(c,e);if(d.navigate===!1){let w=d.fetcherKey||xN();await i(w,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 SN(r,{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={...Xl(r||".",{relative:e})},d=Wa();if(r==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(!r||r===".")&&s.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(c.pathname=c.pathname==="/"?a:oi([a,c.pathname])),Kl(c)}function kN(r,{relative:e}={}){let a=I.useContext(xb);ha(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Fb("useViewTransitionState"),s=Xl(r,{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 zu(s.pathname,d)!=null||zu(s.pathname,c)!=null}var du={exports:{}},hy;function LN(){if(hy)return du.exports;hy=1;const r=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},r(i?16:36)).join("");return du.exports=e,du.exports.default=e,du.exports}var RN=LN();const Qu=Wi(RN);var DN=()=>`uid::${Qu(7)}`,BN=(r,e=["endpointName","fingerprint"])=>typeof r=="object"&&r!==null&&e.every(a=>a in r),UN=r=>{if(!BN(r))throw new TypeError("Invalid connection args");return JSON.stringify(r)},_N=()=>{let r=[];return{add:(...e)=>{r=[...r,...e]},remove:e=>{r=typeof e=="string"?r.filter(a=>a.message.transactionId!==e):r.filter(a=>!e.includes(a))},entries:()=>r}},Mg=class{static toBackground(r,e){return r.postMessage(e)}static toExtensionContext(r,e){return r.postMessage(e)}},Du={exports:{}},MN=Du.exports,Ay;function FN(){return Ay||(Ay=1,function(r,e){(function(a,i){i(r)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:MN,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(Q,G=void 0){super(G),this.createItem=Q}get(Q){return this.has(Q)||this.set(Q,this.createItem(Q)),super.get(Q)}}const g=H=>H&&typeof H=="object"&&typeof H.then=="function",E=(H,Q)=>(...G)=>{d.runtime.lastError?H.reject(new Error(d.runtime.lastError.message)):Q.singleCallbackArg||G.length<=1&&Q.singleCallbackArg!==!1?H.resolve(G[0]):H.resolve(G)},p=H=>H==1?"argument":"arguments",w=(H,Q)=>function(K,...$){if($.length<Q.minArgs)throw new Error(`Expected at least ${Q.minArgs} ${p(Q.minArgs)} for ${H}(), got ${$.length}`);if($.length>Q.maxArgs)throw new Error(`Expected at most ${Q.maxArgs} ${p(Q.maxArgs)} for ${H}(), got ${$.length}`);return new Promise((J,re)=>{if(Q.fallbackToNoCallback)try{K[H](...$,E({resolve:J,reject:re},Q))}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](...$),Q.fallbackToNoCallback=!1,Q.noCallback=!0,J()}else Q.noCallback?(K[H](...$),J()):K[H](...$,E({resolve:J,reject:re},Q))})},v=(H,Q,G)=>new Proxy(Q,{apply(K,$,J){return G.call($,H,...J)}});let x=Function.call.bind(Object.prototype.hasOwnProperty);const T=(H,Q={},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 Q[Ae]=="function")ie=v(H,H[Ae],Q[Ae]);else if(x(G,Ae)){let ce=w(Ae,G[Ae]);ie=v(H,H[Ae],ce)}else ie=ie.bind(H);else if(typeof ie=="object"&&ie!==null&&(x(Q,Ae)||x(G,Ae)))ie=T(ie,Q[Ae],G[Ae]);else if(x(G,"*"))ie=T(ie,Q[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,$)},S=H=>({addListener(Q,G,...K){Q.addListener(H.get(G),...K)},hasListener(Q,G){return Q.hasListener(H.get(G))},removeListener(Q,G){Q.removeListener(H.get(G))}}),k=new f(H=>typeof H!="function"?H:function(G){const K=T(G,{},{getContent:{minArgs:0,maxArgs:0}});H(K)});let B=!1;const L=new f(H=>typeof H!="function"?H:function(G,K,$){let J=!1,re,Ae=new Promise(ye=>{re=function(M){B||(console.warn(s,new Error().stack),B=!0),J=!0,ye(M)}}),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(M=>{$(M)},M=>{let q;M&&(M instanceof Error||typeof M.message=="string")?q=M.message:q="An unexpected error occurred",$({__mozWebExtensionPolyfillReject__:!0,message:q})}).catch(M=>{console.error("Failed to send onMessage rejected reply",M)})};return ce(ie?X:Ae),!0}),P=({reject:H,resolve:Q},G)=>{d.runtime.lastError?d.runtime.lastError.message===i?Q():H(new Error(d.runtime.lastError.message)):G&&G.__mozWebExtensionPolyfillReject__?H(new Error(G.message)):Q(G)},_=(H,Q,G,...K)=>{if(K.length<Q.minArgs)throw new Error(`Expected at least ${Q.minArgs} ${p(Q.minArgs)} for ${H}(), got ${K.length}`);if(K.length>Q.maxArgs)throw new Error(`Expected at most ${Q.maxArgs} ${p(Q.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:S(k)}},runtime:{onMessage:S(L),onMessageExternal:S(L),sendMessage:_.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:_.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},V={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return m.privacy={network:{"*":V},services:{"*":V},websites:{"*":V}},T(d,j,m)};a.exports=c(chrome)}else a.exports=globalThis.browser})}(Du)),Du.exports}var ON=FN();const jN=Wi(ON);var PN=(r="")=>{const e=DN();let a,i=[];const s=_N(),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,w)=>w.resolvedDestination===g.deliverableTo?(Mg.toBackground(E,{type:"deliver",message:w.message}),p):[...p,w],[]);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(w=>g.fingerprint===w.to);s.remove(p),p.forEach(({message:w})=>d.forEach(v=>v(w)))}}},f=()=>{a=jN.runtime.connect({name:UN({endpointName:r,fingerprint:e})}),a.onMessage.addListener(m),a.onDisconnect.addListener(f),Mg.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){Mg.toBackground(a,{type:"deliver",message:g})}}},HN=Object.defineProperty,zN=Object.defineProperties,QN=Object.getOwnPropertyDescriptors,py=Object.getOwnPropertySymbols,VN=Object.prototype.hasOwnProperty,GN=Object.prototype.propertyIsEnumerable,yy=(r,e,a)=>e in r?HN(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,jb=(r,e)=>{for(var a in e||(e={}))VN.call(e,a)&&yy(r,a,e[a]);if(py)for(var a of py(e))GN.call(e,a)&&yy(r,a,e[a]);return r},Pb=(r,e)=>zN(r,QN(e)),KN=/^((?:background$)|devtools|popup|options|content-script|window)(?:@(\d+)(?:\.(\d+))?)?$/,Hb=r=>{const[,e,a,i]=r.match(KN)||[];return{context:e,tabId:+a,frameId:i?+i:void 0}};const qN=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],Hf=Symbol(".toJSON was called"),WN=r=>{r[Hf]=!0;const e=r.toJSON();return delete r[Hf],e},zb=({from:r,seen:e,to_:a,forceEnumerable:i,maxDepth:s,depth:c})=>{const d=a||(Array.isArray(r)?[]:{});if(e.push(r),c>=s)return d;if(typeof r.toJSON=="function"&&r[Hf]!==!0)return WN(r);for(const[m,f]of Object.entries(r)){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(r[m])){c++,d[m]=zb({from:r[m],seen:[...e],forceEnumerable:i,maxDepth:s,depth:c});continue}d[m]="[Circular]"}}for(const{property:m,enumerable:f}of qN)typeof r[m]=="string"&&Object.defineProperty(d,m,{value:r[m],enumerable:!0,configurable:!0,writable:!0});return d};function YN(r,e={}){const{maxDepth:a=Number.POSITIVE_INFINITY}=e;return typeof r=="object"&&r!==null?zb({from:r,seen:[],forceEnumerable:!0,maxDepth:a,depth:0}):typeof r=="function"?`[Function: ${r.name||"anonymous"}]`:r}let Qb=()=>({events:{},emit(r,...e){(this.events[r]||[]).forEach(a=>a(...e))},on(r,e){return(this.events[r]=this.events[r]||[]).push(e),()=>this.events[r]=(this.events[r]||[]).filter(a=>a!==e)}});var JN=(r,e,a)=>{const i=Qu(),s=new Map,c=new Map,d=m=>{if(m.destination.context===r&&!m.destination.frameId&&!m.destination.tabId){const{transactionId:f,messageID:g,messageType:E}=m,p=()=>{const v=s.get(f);if(v){const{err:x,data:T}=m;if(x){const S=x,k=self[S.name],B=new(typeof k=="function"?k:Error)(S.message);for(const L in S)B[L]=S[L];v.reject(B)}else v.resolve(T);s.delete(f)}},w=async()=>{let v,x,T=!1;try{const S=c.get(g);if(typeof S=="function")v=await S({sender:m.origin,id:g,data:m.data,timestamp:m.timestamp});else throw T=!0,new Error(`[webext-bridge] No handler registered in '${r}' to accept messages with id '${g}'`)}catch(S){x=S}finally{if(x&&(m.err=YN(x)),d(Pb(jb({},m),{messageType:"reply",data:v,origin:{context:r,tabId:null},destination:m.origin,hops:[]})),x&&!T)throw v}};switch(E){case"reply":return p();case"message":return w()}}return m.hops.push(`${r}::${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"?Hb(g):g,p="Bridge#sendMessage ->";if(!E.context)throw new TypeError(`${p} Destination must be any one of known destinations`);return new Promise((w,v)=>{const x={messageID:m,data:f,destination:E,messageType:"message",transactionId:Qu(),origin:{context:r,tabId:null},hops:[],timestamp:Date.now()};s.set(x.transactionId,{resolve:w,reject:v});try{d(x)}catch(T){s.delete(x.transactionId),v(T)}})},onMessage:(m,f)=>(c.set(m,f),()=>c.delete(m))}},go=class{constructor(r,e){this.endpointRuntime=r,this.streamInfo=e,this.emitter=Qb(),this.isClosed=!1,this.handleStreamClose=()=>{this.isClosed||(this.isClosed=!0,this.emitter.emit("closed",!0),this.emitter.events={})},go.initDone||(r.onMessage("__crx_bridge_stream_transfer__",a=>{const{streamId:i,streamTransfer:s,action:c}=a.data,d=go.openStreams.get(i);d&&!d.isClosed&&(c==="transfer"&&d.emitter.emit("message",s),c==="close"&&(go.openStreams.delete(i),d.handleStreamClose()))}),go.initDone=!0),go.openStreams.set(this.streamInfo.streamId,this)}get info(){return this.streamInfo}send(r){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:r,action:"transfer"},this.streamInfo.endpoint)}close(r){r&&this.send(r),this.handleStreamClose(),this.endpointRuntime.sendMessage("__crx_bridge_stream_transfer__",{streamId:this.streamInfo.streamId,streamTransfer:null,action:"close"},this.streamInfo.endpoint)}onMessage(r){return this.getDisposable("message",r)}onClose(r){return this.getDisposable("closed",r)}getDisposable(r,e){const a=this.emitter.on(r,e);return Object.assign(a,{dispose:a,close:a})}},Vu=go;Vu.initDone=!1;Vu.openStreams=new Map;var XN=r=>{const e=new Map,a=new Map,i=Qb();r.onMessage("__crx_bridge_stream_open__",d=>new Promise(m=>{const{sender:f,data:g}=d,{channel:E}=g;let p=!1,w=()=>{};const v=()=>{const x=a.get(E);typeof x=="function"?(x(new Vu(r,Pb(jb({},g),{endpoint:f}))),p&&w(),m(!0)):p||(p=!0,w=i.on("did-change-stream-callbacks",v))};v()}));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"?Hb(m):m,g={streamId:Qu(),channel:d,endpoint:f},E=new Vu(r,g);return E.onClose(()=>e.delete(d)),await r.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}},Vb=PN("popup"),yh=JN("popup",r=>Vb.postMessage(r));Vb.onMessage(yh.handleMessage);var{sendMessage:gt,onMessage:Fg}=yh;XN(yh);const $N=()=>{const[r,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(()=>{gt("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=Fg("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=Fg("CLIPBOARD_CLEARED",()=>{e(!1),i.current=0,a.current&&(a.current.style.transition="none",a.current.style.width="0%")}),m=Fg("CLIPBOARD_COUNTDOWN_CANCELLED",()=>{e(!1),i.current=0,a.current&&(a.current.style.transition="none",a.current.style.width="0%")});return()=>{c(),d(),m()}},[]),r?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},ZN=()=>{const{t:r}=Ze(),e=Ba(),a=Wa(),[i,s]=I.useState("items");I.useEffect(()=>{const E=a.pathname.substring(1),w=["items","emails","settings"].find(v=>E===v||E.startsWith(`${v}/`));w&&s(w)},[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:r("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:r("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:r("common.settings")})]})]})})},Gb=({className:r="",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:r,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 Ey=Object.prototype.hasOwnProperty;function zf(r,e){var a,i;if(r===e)return!0;if(r&&e&&(a=r.constructor)===e.constructor){if(a===Date)return r.getTime()===e.getTime();if(a===RegExp)return r.toString()===e.toString();if(a===Array){if((i=r.length)===e.length)for(;i--&&zf(r[i],e[i]););return i===-1}if(!a||typeof r=="object"){i=0;for(a in r)if(Ey.call(r,a)&&++i&&!Ey.call(e,a)||!(a in e)||!zf(r[a],e[a]))return!1;return Object.keys(e).length===i}}return r!==r&&e!==e}const ex=new Error("request for lock canceled");var tx=function(r,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(r,e||[])).next())})};class ax{constructor(e,a=ex){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=Kb(this._queue,m=>a<=m.priority);d===-1&&e<=this._value?this._dispatchItem(c):this._queue.splice(d+1,0,c)})}runExclusive(e){return tx(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]=[]),nx(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 nx(r,e){const a=Kb(r,i=>e.priority<=i.priority);r.splice(a+1,0,e)}function Kb(r,e){for(let a=r.length-1;a>=0;a--)if(e(r[a]))return a;return-1}var rx=function(r,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(r,e||[])).next())})};class ix{constructor(e){this._semaphore=new ax(1,e)}acquire(){return rx(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 mb,gb;const Bu=((gb=(mb=globalThis.browser)==null?void 0:mb.runtime)==null?void 0:gb.id)==null?globalThis.chrome:globalThis.browser,xe=sx();function sx(){const r={local:mu("local"),session:mu("session"),sync:mu("sync"),managed:mu("managed")},e=T=>{const S=r[T];if(S==null){const k=Object.keys(r).join(", ");throw Error(`Invalid area "${T}". Options: ${k}`)}return S},a=T=>{const S=T.indexOf(":"),k=T.substring(0,S),B=T.substring(S+1);if(B==null)throw Error(`Storage key should be in the form of "area:key", but received "${T}"`);return{driverArea:k,driverKey:B,driver:e(k)}},i=T=>T+"$",s=(T,S)=>{const k={...T};return Object.entries(S).forEach(([B,L])=>{L==null?delete k[B]:k[B]=L}),k},c=(T,S)=>T??S??null,d=T=>typeof T=="object"&&!Array.isArray(T)?T:{},m=async(T,S,k)=>{const B=await T.getItem(S);return c(B,(k==null?void 0:k.fallback)??(k==null?void 0:k.defaultValue))},f=async(T,S)=>{const k=i(S),B=await T.getItem(k);return d(B)},g=async(T,S,k)=>{await T.setItem(S,k??null)},E=async(T,S,k)=>{const B=i(S),L=d(await T.getItem(B));await T.setItem(B,s(L,k))},p=async(T,S,k)=>{if(await T.removeItem(S),k!=null&&k.removeMeta){const B=i(S);await T.removeItem(B)}},w=async(T,S,k)=>{const B=i(S);if(k==null)await T.removeItem(B);else{const L=d(await T.getItem(B));[k].flat().forEach(P=>delete L[P]),await T.setItem(B,L)}},v=(T,S,k)=>T.watch(S,k);return{getItem:async(T,S)=>{const{driver:k,driverKey:B}=a(T);return await m(k,B,S)},getItems:async T=>{const S=new Map,k=new Map,B=[];T.forEach(P=>{let _,j;typeof P=="string"?_=P:"getValue"in P?(_=P.key,j={fallback:P.fallback}):(_=P.key,j=P.options),B.push(_);const{driverArea:V,driverKey:H}=a(_),Q=S.get(V)??[];S.set(V,Q.concat(H)),k.set(_,j)});const L=new Map;return await Promise.all(Array.from(S.entries()).map(async([P,_])=>{(await r[P].getItems(_)).forEach(V=>{const H=`${P}:${V.key}`,Q=k.get(H),G=c(V.value,(Q==null?void 0:Q.fallback)??(Q==null?void 0:Q.defaultValue));L.set(H,G)})})),B.map(P=>({key:P,value:L.get(P)}))},getMeta:async T=>{const{driver:S,driverKey:k}=a(T);return await f(S,k)},getMetas:async T=>{const S=T.map(L=>{const P=typeof L=="string"?L:L.key,{driverArea:_,driverKey:j}=a(P);return{key:P,driverArea:_,driverKey:j,driverMetaKey:i(j)}}),k=S.reduce((L,P)=>{var _;return L[_=P.driverArea]??(L[_]=[]),L[P.driverArea].push(P),L},{}),B={};return await Promise.all(Object.entries(k).map(async([L,P])=>{const _=await Bu.storage[L].get(P.map(j=>j.driverMetaKey));P.forEach(j=>{B[j.key]=_[j.driverMetaKey]??{}})})),S.map(L=>({key:L.key,meta:B[L.key]}))},setItem:async(T,S)=>{const{driver:k,driverKey:B}=a(T);await g(k,B,S)},setItems:async T=>{const S={};T.forEach(k=>{const{driverArea:B,driverKey:L}=a("key"in k?k.key:k.item.key);S[B]??(S[B]=[]),S[B].push({key:L,value:k.value})}),await Promise.all(Object.entries(S).map(async([k,B])=>{await e(k).setItems(B)}))},setMeta:async(T,S)=>{const{driver:k,driverKey:B}=a(T);await E(k,B,S)},setMetas:async T=>{const S={};T.forEach(k=>{const{driverArea:B,driverKey:L}=a("key"in k?k.key:k.item.key);S[B]??(S[B]=[]),S[B].push({key:L,properties:k.meta})}),await Promise.all(Object.entries(S).map(async([k,B])=>{const L=e(k),P=B.map(({key:H})=>i(H));console.log(k,P);const _=await L.getItems(P),j=Object.fromEntries(_.map(({key:H,value:Q})=>[H,d(Q)])),V=B.map(({key:H,properties:Q})=>{const G=i(H);return{key:G,value:s(j[G]??{},Q)}});await L.setItems(V)}))},removeItem:async(T,S)=>{const{driver:k,driverKey:B}=a(T);await p(k,B,S)},removeItems:async T=>{const S={};T.forEach(k=>{let B,L;typeof k=="string"?B=k:"getValue"in k?B=k.key:"item"in k?(B=k.item.key,L=k.options):(B=k.key,L=k.options);const{driverArea:P,driverKey:_}=a(B);S[P]??(S[P]=[]),S[P].push(_),L!=null&&L.removeMeta&&S[P].push(i(_))}),await Promise.all(Object.entries(S).map(async([k,B])=>{await e(k).removeItems(B)}))},clear:async T=>{await e(T).clear()},removeMeta:async(T,S)=>{const{driver:k,driverKey:B}=a(T);await w(k,B,S)},snapshot:async(T,S)=>{var L;const B=await e(T).snapshot();return(L=S==null?void 0:S.excludeKeys)==null||L.forEach(P=>{delete B[P],delete B[i(P)]}),B},restoreSnapshot:async(T,S)=>{await e(T).restoreSnapshot(S)},watch:(T,S)=>{const{driver:k,driverKey:B}=a(T);return v(k,B,S)},unwatch(){Object.values(r).forEach(T=>{T.unwatch()})},defineItem:(T,S)=>{const{driver:k,driverKey:B}=a(T),{version:L=1,migrations:P={}}=S??{};if(L<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const _=async()=>{var X;const G=i(B),[{value:K},{value:$}]=await k.getItems([B,G]);if(K==null)return;const J=($==null?void 0:$.v)??1;if(J>L)throw Error(`Version downgrade detected (v${J} -> v${L}) for "${T}"`);if(J===L)return;console.debug(`[@wxt-dev/storage] Running storage migration for ${T}: v${J} -> v${L}`);const re=Array.from({length:L-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 ox(T,ie,{cause:ce})}await k.setItems([{key:B,value:Ae},{key:G,value:{...$,v:L}}]),console.debug(`[@wxt-dev/storage] Storage migration completed for ${T} v${L}`,{migratedValue:Ae})},j=(S==null?void 0:S.migrations)==null?Promise.resolve():_().catch(G=>{console.error(`[@wxt-dev/storage] Migration failed for ${T}`,G)}),V=new ix,H=()=>(S==null?void 0:S.fallback)??(S==null?void 0:S.defaultValue)??null,Q=()=>V.runExclusive(async()=>{const G=await k.getItem(B);if(G!=null||(S==null?void 0:S.init)==null)return G;const K=await S.init();return await k.setItem(B,K),K});return j.then(Q),{key:T,get defaultValue(){return H()},get fallback(){return H()},getValue:async()=>(await j,S!=null&&S.init?await Q():await m(k,B,S)),getMeta:async()=>(await j,await f(k,B)),setValue:async G=>(await j,await g(k,B,G)),setMeta:async G=>(await j,await E(k,B,G)),removeValue:async G=>(await j,await p(k,B,G)),removeMeta:async G=>(await j,await w(k,B,G)),watch:G=>v(k,B,(K,$)=>G(K??H(),$??H())),migrate:_}}}}function mu(r){const e=()=>{if(Bu.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(Bu.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const i=Bu.storage[r];if(i==null)throw Error(`"browser.storage.${r}" 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&&(zf(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 ox extends Error{constructor(e,a,i){super(`v${a} migration failed for "${e}"`,i),this.key=e,this.version=a}}var Og={exports:{}};const lx={},cx=Object.freeze(Object.defineProperty({__proto__:null,default:lx},Symbol.toStringTag,{value:"Module"})),by=NC(cx);var Iy;function ux(){return Iy||(Iy=1,function(r,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)}),r=void 0;var g;g||(g=typeof m<"u"?m:{});var E=typeof window=="object",p=typeof WorkerGlobalScope<"u",w=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":_d(ue,Le?1:0);break;case"number":Dd(ue,Le);break;case"string":Bd(ue,Le,-1,-1);break;case"object":if(Le===null)lc(ue);else if(Le.length!=null){var Ke=gi(Le,Ji);Ud(ue,Ke,Le.length,-1),hi(Ke)}else pi(ue,"Wrong API use : tried to return a value of an unknown type ("+Le+").",-1);break;default:lc(ue)}}function b(ue,Le){for(var Ke=[],at=0;at<ue;at+=1){var ot=_t(Le+4*at,"i32"),Qt=oc(ot);if(Qt===1||Qt===2)ot=Rd(ot);else if(Qt===3)ot=kd(ot);else if(Qt===4){Qt=ot,ot=Sd(Qt),Qt=Ld(Qt);for(var kn=new Uint8Array(ot),bn=0;bn<ot;bn+=1)kn[bn]=G[Qt+bn];ot=kn}else ot=null;Ke.push(ot)}return Ke}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=Ds(Le),this.eb===null)throw Error("Unable to allocate memory for the SQL string");U(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,Ke="/",at=Le;if(Ke&&(Ke=typeof Ke=="string"?Ke:nr(Ke),at=Le?je(Ke+"/"+Le):Ke),Le=ft(!0,!0),at=Z(at,Le),ue){if(typeof ue=="string"){Ke=Array(ue.length);for(var ot=0,Qt=ue.length;ot<Qt;++ot)Ke[ot]=ue.charCodeAt(ot);ue=Ke}wa(at,Le|146),Ke=aa(at,577),tc(Ke,ue,0,ue.length,0),Sn(Ke),wa(at,Le)}}this.handleError(Ge(this.filename,de)),this.db=_t(de,"i32"),cc(this.db),this.fb={},this.Sa={}}var de=Qn(4),Ee=g.cwrap,Ge=Ee("sqlite3_open","number",["string","number"]),It=Ee("sqlite3_close_v2","number",["number"]),ht=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"]),Bs=Ee("sqlite3_sql","string",["number"]),Xi=Ee("sqlite3_normalized_sql","string",["number"]),$i=Ee("sqlite3_prepare_v2","number",["number","number","number","number","number"]),rc=Ee("sqlite3_bind_text","number",["number","number","number","number","number"]),ic=Ee("sqlite3_bind_blob","number",["number","number","number","number","number"]),hd=Ee("sqlite3_bind_double","number",["number","number","number"]),Ad=Ee("sqlite3_bind_int","number",["number","number","number"]),Lo=Ee("sqlite3_bind_parameter_index","number",["number","string"]),pd=Ee("sqlite3_step","number",["number"]),yd=Ee("sqlite3_errmsg","string",["number"]),Ed=Ee("sqlite3_column_count","number",["number"]),bd=Ee("sqlite3_data_count","number",["number"]),Id=Ee("sqlite3_column_double","number",["number","number"]),Ro=Ee("sqlite3_column_text","string",["number","number"]),vd=Ee("sqlite3_column_blob","number",["number","number"]),Cd=Ee("sqlite3_column_bytes","number",["number","number"]),wd=Ee("sqlite3_column_type","number",["number","number"]),Nd=Ee("sqlite3_column_name","string",["number","number"]),Do=Ee("sqlite3_reset","number",["number"]),xd=Ee("sqlite3_clear_bindings","number",["number"]),Td=Ee("sqlite3_finalize","number",["number"]),sc=Ee("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),oc=Ee("sqlite3_value_type","number",["number"]),Sd=Ee("sqlite3_value_bytes","number",["number"]),kd=Ee("sqlite3_value_text","string",["number"]),Ld=Ee("sqlite3_value_blob","number",["number"]),Rd=Ee("sqlite3_value_double","number",["number"]),Dd=Ee("sqlite3_result_double","",["number","number"]),lc=Ee("sqlite3_result_null","",["number"]),Bd=Ee("sqlite3_result_text","",["number","string","number","number"]),Ud=Ee("sqlite3_result_blob","",["number","number","number","number"]),_d=Ee("sqlite3_result_int","",["number","number"]),pi=Ee("sqlite3_result_error","",["number","string","number"]),yi=Ee("sqlite3_aggregate_context","number",["number","number"]),cc=Ee("RegisterExtensionFunctions","number",["number"]),Bo=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=pd(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),Id(this.Qa,ue)},D.prototype.Gb=function(ue){if(ue==null&&(ue=this.Oa,this.Oa+=1),ue=Ro(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),Ro(this.Qa,ue)},D.prototype.getBlob=function(ue){ue==null&&(ue=this.Oa,this.Oa+=1);var Le=Cd(this.Qa,ue);ue=vd(this.Qa,ue);for(var Ke=new Uint8Array(Le),at=0;at<Le;at+=1)Ke[at]=G[ue+at];return Ke},D.prototype.get=function(ue,Le){Le=Le||{},ue!=null&&this.bind(ue)&&this.step(),ue=[];for(var Ke=bd(this.Qa),at=0;at<Ke;at+=1)switch(wd(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=Ed(this.Qa),Ke=0;Ke<Le;Ke+=1)ue.push(Nd(this.Qa,Ke));return ue},D.prototype.getAsObject=function(ue,Le){ue=this.get(ue,Le),Le=this.getColumnNames();for(var Ke={},at=0;at<Le.length;at+=1)Ke[Le[at]]=ue[at];return Ke},D.prototype.getSQL=function(){return Bs(this.Qa)},D.prototype.getNormalizedSQL=function(){return Xi(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=C(ue);var Ke=gi(ue,Ji);this.lb.push(Ke),this.db.handleError(rc(this.Qa,Le,Ke,ue.length-1,0))},D.prototype.Bb=function(ue,Le){Le==null&&(Le=this.Oa,this.Oa+=1);var Ke=gi(ue,Ji);this.lb.push(Ke),this.db.handleError(ic(this.Qa,Le,Ke,ue.length,0))},D.prototype.rb=function(ue,Le){Le==null&&(Le=this.Oa,this.Oa+=1),this.db.handleError((ue===(ue|0)?Ad:hd)(this.Qa,Le,ue))},D.prototype.Eb=function(ue){ue==null&&(ue=this.Oa,this.Oa+=1),ic(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(Ke){var at=Lo(Le.Qa,Ke);at!==0&&Le.tb(ue[Ke],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(),xd(this.Qa)===0&&Do(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=Td(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($i(this.db.db,this.kb,-1,de,Le)),this.kb=_t(Le,"i32");var Ke=_t(de,"i32");return Ke===0?(this.mb(),{done:!0}):(this.Za=new D(Ke,this.db),this.db.fb[Ke]=this.Za,{value:this.Za,done:!1})}catch(at){throw this.pb=se(this.kb),this.mb(),at}finally{mn(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(ht(this.db,ue,0,0,de));return this},Y.prototype.exec=function(ue,Le,Ke){if(!this.db)throw"Database closed";var at=ir(),ot=null;try{var Qt=To(ue),kn=Qn(4);for(ue=[];_t(Qt,"i8")!==0;){nt(de),nt(kn),this.handleError($i(this.db,Qt,-1,de,kn));var bn=_t(de,"i32");if(Qt=_t(kn,"i32"),bn!==0){var sn=null;for(ot=new D(bn,this),Le!=null&&ot.bind(Le);ot.step();)sn===null&&(sn={columns:ot.getColumnNames(),values:[]},ue.push(sn)),sn.values.push(ot.get(null,Ke));ot.free()}}return ue}catch(In){throw ot&&ot.free(),In}finally{mn(at)}},Y.prototype.each=function(ue,Le,Ke,at,ot){typeof Le=="function"&&(at=Ke,Ke=Le,Le=void 0),ue=this.prepare(ue,Le);try{for(;ue.step();)Ke(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=_t(de,"i32"),ue===0)throw"Nothing to prepare";var Ke=new D(ue,this);return Le!=null&&Ke.bind(Le),this.fb[ue]=Ke},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(It(this.db));var ue=ac(this.filename);return this.handleError(Ge(this.filename,de)),this.db=_t(de,"i32"),cc(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(It(this.db)),ca("/"+this.filename),this.db=null)},Y.prototype.handleError=function(ue){if(ue===0)return null;throw ue=yd(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 Ke=jr(function(at,ot,Qt){ot=b(ot,Qt);try{var kn=Le.apply(null,ot)}catch(bn){pi(at,bn,-1);return}A(at,kn)},"viii");return this.Sa[ue]=Ke,this.handleError(sc(this.db,ue,Le.length,1,0,Ke,0,0,0)),this},Y.prototype.create_aggregate=function(ue,Le){var Ke=Le.init||function(){return null},at=Le.finalize||function(sn){return sn},ot=Le.step;if(!ot)throw"An aggregate function must have a step function in "+ue;var Qt={};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 kn=jr(function(sn,In,Pr){var Ln=yi(sn,1);Object.hasOwnProperty.call(Qt,Ln)||(Qt[Ln]=Ke()),In=b(In,Pr),In=[Qt[Ln]].concat(In);try{Qt[Ln]=ot.apply(null,In)}catch(Md){delete Qt[Ln],pi(sn,Md,-1)}},"viii"),bn=jr(function(sn){var In=yi(sn,1);try{var Pr=at(Qt[In])}catch(Ln){delete Qt[In],pi(sn,Ln,-1);return}A(sn,Pr),delete Qt[In]},"vi");return this.Sa[ue]=kn,this.Sa[Le]=bn,this.handleError(sc(this.db,ue,ot.length-1,1,0,0,kn,bn,0)),this},Y.prototype.updateHook=function(ue){this.Ya&&(Bo(this.db,0,0),zn(this.Ya),this.Ya=void 0),ue&&(this.Ya=jr(function(Le,Ke,at,ot,Qt){switch(Ke){case 18:Le="insert";break;case 23:Le="update";break;case 9:Le="delete";break;default:throw"unknown operationCode in updateHook callback: "+Ke}if(at=at?Ce(K,at):"",ot=ot?Ce(K,ot):"",Qt>Number.MAX_SAFE_INTEGER)throw"rowId too big to fit inside a Number";ue(Le,at,ot,Number(Qt))},"viiiij"),Bo(this.db,this.Ya,0))},g.Database=Y};var v={...g},x="./this.program",T=(A,b)=>{throw b},S="",k,B;if(w){var L=by;S=__dirname+"/",B=A=>(A=ce(A)?new URL(A):A,L.readFileSync(A)),k=async A=>(A=ce(A)?new URL(A):A,L.readFileSync(A,void 0)),!g.thisProgram&&1<process.argv.length&&(x=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),r.exports=g,T=(A,b)=>{throw process.exitCode=A,b}}else(E||p)&&(p?S=self.location.href:typeof document<"u"&&document.currentScript&&(S=document.currentScript.src),S=S.startsWith("blob:")?"":S.slice(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1),p&&(B=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),_=g.printErr||console.error.bind(console);Object.assign(g,v),v=null,g.thisProgram&&(x=g.thisProgram);var j=g.wasmBinary,V,H=!1,Q,G,K,$,J,re,Ae,X,ie,ce=A=>A.startsWith("file://");function ye(){var A=V.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 M=0,q=null;function ee(A){var b;throw(b=g.onAbort)==null||b.call(g,A),A="Aborted("+A+")",_(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(B)A=B(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){_(`failed to asynchronously prepare wasm: ${O}`),ee(O)}}async function Re(A){var b=ne;if(!j&&typeof WebAssembly.instantiateStreaming=="function"&&!ce(b)&&!w)try{var D=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(D,A)}catch(O){_(`wasm streaming compile failed: ${O}`),_("falling back to ArrayBuffer instantiation")}return we(b,A)}class Be{constructor(b){ze(this,"name","ExitStatus");this.message=`Program terminated with exit(${b})`,this.status=b}}var ke=A=>{for(;0<A.length;)A.shift()(g)},Qe=[],pt=[],Dt=()=>{var A=g.preRun.shift();pt.unshift(A)};function _t(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 Ht=typeof TextDecoder<"u"?new TextDecoder:void 0,Ce=(A,b=0,D=NaN)=>{var O=b+D;for(D=b;A[D]&&!(D>=O);)++D;if(16<D-b&&A.buffer&&Ht)return Ht.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?Ce(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},Ve=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(w){var A=by;return b=>A.randomFillSync(b)}return b=>crypto.getRandomValues(b)},Mt=A=>{(Mt=ut())(A)},Pt=(...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||"."},Gt=[],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},U=(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 Ge=A.charCodeAt(++de);Ee=65536+((Ee&1023)<<10)|Ge&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},C=(A,b)=>{var D=Array(ia(A)+1);return A=U(A,D,0,D.length),b&&(D.length=A),D},N=[];function z(A,b){N[A]={input:[],output:[],cb:b},it(A,ae)}var ae={open(A){var b=N[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(!Gt.length){var A=null;if(w){var b=Buffer.alloc(256),D=0,O=process.stdin.fd;try{D=L.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}Gt=C(A,!0)}A=Gt.shift()}return A},qb(A,b){b===null||b===10?(P(Ce(A.output)),A.output=[]):b!=0&&A.output.push(b)},fsync(A){var b;0<((b=A.output)==null?void 0:b.length)&&(P(Ce(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?(_(Ce(A.output)),A.output=[]):b!=0&&A.output.push(b)},fsync(A){var b;0<((b=A.output)==null?void 0:b.length)&&(_(Ce(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=ko(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}}},ft=(A,b)=>{var D=0;return A&&(D|=365),b&&(D|=146),D},Et=null,St={},dt=[],hr=1,sa=null,rn=!1,Pn=!0,Hn={},Oe=class{constructor(A){ze(this,"name","ErrnoError");this.Pa=A}},ui=class{constructor(){ze(this,"gb",{});ze(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){ze(this,"La",{});ze(this,"Ma",{});ze(this,"ab",null);A||(A=this),this.parent=A,this.Xa=A.Xa,this.id=hr++,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(Ge=>!!Ge);for(var O=Et,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=Ve(Y),O=O.parent;else{Y=je(Y+"/"+A[de]);try{O=qt(O,A[de])}catch(Ge){if((Ge==null?void 0:Ge.Pa)===44&&Ee&&b.Jb)return{path:Y};throw Ge}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=Ve(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 _a(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 Br(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 Me(A){if(!A)throw new Oe(63);return A}function _e(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 kt(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 bt(A,b,D){var O=A==null?void 0:A.Ma.Ua;A=O?A:b,O??(O=b.La.Ua),Me(O),O(A,D)}var rt={open(A){var b,D;A.Ma=St[A.node.rdev].Ma,(D=(b=A.Ma).open)==null||D.call(b,A)},Va(){throw new Oe(70)}};function it(A,b){St[A]={Ma:b}}function dn(A,b){var D=b==="/";if(D&&Et)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?Et=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=Br(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 He(A,b,D){typeof D>"u"&&(D=b,b=438),Fe(A,b|8192,D)}function Ft(A,b){if(!Pt(A))throw new Oe(44);var D=la(b,{parent:!0}).node;if(!D)throw new Oe(44);b=Ye(b);var O=Br(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,Me(A.La.Ta)(A)}function Ya(A,b,D,O){bt(A,b,{mode:D&4095|b.mode&-4096,ctime:Date.now(),Fb:O})}function wa(A,b){A=typeof A=="string"?la(A,{$a:!0}).node:A,Ya(null,A,b)}function Ar(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);bt(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)&&(_a(b)!=="r"||b&576)?31:za(O,_a(b)):44))throw new Oe(Y);return b&512&&!de&&(Y=O,Y=typeof Y=="string"?la(Y,{$a:!0}).node:Y,Ar(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&&wa(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 Ur(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 ks(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 tc(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&&Ur(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 ac(A){var b,D=aa(A,D||0);A=ua(A).size;var O=new Uint8Array(A);return ks(D,O,0,A,0),b=O,Sn(D),b}function Na(A,b,D){A=je("/dev/"+A);var O=ft(!!b,!!D);Na.yb??(Na.yb=64);var Y=Na.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,Ge,It){for(var ht=0,ma=0;ma<It;ma++){try{var Qa=b()}catch{throw new Oe(29)}if(Qa===void 0&&ht===0)throw new Oe(6);if(Qa==null)break;ht++,Ee[Ge+ma]=Qa}return ht&&(de.node.atime=Date.now()),ht},write(de,Ee,Ge,It){for(var ht=0;ht<It;ht++)try{D(Ee[Ge+ht])}catch{throw new Oe(29)}return It&&(de.node.mtime=de.node.ctime=Date.now()),ht}}),He(A,O,Y)}var Xt={};function _r(A,b,D){if(b.charAt(0)==="/")return b;if(A=A===-100?"/":_e(A).path,b.length==0){if(!D)throw new Oe(44);return A}return A+"/"+b}function Mr(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 Yi=void 0,Fr=()=>{var A=J[+Yi>>2];return Yi+=4,A},wo=0,yn=[0,31,60,91,121,152,182,213,244,274,305,335],No=[0,31,59,90,120,151,181,212,243,273,304,334],di={},Ls=A=>{var b;Q=A,et||0<wo||((b=g.onExit)==null||b.call(g,A),H=!0),T(A,new Be(A))},mi=A=>{if(!H)try{if(A(),!(et||0<wo))try{Q=A=Q,Ls(A)}catch(b){b instanceof Be||b=="unwind"||T(1,b)}}catch(b){b instanceof Be||b=="unwind"||T(1,b)}},Rs={},xo=()=>{if(!pr){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 Rs)Rs[b]===void 0?delete A[b]:A[b]=Rs[b];var D=[];for(b in A)D.push(`${b}=${A[b]}`);pr=D}return pr},pr,To=A=>{var b=ia(A)+1,D=Qn(b);return U(A,K,D,b),D},nc=(A,b,D,O)=>{var Y={string:ht=>{var ma=0;return ht!=null&&ht!==0&&(ma=To(ht)),ma},array:ht=>{var ma=Qn(ht.length);return G.set(ht,ma),ma}};A=g["_"+A];var de=[],Ee=0;if(O)for(var Ge=0;Ge<O.length;Ge++){var It=Y[D[Ge]];It?(Ee===0&&(Ee=ir()),de[Ge]=It(O[Ge])):de[Ge]=O[Ge]}return D=A(...de),D=function(ht){return Ee!==0&&mn(Ee),b==="string"?ht?Ce(K,ht):"":b==="boolean"?!!ht:ht}(D)},Ji=0,gi=(A,b)=>(b=b==1?Qn(A.length):Ds(A.length),A.subarray||A.slice||(A=new Uint8Array(A)),K.set(A,b),b),Or,So=[],En,zn=A=>{Or.delete(En.get(A)),En.set(A,null),So.push(A)},jr=(A,b)=>{if(!Or){Or=new WeakMap;var D=En.length;if(Or)for(var O=0;O<0+D;O++){var Y=En.get(O);Y&&Or.set(Y,O)}}if(D=Or.get(A)||0)return D;if(So.length)D=So.pop();else{try{En.grow(1)}catch(It){throw It instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":It}D=En.length-1}try{En.set(D,A)}catch(It){if(!(It instanceof TypeError))throw It;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 Ge=b.length;128>Ge?O.push(Ge):O.push(Ge%128|128,Ge>>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}En.set(D,b)}return Or.set(A,D),D};sa=Array(4096),dn(Ue,"/"),Te("/tmp"),Te("/home"),Te("/home/web_user"),function(){Te("/dev"),it(259,{read:()=>0,write:(O,Y,de,Ee)=>Ee,Va:()=>0}),He("/dev/null",259),z(1280,he),z(1536,be),He("/dev/tty",1280),He("/dev/tty1",1536);var A=new Uint8Array(1024),b=0,D=()=>(b===0&&(Mt(A),b=A.byteLength),A[--b]);Na("random",D),Na("urandom",D),Te("/dev/shm"),Te("/dev/shm/tmp")}(),function(){Te("/proc");var A=Te("/proc/self");Te("/proc/self/fd"),dn({Xa(){var b=Ea(A,"fd",16895,73);return b.Ma={Va:Ue.Ma.Va},b.La={lookup(D,O){D=+O;var Y=_e(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?Ce(K,A):""}, at: `+[b?b?Ce(K,b):"":"unknown filename",D,O?O?Ce(K,O):"":"unknown function"]),i:function(A,b){try{return A=A?Ce(K,A):"",wa(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?Ce(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=_e(A);return Ya(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=_e(A);return bt(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){Yi=D;try{var O=_e(A);switch(b){case 0:var Y=Fr();if(0>Y)break;for(;dt[Y];)Y++;return kt(O,Y).fd;case 1:case 2:return 0;case 3:return O.flags;case 4:return Y=Fr(),O.flags|=Y,0;case 12:return Y=Fr(),$[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=_e(A),O=D.node,Y=D.Ma.Ta;A=Y?D:O,Y??(Y=O.La.Ta),Me(Y);var de=Y(A);return Mr(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=_e(A);if(0>b||(D.flags&2097155)===0)throw new Oe(28);return Ar(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:(U("/",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?Ce(K,A):"",Mr(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?Ce(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?Ce(K,b):"";var Y=O&256;return b=_r(A,b,O&4096),Mr(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){Yi=O;try{b=b?Ce(K,b):"",b=_r(A,b);var Y=O?Fr():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?Ce(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)),Ge=G[D+Ee];return U(de,K,D,O+1),G[D+Ee]=Ge,Ee}catch(It){if(typeof Xt>"u"||It.name!=="ErrnoError")throw It;return-It.Pa}},u:function(A){try{return A=A?Ce(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?Ce(K,A):"",Mr(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?Ce(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?Ce(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],Ge=J[D+8>>2];Ge==1073741823?Y=O:Ge==1073741822?Y=null:Y=1e3*Ee+Ge/1e6,D+=16,Ee=re[D>>2]+4294967296*J[D+4>>2],Ge=J[D+8>>2],Ge==1073741823?de=O:Ge==1073741822?de=null:de=1e3*Ee+Ge/1e6}else de=Y=O;if((de??Y)!==null){A=Y;var It=la(b,{$a:!0}).node;Me(It.La.Ua)(It,{atime:A,mtime:de})}return 0}catch(ht){if(typeof Xt>"u"||ht.name!=="ErrnoError")throw ht;return-ht.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?No:yn)[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 Ge=_e(O);if((b&2)!==0&&(D&2)===0&&(Ge.flags&2097155)!==2)throw new Oe(2);if((Ge.flags&2097155)===1)throw new Oe(2);if(!Ge.Ma.ib)throw new Oe(43);if(!A)throw new Oe(28);var It=Ge.Ma.ib(Ge,A,Y,b,D),ht=It.Kb;return J[de>>2]=It.Ab,re[Ee>>2]=ht,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=_e(Y);if(D&2){if(D=de,(Ee.node.mode&61440)!==32768)throw new Oe(43);if(!(O&2)){var Ge=K.slice(A,A+b);Ee.Ma.jb&&Ee.Ma.jb(Ee,Ge,D,b,O)}}}catch(It){if(typeof Xt>"u"||It.name!=="ErrnoError")throw It;return-It.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 Ge=Math.abs(Ee);return`UTC${0<=Ee?"-":"+"}${String(Math.floor(Ge/60)).padStart(2,"0")}${String(Ge%60).padStart(2,"0")}`},A=b(de),b=b(Y),Y<de?(U(A,K,D,17),U(b,K,O,17)):(U(A,K,O,17),U(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))-V.buffer.byteLength+65535)/65536|0;try{V.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 xo().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=xo();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=_e(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=_e(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=_e(A);A=b;for(var de,Ee=b=0;Ee<D;Ee++){var Ge=re[A>>2],It=re[A+4>>2];A+=8;var ht=ks(Y,G,Ge,It,de);if(0>ht){var ma=-1;break e}if(b+=ht,ht<It)break;typeof de<"u"&&(de+=ht)}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=_e(A);return Ur(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=_e(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=_e(A);A=b;for(var de,Ee=b=0;Ee<D;Ee++){var Ge=re[A>>2],It=re[A+4>>2];A+=8;var ht=tc(Y,G,Ge,It,de);if(0>ht){var ma=-1;break e}if(b+=ht,ht<It)break;typeof de<"u"&&(de+=ht)}ma=b}return re[O>>2]=ma,0}catch(Qa){if(typeof Xt>"u"||Qa.name!=="ErrnoError")throw Qa;return Qa.Pa}},k:Ls},Je;(async function(){var D;function A(O){var Y;return Je=O.exports,V=Je.M,ye(),En=Je.O,M--,(Y=g.monitorRunDependencies)==null||Y.call(g,M),M==0&&q&&(O=q,q=null,O()),Je}M++,(D=g.monitorRunDependencies)==null||D.call(g,M);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",S):S+"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,Ge,It)=>(g._sqlite3_create_function_v2=Je.Aa)(A,b,D,O,Y,de,Ee,Ge,It),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 Ds=g._malloc=A=>(Ds=g._malloc=Je.Da)(A),hi=g._free=A=>(hi=g._free=Je.Ea)(A);g._RegisterExtensionFunctions=A=>(g._RegisterExtensionFunctions=Je.Fa)(A);var ko=(A,b)=>(ko=Je.Ga)(A,b),Ai=(A,b)=>(Ai=Je.Ha)(A,b),mn=A=>(mn=Je.Ia)(A),Qn=A=>(Qn=Je.Ja)(A),ir=()=>(ir=Je.Ka)();g.stackSave=()=>ir(),g.stackRestore=A=>mn(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)=>nc(A,b,D,de)},g.addFunction=jr,g.removeFunction=zn,g.UTF8ToString=se,g.ALLOC_NORMAL=Ji,g.allocate=gi,g.allocateUTF8OnStack=To;function Vn(){function A(){var Y;if(g.calledRun=!0,!H){if(!g.noFSInit&&!rn){var b,D;rn=!0,O??(O=g.stdin),b??(b=g.stdout),D??(D=g.stderr),O?Na("stdin",O):Ft("/dev/tty","/dev/stdin"),b?Na("stdout",null,b):Ft("/dev/tty","/dev/stdout"),D?Na("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();Qe.unshift(O)}ke(Qe)}}if(0<M)q=Vn;else{if(g.preRun)for(typeof g.preRun=="function"&&(g.preRun=[g.preRun]);g.preRun.length;)Dt();ke(pt),0<M?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)};r.exports=i,r.exports.default=i}(Og)),Og.exports}var dx=ux();const Qf=Wi(dx);var vy=`
\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;
`,Cy={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"}],Vf=class{getCreateVaultSql(){try{return{success:!0,sqlCommands:[vy],version:ja[ja.length-1].version,migrationNumber:ja[ja.length-1].revision}}catch(r){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:r instanceof Error?r.message:"Unknown error creating vault SQL"}}}getUpgradeVaultSql(r,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(r>=a)return{success:!0,sqlCommands:[],version:i.version,migrationNumber:a};const s=ja.filter(d=>d.revision>r&&d.revision<=a),c=[];for(const d of s){const m=d.revision-1,f=Cy[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(r){return this.getUpgradeVaultSql(r)}getUpgradeToVersionSql(r,e){const a=ja.find(i=>i.version===e);return a?this.getUpgradeVaultSql(r,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(r,e,a){let i="0.0.0",s=0;r&&(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(r){const e=["Aliases","Services","Credentials","Passwords","Attachments","EncryptionKeys","Settings","TotpCodes"];return r.filter(i=>e.includes(i)).length>=5}getAllVersions(){return[...ja]}getLatestVersion(){return ja[ja.length-1]}getMigrationSql(r){return Cy[r]}getCompleteSchemaSql(){return vy}};function wy(r){const a=/^(\d+)\.(\d+)\.(\d+)$/.exec(r);return a?{major:parseInt(a[1],10),minor:parseInt(a[2],10),patch:parseInt(a[3],10)}:null}function mx(r,e){const a=wy(r);if(!a)return{isCompatible:!1,databaseVersion:r,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const i=ja.find(g=>g.version===r);if(i)return{isCompatible:!0,databaseVersion:r,clientVersion:i,isKnownVersion:!0,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const s=e?ja.find(g=>g.version===e)??Ny():Ny(),c=wy(s.version);if(!c)return{isCompatible:!1,databaseVersion:r,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:r,clientVersion:s,isKnownVersion:!1,isMajorVersionDifference:d,isMinorVersionDifference:m}}function Ny(){return ja[ja.length-1]}function gx(r){const a=/_(\d+\.\d+\.\d+)-/.exec(r);return(a==null?void 0:a[1])??null}class Is extends Error{constructor(e){super(e),this.name="VaultVersionIncompatibleError",Object.setPrototypeOf(this,Is.prototype)}}const fx={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.",errors:{invalidCode:"Bitte gib einen gültigen 6-stelligen Sicherheits-Code ein.",serverError:"Der AliasVault-Server konnte nicht erreicht werden. Bitte versuche es später noch einmal oder kontaktiere den Support, falls das Problem weiterhin besteht.",wrongPassword:"Falsches Passwort. Bitte versuche es erneut.",sessionExpired:"Deine Sitzung ist abgelaufen. Bitte melde Dich erneut an.",mobileLoginRequestExpired:"Zeitüberschreitung für mobile Anmeldeanforderungen. Bitte lade die Seite neu und versuche es erneut."}},hx={vault:"Tresor",emails:"E-Mails"},Ax={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."},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."}},px={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"},yx={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"}},Ex={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"}},bx={"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"},Ix={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"}},vx={uploading:"Hochladen...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},Cx={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."}},wx={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."}},Nx={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 "}},xx={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."},Tx={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}})"}},Sx={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"},kx={auth:fx,menu:hx,common:Ax,content:px,items:yx,itemTypes:Ex,fieldLabels:bx,totp:Ix,attachmentUploader:vx,emails:Cx,settings:wx,passkeys:Nx,recentlyDeleted:xx,upgrade:Tx,logout:Sx},Lx={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.",errors:{invalidCode:"Please enter a valid 6-digit authentication code.",serverError:"Could not reach AliasVault server. Please try again later or contact support if the problem persists.",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."}},Rx={vault:"Vault",emails:"Emails"},Dx={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."},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."}},Bx={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"},Ux={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"}},_x={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"}},Mx={"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"},Fx={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."}},Ox={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},jx={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."}},Px={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."}},Hx={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 "}},zx={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."},Qx={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}})"}},Vx={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"},Gx={auth:Lx,menu:Rx,common:Dx,content:Bx,items:Ux,itemTypes:_x,fieldLabels:Mx,totp:Fx,attachmentUploader:Ox,emails:jx,settings:Px,passkeys:Hx,recentlyDeleted:zx,upgrade:Qx,logout:Vx},Kx={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.",errors:{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."}},qx={vault:"Bóveda",emails:"Correos electrónicos"},Wx={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."},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."}},Yx={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"},Jx={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"}},Xx={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"}},$x={"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"},Zx={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."}},eT={uploading:"Subiendo...",uploadSuccess:"Archivos subidos con éxito.",deleteSuccess:"Adjunto eliminado correctamente.",firefoxExpandRequired:"Para subir archivos, utilice la ventana ampliada.",openExpandedWindow:"Abrir ventana ampliada"},tT={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."}},aT={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."}},nT={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 "}},rT={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."},iT={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}})"}},sT={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"},oT={auth:Kx,menu:qx,common:Wx,content:Yx,items:Jx,itemTypes:Xx,fieldLabels:$x,totp:Zx,attachmentUploader:eT,emails:tT,settings:aT,passkeys:nT,recentlyDeleted:rT,upgrade:iT,logout:sT},lT={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.",errors:{invalidCode:"Syötä kelvollinen 6-numeroinen tunnistautumiskoodi.",serverError:"AliasVault-palvelimeen ei saatu yhteyttä. Yritä myöhemmin uudelleen tai ota yhteyttä tukeen, jos ongelma jatkuu.",wrongPassword:"Virheellinen salasana. Yritä uudelleen.",sessionExpired:"Istuntosi on vanhentunut. Kirjaudu sisään uudelleen.",mobileLoginRequestExpired:"Mobiilikirjautumispyyntö aikakatkaistiin. Lataa sivu uudelleen ja yritä uudelleen."}},cT={vault:"Holvi",emails:"Sähköpostit"},uT={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."},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."}},dT={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"},mT={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"}},gT={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"}},fT={"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"},hT={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."}},AT={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},pT={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."}},yT={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."}},ET={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ä "}},bT={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."},IT={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}})"}},vT={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"},CT={auth:lT,menu:cT,common:uT,content:dT,items:mT,itemTypes:gT,fieldLabels:fT,totp:hT,attachmentUploader:AT,emails:pT,settings:yT,passkeys:ET,recentlyDeleted:bT,upgrade:IT,logout:vT},wT={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.",errors:{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."}},NT={vault:"Coffre-fort",emails:"Emails"},xT={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."},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."}},TT={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"},ST={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"}},kT={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"}},LT={"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"},RT={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."}},DT={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"},BT={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."}},UT={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."}},_T={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é "}},MT={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."},FT={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}})"}},OT={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"},jT={auth:wT,menu:NT,common:xT,content:TT,items:ST,itemTypes:kT,fieldLabels:LT,totp:RT,attachmentUploader:DT,emails:BT,settings:UT,passkeys:_T,recentlyDeleted:MT,upgrade:FT,logout:OT},PT={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.",errors:{invalidCode:"נא למלא קוד אימות באורך 6 ספרות.",serverError:"לא ניתן ליצור קשר עם השרת של AliasVault. נא לנסות שוב מאוחר יותר או ליצור קשר עם התמיכה אם הבעיה נשנית.",wrongPassword:"סיסמה שגויה. נא לנסות שוב.",sessionExpired:"תוקף ההפעלה שלך פג. נא להיכנס מחדש.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."}},HT={vault:"Vault",emails:"הודעות דוא״ל"},zT={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."},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:"הכספת המקומית אינה עדכנית. נא לסנכרן את הכספת שלך על ידי ריענון העמוד ולנסות שוב."}},QT={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:"התעלמות מחלונית"},VT={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:"שדה חובה"}},GT={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"}},KT={"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"},qT={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."}},WT={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},YT={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:"אירעה שגיאה בניסיון לטעון את הודעות הדוא״ל. נא לנסות לערוך ולשמור את רשומת פרטי הקשר כדי לסנכרן את מסד הנתונים ואז לנסות שוב."}},JT={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."}},XT={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 "}},$T={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."},ZT={title:"שדרוג כספת",subtitle:"AliasVault התעדכן וצריך לשדרג את הכספת שלך. הפעולה הזאת אמורה לארוך מספר שניות.",versionInformation:"פרטי גרסה",yourVault:"גרסת הכספת שלך:",newVersion:"הגרסה החדשה הזמינה:",upgrade:"שדרוג כספת",upgrading:"משתדרגת…",whatsNew:"מה חדש",whatsNewDescription:"יש לשדרג כדי שתהיה תמיכה בשינויים הבאים:",noDescriptionAvailable:"אין תיאור זמין לגרסה הזאת.",alerts:{unableToGetVersionInfo:"לא ניתן לקבל את פרטי הגרסה. נא לנסות שוב מאוחר יותר.",selfHostedServer:"שרת באירוח עצמי",selfHostedWarning:"אם מדובר בשרת שמתארח עצמאית, נא לוודא שהעותק שמתארח אצלך גם כן מתעדכן כי אחרת הכניסה לאתר תפסיק לעבוד.",continueUpgrade:"להמשיך בשדרוג",upgradeFailed:"השדרוג נכשל",failedToApplyMigration:"החלת ההסבה נכשלה ({{current}} מתוך {{total}})"}},eS={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"},tS={auth:PT,menu:HT,common:zT,content:QT,items:VT,itemTypes:GT,fieldLabels:KT,totp:qT,attachmentUploader:WT,emails:YT,settings:JT,passkeys:XT,recentlyDeleted:$T,upgrade:ZT,logout:eS},aS={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.",errors:{invalidCode:"Inserisci un codice di autenticazione a 6 cifre valido.",serverError:"Impossibile connettersi al server di AliasVault. Riprova più tardi o contatta il supporto se il problema persiste.",wrongPassword:"Password non corretta. Riprova nuovamente.",sessionExpired:"La tua sessione è scaduta. Effettua di nuovo il login.",mobileLoginRequestExpired:"Richiesta di accesso mobile scaduta. Per favore ricarica la pagina e riprova."}},nS={vault:"Cassaforte",emails:"E-Mail"},rS={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."},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."}},iS={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"},sS={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:"Folders",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"}},oS={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"}},lS={"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"},cS={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."}},uS={uploading:"Caricamento...",uploadSuccess:"File caricati correttamente",deleteSuccess:"Allegato eliminato con successo.",firefoxExpandRequired:"Per caricare i file, usa la finestra estesa.",openExpandedWindow:"Apri Finestra Estesa"},dS={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."}},mS={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."}},gS={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"}},fS={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."},hS={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}})"}},AS={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"},pS={auth:aS,menu:nS,common:rS,content:iS,items:sS,itemTypes:oS,fieldLabels:lS,totp:cS,attachmentUploader:uS,emails:dS,settings:mS,passkeys:gS,recentlyDeleted:fS,upgrade:hS,logout:AS},yS={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.",errors:{invalidCode:"Voer een geldige 6-cijferige code in.",serverError:"Kon de AliasVault server niet bereiken. Probeer het later opnieuw of neem contact op met support als het probleem aanhoudt.",wrongPassword:"Onjuist wachtwoord. Probeer het opnieuw.",sessionExpired:"Je sessie is verlopen. Log opnieuw in.",mobileLoginRequestExpired:"Time-out van de mobiele inlogaanvraag. Herlaad de pagina en probeer opnieuw."}},ES={vault:"Vault",emails:"E-mails"},bS={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."},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."}},IS={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"},vS={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:"Folders",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"}},CS={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"}},wS={"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"},NS={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."}},xS={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"},TS={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."}},SS={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."}},kS={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"}},LS={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."},RS={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}})"}},DS={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"},BS={auth:yS,menu:ES,common:bS,content:IS,items:vS,itemTypes:CS,fieldLabels:wS,totp:NS,attachmentUploader:xS,emails:TS,settings:SS,passkeys:kS,recentlyDeleted:LS,upgrade:RS,logout:DS},US={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.",errors:{invalidCode:"Wprowadź prawidłowy 6-cyfrowy kod uwierzytelniający.",serverError:"Nie można połączyć się z serwerem AliasVault. Spróbuj ponownie później lub skontaktuj się z pomocą techniczną, jeśli problem będzie się powtarzał.",wrongPassword:"Hasło jest nieprawidłowe. Spróbuj ponownie.",sessionExpired:"Twoja sesja wygasła. Prosimy o zalogowanie się ponownie.",mobileLoginRequestExpired:"Limit czasu logowania upłynął. Proszę odświeżyć stronę i spróbować ponownie."}},_S={vault:"Sejf",emails:"Skrzynka odbiorcza"},MS={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."},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."}},FS={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"},OS={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"}},jS={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"}},PS={"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"},HS={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."}},zS={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"},QS={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."}},VS={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."}},GS={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 "}},KS={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."},qS={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}})"}},WS={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"},YS={auth:US,menu:_S,common:MS,content:FS,items:OS,itemTypes:jS,fieldLabels:PS,totp:HS,attachmentUploader:zS,emails:QS,settings:VS,passkeys:GS,recentlyDeleted:KS,upgrade:qS,logout:WS},JS={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.",errors:{invalidCode:"Por favor digite o código de autenticação de 6 dígitos.",serverError:"Não foi possível conectar ao servidor do AliasVault. Por favor tente novamente mais tarde ou entre em contato com o suporte caso o problema persista.",wrongPassword:"Senha incorreta. Por favor tente novamente.",sessionExpired:"Sua sessão expirou. Por favor, faça login novamente.",mobileLoginRequestExpired:"Requisição de login pelo dispositivo móvel demorou muito. Por favor, atualize a página e tente novamente."}},XS={vault:"Cofre",emails:"E-mails"},$S={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."},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."}},ZS={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"},e1={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"}},t1={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"}},a1={"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"},n1={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."}},r1={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"},i1={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."}},s1={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."}},o1={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 "}},l1={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."},c1={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}})"}},u1={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"},d1={auth:JS,menu:XS,common:$S,content:ZS,items:e1,itemTypes:t1,fieldLabels:a1,totp:n1,attachmentUploader:r1,emails:i1,settings:s1,passkeys:o1,recentlyDeleted:l1,upgrade:c1,logout:u1},m1={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.",errors:{invalidCode:"Introdu un cod de autentificare valid din 6 cifre.",serverError:"Conexiunea la serverul AliasVault a eșuat. Încearcă mai târziu sau contactează asistența dacă problema persistă.",wrongPassword:"Parolă incorectă. Încearcă din nou.",sessionExpired:"Sesiunea a expirat. Autentifică-te din nou.",mobileLoginRequestExpired:"Cererea de autentificare mobilă a expirat. Reîncarcă pagina și încearcă din nou."}},g1={vault:"Seif",emails:"E-mailuri"},f1={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."},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."}},h1={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"},A1={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"}},p1={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ă"}},y1={"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"},E1={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."}},b1={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ă"},I1={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."}},v1={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ă."}},C1={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 "}},w1={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."},N1={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}})"}},x1={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"},T1={auth:m1,menu:g1,common:f1,content:h1,items:A1,itemTypes:p1,fieldLabels:y1,totp:E1,attachmentUploader:b1,emails:I1,settings:v1,passkeys:C1,recentlyDeleted:w1,upgrade:N1,logout:x1},S1={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, чтобы войти.",errors:{invalidCode:"Пожалуйста, введите правильный 6-значный код аутентификации.",serverError:"Не удалось подключиться к серверу AliasVault. Пожалуйста, повторите попытку позже или обратитесь в службу поддержки, если проблема не устранится.",wrongPassword:"Неверный пароль. Пожалуйста, повторите попытку.",sessionExpired:"Время сеанса истекло. Пожалуйста, войдите снова.",mobileLoginRequestExpired:"Истекло время ожидания входа. Перезагрузите страницу и повторите попытку."}},k1={vault:"Хранилище",emails:"Почта"},L1={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:"Не удалось объединить изменения. Попробуйте снова."},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:"Локальное хранилище не обновлено. Пожалуйста, синхронизируйте ваше хранилище, обновив страницу, и повторите попытку."}},R1={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:"Закрыть окно"},D1={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:"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:"Это поле является обязательным"}},B1={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:"Защищенная заметка"}},U1={"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"},_1={addCode:"Добавить код 2FA",instructions:"Введите секретный ключ, указанный на веб-сайте, где вы хотите добавить двухфакторную аутентификацию.",nameOptional:"Имя (необязательно)",secretKey:"Секретный ключ",saveToViewCode:"Сохранить для просмотра кода",defaultName:"Аутентификатор",errors:{invalidSecretKey:"Неверный формат секретного ключа."}},M1={uploading:"Загрузка...",uploadSuccess:"Файлы успешно загружены.",deleteSuccess:"Вложение успешно удалено.",firefoxExpandRequired:"Для загрузки файлов используйте расширенное окно.",openExpandedWindow:"Открыть расширенное окно"},F1={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:"При попытке загрузить письма произошла ошибка. Пожалуйста, попробуйте отредактировать и сохранить данные для синхронизации базы данных, затем повторите попытку."}},O1={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:"Разблокировка с помощью ПИН-кода в расширении для браузера может быть менее безопасной, чем использование вашего мастер-пароля, поскольку ПИН-коды обычно имеют более низкую энтропию и могут быть подобраны методом перебора (брутфорс), если ваше устройство будет скомпрометировано. Используйте этот способ только на устройствах, которым вы полностью доверяете."}},j1={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:"Провайдер ключей доступа включен "}},P1={title:"Недавно удаленные",noItems:"Нет удаленных элементов",noItemsDescription:"Удаленные элементы будут храниться здесь 30 дней, после чего они будут удалены безвозвратно.",description:"Эти элементы будут безвозвратно удалены через 30 дней. Вы можете восстановить их или удалить немедленно.",restore:"Восстановить",deletePermanently:"Удалить безвозвратно",emptyAll:"Очистить все",daysRemaining_one:"Остался {{count}} день",daysRemaining_other:"Осталось {{count}} дней",expiringSoon:"Скоро будут удалены",confirmDeleteTitle:"Удалить безвозвратно?",confirmDeleteMessage:"Этот элемент будет удален навсегда без возможности восстановления.",confirmEmptyAllTitle:"Очистить «Недавно удалённые»?",confirmEmptyAllMessage:"Все элементы {{count}} будут удалены навсегда без возможности восстановления."},H1={title:"Обновить хранилище",subtitle:"AliasVault обновился, и ваше хранилище необходимо обновить. Это займет всего несколько секунд.",versionInformation:"Информация о версии",yourVault:"Версия вашего хранилища:",newVersion:"Доступна новая версия:",upgrade:"Обновить хранилище",upgrading:"Обновление...",whatsNew:"Что нового",whatsNewDescription:"Для поддержки следующих изменений требуется обновление:",noDescriptionAvailable:"Описание для этой версии недоступно.",alerts:{unableToGetVersionInfo:"Не удалось получить информацию о версии. Пожалуйста, попробуйте снова.",selfHostedServer:"Автономный сервер",selfHostedWarning:"Если вы используете автономный сервер, обязательно обновите свой автономный экземпляр, так как в противном случае вход в веб-клиент перестанет работать.",continueUpgrade:"Продолжить обновление",upgradeFailed:"Ошибка обновления",failedToApplyMigration:"Не удалось применить перенос ({{current}} из {{total}})"}},z1={unsyncedChangesTitle:"Несинхронизированные изменения",unsyncedChangesWarning:"У вас есть несинхронизированные изменения, которые будут потеряны, если вы выйдете из аккаунта сейчас. Вы уверены, что хотите продолжить?",logoutAnyway:"Все равно выйти"},Q1={auth:S1,menu:k1,common:L1,content:R1,items:D1,itemTypes:B1,fieldLabels:U1,totp:_1,attachmentUploader:M1,emails:F1,settings:O1,passkeys:j1,recentlyDeleted:P1,upgrade:H1,logout:z1},V1={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, щоб увійти та розблокувати сховище.",errors:{invalidCode:"Будь ласка, введіть дійсний 6-значний код автентифікації.",serverError:"Не вдалося зв’язатися зі сервером AliasVault. Будь ласка, спробуйте пізніше або зверніться до служби підтримки, якщо проблема не зникне.",wrongPassword:"Невірний пароль. Будь ласка, спробуйте ще раз.",sessionExpired:"Час сеансу закінчився. Будь ласка, увійдіть знову.",mobileLoginRequestExpired:"Час очікування запиту на вхід у мобільний додаток закінчився. Перезавантажте сторінку та спробуйте ще раз."}},G1={vault:"Vault",emails:"Електронні адреси"},K1={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."},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:"Локальне сховище не оновлене. Синхронізуйте своє сховище, оновивши сторінку, та повторіть спробу."}},q1={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:"Закрити спливаюче вікно"},W1={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:"Це поле обов'язкове"}},Y1={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"}},J1={"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"},X1={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."}},$1={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},Z1={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:"Під час спроби завантажити електронні листи сталася помилка. Спробуйте відредагувати та зберегти запис облікових даних, щоб синхронізувати базу даних, а потім повторіть спробу."}},ek={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."}},tk={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 "}},ak={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."},nk={title:"Оновлення сховища",subtitle:"AliasVault оновлено, і ваше сховище потрібно оновити. Це займе лише кілька секунд.",versionInformation:"Інформація про версію",yourVault:"Ваша версія сховища:",newVersion:"Доступна нова версія:",upgrade:"Оновлення сховища",upgrading:"Оновлення...",whatsNew:"Що нового",whatsNewDescription:"Для підтримки таких змін потрібне оновлення:",noDescriptionAvailable:"Для цієї версії немає опису.",alerts:{unableToGetVersionInfo:"Не вдалося отримати інформацію про версію. Спробуйте ще раз.",selfHostedServer:"Сервер із самостійним розміщенням",selfHostedWarning:"Якщо ви використовуєте власний сервер, обов’язково оновіть і свій власний екземпляр, інакше вхід до вебклієнта перестане працювати.",continueUpgrade:"Продовжити оновлення",upgradeFailed:"Помилка оновлення",failedToApplyMigration:"Не вдалося застосувати міграцію ({{current}} з {{total}})"}},rk={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"},ik={auth:V1,menu:G1,common:K1,content:q1,items:W1,itemTypes:Y1,fieldLabels:J1,totp:X1,attachmentUploader:$1,emails:Z1,settings:ek,passkeys:tk,recentlyDeleted:ak,upgrade:nk,logout:rk},sk={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 移动端应用扫描该二维码，即可登录并解锁您的密码库。",errors:{invalidCode:"请输入有效的6位动态验证码。",serverError:"无法连接到AliasVault服务器。请稍后重试，若问题依旧，请联系支持人员。",wrongPassword:"密码不正确。请重试。",sessionExpired:"您的会话已过期。请重新登录。",mobileLoginRequestExpired:"移动端登录请求超时。请重新加载页面后重试。"}},ok={vault:"密码库",emails:"邮件"},lk={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:"合并密码库更改失败，请重试。"},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:"本地密码库不是最新的。请刷新页面同步密码库后重试。"}},ck={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:"关闭弹窗"},uk={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:"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:"此字段为必填项"}},dk={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:"安全笔记"}},mk={"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"},gk={addCode:"添加两步验证码",instructions:"输入要添加两步验证的网站显示的密钥。",nameOptional:"名称（可选）",secretKey:"密钥",saveToViewCode:"保存以查看验证码",defaultName:"身份验证器",errors:{invalidSecretKey:"密钥格式无效。"}},fk={uploading:"上传中…",uploadSuccess:"文件上传成功。",deleteSuccess:"附件删除成功。",firefoxExpandRequired:"要上传文件，请使用展开的窗口。",openExpandedWindow:"打开展开的窗口"},hk={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:"加载邮件时发生错误。请尝试编辑并保存凭据条目以同步数据库，然后重试。"}},Ak={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 码的熵值通常较低，若您的设备遭到入侵，则可能被暴力破解。请仅在您完全信任的设备上使用该方式。"}},pk={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:"通行密钥提供程序于"}},yk={title:"近期删除",noItems:"没有删除的项目",noItemsDescription:"您删除的项目将在此处停留 30 天，随后永久移除。",description:"这些项目将在 30 天后永久删除。您可以立即还原或永久删除。",restore:"还原",deletePermanently:"永久删除",emptyAll:"全部清空",daysRemaining_one:"剩余 {{count}} 天",daysRemaining_other:"剩余 {{count}} 天",expiringSoon:"即将到期",confirmDeleteTitle:"永久删除吗？",confirmDeleteMessage:"此项目将被永久删除，且无法恢复。",confirmEmptyAllTitle:"清空“近期删除”吗？",confirmEmptyAllMessage:"所有 {{count}} 个项目将被永久删除，且无法恢复。"},Ek={title:"升级密码库",subtitle:"AliasVault已更新，您的密码库需要升级，仅需数秒。",versionInformation:"版本信息",yourVault:"您的密码库版本：",newVersion:"新可用版本：",upgrade:"升级密码库",upgrading:"升级中…",whatsNew:"新功能",whatsNewDescription:"需要升级才能支持以下更改：",noDescriptionAvailable:"此版本无可用说明。",alerts:{unableToGetVersionInfo:"无法获取版本信息。请重试。",selfHostedServer:"自托管服务器",selfHostedWarning:"如果您使用的是自托管服务器，请确保同时更新您的自托管实例，否则将无法登录网页客户端。",continueUpgrade:"继续升级",upgradeFailed:"升级失败",failedToApplyMigration:"应用迁移失败（{{current}} / {{total}}）"}},bk={unsyncedChangesTitle:"未同步的更改",unsyncedChangesWarning:"您有更改尚未同步，若您现在退出登录，这些更改将会丢失。您确定要继续吗？",logoutAnyway:"仍要退出登录"},Ik={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},_l={de:{translation:kx},en:{translation:Gx},es:{translation:oT},fi:{translation:CT},fr:{translation:jT},he:{translation:tS},it:{translation:pS},nl:{translation:BS},pl:{translation:YS},pt:{translation:d1},ro:{translation:T1},ru:{translation:Q1},uk:{translation:ik},zh:{translation:Ik}},jl=[{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:"uk",name:"Ukrainian",nativeName:"Українська",flag:"🇺🇦"},{code:"zh",name:"Chinese",nativeName:"简体中文",flag:"🇨🇳"}],Lr="en",Gu=jl.map(r=>r.code),gu=new Map;async function xy(r){const e=`all:${r}`;if(gu.has(e))return gu.get(e);if(_l[r]){const a=_l[r].translation;return gu.set(e,a),a}if(r!==Lr&&_l[Lr]){console.warn(`Translations not found for ${r}, falling back to ${Lr}`);const a=_l[Lr].translation;return gu.set(e,a),a}return console.warn(`No translations found for ${r} and no fallback available`),{}}function vk(r){return jl.find(e=>e.code===r)}function Ty(r,e){return e.split(".").reduce((a,i)=>a&&typeof a=="object"&&a!==null&&i in a?a[i]:void 0,r)}async function Ck(){try{const r=await xe.getItem("local:language");if(r&&Gu.includes(r))return r;const e=navigator.language.split("-")[0],a=Gu.includes(e)?e:Lr;return await xe.setItem("local:language",a),a}catch(r){return console.error("Failed to get current language:",r),Lr}}async function wk(r,e){try{const a=await Ck(),i=await xy(a),s=Ty(i,r);if(s&&typeof s=="string")return s;if(a!==Lr){const c=await xy(Lr),d=Ty(c,r);if(d&&typeof d=="string")return d}return e||r}catch(a){return console.error("Translation error:",a),e||r}}function Nk(r){return r.toISOString().replace("T"," ").replace("Z","").substring(0,23)}function jg(){return Nk(new Date)}class $l{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=jg();return this.client.executeUpdate(`UPDATE ${e} SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?`,[i,a])}softDeleteByForeignKey(e,a,i){const s=jg();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 jg()}buildInClause(e){return{placeholders:e.map(()=>"?").join(","),values:e}}}var tn={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 ho(r){return Eh[r]}function Pl(r,e){return e in r.ApplicableToTypes}function Ml(r,e){const a=r.ApplicableToTypes[e];return(a==null?void 0:a.ShowByDefault)??!1}function xk(r){return Object.values(Eh).filter(e=>Pl(e,r)).sort((e,a)=>e.DefaultDisplayOrder-a.DefaultDisplayOrder)}function Tk(r){return Object.values(Eh).filter(e=>Pl(e,r)&&!Ml(e,r)).sort((e,a)=>e.DefaultDisplayOrder-a.DefaultDisplayOrder)}function fu(r,e){const a=r.Fields.find(i=>i.FieldKey===e);if(a)return Array.isArray(a.Value)?a.Value[0]:a.Value}function Sk(r,e){const a={};return r.Fields.forEach(i=>{const s=e(i);a[s]||(a[s]=[]),a[s].push(i)}),a}function kk(r){const e=Sk(r,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 hu(r,e){const a=ho(r);if(!a)throw new Error(`Unknown system field: ${r}. Use createCustomField for custom fields.`);return{FieldKey:r,Label:e.label??r,FieldType:a.FieldType,Value:e.value,IsHidden:a.IsHidden,DisplayOrder:e.displayOrder??a.DefaultDisplayOrder,IsCustomField:!1,EnableHistory:a.EnableHistory}}var Pg=10;class Hg{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=ho(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=ho(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 vl{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 Sy(r){return new Date(r).getTime()}class zg{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:Sy(e.CreatedAt),UpdatedAt:Sy(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`}};ze(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`),ze(Oa,"GET_ALL_ACTIVE",`
    ${Oa.BASE_SELECT}
    WHERE i.IsDeleted = 0 AND i.DeletedAt IS NULL
    ORDER BY i.CreatedAt DESC`),ze(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`),ze(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`),ze(Oa,"COUNT_RECENTLY_DELETED",`
    SELECT COUNT(*) as count
    FROM Items
    WHERE IsDeleted = 0 AND DeletedAt IS NOT NULL`),ze(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`),ze(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`),ze(Oa,"INSERT_ITEM",`
    INSERT INTO Items (Id, Name, ItemType, LogoId, FolderId, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?)`),ze(Oa,"UPDATE_ITEM",`
    UPDATE Items
    SET Name = ?,
        ItemType = ?,
        FolderId = ?,
        LogoId = COALESCE(?, LogoId),
        UpdatedAt = ?
    WHERE Id = ?`),ze(Oa,"UPDATE_ITEM_WITH_LOGO",`
    UPDATE Items
    SET Name = ?,
        ItemType = ?,
        FolderId = ?,
        LogoId = ?,
        UpdatedAt = ?
    WHERE Id = ?`),ze(Oa,"TRASH_ITEM",`
    UPDATE Items
    SET DeletedAt = ?,
        UpdatedAt = ?
    WHERE Id = ? AND IsDeleted = 0`),ze(Oa,"RESTORE_ITEM",`
    UPDATE Items
    SET DeletedAt = NULL,
        UpdatedAt = ?
    WHERE Id = ? AND IsDeleted = 0 AND DeletedAt IS NOT NULL`),ze(Oa,"TOMBSTONE_ITEM",`
    UPDATE Items
    SET IsDeleted = 1,
        Name = NULL,
        LogoId = NULL,
        FolderId = NULL,
        UpdatedAt = ?
    WHERE Id = ?`),ze(Oa,"GET_LOGO_ID",`
    SELECT LogoId FROM Items WHERE Id = ?`),ze(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 Za=Oa;class ur{}ze(ur,"GET_EXISTING_FOR_ITEM",`
    SELECT Id, FieldKey, FieldDefinitionId, Value
    FROM FieldValues
    WHERE ItemId = ? AND IsDeleted = 0`),ze(ur,"INSERT",`
    INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`),ze(ur,"UPDATE",`
    UPDATE FieldValues
    SET Value = ?,
        Weight = ?,
        UpdatedAt = ?
    WHERE Id = ?`),ze(ur,"SOFT_DELETE",`
    UPDATE FieldValues
    SET IsDeleted = 1,
        UpdatedAt = ?
    WHERE Id = ?`),ze(ur,"GET_FOR_HISTORY",`
    SELECT FieldKey, Value
    FROM FieldValues
    WHERE ItemId = ? AND IsDeleted = 0 AND FieldKey IS NOT NULL`);class ri{}ze(ri,"EXISTS",`
    SELECT Id FROM FieldDefinitions WHERE Id = ?`),ze(ri,"EXISTS_ACTIVE",`
    SELECT Id FROM FieldDefinitions WHERE Id = ? AND IsDeleted = 0`),ze(ri,"INSERT",`
    INSERT INTO FieldDefinitions (Id, FieldType, Label, IsMultiValue, IsHidden, EnableHistory, Weight, ApplicableToTypes, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`),ze(ri,"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(",")})`}}ze(Sr,"INSERT",`
    INSERT INTO FieldHistories (Id, ItemId, FieldDefinitionId, FieldKey, ValueSnapshot, ChangedAt, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`),ze(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 ?`),ze(Sr,"GET_FOR_PRUNING",`
    SELECT Id, ChangedAt
    FROM FieldHistories
    WHERE ItemId = ? AND FieldKey = ? AND IsDeleted = 0
    ORDER BY ChangedAt DESC`),ze(Sr,"SOFT_DELETE",`
    UPDATE FieldHistories
    SET IsDeleted = 1, UpdatedAt = ?
    WHERE Id = ?`);class Lk extends $l{constructor(e,a){super(e),this.logoRepository=a}getAll(){let e;try{e=this.client.executeQuery(Za.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(Za.getFieldValuesForItems(a.length),a),s=Hg.processFieldRows(i),c=this.client.executeQuery(Za.getTagsForItems(a.length),a),d=vl.groupTagsByItem(c);return vl.mapRows(e,s,d)}getById(e){const a=this.client.executeQuery(Za.GET_BY_ID,[e]);if(a.length===0)return null;const i=this.client.executeQuery(Za.GET_FIELD_VALUES_FOR_ITEM,[e]),s=Hg.processFieldRowsForSingleItem(i),c=this.client.executeQuery(Za.GET_TAGS_FOR_ITEM,[e]),d=vl.mapTagRows(c);return vl.mapRow(a[0],s,d)}getAllEmailAddresses(){return this.client.executeQuery(Za.GET_ALL_EMAIL_ADDRESSES,[tn.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(Za.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,w=m!==f.LogoId;(g||E||p||w)&&this.client.executeUpdate(Za.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(Za.TRASH_ITEM,[a,a,e])})}async restore(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(Za.RESTORE_ITEM,[a,e])})}async permanentlyDelete(e){return this.withTransaction(async()=>{const a=this.now(),i=this.client.executeQuery(Za.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(Za.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(Za.getFieldValuesForItems(a.length),a),s=Hg.processFieldRows(i);return e.map(c=>vl.mapDeletedItemRow(c,s.get(c.Id)||[]))}getRecentlyDeletedCount(){var e;try{return((e=this.client.executeQuery(Za.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,Pg]).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(),w=JSON.stringify(g);this.client.executeUpdate(Sr.INSERT,[p,e,null,c.FieldKey,w,s,s,s,0])}}}ensureFieldDefinition(e,a,i){return this.client.executeQuery(ri.EXISTS,[e.FieldKey]).length===0&&this.client.executeUpdate(ri.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,w=E.filter(x=>x&&(typeof x!="string"||x.trim()!=="")),v=m.IsCustomField&&w.length===0?[""]:w;for(let x=0;x<v.length;x++){const T=v[x],S=`${p}:${x}`,k=s.get(S);k?(d.add(k.Id),k.Value!==T&&this.client.executeUpdate(ur.UPDATE,[T,m.DisplayOrder??0,a,k.Id])):this.client.executeUpdate(ur.INSERT,[this.generateId(),e.Id,g,m.IsCustomField?null:m.FieldKey,T,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(ri.EXISTS_ACTIVE,[e.FieldKey]).length===0?this.client.executeUpdate(ri.INSERT,[e.FieldKey,e.FieldType,e.Label,0,e.IsHidden?1:0,0,e.DisplayOrder??0,a,i,i,0]):this.client.executeUpdate(ri.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,w)=>p===g[w]))&&g.length>0){const p=this.generateId(),w=JSON.stringify(g);this.client.executeUpdate(Sr.INSERT,[p,e,null,d.FieldKey,w,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>Pg){const d=s.slice(Pg).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 fs={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 = '${tn.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 = '${tn.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 Rk extends $l{getByRpId(e){const a=this.client.executeQuery(fs.GET_BY_RP_ID,[e]);return zg.mapRowsWithItem(a)}getById(e){const a=this.client.executeQuery(fs.GET_BY_ID_WITH_ITEM,[e]);return a.length===0?null:zg.mapRowWithItem(a[0])}getByItemId(e){const a=this.client.executeQuery(fs.GET_BY_ITEM_ID,[e]);return zg.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(fs.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(fs.SOFT_DELETE,[a,e])})}async deleteByItemId(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(fs.SOFT_DELETE_BY_ITEM,[a,e])})}async updateDisplayName(e,a){return this.withTransaction(async()=>{const i=this.now();return this.client.executeUpdate(fs.UPDATE_DISPLAY_NAME,[a,i,e])})}}const ei={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 Dk extends $l{async create(e,a){return this.withTransaction(async()=>{const i=crypto.randomUUID().toUpperCase(),s=this.now();return this.client.executeUpdate(ei.INSERT,[i,e,a||null,s,s]),i})}getAll(){try{return this.client.executeQuery(ei.GET_ALL)}catch(e){if(e instanceof Error&&e.message.includes("no such table"))return[];throw e}}getById(e){const a=this.client.executeQuery(ei.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(ei.UPDATE_NAME,[a,i,e])})}async delete(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(ei.CLEAR_ITEMS_FOLDER,[a,e]),this.client.executeUpdate(ei.SOFT_DELETE,[a,e])})}async deleteWithContents(e){return this.withTransaction(async()=>{const a=this.now(),i=this.client.executeUpdate(ei.TRASH_ITEMS_IN_FOLDER,[a,a,e]);return this.client.executeUpdate(ei.SOFT_DELETE,[a,e]),i})}async moveItem(e,a){return this.withTransaction(async()=>{const i=this.now();return this.client.executeUpdate(ei.MOVE_ITEM,[a,i,e])})}}const Au={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 Bk extends $l{getSetting(e,a=""){const i=this.client.executeQuery(Au.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(Au.GET_ENCRYPTION_KEYS)}getTotpCodesForItem(e){try{return this.tableExists("TotpCodes")?this.client.executeQuery(Au.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(Au.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 Uk extends $l{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 Gf{constructor(){ze(this,"db",null);ze(this,"isInTransaction",!1);ze(this,"_items",null);ze(this,"_passkeys",null);ze(this,"_folders",null);ze(this,"_settings",null);ze(this,"_logos",null)}get items(){return this._items||(this._items=new Lk(this,this.logos)),this._items}get passkeys(){return this._passkeys||(this._passkeys=new Rk(this)),this._passkeys}get folders(){return this._folders||(this._folders=new Dk(this)),this._folders}get settings(){return this._settings||(this._settings=new Bk(this)),this._settings}get logos(){return this._logos||(this._logos=new Uk(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 Qf({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=gx(a);if(!i)throw new Error("Could not extract version from migration ID");const s=mx(i);if(!s.isCompatible){const m=await wk("common.errors.browserExtensionOutdated");throw new Is(m)}if(s.isKnownVersion&&s.clientVersion)return s.clientVersion;const d=new Vf().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 Vf().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 ky={"local:publicEmailDomains":"session:publicEmailDomains","local:privateEmailDomains":"session:privateEmailDomains","local:hiddenPrivateEmailDomains":"session:hiddenPrivateEmailDomains","local:encryptionKeyDerivationParams":"session:encryptionKeyDerivationParams"};async function Hl(r){let e=await xe.getItem(r);if(e===null&&r in ky){const a=ky[r];e=await xe.getItem(a),e!==null&&(await xe.setItem(r,e),await xe.removeItem(a))}return e}const qb=I.createContext(void 0),_k=({children:r})=>{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),[w,v]=I.useState(!1),[x,T]=I.useState(0),S=I.useCallback(()=>E||w,[E,w]),k=I.useCallback(async $=>{g.current=$,f($),await xe.setItem("local:isOfflineMode",$)},[]);I.useEffect(()=>{(async()=>{const[J,re,Ae]=await Promise.all([xe.getItem("local:isOfflineMode"),xe.getItem("local:isDirty"),xe.getItem("local:serverRevision")]);g.current=J??!1,f(J??!1),p(re??!1),T(Ae??0)})()},[]);const B=I.useCallback(async $=>{const J=new Gf;return await J.initializeFromBase64($),a(J),s(!0),d(!0),J},[]),L=I.useCallback(async()=>{try{const $=await gt("GET_VAULT",{},"background");if($!=null&&$.vault){const J=new Gf;return await J.initializeFromBase64($.vault),a(J),s(!0),d(!0),J}else return s(!0),d(!1),null}catch($){return console.error("Error retrieving vault from background:",$),s(!0),d(!1),null}},[]),P=I.useCallback(async()=>{try{const $=await Hl("local:publicEmailDomains"),J=await Hl("local:privateEmailDomains"),re=await Hl("local:hiddenPrivateEmailDomains"),Ae=await xe.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}},[]),_=I.useCallback(async()=>{const[$,J]=await Promise.all([xe.getItem("local:isDirty"),xe.getItem("local:serverRevision")]);p($??!1),T(J??0)},[]),j=I.useCallback(async()=>e?await e.hasPendingMigrations():!1,[e]);I.useEffect(()=>{i||L()},[i,L]);const V=I.useCallback(async $=>{await gt("STORE_ENCRYPTION_KEY",$,"background")},[]),H=I.useCallback(async $=>{await gt("STORE_ENCRYPTION_KEY_DERIVATION_PARAMS",$,"background")},[]),Q=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:w,serverRevision:x,setIsOffline:k,setIsSyncing:v,shouldSuppressEmailErrors:S,loadDatabase:B,loadStoredDatabase:L,storeEncryptionKey:V,storeEncryptionKeyDerivationParams:H,clearDatabase:Q,getVaultMetadata:P,refreshSyncState:_,hasPendingMigrations:j}),[e,i,c,m,G,E,w,x,k,S,B,L,V,H,Q,P,_,j]);return l.jsx(qb.Provider,{value:K,children:r})},Kt=()=>{const r=I.useContext(qb);if(r===void 0)throw new Error("useDb must be used within a DbProvider");return r},Ct={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 Fl=(r=>(r.DEFAULT="default",r.URL_SUBDOMAIN="url_subdomain",r.URL_EXACT="url_exact",r))(Fl||{});const vt={async getShowFolders(){return await xe.getItem(Ct.SHOW_FOLDERS)??!0},async setShowFolders(r){await xe.setItem(Ct.SHOW_FOLDERS,r)},async getGlobalAutofillPopupEnabled(){return await xe.getItem(Ct.GLOBAL_AUTOFILL_POPUP_ENABLED)!==!1},async setGlobalAutofillPopupEnabled(r){await xe.setItem(Ct.GLOBAL_AUTOFILL_POPUP_ENABLED,r)},async getAutofillMatchingMode(){return await xe.getItem(Ct.AUTOFILL_MATCHING_MODE)??"default"},async setAutofillMatchingMode(r){await xe.setItem(Ct.AUTOFILL_MATCHING_MODE,r)},async getDisabledSites(){return await xe.getItem(Ct.DISABLED_SITES)??[]},async setDisabledSites(r){await xe.setItem(Ct.DISABLED_SITES,r)},async getTemporaryDisabledSites(){return await xe.getItem(Ct.TEMPORARY_DISABLED_SITES)??{}},async setTemporaryDisabledSites(r){await xe.setItem(Ct.TEMPORARY_DISABLED_SITES,r)},async getGlobalContextMenuEnabled(){return await xe.getItem(Ct.GLOBAL_CONTEXT_MENU_ENABLED)!==!1},async setGlobalContextMenuEnabled(r){await xe.setItem(Ct.GLOBAL_CONTEXT_MENU_ENABLED,r)},async getPasskeyProviderEnabled(){return await xe.getItem(Ct.PASSKEY_PROVIDER_ENABLED)!==!1},async setPasskeyProviderEnabled(r){await xe.setItem(Ct.PASSKEY_PROVIDER_ENABLED,r)},async getPasskeyDisabledSites(){return await xe.getItem(Ct.PASSKEY_DISABLED_SITES)??[]},async setPasskeyDisabledSites(r){await xe.setItem(Ct.PASSKEY_DISABLED_SITES,r)},async getClipboardClearTimeout(){return await xe.getItem(Ct.CLIPBOARD_CLEAR_TIMEOUT)??10},async setClipboardClearTimeout(r){await xe.setItem(Ct.CLIPBOARD_CLEAR_TIMEOUT,r)},async getAutoLockTimeout(){return await xe.getItem(Ct.AUTO_LOCK_TIMEOUT)??0},async setAutoLockTimeout(r){await xe.setItem(Ct.AUTO_LOCK_TIMEOUT,r)},async getVaultLockedDismissUntil(){return await xe.getItem(Ct.VAULT_LOCKED_DISMISS_UNTIL)??0},async setVaultLockedDismissUntil(r){await xe.setItem(Ct.VAULT_LOCKED_DISMISS_UNTIL,r)},async getCustomEmailHistory(){return await xe.getItem(Ct.CUSTOM_EMAIL_HISTORY)??[]},async setCustomEmailHistory(r){await xe.setItem(Ct.CUSTOM_EMAIL_HISTORY,r)},async getCustomUsernameHistory(){return await xe.getItem(Ct.CUSTOM_USERNAME_HISTORY)??[]},async setCustomUsernameHistory(r){await xe.setItem(Ct.CUSTOM_USERNAME_HISTORY,r)},async clearUiPreferences(){await xe.removeItem(Ct.SHOW_FOLDERS)},async resetAllSiteSettings(){await xe.setItem(Ct.DISABLED_SITES,[]),await xe.setItem(Ct.TEMPORARY_DISABLED_SITES,{}),await xe.setItem(Ct.PASSKEY_DISABLED_SITES,[])},async clearAll(){await Promise.all([xe.removeItem(Ct.SHOW_FOLDERS),xe.removeItem(Ct.DISABLED_SITES),xe.removeItem(Ct.TEMPORARY_DISABLED_SITES),xe.removeItem(Ct.PASSKEY_DISABLED_SITES),xe.removeItem(Ct.VAULT_LOCKED_DISMISS_UNTIL),xe.removeItem(Ct.CUSTOM_EMAIL_HISTORY),xe.removeItem(Ct.CUSTOM_USERNAME_HISTORY)])},async getPendingRedirectUrl(){return await xe.getItem(Ct.PENDING_REDIRECT_URL)??null},async setPendingRedirectUrl(r){r===null?await xe.removeItem(Ct.PENDING_REDIRECT_URL):await xe.setItem(Ct.PENDING_REDIRECT_URL,r)},async getSkipFormRestore(){return await xe.getItem(Ct.SKIP_FORM_RESTORE)??!1},async setSkipFormRestore(r){await xe.setItem(Ct.SKIP_FORM_RESTORE,r)}};var Uu={exports:{}},Mk=Uu.exports,Ly;function Fk(){return Ly||(Ly=1,function(r,e){(function(a,i){r.exports=i()})(Mk,function(){return(()=>{var a,i,s={773:(m,f,g)=>{var E,p=typeof self<"u"&&self.Module!==void 0?self.Module:{},w={};for(E in p)p.hasOwnProperty(E)&&(w[E]=p[E]);var v,x,T,S;v=typeof window=="object",x=typeof importScripts=="function",T=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",S=!v&&!T&&!x;var k,B,L,P,_,j="";T?(j=x?g(967).dirname(j)+"/":"//",k=function(Ce,se){return P||(P=g(145)),_||(_=g(967)),Ce=_.normalize(Ce),P.readFileSync(Ce,se?null:"utf8")},L=function(Ce){var se=k(Ce,!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(Ce){if(!(Ce instanceof nt))throw Ce}),process.on("unhandledRejection",ee),p.inspect=function(){return"[Emscripten Module object]"}):S?(typeof read<"u"&&(k=function(Ce){return read(Ce)}),L=function(Ce){var se;return typeof readbuffer=="function"?new Uint8Array(readbuffer(Ce)):(K(typeof(se=read(Ce,"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)):(v||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(Ce){var se=new XMLHttpRequest;return se.open("GET",Ce,!1),se.send(null),se.responseText},x&&(L=function(Ce){var se=new XMLHttpRequest;return se.open("GET",Ce,!1),se.responseType="arraybuffer",se.send(null),new Uint8Array(se.response)}),B=function(Ce,se,De){var je=new XMLHttpRequest;je.open("GET",Ce,!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 V,H,Q=p.printErr||console.warn.bind(console);for(E in w)w.hasOwnProperty(E)&&(p[E]=w[E]);w=null,p.arguments&&p.arguments,p.thisProgram&&p.thisProgram,p.quit&&p.quit,p.wasmBinary&&(V=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&ee("no native wasm support detected");var G=!1;function K(Ce,se){Ce||ee("Assertion failed: "+se)}var $,J,re=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Ae(Ce){$=Ce,p.HEAP8=new Int8Array(Ce),p.HEAP16=new Int16Array(Ce),p.HEAP32=new Int32Array(Ce),p.HEAPU8=J=new Uint8Array(Ce),p.HEAPU16=new Uint16Array(Ce),p.HEAPU32=new Uint32Array(Ce),p.HEAPF32=new Float32Array(Ce),p.HEAPF64=new Float64Array(Ce)}p.INITIAL_MEMORY;var X,ie=[],ce=[],ye=[],M=0,q=null;function ee(Ce){throw p.onAbort&&p.onAbort(Ce),Q(Ce+=""),G=!0,Ce="abort("+Ce+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(Ce)}function ne(Ce){return Ce.startsWith("data:application/octet-stream;base64,")}function Ie(Ce){return Ce.startsWith("file://")}p.preloadedImages={},p.preloadedAudios={};var we,Re="argon2.wasm";function Be(Ce){try{if(Ce==Re&&V)return new Uint8Array(V);if(L)return L(Ce);throw"both async and sync fetching of the wasm failed"}catch(se){ee(se)}}function ke(Ce){for(;Ce.length>0;){var se=Ce.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 Qe(Ce){try{return H.grow(Ce-$.byteLength+65535>>>16),Ae(H.buffer),1}catch{}}ne(Re)||(we=Re,Re=p.locateFile?p.locateFile(we,j):j+we);var pt,Dt={a:function(Ce,se,De){J.copyWithin(Ce,se,se+De)},b:function(Ce){var se,De=J.length,je=2147418112;if((Ce>>>=0)>je)return!1;for(var Ve=1;Ve<=4;Ve*=2){var Ye=De*(1+.2/Ve);if(Ye=Math.min(Ye,Ce+100663296),Qe(Math.min(je,((se=Math.max(Ce,Ye))%65536>0&&(se+=65536-se%65536),se))))return!0}return!1}},_t=(function(){var Ce={a:Dt};function se(Ve,Ye){var ut,Mt=Ve.exports;p.asm=Mt,Ae((H=p.asm.c).buffer),X=p.asm.k,ut=p.asm.d,ce.unshift(ut),function(Pt){if(M--,p.monitorRunDependencies&&p.monitorRunDependencies(M),M==0&&q){var Gt=q;q=null,Gt()}}()}function De(Ve){se(Ve.instance)}function je(Ve){return function(){if(!V&&(v||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(B)return new Promise(function(Ye,ut){B(Re,function(Mt){Ye(new Uint8Array(Mt))},ut)})}return Promise.resolve().then(function(){return Be(Re)})}().then(function(Ye){return WebAssembly.instantiate(Ye,Ce)}).then(Ve,function(Ye){Q("failed to asynchronously prepare wasm: "+Ye),ee(Ye)})}if(M++,p.monitorRunDependencies&&p.monitorRunDependencies(M),p.instantiateWasm)try{return p.instantiateWasm(Ce,se)}catch(Ve){return Q("Module.instantiateWasm callback failed with error: "+Ve),!1}V||typeof WebAssembly.instantiateStreaming!="function"||ne(Re)||Ie(Re)||typeof fetch!="function"?je(De):fetch(Re,{credentials:"same-origin"}).then(function(Ve){return WebAssembly.instantiateStreaming(Ve,Ce).then(De,function(Ye){return Q("wasm streaming compile failed: "+Ye),Q("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(_t=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(Ce){this.name="ExitStatus",this.message="Program terminated with exit("+Ce+")",this.status=Ce}function Ht(Ce){function se(){pt||(pt=!0,p.calledRun=!0,G||(ke(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;ke(ye)}()))}M>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;ke(ie)}(),M>0||(p.setStatus?(p.setStatus("Running..."),setTimeout(function(){setTimeout(function(){p.setStatus("")},1),se()},1)):se()))}if(p.allocate=function(Ce,se){var De;return De=se==1?et(Ce.length):_t(Ce.length),Ce.subarray||Ce.slice?J.set(Ce,De):J.set(new Uint8Array(Ce),De),De},p.UTF8ToString=function(Ce,se){return Ce?function(De,je,Ve){for(var Ye=je+Ve,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 Pt=De[je++];if(128&Pt){var Gt=63&De[je++];if((224&Pt)!=192){var ia=63&De[je++];if((Pt=(240&Pt)==224?(15&Pt)<<12|Gt<<6|ia:(7&Pt)<<18|Gt<<12|ia<<6|63&De[je++])<65536)Mt+=String.fromCharCode(Pt);else{var U=Pt-65536;Mt+=String.fromCharCode(55296|U>>10,56320|1023&U)}}else Mt+=String.fromCharCode((31&Pt)<<6|Gt)}else Mt+=String.fromCharCode(Pt)}return Mt}(J,Ce,se):""},p.ALLOC_NORMAL=0,q=function Ce(){pt||Ht(),pt||(q=Ce)},p.run=Ht,p.preInit)for(typeof p.preInit=="function"&&(p.preInit=[p.preInit]);p.preInit.length>0;)p.preInit.pop()();Ht(),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 w=typeof self<"u"?self:this,v={Argon2d:0,Argon2i:1,Argon2id:2};function x(L){if(x._promise)return x._promise;if(x._module)return Promise.resolve(x._module);let P;return P=w.process&&w.process.versions&&w.process.versions.node?T().then(_=>new Promise(j=>{_.postRun=()=>j(_)})):(w.loadArgon2WasmBinary?w.loadArgon2WasmBinary():Promise.resolve(g(721)).then(_=>function(j){const V=atob(j),H=new Uint8Array(new ArrayBuffer(V.length));for(let Q=0;Q<V.length;Q++)H[Q]=V.charCodeAt(Q);return H}(_))).then(_=>function(j,V){return new Promise(H=>(w.Module={wasmBinary:j,wasmMemory:V,postRun(){H(Module)}},T()))}(_,L?function(j){const G=Math.min(Math.max(Math.ceil(j*1024/65536),256)+256,32767);return new WebAssembly.Memory({initial:G,maximum:32767})}(L):void 0)),x._promise=P,P.then(_=>(x._module=_,delete x._promise,_))}function T(){return w.loadArgon2WasmModule?w.loadArgon2WasmModule():Promise.resolve(g(773))}function S(L,P){return L.allocate(P,"i8",L.ALLOC_NORMAL)}function k(L,P){return S(L,new Uint8Array([...P,0]))}function B(L){if(typeof L!="string")return L;if(typeof TextEncoder=="function")return new TextEncoder().encode(L);if(typeof Buffer=="function")return Buffer.from(L);throw new Error("Don't know how to encode UTF8")}return{ArgonType:v,hash:function(L){const P=L.mem||1024;return x(P).then(_=>{const j=L.time||1,V=L.parallelism||1,H=B(L.pass),Q=k(_,H),G=H.length,K=B(L.salt),$=k(_,K),J=K.length,re=L.type||v.Argon2d,Ae=_.allocate(new Array(L.hashLen||24),"i8",_.ALLOC_NORMAL),X=L.secret?S(_,L.secret):0,ie=L.secret?L.secret.byteLength:0,ce=L.ad?S(_,L.ad):0,ye=L.ad?L.ad.byteLength:0,M=L.hashLen||24,q=_._argon2_encodedlen(j,P,V,J,M,re),ee=_.allocate(new Array(q+1),"i8",_.ALLOC_NORMAL);let ne,Ie,we;try{Ie=_._argon2_hash_ext(j,P,V,Q,G,$,J,Ae,M,ee,q,re,X,ie,ce,ye,19)}catch(Re){ne=Re}if(Ie!==0||ne){try{ne||(ne=_.UTF8ToString(_._argon2_error_message(Ie)))}catch{}we={message:ne,code:Ie}}else{let Re="";const Be=new Uint8Array(M);for(let ke=0;ke<M;ke++){const Qe=_.HEAP8[Ae+ke];Be[ke]=Qe,Re+=("0"+(255&Qe).toString(16)).slice(-2)}we={hash:Be,hashHex:Re,encoded:_.UTF8ToString(ee)}}try{_._free(Q),_._free($),_._free(Ae),_._free(ee),ce&&_._free(ce),X&&_._free(X)}catch{}if(ne)throw we;return we})},verify:function(L){return x().then(P=>{const _=B(L.pass),j=k(P,_),V=_.length,H=L.secret?S(P,L.secret):0,Q=L.secret?L.secret.byteLength:0,G=L.ad?S(P,L.ad):0,K=L.ad?L.ad.byteLength:0,$=k(P,B(L.encoded));let J,re,Ae,X=L.type;if(X===void 0){let ie=L.encoded.split("$")[1];ie&&(ie=ie.replace("a","A"),X=v[ie]||v.Argon2d)}try{re=P._argon2_verify_ext($,j,V,H,Q,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(w=>E[w]=()=>m[w]);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)})()})}(Uu)),Uu.exports}var Ok=Fk();const Wb=Wi(Ok);var fb,hb;const jk=(hb=(fb=globalThis.browser)==null?void 0:fb.runtime)!=null&&hb.id?globalThis.browser:globalThis.chrome,Cs=jk,bh="local:aliasvault_pin_enabled",Ih="local:aliasvault_pin_encrypted_key",vh="local:aliasvault_pin_salt",Ch="local:aliasvault_pin_length",yo="local:aliasvault_pin_failed_attempts",Kf=4;class _u extends Error{constructor(){super("PIN locked after too many failed attempts"),this.name="PinLockedError"}}class ql extends Error{constructor(){super("Invalid PIN format"),this.name="InvalidPinFormatError"}}class qf extends Error{constructor(a){super(`Incorrect PIN. ${a} attempts remaining.`);ze(this,"attemptsRemaining");this.name="IncorrectPinError",this.attemptsRemaining=a}}async function Yb(){try{return await xe.getItem(bh)===!0}catch{return!1}}async function Pk(){try{return await xe.getItem(Ch)||null}catch{return null}}function wh(r){return/^\d{6,8}$/.test(r)}async function Jb(){try{return await xe.getItem(yo)||0}catch{return 0}}async function Xb(){return await Jb()>=Kf}async function Hk(r,e){if(!wh(r))throw new ql;try{const a=crypto.getRandomValues(new Uint8Array(16)),i=Wf(a.buffer),s=await $b(a),c=await Zb(r,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=Wf(f.buffer);await Promise.all([xe.setItem(bh,!0),xe.setItem(Ih,g),xe.setItem(vh,i),xe.setItem(Ch,r.length),xe.setItem(yo,0)])}catch(a){throw a instanceof ql||console.error("[PinUnlockService] Failed to setup PIN:",a),a}}async function zk(r){if(!wh(r))throw new ql;if(await Xb())throw new _u;try{const[e,a]=await Promise.all([xe.getItem(Ih),xe.getItem(vh)]);if(!e||!a)throw new _u;const i=new Uint8Array(Dy(e)),s=i.slice(0,12),c=i.slice(12),d=new Uint8Array(Dy(a)),m=await $b(d),f=await Zb(r,m),g=await crypto.subtle.decrypt({name:"AES-GCM",iv:s},f,c),E=new TextDecoder().decode(g);return await xe.setItem(yo,0),E}catch{const a=await Jb()+1;throw await xe.setItem(yo,a),a>=Kf?(await Nh(),new _u):new qf(Kf-a)}}async function Nh(){try{await Promise.all([xe.removeItem(bh),xe.removeItem(Ih),xe.removeItem(vh),xe.removeItem(Ch),xe.removeItem(yo)])}catch(r){throw console.error("[PinUnlockService] Failed to disable PIN:",r),r}}async function Ry(){try{await xe.setItem(yo,0)}catch(r){console.error("[PinUnlockService] Failed to reset failed attempts:",r)}}async function Qk(){const r=Cs.runtime.id,e=new TextEncoder().encode(r),a=await crypto.subtle.digest("SHA-256",e);return new Uint8Array(a)}async function $b(r){const e=await Qk(),a=new Uint8Array(r.length+e.length);return a.set(r,0),a.set(e,r.length),a}async function Zb(r,e){const a=Wf(e.buffer),i=await Wb.hash({pass:r,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 Wf(r){const e=new Uint8Array(r);let a="";for(let i=0;i<e.byteLength;i++)a+=String.fromCharCode(e[i]);return btoa(a)}function Dy(r){const e=atob(r),a=new Uint8Array(e.length);for(let i=0;i<e.length;i++)a[i]=e.charCodeAt(i);return a.buffer}const eI=I.createContext(void 0),Vk=({children:r})=>{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 xe.getItem("local:accessToken"),T=await xe.getItem("local:refreshToken"),S=await xe.getItem("local:username");return a(!0),x&&T&&S?(s(S),!0):!1},[s]),g=I.useCallback(async(x,T,S)=>{await xe.setItem("local:username",x),await xe.setItem("local:accessToken",T),await xe.setItem("local:refreshToken",S),await vt.setVaultLockedDismissUntil(0),s(x)},[]),E=I.useCallback(async x=>{await gt("CLEAR_SESSION",{},"background"),m==null||m.clearDatabase();try{await Nh()}catch(T){console.error("Failed to remove PIN data:",T)}x&&d(x)},[m]),p=I.useCallback(async x=>{await E(x),await gt("CLEAR_VAULT_DATA",{},"background"),s(null)},[E]),w=I.useCallback(()=>{d(null)},[]),v=I.useMemo(()=>({isInitialized:e,username:i,initializeAuth:f,setAuthTokens:g,clearAuthUserInitiated:p,clearAuthForced:E,globalMessage:c,clearGlobalMessage:w}),[e,i,f,c,g,p,E,w]);return l.jsx(eI.Provider,{value:v,children:r})},Zl=()=>{const r=I.useContext(eI);if(r===void 0)throw new Error("useAuth must be used within an AuthProvider");return r};class Gk{constructor(){ze(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 Yf=new Gk,ni=class ni{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}};ze(ni,"VERSION","0.27.0-alpha"),ze(ni,"API_VERSION",ni.VERSION.split("-")[0]),ze(ni,"MIN_SERVER_VERSION","0.12.0-dev"),ze(ni,"CLIENT_NAME","edge"),ze(ni,"DEFAULT_CLIENT_URL","https://app.aliasvault.net"),ze(ni,"DEFAULT_API_URL","https://app.aliasvault.net/api");let an=ni;class li extends Error{constructor(e){super(e),this.name="ApiAuthError"}}class od extends Error{constructor(e="Network error",a){super(e),this.name="NetworkError",this.cause=a,Object.setPrototypeOf(this,od.prototype)}}class Kk{async getBaseUrl(){return(await this.getApiUrl()).replace(/\/$/,"")+"/v1/"}async isSelfHosted(){return await this.getApiUrl()!==an.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){c.set("Authorization",`Bearer ${g}`);const E=await this.rawFetch(e,{...m,headers:c});if(!E.ok)throw new li("Request failed after token refresh");return i?E.json():E}else throw Yf.emit("auth.errors.sessionExpired"),new li("Session expired")}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",`${an.CLIENT_NAME}-${an.API_VERSION}`);const d={...a,headers:c};try{return await fetch(s,d)}catch(m){throw console.error("API request failed:",m),new od(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 li)throw e;return{clientVersionSupported:!0,serverVersion:"0.0.0",vaultRevision:0,srpSalt:""}}}validateStatusResponse(e){return e.clientVersionSupported?an.isServerVersionSupported(e.serverVersion)?null:"serverVersionNotSupported":"clientVersionNotSupported"}async refreshAccessToken(){const e=await this.getRefreshToken();if(!e)return null;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)throw new Error("Failed to refresh token");const i=await a.json();return this.updateTokens(i.token,i.refreshToken),i.token}catch{return Yf.emit("auth.errors.sessionExpired"),null}}async getAccessToken(){return await xe.getItem("local:accessToken")??null}async getRefreshToken(){return await xe.getItem("local:refreshToken")??null}async updateTokens(e,a){await xe.setItem("local:accessToken",e),await xe.setItem("local:refreshToken",a)}async getApiUrl(){const e=await xe.getItem("local:apiUrl");return!e||e.length===0?an.DEFAULT_API_URL:e}}const tI=I.createContext(null),qk=({children:r})=>{const[e,a]=I.useState(null);return I.useEffect(()=>{const i=new Kk;a(i)},[]),e?l.jsx(tI.Provider,{value:e,children:r}):null},mr=()=>{const r=I.useContext(tI);if(!r)throw new Error("useWebApi must be used within a WebApiProvider");return r},aI=I.createContext(void 0),Wk=({children:r})=>{const e=Zl(),a=mr(),[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(w){console.error("Error during logout:",w)}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,w,v)=>{await e.setAuthTokens(p,w,v),s(!0)},[e]);I.useEffect(()=>Yf.subscribe(async w=>{await m(d(w))}),[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(aI.Provider,{value:E,children:r})},gr=()=>{const r=I.useContext(aI);if(r===void 0)throw new Error("useApp must be used within an AppProvider");return r};class Sa{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 Yk=()=>{const{t:r}=Ze(),e=gr(),a=Kt();return!e.isLoggedIn||!a.dbAvailable?null:a.isOffline?l.jsxs("div",{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",children:[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:"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:r("common.offline")})]}):a.isSyncing?l.jsx("div",{title:r("common.syncingVault"),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",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("div",{title:r("common.pendingSync"),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",children: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},nI=({routes:r=[],rightButtons:e})=>{const{t:a}=Ze(),i=gr(),s=Ba(),c=Wa(),d=r==null?void 0:r.find(E=>{const p=E.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${p}$`).test(c.pathname)}),m=I.useCallback(()=>{const E=Sa.getReturnPath();E&&Sa.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(Gb,{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(Yk,{}),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"})})]})]})})]})})},Jk=({routes:r,headerButtons:e,message:a,children:i})=>{const s=I.useRef(null),c=Wa();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($N,{}),l.jsx(nI,{routes:r,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(Bb,{children:r.map(d=>l.jsx(hh,{path:d.path,element:d.element},d.path))})]})}),l.jsx(ZN,{})]})},Xk=({children:r})=>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(Gb,{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:r})})]}),er=()=>{const r={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:r})]});return l.jsx("div",{className:"inline-flex items-center",children:e})},rI=I.createContext(void 0),$k=({children:r})=>{const[e,a]=I.useState(null),i=I.useCallback(c=>{a(c)},[]),s=I.useMemo(()=>({setHeaderButtons:i,headerButtons:e}),[i,e]);return l.jsx(rI.Provider,{value:s,children:r})},fr=()=>{const r=I.useContext(rI);if(r===void 0)throw new Error("useHeaderButtons must be used within a HeaderButtonsProvider");return r},Zk=()=>{const{isLoading:r}=Aa();if(!r)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})})},iI=I.createContext(void 0),e2=({children:r})=>{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(iI.Provider,{value:g,children:[l.jsx(Zk,{message:c}),r]})},Aa=()=>{const r=I.useContext(iI);if(r===void 0)throw new Error("useLoading must be used within a LoadingProvider");return r},t2="session:lastVisitedPage",a2="session:lastVisitedTime",n2="session:navigationHistory",sI=I.createContext(void 0),r2=({children:r})=>{const e=Wa(),a=Ba(),{isInitialized:i,isLoggedIn:s}=gr(),{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 w=e.pathname.split("/").filter(Boolean),v=[];let x="";for(let T=0;T<w.length;T++)x+="/"+w[T],v.push({pathname:x,search:e.search,hash:e.hash});await Promise.all([xe.setItem(t2,e.pathname),xe.setItem(a2,Date.now()),xe.setItem(n2,v)])}},[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(sI.Provider,{value:E,children:r})},i2=()=>{const r=I.useContext(sI);if(r===void 0)throw new Error("useNavigation must be used within a NavigationProvider");return r};var Qg,By;function s2(){if(By)return Qg;By=1;function r(k){this._maxSize=k,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(k){return this._values[k]},r.prototype.set=function(k,B){return this._size>=this._maxSize&&this.clear(),k in this._values||this._size++,this._values[k]=B};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,a=/^\d+$/,i=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,c=/^\s*(['"]?)(.*?)(\1)\s*$/,d=512,m=new r(d),f=new r(d),g=new r(d);Qg={Cache:r,split:p,normalizePath:E,setter:function(k){var B=E(k);return f.get(k)||f.set(k,function(P,_){for(var j=0,V=B.length,H=P;j<V-1;){var Q=B[j];if(Q==="__proto__"||Q==="constructor"||Q==="prototype")return P;H=H[B[j++]]}H[B[j]]=_})},getter:function(k,B){var L=E(k);return g.get(k)||g.set(k,function(_){for(var j=0,V=L.length;j<V;)if(_!=null||!B)_=_[L[j++]];else return;return _})},join:function(k){return k.reduce(function(B,L){return B+(v(L)||a.test(L)?"["+L+"]":(B?".":"")+L)},"")},forEach:function(k,B,L){w(Array.isArray(k)?k:p(k),B,L)}};function E(k){return m.get(k)||m.set(k,p(k).map(function(B){return B.replace(c,"$2")}))}function p(k){return k.match(e)||[""]}function w(k,B,L){var P=k.length,_,j,V,H;for(j=0;j<P;j++)_=k[j],_&&(S(_)&&(_='"'+_+'"'),H=v(_),V=!H&&/^\d+$/.test(_),B.call(L,_,H,V,j,k))}function v(k){return typeof k=="string"&&k&&["'",'"'].indexOf(k.charAt(0))!==-1}function x(k){return k.match(i)&&!k.match(a)}function T(k){return s.test(k)}function S(k){return!v(k)&&(x(k)||T(k))}return Qg}var bs=s2(),Vg,Uy;function o2(){if(Uy)return Vg;Uy=1;const r=/[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(r)||[],a=E=>E[0].toUpperCase()+E.slice(1),i=(E,p)=>e(E).join(p).toLowerCase(),s=E=>e(E).reduce((p,w)=>`${p}${p?w[0].toUpperCase()+w.slice(1).toLowerCase():w.toLowerCase()}`,"");return Vg={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(" ")},Vg}var Gg=o2(),pu={exports:{}},_y;function l2(){if(_y)return pu.exports;_y=1,pu.exports=function(s){return r(e(s),s)},pu.exports.array=r;function r(s,c){var d=s.length,m=new Array(d),f={},g=d,E=a(c),p=i(s);for(c.forEach(function(v){if(!p.has(v[0])||!p.has(v[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});g--;)f[g]||w(s[g],g,new Set);return m;function w(v,x,T){if(T.has(v)){var S;try{S=", node was:"+JSON.stringify(v)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!p.has(v))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(v));if(!f[x]){f[x]=!0;var k=E.get(v)||new Set;if(k=Array.from(k),x=k.length){T.add(v);do{var B=k[--x];w(B,p.get(B),T)}while(x);T.delete(v)}m[--d]=v}}}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 pu.exports}var c2=l2();const u2=Wi(c2),d2=Object.prototype.toString,m2=Error.prototype.toString,g2=RegExp.prototype.toString,f2=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",h2=/^Symbol\((.*)\)(.*)$/;function A2(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function My(r,e=!1){if(r==null||r===!0||r===!1)return""+r;const a=typeof r;if(a==="number")return A2(r);if(a==="string")return e?`"${r}"`:r;if(a==="function")return"[Function "+(r.name||"anonymous")+"]";if(a==="symbol")return f2.call(r).replace(h2,"Symbol($1)");const i=d2.call(r).slice(8,-1);return i==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):i==="Error"||r instanceof Error?"["+m2.call(r)+"]":i==="RegExp"?g2.call(r):null}function qi(r,e){let a=My(r,e);return a!==null?a:JSON.stringify(r,function(i,s){let c=My(this[i],e);return c!==null?c:s},2)}function oI(r){return r==null?[]:[].concat(r)}let lI,cI,uI,p2=/\$\{\s*(\w+)\s*\}/g;lI=Symbol.toStringTag;class Fy{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[lI]="Error",this.name="ValidationError",this.value=a,this.path=i,this.type=s,this.errors=[],this.inner=[],oI(e).forEach(c=>{if(un.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]}}cI=Symbol.hasInstance;uI=Symbol.toStringTag;class un 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(p2,(s,c)=>qi(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 Fy(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[uI]="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,un)}static[cI](e){return Fy[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Tr={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:r,type:e,value:a,originalValue:i})=>{const s=i!=null&&i!==a?` (cast from the value \`${qi(i,!0)}\`).`:".";return e!=="mixed"?`${r} must be a \`${e}\` type, but the final value was: \`${qi(a,!0)}\``+s:`${r} must match the configured type. The validated value was: \`${qi(a,!0)}\``+s}},Nn={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"},y2={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}"},E2={isValue:"${path} field must be ${value}"},Mu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},b2={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"},I2={notType:r=>{const{path:e,value:a,spec:i}=r,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: \`${qi(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: \`${qi(a,!0)}\``}return un.formatError(Tr.notType,r)}};Object.assign(Object.create(null),{mixed:Tr,string:Nn,number:y2,date:Jf,object:Mu,array:b2,boolean:E2,tuple:I2});const xh=r=>r&&r.__isYupSchema__;class Ku{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 Ku(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 yu={context:"$",value:"."};class ws{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]===yu.context,this.isValue=this.key[0]===yu.value,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?yu.context:this.isValue?yu.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&bs.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}}ws.prototype.__isYupRef=!0;const ys=r=>r==null;function lo(r){function e({value:a,path:i="",options:s,originalValue:c,schema:d},m,f){const{name:g,test:E,params:p,message:w,skipAbsent:v}=r;let{parent:x,context:T,abortEarly:S=d.spec.abortEarly,disableStackTrace:k=d.spec.disableStackTrace}=s;function B(K){return ws.isRef(K)?K.getValue(a,x,T):K}function L(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]=B($[re]);const J=new un(un.formatError(K.message||w,$),a,$.path,K.type||g,$.disableStackTrace);return J.params=$,J}const P=S?m:f;let _={path:i,parent:x,type:g,from:s.from,createError:L,resolve:B,options:s,originalValue:c,schema:d};const j=K=>{un.isError(K)?P(K):K?f(null):P(L())},V=K=>{un.isError(K)?P(K):m(K)};if(v&&ys(a))return j(!0);let Q;try{var G;if(Q=E.call(_,a,_),typeof((G=Q)==null?void 0:G.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Q).then(j,V)}}catch(K){V(K);return}j(Q)}return e.OPTIONS=r,e}function v2(r,e,a,i=a){let s,c,d;return e?(bs.forEach(e,(m,f,g)=>{let E=f?m.slice(1,m.length-1):m;r=r.resolve({context:i,parent:s,value:a});let p=r.type==="tuple",w=g?parseInt(E,10):0;if(r.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&&w>=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[w],r=p?r.spec.types[w]:r.innerType}if(!g){if(!r.fields||!r.fields[E])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${d} which is a type: "${r.type}")`);s=a,a=a&&a[E],r=r.fields[E]}c=E,d=f?"["+m+"]":"."+m}),{schema:r,parent:s,parentPath:c}):{parent:s,parentPath:e,schema:r}}class qu extends Set{describe(){const e=[];for(const a of this.values())e.push(ws.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 qu(this.values())}merge(e,a){const i=this.clone();return e.forEach(s=>i.add(s)),a.forEach(s=>i.delete(s)),i}}function fo(r,e=new Map){if(xh(r)||!r||typeof r!="object")return r;if(e.has(r))return e.get(r);let a;if(r instanceof Date)a=new Date(r.getTime()),e.set(r,a);else if(r instanceof RegExp)a=new RegExp(r),e.set(r,a);else if(Array.isArray(r)){a=new Array(r.length),e.set(r,a);for(let i=0;i<r.length;i++)a[i]=fo(r[i],e)}else if(r instanceof Map){a=new Map,e.set(r,a);for(const[i,s]of r.entries())a.set(i,fo(s,e))}else if(r instanceof Set){a=new Set,e.set(r,a);for(const i of r)a.add(fo(i,e))}else if(r instanceof Object){a={},e.set(r,a);for(const[i,s]of Object.entries(r))a[i]=fo(s,e)}else throw Error(`Unable to clone ${r}`);return a}class Dr{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 qu,this._blacklist=new qu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Tr.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=fo(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&&ys(c))return c;let d=qi(e),m=qi(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=T=>{s||(s=!0,a(T,d))},p=T=>{s||(s=!0,i(T,d))},w=c.length,v=[];if(!w)return p([]);let x={value:d,originalValue:m,path:f,options:g,schema:this};for(let T=0;T<c.length;T++){const S=c[T];S(x,E,function(B){B&&(Array.isArray(B)?v.push(...B):v.push(B)),--w<=0&&p(v)})}}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,w,v)=>this.resolve(E)._validate(g,E,w,v)}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)=>{un.isError(f)&&(f.value=g),m(f)},(f,g)=>{f.length?m(new un(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 un.isError(m)&&(m.value=f),m},(m,f)=>{if(m.length)throw new un(m,e,void 0,void 0,d);c=f}),c}isValid(e,a){return this.validate(e,a).then(()=>!0,i=>{if(un.isError(i))return!1;throw i})}isValidSync(e,a){try{return this.validateSync(e,a),!0}catch(i){if(un.isError(i))return!1;throw i}}_getDefault(e){let a=this.spec.default;return a==null?a:typeof a=="function"?a.call(this,e):fo(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=lo({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=lo({message:a,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),i}optional(){return this.optionality(!0)}defined(e=Tr.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Tr.notNull){return this.nullability(!1,e)}required(e=Tr.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=Tr.default),typeof a.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),s=lo(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=oI(e).map(c=>new ws(c));return s.forEach(c=>{c.isSibling&&i.deps.push(c.key)}),i.conditions.push(typeof a=="function"?new Ku(s,a):Ku.fromOptions(s,a)),i}typeError(e){let a=this.clone();return a.internalTests.typeError=lo({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=Tr.oneOf){let i=this.clone();return e.forEach(s=>{i._whitelist.add(s),i._blacklist.delete(s)}),i.internalTests.whiteList=lo({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=Tr.notOneOf){let i=this.clone();return e.forEach(s=>{i._blacklist.add(s),i._whitelist.delete(s)}),i.internalTests.blacklist=lo({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)}}}Dr.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])Dr.prototype[`${r}At`]=function(e,a,i={}){const{parent:s,parentPath:c,schema:d}=v2(this,e,a,i.context);return d[r](s&&s[c],Object.assign({},i,{parent:s,path:e}))};for(const r of["equals","is"])Dr.prototype[r]=Dr.prototype.oneOf;for(const r of["not","nope"])Dr.prototype[r]=Dr.prototype.notOneOf;const C2=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function w2(r){const e=Xf(r);if(!e)return Date.parse?Date.parse(r):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(r){var e,a;const i=C2.exec(r);return i?{year:ti(i[1]),month:ti(i[2],1)-1,day:ti(i[3],1),hour:ti(i[4]),minute:ti(i[5]),second:ti(i[6]),millisecond:i[7]?ti(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:ti(i[10]),minuteOffset:ti(i[11])}:null}function ti(r,e=0){return Number(r)||e}let N2=/^[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])?)*$/,x2=/^((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,T2=/^(?:[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,S2="^\\d{4}-\\d{2}-\\d{2}",k2="\\d{2}:\\d{2}:\\d{2}",L2="(([+-]\\d{2}(:?\\d{2})?)|Z)",R2=new RegExp(`${S2}T${k2}(\\.\\d+)?${L2}$`),D2=r=>ys(r)||r===r.trim(),B2={}.toString();function $f(){return new dI}class dI extends Dr{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===B2?e:s})})}required(e){return super.required(e).withMutation(a=>a.test({message:e||Tr.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=Nn.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=Nn.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=Nn.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||Nn.matches,params:{regex:e},skipAbsent:!0,test:d=>d===""&&i||d.search(e)!==-1})}email(e=Nn.email){return this.matches(N2,{name:"email",message:e,excludeEmptyString:!0})}url(e=Nn.url){return this.matches(x2,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Nn.uuid){return this.matches(T2,{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(R2,{name:"datetime",message:a||Nn.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:a||Nn.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||Nn.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=Nn.trim){return this.transform(a=>a!=null?a.trim():a).test({message:e,name:"trim",test:D2})}lowercase(e=Nn.lowercase){return this.transform(a=>ys(a)?a:a.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:a=>ys(a)||a===a.toLowerCase()})}uppercase(e=Nn.uppercase){return this.transform(a=>ys(a)?a:a.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:a=>ys(a)||a===a.toUpperCase()})}}$f.prototype=dI.prototype;let U2=new Date(""),_2=r=>Object.prototype.toString.call(r)==="[object Date]";class Th extends Dr{constructor(){super({type:"date",check(e){return _2(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,a,i)=>!i.spec.coerce||i.isType(e)||e===null?e:(e=w2(e),isNaN(e)?Th.INVALID_DATE:new Date(e)))})}prepareParam(e,a){let i;if(ws.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)}})}}Th.INVALID_DATE=U2;function M2(r,e=[]){let a=[],i=new Set,s=new Set(e.map(([d,m])=>`${d}-${m}`));function c(d,m){let f=bs.split(d)[0];i.add(f),s.has(`${m}-${f}`)||a.push([m,f])}for(const d of Object.keys(r)){let m=r[d];i.add(d),ws.isRef(m)&&m.isSibling?c(m.path,d):xh(m)&&"deps"in m&&m.deps.forEach(f=>c(f,d))}return u2.array(Array.from(i),a).reverse()}function Oy(r,e){let a=1/0;return r.some((i,s)=>{var c;if((c=e.path)!=null&&c.includes(i))return a=s,!0}),a}function mI(r){return(e,a)=>Oy(r,e)-Oy(r,a)}const F2=(r,e,a)=>{if(typeof r!="string")return r;let i=r;try{i=JSON.parse(r)}catch{}return a.isType(i)?i:r};function Fu(r){if("fields"in r){const e={};for(const[a,i]of Object.entries(r.fields))e[a]=Fu(i);return r.setFields(e)}if(r.type==="array"){const e=r.optional();return e.innerType&&(e.innerType=Fu(e.innerType)),e}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(Fu)}):"optional"in r?r.optional():r}const O2=(r,e)=>{const a=[...bs.normalizePath(e)];if(a.length===1)return a[0]in r;let i=a.pop(),s=bs.getter(bs.join(a),!0)(r);return!!(s&&i in s)};let jy=r=>Object.prototype.toString.call(r)==="[object Object]";function Py(r,e){let a=Object.keys(r.fields);return Object.keys(e).filter(i=>a.indexOf(i)===-1)}const j2=mI([]);function gI(r){return new fI(r)}class fI extends Dr{constructor(e){super({type:"object",check(a){return jy(a)||typeof a=="function"}}),this.fields=Object.create(null),this._sortErrors=j2,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 w=c[p],v=p in s;if(w){let x,T=s[p];g.path=(a.path?`${a.path}.`:"")+p,w=w.resolve({value:T,context:a.context,parent:f});let S=w instanceof Dr?w.spec:void 0,k=S==null?void 0:S.strict;if(S!=null&&S.strip){E=E||p in s;continue}x=!a.__validating||!k?w.cast(s[p],g):s[p],x!==void 0&&(f[p]=x)}else v&&!d&&(f[p]=s[p]);(v!==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||!jy(g)){s(f,g);return}d=d||g;let E=[];for(let p of this._nodes){let w=this.fields[p];!w||ws.isRef(w)||E.push(w.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=M2(e,a),i._sortErrors=mI(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 Fu(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=bs.getter(e,!0);return this.transform(c=>{if(!c)return c;let d=c;return O2(c,e)&&(d=Object.assign({},c),i||delete d[e],d[a]=s(c)),d})}json(){return this.transform(F2)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Mu.exact,test(a){if(a==null)return!0;const i=Py(this.schema,a);return i.length===0||this.createError({params:{properties:i.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,a=Mu.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=Py(this.schema,s);return!e||c.length===0||this.createError({params:{unknown:c.join(", ")}})}});return i.spec.noUnknown=e,i}unknown(e=!0,a=Mu.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(Gg.camelCase)}snakeCase(){return this.transformKeys(Gg.snakeCase)}constantCase(){return this.transformKeys(e=>Gg.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}}gI.prototype=fI.prototype;const hI=({variant:r="dropdown",size:e="md"})=>{const{i18n:a}=Ze(),[i,s]=I.useState(!1),c=I.useRef(null),d=vk(a.language)||jl[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 xe.setItem("local:language",f),s(!1),a.emit("languageChanged",f)};return r==="buttons"?l.jsx("div",{className:"flex space-x-2",children:jl.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:jl.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))})]})},Kg=[{label:"Aliasvault.net",value:an.DEFAULT_API_URL},{label:"Self-hosted",value:"custom"}],P2=r=>gI().shape({apiUrl:$f().required(r("settings.validation.apiUrlRequired")).test("is-valid-api-url",r("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(r("settings.validation.clientUrlRequired")).test("is-valid-client-url",r("settings.validation.clientUrlInvalid"),e=>{if(!e)return!0;try{const a=new URL(e);return a.protocol==="http:"||a.protocol==="https:"}catch{return!1}})}),H2=()=>{const{t:r}=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(),w=P2(r),v=I.useRef(null),x=I.useRef(null),T=I.useRef(null),S=I.useRef(null);I.useEffect(()=>()=>{if(v.current&&clearTimeout(v.current),x.current&&clearTimeout(x.current),T.current!==null){const _=T.current;xe.setItem("local:apiUrl",_)}if(S.current!==null){const _=S.current;xe.setItem("local:clientUrl",_)}},[]),I.useEffect(()=>{(async()=>{const j=await xe.getItem("local:apiUrl"),V=await xe.getItem("local:clientUrl"),H=await vt.getGlobalAutofillPopupEnabled(),Q=await vt.getVaultLockedDismissUntil();f(Q?!1:H);const G=Kg.find(K=>K.value===j);G?a(G.value):j?(a("custom"),s(j),d(V??"")):a(Kg[0].value),p(!1)})()},[p]);const k=async _=>{const j=_.target.value;a(j),j!=="custom"&&(await xe.setItem("local:apiUrl",""),await xe.setItem("local:clientUrl",""),s(""),d(""),E({}))},B=I.useCallback(_=>{const j=_.target.value;s(j),T.current=j,v.current&&clearTimeout(v.current),v.current=setTimeout(async()=>{try{await w.validateAt("apiUrl",{apiUrl:j}),E(V=>({...V,apiUrl:void 0})),await xe.setItem("local:apiUrl",j),T.current=null}catch(V){V instanceof un&&(E(H=>({...H,apiUrl:V.message})),await xe.setItem("local:apiUrl",an.DEFAULT_API_URL),await xe.setItem("local:clientUrl",an.DEFAULT_CLIENT_URL),T.current=null)}},150)},[w]),L=I.useCallback(_=>{const j=_.target.value;d(j),S.current=j,x.current&&clearTimeout(x.current),x.current=setTimeout(async()=>{try{await w.validateAt("clientUrl",{clientUrl:j}),E(V=>({...V,clientUrl:void 0})),await xe.setItem("local:clientUrl",j),S.current=null}catch(V){V instanceof un&&(E(H=>({...H,clientUrl:V.message})),S.current=null)}},150)},[w]),P=async()=>{const _=!m;await vt.setGlobalAutofillPopupEnabled(_),_&&(await vt.setDisabledSites([]),await vt.setVaultLockedDismissUntil(0)),f(_)};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:r("settings.serverConfiguration","Server Configuration")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:r("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:r("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:Kg.map(_=>l.jsx("option",{value:_.value,children:_.label},_.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:r("settings.customApiUrl","API URL")}),l.jsx("input",{id:"custom-api-url",type:"text",value:i,onChange:B,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:r("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:r("settings.customClientUrl","Client URL")}),l.jsx("input",{id:"custom-client-url",type:"text",value:c,onChange:L,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:r("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:r("settings.autofillSettings","Autofill Settings")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:r("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:r("settings.autofillEnabled")}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:m?r("settings.autofillEnabledDescription","Autofill suggestions will appear on login forms"):r("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?r("common.enabled","Enabled"):r("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:r("settings.languageSettings","Language")})}),l.jsx("div",{children:l.jsx(hI,{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:[r("settings.version"),": ",an.VERSION]})]})},ya=I.forwardRef(({onClick:r,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:r,type:i,id:e,children:a})});ya.displayName="Button";var co={},qg,Hy;function z2(){return Hy||(Hy=1,qg=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),qg}var Wg={},Pi={},zy;function Ns(){if(zy)return Pi;zy=1;let r;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.');r=i},Pi.isKanjiModeEnabled=function(){return typeof r<"u"},Pi.toSJIS=function(i){return r(i)},Pi}var Yg={},Qy;function Sh(){return Qy||(Qy=1,function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.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 r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+a)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,s){if(r.isValid(i))return i;try{return e(i)}catch{return s}}}(Yg)),Yg}var Jg,Vy;function Q2(){if(Vy)return Jg;Vy=1;function r(){this.buffer=[],this.length=0}return r.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++}},Jg=r,Jg}var Xg,Gy;function V2(){if(Gy)return Xg;Gy=1;function r(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 r.prototype.set=function(e,a,i,s){const c=e*this.size+a;this.data[c]=i,s&&(this.reservedBit[c]=!0)},r.prototype.get=function(e,a){return this.data[e*this.size+a]},r.prototype.xor=function(e,a,i){this.data[e*this.size+a]^=i},r.prototype.isReserved=function(e,a){return this.reservedBit[e*this.size+a]},Xg=r,Xg}var $g={},Ky;function G2(){return Ky||(Ky=1,function(r){const e=Ns().getSymbolSize;r.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()},r.getPositions=function(i){const s=[],c=r.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}}($g)),$g}var Zg={},qy;function K2(){if(qy)return Zg;qy=1;const r=Ns().getSymbolSize,e=7;return Zg.getPositions=function(i){const s=r(i);return[[0,0],[s-e,0],[0,s-e]]},Zg}var ef={},Wy;function q2(){return Wy||(Wy=1,function(r){r.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};r.isValid=function(s){return s!=null&&s!==""&&!isNaN(s)&&s>=0&&s<=7},r.from=function(s){return r.isValid(s)?parseInt(s,10):void 0},r.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 w=0;w<c;w++){let v=s.get(p,w);v===g?m++:(m>=5&&(d+=e.N1+(m-5)),g=v,m=1),v=s.get(w,p),v===E?f++:(f>=5&&(d+=e.N1+(f-5)),E=v,f=1)}m>=5&&(d+=e.N1+(m-5)),f>=5&&(d+=e.N1+(f-5))}return d},r.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},r.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},r.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 r.Patterns.PATTERN000:return(s+c)%2===0;case r.Patterns.PATTERN001:return s%2===0;case r.Patterns.PATTERN010:return c%3===0;case r.Patterns.PATTERN011:return(s+c)%3===0;case r.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(c/3))%2===0;case r.Patterns.PATTERN101:return s*c%2+s*c%3===0;case r.Patterns.PATTERN110:return(s*c%2+s*c%3)%2===0;case r.Patterns.PATTERN111:return(s*c%3+(s+c)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}r.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))},r.getBestMask=function(s,c){const d=Object.keys(r.Patterns).length;let m=0,f=1/0;for(let g=0;g<d;g++){c(g),r.applyMask(g,s);const E=r.getPenaltyN1(s)+r.getPenaltyN2(s)+r.getPenaltyN3(s)+r.getPenaltyN4(s);r.applyMask(g,s),E<f&&(f=E,m=g)}return m}}(ef)),ef}var Eu={},Yy;function AI(){if(Yy)return Eu;Yy=1;const r=Sh(),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 Eu.getBlocksCount=function(s,c){switch(c){case r.L:return e[(s-1)*4+0];case r.M:return e[(s-1)*4+1];case r.Q:return e[(s-1)*4+2];case r.H:return e[(s-1)*4+3];default:return}},Eu.getTotalCodewordsCount=function(s,c){switch(c){case r.L:return a[(s-1)*4+0];case r.M:return a[(s-1)*4+1];case r.Q:return a[(s-1)*4+2];case r.H:return a[(s-1)*4+3];default:return}},Eu}var tf={},wl={},Jy;function W2(){if(Jy)return wl;Jy=1;const r=new Uint8Array(512),e=new Uint8Array(256);return function(){let i=1;for(let s=0;s<255;s++)r[s]=i,e[i]=s,i<<=1,i&256&&(i^=285);for(let s=255;s<512;s++)r[s]=r[s-255]}(),wl.log=function(i){if(i<1)throw new Error("log("+i+")");return e[i]},wl.exp=function(i){return r[i]},wl.mul=function(i,s){return i===0||s===0?0:r[e[i]+e[s]]},wl}var Xy;function Y2(){return Xy||(Xy=1,function(r){const e=W2();r.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},r.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},r.generateECPolynomial=function(i){let s=new Uint8Array([1]);for(let c=0;c<i;c++)s=r.mul(s,new Uint8Array([1,e.exp(c)]));return s}}(tf)),tf}var af,$y;function J2(){if($y)return af;$y=1;const r=Y2();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=r.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=r.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},af=e,af}var nf={},rf={},sf={},Zy;function pI(){return Zy||(Zy=1,sf.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),sf}var Cr={},eE;function yI(){if(eE)return Cr;eE=1;const r="[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
]))+`;Cr.KANJI=new RegExp(a,"g"),Cr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Cr.BYTE=new RegExp(i,"g"),Cr.NUMERIC=new RegExp(r,"g"),Cr.ALPHANUMERIC=new RegExp(e,"g");const s=new RegExp("^"+a+"$"),c=new RegExp("^"+r+"$"),d=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Cr.testKanji=function(f){return s.test(f)},Cr.testNumeric=function(f){return c.test(f)},Cr.testAlphanumeric=function(f){return d.test(f)},Cr}var tE;function xs(){return tE||(tE=1,function(r){const e=pI(),a=yI();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.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]},r.getBestModeForData=function(c){return a.testNumeric(c)?r.NUMERIC:a.testAlphanumeric(c)?r.ALPHANUMERIC:a.testKanji(c)?r.KANJI:r.BYTE},r.toString=function(c){if(c&&c.id)return c.id;throw new Error("Invalid mode")},r.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 r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+s)}}r.from=function(c,d){if(r.isValid(c))return c;try{return i(c)}catch{return d}}}(rf)),rf}var aE;function X2(){return aE||(aE=1,function(r){const e=Ns(),a=AI(),i=Sh(),s=xs(),c=pI(),d=7973,m=e.getBCHDigit(d);function f(w,v,x){for(let T=1;T<=40;T++)if(v<=r.getCapacity(T,x,w))return T}function g(w,v){return s.getCharCountIndicator(w,v)+4}function E(w,v){let x=0;return w.forEach(function(T){const S=g(T.mode,v);x+=S+T.getBitsLength()}),x}function p(w,v){for(let x=1;x<=40;x++)if(E(w,x)<=r.getCapacity(x,v,s.MIXED))return x}r.from=function(v,x){return c.isValid(v)?parseInt(v,10):x},r.getCapacity=function(v,x,T){if(!c.isValid(v))throw new Error("Invalid QR Code version");typeof T>"u"&&(T=s.BYTE);const S=e.getSymbolTotalCodewords(v),k=a.getTotalCodewordsCount(v,x),B=(S-k)*8;if(T===s.MIXED)return B;const L=B-g(T,v);switch(T){case s.NUMERIC:return Math.floor(L/10*3);case s.ALPHANUMERIC:return Math.floor(L/11*2);case s.KANJI:return Math.floor(L/13);case s.BYTE:default:return Math.floor(L/8)}},r.getBestVersionForData=function(v,x){let T;const S=i.from(x,i.M);if(Array.isArray(v)){if(v.length>1)return p(v,S);if(v.length===0)return 1;T=v[0]}else T=v;return f(T.mode,T.getLength(),S)},r.getEncodedBits=function(v){if(!c.isValid(v)||v<7)throw new Error("Invalid QR Code version");let x=v<<12;for(;e.getBCHDigit(x)-m>=0;)x^=d<<e.getBCHDigit(x)-m;return v<<12|x}}(nf)),nf}var of={},nE;function $2(){if(nE)return of;nE=1;const r=Ns(),e=1335,a=21522,i=r.getBCHDigit(e);return of.getEncodedBits=function(c,d){const m=c.bit<<3|d;let f=m<<10;for(;r.getBCHDigit(f)-i>=0;)f^=e<<r.getBCHDigit(f)-i;return(m<<10|f)^a},of}var lf={},cf,rE;function Z2(){if(rE)return cf;rE=1;const r=xs();function e(a){this.mode=r.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))},cf=e,cf}var uf,iE;function eL(){if(iE)return uf;iE=1;const r=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=r.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)},uf=a,uf}var df,sE;function tL(){if(sE)return df;sE=1;const r=xs();function e(a){this.mode=r.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)},df=e,df}var mf,oE;function aL(){if(oE)return mf;oE=1;const r=xs(),e=Ns();function a(i){this.mode=r.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)}},mf=a,mf}var gf={exports:{}},lE;function nL(){return lE||(lE=1,function(r){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,w,v,x,T,S;!m.empty();){f=m.pop(),g=f.value,p=f.cost,w=a[g]||{};for(E in w)w.hasOwnProperty(E)&&(v=w[E],x=p+v,T=d[E],S=typeof d[E]>"u",(S||T>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}}};r.exports=e}(gf)),gf.exports}var cE;function rL(){return cE||(cE=1,function(r){const e=xs(),a=Z2(),i=eL(),s=tL(),c=aL(),d=yI(),m=Ns(),f=nL();function g(k){return unescape(encodeURIComponent(k)).length}function E(k,B,L){const P=[];let _;for(;(_=k.exec(L))!==null;)P.push({data:_[0],index:_.index,mode:B,length:_[0].length});return P}function p(k){const B=E(d.NUMERIC,e.NUMERIC,k),L=E(d.ALPHANUMERIC,e.ALPHANUMERIC,k);let P,_;return m.isKanjiModeEnabled()?(P=E(d.BYTE,e.BYTE,k),_=E(d.KANJI,e.KANJI,k)):(P=E(d.BYTE_KANJI,e.BYTE,k),_=[]),B.concat(L,P,_).sort(function(V,H){return V.index-H.index}).map(function(V){return{data:V.data,mode:V.mode,length:V.length}})}function w(k,B){switch(B){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 v(k){return k.reduce(function(B,L){const P=B.length-1>=0?B[B.length-1]:null;return P&&P.mode===L.mode?(B[B.length-1].data+=L.data,B):(B.push(L),B)},[])}function x(k){const B=[];for(let L=0;L<k.length;L++){const P=k[L];switch(P.mode){case e.NUMERIC:B.push([P,{data:P.data,mode:e.ALPHANUMERIC,length:P.length},{data:P.data,mode:e.BYTE,length:P.length}]);break;case e.ALPHANUMERIC:B.push([P,{data:P.data,mode:e.BYTE,length:P.length}]);break;case e.KANJI:B.push([P,{data:P.data,mode:e.BYTE,length:g(P.data)}]);break;case e.BYTE:B.push([{data:P.data,mode:e.BYTE,length:g(P.data)}])}}return B}function T(k,B){const L={},P={start:{}};let _=["start"];for(let j=0;j<k.length;j++){const V=k[j],H=[];for(let Q=0;Q<V.length;Q++){const G=V[Q],K=""+j+Q;H.push(K),L[K]={node:G,lastCount:0},P[K]={};for(let $=0;$<_.length;$++){const J=_[$];L[J]&&L[J].node.mode===G.mode?(P[J][K]=w(L[J].lastCount+G.length,G.mode)-w(L[J].lastCount,G.mode),L[J].lastCount+=G.length):(L[J]&&(L[J].lastCount=G.length),P[J][K]=w(G.length,G.mode)+4+e.getCharCountIndicator(G.mode,B))}}_=H}for(let j=0;j<_.length;j++)P[_[j]].end=0;return{map:P,table:L}}function S(k,B){let L;const P=e.getBestModeForData(k);if(L=e.from(B,P),L!==e.BYTE&&L.bit<P.bit)throw new Error('"'+k+'" cannot be encoded with mode '+e.toString(L)+`.
 Suggested mode is: `+e.toString(P));switch(L===e.KANJI&&!m.isKanjiModeEnabled()&&(L=e.BYTE),L){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)}}r.fromArray=function(B){return B.reduce(function(L,P){return typeof P=="string"?L.push(S(P,null)):P.data&&L.push(S(P.data,P.mode)),L},[])},r.fromString=function(B,L){const P=p(B,m.isKanjiModeEnabled()),_=x(P),j=T(_,L),V=f.find_path(j.map,"start","end"),H=[];for(let Q=1;Q<V.length-1;Q++)H.push(j.table[V[Q]].node);return r.fromArray(v(H))},r.rawSplit=function(B){return r.fromArray(p(B,m.isKanjiModeEnabled()))}}(lf)),lf}var uE;function iL(){if(uE)return Wg;uE=1;const r=Ns(),e=Sh(),a=Q2(),i=V2(),s=G2(),c=K2(),d=q2(),m=AI(),f=J2(),g=X2(),E=$2(),p=xs(),w=rL();function v(j,V){const H=j.size,Q=c.getPositions(V);for(let G=0;G<Q.length;G++){const K=Q[G][0],$=Q[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 V=j.size;for(let H=8;H<V-8;H++){const Q=H%2===0;j.set(H,6,Q,!0),j.set(6,H,Q,!0)}}function T(j,V){const H=s.getPositions(V);for(let Q=0;Q<H.length;Q++){const G=H[Q][0],K=H[Q][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 S(j,V){const H=j.size,Q=g.getEncodedBits(V);let G,K,$;for(let J=0;J<18;J++)G=Math.floor(J/3),K=J%3+H-8-3,$=(Q>>J&1)===1,j.set(G,K,$,!0),j.set(K,G,$,!0)}function k(j,V,H){const Q=j.size,G=E.getEncodedBits(V,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(Q-15+K,8,$,!0),K<8?j.set(8,Q-K-1,$,!0):K<9?j.set(8,15-K-1+1,$,!0):j.set(8,15-K-1,$,!0);j.set(Q-8,8,1,!0)}function B(j,V){const H=j.size;let Q=-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;$<V.length&&(Ae=(V[$]>>>K&1)===1),j.set(G,J-re,Ae),K--,K===-1&&($++,K=7)}if(G+=Q,G<0||H<=G){G-=Q,Q=-Q;break}}}function L(j,V,H){const Q=new a;H.forEach(function(re){Q.put(re.mode.bit,4),Q.put(re.getLength(),p.getCharCountIndicator(re.mode,j)),re.write(Q)});const G=r.getSymbolTotalCodewords(j),K=m.getTotalCodewordsCount(j,V),$=(G-K)*8;for(Q.getLengthInBits()+4<=$&&Q.put(0,4);Q.getLengthInBits()%8!==0;)Q.putBit(0);const J=($-Q.getLengthInBits())/8;for(let re=0;re<J;re++)Q.put(re%2?17:236,8);return P(Q,j,V)}function P(j,V,H){const Q=r.getSymbolTotalCodewords(V),G=m.getTotalCodewordsCount(V,H),K=Q-G,$=m.getBlocksCount(V,H),J=Q%$,re=$-J,Ae=Math.floor(Q/$),X=Math.floor(K/$),ie=X+1,ce=Ae-X,ye=new f(ce);let M=0;const q=new Array($),ee=new Array($);let ne=0;const Ie=new Uint8Array(j.buffer);for(let Qe=0;Qe<$;Qe++){const pt=Qe<re?X:ie;q[Qe]=Ie.slice(M,M+pt),ee[Qe]=ye.encode(q[Qe]),M+=pt,ne=Math.max(ne,pt)}const we=new Uint8Array(Q);let Re=0,Be,ke;for(Be=0;Be<ne;Be++)for(ke=0;ke<$;ke++)Be<q[ke].length&&(we[Re++]=q[ke][Be]);for(Be=0;Be<ce;Be++)for(ke=0;ke<$;ke++)we[Re++]=ee[ke][Be];return we}function _(j,V,H,Q){let G;if(Array.isArray(j))G=w.fromArray(j);else if(typeof j=="string"){let Ae=V;if(!Ae){const X=w.rawSplit(j);Ae=g.getBestVersionForData(X,H)}G=w.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(!V)V=K;else if(V<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 $=L(V,H,G),J=r.getSymbolSize(V),re=new i(J);return v(re,V),x(re),T(re,V),k(re,H,0),V>=7&&S(re,V),B(re,$),isNaN(Q)&&(Q=d.getBestMask(re,k.bind(null,re,H))),d.applyMask(Q,re),k(re,H,Q),{modules:re,version:V,errorCorrectionLevel:H,maskPattern:Q,segments:G}}return Wg.create=function(V,H){if(typeof V>"u"||V==="")throw new Error("No input text");let Q=e.M,G,K;return typeof H<"u"&&(Q=e.from(H.errorCorrectionLevel,e.M),G=g.from(H.version),K=d.from(H.maskPattern),H.toSJISFunc&&r.setToSJISFunction(H.toSJISFunc)),_(V,G,Q,K)},Wg}var ff={},hf={},dE;function EI(){return dE||(dE=1,function(r){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("")}}r.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||{}}},r.getScale=function(i,s){return s.width&&s.width>=i+s.margin*2?s.width/(i+s.margin*2):s.scale},r.getImageWidth=function(i,s){const c=r.getScale(i,s);return Math.floor((i+s.margin*2)*c)},r.qrToImageData=function(i,s,c){const d=s.modules.size,m=s.modules.data,f=r.getScale(d,c),g=Math.floor((d+c.margin*2)*f),E=c.margin*f,p=[c.color.light,c.color.dark];for(let w=0;w<g;w++)for(let v=0;v<g;v++){let x=(w*g+v)*4,T=c.color.light;if(w>=E&&v>=E&&w<g-E&&v<g-E){const S=Math.floor((w-E)/f),k=Math.floor((v-E)/f);T=p[m[S*d+k]?1:0]}i[x++]=T.r,i[x++]=T.g,i[x++]=T.b,i[x]=T.a}}}(hf)),hf}var mE;function sL(){return mE||(mE=1,function(r){const e=EI();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")}}r.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"),w=p.createImageData(E,E);return e.qrToImageData(w.data,c,f),a(p,g,E),p.putImageData(w,0,0),g},r.renderToDataURL=function(c,d,m){let f=m;typeof f>"u"&&(!d||!d.getContext)&&(f=d,d=void 0),f||(f={});const g=r.render(c,d,f),E=f.type||"image/png",p=f.rendererOpts||{};return g.toDataURL(E,p.quality)}}(ff)),ff}var Af={},gE;function oL(){if(gE)return Af;gE=1;const r=EI();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 w=Math.floor(p%c),v=Math.floor(p/c);!w&&!g&&(g=!0),s[p]?(E++,p>0&&w>0&&s[p-1]||(m+=g?a("M",w+d,.5+v+d):a("m",f,0),f=0,g=!1),w+1<c&&s[p+1]||(m+=a("h",E),E=0)):f++}return m}return Af.render=function(c,d,m){const f=r.getOptions(d),g=c.modules.size,E=c.modules.data,p=g+f.margin*2,w=f.color.light.a?"<path "+e(f.color.light,"fill")+' d="M0 0h'+p+"v"+p+'H0z"/>':"",v="<path "+e(f.color.dark,"stroke")+' d="'+i(E,g,f.margin)+'"/>',x='viewBox="0 0 '+p+" "+p+'"',S='<svg xmlns="http://www.w3.org/2000/svg" '+(f.width?'width="'+f.width+'" height="'+f.width+'" ':"")+x+' shape-rendering="crispEdges">'+w+v+`</svg>
`;return typeof m=="function"&&m(null,S),S},Af}var fE;function lL(){if(fE)return co;fE=1;const r=z2(),e=iL(),a=sL(),i=oL();function s(c,d,m,f,g){const E=[].slice.call(arguments,1),p=E.length,w=typeof E[p-1]=="function";if(!w&&!r())throw new Error("Callback required as last argument");if(w){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(v,x){try{const T=e.create(m,f);v(c(T,d,f))}catch(T){x(T)}})}try{const v=e.create(m,f);g(null,c(v,d,f))}catch(v){g(v)}}return co.create=e.create,co.toCanvas=s.bind(null,a.render),co.toDataURL=s.bind(null,a.renderToDataURL),co.toString=s.bind(null,function(c,d,m){return i.render(c,m)}),co}var cL=lL();const uL=Wi(cL),tr=({isOpen:r,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(v=>{v.key==="Escape"&&e()},[e]);if(I.useEffect(()=>{if(r)return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}},[r,E]),!r)return null;const p=v=>{v.target===v.currentTarget&&e()},w=a||c;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:[w&&l.jsxs("div",{className:`px-6 py-4 flex items-center justify-between ${m?"border-b border-gray-200 dark:border-gray-700":""}`,children:[a&&l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:a}),!a&&l.jsx("div",{}),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"})})]})]}),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 On=(r=>(r.TIMEOUT="TIMEOUT",r.GENERIC="GENERIC",r))(On||{}),pf={},Nl={},hE;function dL(){if(hE)return Nl;hE=1,Nl.byteLength=m,Nl.toByteArray=g,Nl.fromByteArray=w;for(var r=[],e=[],a=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=i.length;s<c;++s)r[s]=i[s],e[i.charCodeAt(s)]=s;e[45]=62,e[95]=63;function d(v){var x=v.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var T=v.indexOf("=");T===-1&&(T=x);var S=T===x?0:4-T%4;return[T,S]}function m(v){var x=d(v),T=x[0],S=x[1];return(T+S)*3/4-S}function f(v,x,T){return(x+T)*3/4-T}function g(v){var x,T=d(v),S=T[0],k=T[1],B=new a(f(v,S,k)),L=0,P=k>0?S-4:S,_;for(_=0;_<P;_+=4)x=e[v.charCodeAt(_)]<<18|e[v.charCodeAt(_+1)]<<12|e[v.charCodeAt(_+2)]<<6|e[v.charCodeAt(_+3)],B[L++]=x>>16&255,B[L++]=x>>8&255,B[L++]=x&255;return k===2&&(x=e[v.charCodeAt(_)]<<2|e[v.charCodeAt(_+1)]>>4,B[L++]=x&255),k===1&&(x=e[v.charCodeAt(_)]<<10|e[v.charCodeAt(_+1)]<<4|e[v.charCodeAt(_+2)]>>2,B[L++]=x>>8&255,B[L++]=x&255),B}function E(v){return r[v>>18&63]+r[v>>12&63]+r[v>>6&63]+r[v&63]}function p(v,x,T){for(var S,k=[],B=x;B<T;B+=3)S=(v[B]<<16&16711680)+(v[B+1]<<8&65280)+(v[B+2]&255),k.push(E(S));return k.join("")}function w(v){for(var x,T=v.length,S=T%3,k=[],B=16383,L=0,P=T-S;L<P;L+=B)k.push(p(v,L,L+B>P?P:L+B));return S===1?(x=v[T-1],k.push(r[x>>2]+r[x<<4&63]+"==")):S===2&&(x=(v[T-2]<<8)+v[T-1],k.push(r[x>>10]+r[x>>4&63]+r[x<<2&63]+"=")),k.join("")}return Nl}var bu={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var AE;function mL(){return AE||(AE=1,bu.read=function(r,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,w=a?-1:1,v=r[e+p];for(p+=w,c=v&(1<<-E)-1,v>>=-E,E+=m;E>0;c=c*256+r[e+p],p+=w,E-=8);for(d=c&(1<<-E)-1,c>>=-E,E+=i;E>0;d=d*256+r[e+p],p+=w,E-=8);if(c===0)c=1-g;else{if(c===f)return d?NaN:(v?-1:1)*(1/0);d=d+Math.pow(2,i),c=c-g}return(v?-1:1)*d*Math.pow(2,c-i)},bu.write=function(r,e,a,i,s,c){var d,m,f,g=c*8-s-1,E=(1<<g)-1,p=E>>1,w=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=i?0:c-1,x=i?1:-1,T=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+=w/f:e+=w*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;r[a+v]=m&255,v+=x,m/=256,s-=8);for(d=d<<s|m,g+=s;g>0;r[a+v]=d&255,v+=x,d/=256,g-=8);r[a+v-x]|=T*128}),bu}/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var pE;function gL(){return pE||(pE=1,function(r){const e=dL(),a=mL(),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=m,r.SlowBuffer=B,r.INSPECT_MAX_BYTES=50;const s=2147483647;r.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 U=new Uint8Array(1),C={foo:function(){return 42}};return Object.setPrototypeOf(C,Uint8Array.prototype),Object.setPrototypeOf(U,C),U.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(U){if(U>s)throw new RangeError('The value "'+U+'" is invalid for option "size"');const C=new Uint8Array(U);return Object.setPrototypeOf(C,m.prototype),C}function m(U,C,N){if(typeof U=="number"){if(typeof C=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(U)}return f(U,C,N)}m.poolSize=8192;function f(U,C,N){if(typeof U=="string")return w(U,C);if(ArrayBuffer.isView(U))return x(U);if(U==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U);if(ut(U,ArrayBuffer)||U&&ut(U.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ut(U,SharedArrayBuffer)||U&&ut(U.buffer,SharedArrayBuffer)))return T(U,C,N);if(typeof U=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const z=U.valueOf&&U.valueOf();if(z!=null&&z!==U)return m.from(z,C,N);const ae=S(U);if(ae)return ae;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof U[Symbol.toPrimitive]=="function")return m.from(U[Symbol.toPrimitive]("string"),C,N);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U)}m.from=function(U,C,N){return f(U,C,N)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array);function g(U){if(typeof U!="number")throw new TypeError('"size" argument must be of type number');if(U<0)throw new RangeError('The value "'+U+'" is invalid for option "size"')}function E(U,C,N){return g(U),U<=0?d(U):C!==void 0?typeof N=="string"?d(U).fill(C,N):d(U).fill(C):d(U)}m.alloc=function(U,C,N){return E(U,C,N)};function p(U){return g(U),d(U<0?0:k(U)|0)}m.allocUnsafe=function(U){return p(U)},m.allocUnsafeSlow=function(U){return p(U)};function w(U,C){if((typeof C!="string"||C==="")&&(C="utf8"),!m.isEncoding(C))throw new TypeError("Unknown encoding: "+C);const N=L(U,C)|0;let z=d(N);const ae=z.write(U,C);return ae!==N&&(z=z.slice(0,ae)),z}function v(U){const C=U.length<0?0:k(U.length)|0,N=d(C);for(let z=0;z<C;z+=1)N[z]=U[z]&255;return N}function x(U){if(ut(U,Uint8Array)){const C=new Uint8Array(U);return T(C.buffer,C.byteOffset,C.byteLength)}return v(U)}function T(U,C,N){if(C<0||U.byteLength<C)throw new RangeError('"offset" is outside of buffer bounds');if(U.byteLength<C+(N||0))throw new RangeError('"length" is outside of buffer bounds');let z;return C===void 0&&N===void 0?z=new Uint8Array(U):N===void 0?z=new Uint8Array(U,C):z=new Uint8Array(U,C,N),Object.setPrototypeOf(z,m.prototype),z}function S(U){if(m.isBuffer(U)){const C=k(U.length)|0,N=d(C);return N.length===0||U.copy(N,0,0,C),N}if(U.length!==void 0)return typeof U.length!="number"||Mt(U.length)?d(0):v(U);if(U.type==="Buffer"&&Array.isArray(U.data))return v(U.data)}function k(U){if(U>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return U|0}function B(U){return+U!=U&&(U=0),m.alloc(+U)}m.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==m.prototype},m.compare=function(C,N){if(ut(C,Uint8Array)&&(C=m.from(C,C.offset,C.byteLength)),ut(N,Uint8Array)&&(N=m.from(N,N.offset,N.byteLength)),!m.isBuffer(C)||!m.isBuffer(N))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===N)return 0;let z=C.length,ae=N.length;for(let he=0,be=Math.min(z,ae);he<be;++he)if(C[he]!==N[he]){z=C[he],ae=N[he];break}return z<ae?-1:ae<z?1:0},m.isEncoding=function(C){switch(String(C).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(C,N){if(!Array.isArray(C))throw new TypeError('"list" argument must be an Array of Buffers');if(C.length===0)return m.alloc(0);let z;if(N===void 0)for(N=0,z=0;z<C.length;++z)N+=C[z].length;const ae=m.allocUnsafe(N);let he=0;for(z=0;z<C.length;++z){let be=C[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 L(U,C){if(m.isBuffer(U))return U.length;if(ArrayBuffer.isView(U)||ut(U,ArrayBuffer))return U.byteLength;if(typeof U!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof U);const N=U.length,z=arguments.length>2&&arguments[2]===!0;if(!z&&N===0)return 0;let ae=!1;for(;;)switch(C){case"ascii":case"latin1":case"binary":return N;case"utf8":case"utf-8":return se(U).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N*2;case"hex":return N>>>1;case"base64":return Ve(U).length;default:if(ae)return z?-1:se(U).length;C=(""+C).toLowerCase(),ae=!0}}m.byteLength=L;function P(U,C,N){let z=!1;if((C===void 0||C<0)&&(C=0),C>this.length||((N===void 0||N>this.length)&&(N=this.length),N<=0)||(N>>>=0,C>>>=0,N<=C))return"";for(U||(U="utf8");;)switch(U){case"hex":return ye(this,C,N);case"utf8":case"utf-8":return re(this,C,N);case"ascii":return ie(this,C,N);case"latin1":case"binary":return ce(this,C,N);case"base64":return J(this,C,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,C,N);default:if(z)throw new TypeError("Unknown encoding: "+U);U=(U+"").toLowerCase(),z=!0}}m.prototype._isBuffer=!0;function _(U,C,N){const z=U[C];U[C]=U[N],U[N]=z}m.prototype.swap16=function(){const C=this.length;if(C%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let N=0;N<C;N+=2)_(this,N,N+1);return this},m.prototype.swap32=function(){const C=this.length;if(C%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let N=0;N<C;N+=4)_(this,N,N+3),_(this,N+1,N+2);return this},m.prototype.swap64=function(){const C=this.length;if(C%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let N=0;N<C;N+=8)_(this,N,N+7),_(this,N+1,N+6),_(this,N+2,N+5),_(this,N+3,N+4);return this},m.prototype.toString=function(){const C=this.length;return C===0?"":arguments.length===0?re(this,0,C):P.apply(this,arguments)},m.prototype.toLocaleString=m.prototype.toString,m.prototype.equals=function(C){if(!m.isBuffer(C))throw new TypeError("Argument must be a Buffer");return this===C?!0:m.compare(this,C)===0},m.prototype.inspect=function(){let C="";const N=r.INSPECT_MAX_BYTES;return C=this.toString("hex",0,N).replace(/(.{2})/g,"$1 ").trim(),this.length>N&&(C+=" ... "),"<Buffer "+C+">"},i&&(m.prototype[i]=m.prototype.inspect),m.prototype.compare=function(C,N,z,ae,he){if(ut(C,Uint8Array)&&(C=m.from(C,C.offset,C.byteLength)),!m.isBuffer(C))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof C);if(N===void 0&&(N=0),z===void 0&&(z=C?C.length:0),ae===void 0&&(ae=0),he===void 0&&(he=this.length),N<0||z>C.length||ae<0||he>this.length)throw new RangeError("out of range index");if(ae>=he&&N>=z)return 0;if(ae>=he)return-1;if(N>=z)return 1;if(N>>>=0,z>>>=0,ae>>>=0,he>>>=0,this===C)return 0;let be=he-ae,Ue=z-N;const ft=Math.min(be,Ue),Et=this.slice(ae,he),St=C.slice(N,z);for(let dt=0;dt<ft;++dt)if(Et[dt]!==St[dt]){be=Et[dt],Ue=St[dt];break}return be<Ue?-1:Ue<be?1:0};function j(U,C,N,z,ae){if(U.length===0)return-1;if(typeof N=="string"?(z=N,N=0):N>2147483647?N=2147483647:N<-2147483648&&(N=-2147483648),N=+N,Mt(N)&&(N=ae?0:U.length-1),N<0&&(N=U.length+N),N>=U.length){if(ae)return-1;N=U.length-1}else if(N<0)if(ae)N=0;else return-1;if(typeof C=="string"&&(C=m.from(C,z)),m.isBuffer(C))return C.length===0?-1:V(U,C,N,z,ae);if(typeof C=="number")return C=C&255,typeof Uint8Array.prototype.indexOf=="function"?ae?Uint8Array.prototype.indexOf.call(U,C,N):Uint8Array.prototype.lastIndexOf.call(U,C,N):V(U,[C],N,z,ae);throw new TypeError("val must be string, number or Buffer")}function V(U,C,N,z,ae){let he=1,be=U.length,Ue=C.length;if(z!==void 0&&(z=String(z).toLowerCase(),z==="ucs2"||z==="ucs-2"||z==="utf16le"||z==="utf-16le")){if(U.length<2||C.length<2)return-1;he=2,be/=2,Ue/=2,N/=2}function ft(St,dt){return he===1?St[dt]:St.readUInt16BE(dt*he)}let Et;if(ae){let St=-1;for(Et=N;Et<be;Et++)if(ft(U,Et)===ft(C,St===-1?0:Et-St)){if(St===-1&&(St=Et),Et-St+1===Ue)return St*he}else St!==-1&&(Et-=Et-St),St=-1}else for(N+Ue>be&&(N=be-Ue),Et=N;Et>=0;Et--){let St=!0;for(let dt=0;dt<Ue;dt++)if(ft(U,Et+dt)!==ft(C,dt)){St=!1;break}if(St)return Et}return-1}m.prototype.includes=function(C,N,z){return this.indexOf(C,N,z)!==-1},m.prototype.indexOf=function(C,N,z){return j(this,C,N,z,!0)},m.prototype.lastIndexOf=function(C,N,z){return j(this,C,N,z,!1)};function H(U,C,N,z){N=Number(N)||0;const ae=U.length-N;z?(z=Number(z),z>ae&&(z=ae)):z=ae;const he=C.length;z>he/2&&(z=he/2);let be;for(be=0;be<z;++be){const Ue=parseInt(C.substr(be*2,2),16);if(Mt(Ue))return be;U[N+be]=Ue}return be}function Q(U,C,N,z){return Ye(se(C,U.length-N),U,N,z)}function G(U,C,N,z){return Ye(De(C),U,N,z)}function K(U,C,N,z){return Ye(Ve(C),U,N,z)}function $(U,C,N,z){return Ye(je(C,U.length-N),U,N,z)}m.prototype.write=function(C,N,z,ae){if(N===void 0)ae="utf8",z=this.length,N=0;else if(z===void 0&&typeof N=="string")ae=N,z=this.length,N=0;else if(isFinite(N))N=N>>>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-N;if((z===void 0||z>he)&&(z=he),C.length>0&&(z<0||N<0)||N>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,C,N,z);case"utf8":case"utf-8":return Q(this,C,N,z);case"ascii":case"latin1":case"binary":return G(this,C,N,z);case"base64":return K(this,C,N,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,C,N,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(U,C,N){return C===0&&N===U.length?e.fromByteArray(U):e.fromByteArray(U.slice(C,N))}function re(U,C,N){N=Math.min(U.length,N);const z=[];let ae=C;for(;ae<N;){const he=U[ae];let be=null,Ue=he>239?4:he>223?3:he>191?2:1;if(ae+Ue<=N){let ft,Et,St,dt;switch(Ue){case 1:he<128&&(be=he);break;case 2:ft=U[ae+1],(ft&192)===128&&(dt=(he&31)<<6|ft&63,dt>127&&(be=dt));break;case 3:ft=U[ae+1],Et=U[ae+2],(ft&192)===128&&(Et&192)===128&&(dt=(he&15)<<12|(ft&63)<<6|Et&63,dt>2047&&(dt<55296||dt>57343)&&(be=dt));break;case 4:ft=U[ae+1],Et=U[ae+2],St=U[ae+3],(ft&192)===128&&(Et&192)===128&&(St&192)===128&&(dt=(he&15)<<18|(ft&63)<<12|(Et&63)<<6|St&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(U){const C=U.length;if(C<=Ae)return String.fromCharCode.apply(String,U);let N="",z=0;for(;z<C;)N+=String.fromCharCode.apply(String,U.slice(z,z+=Ae));return N}function ie(U,C,N){let z="";N=Math.min(U.length,N);for(let ae=C;ae<N;++ae)z+=String.fromCharCode(U[ae]&127);return z}function ce(U,C,N){let z="";N=Math.min(U.length,N);for(let ae=C;ae<N;++ae)z+=String.fromCharCode(U[ae]);return z}function ye(U,C,N){const z=U.length;(!C||C<0)&&(C=0),(!N||N<0||N>z)&&(N=z);let ae="";for(let he=C;he<N;++he)ae+=Pt[U[he]];return ae}function M(U,C,N){const z=U.slice(C,N);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(C,N){const z=this.length;C=~~C,N=N===void 0?z:~~N,C<0?(C+=z,C<0&&(C=0)):C>z&&(C=z),N<0?(N+=z,N<0&&(N=0)):N>z&&(N=z),N<C&&(N=C);const ae=this.subarray(C,N);return Object.setPrototypeOf(ae,m.prototype),ae};function q(U,C,N){if(U%1!==0||U<0)throw new RangeError("offset is not uint");if(U+C>N)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(C,N,z){C=C>>>0,N=N>>>0,z||q(C,N,this.length);let ae=this[C],he=1,be=0;for(;++be<N&&(he*=256);)ae+=this[C+be]*he;return ae},m.prototype.readUintBE=m.prototype.readUIntBE=function(C,N,z){C=C>>>0,N=N>>>0,z||q(C,N,this.length);let ae=this[C+--N],he=1;for(;N>0&&(he*=256);)ae+=this[C+--N]*he;return ae},m.prototype.readUint8=m.prototype.readUInt8=function(C,N){return C=C>>>0,N||q(C,1,this.length),this[C]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(C,N){return C=C>>>0,N||q(C,2,this.length),this[C]|this[C+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(C,N){return C=C>>>0,N||q(C,2,this.length),this[C]<<8|this[C+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(C,N){return C=C>>>0,N||q(C,4,this.length),(this[C]|this[C+1]<<8|this[C+2]<<16)+this[C+3]*16777216},m.prototype.readUint32BE=m.prototype.readUInt32BE=function(C,N){return C=C>>>0,N||q(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},m.prototype.readBigUInt64LE=Gt(function(C){C=C>>>0,et(C,"offset");const N=this[C],z=this[C+7];(N===void 0||z===void 0)&&nt(C,this.length-8);const ae=N+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24,he=this[++C]+this[++C]*2**8+this[++C]*2**16+z*2**24;return BigInt(ae)+(BigInt(he)<<BigInt(32))}),m.prototype.readBigUInt64BE=Gt(function(C){C=C>>>0,et(C,"offset");const N=this[C],z=this[C+7];(N===void 0||z===void 0)&&nt(C,this.length-8);const ae=N*2**24+this[++C]*2**16+this[++C]*2**8+this[++C],he=this[++C]*2**24+this[++C]*2**16+this[++C]*2**8+z;return(BigInt(ae)<<BigInt(32))+BigInt(he)}),m.prototype.readIntLE=function(C,N,z){C=C>>>0,N=N>>>0,z||q(C,N,this.length);let ae=this[C],he=1,be=0;for(;++be<N&&(he*=256);)ae+=this[C+be]*he;return he*=128,ae>=he&&(ae-=Math.pow(2,8*N)),ae},m.prototype.readIntBE=function(C,N,z){C=C>>>0,N=N>>>0,z||q(C,N,this.length);let ae=N,he=1,be=this[C+--ae];for(;ae>0&&(he*=256);)be+=this[C+--ae]*he;return he*=128,be>=he&&(be-=Math.pow(2,8*N)),be},m.prototype.readInt8=function(C,N){return C=C>>>0,N||q(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},m.prototype.readInt16LE=function(C,N){C=C>>>0,N||q(C,2,this.length);const z=this[C]|this[C+1]<<8;return z&32768?z|4294901760:z},m.prototype.readInt16BE=function(C,N){C=C>>>0,N||q(C,2,this.length);const z=this[C+1]|this[C]<<8;return z&32768?z|4294901760:z},m.prototype.readInt32LE=function(C,N){return C=C>>>0,N||q(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},m.prototype.readInt32BE=function(C,N){return C=C>>>0,N||q(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},m.prototype.readBigInt64LE=Gt(function(C){C=C>>>0,et(C,"offset");const N=this[C],z=this[C+7];(N===void 0||z===void 0)&&nt(C,this.length-8);const ae=this[C+4]+this[C+5]*2**8+this[C+6]*2**16+(z<<24);return(BigInt(ae)<<BigInt(32))+BigInt(N+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24)}),m.prototype.readBigInt64BE=Gt(function(C){C=C>>>0,et(C,"offset");const N=this[C],z=this[C+7];(N===void 0||z===void 0)&&nt(C,this.length-8);const ae=(N<<24)+this[++C]*2**16+this[++C]*2**8+this[++C];return(BigInt(ae)<<BigInt(32))+BigInt(this[++C]*2**24+this[++C]*2**16+this[++C]*2**8+z)}),m.prototype.readFloatLE=function(C,N){return C=C>>>0,N||q(C,4,this.length),a.read(this,C,!0,23,4)},m.prototype.readFloatBE=function(C,N){return C=C>>>0,N||q(C,4,this.length),a.read(this,C,!1,23,4)},m.prototype.readDoubleLE=function(C,N){return C=C>>>0,N||q(C,8,this.length),a.read(this,C,!0,52,8)},m.prototype.readDoubleBE=function(C,N){return C=C>>>0,N||q(C,8,this.length),a.read(this,C,!1,52,8)};function ee(U,C,N,z,ae,he){if(!m.isBuffer(U))throw new TypeError('"buffer" argument must be a Buffer instance');if(C>ae||C<he)throw new RangeError('"value" argument is out of bounds');if(N+z>U.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(C,N,z,ae){if(C=+C,N=N>>>0,z=z>>>0,!ae){const Ue=Math.pow(2,8*z)-1;ee(this,C,N,z,Ue,0)}let he=1,be=0;for(this[N]=C&255;++be<z&&(he*=256);)this[N+be]=C/he&255;return N+z},m.prototype.writeUintBE=m.prototype.writeUIntBE=function(C,N,z,ae){if(C=+C,N=N>>>0,z=z>>>0,!ae){const Ue=Math.pow(2,8*z)-1;ee(this,C,N,z,Ue,0)}let he=z-1,be=1;for(this[N+he]=C&255;--he>=0&&(be*=256);)this[N+he]=C/be&255;return N+z},m.prototype.writeUint8=m.prototype.writeUInt8=function(C,N,z){return C=+C,N=N>>>0,z||ee(this,C,N,1,255,0),this[N]=C&255,N+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(C,N,z){return C=+C,N=N>>>0,z||ee(this,C,N,2,65535,0),this[N]=C&255,this[N+1]=C>>>8,N+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(C,N,z){return C=+C,N=N>>>0,z||ee(this,C,N,2,65535,0),this[N]=C>>>8,this[N+1]=C&255,N+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(C,N,z){return C=+C,N=N>>>0,z||ee(this,C,N,4,4294967295,0),this[N+3]=C>>>24,this[N+2]=C>>>16,this[N+1]=C>>>8,this[N]=C&255,N+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(C,N,z){return C=+C,N=N>>>0,z||ee(this,C,N,4,4294967295,0),this[N]=C>>>24,this[N+1]=C>>>16,this[N+2]=C>>>8,this[N+3]=C&255,N+4};function ne(U,C,N,z,ae){_t(C,z,ae,U,N,7);let he=Number(C&BigInt(4294967295));U[N++]=he,he=he>>8,U[N++]=he,he=he>>8,U[N++]=he,he=he>>8,U[N++]=he;let be=Number(C>>BigInt(32)&BigInt(4294967295));return U[N++]=be,be=be>>8,U[N++]=be,be=be>>8,U[N++]=be,be=be>>8,U[N++]=be,N}function Ie(U,C,N,z,ae){_t(C,z,ae,U,N,7);let he=Number(C&BigInt(4294967295));U[N+7]=he,he=he>>8,U[N+6]=he,he=he>>8,U[N+5]=he,he=he>>8,U[N+4]=he;let be=Number(C>>BigInt(32)&BigInt(4294967295));return U[N+3]=be,be=be>>8,U[N+2]=be,be=be>>8,U[N+1]=be,be=be>>8,U[N]=be,N+8}m.prototype.writeBigUInt64LE=Gt(function(C,N=0){return ne(this,C,N,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeBigUInt64BE=Gt(function(C,N=0){return Ie(this,C,N,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeIntLE=function(C,N,z,ae){if(C=+C,N=N>>>0,!ae){const ft=Math.pow(2,8*z-1);ee(this,C,N,z,ft-1,-ft)}let he=0,be=1,Ue=0;for(this[N]=C&255;++he<z&&(be*=256);)C<0&&Ue===0&&this[N+he-1]!==0&&(Ue=1),this[N+he]=(C/be>>0)-Ue&255;return N+z},m.prototype.writeIntBE=function(C,N,z,ae){if(C=+C,N=N>>>0,!ae){const ft=Math.pow(2,8*z-1);ee(this,C,N,z,ft-1,-ft)}let he=z-1,be=1,Ue=0;for(this[N+he]=C&255;--he>=0&&(be*=256);)C<0&&Ue===0&&this[N+he+1]!==0&&(Ue=1),this[N+he]=(C/be>>0)-Ue&255;return N+z},m.prototype.writeInt8=function(C,N,z){return C=+C,N=N>>>0,z||ee(this,C,N,1,127,-128),C<0&&(C=255+C+1),this[N]=C&255,N+1},m.prototype.writeInt16LE=function(C,N,z){return C=+C,N=N>>>0,z||ee(this,C,N,2,32767,-32768),this[N]=C&255,this[N+1]=C>>>8,N+2},m.prototype.writeInt16BE=function(C,N,z){return C=+C,N=N>>>0,z||ee(this,C,N,2,32767,-32768),this[N]=C>>>8,this[N+1]=C&255,N+2},m.prototype.writeInt32LE=function(C,N,z){return C=+C,N=N>>>0,z||ee(this,C,N,4,2147483647,-2147483648),this[N]=C&255,this[N+1]=C>>>8,this[N+2]=C>>>16,this[N+3]=C>>>24,N+4},m.prototype.writeInt32BE=function(C,N,z){return C=+C,N=N>>>0,z||ee(this,C,N,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[N]=C>>>24,this[N+1]=C>>>16,this[N+2]=C>>>8,this[N+3]=C&255,N+4},m.prototype.writeBigInt64LE=Gt(function(C,N=0){return ne(this,C,N,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),m.prototype.writeBigInt64BE=Gt(function(C,N=0){return Ie(this,C,N,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function we(U,C,N,z,ae,he){if(N+z>U.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("Index out of range")}function Re(U,C,N,z,ae){return C=+C,N=N>>>0,ae||we(U,C,N,4),a.write(U,C,N,z,23,4),N+4}m.prototype.writeFloatLE=function(C,N,z){return Re(this,C,N,!0,z)},m.prototype.writeFloatBE=function(C,N,z){return Re(this,C,N,!1,z)};function Be(U,C,N,z,ae){return C=+C,N=N>>>0,ae||we(U,C,N,8),a.write(U,C,N,z,52,8),N+8}m.prototype.writeDoubleLE=function(C,N,z){return Be(this,C,N,!0,z)},m.prototype.writeDoubleBE=function(C,N,z){return Be(this,C,N,!1,z)},m.prototype.copy=function(C,N,z,ae){if(!m.isBuffer(C))throw new TypeError("argument should be a Buffer");if(z||(z=0),!ae&&ae!==0&&(ae=this.length),N>=C.length&&(N=C.length),N||(N=0),ae>0&&ae<z&&(ae=z),ae===z||C.length===0||this.length===0)return 0;if(N<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),C.length-N<ae-z&&(ae=C.length-N+z);const he=ae-z;return this===C&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(N,z,ae):Uint8Array.prototype.set.call(C,this.subarray(z,ae),N),he},m.prototype.fill=function(C,N,z,ae){if(typeof C=="string"){if(typeof N=="string"?(ae=N,N=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(C.length===1){const be=C.charCodeAt(0);(ae==="utf8"&&be<128||ae==="latin1")&&(C=be)}}else typeof C=="number"?C=C&255:typeof C=="boolean"&&(C=Number(C));if(N<0||this.length<N||this.length<z)throw new RangeError("Out of range index");if(z<=N)return this;N=N>>>0,z=z===void 0?this.length:z>>>0,C||(C=0);let he;if(typeof C=="number")for(he=N;he<z;++he)this[he]=C;else{const be=m.isBuffer(C)?C:m.from(C,ae),Ue=be.length;if(Ue===0)throw new TypeError('The value "'+C+'" is invalid for argument "value"');for(he=0;he<z-N;++he)this[he+N]=be[he%Ue]}return this};const ke={};function Qe(U,C,N){ke[U]=class extends N{constructor(){super(),Object.defineProperty(this,"message",{value:C.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${U}]`,this.stack,delete this.name}get code(){return U}set code(ae){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ae,writable:!0})}toString(){return`${this.name} [${U}]: ${this.message}`}}}Qe("ERR_BUFFER_OUT_OF_BOUNDS",function(U){return U?`${U} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Qe("ERR_INVALID_ARG_TYPE",function(U,C){return`The "${U}" argument must be of type number. Received type ${typeof C}`},TypeError),Qe("ERR_OUT_OF_RANGE",function(U,C,N){let z=`The value of "${U}" is out of range.`,ae=N;return Number.isInteger(N)&&Math.abs(N)>2**32?ae=pt(String(N)):typeof N=="bigint"&&(ae=String(N),(N>BigInt(2)**BigInt(32)||N<-(BigInt(2)**BigInt(32)))&&(ae=pt(ae)),ae+="n"),z+=` It must be ${C}. Received ${ae}`,z},RangeError);function pt(U){let C="",N=U.length;const z=U[0]==="-"?1:0;for(;N>=z+4;N-=3)C=`_${U.slice(N-3,N)}${C}`;return`${U.slice(0,N)}${C}`}function Dt(U,C,N){et(C,"offset"),(U[C]===void 0||U[C+N]===void 0)&&nt(C,U.length-(N+1))}function _t(U,C,N,z,ae,he){if(U>N||U<C){const be=typeof C=="bigint"?"n":"";let Ue;throw C===0||C===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 ke.ERR_OUT_OF_RANGE("value",Ue,U)}Dt(z,ae,he)}function et(U,C){if(typeof U!="number")throw new ke.ERR_INVALID_ARG_TYPE(C,"number",U)}function nt(U,C,N){throw Math.floor(U)!==U?(et(U,N),new ke.ERR_OUT_OF_RANGE("offset","an integer",U)):C<0?new ke.ERR_BUFFER_OUT_OF_BOUNDS:new ke.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${C}`,U)}const Ht=/[^+/0-9A-Za-z-_]/g;function Ce(U){if(U=U.split("=")[0],U=U.trim().replace(Ht,""),U.length<2)return"";for(;U.length%4!==0;)U=U+"=";return U}function se(U,C){C=C||1/0;let N;const z=U.length;let ae=null;const he=[];for(let be=0;be<z;++be){if(N=U.charCodeAt(be),N>55295&&N<57344){if(!ae){if(N>56319){(C-=3)>-1&&he.push(239,191,189);continue}else if(be+1===z){(C-=3)>-1&&he.push(239,191,189);continue}ae=N;continue}if(N<56320){(C-=3)>-1&&he.push(239,191,189),ae=N;continue}N=(ae-55296<<10|N-56320)+65536}else ae&&(C-=3)>-1&&he.push(239,191,189);if(ae=null,N<128){if((C-=1)<0)break;he.push(N)}else if(N<2048){if((C-=2)<0)break;he.push(N>>6|192,N&63|128)}else if(N<65536){if((C-=3)<0)break;he.push(N>>12|224,N>>6&63|128,N&63|128)}else if(N<1114112){if((C-=4)<0)break;he.push(N>>18|240,N>>12&63|128,N>>6&63|128,N&63|128)}else throw new Error("Invalid code point")}return he}function De(U){const C=[];for(let N=0;N<U.length;++N)C.push(U.charCodeAt(N)&255);return C}function je(U,C){let N,z,ae;const he=[];for(let be=0;be<U.length&&!((C-=2)<0);++be)N=U.charCodeAt(be),z=N>>8,ae=N%256,he.push(ae),he.push(z);return he}function Ve(U){return e.toByteArray(Ce(U))}function Ye(U,C,N,z){let ae;for(ae=0;ae<z&&!(ae+N>=C.length||ae>=U.length);++ae)C[ae+N]=U[ae];return ae}function ut(U,C){return U instanceof C||U!=null&&U.constructor!=null&&U.constructor.name!=null&&U.constructor.name===C.name}function Mt(U){return U!==U}const Pt=function(){const U="0123456789abcdef",C=new Array(256);for(let N=0;N<16;++N){const z=N*16;for(let ae=0;ae<16;++ae)C[z+ae]=U[N]+U[ae]}return C}();function Gt(U){return typeof BigInt>"u"?ia:U}function ia(){throw new Error("BigInt not supported")}}(pf)),pf}var Ao=gL();class jt{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 Wb.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 jt.decryptWithPrivateKey(e.encryptedSymmetricKey,i.PrivateKey),c=Ao.Buffer.from(s).toString("base64"),d={...e};return d.subject=await jt.symmetricDecrypt(e.subject,c),d.fromDisplay=await jt.symmetricDecrypt(e.fromDisplay,c),d.fromDomain=await jt.symmetricDecrypt(e.fromDomain,c),d.fromLocal=await jt.symmetricDecrypt(e.fromLocal,c),e.messageHtml&&(d.messageHtml=await jt.symmetricDecrypt(e.messageHtml,c)),e.messagePlain&&(d.messagePlain=await jt.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 jt.decryptWithPrivateKey(i.encryptedSymmetricKey,s.PrivateKey),d=Ao.Buffer.from(c).toString("base64"),m={...i};return m.subject=await jt.symmetricDecrypt(i.subject,d),m.fromDisplay=await jt.symmetricDecrypt(i.fromDisplay,d),m.fromDomain=await jt.symmetricDecrypt(i.fromDomain,d),m.fromLocal=await jt.symmetricDecrypt(i.fromLocal,d),i.messagePreview&&(m.messagePreview=await jt.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 jt.decryptWithPrivateKey(a.encryptedSymmetricKey,s.PrivateKey),d=Ao.Buffer.from(c).toString("base64");return await jt.symmetricDecryptBytes(e,d)}catch(s){throw new Error(s instanceof Error?s.message:"Failed to decrypt attachment")}}}class fL{constructor(e){ze(this,"webApi");ze(this,"pollingInterval",null);ze(this,"requestId",null);ze(this,"privateKey",null);this.webApi=e}async initiate(){try{const e=await jt.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 On.GENERIC;const i=await a.json();return this.requestId=i.requestId,this.requestId}catch(e){throw typeof e=="string"&&Object.values(On).includes(e)?e:On.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(On.TIMEOUT);return}throw new Error(`Polling failed: ${s.status}`)}const c=await s.json();if(c.fulfilled&&c.encryptedSymmetricKey){this.stopPolling();const d=await jt.decryptWithPrivateKey(c.encryptedDecryptionKey,this.privateKey),m=Ao.Buffer.from(d).toString("base64"),f=await jt.decryptWithPrivateKey(c.encryptedSymmetricKey,this.privateKey),g=Ao.Buffer.from(f).toString("base64"),E=await jt.symmetricDecrypt(c.encryptedToken,g),p=await jt.symmetricDecrypt(c.encryptedRefreshToken,g),w=await jt.symmetricDecrypt(c.encryptedUsername,g);this.privateKey=null,this.requestId=null;const v=await this.webApi.rawFetch("auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:w})});if(!v.ok){a(On.GENERIC);return}const x=await v.json(),T={username:w,token:E,refreshToken:p,decryptionKey:m,salt:x.salt,encryptionType:x.encryptionType,encryptionSettings:x.encryptionSettings};e(T)}}catch{this.stopPolling(),this.privateKey=null,this.requestId=null,a(On.GENERIC)}};this.pollingInterval=setInterval(i,3e3),setTimeout(()=>{this.pollingInterval&&(this.stopPolling(),this.privateKey=null,this.requestId=null,a(On.TIMEOUT))},21e4)}stopPolling(){this.pollingInterval&&(clearInterval(this.pollingInterval),this.pollingInterval=null)}cleanup(){this.stopPolling(),this.privateKey=null,this.requestId=null}}const bI=({isOpen:r,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),w=I.useRef(null),v=I.useRef(null),x=L=>{switch(L){case On.TIMEOUT:return c("auth.errors.mobileLoginRequestExpired");case On.GENERIC:default:return c("common.errors.unknownError")}};I.useEffect(()=>{if(d&&E>0&&r)return v.current=setInterval(()=>{p(L=>L<=1?(v.current&&clearInterval(v.current),0):L-1)},1e3),()=>{v.current&&clearInterval(v.current)}},[d,E,r]),I.useEffect(()=>r?((async()=>{try{g(null),m(null),p(120),w.current||(w.current=new fL(i));const _=`aliasvault://open/mobile-unlock/${await w.current.initiate()}`,j=await uL.toDataURL(_,{width:256,margin:2});m(j),await w.current.startPolling(async V=>{try{await a(V),T()}catch{m(null),g(On.GENERIC)}},V=>{m(null),g(V)})}catch(P){typeof P=="string"&&Object.values(On).includes(P)?g(P):g(On.GENERIC)}})(),()=>{w.current&&w.current.cleanup(),v.current&&clearInterval(v.current)}):void 0,[r]);const T=()=>{w.current&&w.current.cleanup(),v.current&&clearInterval(v.current),m(null),g(null),p(120),e()},S=L=>{const P=Math.floor(L/60),_=L%60;return`${P}:${_.toString().padStart(2,"0")}`},k=c(s==="unlock"?"auth.unlockWithMobile":"auth.loginWithMobile"),B=c("auth.scanQrCode");return l.jsxs(tr,{isOpen:r,onClose:T,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:B}),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:S(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:T,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=(r=>(r.EXPAND="expand",r.EDIT="edit",r.DELETE="delete",r.SETTINGS="settings",r.RELOAD="reload",r.EXTERNAL_LINK="external_link",r.SAVE="save",r.PLUS="plus",r.TAB="tab",r.EYE="eye",r.EYE_OFF="eye_off",r))(Pa||{});const kh=({type:r,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"})})})[r]||null,Tn=({onClick:r,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:r,className:`p-2 rounded-lg ${c[i]}`,title:e,children:l.jsx(kh,{type:a})})},II=()=>{const[r,e]=I.useState(an.DEFAULT_API_URL);return{apiUrl:r,setApiUrl:e,loadApiUrl:async()=>{const s=await xe.getItem("local:apiUrl");s&&s.length>0?e(s):e(an.DEFAULT_API_URL)},getDisplayUrl:()=>{const s=r.replace("https://","").replace("http://","").replace(":443","").replace("/api","");return s==="app.aliasvault.net"?"aliasvault.net":s}}},hL=()=>{const{loadApiUrl:r,getDisplayUrl:e}=II(),a=Ba(),{t:i}=Ze();I.useEffect(()=>{r()},[r]);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 Pe;function xt(r){Ql===ii.length&&ii.push(ii.length+1);const e=Ql;return Ql=ii[e],ii[e]=r,e}function Zf(r){const e=typeof r;if(e=="number"||e=="boolean"||r==null)return`${r}`;if(e=="string")return`"${r}"`;if(e=="symbol"){const s=r.description;return s==null?"Symbol":`Symbol(${s})`}if(e=="function"){const s=r.name;return typeof s=="string"&&s.length>0?`Function(${s})`:"Function"}if(Array.isArray(r)){const s=r.length;let c="[";s>0&&(c+=Zf(r[0]));for(let d=1;d<s;d++)c+=", "+Zf(r[d]);return c+="]",c}const a=/\[object ([^\]]+)\]/.exec(toString.call(r));let i;if(a&&a.length>1)i=a[1];else return toString.call(r);if(i=="Object")try{return"Object("+JSON.stringify(r)+")"}catch{return"Object"}return r instanceof Error?`${r.name}: ${r.message}
${r.stack}`:i}function AL(r){r<132||(ii[r]=Ql,Ql=r)}function pL(r,e){r=r>>>0;const a=yt(),i=[];for(let s=r;s<r+4*e;s+=4)i.push(qa(a.getUint32(s,!0)));return i}function yE(r,e){return r=r>>>0,zl().subarray(r/1,r/1+e)}let As=null;function yt(){return(As===null||As.buffer.detached===!0||As.buffer.detached===void 0&&As.buffer!==Pe.memory.buffer)&&(As=new DataView(Pe.memory.buffer)),As}function kr(r,e){return r=r>>>0,EL(r,e)}let Ol=null;function zl(){return(Ol===null||Ol.byteLength===0)&&(Ol=new Uint8Array(Pe.memory.buffer)),Ol}function $e(r){return ii[r]}function hs(r,e){try{return r.apply(this,e)}catch(a){Pe.__wbindgen_export3(xt(a))}}let ii=new Array(128).fill(void 0);ii.push(void 0,null,!0,!1);let Ql=ii.length;function wr(r){return r==null}function hn(r,e,a){if(a===void 0){const m=Vl.encode(r),f=e(m.length,1)>>>0;return zl().subarray(f,f+m.length).set(m),nn=m.length,f}let i=r.length,s=e(i,1)>>>0;const c=zl();let d=0;for(;d<i;d++){const m=r.charCodeAt(d);if(m>127)break;c[s+d]=m}if(d!==i){d!==0&&(r=r.slice(d)),s=a(s,i,i=d+r.length*3,1)>>>0;const m=zl().subarray(s+d,s+i),f=Vl.encodeInto(r,m);d+=f.written,s=a(s,i,d,1)>>>0}return nn=d,s}function qa(r){const e=$e(r);return AL(r),e}let Ou=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Ou.decode();const yL=2146435072;let yf=0;function EL(r,e){return yf+=e,yf>=yL&&(Ou=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Ou.decode(),yf=e),Ou.decode(zl().subarray(r,r+e))}const Vl=new TextEncoder;"encodeInto"in Vl||(Vl.encodeInto=function(r,e){const a=Vl.encode(r);return e.set(a),{read:r.length,written:a.length}});let nn=0;function bL(r){let e,a;try{const c=Pe.__wbindgen_add_to_stack_pointer(-16),d=hn(r,Pe.__wbindgen_export,Pe.__wbindgen_export2),m=nn;Pe.extractDomain(c,d,m);var i=yt().getInt32(c+4*0,!0),s=yt().getInt32(c+4*1,!0);return e=i,a=s,kr(i,s)}finally{Pe.__wbindgen_add_to_stack_pointer(16),Pe.__wbindgen_export4(e,a,1)}}function IL(r){let e,a;try{const c=Pe.__wbindgen_add_to_stack_pointer(-16),d=hn(r,Pe.__wbindgen_export,Pe.__wbindgen_export2),m=nn;Pe.extractRootDomain(c,d,m);var i=yt().getInt32(c+4*0,!0),s=yt().getInt32(c+4*1,!0);return e=i,a=s,kr(i,s)}finally{Pe.__wbindgen_add_to_stack_pointer(16),Pe.__wbindgen_export4(e,a,1)}}function vL(r){try{const s=Pe.__wbindgen_add_to_stack_pointer(-16);Pe.filterCredentials(s,xt(r));var e=yt().getInt32(s+4*0,!0),a=yt().getInt32(s+4*1,!0),i=yt().getInt32(s+4*2,!0);if(i)throw qa(a);return qa(e)}finally{Pe.__wbindgen_add_to_stack_pointer(16)}}function CL(){try{const i=Pe.__wbindgen_add_to_stack_pointer(-16);Pe.getSyncableTableNames(i);var r=yt().getInt32(i+4*0,!0),e=yt().getInt32(i+4*1,!0),a=pL(r,e).slice();return Pe.__wbindgen_export4(r,e*4,4),a}finally{Pe.__wbindgen_add_to_stack_pointer(16)}}function wL(r){try{const s=Pe.__wbindgen_add_to_stack_pointer(-16);Pe.mergeVaults(s,xt(r));var e=yt().getInt32(s+4*0,!0),a=yt().getInt32(s+4*1,!0),i=yt().getInt32(s+4*2,!0);if(i)throw qa(a);return qa(e)}finally{Pe.__wbindgen_add_to_stack_pointer(16)}}function NL(r){try{const s=Pe.__wbindgen_add_to_stack_pointer(-16);Pe.pruneVault(s,xt(r));var e=yt().getInt32(s+4*0,!0),a=yt().getInt32(s+4*1,!0),i=yt().getInt32(s+4*2,!0);if(i)throw qa(a);return qa(e)}finally{Pe.__wbindgen_add_to_stack_pointer(16)}}function xL(r,e,a){let i,s;try{const p=Pe.__wbindgen_add_to_stack_pointer(-16),w=hn(r,Pe.__wbindgen_export,Pe.__wbindgen_export2),v=nn,x=hn(e,Pe.__wbindgen_export,Pe.__wbindgen_export2),T=nn,S=hn(a,Pe.__wbindgen_export,Pe.__wbindgen_export2),k=nn;Pe.srpDerivePrivateKey(p,w,v,x,T,S,k);var c=yt().getInt32(p+4*0,!0),d=yt().getInt32(p+4*1,!0),m=yt().getInt32(p+4*2,!0),f=yt().getInt32(p+4*3,!0),g=c,E=d;if(f)throw g=0,E=0,qa(m);return i=g,s=E,kr(g,E)}finally{Pe.__wbindgen_add_to_stack_pointer(16),Pe.__wbindgen_export4(i,s,1)}}function TL(r,e,a,i,s){try{const f=Pe.__wbindgen_add_to_stack_pointer(-16),g=hn(r,Pe.__wbindgen_export,Pe.__wbindgen_export2),E=nn,p=hn(e,Pe.__wbindgen_export,Pe.__wbindgen_export2),w=nn,v=hn(a,Pe.__wbindgen_export,Pe.__wbindgen_export2),x=nn,T=hn(i,Pe.__wbindgen_export,Pe.__wbindgen_export2),S=nn,k=hn(s,Pe.__wbindgen_export,Pe.__wbindgen_export2),B=nn;Pe.srpDeriveSession(f,g,E,p,w,v,x,T,S,k,B);var c=yt().getInt32(f+4*0,!0),d=yt().getInt32(f+4*1,!0),m=yt().getInt32(f+4*2,!0);if(m)throw qa(d);return qa(c)}finally{Pe.__wbindgen_add_to_stack_pointer(16)}}function SL(r){let e,a;try{const g=Pe.__wbindgen_add_to_stack_pointer(-16),E=hn(r,Pe.__wbindgen_export,Pe.__wbindgen_export2),p=nn;Pe.srpDeriveVerifier(g,E,p);var i=yt().getInt32(g+4*0,!0),s=yt().getInt32(g+4*1,!0),c=yt().getInt32(g+4*2,!0),d=yt().getInt32(g+4*3,!0),m=i,f=s;if(d)throw m=0,f=0,qa(c);return e=m,a=f,kr(m,f)}finally{Pe.__wbindgen_add_to_stack_pointer(16),Pe.__wbindgen_export4(e,a,1)}}function kL(){try{const i=Pe.__wbindgen_add_to_stack_pointer(-16);Pe.srpGenerateEphemeral(i);var r=yt().getInt32(i+4*0,!0),e=yt().getInt32(i+4*1,!0),a=yt().getInt32(i+4*2,!0);if(a)throw qa(e);return qa(r)}finally{Pe.__wbindgen_add_to_stack_pointer(16)}}function LL(){let r,e;try{const s=Pe.__wbindgen_add_to_stack_pointer(-16);Pe.srpGenerateSalt(s);var a=yt().getInt32(s+4*0,!0),i=yt().getInt32(s+4*1,!0);return r=a,e=i,kr(a,i)}finally{Pe.__wbindgen_add_to_stack_pointer(16),Pe.__wbindgen_export4(r,e,1)}}const RL=new Set(["basic","cors","default"]);async function DL(r,e){if(typeof Response=="function"&&r instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(r,e)}catch(i){if(r.ok&&RL.has(r.type)&&r.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 r.arrayBuffer();return await WebAssembly.instantiate(a,e)}else{const a=await WebAssembly.instantiate(r,e);return a instanceof WebAssembly.Instance?{instance:a,module:r}:a}}function BL(){const r={};return r.wbg={},r.wbg.__wbg_Error_52673b7de5a0ca89=function(e,a){const i=Error(kr(e,a));return xt(i)},r.wbg.__wbg_Number_2d1dcfcf4ec51736=function(e){return Number($e(e))},r.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,a){const i=String($e(a)),s=hn(i,Pe.__wbindgen_export,Pe.__wbindgen_export2),c=nn;yt().setInt32(e+4*1,c,!0),yt().setInt32(e+4*0,s,!0)},r.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d=function(e,a){const i=$e(a),s=typeof i=="bigint"?i:void 0;yt().setBigInt64(e+8*1,wr(s)?BigInt(0):s,!0),yt().setInt32(e+4*0,!wr(s),!0)},r.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b=function(e){const a=$e(e),i=typeof a=="boolean"?a:void 0;return wr(i)?16777215:i?1:0},r.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6=function(e,a){const i=Zf($e(a)),s=hn(i,Pe.__wbindgen_export,Pe.__wbindgen_export2),c=nn;yt().setInt32(e+4*1,c,!0),yt().setInt32(e+4*0,s,!0)},r.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317=function(e,a){return $e(e)in $e(a)},r.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27=function(e){return typeof $e(e)=="bigint"},r.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd=function(e){return typeof $e(e)=="function"},r.wbg.__wbg___wbindgen_is_object_ce774f3490692386=function(e){const a=$e(e);return typeof a=="object"&&a!==null},r.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030=function(e){return typeof $e(e)=="string"},r.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269=function(e){return $e(e)===void 0},r.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36=function(e,a){return $e(e)===$e(a)},r.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d=function(e,a){return $e(e)==$e(a)},r.wbg.__wbg___wbindgen_number_get_9619185a74197f95=function(e,a){const i=$e(a),s=typeof i=="number"?i:void 0;yt().setFloat64(e+8*1,wr(s)?0:s,!0),yt().setInt32(e+4*0,!wr(s),!0)},r.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42=function(e,a){const i=$e(a),s=typeof i=="string"?i:void 0;var c=wr(s)?0:hn(s,Pe.__wbindgen_export,Pe.__wbindgen_export2),d=nn;yt().setInt32(e+4*1,d,!0),yt().setInt32(e+4*0,c,!0)},r.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(e,a){throw new Error(kr(e,a))},r.wbg.__wbg_call_3020136f7a2d6e44=function(){return hs(function(e,a,i){const s=$e(e).call($e(a),$e(i));return xt(s)},arguments)},r.wbg.__wbg_call_abb4ff46ce38be40=function(){return hs(function(e,a){const i=$e(e).call($e(a));return xt(i)},arguments)},r.wbg.__wbg_crypto_86f2631e91b51511=function(e){const a=$e(e).crypto;return xt(a)},r.wbg.__wbg_done_62ea16af4ce34b24=function(e){return $e(e).done},r.wbg.__wbg_entries_83c79938054e065f=function(e){const a=Object.entries($e(e));return xt(a)},r.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,a){let i,s;try{i=e,s=a,console.error(kr(e,a))}finally{Pe.__wbindgen_export4(i,s,1)}},r.wbg.__wbg_getRandomValues_b3f15fcbfabb0f8b=function(){return hs(function(e,a){$e(e).getRandomValues($e(a))},arguments)},r.wbg.__wbg_get_6b7bd52aca3f9671=function(e,a){const i=$e(e)[a>>>0];return xt(i)},r.wbg.__wbg_get_af9dab7e9603ea93=function(){return hs(function(e,a){const i=Reflect.get($e(e),$e(a));return xt(i)},arguments)},r.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,a){const i=$e(e)[$e(a)];return xt(i)},r.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355=function(e){let a;try{a=$e(e)instanceof ArrayBuffer}catch{a=!1}return a},r.wbg.__wbg_instanceof_Map_084be8da74364158=function(e){let a;try{a=$e(e)instanceof Map}catch{a=!1}return a},r.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434=function(e){let a;try{a=$e(e)instanceof Uint8Array}catch{a=!1}return a},r.wbg.__wbg_isArray_51fd9e6422c0a395=function(e){return Array.isArray($e(e))},r.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16=function(e){return Number.isSafeInteger($e(e))},r.wbg.__wbg_iterator_27b7c8b35ab3e86b=function(){return xt(Symbol.iterator)},r.wbg.__wbg_length_22ac23eaec9d8053=function(e){return $e(e).length},r.wbg.__wbg_length_d45040a40c570362=function(e){return $e(e).length},r.wbg.__wbg_msCrypto_d562bbe83e0d4b91=function(e){const a=$e(e).msCrypto;return xt(a)},r.wbg.__wbg_new_1ba21ce319a06297=function(){const e=new Object;return xt(e)},r.wbg.__wbg_new_25f239778d6112b9=function(){const e=new Array;return xt(e)},r.wbg.__wbg_new_6421f6084cc5bc5a=function(e){const a=new Uint8Array($e(e));return xt(a)},r.wbg.__wbg_new_8a6f238a6ece86ea=function(){const e=new Error;return xt(e)},r.wbg.__wbg_new_b546ae120718850e=function(){return xt(new Map)},r.wbg.__wbg_new_no_args_cb138f77cf6151ee=function(e,a){const i=new Function(kr(e,a));return xt(i)},r.wbg.__wbg_new_with_length_aa5eaf41d35235e5=function(e){const a=new Uint8Array(e>>>0);return xt(a)},r.wbg.__wbg_next_138a17bbf04e926c=function(e){const a=$e(e).next;return xt(a)},r.wbg.__wbg_next_3cfe5c0fe2a4cc53=function(){return hs(function(e){const a=$e(e).next();return xt(a)},arguments)},r.wbg.__wbg_node_e1f24f89a7336c2e=function(e){const a=$e(e).node;return xt(a)},r.wbg.__wbg_process_3975fd6c72f520aa=function(e){const a=$e(e).process;return xt(a)},r.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd=function(e,a,i){Uint8Array.prototype.set.call(yE(e,a),$e(i))},r.wbg.__wbg_randomFillSync_f8c153b79f285817=function(){return hs(function(e,a){$e(e).randomFillSync(qa(a))},arguments)},r.wbg.__wbg_require_b74f47fc2d022fd6=function(){return hs(function(){const e=XI.require;return xt(e)},arguments)},r.wbg.__wbg_set_3f1d0b984ed272ed=function(e,a,i){$e(e)[qa(a)]=qa(i)},r.wbg.__wbg_set_7df433eea03a5c14=function(e,a,i){$e(e)[a>>>0]=qa(i)},r.wbg.__wbg_set_efaaf145b9377369=function(e,a,i){const s=$e(e).set($e(a),$e(i));return xt(s)},r.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,a){const i=$e(a).stack,s=hn(i,Pe.__wbindgen_export,Pe.__wbindgen_export2),c=nn;yt().setInt32(e+4*1,c,!0),yt().setInt32(e+4*0,s,!0)},r.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335=function(){const e=typeof global>"u"?null:global;return wr(e)?0:xt(e)},r.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1=function(){const e=typeof globalThis>"u"?null:globalThis;return wr(e)?0:xt(e)},r.wbg.__wbg_static_accessor_SELF_08f5a74c69739274=function(){const e=typeof self>"u"?null:self;return wr(e)?0:xt(e)},r.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024=function(){const e=typeof window>"u"?null:window;return wr(e)?0:xt(e)},r.wbg.__wbg_subarray_845f2f5bce7d061a=function(e,a,i){const s=$e(e).subarray(a>>>0,i>>>0);return xt(s)},r.wbg.__wbg_value_57b7b035e117f7ee=function(e){const a=$e(e).value;return xt(a)},r.wbg.__wbg_versions_4e31226f5e8dc909=function(e){const a=$e(e).versions;return xt(a)},r.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,a){const i=kr(e,a);return xt(i)},r.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(e){const a=BigInt.asUintN(64,e);return xt(a)},r.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return xt(e)},r.wbg.__wbindgen_cast_cb9088102bce6b30=function(e,a){const i=yE(e,a);return xt(i)},r.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return xt(e)},r.wbg.__wbindgen_object_clone_ref=function(e){const a=$e(e);return xt(a)},r.wbg.__wbindgen_object_drop_ref=function(e){qa(e)},r}function UL(r,e){return Pe=r.exports,ld.__wbindgen_wasm_module=e,As=null,Ol=null,Pe.__wbindgen_start(),Pe}async function ld(r){if(Pe!==void 0)return Pe;typeof r<"u"&&(Object.getPrototypeOf(r)===Object.prototype?{module_or_path:r}=r:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof r>"u"&&(r=new URL("aliasvault_core_bg.wasm",self.location.href));const e=BL();(typeof r=="string"||typeof Request=="function"&&r instanceof Request||typeof URL=="function"&&r instanceof URL)&&(r=fetch(r));const{instance:a,module:i}=await DL(await r,e);return UL(a,i)}const Iu={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=Cs.runtime.getURL("src/aliasvault_core_bg.wasm"),i=await(await fetch(e)).arrayBuffer();await ld({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(),LL()}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(),xL(e,Ra.normalizeUsername(a),i)}static async deriveVerifier(e){return await this.initWasm(),SL(e)}static async generateEphemeral(){return await this.initWasm(),kL()}static async deriveSession(e,a,i,s,c){return await this.initWasm(),TL(e,a,i,Ra.normalizeUsername(s),c)}static async prepareCredentials(e,a,i,s){const c=await jt.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,Iu.type,Iu.settings),m=await Ra.derivePrivateKey(s,c,d.passwordHashString),f=await Ra.deriveVerifier(m);return{username:i,salt:s,verifier:f,encryptionType:Iu.type,encryptionSettings:Iu.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 S=await m.text();try{return{success:!1,error:JSON.parse(S).title}}catch{return{success:!1,error:S||"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(),w=await Ra.derivePrivateKey(f.salt,g,E.passwordHashString),v=await Ra.deriveSession(p.secret,f.serverEphemeral,f.salt,g,w),x=await fetch(`${c}Auth/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:d,rememberMe:s,clientPublicEphemeral:p.public,clientSessionProof:v.proof})});if(!x.ok){const S=await x.text();try{return{success:!1,error:JSON.parse(S).title}}catch{return{success:!1,error:S||"Login validation failed"}}}const T=await x.json();return T.requiresTwoFactor?{success:!1,requiresTwoFactor:!0,loginResponse:f,passwordHashBase64:E.passwordHashBase64}:{success:!0,token:T.token,passwordHashBase64:E.passwordHashBase64,loginResponse:f}}catch(c){return{success:!1,error:c instanceof Error?c.message:"Unknown error occurred"}}}};ze(Ra,"wasmInitialized",!1),ze(Ra,"wasmInitPromise",null);let cn=Ra;class vI{constructor(e){ze(this,"webApiService");this.webApiService=e}async initiateLogin(e){const a=cn.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 li(c.title)}return await i.json()}async validateLogin(e,a,i,s){const c=cn.normalizeUsername(e),d=s.srpIdentity??c,m=await cn.generateEphemeral(),f=await cn.derivePrivateKey(s.salt,d,a),g=await cn.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 v=await p.json();throw new li(v.title)}return await p.json()}async validateLogin2Fa(e,a,i,s,c){const d=cn.normalizeUsername(e),m=s.srpIdentity??d,f=await cn.generateEphemeral(),g=await cn.derivePrivateKey(s.salt,m,a),E=await cn.deriveSession(f.secret,s.serverEphemeral,s.salt,m,g),p={username:d,rememberMe:i,clientPublicEphemeral:f.public,clientSessionProof:E.proof,code2Fa:c},w=await this.webApiService.rawFetch("Auth/validate-2fa",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)});if(w.status===400){const x=await w.json();throw new li(x.title)}return await w.json()}}let Ef=!1;const _L=()=>{const{t:r}=Ze(),e=Ba(),a=gr(),i=Kt(),{setHeaderButtons:s}=fr(),[c,d]=I.useState({username:"",password:""}),{showLoading:m,hideLoading:f,setIsInitialLoading:g}=Aa(),[E,p]=I.useState(!0),[w,v]=I.useState(!1),[x,T]=I.useState(null),[S,k]=I.useState(null),[B,L]=I.useState(null),[P,_]=I.useState(!1),[j,V]=I.useState(""),[H,Q]=I.useState(null),[G,K]=I.useState(null),[$,J]=I.useState(!1),re=mr(),Ae=new vI(re),X=async(ee,ne)=>{const Ie=await xe.getItem("local:encryptedVault"),we=await xe.getItem("local:serverRevision");let Re=ee.vault.blob;if(Ie&&we!==null)try{const ke=await jt.symmetricDecrypt(Ie,ne);if(we>=ee.vault.currentRevisionNumber)return console.info(`Existing vault is more advanced (rev ${we} >= ${ee.vault.currentRevisionNumber}), preserving local vault and will upload to server`),Re=Ie,await gt("STORE_VAULT_METADATA",{publicEmailDomainList:ee.vault.publicEmailDomainList,privateEmailDomainList:ee.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:ee.vault.hiddenPrivateEmailDomainList},"background"),i.loadDatabase(ke);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 gt("STORE_ENCRYPTED_VAULT",{vaultBlob:ee.vault.blob,serverRevision:ee.vault.currentRevisionNumber},"background"),await gt("STORE_VAULT_METADATA",{publicEmailDomainList:ee.vault.publicEmailDomainList,privateEmailDomainList:ee.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:ee.vault.hiddenPrivateEmailDomainList},"background");const Be=await jt.symmetricDecrypt(Re,ne);return 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});const ke=await X(Be,we);try{if(await ke.hasPendingMigrations()){e("/upgrade",{replace:!0}),f();return}}catch(Qe){await a.logout(),K(Qe instanceof Error?Qe.message:r("common.errors.unknownError")),f();return}Ef=!1,e("/reinitialize",{replace:!0}),f()};I.useEffect(()=>{(async()=>{const ne=await xe.getItem("local:clientUrl");let Ie=an.DEFAULT_CLIENT_URL;if(ne&&ne.length>0&&(Ie=ne),Q(Ie),!Ef){Ef=!0;const we=await xe.getItem("local:username");we&&d(Re=>({...Re,username:we}))}g(!1)})()},[g]),I.useEffect(()=>{const ee=Sa.isPopup()?null:l.jsx(l.Fragment,{children:l.jsx(Tn,{onClick:()=>Sa.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=cn.normalizeUsername(c.username),Ie=await Ae.initiateLogin(ne),{passwordHashString:we,passwordHashBase64:Re}=await cn.prepareCredentials(c.password,Ie.salt,Ie.encryptionType,Ie.encryptionSettings),Be=await Ae.validateLogin(ne,we,E,Ie);if(Be.requiresTwoFactor){T(Ie),k(we),L(Re),_(!0),f();return}if(!Be.token)throw new Error(r("common.errors.unknownError"));await ie(ne,Be.token.token,Be.token.refreshToken,Re,Ie)}catch(ne){ne instanceof li?K(r("common.apiErrors."+ne.message)):K(r("auth.errors.serverError")),f()}},ye=async ee=>{ee.preventDefault(),K(null);try{if(m(),!S||!B||!x)throw new Error(r("common.errors.unknownError"));const ne=j.trim();if(!/^\d{6}$/.test(ne))throw new Error(r("auth.errors.invalidCode"));const Ie=cn.normalizeUsername(c.username),we=await Ae.validateLogin2Fa(Ie,S,E,x,parseInt(j));if(!we.token)throw new Error(r("common.errors.unknownError"));await ie(Ie,we.token.token,we.token.refreshToken,B,x),_(!1),V(""),k(null),L(null),T(null)}catch(ne){console.error("2FA error:",ne),ne instanceof li?K(r("common.apiErrors."+ne.message)):K(r("auth.errors.serverError")),f()}},M=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});const Ie=await X(ne,ee.decryptionKey);try{if(await Ie.hasPendingMigrations()){e("/upgrade",{replace:!0}),f(),g(!1);return}}catch(we){await a.logout(),K(we instanceof Error?we.message:r("common.errors.unknownError")),f();return}f(),g(!1),e("/reinitialize",{replace:!0})}catch(ne){throw K(ne instanceof Error?ne.message:r("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:r("auth.twoFactorTitle")}),l.jsx("label",{className:"block text-gray-700 dark:text-gray-200 text-sm font-bold mb-2",htmlFor:"twoFactorCode",children:r("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=>V(ee.target.value),placeholder:r("auth.authCodePlaceholder"),required:!0})]}),l.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[l.jsx(ya,{type:"submit",children:r("auth.verify")}),l.jsx(ya,{type:"button",onClick:()=>{d({username:"",password:""}),_(!1),V(""),k(null),L(null),T(null),K(null)},variant:"secondary",children:r("common.cancel")})]}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-4 text-center",children:r("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:r("auth.loginTitle")}),l.jsx(hL,{})]}),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:r("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:r("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:r("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:w?"text":"password",name:"password",placeholder:r("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:()=>v(!w),tabIndex:-1,children:l.jsx(kh,{type:w?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:r("auth.rememberMe")})]})}),l.jsx(ya,{type:"submit",children:l.jsx("div",{className:"flex items-center justify-center gap-2",children:r("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"})}),r("auth.loginWithMobile")]}),l.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[r("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:r("auth.createVault")})]})]}),l.jsx(bI,{isOpen:$,onClose:()=>J(!1),onSuccess:M,webApi:re,mode:"login"})]})})},ps=({type:r,message:e,className:a=""})=>{const i=()=>{const s="p-3 border rounded-md text-sm";switch(r){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})},Lh=({isOpen:r,onClose:e,onConfirm:a})=>{const{t:i}=Ze(),[s,c]=I.useState(null),d=I.useCallback(async()=>{try{const m=await gt("GET_SYNC_STATE",{},"background");c(m.isDirty)}catch(m){console.error("Failed to check sync state:",m),c(!1)}},[]);return I.useEffect(()=>{r&&(c(null),d())},[r,d]),!r||s===null?null:s?l.jsxs(tr,{isOpen:r,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:r,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")})]})]})},EE=()=>{var a;const{t:r}=Ze(),{username:e}=Zl();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:r("common.loggedIn")})]})},ML=()=>{const{t:r}=Ze(),e=gr(),a=Zl(),i=Kt(),s=Ba(),{setHeaderButtons:c}=fr(),d=mr(),m=new vI(d),[f,g]=I.useState("password"),[E,p]=I.useState(!1),[w,v]=I.useState(""),[x,T]=I.useState(!1),[S,k]=I.useState(""),[B,L]=I.useState(6),P=I.useRef(null),_=I.useRef(null),[j,V]=I.useState(null),{showLoading:H,hideLoading:Q,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 ke=d.validateStatusResponse(Be);return ke!==null?(await e.logout(r("common.errors."+ke)),{online:!1,error:ke}):(G(!1),await i.setIsOffline(!1),{online:!0,error:null})}catch{return G(!1),{online:!1,error:"sessionExpired"}}};I.useEffect(()=>{(async()=>{const[ke,Qe]=await Promise.all([Yb(),Pk()]);p(ke),L(Qe||6),g(ke?"pin":"password"),await Ae()})()},[]),I.useEffect(()=>{const Be=Sa.isPopup()?null:l.jsx(Tn,{onClick:()=>Sa.openInNewPopup(),title:r("common.openInNewWindow"),iconType:Pa.EXPAND});return c(Be),()=>{c(null)}},[c,r]),I.useEffect(()=>{if(f!=="pin")return;const Be=()=>{P.current&&P.current.focus()},ke=()=>{Be()},Qe=()=>{Be()};Be();const pt=_.current;return pt&&pt.addEventListener("click",ke),window.addEventListener("focus",Qe),()=>{pt&&pt.removeEventListener("click",ke),window.removeEventListener("focus",Qe)}},[f]);const X=async Be=>{Be.preventDefault(),V(null),H();const ke=await Ae();if(ke.error){Q();return}try{let Qe;if(ke.online){const Dt=await m.initiateLogin(a.username);Qe=(await cn.prepareCredentials(w,Dt.salt,Dt.encryptionType,Dt.encryptionSettings)).passwordHashBase64,await i.storeEncryptionKeyDerivationParams({salt:Dt.salt,encryptionType:Dt.encryptionType,encryptionSettings:Dt.encryptionSettings})}else{const Dt=await gt("GET_ENCRYPTION_KEY_DERIVATION_PARAMS",{},"background");if(!Dt){V(r("common.errors.serverNotAvailable")),Q();return}Qe=(await cn.prepareCredentials(w,Dt.salt,Dt.encryptionType,Dt.encryptionSettings)).passwordHashBase64,await i.setIsOffline(!0)}await i.storeEncryptionKey(Qe);const pt=await i.loadStoredDatabase();if(!pt){V(r("auth.errors.wrongPassword")),Q();return}if(await pt.hasPendingMigrations()){s("/upgrade",{replace:!0}),Q();return}await vt.setVaultLockedDismissUntil(0),await Ry(),s("/reinitialize",{replace:!0})}catch(Qe){Qe instanceof Is?await e.logout(Qe.message):V(r("auth.errors.wrongPassword")),console.error("Unlock error:",Qe)}finally{Q()}},ie=I.useCallback(async Be=>{k(Be),V(null),Be.length===B&&(await new Promise(ke=>setTimeout(ke,50)),await M(Be))},[B]),ce=Be=>{S.length<8&&ie(S+Be)},ye=()=>{k(S.slice(0,-1)),V(null)},M=async(Be=S)=>{if(Be.length===B){V(null),H();try{const ke=await zk(Be);(await Ae()).online||await i.setIsOffline(!0),await i.storeEncryptionKey(ke);const pt=await i.loadStoredDatabase();if(!pt)throw new qf(3);if(await pt.hasPendingMigrations()){s("/upgrade",{replace:!0}),Q();return}await vt.setVaultLockedDismissUntil(0),s("/reinitialize",{replace:!0}),Q()}catch(ke){if(ke instanceof _u)p(!1),g("password"),V(r("settings.unlockMethod.pinLocked"));else if(ke instanceof qf){const Qe=ke.attemptsRemaining;V(Qe===1?r("settings.unlockMethod.incorrectPinSingular"):r("settings.unlockMethod.incorrectPin",{attemptsRemaining:Qe})),k("")}else ke instanceof ql?(V(r("settings.unlockMethod.invalidPinFormat")),k("")):(console.error("PIN unlock failed:",ke),V(r("common.errors.unknownErrorTryAgain")),k(""));Q()}}},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 ke=await i.loadStoredDatabase();if(!ke){V(r("common.errors.unknownErrorTryAgain")),Q();return}if(await ke.hasPendingMigrations()){s("/upgrade",{replace:!0}),Q();return}await vt.setVaultLockedDismissUntil(0),await Ry(),s("/reinitialize",{replace:!0})}catch(ke){ke instanceof Is?await e.logout(ke.message):V(r("common.errors.unknownErrorTryAgain")),console.error("Mobile unlock error:",ke)}finally{Q()}},Ie=()=>{g("password"),V(null)},we=()=>{g("pin"),V(null)},Re=Array.from({length:B},(Be,ke)=>l.jsx("div",{className:`w-4 h-4 rounded-full border-2 transition-all ${ke<S.length?"bg-primary-500 border-primary-500":"bg-transparent border-gray-300 dark:border-gray-600"}`},ke));return f==="pin"?l.jsx("div",{ref:_,className:"flex flex-col items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-md",children:[l.jsx(EE,{}),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:r("auth.unlockTitle")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r("auth.enterPinToUnlock")})]}),l.jsx("div",{className:"flex justify-center gap-2 mb-4",children:Re}),j&&l.jsx(ps,{type:"error",message:j,className:"mb-3 text-center"}),l.jsx("input",{ref:P,type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:S,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:r("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(EE,{}),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:r("auth.unlockTitle")})}),j&&l.jsx(ps,{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:r("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:w,onChange:Be=>v(Be.target.value),placeholder:r("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:()=>T(!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:r("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"})}),r("auth.unlockWithMobile")]}),l.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[r("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:r("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:r("auth.unlockWithPin")})}),l.jsx(bI,{isOpen:K,onClose:()=>$(!1),onSuccess:ne,webApi:d,mode:"unlock"}),l.jsx(Lh,{isOpen:J,onClose:()=>re(!1),onConfirm:ee})]})},FL=()=>{const r=Ba(),{t:e}=Ze(),a=()=>{const i=new URL(window.location.href);i.searchParams.delete("mode"),window.history.replaceState({},"",i),r("/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")})]})]})},Wu=({isOpen:r,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:r,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})]})]})};class OL{constructor(){ze(this,"sqlJsInstance",null);ze(this,"rustInitialized",!1)}async initRust(){if(this.rustInitialized)return;const e=Cs.runtime.getURL("src/aliasvault_core_bg.wasm"),i=await(await fetch(e)).arrayBuffer();await ld(i),this.rustInitialized=!0}async merge(e,a){try{await this.initRust();const i=this.sqlJsInstance??await Qf({locateFile:d=>`src/${d}`}),s=this.loadDatabase(i,e),c=this.loadDatabase(i,a);try{const d=CL(),m=d.map(w=>({name:w,records:this.readTableAsJson(s,w)})),f=d.map(w=>({name:w,records:this.readTableAsJson(c,w)})),g=JSON.parse(JSON.stringify({local_tables:m,server_tables:f}));console.debug("[VaultMerge] Merge input:",{localTableCount:m.length,serverTableCount:f.length,localTables:m.map(w=>({name:w.name,recordCount:w.records.length})),serverTables:f.map(w=>({name:w.name,recordCount:w.records.length}))});const E=wL(g);for(const w of E.statements){const v=w.params.map(x=>x===void 0?null:x);s.run(w.sql,v)}const p=this.exportDatabase(s);return{success:E.success,mergedVaultBase64:p,stats:{tablesProcessed:E.stats.tables_processed,recordsFromLocal:E.stats.records_from_local,recordsFromServer:E.stats.records_from_server,recordsCreatedLocally:E.stats.records_created_locally,conflicts:E.stats.conflicts}}}finally{s.close(),c.close()}}catch(i){throw console.error("Vault merge failed:",i),i}}async prune(e,a=30){try{await this.initRust();const i=this.sqlJsInstance??await Qf({locateFile:c=>`src/${c}`}),s=this.loadDatabase(i,e);try{const d=["Items","FieldValues","Attachments","TotpCodes","Passkeys"].map(p=>({name:p,records:this.readTableAsJson(s,p)})),m=JSON.parse(JSON.stringify({tables:d,retention_days:a,current_time:new Date().toISOString()})),f=NL(m);for(const p of f.statements){const w=p.params.map(v=>v===void 0?null:v);s.run(p.sql,w)}const g=this.exportDatabase(s),E=f.statements.length;return E>0&&console.info(`[VaultMerge] Pruned expired items from trash (${E} SQL statements executed)`),{success:f.success,prunedVaultBase64:g,statementCount:E}}finally{s.close()}}catch(i){throw console.error("Vault prune failed:",i),i}}loadDatabase(e,a){const i=atob(a),s=new Uint8Array(i.length);for(let c=0;c<i.length;c++)s[c]=i.charCodeAt(c);return new e.Database(s)}exportDatabase(e){e.run("VACUUM");const a=e.export();let i="";for(let s=0;s<a.length;s++)i+=String.fromCharCode(a[s]);return btoa(i)}readTableAsJson(e,a){const i=[],s=e.prepare(`SELECT * FROM ${a}`);for(;s.step();){const c=s.getAsObject(),d=JSON.parse(JSON.stringify(c));i.push(d)}return s.free(),i}}const jL=new OL,cd=()=>{const{t:r}=Ze(),e=gr(),a=Kt(),i=mr(),s=I.useCallback(async m=>await a.hasPendingMigrations()?(m==null||m(),!0):!1,[a]),c=I.useCallback(async(m,f,g)=>(await a.setIsOffline(!0),m==null||m(r("common.offlineMode")),f==null||f(),g==null||g(!1),!0),[a,r]),d=I.useCallback(async(m={})=>{const{onSuccess:f,onError:g,onStatus:E,onOffline:p,onUpgradeRequired:w}=m;try{if(!await e.initializeAuth())return!1;E==null||E(r("common.checkingVaultUpdates"));const x=await i.getStatus(),T=await gt("GET_SYNC_STATE",{},"background");if(x.vaultRevision>T.serverRevision&&a.setIsSyncing(!0),x.serverVersion==="0.0.0")return a.dbAvailable?c(E,p,f):(g==null||g(r("common.errors.serverNotAvailable")),!1);const S=i.validateStatusResponse(x);if(S)return S==="clientVersionNotSupported"||S==="serverVersionNotSupported"?(await e.logout(r("common.errors."+S)),!1):(g==null||g(r("common.errors."+S)),!1);const k=await gt("GET_ENCRYPTION_KEY_DERIVATION_PARAMS",{},"background");if(k&&x.srpSalt&&x.srpSalt!==k.salt)return await e.logout(r("common.errors.passwordChanged")),!1;if(a.isOffline&&await a.setIsOffline(!1),x.vaultRevision>T.serverRevision){E==null||E(r("common.syncingUpdatedVault"));const B=await i.get("Vault");try{const L=await gt("GET_ENCRYPTION_KEY",{},"background");if(T.isDirty){E==null||E(r("common.mergingVaultChanges"));const j=await gt("GET_ENCRYPTED_VAULT",{},"background");if(j){const V=await jt.symmetricDecrypt(j,L),H=await jt.symmetricDecrypt(B.vault.blob,L),Q=await jL.merge(V,H);if(Q.success){console.info("Vault merge during sync completed:",Q.stats);const G=await jt.symmetricEncrypt(Q.mergedVaultBase64,L);if(!(await gt("STORE_ENCRYPTED_VAULT",{vaultBlob:G,serverRevision:B.vault.currentRevisionNumber,expectedMutationSeq:T.mutationSequence},"background")).success)return console.info("Mutation detected during merge, re-syncing..."),d(m);E==null||E(r("common.uploadingVault"));const $=await gt("UPLOAD_VAULT",{},"background");if($.success&&$.status===0)await gt("MARK_VAULT_CLEAN",{mutationSeqAtStart:$.mutationSeqAtStart,newServerRevision:$.newRevisionNumber},"background");else return $.status===2?d(m):(console.error("Failed to upload merged vault:",$.error),g==null||g($.error??r("common.errors.unknownError")),!1);return await gt("STORE_VAULT_METADATA",{publicEmailDomainList:B.vault.publicEmailDomainList,privateEmailDomainList:B.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:B.vault.hiddenPrivateEmailDomainList},"background"),await a.loadDatabase(Q.mergedVaultBase64),await a.refreshSyncState(),await s(w)?!1:(f==null||f(!0),!0)}else console.error("Vault merge failed during sync, using server vault")}}if(!(await gt("STORE_ENCRYPTED_VAULT",{vaultBlob:B.vault.blob,serverRevision:B.vault.currentRevisionNumber,expectedMutationSeq:T.mutationSequence},"background")).success)return console.info("Mutation detected during sync, re-syncing..."),d(m);await gt("STORE_VAULT_METADATA",{publicEmailDomainList:B.vault.publicEmailDomainList,privateEmailDomainList:B.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:B.vault.hiddenPrivateEmailDomainList},"background");const _=await jt.symmetricDecrypt(B.vault.blob,L);return await a.loadDatabase(_),await a.refreshSyncState(),await s(w)?!1:(f==null||f(!0),!0)}catch(L){if(L instanceof Is)return await e.logout(L.message),!1;throw new Error("Vault could not be decrypted, if the problem persists please logout and login again.")}}else if(x.vaultRevision===T.serverRevision){if(T.isDirty){E==null||E(r("common.uploadingVault"));const B=await gt("UPLOAD_VAULT",{},"background");if(B.success&&B.status===0)await gt("MARK_VAULT_CLEAN",{mutationSeqAtStart:B.mutationSeqAtStart,newServerRevision:B.newRevisionNumber},"background"),await a.refreshSyncState();else return B.status===2?d(m):(console.error("Failed to upload pending vault:",B.error),g==null||g(B.error??r("common.errors.unknownError")),!1);return f==null||f(!1),!0}}else if(x.vaultRevision<T.serverRevision){console.warn(`Server data loss detected! Server at rev ${x.vaultRevision}, client at rev ${T.serverRevision}. Uploading to recover server state.`),E==null||E(r("common.uploadingVault"));const B=await gt("UPLOAD_VAULT",{},"background");return B.success&&B.status===0?(await gt("MARK_VAULT_CLEAN",{mutationSeqAtStart:B.mutationSeqAtStart,newServerRevision:B.newRevisionNumber},"background"),await a.refreshSyncState(),console.info(`Server recovery complete: rev ${x.vaultRevision} → ${B.newRevisionNumber}`),f==null||f(!1),!0):B.status===2?(console.info("Another client recovered server first, re-syncing..."),d(m)):(console.error("Server recovery failed:",B.error),g==null||g(r("common.errors.unknownError")),!1)}return await s(w)||f==null||f(!1),!1}catch(v){const x=v instanceof Error?v.message:"Unknown error during vault sync";return console.error("Vault sync error:",v),v instanceof Is?(await e.logout(x),!1):v instanceof li?!1:v instanceof od&&a.dbAvailable?c(E,p,f):(g==null||g(x),!1)}finally{a.setIsSyncing(!1)}},[e,a,i,r,s,c]);return{syncVault:d}};function Ts(){const r=Kt(),{syncVault:e}=cd(),a=I.useRef(!1),i=I.useCallback(async d=>{await d();const m=r.sqliteClient.exportToBase64(),f=await gt("GET_ENCRYPTION_KEY",{},"background"),g=await jt.symmetricEncrypt(m,f);await gt("STORE_ENCRYPTED_VAULT",{vaultBlob:g,markDirty:!0},"background"),await r.refreshSyncState()},[r]),s=I.useCallback(async()=>{if(!a.current){a.current=!0;try{await e({onSuccess:async()=>{await r.refreshSyncState(),r.getIsOffline()||(await gt("GET_SYNC_STATE",{},"background")).isDirty&&(a.current=!1,await s())},onOffline:()=>{},onError:d=>{console.error("Background sync error:",d)}})}catch(d){console.error("Error during background sync:",d)}finally{a.current=!1}}},[r,e]);return{executeVaultMutationAsync:I.useCallback(async d=>{await i(d),s()},[i,s])}}const PL=()=>{var X;const{t:r}=Ze(),{username:e}=gr(),a=Zl(),i=Kt(),{sqliteClient:s}=i,{setHeaderButtons:c}=fr(),[d,m]=I.useState(!1),[f,g]=I.useState(null),[E,p]=I.useState(null),[w,v]=I.useState(null),[x,T]=I.useState(!1),[S,k]=I.useState(!1),[B,L]=I.useState(!1),{setIsInitialLoading:P}=Aa(),_=mr(),{executeVaultMutationAsync:j}=Ts(),{syncVault:V}=cd(),H=Ba();I.useEffect(()=>{const ie=Sa.isPopup()?null:l.jsx(l.Fragment,{children:l.jsx(Tn,{onClick:()=>Sa.openInNewPopup(),title:r("common.openInNewWindow"),iconType:Pa.EXPAND})});return c(ie),()=>{c(null)}},[c,r]);const Q=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),v(r("upgrade.alerts.unableToGetVersionInfo"))}finally{P(!1)}},[s,P,r]);I.useEffect(()=>{Q()},[Q]);const G=async()=>{if(!s||!f||!E){v(r("upgrade.alerts.unableToGetVersionInfo"));return}if(await _.isSelfHosted()){T(!0);return}await K()},K=async()=>{if(!s||!f||!E){v(r("upgrade.alerts.unableToGetVersionInfo"));return}m(!0),v(null);try{const ce=new Vf().getUpgradeVaultSql(f.revision,E.revision);if(!ce.success)throw new Error(ce.error??r("upgrade.alerts.upgradeFailed"));if(ce.sqlCommands.length===0){await $();return}await j(async()=>{for(let ye=0;ye<ce.sqlCommands.length;ye++){const M=ce.sqlCommands[ye];try{s.executeRaw(M)}catch(q){throw console.error(`Error executing SQL command ${ye+1}:`,M,q),new Error(r("upgrade.alerts.failedToApplyMigration",{current:ye+1,total:ce.sqlCommands.length}))}}}),await $()}catch(ie){console.error("Upgrade failed:",ie),v(ie instanceof Error?ie.message:r("common.errors.unknownError"))}finally{m(!1)}},$=async()=>{try{await V({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=()=>{L(!0)},re=async()=>{L(!1);try{await _.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:r("upgrade.upgrading")})]}),l.jsx(Wu,{isOpen:x,onClose:()=>T(!1),onConfirm:()=>{T(!1),K()},title:r("upgrade.alerts.selfHostedServer"),message:r("upgrade.alerts.selfHostedWarning"),confirmText:r("upgrade.alerts.continueUpgrade"),cancelText:r("common.cancel")}),l.jsx(Wu,{isOpen:S,onClose:()=>k(!1),onConfirm:()=>k(!1),title:r("upgrade.whatsNew"),message:`${r("upgrade.whatsNewDescription")}

${(E==null?void 0:E.description)??r("upgrade.noDescriptionAvailable")}`}),l.jsxs("form",{className:"w-full px-2 pt-2 pb-2 mb-4",children:[w&&l.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400",children:w}),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:r("upgrade.title")}),l.jsxs("div",{className:"mb-6",children:[l.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:r("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:r("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:r("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:r("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:r("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:r(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:r("common.logout")})]})]}),l.jsx(Lh,{isOpen:B,onClose:()=>L(!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:CI,setPrototypeOf:bE,isFrozen:HL,getPrototypeOf:zL,getOwnPropertyDescriptor:QL}=Object;let{freeze:An,seal:ar,create:eh}=Object,{apply:th,construct:ah}=typeof Reflect<"u"&&Reflect;An||(An=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 vu=pn(Array.prototype.forEach),VL=pn(Array.prototype.lastIndexOf),IE=pn(Array.prototype.pop),xl=pn(Array.prototype.push),GL=pn(Array.prototype.splice),ju=pn(String.prototype.toLowerCase),bf=pn(String.prototype.toString),If=pn(String.prototype.match),Tl=pn(String.prototype.replace),KL=pn(String.prototype.indexOf),qL=pn(String.prototype.trim),cr=pn(Object.prototype.hasOwnProperty),fn=pn(RegExp.prototype.test),Sl=WL(TypeError);function pn(r){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(r,e,i)}}function WL(r){return function(){for(var e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];return ah(r,a)}}function Rt(r,e){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ju;bE&&bE(r,null);let i=e.length;for(;i--;){let s=e[i];if(typeof s=="string"){const c=a(s);c!==s&&(HL(e)||(e[i]=c),s=c)}r[s]=!0}return r}function YL(r){for(let e=0;e<r.length;e++)cr(r,e)||(r[e]=null);return r}function xr(r){const e=eh(null);for(const[a,i]of CI(r))cr(r,a)&&(Array.isArray(i)?e[a]=YL(i):i&&typeof i=="object"&&i.constructor===Object?e[a]=xr(i):e[a]=i);return e}function kl(r,e){for(;r!==null;){const i=QL(r,e);if(i){if(i.get)return pn(i.get);if(typeof i.value=="function")return pn(i.value)}r=zL(r)}function a(){return null}return a}const vE=An(["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"]),vf=An(["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"]),Cf=An(["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"]),JL=An(["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"]),wf=An(["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"]),XL=An(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),CE=An(["#text"]),wE=An(["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"]),Nf=An(["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"]),NE=An(["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"]),Cu=An(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$L=ar(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ZL=ar(/<%[\w\W]*|[\w\W]*%>/gm),eR=ar(/\$\{[\w\W]*/gm),tR=ar(/^data-[\-\w.\u00B7-\uFFFF]+$/),aR=ar(/^aria-[\-\w]+$/),wI=ar(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nR=ar(/^(?:\w+script|data):/i),rR=ar(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),NI=ar(/^html$/i),iR=ar(/^[a-z][.\w]*(-[.\w]+)+$/i);var xE=Object.freeze({__proto__:null,ARIA_ATTR:aR,ATTR_WHITESPACE:rR,CUSTOM_ELEMENT:iR,DATA_ATTR:tR,DOCTYPE_NAME:NI,ERB_EXPR:ZL,IS_ALLOWED_URI:wI,IS_SCRIPT_OR_DATA:nR,MUSTACHE_EXPR:$L,TMPLIT_EXPR:eR});const Ll={element:1,text:3,progressingInstruction:7,comment:8,document:9},sR=function(){return typeof window>"u"?null:window},oR=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}},TE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xI(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sR();const e=Fe=>xI(Fe);if(e.version="3.3.1",e.removed=[],!r||!r.document||r.document.nodeType!==Ll.document||!r.Element)return e.isSupported=!1,e;let{document:a}=r;const i=a,s=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:d,Node:m,Element:f,NodeFilter:g,NamedNodeMap:E=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:p,DOMParser:w,trustedTypes:v}=r,x=f.prototype,T=kl(x,"cloneNode"),S=kl(x,"remove"),k=kl(x,"nextSibling"),B=kl(x,"childNodes"),L=kl(x,"parentNode");if(typeof d=="function"){const Fe=a.createElement("template");Fe.content&&Fe.content.ownerDocument&&(a=Fe.content.ownerDocument)}let P,_="";const{implementation:j,createNodeIterator:V,createDocumentFragment:H,getElementsByTagName:Q}=a,{importNode:G}=i;let K=TE();e.isSupported=typeof CI=="function"&&typeof L=="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}=xE;let{IS_ALLOWED_URI:M}=xE,q=null;const ee=Rt({},[...vE,...vf,...Cf,...wf,...CE]);let ne=null;const Ie=Rt({},[...wE,...Nf,...NE,...Cu]);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 ke=Object.seal(eh(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Qe=!0,pt=!0,Dt=!1,_t=!0,et=!1,nt=!0,Ht=!1,Ce=!1,se=!1,De=!1,je=!1,Ve=!1,Ye=!0,ut=!1;const Mt="user-content-";let Pt=!0,Gt=!1,ia={},U=null;const C=Rt({},["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 N=null;const z=Rt({},["audio","video","img","source","image","track"]);let ae=null;const he=Rt({},["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",ft="http://www.w3.org/1999/xhtml";let Et=ft,St=!1,dt=null;const hr=Rt({},[be,Ue,ft],bf);let sa=Rt({},["mi","mo","mn","ms","mtext"]),rn=Rt({},["annotation-xml"]);const Pn=Rt({},["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=xr(Z),Hn=Oe.indexOf(Z.PARSER_MEDIA_TYPE)===-1?ui:Z.PARSER_MEDIA_TYPE,ta=Hn==="application/xhtml+xml"?bf:ju,q=cr(Z,"ALLOWED_TAGS")?Rt({},Z.ALLOWED_TAGS,ta):ee,ne=cr(Z,"ALLOWED_ATTR")?Rt({},Z.ALLOWED_ATTR,ta):Ie,dt=cr(Z,"ALLOWED_NAMESPACES")?Rt({},Z.ALLOWED_NAMESPACES,bf):hr,ae=cr(Z,"ADD_URI_SAFE_ATTR")?Rt(xr(he),Z.ADD_URI_SAFE_ATTR,ta):he,N=cr(Z,"ADD_DATA_URI_TAGS")?Rt(xr(z),Z.ADD_DATA_URI_TAGS,ta):z,U=cr(Z,"FORBID_CONTENTS")?Rt({},Z.FORBID_CONTENTS,ta):C,Re=cr(Z,"FORBID_TAGS")?Rt({},Z.FORBID_TAGS,ta):xr({}),Be=cr(Z,"FORBID_ATTR")?Rt({},Z.FORBID_ATTR,ta):xr({}),ia=cr(Z,"USE_PROFILES")?Z.USE_PROFILES:!1,Qe=Z.ALLOW_ARIA_ATTR!==!1,pt=Z.ALLOW_DATA_ATTR!==!1,Dt=Z.ALLOW_UNKNOWN_PROTOCOLS||!1,_t=Z.ALLOW_SELF_CLOSE_IN_ATTR!==!1,et=Z.SAFE_FOR_TEMPLATES||!1,nt=Z.SAFE_FOR_XML!==!1,Ht=Z.WHOLE_DOCUMENT||!1,De=Z.RETURN_DOM||!1,je=Z.RETURN_DOM_FRAGMENT||!1,Ve=Z.RETURN_TRUSTED_TYPE||!1,se=Z.FORCE_BODY||!1,Ye=Z.SANITIZE_DOM!==!1,ut=Z.SANITIZE_NAMED_PROPS||!1,Pt=Z.KEEP_CONTENT!==!1,Gt=Z.IN_PLACE||!1,M=Z.ALLOWED_URI_REGEXP||wI,Et=Z.NAMESPACE||ft,sa=Z.MATHML_TEXT_INTEGRATION_POINTS||sa,rn=Z.HTML_INTEGRATION_POINTS||rn,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&&(pt=!1),je&&(De=!0),ia&&(q=Rt({},CE),ne=[],ia.html===!0&&(Rt(q,vE),Rt(ne,wE)),ia.svg===!0&&(Rt(q,vf),Rt(ne,Nf),Rt(ne,Cu)),ia.svgFilters===!0&&(Rt(q,Cf),Rt(ne,Nf),Rt(ne,Cu)),ia.mathMl===!0&&(Rt(q,wf),Rt(ne,NE),Rt(ne,Cu))),Z.ADD_TAGS&&(typeof Z.ADD_TAGS=="function"?ke.tagCheck=Z.ADD_TAGS:(q===ee&&(q=xr(q)),Rt(q,Z.ADD_TAGS,ta))),Z.ADD_ATTR&&(typeof Z.ADD_ATTR=="function"?ke.attributeCheck=Z.ADD_ATTR:(ne===Ie&&(ne=xr(ne)),Rt(ne,Z.ADD_ATTR,ta))),Z.ADD_URI_SAFE_ATTR&&Rt(ae,Z.ADD_URI_SAFE_ATTR,ta),Z.FORBID_CONTENTS&&(U===C&&(U=xr(U)),Rt(U,Z.FORBID_CONTENTS,ta)),Z.ADD_FORBID_CONTENTS&&(U===C&&(U=xr(U)),Rt(U,Z.ADD_FORBID_CONTENTS,ta)),Pt&&(q["#text"]=!0),Ht&&Rt(q,["html","head","body"]),q.table&&(Rt(q,["tbody"]),delete Re.tbody),Z.TRUSTED_TYPES_POLICY){if(typeof Z.TRUSTED_TYPES_POLICY.createHTML!="function")throw Sl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Z.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Sl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');P=Z.TRUSTED_TYPES_POLICY,_=P.createHTML("")}else P===void 0&&(P=oR(v,s)),P!==null&&typeof _=="string"&&(_=P.createHTML(""));An&&An(Z),la=Z}},qt=Rt({},[...vf,...Cf,...JL]),Ea=Rt({},[...wf,...XL]),Jt=function(Z){let Te=L(Z);(!Te||!Te.tagName)&&(Te={namespaceURI:Et,tagName:"template"});const He=ju(Z.tagName),Ft=ju(Te.tagName);return dt[Z.namespaceURI]?Z.namespaceURI===Ue?Te.namespaceURI===ft?He==="svg":Te.namespaceURI===be?He==="svg"&&(Ft==="annotation-xml"||sa[Ft]):!!qt[He]:Z.namespaceURI===be?Te.namespaceURI===ft?He==="math":Te.namespaceURI===Ue?He==="math"&&rn[Ft]:!!Ea[He]:Z.namespaceURI===ft?Te.namespaceURI===Ue&&!rn[Ft]||Te.namespaceURI===be&&!sa[Ft]?!1:!Ea[He]&&(Pn[He]||!qt[He]):!!(Hn==="application/xhtml+xml"&&dt[Z.namespaceURI]):!1},_a=function(Z){xl(e.removed,{element:Z});try{L(Z).removeChild(Z)}catch{S(Z)}},za=function(Z,Te){try{xl(e.removed,{attribute:Te.getAttributeNode(Z),from:Te})}catch{xl(e.removed,{attribute:null,from:Te})}if(Te.removeAttribute(Z),Z==="is")if(De||je)try{_a(Te)}catch{}else try{Te.setAttribute(Z,"")}catch{}},Br=function(Z){let Te=null,He=null;if(se)Z="<remove></remove>"+Z;else{const ca=If(Z,/^[\r\n\t ]+/);He=ca&&ca[0]}Hn==="application/xhtml+xml"&&Et===ft&&(Z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Z+"</body></html>");const Ft=P?P.createHTML(Z):Z;if(Et===ft)try{Te=new w().parseFromString(Ft,Hn)}catch{}if(!Te||!Te.documentElement){Te=j.createDocument(Et,"template",null);try{Te.documentElement.innerHTML=St?_:Ft}catch{}}const da=Te.body||Te.documentElement;return Z&&He&&da.insertBefore(a.createTextNode(He),da.childNodes[0]||null),Et===ft?Q.call(Te,Ht?"html":"body")[0]:Ht?Te.documentElement:da},le=function(Z){return V.call(Z.ownerDocument||Z,Z,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},Me=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")},_e=function(Z){return typeof m=="function"&&Z instanceof m};function Xe(Fe,Z,Te){vu(Fe,He=>{He.call(e,Z,Te,la)})}const kt=function(Z){let Te=null;if(Xe(K.beforeSanitizeElements,Z,null),Me(Z))return _a(Z),!0;const He=ta(Z.nodeName);if(Xe(K.uponSanitizeElement,Z,{tagName:He,allowedTags:q}),nt&&Z.hasChildNodes()&&!_e(Z.firstElementChild)&&fn(/<[/\w!]/g,Z.innerHTML)&&fn(/<[/\w!]/g,Z.textContent)||Z.nodeType===Ll.progressingInstruction||nt&&Z.nodeType===Ll.comment&&fn(/<[/\w]/g,Z.data))return _a(Z),!0;if(!(ke.tagCheck instanceof Function&&ke.tagCheck(He))&&(!q[He]||Re[He])){if(!Re[He]&&rt(He)&&(we.tagNameCheck instanceof RegExp&&fn(we.tagNameCheck,He)||we.tagNameCheck instanceof Function&&we.tagNameCheck(He)))return!1;if(Pt&&!U[He]){const Ft=L(Z)||Z.parentNode,da=B(Z)||Z.childNodes;if(da&&Ft){const ca=da.length;for(let ua=ca-1;ua>=0;--ua){const Ya=T(da[ua],!0);Ya.__removalCount=(Z.__removalCount||0)+1,Ft.insertBefore(Ya,k(Z))}}}return _a(Z),!0}return Z instanceof f&&!Jt(Z)||(He==="noscript"||He==="noembed"||He==="noframes")&&fn(/<\/no(script|embed|frames)/i,Z.innerHTML)?(_a(Z),!0):(et&&Z.nodeType===Ll.text&&(Te=Z.textContent,vu([$,J,re],Ft=>{Te=Tl(Te,Ft," ")}),Z.textContent!==Te&&(xl(e.removed,{element:Z.cloneNode()}),Z.textContent=Te)),Xe(K.afterSanitizeElements,Z,null),!1)},bt=function(Z,Te,He){if(Ye&&(Te==="id"||Te==="name")&&(He in a||He in nr))return!1;if(!(pt&&!Be[Te]&&fn(Ae,Te))){if(!(Qe&&fn(X,Te))){if(!(ke.attributeCheck instanceof Function&&ke.attributeCheck(Te,Z))){if(!ne[Te]||Be[Te]){if(!(rt(Z)&&(we.tagNameCheck instanceof RegExp&&fn(we.tagNameCheck,Z)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Z))&&(we.attributeNameCheck instanceof RegExp&&fn(we.attributeNameCheck,Te)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(Te,Z))||Te==="is"&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&fn(we.tagNameCheck,He)||we.tagNameCheck instanceof Function&&we.tagNameCheck(He))))return!1}else if(!ae[Te]){if(!fn(M,Tl(He,ce,""))){if(!((Te==="src"||Te==="xlink:href"||Te==="href")&&Z!=="script"&&KL(He,"data:")===0&&N[Z])){if(!(Dt&&!fn(ie,Tl(He,ce,"")))){if(He)return!1}}}}}}}return!0},rt=function(Z){return Z!=="annotation-xml"&&If(Z,ye)},it=function(Z){Xe(K.beforeSanitizeAttributes,Z,null);const{attributes:Te}=Z;if(!Te||Me(Z))return;const He={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0};let Ft=Te.length;for(;Ft--;){const da=Te[Ft],{name:ca,namespaceURI:ua,value:Ya}=da,wa=ta(ca),Ar=Ya;let aa=ca==="value"?Ar:qL(Ar);if(He.attrName=wa,He.attrValue=aa,He.keepAttr=!0,He.forceKeepAttr=void 0,Xe(K.uponSanitizeAttribute,Z,He),aa=He.attrValue,ut&&(wa==="id"||wa==="name")&&(za(ca,Z),aa=Mt+aa),nt&&fn(/((--!?|])>)|<\/(style|title|textarea)/i,aa)){za(ca,Z);continue}if(wa==="attributename"&&If(aa,"href")){za(ca,Z);continue}if(He.forceKeepAttr)continue;if(!He.keepAttr){za(ca,Z);continue}if(!_t&&fn(/\/>/i,aa)){za(ca,Z);continue}et&&vu([$,J,re],Ur=>{aa=Tl(aa,Ur," ")});const Sn=ta(Z.nodeName);if(!bt(Sn,wa,aa)){za(ca,Z);continue}if(P&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!ua)switch(v.getAttributeType(Sn,wa)){case"TrustedHTML":{aa=P.createHTML(aa);break}case"TrustedScriptURL":{aa=P.createScriptURL(aa);break}}if(aa!==Ar)try{ua?Z.setAttributeNS(ua,ca,aa):Z.setAttribute(ca,aa),Me(Z)?_a(Z):IE(e.removed)}catch{za(ca,Z)}}Xe(K.afterSanitizeAttributes,Z,null)},dn=function Fe(Z){let Te=null;const He=le(Z);for(Xe(K.beforeSanitizeShadowDOM,Z,null);Te=He.nextNode();)Xe(K.uponSanitizeShadowNode,Te,null),kt(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,He=null,Ft=null,da=null;if(St=!Fe,St&&(Fe="<!-->"),typeof Fe!="string"&&!_e(Fe))if(typeof Fe.toString=="function"){if(Fe=Fe.toString(),typeof Fe!="string")throw Sl("dirty is not a string, aborting")}else throw Sl("toString is not a function");if(!e.isSupported)return Fe;if(Ce||Ua(Z),e.removed=[],typeof Fe=="string"&&(Gt=!1),Gt){if(Fe.nodeName){const Ya=ta(Fe.nodeName);if(!q[Ya]||Re[Ya])throw Sl("root node is forbidden and cannot be sanitized in-place")}}else if(Fe instanceof m)Te=Br("<!---->"),He=Te.ownerDocument.importNode(Fe,!0),He.nodeType===Ll.element&&He.nodeName==="BODY"||He.nodeName==="HTML"?Te=He:Te.appendChild(He);else{if(!De&&!et&&!Ht&&Fe.indexOf("<")===-1)return P&&Ve?P.createHTML(Fe):Fe;if(Te=Br(Fe),!Te)return De?null:Ve?_:""}Te&&se&&_a(Te.firstChild);const ca=le(Gt?Fe:Te);for(;Ft=ca.nextNode();)kt(Ft),it(Ft),Ft.content instanceof c&&dn(Ft.content);if(Gt)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=Ht?Te.outerHTML:Te.innerHTML;return Ht&&q["!doctype"]&&Te.ownerDocument&&Te.ownerDocument.doctype&&Te.ownerDocument.doctype.name&&fn(NI,Te.ownerDocument.doctype.name)&&(ua="<!DOCTYPE "+Te.ownerDocument.doctype.name+`>
`+ua),et&&vu([$,J,re],Ya=>{ua=Tl(ua,Ya," ")}),P&&Ve?P.createHTML(ua):ua},e.setConfig=function(){let Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ua(Fe),Ce=!0},e.clearConfig=function(){la=null,Ce=!1},e.isValidAttribute=function(Fe,Z,Te){la||Ua({});const He=ta(Fe),Ft=ta(Z);return bt(He,Ft,Te)},e.addHook=function(Fe,Z){typeof Z=="function"&&xl(K[Fe],Z)},e.removeHook=function(Fe,Z){if(Z!==void 0){const Te=VL(K[Fe],Z);return Te===-1?void 0:GL(K[Fe],Te,1)[0]}return IE(K[Fe])},e.removeHooks=function(Fe){K[Fe]=[]},e.removeAllHooks=function(){K=TE()},e}var lR=xI();const cR={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 uR{sanitizeHtmlForEmailViewing(e){if(!e||e.trim()==="")return e;try{return lR.sanitize(e,cR)}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 dR=new uR,ec=(r=!1,e=300)=>{const[a,i]=I.useState(r),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(()=>{r&&(i(!0),c.current=Date.now())},[r,i]),I.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),[a,d]},mR=()=>{const{t:r}=Ze(),{id:e}=rd(),a=Ba(),i=Kt(),s=mr(),[c,d]=I.useState(null),[m,f]=I.useState(null),[g,E]=ec(!0,150),[p,w]=I.useState(!1),[v,x]=I.useState(!1),{setIsInitialLoading:T}=Aa(),{setHeaderButtons:S}=fr(),[k,B]=I.useState(!1);I.useEffect(()=>{Sa.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(r("emails.offlineMessage")),E(!1),T(!1);return}const V=await s.get(`Email/${e}`),H=i.sqliteClient.settings.getAllEncryptionKeys(),Q=await jt.decryptEmail(V,H);f(Q)}catch(V){d(V instanceof Error?V.message:"An error occurred")}finally{E(!1),T(!1)}})()},[e,i==null?void 0:i.sqliteClient,i.isOffline,r,s,E,T]);const L=I.useCallback(async()=>{try{await s.delete(`Email/${e}`),Sa.isPopup()?window.close():a("/emails")}catch(j){d(j instanceof Error?j.message:"Failed to delete email")}},[e,s,a]),P=I.useCallback(()=>{Sa.openInNewPopup(`/emails/${e}`)},[e]),_=async j=>{try{const V=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(),Q=await jt.decryptAttachment(V,m,H);if(!Q){d("Failed to decrypt attachment");return}const G=new Blob([new Uint8Array(Q)],{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(V){console.error("handleDownloadAttachment error",V),d(V instanceof Error?V.message:"Failed to download attachment")}};return I.useEffect(()=>{if(!k){const j=l.jsxs("div",{className:"flex items-center gap-2",children:[!Sa.isPopup()&&l.jsx(Tn,{onClick:P,title:r("common.openInNewWindow"),iconType:Pa.EXPAND}),l.jsx(Tn,{onClick:()=>w(!0),title:r("emails.deleteEmailTitle"),iconType:Pa.DELETE,variant:"danger"})]});S(j),B(!0)}return()=>{}},[S,k,P,r]),I.useEffect(()=>()=>S(null),[S]),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:[r("common.error")," ",c]}):m?l.jsxs("div",{className:"max-w-4xl mx-auto",children:[l.jsx(Wu,{isOpen:p,onClose:()=>w(!1),onConfirm:()=>{w(!1),L()},title:r("emails.deleteEmailTitle"),message:r("emails.deleteEmailConfirm"),confirmText:r("common.delete"),cancelText:r("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(!v),className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",title:r(v?"common.hideDetails":"common.showDetails"),children:l.jsx("svg",{className:`w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform ${v?"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"})})})]})}),v&&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:r("emails.from")})," ",l.jsx("span",{title:m.fromLocal+"@"+m.fromDomain,children:m.fromDisplay})]}),l.jsxs("p",{children:[l.jsx("span",{className:"font-bold",children:r("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:r("emails.date")})," ",new Date(m.dateSystem).toLocaleString()]})]})]}),l.jsx("div",{className:"bg-white mt-4",children:m.messageHtml?l.jsx("iframe",{srcDoc:dR.sanitizeAndPrepareEmailHtml(m.messageHtml),className:"w-full min-h-[500px] border-0",title:r("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:r("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:()=>_(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:r("emails.emailNotFound")})},nh=({onClick:r})=>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:r,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:r}=Ze(),e=Kt(),a=mr(),{setHeaderButtons:i}=fr(),[s,c]=I.useState(null),[d,m]=I.useState([]),{setIsInitialLoading:f}=Aa(),[g,E]=ec(!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 v=e.sqliteClient.items.getAllEmailAddresses();try{const x=await a.post("EmailBox/bulk",{addresses:v,page:1,pageSize:50}),T=e.sqliteClient.settings.getAllEncryptionKeys(),S=await jt.decryptEmailList(x.mails,T);m(S)}catch(x){throw console.error(x),new Error(r("common.errors.unknownError"))}}catch(v){c(v instanceof Error?v.message:r("common.errors.unknownError"))}finally{E(!1),f(!1)}},[e==null?void 0:e.sqliteClient,e.isOffline,a,E,f,r]);I.useEffect(()=>{p()},[p]),I.useEffect(()=>{const v=Sa.isPopup()?null:l.jsx(Tn,{onClick:()=>Sa.openInNewPopup(),title:r("common.openInNewWindow"),iconType:Pa.EXPAND});return i(v),()=>{i(null)}},[i,r]);const w=v=>{const x=new Date,T=new Date(v),S=Math.floor((x.getTime()-T.getTime())/1e3);if(S<60)return r("emails.dateFormat.justNow");if(S<3600){const k=Math.floor(S/60);return k===1?r("emails.dateFormat.minutesAgo_single",{count:k}):r("emails.dateFormat.minutesAgo_plural",{count:k})}else if(S<86400){const k=Math.floor(S/3600);return k===1?r("emails.dateFormat.hoursAgo_single",{count:k}):r("emails.dateFormat.hoursAgo_plural",{count:k})}else return S<172800?r("emails.dateFormat.yesterday"):T.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:[r("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:r("emails.title")})}),l.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:l.jsx("p",{className:"text-sm",children:r("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:r("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:r("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:r("emails.title")}),l.jsx(nh,{onClick:p})]}),l.jsx("div",{className:"space-y-2",children:d.map(v=>l.jsxs(sd,{to:`/emails/${v.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:v.subject}),l.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:w(v.dateSystem)})]}),l.jsx("div",{className:"text-gray-600 text-sm dark:text-gray-300 line-clamp-2",children:v.messagePreview})]},v.id))})]})},fR=()=>{const{isFullyInitialized:r}=i2();return r?l.jsx(Ww,{to:"/reinitialize",replace:!0}):null},hR=()=>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"})}),AR=()=>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"})}),pR=()=>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"})}),Yu=()=>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"})}),yR=r=>{switch(r){case ct.Notes:return l.jsx(hR,{});default:return l.jsx(Yu,{})}},ER=r=>{switch(r){case"2fa":return l.jsx(AR,{});case"attachments":return l.jsx(pR,{});default:return l.jsx(Yu,{})}},bR=({optionalSystemFields:r,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,w]=I.useState("Text"),v=I.useCallback(()=>{f(!0),d(!1)},[]),x=I.useCallback(()=>{g.trim()&&(i.onAddCustomField(g,p),E(""),w("Text"),f(!1))},[g,p,i]),T=I.useCallback(()=>{E(""),w("Text"),f(!1)},[]),S=I.useCallback(L=>{i.onAddSystemField(L),d(!1)},[i]),k=I.useCallback(L=>{L(),d(!1)},[]),B=I.useMemo(()=>{const L=[];return r.forEach(P=>{e.has(P.FieldKey)||L.push({key:P.FieldKey,label:s(`fieldLabels.${P.FieldKey}`,{defaultValue:P.FieldKey}),icon:yR(P.Category),action:()=>S(P.FieldKey)})}),a.forEach(P=>{P.isVisible||L.push({key:P.key,label:s(`common.${P.key==="2fa"?"twoFactorAuthentication":P.key}`),icon:ER(P.key),action:()=>k(P.onAdd)})}),L},[r,e,a,s,S,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(Yu,{})}),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:[B.map(L=>l.jsxs("button",{type:"button",onClick:L.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:L.icon}),l.jsx("span",{children:L.label})]},L.key)),l.jsxs("button",{type:"button",onClick:v,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(Yu,{})}),l.jsx("span",{children:s("itemTypes.addCustomField")})]})]})]})]}),l.jsx(tr,{isOpen:m,onClose:T,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:T,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:L=>E(L.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:L=>w(L.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")})]})]})]})})]})},IR=({htmlFor:r,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:r,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"})})})]})},vR=({id:r,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,[w,v]=I.useState(!0),x=p?m:w,T=I.useCallback(ye=>{const M=typeof ye=="function"?ye(x):ye;p&&f?f(M):v(M)},[p,f,x]),[S,k]=I.useState(""),[B,L]=I.useState(""),[P,_]=I.useState(!1),[j,V]=I.useState([]),[H,Q]=I.useState([]),[G,K]=I.useState([]),$=I.useRef(null),J=I.useRef(!1);I.useEffect(()=>{(async()=>{const M=await E.getVaultMetadata();V((M==null?void 0:M.publicEmailDomains)??[]),Q((M==null?void 0:M.privateEmailDomains)??[]),K((M==null?void 0:M.hiddenPrivateEmailDomains)??[])})()},[E]);const re=I.useMemo(()=>H.length>0&&!(H.length===1&&(H[0]==="DISABLED.TLD"||H[0]==="")),[H]);I.useEffect(()=>{if(!e){k(""),B||(re&&H[0]?L(H[0]):j[0]&&L(j[0]));return}if(e.includes("@")){const[ye,M]=e.split("@");if(k(ye),L(M),!J.current){const q=j.includes(M)||H.includes(M)||G.includes(M);p&&f?f(!q):p||T(!q)}}else k(e),!B&&!e.includes("@")&&(re&&H[0]?L(H[0]):j[0]&&L(j[0]))},[e,j,H,G,re,p,f,B,T]),I.useEffect(()=>{if(J.current||!e||!e.includes("@"))return;const ye=e.split("@")[1];if(!ye)return;const M=j.includes(ye)||H.includes(ye)||G.includes(ye);p&&f?f(!M):p||M&&x&&T(!1)},[j,H,G,e,x,p,f,T]),I.useEffect(()=>{if(!x&&e&&!e.includes("@")&&e.trim()){const ye=re&&H[0]?H[0]:j[0],M=B||ye;M&&(!B&&ye&&L(ye),a(`${e}@${M}`))}},[e,x,B,re,H,j,a]);const Ae=I.useCallback(ye=>{const M=ye.target.value;if(J.current=!1,x){a(M);return}if(M.includes("@")){T(!0),a(M);return}if(k(M),!M||M.trim()==="")a("");else{const q=B||(re&&H[0]?H[0]:j[0]||"");q?(a(`${M}@${q}`),B||L(q)):a(M)}},[x,B,a,T,re,H,j]),X=I.useCallback(ye=>{L(ye);const M=S.includes("@")?S.split("@")[0]:S;!M||M.trim()===""?a(""):a(`${M}@${ye}`),T(!1),_(!1)},[S,a,T]),ie=I.useCallback(()=>{J.current=!0;const ye=!x;if(T(ye),ye)a(""),k("");else{const M=re&&H[0]?H[0]:j[0];L(M),k(""),a("")}},[x,re,j,H,a,T]);I.useEffect(()=>{const ye=M=>{$.current&&!$.current.contains(M.target)&&_(!1)};if(P)return document.addEventListener("mousedown",ye),()=>{document.removeEventListener("mousedown",ye)}},[P]);const ce=I.useCallback(()=>{J.current=!0,T(!1);const ye=re&&H[0]?H[0]:j[0];ye&&L(ye),k(""),a(""),d&&d()},[d,T,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:r,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:S,onChange:Ae}),!x&&l.jsxs("button",{type:"button",onClick:()=>_(!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:B})]}),!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 ${B===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 ${B===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})]})},CR=({name:r})=>{switch(r){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}},ud=I.forwardRef(({id:r,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:w},v)=>{const{t:x}=Ze(),[T,S]=ad.useState(!1),k=p!==void 0?p:T,B=_=>{p!==void 0?w==null||w(_):S(_)},L=`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:()=>B(!k),title:x(k?"common.hidePassword":"common.showPassword")}]:E;return l.jsxs("div",{children:[l.jsxs("label",{htmlFor:r,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:r,value:a,onChange:_=>i(_.target.value),rows:f,placeholder:c,className:L}):l.jsx("input",{ref:v,type:s==="password"&&!k?"password":"text",id:r,value:a,onChange:_=>i(_.target.value),placeholder:c,className:L}),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((_,j)=>l.jsx("button",{type:"button",onClick:_.onClick,title:_.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(CR,{name:_.icon})})},j))})]}),g&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:g})]})});ud.displayName="FormInput";const wu=({title:r,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:[r&&l.jsxs("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white flex items-center justify-between",children:[typeof r=="string"?l.jsx("span",{children:r}):r,a&&l.jsx("div",{className:"flex items-center gap-2",children:a})]}),l.jsx("div",{className:"space-y-4",children:e})]}),wR=({id:r,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,w=I.useCallback(x=>{d!==void 0?m==null||m(x):E(x)},[d,m]),v=I.useCallback(()=>{w(!p)},[p,w]);return l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:r,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:r,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:v,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 NR=class{constructor(r){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,r&&this.applySettings(r)}applySettings(r){return this.length=r.Length,this.useLowercase=r.UseLowercase,this.useUppercase=r.UseUppercase,this.useNumbers=r.UseNumbers,this.useSpecial=r.UseSpecialChars,this.useNonAmbiguous=r.UseNonAmbiguousChars,this}setLength(r){return this.length=r,this}useLowercaseLetters(r){return this.useLowercase=r,this}useUppercaseLetters(r){return this.useUppercase=r,this}useNumericCharacters(r){return this.useNumbers=r,this}useSpecialCharacters(r){return this.useSpecial=r,this}useNonAmbiguousCharacters(r){return this.useNonAmbiguous=r,this}getUnbiasedRandomIndex(r){const e=Math.floor(4294967296/r)*r;for(;;){const a=new Uint32Array(1);crypto.getRandomValues(a);const i=a[0];if(i<e)return i%r}}generateRandomPassword(){const r=this.buildCharacterSet();let e=this.generateInitialPassword(r);return e=this.ensureRequirements(e),e}buildCharacterSet(){let r="";return this.useLowercase&&(r+=this.lowercaseChars),this.useUppercase&&(r+=this.uppercaseChars),this.useNumbers&&(r+=this.numberChars),this.useSpecial&&(r+=this.specialChars),r.length===0&&(r=this.lowercaseChars),this.useNonAmbiguous&&(r=this.removeAmbiguousCharacters(r)),r}removeAmbiguousCharacters(r){for(const e of this.ambiguousChars)r=r.replace(e,"");return r}generateInitialPassword(r){let e="";for(let a=0;a<this.length;a++)e+=r[this.getUnbiasedRandomIndex(r.length)];return e}ensureRequirements(r){return this.useLowercase&&!/[a-z]/.exec(r)&&(r=this.addCharacterFromSet(r,this.getSafeCharacterSet(this.lowercaseChars))),this.useUppercase&&!/[A-Z]/.exec(r)&&(r=this.addCharacterFromSet(r,this.getSafeCharacterSet(this.uppercaseChars))),this.useNumbers&&!/\d/.exec(r)&&(r=this.addCharacterFromSet(r,this.getSafeCharacterSet(this.numberChars))),this.useSpecial&&!/[!@#$%^&*()_+\-=[\]{}|;:,.<>?]/.exec(r)&&(r=this.addCharacterFromSet(r,this.getSafeCharacterSet(this.specialChars))),r}getSafeCharacterSet(r){return this.useNonAmbiguous?this.removeAmbiguousCharacters(r):r}addCharacterFromSet(r,e){const a=this.getUnbiasedRandomIndex(this.length),i=e[this.getUnbiasedRandomIndex(e.length)];return r.substring(0,a)+i+r.substring(a+1)}},Rh=r=>new NR(r);const xR=({isOpen:r,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 S=Rh(x).generateRandomPassword();g(S)}catch(T){console.error("Error generating preview password:",T),g("")}},[]);I.useEffect(()=>{r&&(m({...s}),E({...s}))},[r,s,E]);const p=I.useCallback((x,T)=>{const S={...d,[x]:T};m(S),E(S),i==null||i(S)},[d,E,i]),w=I.useCallback(()=>{E(d)},[d,E]),v=I.useCallback(()=>{a(f),e()},[f,a,e]);return l.jsx(tr,{isOpen:r,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:v,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:w,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")})]})]})]})})},TR=({id:r,label:e,value:a,onChange:i,placeholder:s,error:c,showPassword:d,onShowPasswordChange:m,initialSettings:f,onSettingsChange:g})=>{const{t:E}=Ze(),p=Kt(),[w,v]=I.useState(!1),[x,T]=I.useState(!1),[S,k]=I.useState(null),[B,L]=I.useState(!1),P=d!==void 0?d:w,_=I.useCallback(J=>{d!==void 0?m==null||m(J):v(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)}L(!0)}}catch(re){console.error("Error loading password settings:",re)}})()},[p.sqliteClient,f]);const j=I.useCallback(J=>{try{const Ae=Rh(J).generateRandomPassword();i(Ae),_(!0)}catch(re){console.error("Error generating password:",re)}},[i,_]),V=I.useCallback(J=>{if(!S)return;const re=parseInt(J.target.value,10),Ae={...S,Length:re};k(Ae),g==null||g(Ae),j(Ae)},[S,j,g]),H=I.useCallback(()=>{S&&j(S)},[j,S]),Q=I.useCallback(J=>{i(J),_(!0)},[i,_]),G=I.useCallback(J=>{k(J),g==null||g(J)},[g]),K=I.useCallback(()=>{_(!P)},[P,_]),$=I.useCallback(()=>{T(!0)},[]);return!S||!B?l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:r,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:r,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:r,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:`${r}-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:S.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:`${r}-length`,min:"8",max:"64",value:S.Length,onChange:V,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(xR,{isOpen:x,onClose:()=>T(!1),onSave:Q,onSettingsChange:G,initialSettings:S})]})},SR=({id:r,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:r,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:r,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})]})},kR=({attachments:r,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=[...r];for(const w of Array.from(E)){const v=await w.arrayBuffer(),x=new Uint8Array(v),T={Id:crypto.randomUUID().toUpperCase(),Filename:w.name,Blob:x,ItemId:"",CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString(),IsDeleted:!1};p.push(T)}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=[...r],p=E.findIndex(w=>w.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=r.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:r="w-5 h-5"})=>l.jsx("svg",{className:r,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"})}),LR=({itemId:r})=>{const{t:e}=Ze(),a=Kt(),[i,s]=I.useState([]),[c,d]=I.useState(!0);return I.useEffect(()=>{if(!(a!=null&&a.sqliteClient)||!r){d(!1);return}try{const m=a.sqliteClient.passkeys.getByItemId(r);s(m)}catch(m){console.error("Error loading passkeys:",m)}finally{d(!1)}},[a==null?void 0:a.sqliteClient,r]),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))]})},RR=({itemId:r,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)||!r){f(!1);return}try{const p=s.sqliteClient.passkeys.getByItemId(r);d(p)}catch(p){console.error("Error loading passkeys:",p)}finally{f(!1)}},[s==null?void 0:s.sqliteClient,r]);const g=p=>{e.includes(p)||a([...e,p])},E=p=>{a(e.filter(w=>w!==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 DR=r=>{const e=new ArrayBuffer(8),a=new Uint8Array(e);let i=r;for(let s=7;s>=0&&i!==0;s--)a[s]=i&255,i-=a[s],i/=256;return a};function Ju(r){if(!Number.isSafeInteger(r)||r<0)throw new Error("positive integer expected, got "+r)}function BR(r){return r instanceof Uint8Array||ArrayBuffer.isView(r)&&r.constructor.name==="Uint8Array"}function dd(r,...e){if(!BR(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error("Uint8Array expected of length "+e+", got length="+r.length)}function UR(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ju(r.outputLen),Ju(r.blockLen)}function Eo(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function TI(r,e){dd(r);const a=e.outputLen;if(r.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 _R(r){return new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4))}function xf(r){return new DataView(r.buffer,r.byteOffset,r.byteLength)}function Nr(r,e){return r<<32-e|r>>>e}function Tf(r,e){return r<<e|r>>>32-e>>>0}const SE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function MR(r){return r<<24&4278190080|r<<8&16711680|r>>>8&65280|r>>>24&255}function kE(r){for(let e=0;e<r.length;e++)r[e]=MR(r[e])}function FR(r){if(typeof r!="string")throw new Error("utf8ToBytes expected string, got "+typeof r);return new Uint8Array(new TextEncoder().encode(r))}function md(r){return typeof r=="string"&&(r=FR(r)),dd(r),r}class Dh{clone(){return this._cloneInto()}}function Co(r){const e=i=>r().update(md(i)).digest(),a=r();return e.outputLen=a.outputLen,e.blockLen=a.blockLen,e.create=()=>r(),e}class SI extends Dh{update(e){return Eo(this),this.iHash.update(e),this}digestInto(e){Eo(this),dd(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,UR(e);const i=md(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=(r,e,a)=>new SI(r,e).update(a).digest();ih.create=(r,e)=>new SI(r,e);function OR(r,e,a,i){if(typeof r.setBigUint64=="function")return r.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;r.setUint32(e+f,d,i),r.setUint32(e+g,m,i)}function kI(r,e,a){return r&e^~r&a}function LI(r,e,a){return r&e^r&a^e&a}class Bh extends Dh{update(e){Eo(this);const{view:a,buffer:i,blockLen:s}=this;e=md(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=xf(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),TI(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;OR(i,s-8,BigInt(this.length*8),c),this.process(i,0);const m=xf(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=xf(this.buffer)}}const Rl=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),Hi=new Uint32Array(80);class jR extends Bh{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]=Tf(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=kI(s,c,d),E=1518500249):f<40?(g=s^c^d,E=1859775393):f<60?(g=LI(s,c,d),E=2400959708):(g=s^c^d,E=3395469782);const p=Tf(i,5)+g+m+E+Hi[f]|0;m=d,d=c,c=Tf(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=Rl[0]|0,this.B=Rl[1]|0,this.C=Rl[2]|0,this.D=Rl[3]|0,this.E=Rl[4]|0}}const PR=Co(()=>new jR),HR=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 RI extends Bh{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 w=Qi[p-15],v=Qi[p-2],x=Nr(w,7)^Nr(w,18)^w>>>3,T=Nr(v,17)^Nr(v,19)^v>>>10;Qi[p]=T+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 w=Nr(m,6)^Nr(m,11)^Nr(m,25),v=E+w+kI(m,f,g)+HR[p]+Qi[p]|0,T=(Nr(i,2)^Nr(i,13)^Nr(i,22))+LI(i,s,c)|0;E=g,g=f,f=m,m=d+v|0,d=c,c=s,s=i,i=v+T|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 zR extends RI{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 QR=Co(()=>new RI),VR=Co(()=>new zR),Nu=BigInt(2**32-1),sh=BigInt(32);function DI(r,e=!1){return e?{h:Number(r&Nu),l:Number(r>>sh&Nu)}:{h:Number(r>>sh&Nu)|0,l:Number(r&Nu)|0}}function BI(r,e=!1){let a=new Uint32Array(r.length),i=new Uint32Array(r.length);for(let s=0;s<r.length;s++){const{h:c,l:d}=DI(r[s],e);[a[s],i[s]]=[c,d]}return[a,i]}const GR=(r,e)=>BigInt(r>>>0)<<sh|BigInt(e>>>0),KR=(r,e,a)=>r>>>a,qR=(r,e,a)=>r<<32-a|e>>>a,WR=(r,e,a)=>r>>>a|e<<32-a,YR=(r,e,a)=>r<<32-a|e>>>a,JR=(r,e,a)=>r<<64-a|e>>>a-32,XR=(r,e,a)=>r>>>a-32|e<<64-a,$R=(r,e)=>e,ZR=(r,e)=>r,UI=(r,e,a)=>r<<a|e>>>32-a,_I=(r,e,a)=>e<<a|r>>>32-a,MI=(r,e,a)=>e<<a-32|r>>>64-a,FI=(r,e,a)=>r<<a-32|e>>>64-a;function eD(r,e,a,i){const s=(e>>>0)+(i>>>0);return{h:r+a+(s/2**32|0)|0,l:s|0}}const tD=(r,e,a)=>(r>>>0)+(e>>>0)+(a>>>0),aD=(r,e,a,i)=>e+a+i+(r/2**32|0)|0,nD=(r,e,a,i)=>(r>>>0)+(e>>>0)+(a>>>0)+(i>>>0),rD=(r,e,a,i,s)=>e+a+i+s+(r/2**32|0)|0,iD=(r,e,a,i,s)=>(r>>>0)+(e>>>0)+(a>>>0)+(i>>>0)+(s>>>0),sD=(r,e,a,i,s,c)=>e+a+i+s+c+(r/2**32|0)|0,Nt={fromBig:DI,split:BI,toBig:GR,shrSH:KR,shrSL:qR,rotrSH:WR,rotrSL:YR,rotrBH:JR,rotrBL:XR,rotr32H:$R,rotr32L:ZR,rotlSH:UI,rotlSL:_I,rotlBH:MI,rotlBL:FI,add:eD,add3L:tD,add3H:aD,add4L:nD,add4H:rD,add5H:sD,add5L:iD},[oD,lD]=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(r=>BigInt(r))),Vi=new Uint32Array(80),Gi=new Uint32Array(80);class OI extends Bh{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:w,Gh:v,Gl:x,Hh:T,Hl:S}=this;return[e,a,i,s,c,d,m,f,g,E,p,w,v,x,T,S]}set(e,a,i,s,c,d,m,f,g,E,p,w,v,x,T,S){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=w|0,this.Gh=v|0,this.Gl=x|0,this.Hh=T|0,this.Hl=S|0}process(e,a){for(let L=0;L<16;L++,a+=4)Vi[L]=e.getUint32(a),Gi[L]=e.getUint32(a+=4);for(let L=16;L<80;L++){const P=Vi[L-15]|0,_=Gi[L-15]|0,j=Nt.rotrSH(P,_,1)^Nt.rotrSH(P,_,8)^Nt.shrSH(P,_,7),V=Nt.rotrSL(P,_,1)^Nt.rotrSL(P,_,8)^Nt.shrSL(P,_,7),H=Vi[L-2]|0,Q=Gi[L-2]|0,G=Nt.rotrSH(H,Q,19)^Nt.rotrBH(H,Q,61)^Nt.shrSH(H,Q,6),K=Nt.rotrSL(H,Q,19)^Nt.rotrBL(H,Q,61)^Nt.shrSL(H,Q,6),$=Nt.add4L(V,K,Gi[L-7],Gi[L-16]),J=Nt.add4H($,j,G,Vi[L-7],Vi[L-16]);Vi[L]=J|0,Gi[L]=$|0}let{Ah:i,Al:s,Bh:c,Bl:d,Ch:m,Cl:f,Dh:g,Dl:E,Eh:p,El:w,Fh:v,Fl:x,Gh:T,Gl:S,Hh:k,Hl:B}=this;for(let L=0;L<80;L++){const P=Nt.rotrSH(p,w,14)^Nt.rotrSH(p,w,18)^Nt.rotrBH(p,w,41),_=Nt.rotrSL(p,w,14)^Nt.rotrSL(p,w,18)^Nt.rotrBL(p,w,41),j=p&v^~p&T,V=w&x^~w&S,H=Nt.add5L(B,_,V,lD[L],Gi[L]),Q=Nt.add5H(H,k,P,j,oD[L],Vi[L]),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=T|0,B=S|0,T=v|0,S=x|0,v=p|0,x=w|0,{h:p,l:w}=Nt.add(g|0,E|0,Q|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,Q,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:w}=Nt.add(this.Eh|0,this.El|0,p|0,w|0),{h:v,l:x}=Nt.add(this.Fh|0,this.Fl|0,v|0,x|0),{h:T,l:S}=Nt.add(this.Gh|0,this.Gl|0,T|0,S|0),{h:k,l:B}=Nt.add(this.Hh|0,this.Hl|0,k|0,B|0),this.set(i,s,c,d,m,f,g,E,p,w,v,x,T,S,k,B)}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 cD extends OI{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 uD=Co(()=>new OI),dD=Co(()=>new cD),jI=[],PI=[],HI=[],mD=BigInt(0),Dl=BigInt(1),gD=BigInt(2),fD=BigInt(7),hD=BigInt(256),AD=BigInt(113);for(let r=0,e=Dl,a=1,i=0;r<24;r++){[a,i]=[i,(2*a+3*i)%5],jI.push(2*(5*i+a)),PI.push((r+1)*(r+2)/2%64);let s=mD;for(let c=0;c<7;c++)e=(e<<Dl^(e>>fD)*AD)%hD,e&gD&&(s^=Dl<<(Dl<<BigInt(c))-Dl);HI.push(s)}const[pD,yD]=BI(HI,!0),LE=(r,e,a)=>a>32?MI(r,e,a):UI(r,e,a),RE=(r,e,a)=>a>32?FI(r,e,a):_I(r,e,a);function ED(r,e=24){const a=new Uint32Array(10);for(let i=24-e;i<24;i++){for(let d=0;d<10;d++)a[d]=r[d]^r[d+10]^r[d+20]^r[d+30]^r[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=LE(g,E,1)^a[m],w=RE(g,E,1)^a[m+1];for(let v=0;v<50;v+=10)r[d+v]^=p,r[d+v+1]^=w}let s=r[2],c=r[3];for(let d=0;d<24;d++){const m=PI[d],f=LE(s,c,m),g=RE(s,c,m),E=jI[d];s=r[E],c=r[E+1],r[E]=f,r[E+1]=g}for(let d=0;d<50;d+=10){for(let m=0;m<10;m++)a[m]=r[d+m];for(let m=0;m<10;m++)r[d+m]^=~a[(m+2)%10]&a[(m+4)%10]}r[0]^=pD[i],r[1]^=yD[i]}a.fill(0)}class Uh extends Dh{keccak(){SE||kE(this.state32),ED(this.state32,this.rounds),SE||kE(this.state32),this.posOut=0,this.pos=0}update(e){Eo(this);const{blockLen:a,state:i}=this;e=md(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),dd(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 Ju(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(TI(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 Uh(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,Ju(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=_R(this.state)}}const gd=(r,e,a)=>Co(()=>new Uh(e,r,a)),bD=gd(6,144,224/8),ID=gd(6,136,256/8),vD=gd(6,104,384/8),CD=gd(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})(),DE={SHA1:PR,SHA224:VR,SHA256:QR,SHA384:dD,SHA512:uD,"SHA3-224":bD,"SHA3-256":ID,"SHA3-384":vD,"SHA3-512":CD},_h=r=>{switch(!0){case/^(?:SHA-?1|SSL3-SHA1)$/i.test(r):return"SHA1";case/^SHA(?:2?-)?224$/i.test(r):return"SHA224";case/^SHA(?:2?-)?256$/i.test(r):return"SHA256";case/^SHA(?:2?-)?384$/i.test(r):return"SHA384";case/^SHA(?:2?-)?512$/i.test(r):return"SHA512";case/^SHA3-224$/i.test(r):return"SHA3-224";case/^SHA3-256$/i.test(r):return"SHA3-256";case/^SHA3-384$/i.test(r):return"SHA3-384";case/^SHA3-512$/i.test(r):return"SHA3-512";default:throw new TypeError(`Unknown hash algorithm: ${r}`)}},wD=(r,e,a)=>{if(ih){const i=DE[r]??DE[_h(r)];return ih(i,e,a)}else throw new Error("Missing HMAC function")},oh="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",ND=r=>{r=r.replace(/ /g,"");let e=r.length;for(;r[e-1]==="=";)--e;r=(e<r.length?r.substring(0,e):r).toUpperCase();const a=new ArrayBuffer(r.length*5/8|0),i=new Uint8Array(a);let s=0,c=0,d=0;for(let m=0;m<r.length;m++){const f=oh.indexOf(r[m]);if(f===-1)throw new TypeError(`Invalid character found: ${r[m]}`);c=c<<5|f,s+=5,s>=8&&(s-=8,i[d++]=c>>>s)}return i},xD=r=>{let e=0,a=0,i="";for(let s=0;s<r.length;s++)for(a=a<<8|r[s],e+=8;e>=5;)i+=oh[a>>>e-5&31],e-=5;return e>0&&(i+=oh[a<<5-e&31]),i},TD=r=>{r=r.replace(/ /g,"");const e=new ArrayBuffer(r.length/2),a=new Uint8Array(e);for(let i=0;i<r.length;i+=2)a[i/2]=parseInt(r.substring(i,i+2),16);return a},SD=r=>{let e="";for(let a=0;a<r.length;a++){const i=r[a].toString(16);i.length===1&&(e+="0"),e+=i}return e.toUpperCase()},kD=r=>{const e=new ArrayBuffer(r.length),a=new Uint8Array(e);for(let i=0;i<r.length;i++)a[i]=r.charCodeAt(i)&255;return a},LD=r=>{let e="";for(let a=0;a<r.length;a++)e+=String.fromCharCode(r[a]);return e},BE=bo.TextEncoder?new bo.TextEncoder:null,UE=bo.TextDecoder?new bo.TextDecoder:null,RD=r=>{if(!BE)throw new Error("Encoding API not available");return BE.encode(r)},DD=r=>{if(!UE)throw new Error("Encoding API not available");return UE.decode(r)},BD=r=>{var e;if((e=bo.crypto)!=null&&e.getRandomValues)return bo.crypto.getRandomValues(new Uint8Array(r));throw new Error("Cryptography API not available")};class si{static fromLatin1(e){return new si({buffer:kD(e).buffer})}static fromUTF8(e){return new si({buffer:RD(e).buffer})}static fromBase32(e){return new si({buffer:ND(e).buffer})}static fromHex(e){return new si({buffer:TD(e).buffer})}get buffer(){return this.bytes.buffer}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,writable:!1,configurable:!1,value:LD(this.bytes)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,writable:!1,configurable:!1,value:DD(this.bytes)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,writable:!1,configurable:!1,value:xD(this.bytes)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,writable:!1,configurable:!1,value:SD(this.bytes)}),this.hex}constructor({buffer:e,size:a=20}={}){this.bytes=typeof e>"u"?BD(a):new Uint8Array(e),Object.defineProperty(this,"bytes",{enumerable:!0,writable:!1,configurable:!1,value:this.bytes})}}const UD=(r,e)=>{{if(r.length!==e.length)throw new TypeError("Input strings must have the same length");let a=-1,i=0;for(;++a<r.length;)i|=r.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=wD(a,e.bytes,DR(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});UD(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 si,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"?si.fromBase32(s):s,this.algorithm=_h(c),this.digits=d,this.counter=m}}class Ca{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}static counter({period:e=Ca.defaults.period,timestamp:a=Date.now()}={}){return Math.floor(a/1e3/e)}counter({timestamp:e=Date.now()}={}){return Ca.counter({period:this.period,timestamp:e})}static remaining({period:e=Ca.defaults.period,timestamp:a=Date.now()}={}){return e*1e3-a%(e*1e3)}remaining({timestamp:e=Date.now()}={}){return Ca.remaining({period:this.period,timestamp:e})}static generate({secret:e,algorithm:a,digits:i,period:s=Ca.defaults.period,timestamp:c=Date.now()}){return Da.generate({secret:e,algorithm:a,digits:i,counter:Ca.counter({period:s,timestamp:c})})}generate({timestamp:e=Date.now()}={}){return Ca.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=Ca.defaults.period,timestamp:d=Date.now(),window:m}){return Da.validate({token:e,secret:a,algorithm:i,digits:s,counter:Ca.counter({period:c,timestamp:d}),window:m})}validate({token:e,timestamp:a,window:i}){return Ca.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=Ca.defaults.issuer,label:a=Ca.defaults.label,issuerInLabel:i=Ca.defaults.issuerInLabel,secret:s=new si,algorithm:c=Ca.defaults.algorithm,digits:d=Ca.defaults.digits,period:m=Ca.defaults.period}={}){this.issuer=e,this.label=a,this.issuerInLabel=i,this.secret=typeof s=="string"?si.fromBase32(s):s,this.algorithm=_h(c),this.digits=d,this.period=m}}const _D=/^otpauth:\/\/([ht]otp)\/(.+)\?([A-Z0-9.~_-]+=[^?&]*(?:&[A-Z0-9.~_-]+=[^?&]*)*)$/i,MD=/^[2-7A-Z]+=*$/i,FD=/^SHA(?:1|224|256|384|512|3-224|3-256|3-384|3-512)$/i,OD=/^[+-]?\d+$/,_E=/^\+?[1-9]\d*$/;class jD{static parse(e){let a;try{a=e.match(_D)}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(),w=E[1],v=f;return v[p]=w,v},{});let d;const m={};if(i==="hotp")if(d=Da,typeof c.counter<"u"&&OD.test(c.counter))m.counter=parseInt(c.counter,10);else throw new TypeError("Missing or invalid 'counter' parameter");else if(i==="totp"){if(d=Ca,typeof c.period<"u")if(_E.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"&&MD.test(c.secret))m.secret=c.secret;else throw new TypeError("Missing or invalid 'secret' parameter");if(typeof c.algorithm<"u")if(FD.test(c.algorithm))m.algorithm=c.algorithm;else throw new TypeError("Invalid 'algorithm' parameter");if(typeof c.digits<"u")if(_E.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 Ca)return e.toString();throw new TypeError("Invalid 'HOTP/TOTP' object")}}const PD=({totpCodes:r,onTotpCodesChange:e,originalTotpCodeIds:a,isAddFormVisible:i,formData:s,onStateChange:c})=>{const{t:d}=Ze(),[m,f]=I.useState(null),g=(k,B)=>{let L=k.trim(),P=B.trim();if(L.toLowerCase().startsWith("otpauth://totp/"))try{const _=jD.parse(L);_ instanceof Ca&&(L=_.secret.base32,!P&&_.label&&(P=_.label))}catch{throw new Error(d("totp.errors.invalidSecretKey"))}if(L=L.replace(/\s/g,""),!/^[A-Z2-7]+=*$/i.test(L))throw new Error(d("totp.errors.invalidSecretKey"));return{secretKey:L,name:P||d("totp.defaultName")}},E=()=>{c({isAddFormVisible:!0,formData:{name:"",secretKey:""}}),f(null)},p=()=>{c({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),f(null)},w=k=>{c({isAddFormVisible:i,formData:{...s,...k}})},v=k=>{if(k==null||k.preventDefault(),f(null),!s.secretKey){f(d("items.validation.required"));return}try{const{secretKey:B,name:L}=g(s.secretKey,s.name),P={Id:crypto.randomUUID().toUpperCase(),Name:L,SecretKey:B,ItemId:""},_=[...r,P];e(_),p()}catch(B){B instanceof Error?f(B.message):f(d("common.errors.unknownErrorTryAgain"))}},x=k=>{const B=a.includes(k.Id);let L;B?L=r.map(P=>P.Id===k.Id?{...P,IsDeleted:!0}:P):L=r.filter(P=>P.Id!==k.Id),e(L)},T=r.filter(k=>!k.IsDeleted),S=T.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")}),S&&!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"})]})})]}),!S&&!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")}),S&&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=>w({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=>w({secretKey:k.target.value}),onKeyDown:k=>{k.key==="Enter"&&(k.preventDefault(),v(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=>v(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")})})]}),S&&l.jsx("div",{className:"grid grid-cols-1 gap-4 mt-4",children:T.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))})]})},HD=({inputRef:r,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]),w=I.useCallback(()=>{f(!0)},[]),v=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:r,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:w,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:v}),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:v,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))]})]})})]})]})},Xu=[{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"})})}],zD=({selectedType:r,isEditMode:e,showDropdown:a,onDropdownToggle:i,onTypeChange:s,onRegenerateAlias:c})=>{const{t:d}=Ze(),m=Xu.find(f=>f.type===r);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"})})]}),r===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:Xu.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 ${r===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:r===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)}),r===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 zI=(r=>(r.Male="Male",r.Female="Female",r.Other="Other",r))(zI||{}),Mh=class ai{constructor(){this.symbols=[".","-"]}generateUsername(e){let a=this.generateEmailPrefix(e);return a=a.replace(/[^a-zA-Z0-9]/g,""),a.length<ai.MIN_LENGTH?a+=this.generateRandomString(ai.MIN_LENGTH-a.length):a.length>ai.MAX_LENGTH&&(a=a.substring(0,ai.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<ai.MIN_LENGTH?i+=this.generateRandomString(ai.MIN_LENGTH-i.length):i.length>ai.MAX_LENGTH&&(i=i.substring(0,ai.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}};Mh.MIN_LENGTH=6;Mh.MAX_LENGTH=20;var Fh=Mh,Ss=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(r){if(r){const{targetYear:m,yearDeviation:f}=r;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),w=new Date(E,11,31),v=p.getTime()+this.random()*(w.getTime()-p.getTime());return new Date(v)}}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(r,e){const a=r.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(r,e){const a={firstName:"",lastName:"",gender:"Male",birthDate:new Date,emailPrefix:"",nickName:""};let i;r==="random"||r===void 0?i=this.random()<.5?"Male":"Female":r==="male"?i="Male":r==="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 Fh;return a.emailPrefix=c.generateEmailPrefix(a),a.nickName=c.generateUsername(a),a}},QD=["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"],VD=["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"],GD=["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"],ME=class extends Ss{getFirstNamesMaleJson(){return QD}getFirstNamesFemaleJson(){return VD}getLastNamesJson(){return GD}},KD=["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"],qD=["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"],WD=["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"],YD=class extends Ss{getFirstNamesMaleJson(){return KD}getFirstNamesFemaleJson(){return qD}getLastNamesJson(){return WD}},JD=["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"],XD=["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"],$D=["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"],ZD=["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"],eB=["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"],tB=["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"],aB=["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"],nB=["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"],rB=["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"],iB=["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"],sB=["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"],oB=["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"],lB=["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"],cB=["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"],uB=["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"],dB=["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"],mB=["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 Ss{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return JD}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:XD},{startYear:1960,endYear:1969,names:$D},{startYear:1970,endYear:1979,names:ZD},{startYear:1980,endYear:1989,names:eB},{startYear:1990,endYear:1999,names:tB},{startYear:2e3,endYear:2009,names:aB},{startYear:2010,endYear:2019,names:nB},{startYear:2020,endYear:2029,names:rB}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:iB},{startYear:1960,endYear:1969,names:sB},{startYear:1970,endYear:1979,names:oB},{startYear:1980,endYear:1989,names:lB},{startYear:1990,endYear:1999,names:cB},{startYear:2e3,endYear:2009,names:uB},{startYear:2010,endYear:2019,names:dB},{startYear:2020,endYear:2029,names:mB}]}},fB=["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"],hB=["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"],AB=["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"],pB=["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"],yB=["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"],EB=["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"],bB=["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"],IB=["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"],vB=["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"],CB=["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"],wB=["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"],NB=["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"],xB=["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"],TB=["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"],SB=["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"],kB=class extends Ss{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return fB}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:hB},{startYear:1960,endYear:1969,names:AB},{startYear:1970,endYear:1979,names:pB},{startYear:1980,endYear:1989,names:yB},{startYear:1990,endYear:1999,names:EB},{startYear:2e3,endYear:2009,names:bB},{startYear:2010,endYear:2019,names:IB}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:vB},{startYear:1960,endYear:1969,names:CB},{startYear:1970,endYear:1979,names:wB},{startYear:1980,endYear:1989,names:NB},{startYear:1990,endYear:1999,names:xB},{startYear:2e3,endYear:2009,names:TB},{startYear:2010,endYear:2019,names:SB}]}},LB=["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"],RB=["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"],DB=["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"],BB=class extends Ss{getFirstNamesMaleJson(){return LB}getFirstNamesFemaleJson(){return RB}getLastNamesJson(){return DB}},UB=["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"],_B=["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"],MB=["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"],FB=["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"],OB=["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"],jB=["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"],PB=["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"],HB=["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"],zB=["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"],QB=["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"],VB=["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"],GB=["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"],KB=["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"],qB=["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"],WB=["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"],YB=class extends Ss{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return UB}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:_B},{startYear:1960,endYear:1969,names:MB},{startYear:1970,endYear:1979,names:FB},{startYear:1980,endYear:1989,names:OB},{startYear:1990,endYear:1999,names:jB},{startYear:2e3,endYear:2009,names:PB},{startYear:2010,endYear:2019,names:HB}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:zB},{startYear:1960,endYear:1969,names:QB},{startYear:1970,endYear:1979,names:VB},{startYear:1980,endYear:1989,names:GB},{startYear:1990,endYear:1999,names:KB},{startYear:2e3,endYear:2009,names:qB},{startYear:2010,endYear:2019,names:WB}]}},JB=["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"],XB=["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"],$B=["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"],ZB=class extends Ss{getFirstNamesMaleJson(){return JB}getFirstNamesFemaleJson(){return XB}getLastNamesJson(){return $B}},eU=class{static normalizeBirthDate(r){if(!r||r.trim()===""||r.startsWith("0001-01-01"))return"";const e=r.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(r){if(!r||r.trim()===""||r.startsWith("0001-01-01"))return!1;const e=new Date(r);return isNaN(e.getTime())?!1:e.getFullYear()>1&&e.getFullYear()<9999}};function tU(){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 aU(r){if(r==="random"||!r)return null;const e=r.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 nU(){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:"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:"fa",label:"فارسی",flag:"🇮🇷",alternativeCodes:["fa-IR","fa-AF"]}].sort((e,a)=>e.label.localeCompare(a.label))}var rU=r=>{switch(r.toLowerCase()){case"en":return new ME;case"nl":return new YD;case"de":return new gB;case"it":return new kB;case"es":return new BB;case"ro":return new YB;case"fa":return new ZB;default:return console.warn(`Language '${r}' is not supported. Falling back to English.`),new ME}};const iU=()=>{const r=Kt(),[e,a]=I.useState({username:null,password:null,email:null}),i=I.useCallback(async()=>{if(!(r!=null&&r.sqliteClient))throw new Error("Database not initialized");const d=r.sqliteClient.settings.getEffectiveIdentityLanguage(),m=rU(d),f=r.sqliteClient.settings.getPasswordSettings(),g=Rh(f);return{identityGenerator:m,passwordGenerator:g}},[r==null?void 0:r.sqliteClient]),s=I.useCallback(async()=>{if(!(r!=null&&r.sqliteClient))return null;try{const{identityGenerator:d,passwordGenerator:m}=await i(),f=r.sqliteClient.settings.getDefaultIdentityGender(),g=r.sqliteClient.settings.getDefaultIdentityAgeRange(),E=aU(g),p=d.generateRandomIdentity(f,E),w=m.generateRandomPassword(),v=r.sqliteClient.settings.getDefaultEmailDomain(),x=v?`${p.emailPrefix}@${v}`:p.emailPrefix,T={email:x,firstName:p.firstName,lastName:p.lastName,gender:p.gender,birthdate:eU.normalizeBirthDate(p.birthDate.toISOString()),username:p.nickName,password:w};return a({username:p.nickName,password:w,email:x}),T}catch(d){return console.error("Error generating random alias:",d),null}},[r==null?void 0:r.sqliteClient,i]),c=I.useCallback(()=>new Fh().generateRandomEmailPrefix(),[]);return{generateAlias:s,generateRandomEmailPrefix:c,lastGeneratedValues:e,setLastGeneratedValues:a}},sU=({formId:r,isLoading:e,formData:a,onRestore:i,skipRestore:s=!1})=>{const c=I.useRef(!1),d=I.useCallback(async()=>{if(e)return;await gt("PERSIST_FORM_VALUES",JSON.stringify({formId:r,data:a}),"background")},[r,a,e]),m=I.useCallback(async()=>{if(s||c.current)return!1;const g=await gt("GET_PERSISTED_FORM_VALUES",null,"background");try{if(!g)return!1;let E=null;try{E=JSON.parse(g)}catch(w){return console.error("Error parsing persisted form data:",w),!1}return E.formId===r?(c.current=!0,i(E.data),!0):!1}catch(E){return console.error("Error loading persisted form data:",E),!1}},[r,i,s]),f=I.useCallback(async()=>{await gt("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"]},Sf={male:["male","man","m","gender1","mr","mr."],female:["female","woman","f","gender2","mrs","mrs.","ms","ms."],other:["other","diverse","custom","prefer not","unknown","gender3"]},oU=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"]},kf={male:["man","mannelijk","heer"],female:["vrouw","vrouwelijk","mevrouw"],other:["anders","iets","overig","onbekend"]},lU=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])]},Bl={male:[...new Set([...Sf.male,...kf.male])],female:[...new Set([...Sf.female,...kf.female])],other:[...new Set([...Sf.other,...kf.other])]},FE=new Set([...oU,...lU]);class OE{constructor(e,a){ze(this,"document");ze(this,"clickedElement");ze(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 T=x.length>=3&&x.length<=c,S=x.split(/[\s|\-—/\\]+/).length<=s;return T&&S},m=x=>{const T=x.toLowerCase().split(" ").map(B=>B.toLowerCase());let S=0;for(;S<T.length&&FE.has(T[S].toLowerCase());)S++;let k=T.length-1;for(;k>S&&FE.has(T[k].toLowerCase());)k--;return T.slice(S,k+1)},f=(x,T)=>x.split(/[\s|]+/).filter(S=>T.includes(S.toLowerCase())).join(" "),g=a.hostname.replace(/^www\./,""),p=/[|\-—/\\:]/.exec(i);if(p){const x=p.index,T=i.substring(0,x).trim(),S=i.substring(x+1).trim(),k=m(T),B=m(S),L=f(T,k),P=f(S,B),_=d(L),j=d(P);if(_&&j)return[L,P,g];if(_)return[L,g];if(j)return[P,g]}const w=m(i),v=f(i,w);return d(v)?[v,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,w,v,x,T,S,k,B,L,P,_;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 V=j;return V.shadowRoot?V.shadowRoot.querySelector("input, textarea")!==null:!1}),g=[...c,...m].filter((j,V,H)=>H.indexOf(j)===V),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())||((w=j.getAttribute("type"))==null?void 0:w.toLowerCase())||"";const Q=j,G=Q.shadowRoot&&Q.shadowRoot.querySelector("input, textarea");if(G&&!H){const M=Q.shadowRoot.querySelector("input, textarea");M&&(H=((v=M.type)==null?void 0:v.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("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 $=((T=j.getAttribute("aria-describedby"))==null?void 0:T.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(M=>(M==null?void 0:M.toLowerCase())??"");if(j.id||j.getAttribute("name")){const M=this.document.querySelector(`label[for="${j.id||j.getAttribute("name")}"]`);M&&J.push(((S=M.textContent)==null?void 0:S.toLowerCase())??"")}const re=j.getAttribute("aria-describedby");if(re){const M=re.split(/\s+/);for(const q of M){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 M=0;M<3&&X;M++){const q=X.querySelectorAll('[slot="label"], [slot="helper-text"]');for(const ee of Array.from(q)){const ne=((B=ee.textContent)==null?void 0:B.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 M of Array.from(ie.children))M!==j&&Array.from(M.classList).some(q=>q.toLowerCase().includes("label"))&&J.push(((L=M.textContent)==null?void 0:L.toLowerCase())??"");let ce=j;for(let M=0;M<5&&ce&&!(ce.children.length>15);M++){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(((_=Ie.textContent)==null?void 0:_.toLowerCase())??"");break}}break}ce=ce.parentElement}let ye=a.length;for(let M=0;M<a.length;M++)if(J.some(q=>q.includes(a[M]))){ye=M;break}ye<a.length&&E.push({input:j,score:ye})}return E.sort((j,V)=>j.score-V.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 w;return((w=p.textContent)==null?void 0:w.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,w;const E=[g.value,g.id,g.name,((w=(p=g.labels)==null?void 0:p[0])==null?void 0:w.textContent)??""].map(v=>(v==null?void 0:v.toLowerCase())??"");return f&&(Bl.male.some(v=>E.some(x=>x.includes(v)))||Bl.female.some(v=>E.some(x=>x.includes(v))))?!1:m.some(v=>E.some(x=>x.includes(v)))})??null;return{type:"radio",field:null,radioButtons:{male:d(Bl.male),female:d(Bl.female),other:d(Bl.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(){const e=this.getFormWrapper();if(!this.clickedElement)return!1;const a=this.getActualInputElement(this.clickedElement),i=[this.clickedElement,a].filter((m,f,g)=>m&&g.indexOf(m)===f);if(this.findAllInputFields(e,va.username,["text"]).some(m=>i.includes(m)))return!0;const c=this.findPasswordField(e);return!!(c.primary&&i.includes(c.primary)||c.confirm&&i.includes(c.confirm)||this.findAllInputFields(e,va.email,["text","email"]).some(m=>i.includes(m)))}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 jE{static getServiceInfo(e,a){const i=OE.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=OE.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 cU=()=>{const[r]=Ob();return{detectService:I.useCallback(async a=>{let i=a||"",s="";try{const c=r.get("serviceName"),d=r.get("serviceUrl"),m=r.get("currentUrl");if(c||d||m){if(c&&(i=decodeURIComponent(c)),d&&(s=decodeURIComponent(d)),m&&(!c||!d)){const f=decodeURIComponent(m),g=jE.getServiceInfoFromTab(f);!c&&g.suggestedNames.length>0&&(i=g.suggestedNames[0]),!d&&g.serviceUrl&&(s=g.serviceUrl)}}else{const[f]=await Cs.tabs.query({active:!0,currentWindow:!0});if(f!=null&&f.url){const g=jE.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}},[r])}},uU=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=uU){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(Ao.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 dU=[fa.Login,fa.Alias,fa.CreditCard,fa.Note],mU=fa.Login,PE=()=>{const{t:r}=Ze(),{id:e}=rd(),[a]=Ob(),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}=Ts(),{setHeaderButtons:E}=fr(),{setIsInitialLoading:p}=Aa(),{generateAlias:w,generateRandomEmailPrefix:v,lastGeneratedValues:x}=iU(),{detectService:T}=cU(),S=mr(),[k,B]=I.useState(!0),[L,P]=I.useState(!1),[_,j]=I.useState(null),[V,H]=I.useState({}),[Q,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),M=I.useRef(null),[q,ee]=I.useState(!1),[ne,Ie]=I.useState(new Set),[we,Re]=I.useState(new Set),[Be,ke]=I.useState([]),[Qe,pt]=I.useState([]),[Dt,_t]=I.useState({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),[et,nt]=I.useState([]),[Ht,Ce]=I.useState([]),[se,De]=I.useState([]),[je,Ve]=I.useState(!0),[Ye,ut]=I.useState(void 0),[Mt]=I.useState(!1),Pt=I.useCallback(le=>{le.item&&j(le.item),le.fieldValues&&H(le.fieldValues),le.customFields&&G(le.customFields),le.totpEditorState&&_t(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&&Ve(le.isLoginEmailInEmailMode),le.passwordSettings!==void 0&&ut(le.passwordSettings)},[]),{loadPersistedValues:Gt,clearPersistedValues:ia}=sU({formId:e||null,isLoading:k,formData:{item:_,fieldValues:V,customFields:Q,totpEditorState:Dt,show2FA:Ae,showAttachments:ie,manuallyAddedFields:Array.from(ne),isLoginEmailInEmailMode:je,passwordSettings:Ye},onRestore:Pt,skipRestore:Mt}),U=I.useMemo(()=>_?xk(_.ItemType):[],[_]),C=I.useMemo(()=>U.find(le=>le.FieldKey==="notes.content"),[U]),N=I.useMemo(()=>_?Tk(_.ItemType):[],[_]),z=I.useMemo(()=>{const le=new Set;return U.forEach(Me=>{_&&Ml(Me,_.ItemType)&&le.add(Me.FieldKey)}),ne.forEach(Me=>le.add(Me)),we.forEach(Me=>le.add(Me)),Object.keys(V).forEach(Me=>{const _e=V[Me];_e&&(Array.isArray(_e)?_e.length>0:_e.toString().trim()!=="")&&le.add(Me)}),le},[_,U,ne,we,V]),ae=I.useCallback(le=>{if(!_)return!1;if(ne.has(le.FieldKey)||we.has(le.FieldKey))return!0;const Me=U.find(_e=>_e.FieldKey===le.FieldKey);return Me?Ml(Me,_.ItemType):!0},[_,U,ne,we]),he=I.useMemo(()=>U.filter(le=>le.Category===ct.Primary),[U]),be=I.useMemo(()=>{const le={};return U.forEach(Me=>{if(Me.Category===ct.Notes||Me.Category===ct.Metadata||Me.Category===ct.Primary)return;const _e=Me.Category;le[_e]||(le[_e]=[]),le[_e].push(Me)}),le},[U]);I.useEffect(()=>{if(!(s!=null&&s.sqliteClient)||!e||!c){const le=d&&dU.includes(d)?d:mU;(async()=>{const{serviceName:_e,serviceUrl:Xe}=await T(m),kt={Id:crypto.randomUUID().toUpperCase(),Name:_e,ItemType:le,FolderId:f||null,Fields:[],CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString()};if(j(kt),Ve(le===fa.Login),Xe&&H(rt=>({...rt,"login.url":Xe})),s!=null&&s.sqliteClient){const rt=s.sqliteClient.folders.getAll();$(rt)}await vt.getSkipFormRestore()?await vt.setSkipFormRestore(!1):await Gt(),B(!1),p(!1)})();return}try{const le=s.sqliteClient.items.getById(e);if(le){j(le);const Me=s.sqliteClient.folders.getAll();$(Me);const _e={},Xe=[],kt=new Set;le.Fields.forEach(it=>{_e[it.FieldKey]=it.Value,kt.add(it.FieldKey),it.IsCustomField&&Xe.push({tempId:it.FieldKey,label:it.Label,fieldType:it.FieldType,isHidden:it.IsHidden,displayOrder:it.DisplayOrder})}),H(_e),G(Xe),Re(kt);const bt=s.sqliteClient.settings.getTotpCodesForItem(e);ke(bt),pt(bt.map(it=>it.Id)),bt.length>0&&X(!0);const rt=s.sqliteClient.settings.getAttachmentsForItem(e);nt(rt),Ce(rt.map(it=>it.Id)),rt.length>0&&ce(!0),B(!1),p(!1)}else console.error("Item not found"),i("/items")}catch(le){console.error("Error loading item:",le),B(!1),p(!1)}},[s==null?void 0:s.sqliteClient,e,c,d,m,f,i,p,T,Gt]);const Ue=I.useCallback(async()=>{const le=await w();le&&(H(Me=>{const _e=Me["login.username"]||"",Xe=Me["login.password"]||"",kt=Me["login.email"]||"",bt={...Me,"alias.first_name":le.firstName,"alias.last_name":le.lastName,"alias.gender":le.gender,"alias.birthdate":le.birthdate};return(!kt||kt===x.email)&&(bt["login.email"]=le.email),(!_e||_e===x.username)&&(bt["login.username"]=le.username),(!Xe||Xe===x.password)&&(bt["login.password"]=le.password),bt}),ee(!0))},[w,x]),ft=I.useCallback(()=>{if(!(s!=null&&s.sqliteClient))return;const le=V["alias.first_name"]||"",Me=V["alias.last_name"]||"";let _e;if(!le.trim()&&!Me.trim())_e=v();else{const bt=V["alias.gender"]||zI.Other,rt=V["alias.birthdate"]||"";_e=new Fh().generateEmailPrefix({firstName:le,lastName:Me,gender:bt,birthDate:rt?new Date(rt):new Date,emailPrefix:"",nickName:""})}const Xe=s.sqliteClient.settings.getDefaultEmailDomain(),kt=Xe?`${_e}@${Xe}`:_e;H(bt=>({...bt,"login.email":kt}))},[s==null?void 0:s.sqliteClient,V,v]),Et=I.useCallback(()=>{if(!(s!=null&&s.sqliteClient))return;const le=v(),Me=s.sqliteClient.settings.getDefaultEmailDomain(),_e=Me?`${le}@${Me}`:le;H(Xe=>({...Xe,"login.email":_e}))},[s==null?void 0:s.sqliteClient,v]),St=I.useCallback(async()=>{const le=await w();le&&H(Me=>({...Me,"login.username":le.username}))},[w]),dt=I.useMemo(()=>{if(!_)return!1;const le=U.find(Me=>Me.FieldKey==="alias.first_name");return le?Ml(le,_.ItemType):!1},[_,U]),hr=I.useMemo(()=>U.some(le=>le.FieldKey==="login.username"||le.FieldKey==="login.password"),[U]);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&&M.current&&M.current.focus()},[c,k]);const sa=I.useCallback((le,Me)=>{H(_e=>({..._e,[le]:Me}))},[]),rn=I.useCallback(async()=>{if(_)try{const le=[];U.forEach(_e=>{const Xe=V[_e.FieldKey];Xe&&(Array.isArray(Xe)?Xe.length>0:Xe.trim()!=="")&&le.push({FieldKey:_e.FieldKey,Label:_e.FieldKey,FieldType:_e.FieldType,Value:Xe,IsHidden:_e.IsHidden,DisplayOrder:_e.DefaultDisplayOrder,IsCustomField:!1,EnableHistory:_e.EnableHistory})}),Q.forEach(_e=>{const Xe=V[_e.tempId]||"";le.push({FieldKey:_e.tempId,Label:_e.label,FieldType:_e.fieldType,Value:Xe,IsHidden:_e.isHidden,DisplayOrder:_e.displayOrder,IsCustomField:!0,EnableHistory:!1})});let Me={..._,Id:c?_.Id:crypto.randomUUID().toUpperCase(),Fields:le,UpdatedAt:new Date().toISOString()};if(s!=null&&s.sqliteClient&&(B(!0),Me=await Ki.fetchAndAttachFavicon(Me,V["login.url"],s.sqliteClient,S)),!(s!=null&&s.sqliteClient))throw new Error("Database not initialized");await g(async()=>{if(B(!1),c){if(await s.sqliteClient.items.update(Me,Ht,et,Qe,Be),se.length>0)for(const _e of se)await s.sqliteClient.passkeys.deleteById(_e)}else await s.sqliteClient.items.create(Me,et,Be)}),ia(),c?i(-1):i(`/items/${Me.Id}`,{replace:!0})}catch(le){console.error("Error saving item:",le)}},[_,V,U,Q,s,c,g,i,Ht,et,Qe,Be,se,S,ia]),Pn=I.useCallback(async()=>{if(!(!_||!c||!(s!=null&&s.sqliteClient)))try{await g(async()=>{await s.sqliteClient.items.trash(_.Id)}),i("/items")}catch(le){console.error("Error deleting item:",le)}finally{P(!1)}},[_,c,s,g,i]),Hn=I.useCallback((le,Me)=>{const Xe={tempId:crypto.randomUUID(),label:le,fieldType:Me,isHidden:!1,displayOrder:U.length+Q.length+1};G(kt=>[...kt,Xe])},[U.length,Q.length]),Oe=I.useCallback(le=>{G(Me=>Me.filter(_e=>_e.tempId!==le)),H(Me=>{const _e={...Me};return delete _e[le],_e})},[]),ui=I.useCallback((le,Me)=>{G(_e=>_e.map(Xe=>Xe.tempId===le?{...Xe,label:Me}:Xe))},[]),ta=I.useCallback(le=>{if(!_)return;const Me=_.ItemType;!c&&Me!==le&&(H(_e=>{const Xe={};return Object.entries(_e).forEach(([kt,bt])=>{const rt=ho(kt);rt?Pl(rt,le)&&(Xe[kt]=bt):Xe[kt]=bt}),Xe}),Ie(_e=>{const Xe=new Set;return _e.forEach(kt=>{const bt=ho(kt);(!bt||Pl(bt,le))&&Xe.add(kt)}),Xe}),Re(_e=>{const Xe=new Set;return _e.forEach(kt=>{const bt=ho(kt);(!bt||Pl(bt,le))&&Xe.add(kt)}),Xe})),ye.current=!1,Ve(le===fa.Login),j({..._,ItemType:le,Fields:c?_.Fields:[]}),re(!1)},[_,c]),la=I.useCallback(()=>{H(le=>({...le,"notes.content":""})),Ie(le=>{const Me=new Set(le);return Me.delete("notes.content"),Me})},[]),nr=I.useCallback(()=>{X(!0),_t({isAddFormVisible:!0,formData:{name:"",secretKey:""}})},[]),rr=I.useCallback(()=>{ce(!0)},[]),Ua=I.useCallback(le=>{Ie(Me=>new Set(Me).add(le))},[]),qt=I.useMemo(()=>{const le=[];return hr&&le.push({key:"2fa",isVisible:Ae,onAdd:nr}),le.push({key:"attachments",isVisible:ie,onAdd:rr}),le},[hr,Ae,ie,nr,rr]),Ea=I.useCallback(le=>{Ie(Me=>{const _e=new Set(Me);return _e.delete(le),_e}),H(Me=>{const _e={...Me};return delete _e[le],_e})},[]);I.useEffect(()=>{const le=l.jsxs("div",{className:"flex items-center gap-2",children:[c&&l.jsx(Tn,{onClick:()=>P(!0),title:r("items.deleteItemTitle"),iconType:Pa.DELETE,variant:"danger"}),l.jsx(Tn,{id:"save-credential",onClick:rn,title:r("items.saveItem"),iconType:Pa.SAVE})]});return E(le),()=>E(null)},[E,c,r,rn]);const Jt=I.useCallback((le,Me,_e,Xe,kt,bt)=>{const rt=V[le]||"";if(kt){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:Me}),Fe.map((Z,Te)=>l.jsxs("div",{className:"relative",children:[l.jsx("input",{id:`${le}-${Te}`,type:"text",value:Z,onChange:He=>{const Ft=[...Fe];Ft[Te]=He.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,dn=(Fe,Z=!0)=>bt?l.jsxs("div",{className:"relative",children:[Fe,l.jsx("button",{type:"button",onClick:bt,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:r("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(_e){case ra.Password:return dn(l.jsx(TR,{id:le,label:Me,value:it,onChange:Fe=>sa(le,Fe),showPassword:q,onShowPasswordChange:ee,initialSettings:Ye,onSettingsChange:ut}));case ra.Hidden:return dn(l.jsx(wR,{id:le,label:Me,value:it,onChange:Fe=>sa(le,Fe)}));case ra.TextArea:return dn(l.jsxs("div",{children:[Me&&l.jsx("label",{htmlFor:le,className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:Me}),l.jsx("textarea",{id:le,value:it,onChange:Fe=>sa(le,Fe.target.value),rows:4,className:`w-full px-3 py-2 ${bt?"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(vR,{id:le,value:it,onChange:Fe=>sa(le,Fe),onRemove:bt,onGenerateAlias:dt?ft:Et,isEmailMode:je,onEmailModeChange:Ve});case ra.URL:case ra.Phone:case ra.Number:case ra.Date:case ra.Text:default:return le==="login.username"&&dt?l.jsx(SR,{id:le,label:Me,value:it,onChange:Fe=>sa(le,Fe),onRegenerate:St}):dn(l.jsx(ud,{id:le,label:Me,value:it,onChange:Fe=>sa(le,Fe),type:"text"}))}},[V,sa,q,r,ft,Et,dt,St,je,Ye]),_a=I.useCallback(le=>{le.preventDefault(),rn()},[rn]),za=I.useCallback(le=>{switch(le){case ct.Login:return r("items.loginCredentials");case ct.Alias:return r("common.alias");case ct.Card:return r("items.cardInformation");default:return le}},[r]),Br=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:r("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,r]);return k||!_?l.jsx("div",{className:"flex justify-center items-center p-8",children:l.jsx(er,{})}):l.jsxs("form",{onSubmit:_a,className:"space-y-4",children:[l.jsx(zD,{selectedType:_.ItemType,isEditMode:c,showDropdown:J,onDropdownToggle:re,onTypeChange:ta,onRegenerateAlias:dt&&!c?Ue:void 0}),l.jsxs(wu,{children:[l.jsx(HD,{inputRef:M,value:_.Name||"",onChange:le=>j({..._,Name:le}),folders:K,selectedFolderId:_.FolderId,onFolderChange:le=>j({..._,FolderId:le})}),he.map(le=>l.jsx("div",{children:Jt(le.FieldKey,r(`fieldLabels.${le.FieldKey}`,{defaultValue:le.FieldKey}),le.FieldType,le.IsHidden,le.IsMultiValue)},le.FieldKey))]}),c&&_.HasPasskey&&l.jsx(RR,{itemId:_.Id,passkeyIdsMarkedForDeletion:se,onPasskeyMarkedForDeletion:De}),Object.keys(be).map(le=>{const Me=be[le],_e=Me.filter(rt=>ae(rt)),Xe=le===ct.Login?Me.find(rt=>rt.FieldKey==="login.email"):null,kt=Xe&&!ae(Xe),bt=le===ct.Login?[..._e].sort((rt,it)=>{const dn={"login.email":0,"login.username":1,"login.password":2},Fe=dn[rt.FieldKey]??99,Z=dn[it.FieldKey]??99;return Fe-Z}):_e;return bt.length===0&&!kt?null:l.jsx(wu,{title:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{children:za(le)}),kt&&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:r("common.email")})]})]}),actions:Br(le),children:bt.map(rt=>{const it=_&&ne.has(rt.FieldKey)&&!Ml(rt,_.ItemType);return l.jsx(ad.Fragment,{children:Jt(rt.FieldKey,r(`fieldLabels.${rt.FieldKey}`,{defaultValue:rt.FieldKey}),rt.FieldType,rt.IsHidden,rt.IsMultiValue,it?()=>Ea(rt.FieldKey):void 0)},rt.FieldKey)})},le)}),C&&z.has("notes.content")&&l.jsx(wu,{title:r("common.notes"),actions:ae(C)?void 0:l.jsx("button",{type:"button",onClick:la,className:"p-1.5 text-gray-400 hover:text-red-500 focus:outline-none",title:r("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(C.FieldKey,"",C.FieldType,C.IsHidden,C.IsMultiValue)}),Q.length>0&&l.jsx(wu,{title:r("common.customFields"),children:Q.map(le=>l.jsxs("div",{children:[l.jsx(IR,{htmlFor:le.tempId,label:le.label,onLabelChange:Me=>ui(le.tempId,Me),onDelete:()=>Oe(le.tempId)}),Jt(le.tempId,"",le.fieldType,le.isHidden,!1)]},le.tempId))}),Ae&&hr&&l.jsx(PD,{totpCodes:Be,onTotpCodesChange:ke,originalTotpCodeIds:Qe,isAddFormVisible:Dt.isAddFormVisible,formData:Dt.formData,onStateChange:_t}),ie&&l.jsx(kR,{attachments:et,onAttachmentsChange:nt,itemId:c?e:void 0}),l.jsx(bR,{optionalSystemFields:N,visibleFieldKeys:z,optionalSections:qt,callbacks:{onAddSystemField:Ua,onAddCustomField:Hn}}),c&&l.jsx(Wu,{isOpen:L,onClose:()=>P(!1),title:r("items.deleteItemTitle"),message:r("items.deleteItemConfirm"),confirmText:r("common.delete"),cancelText:r("common.cancel"),onConfirm:Pn,variant:"danger"})]})},gU=({itemId:r})=>{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),w=document.createElement("a");w.href=p,w.download=f.Filename,document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(p)}catch(g){console.error("Error downloading attachment:",g)}};return I.useEffect(()=>{(async()=>{if(!(!(d!=null&&d.sqliteClient)||!r))try{const g=d.sqliteClient.settings.getAttachmentsForItem(r);i(g)}catch(g){console.error("Error loading attachments:",g)}finally{c(!1)}})()},[r,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 fU{constructor(){ze(this,"currentCopiedId","");ze(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 xu=new fU,Lf=({name:r})=>{switch(r){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}},Pu=({id:r,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=xu.subscribe(w=>{g(w===r)});return()=>{p()}},[r]);const E=async()=>{try{await navigator.clipboard.writeText(a),xu.setCopied(r),await gt("CLIPBOARD_COPIED",{value:a},"background"),setTimeout(()=>{xu.getCopiedId()===r&&xu.setCopied("")},2e3)}catch(p){console.error("Failed to copy text:",p)}};return l.jsxs("div",{children:[l.jsxs("label",{htmlFor:r,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:r,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(Lf,{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(Lf,{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(Lf,{name:d?"visibility-off":"visibility"})})})]})]})]})},hU=({isOpen:r,onClose:e,itemId:a,fieldKey:i,fieldLabel:s,fieldType:c,isHidden:d})=>{const{t:m}=Ze(),f=Kt(),{executeVaultMutationAsync:g}=Ts(),[E,p]=I.useState([]),[w,v]=I.useState(!0),[x,T]=I.useState(null),S=d||c===ra.Password||c===ra.Hidden,k=I.useCallback(async()=>{if(f!=null&&f.sqliteClient)try{v(!0);const _=f.sqliteClient.items.getFieldHistory(a,i);p(_)}catch(_){console.error("Error loading field history:",_)}finally{v(!1)}},[f==null?void 0:f.sqliteClient,a,i]);I.useEffect(()=>{r&&k()},[r,f==null?void 0:f.sqliteClient,a,i,k]);const B=_=>{try{return new Date(_).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return _}},L=_=>{try{return JSON.parse(_)}catch{return[_]}},P=async _=>{if(f!=null&&f.sqliteClient)try{await g(async()=>{await f.sqliteClient.items.deleteFieldHistory(_)}),k(),T(null)}catch(j){console.error("Error deleting field history:",j)}};return l.jsx(tr,{isOpen:r,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:w?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(_=>{const j=L(_.ValueSnapshot),V=x===_.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:B(_.ChangedAt)}),V?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{type:"button",onClick:()=>P(_.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:()=>T(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:()=>T(_.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,Q)=>l.jsx("div",{className:"mt-2",children:l.jsx(Pu,{id:`history-${_.Id}-${Q}`,label:"",value:H,type:S?"password":"text"})},Q))]},_.Id)})})})},HE=/(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,AU=r=>{const e=[];let a=0,i;for(HE.lastIndex=0;(i=HE.exec(r))!==null;){i.index>a&&e.push({type:"text",content:r.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<r.length&&e.push({type:"text",content:r.slice(a)}),e},pU=({text:r})=>{const e=AU(r);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(ad.Fragment,{children:a.content},i))})},uo=({field:r,itemId:e,hideLabel:a=!1})=>{const{t:i}=Ze(),s=Kt(),[c,d]=I.useState(!1),[m,f]=I.useState(0),g=r.IsCustomField?r.Label||r.FieldKey:i(`fieldLabels.${r.FieldKey}`,{defaultValue:r.FieldKey}),E=r.EnableHistory===!0;if(I.useEffect(()=>{if(E&&e&&(s!=null&&s.sqliteClient))try{const T=s.sqliteClient.items.getFieldHistory(e,r.FieldKey);if(T.length>1)f(T.length);else if(T.length===1){const S=Array.isArray(r.Value)?r.Value:[r.Value],k=JSON.stringify(S.filter(L=>L&&L.trim()!=="")),B=T[0].ValueSnapshot;f(k!==B?1:0)}else f(0)}catch(T){console.error("[FieldBlock] Error checking history:",T)}},[E,e,r.FieldKey,r.Value,s==null?void 0:s.sqliteClient]),!r.Value||typeof r.Value=="string"&&r.Value.trim()==="")return null;const p=Array.isArray(r.Value)?r.Value:[r.Value];if(p.length>1)return l.jsx("div",{className:"space-y-2",children:p.map((T,S)=>l.jsx(Pu,{id:`${r.FieldKey}-${S}`,label:S===0?g:`${g} ${S+1}`,value:T,type:r.FieldType===ra.Password?"password":"text"},`${r.FieldKey}-${S}`))});const w=p[0],v=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(hU,{isOpen:c,onClose:()=>d(!1),itemId:e,fieldKey:r.FieldKey,fieldLabel:g,fieldType:r.FieldType,isHidden:r.IsHidden}):null;switch(r.FieldType){case ra.Password:case ra.Hidden:return l.jsxs(l.Fragment,{children:[l.jsx(Pu,{id:r.FieldKey,label:g,value:w,type:"password",labelSuffix:v}),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(pU,{text:w})})})]});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(Pu,{id:r.FieldKey,label:g,value:w,type:"text",labelSuffix:v}),x]})}},yU=({itemId:r})=>{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=(T=30)=>{const S=new Ca({secret:"dummy",algorithm:"SHA1",digits:6,period:T});return S.period-Math.floor(Date.now()/1e3)%S.period},w=()=>{const T=p();return Math.floor((30-T)/30*100)},v=T=>{try{return new Ca({secret:T,algorithm:"SHA1",digits:6,period:30}).generate()}catch(S){return console.error("Error generating TOTP code:",S),"Error"}},x=async(T,S)=>{try{await navigator.clipboard.writeText(T),g(S),await gt("CLIPBOARD_COPIED",{value:T},"background"),setTimeout(()=>{g(null)},2e3)}catch(k){console.error("Failed to copy:",k)}};return I.useEffect(()=>{(async()=>{if(!(!(E!=null&&E.sqliteClient)||!r))try{const S=E.sqliteClient.settings.getTotpCodesForItem(r);i(S)}catch(S){console.error("Error loading TOTP codes:",S)}finally{c(!1)}})()},[r,E==null?void 0:E.sqliteClient]),I.useEffect(()=>{const T=B=>{const L={};return a.forEach(P=>{const _=v(P.SecretKey);_!=="Error"?L[P.Id]=_:L[P.Id]=B[P.Id]??"Error"}),L},S={};a.forEach(B=>{S[B.Id]=v(B.SecretKey)}),m(S);const k=setInterval(()=>{m(T)},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(T=>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[T.Id],T.Id),"aria-label":`Copy ${T.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:T.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[T.Id]}),l.jsx("div",{className:"text-xs",children:f===T.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:`${w()}%`,width:"100%"}})})]})]})},T.Id))})]})})};var Hu={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 Rf=({svg:r,className:e="w-8 h-8"})=>l.jsx("div",{className:`${e} flex-shrink-0`,dangerouslySetInnerHTML:{__html:r}}),EU=r=>{if(!r)return"CreditCard";const e=r.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"},bU=r=>Hu[EU(r)],QI=({item:r,className:e="w-8 h-8"})=>{var i;if(r.ItemType===fa.Note)return l.jsx(Rf,{svg:Hu.Note,className:e});if(r.ItemType===fa.CreditCard){const s=(i=r.Fields)==null?void 0:i.find(d=>d.FieldKey===tn.CardNumber),c=s!=null&&s.Value?Array.isArray(s.Value)?s.Value[0]:s.Value:void 0;return l.jsx(Rf,{svg:bU(c),className:e})}const a=r.Logo&&r.Logo.length>0?Gf.imgSrcFromBytes(r.Logo):null;return a?l.jsx("img",{src:a,alt:r.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=Hu.Placeholder,d.insertBefore(m,c)}}}):l.jsx(Rf,{svg:Hu.Placeholder,className:e})},IU=({email:r})=>{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),[w,v]=I.useState(null),[x,T]=I.useState(!1),[S,k]=I.useState(2),B=mr(),L=Kt(),P=3,_=S<a.length,j=(G,K)=>{const $=G.slice(0,K);c($)},V=()=>{const G=Math.min(S+P,a.length);k(G),j(a,G)},H=async G=>(await Hl("local:publicEmailDomains")??[]).some($=>G.toLowerCase().endsWith(`@${$.toLowerCase()}`)),Q=async G=>(await Hl("local:privateEmailDomains")??[]).some($=>G.toLowerCase().endsWith(`@${$.toLowerCase()}`));return I.useEffect(()=>{const G=async()=>{var $;try{if(L.isOffline){m(!1);return}v(null);const J=await H(r),re=await Q(r),Ae=J||re;if(p(J),T(Ae),!Ae)return;if(J){const X=r.split("@")[0],ie=await fetch(`https://api.spamok.com/v2/EmailBox/${X}`,{headers:{"X-Asdasd-Platform-Id":"av-chrome","X-Asdasd-Platform-Version":an.VERSION}});if(!ie.ok){v(e("common.errors.unknownError"));return}const ce=await ie.json(),ye=(($=ce==null?void 0:ce.mails)==null?void 0:$.toSorted((M,q)=>new Date(q.dateSystem).getTime()-new Date(M.dateSystem).getTime()))??[];d&&ye.length>0&&g(ye[0].id),i(M=>JSON.stringify(M.map(ee=>ee.id))!==JSON.stringify(ye.map(ee=>ee.id))?(j(ye,S),ye):M)}else if(re)try{const X=await B.authFetch(`EmailBox/${r}`,{method:"GET"},!0,!1);try{const ce=X.mails.toSorted((ye,M)=>new Date(M.dateSystem).getTime()-new Date(ye.dateSystem).getTime());if(ce){const ye=await jt.decryptEmailList(ce,L.sqliteClient.settings.getAllEncryptionKeys());d&&ye.length>0&&g(ye[0].id),i(M=>JSON.stringify(M.map(ee=>ee.id))!==JSON.stringify(ye.map(ee=>ee.id))?(j(ye,S),ye):M),v(null)}}catch{const ie=X;if(L.shouldSuppressEmailErrors())return;v(e("emails.apiErrors."+(ie==null?void 0:ie.code)));return}}catch{if(L.shouldSuppressEmailErrors())return;v(e("common.errors.unknownError"));return}}catch(J){console.error("Error loading emails:",J),v(e("common.errors.unknownError"))}m(!1)};G();const K=setInterval(G,2e3);return()=>clearInterval(K)},[r,d,B,L,e,S]),x?L.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")})]}):w?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:w})})]}):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/${r.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(sd,{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)),_&&l.jsxs("button",{onClick:V,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},vU=()=>{const{t:r}=Ze(),{id:e}=rd(),a=Ba(),i=Kt(),[s,c]=I.useState(null),{setIsInitialLoading:d}=Aa(),{setHeaderButtons:m}=fr(),f=I.useCallback(()=>{Sa.openInNewPopup(`/items/${e}`)},[e]),g=I.useCallback(()=>{a(`/items/${e}/edit`)},[e,a]);if(I.useEffect(()=>{if(Sa.isPopup()&&(window.history.replaceState({},"","popup.html#/items"),window.history.pushState({},"",`popup.html#/items/${e}`)),!(!(i!=null&&i.sqliteClient)||!e))try{const v=i.sqliteClient.items.getById(e);v?(c(v),d(!1)):(console.error("Item not found"),a("/items"))}catch(v){console.error("Error loading item:",v)}},[i.sqliteClient,e,a,d]),I.useEffect(()=>{const v=l.jsxs("div",{className:"flex items-center gap-2",children:[!Sa.isPopup()&&l.jsx(Tn,{onClick:f,title:r("common.openInNewWindow"),iconType:Pa.EXPAND}),l.jsx(Tn,{onClick:g,title:r("items.editItem"),iconType:Pa.EDIT})]});return m(v),()=>{}},[m,g,f,r]),I.useEffect(()=>()=>m(null),[m]),!s)return l.jsx("div",{children:r("common.loading")});const E=s.Fields.filter(v=>v.FieldType===ra.URL&&v.Value),p={...s,Fields:s.Fields.filter(v=>v.FieldType!==ra.URL)},w=kk(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(QI,{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||r("items.untitled")}),E.length>0&&l.jsx("div",{className:"mt-1 space-y-1",children:E.flatMap(v=>(Array.isArray(v.Value)?v.Value:[v.Value]).map((T,S)=>/^https?:\/\//i.test(T)?l.jsx("a",{href:T,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:T},`${v.FieldKey}-${S}`):l.jsx("span",{className:"block text-gray-500 dark:text-gray-300 break-all text-sm",children:T},`${v.FieldKey}-${S}`)))})]})]})}),(s.ItemType===fa.Login||s.ItemType===fa.Alias)&&(()=>{const v=s.Fields.find(S=>S.FieldKey==="login.email"),x=v==null?void 0:v.Value,T=Array.isArray(x)?x[0]:x;return T?l.jsx(IU,{email:T}):null})(),(s.ItemType===fa.Login||s.ItemType===fa.Alias)&&l.jsx(yU,{itemId:s.Id}),(s.ItemType===fa.Login||s.ItemType===fa.Alias)&&s.HasPasskey&&l.jsx(LR,{itemId:s.Id}),s.ItemType===fa.Note&&w[ct.Notes]&&w[ct.Notes].length>0&&w[ct.Notes].map(v=>l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:r(`fieldLabels.${v.FieldKey}`,{defaultValue:v.Label||v.FieldKey})}),l.jsx(uo,{field:v,itemId:s.Id,hideLabel:!0})]},v.FieldKey)),Object.keys(w).length>0&&l.jsxs(l.Fragment,{children:[w[ct.Login]&&w[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:r("common.credentials")}),w[ct.Login].map(v=>l.jsx(uo,{field:v,itemId:s.Id},v.FieldKey))]}),w[ct.Alias]&&w[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:r("common.alias")}),w[ct.Alias].map(v=>l.jsx(uo,{field:v,itemId:s.Id},v.FieldKey))]}),w[ct.Card]&&w[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:r("items.cardInformation")}),w[ct.Card].map(v=>l.jsx(uo,{field:v,itemId:s.Id},v.FieldKey))]}),s.ItemType!==fa.Note&&w[ct.Notes]&&w[ct.Notes].length>0&&w[ct.Notes].map(v=>l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:r(`fieldLabels.${v.FieldKey}`,{defaultValue:v.Label||v.FieldKey})}),l.jsx(uo,{field:v,itemId:s.Id,hideLabel:!0})]},v.FieldKey)),w[ct.Custom]&&w[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:r("common.customFields")}),w[ct.Custom].map(v=>l.jsx(uo,{field:v,itemId:s.Id},v.FieldKey))]})]}),l.jsx(gU,{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:r("items.tags")}),l.jsx("div",{className:"flex flex-wrap gap-2",children:s.Tags.map(v=>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:v.Name},v.Id))})]})]})},CU=({isOpen:r,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:r,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})})]})]})})]})})})},zE=({isOpen:r,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(()=>{r&&(m(i),p(null))},[r,i]);const w=async v=>{v.preventDefault();const x=d.trim();if(!x){p(c("items.folderNameRequired"));return}g(!0),p(null);try{await a(x),e()}catch(T){p(c("common.errors.unknownErrorTryAgain")),console.error("Error saving folder:",T)}finally{g(!1)}};return l.jsx(tr,{isOpen:r,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:w,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:v=>m(v.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})]})})},QE=({folder:r,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:r.name}),r.itemCount>0&&l.jsx("span",{className:"text-gray-400 dark:text-gray-500 text-xs",children:r.itemCount})]}),wU=({item:r,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===tn.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(w=>w.FieldKey===tn.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/${r.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(QI,{item:r,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&&r.FolderPath?l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"text-gray-500 dark:text-gray-400 text-sm",children:[r.FolderPath," > "]}),c(r)]}):c(r)}),r.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"})}),r.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"})}),r.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(r)})]})]})})},po="items-filter",NU=5*60*1e3,xU=[{value:"OldestFirst",labelKey:"items.sort.oldestFirst"},{value:"NewestFirst",labelKey:"items.sort.newestFirst"},{value:"Alphabetical",labelKey:"items.sort.alphabetical"}],TU=()=>{try{const r=localStorage.getItem(po);if(!r)return"all";const{filter:e,timestamp:a}=JSON.parse(r);return Date.now()-a>NU?(localStorage.removeItem(po),"all"):e}catch{return"all"}},Tu=r=>{try{localStorage.setItem(po,JSON.stringify({filter:r,timestamp:Date.now()}))}catch{}},Su=r=>Object.values(fa).includes(r),VE=()=>{const{t:r}=Ze(),{folderId:e}=rd(),a=Wa(),i=Kt(),s=gr(),c=Ba(),{syncVault:d}=cd(),{executeVaultMutationAsync:m}=Ts(),{setHeaderButtons:f}=fr(),[g,E]=I.useState([]),[p,w]=I.useState(""),[v,x]=I.useState(TU()),[T,S]=I.useState(!1),[k,B]=I.useState(!1),[L,P]=I.useState(!1),[_,j]=I.useState(!1),[V,H]=I.useState(0),[Q,G]=I.useState(0),[K,$]=I.useState("OldestFirst"),[J,re]=I.useState(!1),[Ae,X]=I.useState(!0),{setIsInitialLoading:ie}=Aa();I.useEffect(()=>{vt.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,Q]),[M,q]=ec(!0,100);I.useEffect(()=>{const se=a.state;se!=null&&se.resetFilters&&(w(""),x("all"),localStorage.removeItem(po),c(a.pathname,{replace:!0,state:{}}))},[a.state,a.pathname,c]);const ee=I.useCallback(()=>{const se=new URLSearchParams;Su(v)&&se.set("type",v),ce&&se.set("folderId",ce);const De=se.toString();c(De?`/items/add?${De}`:"/items/add")},[c,v,ce]),ne=I.useCallback(()=>{B(!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]),ke=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]),Qe=I.useCallback(async()=>{q(!0),await ke(),q(!1)},[ke,q]);I.useEffect(()=>{const se=l.jsxs("div",{className:"flex items-center gap-2",children:[!Sa.isPopup()&&l.jsx(Tn,{onClick:()=>Sa.openInNewPopup(),title:r("common.openInNewWindow"),iconType:Pa.EXPAND}),l.jsx(Tn,{onClick:ee,title:r("items.addNewItem"),iconType:Pa.PLUS})]});return f(se),()=>f(null)},[f,ee,r]),I.useEffect(()=>{(async()=>{var De,je,Ve;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=((Ve=i.sqliteClient)==null?void 0:Ve.settings.getCredentialsSortOrder())??"OldestFirst";$(Mt),q(!1),ie(!1)}})()},[i==null?void 0:i.sqliteClient,q,ie]);const pt=()=>{if(ce&&ye)return ye;switch(v){case"passkeys":return r("items.filters.passkeys");case"attachments":return r("common.attachments");case"all":return r("items.title");default:if(Su(v)){const se=Xu.find(De=>De.type===v);if(se)return r(se.titleKey)}return r("items.title")}},Dt=I.useCallback((se,De)=>{w(""),c(`/items/folder/${se}`)},[c]),_t=()=>{if(ce||p)return[];if(!(i!=null&&i.sqliteClient))return[];const se=i.sqliteClient.folders.getAll(),De=new Map;return g.forEach(Ve=>{Ve.FolderId&&De.set(Ve.FolderId,(De.get(Ve.FolderId)||0)+1)}),se.map(Ve=>({id:Ve.Id,name:Ve.Name,itemCount:De.get(Ve.Id)||0})).sort((Ve,Ye)=>Ve.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(v==="passkeys"?De=se.HasPasskey===!0:v==="attachments"?De=se.HasAttachment===!0:Su(v)&&(De=se.ItemType===v),!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(Pt=>(Array.isArray(Pt.Value)?Pt.Value.join(" ").toLowerCase():(Pt.Value||"").toLowerCase()).includes(je)||Pt.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]),Ht=_t(),Ce=g.length>0&&g.every(se=>se.FolderId!==null);return M?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:()=>S(!T),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:pt()}),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:r("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:r("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"})]})})]}),T&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>{S(!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),Tu(se),S(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${v==="all"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:r("items.title")}),!ce&&l.jsxs("button",{onClick:se=>{se.stopPropagation();const De=!Ae;X(De),vt.setShowFolders(De),S(!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:r("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"}),Xu.map(se=>l.jsxs("button",{onClick:()=>{const De=se.type;x(De),Tu(De),S(!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 ${v===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:v===se.type?"text-orange-500 dark:text-orange-400":"text-gray-400 dark:text-gray-500",children:se.iconSvg}),r(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),Tu(se),S(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${v==="passkeys"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:r("items.filters.passkeys")}),l.jsx("button",{onClick:()=>{const se="attachments";x(se),Tu(se),S(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${v==="attachments"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:r("common.attachments")}),l.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),l.jsxs("button",{onClick:()=>{S(!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:r("recentlyDeleted.title")}),V>0&&l.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:V})]})]})})]})]}),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:r("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:xU.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:r(se.labelKey)})]},se.value))})})]})]}),l.jsx(nh,{onClick:Qe})]})]}),g.length>0?l.jsx("div",{className:"mb-4",children:l.jsx("input",{type:"text",value:p,onChange:se=>w(se.target.value),placeholder:`${r("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:r("items.welcomeTitle")}),l.jsx("p",{children:r("items.welcomeDescription")})]})}):et.length===0&&Ht.length===0&&!Ce?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-3 mb-10",children:[(v!=="all"||p)&&l.jsxs(l.Fragment,{children:[l.jsx("p",{children:p&&v!=="all"?r("items.noMatchingItemsWithFilter",{filter:pt(),search:p}):p?r("items.noMatchingItemsSearch",{search:p}):v==="passkeys"?r("items.noPasskeysFound"):v==="attachments"?r("items.noAttachmentsFound"):Su(v)?r("items.noItemsOfTypeFound",{type:pt()}):r("items.noMatchingItems")}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[p&&l.jsxs("button",{onClick:()=>w(""),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"})]}),r("items.clearSearch")]}),v!=="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"})]}),r("items.clearFilter")]})]})]}),ce&&l.jsx("p",{className:"text-sm",children:r("items.emptyFolderHint")})]}):Ce&&et.length===0&&!ce&&!p?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[Ht.map(se=>l.jsx(QE,{folder:se,onClick:()=>Dt(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:r("items.allItemsInFolders")})})]}):l.jsxs(l.Fragment,{children:[!ce&&!p&&Ae&&l.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[Ht.map(se=>l.jsx(QE,{folder:se,onClick:()=>Dt(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 ${Ht.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"})]}),Ht.length===0&&l.jsx("span",{children:r("items.newFolder")})]})]}),nt.length>0&&l.jsx("ul",{id:"items-list",className:"space-y-2",children:nt.map(se=>l.jsx(wU,{item:se,showFolderPath:!!p&&!!se.FolderPath},se.Id))}),(v!=="all"||p)&&l.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mt-4 pt-4",children:[p&&l.jsxs("button",{onClick:()=>w(""),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"})]}),r("items.clearSearch")]}),v!=="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"})]}),r("items.clearFilter")]})]})]}),l.jsx(zE,{isOpen:k,onClose:()=>B(!1),onSave:Ie,mode:"create"}),l.jsx(zE,{isOpen:_,onClose:()=>j(!1),onSave:Be,initialName:ye||"",mode:"edit"}),l.jsx(CU,{isOpen:L,onClose:()=>P(!1),onDeleteFolderOnly:we,onDeleteFolderAndContents:Re,itemCount:et.length})]})},GE=[{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"})})}],SU=()=>{const{t:r}=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 w=new URLSearchParams;w.set("type",c),i.trim()&&w.set("name",i.trim()),e(`/items/add?${w.toString()}`)},[c,i,e]),E=I.useCallback(w=>{d(w),f(!1)},[]),p=GE.find(w=>w.type===c);return l.jsxs("div",{className:"p-4 space-y-6",children:[l.jsx("div",{children:l.jsx(ud,{id:"itemName",label:r("common.serviceName"),value:i,onChange:s,type:"text",placeholder:r("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:r("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?r(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:GE.map(w=>l.jsxs("button",{type:"button",onClick:()=>E(w.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===w.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===w.type?"text-primary-600 dark:text-primary-400":"text-gray-500 dark:text-gray-400",children:w.iconSvg}),l.jsx("span",{className:"font-medium",children:r(w.titleKey)}),c===w.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"})})]},w.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:r("common.next")})]})},KE=({isOpen:r,onClose:e,onConfirm:a,title:i,message:s,confirmText:c})=>{const{t:d}=Ze();return l.jsx(tr,{isOpen:r,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})})},kU=(r,e=30)=>{const a=new Date(r),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)},LU=()=>{const{t:r}=Ze(),e=Kt(),{executeVaultMutationAsync:a}=Ts(),{setHeaderButtons:i}=fr(),[s,c]=I.useState([]),[d,m]=I.useState(null),[f,g]=I.useState(!1),[E,p]=I.useState(!1),[w,v]=ec(!0,100),x=I.useCallback(()=>{if(e!=null&&e.sqliteClient){const L=e.sqliteClient.items.getRecentlyDeleted();c(L)}},[e==null?void 0:e.sqliteClient]),T=I.useCallback(async L=>{e!=null&&e.sqliteClient&&(await a(async()=>{await e.sqliteClient.items.restore(L)}),x())},[e==null?void 0:e.sqliteClient,a,x]),S=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 L of s)await e.sqliteClient.items.permanentlyDelete(L.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&&(v(!0),x(),v(!1))})()},[e==null?void 0:e.sqliteClient,v,x]);const B=I.useCallback(()=>{g(!1),m(null)},[]);return w?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:[r("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:r("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:r("recentlyDeleted.noItems")}),l.jsx("p",{className:"text-sm",children:r("recentlyDeleted.noItemsDescription")})]}):l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-4",children:r("recentlyDeleted.description")}),l.jsx("ul",{className:"space-y-2",children:s.map(L=>{const P=L.DeletedAt,_=P?kU(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:[L.Logo&&l.jsx("img",{src:`data:image/png;base64,${btoa(String.fromCharCode(...L.Logo))}`,alt:"",className:"w-6 h-6 rounded"}),l.jsx("span",{className:"font-medium text-gray-900 dark:text-white truncate",children:L.Name||r("items.untitled")})]}),l.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:_>0?r("recentlyDeleted.daysRemaining",{count:_}):l.jsx("span",{className:"text-red-500",children:r("recentlyDeleted.expiringSoon")})})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:()=>T(L.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:r("recentlyDeleted.restore")}),l.jsx("button",{onClick:()=>{m(L.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:r("common.delete")})]})]})})},L.Id)})})]}),l.jsx(KE,{isOpen:f&&!!d,onClose:B,onConfirm:S,title:r("recentlyDeleted.confirmDeleteTitle"),message:r("recentlyDeleted.confirmDeleteMessage"),confirmText:r("recentlyDeleted.deletePermanently")}),l.jsx(KE,{isOpen:E,onClose:()=>p(!1),onConfirm:k,title:r("recentlyDeleted.confirmEmptyAllTitle"),message:r("recentlyDeleted.confirmEmptyAllMessage",{count:s.length}),confirmText:r("recentlyDeleted.emptyAll")})]})},VI=({isOpen:r,origin:e,onChoice:a,onCancel:i})=>{const{t:s}=Ze();return l.jsxs(tr,{isOpen:r,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 GI(r={}){const{enabled:e=!0}=r,a=Wa(),i=Ba(),{dbInitialized:s,dbAvailable:c}=Kt();return I.useEffect(()=>{if(!(!e||!s)&&!c){const d=`${a.pathname}${a.search}`;vt.setPendingRedirectUrl(d),i("/unlock")}},[e,s,c,a,i]),{isLocked:s&&!c}}async function RU(){const r=await vt.getPendingRedirectUrl();return r&&await vt.setPendingRedirectUrl(null),r}async function DU(){await vt.setPendingRedirectUrl(null)}var KI=(r=>(r.DEFAULT="default",r.URL_EXACT="url_exact",r.URL_SUBDOMAIN="url_subdomain",r))(KI||{});let Df=null;async function Oh(){return Df||(Df=(async()=>{const r=Cs.runtime.getURL("src/aliasvault_core_bg.wasm"),e=await(await fetch(r)).arrayBuffer();await ld(e)})()),Df}function BU(r,e){var i;const a=(i=r.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 UU(r,e,a,i="default"){return await Oh(),vL({credentials:r.map(c=>({Id:c.Id,ItemName:c.Name??"",ItemUrls:BU(c,tn.LoginUrl)})),current_url:e,page_title:a,matching_mode:i}).matched_ids.map(c=>r.find(d=>d.Id===c)).filter(c=>c!==void 0)}async function jh(r){return await Oh(),bL(r)}async function Ph(r){return await Oh(),IL(r)}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 w=(Ae=a.publicKey.authenticatorSelection)==null?void 0:Ae.userVerification,v=!!(i!=null&&i.uvPerformed);(w==="required"||w==="preferred"&&v)&&(p|=4),p|=8,p|=16;const x=new Uint8Array([0,0,0,0]),T=new Uint8Array([e.length>>8&255,e.length&255]),S=We.concat(We.AAGUID,T,e,E),k=We.concat(c,new Uint8Array([p]),x,S),L={type:"webauthn.create",challenge:We.challengeToB64u(a.publicKey.challenge),origin:a.origin,crossOrigin:!1},P=JSON.stringify(L),_=We.te(P),j=a.publicKey.attestation||"none",V=j==="none"||j==="indirect"?We.buildAttObjNone(k):await We.buildAttObjPackedSelf(k,_,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 Q,G=!1,K;if(i!=null&&i.enablePrf){const ye=new Uint8Array(32);if(crypto.getRandomValues(ye),Q=We.toB64u(ye),G=!0,i!=null&&i.prfInputs){const M=We.fromB64u(i.prfInputs.first);if(K={first:await We.evaluatePrf(ye,M)},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:Q};return{credential:{id:g,rawId:g,response:{clientDataJSON:We.toB64u(_),attestationObject:We.toB64u(V)},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),v={type:"webauthn.get",challenge:We.challengeToB64u(e.publicKey.challenge),origin:e.origin,crossOrigin:!1},x=JSON.stringify(v),T=We.te(x),S=new Uint8Array(await crypto.subtle.digest("SHA-256",T)),k=We.concat(p,S),B=await crypto.subtle.importKey("jwk",s.privateKey,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]),L=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},B,k)),P=We.ecdsaRawToDer(L);let _=null;s.userId&&(_=s.userId.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""));let j;if(i!=null&&i.prfInputs&&s.prfSecret){const V=We.fromB64u(s.prfSecret);if(j={first:await We.evaluatePrf(V,i.prfInputs.first)},i.prfInputs.second){const Q=await We.evaluatePrf(V,i.prfInputs.second);j.second=Q}}return{id:s.credentialId,rawId:s.credentialId,clientDataJSON:We.toB64u(T),authenticatorData:We.toB64u(p),signature:We.toB64u(P),userHandle:_,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"),w=We.cborText("attStmt"),v=We.cborText("authData"),x=We.cborBstr(e);return We.concat(new Uint8Array([163]),E,p,w,g,v,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}};ze(We,"AAGUID",new Uint8Array([161,26,95,170,159,50,75,140,140,93,47,125,19,232,201,66]));let $u=We;class en{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 _U=()=>{const{t:r}=Ze(),e=Wa(),{setIsInitialLoading:a}=Aa(),i=Kt(),[s,c]=I.useState(null),[d,m]=I.useState(!1),[f,g]=I.useState(null),[E,p]=I.useState([]),[w,v]=I.useState(!1),{isLocked:x}=GI(),T=I.useRef(null);I.useEffect(()=>{(async()=>{if(!i.dbInitialized||x)return;const j=new URLSearchParams(e.search).get("requestId");if(j)try{const V=await gt("GET_REQUEST_DATA",{requestId:j},"background");if(V&&V.type==="get"){c(V);const H=V.publicKey.rpId||new URL(V.origin).hostname,Q=i.sqliteClient.passkeys.getByRpId(H);let G=Q;if(V.publicKey.allowCredentials&&V.publicKey.allowCredentials.length>0){const K=new Set(V.publicKey.allowCredentials.map($=>{try{return en.base64urlToGuid($.id)}catch(J){return console.warn("Failed to convert credential ID to GUID:",$.id,J),null}}).filter($=>$!==null));G=Q.filter($=>K.has($.Id))}p(G.map(K=>({id:K.Id,displayName:K.DisplayName,serviceName:K.ServiceName,rpId:K.RpId,username:K.Username})))}}catch(V){console.error("Failed to fetch request data:",V),g(r("common.errors.unknownError"))}a(!1)})()},[e,a,i.dbInitialized,x,i.sqliteClient,r]),I.useEffect(()=>{E.length>0&&T.current&&T.current.focus()},[E.length]),I.useEffect(()=>{const P=_=>{_.key==="Enter"&&!d&&E.length>0&&S(E[0].id)};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[d,E]);const S=async P=>{var _,j;if(!(!s||!i.sqliteClient)){m(!0),g(null);try{const V=i.sqliteClient.passkeys.getById(P);if(!V)throw new Error(r("common.errors.unknownError"));const H=JSON.parse(V.PublicKey),Q=JSON.parse(V.PrivateKey);let G;if(V.PrfKey)try{G=en.bytesToBase64url(V.PrfKey)}catch(ce){console.warn("Failed to convert PrfKey to base64url",ce)}let K=null;if(V.UserHandle)try{const ce=V.UserHandle instanceof Uint8Array?V.UserHandle:new Uint8Array(V.UserHandle);K=en.bytesToBase64url(ce)}catch(ce){console.warn("Failed to convert UserHandle to base64",ce)}const $={rpId:V.RpId,credentialId:en.guidToBase64url(V.Id),publicKey:H,privateKey:Q,userId:K,userName:V.Username??void 0,userDisplayName:V.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=(_=s.publicKey.extensions)==null?void 0:_.prf)!=null&&j.eval){const ce=s.publicKey.extensions.prf.eval.first;let ye;if(typeof ce=="object"&&ce!==null&&!Array.isArray(ce)){const M=Object.keys(ce).map(Number).sort((q,ee)=>q-ee);ye=new Uint8Array(M.length);for(let q=0;q<M.length;q++)ye[q]=ce[q]}else if(typeof ce=="string"){const M=atob(ce);ye=new Uint8Array(M.length);for(let q=0;q<M.length;q++)ye[q]=M.charCodeAt(q)}else throw new Error("Unknown PRF input format");if(re={first:ye},s.publicKey.extensions.prf.eval.second){const M=s.publicKey.extensions.prf.eval.second;let q;if(typeof M=="object"&&M!==null&&!Array.isArray(M)){const ee=Object.keys(M).map(Number).sort((ne,Ie)=>ne-Ie);q=new Uint8Array(ee.length);for(let ne=0;ne<ee.length;ne++)q[ne]=M[ne]}else if(typeof M=="string"){const ee=atob(M);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 M),new Error("Unknown PRF second input format");re.second=q}}const Ae=await $u.getAssertion(J,$,{uvPerformed:!0,includeBEBS:!0,prfInputs:re});let X;Ae.prfResults&&(X={first:en.arrayBufferToBase64(Ae.prfResults.first)},Ae.prfResults.second&&(X.second=en.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 gt("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,credential:ie},"background")}catch(V){console.error("PasskeyAuthenticate: Error during authentication",V),m(!1),g(r("common.errors.unknownError"))}}},k=async()=>{v(!0)},B=async P=>{if(s){if(P==="always"){const _=new URL(s.origin).hostname,j=await Ph(await jh(_)),V=await vt.getPasskeyDisabledSites();V.includes(j)||(V.push(j),await vt.setPasskeyDisabledSites(V))}await gt("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,fallback:!0},"background")}},L=async()=>{s&&await gt("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,cancelled:!0},"background")};return s?l.jsxs(l.Fragment,{children:[l.jsx(VI,{isOpen:w&&!!s,origin:s?new URL(s.origin).hostname:"",onChoice:B,onCancel:()=>v(!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:r("passkeys.authenticate.title")}),l.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[r("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:r("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,_)=>l.jsxs("div",{ref:_===0?T: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&&S(P.id),onKeyDown:j=>{j.key==="Enter"&&!d&&S(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:r("passkeys.authenticate.noPasskeysFound")})})}),l.jsxs("div",{className:"space-y-3",children:[l.jsx(ya,{variant:"secondary",onClick:k,children:r("passkeys.useBrowserPasskey")}),l.jsx(ya,{variant:"secondary",onClick:L,children:r("common.cancel")})]})]})]}):l.jsx("div",{className:"flex justify-center py-8",children:l.jsx(er,{})})},Bf=({variant:r,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[r]} ${a}`,children:l.jsx("p",{className:"text-sm",children:e})})},MU=()=>{var M,q;const{t:r}=Ze(),e=Wa(),{setIsInitialLoading:a}=Aa(),i=Kt(),s=mr(),{executeVaultMutationAsync:c}=Ts(),[d,m]=I.useState(null),[f,g]=I.useState(""),[E,p]=I.useState(null),{isLocked:w}=GI(),[v,x]=I.useState([]),[T,S]=I.useState([]),[k,B]=I.useState(null),[L,P]=I.useState(null),[_,j]=I.useState(!1),[V,H]=I.useState(!1),[Q,G]=I.useState(!1),K=I.useRef(null),$=I.useRef(null);I.useEffect(()=>{(async()=>{var we,Re,Be,ke,Qe,pt,Dt,_t;if(!i.dbInitialized||w)return;const Ie=new URLSearchParams(e.search).get("requestId");if(Ie)try{const et=await gt("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)||((ke=(Be=et.publicKey)==null?void 0:Be.rp)==null?void 0:ke.id)||"Passkey";if(g(nt),i.sqliteClient&&((pt=(Qe=et.publicKey)==null?void 0:Qe.rp)!=null&&pt.id)){const Ht=i.sqliteClient.passkeys.getByRpId(et.publicKey.rp.id);let Ce=Ht;if(((Dt=et.publicKey.user)!=null&&Dt.id||(_t=et.publicKey.user)!=null&&_t.name)&&(Ce=Ht.filter(se=>{var De,je;if((De=et.publicKey.user)!=null&&De.id&&se.UserHandle)try{const Ve=en.base64urlToBytes(et.publicKey.user.id),Ye=se.UserHandle instanceof Uint8Array?se.UserHandle:new Uint8Array(se.UserHandle);if(Ve.length===Ye.length&&Ve.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(Ce),Ce.length===0){const De=i.sqliteClient.items.getAll().filter(Ve=>{const Ye=fu(Ve,tn.LoginUsername),ut=fu(Ve,tn.LoginPassword);return!Ye&&!ut?!1:!Ve.HasPasskey});let je=[];De.length>0&&(je=await UU(De,et.origin,et.publicKey.rp.name||"",KI.URL_SUBDOMAIN),S(je)),je.length===0&&j(!0)}}}}catch(et){console.error("Failed to fetch request data:",et),p(r("common.errors.unknownError"))}a(!1)})()},[e,a,i.dbInitialized,i.sqliteClient,w,r]),I.useEffect(()=>{_&&$.current?$.current.focus():!_&&v.length>0&&K.current&&K.current.focus()},[_,v.length]),I.useEffect(()=>{const ee=ne=>{ne.key==="Enter"&&!V&&_&&X()};return window.addEventListener("keydown",ee),()=>window.removeEventListener("keydown",ee)},[_,V]);const J=()=>{B(null),P(null),j(!0)},re=ee=>{B(ee),P(null),j(!0)},Ae=ee=>{P(ee),B(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)),Ve=s.get("Favicon/Extract?url="+d.origin),Ye=await Promise.race([Ve,je]);if(Ye!=null&&Ye.image){const ut=atob(Ye.image),Mt=new Uint8Array(ut.length);for(let Pt=0;Pt<ut.length;Pt++)Mt[Pt]=ut.charCodeAt(Pt);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=en.guidToBytes(Re),ke=en.guidToBase64url(Re),Qe=(ne=(ee=d.publicKey)==null?void 0:ee.extensions)==null?void 0:ne.prf,pt=!!Qe,Dt=Qe==null?void 0:Qe.eval,_t=await $u.createPasskey(Be,we,{uvPerformed:!0,credentialIdBytes:16,enablePrf:pt,prfInputs:Dt}),{credential:et,stored:nt,prfEnabled:Ht,prfResults:Ce}=_t;await c(async()=>{if(k){const je=i.sqliteClient.passkeys.getById(k);if(je){const Ve=i.sqliteClient.items.getById(je.ItemId);Ve&&await i.sqliteClient.items.update({...Ve,Name:f,Logo:Ie??Ve.Logo,Fields:[...(Ve.Fields||[]).filter(ut=>ut.FieldKey!==tn.LoginUrl&&ut.FieldKey!==tn.LoginUsername),hu(tn.LoginUrl,{value:d.origin}),hu(tn.LoginUsername,{value:d.publicKey.user.name})]},[],[]),await i.sqliteClient.passkeys.deleteById(k);let Ye=null;if(nt.userId)try{Ye=en.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?en.base64urlToBytes(nt.prfSecret):void 0,AdditionalData:null})}}else if(L){let je=null;if(nt.userId)try{je=en.base64urlToBytes(nt.userId)}catch{je=null}await i.sqliteClient.passkeys.create({Id:Re,ItemId:L,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?en.base64urlToBytes(nt.prfSecret):void 0,AdditionalData:null})}else{const je={Id:"",Name:f,ItemType:fa.Login,Logo:Ie,Fields:[hu(tn.LoginUrl,{value:d.origin}),hu(tn.LoginUsername,{value:d.publicKey.user.name})],CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString()},Ve=await i.sqliteClient.items.create(je,[]);let Ye=null;if(nt.userId)try{Ye=en.base64urlToBytes(nt.userId)}catch{Ye=null}await i.sqliteClient.passkeys.create({Id:Re,ItemId:Ve,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?en.base64urlToBytes(nt.prfSecret):void 0,AdditionalData:null})}});let se;Ht&&(se={prf:{enabled:!0,results:Ce?{first:en.bytesToBase64url(new Uint8Array(Ce.first)),second:Ce.second?en.bytesToBase64url(new Uint8Array(Ce.second)):void 0}:void 0}});const De={id:ke,rawId:ke,clientDataJSON:et.response.clientDataJSON,attestationObject:et.response.attestationObject,extensions:se};await gt("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,credential:De},"background"),H(!1)}catch(Ie){console.error("PasskeyCreate: Error creating passkey",Ie),p(r("common.errors.unknownError"))}}},ie=async()=>{G(!0)},ce=async ee=>{if(d){if(ee==="always"){const ne=new URL(d.origin).hostname,Ie=await Ph(await jh(ne)),we=await vt.getPasskeyDisabledSites();we.includes(Ie)||(we.push(Ie),await vt.setPasskeyDisabledSites(we))}await gt("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,fallback:!0},"background")}},ye=async()=>{d&&await gt("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,cancelled:!0},"background")};return d?l.jsxs(l.Fragment,{children:[l.jsx(VI,{isOpen:Q&&!!d,origin:d?new URL(d.origin).hostname:"",onChoice:ce,onCancel:()=>G(!1)}),V&&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:r("passkeys.create.title")}),l.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[r("passkeys.create.createFor")," ",l.jsx("strong",{children:d.origin})]})]}),E&&l.jsx(Bf,{variant:"error",children:E}),!_&&v.length>0&&l.jsxs("div",{className:"space-y-4",children:[l.jsx(ya,{variant:"primary",onClick:J,ref:K,children:r("passkeys.create.createNewPasskey")}),l.jsx(ya,{variant:"secondary",onClick:ie,children:r("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:r("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:r("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:v.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:r("common.cancel")})]}),!_&&v.length===0&&T.length>0&&l.jsxs("div",{className:"space-y-4",children:[l.jsx(ya,{variant:"primary",onClick:J,ref:K,children:r("passkeys.create.createNewPasskey")}),l.jsx(ya,{variant:"secondary",onClick:ie,children:r("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:r("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:r("passkeys.create.selectExistingLogin")}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:r("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:T.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}),fu(ee,tn.LoginUsername)&&l.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:fu(ee,tn.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:r("common.cancel")})]}),_&&l.jsxs("div",{className:"space-y-4",children:[k&&l.jsx(Bf,{variant:"warning",children:r("passkeys.create.replacingPasskey",{displayName:((M=v.find(ee=>ee.Id===k))==null?void 0:M.DisplayName)||""})}),L&&l.jsx(Bf,{variant:"info",children:r("passkeys.create.attachingToCredential",{serviceName:((q=T.find(ee=>ee.Id===L))==null?void 0:q.Name)||""})}),!L&&l.jsx(ud,{id:"displayName",label:r("passkeys.create.titleLabel"),value:f,onChange:g,placeholder:r("passkeys.create.titlePlaceholder"),ref:$}),l.jsxs("div",{className:"space-y-3",children:[l.jsx(ya,{variant:"primary",onClick:X,children:r(k?"passkeys.create.confirmReplace":L?"passkeys.create.attachPasskey":"passkeys.create.createButton")}),v.length>0||T.length>0?l.jsx(ya,{variant:"secondary",onClick:()=>{j(!1),B(null),P(null)},children:r("common.back")}):l.jsxs(l.Fragment,{children:[l.jsx(ya,{variant:"secondary",onClick:ie,children:r("passkeys.useBrowserPasskey")}),l.jsx(ya,{variant:"secondary",onClick:ye,children:r("common.cancel")})]})]})]})]})]}):l.jsx("div",{className:"flex justify-center py-8",children:l.jsx(er,{})})},qE="session:lastVisitedPage",WE="session:lastVisitedTime",YE="session:navigationHistory",FU=120*1e3,OU=()=>{const r=Ba(),{setIsInitialLoading:e}=Aa(),{syncVault:a}=cd(),i=I.useRef(!1),{isInitialized:s,isLoggedIn:c}=gr(),{dbInitialized:d,dbAvailable:m,refreshSyncState:f}=Kt(),g=s&&d,E=g&&(!c||!m),p=I.useCallback(async()=>{const[w,v,x]=await Promise.all([xe.getItem(qE),xe.getItem(WE),xe.getItem(YE)]);if(w&&v&&Date.now()-v<=FU){(x==null?void 0:x.length)>1?(r(x[0].pathname,{replace:!0}),r(w,{replace:!1})):r(w,{replace:!0});return}await Promise.all([xe.removeItem(qE),xe.removeItem(WE),xe.removeItem(YE),gt("CLEAR_PERSISTED_FORM_VALUES",null,"background")]),r("/items",{replace:!0})},[r]);return I.useEffect(()=>{(async()=>{const x=new URLSearchParams(window.location.search).get("mode")==="inline_unlock",T=await RU();if(!g)return;const S=!i.current;E?(e(!1),c?m||r("/unlock",{replace:!0}):r("/login",{replace:!0})):S?(i.current=!0,e(!1),x?r("/unlock-success",{replace:!0}):T?r(T,{replace:!0}):await p(),a({onSuccess:async k=>{await f()},onUpgradeRequired:()=>{r("/upgrade",{replace:!0})},onError:k=>{console.error("Background vault sync error:",k)}})):(e(!1),p())})()},[g,E,c,m,r,e,a,p,f]),null},jU=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=Aa(),[a,i]=I.useState({disabledUrls:[],temporaryDisabledUrls:{},currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),[s,c]=I.useState(Fl.DEFAULT),d=async()=>{const w={active:!0,currentWindow:!0},[v]=await Cs.tabs.query(w);return v},m=I.useCallback(async()=>{const w=await d(),v=new URL(w.url??"").hostname,x=await vt.getDisabledSites(),T=await vt.getTemporaryDisabledSites(),S=await vt.getGlobalAutofillPopupEnabled(),k=Date.now(),B=Object.fromEntries(Object.entries(T).filter(([P,_])=>_>k));Object.keys(B).length!==Object.keys(T).length&&await vt.setTemporaryDisabledSites(B);const L=await vt.getAutofillMatchingMode();c(L),i({disabledUrls:x,temporaryDisabledUrls:B,currentUrl:v,isEnabled:!x.includes(v)&&!(v in B),isGloballyEnabled:S}),e(!1)},[e]);I.useEffect(()=>{m()},[m]);const f=async()=>{const{currentUrl:w,disabledUrls:v,temporaryDisabledUrls:x,isEnabled:T}=a;let S=[...v],k={...x};T?(S.includes(w)||S.push(w),delete k[w]):(S=S.filter(B=>B!==w),delete k[w]),await vt.setDisabledSites(S),await vt.setTemporaryDisabledSites(k),i(B=>({...B,disabledUrls:S,temporaryDisabledUrls:k,isEnabled:!T}))},g=async()=>{await vt.setDisabledSites([]),await vt.setTemporaryDisabledSites({}),i(w=>({...w,disabledUrls:[],temporaryDisabledUrls:{},isEnabled:!0}))},E=async()=>{const w=!a.isGloballyEnabled;await vt.setGlobalAutofillPopupEnabled(w),i(v=>({...v,isGloballyEnabled:w}))},p=async w=>{await vt.setAutofillMatchingMode(w),c(w)};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:r("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:r("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?r("settings.activeOnAllSites"):r("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?r("common.enabled"):r("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:r("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:[r("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?r("settings.enabledForThisSite"):r("settings.disabledForThisSite")}),!a.isEnabled&&a.temporaryDisabledUrls[a.currentUrl]&&l.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:[r("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?r("common.enabled"):r("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:r("settings.resetAllSiteSettings")})})]})})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("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:r("settings.autofillMatchingMode")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("settings.autofillMatchingModeDescription")}),l.jsxs("select",{value:s,onChange:w=>p(w.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:Fl.DEFAULT,children:r("settings.autofillMatchingDefault")}),l.jsx("option",{value:Fl.URL_SUBDOMAIN,children:r("settings.autofillMatchingUrlSubdomain")}),l.jsx("option",{value:Fl.URL_EXACT,children:r("settings.autofillMatchingUrlExact")})]})]})})})]})]})},qI=({title:r,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:r,children:l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:e})})]})},PU=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=Aa(),[a,i]=I.useState(0);I.useEffect(()=>{(async()=>{const d=await vt.getAutoLockTimeout();i(d),e(!1)})()},[e]);const s=async c=>{await vt.setAutoLockTimeout(c),await gt("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:r("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:r("settings.autoLockTimeout")}),l.jsx(qI,{title:r("settings.autoLockTimeout"),content:r("settings.autoLockTimeoutHelp"),className:"ml-2"})]}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("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:r("settings.autoLockNever")}),l.jsx("option",{value:"15",children:r("settings.autoLock15Seconds")}),l.jsx("option",{value:"60",children:r("settings.autoLock1Minute")}),l.jsx("option",{value:"300",children:r("settings.autoLock5Minutes")}),l.jsx("option",{value:"900",children:r("settings.autoLock15Minutes")}),l.jsx("option",{value:"1800",children:r("settings.autoLock30Minutes")}),l.jsx("option",{value:"3600",children:r("settings.autoLock1Hour")}),l.jsx("option",{value:"14400",children:r("settings.autoLock4Hours")}),l.jsx("option",{value:"28800",children:r("settings.autoLock8Hours")}),l.jsx("option",{value:"86400",children:r("settings.autoLock24Hours")})]})]})})})]})})},HU=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=Aa(),[a,i]=I.useState(10);I.useEffect(()=>{(async()=>{const d=await vt.getClipboardClearTimeout();i(d),e(!1)})()},[e]);const s=async c=>{await vt.setClipboardClearTimeout(c),await gt("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:r("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:r("settings.clipboardClearTimeout")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("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:r("settings.clipboardClearDisabled")}),l.jsx("option",{value:"5",children:r("settings.clipboardClear5Seconds")}),l.jsx("option",{value:"10",children:r("settings.clipboardClear10Seconds")}),l.jsx("option",{value:"15",children:r("settings.clipboardClear15Seconds")})]})]})})})]})})},zU=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=Aa(),[a,i]=I.useState(!0),s=I.useCallback(async()=>{const d=await vt.getGlobalContextMenuEnabled();i(d),e(!1)},[e]);I.useEffect(()=>{s()},[s]);const c=async()=>{const d=!a;await vt.setGlobalContextMenuEnabled(d),await gt("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:r("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:r("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:r(a?"settings.contextMenuEnabled":"settings.contextMenuDisabled")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:r("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:r(a?"common.enabled":"common.disabled")})]})})})]})})},QU=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=Aa(),a=Kt(),{executeVaultMutationAsync:i}=Ts(),[s,c]=I.useState("en"),[d,m]=I.useState("random"),[f,g]=I.useState("random"),[E,p]=I.useState([]),[w,v]=I.useState([]),x=[{label:r("settings.identityGeneratorSettings.genderOptions.random"),value:"random"},{label:r("settings.identityGeneratorSettings.genderOptions.male"),value:"male"},{label:r("settings.identityGeneratorSettings.genderOptions.female"),value:"female"}];I.useEffect(()=>{const B=nU(),L=tU();if(p(B),v(L),a!=null&&a.sqliteClient){const P=a.sqliteClient.settings.getEffectiveIdentityLanguage(),_=a.sqliteClient.settings.getDefaultIdentityGender(),j=a.sqliteClient.settings.getDefaultIdentityAgeRange();c(P),m(_),g(j)}e(!1)},[a==null?void 0:a.sqliteClient,e]);const T=I.useCallback(async B=>{c(B),a!=null&&a.sqliteClient&&await i(async()=>{a.sqliteClient.settings.updateSetting("DefaultIdentityLanguage",B)})},[a==null?void 0:a.sqliteClient,i]),S=I.useCallback(async B=>{m(B),a!=null&&a.sqliteClient&&await i(async()=>{a.sqliteClient.settings.updateSetting("DefaultIdentityGender",B)})},[a==null?void 0:a.sqliteClient,i]),k=I.useCallback(async B=>{g(B),a!=null&&a.sqliteClient&&await i(async()=>{a.sqliteClient.settings.updateSetting("DefaultIdentityAgeRange",B)})},[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:r("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:r("settings.identityGeneratorSettings.languageSection")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("settings.identityGeneratorSettings.languageDescription")}),l.jsx("select",{value:s,onChange:B=>T(B.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(B=>l.jsxs("option",{value:B.value,children:[B.flag," ",B.label]},B.value))})]})})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("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:r("settings.identityGeneratorSettings.genderSection")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("settings.identityGeneratorSettings.genderDescription")}),l.jsx("select",{value:d,onChange:B=>S(B.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(B=>l.jsx("option",{value:B.value,children:B.label},B.value))})]})})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("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:r("settings.identityGeneratorSettings.ageRangeSection")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("settings.identityGeneratorSettings.ageRangeDescription")}),l.jsx("select",{value:f,onChange:B=>k(B.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:w.map(B=>l.jsx("option",{value:B.value,children:B.value==="random"?r("settings.identityGeneratorSettings.genderOptions.random"):B.label},B.value))})]})})]})]})},VU=()=>{const{t:r}=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:r("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:r("settings.selectLanguage")}),l.jsx(hI,{variant:"dropdown",size:"sm"})]})})})]})})},GU=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=Aa(),[a,i]=I.useState({disabledUrls:[],currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),s=async()=>{const g={active:!0,currentWindow:!0},[E]=await Cs.tabs.query(g);return E},c=I.useCallback(async()=>{const g=await s(),E=new URL(g.url??"").hostname,p=await Ph(await jh(E)),w=await vt.getPasskeyDisabledSites(),v=await vt.getPasskeyProviderEnabled(),x=!w.includes(p);i({disabledUrls:w,currentUrl:p,isEnabled:x,isGloballyEnabled:v}),e(!1)},[e]);I.useEffect(()=>{c()},[c]);const d=async()=>{const{currentUrl:g,disabledUrls:E,isEnabled:p}=a;let w=[...E];p?w.includes(g)||w.push(g):w=w.filter(v=>v!==g),await vt.setPasskeyDisabledSites(w),i(v=>({...v,disabledUrls:w,isEnabled:!p}))},m=async()=>{await vt.setPasskeyDisabledSites([]),i(g=>({...g,disabledUrls:[],isEnabled:!0}))},f=async()=>{const g=!a.isGloballyEnabled;await vt.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:r("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:r("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?r("settings.activeOnAllSites"):r("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?r("common.enabled"):r("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:r("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:[r("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?r("settings.enabledForThisSite"):r("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?r("common.enabled"):r("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:r("settings.resetAllSiteSettings")})})]})})]})]})},JE="local:theme",WI=I.createContext(void 0),KU=({children:r})=>{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 xe.getItem(JE)||"system",m=async g=>{await xe.setItem(JE,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(WI.Provider,{value:f,children:r})},qU=()=>{const r=I.useContext(WI);if(r===void 0)throw new Error("useTheme must be used within a ThemeProvider");return r},WU=()=>{var K,$;const{t:r}=Ze(),{theme:e,setTheme:a}=qU(),i=gr(),s=Zl(),c=mr(),{setHeaderButtons:d}=fr(),{setIsInitialLoading:m}=Aa(),{loadApiUrl:f,getDisplayUrl:g}=II(),E=Ba(),[p,w]=I.useState(!1),v=async()=>{const J=await xe.getItem("local:clientUrl");let re=an.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:[!Sa.isPopup()&&l.jsx(l.Fragment,{children:l.jsx(Tn,{onClick:()=>Sa.openInNewPopup(),title:r("common.openInNewWindow"),iconType:Pa.EXPAND})}),l.jsx(Tn,{onClick:v,title:r("settings.openWebApp"),iconType:Pa.EXTERNAL_LINK})]});return d(J),()=>d(null)},[d,r]);const x=I.useCallback(async()=>{await f(),m(!1)},[m,f]);I.useEffect(()=>{x()},[x]);const T=async J=>{a(J)},S=()=>{w(!0)},k=async()=>{w(!1);try{await c.revokeTokens(),await s.clearAuthUserInitiated()}catch(J){console.error("Error during logout:",J)}},B=async()=>{await gt("LOCK_VAULT",{},"background"),E("/unlock")},L=()=>{E("/settings/autofill")},P=()=>{E("/settings/clipboard")},_=()=>{E("/settings/language")},j=()=>{E("/settings/auto-lock")},V=()=>{E("/settings/unlock-method")},H=()=>{E("/settings/context-menu")},Q=()=>{E("/settings/passkeys")},G=()=>{E("/settings/identity-generator")};return l.jsxs(l.Fragment,{children:[l.jsx(Lh,{isOpen:p,onClose:()=>w(!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:r("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:r("common.loggedIn")})]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:B,title:r("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":r("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:S,title:r("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":r("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:L,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:r("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: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:"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:r("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: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:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:r("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:r("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:r("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:_,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:r("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:r("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:r("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:r("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:r("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:()=>T("system"),className:"mr-2"}),l.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:r("settings.useDefault")})]}),l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"radio",name:"theme",value:"light",checked:e==="light",onChange:()=>T("light"),className:"mr-2"}),l.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:r("settings.light")})]}),l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"radio",name:"theme",value:"dark",checked:e==="dark",onChange:()=>T("dark"),className:"mr-2"}),l.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:r("settings.dark")})]})]})]})})})]}),!1,l.jsxs("div",{className:"text-center text-gray-400 dark:text-gray-600",children:[r("settings.versionPrefix"),an.VERSION," (",g(),")"]})]})]})},YU=()=>{const{t:r}=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,w]=I.useState(!1),[v,x]=I.useState(1),[T,S]=I.useState(""),[k,B]=I.useState(""),[L,P]=I.useState(!1),_=I.useCallback(async()=>{try{const[G,K]=await Promise.all([Yb(),Xb()]);d(G),P(K),a(!1)}catch(G){console.error("Failed to load PIN settings:",G),f(r("common.errors.unknownErrorTryAgain")),a(!1)}},[a,r]);I.useEffect(()=>{_()},[_]);const j=()=>{if(f(null),E(null),!e.dbAvailable){f(r("common.errors.unknownErrorTryAgain"));return}x(1),S(""),B(""),w(!0)},V=G=>{if(G.preventDefault(),f(null),!wh(T)){f(r("settings.unlockMethod.invalidPinFormat"));return}x(2)},H=async G=>{if(G.preventDefault(),f(null),E(null),T!==k){f(r("settings.unlockMethod.pinMismatch"));return}try{i();const $=await xe.getItem("session:encryptionKey");if(!$){f(r("common.errors.unknownErrorTryAgain")),s();return}await Hk(T,$),d(!0),w(!1),x(1),S(""),B(""),E(r("settings.unlockMethod.enableSuccess")),s()}catch(K){console.error("Failed to enable PIN:",K),K instanceof ql?f(r("settings.unlockMethod.invalidPinFormat")):f(r("common.errors.unknownErrorTryAgain")),s()}},Q=async()=>{f(null),E(null);try{i(),await Nh(),d(!1),P(!1),s()}catch(G){console.error("Failed to disable PIN:",G),f(r("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:r("settings.unlockMethod.introText")})}),l.jsxs("div",{className:"mt-6",children:[m&&l.jsx(ps,{type:"error",message:m,className:"mb-4"}),g&&l.jsx(ps,{type:"success",message:g,className:"mb-4"}),L&&l.jsx(ps,{type:"warning",message:r("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:r("settings.unlockMethod.pin")}),l.jsx(qI,{title:r("common.notice"),content:r("settings.unlockMethod.pinSecurityWarning"),className:"ml-2"})]}),l.jsx("p",{className:"text-sm mt-1 text-gray-600 dark:text-gray-400",children:r("settings.unlockMethod.pinDescription")})]})]}),c!==void 0&&l.jsx("button",{onClick:c&&!L?Q:j,className:`px-4 py-2 rounded-md transition-colors ${c&&!L?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:r(c&&!L?"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:r("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:r("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:()=>{w(!1),x(1),S(""),B(""),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"})})}),v===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:r("settings.unlockMethod.setupPin")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:r("settings.unlockMethod.enterNewPinDescription")}),l.jsxs("form",{onSubmit:V,children:[l.jsx("div",{className:"mb-4",children:l.jsx("input",{type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:T,onChange:G=>S(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(ps,{type:"error",message:m,className:"mb-4"}),l.jsx(ya,{type:"submit",children:r("common.next")})]})]}),v===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:r("settings.unlockMethod.confirmPin")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:r("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=>B(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(ps,{type:"error",message:m,className:"mb-4"}),l.jsx(ya,{type:"submit",children:r("common.confirm")})]})]})]})})]})]})},JU=({routes:r,isLoading:e,message:a,headerButtons:i})=>{const s=Wa(),c=r.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(Bb,{children:r.map(g=>l.jsx(hh,{path:g.path,element:g.element},g.path))});switch(d){case"passkey":return l.jsxs(Xk,{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(nI,{routes:r,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(Jk,{routes:r,headerButtons:i,message:a,children:f})]})}},XU=()=>{const{t:r}=Ze(),e=gr(),{isInitialLoading:a}=Aa(),[i,s]=ec(!0,150),[c,d]=I.useState(null),{headerButtons:m}=fr(),f=ad.useMemo(()=>[{path:"/",element:l.jsx(fR,{}),showBackButton:!1},{path:"/reinitialize",element:l.jsx(OU,{}),showBackButton:!1},{path:"/login",element:l.jsx(_L,{}),showBackButton:!1,layout:"auth"},{path:"/unlock",element:l.jsx(ML,{}),showBackButton:!1,layout:"auth"},{path:"/unlock-success",element:l.jsx(FL,{}),showBackButton:!1},{path:"/upgrade",element:l.jsx(PL,{}),showBackButton:!1},{path:"/auth-settings",element:l.jsx(H2,{}),showBackButton:!0,title:r("common.settings")},{path:"/items",element:l.jsx(VE,{}),showBackButton:!1},{path:"/items/folder/:folderId",element:l.jsx(VE,{}),showBackButton:!0,title:r("items.title")},{path:"/items/select-type",element:l.jsx(SU,{}),showBackButton:!0,title:r("itemTypes.selectType")},{path:"/items/add",element:l.jsx(PE,{}),showBackButton:!0,title:r("items.addItem")},{path:"/items/deleted",element:l.jsx(LU,{}),showBackButton:!0,title:r("recentlyDeleted.title")},{path:"/items/:id",element:l.jsx(vU,{}),showBackButton:!0,title:r("items.itemDetails")},{path:"/items/:id/edit",element:l.jsx(PE,{}),showBackButton:!0,title:r("items.editItem")},{path:"/passkeys/create",element:l.jsx(MU,{}),layout:"passkey"},{path:"/passkeys/authenticate",element:l.jsx(_U,{}),layout:"passkey"},{path:"/emails",element:l.jsx(gR,{}),showBackButton:!1},{path:"/emails/:id",element:l.jsx(mR,{}),showBackButton:!0,title:r("emails.title")},{path:"/settings",element:l.jsx(WU,{}),showBackButton:!1},{path:"/settings/unlock-method",element:l.jsx(YU,{}),showBackButton:!0,title:r("settings.unlockMethod.title")},{path:"/settings/autofill",element:l.jsx(jU,{}),showBackButton:!0,title:r("settings.autofillSettings")},{path:"/settings/context-menu",element:l.jsx(zU,{}),showBackButton:!0,title:r("settings.contextMenuSettings")},{path:"/settings/clipboard",element:l.jsx(HU,{}),showBackButton:!0,title:r("settings.clipboardSettings")},{path:"/settings/language",element:l.jsx(VU,{}),showBackButton:!0,title:r("settings.language")},{path:"/settings/auto-lock",element:l.jsx(PU,{}),showBackButton:!0,title:r("settings.autoLockTimeout")},{path:"/settings/passkeys",element:l.jsx(GU,{}),showBackButton:!0,title:r("settings.passkeySettings")},{path:"/settings/identity-generator",element:l.jsx(QU,{}),showBackButton:!0,title:r("settings.identityGenerator")}],[r]);return I.useEffect(()=>{a||s(!1)},[a,s]),I.useEffect(()=>{gt("POPUP_HEARTBEAT",{},"background").catch(()=>{});const g=setInterval(()=>{gt("POPUP_HEARTBEAT",{},"background").catch(()=>{})},5e3);return()=>{clearInterval(g)}},[]),I.useEffect(()=>{window.location.hash&&window.location.hash!=="#/"&&window.location.hash!=="#"||DU()},[]),I.useEffect(()=>{e.globalMessage?d(e.globalMessage):d(null)},[e,e.globalMessage]),l.jsx(bN,{children:l.jsx(r2,{children:l.jsx(JU,{routes:f,isLoading:i,message:c,headerButtons:m})})})},At=r=>typeof r=="string",Ul=()=>{let r,e;const a=new Promise((i,s)=>{r=i,e=s});return a.resolve=r,a.reject=e,a},XE=r=>r==null?"":""+r,$U=(r,e,a)=>{r.forEach(i=>{e[i]&&(a[i]=e[i])})},ZU=/###/g,$E=r=>r&&r.indexOf("###")>-1?r.replace(ZU,"."):r,ZE=r=>!r||At(r),Gl=(r,e,a)=>{const i=At(e)?e.split("."):e;let s=0;for(;s<i.length-1;){if(ZE(r))return{};const c=$E(i[s]);!r[c]&&a&&(r[c]=new a),Object.prototype.hasOwnProperty.call(r,c)?r=r[c]:r={},++s}return ZE(r)?{}:{obj:r,k:$E(i[s])}},eb=(r,e,a)=>{const{obj:i,k:s}=Gl(r,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=Gl(r,d,Object);for(;m.obj===void 0&&d.length;)c=`${d[d.length-1]}.${c}`,d=d.slice(0,d.length-1),m=Gl(r,d,Object),m!=null&&m.obj&&typeof m.obj[`${m.k}.${c}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${c}`]=a},e_=(r,e,a,i)=>{const{obj:s,k:c}=Gl(r,e,Object);s[c]=s[c]||[],s[c].push(a)},Zu=(r,e)=>{const{obj:a,k:i}=Gl(r,e);if(a&&Object.prototype.hasOwnProperty.call(a,i))return a[i]},t_=(r,e,a)=>{const i=Zu(r,a);return i!==void 0?i:Zu(e,a)},YI=(r,e,a)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in r?At(r[i])||r[i]instanceof String||At(e[i])||e[i]instanceof String?a&&(r[i]=e[i]):YI(r[i],e[i],a):r[i]=e[i]);return r},mo=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var a_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const n_=r=>At(r)?r.replace(/[&<>"'\/]/g,e=>a_[e]):r;class r_{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 i_=[" ",",","?","!",";"],s_=new r_(20),o_=(r,e,a)=>{e=e||"",a=a||"";const i=i_.filter(d=>e.indexOf(d)<0&&a.indexOf(d)<0);if(i.length===0)return!0;const s=s_.getRegExp(`(${i.map(d=>d==="?"?"\\?":d).join("|")})`);let c=!s.test(r);if(!c){const d=r.indexOf(a);d>0&&!s.test(r.substring(0,d))&&(c=!0)}return c},lh=(r,e,a=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const i=e.split(a);let s=r;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},Wl=r=>r==null?void 0:r.replace("_","-"),l_={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var a,i;(i=(a=console==null?void 0:console[r])==null?void 0:a.apply)==null||i.call(a,console,e)}};class ed{constructor(e,a={}){this.init(e,a)}init(e,a={}){this.prefix=a.prefix||"i18next:",this.logger=e||l_,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:(At(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[a](e))}create(e){return new ed(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ed(this.logger,e)}}var Rr=new ed;class fd{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 tb extends fd{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):At(i)&&c?m.push(...i.split(c)):m.push(i)));const f=Zu(this.data,m);return!f&&!a&&!i&&e.indexOf(".")>-1&&(e=m[0],a=m[1],i=m.slice(2).join(".")),f||!d||!At(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),eb(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)(At(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=Zu(this.data,m)||{};d.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?YI(f,i,c):f={...f,...i},eb(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 JI={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,a,i,s){return r.forEach(c=>{var d;e=((d=this.processors[c])==null?void 0:d.process(e,a,i,s))??e}),e}};const ab={},nb=r=>!At(r)&&typeof r!="boolean"&&typeof r!="number";class td extends fd{constructor(e,a={}){super(),$U(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Rr.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&&!o_(e,i,s);if(d&&!m){const f=e.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:e,namespaces:At(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:At(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,w=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return w?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 v=this.resolve(e,s);let x=v==null?void 0:v.res;const T=(v==null?void 0:v.usedKey)||m,S=(v==null?void 0:v.exactUsedKey)||m,k=["[object Number]","[object Function]","[object RegExp]"],B=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,L=!this.i18nFormat||this.i18nFormat.handleAsObject,P=s.count!==void 0&&!At(s.count),_=td.hasDefaultValue(s),j=P?this.pluralResolver.getSuffix(p,s.count,s):"",V=s.ordinal&&P?this.pluralResolver.getSuffix(p,s.count,{ordinal:!1}):"",H=P&&!s.ordinal&&s.count===0,Q=H&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${j}`]||s[`defaultValue${V}`]||s.defaultValue;let G=x;L&&!x&&_&&(G=Q);const K=nb(G),$=Object.prototype.toString.apply(G);if(L&&G&&K&&k.indexOf($)<0&&!(At(B)&&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(T,G,{...s,ns:f}):`key '${m} (${this.language})' returned an object instead of string.`;return c?(v.res=J,v.usedParams=this.getUsedParamsDetails(s),v):J}if(d){const J=Array.isArray(G),re=J?[]:{},Ae=J?S:T;for(const X in G)if(Object.prototype.hasOwnProperty.call(G,X)){const ie=`${Ae}${d}${X}`;_&&!x?re[X]=this.translate(ie,{...s,defaultValue:nb(Q)?Q[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(L&&At(B)&&Array.isArray(x))x=x.join(B),x&&(x=this.extendTranslation(x,e,s,i));else{let J=!1,re=!1;!this.isValidLookup(x)&&_&&(J=!0,x=Q),this.isValidLookup(x)||(re=!0,x=m);const X=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&re?void 0:x,ie=_&&Q!==x&&this.options.updateMissing;if(re||J||ie){if(this.logger.log(ie?"updateKey":"missingKey",p,g,m,ie?Q: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 M=(q,ee,ne)=>{var we;const Ie=_&&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=>{M([q],m+ne,s[`defaultValue${ne}`]||Q)})}):M(ce,m,Q))}x=this.extendTranslation(x,e,s,v,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?(v.res=x,v.usedParams=this.getUsedParamsDetails(s),v):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=At(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 v=e.match(this.interpolator.nestingRegexp);p=v&&v.length}let w=i.replace&&!At(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(w={...this.options.interpolation.defaultVariables,...w}),e=this.interpolator.interpolate(e,w,i.lng||this.language||s.usedLng,i),E){const v=e.match(this.interpolator.nestingRegexp),x=v&&v.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,(...v)=>(c==null?void 0:c[0])===v[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${a[0]}`),null):this.translate(...v,a),i)),i.interpolation&&this.interpolator.reset()}const d=i.postProcess||this.options.postProcess,m=At(d)?[d]:d;return e!=null&&(m!=null&&m.length)&&i.applyPostProcessor!==!1&&(e=JI.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 At(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 w=a.count!==void 0&&!At(a.count),v=w&&!a.ordinal&&a.count===0,x=a.context!==void 0&&(At(a.context)||typeof a.context=="number")&&a.context!=="",T=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);p.forEach(S=>{var k,B;this.isValidLookup(i)||(m=S,!ab[`${T[0]}-${S}`]&&((k=this.utils)!=null&&k.hasLoadedNamespace)&&!((B=this.utils)!=null&&B.hasLoadedNamespace(m))&&(ab[`${T[0]}-${S}`]=!0,this.logger.warn(`key "${s}" for languages "${T.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!!!")),T.forEach(L=>{var j;if(this.isValidLookup(i))return;d=L;const P=[E];if((j=this.i18nFormat)!=null&&j.addLookupKeys)this.i18nFormat.addLookupKeys(P,E,L,S,a);else{let V;w&&(V=this.pluralResolver.getSuffix(L,a.count,a));const H=`${this.options.pluralSeparator}zero`,Q=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(w&&(P.push(E+V),a.ordinal&&V.indexOf(Q)===0&&P.push(E+V.replace(Q,this.options.pluralSeparator)),v&&P.push(E+H)),x){const G=`${E}${this.options.contextSeparator}${a.context}`;P.push(G),w&&(P.push(G+V),a.ordinal&&V.indexOf(Q)===0&&P.push(G+V.replace(Q,this.options.pluralSeparator)),v&&P.push(G+H))}}let _;for(;_=P.pop();)this.isValidLookup(i)||(c=_,i=this.getResource(L,S,_,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&&!At(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 rb{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Rr.create("languageUtils")}getScriptPartFromCode(e){if(e=Wl(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=Wl(e),!e||e.indexOf("-")<0)return e;const a=e.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(e){if(At(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)),At(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 At(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))):At(e)&&c(this.formatLanguageCode(e)),i.forEach(d=>{s.indexOf(d)<0&&c(this.formatLanguageCode(d))}),s}}const ib={zero:0,one:1,two:2,few:3,many:4,other:5},sb={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class c_{constructor(e,a={}){this.languageUtils=e,this.options=a,this.logger=Rr.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,a){this.rules[e]=a}clearCache(){this.pluralRulesCache={}}getRule(e,a={}){const i=Wl(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!"),sb;if(!e.match(/-|_/))return sb;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)=>ib[s]-ib[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 ob=(r,e,a,i=".",s=!0)=>{let c=t_(r,e,a);return!c&&s&&At(a)&&(c=lh(r,a,i),c===void 0&&(c=lh(e,a,i))),c},Uf=r=>r.replace(/\$/g,"$$$$");class u_{constructor(e={}){var a;this.logger=Rr.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:w,nestingPrefixEscaped:v,nestingSuffix:x,nestingSuffixEscaped:T,nestingOptionsSeparator:S,maxReplaces:k,alwaysFormat:B}=e.interpolation;this.escape=a!==void 0?a:n_,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=c?mo(c):d||"{{",this.suffix=m?mo(m):f||"}}",this.formatSeparator=g||",",this.unescapePrefix=E?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":E||"",this.nestingPrefix=w?mo(w):v||mo("$t("),this.nestingSuffix=x?mo(x):T||mo(")"),this.nestingOptionsSeparator=S||",",this.maxReplaces=k||1e3,this.alwaysFormat=B!==void 0?B:!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 v;let c,d,m;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=x=>{if(x.indexOf(this.formatSeparator)<0){const B=ob(a,f,x,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(B,void 0,i,{...s,...a,interpolationkey:x}):B}const T=x.split(this.formatSeparator),S=T.shift().trim(),k=T.join(this.formatSeparator).trim();return this.format(ob(a,f,S,this.options.keySeparator,this.options.ignoreJSONStructure),k,i,{...s,...a,interpolationkey:S})};this.resetRegExp();const E=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((v=s==null?void 0:s.interpolation)==null?void 0:v.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:x=>Uf(x)},{regex:this.regexp,safeValue:x=>this.escapeValue?Uf(this.escape(x)):Uf(x)}].forEach(x=>{for(m=0;c=x.regex.exec(e);){const T=c[1].trim();if(d=g(T),d===void 0)if(typeof E=="function"){const k=E(e,c,s);d=At(k)?k:""}else if(s&&Object.prototype.hasOwnProperty.call(s,T))d="";else if(p){d=c[0];continue}else this.logger.warn(`missed to pass in variable ${T} for interpolating ${e}`),d="";else!At(d)&&!this.useRawValueToEscape&&(d=XE(d));const S=x.safeValue(d);if(e=e.replace(c[0],S),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 w=`{${p[1]}`;f=p[0],w=this.interpolate(w,d);const v=w.match(/'/g),x=w.match(/"/g);(((v==null?void 0:v.length)??0)%2===0&&!x||x.length%2!==0)&&(w=w.replace(/'/g,'"'));try{d=JSON.parse(w),g&&(d={...g,...d})}catch(T){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,T),`${f}${E}${w}`}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&&!At(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&&!At(c))return c;At(c)||(c=XE(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 d_=r=>{let e=r.toLowerCase().trim();const a={};if(r.indexOf("(")>-1){const i=r.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}},lb=r=>{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=r(Wl(i),s),e[d]=m),m(a)}},m_=r=>(e,a,i)=>r(Wl(a),i)(e);class g_{constructor(e={}){this.logger=Rr.create("formatter"),this.options=e,this.init(e)}init(e,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const i=a.cacheInBuiltFormats?lb:m_;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()]=lb(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}=d_(f);if(this.formats[g]){let w=m;try{const v=((p=s==null?void 0:s.formatParams)==null?void 0:p[s.interpolationkey])||{},x=v.locale||v.lng||s.locale||s.lng||i;w=this.formats[g](m,x,{...E,...s,...v})}catch(v){this.logger.warn(v)}return w}else this.logger.warn(`there was no format function for ${g}`);return m},e)}}const f_=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class h_ extends fd{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=Rr.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 w=`${g}|${p}`;!i.reload&&this.store.hasResourceBundle(g,p)?this.state[w]=2:this.state[w]<0||(this.state[w]===1?d[w]===void 0&&(d[w]=!0):(this.state[w]=1,E=!1,d[w]===void 0&&(d[w]=!0),c[w]===void 0&&(c[w]=!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=>{e_(f.loaded,[c],d),f_(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();At(e)&&(e=this.languageUtils.toResolveHierarchy(e)),At(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,w;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((w=this.backend)!=null&&w.create){const v={...d,isUpdate:c},x=this.backend.create.bind(this.backend);if(x.length<6)try{let T;x.length===5?T=x(e,a,i,s,v):T=x(e,a,i,s),T&&typeof T.then=="function"?T.then(S=>m(null,S)).catch(m):m(null,T)}catch(T){m(T)}else x(e,a,i,s,m,v)}!e||!e[0]||this.store.addResource(e[0],a,i,s)}}}const cb=()=>({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:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),At(r[1])&&(e.defaultValue=r[1]),At(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const a=r[3]||r[2];Object.keys(a).forEach(i=>{e[i]=a[i]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ub=r=>{var e,a;return At(r.ns)&&(r.ns=[r.ns]),At(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),At(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((a=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:a.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},ku=()=>{},A_=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(a=>{typeof r[a]=="function"&&(r[a]=r[a].bind(r))})};class Yl extends fd{constructor(e={},a){if(super(),this.options=ub(e),this.services={},this.logger=Rr,this.modules={external:[]},A_(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&&(At(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=cb();this.options={...i,...this.options,...ub(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?Rr.init(s(this.modules.logger),this.options):Rr.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=g_;const E=new rb(this.options);this.store=new tb(this.options.resources,this.options);const p=this.services;p.logger=Rr,p.resourceStore=this.store,p.languageUtils=E,p.pluralResolver=new c_(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 u_(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new h_(s(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(v,...x)=>{this.emit(v,...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 td(this.services,this.options),this.translator.on("*",(v,...x)=>{this.emit(v,...x)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,a||(a=ku),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=Ul(),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=ku){var c,d;let i=a;const s=At(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=Ul();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=ku),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"&&JI.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=Ul();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=At(m)?m:m&&m[0],g=this.store.hasLanguageSomeTranslations(f)?f:this.services.languageUtils.getBestMatchFromCodes(At(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,w=>{c(w,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 At(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=Ul();return this.options.ns?(At(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=Ul();At(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 rb(cb());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 Yl(e,a)}cloneInstance(e={},a=ku){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},c=new Yl(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 tb(m,s),c.services.resourceStore=c.store}return c.translator=new td(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=Yl.createInstance();Ha.createInstance=Yl.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 p_=async()=>{const r=await xe.getItem("local:language");if(r&&Gu.includes(r))return r;const e=navigator.language.split("-")[0];return Gu.includes(e)?e:Lr},y_=async()=>{const r=await p_();await Ha.use(WC).init({resources:_l,lng:r,fallbackLng:Lr,debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1,bindI18n:"languageChanged loaded",bindI18nStore:""}})};y_().catch(r=>{console.error("Failed to initialize i18n:",r),Ha.emit("initialized")});const db=()=>{MC.createRoot(document.getElementById("root")).render(l.jsx(_k,{children:l.jsx(qk,{children:l.jsx(Vk,{children:l.jsx(Wk,{children:l.jsx(e2,{children:l.jsx($k,{children:l.jsx(KU,{children:l.jsx(XU,{})})})})})})})}))};Ha.isInitialized?db():Ha.on("initialized",db)});export default E_();
