var yS=Object.defineProperty;var ES=(t,e,n)=>e in t?yS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var bS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var qe=(t,e,n)=>ES(t,typeof e!="symbol"?e+"":e,n);var p4=bS((E4,qw)=>{(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 l of s)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();try{}catch(t){console.error("[wxt] Failed to initialize plugins",t)}function is(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function vS(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return t[i]}})}),n}var mf={exports:{}},Ml={};/**
 * @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 rE;function IS(){if(rE)return Ml;rE=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,s,l){var d=null;if(l!==void 0&&(d=""+l),s.key!==void 0&&(d=""+s.key),"key"in s){l={};for(var m in s)m!=="key"&&(l[m]=s[m])}else l=s;return s=l.ref,{$$typeof:t,type:i,key:d,ref:s!==void 0?s:null,props:l}}return Ml.Fragment=e,Ml.jsx=n,Ml.jsxs=n,Ml}var iE;function wS(){return iE||(iE=1,mf.exports=IS()),mf.exports}var c=wS(),gf={exports:{}},_l={},ff={exports:{}},hf={};/**
 * @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 sE;function CS(){return sE||(sE=1,function(t){function e(W,ae){var be=W.length;W.push(ae);e:for(;0<be;){var se=be-1>>>1,P=W[se];if(0<s(P,ae))W[se]=ae,W[be]=P,be=se;else break e}}function n(W){return W.length===0?null:W[0]}function i(W){if(W.length===0)return null;var ae=W[0],be=W.pop();if(be!==ae){W[0]=be;e:for(var se=0,P=W.length,q=P>>>1;se<q;){var Y=2*(se+1)-1,ne=W[Y],Ie=Y+1,ce=W[Ie];if(0>s(ne,be))Ie<P&&0>s(ce,ne)?(W[se]=ce,W[Ie]=be,se=Ie):(W[se]=ne,W[Y]=be,se=Y);else if(Ie<P&&0>s(ce,be))W[se]=ce,W[Ie]=be,se=Ie;else break e}}return ae}function s(W,ae){var be=W.sortIndex-ae.sortIndex;return be!==0?be:W.id-ae.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var d=Date,m=d.now();t.unstable_now=function(){return d.now()-m}}var f=[],g=[],A=1,p=null,v=3,I=!1,x=!1,N=!1,T=!1,L=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function F(W){for(var ae=n(g);ae!==null;){if(ae.callback===null)i(g);else if(ae.startTime<=W)i(g),ae.sortIndex=ae.expirationTime,e(f,ae);else break;ae=n(g)}}function _(W){if(N=!1,F(W),!x)if(n(f)!==null)x=!0,V||(V=!0,te());else{var ae=n(g);ae!==null&&ue(_,ae.startTime-W)}}var V=!1,U=-1,O=5,z=-1;function Q(){return T?!0:!(t.unstable_now()-z<O)}function K(){if(T=!1,V){var W=t.unstable_now();z=W;var ae=!0;try{e:{x=!1,N&&(N=!1,B(U),U=-1),I=!0;var be=v;try{t:{for(F(W),p=n(f);p!==null&&!(p.expirationTime>W&&Q());){var se=p.callback;if(typeof se=="function"){p.callback=null,v=p.priorityLevel;var P=se(p.expirationTime<=W);if(W=t.unstable_now(),typeof P=="function"){p.callback=P,F(W),ae=!0;break t}p===n(f)&&i(f),F(W)}else i(f);p=n(f)}if(p!==null)ae=!0;else{var q=n(g);q!==null&&ue(_,q.startTime-W),ae=!1}}break e}finally{p=null,v=be,I=!1}ae=void 0}}finally{ae?te():V=!1}}}var te;if(typeof k=="function")te=function(){k(K)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,X=ee.port2;ee.port1.onmessage=K,te=function(){X.postMessage(null)}}else te=function(){L(K,0)};function ue(W,ae){U=L(function(){W(t.unstable_now())},ae)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(W){W.callback=null},t.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<W?Math.floor(1e3/W):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(W){switch(v){case 1:case 2:case 3:var ae=3;break;default:ae=v}var be=v;v=ae;try{return W()}finally{v=be}},t.unstable_requestPaint=function(){T=!0},t.unstable_runWithPriority=function(W,ae){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var be=v;v=W;try{return ae()}finally{v=be}},t.unstable_scheduleCallback=function(W,ae,be){var se=t.unstable_now();switch(typeof be=="object"&&be!==null?(be=be.delay,be=typeof be=="number"&&0<be?se+be:se):be=se,W){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=be+P,W={id:A++,callback:ae,priorityLevel:W,startTime:be,expirationTime:P,sortIndex:-1},be>se?(W.sortIndex=be,e(g,W),n(f)===null&&W===n(g)&&(N?(B(U),U=-1):N=!0,ue(_,be-se))):(W.sortIndex=P,e(f,W),x||I||(x=!0,V||(V=!0,te()))),W},t.unstable_shouldYield=Q,t.unstable_wrapCallback=function(W){var ae=v;return function(){var be=v;v=ae;try{return W.apply(this,arguments)}finally{v=be}}}}(hf)),hf}var oE;function SS(){return oE||(oE=1,ff.exports=CS()),ff.exports}var pf={exports:{}},Ct={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var lE;function NS(){if(lE)return Ct;lE=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=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"),A=Symbol.for("react.lazy"),p=Symbol.iterator;function v(P){return P===null||typeof P!="object"?null:(P=p&&P[p]||P["@@iterator"],typeof P=="function"?P:null)}var I={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,N={};function T(P,q,Y){this.props=P,this.context=q,this.refs=N,this.updater=Y||I}T.prototype.isReactComponent={},T.prototype.setState=function(P,q){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,q,"setState")},T.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function L(){}L.prototype=T.prototype;function B(P,q,Y){this.props=P,this.context=q,this.refs=N,this.updater=Y||I}var k=B.prototype=new L;k.constructor=B,x(k,T.prototype),k.isPureReactComponent=!0;var F=Array.isArray,_={H:null,A:null,T:null,S:null,V:null},V=Object.prototype.hasOwnProperty;function U(P,q,Y,ne,Ie,ce){return Y=ce.ref,{$$typeof:t,type:P,key:q,ref:Y!==void 0?Y:null,props:ce}}function O(P,q){return U(P.type,q,void 0,void 0,void 0,P.props)}function z(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function Q(P){var q={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(Y){return q[Y]})}var K=/\/+/g;function te(P,q){return typeof P=="object"&&P!==null&&P.key!=null?Q(""+P.key):q.toString(36)}function ee(){}function X(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(ee,ee):(P.status="pending",P.then(function(q){P.status==="pending"&&(P.status="fulfilled",P.value=q)},function(q){P.status==="pending"&&(P.status="rejected",P.reason=q)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function ue(P,q,Y,ne,Ie){var ce=typeof P;(ce==="undefined"||ce==="boolean")&&(P=null);var Ee=!1;if(P===null)Ee=!0;else switch(ce){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(P.$$typeof){case t:case e:Ee=!0;break;case A:return Ee=P._init,ue(Ee(P._payload),q,Y,ne,Ie)}}if(Ee)return Ie=Ie(P),Ee=ne===""?"."+te(P,0):ne,F(Ie)?(Y="",Ee!=null&&(Y=Ee.replace(K,"$&/")+"/"),ue(Ie,q,Y,"",function(Oe){return Oe})):Ie!=null&&(z(Ie)&&(Ie=O(Ie,Y+(Ie.key==null||P&&P.key===Ie.key?"":(""+Ie.key).replace(K,"$&/")+"/")+Ee)),q.push(Ie)),1;Ee=0;var Ne=ne===""?".":ne+":";if(F(P))for(var we=0;we<P.length;we++)ne=P[we],ce=Ne+te(ne,we),Ee+=ue(ne,q,Y,ce,Ie);else if(we=v(P),typeof we=="function")for(P=we.call(P),we=0;!(ne=P.next()).done;)ne=ne.value,ce=Ne+te(ne,we++),Ee+=ue(ne,q,Y,ce,Ie);else if(ce==="object"){if(typeof P.then=="function")return ue(X(P),q,Y,ne,Ie);throw q=String(P),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function W(P,q,Y){if(P==null)return P;var ne=[],Ie=0;return ue(P,ne,"","",function(ce){return q.call(Y,ce,Ie++)}),ne}function ae(P){if(P._status===-1){var q=P._result;q=q(),q.then(function(Y){(P._status===0||P._status===-1)&&(P._status=1,P._result=Y)},function(Y){(P._status===0||P._status===-1)&&(P._status=2,P._result=Y)}),P._status===-1&&(P._status=0,P._result=q)}if(P._status===1)return P._result.default;throw P._result}var be=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)};function se(){}return Ct.Children={map:W,forEach:function(P,q,Y){W(P,function(){q.apply(this,arguments)},Y)},count:function(P){var q=0;return W(P,function(){q++}),q},toArray:function(P){return W(P,function(q){return q})||[]},only:function(P){if(!z(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Ct.Component=T,Ct.Fragment=n,Ct.Profiler=s,Ct.PureComponent=B,Ct.StrictMode=i,Ct.Suspense=f,Ct.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,Ct.__COMPILER_RUNTIME={__proto__:null,c:function(P){return _.H.useMemoCache(P)}},Ct.cache=function(P){return function(){return P.apply(null,arguments)}},Ct.cloneElement=function(P,q,Y){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var ne=x({},P.props),Ie=P.key,ce=void 0;if(q!=null)for(Ee in q.ref!==void 0&&(ce=void 0),q.key!==void 0&&(Ie=""+q.key),q)!V.call(q,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&q.ref===void 0||(ne[Ee]=q[Ee]);var Ee=arguments.length-2;if(Ee===1)ne.children=Y;else if(1<Ee){for(var Ne=Array(Ee),we=0;we<Ee;we++)Ne[we]=arguments[we+2];ne.children=Ne}return U(P.type,Ie,void 0,void 0,ce,ne)},Ct.createContext=function(P){return P={$$typeof:d,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:l,_context:P},P},Ct.createElement=function(P,q,Y){var ne,Ie={},ce=null;if(q!=null)for(ne in q.key!==void 0&&(ce=""+q.key),q)V.call(q,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(Ie[ne]=q[ne]);var Ee=arguments.length-2;if(Ee===1)Ie.children=Y;else if(1<Ee){for(var Ne=Array(Ee),we=0;we<Ee;we++)Ne[we]=arguments[we+2];Ie.children=Ne}if(P&&P.defaultProps)for(ne in Ee=P.defaultProps,Ee)Ie[ne]===void 0&&(Ie[ne]=Ee[ne]);return U(P,ce,void 0,void 0,null,Ie)},Ct.createRef=function(){return{current:null}},Ct.forwardRef=function(P){return{$$typeof:m,render:P}},Ct.isValidElement=z,Ct.lazy=function(P){return{$$typeof:A,_payload:{_status:-1,_result:P},_init:ae}},Ct.memo=function(P,q){return{$$typeof:g,type:P,compare:q===void 0?null:q}},Ct.startTransition=function(P){var q=_.T,Y={};_.T=Y;try{var ne=P(),Ie=_.S;Ie!==null&&Ie(Y,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(se,be)}catch(ce){be(ce)}finally{_.T=q}},Ct.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},Ct.use=function(P){return _.H.use(P)},Ct.useActionState=function(P,q,Y){return _.H.useActionState(P,q,Y)},Ct.useCallback=function(P,q){return _.H.useCallback(P,q)},Ct.useContext=function(P){return _.H.useContext(P)},Ct.useDebugValue=function(){},Ct.useDeferredValue=function(P,q){return _.H.useDeferredValue(P,q)},Ct.useEffect=function(P,q,Y){var ne=_.H;if(typeof Y=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return ne.useEffect(P,q)},Ct.useId=function(){return _.H.useId()},Ct.useImperativeHandle=function(P,q,Y){return _.H.useImperativeHandle(P,q,Y)},Ct.useInsertionEffect=function(P,q){return _.H.useInsertionEffect(P,q)},Ct.useLayoutEffect=function(P,q){return _.H.useLayoutEffect(P,q)},Ct.useMemo=function(P,q){return _.H.useMemo(P,q)},Ct.useOptimistic=function(P,q){return _.H.useOptimistic(P,q)},Ct.useReducer=function(P,q,Y){return _.H.useReducer(P,q,Y)},Ct.useRef=function(P){return _.H.useRef(P)},Ct.useState=function(P){return _.H.useState(P)},Ct.useSyncExternalStore=function(P,q,Y){return _.H.useSyncExternalStore(P,q,Y)},Ct.useTransition=function(){return _.H.useTransition()},Ct.version="19.1.0",Ct}var cE;function np(){return cE||(cE=1,pf.exports=NS()),pf.exports}var Af={exports:{}},yn={};/**
 * @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 dE;function xS(){if(dE)return yn;dE=1;var t=np();function e(f){var g="https://react.dev/errors/"+f;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)g+="&args[]="+encodeURIComponent(arguments[A])}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 n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(f,g,A){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:A}}var d=t.__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 yn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,yn.createPortal=function(f,g){var A=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 l(f,g,null,A)},yn.flushSync=function(f){var g=d.T,A=i.p;try{if(d.T=null,i.p=2,f)return f()}finally{d.T=g,i.p=A,i.d.f()}},yn.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))},yn.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},yn.preinit=function(f,g){if(typeof f=="string"&&g&&typeof g.as=="string"){var A=g.as,p=m(A,g.crossOrigin),v=typeof g.integrity=="string"?g.integrity:void 0,I=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;A==="style"?i.d.S(f,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:v,fetchPriority:I}):A==="script"&&i.d.X(f,{crossOrigin:p,integrity:v,fetchPriority:I,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},yn.preinitModule=function(f,g){if(typeof f=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var A=m(g.as,g.crossOrigin);i.d.M(f,{crossOrigin:A,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)},yn.preload=function(f,g){if(typeof f=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var A=g.as,p=m(A,g.crossOrigin);i.d.L(f,A,{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})}},yn.preloadModule=function(f,g){if(typeof f=="string")if(g){var A=m(g.as,g.crossOrigin);i.d.m(f,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(f)},yn.requestFormReset=function(f){i.d.r(f)},yn.unstable_batchedUpdates=function(f,g){return f(g)},yn.useFormState=function(f,g,A){return d.H.useFormState(f,g,A)},yn.useFormStatus=function(){return d.H.useHostTransitionStatus()},yn.version="19.1.0",yn}var uE;function jv(){if(uE)return Af.exports;uE=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Af.exports=xS(),Af.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 mE;function TS(){if(mE)return _l;mE=1;var t=SS(),e=np(),n=jv();function i(a){var r="https://react.dev/errors/"+a;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)r+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+a+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function l(a){var r=a,o=a;if(a.alternate)for(;r.return;)r=r.return;else{a=r;do r=a,(r.flags&4098)!==0&&(o=r.return),a=r.return;while(a)}return r.tag===3?o:null}function d(a){if(a.tag===13){var r=a.memoizedState;if(r===null&&(a=a.alternate,a!==null&&(r=a.memoizedState)),r!==null)return r.dehydrated}return null}function m(a){if(l(a)!==a)throw Error(i(188))}function f(a){var r=a.alternate;if(!r){if(r=l(a),r===null)throw Error(i(188));return r!==a?null:a}for(var o=a,u=r;;){var h=o.return;if(h===null)break;var E=h.alternate;if(E===null){if(u=h.return,u!==null){o=u;continue}break}if(h.child===E.child){for(E=h.child;E;){if(E===o)return m(h),a;if(E===u)return m(h),r;E=E.sibling}throw Error(i(188))}if(o.return!==u.return)o=h,u=E;else{for(var D=!1,j=h.child;j;){if(j===o){D=!0,o=h,u=E;break}if(j===u){D=!0,u=h,o=E;break}j=j.sibling}if(!D){for(j=E.child;j;){if(j===o){D=!0,o=E,u=h;break}if(j===u){D=!0,u=E,o=h;break}j=j.sibling}if(!D)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?a:r}function g(a){var r=a.tag;if(r===5||r===26||r===27||r===6)return a;for(a=a.child;a!==null;){if(r=g(a),r!==null)return r;a=a.sibling}return null}var A=Object.assign,p=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),I=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),B=Symbol.for("react.consumer"),k=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function te(a){return a===null||typeof a!="object"?null:(a=K&&a[K]||a["@@iterator"],typeof a=="function"?a:null)}var ee=Symbol.for("react.client.reference");function X(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ee?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case x:return"Fragment";case T:return"Profiler";case N:return"StrictMode";case _:return"Suspense";case V:return"SuspenseList";case z:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case I:return"Portal";case k:return(a.displayName||"Context")+".Provider";case B:return(a._context.displayName||"Context")+".Consumer";case F:var r=a.render;return a=a.displayName,a||(a=r.displayName||r.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case U:return r=a.displayName||null,r!==null?r:X(a.type)||"Memo";case O:r=a._payload,a=a._init;try{return X(a(r))}catch{}}return null}var ue=Array.isArray,W=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},se=[],P=-1;function q(a){return{current:a}}function Y(a){0>P||(a.current=se[P],se[P]=null,P--)}function ne(a,r){P++,se[P]=a.current,a.current=r}var Ie=q(null),ce=q(null),Ee=q(null),Ne=q(null);function we(a,r){switch(ne(Ee,r),ne(ce,a),ne(Ie,null),r.nodeType){case 9:case 11:a=(a=r.documentElement)&&(a=a.namespaceURI)?Ry(a):0;break;default:if(a=r.tagName,r=r.namespaceURI)r=Ry(r),a=By(r,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Y(Ie),ne(Ie,a)}function Oe(){Y(Ie),Y(ce),Y(Ee)}function ze(a){a.memoizedState!==null&&ne(Ne,a);var r=Ie.current,o=By(r,a.type);r!==o&&(ne(ce,a),ne(Ie,o))}function Et(a){ce.current===a&&(Y(Ie),Y(ce)),Ne.current===a&&(Y(Ne),Ll._currentValue=be)}var ht=Object.prototype.hasOwnProperty,it=t.unstable_scheduleCallback,Ge=t.unstable_cancelCallback,Ft=t.unstable_shouldYield,Se=t.unstable_requestPaint,Fe=t.unstable_now,he=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Ve=t.unstable_UserBlockingPriority,He=t.unstable_NormalPriority,tt=t.unstable_LowPriority,It=t.unstable_IdlePriority,Ot=t.log,Tt=t.unstable_setDisableYieldValue,Yt=null,M=null;function C(a){if(typeof Ot=="function"&&Tt(a),M&&typeof M.setStrictMode=="function")try{M.setStrictMode(Yt,a)}catch{}}var S=Math.clz32?Math.clz32:pe,G=Math.log,re=Math.LN2;function pe(a){return a>>>=0,a===0?32:31-(G(a)/re|0)|0}var Ce=256,_e=4194304;function ct(a){var r=a&42;if(r!==0)return r;switch(a&-a){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 a&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function gt(a,r,o){var u=a.pendingLanes;if(u===0)return 0;var h=0,E=a.suspendedLanes,D=a.pingedLanes;a=a.warmLanes;var j=u&134217727;return j!==0?(u=j&~E,u!==0?h=ct(u):(D&=j,D!==0?h=ct(D):o||(o=j&~a,o!==0&&(h=ct(o))))):(j=u&~E,j!==0?h=ct(j):D!==0?h=ct(D):o||(o=u&~a,o!==0&&(h=ct(o)))),h===0?0:r!==0&&r!==h&&(r&E)===0&&(E=h&-h,o=r&-r,E>=o||E===32&&(o&4194048)!==0)?r:h}function St(a,r){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&r)===0}function pt(a,r){switch(a){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gr(){var a=Ce;return Ce<<=1,(Ce&4194048)===0&&(Ce=256),a}function ca(){var a=_e;return _e<<=1,(_e&62914560)===0&&(_e=4194304),a}function nn(a){for(var r=[],o=0;31>o;o++)r.push(a);return r}function Rt(a,r){a.pendingLanes|=r,r!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function ta(a,r,o,u,h,E){var D=a.pendingLanes;a.pendingLanes=o,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=o,a.entangledLanes&=o,a.errorRecoveryDisabledLanes&=o,a.shellSuspendCounter=0;var j=a.entanglements,$=a.expirationTimes,fe=a.hiddenUpdates;for(o=D&~o;0<o;){var xe=31-S(o),Re=1<<xe;j[xe]=0,$[xe]=-1;var Ae=fe[xe];if(Ae!==null)for(fe[xe]=null,xe=0;xe<Ae.length;xe++){var ye=Ae[xe];ye!==null&&(ye.lane&=-536870913)}o&=~Re}u!==0&&Me(a,u,0),E!==0&&h===0&&a.tag!==0&&(a.suspendedLanes|=E&~(D&~r))}function Me(a,r,o){a.pendingLanes|=r,a.suspendedLanes&=~r;var u=31-S(r);a.entangledLanes|=r,a.entanglements[u]=a.entanglements[u]|1073741824|o&4194090}function rn(a,r){var o=a.entangledLanes|=r;for(a=a.entanglements;o;){var u=31-S(o),h=1<<u;h&r|a[u]&r&&(a[u]|=r),o&=~h}}function Nt(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function kt(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function ka(){var a=ae.p;return a!==0?a:(a=window.event,a===void 0?32:$y(a.type))}function sn(a,r){var o=ae.p;try{return ae.p=a,r()}finally{ae.p=o}}var zt=Math.random().toString(36).slice(2),Lt="__reactFiber$"+zt,Gt="__reactProps$"+zt,Vt="__reactContainer$"+zt,pa="__reactEvents$"+zt,Aa="__reactListeners$"+zt,Ma="__reactHandles$"+zt,hn="__reactResources$"+zt,_a="__reactMarker$"+zt;function ya(a){delete a[Lt],delete a[Gt],delete a[pa],delete a[Aa],delete a[Ma]}function oe(a){var r=a[Lt];if(r)return r;for(var o=a.parentNode;o;){if(r=o[Vt]||o[Lt]){if(o=r.alternate,r.child!==null||o!==null&&o.child!==null)for(a=Fy(a);a!==null;){if(o=a[Lt])return o;a=Fy(a)}return r}a=o,o=a.parentNode}return null}function Pe(a){if(a=a[Lt]||a[Vt]){var r=a.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return a}return null}function Qe(a){var r=a.tag;if(r===5||r===26||r===27||r===6)return a.stateNode;throw Error(i(33))}function $e(a){var r=a[hn];return r||(r=a[hn]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function et(a){a[_a]=!0}var Bt=new Set,Ue={};function J(a,r){ke(a,r),ke(a+"Capture",r)}function ke(a,r){for(Ue[a]=r,a=0;a<r.length;a++)Bt.add(r[a])}var je=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]*$"),jt={},da={};function ua(a){return ht.call(da,a)?!0:ht.call(jt,a)?!1:je.test(a)?da[a]=!0:(jt[a]=!0,!1)}function ra(a,r,o){if(ua(r))if(o===null)a.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":a.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){a.removeAttribute(r);return}}a.setAttribute(r,""+o)}}function za(a,r,o){if(o===null)a.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(r);return}a.setAttribute(r,""+o)}}function La(a,r,o,u){if(u===null)a.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(o);return}a.setAttributeNS(r,o,""+u)}}var Sr,ma;function On(a){if(Sr===void 0)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);Sr=r&&r[1]||"",ma=-1<o.stack.indexOf(`
    at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Sr+a+ma}var Qr=!1;function Os(a,r){if(!a||Qr)return"";Qr=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var Re=function(){throw Error()};if(Object.defineProperty(Re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Re,[])}catch(ye){var Ae=ye}Reflect.construct(a,[],Re)}else{try{Re.call()}catch(ye){Ae=ye}a.call(Re.prototype)}}else{try{throw Error()}catch(ye){Ae=ye}(Re=a())&&typeof Re.catch=="function"&&Re.catch(function(){})}}catch(ye){if(ye&&Ae&&typeof ye.stack=="string")return[ye.stack,Ae.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 E=u.DetermineComponentFrameRoot(),D=E[0],j=E[1];if(D&&j){var $=D.split(`
`),fe=j.split(`
`);for(h=u=0;u<$.length&&!$[u].includes("DetermineComponentFrameRoot");)u++;for(;h<fe.length&&!fe[h].includes("DetermineComponentFrameRoot");)h++;if(u===$.length||h===fe.length)for(u=$.length-1,h=fe.length-1;1<=u&&0<=h&&$[u]!==fe[h];)h--;for(;1<=u&&0<=h;u--,h--)if($[u]!==fe[h]){if(u!==1||h!==1)do if(u--,h--,0>h||$[u]!==fe[h]){var xe=`
`+$[u].replace(" at new "," at ");return a.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",a.displayName)),xe}while(1<=u&&0<=h);break}}}finally{Qr=!1,Error.prepareStackTrace=o}return(o=a?a.displayName||a.name:"")?On(o):""}function Rc(a){switch(a.tag){case 26:case 27:case 5:return On(a.type);case 16:return On("Lazy");case 13:return On("Suspense");case 19:return On("SuspenseList");case 0:case 15:return Os(a.type,!1);case 11:return Os(a.type.render,!1);case 1:return Os(a.type,!0);case 31:return On("Activity");default:return""}}function Bc(a){try{var r="";do r+=Rc(a),a=a.return;while(a);return r}catch(o){return`
Error generating stack: `+o.message+`
`+o.stack}}function Da(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function ia(a){var r=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Kr(a){var r=ia(a)?"checked":"value",o=Object.getOwnPropertyDescriptor(a.constructor.prototype,r),u=""+a[r];if(!a.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,E=o.set;return Object.defineProperty(a,r,{configurable:!0,get:function(){return h.call(this)},set:function(D){u=""+D,E.call(this,D)}}),Object.defineProperty(a,r,{enumerable:o.enumerable}),{getValue:function(){return u},setValue:function(D){u=""+D},stopTracking:function(){a._valueTracker=null,delete a[r]}}}}function Gr(a){a._valueTracker||(a._valueTracker=Kr(a))}function ss(a){if(!a)return!1;var r=a._valueTracker;if(!r)return!0;var o=r.getValue(),u="";return a&&(u=ia(a)?a.checked?"true":"false":a.value),a=u,a!==o?(r.setValue(a),!0):!1}function qr(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var Po=/[\n"\\]/g;function xn(a){return a.replace(Po,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Ho(a,r,o,u,h,E,D,j){a.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?a.type=D:a.removeAttribute("type"),r!=null?D==="number"?(r===0&&a.value===""||a.value!=r)&&(a.value=""+Da(r)):a.value!==""+Da(r)&&(a.value=""+Da(r)):D!=="submit"&&D!=="reset"||a.removeAttribute("value"),r!=null?js(a,D,Da(r)):o!=null?js(a,D,Da(o)):u!=null&&a.removeAttribute("value"),h==null&&E!=null&&(a.defaultChecked=!!E),h!=null&&(a.checked=h&&typeof h!="function"&&typeof h!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?a.name=""+Da(j):a.removeAttribute("name")}function Ei(a,r,o,u,h,E,D,j){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(a.type=E),r!=null||o!=null){if(!(E!=="submit"&&E!=="reset"||r!=null))return;o=o!=null?""+Da(o):"",r=r!=null?""+Da(r):o,j||r===a.value||(a.value=r),a.defaultValue=r}u=u??h,u=typeof u!="function"&&typeof u!="symbol"&&!!u,a.checked=j?a.checked:!!u,a.defaultChecked=!!u,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(a.name=D)}function js(a,r,o){r==="number"&&qr(a.ownerDocument)===a||a.defaultValue===""+o||(a.defaultValue=""+o)}function bi(a,r,o,u){if(a=a.options,r){r={};for(var h=0;h<o.length;h++)r["$"+o[h]]=!0;for(o=0;o<a.length;o++)h=r.hasOwnProperty("$"+a[o].value),a[o].selected!==h&&(a[o].selected=h),h&&u&&(a[o].defaultSelected=!0)}else{for(o=""+Da(o),r=null,h=0;h<a.length;h++){if(a[h].value===o){a[h].selected=!0,u&&(a[h].defaultSelected=!0);return}r!==null||a[h].disabled||(r=a[h])}r!==null&&(r.selected=!0)}}function Ps(a,r,o){if(r!=null&&(r=""+Da(r),r!==a.value&&(a.value=r),o==null)){a.defaultValue!==r&&(a.defaultValue=r);return}a.defaultValue=o!=null?""+Da(o):""}function zo(a,r,o,u){if(r==null){if(u!=null){if(o!=null)throw Error(i(92));if(ue(u)){if(1<u.length)throw Error(i(93));u=u[0]}o=u}o==null&&(o=""),r=o}o=Da(r),a.defaultValue=o,u=a.textContent,u===o&&u!==""&&u!==null&&(a.value=u)}function Nr(a,r){if(r){var o=a.firstChild;if(o&&o===a.lastChild&&o.nodeType===3){o.nodeValue=r;return}}a.textContent=r}var Vo=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 Uc(a,r,o){var u=r.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?a.setProperty(r,""):r==="float"?a.cssFloat="":a[r]="":u?a.setProperty(r,o):typeof o!="number"||o===0||Vo.has(r)?r==="float"?a.cssFloat=o:a[r]=(""+o).trim():a[r]=o+"px"}function os(a,r,o){if(r!=null&&typeof r!="object")throw Error(i(62));if(a=a.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?a.setProperty(u,""):u==="float"?a.cssFloat="":a[u]="");for(var h in r)u=r[h],r.hasOwnProperty(h)&&o[h]!==u&&Uc(a,h,u)}else for(var E in r)r.hasOwnProperty(E)&&Uc(a,E,r[E])}function vi(a){if(a.indexOf("-")===-1)return!1;switch(a){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 Wr=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"]]),Qo=/^[\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 Tn(a){return Qo.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}var er=null;function Yr(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Ii=null,Ze=null;function Hs(a){var r=Pe(a);if(r&&(a=r.stateNode)){var o=a[Gt]||null;e:switch(a=r.stateNode,r.type){case"input":if(Ho(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),r=o.name,o.type==="radio"&&r!=null){for(o=a;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+xn(""+r)+'"][type="radio"]'),r=0;r<o.length;r++){var u=o[r];if(u!==a&&u.form===a.form){var h=u[Gt]||null;if(!h)throw Error(i(90));Ho(u,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<o.length;r++)u=o[r],u.form===a.form&&ss(u)}break e;case"textarea":Ps(a,o.value,o.defaultValue);break e;case"select":r=o.value,r!=null&&bi(a,!!o.multiple,r,!1)}}}var wi=!1;function Ko(a,r,o){if(wi)return a(r,o);wi=!0;try{var u=a(r);return u}finally{if(wi=!1,(Ii!==null||Ze!==null)&&(bd(),Ii&&(r=Ii,a=Ze,Ze=Ii=null,Hs(r),a)))for(r=0;r<a.length;r++)Hs(a[r])}}function Ci(a,r){var o=a.stateNode;if(o===null)return null;var u=o[Gt]||null;if(u===null)return null;o=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(a=a.type,u=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!u;break e;default:a=!1}if(a)return null;if(o&&typeof o!="function")throw Error(i(231,r,typeof o));return o}var vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tr=!1;if(vn)try{var fr={};Object.defineProperty(fr,"passive",{get:function(){tr=!0}}),window.addEventListener("test",fr,fr),window.removeEventListener("test",fr,fr)}catch{tr=!1}var ar=null,y=null,w=null;function R(){if(w)return w;var a,r=y,o=r.length,u,h="value"in ar?ar.value:ar.textContent,E=h.length;for(a=0;a<o&&r[a]===h[a];a++);var D=o-a;for(u=1;u<=D&&r[o-u]===h[E-u];u++);return w=h.slice(a,1<u?1-u:void 0)}function H(a){var r=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&r===13&&(a=13)):a=r,a===10&&(a=13),32<=a||a===13?a:0}function Z(){return!0}function me(){return!1}function ve(a){function r(o,u,h,E,D){this._reactName=o,this._targetInst=h,this.type=u,this.nativeEvent=E,this.target=D,this.currentTarget=null;for(var j in a)a.hasOwnProperty(j)&&(o=a[j],this[j]=o?o(E):E[j]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?Z:me,this.isPropagationStopped=me,this}return A(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Z)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Z)},persist:function(){},isPersistent:Z}),r}var We={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vt=ve(We),At=A({},We,{view:0,detail:0}),Ea=ve(At),Ja,zs,ls,cs=A({},At,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wo,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==ls&&(ls&&a.type==="mousemove"?(Ja=a.screenX-ls.screenX,zs=a.screenY-ls.screenY):zs=Ja=0,ls=a),Ja)},movementY:function(a){return"movementY"in a?a.movementY:zs}}),Mc=ve(cs),_c=A({},cs,{dataTransfer:0}),Zu=ve(_c),em=A({},At,{relatedTarget:0}),Go=ve(em),tm=A({},We,{animationName:0,elapsedTime:0,pseudoElement:0}),am=ve(tm),nm=A({},We,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),rm=ve(nm),im=A({},We,{data:0}),qo=ve(im),sm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},om={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"},lm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cm(a){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(a):(a=lm[a])?!!r[a]:!1}function Wo(){return cm}var dm=A({},At,{key:function(a){if(a.key){var r=sm[a.key]||a.key;if(r!=="Unidentified")return r}return a.type==="keypress"?(a=H(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?om[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wo,charCode:function(a){return a.type==="keypress"?H(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?H(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),um=ve(dm),Fc=A({},cs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Oc=ve(Fc),mm=A({},At,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wo}),gm=ve(mm),fm=A({},We,{propertyName:0,elapsedTime:0,pseudoElement:0}),hm=ve(fm),pm=A({},cs,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),jc=ve(pm),Am=A({},We,{newState:0,oldState:0}),ym=ve(Am),Em=[9,13,27,32],Si=vn&&"CompositionEvent"in window,Ni=null;vn&&"documentMode"in document&&(Ni=document.documentMode);var Pc=vn&&"TextEvent"in window&&!Ni,Yo=vn&&(!Si||Ni&&8<Ni&&11>=Ni),de=" ",Be=!1;function Ye(a,r){switch(a){case"keyup":return Em.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function st(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var dt=!1;function Jt(a,r){switch(a){case"compositionend":return st(r);case"keypress":return r.which!==32?null:(Be=!0,de);case"textInput":return a=r.data,a===de&&Be?null:a;default:return null}}function jn(a,r){if(dt)return a==="compositionend"||!Si&&Ye(a,r)?(a=R(),w=y=ar=null,dt=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Yo&&r.locale!=="ko"?null:r.data;default:return null}}var kn={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 pn(a){var r=a&&a.nodeName&&a.nodeName.toLowerCase();return r==="input"?!!kn[a.type]:r==="textarea"}function Ln(a,r,o,u){Ii?Ze?Ze.push(u):Ze=[u]:Ii=u,r=Nd(r,"onChange"),0<r.length&&(o=new vt("onChange","change",null,o,u),a.push({event:o,listeners:r}))}var Jr=null,Pn=null;function bm(a){xy(a,0)}function Hc(a){var r=Qe(a);if(ss(r))return a}function Wp(a,r){if(a==="change")return r}var Yp=!1;if(vn){var vm;if(vn){var Im="oninput"in document;if(!Im){var Jp=document.createElement("div");Jp.setAttribute("oninput","return;"),Im=typeof Jp.oninput=="function"}vm=Im}else vm=!1;Yp=vm&&(!document.documentMode||9<document.documentMode)}function Xp(){Jr&&(Jr.detachEvent("onpropertychange",$p),Pn=Jr=null)}function $p(a){if(a.propertyName==="value"&&Hc(Pn)){var r=[];Ln(r,Pn,a,Yr(a)),Ko(bm,r)}}function Ww(a,r,o){a==="focusin"?(Xp(),Jr=r,Pn=o,Jr.attachEvent("onpropertychange",$p)):a==="focusout"&&Xp()}function Yw(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Hc(Pn)}function Jw(a,r){if(a==="click")return Hc(r)}function Xw(a,r){if(a==="input"||a==="change")return Hc(r)}function $w(a,r){return a===r&&(a!==0||1/a===1/r)||a!==a&&r!==r}var Hn=typeof Object.is=="function"?Object.is:$w;function Jo(a,r){if(Hn(a,r))return!0;if(typeof a!="object"||a===null||typeof r!="object"||r===null)return!1;var o=Object.keys(a),u=Object.keys(r);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var h=o[u];if(!ht.call(r,h)||!Hn(a[h],r[h]))return!1}return!0}function Zp(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function eA(a,r){var o=Zp(a);a=0;for(var u;o;){if(o.nodeType===3){if(u=a+o.textContent.length,a<=r&&u>=r)return{node:o,offset:r-a};a=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Zp(o)}}function tA(a,r){return a&&r?a===r?!0:a&&a.nodeType===3?!1:r&&r.nodeType===3?tA(a,r.parentNode):"contains"in a?a.contains(r):a.compareDocumentPosition?!!(a.compareDocumentPosition(r)&16):!1:!1}function aA(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var r=qr(a.document);r instanceof a.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)a=r.contentWindow;else break;r=qr(a.document)}return r}function wm(a){var r=a&&a.nodeName&&a.nodeName.toLowerCase();return r&&(r==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||r==="textarea"||a.contentEditable==="true")}var Zw=vn&&"documentMode"in document&&11>=document.documentMode,Vs=null,Cm=null,Xo=null,Sm=!1;function nA(a,r,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Sm||Vs==null||Vs!==qr(u)||(u=Vs,"selectionStart"in u&&wm(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}),Xo&&Jo(Xo,u)||(Xo=u,u=Nd(Cm,"onSelect"),0<u.length&&(r=new vt("onSelect","select",null,r,o),a.push({event:r,listeners:u}),r.target=Vs)))}function ds(a,r){var o={};return o[a.toLowerCase()]=r.toLowerCase(),o["Webkit"+a]="webkit"+r,o["Moz"+a]="moz"+r,o}var Qs={animationend:ds("Animation","AnimationEnd"),animationiteration:ds("Animation","AnimationIteration"),animationstart:ds("Animation","AnimationStart"),transitionrun:ds("Transition","TransitionRun"),transitionstart:ds("Transition","TransitionStart"),transitioncancel:ds("Transition","TransitionCancel"),transitionend:ds("Transition","TransitionEnd")},Nm={},rA={};vn&&(rA=document.createElement("div").style,"AnimationEvent"in window||(delete Qs.animationend.animation,delete Qs.animationiteration.animation,delete Qs.animationstart.animation),"TransitionEvent"in window||delete Qs.transitionend.transition);function us(a){if(Nm[a])return Nm[a];if(!Qs[a])return a;var r=Qs[a],o;for(o in r)if(r.hasOwnProperty(o)&&o in rA)return Nm[a]=r[o];return a}var iA=us("animationend"),sA=us("animationiteration"),oA=us("animationstart"),eC=us("transitionrun"),tC=us("transitionstart"),aC=us("transitioncancel"),lA=us("transitionend"),cA=new Map,xm="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(" ");xm.push("scrollEnd");function hr(a,r){cA.set(a,r),J(r,[a])}var dA=new WeakMap;function nr(a,r){if(typeof a=="object"&&a!==null){var o=dA.get(a);return o!==void 0?o:(r={value:a,source:r,stack:Bc(r)},dA.set(a,r),r)}return{value:a,source:r,stack:Bc(r)}}var rr=[],Ks=0,Tm=0;function zc(){for(var a=Ks,r=Tm=Ks=0;r<a;){var o=rr[r];rr[r++]=null;var u=rr[r];rr[r++]=null;var h=rr[r];rr[r++]=null;var E=rr[r];if(rr[r++]=null,u!==null&&h!==null){var D=u.pending;D===null?h.next=h:(h.next=D.next,D.next=h),u.pending=h}E!==0&&uA(o,h,E)}}function Vc(a,r,o,u){rr[Ks++]=a,rr[Ks++]=r,rr[Ks++]=o,rr[Ks++]=u,Tm|=u,a.lanes|=u,a=a.alternate,a!==null&&(a.lanes|=u)}function km(a,r,o,u){return Vc(a,r,o,u),Qc(a)}function Gs(a,r){return Vc(a,null,null,r),Qc(a)}function uA(a,r,o){a.lanes|=o;var u=a.alternate;u!==null&&(u.lanes|=o);for(var h=!1,E=a.return;E!==null;)E.childLanes|=o,u=E.alternate,u!==null&&(u.childLanes|=o),E.tag===22&&(a=E.stateNode,a===null||a._visibility&1||(h=!0)),a=E,E=E.return;return a.tag===3?(E=a.stateNode,h&&r!==null&&(h=31-S(o),a=E.hiddenUpdates,u=a[h],u===null?a[h]=[r]:u.push(r),r.lane=o|536870912),E):null}function Qc(a){if(50<Il)throw Il=0,Mg=null,Error(i(185));for(var r=a.return;r!==null;)a=r,r=a.return;return a.tag===3?a.stateNode:null}var qs={};function nC(a,r,o,u){this.tag=a,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zn(a,r,o,u){return new nC(a,r,o,u)}function Lm(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Xr(a,r){var o=a.alternate;return o===null?(o=zn(a.tag,r,a.key,a.mode),o.elementType=a.elementType,o.type=a.type,o.stateNode=a.stateNode,o.alternate=a,a.alternate=o):(o.pendingProps=r,o.type=a.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=a.flags&65011712,o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,r=a.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=a.sibling,o.index=a.index,o.ref=a.ref,o.refCleanup=a.refCleanup,o}function mA(a,r){a.flags&=65011714;var o=a.alternate;return o===null?(a.childLanes=0,a.lanes=r,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,r=o.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),a}function Kc(a,r,o,u,h,E){var D=0;if(u=a,typeof a=="function")Lm(a)&&(D=1);else if(typeof a=="string")D=iS(a,o,Ie.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case z:return a=zn(31,o,r,h),a.elementType=z,a.lanes=E,a;case x:return ms(o.children,h,E,r);case N:D=8,h|=24;break;case T:return a=zn(12,o,r,h|2),a.elementType=T,a.lanes=E,a;case _:return a=zn(13,o,r,h),a.elementType=_,a.lanes=E,a;case V:return a=zn(19,o,r,h),a.elementType=V,a.lanes=E,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case L:case k:D=10;break e;case B:D=9;break e;case F:D=11;break e;case U:D=14;break e;case O:D=16,u=null;break e}D=29,o=Error(i(130,a===null?"null":typeof a,"")),u=null}return r=zn(D,o,r,h),r.elementType=a,r.type=u,r.lanes=E,r}function ms(a,r,o,u){return a=zn(7,a,u,r),a.lanes=o,a}function Dm(a,r,o){return a=zn(6,a,null,r),a.lanes=o,a}function Rm(a,r,o){return r=zn(4,a.children!==null?a.children:[],a.key,r),r.lanes=o,r.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},r}var Ws=[],Ys=0,Gc=null,qc=0,ir=[],sr=0,gs=null,$r=1,Zr="";function fs(a,r){Ws[Ys++]=qc,Ws[Ys++]=Gc,Gc=a,qc=r}function gA(a,r,o){ir[sr++]=$r,ir[sr++]=Zr,ir[sr++]=gs,gs=a;var u=$r;a=Zr;var h=32-S(u)-1;u&=~(1<<h),o+=1;var E=32-S(r)+h;if(30<E){var D=h-h%5;E=(u&(1<<D)-1).toString(32),u>>=D,h-=D,$r=1<<32-S(r)+h|o<<h|u,Zr=E+a}else $r=1<<E|o<<h|u,Zr=a}function Bm(a){a.return!==null&&(fs(a,1),gA(a,1,0))}function Um(a){for(;a===Gc;)Gc=Ws[--Ys],Ws[Ys]=null,qc=Ws[--Ys],Ws[Ys]=null;for(;a===gs;)gs=ir[--sr],ir[sr]=null,Zr=ir[--sr],ir[sr]=null,$r=ir[--sr],ir[sr]=null}var In=null,Na=null,Xt=!1,hs=null,xr=!1,Mm=Error(i(519));function ps(a){var r=Error(i(418,""));throw el(nr(r,a)),Mm}function fA(a){var r=a.stateNode,o=a.type,u=a.memoizedProps;switch(r[Lt]=a,r[Gt]=u,o){case"dialog":Ht("cancel",r),Ht("close",r);break;case"iframe":case"object":case"embed":Ht("load",r);break;case"video":case"audio":for(o=0;o<Cl.length;o++)Ht(Cl[o],r);break;case"source":Ht("error",r);break;case"img":case"image":case"link":Ht("error",r),Ht("load",r);break;case"details":Ht("toggle",r);break;case"input":Ht("invalid",r),Ei(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Gr(r);break;case"select":Ht("invalid",r);break;case"textarea":Ht("invalid",r),zo(r,u.value,u.defaultValue,u.children),Gr(r)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||r.textContent===""+o||u.suppressHydrationWarning===!0||Dy(r.textContent,o)?(u.popover!=null&&(Ht("beforetoggle",r),Ht("toggle",r)),u.onScroll!=null&&Ht("scroll",r),u.onScrollEnd!=null&&Ht("scrollend",r),u.onClick!=null&&(r.onclick=xd),r=!0):r=!1,r||ps(a)}function hA(a){for(In=a.return;In;)switch(In.tag){case 5:case 13:xr=!1;return;case 27:case 3:xr=!0;return;default:In=In.return}}function $o(a){if(a!==In)return!1;if(!Xt)return hA(a),Xt=!0,!1;var r=a.tag,o;if((o=r!==3&&r!==27)&&((o=r===5)&&(o=a.type,o=!(o!=="form"&&o!=="button")||Xg(a.type,a.memoizedProps)),o=!o),o&&Na&&ps(a),hA(a),r===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(317));e:{for(a=a.nextSibling,r=0;a;){if(a.nodeType===8)if(o=a.data,o==="/$"){if(r===0){Na=Ar(a.nextSibling);break e}r--}else o!=="$"&&o!=="$!"&&o!=="$?"||r++;a=a.nextSibling}Na=null}}else r===27?(r=Na,zi(a.type)?(a=tf,tf=null,Na=a):Na=r):Na=In?Ar(a.stateNode.nextSibling):null;return!0}function Zo(){Na=In=null,Xt=!1}function pA(){var a=hs;return a!==null&&(Bn===null?Bn=a:Bn.push.apply(Bn,a),hs=null),a}function el(a){hs===null?hs=[a]:hs.push(a)}var _m=q(null),As=null,ei=null;function xi(a,r,o){ne(_m,r._currentValue),r._currentValue=o}function ti(a){a._currentValue=_m.current,Y(_m)}function Fm(a,r,o){for(;a!==null;){var u=a.alternate;if((a.childLanes&r)!==r?(a.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),a===o)break;a=a.return}}function Om(a,r,o,u){var h=a.child;for(h!==null&&(h.return=a);h!==null;){var E=h.dependencies;if(E!==null){var D=h.child;E=E.firstContext;e:for(;E!==null;){var j=E;E=h;for(var $=0;$<r.length;$++)if(j.context===r[$]){E.lanes|=o,j=E.alternate,j!==null&&(j.lanes|=o),Fm(E.return,o,a),u||(D=null);break e}E=j.next}}else if(h.tag===18){if(D=h.return,D===null)throw Error(i(341));D.lanes|=o,E=D.alternate,E!==null&&(E.lanes|=o),Fm(D,o,a),D=null}else D=h.child;if(D!==null)D.return=h;else for(D=h;D!==null;){if(D===a){D=null;break}if(h=D.sibling,h!==null){h.return=D.return,D=h;break}D=D.return}h=D}}function tl(a,r,o,u){a=null;for(var h=r,E=!1;h!==null;){if(!E){if((h.flags&524288)!==0)E=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var D=h.alternate;if(D===null)throw Error(i(387));if(D=D.memoizedProps,D!==null){var j=h.type;Hn(h.pendingProps.value,D.value)||(a!==null?a.push(j):a=[j])}}else if(h===Ne.current){if(D=h.alternate,D===null)throw Error(i(387));D.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(a!==null?a.push(Ll):a=[Ll])}h=h.return}a!==null&&Om(r,a,o,u),r.flags|=262144}function Wc(a){for(a=a.firstContext;a!==null;){if(!Hn(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function ys(a){As=a,ei=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function An(a){return AA(As,a)}function Yc(a,r){return As===null&&ys(a),AA(a,r)}function AA(a,r){var o=r._currentValue;if(r={context:r,memoizedValue:o,next:null},ei===null){if(a===null)throw Error(i(308));ei=r,a.dependencies={lanes:0,firstContext:r},a.flags|=524288}else ei=ei.next=r;return o}var rC=typeof AbortController<"u"?AbortController:function(){var a=[],r=this.signal={aborted:!1,addEventListener:function(o,u){a.push(u)}};this.abort=function(){r.aborted=!0,a.forEach(function(o){return o()})}},iC=t.unstable_scheduleCallback,sC=t.unstable_NormalPriority,Va={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jm(){return{controller:new rC,data:new Map,refCount:0}}function al(a){a.refCount--,a.refCount===0&&iC(sC,function(){a.controller.abort()})}var nl=null,Pm=0,Js=0,Xs=null;function oC(a,r){if(nl===null){var o=nl=[];Pm=0,Js=zg(),Xs={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Pm++,r.then(yA,yA),r}function yA(){if(--Pm===0&&nl!==null){Xs!==null&&(Xs.status="fulfilled");var a=nl;nl=null,Js=0,Xs=null;for(var r=0;r<a.length;r++)(0,a[r])()}}function lC(a,r){var o=[],u={status:"pending",value:null,reason:null,then:function(h){o.push(h)}};return a.then(function(){u.status="fulfilled",u.value=r;for(var h=0;h<o.length;h++)(0,o[h])(r)},function(h){for(u.status="rejected",u.reason=h,h=0;h<o.length;h++)(0,o[h])(void 0)}),u}var EA=W.S;W.S=function(a,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&oC(a,r),EA!==null&&EA(a,r)};var Es=q(null);function Hm(){var a=Es.current;return a!==null?a:ha.pooledCache}function Jc(a,r){r===null?ne(Es,Es.current):ne(Es,r.pool)}function bA(){var a=Hm();return a===null?null:{parent:Va._currentValue,pool:a}}var rl=Error(i(460)),vA=Error(i(474)),Xc=Error(i(542)),zm={then:function(){}};function IA(a){return a=a.status,a==="fulfilled"||a==="rejected"}function $c(){}function wA(a,r,o){switch(o=a[o],o===void 0?a.push(r):o!==r&&(r.then($c,$c),r=o),r.status){case"fulfilled":return r.value;case"rejected":throw a=r.reason,SA(a),a;default:if(typeof r.status=="string")r.then($c,$c);else{if(a=ha,a!==null&&100<a.shellSuspendCounter)throw Error(i(482));a=r,a.status="pending",a.then(function(u){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=u}},function(u){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw a=r.reason,SA(a),a}throw il=r,rl}}var il=null;function CA(){if(il===null)throw Error(i(459));var a=il;return il=null,a}function SA(a){if(a===rl||a===Xc)throw Error(i(483))}var Ti=!1;function Vm(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qm(a,r){a=a.updateQueue,r.updateQueue===a&&(r.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function ki(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Li(a,r,o){var u=a.updateQueue;if(u===null)return null;if(u=u.shared,(aa&2)!==0){var h=u.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),u.pending=r,r=Qc(a),uA(a,null,o),r}return Vc(a,u,r,o),Qc(a)}function sl(a,r,o){if(r=r.updateQueue,r!==null&&(r=r.shared,(o&4194048)!==0)){var u=r.lanes;u&=a.pendingLanes,o|=u,r.lanes=o,rn(a,o)}}function Km(a,r){var o=a.updateQueue,u=a.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var h=null,E=null;if(o=o.firstBaseUpdate,o!==null){do{var D={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};E===null?h=E=D:E=E.next=D,o=o.next}while(o!==null);E===null?h=E=r:E=E.next=r}else h=E=r;o={baseState:u.baseState,firstBaseUpdate:h,lastBaseUpdate:E,shared:u.shared,callbacks:u.callbacks},a.updateQueue=o;return}a=o.lastBaseUpdate,a===null?o.firstBaseUpdate=r:a.next=r,o.lastBaseUpdate=r}var Gm=!1;function ol(){if(Gm){var a=Xs;if(a!==null)throw a}}function ll(a,r,o,u){Gm=!1;var h=a.updateQueue;Ti=!1;var E=h.firstBaseUpdate,D=h.lastBaseUpdate,j=h.shared.pending;if(j!==null){h.shared.pending=null;var $=j,fe=$.next;$.next=null,D===null?E=fe:D.next=fe,D=$;var xe=a.alternate;xe!==null&&(xe=xe.updateQueue,j=xe.lastBaseUpdate,j!==D&&(j===null?xe.firstBaseUpdate=fe:j.next=fe,xe.lastBaseUpdate=$))}if(E!==null){var Re=h.baseState;D=0,xe=fe=$=null,j=E;do{var Ae=j.lane&-536870913,ye=Ae!==j.lane;if(ye?(qt&Ae)===Ae:(u&Ae)===Ae){Ae!==0&&Ae===Js&&(Gm=!0),xe!==null&&(xe=xe.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var ft=a,ot=j;Ae=r;var la=o;switch(ot.tag){case 1:if(ft=ot.payload,typeof ft=="function"){Re=ft.call(la,Re,Ae);break e}Re=ft;break e;case 3:ft.flags=ft.flags&-65537|128;case 0:if(ft=ot.payload,Ae=typeof ft=="function"?ft.call(la,Re,Ae):ft,Ae==null)break e;Re=A({},Re,Ae);break e;case 2:Ti=!0}}Ae=j.callback,Ae!==null&&(a.flags|=64,ye&&(a.flags|=8192),ye=h.callbacks,ye===null?h.callbacks=[Ae]:ye.push(Ae))}else ye={lane:Ae,tag:j.tag,payload:j.payload,callback:j.callback,next:null},xe===null?(fe=xe=ye,$=Re):xe=xe.next=ye,D|=Ae;if(j=j.next,j===null){if(j=h.shared.pending,j===null)break;ye=j,j=ye.next,ye.next=null,h.lastBaseUpdate=ye,h.shared.pending=null}}while(!0);xe===null&&($=Re),h.baseState=$,h.firstBaseUpdate=fe,h.lastBaseUpdate=xe,E===null&&(h.shared.lanes=0),Oi|=D,a.lanes=D,a.memoizedState=Re}}function NA(a,r){if(typeof a!="function")throw Error(i(191,a));a.call(r)}function xA(a,r){var o=a.callbacks;if(o!==null)for(a.callbacks=null,a=0;a<o.length;a++)NA(o[a],r)}var $s=q(null),Zc=q(0);function TA(a,r){a=li,ne(Zc,a),ne($s,r),li=a|r.baseLanes}function qm(){ne(Zc,li),ne($s,$s.current)}function Wm(){li=Zc.current,Y($s),Y(Zc)}var Di=0,Dt=null,sa=null,Fa=null,ed=!1,Zs=!1,bs=!1,td=0,cl=0,eo=null,cC=0;function Ra(){throw Error(i(321))}function Ym(a,r){if(r===null)return!1;for(var o=0;o<r.length&&o<a.length;o++)if(!Hn(a[o],r[o]))return!1;return!0}function Jm(a,r,o,u,h,E){return Di=E,Dt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,W.H=a===null||a.memoizedState===null?u0:m0,bs=!1,E=o(u,h),bs=!1,Zs&&(E=LA(r,o,u,h)),kA(a),E}function kA(a){W.H=od;var r=sa!==null&&sa.next!==null;if(Di=0,Fa=sa=Dt=null,ed=!1,cl=0,eo=null,r)throw Error(i(300));a===null||Xa||(a=a.dependencies,a!==null&&Wc(a)&&(Xa=!0))}function LA(a,r,o,u){Dt=a;var h=0;do{if(Zs&&(eo=null),cl=0,Zs=!1,25<=h)throw Error(i(301));if(h+=1,Fa=sa=null,a.updateQueue!=null){var E=a.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}W.H=pC,E=r(o,u)}while(Zs);return E}function dC(){var a=W.H,r=a.useState()[0];return r=typeof r.then=="function"?dl(r):r,a=a.useState()[0],(sa!==null?sa.memoizedState:null)!==a&&(Dt.flags|=1024),r}function Xm(){var a=td!==0;return td=0,a}function $m(a,r,o){r.updateQueue=a.updateQueue,r.flags&=-2053,a.lanes&=~o}function Zm(a){if(ed){for(a=a.memoizedState;a!==null;){var r=a.queue;r!==null&&(r.pending=null),a=a.next}ed=!1}Di=0,Fa=sa=Dt=null,Zs=!1,cl=td=0,eo=null}function Dn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fa===null?Dt.memoizedState=Fa=a:Fa=Fa.next=a,Fa}function Oa(){if(sa===null){var a=Dt.alternate;a=a!==null?a.memoizedState:null}else a=sa.next;var r=Fa===null?Dt.memoizedState:Fa.next;if(r!==null)Fa=r,sa=a;else{if(a===null)throw Dt.alternate===null?Error(i(467)):Error(i(310));sa=a,a={memoizedState:sa.memoizedState,baseState:sa.baseState,baseQueue:sa.baseQueue,queue:sa.queue,next:null},Fa===null?Dt.memoizedState=Fa=a:Fa=Fa.next=a}return Fa}function eg(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function dl(a){var r=cl;return cl+=1,eo===null&&(eo=[]),a=wA(eo,a,r),r=Dt,(Fa===null?r.memoizedState:Fa.next)===null&&(r=r.alternate,W.H=r===null||r.memoizedState===null?u0:m0),a}function ad(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return dl(a);if(a.$$typeof===k)return An(a)}throw Error(i(438,String(a)))}function tg(a){var r=null,o=Dt.updateQueue;if(o!==null&&(r=o.memoCache),r==null){var u=Dt.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),o===null&&(o=eg(),Dt.updateQueue=o),o.memoCache=r,o=r.data[r.index],o===void 0)for(o=r.data[r.index]=Array(a),u=0;u<a;u++)o[u]=Q;return r.index++,o}function ai(a,r){return typeof r=="function"?r(a):r}function nd(a){var r=Oa();return ag(r,sa,a)}function ag(a,r,o){var u=a.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var h=a.baseQueue,E=u.pending;if(E!==null){if(h!==null){var D=h.next;h.next=E.next,E.next=D}r.baseQueue=h=E,u.pending=null}if(E=a.baseState,h===null)a.memoizedState=E;else{r=h.next;var j=D=null,$=null,fe=r,xe=!1;do{var Re=fe.lane&-536870913;if(Re!==fe.lane?(qt&Re)===Re:(Di&Re)===Re){var Ae=fe.revertLane;if(Ae===0)$!==null&&($=$.next={lane:0,revertLane:0,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),Re===Js&&(xe=!0);else if((Di&Ae)===Ae){fe=fe.next,Ae===Js&&(xe=!0);continue}else Re={lane:0,revertLane:fe.revertLane,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},$===null?(j=$=Re,D=E):$=$.next=Re,Dt.lanes|=Ae,Oi|=Ae;Re=fe.action,bs&&o(E,Re),E=fe.hasEagerState?fe.eagerState:o(E,Re)}else Ae={lane:Re,revertLane:fe.revertLane,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},$===null?(j=$=Ae,D=E):$=$.next=Ae,Dt.lanes|=Re,Oi|=Re;fe=fe.next}while(fe!==null&&fe!==r);if($===null?D=E:$.next=j,!Hn(E,a.memoizedState)&&(Xa=!0,xe&&(o=Xs,o!==null)))throw o;a.memoizedState=E,a.baseState=D,a.baseQueue=$,u.lastRenderedState=E}return h===null&&(u.lanes=0),[a.memoizedState,u.dispatch]}function ng(a){var r=Oa(),o=r.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=a;var u=o.dispatch,h=o.pending,E=r.memoizedState;if(h!==null){o.pending=null;var D=h=h.next;do E=a(E,D.action),D=D.next;while(D!==h);Hn(E,r.memoizedState)||(Xa=!0),r.memoizedState=E,r.baseQueue===null&&(r.baseState=E),o.lastRenderedState=E}return[E,u]}function DA(a,r,o){var u=Dt,h=Oa(),E=Xt;if(E){if(o===void 0)throw Error(i(407));o=o()}else o=r();var D=!Hn((sa||h).memoizedState,o);D&&(h.memoizedState=o,Xa=!0),h=h.queue;var j=UA.bind(null,u,h,a);if(ul(2048,8,j,[a]),h.getSnapshot!==r||D||Fa!==null&&Fa.memoizedState.tag&1){if(u.flags|=2048,to(9,rd(),BA.bind(null,u,h,o,r),null),ha===null)throw Error(i(349));E||(Di&124)!==0||RA(u,r,o)}return o}function RA(a,r,o){a.flags|=16384,a={getSnapshot:r,value:o},r=Dt.updateQueue,r===null?(r=eg(),Dt.updateQueue=r,r.stores=[a]):(o=r.stores,o===null?r.stores=[a]:o.push(a))}function BA(a,r,o,u){r.value=o,r.getSnapshot=u,MA(r)&&_A(a)}function UA(a,r,o){return o(function(){MA(r)&&_A(a)})}function MA(a){var r=a.getSnapshot;a=a.value;try{var o=r();return!Hn(a,o)}catch{return!0}}function _A(a){var r=Gs(a,2);r!==null&&qn(r,a,2)}function rg(a){var r=Dn();if(typeof a=="function"){var o=a;if(a=o(),bs){C(!0);try{o()}finally{C(!1)}}}return r.memoizedState=r.baseState=a,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:a},r}function FA(a,r,o,u){return a.baseState=o,ag(a,sa,typeof u=="function"?u:ai)}function uC(a,r,o,u,h){if(sd(a))throw Error(i(485));if(a=r.action,a!==null){var E={payload:h,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){E.listeners.push(D)}};W.T!==null?o(!0):E.isTransition=!1,u(E),o=r.pending,o===null?(E.next=r.pending=E,OA(r,E)):(E.next=o.next,r.pending=o.next=E)}}function OA(a,r){var o=r.action,u=r.payload,h=a.state;if(r.isTransition){var E=W.T,D={};W.T=D;try{var j=o(h,u),$=W.S;$!==null&&$(D,j),jA(a,r,j)}catch(fe){ig(a,r,fe)}finally{W.T=E}}else try{E=o(h,u),jA(a,r,E)}catch(fe){ig(a,r,fe)}}function jA(a,r,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){PA(a,r,u)},function(u){return ig(a,r,u)}):PA(a,r,o)}function PA(a,r,o){r.status="fulfilled",r.value=o,HA(r),a.state=o,r=a.pending,r!==null&&(o=r.next,o===r?a.pending=null:(o=o.next,r.next=o,OA(a,o)))}function ig(a,r,o){var u=a.pending;if(a.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=o,HA(r),r=r.next;while(r!==u)}a.action=null}function HA(a){a=a.listeners;for(var r=0;r<a.length;r++)(0,a[r])()}function zA(a,r){return r}function VA(a,r){if(Xt){var o=ha.formState;if(o!==null){e:{var u=Dt;if(Xt){if(Na){t:{for(var h=Na,E=xr;h.nodeType!==8;){if(!E){h=null;break t}if(h=Ar(h.nextSibling),h===null){h=null;break t}}E=h.data,h=E==="F!"||E==="F"?h:null}if(h){Na=Ar(h.nextSibling),u=h.data==="F!";break e}}ps(u)}u=!1}u&&(r=o[0])}}return o=Dn(),o.memoizedState=o.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zA,lastRenderedState:r},o.queue=u,o=l0.bind(null,Dt,u),u.dispatch=o,u=rg(!1),E=dg.bind(null,Dt,!1,u.queue),u=Dn(),h={state:r,dispatch:null,action:a,pending:null},u.queue=h,o=uC.bind(null,Dt,h,E,o),h.dispatch=o,u.memoizedState=a,[r,o,!1]}function QA(a){var r=Oa();return KA(r,sa,a)}function KA(a,r,o){if(r=ag(a,r,zA)[0],a=nd(ai)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=dl(r)}catch(D){throw D===rl?Xc:D}else u=r;r=Oa();var h=r.queue,E=h.dispatch;return o!==r.memoizedState&&(Dt.flags|=2048,to(9,rd(),mC.bind(null,h,o),null)),[u,E,a]}function mC(a,r){a.action=r}function GA(a){var r=Oa(),o=sa;if(o!==null)return KA(r,o,a);Oa(),r=r.memoizedState,o=Oa();var u=o.queue.dispatch;return o.memoizedState=a,[r,u,!1]}function to(a,r,o,u){return a={tag:a,create:o,deps:u,inst:r,next:null},r=Dt.updateQueue,r===null&&(r=eg(),Dt.updateQueue=r),o=r.lastEffect,o===null?r.lastEffect=a.next=a:(u=o.next,o.next=a,a.next=u,r.lastEffect=a),a}function rd(){return{destroy:void 0,resource:void 0}}function qA(){return Oa().memoizedState}function id(a,r,o,u){var h=Dn();u=u===void 0?null:u,Dt.flags|=a,h.memoizedState=to(1|r,rd(),o,u)}function ul(a,r,o,u){var h=Oa();u=u===void 0?null:u;var E=h.memoizedState.inst;sa!==null&&u!==null&&Ym(u,sa.memoizedState.deps)?h.memoizedState=to(r,E,o,u):(Dt.flags|=a,h.memoizedState=to(1|r,E,o,u))}function WA(a,r){id(8390656,8,a,r)}function YA(a,r){ul(2048,8,a,r)}function JA(a,r){return ul(4,2,a,r)}function XA(a,r){return ul(4,4,a,r)}function $A(a,r){if(typeof r=="function"){a=a();var o=r(a);return function(){typeof o=="function"?o():r(null)}}if(r!=null)return a=a(),r.current=a,function(){r.current=null}}function ZA(a,r,o){o=o!=null?o.concat([a]):null,ul(4,4,$A.bind(null,r,a),o)}function sg(){}function e0(a,r){var o=Oa();r=r===void 0?null:r;var u=o.memoizedState;return r!==null&&Ym(r,u[1])?u[0]:(o.memoizedState=[a,r],a)}function t0(a,r){var o=Oa();r=r===void 0?null:r;var u=o.memoizedState;if(r!==null&&Ym(r,u[1]))return u[0];if(u=a(),bs){C(!0);try{a()}finally{C(!1)}}return o.memoizedState=[u,r],u}function og(a,r,o){return o===void 0||(Di&1073741824)!==0?a.memoizedState=r:(a.memoizedState=o,a=ry(),Dt.lanes|=a,Oi|=a,o)}function a0(a,r,o,u){return Hn(o,r)?o:$s.current!==null?(a=og(a,o,u),Hn(a,r)||(Xa=!0),a):(Di&42)===0?(Xa=!0,a.memoizedState=o):(a=ry(),Dt.lanes|=a,Oi|=a,r)}function n0(a,r,o,u,h){var E=ae.p;ae.p=E!==0&&8>E?E:8;var D=W.T,j={};W.T=j,dg(a,!1,r,o);try{var $=h(),fe=W.S;if(fe!==null&&fe(j,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var xe=lC($,u);ml(a,r,xe,Gn(a))}else ml(a,r,u,Gn(a))}catch(Re){ml(a,r,{then:function(){},status:"rejected",reason:Re},Gn())}finally{ae.p=E,W.T=D}}function gC(){}function lg(a,r,o,u){if(a.tag!==5)throw Error(i(476));var h=r0(a).queue;n0(a,h,r,be,o===null?gC:function(){return i0(a),o(u)})}function r0(a){var r=a.memoizedState;if(r!==null)return r;r={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:be},next:null};var o={};return r.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:o},next:null},a.memoizedState=r,a=a.alternate,a!==null&&(a.memoizedState=r),r}function i0(a){var r=r0(a).next.queue;ml(a,r,{},Gn())}function cg(){return An(Ll)}function s0(){return Oa().memoizedState}function o0(){return Oa().memoizedState}function fC(a){for(var r=a.return;r!==null;){switch(r.tag){case 24:case 3:var o=Gn();a=ki(o);var u=Li(r,a,o);u!==null&&(qn(u,r,o),sl(u,r,o)),r={cache:jm()},a.payload=r;return}r=r.return}}function hC(a,r,o){var u=Gn();o={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null},sd(a)?c0(r,o):(o=km(a,r,o,u),o!==null&&(qn(o,a,u),d0(o,r,u)))}function l0(a,r,o){var u=Gn();ml(a,r,o,u)}function ml(a,r,o,u){var h={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null};if(sd(a))c0(r,h);else{var E=a.alternate;if(a.lanes===0&&(E===null||E.lanes===0)&&(E=r.lastRenderedReducer,E!==null))try{var D=r.lastRenderedState,j=E(D,o);if(h.hasEagerState=!0,h.eagerState=j,Hn(j,D))return Vc(a,r,h,0),ha===null&&zc(),!1}catch{}finally{}if(o=km(a,r,h,u),o!==null)return qn(o,a,u),d0(o,r,u),!0}return!1}function dg(a,r,o,u){if(u={lane:2,revertLane:zg(),action:u,hasEagerState:!1,eagerState:null,next:null},sd(a)){if(r)throw Error(i(479))}else r=km(a,o,u,2),r!==null&&qn(r,a,2)}function sd(a){var r=a.alternate;return a===Dt||r!==null&&r===Dt}function c0(a,r){Zs=ed=!0;var o=a.pending;o===null?r.next=r:(r.next=o.next,o.next=r),a.pending=r}function d0(a,r,o){if((o&4194048)!==0){var u=r.lanes;u&=a.pendingLanes,o|=u,r.lanes=o,rn(a,o)}}var od={readContext:An,use:ad,useCallback:Ra,useContext:Ra,useEffect:Ra,useImperativeHandle:Ra,useLayoutEffect:Ra,useInsertionEffect:Ra,useMemo:Ra,useReducer:Ra,useRef:Ra,useState:Ra,useDebugValue:Ra,useDeferredValue:Ra,useTransition:Ra,useSyncExternalStore:Ra,useId:Ra,useHostTransitionStatus:Ra,useFormState:Ra,useActionState:Ra,useOptimistic:Ra,useMemoCache:Ra,useCacheRefresh:Ra},u0={readContext:An,use:ad,useCallback:function(a,r){return Dn().memoizedState=[a,r===void 0?null:r],a},useContext:An,useEffect:WA,useImperativeHandle:function(a,r,o){o=o!=null?o.concat([a]):null,id(4194308,4,$A.bind(null,r,a),o)},useLayoutEffect:function(a,r){return id(4194308,4,a,r)},useInsertionEffect:function(a,r){id(4,2,a,r)},useMemo:function(a,r){var o=Dn();r=r===void 0?null:r;var u=a();if(bs){C(!0);try{a()}finally{C(!1)}}return o.memoizedState=[u,r],u},useReducer:function(a,r,o){var u=Dn();if(o!==void 0){var h=o(r);if(bs){C(!0);try{o(r)}finally{C(!1)}}}else h=r;return u.memoizedState=u.baseState=h,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:h},u.queue=a,a=a.dispatch=hC.bind(null,Dt,a),[u.memoizedState,a]},useRef:function(a){var r=Dn();return a={current:a},r.memoizedState=a},useState:function(a){a=rg(a);var r=a.queue,o=l0.bind(null,Dt,r);return r.dispatch=o,[a.memoizedState,o]},useDebugValue:sg,useDeferredValue:function(a,r){var o=Dn();return og(o,a,r)},useTransition:function(){var a=rg(!1);return a=n0.bind(null,Dt,a.queue,!0,!1),Dn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,r,o){var u=Dt,h=Dn();if(Xt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=r(),ha===null)throw Error(i(349));(qt&124)!==0||RA(u,r,o)}h.memoizedState=o;var E={value:o,getSnapshot:r};return h.queue=E,WA(UA.bind(null,u,E,a),[a]),u.flags|=2048,to(9,rd(),BA.bind(null,u,E,o,r),null),o},useId:function(){var a=Dn(),r=ha.identifierPrefix;if(Xt){var o=Zr,u=$r;o=(u&~(1<<32-S(u)-1)).toString(32)+o,r="«"+r+"R"+o,o=td++,0<o&&(r+="H"+o.toString(32)),r+="»"}else o=cC++,r="«"+r+"r"+o.toString(32)+"»";return a.memoizedState=r},useHostTransitionStatus:cg,useFormState:VA,useActionState:VA,useOptimistic:function(a){var r=Dn();r.memoizedState=r.baseState=a;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=o,r=dg.bind(null,Dt,!0,o),o.dispatch=r,[a,r]},useMemoCache:tg,useCacheRefresh:function(){return Dn().memoizedState=fC.bind(null,Dt)}},m0={readContext:An,use:ad,useCallback:e0,useContext:An,useEffect:YA,useImperativeHandle:ZA,useInsertionEffect:JA,useLayoutEffect:XA,useMemo:t0,useReducer:nd,useRef:qA,useState:function(){return nd(ai)},useDebugValue:sg,useDeferredValue:function(a,r){var o=Oa();return a0(o,sa.memoizedState,a,r)},useTransition:function(){var a=nd(ai)[0],r=Oa().memoizedState;return[typeof a=="boolean"?a:dl(a),r]},useSyncExternalStore:DA,useId:s0,useHostTransitionStatus:cg,useFormState:QA,useActionState:QA,useOptimistic:function(a,r){var o=Oa();return FA(o,sa,a,r)},useMemoCache:tg,useCacheRefresh:o0},pC={readContext:An,use:ad,useCallback:e0,useContext:An,useEffect:YA,useImperativeHandle:ZA,useInsertionEffect:JA,useLayoutEffect:XA,useMemo:t0,useReducer:ng,useRef:qA,useState:function(){return ng(ai)},useDebugValue:sg,useDeferredValue:function(a,r){var o=Oa();return sa===null?og(o,a,r):a0(o,sa.memoizedState,a,r)},useTransition:function(){var a=ng(ai)[0],r=Oa().memoizedState;return[typeof a=="boolean"?a:dl(a),r]},useSyncExternalStore:DA,useId:s0,useHostTransitionStatus:cg,useFormState:GA,useActionState:GA,useOptimistic:function(a,r){var o=Oa();return sa!==null?FA(o,sa,a,r):(o.baseState=a,[a,o.queue.dispatch])},useMemoCache:tg,useCacheRefresh:o0},ao=null,gl=0;function ld(a){var r=gl;return gl+=1,ao===null&&(ao=[]),wA(ao,a,r)}function fl(a,r){r=r.props.ref,a.ref=r!==void 0?r:null}function cd(a,r){throw r.$$typeof===p?Error(i(525)):(a=Object.prototype.toString.call(r),Error(i(31,a==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":a)))}function g0(a){var r=a._init;return r(a._payload)}function f0(a){function r(le,ie){if(a){var ge=le.deletions;ge===null?(le.deletions=[ie],le.flags|=16):ge.push(ie)}}function o(le,ie){if(!a)return null;for(;ie!==null;)r(le,ie),ie=ie.sibling;return null}function u(le){for(var ie=new Map;le!==null;)le.key!==null?ie.set(le.key,le):ie.set(le.index,le),le=le.sibling;return ie}function h(le,ie){return le=Xr(le,ie),le.index=0,le.sibling=null,le}function E(le,ie,ge){return le.index=ge,a?(ge=le.alternate,ge!==null?(ge=ge.index,ge<ie?(le.flags|=67108866,ie):ge):(le.flags|=67108866,ie)):(le.flags|=1048576,ie)}function D(le){return a&&le.alternate===null&&(le.flags|=67108866),le}function j(le,ie,ge,Le){return ie===null||ie.tag!==6?(ie=Dm(ge,le.mode,Le),ie.return=le,ie):(ie=h(ie,ge),ie.return=le,ie)}function $(le,ie,ge,Le){var Je=ge.type;return Je===x?xe(le,ie,ge.props.children,Le,ge.key):ie!==null&&(ie.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===O&&g0(Je)===ie.type)?(ie=h(ie,ge.props),fl(ie,ge),ie.return=le,ie):(ie=Kc(ge.type,ge.key,ge.props,null,le.mode,Le),fl(ie,ge),ie.return=le,ie)}function fe(le,ie,ge,Le){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==ge.containerInfo||ie.stateNode.implementation!==ge.implementation?(ie=Rm(ge,le.mode,Le),ie.return=le,ie):(ie=h(ie,ge.children||[]),ie.return=le,ie)}function xe(le,ie,ge,Le,Je){return ie===null||ie.tag!==7?(ie=ms(ge,le.mode,Le,Je),ie.return=le,ie):(ie=h(ie,ge),ie.return=le,ie)}function Re(le,ie,ge){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Dm(""+ie,le.mode,ge),ie.return=le,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case v:return ge=Kc(ie.type,ie.key,ie.props,null,le.mode,ge),fl(ge,ie),ge.return=le,ge;case I:return ie=Rm(ie,le.mode,ge),ie.return=le,ie;case O:var Le=ie._init;return ie=Le(ie._payload),Re(le,ie,ge)}if(ue(ie)||te(ie))return ie=ms(ie,le.mode,ge,null),ie.return=le,ie;if(typeof ie.then=="function")return Re(le,ld(ie),ge);if(ie.$$typeof===k)return Re(le,Yc(le,ie),ge);cd(le,ie)}return null}function Ae(le,ie,ge,Le){var Je=ie!==null?ie.key:null;if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return Je!==null?null:j(le,ie,""+ge,Le);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case v:return ge.key===Je?$(le,ie,ge,Le):null;case I:return ge.key===Je?fe(le,ie,ge,Le):null;case O:return Je=ge._init,ge=Je(ge._payload),Ae(le,ie,ge,Le)}if(ue(ge)||te(ge))return Je!==null?null:xe(le,ie,ge,Le,null);if(typeof ge.then=="function")return Ae(le,ie,ld(ge),Le);if(ge.$$typeof===k)return Ae(le,ie,Yc(le,ge),Le);cd(le,ge)}return null}function ye(le,ie,ge,Le,Je){if(typeof Le=="string"&&Le!==""||typeof Le=="number"||typeof Le=="bigint")return le=le.get(ge)||null,j(ie,le,""+Le,Je);if(typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case v:return le=le.get(Le.key===null?ge:Le.key)||null,$(ie,le,Le,Je);case I:return le=le.get(Le.key===null?ge:Le.key)||null,fe(ie,le,Le,Je);case O:var Ut=Le._init;return Le=Ut(Le._payload),ye(le,ie,ge,Le,Je)}if(ue(Le)||te(Le))return le=le.get(ge)||null,xe(ie,le,Le,Je,null);if(typeof Le.then=="function")return ye(le,ie,ge,ld(Le),Je);if(Le.$$typeof===k)return ye(le,ie,ge,Yc(ie,Le),Je);cd(ie,Le)}return null}function ft(le,ie,ge,Le){for(var Je=null,Ut=null,rt=ie,ut=ie=0,Za=null;rt!==null&&ut<ge.length;ut++){rt.index>ut?(Za=rt,rt=null):Za=rt.sibling;var Wt=Ae(le,rt,ge[ut],Le);if(Wt===null){rt===null&&(rt=Za);break}a&&rt&&Wt.alternate===null&&r(le,rt),ie=E(Wt,ie,ut),Ut===null?Je=Wt:Ut.sibling=Wt,Ut=Wt,rt=Za}if(ut===ge.length)return o(le,rt),Xt&&fs(le,ut),Je;if(rt===null){for(;ut<ge.length;ut++)rt=Re(le,ge[ut],Le),rt!==null&&(ie=E(rt,ie,ut),Ut===null?Je=rt:Ut.sibling=rt,Ut=rt);return Xt&&fs(le,ut),Je}for(rt=u(rt);ut<ge.length;ut++)Za=ye(rt,le,ut,ge[ut],Le),Za!==null&&(a&&Za.alternate!==null&&rt.delete(Za.key===null?ut:Za.key),ie=E(Za,ie,ut),Ut===null?Je=Za:Ut.sibling=Za,Ut=Za);return a&&rt.forEach(function(qi){return r(le,qi)}),Xt&&fs(le,ut),Je}function ot(le,ie,ge,Le){if(ge==null)throw Error(i(151));for(var Je=null,Ut=null,rt=ie,ut=ie=0,Za=null,Wt=ge.next();rt!==null&&!Wt.done;ut++,Wt=ge.next()){rt.index>ut?(Za=rt,rt=null):Za=rt.sibling;var qi=Ae(le,rt,Wt.value,Le);if(qi===null){rt===null&&(rt=Za);break}a&&rt&&qi.alternate===null&&r(le,rt),ie=E(qi,ie,ut),Ut===null?Je=qi:Ut.sibling=qi,Ut=qi,rt=Za}if(Wt.done)return o(le,rt),Xt&&fs(le,ut),Je;if(rt===null){for(;!Wt.done;ut++,Wt=ge.next())Wt=Re(le,Wt.value,Le),Wt!==null&&(ie=E(Wt,ie,ut),Ut===null?Je=Wt:Ut.sibling=Wt,Ut=Wt);return Xt&&fs(le,ut),Je}for(rt=u(rt);!Wt.done;ut++,Wt=ge.next())Wt=ye(rt,le,ut,Wt.value,Le),Wt!==null&&(a&&Wt.alternate!==null&&rt.delete(Wt.key===null?ut:Wt.key),ie=E(Wt,ie,ut),Ut===null?Je=Wt:Ut.sibling=Wt,Ut=Wt);return a&&rt.forEach(function(AS){return r(le,AS)}),Xt&&fs(le,ut),Je}function la(le,ie,ge,Le){if(typeof ge=="object"&&ge!==null&&ge.type===x&&ge.key===null&&(ge=ge.props.children),typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case v:e:{for(var Je=ge.key;ie!==null;){if(ie.key===Je){if(Je=ge.type,Je===x){if(ie.tag===7){o(le,ie.sibling),Le=h(ie,ge.props.children),Le.return=le,le=Le;break e}}else if(ie.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===O&&g0(Je)===ie.type){o(le,ie.sibling),Le=h(ie,ge.props),fl(Le,ge),Le.return=le,le=Le;break e}o(le,ie);break}else r(le,ie);ie=ie.sibling}ge.type===x?(Le=ms(ge.props.children,le.mode,Le,ge.key),Le.return=le,le=Le):(Le=Kc(ge.type,ge.key,ge.props,null,le.mode,Le),fl(Le,ge),Le.return=le,le=Le)}return D(le);case I:e:{for(Je=ge.key;ie!==null;){if(ie.key===Je)if(ie.tag===4&&ie.stateNode.containerInfo===ge.containerInfo&&ie.stateNode.implementation===ge.implementation){o(le,ie.sibling),Le=h(ie,ge.children||[]),Le.return=le,le=Le;break e}else{o(le,ie);break}else r(le,ie);ie=ie.sibling}Le=Rm(ge,le.mode,Le),Le.return=le,le=Le}return D(le);case O:return Je=ge._init,ge=Je(ge._payload),la(le,ie,ge,Le)}if(ue(ge))return ft(le,ie,ge,Le);if(te(ge)){if(Je=te(ge),typeof Je!="function")throw Error(i(150));return ge=Je.call(ge),ot(le,ie,ge,Le)}if(typeof ge.then=="function")return la(le,ie,ld(ge),Le);if(ge.$$typeof===k)return la(le,ie,Yc(le,ge),Le);cd(le,ge)}return typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint"?(ge=""+ge,ie!==null&&ie.tag===6?(o(le,ie.sibling),Le=h(ie,ge),Le.return=le,le=Le):(o(le,ie),Le=Dm(ge,le.mode,Le),Le.return=le,le=Le),D(le)):o(le,ie)}return function(le,ie,ge,Le){try{gl=0;var Je=la(le,ie,ge,Le);return ao=null,Je}catch(rt){if(rt===rl||rt===Xc)throw rt;var Ut=zn(29,rt,null,le.mode);return Ut.lanes=Le,Ut.return=le,Ut}finally{}}}var no=f0(!0),h0=f0(!1),or=q(null),Tr=null;function Ri(a){var r=a.alternate;ne(Qa,Qa.current&1),ne(or,a),Tr===null&&(r===null||$s.current!==null||r.memoizedState!==null)&&(Tr=a)}function p0(a){if(a.tag===22){if(ne(Qa,Qa.current),ne(or,a),Tr===null){var r=a.alternate;r!==null&&r.memoizedState!==null&&(Tr=a)}}else Bi()}function Bi(){ne(Qa,Qa.current),ne(or,or.current)}function ni(a){Y(or),Tr===a&&(Tr=null),Y(Qa)}var Qa=q(0);function dd(a){for(var r=a;r!==null;){if(r.tag===13){var o=r.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||ef(o)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break;for(;r.sibling===null;){if(r.return===null||r.return===a)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function ug(a,r,o,u){r=a.memoizedState,o=o(u,r),o=o==null?r:A({},r,o),a.memoizedState=o,a.lanes===0&&(a.updateQueue.baseState=o)}var mg={enqueueSetState:function(a,r,o){a=a._reactInternals;var u=Gn(),h=ki(u);h.payload=r,o!=null&&(h.callback=o),r=Li(a,h,u),r!==null&&(qn(r,a,u),sl(r,a,u))},enqueueReplaceState:function(a,r,o){a=a._reactInternals;var u=Gn(),h=ki(u);h.tag=1,h.payload=r,o!=null&&(h.callback=o),r=Li(a,h,u),r!==null&&(qn(r,a,u),sl(r,a,u))},enqueueForceUpdate:function(a,r){a=a._reactInternals;var o=Gn(),u=ki(o);u.tag=2,r!=null&&(u.callback=r),r=Li(a,u,o),r!==null&&(qn(r,a,o),sl(r,a,o))}};function A0(a,r,o,u,h,E,D){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(u,E,D):r.prototype&&r.prototype.isPureReactComponent?!Jo(o,u)||!Jo(h,E):!0}function y0(a,r,o,u){a=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(o,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(o,u),r.state!==a&&mg.enqueueReplaceState(r,r.state,null)}function vs(a,r){var o=r;if("ref"in r){o={};for(var u in r)u!=="ref"&&(o[u]=r[u])}if(a=a.defaultProps){o===r&&(o=A({},o));for(var h in a)o[h]===void 0&&(o[h]=a[h])}return o}var ud=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)};function E0(a){ud(a)}function b0(a){console.error(a)}function v0(a){ud(a)}function md(a,r){try{var o=a.onUncaughtError;o(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function I0(a,r,o){try{var u=a.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function gg(a,r,o){return o=ki(o),o.tag=3,o.payload={element:null},o.callback=function(){md(a,r)},o}function w0(a){return a=ki(a),a.tag=3,a}function C0(a,r,o,u){var h=o.type.getDerivedStateFromError;if(typeof h=="function"){var E=u.value;a.payload=function(){return h(E)},a.callback=function(){I0(r,o,u)}}var D=o.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(a.callback=function(){I0(r,o,u),typeof h!="function"&&(ji===null?ji=new Set([this]):ji.add(this));var j=u.stack;this.componentDidCatch(u.value,{componentStack:j!==null?j:""})})}function AC(a,r,o,u,h){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=o.alternate,r!==null&&tl(r,o,h,!0),o=or.current,o!==null){switch(o.tag){case 13:return Tr===null?Fg():o.alternate===null&&xa===0&&(xa=3),o.flags&=-257,o.flags|=65536,o.lanes=h,u===zm?o.flags|=16384:(r=o.updateQueue,r===null?o.updateQueue=new Set([u]):r.add(u),jg(a,u,h)),!1;case 22:return o.flags|=65536,u===zm?o.flags|=16384:(r=o.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=r):(o=r.retryQueue,o===null?r.retryQueue=new Set([u]):o.add(u)),jg(a,u,h)),!1}throw Error(i(435,o.tag))}return jg(a,u,h),Fg(),!1}if(Xt)return r=or.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,u!==Mm&&(a=Error(i(422),{cause:u}),el(nr(a,o)))):(u!==Mm&&(r=Error(i(423),{cause:u}),el(nr(r,o))),a=a.current.alternate,a.flags|=65536,h&=-h,a.lanes|=h,u=nr(u,o),h=gg(a.stateNode,u,h),Km(a,h),xa!==4&&(xa=2)),!1;var E=Error(i(520),{cause:u});if(E=nr(E,o),vl===null?vl=[E]:vl.push(E),xa!==4&&(xa=2),r===null)return!0;u=nr(u,o),o=r;do{switch(o.tag){case 3:return o.flags|=65536,a=h&-h,o.lanes|=a,a=gg(o.stateNode,u,a),Km(o,a),!1;case 1:if(r=o.type,E=o.stateNode,(o.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(ji===null||!ji.has(E))))return o.flags|=65536,h&=-h,o.lanes|=h,h=w0(h),C0(h,a,o,u),Km(o,h),!1}o=o.return}while(o!==null);return!1}var S0=Error(i(461)),Xa=!1;function on(a,r,o,u){r.child=a===null?h0(r,null,o,u):no(r,a.child,o,u)}function N0(a,r,o,u,h){o=o.render;var E=r.ref;if("ref"in u){var D={};for(var j in u)j!=="ref"&&(D[j]=u[j])}else D=u;return ys(r),u=Jm(a,r,o,D,E,h),j=Xm(),a!==null&&!Xa?($m(a,r,h),ri(a,r,h)):(Xt&&j&&Bm(r),r.flags|=1,on(a,r,u,h),r.child)}function x0(a,r,o,u,h){if(a===null){var E=o.type;return typeof E=="function"&&!Lm(E)&&E.defaultProps===void 0&&o.compare===null?(r.tag=15,r.type=E,T0(a,r,E,u,h)):(a=Kc(o.type,null,u,r,r.mode,h),a.ref=r.ref,a.return=r,r.child=a)}if(E=a.child,!vg(a,h)){var D=E.memoizedProps;if(o=o.compare,o=o!==null?o:Jo,o(D,u)&&a.ref===r.ref)return ri(a,r,h)}return r.flags|=1,a=Xr(E,u),a.ref=r.ref,a.return=r,r.child=a}function T0(a,r,o,u,h){if(a!==null){var E=a.memoizedProps;if(Jo(E,u)&&a.ref===r.ref)if(Xa=!1,r.pendingProps=u=E,vg(a,h))(a.flags&131072)!==0&&(Xa=!0);else return r.lanes=a.lanes,ri(a,r,h)}return fg(a,r,o,u,h)}function k0(a,r,o){var u=r.pendingProps,h=u.children,E=a!==null?a.memoizedState:null;if(u.mode==="hidden"){if((r.flags&128)!==0){if(u=E!==null?E.baseLanes|o:o,a!==null){for(h=r.child=a.child,E=0;h!==null;)E=E|h.lanes|h.childLanes,h=h.sibling;r.childLanes=E&~u}else r.childLanes=0,r.child=null;return L0(a,r,u,o)}if((o&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},a!==null&&Jc(r,E!==null?E.cachePool:null),E!==null?TA(r,E):qm(),p0(r);else return r.lanes=r.childLanes=536870912,L0(a,r,E!==null?E.baseLanes|o:o,o)}else E!==null?(Jc(r,E.cachePool),TA(r,E),Bi(),r.memoizedState=null):(a!==null&&Jc(r,null),qm(),Bi());return on(a,r,h,o),r.child}function L0(a,r,o,u){var h=Hm();return h=h===null?null:{parent:Va._currentValue,pool:h},r.memoizedState={baseLanes:o,cachePool:h},a!==null&&Jc(r,null),qm(),p0(r),a!==null&&tl(a,r,u,!0),null}function gd(a,r){var o=r.ref;if(o===null)a!==null&&a.ref!==null&&(r.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(a===null||a.ref!==o)&&(r.flags|=4194816)}}function fg(a,r,o,u,h){return ys(r),o=Jm(a,r,o,u,void 0,h),u=Xm(),a!==null&&!Xa?($m(a,r,h),ri(a,r,h)):(Xt&&u&&Bm(r),r.flags|=1,on(a,r,o,h),r.child)}function D0(a,r,o,u,h,E){return ys(r),r.updateQueue=null,o=LA(r,u,o,h),kA(a),u=Xm(),a!==null&&!Xa?($m(a,r,E),ri(a,r,E)):(Xt&&u&&Bm(r),r.flags|=1,on(a,r,o,E),r.child)}function R0(a,r,o,u,h){if(ys(r),r.stateNode===null){var E=qs,D=o.contextType;typeof D=="object"&&D!==null&&(E=An(D)),E=new o(u,E),r.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=mg,r.stateNode=E,E._reactInternals=r,E=r.stateNode,E.props=u,E.state=r.memoizedState,E.refs={},Vm(r),D=o.contextType,E.context=typeof D=="object"&&D!==null?An(D):qs,E.state=r.memoizedState,D=o.getDerivedStateFromProps,typeof D=="function"&&(ug(r,o,D,u),E.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(D=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),D!==E.state&&mg.enqueueReplaceState(E,E.state,null),ll(r,u,E,h),ol(),E.state=r.memoizedState),typeof E.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(a===null){E=r.stateNode;var j=r.memoizedProps,$=vs(o,j);E.props=$;var fe=E.context,xe=o.contextType;D=qs,typeof xe=="object"&&xe!==null&&(D=An(xe));var Re=o.getDerivedStateFromProps;xe=typeof Re=="function"||typeof E.getSnapshotBeforeUpdate=="function",j=r.pendingProps!==j,xe||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(j||fe!==D)&&y0(r,E,u,D),Ti=!1;var Ae=r.memoizedState;E.state=Ae,ll(r,u,E,h),ol(),fe=r.memoizedState,j||Ae!==fe||Ti?(typeof Re=="function"&&(ug(r,o,Re,u),fe=r.memoizedState),($=Ti||A0(r,o,$,u,Ae,fe,D))?(xe||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(r.flags|=4194308)):(typeof E.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=fe),E.props=u,E.state=fe,E.context=D,u=$):(typeof E.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{E=r.stateNode,Qm(a,r),D=r.memoizedProps,xe=vs(o,D),E.props=xe,Re=r.pendingProps,Ae=E.context,fe=o.contextType,$=qs,typeof fe=="object"&&fe!==null&&($=An(fe)),j=o.getDerivedStateFromProps,(fe=typeof j=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(D!==Re||Ae!==$)&&y0(r,E,u,$),Ti=!1,Ae=r.memoizedState,E.state=Ae,ll(r,u,E,h),ol();var ye=r.memoizedState;D!==Re||Ae!==ye||Ti||a!==null&&a.dependencies!==null&&Wc(a.dependencies)?(typeof j=="function"&&(ug(r,o,j,u),ye=r.memoizedState),(xe=Ti||A0(r,o,xe,u,Ae,ye,$)||a!==null&&a.dependencies!==null&&Wc(a.dependencies))?(fe||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(u,ye,$),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(u,ye,$)),typeof E.componentDidUpdate=="function"&&(r.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof E.componentDidUpdate!="function"||D===a.memoizedProps&&Ae===a.memoizedState||(r.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===a.memoizedProps&&Ae===a.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=ye),E.props=u,E.state=ye,E.context=$,u=xe):(typeof E.componentDidUpdate!="function"||D===a.memoizedProps&&Ae===a.memoizedState||(r.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===a.memoizedProps&&Ae===a.memoizedState||(r.flags|=1024),u=!1)}return E=u,gd(a,r),u=(r.flags&128)!==0,E||u?(E=r.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:E.render(),r.flags|=1,a!==null&&u?(r.child=no(r,a.child,null,h),r.child=no(r,null,o,h)):on(a,r,o,h),r.memoizedState=E.state,a=r.child):a=ri(a,r,h),a}function B0(a,r,o,u){return Zo(),r.flags|=256,on(a,r,o,u),r.child}var hg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pg(a){return{baseLanes:a,cachePool:bA()}}function Ag(a,r,o){return a=a!==null?a.childLanes&~o:0,r&&(a|=lr),a}function U0(a,r,o){var u=r.pendingProps,h=!1,E=(r.flags&128)!==0,D;if((D=E)||(D=a!==null&&a.memoizedState===null?!1:(Qa.current&2)!==0),D&&(h=!0,r.flags&=-129),D=(r.flags&32)!==0,r.flags&=-33,a===null){if(Xt){if(h?Ri(r):Bi(),Xt){var j=Na,$;if($=j){e:{for($=j,j=xr;$.nodeType!==8;){if(!j){j=null;break e}if($=Ar($.nextSibling),$===null){j=null;break e}}j=$}j!==null?(r.memoizedState={dehydrated:j,treeContext:gs!==null?{id:$r,overflow:Zr}:null,retryLane:536870912,hydrationErrors:null},$=zn(18,null,null,0),$.stateNode=j,$.return=r,r.child=$,In=r,Na=null,$=!0):$=!1}$||ps(r)}if(j=r.memoizedState,j!==null&&(j=j.dehydrated,j!==null))return ef(j)?r.lanes=32:r.lanes=536870912,null;ni(r)}return j=u.children,u=u.fallback,h?(Bi(),h=r.mode,j=fd({mode:"hidden",children:j},h),u=ms(u,h,o,null),j.return=r,u.return=r,j.sibling=u,r.child=j,h=r.child,h.memoizedState=pg(o),h.childLanes=Ag(a,D,o),r.memoizedState=hg,u):(Ri(r),yg(r,j))}if($=a.memoizedState,$!==null&&(j=$.dehydrated,j!==null)){if(E)r.flags&256?(Ri(r),r.flags&=-257,r=Eg(a,r,o)):r.memoizedState!==null?(Bi(),r.child=a.child,r.flags|=128,r=null):(Bi(),h=u.fallback,j=r.mode,u=fd({mode:"visible",children:u.children},j),h=ms(h,j,o,null),h.flags|=2,u.return=r,h.return=r,u.sibling=h,r.child=u,no(r,a.child,null,o),u=r.child,u.memoizedState=pg(o),u.childLanes=Ag(a,D,o),r.memoizedState=hg,r=h);else if(Ri(r),ef(j)){if(D=j.nextSibling&&j.nextSibling.dataset,D)var fe=D.dgst;D=fe,u=Error(i(419)),u.stack="",u.digest=D,el({value:u,source:null,stack:null}),r=Eg(a,r,o)}else if(Xa||tl(a,r,o,!1),D=(o&a.childLanes)!==0,Xa||D){if(D=ha,D!==null&&(u=o&-o,u=(u&42)!==0?1:Nt(u),u=(u&(D.suspendedLanes|o))!==0?0:u,u!==0&&u!==$.retryLane))throw $.retryLane=u,Gs(a,u),qn(D,a,u),S0;j.data==="$?"||Fg(),r=Eg(a,r,o)}else j.data==="$?"?(r.flags|=192,r.child=a.child,r=null):(a=$.treeContext,Na=Ar(j.nextSibling),In=r,Xt=!0,hs=null,xr=!1,a!==null&&(ir[sr++]=$r,ir[sr++]=Zr,ir[sr++]=gs,$r=a.id,Zr=a.overflow,gs=r),r=yg(r,u.children),r.flags|=4096);return r}return h?(Bi(),h=u.fallback,j=r.mode,$=a.child,fe=$.sibling,u=Xr($,{mode:"hidden",children:u.children}),u.subtreeFlags=$.subtreeFlags&65011712,fe!==null?h=Xr(fe,h):(h=ms(h,j,o,null),h.flags|=2),h.return=r,u.return=r,u.sibling=h,r.child=u,u=h,h=r.child,j=a.child.memoizedState,j===null?j=pg(o):($=j.cachePool,$!==null?(fe=Va._currentValue,$=$.parent!==fe?{parent:fe,pool:fe}:$):$=bA(),j={baseLanes:j.baseLanes|o,cachePool:$}),h.memoizedState=j,h.childLanes=Ag(a,D,o),r.memoizedState=hg,u):(Ri(r),o=a.child,a=o.sibling,o=Xr(o,{mode:"visible",children:u.children}),o.return=r,o.sibling=null,a!==null&&(D=r.deletions,D===null?(r.deletions=[a],r.flags|=16):D.push(a)),r.child=o,r.memoizedState=null,o)}function yg(a,r){return r=fd({mode:"visible",children:r},a.mode),r.return=a,a.child=r}function fd(a,r){return a=zn(22,a,null,r),a.lanes=0,a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},a}function Eg(a,r,o){return no(r,a.child,null,o),a=yg(r,r.pendingProps.children),a.flags|=2,r.memoizedState=null,a}function M0(a,r,o){a.lanes|=r;var u=a.alternate;u!==null&&(u.lanes|=r),Fm(a.return,r,o)}function bg(a,r,o,u,h){var E=a.memoizedState;E===null?a.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:h}:(E.isBackwards=r,E.rendering=null,E.renderingStartTime=0,E.last=u,E.tail=o,E.tailMode=h)}function _0(a,r,o){var u=r.pendingProps,h=u.revealOrder,E=u.tail;if(on(a,r,u.children,o),u=Qa.current,(u&2)!==0)u=u&1|2,r.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=r.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&M0(a,o,r);else if(a.tag===19)M0(a,o,r);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}u&=1}switch(ne(Qa,u),h){case"forwards":for(o=r.child,h=null;o!==null;)a=o.alternate,a!==null&&dd(a)===null&&(h=o),o=o.sibling;o=h,o===null?(h=r.child,r.child=null):(h=o.sibling,o.sibling=null),bg(r,!1,h,o,E);break;case"backwards":for(o=null,h=r.child,r.child=null;h!==null;){if(a=h.alternate,a!==null&&dd(a)===null){r.child=h;break}a=h.sibling,h.sibling=o,o=h,h=a}bg(r,!0,o,null,E);break;case"together":bg(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function ri(a,r,o){if(a!==null&&(r.dependencies=a.dependencies),Oi|=r.lanes,(o&r.childLanes)===0)if(a!==null){if(tl(a,r,o,!1),(o&r.childLanes)===0)return null}else return null;if(a!==null&&r.child!==a.child)throw Error(i(153));if(r.child!==null){for(a=r.child,o=Xr(a,a.pendingProps),r.child=o,o.return=r;a.sibling!==null;)a=a.sibling,o=o.sibling=Xr(a,a.pendingProps),o.return=r;o.sibling=null}return r.child}function vg(a,r){return(a.lanes&r)!==0?!0:(a=a.dependencies,!!(a!==null&&Wc(a)))}function yC(a,r,o){switch(r.tag){case 3:we(r,r.stateNode.containerInfo),xi(r,Va,a.memoizedState.cache),Zo();break;case 27:case 5:ze(r);break;case 4:we(r,r.stateNode.containerInfo);break;case 10:xi(r,r.type,r.memoizedProps.value);break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Ri(r),r.flags|=128,null):(o&r.child.childLanes)!==0?U0(a,r,o):(Ri(r),a=ri(a,r,o),a!==null?a.sibling:null);Ri(r);break;case 19:var h=(a.flags&128)!==0;if(u=(o&r.childLanes)!==0,u||(tl(a,r,o,!1),u=(o&r.childLanes)!==0),h){if(u)return _0(a,r,o);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),ne(Qa,Qa.current),u)break;return null;case 22:case 23:return r.lanes=0,k0(a,r,o);case 24:xi(r,Va,a.memoizedState.cache)}return ri(a,r,o)}function F0(a,r,o){if(a!==null)if(a.memoizedProps!==r.pendingProps)Xa=!0;else{if(!vg(a,o)&&(r.flags&128)===0)return Xa=!1,yC(a,r,o);Xa=(a.flags&131072)!==0}else Xa=!1,Xt&&(r.flags&1048576)!==0&&gA(r,qc,r.index);switch(r.lanes=0,r.tag){case 16:e:{a=r.pendingProps;var u=r.elementType,h=u._init;if(u=h(u._payload),r.type=u,typeof u=="function")Lm(u)?(a=vs(u,a),r.tag=1,r=R0(null,r,u,a,o)):(r.tag=0,r=fg(null,r,u,a,o));else{if(u!=null){if(h=u.$$typeof,h===F){r.tag=11,r=N0(null,r,u,a,o);break e}else if(h===U){r.tag=14,r=x0(null,r,u,a,o);break e}}throw r=X(u)||u,Error(i(306,r,""))}}return r;case 0:return fg(a,r,r.type,r.pendingProps,o);case 1:return u=r.type,h=vs(u,r.pendingProps),R0(a,r,u,h,o);case 3:e:{if(we(r,r.stateNode.containerInfo),a===null)throw Error(i(387));u=r.pendingProps;var E=r.memoizedState;h=E.element,Qm(a,r),ll(r,u,null,o);var D=r.memoizedState;if(u=D.cache,xi(r,Va,u),u!==E.cache&&Om(r,[Va],o,!0),ol(),u=D.element,E.isDehydrated)if(E={element:u,isDehydrated:!1,cache:D.cache},r.updateQueue.baseState=E,r.memoizedState=E,r.flags&256){r=B0(a,r,u,o);break e}else if(u!==h){h=nr(Error(i(424)),r),el(h),r=B0(a,r,u,o);break e}else{switch(a=r.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(Na=Ar(a.firstChild),In=r,Xt=!0,hs=null,xr=!0,o=h0(r,null,u,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(Zo(),u===h){r=ri(a,r,o);break e}on(a,r,u,o)}r=r.child}return r;case 26:return gd(a,r),a===null?(o=Hy(r.type,null,r.pendingProps,null))?r.memoizedState=o:Xt||(o=r.type,a=r.pendingProps,u=Td(Ee.current).createElement(o),u[Lt]=r,u[Gt]=a,cn(u,o,a),et(u),r.stateNode=u):r.memoizedState=Hy(r.type,a.memoizedProps,r.pendingProps,a.memoizedState),null;case 27:return ze(r),a===null&&Xt&&(u=r.stateNode=Oy(r.type,r.pendingProps,Ee.current),In=r,xr=!0,h=Na,zi(r.type)?(tf=h,Na=Ar(u.firstChild)):Na=h),on(a,r,r.pendingProps.children,o),gd(a,r),a===null&&(r.flags|=4194304),r.child;case 5:return a===null&&Xt&&((h=u=Na)&&(u=GC(u,r.type,r.pendingProps,xr),u!==null?(r.stateNode=u,In=r,Na=Ar(u.firstChild),xr=!1,h=!0):h=!1),h||ps(r)),ze(r),h=r.type,E=r.pendingProps,D=a!==null?a.memoizedProps:null,u=E.children,Xg(h,E)?u=null:D!==null&&Xg(h,D)&&(r.flags|=32),r.memoizedState!==null&&(h=Jm(a,r,dC,null,null,o),Ll._currentValue=h),gd(a,r),on(a,r,u,o),r.child;case 6:return a===null&&Xt&&((a=o=Na)&&(o=qC(o,r.pendingProps,xr),o!==null?(r.stateNode=o,In=r,Na=null,a=!0):a=!1),a||ps(r)),null;case 13:return U0(a,r,o);case 4:return we(r,r.stateNode.containerInfo),u=r.pendingProps,a===null?r.child=no(r,null,u,o):on(a,r,u,o),r.child;case 11:return N0(a,r,r.type,r.pendingProps,o);case 7:return on(a,r,r.pendingProps,o),r.child;case 8:return on(a,r,r.pendingProps.children,o),r.child;case 12:return on(a,r,r.pendingProps.children,o),r.child;case 10:return u=r.pendingProps,xi(r,r.type,u.value),on(a,r,u.children,o),r.child;case 9:return h=r.type._context,u=r.pendingProps.children,ys(r),h=An(h),u=u(h),r.flags|=1,on(a,r,u,o),r.child;case 14:return x0(a,r,r.type,r.pendingProps,o);case 15:return T0(a,r,r.type,r.pendingProps,o);case 19:return _0(a,r,o);case 31:return u=r.pendingProps,o=r.mode,u={mode:u.mode,children:u.children},a===null?(o=fd(u,o),o.ref=r.ref,r.child=o,o.return=r,r=o):(o=Xr(a.child,u),o.ref=r.ref,r.child=o,o.return=r,r=o),r;case 22:return k0(a,r,o);case 24:return ys(r),u=An(Va),a===null?(h=Hm(),h===null&&(h=ha,E=jm(),h.pooledCache=E,E.refCount++,E!==null&&(h.pooledCacheLanes|=o),h=E),r.memoizedState={parent:u,cache:h},Vm(r),xi(r,Va,h)):((a.lanes&o)!==0&&(Qm(a,r),ll(r,null,null,o),ol()),h=a.memoizedState,E=r.memoizedState,h.parent!==u?(h={parent:u,cache:u},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),xi(r,Va,u)):(u=E.cache,xi(r,Va,u),u!==h.cache&&Om(r,[Va],o,!0))),on(a,r,r.pendingProps.children,o),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function ii(a){a.flags|=4}function O0(a,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!Gy(r)){if(r=or.current,r!==null&&((qt&4194048)===qt?Tr!==null:(qt&62914560)!==qt&&(qt&536870912)===0||r!==Tr))throw il=zm,vA;a.flags|=8192}}function hd(a,r){r!==null&&(a.flags|=4),a.flags&16384&&(r=a.tag!==22?ca():536870912,a.lanes|=r,oo|=r)}function hl(a,r){if(!Xt)switch(a.tailMode){case"hidden":r=a.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?a.tail=null:o.sibling=null;break;case"collapsed":o=a.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?r||a.tail===null?a.tail=null:a.tail.sibling=null:u.sibling=null}}function Ca(a){var r=a.alternate!==null&&a.alternate.child===a.child,o=0,u=0;if(r)for(var h=a.child;h!==null;)o|=h.lanes|h.childLanes,u|=h.subtreeFlags&65011712,u|=h.flags&65011712,h.return=a,h=h.sibling;else for(h=a.child;h!==null;)o|=h.lanes|h.childLanes,u|=h.subtreeFlags,u|=h.flags,h.return=a,h=h.sibling;return a.subtreeFlags|=u,a.childLanes=o,r}function EC(a,r,o){var u=r.pendingProps;switch(Um(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ca(r),null;case 1:return Ca(r),null;case 3:return o=r.stateNode,u=null,a!==null&&(u=a.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),ti(Va),Oe(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(a===null||a.child===null)&&($o(r)?ii(r):a===null||a.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,pA())),Ca(r),null;case 26:return o=r.memoizedState,a===null?(ii(r),o!==null?(Ca(r),O0(r,o)):(Ca(r),r.flags&=-16777217)):o?o!==a.memoizedState?(ii(r),Ca(r),O0(r,o)):(Ca(r),r.flags&=-16777217):(a.memoizedProps!==u&&ii(r),Ca(r),r.flags&=-16777217),null;case 27:Et(r),o=Ee.current;var h=r.type;if(a!==null&&r.stateNode!=null)a.memoizedProps!==u&&ii(r);else{if(!u){if(r.stateNode===null)throw Error(i(166));return Ca(r),null}a=Ie.current,$o(r)?fA(r):(a=Oy(h,u,o),r.stateNode=a,ii(r))}return Ca(r),null;case 5:if(Et(r),o=r.type,a!==null&&r.stateNode!=null)a.memoizedProps!==u&&ii(r);else{if(!u){if(r.stateNode===null)throw Error(i(166));return Ca(r),null}if(a=Ie.current,$o(r))fA(r);else{switch(h=Td(Ee.current),a){case 1:a=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:a=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":a=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":a=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":a=h.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof u.is=="string"?h.createElement("select",{is:u.is}):h.createElement("select"),u.multiple?a.multiple=!0:u.size&&(a.size=u.size);break;default:a=typeof u.is=="string"?h.createElement(o,{is:u.is}):h.createElement(o)}}a[Lt]=r,a[Gt]=u;e:for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)a.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break e;for(;h.sibling===null;){if(h.return===null||h.return===r)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}r.stateNode=a;e:switch(cn(a,o,u),o){case"button":case"input":case"select":case"textarea":a=!!u.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ii(r)}}return Ca(r),r.flags&=-16777217,null;case 6:if(a&&r.stateNode!=null)a.memoizedProps!==u&&ii(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(i(166));if(a=Ee.current,$o(r)){if(a=r.stateNode,o=r.memoizedProps,u=null,h=In,h!==null)switch(h.tag){case 27:case 5:u=h.memoizedProps}a[Lt]=r,a=!!(a.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||Dy(a.nodeValue,o)),a||ps(r)}else a=Td(a).createTextNode(u),a[Lt]=r,r.stateNode=a}return Ca(r),null;case 13:if(u=r.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(h=$o(r),u!==null&&u.dehydrated!==null){if(a===null){if(!h)throw Error(i(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[Lt]=r}else Zo(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ca(r),h=!1}else h=pA(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(ni(r),r):(ni(r),null)}if(ni(r),(r.flags&128)!==0)return r.lanes=o,r;if(o=u!==null,a=a!==null&&a.memoizedState!==null,o){u=r.child,h=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(h=u.alternate.memoizedState.cachePool.pool);var E=null;u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(E=u.memoizedState.cachePool.pool),E!==h&&(u.flags|=2048)}return o!==a&&o&&(r.child.flags|=8192),hd(r,r.updateQueue),Ca(r),null;case 4:return Oe(),a===null&&Gg(r.stateNode.containerInfo),Ca(r),null;case 10:return ti(r.type),Ca(r),null;case 19:if(Y(Qa),h=r.memoizedState,h===null)return Ca(r),null;if(u=(r.flags&128)!==0,E=h.rendering,E===null)if(u)hl(h,!1);else{if(xa!==0||a!==null&&(a.flags&128)!==0)for(a=r.child;a!==null;){if(E=dd(a),E!==null){for(r.flags|=128,hl(h,!1),a=E.updateQueue,r.updateQueue=a,hd(r,a),r.subtreeFlags=0,a=o,o=r.child;o!==null;)mA(o,a),o=o.sibling;return ne(Qa,Qa.current&1|2),r.child}a=a.sibling}h.tail!==null&&Fe()>yd&&(r.flags|=128,u=!0,hl(h,!1),r.lanes=4194304)}else{if(!u)if(a=dd(E),a!==null){if(r.flags|=128,u=!0,a=a.updateQueue,r.updateQueue=a,hd(r,a),hl(h,!0),h.tail===null&&h.tailMode==="hidden"&&!E.alternate&&!Xt)return Ca(r),null}else 2*Fe()-h.renderingStartTime>yd&&o!==536870912&&(r.flags|=128,u=!0,hl(h,!1),r.lanes=4194304);h.isBackwards?(E.sibling=r.child,r.child=E):(a=h.last,a!==null?a.sibling=E:r.child=E,h.last=E)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=Fe(),r.sibling=null,a=Qa.current,ne(Qa,u?a&1|2:a&1),r):(Ca(r),null);case 22:case 23:return ni(r),Wm(),u=r.memoizedState!==null,a!==null?a.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(o&536870912)!==0&&(r.flags&128)===0&&(Ca(r),r.subtreeFlags&6&&(r.flags|=8192)):Ca(r),o=r.updateQueue,o!==null&&hd(r,o.retryQueue),o=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==o&&(r.flags|=2048),a!==null&&Y(Es),null;case 24:return o=null,a!==null&&(o=a.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),ti(Va),Ca(r),null;case 25:return null;case 30:return null}throw Error(i(156,r.tag))}function bC(a,r){switch(Um(r),r.tag){case 1:return a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 3:return ti(Va),Oe(),a=r.flags,(a&65536)!==0&&(a&128)===0?(r.flags=a&-65537|128,r):null;case 26:case 27:case 5:return Et(r),null;case 13:if(ni(r),a=r.memoizedState,a!==null&&a.dehydrated!==null){if(r.alternate===null)throw Error(i(340));Zo()}return a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 19:return Y(Qa),null;case 4:return Oe(),null;case 10:return ti(r.type),null;case 22:case 23:return ni(r),Wm(),a!==null&&Y(Es),a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 24:return ti(Va),null;case 25:return null;default:return null}}function j0(a,r){switch(Um(r),r.tag){case 3:ti(Va),Oe();break;case 26:case 27:case 5:Et(r);break;case 4:Oe();break;case 13:ni(r);break;case 19:Y(Qa);break;case 10:ti(r.type);break;case 22:case 23:ni(r),Wm(),a!==null&&Y(Es);break;case 24:ti(Va)}}function pl(a,r){try{var o=r.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var h=u.next;o=h;do{if((o.tag&a)===a){u=void 0;var E=o.create,D=o.inst;u=E(),D.destroy=u}o=o.next}while(o!==h)}}catch(j){ga(r,r.return,j)}}function Ui(a,r,o){try{var u=r.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var E=h.next;u=E;do{if((u.tag&a)===a){var D=u.inst,j=D.destroy;if(j!==void 0){D.destroy=void 0,h=r;var $=o,fe=j;try{fe()}catch(xe){ga(h,$,xe)}}}u=u.next}while(u!==E)}}catch(xe){ga(r,r.return,xe)}}function P0(a){var r=a.updateQueue;if(r!==null){var o=a.stateNode;try{xA(r,o)}catch(u){ga(a,a.return,u)}}}function H0(a,r,o){o.props=vs(a.type,a.memoizedProps),o.state=a.memoizedState;try{o.componentWillUnmount()}catch(u){ga(a,r,u)}}function Al(a,r){try{var o=a.ref;if(o!==null){switch(a.tag){case 26:case 27:case 5:var u=a.stateNode;break;case 30:u=a.stateNode;break;default:u=a.stateNode}typeof o=="function"?a.refCleanup=o(u):o.current=u}}catch(h){ga(a,r,h)}}function kr(a,r){var o=a.ref,u=a.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(h){ga(a,r,h)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(h){ga(a,r,h)}else o.current=null}function z0(a){var r=a.type,o=a.memoizedProps,u=a.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(h){ga(a,a.return,h)}}function Ig(a,r,o){try{var u=a.stateNode;HC(u,a.type,o,r),u[Gt]=r}catch(h){ga(a,a.return,h)}}function V0(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&zi(a.type)||a.tag===4}function wg(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||V0(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&zi(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Cg(a,r,o){var u=a.tag;if(u===5||u===6)a=a.stateNode,r?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(a,r):(r=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,r.appendChild(a),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=xd));else if(u!==4&&(u===27&&zi(a.type)&&(o=a.stateNode,r=null),a=a.child,a!==null))for(Cg(a,r,o),a=a.sibling;a!==null;)Cg(a,r,o),a=a.sibling}function pd(a,r,o){var u=a.tag;if(u===5||u===6)a=a.stateNode,r?o.insertBefore(a,r):o.appendChild(a);else if(u!==4&&(u===27&&zi(a.type)&&(o=a.stateNode),a=a.child,a!==null))for(pd(a,r,o),a=a.sibling;a!==null;)pd(a,r,o),a=a.sibling}function Q0(a){var r=a.stateNode,o=a.memoizedProps;try{for(var u=a.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);cn(r,u,o),r[Lt]=a,r[Gt]=o}catch(E){ga(a,a.return,E)}}var si=!1,Ba=!1,Sg=!1,K0=typeof WeakSet=="function"?WeakSet:Set,$a=null;function vC(a,r){if(a=a.containerInfo,Yg=Ud,a=aA(a),wm(a)){if("selectionStart"in a)var o={start:a.selectionStart,end:a.selectionEnd};else e:{o=(o=a.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var h=u.anchorOffset,E=u.focusNode;u=u.focusOffset;try{o.nodeType,E.nodeType}catch{o=null;break e}var D=0,j=-1,$=-1,fe=0,xe=0,Re=a,Ae=null;t:for(;;){for(var ye;Re!==o||h!==0&&Re.nodeType!==3||(j=D+h),Re!==E||u!==0&&Re.nodeType!==3||($=D+u),Re.nodeType===3&&(D+=Re.nodeValue.length),(ye=Re.firstChild)!==null;)Ae=Re,Re=ye;for(;;){if(Re===a)break t;if(Ae===o&&++fe===h&&(j=D),Ae===E&&++xe===u&&($=D),(ye=Re.nextSibling)!==null)break;Re=Ae,Ae=Re.parentNode}Re=ye}o=j===-1||$===-1?null:{start:j,end:$}}else o=null}o=o||{start:0,end:0}}else o=null;for(Jg={focusedElem:a,selectionRange:o},Ud=!1,$a=r;$a!==null;)if(r=$a,a=r.child,(r.subtreeFlags&1024)!==0&&a!==null)a.return=r,$a=a;else for(;$a!==null;){switch(r=$a,E=r.alternate,a=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((a&1024)!==0&&E!==null){a=void 0,o=r,h=E.memoizedProps,E=E.memoizedState,u=o.stateNode;try{var ft=vs(o.type,h,o.elementType===o.type);a=u.getSnapshotBeforeUpdate(ft,E),u.__reactInternalSnapshotBeforeUpdate=a}catch(ot){ga(o,o.return,ot)}}break;case 3:if((a&1024)!==0){if(a=r.stateNode.containerInfo,o=a.nodeType,o===9)Zg(a);else if(o===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Zg(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(i(163))}if(a=r.sibling,a!==null){a.return=r.return,$a=a;break}$a=r.return}}function G0(a,r,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:Mi(a,o),u&4&&pl(5,o);break;case 1:if(Mi(a,o),u&4)if(a=o.stateNode,r===null)try{a.componentDidMount()}catch(D){ga(o,o.return,D)}else{var h=vs(o.type,r.memoizedProps);r=r.memoizedState;try{a.componentDidUpdate(h,r,a.__reactInternalSnapshotBeforeUpdate)}catch(D){ga(o,o.return,D)}}u&64&&P0(o),u&512&&Al(o,o.return);break;case 3:if(Mi(a,o),u&64&&(a=o.updateQueue,a!==null)){if(r=null,o.child!==null)switch(o.child.tag){case 27:case 5:r=o.child.stateNode;break;case 1:r=o.child.stateNode}try{xA(a,r)}catch(D){ga(o,o.return,D)}}break;case 27:r===null&&u&4&&Q0(o);case 26:case 5:Mi(a,o),r===null&&u&4&&z0(o),u&512&&Al(o,o.return);break;case 12:Mi(a,o);break;case 13:Mi(a,o),u&4&&Y0(a,o),u&64&&(a=o.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(o=LC.bind(null,o),WC(a,o))));break;case 22:if(u=o.memoizedState!==null||si,!u){r=r!==null&&r.memoizedState!==null||Ba,h=si;var E=Ba;si=u,(Ba=r)&&!E?_i(a,o,(o.subtreeFlags&8772)!==0):Mi(a,o),si=h,Ba=E}break;case 30:break;default:Mi(a,o)}}function q0(a){var r=a.alternate;r!==null&&(a.alternate=null,q0(r)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(r=a.stateNode,r!==null&&ya(r)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var ba=null,Rn=!1;function oi(a,r,o){for(o=o.child;o!==null;)W0(a,r,o),o=o.sibling}function W0(a,r,o){if(M&&typeof M.onCommitFiberUnmount=="function")try{M.onCommitFiberUnmount(Yt,o)}catch{}switch(o.tag){case 26:Ba||kr(o,r),oi(a,r,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Ba||kr(o,r);var u=ba,h=Rn;zi(o.type)&&(ba=o.stateNode,Rn=!1),oi(a,r,o),Nl(o.stateNode),ba=u,Rn=h;break;case 5:Ba||kr(o,r);case 6:if(u=ba,h=Rn,ba=null,oi(a,r,o),ba=u,Rn=h,ba!==null)if(Rn)try{(ba.nodeType===9?ba.body:ba.nodeName==="HTML"?ba.ownerDocument.body:ba).removeChild(o.stateNode)}catch(E){ga(o,r,E)}else try{ba.removeChild(o.stateNode)}catch(E){ga(o,r,E)}break;case 18:ba!==null&&(Rn?(a=ba,_y(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,o.stateNode),Ul(a)):_y(ba,o.stateNode));break;case 4:u=ba,h=Rn,ba=o.stateNode.containerInfo,Rn=!0,oi(a,r,o),ba=u,Rn=h;break;case 0:case 11:case 14:case 15:Ba||Ui(2,o,r),Ba||Ui(4,o,r),oi(a,r,o);break;case 1:Ba||(kr(o,r),u=o.stateNode,typeof u.componentWillUnmount=="function"&&H0(o,r,u)),oi(a,r,o);break;case 21:oi(a,r,o);break;case 22:Ba=(u=Ba)||o.memoizedState!==null,oi(a,r,o),Ba=u;break;default:oi(a,r,o)}}function Y0(a,r){if(r.memoizedState===null&&(a=r.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Ul(a)}catch(o){ga(r,r.return,o)}}function IC(a){switch(a.tag){case 13:case 19:var r=a.stateNode;return r===null&&(r=a.stateNode=new K0),r;case 22:return a=a.stateNode,r=a._retryCache,r===null&&(r=a._retryCache=new K0),r;default:throw Error(i(435,a.tag))}}function Ng(a,r){var o=IC(a);r.forEach(function(u){var h=DC.bind(null,a,u);o.has(u)||(o.add(u),u.then(h,h))})}function Vn(a,r){var o=r.deletions;if(o!==null)for(var u=0;u<o.length;u++){var h=o[u],E=a,D=r,j=D;e:for(;j!==null;){switch(j.tag){case 27:if(zi(j.type)){ba=j.stateNode,Rn=!1;break e}break;case 5:ba=j.stateNode,Rn=!1;break e;case 3:case 4:ba=j.stateNode.containerInfo,Rn=!0;break e}j=j.return}if(ba===null)throw Error(i(160));W0(E,D,h),ba=null,Rn=!1,E=h.alternate,E!==null&&(E.return=null),h.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)J0(r,a),r=r.sibling}var pr=null;function J0(a,r){var o=a.alternate,u=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Vn(r,a),Qn(a),u&4&&(Ui(3,a,a.return),pl(3,a),Ui(5,a,a.return));break;case 1:Vn(r,a),Qn(a),u&512&&(Ba||o===null||kr(o,o.return)),u&64&&si&&(a=a.updateQueue,a!==null&&(u=a.callbacks,u!==null&&(o=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var h=pr;if(Vn(r,a),Qn(a),u&512&&(Ba||o===null||kr(o,o.return)),u&4){var E=o!==null?o.memoizedState:null;if(u=a.memoizedState,o===null)if(u===null)if(a.stateNode===null){e:{u=a.type,o=a.memoizedProps,h=h.ownerDocument||h;t:switch(u){case"title":E=h.getElementsByTagName("title")[0],(!E||E[_a]||E[Lt]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=h.createElement(u),h.head.insertBefore(E,h.querySelector("head > title"))),cn(E,u,o),E[Lt]=a,et(E),u=E;break e;case"link":var D=Qy("link","href",h).get(u+(o.href||""));if(D){for(var j=0;j<D.length;j++)if(E=D[j],E.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&E.getAttribute("rel")===(o.rel==null?null:o.rel)&&E.getAttribute("title")===(o.title==null?null:o.title)&&E.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){D.splice(j,1);break t}}E=h.createElement(u),cn(E,u,o),h.head.appendChild(E);break;case"meta":if(D=Qy("meta","content",h).get(u+(o.content||""))){for(j=0;j<D.length;j++)if(E=D[j],E.getAttribute("content")===(o.content==null?null:""+o.content)&&E.getAttribute("name")===(o.name==null?null:o.name)&&E.getAttribute("property")===(o.property==null?null:o.property)&&E.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&E.getAttribute("charset")===(o.charSet==null?null:o.charSet)){D.splice(j,1);break t}}E=h.createElement(u),cn(E,u,o),h.head.appendChild(E);break;default:throw Error(i(468,u))}E[Lt]=a,et(E),u=E}a.stateNode=u}else Ky(h,a.type,a.stateNode);else a.stateNode=Vy(h,u,a.memoizedProps);else E!==u?(E===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):E.count--,u===null?Ky(h,a.type,a.stateNode):Vy(h,u,a.memoizedProps)):u===null&&a.stateNode!==null&&Ig(a,a.memoizedProps,o.memoizedProps)}break;case 27:Vn(r,a),Qn(a),u&512&&(Ba||o===null||kr(o,o.return)),o!==null&&u&4&&Ig(a,a.memoizedProps,o.memoizedProps);break;case 5:if(Vn(r,a),Qn(a),u&512&&(Ba||o===null||kr(o,o.return)),a.flags&32){h=a.stateNode;try{Nr(h,"")}catch(ye){ga(a,a.return,ye)}}u&4&&a.stateNode!=null&&(h=a.memoizedProps,Ig(a,h,o!==null?o.memoizedProps:h)),u&1024&&(Sg=!0);break;case 6:if(Vn(r,a),Qn(a),u&4){if(a.stateNode===null)throw Error(i(162));u=a.memoizedProps,o=a.stateNode;try{o.nodeValue=u}catch(ye){ga(a,a.return,ye)}}break;case 3:if(Dd=null,h=pr,pr=kd(r.containerInfo),Vn(r,a),pr=h,Qn(a),u&4&&o!==null&&o.memoizedState.isDehydrated)try{Ul(r.containerInfo)}catch(ye){ga(a,a.return,ye)}Sg&&(Sg=!1,X0(a));break;case 4:u=pr,pr=kd(a.stateNode.containerInfo),Vn(r,a),Qn(a),pr=u;break;case 12:Vn(r,a),Qn(a);break;case 13:Vn(r,a),Qn(a),a.child.flags&8192&&a.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Rg=Fe()),u&4&&(u=a.updateQueue,u!==null&&(a.updateQueue=null,Ng(a,u)));break;case 22:h=a.memoizedState!==null;var $=o!==null&&o.memoizedState!==null,fe=si,xe=Ba;if(si=fe||h,Ba=xe||$,Vn(r,a),Ba=xe,si=fe,Qn(a),u&8192)e:for(r=a.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(o===null||$||si||Ba||Is(a)),o=null,r=a;;){if(r.tag===5||r.tag===26){if(o===null){$=o=r;try{if(E=$.stateNode,h)D=E.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{j=$.stateNode;var Re=$.memoizedProps.style,Ae=Re!=null&&Re.hasOwnProperty("display")?Re.display:null;j.style.display=Ae==null||typeof Ae=="boolean"?"":(""+Ae).trim()}}catch(ye){ga($,$.return,ye)}}}else if(r.tag===6){if(o===null){$=r;try{$.stateNode.nodeValue=h?"":$.memoizedProps}catch(ye){ga($,$.return,ye)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===a)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;o===r&&(o=null),r=r.return}o===r&&(o=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=a.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Ng(a,o))));break;case 19:Vn(r,a),Qn(a),u&4&&(u=a.updateQueue,u!==null&&(a.updateQueue=null,Ng(a,u)));break;case 30:break;case 21:break;default:Vn(r,a),Qn(a)}}function Qn(a){var r=a.flags;if(r&2){try{for(var o,u=a.return;u!==null;){if(V0(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var h=o.stateNode,E=wg(a);pd(a,E,h);break;case 5:var D=o.stateNode;o.flags&32&&(Nr(D,""),o.flags&=-33);var j=wg(a);pd(a,j,D);break;case 3:case 4:var $=o.stateNode.containerInfo,fe=wg(a);Cg(a,fe,$);break;default:throw Error(i(161))}}catch(xe){ga(a,a.return,xe)}a.flags&=-3}r&4096&&(a.flags&=-4097)}function X0(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var r=a;X0(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),a=a.sibling}}function Mi(a,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)G0(a,r.alternate,r),r=r.sibling}function Is(a){for(a=a.child;a!==null;){var r=a;switch(r.tag){case 0:case 11:case 14:case 15:Ui(4,r,r.return),Is(r);break;case 1:kr(r,r.return);var o=r.stateNode;typeof o.componentWillUnmount=="function"&&H0(r,r.return,o),Is(r);break;case 27:Nl(r.stateNode);case 26:case 5:kr(r,r.return),Is(r);break;case 22:r.memoizedState===null&&Is(r);break;case 30:Is(r);break;default:Is(r)}a=a.sibling}}function _i(a,r,o){for(o=o&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,h=a,E=r,D=E.flags;switch(E.tag){case 0:case 11:case 15:_i(h,E,o),pl(4,E);break;case 1:if(_i(h,E,o),u=E,h=u.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(fe){ga(u,u.return,fe)}if(u=E,h=u.updateQueue,h!==null){var j=u.stateNode;try{var $=h.shared.hiddenCallbacks;if($!==null)for(h.shared.hiddenCallbacks=null,h=0;h<$.length;h++)NA($[h],j)}catch(fe){ga(u,u.return,fe)}}o&&D&64&&P0(E),Al(E,E.return);break;case 27:Q0(E);case 26:case 5:_i(h,E,o),o&&u===null&&D&4&&z0(E),Al(E,E.return);break;case 12:_i(h,E,o);break;case 13:_i(h,E,o),o&&D&4&&Y0(h,E);break;case 22:E.memoizedState===null&&_i(h,E,o),Al(E,E.return);break;case 30:break;default:_i(h,E,o)}r=r.sibling}}function xg(a,r){var o=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==o&&(a!=null&&a.refCount++,o!=null&&al(o))}function Tg(a,r){a=null,r.alternate!==null&&(a=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==a&&(r.refCount++,a!=null&&al(a))}function Lr(a,r,o,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)$0(a,r,o,u),r=r.sibling}function $0(a,r,o,u){var h=r.flags;switch(r.tag){case 0:case 11:case 15:Lr(a,r,o,u),h&2048&&pl(9,r);break;case 1:Lr(a,r,o,u);break;case 3:Lr(a,r,o,u),h&2048&&(a=null,r.alternate!==null&&(a=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==a&&(r.refCount++,a!=null&&al(a)));break;case 12:if(h&2048){Lr(a,r,o,u),a=r.stateNode;try{var E=r.memoizedProps,D=E.id,j=E.onPostCommit;typeof j=="function"&&j(D,r.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch($){ga(r,r.return,$)}}else Lr(a,r,o,u);break;case 13:Lr(a,r,o,u);break;case 23:break;case 22:E=r.stateNode,D=r.alternate,r.memoizedState!==null?E._visibility&2?Lr(a,r,o,u):yl(a,r):E._visibility&2?Lr(a,r,o,u):(E._visibility|=2,ro(a,r,o,u,(r.subtreeFlags&10256)!==0)),h&2048&&xg(D,r);break;case 24:Lr(a,r,o,u),h&2048&&Tg(r.alternate,r);break;default:Lr(a,r,o,u)}}function ro(a,r,o,u,h){for(h=h&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var E=a,D=r,j=o,$=u,fe=D.flags;switch(D.tag){case 0:case 11:case 15:ro(E,D,j,$,h),pl(8,D);break;case 23:break;case 22:var xe=D.stateNode;D.memoizedState!==null?xe._visibility&2?ro(E,D,j,$,h):yl(E,D):(xe._visibility|=2,ro(E,D,j,$,h)),h&&fe&2048&&xg(D.alternate,D);break;case 24:ro(E,D,j,$,h),h&&fe&2048&&Tg(D.alternate,D);break;default:ro(E,D,j,$,h)}r=r.sibling}}function yl(a,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var o=a,u=r,h=u.flags;switch(u.tag){case 22:yl(o,u),h&2048&&xg(u.alternate,u);break;case 24:yl(o,u),h&2048&&Tg(u.alternate,u);break;default:yl(o,u)}r=r.sibling}}var El=8192;function io(a){if(a.subtreeFlags&El)for(a=a.child;a!==null;)Z0(a),a=a.sibling}function Z0(a){switch(a.tag){case 26:io(a),a.flags&El&&a.memoizedState!==null&&oS(pr,a.memoizedState,a.memoizedProps);break;case 5:io(a);break;case 3:case 4:var r=pr;pr=kd(a.stateNode.containerInfo),io(a),pr=r;break;case 22:a.memoizedState===null&&(r=a.alternate,r!==null&&r.memoizedState!==null?(r=El,El=16777216,io(a),El=r):io(a));break;default:io(a)}}function ey(a){var r=a.alternate;if(r!==null&&(a=r.child,a!==null)){r.child=null;do r=a.sibling,a.sibling=null,a=r;while(a!==null)}}function bl(a){var r=a.deletions;if((a.flags&16)!==0){if(r!==null)for(var o=0;o<r.length;o++){var u=r[o];$a=u,ay(u,a)}ey(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)ty(a),a=a.sibling}function ty(a){switch(a.tag){case 0:case 11:case 15:bl(a),a.flags&2048&&Ui(9,a,a.return);break;case 3:bl(a);break;case 12:bl(a);break;case 22:var r=a.stateNode;a.memoizedState!==null&&r._visibility&2&&(a.return===null||a.return.tag!==13)?(r._visibility&=-3,Ad(a)):bl(a);break;default:bl(a)}}function Ad(a){var r=a.deletions;if((a.flags&16)!==0){if(r!==null)for(var o=0;o<r.length;o++){var u=r[o];$a=u,ay(u,a)}ey(a)}for(a=a.child;a!==null;){switch(r=a,r.tag){case 0:case 11:case 15:Ui(8,r,r.return),Ad(r);break;case 22:o=r.stateNode,o._visibility&2&&(o._visibility&=-3,Ad(r));break;default:Ad(r)}a=a.sibling}}function ay(a,r){for(;$a!==null;){var o=$a;switch(o.tag){case 0:case 11:case 15:Ui(8,o,r);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:al(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,$a=u;else e:for(o=a;$a!==null;){u=$a;var h=u.sibling,E=u.return;if(q0(u),u===o){$a=null;break e}if(h!==null){h.return=E,$a=h;break e}$a=E}}}var wC={getCacheForType:function(a){var r=An(Va),o=r.data.get(a);return o===void 0&&(o=a(),r.data.set(a,o)),o}},CC=typeof WeakMap=="function"?WeakMap:Map,aa=0,ha=null,Pt=null,qt=0,na=0,Kn=null,Fi=!1,so=!1,kg=!1,li=0,xa=0,Oi=0,ws=0,Lg=0,lr=0,oo=0,vl=null,Bn=null,Dg=!1,Rg=0,yd=1/0,Ed=null,ji=null,ln=0,Pi=null,lo=null,co=0,Bg=0,Ug=null,ny=null,Il=0,Mg=null;function Gn(){if((aa&2)!==0&&qt!==0)return qt&-qt;if(W.T!==null){var a=Js;return a!==0?a:zg()}return ka()}function ry(){lr===0&&(lr=(qt&536870912)===0||Xt?gr():536870912);var a=or.current;return a!==null&&(a.flags|=32),lr}function qn(a,r,o){(a===ha&&(na===2||na===9)||a.cancelPendingCommit!==null)&&(uo(a,0),Hi(a,qt,lr,!1)),Rt(a,o),((aa&2)===0||a!==ha)&&(a===ha&&((aa&2)===0&&(ws|=o),xa===4&&Hi(a,qt,lr,!1)),Dr(a))}function iy(a,r,o){if((aa&6)!==0)throw Error(i(327));var u=!o&&(r&124)===0&&(r&a.expiredLanes)===0||St(a,r),h=u?xC(a,r):Og(a,r,!0),E=u;do{if(h===0){so&&!u&&Hi(a,r,0,!1);break}else{if(o=a.current.alternate,E&&!SC(o)){h=Og(a,r,!1),E=!1;continue}if(h===2){if(E=r,a.errorRecoveryDisabledLanes&E)var D=0;else D=a.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){r=D;e:{var j=a;h=vl;var $=j.current.memoizedState.isDehydrated;if($&&(uo(j,D).flags|=256),D=Og(j,D,!1),D!==2){if(kg&&!$){j.errorRecoveryDisabledLanes|=E,ws|=E,h=4;break e}E=Bn,Bn=h,E!==null&&(Bn===null?Bn=E:Bn.push.apply(Bn,E))}h=D}if(E=!1,h!==2)continue}}if(h===1){uo(a,0),Hi(a,r,0,!0);break}e:{switch(u=a,E=h,E){case 0:case 1:throw Error(i(345));case 4:if((r&4194048)!==r)break;case 6:Hi(u,r,lr,!Fi);break e;case 2:Bn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((r&62914560)===r&&(h=Rg+300-Fe(),10<h)){if(Hi(u,r,lr,!Fi),gt(u,0,!0)!==0)break e;u.timeoutHandle=Uy(sy.bind(null,u,o,Bn,Ed,Dg,r,lr,ws,oo,Fi,E,2,-0,0),h);break e}sy(u,o,Bn,Ed,Dg,r,lr,ws,oo,Fi,E,0,-0,0)}}break}while(!0);Dr(a)}function sy(a,r,o,u,h,E,D,j,$,fe,xe,Re,Ae,ye){if(a.timeoutHandle=-1,Re=r.subtreeFlags,(Re&8192||(Re&16785408)===16785408)&&(kl={stylesheets:null,count:0,unsuspend:sS},Z0(r),Re=lS(),Re!==null)){a.cancelPendingCommit=Re(gy.bind(null,a,r,E,o,u,h,D,j,$,xe,1,Ae,ye)),Hi(a,E,D,!fe);return}gy(a,r,E,o,u,h,D,j,$)}function SC(a){for(var r=a;;){var o=r.tag;if((o===0||o===11||o===15)&&r.flags&16384&&(o=r.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var h=o[u],E=h.getSnapshot;h=h.value;try{if(!Hn(E(),h))return!1}catch{return!1}}if(o=r.child,r.subtreeFlags&16384&&o!==null)o.return=r,r=o;else{if(r===a)break;for(;r.sibling===null;){if(r.return===null||r.return===a)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Hi(a,r,o,u){r&=~Lg,r&=~ws,a.suspendedLanes|=r,a.pingedLanes&=~r,u&&(a.warmLanes|=r),u=a.expirationTimes;for(var h=r;0<h;){var E=31-S(h),D=1<<E;u[E]=-1,h&=~D}o!==0&&Me(a,o,r)}function bd(){return(aa&6)===0?(wl(0),!1):!0}function _g(){if(Pt!==null){if(na===0)var a=Pt.return;else a=Pt,ei=As=null,Zm(a),ao=null,gl=0,a=Pt;for(;a!==null;)j0(a.alternate,a),a=a.return;Pt=null}}function uo(a,r){var o=a.timeoutHandle;o!==-1&&(a.timeoutHandle=-1,VC(o)),o=a.cancelPendingCommit,o!==null&&(a.cancelPendingCommit=null,o()),_g(),ha=a,Pt=o=Xr(a.current,null),qt=r,na=0,Kn=null,Fi=!1,so=St(a,r),kg=!1,oo=lr=Lg=ws=Oi=xa=0,Bn=vl=null,Dg=!1,(r&8)!==0&&(r|=r&32);var u=a.entangledLanes;if(u!==0)for(a=a.entanglements,u&=r;0<u;){var h=31-S(u),E=1<<h;r|=a[h],u&=~E}return li=r,zc(),o}function oy(a,r){Dt=null,W.H=od,r===rl||r===Xc?(r=CA(),na=3):r===vA?(r=CA(),na=4):na=r===S0?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Kn=r,Pt===null&&(xa=1,md(a,nr(r,a.current)))}function ly(){var a=W.H;return W.H=od,a===null?od:a}function cy(){var a=W.A;return W.A=wC,a}function Fg(){xa=4,Fi||(qt&4194048)!==qt&&or.current!==null||(so=!0),(Oi&134217727)===0&&(ws&134217727)===0||ha===null||Hi(ha,qt,lr,!1)}function Og(a,r,o){var u=aa;aa|=2;var h=ly(),E=cy();(ha!==a||qt!==r)&&(Ed=null,uo(a,r)),r=!1;var D=xa;e:do try{if(na!==0&&Pt!==null){var j=Pt,$=Kn;switch(na){case 8:_g(),D=6;break e;case 3:case 2:case 9:case 6:or.current===null&&(r=!0);var fe=na;if(na=0,Kn=null,mo(a,j,$,fe),o&&so){D=0;break e}break;default:fe=na,na=0,Kn=null,mo(a,j,$,fe)}}NC(),D=xa;break}catch(xe){oy(a,xe)}while(!0);return r&&a.shellSuspendCounter++,ei=As=null,aa=u,W.H=h,W.A=E,Pt===null&&(ha=null,qt=0,zc()),D}function NC(){for(;Pt!==null;)dy(Pt)}function xC(a,r){var o=aa;aa|=2;var u=ly(),h=cy();ha!==a||qt!==r?(Ed=null,yd=Fe()+500,uo(a,r)):so=St(a,r);e:do try{if(na!==0&&Pt!==null){r=Pt;var E=Kn;t:switch(na){case 1:na=0,Kn=null,mo(a,r,E,1);break;case 2:case 9:if(IA(E)){na=0,Kn=null,uy(r);break}r=function(){na!==2&&na!==9||ha!==a||(na=7),Dr(a)},E.then(r,r);break e;case 3:na=7;break e;case 4:na=5;break e;case 7:IA(E)?(na=0,Kn=null,uy(r)):(na=0,Kn=null,mo(a,r,E,7));break;case 5:var D=null;switch(Pt.tag){case 26:D=Pt.memoizedState;case 5:case 27:var j=Pt;if(!D||Gy(D)){na=0,Kn=null;var $=j.sibling;if($!==null)Pt=$;else{var fe=j.return;fe!==null?(Pt=fe,vd(fe)):Pt=null}break t}}na=0,Kn=null,mo(a,r,E,5);break;case 6:na=0,Kn=null,mo(a,r,E,6);break;case 8:_g(),xa=6;break e;default:throw Error(i(462))}}TC();break}catch(xe){oy(a,xe)}while(!0);return ei=As=null,W.H=u,W.A=h,aa=o,Pt!==null?0:(ha=null,qt=0,zc(),xa)}function TC(){for(;Pt!==null&&!Ft();)dy(Pt)}function dy(a){var r=F0(a.alternate,a,li);a.memoizedProps=a.pendingProps,r===null?vd(a):Pt=r}function uy(a){var r=a,o=r.alternate;switch(r.tag){case 15:case 0:r=D0(o,r,r.pendingProps,r.type,void 0,qt);break;case 11:r=D0(o,r,r.pendingProps,r.type.render,r.ref,qt);break;case 5:Zm(r);default:j0(o,r),r=Pt=mA(r,li),r=F0(o,r,li)}a.memoizedProps=a.pendingProps,r===null?vd(a):Pt=r}function mo(a,r,o,u){ei=As=null,Zm(r),ao=null,gl=0;var h=r.return;try{if(AC(a,h,r,o,qt)){xa=1,md(a,nr(o,a.current)),Pt=null;return}}catch(E){if(h!==null)throw Pt=h,E;xa=1,md(a,nr(o,a.current)),Pt=null;return}r.flags&32768?(Xt||u===1?a=!0:so||(qt&536870912)!==0?a=!1:(Fi=a=!0,(u===2||u===9||u===3||u===6)&&(u=or.current,u!==null&&u.tag===13&&(u.flags|=16384))),my(r,a)):vd(r)}function vd(a){var r=a;do{if((r.flags&32768)!==0){my(r,Fi);return}a=r.return;var o=EC(r.alternate,r,li);if(o!==null){Pt=o;return}if(r=r.sibling,r!==null){Pt=r;return}Pt=r=a}while(r!==null);xa===0&&(xa=5)}function my(a,r){do{var o=bC(a.alternate,a);if(o!==null){o.flags&=32767,Pt=o;return}if(o=a.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!r&&(a=a.sibling,a!==null)){Pt=a;return}Pt=a=o}while(a!==null);xa=6,Pt=null}function gy(a,r,o,u,h,E,D,j,$){a.cancelPendingCommit=null;do Id();while(ln!==0);if((aa&6)!==0)throw Error(i(327));if(r!==null){if(r===a.current)throw Error(i(177));if(E=r.lanes|r.childLanes,E|=Tm,ta(a,o,E,D,j,$),a===ha&&(Pt=ha=null,qt=0),lo=r,Pi=a,co=o,Bg=E,Ug=h,ny=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,RC(He,function(){return yy(),null})):(a.callbackNode=null,a.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=W.T,W.T=null,h=ae.p,ae.p=2,D=aa,aa|=4;try{vC(a,r,o)}finally{aa=D,ae.p=h,W.T=u}}ln=1,fy(),hy(),py()}}function fy(){if(ln===1){ln=0;var a=Pi,r=lo,o=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||o){o=W.T,W.T=null;var u=ae.p;ae.p=2;var h=aa;aa|=4;try{J0(r,a);var E=Jg,D=aA(a.containerInfo),j=E.focusedElem,$=E.selectionRange;if(D!==j&&j&&j.ownerDocument&&tA(j.ownerDocument.documentElement,j)){if($!==null&&wm(j)){var fe=$.start,xe=$.end;if(xe===void 0&&(xe=fe),"selectionStart"in j)j.selectionStart=fe,j.selectionEnd=Math.min(xe,j.value.length);else{var Re=j.ownerDocument||document,Ae=Re&&Re.defaultView||window;if(Ae.getSelection){var ye=Ae.getSelection(),ft=j.textContent.length,ot=Math.min($.start,ft),la=$.end===void 0?ot:Math.min($.end,ft);!ye.extend&&ot>la&&(D=la,la=ot,ot=D);var le=eA(j,ot),ie=eA(j,la);if(le&&ie&&(ye.rangeCount!==1||ye.anchorNode!==le.node||ye.anchorOffset!==le.offset||ye.focusNode!==ie.node||ye.focusOffset!==ie.offset)){var ge=Re.createRange();ge.setStart(le.node,le.offset),ye.removeAllRanges(),ot>la?(ye.addRange(ge),ye.extend(ie.node,ie.offset)):(ge.setEnd(ie.node,ie.offset),ye.addRange(ge))}}}}for(Re=[],ye=j;ye=ye.parentNode;)ye.nodeType===1&&Re.push({element:ye,left:ye.scrollLeft,top:ye.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<Re.length;j++){var Le=Re[j];Le.element.scrollLeft=Le.left,Le.element.scrollTop=Le.top}}Ud=!!Yg,Jg=Yg=null}finally{aa=h,ae.p=u,W.T=o}}a.current=r,ln=2}}function hy(){if(ln===2){ln=0;var a=Pi,r=lo,o=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||o){o=W.T,W.T=null;var u=ae.p;ae.p=2;var h=aa;aa|=4;try{G0(a,r.alternate,r)}finally{aa=h,ae.p=u,W.T=o}}ln=3}}function py(){if(ln===4||ln===3){ln=0,Se();var a=Pi,r=lo,o=co,u=ny;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?ln=5:(ln=0,lo=Pi=null,Ay(a,a.pendingLanes));var h=a.pendingLanes;if(h===0&&(ji=null),kt(o),r=r.stateNode,M&&typeof M.onCommitFiberRoot=="function")try{M.onCommitFiberRoot(Yt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=W.T,h=ae.p,ae.p=2,W.T=null;try{for(var E=a.onRecoverableError,D=0;D<u.length;D++){var j=u[D];E(j.value,{componentStack:j.stack})}}finally{W.T=r,ae.p=h}}(co&3)!==0&&Id(),Dr(a),h=a.pendingLanes,(o&4194090)!==0&&(h&42)!==0?a===Mg?Il++:(Il=0,Mg=a):Il=0,wl(0)}}function Ay(a,r){(a.pooledCacheLanes&=r)===0&&(r=a.pooledCache,r!=null&&(a.pooledCache=null,al(r)))}function Id(a){return fy(),hy(),py(),yy()}function yy(){if(ln!==5)return!1;var a=Pi,r=Bg;Bg=0;var o=kt(co),u=W.T,h=ae.p;try{ae.p=32>o?32:o,W.T=null,o=Ug,Ug=null;var E=Pi,D=co;if(ln=0,lo=Pi=null,co=0,(aa&6)!==0)throw Error(i(331));var j=aa;if(aa|=4,ty(E.current),$0(E,E.current,D,o),aa=j,wl(0,!1),M&&typeof M.onPostCommitFiberRoot=="function")try{M.onPostCommitFiberRoot(Yt,E)}catch{}return!0}finally{ae.p=h,W.T=u,Ay(a,r)}}function Ey(a,r,o){r=nr(o,r),r=gg(a.stateNode,r,2),a=Li(a,r,2),a!==null&&(Rt(a,2),Dr(a))}function ga(a,r,o){if(a.tag===3)Ey(a,a,o);else for(;r!==null;){if(r.tag===3){Ey(r,a,o);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ji===null||!ji.has(u))){a=nr(o,a),o=w0(2),u=Li(r,o,2),u!==null&&(C0(o,u,r,a),Rt(u,2),Dr(u));break}}r=r.return}}function jg(a,r,o){var u=a.pingCache;if(u===null){u=a.pingCache=new CC;var h=new Set;u.set(r,h)}else h=u.get(r),h===void 0&&(h=new Set,u.set(r,h));h.has(o)||(kg=!0,h.add(o),a=kC.bind(null,a,r,o),r.then(a,a))}function kC(a,r,o){var u=a.pingCache;u!==null&&u.delete(r),a.pingedLanes|=a.suspendedLanes&o,a.warmLanes&=~o,ha===a&&(qt&o)===o&&(xa===4||xa===3&&(qt&62914560)===qt&&300>Fe()-Rg?(aa&2)===0&&uo(a,0):Lg|=o,oo===qt&&(oo=0)),Dr(a)}function by(a,r){r===0&&(r=ca()),a=Gs(a,r),a!==null&&(Rt(a,r),Dr(a))}function LC(a){var r=a.memoizedState,o=0;r!==null&&(o=r.retryLane),by(a,o)}function DC(a,r){var o=0;switch(a.tag){case 13:var u=a.stateNode,h=a.memoizedState;h!==null&&(o=h.retryLane);break;case 19:u=a.stateNode;break;case 22:u=a.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(r),by(a,o)}function RC(a,r){return it(a,r)}var wd=null,go=null,Pg=!1,Cd=!1,Hg=!1,Cs=0;function Dr(a){a!==go&&a.next===null&&(go===null?wd=go=a:go=go.next=a),Cd=!0,Pg||(Pg=!0,UC())}function wl(a,r){if(!Hg&&Cd){Hg=!0;do for(var o=!1,u=wd;u!==null;){if(a!==0){var h=u.pendingLanes;if(h===0)var E=0;else{var D=u.suspendedLanes,j=u.pingedLanes;E=(1<<31-S(42|a)+1)-1,E&=h&~(D&~j),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(o=!0,Cy(u,E))}else E=qt,E=gt(u,u===ha?E:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(E&3)===0||St(u,E)||(o=!0,Cy(u,E));u=u.next}while(o);Hg=!1}}function BC(){vy()}function vy(){Cd=Pg=!1;var a=0;Cs!==0&&(zC()&&(a=Cs),Cs=0);for(var r=Fe(),o=null,u=wd;u!==null;){var h=u.next,E=Iy(u,r);E===0?(u.next=null,o===null?wd=h:o.next=h,h===null&&(go=o)):(o=u,(a!==0||(E&3)!==0)&&(Cd=!0)),u=h}wl(a)}function Iy(a,r){for(var o=a.suspendedLanes,u=a.pingedLanes,h=a.expirationTimes,E=a.pendingLanes&-62914561;0<E;){var D=31-S(E),j=1<<D,$=h[D];$===-1?((j&o)===0||(j&u)!==0)&&(h[D]=pt(j,r)):$<=r&&(a.expiredLanes|=j),E&=~j}if(r=ha,o=qt,o=gt(a,a===r?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),u=a.callbackNode,o===0||a===r&&(na===2||na===9)||a.cancelPendingCommit!==null)return u!==null&&u!==null&&Ge(u),a.callbackNode=null,a.callbackPriority=0;if((o&3)===0||St(a,o)){if(r=o&-o,r===a.callbackPriority)return r;switch(u!==null&&Ge(u),kt(o)){case 2:case 8:o=Ve;break;case 32:o=He;break;case 268435456:o=It;break;default:o=He}return u=wy.bind(null,a),o=it(o,u),a.callbackPriority=r,a.callbackNode=o,r}return u!==null&&u!==null&&Ge(u),a.callbackPriority=2,a.callbackNode=null,2}function wy(a,r){if(ln!==0&&ln!==5)return a.callbackNode=null,a.callbackPriority=0,null;var o=a.callbackNode;if(Id()&&a.callbackNode!==o)return null;var u=qt;return u=gt(a,a===ha?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),u===0?null:(iy(a,u,r),Iy(a,Fe()),a.callbackNode!=null&&a.callbackNode===o?wy.bind(null,a):null)}function Cy(a,r){if(Id())return null;iy(a,r,!0)}function UC(){QC(function(){(aa&6)!==0?it(De,BC):vy()})}function zg(){return Cs===0&&(Cs=gr()),Cs}function Sy(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Tn(""+a)}function Ny(a,r){var o=r.ownerDocument.createElement("input");return o.name=r.name,o.value=r.value,a.id&&o.setAttribute("form",a.id),r.parentNode.insertBefore(o,r),a=new FormData(a),o.parentNode.removeChild(o),a}function MC(a,r,o,u,h){if(r==="submit"&&o&&o.stateNode===h){var E=Sy((h[Gt]||null).action),D=u.submitter;D&&(r=(r=D[Gt]||null)?Sy(r.formAction):D.getAttribute("formAction"),r!==null&&(E=r,D=null));var j=new vt("action","action",null,u,h);a.push({event:j,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Cs!==0){var $=D?Ny(h,D):new FormData(h);lg(o,{pending:!0,data:$,method:h.method,action:E},null,$)}}else typeof E=="function"&&(j.preventDefault(),$=D?Ny(h,D):new FormData(h),lg(o,{pending:!0,data:$,method:h.method,action:E},E,$))},currentTarget:h}]})}}for(var Vg=0;Vg<xm.length;Vg++){var Qg=xm[Vg],_C=Qg.toLowerCase(),FC=Qg[0].toUpperCase()+Qg.slice(1);hr(_C,"on"+FC)}hr(iA,"onAnimationEnd"),hr(sA,"onAnimationIteration"),hr(oA,"onAnimationStart"),hr("dblclick","onDoubleClick"),hr("focusin","onFocus"),hr("focusout","onBlur"),hr(eC,"onTransitionRun"),hr(tC,"onTransitionStart"),hr(aC,"onTransitionCancel"),hr(lA,"onTransitionEnd"),ke("onMouseEnter",["mouseout","mouseover"]),ke("onMouseLeave",["mouseout","mouseover"]),ke("onPointerEnter",["pointerout","pointerover"]),ke("onPointerLeave",["pointerout","pointerover"]),J("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),J("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),J("onBeforeInput",["compositionend","keypress","textInput","paste"]),J("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),J("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),J("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),OC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cl));function xy(a,r){r=(r&4)!==0;for(var o=0;o<a.length;o++){var u=a[o],h=u.event;u=u.listeners;e:{var E=void 0;if(r)for(var D=u.length-1;0<=D;D--){var j=u[D],$=j.instance,fe=j.currentTarget;if(j=j.listener,$!==E&&h.isPropagationStopped())break e;E=j,h.currentTarget=fe;try{E(h)}catch(xe){ud(xe)}h.currentTarget=null,E=$}else for(D=0;D<u.length;D++){if(j=u[D],$=j.instance,fe=j.currentTarget,j=j.listener,$!==E&&h.isPropagationStopped())break e;E=j,h.currentTarget=fe;try{E(h)}catch(xe){ud(xe)}h.currentTarget=null,E=$}}}}function Ht(a,r){var o=r[pa];o===void 0&&(o=r[pa]=new Set);var u=a+"__bubble";o.has(u)||(Ty(r,a,2,!1),o.add(u))}function Kg(a,r,o){var u=0;r&&(u|=4),Ty(o,a,u,r)}var Sd="_reactListening"+Math.random().toString(36).slice(2);function Gg(a){if(!a[Sd]){a[Sd]=!0,Bt.forEach(function(o){o!=="selectionchange"&&(OC.has(o)||Kg(o,!1,a),Kg(o,!0,a))});var r=a.nodeType===9?a:a.ownerDocument;r===null||r[Sd]||(r[Sd]=!0,Kg("selectionchange",!1,r))}}function Ty(a,r,o,u){switch($y(r)){case 2:var h=uS;break;case 8:h=mS;break;default:h=of}o=h.bind(null,r,o,a),h=void 0,!tr||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),u?h!==void 0?a.addEventListener(r,o,{capture:!0,passive:h}):a.addEventListener(r,o,!0):h!==void 0?a.addEventListener(r,o,{passive:h}):a.addEventListener(r,o,!1)}function qg(a,r,o,u,h){var E=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var D=u.tag;if(D===3||D===4){var j=u.stateNode.containerInfo;if(j===h)break;if(D===4)for(D=u.return;D!==null;){var $=D.tag;if(($===3||$===4)&&D.stateNode.containerInfo===h)return;D=D.return}for(;j!==null;){if(D=oe(j),D===null)return;if($=D.tag,$===5||$===6||$===26||$===27){u=E=D;continue e}j=j.parentNode}}u=u.return}Ko(function(){var fe=E,xe=Yr(o),Re=[];e:{var Ae=cA.get(a);if(Ae!==void 0){var ye=vt,ft=a;switch(a){case"keypress":if(H(o)===0)break e;case"keydown":case"keyup":ye=um;break;case"focusin":ft="focus",ye=Go;break;case"focusout":ft="blur",ye=Go;break;case"beforeblur":case"afterblur":ye=Go;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":ye=Mc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=Zu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=gm;break;case iA:case sA:case oA:ye=am;break;case lA:ye=hm;break;case"scroll":case"scrollend":ye=Ea;break;case"wheel":ye=jc;break;case"copy":case"cut":case"paste":ye=rm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=Oc;break;case"toggle":case"beforetoggle":ye=ym}var ot=(r&4)!==0,la=!ot&&(a==="scroll"||a==="scrollend"),le=ot?Ae!==null?Ae+"Capture":null:Ae;ot=[];for(var ie=fe,ge;ie!==null;){var Le=ie;if(ge=Le.stateNode,Le=Le.tag,Le!==5&&Le!==26&&Le!==27||ge===null||le===null||(Le=Ci(ie,le),Le!=null&&ot.push(Sl(ie,Le,ge))),la)break;ie=ie.return}0<ot.length&&(Ae=new ye(Ae,ft,null,o,xe),Re.push({event:Ae,listeners:ot}))}}if((r&7)===0){e:{if(Ae=a==="mouseover"||a==="pointerover",ye=a==="mouseout"||a==="pointerout",Ae&&o!==er&&(ft=o.relatedTarget||o.fromElement)&&(oe(ft)||ft[Vt]))break e;if((ye||Ae)&&(Ae=xe.window===xe?xe:(Ae=xe.ownerDocument)?Ae.defaultView||Ae.parentWindow:window,ye?(ft=o.relatedTarget||o.toElement,ye=fe,ft=ft?oe(ft):null,ft!==null&&(la=l(ft),ot=ft.tag,ft!==la||ot!==5&&ot!==27&&ot!==6)&&(ft=null)):(ye=null,ft=fe),ye!==ft)){if(ot=Mc,Le="onMouseLeave",le="onMouseEnter",ie="mouse",(a==="pointerout"||a==="pointerover")&&(ot=Oc,Le="onPointerLeave",le="onPointerEnter",ie="pointer"),la=ye==null?Ae:Qe(ye),ge=ft==null?Ae:Qe(ft),Ae=new ot(Le,ie+"leave",ye,o,xe),Ae.target=la,Ae.relatedTarget=ge,Le=null,oe(xe)===fe&&(ot=new ot(le,ie+"enter",ft,o,xe),ot.target=ge,ot.relatedTarget=la,Le=ot),la=Le,ye&&ft)t:{for(ot=ye,le=ft,ie=0,ge=ot;ge;ge=fo(ge))ie++;for(ge=0,Le=le;Le;Le=fo(Le))ge++;for(;0<ie-ge;)ot=fo(ot),ie--;for(;0<ge-ie;)le=fo(le),ge--;for(;ie--;){if(ot===le||le!==null&&ot===le.alternate)break t;ot=fo(ot),le=fo(le)}ot=null}else ot=null;ye!==null&&ky(Re,Ae,ye,ot,!1),ft!==null&&la!==null&&ky(Re,la,ft,ot,!0)}}e:{if(Ae=fe?Qe(fe):window,ye=Ae.nodeName&&Ae.nodeName.toLowerCase(),ye==="select"||ye==="input"&&Ae.type==="file")var Je=Wp;else if(pn(Ae))if(Yp)Je=Xw;else{Je=Yw;var Ut=Ww}else ye=Ae.nodeName,!ye||ye.toLowerCase()!=="input"||Ae.type!=="checkbox"&&Ae.type!=="radio"?fe&&vi(fe.elementType)&&(Je=Wp):Je=Jw;if(Je&&(Je=Je(a,fe))){Ln(Re,Je,o,xe);break e}Ut&&Ut(a,Ae,fe),a==="focusout"&&fe&&Ae.type==="number"&&fe.memoizedProps.value!=null&&js(Ae,"number",Ae.value)}switch(Ut=fe?Qe(fe):window,a){case"focusin":(pn(Ut)||Ut.contentEditable==="true")&&(Vs=Ut,Cm=fe,Xo=null);break;case"focusout":Xo=Cm=Vs=null;break;case"mousedown":Sm=!0;break;case"contextmenu":case"mouseup":case"dragend":Sm=!1,nA(Re,o,xe);break;case"selectionchange":if(Zw)break;case"keydown":case"keyup":nA(Re,o,xe)}var rt;if(Si)e:{switch(a){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else dt?Ye(a,o)&&(ut="onCompositionEnd"):a==="keydown"&&o.keyCode===229&&(ut="onCompositionStart");ut&&(Yo&&o.locale!=="ko"&&(dt||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&dt&&(rt=R()):(ar=xe,y="value"in ar?ar.value:ar.textContent,dt=!0)),Ut=Nd(fe,ut),0<Ut.length&&(ut=new qo(ut,a,null,o,xe),Re.push({event:ut,listeners:Ut}),rt?ut.data=rt:(rt=st(o),rt!==null&&(ut.data=rt)))),(rt=Pc?Jt(a,o):jn(a,o))&&(ut=Nd(fe,"onBeforeInput"),0<ut.length&&(Ut=new qo("onBeforeInput","beforeinput",null,o,xe),Re.push({event:Ut,listeners:ut}),Ut.data=rt)),MC(Re,a,fe,o,xe)}xy(Re,r)})}function Sl(a,r,o){return{instance:a,listener:r,currentTarget:o}}function Nd(a,r){for(var o=r+"Capture",u=[];a!==null;){var h=a,E=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||E===null||(h=Ci(a,o),h!=null&&u.unshift(Sl(a,h,E)),h=Ci(a,r),h!=null&&u.push(Sl(a,h,E))),a.tag===3)return u;a=a.return}return[]}function fo(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function ky(a,r,o,u,h){for(var E=r._reactName,D=[];o!==null&&o!==u;){var j=o,$=j.alternate,fe=j.stateNode;if(j=j.tag,$!==null&&$===u)break;j!==5&&j!==26&&j!==27||fe===null||($=fe,h?(fe=Ci(o,E),fe!=null&&D.unshift(Sl(o,fe,$))):h||(fe=Ci(o,E),fe!=null&&D.push(Sl(o,fe,$)))),o=o.return}D.length!==0&&a.push({event:r,listeners:D})}var jC=/\r\n?/g,PC=/\u0000|\uFFFD/g;function Ly(a){return(typeof a=="string"?a:""+a).replace(jC,`
`).replace(PC,"")}function Dy(a,r){return r=Ly(r),Ly(a)===r}function xd(){}function oa(a,r,o,u,h,E){switch(o){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Nr(a,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Nr(a,""+u);break;case"className":za(a,"class",u);break;case"tabIndex":za(a,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":za(a,o,u);break;case"style":os(a,u,E);break;case"data":if(r!=="object"){za(a,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||o!=="href")){a.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){a.removeAttribute(o);break}u=Tn(""+u),a.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){a.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 E=="function"&&(o==="formAction"?(r!=="input"&&oa(a,r,"name",h.name,h,null),oa(a,r,"formEncType",h.formEncType,h,null),oa(a,r,"formMethod",h.formMethod,h,null),oa(a,r,"formTarget",h.formTarget,h,null)):(oa(a,r,"encType",h.encType,h,null),oa(a,r,"method",h.method,h,null),oa(a,r,"target",h.target,h,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){a.removeAttribute(o);break}u=Tn(""+u),a.setAttribute(o,u);break;case"onClick":u!=null&&(a.onclick=xd);break;case"onScroll":u!=null&&Ht("scroll",a);break;case"onScrollEnd":u!=null&&Ht("scrollend",a);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));a.innerHTML=o}}break;case"multiple":a.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":a.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"){a.removeAttribute("xlink:href");break}o=Tn(""+u),a.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"?a.setAttribute(o,""+u):a.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"?a.setAttribute(o,""):a.removeAttribute(o);break;case"capture":case"download":u===!0?a.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?a.setAttribute(o,u):a.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?a.setAttribute(o,u):a.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?a.removeAttribute(o):a.setAttribute(o,u);break;case"popover":Ht("beforetoggle",a),Ht("toggle",a),ra(a,"popover",u);break;case"xlinkActuate":La(a,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":La(a,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":La(a,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":La(a,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":La(a,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":La(a,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":La(a,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":La(a,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":La(a,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":ra(a,"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=Wr.get(o)||o,ra(a,o,u))}}function Wg(a,r,o,u,h,E){switch(o){case"style":os(a,u,E);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));a.innerHTML=o}}break;case"children":typeof u=="string"?Nr(a,u):(typeof u=="number"||typeof u=="bigint")&&Nr(a,""+u);break;case"onScroll":u!=null&&Ht("scroll",a);break;case"onScrollEnd":u!=null&&Ht("scrollend",a);break;case"onClick":u!=null&&(a.onclick=xd);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ue.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(h=o.endsWith("Capture"),r=o.slice(2,h?o.length-7:void 0),E=a[Gt]||null,E=E!=null?E[o]:null,typeof E=="function"&&a.removeEventListener(r,E,h),typeof u=="function")){typeof E!="function"&&E!==null&&(o in a?a[o]=null:a.hasAttribute(o)&&a.removeAttribute(o)),a.addEventListener(r,u,h);break e}o in a?a[o]=u:u===!0?a.setAttribute(o,""):ra(a,o,u)}}}function cn(a,r,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ht("error",a),Ht("load",a);var u=!1,h=!1,E;for(E in o)if(o.hasOwnProperty(E)){var D=o[E];if(D!=null)switch(E){case"src":u=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:oa(a,r,E,D,o,null)}}h&&oa(a,r,"srcSet",o.srcSet,o,null),u&&oa(a,r,"src",o.src,o,null);return;case"input":Ht("invalid",a);var j=E=D=h=null,$=null,fe=null;for(u in o)if(o.hasOwnProperty(u)){var xe=o[u];if(xe!=null)switch(u){case"name":h=xe;break;case"type":D=xe;break;case"checked":$=xe;break;case"defaultChecked":fe=xe;break;case"value":E=xe;break;case"defaultValue":j=xe;break;case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(i(137,r));break;default:oa(a,r,u,xe,o,null)}}Ei(a,E,j,$,fe,D,h,!1),Gr(a);return;case"select":Ht("invalid",a),u=D=E=null;for(h in o)if(o.hasOwnProperty(h)&&(j=o[h],j!=null))switch(h){case"value":E=j;break;case"defaultValue":D=j;break;case"multiple":u=j;default:oa(a,r,h,j,o,null)}r=E,o=D,a.multiple=!!u,r!=null?bi(a,!!u,r,!1):o!=null&&bi(a,!!u,o,!0);return;case"textarea":Ht("invalid",a),E=h=u=null;for(D in o)if(o.hasOwnProperty(D)&&(j=o[D],j!=null))switch(D){case"value":u=j;break;case"defaultValue":h=j;break;case"children":E=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(i(91));break;default:oa(a,r,D,j,o,null)}zo(a,u,h,E),Gr(a);return;case"option":for($ in o)if(o.hasOwnProperty($)&&(u=o[$],u!=null))switch($){case"selected":a.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:oa(a,r,$,u,o,null)}return;case"dialog":Ht("beforetoggle",a),Ht("toggle",a),Ht("cancel",a),Ht("close",a);break;case"iframe":case"object":Ht("load",a);break;case"video":case"audio":for(u=0;u<Cl.length;u++)Ht(Cl[u],a);break;case"image":Ht("error",a),Ht("load",a);break;case"details":Ht("toggle",a);break;case"embed":case"source":case"link":Ht("error",a),Ht("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(fe in o)if(o.hasOwnProperty(fe)&&(u=o[fe],u!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:oa(a,r,fe,u,o,null)}return;default:if(vi(r)){for(xe in o)o.hasOwnProperty(xe)&&(u=o[xe],u!==void 0&&Wg(a,r,xe,u,o,void 0));return}}for(j in o)o.hasOwnProperty(j)&&(u=o[j],u!=null&&oa(a,r,j,u,o,null))}function HC(a,r,o,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,E=null,D=null,j=null,$=null,fe=null,xe=null;for(ye in o){var Re=o[ye];if(o.hasOwnProperty(ye)&&Re!=null)switch(ye){case"checked":break;case"value":break;case"defaultValue":$=Re;default:u.hasOwnProperty(ye)||oa(a,r,ye,null,u,Re)}}for(var Ae in u){var ye=u[Ae];if(Re=o[Ae],u.hasOwnProperty(Ae)&&(ye!=null||Re!=null))switch(Ae){case"type":E=ye;break;case"name":h=ye;break;case"checked":fe=ye;break;case"defaultChecked":xe=ye;break;case"value":D=ye;break;case"defaultValue":j=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(i(137,r));break;default:ye!==Re&&oa(a,r,Ae,ye,u,Re)}}Ho(a,D,j,$,fe,xe,E,h);return;case"select":ye=D=j=Ae=null;for(E in o)if($=o[E],o.hasOwnProperty(E)&&$!=null)switch(E){case"value":break;case"multiple":ye=$;default:u.hasOwnProperty(E)||oa(a,r,E,null,u,$)}for(h in u)if(E=u[h],$=o[h],u.hasOwnProperty(h)&&(E!=null||$!=null))switch(h){case"value":Ae=E;break;case"defaultValue":j=E;break;case"multiple":D=E;default:E!==$&&oa(a,r,h,E,u,$)}r=j,o=D,u=ye,Ae!=null?bi(a,!!o,Ae,!1):!!u!=!!o&&(r!=null?bi(a,!!o,r,!0):bi(a,!!o,o?[]:"",!1));return;case"textarea":ye=Ae=null;for(j in o)if(h=o[j],o.hasOwnProperty(j)&&h!=null&&!u.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:oa(a,r,j,null,u,h)}for(D in u)if(h=u[D],E=o[D],u.hasOwnProperty(D)&&(h!=null||E!=null))switch(D){case"value":Ae=h;break;case"defaultValue":ye=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(i(91));break;default:h!==E&&oa(a,r,D,h,u,E)}Ps(a,Ae,ye);return;case"option":for(var ft in o)if(Ae=o[ft],o.hasOwnProperty(ft)&&Ae!=null&&!u.hasOwnProperty(ft))switch(ft){case"selected":a.selected=!1;break;default:oa(a,r,ft,null,u,Ae)}for($ in u)if(Ae=u[$],ye=o[$],u.hasOwnProperty($)&&Ae!==ye&&(Ae!=null||ye!=null))switch($){case"selected":a.selected=Ae&&typeof Ae!="function"&&typeof Ae!="symbol";break;default:oa(a,r,$,Ae,u,ye)}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 ot in o)Ae=o[ot],o.hasOwnProperty(ot)&&Ae!=null&&!u.hasOwnProperty(ot)&&oa(a,r,ot,null,u,Ae);for(fe in u)if(Ae=u[fe],ye=o[fe],u.hasOwnProperty(fe)&&Ae!==ye&&(Ae!=null||ye!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(Ae!=null)throw Error(i(137,r));break;default:oa(a,r,fe,Ae,u,ye)}return;default:if(vi(r)){for(var la in o)Ae=o[la],o.hasOwnProperty(la)&&Ae!==void 0&&!u.hasOwnProperty(la)&&Wg(a,r,la,void 0,u,Ae);for(xe in u)Ae=u[xe],ye=o[xe],!u.hasOwnProperty(xe)||Ae===ye||Ae===void 0&&ye===void 0||Wg(a,r,xe,Ae,u,ye);return}}for(var le in o)Ae=o[le],o.hasOwnProperty(le)&&Ae!=null&&!u.hasOwnProperty(le)&&oa(a,r,le,null,u,Ae);for(Re in u)Ae=u[Re],ye=o[Re],!u.hasOwnProperty(Re)||Ae===ye||Ae==null&&ye==null||oa(a,r,Re,Ae,u,ye)}var Yg=null,Jg=null;function Td(a){return a.nodeType===9?a:a.ownerDocument}function Ry(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function By(a,r){if(a===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&r==="foreignObject"?0:a}function Xg(a,r){return a==="textarea"||a==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var $g=null;function zC(){var a=window.event;return a&&a.type==="popstate"?a===$g?!1:($g=a,!0):($g=null,!1)}var Uy=typeof setTimeout=="function"?setTimeout:void 0,VC=typeof clearTimeout=="function"?clearTimeout:void 0,My=typeof Promise=="function"?Promise:void 0,QC=typeof queueMicrotask=="function"?queueMicrotask:typeof My<"u"?function(a){return My.resolve(null).then(a).catch(KC)}:Uy;function KC(a){setTimeout(function(){throw a})}function zi(a){return a==="head"}function _y(a,r){var o=r,u=0,h=0;do{var E=o.nextSibling;if(a.removeChild(o),E&&E.nodeType===8)if(o=E.data,o==="/$"){if(0<u&&8>u){o=u;var D=a.ownerDocument;if(o&1&&Nl(D.documentElement),o&2&&Nl(D.body),o&4)for(o=D.head,Nl(o),D=o.firstChild;D;){var j=D.nextSibling,$=D.nodeName;D[_a]||$==="SCRIPT"||$==="STYLE"||$==="LINK"&&D.rel.toLowerCase()==="stylesheet"||o.removeChild(D),D=j}}if(h===0){a.removeChild(E),Ul(r);return}h--}else o==="$"||o==="$?"||o==="$!"?h++:u=o.charCodeAt(0)-48;else u=0;o=E}while(o);Ul(r)}function Zg(a){var r=a.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var o=r;switch(r=r.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Zg(o),ya(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}a.removeChild(o)}}function GC(a,r,o,u){for(;a.nodeType===1;){var h=o;if(a.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(u){if(!a[_a])switch(r){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(E=a.getAttribute("rel"),E==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(E!==h.rel||a.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||a.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||a.getAttribute("title")!==(h.title==null?null:h.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(E=a.getAttribute("src"),(E!==(h.src==null?null:h.src)||a.getAttribute("type")!==(h.type==null?null:h.type)||a.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&E&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(r==="input"&&a.type==="hidden"){var E=h.name==null?null:""+h.name;if(h.type==="hidden"&&a.getAttribute("name")===E)return a}else return a;if(a=Ar(a.nextSibling),a===null)break}return null}function qC(a,r,o){if(r==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=Ar(a.nextSibling),a===null))return null;return a}function ef(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState==="complete"}function WC(a,r){var o=a.ownerDocument;if(a.data!=="$?"||o.readyState==="complete")r();else{var u=function(){r(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),a._reactRetry=u}}function Ar(a){for(;a!=null;a=a.nextSibling){var r=a.nodeType;if(r===1||r===3)break;if(r===8){if(r=a.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return a}var tf=null;function Fy(a){a=a.previousSibling;for(var r=0;a;){if(a.nodeType===8){var o=a.data;if(o==="$"||o==="$!"||o==="$?"){if(r===0)return a;r--}else o==="/$"&&r++}a=a.previousSibling}return null}function Oy(a,r,o){switch(r=Td(o),a){case"html":if(a=r.documentElement,!a)throw Error(i(452));return a;case"head":if(a=r.head,!a)throw Error(i(453));return a;case"body":if(a=r.body,!a)throw Error(i(454));return a;default:throw Error(i(451))}}function Nl(a){for(var r=a.attributes;r.length;)a.removeAttributeNode(r[0]);ya(a)}var cr=new Map,jy=new Set;function kd(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var ci=ae.d;ae.d={f:YC,r:JC,D:XC,C:$C,L:ZC,m:eS,X:aS,S:tS,M:nS};function YC(){var a=ci.f(),r=bd();return a||r}function JC(a){var r=Pe(a);r!==null&&r.tag===5&&r.type==="form"?i0(r):ci.r(a)}var ho=typeof document>"u"?null:document;function Py(a,r,o){var u=ho;if(u&&typeof r=="string"&&r){var h=xn(r);h='link[rel="'+a+'"][href="'+h+'"]',typeof o=="string"&&(h+='[crossorigin="'+o+'"]'),jy.has(h)||(jy.add(h),a={rel:a,crossOrigin:o,href:r},u.querySelector(h)===null&&(r=u.createElement("link"),cn(r,"link",a),et(r),u.head.appendChild(r)))}}function XC(a){ci.D(a),Py("dns-prefetch",a,null)}function $C(a,r){ci.C(a,r),Py("preconnect",a,r)}function ZC(a,r,o){ci.L(a,r,o);var u=ho;if(u&&a&&r){var h='link[rel="preload"][as="'+xn(r)+'"]';r==="image"&&o&&o.imageSrcSet?(h+='[imagesrcset="'+xn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(h+='[imagesizes="'+xn(o.imageSizes)+'"]')):h+='[href="'+xn(a)+'"]';var E=h;switch(r){case"style":E=po(a);break;case"script":E=Ao(a)}cr.has(E)||(a=A({rel:"preload",href:r==="image"&&o&&o.imageSrcSet?void 0:a,as:r},o),cr.set(E,a),u.querySelector(h)!==null||r==="style"&&u.querySelector(xl(E))||r==="script"&&u.querySelector(Tl(E))||(r=u.createElement("link"),cn(r,"link",a),et(r),u.head.appendChild(r)))}}function eS(a,r){ci.m(a,r);var o=ho;if(o&&a){var u=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+xn(u)+'"][href="'+xn(a)+'"]',E=h;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Ao(a)}if(!cr.has(E)&&(a=A({rel:"modulepreload",href:a},r),cr.set(E,a),o.querySelector(h)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Tl(E)))return}u=o.createElement("link"),cn(u,"link",a),et(u),o.head.appendChild(u)}}}function tS(a,r,o){ci.S(a,r,o);var u=ho;if(u&&a){var h=$e(u).hoistableStyles,E=po(a);r=r||"default";var D=h.get(E);if(!D){var j={loading:0,preload:null};if(D=u.querySelector(xl(E)))j.loading=5;else{a=A({rel:"stylesheet",href:a,"data-precedence":r},o),(o=cr.get(E))&&af(a,o);var $=D=u.createElement("link");et($),cn($,"link",a),$._p=new Promise(function(fe,xe){$.onload=fe,$.onerror=xe}),$.addEventListener("load",function(){j.loading|=1}),$.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Ld(D,r,u)}D={type:"stylesheet",instance:D,count:1,state:j},h.set(E,D)}}}function aS(a,r){ci.X(a,r);var o=ho;if(o&&a){var u=$e(o).hoistableScripts,h=Ao(a),E=u.get(h);E||(E=o.querySelector(Tl(h)),E||(a=A({src:a,async:!0},r),(r=cr.get(h))&&nf(a,r),E=o.createElement("script"),et(E),cn(E,"link",a),o.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},u.set(h,E))}}function nS(a,r){ci.M(a,r);var o=ho;if(o&&a){var u=$e(o).hoistableScripts,h=Ao(a),E=u.get(h);E||(E=o.querySelector(Tl(h)),E||(a=A({src:a,async:!0,type:"module"},r),(r=cr.get(h))&&nf(a,r),E=o.createElement("script"),et(E),cn(E,"link",a),o.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},u.set(h,E))}}function Hy(a,r,o,u){var h=(h=Ee.current)?kd(h):null;if(!h)throw Error(i(446));switch(a){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(r=po(o.href),o=$e(h).hoistableStyles,u=o.get(r),u||(u={type:"style",instance:null,count:0,state:null},o.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){a=po(o.href);var E=$e(h).hoistableStyles,D=E.get(a);if(D||(h=h.ownerDocument||h,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(a,D),(E=h.querySelector(xl(a)))&&!E._p&&(D.instance=E,D.state.loading=5),cr.has(a)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},cr.set(a,o),E||rS(h,a,o,D.state))),r&&u===null)throw Error(i(528,""));return D}if(r&&u!==null)throw Error(i(529,""));return null;case"script":return r=o.async,o=o.src,typeof o=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Ao(o),o=$e(h).hoistableScripts,u=o.get(r),u||(u={type:"script",instance:null,count:0,state:null},o.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,a))}}function po(a){return'href="'+xn(a)+'"'}function xl(a){return'link[rel="stylesheet"]['+a+"]"}function zy(a){return A({},a,{"data-precedence":a.precedence,precedence:null})}function rS(a,r,o,u){a.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=a.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),cn(r,"link",o),et(r),a.head.appendChild(r))}function Ao(a){return'[src="'+xn(a)+'"]'}function Tl(a){return"script[async]"+a}function Vy(a,r,o){if(r.count++,r.instance===null)switch(r.type){case"style":var u=a.querySelector('style[data-href~="'+xn(o.href)+'"]');if(u)return r.instance=u,et(u),u;var h=A({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(a.ownerDocument||a).createElement("style"),et(u),cn(u,"style",h),Ld(u,o.precedence,a),r.instance=u;case"stylesheet":h=po(o.href);var E=a.querySelector(xl(h));if(E)return r.state.loading|=4,r.instance=E,et(E),E;u=zy(o),(h=cr.get(h))&&af(u,h),E=(a.ownerDocument||a).createElement("link"),et(E);var D=E;return D._p=new Promise(function(j,$){D.onload=j,D.onerror=$}),cn(E,"link",u),r.state.loading|=4,Ld(E,o.precedence,a),r.instance=E;case"script":return E=Ao(o.src),(h=a.querySelector(Tl(E)))?(r.instance=h,et(h),h):(u=o,(h=cr.get(E))&&(u=A({},o),nf(u,h)),a=a.ownerDocument||a,h=a.createElement("script"),et(h),cn(h,"link",u),a.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(i(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Ld(u,o.precedence,a));return r.instance}function Ld(a,r,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=u.length?u[u.length-1]:null,E=h,D=0;D<u.length;D++){var j=u[D];if(j.dataset.precedence===r)E=j;else if(E!==h)break}E?E.parentNode.insertBefore(a,E.nextSibling):(r=o.nodeType===9?o.head:o,r.insertBefore(a,r.firstChild))}function af(a,r){a.crossOrigin==null&&(a.crossOrigin=r.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=r.referrerPolicy),a.title==null&&(a.title=r.title)}function nf(a,r){a.crossOrigin==null&&(a.crossOrigin=r.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=r.referrerPolicy),a.integrity==null&&(a.integrity=r.integrity)}var Dd=null;function Qy(a,r,o){if(Dd===null){var u=new Map,h=Dd=new Map;h.set(o,u)}else h=Dd,u=h.get(o),u||(u=new Map,h.set(o,u));if(u.has(a))return u;for(u.set(a,null),o=o.getElementsByTagName(a),h=0;h<o.length;h++){var E=o[h];if(!(E[_a]||E[Lt]||a==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var D=E.getAttribute(r)||"";D=a+D;var j=u.get(D);j?j.push(E):u.set(D,[E])}}return u}function Ky(a,r,o){a=a.ownerDocument||a,a.head.insertBefore(o,r==="title"?a.querySelector("head > title"):null)}function iS(a,r,o){if(o===1||r.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return a=r.disabled,typeof r.precedence=="string"&&a==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Gy(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}var kl=null;function sS(){}function oS(a,r,o){if(kl===null)throw Error(i(475));var u=kl;if(r.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var h=po(o.href),E=a.querySelector(xl(h));if(E){a=E._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(u.count++,u=Rd.bind(u),a.then(u,u)),r.state.loading|=4,r.instance=E,et(E);return}E=a.ownerDocument||a,o=zy(o),(h=cr.get(h))&&af(o,h),E=E.createElement("link"),et(E);var D=E;D._p=new Promise(function(j,$){D.onload=j,D.onerror=$}),cn(E,"link",o),r.instance=E}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(r,a),(a=r.state.preload)&&(r.state.loading&3)===0&&(u.count++,r=Rd.bind(u),a.addEventListener("load",r),a.addEventListener("error",r))}}function lS(){if(kl===null)throw Error(i(475));var a=kl;return a.stylesheets&&a.count===0&&rf(a,a.stylesheets),0<a.count?function(r){var o=setTimeout(function(){if(a.stylesheets&&rf(a,a.stylesheets),a.unsuspend){var u=a.unsuspend;a.unsuspend=null,u()}},6e4);return a.unsuspend=r,function(){a.unsuspend=null,clearTimeout(o)}}:null}function Rd(){if(this.count--,this.count===0){if(this.stylesheets)rf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Bd=null;function rf(a,r){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Bd=new Map,r.forEach(cS,a),Bd=null,Rd.call(a))}function cS(a,r){if(!(r.state.loading&4)){var o=Bd.get(a);if(o)var u=o.get(null);else{o=new Map,Bd.set(a,o);for(var h=a.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<h.length;E++){var D=h[E];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(o.set(D.dataset.precedence,D),u=D)}u&&o.set(null,u)}h=r.instance,D=h.getAttribute("data-precedence"),E=o.get(D)||u,E===u&&o.set(null,h),o.set(D,h),this.count++,u=Rd.bind(this),h.addEventListener("load",u),h.addEventListener("error",u),E?E.parentNode.insertBefore(h,E.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(h,a.firstChild)),r.state.loading|=4}}var Ll={$$typeof:k,Provider:null,Consumer:null,_currentValue:be,_currentValue2:be,_threadCount:0};function dS(a,r,o,u,h,E,D,j){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nn(0),this.hiddenUpdates=nn(null),this.identifierPrefix=u,this.onUncaughtError=h,this.onCaughtError=E,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function qy(a,r,o,u,h,E,D,j,$,fe,xe,Re){return a=new dS(a,r,o,D,j,$,fe,Re),r=1,E===!0&&(r|=24),E=zn(3,null,null,r),a.current=E,E.stateNode=a,r=jm(),r.refCount++,a.pooledCache=r,r.refCount++,E.memoizedState={element:u,isDehydrated:o,cache:r},Vm(E),a}function Wy(a){return a?(a=qs,a):qs}function Yy(a,r,o,u,h,E){h=Wy(h),u.context===null?u.context=h:u.pendingContext=h,u=ki(r),u.payload={element:o},E=E===void 0?null:E,E!==null&&(u.callback=E),o=Li(a,u,r),o!==null&&(qn(o,a,r),sl(o,a,r))}function Jy(a,r){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var o=a.retryLane;a.retryLane=o!==0&&o<r?o:r}}function sf(a,r){Jy(a,r),(a=a.alternate)&&Jy(a,r)}function Xy(a){if(a.tag===13){var r=Gs(a,67108864);r!==null&&qn(r,a,67108864),sf(a,67108864)}}var Ud=!0;function uS(a,r,o,u){var h=W.T;W.T=null;var E=ae.p;try{ae.p=2,of(a,r,o,u)}finally{ae.p=E,W.T=h}}function mS(a,r,o,u){var h=W.T;W.T=null;var E=ae.p;try{ae.p=8,of(a,r,o,u)}finally{ae.p=E,W.T=h}}function of(a,r,o,u){if(Ud){var h=lf(u);if(h===null)qg(a,r,u,Md,o),Zy(a,u);else if(fS(h,a,r,o,u))u.stopPropagation();else if(Zy(a,u),r&4&&-1<gS.indexOf(a)){for(;h!==null;){var E=Pe(h);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var D=ct(E.pendingLanes);if(D!==0){var j=E;for(j.pendingLanes|=2,j.entangledLanes|=2;D;){var $=1<<31-S(D);j.entanglements[1]|=$,D&=~$}Dr(E),(aa&6)===0&&(yd=Fe()+500,wl(0))}}break;case 13:j=Gs(E,2),j!==null&&qn(j,E,2),bd(),sf(E,2)}if(E=lf(u),E===null&&qg(a,r,u,Md,o),E===h)break;h=E}h!==null&&u.stopPropagation()}else qg(a,r,u,null,o)}}function lf(a){return a=Yr(a),cf(a)}var Md=null;function cf(a){if(Md=null,a=oe(a),a!==null){var r=l(a);if(r===null)a=null;else{var o=r.tag;if(o===13){if(a=d(r),a!==null)return a;a=null}else if(o===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;a=null}else r!==a&&(a=null)}}return Md=a,null}function $y(a){switch(a){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(he()){case De:return 2;case Ve:return 8;case He:case tt:return 32;case It:return 268435456;default:return 32}default:return 32}}var df=!1,Vi=null,Qi=null,Ki=null,Dl=new Map,Rl=new Map,Gi=[],gS="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 Zy(a,r){switch(a){case"focusin":case"focusout":Vi=null;break;case"dragenter":case"dragleave":Qi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":Dl.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rl.delete(r.pointerId)}}function Bl(a,r,o,u,h,E){return a===null||a.nativeEvent!==E?(a={blockedOn:r,domEventName:o,eventSystemFlags:u,nativeEvent:E,targetContainers:[h]},r!==null&&(r=Pe(r),r!==null&&Xy(r)),a):(a.eventSystemFlags|=u,r=a.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),a)}function fS(a,r,o,u,h){switch(r){case"focusin":return Vi=Bl(Vi,a,r,o,u,h),!0;case"dragenter":return Qi=Bl(Qi,a,r,o,u,h),!0;case"mouseover":return Ki=Bl(Ki,a,r,o,u,h),!0;case"pointerover":var E=h.pointerId;return Dl.set(E,Bl(Dl.get(E)||null,a,r,o,u,h)),!0;case"gotpointercapture":return E=h.pointerId,Rl.set(E,Bl(Rl.get(E)||null,a,r,o,u,h)),!0}return!1}function eE(a){var r=oe(a.target);if(r!==null){var o=l(r);if(o!==null){if(r=o.tag,r===13){if(r=d(o),r!==null){a.blockedOn=r,sn(a.priority,function(){if(o.tag===13){var u=Gn();u=Nt(u);var h=Gs(o,u);h!==null&&qn(h,o,u),sf(o,u)}});return}}else if(r===3&&o.stateNode.current.memoizedState.isDehydrated){a.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}a.blockedOn=null}function _d(a){if(a.blockedOn!==null)return!1;for(var r=a.targetContainers;0<r.length;){var o=lf(a.nativeEvent);if(o===null){o=a.nativeEvent;var u=new o.constructor(o.type,o);er=u,o.target.dispatchEvent(u),er=null}else return r=Pe(o),r!==null&&Xy(r),a.blockedOn=o,!1;r.shift()}return!0}function tE(a,r,o){_d(a)&&o.delete(r)}function hS(){df=!1,Vi!==null&&_d(Vi)&&(Vi=null),Qi!==null&&_d(Qi)&&(Qi=null),Ki!==null&&_d(Ki)&&(Ki=null),Dl.forEach(tE),Rl.forEach(tE)}function Fd(a,r){a.blockedOn===r&&(a.blockedOn=null,df||(df=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,hS)))}var Od=null;function aE(a){Od!==a&&(Od=a,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Od===a&&(Od=null);for(var r=0;r<a.length;r+=3){var o=a[r],u=a[r+1],h=a[r+2];if(typeof u!="function"){if(cf(u||o)===null)continue;break}var E=Pe(o);E!==null&&(a.splice(r,3),r-=3,lg(E,{pending:!0,data:h,method:o.method,action:u},u,h))}}))}function Ul(a){function r($){return Fd($,a)}Vi!==null&&Fd(Vi,a),Qi!==null&&Fd(Qi,a),Ki!==null&&Fd(Ki,a),Dl.forEach(r),Rl.forEach(r);for(var o=0;o<Gi.length;o++){var u=Gi[o];u.blockedOn===a&&(u.blockedOn=null)}for(;0<Gi.length&&(o=Gi[0],o.blockedOn===null);)eE(o),o.blockedOn===null&&Gi.shift();if(o=(a.ownerDocument||a).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var h=o[u],E=o[u+1],D=h[Gt]||null;if(typeof E=="function")D||aE(o);else if(D){var j=null;if(E&&E.hasAttribute("formAction")){if(h=E,D=E[Gt]||null)j=D.formAction;else if(cf(h)!==null)continue}else j=D.action;typeof j=="function"?o[u+1]=j:(o.splice(u,3),u-=3),aE(o)}}}function uf(a){this._internalRoot=a}jd.prototype.render=uf.prototype.render=function(a){var r=this._internalRoot;if(r===null)throw Error(i(409));var o=r.current,u=Gn();Yy(o,u,a,r,null,null)},jd.prototype.unmount=uf.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var r=a.containerInfo;Yy(a.current,2,null,a,null,null),bd(),r[Vt]=null}};function jd(a){this._internalRoot=a}jd.prototype.unstable_scheduleHydration=function(a){if(a){var r=ka();a={blockedOn:null,target:a,priority:r};for(var o=0;o<Gi.length&&r!==0&&r<Gi[o].priority;o++);Gi.splice(o,0,a),o===0&&eE(a)}};var nE=e.version;if(nE!=="19.1.0")throw Error(i(527,nE,"19.1.0"));ae.findDOMNode=function(a){var r=a._reactInternals;if(r===void 0)throw typeof a.render=="function"?Error(i(188)):(a=Object.keys(a).join(","),Error(i(268,a)));return a=f(r),a=a!==null?g(a):null,a=a===null?null:a.stateNode,a};var pS={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pd.isDisabled&&Pd.supportsFiber)try{Yt=Pd.inject(pS),M=Pd}catch{}}return _l.createRoot=function(a,r){if(!s(a))throw Error(i(299));var o=!1,u="",h=E0,E=b0,D=v0,j=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(E=r.onCaughtError),r.onRecoverableError!==void 0&&(D=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(j=r.unstable_transitionCallbacks)),r=qy(a,1,!1,null,null,o,u,h,E,D,j,null),a[Vt]=r.current,Gg(a),new uf(r)},_l.hydrateRoot=function(a,r,o){if(!s(a))throw Error(i(299));var u=!1,h="",E=E0,D=b0,j=v0,$=null,fe=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onUncaughtError!==void 0&&(E=o.onUncaughtError),o.onCaughtError!==void 0&&(D=o.onCaughtError),o.onRecoverableError!==void 0&&(j=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&($=o.unstable_transitionCallbacks),o.formState!==void 0&&(fe=o.formState)),r=qy(a,1,!0,r,o??null,u,h,E,D,j,$,fe),r.context=Wy(null),o=r.current,u=Gn(),u=Nt(u),h=ki(u),h.callback=null,Li(o,h,u),o=u,r.current.lanes=o,Rt(r,o),Dr(r),a[Vt]=r.current,Gg(a),new jd(r)},_l.version="19.1.0",_l}var gE;function kS(){if(gE)return gf.exports;gE=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),gf.exports=TS(),gf.exports}var LS=kS();const DS=is(LS);var b=np();const tn=is(b),RS=(t,e,n,i)=>{var l,d,m,f;const s=[n,{code:e,...i||{}}];if((d=(l=t==null?void 0:t.services)==null?void 0:l.logger)!=null&&d.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);Ds(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(f=(m=t==null?void 0:t.services)==null?void 0:m.logger)!=null&&f.warn?t.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},fE={},Ch=(t,e,n,i)=>{Ds(n)&&fE[n]||(Ds(n)&&(fE[n]=new Date),RS(t,e,n,i))},Pv=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},Sh=(t,e,n)=>{t.loadNamespaces(e,Pv(t,n))},hE=(t,e,n,i)=>{if(Ds(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return Sh(t,n,i);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,Pv(t,i))},BS=(t,e,n={})=>!e.languages||!e.languages.length?(Ch(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(i,s)=>{var l;if(((l=n.bindI18n)==null?void 0:l.indexOf("languageChanging"))>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,t))return!1}}),Ds=t=>typeof t=="string",US=t=>typeof t=="object"&&t!==null,MS=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,_S={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},FS=t=>_S[t],OS=t=>t.replace(MS,FS);let Nh={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:OS};const jS=(t={})=>{Nh={...Nh,...t}},PS=()=>Nh;let Hv;const HS=t=>{Hv=t},zS=()=>Hv,VS={type:"3rdParty",init(t){jS(t.options.react),HS(t)}},QS=b.createContext();class KS{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const GS=(t,e)=>{const n=b.useRef();return b.useEffect(()=>{n.current=t},[t,e]),n.current},zv=(t,e,n,i)=>t.getFixedT(e,n,i),qS=(t,e,n,i)=>b.useCallback(zv(t,e,n,i),[t,e,n,i]),nt=(t,e={})=>{var F,_,V,U;const{i18n:n}=e,{i18n:i,defaultNS:s}=b.useContext(QS)||{},l=n||i||zS();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new KS),!l){Ch(l,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const O=(Q,K)=>Ds(K)?K:US(K)&&Ds(K.defaultValue)?K.defaultValue:Array.isArray(Q)?Q[Q.length-1]:Q,z=[O,{},!1];return z.t=O,z.i18n={},z.ready=!1,z}(F=l.options.react)!=null&&F.wait&&Ch(l,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const d={...PS(),...l.options.react,...e},{useSuspense:m,keyPrefix:f}=d;let g=s||((_=l.options)==null?void 0:_.defaultNS);g=Ds(g)?[g]:g||["translation"],(U=(V=l.reportNamespaces).addUsedNamespaces)==null||U.call(V,g);const A=(l.isInitialized||l.initializedStoreOnce)&&g.every(O=>BS(O,l,d)),p=qS(l,e.lng||null,d.nsMode==="fallback"?g:g[0],f),v=()=>p,I=()=>zv(l,e.lng||null,d.nsMode==="fallback"?g:g[0],f),[x,N]=b.useState(v);let T=g.join();e.lng&&(T=`${e.lng}${T}`);const L=GS(T),B=b.useRef(!0);b.useEffect(()=>{const{bindI18n:O,bindI18nStore:z}=d;B.current=!0,!A&&!m&&(e.lng?hE(l,e.lng,g,()=>{B.current&&N(I)}):Sh(l,g,()=>{B.current&&N(I)})),A&&L&&L!==T&&B.current&&N(I);const Q=()=>{B.current&&N(I)};return O&&(l==null||l.on(O,Q)),z&&(l==null||l.store.on(z,Q)),()=>{B.current=!1,l&&(O==null||O.split(" ").forEach(K=>l.off(K,Q))),z&&l&&z.split(" ").forEach(K=>l.store.off(K,Q))}},[l,T]),b.useEffect(()=>{B.current&&A&&N(v)},[l,f,A]);const k=[x,l,A];if(k.t=x,k.i18n=l,k.ready=A,A||!A&&!m)return k;throw new Promise(O=>{e.lng?hE(l,e.lng,g,()=>O()):Sh(l,g,()=>O())})};/**
 * 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 pE="popstate";function WS(t={}){function e(s,l){let{pathname:d="/",search:m="",hash:f=""}=Bs(s.location.hash.substring(1));return!d.startsWith("/")&&!d.startsWith(".")&&(d="/"+d),xh("",{pathname:d,search:m,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(s,l){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 l=="string"?l:fc(l))}function i(s,l){Mn(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(l)})`)}return JS(e,n,i,t)}function Ia(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Mn(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function YS(){return Math.random().toString(36).substring(2,10)}function AE(t,e){return{usr:t.state,key:t.key,idx:e}}function xh(t,e,n=null,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Bs(e):e,state:n,key:e&&e.key||i||YS()}}function fc({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Bs(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substring(i),t=t.substring(0,i)),t&&(e.pathname=t)}return e}function JS(t,e,n,i={}){let{window:s=document.defaultView,v5Compat:l=!1}=i,d=s.history,m="POP",f=null,g=A();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function A(){return(d.state||{idx:null}).idx}function p(){m="POP";let T=A(),L=T==null?null:T-g;g=T,f&&f({action:m,location:N.location,delta:L})}function v(T,L){m="PUSH";let B=xh(N.location,T,L);n&&n(B,T),g=A()+1;let k=AE(B,g),F=N.createHref(B);try{d.pushState(k,"",F)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(F)}l&&f&&f({action:m,location:N.location,delta:1})}function I(T,L){m="REPLACE";let B=xh(N.location,T,L);n&&n(B,T),g=A();let k=AE(B,g),F=N.createHref(B);d.replaceState(k,"",F),l&&f&&f({action:m,location:N.location,delta:0})}function x(T){return XS(T)}let N={get action(){return m},get location(){return t(s,d)},listen(T){if(f)throw new Error("A history only accepts one active listener");return s.addEventListener(pE,p),f=T,()=>{s.removeEventListener(pE,p),f=null}},createHref(T){return e(s,T)},createURL:x,encodeLocation(T){let L=x(T);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:v,replace:I,go(T){return d.go(T)}};return N}function XS(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ia(n,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:fc(t);return i=i.replace(/ $/,"%20"),!e&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function Vv(t,e,n="/"){return $S(t,e,n,!1)}function $S(t,e,n,i){let s=typeof e=="string"?Bs(e):e,l=yi(s.pathname||"/",n);if(l==null)return null;let d=Qv(t);ZS(d);let m=null;for(let f=0;m==null&&f<d.length;++f){let g=dN(l);m=lN(d[f],g,i)}return m}function Qv(t,e=[],n=[],i="",s=!1){let l=(d,m,f=s,g)=>{let A={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(A.relativePath.startsWith("/")){if(!A.relativePath.startsWith(i)&&f)return;Ia(A.relativePath.startsWith(i),`Absolute route path "${A.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),A.relativePath=A.relativePath.slice(i.length)}let p=Ai([i,A.relativePath]),v=n.concat(A);d.children&&d.children.length>0&&(Ia(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Qv(d.children,e,v,p,f)),!(d.path==null&&!d.index)&&e.push({path:p,score:sN(p,d.index),routesMeta:v})};return t.forEach((d,m)=>{var f;if(d.path===""||!((f=d.path)!=null&&f.includes("?")))l(d,m);else for(let g of Kv(d.path))l(d,m,!0,g)}),e}function Kv(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,s=n.endsWith("?"),l=n.replace(/\?$/,"");if(i.length===0)return s?[l,""]:[l];let d=Kv(i.join("/")),m=[];return m.push(...d.map(f=>f===""?l:[l,f].join("/"))),s&&m.push(...d),m.map(f=>t.startsWith("/")&&f===""?"/":f)}function ZS(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:oN(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var eN=/^:[\w-]+$/,tN=3,aN=2,nN=1,rN=10,iN=-2,yE=t=>t==="*";function sN(t,e){let n=t.split("/"),i=n.length;return n.some(yE)&&(i+=iN),e&&(i+=aN),n.filter(s=>!yE(s)).reduce((s,l)=>s+(eN.test(l)?tN:l===""?nN:rN),i)}function oN(t,e){return t.length===e.length&&t.slice(0,-1).every((i,s)=>i===e[s])?t[t.length-1]-e[e.length-1]:0}function lN(t,e,n=!1){let{routesMeta:i}=t,s={},l="/",d=[];for(let m=0;m<i.length;++m){let f=i[m],g=m===i.length-1,A=l==="/"?e:e.slice(l.length)||"/",p=bu({path:f.relativePath,caseSensitive:f.caseSensitive,end:g},A),v=f.route;if(!p&&g&&n&&!i[i.length-1].route.index&&(p=bu({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},A)),!p)return null;Object.assign(s,p.params),d.push({params:s,pathname:Ai([l,p.pathname]),pathnameBase:fN(Ai([l,p.pathnameBase])),route:v}),p.pathnameBase!=="/"&&(l=Ai([l,p.pathnameBase]))}return d}function bu(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=cN(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let l=s[0],d=l.replace(/(.)\/+$/,"$1"),m=s.slice(1);return{params:i.reduce((g,{paramName:A,isOptional:p},v)=>{if(A==="*"){let x=m[v]||"";d=l.slice(0,l.length-x.length).replace(/(.)\/+$/,"$1")}const I=m[v];return p&&!I?g[A]=void 0:g[A]=(I||"").replace(/%2F/g,"/"),g},{}),pathname:l,pathnameBase:d,pattern:t}}function cN(t,e=!1,n=!0){Mn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let i=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,f)=>(i.push({paramName:m,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(i.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),i]}function dN(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Mn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function yi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}var Gv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uN=t=>Gv.test(t);function mN(t,e="/"){let{pathname:n,search:i="",hash:s=""}=typeof t=="string"?Bs(t):t,l;if(n)if(uN(n))l=n;else{if(n.includes("//")){let d=n;n=n.replace(/\/\/+/g,"/"),Mn(!1,`Pathnames cannot have embedded double slashes - normalizing ${d} -> ${n}`)}n.startsWith("/")?l=EE(n.substring(1),"/"):l=EE(n,e)}else l=e;return{pathname:l,search:hN(i),hash:pN(s)}}function EE(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function yf(t,e,n,i){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(i)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function gN(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function rp(t){let e=gN(t);return e.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase)}function ip(t,e,n,i=!1){let s;typeof t=="string"?s=Bs(t):(s={...t},Ia(!s.pathname||!s.pathname.includes("?"),yf("?","pathname","search",s)),Ia(!s.pathname||!s.pathname.includes("#"),yf("#","pathname","hash",s)),Ia(!s.search||!s.search.includes("#"),yf("#","search","hash",s)));let l=t===""||s.pathname==="",d=l?"/":s.pathname,m;if(d==null)m=n;else{let p=e.length-1;if(!i&&d.startsWith("..")){let v=d.split("/");for(;v[0]==="..";)v.shift(),p-=1;s.pathname=v.join("/")}m=p>=0?e[p]:"/"}let f=mN(s,m),g=d&&d!=="/"&&d.endsWith("/"),A=(l||d===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(g||A)&&(f.pathname+="/"),f}var Ai=t=>t.join("/").replace(/\/\/+/g,"/"),fN=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),hN=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,pN=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,AN=class{constructor(t,e,n,i=!1){this.status=t,this.statusText=e||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function yN(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function EN(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var qv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wv(t,e){let n=t;if(typeof n!="string"||!Gv.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,s=!1;if(qv)try{let l=new URL(window.location.href),d=n.startsWith("//")?new URL(l.protocol+n):new URL(n),m=yi(d.pathname,e);d.origin===l.origin&&m!=null?n=m+d.search+d.hash:s=!0}catch{Mn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Yv=["POST","PUT","PATCH","DELETE"];new Set(Yv);var bN=["GET",...Yv];new Set(bN);var Bo=b.createContext(null);Bo.displayName="DataRouter";var Pu=b.createContext(null);Pu.displayName="DataRouterState";var vN=b.createContext(!1),Jv=b.createContext({isTransitioning:!1});Jv.displayName="ViewTransition";var IN=b.createContext(new Map);IN.displayName="Fetchers";var wN=b.createContext(null);wN.displayName="Await";var Zn=b.createContext(null);Zn.displayName="Navigation";var wc=b.createContext(null);wc.displayName="Location";var vr=b.createContext({outlet:null,matches:[],isDataRoute:!1});vr.displayName="Route";var sp=b.createContext(null);sp.displayName="RouteError";var Xv="REACT_ROUTER_ERROR",CN="REDIRECT",SN="ROUTE_ERROR_RESPONSE";function NN(t){if(t.startsWith(`${Xv}:${CN}:{`))try{let e=JSON.parse(t.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 xN(t){if(t.startsWith(`${Xv}:${SN}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new AN(e.status,e.statusText,e.data)}catch{}}function TN(t,{relative:e}={}){Ia(Uo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=b.useContext(Zn),{hash:s,pathname:l,search:d}=Cc(t,{relative:e}),m=l;return n!=="/"&&(m=l==="/"?n:Ai([n,l])),i.createHref({pathname:m,search:d,hash:s})}function Uo(){return b.useContext(wc)!=null}function an(){return Ia(Uo(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(wc).location}var $v="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zv(t){b.useContext(Zn).static||b.useLayoutEffect(t)}function Ha(){let{isDataRoute:t}=b.useContext(vr);return t?HN():kN()}function kN(){Ia(Uo(),"useNavigate() may be used only in the context of a <Router> component.");let t=b.useContext(Bo),{basename:e,navigator:n}=b.useContext(Zn),{matches:i}=b.useContext(vr),{pathname:s}=an(),l=JSON.stringify(rp(i)),d=b.useRef(!1);return Zv(()=>{d.current=!0}),b.useCallback((f,g={})=>{if(Mn(d.current,$v),!d.current)return;if(typeof f=="number"){n.go(f);return}let A=ip(f,JSON.parse(l),s,g.relative==="path");t==null&&e!=="/"&&(A.pathname=A.pathname==="/"?e:Ai([e,A.pathname])),(g.replace?n.replace:n.push)(A,g.state,g)},[e,n,l,s,t])}b.createContext(null);function Hu(){let{matches:t}=b.useContext(vr),e=t[t.length-1];return e?e.params:{}}function Cc(t,{relative:e}={}){let{matches:n}=b.useContext(vr),{pathname:i}=an(),s=JSON.stringify(rp(n));return b.useMemo(()=>ip(t,JSON.parse(s),i,e==="path"),[t,s,i,e])}function LN(t,e){return eI(t,e)}function eI(t,e,n,i,s){var B;Ia(Uo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=b.useContext(Zn),{matches:d}=b.useContext(vr),m=d[d.length-1],f=m?m.params:{},g=m?m.pathname:"/",A=m?m.pathnameBase:"/",p=m&&m.route;{let k=p&&p.path||"";aI(g,!p||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${k}">) 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="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let v=an(),I;if(e){let k=typeof e=="string"?Bs(e):e;Ia(A==="/"||((B=k.pathname)==null?void 0:B.startsWith(A)),`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 "${A}" but pathname "${k.pathname}" was given in the \`location\` prop.`),I=k}else I=v;let x=I.pathname||"/",N=x;if(A!=="/"){let k=A.replace(/^\//,"").split("/");N="/"+x.replace(/^\//,"").split("/").slice(k.length).join("/")}let T=Vv(t,{pathname:N});Mn(p||T!=null,`No routes matched location "${I.pathname}${I.search}${I.hash}" `),Mn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${I.pathname}${I.search}${I.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 L=MN(T&&T.map(k=>Object.assign({},k,{params:Object.assign({},f,k.params),pathname:Ai([A,l.encodeLocation?l.encodeLocation(k.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?A:Ai([A,l.encodeLocation?l.encodeLocation(k.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),d,n,i,s);return e&&L?b.createElement(wc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...I},navigationType:"POP"}},L):L}function DN(){let t=PN(),e=yN(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},l={padding:"2px 4px",backgroundColor:i},d=null;return console.error("Error handled by React Router default ErrorBoundary:",t),d=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:l},"ErrorBoundary")," or"," ",b.createElement("code",{style:l},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),n?b.createElement("pre",{style:s},n):null,d)}var RN=b.createElement(DN,null),tI=class extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=xN(t.digest);n&&(t=n)}let e=t!==void 0?b.createElement(vr.Provider,{value:this.props.routeContext},b.createElement(sp.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?b.createElement(BN,{error:t},e):e}};tI.contextType=vN;var Ef=new WeakMap;function BN({children:t,error:e}){let{basename:n}=b.useContext(Zn);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let i=NN(e.digest);if(i){let s=Ef.get(e);if(s)throw s;let l=Wv(i.location,n);if(qv&&!Ef.get(e))if(l.isExternal||i.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:i.replace}));throw Ef.set(e,d),d}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return t}function UN({routeContext:t,match:e,children:n}){let i=b.useContext(Bo);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),b.createElement(vr.Provider,{value:t},n)}function MN(t,e=[],n=null,i=null,s=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let l=t,d=n==null?void 0:n.errors;if(d!=null){let A=l.findIndex(p=>p.route.id&&(d==null?void 0:d[p.route.id])!==void 0);Ia(A>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),l=l.slice(0,Math.min(l.length,A+1))}let m=!1,f=-1;if(n)for(let A=0;A<l.length;A++){let p=l[A];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(f=A),p.route.id){let{loaderData:v,errors:I}=n,x=p.route.loader&&!v.hasOwnProperty(p.route.id)&&(!I||I[p.route.id]===void 0);if(p.route.lazy||x){m=!0,f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}let g=n&&i?(A,p)=>{var v,I;i(A,{location:n.location,params:((I=(v=n.matches)==null?void 0:v[0])==null?void 0:I.params)??{},unstable_pattern:EN(n.matches),errorInfo:p})}:void 0;return l.reduceRight((A,p,v)=>{let I,x=!1,N=null,T=null;n&&(I=d&&p.route.id?d[p.route.id]:void 0,N=p.route.errorElement||RN,m&&(f<0&&v===0?(aI("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,T=null):f===v&&(x=!0,T=p.route.hydrateFallbackElement||null)));let L=e.concat(l.slice(0,v+1)),B=()=>{let k;return I?k=N:x?k=T:p.route.Component?k=b.createElement(p.route.Component,null):p.route.element?k=p.route.element:k=A,b.createElement(UN,{match:p,routeContext:{outlet:A,matches:L,isDataRoute:n!=null},children:k})};return n&&(p.route.ErrorBoundary||p.route.errorElement||v===0)?b.createElement(tI,{location:n.location,revalidation:n.revalidation,component:N,error:I,children:B(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:g}):B()},null)}function op(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function _N(t){let e=b.useContext(Bo);return Ia(e,op(t)),e}function FN(t){let e=b.useContext(Pu);return Ia(e,op(t)),e}function ON(t){let e=b.useContext(vr);return Ia(e,op(t)),e}function lp(t){let e=ON(t),n=e.matches[e.matches.length-1];return Ia(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function jN(){return lp("useRouteId")}function PN(){var i;let t=b.useContext(sp),e=FN("useRouteError"),n=lp("useRouteError");return t!==void 0?t:(i=e.errors)==null?void 0:i[n]}function HN(){let{router:t}=_N("useNavigate"),e=lp("useNavigate"),n=b.useRef(!1);return Zv(()=>{n.current=!0}),b.useCallback(async(s,l={})=>{Mn(n.current,$v),n.current&&(typeof s=="number"?await t.navigate(s):await t.navigate(s,{fromRouteId:e,...l}))},[t,e])}var bE={};function aI(t,e,n){!e&&!bE[t]&&(bE[t]=!0,Mn(!1,n))}b.memo(zN);function zN({routes:t,future:e,state:n,onError:i}){return eI(t,void 0,n,i,e)}function VN({to:t,replace:e,state:n,relative:i}){Ia(Uo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=b.useContext(Zn);Mn(!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:l}=b.useContext(vr),{pathname:d}=an(),m=Ha(),f=ip(t,rp(l),d,i==="path"),g=JSON.stringify(f);return b.useEffect(()=>{m(JSON.parse(g),{replace:e,state:n,relative:i})},[m,g,i,e,n]),null}function cp(t){Ia(!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 QN({basename:t="/",children:e=null,location:n,navigationType:i="POP",navigator:s,static:l=!1,unstable_useTransitions:d}){Ia(!Uo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=t.replace(/^\/*/,"/"),f=b.useMemo(()=>({basename:m,navigator:s,static:l,unstable_useTransitions:d,future:{}}),[m,s,l,d]);typeof n=="string"&&(n=Bs(n));let{pathname:g="/",search:A="",hash:p="",state:v=null,key:I="default"}=n,x=b.useMemo(()=>{let N=yi(g,m);return N==null?null:{location:{pathname:N,search:A,hash:p,state:v,key:I},navigationType:i}},[m,g,A,p,v,I,i]);return Mn(x!=null,`<Router basename="${m}"> is not able to match the URL "${g}${A}${p}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:b.createElement(Zn.Provider,{value:f},b.createElement(wc.Provider,{children:e,value:x}))}function nI({children:t,location:e}){return LN(Th(t),e)}function Th(t,e=[]){let n=[];return b.Children.forEach(t,(i,s)=>{if(!b.isValidElement(i))return;let l=[...e,s];if(i.type===b.Fragment){n.push.apply(n,Th(i.props.children,l));return}Ia(i.type===cp,`[${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>`),Ia(!i.props.index||!i.props.children,"An index route cannot have child routes.");let d={id:i.props.id||l.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=Th(i.props.children,l)),n.push(d)}),n}var ou="get",lu="application/x-www-form-urlencoded";function zu(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function KN(t){return zu(t)&&t.tagName.toLowerCase()==="button"}function GN(t){return zu(t)&&t.tagName.toLowerCase()==="form"}function qN(t){return zu(t)&&t.tagName.toLowerCase()==="input"}function WN(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function YN(t,e){return t.button===0&&(!e||e==="_self")&&!WN(t)}function kh(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let i=t[n];return e.concat(Array.isArray(i)?i.map(s=>[n,s]):[[n,i]])},[]))}function JN(t,e){let n=kh(t);return e&&e.forEach((i,s)=>{n.has(s)||e.getAll(s).forEach(l=>{n.append(s,l)})}),n}var Hd=null;function XN(){if(Hd===null)try{new FormData(document.createElement("form"),0),Hd=!1}catch{Hd=!0}return Hd}var $N=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bf(t){return t!=null&&!$N.has(t)?(Mn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${lu}"`),null):t}function ZN(t,e){let n,i,s,l,d;if(GN(t)){let m=t.getAttribute("action");i=m?yi(m,e):null,n=t.getAttribute("method")||ou,s=bf(t.getAttribute("enctype"))||lu,l=new FormData(t)}else if(KN(t)||qN(t)&&(t.type==="submit"||t.type==="image")){let m=t.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=t.getAttribute("formaction")||m.getAttribute("action");if(i=f?yi(f,e):null,n=t.getAttribute("formmethod")||m.getAttribute("method")||ou,s=bf(t.getAttribute("formenctype"))||bf(m.getAttribute("enctype"))||lu,l=new FormData(m,t),!XN()){let{name:g,type:A,value:p}=t;if(A==="image"){let v=g?`${g}.`:"";l.append(`${v}x`,"0"),l.append(`${v}y`,"0")}else g&&l.append(g,p)}}else{if(zu(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ou,i=null,s=lu,d=t}return l&&s==="text/plain"&&(d=l,l=void 0),{action:i,method:n.toLowerCase(),encType:s,formData:l,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function dp(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function ex(t,e,n,i){let s=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${i}`:s.pathname=`${s.pathname}.${i}`:s.pathname==="/"?s.pathname=`_root.${i}`:e&&yi(s.pathname,e)==="/"?s.pathname=`${e.replace(/\/$/,"")}/_root.${i}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${i}`,s}async function tx(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ax(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function nx(t,e,n){let i=await Promise.all(t.map(async s=>{let l=e.routes[s.route.id];if(l){let d=await tx(l,n);return d.links?d.links():[]}return[]}));return ox(i.flat(1).filter(ax).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function vE(t,e,n,i,s,l){let d=(f,g)=>n[g]?f.route.id!==n[g].route.id:!0,m=(f,g)=>{var A;return n[g].pathname!==f.pathname||((A=n[g].route.path)==null?void 0:A.endsWith("*"))&&n[g].params["*"]!==f.params["*"]};return l==="assets"?e.filter((f,g)=>d(f,g)||m(f,g)):l==="data"?e.filter((f,g)=>{var p;let A=i.routes[f.route.id];if(!A||!A.hasLoader)return!1;if(d(f,g)||m(f,g))return!0;if(f.route.shouldRevalidate){let v=f.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(t,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function rx(t,e,{includeHydrateFallback:n}={}){return ix(t.map(i=>{let s=e.routes[i.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function ix(t){return[...new Set(t)]}function sx(t){let e={},n=Object.keys(t).sort();for(let i of n)e[i]=t[i];return e}function ox(t,e){let n=new Set;return new Set(e),t.reduce((i,s)=>{let l=JSON.stringify(sx(s));return n.has(l)||(n.add(l),i.push({key:l,link:s})),i},[])}function rI(){let t=b.useContext(Bo);return dp(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function lx(){let t=b.useContext(Pu);return dp(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var up=b.createContext(void 0);up.displayName="FrameworkContext";function iI(){let t=b.useContext(up);return dp(t,"You must render this element inside a <HydratedRouter> element"),t}function cx(t,e){let n=b.useContext(up),[i,s]=b.useState(!1),[l,d]=b.useState(!1),{onFocus:m,onBlur:f,onMouseEnter:g,onMouseLeave:A,onTouchStart:p}=e,v=b.useRef(null);b.useEffect(()=>{if(t==="render"&&d(!0),t==="viewport"){let N=L=>{L.forEach(B=>{d(B.isIntersecting)})},T=new IntersectionObserver(N,{threshold:.5});return v.current&&T.observe(v.current),()=>{T.disconnect()}}},[t]),b.useEffect(()=>{if(i){let N=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(N)}}},[i]);let I=()=>{s(!0)},x=()=>{s(!1),d(!1)};return n?t!=="intent"?[l,v,{}]:[l,v,{onFocus:Fl(m,I),onBlur:Fl(f,x),onMouseEnter:Fl(g,I),onMouseLeave:Fl(A,x),onTouchStart:Fl(p,I)}]:[!1,v,{}]}function Fl(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function dx({page:t,...e}){let{router:n}=rI(),i=b.useMemo(()=>Vv(n.routes,t,n.basename),[n.routes,t,n.basename]);return i?b.createElement(mx,{page:t,matches:i,...e}):null}function ux(t){let{manifest:e,routeModules:n}=iI(),[i,s]=b.useState([]);return b.useEffect(()=>{let l=!1;return nx(t,e,n).then(d=>{l||s(d)}),()=>{l=!0}},[t,e,n]),i}function mx({page:t,matches:e,...n}){let i=an(),{future:s,manifest:l,routeModules:d}=iI(),{basename:m}=rI(),{loaderData:f,matches:g}=lx(),A=b.useMemo(()=>vE(t,e,g,l,i,"data"),[t,e,g,l,i]),p=b.useMemo(()=>vE(t,e,g,l,i,"assets"),[t,e,g,l,i]),v=b.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let N=new Set,T=!1;if(e.forEach(B=>{var F;let k=l.routes[B.route.id];!k||!k.hasLoader||(!A.some(_=>_.route.id===B.route.id)&&B.route.id in f&&((F=d[B.route.id])!=null&&F.shouldRevalidate)||k.hasClientLoader?T=!0:N.add(B.route.id))}),N.size===0)return[];let L=ex(t,m,s.unstable_trailingSlashAwareDataRequests,"data");return T&&N.size>0&&L.searchParams.set("_routes",e.filter(B=>N.has(B.route.id)).map(B=>B.route.id).join(",")),[L.pathname+L.search]},[m,s.unstable_trailingSlashAwareDataRequests,f,i,l,A,e,t,d]),I=b.useMemo(()=>rx(p,l),[p,l]),x=ux(p);return b.createElement(b.Fragment,null,v.map(N=>b.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...n})),I.map(N=>b.createElement("link",{key:N,rel:"modulepreload",href:N,...n})),x.map(({key:N,link:T})=>b.createElement("link",{key:N,nonce:n.nonce,...T})))}function gx(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var fx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fx&&(window.__reactRouterVersion="7.12.0")}catch{}function hx({basename:t,children:e,unstable_useTransitions:n,window:i}){let s=b.useRef();s.current==null&&(s.current=WS({window:i,v5Compat:!0}));let l=s.current,[d,m]=b.useState({action:l.action,location:l.location}),f=b.useCallback(g=>{n===!1?m(g):b.startTransition(()=>m(g))},[n]);return b.useLayoutEffect(()=>l.listen(f),[l,f]),b.createElement(QN,{basename:t,children:e,location:d.location,navigationType:d.action,navigator:l,unstable_useTransitions:n})}var sI=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vu=b.forwardRef(function({onClick:e,discover:n="render",prefetch:i="none",relative:s,reloadDocument:l,replace:d,state:m,target:f,to:g,preventScrollReset:A,viewTransition:p,unstable_defaultShouldRevalidate:v,...I},x){let{basename:N,unstable_useTransitions:T}=b.useContext(Zn),L=typeof g=="string"&&sI.test(g),B=Wv(g,N);g=B.to;let k=TN(g,{relative:s}),[F,_,V]=cx(i,I),U=Ex(g,{replace:d,state:m,target:f,preventScrollReset:A,relative:s,viewTransition:p,unstable_defaultShouldRevalidate:v,unstable_useTransitions:T});function O(Q){e&&e(Q),Q.defaultPrevented||U(Q)}let z=b.createElement("a",{...I,...V,href:B.absoluteURL||k,onClick:B.isExternal||l?e:O,ref:gx(x,_),target:f,"data-discover":!L&&n==="render"?"true":void 0});return F&&!L?b.createElement(b.Fragment,null,z,b.createElement(dx,{page:k})):z});Vu.displayName="Link";var px=b.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:i="",end:s=!1,style:l,to:d,viewTransition:m,children:f,...g},A){let p=Cc(d,{relative:g.relative}),v=an(),I=b.useContext(Pu),{navigator:x,basename:N}=b.useContext(Zn),T=I!=null&&Cx(p)&&m===!0,L=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,B=v.pathname,k=I&&I.navigation&&I.navigation.location?I.navigation.location.pathname:null;n||(B=B.toLowerCase(),k=k?k.toLowerCase():null,L=L.toLowerCase()),k&&N&&(k=yi(k,N)||k);const F=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let _=B===L||!s&&B.startsWith(L)&&B.charAt(F)==="/",V=k!=null&&(k===L||!s&&k.startsWith(L)&&k.charAt(L.length)==="/"),U={isActive:_,isPending:V,isTransitioning:T},O=_?e:void 0,z;typeof i=="function"?z=i(U):z=[i,_?"active":null,V?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let Q=typeof l=="function"?l(U):l;return b.createElement(Vu,{...g,"aria-current":O,className:z,ref:A,style:Q,to:d,viewTransition:m},typeof f=="function"?f(U):f)});px.displayName="NavLink";var Ax=b.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:i,replace:s,state:l,method:d=ou,action:m,onSubmit:f,relative:g,preventScrollReset:A,viewTransition:p,unstable_defaultShouldRevalidate:v,...I},x)=>{let{unstable_useTransitions:N}=b.useContext(Zn),T=Ix(),L=wx(m,{relative:g}),B=d.toLowerCase()==="get"?"get":"post",k=typeof m=="string"&&sI.test(m),F=_=>{if(f&&f(_),_.defaultPrevented)return;_.preventDefault();let V=_.nativeEvent.submitter,U=(V==null?void 0:V.getAttribute("formmethod"))||d,O=()=>T(V||_.currentTarget,{fetcherKey:e,method:U,navigate:n,replace:s,state:l,relative:g,preventScrollReset:A,viewTransition:p,unstable_defaultShouldRevalidate:v});N&&n!==!1?b.startTransition(()=>O()):O()};return b.createElement("form",{ref:x,method:B,action:L,onSubmit:i?f:F,...I,"data-discover":!k&&t==="render"?"true":void 0})});Ax.displayName="Form";function yx(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function oI(t){let e=b.useContext(Bo);return Ia(e,yx(t)),e}function Ex(t,{target:e,replace:n,state:i,preventScrollReset:s,relative:l,viewTransition:d,unstable_defaultShouldRevalidate:m,unstable_useTransitions:f}={}){let g=Ha(),A=an(),p=Cc(t,{relative:l});return b.useCallback(v=>{if(YN(v,e)){v.preventDefault();let I=n!==void 0?n:fc(A)===fc(p),x=()=>g(t,{replace:I,state:i,preventScrollReset:s,relative:l,viewTransition:d,unstable_defaultShouldRevalidate:m});f?b.startTransition(()=>x()):x()}},[A,g,p,n,i,e,t,s,l,d,m,f])}function Qu(t){Mn(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=b.useRef(kh(t)),n=b.useRef(!1),i=an(),s=b.useMemo(()=>JN(i.search,n.current?null:e.current),[i.search]),l=Ha(),d=b.useCallback((m,f)=>{const g=kh(typeof m=="function"?m(new URLSearchParams(s)):m);n.current=!0,l("?"+g,f)},[l,s]);return[s,d]}var bx=0,vx=()=>`__${String(++bx)}__`;function Ix(){let{router:t}=oI("useSubmit"),{basename:e}=b.useContext(Zn),n=jN(),i=t.fetch,s=t.navigate;return b.useCallback(async(l,d={})=>{let{action:m,method:f,encType:g,formData:A,body:p}=ZN(l,e);if(d.navigate===!1){let v=d.fetcherKey||vx();await i(v,n,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:A,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:A,body:p,formMethod:d.method||f,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:n,flushSync:d.flushSync,viewTransition:d.viewTransition})},[i,s,e,n])}function wx(t,{relative:e}={}){let{basename:n}=b.useContext(Zn),i=b.useContext(vr);Ia(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),l={...Cc(t||".",{relative:e})},d=an();if(t==null){l.search=d.search;let m=new URLSearchParams(l.search),f=m.getAll("index");if(f.some(A=>A==="")){m.delete("index"),f.filter(p=>p).forEach(p=>m.append("index",p));let A=m.toString();l.search=A?`?${A}`:""}}return(!t||t===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:Ai([n,l.pathname])),fc(l)}function Cx(t,{relative:e}={}){let n=b.useContext(Jv);Ia(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=oI("useViewTransitionState"),s=Cc(t,{relative:e});if(!n.isTransitioning)return!1;let l=yi(n.currentLocation.pathname,i)||n.currentLocation.pathname,d=yi(n.nextLocation.pathname,i)||n.nextLocation.pathname;return bu(s.pathname,d)!=null||bu(s.pathname,l)!=null}var wo=jv(),zd={exports:{}},IE;function Sx(){if(IE)return zd.exports;IE=1;const t=n=>typeof crypto<"u"&&typeof crypto.getRandomValues=="function"?()=>{const i=crypto.getRandomValues(new Uint8Array(1))[0];return(i>=n?i%n:i).toString(n)}:()=>Math.floor(Math.random()*n).toString(n),e=(n=7,i=!1)=>Array.from({length:n},t(i?16:36)).join("");return zd.exports=e,zd.exports.default=e,zd.exports}var Nx=Sx();const vu=is(Nx);var xx=()=>`uid::${vu(7)}`,Tx=(t,e=["endpointName","fingerprint"])=>typeof t=="object"&&t!==null&&e.every(n=>n in t),kx=t=>{if(!Tx(t))throw new TypeError("Invalid connection args");return JSON.stringify(t)},Lx=()=>{let t=[];return{add:(...e)=>{t=[...t,...e]},remove:e=>{t=typeof e=="string"?t.filter(n=>n.message.transactionId!==e):t.filter(n=>!e.includes(n))},entries:()=>t}},vf=class{static toBackground(t,e){return t.postMessage(e)}static toExtensionContext(t,e){return t.postMessage(e)}},cu={exports:{}},Dx=cu.exports,wE;function Rx(){return wE||(wE=1,function(t,e){(function(n,i){i(t)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Dx,function(n){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)",l=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(z,Q=void 0){super(Q),this.createItem=z}get(z){return this.has(z)||this.set(z,this.createItem(z)),super.get(z)}}const g=O=>O&&typeof O=="object"&&typeof O.then=="function",A=(O,z)=>(...Q)=>{d.runtime.lastError?O.reject(new Error(d.runtime.lastError.message)):z.singleCallbackArg||Q.length<=1&&z.singleCallbackArg!==!1?O.resolve(Q[0]):O.resolve(Q)},p=O=>O==1?"argument":"arguments",v=(O,z)=>function(K,...te){if(te.length<z.minArgs)throw new Error(`Expected at least ${z.minArgs} ${p(z.minArgs)} for ${O}(), got ${te.length}`);if(te.length>z.maxArgs)throw new Error(`Expected at most ${z.maxArgs} ${p(z.maxArgs)} for ${O}(), got ${te.length}`);return new Promise((ee,X)=>{if(z.fallbackToNoCallback)try{K[O](...te,A({resolve:ee,reject:X},z))}catch(ue){console.warn(`${O} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,ue),K[O](...te),z.fallbackToNoCallback=!1,z.noCallback=!0,ee()}else z.noCallback?(K[O](...te),ee()):K[O](...te,A({resolve:ee,reject:X},z))})},I=(O,z,Q)=>new Proxy(z,{apply(K,te,ee){return Q.call(te,O,...ee)}});let x=Function.call.bind(Object.prototype.hasOwnProperty);const N=(O,z={},Q={})=>{let K=Object.create(null),te={has(X,ue){return ue in O||ue in K},get(X,ue,W){if(ue in K)return K[ue];if(!(ue in O))return;let ae=O[ue];if(typeof ae=="function")if(typeof z[ue]=="function")ae=I(O,O[ue],z[ue]);else if(x(Q,ue)){let be=v(ue,Q[ue]);ae=I(O,O[ue],be)}else ae=ae.bind(O);else if(typeof ae=="object"&&ae!==null&&(x(z,ue)||x(Q,ue)))ae=N(ae,z[ue],Q[ue]);else if(x(Q,"*"))ae=N(ae,z[ue],Q["*"]);else return Object.defineProperty(K,ue,{configurable:!0,enumerable:!0,get(){return O[ue]},set(be){O[ue]=be}}),ae;return K[ue]=ae,ae},set(X,ue,W,ae){return ue in K?K[ue]=W:O[ue]=W,!0},defineProperty(X,ue,W){return Reflect.defineProperty(K,ue,W)},deleteProperty(X,ue){return Reflect.deleteProperty(K,ue)}},ee=Object.create(O);return new Proxy(ee,te)},T=O=>({addListener(z,Q,...K){z.addListener(O.get(Q),...K)},hasListener(z,Q){return z.hasListener(O.get(Q))},removeListener(z,Q){z.removeListener(O.get(Q))}}),L=new f(O=>typeof O!="function"?O:function(Q){const K=N(Q,{},{getContent:{minArgs:0,maxArgs:0}});O(K)});let B=!1;const k=new f(O=>typeof O!="function"?O:function(Q,K,te){let ee=!1,X,ue=new Promise(se=>{X=function(P){B||(console.warn(s,new Error().stack),B=!0),ee=!0,se(P)}}),W;try{W=O(Q,K,X)}catch(se){W=Promise.reject(se)}const ae=W!==!0&&g(W);if(W!==!0&&!ae&&!ee)return!1;const be=se=>{se.then(P=>{te(P)},P=>{let q;P&&(P instanceof Error||typeof P.message=="string")?q=P.message:q="An unexpected error occurred",te({__mozWebExtensionPolyfillReject__:!0,message:q})}).catch(P=>{console.error("Failed to send onMessage rejected reply",P)})};return be(ae?W:ue),!0}),F=({reject:O,resolve:z},Q)=>{d.runtime.lastError?d.runtime.lastError.message===i?z():O(new Error(d.runtime.lastError.message)):Q&&Q.__mozWebExtensionPolyfillReject__?O(new Error(Q.message)):z(Q)},_=(O,z,Q,...K)=>{if(K.length<z.minArgs)throw new Error(`Expected at least ${z.minArgs} ${p(z.minArgs)} for ${O}(), got ${K.length}`);if(K.length>z.maxArgs)throw new Error(`Expected at most ${z.maxArgs} ${p(z.maxArgs)} for ${O}(), got ${K.length}`);return new Promise((te,ee)=>{const X=F.bind(null,{resolve:te,reject:ee});K.push(X),Q.sendMessage(...K)})},V={devtools:{network:{onRequestFinished:T(L)}},runtime:{onMessage:T(k),onMessageExternal:T(k),sendMessage:_.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:_.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},U={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return m.privacy={network:{"*":U},services:{"*":U},websites:{"*":U}},N(d,V,m)};n.exports=l(chrome)}else n.exports=globalThis.browser})}(cu)),cu.exports}var Bx=Rx();const Ux=is(Bx);var Mx=(t="")=>{const e=xx();let n,i=[];const s=Lx(),l=new Set,d=new Set,m=(g,A)=>{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,v)=>v.resolvedDestination===g.deliverableTo?(vf.toBackground(A,{type:"deliver",message:v.message}),p):[...p,v],[]);return;case"delivered":g.receipt.message.messageType==="message"&&s.add(g.receipt);return;case"incoming":g.message.messageType==="reply"&&s.remove(g.message.messageID),l.forEach(p=>p(g.message,A));return;case"terminated":{const p=s.entries().filter(v=>g.fingerprint===v.to);s.remove(p),p.forEach(({message:v})=>d.forEach(I=>I(v)))}}},f=()=>{n=Ux.runtime.connect({name:kx({endpointName:t,fingerprint:e})}),n.onMessage.addListener(m),n.onDisconnect.addListener(f),vf.toBackground(n,{type:"sync",pendingResponses:s.entries(),pendingDeliveries:[...new Set(i.map(({resolvedDestination:g})=>g))]})};return f(),{onFailure(g){d.add(g)},onMessage(g){l.add(g)},postMessage(g){vf.toBackground(n,{type:"deliver",message:g})}}},_x=Object.defineProperty,Fx=Object.defineProperties,Ox=Object.getOwnPropertyDescriptors,CE=Object.getOwnPropertySymbols,jx=Object.prototype.hasOwnProperty,Px=Object.prototype.propertyIsEnumerable,SE=(t,e,n)=>e in t?_x(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lI=(t,e)=>{for(var n in e||(e={}))jx.call(e,n)&&SE(t,n,e[n]);if(CE)for(var n of CE(e))Px.call(e,n)&&SE(t,n,e[n]);return t},cI=(t,e)=>Fx(t,Ox(e)),Hx=/^((?:background$)|devtools|popup|options|content-script|window)(?:@(\d+)(?:\.(\d+))?)?$/,dI=t=>{const[,e,n,i]=t.match(Hx)||[];return{context:e,tabId:+n,frameId:i?+i:void 0}};const zx=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],Lh=Symbol(".toJSON was called"),Vx=t=>{t[Lh]=!0;const e=t.toJSON();return delete t[Lh],e},uI=({from:t,seen:e,to_:n,forceEnumerable:i,maxDepth:s,depth:l})=>{const d=n||(Array.isArray(t)?[]:{});if(e.push(t),l>=s)return d;if(typeof t.toJSON=="function"&&t[Lh]!==!0)return Vx(t);for(const[m,f]of Object.entries(t)){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(t[m])){l++,d[m]=uI({from:t[m],seen:[...e],forceEnumerable:i,maxDepth:s,depth:l});continue}d[m]="[Circular]"}}for(const{property:m,enumerable:f}of zx)typeof t[m]=="string"&&Object.defineProperty(d,m,{value:t[m],enumerable:!0,configurable:!0,writable:!0});return d};function Qx(t,e={}){const{maxDepth:n=Number.POSITIVE_INFINITY}=e;return typeof t=="object"&&t!==null?uI({from:t,seen:[],forceEnumerable:!0,maxDepth:n,depth:0}):typeof t=="function"?`[Function: ${t.name||"anonymous"}]`:t}let mI=()=>({events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}});var Kx=(t,e,n)=>{const i=vu(),s=new Map,l=new Map,d=m=>{if(m.destination.context===t&&!m.destination.frameId&&!m.destination.tabId){const{transactionId:f,messageID:g,messageType:A}=m,p=()=>{const I=s.get(f);if(I){const{err:x,data:N}=m;if(x){const T=x,L=self[T.name],B=new(typeof L=="function"?L:Error)(T.message);for(const k in T)B[k]=T[k];I.reject(B)}else I.resolve(N);s.delete(f)}},v=async()=>{let I,x,N=!1;try{const T=l.get(g);if(typeof T=="function")I=await T({sender:m.origin,id:g,data:m.data,timestamp:m.timestamp});else throw N=!0,new Error(`[webext-bridge] No handler registered in '${t}' to accept messages with id '${g}'`)}catch(T){x=T}finally{if(x&&(m.err=Qx(x)),d(cI(lI({},m),{messageType:"reply",data:I,origin:{context:t,tabId:null},destination:m.origin,hops:[]})),x&&!N)throw I}};switch(A){case"reply":return p();case"message":return v()}}return m.hops.push(`${t}::${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 A=typeof g=="string"?dI(g):g,p="Bridge#sendMessage ->";if(!A.context)throw new TypeError(`${p} Destination must be any one of known destinations`);return new Promise((v,I)=>{const x={messageID:m,data:f,destination:A,messageType:"message",transactionId:vu(),origin:{context:t,tabId:null},hops:[],timestamp:Date.now()};s.set(x.transactionId,{resolve:v,reject:I});try{d(x)}catch(N){s.delete(x.transactionId),I(N)}})},onMessage:(m,f)=>(l.set(m,f),()=>l.delete(m))}},Io=class{constructor(t,e){this.endpointRuntime=t,this.streamInfo=e,this.emitter=mI(),this.isClosed=!1,this.handleStreamClose=()=>{this.isClosed||(this.isClosed=!0,this.emitter.emit("closed",!0),this.emitter.events={})},Io.initDone||(t.onMessage("__crx_bridge_stream_transfer__",n=>{const{streamId:i,streamTransfer:s,action:l}=n.data,d=Io.openStreams.get(i);d&&!d.isClosed&&(l==="transfer"&&d.emitter.emit("message",s),l==="close"&&(Io.openStreams.delete(i),d.handleStreamClose()))}),Io.initDone=!0),Io.openStreams.set(this.streamInfo.streamId,this)}get info(){return this.streamInfo}send(t){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:t,action:"transfer"},this.streamInfo.endpoint)}close(t){t&&this.send(t),this.handleStreamClose(),this.endpointRuntime.sendMessage("__crx_bridge_stream_transfer__",{streamId:this.streamInfo.streamId,streamTransfer:null,action:"close"},this.streamInfo.endpoint)}onMessage(t){return this.getDisposable("message",t)}onClose(t){return this.getDisposable("closed",t)}getDisposable(t,e){const n=this.emitter.on(t,e);return Object.assign(n,{dispose:n,close:n})}},Iu=Io;Iu.initDone=!1;Iu.openStreams=new Map;var Gx=t=>{const e=new Map,n=new Map,i=mI();t.onMessage("__crx_bridge_stream_open__",d=>new Promise(m=>{const{sender:f,data:g}=d,{channel:A}=g;let p=!1,v=()=>{};const I=()=>{const x=n.get(A);typeof x=="function"?(x(new Iu(t,cI(lI({},g),{endpoint:f}))),p&&v(),m(!0)):p||(p=!0,v=i.on("did-change-stream-callbacks",I))};I()}));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"?dI(m):m,g={streamId:vu(),channel:d,endpoint:f},A=new Iu(t,g);return A.onClose(()=>e.delete(d)),await t.sendMessage("__crx_bridge_stream_open__",g,f),e.set(d,A),A}function l(d,m){if(n.has(d))throw new Error("webext-bridge: This channel has already been claimed. Stream allows only one-on-one communication");n.set(d,m),i.emit("did-change-stream-callbacks")}return{openStream:s,onOpenStreamChannel:l}},gI=Mx("popup"),mp=Kx("popup",t=>gI.postMessage(t));gI.onMessage(mp.handleMessage);var{sendMessage:wt,onMessage:If}=mp;Gx(mp);const gp=b.forwardRef(({isVisible:t,colorClass:e="bg-orange-500"},n)=>{const i=b.useRef(null),s=d=>{setTimeout(()=>{i.current&&(i.current.style.transition="none",i.current.style.width="100%",i.current.offsetHeight,requestAnimationFrame(()=>{i.current&&(i.current.style.transition=`width ${d}s linear`,i.current.style.width="0%")}))},10)},l=()=>{i.current&&(i.current.style.transition="none",i.current.style.width="0%")};return b.useImperativeHandle(n,()=>({startAnimation:s,stopAnimation:l})),b.useEffect(()=>{t||l()},[t]),t?c.jsx("div",{className:"fixed top-0 left-0 right-0 z-[60] h-1 bg-gray-200 dark:bg-gray-700",children:c.jsx("div",{ref:i,className:`h-full ${e}`,style:{width:"100%",transition:"none"}})}):null});gp.displayName="CountdownBar";const qx=()=>{const[t,e]=b.useState(!1),n=b.useRef(null),i=b.useRef(0),s=(d,m)=>{var g;const f=d/m;(g=n.current)==null||g.startAnimation(d*f)},l=()=>{var d;(d=n.current)==null||d.stopAnimation()};return b.useEffect(()=>{wt("GET_CLIPBOARD_COUNTDOWN_STATE",{},"background").then(g=>{const A=g;A&&A.remaining>0&&(i.current=A.id,e(!0),setTimeout(()=>{s(A.remaining,A.total)},0))}).catch(()=>{});const d=If("CLIPBOARD_COUNTDOWN",({data:g})=>{const{remaining:A,total:p,id:v}=g;e(A>0),v!==i.current&&A>0&&(i.current=v,setTimeout(()=>{s(A,p)},0))}),m=If("CLIPBOARD_CLEARED",()=>{e(!1),i.current=0,l()}),f=If("CLIPBOARD_COUNTDOWN_CANCELLED",()=>{e(!1),i.current=0,l()});return()=>{d(),m(),f()}},[]),c.jsx(gp,{ref:n,isVisible:t,colorClass:"bg-orange-500"})},Wx=()=>{const{t}=nt(),e=Ha(),n=an(),[i,s]=b.useState("items");b.useEffect(()=>{const A=n.pathname.substring(1),v=["items","emails","settings"].find(I=>A===I||A.startsWith(`${I}/`));v&&s(v)},[n]);const l=A=>{s(A),A==="items"?e(`/${A}`,{state:{resetFilters:!0}}):e(`/${A}`)};return["/","/login","/auth-settings","/unlock","/unlock-success","/upgrade"].includes(n.pathname)||new URLSearchParams(window.location.search).get("mode")==="inline_unlock"?null:c.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:c.jsxs("div",{className:"flex justify-around items-center h-14",children:[c.jsxs("button",{onClick:()=>l("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:[c.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.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"})}),c.jsx("span",{className:"text-sm mt-1",children:t("menu.vault")})]}),c.jsxs("button",{onClick:()=>l("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:[c.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.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"})}),c.jsx("span",{className:"text-sm mt-1",children:t("menu.emails")})]}),c.jsxs("button",{onClick:()=>l("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:[c.jsxs("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[c.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"}),c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),c.jsx("span",{className:"text-sm mt-1",children:t("common.settings")})]})]})})},Yx="#EEC170",Jx=["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","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","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","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","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"],fI=({className:t="",width:e=200,height:n=50,showText:i=!0,color:s="currentColor"})=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",version:"1.1",viewBox:"0 0 2000 500",width:e,height:n,className:t,children:[Jx.map((l,d)=>c.jsx("path",{d:l,fill:Yx},d)),i&&c.jsx("text",{x:"550",y:"355",fontFamily:"Arial, Helvetica, sans-serif",fontWeight:"700",fontSize:"290",letterSpacing:"-7",fill:s,children:"AliasVault"})]});var NE=Object.prototype.hasOwnProperty;function Dh(t,e){var n,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((i=t.length)===e.length)for(;i--&&Dh(t[i],e[i]););return i===-1}if(!n||typeof t=="object"){i=0;for(n in t)if(NE.call(t,n)&&++i&&!NE.call(e,n)||!(n in e)||!Dh(t[n],e[n]))return!1;return Object.keys(e).length===i}}return t!==t&&e!==e}const Xx=new Error("request for lock canceled");var $x=function(t,e,n,i){function s(l){return l instanceof n?l:new n(function(d){d(l)})}return new(n||(n=Promise))(function(l,d){function m(A){try{g(i.next(A))}catch(p){d(p)}}function f(A){try{g(i.throw(A))}catch(p){d(p)}}function g(A){A.done?l(A.value):s(A.value).then(m,f)}g((i=i.apply(t,e||[])).next())})};class Zx{constructor(e,n=Xx){this._value=e,this._cancelError=n,this._queue=[],this._weightedWaiters=[]}acquire(e=1,n=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((i,s)=>{const l={resolve:i,reject:s,weight:e,priority:n},d=hI(this._queue,m=>n<=m.priority);d===-1&&e<=this._value?this._dispatchItem(l):this._queue.splice(d+1,0,l)})}runExclusive(e){return $x(this,arguments,void 0,function*(n,i=1,s=0){const[l,d]=yield this.acquire(i,s);try{return yield n(l)}finally{d()}})}waitForUnlock(e=1,n=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,n)?Promise.resolve():new Promise(i=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),eT(this._weightedWaiters[e-1],{resolve:i,priority:n})})}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 n=this._value;this._value-=e.weight,e.resolve([n,this._newReleaser(e.weight)])}_newReleaser(e){let n=!1;return()=>{n||(n=!0,this.release(e))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let e=this._value;e>0;e--){const n=this._weightedWaiters[e-1];n&&(n.forEach(i=>i.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let n=this._value;n>0;n--){const i=this._weightedWaiters[n-1];if(!i)continue;const s=i.findIndex(l=>l.priority<=e);(s===-1?i:i.splice(0,s)).forEach(l=>l.resolve())}}}_couldLockImmediately(e,n){return(this._queue.length===0||this._queue[0].priority<n)&&e<=this._value}}function eT(t,e){const n=hI(t,i=>e.priority<=i.priority);t.splice(n+1,0,e)}function hI(t,e){for(let n=t.length-1;n>=0;n--)if(e(t[n]))return n;return-1}var tT=function(t,e,n,i){function s(l){return l instanceof n?l:new n(function(d){d(l)})}return new(n||(n=Promise))(function(l,d){function m(A){try{g(i.next(A))}catch(p){d(p)}}function f(A){try{g(i.throw(A))}catch(p){d(p)}}function g(A){A.done?l(A.value):s(A.value).then(m,f)}g((i=i.apply(t,e||[])).next())})};class aT{constructor(e){this._semaphore=new Zx(1,e)}acquire(){return tT(this,arguments,void 0,function*(e=0){const[,n]=yield this._semaphore.acquire(1,e);return n})}runExclusive(e,n=0){return this._semaphore.runExclusive(()=>e(),1,n)}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 Mv,_v;const du=((_v=(Mv=globalThis.browser)==null?void 0:Mv.runtime)==null?void 0:_v.id)==null?globalThis.chrome:globalThis.browser,Te=nT();function nT(){const t={local:Vd("local"),session:Vd("session"),sync:Vd("sync"),managed:Vd("managed")},e=N=>{const T=t[N];if(T==null){const L=Object.keys(t).join(", ");throw Error(`Invalid area "${N}". Options: ${L}`)}return T},n=N=>{const T=N.indexOf(":"),L=N.substring(0,T),B=N.substring(T+1);if(B==null)throw Error(`Storage key should be in the form of "area:key", but received "${N}"`);return{driverArea:L,driverKey:B,driver:e(L)}},i=N=>N+"$",s=(N,T)=>{const L={...N};return Object.entries(T).forEach(([B,k])=>{k==null?delete L[B]:L[B]=k}),L},l=(N,T)=>N??T??null,d=N=>typeof N=="object"&&!Array.isArray(N)?N:{},m=async(N,T,L)=>{const B=await N.getItem(T);return l(B,(L==null?void 0:L.fallback)??(L==null?void 0:L.defaultValue))},f=async(N,T)=>{const L=i(T),B=await N.getItem(L);return d(B)},g=async(N,T,L)=>{await N.setItem(T,L??null)},A=async(N,T,L)=>{const B=i(T),k=d(await N.getItem(B));await N.setItem(B,s(k,L))},p=async(N,T,L)=>{if(await N.removeItem(T),L!=null&&L.removeMeta){const B=i(T);await N.removeItem(B)}},v=async(N,T,L)=>{const B=i(T);if(L==null)await N.removeItem(B);else{const k=d(await N.getItem(B));[L].flat().forEach(F=>delete k[F]),await N.setItem(B,k)}},I=(N,T,L)=>N.watch(T,L);return{getItem:async(N,T)=>{const{driver:L,driverKey:B}=n(N);return await m(L,B,T)},getItems:async N=>{const T=new Map,L=new Map,B=[];N.forEach(F=>{let _,V;typeof F=="string"?_=F:"getValue"in F?(_=F.key,V={fallback:F.fallback}):(_=F.key,V=F.options),B.push(_);const{driverArea:U,driverKey:O}=n(_),z=T.get(U)??[];T.set(U,z.concat(O)),L.set(_,V)});const k=new Map;return await Promise.all(Array.from(T.entries()).map(async([F,_])=>{(await t[F].getItems(_)).forEach(U=>{const O=`${F}:${U.key}`,z=L.get(O),Q=l(U.value,(z==null?void 0:z.fallback)??(z==null?void 0:z.defaultValue));k.set(O,Q)})})),B.map(F=>({key:F,value:k.get(F)}))},getMeta:async N=>{const{driver:T,driverKey:L}=n(N);return await f(T,L)},getMetas:async N=>{const T=N.map(k=>{const F=typeof k=="string"?k:k.key,{driverArea:_,driverKey:V}=n(F);return{key:F,driverArea:_,driverKey:V,driverMetaKey:i(V)}}),L=T.reduce((k,F)=>{var _;return k[_=F.driverArea]??(k[_]=[]),k[F.driverArea].push(F),k},{}),B={};return await Promise.all(Object.entries(L).map(async([k,F])=>{const _=await du.storage[k].get(F.map(V=>V.driverMetaKey));F.forEach(V=>{B[V.key]=_[V.driverMetaKey]??{}})})),T.map(k=>({key:k.key,meta:B[k.key]}))},setItem:async(N,T)=>{const{driver:L,driverKey:B}=n(N);await g(L,B,T)},setItems:async N=>{const T={};N.forEach(L=>{const{driverArea:B,driverKey:k}=n("key"in L?L.key:L.item.key);T[B]??(T[B]=[]),T[B].push({key:k,value:L.value})}),await Promise.all(Object.entries(T).map(async([L,B])=>{await e(L).setItems(B)}))},setMeta:async(N,T)=>{const{driver:L,driverKey:B}=n(N);await A(L,B,T)},setMetas:async N=>{const T={};N.forEach(L=>{const{driverArea:B,driverKey:k}=n("key"in L?L.key:L.item.key);T[B]??(T[B]=[]),T[B].push({key:k,properties:L.meta})}),await Promise.all(Object.entries(T).map(async([L,B])=>{const k=e(L),F=B.map(({key:O})=>i(O));console.log(L,F);const _=await k.getItems(F),V=Object.fromEntries(_.map(({key:O,value:z})=>[O,d(z)])),U=B.map(({key:O,properties:z})=>{const Q=i(O);return{key:Q,value:s(V[Q]??{},z)}});await k.setItems(U)}))},removeItem:async(N,T)=>{const{driver:L,driverKey:B}=n(N);await p(L,B,T)},removeItems:async N=>{const T={};N.forEach(L=>{let B,k;typeof L=="string"?B=L:"getValue"in L?B=L.key:"item"in L?(B=L.item.key,k=L.options):(B=L.key,k=L.options);const{driverArea:F,driverKey:_}=n(B);T[F]??(T[F]=[]),T[F].push(_),k!=null&&k.removeMeta&&T[F].push(i(_))}),await Promise.all(Object.entries(T).map(async([L,B])=>{await e(L).removeItems(B)}))},clear:async N=>{await e(N).clear()},removeMeta:async(N,T)=>{const{driver:L,driverKey:B}=n(N);await v(L,B,T)},snapshot:async(N,T)=>{var k;const B=await e(N).snapshot();return(k=T==null?void 0:T.excludeKeys)==null||k.forEach(F=>{delete B[F],delete B[i(F)]}),B},restoreSnapshot:async(N,T)=>{await e(N).restoreSnapshot(T)},watch:(N,T)=>{const{driver:L,driverKey:B}=n(N);return I(L,B,T)},unwatch(){Object.values(t).forEach(N=>{N.unwatch()})},defineItem:(N,T)=>{const{driver:L,driverKey:B}=n(N),{version:k=1,migrations:F={}}=T??{};if(k<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const _=async()=>{var W;const Q=i(B),[{value:K},{value:te}]=await L.getItems([B,Q]);if(K==null)return;const ee=(te==null?void 0:te.v)??1;if(ee>k)throw Error(`Version downgrade detected (v${ee} -> v${k}) for "${N}"`);if(ee===k)return;console.debug(`[@wxt-dev/storage] Running storage migration for ${N}: v${ee} -> v${k}`);const X=Array.from({length:k-ee},(ae,be)=>ee+be+1);let ue=K;for(const ae of X)try{ue=await((W=F==null?void 0:F[ae])==null?void 0:W.call(F,ue))??ue}catch(be){throw new rT(N,ae,{cause:be})}await L.setItems([{key:B,value:ue},{key:Q,value:{...te,v:k}}]),console.debug(`[@wxt-dev/storage] Storage migration completed for ${N} v${k}`,{migratedValue:ue})},V=(T==null?void 0:T.migrations)==null?Promise.resolve():_().catch(Q=>{console.error(`[@wxt-dev/storage] Migration failed for ${N}`,Q)}),U=new aT,O=()=>(T==null?void 0:T.fallback)??(T==null?void 0:T.defaultValue)??null,z=()=>U.runExclusive(async()=>{const Q=await L.getItem(B);if(Q!=null||(T==null?void 0:T.init)==null)return Q;const K=await T.init();return await L.setItem(B,K),K});return V.then(z),{key:N,get defaultValue(){return O()},get fallback(){return O()},getValue:async()=>(await V,T!=null&&T.init?await z():await m(L,B,T)),getMeta:async()=>(await V,await f(L,B)),setValue:async Q=>(await V,await g(L,B,Q)),setMeta:async Q=>(await V,await A(L,B,Q)),removeValue:async Q=>(await V,await p(L,B,Q)),removeMeta:async Q=>(await V,await v(L,B,Q)),watch:Q=>I(L,B,(K,te)=>Q(K??O(),te??O())),migrate:_}}}}function Vd(t){const e=()=>{if(du.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(du.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const i=du.storage[t];if(i==null)throw Error(`"browser.storage.${t}" is undefined`);return i},n=new Set;return{getItem:async i=>(await e().get(i))[i],getItems:async i=>{const s=await e().get(i);return i.map(l=>({key:l,value:s[l]??null}))},setItem:async(i,s)=>{s==null?await e().remove(i):await e().set({[i]:s})},setItems:async i=>{const s=i.reduce((l,{key:d,value:m})=>(l[d]=m,l),{});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 l=d=>{const m=d[i];m!=null&&(Dh(m.newValue,m.oldValue)||s(m.newValue??null,m.oldValue??null))};return e().onChanged.addListener(l),n.add(l),()=>{e().onChanged.removeListener(l),n.delete(l)}},unwatch(){n.forEach(i=>{e().onChanged.removeListener(i)}),n.clear()}}}class rT extends Error{constructor(e,n,i){super(`v${n} migration failed for "${e}"`,i),this.key=e,this.version=n}}var wf={exports:{}};const iT={},sT=Object.freeze(Object.defineProperty({__proto__:null,default:iT},Symbol.toStringTag,{value:"Module"})),xE=vS(sT);var TE;function oT(){return TE||(TE=1,function(t,e){var n=void 0,i=function(s){return n||(n=new Promise(function(l,d){var m=typeof s<"u"?s:{},f=m.onAbort;m.onAbort=function(y){d(new Error(y)),f&&f(y)},m.postRun=m.postRun||[],m.postRun.push(function(){l(m)}),t=void 0;var g;g||(g=typeof m<"u"?m:{});var A=typeof window=="object",p=typeof WorkerGlobalScope<"u",v=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";g.onRuntimeInitialized=function(){function y(de,Be){switch(typeof Be){case"boolean":Em(de,Be?1:0);break;case"number":pm(de,Be);break;case"string":Am(de,Be,-1,-1);break;case"object":if(Be===null)jc(de);else if(Be.length!=null){var Ye=vi(Be,os);ym(de,Ye,Be.length,-1),wi(Ye)}else Si(de,"Wrong API use : tried to return a value of an unknown type ("+Be+").",-1);break;default:jc(de)}}function w(de,Be){for(var Ye=[],st=0;st<de;st+=1){var dt=ht(Be+4*st,"i32"),Jt=Oc(dt);if(Jt===1||Jt===2)dt=hm(dt);else if(Jt===3)dt=gm(dt);else if(Jt===4){Jt=dt,dt=mm(Jt),Jt=fm(Jt);for(var jn=new Uint8Array(dt),kn=0;kn<dt;kn+=1)jn[kn]=Q[Jt+kn];dt=jn}else dt=null;Ye.push(dt)}return Ye}function R(de,Be){this.Qa=de,this.db=Be,this.Oa=1,this.lb=[]}function H(de,Be){if(this.db=Be,Be=Yt(de)+1,this.eb=Hs(Be),this.eb===null)throw Error("Unable to allocate memory for the SQL string");M(de,K,this.eb,Be),this.kb=this.eb,this.Za=this.pb=null}function Z(de){if(this.filename="dbfile_"+(4294967295*Math.random()>>>0),de!=null){var Be=this.filename,Ye="/",st=Be;if(Ye&&(Ye=typeof Ye=="string"?Ye:ka(Ye),st=Be?De(Ye+"/"+Be):Ye),Be=ct(!0,!0),st=J(st,Be),de){if(typeof de=="string"){Ye=Array(de.length);for(var dt=0,Jt=de.length;dt<Jt;++dt)Ye[dt]=de.charCodeAt(dt);de=Ye}La(st,Be|146),Ye=ma(st,577),Rc(Ye,de,0,de.length,0),On(Ye),La(st,Be)}}this.handleError(We(this.filename,me)),this.db=ht(me,"i32"),Pc(this.db),this.fb={},this.Sa={}}var me=tr(4),ve=g.cwrap,We=ve("sqlite3_open","number",["string","number"]),vt=ve("sqlite3_close_v2","number",["number"]),At=ve("sqlite3_exec","number",["number","string","number","number","number"]),Ea=ve("sqlite3_changes","number",["number"]),Ja=ve("sqlite3_prepare_v2","number",["number","string","number","number","number"]),zs=ve("sqlite3_sql","string",["number"]),ls=ve("sqlite3_normalized_sql","string",["number"]),cs=ve("sqlite3_prepare_v2","number",["number","number","number","number","number"]),Mc=ve("sqlite3_bind_text","number",["number","number","number","number","number"]),_c=ve("sqlite3_bind_blob","number",["number","number","number","number","number"]),Zu=ve("sqlite3_bind_double","number",["number","number","number"]),em=ve("sqlite3_bind_int","number",["number","number","number"]),Go=ve("sqlite3_bind_parameter_index","number",["number","string"]),tm=ve("sqlite3_step","number",["number"]),am=ve("sqlite3_errmsg","string",["number"]),nm=ve("sqlite3_column_count","number",["number"]),rm=ve("sqlite3_data_count","number",["number"]),im=ve("sqlite3_column_double","number",["number","number"]),qo=ve("sqlite3_column_text","string",["number","number"]),sm=ve("sqlite3_column_blob","number",["number","number"]),om=ve("sqlite3_column_bytes","number",["number","number"]),lm=ve("sqlite3_column_type","number",["number","number"]),cm=ve("sqlite3_column_name","string",["number","number"]),Wo=ve("sqlite3_reset","number",["number"]),dm=ve("sqlite3_clear_bindings","number",["number"]),um=ve("sqlite3_finalize","number",["number"]),Fc=ve("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),Oc=ve("sqlite3_value_type","number",["number"]),mm=ve("sqlite3_value_bytes","number",["number"]),gm=ve("sqlite3_value_text","string",["number"]),fm=ve("sqlite3_value_blob","number",["number"]),hm=ve("sqlite3_value_double","number",["number"]),pm=ve("sqlite3_result_double","",["number","number"]),jc=ve("sqlite3_result_null","",["number"]),Am=ve("sqlite3_result_text","",["number","string","number","number"]),ym=ve("sqlite3_result_blob","",["number","number","number","number"]),Em=ve("sqlite3_result_int","",["number","number"]),Si=ve("sqlite3_result_error","",["number","string","number"]),Ni=ve("sqlite3_aggregate_context","number",["number","number"]),Pc=ve("RegisterExtensionFunctions","number",["number"]),Yo=ve("sqlite3_update_hook","number",["number","number","number"]);R.prototype.bind=function(de){if(!this.Qa)throw"Statement closed";return this.reset(),Array.isArray(de)?this.Cb(de):de!=null&&typeof de=="object"?this.Db(de):!0},R.prototype.step=function(){if(!this.Qa)throw"Statement closed";this.Oa=1;var de=tm(this.Qa);switch(de){case 100:return!0;case 101:return!1;default:throw this.db.handleError(de)}},R.prototype.wb=function(de){return de==null&&(de=this.Oa,this.Oa+=1),im(this.Qa,de)},R.prototype.Gb=function(de){if(de==null&&(de=this.Oa,this.Oa+=1),de=qo(this.Qa,de),typeof BigInt!="function")throw Error("BigInt is not supported");return BigInt(de)},R.prototype.Hb=function(de){return de==null&&(de=this.Oa,this.Oa+=1),qo(this.Qa,de)},R.prototype.getBlob=function(de){de==null&&(de=this.Oa,this.Oa+=1);var Be=om(this.Qa,de);de=sm(this.Qa,de);for(var Ye=new Uint8Array(Be),st=0;st<Be;st+=1)Ye[st]=Q[de+st];return Ye},R.prototype.get=function(de,Be){Be=Be||{},de!=null&&this.bind(de)&&this.step(),de=[];for(var Ye=rm(this.Qa),st=0;st<Ye;st+=1)switch(lm(this.Qa,st)){case 1:var dt=Be.useBigInt?this.Gb(st):this.wb(st);de.push(dt);break;case 2:de.push(this.wb(st));break;case 3:de.push(this.Hb(st));break;case 4:de.push(this.getBlob(st));break;default:de.push(null)}return de},R.prototype.getColumnNames=function(){for(var de=[],Be=nm(this.Qa),Ye=0;Ye<Be;Ye+=1)de.push(cm(this.Qa,Ye));return de},R.prototype.getAsObject=function(de,Be){de=this.get(de,Be),Be=this.getColumnNames();for(var Ye={},st=0;st<Be.length;st+=1)Ye[Be[st]]=de[st];return Ye},R.prototype.getSQL=function(){return zs(this.Qa)},R.prototype.getNormalizedSQL=function(){return ls(this.Qa)},R.prototype.run=function(de){return de!=null&&this.bind(de),this.step(),this.reset()},R.prototype.sb=function(de,Be){Be==null&&(Be=this.Oa,this.Oa+=1),de=C(de);var Ye=vi(de,os);this.lb.push(Ye),this.db.handleError(Mc(this.Qa,Be,Ye,de.length-1,0))},R.prototype.Bb=function(de,Be){Be==null&&(Be=this.Oa,this.Oa+=1);var Ye=vi(de,os);this.lb.push(Ye),this.db.handleError(_c(this.Qa,Be,Ye,de.length,0))},R.prototype.rb=function(de,Be){Be==null&&(Be=this.Oa,this.Oa+=1),this.db.handleError((de===(de|0)?em:Zu)(this.Qa,Be,de))},R.prototype.Eb=function(de){de==null&&(de=this.Oa,this.Oa+=1),_c(this.Qa,de,0,0,0)},R.prototype.tb=function(de,Be){switch(Be==null&&(Be=this.Oa,this.Oa+=1),typeof de){case"string":this.sb(de,Be);return;case"number":this.rb(de,Be);return;case"bigint":this.sb(de.toString(),Be);return;case"boolean":this.rb(de+0,Be);return;case"object":if(de===null){this.Eb(Be);return}if(de.length!=null){this.Bb(de,Be);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+de+")."},R.prototype.Db=function(de){var Be=this;return Object.keys(de).forEach(function(Ye){var st=Go(Be.Qa,Ye);st!==0&&Be.tb(de[Ye],st)}),!0},R.prototype.Cb=function(de){for(var Be=0;Be<de.length;Be+=1)this.tb(de[Be],Be+1);return!0},R.prototype.reset=function(){return this.freemem(),dm(this.Qa)===0&&Wo(this.Qa)===0},R.prototype.freemem=function(){for(var de;(de=this.lb.pop())!==void 0;)wi(de)},R.prototype.free=function(){this.freemem();var de=um(this.Qa)===0;return delete this.db.fb[this.Qa],this.Qa=0,de},H.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 de=fr(),Be=tr(4);Ge(me),Ge(Be);try{this.db.handleError(cs(this.db.db,this.kb,-1,me,Be)),this.kb=ht(Be,"i32");var Ye=ht(me,"i32");return Ye===0?(this.mb(),{done:!0}):(this.Za=new R(Ye,this.db),this.db.fb[Ye]=this.Za,{value:this.Za,done:!1})}catch(st){throw this.pb=Fe(this.kb),this.mb(),st}finally{vn(de)}},H.prototype.mb=function(){wi(this.eb),this.eb=null},H.prototype.getRemainingSQL=function(){return this.pb!==null?this.pb:Fe(this.kb)},typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"&&(H.prototype[Symbol.iterator]=function(){return this}),Z.prototype.run=function(de,Be){if(!this.db)throw"Database closed";if(Be){de=this.prepare(de,Be);try{de.step()}finally{de.free()}}else this.handleError(At(this.db,de,0,0,me));return this},Z.prototype.exec=function(de,Be,Ye){if(!this.db)throw"Database closed";var st=fr(),dt=null;try{var Jt=Vo(de),jn=tr(4);for(de=[];ht(Jt,"i8")!==0;){Ge(me),Ge(jn),this.handleError(cs(this.db,Jt,-1,me,jn));var kn=ht(me,"i32");if(Jt=ht(jn,"i32"),kn!==0){var pn=null;for(dt=new R(kn,this),Be!=null&&dt.bind(Be);dt.step();)pn===null&&(pn={columns:dt.getColumnNames(),values:[]},de.push(pn)),pn.values.push(dt.get(null,Ye));dt.free()}}return de}catch(Ln){throw dt&&dt.free(),Ln}finally{vn(st)}},Z.prototype.each=function(de,Be,Ye,st,dt){typeof Be=="function"&&(st=Ye,Ye=Be,Be=void 0),de=this.prepare(de,Be);try{for(;de.step();)Ye(de.getAsObject(null,dt))}finally{de.free()}if(typeof st=="function")return st()},Z.prototype.prepare=function(de,Be){if(Ge(me),this.handleError(Ja(this.db,de,-1,me,0)),de=ht(me,"i32"),de===0)throw"Nothing to prepare";var Ye=new R(de,this);return Be!=null&&Ye.bind(Be),this.fb[de]=Ye},Z.prototype.iterateStatements=function(de){return new H(de,this)},Z.prototype.export=function(){Object.values(this.fb).forEach(function(Be){Be.free()}),Object.values(this.Sa).forEach(er),this.Sa={},this.handleError(vt(this.db));var de=Bc(this.filename);return this.handleError(We(this.filename,me)),this.db=ht(me,"i32"),Pc(this.db),de},Z.prototype.close=function(){this.db!==null&&(Object.values(this.fb).forEach(function(de){de.free()}),Object.values(this.Sa).forEach(er),this.Sa={},this.Ya&&(er(this.Ya),this.Ya=void 0),this.handleError(vt(this.db)),ua("/"+this.filename),this.db=null)},Z.prototype.handleError=function(de){if(de===0)return null;throw de=am(this.db),Error(de)},Z.prototype.getRowsModified=function(){return Ea(this.db)},Z.prototype.create_function=function(de,Be){Object.prototype.hasOwnProperty.call(this.Sa,de)&&(er(this.Sa[de]),delete this.Sa[de]);var Ye=Yr(function(st,dt,Jt){dt=w(dt,Jt);try{var jn=Be.apply(null,dt)}catch(kn){Si(st,kn,-1);return}y(st,jn)},"viii");return this.Sa[de]=Ye,this.handleError(Fc(this.db,de,Be.length,1,0,Ye,0,0,0)),this},Z.prototype.create_aggregate=function(de,Be){var Ye=Be.init||function(){return null},st=Be.finalize||function(pn){return pn},dt=Be.step;if(!dt)throw"An aggregate function must have a step function in "+de;var Jt={};Object.hasOwnProperty.call(this.Sa,de)&&(er(this.Sa[de]),delete this.Sa[de]),Be=de+"__finalize",Object.hasOwnProperty.call(this.Sa,Be)&&(er(this.Sa[Be]),delete this.Sa[Be]);var jn=Yr(function(pn,Ln,Jr){var Pn=Ni(pn,1);Object.hasOwnProperty.call(Jt,Pn)||(Jt[Pn]=Ye()),Ln=w(Ln,Jr),Ln=[Jt[Pn]].concat(Ln);try{Jt[Pn]=dt.apply(null,Ln)}catch(bm){delete Jt[Pn],Si(pn,bm,-1)}},"viii"),kn=Yr(function(pn){var Ln=Ni(pn,1);try{var Jr=st(Jt[Ln])}catch(Pn){delete Jt[Ln],Si(pn,Pn,-1);return}y(pn,Jr),delete Jt[Ln]},"vi");return this.Sa[de]=jn,this.Sa[Be]=kn,this.handleError(Fc(this.db,de,dt.length-1,1,0,0,jn,kn,0)),this},Z.prototype.updateHook=function(de){this.Ya&&(Yo(this.db,0,0),er(this.Ya),this.Ya=void 0),de&&(this.Ya=Yr(function(Be,Ye,st,dt,Jt){switch(Ye){case 18:Be="insert";break;case 23:Be="update";break;case 9:Be="delete";break;default:throw"unknown operationCode in updateHook callback: "+Ye}if(st=st?Se(K,st):"",dt=dt?Se(K,dt):"",Jt>Number.MAX_SAFE_INTEGER)throw"rowId too big to fit inside a Number";de(Be,st,dt,Number(Jt))},"viiiij"),Yo(this.db,this.Ya,0))},g.Database=Z};var I={...g},x="./this.program",N=(y,w)=>{throw w},T="",L,B;if(v){var k=xE;T=__dirname+"/",B=y=>(y=be(y)?new URL(y):y,k.readFileSync(y)),L=async y=>(y=be(y)?new URL(y):y,k.readFileSync(y,void 0)),!g.thisProgram&&1<process.argv.length&&(x=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),t.exports=g,N=(y,w)=>{throw process.exitCode=y,w}}else(A||p)&&(p?T=self.location.href:typeof document<"u"&&document.currentScript&&(T=document.currentScript.src),T=T.startsWith("blob:")?"":T.slice(0,T.replace(/[?#].*/,"").lastIndexOf("/")+1),p&&(B=y=>{var w=new XMLHttpRequest;return w.open("GET",y,!1),w.responseType="arraybuffer",w.send(null),new Uint8Array(w.response)}),L=async y=>{if(be(y))return new Promise((R,H)=>{var Z=new XMLHttpRequest;Z.open("GET",y,!0),Z.responseType="arraybuffer",Z.onload=()=>{Z.status==200||Z.status==0&&Z.response?R(Z.response):H(Z.status)},Z.onerror=H,Z.send(null)});var w=await fetch(y,{credentials:"same-origin"});if(w.ok)return w.arrayBuffer();throw Error(w.status+" : "+w.url)});var F=g.print||console.log.bind(console),_=g.printErr||console.error.bind(console);Object.assign(g,I),I=null,g.thisProgram&&(x=g.thisProgram);var V=g.wasmBinary,U,O=!1,z,Q,K,te,ee,X,ue,W,ae,be=y=>y.startsWith("file://");function se(){var y=U.buffer;g.HEAP8=Q=new Int8Array(y),g.HEAP16=te=new Int16Array(y),g.HEAPU8=K=new Uint8Array(y),g.HEAPU16=new Uint16Array(y),g.HEAP32=ee=new Int32Array(y),g.HEAPU32=X=new Uint32Array(y),g.HEAPF32=ue=new Float32Array(y),g.HEAPF64=ae=new Float64Array(y),g.HEAP64=W=new BigInt64Array(y),g.HEAPU64=new BigUint64Array(y)}var P=0,q=null;function Y(y){var w;throw(w=g.onAbort)==null||w.call(g,y),y="Aborted("+y+")",_(y),O=!0,new WebAssembly.RuntimeError(y+". Build with -sASSERTIONS for more info.")}var ne;async function Ie(y){if(!V)try{var w=await L(y);return new Uint8Array(w)}catch{}if(y==ne&&V)y=new Uint8Array(V);else if(B)y=B(y);else throw"both async and sync fetching of the wasm failed";return y}async function ce(y,w){try{var R=await Ie(y);return await WebAssembly.instantiate(R,w)}catch(H){_(`failed to asynchronously prepare wasm: ${H}`),Y(H)}}async function Ee(y){var w=ne;if(!V&&typeof WebAssembly.instantiateStreaming=="function"&&!be(w)&&!v)try{var R=fetch(w,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(R,y)}catch(H){_(`wasm streaming compile failed: ${H}`),_("falling back to ArrayBuffer instantiation")}return ce(w,y)}class Ne{constructor(w){qe(this,"name","ExitStatus");this.message=`Program terminated with exit(${w})`,this.status=w}}var we=y=>{for(;0<y.length;)y.shift()(g)},Oe=[],ze=[],Et=()=>{var y=g.preRun.shift();ze.unshift(y)};function ht(y,w="i8"){switch(w.endsWith("*")&&(w="*"),w){case"i1":return Q[y];case"i8":return Q[y];case"i16":return te[y>>1];case"i32":return ee[y>>2];case"i64":return W[y>>3];case"float":return ue[y>>2];case"double":return ae[y>>3];case"*":return X[y>>2];default:Y(`invalid type for getValue: ${w}`)}}var it=g.noExitRuntime||!0;function Ge(y){var w="i32";switch(w.endsWith("*")&&(w="*"),w){case"i1":Q[y]=0;break;case"i8":Q[y]=0;break;case"i16":te[y>>1]=0;break;case"i32":ee[y>>2]=0;break;case"i64":W[y>>3]=BigInt(0);break;case"float":ue[y>>2]=0;break;case"double":ae[y>>3]=0;break;case"*":X[y>>2]=0;break;default:Y(`invalid type for setValue: ${w}`)}}var Ft=typeof TextDecoder<"u"?new TextDecoder:void 0,Se=(y,w=0,R=NaN)=>{var H=w+R;for(R=w;y[R]&&!(R>=H);)++R;if(16<R-w&&y.buffer&&Ft)return Ft.decode(y.subarray(w,R));for(H="";w<R;){var Z=y[w++];if(Z&128){var me=y[w++]&63;if((Z&224)==192)H+=String.fromCharCode((Z&31)<<6|me);else{var ve=y[w++]&63;Z=(Z&240)==224?(Z&15)<<12|me<<6|ve:(Z&7)<<18|me<<12|ve<<6|y[w++]&63,65536>Z?H+=String.fromCharCode(Z):(Z-=65536,H+=String.fromCharCode(55296|Z>>10,56320|Z&1023))}}else H+=String.fromCharCode(Z)}return H},Fe=(y,w)=>y?Se(K,y,w):"",he=(y,w)=>{for(var R=0,H=y.length-1;0<=H;H--){var Z=y[H];Z==="."?y.splice(H,1):Z===".."?(y.splice(H,1),R++):R&&(y.splice(H,1),R--)}if(w)for(;R;R--)y.unshift("..");return y},De=y=>{var w=y.charAt(0)==="/",R=y.slice(-1)==="/";return(y=he(y.split("/").filter(H=>!!H),!w).join("/"))||w||(y="."),y&&R&&(y+="/"),(w?"/":"")+y},Ve=y=>{var w=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(y).slice(1);return y=w[0],w=w[1],!y&&!w?".":(w&&(w=w.slice(0,-1)),y+w)},He=y=>y&&y.match(/([^\/]+|\/)\/*$/)[1],tt=()=>{if(v){var y=xE;return w=>y.randomFillSync(w)}return w=>crypto.getRandomValues(w)},It=y=>{(It=tt())(y)},Ot=(...y)=>{for(var w="",R=!1,H=y.length-1;-1<=H&&!R;H--){if(R=0<=H?y[H]:"/",typeof R!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!R)return"";w=R+"/"+w,R=R.charAt(0)==="/"}return w=he(w.split("/").filter(Z=>!!Z),!R).join("/"),(R?"/":"")+w||"."},Tt=[],Yt=y=>{for(var w=0,R=0;R<y.length;++R){var H=y.charCodeAt(R);127>=H?w++:2047>=H?w+=2:55296<=H&&57343>=H?(w+=4,++R):w+=3}return w},M=(y,w,R,H)=>{if(!(0<H))return 0;var Z=R;H=R+H-1;for(var me=0;me<y.length;++me){var ve=y.charCodeAt(me);if(55296<=ve&&57343>=ve){var We=y.charCodeAt(++me);ve=65536+((ve&1023)<<10)|We&1023}if(127>=ve){if(R>=H)break;w[R++]=ve}else{if(2047>=ve){if(R+1>=H)break;w[R++]=192|ve>>6}else{if(65535>=ve){if(R+2>=H)break;w[R++]=224|ve>>12}else{if(R+3>=H)break;w[R++]=240|ve>>18,w[R++]=128|ve>>12&63}w[R++]=128|ve>>6&63}w[R++]=128|ve&63}}return w[R]=0,R-Z},C=(y,w)=>{var R=Array(Yt(y)+1);return y=M(y,R,0,R.length),w&&(R.length=y),R},S=[];function G(y,w){S[y]={input:[],output:[],cb:w},et(y,re)}var re={open(y){var w=S[y.node.rdev];if(!w)throw new Me(43);y.tty=w,y.seekable=!1},close(y){y.tty.cb.fsync(y.tty)},fsync(y){y.tty.cb.fsync(y.tty)},read(y,w,R,H){if(!y.tty||!y.tty.cb.xb)throw new Me(60);for(var Z=0,me=0;me<H;me++){try{var ve=y.tty.cb.xb(y.tty)}catch{throw new Me(29)}if(ve===void 0&&Z===0)throw new Me(6);if(ve==null)break;Z++,w[R+me]=ve}return Z&&(y.node.atime=Date.now()),Z},write(y,w,R,H){if(!y.tty||!y.tty.cb.qb)throw new Me(60);try{for(var Z=0;Z<H;Z++)y.tty.cb.qb(y.tty,w[R+Z])}catch{throw new Me(29)}return H&&(y.node.mtime=y.node.ctime=Date.now()),Z}},pe={xb(){e:{if(!Tt.length){var y=null;if(v){var w=Buffer.alloc(256),R=0,H=process.stdin.fd;try{R=k.readSync(H,w,0,256)}catch(Z){if(Z.toString().includes("EOF"))R=0;else throw Z}0<R&&(y=w.slice(0,R).toString("utf-8"))}else typeof window<"u"&&typeof window.prompt=="function"&&(y=window.prompt("Input: "),y!==null&&(y+=`
`));if(!y){y=null;break e}Tt=C(y,!0)}y=Tt.shift()}return y},qb(y,w){w===null||w===10?(F(Se(y.output)),y.output=[]):w!=0&&y.output.push(w)},fsync(y){var w;0<((w=y.output)==null?void 0:w.length)&&(F(Se(y.output)),y.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]}},Ce={qb(y,w){w===null||w===10?(_(Se(y.output)),y.output=[]):w!=0&&y.output.push(w)},fsync(y){var w;0<((w=y.output)==null?void 0:w.length)&&(_(Se(y.output)),y.output=[])}},_e={Wa:null,Xa(){return _e.createNode(null,"/",16895,0)},createNode(y,w,R,H){if((R&61440)===24576||(R&61440)===4096)throw new Me(63);return _e.Wa||(_e.Wa={dir:{node:{Ta:_e.La.Ta,Ua:_e.La.Ua,lookup:_e.La.lookup,hb:_e.La.hb,rename:_e.La.rename,unlink:_e.La.unlink,rmdir:_e.La.rmdir,readdir:_e.La.readdir,symlink:_e.La.symlink},stream:{Va:_e.Ma.Va}},file:{node:{Ta:_e.La.Ta,Ua:_e.La.Ua},stream:{Va:_e.Ma.Va,read:_e.Ma.read,write:_e.Ma.write,ib:_e.Ma.ib,jb:_e.Ma.jb}},link:{node:{Ta:_e.La.Ta,Ua:_e.La.Ua,readlink:_e.La.readlink},stream:{}},ub:{node:{Ta:_e.La.Ta,Ua:_e.La.Ua},stream:$e}}),R=Gt(y,w,R,H),Vt(R.mode)?(R.La=_e.Wa.dir.node,R.Ma=_e.Wa.dir.stream,R.Na={}):(R.mode&61440)===32768?(R.La=_e.Wa.file.node,R.Ma=_e.Wa.file.stream,R.Ra=0,R.Na=null):(R.mode&61440)===40960?(R.La=_e.Wa.link.node,R.Ma=_e.Wa.link.stream):(R.mode&61440)===8192&&(R.La=_e.Wa.ub.node,R.Ma=_e.Wa.ub.stream),R.atime=R.mtime=R.ctime=Date.now(),y&&(y.Na[w]=R,y.atime=y.mtime=y.ctime=R.atime),R},Sb(y){return y.Na?y.Na.subarray?y.Na.subarray(0,y.Ra):new Uint8Array(y.Na):new Uint8Array(0)},La:{Ta(y){var w={};return w.dev=(y.mode&61440)===8192?y.id:1,w.ino=y.id,w.mode=y.mode,w.nlink=1,w.uid=0,w.gid=0,w.rdev=y.rdev,Vt(y.mode)?w.size=4096:(y.mode&61440)===32768?w.size=y.Ra:(y.mode&61440)===40960?w.size=y.link.length:w.size=0,w.atime=new Date(y.atime),w.mtime=new Date(y.mtime),w.ctime=new Date(y.ctime),w.blksize=4096,w.blocks=Math.ceil(w.size/w.blksize),w},Ua(y,w){for(var R of["mode","atime","mtime","ctime"])w[R]!=null&&(y[R]=w[R]);w.size!==void 0&&(w=w.size,y.Ra!=w&&(w==0?(y.Na=null,y.Ra=0):(R=y.Na,y.Na=new Uint8Array(w),R&&y.Na.set(R.subarray(0,Math.min(w,y.Ra))),y.Ra=w)))},lookup(){throw _e.vb},hb(y,w,R,H){return _e.createNode(y,w,R,H)},rename(y,w,R){try{var H=Lt(w,R)}catch{}if(H){if(Vt(y.mode))for(var Z in H.Na)throw new Me(55);zt(H)}delete y.parent.Na[y.name],w.Na[R]=y,y.name=R,w.ctime=w.mtime=y.parent.ctime=y.parent.mtime=Date.now()},unlink(y,w){delete y.Na[w],y.ctime=y.mtime=Date.now()},rmdir(y,w){var R=Lt(y,w),H;for(H in R.Na)throw new Me(55);delete y.Na[w],y.ctime=y.mtime=Date.now()},readdir(y){return[".","..",...Object.keys(y.Na)]},symlink(y,w,R){return y=_e.createNode(y,w,41471,0),y.link=R,y},readlink(y){if((y.mode&61440)!==40960)throw new Me(28);return y.link}},Ma:{read(y,w,R,H,Z){var me=y.node.Na;if(Z>=y.node.Ra)return 0;if(y=Math.min(y.node.Ra-Z,H),8<y&&me.subarray)w.set(me.subarray(Z,Z+y),R);else for(H=0;H<y;H++)w[R+H]=me[Z+H];return y},write(y,w,R,H,Z,me){if(w.buffer===Q.buffer&&(me=!1),!H)return 0;if(y=y.node,y.mtime=y.ctime=Date.now(),w.subarray&&(!y.Na||y.Na.subarray)){if(me)return y.Na=w.subarray(R,R+H),y.Ra=H;if(y.Ra===0&&Z===0)return y.Na=w.slice(R,R+H),y.Ra=H;if(Z+H<=y.Ra)return y.Na.set(w.subarray(R,R+H),Z),H}me=Z+H;var ve=y.Na?y.Na.length:0;if(ve>=me||(me=Math.max(me,ve*(1048576>ve?2:1.125)>>>0),ve!=0&&(me=Math.max(me,256)),ve=y.Na,y.Na=new Uint8Array(me),0<y.Ra&&y.Na.set(ve.subarray(0,y.Ra),0)),y.Na.subarray&&w.subarray)y.Na.set(w.subarray(R,R+H),Z);else for(me=0;me<H;me++)y.Na[Z+me]=w[R+me];return y.Ra=Math.max(y.Ra,Z+H),H},Va(y,w,R){if(R===1?w+=y.position:R===2&&(y.node.mode&61440)===32768&&(w+=y.node.Ra),0>w)throw new Me(28);return w},ib(y,w,R,H,Z){if((y.node.mode&61440)!==32768)throw new Me(43);if(y=y.node.Na,Z&2||!y||y.buffer!==Q.buffer){Z=!0,H=65536*Math.ceil(w/65536);var me=Ko(65536,H);if(me&&K.fill(0,me,me+H),H=me,!H)throw new Me(48);y&&((0<R||R+w<y.length)&&(y.subarray?y=y.subarray(R,R+w):y=Array.prototype.slice.call(y,R,R+w)),Q.set(y,H))}else Z=!1,H=y.byteOffset;return{Kb:H,Ab:Z}},jb(y,w,R,H){return _e.Ma.write(y,w,0,H,R,!1),0}}},ct=(y,w)=>{var R=0;return y&&(R|=365),w&&(R|=146),R},gt=null,St={},pt=[],gr=1,ca=null,nn=!1,Rt=!0,ta={},Me=class{constructor(y){qe(this,"name","ErrnoError");this.Pa=y}},rn=class{constructor(){qe(this,"gb",{});qe(this,"node",null)}get flags(){return this.gb.flags}set flags(y){this.gb.flags=y}get position(){return this.gb.position}set position(y){this.gb.position=y}},Nt=class{constructor(y,w,R,H){qe(this,"La",{});qe(this,"Ma",{});qe(this,"ab",null);y||(y=this),this.parent=y,this.Xa=y.Xa,this.id=gr++,this.name=w,this.mode=R,this.rdev=H,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&365)===365}set read(y){y?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)===146}set write(y){y?this.mode|=146:this.mode&=-147}};function kt(y,w={}){if(!y)throw new Me(44);w.nb??(w.nb=!0),y.charAt(0)==="/"||(y="//"+y);var R=0;e:for(;40>R;R++){y=y.split("/").filter(We=>!!We);for(var H=gt,Z="/",me=0;me<y.length;me++){var ve=me===y.length-1;if(ve&&w.parent)break;if(y[me]!==".")if(y[me]==="..")Z=Ve(Z),H=H.parent;else{Z=De(Z+"/"+y[me]);try{H=Lt(H,y[me])}catch(We){if((We==null?void 0:We.Pa)===44&&ve&&w.Jb)return{path:Z};throw We}if(!H.ab||ve&&!w.nb||(H=H.ab.root),(H.mode&61440)===40960&&(!ve||w.$a)){if(!H.La.readlink)throw new Me(52);H=H.La.readlink(H),H.charAt(0)==="/"||(H=Ve(Z)+"/"+H),y=H+"/"+y.slice(me+1).join("/");continue e}}}return{path:Z,node:H}}throw new Me(32)}function ka(y){for(var w;;){if(y===y.parent)return y=y.Xa.zb,w?y[y.length-1]!=="/"?`${y}/${w}`:y+w:y;w=w?`${y.name}/${w}`:y.name,y=y.parent}}function sn(y,w){for(var R=0,H=0;H<w.length;H++)R=(R<<5)-R+w.charCodeAt(H)|0;return(y+R>>>0)%ca.length}function zt(y){var w=sn(y.parent.id,y.name);if(ca[w]===y)ca[w]=y.bb;else for(w=ca[w];w;){if(w.bb===y){w.bb=y.bb;break}w=w.bb}}function Lt(y,w){var R=Vt(y.mode)?(R=Aa(y,"x"))?R:y.La.lookup?0:2:54;if(R)throw new Me(R);for(R=ca[sn(y.id,w)];R;R=R.bb){var H=R.name;if(R.parent.id===y.id&&H===w)return R}return y.La.lookup(y,w)}function Gt(y,w,R,H){return y=new Nt(y,w,R,H),w=sn(y.parent.id,y.name),y.bb=ca[w],ca[w]=y}function Vt(y){return(y&61440)===16384}function pa(y){var w=["r","w","rw"][y&3];return y&512&&(w+="w"),w}function Aa(y,w){if(Rt)return 0;if(!w.includes("r")||y.mode&292){if(w.includes("w")&&!(y.mode&146)||w.includes("x")&&!(y.mode&73))return 2}else return 2;return 0}function Ma(y,w){if(!Vt(y.mode))return 54;try{return Lt(y,w),20}catch{}return Aa(y,"wx")}function hn(y,w,R){try{var H=Lt(y,w)}catch(Z){return Z.Pa}if(y=Aa(y,"wx"))return y;if(R){if(!Vt(H.mode))return 54;if(H===H.parent||ka(H)==="/")return 10}else if(Vt(H.mode))return 31;return 0}function _a(y){if(!y)throw new Me(63);return y}function ya(y){if(y=pt[y],!y)throw new Me(8);return y}function oe(y,w=-1){if(y=Object.assign(new rn,y),w==-1)e:{for(w=0;4096>=w;w++)if(!pt[w])break e;throw new Me(33)}return y.fd=w,pt[w]=y}function Pe(y,w=-1){var R,H;return y=oe(y,w),(H=(R=y.Ma)==null?void 0:R.Rb)==null||H.call(R,y),y}function Qe(y,w,R){var H=y==null?void 0:y.Ma.Ua;y=H?y:w,H??(H=w.La.Ua),_a(H),H(y,R)}var $e={open(y){var w,R;y.Ma=St[y.node.rdev].Ma,(R=(w=y.Ma).open)==null||R.call(w,y)},Va(){throw new Me(70)}};function et(y,w){St[y]={Ma:w}}function Bt(y,w){var R=w==="/";if(R&&gt)throw new Me(10);if(!R&&w){var H=kt(w,{nb:!1});if(w=H.path,H=H.node,H.ab)throw new Me(10);if(!Vt(H.mode))throw new Me(54)}w={type:y,Wb:{},zb:w,Ib:[]},y=y.Xa(w),y.Xa=w,w.root=y,R?gt=y:H&&(H.ab=w,H.Xa&&H.Xa.Ib.push(w))}function Ue(y,w,R){var H=kt(y,{parent:!0}).node;if(y=He(y),!y)throw new Me(28);if(y==="."||y==="..")throw new Me(20);var Z=Ma(H,y);if(Z)throw new Me(Z);if(!H.La.hb)throw new Me(63);return H.La.hb(H,y,w,R)}function J(y,w=438){return Ue(y,w&4095|32768,0)}function ke(y,w=511){return Ue(y,w&1023|16384,0)}function je(y,w,R){typeof R>"u"&&(R=w,w=438),Ue(y,w|8192,R)}function jt(y,w){if(!Ot(y))throw new Me(44);var R=kt(w,{parent:!0}).node;if(!R)throw new Me(44);w=He(w);var H=Ma(R,w);if(H)throw new Me(H);if(!R.La.symlink)throw new Me(63);R.La.symlink(R,w,y)}function da(y){var w=kt(y,{parent:!0}).node;y=He(y);var R=Lt(w,y),H=hn(w,y,!0);if(H)throw new Me(H);if(!w.La.rmdir)throw new Me(63);if(R.ab)throw new Me(10);w.La.rmdir(w,y),zt(R)}function ua(y){var w=kt(y,{parent:!0}).node;if(!w)throw new Me(44);y=He(y);var R=Lt(w,y),H=hn(w,y,!1);if(H)throw new Me(H);if(!w.La.unlink)throw new Me(63);if(R.ab)throw new Me(10);w.La.unlink(w,y),zt(R)}function ra(y,w){return y=kt(y,{$a:!w}).node,_a(y.La.Ta)(y)}function za(y,w,R,H){Qe(y,w,{mode:R&4095|w.mode&-4096,ctime:Date.now(),Fb:H})}function La(y,w){y=typeof y=="string"?kt(y,{$a:!0}).node:y,za(null,y,w)}function Sr(y,w,R){if(Vt(w.mode))throw new Me(31);if((w.mode&61440)!==32768)throw new Me(28);var H=Aa(w,"w");if(H)throw new Me(H);Qe(y,w,{size:R,timestamp:Date.now()})}function ma(y,w,R=438){if(y==="")throw new Me(44);if(typeof w=="string"){var H={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[w];if(typeof H>"u")throw Error(`Unknown file open mode: ${w}`);w=H}if(R=w&64?R&4095|32768:0,typeof y=="object")H=y;else{var Z=y.endsWith("/");y=kt(y,{$a:!(w&131072),Jb:!0}),H=y.node,y=y.path}var me=!1;if(w&64)if(H){if(w&128)throw new Me(20)}else{if(Z)throw new Me(31);H=Ue(y,R|511,0),me=!0}if(!H)throw new Me(44);if((H.mode&61440)===8192&&(w&=-513),w&65536&&!Vt(H.mode))throw new Me(54);if(!me&&(Z=H?(H.mode&61440)===40960?32:Vt(H.mode)&&(pa(w)!=="r"||w&576)?31:Aa(H,pa(w)):44))throw new Me(Z);return w&512&&!me&&(Z=H,Z=typeof Z=="string"?kt(Z,{$a:!0}).node:Z,Sr(null,Z,0)),w&=-131713,Z=oe({node:H,path:ka(H),flags:w,seekable:!0,position:0,Ma:H.Ma,Lb:[],error:!1}),Z.Ma.open&&Z.Ma.open(Z),me&&La(H,R&511),!g.logReadFiles||w&1||y in ta||(ta[y]=1),Z}function On(y){if(y.fd===null)throw new Me(8);y.ob&&(y.ob=null);try{y.Ma.close&&y.Ma.close(y)}catch(w){throw w}finally{pt[y.fd]=null}y.fd=null}function Qr(y,w,R){if(y.fd===null)throw new Me(8);if(!y.seekable||!y.Ma.Va)throw new Me(70);if(R!=0&&R!=1&&R!=2)throw new Me(28);y.position=y.Ma.Va(y,w,R),y.Lb=[]}function Os(y,w,R,H,Z){if(0>H||0>Z)throw new Me(28);if(y.fd===null)throw new Me(8);if((y.flags&2097155)===1)throw new Me(8);if(Vt(y.node.mode))throw new Me(31);if(!y.Ma.read)throw new Me(28);var me=typeof Z<"u";if(!me)Z=y.position;else if(!y.seekable)throw new Me(70);return w=y.Ma.read(y,w,R,H,Z),me||(y.position+=w),w}function Rc(y,w,R,H,Z){if(0>H||0>Z)throw new Me(28);if(y.fd===null)throw new Me(8);if((y.flags&2097155)===0)throw new Me(8);if(Vt(y.node.mode))throw new Me(31);if(!y.Ma.write)throw new Me(28);y.seekable&&y.flags&1024&&Qr(y,0,2);var me=typeof Z<"u";if(!me)Z=y.position;else if(!y.seekable)throw new Me(70);return w=y.Ma.write(y,w,R,H,Z,void 0),me||(y.position+=w),w}function Bc(y){var w,R=ma(y,R||0);y=ra(y).size;var H=new Uint8Array(y);return Os(R,H,0,y,0),w=H,On(R),w}function Da(y,w,R){y=De("/dev/"+y);var H=ct(!!w,!!R);Da.yb??(Da.yb=64);var Z=Da.yb++<<8|0;et(Z,{open(me){me.seekable=!1},close(){var me;(me=R==null?void 0:R.buffer)!=null&&me.length&&R(10)},read(me,ve,We,vt){for(var At=0,Ea=0;Ea<vt;Ea++){try{var Ja=w()}catch{throw new Me(29)}if(Ja===void 0&&At===0)throw new Me(6);if(Ja==null)break;At++,ve[We+Ea]=Ja}return At&&(me.node.atime=Date.now()),At},write(me,ve,We,vt){for(var At=0;At<vt;At++)try{R(ve[We+At])}catch{throw new Me(29)}return vt&&(me.node.mtime=me.node.ctime=Date.now()),At}}),je(y,H,Z)}var ia={};function Kr(y,w,R){if(w.charAt(0)==="/")return w;if(y=y===-100?"/":ya(y).path,w.length==0){if(!R)throw new Me(44);return y}return y+"/"+w}function Gr(y,w){ee[y>>2]=w.dev,ee[y+4>>2]=w.mode,X[y+8>>2]=w.nlink,ee[y+12>>2]=w.uid,ee[y+16>>2]=w.gid,ee[y+20>>2]=w.rdev,W[y+24>>3]=BigInt(w.size),ee[y+32>>2]=4096,ee[y+36>>2]=w.blocks;var R=w.atime.getTime(),H=w.mtime.getTime(),Z=w.ctime.getTime();return W[y+40>>3]=BigInt(Math.floor(R/1e3)),X[y+48>>2]=R%1e3*1e6,W[y+56>>3]=BigInt(Math.floor(H/1e3)),X[y+64>>2]=H%1e3*1e6,W[y+72>>3]=BigInt(Math.floor(Z/1e3)),X[y+80>>2]=Z%1e3*1e6,W[y+88>>3]=BigInt(w.ino),0}var ss=void 0,qr=()=>{var y=ee[+ss>>2];return ss+=4,y},Po=0,xn=[0,31,60,91,121,152,182,213,244,274,305,335],Ho=[0,31,59,90,120,151,181,212,243,273,304,334],Ei={},js=y=>{var w;z=y,it||0<Po||((w=g.onExit)==null||w.call(g,y),O=!0),N(y,new Ne(y))},bi=y=>{if(!O)try{if(y(),!(it||0<Po))try{z=y=z,js(y)}catch(w){w instanceof Ne||w=="unwind"||N(1,w)}}catch(w){w instanceof Ne||w=="unwind"||N(1,w)}},Ps={},zo=()=>{if(!Nr){var y={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"},w;for(w in Ps)Ps[w]===void 0?delete y[w]:y[w]=Ps[w];var R=[];for(w in y)R.push(`${w}=${y[w]}`);Nr=R}return Nr},Nr,Vo=y=>{var w=Yt(y)+1,R=tr(w);return M(y,K,R,w),R},Uc=(y,w,R,H)=>{var Z={string:At=>{var Ea=0;return At!=null&&At!==0&&(Ea=Vo(At)),Ea},array:At=>{var Ea=tr(At.length);return Q.set(At,Ea),Ea}};y=g["_"+y];var me=[],ve=0;if(H)for(var We=0;We<H.length;We++){var vt=Z[R[We]];vt?(ve===0&&(ve=fr()),me[We]=vt(H[We])):me[We]=H[We]}return R=y(...me),R=function(At){return ve!==0&&vn(ve),w==="string"?At?Se(K,At):"":w==="boolean"?!!At:At}(R)},os=0,vi=(y,w)=>(w=w==1?tr(y.length):Hs(y.length),y.subarray||y.slice||(y=new Uint8Array(y)),K.set(y,w),w),Wr,Qo=[],Tn,er=y=>{Wr.delete(Tn.get(y)),Tn.set(y,null),Qo.push(y)},Yr=(y,w)=>{if(!Wr){Wr=new WeakMap;var R=Tn.length;if(Wr)for(var H=0;H<0+R;H++){var Z=Tn.get(H);Z&&Wr.set(Z,H)}}if(R=Wr.get(y)||0)return R;if(Qo.length)R=Qo.pop();else{try{Tn.grow(1)}catch(vt){throw vt instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":vt}R=Tn.length-1}try{Tn.set(R,y)}catch(vt){if(!(vt instanceof TypeError))throw vt;if(typeof WebAssembly.Function=="function"){var me=WebAssembly.Function;H={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},Z={parameters:[],results:w[0]=="v"?[]:[H[w[0]]]};for(var ve=1;ve<w.length;++ve)Z.parameters.push(H[w[ve]]);w=new me(Z,y)}else{H=[1],Z=w.slice(0,1),w=w.slice(1),ve={i:127,p:127,j:126,f:125,d:124,e:111},H.push(96);var We=w.length;128>We?H.push(We):H.push(We%128|128,We>>7);for(me of w)H.push(ve[me]);Z=="v"?H.push(0):H.push(1,ve[Z]),w=[0,97,115,109,1,0,0,0,1],me=H.length,128>me?w.push(me):w.push(me%128|128,me>>7),w.push(...H),w.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),w=new WebAssembly.Module(new Uint8Array(w)),w=new WebAssembly.Instance(w,{e:{f:y}}).exports.f}Tn.set(R,w)}return Wr.set(y,R),R};ca=Array(4096),Bt(_e,"/"),ke("/tmp"),ke("/home"),ke("/home/web_user"),function(){ke("/dev"),et(259,{read:()=>0,write:(H,Z,me,ve)=>ve,Va:()=>0}),je("/dev/null",259),G(1280,pe),G(1536,Ce),je("/dev/tty",1280),je("/dev/tty1",1536);var y=new Uint8Array(1024),w=0,R=()=>(w===0&&(It(y),w=y.byteLength),y[--w]);Da("random",R),Da("urandom",R),ke("/dev/shm"),ke("/dev/shm/tmp")}(),function(){ke("/proc");var y=ke("/proc/self");ke("/proc/self/fd"),Bt({Xa(){var w=Gt(y,"fd",16895,73);return w.Ma={Va:_e.Ma.Va},w.La={lookup(R,H){R=+H;var Z=ya(R);return R={parent:null,Xa:{zb:"fake"},La:{readlink:()=>Z.path},id:R+1},R.parent=R},readdir(){return Array.from(pt.entries()).filter(([,R])=>R).map(([R])=>R.toString())}},w}},"/proc/self/fd")}(),_e.vb=new Me(44),_e.vb.stack="<generic error, no stack>";var Ii={a:(y,w,R,H)=>Y(`Assertion failed: ${y?Se(K,y):""}, at: `+[w?w?Se(K,w):"":"unknown filename",R,H?H?Se(K,H):"":"unknown function"]),i:function(y,w){try{return y=y?Se(K,y):"",La(y,w),0}catch(R){if(typeof ia>"u"||R.name!=="ErrnoError")throw R;return-R.Pa}},L:function(y,w,R){try{if(w=w?Se(K,w):"",w=Kr(y,w),R&-8)return-28;var H=kt(w,{$a:!0}).node;return H?(y="",R&4&&(y+="r"),R&2&&(y+="w"),R&1&&(y+="x"),y&&Aa(H,y)?-2:0):-44}catch(Z){if(typeof ia>"u"||Z.name!=="ErrnoError")throw Z;return-Z.Pa}},j:function(y,w){try{var R=ya(y);return za(R,R.node,w,!1),0}catch(H){if(typeof ia>"u"||H.name!=="ErrnoError")throw H;return-H.Pa}},h:function(y){try{var w=ya(y);return Qe(w,w.node,{timestamp:Date.now(),Fb:!1}),0}catch(R){if(typeof ia>"u"||R.name!=="ErrnoError")throw R;return-R.Pa}},b:function(y,w,R){ss=R;try{var H=ya(y);switch(w){case 0:var Z=qr();if(0>Z)break;for(;pt[Z];)Z++;return Pe(H,Z).fd;case 1:case 2:return 0;case 3:return H.flags;case 4:return Z=qr(),H.flags|=Z,0;case 12:return Z=qr(),te[Z+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(me){if(typeof ia>"u"||me.name!=="ErrnoError")throw me;return-me.Pa}},g:function(y,w){try{var R=ya(y),H=R.node,Z=R.Ma.Ta;y=Z?R:H,Z??(Z=H.La.Ta),_a(Z);var me=Z(y);return Gr(w,me)}catch(ve){if(typeof ia>"u"||ve.name!=="ErrnoError")throw ve;return-ve.Pa}},H:function(y,w){w=-9007199254740992>w||9007199254740992<w?NaN:Number(w);try{if(isNaN(w))return 61;var R=ya(y);if(0>w||(R.flags&2097155)===0)throw new Me(28);return Sr(R,R.node,w),0}catch(H){if(typeof ia>"u"||H.name!=="ErrnoError")throw H;return-H.Pa}},G:function(y,w){try{if(w===0)return-28;var R=Yt("/")+1;return w<R?-68:(M("/",K,y,w),R)}catch(H){if(typeof ia>"u"||H.name!=="ErrnoError")throw H;return-H.Pa}},K:function(y,w){try{return y=y?Se(K,y):"",Gr(w,ra(y,!0))}catch(R){if(typeof ia>"u"||R.name!=="ErrnoError")throw R;return-R.Pa}},C:function(y,w,R){try{return w=w?Se(K,w):"",w=Kr(y,w),ke(w,R),0}catch(H){if(typeof ia>"u"||H.name!=="ErrnoError")throw H;return-H.Pa}},J:function(y,w,R,H){try{w=w?Se(K,w):"";var Z=H&256;return w=Kr(y,w,H&4096),Gr(R,Z?ra(w,!0):ra(w))}catch(me){if(typeof ia>"u"||me.name!=="ErrnoError")throw me;return-me.Pa}},x:function(y,w,R,H){ss=H;try{w=w?Se(K,w):"",w=Kr(y,w);var Z=H?qr():0;return ma(w,R,Z).fd}catch(me){if(typeof ia>"u"||me.name!=="ErrnoError")throw me;return-me.Pa}},v:function(y,w,R,H){try{if(w=w?Se(K,w):"",w=Kr(y,w),0>=H)return-28;var Z=kt(w).node;if(!Z)throw new Me(44);if(!Z.La.readlink)throw new Me(28);var me=Z.La.readlink(Z),ve=Math.min(H,Yt(me)),We=Q[R+ve];return M(me,K,R,H+1),Q[R+ve]=We,ve}catch(vt){if(typeof ia>"u"||vt.name!=="ErrnoError")throw vt;return-vt.Pa}},u:function(y){try{return y=y?Se(K,y):"",da(y),0}catch(w){if(typeof ia>"u"||w.name!=="ErrnoError")throw w;return-w.Pa}},f:function(y,w){try{return y=y?Se(K,y):"",Gr(w,ra(y))}catch(R){if(typeof ia>"u"||R.name!=="ErrnoError")throw R;return-R.Pa}},r:function(y,w,R){try{return w=w?Se(K,w):"",w=Kr(y,w),R===0?ua(w):R===512?da(w):Y("Invalid flags passed to unlinkat"),0}catch(H){if(typeof ia>"u"||H.name!=="ErrnoError")throw H;return-H.Pa}},q:function(y,w,R){try{w=w?Se(K,w):"",w=Kr(y,w,!0);var H=Date.now(),Z,me;if(R){var ve=X[R>>2]+4294967296*ee[R+4>>2],We=ee[R+8>>2];We==1073741823?Z=H:We==1073741822?Z=null:Z=1e3*ve+We/1e6,R+=16,ve=X[R>>2]+4294967296*ee[R+4>>2],We=ee[R+8>>2],We==1073741823?me=H:We==1073741822?me=null:me=1e3*ve+We/1e6}else me=Z=H;if((me??Z)!==null){y=Z;var vt=kt(w,{$a:!0}).node;_a(vt.La.Ua)(vt,{atime:y,mtime:me})}return 0}catch(At){if(typeof ia>"u"||At.name!=="ErrnoError")throw At;return-At.Pa}},m:()=>Y(""),l:()=>{it=!1,Po=0},A:function(y,w){y=-9007199254740992>y||9007199254740992<y?NaN:Number(y),y=new Date(1e3*y),ee[w>>2]=y.getSeconds(),ee[w+4>>2]=y.getMinutes(),ee[w+8>>2]=y.getHours(),ee[w+12>>2]=y.getDate(),ee[w+16>>2]=y.getMonth(),ee[w+20>>2]=y.getFullYear()-1900,ee[w+24>>2]=y.getDay();var R=y.getFullYear();ee[w+28>>2]=(R%4!==0||R%100===0&&R%400!==0?Ho:xn)[y.getMonth()]+y.getDate()-1|0,ee[w+36>>2]=-(60*y.getTimezoneOffset()),R=new Date(y.getFullYear(),6,1).getTimezoneOffset();var H=new Date(y.getFullYear(),0,1).getTimezoneOffset();ee[w+32>>2]=(R!=H&&y.getTimezoneOffset()==Math.min(H,R))|0},y:function(y,w,R,H,Z,me,ve){Z=-9007199254740992>Z||9007199254740992<Z?NaN:Number(Z);try{if(isNaN(Z))return 61;var We=ya(H);if((w&2)!==0&&(R&2)===0&&(We.flags&2097155)!==2)throw new Me(2);if((We.flags&2097155)===1)throw new Me(2);if(!We.Ma.ib)throw new Me(43);if(!y)throw new Me(28);var vt=We.Ma.ib(We,y,Z,w,R),At=vt.Kb;return ee[me>>2]=vt.Ab,X[ve>>2]=At,0}catch(Ea){if(typeof ia>"u"||Ea.name!=="ErrnoError")throw Ea;return-Ea.Pa}},z:function(y,w,R,H,Z,me){me=-9007199254740992>me||9007199254740992<me?NaN:Number(me);try{var ve=ya(Z);if(R&2){if(R=me,(ve.node.mode&61440)!==32768)throw new Me(43);if(!(H&2)){var We=K.slice(y,y+w);ve.Ma.jb&&ve.Ma.jb(ve,We,R,w,H)}}}catch(vt){if(typeof ia>"u"||vt.name!=="ErrnoError")throw vt;return-vt.Pa}},n:(y,w)=>{if(Ei[y]&&(clearTimeout(Ei[y].id),delete Ei[y]),!w)return 0;var R=setTimeout(()=>{delete Ei[y],bi(()=>Ci(y,performance.now()))},w);return Ei[y]={id:R,Xb:w},0},B:(y,w,R,H)=>{var Z=new Date().getFullYear(),me=new Date(Z,0,1).getTimezoneOffset();Z=new Date(Z,6,1).getTimezoneOffset(),X[y>>2]=60*Math.max(me,Z),ee[w>>2]=+(me!=Z),w=ve=>{var We=Math.abs(ve);return`UTC${0<=ve?"-":"+"}${String(Math.floor(We/60)).padStart(2,"0")}${String(We%60).padStart(2,"0")}`},y=w(me),w=w(Z),Z<me?(M(y,K,R,17),M(w,K,H,17)):(M(y,K,H,17),M(w,K,R,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:y=>{var w=K.length;if(y>>>=0,2147483648<y)return!1;for(var R=1;4>=R;R*=2){var H=w*(1+.2/R);H=Math.min(H,y+100663296);e:{H=(Math.min(2147483648,65536*Math.ceil(Math.max(y,H)/65536))-U.buffer.byteLength+65535)/65536|0;try{U.grow(H),se();var Z=1;break e}catch{}Z=void 0}if(Z)return!0}return!1},E:(y,w)=>{var R=0;return zo().forEach((H,Z)=>{var me=w+R;for(Z=X[y+4*Z>>2]=me,me=0;me<H.length;++me)Q[Z++]=H.charCodeAt(me);Q[Z]=0,R+=H.length+1}),0},F:(y,w)=>{var R=zo();X[y>>2]=R.length;var H=0;return R.forEach(Z=>H+=Z.length+1),X[w>>2]=H,0},e:function(y){try{var w=ya(y);return On(w),0}catch(R){if(typeof ia>"u"||R.name!=="ErrnoError")throw R;return R.Pa}},p:function(y,w){try{var R=ya(y);return Q[w]=R.tty?2:Vt(R.mode)?3:(R.mode&61440)===40960?7:4,te[w+2>>1]=0,W[w+8>>3]=BigInt(0),W[w+16>>3]=BigInt(0),0}catch(H){if(typeof ia>"u"||H.name!=="ErrnoError")throw H;return H.Pa}},w:function(y,w,R,H){try{e:{var Z=ya(y);y=w;for(var me,ve=w=0;ve<R;ve++){var We=X[y>>2],vt=X[y+4>>2];y+=8;var At=Os(Z,Q,We,vt,me);if(0>At){var Ea=-1;break e}if(w+=At,At<vt)break;typeof me<"u"&&(me+=At)}Ea=w}return X[H>>2]=Ea,0}catch(Ja){if(typeof ia>"u"||Ja.name!=="ErrnoError")throw Ja;return Ja.Pa}},D:function(y,w,R,H){w=-9007199254740992>w||9007199254740992<w?NaN:Number(w);try{if(isNaN(w))return 61;var Z=ya(y);return Qr(Z,w,R),W[H>>3]=BigInt(Z.position),Z.ob&&w===0&&R===0&&(Z.ob=null),0}catch(me){if(typeof ia>"u"||me.name!=="ErrnoError")throw me;return me.Pa}},I:function(y){var R;try{var w=ya(y);return(R=w.Ma)!=null&&R.fsync?w.Ma.fsync(w):0}catch(H){if(typeof ia>"u"||H.name!=="ErrnoError")throw H;return H.Pa}},t:function(y,w,R,H){try{e:{var Z=ya(y);y=w;for(var me,ve=w=0;ve<R;ve++){var We=X[y>>2],vt=X[y+4>>2];y+=8;var At=Rc(Z,Q,We,vt,me);if(0>At){var Ea=-1;break e}if(w+=At,At<vt)break;typeof me<"u"&&(me+=At)}Ea=w}return X[H>>2]=Ea,0}catch(Ja){if(typeof ia>"u"||Ja.name!=="ErrnoError")throw Ja;return Ja.Pa}},k:js},Ze;(async function(){var R;function y(H){var Z;return Ze=H.exports,U=Ze.M,se(),Tn=Ze.O,P--,(Z=g.monitorRunDependencies)==null||Z.call(g,P),P==0&&q&&(H=q,q=null,H()),Ze}P++,(R=g.monitorRunDependencies)==null||R.call(g,P);var w={a:Ii};return g.instantiateWasm?new Promise(H=>{g.instantiateWasm(w,(Z,me)=>{y(Z),H(Z.exports)})}):(ne??(ne=g.locateFile?g.locateFile("sql-wasm.wasm",T):T+"sql-wasm.wasm"),y((await Ee(w)).instance))})(),g._sqlite3_free=y=>(g._sqlite3_free=Ze.P)(y),g._sqlite3_value_text=y=>(g._sqlite3_value_text=Ze.Q)(y),g._sqlite3_prepare_v2=(y,w,R,H,Z)=>(g._sqlite3_prepare_v2=Ze.R)(y,w,R,H,Z),g._sqlite3_step=y=>(g._sqlite3_step=Ze.S)(y),g._sqlite3_reset=y=>(g._sqlite3_reset=Ze.T)(y),g._sqlite3_exec=(y,w,R,H,Z)=>(g._sqlite3_exec=Ze.U)(y,w,R,H,Z),g._sqlite3_finalize=y=>(g._sqlite3_finalize=Ze.V)(y),g._sqlite3_column_name=(y,w)=>(g._sqlite3_column_name=Ze.W)(y,w),g._sqlite3_column_text=(y,w)=>(g._sqlite3_column_text=Ze.X)(y,w),g._sqlite3_column_type=(y,w)=>(g._sqlite3_column_type=Ze.Y)(y,w),g._sqlite3_errmsg=y=>(g._sqlite3_errmsg=Ze.Z)(y),g._sqlite3_clear_bindings=y=>(g._sqlite3_clear_bindings=Ze._)(y),g._sqlite3_value_blob=y=>(g._sqlite3_value_blob=Ze.$)(y),g._sqlite3_value_bytes=y=>(g._sqlite3_value_bytes=Ze.aa)(y),g._sqlite3_value_double=y=>(g._sqlite3_value_double=Ze.ba)(y),g._sqlite3_value_int=y=>(g._sqlite3_value_int=Ze.ca)(y),g._sqlite3_value_type=y=>(g._sqlite3_value_type=Ze.da)(y),g._sqlite3_result_blob=(y,w,R,H)=>(g._sqlite3_result_blob=Ze.ea)(y,w,R,H),g._sqlite3_result_double=(y,w)=>(g._sqlite3_result_double=Ze.fa)(y,w),g._sqlite3_result_error=(y,w,R)=>(g._sqlite3_result_error=Ze.ga)(y,w,R),g._sqlite3_result_int=(y,w)=>(g._sqlite3_result_int=Ze.ha)(y,w),g._sqlite3_result_int64=(y,w)=>(g._sqlite3_result_int64=Ze.ia)(y,w),g._sqlite3_result_null=y=>(g._sqlite3_result_null=Ze.ja)(y),g._sqlite3_result_text=(y,w,R,H)=>(g._sqlite3_result_text=Ze.ka)(y,w,R,H),g._sqlite3_aggregate_context=(y,w)=>(g._sqlite3_aggregate_context=Ze.la)(y,w),g._sqlite3_column_count=y=>(g._sqlite3_column_count=Ze.ma)(y),g._sqlite3_data_count=y=>(g._sqlite3_data_count=Ze.na)(y),g._sqlite3_column_blob=(y,w)=>(g._sqlite3_column_blob=Ze.oa)(y,w),g._sqlite3_column_bytes=(y,w)=>(g._sqlite3_column_bytes=Ze.pa)(y,w),g._sqlite3_column_double=(y,w)=>(g._sqlite3_column_double=Ze.qa)(y,w),g._sqlite3_bind_blob=(y,w,R,H,Z)=>(g._sqlite3_bind_blob=Ze.ra)(y,w,R,H,Z),g._sqlite3_bind_double=(y,w,R)=>(g._sqlite3_bind_double=Ze.sa)(y,w,R),g._sqlite3_bind_int=(y,w,R)=>(g._sqlite3_bind_int=Ze.ta)(y,w,R),g._sqlite3_bind_text=(y,w,R,H,Z)=>(g._sqlite3_bind_text=Ze.ua)(y,w,R,H,Z),g._sqlite3_bind_parameter_index=(y,w)=>(g._sqlite3_bind_parameter_index=Ze.va)(y,w),g._sqlite3_sql=y=>(g._sqlite3_sql=Ze.wa)(y),g._sqlite3_normalized_sql=y=>(g._sqlite3_normalized_sql=Ze.xa)(y),g._sqlite3_changes=y=>(g._sqlite3_changes=Ze.ya)(y),g._sqlite3_close_v2=y=>(g._sqlite3_close_v2=Ze.za)(y),g._sqlite3_create_function_v2=(y,w,R,H,Z,me,ve,We,vt)=>(g._sqlite3_create_function_v2=Ze.Aa)(y,w,R,H,Z,me,ve,We,vt),g._sqlite3_update_hook=(y,w,R)=>(g._sqlite3_update_hook=Ze.Ba)(y,w,R),g._sqlite3_open=(y,w)=>(g._sqlite3_open=Ze.Ca)(y,w);var Hs=g._malloc=y=>(Hs=g._malloc=Ze.Da)(y),wi=g._free=y=>(wi=g._free=Ze.Ea)(y);g._RegisterExtensionFunctions=y=>(g._RegisterExtensionFunctions=Ze.Fa)(y);var Ko=(y,w)=>(Ko=Ze.Ga)(y,w),Ci=(y,w)=>(Ci=Ze.Ha)(y,w),vn=y=>(vn=Ze.Ia)(y),tr=y=>(tr=Ze.Ja)(y),fr=()=>(fr=Ze.Ka)();g.stackSave=()=>fr(),g.stackRestore=y=>vn(y),g.stackAlloc=y=>tr(y),g.cwrap=(y,w,R,H)=>{var Z=!R||R.every(me=>me==="number"||me==="boolean");return w!=="string"&&Z&&!H?g["_"+y]:(...me)=>Uc(y,w,R,me)},g.addFunction=Yr,g.removeFunction=er,g.UTF8ToString=Fe,g.ALLOC_NORMAL=os,g.allocate=vi,g.allocateUTF8OnStack=Vo;function ar(){function y(){var Z;if(g.calledRun=!0,!O){if(!g.noFSInit&&!nn){var w,R;nn=!0,H??(H=g.stdin),w??(w=g.stdout),R??(R=g.stderr),H?Da("stdin",H):jt("/dev/tty","/dev/stdin"),w?Da("stdout",null,w):jt("/dev/tty","/dev/stdout"),R?Da("stderr",null,R):jt("/dev/tty1","/dev/stderr"),ma("/dev/stdin",0),ma("/dev/stdout",1),ma("/dev/stderr",1)}if(Ze.N(),Rt=!1,(Z=g.onRuntimeInitialized)==null||Z.call(g),g.postRun)for(typeof g.postRun=="function"&&(g.postRun=[g.postRun]);g.postRun.length;){var H=g.postRun.shift();Oe.unshift(H)}we(Oe)}}if(0<P)q=ar;else{if(g.preRun)for(typeof g.preRun=="function"&&(g.preRun=[g.preRun]);g.preRun.length;)Et();we(ze),0<P?q=ar:g.setStatus?(g.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>g.setStatus(""),1),y()},1)):y()}}if(g.preInit)for(typeof g.preInit=="function"&&(g.preInit=[g.preInit]);0<g.preInit.length;)g.preInit.pop()();return ar(),m}),n)};t.exports=i,t.exports.default=i}(wf)),wf.exports}var lT=oT();const cT=is(lT);var kE=`
\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;
`,LE={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;`},Ga=[{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"}],Rh=class{getCreateVaultSql(){try{return{success:!0,sqlCommands:[kE],version:Ga[Ga.length-1].version,migrationNumber:Ga[Ga.length-1].revision}}catch(t){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:t instanceof Error?t.message:"Unknown error creating vault SQL"}}}getUpgradeVaultSql(t,e){try{const n=e??Ga[Ga.length-1].revision,i=Ga.find(d=>d.revision===n);if(!i)return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:`Target migration number ${n} not found`};if(t>=n)return{success:!0,sqlCommands:[],version:i.version,migrationNumber:n};const s=Ga.filter(d=>d.revision>t&&d.revision<=n),l=[];for(const d of s){const m=d.revision-1,f=LE[m];f&&l.push(f)}return{success:!0,sqlCommands:l,version:i.version,migrationNumber:n}}catch(n){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:n instanceof Error?n.message:"Unknown error generating upgrade SQL"}}}getUpgradeToLatestSql(t){return this.getUpgradeVaultSql(t)}getUpgradeToVersionSql(t,e){const n=Ga.find(i=>i.version===e);return n?this.getUpgradeVaultSql(t,n.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(t,e,n){let i="0.0.0",s=0;t&&(e?i=e:(i="1.0.0",s=1),n&&(s=parseInt(n,10)));const l=Ga[Ga.length-1],d=s<l.revision,m=Ga.filter(f=>f.revision>s);return{currentVersion:i,currentMigrationNumber:s,targetVersion:l.version,targetMigrationNumber:l.revision,needsUpgrade:d,availableUpgrades:m}}validateVaultStructure(t){const e=["Aliases","Services","Credentials","Passwords","Attachments","EncryptionKeys","Settings","TotpCodes"];return t.filter(i=>e.includes(i)).length>=5}getAllVersions(){return[...Ga]}getLatestVersion(){return Ga[Ga.length-1]}getMigrationSql(t){return LE[t]}getCompleteSchemaSql(){return kE}};function DE(t){const n=/^(\d+)\.(\d+)\.(\d+)$/.exec(t);return n?{major:parseInt(n[1],10),minor:parseInt(n[2],10),patch:parseInt(n[3],10)}:null}function dT(t,e){const n=DE(t);if(!n)return{isCompatible:!1,databaseVersion:t,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const i=Ga.find(g=>g.version===t);if(i)return{isCompatible:!0,databaseVersion:t,clientVersion:i,isKnownVersion:!0,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const s=e?Ga.find(g=>g.version===e)??RE():RE(),l=DE(s.version);if(!l)return{isCompatible:!1,databaseVersion:t,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const d=n.major!==l.major,m=!d&&(n.minor!==l.minor||n.patch!==l.patch);return{isCompatible:!d,databaseVersion:t,clientVersion:s,isKnownVersion:!1,isMajorVersionDifference:d,isMinorVersionDifference:m}}function RE(){return Ga[Ga.length-1]}function uT(t){const n=/_(\d+\.\d+\.\d+)-/.exec(t);return(n==null?void 0:n[1])??null}class hc extends Error{constructor(e){super(e),this.name="VaultVersionIncompatibleError",Object.setPrototypeOf(this,hc.prototype)}}const mT={loginTitle:"Log på AliasVault",username:"Brugernavn eller e-mail",usernamePlaceholder:"navn / navn@firma.dk",passwordPlaceholder:"Indtast din adgangskode",rememberMe:"Husk mig",loginButton:"Log på",noAccount:"Endnu ingen konto?",createVault:"Opret ny boks",twoFactorTitle:"Indtast autentificeringskoden fra din autentificeringsapp.",authCode:"Bekræftelseskode",authCodePlaceholder:"Indtast 6-cifret kode",verify:"Bekræft",twoFactorNote:"Bemærk: Hvis du ikke har adgang til din autentificeringsenhed, kan du nulstille din 2FA med en gendannelseskode ved at logge på via hjemmesiden.",masterPassword:"Hovedadgangskode",unlockVault:"Oplås",unlockWithPin:"Oplås med PIN-kode",enterPinToUnlock:"Indtast din pinkode for at låse op for din boks",useMasterPassword:"Anvend Hovedadgangskode",unlockTitle:"Lås Din Boks op",logoutConfirm:"Er du sikker på, at du vil logge ud?",unlockSuccessTitle:"Din boks er oplåst",unlockSuccessDescription:"Du kan nu bruge autofyld i login-formularer i din browser.",closePopup:"Luk denne popup",browseVault:"Gennemse boksens indhold",autoCloseUnlockPopup:"Luk automatisk ved fremtidige log in",closingIn:"Lukker om {{seconds}}...",connectingTo:"Forbinder til",switchAccounts:"Skift konto?",loginWithMobile:"Log ind via mobilapp",unlockWithMobile:"Lås op ved hjælp af Mobil App",scanQrCode:"Skan denne QR-kode med din AliasVault-mobilapp for at logge ind og låse din boks op."},gT={vault:"Boks",emails:"E-mails"},fT={loading:"Indlæser...",notice:"Besked",error:"Fejl",cancel:"Annuller",confirm:"Bekræft",remove:"Fjern",back:"Tilbage",next:"Næste",use:"Brug",add:"Tilføj",delete:"Slet",undo:"Fortryd",save:"Gem",saving:"Gemmer...",edit:"Rediger",create:"Opret",or:"Eller",close:"Luk",dismiss:"Afvis",logout:"Log ud",copied:"Kopieret!",openInNewWindow:"Åbn i nyt vindue",enabled:"Aktiveret",disabled:"Deaktiveret",showPassword:"Vis adgangskode",hidePassword:"Skjul adgangskode",show:"Vis",hide:"Skjul",showDetails:"Vis detaljer",hideDetails:"Skjul detaljer",copyToClipboard:"Kopier til udklipsholder",loadingEmails:"Indlæser e-mails...",loadingTotpCodes:"Indlæser TOTP-koder...",attachments:"Vedhæftede filer",loadingAttachments:"Indlæser vedhæftede filer...",settings:"Indstillinger",recentEmails:"Seneste e-mails",credentials:"Logonoplysninger",customFields:"Brugerdefinerede felter",twoFactorAuthentication:"To-faktor autentificering",alias:"Alias",notes:"Noter",email:"E-mail",username:"Brugernavn",password:"Adgangskode",generate:"Generer",serviceName:"Tjenestenavn",loggedIn:"Logget ind",syncingVault:"Synkroniserer boks",checkingVaultUpdates:"Tjekker for opdateringer til boks",syncingUpdatedVault:"Synkroniserer opdateret boks",loadMore:"Indlæs flere",offline:"Offline",offlineMode:"Arbejder i offline-tilstand",pendingSync:"Synkroniserer...",mergingVaultChanges:"Fletter ændringer i boks...",uploadingVault:"Uploader boks...",errors:{serverNotAvailable:"AliasVault-serveren er ikke tilgængelig. Prøv venligst igen senere eller kontakt support, hvis problemet fortsætter.",clientVersionNotSupported:"Denne version af AliasVault-browserudvidelsen understøttes ikke længere af serveren. Opdater venligst din browserudvidelse til den nyeste version.",browserExtensionOutdated:"Denne browserudvidelse er forældet og kan ikke bruges til at få adgang til denne boks. Opdater venligst browserudvidelsen for at fortsætte.",serverVersionNotSupported:"AliasVault-serveren skal opdateres til en nyere version for at kunne bruge denne browserudvidelse. Kontakt venligst support, hvis du har brug for hjælp.",serverVersionTooOld:"AliasVault-serveren skal opdateres til en nyere version for at bruge denne funktion. Kontakt venligst serveradministratoren, hvis du har brug for hjælp.",unknownError:"Der opstod en ukendt fejl",unknownErrorTryAgain:"Der opstod en ukendt fejl. Prøv venligst igen.",vaultNotAvailable:"Boksen er ikke tilgængelig",vaultIsLocked:"Boksen er låst",passwordChanged:"Din adgangskode er blevet ændret siden sidste logon. Log venligst ind igen af sikkerhedsmæssige årsager.",syncConflictMaxRetries:"Kunne ikke synkronisere boksen efter flere forsøg. Prøv venligst igen senere.",mergeFailed:"Kunne ikke flette ændringer i boks. Prøv venligst igen.",invalidCode:"Indtast venligst en gyldig 6-cifret autentificeringskode.",serverError:"Kunne ikke få forbindelse til AliasVault-serveren. Prøv venligst igen senere eller kontakt support, hvis problemet fortsætter.",wrongPassword:"Forkert adgangskode. Prøv venligst igen.",sessionExpired:"Din session er udløbet. Log venligst ind igen.",mobileLoginRequestExpired:"Anmodning om mobil-logon udløb. Genindlæs siden og prøv igen."},apiErrors:{UNKNOWN_ERROR:"Der opstod en ukendt fejl. Prøv venligst igen.",ACCOUNT_LOCKED:"Kontoen er midlertidigt låst på grund af for mange mislykkede forsøg. Prøv venligst igen senere.",ACCOUNT_BLOCKED:"Din konto er blevet deaktiveret. Hvis du mener, at dette er en fejl, bedes du kontakte support.",USER_NOT_FOUND:"Ugyldigt brugernavn eller adgangskode. Prøv venligst igen.",INVALID_AUTHENTICATOR_CODE:"Ugyldig autentificeringskode. Prøv venligst igen.",INVALID_RECOVERY_CODE:"Ugyldig gendannelseskode. Prøv venligst igen.",REFRESH_TOKEN_REQUIRED:"Refresh-token er påkrævet.",INVALID_REFRESH_TOKEN:"Ugyldigt refresh-token.",PUBLIC_REGISTRATION_DISABLED:"Oprettelse af nye konti er i øjeblikket deaktiveret på denne server. Kontakt venligst administratoren.",USERNAME_REQUIRED:"Brugernavn er påkrævet.",USERNAME_ALREADY_IN_USE:"Brugernavnet er allerede i brug.",USERNAME_AVAILABLE:"Brugernavnet er ledigt.",USERNAME_MISMATCH:"Brugernavnet matcher ikke den nuværende bruger.",PASSWORD_MISMATCH:"Den angivne adgangskode matcher ikke din nuværende adgangskode.",ACCOUNT_SUCCESSFULLY_DELETED:"Kontoen blev slettet korrekt.",USERNAME_EMPTY_OR_WHITESPACE:"Brugernavn må ikke være tomt eller kun indeholde mellemrum.",USERNAME_TOO_SHORT:"Brugernavnet er for kort: skal være mindst 3 tegn langt.",USERNAME_TOO_LONG:"Brugernavnet er for langt: må ikke være længere end 40 tegn.",USERNAME_INVALID_EMAIL:"Ugyldig e-mailadresse.",USERNAME_INVALID_CHARACTERS:"Brugernavnet er ugyldigt; kan kun indeholde bogstaver eller tal.",VAULT_NOT_UP_TO_DATE:"Din boks er ikke opdateret. Synkroniser venligst din boks og prøv igen.",INTERNAL_SERVER_ERROR:"Intern serverfejl.",VAULT_ERROR:"Den lokale boks er ikke opdateret. Synkroniser venligst din boks ved at genindlæse siden og prøv igen."}},hT={or:"eller",new:"Ny",vaultLocked:"AliasVault er låst.",creatingNewAlias:"Opretter nyt alias...",noMatchesFound:"Ingen match fundet",searchVault:"Søg i boks...",enterServiceName:"Indtast tjenestenavn",enterEmailAddress:"Indtast e-mailadresse",enterUsername:"Indtast brugernavn",hideFor1Hour:"Skjul i 1 time (nuværende side)",hidePermanently:"Skjul permanent (nuværende side)",createRandomAlias:"Opret tilfældigt alias",createUsernamePassword:"Opret brugernavn/adgangskode",randomAlias:"Tilfældigt alias",usernamePassword:"Brugernavn/adgangskode",createAndSaveAlias:"Opret og gem alias",createAndSaveCredential:"Opret og gem logonoplysning",randomIdentityDescription:"Generer en tilfældig identitet med en tilfældig e-mailadresse, der er tilgængelig i AliasVault.",randomIdentityDescriptionDropdown:"Tilfældig identitet med tilfældig e-mail",manualCredentialDescription:"Angiv din egen e-mailadresse og brugernavn.",manualCredentialDescriptionDropdown:"Manuelt brugernavn og adgangskode",failedToCreateIdentity:"Kunne ikke oprette identitet. Prøv venligst igen.",enterEmailAndOrUsername:"Indtast e-mail og/eller brugernavn",autofillWithAliasVault:"Autofyld med AliasVault",generateRandomPassword:"Generer tilfældig adgangskode (kopier til udklipsholder)",generateNewPassword:"Generer ny adgangskode",togglePasswordVisibility:"Vis/skjul adgangskode",passwordCopiedToClipboard:"Adgangskode kopieret til udklipsholder",openAliasVaultToUpgrade:"Åbn AliasVault for at opgradere",vaultUpgradeRequired:"Opgradering af boks påkrævet.",dismissPopup:"Luk popup",noTotpItemsFound:"Ingen 2FA kode match fundet",close:"Luk",savePrompt:{title:"Gem i AliasVault?",neverForThisSite:"Aldrig for dette websted",addUrlTitle:"Tilføj URL til legitimationsoplysninger?",addUrl:"Tilføj URL"}},pT={title:"Elementer",itemName:"Navn",loginCredentials:"Logonoplysninger",cardInformation:"Kortoplysninger",addItem:"Tilføj element",addNewItem:"Tilføj nyt element",saveItem:"Gem element",itemDetails:"Elementdetaljer",editItem:"Rediger element",untitled:"Uden titel",newFolder:"Ny mappe",createFolder:"Opret mappe",editFolder:"Rediger mappe",folderName:"Mappenavn",folderNameRequired:"Mappenavn er påkrævet",folder:"Mappe",welcomeTitle:"Velkommen til AliasVault!",welcomeDescription:"For at bruge AliasVault-browserudvidelsen: Gå til et websted og brug AliasVault-autofyld-popup'en til at oprette en ny logonoplysning.",noPasskeysFound:"Der er endnu ikke oprettet nogen passkeys. Passkeys oprettes ved at besøge et websted, der tilbyder passkeys som autentificeringsmetode.",noMatchingItems:"Ingen elementer matcher det valgte filter.",noMatchingItemsSearch:'Ingen elementer matcher "{{search}}"',noMatchingItemsWithFilter:'Ingen {{filter}}-elementer matcher "{{search}}"',clearSearch:"Ryd søgning",clearFilter:"Ryd filter",emptyFolderHint:"Denne mappe er tom. For at flytte elementer til denne mappe, skal du redigere elementet og trykke på mappe-ikonet i navnefeltet.",allItemsInFolders:"Alle dine elementer er organiseret i mapper. Klik på en mappe ovenfor for at se dine oplysninger, eller brug søgefunktionen til at finde specifikke elementer.",deleteFolder:"Slet mappe",deleteFolderKeepItems:"Slet kun mappe",deleteFolderKeepItemsDescription:"Elementer flyttes tilbage til hovedlisten.",deleteFolderAndItems:"Slet mappe og alle elementer",deleteFolderAndItemsDescription:"{{count}} element(er) vil blive flyttet til Senest Slettede.",filters:{folders:"Mapper",passkeys:"Passkeys",totp:"2FA Koder"},sort:{title:"Sorter efter",oldestFirst:"Ældste først",newestFirst:"Nyeste først",alphabetical:"Alfabetisk (A-Å)"},deleteItemTitle:"Slet element",deleteItemConfirm:"Er du sikker på, at du vil slette dette element?",viewHistory:"Vis historik",history:"Historik",noHistoryAvailable:"Ingen historik tilgængelig",tags:"Tags",changePasswordComplexity:"Skift adgangskodens kompleksitet",passwordLength:"Adgangskodens længde",includeLowercase:"Inkluder små bogstaver",includeUppercase:"Inkluder store bogstaver",includeNumbers:"Inkluder tal",includeSpecialChars:"Inkluder specialtegn",avoidAmbiguousChars:"Undgå tvetydige tegn (o, 0 osv.)",privateEmailTitle:"Privat e-mail",privateEmailAliasVaultServer:"AliasVault-server",privateEmailDescription:"E2E-krypteret, fuldt privat.",publicEmailTitle:"Offentlige midlertidige e-mailudbydere",publicEmailDescription:"Anonym men begrænset privatliv. E-mailindhold kan læses af alle, der kender adressen.",validation:{required:"Dette felt er påkrævet"}},AT={selectType:"Tilføj nyt element",typeLabel:"Elementtype",creating:"Opretter",editing:"Redigerer",regenerateAlias:"Gengenerer alias",addCustomField:"Tilføj brugerdefineret felt",fieldLabel:"Feltnavn",enterFieldName:"Indtast feltnavn",fieldType:"Felttype",fieldTypes:{text:"Tekst",hidden:"Skjult (maskeret tekst)",email:"E-mail",url:"URL",phone:"Telefon",number:"Nummer",date:"Dato",textArea:"Tekstområde"},login:{title:"Log på"},alias:{title:"Alias"},creditCard:{title:"Betalingskort"},note:{title:"Sikker note"}},yT={"login.url":"Websteds-URL","login.username":"Brugernavn","login.password":"Adgangskode","alias.first_name":"Fornavn","alias.last_name":"Efternavn","alias.gender":"Køn","alias.birthdate":"Fødselsdato","login.email":"E-mail","notes.content":"Noter","card.cardholder_name":"Kortholders navn","card.number":"Kortnummer","card.expiry_month":"Udløbsmåned","card.expiry_year":"Udløbsår","card.cvv":"CVV","card.pin":"PIN-kode"},ET={addCode:"Tilføj 2FA-kode",instructions:"Indtast den hemmelige nøgle (secret key), der vises af webstedet, hvor du vil tilføje to-faktor autentificering.",nameOptional:"Navn (valgfrit)",secretKey:"Hemmelig nøgle",saveToViewCode:"Gem for at se kode",defaultName:"Godkender",deleteTotpCodeTitle:"Slet 2FA Kode",deleteTotpCodeConfirmation:'Er du sikker på, at du vil slette 2FA koden "{{name}}"?',errors:{invalidSecretKey:"Ugyldigt format for hemmelig nøgle."}},bT={uploading:"Uploader...",uploadSuccess:"Filer blev uploadet korrekt.",deleteSuccess:"Vedhæftet fil slettet korrekt.",firefoxExpandRequired:"Brug det udvidede vindue for at uploade filer.",openExpandedWindow:"Åbn udvidet vindue"},vT={title:"E-mails",deleteEmailTitle:"Slet e-mail",deleteEmailConfirm:"Er du sikker på, at du vil slette denne e-mail permanent?",from:"Fra",to:"Til",date:"Dato",emailContent:"E-mailindhold",emailNotFound:"E-mail blev ikke fundet",noEmails:"Ingen e-mails fundet",noEmailsDescription:"Du har endnu ikke modtaget nogen e-mails på dine private e-mailadresser. Når du modtager en ny e-mail, vil den blive vist her.",offlineMessage:"Du er offline. Opret venligst forbindelse til internettet for at indlæse dine e-mails.",dateFormat:{justNow:"lige nu",minutesAgo_single:"{{count}} min siden",minutesAgo_plural:"{{count}} min siden",hoursAgo_single:"{{count}} time siden",hoursAgo_plural:"{{count}} timer siden",yesterday:"i går"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Den valgte e-mailadresse er allerede i brug. Skift venligst e-mailadressen ved at redigere denne logonoplysning.",CLAIM_DOES_NOT_EXIST:"Der opstod en fejl under indlæsning af e-mails. Prøv venligst at redigere og gemme logonoplysningen for at synkronisere databasen, og prøv derefter igen."}},IT={serverUrl:"Server-URL",language:"Sprog",autofillEnabled:"Aktiver autofyld",version:"Version",openWebApp:"Åbn web-app",lock:"Lås",globalSettings:"Globale indstillinger",autofillPopup:"Autofyld-popup",activeOnAllSites:"Aktiv på alle websteder (medmindre deaktiveret nedenfor)",disabledOnAllSites:"Deaktiveret på alle websteder",rightClickContextMenu:"Højreklik-kontekstmenu",autofillMatching:"Autofyld-matching",autofillMatchingMode:"Matching-tilstand for autofyld",autofillMatchingModeDescription:"Bestemmer hvilke logonoplysninger der anses for at være et match og vises som forslag i autofyld-popup'en for et givet websted.",autofillMatchingDefault:"URL + underdomæne + navn wildcard",autofillMatchingUrlSubdomain:"URL + underdomæne",autofillMatchingUrlExact:"Kun eksakt URL-domæne",siteSpecificSettings:"Webstedsspecifikke indstillinger",autofillPopupOn:"Autofyld-popup på: ",enabledForThisSite:"Aktiveret for dette websted",disabledForThisSite:"Deaktiveret for dette websted",temporarilyDisabledUntil:"Midlertidigt deaktiveret indtil ",resetAllSiteSettings:"Nulstil alle webstedsspecifikke indstillinger",autofillPopupDescription:"Vis popup for autofyld når login-felter detekteres.",disabledSites:"Deaktiverede websteder",disabledSitesDescription:"Websteder hvor popup-vinduet for autofyld ikke vises.",clearAllDisabledSites:"Ryd alle deaktiverede websteder",temporaryUntil:"indtil",appearance:"Udseende",theme:"Tema",useDefault:"Brug standard",light:"Lys",dark:"Mørk",keyboardShortcuts:"Tastaturgenveje",configureKeyboardShortcuts:"Konfigurer tastaturgenveje",configure:"Konfigurer",clipboardClearTimeout:"Ryd udklipsholder efter kopiering",clipboardClearTimeoutDescription:"Ryd automatisk udklipsholderen efter kopiering af følsomme data",clipboardClearDisabled:"Ryd aldrig",clipboardClear5Seconds:"Ryd efter 5 sekunder",clipboardClear10Seconds:"Ryd efter 10 sekunder",clipboardClear15Seconds:"Ryd efter 15 sekunder",autoLockTimeout:"Auto-lås timeout",autoLockTimeoutDescription:"Lås automatisk boksen efter en periode med inaktivitet",autoLockTimeoutHelp:"Boksen vil kun låse efter den angivne periode med inaktivitet (ingen brug af autofyld eller åbning af udvidelsen). Boksen vil altid låse, når browseren lukkes, uanset denne indstilling.",autoLockNever:"Aldrig",autoLock15Seconds:"15 sekunder",autoLock1Minute:"1 minut",autoLock5Minutes:"5 minutter",autoLock15Minutes:"15 minutter",autoLock30Minutes:"30 minutter",autoLock1Hour:"1 time",autoLock4Hours:"4 timer",autoLock8Hours:"8 timer",autoLock24Hours:"24 timer",versionPrefix:"Version ",autofillSettings:"Indstillinger for autofyld",clipboardSettings:"Indstillinger for udklipsholder",contextMenuSettings:"Indstillinger for kontekstmenu",passkeySettings:"Indstillinger for passkey",contextMenu:"Kontekstmenu",contextMenuEnabled:"Kontekstmenu er aktiveret",contextMenuDisabled:"Kontekstmenu er deaktiveret",contextMenuDescription:"Højreklik på inputfelter for at få adgang til AliasVault-funktioner",selectLanguage:"Vælg sprog",serverConfiguration:"Serverkonfiguration",serverConfigurationDescription:"Konfigurer AliasVault server-URL for selv-hostede instanser",customApiUrl:"API-URL",customClientUrl:"Klient-URL",apiUrlHint:"URL til API-endpoint (normalt klient-URL + /api)",clientUrlHint:"Web-interfacets URL for din selv-hostede instans",autofillSettingsDescription:"Aktiver eller deaktiver autofyld-popup på websider",autofillEnabledDescription:"Autofyld-forslag vil blive vist i login-formularer",autofillDisabledDescription:"Autofyld-forslag er deaktiveret globalt",languageSettings:"Sprog",validation:{apiUrlRequired:"API-URL er påkrævet",apiUrlInvalid:"Indtast venligst en gyldig API-URL",clientUrlRequired:"Klient-URL er påkrævet",clientUrlInvalid:"Indtast venligst en gyldig klient-URL"},identityGenerator:"Identitetsgenerator",identityGeneratorSettings:{description:"Konfigurer standardsprog og kønspræference for generering af nye identiteter.",languageSection:"Sprog",languageDescription:"Indstil det sprog, der skal bruges ved generering af nye identiteter.",genderSection:"Køn",genderDescription:"Indstil kønspræference for generering af nye identiteter.",ageRangeSection:"Aldersgruppe",ageRangeDescription:"Indstil aldersgruppen for generering af nye identiteter.",genderOptions:{random:"Tilfældig",male:"Mand",female:"Kvinde"}},loginSave:{title:"Gem Login-prompt",description:"Vis en prompt for at gemme loginoplysninger, når du indsender en login-formular på et websted.",blockedSites:"Blokerede websteder",blockedSitesDescription:"Websteder, hvor den gemte prompt aldrig vises.",clearAllBlockedSites:"Slet alle blokerede websteder"},unlockMethod:{title:"Oplåsningsmetode for boks",introText:"Vælg hvordan du vil låse din boks op. Du kan bruge din hovedadgangskode (altid tilgængelig) eller opsætte en PIN-kode for hurtigere adgang. Efter 3 mislykkede PIN-forsøg skal du bruge din hovedadgangskode.",password:"Hovedadgangskode",pin:"PIN-kode",pinDescription:"Lås boks op med PIN-kode",setupPin:"Opsæt PIN-kode",enterNewPinDescription:"Indtast en PIN-kode på mindst 6 cifre",confirmPin:"Bekræft PIN-kode",confirmPinDescription:"Indtast din PIN-kode igen for at bekræfte",invalidPinFormat:"Ugyldigt PIN-format",pinMismatch:"PIN-koderne matcher ikke",incorrectPin:"Forkert PIN-kode. {{attemptsRemaining}} forsøg tilbage.",incorrectPinSingular:"Forkert PIN-kode. 1 forsøg tilbage.",enableSuccess:"PIN-oplåsning blev aktiveret korrekt!",pinLocked:"PIN-oplåsning er blevet deaktiveret. Brug venligst din hovedadgangskode til at låse din boks op.",pinSecurityWarning:"PIN-oplåsning i browserudvidelsen kan være mindre sikker end din hovedadgangskode, da PIN-koder typisk har lavere entropi og kan brute-forces, hvis din enhed er kompromitteret. Brug det kun på enheder, du stoler fuldt på."}},wT={passkey:"Passkey",site:"Websted",helpText:"Passkeys oprettes på webstedet, når du bliver bedt om det. De kan ikke redigeres manuelt. For at fjerne denne passkey kan du slette den fra denne logonoplysning. For at erstatte denne passkey eller oprette en ny, skal du besøge webstedet og følge dets anvisninger.",passkeyMarkedForDeletion:"Passkey markeret til sletning",passkeyWillBeDeleted:"Denne passkey slettes, når du gemmer denne logonoplysning.",useBrowserPasskey:"Brug browser-passkey",bypass:{description:"Hvor længe vil du bruge browserens passkey-udbyder for {{origin}}?",thisTimeOnly:"Kun denne gang",alwaysForSite:"Altid for dette websted"},authenticate:{title:"Log ind med passkey",signInFor:"Log ind med passkey for",selectPasskey:"Vælg en passkey for at logge ind:",noPasskeysFound:"Ingen passkeys fundet for dette websted"},create:{title:"Opret passkey",createFor:"Opret en ny passkey for",titleLabel:"Titel",titlePlaceholder:"Indtast et navn til denne passkey",createButton:"Opret passkey",selectPasskeyToReplace:"Vælg en passkey der skal erstattes:",createNewPasskey:"Opret ny passkey",replacingPasskey:"Erstatter passkey: {{displayName}}",confirmReplace:"Bekræft erstatning",selectExistingLogin:"Tilføj til eksisterende login:",selectExistingLoginDescription:"Forbind denne passkey til en eksisterende logonoplysning for dette websted.",attachingToCredential:"Tilføjer passkey til: {{serviceName}}",attachPasskey:"Tilføj passkey"},settings:{passkeyProvider:"Passkey-udbyder",passkeyProviderOn:"Passkey-udbyder på "}},CT={title:"Senest slettede",noItems:"Ingen slettede elementer",noItemsDescription:"Elementer du sletter, vil blive vist her i 30 dage, før de fjernes permanent.",description:"Disse elementer slettes permanent efter 30 dage. Du kan gendanne dem eller slette dem med det samme.",restore:"Gendan",deletePermanently:"Slet permanent",emptyAll:"Tøm alle",daysRemaining_one:"{{count}} dag tilbage",daysRemaining_other:"{{count}} dage tilbage",expiringSoon:"Udløber snart",confirmDeleteTitle:"Slet permanent?",confirmDeleteMessage:"Dette element vil blive slettet permanent og kan ikke gendannes.",confirmEmptyAllTitle:"Tøm senest slettede?",confirmEmptyAllMessage:"Alle {{count}} elementer vil blive slettet permanent og kan ikke gendannes."},ST={title:"Opgrader boks",subtitle:"AliasVault er blevet opdateret, og din boks skal opgraderes. Dette bør kun tage et par sekunder.",versionInformation:"Versionsinformation",yourVault:"Din boks-version:",newVersion:"Ny tilgængelig version:",upgrade:"Opgrader boks",upgrading:"Opgraderer...",whatsNew:"Hvad er nyt",whatsNewDescription:"En opgradering er påkrævet for at understøtte følgende ændringer:",noDescriptionAvailable:"Ingen beskrivelse tilgængelig for denne version.",alerts:{unableToGetVersionInfo:"Kunne ikke hente versionsinformation. Prøv venligst igen.",selfHostedServer:"Selv-hosted server",selfHostedWarning:"Hvis du bruger en selv-hosted server, skal du sørge for også at opdatere din selv-hostede instans, da logon til webklienten ellers vil stoppe med at virke.",continueUpgrade:"Fortsæt opgradering",upgradeFailed:"Opgradering fejlede",failedToApplyMigration:"Kunne ikke anvende migrering ({{current}} af {{total}})"}},NT={unsyncedChangesTitle:"Ikke-synkroniserede ændringer",unsyncedChangesWarning:"Du har ændringer, der ikke er synkroniseret, som vil gå tabt, hvis du logger ud nu. Er du sikker på, at du vil fortsætte?",logoutAnyway:"Log ud alligevel"},xT={offline:"Offline",tapToRetry:"Tryk for at prøve synkronisering igen"},TT={auth:mT,menu:gT,common:fT,content:hT,items:pT,itemTypes:AT,fieldLabels:yT,totp:ET,attachmentUploader:bT,emails:vT,settings:IT,passkeys:wT,recentlyDeleted:CT,upgrade:ST,logout:NT,sync:xT},kT={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",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},LT={vault:"Tresor",emails:"E-Mails"},DT={loading:"Laden...",notice:"Hinweis",error:"Fehler",cancel:"Abbrechen",confirm:"Bestätigen",remove:"Remove",back:"Zurück",next:"Weiter",use:"Benutzen",add:"Hinzufügen",delete:"Löschen",undo:"Rückgängig machen",save:"Speichern",saving:"Wird gespeichert ...",edit:"Edit",create:"Erstellen",or:"Oder",close:"Schließen",dismiss:"Dismiss",logout:"Abmelden",copied:"Kopiert!",openInNewWindow:"In neuem Fenster öffnen",enabled:"Aktiviert",disabled:"Deaktiviert",showPassword:"Passwort anzeigen",hidePassword:"Passwort verbergen",show:"Show",hide:"Hide",showDetails:"Details anzeigen",hideDetails:"Details ausblenden",copyToClipboard:"In die Zwischenablage kopieren",loadingEmails:"E-Mails werden geladen...",loadingTotpCodes:"TOTP-Codes werden geladen...",attachments:"Anhänge",loadingAttachments:"Anhänge werden geladen...",settings:"Einstellungen",recentEmails:"Neueste E-Mails",credentials:"Zugangsdaten",customFields:"Benutzerdefinierte Felder",twoFactorAuthentication:"Zwei-Faktor-Authentifizierung",alias:"Alias",notes:"Notizen",email:"E-Mail-Adresse",username:"Benutzername",password:"Passwort",generate:"Generieren",serviceName:"Name des Dienstes",loggedIn:"Angemeldet",syncingVault:"Tresor wird synchronisiert",checkingVaultUpdates:"Prüfe auf Tresor-Updates",syncingUpdatedVault:"Aktualisierter Tresor wird synchronisiert",loadMore:"Mehr laden",offline:"Offline",offlineMode:"Im Offline-Modus arbeiten",pendingSync:"Synchronisierung läuft...",mergingVaultChanges:"Tresor Änderungen zusammenführen...",uploadingVault:"Tresor wird gespeichert...",errors:{serverNotAvailable:"Der AliasVault-Server konnte nicht erreicht werden. Bitte versuche es später noch einmal oder kontaktiere den Support, falls das Problem weiterhin besteht.",clientVersionNotSupported:"Diese Version der AliasVault-Browser-Erweiterung wird vom Server nicht mehr unterstützt. Bitte aktualisiere Deine Browser-Erweiterung auf die neueste Version.",browserExtensionOutdated:"Diese Browser-Erweiterung ist veraltet und kann nicht verwendet werden, um auf diesen Tresor zuzugreifen. Bitte aktualisiere die Browser-Erweiterung, um fortzufahren.",serverVersionNotSupported:"Der AliasVault-Server muss auf eine neuere Version aktualisiert werden, um diese Browser-Erweiterung nutzen zu können. Bitte kontaktiere den Support, falls Du Hilfe benötigst.",serverVersionTooOld:"Der AliasVault-Server muss auf eine neuere Version aktualisiert werden, um dieses Feature nutzen zu können. Bitte kontaktiere den Administrator des Servers, falls Du Hilfe benötigst.",unknownError:"Ein unbekannter Fehler ist aufgetreten",unknownErrorTryAgain:"Ein unbekannter Fehler ist aufgetreten. Bitte versuche es erneut.",vaultNotAvailable:"Tresor nicht verfügbar",vaultIsLocked:"Der Tresor ist gesperrt.",passwordChanged:"Dein Passwort hat sich seit Deiner letzten Anmeldung geändert. Bitte melden Dich aus Sicherheitsgründen erneut an.",syncConflictMaxRetries:"Tresor konnte nach mehreren Versuchen nicht synchronisiert werden. Bitte versuche es später erneut.",mergeFailed:"Fehler beim Zusammenführen der Tresoränderungen. Bitte versuchen Sie es erneut.",invalidCode:"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."},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."}},RT={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",noTotpItemsFound:"No 2FA code matches found",close:"Close",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},BT={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.",noMatchingItems:"No items match the selected filter.",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:"Elemente werden zurück zur Hauptliste verschoben.",deleteFolderAndItems:"Ordner und alle Einträge löschen",deleteFolderAndItemsDescription:"{{count}} Elemente(n) werden nach kürzlich gelöschtem Element verschoben.",filters:{folders:"Folders",passkeys:"Passkeys",totp:"2FA Codes"},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"}},UT={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"}},MT={"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"},_T={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Ungültiges Format des Secret-Key"}},FT={uploading:"Hochladen...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},OT={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."}},jT={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},PT={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 "}},HT={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:"Diese Elemente werden nach 30 Tagen dauerhaft gelöscht. Sie können sie wiederherstellen oder sofort löschen.",restore:"Wiederherstellen",deletePermanently:"Dauerhaft löschen",emptyAll:"Alle leeren",daysRemaining_one:"Noch {{count}} Tage",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."},zT={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}})"}},VT={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"},QT={offline:"Offline",tapToRetry:"Tap to retry sync"},KT={auth:kT,menu:LT,common:DT,content:RT,items:BT,itemTypes:UT,fieldLabels:MT,totp:_T,attachmentUploader:FT,emails:OT,settings:jT,passkeys:PT,recentlyDeleted:HT,upgrade:zT,logout:VT,sync:QT},GT={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",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},qT={vault:"Vault",emails:"Emails"},WT={loading:"Loading...",notice:"Notice",error:"Error",cancel:"Cancel",confirm:"Confirm",remove:"Remove",back:"Back",next:"Next",use:"Use",add:"Add",delete:"Delete",undo:"Undo",save:"Save",saving:"Saving...",edit:"Edit",create:"Create",or:"Or",close:"Close",dismiss:"Dismiss",logout:"Logout",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",show:"Show",hide:"Hide",showDetails:"Show details",hideDetails:"Hide details",copyToClipboard:"Copy to clipboard",loadingEmails:"Loading emails...",loadingTotpCodes:"Loading TOTP codes...",attachments:"Attachments",loadingAttachments:"Loading attachments...",settings:"Settings",recentEmails:"Recent emails",credentials:"Credentials",customFields:"Custom Fields",twoFactorAuthentication:"Two-factor authentication",alias:"Alias",notes:"Notes",email:"Email",username:"Username",password:"Password",generate:"Generate",serviceName:"Service Name",loggedIn:"Logged in",syncingVault:"Syncing vault",checkingVaultUpdates:"Checking for vault updates",syncingUpdatedVault:"Syncing updated vault",loadMore:"Load more",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Merging vault changes...",uploadingVault:"Uploading vault...",errors:{serverNotAvailable:"The AliasVault server is not available. Please try again later or contact support if the problem persists.",clientVersionNotSupported:"This version of the AliasVault browser extension is not supported by the server anymore. Please update your browser extension to the latest version.",browserExtensionOutdated:"This browser extension is outdated and cannot be used to access this vault. Please update this browser extension to continue.",serverVersionNotSupported:"The AliasVault server needs to be updated to a newer version in order to use this browser extension. Please contact support if you need help.",serverVersionTooOld:"The AliasVault server needs to be updated to a newer version in order to use this feature. Please contact the server admin if you need help.",unknownError:"An unknown error occurred",unknownErrorTryAgain:"An unknown error occurred. Please try again.",vaultNotAvailable:"Vault not available",vaultIsLocked:"Vault is locked",passwordChanged:"Your password has changed since the last time you logged in. Please login again for security reasons.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again.",invalidCode:"Please enter a valid 6-digit authentication code.",serverError:"Could not reach AliasVault server. Please try again later or contact support if the problem persists.",wrongPassword:"Incorrect password. Please try again.",sessionExpired:"Your session has expired. Please log in again.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."},apiErrors:{UNKNOWN_ERROR:"An unknown error occurred. Please try again.",ACCOUNT_LOCKED:"Account temporarily locked due to too many failed attempts. Please try again later.",ACCOUNT_BLOCKED:"Your account has been disabled. If you believe this is a mistake, please contact support.",USER_NOT_FOUND:"Invalid username or password. Please try again.",INVALID_AUTHENTICATOR_CODE:"Invalid authenticator code. Please try again.",INVALID_RECOVERY_CODE:"Invalid recovery code. Please try again.",REFRESH_TOKEN_REQUIRED:"Refresh token is required.",INVALID_REFRESH_TOKEN:"Invalid refresh token.",PUBLIC_REGISTRATION_DISABLED:"New account registration is currently disabled on this server. Please contact the administrator.",USERNAME_REQUIRED:"Username is required.",USERNAME_ALREADY_IN_USE:"Username is already in use.",USERNAME_AVAILABLE:"Username is available.",USERNAME_MISMATCH:"Username does not match the current user.",PASSWORD_MISMATCH:"The provided password does not match your current password.",ACCOUNT_SUCCESSFULLY_DELETED:"Account successfully deleted.",USERNAME_EMPTY_OR_WHITESPACE:"Username cannot be empty or whitespace.",USERNAME_TOO_SHORT:"Username too short: must be at least 3 characters long.",USERNAME_TOO_LONG:"Username too long: cannot be longer than 40 characters.",USERNAME_INVALID_EMAIL:"Invalid email address.",USERNAME_INVALID_CHARACTERS:"Username is invalid, can only contain letters or digits.",VAULT_NOT_UP_TO_DATE:"Your vault is not up-to-date. Please synchronize your vault and try again.",INTERNAL_SERVER_ERROR:"Internal server error.",VAULT_ERROR:"The local vault is not up-to-date. Please synchronize your vault by refreshing the page and try again."}},YT={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",noTotpItemsFound:"No 2FA code matches found",close:"Close",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},JT={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.",noMatchingItems:"No items match the selected filter.",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",totp:"2FA Codes"},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"}},XT={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"}},$T={"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"},ZT={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},ek={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},tk={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."}},ak={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},nk={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 "}},rk={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."},ik={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}})"}},sk={unsyncedChangesTitle:"Unsynced Changes",unsyncedChangesWarning:"You have unsynced changes that will be lost if you log out now. Are you sure you want to continue?",logoutAnyway:"Log out anyway"},ok={offline:"Offline",tapToRetry:"Tap to retry sync"},lk={auth:GT,menu:qT,common:WT,content:YT,items:JT,itemTypes:XT,fieldLabels:$T,totp:ZT,attachmentUploader:ek,emails:tk,settings:ak,passkeys:nk,recentlyDeleted:rk,upgrade:ik,logout:sk,sync:ok},ck={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",autoCloseUnlockPopup:"Auto-cerrar en futuros inicios de sesión",closingIn:"Cerrando en {{seconds}}...",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."},dk={vault:"Bóveda",emails:"Correos electrónicos"},uk={loading:"Cargando...",notice:"Aviso",error:"Error",cancel:"Cancelar",confirm:"Confirmar",remove:"Eliminar",back:"Atrás",next:"Siguiente",use:"Usar",add:"Añadir",delete:"Borrar",undo:"Deshacer",save:"Guardar",saving:"Guardando...",edit:"Edit",create:"Crear",or:"O",close:"Cerrar",dismiss:"Descartar",logout:"Cerrar sesión",copied:"¡Copiado!",openInNewWindow:"Abrir en una ventana nueva",enabled:"Habilitado",disabled:"Desactivado",showPassword:"Mostrar contraseña",hidePassword:"Ocultar contraseña",show:"Mostrar",hide:"Esconder",showDetails:"Mostrar detalles",hideDetails:"Ocultar detalles",copyToClipboard:"Copiar al portapapeles",loadingEmails:"Cargando email...",loadingTotpCodes:"Cargando códigos TOTP...",attachments:"Archivos adjuntos",loadingAttachments:"Cargando archivos adjuntos...",settings:"Configuración",recentEmails:"Correos recientes",credentials:"Credenciales",customFields:"Campos Personalizados",twoFactorAuthentication:"Autenticación de doble factor",alias:"Alias",notes:"Notas",email:"Email",username:"Nombre de usuario",password:"Contraseña",generate:"Generar",serviceName:"Nombre del servicio",loggedIn:"Sesión iniciada",syncingVault:"Sincronizando bóveda",checkingVaultUpdates:"Comprobando actualizaciones de bóveda",syncingUpdatedVault:"Sincronizando bóveda actualizada",loadMore:"Cargar más",offline:"Desconectado",offlineMode:"Funcionando en modo sin conexión",pendingSync:"Sincronizando...",mergingVaultChanges:"Combinando cambios en la bóveda...",uploadingVault:"Subiendo bóveda...",errors:{serverNotAvailable:"El servidor AliasVault no está disponible. Por favor, inténtelo de nuevo más tarde o póngase en contacto con el soporte técnico si el problema persiste.",clientVersionNotSupported:"Esta versión de la extensión del navegador AliasVault ya no es compatible con el servidor. Por favor, actualice la extensión de su navegador a la última versión.",browserExtensionOutdated:"Esta extensión del navegador está desactualizada y no se puede utilizar para acceder a esta bóveda. Por favor, actualice esta extensión del navegador para continuar.",serverVersionNotSupported:"El servidor AliasVault necesita ser actualizado a una versión más reciente para poder usar esta extensión del navegador. Póngase en contacto con el soporte si necesita ayuda.",serverVersionTooOld:"El servidor AliasVault necesita ser actualizado a una versión más reciente para poder utilizar esta característica. Por favor, contacte con el administrador del servidor si necesita ayuda.",unknownError:"Se produjo un error desconocido",unknownErrorTryAgain:"Se ha producido un error desconocido. Por favor, inténtelo de nuevo.",vaultNotAvailable:"Bóveda no disponible",vaultIsLocked:"La bóveda está bloqueada",passwordChanged:"Tu contraseña ha cambiado desde la última vez que iniciaste sesión. Por favor, inicia sesión de nuevo por razones de seguridad.",syncConflictMaxRetries:"No se pudo sincronizar la bóveda después de múltiples intentos. Inténtalo de nuevo más tarde.",mergeFailed:"Error al combinar cambios en la bóveda. Por favor, inténtalo de nuevo.",invalidCode:"Por favor, introduzca un código de autenticación de 6 dígitos válido.",serverError:"No se pudo llegar al servidor AliasVault. Por favor, inténtelo de nuevo más tarde o póngase en contacto con el soporte si el problema persiste.",wrongPassword:"Contraseña incorrecta. Por favor, inténtelo de nuevo.",sessionExpired:"Su sesión ha caducado. Por favor, inicie sesión de nuevo.",mobileLoginRequestExpired:"Se ha agotado el tiempo de inicio de sesión del móvil. Por favor, vuelva a cargar la página e inténtelo de nuevo."},apiErrors:{UNKNOWN_ERROR:"Se ha producido un error desconocido. Por favor, inténtelo de nuevo.",ACCOUNT_LOCKED:"Cuenta bloqueada temporalmente debido a demasiados intentos fallidos. Por favor, inténtelo de nuevo.",ACCOUNT_BLOCKED:"Tu cuenta ha sido desactivada. Si crees que esto es un error, ponte en contacto con soporte.",USER_NOT_FOUND:"Nombre de usuario o contraseña no válidos. Por favor, inténtelo de nuevo.",INVALID_AUTHENTICATOR_CODE:"Código de autenticación inválido. Por favor, inténtelo de nuevo.",INVALID_RECOVERY_CODE:"Código de recuperación inválido. Por favor, inténtelo de nuevo.",REFRESH_TOKEN_REQUIRED:"Se requiere un token de actualización.",INVALID_REFRESH_TOKEN:"Token de actualización inválido.",PUBLIC_REGISTRATION_DISABLED:"El registro de nueva cuenta está actualmente deshabilitado en este servidor. Por favor, contacte con el administrador.",USERNAME_REQUIRED:"Se requiere un nombre de usuario.",USERNAME_ALREADY_IN_USE:"El nombre de usuario ya está en uso.",USERNAME_AVAILABLE:"El nombre de usuario está disponible.",USERNAME_MISMATCH:"El nombre de usuario no coincide con el usuario actual.",PASSWORD_MISMATCH:"La contraseña proporcionada no coincide con su contraseña actual.",ACCOUNT_SUCCESSFULLY_DELETED:"Cuenta eliminada con éxito.",USERNAME_EMPTY_OR_WHITESPACE:"El nombre de usuario no puede estar vacío o en blanco.",USERNAME_TOO_SHORT:"Nombre de usuario demasiado corto: debe tener al menos 3 caracteres.",USERNAME_TOO_LONG:"Nombre de usuario demasiado largo: no puede tener más de 40 caracteres.",USERNAME_INVALID_EMAIL:"Dirección de correo electrónico inválida.",USERNAME_INVALID_CHARACTERS:"El nombre de usuario inválido, solo puede contener letras o dígitos.",VAULT_NOT_UP_TO_DATE:"Su bóveda no está actualizada. Por favor, sincronice su bóveda e inténtelo de nuevo.",INTERNAL_SERVER_ERROR:"Error interno del servidor.",VAULT_ERROR:"La bóveda local no está actualizada. Por favor, sincronice su bóveda actualizando la página e inténtelo de nuevo."}},mk={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",noTotpItemsFound:"Ningún código 2FA encontrado",close:"Cerrar",savePrompt:{title:"¿Guardar en AliasVault?",neverForThisSite:"Nunca para este sitio",addUrlTitle:"¿Añadir URL a la credencial?",addUrl:"Añadir URL"}},gk={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.",noMatchingItems:"No hay elementos que coincidan con el filtro.",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",totp:"Códigos 2FA"},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"}},fk={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"}},hk={"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"},pk={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",deleteTotpCodeTitle:"Eliminar código 2FA",deleteTotpCodeConfirmation:'¿Está seguro que desea eliminar el código 2FA "{{name}}"?',errors:{invalidSecretKey:"Formato de clave secreta inválida."}},Ak={uploading:"Subiendo...",uploadSuccess:"Archivos subidos con éxito.",deleteSuccess:"Adjunto eliminado correctamente.",firefoxExpandRequired:"Para subir archivos, utilice la ventana ampliada.",openExpandedWindow:"Abrir ventana ampliada"},yk={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."}},Ek={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",autofillPopupDescription:"Mostrar el popup de autorrelleno cuando se detectan los campos de inicio de sesión.",disabledSites:"Sitios desactivados",disabledSitesDescription:"Sitios donde el popup de autorrelleno no aparecerá.",clearAllDisabledSites:"Borrar todos los sitios desactivados",temporaryUntil:"hasta",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"}},loginSave:{title:"Guardar registro",description:"Mostrar un mensaje para guardar las credenciales de inicio de sesión cuando envíe un formulario de inicio de sesión en un sitio web.",blockedSites:"Sitios bloqueados",blockedSitesDescription:"Sitios donde el indicador de guardado nunca aparecerá.",clearAllBlockedSites:"Borrar todos los sitios bloqueados"},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."}},bk={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 "}},vk={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."},Ik={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}})"}},wk={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"},Ck={offline:"Sin conexión",tapToRetry:"Toca para reintentar sincronizar"},Sk={auth:ck,menu:dk,common:uk,content:mk,items:gk,itemTypes:fk,fieldLabels:hk,totp:pk,attachmentUploader:Ak,emails:yk,settings:Ek,passkeys:bk,recentlyDeleted:vk,upgrade:Ik,logout:wk,sync:Ck},Nk={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öä",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},xk={vault:"Holvi",emails:"Sähköpostit"},Tk={loading:"Ladataan...",notice:"Huomautus",error:"Virhe",cancel:"Peruuta",confirm:"Vahvista",remove:"Remove",back:"Takaisin",next:"Seuraava",use:"Käytä",add:"Lisää",delete:"Poista",undo:"Kumoa",save:"Tallenna",saving:"Saving...",edit:"Edit",create:"Luo",or:"Tai",close:"Sulje",dismiss:"Dismiss",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",show:"Show",hide:"Hide",showDetails:"Näytä tiedot",hideDetails:"Piilota tiedot",copyToClipboard:"Kopioi leikepöydälle",loadingEmails:"Ladataan sähköposteja...",loadingTotpCodes:"Ladataan TOTP-koodeja...",attachments:"Liitteet",loadingAttachments:"Ladataan liitteitä...",settings:"Asetukset",recentEmails:"Viimeaikaiset sähköpostit",credentials:"Tunnistetiedot",customFields:"Räätälöidyt kentät",twoFactorAuthentication:"Kaksivaiheinen tunnistautuminen",alias:"Alias",notes:"Huomautukset",email:"Sähköposti",username:"Käyttäjänimi",password:"Salasana",generate:"Generate",serviceName:"Palvelun nimi",loggedIn:"Sisäänkirjautuneena",syncingVault:"Synkronoidaan holvia",checkingVaultUpdates:"Tarkistetaan holvin päivitysten varalta",syncingUpdatedVault:"Synkronoidaan päivitettyä holvia",loadMore:"Lataa lisää",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Yhdistetään holvin muutoksia...",uploadingVault:"Uploading vault...",errors:{serverNotAvailable:"AliasVault-palvelin ei ole käytettävissä. Yritä myöhemmin uudelleen tai ota yhteyttä tukeen, jos ongelma jatkuu.",clientVersionNotSupported:"Palvelin ei enää tue tätä AliasVault-selainlaajennuksen versiota. Päivitä selaimen laajennus uusimpaan versioon.",browserExtensionOutdated:"Tämä selainlaajennus on vanhentunut, eikä sillä voi saada pääsyä tähän holviin. Päivitä tämä selainlaajennus jatkaaksesi.",serverVersionNotSupported:"AliasVault-palvelin on päivitettävä uudempaan versioon, jotta voit käyttää tätä selainlaajennusta. Ota yhteyttä tukeen, jos tarvitset apua.",serverVersionTooOld:"AliasVault-palvelin on päivitettävä uudempaan versioon, jotta se voi käyttää tätä ominaisuutta. Ota yhteyttä palvelimen ylläpitäjään jos tarvitset apua.",unknownError:"Tapahtui tuntematon virhe",unknownErrorTryAgain:"Tapahtui tuntematon virhe. Yritä uudelleen.",vaultNotAvailable:"Holvi ei käytettävissä",vaultIsLocked:"Holvi on lukittu",passwordChanged:"Salasanasi on muuttunut edellisen sisäänkirjautumisen jälkeen. Kirjaudu sisään uudelleen turvallisuussyistä.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again.",invalidCode:"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."},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."}},kk={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",noTotpItemsFound:"No 2FA code matches found",close:"Close",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},Lk={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ä.",noMatchingItems:"No items match the selected filter.",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",totp:"2FA Codes"},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"}},Dk={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"}},Rk={"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"},Bk={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Virheellinen salatun avaimen muoto."}},Uk={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},Mk={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."}},_k={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},Fk={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ä "}},Ok={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."},jk={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}})"}},Pk={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"},Hk={offline:"Offline",tapToRetry:"Tap to retry sync"},zk={auth:Nk,menu:xk,common:Tk,content:kk,items:Lk,itemTypes:Dk,fieldLabels:Rk,totp:Bk,attachmentUploader:Uk,emails:Mk,settings:_k,passkeys:Fk,recentlyDeleted:Ok,upgrade:jk,logout:Pk,sync:Hk},Vk={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",autoCloseUnlockPopup:"Fermeture automatique lors des connexions futures",closingIn:"Fermeture dans {{seconds}}s...",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."},Qk={vault:"Coffre-fort",emails:"Emails"},Kk={loading:"Chargement...",notice:"Notification",error:"Erreur",cancel:"Annuler",confirm:"Confirmer",remove:"Supprimer",back:"Retour",next:"Suivant",use:"Utiliser",add:"Ajouter",delete:"Supprimer",undo:"Annuler",save:"Sauvegarder",saving:"Sauvegarde...",edit:"Editer",create:"Créer",or:"Ou",close:"Fermer",dismiss:"Ignorer",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",show:"Afficher",hide:"Masquer",showDetails:"Afficher les détails",hideDetails:"Masquer les détails",copyToClipboard:"Copier dans le presse-papiers",loadingEmails:"Chargement des emails...",loadingTotpCodes:"Chargement des codes TOTP...",attachments:"Pièces jointes",loadingAttachments:"Chargement des pièces jointes...",settings:"Réglages",recentEmails:"Emails récents",credentials:"Identifiants",customFields:"Champs Personnalisés",twoFactorAuthentication:"Authentification à double facteur",alias:"Alias",notes:"Notes",email:"Email",username:"Nom d'utilisateur",password:"Mot de passe",generate:"Générer",serviceName:"Nom du service",loggedIn:"Connecté(e)",syncingVault:"Synchronisation du coffre",checkingVaultUpdates:"Vérification des mises à jour du coffre",syncingUpdatedVault:"Synchronisation du coffre mis à jour",loadMore:"Voir plus",offline:"Hors ligne",offlineMode:"Fonctionnement en mode hors ligne",pendingSync:"Synchronisation...",mergingVaultChanges:"Fusion des modifications du coffre...",uploadingVault:"Envoi du coffre...",errors:{serverNotAvailable:"Le serveur d'AliasVault n'est pas disponible. Veuillez réessayer plus tard ou contacter le support si le problème persiste.",clientVersionNotSupported:"Cette version de l'extension de navigateur AliasVault n'est plus prise en charge par le serveur. Veuillez mettre à jour votre extension de navigateur à la dernière version.",browserExtensionOutdated:"Cette extension de navigateur est obsolète et ne peut pas être utilisée pour accéder à ce coffre-fort. Veuillez la mettre à jour pour continuer.",serverVersionNotSupported:"Le serveur d'AliasVault doit être mis à jour vers une version plus récente afin d'utiliser cette extension de navigateur. Veuillez contacter le support si vous avez besoin d'aide.",serverVersionTooOld:"Le serveur AliasVault doit être mis à jour vers une version plus récente pour pouvoir utiliser cette fonctionnalité. Veuillez contacter l'administrateur du serveur si vous avez besoin d'aide.",unknownError:"Une erreur inconnue s'est produite",unknownErrorTryAgain:"Une erreur inconnue s'est produite. Merci de réessayer.",vaultNotAvailable:"Coffre non disponible",vaultIsLocked:"Le coffre est verrouillé",passwordChanged:"Votre mot de passe a changé depuis la dernière fois que vous vous êtes connecté. Veuillez vous reconnecter pour des raisons de sécurité.",syncConflictMaxRetries:"Impossible de synchroniser le coffre après plusieurs tentatives. Veuillez réessayer plus tard.",mergeFailed:"Impossible de fusionner les modifications du coffre. Veuillez réessayer.",invalidCode:"Veuillez entrer un code d'authentification valide à 6 chiffres.",serverError:"Impossible d'accéder au serveur AliasVault. Veuillez réessayer plus tard ou contacter le support si le problème persiste.",wrongPassword:"Mot de passe incorrect, veuillez réessayer.",sessionExpired:"Votre session a expiré. Veuillez vous reconnecter.",mobileLoginRequestExpired:"La demande de connexion de l'application mobile a expiré. Veuillez recharger la page et réessayer."},apiErrors:{UNKNOWN_ERROR:"Une erreur inconnue s'est produite. Merci de réessayer.",ACCOUNT_LOCKED:"Compte temporairement verrouillé en raison d'un trop grand nombre de tentatives infructueuses. Veuillez réessayer plus tard.",ACCOUNT_BLOCKED:"Votre compte a été désactivé. Si vous pensez que c'est une erreur, veuillez contacter le support.",USER_NOT_FOUND:"Nom d'utilisateur ou mot de passe invalide. Veuillez réessayer.",INVALID_AUTHENTICATOR_CODE:"Code d'authentification invalide. Veuillez réessayer.",INVALID_RECOVERY_CODE:"Code de récupération invalide. Veuillez réessayer.",REFRESH_TOKEN_REQUIRED:"Un jeton d'actualisation est requis.",INVALID_REFRESH_TOKEN:"Jeton d'actualisation invalide.",PUBLIC_REGISTRATION_DISABLED:"L'enregistrement d'un nouveau compte est actuellement désactivé sur ce serveur. Veuillez contacter l'administrateur.",USERNAME_REQUIRED:"Nom d’utilisateur requis.",USERNAME_ALREADY_IN_USE:"Nom d'utilisateur déjà utilisé.",USERNAME_AVAILABLE:"Ce nom d'utilisateur est disponible.",USERNAME_MISMATCH:"Le nom d'utilisateur ne correspond pas à l'utilisateur actuel.",PASSWORD_MISMATCH:"Le mot de passe indiqué ne correspond pas à votre mot de passe actuel.",ACCOUNT_SUCCESSFULLY_DELETED:"Compte supprimé avec succès.",USERNAME_EMPTY_OR_WHITESPACE:"Le nom d'utilisateur ne peut pas être vide ou contenir un espace.",USERNAME_TOO_SHORT:"Le nom d'utilisateur est trop court : il doit comporter au moins 3 caractères.",USERNAME_TOO_LONG:"Le nom d'utilisateur est trop long : il ne peut pas contenir plus de 40 caractères.",USERNAME_INVALID_EMAIL:"Adresse e-mail invalide.",USERNAME_INVALID_CHARACTERS:"Le nom d'utilisateur n'est pas valide, il ne peut contenir que des lettres ou des chiffres.",VAULT_NOT_UP_TO_DATE:"Votre coffre n'est pas à jour. Veuillez synchroniser votre coffre et réessayer.",INTERNAL_SERVER_ERROR:"Erreur interne du serveur.",VAULT_ERROR:"Le coffre local n'est pas à jour. Veuillez synchroniser votre coffre en rafraîchissant la page et réessayez."}},Gk={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",noTotpItemsFound:"Aucun code 2FA correspondant",close:"Fermer",savePrompt:{title:"Enregistrer dans AliasVault?",neverForThisSite:"Jamais pour ce site",addUrlTitle:"Ajouter l'URL à l'identifiant?",addUrl:"Ajouter l’URL"}},qk={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.",noMatchingItems:"Aucun élément ne correspond au filtre sélectionné.",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",totp:"Codes 2FA"},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"}},Wk={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"}},Yk={"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"},Jk={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",deleteTotpCodeTitle:"Supprimer le code 2FA",deleteTotpCodeConfirmation:'Êtes-vous sûr de vouloir supprimer le code 2FA "{{name}} " ?',errors:{invalidSecretKey:"Format de clé secrète invalide."}},Xk={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"},$k={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."}},Zk={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",autofillPopupDescription:"Afficher la fenêtre de saisie automatique lorsque les champs de connexion sont détectés.",disabledSites:"Sites désactivés",disabledSitesDescription:"Les sites où la fenêtre de saisie automatique n'apparaîtra pas.",clearAllDisabledSites:"Effacer tous les sites désactivés",temporaryUntil:"jusqu'au",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"}},loginSave:{title:"Enregistrer l'invite de connexion",description:"Afficher une invite pour enregistrer les identifiants de connexion lorsque vous soumettez un formulaire de connexion sur un site Web.",blockedSites:"Sites bloqués",blockedSitesDescription:"Les sites où l'invite de sauvegarde n'apparaîtra jamais.",clearAllBlockedSites:"Effacer tous les sites bloqués"},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."}},e1={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é "}},t1={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."},a1={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}})"}},n1={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"},r1={offline:"Hors ligne",tapToRetry:"Appuyez pour réessayer"},i1={auth:Vk,menu:Qk,common:Kk,content:Gk,items:qk,itemTypes:Wk,fieldLabels:Yk,totp:Jk,attachmentUploader:Xk,emails:$k,settings:Zk,passkeys:e1,recentlyDeleted:t1,upgrade:a1,logout:n1,sync:r1},s1={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:"עיון בתוכן הכספת",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},o1={vault:"Vault",emails:"הודעות דוא״ל"},l1={loading:"בטעינה…",notice:"לתשומת ליבך",error:"שגיאה",cancel:"ביטול",confirm:"אישור",remove:"Remove",back:"חזרה",next:"הבא",use:"להשתמש",add:"Add",delete:"מחיקה",undo:"הסגה",save:"שמירה",saving:"Saving...",edit:"Edit",create:"יצירה",or:"או",close:"סגירה",dismiss:"Dismiss",logout:"יציאה",copied:"הועתק!",openInNewWindow:"פתיחה בחלון חדש",enabled:"פעיל",disabled:"כבוי",showPassword:"הצגת סיסמה",hidePassword:"הסתרת סיסמה",show:"Show",hide:"Hide",showDetails:"הצגת פרטים",hideDetails:"הסתרת פרטים",copyToClipboard:"העתקה ללוח הגזירים",loadingEmails:"הודעות הדוא״ל נטענות…",loadingTotpCodes:"הקודים החד־פעמיים הזמניים נטענים…",attachments:"צרופות",loadingAttachments:"הצרופות נטענות…",settings:"הגדרות",recentEmails:"הודעות דוא״ל אחרונות",credentials:"פרטי גישה",customFields:"Custom Fields",twoFactorAuthentication:"אימות דו־שלבי",alias:"כינוי",notes:"הערות",email:"דוא״ל",username:"שם משתמש",password:"סיסמה",generate:"Generate",serviceName:"שם השירות",loggedIn:"נכנסת",syncingVault:"הכספת מסתנכרת",checkingVaultUpdates:"מתבצעת בדיקה לשינויים בכספת",syncingUpdatedVault:"הכספת העדכנית מסתנכרת",loadMore:"לטעון עוד",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Merging vault changes...",uploadingVault:"Uploading vault...",errors:{serverNotAvailable:"שרת ה־AliasVault לא זמין. נא לנסות שוב מאוחר יותר או ליצור קשר עם התמיכה אם הבעיה נשנית.",clientVersionNotSupported:"הגרסה הזאת של הרחבת הדפדפן של AliasVault לא נתמכת עוד על ידי השרת. נא לעדכן את הרחבת הדפדפן שלך לגרסה העדכנית ביותר.",browserExtensionOutdated:"הרחבת הדפדפן הזאת לא עדכנית ואי אפשר להשתמש בה כדי לגשת לכספת הזאת. נא לעדכן את הרחבת הדפדפן הזאת כדי להמשיך.",serverVersionNotSupported:"יש לעדכן את שרת AliasVault לגרסה חדשה יותר כדי להשתמש בהרחבת הדפדפן הזאת. נא ליצור קשר עם התמיכה לקבלת עזרה.",serverVersionTooOld:"The AliasVault server needs to be updated to a newer version in order to use this feature. Please contact the server admin if you need help.",unknownError:"אירעה שגיאה לא ידועה",unknownErrorTryAgain:"אירעה שגיאה לא ידועה, נא לנסות שוב.",vaultNotAvailable:"הכספת לא זמינה",vaultIsLocked:"הכספת נעולה",passwordChanged:"הסיסמה שלך השתנתה מאז הפעם האחרונה שנכנסת למערכת. נא להיכנס שוב מטעמי אבטחת מידע.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again.",invalidCode:"נא למלא קוד אימות באורך 6 ספרות.",serverError:"לא ניתן ליצור קשר עם השרת של AliasVault. נא לנסות שוב מאוחר יותר או ליצור קשר עם התמיכה אם הבעיה נשנית.",wrongPassword:"סיסמה שגויה. נא לנסות שוב.",sessionExpired:"תוקף ההפעלה שלך פג. נא להיכנס מחדש.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."},apiErrors:{UNKNOWN_ERROR:"אירעה שגיאה לא ידועה, נא לנסות שוב.",ACCOUNT_LOCKED:"החשבון נעול זמנית עקב ריבוי ניסיונות כושלים. נא לנסות שוב מאוחר יותר.",ACCOUNT_BLOCKED:"החשבון שלך הושבת. אם לדעתך מדובר בטעות, נא ליצור קשר עם התמיכה.",USER_NOT_FOUND:"שם המשתמש או הסיסמה שגויים. נא לנסות שוב.",INVALID_AUTHENTICATOR_CODE:"קוד מאמת שגוי. נא לנסות שוב.",INVALID_RECOVERY_CODE:"קוד שחזור שגוי. נא לנסות שוב.",REFRESH_TOKEN_REQUIRED:"אסימון ריענון חובה.",INVALID_REFRESH_TOKEN:"אסימון ריענון שגוי.",PUBLIC_REGISTRATION_DISABLED:"רישום חשבון חדש מושבת כרגע בשרת הזה. נא ליצור קשר עם ההנהלה.",USERNAME_REQUIRED:"שם משתמש חובה.",USERNAME_ALREADY_IN_USE:"שם המשתמש כבר תפוס.",USERNAME_AVAILABLE:"שם המשתמש פנוי.",USERNAME_MISMATCH:"שם המשתמש לא מתאים למשתמש הנוכחי.",PASSWORD_MISMATCH:"הסיסמה שסופקה לא תואמת לסיסמה הנוכחית שלך.",ACCOUNT_SUCCESSFULLY_DELETED:"החשבון נמחק בהצלחה.",USERNAME_EMPTY_OR_WHITESPACE:"שם המשתמש לא יכול להיות ריק או מורכב מרווחים בלבד.",USERNAME_TOO_SHORT:"שם המשתמש קצר מדי: חייב להיות באורך 3 תווים לפחות.",USERNAME_TOO_LONG:"שם המשתמש ארוך מדי: לא יכול להיות ארוך מ־40 תווים.",USERNAME_INVALID_EMAIL:"כתובת דוא״ל שגויה.",USERNAME_INVALID_CHARACTERS:"שם המשתמש שגוי, יכול להכיל רק תווים או ספרות.",VAULT_NOT_UP_TO_DATE:"הכספת שלך אינה עדכנית. נא לסנכרן את הכספת שלך ולנסות שוב.",INTERNAL_SERVER_ERROR:"שגיאת שרת פנימית.",VAULT_ERROR:"הכספת המקומית אינה עדכנית. נא לסנכרן את הכספת שלך על ידי ריענון העמוד ולנסות שוב."}},c1={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:"התעלמות מחלונית",noTotpItemsFound:"No 2FA code matches found",close:"Close",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},d1={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.",noMatchingItems:"No items match the selected filter.",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",totp:"2FA Codes"},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:"שדה חובה"}},u1={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"}},m1={"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"},g1={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},f1={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},h1={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:"אירעה שגיאה בניסיון לטעון את הודעות הדוא״ל. נא לנסות לערוך ולשמור את רשומת פרטי הקשר כדי לסנכרן את מסד הנתונים ואז לנסות שוב."}},p1={serverUrl:"כתובת שרת",language:"שפה",autofillEnabled:"הפעלת השלמה אוטומטית",version:"גרסה",openWebApp:"פתיחת אתר",lock:"נעילה",globalSettings:"הגדרות מקיפות",autofillPopup:"חלונית השלמה אוטומטית",activeOnAllSites:"פעיל בכל האתרים (למעט אם נכבה להלן)",disabledOnAllSites:"כבוי בכל האתרים",rightClickContextMenu:"תפריט הקשר בלחיצה ימנית",autofillMatching:"התאמת השלמה אוטומטית",autofillMatchingMode:"מצב התאמת השלמה אוטומטית",autofillMatchingModeDescription:"הגדרה אילו פרטי גישה נחשבים תואמים ויופיעו כהצעות בחלונית ההשלמה האוטומטית לאתר מסוים.",autofillMatchingDefault:"כתובת + שם תת־תחום + תו כל על שם",autofillMatchingUrlSubdomain:"כתובת + שם תת־תחום",autofillMatchingUrlExact:"תחום כתובת מדויקת בלבד",siteSpecificSettings:"הגדרות תואמות אתר",autofillPopupOn:"חלונית השלמה אוטומטית ב־: ",enabledForThisSite:"פעיל לאתר הזה",disabledForThisSite:"כבוי לאתר הזה",temporarilyDisabledUntil:"כבוי זמנית עד ",resetAllSiteSettings:"איפוס כל ההגדרות הנקודתיות לאתרים",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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:"נקבה"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},A1={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 "}},y1={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."},E1={title:"שדרוג כספת",subtitle:"AliasVault התעדכן וצריך לשדרג את הכספת שלך. הפעולה הזאת אמורה לארוך מספר שניות.",versionInformation:"פרטי גרסה",yourVault:"גרסת הכספת שלך:",newVersion:"הגרסה החדשה הזמינה:",upgrade:"שדרוג כספת",upgrading:"משתדרגת…",whatsNew:"מה חדש",whatsNewDescription:"יש לשדרג כדי שתהיה תמיכה בשינויים הבאים:",noDescriptionAvailable:"אין תיאור זמין לגרסה הזאת.",alerts:{unableToGetVersionInfo:"לא ניתן לקבל את פרטי הגרסה. נא לנסות שוב מאוחר יותר.",selfHostedServer:"שרת באירוח עצמי",selfHostedWarning:"אם מדובר בשרת שמתארח עצמאית, נא לוודא שהעותק שמתארח אצלך גם כן מתעדכן כי אחרת הכניסה לאתר תפסיק לעבוד.",continueUpgrade:"להמשיך בשדרוג",upgradeFailed:"השדרוג נכשל",failedToApplyMigration:"החלת ההסבה נכשלה ({{current}} מתוך {{total}})"}},b1={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"},v1={offline:"Offline",tapToRetry:"Tap to retry sync"},I1={auth:s1,menu:o1,common:l1,content:c1,items:d1,itemTypes:u1,fieldLabels:m1,totp:g1,attachmentUploader:f1,emails:h1,settings:p1,passkeys:A1,recentlyDeleted:y1,upgrade:E1,logout:b1,sync:v1},w1={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",autoCloseUnlockPopup:"Chiusura automatica ai futuri accessi",closingIn:"Chiusura in {{seconds}}...",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."},C1={vault:"Cassaforte",emails:"E-Mail"},S1={loading:"Caricamento in corso...",notice:"Avviso",error:"Errore",cancel:"Annulla",confirm:"Conferma",remove:"Rimuovi",back:"Indietro",next:"Avanti",use:"Usa",add:"Aggiungi",delete:"Elimina",undo:"Annulla",save:"Salva",saving:"Salvataggio...",edit:"Modifica",create:"Creare",or:"O",close:"Chiudi",dismiss:"Annulla",logout:"Esci",copied:"Copiato!",openInNewWindow:"Apri in una nuova finestra",enabled:"Abilitato",disabled:"Disabilitato",showPassword:"Mostra password",hidePassword:"Nascondi password",show:"Mostra",hide:"Nascondi",showDetails:"Mostra dettagli",hideDetails:"Nascondi dettagli",copyToClipboard:"Copia negli appunti",loadingEmails:"Caricamento e-mail in corso...",loadingTotpCodes:"Caricamento codici TOTP in corso...",attachments:"Allegati",loadingAttachments:"Caricamento allegati in corso...",settings:"Impostazioni",recentEmails:"E-mail recenti",credentials:"Credenziali",customFields:"Campi Personalizzati",twoFactorAuthentication:"Autenticazione a due fattori",alias:"Alias",notes:"Note",email:"E-mail",username:"Nome utente",password:"Password",generate:"Genera",serviceName:"Nome Servizio",loggedIn:"Accesso effettuato",syncingVault:"Sincronizzazione cassaforte",checkingVaultUpdates:"Controllo aggiornamenti cassaforte",syncingUpdatedVault:"Sincronizzazione cassaforte aggiornata",loadMore:"Carica altro",offline:"Offline",offlineMode:"Funzionamento in modalità offline",pendingSync:"Sincronizzazione...",mergingVaultChanges:"Sincronizzzazione modifiche della cassaforte...",uploadingVault:"Caricamento cassaforte in corso...",errors:{serverNotAvailable:"Il server di AliasVault non è disponibile. Riprova più tardi o contatta il supporto se il problema persiste.",clientVersionNotSupported:"Questa versione dell'estensione del browser AliasVault non è più supportata dal server. Aggiorna l'estensione alla versione più recente.",browserExtensionOutdated:"Questa estensione del browser è obsoleta e non può essere utilizzata per accedere a questa cassaforte. Si prega di aggiornare questa estensione per continuare.",serverVersionNotSupported:"Il server di AliasVault necessita un aggiornamento a una versione più recente per poter usare questa estensione. Contatta il supporto se hai bisogno di assistenza.",serverVersionTooOld:"Il server AliasVault deve essere aggiornato a una versione più recente per poter utilizzare questa app mobile. Se hai bisogno di aiuto, contatta il supporto.",unknownError:"Si è verificato un errore sconosciuto",unknownErrorTryAgain:"Si è verificato un errore sconosciuto. Riprova.",vaultNotAvailable:"Cassaforte non disponibile",vaultIsLocked:"La cassaforte è bloccata",passwordChanged:"La tua password è cambiata dall'ultima volta che hai effettuato l'accesso. Effettua nuovamente l'accesso per motivi di sicurezza.",syncConflictMaxRetries:"Impossibile sincronizzare la cassaforte dopo più tentativi. Riprova più tardi.",mergeFailed:"Sincronizzazione della cassaforte non riuscita. Riprovare.",invalidCode:"Inserisci un codice di autenticazione a 6 cifre valido.",serverError:"Impossibile raggiungere il server AliasVault. Riprova più tardi o contatta il supporto se il problema persiste.",wrongPassword:"Password errata. Riprovare.",sessionExpired:"La tua sessione è scaduta. Effettua di nuovo il login.",mobileLoginRequestExpired:"Richiesta di accesso mobile scaduta. Ricarica la pagina e riprova."},apiErrors:{UNKNOWN_ERROR:"Si è verificato un errore sconosciuto. Riprova.",ACCOUNT_LOCKED:"Account temporaneamente bloccato a causa di troppi tentativi falliti. Riprova più tardi.",ACCOUNT_BLOCKED:"Il tuo account è stato disabilitato. Se ritieni che sia un errore, contatta il supporto.",USER_NOT_FOUND:"Nome utente o password non validi. Riprova.",INVALID_AUTHENTICATOR_CODE:"Codice di autenticazione non valido. Riprova.",INVALID_RECOVERY_CODE:"Codice di recupero non valido. Riprova.",REFRESH_TOKEN_REQUIRED:"È necessario aggiornare il token.",INVALID_REFRESH_TOKEN:"Token di aggiornamento non valido",PUBLIC_REGISTRATION_DISABLED:"La registrazione di nuovi account è attualmente disabilitata su questo server. Contatta l'amministratore.",USERNAME_REQUIRED:"È richiesto il nome utente.",USERNAME_ALREADY_IN_USE:"Il nome utente è già in uso.",USERNAME_AVAILABLE:"Il nome utente è disponibile.",USERNAME_MISMATCH:"Il nome utente non corrisponde all'utente corrente.",PASSWORD_MISMATCH:"La password fornita non corrisponde alla password attuale.",ACCOUNT_SUCCESSFULLY_DELETED:"Account eliminato con successo.",USERNAME_EMPTY_OR_WHITESPACE:"Il nome utente non può essere vuoto o contenere spazi.",USERNAME_TOO_SHORT:"Nome utente troppo corto: deve contenere almeno 3 caratteri.",USERNAME_TOO_LONG:"Nome utente troppo lungo: non può superare i 40 caratteri.",USERNAME_INVALID_EMAIL:"Indirizzo email non valido.",USERNAME_INVALID_CHARACTERS:"Il nome utente non è valido, può contenere solo lettere o cifre.",VAULT_NOT_UP_TO_DATE:"La tua cassaforte non è aggiornata. Sincronizzala e riprova.",INTERNAL_SERVER_ERROR:"Errore interno del server.",VAULT_ERROR:"La cassaforte locale non è aggiornata. Sincronizzala ricaricando la pagina e riprova."}},N1={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",noTotpItemsFound:"Nessun codice 2FA trovato",close:"Chiudi",savePrompt:{title:"Salvare su AliasVault?",neverForThisSite:"Mai per questo sito",addUrlTitle:"Aggiungere URL alle credenziali?",addUrl:"Aggiungi URL"}},x1={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.",noMatchingItems:"Nessun elemento corrisponde ai filtri selezionati",noMatchingItemsSearch:'Nessun elemento corrispondente "{{search}}"',noMatchingItemsWithFilter:'Nessun elemento {{filter}} corrispondente "{{search}}"',clearSearch:"Cancella ricerca",clearFilter:"Cancella filtro",emptyFolderHint:"Questa cartella è vuota. Per spostare gli elementi in questa cartella, modificare l'elemento e toccare l'icona della cartella nel campo nome.",allItemsInFolders:"Tutti gli elementi sono organizzati in cartelle. Fare clic su una cartella qui sopra per visualizzare le credenziali o utilizzare la ricerca per trovare elementi specifici.",deleteFolder:"Elimina Cartella",deleteFolderKeepItems:"Elimina solo la cartella",deleteFolderKeepItemsDescription:"Gli elementi verranno spostati nella lista principale.",deleteFolderAndItems:"Elimina cartella e tutti gli elementi",deleteFolderAndItemsDescription:"{{count}} oggetto(i) verrà spostato in Eliminato Recentemente.",filters:{folders:"Cartelle",passkeys:"Passkey",totp:"Codici 2FA"},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"}},T1={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"}},k1={"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"},L1={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",deleteTotpCodeTitle:"Elimina Il Codice 2FA",deleteTotpCodeConfirmation:'Sei sicuro di voler eliminare il codice 2FA "{{name}}"?',errors:{invalidSecretKey:"Formato chiave segreta non valido."}},D1={uploading:"Caricamento...",uploadSuccess:"File caricati correttamente",deleteSuccess:"Allegato eliminato con successo.",firefoxExpandRequired:"Per caricare i file, usa la finestra estesa.",openExpandedWindow:"Apri Finestra Estesa"},R1={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."}},B1={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",autofillPopupDescription:"Mostra il popup di riempimento automatico quando vengono rilevati i campi di accesso.",disabledSites:"Siti disabilitati",disabledSitesDescription:"Siti in cui non apparirà il popup di riempimento automatico.",clearAllDisabledSites:"Cancella tutti i siti disabilitati",temporaryUntil:"fino al",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"}},loginSave:{title:"Salva Avviso Di Login",description:"Mostra un prompt per salvare le credenziali di accesso quando si invia un modulo di accesso su un sito web.",blockedSites:"Siti bloccati",blockedSitesDescription:"Siti in cui il prompt di salvataggio non apparirà mai.",clearAllBlockedSites:"Cancella tutti i siti bloccati"},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."}},U1={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"}},M1={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."},_1={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}})"}},F1={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"},O1={offline:"Offline",tapToRetry:"Tocca per riprovare la sincronizzazione"},j1={auth:w1,menu:C1,common:S1,content:N1,items:x1,itemTypes:T1,fieldLabels:k1,totp:L1,attachmentUploader:D1,emails:R1,settings:B1,passkeys:U1,recentlyDeleted:M1,upgrade:_1,logout:F1,sync:O1},P1={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",autoCloseUnlockPopup:"Automatisch sluiten bij toekomstige logins",closingIn:"Sluiten in {{seconds}}s...",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."},H1={vault:"Vault",emails:"E-mails"},z1={loading:"Laden...",notice:"Melding",error:"Fout",cancel:"Annuleren",confirm:"Bevestigen",remove:"Verwijderen",back:"Terug",next:"Volgende",use:"Gebruik",add:"Toevoegen",delete:"Verwijderen",undo:"Ongedaan maken",save:"Opslaan",saving:"Opslaan...",edit:"Bewerken",create:"Aanmaken",or:"Of",close:"Sluiten",dismiss:"Sluiten",logout:"Uitloggen",copied:"Gekopieerd!",openInNewWindow:"Openen in nieuw venster",enabled:"Ingeschakeld",disabled:"Uitgeschakeld",showPassword:"Wachtwoord tonen",hidePassword:"Wachtwoord verbergen",show:"Toon",hide:"Verberg",showDetails:"Toon details",hideDetails:"Verberg details",copyToClipboard:"Naar klembord kopiëren",loadingEmails:"E-mails laden...",loadingTotpCodes:"TOTP-codes laden...",attachments:"Bijlagen",loadingAttachments:"Bijlagen laden...",settings:"Instellingen",recentEmails:"Recente e-mails",credentials:"Credentials",customFields:"Extra velden",twoFactorAuthentication:"Tweestapsverificatie",alias:"Alias",notes:"Notities",email:"E-mail",username:"Gebruikersnaam",password:"Wachtwoord",generate:"Genereren",serviceName:"Naam",loggedIn:"Ingelogd",syncingVault:"Vault synchroniseren",checkingVaultUpdates:"Controleren op vault updates",syncingUpdatedVault:"Bijgewerkte vault synchroniseren",loadMore:"Laad meer",offline:"Offline",offlineMode:"Offline modus",pendingSync:"Synchroniseren...",mergingVaultChanges:"Vault wijzigingen mergen...",uploadingVault:"Vault opslaan...",errors:{serverNotAvailable:"De AliasVault server is niet beschikbaar. Probeer het later opnieuw of neem contact op met de ondersteuning als het probleem aanhoudt.",clientVersionNotSupported:"Deze versie van de AliasVault browserextensie wordt niet meer ondersteund door de server. Update je browserextensie naar de nieuwste versie.",browserExtensionOutdated:"Deze browserextensie is verouderd en kan niet worden gebruikt om toegang te krijgen tot deze vault. Update deze browserextensie om door te gaan.",serverVersionNotSupported:"De AliasVault server moet worden bijgewerkt naar een nieuwere versie om deze browserextensie te kunnen gebruiken. Neem contact op met support als je hulp nodig hebt.",serverVersionTooOld:"De AliasVault server moet bijgewerkt worden naar een nieuwere versie om deze functie te kunnen gebruiken. Neem contact op met support als je hulp nodig hebt.",unknownError:"Er is een onbekende fout opgetreden",unknownErrorTryAgain:"Er is een onbekende fout opgetreden. Probeer het opnieuw.",vaultNotAvailable:"Vault niet beschikbaar",vaultIsLocked:"Vault is vergrendeld",passwordChanged:"Je wachtwoord is veranderd sinds de laatste keer dat je bent ingelogd. Log opnieuw in.",syncConflictMaxRetries:"Kan de vault niet synchroniseren na meerdere pogingen. Probeer het later opnieuw.",mergeFailed:"Samenvoegen vault wijzigingen mislukt. Probeer het opnieuw.",invalidCode:"Voer een geldige 6-cijferige code in.",serverError:"Kon de AliasVault server niet bereiken. Probeer het later opnieuw of neem contact op met support als het probleem aanhoudt.",wrongPassword:"Onjuist wachtwoord. Probeer het opnieuw.",sessionExpired:"Je sessie is verlopen. Log opnieuw in.",mobileLoginRequestExpired:"De QR-code is verlopen. Herlaad de pagina en probeer opnieuw."},apiErrors:{UNKNOWN_ERROR:"Er is een onbekende fout opgetreden. Probeer het opnieuw.",ACCOUNT_LOCKED:"Account tijdelijk vergrendeld vanwege te veel mislukte pogingen. Probeer het later opnieuw.",ACCOUNT_BLOCKED:"Je account is uitgeschakeld. Als je denkt dat dit een vergissing is, neem dan contact op met support.",USER_NOT_FOUND:"Gebruikersnaam of wachtwoord is onjuist. Probeer het opnieuw.",INVALID_AUTHENTICATOR_CODE:"Ongeldige authenticator code. Probeer het opnieuw.",INVALID_RECOVERY_CODE:"Ongeldige herstelcode. Probeer het opnieuw.",REFRESH_TOKEN_REQUIRED:"Refresh token is vereist.",INVALID_REFRESH_TOKEN:"Ongeldig refresh token.",PUBLIC_REGISTRATION_DISABLED:"Registratie van nieuwe accounts is momenteel uitgeschakeld op deze server. Neem contact op met de beheerder.",USERNAME_REQUIRED:"Gebruikersnaam is vereist.",USERNAME_ALREADY_IN_USE:"Gebruikersnaam is al in gebruik.",USERNAME_AVAILABLE:"Gebruikersnaam is beschikbaar.",USERNAME_MISMATCH:"Gebruikersnaam komt niet overeen met de huidige gebruiker.",PASSWORD_MISMATCH:"Het opgegeven wachtwoord komt niet overeen met je huidige wachtwoord.",ACCOUNT_SUCCESSFULLY_DELETED:"Account succesvol verwijderd.",USERNAME_EMPTY_OR_WHITESPACE:"Gebruikersnaam mag niet leeg zijn of alleen uit spaties bestaan.",USERNAME_TOO_SHORT:"Gebruikersnaam te kort: moet minimaal 3 tekens lang zijn.",USERNAME_TOO_LONG:"Gebruikersnaam te lang: mag niet langer zijn dan 40 tekens.",USERNAME_INVALID_EMAIL:"Ongeldig e-mailadres.",USERNAME_INVALID_CHARACTERS:"Gebruikersnaam is ongeldig, mag alleen letters of cijfers bevatten.",VAULT_NOT_UP_TO_DATE:"Je vault is niet up-to-date. Synchroniseer je vault en probeer het opnieuw.",INTERNAL_SERVER_ERROR:"Interne serverfout.",VAULT_ERROR:"Je lokale vault is niet up-to-date. Synchroniseer je vault door de pagina te vernieuwen en probeer het opnieuw."}},V1={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",noTotpItemsFound:"Geen 2FA code overeenkomsten gevonden",close:"Sluiten",savePrompt:{title:"Opslaan in AliasVault?",neverForThisSite:"Nooit voor deze site",addUrlTitle:"URL naar inloggegevens toevoegen?",addUrl:"Url toevoegen"}},Q1={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.",noMatchingItems:"Geen items gevonden die overeenkomen met het geselecteerde filter.",noMatchingItemsSearch:'Geen items die overeenkomen met "{{search}}"',noMatchingItemsWithFilter:'Geen {{filter}} items die overeenkomen met "{{search}}"',clearSearch:"Wis zoekopdracht",clearFilter:"Wis filter",emptyFolderHint:"Deze map is leeg. Om items naar deze map te verplaatsen, wijzig het item en selecteer deze map.",allItemsInFolders:"Al je items zijn georganiseerd in mappen. Klik op een map hierboven om je gegevens te bekijken, of gebruik de zoekopdracht om specifieke items te vinden.",deleteFolder:"Map verwijderen",deleteFolderKeepItems:"Verwijder alleen map",deleteFolderKeepItemsDescription:"Items zullen terug worden verplaatst naar de hoofdlijst.",deleteFolderAndItems:"Verwijder map en alle items",deleteFolderAndItemsDescription:"{{count}} item(s) zullen worden verplaatst naar recent verwijderd.",filters:{folders:"Mappen",passkeys:"Passkeys",totp:"2FA codes"},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"}},K1={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"}},G1={"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"},q1={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",deleteTotpCodeTitle:"2FA code verwijderen",deleteTotpCodeConfirmation:'Weet je zeker dat je deze credential wilt verwijderen "{{name}}"?',errors:{invalidSecretKey:"Ongeldig formaat."}},W1={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"},Y1={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."}},J1={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",autofillPopupDescription:"Toon de autofill popup wanneer login velden worden gedetecteerd.",disabledSites:"Uitgeschakelde sites",disabledSitesDescription:"Websites waar de autofill popup niet verschijnt.",clearAllDisabledSites:"Alle uitgeschakelde sites wissen",temporaryUntil:"tot",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"}},loginSave:{title:"Inloggegevens opslaan",description:"Toon een melding om inloggegevens op te slaan wanneer je inlogt op een website.",blockedSites:"Geblokkeerde websites",blockedSitesDescription:"Sites waar de inloggegevens opslaan prompt niet zal verschijnen.",clearAllBlockedSites:"Alle uitgeschakelde sites wissen"},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."}},X1={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"}},$1={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."},Z1={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}})"}},eL={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"},tL={offline:"Offline",tapToRetry:"Probeer sync opnieuw"},aL={auth:P1,menu:H1,common:z1,content:V1,items:Q1,itemTypes:K1,fieldLabels:G1,totp:q1,attachmentUploader:W1,emails:Y1,settings:J1,passkeys:X1,recentlyDeleted:$1,upgrade:Z1,logout:eL,sync:tL},nL={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",autoCloseUnlockPopup:"Automatyczne zamykanie przyszłych logowań",closingIn:"Zamknięcie w {{seconds}}s...",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."},rL={vault:"Sejf",emails:"Skrzynka odbiorcza"},iL={loading:"Wczytywanie…",notice:"Uwaga",error:"Błąd",cancel:"Anuluj",confirm:"Potwierdź",remove:"Usuń",back:"Powrót",next:"Dalej",use:"Użyj",add:"Dodaj",delete:"Usuń",undo:"Cofnij",save:"Zapisz",saving:"Zapisywanie...",edit:"Edytuj",create:"Utwórz",or:"lub",close:"Zamknąć",dismiss:"Odrzuć",logout:"Wyloguj się",copied:"Skopiowano",openInNewWindow:"Otwórz w nowym oknie.",enabled:"Aktywne",disabled:"Nie aktywne",showPassword:"Pokaż hasło",hidePassword:"Ukryj hasło",show:"Pokaż",hide:"Ukryj",showDetails:"Pokaż szczegóły",hideDetails:"Ukryj szczegóły",copyToClipboard:"Skopiuj do schowka",loadingEmails:"Ładowanie wiadomości e-mail...",loadingTotpCodes:"Ładowanie kodów TOTP...",attachments:"Załączniki",loadingAttachments:"Ładowanie załączników...",settings:"Ustawienia",recentEmails:"Ostatnie wiadomości e-mail",credentials:"Dane logowania",customFields:"Pola niestandardowe",twoFactorAuthentication:"Weryfikacja dwuetapowa (2FA)",alias:"Alias",notes:"Notatki",email:"Adres e-mail",username:"Nazwa użytkownika",password:"Hasło",generate:"Wygeneruj",serviceName:"Nazwa usługi",loggedIn:"Zalogowano",syncingVault:"Synchronizacja sejfu",checkingVaultUpdates:"Sprawdzanie aktualizacji sejfu",syncingUpdatedVault:"Synchronizacja zaktualizowanego sejfu",loadMore:"Załaduj więcej",offline:"Jesteś w trybie offline",offlineMode:"Praca w trybie offline",pendingSync:"Synchronizowanie...",mergingVaultChanges:"Łączenie zmian w sejfie...",uploadingVault:"Ładowanie sejfu...",errors:{serverNotAvailable:"Serwer AliasVault jest niedostępny. Spróbuj ponownie później lub skontaktuj się z pomocą techniczną, jeśli problem nadal występuje.",clientVersionNotSupported:"Ta wersja rozszerzenia przeglądarki AliasVault nie jest już obsługiwana przez serwer. Zaktualizuj rozszerzenie przeglądarki do najnowszej wersji.",browserExtensionOutdated:"To rozszerzenie przeglądarki jest nieaktualne i nie można go używać do uzyskania dostępu do tego sejfu. Aby kontynuować, zaktualizuj to rozszerzenie przeglądarki.",serverVersionNotSupported:"Aby korzystać z tego rozszerzenia przeglądarki, należy zaktualizować serwer AliasVault do nowszej wersji. Jeśli potrzebujesz pomocy, skontaktuj się z działem pomocy technicznej.",serverVersionTooOld:"Aby korzystać z tej funkcji, serwer AliasVault musi zostać zaktualizowany do nowszej wersji. Jeśli potrzebujesz pomocy, skontaktuj się z administratorem serwera.",unknownError:"Wystąpił nieznany błąd",unknownErrorTryAgain:"Wystąpił nieznany błąd. Spróbuj ponownie.",vaultNotAvailable:"Sejf niedostępny",vaultIsLocked:"Sejf jest zablokowany",passwordChanged:"Twoje hasło uległo zmianie od czasu ostatniego logowania. Ze względów bezpieczeństwa prosimy o ponowne zalogowanie się.",syncConflictMaxRetries:"Nie można zsynchronizować sejfu po wielu próbach. Spróbuj ponownie później.",mergeFailed:"Nie udało się scalić zmian w sejfie. Spróbuj ponownie.",invalidCode:"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 nadal występuje.",wrongPassword:"Nieprawidłowe hasło. 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."},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."}},sL={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",noTotpItemsFound:"Nie znaleziono kodu 2FA",close:"Zamknij",savePrompt:{title:"Zapisać w AliasVault?",neverForThisSite:"Nigdy dla tej strony",addUrlTitle:"Dodaj nowe dane logowania?",addUrl:"Dodaj adres URL"}},oL={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.",noMatchingItems:"Żaden element nie pasuje do wybranego filtra.",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",totp:"Kody 2FA"},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"}},lL={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"}},cL={"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"},dL={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",deleteTotpCodeTitle:"Usuń kod 2FA",deleteTotpCodeConfirmation:'Czy na pewno chcesz usunąć ten kod TOTP "{{name}}?',errors:{invalidSecretKey:"Nieprawidłowy format tajnego klucza."}},uL={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"},mL={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."}},gL={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",autofillPopupDescription:"Pokaż wyskakujące okienko autouzupełniania po wykryciu pól logowania.",disabledSites:"Wyłączone witryny",disabledSitesDescription:"Witryny, w których okienko autouzupełniania nie będzie wyświetlane.",clearAllDisabledSites:"Usuń wszystkie wyłączone witryny",temporaryUntil:"do",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"}},loginSave:{title:"Zapisz monit logowania",description:"Pokaż monit o zapisanie danych logowania podczas przesyłania formularza logowania na stronie internetowej.",blockedSites:"Zablokowane witryny",blockedSitesDescription:"Witryny, w których nie pojawi się monit zapisu.",clearAllBlockedSites:"Wyczyść wszystkie zablokowane strony"},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."}},fL={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 "}},hL={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."},pL={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}})"}},AL={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"},yL={offline:"Jesteś w trybie offline",tapToRetry:"Dotknij, aby ponowić synchronizację"},EL={auth:nL,menu:rL,common:iL,content:sL,items:oL,itemTypes:lL,fieldLabels:cL,totp:dL,attachmentUploader:uL,emails:mL,settings:gL,passkeys:fL,recentlyDeleted:hL,upgrade:pL,logout:AL,sync:yL},bL={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",autoCloseUnlockPopup:"Fechar automaticamente nos próximos acessos",closingIn:"Fechando em {{seconds}}s...",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."},vL={vault:"Cofre",emails:"E-mails"},IL={loading:"Carregando...",notice:"Aviso",error:"Erro",cancel:"Cancelar",confirm:"Confirmar",remove:"Remover",back:"Voltar",next:"Próximo",use:"Utilizar",add:"Adicionar",delete:"Excluir",undo:"Desfazer",save:"Salvar",saving:"Salvando...",edit:"Editar",create:"Criar",or:"Ou",close:"Fechar",dismiss:"Ignorar",logout:"Sair",copied:"Copiado!",openInNewWindow:"Abrir em uma nova janela",enabled:"Habilitado",disabled:"Desabilitado",showPassword:"Mostrar senha",hidePassword:"Ocultar senha",show:"Mostrar",hide:"Esconder",showDetails:"Exibir detalhes",hideDetails:"Esconder detalhes",copyToClipboard:"Copiar para a área de transferência",loadingEmails:"Carregando e-mails...",loadingTotpCodes:"Carregando códigos TOTP...",attachments:"Anexos",loadingAttachments:"Carregando anexos...",settings:"Configurações",recentEmails:"E-mails recentes",credentials:"Credenciais",customFields:"Campos Personalizados",twoFactorAuthentication:"Autenticação de dois fatores",alias:"Alias",notes:"Notas",email:"E-mail",username:"Nome de Usuário",password:"Senha",generate:"Gerar",serviceName:"Nome do Serviço",loggedIn:"Logado",syncingVault:"Sincronizando cofre",checkingVaultUpdates:"Verificando atualizações do cofre",syncingUpdatedVault:"Sincronizando cofre atualizado",loadMore:"Carregar mais",offline:"Offline",offlineMode:"Operando em modo offline",pendingSync:"Sincronizando...",mergingVaultChanges:"Integrando mudanças do cofre...",uploadingVault:"Fazendo upload do cofre...",errors:{serverNotAvailable:"O servidor AliasVault não está disponível. Por favor, tente novamente mais tarde ou entre em contato com o suporte caso o problema persista.",clientVersionNotSupported:"Esta versão da extensão AliasVault para o navegador não é mais suportada pelo servidor. Por favor, atualize sua extensão para a última versão.",browserExtensionOutdated:"Esta extensão do navegador está desatualizada e não pode ser utilizada para acessar este cofre. Por favor, atualize esta extensão para continuar.",serverVersionNotSupported:"O servidor AliasVault precisa ser atualizado para uma nova versão para poder utilizar esta extensão de navegador. Por favor, entre em contato com o suporte caso precise de ajuda.",serverVersionTooOld:"O servidor do AliasVault deve ser atualizado para uma versão mais recente para utilizar esta função. Por favor, entre em contato com o administrador do servidor se precisar de ajuda.",unknownError:"Ocorreu um erro desconhecido",unknownErrorTryAgain:"Ocorreu um erro inesperado. Por favor, tente novamente.",vaultNotAvailable:"Cofre não disponível",vaultIsLocked:"O cofre está bloqueado",passwordChanged:"Sua senha mudou desde o último login. Por favor, realize login novamente por questões de segurança.",syncConflictMaxRetries:"Não foi possível sincronizar seu cofre após várias tentativas. Por favor, tente novamente mais tarde.",mergeFailed:"Falha ao combinar mudanças do cofre. Por favor, tente novamente.",invalidCode:"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."},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."}},wL={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",noTotpItemsFound:"Nenhum código 2FA encontrado",close:"Fechar",savePrompt:{title:"Salvar no AliasVault?",neverForThisSite:"Nunca para este site",addUrlTitle:"Adicionar URL na credencial?",addUrl:"Adicionar URL"}},CL={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.",noMatchingItems:"Nenhum item corresponde ao filtro selecionado.",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:"Pastas",passkeys:"Passkeys",totp:"Códigos de 2FA"},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"}},SL={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"}},NL={"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"},xL={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",deleteTotpCodeTitle:"Excluir Código 2FA",deleteTotpCodeConfirmation:'Tem certeza que deseja excluir o código 2FA "{{name}}"?',errors:{invalidSecretKey:"Formato de chave secreta inválido."}},TL={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"},kL={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."}},LL={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",autofillPopupDescription:"Mostrar o popup de autopreenchimento quando campos de login forem detectados.",disabledSites:"Sites desabilitados",disabledSitesDescription:"Sites onde o popup de autopreenchimento não vão aparecer.",clearAllDisabledSites:"Limpar todos os sites desabilitados",temporaryUntil:"até",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"}},loginSave:{title:"Salvar Prompt de Login",description:"Mostra um prompt para salvar credenciais de login quando você faz login em algum website.",blockedSites:"Sites bloqueados",blockedSitesDescription:"Sites onde o prompt para salvar nunca vão aparecer.",clearAllBlockedSites:"Limpar todos os sites bloqueados"},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."}},DL={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 "}},RL={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."},BL={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}})"}},UL={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"},ML={offline:"Offline",tapToRetry:"Toque para tentar sincronizar novamente"},_L={auth:bL,menu:vL,common:IL,content:wL,items:CL,itemTypes:SL,fieldLabels:NL,totp:xL,attachmentUploader:TL,emails:kL,settings:LL,passkeys:DL,recentlyDeleted:RL,upgrade:BL,logout:UL,sync:ML},FL={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",autoCloseUnlockPopup:"Închidere automată la următoarele autentificări",closingIn:"Se închide în {{seconds}}s...",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."},OL={vault:"Seif",emails:"E-mailuri"},jL={loading:"Se încarcă...",notice:"Notificare",error:"Eroare",cancel:"Anulează",confirm:"Confirmă",remove:"Elimină",back:"Înapoi",next:"Înainte",use:"Folosește",add:"Adaugă",delete:"Șterge",undo:"Revocă",save:"Salvează",saving:"Se salvează...",edit:"Editează",create:"Creează",or:"Sau",close:"Închide",dismiss:"Închide",logout:"Deconectare",copied:"Copiat!",openInNewWindow:"Deschide în fereastră nouă",enabled:"Activat",disabled:"Dezactivat",showPassword:"Afișează parola",hidePassword:"Ascunde parola",show:"Afișează",hide:"Ascunde",showDetails:"Afișează detalii",hideDetails:"Ascunde detalii",copyToClipboard:"Copiază în clipboard",loadingEmails:"Se încarcă e-mailurile...",loadingTotpCodes:"Se încarcă codurile TOTP...",attachments:"Atașamente",loadingAttachments:"Se încarcă atașamentele...",settings:"Setări",recentEmails:"E-mailuri recente",credentials:"Date de autentificare",customFields:"Câmpuri personalizate",twoFactorAuthentication:"Autentificare cu doi factori",alias:"Alias",notes:"Note",email:"E-mail",username:"Utilizator",password:"Parolă",generate:"Generează",serviceName:"Nume Serviciu",loggedIn:"Autentificat",syncingVault:"Se sincronizează seiful",checkingVaultUpdates:"Se verifică actualizările seifului",syncingUpdatedVault:"Se sincronizează seiful actualizat",loadMore:"Încarcă mai multe",offline:"Deconectat",offlineMode:"Funcționează în modul offline",pendingSync:"Se sincronizează...",mergingVaultChanges:"Se îmbină modificările seifului...",uploadingVault:"Se încarcă seiful...",errors:{serverNotAvailable:"Serverul AliasVault nu este disponibil. Încearcă mai târziu sau contactează asistența.",clientVersionNotSupported:"Această versiune a extensiei AliasVault nu mai este compatibilă cu serverul. Actualizează extensia la cea mai recentă versiune.",browserExtensionOutdated:"Versiune extensie incompatibilă. Pentru a accesa seiful, actualizează extensia AliasVault la ultima versiune disponibilă.",serverVersionNotSupported:"Serverul AliasVault trebuie actualizat la o versiune mai nouă pentru a folosi această extensie. Contactează asistența pentru ajutor.",serverVersionTooOld:"Serverul AliasVault trebuie actualizat la o versiune mai nouă pentru a folosi această funcție. Contactează administratorul serverului.",unknownError:"A apărut o eroare necunoscută",unknownErrorTryAgain:"A apărut o eroare necunoscută. Încearcă din nou.",vaultNotAvailable:"Seiful nu este disponibil",vaultIsLocked:"Seiful este blocat",passwordChanged:"Parola ta a fost schimbată de la ultima autentificare. Autentifică-te din nou din motive de securitate.",syncConflictMaxRetries:"Sincronizarea seifului a eșuat după mai multe încercări. Reîncearcă mai târziu.",mergeFailed:"Îmbinarea modificărilor seifului a eșuat. Încearcă din nou.",invalidCode:"Introdu un cod de autentificare valid din 6 cifre.",serverError:"Nu s-a putut stabili conexiunea cu serverul AliasVault. Încearcă din nou mai târziu sau contactează asistența dacă problema persistă.",wrongPassword:"Parolă incorectă. Încearcă din nou.",sessionExpired:"Sesiunea ta a expirat. Autentifică-te din nou.",mobileLoginRequestExpired:"Cererea de autentificare de pe dispozitivul mobil a expirat. Reîncarcă pagina și încearcă din nou."},apiErrors:{UNKNOWN_ERROR:"A apărut o eroare necunoscută. Încearcă din nou.",ACCOUNT_LOCKED:"Cont blocat temporar din cauza prea multor încercări eșuate. Reîncearcă mai târziu.",ACCOUNT_BLOCKED:"Contul tău a fost dezactivat. Dacă crezi că este o greșeală, contactează asistența.",USER_NOT_FOUND:"Utilizator sau parolă invalidă. Încearcă din nou.",INVALID_AUTHENTICATOR_CODE:"Cod de autentificare invalid. Încearcă din nou.",INVALID_RECOVERY_CODE:"Cod de recuperare invalid. Încearcă din nou.",REFRESH_TOKEN_REQUIRED:"Este necesar un token de actualizare.",INVALID_REFRESH_TOKEN:"Token de actualizare nevalid.",PUBLIC_REGISTRATION_DISABLED:"Înregistrarea conturilor noi este dezactivată pe acest server. Contactează administratorul.",USERNAME_REQUIRED:"Numele de utilizator este obligatoriu.",USERNAME_ALREADY_IN_USE:"Numele de utilizator este deja folosit.",USERNAME_AVAILABLE:"Numele de utilizator este disponibil.",USERNAME_MISMATCH:"Numele de utilizator nu se potrivește cu utilizatorul curent.",PASSWORD_MISMATCH:"Parola furnizată nu se potrivește cu parola ta curentă.",ACCOUNT_SUCCESSFULLY_DELETED:"Cont șters cu succes.",USERNAME_EMPTY_OR_WHITESPACE:"Numele de utilizator nu poate fi necompletat sau format doar din spații.",USERNAME_TOO_SHORT:"Nume prea scurt: trebuie să aibă cel puțin 3 caractere.",USERNAME_TOO_LONG:"Nume prea lung: nu poate depăși 40 de caractere.",USERNAME_INVALID_EMAIL:"Adresă de e-mail invalidă.",USERNAME_INVALID_CHARACTERS:"Numele de utilizator este invalid, poate conține doar litere sau cifre.",VAULT_NOT_UP_TO_DATE:"Seiful tău nu este actualizat. Sincronizează seiful și încearcă din nou.",INTERNAL_SERVER_ERROR:"Eroare internă de server.",VAULT_ERROR:"Seiful local nu este actualizat. Sincronizează seiful prin reîmprospătarea paginii și încearcă din nou."}},PL={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",noTotpItemsFound:"Nu s-a găsit niciun cod 2FA corespunzător",close:"Închide",savePrompt:{title:"Salvează în AliasVault?",neverForThisSite:"Niciodată pentru acest site",addUrlTitle:"Adaugă URL la datele de autentificare?",addUrl:"Adaugă URL"}},HL={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.",noMatchingItems:"Niciun element nu corespunde filtrului selectat.",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",totp:"Coduri 2FA"},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"}},zL={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ă"}},VL={"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"},QL={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",deleteTotpCodeTitle:"Șterge codul 2FA",deleteTotpCodeConfirmation:"Sigur dorești să ștergi codul 2FA „{{name}}”?",errors:{invalidSecretKey:"Format cheie secretă invalid."}},KL={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ă"},GL={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."}},qL={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ția cazului în care este dezactivat 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",autofillPopupDescription:"Afișează fereastra pop-up de completare automată când sunt detectate câmpurile de autentificare.",disabledSites:"Site-uri dezactivate",disabledSitesDescription:"Site-uri unde fereastra pop-up de completare automată nu va apărea.",clearAllDisabledSites:"Șterge toate site-urile dezactivate",temporaryUntil:"până",appearance:"Aspect",theme:"Temă",useDefault:"Implicită",light:"Luminoasă",dark:"Întunecată",keyboardShortcuts:"Comenzi rapide de la 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"}},loginSave:{title:"Salvează solicitarea de autentificare",description:"Afișează o solicitare de salvare a datelor de autentificare când trimiți un formular de conectare pe un site.",blockedSites:"Site-uri blocate",blockedSitesDescription:"Site-uri unde solicitarea de salvare nu va apărea niciodată.",clearAllBlockedSites:"Șterge toate site-urile blocate"},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ă."}},WL={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 "}},YL={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."},JL={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}})"}},XL={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"},$L={offline:"Offline",tapToRetry:"Apasă pentru a reîncerca sincronizarea"},ZL={auth:FL,menu:OL,common:jL,content:PL,items:HL,itemTypes:zL,fieldLabels:VL,totp:QL,attachmentUploader:KL,emails:GL,settings:qL,passkeys:WL,recentlyDeleted:YL,upgrade:JL,logout:XL,sync:$L},e2={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:"Обзор содержимого хранилища",autoCloseUnlockPopup:"Закрывать окно после входа",closingIn:"Закроется через {{seconds}}с...",connectingTo:"Подключение к",switchAccounts:"Переключить аккаунт?",loginWithMobile:"Войти с помощью мобильного приложения",unlockWithMobile:"Разблокировать через мобильное приложение",scanQrCode:"Сканируйте QR-код в приложении AliasVault, чтобы войти."},t2={vault:"Хранилище",emails:"Почта"},a2={loading:"Загрузка...",notice:"Примечание",error:"Ошибка",cancel:"Отмена",confirm:"Подтвердить",remove:"Удалить",back:"Назад",next:"Далее",use:"Использовать",add:"Добавить",delete:"Удалить",undo:"Отменить",save:"Сохранить",saving:"Сохраняем...",edit:"Edit",create:"Создать",or:"Или",close:"Закрыть",dismiss:"Закрыть",logout:"Выйти",copied:"Скопировано!",openInNewWindow:"Открыть в новом окне",enabled:"Включено",disabled:"Отключено",showPassword:"Показать пароль",hidePassword:"Скрыть пароль",show:"Show",hide:"Hide",showDetails:"Показать подробности",hideDetails:"Скрыть подробности",copyToClipboard:"Скопировать в буфер обмена",loadingEmails:"Загрузка писем...",loadingTotpCodes:"Загрузка TOTP кодов...",attachments:"Вложения",loadingAttachments:"Загрузка вложений...",settings:"Настройки",recentEmails:"Последние письма",credentials:"Учетные записи",customFields:"Пользовательские поля",twoFactorAuthentication:"Двухфакторная аутентификация",alias:"Псевдоним",notes:"Заметки",email:"Электронная почта",username:"Имя пользователя",password:"Пароль",generate:"Сгенерировать",serviceName:"Название сервиса",loggedIn:"Вход выполнен",syncingVault:"Синхронизация хранилища",checkingVaultUpdates:"Проверка наличия обновлений в хранилище",syncingUpdatedVault:"Синхронизация обновленного хранилища",loadMore:"Загрузить ещё",offline:"Офлайн",offlineMode:"Работа в автономном режиме",pendingSync:"Синхронизация...",mergingVaultChanges:"Объединение изменений в хранилище...",uploadingVault:"Загрузка хранилища...",errors:{serverNotAvailable:"Сервер AliasVault недоступен. Пожалуйста, повторите попытку позже или обратитесь в службу поддержки, если проблема не устранится.",clientVersionNotSupported:"Эта версия браузерного расширения AliasVault больше не поддерживается сервером. Пожалуйста, обновите расширение вашего браузера до последней версии.",browserExtensionOutdated:"Это расширение браузера устарело и не может быть использовано для доступа к этому хранилищу. Пожалуйста, обновите расширение, чтобы продолжить.",serverVersionNotSupported:"Чтобы использовать это расширение для браузера, сервер AliasVault необходимо обновить до более новой версии. Пожалуйста, обратитесь в службу поддержки, если вам нужна помощь.",serverVersionTooOld:"Сервер AliasVault необходимо обновить до более новой версии, чтобы использовать эту функцию. Если вам нужна помощь, обратитесь к администратору сервера.",unknownError:"Произошла неизвестная ошибка",unknownErrorTryAgain:"Произошла неизвестная ошибка. Попробуйте снова.",vaultNotAvailable:"Хранилище недоступно",vaultIsLocked:"Хранилище заблокировано",passwordChanged:"С момента вашего последнего входа ваш пароль изменился. Пожалуйста, войдите еще раз в целях безопасности.",syncConflictMaxRetries:"Ошибка синхронизации хранилища. Повторите попытку позже.",mergeFailed:"Не удалось объединить изменения. Попробуйте снова.",invalidCode:"Введите корректный 6-значный код подтверждения.",serverError:"Сервер AliasVault недоступен. Повторите попытку позже или свяжитесь с техподдержкой.",wrongPassword:"Неверный пароль. Повторите попытку.",sessionExpired:"Срок действия сессии истек. Войдите снова.",mobileLoginRequestExpired:"Срок запроса на вход истек. Обновите страницу и попробуйте снова."},apiErrors:{UNKNOWN_ERROR:"Произошла неизвестная ошибка. Пожалуйста, попробуйте снова.",ACCOUNT_LOCKED:"Учетная запись временно заблокирована из-за слишком большого количества неудачных попыток. Пожалуйста, повторите попытку позже.",ACCOUNT_BLOCKED:"Ваша учетная запись была заблокирована. Если вы считаете, что это ошибка, пожалуйста, свяжитесь со службой поддержки.",USER_NOT_FOUND:"Неверное имя пользователя или пароль. Пожалуйста, попробуйте снова.",INVALID_AUTHENTICATOR_CODE:"Неверный код аутентификатора. Пожалуйста, попробуйте снова.",INVALID_RECOVERY_CODE:"Неверный код восстановления. Пожалуйста, попробуйте снова.",REFRESH_TOKEN_REQUIRED:"Требуется токен обновления.",INVALID_REFRESH_TOKEN:"Недопустимый токен обновления.",PUBLIC_REGISTRATION_DISABLED:"В настоящее время регистрация новой учетной записи на этом сервере отключена. Пожалуйста, свяжитесь с администратором.",USERNAME_REQUIRED:"Требуется ввести имя пользователя.",USERNAME_ALREADY_IN_USE:"Имя пользователя уже используется.",USERNAME_AVAILABLE:"Имя пользователя доступно.",USERNAME_MISMATCH:"Имя пользователя не соответствует текущему пользователю.",PASSWORD_MISMATCH:"Указанный пароль не совпадает с вашим текущим паролем.",ACCOUNT_SUCCESSFULLY_DELETED:"Аккаунт успешно удалена.",USERNAME_EMPTY_OR_WHITESPACE:"Имя пользователя не может быть пустым или через пробел.",USERNAME_TOO_SHORT:"Слишком короткое имя пользователя: должно быть не менее 3-х символов.",USERNAME_TOO_LONG:"Слишком длинное имя пользователя: оно не может быть длиннее 40 символов.",USERNAME_INVALID_EMAIL:"Неверный адрес электронной почты.",USERNAME_INVALID_CHARACTERS:"Имя пользователя неверно, может содержать только буквы или цифры.",VAULT_NOT_UP_TO_DATE:"Ваше хранилище не обновлено. Пожалуйста, синхронизируйте ваше хранилище и повторите попытку.",INTERNAL_SERVER_ERROR:"Внутренняя ошибка сервера.",VAULT_ERROR:"Локальное хранилище не обновлено. Пожалуйста, синхронизируйте ваше хранилище, обновив страницу, и повторите попытку."}},n2={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:"Закрыть окно",noTotpItemsFound:"No 2FA code matches found",close:"Close",savePrompt:{title:"Сохранить в AliasVault?",neverForThisSite:"Никогда для этого сайта",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},r2={title:"Записи",itemName:"Имя",loginCredentials:"Учетные данные для авторизации",cardInformation:"Данные карты",addItem:"Добавить запись",addNewItem:"Добавить запись",saveItem:"Сохранить запись",itemDetails:"Детали записи",editItem:"Редактировать запись",untitled:"Без названия",newFolder:"Новая папка",createFolder:"Создать папку",editFolder:"Изменить папку",folderName:"Название папки",folderNameRequired:"Название папки обязательно",folder:"Папка",welcomeTitle:"Добро пожаловать в AliasVault!",welcomeDescription:"Чтобы использовать браузерное расширение AliasVault: перейдите на сайт и используйте всплывающее окно автозаполнения AliasVault для создания новых учетных данных.",noPasskeysFound:"Ключи доступа еще не созданы. Ключи доступа создаются при посещении веб-сайта, который предлагает их в качестве метода аутентификации.",noMatchingItems:"Нет записей, соответствующих выбранному фильтру.",noMatchingItemsSearch:'По запросу "{{search}}" ничего не найдено',noMatchingItemsWithFilter:'Ничего не найдено в "{{filter}}" по запросу "{{search}}"',clearSearch:"Очистить поиск",clearFilter:"Сбросить фильтр",emptyFolderHint:"Эта папка пуста. Чтобы переместить сюда записи, перейдите в режим редактирования записи и нажмите на иконку папки в поле имени.",allItemsInFolders:"Все ваши данные разложены по папкам. Выберите нужную папку выше или воспользуйтесь поиском, чтобы найти конкретную запись.",deleteFolder:"Удалить папку",deleteFolderKeepItems:"Удалить только папку",deleteFolderKeepItemsDescription:"Элементы будут перемещены обратно в основной список.",deleteFolderAndItems:"Удалить папку и все элементы",deleteFolderAndItemsDescription:"{{count}} объект(ов) будет перемещено в раздел «Недавно удалённые».",filters:{folders:"Папки",passkeys:"Ключи доступа",totp:"2FA Codes"},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:"Это поле является обязательным"}},i2={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:"Защищенная заметка"}},s2={"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"},o2={addCode:"Добавить код 2FA",instructions:"Введите секретный ключ, указанный на веб-сайте, где вы хотите добавить двухфакторную аутентификацию.",nameOptional:"Имя (необязательно)",secretKey:"Секретный ключ",saveToViewCode:"Сохранить для просмотра кода",defaultName:"Аутентификатор",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Неверный формат секретного ключа."}},l2={uploading:"Загрузка...",uploadSuccess:"Файлы успешно загружены.",deleteSuccess:"Вложение успешно удалено.",firefoxExpandRequired:"Для загрузки файлов используйте расширенное окно.",openExpandedWindow:"Открыть расширенное окно"},c2={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:"При попытке загрузить письма произошла ошибка. Пожалуйста, попробуйте отредактировать и сохранить данные для синхронизации базы данных, затем повторите попытку."}},d2={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:"Сбросить все настройки для сайтов",autofillPopupDescription:"Показывать автозаполнение при обнаружении полей входа.",disabledSites:"Исключения",disabledSitesDescription:"Сайты, на которых не будет появляться автозаполнение.",clearAllDisabledSites:"Очистить список исключений",temporaryUntil:"До",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:"Женский"}},loginSave:{title:"Запрос на сохранение",description:"Запрашивать сохранение пароля после входа на сайт.",blockedSites:"Заблокированные сайты",blockedSitesDescription:"Сайты, где запрос на сохранение никогда не появится.",clearAllBlockedSites:"Очистить весь список"},unlockMethod:{title:"Способ разблокировки хранилища",introText:"Выберите способ разблокировки хранилища. Вы можете использовать свой мастер-пароль (он доступен всегда) или установить ПИН-код для быстрого доступа. После 3 неудачных попыток ввода ПИН-кода необходимо будет ввести мастер-пароль.",password:"Мастер-пароль",pin:"ПИН-код",pinDescription:"Разблокировать хранилище ПИН-кодом",setupPin:"Установить ПИН-код",enterNewPinDescription:"Введите ПИН-код, состоящий как минимум из 6 цифр",confirmPin:"Подтвердите ПИН-код\uFEFF",confirmPinDescription:"Повторите ПИН-код для подтверждения",invalidPinFormat:"Неверный формат ПИН-кода\uFEFF",pinMismatch:"ПИН-коды не совпадают",incorrectPin:"Неверный ПИН-код. Осталось {{attemptsRemaining}} попытки.",incorrectPinSingular:"Неверный ПИН-код. Осталась 1 попытка.",enableSuccess:"Разблокировка по ПИН-коду успешно включена",pinLocked:"Разблокировка по ПИН-коду отключена. Пожалуйста, используйте ваш мастер-пароль для разблокировки хранилища.",pinSecurityWarning:"Разблокировка с помощью ПИН-кода в расширении для браузера может быть менее безопасной, чем использование вашего мастер-пароля, поскольку ПИН-коды обычно имеют более низкую энтропию и могут быть подобраны методом перебора (брутфорс), если ваше устройство будет скомпрометировано. Используйте этот способ только на устройствах, которым вы полностью доверяете."}},u2={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:"Провайдер ключей доступа включен "}},m2={title:"Недавно удаленные",noItems:"Нет удаленных элементов",noItemsDescription:"Удаленные элементы будут храниться здесь 30 дней, после чего они будут удалены безвозвратно.",description:"Эти элементы будут безвозвратно удалены через 30 дней. Вы можете восстановить их или удалить немедленно.",restore:"Восстановить",deletePermanently:"Удалить безвозвратно",emptyAll:"Очистить все",daysRemaining_one:"Остался {{count}} день",daysRemaining_other:"Осталось {{count}} дней",expiringSoon:"Скоро будут удалены",confirmDeleteTitle:"Удалить безвозвратно?",confirmDeleteMessage:"Этот элемент будет удален навсегда без возможности восстановления.",confirmEmptyAllTitle:"Очистить «Недавно удалённые»?",confirmEmptyAllMessage:"Все элементы {{count}} будут удалены навсегда без возможности восстановления."},g2={title:"Обновить хранилище",subtitle:"AliasVault обновился, и ваше хранилище необходимо обновить. Это займет всего несколько секунд.",versionInformation:"Информация о версии",yourVault:"Версия вашего хранилища:",newVersion:"Доступна новая версия:",upgrade:"Обновить хранилище",upgrading:"Обновление...",whatsNew:"Что нового",whatsNewDescription:"Для поддержки следующих изменений требуется обновление:",noDescriptionAvailable:"Описание для этой версии недоступно.",alerts:{unableToGetVersionInfo:"Не удалось получить информацию о версии. Пожалуйста, попробуйте снова.",selfHostedServer:"Автономный сервер",selfHostedWarning:"Если вы используете автономный сервер, обязательно обновите свой автономный экземпляр, так как в противном случае вход в веб-клиент перестанет работать.",continueUpgrade:"Продолжить обновление",upgradeFailed:"Ошибка обновления",failedToApplyMigration:"Не удалось применить перенос ({{current}} из {{total}})"}},f2={unsyncedChangesTitle:"Несинхронизированные изменения",unsyncedChangesWarning:"У вас есть несинхронизированные изменения, которые будут потеряны, если вы выйдете из аккаунта сейчас. Вы уверены, что хотите продолжить?",logoutAnyway:"Все равно выйти"},h2={offline:"Офлайн",tapToRetry:"Повторить синхронизацию"},p2={auth:e2,menu:t2,common:a2,content:n2,items:r2,itemTypes:i2,fieldLabels:s2,totp:o2,attachmentUploader:l2,emails:c2,settings:d2,passkeys:u2,recentlyDeleted:m2,upgrade:g2,logout:f2,sync:h2},A2={loginTitle:"Logga in på AliasVault",username:"Användarnamn eller e-post",usernamePlaceholder:"namn / namn@företag.com",passwordPlaceholder:"Ange ditt lösenord",rememberMe:"Förbli inloggad",loginButton:"Logga in",noAccount:"Inget konto än?",createVault:"Skapa ett nytt valv",twoFactorTitle:"Vänligen ange autentiseringskoden från din autentiseringsapp.",authCode:"Autentiseringskod",authCodePlaceholder:"Ange 6-siffrig kod",verify:"Bekräfta",twoFactorNote:"Obs! Om du inte har tillgång till din autentiseringsenhet kan du återställa din 2FA med en återställningskod genom att logga in via webbplatsen.",masterPassword:"Huvudlösenord",unlockVault:"Lås upp",unlockWithPin:"Lås upp med PIN-kod",enterPinToUnlock:"Ange din PIN-kod för att låsa upp valvet",useMasterPassword:"Använd huvudlösenord",unlockTitle:"Lås upp ditt valv",logoutConfirm:"Är du säker på att du vill logga ut?",unlockSuccessTitle:"Ditt valv har låsts upp",unlockSuccessDescription:"Du kan nu använda autofyll av inloggningsformulär i din webbläsare.",closePopup:"Stäng detta popup-fönster",browseVault:"Bläddra bland valvets innehåll",autoCloseUnlockPopup:"Stäng automatiskt vid framtida inloggningar",closingIn:"Stänger om {{seconds}}...",connectingTo:"Ansluter till",switchAccounts:"Växla konton?",loginWithMobile:"Logga in med hjälp av mobilapp",unlockWithMobile:"Lås upp med hjälp av mobilapp",scanQrCode:"Skanna denna QR-kod med din AliasVault-mobilapp för att logga in och låsa upp ditt valv."},y2={vault:"Valv",emails:"E-postadresser"},E2={loading:"Laddar...",notice:"Meddelande",error:"Fel",cancel:"Avbryt",confirm:"Bekräfta",remove:"Ta bort",back:"Tillbaka",next:"Nästa",use:"Använd",add:"Lägg till",delete:"Radera",undo:"Ångra",save:"Spara",saving:"Sparar...",edit:"Redigera",create:"Skapa",or:"Eller",close:"Stäng",dismiss:"Avfärda",logout:"Logga ut",copied:"Kopierad!",openInNewWindow:"Öppna i nytt fönster",enabled:"Aktiverad",disabled:"Inaktiverad",showPassword:"Visa lösenord",hidePassword:"Dölj lösenord",show:"Visa",hide:"Dölj",showDetails:"Visa detaljer",hideDetails:"Dölj detaljer",copyToClipboard:"Kopiera till urklipp",loadingEmails:"Laddar e-post...",loadingTotpCodes:"Laddar TOTP-koder...",attachments:"Bifogade filer",loadingAttachments:"Laddar bifogade filer...",settings:"Inställningar",recentEmails:"Senaste e-postmeddelanden",credentials:"Inloggningsuppgifter",customFields:"Anpassade fält",twoFactorAuthentication:"Tvåfaktorsautentisering",alias:"Alias",notes:"Anteckningar",email:"E-post",username:"Användarnamn",password:"Lösenord",generate:"Generera",serviceName:"Tjänstens namn",loggedIn:"Inloggad",syncingVault:"Synkroniserar valv",checkingVaultUpdates:"Söker efter valvuppdateringar",syncingUpdatedVault:"Synkroniserar uppdaterat valv",loadMore:"Läs in fler",offline:"Offline",offlineMode:"Arbetar i offline-läge",pendingSync:"Synkroniserar...",mergingVaultChanges:"Sammanfogar valvförändringar...",uploadingVault:"Laddar upp valvet...",errors:{serverNotAvailable:"AliasVault-servern är inte tillgänglig. Försök igen senare eller kontakta support om problemet kvarstår.",clientVersionNotSupported:"Denna version av webbläsartillägget AliasVault stöds inte längre av servern. Vänligen uppdatera ditt webbläsartillägg till den senaste versionen.",browserExtensionOutdated:"Detta webbläsartillägg är föråldrat och kan inte användas för att komma åt detta valv. Uppdatera detta webbläsartillägg för att fortsätta.",serverVersionNotSupported:"AliasVault-servern behöver uppdateras till en nyare version för att kunna använda detta webbläsartillägg. Kontakta support om du behöver hjälp.",serverVersionTooOld:"AliasVault-servern behöver uppdateras till en nyare version för att kunna använda denna funktion. Vänligen kontakta serveradministratören om du behöver hjälp.",unknownError:"Ett okänt fel har inträffat",unknownErrorTryAgain:"Ett okänt fel inträffade. Försök igen.",vaultNotAvailable:"Valvet är inte tillgängligt",vaultIsLocked:"Valvet är låst",passwordChanged:"Ditt lösenord har ändrats sedan du senast loggade in. Vänligen logga in igen av säkerhetsskäl.",syncConflictMaxRetries:"Kunde inte synkronisera valvet trots flera försök. Försök igen senare.",mergeFailed:"Det gick inte att sammanfoga valvförändringar. Försök igen.",invalidCode:"Ange en giltig 6-siffrig autentiseringskod.",serverError:"Kunde inte nå AliasVault-servern. Försök igen senare eller kontakta support om problemet kvarstår.",wrongPassword:"Felaktigt lösenord. Försök igen.",sessionExpired:"Din session har löpt ut. Logga in igen.",mobileLoginRequestExpired:"Mobil inloggningsbegäran har löpt ut. Ladda om sidan och försök igen."},apiErrors:{UNKNOWN_ERROR:"Ett okänt fel inträffade. Försök igen.",ACCOUNT_LOCKED:"Kontot är tillfälligt låst på grund av för många misslyckade försök. Försök igen senare.",ACCOUNT_BLOCKED:"Ditt konto har inaktiverats. Om du tror att detta är ett misstag, kontakta support.",USER_NOT_FOUND:"Felaktigt användarnamn eller lösenord. Försök igen.",INVALID_AUTHENTICATOR_CODE:"Ogiltig autentiseringskod. Försök igen.",INVALID_RECOVERY_CODE:"Ogiltig återställningskod. Försök igen.",REFRESH_TOKEN_REQUIRED:"Uppdateringstoken krävs.",INVALID_REFRESH_TOKEN:"Ogiltigt uppdateringstoken",PUBLIC_REGISTRATION_DISABLED:"Registrering av nytt konto är för närvarande inaktiverat på denna server. Kontakta administratören.",USERNAME_REQUIRED:"Ett användarnamn krävs.",USERNAME_ALREADY_IN_USE:"Användarnamnet används redan",USERNAME_AVAILABLE:"Användarnamnet är tillgängligt",USERNAME_MISMATCH:"Användarnamnet stämmer inte överens med den nuvarande användaren.",PASSWORD_MISMATCH:"Det angivna lösenordet stämmer inte överens med ditt nuvarande lösenord",ACCOUNT_SUCCESSFULLY_DELETED:"Kontot har raderats.",USERNAME_EMPTY_OR_WHITESPACE:"Användarnamnet kan inte vara tomt eller blanksteg.",USERNAME_TOO_SHORT:"Användarnamnet är för kort: måste vara minst 3 tecken långt.",USERNAME_TOO_LONG:"Användarnamnet är för långt: får inte vara längre än 40 tecken.",USERNAME_INVALID_EMAIL:"Ogiltig e-postadress.",USERNAME_INVALID_CHARACTERS:"Användarnamnet är ogiltigt, kan endast innehålla bokstäver eller siffror.",VAULT_NOT_UP_TO_DATE:"Ditt valv är inte uppdaterat. Synkronisera ditt valv och försök igen.",INTERNAL_SERVER_ERROR:"Internt serverfel.",VAULT_ERROR:"Det lokala valvet är inte uppdaterat. Synkronisera valvet genom att uppdatera sidan och försök igen."}},b2={or:"eller",new:"Nytt",vaultLocked:"AliasVault är låst.",creatingNewAlias:"Skapar nytt alias...",noMatchesFound:"Inga träffar hittades",searchVault:"Sök i valvet...",enterServiceName:"Ange tjänstens namn",enterEmailAddress:"Ange e-postadress",enterUsername:"Ange användarnamn",hideFor1Hour:"Dölj i 1 timme (nuvarande webbplats)",hidePermanently:"Dölj permanent (nuvarande webbplats)",createRandomAlias:"Skapa slumpmässigt alias",createUsernamePassword:"Skapa användarnamn/lösenord",randomAlias:"Slumpmässigt alias",usernamePassword:"Användarnamn/Lösenord",createAndSaveAlias:"Skapa och spara alias",createAndSaveCredential:"Skapa och spara autentiseringsuppgifter",randomIdentityDescription:"Generera en slumpmässig identitet med en slumpmässig e-postadress tillgänglig i AliasVault.",randomIdentityDescriptionDropdown:"Slumpmässig identitet med slumpmässig e-post",manualCredentialDescription:"Ange din egen e-postadress och användarnamn.",manualCredentialDescriptionDropdown:"Manuellt användarnamn och lösenord",failedToCreateIdentity:"Det gick inte att skapa identitet. Försök igen.",enterEmailAndOrUsername:"Ange e-postadress och/eller användarnamn",autofillWithAliasVault:"Autofyll med AliasVault",generateRandomPassword:"Generera slumpmässigt lösenord (kopiera till urklipp)",generateNewPassword:"Generera nytt lösenord",togglePasswordVisibility:"Visa/dölj lösenordet",passwordCopiedToClipboard:"Lösenord har kopierats till urklipp",openAliasVaultToUpgrade:"Öppna AliasVault för att uppgradera",vaultUpgradeRequired:"Uppgradering av valv krävs.",dismissPopup:"Avvisa popup",noTotpItemsFound:"Inga matchande 2FA-koder funna",close:"Stäng",savePrompt:{title:"Spara till AliasVault?",neverForThisSite:"Aldrig för denna webbplats",addUrlTitle:"Lägg till URL till posten?",addUrl:"Lägg till URL"}},v2={title:"Objekt",itemName:"Namn",loginCredentials:"Inloggningsuppgifter",cardInformation:"Kortinformation",addItem:"Lägg till objekt",addNewItem:"Lägg till nytt objekt",saveItem:"Spara objekt",itemDetails:"Objektdetaljer",editItem:"Redigera objekt",untitled:"Ingen titel",newFolder:"Ny mapp",createFolder:"Skapa mapp",editFolder:"Redigera mapp",folderName:"Mappens namn",folderNameRequired:"Mappnamn krävs",folder:"Mapp",welcomeTitle:"Välkommen till AliasVault!",welcomeDescription:"För att använda webbläsartillägget AliasVault: navigera till en webbplats och använd AliasVault-autofyllrutan för att skapa en ny inloggningsuppgift.",noPasskeysFound:"Inga passkeys har skapats än. Passkeys skapas genom att besöka en webbplats som erbjuder passkeys som en autentiseringsmetod.",noMatchingItems:"Inga objekt matchar de valda filtren",noMatchingItemsSearch:'Inga objekt matchar "{{search}}"',noMatchingItemsWithFilter:'Inga {{filter}} objekt som matchar "{{search}}"',clearSearch:"Rensa sökning",clearFilter:"Rensa filter",emptyFolderHint:"Mappen är tom. För att flytta objekt till den här mappen, redigera objektet och tryck på mappikonen i namnfältet.",allItemsInFolders:"Alla dina objekt är organiserade i mappar. Klicka på en mapp ovan för att visa dina uppgifter, eller använd sökningen för att hitta specifika objekt.",deleteFolder:"Radera mapp",deleteFolderKeepItems:"Ta endast bort mappen",deleteFolderKeepItemsDescription:"Objekt kommer att flyttas tillbaka till huvudlistan.",deleteFolderAndItems:"Radera mapp och alla objekt",deleteFolderAndItemsDescription:"{{count}} objekt kommer att flyttas till Nyligen borttagen.",filters:{folders:"Mappar",passkeys:"Passkeys",totp:"2FA-Koder"},sort:{title:"Sortera efter",oldestFirst:"Äldst först",newestFirst:"Nyast först",alphabetical:"Alfabetiskt (A-Z)"},deleteItemTitle:"Radera objekt",deleteItemConfirm:"Är du säker på att du vill radera det här objektet?",viewHistory:"Visa historik",history:"Historik",noHistoryAvailable:"Ingen historik är tillgänglig",tags:"Taggar",changePasswordComplexity:"Ändra lösenordets komplexitet",passwordLength:"Lösenordslängd",includeLowercase:"Inkludera små bokstäver",includeUppercase:"Inkludera stora bokstäver",includeNumbers:"Inkludera siffror",includeSpecialChars:"Inkludera specialtecken",avoidAmbiguousChars:"Undvik tvetydiga tecken (o, 0, etc.)",privateEmailTitle:"Privat e-post",privateEmailAliasVaultServer:"AliasVault server",privateEmailDescription:"E2E krypterad, helt privat.",publicEmailTitle:"Offentliga Temp e-postleverantörer",publicEmailDescription:"Anonym men begränsad integritet. E-postinnehåll kan läsas av alla som känner till adressen.",validation:{required:"Detta fält är obligatoriskt"}},I2={selectType:"Lägg till nytt objekt",typeLabel:"Objekttyp",creating:"Skapar",editing:"Redigerar",regenerateAlias:"Återskapa alias",addCustomField:"Lägg till anpassad fält",fieldLabel:"Fältetikett",enterFieldName:"Ange fältets namn",fieldType:"Fälttyp",fieldTypes:{text:"Text",hidden:"Dold (maskerad text)",email:"E-post",url:"Webbadress",phone:"Telefon",number:"Nummer",date:"Datum",textArea:"Textfält"},login:{title:"Inloggning"},alias:{title:"Alias"},creditCard:{title:"Betalkort"},note:{title:"Säker anteckning"}},w2={"login.url":"Webbplatsadress","login.username":"Användarnamn","login.password":"Lösenord","alias.first_name":"Förnamn","alias.last_name":"Efternamn","alias.gender":"Kön","alias.birthdate":"Födelsedatum","login.email":"E-postadress","notes.content":"Anteckningar","card.cardholder_name":"Kortinnehavarens namn","card.number":"Kortnummer","card.expiry_month":"Utgångsmånad","card.expiry_year":"Utgångsår","card.cvv":"Säkerhetskod","card.pin":"PIN-kod"},C2={addCode:"Lägg till 2FA kod",instructions:"Ange den hemliga nyckeln som visas av webbplatsen där du vill lägga till tvåfaktorsautentisering.",nameOptional:"Namn (valfritt)",secretKey:"Hemlig nyckel",saveToViewCode:"Spara för att visa kod",defaultName:"Autentiserare",deleteTotpCodeTitle:"Ta bort 2FA-kod",deleteTotpCodeConfirmation:'Är du säker på att du vill radera 2FA-koden"{{name}}"?',errors:{invalidSecretKey:"Ogiltigt format för hemlig nyckel."}},S2={uploading:"Laddar upp...",uploadSuccess:"Filerna har laddats upp.",deleteSuccess:"Bifogade filen har raderats.",firefoxExpandRequired:"För att ladda upp filer, använd det utökade fönstret.",openExpandedWindow:"Öppna utökat fönster"},N2={title:"E-post",deleteEmailTitle:"Radera e-post",deleteEmailConfirm:"Är du säker på att du vill radera detta meddelande permanent?",from:"Från",to:"Till",date:"Datum",emailContent:"E-postinnehåll",emailNotFound:"E-post hittades inte",noEmails:"Inga e-postmeddelanden hittades",noEmailsDescription:"Du har inte mottagit några e-postmeddelanden på dina privata e-postadresser än. När du fått ett nytt e-postmeddelande så visas det här.",offlineMessage:"Du är offline. Anslut till internet för att ladda dina e-postmeddelanden.",dateFormat:{justNow:"precis nu",minutesAgo_single:"{{count}} minut sedan",minutesAgo_plural:"{{count}} minuter sedan",hoursAgo_single:"{{count}} timme sedan",hoursAgo_plural:"{{count}} timmar sedan",yesterday:"igår"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Den aktuella valda e-postadressen används redan. Vänligen ändra e-postadressen genom att redigera denna post.",CLAIM_DOES_NOT_EXIST:"Ett fel inträffade när e-posten skulle laddas. Försök att redigera och spara posten för att synkronisera databasen, och försök sedan igen."}},x2={serverUrl:"Serverns webbadress",language:"Språk",autofillEnabled:"Aktivera Autofyll",version:"Version",openWebApp:"Öppna webbapp",lock:"Lås",globalSettings:"Globala inställningar",autofillPopup:"Autofyllrutan",activeOnAllSites:"Aktiv på alla webbplatser (om inte inaktiverat nedan)",disabledOnAllSites:"Inaktiverad på alla webbplatser",rightClickContextMenu:"Högerklicksmeny",autofillMatching:"Autofyllsmatchning",autofillMatchingMode:"Autofyll matchningsläge",autofillMatchingModeDescription:"Avgör vilka uppgifter som anses vara en matchning och visas som förslag i autofyllrutan för en viss webbplats.",autofillMatchingDefault:"URL + subdomän + namn wildcard",autofillMatchingUrlSubdomain:"URL + subdomän",autofillMatchingUrlExact:"Endast exakt URL domän",siteSpecificSettings:"Webbplatsspecifika inställningar",autofillPopupOn:"Autofyllruta på: ",enabledForThisSite:"Aktiverad för denna webbplats",disabledForThisSite:"Inaktiverad för denna webbplats",temporarilyDisabledUntil:"Tillfälligt inaktiverad tills",resetAllSiteSettings:"Återställ alla webbplatsspecifika inställningar",autofillPopupDescription:"Visa autofyllrutan när inloggningsfält upptäcks.",disabledSites:"Inaktiverade webbplatser",disabledSitesDescription:"Webbplatser där autofyllrutan inte kommer att visas.",clearAllDisabledSites:"Rensa alla inaktiverade sajter",temporaryUntil:"fram till",appearance:"Utseende",theme:"Tema",useDefault:"Använd standard",light:"Ljust",dark:"Mörkt",keyboardShortcuts:"Kortkommandon",configureKeyboardShortcuts:"Konfigurera kortkommandon",configure:"Konfigurera",clipboardClearTimeout:"Rensa urklipp efter kopiering",clipboardClearTimeoutDescription:"Rensa urklipp automatiskt efter kopiering av känsliga data",clipboardClearDisabled:"Rensa aldrig",clipboardClear5Seconds:"Rensa efter 5 sekunder",clipboardClear10Seconds:"Rensa efter 10 sekunder",clipboardClear15Seconds:"Rensa efter 15 sekunder",autoLockTimeout:"Timeout för automatisk låsning",autoLockTimeoutDescription:"Lås valvet automatiskt efter en period av inaktivitet",autoLockTimeoutHelp:"Valvet kommer endast att låsas efter den angivna perioden av inaktivitet (ingen användning av autofyll eller öppnande av tilläggsruta). Valvet kommer alltid att låsa när webbläsaren stängs, oavsett inställning.",autoLockNever:"Aldrig",autoLock15Seconds:"15 sekunder",autoLock1Minute:"1 minut",autoLock5Minutes:"5 minuter",autoLock15Minutes:"15 minuter",autoLock30Minutes:"30 minuter",autoLock1Hour:"1 timme",autoLock4Hours:"4 timmar",autoLock8Hours:"8 timmar",autoLock24Hours:"24 timmar",versionPrefix:"Version ",autofillSettings:"Inställningar för Autofyll",clipboardSettings:"Urklippsinställningar",contextMenuSettings:"Inställningar för snabbmenyn",passkeySettings:"Passkey-inställningar",contextMenu:"Snabbmeny",contextMenuEnabled:"Snabbmenyn är aktiverad",contextMenuDisabled:"Snabbmenyn är inaktiverad",contextMenuDescription:"Högerklicka på inmatningsfält för att komma åt AliasVault-alternativ",selectLanguage:"Välj Språk",serverConfiguration:"Serverkonfiguration",serverConfigurationDescription:"Konfigurera AliasVault-serverns URL för egenhostade instanser",customApiUrl:"API URL",customClientUrl:"Klientens URL",apiUrlHint:"API slutpunkts-URL (vanligtvis klientens URL + /api)",clientUrlHint:"Webbgränssnittets URL för din egenhostade instans",autofillSettingsDescription:"Aktivera eller inaktivera autofyllruta på webbsidor",autofillEnabledDescription:"Autofyll förslag visas på inloggningsformulär",autofillDisabledDescription:"Autofyll förslag är inaktiverade globalt",languageSettings:"Språk",validation:{apiUrlRequired:"API-URL krävs",apiUrlInvalid:"Ange en giltig API-URL",clientUrlRequired:"Klientens URL krävs",clientUrlInvalid:"Ange en giltig klient-URL"},identityGenerator:"Identitetsgenerator",identityGeneratorSettings:{description:"Konfigurera standardspråk och könspreferens för generering av nya identiteter.",languageSection:"Språk",languageDescription:"Ange det språk som ska användas för att generera nya identiteter.",genderSection:"Kön",genderDescription:"Ange könspreferens för generering av nya identiteter.",ageRangeSection:"Åldersintervall",ageRangeDescription:"Ange åldersintervall för generering av nya identiteter.",genderOptions:{random:"Slumpmässigt",male:"Man",female:"Kvinna"}},loginSave:{title:"Spara Inloggningsdialog",description:"Visa en dialogruta för att spara inloggningsuppgifter när du skickar in ett inloggningsformulär på en webbplats.",blockedSites:"Blockerade webbplatser",blockedSitesDescription:"Webbplatser där dialogrutan för att spara inloggning aldrig kommer att visas.",clearAllBlockedSites:"Rensa alla blockerade webbplatser"},unlockMethod:{title:"Valvupplåsningsmetod",introText:"Välj hur du vill låsa upp ditt valv. Du kan använda ditt huvudlösenord (alltid tillgängligt) eller ange en PIN-kod för snabbare åtkomst. Efter 3 misslyckade PIN-försök måste du använda ditt huvudlösenord.",password:"Huvudlösenord",pin:"PIN-Kod",pinDescription:"Lås upp valv med PIN-kod",setupPin:"Ställ in PIN-kod",enterNewPinDescription:"Ange en PIN-kod som består av minst 6 siffror",confirmPin:"Bekräfta PIN-kod",confirmPinDescription:"Ange din PIN-kod igen för att bekräfta",invalidPinFormat:"Ogiltigt PIN-format",pinMismatch:"PIN-koder matchar inte",incorrectPin:"Felaktig PIN-kod. {{attemptsRemaining}} försök återstår.",incorrectPinSingular:"Felaktig PIN-kod. 1 försök återstår.",enableSuccess:"PIN-upplåsning har aktiverats!",pinLocked:"PIN-upplåsning har inaktiverats. Använd ditt huvudlösenord för att låsa upp ditt valv.",pinSecurityWarning:"PIN-upplåsning i webbläsartillägget kan vara mindre säkert än ditt huvudlösenord, eftersom PIN-koder vanligtvis har lägre entropi och kan bli buret-force-attackerad"}},T2={passkey:"Passkey",site:"Webbplats",helpText:"Passkeys skapas på webbplatsen när du blir tillfrågad. De kan inte redigeras manuellt. För att radera denna passkey, kan du ta bort det från denna posten. För att byta ut denna passkey eller skapa en ny, besök webbplatsen och följ dess anvisningar.",passkeyMarkedForDeletion:"Passkey markerad för borttagning",passkeyWillBeDeleted:"Denna passkey kommer att tas bort när du sparar dessa uppgifter.",useBrowserPasskey:"Använd Webbläsar Passkey",bypass:{description:"Hur länge vill du använda webbläsarens passkey-leverantör till {{origin}}?",thisTimeOnly:"Endast denna gång",alwaysForSite:"Alltid för denna webbplats"},authenticate:{title:"Logga in med Passkey",signInFor:"Logga in med Passkey till",selectPasskey:"Välj en passkey för att logga in:",noPasskeysFound:"Inga passkeys hittades för denna webbplats"},create:{title:"Skapa Passkey",createFor:"Skapa ett nytt passkey till",titleLabel:"Titel",titlePlaceholder:"Ange ett namn för denna Passkey",createButton:"Skapa Passkey",selectPasskeyToReplace:"Välj en passkey att ersätta:",createNewPasskey:"Skapa ny Passkey",replacingPasskey:"Ersätter passkey: {{displayName}}",confirmReplace:"Bekräfta ersättande",selectExistingLogin:"Lägg till i befintlig inloggning:",selectExistingLoginDescription:"Bifoga denna passkey till en befintlig inloggningsuppgift för den här webbplatsen.",attachingToCredential:"Lägger till passkey till: {{serviceName}}",attachPasskey:"Lägg till Passkey"},settings:{passkeyProvider:"Passkey-leverantör",passkeyProviderOn:"Passkey-leverantör på "}},k2={title:"Senast raderade",noItems:"Inga raderade objekt",noItemsDescription:"Objekt som du tar bort visas här i 30 dagar innan de tas bort permanent.",description:"Dessa objekt kommer att raderas permanent efter 30 dagar. Du kan återställa dem eller ta bort dem omedelbart.",restore:"Återställ",deletePermanently:"Radera permanent",emptyAll:"Töm alla",daysRemaining_one:"{{count}} dag återstår",daysRemaining_other:"{{count}} dagar återstår",expiringSoon:"Löper snart ut",confirmDeleteTitle:"Radera permanent?",confirmDeleteMessage:"Detta objekt kommer att raderas permanent och kan inte återställas.",confirmEmptyAllTitle:"Töm nyligen borttagna?",confirmEmptyAllMessage:"Alla {{count}} objekt kommer att raderas permanent och kommer inte kunna återställas."},L2={title:"Uppgradera valv",subtitle:"AliasVault har uppdaterats och ditt valv måste uppgraderas. Detta bör bara ta några sekunder.",versionInformation:"Versionsinformation",yourVault:"Din valvversion:",newVersion:"Ny tillgänglig version:",upgrade:"Uppgradera valv",upgrading:"Uppgraderar ...",whatsNew:"Vad är nytt",whatsNewDescription:"En uppgradering krävs för att stödja följande ändringar:",noDescriptionAvailable:"Ingen beskrivning tillgänglig för denna version.",alerts:{unableToGetVersionInfo:"Det gick inte att hämta versionsinformation. Försök igen.",selfHostedServer:"Egenhostad server",selfHostedWarning:"Om du använder en egenhostad server, se till att även uppdatera din egenhostade instans eftersom inloggning på webbklienten annars kommer att sluta fungera.",continueUpgrade:"Fortsätt uppgraderingen",upgradeFailed:"Uppgraderingen misslyckades",failedToApplyMigration:"Misslyckades att tillämpa migrering ({{current}} av {{total}})"}},D2={unsyncedChangesTitle:"Osynkade ändringar",unsyncedChangesWarning:"Du har osynkade ändringar som kommer att gå förlorade om du loggar ut nu. Är du säker på att du vill fortsätta?",logoutAnyway:"Logga ut ändå"},R2={offline:"Offline",tapToRetry:"Tryck för att försöka synka igen"},B2={auth:A2,menu:y2,common:E2,content:b2,items:v2,itemTypes:I2,fieldLabels:w2,totp:C2,attachmentUploader:S2,emails:N2,settings:x2,passkeys:T2,recentlyDeleted:k2,upgrade:L2,logout:D2,sync:R2},U2={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:"Переглянути вміст сховища",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",connectingTo:"Підключення до",switchAccounts:"Змінити обліковий запис?",loginWithMobile:"Увійти за допомогою мобільного додатку",unlockWithMobile:"Розблокувати за допомогою мобільного додатку",scanQrCode:"Проскануйте цей QR-код за допомогою мобільного додатка AliasVault, щоб увійти та розблокувати сховище."},M2={vault:"Vault",emails:"Електронні адреси"},_2={loading:"Завантаження даних...",notice:"Примітка",error:"Помилка",cancel:"Скасувати",confirm:"Підтвердити",remove:"Remove",back:"Назад",next:"Далі",use:"Використовувати",add:"Add",delete:"Видалити",undo:"Скасувати",save:"Зберегти",saving:"Saving...",edit:"Edit",create:"Створити",or:"Або",close:"Закрити",dismiss:"Dismiss",logout:"Вихід",copied:"Скопійовано!",openInNewWindow:"Відкрити у новому вікні",enabled:"Увімкнено",disabled:"Вимкнено",showPassword:"Показати пароль",hidePassword:"Приховати пароль",show:"Show",hide:"Hide",showDetails:"Показати подробиці",hideDetails:"Приховати подробиці",copyToClipboard:"Копіювати до буфера обміну",loadingEmails:"Завантаження електронних адрес...",loadingTotpCodes:"Завантаження кодів TOTP...",attachments:"Вкладення",loadingAttachments:"Завантаження вкладень...",settings:"Налаштування",recentEmails:"Останні електронні листи",credentials:"Облікові дані",customFields:"Custom Fields",twoFactorAuthentication:"Двофакторна автентифікація",alias:"Псевдонім",notes:"Нотатки",email:"Електронна пошта",username:"Ім'я користувача",password:"Пароль",generate:"Generate",serviceName:"Назва сервісу",loggedIn:"Вхід виконано",syncingVault:"Синхронізація сховища",checkingVaultUpdates:"Перевірка оновлень сховища",syncingUpdatedVault:"Синхронізація оновленого сховища",loadMore:"Завантажити ще",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Merging vault changes...",uploadingVault:"Uploading vault...",errors:{serverNotAvailable:"Не вдалося зв’язатися зі сервером AliasVault. Будь ласка, спробуйте пізніше або зверніться до служби підтримки, якщо проблема не зникне.",clientVersionNotSupported:"Ця версія розширення браузера AliasVault більше не підтримується сервером. Будь ласка, оновіть розширення браузера до останньої версії.",browserExtensionOutdated:"Це розширення браузера застаріло, і його не можна використовувати для доступу до цього сховища. Щоб продовжити, оновіть це розширення браузера.",serverVersionNotSupported:"Щоб використовувати це розширення браузера, потрібно оновити сервер AliasVault до новішої версії. Зверніться до служби підтримки, якщо вам потрібна допомога.",serverVersionTooOld:"Щоб скористатися цією функцією, потрібно оновити сервер AliasVault до нової версії. Якщо вам потрібна допомога, будь ласка, зверніться до адміністратора сервера.",unknownError:"Сталася невідома помилка",unknownErrorTryAgain:"Сталася невідома помилка. Будь ласка, спробуйте ще раз.",vaultNotAvailable:"Сховище недоступне",vaultIsLocked:"Сховище заблоковано",passwordChanged:"Ваш пароль змінився з моменту останнього входу. З міркувань безпеки, будь ласка, увійдіть ще раз.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again.",invalidCode:"Please enter a valid 6-digit authentication code.",serverError:"Не вдалося зв’язатися зі сервером AliasVault. Будь ласка, спробуйте пізніше або зверніться до служби підтримки, якщо проблема не зникне.",wrongPassword:"Невірний пароль. Будь ласка, спробуйте ще раз.",sessionExpired:"Час сеансу закінчився. Будь ласка, увійдіть знову.",mobileLoginRequestExpired:"Час очікування запиту на вхід у мобільний додаток закінчився. Перезавантажте сторінку та спробуйте ще раз."},apiErrors:{UNKNOWN_ERROR:"Сталася невідома помилка. Будь ласка, спробуйте ще раз.",ACCOUNT_LOCKED:"Обліковий запис тимчасово заблоковано через занадто багато невдалих спроб. Будь ласка, спробуйте пізніше.",ACCOUNT_BLOCKED:"Ваш обліковий запис вимкнено. Якщо ви вважаєте, що це помилка, зверніться до служби підтримки.",USER_NOT_FOUND:"Недійсне ім'я користувача або пароль. Спробуйте ще раз.",INVALID_AUTHENTICATOR_CODE:"Недійсний код автентифікатора. Спробуйте ще раз.",INVALID_RECOVERY_CODE:"Недійсний код відновлення. Будь ласка, спробуйте ще раз.",REFRESH_TOKEN_REQUIRED:"Необхідне оновлення токена.",INVALID_REFRESH_TOKEN:"Оновлення токена невдале.",PUBLIC_REGISTRATION_DISABLED:"Реєстрація нових облікових записів на цьому сервері наразі вимкнена. Зверніться до адміністратора.",USERNAME_REQUIRED:"Ім'я користувача обов'язкове.",USERNAME_ALREADY_IN_USE:"Ім'я користувача вже використовується.",USERNAME_AVAILABLE:"Ім'я користувача доступне.",USERNAME_MISMATCH:"Ім'я користувача не відповідає поточному користувачеві.",PASSWORD_MISMATCH:"Введений пароль не відповідає вашому поточному паролю.",ACCOUNT_SUCCESSFULLY_DELETED:"Обліковий запис успішно видалено.",USERNAME_EMPTY_OR_WHITESPACE:"Ім’я користувача не може бути порожнім або містити пробіли.",USERNAME_TOO_SHORT:"Ім’я користувача закоротке: має містити щонайменше 3 символи.",USERNAME_TOO_LONG:"Ім'я користувача занадто довге: не може бути довшим за 40 символів.",USERNAME_INVALID_EMAIL:"Недійсна адреса електронної пошти.",USERNAME_INVALID_CHARACTERS:"Ім'я користувача недійсне, може містити лише літери або цифри.",VAULT_NOT_UP_TO_DATE:"Ваше сховище застаріло. Синхронізуйте його та спробуйте ще раз.",INTERNAL_SERVER_ERROR:"Внутрішня помилка сервера.",VAULT_ERROR:"Локальне сховище не оновлене. Синхронізуйте своє сховище, оновивши сторінку, та повторіть спробу."}},F2={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:"Закрити спливаюче вікно",noTotpItemsFound:"No 2FA code matches found",close:"Close",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},O2={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:"Ключі доступу ще не створено. Ключі доступу створюються під час відвідування вебсайту, який пропонує ключі доступу як спосіб автентифікації.",noMatchingItems:"No items match the selected filter.",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:"Ключі доступу",totp:"2FA Codes"},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:"Це поле обов'язкове"}},j2={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"}},P2={"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"},H2={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},z2={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},V2={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:"Під час спроби завантажити електронні листи сталася помилка. Спробуйте відредагувати та зберегти запис облікових даних, щоб синхронізувати базу даних, а потім повторіть спробу."}},Q2={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:"Скинути всі налаштування, характерні для сайту",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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:"Жіноча"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},K2={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 "}},G2={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."},q2={title:"Оновлення сховища",subtitle:"AliasVault оновлено, і ваше сховище потрібно оновити. Це займе лише кілька секунд.",versionInformation:"Інформація про версію",yourVault:"Ваша версія сховища:",newVersion:"Доступна нова версія:",upgrade:"Оновлення сховища",upgrading:"Оновлення...",whatsNew:"Що нового",whatsNewDescription:"Для підтримки таких змін потрібне оновлення:",noDescriptionAvailable:"Для цієї версії немає опису.",alerts:{unableToGetVersionInfo:"Не вдалося отримати інформацію про версію. Спробуйте ще раз.",selfHostedServer:"Сервер із самостійним розміщенням",selfHostedWarning:"Якщо ви використовуєте власний сервер, обов’язково оновіть і свій власний екземпляр, інакше вхід до вебклієнта перестане працювати.",continueUpgrade:"Продовжити оновлення",upgradeFailed:"Помилка оновлення",failedToApplyMigration:"Не вдалося застосувати міграцію ({{current}} з {{total}})"}},W2={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"},Y2={offline:"Offline",tapToRetry:"Tap to retry sync"},J2={auth:U2,menu:M2,common:_2,content:F2,items:O2,itemTypes:j2,fieldLabels:P2,totp:H2,attachmentUploader:z2,emails:V2,settings:Q2,passkeys:K2,recentlyDeleted:G2,upgrade:q2,logout:W2,sync:Y2},X2={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:"浏览密码库内容",autoCloseUnlockPopup:"将来登录时自动关闭",closingIn:"{{seconds}} 秒后关闭…",connectingTo:"正在连接",switchAccounts:"切换账户？",loginWithMobile:"使用移动应用登录",unlockWithMobile:"使用移动应用解锁",scanQrCode:"使用 AliasVault 移动端应用扫描该二维码，即可登录并解锁您的密码库。"},$2={vault:"密码库",emails:"邮件"},Z2={loading:"加载中…",notice:"注意",error:"错误",cancel:"取消",confirm:"确认",remove:"移除",back:"返回",next:"下一步",use:"使用",add:"添加",delete:"删除",undo:"撤销",save:"保存",saving:"保存中…",edit:"编辑",create:"创建",or:"或",close:"关闭",dismiss:"取消",logout:"退出登录",copied:"已复制！",openInNewWindow:"在新窗口中打开",enabled:"启用",disabled:"禁用",showPassword:"显示密码",hidePassword:"隐藏密码",show:"显示",hide:"隐藏",showDetails:"显示详情",hideDetails:"隐藏详情",copyToClipboard:"复制到剪贴板",loadingEmails:"加载邮件中…",loadingTotpCodes:"加载TOTP验证码中…",attachments:"附件",loadingAttachments:"加载附件中…",settings:"设置",recentEmails:"近期邮件",credentials:"凭据",customFields:"自定义字段",twoFactorAuthentication:"两步验证（2FA）",alias:"别名",notes:"备注",email:"邮箱",username:"用户名",password:"密码",generate:"生成",serviceName:"服务名称",loggedIn:"已登录",syncingVault:"正在同步密码库",checkingVaultUpdates:"检查密码库更新中",syncingUpdatedVault:"同步更新后的密码库",loadMore:"加载更多",offline:"离线",offlineMode:"正在离线模式运行",pendingSync:"同步中…",mergingVaultChanges:"正在合并密码库更改...",uploadingVault:"正在上传密码库…",errors:{serverNotAvailable:"AliasVault服务器不可用。请稍后重试，若问题持续请联系支持人员。",clientVersionNotSupported:"此版本的AliasVault浏览器扩展已不被服务器支持。请将浏览器扩展更新到最新版本。",browserExtensionOutdated:"此浏览器扩展已过时，无法用于访问此密码库。请更新此浏览器扩展以继续。",serverVersionNotSupported:"AliasVault服务器需要更新到新版本才能使用此浏览器扩展。如需帮助，请联系支持人员。",serverVersionTooOld:"AliasVault 服务器需要更新到更高版本才能使用此功能。如需帮助，请联系服务器管理员。",unknownError:"发生未知错误",unknownErrorTryAgain:"发生未知错误，请重试。",vaultNotAvailable:"密码库不可用",vaultIsLocked:"密码库已锁定",passwordChanged:"登录密码已更新，请重新登录以确保账户安全。",syncConflictMaxRetries:"多次尝试后仍无法同步密码库，请稍后重试。",mergeFailed:"合并密码库更改失败，请重试。",invalidCode:"请输入有效的 6 位身份验证码。",serverError:"无法访问 AliasVault 服务器。请稍后重试，若问题依旧，请联系支持人员。",wrongPassword:"密码错误，请重试。",sessionExpired:"您的会话已过期。请重新登录。",mobileLoginRequestExpired:"移动端登录请求超时，请重新加载页面后重试。"},apiErrors:{UNKNOWN_ERROR:"发生未知错误。请重试。",ACCOUNT_LOCKED:"由于多次尝试失败，账户已暂时锁定。请稍后重试。",ACCOUNT_BLOCKED:"您的账户已被停用。若您认为此操作有误，请联系支持人员。",USER_NOT_FOUND:"用户名或密码无效。请重试。",INVALID_AUTHENTICATOR_CODE:"身份验证器验证码无效。请重试。",INVALID_RECOVERY_CODE:"恢复码无效。请重试。",REFRESH_TOKEN_REQUIRED:"刷新令牌为必填项。",INVALID_REFRESH_TOKEN:"刷新令牌无效。",PUBLIC_REGISTRATION_DISABLED:"当前服务器已禁用新账户注册。请联系管理员。",USERNAME_REQUIRED:"用户名为必填项。",USERNAME_ALREADY_IN_USE:"用户名已被使用。",USERNAME_AVAILABLE:"用户名可用。",USERNAME_MISMATCH:"用户名与当前用户不匹配。",PASSWORD_MISMATCH:"提供的密码与您的当前密码不匹配。",ACCOUNT_SUCCESSFULLY_DELETED:"账户已成功删除。",USERNAME_EMPTY_OR_WHITESPACE:"用户名不能为空或仅含空格。",USERNAME_TOO_SHORT:"用户名过短：至少需要3个字符。",USERNAME_TOO_LONG:"用户名过长：不能超过40个字符。",USERNAME_INVALID_EMAIL:"无效的邮箱地址。",USERNAME_INVALID_CHARACTERS:"用户名无效，只能包含字母或数字。",VAULT_NOT_UP_TO_DATE:"您的密码库不是最新的。请同步您的密码库后重试。",INTERNAL_SERVER_ERROR:"服务器内部错误。",VAULT_ERROR:"本地密码库不是最新的。请刷新页面同步密码库后重试。"}},eD={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:"关闭弹窗",noTotpItemsFound:"未找到匹配的两步验证码",close:"关闭",savePrompt:{title:"保存到 AliasVault？",neverForThisSite:"此网站不再显示",addUrlTitle:"将 URL 添加到凭据？",addUrl:"添加 URL"}},tD={title:"项目",itemName:"名称",loginCredentials:"登录凭据",cardInformation:"卡信息",addItem:"添加项目",addNewItem:"添加新项目",saveItem:"保存项目",itemDetails:"项目详情",editItem:"编辑项目",untitled:"无标题",newFolder:"新建文件夹",createFolder:"创建文件夹",editFolder:"编辑文件夹",folderName:"文件夹名称",folderNameRequired:"文件夹名称为必填项",folder:"文件夹",welcomeTitle:"欢迎使用 AliasVault!",welcomeDescription:"要使用AliasVault浏览器扩展：导航到某个网站，使用AliasVault自动填充弹窗创建新凭据。",noPasskeysFound:"尚未创建通行密钥。访问以通行密钥为认证方式的网站才能创建通行密钥。",noMatchingItems:"没有项目符合所选筛选器。",noMatchingItemsSearch:"未找到匹配“{{search}}”的项目",noMatchingItemsWithFilter:"未找到匹配“{{search}}”的 {{filter}} 项目",clearSearch:"清除搜索",clearFilter:"清除筛选器",emptyFolderHint:"此文件夹为空。要将项目移动到此文件夹，请编辑该项目，然后点击名称字段中的文件夹图标。",allItemsInFolders:"您的所有项目都已整理到文件夹中。点击上方文件夹即可查看您的凭据，或使用搜索查找特定的项目。",deleteFolder:"删除文件夹",deleteFolderKeepItems:"仅删除文件夹",deleteFolderKeepItemsDescription:"项目将被移回主列表。",deleteFolderAndItems:"删除文件夹和所有项目",deleteFolderAndItemsDescription:"{{count}} 个项目将被移至“近期删除”。",filters:{folders:"文件夹",passkeys:"通行密钥",totp:"两步验证码"},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:"此字段为必填项"}},aD={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:"安全笔记"}},nD={"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"},rD={addCode:"添加两步验证码",instructions:"输入要添加两步验证的网站显示的密钥。",nameOptional:"名称（可选）",secretKey:"密钥",saveToViewCode:"保存以查看验证码",defaultName:"身份验证器",deleteTotpCodeTitle:"删除两步验证码",deleteTotpCodeConfirmation:"您确定要删除两步验证码“{{name}}”吗？",errors:{invalidSecretKey:"密钥格式无效。"}},iD={uploading:"上传中…",uploadSuccess:"文件上传成功。",deleteSuccess:"附件删除成功。",firefoxExpandRequired:"要上传文件，请使用展开的窗口。",openExpandedWindow:"打开展开的窗口"},sD={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:"加载邮件时发生错误。请尝试编辑并保存凭据条目以同步数据库，然后重试。"}},oD={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:"重置所有网站特定设置",autofillPopupDescription:"检测到登录字段时，显示自动填充弹窗。",disabledSites:"禁用的网站",disabledSitesDescription:"自动填充弹窗不会出现的网站。",clearAllDisabledSites:"清除所有禁用的网站",temporaryUntil:"直到",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:"女"}},loginSave:{title:"保存登录提示",description:"在网站上提交登录表单时，显示保存登录凭据的提示。",blockedSites:"屏蔽的网站",blockedSitesDescription:"永远不会出现保存提示的网站。",clearAllBlockedSites:"清除所有屏蔽的网站"},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 码的熵值通常较低，若您的设备遭到入侵，则可能被暴力破解。请仅在您完全信任的设备上使用该方式。"}},lD={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:"通行密钥提供程序于"}},cD={title:"近期删除",noItems:"没有删除的项目",noItemsDescription:"您删除的项目将在此处停留 30 天，随后永久移除。",description:"这些项目将在 30 天后永久删除。您可以立即还原或永久删除。",restore:"还原",deletePermanently:"永久删除",emptyAll:"全部清空",daysRemaining_one:"剩余 {{count}} 天",daysRemaining_other:"剩余 {{count}} 天",expiringSoon:"即将到期",confirmDeleteTitle:"永久删除吗？",confirmDeleteMessage:"此项目将被永久删除，且无法恢复。",confirmEmptyAllTitle:"清空“近期删除”吗？",confirmEmptyAllMessage:"所有 {{count}} 个项目将被永久删除，且无法恢复。"},dD={title:"升级密码库",subtitle:"AliasVault已更新，您的密码库需要升级，仅需数秒。",versionInformation:"版本信息",yourVault:"您的密码库版本：",newVersion:"新可用版本：",upgrade:"升级密码库",upgrading:"升级中…",whatsNew:"新功能",whatsNewDescription:"需要升级才能支持以下更改：",noDescriptionAvailable:"此版本无可用说明。",alerts:{unableToGetVersionInfo:"无法获取版本信息。请重试。",selfHostedServer:"自托管服务器",selfHostedWarning:"如果您使用的是自托管服务器，请确保同时更新您的自托管实例，否则将无法登录网页客户端。",continueUpgrade:"继续升级",upgradeFailed:"升级失败",failedToApplyMigration:"应用迁移失败（{{current}} / {{total}}）"}},uD={unsyncedChangesTitle:"未同步的更改",unsyncedChangesWarning:"您有更改尚未同步，若您现在退出登录，这些更改将会丢失。您确定要继续吗？",logoutAnyway:"仍要退出登录"},mD={offline:"离线",tapToRetry:"点击重试同步"},gD={auth:X2,menu:$2,common:Z2,content:eD,items:tD,itemTypes:aD,fieldLabels:nD,totp:rD,attachmentUploader:iD,emails:sD,settings:oD,passkeys:lD,recentlyDeleted:cD,upgrade:dD,logout:uD,sync:mD},$l={da:{translation:TT},de:{translation:KT},en:{translation:lk},es:{translation:Sk},fi:{translation:zk},fr:{translation:i1},he:{translation:I1},it:{translation:j1},nl:{translation:aL},pl:{translation:EL},pt:{translation:_L},ro:{translation:ZL},ru:{translation:p2},sv:{translation:B2},uk:{translation:J2},zh:{translation:gD}},ac=[{code:"da",name:"Danish",nativeName:"Dansk",flag:"🇩🇰"},{code:"de",name:"German",nativeName:"Deutsch",flag:"🇩🇪"},{code:"en",name:"English",nativeName:"English",flag:"🇺🇸"},{code:"es",name:"Spanish",nativeName:"Español",flag:"🇪🇸"},{code:"fi",name:"Finnish",nativeName:"Suomi",flag:"🇫🇮"},{code:"fr",name:"French",nativeName:"Français",flag:"🇫🇷"},{code:"he",name:"Hebrew",nativeName:"עברית",flag:"🇮🇱"},{code:"it",name:"Italian",nativeName:"Italiano",flag:"🇮🇹"},{code:"nl",name:"Dutch",nativeName:"Nederlands",flag:"🇳🇱"},{code:"pl",name:"Polish",nativeName:"Polski",flag:"🇵🇱"},{code:"pt",name:"Portuguese Brazilian",nativeName:"Português Brasileiro",flag:"🇧🇷"},{code:"ro",name:"Romanian",nativeName:"Română",flag:"🇷🇴"},{code:"ru",name:"Russian",nativeName:"Русский",flag:"🇷🇺"},{code:"sv",name:"Swedish",nativeName:"Svenska",flag:"🇸🇪"},{code:"uk",name:"Ukrainian",nativeName:"Українська",flag:"🇺🇦"},{code:"zh",name:"Chinese",nativeName:"简体中文",flag:"🇨🇳"}],jr="en",wu=ac.map(t=>t.code),Qd=new Map;async function BE(t){const e=`all:${t}`;if(Qd.has(e))return Qd.get(e);if($l[t]){const n=$l[t].translation;return Qd.set(e,n),n}if(t!==jr&&$l[jr]){console.warn(`Translations not found for ${t}, falling back to ${jr}`);const n=$l[jr].translation;return Qd.set(e,n),n}return console.warn(`No translations found for ${t} and no fallback available`),{}}function fD(t){return ac.find(e=>e.code===t)}function UE(t,e){return e.split(".").reduce((n,i)=>n&&typeof n=="object"&&n!==null&&i in n?n[i]:void 0,t)}async function hD(){try{const t=await Te.getItem("local:language");if(t&&wu.includes(t))return t;const e=navigator.language.split("-")[0],n=wu.includes(e)?e:jr;return await Te.setItem("local:language",n),n}catch(t){return console.error("Failed to get current language:",t),jr}}async function pD(t,e){try{const n=await hD(),i=await BE(n),s=UE(i,t);if(s&&typeof s=="string")return s;if(n!==jr){const l=await BE(jr),d=UE(l,t);if(d&&typeof d=="string")return d}return e||t}catch(n){return console.error("Translation error:",n),e||t}}function AD(t){return t.toISOString().replace("T"," ").replace("Z","").substring(0,23)}function Cf(){return AD(new Date)}class Sc{constructor(e){this.client=e}async withTransaction(e){this.client.beginTransaction();try{const n=await e();return await this.client.commitTransaction(),n}catch(n){throw this.client.rollbackTransaction(),n}}softDelete(e,n){const i=Cf();return this.client.executeUpdate(`UPDATE ${e} SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?`,[i,n])}softDeleteByForeignKey(e,n,i){const s=Cf();return this.client.executeUpdate(`UPDATE ${e} SET IsDeleted = 1, UpdatedAt = ? WHERE ${n} = ?`,[s,i])}hardDelete(e,n){return this.client.executeUpdate(`DELETE FROM ${e} WHERE Id = ?`,[n])}hardDeleteByForeignKey(e,n,i){return this.client.executeUpdate(`DELETE FROM ${e} WHERE ${n} = ?`,[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 Cf()}buildInClause(e){return{placeholders:e.map(()=>"?").join(","),values:e}}}var mn={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"},va={Login:"Login",Alias:"Alias",CreditCard:"CreditCard",Note:"Note"},Zt={Text:"Text",Password:"Password",Hidden:"Hidden",Email:"Email",URL:"URL",Date:"Date",Number:"Number",Phone:"Phone",TextArea:"TextArea"},mt={Primary:"Primary",Login:"Login",Alias:"Alias",Card:"Card",Custom:"Custom",Notes:"Notes",Metadata:"Metadata"},fp={"login.email":{FieldKey:"login.email",FieldType:"Email",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!1},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:mt.Login,DefaultDisplayOrder:10},"login.username":{FieldKey:"login.username",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:mt.Login,DefaultDisplayOrder:15},"login.password":{FieldKey:"login.password",FieldType:"Password",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:mt.Login,DefaultDisplayOrder:20},"login.url":{FieldKey:"login.url",FieldType:"URL",IsHidden:!1,IsMultiValue:!0,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Primary,DefaultDisplayOrder:5},"alias.first_name":{FieldKey:"alias.first_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Alias,DefaultDisplayOrder:20},"alias.last_name":{FieldKey:"alias.last_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Alias,DefaultDisplayOrder:30},"alias.gender":{FieldKey:"alias.gender",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Alias,DefaultDisplayOrder:50},"alias.birthdate":{FieldKey:"alias.birthdate",FieldType:"Date",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Alias,DefaultDisplayOrder:60},"card.cardholder_name":{FieldKey:"card.cardholder_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Card,DefaultDisplayOrder:10},"card.number":{FieldKey:"card.number",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Card,DefaultDisplayOrder:20},"card.expiry_month":{FieldKey:"card.expiry_month",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Card,DefaultDisplayOrder:30},"card.expiry_year":{FieldKey:"card.expiry_year",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Card,DefaultDisplayOrder:40},"card.cvv":{FieldKey:"card.cvv",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Card,DefaultDisplayOrder:50},"card.pin":{FieldKey:"card.pin",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!1}},EnableHistory:!1,Category:mt.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:mt.Notes,DefaultDisplayOrder:100}};function So(t){return fp[t]}function nc(t,e){return e in t.ApplicableToTypes}function Zl(t,e){const n=t.ApplicableToTypes[e];return(n==null?void 0:n.ShowByDefault)??!1}function yD(t){return Object.values(fp).filter(e=>nc(e,t)).sort((e,n)=>e.DefaultDisplayOrder-n.DefaultDisplayOrder)}function ED(t){return Object.values(fp).filter(e=>nc(e,t)&&!Zl(e,t)).sort((e,n)=>e.DefaultDisplayOrder-n.DefaultDisplayOrder)}function Kd(t,e){const n=t.Fields.find(i=>i.FieldKey===e);if(n)return Array.isArray(n.Value)?n.Value[0]:n.Value}function bD(t,e){const n={};return t.Fields.forEach(i=>{const s=e(i);n[s]||(n[s]=[]),n[s].push(i)}),n}function vD(t){const e=bD(t,n=>n.FieldKey.startsWith("login.")?mt.Login:n.FieldKey.startsWith("alias.")?mt.Alias:n.FieldKey.startsWith("card.")?mt.Card:n.FieldKey.startsWith("notes.")?mt.Notes:n.FieldKey.startsWith("metadata.")?mt.Metadata:mt.Custom);for(const n of Object.keys(e))e[n].sort((i,s)=>(i.DisplayOrder??0)-(s.DisplayOrder??0));return e}function Gd(t,e){const n=So(t);if(!n)throw new Error(`Unknown system field: ${t}. Use createCustomField for custom fields.`);return{FieldKey:t,Label:e.label??t,FieldType:n.FieldType,Value:e.value,IsHidden:n.IsHidden,DisplayOrder:e.displayOrder??n.DefaultDisplayOrder,IsCustomField:!1,EnableHistory:n.EnableHistory}}var Sf=10;class Nf{static processFieldRows(e){const n=e.map(l=>this.processFieldRow(l)),i=new Map,s=new Map;for(const l of n){const d=`${l.ItemId}_${l.FieldKey}`;s.has(d)||s.set(d,[]),s.get(d).push(l.Value),i.has(l.ItemId)||i.set(l.ItemId,[]);const m=i.get(l.ItemId);m.find(g=>g.FieldKey===l.FieldKey)||m.push({FieldKey:l.FieldKey,Label:l.Label,FieldType:l.FieldType,Value:"",IsHidden:l.IsHidden===1,DisplayOrder:l.DisplayOrder,IsCustomField:l.IsCustomField,EnableHistory:l.EnableHistory})}for(const[l,d]of i)for(const m of d){const f=`${l}_${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 n=So(e.FieldKey);return{ItemId:e.ItemId,FieldKey:e.FieldKey,Label:e.FieldKey,FieldType:(n==null?void 0:n.FieldType)||Zt.Text,IsHidden:n!=null&&n.IsHidden?1:0,Value:e.Value,DisplayOrder:(n==null?void 0:n.DefaultDisplayOrder)??e.DisplayOrder,IsCustomField:!1,EnableHistory:(n==null?void 0:n.EnableHistory)??!1}}else return{ItemId:e.ItemId,FieldKey:e.FieldDefinitionId||"",Label:e.CustomLabel||"",FieldType:e.CustomFieldType||Zt.Text,IsHidden:e.CustomIsHidden||0,Value:e.Value,DisplayOrder:e.DisplayOrder,IsCustomField:!0,EnableHistory:e.CustomEnableHistory===1}}static processFieldRowsForSingleItem(e){const n=new Map,i=new Map;for(const s of e){const l=s.FieldKey||s.FieldDefinitionId||"";if(n.has(l)||n.set(l,[]),n.get(l).push(s.Value),!i.has(l))if(s.FieldKey){const d=So(s.FieldKey);i.set(l,{FieldKey:s.FieldKey,Label:s.FieldKey,FieldType:(d==null?void 0:d.FieldType)||Zt.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(l,{FieldKey:l,Label:s.CustomLabel||"",FieldType:s.CustomFieldType||Zt.Text,IsHidden:s.CustomIsHidden||0,DisplayOrder:s.DisplayOrder,IsCustomField:!0,EnableHistory:s.CustomEnableHistory===1})}return Array.from(i.entries()).map(([s,l])=>{const d=n.get(s)||[];return{...l,FieldType:l.FieldType,Value:d.length===1?d[0]:d,IsHidden:l.IsHidden===1,IsCustomField:l.IsCustomField,EnableHistory:l.EnableHistory}})}}class Ol{static mapRow(e,n=[],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:n,HasPasskey:e.HasPasskey===1,HasAttachment:e.HasAttachment===1,HasTotp:e.HasTotp===1,CreatedAt:e.CreatedAt,UpdatedAt:e.UpdatedAt}}static mapRows(e,n,i){return e.map(s=>this.mapRow(s,n.get(s.Id)||[],i.get(s.Id)||[]))}static groupTagsByItem(e){const n=new Map;for(const i of e)n.has(i.ItemId)||n.set(i.ItemId,[]),n.get(i.ItemId).push({Id:i.Id,Name:i.Name,Color:i.Color||void 0});return n}static mapTagRows(e){return e.map(n=>({Id:n.Id,Name:n.Name,Color:n.Color||void 0}))}static mapDeletedItemRow(e,n=[]){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:n,CreatedAt:e.CreatedAt,UpdatedAt:e.UpdatedAt}}}function ME(t){return new Date(t).getTime()}class xf{static mapRow(e){return{Id:e.Id,ItemId:e.ItemId,RpId:e.RpId,UserHandle:e.UserHandle?new Uint8Array(e.UserHandle):void 0,PublicKey:e.PublicKey,PrivateKey:e.PrivateKey,DisplayName:e.DisplayName,PrfKey:e.PrfKey?new Uint8Array(e.PrfKey):void 0,AdditionalData:e.AdditionalData,CreatedAt:ME(e.CreatedAt),UpdatedAt:ME(e.UpdatedAt),IsDeleted:e.IsDeleted}}static mapRowWithItem(e){return{...this.mapRow(e),Username:e.Username,ServiceName:e.ServiceName}}static mapRows(e){return e.map(n=>this.mapRow(n))}static mapRowsWithItem(e){return e.map(n=>this.mapRowWithItem(n))}}const Ka=class Ka{static getFieldValuesForItems(e){return`
      SELECT
        fv.ItemId,
        fv.FieldKey,
        fv.FieldDefinitionId,
        fd.Label as CustomLabel,
        fd.FieldType as CustomFieldType,
        fd.IsHidden as CustomIsHidden,
        fd.EnableHistory as CustomEnableHistory,
        fv.Value,
        fv.Weight as DisplayOrder
      FROM FieldValues fv
      LEFT JOIN FieldDefinitions fd ON fv.FieldDefinitionId = fd.Id
      WHERE fv.ItemId IN (${Array(e).fill("?").join(",")})
        AND fv.IsDeleted = 0
      ORDER BY fv.ItemId, fv.Weight`}static getTagsForItems(e){return`
      SELECT
        it.ItemId,
        t.Id,
        t.Name,
        t.Color
      FROM ItemTags it
      INNER JOIN Tags t ON it.TagId = t.Id
      WHERE it.ItemId IN (${Array(e).fill("?").join(",")})
        AND it.IsDeleted = 0
        AND t.IsDeleted = 0
      ORDER BY t.DisplayOrder, t.Name`}};qe(Ka,"BASE_SELECT",`
    SELECT DISTINCT
      i.Id,
      i.Name,
      i.ItemType,
      i.FolderId,
      f.Name as FolderPath,
      l.FileData as Logo,
      CASE WHEN EXISTS (SELECT 1 FROM Passkeys pk WHERE pk.ItemId = i.Id AND pk.IsDeleted = 0) THEN 1 ELSE 0 END as HasPasskey,
      CASE WHEN EXISTS (SELECT 1 FROM Attachments att WHERE att.ItemId = i.Id AND att.IsDeleted = 0) THEN 1 ELSE 0 END as HasAttachment,
      CASE WHEN EXISTS (SELECT 1 FROM TotpCodes tc WHERE tc.ItemId = i.Id AND tc.IsDeleted = 0) THEN 1 ELSE 0 END as HasTotp,
      i.CreatedAt,
      i.UpdatedAt
    FROM Items i
    LEFT JOIN Logos l ON i.LogoId = l.Id
    LEFT JOIN Folders f ON i.FolderId = f.Id`),qe(Ka,"GET_ALL_ACTIVE",`
    ${Ka.BASE_SELECT}
    WHERE i.IsDeleted = 0 AND i.DeletedAt IS NULL
    ORDER BY i.CreatedAt DESC`),qe(Ka,"GET_BY_ID",`
    SELECT
      i.Id,
      i.Name,
      i.ItemType,
      i.FolderId,
      l.FileData as Logo,
      CASE WHEN EXISTS (SELECT 1 FROM Passkeys pk WHERE pk.ItemId = i.Id AND pk.IsDeleted = 0) THEN 1 ELSE 0 END as HasPasskey,
      CASE WHEN EXISTS (SELECT 1 FROM Attachments att WHERE att.ItemId = i.Id AND att.IsDeleted = 0) THEN 1 ELSE 0 END as HasAttachment,
      CASE WHEN EXISTS (SELECT 1 FROM TotpCodes tc WHERE tc.ItemId = i.Id AND tc.IsDeleted = 0) THEN 1 ELSE 0 END as HasTotp,
      i.CreatedAt,
      i.UpdatedAt
    FROM Items i
    LEFT JOIN Logos l ON i.LogoId = l.Id
    WHERE i.Id = ? AND i.IsDeleted = 0`),qe(Ka,"GET_RECENTLY_DELETED",`
    ${Ka.BASE_SELECT},
      i.DeletedAt
    FROM Items i
    LEFT JOIN Logos l ON i.LogoId = l.Id
    LEFT JOIN Folders f ON i.FolderId = f.Id
    WHERE i.IsDeleted = 0 AND i.DeletedAt IS NOT NULL
    ORDER BY i.DeletedAt DESC`),qe(Ka,"COUNT_RECENTLY_DELETED",`
    SELECT COUNT(*) as count
    FROM Items
    WHERE IsDeleted = 0 AND DeletedAt IS NOT NULL`),qe(Ka,"GET_FIELD_VALUES_FOR_ITEM",`
    SELECT
      fv.FieldKey,
      fv.FieldDefinitionId,
      fd.Label as CustomLabel,
      fd.FieldType as CustomFieldType,
      fd.IsHidden as CustomIsHidden,
      fd.EnableHistory as CustomEnableHistory,
      fv.Value,
      fv.Weight as DisplayOrder
    FROM FieldValues fv
    LEFT JOIN FieldDefinitions fd ON fv.FieldDefinitionId = fd.Id
    WHERE fv.ItemId = ? AND fv.IsDeleted = 0
    ORDER BY fv.Weight`),qe(Ka,"GET_TAGS_FOR_ITEM",`
    SELECT
      t.Id,
      t.Name,
      t.Color
    FROM ItemTags it
    INNER JOIN Tags t ON it.TagId = t.Id
    WHERE it.ItemId = ? AND it.IsDeleted = 0 AND t.IsDeleted = 0
    ORDER BY t.DisplayOrder, t.Name`),qe(Ka,"INSERT_ITEM",`
    INSERT INTO Items (Id, Name, ItemType, LogoId, FolderId, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?)`),qe(Ka,"UPDATE_ITEM",`
    UPDATE Items
    SET Name = ?,
        ItemType = ?,
        FolderId = ?,
        LogoId = COALESCE(?, LogoId),
        UpdatedAt = ?
    WHERE Id = ?`),qe(Ka,"UPDATE_ITEM_WITH_LOGO",`
    UPDATE Items
    SET Name = ?,
        ItemType = ?,
        FolderId = ?,
        LogoId = ?,
        UpdatedAt = ?
    WHERE Id = ?`),qe(Ka,"TRASH_ITEM",`
    UPDATE Items
    SET DeletedAt = ?,
        UpdatedAt = ?
    WHERE Id = ? AND IsDeleted = 0`),qe(Ka,"RESTORE_ITEM",`
    UPDATE Items
    SET DeletedAt = NULL,
        UpdatedAt = ?
    WHERE Id = ? AND IsDeleted = 0 AND DeletedAt IS NOT NULL`),qe(Ka,"TOMBSTONE_ITEM",`
    UPDATE Items
    SET IsDeleted = 1,
        Name = NULL,
        LogoId = NULL,
        FolderId = NULL,
        UpdatedAt = ?
    WHERE Id = ?`),qe(Ka,"GET_LOGO_ID",`
    SELECT LogoId FROM Items WHERE Id = ?`),qe(Ka,"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 dn=Ka;class Er{}qe(Er,"GET_EXISTING_FOR_ITEM",`
    SELECT Id, FieldKey, FieldDefinitionId, Value, Weight
    FROM FieldValues
    WHERE ItemId = ? AND IsDeleted = 0`),qe(Er,"INSERT",`
    INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`),qe(Er,"UPDATE",`
    UPDATE FieldValues
    SET Value = ?,
        Weight = ?,
        UpdatedAt = ?
    WHERE Id = ?`),qe(Er,"SOFT_DELETE",`
    UPDATE FieldValues
    SET IsDeleted = 1,
        UpdatedAt = ?
    WHERE Id = ?`),qe(Er,"GET_FOR_HISTORY",`
    SELECT FieldKey, Value
    FROM FieldValues
    WHERE ItemId = ? AND IsDeleted = 0 AND FieldKey IS NOT NULL`);class fi{}qe(fi,"EXISTS",`
    SELECT Id FROM FieldDefinitions WHERE Id = ?`),qe(fi,"EXISTS_ACTIVE",`
    SELECT Id FROM FieldDefinitions WHERE Id = ? AND IsDeleted = 0`),qe(fi,"INSERT",`
    INSERT INTO FieldDefinitions (Id, FieldType, Label, IsMultiValue, IsHidden, EnableHistory, Weight, ApplicableToTypes, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`),qe(fi,"UPDATE",`
    UPDATE FieldDefinitions
    SET Label = ?,
        FieldType = ?,
        IsHidden = ?,
        Weight = ?,
        UpdatedAt = ?
    WHERE Id = ?`);class Fr{static softDeleteOld(e){return`
      UPDATE FieldHistories
      SET IsDeleted = 1, UpdatedAt = ?
      WHERE Id IN (${Array(e).fill("?").join(",")})`}}qe(Fr,"INSERT",`
    INSERT INTO FieldHistories (Id, ItemId, FieldDefinitionId, FieldKey, ValueSnapshot, ChangedAt, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`),qe(Fr,"GET_FOR_FIELD",`
    SELECT
      Id,
      ItemId,
      FieldKey,
      ValueSnapshot,
      ChangedAt,
      CreatedAt,
      UpdatedAt
    FROM FieldHistories
    WHERE ItemId = ? AND FieldKey = ? AND IsDeleted = 0
    ORDER BY ChangedAt DESC
    LIMIT ?`),qe(Fr,"GET_FOR_PRUNING",`
    SELECT Id, ChangedAt
    FROM FieldHistories
    WHERE ItemId = ? AND FieldKey = ? AND IsDeleted = 0
    ORDER BY ChangedAt DESC`),qe(Fr,"SOFT_DELETE",`
    UPDATE FieldHistories
    SET IsDeleted = 1, UpdatedAt = ?
    WHERE Id = ?`);class ID extends Sc{constructor(e,n){super(e),this.logoRepository=n}getAll(){let e;try{e=this.client.executeQuery(dn.GET_ALL_ACTIVE)}catch(m){if(m instanceof Error&&m.message.includes("no such table"))return[];throw m}if(e.length===0)return[];const n=e.map(m=>m.Id),i=this.client.executeQuery(dn.getFieldValuesForItems(n.length),n),s=Nf.processFieldRows(i),l=this.client.executeQuery(dn.getTagsForItems(n.length),n),d=Ol.groupTagsByItem(l);return Ol.mapRows(e,s,d)}getById(e){const n=this.client.executeQuery(dn.GET_BY_ID,[e]);if(n.length===0)return null;const i=this.client.executeQuery(dn.GET_FIELD_VALUES_FOR_ITEM,[e]),s=Nf.processFieldRowsForSingleItem(i),l=this.client.executeQuery(dn.GET_TAGS_FOR_ITEM,[e]),d=Ol.mapTagRows(l);return Ol.mapRow(n[0],s,d)}getAllEmailAddresses(){return this.client.executeQuery(dn.GET_ALL_EMAIL_ADDRESSES,[mn.LoginEmail]).map(n=>n.Email)}async create(e,n=[],i=[]){return this.withTransaction(async()=>{const s=this.now(),l=e.Id||this.generateId(),d=this.resolveLogoId(e,s);return this.client.executeUpdate(dn.INSERT_ITEM,[l,e.Name??null,e.ItemType,d,e.FolderId??null,s,s,0]),e.Fields&&e.Fields.length>0&&this.insertFieldValues(l,e.Fields,e.ItemType,s),this.insertTotpCodes(l,i,s),this.insertAttachments(l,n,s),l})}async update(e,n=[],i=[],s=[],l=[]){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,A=String(e.ItemType)!==String(f.ItemType),p=(e.FolderId??null)!==f.FolderId,v=m!==f.LogoId;(g||A||p||v)&&this.client.executeUpdate(dn.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,l,s,d),this.handleAttachments(e.Id,i,n,d),1})}async trash(e){return this.withTransaction(async()=>{const n=this.now();return this.client.executeUpdate(dn.TRASH_ITEM,[n,n,e])})}async restore(e){return this.withTransaction(async()=>{const n=this.now();return this.client.executeUpdate(dn.RESTORE_ITEM,[n,e])})}async permanentlyDelete(e){return this.withTransaction(async()=>{const n=this.now(),i=this.client.executeQuery(dn.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 l=this.client.executeUpdate(dn.TOMBSTONE_ITEM,[n,e]);return s&&this.logoRepository.cleanupOrphanedLogo(s),l})}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(l){if(l instanceof Error&&l.message.includes("no such table"))return[];throw l}if(e.length===0)return[];const n=e.map(l=>l.Id),i=this.client.executeQuery(dn.getFieldValuesForItems(n.length),n),s=Nf.processFieldRows(i);return e.map(l=>Ol.mapDeletedItemRow(l,s.get(l.Id)||[]))}getRecentlyDeletedCount(){var e;try{return((e=this.client.executeQuery(dn.COUNT_RECENTLY_DELETED)[0])==null?void 0:e.count)||0}catch(n){if(n instanceof Error&&n.message.includes("no such table"))return 0;throw n}}getFieldHistory(e,n){return this.client.executeQuery(Fr.GET_FOR_FIELD,[e,n,Sf]).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 n=this.now();return this.client.executeUpdate(Fr.SOFT_DELETE,[n,e])})}resolveLogoId(e,n){var m;const i=(m=e.Fields)==null?void 0:m.find(f=>f.FieldKey==="login.url"),s=i==null?void 0:i.Value,l=Array.isArray(s)?s[0]:s,d=this.logoRepository.extractSourceFromUrl(l);if(e.Logo){const f=this.logoRepository.convertLogoToUint8Array(e.Logo);if(f)return this.logoRepository.getOrCreate(d,f,n)}else if(d!=="unknown")return this.logoRepository.getIdForSource(d);return null}insertFieldValues(e,n,i,s){for(const l of n){if((!l.Value||typeof l.Value=="string"&&l.Value.trim()==="")&&!l.IsCustomField)continue;let m=null;l.IsCustomField&&(m=this.ensureFieldDefinition(l,i,s));const g=(Array.isArray(l.Value)?l.Value:[l.Value]).filter(p=>p&&p.trim()!==""),A=l.IsCustomField&&g.length===0?[""]:g;for(const p of A)this.client.executeUpdate(Er.INSERT,[this.generateId(),e,m,l.IsCustomField?null:l.FieldKey,p,l.DisplayOrder??0,s,s,0]);if(l.EnableHistory&&g.length>0){const p=this.generateId(),v=JSON.stringify(g);this.client.executeUpdate(Fr.INSERT,[p,e,null,l.FieldKey,v,s,s,s,0])}}}ensureFieldDefinition(e,n,i){return this.client.executeQuery(fi.EXISTS,[e.FieldKey]).length===0&&this.client.executeUpdate(fi.INSERT,[e.FieldKey,e.FieldType,e.Label,0,e.IsHidden?1:0,0,e.DisplayOrder??0,n,i,i,0]),e.FieldKey}updateFieldValues(e,n){const i=this.client.executeQuery(Er.GET_EXISTING_FOR_ITEM,[e.Id]),s=new Map,l=new Map;for(const m of i){const f=m.FieldKey||m.FieldDefinitionId||"",g=l.get(f)||0;s.set(`${f}:${g}`,{Id:m.Id,Value:m.Value,Weight:m.Weight}),l.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,n));const A=Array.isArray(m.Value)?m.Value:[m.Value],p=m.FieldKey,v=A.filter(x=>x&&(typeof x!="string"||x.trim()!=="")),I=m.IsCustomField&&v.length===0?[""]:v;for(let x=0;x<I.length;x++){const N=I[x],T=`${p}:${x}`,L=s.get(T);if(L){d.add(L.Id);const B=m.DisplayOrder??0;(L.Value!==N||L.Weight!==B)&&this.client.executeUpdate(Er.UPDATE,[N,B,n,L.Id])}else this.client.executeUpdate(Er.INSERT,[this.generateId(),e.Id,g,m.IsCustomField?null:m.FieldKey,N,m.DisplayOrder??0,n,n,0])}}for(const m of i)d.has(m.Id)||this.client.executeUpdate(Er.SOFT_DELETE,[n,m.Id])}ensureOrUpdateFieldDefinition(e,n,i){return this.client.executeQuery(fi.EXISTS_ACTIVE,[e.FieldKey]).length===0?this.client.executeUpdate(fi.INSERT,[e.FieldKey,e.FieldType,e.Label,0,e.IsHidden?1:0,0,e.DisplayOrder??0,n,i,i,0]):this.client.executeUpdate(fi.UPDATE,[e.Label,e.FieldType,e.IsHidden?1:0,e.DisplayOrder??0,i,e.FieldKey]),e.FieldKey}async trackFieldHistory(e,n,i){const s=this.client.executeQuery(Er.GET_FOR_HISTORY,[e]),l={};for(const d of s)l[d.FieldKey]||(l[d.FieldKey]=[]),l[d.FieldKey].push(d.Value);for(const d of n){if(!d.EnableHistory)continue;const m=l[d.FieldKey]||[],g=(Array.isArray(d.Value)?d.Value:[d.Value]).filter(p=>p&&p.trim()!=="");if((m.length!==g.length||!m.every((p,v)=>p===g[v]))&&g.length>0){const p=this.generateId(),v=JSON.stringify(g);this.client.executeUpdate(Fr.INSERT,[p,e,null,d.FieldKey,v,i,i,i,0]),await this.pruneFieldHistory(e,d.FieldKey,i)}}}async pruneFieldHistory(e,n,i){const s=this.client.executeQuery(Fr.GET_FOR_PRUNING,[e,n]);if(s.length>Sf){const d=s.slice(Sf).map(m=>m.Id);d.length>0&&this.client.executeUpdate(Fr.softDeleteOld(d.length),[i,...d])}}insertTotpCodes(e,n,i){for(const s of n)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,n,i,s){const l=this.client.executeQuery("SELECT Id, Name, SecretKey FROM TotpCodes WHERE ItemId = ? AND IsDeleted = 0",[e]),d=new Map(l.map(m=>[m.Id,m]));for(const m of n){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,n,i){for(const s of n){const l=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,l,e,i,i,0])}}handleAttachments(e,n,i,s){const l=new Set(n.map(d=>d.Id));for(const d of i)l.has(d)||this.client.executeUpdate("UPDATE Attachments SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?",[s,d]);for(const d of n){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 Ss={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 = '${mn.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 = '${mn.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 wD extends Sc{getByRpId(e){const n=this.client.executeQuery(Ss.GET_BY_RP_ID,[e]);return xf.mapRowsWithItem(n)}getById(e){const n=this.client.executeQuery(Ss.GET_BY_ID_WITH_ITEM,[e]);return n.length===0?null:xf.mapRowWithItem(n[0])}getByItemId(e){const n=this.client.executeQuery(Ss.GET_BY_ITEM_ID,[e]);return xf.mapRows(n)}async create(e){return this.withTransaction(async()=>{const n=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(Ss.INSERT,[e.Id,e.ItemId,e.RpId,s,e.PublicKey,e.PrivateKey,i,e.DisplayName,e.AdditionalData??null,n,n,0])})}async deleteById(e){return this.withTransaction(async()=>{const n=this.now();return this.client.executeUpdate(Ss.SOFT_DELETE,[n,e])})}async deleteByItemId(e){return this.withTransaction(async()=>{const n=this.now();return this.client.executeUpdate(Ss.SOFT_DELETE_BY_ITEM,[n,e])})}async updateDisplayName(e,n){return this.withTransaction(async()=>{const i=this.now();return this.client.executeUpdate(Ss.UPDATE_DISPLAY_NAME,[n,i,e])})}}const di={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 CD extends Sc{async create(e,n){return this.withTransaction(async()=>{const i=crypto.randomUUID().toUpperCase(),s=this.now();return this.client.executeUpdate(di.INSERT,[i,e,n||null,s,s]),i})}getAll(){try{return this.client.executeQuery(di.GET_ALL)}catch(e){if(e instanceof Error&&e.message.includes("no such table"))return[];throw e}}getById(e){const n=this.client.executeQuery(di.GET_BY_ID,[e]);return n.length>0?n[0]:null}async update(e,n){return this.withTransaction(async()=>{const i=this.now();return this.client.executeUpdate(di.UPDATE_NAME,[n,i,e])})}async delete(e){return this.withTransaction(async()=>{const n=this.now();return this.client.executeUpdate(di.CLEAR_ITEMS_FOLDER,[n,e]),this.client.executeUpdate(di.SOFT_DELETE,[n,e])})}async deleteWithContents(e){return this.withTransaction(async()=>{const n=this.now(),i=this.client.executeUpdate(di.TRASH_ITEMS_IN_FOLDER,[n,n,e]);return this.client.executeUpdate(di.SOFT_DELETE,[n,e]),i})}async moveItem(e,n){return this.withTransaction(async()=>{const i=this.now();return this.client.executeUpdate(di.MOVE_ITEM,[n,i,e])})}}const qd={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 SD extends Sc{getSetting(e,n=""){const i=this.client.executeQuery(qd.GET_SETTING,[e]);return i.length>0?i[0].Value:n}getDefaultIdentityLanguage(){return this.getSetting("DefaultIdentityLanguage")}getDefaultIdentityGender(){return this.getSetting("DefaultIdentityGender","random")}getDefaultIdentityAgeRange(){return this.getSetting("DefaultIdentityAgeRange","random")}getPasswordSettings(){const e=this.getSetting("PasswordGenerationSettings"),n={Length:18,UseLowercase:!0,UseUppercase:!0,UseNumbers:!0,UseSpecialChars:!0,UseNonAmbiguousChars:!1};try{if(e)return{...n,...JSON.parse(e)}}catch(i){console.warn("Failed to parse password settings:",i)}return n}getAllEncryptionKeys(){return this.client.executeQuery(qd.GET_ENCRYPTION_KEYS)}getTotpCodesForItem(e){try{return this.tableExists("TotpCodes")?this.client.executeQuery(qd.GET_TOTP_FOR_ITEM,[e]):[]}catch(n){return console.error("Error getting TOTP codes for item:",n),[]}}getAttachmentsForItem(e){try{return this.tableExists("Attachments")?this.client.executeQuery(qd.GET_ATTACHMENTS_FOR_ITEM,[e]):[]}catch(n){return console.error("Error getting attachments for item:",n),[]}}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,n){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 = ?",[n,i,e]):this.client.executeUpdate("INSERT INTO Settings (Key, Value, CreatedAt, UpdatedAt, IsDeleted) VALUES (?, ?, ?, ?, ?)",[e,n,i,i,0])}setCredentialsSortOrder(e){this.updateSetting("CredentialsSortOrder",e)}}const jl={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 ND extends Sc{hasLogoForSource(e){return this.client.executeQuery(jl.GET_ID_FOR_SOURCE,[e]).length>0}getIdForSource(e){const n=this.client.executeQuery(jl.GET_ID_FOR_SOURCE,[e]);return n.length>0?n[0].Id:null}getOrCreate(e,n,i){const s=this.getIdForSource(e);if(s)return s;const l=this.generateId();return this.client.executeUpdate(jl.INSERT,[l,e,n,i,i,0]),l}cleanupOrphanedLogo(e){const n=this.client.executeQuery(jl.COUNT_USAGE,[e]);(n.length>0?n[0].count:0)===0&&(this.client.executeUpdate(jl.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 n=Object.values(e);return new Uint8Array(n)}if(Array.isArray(e)||e instanceof ArrayBuffer||e instanceof Uint8Array)return new Uint8Array(e)}catch(n){console.warn("Failed to convert logo to Uint8Array:",n)}return null}}class Bh{constructor(){qe(this,"db",null);qe(this,"isInTransaction",!1);qe(this,"_items",null);qe(this,"_passkeys",null);qe(this,"_folders",null);qe(this,"_settings",null);qe(this,"_logos",null)}get items(){return this._items||(this._items=new ID(this,this.logos)),this._items}get passkeys(){return this._passkeys||(this._passkeys=new wD(this)),this._passkeys}get folders(){return this._folders||(this._folders=new CD(this)),this._folders}get settings(){return this._settings||(this._settings=new SD(this)),this._settings}get logos(){return this._logos||(this._logos=new ND(this)),this._logos}getDb(){return this.db}async initializeFromBase64(e){try{const n=atob(e),i=new Uint8Array(n.length);for(let l=0;l<n.length;l++)i[l]=n.charCodeAt(l);const s=await cT({locateFile:l=>`src/${l}`});this.db=new s.Database(i),this._items=null,this._passkeys=null,this._folders=null,this._settings=null,this._logos=null}catch(n){throw console.error("Error initializing SQLite database:",n),n}}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 n="";for(let i=0;i<e.length;i++)n+=String.fromCharCode(e[i]);return btoa(n)}catch(e){throw console.error("Error exporting SQLite database:",e),e}}executeQuery(e,n=[]){if(!this.db)throw new Error("Database not initialized");try{const i=this.db.prepare(e);i.bind(n);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,n=[]){if(!this.db)throw new Error("Database not initialized");try{const i=this.db.prepare(e);i.bind(n),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 n=e.split(";");for(const i of n){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(n){throw console.error("Error executing raw SQL:",n),n}}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 n=e[0].MigrationId,i=uT(n);if(!i)throw new Error("Could not extract version from migration ID");const s=dT(i);if(!s.isCompatible){const m=await pD("common.errors.browserExtensionOutdated");throw new hc(m)}if(s.isKnownVersion&&s.clientVersion)return s.clientVersion;const d=new Rh().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 n=new Rh().getAllVersions();return n[n.length-1]}async hasPendingMigrations(){try{const e=await this.getDatabaseVersion(),n=await this.getLatestDatabaseVersion();return e.revision<n.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 n=this.toUint8Array(e),i=this.base64Encode(n);return i?`data:${this.detectMimeType(n)};base64,${i}`:null}catch(n){return console.error("Error setting logo:",n),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 n=()=>{const l=new TextDecoder().decode(e.slice(0,5)).toLowerCase();return l.includes("<?xml")||l.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 n()?"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 n=Object.keys(e).length,i=new Uint8Array(n);for(let s=0;s<n;s++)i[s]=e[s];return i}static base64Encode(e){try{const n=Array.from(this.toUint8Array(e));return btoa(n.reduce((i,s)=>i+String.fromCharCode(s),""))}catch(n){return console.error("Error encoding to base64:",n),null}}}const _E={"local:publicEmailDomains":"session:publicEmailDomains","local:privateEmailDomains":"session:privateEmailDomains","local:hiddenPrivateEmailDomains":"session:hiddenPrivateEmailDomains","local:encryptionKeyDerivationParams":"session:encryptionKeyDerivationParams"};async function rc(t){let e=await Te.getItem(t);if(e===null&&t in _E){const n=_E[t];e=await Te.getItem(n),e!==null&&(await Te.setItem(t,e),await Te.removeItem(n))}return e}const pI=b.createContext(void 0),xD=({children:t})=>{const[e,n]=b.useState(null),[i,s]=b.useState(!1),[l,d]=b.useState(!1),[m,f]=b.useState(!1),g=b.useRef(!1),[A,p]=b.useState(!1),[v,I]=b.useState(!1),[x,N]=b.useState(!1),[T,L]=b.useState(0),B=b.useCallback(()=>A||v,[A,v]),k=b.useCallback(async X=>{g.current=X,f(X),await Te.setItem("local:isOfflineMode",X)},[]);b.useEffect(()=>{(async()=>{const[ue,W,ae]=await Promise.all([Te.getItem("local:isOfflineMode"),Te.getItem("local:isDirty"),Te.getItem("local:serverRevision")]);g.current=ue??!1,f(ue??!1),p(W??!1),L(ae??0)})()},[]);const F=b.useCallback(async X=>{const ue=new Bh;return await ue.initializeFromBase64(X),n(ue),s(!0),d(!0),ue},[]),_=b.useCallback(async()=>{try{const X=await wt("GET_VAULT",{},"background");if(!(X!=null&&X.success)&&(X!=null&&X.error))throw new Error(X.error);if(X!=null&&X.vault){const ue=new Bh;return await ue.initializeFromBase64(X.vault),n(ue),s(!0),d(!0),ue}else return s(!0),d(!1),null}catch(X){throw console.error("Error retrieving vault from background:",X),s(!0),d(!1),X}},[]),V=b.useCallback(async()=>{try{const X=await rc("local:publicEmailDomains"),ue=await rc("local:privateEmailDomains"),W=await rc("local:hiddenPrivateEmailDomains"),ae=await Te.getItem("local:serverRevision");return!X&&!ue?null:{publicEmailDomains:X??[],privateEmailDomains:ue??[],hiddenPrivateEmailDomains:W??[],serverRevision:ae??0}}catch(X){return console.error("Error getting vault metadata from local storage:",X),null}},[]),U=b.useCallback(async()=>{const[X,ue]=await Promise.all([Te.getItem("local:isDirty"),Te.getItem("local:serverRevision")]);p(X??!1),L(ue??0)},[]),O=b.useCallback(async()=>e?await e.hasPendingMigrations():!1,[e]);b.useEffect(()=>{i||_()},[i,_]);const z=b.useCallback(async X=>{await wt("STORE_ENCRYPTION_KEY",X,"background")},[]),Q=b.useCallback(async X=>{await wt("STORE_ENCRYPTION_KEY_DERIVATION_PARAMS",X,"background")},[]),K=b.useCallback(()=>{n(null),s(!1),d(!1)},[]),te=b.useCallback(()=>g.current,[]),ee=b.useMemo(()=>({sqliteClient:e,dbInitialized:i,dbAvailable:l,isOffline:m,getIsOffline:te,isDirty:A,isSyncing:v,isUploading:x,serverRevision:T,setIsOffline:k,setIsSyncing:I,setIsUploading:N,shouldSuppressEmailErrors:B,loadDatabase:F,loadStoredDatabase:_,storeEncryptionKey:z,storeEncryptionKeyDerivationParams:Q,clearDatabase:K,getVaultMetadata:V,refreshSyncState:U,hasPendingMigrations:O}),[e,i,l,m,te,A,v,x,T,k,B,F,_,z,Q,K,V,U,O]);return c.jsx(pI.Provider,{value:ee,children:t})},ea=()=>{const t=b.useContext(pI);if(t===void 0)throw new Error("useDb must be used within a DbProvider");return t},bt={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",AUTO_CLOSE_UNLOCK_POPUP:"local:aliasvault_auto_close_unlock_popup",LOGIN_SAVE_ENABLED:"local:loginSaveEnabled",LOGIN_SAVE_AUTO_DISMISS_SECONDS:"local:loginSaveAutoDismissSeconds",LOGIN_SAVE_BLOCKED_DOMAINS:"local:loginSaveBlockedDomains",PENDING_REDIRECT_URL:"session:pendingRedirectUrl",SKIP_FORM_RESTORE:"local:aliasvault_skip_form_restore"};var ec=(t=>(t.DEFAULT="default",t.URL_SUBDOMAIN="url_subdomain",t.URL_EXACT="url_exact",t))(ec||{});const lt={async getShowFolders(){return await Te.getItem(bt.SHOW_FOLDERS)??!0},async setShowFolders(t){await Te.setItem(bt.SHOW_FOLDERS,t)},async getAutoCloseUnlockPopup(){return await Te.getItem(bt.AUTO_CLOSE_UNLOCK_POPUP)??!0},async setAutoCloseUnlockPopup(t){await Te.setItem(bt.AUTO_CLOSE_UNLOCK_POPUP,t)},async getGlobalAutofillPopupEnabled(){return await Te.getItem(bt.GLOBAL_AUTOFILL_POPUP_ENABLED)!==!1},async setGlobalAutofillPopupEnabled(t){await Te.setItem(bt.GLOBAL_AUTOFILL_POPUP_ENABLED,t)},async getAutofillMatchingMode(){return await Te.getItem(bt.AUTOFILL_MATCHING_MODE)??"default"},async setAutofillMatchingMode(t){await Te.setItem(bt.AUTOFILL_MATCHING_MODE,t)},async getDisabledSites(){return await Te.getItem(bt.DISABLED_SITES)??[]},async setDisabledSites(t){await Te.setItem(bt.DISABLED_SITES,t)},async getTemporaryDisabledSites(){return await Te.getItem(bt.TEMPORARY_DISABLED_SITES)??{}},async setTemporaryDisabledSites(t){await Te.setItem(bt.TEMPORARY_DISABLED_SITES,t)},async getGlobalContextMenuEnabled(){return await Te.getItem(bt.GLOBAL_CONTEXT_MENU_ENABLED)!==!1},async setGlobalContextMenuEnabled(t){await Te.setItem(bt.GLOBAL_CONTEXT_MENU_ENABLED,t)},async getPasskeyProviderEnabled(){return await Te.getItem(bt.PASSKEY_PROVIDER_ENABLED)!==!1},async setPasskeyProviderEnabled(t){await Te.setItem(bt.PASSKEY_PROVIDER_ENABLED,t)},async getPasskeyDisabledSites(){return await Te.getItem(bt.PASSKEY_DISABLED_SITES)??[]},async setPasskeyDisabledSites(t){await Te.setItem(bt.PASSKEY_DISABLED_SITES,t)},async getClipboardClearTimeout(){return await Te.getItem(bt.CLIPBOARD_CLEAR_TIMEOUT)??10},async setClipboardClearTimeout(t){await Te.setItem(bt.CLIPBOARD_CLEAR_TIMEOUT,t)},async getAutoLockTimeout(){return await Te.getItem(bt.AUTO_LOCK_TIMEOUT)??0},async setAutoLockTimeout(t){await Te.setItem(bt.AUTO_LOCK_TIMEOUT,t)},async getVaultLockedDismissUntil(){return await Te.getItem(bt.VAULT_LOCKED_DISMISS_UNTIL)??0},async setVaultLockedDismissUntil(t){await Te.setItem(bt.VAULT_LOCKED_DISMISS_UNTIL,t)},async getCustomEmailHistory(){return await Te.getItem(bt.CUSTOM_EMAIL_HISTORY)??[]},async setCustomEmailHistory(t){await Te.setItem(bt.CUSTOM_EMAIL_HISTORY,t)},async getCustomUsernameHistory(){return await Te.getItem(bt.CUSTOM_USERNAME_HISTORY)??[]},async setCustomUsernameHistory(t){await Te.setItem(bt.CUSTOM_USERNAME_HISTORY,t)},async clearUiPreferences(){await Te.removeItem(bt.SHOW_FOLDERS)},async resetAllSiteSettings(){await Te.setItem(bt.DISABLED_SITES,[]),await Te.setItem(bt.TEMPORARY_DISABLED_SITES,{}),await Te.setItem(bt.PASSKEY_DISABLED_SITES,[])},async clearAll(){await Promise.all(Object.values(bt).map(t=>Te.removeItem(t)))},async getPendingRedirectUrl(){return await Te.getItem(bt.PENDING_REDIRECT_URL)??null},async setPendingRedirectUrl(t){t===null?await Te.removeItem(bt.PENDING_REDIRECT_URL):await Te.setItem(bt.PENDING_REDIRECT_URL,t)},async getSkipFormRestore(){return await Te.getItem(bt.SKIP_FORM_RESTORE)??!1},async setSkipFormRestore(t){await Te.setItem(bt.SKIP_FORM_RESTORE,t)},async getLoginSaveEnabled(){return await Te.getItem(bt.LOGIN_SAVE_ENABLED)!==!1},async setLoginSaveEnabled(t){await Te.setItem(bt.LOGIN_SAVE_ENABLED,t)},async getLoginSaveAutoDismissSeconds(){return await Te.getItem(bt.LOGIN_SAVE_AUTO_DISMISS_SECONDS)??15},async setLoginSaveAutoDismissSeconds(t){await Te.setItem(bt.LOGIN_SAVE_AUTO_DISMISS_SECONDS,t)},async getLoginSaveBlockedDomains(){return await Te.getItem(bt.LOGIN_SAVE_BLOCKED_DOMAINS)??[]},async setLoginSaveBlockedDomains(t){await Te.setItem(bt.LOGIN_SAVE_BLOCKED_DOMAINS,t)}};var uu={exports:{}},TD=uu.exports,FE;function kD(){return FE||(FE=1,function(t,e){(function(n,i){t.exports=i()})(TD,function(){return(()=>{var n,i,s={773:(m,f,g)=>{var A,p=typeof self<"u"&&self.Module!==void 0?self.Module:{},v={};for(A in p)p.hasOwnProperty(A)&&(v[A]=p[A]);var I,x,N,T;I=typeof window=="object",x=typeof importScripts=="function",N=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",T=!I&&!N&&!x;var L,B,k,F,_,V="";N?(V=x?g(967).dirname(V)+"/":"//",L=function(Se,Fe){return F||(F=g(145)),_||(_=g(967)),Se=_.normalize(Se),F.readFileSync(Se,Fe?null:"utf8")},k=function(Se){var Fe=L(Se,!0);return Fe.buffer||(Fe=new Uint8Array(Fe)),K(Fe.buffer),Fe},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),m.exports=p,process.on("uncaughtException",function(Se){if(!(Se instanceof Ge))throw Se}),process.on("unhandledRejection",Y),p.inspect=function(){return"[Emscripten Module object]"}):T?(typeof read<"u"&&(L=function(Se){return read(Se)}),k=function(Se){var Fe;return typeof readbuffer=="function"?new Uint8Array(readbuffer(Se)):(K(typeof(Fe=read(Se,"binary"))=="object"),Fe)},typeof scriptArgs<"u"&&scriptArgs,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(I||x)&&(x?V=self.location.href:typeof document<"u"&&document.currentScript&&(V=document.currentScript.src),V=V.indexOf("blob:")!==0?V.substr(0,V.lastIndexOf("/")+1):"",L=function(Se){var Fe=new XMLHttpRequest;return Fe.open("GET",Se,!1),Fe.send(null),Fe.responseText},x&&(k=function(Se){var Fe=new XMLHttpRequest;return Fe.open("GET",Se,!1),Fe.responseType="arraybuffer",Fe.send(null),new Uint8Array(Fe.response)}),B=function(Se,Fe,he){var De=new XMLHttpRequest;De.open("GET",Se,!0),De.responseType="arraybuffer",De.onload=function(){De.status==200||De.status==0&&De.response?Fe(De.response):he()},De.onerror=he,De.send(null)}),p.print||console.log.bind(console);var U,O,z=p.printErr||console.warn.bind(console);for(A in v)v.hasOwnProperty(A)&&(p[A]=v[A]);v=null,p.arguments&&p.arguments,p.thisProgram&&p.thisProgram,p.quit&&p.quit,p.wasmBinary&&(U=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&Y("no native wasm support detected");var Q=!1;function K(Se,Fe){Se||Y("Assertion failed: "+Fe)}var te,ee,X=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function ue(Se){te=Se,p.HEAP8=new Int8Array(Se),p.HEAP16=new Int16Array(Se),p.HEAP32=new Int32Array(Se),p.HEAPU8=ee=new Uint8Array(Se),p.HEAPU16=new Uint16Array(Se),p.HEAPU32=new Uint32Array(Se),p.HEAPF32=new Float32Array(Se),p.HEAPF64=new Float64Array(Se)}p.INITIAL_MEMORY;var W,ae=[],be=[],se=[],P=0,q=null;function Y(Se){throw p.onAbort&&p.onAbort(Se),z(Se+=""),Q=!0,Se="abort("+Se+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(Se)}function ne(Se){return Se.startsWith("data:application/octet-stream;base64,")}function Ie(Se){return Se.startsWith("file://")}p.preloadedImages={},p.preloadedAudios={};var ce,Ee="argon2.wasm";function Ne(Se){try{if(Se==Ee&&U)return new Uint8Array(U);if(k)return k(Se);throw"both async and sync fetching of the wasm failed"}catch(Fe){Y(Fe)}}function we(Se){for(;Se.length>0;){var Fe=Se.shift();if(typeof Fe!="function"){var he=Fe.func;typeof he=="number"?Fe.arg===void 0?W.get(he)():W.get(he)(Fe.arg):he(Fe.arg===void 0?null:Fe.arg)}else Fe(p)}}function Oe(Se){try{return O.grow(Se-te.byteLength+65535>>>16),ue(O.buffer),1}catch{}}ne(Ee)||(ce=Ee,Ee=p.locateFile?p.locateFile(ce,V):V+ce);var ze,Et={a:function(Se,Fe,he){ee.copyWithin(Se,Fe,Fe+he)},b:function(Se){var Fe,he=ee.length,De=2147418112;if((Se>>>=0)>De)return!1;for(var Ve=1;Ve<=4;Ve*=2){var He=he*(1+.2/Ve);if(He=Math.min(He,Se+100663296),Oe(Math.min(De,((Fe=Math.max(Se,He))%65536>0&&(Fe+=65536-Fe%65536),Fe))))return!0}return!1}},ht=(function(){var Se={a:Et};function Fe(Ve,He){var tt,It=Ve.exports;p.asm=It,ue((O=p.asm.c).buffer),W=p.asm.k,tt=p.asm.d,be.unshift(tt),function(Ot){if(P--,p.monitorRunDependencies&&p.monitorRunDependencies(P),P==0&&q){var Tt=q;q=null,Tt()}}()}function he(Ve){Fe(Ve.instance)}function De(Ve){return function(){if(!U&&(I||x)){if(typeof fetch=="function"&&!Ie(Ee))return fetch(Ee,{credentials:"same-origin"}).then(function(He){if(!He.ok)throw"failed to load wasm binary file at '"+Ee+"'";return He.arrayBuffer()}).catch(function(){return Ne(Ee)});if(B)return new Promise(function(He,tt){B(Ee,function(It){He(new Uint8Array(It))},tt)})}return Promise.resolve().then(function(){return Ne(Ee)})}().then(function(He){return WebAssembly.instantiate(He,Se)}).then(Ve,function(He){z("failed to asynchronously prepare wasm: "+He),Y(He)})}if(P++,p.monitorRunDependencies&&p.monitorRunDependencies(P),p.instantiateWasm)try{return p.instantiateWasm(Se,Fe)}catch(Ve){return z("Module.instantiateWasm callback failed with error: "+Ve),!1}U||typeof WebAssembly.instantiateStreaming!="function"||ne(Ee)||Ie(Ee)||typeof fetch!="function"?De(he):fetch(Ee,{credentials:"same-origin"}).then(function(Ve){return WebAssembly.instantiateStreaming(Ve,Se).then(he,function(He){return z("wasm streaming compile failed: "+He),z("falling back to ArrayBuffer instantiation"),De(he)})})}(),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(ht=p._malloc=p.asm.f).apply(null,arguments)}),it=(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(it=p.stackAlloc=p.asm.n).apply(null,arguments)});function Ge(Se){this.name="ExitStatus",this.message="Program terminated with exit("+Se+")",this.status=Se}function Ft(Se){function Fe(){ze||(ze=!0,p.calledRun=!0,Q||(we(be),p.onRuntimeInitialized&&p.onRuntimeInitialized(),function(){if(p.postRun)for(typeof p.postRun=="function"&&(p.postRun=[p.postRun]);p.postRun.length;)he=p.postRun.shift(),se.unshift(he);var he;we(se)}()))}P>0||(function(){if(p.preRun)for(typeof p.preRun=="function"&&(p.preRun=[p.preRun]);p.preRun.length;)he=p.preRun.shift(),ae.unshift(he);var he;we(ae)}(),P>0||(p.setStatus?(p.setStatus("Running..."),setTimeout(function(){setTimeout(function(){p.setStatus("")},1),Fe()},1)):Fe()))}if(p.allocate=function(Se,Fe){var he;return he=Fe==1?it(Se.length):ht(Se.length),Se.subarray||Se.slice?ee.set(Se,he):ee.set(new Uint8Array(Se),he),he},p.UTF8ToString=function(Se,Fe){return Se?function(he,De,Ve){for(var He=De+Ve,tt=De;he[tt]&&!(tt>=He);)++tt;if(tt-De>16&&he.subarray&&X)return X.decode(he.subarray(De,tt));for(var It="";De<tt;){var Ot=he[De++];if(128&Ot){var Tt=63&he[De++];if((224&Ot)!=192){var Yt=63&he[De++];if((Ot=(240&Ot)==224?(15&Ot)<<12|Tt<<6|Yt:(7&Ot)<<18|Tt<<12|Yt<<6|63&he[De++])<65536)It+=String.fromCharCode(Ot);else{var M=Ot-65536;It+=String.fromCharCode(55296|M>>10,56320|1023&M)}}else It+=String.fromCharCode((31&Ot)<<6|Tt)}else It+=String.fromCharCode(Ot)}return It}(ee,Se,Fe):""},p.ALLOC_NORMAL=0,q=function Se(){ze||Ft(),ze||(q=Se)},p.run=Ft,p.preInit)for(typeof p.preInit=="function"&&(p.preInit=[p.preInit]);p.preInit.length>0;)p.preInit.pop()();Ft(),m.exports=p,p.unloadRuntime=function(){typeof self<"u"&&delete self.Module,p=O=W=te=ee=void 0,delete m.exports}},631:function(m,f,g){var A,p;(p=typeof(A=function(){const v=typeof self<"u"?self:this,I={Argon2d:0,Argon2i:1,Argon2id:2};function x(k){if(x._promise)return x._promise;if(x._module)return Promise.resolve(x._module);let F;return F=v.process&&v.process.versions&&v.process.versions.node?N().then(_=>new Promise(V=>{_.postRun=()=>V(_)})):(v.loadArgon2WasmBinary?v.loadArgon2WasmBinary():Promise.resolve(g(721)).then(_=>function(V){const U=atob(V),O=new Uint8Array(new ArrayBuffer(U.length));for(let z=0;z<U.length;z++)O[z]=U.charCodeAt(z);return O}(_))).then(_=>function(V,U){return new Promise(O=>(v.Module={wasmBinary:V,wasmMemory:U,postRun(){O(Module)}},N()))}(_,k?function(V){const Q=Math.min(Math.max(Math.ceil(V*1024/65536),256)+256,32767);return new WebAssembly.Memory({initial:Q,maximum:32767})}(k):void 0)),x._promise=F,F.then(_=>(x._module=_,delete x._promise,_))}function N(){return v.loadArgon2WasmModule?v.loadArgon2WasmModule():Promise.resolve(g(773))}function T(k,F){return k.allocate(F,"i8",k.ALLOC_NORMAL)}function L(k,F){return T(k,new Uint8Array([...F,0]))}function B(k){if(typeof k!="string")return k;if(typeof TextEncoder=="function")return new TextEncoder().encode(k);if(typeof Buffer=="function")return Buffer.from(k);throw new Error("Don't know how to encode UTF8")}return{ArgonType:I,hash:function(k){const F=k.mem||1024;return x(F).then(_=>{const V=k.time||1,U=k.parallelism||1,O=B(k.pass),z=L(_,O),Q=O.length,K=B(k.salt),te=L(_,K),ee=K.length,X=k.type||I.Argon2d,ue=_.allocate(new Array(k.hashLen||24),"i8",_.ALLOC_NORMAL),W=k.secret?T(_,k.secret):0,ae=k.secret?k.secret.byteLength:0,be=k.ad?T(_,k.ad):0,se=k.ad?k.ad.byteLength:0,P=k.hashLen||24,q=_._argon2_encodedlen(V,F,U,ee,P,X),Y=_.allocate(new Array(q+1),"i8",_.ALLOC_NORMAL);let ne,Ie,ce;try{Ie=_._argon2_hash_ext(V,F,U,z,Q,te,ee,ue,P,Y,q,X,W,ae,be,se,19)}catch(Ee){ne=Ee}if(Ie!==0||ne){try{ne||(ne=_.UTF8ToString(_._argon2_error_message(Ie)))}catch{}ce={message:ne,code:Ie}}else{let Ee="";const Ne=new Uint8Array(P);for(let we=0;we<P;we++){const Oe=_.HEAP8[ue+we];Ne[we]=Oe,Ee+=("0"+(255&Oe).toString(16)).slice(-2)}ce={hash:Ne,hashHex:Ee,encoded:_.UTF8ToString(Y)}}try{_._free(z),_._free(te),_._free(ue),_._free(Y),be&&_._free(be),W&&_._free(W)}catch{}if(ne)throw ce;return ce})},verify:function(k){return x().then(F=>{const _=B(k.pass),V=L(F,_),U=_.length,O=k.secret?T(F,k.secret):0,z=k.secret?k.secret.byteLength:0,Q=k.ad?T(F,k.ad):0,K=k.ad?k.ad.byteLength:0,te=L(F,B(k.encoded));let ee,X,ue,W=k.type;if(W===void 0){let ae=k.encoded.split("$")[1];ae&&(ae=ae.replace("a","A"),W=I[ae]||I.Argon2d)}try{X=F._argon2_verify_ext(te,V,U,O,z,Q,K,W)}catch(ae){ee=ae}if(X||ee){try{ee||(ee=F.UTF8ToString(F._argon2_error_message(X)))}catch{}ue={message:ee,code:X}}try{F._free(V),F._free(te)}catch{}if(ee)throw ue;return ue})},unloadRuntime:function(){x._module&&(x._module.unloadRuntime(),delete x._promise,delete x._module)}}})=="function"?A.apply(f,[]):A)===void 0||(m.exports=p)},721:function(m,f){m.exports=" "},145:()=>{},967:()=>{}},l={};function d(m){var f=l[m];if(f!==void 0)return f.exports;var g=l[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 A={};n=n||[null,i({}),i([]),i(i)];for(var p=2&f&&m;typeof p=="object"&&!~n.indexOf(p);p=i(p))Object.getOwnPropertyNames(p).forEach(v=>A[v]=()=>m[v]);return A.default=()=>m,d.d(g,A),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 LD=kD();const AI=is(LD);var Fv,Ov;const DD=(Ov=(Fv=globalThis.browser)==null?void 0:Fv.runtime)!=null&&Ov.id?globalThis.browser:globalThis.chrome,Mo=DD,hp="local:aliasvault_pin_enabled",pp="local:aliasvault_pin_encrypted_key",Ap="local:aliasvault_pin_salt",yp="local:aliasvault_pin_length",Lo="local:aliasvault_pin_failed_attempts",Uh=4;class mu extends Error{constructor(){super("PIN locked after too many failed attempts"),this.name="PinLockedError"}}class pc extends Error{constructor(){super("Invalid PIN format"),this.name="InvalidPinFormatError"}}class Mh extends Error{constructor(n){super(`Incorrect PIN. ${n} attempts remaining.`);qe(this,"attemptsRemaining");this.name="IncorrectPinError",this.attemptsRemaining=n}}async function yI(){try{return await Te.getItem(hp)===!0}catch{return!1}}async function RD(){try{return await Te.getItem(yp)||null}catch{return null}}function Ep(t){return/^\d{6,8}$/.test(t)}async function EI(){try{return await Te.getItem(Lo)||0}catch{return 0}}async function bI(){return await EI()>=Uh}async function BD(t,e){if(!Ep(t))throw new pc;try{const n=crypto.getRandomValues(new Uint8Array(16)),i=_h(n.buffer),s=await vI(n),l=await II(t,s),d=crypto.getRandomValues(new Uint8Array(12)),m=await crypto.subtle.encrypt({name:"AES-GCM",iv:d},l,new TextEncoder().encode(e)),f=new Uint8Array(d.length+m.byteLength);f.set(d,0),f.set(new Uint8Array(m),d.length);const g=_h(f.buffer);await Promise.all([Te.setItem(hp,!0),Te.setItem(pp,g),Te.setItem(Ap,i),Te.setItem(yp,t.length),Te.setItem(Lo,0)])}catch(n){throw n instanceof pc||console.error("[PinUnlockService] Failed to setup PIN:",n),n}}async function UD(t){if(!Ep(t))throw new pc;if(await bI())throw new mu;try{const[e,n]=await Promise.all([Te.getItem(pp),Te.getItem(Ap)]);if(!e||!n)throw new mu;const i=new Uint8Array(jE(e)),s=i.slice(0,12),l=i.slice(12),d=new Uint8Array(jE(n)),m=await vI(d),f=await II(t,m),g=await crypto.subtle.decrypt({name:"AES-GCM",iv:s},f,l),A=new TextDecoder().decode(g);return await Te.setItem(Lo,0),A}catch{const n=await EI()+1;throw await Te.setItem(Lo,n),n>=Uh?(await bp(),new mu):new Mh(Uh-n)}}async function bp(){try{await Promise.all([Te.removeItem(hp),Te.removeItem(pp),Te.removeItem(Ap),Te.removeItem(yp),Te.removeItem(Lo)])}catch(t){throw console.error("[PinUnlockService] Failed to disable PIN:",t),t}}async function OE(){try{await Te.setItem(Lo,0)}catch(t){console.error("[PinUnlockService] Failed to reset failed attempts:",t)}}async function MD(){const t=Mo.runtime.id,e=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",e);return new Uint8Array(n)}async function vI(t){const e=await MD(),n=new Uint8Array(t.length+e.length);return n.set(t,0),n.set(e,t.length),n}async function II(t,e){const n=_h(e.buffer),i=await AI.hash({pass:t,salt:n,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 _h(t){const e=new Uint8Array(t);let n="";for(let i=0;i<e.byteLength;i++)n+=String.fromCharCode(e[i]);return btoa(n)}function jE(t){const e=atob(t),n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n.buffer}const wI=b.createContext(void 0),_D=({children:t})=>{const[e,n]=b.useState(!1),[i,s]=b.useState(null),[l,d]=b.useState(null),m=ea(),f=b.useCallback(async()=>{const x=await Te.getItem("local:accessToken"),N=await Te.getItem("local:refreshToken"),T=await Te.getItem("local:username");return n(!0),x&&N&&T?(s(T),!0):!1},[s]),g=b.useCallback(async(x,N,T)=>{await Te.setItem("local:username",x),await Te.setItem("local:accessToken",N),await Te.setItem("local:refreshToken",T),await lt.setVaultLockedDismissUntil(0),s(x)},[]),A=b.useCallback(async x=>{await wt("CLEAR_SESSION",{},"background"),m==null||m.clearDatabase();try{await bp()}catch(N){console.error("Failed to remove PIN data:",N)}x&&d(x)},[m]),p=b.useCallback(async x=>{await A(x),await wt("CLEAR_VAULT_DATA",{},"background"),s(null)},[A]),v=b.useCallback(()=>{d(null)},[]),I=b.useMemo(()=>({isInitialized:e,username:i,initializeAuth:f,setAuthTokens:g,clearAuthUserInitiated:p,clearAuthForced:A,globalMessage:l,clearGlobalMessage:v}),[e,i,f,l,g,p,A,v]);return c.jsx(wI.Provider,{value:I,children:t})},Nc=()=>{const t=b.useContext(wI);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t};class FD{constructor(){qe(this,"listeners",new Set)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}emit(e){this.listeners.forEach(n=>{try{n(e)}catch(i){console.error("Error in logout listener:",i)}})}}const CI=new FD,gi=class gi{constructor(){}static isServerVersionSupported(e){return this.versionGreaterThanOrEqualTo(e,this.MIN_SERVER_VERSION)}static versionGreaterThanOrEqualTo(e,n){const[i,s]=e.split("-"),[l,d]=n.split("-"),m=i.split(".").map(Number),f=l.split(".").map(Number);for(let g=0;g<Math.max(m.length,f.length);g++){const A=m[g]??0,p=f[g]??0;if(A>p)return!0;if(A<p)return!1}return!s&&d?!0:s&&!d?!1:!s&&!d?!0:s>=d}};qe(gi,"VERSION","0.27.0"),qe(gi,"API_VERSION",gi.VERSION.split("-")[0]),qe(gi,"MIN_SERVER_VERSION","0.12.0-dev"),qe(gi,"CLIENT_NAME","edge"),qe(gi,"DEFAULT_CLIENT_URL","https://app.aliasvault.net"),qe(gi,"DEFAULT_API_URL","https://app.aliasvault.net/api");let gn=gi;class ns extends Error{constructor(e){super(e),this.name="ApiAuthError"}}class ic extends Error{constructor(e="Network error",n){super(e),this.name="NetworkError",this.cause=n,Object.setPrototypeOf(this,ic.prototype)}}class OD{async getBaseUrl(){return(await this.getApiUrl()).replace(/\/$/,"")+"/v1/"}async isSelfHosted(){return await this.getApiUrl()!==gn.DEFAULT_API_URL}async authFetch(e,n={},i=!0,s=!0){const l=new Headers(n.headers??{}),d=await this.getAccessToken();d&&l.set("Authorization",`Bearer ${d}`);const m={...n,headers:l};try{const f=await this.rawFetch(e,m);if(f.status===401){const g=await this.refreshAccessToken();if(g.token){l.set("Authorization",`Bearer ${g.token}`);const A=await this.rawFetch(e,{...m,headers:l});if(!A.ok)throw new ns("Request failed after token refresh");return i?A.json():A}else throw g.isAuthError?(CI.emit("common.errors.sessionExpired"),new ns("Session expired")):new ic("Token refresh failed due to network error")}if(!f.ok&&s)throw new Error(`HTTP error! status: ${f.status}`);return i?f.json():f}catch(f){throw console.error("API request failed:",f),f}}async rawFetch(e,n={}){const s=await this.getBaseUrl()+e,l=new Headers(n.headers??{});l.set("X-AliasVault-Client",`${gn.CLIENT_NAME}-${gn.API_VERSION}`);const d={...n,headers:l};try{return await fetch(s,d)}catch(m){throw console.error("API request failed:",m),new ic(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(n){throw console.error("Error downloading blob:",n),n}}async post(e,n,i=!0){return this.authFetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},i)}async put(e,n){return this.authFetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}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 revokeCurrentTokens(){try{const e=await this.getRefreshToken();e&&await this.post("Auth/revoke-token",{token:await this.getAccessToken(),refreshToken:e},!1)}catch(e){console.error("WebApi revoke current token error:",e)}}async getStatus(){try{return await this.get("Auth/status")}catch(e){if(e instanceof ns)throw e;return{clientVersionSupported:!0,serverVersion:"0.0.0",vaultRevision:0,srpSalt:""}}}validateStatusResponse(e){return e.clientVersionSupported?gn.isServerVersionSupported(e.serverVersion)?null:"serverVersionNotSupported":"clientVersionNotSupported"}async refreshAccessToken(){const e=await this.getRefreshToken();if(!e)return{token:null,isAuthError:!0};try{const n=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(n.ok){const i=await n.json();return this.updateTokens(i.token,i.refreshToken),{token:i.token,isAuthError:!1}}return n.status===401||n.status===403?{token:null,isAuthError:!0}:(console.warn(`Token refresh failed with status ${n.status}, treating as offline`),{token:null,isAuthError:!1})}catch(n){return n instanceof ic?(console.warn("Token refresh failed due to network error, treating as offline"),{token:null,isAuthError:!1}):(console.error("Unexpected error during token refresh:",n),{token:null,isAuthError:!0})}}async getAccessToken(){return await Te.getItem("local:accessToken")??null}async getRefreshToken(){return await Te.getItem("local:refreshToken")??null}async updateTokens(e,n){await Te.setItem("local:accessToken",e),await Te.setItem("local:refreshToken",n)}async getApiUrl(){const e=await Te.getItem("local:apiUrl");return!e||e.length===0?gn.DEFAULT_API_URL:e}}const SI=b.createContext(null),jD=({children:t})=>{const[e,n]=b.useState(null);return b.useEffect(()=>{const i=new OD;n(i)},[]),e?c.jsx(SI.Provider,{value:e,children:t}):null},Vr=()=>{const t=b.useContext(SI);if(!t)throw new Error("useWebApi must be used within a WebApiProvider");return t},NI=b.createContext(void 0),PD=({children:t})=>{const e=Nc(),n=Vr(),[i,s]=b.useState(!1),l=b.useRef(!1),{t:d}=nt(),m=b.useCallback(async p=>{if(!l.current)try{l.current=!0,await n.revokeTokens(),await e.clearAuthForced(p)}catch(v){console.error("Error during logout:",v)}finally{l.current=!1,s(!1)}},[e,n]),f=b.useCallback(async()=>{const p=await e.initializeAuth();return s(p),p},[e]),g=b.useCallback(async(p,v,I)=>{await e.setAuthTokens(p,v,I),s(!0)},[e]);b.useEffect(()=>CI.subscribe(async v=>{await m(d(v))}),[m,d]),b.useEffect(()=>{f()},[f]);const A=b.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 c.jsx(NI.Provider,{value:A,children:t})},Ir=()=>{const t=b.useContext(NI);if(t===void 0)throw new Error("useApp must be used within an AppProvider");return t};class Ua{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,n){const l=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"),n&&f.set("returnTo",n);const g=`popup.html?${f.toString()}#${m}`;window.open(g,"AliasVaultPopup",`width=800,height=1000,left=${l},top=${d},popup=true`),window.close()}}const HD=1e3,zD=()=>{const{t}=nt(),e=Ir(),n=ea(),[i,s]=b.useState(!1),[l,d]=b.useState(!1),m=b.useRef(null);b.useEffect(()=>{if(n.isSyncing)d(!0),m.current=Date.now();else if(m.current!==null){const g=Date.now()-m.current,A=HD-g;if(A>0){const p=setTimeout(()=>{d(!1),m.current=null},A);return()=>{clearTimeout(p)}}else d(!1),m.current=null}},[n.isSyncing]);const f=b.useCallback(async()=>{if(!i){s(!0),n.isDirty&&n.setIsUploading(!0);try{const g=await wt("FULL_VAULT_SYNC",{},"background");if(g.requiresLogout){const A=g.errorKey?t("common.errors."+g.errorKey):g.error;await e.logout(A);return}g.wasOffline?await n.setIsOffline(!0):n.isOffline&&await n.setIsOffline(!1),g.hasNewVault&&await n.loadStoredDatabase(),await n.refreshSyncState()}catch(g){console.error("Retry sync error:",g)}finally{s(!1),n.setIsUploading(!1)}}},[i,n,e,t]);return!e.isLoggedIn||!n.dbAvailable?null:n.isOffline?c.jsxs("button",{onClick:f,disabled:i,className:"flex items-center gap-1.5 px-2 py-1 bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-400 rounded-md text-xs font-medium cursor-pointer hover:opacity-80 active:opacity-60 transition-colors",title:t("sync.tapToRetry"),children:[c.jsx("div",{className:"relative",children:i?c.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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.jsxs(c.Fragment,{children:[c.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})}),n.isDirty&&c.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-2 h-2 bg-red-500 rounded-full"})]})}),c.jsx("span",{children:t("sync.offline")})]}):l?c.jsx("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 rounded-md text-xs font-medium",title:t("common.syncingVault"),children:c.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})})}):n.isUploading?c.jsx("div",{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:c.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})})}):n.isDirty?c.jsx("button",{onClick:f,disabled:i,className:"flex items-center gap-1.5 px-2 py-1 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400 rounded-md text-xs font-medium cursor-pointer hover:opacity-80 active:opacity-60 transition-colors",title:t("sync.tapToRetry"),children:i?c.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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.jsxs("div",{className:"relative",children:[c.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})}),c.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},xI=({routes:t=[],rightButtons:e})=>{const{t:n}=nt(),i=Ir(),s=Ha(),l=an(),[d]=Qu(),m=t==null?void 0:t.find(p=>{const v=p.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${v}$`).test(l.pathname)}),f=b.useCallback(()=>{const p=Ua.getReturnPath(),v=d.get("returnSearch");/^\/items\/[^/]+$/.test(l.pathname)&&v?s(`/items?search=${encodeURIComponent(v)}`):p&&Ua.isPopup()&&window.history.length<=2?s(p):s(-1)},[s,d,l.pathname]),g=()=>{s("/auth-settings")},A=()=>{l.pathname==="/upgrade"||l.pathname==="/login"||l.pathname==="/unlock"||(i.isLoggedIn?s("/items"):s("/"))};return c.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:c.jsxs("div",{className:"flex items-center h-16 px-4",children:[m!=null&&m.showBackButton?c.jsx("button",{id:"back",onClick:f,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:c.jsxs("div",{className:"flex items-center",children:[c.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:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),m.title&&c.jsx("h1",{className:"text-lg font-medium text-gray-900 dark:text-white ml-2",children:m.title})]})}):c.jsx("div",{className:"flex items-center",children:c.jsxs("button",{onClick:()=>A(),className:"flex items-center hover:opacity-80 transition-opacity",children:[c.jsx(fI,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),c.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),c.jsx("div",{className:"flex-grow"}),c.jsx(zD,{}),c.jsx("div",{className:"flex items-center gap-2",children:i.isLoggedIn?e:c.jsxs(c.Fragment,{children:[e,c.jsxs("button",{id:"settings",onClick:g,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:[c.jsx("span",{className:"sr-only",children:n("common.settings")}),c.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:c.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"})})]})]})})]})})},VD=({routes:t,headerButtons:e,message:n,children:i})=>{const s=b.useRef(null),l=an();return b.useEffect(()=>{s.current&&(s.current.scrollTop=0)},[l.pathname]),c.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[c.jsx(qx,{}),c.jsx(xI,{routes:t,rightButtons:e}),c.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:c.jsxs("div",{className:"px-4 pb-4 pt-2 mb-16",children:[n&&c.jsx("p",{className:"text-red-500 mb-4",children:n}),i||c.jsx(nI,{children:t.map(d=>c.jsx(cp,{path:d.path,element:d.element},d.path))})]})}),c.jsx(Wx,{})]})},QD=({children:t})=>c.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[c.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:c.jsxs("div",{className:"flex items-center justify-center h-16 px-4",children:[c.jsx(fI,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),c.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),c.jsx("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px"},children:c.jsx("div",{className:"p-4",children:t})})]}),ur=()=>{const t={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},e=c.jsxs(c.Fragment,{children:[c.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),c.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:t})]});return c.jsx("div",{className:"inline-flex items-center",children:e})},TI=b.createContext(void 0),KD=({children:t})=>{const[e,n]=b.useState(null),i=b.useCallback(l=>{n(l)},[]),s=b.useMemo(()=>({setHeaderButtons:i,headerButtons:e}),[i,e]);return c.jsx(TI.Provider,{value:s,children:t})},wr=()=>{const t=b.useContext(TI);if(t===void 0)throw new Error("useHeaderButtons must be used within a HeaderButtonsProvider");return t},GD=()=>{const{isLoading:t}=wa();if(!t)return null;const e={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},n=c.jsxs(c.Fragment,{children:[c.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),c.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:e})]});return c.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:c.jsx("div",{className:"relative",children:n})})},kI=b.createContext(void 0),qD=({children:t})=>{const[e,n]=b.useState(!0),[i,s]=b.useState(!1),[l,d]=b.useState(void 0),m=A=>{s(!0),d(A)},f=()=>{s(!1),d(void 0)},g=b.useMemo(()=>({isLoading:i,loadingMessage:l,showLoading:m,hideLoading:f,isInitialLoading:e,setIsInitialLoading:n}),[i,l,e]);return c.jsxs(kI.Provider,{value:g,children:[c.jsx(GD,{message:l}),t]})},wa=()=>{const t=b.useContext(kI);if(t===void 0)throw new Error("useLoading must be used within a LoadingProvider");return t},WD="session:lastVisitedPage",YD="session:lastVisitedTime",JD="session:navigationHistory",LI=b.createContext(void 0),XD=({children:t})=>{const e=an(),n=Ha(),{isInitialized:i,isLoggedIn:s}=Ir(),{dbInitialized:l,dbAvailable:d}=ea(),m=i&&l,f=m&&(!s||!d),g=b.useCallback(async()=>{if(m&&!f&&!["/","/reinitialize","/login","/unlock","/unlock-success","/auth-settings","/upgrade","/passkeys/create","/passkeys/authenticate"].includes(e.pathname)){const v=e.pathname.split("/").filter(Boolean),I=[];let x="";for(let N=0;N<v.length;N++)x+="/"+v[N],I.push({pathname:x,search:e.search,hash:e.hash});await Promise.all([Te.setItem(WD,e.pathname),Te.setItem(YD,Date.now()),Te.setItem(JD,I)])}},[e,m,f]);b.useEffect(()=>{m&&g()},[e.pathname,e.search,e.hash,m,g]),b.useEffect(()=>{m&&!s&&n("/login",{replace:!0})},[m,s]);const A=b.useMemo(()=>({storeCurrentPage:g,isFullyInitialized:m,requiresAuth:f}),[g,m,f]);return c.jsx(LI.Provider,{value:A,children:t})},$D=()=>{const t=b.useContext(LI);if(t===void 0)throw new Error("useNavigation must be used within a NavigationProvider");return t};var Tf,PE;function ZD(){if(PE)return Tf;PE=1;function t(L){this._maxSize=L,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(L){return this._values[L]},t.prototype.set=function(L,B){return this._size>=this._maxSize&&this.clear(),L in this._values||this._size++,this._values[L]=B};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,i=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,l=/^\s*(['"]?)(.*?)(\1)\s*$/,d=512,m=new t(d),f=new t(d),g=new t(d);Tf={Cache:t,split:p,normalizePath:A,setter:function(L){var B=A(L);return f.get(L)||f.set(L,function(F,_){for(var V=0,U=B.length,O=F;V<U-1;){var z=B[V];if(z==="__proto__"||z==="constructor"||z==="prototype")return F;O=O[B[V++]]}O[B[V]]=_})},getter:function(L,B){var k=A(L);return g.get(L)||g.set(L,function(_){for(var V=0,U=k.length;V<U;)if(_!=null||!B)_=_[k[V++]];else return;return _})},join:function(L){return L.reduce(function(B,k){return B+(I(k)||n.test(k)?"["+k+"]":(B?".":"")+k)},"")},forEach:function(L,B,k){v(Array.isArray(L)?L:p(L),B,k)}};function A(L){return m.get(L)||m.set(L,p(L).map(function(B){return B.replace(l,"$2")}))}function p(L){return L.match(e)||[""]}function v(L,B,k){var F=L.length,_,V,U,O;for(V=0;V<F;V++)_=L[V],_&&(T(_)&&(_='"'+_+'"'),O=I(_),U=!O&&/^\d+$/.test(_),B.call(k,_,O,U,V,L))}function I(L){return typeof L=="string"&&L&&["'",'"'].indexOf(L.charAt(0))!==-1}function x(L){return L.match(i)&&!L.match(n)}function N(L){return s.test(L)}function T(L){return!I(L)&&(x(L)||N(L))}return Tf}var Rs=ZD(),kf,HE;function eR(){if(HE)return kf;HE=1;const t=/[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=A=>A.match(t)||[],n=A=>A[0].toUpperCase()+A.slice(1),i=(A,p)=>e(A).join(p).toLowerCase(),s=A=>e(A).reduce((p,v)=>`${p}${p?v[0].toUpperCase()+v.slice(1).toLowerCase():v.toLowerCase()}`,"");return kf={words:e,upperFirst:n,camelCase:s,pascalCase:A=>n(s(A)),snakeCase:A=>i(A,"_"),kebabCase:A=>i(A,"-"),sentenceCase:A=>n(i(A," ")),titleCase:A=>e(A).map(n).join(" ")},kf}var Lf=eR(),Wd={exports:{}},zE;function tR(){if(zE)return Wd.exports;zE=1,Wd.exports=function(s){return t(e(s),s)},Wd.exports.array=t;function t(s,l){var d=s.length,m=new Array(d),f={},g=d,A=n(l),p=i(s);for(l.forEach(function(I){if(!p.has(I[0])||!p.has(I[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});g--;)f[g]||v(s[g],g,new Set);return m;function v(I,x,N){if(N.has(I)){var T;try{T=", node was:"+JSON.stringify(I)}catch{T=""}throw new Error("Cyclic dependency"+T)}if(!p.has(I))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(I));if(!f[x]){f[x]=!0;var L=A.get(I)||new Set;if(L=Array.from(L),x=L.length){N.add(I);do{var B=L[--x];v(B,p.get(B),N)}while(x);N.delete(I)}m[--d]=I}}}function e(s){for(var l=new Set,d=0,m=s.length;d<m;d++){var f=s[d];l.add(f[0]),l.add(f[1])}return Array.from(l)}function n(s){for(var l=new Map,d=0,m=s.length;d<m;d++){var f=s[d];l.has(f[0])||l.set(f[0],new Set),l.has(f[1])||l.set(f[1],new Set),l.get(f[0]).add(f[1])}return l}function i(s){for(var l=new Map,d=0,m=s.length;d<m;d++)l.set(s[d],d);return l}return Wd.exports}var aR=tR();const nR=is(aR),rR=Object.prototype.toString,iR=Error.prototype.toString,sR=RegExp.prototype.toString,oR=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",lR=/^Symbol\((.*)\)(.*)$/;function cR(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function VE(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const n=typeof t;if(n==="number")return cR(t);if(n==="string")return e?`"${t}"`:t;if(n==="function")return"[Function "+(t.name||"anonymous")+"]";if(n==="symbol")return oR.call(t).replace(lR,"Symbol($1)");const i=rR.call(t).slice(8,-1);return i==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):i==="Error"||t instanceof Error?"["+iR.call(t)+"]":i==="RegExp"?sR.call(t):null}function rs(t,e){let n=VE(t,e);return n!==null?n:JSON.stringify(t,function(i,s){let l=VE(this[i],e);return l!==null?l:s},2)}function DI(t){return t==null?[]:[].concat(t)}let RI,BI,UI,dR=/\$\{\s*(\w+)\s*\}/g;RI=Symbol.toStringTag;class QE{constructor(e,n,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[RI]="Error",this.name="ValidationError",this.value=n,this.path=i,this.type=s,this.errors=[],this.inner=[],DI(e).forEach(l=>{if(bn.isError(l)){this.errors.push(...l.errors);const d=l.inner.length?l.inner:[l];this.inner.push(...d)}else this.errors.push(l)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}BI=Symbol.hasInstance;UI=Symbol.toStringTag;class bn extends Error{static formatError(e,n){const i=n.label||n.path||"this";return n=Object.assign({},n,{path:i,originalPath:n.path}),typeof e=="string"?e.replace(dR,(s,l)=>rs(n[l])):typeof e=="function"?e(n):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,n,i,s,l){const d=new QE(e,n,i,s);if(l)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,bn)}static[BI](e){return QE[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let _r={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:t,type:e,value:n,originalValue:i})=>{const s=i!=null&&i!==n?` (cast from the value \`${rs(i,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${rs(n,!0)}\``+s:`${t} must match the configured type. The validated value was: \`${rs(n,!0)}\``+s}},Un={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"},uR={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"},Fh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},mR={isValue:"${path} field must be ${value}"},gu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},gR={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"},fR={notType:t=>{const{path:e,value:n,spec:i}=t,s=i.types.length;if(Array.isArray(n)){if(n.length<s)return`${e} tuple value has too few items, expected a length of ${s} but got ${n.length} for value: \`${rs(n,!0)}\``;if(n.length>s)return`${e} tuple value has too many items, expected a length of ${s} but got ${n.length} for value: \`${rs(n,!0)}\``}return bn.formatError(_r.notType,t)}};Object.assign(Object.create(null),{mixed:_r,string:Un,number:uR,date:Fh,object:gu,array:gR,boolean:mR,tuple:fR});const vp=t=>t&&t.__isYupSchema__;class Cu{static fromOptions(e,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:i,then:s,otherwise:l}=n,d=typeof i=="function"?i:(...m)=>m.every(f=>f===i);return new Cu(e,(m,f)=>{var g;let A=d(...m)?s:l;return(g=A==null?void 0:A(f))!=null?g:f})}constructor(e,n){this.fn=void 0,this.refs=e,this.refs=e,this.fn=n}resolve(e,n){let i=this.refs.map(l=>l.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),s=this.fn(i,e,n);if(s===void 0||s===e)return e;if(!vp(s))throw new TypeError("conditions must return a schema object");return s.resolve(n)}}const Yd={context:"$",value:"."};class Us{constructor(e,n={}){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]===Yd.context,this.isValue=this.key[0]===Yd.value,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?Yd.context:this.isValue?Yd.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&Rs.getter(this.path,!0),this.map=n.map}getValue(e,n,i){let s=this.isContext?i:this.isValue?e:n;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(e,n){return this.getValue(e,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Us.prototype.__isYupRef=!0;const Ls=t=>t==null;function yo(t){function e({value:n,path:i="",options:s,originalValue:l,schema:d},m,f){const{name:g,test:A,params:p,message:v,skipAbsent:I}=t;let{parent:x,context:N,abortEarly:T=d.spec.abortEarly,disableStackTrace:L=d.spec.disableStackTrace}=s;function B(K){return Us.isRef(K)?K.getValue(n,x,N):K}function k(K={}){const te=Object.assign({value:n,originalValue:l,label:d.spec.label,path:K.path||i,spec:d.spec,disableStackTrace:K.disableStackTrace||L},p,K.params);for(const X of Object.keys(te))te[X]=B(te[X]);const ee=new bn(bn.formatError(K.message||v,te),n,te.path,K.type||g,te.disableStackTrace);return ee.params=te,ee}const F=T?m:f;let _={path:i,parent:x,type:g,from:s.from,createError:k,resolve:B,options:s,originalValue:l,schema:d};const V=K=>{bn.isError(K)?F(K):K?f(null):F(k())},U=K=>{bn.isError(K)?F(K):m(K)};if(I&&Ls(n))return V(!0);let z;try{var Q;if(z=A.call(_,n,_),typeof((Q=z)==null?void 0:Q.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(z).then(V,U)}}catch(K){U(K);return}V(z)}return e.OPTIONS=t,e}function hR(t,e,n,i=n){let s,l,d;return e?(Rs.forEach(e,(m,f,g)=>{let A=f?m.slice(1,m.length-1):m;t=t.resolve({context:i,parent:s,value:n});let p=t.type==="tuple",v=g?parseInt(A,10):0;if(t.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(n&&v>=n.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=n,n=n&&n[v],t=p?t.spec.types[v]:t.innerType}if(!g){if(!t.fields||!t.fields[A])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${d} which is a type: "${t.type}")`);s=n,n=n&&n[A],t=t.fields[A]}l=A,d=f?"["+m+"]":"."+m}),{schema:t,parent:s,parentPath:l}):{parent:s,parentPath:e,schema:t}}class Su extends Set{describe(){const e=[];for(const n of this.values())e.push(Us.isRef(n)?n.describe():n);return e}resolveAll(e){let n=[];for(const i of this.values())n.push(e(i));return n}clone(){return new Su(this.values())}merge(e,n){const i=this.clone();return e.forEach(s=>i.add(s)),n.forEach(s=>i.delete(s)),i}}function Co(t,e=new Map){if(vp(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let n;if(t instanceof Date)n=new Date(t.getTime()),e.set(t,n);else if(t instanceof RegExp)n=new RegExp(t),e.set(t,n);else if(Array.isArray(t)){n=new Array(t.length),e.set(t,n);for(let i=0;i<t.length;i++)n[i]=Co(t[i],e)}else if(t instanceof Map){n=new Map,e.set(t,n);for(const[i,s]of t.entries())n.set(i,Co(s,e))}else if(t instanceof Set){n=new Set,e.set(t,n);for(const i of t)n.add(Co(i,e))}else if(t instanceof Object){n={},e.set(t,n);for(const[i,s]of Object.entries(t))n[i]=Co(s,e)}else throw Error(`Unable to clone ${t}`);return n}class Hr{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 Su,this._blacklist=new Su,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(_r.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(n=>{n.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Co(Object.assign({},this.spec,e)),n}label(e){let n=this.clone();return n.spec.label=e,n}meta(...e){if(e.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},e[0]),n}withMutation(e){let n=this._mutate;this._mutate=!0;let i=e(this);return this._mutate=n,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 n=this,i=e.clone();const s=Object.assign({},n.spec,i.spec);return i.spec=s,i.internalTests=Object.assign({},n.internalTests,i.internalTests),i._whitelist=n._whitelist.merge(e._whitelist,e._blacklist),i._blacklist=n._blacklist.merge(e._blacklist,e._whitelist),i.tests=n.tests,i.exclusiveTests=n.exclusiveTests,i.withMutation(l=>{e.tests.forEach(d=>{l.test(d.OPTIONS)})}),i.transforms=[...n.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 n=this;if(n.conditions.length){let i=n.conditions;n=n.clone(),n.conditions=[],n=i.reduce((s,l)=>l.resolve(s,e),n),n=n.resolve(e)}return n}resolveOptions(e){var n,i,s,l;return Object.assign({},e,{from:e.from||[],strict:(n=e.strict)!=null?n:this.spec.strict,abortEarly:(i=e.abortEarly)!=null?i:this.spec.abortEarly,recursive:(s=e.recursive)!=null?s:this.spec.recursive,disableStackTrace:(l=e.disableStackTrace)!=null?l:this.spec.disableStackTrace})}cast(e,n={}){let i=this.resolve(Object.assign({value:e},n)),s=n.assert==="ignore-optionality",l=i._cast(e,n);if(n.assert!==!1&&!i.isType(l)){if(s&&Ls(l))return l;let d=rs(e),m=rs(l);throw new TypeError(`The value of ${n.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 l}_cast(e,n){let i=e===void 0?e:this.transforms.reduce((s,l)=>l.call(this,s,e,this),e);return i===void 0&&(i=this.getDefault(n)),i}_validate(e,n={},i,s){let{path:l,originalValue:d=e,strict:m=this.spec.strict}=n,f=e;m||(f=this._cast(f,Object.assign({assert:!1},n)));let g=[];for(let A of Object.values(this.internalTests))A&&g.push(A);this.runTests({path:l,value:f,originalValue:d,options:n,tests:g},i,A=>{if(A.length)return s(A,f);this.runTests({path:l,value:f,originalValue:d,options:n,tests:this.tests},i,s)})}runTests(e,n,i){let s=!1,{tests:l,value:d,originalValue:m,path:f,options:g}=e,A=N=>{s||(s=!0,n(N,d))},p=N=>{s||(s=!0,i(N,d))},v=l.length,I=[];if(!v)return p([]);let x={value:d,originalValue:m,path:f,options:g,schema:this};for(let N=0;N<l.length;N++){const T=l[N];T(x,A,function(B){B&&(Array.isArray(B)?I.push(...B):I.push(B)),--v<=0&&p(I)})}}asNestedTest({key:e,index:n,parent:i,parentPath:s,originalParent:l,options:d}){const m=e??n;if(m==null)throw TypeError("Must include `key` or `index` for nested validations");const f=typeof m=="number";let g=i[m];const A=Object.assign({},d,{strict:!0,parent:i,value:g,originalValue:l[m],key:void 0,[f?"index":"key"]:m,path:f||m.includes(".")?`${s||""}[${f?m:`"${m}"`}]`:(s?`${s}.`:"")+e});return(p,v,I)=>this.resolve(A)._validate(g,A,v,I)}validate(e,n){var i;let s=this.resolve(Object.assign({},n,{value:e})),l=(i=n==null?void 0:n.disableStackTrace)!=null?i:s.spec.disableStackTrace;return new Promise((d,m)=>s._validate(e,n,(f,g)=>{bn.isError(f)&&(f.value=g),m(f)},(f,g)=>{f.length?m(new bn(f,g,void 0,void 0,l)):d(g)}))}validateSync(e,n){var i;let s=this.resolve(Object.assign({},n,{value:e})),l,d=(i=n==null?void 0:n.disableStackTrace)!=null?i:s.spec.disableStackTrace;return s._validate(e,Object.assign({},n,{sync:!0}),(m,f)=>{throw bn.isError(m)&&(m.value=f),m},(m,f)=>{if(m.length)throw new bn(m,e,void 0,void 0,d);l=f}),l}isValid(e,n){return this.validate(e,n).then(()=>!0,i=>{if(bn.isError(i))return!1;throw i})}isValidSync(e,n){try{return this.validateSync(e,n),!0}catch(i){if(bn.isError(i))return!1;throw i}}_getDefault(e){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,e):Co(n)}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,n){const i=this.clone({nullable:e});return i.internalTests.nullable=yo({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),i}optionality(e,n){const i=this.clone({optional:e});return i.internalTests.optionality=yo({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),i}optional(){return this.optionality(!0)}defined(e=_r.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=_r.notNull){return this.nullability(!1,e)}required(e=_r.required){return this.clone().withMutation(n=>n.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let n=this.clone();return n.transforms.push(e),n}test(...e){let n;if(e.length===1?typeof e[0]=="function"?n={test:e[0]}:n=e[0]:e.length===2?n={name:e[0],test:e[1]}:n={name:e[0],message:e[1],test:e[2]},n.message===void 0&&(n.message=_r.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),s=yo(n),l=n.exclusive||n.name&&i.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(i.exclusiveTests[n.name]=!!n.exclusive),i.tests=i.tests.filter(d=>!(d.OPTIONS.name===n.name&&(l||d.OPTIONS.test===s.OPTIONS.test))),i.tests.push(s),i}when(e,n){!Array.isArray(e)&&typeof e!="string"&&(n=e,e=".");let i=this.clone(),s=DI(e).map(l=>new Us(l));return s.forEach(l=>{l.isSibling&&i.deps.push(l.key)}),i.conditions.push(typeof n=="function"?new Cu(s,n):Cu.fromOptions(s,n)),i}typeError(e){let n=this.clone();return n.internalTests.typeError=yo({message:e,name:"typeError",skipAbsent:!0,test(i){return this.schema._typeCheck(i)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(e,n=_r.oneOf){let i=this.clone();return e.forEach(s=>{i._whitelist.add(s),i._blacklist.delete(s)}),i.internalTests.whiteList=yo({message:n,name:"oneOf",skipAbsent:!0,test(s){let l=this.schema._whitelist,d=l.resolveAll(this.resolve);return d.includes(s)?!0:this.createError({params:{values:Array.from(l).join(", "),resolved:d}})}}),i}notOneOf(e,n=_r.notOneOf){let i=this.clone();return e.forEach(s=>{i._blacklist.add(s),i._whitelist.delete(s)}),i.internalTests.blacklist=yo({message:n,name:"notOneOf",test(s){let l=this.schema._blacklist,d=l.resolveAll(this.resolve);return d.includes(s)?this.createError({params:{values:Array.from(l).join(", "),resolved:d}}):!0}}),i}strip(e=!0){let n=this.clone();return n.spec.strip=e,n}describe(e){const n=(e?this.resolve(e):this).clone(),{label:i,meta:s,optional:l,nullable:d}=n.spec;return{meta:s,label:i,optional:l,nullable:d,default:n.getDefault(e),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(f=>({name:f.OPTIONS.name,params:f.OPTIONS.params})).filter((f,g,A)=>A.findIndex(p=>p.name===f.name)===g)}}}Hr.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])Hr.prototype[`${t}At`]=function(e,n,i={}){const{parent:s,parentPath:l,schema:d}=hR(this,e,n,i.context);return d[t](s&&s[l],Object.assign({},i,{parent:s,path:e}))};for(const t of["equals","is"])Hr.prototype[t]=Hr.prototype.oneOf;for(const t of["not","nope"])Hr.prototype[t]=Hr.prototype.notOneOf;const pR=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function AR(t){const e=Oh(t);if(!e)return Date.parse?Date.parse(t):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 n=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(n=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(n=0-n)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+n,e.second,e.millisecond)}function Oh(t){var e,n;const i=pR.exec(t);return i?{year:ui(i[1]),month:ui(i[2],1)-1,day:ui(i[3],1),hour:ui(i[4]),minute:ui(i[5]),second:ui(i[6]),millisecond:i[7]?ui(i[7].substring(0,3)):0,precision:(e=(n=i[7])==null?void 0:n.length)!=null?e:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:ui(i[10]),minuteOffset:ui(i[11])}:null}function ui(t,e=0){return Number(t)||e}let yR=/^[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])?)*$/,ER=/^((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,bR=/^(?:[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,vR="^\\d{4}-\\d{2}-\\d{2}",IR="\\d{2}:\\d{2}:\\d{2}",wR="(([+-]\\d{2}(:?\\d{2})?)|Z)",CR=new RegExp(`${vR}T${IR}(\\.\\d+)?${wR}$`),SR=t=>Ls(t)||t===t.trim(),NR={}.toString();function jh(){return new MI}class MI extends Hr{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,n,i)=>{if(!i.spec.coerce||i.isType(e)||Array.isArray(e))return e;const s=e!=null&&e.toString?e.toString():e;return s===NR?e:s})})}required(e){return super.required(e).withMutation(n=>n.test({message:e||_r.required,name:"required",skipAbsent:!0,test:i=>!!i.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(n=>n.OPTIONS.name!=="required"),e))}length(e,n=Un.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(i){return i.length===this.resolve(e)}})}min(e,n=Un.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(i){return i.length>=this.resolve(e)}})}max(e,n=Un.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:e},skipAbsent:!0,test(i){return i.length<=this.resolve(e)}})}matches(e,n){let i=!1,s,l;return n&&(typeof n=="object"?{excludeEmptyString:i=!1,message:s,name:l}=n:s=n),this.test({name:l||"matches",message:s||Un.matches,params:{regex:e},skipAbsent:!0,test:d=>d===""&&i||d.search(e)!==-1})}email(e=Un.email){return this.matches(yR,{name:"email",message:e,excludeEmptyString:!0})}url(e=Un.url){return this.matches(ER,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Un.uuid){return this.matches(bR,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let n="",i,s;return e&&(typeof e=="object"?{message:n="",allowOffset:i=!1,precision:s=void 0}=e:n=e),this.matches(CR,{name:"datetime",message:n||Un.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Un.datetime_offset,params:{allowOffset:i},skipAbsent:!0,test:l=>{if(!l||i)return!0;const d=Oh(l);return d?!!d.z:!1}}).test({name:"datetime_precision",message:n||Un.datetime_precision,params:{precision:s},skipAbsent:!0,test:l=>{if(!l||s==null)return!0;const d=Oh(l);return d?d.precision===s:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Un.trim){return this.transform(n=>n!=null?n.trim():n).test({message:e,name:"trim",test:SR})}lowercase(e=Un.lowercase){return this.transform(n=>Ls(n)?n:n.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ls(n)||n===n.toLowerCase()})}uppercase(e=Un.uppercase){return this.transform(n=>Ls(n)?n:n.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ls(n)||n===n.toUpperCase()})}}jh.prototype=MI.prototype;let xR=new Date(""),TR=t=>Object.prototype.toString.call(t)==="[object Date]";class Ip extends Hr{constructor(){super({type:"date",check(e){return TR(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,n,i)=>!i.spec.coerce||i.isType(e)||e===null?e:(e=AR(e),isNaN(e)?Ip.INVALID_DATE:new Date(e)))})}prepareParam(e,n){let i;if(Us.isRef(e))i=e;else{let s=this.cast(e);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);i=s}return i}min(e,n=Fh.min){let i=this.prepareParam(e,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s>=this.resolve(i)}})}max(e,n=Fh.max){let i=this.prepareParam(e,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(s){return s<=this.resolve(i)}})}}Ip.INVALID_DATE=xR;function kR(t,e=[]){let n=[],i=new Set,s=new Set(e.map(([d,m])=>`${d}-${m}`));function l(d,m){let f=Rs.split(d)[0];i.add(f),s.has(`${m}-${f}`)||n.push([m,f])}for(const d of Object.keys(t)){let m=t[d];i.add(d),Us.isRef(m)&&m.isSibling?l(m.path,d):vp(m)&&"deps"in m&&m.deps.forEach(f=>l(f,d))}return nR.array(Array.from(i),n).reverse()}function KE(t,e){let n=1/0;return t.some((i,s)=>{var l;if((l=e.path)!=null&&l.includes(i))return n=s,!0}),n}function _I(t){return(e,n)=>KE(t,e)-KE(t,n)}const LR=(t,e,n)=>{if(typeof t!="string")return t;let i=t;try{i=JSON.parse(t)}catch{}return n.isType(i)?i:t};function fu(t){if("fields"in t){const e={};for(const[n,i]of Object.entries(t.fields))e[n]=fu(i);return t.setFields(e)}if(t.type==="array"){const e=t.optional();return e.innerType&&(e.innerType=fu(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(fu)}):"optional"in t?t.optional():t}const DR=(t,e)=>{const n=[...Rs.normalizePath(e)];if(n.length===1)return n[0]in t;let i=n.pop(),s=Rs.getter(Rs.join(n),!0)(t);return!!(s&&i in s)};let GE=t=>Object.prototype.toString.call(t)==="[object Object]";function qE(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter(i=>n.indexOf(i)===-1)}const RR=_I([]);function FI(t){return new OI(t)}class OI extends Hr{constructor(e){super({type:"object",check(n){return GE(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=RR,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,n={}){var i;let s=super._cast(e,n);if(s===void 0)return this.getDefault(n);if(!this._typeCheck(s))return s;let l=this.fields,d=(i=n.stripUnknown)!=null?i:this.spec.noUnknown,m=[].concat(this._nodes,Object.keys(s).filter(p=>!this._nodes.includes(p))),f={},g=Object.assign({},n,{parent:f,__validating:n.__validating||!1}),A=!1;for(const p of m){let v=l[p],I=p in s;if(v){let x,N=s[p];g.path=(n.path?`${n.path}.`:"")+p,v=v.resolve({value:N,context:n.context,parent:f});let T=v instanceof Hr?v.spec:void 0,L=T==null?void 0:T.strict;if(T!=null&&T.strip){A=A||p in s;continue}x=!n.__validating||!L?v.cast(s[p],g):s[p],x!==void 0&&(f[p]=x)}else I&&!d&&(f[p]=s[p]);(I!==p in f||f[p]!==s[p])&&(A=!0)}return A?f:s}_validate(e,n={},i,s){let{from:l=[],originalValue:d=e,recursive:m=this.spec.recursive}=n;n.from=[{schema:this,value:d},...l],n.__validating=!0,n.originalValue=d,super._validate(e,n,i,(f,g)=>{if(!m||!GE(g)){s(f,g);return}d=d||g;let A=[];for(let p of this._nodes){let v=this.fields[p];!v||Us.isRef(v)||A.push(v.asNestedTest({options:n,key:p,parent:g,parentPath:n.path,originalParent:d}))}this.runTests({tests:A,value:g,originalValue:d,options:n},i,p=>{s(p.sort(this._sortErrors).concat(f),g)})})}clone(e){const n=super.clone(e);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(e){let n=super.concat(e),i=n.fields;for(let[s,l]of Object.entries(this.fields)){const d=i[s];i[s]=d===void 0?l:d}return n.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 n={};return this._nodes.forEach(i=>{var s;const l=this.fields[i];let d=e;(s=d)!=null&&s.value&&(d=Object.assign({},d,{parent:d.value,value:d.value[i]})),n[i]=l&&"getDefault"in l?l.getDefault(d):void 0}),n}setFields(e,n){let i=this.clone();return i.fields=e,i._nodes=kR(e,n),i._sortErrors=_I(Object.keys(e)),n&&(i._excludedEdges=n),i}shape(e,n=[]){return this.clone().withMutation(i=>{let s=i._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),s=[...i._excludedEdges,...n]),i.setFields(Object.assign(i.fields,e),s)})}partial(){const e={};for(const[n,i]of Object.entries(this.fields))e[n]="optional"in i&&i.optional instanceof Function?i.optional():i;return this.setFields(e)}deepPartial(){return fu(this)}pick(e){const n={};for(const i of e)this.fields[i]&&(n[i]=this.fields[i]);return this.setFields(n,this._excludedEdges.filter(([i,s])=>e.includes(i)&&e.includes(s)))}omit(e){const n=[];for(const i of Object.keys(this.fields))e.includes(i)||n.push(i);return this.pick(n)}from(e,n,i){let s=Rs.getter(e,!0);return this.transform(l=>{if(!l)return l;let d=l;return DR(l,e)&&(d=Object.assign({},l),i||delete d[e],d[n]=s(l)),d})}json(){return this.transform(LR)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||gu.exact,test(n){if(n==null)return!0;const i=qE(this.schema,n);return i.length===0||this.createError({params:{properties:i.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,n=gu.noUnknown){typeof e!="boolean"&&(n=e,e=!0);let i=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const l=qE(this.schema,s);return!e||l.length===0||this.createError({params:{unknown:l.join(", ")}})}});return i.spec.noUnknown=e,i}unknown(e=!0,n=gu.noUnknown){return this.noUnknown(!e,n)}transformKeys(e){return this.transform(n=>{if(!n)return n;const i={};for(const s of Object.keys(n))i[e(s)]=n[s];return i})}camelCase(){return this.transformKeys(Lf.camelCase)}snakeCase(){return this.transformKeys(Lf.snakeCase)}constantCase(){return this.transformKeys(e=>Lf.snakeCase(e).toUpperCase())}describe(e){const n=(e?this.resolve(e):this).clone(),i=super.describe(e);i.fields={};for(const[l,d]of Object.entries(n.fields)){var s;let m=e;(s=m)!=null&&s.value&&(m=Object.assign({},m,{parent:m.value,value:m.value[l]})),i.fields[l]=d.describe(m)}return i}}FI.prototype=OI.prototype;const jI=({variant:t="dropdown",size:e="md"})=>{const{i18n:n}=nt(),[i,s]=b.useState(!1),l=b.useRef(null),d=fD(n.language)||ac[0];b.useEffect(()=>{const f=g=>{l.current&&!l.current.contains(g.target)&&s(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]);const m=async f=>{await n.changeLanguage(f),await Te.setItem("local:language",f),s(!1),n.emit("languageChanged",f)};return t==="buttons"?c.jsx("div",{className:"flex space-x-2",children:ac.map(f=>c.jsxs("button",{onClick:()=>m(f.code),className:`flex items-center space-x-1 px-2 py-1 text-xs rounded transition-colors ${n.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:[c.jsx("span",{className:"text-sm",children:f.flag}),c.jsx("span",{children:f.code.toUpperCase()})]},f.code))}):c.jsxs("div",{className:"relative",ref:l,children:[c.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:[c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("span",{className:"text-lg",children:d.flag}),c.jsx("span",{children:d.nativeName})]}),c.jsx("svg",{className:`w-4 h-4 transition-transform duration-200 ${i?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),i&&c.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:ac.map(f=>c.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:[c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("span",{className:"text-lg",children:f.flag}),c.jsx("span",{className:"text-gray-700 dark:text-gray-200",children:f.nativeName})]}),n.language===f.code&&c.jsx("svg",{className:"w-4 h-4 text-primary-500",fill:"currentColor",viewBox:"0 0 20 20",children:c.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))})]})},Df=[{label:"Aliasvault.net",value:gn.DEFAULT_API_URL},{label:"Self-hosted",value:"custom"}],BR=t=>FI().shape({apiUrl:jh().required(t("settings.validation.apiUrlRequired")).test("is-valid-api-url",t("settings.validation.apiUrlInvalid"),e=>{if(!e)return!0;try{const n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}),clientUrl:jh().required(t("settings.validation.clientUrlRequired")).test("is-valid-client-url",t("settings.validation.clientUrlInvalid"),e=>{if(!e)return!0;try{const n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}})}),UR=()=>{const{t}=nt(),[e,n]=b.useState(""),[i,s]=b.useState(""),[l,d]=b.useState(""),[m,f]=b.useState(!0),[g,A]=b.useState({}),{setIsInitialLoading:p}=wa(),v=BR(t),I=b.useRef(null),x=b.useRef(null),N=b.useRef(null),T=b.useRef(null);b.useEffect(()=>()=>{if(I.current&&clearTimeout(I.current),x.current&&clearTimeout(x.current),N.current!==null){const _=N.current;Te.setItem("local:apiUrl",_)}if(T.current!==null){const _=T.current;Te.setItem("local:clientUrl",_)}},[]),b.useEffect(()=>{(async()=>{const V=await Te.getItem("local:apiUrl"),U=await Te.getItem("local:clientUrl"),O=await lt.getGlobalAutofillPopupEnabled(),z=await lt.getVaultLockedDismissUntil();f(z?!1:O);const Q=Df.find(K=>K.value===V);Q?n(Q.value):V?(n("custom"),s(V),d(U??"")):n(Df[0].value),p(!1)})()},[p]);const L=async _=>{const V=_.target.value;n(V),V!=="custom"&&(await Te.setItem("local:apiUrl",""),await Te.setItem("local:clientUrl",""),s(""),d(""),A({}))},B=b.useCallback(_=>{const V=_.target.value;s(V),N.current=V,I.current&&clearTimeout(I.current),I.current=setTimeout(async()=>{try{await v.validateAt("apiUrl",{apiUrl:V}),A(U=>({...U,apiUrl:void 0})),await Te.setItem("local:apiUrl",V),N.current=null}catch(U){U instanceof bn&&(A(O=>({...O,apiUrl:U.message})),await Te.setItem("local:apiUrl",gn.DEFAULT_API_URL),await Te.setItem("local:clientUrl",gn.DEFAULT_CLIENT_URL),N.current=null)}},150)},[v]),k=b.useCallback(_=>{const V=_.target.value;d(V),T.current=V,x.current&&clearTimeout(x.current),x.current=setTimeout(async()=>{try{await v.validateAt("clientUrl",{clientUrl:V}),A(U=>({...U,clientUrl:void 0})),await Te.setItem("local:clientUrl",V),T.current=null}catch(U){U instanceof bn&&(A(O=>({...O,clientUrl:U.message})),T.current=null)}},150)},[v]),F=async()=>{const _=!m;await lt.setGlobalAutofillPopupEnabled(_),_&&(await lt.setDisabledSites([]),await lt.setVaultLockedDismissUntil(0)),f(_)};return c.jsxs("div",{className:"p-4 space-y-6",children:[c.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:t("settings.serverConfiguration","Server Configuration")}),c.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t("settings.serverConfigurationDescription","Configure the AliasVault server URL for self-hosted instances")})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"api-connection",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:t("settings.serverUrl")}),c.jsx("select",{id:"api-connection",value:e,onChange:L,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:Df.map(_=>c.jsx("option",{value:_.value,children:_.label},_.value))})]}),e==="custom"&&c.jsxs("div",{className:"space-y-4 pl-4 border-l-2 border-primary-500",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"custom-api-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:t("settings.customApiUrl","API URL")}),c.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&&c.jsx("p",{className:"mt-1 text-sm text-red-500",children:g.apiUrl}),c.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:t("settings.apiUrlHint","The API endpoint URL (usually client URL + /api)")})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"custom-client-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:t("settings.customClientUrl","Client URL")}),c.jsx("input",{id:"custom-client-url",type:"text",value:l,onChange:k,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&&c.jsx("p",{className:"mt-1 text-sm text-red-500",children:g.clientUrl}),c.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:t("settings.clientUrlHint","The web interface URL of your self-hosted instance")})]})]})]}),c.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:t("settings.autofillSettings","Autofill Settings")}),c.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t("settings.autofillSettingsDescription","Enable or disable the autofill popup on web pages")})]}),c.jsxs("div",{className:"flex items-center justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:t("settings.autofillEnabled")}),c.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:m?t("settings.autofillEnabledDescription","Autofill suggestions will appear on login forms"):t("settings.autofillDisabledDescription","Autofill suggestions are disabled globally")})]}),c.jsx("button",{onClick:F,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?t("common.enabled","Enabled"):t("common.disabled","Disabled")})]})]}),c.jsxs("div",{className:"space-y-4 pb-6",children:[c.jsx("div",{children:c.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:t("settings.languageSettings","Language")})}),c.jsx("div",{children:c.jsx(jI,{variant:"dropdown",size:"sm"})})]}),c.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:[t("settings.version"),": ",gn.VERSION]})]})},Sa=b.forwardRef(({onClick:t,id:e,children:n,type:i="button",variant:s="primary"},l)=>{const d={primary:"bg-primary-500 hover:bg-primary-600",secondary:"bg-gray-500 hover:bg-gray-600"};return c.jsx("button",{ref:l,className:`${d[s]} text-white font-medium rounded-lg px-4 py-2 text-sm w-full`,onClick:t,type:i,id:e,children:n})});Sa.displayName="Button";var Eo={},Rf,WE;function MR(){return WE||(WE=1,Rf=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Rf}var Bf={},Wi={},YE;function Ms(){if(YE)return Wi;YE=1;let t;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 Wi.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},Wi.getSymbolTotalCodewords=function(i){return e[i]},Wi.getBCHDigit=function(n){let i=0;for(;n!==0;)i++,n>>>=1;return i},Wi.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');t=i},Wi.isKanjiModeEnabled=function(){return typeof t<"u"},Wi.toSJIS=function(i){return t(i)},Wi}var Uf={},JE;function wp(){return JE||(JE=1,function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,s){if(t.isValid(i))return i;try{return e(i)}catch{return s}}}(Uf)),Uf}var Mf,XE;function _R(){if(XE)return Mf;XE=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let i=0;i<n;i++)this.putBit((e>>>n-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Mf=t,Mf}var _f,$E;function FR(){if($E)return _f;$E=1;function t(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 t.prototype.set=function(e,n,i,s){const l=e*this.size+n;this.data[l]=i,s&&(this.reservedBit[l]=!0)},t.prototype.get=function(e,n){return this.data[e*this.size+n]},t.prototype.xor=function(e,n,i){this.data[e*this.size+n]^=i},t.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},_f=t,_f}var Ff={},ZE;function OR(){return ZE||(ZE=1,function(t){const e=Ms().getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const s=Math.floor(i/7)+2,l=e(i),d=l===145?26:Math.ceil((l-13)/(2*s-2))*2,m=[l-7];for(let f=1;f<s-1;f++)m[f]=m[f-1]-d;return m.push(6),m.reverse()},t.getPositions=function(i){const s=[],l=t.getRowColCoords(i),d=l.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([l[m],l[f]]);return s}}(Ff)),Ff}var Of={},eb;function jR(){if(eb)return Of;eb=1;const t=Ms().getSymbolSize,e=7;return Of.getPositions=function(i){const s=t(i);return[[0,0],[s-e,0],[0,s-e]]},Of}var jf={},tb;function PR(){return tb||(tb=1,function(t){t.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};t.isValid=function(s){return s!=null&&s!==""&&!isNaN(s)&&s>=0&&s<=7},t.from=function(s){return t.isValid(s)?parseInt(s,10):void 0},t.getPenaltyN1=function(s){const l=s.size;let d=0,m=0,f=0,g=null,A=null;for(let p=0;p<l;p++){m=f=0,g=A=null;for(let v=0;v<l;v++){let I=s.get(p,v);I===g?m++:(m>=5&&(d+=e.N1+(m-5)),g=I,m=1),I=s.get(v,p),I===A?f++:(f>=5&&(d+=e.N1+(f-5)),A=I,f=1)}m>=5&&(d+=e.N1+(m-5)),f>=5&&(d+=e.N1+(f-5))}return d},t.getPenaltyN2=function(s){const l=s.size;let d=0;for(let m=0;m<l-1;m++)for(let f=0;f<l-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},t.getPenaltyN3=function(s){const l=s.size;let d=0,m=0,f=0;for(let g=0;g<l;g++){m=f=0;for(let A=0;A<l;A++)m=m<<1&2047|s.get(g,A),A>=10&&(m===1488||m===93)&&d++,f=f<<1&2047|s.get(A,g),A>=10&&(f===1488||f===93)&&d++}return d*e.N3},t.getPenaltyN4=function(s){let l=0;const d=s.data.length;for(let f=0;f<d;f++)l+=s.data[f];return Math.abs(Math.ceil(l*100/d/5)-10)*e.N4};function n(i,s,l){switch(i){case t.Patterns.PATTERN000:return(s+l)%2===0;case t.Patterns.PATTERN001:return s%2===0;case t.Patterns.PATTERN010:return l%3===0;case t.Patterns.PATTERN011:return(s+l)%3===0;case t.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(l/3))%2===0;case t.Patterns.PATTERN101:return s*l%2+s*l%3===0;case t.Patterns.PATTERN110:return(s*l%2+s*l%3)%2===0;case t.Patterns.PATTERN111:return(s*l%3+(s+l)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}t.applyMask=function(s,l){const d=l.size;for(let m=0;m<d;m++)for(let f=0;f<d;f++)l.isReserved(f,m)||l.xor(f,m,n(s,f,m))},t.getBestMask=function(s,l){const d=Object.keys(t.Patterns).length;let m=0,f=1/0;for(let g=0;g<d;g++){l(g),t.applyMask(g,s);const A=t.getPenaltyN1(s)+t.getPenaltyN2(s)+t.getPenaltyN3(s)+t.getPenaltyN4(s);t.applyMask(g,s),A<f&&(f=A,m=g)}return m}}(jf)),jf}var Jd={},ab;function PI(){if(ab)return Jd;ab=1;const t=wp(),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],n=[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 Jd.getBlocksCount=function(s,l){switch(l){case t.L:return e[(s-1)*4+0];case t.M:return e[(s-1)*4+1];case t.Q:return e[(s-1)*4+2];case t.H:return e[(s-1)*4+3];default:return}},Jd.getTotalCodewordsCount=function(s,l){switch(l){case t.L:return n[(s-1)*4+0];case t.M:return n[(s-1)*4+1];case t.Q:return n[(s-1)*4+2];case t.H:return n[(s-1)*4+3];default:return}},Jd}var Pf={},Pl={},nb;function HR(){if(nb)return Pl;nb=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let i=1;for(let s=0;s<255;s++)t[s]=i,e[i]=s,i<<=1,i&256&&(i^=285);for(let s=255;s<512;s++)t[s]=t[s-255]}(),Pl.log=function(i){if(i<1)throw new Error("log("+i+")");return e[i]},Pl.exp=function(i){return t[i]},Pl.mul=function(i,s){return i===0||s===0?0:t[e[i]+e[s]]},Pl}var rb;function zR(){return rb||(rb=1,function(t){const e=HR();t.mul=function(i,s){const l=new Uint8Array(i.length+s.length-1);for(let d=0;d<i.length;d++)for(let m=0;m<s.length;m++)l[d+m]^=e.mul(i[d],s[m]);return l},t.mod=function(i,s){let l=new Uint8Array(i);for(;l.length-s.length>=0;){const d=l[0];for(let f=0;f<s.length;f++)l[f]^=e.mul(s[f],d);let m=0;for(;m<l.length&&l[m]===0;)m++;l=l.slice(m)}return l},t.generateECPolynomial=function(i){let s=new Uint8Array([1]);for(let l=0;l<i;l++)s=t.mul(s,new Uint8Array([1,e.exp(l)]));return s}}(Pf)),Pf}var Hf,ib;function VR(){if(ib)return Hf;ib=1;const t=zR();function e(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(i){this.degree=i,this.genPoly=t.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 l=t.mod(s,this.genPoly),d=this.degree-l.length;if(d>0){const m=new Uint8Array(this.degree);return m.set(l,d),m}return l},Hf=e,Hf}var zf={},Vf={},Qf={},sb;function HI(){return sb||(sb=1,Qf.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Qf}var Rr={},ob;function zI(){if(ob)return Rr;ob=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
]))+`;Rr.KANJI=new RegExp(n,"g"),Rr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Rr.BYTE=new RegExp(i,"g"),Rr.NUMERIC=new RegExp(t,"g"),Rr.ALPHANUMERIC=new RegExp(e,"g");const s=new RegExp("^"+n+"$"),l=new RegExp("^"+t+"$"),d=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Rr.testKanji=function(f){return s.test(f)},Rr.testNumeric=function(f){return l.test(f)},Rr.testAlphanumeric=function(f){return d.test(f)},Rr}var lb;function _s(){return lb||(lb=1,function(t){const e=HI(),n=zI();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(l,d){if(!l.ccBits)throw new Error("Invalid mode: "+l);if(!e.isValid(d))throw new Error("Invalid version: "+d);return d>=1&&d<10?l.ccBits[0]:d<27?l.ccBits[1]:l.ccBits[2]},t.getBestModeForData=function(l){return n.testNumeric(l)?t.NUMERIC:n.testAlphanumeric(l)?t.ALPHANUMERIC:n.testKanji(l)?t.KANJI:t.BYTE},t.toString=function(l){if(l&&l.id)return l.id;throw new Error("Invalid mode")},t.isValid=function(l){return l&&l.bit&&l.ccBits};function i(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+s)}}t.from=function(l,d){if(t.isValid(l))return l;try{return i(l)}catch{return d}}}(Vf)),Vf}var cb;function QR(){return cb||(cb=1,function(t){const e=Ms(),n=PI(),i=wp(),s=_s(),l=HI(),d=7973,m=e.getBCHDigit(d);function f(v,I,x){for(let N=1;N<=40;N++)if(I<=t.getCapacity(N,x,v))return N}function g(v,I){return s.getCharCountIndicator(v,I)+4}function A(v,I){let x=0;return v.forEach(function(N){const T=g(N.mode,I);x+=T+N.getBitsLength()}),x}function p(v,I){for(let x=1;x<=40;x++)if(A(v,x)<=t.getCapacity(x,I,s.MIXED))return x}t.from=function(I,x){return l.isValid(I)?parseInt(I,10):x},t.getCapacity=function(I,x,N){if(!l.isValid(I))throw new Error("Invalid QR Code version");typeof N>"u"&&(N=s.BYTE);const T=e.getSymbolTotalCodewords(I),L=n.getTotalCodewordsCount(I,x),B=(T-L)*8;if(N===s.MIXED)return B;const k=B-g(N,I);switch(N){case s.NUMERIC:return Math.floor(k/10*3);case s.ALPHANUMERIC:return Math.floor(k/11*2);case s.KANJI:return Math.floor(k/13);case s.BYTE:default:return Math.floor(k/8)}},t.getBestVersionForData=function(I,x){let N;const T=i.from(x,i.M);if(Array.isArray(I)){if(I.length>1)return p(I,T);if(I.length===0)return 1;N=I[0]}else N=I;return f(N.mode,N.getLength(),T)},t.getEncodedBits=function(I){if(!l.isValid(I)||I<7)throw new Error("Invalid QR Code version");let x=I<<12;for(;e.getBCHDigit(x)-m>=0;)x^=d<<e.getBCHDigit(x)-m;return I<<12|x}}(zf)),zf}var Kf={},db;function KR(){if(db)return Kf;db=1;const t=Ms(),e=1335,n=21522,i=t.getBCHDigit(e);return Kf.getEncodedBits=function(l,d){const m=l.bit<<3|d;let f=m<<10;for(;t.getBCHDigit(f)-i>=0;)f^=e<<t.getBCHDigit(f)-i;return(m<<10|f)^n},Kf}var Gf={},qf,ub;function GR(){if(ub)return qf;ub=1;const t=_s();function e(n){this.mode=t.NUMERIC,this.data=n.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,l,d;for(s=0;s+3<=this.data.length;s+=3)l=this.data.substr(s,3),d=parseInt(l,10),i.put(d,10);const m=this.data.length-s;m>0&&(l=this.data.substr(s),d=parseInt(l,10),i.put(d,m*3+1))},qf=e,qf}var Wf,mb;function qR(){if(mb)return Wf;mb=1;const t=_s(),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 n(i){this.mode=t.ALPHANUMERIC,this.data=i}return n.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(s){let l;for(l=0;l+2<=this.data.length;l+=2){let d=e.indexOf(this.data[l])*45;d+=e.indexOf(this.data[l+1]),s.put(d,11)}this.data.length%2&&s.put(e.indexOf(this.data[l]),6)},Wf=n,Wf}var Yf,gb;function WR(){if(gb)return Yf;gb=1;const t=_s();function e(n){this.mode=t.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}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(n){for(let i=0,s=this.data.length;i<s;i++)n.put(this.data[i],8)},Yf=e,Yf}var Jf,fb;function YR(){if(fb)return Jf;fb=1;const t=_s(),e=Ms();function n(i){this.mode=t.KANJI,this.data=i}return n.getBitsLength=function(s){return s*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(i){let s;for(s=0;s<this.data.length;s++){let l=e.toSJIS(this.data[s]);if(l>=33088&&l<=40956)l-=33088;else if(l>=57408&&l<=60351)l-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+`
Make sure your charset is UTF-8`);l=(l>>>8&255)*192+(l&255),i.put(l,13)}},Jf=n,Jf}var Xf={exports:{}},hb;function JR(){return hb||(hb=1,function(t){var e={single_source_shortest_paths:function(n,i,s){var l={},d={};d[i]=0;var m=e.PriorityQueue.make();m.push(i,0);for(var f,g,A,p,v,I,x,N,T;!m.empty();){f=m.pop(),g=f.value,p=f.cost,v=n[g]||{};for(A in v)v.hasOwnProperty(A)&&(I=v[A],x=p+I,N=d[A],T=typeof d[A]>"u",(T||N>x)&&(d[A]=x,m.push(A,x),l[A]=g))}if(typeof s<"u"&&typeof d[s]>"u"){var L=["Could not find a path from ",i," to ",s,"."].join("");throw new Error(L)}return l},extract_shortest_path_from_predecessor_list:function(n,i){for(var s=[],l=i;l;)s.push(l),n[l],l=n[l];return s.reverse(),s},find_path:function(n,i,s){var l=e.single_source_shortest_paths(n,i,s);return e.extract_shortest_path_from_predecessor_list(l,s)},PriorityQueue:{make:function(n){var i=e.PriorityQueue,s={},l;n=n||{};for(l in i)i.hasOwnProperty(l)&&(s[l]=i[l]);return s.queue=[],s.sorter=n.sorter||i.default_sorter,s},default_sorter:function(n,i){return n.cost-i.cost},push:function(n,i){var s={value:n,cost:i};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e}(Xf)),Xf.exports}var pb;function XR(){return pb||(pb=1,function(t){const e=_s(),n=GR(),i=qR(),s=WR(),l=YR(),d=zI(),m=Ms(),f=JR();function g(L){return unescape(encodeURIComponent(L)).length}function A(L,B,k){const F=[];let _;for(;(_=L.exec(k))!==null;)F.push({data:_[0],index:_.index,mode:B,length:_[0].length});return F}function p(L){const B=A(d.NUMERIC,e.NUMERIC,L),k=A(d.ALPHANUMERIC,e.ALPHANUMERIC,L);let F,_;return m.isKanjiModeEnabled()?(F=A(d.BYTE,e.BYTE,L),_=A(d.KANJI,e.KANJI,L)):(F=A(d.BYTE_KANJI,e.BYTE,L),_=[]),B.concat(k,F,_).sort(function(U,O){return U.index-O.index}).map(function(U){return{data:U.data,mode:U.mode,length:U.length}})}function v(L,B){switch(B){case e.NUMERIC:return n.getBitsLength(L);case e.ALPHANUMERIC:return i.getBitsLength(L);case e.KANJI:return l.getBitsLength(L);case e.BYTE:return s.getBitsLength(L)}}function I(L){return L.reduce(function(B,k){const F=B.length-1>=0?B[B.length-1]:null;return F&&F.mode===k.mode?(B[B.length-1].data+=k.data,B):(B.push(k),B)},[])}function x(L){const B=[];for(let k=0;k<L.length;k++){const F=L[k];switch(F.mode){case e.NUMERIC:B.push([F,{data:F.data,mode:e.ALPHANUMERIC,length:F.length},{data:F.data,mode:e.BYTE,length:F.length}]);break;case e.ALPHANUMERIC:B.push([F,{data:F.data,mode:e.BYTE,length:F.length}]);break;case e.KANJI:B.push([F,{data:F.data,mode:e.BYTE,length:g(F.data)}]);break;case e.BYTE:B.push([{data:F.data,mode:e.BYTE,length:g(F.data)}])}}return B}function N(L,B){const k={},F={start:{}};let _=["start"];for(let V=0;V<L.length;V++){const U=L[V],O=[];for(let z=0;z<U.length;z++){const Q=U[z],K=""+V+z;O.push(K),k[K]={node:Q,lastCount:0},F[K]={};for(let te=0;te<_.length;te++){const ee=_[te];k[ee]&&k[ee].node.mode===Q.mode?(F[ee][K]=v(k[ee].lastCount+Q.length,Q.mode)-v(k[ee].lastCount,Q.mode),k[ee].lastCount+=Q.length):(k[ee]&&(k[ee].lastCount=Q.length),F[ee][K]=v(Q.length,Q.mode)+4+e.getCharCountIndicator(Q.mode,B))}}_=O}for(let V=0;V<_.length;V++)F[_[V]].end=0;return{map:F,table:k}}function T(L,B){let k;const F=e.getBestModeForData(L);if(k=e.from(B,F),k!==e.BYTE&&k.bit<F.bit)throw new Error('"'+L+'" cannot be encoded with mode '+e.toString(k)+`.
 Suggested mode is: `+e.toString(F));switch(k===e.KANJI&&!m.isKanjiModeEnabled()&&(k=e.BYTE),k){case e.NUMERIC:return new n(L);case e.ALPHANUMERIC:return new i(L);case e.KANJI:return new l(L);case e.BYTE:return new s(L)}}t.fromArray=function(B){return B.reduce(function(k,F){return typeof F=="string"?k.push(T(F,null)):F.data&&k.push(T(F.data,F.mode)),k},[])},t.fromString=function(B,k){const F=p(B,m.isKanjiModeEnabled()),_=x(F),V=N(_,k),U=f.find_path(V.map,"start","end"),O=[];for(let z=1;z<U.length-1;z++)O.push(V.table[U[z]].node);return t.fromArray(I(O))},t.rawSplit=function(B){return t.fromArray(p(B,m.isKanjiModeEnabled()))}}(Gf)),Gf}var Ab;function $R(){if(Ab)return Bf;Ab=1;const t=Ms(),e=wp(),n=_R(),i=FR(),s=OR(),l=jR(),d=PR(),m=PI(),f=VR(),g=QR(),A=KR(),p=_s(),v=XR();function I(V,U){const O=V.size,z=l.getPositions(U);for(let Q=0;Q<z.length;Q++){const K=z[Q][0],te=z[Q][1];for(let ee=-1;ee<=7;ee++)if(!(K+ee<=-1||O<=K+ee))for(let X=-1;X<=7;X++)te+X<=-1||O<=te+X||(ee>=0&&ee<=6&&(X===0||X===6)||X>=0&&X<=6&&(ee===0||ee===6)||ee>=2&&ee<=4&&X>=2&&X<=4?V.set(K+ee,te+X,!0,!0):V.set(K+ee,te+X,!1,!0))}}function x(V){const U=V.size;for(let O=8;O<U-8;O++){const z=O%2===0;V.set(O,6,z,!0),V.set(6,O,z,!0)}}function N(V,U){const O=s.getPositions(U);for(let z=0;z<O.length;z++){const Q=O[z][0],K=O[z][1];for(let te=-2;te<=2;te++)for(let ee=-2;ee<=2;ee++)te===-2||te===2||ee===-2||ee===2||te===0&&ee===0?V.set(Q+te,K+ee,!0,!0):V.set(Q+te,K+ee,!1,!0)}}function T(V,U){const O=V.size,z=g.getEncodedBits(U);let Q,K,te;for(let ee=0;ee<18;ee++)Q=Math.floor(ee/3),K=ee%3+O-8-3,te=(z>>ee&1)===1,V.set(Q,K,te,!0),V.set(K,Q,te,!0)}function L(V,U,O){const z=V.size,Q=A.getEncodedBits(U,O);let K,te;for(K=0;K<15;K++)te=(Q>>K&1)===1,K<6?V.set(K,8,te,!0):K<8?V.set(K+1,8,te,!0):V.set(z-15+K,8,te,!0),K<8?V.set(8,z-K-1,te,!0):K<9?V.set(8,15-K-1+1,te,!0):V.set(8,15-K-1,te,!0);V.set(z-8,8,1,!0)}function B(V,U){const O=V.size;let z=-1,Q=O-1,K=7,te=0;for(let ee=O-1;ee>0;ee-=2)for(ee===6&&ee--;;){for(let X=0;X<2;X++)if(!V.isReserved(Q,ee-X)){let ue=!1;te<U.length&&(ue=(U[te]>>>K&1)===1),V.set(Q,ee-X,ue),K--,K===-1&&(te++,K=7)}if(Q+=z,Q<0||O<=Q){Q-=z,z=-z;break}}}function k(V,U,O){const z=new n;O.forEach(function(X){z.put(X.mode.bit,4),z.put(X.getLength(),p.getCharCountIndicator(X.mode,V)),X.write(z)});const Q=t.getSymbolTotalCodewords(V),K=m.getTotalCodewordsCount(V,U),te=(Q-K)*8;for(z.getLengthInBits()+4<=te&&z.put(0,4);z.getLengthInBits()%8!==0;)z.putBit(0);const ee=(te-z.getLengthInBits())/8;for(let X=0;X<ee;X++)z.put(X%2?17:236,8);return F(z,V,U)}function F(V,U,O){const z=t.getSymbolTotalCodewords(U),Q=m.getTotalCodewordsCount(U,O),K=z-Q,te=m.getBlocksCount(U,O),ee=z%te,X=te-ee,ue=Math.floor(z/te),W=Math.floor(K/te),ae=W+1,be=ue-W,se=new f(be);let P=0;const q=new Array(te),Y=new Array(te);let ne=0;const Ie=new Uint8Array(V.buffer);for(let Oe=0;Oe<te;Oe++){const ze=Oe<X?W:ae;q[Oe]=Ie.slice(P,P+ze),Y[Oe]=se.encode(q[Oe]),P+=ze,ne=Math.max(ne,ze)}const ce=new Uint8Array(z);let Ee=0,Ne,we;for(Ne=0;Ne<ne;Ne++)for(we=0;we<te;we++)Ne<q[we].length&&(ce[Ee++]=q[we][Ne]);for(Ne=0;Ne<be;Ne++)for(we=0;we<te;we++)ce[Ee++]=Y[we][Ne];return ce}function _(V,U,O,z){let Q;if(Array.isArray(V))Q=v.fromArray(V);else if(typeof V=="string"){let ue=U;if(!ue){const W=v.rawSplit(V);ue=g.getBestVersionForData(W,O)}Q=v.fromString(V,ue||40)}else throw new Error("Invalid data");const K=g.getBestVersionForData(Q,O);if(!K)throw new Error("The amount of data is too big to be stored in a QR Code");if(!U)U=K;else if(U<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 te=k(U,O,Q),ee=t.getSymbolSize(U),X=new i(ee);return I(X,U),x(X),N(X,U),L(X,O,0),U>=7&&T(X,U),B(X,te),isNaN(z)&&(z=d.getBestMask(X,L.bind(null,X,O))),d.applyMask(z,X),L(X,O,z),{modules:X,version:U,errorCorrectionLevel:O,maskPattern:z,segments:Q}}return Bf.create=function(U,O){if(typeof U>"u"||U==="")throw new Error("No input text");let z=e.M,Q,K;return typeof O<"u"&&(z=e.from(O.errorCorrectionLevel,e.M),Q=g.from(O.version),K=d.from(O.maskPattern),O.toSJISFunc&&t.setToSJISFunction(O.toSJISFunc)),_(U,Q,z,K)},Bf}var $f={},Zf={},yb;function VI(){return yb||(yb=1,function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(l){return[l,l]}))),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("")}}t.getOptions=function(i){i||(i={}),i.color||(i.color={});const s=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,l=i.width&&i.width>=21?i.width:void 0,d=i.scale||4;return{width:l,scale:l?4:d,margin:s,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},t.getScale=function(i,s){return s.width&&s.width>=i+s.margin*2?s.width/(i+s.margin*2):s.scale},t.getImageWidth=function(i,s){const l=t.getScale(i,s);return Math.floor((i+s.margin*2)*l)},t.qrToImageData=function(i,s,l){const d=s.modules.size,m=s.modules.data,f=t.getScale(d,l),g=Math.floor((d+l.margin*2)*f),A=l.margin*f,p=[l.color.light,l.color.dark];for(let v=0;v<g;v++)for(let I=0;I<g;I++){let x=(v*g+I)*4,N=l.color.light;if(v>=A&&I>=A&&v<g-A&&I<g-A){const T=Math.floor((v-A)/f),L=Math.floor((I-A)/f);N=p[m[T*d+L]?1:0]}i[x++]=N.r,i[x++]=N.g,i[x++]=N.b,i[x]=N.a}}}(Zf)),Zf}var Eb;function ZR(){return Eb||(Eb=1,function(t){const e=VI();function n(s,l,d){s.clearRect(0,0,l.width,l.height),l.style||(l.style={}),l.height=d,l.width=d,l.style.height=d+"px",l.style.width=d+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(l,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 A=e.getImageWidth(l.modules.size,f),p=g.getContext("2d"),v=p.createImageData(A,A);return e.qrToImageData(v.data,l,f),n(p,g,A),p.putImageData(v,0,0),g},t.renderToDataURL=function(l,d,m){let f=m;typeof f>"u"&&(!d||!d.getContext)&&(f=d,d=void 0),f||(f={});const g=t.render(l,d,f),A=f.type||"image/png",p=f.rendererOpts||{};return g.toDataURL(A,p.quality)}}($f)),$f}var eh={},bb;function eB(){if(bb)return eh;bb=1;const t=VI();function e(s,l){const d=s.a/255,m=l+'="'+s.hex+'"';return d<1?m+" "+l+'-opacity="'+d.toFixed(2).slice(1)+'"':m}function n(s,l,d){let m=s+l;return typeof d<"u"&&(m+=" "+d),m}function i(s,l,d){let m="",f=0,g=!1,A=0;for(let p=0;p<s.length;p++){const v=Math.floor(p%l),I=Math.floor(p/l);!v&&!g&&(g=!0),s[p]?(A++,p>0&&v>0&&s[p-1]||(m+=g?n("M",v+d,.5+I+d):n("m",f,0),f=0,g=!1),v+1<l&&s[p+1]||(m+=n("h",A),A=0)):f++}return m}return eh.render=function(l,d,m){const f=t.getOptions(d),g=l.modules.size,A=l.modules.data,p=g+f.margin*2,v=f.color.light.a?"<path "+e(f.color.light,"fill")+' d="M0 0h'+p+"v"+p+'H0z"/>':"",I="<path "+e(f.color.dark,"stroke")+' d="'+i(A,g,f.margin)+'"/>',x='viewBox="0 0 '+p+" "+p+'"',T='<svg xmlns="http://www.w3.org/2000/svg" '+(f.width?'width="'+f.width+'" height="'+f.width+'" ':"")+x+' shape-rendering="crispEdges">'+v+I+`</svg>
`;return typeof m=="function"&&m(null,T),T},eh}var vb;function tB(){if(vb)return Eo;vb=1;const t=MR(),e=$R(),n=ZR(),i=eB();function s(l,d,m,f,g){const A=[].slice.call(arguments,1),p=A.length,v=typeof A[p-1]=="function";if(!v&&!t())throw new Error("Callback required as last argument");if(v){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(I,x){try{const N=e.create(m,f);I(l(N,d,f))}catch(N){x(N)}})}try{const I=e.create(m,f);g(null,l(I,d,f))}catch(I){g(I)}}return Eo.create=e.create,Eo.toCanvas=s.bind(null,n.render),Eo.toDataURL=s.bind(null,n.renderToDataURL),Eo.toString=s.bind(null,function(l,d,m){return i.render(l,m)}),Eo}var aB=tB();const QI=is(aB),$n=({isOpen:t,onClose:e,title:n,children:i,maxWidth:s="max-w-md",showCloseButton:l=!0,footer:d,showHeaderBorder:m=!0,bodyClassName:f="px-6 py-4"})=>{const{t:g}=nt(),A=b.useCallback(v=>{v.key==="Escape"&&e()},[e]);if(b.useEffect(()=>{if(t)return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A)}},[t,A]),!t)return null;const p=v=>{v.target===v.currentTarget&&e()};return c.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-80 transition-opacity",onClick:e}),c.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:p,children:c.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:[n&&c.jsxs("div",{className:`px-6 py-4 flex items-center justify-between ${m?"border-b border-gray-200 dark:border-gray-700":""}`,children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:n}),l&&c.jsxs("button",{type:"button",className:"text-gray-400 hover:text-gray-500 focus:outline-none",onClick:e,children:[c.jsx("span",{className:"sr-only",children:g("common.close")}),c.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})]}),!n&&l&&c.jsxs("button",{type:"button",className:"absolute top-3 right-3 text-gray-400 hover:text-gray-500 focus:outline-none z-10",onClick:e,children:[c.jsx("span",{className:"sr-only",children:g("common.close")}),c.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]}),c.jsx("div",{className:f,children:i}),d&&c.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:d})]})})]})};var Jn=(t=>(t.TIMEOUT="TIMEOUT",t.GENERIC="GENERIC",t))(Jn||{}),th={},Hl={},Ib;function nB(){if(Ib)return Hl;Ib=1,Hl.byteLength=m,Hl.toByteArray=g,Hl.fromByteArray=v;for(var t=[],e=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=i.length;s<l;++s)t[s]=i[s],e[i.charCodeAt(s)]=s;e[45]=62,e[95]=63;function d(I){var x=I.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var N=I.indexOf("=");N===-1&&(N=x);var T=N===x?0:4-N%4;return[N,T]}function m(I){var x=d(I),N=x[0],T=x[1];return(N+T)*3/4-T}function f(I,x,N){return(x+N)*3/4-N}function g(I){var x,N=d(I),T=N[0],L=N[1],B=new n(f(I,T,L)),k=0,F=L>0?T-4:T,_;for(_=0;_<F;_+=4)x=e[I.charCodeAt(_)]<<18|e[I.charCodeAt(_+1)]<<12|e[I.charCodeAt(_+2)]<<6|e[I.charCodeAt(_+3)],B[k++]=x>>16&255,B[k++]=x>>8&255,B[k++]=x&255;return L===2&&(x=e[I.charCodeAt(_)]<<2|e[I.charCodeAt(_+1)]>>4,B[k++]=x&255),L===1&&(x=e[I.charCodeAt(_)]<<10|e[I.charCodeAt(_+1)]<<4|e[I.charCodeAt(_+2)]>>2,B[k++]=x>>8&255,B[k++]=x&255),B}function A(I){return t[I>>18&63]+t[I>>12&63]+t[I>>6&63]+t[I&63]}function p(I,x,N){for(var T,L=[],B=x;B<N;B+=3)T=(I[B]<<16&16711680)+(I[B+1]<<8&65280)+(I[B+2]&255),L.push(A(T));return L.join("")}function v(I){for(var x,N=I.length,T=N%3,L=[],B=16383,k=0,F=N-T;k<F;k+=B)L.push(p(I,k,k+B>F?F:k+B));return T===1?(x=I[N-1],L.push(t[x>>2]+t[x<<4&63]+"==")):T===2&&(x=(I[N-2]<<8)+I[N-1],L.push(t[x>>10]+t[x>>4&63]+t[x<<2&63]+"=")),L.join("")}return Hl}var Xd={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var wb;function rB(){return wb||(wb=1,Xd.read=function(t,e,n,i,s){var l,d,m=s*8-i-1,f=(1<<m)-1,g=f>>1,A=-7,p=n?s-1:0,v=n?-1:1,I=t[e+p];for(p+=v,l=I&(1<<-A)-1,I>>=-A,A+=m;A>0;l=l*256+t[e+p],p+=v,A-=8);for(d=l&(1<<-A)-1,l>>=-A,A+=i;A>0;d=d*256+t[e+p],p+=v,A-=8);if(l===0)l=1-g;else{if(l===f)return d?NaN:(I?-1:1)*(1/0);d=d+Math.pow(2,i),l=l-g}return(I?-1:1)*d*Math.pow(2,l-i)},Xd.write=function(t,e,n,i,s,l){var d,m,f,g=l*8-s-1,A=(1<<g)-1,p=A>>1,v=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=i?0:l-1,x=i?1:-1,N=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=A):(d=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-d))<1&&(d--,f*=2),d+p>=1?e+=v/f:e+=v*Math.pow(2,1-p),e*f>=2&&(d++,f/=2),d+p>=A?(m=0,d=A):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;t[n+I]=m&255,I+=x,m/=256,s-=8);for(d=d<<s|m,g+=s;g>0;t[n+I]=d&255,I+=x,d/=256,g-=8);t[n+I-x]|=N*128}),Xd}/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var Cb;function iB(){return Cb||(Cb=1,function(t){const e=nB(),n=rB(),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=m,t.SlowBuffer=B,t.INSPECT_MAX_BYTES=50;const s=2147483647;t.kMaxLength=s,m.TYPED_ARRAY_SUPPORT=l(),!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 l(){try{const M=new Uint8Array(1),C={foo:function(){return 42}};return Object.setPrototypeOf(C,Uint8Array.prototype),Object.setPrototypeOf(M,C),M.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(M){if(M>s)throw new RangeError('The value "'+M+'" is invalid for option "size"');const C=new Uint8Array(M);return Object.setPrototypeOf(C,m.prototype),C}function m(M,C,S){if(typeof M=="number"){if(typeof C=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(M)}return f(M,C,S)}m.poolSize=8192;function f(M,C,S){if(typeof M=="string")return v(M,C);if(ArrayBuffer.isView(M))return x(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(tt(M,ArrayBuffer)||M&&tt(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tt(M,SharedArrayBuffer)||M&&tt(M.buffer,SharedArrayBuffer)))return N(M,C,S);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=M.valueOf&&M.valueOf();if(G!=null&&G!==M)return m.from(G,C,S);const re=T(M);if(re)return re;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return m.from(M[Symbol.toPrimitive]("string"),C,S);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}m.from=function(M,C,S){return f(M,C,S)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array);function g(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function A(M,C,S){return g(M),M<=0?d(M):C!==void 0?typeof S=="string"?d(M).fill(C,S):d(M).fill(C):d(M)}m.alloc=function(M,C,S){return A(M,C,S)};function p(M){return g(M),d(M<0?0:L(M)|0)}m.allocUnsafe=function(M){return p(M)},m.allocUnsafeSlow=function(M){return p(M)};function v(M,C){if((typeof C!="string"||C==="")&&(C="utf8"),!m.isEncoding(C))throw new TypeError("Unknown encoding: "+C);const S=k(M,C)|0;let G=d(S);const re=G.write(M,C);return re!==S&&(G=G.slice(0,re)),G}function I(M){const C=M.length<0?0:L(M.length)|0,S=d(C);for(let G=0;G<C;G+=1)S[G]=M[G]&255;return S}function x(M){if(tt(M,Uint8Array)){const C=new Uint8Array(M);return N(C.buffer,C.byteOffset,C.byteLength)}return I(M)}function N(M,C,S){if(C<0||M.byteLength<C)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<C+(S||0))throw new RangeError('"length" is outside of buffer bounds');let G;return C===void 0&&S===void 0?G=new Uint8Array(M):S===void 0?G=new Uint8Array(M,C):G=new Uint8Array(M,C,S),Object.setPrototypeOf(G,m.prototype),G}function T(M){if(m.isBuffer(M)){const C=L(M.length)|0,S=d(C);return S.length===0||M.copy(S,0,0,C),S}if(M.length!==void 0)return typeof M.length!="number"||It(M.length)?d(0):I(M);if(M.type==="Buffer"&&Array.isArray(M.data))return I(M.data)}function L(M){if(M>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return M|0}function B(M){return+M!=M&&(M=0),m.alloc(+M)}m.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==m.prototype},m.compare=function(C,S){if(tt(C,Uint8Array)&&(C=m.from(C,C.offset,C.byteLength)),tt(S,Uint8Array)&&(S=m.from(S,S.offset,S.byteLength)),!m.isBuffer(C)||!m.isBuffer(S))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===S)return 0;let G=C.length,re=S.length;for(let pe=0,Ce=Math.min(G,re);pe<Ce;++pe)if(C[pe]!==S[pe]){G=C[pe],re=S[pe];break}return G<re?-1:re<G?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,S){if(!Array.isArray(C))throw new TypeError('"list" argument must be an Array of Buffers');if(C.length===0)return m.alloc(0);let G;if(S===void 0)for(S=0,G=0;G<C.length;++G)S+=C[G].length;const re=m.allocUnsafe(S);let pe=0;for(G=0;G<C.length;++G){let Ce=C[G];if(tt(Ce,Uint8Array))pe+Ce.length>re.length?(m.isBuffer(Ce)||(Ce=m.from(Ce)),Ce.copy(re,pe)):Uint8Array.prototype.set.call(re,Ce,pe);else if(m.isBuffer(Ce))Ce.copy(re,pe);else throw new TypeError('"list" argument must be an Array of Buffers');pe+=Ce.length}return re};function k(M,C){if(m.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||tt(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);const S=M.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&S===0)return 0;let re=!1;for(;;)switch(C){case"ascii":case"latin1":case"binary":return S;case"utf8":case"utf-8":return Fe(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S*2;case"hex":return S>>>1;case"base64":return Ve(M).length;default:if(re)return G?-1:Fe(M).length;C=(""+C).toLowerCase(),re=!0}}m.byteLength=k;function F(M,C,S){let G=!1;if((C===void 0||C<0)&&(C=0),C>this.length||((S===void 0||S>this.length)&&(S=this.length),S<=0)||(S>>>=0,C>>>=0,S<=C))return"";for(M||(M="utf8");;)switch(M){case"hex":return se(this,C,S);case"utf8":case"utf-8":return X(this,C,S);case"ascii":return ae(this,C,S);case"latin1":case"binary":return be(this,C,S);case"base64":return ee(this,C,S);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,C,S);default:if(G)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),G=!0}}m.prototype._isBuffer=!0;function _(M,C,S){const G=M[C];M[C]=M[S],M[S]=G}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 S=0;S<C;S+=2)_(this,S,S+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 S=0;S<C;S+=4)_(this,S,S+3),_(this,S+1,S+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 S=0;S<C;S+=8)_(this,S,S+7),_(this,S+1,S+6),_(this,S+2,S+5),_(this,S+3,S+4);return this},m.prototype.toString=function(){const C=this.length;return C===0?"":arguments.length===0?X(this,0,C):F.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 S=t.INSPECT_MAX_BYTES;return C=this.toString("hex",0,S).replace(/(.{2})/g,"$1 ").trim(),this.length>S&&(C+=" ... "),"<Buffer "+C+">"},i&&(m.prototype[i]=m.prototype.inspect),m.prototype.compare=function(C,S,G,re,pe){if(tt(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(S===void 0&&(S=0),G===void 0&&(G=C?C.length:0),re===void 0&&(re=0),pe===void 0&&(pe=this.length),S<0||G>C.length||re<0||pe>this.length)throw new RangeError("out of range index");if(re>=pe&&S>=G)return 0;if(re>=pe)return-1;if(S>=G)return 1;if(S>>>=0,G>>>=0,re>>>=0,pe>>>=0,this===C)return 0;let Ce=pe-re,_e=G-S;const ct=Math.min(Ce,_e),gt=this.slice(re,pe),St=C.slice(S,G);for(let pt=0;pt<ct;++pt)if(gt[pt]!==St[pt]){Ce=gt[pt],_e=St[pt];break}return Ce<_e?-1:_e<Ce?1:0};function V(M,C,S,G,re){if(M.length===0)return-1;if(typeof S=="string"?(G=S,S=0):S>2147483647?S=2147483647:S<-2147483648&&(S=-2147483648),S=+S,It(S)&&(S=re?0:M.length-1),S<0&&(S=M.length+S),S>=M.length){if(re)return-1;S=M.length-1}else if(S<0)if(re)S=0;else return-1;if(typeof C=="string"&&(C=m.from(C,G)),m.isBuffer(C))return C.length===0?-1:U(M,C,S,G,re);if(typeof C=="number")return C=C&255,typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(M,C,S):Uint8Array.prototype.lastIndexOf.call(M,C,S):U(M,[C],S,G,re);throw new TypeError("val must be string, number or Buffer")}function U(M,C,S,G,re){let pe=1,Ce=M.length,_e=C.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(M.length<2||C.length<2)return-1;pe=2,Ce/=2,_e/=2,S/=2}function ct(St,pt){return pe===1?St[pt]:St.readUInt16BE(pt*pe)}let gt;if(re){let St=-1;for(gt=S;gt<Ce;gt++)if(ct(M,gt)===ct(C,St===-1?0:gt-St)){if(St===-1&&(St=gt),gt-St+1===_e)return St*pe}else St!==-1&&(gt-=gt-St),St=-1}else for(S+_e>Ce&&(S=Ce-_e),gt=S;gt>=0;gt--){let St=!0;for(let pt=0;pt<_e;pt++)if(ct(M,gt+pt)!==ct(C,pt)){St=!1;break}if(St)return gt}return-1}m.prototype.includes=function(C,S,G){return this.indexOf(C,S,G)!==-1},m.prototype.indexOf=function(C,S,G){return V(this,C,S,G,!0)},m.prototype.lastIndexOf=function(C,S,G){return V(this,C,S,G,!1)};function O(M,C,S,G){S=Number(S)||0;const re=M.length-S;G?(G=Number(G),G>re&&(G=re)):G=re;const pe=C.length;G>pe/2&&(G=pe/2);let Ce;for(Ce=0;Ce<G;++Ce){const _e=parseInt(C.substr(Ce*2,2),16);if(It(_e))return Ce;M[S+Ce]=_e}return Ce}function z(M,C,S,G){return He(Fe(C,M.length-S),M,S,G)}function Q(M,C,S,G){return He(he(C),M,S,G)}function K(M,C,S,G){return He(Ve(C),M,S,G)}function te(M,C,S,G){return He(De(C,M.length-S),M,S,G)}m.prototype.write=function(C,S,G,re){if(S===void 0)re="utf8",G=this.length,S=0;else if(G===void 0&&typeof S=="string")re=S,G=this.length,S=0;else if(isFinite(S))S=S>>>0,isFinite(G)?(G=G>>>0,re===void 0&&(re="utf8")):(re=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const pe=this.length-S;if((G===void 0||G>pe)&&(G=pe),C.length>0&&(G<0||S<0)||S>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");let Ce=!1;for(;;)switch(re){case"hex":return O(this,C,S,G);case"utf8":case"utf-8":return z(this,C,S,G);case"ascii":case"latin1":case"binary":return Q(this,C,S,G);case"base64":return K(this,C,S,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,C,S,G);default:if(Ce)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),Ce=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ee(M,C,S){return C===0&&S===M.length?e.fromByteArray(M):e.fromByteArray(M.slice(C,S))}function X(M,C,S){S=Math.min(M.length,S);const G=[];let re=C;for(;re<S;){const pe=M[re];let Ce=null,_e=pe>239?4:pe>223?3:pe>191?2:1;if(re+_e<=S){let ct,gt,St,pt;switch(_e){case 1:pe<128&&(Ce=pe);break;case 2:ct=M[re+1],(ct&192)===128&&(pt=(pe&31)<<6|ct&63,pt>127&&(Ce=pt));break;case 3:ct=M[re+1],gt=M[re+2],(ct&192)===128&&(gt&192)===128&&(pt=(pe&15)<<12|(ct&63)<<6|gt&63,pt>2047&&(pt<55296||pt>57343)&&(Ce=pt));break;case 4:ct=M[re+1],gt=M[re+2],St=M[re+3],(ct&192)===128&&(gt&192)===128&&(St&192)===128&&(pt=(pe&15)<<18|(ct&63)<<12|(gt&63)<<6|St&63,pt>65535&&pt<1114112&&(Ce=pt))}}Ce===null?(Ce=65533,_e=1):Ce>65535&&(Ce-=65536,G.push(Ce>>>10&1023|55296),Ce=56320|Ce&1023),G.push(Ce),re+=_e}return W(G)}const ue=4096;function W(M){const C=M.length;if(C<=ue)return String.fromCharCode.apply(String,M);let S="",G=0;for(;G<C;)S+=String.fromCharCode.apply(String,M.slice(G,G+=ue));return S}function ae(M,C,S){let G="";S=Math.min(M.length,S);for(let re=C;re<S;++re)G+=String.fromCharCode(M[re]&127);return G}function be(M,C,S){let G="";S=Math.min(M.length,S);for(let re=C;re<S;++re)G+=String.fromCharCode(M[re]);return G}function se(M,C,S){const G=M.length;(!C||C<0)&&(C=0),(!S||S<0||S>G)&&(S=G);let re="";for(let pe=C;pe<S;++pe)re+=Ot[M[pe]];return re}function P(M,C,S){const G=M.slice(C,S);let re="";for(let pe=0;pe<G.length-1;pe+=2)re+=String.fromCharCode(G[pe]+G[pe+1]*256);return re}m.prototype.slice=function(C,S){const G=this.length;C=~~C,S=S===void 0?G:~~S,C<0?(C+=G,C<0&&(C=0)):C>G&&(C=G),S<0?(S+=G,S<0&&(S=0)):S>G&&(S=G),S<C&&(S=C);const re=this.subarray(C,S);return Object.setPrototypeOf(re,m.prototype),re};function q(M,C,S){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+C>S)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(C,S,G){C=C>>>0,S=S>>>0,G||q(C,S,this.length);let re=this[C],pe=1,Ce=0;for(;++Ce<S&&(pe*=256);)re+=this[C+Ce]*pe;return re},m.prototype.readUintBE=m.prototype.readUIntBE=function(C,S,G){C=C>>>0,S=S>>>0,G||q(C,S,this.length);let re=this[C+--S],pe=1;for(;S>0&&(pe*=256);)re+=this[C+--S]*pe;return re},m.prototype.readUint8=m.prototype.readUInt8=function(C,S){return C=C>>>0,S||q(C,1,this.length),this[C]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(C,S){return C=C>>>0,S||q(C,2,this.length),this[C]|this[C+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(C,S){return C=C>>>0,S||q(C,2,this.length),this[C]<<8|this[C+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(C,S){return C=C>>>0,S||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,S){return C=C>>>0,S||q(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},m.prototype.readBigUInt64LE=Tt(function(C){C=C>>>0,it(C,"offset");const S=this[C],G=this[C+7];(S===void 0||G===void 0)&&Ge(C,this.length-8);const re=S+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24,pe=this[++C]+this[++C]*2**8+this[++C]*2**16+G*2**24;return BigInt(re)+(BigInt(pe)<<BigInt(32))}),m.prototype.readBigUInt64BE=Tt(function(C){C=C>>>0,it(C,"offset");const S=this[C],G=this[C+7];(S===void 0||G===void 0)&&Ge(C,this.length-8);const re=S*2**24+this[++C]*2**16+this[++C]*2**8+this[++C],pe=this[++C]*2**24+this[++C]*2**16+this[++C]*2**8+G;return(BigInt(re)<<BigInt(32))+BigInt(pe)}),m.prototype.readIntLE=function(C,S,G){C=C>>>0,S=S>>>0,G||q(C,S,this.length);let re=this[C],pe=1,Ce=0;for(;++Ce<S&&(pe*=256);)re+=this[C+Ce]*pe;return pe*=128,re>=pe&&(re-=Math.pow(2,8*S)),re},m.prototype.readIntBE=function(C,S,G){C=C>>>0,S=S>>>0,G||q(C,S,this.length);let re=S,pe=1,Ce=this[C+--re];for(;re>0&&(pe*=256);)Ce+=this[C+--re]*pe;return pe*=128,Ce>=pe&&(Ce-=Math.pow(2,8*S)),Ce},m.prototype.readInt8=function(C,S){return C=C>>>0,S||q(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},m.prototype.readInt16LE=function(C,S){C=C>>>0,S||q(C,2,this.length);const G=this[C]|this[C+1]<<8;return G&32768?G|4294901760:G},m.prototype.readInt16BE=function(C,S){C=C>>>0,S||q(C,2,this.length);const G=this[C+1]|this[C]<<8;return G&32768?G|4294901760:G},m.prototype.readInt32LE=function(C,S){return C=C>>>0,S||q(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},m.prototype.readInt32BE=function(C,S){return C=C>>>0,S||q(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},m.prototype.readBigInt64LE=Tt(function(C){C=C>>>0,it(C,"offset");const S=this[C],G=this[C+7];(S===void 0||G===void 0)&&Ge(C,this.length-8);const re=this[C+4]+this[C+5]*2**8+this[C+6]*2**16+(G<<24);return(BigInt(re)<<BigInt(32))+BigInt(S+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24)}),m.prototype.readBigInt64BE=Tt(function(C){C=C>>>0,it(C,"offset");const S=this[C],G=this[C+7];(S===void 0||G===void 0)&&Ge(C,this.length-8);const re=(S<<24)+this[++C]*2**16+this[++C]*2**8+this[++C];return(BigInt(re)<<BigInt(32))+BigInt(this[++C]*2**24+this[++C]*2**16+this[++C]*2**8+G)}),m.prototype.readFloatLE=function(C,S){return C=C>>>0,S||q(C,4,this.length),n.read(this,C,!0,23,4)},m.prototype.readFloatBE=function(C,S){return C=C>>>0,S||q(C,4,this.length),n.read(this,C,!1,23,4)},m.prototype.readDoubleLE=function(C,S){return C=C>>>0,S||q(C,8,this.length),n.read(this,C,!0,52,8)},m.prototype.readDoubleBE=function(C,S){return C=C>>>0,S||q(C,8,this.length),n.read(this,C,!1,52,8)};function Y(M,C,S,G,re,pe){if(!m.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(C>re||C<pe)throw new RangeError('"value" argument is out of bounds');if(S+G>M.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(C,S,G,re){if(C=+C,S=S>>>0,G=G>>>0,!re){const _e=Math.pow(2,8*G)-1;Y(this,C,S,G,_e,0)}let pe=1,Ce=0;for(this[S]=C&255;++Ce<G&&(pe*=256);)this[S+Ce]=C/pe&255;return S+G},m.prototype.writeUintBE=m.prototype.writeUIntBE=function(C,S,G,re){if(C=+C,S=S>>>0,G=G>>>0,!re){const _e=Math.pow(2,8*G)-1;Y(this,C,S,G,_e,0)}let pe=G-1,Ce=1;for(this[S+pe]=C&255;--pe>=0&&(Ce*=256);)this[S+pe]=C/Ce&255;return S+G},m.prototype.writeUint8=m.prototype.writeUInt8=function(C,S,G){return C=+C,S=S>>>0,G||Y(this,C,S,1,255,0),this[S]=C&255,S+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(C,S,G){return C=+C,S=S>>>0,G||Y(this,C,S,2,65535,0),this[S]=C&255,this[S+1]=C>>>8,S+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(C,S,G){return C=+C,S=S>>>0,G||Y(this,C,S,2,65535,0),this[S]=C>>>8,this[S+1]=C&255,S+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(C,S,G){return C=+C,S=S>>>0,G||Y(this,C,S,4,4294967295,0),this[S+3]=C>>>24,this[S+2]=C>>>16,this[S+1]=C>>>8,this[S]=C&255,S+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(C,S,G){return C=+C,S=S>>>0,G||Y(this,C,S,4,4294967295,0),this[S]=C>>>24,this[S+1]=C>>>16,this[S+2]=C>>>8,this[S+3]=C&255,S+4};function ne(M,C,S,G,re){ht(C,G,re,M,S,7);let pe=Number(C&BigInt(4294967295));M[S++]=pe,pe=pe>>8,M[S++]=pe,pe=pe>>8,M[S++]=pe,pe=pe>>8,M[S++]=pe;let Ce=Number(C>>BigInt(32)&BigInt(4294967295));return M[S++]=Ce,Ce=Ce>>8,M[S++]=Ce,Ce=Ce>>8,M[S++]=Ce,Ce=Ce>>8,M[S++]=Ce,S}function Ie(M,C,S,G,re){ht(C,G,re,M,S,7);let pe=Number(C&BigInt(4294967295));M[S+7]=pe,pe=pe>>8,M[S+6]=pe,pe=pe>>8,M[S+5]=pe,pe=pe>>8,M[S+4]=pe;let Ce=Number(C>>BigInt(32)&BigInt(4294967295));return M[S+3]=Ce,Ce=Ce>>8,M[S+2]=Ce,Ce=Ce>>8,M[S+1]=Ce,Ce=Ce>>8,M[S]=Ce,S+8}m.prototype.writeBigUInt64LE=Tt(function(C,S=0){return ne(this,C,S,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeBigUInt64BE=Tt(function(C,S=0){return Ie(this,C,S,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeIntLE=function(C,S,G,re){if(C=+C,S=S>>>0,!re){const ct=Math.pow(2,8*G-1);Y(this,C,S,G,ct-1,-ct)}let pe=0,Ce=1,_e=0;for(this[S]=C&255;++pe<G&&(Ce*=256);)C<0&&_e===0&&this[S+pe-1]!==0&&(_e=1),this[S+pe]=(C/Ce>>0)-_e&255;return S+G},m.prototype.writeIntBE=function(C,S,G,re){if(C=+C,S=S>>>0,!re){const ct=Math.pow(2,8*G-1);Y(this,C,S,G,ct-1,-ct)}let pe=G-1,Ce=1,_e=0;for(this[S+pe]=C&255;--pe>=0&&(Ce*=256);)C<0&&_e===0&&this[S+pe+1]!==0&&(_e=1),this[S+pe]=(C/Ce>>0)-_e&255;return S+G},m.prototype.writeInt8=function(C,S,G){return C=+C,S=S>>>0,G||Y(this,C,S,1,127,-128),C<0&&(C=255+C+1),this[S]=C&255,S+1},m.prototype.writeInt16LE=function(C,S,G){return C=+C,S=S>>>0,G||Y(this,C,S,2,32767,-32768),this[S]=C&255,this[S+1]=C>>>8,S+2},m.prototype.writeInt16BE=function(C,S,G){return C=+C,S=S>>>0,G||Y(this,C,S,2,32767,-32768),this[S]=C>>>8,this[S+1]=C&255,S+2},m.prototype.writeInt32LE=function(C,S,G){return C=+C,S=S>>>0,G||Y(this,C,S,4,2147483647,-2147483648),this[S]=C&255,this[S+1]=C>>>8,this[S+2]=C>>>16,this[S+3]=C>>>24,S+4},m.prototype.writeInt32BE=function(C,S,G){return C=+C,S=S>>>0,G||Y(this,C,S,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[S]=C>>>24,this[S+1]=C>>>16,this[S+2]=C>>>8,this[S+3]=C&255,S+4},m.prototype.writeBigInt64LE=Tt(function(C,S=0){return ne(this,C,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),m.prototype.writeBigInt64BE=Tt(function(C,S=0){return Ie(this,C,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ce(M,C,S,G,re,pe){if(S+G>M.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("Index out of range")}function Ee(M,C,S,G,re){return C=+C,S=S>>>0,re||ce(M,C,S,4),n.write(M,C,S,G,23,4),S+4}m.prototype.writeFloatLE=function(C,S,G){return Ee(this,C,S,!0,G)},m.prototype.writeFloatBE=function(C,S,G){return Ee(this,C,S,!1,G)};function Ne(M,C,S,G,re){return C=+C,S=S>>>0,re||ce(M,C,S,8),n.write(M,C,S,G,52,8),S+8}m.prototype.writeDoubleLE=function(C,S,G){return Ne(this,C,S,!0,G)},m.prototype.writeDoubleBE=function(C,S,G){return Ne(this,C,S,!1,G)},m.prototype.copy=function(C,S,G,re){if(!m.isBuffer(C))throw new TypeError("argument should be a Buffer");if(G||(G=0),!re&&re!==0&&(re=this.length),S>=C.length&&(S=C.length),S||(S=0),re>0&&re<G&&(re=G),re===G||C.length===0||this.length===0)return 0;if(S<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),C.length-S<re-G&&(re=C.length-S+G);const pe=re-G;return this===C&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(S,G,re):Uint8Array.prototype.set.call(C,this.subarray(G,re),S),pe},m.prototype.fill=function(C,S,G,re){if(typeof C=="string"){if(typeof S=="string"?(re=S,S=0,G=this.length):typeof G=="string"&&(re=G,G=this.length),re!==void 0&&typeof re!="string")throw new TypeError("encoding must be a string");if(typeof re=="string"&&!m.isEncoding(re))throw new TypeError("Unknown encoding: "+re);if(C.length===1){const Ce=C.charCodeAt(0);(re==="utf8"&&Ce<128||re==="latin1")&&(C=Ce)}}else typeof C=="number"?C=C&255:typeof C=="boolean"&&(C=Number(C));if(S<0||this.length<S||this.length<G)throw new RangeError("Out of range index");if(G<=S)return this;S=S>>>0,G=G===void 0?this.length:G>>>0,C||(C=0);let pe;if(typeof C=="number")for(pe=S;pe<G;++pe)this[pe]=C;else{const Ce=m.isBuffer(C)?C:m.from(C,re),_e=Ce.length;if(_e===0)throw new TypeError('The value "'+C+'" is invalid for argument "value"');for(pe=0;pe<G-S;++pe)this[pe+S]=Ce[pe%_e]}return this};const we={};function Oe(M,C,S){we[M]=class extends S{constructor(){super(),Object.defineProperty(this,"message",{value:C.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${M}]`,this.stack,delete this.name}get code(){return M}set code(re){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:re,writable:!0})}toString(){return`${this.name} [${M}]: ${this.message}`}}}Oe("ERR_BUFFER_OUT_OF_BOUNDS",function(M){return M?`${M} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Oe("ERR_INVALID_ARG_TYPE",function(M,C){return`The "${M}" argument must be of type number. Received type ${typeof C}`},TypeError),Oe("ERR_OUT_OF_RANGE",function(M,C,S){let G=`The value of "${M}" is out of range.`,re=S;return Number.isInteger(S)&&Math.abs(S)>2**32?re=ze(String(S)):typeof S=="bigint"&&(re=String(S),(S>BigInt(2)**BigInt(32)||S<-(BigInt(2)**BigInt(32)))&&(re=ze(re)),re+="n"),G+=` It must be ${C}. Received ${re}`,G},RangeError);function ze(M){let C="",S=M.length;const G=M[0]==="-"?1:0;for(;S>=G+4;S-=3)C=`_${M.slice(S-3,S)}${C}`;return`${M.slice(0,S)}${C}`}function Et(M,C,S){it(C,"offset"),(M[C]===void 0||M[C+S]===void 0)&&Ge(C,M.length-(S+1))}function ht(M,C,S,G,re,pe){if(M>S||M<C){const Ce=typeof C=="bigint"?"n":"";let _e;throw C===0||C===BigInt(0)?_e=`>= 0${Ce} and < 2${Ce} ** ${(pe+1)*8}${Ce}`:_e=`>= -(2${Ce} ** ${(pe+1)*8-1}${Ce}) and < 2 ** ${(pe+1)*8-1}${Ce}`,new we.ERR_OUT_OF_RANGE("value",_e,M)}Et(G,re,pe)}function it(M,C){if(typeof M!="number")throw new we.ERR_INVALID_ARG_TYPE(C,"number",M)}function Ge(M,C,S){throw Math.floor(M)!==M?(it(M,S),new we.ERR_OUT_OF_RANGE("offset","an integer",M)):C<0?new we.ERR_BUFFER_OUT_OF_BOUNDS:new we.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${C}`,M)}const Ft=/[^+/0-9A-Za-z-_]/g;function Se(M){if(M=M.split("=")[0],M=M.trim().replace(Ft,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function Fe(M,C){C=C||1/0;let S;const G=M.length;let re=null;const pe=[];for(let Ce=0;Ce<G;++Ce){if(S=M.charCodeAt(Ce),S>55295&&S<57344){if(!re){if(S>56319){(C-=3)>-1&&pe.push(239,191,189);continue}else if(Ce+1===G){(C-=3)>-1&&pe.push(239,191,189);continue}re=S;continue}if(S<56320){(C-=3)>-1&&pe.push(239,191,189),re=S;continue}S=(re-55296<<10|S-56320)+65536}else re&&(C-=3)>-1&&pe.push(239,191,189);if(re=null,S<128){if((C-=1)<0)break;pe.push(S)}else if(S<2048){if((C-=2)<0)break;pe.push(S>>6|192,S&63|128)}else if(S<65536){if((C-=3)<0)break;pe.push(S>>12|224,S>>6&63|128,S&63|128)}else if(S<1114112){if((C-=4)<0)break;pe.push(S>>18|240,S>>12&63|128,S>>6&63|128,S&63|128)}else throw new Error("Invalid code point")}return pe}function he(M){const C=[];for(let S=0;S<M.length;++S)C.push(M.charCodeAt(S)&255);return C}function De(M,C){let S,G,re;const pe=[];for(let Ce=0;Ce<M.length&&!((C-=2)<0);++Ce)S=M.charCodeAt(Ce),G=S>>8,re=S%256,pe.push(re),pe.push(G);return pe}function Ve(M){return e.toByteArray(Se(M))}function He(M,C,S,G){let re;for(re=0;re<G&&!(re+S>=C.length||re>=M.length);++re)C[re+S]=M[re];return re}function tt(M,C){return M instanceof C||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===C.name}function It(M){return M!==M}const Ot=function(){const M="0123456789abcdef",C=new Array(256);for(let S=0;S<16;++S){const G=S*16;for(let re=0;re<16;++re)C[G+re]=M[S]+M[re]}return C}();function Tt(M){return typeof BigInt>"u"?Yt:M}function Yt(){throw new Error("BigInt not supported")}}(th)),th}var No=iB();class $t{static async deriveKeyFromPassword(e,n,i="Argon2Id",s='{"Iterations":2,"MemorySize":19456,"DegreeOfParallelism":1}'){const l=JSON.parse(s);try{if(i!=="Argon2Id")throw new Error("Unsupported encryption type");return(await AI.hash({pass:e,salt:n,time:l.Iterations,mem:l.MemorySize,parallelism:l.DegreeOfParallelism,hashLen:32,type:2})).hash}catch(d){throw console.error("Argon2 hashing failed:",d),d}}static async symmetricEncrypt(e,n){if(!e)return e;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(n),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,n){if(!e)return e;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(n),g=>g.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),s=Uint8Array.from(atob(e),g=>g.charCodeAt(0)),l=s.slice(0,12),d=s.slice(12),m=await crypto.subtle.decrypt({name:"AES-GCM",iv:l},i,d);return new TextDecoder().decode(m)}static async symmetricDecryptBytes(e,n){if(!e||e.length===0)return e;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(n),m=>m.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),s=e.slice(0,12),l=e.slice(12),d=await crypto.subtle.decrypt({name:"AES-GCM",iv:s},i,l);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"]),n=await crypto.subtle.exportKey("jwk",e.publicKey),i=await crypto.subtle.exportKey("jwk",e.privateKey);return{publicKey:JSON.stringify(n),privateKey:JSON.stringify(i)}}static async encryptWithPublicKey(e,n){const i=await crypto.subtle.importKey("jwk",JSON.parse(n),{name:"RSA-OAEP",hash:"SHA-256"},!1,["encrypt"]),s=new TextEncoder().encode(e),l=await crypto.subtle.encrypt({name:"RSA-OAEP"},i,s);return btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(l))))}static async decryptWithPrivateKey(e,n){try{const i=await crypto.subtle.importKey("jwk",JSON.parse(n),{name:"RSA-OAEP",hash:"SHA-256"},!0,["decrypt"]),s=Uint8Array.from(atob(e),d=>d.charCodeAt(0)),l=await crypto.subtle.decrypt({name:"RSA-OAEP"},i,s);return new Uint8Array(l)}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,n){try{const i=n.find(m=>m.PublicKey===e.encryptionKey);if(!i)throw new Error("Encryption key not found");const s=await $t.decryptWithPrivateKey(e.encryptedSymmetricKey,i.PrivateKey),l=No.Buffer.from(s).toString("base64"),d={...e};return d.subject=await $t.symmetricDecrypt(e.subject,l),d.fromDisplay=await $t.symmetricDecrypt(e.fromDisplay,l),d.fromDomain=await $t.symmetricDecrypt(e.fromDomain,l),d.fromLocal=await $t.symmetricDecrypt(e.fromLocal,l),e.messageHtml&&(d.messageHtml=await $t.symmetricDecrypt(e.messageHtml,l)),e.messagePlain&&(d.messagePlain=await $t.symmetricDecrypt(e.messagePlain,l)),d}catch(i){throw new Error(i instanceof Error?i.message:"Failed to decrypt email")}}static async decryptEmailList(e,n){return Promise.all(e.map(async i=>{try{const s=n.find(f=>f.PublicKey===i.encryptionKey);if(!s)throw new Error("Encryption key not found");const l=await $t.decryptWithPrivateKey(i.encryptedSymmetricKey,s.PrivateKey),d=No.Buffer.from(l).toString("base64"),m={...i};return m.subject=await $t.symmetricDecrypt(i.subject,d),m.fromDisplay=await $t.symmetricDecrypt(i.fromDisplay,d),m.fromDomain=await $t.symmetricDecrypt(i.fromDomain,d),m.fromLocal=await $t.symmetricDecrypt(i.fromLocal,d),i.messagePreview&&(m.messagePreview=await $t.symmetricDecrypt(i.messagePreview,d)),m}catch(s){throw new Error(s instanceof Error?s.message:"Failed to decrypt email")}}))}static async decryptAttachment(e,n,i){try{const s=i.find(m=>m.PublicKey===n.encryptionKey);if(!s)throw new Error("Encryption key not found");const l=await $t.decryptWithPrivateKey(n.encryptedSymmetricKey,s.PrivateKey),d=No.Buffer.from(l).toString("base64");return await $t.symmetricDecryptBytes(e,d)}catch(s){throw new Error(s instanceof Error?s.message:"Failed to decrypt attachment")}}}class sB{constructor(e){qe(this,"webApi");qe(this,"pollingInterval",null);qe(this,"requestId",null);qe(this,"privateKey",null);qe(this,"publicKeyHash",null);this.webApi=e}async computePublicKeyHash(e){const i=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",i);return Array.from(new Uint8Array(s)).map(m=>m.toString(16).padStart(2,"0")).join("").substring(0,16)}async initiate(){try{const e=await $t.generateRsaKeyPair();this.privateKey=e.privateKey,this.publicKeyHash=await this.computePublicKeyHash(e.publicKey);const n=await this.webApi.rawFetch("auth/mobile-login/initiate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientPublicKey:e.publicKey})});if(!n.ok)throw Jn.GENERIC;const i=await n.json();return this.requestId=i.requestId,{requestId:this.requestId,publicKeyHash:this.publicKeyHash}}catch(e){throw typeof e=="string"&&Object.values(Jn).includes(e)?e:Jn.GENERIC}}async startPolling(e,n){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,n(Jn.TIMEOUT);return}throw new Error(`Polling failed: ${s.status}`)}const l=await s.json();if(l.fulfilled&&l.encryptedSymmetricKey){this.stopPolling();const d=await $t.decryptWithPrivateKey(l.encryptedDecryptionKey,this.privateKey),m=No.Buffer.from(d).toString("base64"),f=await $t.decryptWithPrivateKey(l.encryptedSymmetricKey,this.privateKey),g=No.Buffer.from(f).toString("base64"),A=await $t.symmetricDecrypt(l.encryptedToken,g),p=await $t.symmetricDecrypt(l.encryptedRefreshToken,g),v=await $t.symmetricDecrypt(l.encryptedUsername,g);this.privateKey=null,this.requestId=null;const I=await this.webApi.rawFetch("auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:v})});if(!I.ok){n(Jn.GENERIC);return}const x=await I.json(),N={username:v,token:A,refreshToken:p,decryptionKey:m,salt:x.salt,encryptionType:x.encryptionType,encryptionSettings:x.encryptionSettings};e(N)}}catch{this.stopPolling(),this.privateKey=null,this.requestId=null,n(Jn.GENERIC)}};this.pollingInterval=setInterval(i,3e3),setTimeout(()=>{this.pollingInterval&&(this.stopPolling(),this.privateKey=null,this.requestId=null,n(Jn.TIMEOUT))},21e4)}stopPolling(){this.pollingInterval&&(clearInterval(this.pollingInterval),this.pollingInterval=null)}cleanup(){this.stopPolling(),this.privateKey=null,this.requestId=null,this.publicKeyHash=null}}const KI=({isOpen:t,onClose:e,onSuccess:n,webApi:i,mode:s="login"})=>{const{t:l}=nt(),[d,m]=b.useState(null),[f,g]=b.useState(null),[A,p]=b.useState(120),v=b.useRef(null),I=b.useRef(null),x=k=>{switch(k){case Jn.TIMEOUT:return l("common.errors.mobileLoginRequestExpired");case Jn.GENERIC:default:return l("common.errors.unknownError")}};b.useEffect(()=>{if(d&&A>0&&t)return I.current=setInterval(()=>{p(k=>k<=1?(I.current&&clearInterval(I.current),0):k-1)},1e3),()=>{I.current&&clearInterval(I.current)}},[d,A,t]),b.useEffect(()=>t?((async()=>{try{g(null),m(null),p(120),v.current||(v.current=new sB(i));const{requestId:F,publicKeyHash:_}=await v.current.initiate(),V=`aliasvault://open/mobile-unlock/${F}?pk=${_}`,U=await QI.toDataURL(V,{width:256,margin:2});m(U),await v.current.startPolling(async O=>{try{await n(O),N()}catch{m(null),g(Jn.GENERIC)}},O=>{m(null),g(O)})}catch(F){typeof F=="string"&&Object.values(Jn).includes(F)?g(F):g(Jn.GENERIC)}})(),()=>{v.current&&v.current.cleanup(),I.current&&clearInterval(I.current)}):void 0,[t]);const N=()=>{v.current&&v.current.cleanup(),I.current&&clearInterval(I.current),m(null),g(null),p(120),e()},T=k=>{const F=Math.floor(k/60),_=k%60;return`${F}:${_.toString().padStart(2,"0")}`},L=l(s==="unlock"?"auth.unlockWithMobile":"auth.loginWithMobile"),B=l("auth.scanQrCode");return c.jsxs($n,{isOpen:t,onClose:N,title:L,showHeaderBorder:!1,bodyClassName:"px-6 pb-6",children:[c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:B}),f&&c.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&&c.jsxs("div",{className:"flex flex-col items-center mb-4",children:[c.jsx("img",{src:d,alt:"QR Code",className:"border-4 border-gray-200 dark:border-gray-600 rounded mb-3"}),c.jsx("div",{className:"text-gray-700 dark:text-gray-300 text-sm font-medium",children:T(A)})]}),!d&&!f&&c.jsx("div",{className:"flex justify-center py-8",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}),c.jsx("button",{type:"button",onClick:N,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:l("common.cancel")})]})};var Wa=(t=>(t.EXPAND="expand",t.EDIT="edit",t.DELETE="delete",t.SETTINGS="settings",t.RELOAD="reload",t.EXTERNAL_LINK="external_link",t.SAVE="save",t.PLUS="plus",t.TAB="tab",t.EYE="eye",t.EYE_OFF="eye_off",t))(Wa||{});const Cp=({type:t,className:e="w-5 h-5"})=>({expand:c.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.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:c.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.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:c.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.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:c.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[c.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"}),c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),reload:c.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.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:c.jsxs("svg",{className:e,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[c.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"}),c.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:c.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),plus:c.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),tab:c.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[c.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"}),c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z"})]}),eye:c.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),c.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:c.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.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"})})})[t]||null,_n=({onClick:t,title:e,iconType:n,variant:i="default",id:s,disabled:l=!1,isLoading:d=!1})=>{const m={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"},f=l||d;return c.jsx("button",{id:s,onClick:t,disabled:f,className:`p-2 rounded-lg ${m[i]} ${f?"opacity-50 cursor-not-allowed":""}`,title:e,children:d?c.jsxs("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):c.jsx(Cp,{type:n})})},GI=()=>{const[t,e]=b.useState(gn.DEFAULT_API_URL);return{apiUrl:t,setApiUrl:e,loadApiUrl:async()=>{const s=await Te.getItem("local:apiUrl");s&&s.length>0?e(s):e(gn.DEFAULT_API_URL)},getDisplayUrl:()=>{const s=t.replace("https://","").replace("http://","").replace(":443","").replace("/api","");return s==="app.aliasvault.net"?"aliasvault.net":s}}},oB=()=>{const{loadApiUrl:t,getDisplayUrl:e}=GI(),n=Ha(),{t:i}=nt();b.useEffect(()=>{t()},[t]);const s=()=>{n("/auth-settings")};return c.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:["(",i("auth.connectingTo")," ",c.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 Ke;function _t(t){oc===hi.length&&hi.push(hi.length+1);const e=oc;return oc=hi[e],hi[e]=t,e}function Ph(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const s=t.description;return s==null?"Symbol":`Symbol(${s})`}if(e=="function"){const s=t.name;return typeof s=="string"&&s.length>0?`Function(${s})`:"Function"}if(Array.isArray(t)){const s=t.length;let l="[";s>0&&(l+=Ph(t[0]));for(let d=1;d<s;d++)l+=", "+Ph(t[d]);return l+="]",l}const n=/\[object ([^\]]+)\]/.exec(toString.call(t));let i;if(n&&n.length>1)i=n[1];else return toString.call(t);if(i=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
${t.stack}`:i}function lB(t){t<132||(hi[t]=oc,oc=t)}function Sb(t,e){return t=t>>>0,sc().subarray(t/1,t/1+e)}let xs=null;function Kt(){return(xs===null||xs.buffer.detached===!0||xs.buffer.detached===void 0&&xs.buffer!==Ke.memory.buffer)&&(xs=new DataView(Ke.memory.buffer)),xs}function Or(t,e){return t=t>>>0,dB(t,e)}let tc=null;function sc(){return(tc===null||tc.byteLength===0)&&(tc=new Uint8Array(Ke.memory.buffer)),tc}function at(t){return hi[t]}function Ns(t,e){try{return t.apply(this,e)}catch(n){Ke.__wbindgen_export3(_t(n))}}let hi=new Array(128).fill(void 0);hi.push(void 0,null,!0,!1);let oc=hi.length;function Br(t){return t==null}function Cn(t,e,n){if(n===void 0){const m=lc.encode(t),f=e(m.length,1)>>>0;return sc().subarray(f,f+m.length).set(m),fn=m.length,f}let i=t.length,s=e(i,1)>>>0;const l=sc();let d=0;for(;d<i;d++){const m=t.charCodeAt(d);if(m>127)break;l[s+d]=m}if(d!==i){d!==0&&(t=t.slice(d)),s=n(s,i,i=d+t.length*3,1)>>>0;const m=sc().subarray(s+d,s+i),f=lc.encodeInto(t,m);d+=f.written,s=n(s,i,d,1)>>>0}return fn=d,s}function Xn(t){const e=at(t);return lB(t),e}let hu=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});hu.decode();const cB=2146435072;let ah=0;function dB(t,e){return ah+=e,ah>=cB&&(hu=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),hu.decode(),ah=e),hu.decode(sc().subarray(t,t+e))}const lc=new TextEncoder;"encodeInto"in lc||(lc.encodeInto=function(t,e){const n=lc.encode(t);return e.set(n),{read:t.length,written:n.length}});let fn=0;function uB(t){let e,n;try{const l=Ke.__wbindgen_add_to_stack_pointer(-16),d=Cn(t,Ke.__wbindgen_export,Ke.__wbindgen_export2),m=fn;Ke.extractDomain(l,d,m);var i=Kt().getInt32(l+4*0,!0),s=Kt().getInt32(l+4*1,!0);return e=i,n=s,Or(i,s)}finally{Ke.__wbindgen_add_to_stack_pointer(16),Ke.__wbindgen_export4(e,n,1)}}function mB(t){let e,n;try{const l=Ke.__wbindgen_add_to_stack_pointer(-16),d=Cn(t,Ke.__wbindgen_export,Ke.__wbindgen_export2),m=fn;Ke.extractRootDomain(l,d,m);var i=Kt().getInt32(l+4*0,!0),s=Kt().getInt32(l+4*1,!0);return e=i,n=s,Or(i,s)}finally{Ke.__wbindgen_add_to_stack_pointer(16),Ke.__wbindgen_export4(e,n,1)}}function gB(t){try{const s=Ke.__wbindgen_add_to_stack_pointer(-16);Ke.filterCredentials(s,_t(t));var e=Kt().getInt32(s+4*0,!0),n=Kt().getInt32(s+4*1,!0),i=Kt().getInt32(s+4*2,!0);if(i)throw Xn(n);return Xn(e)}finally{Ke.__wbindgen_add_to_stack_pointer(16)}}function fB(t,e,n){let i,s;try{const p=Ke.__wbindgen_add_to_stack_pointer(-16),v=Cn(t,Ke.__wbindgen_export,Ke.__wbindgen_export2),I=fn,x=Cn(e,Ke.__wbindgen_export,Ke.__wbindgen_export2),N=fn,T=Cn(n,Ke.__wbindgen_export,Ke.__wbindgen_export2),L=fn;Ke.srpDerivePrivateKey(p,v,I,x,N,T,L);var l=Kt().getInt32(p+4*0,!0),d=Kt().getInt32(p+4*1,!0),m=Kt().getInt32(p+4*2,!0),f=Kt().getInt32(p+4*3,!0),g=l,A=d;if(f)throw g=0,A=0,Xn(m);return i=g,s=A,Or(g,A)}finally{Ke.__wbindgen_add_to_stack_pointer(16),Ke.__wbindgen_export4(i,s,1)}}function hB(t,e,n,i,s){try{const f=Ke.__wbindgen_add_to_stack_pointer(-16),g=Cn(t,Ke.__wbindgen_export,Ke.__wbindgen_export2),A=fn,p=Cn(e,Ke.__wbindgen_export,Ke.__wbindgen_export2),v=fn,I=Cn(n,Ke.__wbindgen_export,Ke.__wbindgen_export2),x=fn,N=Cn(i,Ke.__wbindgen_export,Ke.__wbindgen_export2),T=fn,L=Cn(s,Ke.__wbindgen_export,Ke.__wbindgen_export2),B=fn;Ke.srpDeriveSession(f,g,A,p,v,I,x,N,T,L,B);var l=Kt().getInt32(f+4*0,!0),d=Kt().getInt32(f+4*1,!0),m=Kt().getInt32(f+4*2,!0);if(m)throw Xn(d);return Xn(l)}finally{Ke.__wbindgen_add_to_stack_pointer(16)}}function pB(t){let e,n;try{const g=Ke.__wbindgen_add_to_stack_pointer(-16),A=Cn(t,Ke.__wbindgen_export,Ke.__wbindgen_export2),p=fn;Ke.srpDeriveVerifier(g,A,p);var i=Kt().getInt32(g+4*0,!0),s=Kt().getInt32(g+4*1,!0),l=Kt().getInt32(g+4*2,!0),d=Kt().getInt32(g+4*3,!0),m=i,f=s;if(d)throw m=0,f=0,Xn(l);return e=m,n=f,Or(m,f)}finally{Ke.__wbindgen_add_to_stack_pointer(16),Ke.__wbindgen_export4(e,n,1)}}function AB(){try{const i=Ke.__wbindgen_add_to_stack_pointer(-16);Ke.srpGenerateEphemeral(i);var t=Kt().getInt32(i+4*0,!0),e=Kt().getInt32(i+4*1,!0),n=Kt().getInt32(i+4*2,!0);if(n)throw Xn(e);return Xn(t)}finally{Ke.__wbindgen_add_to_stack_pointer(16)}}function yB(){let t,e;try{const s=Ke.__wbindgen_add_to_stack_pointer(-16);Ke.srpGenerateSalt(s);var n=Kt().getInt32(s+4*0,!0),i=Kt().getInt32(s+4*1,!0);return t=n,e=i,Or(n,i)}finally{Ke.__wbindgen_add_to_stack_pointer(16),Ke.__wbindgen_export4(t,e,1)}}const EB=new Set(["basic","cors","default"]);async function bB(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(i){if(t.ok&&EB.has(t.type)&&t.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 n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function vB(){const t={};return t.wbg={},t.wbg.__wbg_Error_52673b7de5a0ca89=function(e,n){const i=Error(Or(e,n));return _t(i)},t.wbg.__wbg_Number_2d1dcfcf4ec51736=function(e){return Number(at(e))},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){const i=String(at(n)),s=Cn(i,Ke.__wbindgen_export,Ke.__wbindgen_export2),l=fn;Kt().setInt32(e+4*1,l,!0),Kt().setInt32(e+4*0,s,!0)},t.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d=function(e,n){const i=at(n),s=typeof i=="bigint"?i:void 0;Kt().setBigInt64(e+8*1,Br(s)?BigInt(0):s,!0),Kt().setInt32(e+4*0,!Br(s),!0)},t.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b=function(e){const n=at(e),i=typeof n=="boolean"?n:void 0;return Br(i)?16777215:i?1:0},t.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6=function(e,n){const i=Ph(at(n)),s=Cn(i,Ke.__wbindgen_export,Ke.__wbindgen_export2),l=fn;Kt().setInt32(e+4*1,l,!0),Kt().setInt32(e+4*0,s,!0)},t.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317=function(e,n){return at(e)in at(n)},t.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27=function(e){return typeof at(e)=="bigint"},t.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd=function(e){return typeof at(e)=="function"},t.wbg.__wbg___wbindgen_is_object_ce774f3490692386=function(e){const n=at(e);return typeof n=="object"&&n!==null},t.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030=function(e){return typeof at(e)=="string"},t.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269=function(e){return at(e)===void 0},t.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36=function(e,n){return at(e)===at(n)},t.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d=function(e,n){return at(e)==at(n)},t.wbg.__wbg___wbindgen_number_get_9619185a74197f95=function(e,n){const i=at(n),s=typeof i=="number"?i:void 0;Kt().setFloat64(e+8*1,Br(s)?0:s,!0),Kt().setInt32(e+4*0,!Br(s),!0)},t.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42=function(e,n){const i=at(n),s=typeof i=="string"?i:void 0;var l=Br(s)?0:Cn(s,Ke.__wbindgen_export,Ke.__wbindgen_export2),d=fn;Kt().setInt32(e+4*1,d,!0),Kt().setInt32(e+4*0,l,!0)},t.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(e,n){throw new Error(Or(e,n))},t.wbg.__wbg_call_3020136f7a2d6e44=function(){return Ns(function(e,n,i){const s=at(e).call(at(n),at(i));return _t(s)},arguments)},t.wbg.__wbg_call_abb4ff46ce38be40=function(){return Ns(function(e,n){const i=at(e).call(at(n));return _t(i)},arguments)},t.wbg.__wbg_crypto_86f2631e91b51511=function(e){const n=at(e).crypto;return _t(n)},t.wbg.__wbg_done_62ea16af4ce34b24=function(e){return at(e).done},t.wbg.__wbg_entries_83c79938054e065f=function(e){const n=Object.entries(at(e));return _t(n)},t.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,n){let i,s;try{i=e,s=n,console.error(Or(e,n))}finally{Ke.__wbindgen_export4(i,s,1)}},t.wbg.__wbg_getRandomValues_b3f15fcbfabb0f8b=function(){return Ns(function(e,n){at(e).getRandomValues(at(n))},arguments)},t.wbg.__wbg_get_6b7bd52aca3f9671=function(e,n){const i=at(e)[n>>>0];return _t(i)},t.wbg.__wbg_get_af9dab7e9603ea93=function(){return Ns(function(e,n){const i=Reflect.get(at(e),at(n));return _t(i)},arguments)},t.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,n){const i=at(e)[at(n)];return _t(i)},t.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355=function(e){let n;try{n=at(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Map_084be8da74364158=function(e){let n;try{n=at(e)instanceof Map}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434=function(e){let n;try{n=at(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_isArray_51fd9e6422c0a395=function(e){return Array.isArray(at(e))},t.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16=function(e){return Number.isSafeInteger(at(e))},t.wbg.__wbg_iterator_27b7c8b35ab3e86b=function(){return _t(Symbol.iterator)},t.wbg.__wbg_length_22ac23eaec9d8053=function(e){return at(e).length},t.wbg.__wbg_length_d45040a40c570362=function(e){return at(e).length},t.wbg.__wbg_msCrypto_d562bbe83e0d4b91=function(e){const n=at(e).msCrypto;return _t(n)},t.wbg.__wbg_new_1ba21ce319a06297=function(){const e=new Object;return _t(e)},t.wbg.__wbg_new_25f239778d6112b9=function(){const e=new Array;return _t(e)},t.wbg.__wbg_new_6421f6084cc5bc5a=function(e){const n=new Uint8Array(at(e));return _t(n)},t.wbg.__wbg_new_8a6f238a6ece86ea=function(){const e=new Error;return _t(e)},t.wbg.__wbg_new_b546ae120718850e=function(){return _t(new Map)},t.wbg.__wbg_new_no_args_cb138f77cf6151ee=function(e,n){const i=new Function(Or(e,n));return _t(i)},t.wbg.__wbg_new_with_length_aa5eaf41d35235e5=function(e){const n=new Uint8Array(e>>>0);return _t(n)},t.wbg.__wbg_next_138a17bbf04e926c=function(e){const n=at(e).next;return _t(n)},t.wbg.__wbg_next_3cfe5c0fe2a4cc53=function(){return Ns(function(e){const n=at(e).next();return _t(n)},arguments)},t.wbg.__wbg_node_e1f24f89a7336c2e=function(e){const n=at(e).node;return _t(n)},t.wbg.__wbg_process_3975fd6c72f520aa=function(e){const n=at(e).process;return _t(n)},t.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd=function(e,n,i){Uint8Array.prototype.set.call(Sb(e,n),at(i))},t.wbg.__wbg_randomFillSync_f8c153b79f285817=function(){return Ns(function(e,n){at(e).randomFillSync(Xn(n))},arguments)},t.wbg.__wbg_require_b74f47fc2d022fd6=function(){return Ns(function(){const e=qw.require;return _t(e)},arguments)},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,i){at(e)[Xn(n)]=Xn(i)},t.wbg.__wbg_set_7df433eea03a5c14=function(e,n,i){at(e)[n>>>0]=Xn(i)},t.wbg.__wbg_set_efaaf145b9377369=function(e,n,i){const s=at(e).set(at(n),at(i));return _t(s)},t.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,n){const i=at(n).stack,s=Cn(i,Ke.__wbindgen_export,Ke.__wbindgen_export2),l=fn;Kt().setInt32(e+4*1,l,!0),Kt().setInt32(e+4*0,s,!0)},t.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335=function(){const e=typeof global>"u"?null:global;return Br(e)?0:_t(e)},t.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1=function(){const e=typeof globalThis>"u"?null:globalThis;return Br(e)?0:_t(e)},t.wbg.__wbg_static_accessor_SELF_08f5a74c69739274=function(){const e=typeof self>"u"?null:self;return Br(e)?0:_t(e)},t.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024=function(){const e=typeof window>"u"?null:window;return Br(e)?0:_t(e)},t.wbg.__wbg_subarray_845f2f5bce7d061a=function(e,n,i){const s=at(e).subarray(n>>>0,i>>>0);return _t(s)},t.wbg.__wbg_value_57b7b035e117f7ee=function(e){const n=at(e).value;return _t(n)},t.wbg.__wbg_versions_4e31226f5e8dc909=function(e){const n=at(e).versions;return _t(n)},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){const i=Or(e,n);return _t(i)},t.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(e){const n=BigInt.asUintN(64,e);return _t(n)},t.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return _t(e)},t.wbg.__wbindgen_cast_cb9088102bce6b30=function(e,n){const i=Sb(e,n);return _t(i)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return _t(e)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=at(e);return _t(n)},t.wbg.__wbindgen_object_drop_ref=function(e){Xn(e)},t}function IB(t,e){return Ke=t.exports,Sp.__wbindgen_wasm_module=e,xs=null,tc=null,Ke.__wbindgen_start(),Ke}async function Sp(t){if(Ke!==void 0)return Ke;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("aliasvault_core_bg.wasm",self.location.href));const e=vB();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:i}=await bB(await t,e);return IB(n,i)}const $d={type:"Argon2Id",settings:JSON.stringify({DegreeOfParallelism:1,MemorySize:19456,Iterations:2})},ja=class ja{static async initWasm(){if(!this.wasmInitialized)return this.wasmInitPromise?this.wasmInitPromise:(this.wasmInitPromise=(async()=>{try{const e=Mo.runtime.getURL("src/aliasvault_core_bg.wasm"),i=await(await fetch(e)).arrayBuffer();await Sp({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(),yB()}static bytesToHexString(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("").toUpperCase()}static bytesToBase64(e){return btoa(String.fromCharCode(...e))}static async derivePrivateKey(e,n,i){return await this.initWasm(),fB(e,ja.normalizeUsername(n),i)}static async deriveVerifier(e){return await this.initWasm(),pB(e)}static async generateEphemeral(){return await this.initWasm(),AB()}static async deriveSession(e,n,i,s,l){return await this.initWasm(),hB(e,n,i,ja.normalizeUsername(s),l)}static async prepareCredentials(e,n,i,s){const l=await $t.deriveKeyFromPassword(e,n,i,s);return{passwordHashString:ja.bytesToHexString(l),passwordHashBase64:ja.bytesToBase64(l)}}static generateSrpIdentity(){return crypto.randomUUID()}static async prepareRegistration(e,n){const i=ja.normalizeUsername(e),s=await ja.generateSalt(),l=ja.generateSrpIdentity(),d=await ja.prepareCredentials(n,s,$d.type,$d.settings),m=await ja.derivePrivateKey(s,l,d.passwordHashString),f=await ja.deriveVerifier(m);return{username:i,salt:s,verifier:f,encryptionType:$d.type,encryptionSettings:$d.settings,srpIdentity:l}}static async registerUser(e,n,i){try{const s=await ja.prepareRegistration(n,i),l=e.replace(/\/$/,"")+"/v1/",d=await fetch(`${l}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,n,i,s=!1){try{const l=e.replace(/\/$/,"")+"/v1/",d=ja.normalizeUsername(n),m=await fetch(`${l}Auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:d})});if(!m.ok){const T=await m.text();try{return{success:!1,error:JSON.parse(T).title}}catch{return{success:!1,error:T||"Login initiation failed"}}}const f=await m.json(),g=f.srpIdentity??d,A=await ja.prepareCredentials(i,f.salt,f.encryptionType,f.encryptionSettings),p=await ja.generateEphemeral(),v=await ja.derivePrivateKey(f.salt,g,A.passwordHashString),I=await ja.deriveSession(p.secret,f.serverEphemeral,f.salt,g,v),x=await fetch(`${l}Auth/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:d,rememberMe:s,clientPublicEphemeral:p.public,clientSessionProof:I.proof})});if(!x.ok){const T=await x.text();try{return{success:!1,error:JSON.parse(T).title}}catch{return{success:!1,error:T||"Login validation failed"}}}const N=await x.json();return N.requiresTwoFactor?{success:!1,requiresTwoFactor:!0,loginResponse:f,passwordHashBase64:A.passwordHashBase64}:{success:!0,token:N.token,passwordHashBase64:A.passwordHashBase64,loginResponse:f}}catch(l){return{success:!1,error:l instanceof Error?l.message:"Unknown error occurred"}}}};qe(ja,"wasmInitialized",!1),qe(ja,"wasmInitPromise",null);let En=ja;class qI{constructor(e){qe(this,"webApiService");this.webApiService=e}async initiateLogin(e){const n=En.normalizeUsername(e),i=await this.webApiService.rawFetch("Auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:n})});if(i.status===400){const l=await i.json();throw new ns(l.title)}return await i.json()}async validateLogin(e,n,i,s){const l=En.normalizeUsername(e),d=s.srpIdentity??l,m=await En.generateEphemeral(),f=await En.derivePrivateKey(s.salt,d,n),g=await En.deriveSession(m.secret,s.serverEphemeral,s.salt,d,f),A={username:l,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(A)});if(p.status===400){const I=await p.json();throw new ns(I.title)}return await p.json()}async validateLogin2Fa(e,n,i,s,l){const d=En.normalizeUsername(e),m=s.srpIdentity??d,f=await En.generateEphemeral(),g=await En.derivePrivateKey(s.salt,m,n),A=await En.deriveSession(f.secret,s.serverEphemeral,s.salt,m,g),p={username:d,rememberMe:i,clientPublicEphemeral:f.public,clientSessionProof:A.proof,code2Fa:l},v=await this.webApiService.rawFetch("Auth/validate-2fa",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)});if(v.status===400){const x=await v.json();throw new ns(x.title)}return await v.json()}}var Nu=(t=>(t.UNKNOWN_ERROR="E-001",t.AUTH_STATUS_CHECK_FAILED="E-101",t.AUTH_STATUS_MIGRATION_CHECK_FAILED="E-102",t.AUTH_VERSION_CHECK_FAILED="E-103",t.VAULT_NOT_FOUND="E-201",t.VAULT_LOCKED="E-202",t.VAULT_DECRYPT_FAILED="E-203",t.VAULT_METADATA_READ_FAILED="E-204",t.ITEM_CREATE_FAILED="E-301",t.ITEM_UPDATE_FAILED="E-302",t.ITEM_DELETE_FAILED="E-303",t.ITEM_READ_FAILED="E-304",t.PASSKEY_CREATE_FAILED="E-401",t.PASSKEY_GET_FAILED="E-402",t.SYNC_STATUS_CHECK_FAILED="E-501",t.SYNC_VAULT_FETCH_FAILED="E-502",t.SYNC_VAULT_DECRYPT_FAILED="E-503",t.SYNC_STORE_FAILED="E-504",t.STORAGE_READ_FAILED="E-601",t.STORAGE_WRITE_FAILED="E-602",t.DATABASE_INIT_FAILED="E-603",t.ENCRYPTION_KEY_NOT_FOUND="E-604",t.MERGE_FAILED="E-701",t.MERGE_CONFLICT="E-702",t.MERGE_UPLOAD_FAILED="E-703",t.UPLOAD_FAILED="E-801",t.UPLOAD_OUTDATED="E-802",t.UPLOAD_ENCRYPT_FAILED="E-803",t.MIGRATION_CHECK_FAILED="E-901",t.VERSION_INCOMPATIBLE="E-902",t))(Nu||{});const wB=new Set(Object.values(Nu));function CB(t){return wB.has(t)}function xu(t){const e=t.match(/E-\d{3}/);return e&&CB(e[0])?e[0]:null}function xo(t){return t instanceof Error?xu(t.message)!==null:typeof t=="string"?xu(t)!==null:!1}function as(t,e){return t instanceof Error?t.message:typeof t=="string"?t:e}let nh=!1,Nb=!1;const SB=()=>{const{t}=nt(),e=Ha(),n=Ir(),i=ea(),{setHeaderButtons:s}=wr(),[l,d]=b.useState({username:"",password:""}),{showLoading:m,hideLoading:f,setIsInitialLoading:g}=wa(),[A,p]=b.useState(!0),[v,I]=b.useState(!1),[x,N]=b.useState(null),[T,L]=b.useState(null),[B,k]=b.useState(null),[F,_]=b.useState(!1),[V,U]=b.useState(""),[O,z]=b.useState(null),[Q,K]=b.useState(null),[te,ee]=b.useState(!1),X=Vr(),ue=new qI(X),W=async(Y,ne,Ie)=>{const ce=await Te.getItem("local:encryptedVault"),Ee=await Te.getItem("local:serverRevision"),Ne=await Te.getItem("local:username");let we=Y.vault.blob;if(ce&&Ee!==null){const ze=Ie.toLowerCase().trim(),Et=Ne==null?void 0:Ne.toLowerCase().trim();if(Ne&&Et!==ze)console.info(`Existing vault belongs to different user (${Ne}), using server vault for ${Ie}`);else try{const ht=await $t.symmetricDecrypt(ce,ne);if(Ee>=Y.vault.currentRevisionNumber){console.info(`Existing vault is more advanced (rev ${Ee} >= ${Y.vault.currentRevisionNumber}), preserving local vault and will upload to server`),we=ce,await wt("STORE_VAULT_METADATA",{publicEmailDomainList:Y.vault.publicEmailDomainList,privateEmailDomainList:Y.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:Y.vault.hiddenPrivateEmailDomainList},"background"),await i.loadDatabase(ht);return}console.info(`Server vault is more advanced (rev ${Y.vault.currentRevisionNumber} > ${Ee}), using server vault`)}catch{console.info("Existing vault could not be decrypted (password changed), using server vault")}}await wt("STORE_ENCRYPTED_VAULT",{vaultBlob:Y.vault.blob,serverRevision:Y.vault.currentRevisionNumber},"background"),await wt("STORE_VAULT_METADATA",{publicEmailDomainList:Y.vault.publicEmailDomainList,privateEmailDomainList:Y.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:Y.vault.hiddenPrivateEmailDomainList},"background");const Oe=await $t.symmetricDecrypt(we,ne);await i.loadDatabase(Oe)},ae=async(Y,ne,Ie,ce,Ee)=>{const Ne=await X.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${ne}`}});await n.setAuthTokens(Y,ne,Ie),await i.storeEncryptionKey(ce),await i.storeEncryptionKeyDerivationParams({salt:Ee.salt,encryptionType:Ee.encryptionType,encryptionSettings:Ee.encryptionSettings}),await W(Ne,ce,Y),nh=!1,e("/reinitialize",{replace:!0}),f()};b.useEffect(()=>{(async()=>{const ne=await Te.getItem("local:clientUrl");let Ie=gn.DEFAULT_CLIENT_URL;if(ne&&ne.length>0&&(Ie=ne),z(Ie),!Nb){Nb=!0;const ce=await wt("GET_TWO_FACTOR_STATE",null,"background");if(ce){d({username:ce.username,password:""}),N(ce.loginResponse),L(ce.passwordHashString),k(ce.passwordHashBase64),p(ce.rememberMe),_(!0),g(!1);return}}if(!nh){nh=!0;const ce=await Te.getItem("local:username");ce&&d(Ee=>({...Ee,username:ce}))}g(!1)})()},[g]),b.useEffect(()=>{const Y=Ua.isPopup()?null:c.jsx(c.Fragment,{children:c.jsx(_n,{onClick:()=>Ua.openInNewPopup(),title:"Open in new window",iconType:Wa.EXPAND})});return s(Y),()=>{s(null)}},[s]);const be=async Y=>{Y.preventDefault(),K(null);try{m(),n.clearGlobalMessage();const ne=En.normalizeUsername(l.username),Ie=await ue.initiateLogin(ne),{passwordHashString:ce,passwordHashBase64:Ee}=await En.prepareCredentials(l.password,Ie.salt,Ie.encryptionType,Ie.encryptionSettings),Ne=await ue.validateLogin(ne,ce,A,Ie);if(Ne.requiresTwoFactor){N(Ie),L(ce),k(Ee),_(!0),await wt("STORE_TWO_FACTOR_STATE",{username:ne,loginResponse:Ie,passwordHashString:ce,passwordHashBase64:Ee,rememberMe:A},"background"),f();return}if(!Ne.token)throw new Error(t("common.errors.unknownError"));await ae(ne,Ne.token.token,Ne.token.refreshToken,Ee,Ie)}catch(ne){ne instanceof ns?K(t("common.apiErrors."+ne.message)):xo(ne)?K(as(ne,t("common.errors.serverError"))):K(t("common.errors.serverError")),f()}},se=async Y=>{Y.preventDefault(),K(null);try{if(m(),!T||!B||!x)throw new Error(t("common.errors.unknownError"));const ne=V.trim();if(!/^\d{6}$/.test(ne))throw new Error(t("common.errors.invalidCode"));const Ie=En.normalizeUsername(l.username),ce=await ue.validateLogin2Fa(Ie,T,A,x,parseInt(V));if(!ce.token)throw new Error(t("common.errors.unknownError"));await wt("CLEAR_TWO_FACTOR_STATE",null,"background"),await ae(Ie,ce.token.token,ce.token.refreshToken,B,x),_(!1),U(""),L(null),k(null),N(null)}catch(ne){console.error("2FA error:",ne),ne instanceof ns?K(t("common.apiErrors."+ne.message)):xo(ne)?K(as(ne,t("common.errors.serverError"))):K(t("common.errors.serverError")),f()}},P=async Y=>{m();try{n.clearGlobalMessage();const ne=await X.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${Y.token}`}});await n.setAuthTokens(Y.username,Y.token,Y.refreshToken),await i.storeEncryptionKey(Y.decryptionKey),await i.storeEncryptionKeyDerivationParams({salt:Y.salt,encryptionType:Y.encryptionType,encryptionSettings:Y.encryptionSettings}),await W(ne,Y.decryptionKey,Y.username),f(),g(!1),e("/reinitialize",{replace:!0})}catch(ne){throw K(ne instanceof Error?ne.message:t("common.errors.unknownError")),f(),ne}},q=Y=>{const{name:ne,value:Ie}=Y.target;d(ce=>({...ce,[ne]:Ie}))};return F?c.jsx("div",{children:c.jsxs("form",{onSubmit:se,className:"bg-white dark:bg-gray-700 w-full shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[Q&&c.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:Q}),c.jsxs("div",{className:"mb-6",children:[c.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:t("auth.twoFactorTitle")}),c.jsx("label",{className:"block text-gray-700 dark:text-gray-200 text-sm font-bold mb-2",htmlFor:"twoFactorCode",children:t("auth.authCode")}),c.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:V,onChange:Y=>U(Y.target.value),placeholder:t("auth.authCodePlaceholder"),required:!0})]}),c.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[c.jsx(Sa,{type:"submit",children:t("auth.verify")}),c.jsx(Sa,{type:"button",onClick:async()=>{await wt("CLEAR_TWO_FACTOR_STATE",null,"background"),d({username:"",password:""}),_(!1),U(""),L(null),k(null),N(null),K(null)},variant:"secondary",children:t("common.cancel")})]}),c.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-4 text-center",children:t("auth.twoFactorNote")})]})}):c.jsx("div",{className:"flex flex-col items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md",children:[c.jsxs("form",{onSubmit:be,className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[c.jsxs("div",{className:"text-center mb-6",children:[c.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:t("auth.loginTitle")}),c.jsx(oB,{})]}),Q&&c.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:Q}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"username",children:t("auth.username")}),c.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:t("auth.usernamePlaceholder"),value:l.username,onChange:q,required:!0})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"password",children:t("common.password")}),c.jsxs("div",{className:"relative",children:[c.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:v?"text":"password",name:"password",placeholder:t("auth.passwordPlaceholder"),value:l.password,onChange:q,required:!0}),c.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:()=>I(!v),tabIndex:-1,children:c.jsx(Cp,{type:v?Wa.EYE_OFF:Wa.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),c.jsx("div",{className:"mb-6",children:c.jsxs("label",{className:"flex items-center",children:[c.jsx("input",{type:"checkbox",checked:A,onChange:Y=>p(Y.target.checked),className:"mr-2"}),c.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-200",children:t("auth.rememberMe")})]})}),c.jsx(Sa,{type:"submit",children:c.jsx("div",{className:"flex items-center justify-center gap-2",children:t("auth.loginButton")})}),c.jsxs("button",{type:"button",onClick:()=>ee(!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:[c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.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"})}),t("auth.loginWithMobile")]}),c.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[t("auth.noAccount")," ",c.jsx("a",{href:O??"",target:"_blank",rel:"noopener noreferrer",className:"text-orange-500 hover:text-orange-600 dark:text-orange-400 dark:hover:text-orange-500",children:t("auth.createVault")})]})]}),c.jsx(KI,{isOpen:te,onClose:()=>ee(!1),onSuccess:P,webApi:X,mode:"login"})]})})},ks=({type:t,message:e,className:n=""})=>{const i=()=>{const s="p-3 border rounded-md text-sm";switch(t){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 c.jsx("div",{className:`${i()} ${n}`,children:e})},Np=({isOpen:t,onClose:e,onConfirm:n})=>{const{t:i}=nt(),[s,l]=b.useState(null),d=b.useCallback(async()=>{try{const m=await wt("GET_SYNC_STATE",{},"background");l(m.isDirty)}catch(m){console.error("Failed to check sync state:",m),l(!1)}},[]);return b.useEffect(()=>{t&&(l(null),d())},[t,d]),!t||s===null?null:s?c.jsxs($n,{isOpen:t,onClose:e,maxWidth:"max-w-sm",showHeaderBorder:!1,showCloseButton:!1,bodyClassName:"p-6",children:[c.jsxs("div",{className:"flex items-start mb-4",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsx("svg",{className:"h-6 w-6 text-amber-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:c.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"})})}),c.jsx("div",{className:"ml-3",children:c.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:i("logout.unsyncedChangesTitle")})})]}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:i("logout.unsyncedChangesWarning")}),c.jsxs("div",{className:"flex gap-3",children:[c.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")}),c.jsx("button",{onClick:n,className:"flex-1 px-4 py-2 bg-red-500 hover:bg-red-600 text-white rounded-md transition-colors",children:i("logout.logoutAnyway")})]})]}):c.jsxs($n,{isOpen:t,onClose:e,maxWidth:"max-w-sm",showHeaderBorder:!1,showCloseButton:!1,bodyClassName:"p-6",children:[c.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:i("common.logout")}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:i("auth.logoutConfirm")}),c.jsxs("div",{className:"flex gap-3",children:[c.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")}),c.jsx("button",{onClick:n,className:"flex-1 px-4 py-2 bg-red-500 hover:bg-red-600 text-white rounded-md transition-colors",children:i("common.logout")})]})]})},xb=()=>{var n;const{t}=nt(),{username:e}=Nc();return c.jsxs("div",{className:"flex flex-col items-center mb-6",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center mb-3",children:c.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-2xl font-medium",children:((n=e==null?void 0:e[0])==null?void 0:n.toUpperCase())||"?"})}),c.jsx("p",{className:"font-medium text-gray-900 dark:text-white text-base",children:e}),c.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t("common.loggedIn")})]})},NB=()=>{const{t}=nt(),e=Ir(),n=Nc(),i=ea(),s=Ha(),{setHeaderButtons:l}=wr(),d=Vr(),m=new qI(d),[f,g]=b.useState("password"),[A,p]=b.useState(!1),[v,I]=b.useState(""),[x,N]=b.useState(!1),[T,L]=b.useState(""),[B,k]=b.useState(6),F=b.useRef(null),_=b.useRef(null),[V,U]=b.useState(null),{showLoading:O,hideLoading:z,setIsInitialLoading:Q}=wa(),[K,te]=b.useState(!1),[ee,X]=b.useState(!1),ue=async()=>{try{const Ne=await d.getStatus();if(Ne.serverVersion==="0.0.0")return Q(!1),await i.setIsOffline(!0),{online:!1,error:null};const we=d.validateStatusResponse(Ne);return we!==null?(await e.logout(t("common.errors."+we)),{online:!1,error:we}):(Q(!1),await i.setIsOffline(!1),{online:!0,error:null})}catch{return Q(!1),{online:!1,error:"sessionExpired"}}};b.useEffect(()=>{(async()=>{const[we,Oe]=await Promise.all([yI(),RD()]);p(we),k(Oe||6),g(we?"pin":"password"),await ue()})()},[]),b.useEffect(()=>{const Ne=Ua.isPopup()?null:c.jsx(_n,{onClick:()=>Ua.openInNewPopup(),title:t("common.openInNewWindow"),iconType:Wa.EXPAND});return l(Ne),()=>{l(null)}},[l,t]),b.useEffect(()=>{if(f!=="pin")return;const Ne=()=>{F.current&&F.current.focus()},we=()=>{Ne()},Oe=()=>{Ne()};Ne();const ze=_.current;return ze&&ze.addEventListener("click",we),window.addEventListener("focus",Oe),()=>{ze&&ze.removeEventListener("click",we),window.removeEventListener("focus",Oe)}},[f]);const W=async Ne=>{Ne.preventDefault(),U(null),O();const we=await ue();if(we.error){z();return}try{let Oe;if(we.online){const Et=await m.initiateLogin(n.username);Oe=(await En.prepareCredentials(v,Et.salt,Et.encryptionType,Et.encryptionSettings)).passwordHashBase64,await i.storeEncryptionKeyDerivationParams({salt:Et.salt,encryptionType:Et.encryptionType,encryptionSettings:Et.encryptionSettings})}else{const Et=await wt("GET_ENCRYPTION_KEY_DERIVATION_PARAMS",{},"background");if(!Et){U(t("common.errors.serverNotAvailable")),z();return}Oe=(await En.prepareCredentials(v,Et.salt,Et.encryptionType,Et.encryptionSettings)).passwordHashBase64,await i.setIsOffline(!0)}await i.storeEncryptionKey(Oe);const ze=await i.loadStoredDatabase();if(!ze)throw new Error(t("common.errors.wrongPassword"));if(await ze.hasPendingMigrations()){s("/upgrade",{replace:!0}),z();return}await lt.setVaultLockedDismissUntil(0),await OE(),s("/reinitialize",{replace:!0})}catch(Oe){Oe instanceof hc?await e.logout(Oe.message):xo(Oe)?xu(as(Oe,""))===Nu.VAULT_DECRYPT_FAILED?U(t("common.errors.wrongPassword")):U(as(Oe,t("common.errors.wrongPassword"))):U(t("common.errors.wrongPassword")),console.error("Unlock error:",Oe)}finally{z()}},ae=b.useCallback(async Ne=>{L(Ne),U(null),Ne.length===B&&(await new Promise(we=>setTimeout(we,50)),await P(Ne))},[B]),be=Ne=>{T.length<8&&ae(T+Ne)},se=()=>{L(T.slice(0,-1)),U(null)},P=async(Ne=T)=>{if(Ne.length===B){U(null),O();try{const we=await UD(Ne);(await ue()).online||await i.setIsOffline(!0),await i.storeEncryptionKey(we);const ze=await i.loadStoredDatabase();if(!ze)throw new Mh(3);if(await ze.hasPendingMigrations()){s("/upgrade",{replace:!0}),z();return}await lt.setVaultLockedDismissUntil(0),s("/reinitialize",{replace:!0}),z()}catch(we){if(we instanceof mu)p(!1),g("password"),U(t("settings.unlockMethod.pinLocked"));else if(we instanceof Mh){const Oe=we.attemptsRemaining;U(Oe===1?t("settings.unlockMethod.incorrectPinSingular"):t("settings.unlockMethod.incorrectPin",{attemptsRemaining:Oe})),L("")}else we instanceof pc?(U(t("settings.unlockMethod.invalidPinFormat")),L("")):xo(we)?(xu(as(we,""))===Nu.VAULT_DECRYPT_FAILED?(console.error("PIN unlock failed (decryption error):",we),U(t("settings.unlockMethod.incorrectPin",{attemptsRemaining:3}))):(console.error("PIN unlock failed:",we),U(as(we,t("common.errors.unknownErrorTryAgain")))),L("")):(console.error("PIN unlock failed:",we),U(t("common.errors.unknownErrorTryAgain")),L(""));z()}}},q=()=>{X(!0)},Y=async()=>{X(!1);try{await d.revokeTokens(),await n.clearAuthUserInitiated()}catch(Ne){console.error("Error during logout:",Ne)}},ne=async Ne=>{O();try{await d.revokeCurrentTokens(),await n.setAuthTokens(Ne.username,Ne.token,Ne.refreshToken),await i.storeEncryptionKey(Ne.decryptionKey),await i.storeEncryptionKeyDerivationParams({salt:Ne.salt,encryptionType:Ne.encryptionType,encryptionSettings:Ne.encryptionSettings});const we=await i.loadStoredDatabase();if(!we)throw new Error(t("common.errors.unknownErrorTryAgain"));if(await we.hasPendingMigrations()){s("/upgrade",{replace:!0}),z();return}await lt.setVaultLockedDismissUntil(0),await OE(),s("/reinitialize",{replace:!0})}catch(we){we instanceof hc?await e.logout(we.message):xo(we)?U(as(we,t("common.errors.unknownErrorTryAgain"))):U(t("common.errors.unknownErrorTryAgain")),console.error("Mobile unlock error:",we)}finally{z()}},Ie=()=>{g("password"),U(null)},ce=()=>{g("pin"),U(null)},Ee=Array.from({length:B},(Ne,we)=>c.jsx("div",{className:`w-4 h-4 rounded-full border-2 transition-all ${we<T.length?"bg-primary-500 border-primary-500":"bg-transparent border-gray-300 dark:border-gray-600"}`},we));return f==="pin"?c.jsx("div",{ref:_,className:"flex flex-col items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md",children:[c.jsx(xb,{}),c.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[c.jsxs("div",{className:"text-center mb-4",children:[c.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white mb-1",children:t("auth.unlockTitle")}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:t("auth.enterPinToUnlock")})]}),c.jsx("div",{className:"flex justify-center gap-2 mb-4",children:Ee}),V&&c.jsx(ks,{type:"error",message:V,className:"mb-3 text-center"}),c.jsx("input",{ref:F,type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:T,onChange:Ne=>ae(Ne.target.value.replace(/\D/g,"")),className:"w-0 h-0 opacity-0 absolute",autoFocus:!0,"aria-label":"PIN input"}),c.jsx("div",{children:c.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[[1,2,3,4,5,6,7,8,9].map(Ne=>c.jsx("button",{type:"button",onClick:()=>be(Ne.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:Ne},Ne)),c.jsx("div",{}),c.jsx("button",{type:"button",onClick:()=>be("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"}),c.jsx("button",{type:"button",onClick:se,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:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})})})]})})]}),c.jsx("div",{className:"mt-4",children:c.jsx("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:c.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:t("auth.useMasterPassword")})})})]})}):c.jsxs("div",{className:"flex flex-col items-center justify-center p-4",children:[c.jsxs("div",{className:"w-full max-w-md",children:[c.jsx(xb,{}),c.jsxs("form",{onSubmit:W,className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[c.jsx("div",{className:"text-center mb-6",children:c.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:t("auth.unlockTitle")})}),V&&c.jsx(ks,{type:"error",message:V,className:"mb-4 text-center"}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"password",children:t("auth.masterPassword")}),c.jsxs("div",{className:"relative",children:[c.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:v,onChange:Ne=>I(Ne.target.value),placeholder:t("auth.passwordPlaceholder"),required:!0,autoFocus:!0}),c.jsx("button",{type:"button",className:"absolute right-2 top-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",onClick:()=>N(!x),tabIndex:-1,children:c.jsx(Cp,{type:x?Wa.EYE_OFF:Wa.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),c.jsx(Sa,{type:"submit",children:t("auth.unlockVault")}),!i.isOffline&&c.jsxs("button",{type:"button",onClick:()=>te(!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:[c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.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"})}),t("auth.unlockWithMobile")]}),c.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[t("auth.switchAccounts")," ",c.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:t("common.logout")})]})]})]}),A&&c.jsx("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:c.jsx("button",{type:"button",onClick:ce,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:t("auth.unlockWithPin")})}),c.jsx(KI,{isOpen:K,onClose:()=>te(!1),onSuccess:ne,webApi:d,mode:"unlock"}),c.jsx(Np,{isOpen:ee,onClose:()=>X(!1),onConfirm:Y})]})},Tb=2.5,xB=()=>{const t=Ha(),{t:e}=nt(),[n,i]=b.useState(!1),[s,l]=b.useState(null),[d,m]=b.useState(!0),f=b.useRef(null),g=b.useRef(null),A=b.useCallback(()=>{f.current&&(clearInterval(f.current),f.current=null)},[]),p=b.useCallback(()=>{var T;A(),l(Tb),(T=g.current)==null||T.startAnimation(Tb),f.current=setInterval(()=>{l(L=>L===null||L<=1?(A(),window.close(),null):L-1)},1e3)},[A]),v=b.useCallback(()=>{var T;A(),l(null),(T=g.current)==null||T.stopAnimation()},[A]),I=async T=>{i(T),await lt.setAutoCloseUnlockPopup(T),T?p():v()},x=()=>{v();const T=new URL(window.location.href);T.searchParams.delete("mode"),window.history.replaceState({},"",T),t("/items")},N=()=>{v(),window.close()};return b.useEffect(()=>((async()=>{const L=await lt.getAutoCloseUnlockPopup();i(L),m(!1),L&&setTimeout(()=>{p()},0)})(),()=>{A()}),[A,p]),c.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center",children:[c.jsx(gp,{ref:g,isVisible:s!==null,colorClass:"bg-primary-500"}),c.jsx("div",{className:"mb-4 text-green-600 dark:text-green-400",children:c.jsx("svg",{className:"w-12 h-12 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})})}),c.jsx("h2",{className:"text-xl font-semibold mb-4 text-gray-900 dark:text-white",children:e("auth.unlockSuccessTitle")}),c.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-400",children:e("auth.unlockSuccessDescription")}),c.jsxs("div",{className:"space-y-3 w-full",children:[c.jsx("button",{onClick:N,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")}),c.jsx("button",{onClick:x,className:"w-full px-4 py-2 text-gray-900 bg-white border border-gray-300 rounded hover:bg-gray-50 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 dark:border-gray-600",children:e("auth.browseVault")})]}),c.jsx("div",{className:"w-full mt-6 pt-4 border-t border-gray-200 dark:border-gray-700",children:c.jsxs("label",{className:"flex items-center justify-center gap-2 cursor-pointer text-xs text-gray-400 dark:text-gray-500",children:[c.jsx("input",{type:"checkbox",checked:n,onChange:T=>I(T.target.checked),disabled:d,className:"w-3.5 h-3.5 rounded border-gray-300 text-gray-400 focus:ring-gray-400 dark:border-gray-600 dark:bg-gray-700"}),c.jsx("span",{children:e("auth.autoCloseUnlockPopup")})]})})]})},Tu=({isOpen:t,onClose:e,onConfirm:n,title:i,message:s,confirmText:l="",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 c.jsxs($n,{isOpen:t,onClose:e,maxWidth:"max-w-lg",showHeaderBorder:!1,bodyClassName:"px-4 pb-4 pt-5",children:[c.jsxs("div",{className:"sm:flex sm:items-start",children:[m==="danger"&&c.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:c.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:c.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"})})}),c.jsxs("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[c.jsx("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white",children:i}),c.jsx("div",{className:"mt-2",children:c.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})})]})]}),c.jsxs("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[l&&c.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:n,children:l}),d&&c.jsx("button",{type:"button",className:"mt-3 inline-flex w-full justify-center rounded-md bg-white dark:bg-gray-700 px-3 py-2 text-sm font-semibold text-gray-900 dark:text-gray-200 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-primary-500 sm:mt-0 sm:w-auto",onClick:e,children:d})]})]})};function Fs(){const t=ea(),e=b.useCallback(async s=>{await s();const l=t.sqliteClient.exportToBase64(),d=await wt("GET_ENCRYPTION_KEY",{},"background"),m=await $t.symmetricEncrypt(l,d);await wt("STORE_ENCRYPTED_VAULT",{vaultBlob:m,markDirty:!0},"background"),await t.refreshSyncState()},[t]),n=b.useCallback(()=>{t.setIsUploading(!0),wt("FULL_VAULT_SYNC",{},"background").then(async s=>{s.hasNewVault&&await t.loadStoredDatabase(),await t.refreshSyncState()}).catch(s=>{console.error("Background sync error:",s)}).finally(()=>{t.setIsUploading(!1)})},[t]);return{executeVaultMutationAsync:b.useCallback(async s=>{await e(s),n()},[e,n])}}const xp=()=>{const{t}=nt(),e=Ir(),n=ea();return{syncVault:b.useCallback(async(s={})=>{const{onSuccess:l,onError:d,onStatus:m,onOffline:f,onUpgradeRequired:g}=s;try{if(!await e.initializeAuth())return!1;m==null||m(t("common.checkingVaultUpdates"));const p=await wt("CHECK_SYNC_STATUS",{},"background");if(p.requiresLogout){const I=p.errorKey?t("common.errors."+p.errorKey):void 0;return await e.logout(I),!1}p.hasNewerVault?n.setIsSyncing(!0):p.hasDirtyChanges&&!p.isOffline&&n.setIsUploading(!0);const v=await wt("FULL_VAULT_SYNC",{},"background");if(v.requiresLogout){const I=v.errorKey?t("common.errors."+v.errorKey):v.error;return await e.logout(I),!1}if(v.wasOffline)return await n.setIsOffline(!0),m==null||m(t("common.offlineMode")),f==null||f(),l==null||l(!1),!0;if(n.isOffline&&await n.setIsOffline(!1),v.upgradeRequired)return g==null||g(),!1;if(!v.success){const I=v.errorKey?t("common.errors."+v.errorKey):v.error??t("common.errors.unknownError");return d==null||d(I),!1}return v.hasNewVault&&(m==null||m(t("common.syncingUpdatedVault")),await n.loadStoredDatabase()),await n.refreshSyncState(),l==null||l(v.hasNewVault),!0}catch(A){const p=A instanceof Error?A.message:"Unknown error during vault sync";return console.error("Vault sync error:",A),d==null||d(p),!1}finally{n.setIsSyncing(!1),n.setIsUploading(!1)}},[e,n,t])}},TB=()=>{var W;const{t}=nt(),{username:e}=Ir(),n=Nc(),i=ea(),{sqliteClient:s}=i,{setHeaderButtons:l}=wr(),[d,m]=b.useState(!1),[f,g]=b.useState(null),[A,p]=b.useState(null),[v,I]=b.useState(null),[x,N]=b.useState(!1),[T,L]=b.useState(!1),[B,k]=b.useState(!1),{setIsInitialLoading:F}=wa(),_=Vr(),{executeVaultMutationAsync:V}=Fs(),{syncVault:U}=xp(),O=Ha();b.useEffect(()=>{const ae=Ua.isPopup()?null:c.jsx(c.Fragment,{children:c.jsx(_n,{onClick:()=>Ua.openInNewPopup(),title:t("common.openInNewWindow"),iconType:Wa.EXPAND})});return l(ae),()=>{l(null)}},[l,t]);const z=b.useCallback(async()=>{try{if(s){const ae=await s.getDatabaseVersion(),be=await s.getLatestDatabaseVersion();g(ae),p(be)}}catch(ae){console.error("Failed to load version information:",ae),I(t("upgrade.alerts.unableToGetVersionInfo"))}finally{F(!1)}},[s,F,t]);b.useEffect(()=>{z()},[z]);const Q=async()=>{if(!s||!f||!A){I(t("upgrade.alerts.unableToGetVersionInfo"));return}if(await _.isSelfHosted()){N(!0);return}await K()},K=async()=>{if(!s||!f||!A){I(t("upgrade.alerts.unableToGetVersionInfo"));return}m(!0),I(null);try{const be=new Rh().getUpgradeVaultSql(f.revision,A.revision);if(!be.success)throw new Error(be.error??t("upgrade.alerts.upgradeFailed"));if(be.sqlCommands.length===0){await te();return}await V(async()=>{for(let se=0;se<be.sqlCommands.length;se++){const P=be.sqlCommands[se];try{s.executeRaw(P)}catch(q){throw console.error(`Error executing SQL command ${se+1}:`,P,q),new Error(t("upgrade.alerts.failedToApplyMigration",{current:se+1,total:be.sqlCommands.length}))}}}),await te()}catch(ae){console.error("Upgrade failed:",ae),I(ae instanceof Error?ae.message:t("common.errors.unknownError"))}finally{m(!1)}},te=async()=>{try{await U({onSuccess:()=>{O("/items")},onError:ae=>{console.error("Sync error after upgrade:",ae),O("/items")}})}catch(ae){console.error("Error during post-upgrade sync:",ae),O("/items")}},ee=()=>{k(!0)},X=async()=>{k(!1);try{await _.revokeTokens(),await n.clearAuthUserInitiated()}catch(ae){console.error("Error during logout:",ae)}},ue=()=>{L(!0)};return c.jsxs("div",{children:[d&&c.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:[c.jsx(ur,{}),c.jsx("div",{className:"text-sm text-gray-500 mt-2",children:t("upgrade.upgrading")})]}),c.jsx(Tu,{isOpen:x,onClose:()=>N(!1),onConfirm:()=>{N(!1),K()},title:t("upgrade.alerts.selfHostedServer"),message:t("upgrade.alerts.selfHostedWarning"),confirmText:t("upgrade.alerts.continueUpgrade"),cancelText:t("common.cancel")}),c.jsx(Tu,{isOpen:T,onClose:()=>L(!1),onConfirm:()=>L(!1),title:t("upgrade.whatsNew"),message:`${t("upgrade.whatsNewDescription")}

${(A==null?void 0:A.description)??t("upgrade.noDescriptionAvailable")}`}),c.jsxs("form",{className:"w-full px-2 pt-2 pb-2 mb-4",children:[v&&c.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400",children:v}),c.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:c.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((W=e==null?void 0:e[0])==null?void 0:W.toUpperCase())||"?"})})}),c.jsx("div",{children:c.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:e})})]}),c.jsx("h2",{className:"text-xl font-bold dark:text-gray-200 mb-4",children:t("upgrade.title")}),c.jsxs("div",{className:"mb-6",children:[c.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:t("upgrade.subtitle")}),c.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded p-4 mb-4",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsx("span",{className:"font-medium text-gray-700 dark:text-gray-200",children:t("upgrade.versionInformation")}),c.jsx("button",{type:"button",onClick:ue,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:t("upgrade.whatsNew"),children:"?"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:t("upgrade.yourVault")}),c.jsx("span",{className:"text-sm font-bold text-orange-600 dark:text-orange-400",children:(f==null?void 0:f.compatibleUpToVersion)??"..."})]}),c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:t("upgrade.newVersion")}),c.jsx("span",{className:"text-sm font-bold text-green-600 dark:text-green-400",children:(A==null?void 0:A.releaseVersion)??"..."})]})]})]})]}),c.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[c.jsx(Sa,{type:"button",id:"upgrade-button",onClick:Q,children:t(d?"upgrade.upgrading":"upgrade.upgrade")}),c.jsx("button",{type:"button",onClick:ee,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:t("common.logout")})]})]}),c.jsx(Np,{isOpen:B,onClose:()=>k(!1),onConfirm:X})]})};/*! @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:WI,setPrototypeOf:kb,isFrozen:kB,getPrototypeOf:LB,getOwnPropertyDescriptor:DB}=Object;let{freeze:Sn,seal:mr,create:Hh}=Object,{apply:zh,construct:Vh}=typeof Reflect<"u"&&Reflect;Sn||(Sn=function(e){return e});mr||(mr=function(e){return e});zh||(zh=function(e,n){for(var i=arguments.length,s=new Array(i>2?i-2:0),l=2;l<i;l++)s[l-2]=arguments[l];return e.apply(n,s)});Vh||(Vh=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return new e(...i)});const Zd=Nn(Array.prototype.forEach),RB=Nn(Array.prototype.lastIndexOf),Lb=Nn(Array.prototype.pop),zl=Nn(Array.prototype.push),BB=Nn(Array.prototype.splice),pu=Nn(String.prototype.toLowerCase),rh=Nn(String.prototype.toString),ih=Nn(String.prototype.match),Vl=Nn(String.prototype.replace),UB=Nn(String.prototype.indexOf),MB=Nn(String.prototype.trim),yr=Nn(Object.prototype.hasOwnProperty),wn=Nn(RegExp.prototype.test),Ql=_B(TypeError);function Nn(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return zh(t,e,i)}}function _B(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return Vh(t,n)}}function Mt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pu;kb&&kb(t,null);let i=e.length;for(;i--;){let s=e[i];if(typeof s=="string"){const l=n(s);l!==s&&(kB(e)||(e[i]=l),s=l)}t[s]=!0}return t}function FB(t){for(let e=0;e<t.length;e++)yr(t,e)||(t[e]=null);return t}function Mr(t){const e=Hh(null);for(const[n,i]of WI(t))yr(t,n)&&(Array.isArray(i)?e[n]=FB(i):i&&typeof i=="object"&&i.constructor===Object?e[n]=Mr(i):e[n]=i);return e}function Kl(t,e){for(;t!==null;){const i=DB(t,e);if(i){if(i.get)return Nn(i.get);if(typeof i.value=="function")return Nn(i.value)}t=LB(t)}function n(){return null}return n}const Db=Sn(["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"]),sh=Sn(["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"]),oh=Sn(["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"]),OB=Sn(["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"]),lh=Sn(["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"]),jB=Sn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Rb=Sn(["#text"]),Bb=Sn(["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"]),ch=Sn(["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"]),Ub=Sn(["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"]),eu=Sn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),PB=mr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),HB=mr(/<%[\w\W]*|[\w\W]*%>/gm),zB=mr(/\$\{[\w\W]*/gm),VB=mr(/^data-[\-\w.\u00B7-\uFFFF]+$/),QB=mr(/^aria-[\-\w]+$/),YI=mr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),KB=mr(/^(?:\w+script|data):/i),GB=mr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),JI=mr(/^html$/i),qB=mr(/^[a-z][.\w]*(-[.\w]+)+$/i);var Mb=Object.freeze({__proto__:null,ARIA_ATTR:QB,ATTR_WHITESPACE:GB,CUSTOM_ELEMENT:qB,DATA_ATTR:VB,DOCTYPE_NAME:JI,ERB_EXPR:HB,IS_ALLOWED_URI:YI,IS_SCRIPT_OR_DATA:KB,MUSTACHE_EXPR:PB,TMPLIT_EXPR:zB});const Gl={element:1,text:3,progressingInstruction:7,comment:8,document:9},WB=function(){return typeof window>"u"?null:window},YB=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(i=n.getAttribute(s));const l="dompurify"+(i?"#"+i:"");try{return e.createPolicy(l,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},_b=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function XI(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:WB();const e=Ue=>XI(Ue);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==Gl.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const i=n,s=i.currentScript,{DocumentFragment:l,HTMLTemplateElement:d,Node:m,Element:f,NodeFilter:g,NamedNodeMap:A=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:v,trustedTypes:I}=t,x=f.prototype,N=Kl(x,"cloneNode"),T=Kl(x,"remove"),L=Kl(x,"nextSibling"),B=Kl(x,"childNodes"),k=Kl(x,"parentNode");if(typeof d=="function"){const Ue=n.createElement("template");Ue.content&&Ue.content.ownerDocument&&(n=Ue.content.ownerDocument)}let F,_="";const{implementation:V,createNodeIterator:U,createDocumentFragment:O,getElementsByTagName:z}=n,{importNode:Q}=i;let K=_b();e.isSupported=typeof WI=="function"&&typeof k=="function"&&V&&V.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:te,ERB_EXPR:ee,TMPLIT_EXPR:X,DATA_ATTR:ue,ARIA_ATTR:W,IS_SCRIPT_OR_DATA:ae,ATTR_WHITESPACE:be,CUSTOM_ELEMENT:se}=Mb;let{IS_ALLOWED_URI:P}=Mb,q=null;const Y=Mt({},[...Db,...sh,...oh,...lh,...Rb]);let ne=null;const Ie=Mt({},[...Bb,...ch,...Ub,...eu]);let ce=Object.seal(Hh(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}})),Ee=null,Ne=null;const we=Object.seal(Hh(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oe=!0,ze=!0,Et=!1,ht=!0,it=!1,Ge=!0,Ft=!1,Se=!1,Fe=!1,he=!1,De=!1,Ve=!1,He=!0,tt=!1;const It="user-content-";let Ot=!0,Tt=!1,Yt={},M=null;const C=Mt({},["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 S=null;const G=Mt({},["audio","video","img","source","image","track"]);let re=null;const pe=Mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ce="http://www.w3.org/1998/Math/MathML",_e="http://www.w3.org/2000/svg",ct="http://www.w3.org/1999/xhtml";let gt=ct,St=!1,pt=null;const gr=Mt({},[Ce,_e,ct],rh);let ca=Mt({},["mi","mo","mn","ms","mtext"]),nn=Mt({},["annotation-xml"]);const Rt=Mt({},["title","style","font","a","script"]);let ta=null;const Me=["application/xhtml+xml","text/html"],rn="text/html";let Nt=null,kt=null;const ka=n.createElement("form"),sn=function(J){return J instanceof RegExp||J instanceof Function},zt=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kt&&kt===J)){if((!J||typeof J!="object")&&(J={}),J=Mr(J),ta=Me.indexOf(J.PARSER_MEDIA_TYPE)===-1?rn:J.PARSER_MEDIA_TYPE,Nt=ta==="application/xhtml+xml"?rh:pu,q=yr(J,"ALLOWED_TAGS")?Mt({},J.ALLOWED_TAGS,Nt):Y,ne=yr(J,"ALLOWED_ATTR")?Mt({},J.ALLOWED_ATTR,Nt):Ie,pt=yr(J,"ALLOWED_NAMESPACES")?Mt({},J.ALLOWED_NAMESPACES,rh):gr,re=yr(J,"ADD_URI_SAFE_ATTR")?Mt(Mr(pe),J.ADD_URI_SAFE_ATTR,Nt):pe,S=yr(J,"ADD_DATA_URI_TAGS")?Mt(Mr(G),J.ADD_DATA_URI_TAGS,Nt):G,M=yr(J,"FORBID_CONTENTS")?Mt({},J.FORBID_CONTENTS,Nt):C,Ee=yr(J,"FORBID_TAGS")?Mt({},J.FORBID_TAGS,Nt):Mr({}),Ne=yr(J,"FORBID_ATTR")?Mt({},J.FORBID_ATTR,Nt):Mr({}),Yt=yr(J,"USE_PROFILES")?J.USE_PROFILES:!1,Oe=J.ALLOW_ARIA_ATTR!==!1,ze=J.ALLOW_DATA_ATTR!==!1,Et=J.ALLOW_UNKNOWN_PROTOCOLS||!1,ht=J.ALLOW_SELF_CLOSE_IN_ATTR!==!1,it=J.SAFE_FOR_TEMPLATES||!1,Ge=J.SAFE_FOR_XML!==!1,Ft=J.WHOLE_DOCUMENT||!1,he=J.RETURN_DOM||!1,De=J.RETURN_DOM_FRAGMENT||!1,Ve=J.RETURN_TRUSTED_TYPE||!1,Fe=J.FORCE_BODY||!1,He=J.SANITIZE_DOM!==!1,tt=J.SANITIZE_NAMED_PROPS||!1,Ot=J.KEEP_CONTENT!==!1,Tt=J.IN_PLACE||!1,P=J.ALLOWED_URI_REGEXP||YI,gt=J.NAMESPACE||ct,ca=J.MATHML_TEXT_INTEGRATION_POINTS||ca,nn=J.HTML_INTEGRATION_POINTS||nn,ce=J.CUSTOM_ELEMENT_HANDLING||{},J.CUSTOM_ELEMENT_HANDLING&&sn(J.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ce.tagNameCheck=J.CUSTOM_ELEMENT_HANDLING.tagNameCheck),J.CUSTOM_ELEMENT_HANDLING&&sn(J.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ce.attributeNameCheck=J.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),J.CUSTOM_ELEMENT_HANDLING&&typeof J.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ce.allowCustomizedBuiltInElements=J.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),it&&(ze=!1),De&&(he=!0),Yt&&(q=Mt({},Rb),ne=[],Yt.html===!0&&(Mt(q,Db),Mt(ne,Bb)),Yt.svg===!0&&(Mt(q,sh),Mt(ne,ch),Mt(ne,eu)),Yt.svgFilters===!0&&(Mt(q,oh),Mt(ne,ch),Mt(ne,eu)),Yt.mathMl===!0&&(Mt(q,lh),Mt(ne,Ub),Mt(ne,eu))),J.ADD_TAGS&&(typeof J.ADD_TAGS=="function"?we.tagCheck=J.ADD_TAGS:(q===Y&&(q=Mr(q)),Mt(q,J.ADD_TAGS,Nt))),J.ADD_ATTR&&(typeof J.ADD_ATTR=="function"?we.attributeCheck=J.ADD_ATTR:(ne===Ie&&(ne=Mr(ne)),Mt(ne,J.ADD_ATTR,Nt))),J.ADD_URI_SAFE_ATTR&&Mt(re,J.ADD_URI_SAFE_ATTR,Nt),J.FORBID_CONTENTS&&(M===C&&(M=Mr(M)),Mt(M,J.FORBID_CONTENTS,Nt)),J.ADD_FORBID_CONTENTS&&(M===C&&(M=Mr(M)),Mt(M,J.ADD_FORBID_CONTENTS,Nt)),Ot&&(q["#text"]=!0),Ft&&Mt(q,["html","head","body"]),q.table&&(Mt(q,["tbody"]),delete Ee.tbody),J.TRUSTED_TYPES_POLICY){if(typeof J.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ql('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof J.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ql('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');F=J.TRUSTED_TYPES_POLICY,_=F.createHTML("")}else F===void 0&&(F=YB(I,s)),F!==null&&typeof _=="string"&&(_=F.createHTML(""));Sn&&Sn(J),kt=J}},Lt=Mt({},[...sh,...oh,...OB]),Gt=Mt({},[...lh,...jB]),Vt=function(J){let ke=k(J);(!ke||!ke.tagName)&&(ke={namespaceURI:gt,tagName:"template"});const je=pu(J.tagName),jt=pu(ke.tagName);return pt[J.namespaceURI]?J.namespaceURI===_e?ke.namespaceURI===ct?je==="svg":ke.namespaceURI===Ce?je==="svg"&&(jt==="annotation-xml"||ca[jt]):!!Lt[je]:J.namespaceURI===Ce?ke.namespaceURI===ct?je==="math":ke.namespaceURI===_e?je==="math"&&nn[jt]:!!Gt[je]:J.namespaceURI===ct?ke.namespaceURI===_e&&!nn[jt]||ke.namespaceURI===Ce&&!ca[jt]?!1:!Gt[je]&&(Rt[je]||!Lt[je]):!!(ta==="application/xhtml+xml"&&pt[J.namespaceURI]):!1},pa=function(J){zl(e.removed,{element:J});try{k(J).removeChild(J)}catch{T(J)}},Aa=function(J,ke){try{zl(e.removed,{attribute:ke.getAttributeNode(J),from:ke})}catch{zl(e.removed,{attribute:null,from:ke})}if(ke.removeAttribute(J),J==="is")if(he||De)try{pa(ke)}catch{}else try{ke.setAttribute(J,"")}catch{}},Ma=function(J){let ke=null,je=null;if(Fe)J="<remove></remove>"+J;else{const ua=ih(J,/^[\r\n\t ]+/);je=ua&&ua[0]}ta==="application/xhtml+xml"&&gt===ct&&(J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>");const jt=F?F.createHTML(J):J;if(gt===ct)try{ke=new v().parseFromString(jt,ta)}catch{}if(!ke||!ke.documentElement){ke=V.createDocument(gt,"template",null);try{ke.documentElement.innerHTML=St?_:jt}catch{}}const da=ke.body||ke.documentElement;return J&&je&&da.insertBefore(n.createTextNode(je),da.childNodes[0]||null),gt===ct?z.call(ke,Ft?"html":"body")[0]:Ft?ke.documentElement:da},hn=function(J){return U.call(J.ownerDocument||J,J,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},_a=function(J){return J instanceof p&&(typeof J.nodeName!="string"||typeof J.textContent!="string"||typeof J.removeChild!="function"||!(J.attributes instanceof A)||typeof J.removeAttribute!="function"||typeof J.setAttribute!="function"||typeof J.namespaceURI!="string"||typeof J.insertBefore!="function"||typeof J.hasChildNodes!="function")},ya=function(J){return typeof m=="function"&&J instanceof m};function oe(Ue,J,ke){Zd(Ue,je=>{je.call(e,J,ke,kt)})}const Pe=function(J){let ke=null;if(oe(K.beforeSanitizeElements,J,null),_a(J))return pa(J),!0;const je=Nt(J.nodeName);if(oe(K.uponSanitizeElement,J,{tagName:je,allowedTags:q}),Ge&&J.hasChildNodes()&&!ya(J.firstElementChild)&&wn(/<[/\w!]/g,J.innerHTML)&&wn(/<[/\w!]/g,J.textContent)||J.nodeType===Gl.progressingInstruction||Ge&&J.nodeType===Gl.comment&&wn(/<[/\w]/g,J.data))return pa(J),!0;if(!(we.tagCheck instanceof Function&&we.tagCheck(je))&&(!q[je]||Ee[je])){if(!Ee[je]&&$e(je)&&(ce.tagNameCheck instanceof RegExp&&wn(ce.tagNameCheck,je)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(je)))return!1;if(Ot&&!M[je]){const jt=k(J)||J.parentNode,da=B(J)||J.childNodes;if(da&&jt){const ua=da.length;for(let ra=ua-1;ra>=0;--ra){const za=N(da[ra],!0);za.__removalCount=(J.__removalCount||0)+1,jt.insertBefore(za,L(J))}}}return pa(J),!0}return J instanceof f&&!Vt(J)||(je==="noscript"||je==="noembed"||je==="noframes")&&wn(/<\/no(script|embed|frames)/i,J.innerHTML)?(pa(J),!0):(it&&J.nodeType===Gl.text&&(ke=J.textContent,Zd([te,ee,X],jt=>{ke=Vl(ke,jt," ")}),J.textContent!==ke&&(zl(e.removed,{element:J.cloneNode()}),J.textContent=ke)),oe(K.afterSanitizeElements,J,null),!1)},Qe=function(J,ke,je){if(He&&(ke==="id"||ke==="name")&&(je in n||je in ka))return!1;if(!(ze&&!Ne[ke]&&wn(ue,ke))){if(!(Oe&&wn(W,ke))){if(!(we.attributeCheck instanceof Function&&we.attributeCheck(ke,J))){if(!ne[ke]||Ne[ke]){if(!($e(J)&&(ce.tagNameCheck instanceof RegExp&&wn(ce.tagNameCheck,J)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(J))&&(ce.attributeNameCheck instanceof RegExp&&wn(ce.attributeNameCheck,ke)||ce.attributeNameCheck instanceof Function&&ce.attributeNameCheck(ke,J))||ke==="is"&&ce.allowCustomizedBuiltInElements&&(ce.tagNameCheck instanceof RegExp&&wn(ce.tagNameCheck,je)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(je))))return!1}else if(!re[ke]){if(!wn(P,Vl(je,be,""))){if(!((ke==="src"||ke==="xlink:href"||ke==="href")&&J!=="script"&&UB(je,"data:")===0&&S[J])){if(!(Et&&!wn(ae,Vl(je,be,"")))){if(je)return!1}}}}}}}return!0},$e=function(J){return J!=="annotation-xml"&&ih(J,se)},et=function(J){oe(K.beforeSanitizeAttributes,J,null);const{attributes:ke}=J;if(!ke||_a(J))return;const je={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0};let jt=ke.length;for(;jt--;){const da=ke[jt],{name:ua,namespaceURI:ra,value:za}=da,La=Nt(ua),Sr=za;let ma=ua==="value"?Sr:MB(Sr);if(je.attrName=La,je.attrValue=ma,je.keepAttr=!0,je.forceKeepAttr=void 0,oe(K.uponSanitizeAttribute,J,je),ma=je.attrValue,tt&&(La==="id"||La==="name")&&(Aa(ua,J),ma=It+ma),Ge&&wn(/((--!?|])>)|<\/(style|title|textarea)/i,ma)){Aa(ua,J);continue}if(La==="attributename"&&ih(ma,"href")){Aa(ua,J);continue}if(je.forceKeepAttr)continue;if(!je.keepAttr){Aa(ua,J);continue}if(!ht&&wn(/\/>/i,ma)){Aa(ua,J);continue}it&&Zd([te,ee,X],Qr=>{ma=Vl(ma,Qr," ")});const On=Nt(J.nodeName);if(!Qe(On,La,ma)){Aa(ua,J);continue}if(F&&typeof I=="object"&&typeof I.getAttributeType=="function"&&!ra)switch(I.getAttributeType(On,La)){case"TrustedHTML":{ma=F.createHTML(ma);break}case"TrustedScriptURL":{ma=F.createScriptURL(ma);break}}if(ma!==Sr)try{ra?J.setAttributeNS(ra,ua,ma):J.setAttribute(ua,ma),_a(J)?pa(J):Lb(e.removed)}catch{Aa(ua,J)}}oe(K.afterSanitizeAttributes,J,null)},Bt=function Ue(J){let ke=null;const je=hn(J);for(oe(K.beforeSanitizeShadowDOM,J,null);ke=je.nextNode();)oe(K.uponSanitizeShadowNode,ke,null),Pe(ke),et(ke),ke.content instanceof l&&Ue(ke.content);oe(K.afterSanitizeShadowDOM,J,null)};return e.sanitize=function(Ue){let J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ke=null,je=null,jt=null,da=null;if(St=!Ue,St&&(Ue="<!-->"),typeof Ue!="string"&&!ya(Ue))if(typeof Ue.toString=="function"){if(Ue=Ue.toString(),typeof Ue!="string")throw Ql("dirty is not a string, aborting")}else throw Ql("toString is not a function");if(!e.isSupported)return Ue;if(Se||zt(J),e.removed=[],typeof Ue=="string"&&(Tt=!1),Tt){if(Ue.nodeName){const za=Nt(Ue.nodeName);if(!q[za]||Ee[za])throw Ql("root node is forbidden and cannot be sanitized in-place")}}else if(Ue instanceof m)ke=Ma("<!---->"),je=ke.ownerDocument.importNode(Ue,!0),je.nodeType===Gl.element&&je.nodeName==="BODY"||je.nodeName==="HTML"?ke=je:ke.appendChild(je);else{if(!he&&!it&&!Ft&&Ue.indexOf("<")===-1)return F&&Ve?F.createHTML(Ue):Ue;if(ke=Ma(Ue),!ke)return he?null:Ve?_:""}ke&&Fe&&pa(ke.firstChild);const ua=hn(Tt?Ue:ke);for(;jt=ua.nextNode();)Pe(jt),et(jt),jt.content instanceof l&&Bt(jt.content);if(Tt)return Ue;if(he){if(De)for(da=O.call(ke.ownerDocument);ke.firstChild;)da.appendChild(ke.firstChild);else da=ke;return(ne.shadowroot||ne.shadowrootmode)&&(da=Q.call(i,da,!0)),da}let ra=Ft?ke.outerHTML:ke.innerHTML;return Ft&&q["!doctype"]&&ke.ownerDocument&&ke.ownerDocument.doctype&&ke.ownerDocument.doctype.name&&wn(JI,ke.ownerDocument.doctype.name)&&(ra="<!DOCTYPE "+ke.ownerDocument.doctype.name+`>
`+ra),it&&Zd([te,ee,X],za=>{ra=Vl(ra,za," ")}),F&&Ve?F.createHTML(ra):ra},e.setConfig=function(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zt(Ue),Se=!0},e.clearConfig=function(){kt=null,Se=!1},e.isValidAttribute=function(Ue,J,ke){kt||zt({});const je=Nt(Ue),jt=Nt(J);return Qe(je,jt,ke)},e.addHook=function(Ue,J){typeof J=="function"&&zl(K[Ue],J)},e.removeHook=function(Ue,J){if(J!==void 0){const ke=RB(K[Ue],J);return ke===-1?void 0:BB(K[Ue],ke,1)[0]}return Lb(K[Ue])},e.removeHooks=function(Ue){K[Ue]=[]},e.removeAllHooks=function(){K=_b()},e}var JB=XI();const XB={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 $B{sanitizeHtmlForEmailViewing(e){if(!e||e.trim()==="")return e;try{return JB.sanitize(e,XB)}catch(n){return console.error(`Error in sanitizeHtmlForEmailViewing: ${n instanceof Error?n.message:String(n)}`),""}}sanitizeAndPrepareEmailHtml(e){if(!e||e.trim()==="")return e;const n=this.sanitizeHtmlForEmailViewing(e);return this.convertAnchorTagsToOpenInNewTab(n)}convertAnchorTagsToOpenInNewTab(e){try{const i=new DOMParser().parseFromString(e,"text/html"),s=i.querySelectorAll("a[href]");return s.length>0&&s.forEach(l=>{if((!l.hasAttribute("target")||l.getAttribute("target")!=="_blank")&&l.setAttribute("target","_blank"),!l.hasAttribute("rel"))l.setAttribute("rel","noopener noreferrer");else{const d=l.getAttribute("rel")??"",m=new Set(d.split(" ").filter(f=>f.trim()!==""));m.add("noopener"),m.add("noreferrer"),l.setAttribute("rel",Array.from(m).join(" "))}}),i.documentElement.outerHTML}catch(n){return console.error(`Error in convertAnchorTagsToOpenInNewTab: ${n instanceof Error?n.message:String(n)}`),e}}normalizeUsername(e){return e.toLowerCase().trim()}}const ZB=new $B,xc=(t=!1,e=300)=>{const[n,i]=b.useState(t),s=b.useRef(null),l=b.useRef(null),d=b.useCallback(m=>{if(m)i(!0),l.current=Date.now();else{const f=l.current?Date.now()-l.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 b.useEffect(()=>{t&&(i(!0),l.current=Date.now())},[t,i]),b.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),[n,d]},eU=()=>{const{t}=nt(),{id:e}=Hu(),n=Ha(),i=ea(),s=Vr(),[l,d]=b.useState(null),[m,f]=b.useState(null),[g,A]=xc(!0,150),[p,v]=b.useState(!1),[I,x]=b.useState(!1),{setIsInitialLoading:N}=wa(),{setHeaderButtons:T}=wr(),[L,B]=b.useState(!1);b.useEffect(()=>{Ua.isPopup()&&(window.history.replaceState({},"","popup.html#/emails"),window.history.pushState({},"",`popup.html#/emails/${e}`)),(async()=>{try{if(A(!0),d(null),!(i!=null&&i.sqliteClient)||!e)return;if(i.isOffline){d(t("emails.offlineMessage")),A(!1),N(!1);return}const U=await s.get(`Email/${e}`),O=i.sqliteClient.settings.getAllEncryptionKeys(),z=await $t.decryptEmail(U,O);f(z)}catch(U){d(U instanceof Error?U.message:"An error occurred")}finally{A(!1),N(!1)}})()},[e,i==null?void 0:i.sqliteClient,i.isOffline,t,s,A,N]);const k=b.useCallback(async()=>{try{await s.delete(`Email/${e}`),Ua.isPopup()?window.close():n("/emails")}catch(V){d(V instanceof Error?V.message:"Failed to delete email")}},[e,s,n]),F=b.useCallback(()=>{Ua.openInNewPopup(`/emails/${e}`)},[e]),_=async V=>{try{const U=await s.downloadBlob(`Email/${e}/attachments/${V.id}`);if(!(i!=null&&i.sqliteClient)||!m){d("Database context or email not available");return}const O=i.sqliteClient.settings.getAllEncryptionKeys(),z=await $t.decryptAttachment(U,m,O);if(!z){d("Failed to decrypt attachment");return}const Q=new Blob([new Uint8Array(z)],{type:V.mimeType??"application/octet-stream"}),K=window.URL.createObjectURL(Q),te=document.createElement("a");te.href=K,te.download=V.filename,document.body.appendChild(te),te.click(),window.URL.revokeObjectURL(K),document.body.removeChild(te)}catch(U){console.error("handleDownloadAttachment error",U),d(U instanceof Error?U.message:"Failed to download attachment")}};return b.useEffect(()=>{if(!L){const V=c.jsxs("div",{className:"flex items-center gap-2",children:[!Ua.isPopup()&&c.jsx(_n,{onClick:F,title:t("common.openInNewWindow"),iconType:Wa.EXPAND}),c.jsx(_n,{onClick:()=>v(!0),title:t("emails.deleteEmailTitle"),iconType:Wa.DELETE,variant:"danger"})]});T(V),B(!0)}return()=>{}},[T,L,F,t]),b.useEffect(()=>()=>T(null),[T]),g?c.jsx("div",{className:"flex justify-center items-center p-8",children:c.jsx(ur,{})}):l?c.jsxs("div",{className:"text-red-500",children:[t("common.error")," ",l]}):m?c.jsxs("div",{className:"max-w-4xl mx-auto",children:[c.jsx(Tu,{isOpen:p,onClose:()=>v(!1),onConfirm:()=>{v(!1),k()},title:t("emails.deleteEmailTitle"),message:t("emails.deleteEmailConfirm"),confirmText:t("common.delete"),cancelText:t("common.cancel"),variant:"danger"}),c.jsxs("div",{children:[c.jsxs("div",{children:[c.jsx("div",{className:"flex justify-between items-start",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:m.subject}),c.jsx("button",{onClick:()=>x(!I),className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",title:t(I?"common.hideDetails":"common.showDetails"),children:c.jsx("svg",{className:`w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform ${I?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})})})]})}),I&&c.jsxs("div",{className:"space-y-1 text-sm text-gray-600 dark:text-gray-400 mt-2",children:[c.jsxs("p",{children:[c.jsx("span",{className:"font-bold",children:t("emails.from")})," ",c.jsx("span",{title:m.fromLocal+"@"+m.fromDomain,children:m.fromDisplay})]}),c.jsxs("p",{children:[c.jsx("span",{className:"font-bold",children:t("emails.to")})," ",c.jsxs("span",{title:m.toLocal+"@"+m.toDomain,children:[m.toLocal,"@",m.toDomain]})]}),c.jsxs("p",{children:[c.jsx("span",{className:"font-bold",children:t("emails.date")})," ",new Date(m.dateSystem).toLocaleString()]})]})]}),c.jsx("div",{className:"bg-white mt-4",children:m.messageHtml?c.jsx("iframe",{srcDoc:ZB.sanitizeAndPrepareEmailHtml(m.messageHtml),className:"w-full min-h-[500px] border-0",title:t("emails.emailContent"),sandbox:"allow-popups allow-popups-to-escape-sandbox"}):c.jsx("pre",{className:"whitespace-pre-wrap text-gray-800 p-3",children:m.messagePlain})}),m.attachments&&m.attachments.length>0&&c.jsxs("div",{className:"p-6 border-t border-gray-200 dark:border-gray-700",children:[c.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:t("common.attachments")}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4",children:m.attachments.map(V=>c.jsxs("button",{onClick:()=>_(V),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:[c.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})}),c.jsxs("span",{children:[V.filename," (",Math.ceil(V.filesize/1024)," KB)"]})]},V.id))})]})]})]}):c.jsx("div",{className:"text-gray-500",children:t("emails.emailNotFound")})},Qh=({onClick:t})=>c.jsxs("div",{className:"px-2 items-center",children:[c.jsxs("div",{className:"relative inline-flex items-center",children:[c.jsx("button",{id:"reload-vault",onClick:t,className:"absolute p-2 hover:bg-gray-200 rounded-2xl",children:c.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:c.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"})})}),c.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:[c.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"}),c.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"})]})]}),c.jsx("span",{className:"sr-only",children:"Loading..."})]}),tU=()=>{const{t}=nt(),e=ea(),n=Vr(),{setHeaderButtons:i}=wr(),[s,l]=b.useState(null),[d,m]=b.useState([]),{setIsInitialLoading:f}=wa(),[g,A]=xc(!0,100),p=b.useCallback(async()=>{try{if(A(!0),l(null),!(e!=null&&e.sqliteClient))return;if(e.isOffline){A(!1),f(!1);return}const I=e.sqliteClient.items.getAllEmailAddresses();try{const x=await n.post("EmailBox/bulk",{addresses:I,page:1,pageSize:50}),N=e.sqliteClient.settings.getAllEncryptionKeys(),T=await $t.decryptEmailList(x.mails,N);m(T)}catch(x){throw console.error(x),new Error(t("common.errors.unknownError"))}}catch(I){l(I instanceof Error?I.message:t("common.errors.unknownError"))}finally{A(!1),f(!1)}},[e==null?void 0:e.sqliteClient,e.isOffline,n,A,f,t]);b.useEffect(()=>{p()},[p]),b.useEffect(()=>{const I=Ua.isPopup()?null:c.jsx(_n,{onClick:()=>Ua.openInNewPopup(),title:t("common.openInNewWindow"),iconType:Wa.EXPAND});return i(I),()=>{i(null)}},[i,t]);const v=I=>{const x=new Date,N=new Date(I),T=Math.floor((x.getTime()-N.getTime())/1e3);if(T<60)return t("emails.dateFormat.justNow");if(T<3600){const L=Math.floor(T/60);return L===1?t("emails.dateFormat.minutesAgo_single",{count:L}):t("emails.dateFormat.minutesAgo_plural",{count:L})}else if(T<86400){const L=Math.floor(T/3600);return L===1?t("emails.dateFormat.hoursAgo_single",{count:L}):t("emails.dateFormat.hoursAgo_plural",{count:L})}else return T<172800?t("emails.dateFormat.yesterday"):N.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit"})};return g?c.jsx("div",{className:"flex justify-center items-center p-8",children:c.jsx(ur,{})}):s?c.jsxs("div",{className:"text-red-500",children:[t("common.error"),": ",s]}):e.isOffline?c.jsxs("div",{children:[c.jsx("div",{className:"flex justify-between items-center mb-4",children:c.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:t("emails.title")})}),c.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:c.jsx("p",{className:"text-sm",children:t("emails.offlineMessage")})})]}):d.length===0?c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-4",children:[c.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:t("emails.title")}),c.jsx(Qh,{onClick:p})]}),c.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:c.jsx("p",{className:"text-sm",children:t("emails.noEmailsDescription")})})]}):c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-4",children:[c.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:t("emails.title")}),c.jsx(Qh,{onClick:p})]}),c.jsx("div",{className:"space-y-2",children:d.map(I=>c.jsxs(Vu,{to:`/emails/${I.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:[c.jsxs("div",{className:"flex justify-between items-start mb-2",children:[c.jsx("div",{className:"text-gray-900 dark:text-white mb-1 font-bold",children:I.subject}),c.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:v(I.dateSystem)})]}),c.jsx("div",{className:"text-gray-600 text-sm dark:text-gray-300 line-clamp-2",children:I.messagePreview})]},I.id))})]})},aU=()=>{const{isFullyInitialized:t}=$D();return t?c.jsx(VN,{to:"/reinitialize",replace:!0}):null},nU=()=>c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})}),rU=()=>c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})}),iU=()=>c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})}),ku=()=>c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),sU=t=>{switch(t){case mt.Notes:return c.jsx(nU,{});default:return c.jsx(ku,{})}},oU=t=>{switch(t){case"2fa":return c.jsx(rU,{});case"attachments":return c.jsx(iU,{});default:return c.jsx(ku,{})}},lU=({optionalSystemFields:t,visibleFieldKeys:e,optionalSections:n,callbacks:i})=>{const{t:s}=nt(),[l,d]=b.useState(!1),[m,f]=b.useState(!1),[g,A]=b.useState(""),[p,v]=b.useState("Text"),I=b.useCallback(()=>{f(!0),d(!1)},[]),x=b.useCallback(()=>{g.trim()&&(i.onAddCustomField(g,p),A(""),v("Text"),f(!1))},[g,p,i]),N=b.useCallback(()=>{A(""),v("Text"),f(!1)},[]),T=b.useCallback(k=>{i.onAddSystemField(k),d(!1)},[i]),L=b.useCallback(k=>{k(),d(!1)},[]),B=b.useMemo(()=>{const k=[];return t.forEach(F=>{e.has(F.FieldKey)||k.push({key:F.FieldKey,label:s(`fieldLabels.${F.FieldKey}`,{defaultValue:F.FieldKey}),icon:sU(F.Category),action:()=>T(F.FieldKey)})}),n.forEach(F=>{F.isVisible||k.push({key:F.key,label:s(`common.${F.key==="2fa"?"twoFactorAuthentication":F.key}`),icon:oU(F.key),action:()=>L(F.onAdd)})}),k},[t,e,n,s,T,L]);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"relative",children:[c.jsx("button",{type:"button",id:"add-field-menu",onClick:()=>d(!l),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:c.jsx(ku,{})}),l&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50",onClick:()=>d(!1)}),c.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(k=>c.jsxs("button",{type:"button",onClick:k.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:[c.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:k.icon}),c.jsx("span",{children:k.label})]},k.key)),c.jsxs("button",{type:"button",onClick:I,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:[c.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:c.jsx(ku,{})}),c.jsx("span",{children:s("itemTypes.addCustomField")})]})]})]})]}),c.jsx($n,{isOpen:m,onClose:N,title:s("itemTypes.addCustomField"),footer:c.jsxs("div",{className:"flex gap-3",children:[c.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")}),c.jsx("button",{type:"button",onClick:N,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:c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:s("itemTypes.fieldLabel")}),c.jsx("input",{type:"text",value:g,onChange:k=>A(k.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})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:s("itemTypes.fieldType")}),c.jsxs("select",{value:p,onChange:k=>v(k.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:[c.jsx("option",{value:"Text",children:s("itemTypes.fieldTypes.text")}),c.jsx("option",{value:"Hidden",children:s("itemTypes.fieldTypes.hidden")}),c.jsx("option",{value:"Email",children:s("itemTypes.fieldTypes.email")}),c.jsx("option",{value:"URL",children:s("itemTypes.fieldTypes.url")}),c.jsx("option",{value:"Phone",children:s("itemTypes.fieldTypes.phone")}),c.jsx("option",{value:"Number",children:s("itemTypes.fieldTypes.number")}),c.jsx("option",{value:"Date",children:s("itemTypes.fieldTypes.date")}),c.jsx("option",{value:"TextArea",children:s("itemTypes.fieldTypes.textArea")})]})]})]})})]})};function cU(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.useMemo(()=>i=>{e.forEach(s=>s(i))},e)}const Ku=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function _o(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Tp(t){return"nodeType"in t}function Fn(t){var e,n;return t?_o(t)?t:Tp(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function kp(t){const{Document:e}=Fn(t);return t instanceof e}function Tc(t){return _o(t)?!1:t instanceof Fn(t).HTMLElement}function $I(t){return t instanceof Fn(t).SVGElement}function Fo(t){return t?_o(t)?t.document:Tp(t)?kp(t)?t:Tc(t)||$I(t)?t.ownerDocument:document:document:document}const zr=Ku?b.useLayoutEffect:b.useEffect;function Lp(t){const e=b.useRef(t);return zr(()=>{e.current=t}),b.useCallback(function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return e.current==null?void 0:e.current(...i)},[])}function dU(){const t=b.useRef(null),e=b.useCallback((i,s)=>{t.current=setInterval(i,s)},[]),n=b.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function Ac(t,e){e===void 0&&(e=[t]);const n=b.useRef(t);return zr(()=>{n.current!==t&&(n.current=t)},e),n}function kc(t,e){const n=b.useRef();return b.useMemo(()=>{const i=t(n.current);return n.current=i,i},[...e])}function Lu(t){const e=Lp(t),n=b.useRef(null),i=b.useCallback(s=>{s!==n.current&&(e==null||e(s,n.current)),n.current=s},[]);return[n,i]}function Kh(t){const e=b.useRef();return b.useEffect(()=>{e.current=t},[t]),e.current}let dh={};function Lc(t,e){return b.useMemo(()=>{if(e)return e;const n=dh[t]==null?0:dh[t]+1;return dh[t]=n,t+"-"+n},[t,e])}function ZI(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return i.reduce((l,d)=>{const m=Object.entries(d);for(const[f,g]of m){const A=l[f];A!=null&&(l[f]=A+t*g)}return l},{...e})}}const To=ZI(1),yc=ZI(-1);function uU(t){return"clientX"in t&&"clientY"in t}function Dp(t){if(!t)return!1;const{KeyboardEvent:e}=Fn(t.target);return e&&t instanceof e}function mU(t){if(!t)return!1;const{TouchEvent:e}=Fn(t.target);return e&&t instanceof e}function Gh(t){if(mU(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return uU(t)?{x:t.clientX,y:t.clientY}:null}const Ec=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[Ec.Translate.toString(t),Ec.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:i}=t;return e+" "+n+"ms "+i}}}),Fb="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function gU(t){return t.matches(Fb)?t:t.querySelector(Fb)}const fU={display:"none"};function hU(t){let{id:e,value:n}=t;return tn.createElement("div",{id:e,style:fU},n)}function pU(t){let{id:e,announcement:n,ariaLiveType:i="assertive"}=t;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return tn.createElement("div",{id:e,style:s,role:"status","aria-live":i,"aria-atomic":!0},n)}function AU(){const[t,e]=b.useState("");return{announce:b.useCallback(i=>{i!=null&&e(i)},[]),announcement:t}}const ew=b.createContext(null);function yU(t){const e=b.useContext(ew);b.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function EU(){const[t]=b.useState(()=>new Set),e=b.useCallback(i=>(t.add(i),()=>t.delete(i)),[t]);return[b.useCallback(i=>{let{type:s,event:l}=i;t.forEach(d=>{var m;return(m=d[s])==null?void 0:m.call(d,l)})},[t]),e]}const bU={draggable:`
    To pick up a draggable item, press the space bar.
    While dragging, use the arrow keys to move the item.
    Press space again to drop the item in its new position, or press escape to cancel.
  `},vU={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function IU(t){let{announcements:e=vU,container:n,hiddenTextDescribedById:i,screenReaderInstructions:s=bU}=t;const{announce:l,announcement:d}=AU(),m=Lc("DndLiveRegion"),[f,g]=b.useState(!1);if(b.useEffect(()=>{g(!0)},[]),yU(b.useMemo(()=>({onDragStart(p){let{active:v}=p;l(e.onDragStart({active:v}))},onDragMove(p){let{active:v,over:I}=p;e.onDragMove&&l(e.onDragMove({active:v,over:I}))},onDragOver(p){let{active:v,over:I}=p;l(e.onDragOver({active:v,over:I}))},onDragEnd(p){let{active:v,over:I}=p;l(e.onDragEnd({active:v,over:I}))},onDragCancel(p){let{active:v,over:I}=p;l(e.onDragCancel({active:v,over:I}))}}),[l,e])),!f)return null;const A=tn.createElement(tn.Fragment,null,tn.createElement(hU,{id:i,value:s.draggable}),tn.createElement(pU,{id:m,announcement:d}));return n?wo.createPortal(A,n):A}var qa;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(qa||(qa={}));function Du(){}function Ob(t,e){return b.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function wU(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.useMemo(()=>[...e].filter(i=>i!=null),[...e])}const br=Object.freeze({x:0,y:0});function tw(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function aw(t,e){let{data:{value:n}}=t,{data:{value:i}}=e;return n-i}function CU(t,e){let{data:{value:n}}=t,{data:{value:i}}=e;return i-n}function jb(t){let{left:e,top:n,height:i,width:s}=t;return[{x:e,y:n},{x:e+s,y:n},{x:e,y:n+i},{x:e+s,y:n+i}]}function nw(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function Pb(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const SU=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:i}=t;const s=Pb(e,e.left,e.top),l=[];for(const d of i){const{id:m}=d,f=n.get(m);if(f){const g=tw(Pb(f),s);l.push({id:m,data:{droppableContainer:d,value:g}})}}return l.sort(aw)},NU=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:i}=t;const s=jb(e),l=[];for(const d of i){const{id:m}=d,f=n.get(m);if(f){const g=jb(f),A=s.reduce((v,I,x)=>v+tw(g[x],I),0),p=Number((A/4).toFixed(4));l.push({id:m,data:{droppableContainer:d,value:p}})}}return l.sort(aw)};function xU(t,e){const n=Math.max(e.top,t.top),i=Math.max(e.left,t.left),s=Math.min(e.left+e.width,t.left+t.width),l=Math.min(e.top+e.height,t.top+t.height),d=s-i,m=l-n;if(i<s&&n<l){const f=e.width*e.height,g=t.width*t.height,A=d*m,p=A/(f+g-A);return Number(p.toFixed(4))}return 0}const TU=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:i}=t;const s=[];for(const l of i){const{id:d}=l,m=n.get(d);if(m){const f=xU(m,e);f>0&&s.push({id:d,data:{droppableContainer:l,value:f}})}}return s.sort(CU)};function kU(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function rw(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:br}function LU(t){return function(n){for(var i=arguments.length,s=new Array(i>1?i-1:0),l=1;l<i;l++)s[l-1]=arguments[l];return s.reduce((d,m)=>({...d,top:d.top+t*m.y,bottom:d.bottom+t*m.y,left:d.left+t*m.x,right:d.right+t*m.x}),{...n})}}const DU=LU(1);function RU(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function BU(t,e,n){const i=RU(e);if(!i)return t;const{scaleX:s,scaleY:l,x:d,y:m}=i,f=t.left-d-(1-s)*parseFloat(n),g=t.top-m-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),A=s?t.width/s:t.width,p=l?t.height/l:t.height;return{width:A,height:p,top:g,right:f+A,bottom:g+p,left:f}}const UU={ignoreTransform:!1};function Oo(t,e){e===void 0&&(e=UU);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:g,transformOrigin:A}=Fn(t).getComputedStyle(t);g&&(n=BU(n,g,A))}const{top:i,left:s,width:l,height:d,bottom:m,right:f}=n;return{top:i,left:s,width:l,height:d,bottom:m,right:f}}function Hb(t){return Oo(t,{ignoreTransform:!0})}function MU(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function _U(t,e){return e===void 0&&(e=Fn(t).getComputedStyle(t)),e.position==="fixed"}function FU(t,e){e===void 0&&(e=Fn(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const l=e[s];return typeof l=="string"?n.test(l):!1})}function Gu(t,e){const n=[];function i(s){if(e!=null&&n.length>=e||!s)return n;if(kp(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!Tc(s)||$I(s)||n.includes(s))return n;const l=Fn(t).getComputedStyle(s);return s!==t&&FU(s,l)&&n.push(s),_U(s,l)?n:i(s.parentNode)}return t?i(t):n}function iw(t){const[e]=Gu(t,1);return e??null}function uh(t){return!Ku||!t?null:_o(t)?t:Tp(t)?kp(t)||t===Fo(t).scrollingElement?window:Tc(t)?t:null:null}function sw(t){return _o(t)?t.scrollX:t.scrollLeft}function ow(t){return _o(t)?t.scrollY:t.scrollTop}function qh(t){return{x:sw(t),y:ow(t)}}var en;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(en||(en={}));function lw(t){return!Ku||!t?!1:t===document.scrollingElement}function cw(t){const e={x:0,y:0},n=lw(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},i={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},s=t.scrollTop<=e.y,l=t.scrollLeft<=e.x,d=t.scrollTop>=i.y,m=t.scrollLeft>=i.x;return{isTop:s,isLeft:l,isBottom:d,isRight:m,maxScroll:i,minScroll:e}}const OU={x:.2,y:.2};function jU(t,e,n,i,s){let{top:l,left:d,right:m,bottom:f}=n;i===void 0&&(i=10),s===void 0&&(s=OU);const{isTop:g,isBottom:A,isLeft:p,isRight:v}=cw(t),I={x:0,y:0},x={x:0,y:0},N={height:e.height*s.y,width:e.width*s.x};return!g&&l<=e.top+N.height?(I.y=en.Backward,x.y=i*Math.abs((e.top+N.height-l)/N.height)):!A&&f>=e.bottom-N.height&&(I.y=en.Forward,x.y=i*Math.abs((e.bottom-N.height-f)/N.height)),!v&&m>=e.right-N.width?(I.x=en.Forward,x.x=i*Math.abs((e.right-N.width-m)/N.width)):!p&&d<=e.left+N.width&&(I.x=en.Backward,x.x=i*Math.abs((e.left+N.width-d)/N.width)),{direction:I,speed:x}}function PU(t){if(t===document.scrollingElement){const{innerWidth:l,innerHeight:d}=window;return{top:0,left:0,right:l,bottom:d,width:l,height:d}}const{top:e,left:n,right:i,bottom:s}=t.getBoundingClientRect();return{top:e,left:n,right:i,bottom:s,width:t.clientWidth,height:t.clientHeight}}function dw(t){return t.reduce((e,n)=>To(e,qh(n)),br)}function HU(t){return t.reduce((e,n)=>e+sw(n),0)}function zU(t){return t.reduce((e,n)=>e+ow(n),0)}function VU(t,e){if(e===void 0&&(e=Oo),!t)return;const{top:n,left:i,bottom:s,right:l}=e(t);iw(t)&&(s<=0||l<=0||n>=window.innerHeight||i>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const QU=[["x",["left","right"],HU],["y",["top","bottom"],zU]];class Rp{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Gu(n),s=dw(i);this.rect={...e},this.width=e.width,this.height=e.height;for(const[l,d,m]of QU)for(const f of d)Object.defineProperty(this,f,{get:()=>{const g=m(i),A=s[l]-g;return this.rect[f]+A},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class cc{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=e}add(e,n,i){var s;(s=this.target)==null||s.addEventListener(e,n,i),this.listeners.push([e,n,i])}}function KU(t){const{EventTarget:e}=Fn(t);return t instanceof e?t:Fo(t)}function mh(t,e){const n=Math.abs(t.x),i=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+i**2)>e:"x"in e&&"y"in e?n>e.x&&i>e.y:"x"in e?n>e.x:"y"in e?i>e.y:!1}var dr;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(dr||(dr={}));function zb(t){t.preventDefault()}function GU(t){t.stopPropagation()}var Qt;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(Qt||(Qt={}));const uw={start:[Qt.Space,Qt.Enter],cancel:[Qt.Esc],end:[Qt.Space,Qt.Enter,Qt.Tab]},qU=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case Qt.Right:return{...n,x:n.x+25};case Qt.Left:return{...n,x:n.x-25};case Qt.Down:return{...n,y:n.y+25};case Qt.Up:return{...n,y:n.y-25}}};class Bp{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new cc(Fo(n)),this.windowListeners=new cc(Fn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(dr.Resize,this.handleCancel),this.windowListeners.add(dr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(dr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,i=e.node.current;i&&VU(i),n(br)}handleKeyDown(e){if(Dp(e)){const{active:n,context:i,options:s}=this.props,{keyboardCodes:l=uw,coordinateGetter:d=qU,scrollBehavior:m="smooth"}=s,{code:f}=e;if(l.end.includes(f)){this.handleEnd(e);return}if(l.cancel.includes(f)){this.handleCancel(e);return}const{collisionRect:g}=i.current,A=g?{x:g.left,y:g.top}:br;this.referenceCoordinates||(this.referenceCoordinates=A);const p=d(e,{active:n,context:i.current,currentCoordinates:A});if(p){const v=yc(p,A),I={x:0,y:0},{scrollableAncestors:x}=i.current;for(const N of x){const T=e.code,{isTop:L,isRight:B,isLeft:k,isBottom:F,maxScroll:_,minScroll:V}=cw(N),U=PU(N),O={x:Math.min(T===Qt.Right?U.right-U.width/2:U.right,Math.max(T===Qt.Right?U.left:U.left+U.width/2,p.x)),y:Math.min(T===Qt.Down?U.bottom-U.height/2:U.bottom,Math.max(T===Qt.Down?U.top:U.top+U.height/2,p.y))},z=T===Qt.Right&&!B||T===Qt.Left&&!k,Q=T===Qt.Down&&!F||T===Qt.Up&&!L;if(z&&O.x!==p.x){const K=N.scrollLeft+v.x,te=T===Qt.Right&&K<=_.x||T===Qt.Left&&K>=V.x;if(te&&!v.y){N.scrollTo({left:K,behavior:m});return}te?I.x=N.scrollLeft-K:I.x=T===Qt.Right?N.scrollLeft-_.x:N.scrollLeft-V.x,I.x&&N.scrollBy({left:-I.x,behavior:m});break}else if(Q&&O.y!==p.y){const K=N.scrollTop+v.y,te=T===Qt.Down&&K<=_.y||T===Qt.Up&&K>=V.y;if(te&&!v.x){N.scrollTo({top:K,behavior:m});return}te?I.y=N.scrollTop-K:I.y=T===Qt.Down?N.scrollTop-_.y:N.scrollTop-V.y,I.y&&N.scrollBy({top:-I.y,behavior:m});break}}this.handleMove(e,To(yc(p,this.referenceCoordinates),I))}}}handleMove(e,n){const{onMove:i}=this.props;e.preventDefault(),i(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Bp.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:i=uw,onActivation:s}=e,{active:l}=n;const{code:d}=t.nativeEvent;if(i.start.includes(d)){const m=l.activatorNode.current;return m&&t.target!==m?!1:(t.preventDefault(),s==null||s({event:t.nativeEvent}),!0)}return!1}}];function Vb(t){return!!(t&&"distance"in t)}function Qb(t){return!!(t&&"delay"in t)}class Up{constructor(e,n,i){var s;i===void 0&&(i=KU(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:l}=e,{target:d}=l;this.props=e,this.events=n,this.document=Fo(d),this.documentListeners=new cc(this.document),this.listeners=new cc(i),this.windowListeners=new cc(Fn(d)),this.initialCoordinates=(s=Gh(l))!=null?s:br,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:i}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(dr.Resize,this.handleCancel),this.windowListeners.add(dr.DragStart,zb),this.windowListeners.add(dr.VisibilityChange,this.handleCancel),this.windowListeners.add(dr.ContextMenu,zb),this.documentListeners.add(dr.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Qb(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Vb(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:i,onPending:s}=this.props;s(i,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(dr.Click,GU,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(dr.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:i,initialCoordinates:s,props:l}=this,{onMove:d,options:{activationConstraint:m}}=l;if(!s)return;const f=(n=Gh(e))!=null?n:br,g=yc(s,f);if(!i&&m){if(Vb(m)){if(m.tolerance!=null&&mh(g,m.tolerance))return this.handleCancel();if(mh(g,m.distance))return this.handleStart()}if(Qb(m)&&mh(g,m.tolerance))return this.handleCancel();this.handlePending(m,g);return}e.cancelable&&e.preventDefault(),d(f)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===Qt.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const WU={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Mp extends Up{constructor(e){const{event:n}=e,i=Fo(n.target);super(e,WU,i)}}Mp.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:i}=e;return!n.isPrimary||n.button!==0?!1:(i==null||i({event:n}),!0)}}];const YU={move:{name:"mousemove"},end:{name:"mouseup"}};var Wh;(function(t){t[t.RightClick=2]="RightClick"})(Wh||(Wh={}));class JU extends Up{constructor(e){super(e,YU,Fo(e.event.target))}}JU.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:i}=e;return n.button===Wh.RightClick?!1:(i==null||i({event:n}),!0)}}];const gh={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class XU extends Up{constructor(e){super(e,gh)}static setup(){return window.addEventListener(gh.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(gh.move.name,e)};function e(){}}}XU.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:i}=e;const{touches:s}=n;return s.length>1?!1:(i==null||i({event:n}),!0)}}];var dc;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(dc||(dc={}));var Ru;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ru||(Ru={}));function $U(t){let{acceleration:e,activator:n=dc.Pointer,canScroll:i,draggingRect:s,enabled:l,interval:d=5,order:m=Ru.TreeOrder,pointerCoordinates:f,scrollableAncestors:g,scrollableAncestorRects:A,delta:p,threshold:v}=t;const I=eM({delta:p,disabled:!l}),[x,N]=dU(),T=b.useRef({x:0,y:0}),L=b.useRef({x:0,y:0}),B=b.useMemo(()=>{switch(n){case dc.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case dc.DraggableRect:return s}},[n,s,f]),k=b.useRef(null),F=b.useCallback(()=>{const V=k.current;if(!V)return;const U=T.current.x*L.current.x,O=T.current.y*L.current.y;V.scrollBy(U,O)},[]),_=b.useMemo(()=>m===Ru.TreeOrder?[...g].reverse():g,[m,g]);b.useEffect(()=>{if(!l||!g.length||!B){N();return}for(const V of _){if((i==null?void 0:i(V))===!1)continue;const U=g.indexOf(V),O=A[U];if(!O)continue;const{direction:z,speed:Q}=jU(V,O,B,e,v);for(const K of["x","y"])I[K][z[K]]||(Q[K]=0,z[K]=0);if(Q.x>0||Q.y>0){N(),k.current=V,x(F,d),T.current=Q,L.current=z;return}}T.current={x:0,y:0},L.current={x:0,y:0},N()},[e,F,i,N,l,d,JSON.stringify(B),JSON.stringify(I),x,g,_,A,JSON.stringify(v)])}const ZU={x:{[en.Backward]:!1,[en.Forward]:!1},y:{[en.Backward]:!1,[en.Forward]:!1}};function eM(t){let{delta:e,disabled:n}=t;const i=Kh(e);return kc(s=>{if(n||!i||!s)return ZU;const l={x:Math.sign(e.x-i.x),y:Math.sign(e.y-i.y)};return{x:{[en.Backward]:s.x[en.Backward]||l.x===-1,[en.Forward]:s.x[en.Forward]||l.x===1},y:{[en.Backward]:s.y[en.Backward]||l.y===-1,[en.Forward]:s.y[en.Forward]||l.y===1}}},[n,e,i])}function tM(t,e){const n=e!=null?t.get(e):void 0,i=n?n.node.current:null;return kc(s=>{var l;return e==null?null:(l=i??s)!=null?l:null},[i,e])}function aM(t,e){return b.useMemo(()=>t.reduce((n,i)=>{const{sensor:s}=i,l=s.activators.map(d=>({eventName:d.eventName,handler:e(d.handler,i)}));return[...n,...l]},[]),[t,e])}var bc;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(bc||(bc={}));var Yh;(function(t){t.Optimized="optimized"})(Yh||(Yh={}));const Kb=new Map;function nM(t,e){let{dragging:n,dependencies:i,config:s}=e;const[l,d]=b.useState(null),{frequency:m,measure:f,strategy:g}=s,A=b.useRef(t),p=T(),v=Ac(p),I=b.useCallback(function(L){L===void 0&&(L=[]),!v.current&&d(B=>B===null?L:B.concat(L.filter(k=>!B.includes(k))))},[v]),x=b.useRef(null),N=kc(L=>{if(p&&!n)return Kb;if(!L||L===Kb||A.current!==t||l!=null){const B=new Map;for(let k of t){if(!k)continue;if(l&&l.length>0&&!l.includes(k.id)&&k.rect.current){B.set(k.id,k.rect.current);continue}const F=k.node.current,_=F?new Rp(f(F),F):null;k.rect.current=_,_&&B.set(k.id,_)}return B}return L},[t,l,n,p,f]);return b.useEffect(()=>{A.current=t},[t]),b.useEffect(()=>{p||I()},[n,p]),b.useEffect(()=>{l&&l.length>0&&d(null)},[JSON.stringify(l)]),b.useEffect(()=>{p||typeof m!="number"||x.current!==null||(x.current=setTimeout(()=>{I(),x.current=null},m))},[m,p,I,...i]),{droppableRects:N,measureDroppableContainers:I,measuringScheduled:l!=null};function T(){switch(g){case bc.Always:return!1;case bc.BeforeDragging:return n;default:return!n}}}function mw(t,e){return kc(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function rM(t,e){return mw(t,e)}function iM(t){let{callback:e,disabled:n}=t;const i=Lp(e),s=b.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(i)},[i,n]);return b.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function qu(t){let{callback:e,disabled:n}=t;const i=Lp(e),s=b.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(i)},[n]);return b.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function sM(t){return new Rp(Oo(t),t)}function Gb(t,e,n){e===void 0&&(e=sM);const[i,s]=b.useState(null);function l(){s(f=>{if(!t)return null;if(t.isConnected===!1){var g;return(g=f??n)!=null?g:null}const A=e(t);return JSON.stringify(f)===JSON.stringify(A)?f:A})}const d=iM({callback(f){if(t)for(const g of f){const{type:A,target:p}=g;if(A==="childList"&&p instanceof HTMLElement&&p.contains(t)){l();break}}}}),m=qu({callback:l});return zr(()=>{l(),t?(m==null||m.observe(t),d==null||d.observe(document.body,{childList:!0,subtree:!0})):(m==null||m.disconnect(),d==null||d.disconnect())},[t]),i}function oM(t){const e=mw(t);return rw(t,e)}const qb=[];function lM(t){const e=b.useRef(t),n=kc(i=>t?i&&i!==qb&&t&&e.current&&t.parentNode===e.current.parentNode?i:Gu(t):qb,[t]);return b.useEffect(()=>{e.current=t},[t]),n}function cM(t){const[e,n]=b.useState(null),i=b.useRef(t),s=b.useCallback(l=>{const d=uh(l.target);d&&n(m=>m?(m.set(d,qh(d)),new Map(m)):null)},[]);return b.useEffect(()=>{const l=i.current;if(t!==l){d(l);const m=t.map(f=>{const g=uh(f);return g?(g.addEventListener("scroll",s,{passive:!0}),[g,qh(g)]):null}).filter(f=>f!=null);n(m.length?new Map(m):null),i.current=t}return()=>{d(t),d(l)};function d(m){m.forEach(f=>{const g=uh(f);g==null||g.removeEventListener("scroll",s)})}},[s,t]),b.useMemo(()=>t.length?e?Array.from(e.values()).reduce((l,d)=>To(l,d),br):dw(t):br,[t,e])}function Wb(t,e){e===void 0&&(e=[]);const n=b.useRef(null);return b.useEffect(()=>{n.current=null},e),b.useEffect(()=>{const i=t!==br;i&&!n.current&&(n.current=t),!i&&n.current&&(n.current=null)},[t]),n.current?yc(t,n.current):br}function dM(t){b.useEffect(()=>{if(!Ku)return;const e=t.map(n=>{let{sensor:i}=n;return i.setup==null?void 0:i.setup()});return()=>{for(const n of e)n==null||n()}},t.map(e=>{let{sensor:n}=e;return n}))}function uM(t,e){return b.useMemo(()=>t.reduce((n,i)=>{let{eventName:s,handler:l}=i;return n[s]=d=>{l(d,e)},n},{}),[t,e])}function gw(t){return b.useMemo(()=>t?MU(t):null,[t])}const Yb=[];function mM(t,e){e===void 0&&(e=Oo);const[n]=t,i=gw(n?Fn(n):null),[s,l]=b.useState(Yb);function d(){l(()=>t.length?t.map(f=>lw(f)?i:new Rp(e(f),f)):Yb)}const m=qu({callback:d});return zr(()=>{m==null||m.disconnect(),d(),t.forEach(f=>m==null?void 0:m.observe(f))},[t]),s}function gM(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return Tc(e)?e:t}function fM(t){let{measure:e}=t;const[n,i]=b.useState(null),s=b.useCallback(g=>{for(const{target:A}of g)if(Tc(A)){i(p=>{const v=e(A);return p?{...p,width:v.width,height:v.height}:v});break}},[e]),l=qu({callback:s}),d=b.useCallback(g=>{const A=gM(g);l==null||l.disconnect(),A&&(l==null||l.observe(A)),i(A?e(A):null)},[e,l]),[m,f]=Lu(d);return b.useMemo(()=>({nodeRef:m,rect:n,setRef:f}),[n,m,f])}const hM=[{sensor:Mp,options:{}},{sensor:Bp,options:{}}],pM={current:{}},Au={draggable:{measure:Hb},droppable:{measure:Hb,strategy:bc.WhileDragging,frequency:Yh.Optimized},dragOverlay:{measure:Oo}};class uc extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,i;return(n=(i=this.get(e))==null?void 0:i.node.current)!=null?n:void 0}}const AM={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new uc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Du},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Au,measureDroppableContainers:Du,windowRect:null,measuringScheduled:!1},yM={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Du,draggableNodes:new Map,over:null,measureDroppableContainers:Du},Wu=b.createContext(yM),fw=b.createContext(AM);function EM(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new uc}}}function bM(t,e){switch(e.type){case qa.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case qa.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case qa.DragEnd:case qa.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case qa.RegisterDroppable:{const{element:n}=e,{id:i}=n,s=new uc(t.droppable.containers);return s.set(i,n),{...t,droppable:{...t.droppable,containers:s}}}case qa.SetDroppableDisabled:{const{id:n,key:i,disabled:s}=e,l=t.droppable.containers.get(n);if(!l||i!==l.key)return t;const d=new uc(t.droppable.containers);return d.set(n,{...l,disabled:s}),{...t,droppable:{...t.droppable,containers:d}}}case qa.UnregisterDroppable:{const{id:n,key:i}=e,s=t.droppable.containers.get(n);if(!s||i!==s.key)return t;const l=new uc(t.droppable.containers);return l.delete(n),{...t,droppable:{...t.droppable,containers:l}}}default:return t}}function vM(t){let{disabled:e}=t;const{active:n,activatorEvent:i,draggableNodes:s}=b.useContext(Wu),l=Kh(i),d=Kh(n==null?void 0:n.id);return b.useEffect(()=>{if(!e&&!i&&l&&d!=null){if(!Dp(l)||document.activeElement===l.target)return;const m=s.get(d);if(!m)return;const{activatorNode:f,node:g}=m;if(!f.current&&!g.current)return;requestAnimationFrame(()=>{for(const A of[f.current,g.current]){if(!A)continue;const p=gU(A);if(p){p.focus();break}}})}},[i,e,s,d,l]),null}function IM(t,e){let{transform:n,...i}=e;return t!=null&&t.length?t.reduce((s,l)=>l({transform:s,...i}),n):n}function wM(t){return b.useMemo(()=>({draggable:{...Au.draggable,...t==null?void 0:t.draggable},droppable:{...Au.droppable,...t==null?void 0:t.droppable},dragOverlay:{...Au.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function CM(t){let{activeNode:e,measure:n,initialRect:i,config:s=!0}=t;const l=b.useRef(!1),{x:d,y:m}=typeof s=="boolean"?{x:s,y:s}:s;zr(()=>{if(!d&&!m||!e){l.current=!1;return}if(l.current||!i)return;const g=e==null?void 0:e.node.current;if(!g||g.isConnected===!1)return;const A=n(g),p=rw(A,i);if(d||(p.x=0),m||(p.y=0),l.current=!0,Math.abs(p.x)>0||Math.abs(p.y)>0){const v=iw(g);v&&v.scrollBy({top:p.y,left:p.x})}},[e,d,m,i,n])}const hw=b.createContext({...br,scaleX:1,scaleY:1});var es;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(es||(es={}));const SM=b.memo(function(e){var n,i,s,l;let{id:d,accessibility:m,autoScroll:f=!0,children:g,sensors:A=hM,collisionDetection:p=TU,measuring:v,modifiers:I,...x}=e;const N=b.useReducer(bM,void 0,EM),[T,L]=N,[B,k]=EU(),[F,_]=b.useState(es.Uninitialized),V=F===es.Initialized,{draggable:{active:U,nodes:O,translate:z},droppable:{containers:Q}}=T,K=U!=null?O.get(U):null,te=b.useRef({initial:null,translated:null}),ee=b.useMemo(()=>{var Rt;return U!=null?{id:U,data:(Rt=K==null?void 0:K.data)!=null?Rt:pM,rect:te}:null},[U,K]),X=b.useRef(null),[ue,W]=b.useState(null),[ae,be]=b.useState(null),se=Ac(x,Object.values(x)),P=Lc("DndDescribedBy",d),q=b.useMemo(()=>Q.getEnabled(),[Q]),Y=wM(v),{droppableRects:ne,measureDroppableContainers:Ie,measuringScheduled:ce}=nM(q,{dragging:V,dependencies:[z.x,z.y],config:Y.droppable}),Ee=tM(O,U),Ne=b.useMemo(()=>ae?Gh(ae):null,[ae]),we=nn(),Oe=rM(Ee,Y.draggable.measure);CM({activeNode:U!=null?O.get(U):null,config:we.layoutShiftCompensation,initialRect:Oe,measure:Y.draggable.measure});const ze=Gb(Ee,Y.draggable.measure,Oe),Et=Gb(Ee?Ee.parentElement:null),ht=b.useRef({activatorEvent:null,active:null,activeNode:Ee,collisionRect:null,collisions:null,droppableRects:ne,draggableNodes:O,draggingNode:null,draggingNodeRect:null,droppableContainers:Q,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),it=Q.getNodeFor((n=ht.current.over)==null?void 0:n.id),Ge=fM({measure:Y.dragOverlay.measure}),Ft=(i=Ge.nodeRef.current)!=null?i:Ee,Se=V?(s=Ge.rect)!=null?s:ze:null,Fe=!!(Ge.nodeRef.current&&Ge.rect),he=oM(Fe?null:ze),De=gw(Ft?Fn(Ft):null),Ve=lM(V?it??Ee:null),He=mM(Ve),tt=IM(I,{transform:{x:z.x-he.x,y:z.y-he.y,scaleX:1,scaleY:1},activatorEvent:ae,active:ee,activeNodeRect:ze,containerNodeRect:Et,draggingNodeRect:Se,over:ht.current.over,overlayNodeRect:Ge.rect,scrollableAncestors:Ve,scrollableAncestorRects:He,windowRect:De}),It=Ne?To(Ne,z):null,Ot=cM(Ve),Tt=Wb(Ot),Yt=Wb(Ot,[ze]),M=To(tt,Tt),C=Se?DU(Se,tt):null,S=ee&&C?p({active:ee,collisionRect:C,droppableRects:ne,droppableContainers:q,pointerCoordinates:It}):null,G=nw(S,"id"),[re,pe]=b.useState(null),Ce=Fe?tt:To(tt,Yt),_e=kU(Ce,(l=re==null?void 0:re.rect)!=null?l:null,ze),ct=b.useRef(null),gt=b.useCallback((Rt,ta)=>{let{sensor:Me,options:rn}=ta;if(X.current==null)return;const Nt=O.get(X.current);if(!Nt)return;const kt=Rt.nativeEvent,ka=new Me({active:X.current,activeNode:Nt,event:kt,options:rn,context:ht,onAbort(zt){if(!O.get(zt))return;const{onDragAbort:Gt}=se.current,Vt={id:zt};Gt==null||Gt(Vt),B({type:"onDragAbort",event:Vt})},onPending(zt,Lt,Gt,Vt){if(!O.get(zt))return;const{onDragPending:Aa}=se.current,Ma={id:zt,constraint:Lt,initialCoordinates:Gt,offset:Vt};Aa==null||Aa(Ma),B({type:"onDragPending",event:Ma})},onStart(zt){const Lt=X.current;if(Lt==null)return;const Gt=O.get(Lt);if(!Gt)return;const{onDragStart:Vt}=se.current,pa={activatorEvent:kt,active:{id:Lt,data:Gt.data,rect:te}};wo.unstable_batchedUpdates(()=>{Vt==null||Vt(pa),_(es.Initializing),L({type:qa.DragStart,initialCoordinates:zt,active:Lt}),B({type:"onDragStart",event:pa}),W(ct.current),be(kt)})},onMove(zt){L({type:qa.DragMove,coordinates:zt})},onEnd:sn(qa.DragEnd),onCancel:sn(qa.DragCancel)});ct.current=ka;function sn(zt){return async function(){const{active:Gt,collisions:Vt,over:pa,scrollAdjustedTranslate:Aa}=ht.current;let Ma=null;if(Gt&&Aa){const{cancelDrop:hn}=se.current;Ma={activatorEvent:kt,active:Gt,collisions:Vt,delta:Aa,over:pa},zt===qa.DragEnd&&typeof hn=="function"&&await Promise.resolve(hn(Ma))&&(zt=qa.DragCancel)}X.current=null,wo.unstable_batchedUpdates(()=>{L({type:zt}),_(es.Uninitialized),pe(null),W(null),be(null),ct.current=null;const hn=zt===qa.DragEnd?"onDragEnd":"onDragCancel";if(Ma){const _a=se.current[hn];_a==null||_a(Ma),B({type:hn,event:Ma})}})}}},[O]),St=b.useCallback((Rt,ta)=>(Me,rn)=>{const Nt=Me.nativeEvent,kt=O.get(rn);if(X.current!==null||!kt||Nt.dndKit||Nt.defaultPrevented)return;const ka={active:kt};Rt(Me,ta.options,ka)===!0&&(Nt.dndKit={capturedBy:ta.sensor},X.current=rn,gt(Me,ta))},[O,gt]),pt=aM(A,St);dM(A),zr(()=>{ze&&F===es.Initializing&&_(es.Initialized)},[ze,F]),b.useEffect(()=>{const{onDragMove:Rt}=se.current,{active:ta,activatorEvent:Me,collisions:rn,over:Nt}=ht.current;if(!ta||!Me)return;const kt={active:ta,activatorEvent:Me,collisions:rn,delta:{x:M.x,y:M.y},over:Nt};wo.unstable_batchedUpdates(()=>{Rt==null||Rt(kt),B({type:"onDragMove",event:kt})})},[M.x,M.y]),b.useEffect(()=>{const{active:Rt,activatorEvent:ta,collisions:Me,droppableContainers:rn,scrollAdjustedTranslate:Nt}=ht.current;if(!Rt||X.current==null||!ta||!Nt)return;const{onDragOver:kt}=se.current,ka=rn.get(G),sn=ka&&ka.rect.current?{id:ka.id,rect:ka.rect.current,data:ka.data,disabled:ka.disabled}:null,zt={active:Rt,activatorEvent:ta,collisions:Me,delta:{x:Nt.x,y:Nt.y},over:sn};wo.unstable_batchedUpdates(()=>{pe(sn),kt==null||kt(zt),B({type:"onDragOver",event:zt})})},[G]),zr(()=>{ht.current={activatorEvent:ae,active:ee,activeNode:Ee,collisionRect:C,collisions:S,droppableRects:ne,draggableNodes:O,draggingNode:Ft,draggingNodeRect:Se,droppableContainers:Q,over:re,scrollableAncestors:Ve,scrollAdjustedTranslate:M},te.current={initial:Se,translated:C}},[ee,Ee,S,C,O,Ft,Se,ne,Q,re,Ve,M]),$U({...we,delta:z,draggingRect:C,pointerCoordinates:It,scrollableAncestors:Ve,scrollableAncestorRects:He});const gr=b.useMemo(()=>({active:ee,activeNode:Ee,activeNodeRect:ze,activatorEvent:ae,collisions:S,containerNodeRect:Et,dragOverlay:Ge,draggableNodes:O,droppableContainers:Q,droppableRects:ne,over:re,measureDroppableContainers:Ie,scrollableAncestors:Ve,scrollableAncestorRects:He,measuringConfiguration:Y,measuringScheduled:ce,windowRect:De}),[ee,Ee,ze,ae,S,Et,Ge,O,Q,ne,re,Ie,Ve,He,Y,ce,De]),ca=b.useMemo(()=>({activatorEvent:ae,activators:pt,active:ee,activeNodeRect:ze,ariaDescribedById:{draggable:P},dispatch:L,draggableNodes:O,over:re,measureDroppableContainers:Ie}),[ae,pt,ee,ze,L,P,O,re,Ie]);return tn.createElement(ew.Provider,{value:k},tn.createElement(Wu.Provider,{value:ca},tn.createElement(fw.Provider,{value:gr},tn.createElement(hw.Provider,{value:_e},g)),tn.createElement(vM,{disabled:(m==null?void 0:m.restoreFocus)===!1})),tn.createElement(IU,{...m,hiddenTextDescribedById:P}));function nn(){const Rt=(ue==null?void 0:ue.autoScrollEnabled)===!1,ta=typeof f=="object"?f.enabled===!1:f===!1,Me=V&&!Rt&&!ta;return typeof f=="object"?{...f,enabled:Me}:{enabled:Me}}}),NM=b.createContext(null),Jb="button",xM="Draggable";function TM(t){let{id:e,data:n,disabled:i=!1,attributes:s}=t;const l=Lc(xM),{activators:d,activatorEvent:m,active:f,activeNodeRect:g,ariaDescribedById:A,draggableNodes:p,over:v}=b.useContext(Wu),{role:I=Jb,roleDescription:x="draggable",tabIndex:N=0}=s??{},T=(f==null?void 0:f.id)===e,L=b.useContext(T?hw:NM),[B,k]=Lu(),[F,_]=Lu(),V=uM(d,e),U=Ac(n);zr(()=>(p.set(e,{id:e,key:l,node:B,activatorNode:F,data:U}),()=>{const z=p.get(e);z&&z.key===l&&p.delete(e)}),[p,e]);const O=b.useMemo(()=>({role:I,tabIndex:N,"aria-disabled":i,"aria-pressed":T&&I===Jb?!0:void 0,"aria-roledescription":x,"aria-describedby":A.draggable}),[i,I,N,T,x,A.draggable]);return{active:f,activatorEvent:m,activeNodeRect:g,attributes:O,isDragging:T,listeners:i?void 0:V,node:B,over:v,setNodeRef:k,setActivatorNodeRef:_,transform:L}}function kM(){return b.useContext(fw)}const LM="Droppable",DM={timeout:25};function RM(t){let{data:e,disabled:n=!1,id:i,resizeObserverConfig:s}=t;const l=Lc(LM),{active:d,dispatch:m,over:f,measureDroppableContainers:g}=b.useContext(Wu),A=b.useRef({disabled:n}),p=b.useRef(!1),v=b.useRef(null),I=b.useRef(null),{disabled:x,updateMeasurementsFor:N,timeout:T}={...DM,...s},L=Ac(N??i),B=b.useCallback(()=>{if(!p.current){p.current=!0;return}I.current!=null&&clearTimeout(I.current),I.current=setTimeout(()=>{g(Array.isArray(L.current)?L.current:[L.current]),I.current=null},T)},[T]),k=qu({callback:B,disabled:x||!d}),F=b.useCallback((O,z)=>{k&&(z&&(k.unobserve(z),p.current=!1),O&&k.observe(O))},[k]),[_,V]=Lu(F),U=Ac(e);return b.useEffect(()=>{!k||!_.current||(k.disconnect(),p.current=!1,k.observe(_.current))},[_,k]),b.useEffect(()=>(m({type:qa.RegisterDroppable,element:{id:i,key:l,disabled:n,node:_,rect:v,data:U}}),()=>m({type:qa.UnregisterDroppable,key:l,id:i})),[i]),b.useEffect(()=>{n!==A.current.disabled&&(m({type:qa.SetDroppableDisabled,id:i,key:l,disabled:n}),A.current.disabled=n)},[i,l,n,m]),{active:d,rect:v,isOver:(f==null?void 0:f.id)===i,node:_,over:f,setNodeRef:V}}function _p(t,e,n){const i=t.slice();return i.splice(n<0?i.length+n:n,0,i.splice(e,1)[0]),i}function BM(t,e){return t.reduce((n,i,s)=>{const l=e.get(i);return l&&(n[s]=l),n},Array(t.length))}function tu(t){return t!==null&&t>=0}function UM(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function MM(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const pw=t=>{let{rects:e,activeIndex:n,overIndex:i,index:s}=t;const l=_p(e,i,n),d=e[s],m=l[s];return!m||!d?null:{x:m.left-d.left,y:m.top-d.top,scaleX:m.width/d.width,scaleY:m.height/d.height}},au={scaleX:1,scaleY:1},_M=t=>{var e;let{activeIndex:n,activeNodeRect:i,index:s,rects:l,overIndex:d}=t;const m=(e=l[n])!=null?e:i;if(!m)return null;if(s===n){const g=l[d];return g?{x:0,y:n<d?g.top+g.height-(m.top+m.height):g.top-m.top,...au}:null}const f=FM(l,s,n);return s>n&&s<=d?{x:0,y:-m.height-f,...au}:s<n&&s>=d?{x:0,y:m.height+f,...au}:{x:0,y:0,...au}};function FM(t,e,n){const i=t[e],s=t[e-1],l=t[e+1];return i?n<e?s?i.top-(s.top+s.height):l?l.top-(i.top+i.height):0:l?l.top-(i.top+i.height):s?i.top-(s.top+s.height):0:0}const Aw="Sortable",yw=tn.createContext({activeIndex:-1,containerId:Aw,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:pw,disabled:{draggable:!1,droppable:!1}});function OM(t){let{children:e,id:n,items:i,strategy:s=pw,disabled:l=!1}=t;const{active:d,dragOverlay:m,droppableRects:f,over:g,measureDroppableContainers:A}=kM(),p=Lc(Aw,n),v=m.rect!==null,I=b.useMemo(()=>i.map(V=>typeof V=="object"&&"id"in V?V.id:V),[i]),x=d!=null,N=d?I.indexOf(d.id):-1,T=g?I.indexOf(g.id):-1,L=b.useRef(I),B=!UM(I,L.current),k=T!==-1&&N===-1||B,F=MM(l);zr(()=>{B&&x&&A(I)},[B,I,x,A]),b.useEffect(()=>{L.current=I},[I]);const _=b.useMemo(()=>({activeIndex:N,containerId:p,disabled:F,disableTransforms:k,items:I,overIndex:T,useDragOverlay:v,sortedRects:BM(I,f),strategy:s}),[N,p,F.draggable,F.droppable,k,I,T,f,v,s]);return tn.createElement(yw.Provider,{value:_},e)}const jM=t=>{let{id:e,items:n,activeIndex:i,overIndex:s}=t;return _p(n,i,s).indexOf(e)},PM=t=>{let{containerId:e,isSorting:n,wasDragging:i,index:s,items:l,newIndex:d,previousItems:m,previousContainerId:f,transition:g}=t;return!g||!i||m!==l&&s===d?!1:n?!0:d!==s&&e===f},HM={duration:200,easing:"ease"},Ew="transform",zM=Ec.Transition.toString({property:Ew,duration:0,easing:"linear"}),VM={roleDescription:"sortable"};function QM(t){let{disabled:e,index:n,node:i,rect:s}=t;const[l,d]=b.useState(null),m=b.useRef(n);return zr(()=>{if(!e&&n!==m.current&&i.current){const f=s.current;if(f){const g=Oo(i.current,{ignoreTransform:!0}),A={x:f.left-g.left,y:f.top-g.top,scaleX:f.width/g.width,scaleY:f.height/g.height};(A.x||A.y)&&d(A)}}n!==m.current&&(m.current=n)},[e,n,i,s]),b.useEffect(()=>{l&&d(null)},[l]),l}function KM(t){let{animateLayoutChanges:e=PM,attributes:n,disabled:i,data:s,getNewIndex:l=jM,id:d,strategy:m,resizeObserverConfig:f,transition:g=HM}=t;const{items:A,containerId:p,activeIndex:v,disabled:I,disableTransforms:x,sortedRects:N,overIndex:T,useDragOverlay:L,strategy:B}=b.useContext(yw),k=GM(i,I),F=A.indexOf(d),_=b.useMemo(()=>({sortable:{containerId:p,index:F,items:A},...s}),[p,s,F,A]),V=b.useMemo(()=>A.slice(A.indexOf(d)),[A,d]),{rect:U,node:O,isOver:z,setNodeRef:Q}=RM({id:d,data:_,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:V,...f}}),{active:K,activatorEvent:te,activeNodeRect:ee,attributes:X,setNodeRef:ue,listeners:W,isDragging:ae,over:be,setActivatorNodeRef:se,transform:P}=TM({id:d,data:_,attributes:{...VM,...n},disabled:k.draggable}),q=cU(Q,ue),Y=!!K,ne=Y&&!x&&tu(v)&&tu(T),Ie=!L&&ae,ce=Ie&&ne?P:null,Ne=ne?ce??(m??B)({rects:N,activeNodeRect:ee,activeIndex:v,overIndex:T,index:F}):null,we=tu(v)&&tu(T)?l({id:d,items:A,activeIndex:v,overIndex:T}):F,Oe=K==null?void 0:K.id,ze=b.useRef({activeId:Oe,items:A,newIndex:we,containerId:p}),Et=A!==ze.current.items,ht=e({active:K,containerId:p,isDragging:ae,isSorting:Y,id:d,index:F,items:A,newIndex:ze.current.newIndex,previousItems:ze.current.items,previousContainerId:ze.current.containerId,transition:g,wasDragging:ze.current.activeId!=null}),it=QM({disabled:!ht,index:F,node:O,rect:U});return b.useEffect(()=>{Y&&ze.current.newIndex!==we&&(ze.current.newIndex=we),p!==ze.current.containerId&&(ze.current.containerId=p),A!==ze.current.items&&(ze.current.items=A)},[Y,we,p,A]),b.useEffect(()=>{if(Oe===ze.current.activeId)return;if(Oe!=null&&ze.current.activeId==null){ze.current.activeId=Oe;return}const Ft=setTimeout(()=>{ze.current.activeId=Oe},50);return()=>clearTimeout(Ft)},[Oe]),{active:K,activeIndex:v,attributes:X,data:_,rect:U,index:F,newIndex:we,items:A,isOver:z,isSorting:Y,isDragging:ae,listeners:W,node:O,overIndex:T,over:be,setNodeRef:q,setActivatorNodeRef:se,setDroppableNodeRef:Q,setDraggableNodeRef:ue,transform:it??Ne,transition:Ge()};function Ge(){if(it||Et&&ze.current.newIndex===F)return zM;if(!(Ie&&!Dp(te)||!g)&&(Y||ht))return Ec.Transition.toString({...g,property:Ew})}}function GM(t,e){var n,i;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t==null?void 0:t.draggable)!=null?n:e.draggable,droppable:(i=t==null?void 0:t.droppable)!=null?i:e.droppable}}function Bu(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const qM=[Qt.Down,Qt.Right,Qt.Up,Qt.Left],WM=(t,e)=>{let{context:{active:n,collisionRect:i,droppableRects:s,droppableContainers:l,over:d,scrollableAncestors:m}}=e;if(qM.includes(t.code)){if(t.preventDefault(),!n||!i)return;const f=[];l.getEnabled().forEach(p=>{if(!p||p!=null&&p.disabled)return;const v=s.get(p.id);if(v)switch(t.code){case Qt.Down:i.top<v.top&&f.push(p);break;case Qt.Up:i.top>v.top&&f.push(p);break;case Qt.Left:i.left>v.left&&f.push(p);break;case Qt.Right:i.left<v.left&&f.push(p);break}});const g=NU({collisionRect:i,droppableRects:s,droppableContainers:f});let A=nw(g,"id");if(A===(d==null?void 0:d.id)&&g.length>1&&(A=g[1].id),A!=null){const p=l.get(n.id),v=l.get(A),I=v?s.get(v.id):null,x=v==null?void 0:v.node.current;if(x&&I&&p&&v){const T=Gu(x).some((V,U)=>m[U]!==V),L=bw(p,v),B=YM(p,v),k=T||!L?{x:0,y:0}:{x:B?i.width-I.width:0,y:B?i.height-I.height:0},F={x:I.left,y:I.top};return k.x&&k.y?F:yc(F,k)}}}};function bw(t,e){return!Bu(t)||!Bu(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function YM(t,e){return!Bu(t)||!Bu(e)||!bw(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}const JM=({htmlFor:t,label:e,onLabelChange:n,onDelete:i})=>{const[s,l]=b.useState(!1),[d,m]=b.useState(e),f=()=>{d.trim()&&(n(d.trim()),l(!1))},g=()=>{m(e),l(!1)},A=p=>{p.key==="Enter"?f():p.key==="Escape"&&g()};return s?c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx("input",{type:"text",value:d,onChange:p=>m(p.target.value),onKeyDown:A,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}),c.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:"✓"}),c.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:"✕"})]}):c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx("label",{htmlFor:t,className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:e}),c.jsx("button",{type:"button",onClick:()=>l(!0),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-xs",title:"Edit label",children:c.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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&&c.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:c.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})})})]})},XM=({name:t})=>{switch(t){case"visibility":return c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),c.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return c.jsxs(c.Fragment,{children:[c.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"}),c.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"refresh":return c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M23 4v6h-6"}),c.jsx("path",{d:"M1 20v-6h6"}),c.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 c.jsxs(c.Fragment,{children:[c.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"}),c.jsx("path",{d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]});default:return null}},Dc=b.forwardRef(({id:t,label:e,value:n,onChange:i,type:s="text",placeholder:l,required:d=!1,multiline:m=!1,rows:f=1,error:g,buttons:A=[],showPassword:p,onShowPasswordChange:v},I)=>{const{t:x}=nt(),[N,T]=tn.useState(!1),L=p!==void 0?p:N,B=_=>{p!==void 0?v==null||v(_):T(_)},k=`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`,F=s==="password"?[...A,{icon:L?"visibility-off":"visibility",onClick:()=>B(!L),title:x(L?"common.hidePassword":"common.showPassword")}]:A;return c.jsxs("div",{children:[c.jsxs("label",{htmlFor:t,className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:[e,d&&c.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),c.jsxs("div",{className:"relative",children:[m?c.jsx("textarea",{id:t,value:n,onChange:_=>i(_.target.value),rows:f,placeholder:l,className:k}):c.jsx("input",{ref:I,type:s==="password"&&!L?"password":"text",id:t,value:n,onChange:_=>i(_.target.value),placeholder:l,className:k}),F.length>0&&c.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:F.map((_,V)=>c.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:c.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx(XM,{name:_.icon})})},V))})]}),g&&c.jsx("p",{className:"mt-1 text-sm text-red-500",children:g})]})});Dc.displayName="FormInput";const vw=({id:t,label:e,value:n,onChange:i,placeholder:s,error:l,showValue:d,onShowValueChange:m})=>{const{t:f}=nt(),[g,A]=b.useState(!1),p=d!==void 0?d:g,v=b.useCallback(x=>{d!==void 0?m==null||m(x):A(x)},[d,m]),I=b.useCallback(()=>{v(!p)},[p,v]);return c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{htmlFor:t,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),c.jsxs("div",{className:"flex",children:[c.jsx("div",{className:"relative flex-grow",children:c.jsx("input",{type:p?"text":"password",id:t,value:n,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"})}),c.jsx("div",{className:"flex",children:c.jsx("button",{type:"button",onClick:I,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:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p?c.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"}):c.jsxs(c.Fragment,{children:[c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),c.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&&c.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:l})]})},$M=({field:t,value:e,onValueChange:n,onLabelChange:i,onDelete:s})=>{const{attributes:l,listeners:d,setNodeRef:m,transform:f,transition:g,isDragging:A}=KM({id:t.tempId}),p={transform:Ec.Transform.toString(f),transition:g,opacity:A?.5:1,zIndex:A?1e3:"auto"},v=()=>t.fieldType===Zt.TextArea?c.jsx("textarea",{id:t.tempId,value:e,onChange:I=>n(I.target.value),rows:4,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"}):t.isHidden||t.fieldType===Zt.Hidden||t.fieldType===Zt.Password?c.jsx(vw,{id:t.tempId,label:"",value:e,onChange:n}):c.jsx(Dc,{id:t.tempId,label:"",value:e,onChange:n,type:"text"});return c.jsxs("div",{ref:m,style:p,className:"relative bg-white dark:bg-gray-800",children:[c.jsx("div",{className:"cursor-grab active:cursor-grabbing",...l,...d,children:c.jsx(JM,{htmlFor:t.tempId,label:t.label,onLabelChange:i,onDelete:s})}),v()]})},ZM=({customFields:t,fieldValues:e,onFieldsReorder:n,onFieldValueChange:i,onFieldLabelChange:s,onFieldDelete:l})=>{const d=wU(Ob(Mp,{activationConstraint:{distance:8}}),Ob(Bp,{coordinateGetter:WM})),m=b.useCallback(f=>{const{active:g,over:A}=f;if(A&&g.id!==A.id){const p=t.findIndex(N=>N.tempId===g.id),v=t.findIndex(N=>N.tempId===A.id),x=_p(t,p,v).map((N,T)=>({...N,displayOrder:T}));n(x)}},[t,n]);return t.length===0?null:c.jsx(SM,{sensors:d,collisionDetection:SU,onDragEnd:m,children:c.jsx(OM,{items:t.map(f=>f.tempId),strategy:_M,children:c.jsx("div",{className:"space-y-3",children:t.map(f=>c.jsx($M,{field:f,value:e[f.tempId]||"",onValueChange:g=>i(f.tempId,g),onLabelChange:g=>s(f.tempId,g),onDelete:()=>l(f.tempId)},f.tempId))})})})},e_=({id:t,value:e,onChange:n,error:i,required:s=!1,onRemove:l,onGenerateAlias:d,isEmailMode:m,onEmailModeChange:f})=>{const{t:g}=nt(),A=ea(),p=m!==void 0,[v,I]=b.useState(!0),x=p?m:v,N=b.useCallback(se=>{const P=typeof se=="function"?se(x):se;p&&f?f(P):I(P)},[p,f,x]),[T,L]=b.useState(""),[B,k]=b.useState(""),[F,_]=b.useState(!1),[V,U]=b.useState([]),[O,z]=b.useState([]),[Q,K]=b.useState([]),te=b.useRef(null),ee=b.useRef(!1);b.useEffect(()=>{(async()=>{const P=await A.getVaultMetadata();U((P==null?void 0:P.publicEmailDomains)??[]),z((P==null?void 0:P.privateEmailDomains)??[]),K((P==null?void 0:P.hiddenPrivateEmailDomains)??[])})()},[A]);const X=b.useMemo(()=>O.length>0&&!(O.length===1&&(O[0]==="DISABLED.TLD"||O[0]==="")),[O]);b.useEffect(()=>{if(!e){L(""),B||(X&&O[0]?k(O[0]):V[0]&&k(V[0]));return}if(e.includes("@")){const[se,P]=e.split("@");if(L(se),k(P),!ee.current){const q=V.includes(P)||O.includes(P)||Q.includes(P);p&&f?f(!q):p||N(!q)}}else L(e),!B&&!e.includes("@")&&(X&&O[0]?k(O[0]):V[0]&&k(V[0]))},[e,V,O,Q,X,p,f,B,N]),b.useEffect(()=>{if(ee.current||!e||!e.includes("@"))return;const se=e.split("@")[1];if(!se)return;const P=V.includes(se)||O.includes(se)||Q.includes(se);p&&f?f(!P):p||P&&x&&N(!1)},[V,O,Q,e,x,p,f,N]),b.useEffect(()=>{if(!x&&e&&!e.includes("@")&&e.trim()){const se=X&&O[0]?O[0]:V[0],P=B||se;P&&(!B&&se&&k(se),n(`${e}@${P}`))}},[e,x,B,X,O,V,n]);const ue=b.useCallback(se=>{const P=se.target.value;if(ee.current=!1,x){n(P);return}if(P.includes("@")){N(!0),n(P);return}if(L(P),!P||P.trim()==="")n("");else{const q=B||(X&&O[0]?O[0]:V[0]||"");q?(n(`${P}@${q}`),B||k(q)):n(P)}},[x,B,n,N,X,O,V]),W=b.useCallback(se=>{k(se);const P=T.includes("@")?T.split("@")[0]:T;!P||P.trim()===""?n(""):n(`${P}@${se}`),N(!1),_(!1)},[T,n,N]),ae=b.useCallback(()=>{ee.current=!0;const se=!x;if(N(se),se)n(""),L("");else{const P=X&&O[0]?O[0]:V[0];k(P),L(""),n("")}},[x,X,V,O,n,N]);b.useEffect(()=>{const se=P=>{te.current&&!te.current.contains(P.target)&&_(!1)};if(F)return document.addEventListener("mousedown",se),()=>{document.removeEventListener("mousedown",se)}},[F]);const be=b.useCallback(()=>{ee.current=!0,N(!1);const se=X&&O[0]?O[0]:V[0];se&&k(se),L(""),n(""),d&&d()},[d,N,X,O,V,n]);return c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("div",{className:"flex items-center",children:c.jsxs("div",{className:"flex items-center",children:[c.jsx("button",{type:"button",onClick:x?void 0:ae,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")}),c.jsx("span",{className:"mx-2 text-gray-400 dark:text-gray-500",children:"/"}),c.jsx("button",{type:"button",onClick:x?be: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&&c.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}),l&&c.jsx("button",{type:"button",onClick:l,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:c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),c.jsxs("div",{className:"relative w-full",children:[c.jsxs("div",{className:"flex w-full",children:[c.jsx("input",{type:"text",id:t,className:`flex-1 min-w-0 px-3 py-2 border text-sm ${i?"border-red-500":"border-gray-300 dark:border-gray-600"} ${x?"rounded-md":"rounded-l-md"} focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white`,value:x?e:T,onChange:ue}),!x&&c.jsxs("button",{type:"button",onClick:()=>_(!F),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:[c.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"@"}),c.jsx("span",{className:"truncate ml-0.5",children:B})]}),!x&&d&&c.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:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})})})]}),F&&!x&&c.jsx("div",{ref:te,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:c.jsxs("div",{className:"p-4",children:[X&&c.jsxs("div",{className:"mb-4",children:[c.jsxs("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:[g("items.privateEmailTitle")," ",c.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",g("items.privateEmailAliasVaultServer"),")"]})]}),c.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:g("items.privateEmailDescription")}),c.jsx("div",{className:"flex flex-wrap gap-2",children:O.filter(se=>!Q.includes(se)).map(se=>c.jsx("button",{type:"button",onClick:()=>W(se),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${B===se?"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:se},se))})]}),c.jsxs("div",{className:X?"border-t border-gray-200 dark:border-gray-600 pt-4":"",children:[c.jsx("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:g("items.publicEmailTitle")}),c.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:g("items.publicEmailDescription")}),c.jsx("div",{className:"flex flex-wrap gap-2",children:V.map(se=>c.jsx("button",{type:"button",onClick:()=>W(se),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${B===se?"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:se},se))})]})]})})]}),i&&c.jsx("p",{className:"text-sm text-red-500 mt-1",children:i})]})},nu=({title:t,children:e,actions:n})=>c.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[t&&c.jsxs("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white flex items-center justify-between",children:[typeof t=="string"?c.jsx("span",{children:t}):t,n&&c.jsx("div",{className:"flex items-center gap-2",children:n})]}),c.jsx("div",{className:"space-y-4",children:e})]});var t_=class{constructor(t){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,t&&this.applySettings(t)}applySettings(t){return this.length=t.Length,this.useLowercase=t.UseLowercase,this.useUppercase=t.UseUppercase,this.useNumbers=t.UseNumbers,this.useSpecial=t.UseSpecialChars,this.useNonAmbiguous=t.UseNonAmbiguousChars,this}setLength(t){return this.length=t,this}useLowercaseLetters(t){return this.useLowercase=t,this}useUppercaseLetters(t){return this.useUppercase=t,this}useNumericCharacters(t){return this.useNumbers=t,this}useSpecialCharacters(t){return this.useSpecial=t,this}useNonAmbiguousCharacters(t){return this.useNonAmbiguous=t,this}getUnbiasedRandomIndex(t){const e=Math.floor(4294967296/t)*t;for(;;){const n=new Uint32Array(1);crypto.getRandomValues(n);const i=n[0];if(i<e)return i%t}}generateRandomPassword(){const t=this.buildCharacterSet();let e=this.generateInitialPassword(t);return e=this.ensureRequirements(e),e}buildCharacterSet(){let t="";return this.useLowercase&&(t+=this.lowercaseChars),this.useUppercase&&(t+=this.uppercaseChars),this.useNumbers&&(t+=this.numberChars),this.useSpecial&&(t+=this.specialChars),t.length===0&&(t=this.lowercaseChars),this.useNonAmbiguous&&(t=this.removeAmbiguousCharacters(t)),t}removeAmbiguousCharacters(t){for(const e of this.ambiguousChars)t=t.replace(e,"");return t}generateInitialPassword(t){let e="";for(let n=0;n<this.length;n++)e+=t[this.getUnbiasedRandomIndex(t.length)];return e}ensureRequirements(t){return this.useLowercase&&!/[a-z]/.exec(t)&&(t=this.addCharacterFromSet(t,this.getSafeCharacterSet(this.lowercaseChars))),this.useUppercase&&!/[A-Z]/.exec(t)&&(t=this.addCharacterFromSet(t,this.getSafeCharacterSet(this.uppercaseChars))),this.useNumbers&&!/\d/.exec(t)&&(t=this.addCharacterFromSet(t,this.getSafeCharacterSet(this.numberChars))),this.useSpecial&&!/[!@#$%^&*()_+\-=[\]{}|;:,.<>?]/.exec(t)&&(t=this.addCharacterFromSet(t,this.getSafeCharacterSet(this.specialChars))),t}getSafeCharacterSet(t){return this.useNonAmbiguous?this.removeAmbiguousCharacters(t):t}addCharacterFromSet(t,e){const n=this.getUnbiasedRandomIndex(this.length),i=e[this.getUnbiasedRandomIndex(e.length)];return t.substring(0,n)+i+t.substring(n+1)}},Fp=t=>new t_(t);const a_=({isOpen:t,onClose:e,onSave:n,onSettingsChange:i,initialSettings:s})=>{const{t:l}=nt(),[d,m]=b.useState(s),[f,g]=b.useState(""),A=b.useCallback(x=>{try{const T=Fp(x).generateRandomPassword();g(T)}catch(N){console.error("Error generating preview password:",N),g("")}},[]);b.useEffect(()=>{t&&(m({...s}),A({...s}))},[t,s,A]);const p=b.useCallback((x,N)=>{const T={...d,[x]:N};m(T),A(T),i==null||i(T)},[d,A,i]),v=b.useCallback(()=>{A(d)},[d,A]),I=b.useCallback(()=>{n(f),e()},[f,n,e]);return c.jsx($n,{isOpen:t,onClose:e,title:l("items.changePasswordComplexity"),maxWidth:"max-w-lg",footer:c.jsx("div",{className:"flex justify-end",children:c.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:I,children:[c.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})}),l("common.use")]})}),children:c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.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"}),c.jsx("button",{type:"button",onClick:v,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:l("common.generate"),children:c.jsx("svg",{className:"w-4 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.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:l("items.includeLowercase"),children:c.jsx("span",{className:"font-mono text-base",children:"a-z"})}),c.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:l("items.includeUppercase"),children:c.jsx("span",{className:"font-mono text-base",children:"A-Z"})}),c.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:l("items.includeNumbers"),children:c.jsx("span",{className:"font-mono text-base",children:"0-9"})}),c.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:l("items.includeSpecialChars"),children:c.jsx("span",{className:"font-mono text-base",children:"!@#"})})]}),c.jsxs("div",{className:"flex items-center",children:[c.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"}),c.jsx("label",{htmlFor:"use-non-ambiguous",className:"ml-2 text-sm text-gray-700 dark:text-gray-300",children:l("items.avoidAmbiguousChars")})]})]})]})})},mc=8,Jh=256,n_=0,Op=100,Iw=2;function r_(t){const e=Math.max(0,Math.min(1,t/Op)),n=Math.pow(e,Iw),i=mc+n*(Jh-mc);return Math.round(i)}function i_(t){const n=(Math.max(mc,Math.min(Jh,t))-mc)/(Jh-mc);return Math.pow(n,1/Iw)*Op}const s_=({id:t,label:e,value:n,onChange:i,placeholder:s,error:l,showPassword:d,onShowPasswordChange:m,initialSettings:f,onSettingsChange:g})=>{const{t:A}=nt(),p=ea(),[v,I]=b.useState(!1),[x,N]=b.useState(!1),[T,L]=b.useState(null),[B,k]=b.useState(!1),F=d!==void 0?d:v,_=b.useCallback(ee=>{d!==void 0?m==null||m(ee):I(ee)},[d,m]);b.useEffect(()=>{(async()=>{try{if(p.sqliteClient){if(f!==void 0)L(f);else{const X=p.sqliteClient.settings.getPasswordSettings();L(X)}k(!0)}}catch(X){console.error("Error loading password settings:",X)}})()},[p.sqliteClient,f]);const V=b.useCallback(ee=>{try{const ue=Fp(ee).generateRandomPassword();i(ue),_(!0)}catch(X){console.error("Error generating password:",X)}},[i,_]),U=b.useCallback(ee=>{if(!T)return;const X=parseFloat(ee.target.value),ue=r_(X),W={...T,Length:ue};L(W),g==null||g(W),V(W)},[T,V,g]),O=b.useCallback(()=>{T&&V(T)},[V,T]),z=b.useCallback(ee=>{i(ee),_(!0)},[i,_]),Q=b.useCallback(ee=>{L(ee),g==null||g(ee)},[g]),K=b.useCallback(()=>{_(!F)},[F,_]),te=b.useCallback(()=>{N(!0)},[]);return!T||!B?c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{htmlFor:t,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),c.jsx("div",{className:"animate-pulse bg-gray-200 dark:bg-gray-700 h-10 rounded-lg"})]}):c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{htmlFor:t,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),c.jsxs("div",{className:"flex",children:[c.jsx("div",{className:"relative flex-grow",children:c.jsx("input",{type:F?"text":"password",id:t,value:n,onChange:ee=>i(ee.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"})}),c.jsxs("div",{className:"flex",children:[c.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:A(F?"common.hidePassword":"common.showPassword"),children:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:F?c.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"}):c.jsxs(c.Fragment,{children:[c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),c.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.jsx("button",{type:"button",onClick:O,className:"px-3 text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-r-lg text-sm border-l border-gray-300 dark:border-gray-700 dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:A("common.generate"),children:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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.jsxs("div",{className:"pt-2",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsx("label",{htmlFor:`${t}-length`,className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:A("items.passwordLength")}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 font-mono",children:T.Length}),c.jsx("button",{type:"button",onClick:te,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300",title:A("items.changePasswordComplexity"),children:c.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[c.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"}),c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})]}),c.jsx("input",{type:"range",id:`${t}-length`,min:n_,max:Op,step:"0.1",value:i_(T.Length),onChange:U,className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"})]}),l&&c.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:l}),c.jsx(a_,{isOpen:x,onClose:()=>N(!1),onSave:z,onSettingsChange:Q,initialSettings:T})]})},o_=({id:t,label:e,value:n,onChange:i,placeholder:s,error:l,onRegenerate:d})=>{const{t:m}=nt(),f=b.useCallback(A=>{i(A.target.value)},[i]),g=b.useCallback(()=>{d()},[d]);return c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{htmlFor:t,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),c.jsxs("div",{className:"flex",children:[c.jsx("div",{className:"relative flex-grow",children:c.jsx("input",{type:"text",id:t,value:n,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"})}),c.jsx("div",{className:"flex",children:c.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:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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&&c.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:l})]})},l_=({attachments:t,onAttachmentsChange:e,itemId:n})=>{const{t:i}=nt(),[s,l]=b.useState(""),d=async g=>{const A=g.target.files;if(!(!A||A.length===0)){l(i("attachmentUploader.uploading"));try{const p=[...t];for(const v of Array.from(A)){const I=await v.arrayBuffer(),x=new Uint8Array(I),N={Id:crypto.randomUUID().toUpperCase(),Filename:v.name,Blob:x,ItemId:"",CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString(),IsDeleted:!1};p.push(N)}e(p),l(i("attachmentUploader.uploadSuccess")),setTimeout(()=>l(""),3e3)}catch(p){console.error("Error uploading files:",p),l(i("common.errors.unknownErrorTryAgain")),setTimeout(()=>l(""),3e3)}g.target.value=""}},m=g=>{try{const A=[...t],p=A.findIndex(v=>v.Id===g.Id);p!==-1&&A.splice(p,1),e(A),l(i("attachmentUploader.deleteSuccess")),setTimeout(()=>l(""),3e3)}catch(A){console.error("Error deleting attachment:",A),l(i("common.errors.unknownErrorTryAgain")),setTimeout(()=>l(""),3e3)}},f=t.filter(g=>!g.IsDeleted);return c.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[c.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:i("common.attachments")}),c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{children:c.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&&c.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s}),f.length>0&&c.jsx("div",{children:c.jsx("div",{className:"space-y-2",children:f.map(g=>c.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:[c.jsxs("div",{className:"flex flex-col",children:[c.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:g.Filename}),c.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(g.CreatedAt).toLocaleDateString()})]}),c.jsx("button",{type:"button",onClick:()=>m(g),className:"text-red-500 hover:text-red-700 focus:outline-none","aria-label":`Delete ${g.Filename}`,children:c.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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))})})]})]})},Xh=({className:t="w-5 h-5"})=>c.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.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"})}),c_=({itemId:t})=>{const{t:e}=nt(),n=ea(),[i,s]=b.useState([]),[l,d]=b.useState(!0);return b.useEffect(()=>{if(!(n!=null&&n.sqliteClient)||!t){d(!1);return}try{const m=n.sqliteClient.passkeys.getByItemId(t);s(m)}catch(m){console.error("Error loading passkeys:",m)}finally{d(!1)}},[n==null?void 0:n.sqliteClient,t]),l?c.jsx("div",{className:"flex justify-center p-2",children:c.jsx(ur,{})}):i.length===0?null:c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:e("passkeys.passkey")}),i.map(m=>c.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:c.jsxs("div",{className:"flex items-start gap-2",children:[c.jsx(Xh,{className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5 flex-shrink-0"}),c.jsxs("div",{className:"flex-1",children:[c.jsx("div",{className:"mb-1",children:c.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:m.DisplayName||e("passkeys.passkey")})}),c.jsx("div",{className:"space-y-1 mb-2",children:m.RpId&&c.jsxs("div",{children:[c.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[e("passkeys.site"),":"," "]}),c.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:m.RpId})]})}),c.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:e("passkeys.helpText")})]})]})},m.Id))]})},d_=({itemId:t,passkeyIdsMarkedForDeletion:e,onPasskeyMarkedForDeletion:n})=>{const{t:i}=nt(),s=ea(),[l,d]=b.useState([]),[m,f]=b.useState(!0);b.useEffect(()=>{if(!(s!=null&&s.sqliteClient)||!t){f(!1);return}try{const p=s.sqliteClient.passkeys.getByItemId(t);d(p)}catch(p){console.error("Error loading passkeys:",p)}finally{f(!1)}},[s==null?void 0:s.sqliteClient,t]);const g=p=>{e.includes(p)||n([...e,p])},A=p=>{n(e.filter(v=>v!==p))};return m?c.jsx("div",{className:"flex justify-center p-2",children:c.jsx(ur,{})}):l.length===0?null:c.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[c.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:i("passkeys.passkey")}),c.jsx("div",{className:"space-y-3",children:l.map(p=>e.includes(p.Id)?c.jsx("div",{className:"p-3 rounded bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:c.jsxs("div",{className:"flex items-start gap-2",children:[c.jsx(Xh,{className:"w-5 h-5 text-red-600 dark:text-red-400 mt-0.5 flex-shrink-0"}),c.jsxs("div",{className:"flex-1",children:[c.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[c.jsx("span",{className:"text-sm font-medium text-red-900 dark:text-red-100",children:i("passkeys.passkeyMarkedForDeletion")}),c.jsx("button",{type:"button",onClick:()=>A(p.Id),className:"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300",title:i("common.undo"),children:c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M3 7v6h6"}),c.jsx("path",{d:"M21 17a9 9 0 00-9-9 9 9 0 00-6 2.3L3 13"})]})})]}),c.jsx("p",{className:"text-xs text-red-800 dark:text-red-200",children:i("passkeys.passkeyWillBeDeleted")})]})]})},p.Id):c.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:c.jsxs("div",{className:"flex items-start gap-2",children:[c.jsx(Xh,{className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5 flex-shrink-0"}),c.jsxs("div",{className:"flex-1",children:[c.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[c.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:p.DisplayName||i("passkeys.passkey")}),c.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:c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("polyline",{points:"3 6 5 6 21 6"}),c.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"}),c.jsx("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),c.jsx("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]})})]}),c.jsx("div",{className:"space-y-1 mb-2",children:p.RpId&&c.jsxs("div",{children:[c.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[i("passkeys.site"),":"," "]}),c.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:p.RpId})]})}),c.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 u_=t=>{const e=new ArrayBuffer(8),n=new Uint8Array(e);let i=t;for(let s=7;s>=0&&i!==0;s--)n[s]=i&255,i-=n[s],i/=256;return n};function Uu(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function m_(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Yu(t,...e){if(!m_(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function g_(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Uu(t.outputLen),Uu(t.blockLen)}function Do(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function ww(t,e){Yu(t);const n=e.outputLen;if(t.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function f_(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function fh(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Ur(t,e){return t<<32-e|t>>>e}function hh(t,e){return t<<e|t>>>32-e>>>0}const Xb=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function h_(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function $b(t){for(let e=0;e<t.length;e++)t[e]=h_(t[e])}function p_(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function Ju(t){return typeof t=="string"&&(t=p_(t)),Yu(t),t}class jp{clone(){return this._cloneInto()}}function jo(t){const e=i=>t().update(Ju(i)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}class Cw extends jp{update(e){return Do(this),this.iHash.update(e),this}digestInto(e){Do(this),Yu(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:n,iHash:i,finished:s,destroyed:l,blockLen:d,outputLen:m}=this;return e=e,e.finished=s,e.destroyed=l,e.blockLen=d,e.outputLen=m,e.oHash=n._cloneInto(e.oHash),e.iHash=i._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(e,n){super(),this.finished=!1,this.destroyed=!1,g_(e);const i=Ju(n);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,l=new Uint8Array(s);l.set(i.length>s?e.create().update(i).digest():i);for(let d=0;d<l.length;d++)l[d]^=54;this.iHash.update(l),this.oHash=e.create();for(let d=0;d<l.length;d++)l[d]^=106;this.oHash.update(l),l.fill(0)}}const $h=(t,e,n)=>new Cw(t,e).update(n).digest();$h.create=(t,e)=>new Cw(t,e);function A_(t,e,n,i){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,i);const s=BigInt(32),l=BigInt(4294967295),d=Number(n>>s&l),m=Number(n&l),f=i?4:0,g=i?0:4;t.setUint32(e+f,d,i),t.setUint32(e+g,m,i)}function Sw(t,e,n){return t&e^~t&n}function Nw(t,e,n){return t&e^t&n^e&n}class Pp extends jp{update(e){Do(this);const{view:n,buffer:i,blockLen:s}=this;e=Ju(e);const l=e.length;for(let d=0;d<l;){const m=Math.min(s-this.pos,l-d);if(m===s){const f=fh(e);for(;s<=l-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(n,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Do(this),ww(e,this),this.finished=!0;const{buffer:n,view:i,blockLen:s,isLE:l}=this;let{pos:d}=this;n[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++)n[p]=0;A_(i,s-8,BigInt(this.length*8),l),this.process(i,0);const m=fh(e),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const g=f/4,A=this.get();if(g>A.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<g;p++)m.setUint32(4*p,A[p],l)}digest(){const{buffer:e,outputLen:n}=this;this.digestInto(e);const i=e.slice(0,n);return this.destroy(),i}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:n,buffer:i,length:s,finished:l,destroyed:d,pos:m}=this;return e.length=s,e.pos=m,e.finished=l,e.destroyed=d,s%n&&e.buffer.set(i),e}constructor(e,n,i,s){super(),this.blockLen=e,this.outputLen=n,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=fh(this.buffer)}}const ql=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),Yi=new Uint32Array(80);class y_ extends Pp{get(){const{A:e,B:n,C:i,D:s,E:l}=this;return[e,n,i,s,l]}set(e,n,i,s,l){this.A=e|0,this.B=n|0,this.C=i|0,this.D=s|0,this.E=l|0}process(e,n){for(let f=0;f<16;f++,n+=4)Yi[f]=e.getUint32(n,!1);for(let f=16;f<80;f++)Yi[f]=hh(Yi[f-3]^Yi[f-8]^Yi[f-14]^Yi[f-16],1);let{A:i,B:s,C:l,D:d,E:m}=this;for(let f=0;f<80;f++){let g,A;f<20?(g=Sw(s,l,d),A=1518500249):f<40?(g=s^l^d,A=1859775393):f<60?(g=Nw(s,l,d),A=2400959708):(g=s^l^d,A=3395469782);const p=hh(i,5)+g+m+A+Yi[f]|0;m=d,d=l,l=hh(s,30),s=i,i=p}i=i+this.A|0,s=s+this.B|0,l=l+this.C|0,d=d+this.D|0,m=m+this.E|0,this.set(i,s,l,d,m)}roundClean(){Yi.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}constructor(){super(64,20,8,!1),this.A=ql[0]|0,this.B=ql[1]|0,this.C=ql[2]|0,this.D=ql[3]|0,this.E=ql[4]|0}}const E_=jo(()=>new y_),b_=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]),Ji=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Xi=new Uint32Array(64);class xw extends Pp{get(){const{A:e,B:n,C:i,D:s,E:l,F:d,G:m,H:f}=this;return[e,n,i,s,l,d,m,f]}set(e,n,i,s,l,d,m,f){this.A=e|0,this.B=n|0,this.C=i|0,this.D=s|0,this.E=l|0,this.F=d|0,this.G=m|0,this.H=f|0}process(e,n){for(let p=0;p<16;p++,n+=4)Xi[p]=e.getUint32(n,!1);for(let p=16;p<64;p++){const v=Xi[p-15],I=Xi[p-2],x=Ur(v,7)^Ur(v,18)^v>>>3,N=Ur(I,17)^Ur(I,19)^I>>>10;Xi[p]=N+Xi[p-7]+x+Xi[p-16]|0}let{A:i,B:s,C:l,D:d,E:m,F:f,G:g,H:A}=this;for(let p=0;p<64;p++){const v=Ur(m,6)^Ur(m,11)^Ur(m,25),I=A+v+Sw(m,f,g)+b_[p]+Xi[p]|0,N=(Ur(i,2)^Ur(i,13)^Ur(i,22))+Nw(i,s,l)|0;A=g,g=f,f=m,m=d+I|0,d=l,l=s,s=i,i=I+N|0}i=i+this.A|0,s=s+this.B|0,l=l+this.C|0,d=d+this.D|0,m=m+this.E|0,f=f+this.F|0,g=g+this.G|0,A=A+this.H|0,this.set(i,s,l,d,m,f,g,A)}roundClean(){Xi.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=Ji[0]|0,this.B=Ji[1]|0,this.C=Ji[2]|0,this.D=Ji[3]|0,this.E=Ji[4]|0,this.F=Ji[5]|0,this.G=Ji[6]|0,this.H=Ji[7]|0}}class v_ extends xw{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 I_=jo(()=>new xw),w_=jo(()=>new v_),ru=BigInt(2**32-1),Zh=BigInt(32);function Tw(t,e=!1){return e?{h:Number(t&ru),l:Number(t>>Zh&ru)}:{h:Number(t>>Zh&ru)|0,l:Number(t&ru)|0}}function kw(t,e=!1){let n=new Uint32Array(t.length),i=new Uint32Array(t.length);for(let s=0;s<t.length;s++){const{h:l,l:d}=Tw(t[s],e);[n[s],i[s]]=[l,d]}return[n,i]}const C_=(t,e)=>BigInt(t>>>0)<<Zh|BigInt(e>>>0),S_=(t,e,n)=>t>>>n,N_=(t,e,n)=>t<<32-n|e>>>n,x_=(t,e,n)=>t>>>n|e<<32-n,T_=(t,e,n)=>t<<32-n|e>>>n,k_=(t,e,n)=>t<<64-n|e>>>n-32,L_=(t,e,n)=>t>>>n-32|e<<64-n,D_=(t,e)=>e,R_=(t,e)=>t,Lw=(t,e,n)=>t<<n|e>>>32-n,Dw=(t,e,n)=>e<<n|t>>>32-n,Rw=(t,e,n)=>e<<n-32|t>>>64-n,Bw=(t,e,n)=>t<<n-32|e>>>64-n;function B_(t,e,n,i){const s=(e>>>0)+(i>>>0);return{h:t+n+(s/2**32|0)|0,l:s|0}}const U_=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),M_=(t,e,n,i)=>e+n+i+(t/2**32|0)|0,__=(t,e,n,i)=>(t>>>0)+(e>>>0)+(n>>>0)+(i>>>0),F_=(t,e,n,i,s)=>e+n+i+s+(t/2**32|0)|0,O_=(t,e,n,i,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(i>>>0)+(s>>>0),j_=(t,e,n,i,s,l)=>e+n+i+s+l+(t/2**32|0)|0,xt={fromBig:Tw,split:kw,toBig:C_,shrSH:S_,shrSL:N_,rotrSH:x_,rotrSL:T_,rotrBH:k_,rotrBL:L_,rotr32H:D_,rotr32L:R_,rotlSH:Lw,rotlSL:Dw,rotlBH:Rw,rotlBL:Bw,add:B_,add3L:U_,add3H:M_,add4L:__,add4H:F_,add5H:j_,add5L:O_},[P_,H_]=xt.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(t=>BigInt(t))),$i=new Uint32Array(80),Zi=new Uint32Array(80);class Uw extends Pp{get(){const{Ah:e,Al:n,Bh:i,Bl:s,Ch:l,Cl:d,Dh:m,Dl:f,Eh:g,El:A,Fh:p,Fl:v,Gh:I,Gl:x,Hh:N,Hl:T}=this;return[e,n,i,s,l,d,m,f,g,A,p,v,I,x,N,T]}set(e,n,i,s,l,d,m,f,g,A,p,v,I,x,N,T){this.Ah=e|0,this.Al=n|0,this.Bh=i|0,this.Bl=s|0,this.Ch=l|0,this.Cl=d|0,this.Dh=m|0,this.Dl=f|0,this.Eh=g|0,this.El=A|0,this.Fh=p|0,this.Fl=v|0,this.Gh=I|0,this.Gl=x|0,this.Hh=N|0,this.Hl=T|0}process(e,n){for(let k=0;k<16;k++,n+=4)$i[k]=e.getUint32(n),Zi[k]=e.getUint32(n+=4);for(let k=16;k<80;k++){const F=$i[k-15]|0,_=Zi[k-15]|0,V=xt.rotrSH(F,_,1)^xt.rotrSH(F,_,8)^xt.shrSH(F,_,7),U=xt.rotrSL(F,_,1)^xt.rotrSL(F,_,8)^xt.shrSL(F,_,7),O=$i[k-2]|0,z=Zi[k-2]|0,Q=xt.rotrSH(O,z,19)^xt.rotrBH(O,z,61)^xt.shrSH(O,z,6),K=xt.rotrSL(O,z,19)^xt.rotrBL(O,z,61)^xt.shrSL(O,z,6),te=xt.add4L(U,K,Zi[k-7],Zi[k-16]),ee=xt.add4H(te,V,Q,$i[k-7],$i[k-16]);$i[k]=ee|0,Zi[k]=te|0}let{Ah:i,Al:s,Bh:l,Bl:d,Ch:m,Cl:f,Dh:g,Dl:A,Eh:p,El:v,Fh:I,Fl:x,Gh:N,Gl:T,Hh:L,Hl:B}=this;for(let k=0;k<80;k++){const F=xt.rotrSH(p,v,14)^xt.rotrSH(p,v,18)^xt.rotrBH(p,v,41),_=xt.rotrSL(p,v,14)^xt.rotrSL(p,v,18)^xt.rotrBL(p,v,41),V=p&I^~p&N,U=v&x^~v&T,O=xt.add5L(B,_,U,H_[k],Zi[k]),z=xt.add5H(O,L,F,V,P_[k],$i[k]),Q=O|0,K=xt.rotrSH(i,s,28)^xt.rotrBH(i,s,34)^xt.rotrBH(i,s,39),te=xt.rotrSL(i,s,28)^xt.rotrBL(i,s,34)^xt.rotrBL(i,s,39),ee=i&l^i&m^l&m,X=s&d^s&f^d&f;L=N|0,B=T|0,N=I|0,T=x|0,I=p|0,x=v|0,{h:p,l:v}=xt.add(g|0,A|0,z|0,Q|0),g=m|0,A=f|0,m=l|0,f=d|0,l=i|0,d=s|0;const ue=xt.add3L(Q,te,X);i=xt.add3H(ue,z,K,ee),s=ue|0}({h:i,l:s}=xt.add(this.Ah|0,this.Al|0,i|0,s|0)),{h:l,l:d}=xt.add(this.Bh|0,this.Bl|0,l|0,d|0),{h:m,l:f}=xt.add(this.Ch|0,this.Cl|0,m|0,f|0),{h:g,l:A}=xt.add(this.Dh|0,this.Dl|0,g|0,A|0),{h:p,l:v}=xt.add(this.Eh|0,this.El|0,p|0,v|0),{h:I,l:x}=xt.add(this.Fh|0,this.Fl|0,I|0,x|0),{h:N,l:T}=xt.add(this.Gh|0,this.Gl|0,N|0,T|0),{h:L,l:B}=xt.add(this.Hh|0,this.Hl|0,L|0,B|0),this.set(i,s,l,d,m,f,g,A,p,v,I,x,N,T,L,B)}roundClean(){$i.fill(0),Zi.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 z_ extends Uw{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 V_=jo(()=>new Uw),Q_=jo(()=>new z_),Mw=[],_w=[],Fw=[],K_=BigInt(0),Wl=BigInt(1),G_=BigInt(2),q_=BigInt(7),W_=BigInt(256),Y_=BigInt(113);for(let t=0,e=Wl,n=1,i=0;t<24;t++){[n,i]=[i,(2*n+3*i)%5],Mw.push(2*(5*i+n)),_w.push((t+1)*(t+2)/2%64);let s=K_;for(let l=0;l<7;l++)e=(e<<Wl^(e>>q_)*Y_)%W_,e&G_&&(s^=Wl<<(Wl<<BigInt(l))-Wl);Fw.push(s)}const[J_,X_]=kw(Fw,!0),Zb=(t,e,n)=>n>32?Rw(t,e,n):Lw(t,e,n),ev=(t,e,n)=>n>32?Bw(t,e,n):Dw(t,e,n);function $_(t,e=24){const n=new Uint32Array(10);for(let i=24-e;i<24;i++){for(let d=0;d<10;d++)n[d]=t[d]^t[d+10]^t[d+20]^t[d+30]^t[d+40];for(let d=0;d<10;d+=2){const m=(d+8)%10,f=(d+2)%10,g=n[f],A=n[f+1],p=Zb(g,A,1)^n[m],v=ev(g,A,1)^n[m+1];for(let I=0;I<50;I+=10)t[d+I]^=p,t[d+I+1]^=v}let s=t[2],l=t[3];for(let d=0;d<24;d++){const m=_w[d],f=Zb(s,l,m),g=ev(s,l,m),A=Mw[d];s=t[A],l=t[A+1],t[A]=f,t[A+1]=g}for(let d=0;d<50;d+=10){for(let m=0;m<10;m++)n[m]=t[d+m];for(let m=0;m<10;m++)t[d+m]^=~n[(m+2)%10]&n[(m+4)%10]}t[0]^=J_[i],t[1]^=X_[i]}n.fill(0)}class Hp extends jp{keccak(){Xb||$b(this.state32),$_(this.state32,this.rounds),Xb||$b(this.state32),this.posOut=0,this.pos=0}update(e){Do(this);const{blockLen:n,state:i}=this;e=Ju(e);const s=e.length;for(let l=0;l<s;){const d=Math.min(n-this.pos,s-l);for(let m=0;m<d;m++)i[this.pos++]^=e[l++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:i,blockLen:s}=this;e[i]^=n,(n&128)!==0&&i===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){Do(this,!1),Yu(e),this.finish();const n=this.state,{blockLen:i}=this;for(let s=0,l=e.length;s<l;){this.posOut>=i&&this.keccak();const d=Math.min(i-this.posOut,l-s);e.set(n.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 Uu(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(ww(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:n,suffix:i,outputLen:s,rounds:l,enableXOF:d}=this;return e||(e=new Hp(n,i,s,d,l)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=l,e.suffix=i,e.outputLen=s,e.enableXOF=d,e.destroyed=this.destroyed,e}constructor(e,n,i,s=!1,l=24){if(super(),this.blockLen=e,this.suffix=n,this.outputLen=i,this.enableXOF=s,this.rounds=l,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Uu(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=f_(this.state)}}const Xu=(t,e,n)=>jo(()=>new Hp(e,t,n)),Z_=Xu(6,144,224/8),eF=Xu(6,136,256/8),tF=Xu(6,104,384/8),aF=Xu(6,72,512/8),Ro=(()=>{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})(),tv={SHA1:E_,SHA224:w_,SHA256:I_,SHA384:Q_,SHA512:V_,"SHA3-224":Z_,"SHA3-256":eF,"SHA3-384":tF,"SHA3-512":aF},zp=t=>{switch(!0){case/^(?:SHA-?1|SSL3-SHA1)$/i.test(t):return"SHA1";case/^SHA(?:2?-)?224$/i.test(t):return"SHA224";case/^SHA(?:2?-)?256$/i.test(t):return"SHA256";case/^SHA(?:2?-)?384$/i.test(t):return"SHA384";case/^SHA(?:2?-)?512$/i.test(t):return"SHA512";case/^SHA3-224$/i.test(t):return"SHA3-224";case/^SHA3-256$/i.test(t):return"SHA3-256";case/^SHA3-384$/i.test(t):return"SHA3-384";case/^SHA3-512$/i.test(t):return"SHA3-512";default:throw new TypeError(`Unknown hash algorithm: ${t}`)}},nF=(t,e,n)=>{if($h){const i=tv[t]??tv[zp(t)];return $h(i,e,n)}else throw new Error("Missing HMAC function")},ep="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",rF=t=>{t=t.replace(/ /g,"");let e=t.length;for(;t[e-1]==="=";)--e;t=(e<t.length?t.substring(0,e):t).toUpperCase();const n=new ArrayBuffer(t.length*5/8|0),i=new Uint8Array(n);let s=0,l=0,d=0;for(let m=0;m<t.length;m++){const f=ep.indexOf(t[m]);if(f===-1)throw new TypeError(`Invalid character found: ${t[m]}`);l=l<<5|f,s+=5,s>=8&&(s-=8,i[d++]=l>>>s)}return i},iF=t=>{let e=0,n=0,i="";for(let s=0;s<t.length;s++)for(n=n<<8|t[s],e+=8;e>=5;)i+=ep[n>>>e-5&31],e-=5;return e>0&&(i+=ep[n<<5-e&31]),i},sF=t=>{t=t.replace(/ /g,"");const e=new ArrayBuffer(t.length/2),n=new Uint8Array(e);for(let i=0;i<t.length;i+=2)n[i/2]=parseInt(t.substring(i,i+2),16);return n},oF=t=>{let e="";for(let n=0;n<t.length;n++){const i=t[n].toString(16);i.length===1&&(e+="0"),e+=i}return e.toUpperCase()},lF=t=>{const e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i)&255;return n},cF=t=>{let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},av=Ro.TextEncoder?new Ro.TextEncoder:null,nv=Ro.TextDecoder?new Ro.TextDecoder:null,dF=t=>{if(!av)throw new Error("Encoding API not available");return av.encode(t)},uF=t=>{if(!nv)throw new Error("Encoding API not available");return nv.decode(t)},mF=t=>{var e;if((e=Ro.crypto)!=null&&e.getRandomValues)return Ro.crypto.getRandomValues(new Uint8Array(t));throw new Error("Cryptography API not available")};class pi{static fromLatin1(e){return new pi({buffer:lF(e).buffer})}static fromUTF8(e){return new pi({buffer:dF(e).buffer})}static fromBase32(e){return new pi({buffer:rF(e).buffer})}static fromHex(e){return new pi({buffer:sF(e).buffer})}get buffer(){return this.bytes.buffer}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,writable:!1,configurable:!1,value:cF(this.bytes)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,writable:!1,configurable:!1,value:uF(this.bytes)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,writable:!1,configurable:!1,value:iF(this.bytes)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,writable:!1,configurable:!1,value:oF(this.bytes)}),this.hex}constructor({buffer:e,size:n=20}={}){this.bytes=typeof e>"u"?mF(n):new Uint8Array(e),Object.defineProperty(this,"bytes",{enumerable:!0,writable:!1,configurable:!1,value:this.bytes})}}const gF=(t,e)=>{{if(t.length!==e.length)throw new TypeError("Input strings must have the same length");let n=-1,i=0;for(;++n<t.length;)i|=t.charCodeAt(n)^e.charCodeAt(n);return i===0}};class Pa{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,counter:0,window:1}}static generate({secret:e,algorithm:n=Pa.defaults.algorithm,digits:i=Pa.defaults.digits,counter:s=Pa.defaults.counter}){const l=nF(n,e.bytes,u_(s)),d=l[l.byteLength-1]&15;return(((l[d]&127)<<24|(l[d+1]&255)<<16|(l[d+2]&255)<<8|l[d+3]&255)%10**i).toString().padStart(i,"0")}generate({counter:e=this.counter++}={}){return Pa.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:e})}static validate({token:e,secret:n,algorithm:i,digits:s=Pa.defaults.digits,counter:l=Pa.defaults.counter,window:d=Pa.defaults.window}){if(e.length!==s)return null;let m=null;const f=g=>{const A=Pa.generate({secret:n,algorithm:i,digits:s,counter:g});gF(e,A)&&(m=g-l)};f(l);for(let g=1;g<=d&&m===null&&(f(l-g),!(m!==null||(f(l+g),m!==null)));++g);return m}validate({token:e,counter:n=this.counter,window:i}){return Pa.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:n,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=Pa.defaults.issuer,label:n=Pa.defaults.label,issuerInLabel:i=Pa.defaults.issuerInLabel,secret:s=new pi,algorithm:l=Pa.defaults.algorithm,digits:d=Pa.defaults.digits,counter:m=Pa.defaults.counter}={}){this.issuer=e,this.label=n,this.issuerInLabel=i,this.secret=typeof s=="string"?pi.fromBase32(s):s,this.algorithm=zp(l),this.digits=d,this.counter=m}}class Ta{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}static counter({period:e=Ta.defaults.period,timestamp:n=Date.now()}={}){return Math.floor(n/1e3/e)}counter({timestamp:e=Date.now()}={}){return Ta.counter({period:this.period,timestamp:e})}static remaining({period:e=Ta.defaults.period,timestamp:n=Date.now()}={}){return e*1e3-n%(e*1e3)}remaining({timestamp:e=Date.now()}={}){return Ta.remaining({period:this.period,timestamp:e})}static generate({secret:e,algorithm:n,digits:i,period:s=Ta.defaults.period,timestamp:l=Date.now()}){return Pa.generate({secret:e,algorithm:n,digits:i,counter:Ta.counter({period:s,timestamp:l})})}generate({timestamp:e=Date.now()}={}){return Ta.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:e})}static validate({token:e,secret:n,algorithm:i,digits:s,period:l=Ta.defaults.period,timestamp:d=Date.now(),window:m}){return Pa.validate({token:e,secret:n,algorithm:i,digits:s,counter:Ta.counter({period:l,timestamp:d}),window:m})}validate({token:e,timestamp:n,window:i}){return Ta.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:n,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=Ta.defaults.issuer,label:n=Ta.defaults.label,issuerInLabel:i=Ta.defaults.issuerInLabel,secret:s=new pi,algorithm:l=Ta.defaults.algorithm,digits:d=Ta.defaults.digits,period:m=Ta.defaults.period}={}){this.issuer=e,this.label=n,this.issuerInLabel=i,this.secret=typeof s=="string"?pi.fromBase32(s):s,this.algorithm=zp(l),this.digits=d,this.period=m}}const fF=/^otpauth:\/\/([ht]otp)\/(.+)\?([A-Z0-9.~_-]+=[^?&]*(?:&[A-Z0-9.~_-]+=[^?&]*)*)$/i,hF=/^[2-7A-Z]+=*$/i,pF=/^SHA(?:1|224|256|384|512|3-224|3-256|3-384|3-512)$/i,AF=/^[+-]?\d+$/,rv=/^\+?[1-9]\d*$/;class yF{static parse(e){let n;try{n=e.match(fF)}catch{}if(!Array.isArray(n))throw new URIError("Invalid URI format");const i=n[1].toLowerCase(),s=n[2].split(/(?::|%3A) *(.+)/i,2).map(decodeURIComponent),l=n[3].split("&").reduce((f,g)=>{const A=g.split(/=(.*)/,2).map(decodeURIComponent),p=A[0].toLowerCase(),v=A[1],I=f;return I[p]=v,I},{});let d;const m={};if(i==="hotp")if(d=Pa,typeof l.counter<"u"&&AF.test(l.counter))m.counter=parseInt(l.counter,10);else throw new TypeError("Missing or invalid 'counter' parameter");else if(i==="totp"){if(d=Ta,typeof l.period<"u")if(rv.test(l.period))m.period=parseInt(l.period,10);else throw new TypeError("Invalid 'period' parameter")}else throw new TypeError("Unknown OTP type");if(typeof l.issuer<"u"&&(m.issuer=l.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 l.secret<"u"&&hF.test(l.secret))m.secret=l.secret;else throw new TypeError("Missing or invalid 'secret' parameter");if(typeof l.algorithm<"u")if(pF.test(l.algorithm))m.algorithm=l.algorithm;else throw new TypeError("Invalid 'algorithm' parameter");if(typeof l.digits<"u")if(rv.test(l.digits))m.digits=parseInt(l.digits,10);else throw new TypeError("Invalid 'digits' parameter");return new d(m)}static stringify(e){if(e instanceof Pa||e instanceof Ta)return e.toString();throw new TypeError("Invalid 'HOTP/TOTP' object")}}const tp=({isOpen:t,onClose:e,onConfirm:n,title:i,message:s,confirmText:l})=>{const{t:d}=nt();return c.jsx($n,{isOpen:t,onClose:e,title:i,maxWidth:"max-w-sm",footer:c.jsxs("div",{className:"flex justify-end gap-2",children:[c.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")}),c.jsx("button",{onClick:n,className:"px-4 py-2 text-sm bg-red-600 text-white rounded hover:bg-red-700",children:l})]}),children:c.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:s})})},EF=({totpCodes:t,onTotpCodesChange:e,originalTotpCodeIds:n,isAddFormVisible:i,formData:s,onStateChange:l,itemDisplayName:d,itemUsername:m})=>{const{t:f}=nt(),[g,A]=b.useState(null),[p,v]=b.useState(!1),[I,x]=b.useState(null),[N,T]=b.useState(""),[L,B]=b.useState(""),[k,F]=b.useState(!1),[_,V]=b.useState(null),[U,O]=b.useState(!1),[z,Q]=b.useState(null),K=(ce,Ee)=>{let Ne=ce.trim(),we=Ee.trim();if(Ne.toLowerCase().startsWith("otpauth://totp/"))try{const Oe=yF.parse(Ne);Oe instanceof Ta&&(Ne=Oe.secret.base32,!we&&Oe.label&&(we=Oe.label))}catch{throw new Error(f("totp.errors.invalidSecretKey"))}if(Ne=Ne.replace(/\s/g,""),!/^[A-Z2-7]+=*$/i.test(Ne))throw new Error(f("totp.errors.invalidSecretKey"));return{secretKey:Ne,name:we||f("totp.defaultName")}},te=()=>{l({isAddFormVisible:!0,formData:{name:"",secretKey:""}}),A(null)},ee=()=>{l({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),A(null)},X=ce=>{l({isAddFormVisible:i,formData:{...s,...ce}})},ue=ce=>{if(ce==null||ce.preventDefault(),A(null),!s.secretKey){A(f("items.validation.required"));return}try{const{secretKey:Ee,name:Ne}=K(s.secretKey,s.name),we={Id:crypto.randomUUID().toUpperCase(),Name:Ne,SecretKey:Ee,ItemId:""},Oe=[...t,we];e(Oe),ee()}catch(Ee){Ee instanceof Error?A(Ee.message):A(f("common.errors.unknownErrorTryAgain"))}},W=ce=>{Q(ce),O(!0)},ae=()=>{if(!z)return;const ce=n.includes(z.Id);let Ee;ce?Ee=t.map(Ne=>Ne.Id===z.Id?{...Ne,IsDeleted:!0}:Ne):Ee=t.filter(Ne=>Ne.Id!==z.Id),e(Ee),O(!1),Q(null)},be=()=>{O(!1),Q(null)},se=ce=>{x(ce),T(ce.Name),B(ce.SecretKey),v(!0),F(!1)},P=()=>{v(!1),x(null),T(""),B(""),F(!1),V(null)},q=()=>{if(!I)return;const ce=t.map(Ee=>Ee.Id===I.Id?{...Ee,Name:N,SecretKey:L}:Ee);e(ce),P()},Y=()=>{if(!k&&I){const ce=d||"AliasVault",Ee=m||I.Name,we=`otpauth://totp/${`${encodeURIComponent(ce)}:${encodeURIComponent(Ee)}`}?secret=${I.SecretKey}&issuer=${encodeURIComponent(ce)}`;QI.toDataURL(we,{width:256,margin:2,color:{dark:"#000000",light:"#FFFFFF"}}).then(Oe=>V(Oe)).catch(Oe=>console.error("Failed to generate QR code:",Oe))}F(!k)},ne=t.filter(ce=>!ce.IsDeleted),Ie=ne.length>0;return c.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[c.jsxs("div",{className:"flex justify-between items-center mb-4",children:[c.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:f("common.twoFactorAuthentication")}),Ie&&!i&&c.jsx("button",{type:"button",onClick:te,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:f("totp.addCode"),children:c.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),c.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]}),!Ie&&!i&&c.jsxs("button",{type:"button",onClick:te,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:[c.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),c.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),c.jsx("span",{children:f("totp.addCode")})]}),i&&c.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:[c.jsxs("div",{className:"flex justify-between items-center mb-4",children:[c.jsx("h4",{className:"text-lg font-medium text-gray-900 dark:text-white",children:f("totp.addCode")}),Ie&&c.jsx("button",{type:"button",onClick:ee,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:c.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 14 14",children:c.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})})})]}),c.jsx("p",{className:"mb-4 text-sm text-gray-500 dark:text-gray-400",children:f("totp.instructions")}),g&&c.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:c.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:g})}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"totp-name",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:f("totp.nameOptional")}),c.jsx("input",{id:"totp-name",type:"text",value:s.name,onChange:ce=>X({name:ce.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"})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"totp-secret",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:f("totp.secretKey")}),c.jsx("input",{id:"totp-secret",type:"text",value:s.secretKey,onChange:ce=>X({secretKey:ce.target.value}),onKeyDown:ce=>{ce.key==="Enter"&&(ce.preventDefault(),ue(ce))},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"})]}),c.jsx("div",{className:"flex justify-end",children:c.jsx("button",{type:"button",onClick:ce=>ue(ce),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:f("common.save")})})]}),Ie&&c.jsx("div",{className:"grid grid-cols-1 gap-4 mt-4",children:ne.map(ce=>c.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:c.jsxs("div",{className:"flex justify-between items-center gap-2",children:[c.jsx("div",{className:"flex items-center flex-1",children:c.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:ce.Name})}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"flex flex-col items-end",children:c.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:f("totp.saveToViewCode")})}),c.jsx("button",{type:"button",onClick:()=>se(ce),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",title:f("common.edit"),children:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})})}),c.jsx("button",{type:"button",onClick:()=>W(ce),className:"text-red-600 hover:text-red-800 dark:text-red-500 dark:hover:text-red-400",title:f("common.delete"),children:c.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:c.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"})})})]})]})},ce.Id))}),c.jsx($n,{isOpen:p,onClose:P,title:f("common.edit"),maxWidth:"max-w-lg",children:c.jsx("div",{className:"space-y-4",children:I&&c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-gray-900 dark:text-white mb-2",children:f("totp.nameOptional")}),c.jsx("input",{type:"text",value:N,onChange:ce=>T(ce.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-700 dark:border-gray-600 dark:text-white",placeholder:f("totp.nameOptional")})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsx("label",{className:"text-sm font-medium text-gray-900 dark:text-white",children:f("totp.secretKey")}),c.jsx("button",{type:"button",onClick:Y,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 p-1",title:k?f("common.hide")+" QR Code":f("common.show")+" QR Code",children:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v1m6 11h2m-6 0h-2v4m0-11v3m0 0h.01M12 12h4.01M16 20h4M4 12h4m12 0h.01M5 8h2a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1zm12 0h2a1 1 0 001-1V5a1 1 0 00-1-1h-2a1 1 0 00-1 1v2a1 1 0 001 1zM5 20h2a1 1 0 001-1v-2a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1z"})})})]}),c.jsx("input",{type:"text",value:L,onChange:ce=>B(ce.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-700 dark:border-gray-600 dark:text-white font-mono",placeholder:f("totp.secretKey")}),k&&_&&c.jsx("div",{className:"flex justify-center mt-3",children:c.jsx("div",{className:"bg-white border-2 border-white rounded-lg",children:c.jsx("img",{src:_,alt:"TOTP QR Code",className:"w-64 h-64"})})})]}),c.jsx("button",{type:"button",onClick:q,className:"w-full 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 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800",children:f("common.save")})]})})}),c.jsx(tp,{isOpen:U,onClose:be,onConfirm:ae,title:f("totp.deleteTotpCodeTitle"),message:f("totp.deleteTotpCodeConfirmation",{name:z==null?void 0:z.Name}),confirmText:f("common.delete")})]})},bF=({inputRef:t,value:e,onChange:n,folders:i,selectedFolderId:s,onFolderChange:l})=>{const{t:d}=nt(),[m,f]=b.useState(!1),g=i.find(x=>x.Id===s),A=b.useCallback(x=>{l(x),f(!1)},[l]),p=b.useCallback(x=>{n(x.target.value)},[n]),v=b.useCallback(()=>{f(!0)},[]),I=b.useCallback(()=>{f(!1)},[]);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsxs("label",{htmlFor:"itemName",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:[d("items.itemName")," ",c.jsx("span",{className:"text-red-500",children:"*"})]}),c.jsxs("div",{className:"relative flex items-center",children:[c.jsx("input",{ref:t,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}),c.jsxs("button",{type:"button",onClick:v,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:[c.jsx("svg",{className:"w-4 h-4 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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&&c.jsx("span",{className:"max-w-16 truncate",children:g==null?void 0:g.Name})]})]})]}),m&&c.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-80 transition-opacity",onClick:I}),c.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:c.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:[c.jsxs("button",{type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-500 focus:outline-none",onClick:I,children:[c.jsx("span",{className:"sr-only",children:d("common.close")}),c.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]}),c.jsx("div",{className:"mb-4",children:c.jsx("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white",children:d("items.folder")})}),c.jsxs("div",{className:"space-y-1 max-h-64 overflow-y-auto",children:[c.jsxs("button",{type:"button",onClick:()=>A(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:[c.jsx("svg",{className:`w-5 h-5 ${s?"text-gray-400":"text-primary-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})}),c.jsx("span",{className:"font-medium",children:"—"}),!s&&c.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:c.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=>c.jsxs("button",{type:"button",onClick:()=>A(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:[c.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:c.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"})}),c.jsx("span",{className:"font-medium",children:x.Name}),s===x.Id&&c.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:c.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))]})]})})]})]})},Mu=[{type:va.Login,titleKey:"itemTypes.login.title",iconSvg:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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:va.Alias,titleKey:"itemTypes.alias.title",iconSvg:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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:va.CreditCard,titleKey:"itemTypes.creditCard.title",iconSvg:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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:va.Note,titleKey:"itemTypes.note.title",iconSvg:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})})}],vF=({selectedType:t,isEditMode:e,showDropdown:n,onDropdownToggle:i,onTypeChange:s,onRegenerateAlias:l})=>{const{t:d}=nt(),m=Mu.find(f=>f.type===t);return c.jsxs("div",{className:"relative",children:[c.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:[c.jsxs("button",{type:"button",onClick:()=>i(!n),className:"flex-1 flex items-center justify-between hover:opacity-80 transition-opacity",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-primary-600 dark:text-primary-400",children:m==null?void 0:m.iconSvg}),c.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):""]})]}),c.jsx("svg",{className:`w-4 h-4 text-primary-500 transition-transform ${n?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),t===va.Alias&&!e&&l&&c.jsx("button",{type:"button",onClick:f=>{f.stopPropagation(),l()},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:c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M23 4v6h-6"}),c.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})})]}),n&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),c.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:Mu.map(f=>c.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 ${t===f.type?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300":"text-gray-900 dark:text-white"}`,children:[c.jsx("span",{className:t===f.type?"text-primary-600 dark:text-primary-400":"text-gray-500 dark:text-gray-400",children:f.iconSvg}),c.jsx("span",{className:"font-medium",children:d(f.titleKey)}),t===f.type&&c.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:c.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 Ow=(t=>(t.Male="Male",t.Female="Female",t.Other="Other",t))(Ow||{}),Vp=class mi{constructor(){this.symbols=[".","-"]}generateUsername(e){let n=this.generateEmailPrefix(e);return n=n.replace(/[^a-zA-Z0-9]/g,""),n.length<mi.MIN_LENGTH?n+=this.generateRandomString(mi.MIN_LENGTH-n.length):n.length>mi.MAX_LENGTH&&(n=n.substring(0,mi.MAX_LENGTH)),n}generateEmailPrefix(e){const n=[];switch(typeof e.birthDate=="string"&&(e.birthDate=new Date(e.birthDate)),this.getSecureRandom(4)){case 0:n.push(e.firstName.substring(0,1).toLowerCase()+e.lastName.toLowerCase());break;case 1:n.push((e.firstName+e.lastName).toLowerCase());break;case 2:n.push(e.firstName.toLowerCase()+e.lastName.substring(0,1).toLowerCase());break;case 3:n.push(e.firstName.substring(0,Math.min(3,e.firstName.length)).toLowerCase()+e.lastName.toLowerCase());break}switch(this.getSecureRandom(2)){case 0:n.push(e.birthDate.getFullYear().toString());break;case 1:n.push(e.birthDate.getFullYear().toString().substring(2));break}let i=n.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<mi.MIN_LENGTH?i+=this.generateRandomString(mi.MIN_LENGTH-i.length):i.length>mi.MAX_LENGTH&&(i=i.substring(0,mi.MAX_LENGTH)),i}generateRandomEmailPrefix(e=14){return this.generateRandomString(e)}sanitizeEmailPrefix(e){let n=e.replace(/[^a-zA-Z0-9._-]/g,"");return n=n.replace(/[-_.]{2,}/g,i=>i[0]),n=n.replace(/^[-._]+/,""),n=n.replace(/[-._]*$/,""),n}getRandomSymbol(){return this.getSecureRandom(3)===0?this.symbols[this.getSecureRandom(this.symbols.length)]:""}generateRandomString(e){const n="abcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e},()=>n.charAt(this.getSecureRandom(n.length))).join("")}getSecureRandom(e){const n=new Uint32Array(1);return crypto.getRandomValues(n),n[0]%e}};Vp.MIN_LENGTH=6;Vp.MAX_LENGTH=20;var Qp=Vp,Cr=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(t){if(t){const{targetYear:m,yearDeviation:f}=t;if(f===0){const g=new Date(m,0,1),A=new Date(m,11,31),p=g.getTime()+this.random()*(A.getTime()-g.getTime());return new Date(p)}else{const g=m-f,A=m+f,p=new Date(g,0,1),v=new Date(A,11,31),I=p.getTime()+this.random()*(v.getTime()-p.getTime());return new Date(I)}}const e=new Date,n=21,i=65,s=new Date(e.getFullYear()-i,e.getMonth(),e.getDate()),l=new Date(e.getFullYear()-n,e.getMonth(),e.getDate()),d=s.getTime()+this.random()*(l.getTime()-s.getTime());return new Date(d)}selectFirstnamesForBirthdate(t,e){const n=t.getFullYear(),i=e?this.getFirstNamesMaleByDecade():this.getFirstNamesFemaleByDecade();if(i.length===0)return e?this.firstNamesMale:this.firstNamesFemale;const s=i.filter(d=>n>=d.startYear&&n<=d.endYear);if(s.length>0){const d=[];return s.forEach(m=>d.push(...m.names)),d}const l=[];return i.forEach(d=>l.push(...d.names)),l.length>0?l:e?this.firstNamesMale:this.firstNamesFemale}generateRandomIdentity(t,e){const n={firstName:"",lastName:"",gender:"Male",birthDate:new Date,emailPrefix:"",nickName:""};let i;t==="random"||t===void 0?i=this.random()<.5?"Male":"Female":t==="male"?i="Male":t==="female"?i="Female":i="Male",n.gender=i,n.birthDate=this.generateRandomDateOfBirth(e);let s;if(i==="Male")s=this.selectFirstnamesForBirthdate(n.birthDate,!0);else if(i==="Female")s=this.selectFirstnamesForBirthdate(n.birthDate,!1);else{const d=this.random()<.5;s=this.selectFirstnamesForBirthdate(n.birthDate,d)}n.firstName=s[Math.floor(this.random()*s.length)],n.lastName=this.lastNames[Math.floor(this.random()*this.lastNames.length)];const l=new Qp;return n.emailPrefix=l.generateEmailPrefix(n),n.nickName=l.generateUsername(n),n}},IF=["William","Karl","Emil","Oscar","Malthe","Noah","Valdemar","Aksel","August","Oliver","Lucas","Alfred","Theo","Elias","Arthur","Otto","Elliot","Felix","Victor","Magnus","Hugo","Viggo","Matheo","Louie","Liam","Lauge","Anton","Theodor","Anker","Konrad","Peter","Michael","Lars","Jens","Thomas","Henrik","Søren","Christian","Martin","Jan","Morten","Jesper","Anders","Niels","Mads","Rasmus","Per","Mikkel","Kim","Hans","Ole","Jørgen","Erik","Frederik","John","Jonas","Mathias","Claus","Daniel","Asger","Albert","Arne","Børge","Carl","Cornelius","Ebbe","Edvard","Egon","Ejvind","Elmer","Eskild","Finn","Frode","Georg","Gerhard","Gorm","Gregers","Gunnar","Harald","Henning","Ib","Ivar","Jakob","Jeppe","Joakim","Johan","Johannes","Julius","Kaj","Kasper","Kenneth","Kevin","Kristian","Kurt","Kåre","Lasse","Leif","Marius","Nicklas"],wF=["Emma","Ella","Luna","Alma","Frida","Olivia","Agnes","Clara","Sofia","Karla","Ida","Asta","Josefine","Anna","Ellie","Victoria","Laura","Freja","Maja","Isabella","Mathilde","Lærke","Sara","Caroline","Alberte","Nikoline","Emilie","Katrine","Julie","Merle","Signe","Nanna","Rosa","Esther","Simone","Edith","Augusta","Dagmar","Ingrid","Astrid","Gerda","Bodil","Gudrun","Gunhild","Thora","Thyra","Helga","Olga","Oda","Margrethe","Anne","Mette","Kirsten","Hanne","Marianne","Lene","Susanne","Pia","Gitte","Bente","Dorte","Lone","Tina","Camilla","Louise","Cecilie","Sofie","Line","Trine","Sanne","Rikke","Malene","Pernille","Henriette","Charlotte","Amalie","Mille","Silje","Tilde","Liv","Ea","Vega","Vilje","Elva","Thea","Caya","Lotus","Carla","Agnete","Alice","Alvilda","Annie","Ane","Almine","Doris","Dorthea"],CF=["Nielsen","Jensen","Hansen","Pedersen","Andersen","Christensen","Larsen","Sørensen","Rasmussen","Jørgensen","Petersen","Madsen","Kristensen","Olsen","Thomsen","Christiansen","Poulsen","Johansen","Møller","Schmidt","Holm","Knudsen","Mortensen","Jacobsen","Jakobsen","Henriksen","Lauridsen","Bendtsen","Jepsen","Bach","Krogh","Bech","Bøgh","Friis","Nygaard","Winther","Bachmann","Vinther","Kragh","Storm","Berg","Buhl","Kjeldsen","Hedegaard","Kjær","Damgaard","Dam","Brandt","Vestergaard","Lund","Schou","Overgaard","Søndergaard","Ravn","Steensen","Brodersen","Holst","Skov","Iversen","Krog","Aagaard","Frost","Lauesen","Gade","Grøn","Fog","Hjorth","Bloch","Hvid","Busk","Buhmann","Klitgaard","Kofod","Borup","Bramsen","Bredesen","Breum","Brock","Brøndum","Bundgaard","Bødker","Bøttcher","Carlsen","Clausen","Dahl","Dalgaard","Dalsgaard","Daugaard","Davidsen","Degn","Dietz","Dirksen","Dreyer","Due","Duelund","Duus","Ebbesen","Edelberg"],SF=class extends Cr{getFirstNamesMaleJson(){return IF}getFirstNamesFemaleJson(){return wF}getLastNamesJson(){return CF}},NF=["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"],xF=["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"],TF=["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"],kF=["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"],LF=["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"],DF=["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"],RF=["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"],BF=["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"],UF=["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"],MF=["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"],_F=["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"],FF=["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"],OF=["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"],jF=["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"],PF=["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"],HF=["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"],zF=["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"],VF=class extends Cr{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return NF}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:xF},{startYear:1960,endYear:1969,names:TF},{startYear:1970,endYear:1979,names:kF},{startYear:1980,endYear:1989,names:LF},{startYear:1990,endYear:1999,names:DF},{startYear:2e3,endYear:2009,names:RF},{startYear:2010,endYear:2019,names:BF},{startYear:2020,endYear:2029,names:UF}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:MF},{startYear:1960,endYear:1969,names:_F},{startYear:1970,endYear:1979,names:FF},{startYear:1980,endYear:1989,names:OF},{startYear:1990,endYear:1999,names:jF},{startYear:2e3,endYear:2009,names:PF},{startYear:2010,endYear:2019,names:HF},{startYear:2020,endYear:2029,names:zF}]}},QF=["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"],KF=["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"],GF=["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"],iv=class extends Cr{getFirstNamesMaleJson(){return QF}getFirstNamesFemaleJson(){return KF}getLastNamesJson(){return GF}},qF=["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"],WF=["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"],YF=["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"],JF=class extends Cr{getFirstNamesMaleJson(){return qF}getFirstNamesFemaleJson(){return WF}getLastNamesJson(){return YF}},XF=["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"],$F=["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"],ZF=["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"],eO=class extends Cr{getFirstNamesMaleJson(){return XF}getFirstNamesFemaleJson(){return $F}getLastNamesJson(){return ZF}},tO=["Gabriel","Raphaël","Léo","Louis","Noah","Arthur","Adam","Jules","Maël","Eden","Léon","Liam","Isaac","Sacha","Marceau","Elio","Noé","Lucas","Gabin","Mohamed","Aaron","Imrân","Ayden","Malo","Paul","Ethan","Hugo","Naël","Ibrahim","Marius","Eliott","Nathan","Victor","Théo","Martin","Tom","Ezio","Gaspard","Mathis","Ismaël","Côme","Léandre","Amir","Augustin","Lyam","Aylan","Nino","Antoine","Milo","Robin"],aO=["Louise","Jade","Ambre","Alba","Emma","Alma","Romy","Rose","Alice","Anna","Mia","Lou","Inaya","Adèle","Lina","Eva","Julia","Iris","Agathe","Elena","Giulia","Léna","Noûr","Jeanne","Olivia","Luna","Victoire","Juliette","Léonie","Zoé","Chloé","Nina","Sofia","Léa","Alya","Charlotte","Romane","Victoria","Inès","Esmée","Ava","Lucie","Lola","Lya","Albane","Emy","Mila","Margot","Lyna","Gabrielle"],nO=["Martin","Bernard","Thomas","Petit","Robert","Richard","Durand","Dubois","Moreau","Laurent","Simon","Michel","Lefebvre","Leroy","Roux","David","Bertrand","Morel","Fournier","Girard","Bonnet","Dupont","Lambert","Fontaine","Rousseau","Vincent","Muller","Lefevre","Faure","Andre","Mercier","Blanc","Guerin","Boyer","Garnier","Chevalier","Francois","Legrand","Gauthier","Garcia","Perrin","Robin","Clement","Morin","Nicolas","Henry","Roussel","Mathieu","Gautier","Masson","Marchand","Duval","Denis","Dumont","Marie","Lemaire","Noel","Meyer","Dufour","Meunier","Brun","Blanchard","Giraud","Joly","Riviere","Lucas","Brunet","Gaillard","Barbier","Arnaud","Martinez","Gerard","Roche","Renard","Schmitt","Roy","Leroux","Colin","Vidal","Caron","Picard","Roger","Fabre","Aubert","Lemoine","Renaud","Dumas","Lacroix","Olivier","Philippe","Bourgeois","Pierre","Benoit","Rey","Leclerc","Payet","Rolland","Leclercq","Guillaume","Lecomte"],rO=class extends Cr{getFirstNamesMaleJson(){return tO}getFirstNamesFemaleJson(){return aO}getLastNamesJson(){return nO}},iO=["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"],sO=["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"],oO=["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"],lO=["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"],cO=["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"],dO=["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"],uO=["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"],mO=["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"],gO=["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"],fO=["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"],hO=["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"],pO=["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"],AO=["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"],yO=["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"],EO=["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"],bO=class extends Cr{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return iO}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:sO},{startYear:1960,endYear:1969,names:oO},{startYear:1970,endYear:1979,names:lO},{startYear:1980,endYear:1989,names:cO},{startYear:1990,endYear:1999,names:dO},{startYear:2e3,endYear:2009,names:uO},{startYear:2010,endYear:2019,names:mO}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:gO},{startYear:1960,endYear:1969,names:fO},{startYear:1970,endYear:1979,names:hO},{startYear:1980,endYear:1989,names:pO},{startYear:1990,endYear:1999,names:AO},{startYear:2e3,endYear:2009,names:yO},{startYear:2010,endYear:2019,names:EO}]}},vO=["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"],IO=["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"],wO=["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"],CO=class extends Cr{getFirstNamesMaleJson(){return vO}getFirstNamesFemaleJson(){return IO}getLastNamesJson(){return wO}},SO=["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"],NO=["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"],xO=["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"],TO=["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"],kO=["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"],LO=["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"],DO=["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"],RO=["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"],BO=["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"],UO=["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"],MO=["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"],_O=["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"],FO=["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"],OO=["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"],jO=["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"],PO=class extends Cr{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return SO}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:NO},{startYear:1960,endYear:1969,names:xO},{startYear:1970,endYear:1979,names:TO},{startYear:1980,endYear:1989,names:kO},{startYear:1990,endYear:1999,names:LO},{startYear:2e3,endYear:2009,names:DO},{startYear:2010,endYear:2019,names:RO}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:BO},{startYear:1960,endYear:1969,names:UO},{startYear:1970,endYear:1979,names:MO},{startYear:1980,endYear:1989,names:_O},{startYear:1990,endYear:1999,names:FO},{startYear:2e3,endYear:2009,names:OO},{startYear:2010,endYear:2019,names:jO}]}},HO=["Adam","Adrian","Albin","Alex","Alexander","Alf","Alfred","Ali","Allan","Alvin","Anders","André","Andreas","Anton","Arne","Aron","Arthur","Arvid","August","Axel","Bengt","Benjamin","Bernt","Bertil","Billy","Birger","Bjarne","Björn","Bo","Börje","Carl","Casper","Christer","Christian","Christoffer","Claes","Conny","Curt","Dan","Daniel","David","Dennis","Dick","Douglas","Eddie","Edvin","Einar","Elias","Elliot","Elton","Emil","Eric","Erik","Erland","Evert","Felix","Filip","Folke","Frank","Fredrik","Gabriel","Gert","Glenn","Gunnar","Gustaf","Gustav","Göran","Gösta","Hampus","Hans","Harald","Harry","Hasse","Helge","Henrik","Herbert","Hjalmar","Holger","Hugo","Håkan","Ingemar","Ingvar","Isak","Ivan","Ivar","Jack","Jacob","Jakob","Jan","Jan-Erik","Jan-Olof","Jens","Jerry","Jesper","Jimmy","Joachim","Joakim","Joel","Johan","Johannes","John","Johnny","Jon","Jonas","Jonathan","Josef","Julian","Jörgen","Kaj","Kalle","Karl","Karl-Erik","Karl-Johan","Kenneth","Kent","Kevin","Kjell","Knut","Krister","Kristian","Kristoffer","Kurt","Lars","Lars-Erik","Lars-Göran","Lars-Olof","Leif","Lennart","Leo","Leon","Liam","Linus","Love","Lucas","Ludvig","Lukas","Magnus","Malte","Manfred","Marcus","Markus","Martin","Mathias","Mats","Matteo","Mattias","Max","Melker","Melvin","Mikael","Milo","Milton","Morgan","Måns","Mårten","Nicklas","Niclas","Niklas","Nils","Noah","Noel","Ola","Oliver","Olle","Olof","Olov","Oscar","Oskar","Ove","Patrik","Paul","Peder","Per","Per-Anders","Per-Arne","Per-Erik","Per-Olof","Peter","Petter","Philip","Pierre","Pontus","Pär","Ralf","Rasmus","Reine","Rickard","Rikard","Robert","Robin","Roger","Roland","Rolf","Ronny","Roy","Ruben","Rune","Samuel","Sebastian","Sigge","Simon","Sixten","Sonny","Staffan","Stefan","Sten","Stig","Sture","Sune","Svante","Sven","Sven-Erik","Sören","Tage","Ted","Teodor","Theo","Theodor","Thomas","Tim","Timmie","Tobias","Tomas","Tommy","Tony","Torbjörn","Tord","Tore","Torsten","Ulf","Uno","Urban","Valter","Verner","Victor","Vidar","Viggo","Viktor","Vilhelm","Vilgot","Vincent","Walter","William","Willy","Åke","Örjan"],zO=["Agnes","Agneta","Alexandra","Alice","Alicia","Alma","Alva","Amanda","Andrea","Anette","Angela","Angelica","Anita","Ann","Ann-Charlott","Ann-Christin","Ann-Kristin","Ann-Louise","Ann-Marie","Ann-Sofie","Anna","Anna-Carin","Anna-Karin","Anna-Lena","Anna-Maria","Anne","Anneli","Annelie","Annika","Astrid","Barbro","Beatrice","Berit","Bettan","Birgit","Birgitta","Bodil","Britt","Britt-Inger","Britt-Marie","Britta","Camilla","Carina","Carita","Carola","Caroline","Catarina","Catrin","Cecilia","Charlotta","Charlotte","Christina","Cornelia","Daniela","Desirée","Doris","Ebba","Edit","Eivor","Elena","Elin","Elina","Elisabet","Elisabeth","Ella","Ellen","Ellinor","Elsa","Elvira","Emelie","Emilia","Emma","Erika","Eva","Eva-Lena","Eva-Marie","Ewa","Fanny","Felicia","Filippa","Freja","Frida","Gabriella","Gerd","Gertrud","Gull-Britt","Gun","Gun-Britt","Gunborg","Gunhild","Gunilla","Gunnel","Hanna","Harriet","Helen","Helena","Helene","Hilma","Ida","Ines","Inga","Inga-Lill","Ingeborg","Ingegärd","Inger","Ingrid","Irene","Iris","Isabell","Isabella","Isabelle","Jeanette","Jennie","Jennifer","Jenny","Jessica","Jill","Joanna","Johanna","Jonna","Josefin","Josephine","Judith","Julia","Kajsa","Karin","Karolina","Katarina","Kerstin","Klara","Kristin","Kristina","Laila","Lena","Lilian","Lilly","Lina","Linda","Linn","Linnea","Linnéa","Lisa","Liselotte","Lisbeth","Liv","Lotta","Louise","Lovisa","Madeleine","Magdalena","Maj","Maj-Britt","Maja","Malin","Margareta","Margit","Margot","Maria","Marianne","Marie","Marie-Louise","Marina","Marita","Marlene","Martina","Matilda","Maud","Melissa","Mikaela","Mimmi","Moa","Molly","Mona","Monica","Märta","Nathalie","Nellie","Nicole","Nicki","Nikki","Nina","Nora","Nova","Olivia","Patricia","Paula","Paulina","Pernilla","Petra","Pia","Rakel","Rebecca","Rebecka","Regina","Renée","Rigmor","Ronja","Rose-Marie","Rosita","Rut","Sabina","Saga","Sandra","Sanna","Sara","Selma","Signe","Sigrid","Siri","Siv","Siw","Sofia","Sofie","Solveig","Sonja","Stella","Stina","Susanne","Svea","Sylvia","Tanja","Terese","Teresia","Therese","Tilde","Tindra","Tina","Tove","Tyra","Ulla","Ulla-Britt","Ulrika","Vanja","Vera","Veronica","Victoria","Viola","Viktoria","Wilma","Yvonne","Åsa","Åse"],VO=["Abrahamsson","Adamsson","Adolfsson","Ahl","Ahlberg","Ahlgren","Ahlqvist","Ahlström","Alexandersson","Alfredsson","Alm","Almgren","Almquist","Almqvist","Andersson","Andreasson","Arvidsson","Asplund","Augustsson","Axelsson","Backman","Bengtsson","Berg","Berggren","Bergh","Berglund","Bergman","Bergqvist","Bergsten","Bergström","Björk","Björklund","Björkman","Blom","Blomberg","Blomgren","Blomqvist","Boberg","Boman","Borg","Boström","Bäckman","Bäckström","Carlsson","Claesson","Dahl","Dahlberg","Dahlgren","Dahlin","Dahlqvist","Dahlström","Danielsson","Davidsson","Edlund","Ek","Ekberg","Ekblad","Eklund","Ekman","Ekström","Eliasson","Elm","Engberg","Englund","Engman","Engström","Eriksson","Erlandsson","Fagerberg","Falk","Fors","Forsberg","Forsgren","Forslund","Forsman","Fransson","Fredriksson","Friberg","Frisk","Grahn","Granberg","Granlund","Gunnarsson","Gustafsson","Göransson","Hagberg","Haglund","Hagman","Hagström","Hall","Hallberg","Hallgren","Hammar","Hammarström","Hansson","Hedin","Hedlund","Hedman","Hellberg","Hellgren","Hellman","Hellqvist","Hellström","Henriksson","Hermansson","Hjort","Holm","Holmberg","Holmgren","Holmqvist","Holmström","Håkansson","Hägg","Hägglund","Högberg","Höglund","Ingvarsson","Isaksson","Israelson","Ivarsson","Jakobsson","Jansson","Jensen","Johannesson","Johansson","Johnsson","Jonas","Jonsson","Jönsson","Karlsson","Karlström","Kjellberg","Knutsson","Kristiansson","Kron","Kullberg","Lager","Landgren","Lantz","Larsson","Leander","Lennartsson","Lilja","Liljeblad","Liljedahl","Liljegren","Lind","Lindberg","Lindblad","Lindblom","Lindell","Lindén","Linder","Lindgren","Lindholm","Lindkvist","Lindman","Lindqvist","Lindstedt","Lindström","Lindvall","Ljung","Ljungberg","Ljunggren","Lund","Lundberg","Lundblad","Lundgren","Lundh","Lundin","Lundmark","Lundqvist","Lundstedt","Lundström","Löfgren","Magnusson","Malm","Malmberg","Malmgren","Malmqvist","Malmström","Martinsson","Mattsson","Melin","Moberg","Molin","Månsson","Mårtensson","Nilsson","Norberg","Nordin","Nordlund","Nordström","Norén","Norlin","Norman","Nyberg","Nygren","Nylander","Nyman","Nyström","Ohlsson","Olofsson","Olsson","Ottosson","Palm","Palmqvist","Paulsson","Persson","Pettersson","Pihl","Pålsson","Rickardsson","Ring","Robertsson","Rosell","Rosén","Rosenberg","Rundqvist","Rydberg","Rydén","Sahlin","Samuelsson","Sandberg","Sandell","Sandin","Sandström","Sjöberg","Sjögren","Sjöholm","Sjölander","Sjölund","Sjöstedt","Sjöström","Skog","Skoglund","Sköld","Stenberg","Stenlund","Stenström","Strand","Strandberg","Ström","Strömberg","Sundberg","Sundell","Sundgren","Sundin","Sundqvist","Sundström","Svanberg","Svedberg","Svensson","Svärd","Söderberg","Södergren","Söderholm","Söderlund","Söderqvist","Söderström","Tholin","Thor","Thulin","Thunberg","Törnblom","Törnqvist","Ullberg","Wahlberg","Wahlgren","Wahlström","Wall","Wallén","Wallgren","Wallin","Wennberg","Wennerberg","Werner","Westberg","Wester","Westerberg","Westerlund","Westin","Westlund","Westman","Wiberg","Wickman","Widén","Wiklund","Wikström","Åberg","Ågren","Åkerberg","Åkerlund","Åkerman","Åkerström","Ålund","Åsberg","Åström","Öberg","Ögren","Öhlin","Öhman","Östberg","Östlund","Östman"],QO=class extends Cr{getFirstNamesMaleJson(){return HO}getFirstNamesFemaleJson(){return zO}getLastNamesJson(){return VO}},KO=["Aabid","Aadil","Aaftab","Aahad","Aalam","Aamir","Aarif","Aariz","Aasim","Aatif","Abaan","Abbas","Abdul","Abdul Ahad","Abdul Aziz","Abdul Basit","Abdul Ghafoor","Abdul Hameed","Abdul Hannan","Abdul Jabbar","Abdul Kareem","Abdul Latif","Abdul Malik","Abdul Mannan","Abdul Qadir","Abdul Rahim","Abdul Rashid","Abdul Rauf","Abdul Rehman","Abdul Sattar","Abdul Wahab","Abdullah","Abid","Abrar","Absaar","Adil","Adnan","Afaq","Afzal","Agha","Ahad","Ahmad","Ahmar","Ahsen","Ahsan","Aijaz","Akbar","Akhtar","Akif","Alauddin","Alam","Ali","Altaf","Amaan","Ameen","Amir","Ammar","Anas","Anis","Anwar","Aqeel","Arif","Arman","Arqam","Arsalan","Asad","Ashar","Ashfaq","Ashraf","Asif","Asim","Ata","Athar","Ateeq","Atif","Aun","Aurangzeb","Awais","Ayaz","Azam","Azhar","Aziz","Babar","Babur","Badar","Badr","Badruddin","Bahadur","Bahram","Bakhtiar","Baligh","Baqir","Bari","Bashar","Bashir","Basheer","Basit","Bayazid","Bihzad","Bilal","Binyamin","Bismil","Burhan","Burhanuddin","Cemal","Chaman","Chand","Changez","Chaudhry","Chiragh","Daamir","Daanish","Dabir","Daniyal","Danyal","Dar","Dara","Danish","Daud","Dawood","Deen","Dilawar","Dildar","Dost","Faakhir","Faaris","Faazil","Fahad","Fahim","Faizan","Fakhar","Fakhruddin","Falah","Faran","Faraz","Fareed","Farhad","Faris","Farooq","Farrukh","Faryad","Fateh","Fayyaz","Feroz","Fida","Firdous","Firoz","Furqan","Jabbar","Jabir","Jafar","Jahan","Jahangir","Jahanzaib","Jahanzeb","Jalal","Jalaluddin","Jalib","Jamal","Jameel","Jamshaid","Jamshed","Javed","Jawad","Jibran","Junaid","Kabeer","Kabir","Kaleem","Kamal","Kamil","Kashif","Kazim","Khaleel","Khalid","Khalil","Khan","Khizr","Khurshid","Khurram","Kifayat","Kiran","Kisra","Kumail","Labeeb","Laeeq","Laith","Lais","Latif","Liaqat","Lutf","Lutfi","Lutfullah","Luqman","Maaz","Mahboob","Mahdi","Mahmood","Majid","Malik","Mansoor","Maqbool","Masood","Mehmood","Mehdi","Mehrab","Mian","Mir","Mirza","Mohammad","Mohib","Mohsin","Mohtashim","Moiz","Mubarak","Mubashir","Mudassir","Mufeed","Mujahid","Mukarram","Mukhtar","Mumtaz","Munawar","Munir","Murad","Mustafa","Muzaffar","Nadeem","Nadir","Naeem","Naim","Najam","Najib","Najeeb","Naseem","Nashit","Nasir","Natiq","Nawab","Naveed","Nazim","Nihal","Noor","Nouman","Obaid","Omair","Omar","Osama","Owais","Parsa","Parvez","Pervez","Pervaiz","Qadir","Qaiser","Qasim","Qazi","Qudrat","Qudratullah","Qurban","Qutbuddin","Rabbani","Rafi","Rafique","Rahim","Rahman","Rais","Rajab","Rameez","Rashid","Rauf","Rehan","Riaz","Rizwan","Rohail","Rumi","Sabit","Sadiq","Saeed","Safdar","Safi","Sahir","Salam","Salman","Sameer","Sami","Sarmad","Sarwar","Shabbir","Shafaq","Shahid","Shaheen","Shahbaz","Shahzaib","Shahnawaz","Shahryar","Shams","Sharif","Shaukat","Shehryar","Shoaib","Sibtain","Sikandar","Siraj","Sohail","Suhail","Suleman","Tabish","Tahir","Taj","Talat","Talha","Tameem","Tanveer","Tariq","Tasawwar","Taufiq","Tauqeer","Tayyab","Tufail","Turab","Ubaid","Ubaidullah","Ubayd","Ulfat","Umar","Umair","Usama","Usman","Uwais","Vali","Vasif","Waheed","Wahid","Wajahat","Wajid","Waleed","Wali","Wasif","Waqas","Yaqub","Yahya","Yameen","Yasir","Yaseen","Yousaf","Yousuf","Yunus","Zafar","Zahid","Zahir","Zain","Zakir","Zaman","Zeeshan","Zia","Zubair","Zulfiqar"],GO=["Aabida","Aafiya","Aaliya","Aamina","Aamira","Aaniya","Aarifa","Aasia","Aasiya","Abeer","Abeera","Adeelah","Adeena","Adila","Afifa","Afiya","Afsana","Aiman","Aina","Ainy","Aisha","Aiza","Ajwa","Akira","Aleena","Alia","Alina","Alishba","Almas","Amal","Amani","Ameena","Amira","Anabia","Anam","Anaya","Aneeqa","Anisa","Anum","Aqsa","Arfa","Arisha","Arooba","Arsala","Asfiya","Asma","Atika","Ayesha","Azka","Baano","Bahar","Bahira","Bakhtawar","Balqees","Bano","Bareera","Basma","Batool","Beena","Behjat","Benazir","Bibi","Bisma","Bushra","Cahira","Chahat","Chaman","Chanda","Chandni","Chand","Chinar","Dabira","Dalia","Dania","Dareen","Darina","Deeba","Dilara","Dilawar","Dilnasheen","Dina","Durdanah","Durre","Durriya","Eeman","Eesha","Efa","Ehraam","Eila","Eiliya","Eiman","Eira","Emaan","Eman","Eram","Erisha","Erum","Eshaal","Eshal","Eshita","Faariha","Fabiha","Fahima","Faiza","Fakhira","Falaq","Fareeha","Fariha","Farisa","Fariya","Farzana","Faryal","Fasiha","Fatemah","Fatima","Fawzia","Fehmida","Feroza","Fiza","Gehna","Ghazal","Ghazala","Gohar","Gul","Gulab","Gulalai","Gulbahar","Gulbano","Gulchehra","Gulchin","Gulnar","Gulnaz","Gulraiz","Gulshan","Gulsaba","Gulzar","Habeeba","Habiba","Hadia","Hafsa","Haleema","Hamda","Hameeda","Hania","Hareem","Haseena","Hasna","Haya","Hiba","Hifza","Hina","Hira","Hoor","Huda","Huma","Ibadah","Iffat","Ifra","Ijlal","Ikra","Ila","Ilma","Iman","Inaya","Iqra","Irha","Irum","Isra","Izza","Jabeen","Jahan","Jahanara","Jalila","Jamila","Jannat","Jasmin","Javeria","Jiya","Joya","Juleeha","Kaif","Kainat","Kalsoom","Kanza","Kashaf","Kashifa","Kausar","Khadija","Khalida","Khanam","Khansa","Khawla","Khizra","Kinza","Kiran","Komal","Kubra","Kulsoom","Labeeba","Ladan","Laila","Laiba","Laraib","Latifa","Lina","Liyana","Lubna","Lujaina","Luma","Luqia","Maham","Maheen","Mahira","Mahjabeen","Mahnoor","Mahveen","Malaika","Manahil","Marwa","Maryam","Mehak","Meher","Mehreen","Mehvish","Mishal","Momina","Muneeza","Munira","Naaila","Nabeela","Nadia","Naeema","Naila","Nashita","Nashmia","Natasha","Nazia","Neema","Nighat","Nihal","Nida","Nimra","Nooreen","Nosheen","Omaima","Omera","Ommarah","Omnia","Oraina","Owaiza","Parisa","Parveen","Parvin","Pervaiz","Parween","Parizay","Pehlaaj","Perveen","Pinar","Qamar","Qandeel","Qanita","Qasia","Qirat","Qudsia","Qurratulain","Quratulain","Rabia","Rafia","Rahat","Raima","Rakhshanda","Ramsha","Rania","Rashida","Reema","Rida","Rimsha","Rizwana","Rubab","Rubina","Rukhsana","Saba","Sabeena","Sabreen","Sadia","Safiya","Sahar","Sajida","Sakina","Saliha","Samaira","Sameena","Sanober","Saniya","Saraab","Savera","Sehar","Shabana","Shagufta","Shaheena","Shaista","Shanza","Sharmeen","Shazma","Shehla","Shehnaz","Sidra","Sobia","Sumbal","Sumaira","Sundas","Tabassum","Tahira","Tahseen","Tajwar","Tamanna","Tania","Tasneem","Tayyaba","Tazeen","Tehmina","Tehreem","Tooba","Tuba","Ulfat","Ulya","Umara","Ummara","Ummehabiba","Ummehani","Ummehuma","Ummejaveria","Urooj","Uzma","Vaneeza","Veena","Vibha","Wajiha","Waheeda","Wahida","Waniya","Warda","Wardah","Waseela","Waseema","Widad","Yamna","Yara","Yasira","Yasmeen","Yasmin","Yumna","Zahida","Zahra","Zaiba","Zainab","Zakia","Zamurrad","Zara","Zareena","Zarmeen","Zaynab","Zeba","Zehra","Zohra","Zoya","Zubia","Zulekha","Zunaira"],qO=["Abbasi","Abbas","Abidi","Afridi","Agha","Ahmad","Ahmed","Akbar","Akhtar","Ali","Alvi","Amrohi","Ansari","Anwar","Arain","Ashraf","Asghar","Attari","Awan","Azam","Babar","Badayuni","Bajwa","Bakhtiar","Baloch","Bangash","Barlas","Bashir","Batool","Beg","Behzad","Bengali","Bukhari","Bundi","Butt","Chandio","Chaudhary","Chauhan","Chishti","Chughtai","Chundrigar","Dahri","Dakhani","Dalvi","Dard","Dars","Daud","Dehlavi","Dhariwal","Durrani","Edhi","Ehsan","Ejaz","Elahi","Ebrahim","Farooqi","Faruqi","Fateh","Faizi","Fakhri","Firdausi","Gardezi","Gilani","Ghaznavi","Ghauri","Gondal","Habib","Haider","Hakeem","Hamdani","Hashmi","Hassan","Hussain","Hyder","Ibrahim","Idrisi","Iftikhar","Ilahi","Imami","Isfahani","Jafri","Jahangir","Jalali","Jalal","Jamali","Jatoi","Jilani","Junaidi","Kakakhel","Kamal","Kashif","Kazmi","Khan","Khurshid","Kirmani","Kiyani","Lahori","Lakhnavi","Lari","Leghari","Lughari","Madani","Mahmood","Malik","Mansoor","Marvi","Mashhadi","Masoodi","Mir","Mirza","Mughal","Mufti","Nadvi","Naqvi","Nasir","Niazi","Nizami","Noori","Noorani","Osmani","Panhwar","Paracha","Parvez","Pirzada","Qadri","Qasmi","Qureshi","Rabbani","Rafique","Rahman","Rashid","Rizvi","Sabri","Sadiqi","Saeed","Safi","Safvi","Samarqandi","Siddiqui","Syed","Tabrizi","Tajik","Tariq","Thanvi","Tirmizi","Usmani","Yousafzai","Yunus","Zaidi","Zubairi"],WO=class extends Cr{getFirstNamesMaleJson(){return KO}getFirstNamesFemaleJson(){return GO}getLastNamesJson(){return qO}},YO=class{static normalizeBirthDate(t){if(!t||t.trim()===""||t.startsWith("0001-01-01"))return"";const e=t.trim(),n=e.match(/^(\d{4})-(\d{2})-(\d{2})/);if(n){const[,s,l,d]=n;return`${s}-${l}-${d}`}const i=new Date(e);if(!isNaN(i.getTime())){const s=i.getFullYear().toString().padStart(4,"0"),l=(i.getMonth()+1).toString().padStart(2,"0"),d=i.getDate().toString().padStart(2,"0");return`${s}-${l}-${d}`}return""}static isValidBirthDate(t){if(!t||t.trim()===""||t.startsWith("0001-01-01"))return!1;const e=new Date(t);return isNaN(e.getTime())?!1:e.getFullYear()>1&&e.getFullYear()<9999}};function JO(){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 XO(t){if(t==="random"||!t)return null;const e=t.split("-");if(e.length!==2)return null;const n=parseInt(e[0],10),i=parseInt(e[1],10);if(isNaN(n)||isNaN(i))return null;const s=new Date().getFullYear(),l=Math.floor((n+i)/2),d=s-l,m=Math.floor((i-n)/2);return{targetYear:d,yearDeviation:m}}function $O(){return[{value:"da",label:"Dansk",flag:"🇩🇰",alternativeCodes:["da-DK"]},{value:"de",label:"Deutsch",flag:"🇩🇪",alternativeCodes:["de-DE","de-AT","de-CH","de-LU","de-LI"]},{value:"en",label:"English",flag:"🇬🇧",alternativeCodes:["en-US","en-GB","en-CA","en-AU","en-NZ","en-IE","en-ZA","en-SG","en-IN"]},{value:"es",label:"Español",flag:"🇪🇸",alternativeCodes:["es-ES","es-MX","es-AR","es-CO","es-CL","es-PE","es-VE","es-EC","es-GT","es-CU","es-BO","es-DO","es-HN","es-PY","es-SV","es-NI","es-CR","es-PA","es-UY","es-PR"]},{value:"fr",label:"Français",flag:"🇫🇷",alternativeCodes:["fr-FR","fr-CA","fr-BE","fr-CH","fr-LU","fr-MC"]},{value:"it",label:"Italiano",flag:"🇮🇹",alternativeCodes:["it-IT","it-CH","it-SM","it-VA"]},{value:"nl",label:"Nederlands",flag:"🇳🇱",alternativeCodes:["nl-NL","nl-BE"]},{value:"ro",label:"Română",flag:"🇷🇴",alternativeCodes:["ro-RO","ro-MD"]},{value:"sv",label:"Svenska",flag:"🇸🇪",alternativeCodes:["sv-SE","sv-FI"]},{value:"ur",label:"اردو",flag:"🇵🇰",alternativeCodes:["ur-PK","ur-IN"]},{value:"fa",label:"فارسی",flag:"🇮🇷",alternativeCodes:["fa-IR","fa-AF"]}].sort((e,n)=>e.label.localeCompare(n.label))}var ZO=t=>{switch(t.toLowerCase()){case"da":return new SF;case"de":return new VF;case"en":return new iv;case"es":return new JF;case"fa":return new eO;case"fr":return new rO;case"it":return new bO;case"nl":return new CO;case"ro":return new PO;case"sv":return new QO;case"ur":return new WO;default:return console.warn(`Language '${t}' is not supported. Falling back to English.`),new iv}};const ej=()=>{const t=ea(),[e,n]=b.useState({username:null,password:null,email:null}),i=b.useCallback(async()=>{if(!(t!=null&&t.sqliteClient))throw new Error("Database not initialized");const d=t.sqliteClient.settings.getEffectiveIdentityLanguage(),m=ZO(d),f=t.sqliteClient.settings.getPasswordSettings(),g=Fp(f);return{identityGenerator:m,passwordGenerator:g}},[t==null?void 0:t.sqliteClient]),s=b.useCallback(async()=>{if(!(t!=null&&t.sqliteClient))return null;try{const{identityGenerator:d,passwordGenerator:m}=await i(),f=t.sqliteClient.settings.getDefaultIdentityGender(),g=t.sqliteClient.settings.getDefaultIdentityAgeRange(),A=XO(g),p=d.generateRandomIdentity(f,A),v=m.generateRandomPassword(),I=t.sqliteClient.settings.getDefaultEmailDomain(),x=I?`${p.emailPrefix}@${I}`:p.emailPrefix,N={email:x,firstName:p.firstName,lastName:p.lastName,gender:p.gender,birthdate:YO.normalizeBirthDate(p.birthDate.toISOString()),username:p.nickName,password:v};return n({username:p.nickName,password:v,email:x}),N}catch(d){return console.error("Error generating random alias:",d),null}},[t==null?void 0:t.sqliteClient,i]),l=b.useCallback(()=>new Qp().generateRandomEmailPrefix(),[]);return{generateAlias:s,generateRandomEmailPrefix:l,lastGeneratedValues:e,setLastGeneratedValues:n}},tj=({formId:t,isLoading:e,formData:n,onRestore:i,skipRestore:s=!1})=>{const l=b.useRef(!1),d=b.useCallback(async()=>{if(e)return;await wt("PERSIST_FORM_VALUES",JSON.stringify({formId:t,data:n}),"background")},[t,n,e]),m=b.useCallback(async()=>{if(s||l.current)return!1;const g=await wt("GET_PERSISTED_FORM_VALUES",null,"background");try{if(!g)return!1;let A=null;try{A=JSON.parse(g)}catch(v){return console.error("Error parsing persisted form data:",v),!1}return A.formId===t?(l.current=!0,i(A.data),!0):!1}catch(A){return console.error("Error loading persisted form data:",A),!1}},[t,i,s]),f=b.useCallback(async()=>{await wt("CLEAR_PERSISTED_FORM_VALUES",null,"background")},[]);return b.useEffect(()=>{e||d()},[e,d]),b.useEffect(()=>()=>{f()},[f]),{loadPersistedValues:m,clearPersistedValues:f,persistFormValues:d}},Wn={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"],totp:["totp","otp","one-time","onetime","token","authenticator","2fa","twofa","two-factor","mfa","security-code","auth-code","passcode","pin-code","pincode"]},ph={male:["male","man","m","gender1","mr","mr."],female:["female","woman","f","gender2","mrs","mrs.","ms","ms."],other:["other","diverse","custom","prefer not","unknown","gender3"]},aj=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"]),Yn={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"],totp:["verificatiecode","eenmalig","authenticatie","tweefactor","beveiligingscode"]},Ah={male:["man","mannelijk","heer"],female:["vrouw","vrouwelijk","mevrouw"],other:["anders","iets","overig","onbekend"]},nj=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"]),fa={username:[...new Set([...Wn.username,...Yn.username])],fullName:[...new Set([...Wn.fullName,...Yn.fullName])],firstName:[...new Set([...Wn.firstName,...Yn.firstName])],lastName:[...new Set([...Wn.lastName,...Yn.lastName])],email:[...new Set([...Yn.email,...Wn.email])],emailConfirm:[...new Set([...Wn.emailConfirm,...Yn.emailConfirm])],password:[...new Set([...Wn.password,...Yn.password])],birthdate:[...new Set([...Wn.birthdate,...Yn.birthdate])],gender:[...new Set([...Wn.gender,...Yn.gender])],birthDateDay:[...new Set([...Wn.birthDateDay,...Yn.birthDateDay])],birthDateMonth:[...new Set([...Wn.birthDateMonth,...Yn.birthDateMonth])],birthDateYear:[...new Set([...Wn.birthDateYear,...Yn.birthDateYear])],totp:[...new Set([...Wn.totp,...Yn.totp])]},Yl={male:[...new Set([...ph.male,...Ah.male])],female:[...new Set([...ph.female,...Ah.female])],other:[...new Set([...ph.other,...Ah.other])]},sv=new Set([...aj,...nj]);var Ts=(t=>(t.Username="username",t.Password="password",t.Email="email",t.Totp="totp",t))(Ts||{});class ov{constructor(e,n){qe(this,"document");qe(this,"clickedElement");qe(this,"visibilityCache");var i;if(this.document=e,this.visibilityCache=new Map,n){let s=n.parentElement,l=!0;for(;s&&s!==this.document.body;){if(!this.isElementVisible(s,!0)){l=!1;break}s=s.parentElement}const d=(i=e.defaultView)==null?void 0:i.getComputedStyle(n),m=(d==null?void 0:d.display)==="none"||(d==null?void 0:d.visibility)==="hidden";l&&!m?this.clickedElement=n:this.clickedElement=null}else this.clickedElement=null}containsLoginForm(){let e=this.getFormWrapper();if((e==null?void 0:e.getAttribute("role"))==="dialog"&&(e=e.querySelector("form")??e),e||(e=this.document.body),e.querySelectorAll("input").length>200)return!1;const i=this.containsPasswordField(e),s=this.containsLikelyUsernameOrEmailField(e),l=this.containsTotpField(e);return!!(i||s||l)}getForm(){if(!this.clickedElement)return null;const e=this.getFormWrapper();return this.detectFormFields(e)}static getSuggestedServiceName(e,n){const i=e.title,s=4,l=50,d=x=>{const N=x.length>=3&&x.length<=l,T=x.split(/[\s|\-—/\\]+/).length<=s;return N&&T},m=x=>{const N=x.toLowerCase().split(" ").map(B=>B.toLowerCase());let T=0;for(;T<N.length&&sv.has(N[T].toLowerCase());)T++;let L=N.length-1;for(;L>T&&sv.has(N[L].toLowerCase());)L--;return N.slice(T,L+1)},f=(x,N)=>x.split(/[\s|]+/).filter(T=>N.includes(T.toLowerCase())).join(" "),g=n.hostname.replace(/^www\./,""),p=/[|\-—/\\:]/.exec(i);if(p){const x=p.index,N=i.substring(0,x).trim(),T=i.substring(x+1).trim(),L=m(N),B=m(T),k=f(N,L),F=f(T,B),_=d(k),V=d(F);if(_&&V)return[k,F,g];if(_)return[k,g];if(V)return[F,g]}const v=m(i),I=f(i,v);return d(I)?[I,g]:[g]}getFormWrapper(){var n;return(n=this.clickedElement)==null?void 0:n.closest('form, [role="dialog"]')}getActualInputElement(e){if(e.tagName.toLowerCase()==="input")return e;const n=e;if(n.shadowRoot){const s=n.shadowRoot.querySelector("input, textarea");if(s)return s}const i=e.querySelector("input, textarea");return i||e}isElementVisible(e,n=!0){var s;if(!e)return!1;if(n&&this.visibilityCache.has(e))return this.visibilityCache.get(e);let i=e;for(;i;){try{const l=(s=this.document.defaultView)==null?void 0:s.getComputedStyle(i);if(!l){let d=i;for(;d;)n&&this.visibilityCache.set(d,!0),d=d.parentElement;return!0}if(l.display==="none"){let d=i;for(;d;)n&&this.visibilityCache.set(d,!1),d=d.parentElement;return!1}if(l.visibility==="hidden"){let d=i;for(;d;)n&&this.visibilityCache.set(d,!1),d=d.parentElement;return!1}if(n&&parseFloat(l.opacity)===0){let d=i;for(;d;)this.visibilityCache.set(d,!1),d=d.parentElement;return!1}}catch{let l=i;for(;l;)n&&this.visibilityCache.set(l,!0),l=l.parentElement;return!0}i=i.parentElement}return n&&this.visibilityCache.set(e,!0),!0}findAllInputFields(e,n,i,s=[],l=!0){var v,I,x,N,T,L,B,k,F,_,V;const d=e?Array.from(e.querySelectorAll("input, select, [type]")):Array.from(this.document.querySelectorAll("input, select, [type]")),f=(e?Array.from(e.querySelectorAll("*")):Array.from(this.document.querySelectorAll("*"))).filter(U=>{const O=U;return O.shadowRoot?O.shadowRoot.querySelector("input, textarea")!==null:!1}),A=[...d,...f].filter((U,O,z)=>z.indexOf(U)===O),p=[];for(const U of Array.from(A)){if(s.includes(U))continue;if(l){if(!this.isElementVisible(U,!0))continue}else if(!this.isElementVisible(U,!1))continue;let z=U.tagName.toLowerCase()==="select"?"select":((v=U.type)==null?void 0:v.toLowerCase())||((I=U.getAttribute("type"))==null?void 0:I.toLowerCase())||"";const Q=U,K=Q.shadowRoot&&Q.shadowRoot.querySelector("input, textarea");if(K&&!z){const q=Q.shadowRoot.querySelector("input, textarea");q&&(z=((x=q.type)==null?void 0:x.toLowerCase())||"text")}if(!i.includes(z)&&!(K&&i.includes("text")&&!z))continue;if(i.includes("email")&&z==="email"){p.push({input:U,score:-1});continue}const te=((N=U.getAttribute("data-av-autocomplete")??U.getAttribute("autocomplete"))==null?void 0:N.toLowerCase())??"";if(te){if(n===fa.username&&te==="username"){p.push({input:U,score:-2});continue}if(n===fa.email&&te==="email"){p.push({input:U,score:-2});continue}if(n===fa.password&&(te==="current-password"||te==="new-password")){p.push({input:U,score:-2});continue}}const ee=((T=U.getAttribute("aria-describedby"))==null?void 0:T.toLowerCase())??"";if(ee&&n===fa.username&&ee.includes("username")){p.push({input:U,score:-2});continue}const X=[U.id,U.getAttribute("name"),U.getAttribute("placeholder"),te].map(q=>(q==null?void 0:q.toLowerCase())??"");if(U.id||U.getAttribute("name")){const q=this.document.querySelector(`label[for="${U.id||U.getAttribute("name")}"]`);q&&X.push(((L=q.textContent)==null?void 0:L.toLowerCase())??"")}const ue=U.getAttribute("aria-describedby");if(ue){const q=ue.split(/\s+/);for(const Y of q){const ne=this.document.getElementById(Y);ne&&X.push(((B=ne.textContent)==null?void 0:B.toLowerCase())??"")}}const W=U.getAttribute("aria-label");W&&X.push(W.toLowerCase());let ae=U;for(let q=0;q<3&&ae;q++){const Y=ae.querySelectorAll('[slot="label"], [slot="helper-text"]');for(const ne of Array.from(Y)){const Ie=((k=ne.textContent)==null?void 0:k.toLowerCase())??"";Ie&&X.push(Ie)}if(ae.shadowRoot){const ne=ae.shadowRoot.querySelectorAll('slot[name="label"], slot[name="helper-text"]');for(const Ie of Array.from(ne)){const ce=Ie.assignedNodes();for(const Ee of ce)Ee.textContent&&X.push(Ee.textContent.toLowerCase())}}ae=ae.parentElement}const be=U.parentElement;if(be)for(const q of Array.from(be.children))q!==U&&Array.from(q.classList).some(Y=>Y.toLowerCase().includes("label"))&&X.push(((F=q.textContent)==null?void 0:F.toLowerCase())??"");let se=U;for(let q=0;q<5&&se&&!(se.children.length>15);q++){const Y=se.querySelector("label");if(Y){X.push(((_=Y.textContent)==null?void 0:_.toLowerCase())??"");break}const ne=se.closest("td");if(ne){const Ie=ne.closest("tr");if(Ie){for(const ce of Array.from(Ie.querySelectorAll("td")))if(ce!==ne){X.push(((V=ce.textContent)==null?void 0:V.toLowerCase())??"");break}}break}se=se.parentElement}let P=n.length;for(let q=0;q<n.length;q++)if(X.some(Y=>Y.includes(n[q]))){P=q;break}P<n.length&&p.push({input:U,score:P})}return p.sort((U,O)=>U.score-O.score).map(U=>U.input)}findInputField(e,n,i,s=[],l=!0){const d=this.findAllInputFields(e,n,i,s,l),m=this.filterOutNestedDuplicates(d,s);if(i.includes("email")){const f=m.find(g=>(g.type||"").toLowerCase()==="email");if(f)return f}return m.length>0?m[0]:null}findEmailField(e,n=!0){const i=this.findAllInputFields(e,fa.email,["text","email"],[],n),d=this.filterOutNestedDuplicates(i).filter(A=>{const p=(A.getAttribute("name")||"").toLowerCase(),v=(A.id||"").toLowerCase(),I=`${p} ${v}`;let x="";if(A.id||p){const L=this.document.querySelector(`label[for="${A.id||p}"]`);L&&(x=(L.textContent||"").toLowerCase())}const N=fa.username.some(L=>x.includes(L)),T=fa.email.some(L=>x.includes(L));if(N&&T){const L=fa.username.some(k=>I.includes(k)),B=fa.email.some(k=>I.includes(k));if(L&&!B)return!1}return!0})[0]??null,m=d?this.findAllInputFields(e,fa.emailConfirm,["text","email"],[d],n):[],g=this.filterOutNestedDuplicates(m)[0]??null;return{primary:d,confirm:g}}findBirthdateFields(e,n=[]){const i=this.findInputField(e,fa.birthdate,["date","text"],n);let s="yyyy-mm-dd";if(e&&i){const f=i.closest("div");if(f){const A=[...Array.from(f.getElementsByTagName("label")),...Array.from(f.getElementsByTagName("span")),f].map(p=>{var v;return((v=p.textContent)==null?void 0:v.toLowerCase())??""}).join(" ").replace(/[\s\u00A0]/g,"").toLowerCase();if(/dd[-/]mm[-/]jj/i.test(A)||/dd[-/]mm[-/]yyyy/i.test(A)?s=A.includes("/")?"dd/mm/yyyy":"dd-mm-yyyy":/mm[-/]dd[-/]yyyy/i.test(A)?s=A.includes("/")?"mm/dd/yyyy":"mm-dd-yyyy":/yyyy[-/]mm[-/]dd/i.test(A)&&(s=A.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 l=this.findInputField(e,fa.birthDateDay,["text","number","select"],n),d=this.findInputField(e,fa.birthDateMonth,["text","number","select"],n),m=this.findInputField(e,fa.birthDateYear,["text","number","select"],n);return{single:null,format:"yyyy-mm-dd",day:l,month:d,year:m}}findGenderField(e,n=[]){const i=this.findInputField(e,fa.gender,["select"],n);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,v;const A=[g.value,g.id,g.name,((v=(p=g.labels)==null?void 0:p[0])==null?void 0:v.textContent)??""].map(I=>(I==null?void 0:I.toLowerCase())??"");return f&&(Yl.male.some(I=>A.some(x=>x.includes(I)))||Yl.female.some(I=>A.some(x=>x.includes(I))))?!1:m.some(I=>A.some(x=>x.includes(I)))})??null;return{type:"radio",field:null,radioButtons:{male:d(Yl.male),female:d(Yl.female),other:d(Yl.other)}}}return{type:"text",field:this.findInputField(e,fa.gender,["text"],n)}}filterOutNestedDuplicates(e,n=[]){if(e.length===0)return e;const i=[];for(const s of e){let l=!0;for(const d of n){if(s===d){l=!1;break}if(d.contains(s)){l=!1;break}if(s.contains(d)){l=!1;break}const m=s,f=d;if(f.shadowRoot&&f.shadowRoot.contains(s)){l=!1;break}if(m.shadowRoot&&m.shadowRoot.contains(d)){l=!1;break}const g=this.getActualInputElement(s),A=this.getActualInputElement(d);if(g===A){l=!1;break}}if(l){for(const d of e)if(s!==d){if(s.contains(d)){l=!1;break}const m=s;if(m.shadowRoot&&m.shadowRoot.contains(d)){l=!1;break}}if(l){const d=this.getActualInputElement(s);if(d!==s&&e.includes(d))continue;i.push(s)}}}return i}findPasswordField(e,n=!0){const i=this.findAllInputFields(e,fa.password,["password"],[],n),s=this.filterOutNestedDuplicates(i);return{primary:s[0]??null,confirm:s[1]??null}}containsPasswordField(e){const n=this.findPasswordField(e);return!!(n.primary&&this.isElementVisible(n.primary))}containsTotpField(e){const n=this.findTotpField(e);return n!==null&&this.isElementVisible(n)}findTotpField(e){var l,d;const n=this.findAllInputFields(e,fa.totp,["text","number"]),i=this.filterOutNestedDuplicates(n);if(i.length>0)return i[0];const s=e?Array.from(e.querySelectorAll("input")):Array.from(this.document.querySelectorAll("input"));for(const m of s){if(!this.isElementVisible(m))continue;if((((l=m.getAttribute("autocomplete"))==null?void 0:l.toLowerCase())??"")==="one-time-code")return m;const g=m.maxLength,A=m.getAttribute("inputmode");if(g===6&&A==="numeric"||((d=m.type)==null?void 0:d.toLowerCase())==="tel"&&g===6)return m;const v=m.getAttribute("pattern");if(v&&/^\[0-9\]/.test(v)&&g===6)return m}return null}containsLikelyUsernameOrEmailField(e){const n=this.clickedElement!==null;return!!(this.findEmailField(e,!n).primary||this.findInputField(e,fa.username,["text"],[],!n)||this.findInputField(e,fa.firstName,["text"],[],!n)||this.findInputField(e,fa.lastName,["text"],[],!n))}isAutofillTriggerableField(){return this.getDetectedFieldType()!==null}getDetectedFieldType(){if(!this.clickedElement)return null;const e=this.clickedElement.getAttribute("data-av-field-type");if(e&&Object.values(Ts).includes(e))return e;const n=this.getActualInputElement(this.clickedElement);if(n!==this.clickedElement){const A=n.getAttribute("data-av-field-type");if(A&&Object.values(Ts).includes(A))return A}const i=this.getFormWrapper(),s=[this.clickedElement,n].filter((A,p,v)=>A&&v.indexOf(A)===p),l=!1;if(this.findAllInputFields(i,fa.username,["text"],[],l).some(A=>s.includes(A)))return Ts.Username;const m=this.findPasswordField(i);if(m.primary&&s.includes(m.primary)||m.confirm&&s.includes(m.confirm))return Ts.Password;if(this.findAllInputFields(i,fa.email,["text","email"],[],l).some(A=>s.includes(A)))return Ts.Email;const g=this.findTotpField(i);return g&&s.includes(g)?Ts.Totp:null}detectFormFields(e){const n=[],i=this.clickedElement===null,s=this.findEmailField(e,i);s.primary&&n.push(s.primary),s.confirm&&n.push(s.confirm);const l=this.findPasswordField(e,i);l.primary&&n.push(l.primary),l.confirm&&n.push(l.confirm);const d=this.findInputField(e,fa.username,["text"],n,i);d&&n.push(d);const m=this.findInputField(e,fa.fullName,["text"],n,i);m&&n.push(m);const f=this.findInputField(e,fa.lastName,["text"],n,i);f&&n.push(f);const A=d&&l.primary&&!s.primary&&!s.confirm&&!l.confirm?null:this.findInputField(e,fa.firstName,["text"],n,i);A&&n.push(A);const p=this.findBirthdateFields(e,n);p.single&&n.push(p.single),p.day&&n.push(p.day),p.month&&n.push(p.month),p.year&&n.push(p.year);const v=this.findGenderField(e,n);v.field&&n.push(v.field);const I=this.findTotpField(e);return I&&n.push(I),{form:e,emailField:s.primary,emailConfirmField:s.confirm,usernameField:d,passwordField:l.primary,passwordConfirmField:l.confirm,fullNameField:m,firstNameField:A,lastNameField:f,birthdateField:p,genderField:v,totpField:I}}}class lv{static getServiceInfo(e,n){const i=ov.getSuggestedServiceName(e,n),s=n.href;let l="";try{const d=new URL(s);(d.protocol==="http:"||d.protocol==="https:")&&(l=d.origin+d.pathname,l.endsWith("/")&&(l=l.slice(0,-1)))}catch(d){console.error("Error parsing current URL:",d)}return{suggestedNames:i,currentUrl:s,serviceUrl:l,domain:n.hostname.replace(/^www\./,"")}}static getServiceInfoFromTab(e,n){try{const i=new URL(e),s={href:e,hostname:i.hostname,protocol:i.protocol,pathname:i.pathname,origin:i.origin},l={title:n||i.hostname},d=ov.getSuggestedServiceName(l,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,n){const i=this.getServiceInfo(e,n);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,n){const i=this.getServiceInfoFromTab(e,n);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 rj=()=>{const[t]=Qu();return{detectService:b.useCallback(async n=>{let i=n||"",s="";try{const l=t.get("serviceName"),d=t.get("serviceUrl"),m=t.get("currentUrl");if(l||d||m){if(l&&(i=decodeURIComponent(l)),d&&(s=decodeURIComponent(d)),m&&(!l||!d)){const f=decodeURIComponent(m),g=lv.getServiceInfoFromTab(f);!l&&g.suggestedNames.length>0&&(i=g.suggestedNames[0]),!d&&g.serviceUrl&&(s=g.serviceUrl)}}else{const[f]=await Mo.tabs.query({active:!0,currentWindow:!0});if(f!=null&&f.url){const g=lv.getServiceInfoFromTab(f.url,f.title);g.suggestedNames.length>0&&!i&&(i=g.suggestedNames[0]),g.serviceUrl&&(s=g.serviceUrl)}}}catch(l){console.error("Error detecting service information:",l)}return{serviceName:i,serviceUrl:s}},[t])}},ij=5e3;class ts{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 n=e.trim();if(n&&!(!n.startsWith("http://")&&!n.startsWith("https://")&&!n.startsWith("www.")))return n.startsWith("www.")?`https://${n}`:n}static extractFirstValidUrl(e){if(!e)return;const i=(Array.isArray(e)?e:[e]).find(s=>{const l=s==null?void 0:s.trim();return l&&(l.startsWith("http://")||l.startsWith("https://")||l.startsWith("www."))});return ts.normalizeUrl(i)}static hasLogoForUrl(e,n){if(!e)return!1;const i=ts.extractSourceFromUrl(e);return i==="unknown"?!1:n.logos.hasLogoForSource(i)}static async fetchFavicon(e,n,i,s=ij){const l=ts.normalizeUrl(e);if(!l)return{success:!1,error:"Invalid URL"};const d=ts.extractSourceFromUrl(l);if(d==="unknown")return{success:!1,error:"Could not extract domain from URL"};if(n.logos.hasLogoForSource(d))return{success:!1,skipped:!0};try{const m=new Promise((A,p)=>setTimeout(()=>p(new Error("Favicon extraction timed out")),s)),f=i.get(`Favicon/Extract?url=${encodeURIComponent(l)}`),g=await Promise.race([f,m]);return g!=null&&g.image?{success:!0,imageData:Uint8Array.from(No.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,n,i,s){const l=ts.extractFirstValidUrl(n);if(!l)return{...e,Logo:void 0};const d=await ts.fetchFavicon(l,i,s);return d.success&&d.imageData?{...e,Logo:d.imageData}:e}}const sj=[va.Login,va.Alias,va.CreditCard,va.Note],oj=va.Login,cv=()=>{const{t}=nt(),{id:e}=Hu(),[n]=Qu(),i=Ha(),s=ea(),l=e!==void 0&&e.length>0,d=n.get("type"),m=n.get("name"),f=n.get("folderId"),{executeVaultMutationAsync:g}=Fs(),{setHeaderButtons:A}=wr(),{setIsInitialLoading:p}=wa(),{generateAlias:v,generateRandomEmailPrefix:I,lastGeneratedValues:x}=ej(),{detectService:N}=rj(),T=Vr(),[L,B]=b.useState(!0),[k,F]=b.useState(!1),[_,V]=b.useState(!1),[U,O]=b.useState(null),[z,Q]=b.useState({}),[K,te]=b.useState([]),[ee,X]=b.useState([]),[ue,W]=b.useState(!1),[ae,be]=b.useState(!1),[se,P]=b.useState(!1),q=b.useRef(!1),Y=b.useRef(null),[ne,Ie]=b.useState(!1),[ce,Ee]=b.useState(new Set),[Ne,we]=b.useState(new Set),[Oe,ze]=b.useState([]),[Et,ht]=b.useState([]),[it,Ge]=b.useState({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),[Ft,Se]=b.useState([]),[Fe,he]=b.useState([]),[De,Ve]=b.useState([]),[He,tt]=b.useState(!0),[It,Ot]=b.useState(void 0),[Tt]=b.useState(!1),Yt=b.useCallback(oe=>{oe.item&&O(oe.item),oe.fieldValues&&Q(oe.fieldValues),oe.customFields&&te(oe.customFields),oe.totpEditorState&&Ge(oe.totpEditorState),oe.show2FA!==void 0&&be(oe.show2FA),oe.showAttachments!==void 0&&P(oe.showAttachments),oe.manuallyAddedFields&&Ee(new Set(oe.manuallyAddedFields)),oe.isLoginEmailInEmailMode!==void 0&&tt(oe.isLoginEmailInEmailMode),oe.passwordSettings!==void 0&&Ot(oe.passwordSettings)},[]),{loadPersistedValues:M,clearPersistedValues:C}=tj({formId:e||null,isLoading:L,formData:{item:U,fieldValues:z,customFields:K,totpEditorState:it,show2FA:ae,showAttachments:se,manuallyAddedFields:Array.from(ce),isLoginEmailInEmailMode:He,passwordSettings:It},onRestore:Yt,skipRestore:Tt}),S=b.useMemo(()=>U?yD(U.ItemType):[],[U]),G=b.useMemo(()=>S.find(oe=>oe.FieldKey==="notes.content"),[S]),re=b.useMemo(()=>U?ED(U.ItemType):[],[U]),pe=b.useMemo(()=>{const oe=new Set;return S.forEach(Pe=>{U&&Zl(Pe,U.ItemType)&&oe.add(Pe.FieldKey)}),ce.forEach(Pe=>oe.add(Pe)),Ne.forEach(Pe=>oe.add(Pe)),Object.keys(z).forEach(Pe=>{const Qe=z[Pe];Qe&&(Array.isArray(Qe)?Qe.length>0:Qe.toString().trim()!=="")&&oe.add(Pe)}),oe},[U,S,ce,Ne,z]),Ce=b.useCallback(oe=>{if(!U)return!1;if(ce.has(oe.FieldKey)||Ne.has(oe.FieldKey))return!0;const Pe=S.find(Qe=>Qe.FieldKey===oe.FieldKey);return Pe?Zl(Pe,U.ItemType):!0},[U,S,ce,Ne]),_e=b.useMemo(()=>S.filter(oe=>oe.Category===mt.Primary),[S]),ct=b.useMemo(()=>{const oe={};return S.forEach(Pe=>{if(Pe.Category===mt.Notes||Pe.Category===mt.Metadata||Pe.Category===mt.Primary)return;const Qe=Pe.Category;oe[Qe]||(oe[Qe]=[]),oe[Qe].push(Pe)}),oe},[S]);b.useEffect(()=>{if(!(s!=null&&s.sqliteClient)||!e||!l){const oe=d&&sj.includes(d)?d:oj;(async()=>{const{serviceName:Qe,serviceUrl:$e}=await N(m),et={Id:crypto.randomUUID().toUpperCase(),Name:Qe,ItemType:oe,FolderId:f||null,Fields:[],CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString()};if(O(et),tt(oe===va.Login),$e&&Q(Ue=>({...Ue,"login.url":$e})),s!=null&&s.sqliteClient){const Ue=s.sqliteClient.folders.getAll();X(Ue)}await lt.getSkipFormRestore()?await lt.setSkipFormRestore(!1):await M(),B(!1),p(!1)})();return}try{const oe=s.sqliteClient.items.getById(e);if(oe){O(oe);const Pe=s.sqliteClient.folders.getAll();X(Pe);const Qe={},$e=[],et=new Set;oe.Fields.forEach(J=>{Qe[J.FieldKey]=J.Value,et.add(J.FieldKey),J.IsCustomField&&$e.push({tempId:J.FieldKey,label:J.Label,fieldType:J.FieldType,isHidden:J.IsHidden,displayOrder:J.DisplayOrder})}),Q(Qe),$e.sort((J,ke)=>J.displayOrder-ke.displayOrder),te($e),we(et);const Bt=s.sqliteClient.settings.getTotpCodesForItem(e);ze(Bt),ht(Bt.map(J=>J.Id)),Bt.length>0&&be(!0);const Ue=s.sqliteClient.settings.getAttachmentsForItem(e);Se(Ue),he(Ue.map(J=>J.Id)),Ue.length>0&&P(!0),B(!1),p(!1)}else console.error("Item not found"),i("/items")}catch(oe){console.error("Error loading item:",oe),B(!1),p(!1)}},[s==null?void 0:s.sqliteClient,e,l,d,m,f,i,p,N,M]);const gt=b.useCallback(async()=>{const oe=await v();oe&&(Q(Pe=>{const Qe=Pe["login.username"]||"",$e=Pe["login.password"]||"",et=Pe["login.email"]||"",Bt={...Pe,"alias.first_name":oe.firstName,"alias.last_name":oe.lastName,"alias.gender":oe.gender,"alias.birthdate":oe.birthdate};return(!et||et===x.email)&&(Bt["login.email"]=oe.email),(!Qe||Qe===x.username)&&(Bt["login.username"]=oe.username),(!$e||$e===x.password)&&(Bt["login.password"]=oe.password),Bt}),Ie(!0))},[v,x]),St=b.useCallback(()=>{if(!(s!=null&&s.sqliteClient))return;const oe=z["alias.first_name"]||"",Pe=z["alias.last_name"]||"";let Qe;if(!oe.trim()&&!Pe.trim())Qe=I();else{const Bt=z["alias.gender"]||Ow.Other,Ue=z["alias.birthdate"]||"";Qe=new Qp().generateEmailPrefix({firstName:oe,lastName:Pe,gender:Bt,birthDate:Ue?new Date(Ue):new Date,emailPrefix:"",nickName:""})}const $e=s.sqliteClient.settings.getDefaultEmailDomain(),et=$e?`${Qe}@${$e}`:Qe;Q(Bt=>({...Bt,"login.email":et}))},[s==null?void 0:s.sqliteClient,z,I]),pt=b.useCallback(()=>{if(!(s!=null&&s.sqliteClient))return;const oe=I(),Pe=s.sqliteClient.settings.getDefaultEmailDomain(),Qe=Pe?`${oe}@${Pe}`:oe;Q($e=>({...$e,"login.email":Qe}))},[s==null?void 0:s.sqliteClient,I]),gr=b.useCallback(async()=>{const oe=await v();oe&&Q(Pe=>({...Pe,"login.username":oe.username}))},[v]),ca=b.useMemo(()=>{if(!U)return!1;const oe=S.find(Pe=>Pe.FieldKey==="alias.first_name");return oe?Zl(oe,U.ItemType):!1},[U,S]),nn=b.useMemo(()=>S.some(oe=>oe.FieldKey==="login.username"||oe.FieldKey==="login.password"),[S]);b.useEffect(()=>{!l&&ca&&!L&&(s!=null&&s.sqliteClient)&&!q.current&&(q.current=!0,gt())},[l,ca,L,s==null?void 0:s.sqliteClient,gt]),b.useEffect(()=>{!l&&!L&&Y.current&&Y.current.focus()},[l,L]);const Rt=b.useCallback((oe,Pe)=>{Q(Qe=>({...Qe,[oe]:Pe}))},[]),ta=b.useCallback(async()=>{if(!(!U||k)){wo.flushSync(()=>{F(!0)}),await new Promise(oe=>setTimeout(oe,10));try{const oe=[];S.forEach($e=>{const et=z[$e.FieldKey];et&&(Array.isArray(et)?et.length>0:et.trim()!=="")&&oe.push({FieldKey:$e.FieldKey,Label:$e.FieldKey,FieldType:$e.FieldType,Value:et,IsHidden:$e.IsHidden,DisplayOrder:$e.DefaultDisplayOrder,IsCustomField:!1,EnableHistory:$e.EnableHistory})}),K.forEach($e=>{const et=z[$e.tempId]||"";oe.push({FieldKey:$e.tempId,Label:$e.label,FieldType:$e.fieldType,Value:et,IsHidden:$e.isHidden,DisplayOrder:$e.displayOrder,IsCustomField:!0,EnableHistory:!1})});let Pe={...U,Id:l?U.Id:crypto.randomUUID().toUpperCase(),Fields:oe,UpdatedAt:new Date().toISOString()};const Qe=z["login.url"];if(s!=null&&s.sqliteClient&&Qe?Pe=await ts.fetchAndAttachFavicon(Pe,Qe,s.sqliteClient,T):Qe||(Pe.Logo=void 0),!(s!=null&&s.sqliteClient))throw new Error("Database not initialized");await g(async()=>{if(l){if(await s.sqliteClient.items.update(Pe,Fe,Ft,Et,Oe),De.length>0)for(const $e of De)await s.sqliteClient.passkeys.deleteById($e)}else await s.sqliteClient.items.create(Pe,Ft,Oe)}),C(),l?i(-1):i(`/items/${Pe.Id}`,{replace:!0})}catch(oe){console.error("Error saving item:",oe),F(!1)}}},[U,k,z,S,K,s,l,g,i,Fe,Ft,Et,Oe,De,T,C]),Me=b.useCallback(async()=>{if(!(!U||!l||!(s!=null&&s.sqliteClient)))try{await g(async()=>{await s.sqliteClient.items.trash(U.Id)}),i("/items")}catch(oe){console.error("Error deleting item:",oe)}finally{V(!1)}},[U,l,s,g,i]),rn=b.useCallback((oe,Pe)=>{const $e={tempId:crypto.randomUUID(),label:oe,fieldType:Pe,isHidden:!1,displayOrder:S.length+K.length+1};te(et=>[...et,$e])},[S.length,K.length]),Nt=b.useCallback(oe=>{te(Pe=>Pe.filter(Qe=>Qe.tempId!==oe)),Q(Pe=>{const Qe={...Pe};return delete Qe[oe],Qe})},[]),kt=b.useCallback((oe,Pe)=>{te(Qe=>Qe.map($e=>$e.tempId===oe?{...$e,label:Pe}:$e))},[]),ka=b.useCallback(oe=>{te(oe)},[]),sn=b.useCallback(oe=>{if(!U)return;const Pe=U.ItemType;!l&&Pe!==oe&&(Q(Qe=>{const $e={};return Object.entries(Qe).forEach(([et,Bt])=>{const Ue=So(et);Ue?nc(Ue,oe)&&($e[et]=Bt):$e[et]=Bt}),$e}),Ee(Qe=>{const $e=new Set;return Qe.forEach(et=>{const Bt=So(et);(!Bt||nc(Bt,oe))&&$e.add(et)}),$e}),we(Qe=>{const $e=new Set;return Qe.forEach(et=>{const Bt=So(et);(!Bt||nc(Bt,oe))&&$e.add(et)}),$e})),q.current=!1,tt(oe===va.Login),O({...U,ItemType:oe,Fields:l?U.Fields:[]}),W(!1)},[U,l]),zt=b.useCallback(()=>{Q(oe=>({...oe,"notes.content":""})),Ee(oe=>{const Pe=new Set(oe);return Pe.delete("notes.content"),Pe})},[]),Lt=b.useCallback(()=>{be(!0),Ge({isAddFormVisible:!0,formData:{name:"",secretKey:""}})},[]),Gt=b.useCallback(()=>{P(!0)},[]),Vt=b.useCallback(oe=>{Ee(Pe=>new Set(Pe).add(oe))},[]),pa=b.useMemo(()=>{const oe=[];return nn&&oe.push({key:"2fa",isVisible:ae,onAdd:Lt}),oe.push({key:"attachments",isVisible:se,onAdd:Gt}),oe},[nn,ae,se,Lt,Gt]),Aa=b.useCallback(oe=>{Ee(Pe=>{const Qe=new Set(Pe);return Qe.delete(oe),Qe}),Q(Pe=>{const Qe={...Pe};return delete Qe[oe],Qe})},[]);b.useEffect(()=>{const oe=c.jsxs("div",{className:"flex items-center gap-2",children:[l&&c.jsx(_n,{onClick:()=>V(!0),title:t("items.deleteItemTitle"),iconType:Wa.DELETE,variant:"danger",disabled:k}),c.jsx(_n,{id:"save-credential",onClick:ta,title:t(k?"common.saving":"items.saveItem"),iconType:Wa.SAVE,isLoading:k,disabled:k})]});return A(oe),()=>A(null)},[A,l,t,ta,k]);const Ma=b.useCallback((oe,Pe,Qe,$e,et,Bt)=>{const Ue=z[oe]||"";if(et){const je=Array.isArray(Ue)&&Ue.length>0?Ue:Ue?[Ue]:[""];return c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:Pe}),je.map((jt,da)=>c.jsxs("div",{className:"relative",children:[c.jsx("input",{id:`${oe}-${da}`,type:"text",value:jt,onChange:ua=>{const ra=[...je];ra[da]=ua.target.value,Rt(oe,ra.filter(za=>za.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"}),da===je.length-1&&c.jsx("button",{type:"button",onClick:()=>Rt(oe,[...je,""]),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:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})})]},`${oe}-${da}`))]})}const J=Array.isArray(Ue)?Ue[0]||"":Ue,ke=(je,jt=!0)=>Bt?c.jsxs("div",{className:"relative",children:[je,c.jsx("button",{type:"button",onClick:Bt,className:`absolute right-2 ${jt?"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:t("common.delete"),children:c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}):je;switch(Qe){case Zt.Password:return ke(c.jsx(s_,{id:oe,label:Pe,value:J,onChange:je=>Rt(oe,je),showPassword:ne,onShowPasswordChange:Ie,initialSettings:It,onSettingsChange:Ot}));case Zt.Hidden:return ke(c.jsx(vw,{id:oe,label:Pe,value:J,onChange:je=>Rt(oe,je)}));case Zt.TextArea:return ke(c.jsxs("div",{children:[Pe&&c.jsx("label",{htmlFor:oe,className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:Pe}),c.jsx("textarea",{id:oe,value:J,onChange:je=>Rt(oe,je.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 Zt.Email:return c.jsx(e_,{id:oe,value:J,onChange:je=>Rt(oe,je),onRemove:Bt,onGenerateAlias:ca?St:pt,isEmailMode:He,onEmailModeChange:tt});case Zt.URL:case Zt.Phone:case Zt.Number:case Zt.Date:case Zt.Text:default:return oe==="login.username"&&ca?c.jsx(o_,{id:oe,label:Pe,value:J,onChange:je=>Rt(oe,je),onRegenerate:gr}):ke(c.jsx(Dc,{id:oe,label:Pe,value:J,onChange:je=>Rt(oe,je),type:"text"}))}},[z,Rt,ne,t,St,pt,ca,gr,He,It]),hn=b.useCallback(oe=>{oe.preventDefault(),ta()},[ta]),_a=b.useCallback(oe=>{switch(oe){case mt.Login:return t("items.loginCredentials");case mt.Alias:return t("common.alias");case mt.Card:return t("items.cardInformation");default:return oe}},[t]),ya=b.useCallback(oe=>oe===mt.Alias&&ca?c.jsx(c.Fragment,{children:c.jsx("button",{type:"button",onClick:gt,className:"p-1.5 text-gray-400 hover:text-primary-500 focus:outline-none",title:t("common.generate"),children:c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M23 4v6h-6"}),c.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})})}):null,[ca,gt,t]);return L||!U?c.jsx("div",{className:"flex justify-center items-center p-8",children:c.jsx(ur,{})}):c.jsxs("form",{onSubmit:hn,className:"space-y-4",children:[c.jsx(vF,{selectedType:U.ItemType,isEditMode:l,showDropdown:ue,onDropdownToggle:W,onTypeChange:sn,onRegenerateAlias:ca&&!l?gt:void 0}),c.jsxs(nu,{children:[c.jsx(bF,{inputRef:Y,value:U.Name||"",onChange:oe=>O({...U,Name:oe}),folders:ee,selectedFolderId:U.FolderId,onFolderChange:oe=>O({...U,FolderId:oe})}),_e.map(oe=>c.jsx("div",{children:Ma(oe.FieldKey,t(`fieldLabels.${oe.FieldKey}`,{defaultValue:oe.FieldKey}),oe.FieldType,oe.IsHidden,oe.IsMultiValue)},oe.FieldKey))]}),l&&U.HasPasskey&&c.jsx(d_,{itemId:U.Id,passkeyIdsMarkedForDeletion:De,onPasskeyMarkedForDeletion:Ve}),Object.keys(ct).map(oe=>{const Pe=ct[oe],Qe=Pe.filter(Ue=>Ce(Ue)),$e=oe===mt.Login?Pe.find(Ue=>Ue.FieldKey==="login.email"):null,et=$e&&!Ce($e),Bt=oe===mt.Login?[...Qe].sort((Ue,J)=>{const ke={"login.email":0,"login.username":1,"login.password":2},je=ke[Ue.FieldKey]??99,jt=ke[J.FieldKey]??99;return je-jt}):Qe;return Bt.length===0&&!et?null:c.jsx(nu,{title:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{children:_a(oe)}),et&&c.jsxs("button",{type:"button",onClick:()=>Vt("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:[c.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:[c.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),c.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),c.jsx("span",{children:t("common.email")})]})]}),actions:ya(oe),children:Bt.map(Ue=>{const J=U&&ce.has(Ue.FieldKey)&&!Zl(Ue,U.ItemType);return c.jsx(tn.Fragment,{children:Ma(Ue.FieldKey,t(`fieldLabels.${Ue.FieldKey}`,{defaultValue:Ue.FieldKey}),Ue.FieldType,Ue.IsHidden,Ue.IsMultiValue,J?()=>Aa(Ue.FieldKey):void 0)},Ue.FieldKey)})},oe)}),G&&pe.has("notes.content")&&c.jsx(nu,{title:t("common.notes"),actions:Ce(G)?void 0:c.jsx("button",{type:"button",onClick:zt,className:"p-1.5 text-gray-400 hover:text-red-500 focus:outline-none",title:t("common.delete"),children:c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),children:Ma(G.FieldKey,"",G.FieldType,G.IsHidden,G.IsMultiValue)}),K.length>0&&c.jsx(nu,{title:t("common.customFields"),children:c.jsx(ZM,{customFields:K,fieldValues:z,onFieldsReorder:ka,onFieldValueChange:(oe,Pe)=>Rt(oe,Pe),onFieldLabelChange:kt,onFieldDelete:Nt})}),ae&&nn&&c.jsx(EF,{totpCodes:Oe,onTotpCodesChange:ze,originalTotpCodeIds:Et,isAddFormVisible:it.isAddFormVisible,formData:it.formData,onStateChange:Ge,itemDisplayName:(U==null?void 0:U.Name)||void 0,itemUsername:z["login.username"]||z["login.email"]}),se&&c.jsx(l_,{attachments:Ft,onAttachmentsChange:Se,itemId:l?e:void 0}),c.jsx(lU,{optionalSystemFields:re,visibleFieldKeys:pe,optionalSections:pa,callbacks:{onAddSystemField:Vt,onAddCustomField:rn}}),l&&c.jsx(Tu,{isOpen:_,onClose:()=>V(!1),title:t("items.deleteItemTitle"),message:t("items.deleteItemConfirm"),confirmText:t("common.delete"),cancelText:t("common.cancel"),onConfirm:Me,variant:"danger"})]})},lj=({itemId:t})=>{const{t:e}=nt(),[n,i]=b.useState([]),[s,l]=b.useState(!0),d=ea(),m=f=>{try{const g=f.Blob instanceof Uint8Array?f.Blob:new Uint8Array(f.Blob),A=new Blob([g]),p=URL.createObjectURL(A),v=document.createElement("a");v.href=p,v.download=f.Filename,document.body.appendChild(v),v.click(),document.body.removeChild(v),URL.revokeObjectURL(p)}catch(g){console.error("Error downloading attachment:",g)}};return b.useEffect(()=>{(async()=>{if(!(!(d!=null&&d.sqliteClient)||!t))try{const g=d.sqliteClient.settings.getAttachmentsForItem(t);i(g)}catch(g){console.error("Error loading attachments:",g)}finally{l(!1)}})()},[t,d==null?void 0:d.sqliteClient]),s?c.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[c.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:e("common.attachments")}),e("common.loadingAttachments")]}):n.length===0?null:c.jsx("div",{className:"mb-4",children:c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:e("common.attachments")}),c.jsx("div",{className:"grid grid-cols-1 gap-2",children:n.map(f=>c.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:c.jsxs("div",{className:"flex justify-between items-center gap-2",children:[c.jsx("div",{className:"flex items-center flex-1",children:c.jsxs("div",{className:"flex flex-col",children:[c.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:f.Filename}),c.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(f.CreatedAt).toLocaleDateString()})]})}),c.jsx("div",{className:"flex items-center",children:c.jsx("svg",{className:"w-4 h-4 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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 cj{constructor(){qe(this,"currentCopiedId","");qe(this,"onCopyCallbacks",[])}setCopied(e){this.currentCopiedId=e,this.notifySubscribers()}getCopiedId(){return this.currentCopiedId}subscribe(e){return this.onCopyCallbacks.push(e),()=>{this.onCopyCallbacks=this.onCopyCallbacks.filter(n=>n!==e)}}notifySubscribers(){this.onCopyCallbacks.forEach(e=>e(this.currentCopiedId))}}const iu=new cj,yh=({name:t})=>{switch(t){case"visibility":return c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),c.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return c.jsxs(c.Fragment,{children:[c.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"}),c.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"copy":return c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),c.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 c.jsx(c.Fragment,{children:c.jsx("polyline",{points:"20 6 9 17 4 12"})});default:return null}},yu=({id:t,label:e,value:n,type:i="text",labelSuffix:s})=>{const{t:l}=nt(),[d,m]=b.useState(!1),[f,g]=b.useState(!1);b.useEffect(()=>{const p=iu.subscribe(v=>{g(v===t)});return()=>{p()}},[t]);const A=async()=>{try{await navigator.clipboard.writeText(n),iu.setCopied(t),await wt("CLIPBOARD_COPIED",{value:n},"background"),setTimeout(()=>{iu.getCopiedId()===t&&iu.setCopied("")},2e3)}catch(p){console.error("Failed to copy text:",p)}};return c.jsxs("div",{children:[c.jsxs("label",{htmlFor:t,className:"block mb-2 text-sm font-medium text-gray-700 dark:text-gray-300",children:[e,s]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:i==="password"&&!d?"password":"text",id:t,readOnly:!0,value:n,onClick:A,className:`w-full pl-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 truncate ${i==="password"?"pr-16":"pr-10"}`}),c.jsxs("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:[f?c.jsx("button",{type:"button",className:"p-1 text-green-500 dark:text-green-400 transition-colors duration-200",title:l("common.copied"),children:c.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx(yh,{name:"check"})})}):c.jsx("button",{type:"button",onClick:A,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:l("common.copyToClipboard"),children:c.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx(yh,{name:"copy"})})}),i==="password"&&c.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:l(d?"common.hidePassword":"common.showPassword"),children:c.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx(yh,{name:d?"visibility-off":"visibility"})})})]})]})]})},dj=({isOpen:t,onClose:e,itemId:n,fieldKey:i,fieldLabel:s,fieldType:l,isHidden:d})=>{const{t:m}=nt(),f=ea(),{executeVaultMutationAsync:g}=Fs(),[A,p]=b.useState([]),[v,I]=b.useState(!0),[x,N]=b.useState(null),T=d||l===Zt.Password||l===Zt.Hidden,L=b.useCallback(async()=>{if(f!=null&&f.sqliteClient)try{I(!0);const _=f.sqliteClient.items.getFieldHistory(n,i);p(_)}catch(_){console.error("Error loading field history:",_)}finally{I(!1)}},[f==null?void 0:f.sqliteClient,n,i]);b.useEffect(()=>{t&&L()},[t,f==null?void 0:f.sqliteClient,n,i,L]);const B=_=>{try{return new Date(_).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return _}},k=_=>{try{return JSON.parse(_)}catch{return[_]}},F=async _=>{if(f!=null&&f.sqliteClient)try{await g(async()=>{await f.sqliteClient.items.deleteFieldHistory(_)}),L(),N(null)}catch(V){console.error("Error deleting field history:",V)}};return c.jsx($n,{isOpen:t,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:v?c.jsx("div",{className:"flex items-center justify-center py-8",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):A.length===0?c.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:m("items.noHistoryAvailable")}):c.jsx("div",{className:"space-y-3",children:A.map(_=>{const V=k(_.ValueSnapshot),U=x===_.Id;return c.jsxs("div",{className:"rounded-lg p-4 border border-gray-200 dark:border-gray-700",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:B(_.ChangedAt)}),U?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{type:"button",onClick:()=>F(_.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")}),c.jsx("button",{type:"button",onClick:()=>N(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")})]}):c.jsx("button",{type:"button",onClick:()=>N(_.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:c.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:c.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"})})})]}),V.map((O,z)=>c.jsx("div",{className:"mt-2",children:c.jsx(yu,{id:`history-${_.Id}-${z}`,label:"",value:O,type:T?"password":"text"})},z))]},_.Id)})})})},dv=/(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,uj=t=>{const e=[];let n=0,i;for(dv.lastIndex=0;(i=dv.exec(t))!==null;){i.index>n&&e.push({type:"text",content:t.slice(n,i.index)});const s=i[0],l=s.startsWith("http")?s:`http://${s}`;e.push({type:"url",content:s,href:l}),n=i.index+s.length}return n<t.length&&e.push({type:"text",content:t.slice(n)}),e},mj=({text:t})=>{const e=uj(t);return c.jsx(c.Fragment,{children:e.map((n,i)=>n.type==="url"?c.jsx("a",{href:n.href,target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300",children:n.content},i):c.jsx(tn.Fragment,{children:n.content},i))})},bo=({field:t,itemId:e,hideLabel:n=!1})=>{const{t:i}=nt(),s=ea(),[l,d]=b.useState(!1),[m,f]=b.useState(0),g=t.IsCustomField?t.Label||t.FieldKey:i(`fieldLabels.${t.FieldKey}`,{defaultValue:t.FieldKey}),A=t.EnableHistory===!0;if(b.useEffect(()=>{if(A&&e&&(s!=null&&s.sqliteClient))try{const N=s.sqliteClient.items.getFieldHistory(e,t.FieldKey);if(N.length>1)f(N.length);else if(N.length===1){const T=Array.isArray(t.Value)?t.Value:[t.Value],L=JSON.stringify(T.filter(k=>k&&k.trim()!=="")),B=N[0].ValueSnapshot;f(L!==B?1:0)}else f(0)}catch(N){console.error("[FieldBlock] Error checking history:",N)}},[A,e,t.FieldKey,t.Value,s==null?void 0:s.sqliteClient]),!t.Value||typeof t.Value=="string"&&t.Value.trim()==="")return null;const p=Array.isArray(t.Value)?t.Value:[t.Value];if(p.length>1)return c.jsx("div",{className:"space-y-2",children:p.map((N,T)=>c.jsx(yu,{id:`${t.FieldKey}-${T}`,label:T===0?g:`${g} ${T+1}`,value:N,type:t.FieldType===Zt.Password?"password":"text"},`${t.FieldKey}-${T}`))});const v=p[0],I=m>0&&e?c.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:c.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:c.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=l&&e?c.jsx(dj,{isOpen:l,onClose:()=>d(!1),itemId:e,fieldKey:t.FieldKey,fieldLabel:g,fieldType:t.FieldType,isHidden:t.IsHidden}):null;switch(t.FieldType){case Zt.Password:case Zt.Hidden:return c.jsxs(c.Fragment,{children:[c.jsx(yu,{id:t.FieldKey,label:g,value:v,type:"password",labelSuffix:I}),x]});case Zt.TextArea:return c.jsxs("div",{children:[!n&&c.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:g}),c.jsx("div",{className:"p-4 bg-gray-50 rounded-lg dark:bg-gray-700",children:c.jsx("p",{className:"text-gray-900 dark:text-gray-100 whitespace-pre-wrap",children:c.jsx(mj,{text:v})})})]});case Zt.Email:case Zt.URL:case Zt.Phone:case Zt.Date:case Zt.Number:case Zt.Text:default:return c.jsxs(c.Fragment,{children:[c.jsx(yu,{id:t.FieldKey,label:g,value:v,type:"text",labelSuffix:I}),x]})}},gj=t=>t?t.length===6?`${t.slice(0,3)} ${t.slice(3)}`:t:"",fj=({itemId:t})=>{const{t:e}=nt(),[n,i]=b.useState([]),[s,l]=b.useState(!0),[d,m]=b.useState({}),[f,g]=b.useState(null),A=ea(),p=(N=30)=>{const T=new Ta({secret:"dummy",algorithm:"SHA1",digits:6,period:N});return T.period-Math.floor(Date.now()/1e3)%T.period},v=()=>{const N=p();return Math.floor((30-N)/30*100)},I=N=>{try{return new Ta({secret:N,algorithm:"SHA1",digits:6,period:30}).generate()}catch(T){return console.error("Error generating TOTP code:",T),"Error"}},x=async(N,T)=>{try{await navigator.clipboard.writeText(N),g(T),await wt("CLIPBOARD_COPIED",{value:N},"background"),setTimeout(()=>{g(null)},2e3)}catch(L){console.error("Failed to copy:",L)}};return b.useEffect(()=>{(async()=>{if(!(!(A!=null&&A.sqliteClient)||!t))try{const T=A.sqliteClient.settings.getTotpCodesForItem(t);i(T)}catch(T){console.error("Error loading TOTP codes:",T)}finally{l(!1)}})()},[t,A==null?void 0:A.sqliteClient]),b.useEffect(()=>{const N=B=>{const k={};return n.forEach(F=>{const _=I(F.SecretKey);_!=="Error"?k[F.Id]=_:k[F.Id]=B[F.Id]??"Error"}),k},T={};n.forEach(B=>{T[B.Id]=I(B.SecretKey)}),m(T);const L=setInterval(()=>{m(N)},1e3);return()=>{clearInterval(L)}},[n]),s?c.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[c.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:e("common.twoFactorAuthentication")}),e("common.loadingTotpCodes")]}):n.length===0?null:c.jsx("div",{className:"mb-4",children:c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:e("common.twoFactorAuthentication")}),c.jsx("div",{className:"grid grid-cols-1 gap-2",children:n.map(N=>c.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[N.Id],N.Id),"aria-label":`Copy ${N.Name} code`,children:c.jsxs("div",{className:"flex justify-between items-center gap-2",children:[c.jsx("div",{className:"flex items-center flex-1",children:c.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:N.Name})}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"flex flex-col items-end",children:[c.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:gj(d[N.Id])}),c.jsx("div",{className:"text-xs",children:f===N.Id?c.jsx("span",{className:"text-green-600 dark:text-green-400",children:e("common.copied")}):c.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[p(),"s"]})})]}),c.jsx("div",{className:"w-1 h-6 bg-gray-200 rounded-full dark:bg-gray-600",children:c.jsx("div",{className:"bg-blue-600 rounded-full transition-all",style:{height:`${v()}%`,width:"100%"}})})]})]})},N.Id))})]})})};var Eu={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 Eh=({svg:t,className:e="w-8 h-8"})=>c.jsx("div",{className:`${e} flex-shrink-0`,dangerouslySetInnerHTML:{__html:t}}),hj=t=>{if(!t)return"CreditCard";const e=t.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"},pj=t=>Eu[hj(t)],jw=({item:t,className:e="w-8 h-8"})=>{var i;if(t.ItemType===va.Note)return c.jsx(Eh,{svg:Eu.Note,className:e});if(t.ItemType===va.CreditCard){const s=(i=t.Fields)==null?void 0:i.find(d=>d.FieldKey===mn.CardNumber),l=s!=null&&s.Value?Array.isArray(s.Value)?s.Value[0]:s.Value:void 0;return c.jsx(Eh,{svg:pj(l),className:e})}const n=t.Logo&&t.Logo.length>0?Bh.imgSrcFromBytes(t.Logo):null;return n?c.jsx("img",{src:n,alt:t.Name||"Item",className:`${e} flex-shrink-0`,onError:s=>{const l=s.target;l.style.display="none";const d=l.parentElement;if(d){const m=document.createElement("div");m.className=e,m.innerHTML=Eu.Placeholder,d.insertBefore(m,l)}}}):c.jsx(Eh,{svg:Eu.Placeholder,className:e})},Aj=({email:t})=>{const{t:e}=nt(),[n,i]=b.useState([]),[s,l]=b.useState([]),[d,m]=b.useState(!0),[f,g]=b.useState(0),[A,p]=b.useState(!1),[v,I]=b.useState(null),[x,N]=b.useState(!1),[T,L]=b.useState(2),B=Vr(),k=ea(),F=3,_=T<n.length,V=(Q,K)=>{const te=Q.slice(0,K);l(te)},U=()=>{const Q=Math.min(T+F,n.length);L(Q),V(n,Q)},O=async Q=>(await rc("local:publicEmailDomains")??[]).some(te=>Q.toLowerCase().endsWith(`@${te.toLowerCase()}`)),z=async Q=>(await rc("local:privateEmailDomains")??[]).some(te=>Q.toLowerCase().endsWith(`@${te.toLowerCase()}`));return b.useEffect(()=>{const Q=async()=>{var te;try{if(k.isOffline){m(!1);return}I(null);const ee=await O(t),X=await z(t),ue=ee||X;if(p(ee),N(ue),!ue)return;if(ee){const W=t.split("@")[0],ae=await fetch(`https://api.spamok.com/v2/EmailBox/${W}`,{headers:{"X-Asdasd-Platform-Id":"av-chrome","X-Asdasd-Platform-Version":gn.VERSION}});if(!ae.ok){I(e("common.errors.unknownError"));return}const be=await ae.json(),se=((te=be==null?void 0:be.mails)==null?void 0:te.toSorted((P,q)=>new Date(q.dateSystem).getTime()-new Date(P.dateSystem).getTime()))??[];d&&se.length>0&&g(se[0].id),i(P=>JSON.stringify(P.map(Y=>Y.id))!==JSON.stringify(se.map(Y=>Y.id))?(V(se,T),se):P)}else if(X)try{const W=await B.authFetch(`EmailBox/${t}`,{method:"GET"},!0,!1);try{const be=W.mails.toSorted((se,P)=>new Date(P.dateSystem).getTime()-new Date(se.dateSystem).getTime());if(be){const se=await $t.decryptEmailList(be,k.sqliteClient.settings.getAllEncryptionKeys());d&&se.length>0&&g(se[0].id),i(P=>JSON.stringify(P.map(Y=>Y.id))!==JSON.stringify(se.map(Y=>Y.id))?(V(se,T),se):P),I(null)}}catch{const ae=W;if(k.shouldSuppressEmailErrors())return;I(e("emails.apiErrors."+(ae==null?void 0:ae.code)));return}}catch{if(k.shouldSuppressEmailErrors())return;I(e("common.errors.unknownError"));return}}catch(ee){console.error("Error loading emails:",ee),I(e("common.errors.unknownError"))}m(!1)};Q();const K=setInterval(Q,2e3);return()=>clearInterval(K)},[t,d,B,k,e,T]),x?k.isOffline?c.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[c.jsx("div",{className:"flex items-center gap-2 mb-2",children:c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")})}),c.jsx("p",{className:"text-sm",children:e("emails.offlineMessage")})]}):v?c.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[c.jsx("div",{className:"flex items-center gap-2 mb-2",children:c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")})}),c.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded",children:c.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:v})})]}):d?c.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),c.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),e("common.loadingEmails")]}):n.length===0?c.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4 text-sm",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),c.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),e("emails.noEmails")]}):c.jsxs("div",{className:"space-y-2 mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),c.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),s.map(Q=>A?c.jsxs("a",{href:`https://spamok.com/${t.split("@")[0]}/${Q.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 ${Q.id>f?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[c.jsx("div",{className:"truncate flex-1",children:c.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[Q.subject.substring(0,30),Q.subject.length>30?"...":""]})}),c.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(Q.dateSystem).toLocaleDateString()})]},Q.id):c.jsxs(Vu,{to:`/emails/${Q.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 ${Q.id>f?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[c.jsx("span",{className:"truncate flex-1",children:c.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[Q.subject.substring(0,30),Q.subject.length>30?"...":""]})}),c.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(Q.dateSystem).toLocaleDateString()})]},Q.id)),_&&c.jsxs("button",{onClick:U,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:[c.jsx("span",{children:e("common.loadMore")}),c.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}):null},yj=()=>{const{t}=nt(),{id:e}=Hu(),n=Ha(),i=ea(),[s,l]=b.useState(null),{setIsInitialLoading:d}=wa(),{setHeaderButtons:m}=wr(),f=b.useCallback(()=>{Ua.openInNewPopup(`/items/${e}`)},[e]),g=b.useCallback(()=>{n(`/items/${e}/edit`)},[e,n]);if(b.useEffect(()=>{if(Ua.isPopup()&&(window.history.replaceState({},"","popup.html#/items"),window.history.pushState({},"",`popup.html#/items/${e}`)),!(!(i!=null&&i.sqliteClient)||!e))try{const I=i.sqliteClient.items.getById(e);I?(l(I),d(!1)):(console.error("Item not found"),n("/items"))}catch(I){console.error("Error loading item:",I)}},[i.sqliteClient,e,n,d]),b.useEffect(()=>{const I=c.jsxs("div",{className:"flex items-center gap-2",children:[!Ua.isPopup()&&c.jsx(_n,{onClick:f,title:t("common.openInNewWindow"),iconType:Wa.EXPAND}),c.jsx(_n,{onClick:g,title:t("items.editItem"),iconType:Wa.EDIT})]});return m(I),()=>{}},[m,g,f,t]),b.useEffect(()=>()=>m(null),[m]),!s)return c.jsx("div",{children:t("common.loading")});const A=s.Fields.filter(I=>I.FieldType===Zt.URL&&I.Value),p={...s,Fields:s.Fields.filter(I=>I.FieldType!==Zt.URL)},v=vD(p);return c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"flex justify-between items-start",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(jw,{item:s,className:"w-12 h-12 rounded-lg"}),c.jsxs("div",{children:[c.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.Name||t("items.untitled")}),A.length>0&&c.jsx("div",{className:"mt-1 space-y-1",children:A.flatMap(I=>(Array.isArray(I.Value)?I.Value:[I.Value]).map((N,T)=>/^https?:\/\//i.test(N)?c.jsx("a",{href:N,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:N},`${I.FieldKey}-${T}`):c.jsx("span",{className:"block text-gray-500 dark:text-gray-300 break-all text-sm",children:N},`${I.FieldKey}-${T}`)))})]})]})}),(s.ItemType===va.Login||s.ItemType===va.Alias)&&(()=>{const I=s.Fields.find(T=>T.FieldKey==="login.email"),x=I==null?void 0:I.Value,N=Array.isArray(x)?x[0]:x;return N?c.jsx(Aj,{email:N}):null})(),(s.ItemType===va.Login||s.ItemType===va.Alias)&&c.jsx(fj,{itemId:s.Id}),(s.ItemType===va.Login||s.ItemType===va.Alias)&&s.HasPasskey&&c.jsx(c_,{itemId:s.Id}),s.ItemType===va.Note&&v[mt.Notes]&&v[mt.Notes].length>0&&v[mt.Notes].map(I=>c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t(`fieldLabels.${I.FieldKey}`,{defaultValue:I.Label||I.FieldKey})}),c.jsx(bo,{field:I,itemId:s.Id,hideLabel:!0})]},I.FieldKey)),Object.keys(v).length>0&&c.jsxs(c.Fragment,{children:[v[mt.Login]&&v[mt.Login].length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.credentials")}),v[mt.Login].map(I=>c.jsx(bo,{field:I,itemId:s.Id},I.FieldKey))]}),v[mt.Alias]&&v[mt.Alias].length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.alias")}),v[mt.Alias].map(I=>c.jsx(bo,{field:I,itemId:s.Id},I.FieldKey))]}),v[mt.Card]&&v[mt.Card].length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("items.cardInformation")}),v[mt.Card].map(I=>c.jsx(bo,{field:I,itemId:s.Id},I.FieldKey))]}),s.ItemType!==va.Note&&v[mt.Notes]&&v[mt.Notes].length>0&&v[mt.Notes].map(I=>c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t(`fieldLabels.${I.FieldKey}`,{defaultValue:I.Label||I.FieldKey})}),c.jsx(bo,{field:I,itemId:s.Id,hideLabel:!0})]},I.FieldKey)),v[mt.Custom]&&v[mt.Custom].length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.customFields")}),v[mt.Custom].map(I=>c.jsx(bo,{field:I,itemId:s.Id},I.FieldKey))]})]}),c.jsx(lj,{itemId:s.Id}),s.Tags&&s.Tags.length>0&&c.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-4",children:[c.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t("items.tags")}),c.jsx("div",{className:"flex flex-wrap gap-2",children:s.Tags.map(I=>c.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:I.Name},I.Id))})]})]})},Ej=({isOpen:t,onClose:e,onDeleteFolderOnly:n,onDeleteFolderAndContents:i,itemCount:s})=>{const{t:l}=nt(),[d,m]=b.useState(!1),f=async()=>{m(!0);try{await n(),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)}},A=()=>{d||e()};return c.jsx($n,{isOpen:t,onClose:A,title:l("items.deleteFolder"),footer:c.jsx("div",{className:"flex justify-end",children:c.jsx("button",{type:"button",onClick:A,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:l("common.cancel")})}),children:c.jsx("div",{className:"space-y-4",children:c.jsxs("div",{className:"space-y-3 pt-2",children:[c.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:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("div",{className:"mt-0.5 text-orange-500",children:c.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[c.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"}),c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 14l2 2 4-4"})]})}),c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:l("items.deleteFolderKeepItems")}),c.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:l("items.deleteFolderKeepItemsDescription")})]})]})}),s>0&&c.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:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("div",{className:"mt-0.5 text-red-500",children:c.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[c.jsx("polyline",{points:"3 6 5 6 21 6"}),c.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"})]})}),c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-red-600 dark:text-red-400",children:l("items.deleteFolderAndItems")}),c.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:l("items.deleteFolderAndItemsDescription",{count:s})})]})]})})]})})})},uv=({isOpen:t,onClose:e,onSave:n,initialName:i="",mode:s})=>{const{t:l}=nt(),[d,m]=b.useState(i),[f,g]=b.useState(!1),[A,p]=b.useState(null);b.useEffect(()=>{t&&(m(i),p(null))},[t,i]);const v=async I=>{I.preventDefault();const x=d.trim();if(!x){p(l("items.folderNameRequired"));return}g(!0),p(null);try{await n(x),e()}catch(N){xo(N)?p(as(N,l("common.errors.unknownErrorTryAgain"))):p(l("common.errors.unknownErrorTryAgain")),console.error("Error saving folder:",N)}finally{g(!1)}};return c.jsx($n,{isOpen:t,onClose:e,title:l(s==="create"?"items.createFolder":"items.editFolder"),footer:c.jsxs("div",{className:"flex justify-end gap-3",children:[c.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:l("common.cancel")}),c.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:l(f?"common.saving":s==="create"?"common.create":"common.save")})]}),children:c.jsxs("form",{id:"folder-form",onSubmit:v,children:[c.jsx("label",{htmlFor:"folderName",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:l("items.folderName")}),c.jsx("input",{id:"folderName",type:"text",value:d,onChange:I=>m(I.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"}),A&&c.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:A})]})})},mv=({folder:t,onClick:e})=>c.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:[c.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:c.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"})}),c.jsx("span",{className:"text-gray-700 dark:text-gray-200 font-medium truncate max-w-[120px]",children:t.name}),t.itemCount>0&&c.jsx("span",{className:"text-gray-400 dark:text-gray-500 text-xs",children:t.itemCount})]}),bj=({item:t,showFolderPath:e=!1,searchTerm:n=""})=>{const{t:i}=nt(),s=Ha(),l=m=>{var A,p;let f="";const g=(A=m.Fields)==null?void 0:A.find(v=>v.FieldKey===mn.LoginUsername);if(g&&g.Value&&(f=Array.isArray(g.Value)?g.Value[0]:g.Value),!f){const v=(p=m.Fields)==null?void 0:p.find(I=>I.FieldKey===mn.LoginEmail);v&&v.Value&&(f=Array.isArray(v.Value)?v.Value[0]:v.Value)}return f.length>33?f.slice(0,30)+"...":f},d=m=>{let f=i("items.untitled");return m.Name&&(f=m.Name),f.length>33?f.slice(0,30)+"...":f};return c.jsx("li",{children:c.jsxs("button",{onClick:()=>{const m=n?`/items/${t.Id}?returnSearch=${encodeURIComponent(n)}`:`/items/${t.Id}`;s(m)},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:[c.jsx("div",{className:"w-8 h-8 mr-2 flex-shrink-0",children:c.jsx(jw,{item:t,className:"w-8 h-8"})}),c.jsxs("div",{className:"text-left flex-1",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:e&&t.FolderPath?c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"text-gray-500 dark:text-gray-400 text-sm",children:[t.FolderPath," > "]}),d(t)]}):d(t)}),t.HasPasskey&&c.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:c.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"})}),t.HasAttachment&&c.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:c.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"})}),t.HasTotp&&c.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:c.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"})})]}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:l(t)})]})]})})},ko="items-filter",vj=5*60*1e3,Ij=[{value:"OldestFirst",labelKey:"items.sort.oldestFirst"},{value:"NewestFirst",labelKey:"items.sort.newestFirst"},{value:"Alphabetical",labelKey:"items.sort.alphabetical"}],wj=()=>{try{const t=localStorage.getItem(ko);if(!t)return"all";const{filter:e,timestamp:n}=JSON.parse(t);return Date.now()-n>vj?(localStorage.removeItem(ko),"all"):e}catch{return"all"}},Jl=t=>{try{localStorage.setItem(ko,JSON.stringify({filter:t,timestamp:Date.now()}))}catch{}},bh=t=>Object.values(va).includes(t),gv=()=>{const{t}=nt(),{folderId:e}=Hu(),n=an(),[i]=Qu(),s=ea(),l=Ir(),d=Ha(),{syncVault:m}=xp(),{executeVaultMutationAsync:f}=Fs(),{setHeaderButtons:g}=wr(),[A,p]=b.useState([]),[v,I]=b.useState(()=>i.get("search")||""),[x,N]=b.useState(wj()),[T,L]=b.useState(!1),[B,k]=b.useState(!1),[F,_]=b.useState(!1),[V,U]=b.useState(!1),[O,z]=b.useState(0),[Q,K]=b.useState(0),[te,ee]=b.useState("OldestFirst"),[X,ue]=b.useState(!1),[W,ae]=b.useState(!0),{setIsInitialLoading:be}=wa();b.useEffect(()=>{lt.getShowFolders().then(ae)},[]);const se=e??null,P=b.useMemo(()=>{if(!se||!(s!=null&&s.sqliteClient))return null;const De=s.sqliteClient.folders.getAll().find(Ve=>Ve.Id===se);return(De==null?void 0:De.Name)??null},[se,s==null?void 0:s.sqliteClient,Q]),[q,Y]=xc(!0,100);b.useEffect(()=>{const he=v?`${n.pathname}?search=${encodeURIComponent(v)}`:n.pathname,De=n.pathname+n.search;he!==De&&d(he,{replace:!0})},[v,n.pathname,n.search,d]),b.useEffect(()=>{const he=n.state;he!=null&&he.resetFilters&&(I(""),N("all"),localStorage.removeItem(ko),d(n.pathname,{replace:!0,state:{}}))},[n.state,n.pathname,d]);const ne=b.useCallback(()=>{const he=new URLSearchParams;bh(x)&&he.set("type",x),se&&he.set("folderId",se);const De=he.toString();d(De?`/items/add?${De}`:"/items/add")},[d,x,se]),Ie=b.useCallback(()=>{k(!0)},[]),ce=b.useCallback(async he=>{if(!(s!=null&&s.sqliteClient)){console.error("[FOLDER DEBUG] No sqliteClient available");return}await f(async()=>{await s.sqliteClient.folders.create(he,se)});const De=s.sqliteClient.items.getAll();p(De)},[s,se,f]),Ee=b.useCallback(async()=>{if(!(s!=null&&s.sqliteClient)||!se)return;await f(async()=>{await s.sqliteClient.folders.delete(se)});const he=s.sqliteClient.items.getAll();p(he);const De=s.sqliteClient.items.getRecentlyDeletedCount();z(De),d("/items")},[s,se,f,d]),Ne=b.useCallback(async()=>{if(!(s!=null&&s.sqliteClient)||!se)return;await f(async()=>{await s.sqliteClient.folders.deleteWithContents(se)});const he=s.sqliteClient.items.getAll();p(he);const De=s.sqliteClient.items.getRecentlyDeletedCount();z(De),d("/items")},[s,se,f,d]),we=b.useCallback(async he=>{!(s!=null&&s.sqliteClient)||!se||(await f(async()=>{await s.sqliteClient.folders.update(se,he)}),K(De=>De+1),U(!1))},[s,se,f]),Oe=b.useCallback(async()=>{if(s!=null&&s.sqliteClient)try{await m({onSuccess:async he=>{},onOffline:()=>{},onError:async he=>{console.error("Error syncing vault:",he)}})}catch(he){console.error("Error refreshing items:",he),await l.logout("Error while syncing vault, please re-authenticate.")}},[s,l,m]),ze=b.useCallback(async()=>{Y(!0),await Oe(),Y(!1)},[Oe,Y]);b.useEffect(()=>{const he=c.jsxs("div",{className:"flex items-center gap-2",children:[!Ua.isPopup()&&c.jsx(_n,{onClick:()=>Ua.openInNewPopup(),title:t("common.openInNewWindow"),iconType:Wa.EXPAND}),c.jsx(_n,{onClick:ne,title:t("items.addNewItem"),iconType:Wa.PLUS})]});return g(he),()=>g(null)},[g,ne,t]),b.useEffect(()=>{(async()=>{var De,Ve,He;if(s!=null&&s.sqliteClient){Y(!0);const tt=((De=s.sqliteClient)==null?void 0:De.items.getAll())??[];p(tt);const It=((Ve=s.sqliteClient)==null?void 0:Ve.items.getRecentlyDeletedCount())??0;z(It);const Ot=((He=s.sqliteClient)==null?void 0:He.settings.getCredentialsSortOrder())??"OldestFirst";ee(Ot),Y(!1),be(!1)}})()},[s==null?void 0:s.sqliteClient,Y,be]);const Et=()=>{if(se&&P)return P;switch(x){case"passkeys":return t("items.filters.passkeys");case"attachments":return t("common.attachments");case"totp":return t("items.filters.totp");case"all":return t("items.title");default:if(bh(x)){const he=Mu.find(De=>De.type===x);if(he)return t(he.titleKey)}return t("items.title")}},ht=b.useCallback((he,De)=>{I(""),d(`/items/folder/${he}`)},[d]),it=()=>{if(se||v)return[];if(!(s!=null&&s.sqliteClient))return[];const he=s.sqliteClient.folders.getAll(),De=new Map;return A.forEach(He=>{He.FolderId&&De.set(He.FolderId,(De.get(He.FolderId)||0)+1)}),he.map(He=>({id:He.Id,name:He.Name,itemCount:De.get(He.Id)||0})).sort((He,tt)=>He.name.localeCompare(tt.name))},Ge=A.filter(he=>{var It,Ot;if(se!==null){if(he.FolderId!==se)return!1}else if(!v&&W&&he.FolderId)return!1;let De=!0;if(x==="passkeys"?De=he.HasPasskey===!0:x==="attachments"?De=he.HasAttachment===!0:x==="totp"?De=he.HasTotp===!0:bh(x)&&(De=he.ItemType===x),!De)return!1;const Ve=v.toLowerCase().trim();if(!Ve)return!0;const He=Ve.split(/\s+/).filter(Tt=>Tt.length>0),tt=[((It=he.Name)==null?void 0:It.toLowerCase())||""];return(Ot=he.Fields)==null||Ot.forEach(Tt=>{const Yt=Array.isArray(Tt.Value)?Tt.Value.join(" ").toLowerCase():(Tt.Value||"").toLowerCase();tt.push(Yt),tt.push(Tt.Label.toLowerCase())}),He.every(Tt=>tt.some(Yt=>Yt.includes(Tt)))}),Ft=b.useMemo(()=>{const he=[...Ge];switch(te){case"NewestFirst":return he.sort((De,Ve)=>new Date(Ve.CreatedAt||0).getTime()-new Date(De.CreatedAt||0).getTime());case"Alphabetical":return he.sort((De,Ve)=>(De.Name||"").localeCompare(Ve.Name||""));case"OldestFirst":default:return he.sort((De,Ve)=>new Date(De.CreatedAt||0).getTime()-new Date(Ve.CreatedAt||0).getTime())}},[Ge,te]),Se=it(),Fe=A.length>0&&A.every(he=>he.FolderId!==null);return q?c.jsx("div",{className:"flex justify-center items-center p-8",children:c.jsx(ur,{})}):c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center gap-2 mb-4",children:[c.jsxs("div",{className:"relative min-w-0 flex-1 flex items-center gap-2",children:[c.jsxs("button",{onClick:()=>L(!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:[c.jsxs("h2",{className:"flex items-baseline gap-1.5 min-w-0 overflow-hidden",children:[c.jsx("span",{className:"truncate",children:Et()}),c.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400 shrink-0",children:["(",Ge.length,")"]})]}),c.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:c.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),se&&c.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[c.jsx("button",{onClick:()=>U(!0),title:t("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:c.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})})}),c.jsx("button",{onClick:()=>_(!0),title:t("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:c.jsxs("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[c.jsx("polyline",{points:"3 6 5 6 21 6"}),c.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&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>{L(!1)}}),c.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:c.jsxs("div",{className:"py-1",children:[c.jsxs("div",{className:"relative",children:[c.jsx("button",{onClick:()=>{const he="all";N(he),Jl(he),L(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${x==="all"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:t("items.title")}),!se&&c.jsxs("button",{onClick:he=>{he.stopPropagation();const De=!W;ae(De),lt.setShowFolders(De),L(!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:[c.jsx("span",{children:t("items.filters.folders")}),c.jsxs("svg",{className:`w-5 h-5 ${W?"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:[c.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),W&&c.jsx("polyline",{points:"7 12 10 15 17 8"})]})]})]}),c.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),Mu.map(he=>c.jsxs("button",{onClick:()=>{const De=he.type;N(De),Jl(De),L(!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 ${x===he.type?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:[c.jsx("span",{className:x===he.type?"text-orange-500 dark:text-orange-400":"text-gray-400 dark:text-gray-500",children:he.iconSvg}),t(he.titleKey)]},he.type)),c.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),c.jsx("button",{onClick:()=>{const he="passkeys";N(he),Jl(he),L(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${x==="passkeys"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:t("items.filters.passkeys")}),c.jsx("button",{onClick:()=>{const he="attachments";N(he),Jl(he),L(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${x==="attachments"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:t("common.attachments")}),c.jsx("button",{onClick:()=>{const he="totp";N(he),Jl(he),L(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${x==="totp"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:t("items.filters.totp")}),c.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),c.jsxs("button",{onClick:()=>{L(!1),d("/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:[c.jsx("span",{children:t("recentlyDeleted.title")}),O>0&&c.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:O})]})]})})]})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsxs("div",{className:"relative",children:[c.jsx("button",{onClick:()=>ue(!X),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:t("items.sort.title"),children:c.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"4",y1:"6",x2:"16",y2:"6"}),c.jsx("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),c.jsx("line",{x1:"4",y1:"18",x2:"8",y2:"18"}),c.jsx("polyline",{points:"15 15 18 18 21 15"}),c.jsx("line",{x1:"18",y1:"12",x2:"18",y2:"18"})]})}),X&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>ue(!1)}),c.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:c.jsx("div",{className:"py-1",children:Ij.map(he=>c.jsxs("button",{onClick:async()=>{ee(he.value),ue(!1),await f(async()=>{var De;(De=s.sqliteClient)==null||De.settings.setCredentialsSortOrder(he.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 ${te===he.value?"text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:[te===he.value?c.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:c.jsx("polyline",{points:"20 6 9 17 4 12"})}):c.jsx("span",{className:"w-4"}),c.jsx("span",{children:t(he.labelKey)})]},he.value))})})]})]}),c.jsx(Qh,{onClick:ze})]})]}),A.length>0?c.jsx("div",{className:"mb-4",children:c.jsx("input",{type:"text",value:v,onChange:he=>I(he.target.value),placeholder:`${t("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"})}):c.jsx(c.Fragment,{}),A.length===0?c.jsx(c.Fragment,{children:c.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:[c.jsx("p",{children:t("items.welcomeTitle")}),c.jsx("p",{children:t("items.welcomeDescription")})]})}):Ge.length===0&&Se.length===0&&!Fe?c.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-3 mb-10",children:[(x!=="all"||v)&&c.jsxs(c.Fragment,{children:[c.jsx("p",{children:v&&x!=="all"?t("items.noMatchingItemsWithFilter",{filter:Et(),search:v}):v?t("items.noMatchingItemsSearch",{search:v}):t("items.noMatchingItems")}),c.jsxs("div",{className:"flex flex-wrap gap-2",children:[v&&c.jsxs("button",{onClick:()=>I(""),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:[c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),t("items.clearSearch")]}),x!=="all"&&c.jsxs("button",{onClick:()=>{N("all"),localStorage.removeItem(ko)},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:[c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),t("items.clearFilter")]})]})]}),se&&c.jsx("p",{className:"text-sm",children:t("items.emptyFolderHint")})]}):Fe&&Ge.length===0&&!se&&!v?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[Se.map(he=>c.jsx(mv,{folder:he,onClick:()=>ht(he.id,he.name)},he.id)),c.jsxs("button",{onClick:Ie,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:[c.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:c.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"})}),c.jsxs("svg",{className:"w-3 h-3 -ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[c.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),c.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})]})]}),c.jsx("div",{className:"text-gray-500 dark:text-gray-400 text-sm",children:c.jsx("p",{children:t("items.allItemsInFolders")})})]}):c.jsxs(c.Fragment,{children:[!se&&!v&&W&&c.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[Se.map(he=>c.jsx(mv,{folder:he,onClick:()=>ht(he.id,he.name)},he.id)),c.jsxs("button",{onClick:Ie,className:`inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded-full transition-colors focus:outline-none ${Se.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:[c.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:c.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"})}),c.jsxs("svg",{className:"w-3 h-3 -ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[c.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),c.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),Se.length===0&&c.jsx("span",{children:t("items.newFolder")})]})]}),Ft.length>0&&c.jsx("ul",{id:"items-list",className:"space-y-2",children:Ft.map(he=>c.jsx(bj,{item:he,showFolderPath:!!v&&!!he.FolderPath,searchTerm:v},he.Id))}),(x!=="all"||v)&&c.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mt-4 pt-4",children:[v&&c.jsxs("button",{onClick:()=>I(""),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:[c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),t("items.clearSearch")]}),x!=="all"&&c.jsxs("button",{onClick:()=>{N("all"),localStorage.removeItem(ko)},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:[c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),t("items.clearFilter")]})]})]}),c.jsx(uv,{isOpen:B,onClose:()=>k(!1),onSave:ce,mode:"create"}),c.jsx(uv,{isOpen:V,onClose:()=>U(!1),onSave:we,initialName:P||"",mode:"edit"}),c.jsx(Ej,{isOpen:F,onClose:()=>_(!1),onDeleteFolderOnly:Ee,onDeleteFolderAndContents:Ne,itemCount:Ge.length})]})},fv=[{type:"Login",titleKey:"itemTypes.login.title",iconSvg:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.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"})})}],Cj=()=>{const{t}=nt(),e=Ha(),{setIsInitialLoading:n}=wa(),[i,s]=b.useState(""),[l,d]=b.useState("Login"),[m,f]=b.useState(!1);b.useEffect(()=>{n(!1)},[n]);const g=b.useCallback(()=>{const v=new URLSearchParams;v.set("type",l),i.trim()&&v.set("name",i.trim()),e(`/items/add?${v.toString()}`)},[l,i,e]),A=b.useCallback(v=>{d(v),f(!1)},[]),p=fv.find(v=>v.type===l);return c.jsxs("div",{className:"p-4 space-y-6",children:[c.jsx("div",{children:c.jsx(Dc,{id:"itemName",label:t("common.serviceName"),value:i,onChange:s,type:"text",placeholder:t("common.serviceName")})}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t("itemTypes.typeLabel")}),c.jsxs("div",{className:"relative",children:[c.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:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:"text-primary-600 dark:text-primary-400",children:p==null?void 0:p.iconSvg}),c.jsx("span",{className:"font-medium",children:p?t(p.titleKey):""})]}),c.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:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>f(!1)}),c.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:fv.map(v=>c.jsxs("button",{type:"button",onClick:()=>A(v.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 ${l===v.type?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300":"text-gray-900 dark:text-white"}`,children:[c.jsx("span",{className:l===v.type?"text-primary-600 dark:text-primary-400":"text-gray-500 dark:text-gray-400",children:v.iconSvg}),c.jsx("span",{className:"font-medium",children:t(v.titleKey)}),l===v.type&&c.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:c.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"})})]},v.type))})]})]})]}),c.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:t("common.next")})]})},Sj=(t,e=30)=>{const n=new Date(t),i=new Date(n.getTime()+e*24*60*60*1e3),s=new Date,l=Math.ceil((i.getTime()-s.getTime())/(24*60*60*1e3));return Math.max(0,l)},Nj=()=>{const{t}=nt(),e=ea(),{executeVaultMutationAsync:n}=Fs(),{setHeaderButtons:i}=wr(),[s,l]=b.useState([]),[d,m]=b.useState(null),[f,g]=b.useState(!1),[A,p]=b.useState(!1),[v,I]=xc(!0,100),x=b.useCallback(()=>{if(e!=null&&e.sqliteClient){const k=e.sqliteClient.items.getRecentlyDeleted();l(k)}},[e==null?void 0:e.sqliteClient]),N=b.useCallback(async k=>{e!=null&&e.sqliteClient&&(await n(async()=>{await e.sqliteClient.items.restore(k)}),x())},[e==null?void 0:e.sqliteClient,n,x]),T=b.useCallback(async()=>{!(e!=null&&e.sqliteClient)||!d||(await n(async()=>{await e.sqliteClient.items.permanentlyDelete(d)}),x(),g(!1),m(null))},[e==null?void 0:e.sqliteClient,n,x,d]),L=b.useCallback(async()=>{e!=null&&e.sqliteClient&&(await n(async()=>{for(const k of s)await e.sqliteClient.items.permanentlyDelete(k.Id)}),x(),p(!1))},[e==null?void 0:e.sqliteClient,n,s,x]);b.useEffect(()=>(i(null),()=>i(null)),[i]),b.useEffect(()=>{(async()=>{e!=null&&e.sqliteClient&&(I(!0),x(),I(!1))})()},[e==null?void 0:e.sqliteClient,I,x]);const B=b.useCallback(()=>{g(!1),m(null)},[]);return v?c.jsx("div",{className:"flex justify-center items-center p-8",children:c.jsx(ur,{})}):c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-4",children:[c.jsxs("h2",{className:"flex items-baseline gap-1.5 text-gray-900 dark:text-white text-xl",children:[t("recentlyDeleted.title"),c.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["(",s.length,")"]})]}),s.length>0&&c.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:t("recentlyDeleted.emptyAll")})]}),s.length===0?c.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:[c.jsx("p",{children:t("recentlyDeleted.noItems")}),c.jsx("p",{className:"text-sm",children:t("recentlyDeleted.noItemsDescription")})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-4",children:t("recentlyDeleted.description")}),c.jsx("ul",{className:"space-y-2",children:s.map(k=>{const F=k.DeletedAt,_=F?Sj(F):30;return c.jsx("li",{className:"relative",children:c.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[k.Logo&&c.jsx("img",{src:`data:image/png;base64,${btoa(String.fromCharCode(...k.Logo))}`,alt:"",className:"w-6 h-6 rounded"}),c.jsx("span",{className:"font-medium text-gray-900 dark:text-white truncate",children:k.Name||t("items.untitled")})]}),c.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:_>0?t("recentlyDeleted.daysRemaining",{count:_}):c.jsx("span",{className:"text-red-500",children:t("recentlyDeleted.expiringSoon")})})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{onClick:()=>N(k.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:t("recentlyDeleted.restore")}),c.jsx("button",{onClick:()=>{m(k.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:t("common.delete")})]})]})})},k.Id)})})]}),c.jsx(tp,{isOpen:f&&!!d,onClose:B,onConfirm:T,title:t("recentlyDeleted.confirmDeleteTitle"),message:t("recentlyDeleted.confirmDeleteMessage"),confirmText:t("recentlyDeleted.deletePermanently")}),c.jsx(tp,{isOpen:A,onClose:()=>p(!1),onConfirm:L,title:t("recentlyDeleted.confirmEmptyAllTitle"),message:t("recentlyDeleted.confirmEmptyAllMessage",{count:s.length}),confirmText:t("recentlyDeleted.emptyAll")})]})},Pw=({isOpen:t,origin:e,onChoice:n,onCancel:i})=>{const{t:s}=nt();return c.jsxs($n,{isOpen:t,onClose:i,title:s("passkeys.useBrowserPasskey"),showCloseButton:!0,children:[c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:s("passkeys.bypass.description",{origin:e})}),c.jsxs("div",{className:"space-y-3",children:[c.jsx(Sa,{variant:"primary",onClick:()=>n("once"),children:s("passkeys.bypass.thisTimeOnly")}),c.jsx(Sa,{variant:"secondary",onClick:()=>n("always"),children:s("passkeys.bypass.alwaysForSite")}),c.jsx(Sa,{variant:"secondary",onClick:i,children:s("common.cancel")})]})]})};function Hw(t={}){const{enabled:e=!0}=t,n=an(),i=Ha(),{dbInitialized:s,dbAvailable:l}=ea();return b.useEffect(()=>{if(!(!e||!s)&&!l){const d=`${n.pathname}${n.search}`;lt.setPendingRedirectUrl(d),i("/unlock")}},[e,s,l,n,i]),{isLocked:s&&!l}}async function xj(){const t=await lt.getPendingRedirectUrl();return t&&await lt.setPendingRedirectUrl(null),t}async function Tj(){await lt.setPendingRedirectUrl(null)}var zw=(t=>(t.DEFAULT="default",t.URL_EXACT="url_exact",t.URL_SUBDOMAIN="url_subdomain",t))(zw||{});let vh=null;async function Kp(){return vh||(vh=(async()=>{const t=Mo.runtime.getURL("src/aliasvault_core_bg.wasm"),e=await(await fetch(t)).arrayBuffer();await Sp(e)})()),vh}function kj(t,e){var i;const n=(i=t.Fields)==null?void 0:i.find(s=>s.FieldKey===e);return n?Array.isArray(n.Value)?n.Value.filter(s=>s&&s.length>0):n.Value?[n.Value]:[]:[]}async function Lj(t,e,n,i="default"){await Kp();const s=t.map(d=>({Id:d.Id,ItemName:d.Name??"",ItemUrls:kj(d,mn.LoginUrl)}));return gB({credentials:s,current_url:e,page_title:n,matching_mode:i}).matched_ids.map(d=>t.find(m=>m.Id===d)).filter(d=>d!==void 0)}async function Gp(t){return await Kp(),uB(t)}async function qp(t){return await Kp(),mB(t)}const Xe=class Xe{constructor(){}static async createPasskey(e,n,i){var X,ue,W,ae,be;Xe.pickSupportedAlgorithm(n.publicKey.pubKeyCredParams);const s=((X=n.publicKey.rp)==null?void 0:X.id)||new URL(n.origin).hostname,l=new Uint8Array(await crypto.subtle.digest("SHA-256",Xe.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=Xe.toB64u(e),A=Xe.buildCoseEc2Es256(m);let p=65;const v=(ue=n.publicKey.authenticatorSelection)==null?void 0:ue.userVerification,I=!!(i!=null&&i.uvPerformed);(v==="required"||v==="preferred"&&I)&&(p|=4),p|=8,p|=16;const x=new Uint8Array([0,0,0,0]),N=new Uint8Array([e.length>>8&255,e.length&255]),T=Xe.concat(Xe.AAGUID,N,e,A),L=Xe.concat(l,new Uint8Array([p]),x,T),k={type:"webauthn.create",challenge:Xe.challengeToB64u(n.publicKey.challenge),origin:n.origin,crossOrigin:!1},F=JSON.stringify(k),_=Xe.te(F),V=n.publicKey.attestation||"none",U=V==="none"||V==="indirect"?Xe.buildAttObjNone(L):await Xe.buildAttObjPackedSelf(L,_,d.privateKey);let O=null;(W=n.publicKey.user)!=null&&W.id&&(O=typeof n.publicKey.user.id=="string"?n.publicKey.user.id:Xe.toB64(n.publicKey.user.id instanceof Uint8Array?n.publicKey.user.id:new Uint8Array(n.publicKey.user.id)));let z,Q=!1,K;if(i!=null&&i.enablePrf){const se=new Uint8Array(32);if(crypto.getRandomValues(se),z=Xe.toB64u(se),Q=!0,i!=null&&i.prfInputs){const P=Xe.fromB64u(i.prfInputs.first);if(K={first:await Xe.evaluatePrf(se,P)},i.prfInputs.second){const q=Xe.fromB64u(i.prfInputs.second);K.second=await Xe.evaluatePrf(se,q)}}}const te={rpId:s,credentialId:g,publicKey:m,privateKey:f,userId:O,userName:(ae=n.publicKey.user)==null?void 0:ae.name,userDisplayName:(be=n.publicKey.user)==null?void 0:be.displayName,prfSecret:z};return{credential:{id:g,rawId:g,response:{clientDataJSON:Xe.toB64u(_),attestationObject:Xe.toB64u(U)},type:"public-key"},stored:te,prfEnabled:Q,prfResults:K}}static async getAssertion(e,n,i){const s=n,l=e.publicKey.rpId||new URL(e.origin).hostname,d=new Uint8Array(await crypto.subtle.digest("SHA-256",Xe.te(l)));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 A=new Uint8Array([0,0,0,0]),p=Xe.concat(d,new Uint8Array([m]),A),I={type:"webauthn.get",challenge:Xe.challengeToB64u(e.publicKey.challenge),origin:e.origin,crossOrigin:!1},x=JSON.stringify(I),N=Xe.te(x),T=new Uint8Array(await crypto.subtle.digest("SHA-256",N)),L=Xe.concat(p,T),B=await crypto.subtle.importKey("jwk",s.privateKey,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]),k=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},B,L)),F=Xe.ecdsaRawToDer(k);let _=null;s.userId&&(_=s.userId.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""));let V;if(i!=null&&i.prfInputs&&s.prfSecret){const U=Xe.fromB64u(s.prfSecret);if(V={first:await Xe.evaluatePrf(U,i.prfInputs.first)},i.prfInputs.second){const z=await Xe.evaluatePrf(U,i.prfInputs.second);V.second=z}}return{id:s.credentialId,rawId:s.credentialId,clientDataJSON:Xe.toB64u(N),authenticatorData:Xe.toB64u(p),signature:Xe.toB64u(F),userHandle:_,prfResults:V}}static async evaluatePrf(e,n){const i=n instanceof Uint8Array?n:new Uint8Array(n),s=Xe.te("WebAuthn PRF\0"),l=Xe.concat(s,i),d=await crypto.subtle.digest("SHA-256",l),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 n=Xe.pad32(Xe.fromB64u(e.x)),i=Xe.pad32(Xe.fromB64u(e.y));return new Uint8Array([165,1,2,3,38,32,1,33,88,32,...n,34,88,32,...i])}static buildAttObjNone(e){const n=Xe.cborText("fmt"),i=Xe.cborText("none"),s=Xe.cborText("attStmt"),l=new Uint8Array([160]),d=Xe.cborText("authData"),m=Xe.cborBstr(e);return Xe.concat(new Uint8Array([163]),n,i,s,l,d,m)}static async buildAttObjPackedSelf(e,n,i){const s=new Uint8Array(await crypto.subtle.digest("SHA-256",n)),l=Xe.concat(e,s),d=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},i,l)),m=Xe.ecdsaRawToDer(d),f=Xe.concat(Xe.cborText("alg"),new Uint8Array([38]),Xe.cborText("sig"),Xe.cborBstr(m)),g=Xe.concat(new Uint8Array([162]),f),A=Xe.cborText("fmt"),p=Xe.cborText("packed"),v=Xe.cborText("attStmt"),I=Xe.cborText("authData"),x=Xe.cborBstr(e);return Xe.concat(new Uint8Array([163]),A,p,v,g,I,x)}static cborText(e){const n=Xe.te(e);return n.length<=23?new Uint8Array([96|n.length,...n]):n.length<=255?new Uint8Array([120,n.length,...n]):new Uint8Array([121,n.length>>8&255,n.length&255,...n])}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 n=e.slice(0,32),i=e.slice(32,64),s=Xe.derInt(n),l=Xe.derInt(i);return new Uint8Array([48,s.length+l.length,...s,...l])}static derInt(e){let n=0;for(;n<e.length-1&&e[n]===0;)n++;let i=e.slice(n);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 n="";for(let i=0;i<e.length;i++)n+=String.fromCharCode(e[i]);return btoa(n)}static toB64u(e){return Xe.toB64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}static fromB64u(e){const n=e.replace(/-/g,"+").replace(/_/g,"/"),i=n.length%4===2?"==":n.length%4===3?"=":"",s=atob(n+i),l=new Uint8Array(s.length);for(let d=0;d<s.length;d++)l[d]=s.charCodeAt(d);return l}static challengeToB64u(e){if(typeof e=="string")return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");const n=e instanceof Uint8Array?e:new Uint8Array(e);return Xe.toB64u(n)}static pad32(e){if(e.length===32)return e;const n=new Uint8Array(32);return n.set(e,32-e.length),n}static concat(...e){const n=e.reduce((l,d)=>l+d.length,0),i=new Uint8Array(n);let s=0;for(const l of e)i.set(l,s),s+=l.length;return i}};qe(Xe,"AAGUID",new Uint8Array([161,26,95,170,159,50,75,140,140,93,47,125,19,232,201,66]));let _u=Xe;class un{constructor(){}static guidToBytes(e){const n=e.replace(/-/g,"");if(n.length!==32)throw new Error("Invalid GUID format");const i=new Uint8Array(16);for(let s=0;s<16;s++)i[s]=parseInt(n.substr(s*2,2),16);return i}static bytesToGuid(e){if(e.length!==16)throw new Error("Invalid byte length for GUID");const n=Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("");return[n.substr(0,8),n.substr(8,4),n.substr(12,4),n.substr(16,4),n.substr(20)].join("-").toUpperCase()}static bytesToBase64Url(e){let n="";return e.forEach(s=>n+=String.fromCharCode(s)),btoa(n).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),l=new Uint8Array(s.length);for(let d=0;d<s.length;d++)l[d]=s.charCodeAt(d);return l}static guidToBase64url(e){return this.bytesToBase64Url(this.guidToBytes(e))}static base64urlToGuid(e){return this.bytesToGuid(this.base64UrlToBytes(e))}static arrayBufferToBase64(e){const n=new Uint8Array(e);let i="";for(let s=0;s<n.length;s++)i+=String.fromCharCode(n[s]);return btoa(i)}static bytesToBase64url(e){const n=e instanceof Uint8Array?e:new Uint8Array(e);return this.bytesToBase64Url(n)}static base64urlToBytes(e){return this.base64UrlToBytes(e)}}const Dj=()=>{const{t}=nt(),e=an(),{setIsInitialLoading:n}=wa(),i=ea(),[s,l]=b.useState(null),[d,m]=b.useState(!1),[f,g]=b.useState(null),[A,p]=b.useState([]),[v,I]=b.useState(!1),{isLocked:x}=Hw(),N=b.useRef(null);b.useEffect(()=>{(async()=>{if(!i.dbInitialized||x)return;const V=new URLSearchParams(e.search).get("requestId");if(V)try{const U=await wt("GET_REQUEST_DATA",{requestId:V},"background");if(U&&U.type==="get"){l(U);const O=U.publicKey.rpId||new URL(U.origin).hostname,z=i.sqliteClient.passkeys.getByRpId(O);let Q=z;if(U.publicKey.allowCredentials&&U.publicKey.allowCredentials.length>0){const K=new Set(U.publicKey.allowCredentials.map(te=>{try{return un.base64urlToGuid(te.id)}catch(ee){return console.warn("Failed to convert credential ID to GUID:",te.id,ee),null}}).filter(te=>te!==null));Q=z.filter(te=>K.has(te.Id))}p(Q.map(K=>({id:K.Id,displayName:K.DisplayName,serviceName:K.ServiceName,rpId:K.RpId,username:K.Username})))}}catch(U){console.error("Failed to fetch request data:",U),g(t("common.errors.unknownError"))}n(!1)})()},[e,n,i.dbInitialized,x,i.sqliteClient,t]),b.useEffect(()=>{A.length>0&&N.current&&N.current.focus()},[A.length]),b.useEffect(()=>{const F=_=>{_.key==="Enter"&&!d&&A.length>0&&T(A[0].id)};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[d,A]);const T=async F=>{var _,V;if(!(!s||!i.sqliteClient)){m(!0),g(null);try{const U=i.sqliteClient.passkeys.getById(F);if(!U)throw new Error(t("common.errors.unknownError"));const O=JSON.parse(U.PublicKey),z=JSON.parse(U.PrivateKey);let Q;if(U.PrfKey)try{Q=un.bytesToBase64url(U.PrfKey)}catch(be){console.warn("Failed to convert PrfKey to base64url",be)}let K=null;if(U.UserHandle)try{const be=U.UserHandle instanceof Uint8Array?U.UserHandle:new Uint8Array(U.UserHandle);K=un.bytesToBase64url(be)}catch(be){console.warn("Failed to convert UserHandle to base64",be)}const te={rpId:U.RpId,credentialId:un.guidToBase64url(U.Id),publicKey:O,privateKey:z,userId:K,userName:U.Username??void 0,userDisplayName:U.ServiceName??void 0,prfSecret:Q},ee={origin:s.origin,requestId:s.requestId,publicKey:{rpId:s.publicKey.rpId,challenge:s.publicKey.challenge,userVerification:s.publicKey.userVerification}};let X;if((V=(_=s.publicKey.extensions)==null?void 0:_.prf)!=null&&V.eval){const be=s.publicKey.extensions.prf.eval.first;let se;if(typeof be=="object"&&be!==null&&!Array.isArray(be)){const P=Object.keys(be).map(Number).sort((q,Y)=>q-Y);se=new Uint8Array(P.length);for(let q=0;q<P.length;q++)se[q]=be[q]}else if(typeof be=="string"){const P=atob(be);se=new Uint8Array(P.length);for(let q=0;q<P.length;q++)se[q]=P.charCodeAt(q)}else throw new Error("Unknown PRF input format");if(X={first:se},s.publicKey.extensions.prf.eval.second){const P=s.publicKey.extensions.prf.eval.second;let q;if(typeof P=="object"&&P!==null&&!Array.isArray(P)){const Y=Object.keys(P).map(Number).sort((ne,Ie)=>ne-Ie);q=new Uint8Array(Y.length);for(let ne=0;ne<Y.length;ne++)q[ne]=P[ne]}else if(typeof P=="string"){const Y=atob(P);q=new Uint8Array(Y.length);for(let ne=0;ne<Y.length;ne++)q[ne]=Y.charCodeAt(ne)}else throw console.error("[PasskeyAuth] Unknown PRF second input type:",typeof P),new Error("Unknown PRF second input format");X.second=q}}const ue=await _u.getAssertion(ee,te,{uvPerformed:!0,includeBEBS:!0,prfInputs:X});let W;ue.prfResults&&(W={first:un.arrayBufferToBase64(ue.prfResults.first)},ue.prfResults.second&&(W.second=un.arrayBufferToBase64(ue.prfResults.second)));const ae={id:ue.id,rawId:ue.rawId,clientDataJSON:ue.clientDataJSON,authenticatorData:ue.authenticatorData,signature:ue.signature,userHandle:ue.userHandle,prfResults:W};await wt("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,credential:ae},"background")}catch(U){console.error("PasskeyAuthenticate: Error during authentication",U),m(!1),g(t("common.errors.unknownError"))}}},L=async()=>{I(!0)},B=async F=>{if(s){if(F==="always"){const _=new URL(s.origin).hostname,V=await qp(await Gp(_)),U=await lt.getPasskeyDisabledSites();U.includes(V)||(U.push(V),await lt.setPasskeyDisabledSites(U))}await wt("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,fallback:!0},"background")}},k=async()=>{s&&await wt("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,cancelled:!0},"background")};return s?c.jsxs(c.Fragment,{children:[c.jsx(Pw,{isOpen:v&&!!s,origin:s?new URL(s.origin).hostname:"",onChoice:B,onCancel:()=>I(!1)}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t("passkeys.authenticate.title")}),c.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[t("passkeys.authenticate.signInFor")," ",c.jsx("strong",{children:s.origin})]})]}),f&&c.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:c.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:f})}),c.jsx("div",{className:"space-y-4",children:A&&A.length>0?c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:t("passkeys.authenticate.selectPasskey")}),c.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:A.map((F,_)=>c.jsxs("div",{ref:_===0?N:null,tabIndex:0,className:"p-3 rounded-lg border cursor-pointer transition-colors bg-white border-gray-200 hover:bg-gray-100 hover:border-gray-300 dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:border-gray-500 focus:outline-none focus:ring-1 focus:ring-primary-500 focus:border-primary-500",onClick:()=>!d&&T(F.id),onKeyDown:V=>{V.key==="Enter"&&!d&&T(F.id)},children:[c.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:F.serviceName}),c.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:c.jsx("span",{className:"truncate",children:F.displayName})})]},F.id))})]}):c.jsx("div",{className:"text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg",children:c.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:t("passkeys.authenticate.noPasskeysFound")})})}),c.jsxs("div",{className:"space-y-3",children:[c.jsx(Sa,{variant:"secondary",onClick:L,children:t("passkeys.useBrowserPasskey")}),c.jsx(Sa,{variant:"secondary",onClick:k,children:t("common.cancel")})]})]})]}):c.jsx("div",{className:"flex justify-center py-8",children:c.jsx(ur,{})})},Ih=({variant:t,children:e,className:n=""})=>{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 c.jsx("div",{className:`p-3 border rounded-lg ${i[t]} ${n}`,children:c.jsx("p",{className:"text-sm",children:e})})},Rj=()=>{var P,q;const{t}=nt(),e=an(),{setIsInitialLoading:n}=wa(),i=ea(),s=Vr(),{executeVaultMutationAsync:l}=Fs(),[d,m]=b.useState(null),[f,g]=b.useState(""),[A,p]=b.useState(null),{isLocked:v}=Hw(),[I,x]=b.useState([]),[N,T]=b.useState([]),[L,B]=b.useState(null),[k,F]=b.useState(null),[_,V]=b.useState(!1),[U,O]=b.useState(!1),[z,Q]=b.useState(!1),K=b.useRef(null),te=b.useRef(null);b.useEffect(()=>{(async()=>{var ce,Ee,Ne,we,Oe,ze,Et,ht;if(!i.dbInitialized||v)return;const Ie=new URLSearchParams(e.search).get("requestId");if(Ie)try{const it=await wt("GET_REQUEST_DATA",{requestId:Ie},"background");if(it&&it.type==="create"){m(it);const Ge=((Ee=(ce=it.publicKey)==null?void 0:ce.rp)==null?void 0:Ee.name)||((we=(Ne=it.publicKey)==null?void 0:Ne.rp)==null?void 0:we.id)||"Passkey";g(Ge);const Ft=((ze=(Oe=it.publicKey)==null?void 0:Oe.rp)==null?void 0:ze.id)||new URL(it.origin).hostname;if(i.sqliteClient){const Se=i.sqliteClient.passkeys.getByRpId(Ft);let Fe=Se;if(((Et=it.publicKey.user)!=null&&Et.id||(ht=it.publicKey.user)!=null&&ht.name)&&(Fe=Se.filter(he=>{var De;if((De=it.publicKey.user)!=null&&De.id&&he.UserHandle)try{const Ve=un.base64urlToBytes(it.publicKey.user.id),He=he.UserHandle instanceof Uint8Array?he.UserHandle:new Uint8Array(he.UserHandle);if(Ve.length===He.length&&Ve.every((tt,It)=>tt===He[It]))return!0}catch{}return!1})),x(Fe),Fe.length===0){const De=i.sqliteClient.items.getAll().filter(He=>{const tt=Kd(He,mn.LoginUsername),It=Kd(He,mn.LoginPassword);return!tt&&!It?!1:!He.HasPasskey});let Ve=[];De.length>0&&(Ve=await Lj(De,it.origin,it.publicKey.rp.name||"",zw.URL_SUBDOMAIN),T(Ve)),Ve.length===0&&V(!0)}}else V(!0)}}catch(it){console.error("Failed to fetch request data:",it),p(t("common.errors.unknownError"))}n(!1)})()},[e,n,i.dbInitialized,i.sqliteClient,v,t]),b.useEffect(()=>{_&&te.current?te.current.focus():!_&&I.length>0&&K.current&&K.current.focus()},[_,I.length]),b.useEffect(()=>{const Y=ne=>{ne.key==="Enter"&&!U&&_&&W()};return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[_,U]);const ee=()=>{B(null),F(null),V(!0)},X=Y=>{B(Y),F(null),V(!0)},ue=Y=>{F(Y),B(null),V(!0)},W=async()=>{var Y,ne;if(!(!d||!i.sqliteClient)){p(null);try{let Ie;if(d.origin){O(!0);try{const De=new Promise((tt,It)=>setTimeout(()=>It(new Error("Favicon extraction timed out")),5e3)),Ve=s.get("Favicon/Extract?url="+d.origin),He=await Promise.race([Ve,De]);if(He!=null&&He.image){const tt=atob(He.image),It=new Uint8Array(tt.length);for(let Ot=0;Ot<tt.length;Ot++)It[Ot]=tt.charCodeAt(Ot);Ie=It}}catch{}}const ce={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}},Ee=crypto.randomUUID().toUpperCase(),Ne=un.guidToBytes(Ee),we=un.guidToBase64url(Ee),Oe=(ne=(Y=d.publicKey)==null?void 0:Y.extensions)==null?void 0:ne.prf,ze=!!Oe,Et=Oe==null?void 0:Oe.eval,ht=await _u.createPasskey(Ne,ce,{uvPerformed:!0,credentialIdBytes:16,enablePrf:ze,prfInputs:Et}),{credential:it,stored:Ge,prfEnabled:Ft,prfResults:Se}=ht;await l(async()=>{if(L){const De=i.sqliteClient.passkeys.getById(L);if(De){const Ve=i.sqliteClient.items.getById(De.ItemId);Ve&&await i.sqliteClient.items.update({...Ve,Name:f,Logo:Ie??Ve.Logo,Fields:[...(Ve.Fields||[]).filter(tt=>tt.FieldKey!==mn.LoginUrl&&tt.FieldKey!==mn.LoginUsername),Gd(mn.LoginUrl,{value:d.origin}),Gd(mn.LoginUsername,{value:d.publicKey.user.name})]},[],[]),await i.sqliteClient.passkeys.deleteById(L);let He=null;if(Ge.userId)try{He=un.base64urlToBytes(Ge.userId)}catch{He=null}await i.sqliteClient.passkeys.create({Id:Ee,ItemId:De.ItemId,RpId:Ge.rpId,UserHandle:He,PublicKey:JSON.stringify(Ge.publicKey),PrivateKey:JSON.stringify(Ge.privateKey),DisplayName:d.publicKey.user.displayName||d.publicKey.user.name||"",PrfKey:Ge.prfSecret?un.base64urlToBytes(Ge.prfSecret):void 0,AdditionalData:null})}}else if(k){let De=null;if(Ge.userId)try{De=un.base64urlToBytes(Ge.userId)}catch{De=null}await i.sqliteClient.passkeys.create({Id:Ee,ItemId:k,RpId:Ge.rpId,UserHandle:De,PublicKey:JSON.stringify(Ge.publicKey),PrivateKey:JSON.stringify(Ge.privateKey),DisplayName:d.publicKey.user.displayName||d.publicKey.user.name||"",PrfKey:Ge.prfSecret?un.base64urlToBytes(Ge.prfSecret):void 0,AdditionalData:null})}else{const De={Id:"",Name:f,ItemType:va.Login,Logo:Ie,Fields:[Gd(mn.LoginUrl,{value:d.origin}),Gd(mn.LoginUsername,{value:d.publicKey.user.name})],CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString()},Ve=await i.sqliteClient.items.create(De,[]);let He=null;if(Ge.userId)try{He=un.base64urlToBytes(Ge.userId)}catch{He=null}await i.sqliteClient.passkeys.create({Id:Ee,ItemId:Ve,RpId:Ge.rpId,UserHandle:He,PublicKey:JSON.stringify(Ge.publicKey),PrivateKey:JSON.stringify(Ge.privateKey),DisplayName:d.publicKey.user.displayName||d.publicKey.user.name||"",PrfKey:Ge.prfSecret?un.base64urlToBytes(Ge.prfSecret):void 0,AdditionalData:null})}});let Fe;Ft&&(Fe={prf:{enabled:!0,results:Se?{first:un.bytesToBase64url(new Uint8Array(Se.first)),second:Se.second?un.bytesToBase64url(new Uint8Array(Se.second)):void 0}:void 0}});const he={id:we,rawId:we,clientDataJSON:it.response.clientDataJSON,attestationObject:it.response.attestationObject,extensions:Fe};await wt("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,credential:he},"background"),O(!1)}catch(Ie){console.error("PasskeyCreate: Error creating passkey",Ie),p(t("common.errors.unknownError"))}}},ae=async()=>{Q(!0)},be=async Y=>{if(d){if(Y==="always"){const ne=new URL(d.origin).hostname,Ie=await qp(await Gp(ne)),ce=await lt.getPasskeyDisabledSites();ce.includes(Ie)||(ce.push(Ie),await lt.setPasskeyDisabledSites(ce))}await wt("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,fallback:!0},"background")}},se=async()=>{d&&await wt("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,cancelled:!0},"background")};return d?c.jsxs(c.Fragment,{children:[c.jsx(Pw,{isOpen:z&&!!d,origin:d?new URL(d.origin).hostname:"",onChoice:be,onCancel:()=>Q(!1)}),U&&c.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:c.jsx(ur,{})}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t("passkeys.create.title")}),c.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[t("passkeys.create.createFor")," ",c.jsx("strong",{children:d.origin})]})]}),A&&c.jsx(Ih,{variant:"error",children:A}),!_&&I.length>0&&c.jsxs("div",{className:"space-y-4",children:[c.jsx(Sa,{variant:"primary",onClick:ee,ref:K,children:t("passkeys.create.createNewPasskey")}),c.jsx(Sa,{variant:"secondary",onClick:ae,children:t("passkeys.useBrowserPasskey")}),c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"absolute inset-0 flex items-center",children:c.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),c.jsx("div",{className:"relative flex justify-center text-sm",children:c.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:t("common.or")})})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:t("passkeys.create.selectPasskeyToReplace")}),c.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:I.map(Y=>c.jsx("button",{onClick:()=>X(Y.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:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:Y.ServiceName}),c.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:c.jsx("span",{className:"truncate",children:Y.DisplayName})})]}),c.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},Y.Id))})]}),c.jsx(Sa,{variant:"secondary",onClick:se,children:t("common.cancel")})]}),!_&&I.length===0&&N.length>0&&c.jsxs("div",{className:"space-y-4",children:[c.jsx(Sa,{variant:"primary",onClick:ee,ref:K,children:t("passkeys.create.createNewPasskey")}),c.jsx(Sa,{variant:"secondary",onClick:ae,children:t("passkeys.useBrowserPasskey")}),c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"absolute inset-0 flex items-center",children:c.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),c.jsx("div",{className:"relative flex justify-center text-sm",children:c.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:t("common.or")})})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:t("passkeys.create.selectExistingLogin")}),c.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:t("passkeys.create.selectExistingLoginDescription")}),c.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto border rounded-lg p-2 bg-gray-50 dark:bg-gray-800",children:N.map(Y=>c.jsx("button",{onClick:()=>ue(Y.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:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("div",{className:"flex items-center flex-1 min-w-0",children:c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:Y.Name}),Kd(Y,mn.LoginUsername)&&c.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:Kd(Y,mn.LoginUsername)})]})}),c.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:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},Y.Id))})]}),c.jsx(Sa,{variant:"secondary",onClick:se,children:t("common.cancel")})]}),_&&c.jsxs("div",{className:"space-y-4",children:[L&&c.jsx(Ih,{variant:"warning",children:t("passkeys.create.replacingPasskey",{displayName:((P=I.find(Y=>Y.Id===L))==null?void 0:P.DisplayName)||""})}),k&&c.jsx(Ih,{variant:"info",children:t("passkeys.create.attachingToCredential",{serviceName:((q=N.find(Y=>Y.Id===k))==null?void 0:q.Name)||""})}),!k&&c.jsx(Dc,{id:"displayName",label:t("passkeys.create.titleLabel"),value:f,onChange:g,placeholder:t("passkeys.create.titlePlaceholder"),ref:te}),c.jsxs("div",{className:"space-y-3",children:[c.jsx(Sa,{variant:"primary",onClick:W,children:t(L?"passkeys.create.confirmReplace":k?"passkeys.create.attachPasskey":"passkeys.create.createButton")}),I.length>0||N.length>0?c.jsx(Sa,{variant:"secondary",onClick:()=>{V(!1),B(null),F(null)},children:t("common.back")}):c.jsxs(c.Fragment,{children:[c.jsx(Sa,{variant:"secondary",onClick:ae,children:t("passkeys.useBrowserPasskey")}),c.jsx(Sa,{variant:"secondary",onClick:se,children:t("common.cancel")})]})]})]})]})]}):c.jsx("div",{className:"flex justify-center py-8",children:c.jsx(ur,{})})},Bj=()=>({matchCurrentTab:b.useCallback(async()=>{try{const[e]=await Mo.tabs.query({active:!0,currentWindow:!0});if(!(e!=null&&e.url)||!e.url.startsWith("http://")&&!e.url.startsWith("https://"))return null;let n="";try{n=new URL(e.url).hostname.replace(/^www\./,"")}catch{return null}const i=await lt.getAutofillMatchingMode(),s=await wt("GET_FILTERED_ITEMS",{currentUrl:e.url,pageTitle:e.title||"",matchingMode:i},"background");return!s.success||!s.items?null:{items:s.items,currentUrl:e.url,domain:n}}catch(e){return console.error("Error matching current tab:",e),null}},[])}),hv="session:lastVisitedPage",pv="session:lastVisitedTime",Av="session:navigationHistory",yv="session:lastTabUrl",Uj=120*1e3,Mj=()=>{const t=Ha(),{setIsInitialLoading:e}=wa(),{syncVault:n}=xp(),{matchCurrentTab:i}=Bj(),s=b.useRef(!1),{isInitialized:l,isLoggedIn:d}=Ir(),{dbInitialized:m,dbAvailable:f,refreshSyncState:g,hasPendingMigrations:A}=ea(),p=l&&m,v=p&&(!d||!f),I=b.useCallback(T=>T&&T.items.length===1?`/items/${T.items[0].Id}`:(T&&T.items.length>1,"/items"),[]),x=b.useCallback(async T=>{T&&T.items.length===1?(t("/items",{replace:!0}),t(`/items/${T.items[0].Id}`,{replace:!1})):T&&T.items.length>1?t(`/items?search=${encodeURIComponent(T.domain)}`,{replace:!0}):t("/items",{replace:!0})},[t]),N=b.useCallback(async()=>{const T=await i(),L=I(T),[B,k,F,_]=await Promise.all([Te.getItem(hv),Te.getItem(pv),Te.getItem(Av),Te.getItem(yv)]),V=T==null?void 0:T.currentUrl,U=V&&_&&V!==_;if(B&&k&&Date.now()-k<=Uj){const z=F==null?void 0:F[F.length-1],Q=(z==null?void 0:z.search)&&z.search.length>0;if(!(U||B===L&&!Q||B==="/items"&&!Q)){if((F==null?void 0:F.length)>1){const X=F[0],ue=X.pathname+(X.search||"");t(ue,{replace:!0});const W=B+((z==null?void 0:z.search)||"");t(W,{replace:!1})}else{const X=B+((z==null?void 0:z.search)||"");t(X,{replace:!0})}return}}await Promise.all([Te.removeItem(hv),Te.removeItem(pv),Te.removeItem(Av),wt("CLEAR_PERSISTED_FORM_VALUES",null,"background")]),V&&await Te.setItem(yv,V),await x(T)},[t,i,I,x]);return b.useEffect(()=>{(async()=>{const B=new URLSearchParams(window.location.search).get("mode")==="inline_unlock",k=await xj();if(!p)return;const F=!s.current;if(v)e(!1),d?f||t("/unlock",{replace:!0}):t("/login",{replace:!0});else if(F){if(s.current=!0,await A()){e(!1),t("/upgrade",{replace:!0});return}e(!1),B?t("/unlock-success",{replace:!0}):k?t(k,{replace:!0}):await N(),n({onSuccess:async _=>{await g()},onUpgradeRequired:()=>{t("/upgrade",{replace:!0})},onError:_=>{console.error("Background vault sync error:",_)}})}else e(!1),N()})()},[p,v,d,f,t,e,n,N,g,A]),null},_j=()=>{const{t}=nt(),{setIsInitialLoading:e}=wa(),[n,i]=b.useState(!1),[s,l]=b.useState({disabledUrls:[],temporaryDisabledUrls:{},isGloballyEnabled:!0}),[d,m]=b.useState(ec.DEFAULT),[f,g]=b.useState({isEnabled:!1,blockedDomains:[]}),[A,p]=b.useState(!1),[v,I]=b.useState(!1),x=b.useCallback(async()=>{const U=await lt.getDisabledSites(),O=await lt.getTemporaryDisabledSites(),z=await lt.getGlobalAutofillPopupEnabled(),Q=Date.now(),K=Object.fromEntries(Object.entries(O).filter(([ue,W])=>W>Q));Object.keys(K).length!==Object.keys(O).length&&await lt.setTemporaryDisabledSites(K);const te=await lt.getAutofillMatchingMode();m(te);const ee=await lt.getLoginSaveEnabled(),X=await lt.getLoginSaveBlockedDomains();g({isEnabled:ee,blockedDomains:X}),l({disabledUrls:U,temporaryDisabledUrls:K,isGloballyEnabled:z}),i(!0),e(!1)},[e]);b.useEffect(()=>{x()},[x]);const N=async()=>{await lt.setDisabledSites([]),await lt.setTemporaryDisabledSites({}),l(U=>({...U,disabledUrls:[],temporaryDisabledUrls:{}}))},T=async()=>{const U=!s.isGloballyEnabled;await lt.setGlobalAutofillPopupEnabled(U),l(O=>({...O,isGloballyEnabled:U}))},L=async U=>{await lt.setAutofillMatchingMode(U),m(U)},B=async()=>{const U=!f.isEnabled;await lt.setLoginSaveEnabled(U),g(O=>({...O,isEnabled:U}))},k=async U=>{const O=f.blockedDomains.filter(z=>z!==U);await lt.setLoginSaveBlockedDomains(O),g(z=>({...z,blockedDomains:O}))},F=async()=>{await lt.setLoginSaveBlockedDomains([]),g(U=>({...U,blockedDomains:[]}))},_=async U=>{const O=s.disabledUrls.filter(Q=>Q!==U);await lt.setDisabledSites(O);const z={...s.temporaryDisabledUrls};delete z[U],await lt.setTemporaryDisabledSites(z),l(Q=>({...Q,disabledUrls:O,temporaryDisabledUrls:z}))},V=()=>{const U=s.disabledUrls.length,O=Object.keys(s.temporaryDisabledUrls).length;return U+O};return n?c.jsxs("div",{className:"space-y-6",children:[c.jsx("section",{children:c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsxs("div",{className:"p-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.autofillPopup")}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 me-2",children:t("settings.autofillPopupDescription")})]}),c.jsx("button",{onClick:T,className:`px-4 py-2 rounded-md transition-colors ${s.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:s.isGloballyEnabled?t("common.enabled"):t("common.disabled")})]}),V()>0&&c.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[c.jsxs("button",{onClick:()=>p(!A),className:"flex items-center justify-between w-full text-left",children:[c.jsxs("span",{className:"font-medium text-gray-900 dark:text-white",children:[t("settings.disabledSites")," (",V(),")"]}),c.jsx("svg",{className:`w-5 h-5 text-gray-500 transition-transform ${A?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t("settings.disabledSitesDescription")}),A&&c.jsxs("div",{className:"mt-3",children:[c.jsxs("ul",{className:"space-y-2",children:[s.disabledUrls.map(U=>c.jsxs("li",{className:"flex items-center justify-between bg-gray-50 dark:bg-gray-700 rounded-md px-3 py-2",children:[c.jsx("span",{className:"text-sm text-gray-900 dark:text-white truncate",children:U}),c.jsx("button",{onClick:()=>_(U),className:"text-sm text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 ml-2",children:t("common.remove")})]},U)),Object.entries(s.temporaryDisabledUrls).map(([U,O])=>c.jsxs("li",{className:"flex items-center justify-between bg-gray-50 dark:bg-gray-700 rounded-md px-3 py-2",children:[c.jsxs("div",{className:"truncate",children:[c.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:U}),c.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:["(",t("settings.temporaryUntil")," ",new Date(O).toLocaleTimeString(),")"]})]}),c.jsx("button",{onClick:()=>_(U),className:"text-sm text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 ml-2",children:t("common.remove")})]},U))]}),c.jsx("button",{onClick:N,className:"w-full mt-3 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:t("settings.clearAllDisabledSites")})]})]})]})})}),c.jsx("section",{children:c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsxs("div",{className:"p-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.loginSave.title")}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 me-2",children:t("settings.loginSave.description")})]}),c.jsx("button",{onClick:B,className:`px-4 py-2 rounded-md transition-colors ${f.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:f.isEnabled?t("common.enabled"):t("common.disabled")})]}),f.blockedDomains.length>0&&c.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[c.jsxs("button",{onClick:()=>I(!v),className:"flex items-center justify-between w-full text-left",children:[c.jsxs("span",{className:"font-medium text-gray-900 dark:text-white",children:[t("settings.loginSave.blockedSites")," (",f.blockedDomains.length,")"]}),c.jsx("svg",{className:`w-5 h-5 text-gray-500 transition-transform ${v?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t("settings.loginSave.blockedSitesDescription")}),v&&c.jsxs("div",{className:"mt-3",children:[c.jsx("ul",{className:"space-y-2",children:f.blockedDomains.map(U=>c.jsxs("li",{className:"flex items-center justify-between bg-gray-50 dark:bg-gray-700 rounded-md px-3 py-2",children:[c.jsx("span",{className:"text-sm text-gray-900 dark:text-white truncate",children:U}),c.jsx("button",{onClick:()=>k(U),className:"text-sm text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 ml-2",children:t("common.remove")})]},U))}),c.jsx("button",{onClick:F,className:"w-full mt-3 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:t("settings.loginSave.clearAllBlockedSites")})]})]})]})})}),c.jsxs("section",{children:[c.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.autofillMatching")}),c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsx("div",{className:"p-4",children:c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.autofillMatchingMode")}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.autofillMatchingModeDescription")}),c.jsxs("select",{value:d,onChange:U=>L(U.target.value),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[c.jsx("option",{value:ec.DEFAULT,children:t("settings.autofillMatchingDefault")}),c.jsx("option",{value:ec.URL_SUBDOMAIN,children:t("settings.autofillMatchingUrlSubdomain")}),c.jsx("option",{value:ec.URL_EXACT,children:t("settings.autofillMatchingUrlExact")})]})]})})})]})]}):null},Vw=({title:t,content:e,className:n=""})=>{const[i,s]=b.useState(!1);return c.jsxs(c.Fragment,{children:[c.jsx("button",{onClick:()=>s(!0),className:`${n}`,type:"button","aria-label":"Help",children:c.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:c.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"})})}),c.jsx($n,{isOpen:i,onClose:()=>s(!1),title:t,children:c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:e})})]})},Fj=()=>{const{t}=nt(),{setIsInitialLoading:e}=wa(),[n,i]=b.useState(0);b.useEffect(()=>{(async()=>{const d=await lt.getAutoLockTimeout();i(d),e(!1)})()},[e]);const s=async l=>{await lt.setAutoLockTimeout(l),await wt("SET_AUTO_LOCK_TIMEOUT",l,"background"),i(l)};return c.jsx("div",{className:"space-y-6",children:c.jsxs("section",{children:[c.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.autoLockTimeout")}),c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsx("div",{className:"p-4",children:c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center mb-2",children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.autoLockTimeout")}),c.jsx(Vw,{title:t("settings.autoLockTimeout"),content:t("settings.autoLockTimeoutHelp"),className:"ml-2"})]}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.autoLockTimeoutDescription")}),c.jsxs("select",{value:n,onChange:l=>s(Number(l.target.value)),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[c.jsx("option",{value:"0",children:t("settings.autoLockNever")}),c.jsx("option",{value:"15",children:t("settings.autoLock15Seconds")}),c.jsx("option",{value:"60",children:t("settings.autoLock1Minute")}),c.jsx("option",{value:"300",children:t("settings.autoLock5Minutes")}),c.jsx("option",{value:"900",children:t("settings.autoLock15Minutes")}),c.jsx("option",{value:"1800",children:t("settings.autoLock30Minutes")}),c.jsx("option",{value:"3600",children:t("settings.autoLock1Hour")}),c.jsx("option",{value:"14400",children:t("settings.autoLock4Hours")}),c.jsx("option",{value:"28800",children:t("settings.autoLock8Hours")}),c.jsx("option",{value:"86400",children:t("settings.autoLock24Hours")})]})]})})})]})})},Oj=()=>{const{t}=nt(),{setIsInitialLoading:e}=wa(),[n,i]=b.useState(10);b.useEffect(()=>{(async()=>{const d=await lt.getClipboardClearTimeout();i(d),e(!1)})()},[e]);const s=async l=>{await lt.setClipboardClearTimeout(l),await wt("SET_CLIPBOARD_CLEAR_TIMEOUT",l,"background"),i(l)};return c.jsx("div",{className:"space-y-6",children:c.jsxs("section",{children:[c.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.clipboardSettings")}),c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsx("div",{className:"p-4",children:c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.clipboardClearTimeout")}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.clipboardClearTimeoutDescription")}),c.jsxs("select",{value:n,onChange:l=>s(Number(l.target.value)),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[c.jsx("option",{value:"0",children:t("settings.clipboardClearDisabled")}),c.jsx("option",{value:"5",children:t("settings.clipboardClear5Seconds")}),c.jsx("option",{value:"10",children:t("settings.clipboardClear10Seconds")}),c.jsx("option",{value:"15",children:t("settings.clipboardClear15Seconds")})]})]})})})]})})},jj=()=>{const{t}=nt(),{setIsInitialLoading:e}=wa(),[n,i]=b.useState(!0),s=b.useCallback(async()=>{const d=await lt.getGlobalContextMenuEnabled();i(d),e(!1)},[e]);b.useEffect(()=>{s()},[s]);const l=async()=>{const d=!n;await lt.setGlobalContextMenuEnabled(d),await wt("TOGGLE_CONTEXT_MENU",{enabled:d},"background"),i(d)};return c.jsx("div",{className:"space-y-6",children:c.jsxs("section",{children:[c.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.contextMenu")}),c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsx("div",{className:"p-4",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.rightClickContextMenu")}),c.jsx("p",{className:`text-sm mt-1 ${n?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:t(n?"settings.contextMenuEnabled":"settings.contextMenuDisabled")}),c.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:t("settings.contextMenuDescription")})]}),c.jsx("button",{onClick:l,className:`px-4 py-2 rounded-md transition-colors ${n?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:t(n?"common.enabled":"common.disabled")})]})})})]})})},Pj=()=>{const{t}=nt(),{setIsInitialLoading:e}=wa(),n=ea(),{executeVaultMutationAsync:i}=Fs(),[s,l]=b.useState("en"),[d,m]=b.useState("random"),[f,g]=b.useState("random"),[A,p]=b.useState([]),[v,I]=b.useState([]),x=[{label:t("settings.identityGeneratorSettings.genderOptions.random"),value:"random"},{label:t("settings.identityGeneratorSettings.genderOptions.male"),value:"male"},{label:t("settings.identityGeneratorSettings.genderOptions.female"),value:"female"}];b.useEffect(()=>{const B=$O(),k=JO();if(p(B),I(k),n!=null&&n.sqliteClient){const F=n.sqliteClient.settings.getEffectiveIdentityLanguage(),_=n.sqliteClient.settings.getDefaultIdentityGender(),V=n.sqliteClient.settings.getDefaultIdentityAgeRange();l(F),m(_),g(V)}e(!1)},[n==null?void 0:n.sqliteClient,e]);const N=b.useCallback(async B=>{l(B),n!=null&&n.sqliteClient&&await i(async()=>{n.sqliteClient.settings.updateSetting("DefaultIdentityLanguage",B)})},[n==null?void 0:n.sqliteClient,i]),T=b.useCallback(async B=>{m(B),n!=null&&n.sqliteClient&&await i(async()=>{n.sqliteClient.settings.updateSetting("DefaultIdentityGender",B)})},[n==null?void 0:n.sqliteClient,i]),L=b.useCallback(async B=>{g(B),n!=null&&n.sqliteClient&&await i(async()=>{n.sqliteClient.settings.updateSetting("DefaultIdentityAgeRange",B)})},[n==null?void 0:n.sqliteClient,i]);return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("section",{children:[c.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.identityGeneratorSettings.languageSection")}),c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsxs("div",{className:"p-4",children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.identityGeneratorSettings.languageSection")}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.identityGeneratorSettings.languageDescription")}),c.jsx("select",{value:s,onChange:B=>N(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:A.map(B=>c.jsxs("option",{value:B.value,children:[B.flag," ",B.label]},B.value))})]})})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.identityGeneratorSettings.genderSection")}),c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsxs("div",{className:"p-4",children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.identityGeneratorSettings.genderSection")}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.identityGeneratorSettings.genderDescription")}),c.jsx("select",{value:d,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:x.map(B=>c.jsx("option",{value:B.value,children:B.label},B.value))})]})})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.identityGeneratorSettings.ageRangeSection")}),c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsxs("div",{className:"p-4",children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.identityGeneratorSettings.ageRangeSection")}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.identityGeneratorSettings.ageRangeDescription")}),c.jsx("select",{value:f,onChange:B=>L(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:v.map(B=>c.jsx("option",{value:B.value,children:B.value==="random"?t("settings.identityGeneratorSettings.genderOptions.random"):B.label},B.value))})]})})]})]})},Hj=()=>{const{t}=nt(),{setIsInitialLoading:e}=wa();return b.useEffect(()=>{e(!1)},[e]),c.jsx("div",{className:"space-y-6",children:c.jsxs("section",{children:[c.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.language")}),c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsx("div",{className:"p-4",children:c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-3",children:t("settings.selectLanguage")}),c.jsx(jI,{variant:"dropdown",size:"sm"})]})})})]})})},zj=()=>{const{t}=nt(),{setIsInitialLoading:e}=wa(),[n,i]=b.useState({disabledUrls:[],currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),s=async()=>{const g={active:!0,currentWindow:!0},[A]=await Mo.tabs.query(g);return A},l=b.useCallback(async()=>{const g=await s(),A=new URL(g.url??"").hostname,p=await qp(await Gp(A)),v=await lt.getPasskeyDisabledSites(),I=await lt.getPasskeyProviderEnabled(),x=!v.includes(p);i({disabledUrls:v,currentUrl:p,isEnabled:x,isGloballyEnabled:I}),e(!1)},[e]);b.useEffect(()=>{l()},[l]);const d=async()=>{const{currentUrl:g,disabledUrls:A,isEnabled:p}=n;let v=[...A];p?v.includes(g)||v.push(g):v=v.filter(I=>I!==g),await lt.setPasskeyDisabledSites(v),i(I=>({...I,disabledUrls:v,isEnabled:!p}))},m=async()=>{await lt.setPasskeyDisabledSites([]),i(g=>({...g,disabledUrls:[],isEnabled:!0}))},f=async()=>{const g=!n.isGloballyEnabled;await lt.setPasskeyProviderEnabled(g),i(A=>({...A,isGloballyEnabled:g}))};return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("section",{children:[c.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.globalSettings")}),c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsx("div",{className:"p-4",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("passkeys.settings.passkeyProvider")}),c.jsx("p",{className:`text-sm mt-1 ${n.isGloballyEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:n.isGloballyEnabled?t("settings.activeOnAllSites"):t("settings.disabledOnAllSites")})]}),c.jsx("button",{onClick:f,className:`px-4 py-2 rounded-md transition-colors ${n.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:n.isGloballyEnabled?t("common.enabled"):t("common.disabled")})]})})})]}),n.isGloballyEnabled&&c.jsxs("section",{children:[c.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.siteSpecificSettings")}),c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsxs("div",{className:"p-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:[t("passkeys.settings.passkeyProviderOn"),n.currentUrl]}),c.jsx("p",{className:`text-sm mt-1 ${n.isEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:n.isEnabled?t("settings.enabledForThisSite"):t("settings.disabledForThisSite")})]}),n.isGloballyEnabled&&c.jsx("button",{onClick:d,className:`px-4 py-2 ml-1 rounded-md transition-colors ${n.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:n.isEnabled?t("common.enabled"):t("common.disabled")})]}),c.jsx("div",{className:"mt-4",children:c.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:t("settings.resetAllSiteSettings")})})]})})]})]})},Ev="local:theme",Qw=b.createContext(void 0),Vj=({children:t})=>{const[e,n]=b.useState("system"),[i,s]=b.useState(!1);b.useEffect(()=>{(async()=>{const A=await d();n(A)})()},[]);const l=b.useCallback(g=>{n(g),m(g)},[]),d=async()=>await Te.getItem(Ev)||"system",m=async g=>{await Te.setItem(Ev,g)};b.useEffect(()=>{const g=()=>{if(e==="system"){const A=window.matchMedia("(prefers-color-scheme: dark)").matches;s(A),document.documentElement.classList.toggle("dark",A)}else{const A=e==="dark";s(A),document.documentElement.classList.toggle("dark",A)}};if(g(),e==="system"){const A=window.matchMedia("(prefers-color-scheme: dark)"),p=()=>g();return A.addEventListener("change",p),()=>A.removeEventListener("change",p)}},[e]);const f=b.useMemo(()=>({theme:e,setTheme:l,isDarkMode:i}),[e,i,l]);return c.jsx(Qw.Provider,{value:f,children:t})},Qj=()=>{const t=b.useContext(Qw);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t},Kj=()=>{var K,te;const{t}=nt(),{theme:e,setTheme:n}=Qj(),i=Ir(),s=Nc(),l=Vr(),{setHeaderButtons:d}=wr(),{setIsInitialLoading:m}=wa(),{loadApiUrl:f,getDisplayUrl:g}=GI(),A=Ha(),[p,v]=b.useState(!1),I=async()=>{const ee=await Te.getItem("local:clientUrl");let X=gn.DEFAULT_CLIENT_URL;ee&&ee.length>0&&(X=ee),window.open(X,"_blank")};b.useEffect(()=>{const ee=c.jsxs("div",{className:"flex items-center gap-2",children:[!Ua.isPopup()&&c.jsx(c.Fragment,{children:c.jsx(_n,{onClick:()=>Ua.openInNewPopup(),title:t("common.openInNewWindow"),iconType:Wa.EXPAND})}),c.jsx(_n,{onClick:I,title:t("settings.openWebApp"),iconType:Wa.EXTERNAL_LINK})]});return d(ee),()=>d(null)},[d,t]);const x=b.useCallback(async()=>{await f(),m(!1)},[m,f]);b.useEffect(()=>{x()},[x]);const N=async ee=>{n(ee)},T=()=>{v(!0)},L=async()=>{v(!1);try{await l.revokeTokens(),await s.clearAuthUserInitiated()}catch(ee){console.error("Error during logout:",ee)}},B=async()=>{await wt("LOCK_VAULT",{},"background"),A("/unlock")},k=()=>{A("/settings/autofill")},F=()=>{A("/settings/clipboard")},_=()=>{A("/settings/language")},V=()=>{A("/settings/auto-lock")},U=()=>{A("/settings/unlock-method")},O=()=>{A("/settings/context-menu")},z=()=>{A("/settings/passkeys")},Q=()=>{A("/settings/identity-generator")};return c.jsxs(c.Fragment,{children:[c.jsx(Np,{isOpen:p,onClose:()=>v(!1),onConfirm:L}),c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"flex justify-between items-center mb-4",children:c.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:t("common.settings")})}),c.jsx("section",{children:c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsx("div",{className:"p-4",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center space-x-3",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:c.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((te=(K=i.username)==null?void 0:K[0])==null?void 0:te.toUpperCase())||"?"})})}),c.jsxs("div",{children:[c.jsx("p",{className:"text font-medium text-gray-900 dark:text-white",children:i.username}),c.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t("common.loggedIn")})]})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:B,title:t("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:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":t("settings.lock"),children:c.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"})})}),c.jsx("button",{onClick:T,title:t("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:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":t("common.logout"),children:c.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"})})})]})]})})})}),c.jsx("section",{children:c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[c.jsxs("button",{onClick:k,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[c.jsxs("div",{className:"flex items-center",children:[c.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:c.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"})}),c.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.autofillSettings")})]}),c.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),c.jsxs("button",{onClick:z,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[c.jsxs("div",{className:"flex items-center",children:[c.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:c.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"})}),c.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.passkeySettings")})]}),c.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),c.jsxs("button",{onClick:U,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[c.jsxs("div",{className:"flex items-center",children:[c.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:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),c.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.unlockMethod.title")})]}),c.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),c.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:[c.jsxs("div",{className:"flex items-center",children:[c.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:c.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"})}),c.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.autoLockTimeout")})]}),c.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),c.jsxs("button",{onClick:F,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[c.jsxs("div",{className:"flex items-center",children:[c.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:c.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"})}),c.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.clipboardSettings")})]}),c.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),c.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:[c.jsxs("div",{className:"flex items-center",children:[c.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:c.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"})}),c.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.language")})]}),c.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})}),c.jsx("section",{children:c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[c.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:[c.jsxs("div",{className:"flex items-center",children:[c.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:c.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"})}),c.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.identityGenerator")})]}),c.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),c.jsxs("button",{onClick:O,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[c.jsxs("div",{className:"flex items-center",children:[c.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:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16m-7 6h7"})}),c.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.contextMenuSettings")})]}),c.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})}),c.jsxs("section",{children:[c.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.appearance")}),c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsx("div",{className:"p-4",children:c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.theme")}),c.jsxs("div",{className:"flex flex-col space-y-2",children:[c.jsxs("label",{className:"flex items-center",children:[c.jsx("input",{type:"radio",name:"theme",value:"system",checked:e==="system",onChange:()=>N("system"),className:"mr-2"}),c.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:t("settings.useDefault")})]}),c.jsxs("label",{className:"flex items-center",children:[c.jsx("input",{type:"radio",name:"theme",value:"light",checked:e==="light",onChange:()=>N("light"),className:"mr-2"}),c.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:t("settings.light")})]}),c.jsxs("label",{className:"flex items-center",children:[c.jsx("input",{type:"radio",name:"theme",value:"dark",checked:e==="dark",onChange:()=>N("dark"),className:"mr-2"}),c.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:t("settings.dark")})]})]})]})})})]}),!1,c.jsxs("div",{className:"text-center text-gray-400 dark:text-gray-600",children:[t("settings.versionPrefix"),gn.VERSION," (",g(),")"]})]})]})},Gj=()=>{const{t}=nt(),e=ea(),{setIsInitialLoading:n,showLoading:i,hideLoading:s}=wa(),[l,d]=b.useState(void 0),[m,f]=b.useState(null),[g,A]=b.useState(null),[p,v]=b.useState(!1),[I,x]=b.useState(1),[N,T]=b.useState(""),[L,B]=b.useState(""),[k,F]=b.useState(!1),_=b.useCallback(async()=>{try{const[Q,K]=await Promise.all([yI(),bI()]);d(Q),F(K),n(!1)}catch(Q){console.error("Failed to load PIN settings:",Q),f(t("common.errors.unknownErrorTryAgain")),n(!1)}},[n,t]);b.useEffect(()=>{_()},[_]);const V=()=>{if(f(null),A(null),!e.dbAvailable){f(t("common.errors.unknownErrorTryAgain"));return}x(1),T(""),B(""),v(!0)},U=Q=>{if(Q.preventDefault(),f(null),!Ep(N)){f(t("settings.unlockMethod.invalidPinFormat"));return}x(2)},O=async Q=>{if(Q.preventDefault(),f(null),A(null),N!==L){f(t("settings.unlockMethod.pinMismatch"));return}try{i();const te=await Te.getItem("session:encryptionKey");if(!te){f(t("common.errors.unknownErrorTryAgain")),s();return}await BD(N,te),d(!0),v(!1),x(1),T(""),B(""),A(t("settings.unlockMethod.enableSuccess")),s()}catch(K){console.error("Failed to enable PIN:",K),K instanceof pc?f(t("settings.unlockMethod.invalidPinFormat")):f(t("common.errors.unknownErrorTryAgain")),s()}},z=async()=>{f(null),A(null);try{i(),await bp(),d(!1),F(!1),s()}catch(Q){console.error("Failed to disable PIN:",Q),f(t("common.errors.unknownErrorTryAgain")),s()}};return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex items-start gap-2",children:c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:t("settings.unlockMethod.introText")})}),c.jsxs("div",{className:"mt-6",children:[m&&c.jsx(ks,{type:"error",message:m,className:"mb-4"}),g&&c.jsx(ks,{type:"success",message:g,className:"mb-4"}),k&&c.jsx(ks,{type:"warning",message:t("settings.unlockMethod.pinLocked"),className:"mb-4"}),c.jsx("section",{children:c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsx("div",{className:"p-4",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center",children:[c.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:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.unlockMethod.pin")}),c.jsx(Vw,{title:t("common.notice"),content:t("settings.unlockMethod.pinSecurityWarning"),className:"ml-2"})]}),c.jsx("p",{className:"text-sm mt-1 text-gray-600 dark:text-gray-400",children:t("settings.unlockMethod.pinDescription")})]})]}),l!==void 0&&c.jsx("button",{onClick:l&&!k?z:V,className:`px-4 py-2 rounded-md transition-colors ${l&&!k?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:t(l&&!k?"common.enabled":"common.disabled")})]})})})}),c.jsx("section",{className:"mt-4",children:c.jsx("div",{className:"bg-gray-50 dark:bg-gray-700/30 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:c.jsx("div",{className:"p-4",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center",children:[c.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:c.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"})}),c.jsx("div",{children:c.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.unlockMethod.password")})})]}),c.jsx("div",{className:"px-4 py-2 rounded-md bg-green-500 text-white hover:bg-green-600 cursor-not-allowed",children:t("common.enabled")})]})})})}),p&&c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:c.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg p-6 max-w-md w-full mx-4 relative",children:[c.jsx("button",{type:"button",onClick:()=>{v(!1),x(1),T(""),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:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),I===1&&c.jsxs(c.Fragment,{children:[c.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 pr-8",children:t("settings.unlockMethod.setupPin")}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:t("settings.unlockMethod.enterNewPinDescription")}),c.jsxs("form",{onSubmit:U,children:[c.jsx("div",{className:"mb-4",children:c.jsx("input",{type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:N,onChange:Q=>T(Q.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&&c.jsx(ks,{type:"error",message:m,className:"mb-4"}),c.jsx(Sa,{type:"submit",children:t("common.next")})]})]}),I===2&&c.jsxs(c.Fragment,{children:[c.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 pr-8",children:t("settings.unlockMethod.confirmPin")}),c.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:t("settings.unlockMethod.confirmPinDescription")}),c.jsxs("form",{onSubmit:O,children:[c.jsx("div",{className:"mb-4",children:c.jsx("input",{type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:L,onChange:Q=>B(Q.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&&c.jsx(ks,{type:"error",message:m,className:"mb-4"}),c.jsx(Sa,{type:"submit",children:t("common.confirm")})]})]})]})})]})]})},qj=({routes:t,isLoading:e,message:n,headerButtons:i})=>{const s=an(),l=t.find(g=>{const A=g.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${A}$`).test(s.pathname)}),d=(l==null?void 0:l.layout)??"default",m=e&&c.jsx("div",{className:"fixed inset-0 bg-white dark:bg-gray-900 z-50 flex items-center justify-center",children:c.jsx(ur,{})}),f=c.jsx(nI,{children:t.map(g=>c.jsx(cp,{path:g.path,element:g.element},g.path))});switch(d){case"passkey":return c.jsxs(QD,{children:[m,n&&c.jsx("p",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:n}),f]});case"auth":return c.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[m,c.jsx(xI,{routes:t,rightButtons:i}),c.jsxs("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px",height:"100%"},children:[n&&c.jsx("div",{className:"px-4 pt-0",children:c.jsx("p",{className:"text-red-500 dark:text-red-400 text-sm",children:n})}),f]})]});case"default":default:return c.jsxs(c.Fragment,{children:[m,c.jsx(VD,{routes:t,headerButtons:i,message:n,children:f})]})}},Wj=()=>{const{t}=nt(),e=Ir(),{isInitialLoading:n}=wa(),[i,s]=xc(!0,150),[l,d]=b.useState(null),{headerButtons:m}=wr(),f=tn.useMemo(()=>[{path:"/",element:c.jsx(aU,{}),showBackButton:!1},{path:"/reinitialize",element:c.jsx(Mj,{}),showBackButton:!1},{path:"/login",element:c.jsx(SB,{}),showBackButton:!1,layout:"auth"},{path:"/unlock",element:c.jsx(NB,{}),showBackButton:!1,layout:"auth"},{path:"/unlock-success",element:c.jsx(xB,{}),showBackButton:!1},{path:"/upgrade",element:c.jsx(TB,{}),showBackButton:!1},{path:"/auth-settings",element:c.jsx(UR,{}),showBackButton:!0,title:t("common.settings")},{path:"/items",element:c.jsx(gv,{}),showBackButton:!1},{path:"/items/folder/:folderId",element:c.jsx(gv,{}),showBackButton:!0,title:t("items.title")},{path:"/items/select-type",element:c.jsx(Cj,{}),showBackButton:!0,title:t("itemTypes.selectType")},{path:"/items/add",element:c.jsx(cv,{}),showBackButton:!0,title:t("items.addItem")},{path:"/items/deleted",element:c.jsx(Nj,{}),showBackButton:!0,title:t("recentlyDeleted.title")},{path:"/items/:id",element:c.jsx(yj,{}),showBackButton:!0,title:t("items.itemDetails")},{path:"/items/:id/edit",element:c.jsx(cv,{}),showBackButton:!0,title:t("items.editItem")},{path:"/passkeys/create",element:c.jsx(Rj,{}),layout:"passkey"},{path:"/passkeys/authenticate",element:c.jsx(Dj,{}),layout:"passkey"},{path:"/emails",element:c.jsx(tU,{}),showBackButton:!1},{path:"/emails/:id",element:c.jsx(eU,{}),showBackButton:!0,title:t("emails.title")},{path:"/settings",element:c.jsx(Kj,{}),showBackButton:!1},{path:"/settings/unlock-method",element:c.jsx(Gj,{}),showBackButton:!0,title:t("settings.unlockMethod.title")},{path:"/settings/autofill",element:c.jsx(_j,{}),showBackButton:!0,title:t("settings.autofillSettings")},{path:"/settings/context-menu",element:c.jsx(jj,{}),showBackButton:!0,title:t("settings.contextMenuSettings")},{path:"/settings/clipboard",element:c.jsx(Oj,{}),showBackButton:!0,title:t("settings.clipboardSettings")},{path:"/settings/language",element:c.jsx(Hj,{}),showBackButton:!0,title:t("settings.language")},{path:"/settings/auto-lock",element:c.jsx(Fj,{}),showBackButton:!0,title:t("settings.autoLockTimeout")},{path:"/settings/passkeys",element:c.jsx(zj,{}),showBackButton:!0,title:t("settings.passkeySettings")},{path:"/settings/identity-generator",element:c.jsx(Pj,{}),showBackButton:!0,title:t("settings.identityGenerator")}],[t]);return b.useEffect(()=>{n||s(!1)},[n,s]),b.useEffect(()=>{wt("POPUP_HEARTBEAT",{},"background").catch(()=>{});const g=setInterval(()=>{wt("POPUP_HEARTBEAT",{},"background").catch(()=>{})},5e3);return()=>{clearInterval(g)}},[]),b.useEffect(()=>{window.location.hash&&window.location.hash!=="#/"&&window.location.hash!=="#"||Tj()},[]),b.useEffect(()=>{e.globalMessage?d(e.globalMessage):d(null)},[e,e.globalMessage]),c.jsx(hx,{children:c.jsx(XD,{children:c.jsx(qj,{routes:f,isLoading:i,message:l,headerButtons:m})})})},yt=t=>typeof t=="string",Xl=()=>{let t,e;const n=new Promise((i,s)=>{t=i,e=s});return n.resolve=t,n.reject=e,n},bv=t=>t==null?"":""+t,Yj=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},Jj=/###/g,vv=t=>t&&t.indexOf("###")>-1?t.replace(Jj,"."):t,Iv=t=>!t||yt(t),gc=(t,e,n)=>{const i=yt(e)?e.split("."):e;let s=0;for(;s<i.length-1;){if(Iv(t))return{};const l=vv(i[s]);!t[l]&&n&&(t[l]=new n),Object.prototype.hasOwnProperty.call(t,l)?t=t[l]:t={},++s}return Iv(t)?{}:{obj:t,k:vv(i[s])}},wv=(t,e,n)=>{const{obj:i,k:s}=gc(t,e,Object);if(i!==void 0||e.length===1){i[s]=n;return}let l=e[e.length-1],d=e.slice(0,e.length-1),m=gc(t,d,Object);for(;m.obj===void 0&&d.length;)l=`${d[d.length-1]}.${l}`,d=d.slice(0,d.length-1),m=gc(t,d,Object),m!=null&&m.obj&&typeof m.obj[`${m.k}.${l}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${l}`]=n},Xj=(t,e,n,i)=>{const{obj:s,k:l}=gc(t,e,Object);s[l]=s[l]||[],s[l].push(n)},Fu=(t,e)=>{const{obj:n,k:i}=gc(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,i))return n[i]},$j=(t,e,n)=>{const i=Fu(t,n);return i!==void 0?i:Fu(e,n)},Kw=(t,e,n)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?yt(t[i])||t[i]instanceof String||yt(e[i])||e[i]instanceof String?n&&(t[i]=e[i]):Kw(t[i],e[i],n):t[i]=e[i]);return t},vo=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Zj={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const e4=t=>yt(t)?t.replace(/[&<>"'\/]/g,e=>Zj[e]):t;class t4{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;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 a4=[" ",",","?","!",";"],n4=new t4(20),r4=(t,e,n)=>{e=e||"",n=n||"";const i=a4.filter(d=>e.indexOf(d)<0&&n.indexOf(d)<0);if(i.length===0)return!0;const s=n4.getRegExp(`(${i.map(d=>d==="?"?"\\?":d).join("|")})`);let l=!s.test(t);if(!l){const d=t.indexOf(n);d>0&&!s.test(t.substring(0,d))&&(l=!0)}return l},ap=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const i=e.split(n);let s=t;for(let l=0;l<i.length;){if(!s||typeof s!="object")return;let d,m="";for(let f=l;f<i.length;++f)if(f!==l&&(m+=n),m+=i[f],d=s[m],d!==void 0){if(["string","number","boolean"].indexOf(typeof d)>-1&&f<i.length-1)continue;l+=f-l+1;break}s=d}return s},vc=t=>t==null?void 0:t.replace("_","-"),i4={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var n,i;(i=(n=console==null?void 0:console[t])==null?void 0:n.apply)==null||i.call(n,console,e)}};class Ou{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||i4,this.options=n,this.debug=n.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,n,i,s){return s&&!this.debug?null:(yt(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Ou(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ou(this.logger,e)}}var Pr=new Ou;class $u{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(n)||0;this.observers[i].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,l])=>{for(let d=0;d<l;d++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,l])=>{for(let d=0;d<l;d++)s.apply(s,[e,...n])})}}class Cv extends $u{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,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 n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i,s={}){var g,A;const l=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,n],i&&(Array.isArray(i)?m.push(...i):yt(i)&&l?m.push(...i.split(l)):m.push(i)));const f=Fu(this.data,m);return!f&&!n&&!i&&e.indexOf(".")>-1&&(e=m[0],n=m[1],i=m.slice(2).join(".")),f||!d||!yt(i)?f:ap((A=(g=this.data)==null?void 0:g[e])==null?void 0:A[n],i,l)}addResource(e,n,i,s,l={silent:!1}){const d=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let m=[e,n];i&&(m=m.concat(d?i.split(d):i)),e.indexOf(".")>-1&&(m=e.split("."),s=n,n=m[1]),this.addNamespaces(n),wv(this.data,m,s),l.silent||this.emit("added",e,n,i,s)}addResources(e,n,i,s={silent:!1}){for(const l in i)(yt(i[l])||Array.isArray(i[l]))&&this.addResource(e,n,l,i[l],{silent:!0});s.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,s,l,d={silent:!1,skipCopy:!1}){let m=[e,n];e.indexOf(".")>-1&&(m=e.split("."),s=i,i=n,n=m[1]),this.addNamespaces(n);let f=Fu(this.data,m)||{};d.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?Kw(f,i,l):f={...f,...i},wv(this.data,m,f),d.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var Gw={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,s){return t.forEach(l=>{var d;e=((d=this.processors[l])==null?void 0:d.process(e,n,i,s))??e}),e}};const Sv={},Nv=t=>!yt(t)&&typeof t!="boolean"&&typeof t!="number";class ju extends $u{constructor(e,n={}){super(),Yj(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Pr.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const i={...n};if(e==null)return!1;const s=this.resolve(e,i);return(s==null?void 0:s.res)!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let l=n.ns||this.options.defaultNS||[];const d=i&&e.indexOf(i)>-1,m=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!r4(e,i,s);if(d&&!m){const f=e.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:e,namespaces:yt(l)?[l]:l};const g=e.split(i);(i!==s||i===s&&this.options.ns.indexOf(g[0])>-1)&&(l=g.shift()),e=g.join(s)}return{key:e,namespaces:yt(l)?[l]:l}}translate(e,n,i){let s=typeof n=="object"?{...n}:n;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 l=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 A=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;A===void 0&&(A=":");const p=s.lng||this.language,v=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return v?l?{res:`${g}${A}${m}`,usedKey:m,exactUsedKey:m,usedLng:p,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:`${g}${A}${m}`:l?{res:m,usedKey:m,exactUsedKey:m,usedLng:p,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:m;const I=this.resolve(e,s);let x=I==null?void 0:I.res;const N=(I==null?void 0:I.usedKey)||m,T=(I==null?void 0:I.exactUsedKey)||m,L=["[object Number]","[object Function]","[object RegExp]"],B=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,F=s.count!==void 0&&!yt(s.count),_=ju.hasDefaultValue(s),V=F?this.pluralResolver.getSuffix(p,s.count,s):"",U=s.ordinal&&F?this.pluralResolver.getSuffix(p,s.count,{ordinal:!1}):"",O=F&&!s.ordinal&&s.count===0,z=O&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${V}`]||s[`defaultValue${U}`]||s.defaultValue;let Q=x;k&&!x&&_&&(Q=z);const K=Nv(Q),te=Object.prototype.toString.apply(Q);if(k&&Q&&K&&L.indexOf(te)<0&&!(yt(B)&&Array.isArray(Q))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ee=this.options.returnedObjectHandler?this.options.returnedObjectHandler(N,Q,{...s,ns:f}):`key '${m} (${this.language})' returned an object instead of string.`;return l?(I.res=ee,I.usedParams=this.getUsedParamsDetails(s),I):ee}if(d){const ee=Array.isArray(Q),X=ee?[]:{},ue=ee?T:N;for(const W in Q)if(Object.prototype.hasOwnProperty.call(Q,W)){const ae=`${ue}${d}${W}`;_&&!x?X[W]=this.translate(ae,{...s,defaultValue:Nv(z)?z[W]:void 0,joinArrays:!1,ns:f}):X[W]=this.translate(ae,{...s,joinArrays:!1,ns:f}),X[W]===ae&&(X[W]=Q[W])}x=X}}else if(k&&yt(B)&&Array.isArray(x))x=x.join(B),x&&(x=this.extendTranslation(x,e,s,i));else{let ee=!1,X=!1;!this.isValidLookup(x)&&_&&(ee=!0,x=z),this.isValidLookup(x)||(X=!0,x=m);const W=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&X?void 0:x,ae=_&&z!==x&&this.options.updateMissing;if(X||ee||ae){if(this.logger.log(ae?"updateKey":"missingKey",p,g,m,ae?z: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 be=[];const se=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&se&&se[0])for(let q=0;q<se.length;q++)be.push(se[q]);else this.options.saveMissingTo==="all"?be=this.languageUtils.toResolveHierarchy(s.lng||this.language):be.push(s.lng||this.language);const P=(q,Y,ne)=>{var ce;const Ie=_&&ne!==x?ne:W;this.options.missingKeyHandler?this.options.missingKeyHandler(q,g,Y,Ie,ae,s):(ce=this.backendConnector)!=null&&ce.saveMissing&&this.backendConnector.saveMissing(q,g,Y,Ie,ae,s),this.emit("missingKey",q,g,Y,x)};this.options.saveMissing&&(this.options.saveMissingPlurals&&F?be.forEach(q=>{const Y=this.pluralResolver.getSuffixes(q,s);O&&s[`defaultValue${this.options.pluralSeparator}zero`]&&Y.indexOf(`${this.options.pluralSeparator}zero`)<0&&Y.push(`${this.options.pluralSeparator}zero`),Y.forEach(ne=>{P([q],m+ne,s[`defaultValue${ne}`]||z)})}):P(be,m,z))}x=this.extendTranslation(x,e,s,I,i),X&&x===m&&this.options.appendNamespaceToMissingKey&&(x=`${g}${A}${m}`),(X||ee)&&this.options.parseMissingKeyHandler&&(x=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${A}${m}`:m,ee?x:void 0,s))}return l?(I.res=x,I.usedParams=this.getUsedParamsDetails(s),I):x}extendTranslation(e,n,i,s,l){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 A=yt(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(A){const I=e.match(this.interpolator.nestingRegexp);p=I&&I.length}let v=i.replace&&!yt(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),e=this.interpolator.interpolate(e,v,i.lng||this.language||s.usedLng,i),A){const I=e.match(this.interpolator.nestingRegexp),x=I&&I.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,(...I)=>(l==null?void 0:l[0])===I[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${I[0]} in key: ${n[0]}`),null):this.translate(...I,n),i)),i.interpolation&&this.interpolator.reset()}const d=i.postProcess||this.options.postProcess,m=yt(d)?[d]:d;return e!=null&&(m!=null&&m.length)&&i.applyPostProcessor!==!1&&(e=Gw.handle(m,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,n={}){let i,s,l,d,m;return yt(e)&&(e=[e]),e.forEach(f=>{if(this.isValidLookup(i))return;const g=this.extractFromKey(f,n),A=g.key;s=A;let p=g.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const v=n.count!==void 0&&!yt(n.count),I=v&&!n.ordinal&&n.count===0,x=n.context!==void 0&&(yt(n.context)||typeof n.context=="number")&&n.context!=="",N=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);p.forEach(T=>{var L,B;this.isValidLookup(i)||(m=T,!Sv[`${N[0]}-${T}`]&&((L=this.utils)!=null&&L.hasLoadedNamespace)&&!((B=this.utils)!=null&&B.hasLoadedNamespace(m))&&(Sv[`${N[0]}-${T}`]=!0,this.logger.warn(`key "${s}" for languages "${N.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!!!")),N.forEach(k=>{var V;if(this.isValidLookup(i))return;d=k;const F=[A];if((V=this.i18nFormat)!=null&&V.addLookupKeys)this.i18nFormat.addLookupKeys(F,A,k,T,n);else{let U;v&&(U=this.pluralResolver.getSuffix(k,n.count,n));const O=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&(F.push(A+U),n.ordinal&&U.indexOf(z)===0&&F.push(A+U.replace(z,this.options.pluralSeparator)),I&&F.push(A+O)),x){const Q=`${A}${this.options.contextSeparator}${n.context}`;F.push(Q),v&&(F.push(Q+U),n.ordinal&&U.indexOf(z)===0&&F.push(Q+U.replace(z,this.options.pluralSeparator)),I&&F.push(Q+O))}}let _;for(;_=F.pop();)this.isValidLookup(i)||(l=_,i=this.getResource(k,T,_,n))}))})}),{res:i,usedKey:s,exactUsedKey:l,usedLng:d,usedNS:m}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i,s={}){var l;return(l=this.i18nFormat)!=null&&l.getResource?this.i18nFormat.getResource(e,n,i,s):this.resourceStore.getResource(e,n,i,s)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!yt(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 l of n)delete s[l]}return s}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}class xv{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pr.create("languageUtils")}getScriptPartFromCode(e){if(e=vc(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=vc(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(yt(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(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 n;return e.forEach(i=>{if(n)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return n=s;const l=this.getLanguagePartFromCode(i);if(this.isSupportedCode(l))return n=l;n=this.options.supportedLngs.find(d=>{if(d===l)return d;if(!(d.indexOf("-")<0&&l.indexOf("-")<0)&&(d.indexOf("-")>0&&l.indexOf("-")<0&&d.substring(0,d.indexOf("-"))===l||d.indexOf(l)===0&&l.length>1))return d})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),yt(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),s=[],l=d=>{d&&(this.isSupportedCode(d)?s.push(d):this.logger.warn(`rejecting language code not found in supportedLngs: ${d}`))};return yt(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(e))):yt(e)&&l(this.formatLanguageCode(e)),i.forEach(d=>{s.indexOf(d)<0&&l(this.formatLanguageCode(d))}),s}}const Tv={zero:0,one:1,two:2,few:3,many:4,other:5},kv={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class s4{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=Pr.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const i=vc(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:i,type:s});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];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!"),kv;if(!e.match(/-|_/))return kv;const f=this.languageUtils.getLanguagePartFromCode(e);d=this.getRule(f,n)}return this.pluralRulesCache[l]=d,d}needsPlural(e,n={}){let i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,n,i={}){return this.getSuffixes(e,i).map(s=>`${n}${s}`)}getSuffixes(e,n={}){let i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),i?i.resolvedOptions().pluralCategories.sort((s,l)=>Tv[s]-Tv[l]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,n,i={}){const s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,i))}}const Lv=(t,e,n,i=".",s=!0)=>{let l=$j(t,e,n);return!l&&s&&yt(n)&&(l=ap(t,n,i),l===void 0&&(l=ap(e,n,i))),l},wh=t=>t.replace(/\$/g,"$$$$");class o4{constructor(e={}){var n;this.logger=Pr.create("interpolator"),this.options=e,this.format=((n=e==null?void 0:e.interpolation)==null?void 0:n.format)||(i=>i),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:s,prefix:l,prefixEscaped:d,suffix:m,suffixEscaped:f,formatSeparator:g,unescapeSuffix:A,unescapePrefix:p,nestingPrefix:v,nestingPrefixEscaped:I,nestingSuffix:x,nestingSuffixEscaped:N,nestingOptionsSeparator:T,maxReplaces:L,alwaysFormat:B}=e.interpolation;this.escape=n!==void 0?n:e4,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=l?vo(l):d||"{{",this.suffix=m?vo(m):f||"}}",this.formatSeparator=g||",",this.unescapePrefix=A?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":A||"",this.nestingPrefix=v?vo(v):I||vo("$t("),this.nestingSuffix=x?vo(x):N||vo(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=L||1e3,this.alwaysFormat=B!==void 0?B:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>(n==null?void 0:n.source)===i?(n.lastIndex=0,n):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,n,i,s){var I;let l,d,m;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=x=>{if(x.indexOf(this.formatSeparator)<0){const B=Lv(n,f,x,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(B,void 0,i,{...s,...n,interpolationkey:x}):B}const N=x.split(this.formatSeparator),T=N.shift().trim(),L=N.join(this.formatSeparator).trim();return this.format(Lv(n,f,T,this.options.keySeparator,this.options.ignoreJSONStructure),L,i,{...s,...n,interpolationkey:T})};this.resetRegExp();const A=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((I=s==null?void 0:s.interpolation)==null?void 0:I.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:x=>wh(x)},{regex:this.regexp,safeValue:x=>this.escapeValue?wh(this.escape(x)):wh(x)}].forEach(x=>{for(m=0;l=x.regex.exec(e);){const N=l[1].trim();if(d=g(N),d===void 0)if(typeof A=="function"){const L=A(e,l,s);d=yt(L)?L:""}else if(s&&Object.prototype.hasOwnProperty.call(s,N))d="";else if(p){d=l[0];continue}else this.logger.warn(`missed to pass in variable ${N} for interpolating ${e}`),d="";else!yt(d)&&!this.useRawValueToEscape&&(d=bv(d));const T=x.safeValue(d);if(e=e.replace(l[0],T),p?(x.regex.lastIndex+=d.length,x.regex.lastIndex-=l[0].length):x.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),e}nest(e,n,i={}){let s,l,d;const m=(f,g)=>{const A=this.nestingOptionsSeparator;if(f.indexOf(A)<0)return f;const p=f.split(new RegExp(`${A}[ ]*{`));let v=`{${p[1]}`;f=p[0],v=this.interpolate(v,d);const I=v.match(/'/g),x=v.match(/"/g);(((I==null?void 0:I.length)??0)%2===0&&!x||x.length%2!==0)&&(v=v.replace(/'/g,'"'));try{d=JSON.parse(v),g&&(d={...g,...d})}catch(N){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,N),`${f}${A}${v}`}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&&!yt(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(A=>A.trim()).filter(Boolean),s[1]=s[1].slice(0,g)),l=n(m.call(this,s[1].trim(),d),d),l&&s[0]===e&&!yt(l))return l;yt(l)||(l=bv(l)),l||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),l=""),f.length&&(l=f.reduce((A,p)=>this.format(A,p,i.lng,{...i,interpolationkey:s[1].trim()}),l.trim())),e=e.replace(s[0],l),this.regexp.lastIndex=0}return e}}const l4=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(d=>{if(d){const[m,...f]=d.split(":"),g=f.join(":").trim().replace(/^'+|'+$/g,""),A=m.trim();n[A]||(n[A]=g),g==="false"&&(n[A]=!1),g==="true"&&(n[A]=!0),isNaN(g)||(n[A]=parseInt(g,10))}})}return{formatName:e,formatOptions:n}},Dv=t=>{const e={};return(n,i,s)=>{let l=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(l={...l,[s.interpolationkey]:void 0});const d=i+JSON.stringify(l);let m=e[d];return m||(m=t(vc(i),s),e[d]=m),m(n)}},c4=t=>(e,n,i)=>t(vc(n),i)(e);class d4{constructor(e={}){this.logger=Pr.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const i=n.cacheInBuiltFormats?Dv:c4;this.formats={number:i((s,l)=>{const d=new Intl.NumberFormat(s,{...l});return m=>d.format(m)}),currency:i((s,l)=>{const d=new Intl.NumberFormat(s,{...l,style:"currency"});return m=>d.format(m)}),datetime:i((s,l)=>{const d=new Intl.DateTimeFormat(s,{...l});return m=>d.format(m)}),relativetime:i((s,l)=>{const d=new Intl.RelativeTimeFormat(s,{...l});return m=>d.format(m,l.range||"day")}),list:i((s,l)=>{const d=new Intl.ListFormat(s,{...l});return m=>d.format(m)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Dv(n)}format(e,n,i,s={}){const l=n.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(m=>m.indexOf(")")>-1)){const m=l.findIndex(f=>f.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,m)].join(this.formatSeparator)}return l.reduce((m,f)=>{var p;const{formatName:g,formatOptions:A}=l4(f);if(this.formats[g]){let v=m;try{const I=((p=s==null?void 0:s.formatParams)==null?void 0:p[s.interpolationkey])||{},x=I.locale||I.lng||s.locale||s.lng||i;v=this.formats[g](m,x,{...A,...s,...I})}catch(I){this.logger.warn(I)}return v}else this.logger.warn(`there was no format function for ${g}`);return m},e)}}const u4=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class m4 extends $u{constructor(e,n,i,s={}){var l,d;super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=Pr.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=(l=this.backend)==null?void 0:l.init)==null||d.call(l,i,s.backend,s)}queueLoad(e,n,i,s){const l={},d={},m={},f={};return e.forEach(g=>{let A=!0;n.forEach(p=>{const v=`${g}|${p}`;!i.reload&&this.store.hasResourceBundle(g,p)?this.state[v]=2:this.state[v]<0||(this.state[v]===1?d[v]===void 0&&(d[v]=!0):(this.state[v]=1,A=!1,d[v]===void 0&&(d[v]=!0),l[v]===void 0&&(l[v]=!0),f[p]===void 0&&(f[p]=!0)))}),A||(m[g]=!0)}),(Object.keys(l).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(l),pending:Object.keys(d),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(f)}}loaded(e,n,i){const s=e.split("|"),l=s[0],d=s[1];n&&this.emit("failedLoading",l,d,n),!n&&i&&this.store.addResourceBundle(l,d,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const m={};this.queue.forEach(f=>{Xj(f.loaded,[l],d),u4(f,e),n&&f.errors.push(n),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(g=>{m[g]||(m[g]={});const A=f.loaded[g];A.length&&A.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,n,i,s=0,l=this.retryTimeout,d){if(!e.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:s,wait:l,callback:d});return}this.readingCalls++;const m=(g,A)=>{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&&A&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,s+1,l*2,d)},l);return}d(g,A)},f=this.backend[i].bind(this.backend);if(f.length===2){try{const g=f(e,n);g&&typeof g.then=="function"?g.then(A=>m(null,A)).catch(m):m(null,g)}catch(g){m(g)}return}return f(e,n,m)}prepareLoading(e,n,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();yt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),yt(n)&&(n=[n]);const l=this.queueLoad(e,n,i,s);if(!l.toLoad.length)return l.pending.length||s(),null;l.toLoad.forEach(d=>{this.loadOne(d)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e,n=""){const i=e.split("|"),s=i[0],l=i[1];this.read(s,l,"read",void 0,void 0,(d,m)=>{d&&this.logger.warn(`${n}loading namespace ${l} for language ${s} failed`,d),!d&&m&&this.logger.log(`${n}loaded namespace ${l} for language ${s}`,m),this.loaded(e,d,m)})}saveMissing(e,n,i,s,l,d={},m=()=>{}){var f,g,A,p,v;if((g=(f=this.services)==null?void 0:f.utils)!=null&&g.hasLoadedNamespace&&!((p=(A=this.services)==null?void 0:A.utils)!=null&&p.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${i}" as the namespace "${n}" 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((v=this.backend)!=null&&v.create){const I={...d,isUpdate:l},x=this.backend.create.bind(this.backend);if(x.length<6)try{let N;x.length===5?N=x(e,n,i,s,I):N=x(e,n,i,s),N&&typeof N.then=="function"?N.then(T=>m(null,T)).catch(m):m(null,N)}catch(N){m(N)}else x(e,n,i,s,m,I)}!e||!e[0]||this.store.addResource(e[0],n,i,s)}}}const Rv=()=>({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:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),yt(t[1])&&(e.defaultValue=t[1]),yt(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Bv=t=>{var e,n;return yt(t.ns)&&(t.ns=[t.ns]),yt(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),yt(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((n=(e=t.supportedLngs)==null?void 0:e.indexOf)==null?void 0:n.call(e,"cimode"))<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},su=()=>{},g4=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Ic extends $u{constructor(e={},n){if(super(),this.options=Bv(e),this.services={},this.logger=Pr,this.modules={external:[]},g4(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(yt(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=Rv();this.options={...i,...this.options,...Bv(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?Pr.init(s(this.modules.logger),this.options):Pr.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=d4;const A=new xv(this.options);this.store=new Cv(this.options.resources,this.options);const p=this.services;p.logger=Pr,p.resourceStore=this.store,p.languageUtils=A,p.pluralResolver=new s4(A,{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 o4(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new m4(s(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(I,...x)=>{this.emit(I,...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 ju(this.services,this.options),this.translator.on("*",(I,...x)=>{this.emit(I,...x)}),this.modules.external.forEach(I=>{I.init&&I.init(this)})}if(this.format=this.options.interpolation.format,n||(n=su),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]=(...A)=>this.store[g](...A)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...A)=>(this.store[g](...A),this)});const m=Xl(),f=()=>{const g=(A,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),n(A,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,n=su){var l,d;let i=n;const s=yt(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(A=>f(A)),(d=(l=this.options.preload)==null?void 0:l.forEach)==null||d.call(l,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,n,i){const s=Xl();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=su),this.services.backendConnector.reload(e,n,l=>{s.resolve(),i(l)}),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"&&Gw.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 n=0;n<this.languages.length;n++){const i=this.languages[n];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,n){this.isLanguageChangingTo=e;const i=Xl();this.emit("languageChanging",e);const s=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},l=(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)),n&&n(m,(...g)=>this.t(...g))},d=m=>{var A,p;!e&&!m&&this.services.languageDetector&&(m=[]);const f=yt(m)?m:m&&m[0],g=this.store.hasLanguageSomeTranslations(f)?f:this.services.languageUtils.getBestMatchFromCodes(yt(m)?[m]:m);g&&(this.language||s(g),this.translator.language||this.translator.changeLanguage(g),(p=(A=this.services.languageDetector)==null?void 0:A.cacheUserLanguage)==null||p.call(A,g)),this.loadResources(g,v=>{l(v,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,n,i){const s=(l,d,...m)=>{let f;typeof d!="object"?f=this.options.overloadTranslationOptionHandler([l,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 A;return f.keyPrefix&&Array.isArray(l)?A=l.map(p=>`${f.keyPrefix}${g}${p}`):A=f.keyPrefix?`${f.keyPrefix}${g}${l}`:l,this.t(A,f)};return yt(e)?s.lng=e:s.lngs=e,s.ns=n,s.keyPrefix=i,s}t(...e){var n;return(n=this.translator)==null?void 0:n.translate(...e)}exists(...e){var n;return(n=this.translator)==null?void 0:n.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){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=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,l=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(n.precheck){const m=n.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(l,e)))}loadNamespaces(e,n){const i=Xl();return this.options.ns?(yt(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Xl();yt(e)&&(e=[e]);const s=this.options.preload||[],l=e.filter(d=>s.indexOf(d)<0&&this.services.languageUtils.isSupportedCode(d));return l.length?(this.options.preload=s.concat(l),this.loadResources(d=>{i.resolve(),n&&n(d)}),i):(n&&n(),Promise.resolve())}dir(e){var s,l;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 n=["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=((l=this.services)==null?void 0:l.languageUtils)||new xv(Rv());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){return new Ic(e,n)}cloneInstance(e={},n=su){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},l=new Ic(s);if((e.debug!==void 0||e.prefix!==void 0)&&(l.logger=l.logger.clone(e)),["store","services","language"].forEach(m=>{l[m]=this[m]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},i){const m=Object.keys(this.store.data).reduce((f,g)=>(f[g]={...this.store.data[g]},f[g]=Object.keys(f[g]).reduce((A,p)=>(A[p]={...f[g][p]},A),f[g]),f),{});l.store=new Cv(m,s),l.services.resourceStore=l.store}return l.translator=new ju(l.services,s),l.translator.on("*",(m,...f)=>{l.emit(m,...f)}),l.init(s,n),l.translator.options=s,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ya=Ic.createInstance();Ya.createInstance=Ic.createInstance;Ya.createInstance;Ya.dir;Ya.init;Ya.loadResources;Ya.reloadResources;Ya.use;Ya.changeLanguage;Ya.getFixedT;Ya.t;Ya.exists;Ya.setDefaultNamespace;Ya.hasLoadedNamespace;Ya.loadNamespaces;Ya.loadLanguages;const f4=async()=>{const t=await Te.getItem("local:language");if(t&&wu.includes(t))return t;const e=navigator.language.split("-")[0];return wu.includes(e)?e:jr},h4=async()=>{const t=await f4();await Ya.use(VS).init({resources:$l,lng:t,fallbackLng:jr,debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1,bindI18n:"languageChanged loaded",bindI18nStore:""}})};h4().catch(t=>{console.error("Failed to initialize i18n:",t),Ya.emit("initialized")});const Uv=()=>{DS.createRoot(document.getElementById("root")).render(c.jsx(xD,{children:c.jsx(jD,{children:c.jsx(_D,{children:c.jsx(PD,{children:c.jsx(qD,{children:c.jsx(KD,{children:c.jsx(Vj,{children:c.jsx(Wj,{})})})})})})})}))};Ya.isInitialized?Uv():Ya.on("initialized",Uv)});export default p4();
