var dC=Object.defineProperty;var fC=(n,t,r)=>t in n?dC(n,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[t]=r;var Ot=(n,t,r)=>fC(n,typeof t!="symbol"?t+"":t,r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=r(o);fetch(o.href,l)}})();try{}catch(n){console.error("[wxt] Failed to initialize plugins",n)}function Zr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function hC(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var t=n.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var o=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:function(){return n[i]}})}),r}var Zf={exports:{}},ul={};/**
 * @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 yp;function AC(){if(yp)return ul;yp=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,o,l){var c=null;if(l!==void 0&&(c=""+l),o.key!==void 0&&(c=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:n,type:i,key:c,ref:o!==void 0?o:null,props:l}}return ul.Fragment=t,ul.jsx=r,ul.jsxs=r,ul}var Ep;function gC(){return Ep||(Ep=1,Zf.exports=AC()),Zf.exports}var f=gC(),eh={exports:{}},cl={},th={exports:{}},ah={};/**
 * @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 bp;function mC(){return bp||(bp=1,function(n){function t(X,le){var ge=X.length;X.push(le);e:for(;0<ge;){var je=ge-1>>>1,P=X[je];if(0<o(P,le))X[je]=le,X[ge]=P,ge=je;else break e}}function r(X){return X.length===0?null:X[0]}function i(X){if(X.length===0)return null;var le=X[0],ge=X.pop();if(ge!==le){X[0]=ge;e:for(var je=0,P=X.length,q=P>>>1;je<q;){var se=2*(je+1)-1,we=X[se],Ce=se+1,Be=X[Ce];if(0>o(we,ge))Ce<P&&0>o(Be,we)?(X[je]=Be,X[Ce]=ge,je=Ce):(X[je]=we,X[se]=ge,je=se);else if(Ce<P&&0>o(Be,ge))X[je]=Be,X[Ce]=ge,je=Ce;else break e}}return le}function o(X,le){var ge=X.sortIndex-le.sortIndex;return ge!==0?ge:X.id-le.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;n.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();n.unstable_now=function(){return c.now()-d}}var A=[],h=[],y=1,E=null,C=3,x=!1,N=!1,I=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function F(X){for(var le=r(h);le!==null;){if(le.callback===null)i(h);else if(le.startTime<=X)i(h),le.sortIndex=le.expirationTime,t(A,le);else break;le=r(h)}}function Q(X){if(I=!1,F(X),!N)if(r(A)!==null)N=!0,V||(V=!0,ae());else{var le=r(h);le!==null&&pe(Q,le.startTime-X)}}var V=!1,W=-1,J=5,z=-1;function G(){return k?!0:!(n.unstable_now()-z<J)}function Y(){if(k=!1,V){var X=n.unstable_now();z=X;var le=!0;try{e:{N=!1,I&&(I=!1,U(W),W=-1),x=!0;var ge=C;try{t:{for(F(X),E=r(A);E!==null&&!(E.expirationTime>X&&G());){var je=E.callback;if(typeof je=="function"){E.callback=null,C=E.priorityLevel;var P=je(E.expirationTime<=X);if(X=n.unstable_now(),typeof P=="function"){E.callback=P,F(X),le=!0;break t}E===r(A)&&i(A),F(X)}else i(A);E=r(A)}if(E!==null)le=!0;else{var q=r(h);q!==null&&pe(Q,q.startTime-X),le=!1}}break e}finally{E=null,C=ge,x=!1}le=void 0}}finally{le?ae():V=!1}}}var ae;if(typeof B=="function")ae=function(){B(Y)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,ce=Z.port2;Z.port1.onmessage=Y,ae=function(){ce.postMessage(null)}}else ae=function(){S(Y,0)};function pe(X,le){W=S(function(){X(n.unstable_now())},le)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(X){X.callback=null},n.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<X?Math.floor(1e3/X):5},n.unstable_getCurrentPriorityLevel=function(){return C},n.unstable_next=function(X){switch(C){case 1:case 2:case 3:var le=3;break;default:le=C}var ge=C;C=le;try{return X()}finally{C=ge}},n.unstable_requestPaint=function(){k=!0},n.unstable_runWithPriority=function(X,le){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var ge=C;C=X;try{return le()}finally{C=ge}},n.unstable_scheduleCallback=function(X,le,ge){var je=n.unstable_now();switch(typeof ge=="object"&&ge!==null?(ge=ge.delay,ge=typeof ge=="number"&&0<ge?je+ge:je):ge=je,X){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=ge+P,X={id:y++,callback:le,priorityLevel:X,startTime:ge,expirationTime:P,sortIndex:-1},ge>je?(X.sortIndex=ge,t(h,X),r(A)===null&&X===r(h)&&(I?(U(W),W=-1):I=!0,pe(Q,ge-je))):(X.sortIndex=P,t(A,X),N||x||(N=!0,V||(V=!0,ae()))),X},n.unstable_shouldYield=G,n.unstable_wrapCallback=function(X){var le=C;return function(){var ge=C;C=le;try{return X.apply(this,arguments)}finally{C=ge}}}}(ah)),ah}var wp;function pC(){return wp||(wp=1,th.exports=mC()),th.exports}var nh={exports:{}},bt={};/**
 * @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 vp;function yC(){if(vp)return bt;vp=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),E=Symbol.iterator;function C(P){return P===null||typeof P!="object"?null:(P=E&&P[E]||P["@@iterator"],typeof P=="function"?P:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,I={};function k(P,q,se){this.props=P,this.context=q,this.refs=I,this.updater=se||x}k.prototype.isReactComponent={},k.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")},k.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function S(){}S.prototype=k.prototype;function U(P,q,se){this.props=P,this.context=q,this.refs=I,this.updater=se||x}var B=U.prototype=new S;B.constructor=U,N(B,k.prototype),B.isPureReactComponent=!0;var F=Array.isArray,Q={H:null,A:null,T:null,S:null,V:null},V=Object.prototype.hasOwnProperty;function W(P,q,se,we,Ce,Be){return se=Be.ref,{$$typeof:n,type:P,key:q,ref:se!==void 0?se:null,props:Be}}function J(P,q){return W(P.type,q,void 0,void 0,void 0,P.props)}function z(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function G(P){var q={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(se){return q[se]})}var Y=/\/+/g;function ae(P,q){return typeof P=="object"&&P!==null&&P.key!=null?G(""+P.key):q.toString(36)}function Z(){}function ce(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(Z,Z):(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 pe(P,q,se,we,Ce){var Be=typeof P;(Be==="undefined"||Be==="boolean")&&(P=null);var Le=!1;if(P===null)Le=!0;else switch(Be){case"bigint":case"string":case"number":Le=!0;break;case"object":switch(P.$$typeof){case n:case t:Le=!0;break;case y:return Le=P._init,pe(Le(P._payload),q,se,we,Ce)}}if(Le)return Ce=Ce(P),Le=we===""?"."+ae(P,0):we,F(Ce)?(se="",Le!=null&&(se=Le.replace(Y,"$&/")+"/"),pe(Ce,q,se,"",function(We){return We})):Ce!=null&&(z(Ce)&&(Ce=J(Ce,se+(Ce.key==null||P&&P.key===Ce.key?"":(""+Ce.key).replace(Y,"$&/")+"/")+Le)),q.push(Ce)),1;Le=0;var Je=we===""?".":we+":";if(F(P))for(var Ke=0;Ke<P.length;Ke++)we=P[Ke],Be=Je+ae(we,Ke),Le+=pe(we,q,se,Be,Ce);else if(Ke=C(P),typeof Ke=="function")for(P=Ke.call(P),Ke=0;!(we=P.next()).done;)we=we.value,Be=Je+ae(we,Ke++),Le+=pe(we,q,se,Be,Ce);else if(Be==="object"){if(typeof P.then=="function")return pe(ce(P),q,se,we,Ce);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 Le}function X(P,q,se){if(P==null)return P;var we=[],Ce=0;return pe(P,we,"","",function(Be){return q.call(se,Be,Ce++)}),we}function le(P){if(P._status===-1){var q=P._result;q=q(),q.then(function(se){(P._status===0||P._status===-1)&&(P._status=1,P._result=se)},function(se){(P._status===0||P._status===-1)&&(P._status=2,P._result=se)}),P._status===-1&&(P._status=0,P._result=q)}if(P._status===1)return P._result.default;throw P._result}var ge=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 je(){}return bt.Children={map:X,forEach:function(P,q,se){X(P,function(){q.apply(this,arguments)},se)},count:function(P){var q=0;return X(P,function(){q++}),q},toArray:function(P){return X(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}},bt.Component=k,bt.Fragment=r,bt.Profiler=o,bt.PureComponent=U,bt.StrictMode=i,bt.Suspense=A,bt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,bt.__COMPILER_RUNTIME={__proto__:null,c:function(P){return Q.H.useMemoCache(P)}},bt.cache=function(P){return function(){return P.apply(null,arguments)}},bt.cloneElement=function(P,q,se){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var we=N({},P.props),Ce=P.key,Be=void 0;if(q!=null)for(Le in q.ref!==void 0&&(Be=void 0),q.key!==void 0&&(Ce=""+q.key),q)!V.call(q,Le)||Le==="key"||Le==="__self"||Le==="__source"||Le==="ref"&&q.ref===void 0||(we[Le]=q[Le]);var Le=arguments.length-2;if(Le===1)we.children=se;else if(1<Le){for(var Je=Array(Le),Ke=0;Ke<Le;Ke++)Je[Ke]=arguments[Ke+2];we.children=Je}return W(P.type,Ce,void 0,void 0,Be,we)},bt.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:l,_context:P},P},bt.createElement=function(P,q,se){var we,Ce={},Be=null;if(q!=null)for(we in q.key!==void 0&&(Be=""+q.key),q)V.call(q,we)&&we!=="key"&&we!=="__self"&&we!=="__source"&&(Ce[we]=q[we]);var Le=arguments.length-2;if(Le===1)Ce.children=se;else if(1<Le){for(var Je=Array(Le),Ke=0;Ke<Le;Ke++)Je[Ke]=arguments[Ke+2];Ce.children=Je}if(P&&P.defaultProps)for(we in Le=P.defaultProps,Le)Ce[we]===void 0&&(Ce[we]=Le[we]);return W(P,Be,void 0,void 0,null,Ce)},bt.createRef=function(){return{current:null}},bt.forwardRef=function(P){return{$$typeof:d,render:P}},bt.isValidElement=z,bt.lazy=function(P){return{$$typeof:y,_payload:{_status:-1,_result:P},_init:le}},bt.memo=function(P,q){return{$$typeof:h,type:P,compare:q===void 0?null:q}},bt.startTransition=function(P){var q=Q.T,se={};Q.T=se;try{var we=P(),Ce=Q.S;Ce!==null&&Ce(se,we),typeof we=="object"&&we!==null&&typeof we.then=="function"&&we.then(je,ge)}catch(Be){ge(Be)}finally{Q.T=q}},bt.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},bt.use=function(P){return Q.H.use(P)},bt.useActionState=function(P,q,se){return Q.H.useActionState(P,q,se)},bt.useCallback=function(P,q){return Q.H.useCallback(P,q)},bt.useContext=function(P){return Q.H.useContext(P)},bt.useDebugValue=function(){},bt.useDeferredValue=function(P,q){return Q.H.useDeferredValue(P,q)},bt.useEffect=function(P,q,se){var we=Q.H;if(typeof se=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return we.useEffect(P,q)},bt.useId=function(){return Q.H.useId()},bt.useImperativeHandle=function(P,q,se){return Q.H.useImperativeHandle(P,q,se)},bt.useInsertionEffect=function(P,q){return Q.H.useInsertionEffect(P,q)},bt.useLayoutEffect=function(P,q){return Q.H.useLayoutEffect(P,q)},bt.useMemo=function(P,q){return Q.H.useMemo(P,q)},bt.useOptimistic=function(P,q){return Q.H.useOptimistic(P,q)},bt.useReducer=function(P,q,se){return Q.H.useReducer(P,q,se)},bt.useRef=function(P){return Q.H.useRef(P)},bt.useState=function(P){return Q.H.useState(P)},bt.useSyncExternalStore=function(P,q,se){return Q.H.useSyncExternalStore(P,q,se)},bt.useTransition=function(){return Q.H.useTransition()},bt.version="19.1.0",bt}var Cp;function xA(){return Cp||(Cp=1,nh.exports=yC()),nh.exports}var rh={exports:{}},Wa={};/**
 * @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 xp;function EC(){if(xp)return Wa;xp=1;var n=xA();function t(A){var h="https://react.dev/errors/"+A;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+A+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(A,h,y){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:E==null?null:""+E,children:A,containerInfo:h,implementation:y}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(A,h){if(A==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Wa.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Wa.createPortal=function(A,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(A,h,null,y)},Wa.flushSync=function(A){var h=c.T,y=i.p;try{if(c.T=null,i.p=2,A)return A()}finally{c.T=h,i.p=y,i.d.f()}},Wa.preconnect=function(A,h){typeof A=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(A,h))},Wa.prefetchDNS=function(A){typeof A=="string"&&i.d.D(A)},Wa.preinit=function(A,h){if(typeof A=="string"&&h&&typeof h.as=="string"){var y=h.as,E=d(y,h.crossOrigin),C=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?i.d.S(A,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:E,integrity:C,fetchPriority:x}):y==="script"&&i.d.X(A,{crossOrigin:E,integrity:C,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Wa.preinitModule=function(A,h){if(typeof A=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=d(h.as,h.crossOrigin);i.d.M(A,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(A)},Wa.preload=function(A,h){if(typeof A=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,E=d(y,h.crossOrigin);i.d.L(A,y,{crossOrigin:E,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Wa.preloadModule=function(A,h){if(typeof A=="string")if(h){var y=d(h.as,h.crossOrigin);i.d.m(A,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(A)},Wa.requestFormReset=function(A){i.d.r(A)},Wa.unstable_batchedUpdates=function(A,h){return A(h)},Wa.useFormState=function(A,h,y){return c.H.useFormState(A,h,y)},Wa.useFormStatus=function(){return c.H.useHostTransitionStatus()},Wa.version="19.1.0",Wa}var Np;function bC(){if(Np)return rh.exports;Np=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),rh.exports=EC(),rh.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 Ip;function wC(){if(Ip)return cl;Ip=1;var n=pC(),t=xA(),r=bC();function i(e){var a="https://react.dev/errors/"+e;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var a=e,s=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(s=a.return),e=a.return;while(e)}return a.tag===3?s:null}function c(e){if(e.tag===13){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function d(e){if(l(e)!==e)throw Error(i(188))}function A(e){var a=e.alternate;if(!a){if(a=l(e),a===null)throw Error(i(188));return a!==e?null:e}for(var s=e,u=a;;){var g=s.return;if(g===null)break;var p=g.alternate;if(p===null){if(u=g.return,u!==null){s=u;continue}break}if(g.child===p.child){for(p=g.child;p;){if(p===s)return d(g),e;if(p===u)return d(g),a;p=p.sibling}throw Error(i(188))}if(s.return!==u.return)s=g,u=p;else{for(var T=!1,O=g.child;O;){if(O===s){T=!0,s=g,u=p;break}if(O===u){T=!0,u=g,s=p;break}O=O.sibling}if(!T){for(O=p.child;O;){if(O===s){T=!0,s=p,u=g;break}if(O===u){T=!0,u=p,s=g;break}O=O.sibling}if(!T)throw Error(i(189))}}if(s.alternate!==u)throw Error(i(190))}if(s.tag!==3)throw Error(i(188));return s.stateNode.current===s?e:a}function h(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=h(e),a!==null)return a;e=e.sibling}return null}var y=Object.assign,E=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),U=Symbol.for("react.consumer"),B=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=Y&&e[Y]||e["@@iterator"],typeof e=="function"?e:null)}var Z=Symbol.for("react.client.reference");function ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Z?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case k:return"Profiler";case I:return"StrictMode";case Q:return"Suspense";case V:return"SuspenseList";case z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case B:return(e.displayName||"Context")+".Provider";case U:return(e._context.displayName||"Context")+".Consumer";case F:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return a=e.displayName||null,a!==null?a:ce(e.type)||"Memo";case J:a=e._payload,e=e._init;try{return ce(e(a))}catch{}}return null}var pe=Array.isArray,X=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},je=[],P=-1;function q(e){return{current:e}}function se(e){0>P||(e.current=je[P],je[P]=null,P--)}function we(e,a){P++,je[P]=e.current,e.current=a}var Ce=q(null),Be=q(null),Le=q(null),Je=q(null);function Ke(e,a){switch(we(Le,a),we(Be,e),we(Ce,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?K0(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=K0(a),e=q0(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(Ce),we(Ce,e)}function We(){se(Ce),se(Be),se(Le)}function dt(e){e.memoizedState!==null&&we(Je,e);var a=Ce.current,s=q0(a,e.type);a!==s&&(we(Be,e),we(Ce,s))}function fa(e){Be.current===e&&(se(Ce),se(Be)),Je.current===e&&(se(Je),rl._currentValue=ge)}var kt=Object.prototype.hasOwnProperty,mt=n.unstable_scheduleCallback,wt=n.unstable_cancelCallback,Gt=n.unstable_shouldYield,ke=n.unstable_requestPaint,He=n.unstable_now,it=n.unstable_getCurrentPriorityLevel,pt=n.unstable_ImmediatePriority,$=n.unstable_UserBlockingPriority,oe=n.unstable_NormalPriority,Ee=n.unstable_LowPriority,Fe=n.unstable_IdlePriority,_e=n.log,Ue=n.unstable_setDisableYieldValue,qe=null,M=null;function w(e){if(typeof _e=="function"&&Ue(e),M&&typeof M.setStrictMode=="function")try{M.setStrictMode(qe,e)}catch{}}var v=Math.clz32?Math.clz32:me,K=Math.log,ne=Math.LN2;function me(e){return e>>>=0,e===0?32:31-(K(e)/ne|0)|0}var xe=256,Pe=4194304;function Ie(e){var a=e&42;if(a!==0)return a;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ye(e,a,s){var u=e.pendingLanes;if(u===0)return 0;var g=0,p=e.suspendedLanes,T=e.pingedLanes;e=e.warmLanes;var O=u&134217727;return O!==0?(u=O&~p,u!==0?g=Ie(u):(T&=O,T!==0?g=Ie(T):s||(s=O&~e,s!==0&&(g=Ie(s))))):(O=u&~p,O!==0?g=Ie(O):T!==0?g=Ie(T):s||(s=u&~e,s!==0&&(g=Ie(s)))),g===0?0:a!==0&&a!==g&&(a&p)===0&&(p=g&-g,s=a&-a,p>=s||p===32&&(s&4194048)!==0)?a:g}function nt(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function Xe(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Jt(){var e=xe;return xe<<=1,(xe&4194048)===0&&(xe=256),e}function ft(){var e=Pe;return Pe<<=1,(Pe&62914560)===0&&(Pe=4194304),e}function Wt(e){for(var a=[],s=0;31>s;s++)a.push(e);return a}function Xt(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yn(e,a,s,u,g,p){var T=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var O=e.entanglements,ee=e.expirationTimes,Ae=e.hiddenUpdates;for(s=T&~s;0<s;){var Ne=31-v(s),Re=1<<Ne;O[Ne]=0,ee[Ne]=-1;var ye=Ae[Ne];if(ye!==null)for(Ae[Ne]=null,Ne=0;Ne<ye.length;Ne++){var be=ye[Ne];be!==null&&(be.lane&=-536870913)}s&=~Re}u!==0&&ze(e,u,0),p!==0&&g===0&&e.tag!==0&&(e.suspendedLanes|=p&~(T&~a))}function ze(e,a,s){e.pendingLanes|=a,e.suspendedLanes&=~a;var u=31-v(a);e.entangledLanes|=a,e.entanglements[u]=e.entanglements[u]|1073741824|s&4194090}function Nr(e,a){var s=e.entangledLanes|=a;for(e=e.entanglements;s;){var u=31-v(s),g=1<<u;g&a|e[u]&a&&(e[u]|=a),s&=~g}}function nr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ua(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ei(){var e=le.p;return e!==0?e:(e=window.event,e===void 0?32:fp(e.type))}function Fi(e,a){var s=le.p;try{return le.p=e,a()}finally{le.p=s}}var on=Math.random().toString(36).slice(2),Kt="__reactFiber$"+on,Na="__reactProps$"+on,na="__reactContainer$"+on,ti="__reactEvents$"+on,rr="__reactListeners$"+on,vs="__reactHandles$"+on,Qi="__reactResources$"+on,Bn="__reactMarker$"+on;function ha(e){delete e[Kt],delete e[Na],delete e[ti],delete e[rr],delete e[vs]}function Gn(e){var a=e[Kt];if(a)return a;for(var s=e.parentNode;s;){if(a=s[na]||s[Kt]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(e=X0(e);e!==null;){if(s=e[Kt])return s;e=X0(e)}return a}e=s,s=e.parentNode}return null}function ir(e){if(e=e[Kt]||e[na]){var a=e.tag;if(a===5||a===6||a===13||a===26||a===27||a===3)return e}return null}function Za(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e.stateNode;throw Error(i(33))}function Kn(e){var a=e[Qi];return a||(a=e[Qi]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function $t(e){e[Bn]=!0}var Hi=new Set,Ir={};function qn(e,a){Ia(e,a),Ia(e+"Capture",a)}function Ia(e,a){for(Ir[e]=a,e=0;e<a.length;e++)Hi.add(a[e])}var ln=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]*$"),ai={},zi={};function Cs(e){return kt.call(zi,e)?!0:kt.call(ai,e)?!1:ln.test(e)?zi[e]=!0:(ai[e]=!0,!1)}function Ln(e,a,s){if(Cs(a))if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(a);return}}e.setAttribute(a,""+s)}}function kr(e,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttribute(a,""+s)}}function Ka(e,a,s,u){if(u===null)e.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(a,s,""+u)}}var ni,Yn;function Dn(e){if(ni===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);ni=a&&a[1]||"",Yn=-1<s.stack.indexOf(`
    at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ni+e+Yn}var sa=!1;function ri(e,a){if(!e||sa)return"";sa=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){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(be){var ye=be}Reflect.construct(e,[],Re)}else{try{Re.call()}catch(be){ye=be}e.call(Re.prototype)}}else{try{throw Error()}catch(be){ye=be}(Re=e())&&typeof Re.catch=="function"&&Re.catch(function(){})}}catch(be){if(be&&ye&&typeof be.stack=="string")return[be.stack,ye.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=u.DetermineComponentFrameRoot(),T=p[0],O=p[1];if(T&&O){var ee=T.split(`
`),Ae=O.split(`
`);for(g=u=0;u<ee.length&&!ee[u].includes("DetermineComponentFrameRoot");)u++;for(;g<Ae.length&&!Ae[g].includes("DetermineComponentFrameRoot");)g++;if(u===ee.length||g===Ae.length)for(u=ee.length-1,g=Ae.length-1;1<=u&&0<=g&&ee[u]!==Ae[g];)g--;for(;1<=u&&0<=g;u--,g--)if(ee[u]!==Ae[g]){if(u!==1||g!==1)do if(u--,g--,0>g||ee[u]!==Ae[g]){var Ne=`
`+ee[u].replace(" at new "," at ");return e.displayName&&Ne.includes("<anonymous>")&&(Ne=Ne.replace("<anonymous>",e.displayName)),Ne}while(1<=u&&0<=g);break}}}finally{sa=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Dn(s):""}function xs(e){switch(e.tag){case 26:case 27:case 5:return Dn(e.type);case 16:return Dn("Lazy");case 13:return Dn("Suspense");case 19:return Dn("SuspenseList");case 0:case 15:return ri(e.type,!1);case 11:return ri(e.type.render,!1);case 1:return ri(e.type,!0);case 31:return Dn("Activity");default:return""}}function Ns(e){try{var a="";do a+=xs(e),e=e.return;while(e);return a}catch(s){return`
Error generating stack: `+s.message+`
`+s.stack}}function qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Et(e){var a=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function _t(e){var a=Et(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,a),u=""+e[a];if(!e.hasOwnProperty(a)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var g=s.get,p=s.set;return Object.defineProperty(e,a,{configurable:!0,get:function(){return g.call(this)},set:function(T){u=""+T,p.call(this,T)}}),Object.defineProperty(e,a,{enumerable:s.enumerable}),{getValue:function(){return u},setValue:function(T){u=""+T},stopTracking:function(){e._valueTracker=null,delete e[a]}}}}function Jn(e){e._valueTracker||(e._valueTracker=_t(e))}function sr(e){if(!e)return!1;var a=e._valueTracker;if(!a)return!0;var s=a.getValue(),u="";return e&&(u=Et(e)?e.checked?"true":"false":e.value),e=u,e!==s?(a.setValue(e),!0):!1}function Aa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var ii=/[\n"\\]/g;function Qa(e){return e.replace(ii,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Vi(e,a,s,u,g,p,T,O){e.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.type=T:e.removeAttribute("type"),a!=null?T==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+qt(a)):e.value!==""+qt(a)&&(e.value=""+qt(a)):T!=="submit"&&T!=="reset"||e.removeAttribute("value"),a!=null?Sr(e,T,qt(a)):s!=null?Sr(e,T,qt(s)):u!=null&&e.removeAttribute("value"),g==null&&p!=null&&(e.defaultChecked=!!p),g!=null&&(e.checked=g&&typeof g!="function"&&typeof g!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?e.name=""+qt(O):e.removeAttribute("name")}function or(e,a,s,u,g,p,T,O){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),a!=null||s!=null){if(!(p!=="submit"&&p!=="reset"||a!=null))return;s=s!=null?""+qt(s):"",a=a!=null?""+qt(a):s,O||a===e.value||(e.value=a),e.defaultValue=a}u=u??g,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=O?e.checked:!!u,e.defaultChecked=!!u,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(e.name=T)}function Sr(e,a,s){a==="number"&&Aa(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Rn(e,a,s,u){if(e=e.options,a){a={};for(var g=0;g<s.length;g++)a["$"+s[g]]=!0;for(s=0;s<e.length;s++)g=a.hasOwnProperty("$"+e[s].value),e[s].selected!==g&&(e[s].selected=g),g&&u&&(e[s].defaultSelected=!0)}else{for(s=""+qt(s),a=null,g=0;g<e.length;g++){if(e[g].value===s){e[g].selected=!0,u&&(e[g].defaultSelected=!0);return}a!==null||e[g].disabled||(a=e[g])}a!==null&&(a.selected=!0)}}function si(e,a,s){if(a!=null&&(a=""+qt(a),a!==e.value&&(e.value=a),s==null)){e.defaultValue!==a&&(e.defaultValue=a);return}e.defaultValue=s!=null?""+qt(s):""}function Gi(e,a,s,u){if(a==null){if(u!=null){if(s!=null)throw Error(i(92));if(pe(u)){if(1<u.length)throw Error(i(93));u=u[0]}s=u}s==null&&(s=""),a=s}s=qt(a),e.defaultValue=s,u=e.textContent,u===s&&u!==""&&u!==null&&(e.value=u)}function Un(e,a){if(a){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=a;return}}e.textContent=a}var Tr=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 R(e,a,s){var u=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="":u?e.setProperty(a,s):typeof s!="number"||s===0||Tr.has(a)?a==="float"?e.cssFloat=s:e[a]=(""+s).trim():e[a]=s+"px"}function j(e,a,s){if(a!=null&&typeof a!="object")throw Error(i(62));if(e=e.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var g in a)u=a[g],a.hasOwnProperty(g)&&s[g]!==u&&R(e,g,u)}else for(var p in a)a.hasOwnProperty(p)&&R(e,p,a[p])}function H(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ie=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"]]),Te=/^[\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 De(e){return Te.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Qe=null;function Ge(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var St=null,Ve=null;function ka(e){var a=ir(e);if(a&&(e=a.stateNode)){var s=e[Na]||null;e:switch(e=a.stateNode,a.type){case"input":if(Vi(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Qa(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var u=s[a];if(u!==e&&u.form===e.form){var g=u[Na]||null;if(!g)throw Error(i(90));Vi(u,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(a=0;a<s.length;a++)u=s[a],u.form===e.form&&sr(u)}break e;case"textarea":si(e,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Rn(e,!!s.multiple,a,!1)}}}var oa=!1;function en(e,a,s){if(oa)return e(a,s);oa=!0;try{var u=e(a);return u}finally{if(oa=!1,(St!==null||Ve!==null)&&(bu(),St&&(a=St,e=Ve,Ve=St=null,ka(a),e)))for(a=0;a<e.length;a++)ka(e[a])}}function En(e,a){var s=e.stateNode;if(s===null)return null;var u=s[Na]||null;if(u===null)return null;s=u[a];e:switch(a){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)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(i(231,a,typeof s));return s}var zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zt=!1;if(zt)try{var qa={};Object.defineProperty(qa,"passive",{get:function(){Zt=!0}}),window.addEventListener("test",qa,qa),window.removeEventListener("test",qa,qa)}catch{Zt=!1}var ga=null,m=null,b=null;function D(){if(b)return b;var e,a=m,s=a.length,u,g="value"in ga?ga.value:ga.textContent,p=g.length;for(e=0;e<s&&a[e]===g[e];e++);var T=s-e;for(u=1;u<=T&&a[s-u]===g[p-u];u++);return b=g.slice(e,1<u?1-u:void 0)}function _(e){var a=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&a===13&&(e=13)):e=a,e===10&&(e=13),32<=e||e===13?e:0}function te(){return!0}function fe(){return!1}function ve(e){function a(s,u,g,p,T){this._reactName=s,this._targetInst=g,this.type=u,this.nativeEvent=p,this.target=T,this.currentTarget=null;for(var O in e)e.hasOwnProperty(O)&&(s=e[O],this[O]=s?s(p):p[O]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?te:fe,this.isPropagationStopped=fe,this}return y(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=te)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=te)},persist:function(){},isPersistent:te}),a}var $e={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yt=ve($e),At=y({},$e,{view:0,detail:0}),ea=ve(At),Ma,Is,Ki,qi=y({},At,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ki&&(Ki&&e.type==="mousemove"?(Ma=e.screenX-Ki.screenX,Is=e.screenY-Ki.screenY):Is=Ma=0,Ki=e),Ma)},movementY:function(e){return"movementY"in e?e.movementY:Is}}),Ml=ve(qi),jl=y({},qi,{dataTransfer:0}),Fc=ve(jl),Qc=y({},At,{relatedTarget:0}),bo=ve(Qc),Hc=y({},$e,{animationName:0,elapsedTime:0,pseudoElement:0}),zc=ve(Hc),Vc=y({},$e,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gc=ve(Vc),Kc=y({},$e,{data:0}),wo=ve(Kc),qc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yc={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"},Jc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wc(e){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(e):(e=Jc[e])?!!a[e]:!1}function vo(){return Wc}var Xc=y({},At,{key:function(e){if(e.key){var a=qc[e.key]||e.key;if(a!=="Unidentified")return a}return e.type==="keypress"?(e=_(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Yc[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vo,charCode:function(e){return e.type==="keypress"?_(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$c=ve(Xc),Ol=y({},qi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_l=ve(Ol),Zc=y({},At,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vo}),ed=ve(Zc),td=y({},$e,{propertyName:0,elapsedTime:0,pseudoElement:0}),ad=ve(td),nd=y({},qi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pl=ve(nd),rd=y({},$e,{newState:0,oldState:0}),id=ve(rd),sd=[9,13,27,32],oi=zt&&"CompositionEvent"in window,li=null;zt&&"documentMode"in document&&(li=document.documentMode);var Fl=zt&&"TextEvent"in window&&!li,Co=zt&&(!oi||li&&8<li&&11>=li),de=" ",Me=!1;function Ze(e,a){switch(e){case"keyup":return sd.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function st(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lt=!1;function Lt(e,a){switch(e){case"compositionend":return st(a);case"keypress":return a.which!==32?null:(Me=!0,de);case"textInput":return e=a.data,e===de&&Me?null:e;default:return null}}function bn(e,a){if(lt)return e==="compositionend"||!oi&&Ze(e,a)?(e=D(),b=m=ga=null,lt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Co&&a.locale!=="ko"?null:a.data;default:return null}}var un={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 Ya(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a==="input"?!!un[e.type]:a==="textarea"}function cn(e,a,s,u){St?Ve?Ve.push(u):Ve=[u]:St=u,a=Iu(a,"onChange"),0<a.length&&(s=new yt("onChange","change",null,s,u),e.push({event:s,listeners:a}))}var Br=null,wn=null;function od(e){Q0(e,0)}function Ql(e){var a=Za(e);if(sr(a))return e}function lg(e,a){if(e==="change")return a}var ug=!1;if(zt){var ld;if(zt){var ud="oninput"in document;if(!ud){var cg=document.createElement("div");cg.setAttribute("oninput","return;"),ud=typeof cg.oninput=="function"}ld=ud}else ld=!1;ug=ld&&(!document.documentMode||9<document.documentMode)}function dg(){Br&&(Br.detachEvent("onpropertychange",fg),wn=Br=null)}function fg(e){if(e.propertyName==="value"&&Ql(wn)){var a=[];cn(a,wn,e,Ge(e)),en(od,a)}}function Qw(e,a,s){e==="focusin"?(dg(),Br=a,wn=s,Br.attachEvent("onpropertychange",fg)):e==="focusout"&&dg()}function Hw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ql(wn)}function zw(e,a){if(e==="click")return Ql(a)}function Vw(e,a){if(e==="input"||e==="change")return Ql(a)}function Gw(e,a){return e===a&&(e!==0||1/e===1/a)||e!==e&&a!==a}var vn=typeof Object.is=="function"?Object.is:Gw;function xo(e,a){if(vn(e,a))return!0;if(typeof e!="object"||e===null||typeof a!="object"||a===null)return!1;var s=Object.keys(e),u=Object.keys(a);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var g=s[u];if(!kt.call(a,g)||!vn(e[g],a[g]))return!1}return!0}function hg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ag(e,a){var s=hg(e);e=0;for(var u;s;){if(s.nodeType===3){if(u=e+s.textContent.length,e<=a&&u>=a)return{node:s,offset:a-e};e=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=hg(s)}}function gg(e,a){return e&&a?e===a?!0:e&&e.nodeType===3?!1:a&&a.nodeType===3?gg(e,a.parentNode):"contains"in e?e.contains(a):e.compareDocumentPosition?!!(e.compareDocumentPosition(a)&16):!1:!1}function mg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var a=Aa(e.document);a instanceof e.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)e=a.contentWindow;else break;a=Aa(e.document)}return a}function cd(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a&&(a==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||a==="textarea"||e.contentEditable==="true")}var Kw=zt&&"documentMode"in document&&11>=document.documentMode,ks=null,dd=null,No=null,fd=!1;function pg(e,a,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;fd||ks==null||ks!==Aa(u)||(u=ks,"selectionStart"in u&&cd(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}),No&&xo(No,u)||(No=u,u=Iu(dd,"onSelect"),0<u.length&&(a=new yt("onSelect","select",null,a,s),e.push({event:a,listeners:u}),a.target=ks)))}function Yi(e,a){var s={};return s[e.toLowerCase()]=a.toLowerCase(),s["Webkit"+e]="webkit"+a,s["Moz"+e]="moz"+a,s}var Ss={animationend:Yi("Animation","AnimationEnd"),animationiteration:Yi("Animation","AnimationIteration"),animationstart:Yi("Animation","AnimationStart"),transitionrun:Yi("Transition","TransitionRun"),transitionstart:Yi("Transition","TransitionStart"),transitioncancel:Yi("Transition","TransitionCancel"),transitionend:Yi("Transition","TransitionEnd")},hd={},yg={};zt&&(yg=document.createElement("div").style,"AnimationEvent"in window||(delete Ss.animationend.animation,delete Ss.animationiteration.animation,delete Ss.animationstart.animation),"TransitionEvent"in window||delete Ss.transitionend.transition);function Ji(e){if(hd[e])return hd[e];if(!Ss[e])return e;var a=Ss[e],s;for(s in a)if(a.hasOwnProperty(s)&&s in yg)return hd[e]=a[s];return e}var Eg=Ji("animationend"),bg=Ji("animationiteration"),wg=Ji("animationstart"),qw=Ji("transitionrun"),Yw=Ji("transitionstart"),Jw=Ji("transitioncancel"),vg=Ji("transitionend"),Cg=new Map,Ad="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(" ");Ad.push("scrollEnd");function Wn(e,a){Cg.set(e,a),qn(a,[e])}var xg=new WeakMap;function Mn(e,a){if(typeof e=="object"&&e!==null){var s=xg.get(e);return s!==void 0?s:(a={value:e,source:a,stack:Ns(a)},xg.set(e,a),a)}return{value:e,source:a,stack:Ns(a)}}var jn=[],Ts=0,gd=0;function Hl(){for(var e=Ts,a=gd=Ts=0;a<e;){var s=jn[a];jn[a++]=null;var u=jn[a];jn[a++]=null;var g=jn[a];jn[a++]=null;var p=jn[a];if(jn[a++]=null,u!==null&&g!==null){var T=u.pending;T===null?g.next=g:(g.next=T.next,T.next=g),u.pending=g}p!==0&&Ng(s,g,p)}}function zl(e,a,s,u){jn[Ts++]=e,jn[Ts++]=a,jn[Ts++]=s,jn[Ts++]=u,gd|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function md(e,a,s,u){return zl(e,a,s,u),Vl(e)}function Bs(e,a){return zl(e,null,null,a),Vl(e)}function Ng(e,a,s){e.lanes|=s;var u=e.alternate;u!==null&&(u.lanes|=s);for(var g=!1,p=e.return;p!==null;)p.childLanes|=s,u=p.alternate,u!==null&&(u.childLanes|=s),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(g=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,g&&a!==null&&(g=31-v(s),e=p.hiddenUpdates,u=e[g],u===null?e[g]=[a]:u.push(a),a.lane=s|536870912),p):null}function Vl(e){if(50<Wo)throw Wo=0,Cf=null,Error(i(185));for(var a=e.return;a!==null;)e=a,a=e.return;return e.tag===3?e.stateNode:null}var Ls={};function Ww(e,a,s,u){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,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 Cn(e,a,s,u){return new Ww(e,a,s,u)}function pd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Lr(e,a){var s=e.alternate;return s===null?(s=Cn(e.tag,a,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=a,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,a=e.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Ig(e,a){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=a,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,a=s.dependencies,e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),e}function Gl(e,a,s,u,g,p){var T=0;if(u=e,typeof e=="function")pd(e)&&(T=1);else if(typeof e=="string")T=$v(e,s,Ce.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case z:return e=Cn(31,s,a,g),e.elementType=z,e.lanes=p,e;case N:return Wi(s.children,g,p,a);case I:T=8,g|=24;break;case k:return e=Cn(12,s,a,g|2),e.elementType=k,e.lanes=p,e;case Q:return e=Cn(13,s,a,g),e.elementType=Q,e.lanes=p,e;case V:return e=Cn(19,s,a,g),e.elementType=V,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case S:case B:T=10;break e;case U:T=9;break e;case F:T=11;break e;case W:T=14;break e;case J:T=16,u=null;break e}T=29,s=Error(i(130,e===null?"null":typeof e,"")),u=null}return a=Cn(T,s,a,g),a.elementType=e,a.type=u,a.lanes=p,a}function Wi(e,a,s,u){return e=Cn(7,e,u,a),e.lanes=s,e}function yd(e,a,s){return e=Cn(6,e,null,a),e.lanes=s,e}function Ed(e,a,s){return a=Cn(4,e.children!==null?e.children:[],e.key,a),a.lanes=s,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}var Ds=[],Rs=0,Kl=null,ql=0,On=[],_n=0,Xi=null,Dr=1,Rr="";function $i(e,a){Ds[Rs++]=ql,Ds[Rs++]=Kl,Kl=e,ql=a}function kg(e,a,s){On[_n++]=Dr,On[_n++]=Rr,On[_n++]=Xi,Xi=e;var u=Dr;e=Rr;var g=32-v(u)-1;u&=~(1<<g),s+=1;var p=32-v(a)+g;if(30<p){var T=g-g%5;p=(u&(1<<T)-1).toString(32),u>>=T,g-=T,Dr=1<<32-v(a)+g|s<<g|u,Rr=p+e}else Dr=1<<p|s<<g|u,Rr=e}function bd(e){e.return!==null&&($i(e,1),kg(e,1,0))}function wd(e){for(;e===Kl;)Kl=Ds[--Rs],Ds[Rs]=null,ql=Ds[--Rs],Ds[Rs]=null;for(;e===Xi;)Xi=On[--_n],On[_n]=null,Rr=On[--_n],On[_n]=null,Dr=On[--_n],On[_n]=null}var tn=null,la=null,Dt=!1,Zi=null,lr=!1,vd=Error(i(519));function es(e){var a=Error(i(418,""));throw So(Mn(a,e)),vd}function Sg(e){var a=e.stateNode,s=e.type,u=e.memoizedProps;switch(a[Kt]=e,a[Na]=u,s){case"dialog":It("cancel",a),It("close",a);break;case"iframe":case"object":case"embed":It("load",a);break;case"video":case"audio":for(s=0;s<$o.length;s++)It($o[s],a);break;case"source":It("error",a);break;case"img":case"image":case"link":It("error",a),It("load",a);break;case"details":It("toggle",a);break;case"input":It("invalid",a),or(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Jn(a);break;case"select":It("invalid",a);break;case"textarea":It("invalid",a),Gi(a,u.value,u.defaultValue,u.children),Jn(a)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||u.suppressHydrationWarning===!0||G0(a.textContent,s)?(u.popover!=null&&(It("beforetoggle",a),It("toggle",a)),u.onScroll!=null&&It("scroll",a),u.onScrollEnd!=null&&It("scrollend",a),u.onClick!=null&&(a.onclick=ku),a=!0):a=!1,a||es(e)}function Tg(e){for(tn=e.return;tn;)switch(tn.tag){case 5:case 13:lr=!1;return;case 27:case 3:lr=!0;return;default:tn=tn.return}}function Io(e){if(e!==tn)return!1;if(!Dt)return Tg(e),Dt=!0,!1;var a=e.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||Pf(e.type,e.memoizedProps)),s=!s),s&&la&&es(e),Tg(e),a===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,a=0;e;){if(e.nodeType===8)if(s=e.data,s==="/$"){if(a===0){la=$n(e.nextSibling);break e}a--}else s!=="$"&&s!=="$!"&&s!=="$?"||a++;e=e.nextSibling}la=null}}else a===27?(a=la,xi(e.type)?(e=zf,zf=null,la=e):la=a):la=tn?$n(e.stateNode.nextSibling):null;return!0}function ko(){la=tn=null,Dt=!1}function Bg(){var e=Zi;return e!==null&&(hn===null?hn=e:hn.push.apply(hn,e),Zi=null),e}function So(e){Zi===null?Zi=[e]:Zi.push(e)}var Cd=q(null),ts=null,Ur=null;function ui(e,a,s){we(Cd,a._currentValue),a._currentValue=s}function Mr(e){e._currentValue=Cd.current,se(Cd)}function xd(e,a,s){for(;e!==null;){var u=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),e===s)break;e=e.return}}function Nd(e,a,s,u){var g=e.child;for(g!==null&&(g.return=e);g!==null;){var p=g.dependencies;if(p!==null){var T=g.child;p=p.firstContext;e:for(;p!==null;){var O=p;p=g;for(var ee=0;ee<a.length;ee++)if(O.context===a[ee]){p.lanes|=s,O=p.alternate,O!==null&&(O.lanes|=s),xd(p.return,s,e),u||(T=null);break e}p=O.next}}else if(g.tag===18){if(T=g.return,T===null)throw Error(i(341));T.lanes|=s,p=T.alternate,p!==null&&(p.lanes|=s),xd(T,s,e),T=null}else T=g.child;if(T!==null)T.return=g;else for(T=g;T!==null;){if(T===e){T=null;break}if(g=T.sibling,g!==null){g.return=T.return,T=g;break}T=T.return}g=T}}function To(e,a,s,u){e=null;for(var g=a,p=!1;g!==null;){if(!p){if((g.flags&524288)!==0)p=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var T=g.alternate;if(T===null)throw Error(i(387));if(T=T.memoizedProps,T!==null){var O=g.type;vn(g.pendingProps.value,T.value)||(e!==null?e.push(O):e=[O])}}else if(g===Je.current){if(T=g.alternate,T===null)throw Error(i(387));T.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(e!==null?e.push(rl):e=[rl])}g=g.return}e!==null&&Nd(a,e,s,u),a.flags|=262144}function Yl(e){for(e=e.firstContext;e!==null;){if(!vn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function as(e){ts=e,Ur=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ja(e){return Lg(ts,e)}function Jl(e,a){return ts===null&&as(e),Lg(e,a)}function Lg(e,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},Ur===null){if(e===null)throw Error(i(308));Ur=a,e.dependencies={lanes:0,firstContext:a},e.flags|=524288}else Ur=Ur.next=a;return s}var Xw=typeof AbortController<"u"?AbortController:function(){var e=[],a=this.signal={aborted:!1,addEventListener:function(s,u){e.push(u)}};this.abort=function(){a.aborted=!0,e.forEach(function(s){return s()})}},$w=n.unstable_scheduleCallback,Zw=n.unstable_NormalPriority,Sa={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Id(){return{controller:new Xw,data:new Map,refCount:0}}function Bo(e){e.refCount--,e.refCount===0&&$w(Zw,function(){e.controller.abort()})}var Lo=null,kd=0,Us=0,Ms=null;function ev(e,a){if(Lo===null){var s=Lo=[];kd=0,Us=Bf(),Ms={status:"pending",value:void 0,then:function(u){s.push(u)}}}return kd++,a.then(Dg,Dg),a}function Dg(){if(--kd===0&&Lo!==null){Ms!==null&&(Ms.status="fulfilled");var e=Lo;Lo=null,Us=0,Ms=null;for(var a=0;a<e.length;a++)(0,e[a])()}}function tv(e,a){var s=[],u={status:"pending",value:null,reason:null,then:function(g){s.push(g)}};return e.then(function(){u.status="fulfilled",u.value=a;for(var g=0;g<s.length;g++)(0,s[g])(a)},function(g){for(u.status="rejected",u.reason=g,g=0;g<s.length;g++)(0,s[g])(void 0)}),u}var Rg=X.S;X.S=function(e,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&ev(e,a),Rg!==null&&Rg(e,a)};var ns=q(null);function Sd(){var e=ns.current;return e!==null?e:Yt.pooledCache}function Wl(e,a){a===null?we(ns,ns.current):we(ns,a.pool)}function Ug(){var e=Sd();return e===null?null:{parent:Sa._currentValue,pool:e}}var Do=Error(i(460)),Mg=Error(i(474)),Xl=Error(i(542)),Td={then:function(){}};function jg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $l(){}function Og(e,a,s){switch(s=e[s],s===void 0?e.push(a):s!==a&&(a.then($l,$l),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Pg(e),e;default:if(typeof a.status=="string")a.then($l,$l);else{if(e=Yt,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=a,e.status="pending",e.then(function(u){if(a.status==="pending"){var g=a;g.status="fulfilled",g.value=u}},function(u){if(a.status==="pending"){var g=a;g.status="rejected",g.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Pg(e),e}throw Ro=a,Do}}var Ro=null;function _g(){if(Ro===null)throw Error(i(459));var e=Ro;return Ro=null,e}function Pg(e){if(e===Do||e===Xl)throw Error(i(483))}var ci=!1;function Bd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ld(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function di(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fi(e,a,s){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(Mt&2)!==0){var g=u.pending;return g===null?a.next=a:(a.next=g.next,g.next=a),u.pending=a,a=Vl(e),Ng(e,null,s),a}return zl(e,u,a,s),Vl(e)}function Uo(e,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var u=a.lanes;u&=e.pendingLanes,s|=u,a.lanes=s,Nr(e,s)}}function Dd(e,a){var s=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var g=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var T={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};p===null?g=p=T:p=p.next=T,s=s.next}while(s!==null);p===null?g=p=a:p=p.next=a}else g=p=a;s={baseState:u.baseState,firstBaseUpdate:g,lastBaseUpdate:p,shared:u.shared,callbacks:u.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=a:e.next=a,s.lastBaseUpdate=a}var Rd=!1;function Mo(){if(Rd){var e=Ms;if(e!==null)throw e}}function jo(e,a,s,u){Rd=!1;var g=e.updateQueue;ci=!1;var p=g.firstBaseUpdate,T=g.lastBaseUpdate,O=g.shared.pending;if(O!==null){g.shared.pending=null;var ee=O,Ae=ee.next;ee.next=null,T===null?p=Ae:T.next=Ae,T=ee;var Ne=e.alternate;Ne!==null&&(Ne=Ne.updateQueue,O=Ne.lastBaseUpdate,O!==T&&(O===null?Ne.firstBaseUpdate=Ae:O.next=Ae,Ne.lastBaseUpdate=ee))}if(p!==null){var Re=g.baseState;T=0,Ne=Ae=ee=null,O=p;do{var ye=O.lane&-536870913,be=ye!==O.lane;if(be?(Tt&ye)===ye:(u&ye)===ye){ye!==0&&ye===Us&&(Rd=!0),Ne!==null&&(Ne=Ne.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var ct=e,ot=O;ye=a;var Qt=s;switch(ot.tag){case 1:if(ct=ot.payload,typeof ct=="function"){Re=ct.call(Qt,Re,ye);break e}Re=ct;break e;case 3:ct.flags=ct.flags&-65537|128;case 0:if(ct=ot.payload,ye=typeof ct=="function"?ct.call(Qt,Re,ye):ct,ye==null)break e;Re=y({},Re,ye);break e;case 2:ci=!0}}ye=O.callback,ye!==null&&(e.flags|=64,be&&(e.flags|=8192),be=g.callbacks,be===null?g.callbacks=[ye]:be.push(ye))}else be={lane:ye,tag:O.tag,payload:O.payload,callback:O.callback,next:null},Ne===null?(Ae=Ne=be,ee=Re):Ne=Ne.next=be,T|=ye;if(O=O.next,O===null){if(O=g.shared.pending,O===null)break;be=O,O=be.next,be.next=null,g.lastBaseUpdate=be,g.shared.pending=null}}while(!0);Ne===null&&(ee=Re),g.baseState=ee,g.firstBaseUpdate=Ae,g.lastBaseUpdate=Ne,p===null&&(g.shared.lanes=0),bi|=T,e.lanes=T,e.memoizedState=Re}}function Fg(e,a){if(typeof e!="function")throw Error(i(191,e));e.call(a)}function Qg(e,a){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Fg(s[e],a)}var js=q(null),Zl=q(0);function Hg(e,a){e=Hr,we(Zl,e),we(js,a),Hr=e|a.baseLanes}function Ud(){we(Zl,Hr),we(js,js.current)}function Md(){Hr=Zl.current,se(js),se(Zl)}var hi=0,Ct=null,Pt=null,Ea=null,eu=!1,Os=!1,rs=!1,tu=0,Oo=0,_s=null,av=0;function ma(){throw Error(i(321))}function jd(e,a){if(a===null)return!1;for(var s=0;s<a.length&&s<e.length;s++)if(!vn(e[s],a[s]))return!1;return!0}function Od(e,a,s,u,g,p){return hi=p,Ct=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,X.H=e===null||e.memoizedState===null?Nm:Im,rs=!1,p=s(u,g),rs=!1,Os&&(p=Vg(a,s,u,g)),zg(e),p}function zg(e){X.H=ou;var a=Pt!==null&&Pt.next!==null;if(hi=0,Ea=Pt=Ct=null,eu=!1,Oo=0,_s=null,a)throw Error(i(300));e===null||ja||(e=e.dependencies,e!==null&&Yl(e)&&(ja=!0))}function Vg(e,a,s,u){Ct=e;var g=0;do{if(Os&&(_s=null),Oo=0,Os=!1,25<=g)throw Error(i(301));if(g+=1,Ea=Pt=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}X.H=uv,p=a(s,u)}while(Os);return p}function nv(){var e=X.H,a=e.useState()[0];return a=typeof a.then=="function"?_o(a):a,e=e.useState()[0],(Pt!==null?Pt.memoizedState:null)!==e&&(Ct.flags|=1024),a}function _d(){var e=tu!==0;return tu=0,e}function Pd(e,a,s){a.updateQueue=e.updateQueue,a.flags&=-2053,e.lanes&=~s}function Fd(e){if(eu){for(e=e.memoizedState;e!==null;){var a=e.queue;a!==null&&(a.pending=null),e=e.next}eu=!1}hi=0,Ea=Pt=Ct=null,Os=!1,Oo=tu=0,_s=null}function dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ea===null?Ct.memoizedState=Ea=e:Ea=Ea.next=e,Ea}function ba(){if(Pt===null){var e=Ct.alternate;e=e!==null?e.memoizedState:null}else e=Pt.next;var a=Ea===null?Ct.memoizedState:Ea.next;if(a!==null)Ea=a,Pt=e;else{if(e===null)throw Ct.alternate===null?Error(i(467)):Error(i(310));Pt=e,e={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},Ea===null?Ct.memoizedState=Ea=e:Ea=Ea.next=e}return Ea}function Qd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _o(e){var a=Oo;return Oo+=1,_s===null&&(_s=[]),e=Og(_s,e,a),a=Ct,(Ea===null?a.memoizedState:Ea.next)===null&&(a=a.alternate,X.H=a===null||a.memoizedState===null?Nm:Im),e}function au(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _o(e);if(e.$$typeof===B)return Ja(e)}throw Error(i(438,String(e)))}function Hd(e){var a=null,s=Ct.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var u=Ct.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(g){return g.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=Qd(),Ct.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(e),u=0;u<e;u++)s[u]=G;return a.index++,s}function jr(e,a){return typeof a=="function"?a(e):a}function nu(e){var a=ba();return zd(a,Pt,e)}function zd(e,a,s){var u=e.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=s;var g=e.baseQueue,p=u.pending;if(p!==null){if(g!==null){var T=g.next;g.next=p.next,p.next=T}a.baseQueue=g=p,u.pending=null}if(p=e.baseState,g===null)e.memoizedState=p;else{a=g.next;var O=T=null,ee=null,Ae=a,Ne=!1;do{var Re=Ae.lane&-536870913;if(Re!==Ae.lane?(Tt&Re)===Re:(hi&Re)===Re){var ye=Ae.revertLane;if(ye===0)ee!==null&&(ee=ee.next={lane:0,revertLane:0,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null}),Re===Us&&(Ne=!0);else if((hi&ye)===ye){Ae=Ae.next,ye===Us&&(Ne=!0);continue}else Re={lane:0,revertLane:Ae.revertLane,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null},ee===null?(O=ee=Re,T=p):ee=ee.next=Re,Ct.lanes|=ye,bi|=ye;Re=Ae.action,rs&&s(p,Re),p=Ae.hasEagerState?Ae.eagerState:s(p,Re)}else ye={lane:Re,revertLane:Ae.revertLane,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null},ee===null?(O=ee=ye,T=p):ee=ee.next=ye,Ct.lanes|=Re,bi|=Re;Ae=Ae.next}while(Ae!==null&&Ae!==a);if(ee===null?T=p:ee.next=O,!vn(p,e.memoizedState)&&(ja=!0,Ne&&(s=Ms,s!==null)))throw s;e.memoizedState=p,e.baseState=T,e.baseQueue=ee,u.lastRenderedState=p}return g===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function Vd(e){var a=ba(),s=a.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=e;var u=s.dispatch,g=s.pending,p=a.memoizedState;if(g!==null){s.pending=null;var T=g=g.next;do p=e(p,T.action),T=T.next;while(T!==g);vn(p,a.memoizedState)||(ja=!0),a.memoizedState=p,a.baseQueue===null&&(a.baseState=p),s.lastRenderedState=p}return[p,u]}function Gg(e,a,s){var u=Ct,g=ba(),p=Dt;if(p){if(s===void 0)throw Error(i(407));s=s()}else s=a();var T=!vn((Pt||g).memoizedState,s);T&&(g.memoizedState=s,ja=!0),g=g.queue;var O=Yg.bind(null,u,g,e);if(Po(2048,8,O,[e]),g.getSnapshot!==a||T||Ea!==null&&Ea.memoizedState.tag&1){if(u.flags|=2048,Ps(9,ru(),qg.bind(null,u,g,s,a),null),Yt===null)throw Error(i(349));p||(hi&124)!==0||Kg(u,a,s)}return s}function Kg(e,a,s){e.flags|=16384,e={getSnapshot:a,value:s},a=Ct.updateQueue,a===null?(a=Qd(),Ct.updateQueue=a,a.stores=[e]):(s=a.stores,s===null?a.stores=[e]:s.push(e))}function qg(e,a,s,u){a.value=s,a.getSnapshot=u,Jg(a)&&Wg(e)}function Yg(e,a,s){return s(function(){Jg(a)&&Wg(e)})}function Jg(e){var a=e.getSnapshot;e=e.value;try{var s=a();return!vn(e,s)}catch{return!0}}function Wg(e){var a=Bs(e,2);a!==null&&Sn(a,e,2)}function Gd(e){var a=dn();if(typeof e=="function"){var s=e;if(e=s(),rs){w(!0);try{s()}finally{w(!1)}}}return a.memoizedState=a.baseState=e,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jr,lastRenderedState:e},a}function Xg(e,a,s,u){return e.baseState=s,zd(e,Pt,typeof u=="function"?u:jr)}function rv(e,a,s,u,g){if(su(e))throw Error(i(485));if(e=a.action,e!==null){var p={payload:g,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){p.listeners.push(T)}};X.T!==null?s(!0):p.isTransition=!1,u(p),s=a.pending,s===null?(p.next=a.pending=p,$g(a,p)):(p.next=s.next,a.pending=s.next=p)}}function $g(e,a){var s=a.action,u=a.payload,g=e.state;if(a.isTransition){var p=X.T,T={};X.T=T;try{var O=s(g,u),ee=X.S;ee!==null&&ee(T,O),Zg(e,a,O)}catch(Ae){Kd(e,a,Ae)}finally{X.T=p}}else try{p=s(g,u),Zg(e,a,p)}catch(Ae){Kd(e,a,Ae)}}function Zg(e,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){em(e,a,u)},function(u){return Kd(e,a,u)}):em(e,a,s)}function em(e,a,s){a.status="fulfilled",a.value=s,tm(a),e.state=s,a=e.pending,a!==null&&(s=a.next,s===a?e.pending=null:(s=s.next,a.next=s,$g(e,s)))}function Kd(e,a,s){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=s,tm(a),a=a.next;while(a!==u)}e.action=null}function tm(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function am(e,a){return a}function nm(e,a){if(Dt){var s=Yt.formState;if(s!==null){e:{var u=Ct;if(Dt){if(la){t:{for(var g=la,p=lr;g.nodeType!==8;){if(!p){g=null;break t}if(g=$n(g.nextSibling),g===null){g=null;break t}}p=g.data,g=p==="F!"||p==="F"?g:null}if(g){la=$n(g.nextSibling),u=g.data==="F!";break e}}es(u)}u=!1}u&&(a=s[0])}}return s=dn(),s.memoizedState=s.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:am,lastRenderedState:a},s.queue=u,s=vm.bind(null,Ct,u),u.dispatch=s,u=Gd(!1),p=Xd.bind(null,Ct,!1,u.queue),u=dn(),g={state:a,dispatch:null,action:e,pending:null},u.queue=g,s=rv.bind(null,Ct,g,p,s),g.dispatch=s,u.memoizedState=e,[a,s,!1]}function rm(e){var a=ba();return im(a,Pt,e)}function im(e,a,s){if(a=zd(e,a,am)[0],e=nu(jr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=_o(a)}catch(T){throw T===Do?Xl:T}else u=a;a=ba();var g=a.queue,p=g.dispatch;return s!==a.memoizedState&&(Ct.flags|=2048,Ps(9,ru(),iv.bind(null,g,s),null)),[u,p,e]}function iv(e,a){e.action=a}function sm(e){var a=ba(),s=Pt;if(s!==null)return im(a,s,e);ba(),a=a.memoizedState,s=ba();var u=s.queue.dispatch;return s.memoizedState=e,[a,u,!1]}function Ps(e,a,s,u){return e={tag:e,create:s,deps:u,inst:a,next:null},a=Ct.updateQueue,a===null&&(a=Qd(),Ct.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=e.next=e:(u=s.next,s.next=e,e.next=u,a.lastEffect=e),e}function ru(){return{destroy:void 0,resource:void 0}}function om(){return ba().memoizedState}function iu(e,a,s,u){var g=dn();u=u===void 0?null:u,Ct.flags|=e,g.memoizedState=Ps(1|a,ru(),s,u)}function Po(e,a,s,u){var g=ba();u=u===void 0?null:u;var p=g.memoizedState.inst;Pt!==null&&u!==null&&jd(u,Pt.memoizedState.deps)?g.memoizedState=Ps(a,p,s,u):(Ct.flags|=e,g.memoizedState=Ps(1|a,p,s,u))}function lm(e,a){iu(8390656,8,e,a)}function um(e,a){Po(2048,8,e,a)}function cm(e,a){return Po(4,2,e,a)}function dm(e,a){return Po(4,4,e,a)}function fm(e,a){if(typeof a=="function"){e=e();var s=a(e);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return e=e(),a.current=e,function(){a.current=null}}function hm(e,a,s){s=s!=null?s.concat([e]):null,Po(4,4,fm.bind(null,a,e),s)}function qd(){}function Am(e,a){var s=ba();a=a===void 0?null:a;var u=s.memoizedState;return a!==null&&jd(a,u[1])?u[0]:(s.memoizedState=[e,a],e)}function gm(e,a){var s=ba();a=a===void 0?null:a;var u=s.memoizedState;if(a!==null&&jd(a,u[1]))return u[0];if(u=e(),rs){w(!0);try{e()}finally{w(!1)}}return s.memoizedState=[u,a],u}function Yd(e,a,s){return s===void 0||(hi&1073741824)!==0?e.memoizedState=a:(e.memoizedState=s,e=y0(),Ct.lanes|=e,bi|=e,s)}function mm(e,a,s,u){return vn(s,a)?s:js.current!==null?(e=Yd(e,s,u),vn(e,a)||(ja=!0),e):(hi&42)===0?(ja=!0,e.memoizedState=s):(e=y0(),Ct.lanes|=e,bi|=e,a)}function pm(e,a,s,u,g){var p=le.p;le.p=p!==0&&8>p?p:8;var T=X.T,O={};X.T=O,Xd(e,!1,a,s);try{var ee=g(),Ae=X.S;if(Ae!==null&&Ae(O,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var Ne=tv(ee,u);Fo(e,a,Ne,kn(e))}else Fo(e,a,u,kn(e))}catch(Re){Fo(e,a,{then:function(){},status:"rejected",reason:Re},kn())}finally{le.p=p,X.T=T}}function sv(){}function Jd(e,a,s,u){if(e.tag!==5)throw Error(i(476));var g=ym(e).queue;pm(e,g,a,ge,s===null?sv:function(){return Em(e),s(u)})}function ym(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jr,lastRenderedState:ge},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jr,lastRenderedState:s},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function Em(e){var a=ym(e).next.queue;Fo(e,a,{},kn())}function Wd(){return Ja(rl)}function bm(){return ba().memoizedState}function wm(){return ba().memoizedState}function ov(e){for(var a=e.return;a!==null;){switch(a.tag){case 24:case 3:var s=kn();e=di(s);var u=fi(a,e,s);u!==null&&(Sn(u,a,s),Uo(u,a,s)),a={cache:Id()},e.payload=a;return}a=a.return}}function lv(e,a,s){var u=kn();s={lane:u,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null},su(e)?Cm(a,s):(s=md(e,a,s,u),s!==null&&(Sn(s,e,u),xm(s,a,u)))}function vm(e,a,s){var u=kn();Fo(e,a,s,u)}function Fo(e,a,s,u){var g={lane:u,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};if(su(e))Cm(a,g);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=a.lastRenderedReducer,p!==null))try{var T=a.lastRenderedState,O=p(T,s);if(g.hasEagerState=!0,g.eagerState=O,vn(O,T))return zl(e,a,g,0),Yt===null&&Hl(),!1}catch{}finally{}if(s=md(e,a,g,u),s!==null)return Sn(s,e,u),xm(s,a,u),!0}return!1}function Xd(e,a,s,u){if(u={lane:2,revertLane:Bf(),action:u,hasEagerState:!1,eagerState:null,next:null},su(e)){if(a)throw Error(i(479))}else a=md(e,s,u,2),a!==null&&Sn(a,e,2)}function su(e){var a=e.alternate;return e===Ct||a!==null&&a===Ct}function Cm(e,a){Os=eu=!0;var s=e.pending;s===null?a.next=a:(a.next=s.next,s.next=a),e.pending=a}function xm(e,a,s){if((s&4194048)!==0){var u=a.lanes;u&=e.pendingLanes,s|=u,a.lanes=s,Nr(e,s)}}var ou={readContext:Ja,use:au,useCallback:ma,useContext:ma,useEffect:ma,useImperativeHandle:ma,useLayoutEffect:ma,useInsertionEffect:ma,useMemo:ma,useReducer:ma,useRef:ma,useState:ma,useDebugValue:ma,useDeferredValue:ma,useTransition:ma,useSyncExternalStore:ma,useId:ma,useHostTransitionStatus:ma,useFormState:ma,useActionState:ma,useOptimistic:ma,useMemoCache:ma,useCacheRefresh:ma},Nm={readContext:Ja,use:au,useCallback:function(e,a){return dn().memoizedState=[e,a===void 0?null:a],e},useContext:Ja,useEffect:lm,useImperativeHandle:function(e,a,s){s=s!=null?s.concat([e]):null,iu(4194308,4,fm.bind(null,a,e),s)},useLayoutEffect:function(e,a){return iu(4194308,4,e,a)},useInsertionEffect:function(e,a){iu(4,2,e,a)},useMemo:function(e,a){var s=dn();a=a===void 0?null:a;var u=e();if(rs){w(!0);try{e()}finally{w(!1)}}return s.memoizedState=[u,a],u},useReducer:function(e,a,s){var u=dn();if(s!==void 0){var g=s(a);if(rs){w(!0);try{s(a)}finally{w(!1)}}}else g=a;return u.memoizedState=u.baseState=g,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:g},u.queue=e,e=e.dispatch=lv.bind(null,Ct,e),[u.memoizedState,e]},useRef:function(e){var a=dn();return e={current:e},a.memoizedState=e},useState:function(e){e=Gd(e);var a=e.queue,s=vm.bind(null,Ct,a);return a.dispatch=s,[e.memoizedState,s]},useDebugValue:qd,useDeferredValue:function(e,a){var s=dn();return Yd(s,e,a)},useTransition:function(){var e=Gd(!1);return e=pm.bind(null,Ct,e.queue,!0,!1),dn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,a,s){var u=Ct,g=dn();if(Dt){if(s===void 0)throw Error(i(407));s=s()}else{if(s=a(),Yt===null)throw Error(i(349));(Tt&124)!==0||Kg(u,a,s)}g.memoizedState=s;var p={value:s,getSnapshot:a};return g.queue=p,lm(Yg.bind(null,u,p,e),[e]),u.flags|=2048,Ps(9,ru(),qg.bind(null,u,p,s,a),null),s},useId:function(){var e=dn(),a=Yt.identifierPrefix;if(Dt){var s=Rr,u=Dr;s=(u&~(1<<32-v(u)-1)).toString(32)+s,a="«"+a+"R"+s,s=tu++,0<s&&(a+="H"+s.toString(32)),a+="»"}else s=av++,a="«"+a+"r"+s.toString(32)+"»";return e.memoizedState=a},useHostTransitionStatus:Wd,useFormState:nm,useActionState:nm,useOptimistic:function(e){var a=dn();a.memoizedState=a.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Xd.bind(null,Ct,!0,s),s.dispatch=a,[e,a]},useMemoCache:Hd,useCacheRefresh:function(){return dn().memoizedState=ov.bind(null,Ct)}},Im={readContext:Ja,use:au,useCallback:Am,useContext:Ja,useEffect:um,useImperativeHandle:hm,useInsertionEffect:cm,useLayoutEffect:dm,useMemo:gm,useReducer:nu,useRef:om,useState:function(){return nu(jr)},useDebugValue:qd,useDeferredValue:function(e,a){var s=ba();return mm(s,Pt.memoizedState,e,a)},useTransition:function(){var e=nu(jr)[0],a=ba().memoizedState;return[typeof e=="boolean"?e:_o(e),a]},useSyncExternalStore:Gg,useId:bm,useHostTransitionStatus:Wd,useFormState:rm,useActionState:rm,useOptimistic:function(e,a){var s=ba();return Xg(s,Pt,e,a)},useMemoCache:Hd,useCacheRefresh:wm},uv={readContext:Ja,use:au,useCallback:Am,useContext:Ja,useEffect:um,useImperativeHandle:hm,useInsertionEffect:cm,useLayoutEffect:dm,useMemo:gm,useReducer:Vd,useRef:om,useState:function(){return Vd(jr)},useDebugValue:qd,useDeferredValue:function(e,a){var s=ba();return Pt===null?Yd(s,e,a):mm(s,Pt.memoizedState,e,a)},useTransition:function(){var e=Vd(jr)[0],a=ba().memoizedState;return[typeof e=="boolean"?e:_o(e),a]},useSyncExternalStore:Gg,useId:bm,useHostTransitionStatus:Wd,useFormState:sm,useActionState:sm,useOptimistic:function(e,a){var s=ba();return Pt!==null?Xg(s,Pt,e,a):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:Hd,useCacheRefresh:wm},Fs=null,Qo=0;function lu(e){var a=Qo;return Qo+=1,Fs===null&&(Fs=[]),Og(Fs,e,a)}function Ho(e,a){a=a.props.ref,e.ref=a!==void 0?a:null}function uu(e,a){throw a.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(a),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":e)))}function km(e){var a=e._init;return a(e._payload)}function Sm(e){function a(ue,re){if(e){var he=ue.deletions;he===null?(ue.deletions=[re],ue.flags|=16):he.push(re)}}function s(ue,re){if(!e)return null;for(;re!==null;)a(ue,re),re=re.sibling;return null}function u(ue){for(var re=new Map;ue!==null;)ue.key!==null?re.set(ue.key,ue):re.set(ue.index,ue),ue=ue.sibling;return re}function g(ue,re){return ue=Lr(ue,re),ue.index=0,ue.sibling=null,ue}function p(ue,re,he){return ue.index=he,e?(he=ue.alternate,he!==null?(he=he.index,he<re?(ue.flags|=67108866,re):he):(ue.flags|=67108866,re)):(ue.flags|=1048576,re)}function T(ue){return e&&ue.alternate===null&&(ue.flags|=67108866),ue}function O(ue,re,he,Se){return re===null||re.tag!==6?(re=yd(he,ue.mode,Se),re.return=ue,re):(re=g(re,he),re.return=ue,re)}function ee(ue,re,he,Se){var et=he.type;return et===N?Ne(ue,re,he.props.children,Se,he.key):re!==null&&(re.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===J&&km(et)===re.type)?(re=g(re,he.props),Ho(re,he),re.return=ue,re):(re=Gl(he.type,he.key,he.props,null,ue.mode,Se),Ho(re,he),re.return=ue,re)}function Ae(ue,re,he,Se){return re===null||re.tag!==4||re.stateNode.containerInfo!==he.containerInfo||re.stateNode.implementation!==he.implementation?(re=Ed(he,ue.mode,Se),re.return=ue,re):(re=g(re,he.children||[]),re.return=ue,re)}function Ne(ue,re,he,Se,et){return re===null||re.tag!==7?(re=Wi(he,ue.mode,Se,et),re.return=ue,re):(re=g(re,he),re.return=ue,re)}function Re(ue,re,he){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=yd(""+re,ue.mode,he),re.return=ue,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case C:return he=Gl(re.type,re.key,re.props,null,ue.mode,he),Ho(he,re),he.return=ue,he;case x:return re=Ed(re,ue.mode,he),re.return=ue,re;case J:var Se=re._init;return re=Se(re._payload),Re(ue,re,he)}if(pe(re)||ae(re))return re=Wi(re,ue.mode,he,null),re.return=ue,re;if(typeof re.then=="function")return Re(ue,lu(re),he);if(re.$$typeof===B)return Re(ue,Jl(ue,re),he);uu(ue,re)}return null}function ye(ue,re,he,Se){var et=re!==null?re.key:null;if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return et!==null?null:O(ue,re,""+he,Se);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case C:return he.key===et?ee(ue,re,he,Se):null;case x:return he.key===et?Ae(ue,re,he,Se):null;case J:return et=he._init,he=et(he._payload),ye(ue,re,he,Se)}if(pe(he)||ae(he))return et!==null?null:Ne(ue,re,he,Se,null);if(typeof he.then=="function")return ye(ue,re,lu(he),Se);if(he.$$typeof===B)return ye(ue,re,Jl(ue,he),Se);uu(ue,he)}return null}function be(ue,re,he,Se,et){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return ue=ue.get(he)||null,O(re,ue,""+Se,et);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case C:return ue=ue.get(Se.key===null?he:Se.key)||null,ee(re,ue,Se,et);case x:return ue=ue.get(Se.key===null?he:Se.key)||null,Ae(re,ue,Se,et);case J:var xt=Se._init;return Se=xt(Se._payload),be(ue,re,he,Se,et)}if(pe(Se)||ae(Se))return ue=ue.get(he)||null,Ne(re,ue,Se,et,null);if(typeof Se.then=="function")return be(ue,re,he,lu(Se),et);if(Se.$$typeof===B)return be(ue,re,he,Jl(re,Se),et);uu(re,Se)}return null}function ct(ue,re,he,Se){for(var et=null,xt=null,rt=re,ut=re=0,_a=null;rt!==null&&ut<he.length;ut++){rt.index>ut?(_a=rt,rt=null):_a=rt.sibling;var Bt=ye(ue,rt,he[ut],Se);if(Bt===null){rt===null&&(rt=_a);break}e&&rt&&Bt.alternate===null&&a(ue,rt),re=p(Bt,re,ut),xt===null?et=Bt:xt.sibling=Bt,xt=Bt,rt=_a}if(ut===he.length)return s(ue,rt),Dt&&$i(ue,ut),et;if(rt===null){for(;ut<he.length;ut++)rt=Re(ue,he[ut],Se),rt!==null&&(re=p(rt,re,ut),xt===null?et=rt:xt.sibling=rt,xt=rt);return Dt&&$i(ue,ut),et}for(rt=u(rt);ut<he.length;ut++)_a=be(rt,ue,ut,he[ut],Se),_a!==null&&(e&&_a.alternate!==null&&rt.delete(_a.key===null?ut:_a.key),re=p(_a,re,ut),xt===null?et=_a:xt.sibling=_a,xt=_a);return e&&rt.forEach(function(Ti){return a(ue,Ti)}),Dt&&$i(ue,ut),et}function ot(ue,re,he,Se){if(he==null)throw Error(i(151));for(var et=null,xt=null,rt=re,ut=re=0,_a=null,Bt=he.next();rt!==null&&!Bt.done;ut++,Bt=he.next()){rt.index>ut?(_a=rt,rt=null):_a=rt.sibling;var Ti=ye(ue,rt,Bt.value,Se);if(Ti===null){rt===null&&(rt=_a);break}e&&rt&&Ti.alternate===null&&a(ue,rt),re=p(Ti,re,ut),xt===null?et=Ti:xt.sibling=Ti,xt=Ti,rt=_a}if(Bt.done)return s(ue,rt),Dt&&$i(ue,ut),et;if(rt===null){for(;!Bt.done;ut++,Bt=he.next())Bt=Re(ue,Bt.value,Se),Bt!==null&&(re=p(Bt,re,ut),xt===null?et=Bt:xt.sibling=Bt,xt=Bt);return Dt&&$i(ue,ut),et}for(rt=u(rt);!Bt.done;ut++,Bt=he.next())Bt=be(rt,ue,ut,Bt.value,Se),Bt!==null&&(e&&Bt.alternate!==null&&rt.delete(Bt.key===null?ut:Bt.key),re=p(Bt,re,ut),xt===null?et=Bt:xt.sibling=Bt,xt=Bt);return e&&rt.forEach(function(cC){return a(ue,cC)}),Dt&&$i(ue,ut),et}function Qt(ue,re,he,Se){if(typeof he=="object"&&he!==null&&he.type===N&&he.key===null&&(he=he.props.children),typeof he=="object"&&he!==null){switch(he.$$typeof){case C:e:{for(var et=he.key;re!==null;){if(re.key===et){if(et=he.type,et===N){if(re.tag===7){s(ue,re.sibling),Se=g(re,he.props.children),Se.return=ue,ue=Se;break e}}else if(re.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===J&&km(et)===re.type){s(ue,re.sibling),Se=g(re,he.props),Ho(Se,he),Se.return=ue,ue=Se;break e}s(ue,re);break}else a(ue,re);re=re.sibling}he.type===N?(Se=Wi(he.props.children,ue.mode,Se,he.key),Se.return=ue,ue=Se):(Se=Gl(he.type,he.key,he.props,null,ue.mode,Se),Ho(Se,he),Se.return=ue,ue=Se)}return T(ue);case x:e:{for(et=he.key;re!==null;){if(re.key===et)if(re.tag===4&&re.stateNode.containerInfo===he.containerInfo&&re.stateNode.implementation===he.implementation){s(ue,re.sibling),Se=g(re,he.children||[]),Se.return=ue,ue=Se;break e}else{s(ue,re);break}else a(ue,re);re=re.sibling}Se=Ed(he,ue.mode,Se),Se.return=ue,ue=Se}return T(ue);case J:return et=he._init,he=et(he._payload),Qt(ue,re,he,Se)}if(pe(he))return ct(ue,re,he,Se);if(ae(he)){if(et=ae(he),typeof et!="function")throw Error(i(150));return he=et.call(he),ot(ue,re,he,Se)}if(typeof he.then=="function")return Qt(ue,re,lu(he),Se);if(he.$$typeof===B)return Qt(ue,re,Jl(ue,he),Se);uu(ue,he)}return typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint"?(he=""+he,re!==null&&re.tag===6?(s(ue,re.sibling),Se=g(re,he),Se.return=ue,ue=Se):(s(ue,re),Se=yd(he,ue.mode,Se),Se.return=ue,ue=Se),T(ue)):s(ue,re)}return function(ue,re,he,Se){try{Qo=0;var et=Qt(ue,re,he,Se);return Fs=null,et}catch(rt){if(rt===Do||rt===Xl)throw rt;var xt=Cn(29,rt,null,ue.mode);return xt.lanes=Se,xt.return=ue,xt}finally{}}}var Qs=Sm(!0),Tm=Sm(!1),Pn=q(null),ur=null;function Ai(e){var a=e.alternate;we(Ta,Ta.current&1),we(Pn,e),ur===null&&(a===null||js.current!==null||a.memoizedState!==null)&&(ur=e)}function Bm(e){if(e.tag===22){if(we(Ta,Ta.current),we(Pn,e),ur===null){var a=e.alternate;a!==null&&a.memoizedState!==null&&(ur=e)}}else gi()}function gi(){we(Ta,Ta.current),we(Pn,Pn.current)}function Or(e){se(Pn),ur===e&&(ur=null),se(Ta)}var Ta=q(0);function cu(e){for(var a=e;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||Hf(s)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function $d(e,a,s,u){a=e.memoizedState,s=s(u,a),s=s==null?a:y({},a,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Zd={enqueueSetState:function(e,a,s){e=e._reactInternals;var u=kn(),g=di(u);g.payload=a,s!=null&&(g.callback=s),a=fi(e,g,u),a!==null&&(Sn(a,e,u),Uo(a,e,u))},enqueueReplaceState:function(e,a,s){e=e._reactInternals;var u=kn(),g=di(u);g.tag=1,g.payload=a,s!=null&&(g.callback=s),a=fi(e,g,u),a!==null&&(Sn(a,e,u),Uo(a,e,u))},enqueueForceUpdate:function(e,a){e=e._reactInternals;var s=kn(),u=di(s);u.tag=2,a!=null&&(u.callback=a),a=fi(e,u,s),a!==null&&(Sn(a,e,s),Uo(a,e,s))}};function Lm(e,a,s,u,g,p,T){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,p,T):a.prototype&&a.prototype.isPureReactComponent?!xo(s,u)||!xo(g,p):!0}function Dm(e,a,s,u){e=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,u),a.state!==e&&Zd.enqueueReplaceState(a,a.state,null)}function is(e,a){var s=a;if("ref"in a){s={};for(var u in a)u!=="ref"&&(s[u]=a[u])}if(e=e.defaultProps){s===a&&(s=y({},s));for(var g in e)s[g]===void 0&&(s[g]=e[g])}return s}var du=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Rm(e){du(e)}function Um(e){console.error(e)}function Mm(e){du(e)}function fu(e,a){try{var s=e.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function jm(e,a,s){try{var u=e.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function ef(e,a,s){return s=di(s),s.tag=3,s.payload={element:null},s.callback=function(){fu(e,a)},s}function Om(e){return e=di(e),e.tag=3,e}function _m(e,a,s,u){var g=s.type.getDerivedStateFromError;if(typeof g=="function"){var p=u.value;e.payload=function(){return g(p)},e.callback=function(){jm(a,s,u)}}var T=s.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(e.callback=function(){jm(a,s,u),typeof g!="function"&&(wi===null?wi=new Set([this]):wi.add(this));var O=u.stack;this.componentDidCatch(u.value,{componentStack:O!==null?O:""})})}function cv(e,a,s,u,g){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=s.alternate,a!==null&&To(a,s,g,!0),s=Pn.current,s!==null){switch(s.tag){case 13:return ur===null?Nf():s.alternate===null&&ua===0&&(ua=3),s.flags&=-257,s.flags|=65536,s.lanes=g,u===Td?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([u]):a.add(u),kf(e,u,g)),!1;case 22:return s.flags|=65536,u===Td?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([u]):s.add(u)),kf(e,u,g)),!1}throw Error(i(435,s.tag))}return kf(e,u,g),Nf(),!1}if(Dt)return a=Pn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=g,u!==vd&&(e=Error(i(422),{cause:u}),So(Mn(e,s)))):(u!==vd&&(a=Error(i(423),{cause:u}),So(Mn(a,s))),e=e.current.alternate,e.flags|=65536,g&=-g,e.lanes|=g,u=Mn(u,s),g=ef(e.stateNode,u,g),Dd(e,g),ua!==4&&(ua=2)),!1;var p=Error(i(520),{cause:u});if(p=Mn(p,s),Jo===null?Jo=[p]:Jo.push(p),ua!==4&&(ua=2),a===null)return!0;u=Mn(u,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,e=g&-g,s.lanes|=e,e=ef(s.stateNode,u,e),Dd(s,e),!1;case 1:if(a=s.type,p=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(wi===null||!wi.has(p))))return s.flags|=65536,g&=-g,s.lanes|=g,g=Om(g),_m(g,e,s,u),Dd(s,g),!1}s=s.return}while(s!==null);return!1}var Pm=Error(i(461)),ja=!1;function Ha(e,a,s,u){a.child=e===null?Tm(a,null,s,u):Qs(a,e.child,s,u)}function Fm(e,a,s,u,g){s=s.render;var p=a.ref;if("ref"in u){var T={};for(var O in u)O!=="ref"&&(T[O]=u[O])}else T=u;return as(a),u=Od(e,a,s,T,p,g),O=_d(),e!==null&&!ja?(Pd(e,a,g),_r(e,a,g)):(Dt&&O&&bd(a),a.flags|=1,Ha(e,a,u,g),a.child)}function Qm(e,a,s,u,g){if(e===null){var p=s.type;return typeof p=="function"&&!pd(p)&&p.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=p,Hm(e,a,p,u,g)):(e=Gl(s.type,null,u,a,a.mode,g),e.ref=a.ref,e.return=a,a.child=e)}if(p=e.child,!uf(e,g)){var T=p.memoizedProps;if(s=s.compare,s=s!==null?s:xo,s(T,u)&&e.ref===a.ref)return _r(e,a,g)}return a.flags|=1,e=Lr(p,u),e.ref=a.ref,e.return=a,a.child=e}function Hm(e,a,s,u,g){if(e!==null){var p=e.memoizedProps;if(xo(p,u)&&e.ref===a.ref)if(ja=!1,a.pendingProps=u=p,uf(e,g))(e.flags&131072)!==0&&(ja=!0);else return a.lanes=e.lanes,_r(e,a,g)}return tf(e,a,s,u,g)}function zm(e,a,s){var u=a.pendingProps,g=u.children,p=e!==null?e.memoizedState:null;if(u.mode==="hidden"){if((a.flags&128)!==0){if(u=p!==null?p.baseLanes|s:s,e!==null){for(g=a.child=e.child,p=0;g!==null;)p=p|g.lanes|g.childLanes,g=g.sibling;a.childLanes=p&~u}else a.childLanes=0,a.child=null;return Vm(e,a,u,s)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wl(a,p!==null?p.cachePool:null),p!==null?Hg(a,p):Ud(),Bm(a);else return a.lanes=a.childLanes=536870912,Vm(e,a,p!==null?p.baseLanes|s:s,s)}else p!==null?(Wl(a,p.cachePool),Hg(a,p),gi(),a.memoizedState=null):(e!==null&&Wl(a,null),Ud(),gi());return Ha(e,a,g,s),a.child}function Vm(e,a,s,u){var g=Sd();return g=g===null?null:{parent:Sa._currentValue,pool:g},a.memoizedState={baseLanes:s,cachePool:g},e!==null&&Wl(a,null),Ud(),Bm(a),e!==null&&To(e,a,u,!0),null}function hu(e,a){var s=a.ref;if(s===null)e!==null&&e.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(i(284));(e===null||e.ref!==s)&&(a.flags|=4194816)}}function tf(e,a,s,u,g){return as(a),s=Od(e,a,s,u,void 0,g),u=_d(),e!==null&&!ja?(Pd(e,a,g),_r(e,a,g)):(Dt&&u&&bd(a),a.flags|=1,Ha(e,a,s,g),a.child)}function Gm(e,a,s,u,g,p){return as(a),a.updateQueue=null,s=Vg(a,u,s,g),zg(e),u=_d(),e!==null&&!ja?(Pd(e,a,p),_r(e,a,p)):(Dt&&u&&bd(a),a.flags|=1,Ha(e,a,s,p),a.child)}function Km(e,a,s,u,g){if(as(a),a.stateNode===null){var p=Ls,T=s.contextType;typeof T=="object"&&T!==null&&(p=Ja(T)),p=new s(u,p),a.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Zd,a.stateNode=p,p._reactInternals=a,p=a.stateNode,p.props=u,p.state=a.memoizedState,p.refs={},Bd(a),T=s.contextType,p.context=typeof T=="object"&&T!==null?Ja(T):Ls,p.state=a.memoizedState,T=s.getDerivedStateFromProps,typeof T=="function"&&($d(a,s,T,u),p.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(T=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),T!==p.state&&Zd.enqueueReplaceState(p,p.state,null),jo(a,u,p,g),Mo(),p.state=a.memoizedState),typeof p.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(e===null){p=a.stateNode;var O=a.memoizedProps,ee=is(s,O);p.props=ee;var Ae=p.context,Ne=s.contextType;T=Ls,typeof Ne=="object"&&Ne!==null&&(T=Ja(Ne));var Re=s.getDerivedStateFromProps;Ne=typeof Re=="function"||typeof p.getSnapshotBeforeUpdate=="function",O=a.pendingProps!==O,Ne||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(O||Ae!==T)&&Dm(a,p,u,T),ci=!1;var ye=a.memoizedState;p.state=ye,jo(a,u,p,g),Mo(),Ae=a.memoizedState,O||ye!==Ae||ci?(typeof Re=="function"&&($d(a,s,Re,u),Ae=a.memoizedState),(ee=ci||Lm(a,s,ee,u,ye,Ae,T))?(Ne||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(a.flags|=4194308)):(typeof p.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=Ae),p.props=u,p.state=Ae,p.context=T,u=ee):(typeof p.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{p=a.stateNode,Ld(e,a),T=a.memoizedProps,Ne=is(s,T),p.props=Ne,Re=a.pendingProps,ye=p.context,Ae=s.contextType,ee=Ls,typeof Ae=="object"&&Ae!==null&&(ee=Ja(Ae)),O=s.getDerivedStateFromProps,(Ae=typeof O=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(T!==Re||ye!==ee)&&Dm(a,p,u,ee),ci=!1,ye=a.memoizedState,p.state=ye,jo(a,u,p,g),Mo();var be=a.memoizedState;T!==Re||ye!==be||ci||e!==null&&e.dependencies!==null&&Yl(e.dependencies)?(typeof O=="function"&&($d(a,s,O,u),be=a.memoizedState),(Ne=ci||Lm(a,s,Ne,u,ye,be,ee)||e!==null&&e.dependencies!==null&&Yl(e.dependencies))?(Ae||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(u,be,ee),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(u,be,ee)),typeof p.componentDidUpdate=="function"&&(a.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof p.componentDidUpdate!="function"||T===e.memoizedProps&&ye===e.memoizedState||(a.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&ye===e.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=be),p.props=u,p.state=be,p.context=ee,u=Ne):(typeof p.componentDidUpdate!="function"||T===e.memoizedProps&&ye===e.memoizedState||(a.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&ye===e.memoizedState||(a.flags|=1024),u=!1)}return p=u,hu(e,a),u=(a.flags&128)!==0,p||u?(p=a.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:p.render(),a.flags|=1,e!==null&&u?(a.child=Qs(a,e.child,null,g),a.child=Qs(a,null,s,g)):Ha(e,a,s,g),a.memoizedState=p.state,e=a.child):e=_r(e,a,g),e}function qm(e,a,s,u){return ko(),a.flags|=256,Ha(e,a,s,u),a.child}var af={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function nf(e){return{baseLanes:e,cachePool:Ug()}}function rf(e,a,s){return e=e!==null?e.childLanes&~s:0,a&&(e|=Fn),e}function Ym(e,a,s){var u=a.pendingProps,g=!1,p=(a.flags&128)!==0,T;if((T=p)||(T=e!==null&&e.memoizedState===null?!1:(Ta.current&2)!==0),T&&(g=!0,a.flags&=-129),T=(a.flags&32)!==0,a.flags&=-33,e===null){if(Dt){if(g?Ai(a):gi(),Dt){var O=la,ee;if(ee=O){e:{for(ee=O,O=lr;ee.nodeType!==8;){if(!O){O=null;break e}if(ee=$n(ee.nextSibling),ee===null){O=null;break e}}O=ee}O!==null?(a.memoizedState={dehydrated:O,treeContext:Xi!==null?{id:Dr,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},ee=Cn(18,null,null,0),ee.stateNode=O,ee.return=a,a.child=ee,tn=a,la=null,ee=!0):ee=!1}ee||es(a)}if(O=a.memoizedState,O!==null&&(O=O.dehydrated,O!==null))return Hf(O)?a.lanes=32:a.lanes=536870912,null;Or(a)}return O=u.children,u=u.fallback,g?(gi(),g=a.mode,O=Au({mode:"hidden",children:O},g),u=Wi(u,g,s,null),O.return=a,u.return=a,O.sibling=u,a.child=O,g=a.child,g.memoizedState=nf(s),g.childLanes=rf(e,T,s),a.memoizedState=af,u):(Ai(a),sf(a,O))}if(ee=e.memoizedState,ee!==null&&(O=ee.dehydrated,O!==null)){if(p)a.flags&256?(Ai(a),a.flags&=-257,a=of(e,a,s)):a.memoizedState!==null?(gi(),a.child=e.child,a.flags|=128,a=null):(gi(),g=u.fallback,O=a.mode,u=Au({mode:"visible",children:u.children},O),g=Wi(g,O,s,null),g.flags|=2,u.return=a,g.return=a,u.sibling=g,a.child=u,Qs(a,e.child,null,s),u=a.child,u.memoizedState=nf(s),u.childLanes=rf(e,T,s),a.memoizedState=af,a=g);else if(Ai(a),Hf(O)){if(T=O.nextSibling&&O.nextSibling.dataset,T)var Ae=T.dgst;T=Ae,u=Error(i(419)),u.stack="",u.digest=T,So({value:u,source:null,stack:null}),a=of(e,a,s)}else if(ja||To(e,a,s,!1),T=(s&e.childLanes)!==0,ja||T){if(T=Yt,T!==null&&(u=s&-s,u=(u&42)!==0?1:nr(u),u=(u&(T.suspendedLanes|s))!==0?0:u,u!==0&&u!==ee.retryLane))throw ee.retryLane=u,Bs(e,u),Sn(T,e,u),Pm;O.data==="$?"||Nf(),a=of(e,a,s)}else O.data==="$?"?(a.flags|=192,a.child=e.child,a=null):(e=ee.treeContext,la=$n(O.nextSibling),tn=a,Dt=!0,Zi=null,lr=!1,e!==null&&(On[_n++]=Dr,On[_n++]=Rr,On[_n++]=Xi,Dr=e.id,Rr=e.overflow,Xi=a),a=sf(a,u.children),a.flags|=4096);return a}return g?(gi(),g=u.fallback,O=a.mode,ee=e.child,Ae=ee.sibling,u=Lr(ee,{mode:"hidden",children:u.children}),u.subtreeFlags=ee.subtreeFlags&65011712,Ae!==null?g=Lr(Ae,g):(g=Wi(g,O,s,null),g.flags|=2),g.return=a,u.return=a,u.sibling=g,a.child=u,u=g,g=a.child,O=e.child.memoizedState,O===null?O=nf(s):(ee=O.cachePool,ee!==null?(Ae=Sa._currentValue,ee=ee.parent!==Ae?{parent:Ae,pool:Ae}:ee):ee=Ug(),O={baseLanes:O.baseLanes|s,cachePool:ee}),g.memoizedState=O,g.childLanes=rf(e,T,s),a.memoizedState=af,u):(Ai(a),s=e.child,e=s.sibling,s=Lr(s,{mode:"visible",children:u.children}),s.return=a,s.sibling=null,e!==null&&(T=a.deletions,T===null?(a.deletions=[e],a.flags|=16):T.push(e)),a.child=s,a.memoizedState=null,s)}function sf(e,a){return a=Au({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function Au(e,a){return e=Cn(22,e,null,a),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function of(e,a,s){return Qs(a,e.child,null,s),e=sf(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function Jm(e,a,s){e.lanes|=a;var u=e.alternate;u!==null&&(u.lanes|=a),xd(e.return,a,s)}function lf(e,a,s,u,g){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:g}:(p.isBackwards=a,p.rendering=null,p.renderingStartTime=0,p.last=u,p.tail=s,p.tailMode=g)}function Wm(e,a,s){var u=a.pendingProps,g=u.revealOrder,p=u.tail;if(Ha(e,a,u.children,s),u=Ta.current,(u&2)!==0)u=u&1|2,a.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=a.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Jm(e,s,a);else if(e.tag===19)Jm(e,s,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===a)break e;for(;e.sibling===null;){if(e.return===null||e.return===a)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}u&=1}switch(we(Ta,u),g){case"forwards":for(s=a.child,g=null;s!==null;)e=s.alternate,e!==null&&cu(e)===null&&(g=s),s=s.sibling;s=g,s===null?(g=a.child,a.child=null):(g=s.sibling,s.sibling=null),lf(a,!1,g,s,p);break;case"backwards":for(s=null,g=a.child,a.child=null;g!==null;){if(e=g.alternate,e!==null&&cu(e)===null){a.child=g;break}e=g.sibling,g.sibling=s,s=g,g=e}lf(a,!0,s,null,p);break;case"together":lf(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function _r(e,a,s){if(e!==null&&(a.dependencies=e.dependencies),bi|=a.lanes,(s&a.childLanes)===0)if(e!==null){if(To(e,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(e!==null&&a.child!==e.child)throw Error(i(153));if(a.child!==null){for(e=a.child,s=Lr(e,e.pendingProps),a.child=s,s.return=a;e.sibling!==null;)e=e.sibling,s=s.sibling=Lr(e,e.pendingProps),s.return=a;s.sibling=null}return a.child}function uf(e,a){return(e.lanes&a)!==0?!0:(e=e.dependencies,!!(e!==null&&Yl(e)))}function dv(e,a,s){switch(a.tag){case 3:Ke(a,a.stateNode.containerInfo),ui(a,Sa,e.memoizedState.cache),ko();break;case 27:case 5:dt(a);break;case 4:Ke(a,a.stateNode.containerInfo);break;case 10:ui(a,a.type,a.memoizedProps.value);break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(Ai(a),a.flags|=128,null):(s&a.child.childLanes)!==0?Ym(e,a,s):(Ai(a),e=_r(e,a,s),e!==null?e.sibling:null);Ai(a);break;case 19:var g=(e.flags&128)!==0;if(u=(s&a.childLanes)!==0,u||(To(e,a,s,!1),u=(s&a.childLanes)!==0),g){if(u)return Wm(e,a,s);a.flags|=128}if(g=a.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),we(Ta,Ta.current),u)break;return null;case 22:case 23:return a.lanes=0,zm(e,a,s);case 24:ui(a,Sa,e.memoizedState.cache)}return _r(e,a,s)}function Xm(e,a,s){if(e!==null)if(e.memoizedProps!==a.pendingProps)ja=!0;else{if(!uf(e,s)&&(a.flags&128)===0)return ja=!1,dv(e,a,s);ja=(e.flags&131072)!==0}else ja=!1,Dt&&(a.flags&1048576)!==0&&kg(a,ql,a.index);switch(a.lanes=0,a.tag){case 16:e:{e=a.pendingProps;var u=a.elementType,g=u._init;if(u=g(u._payload),a.type=u,typeof u=="function")pd(u)?(e=is(u,e),a.tag=1,a=Km(null,a,u,e,s)):(a.tag=0,a=tf(null,a,u,e,s));else{if(u!=null){if(g=u.$$typeof,g===F){a.tag=11,a=Fm(null,a,u,e,s);break e}else if(g===W){a.tag=14,a=Qm(null,a,u,e,s);break e}}throw a=ce(u)||u,Error(i(306,a,""))}}return a;case 0:return tf(e,a,a.type,a.pendingProps,s);case 1:return u=a.type,g=is(u,a.pendingProps),Km(e,a,u,g,s);case 3:e:{if(Ke(a,a.stateNode.containerInfo),e===null)throw Error(i(387));u=a.pendingProps;var p=a.memoizedState;g=p.element,Ld(e,a),jo(a,u,null,s);var T=a.memoizedState;if(u=T.cache,ui(a,Sa,u),u!==p.cache&&Nd(a,[Sa],s,!0),Mo(),u=T.element,p.isDehydrated)if(p={element:u,isDehydrated:!1,cache:T.cache},a.updateQueue.baseState=p,a.memoizedState=p,a.flags&256){a=qm(e,a,u,s);break e}else if(u!==g){g=Mn(Error(i(424)),a),So(g),a=qm(e,a,u,s);break e}else{switch(e=a.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(la=$n(e.firstChild),tn=a,Dt=!0,Zi=null,lr=!0,s=Tm(a,null,u,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(ko(),u===g){a=_r(e,a,s);break e}Ha(e,a,u,s)}a=a.child}return a;case 26:return hu(e,a),e===null?(s=tp(a.type,null,a.pendingProps,null))?a.memoizedState=s:Dt||(s=a.type,e=a.pendingProps,u=Su(Le.current).createElement(s),u[Kt]=a,u[Na]=e,Va(u,s,e),$t(u),a.stateNode=u):a.memoizedState=tp(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:return dt(a),e===null&&Dt&&(u=a.stateNode=$0(a.type,a.pendingProps,Le.current),tn=a,lr=!0,g=la,xi(a.type)?(zf=g,la=$n(u.firstChild)):la=g),Ha(e,a,a.pendingProps.children,s),hu(e,a),e===null&&(a.flags|=4194304),a.child;case 5:return e===null&&Dt&&((g=u=la)&&(u=Pv(u,a.type,a.pendingProps,lr),u!==null?(a.stateNode=u,tn=a,la=$n(u.firstChild),lr=!1,g=!0):g=!1),g||es(a)),dt(a),g=a.type,p=a.pendingProps,T=e!==null?e.memoizedProps:null,u=p.children,Pf(g,p)?u=null:T!==null&&Pf(g,T)&&(a.flags|=32),a.memoizedState!==null&&(g=Od(e,a,nv,null,null,s),rl._currentValue=g),hu(e,a),Ha(e,a,u,s),a.child;case 6:return e===null&&Dt&&((e=s=la)&&(s=Fv(s,a.pendingProps,lr),s!==null?(a.stateNode=s,tn=a,la=null,e=!0):e=!1),e||es(a)),null;case 13:return Ym(e,a,s);case 4:return Ke(a,a.stateNode.containerInfo),u=a.pendingProps,e===null?a.child=Qs(a,null,u,s):Ha(e,a,u,s),a.child;case 11:return Fm(e,a,a.type,a.pendingProps,s);case 7:return Ha(e,a,a.pendingProps,s),a.child;case 8:return Ha(e,a,a.pendingProps.children,s),a.child;case 12:return Ha(e,a,a.pendingProps.children,s),a.child;case 10:return u=a.pendingProps,ui(a,a.type,u.value),Ha(e,a,u.children,s),a.child;case 9:return g=a.type._context,u=a.pendingProps.children,as(a),g=Ja(g),u=u(g),a.flags|=1,Ha(e,a,u,s),a.child;case 14:return Qm(e,a,a.type,a.pendingProps,s);case 15:return Hm(e,a,a.type,a.pendingProps,s);case 19:return Wm(e,a,s);case 31:return u=a.pendingProps,s=a.mode,u={mode:u.mode,children:u.children},e===null?(s=Au(u,s),s.ref=a.ref,a.child=s,s.return=a,a=s):(s=Lr(e.child,u),s.ref=a.ref,a.child=s,s.return=a,a=s),a;case 22:return zm(e,a,s);case 24:return as(a),u=Ja(Sa),e===null?(g=Sd(),g===null&&(g=Yt,p=Id(),g.pooledCache=p,p.refCount++,p!==null&&(g.pooledCacheLanes|=s),g=p),a.memoizedState={parent:u,cache:g},Bd(a),ui(a,Sa,g)):((e.lanes&s)!==0&&(Ld(e,a),jo(a,null,null,s),Mo()),g=e.memoizedState,p=a.memoizedState,g.parent!==u?(g={parent:u,cache:u},a.memoizedState=g,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=g),ui(a,Sa,u)):(u=p.cache,ui(a,Sa,u),u!==g.cache&&Nd(a,[Sa],s,!0))),Ha(e,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Pr(e){e.flags|=4}function $m(e,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!sp(a)){if(a=Pn.current,a!==null&&((Tt&4194048)===Tt?ur!==null:(Tt&62914560)!==Tt&&(Tt&536870912)===0||a!==ur))throw Ro=Td,Mg;e.flags|=8192}}function gu(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?ft():536870912,e.lanes|=a,Gs|=a)}function zo(e,a){if(!Dt)switch(e.tailMode){case"hidden":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function ra(e){var a=e.alternate!==null&&e.alternate.child===e.child,s=0,u=0;if(a)for(var g=e.child;g!==null;)s|=g.lanes|g.childLanes,u|=g.subtreeFlags&65011712,u|=g.flags&65011712,g.return=e,g=g.sibling;else for(g=e.child;g!==null;)s|=g.lanes|g.childLanes,u|=g.subtreeFlags,u|=g.flags,g.return=e,g=g.sibling;return e.subtreeFlags|=u,e.childLanes=s,a}function fv(e,a,s){var u=a.pendingProps;switch(wd(a),a.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ra(a),null;case 1:return ra(a),null;case 3:return s=a.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Mr(Sa),We(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Io(a)?Pr(a):e===null||e.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Bg())),ra(a),null;case 26:return s=a.memoizedState,e===null?(Pr(a),s!==null?(ra(a),$m(a,s)):(ra(a),a.flags&=-16777217)):s?s!==e.memoizedState?(Pr(a),ra(a),$m(a,s)):(ra(a),a.flags&=-16777217):(e.memoizedProps!==u&&Pr(a),ra(a),a.flags&=-16777217),null;case 27:fa(a),s=Le.current;var g=a.type;if(e!==null&&a.stateNode!=null)e.memoizedProps!==u&&Pr(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return ra(a),null}e=Ce.current,Io(a)?Sg(a):(e=$0(g,u,s),a.stateNode=e,Pr(a))}return ra(a),null;case 5:if(fa(a),s=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==u&&Pr(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return ra(a),null}if(e=Ce.current,Io(a))Sg(a);else{switch(g=Su(Le.current),e){case 1:e=g.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:e=g.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":e=g.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":e=g.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":e=g.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof u.is=="string"?g.createElement("select",{is:u.is}):g.createElement("select"),u.multiple?e.multiple=!0:u.size&&(e.size=u.size);break;default:e=typeof u.is=="string"?g.createElement(s,{is:u.is}):g.createElement(s)}}e[Kt]=a,e[Na]=u;e:for(g=a.child;g!==null;){if(g.tag===5||g.tag===6)e.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===a)break e;for(;g.sibling===null;){if(g.return===null||g.return===a)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}a.stateNode=e;e:switch(Va(e,s,u),s){case"button":case"input":case"select":case"textarea":e=!!u.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Pr(a)}}return ra(a),a.flags&=-16777217,null;case 6:if(e&&a.stateNode!=null)e.memoizedProps!==u&&Pr(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(i(166));if(e=Le.current,Io(a)){if(e=a.stateNode,s=a.memoizedProps,u=null,g=tn,g!==null)switch(g.tag){case 27:case 5:u=g.memoizedProps}e[Kt]=a,e=!!(e.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||G0(e.nodeValue,s)),e||es(a)}else e=Su(e).createTextNode(u),e[Kt]=a,a.stateNode=e}return ra(a),null;case 13:if(u=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(g=Io(a),u!==null&&u.dehydrated!==null){if(e===null){if(!g)throw Error(i(318));if(g=a.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(i(317));g[Kt]=a}else ko(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ra(a),g=!1}else g=Bg(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=g),g=!0;if(!g)return a.flags&256?(Or(a),a):(Or(a),null)}if(Or(a),(a.flags&128)!==0)return a.lanes=s,a;if(s=u!==null,e=e!==null&&e.memoizedState!==null,s){u=a.child,g=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(g=u.alternate.memoizedState.cachePool.pool);var p=null;u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(p=u.memoizedState.cachePool.pool),p!==g&&(u.flags|=2048)}return s!==e&&s&&(a.child.flags|=8192),gu(a,a.updateQueue),ra(a),null;case 4:return We(),e===null&&Uf(a.stateNode.containerInfo),ra(a),null;case 10:return Mr(a.type),ra(a),null;case 19:if(se(Ta),g=a.memoizedState,g===null)return ra(a),null;if(u=(a.flags&128)!==0,p=g.rendering,p===null)if(u)zo(g,!1);else{if(ua!==0||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(p=cu(e),p!==null){for(a.flags|=128,zo(g,!1),e=p.updateQueue,a.updateQueue=e,gu(a,e),a.subtreeFlags=0,e=s,s=a.child;s!==null;)Ig(s,e),s=s.sibling;return we(Ta,Ta.current&1|2),a.child}e=e.sibling}g.tail!==null&&He()>yu&&(a.flags|=128,u=!0,zo(g,!1),a.lanes=4194304)}else{if(!u)if(e=cu(p),e!==null){if(a.flags|=128,u=!0,e=e.updateQueue,a.updateQueue=e,gu(a,e),zo(g,!0),g.tail===null&&g.tailMode==="hidden"&&!p.alternate&&!Dt)return ra(a),null}else 2*He()-g.renderingStartTime>yu&&s!==536870912&&(a.flags|=128,u=!0,zo(g,!1),a.lanes=4194304);g.isBackwards?(p.sibling=a.child,a.child=p):(e=g.last,e!==null?e.sibling=p:a.child=p,g.last=p)}return g.tail!==null?(a=g.tail,g.rendering=a,g.tail=a.sibling,g.renderingStartTime=He(),a.sibling=null,e=Ta.current,we(Ta,u?e&1|2:e&1),a):(ra(a),null);case 22:case 23:return Or(a),Md(),u=a.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(s&536870912)!==0&&(a.flags&128)===0&&(ra(a),a.subtreeFlags&6&&(a.flags|=8192)):ra(a),s=a.updateQueue,s!==null&&gu(a,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==s&&(a.flags|=2048),e!==null&&se(ns),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),Mr(Sa),ra(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function hv(e,a){switch(wd(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 3:return Mr(Sa),We(),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return fa(a),null;case 13:if(Or(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error(i(340));ko()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 19:return se(Ta),null;case 4:return We(),null;case 10:return Mr(a.type),null;case 22:case 23:return Or(a),Md(),e!==null&&se(ns),e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 24:return Mr(Sa),null;case 25:return null;default:return null}}function Zm(e,a){switch(wd(a),a.tag){case 3:Mr(Sa),We();break;case 26:case 27:case 5:fa(a);break;case 4:We();break;case 13:Or(a);break;case 19:se(Ta);break;case 10:Mr(a.type);break;case 22:case 23:Or(a),Md(),e!==null&&se(ns);break;case 24:Mr(Sa)}}function Vo(e,a){try{var s=a.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var g=u.next;s=g;do{if((s.tag&e)===e){u=void 0;var p=s.create,T=s.inst;u=p(),T.destroy=u}s=s.next}while(s!==g)}}catch(O){Vt(a,a.return,O)}}function mi(e,a,s){try{var u=a.updateQueue,g=u!==null?u.lastEffect:null;if(g!==null){var p=g.next;u=p;do{if((u.tag&e)===e){var T=u.inst,O=T.destroy;if(O!==void 0){T.destroy=void 0,g=a;var ee=s,Ae=O;try{Ae()}catch(Ne){Vt(g,ee,Ne)}}}u=u.next}while(u!==p)}}catch(Ne){Vt(a,a.return,Ne)}}function e0(e){var a=e.updateQueue;if(a!==null){var s=e.stateNode;try{Qg(a,s)}catch(u){Vt(e,e.return,u)}}}function t0(e,a,s){s.props=is(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(u){Vt(e,a,u)}}function Go(e,a){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var u=e.stateNode;break;case 30:u=e.stateNode;break;default:u=e.stateNode}typeof s=="function"?e.refCleanup=s(u):s.current=u}}catch(g){Vt(e,a,g)}}function cr(e,a){var s=e.ref,u=e.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(g){Vt(e,a,g)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(g){Vt(e,a,g)}else s.current=null}function a0(e){var a=e.type,s=e.memoizedProps,u=e.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(g){Vt(e,e.return,g)}}function cf(e,a,s){try{var u=e.stateNode;Uv(u,e.type,s,a),u[Na]=a}catch(g){Vt(e,e.return,g)}}function n0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&xi(e.type)||e.tag===4}function df(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||n0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&xi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ff(e,a,s){var u=e.tag;if(u===5||u===6)e=e.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(e),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=ku));else if(u!==4&&(u===27&&xi(e.type)&&(s=e.stateNode,a=null),e=e.child,e!==null))for(ff(e,a,s),e=e.sibling;e!==null;)ff(e,a,s),e=e.sibling}function mu(e,a,s){var u=e.tag;if(u===5||u===6)e=e.stateNode,a?s.insertBefore(e,a):s.appendChild(e);else if(u!==4&&(u===27&&xi(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(mu(e,a,s),e=e.sibling;e!==null;)mu(e,a,s),e=e.sibling}function r0(e){var a=e.stateNode,s=e.memoizedProps;try{for(var u=e.type,g=a.attributes;g.length;)a.removeAttributeNode(g[0]);Va(a,u,s),a[Kt]=e,a[Na]=s}catch(p){Vt(e,e.return,p)}}var Fr=!1,pa=!1,hf=!1,i0=typeof WeakSet=="function"?WeakSet:Set,Oa=null;function Av(e,a){if(e=e.containerInfo,Of=Uu,e=mg(e),cd(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var g=u.anchorOffset,p=u.focusNode;u=u.focusOffset;try{s.nodeType,p.nodeType}catch{s=null;break e}var T=0,O=-1,ee=-1,Ae=0,Ne=0,Re=e,ye=null;t:for(;;){for(var be;Re!==s||g!==0&&Re.nodeType!==3||(O=T+g),Re!==p||u!==0&&Re.nodeType!==3||(ee=T+u),Re.nodeType===3&&(T+=Re.nodeValue.length),(be=Re.firstChild)!==null;)ye=Re,Re=be;for(;;){if(Re===e)break t;if(ye===s&&++Ae===g&&(O=T),ye===p&&++Ne===u&&(ee=T),(be=Re.nextSibling)!==null)break;Re=ye,ye=Re.parentNode}Re=be}s=O===-1||ee===-1?null:{start:O,end:ee}}else s=null}s=s||{start:0,end:0}}else s=null;for(_f={focusedElem:e,selectionRange:s},Uu=!1,Oa=a;Oa!==null;)if(a=Oa,e=a.child,(a.subtreeFlags&1024)!==0&&e!==null)e.return=a,Oa=e;else for(;Oa!==null;){switch(a=Oa,p=a.alternate,e=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,s=a,g=p.memoizedProps,p=p.memoizedState,u=s.stateNode;try{var ct=is(s.type,g,s.elementType===s.type);e=u.getSnapshotBeforeUpdate(ct,p),u.__reactInternalSnapshotBeforeUpdate=e}catch(ot){Vt(s,s.return,ot)}}break;case 3:if((e&1024)!==0){if(e=a.stateNode.containerInfo,s=e.nodeType,s===9)Qf(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=a.sibling,e!==null){e.return=a.return,Oa=e;break}Oa=a.return}}function s0(e,a,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:pi(e,s),u&4&&Vo(5,s);break;case 1:if(pi(e,s),u&4)if(e=s.stateNode,a===null)try{e.componentDidMount()}catch(T){Vt(s,s.return,T)}else{var g=is(s.type,a.memoizedProps);a=a.memoizedState;try{e.componentDidUpdate(g,a,e.__reactInternalSnapshotBeforeUpdate)}catch(T){Vt(s,s.return,T)}}u&64&&e0(s),u&512&&Go(s,s.return);break;case 3:if(pi(e,s),u&64&&(e=s.updateQueue,e!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{Qg(e,a)}catch(T){Vt(s,s.return,T)}}break;case 27:a===null&&u&4&&r0(s);case 26:case 5:pi(e,s),a===null&&u&4&&a0(s),u&512&&Go(s,s.return);break;case 12:pi(e,s);break;case 13:pi(e,s),u&4&&u0(e,s),u&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=Cv.bind(null,s),Qv(e,s))));break;case 22:if(u=s.memoizedState!==null||Fr,!u){a=a!==null&&a.memoizedState!==null||pa,g=Fr;var p=pa;Fr=u,(pa=a)&&!p?yi(e,s,(s.subtreeFlags&8772)!==0):pi(e,s),Fr=g,pa=p}break;case 30:break;default:pi(e,s)}}function o0(e){var a=e.alternate;a!==null&&(e.alternate=null,o0(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&ha(a)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ta=null,fn=!1;function Qr(e,a,s){for(s=s.child;s!==null;)l0(e,a,s),s=s.sibling}function l0(e,a,s){if(M&&typeof M.onCommitFiberUnmount=="function")try{M.onCommitFiberUnmount(qe,s)}catch{}switch(s.tag){case 26:pa||cr(s,a),Qr(e,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:pa||cr(s,a);var u=ta,g=fn;xi(s.type)&&(ta=s.stateNode,fn=!1),Qr(e,a,s),el(s.stateNode),ta=u,fn=g;break;case 5:pa||cr(s,a);case 6:if(u=ta,g=fn,ta=null,Qr(e,a,s),ta=u,fn=g,ta!==null)if(fn)try{(ta.nodeType===9?ta.body:ta.nodeName==="HTML"?ta.ownerDocument.body:ta).removeChild(s.stateNode)}catch(p){Vt(s,a,p)}else try{ta.removeChild(s.stateNode)}catch(p){Vt(s,a,p)}break;case 18:ta!==null&&(fn?(e=ta,W0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),ll(e)):W0(ta,s.stateNode));break;case 4:u=ta,g=fn,ta=s.stateNode.containerInfo,fn=!0,Qr(e,a,s),ta=u,fn=g;break;case 0:case 11:case 14:case 15:pa||mi(2,s,a),pa||mi(4,s,a),Qr(e,a,s);break;case 1:pa||(cr(s,a),u=s.stateNode,typeof u.componentWillUnmount=="function"&&t0(s,a,u)),Qr(e,a,s);break;case 21:Qr(e,a,s);break;case 22:pa=(u=pa)||s.memoizedState!==null,Qr(e,a,s),pa=u;break;default:Qr(e,a,s)}}function u0(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ll(e)}catch(s){Vt(a,a.return,s)}}function gv(e){switch(e.tag){case 13:case 19:var a=e.stateNode;return a===null&&(a=e.stateNode=new i0),a;case 22:return e=e.stateNode,a=e._retryCache,a===null&&(a=e._retryCache=new i0),a;default:throw Error(i(435,e.tag))}}function Af(e,a){var s=gv(e);a.forEach(function(u){var g=xv.bind(null,e,u);s.has(u)||(s.add(u),u.then(g,g))})}function xn(e,a){var s=a.deletions;if(s!==null)for(var u=0;u<s.length;u++){var g=s[u],p=e,T=a,O=T;e:for(;O!==null;){switch(O.tag){case 27:if(xi(O.type)){ta=O.stateNode,fn=!1;break e}break;case 5:ta=O.stateNode,fn=!1;break e;case 3:case 4:ta=O.stateNode.containerInfo,fn=!0;break e}O=O.return}if(ta===null)throw Error(i(160));l0(p,T,g),ta=null,fn=!1,p=g.alternate,p!==null&&(p.return=null),g.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)c0(a,e),a=a.sibling}var Xn=null;function c0(e,a){var s=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xn(a,e),Nn(e),u&4&&(mi(3,e,e.return),Vo(3,e),mi(5,e,e.return));break;case 1:xn(a,e),Nn(e),u&512&&(pa||s===null||cr(s,s.return)),u&64&&Fr&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var g=Xn;if(xn(a,e),Nn(e),u&512&&(pa||s===null||cr(s,s.return)),u&4){var p=s!==null?s.memoizedState:null;if(u=e.memoizedState,s===null)if(u===null)if(e.stateNode===null){e:{u=e.type,s=e.memoizedProps,g=g.ownerDocument||g;t:switch(u){case"title":p=g.getElementsByTagName("title")[0],(!p||p[Bn]||p[Kt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=g.createElement(u),g.head.insertBefore(p,g.querySelector("head > title"))),Va(p,u,s),p[Kt]=e,$t(p),u=p;break e;case"link":var T=rp("link","href",g).get(u+(s.href||""));if(T){for(var O=0;O<T.length;O++)if(p=T[O],p.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&p.getAttribute("rel")===(s.rel==null?null:s.rel)&&p.getAttribute("title")===(s.title==null?null:s.title)&&p.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){T.splice(O,1);break t}}p=g.createElement(u),Va(p,u,s),g.head.appendChild(p);break;case"meta":if(T=rp("meta","content",g).get(u+(s.content||""))){for(O=0;O<T.length;O++)if(p=T[O],p.getAttribute("content")===(s.content==null?null:""+s.content)&&p.getAttribute("name")===(s.name==null?null:s.name)&&p.getAttribute("property")===(s.property==null?null:s.property)&&p.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&p.getAttribute("charset")===(s.charSet==null?null:s.charSet)){T.splice(O,1);break t}}p=g.createElement(u),Va(p,u,s),g.head.appendChild(p);break;default:throw Error(i(468,u))}p[Kt]=e,$t(p),u=p}e.stateNode=u}else ip(g,e.type,e.stateNode);else e.stateNode=np(g,u,e.memoizedProps);else p!==u?(p===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):p.count--,u===null?ip(g,e.type,e.stateNode):np(g,u,e.memoizedProps)):u===null&&e.stateNode!==null&&cf(e,e.memoizedProps,s.memoizedProps)}break;case 27:xn(a,e),Nn(e),u&512&&(pa||s===null||cr(s,s.return)),s!==null&&u&4&&cf(e,e.memoizedProps,s.memoizedProps);break;case 5:if(xn(a,e),Nn(e),u&512&&(pa||s===null||cr(s,s.return)),e.flags&32){g=e.stateNode;try{Un(g,"")}catch(be){Vt(e,e.return,be)}}u&4&&e.stateNode!=null&&(g=e.memoizedProps,cf(e,g,s!==null?s.memoizedProps:g)),u&1024&&(hf=!0);break;case 6:if(xn(a,e),Nn(e),u&4){if(e.stateNode===null)throw Error(i(162));u=e.memoizedProps,s=e.stateNode;try{s.nodeValue=u}catch(be){Vt(e,e.return,be)}}break;case 3:if(Lu=null,g=Xn,Xn=Tu(a.containerInfo),xn(a,e),Xn=g,Nn(e),u&4&&s!==null&&s.memoizedState.isDehydrated)try{ll(a.containerInfo)}catch(be){Vt(e,e.return,be)}hf&&(hf=!1,d0(e));break;case 4:u=Xn,Xn=Tu(e.stateNode.containerInfo),xn(a,e),Nn(e),Xn=u;break;case 12:xn(a,e),Nn(e);break;case 13:xn(a,e),Nn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(bf=He()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Af(e,u)));break;case 22:g=e.memoizedState!==null;var ee=s!==null&&s.memoizedState!==null,Ae=Fr,Ne=pa;if(Fr=Ae||g,pa=Ne||ee,xn(a,e),pa=Ne,Fr=Ae,Nn(e),u&8192)e:for(a=e.stateNode,a._visibility=g?a._visibility&-2:a._visibility|1,g&&(s===null||ee||Fr||pa||ss(e)),s=null,a=e;;){if(a.tag===5||a.tag===26){if(s===null){ee=s=a;try{if(p=ee.stateNode,g)T=p.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{O=ee.stateNode;var Re=ee.memoizedProps.style,ye=Re!=null&&Re.hasOwnProperty("display")?Re.display:null;O.style.display=ye==null||typeof ye=="boolean"?"":(""+ye).trim()}}catch(be){Vt(ee,ee.return,be)}}}else if(a.tag===6){if(s===null){ee=a;try{ee.stateNode.nodeValue=g?"":ee.memoizedProps}catch(be){Vt(ee,ee.return,be)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break e;for(;a.sibling===null;){if(a.return===null||a.return===e)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=e.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,Af(e,s))));break;case 19:xn(a,e),Nn(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Af(e,u)));break;case 30:break;case 21:break;default:xn(a,e),Nn(e)}}function Nn(e){var a=e.flags;if(a&2){try{for(var s,u=e.return;u!==null;){if(n0(u)){s=u;break}u=u.return}if(s==null)throw Error(i(160));switch(s.tag){case 27:var g=s.stateNode,p=df(e);mu(e,p,g);break;case 5:var T=s.stateNode;s.flags&32&&(Un(T,""),s.flags&=-33);var O=df(e);mu(e,O,T);break;case 3:case 4:var ee=s.stateNode.containerInfo,Ae=df(e);ff(e,Ae,ee);break;default:throw Error(i(161))}}catch(Ne){Vt(e,e.return,Ne)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function d0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;d0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),e=e.sibling}}function pi(e,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)s0(e,a.alternate,a),a=a.sibling}function ss(e){for(e=e.child;e!==null;){var a=e;switch(a.tag){case 0:case 11:case 14:case 15:mi(4,a,a.return),ss(a);break;case 1:cr(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&t0(a,a.return,s),ss(a);break;case 27:el(a.stateNode);case 26:case 5:cr(a,a.return),ss(a);break;case 22:a.memoizedState===null&&ss(a);break;case 30:ss(a);break;default:ss(a)}e=e.sibling}}function yi(e,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,g=e,p=a,T=p.flags;switch(p.tag){case 0:case 11:case 15:yi(g,p,s),Vo(4,p);break;case 1:if(yi(g,p,s),u=p,g=u.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(Ae){Vt(u,u.return,Ae)}if(u=p,g=u.updateQueue,g!==null){var O=u.stateNode;try{var ee=g.shared.hiddenCallbacks;if(ee!==null)for(g.shared.hiddenCallbacks=null,g=0;g<ee.length;g++)Fg(ee[g],O)}catch(Ae){Vt(u,u.return,Ae)}}s&&T&64&&e0(p),Go(p,p.return);break;case 27:r0(p);case 26:case 5:yi(g,p,s),s&&u===null&&T&4&&a0(p),Go(p,p.return);break;case 12:yi(g,p,s);break;case 13:yi(g,p,s),s&&T&4&&u0(g,p);break;case 22:p.memoizedState===null&&yi(g,p,s),Go(p,p.return);break;case 30:break;default:yi(g,p,s)}a=a.sibling}}function gf(e,a){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(e=a.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&Bo(s))}function mf(e,a){e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&Bo(e))}function dr(e,a,s,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)f0(e,a,s,u),a=a.sibling}function f0(e,a,s,u){var g=a.flags;switch(a.tag){case 0:case 11:case 15:dr(e,a,s,u),g&2048&&Vo(9,a);break;case 1:dr(e,a,s,u);break;case 3:dr(e,a,s,u),g&2048&&(e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&Bo(e)));break;case 12:if(g&2048){dr(e,a,s,u),e=a.stateNode;try{var p=a.memoizedProps,T=p.id,O=p.onPostCommit;typeof O=="function"&&O(T,a.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(ee){Vt(a,a.return,ee)}}else dr(e,a,s,u);break;case 13:dr(e,a,s,u);break;case 23:break;case 22:p=a.stateNode,T=a.alternate,a.memoizedState!==null?p._visibility&2?dr(e,a,s,u):Ko(e,a):p._visibility&2?dr(e,a,s,u):(p._visibility|=2,Hs(e,a,s,u,(a.subtreeFlags&10256)!==0)),g&2048&&gf(T,a);break;case 24:dr(e,a,s,u),g&2048&&mf(a.alternate,a);break;default:dr(e,a,s,u)}}function Hs(e,a,s,u,g){for(g=g&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var p=e,T=a,O=s,ee=u,Ae=T.flags;switch(T.tag){case 0:case 11:case 15:Hs(p,T,O,ee,g),Vo(8,T);break;case 23:break;case 22:var Ne=T.stateNode;T.memoizedState!==null?Ne._visibility&2?Hs(p,T,O,ee,g):Ko(p,T):(Ne._visibility|=2,Hs(p,T,O,ee,g)),g&&Ae&2048&&gf(T.alternate,T);break;case 24:Hs(p,T,O,ee,g),g&&Ae&2048&&mf(T.alternate,T);break;default:Hs(p,T,O,ee,g)}a=a.sibling}}function Ko(e,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=e,u=a,g=u.flags;switch(u.tag){case 22:Ko(s,u),g&2048&&gf(u.alternate,u);break;case 24:Ko(s,u),g&2048&&mf(u.alternate,u);break;default:Ko(s,u)}a=a.sibling}}var qo=8192;function zs(e){if(e.subtreeFlags&qo)for(e=e.child;e!==null;)h0(e),e=e.sibling}function h0(e){switch(e.tag){case 26:zs(e),e.flags&qo&&e.memoizedState!==null&&eC(Xn,e.memoizedState,e.memoizedProps);break;case 5:zs(e);break;case 3:case 4:var a=Xn;Xn=Tu(e.stateNode.containerInfo),zs(e),Xn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=qo,qo=16777216,zs(e),qo=a):zs(e));break;default:zs(e)}}function A0(e){var a=e.alternate;if(a!==null&&(e=a.child,e!==null)){a.child=null;do a=e.sibling,e.sibling=null,e=a;while(e!==null)}}function Yo(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];Oa=u,m0(u,e)}A0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)g0(e),e=e.sibling}function g0(e){switch(e.tag){case 0:case 11:case 15:Yo(e),e.flags&2048&&mi(9,e,e.return);break;case 3:Yo(e);break;case 12:Yo(e);break;case 22:var a=e.stateNode;e.memoizedState!==null&&a._visibility&2&&(e.return===null||e.return.tag!==13)?(a._visibility&=-3,pu(e)):Yo(e);break;default:Yo(e)}}function pu(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];Oa=u,m0(u,e)}A0(e)}for(e=e.child;e!==null;){switch(a=e,a.tag){case 0:case 11:case 15:mi(8,a,a.return),pu(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,pu(a));break;default:pu(a)}e=e.sibling}}function m0(e,a){for(;Oa!==null;){var s=Oa;switch(s.tag){case 0:case 11:case 15:mi(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Bo(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,Oa=u;else e:for(s=e;Oa!==null;){u=Oa;var g=u.sibling,p=u.return;if(o0(u),u===s){Oa=null;break e}if(g!==null){g.return=p,Oa=g;break e}Oa=p}}}var mv={getCacheForType:function(e){var a=Ja(Sa),s=a.data.get(e);return s===void 0&&(s=e(),a.data.set(e,s)),s}},pv=typeof WeakMap=="function"?WeakMap:Map,Mt=0,Yt=null,Nt=null,Tt=0,jt=0,In=null,Ei=!1,Vs=!1,pf=!1,Hr=0,ua=0,bi=0,os=0,yf=0,Fn=0,Gs=0,Jo=null,hn=null,Ef=!1,bf=0,yu=1/0,Eu=null,wi=null,za=0,vi=null,Ks=null,qs=0,wf=0,vf=null,p0=null,Wo=0,Cf=null;function kn(){if((Mt&2)!==0&&Tt!==0)return Tt&-Tt;if(X.T!==null){var e=Us;return e!==0?e:Bf()}return ei()}function y0(){Fn===0&&(Fn=(Tt&536870912)===0||Dt?Jt():536870912);var e=Pn.current;return e!==null&&(e.flags|=32),Fn}function Sn(e,a,s){(e===Yt&&(jt===2||jt===9)||e.cancelPendingCommit!==null)&&(Ys(e,0),Ci(e,Tt,Fn,!1)),Xt(e,s),((Mt&2)===0||e!==Yt)&&(e===Yt&&((Mt&2)===0&&(os|=s),ua===4&&Ci(e,Tt,Fn,!1)),fr(e))}function E0(e,a,s){if((Mt&6)!==0)throw Error(i(327));var u=!s&&(a&124)===0&&(a&e.expiredLanes)===0||nt(e,a),g=u?bv(e,a):If(e,a,!0),p=u;do{if(g===0){Vs&&!u&&Ci(e,a,0,!1);break}else{if(s=e.current.alternate,p&&!yv(s)){g=If(e,a,!1),p=!1;continue}if(g===2){if(p=a,e.errorRecoveryDisabledLanes&p)var T=0;else T=e.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){a=T;e:{var O=e;g=Jo;var ee=O.current.memoizedState.isDehydrated;if(ee&&(Ys(O,T).flags|=256),T=If(O,T,!1),T!==2){if(pf&&!ee){O.errorRecoveryDisabledLanes|=p,os|=p,g=4;break e}p=hn,hn=g,p!==null&&(hn===null?hn=p:hn.push.apply(hn,p))}g=T}if(p=!1,g!==2)continue}}if(g===1){Ys(e,0),Ci(e,a,0,!0);break}e:{switch(u=e,p=g,p){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:Ci(u,a,Fn,!Ei);break e;case 2:hn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(g=bf+300-He(),10<g)){if(Ci(u,a,Fn,!Ei),Ye(u,0,!0)!==0)break e;u.timeoutHandle=Y0(b0.bind(null,u,s,hn,Eu,Ef,a,Fn,os,Gs,Ei,p,2,-0,0),g);break e}b0(u,s,hn,Eu,Ef,a,Fn,os,Gs,Ei,p,0,-0,0)}}break}while(!0);fr(e)}function b0(e,a,s,u,g,p,T,O,ee,Ae,Ne,Re,ye,be){if(e.timeoutHandle=-1,Re=a.subtreeFlags,(Re&8192||(Re&16785408)===16785408)&&(nl={stylesheets:null,count:0,unsuspend:Zv},h0(a),Re=tC(),Re!==null)){e.cancelPendingCommit=Re(k0.bind(null,e,a,p,s,u,g,T,O,ee,Ne,1,ye,be)),Ci(e,p,T,!Ae);return}k0(e,a,p,s,u,g,T,O,ee)}function yv(e){for(var a=e;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var g=s[u],p=g.getSnapshot;g=g.value;try{if(!vn(p(),g))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ci(e,a,s,u){a&=~yf,a&=~os,e.suspendedLanes|=a,e.pingedLanes&=~a,u&&(e.warmLanes|=a),u=e.expirationTimes;for(var g=a;0<g;){var p=31-v(g),T=1<<p;u[p]=-1,g&=~T}s!==0&&ze(e,s,a)}function bu(){return(Mt&6)===0?(Xo(0),!1):!0}function xf(){if(Nt!==null){if(jt===0)var e=Nt.return;else e=Nt,Ur=ts=null,Fd(e),Fs=null,Qo=0,e=Nt;for(;e!==null;)Zm(e.alternate,e),e=e.return;Nt=null}}function Ys(e,a){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,jv(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),xf(),Yt=e,Nt=s=Lr(e.current,null),Tt=a,jt=0,In=null,Ei=!1,Vs=nt(e,a),pf=!1,Gs=Fn=yf=os=bi=ua=0,hn=Jo=null,Ef=!1,(a&8)!==0&&(a|=a&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=a;0<u;){var g=31-v(u),p=1<<g;a|=e[g],u&=~p}return Hr=a,Hl(),s}function w0(e,a){Ct=null,X.H=ou,a===Do||a===Xl?(a=_g(),jt=3):a===Mg?(a=_g(),jt=4):jt=a===Pm?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,In=a,Nt===null&&(ua=1,fu(e,Mn(a,e.current)))}function v0(){var e=X.H;return X.H=ou,e===null?ou:e}function C0(){var e=X.A;return X.A=mv,e}function Nf(){ua=4,Ei||(Tt&4194048)!==Tt&&Pn.current!==null||(Vs=!0),(bi&134217727)===0&&(os&134217727)===0||Yt===null||Ci(Yt,Tt,Fn,!1)}function If(e,a,s){var u=Mt;Mt|=2;var g=v0(),p=C0();(Yt!==e||Tt!==a)&&(Eu=null,Ys(e,a)),a=!1;var T=ua;e:do try{if(jt!==0&&Nt!==null){var O=Nt,ee=In;switch(jt){case 8:xf(),T=6;break e;case 3:case 2:case 9:case 6:Pn.current===null&&(a=!0);var Ae=jt;if(jt=0,In=null,Js(e,O,ee,Ae),s&&Vs){T=0;break e}break;default:Ae=jt,jt=0,In=null,Js(e,O,ee,Ae)}}Ev(),T=ua;break}catch(Ne){w0(e,Ne)}while(!0);return a&&e.shellSuspendCounter++,Ur=ts=null,Mt=u,X.H=g,X.A=p,Nt===null&&(Yt=null,Tt=0,Hl()),T}function Ev(){for(;Nt!==null;)x0(Nt)}function bv(e,a){var s=Mt;Mt|=2;var u=v0(),g=C0();Yt!==e||Tt!==a?(Eu=null,yu=He()+500,Ys(e,a)):Vs=nt(e,a);e:do try{if(jt!==0&&Nt!==null){a=Nt;var p=In;t:switch(jt){case 1:jt=0,In=null,Js(e,a,p,1);break;case 2:case 9:if(jg(p)){jt=0,In=null,N0(a);break}a=function(){jt!==2&&jt!==9||Yt!==e||(jt=7),fr(e)},p.then(a,a);break e;case 3:jt=7;break e;case 4:jt=5;break e;case 7:jg(p)?(jt=0,In=null,N0(a)):(jt=0,In=null,Js(e,a,p,7));break;case 5:var T=null;switch(Nt.tag){case 26:T=Nt.memoizedState;case 5:case 27:var O=Nt;if(!T||sp(T)){jt=0,In=null;var ee=O.sibling;if(ee!==null)Nt=ee;else{var Ae=O.return;Ae!==null?(Nt=Ae,wu(Ae)):Nt=null}break t}}jt=0,In=null,Js(e,a,p,5);break;case 6:jt=0,In=null,Js(e,a,p,6);break;case 8:xf(),ua=6;break e;default:throw Error(i(462))}}wv();break}catch(Ne){w0(e,Ne)}while(!0);return Ur=ts=null,X.H=u,X.A=g,Mt=s,Nt!==null?0:(Yt=null,Tt=0,Hl(),ua)}function wv(){for(;Nt!==null&&!Gt();)x0(Nt)}function x0(e){var a=Xm(e.alternate,e,Hr);e.memoizedProps=e.pendingProps,a===null?wu(e):Nt=a}function N0(e){var a=e,s=a.alternate;switch(a.tag){case 15:case 0:a=Gm(s,a,a.pendingProps,a.type,void 0,Tt);break;case 11:a=Gm(s,a,a.pendingProps,a.type.render,a.ref,Tt);break;case 5:Fd(a);default:Zm(s,a),a=Nt=Ig(a,Hr),a=Xm(s,a,Hr)}e.memoizedProps=e.pendingProps,a===null?wu(e):Nt=a}function Js(e,a,s,u){Ur=ts=null,Fd(a),Fs=null,Qo=0;var g=a.return;try{if(cv(e,g,a,s,Tt)){ua=1,fu(e,Mn(s,e.current)),Nt=null;return}}catch(p){if(g!==null)throw Nt=g,p;ua=1,fu(e,Mn(s,e.current)),Nt=null;return}a.flags&32768?(Dt||u===1?e=!0:Vs||(Tt&536870912)!==0?e=!1:(Ei=e=!0,(u===2||u===9||u===3||u===6)&&(u=Pn.current,u!==null&&u.tag===13&&(u.flags|=16384))),I0(a,e)):wu(a)}function wu(e){var a=e;do{if((a.flags&32768)!==0){I0(a,Ei);return}e=a.return;var s=fv(a.alternate,a,Hr);if(s!==null){Nt=s;return}if(a=a.sibling,a!==null){Nt=a;return}Nt=a=e}while(a!==null);ua===0&&(ua=5)}function I0(e,a){do{var s=hv(e.alternate,e);if(s!==null){s.flags&=32767,Nt=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(e=e.sibling,e!==null)){Nt=e;return}Nt=e=s}while(e!==null);ua=6,Nt=null}function k0(e,a,s,u,g,p,T,O,ee){e.cancelPendingCommit=null;do vu();while(za!==0);if((Mt&6)!==0)throw Error(i(327));if(a!==null){if(a===e.current)throw Error(i(177));if(p=a.lanes|a.childLanes,p|=gd,yn(e,s,p,T,O,ee),e===Yt&&(Nt=Yt=null,Tt=0),Ks=a,vi=e,qs=s,wf=p,vf=g,p0=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Nv(oe,function(){return D0(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=X.T,X.T=null,g=le.p,le.p=2,T=Mt,Mt|=4;try{Av(e,a,s)}finally{Mt=T,le.p=g,X.T=u}}za=1,S0(),T0(),B0()}}function S0(){if(za===1){za=0;var e=vi,a=Ks,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=X.T,X.T=null;var u=le.p;le.p=2;var g=Mt;Mt|=4;try{c0(a,e);var p=_f,T=mg(e.containerInfo),O=p.focusedElem,ee=p.selectionRange;if(T!==O&&O&&O.ownerDocument&&gg(O.ownerDocument.documentElement,O)){if(ee!==null&&cd(O)){var Ae=ee.start,Ne=ee.end;if(Ne===void 0&&(Ne=Ae),"selectionStart"in O)O.selectionStart=Ae,O.selectionEnd=Math.min(Ne,O.value.length);else{var Re=O.ownerDocument||document,ye=Re&&Re.defaultView||window;if(ye.getSelection){var be=ye.getSelection(),ct=O.textContent.length,ot=Math.min(ee.start,ct),Qt=ee.end===void 0?ot:Math.min(ee.end,ct);!be.extend&&ot>Qt&&(T=Qt,Qt=ot,ot=T);var ue=Ag(O,ot),re=Ag(O,Qt);if(ue&&re&&(be.rangeCount!==1||be.anchorNode!==ue.node||be.anchorOffset!==ue.offset||be.focusNode!==re.node||be.focusOffset!==re.offset)){var he=Re.createRange();he.setStart(ue.node,ue.offset),be.removeAllRanges(),ot>Qt?(be.addRange(he),be.extend(re.node,re.offset)):(he.setEnd(re.node,re.offset),be.addRange(he))}}}}for(Re=[],be=O;be=be.parentNode;)be.nodeType===1&&Re.push({element:be,left:be.scrollLeft,top:be.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<Re.length;O++){var Se=Re[O];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}Uu=!!Of,_f=Of=null}finally{Mt=g,le.p=u,X.T=s}}e.current=a,za=2}}function T0(){if(za===2){za=0;var e=vi,a=Ks,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=X.T,X.T=null;var u=le.p;le.p=2;var g=Mt;Mt|=4;try{s0(e,a.alternate,a)}finally{Mt=g,le.p=u,X.T=s}}za=3}}function B0(){if(za===4||za===3){za=0,ke();var e=vi,a=Ks,s=qs,u=p0;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?za=5:(za=0,Ks=vi=null,L0(e,e.pendingLanes));var g=e.pendingLanes;if(g===0&&(wi=null),Ua(s),a=a.stateNode,M&&typeof M.onCommitFiberRoot=="function")try{M.onCommitFiberRoot(qe,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=X.T,g=le.p,le.p=2,X.T=null;try{for(var p=e.onRecoverableError,T=0;T<u.length;T++){var O=u[T];p(O.value,{componentStack:O.stack})}}finally{X.T=a,le.p=g}}(qs&3)!==0&&vu(),fr(e),g=e.pendingLanes,(s&4194090)!==0&&(g&42)!==0?e===Cf?Wo++:(Wo=0,Cf=e):Wo=0,Xo(0)}}function L0(e,a){(e.pooledCacheLanes&=a)===0&&(a=e.pooledCache,a!=null&&(e.pooledCache=null,Bo(a)))}function vu(e){return S0(),T0(),B0(),D0()}function D0(){if(za!==5)return!1;var e=vi,a=wf;wf=0;var s=Ua(qs),u=X.T,g=le.p;try{le.p=32>s?32:s,X.T=null,s=vf,vf=null;var p=vi,T=qs;if(za=0,Ks=vi=null,qs=0,(Mt&6)!==0)throw Error(i(331));var O=Mt;if(Mt|=4,g0(p.current),f0(p,p.current,T,s),Mt=O,Xo(0,!1),M&&typeof M.onPostCommitFiberRoot=="function")try{M.onPostCommitFiberRoot(qe,p)}catch{}return!0}finally{le.p=g,X.T=u,L0(e,a)}}function R0(e,a,s){a=Mn(s,a),a=ef(e.stateNode,a,2),e=fi(e,a,2),e!==null&&(Xt(e,2),fr(e))}function Vt(e,a,s){if(e.tag===3)R0(e,e,s);else for(;a!==null;){if(a.tag===3){R0(a,e,s);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(wi===null||!wi.has(u))){e=Mn(s,e),s=Om(2),u=fi(a,s,2),u!==null&&(_m(s,u,a,e),Xt(u,2),fr(u));break}}a=a.return}}function kf(e,a,s){var u=e.pingCache;if(u===null){u=e.pingCache=new pv;var g=new Set;u.set(a,g)}else g=u.get(a),g===void 0&&(g=new Set,u.set(a,g));g.has(s)||(pf=!0,g.add(s),e=vv.bind(null,e,a,s),a.then(e,e))}function vv(e,a,s){var u=e.pingCache;u!==null&&u.delete(a),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Yt===e&&(Tt&s)===s&&(ua===4||ua===3&&(Tt&62914560)===Tt&&300>He()-bf?(Mt&2)===0&&Ys(e,0):yf|=s,Gs===Tt&&(Gs=0)),fr(e)}function U0(e,a){a===0&&(a=ft()),e=Bs(e,a),e!==null&&(Xt(e,a),fr(e))}function Cv(e){var a=e.memoizedState,s=0;a!==null&&(s=a.retryLane),U0(e,s)}function xv(e,a){var s=0;switch(e.tag){case 13:var u=e.stateNode,g=e.memoizedState;g!==null&&(s=g.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(a),U0(e,s)}function Nv(e,a){return mt(e,a)}var Cu=null,Ws=null,Sf=!1,xu=!1,Tf=!1,ls=0;function fr(e){e!==Ws&&e.next===null&&(Ws===null?Cu=Ws=e:Ws=Ws.next=e),xu=!0,Sf||(Sf=!0,kv())}function Xo(e,a){if(!Tf&&xu){Tf=!0;do for(var s=!1,u=Cu;u!==null;){if(e!==0){var g=u.pendingLanes;if(g===0)var p=0;else{var T=u.suspendedLanes,O=u.pingedLanes;p=(1<<31-v(42|e)+1)-1,p&=g&~(T&~O),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(s=!0,_0(u,p))}else p=Tt,p=Ye(u,u===Yt?p:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(p&3)===0||nt(u,p)||(s=!0,_0(u,p));u=u.next}while(s);Tf=!1}}function Iv(){M0()}function M0(){xu=Sf=!1;var e=0;ls!==0&&(Mv()&&(e=ls),ls=0);for(var a=He(),s=null,u=Cu;u!==null;){var g=u.next,p=j0(u,a);p===0?(u.next=null,s===null?Cu=g:s.next=g,g===null&&(Ws=s)):(s=u,(e!==0||(p&3)!==0)&&(xu=!0)),u=g}Xo(e)}function j0(e,a){for(var s=e.suspendedLanes,u=e.pingedLanes,g=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var T=31-v(p),O=1<<T,ee=g[T];ee===-1?((O&s)===0||(O&u)!==0)&&(g[T]=Xe(O,a)):ee<=a&&(e.expiredLanes|=O),p&=~O}if(a=Yt,s=Tt,s=Ye(e,e===a?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,s===0||e===a&&(jt===2||jt===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&wt(u),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||nt(e,s)){if(a=s&-s,a===e.callbackPriority)return a;switch(u!==null&&wt(u),Ua(s)){case 2:case 8:s=$;break;case 32:s=oe;break;case 268435456:s=Fe;break;default:s=oe}return u=O0.bind(null,e),s=mt(s,u),e.callbackPriority=a,e.callbackNode=s,a}return u!==null&&u!==null&&wt(u),e.callbackPriority=2,e.callbackNode=null,2}function O0(e,a){if(za!==0&&za!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(vu()&&e.callbackNode!==s)return null;var u=Tt;return u=Ye(e,e===Yt?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(E0(e,u,a),j0(e,He()),e.callbackNode!=null&&e.callbackNode===s?O0.bind(null,e):null)}function _0(e,a){if(vu())return null;E0(e,a,!0)}function kv(){Ov(function(){(Mt&6)!==0?mt(pt,Iv):M0()})}function Bf(){return ls===0&&(ls=Jt()),ls}function P0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:De(""+e)}function F0(e,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,e.id&&s.setAttribute("form",e.id),a.parentNode.insertBefore(s,a),e=new FormData(e),s.parentNode.removeChild(s),e}function Sv(e,a,s,u,g){if(a==="submit"&&s&&s.stateNode===g){var p=P0((g[Na]||null).action),T=u.submitter;T&&(a=(a=T[Na]||null)?P0(a.formAction):T.getAttribute("formAction"),a!==null&&(p=a,T=null));var O=new yt("action","action",null,u,g);e.push({event:O,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ls!==0){var ee=T?F0(g,T):new FormData(g);Jd(s,{pending:!0,data:ee,method:g.method,action:p},null,ee)}}else typeof p=="function"&&(O.preventDefault(),ee=T?F0(g,T):new FormData(g),Jd(s,{pending:!0,data:ee,method:g.method,action:p},p,ee))},currentTarget:g}]})}}for(var Lf=0;Lf<Ad.length;Lf++){var Df=Ad[Lf],Tv=Df.toLowerCase(),Bv=Df[0].toUpperCase()+Df.slice(1);Wn(Tv,"on"+Bv)}Wn(Eg,"onAnimationEnd"),Wn(bg,"onAnimationIteration"),Wn(wg,"onAnimationStart"),Wn("dblclick","onDoubleClick"),Wn("focusin","onFocus"),Wn("focusout","onBlur"),Wn(qw,"onTransitionRun"),Wn(Yw,"onTransitionStart"),Wn(Jw,"onTransitionCancel"),Wn(vg,"onTransitionEnd"),Ia("onMouseEnter",["mouseout","mouseover"]),Ia("onMouseLeave",["mouseout","mouseover"]),Ia("onPointerEnter",["pointerout","pointerover"]),Ia("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $o="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(" "),Lv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($o));function Q0(e,a){a=(a&4)!==0;for(var s=0;s<e.length;s++){var u=e[s],g=u.event;u=u.listeners;e:{var p=void 0;if(a)for(var T=u.length-1;0<=T;T--){var O=u[T],ee=O.instance,Ae=O.currentTarget;if(O=O.listener,ee!==p&&g.isPropagationStopped())break e;p=O,g.currentTarget=Ae;try{p(g)}catch(Ne){du(Ne)}g.currentTarget=null,p=ee}else for(T=0;T<u.length;T++){if(O=u[T],ee=O.instance,Ae=O.currentTarget,O=O.listener,ee!==p&&g.isPropagationStopped())break e;p=O,g.currentTarget=Ae;try{p(g)}catch(Ne){du(Ne)}g.currentTarget=null,p=ee}}}}function It(e,a){var s=a[ti];s===void 0&&(s=a[ti]=new Set);var u=e+"__bubble";s.has(u)||(H0(a,e,2,!1),s.add(u))}function Rf(e,a,s){var u=0;a&&(u|=4),H0(s,e,u,a)}var Nu="_reactListening"+Math.random().toString(36).slice(2);function Uf(e){if(!e[Nu]){e[Nu]=!0,Hi.forEach(function(s){s!=="selectionchange"&&(Lv.has(s)||Rf(s,!1,e),Rf(s,!0,e))});var a=e.nodeType===9?e:e.ownerDocument;a===null||a[Nu]||(a[Nu]=!0,Rf("selectionchange",!1,a))}}function H0(e,a,s,u){switch(fp(a)){case 2:var g=rC;break;case 8:g=iC;break;default:g=Yf}s=g.bind(null,a,s,e),g=void 0,!Zt||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(g=!0),u?g!==void 0?e.addEventListener(a,s,{capture:!0,passive:g}):e.addEventListener(a,s,!0):g!==void 0?e.addEventListener(a,s,{passive:g}):e.addEventListener(a,s,!1)}function Mf(e,a,s,u,g){var p=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var T=u.tag;if(T===3||T===4){var O=u.stateNode.containerInfo;if(O===g)break;if(T===4)for(T=u.return;T!==null;){var ee=T.tag;if((ee===3||ee===4)&&T.stateNode.containerInfo===g)return;T=T.return}for(;O!==null;){if(T=Gn(O),T===null)return;if(ee=T.tag,ee===5||ee===6||ee===26||ee===27){u=p=T;continue e}O=O.parentNode}}u=u.return}en(function(){var Ae=p,Ne=Ge(s),Re=[];e:{var ye=Cg.get(e);if(ye!==void 0){var be=yt,ct=e;switch(e){case"keypress":if(_(s)===0)break e;case"keydown":case"keyup":be=$c;break;case"focusin":ct="focus",be=bo;break;case"focusout":ct="blur",be=bo;break;case"beforeblur":case"afterblur":be=bo;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":be=Ml;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":be=Fc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":be=ed;break;case Eg:case bg:case wg:be=zc;break;case vg:be=ad;break;case"scroll":case"scrollend":be=ea;break;case"wheel":be=Pl;break;case"copy":case"cut":case"paste":be=Gc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":be=_l;break;case"toggle":case"beforetoggle":be=id}var ot=(a&4)!==0,Qt=!ot&&(e==="scroll"||e==="scrollend"),ue=ot?ye!==null?ye+"Capture":null:ye;ot=[];for(var re=Ae,he;re!==null;){var Se=re;if(he=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||he===null||ue===null||(Se=En(re,ue),Se!=null&&ot.push(Zo(re,Se,he))),Qt)break;re=re.return}0<ot.length&&(ye=new be(ye,ct,null,s,Ne),Re.push({event:ye,listeners:ot}))}}if((a&7)===0){e:{if(ye=e==="mouseover"||e==="pointerover",be=e==="mouseout"||e==="pointerout",ye&&s!==Qe&&(ct=s.relatedTarget||s.fromElement)&&(Gn(ct)||ct[na]))break e;if((be||ye)&&(ye=Ne.window===Ne?Ne:(ye=Ne.ownerDocument)?ye.defaultView||ye.parentWindow:window,be?(ct=s.relatedTarget||s.toElement,be=Ae,ct=ct?Gn(ct):null,ct!==null&&(Qt=l(ct),ot=ct.tag,ct!==Qt||ot!==5&&ot!==27&&ot!==6)&&(ct=null)):(be=null,ct=Ae),be!==ct)){if(ot=Ml,Se="onMouseLeave",ue="onMouseEnter",re="mouse",(e==="pointerout"||e==="pointerover")&&(ot=_l,Se="onPointerLeave",ue="onPointerEnter",re="pointer"),Qt=be==null?ye:Za(be),he=ct==null?ye:Za(ct),ye=new ot(Se,re+"leave",be,s,Ne),ye.target=Qt,ye.relatedTarget=he,Se=null,Gn(Ne)===Ae&&(ot=new ot(ue,re+"enter",ct,s,Ne),ot.target=he,ot.relatedTarget=Qt,Se=ot),Qt=Se,be&&ct)t:{for(ot=be,ue=ct,re=0,he=ot;he;he=Xs(he))re++;for(he=0,Se=ue;Se;Se=Xs(Se))he++;for(;0<re-he;)ot=Xs(ot),re--;for(;0<he-re;)ue=Xs(ue),he--;for(;re--;){if(ot===ue||ue!==null&&ot===ue.alternate)break t;ot=Xs(ot),ue=Xs(ue)}ot=null}else ot=null;be!==null&&z0(Re,ye,be,ot,!1),ct!==null&&Qt!==null&&z0(Re,Qt,ct,ot,!0)}}e:{if(ye=Ae?Za(Ae):window,be=ye.nodeName&&ye.nodeName.toLowerCase(),be==="select"||be==="input"&&ye.type==="file")var et=lg;else if(Ya(ye))if(ug)et=Vw;else{et=Hw;var xt=Qw}else be=ye.nodeName,!be||be.toLowerCase()!=="input"||ye.type!=="checkbox"&&ye.type!=="radio"?Ae&&H(Ae.elementType)&&(et=lg):et=zw;if(et&&(et=et(e,Ae))){cn(Re,et,s,Ne);break e}xt&&xt(e,ye,Ae),e==="focusout"&&Ae&&ye.type==="number"&&Ae.memoizedProps.value!=null&&Sr(ye,"number",ye.value)}switch(xt=Ae?Za(Ae):window,e){case"focusin":(Ya(xt)||xt.contentEditable==="true")&&(ks=xt,dd=Ae,No=null);break;case"focusout":No=dd=ks=null;break;case"mousedown":fd=!0;break;case"contextmenu":case"mouseup":case"dragend":fd=!1,pg(Re,s,Ne);break;case"selectionchange":if(Kw)break;case"keydown":case"keyup":pg(Re,s,Ne)}var rt;if(oi)e:{switch(e){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else lt?Ze(e,s)&&(ut="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(ut="onCompositionStart");ut&&(Co&&s.locale!=="ko"&&(lt||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&lt&&(rt=D()):(ga=Ne,m="value"in ga?ga.value:ga.textContent,lt=!0)),xt=Iu(Ae,ut),0<xt.length&&(ut=new wo(ut,e,null,s,Ne),Re.push({event:ut,listeners:xt}),rt?ut.data=rt:(rt=st(s),rt!==null&&(ut.data=rt)))),(rt=Fl?Lt(e,s):bn(e,s))&&(ut=Iu(Ae,"onBeforeInput"),0<ut.length&&(xt=new wo("onBeforeInput","beforeinput",null,s,Ne),Re.push({event:xt,listeners:ut}),xt.data=rt)),Sv(Re,e,Ae,s,Ne)}Q0(Re,a)})}function Zo(e,a,s){return{instance:e,listener:a,currentTarget:s}}function Iu(e,a){for(var s=a+"Capture",u=[];e!==null;){var g=e,p=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||p===null||(g=En(e,s),g!=null&&u.unshift(Zo(e,g,p)),g=En(e,a),g!=null&&u.push(Zo(e,g,p))),e.tag===3)return u;e=e.return}return[]}function Xs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function z0(e,a,s,u,g){for(var p=a._reactName,T=[];s!==null&&s!==u;){var O=s,ee=O.alternate,Ae=O.stateNode;if(O=O.tag,ee!==null&&ee===u)break;O!==5&&O!==26&&O!==27||Ae===null||(ee=Ae,g?(Ae=En(s,p),Ae!=null&&T.unshift(Zo(s,Ae,ee))):g||(Ae=En(s,p),Ae!=null&&T.push(Zo(s,Ae,ee)))),s=s.return}T.length!==0&&e.push({event:a,listeners:T})}var Dv=/\r\n?/g,Rv=/\u0000|\uFFFD/g;function V0(e){return(typeof e=="string"?e:""+e).replace(Dv,`
`).replace(Rv,"")}function G0(e,a){return a=V0(a),V0(e)===a}function ku(){}function Ft(e,a,s,u,g,p){switch(s){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Un(e,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Un(e,""+u);break;case"className":kr(e,"class",u);break;case"tabIndex":kr(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":kr(e,s,u);break;case"style":j(e,u,p);break;case"data":if(a!=="object"){kr(e,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||s!=="href")){e.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(s);break}u=De(""+u),e.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){e.setAttribute(s,"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 p=="function"&&(s==="formAction"?(a!=="input"&&Ft(e,a,"name",g.name,g,null),Ft(e,a,"formEncType",g.formEncType,g,null),Ft(e,a,"formMethod",g.formMethod,g,null),Ft(e,a,"formTarget",g.formTarget,g,null)):(Ft(e,a,"encType",g.encType,g,null),Ft(e,a,"method",g.method,g,null),Ft(e,a,"target",g.target,g,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(s);break}u=De(""+u),e.setAttribute(s,u);break;case"onClick":u!=null&&(e.onclick=ku);break;case"onScroll":u!=null&&It("scroll",e);break;case"onScrollEnd":u!=null&&It("scrollend",e);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(s=u.__html,s!=null){if(g.children!=null)throw Error(i(60));e.innerHTML=s}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.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"){e.removeAttribute("xlink:href");break}s=De(""+u),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);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"?e.setAttribute(s,""+u):e.removeAttribute(s);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"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":u===!0?e.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(s,u):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(s,u):e.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(s):e.setAttribute(s,u);break;case"popover":It("beforetoggle",e),It("toggle",e),Ln(e,"popover",u);break;case"xlinkActuate":Ka(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Ka(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Ka(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Ka(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Ka(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Ka(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Ka(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Ka(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Ka(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Ln(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ie.get(s)||s,Ln(e,s,u))}}function jf(e,a,s,u,g,p){switch(s){case"style":j(e,u,p);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(s=u.__html,s!=null){if(g.children!=null)throw Error(i(60));e.innerHTML=s}}break;case"children":typeof u=="string"?Un(e,u):(typeof u=="number"||typeof u=="bigint")&&Un(e,""+u);break;case"onScroll":u!=null&&It("scroll",e);break;case"onScrollEnd":u!=null&&It("scrollend",e);break;case"onClick":u!=null&&(e.onclick=ku);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ir.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(g=s.endsWith("Capture"),a=s.slice(2,g?s.length-7:void 0),p=e[Na]||null,p=p!=null?p[s]:null,typeof p=="function"&&e.removeEventListener(a,p,g),typeof u=="function")){typeof p!="function"&&p!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(a,u,g);break e}s in e?e[s]=u:u===!0?e.setAttribute(s,""):Ln(e,s,u)}}}function Va(e,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":It("error",e),It("load",e);var u=!1,g=!1,p;for(p in s)if(s.hasOwnProperty(p)){var T=s[p];if(T!=null)switch(p){case"src":u=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ft(e,a,p,T,s,null)}}g&&Ft(e,a,"srcSet",s.srcSet,s,null),u&&Ft(e,a,"src",s.src,s,null);return;case"input":It("invalid",e);var O=p=T=g=null,ee=null,Ae=null;for(u in s)if(s.hasOwnProperty(u)){var Ne=s[u];if(Ne!=null)switch(u){case"name":g=Ne;break;case"type":T=Ne;break;case"checked":ee=Ne;break;case"defaultChecked":Ae=Ne;break;case"value":p=Ne;break;case"defaultValue":O=Ne;break;case"children":case"dangerouslySetInnerHTML":if(Ne!=null)throw Error(i(137,a));break;default:Ft(e,a,u,Ne,s,null)}}or(e,p,O,ee,Ae,T,g,!1),Jn(e);return;case"select":It("invalid",e),u=T=p=null;for(g in s)if(s.hasOwnProperty(g)&&(O=s[g],O!=null))switch(g){case"value":p=O;break;case"defaultValue":T=O;break;case"multiple":u=O;default:Ft(e,a,g,O,s,null)}a=p,s=T,e.multiple=!!u,a!=null?Rn(e,!!u,a,!1):s!=null&&Rn(e,!!u,s,!0);return;case"textarea":It("invalid",e),p=g=u=null;for(T in s)if(s.hasOwnProperty(T)&&(O=s[T],O!=null))switch(T){case"value":u=O;break;case"defaultValue":g=O;break;case"children":p=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(i(91));break;default:Ft(e,a,T,O,s,null)}Gi(e,u,g,p),Jn(e);return;case"option":for(ee in s)if(s.hasOwnProperty(ee)&&(u=s[ee],u!=null))switch(ee){case"selected":e.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Ft(e,a,ee,u,s,null)}return;case"dialog":It("beforetoggle",e),It("toggle",e),It("cancel",e),It("close",e);break;case"iframe":case"object":It("load",e);break;case"video":case"audio":for(u=0;u<$o.length;u++)It($o[u],e);break;case"image":It("error",e),It("load",e);break;case"details":It("toggle",e);break;case"embed":case"source":case"link":It("error",e),It("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ae in s)if(s.hasOwnProperty(Ae)&&(u=s[Ae],u!=null))switch(Ae){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ft(e,a,Ae,u,s,null)}return;default:if(H(a)){for(Ne in s)s.hasOwnProperty(Ne)&&(u=s[Ne],u!==void 0&&jf(e,a,Ne,u,s,void 0));return}}for(O in s)s.hasOwnProperty(O)&&(u=s[O],u!=null&&Ft(e,a,O,u,s,null))}function Uv(e,a,s,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,p=null,T=null,O=null,ee=null,Ae=null,Ne=null;for(be in s){var Re=s[be];if(s.hasOwnProperty(be)&&Re!=null)switch(be){case"checked":break;case"value":break;case"defaultValue":ee=Re;default:u.hasOwnProperty(be)||Ft(e,a,be,null,u,Re)}}for(var ye in u){var be=u[ye];if(Re=s[ye],u.hasOwnProperty(ye)&&(be!=null||Re!=null))switch(ye){case"type":p=be;break;case"name":g=be;break;case"checked":Ae=be;break;case"defaultChecked":Ne=be;break;case"value":T=be;break;case"defaultValue":O=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(i(137,a));break;default:be!==Re&&Ft(e,a,ye,be,u,Re)}}Vi(e,T,O,ee,Ae,Ne,p,g);return;case"select":be=T=O=ye=null;for(p in s)if(ee=s[p],s.hasOwnProperty(p)&&ee!=null)switch(p){case"value":break;case"multiple":be=ee;default:u.hasOwnProperty(p)||Ft(e,a,p,null,u,ee)}for(g in u)if(p=u[g],ee=s[g],u.hasOwnProperty(g)&&(p!=null||ee!=null))switch(g){case"value":ye=p;break;case"defaultValue":O=p;break;case"multiple":T=p;default:p!==ee&&Ft(e,a,g,p,u,ee)}a=O,s=T,u=be,ye!=null?Rn(e,!!s,ye,!1):!!u!=!!s&&(a!=null?Rn(e,!!s,a,!0):Rn(e,!!s,s?[]:"",!1));return;case"textarea":be=ye=null;for(O in s)if(g=s[O],s.hasOwnProperty(O)&&g!=null&&!u.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:Ft(e,a,O,null,u,g)}for(T in u)if(g=u[T],p=s[T],u.hasOwnProperty(T)&&(g!=null||p!=null))switch(T){case"value":ye=g;break;case"defaultValue":be=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(i(91));break;default:g!==p&&Ft(e,a,T,g,u,p)}si(e,ye,be);return;case"option":for(var ct in s)if(ye=s[ct],s.hasOwnProperty(ct)&&ye!=null&&!u.hasOwnProperty(ct))switch(ct){case"selected":e.selected=!1;break;default:Ft(e,a,ct,null,u,ye)}for(ee in u)if(ye=u[ee],be=s[ee],u.hasOwnProperty(ee)&&ye!==be&&(ye!=null||be!=null))switch(ee){case"selected":e.selected=ye&&typeof ye!="function"&&typeof ye!="symbol";break;default:Ft(e,a,ee,ye,u,be)}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 s)ye=s[ot],s.hasOwnProperty(ot)&&ye!=null&&!u.hasOwnProperty(ot)&&Ft(e,a,ot,null,u,ye);for(Ae in u)if(ye=u[Ae],be=s[Ae],u.hasOwnProperty(Ae)&&ye!==be&&(ye!=null||be!=null))switch(Ae){case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(i(137,a));break;default:Ft(e,a,Ae,ye,u,be)}return;default:if(H(a)){for(var Qt in s)ye=s[Qt],s.hasOwnProperty(Qt)&&ye!==void 0&&!u.hasOwnProperty(Qt)&&jf(e,a,Qt,void 0,u,ye);for(Ne in u)ye=u[Ne],be=s[Ne],!u.hasOwnProperty(Ne)||ye===be||ye===void 0&&be===void 0||jf(e,a,Ne,ye,u,be);return}}for(var ue in s)ye=s[ue],s.hasOwnProperty(ue)&&ye!=null&&!u.hasOwnProperty(ue)&&Ft(e,a,ue,null,u,ye);for(Re in u)ye=u[Re],be=s[Re],!u.hasOwnProperty(Re)||ye===be||ye==null&&be==null||Ft(e,a,Re,ye,u,be)}var Of=null,_f=null;function Su(e){return e.nodeType===9?e:e.ownerDocument}function K0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function q0(e,a){if(e===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&a==="foreignObject"?0:e}function Pf(e,a){return e==="textarea"||e==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Ff=null;function Mv(){var e=window.event;return e&&e.type==="popstate"?e===Ff?!1:(Ff=e,!0):(Ff=null,!1)}var Y0=typeof setTimeout=="function"?setTimeout:void 0,jv=typeof clearTimeout=="function"?clearTimeout:void 0,J0=typeof Promise=="function"?Promise:void 0,Ov=typeof queueMicrotask=="function"?queueMicrotask:typeof J0<"u"?function(e){return J0.resolve(null).then(e).catch(_v)}:Y0;function _v(e){setTimeout(function(){throw e})}function xi(e){return e==="head"}function W0(e,a){var s=a,u=0,g=0;do{var p=s.nextSibling;if(e.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"){if(0<u&&8>u){s=u;var T=e.ownerDocument;if(s&1&&el(T.documentElement),s&2&&el(T.body),s&4)for(s=T.head,el(s),T=s.firstChild;T;){var O=T.nextSibling,ee=T.nodeName;T[Bn]||ee==="SCRIPT"||ee==="STYLE"||ee==="LINK"&&T.rel.toLowerCase()==="stylesheet"||s.removeChild(T),T=O}}if(g===0){e.removeChild(p),ll(a);return}g--}else s==="$"||s==="$?"||s==="$!"?g++:u=s.charCodeAt(0)-48;else u=0;s=p}while(s);ll(a)}function Qf(e){var a=e.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Qf(s),ha(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function Pv(e,a,s,u){for(;e.nodeType===1;){var g=s;if(e.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[Bn])switch(a){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==g.rel||e.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||e.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||e.getAttribute("title")!==(g.title==null?null:g.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(g.src==null?null:g.src)||e.getAttribute("type")!==(g.type==null?null:g.type)||e.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(a==="input"&&e.type==="hidden"){var p=g.name==null?null:""+g.name;if(g.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=$n(e.nextSibling),e===null)break}return null}function Fv(e,a,s){if(a==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=$n(e.nextSibling),e===null))return null;return e}function Hf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Qv(e,a){var s=e.ownerDocument;if(e.data!=="$?"||s.readyState==="complete")a();else{var u=function(){a(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function $n(e){for(;e!=null;e=e.nextSibling){var a=e.nodeType;if(a===1||a===3)break;if(a===8){if(a=e.data,a==="$"||a==="$!"||a==="$?"||a==="F!"||a==="F")break;if(a==="/$")return null}}return e}var zf=null;function X0(e){e=e.previousSibling;for(var a=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(a===0)return e;a--}else s==="/$"&&a++}e=e.previousSibling}return null}function $0(e,a,s){switch(a=Su(s),e){case"html":if(e=a.documentElement,!e)throw Error(i(452));return e;case"head":if(e=a.head,!e)throw Error(i(453));return e;case"body":if(e=a.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function el(e){for(var a=e.attributes;a.length;)e.removeAttributeNode(a[0]);ha(e)}var Qn=new Map,Z0=new Set;function Tu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var zr=le.d;le.d={f:Hv,r:zv,D:Vv,C:Gv,L:Kv,m:qv,X:Jv,S:Yv,M:Wv};function Hv(){var e=zr.f(),a=bu();return e||a}function zv(e){var a=ir(e);a!==null&&a.tag===5&&a.type==="form"?Em(a):zr.r(e)}var $s=typeof document>"u"?null:document;function ep(e,a,s){var u=$s;if(u&&typeof a=="string"&&a){var g=Qa(a);g='link[rel="'+e+'"][href="'+g+'"]',typeof s=="string"&&(g+='[crossorigin="'+s+'"]'),Z0.has(g)||(Z0.add(g),e={rel:e,crossOrigin:s,href:a},u.querySelector(g)===null&&(a=u.createElement("link"),Va(a,"link",e),$t(a),u.head.appendChild(a)))}}function Vv(e){zr.D(e),ep("dns-prefetch",e,null)}function Gv(e,a){zr.C(e,a),ep("preconnect",e,a)}function Kv(e,a,s){zr.L(e,a,s);var u=$s;if(u&&e&&a){var g='link[rel="preload"][as="'+Qa(a)+'"]';a==="image"&&s&&s.imageSrcSet?(g+='[imagesrcset="'+Qa(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(g+='[imagesizes="'+Qa(s.imageSizes)+'"]')):g+='[href="'+Qa(e)+'"]';var p=g;switch(a){case"style":p=Zs(e);break;case"script":p=eo(e)}Qn.has(p)||(e=y({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:e,as:a},s),Qn.set(p,e),u.querySelector(g)!==null||a==="style"&&u.querySelector(tl(p))||a==="script"&&u.querySelector(al(p))||(a=u.createElement("link"),Va(a,"link",e),$t(a),u.head.appendChild(a)))}}function qv(e,a){zr.m(e,a);var s=$s;if(s&&e){var u=a&&typeof a.as=="string"?a.as:"script",g='link[rel="modulepreload"][as="'+Qa(u)+'"][href="'+Qa(e)+'"]',p=g;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=eo(e)}if(!Qn.has(p)&&(e=y({rel:"modulepreload",href:e},a),Qn.set(p,e),s.querySelector(g)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(al(p)))return}u=s.createElement("link"),Va(u,"link",e),$t(u),s.head.appendChild(u)}}}function Yv(e,a,s){zr.S(e,a,s);var u=$s;if(u&&e){var g=Kn(u).hoistableStyles,p=Zs(e);a=a||"default";var T=g.get(p);if(!T){var O={loading:0,preload:null};if(T=u.querySelector(tl(p)))O.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":a},s),(s=Qn.get(p))&&Vf(e,s);var ee=T=u.createElement("link");$t(ee),Va(ee,"link",e),ee._p=new Promise(function(Ae,Ne){ee.onload=Ae,ee.onerror=Ne}),ee.addEventListener("load",function(){O.loading|=1}),ee.addEventListener("error",function(){O.loading|=2}),O.loading|=4,Bu(T,a,u)}T={type:"stylesheet",instance:T,count:1,state:O},g.set(p,T)}}}function Jv(e,a){zr.X(e,a);var s=$s;if(s&&e){var u=Kn(s).hoistableScripts,g=eo(e),p=u.get(g);p||(p=s.querySelector(al(g)),p||(e=y({src:e,async:!0},a),(a=Qn.get(g))&&Gf(e,a),p=s.createElement("script"),$t(p),Va(p,"link",e),s.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},u.set(g,p))}}function Wv(e,a){zr.M(e,a);var s=$s;if(s&&e){var u=Kn(s).hoistableScripts,g=eo(e),p=u.get(g);p||(p=s.querySelector(al(g)),p||(e=y({src:e,async:!0,type:"module"},a),(a=Qn.get(g))&&Gf(e,a),p=s.createElement("script"),$t(p),Va(p,"link",e),s.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},u.set(g,p))}}function tp(e,a,s,u){var g=(g=Le.current)?Tu(g):null;if(!g)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=Zs(s.href),s=Kn(g).hoistableStyles,u=s.get(a),u||(u={type:"style",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=Zs(s.href);var p=Kn(g).hoistableStyles,T=p.get(e);if(T||(g=g.ownerDocument||g,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,T),(p=g.querySelector(tl(e)))&&!p._p&&(T.instance=p,T.state.loading=5),Qn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Qn.set(e,s),p||Xv(g,e,s,T.state))),a&&u===null)throw Error(i(528,""));return T}if(a&&u!==null)throw Error(i(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=eo(s),s=Kn(g).hoistableScripts,u=s.get(a),u||(u={type:"script",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Zs(e){return'href="'+Qa(e)+'"'}function tl(e){return'link[rel="stylesheet"]['+e+"]"}function ap(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Xv(e,a,s,u){e.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=e.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Va(a,"link",s),$t(a),e.head.appendChild(a))}function eo(e){return'[src="'+Qa(e)+'"]'}function al(e){return"script[async]"+e}function np(e,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var u=e.querySelector('style[data-href~="'+Qa(s.href)+'"]');if(u)return a.instance=u,$t(u),u;var g=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),$t(u),Va(u,"style",g),Bu(u,s.precedence,e),a.instance=u;case"stylesheet":g=Zs(s.href);var p=e.querySelector(tl(g));if(p)return a.state.loading|=4,a.instance=p,$t(p),p;u=ap(s),(g=Qn.get(g))&&Vf(u,g),p=(e.ownerDocument||e).createElement("link"),$t(p);var T=p;return T._p=new Promise(function(O,ee){T.onload=O,T.onerror=ee}),Va(p,"link",u),a.state.loading|=4,Bu(p,s.precedence,e),a.instance=p;case"script":return p=eo(s.src),(g=e.querySelector(al(p)))?(a.instance=g,$t(g),g):(u=s,(g=Qn.get(p))&&(u=y({},s),Gf(u,g)),e=e.ownerDocument||e,g=e.createElement("script"),$t(g),Va(g,"link",u),e.head.appendChild(g),a.instance=g);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Bu(u,s.precedence,e));return a.instance}function Bu(e,a,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=u.length?u[u.length-1]:null,p=g,T=0;T<u.length;T++){var O=u[T];if(O.dataset.precedence===a)p=O;else if(p!==g)break}p?p.parentNode.insertBefore(e,p.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(e,a.firstChild))}function Vf(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.title==null&&(e.title=a.title)}function Gf(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.integrity==null&&(e.integrity=a.integrity)}var Lu=null;function rp(e,a,s){if(Lu===null){var u=new Map,g=Lu=new Map;g.set(s,u)}else g=Lu,u=g.get(s),u||(u=new Map,g.set(s,u));if(u.has(e))return u;for(u.set(e,null),s=s.getElementsByTagName(e),g=0;g<s.length;g++){var p=s[g];if(!(p[Bn]||p[Kt]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var T=p.getAttribute(a)||"";T=e+T;var O=u.get(T);O?O.push(p):u.set(T,[p])}}return u}function ip(e,a,s){e=e.ownerDocument||e,e.head.insertBefore(s,a==="title"?e.querySelector("head > title"):null)}function $v(e,a,s){if(s===1||a.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return e=a.disabled,typeof a.precedence=="string"&&e==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function sp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var nl=null;function Zv(){}function eC(e,a,s){if(nl===null)throw Error(i(475));var u=nl;if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var g=Zs(s.href),p=e.querySelector(tl(g));if(p){e=p._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(u.count++,u=Du.bind(u),e.then(u,u)),a.state.loading|=4,a.instance=p,$t(p);return}p=e.ownerDocument||e,s=ap(s),(g=Qn.get(g))&&Vf(s,g),p=p.createElement("link"),$t(p);var T=p;T._p=new Promise(function(O,ee){T.onload=O,T.onerror=ee}),Va(p,"link",s),a.instance=p}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(a,e),(e=a.state.preload)&&(a.state.loading&3)===0&&(u.count++,a=Du.bind(u),e.addEventListener("load",a),e.addEventListener("error",a))}}function tC(){if(nl===null)throw Error(i(475));var e=nl;return e.stylesheets&&e.count===0&&Kf(e,e.stylesheets),0<e.count?function(a){var s=setTimeout(function(){if(e.stylesheets&&Kf(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s)}}:null}function Du(){if(this.count--,this.count===0){if(this.stylesheets)Kf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ru=null;function Kf(e,a){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ru=new Map,a.forEach(aC,e),Ru=null,Du.call(e))}function aC(e,a){if(!(a.state.loading&4)){var s=Ru.get(e);if(s)var u=s.get(null);else{s=new Map,Ru.set(e,s);for(var g=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<g.length;p++){var T=g[p];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(s.set(T.dataset.precedence,T),u=T)}u&&s.set(null,u)}g=a.instance,T=g.getAttribute("data-precedence"),p=s.get(T)||u,p===u&&s.set(null,g),s.set(T,g),this.count++,u=Du.bind(this),g.addEventListener("load",u),g.addEventListener("error",u),p?p.parentNode.insertBefore(g,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(g,e.firstChild)),a.state.loading|=4}}var rl={$$typeof:B,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function nC(e,a,s,u,g,p,T,O){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wt(0),this.hiddenUpdates=Wt(null),this.identifierPrefix=u,this.onUncaughtError=g,this.onCaughtError=p,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function op(e,a,s,u,g,p,T,O,ee,Ae,Ne,Re){return e=new nC(e,a,s,T,O,ee,Ae,Re),a=1,p===!0&&(a|=24),p=Cn(3,null,null,a),e.current=p,p.stateNode=e,a=Id(),a.refCount++,e.pooledCache=a,a.refCount++,p.memoizedState={element:u,isDehydrated:s,cache:a},Bd(p),e}function lp(e){return e?(e=Ls,e):Ls}function up(e,a,s,u,g,p){g=lp(g),u.context===null?u.context=g:u.pendingContext=g,u=di(a),u.payload={element:s},p=p===void 0?null:p,p!==null&&(u.callback=p),s=fi(e,u,a),s!==null&&(Sn(s,e,a),Uo(s,e,a))}function cp(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<a?s:a}}function qf(e,a){cp(e,a),(e=e.alternate)&&cp(e,a)}function dp(e){if(e.tag===13){var a=Bs(e,67108864);a!==null&&Sn(a,e,67108864),qf(e,67108864)}}var Uu=!0;function rC(e,a,s,u){var g=X.T;X.T=null;var p=le.p;try{le.p=2,Yf(e,a,s,u)}finally{le.p=p,X.T=g}}function iC(e,a,s,u){var g=X.T;X.T=null;var p=le.p;try{le.p=8,Yf(e,a,s,u)}finally{le.p=p,X.T=g}}function Yf(e,a,s,u){if(Uu){var g=Jf(u);if(g===null)Mf(e,a,u,Mu,s),hp(e,u);else if(oC(g,e,a,s,u))u.stopPropagation();else if(hp(e,u),a&4&&-1<sC.indexOf(e)){for(;g!==null;){var p=ir(g);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var T=Ie(p.pendingLanes);if(T!==0){var O=p;for(O.pendingLanes|=2,O.entangledLanes|=2;T;){var ee=1<<31-v(T);O.entanglements[1]|=ee,T&=~ee}fr(p),(Mt&6)===0&&(yu=He()+500,Xo(0))}}break;case 13:O=Bs(p,2),O!==null&&Sn(O,p,2),bu(),qf(p,2)}if(p=Jf(u),p===null&&Mf(e,a,u,Mu,s),p===g)break;g=p}g!==null&&u.stopPropagation()}else Mf(e,a,u,null,s)}}function Jf(e){return e=Ge(e),Wf(e)}var Mu=null;function Wf(e){if(Mu=null,e=Gn(e),e!==null){var a=l(e);if(a===null)e=null;else{var s=a.tag;if(s===13){if(e=c(a),e!==null)return e;e=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;e=null}else a!==e&&(e=null)}}return Mu=e,null}function fp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(it()){case pt:return 2;case $:return 8;case oe:case Ee:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var Xf=!1,Ni=null,Ii=null,ki=null,il=new Map,sl=new Map,Si=[],sC="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 hp(e,a){switch(e){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":Ii=null;break;case"mouseover":case"mouseout":ki=null;break;case"pointerover":case"pointerout":il.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":sl.delete(a.pointerId)}}function ol(e,a,s,u,g,p){return e===null||e.nativeEvent!==p?(e={blockedOn:a,domEventName:s,eventSystemFlags:u,nativeEvent:p,targetContainers:[g]},a!==null&&(a=ir(a),a!==null&&dp(a)),e):(e.eventSystemFlags|=u,a=e.targetContainers,g!==null&&a.indexOf(g)===-1&&a.push(g),e)}function oC(e,a,s,u,g){switch(a){case"focusin":return Ni=ol(Ni,e,a,s,u,g),!0;case"dragenter":return Ii=ol(Ii,e,a,s,u,g),!0;case"mouseover":return ki=ol(ki,e,a,s,u,g),!0;case"pointerover":var p=g.pointerId;return il.set(p,ol(il.get(p)||null,e,a,s,u,g)),!0;case"gotpointercapture":return p=g.pointerId,sl.set(p,ol(sl.get(p)||null,e,a,s,u,g)),!0}return!1}function Ap(e){var a=Gn(e.target);if(a!==null){var s=l(a);if(s!==null){if(a=s.tag,a===13){if(a=c(s),a!==null){e.blockedOn=a,Fi(e.priority,function(){if(s.tag===13){var u=kn();u=nr(u);var g=Bs(s,u);g!==null&&Sn(g,s,u),qf(s,u)}});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ju(e){if(e.blockedOn!==null)return!1;for(var a=e.targetContainers;0<a.length;){var s=Jf(e.nativeEvent);if(s===null){s=e.nativeEvent;var u=new s.constructor(s.type,s);Qe=u,s.target.dispatchEvent(u),Qe=null}else return a=ir(s),a!==null&&dp(a),e.blockedOn=s,!1;a.shift()}return!0}function gp(e,a,s){ju(e)&&s.delete(a)}function lC(){Xf=!1,Ni!==null&&ju(Ni)&&(Ni=null),Ii!==null&&ju(Ii)&&(Ii=null),ki!==null&&ju(ki)&&(ki=null),il.forEach(gp),sl.forEach(gp)}function Ou(e,a){e.blockedOn===a&&(e.blockedOn=null,Xf||(Xf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,lC)))}var _u=null;function mp(e){_u!==e&&(_u=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){_u===e&&(_u=null);for(var a=0;a<e.length;a+=3){var s=e[a],u=e[a+1],g=e[a+2];if(typeof u!="function"){if(Wf(u||s)===null)continue;break}var p=ir(s);p!==null&&(e.splice(a,3),a-=3,Jd(p,{pending:!0,data:g,method:s.method,action:u},u,g))}}))}function ll(e){function a(ee){return Ou(ee,e)}Ni!==null&&Ou(Ni,e),Ii!==null&&Ou(Ii,e),ki!==null&&Ou(ki,e),il.forEach(a),sl.forEach(a);for(var s=0;s<Si.length;s++){var u=Si[s];u.blockedOn===e&&(u.blockedOn=null)}for(;0<Si.length&&(s=Si[0],s.blockedOn===null);)Ap(s),s.blockedOn===null&&Si.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var g=s[u],p=s[u+1],T=g[Na]||null;if(typeof p=="function")T||mp(s);else if(T){var O=null;if(p&&p.hasAttribute("formAction")){if(g=p,T=p[Na]||null)O=T.formAction;else if(Wf(g)!==null)continue}else O=T.action;typeof O=="function"?s[u+1]=O:(s.splice(u,3),u-=3),mp(s)}}}function $f(e){this._internalRoot=e}Pu.prototype.render=$f.prototype.render=function(e){var a=this._internalRoot;if(a===null)throw Error(i(409));var s=a.current,u=kn();up(s,u,e,a,null,null)},Pu.prototype.unmount=$f.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var a=e.containerInfo;up(e.current,2,null,e,null,null),bu(),a[na]=null}};function Pu(e){this._internalRoot=e}Pu.prototype.unstable_scheduleHydration=function(e){if(e){var a=ei();e={blockedOn:null,target:e,priority:a};for(var s=0;s<Si.length&&a!==0&&a<Si[s].priority;s++);Si.splice(s,0,e),s===0&&Ap(e)}};var pp=t.version;if(pp!=="19.1.0")throw Error(i(527,pp,"19.1.0"));le.findDOMNode=function(e){var a=e._reactInternals;if(a===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=A(a),e=e!==null?h(e):null,e=e===null?null:e.stateNode,e};var uC={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:X,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fu.isDisabled&&Fu.supportsFiber)try{qe=Fu.inject(uC),M=Fu}catch{}}return cl.createRoot=function(e,a){if(!o(e))throw Error(i(299));var s=!1,u="",g=Rm,p=Um,T=Mm,O=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(g=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(O=a.unstable_transitionCallbacks)),a=op(e,1,!1,null,null,s,u,g,p,T,O,null),e[na]=a.current,Uf(e),new $f(a)},cl.hydrateRoot=function(e,a,s){if(!o(e))throw Error(i(299));var u=!1,g="",p=Rm,T=Um,O=Mm,ee=null,Ae=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(g=s.identifierPrefix),s.onUncaughtError!==void 0&&(p=s.onUncaughtError),s.onCaughtError!==void 0&&(T=s.onCaughtError),s.onRecoverableError!==void 0&&(O=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(ee=s.unstable_transitionCallbacks),s.formState!==void 0&&(Ae=s.formState)),a=op(e,1,!0,a,s??null,u,g,p,T,O,ee,Ae),a.context=lp(null),s=a.current,u=kn(),u=nr(u),g=di(u),g.callback=null,fi(s,g,u),s=u,a.current.lanes=s,Xt(a,s),fr(a),e[na]=a.current,Uf(e),new Pu(a)},cl.version="19.1.0",cl}var kp;function vC(){if(kp)return eh.exports;kp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),eh.exports=wC(),eh.exports}var CC=vC();const xC=Zr(CC);var L=xA();const gn=Zr(L),NC=(n,t,r,i)=>{var l,c,d,A;const o=[r,{code:t,...i||{}}];if((c=(l=n==null?void 0:n.services)==null?void 0:l.logger)!=null&&c.forward)return n.services.logger.forward(o,"warn","react-i18next::",!0);As(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),(A=(d=n==null?void 0:n.services)==null?void 0:d.logger)!=null&&A.warn?n.services.logger.warn(...o):console!=null&&console.warn&&console.warn(...o)},Sp={},aA=(n,t,r,i)=>{As(r)&&Sp[r]||(As(r)&&(Sp[r]=new Date),NC(n,t,r,i))},ab=(n,t)=>()=>{if(n.isInitialized)t();else{const r=()=>{setTimeout(()=>{n.off("initialized",r)},0),t()};n.on("initialized",r)}},nA=(n,t,r)=>{n.loadNamespaces(t,ab(n,r))},Tp=(n,t,r,i)=>{if(As(r)&&(r=[r]),n.options.preload&&n.options.preload.indexOf(t)>-1)return nA(n,r,i);r.forEach(o=>{n.options.ns.indexOf(o)<0&&n.options.ns.push(o)}),n.loadLanguages(t,ab(n,i))},IC=(n,t,r={})=>!t.languages||!t.languages.length?(aA(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(n,{lng:r.lng,precheck:(i,o)=>{var l;if(((l=r.bindI18n)==null?void 0:l.indexOf("languageChanging"))>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,n))return!1}}),As=n=>typeof n=="string",kC=n=>typeof n=="object"&&n!==null,SC=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,TC={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},BC=n=>TC[n],LC=n=>n.replace(SC,BC);let rA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:LC};const DC=(n={})=>{rA={...rA,...n}},RC=()=>rA;let nb;const UC=n=>{nb=n},MC=()=>nb,jC={type:"3rdParty",init(n){DC(n.options.react),UC(n)}},OC=L.createContext();class _C{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const PC=(n,t)=>{const r=L.useRef();return L.useEffect(()=>{r.current=n},[n,t]),r.current},rb=(n,t,r,i)=>n.getFixedT(t,r,i),FC=(n,t,r,i)=>L.useCallback(rb(n,t,r,i),[n,t,r,i]),ht=(n,t={})=>{var F,Q,V,W;const{i18n:r}=t,{i18n:i,defaultNS:o}=L.useContext(OC)||{},l=r||i||MC();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new _C),!l){aA(l,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const J=(G,Y)=>As(Y)?Y:kC(Y)&&As(Y.defaultValue)?Y.defaultValue:Array.isArray(G)?G[G.length-1]:G,z=[J,{},!1];return z.t=J,z.i18n={},z.ready=!1,z}(F=l.options.react)!=null&&F.wait&&aA(l,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const c={...RC(),...l.options.react,...t},{useSuspense:d,keyPrefix:A}=c;let h=o||((Q=l.options)==null?void 0:Q.defaultNS);h=As(h)?[h]:h||["translation"],(W=(V=l.reportNamespaces).addUsedNamespaces)==null||W.call(V,h);const y=(l.isInitialized||l.initializedStoreOnce)&&h.every(J=>IC(J,l,c)),E=FC(l,t.lng||null,c.nsMode==="fallback"?h:h[0],A),C=()=>E,x=()=>rb(l,t.lng||null,c.nsMode==="fallback"?h:h[0],A),[N,I]=L.useState(C);let k=h.join();t.lng&&(k=`${t.lng}${k}`);const S=PC(k),U=L.useRef(!0);L.useEffect(()=>{const{bindI18n:J,bindI18nStore:z}=c;U.current=!0,!y&&!d&&(t.lng?Tp(l,t.lng,h,()=>{U.current&&I(x)}):nA(l,h,()=>{U.current&&I(x)})),y&&S&&S!==k&&U.current&&I(x);const G=()=>{U.current&&I(x)};return J&&(l==null||l.on(J,G)),z&&(l==null||l.store.on(z,G)),()=>{U.current=!1,l&&(J==null||J.split(" ").forEach(Y=>l.off(Y,G))),z&&l&&z.split(" ").forEach(Y=>l.store.off(Y,G))}},[l,k]),L.useEffect(()=>{U.current&&y&&I(C)},[l,A,y]);const B=[N,l,y];if(B.t=N,B.i18n=l,B.ready=y,y||!y&&!d)return B;throw new Promise(J=>{t.lng?Tp(l,t.lng,h,()=>J()):nA(l,h,()=>J())})};var dl={},Bp;function QC(){if(Bp)return dl;Bp=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.parse=c,dl.serialize=h;const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,l=(()=>{const C=function(){};return C.prototype=Object.create(null),C})();function c(C,x){const N=new l,I=C.length;if(I<2)return N;const k=(x==null?void 0:x.decode)||y;let S=0;do{const U=C.indexOf("=",S);if(U===-1)break;const B=C.indexOf(";",S),F=B===-1?I:B;if(U>F){S=C.lastIndexOf(";",U-1)+1;continue}const Q=d(C,S,U),V=A(C,U,Q),W=C.slice(Q,V);if(N[W]===void 0){let J=d(C,U+1,F),z=A(C,F,J);const G=k(C.slice(J,z));N[W]=G}S=F+1}while(S<I);return N}function d(C,x,N){do{const I=C.charCodeAt(x);if(I!==32&&I!==9)return x}while(++x<N);return N}function A(C,x,N){for(;x>N;){const I=C.charCodeAt(--x);if(I!==32&&I!==9)return x+1}return N}function h(C,x,N){const I=(N==null?void 0:N.encode)||encodeURIComponent;if(!n.test(C))throw new TypeError(`argument name is invalid: ${C}`);const k=I(x);if(!t.test(k))throw new TypeError(`argument val is invalid: ${x}`);let S=C+"="+k;if(!N)return S;if(N.maxAge!==void 0){if(!Number.isInteger(N.maxAge))throw new TypeError(`option maxAge is invalid: ${N.maxAge}`);S+="; Max-Age="+N.maxAge}if(N.domain){if(!r.test(N.domain))throw new TypeError(`option domain is invalid: ${N.domain}`);S+="; Domain="+N.domain}if(N.path){if(!i.test(N.path))throw new TypeError(`option path is invalid: ${N.path}`);S+="; Path="+N.path}if(N.expires){if(!E(N.expires)||!Number.isFinite(N.expires.valueOf()))throw new TypeError(`option expires is invalid: ${N.expires}`);S+="; Expires="+N.expires.toUTCString()}if(N.httpOnly&&(S+="; HttpOnly"),N.secure&&(S+="; Secure"),N.partitioned&&(S+="; Partitioned"),N.priority)switch(typeof N.priority=="string"?N.priority.toLowerCase():void 0){case"low":S+="; Priority=Low";break;case"medium":S+="; Priority=Medium";break;case"high":S+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${N.priority}`)}if(N.sameSite)switch(typeof N.sameSite=="string"?N.sameSite.toLowerCase():N.sameSite){case!0:case"strict":S+="; SameSite=Strict";break;case"lax":S+="; SameSite=Lax";break;case"none":S+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${N.sameSite}`)}return S}function y(C){if(C.indexOf("%")===-1)return C;try{return decodeURIComponent(C)}catch{return C}}function E(C){return o.call(C)==="[object Date]"}return dl}QC();var Lp="popstate";function HC(n={}){function t(o,l){let{pathname:c="/",search:d="",hash:A=""}=ys(o.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),iA("",{pathname:c,search:d,hash:A},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function r(o,l){let c=o.document.querySelector("base"),d="";if(c&&c.getAttribute("href")){let A=o.location.href,h=A.indexOf("#");d=h===-1?A:A.slice(0,h)}return d+"#"+(typeof l=="string"?l:Sl(l))}function i(o,l){Vn(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(l)})`)}return VC(t,r,i,n)}function aa(n,t){if(n===!1||n===null||typeof n>"u")throw new Error(t)}function Vn(n,t){if(!n){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zC(){return Math.random().toString(36).substring(2,10)}function Dp(n,t){return{usr:n.state,key:n.key,idx:t}}function iA(n,t,r=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof t=="string"?ys(t):t,state:r,key:t&&t.key||i||zC()}}function Sl({pathname:n="/",search:t="",hash:r=""}){return t&&t!=="?"&&(n+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function ys(n){let t={};if(n){let r=n.indexOf("#");r>=0&&(t.hash=n.substring(r),n=n.substring(0,r));let i=n.indexOf("?");i>=0&&(t.search=n.substring(i),n=n.substring(0,i)),n&&(t.pathname=n)}return t}function VC(n,t,r,i={}){let{window:o=document.defaultView,v5Compat:l=!1}=i,c=o.history,d="POP",A=null,h=y();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function y(){return(c.state||{idx:null}).idx}function E(){d="POP";let k=y(),S=k==null?null:k-h;h=k,A&&A({action:d,location:I.location,delta:S})}function C(k,S){d="PUSH";let U=iA(I.location,k,S);r&&r(U,k),h=y()+1;let B=Dp(U,h),F=I.createHref(U);try{c.pushState(B,"",F)}catch(Q){if(Q instanceof DOMException&&Q.name==="DataCloneError")throw Q;o.location.assign(F)}l&&A&&A({action:d,location:I.location,delta:1})}function x(k,S){d="REPLACE";let U=iA(I.location,k,S);r&&r(U,k),h=y();let B=Dp(U,h),F=I.createHref(U);c.replaceState(B,"",F),l&&A&&A({action:d,location:I.location,delta:0})}function N(k){return GC(k)}let I={get action(){return d},get location(){return n(o,c)},listen(k){if(A)throw new Error("A history only accepts one active listener");return o.addEventListener(Lp,E),A=k,()=>{o.removeEventListener(Lp,E),A=null}},createHref(k){return t(o,k)},createURL:N,encodeLocation(k){let S=N(k);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:C,replace:x,go(k){return c.go(k)}};return I}function GC(n,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),aa(r,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:Sl(n);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function ib(n,t,r="/"){return KC(n,t,r,!1)}function KC(n,t,r,i){let o=typeof t=="string"?ys(t):t,l=Xr(o.pathname||"/",r);if(l==null)return null;let c=sb(n);qC(c);let d=null;for(let A=0;d==null&&A<c.length;++A){let h=rx(l);d=ax(c[A],h,i)}return d}function sb(n,t=[],r=[],i=""){let o=(l,c,d)=>{let A={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};A.relativePath.startsWith("/")&&(aa(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 h=Jr([i,A.relativePath]),y=r.concat(A);l.children&&l.children.length>0&&(aa(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),sb(l.children,t,y,h)),!(l.path==null&&!l.index)&&t.push({path:h,score:ex(h,l.index),routesMeta:y})};return n.forEach((l,c)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))o(l,c);else for(let A of ob(l.path))o(l,c,A)}),t}function ob(n){let t=n.split("/");if(t.length===0)return[];let[r,...i]=t,o=r.endsWith("?"),l=r.replace(/\?$/,"");if(i.length===0)return o?[l,""]:[l];let c=ob(i.join("/")),d=[];return d.push(...c.map(A=>A===""?l:[l,A].join("/"))),o&&d.push(...c),d.map(A=>n.startsWith("/")&&A===""?"/":A)}function qC(n){n.sort((t,r)=>t.score!==r.score?r.score-t.score:tx(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var YC=/^:[\w-]+$/,JC=3,WC=2,XC=1,$C=10,ZC=-2,Rp=n=>n==="*";function ex(n,t){let r=n.split("/"),i=r.length;return r.some(Rp)&&(i+=ZC),t&&(i+=WC),r.filter(o=>!Rp(o)).reduce((o,l)=>o+(YC.test(l)?JC:l===""?XC:$C),i)}function tx(n,t){return n.length===t.length&&n.slice(0,-1).every((i,o)=>i===t[o])?n[n.length-1]-t[t.length-1]:0}function ax(n,t,r=!1){let{routesMeta:i}=n,o={},l="/",c=[];for(let d=0;d<i.length;++d){let A=i[d],h=d===i.length-1,y=l==="/"?t:t.slice(l.length)||"/",E=cc({path:A.relativePath,caseSensitive:A.caseSensitive,end:h},y),C=A.route;if(!E&&h&&r&&!i[i.length-1].route.index&&(E=cc({path:A.relativePath,caseSensitive:A.caseSensitive,end:!1},y)),!E)return null;Object.assign(o,E.params),c.push({params:o,pathname:Jr([l,E.pathname]),pathnameBase:lx(Jr([l,E.pathnameBase])),route:C}),E.pathnameBase!=="/"&&(l=Jr([l,E.pathnameBase]))}return c}function cc(n,t){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,i]=nx(n.path,n.caseSensitive,n.end),o=t.match(r);if(!o)return null;let l=o[0],c=l.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:i.reduce((h,{paramName:y,isOptional:E},C)=>{if(y==="*"){let N=d[C]||"";c=l.slice(0,l.length-N.length).replace(/(.)\/+$/,"$1")}const x=d[C];return E&&!x?h[y]=void 0:h[y]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:c,pattern:n}}function nx(n,t=!1,r=!0){Vn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let i=[],o="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,A)=>(i.push({paramName:d,isOptional:A!=null}),A?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),o+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":n!==""&&n!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function rx(n){try{return n.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Vn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),n}}function Xr(n,t){if(t==="/")return n;if(!n.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=n.charAt(r);return i&&i!=="/"?null:n.slice(r)||"/"}function ix(n,t="/"){let{pathname:r,search:i="",hash:o=""}=typeof n=="string"?ys(n):n;return{pathname:r?r.startsWith("/")?r:sx(r,t):t,search:ux(i),hash:cx(o)}}function sx(n,t){let r=t.replace(/\/+$/,"").split("/");return n.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function ih(n,t,r,i){return`Cannot include a '${n}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ox(n){return n.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function NA(n){let t=ox(n);return t.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase)}function IA(n,t,r,i=!1){let o;typeof n=="string"?o=ys(n):(o={...n},aa(!o.pathname||!o.pathname.includes("?"),ih("?","pathname","search",o)),aa(!o.pathname||!o.pathname.includes("#"),ih("#","pathname","hash",o)),aa(!o.search||!o.search.includes("#"),ih("#","search","hash",o)));let l=n===""||o.pathname==="",c=l?"/":o.pathname,d;if(c==null)d=r;else{let E=t.length-1;if(!i&&c.startsWith("..")){let C=c.split("/");for(;C[0]==="..";)C.shift(),E-=1;o.pathname=C.join("/")}d=E>=0?t[E]:"/"}let A=ix(o,d),h=c&&c!=="/"&&c.endsWith("/"),y=(l||c===".")&&r.endsWith("/");return!A.pathname.endsWith("/")&&(h||y)&&(A.pathname+="/"),A}var Jr=n=>n.join("/").replace(/\/\/+/g,"/"),lx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),ux=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,cx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function dx(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var lb=["POST","PUT","PATCH","DELETE"];new Set(lb);var fx=["GET",...lb];new Set(fx);var po=L.createContext(null);po.displayName="DataRouter";var Tc=L.createContext(null);Tc.displayName="DataRouterState";var ub=L.createContext({isTransitioning:!1});ub.displayName="ViewTransition";var hx=L.createContext(new Map);hx.displayName="Fetchers";var Ax=L.createContext(null);Ax.displayName="Await";var tr=L.createContext(null);tr.displayName="Navigation";var Dl=L.createContext(null);Dl.displayName="Location";var ar=L.createContext({outlet:null,matches:[],isDataRoute:!1});ar.displayName="Route";var kA=L.createContext(null);kA.displayName="RouteError";function gx(n,{relative:t}={}){aa(yo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=L.useContext(tr),{hash:o,pathname:l,search:c}=Rl(n,{relative:t}),d=l;return r!=="/"&&(d=l==="/"?r:Jr([r,l])),i.createHref({pathname:d,search:c,hash:o})}function yo(){return L.useContext(Dl)!=null}function sn(){return aa(yo(),"useLocation() may be used only in the context of a <Router> component."),L.useContext(Dl).location}var cb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function db(n){L.useContext(tr).static||L.useLayoutEffect(n)}function Fa(){let{isDataRoute:n}=L.useContext(ar);return n?Sx():mx()}function mx(){aa(yo(),"useNavigate() may be used only in the context of a <Router> component.");let n=L.useContext(po),{basename:t,navigator:r}=L.useContext(tr),{matches:i}=L.useContext(ar),{pathname:o}=sn(),l=JSON.stringify(NA(i)),c=L.useRef(!1);return db(()=>{c.current=!0}),L.useCallback((A,h={})=>{if(Vn(c.current,cb),!c.current)return;if(typeof A=="number"){r.go(A);return}let y=IA(A,JSON.parse(l),o,h.relative==="path");n==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Jr([t,y.pathname])),(h.replace?r.replace:r.push)(y,h.state,h)},[t,r,l,o,n])}L.createContext(null);function SA(){let{matches:n}=L.useContext(ar),t=n[n.length-1];return t?t.params:{}}function Rl(n,{relative:t}={}){let{matches:r}=L.useContext(ar),{pathname:i}=sn(),o=JSON.stringify(NA(r));return L.useMemo(()=>IA(n,JSON.parse(o),i,t==="path"),[n,o,i,t])}function px(n,t){return fb(n,t)}function fb(n,t,r,i){var U;aa(yo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o,static:l}=L.useContext(tr),{matches:c}=L.useContext(ar),d=c[c.length-1],A=d?d.params:{},h=d?d.pathname:"/",y=d?d.pathnameBase:"/",E=d&&d.route;{let B=E&&E.path||"";hb(h,!E||B.endsWith("*")||B.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${B}">) 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="${B}"> to <Route path="${B==="/"?"*":`${B}/*`}">.`)}let C=sn(),x;if(t){let B=typeof t=="string"?ys(t):t;aa(y==="/"||((U=B.pathname)==null?void 0:U.startsWith(y)),`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 "${y}" but pathname "${B.pathname}" was given in the \`location\` prop.`),x=B}else x=C;let N=x.pathname||"/",I=N;if(y!=="/"){let B=y.replace(/^\//,"").split("/");I="/"+N.replace(/^\//,"").split("/").slice(B.length).join("/")}let k=!l&&r&&r.matches&&r.matches.length>0?r.matches:ib(n,{pathname:I});Vn(E||k!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Vn(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.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 S=vx(k&&k.map(B=>Object.assign({},B,{params:Object.assign({},A,B.params),pathname:Jr([y,o.encodeLocation?o.encodeLocation(B.pathname).pathname:B.pathname]),pathnameBase:B.pathnameBase==="/"?y:Jr([y,o.encodeLocation?o.encodeLocation(B.pathnameBase).pathname:B.pathnameBase])})),c,r,i);return t&&S?L.createElement(Dl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...x},navigationType:"POP"}},S):S}function yx(){let n=kx(),t=dx(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},l={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",n),c=L.createElement(L.Fragment,null,L.createElement("p",null,"💿 Hey developer 👋"),L.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",L.createElement("code",{style:l},"ErrorBoundary")," or"," ",L.createElement("code",{style:l},"errorElement")," prop on your route.")),L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},t),r?L.createElement("pre",{style:o},r):null,c)}var Ex=L.createElement(yx,null),bx=class extends L.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,t){return t.location!==n.location||t.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:t.error,location:t.location,revalidation:n.revalidation||t.revalidation}}componentDidCatch(n,t){console.error("React Router caught the following error during render",n,t)}render(){return this.state.error!==void 0?L.createElement(ar.Provider,{value:this.props.routeContext},L.createElement(kA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function wx({routeContext:n,match:t,children:r}){let i=L.useContext(po);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(ar.Provider,{value:n},r)}function vx(n,t=[],r=null,i=null){if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let o=n,l=r==null?void 0:r.errors;if(l!=null){let A=o.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);aa(A>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,A+1))}let c=!1,d=-1;if(r)for(let A=0;A<o.length;A++){let h=o[A];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=A),h.route.id){let{loaderData:y,errors:E}=r,C=h.route.loader&&!y.hasOwnProperty(h.route.id)&&(!E||E[h.route.id]===void 0);if(h.route.lazy||C){c=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((A,h,y)=>{let E,C=!1,x=null,N=null;r&&(E=l&&h.route.id?l[h.route.id]:void 0,x=h.route.errorElement||Ex,c&&(d<0&&y===0?(hb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,N=null):d===y&&(C=!0,N=h.route.hydrateFallbackElement||null)));let I=t.concat(o.slice(0,y+1)),k=()=>{let S;return E?S=x:C?S=N:h.route.Component?S=L.createElement(h.route.Component,null):h.route.element?S=h.route.element:S=A,L.createElement(wx,{match:h,routeContext:{outlet:A,matches:I,isDataRoute:r!=null},children:S})};return r&&(h.route.ErrorBoundary||h.route.errorElement||y===0)?L.createElement(bx,{location:r.location,revalidation:r.revalidation,component:x,error:E,children:k(),routeContext:{outlet:null,matches:I,isDataRoute:!0}}):k()},null)}function TA(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cx(n){let t=L.useContext(po);return aa(t,TA(n)),t}function xx(n){let t=L.useContext(Tc);return aa(t,TA(n)),t}function Nx(n){let t=L.useContext(ar);return aa(t,TA(n)),t}function BA(n){let t=Nx(n),r=t.matches[t.matches.length-1];return aa(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function Ix(){return BA("useRouteId")}function kx(){var i;let n=L.useContext(kA),t=xx("useRouteError"),r=BA("useRouteError");return n!==void 0?n:(i=t.errors)==null?void 0:i[r]}function Sx(){let{router:n}=Cx("useNavigate"),t=BA("useNavigate"),r=L.useRef(!1);return db(()=>{r.current=!0}),L.useCallback(async(o,l={})=>{Vn(r.current,cb),r.current&&(typeof o=="number"?n.navigate(o):await n.navigate(o,{fromRouteId:t,...l}))},[n,t])}var Up={};function hb(n,t,r){!t&&!Up[n]&&(Up[n]=!0,Vn(!1,r))}L.memo(Tx);function Tx({routes:n,future:t,state:r}){return fb(n,void 0,r,t)}function Bx({to:n,replace:t,state:r,relative:i}){aa(yo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=L.useContext(tr);Vn(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=L.useContext(ar),{pathname:c}=sn(),d=Fa(),A=IA(n,NA(l),c,i==="path"),h=JSON.stringify(A);return L.useEffect(()=>{d(JSON.parse(h),{replace:t,state:r,relative:i})},[d,h,i,t,r]),null}function LA(n){aa(!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 Lx({basename:n="/",children:t=null,location:r,navigationType:i="POP",navigator:o,static:l=!1}){aa(!yo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=n.replace(/^\/*/,"/"),d=L.useMemo(()=>({basename:c,navigator:o,static:l,future:{}}),[c,o,l]);typeof r=="string"&&(r=ys(r));let{pathname:A="/",search:h="",hash:y="",state:E=null,key:C="default"}=r,x=L.useMemo(()=>{let N=Xr(A,c);return N==null?null:{location:{pathname:N,search:h,hash:y,state:E,key:C},navigationType:i}},[c,A,h,y,E,C,i]);return Vn(x!=null,`<Router basename="${c}"> is not able to match the URL "${A}${h}${y}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:L.createElement(tr.Provider,{value:d},L.createElement(Dl.Provider,{children:t,value:x}))}function Ab({children:n,location:t}){return px(sA(n),t)}function sA(n,t=[]){let r=[];return L.Children.forEach(n,(i,o)=>{if(!L.isValidElement(i))return;let l=[...t,o];if(i.type===L.Fragment){r.push.apply(r,sA(i.props.children,l));return}aa(i.type===LA,`[${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>`),aa(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={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,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&&(c.children=sA(i.props.children,l)),r.push(c)}),r}var Zu="get",ec="application/x-www-form-urlencoded";function Bc(n){return n!=null&&typeof n.tagName=="string"}function Dx(n){return Bc(n)&&n.tagName.toLowerCase()==="button"}function Rx(n){return Bc(n)&&n.tagName.toLowerCase()==="form"}function Ux(n){return Bc(n)&&n.tagName.toLowerCase()==="input"}function Mx(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function jx(n,t){return n.button===0&&(!t||t==="_self")&&!Mx(n)}var Qu=null;function Ox(){if(Qu===null)try{new FormData(document.createElement("form"),0),Qu=!1}catch{Qu=!0}return Qu}var _x=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sh(n){return n!=null&&!_x.has(n)?(Vn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ec}"`),null):n}function Px(n,t){let r,i,o,l,c;if(Rx(n)){let d=n.getAttribute("action");i=d?Xr(d,t):null,r=n.getAttribute("method")||Zu,o=sh(n.getAttribute("enctype"))||ec,l=new FormData(n)}else if(Dx(n)||Ux(n)&&(n.type==="submit"||n.type==="image")){let d=n.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let A=n.getAttribute("formaction")||d.getAttribute("action");if(i=A?Xr(A,t):null,r=n.getAttribute("formmethod")||d.getAttribute("method")||Zu,o=sh(n.getAttribute("formenctype"))||sh(d.getAttribute("enctype"))||ec,l=new FormData(d,n),!Ox()){let{name:h,type:y,value:E}=n;if(y==="image"){let C=h?`${h}.`:"";l.append(`${C}x`,"0"),l.append(`${C}y`,"0")}else h&&l.append(h,E)}}else{if(Bc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Zu,i=null,o=ec,c=n}return l&&o==="text/plain"&&(c=l,l=void 0),{action:i,method:r.toLowerCase(),encType:o,formData:l,body:c}}function DA(n,t){if(n===!1||n===null||typeof n>"u")throw new Error(t)}async function Fx(n,t){if(n.id in t)return t[n.id];try{let r=await import(n.module);return t[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Qx(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Hx(n,t,r){let i=await Promise.all(n.map(async o=>{let l=t.routes[o.route.id];if(l){let c=await Fx(l,r);return c.links?c.links():[]}return[]}));return Kx(i.flat(1).filter(Qx).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Mp(n,t,r,i,o,l){let c=(A,h)=>r[h]?A.route.id!==r[h].route.id:!0,d=(A,h)=>{var y;return r[h].pathname!==A.pathname||((y=r[h].route.path)==null?void 0:y.endsWith("*"))&&r[h].params["*"]!==A.params["*"]};return l==="assets"?t.filter((A,h)=>c(A,h)||d(A,h)):l==="data"?t.filter((A,h)=>{var E;let y=i.routes[A.route.id];if(!y||!y.hasLoader)return!1;if(c(A,h)||d(A,h))return!0;if(A.route.shouldRevalidate){let C=A.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((E=r[0])==null?void 0:E.params)||{},nextUrl:new URL(n,window.origin),nextParams:A.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function zx(n,t,{includeHydrateFallback:r}={}){return Vx(n.map(i=>{let o=t.routes[i.route.id];if(!o)return[];let l=[o.module];return o.clientActionModule&&(l=l.concat(o.clientActionModule)),o.clientLoaderModule&&(l=l.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(l=l.concat(o.hydrateFallbackModule)),o.imports&&(l=l.concat(o.imports)),l}).flat(1))}function Vx(n){return[...new Set(n)]}function Gx(n){let t={},r=Object.keys(n).sort();for(let i of r)t[i]=n[i];return t}function Kx(n,t){let r=new Set;return new Set(t),n.reduce((i,o)=>{let l=JSON.stringify(Gx(o));return r.has(l)||(r.add(l),i.push({key:l,link:o})),i},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var qx=new Set([100,101,204,205]);function Yx(n,t){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r.pathname==="/"?r.pathname="_root.data":t&&Xr(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function gb(){let n=L.useContext(po);return DA(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Jx(){let n=L.useContext(Tc);return DA(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var RA=L.createContext(void 0);RA.displayName="FrameworkContext";function mb(){let n=L.useContext(RA);return DA(n,"You must render this element inside a <HydratedRouter> element"),n}function Wx(n,t){let r=L.useContext(RA),[i,o]=L.useState(!1),[l,c]=L.useState(!1),{onFocus:d,onBlur:A,onMouseEnter:h,onMouseLeave:y,onTouchStart:E}=t,C=L.useRef(null);L.useEffect(()=>{if(n==="render"&&c(!0),n==="viewport"){let I=S=>{S.forEach(U=>{c(U.isIntersecting)})},k=new IntersectionObserver(I,{threshold:.5});return C.current&&k.observe(C.current),()=>{k.disconnect()}}},[n]),L.useEffect(()=>{if(i){let I=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(I)}}},[i]);let x=()=>{o(!0)},N=()=>{o(!1),c(!1)};return r?n!=="intent"?[l,C,{}]:[l,C,{onFocus:fl(d,x),onBlur:fl(A,N),onMouseEnter:fl(h,x),onMouseLeave:fl(y,N),onTouchStart:fl(E,x)}]:[!1,C,{}]}function fl(n,t){return r=>{n&&n(r),r.defaultPrevented||t(r)}}function Xx({page:n,...t}){let{router:r}=gb(),i=L.useMemo(()=>ib(r.routes,n,r.basename),[r.routes,n,r.basename]);return i?L.createElement(Zx,{page:n,matches:i,...t}):null}function $x(n){let{manifest:t,routeModules:r}=mb(),[i,o]=L.useState([]);return L.useEffect(()=>{let l=!1;return Hx(n,t,r).then(c=>{l||o(c)}),()=>{l=!0}},[n,t,r]),i}function Zx({page:n,matches:t,...r}){let i=sn(),{manifest:o,routeModules:l}=mb(),{basename:c}=gb(),{loaderData:d,matches:A}=Jx(),h=L.useMemo(()=>Mp(n,t,A,o,i,"data"),[n,t,A,o,i]),y=L.useMemo(()=>Mp(n,t,A,o,i,"assets"),[n,t,A,o,i]),E=L.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let N=new Set,I=!1;if(t.forEach(S=>{var B;let U=o.routes[S.route.id];!U||!U.hasLoader||(!h.some(F=>F.route.id===S.route.id)&&S.route.id in d&&((B=l[S.route.id])!=null&&B.shouldRevalidate)||U.hasClientLoader?I=!0:N.add(S.route.id))}),N.size===0)return[];let k=Yx(n,c);return I&&N.size>0&&k.searchParams.set("_routes",t.filter(S=>N.has(S.route.id)).map(S=>S.route.id).join(",")),[k.pathname+k.search]},[c,d,i,o,h,t,n,l]),C=L.useMemo(()=>zx(y,o),[y,o]),x=$x(y);return L.createElement(L.Fragment,null,E.map(N=>L.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...r})),C.map(N=>L.createElement("link",{key:N,rel:"modulepreload",href:N,...r})),x.map(({key:N,link:I})=>L.createElement("link",{key:N,...I})))}function e1(...n){return t=>{n.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var pb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{pb&&(window.__reactRouterVersion="7.6.0")}catch{}function t1({basename:n,children:t,window:r}){let i=L.useRef();i.current==null&&(i.current=HC({window:r,v5Compat:!0}));let o=i.current,[l,c]=L.useState({action:o.action,location:o.location}),d=L.useCallback(A=>{L.startTransition(()=>c(A))},[c]);return L.useLayoutEffect(()=>o.listen(d),[o,d]),L.createElement(Lx,{basename:n,children:t,location:l.location,navigationType:l.action,navigator:o})}var yb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lc=L.forwardRef(function({onClick:t,discover:r="render",prefetch:i="none",relative:o,reloadDocument:l,replace:c,state:d,target:A,to:h,preventScrollReset:y,viewTransition:E,...C},x){let{basename:N}=L.useContext(tr),I=typeof h=="string"&&yb.test(h),k,S=!1;if(typeof h=="string"&&I&&(k=h,pb))try{let z=new URL(window.location.href),G=h.startsWith("//")?new URL(z.protocol+h):new URL(h),Y=Xr(G.pathname,N);G.origin===z.origin&&Y!=null?h=Y+G.search+G.hash:S=!0}catch{Vn(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let U=gx(h,{relative:o}),[B,F,Q]=Wx(i,C),V=i1(h,{replace:c,state:d,target:A,preventScrollReset:y,relative:o,viewTransition:E});function W(z){t&&t(z),z.defaultPrevented||V(z)}let J=L.createElement("a",{...C,...Q,href:k||U,onClick:S||l?t:W,ref:e1(x,F),target:A,"data-discover":!I&&r==="render"?"true":void 0});return B&&!I?L.createElement(L.Fragment,null,J,L.createElement(Xx,{page:U})):J});Lc.displayName="Link";var a1=L.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:i="",end:o=!1,style:l,to:c,viewTransition:d,children:A,...h},y){let E=Rl(c,{relative:h.relative}),C=sn(),x=L.useContext(Tc),{navigator:N,basename:I}=L.useContext(tr),k=x!=null&&c1(E)&&d===!0,S=N.encodeLocation?N.encodeLocation(E).pathname:E.pathname,U=C.pathname,B=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;r||(U=U.toLowerCase(),B=B?B.toLowerCase():null,S=S.toLowerCase()),B&&I&&(B=Xr(B,I)||B);const F=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let Q=U===S||!o&&U.startsWith(S)&&U.charAt(F)==="/",V=B!=null&&(B===S||!o&&B.startsWith(S)&&B.charAt(S.length)==="/"),W={isActive:Q,isPending:V,isTransitioning:k},J=Q?t:void 0,z;typeof i=="function"?z=i(W):z=[i,Q?"active":null,V?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let G=typeof l=="function"?l(W):l;return L.createElement(Lc,{...h,"aria-current":J,className:z,ref:y,style:G,to:c,viewTransition:d},typeof A=="function"?A(W):A)});a1.displayName="NavLink";var n1=L.forwardRef(({discover:n="render",fetcherKey:t,navigate:r,reloadDocument:i,replace:o,state:l,method:c=Zu,action:d,onSubmit:A,relative:h,preventScrollReset:y,viewTransition:E,...C},x)=>{let N=l1(),I=u1(d,{relative:h}),k=c.toLowerCase()==="get"?"get":"post",S=typeof d=="string"&&yb.test(d),U=B=>{if(A&&A(B),B.defaultPrevented)return;B.preventDefault();let F=B.nativeEvent.submitter,Q=(F==null?void 0:F.getAttribute("formmethod"))||c;N(F||B.currentTarget,{fetcherKey:t,method:Q,navigate:r,replace:o,state:l,relative:h,preventScrollReset:y,viewTransition:E})};return L.createElement("form",{ref:x,method:k,action:I,onSubmit:i?A:U,...C,"data-discover":!S&&n==="render"?"true":void 0})});n1.displayName="Form";function r1(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Eb(n){let t=L.useContext(po);return aa(t,r1(n)),t}function i1(n,{target:t,replace:r,state:i,preventScrollReset:o,relative:l,viewTransition:c}={}){let d=Fa(),A=sn(),h=Rl(n,{relative:l});return L.useCallback(y=>{if(jx(y,t)){y.preventDefault();let E=r!==void 0?r:Sl(A)===Sl(h);d(n,{replace:E,state:i,preventScrollReset:o,relative:l,viewTransition:c})}},[A,d,h,r,i,t,n,o,l,c])}var s1=0,o1=()=>`__${String(++s1)}__`;function l1(){let{router:n}=Eb("useSubmit"),{basename:t}=L.useContext(tr),r=Ix();return L.useCallback(async(i,o={})=>{let{action:l,method:c,encType:d,formData:A,body:h}=Px(i,t);if(o.navigate===!1){let y=o.fetcherKey||o1();await n.fetch(y,r,o.action||l,{preventScrollReset:o.preventScrollReset,formData:A,body:h,formMethod:o.method||c,formEncType:o.encType||d,flushSync:o.flushSync})}else await n.navigate(o.action||l,{preventScrollReset:o.preventScrollReset,formData:A,body:h,formMethod:o.method||c,formEncType:o.encType||d,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,t,r])}function u1(n,{relative:t}={}){let{basename:r}=L.useContext(tr),i=L.useContext(ar);aa(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),l={...Rl(n||".",{relative:t})},c=sn();if(n==null){l.search=c.search;let d=new URLSearchParams(l.search),A=d.getAll("index");if(A.some(y=>y==="")){d.delete("index"),A.filter(E=>E).forEach(E=>d.append("index",E));let y=d.toString();l.search=y?`?${y}`:""}}return(!n||n===".")&&o.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(l.pathname=l.pathname==="/"?r:Jr([r,l.pathname])),Sl(l)}function c1(n,t={}){let r=L.useContext(ub);aa(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Eb("useViewTransitionState"),o=Rl(n,{relative:t.relative});if(!r.isTransitioning)return!1;let l=Xr(r.currentLocation.pathname,i)||r.currentLocation.pathname,c=Xr(r.nextLocation.pathname,i)||r.nextLocation.pathname;return cc(o.pathname,c)!=null||cc(o.pathname,l)!=null}[...qx];var Hu={exports:{}},jp;function d1(){if(jp)return Hu.exports;jp=1;const n=r=>typeof crypto<"u"&&typeof crypto.getRandomValues=="function"?()=>{const i=crypto.getRandomValues(new Uint8Array(1))[0];return(i>=r?i%r:i).toString(r)}:()=>Math.floor(Math.random()*r).toString(r),t=(r=7,i=!1)=>Array.from({length:r},n(i?16:36)).join("");return Hu.exports=t,Hu.exports.default=t,Hu.exports}var f1=d1();const dc=Zr(f1);var h1=()=>`uid::${dc(7)}`,A1=(n,t=["endpointName","fingerprint"])=>typeof n=="object"&&n!==null&&t.every(r=>r in n),g1=n=>{if(!A1(n))throw new TypeError("Invalid connection args");return JSON.stringify(n)},m1=()=>{let n=[];return{add:(...t)=>{n=[...n,...t]},remove:t=>{n=typeof t=="string"?n.filter(r=>r.message.transactionId!==t):n.filter(r=>!t.includes(r))},entries:()=>n}},oh=class{static toBackground(n,t){return n.postMessage(t)}static toExtensionContext(n,t){return n.postMessage(t)}},tc={exports:{}},p1=tc.exports,Op;function y1(){return Op||(Op=1,function(n,t){(function(r,i){i(n)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:p1,function(r){if(typeof globalThis!="object"||typeof chrome!="object"||!chrome||!chrome.runtime||!chrome.runtime.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){const i="The message port closed before a response was received.",o="Returning a Promise is the preferred way to send a reply from an onMessage/onMessageExternal listener, as the sendResponse will be removed from the specs (See https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage)",l=c=>{const d={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(d).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class A extends WeakMap{constructor(z,G=void 0){super(G),this.createItem=z}get(z){return this.has(z)||this.set(z,this.createItem(z)),super.get(z)}}const h=J=>J&&typeof J=="object"&&typeof J.then=="function",y=(J,z)=>(...G)=>{c.runtime.lastError?J.reject(new Error(c.runtime.lastError.message)):z.singleCallbackArg||G.length<=1&&z.singleCallbackArg!==!1?J.resolve(G[0]):J.resolve(G)},E=J=>J==1?"argument":"arguments",C=(J,z)=>function(Y,...ae){if(ae.length<z.minArgs)throw new Error(`Expected at least ${z.minArgs} ${E(z.minArgs)} for ${J}(), got ${ae.length}`);if(ae.length>z.maxArgs)throw new Error(`Expected at most ${z.maxArgs} ${E(z.maxArgs)} for ${J}(), got ${ae.length}`);return new Promise((Z,ce)=>{if(z.fallbackToNoCallback)try{Y[J](...ae,y({resolve:Z,reject:ce},z))}catch(pe){console.warn(`${J} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,pe),Y[J](...ae),z.fallbackToNoCallback=!1,z.noCallback=!0,Z()}else z.noCallback?(Y[J](...ae),Z()):Y[J](...ae,y({resolve:Z,reject:ce},z))})},x=(J,z,G)=>new Proxy(z,{apply(Y,ae,Z){return G.call(ae,J,...Z)}});let N=Function.call.bind(Object.prototype.hasOwnProperty);const I=(J,z={},G={})=>{let Y=Object.create(null),ae={has(ce,pe){return pe in J||pe in Y},get(ce,pe,X){if(pe in Y)return Y[pe];if(!(pe in J))return;let le=J[pe];if(typeof le=="function")if(typeof z[pe]=="function")le=x(J,J[pe],z[pe]);else if(N(G,pe)){let ge=C(pe,G[pe]);le=x(J,J[pe],ge)}else le=le.bind(J);else if(typeof le=="object"&&le!==null&&(N(z,pe)||N(G,pe)))le=I(le,z[pe],G[pe]);else if(N(G,"*"))le=I(le,z[pe],G["*"]);else return Object.defineProperty(Y,pe,{configurable:!0,enumerable:!0,get(){return J[pe]},set(ge){J[pe]=ge}}),le;return Y[pe]=le,le},set(ce,pe,X,le){return pe in Y?Y[pe]=X:J[pe]=X,!0},defineProperty(ce,pe,X){return Reflect.defineProperty(Y,pe,X)},deleteProperty(ce,pe){return Reflect.deleteProperty(Y,pe)}},Z=Object.create(J);return new Proxy(Z,ae)},k=J=>({addListener(z,G,...Y){z.addListener(J.get(G),...Y)},hasListener(z,G){return z.hasListener(J.get(G))},removeListener(z,G){z.removeListener(J.get(G))}}),S=new A(J=>typeof J!="function"?J:function(G){const Y=I(G,{},{getContent:{minArgs:0,maxArgs:0}});J(Y)});let U=!1;const B=new A(J=>typeof J!="function"?J:function(G,Y,ae){let Z=!1,ce,pe=new Promise(je=>{ce=function(P){U||(console.warn(o,new Error().stack),U=!0),Z=!0,je(P)}}),X;try{X=J(G,Y,ce)}catch(je){X=Promise.reject(je)}const le=X!==!0&&h(X);if(X!==!0&&!le&&!Z)return!1;const ge=je=>{je.then(P=>{ae(P)},P=>{let q;P&&(P instanceof Error||typeof P.message=="string")?q=P.message:q="An unexpected error occurred",ae({__mozWebExtensionPolyfillReject__:!0,message:q})}).catch(P=>{console.error("Failed to send onMessage rejected reply",P)})};return ge(le?X:pe),!0}),F=({reject:J,resolve:z},G)=>{c.runtime.lastError?c.runtime.lastError.message===i?z():J(new Error(c.runtime.lastError.message)):G&&G.__mozWebExtensionPolyfillReject__?J(new Error(G.message)):z(G)},Q=(J,z,G,...Y)=>{if(Y.length<z.minArgs)throw new Error(`Expected at least ${z.minArgs} ${E(z.minArgs)} for ${J}(), got ${Y.length}`);if(Y.length>z.maxArgs)throw new Error(`Expected at most ${z.maxArgs} ${E(z.maxArgs)} for ${J}(), got ${Y.length}`);return new Promise((ae,Z)=>{const ce=F.bind(null,{resolve:ae,reject:Z});Y.push(ce),G.sendMessage(...Y)})},V={devtools:{network:{onRequestFinished:k(S)}},runtime:{onMessage:k(B),onMessageExternal:k(B),sendMessage:Q.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:Q.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},W={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return d.privacy={network:{"*":W},services:{"*":W},websites:{"*":W}},I(c,V,d)};r.exports=l(chrome)}else r.exports=globalThis.browser})}(tc)),tc.exports}var E1=y1();const b1=Zr(E1);var w1=(n="")=>{const t=h1();let r,i=[];const o=m1(),l=new Set,c=new Set,d=(h,y)=>{switch(h.status){case"undeliverable":i.some(E=>E.message.messageID===h.message.messageID)||(i=[...i,{message:h.message,resolvedDestination:h.resolvedDestination}]);return;case"deliverable":i=i.reduce((E,C)=>C.resolvedDestination===h.deliverableTo?(oh.toBackground(y,{type:"deliver",message:C.message}),E):[...E,C],[]);return;case"delivered":h.receipt.message.messageType==="message"&&o.add(h.receipt);return;case"incoming":h.message.messageType==="reply"&&o.remove(h.message.messageID),l.forEach(E=>E(h.message,y));return;case"terminated":{const E=o.entries().filter(C=>h.fingerprint===C.to);o.remove(E),E.forEach(({message:C})=>c.forEach(x=>x(C)))}}},A=()=>{r=b1.runtime.connect({name:g1({endpointName:n,fingerprint:t})}),r.onMessage.addListener(d),r.onDisconnect.addListener(A),oh.toBackground(r,{type:"sync",pendingResponses:o.entries(),pendingDeliveries:[...new Set(i.map(({resolvedDestination:h})=>h))]})};return A(),{onFailure(h){c.add(h)},onMessage(h){l.add(h)},postMessage(h){oh.toBackground(r,{type:"deliver",message:h})}}},v1=Object.defineProperty,C1=Object.defineProperties,x1=Object.getOwnPropertyDescriptors,_p=Object.getOwnPropertySymbols,N1=Object.prototype.hasOwnProperty,I1=Object.prototype.propertyIsEnumerable,Pp=(n,t,r)=>t in n?v1(n,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[t]=r,bb=(n,t)=>{for(var r in t||(t={}))N1.call(t,r)&&Pp(n,r,t[r]);if(_p)for(var r of _p(t))I1.call(t,r)&&Pp(n,r,t[r]);return n},wb=(n,t)=>C1(n,x1(t)),k1=/^((?:background$)|devtools|popup|options|content-script|window)(?:@(\d+)(?:\.(\d+))?)?$/,vb=n=>{const[,t,r,i]=n.match(k1)||[];return{context:t,tabId:+r,frameId:i?+i:void 0}};const S1=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],oA=Symbol(".toJSON was called"),T1=n=>{n[oA]=!0;const t=n.toJSON();return delete n[oA],t},Cb=({from:n,seen:t,to_:r,forceEnumerable:i,maxDepth:o,depth:l})=>{const c=r||(Array.isArray(n)?[]:{});if(t.push(n),l>=o)return c;if(typeof n.toJSON=="function"&&n[oA]!==!0)return T1(n);for(const[d,A]of Object.entries(n)){if(typeof Buffer=="function"&&Buffer.isBuffer(A)){c[d]="[object Buffer]";continue}if(A!==null&&typeof A=="object"&&typeof A.pipe=="function"){c[d]="[object Stream]";continue}if(typeof A!="function"){if(!A||typeof A!="object"){c[d]=A;continue}if(!t.includes(n[d])){l++,c[d]=Cb({from:n[d],seen:[...t],forceEnumerable:i,maxDepth:o,depth:l});continue}c[d]="[Circular]"}}for(const{property:d,enumerable:A}of S1)typeof n[d]=="string"&&Object.defineProperty(c,d,{value:n[d],enumerable:!0,configurable:!0,writable:!0});return c};function B1(n,t={}){const{maxDepth:r=Number.POSITIVE_INFINITY}=t;return typeof n=="object"&&n!==null?Cb({from:n,seen:[],forceEnumerable:!0,maxDepth:r,depth:0}):typeof n=="function"?`[Function: ${n.name||"anonymous"}]`:n}let xb=()=>({events:{},emit(n,...t){(this.events[n]||[]).forEach(r=>r(...t))},on(n,t){return(this.events[n]=this.events[n]||[]).push(t),()=>this.events[n]=(this.events[n]||[]).filter(r=>r!==t)}});var L1=(n,t,r)=>{const i=dc(),o=new Map,l=new Map,c=d=>{if(d.destination.context===n&&!d.destination.frameId&&!d.destination.tabId){const{transactionId:A,messageID:h,messageType:y}=d,E=()=>{const x=o.get(A);if(x){const{err:N,data:I}=d;if(N){const k=N,S=self[k.name],U=new(typeof S=="function"?S:Error)(k.message);for(const B in k)U[B]=k[B];x.reject(U)}else x.resolve(I);o.delete(A)}},C=async()=>{let x,N,I=!1;try{const k=l.get(h);if(typeof k=="function")x=await k({sender:d.origin,id:h,data:d.data,timestamp:d.timestamp});else throw I=!0,new Error(`[webext-bridge] No handler registered in '${n}' to accept messages with id '${h}'`)}catch(k){N=k}finally{if(N&&(d.err=B1(N)),c(wb(bb({},d),{messageType:"reply",data:x,origin:{context:n,tabId:null},destination:d.origin,hops:[]})),N&&!I)throw x}};switch(y){case"reply":return E();case"message":return C()}}return d.hops.push(`${n}::${i}`),t(d)};return{handleMessage:c,endTransaction:d=>{const A=o.get(d);A==null||A.reject("Transaction was ended before it could complete"),o.delete(d)},sendMessage:(d,A,h="background")=>{const y=typeof h=="string"?vb(h):h,E="Bridge#sendMessage ->";if(!y.context)throw new TypeError(`${E} Destination must be any one of known destinations`);return new Promise((C,x)=>{const N={messageID:d,data:A,destination:y,messageType:"message",transactionId:dc(),origin:{context:n,tabId:null},hops:[],timestamp:Date.now()};o.set(N.transactionId,{resolve:C,reject:x});try{c(N)}catch(I){o.delete(N.transactionId),x(I)}})},onMessage:(d,A)=>(l.set(d,A),()=>l.delete(d))}},so=class{constructor(n,t){this.endpointRuntime=n,this.streamInfo=t,this.emitter=xb(),this.isClosed=!1,this.handleStreamClose=()=>{this.isClosed||(this.isClosed=!0,this.emitter.emit("closed",!0),this.emitter.events={})},so.initDone||(n.onMessage("__crx_bridge_stream_transfer__",r=>{const{streamId:i,streamTransfer:o,action:l}=r.data,c=so.openStreams.get(i);c&&!c.isClosed&&(l==="transfer"&&c.emitter.emit("message",o),l==="close"&&(so.openStreams.delete(i),c.handleStreamClose()))}),so.initDone=!0),so.openStreams.set(this.streamInfo.streamId,this)}get info(){return this.streamInfo}send(n){if(this.isClosed)throw new Error("Attempting to send a message over closed stream. Use stream.onClose(<callback>) to keep an eye on stream status");this.endpointRuntime.sendMessage("__crx_bridge_stream_transfer__",{streamId:this.streamInfo.streamId,streamTransfer:n,action:"transfer"},this.streamInfo.endpoint)}close(n){n&&this.send(n),this.handleStreamClose(),this.endpointRuntime.sendMessage("__crx_bridge_stream_transfer__",{streamId:this.streamInfo.streamId,streamTransfer:null,action:"close"},this.streamInfo.endpoint)}onMessage(n){return this.getDisposable("message",n)}onClose(n){return this.getDisposable("closed",n)}getDisposable(n,t){const r=this.emitter.on(n,t);return Object.assign(r,{dispose:r,close:r})}},fc=so;fc.initDone=!1;fc.openStreams=new Map;var D1=n=>{const t=new Map,r=new Map,i=xb();n.onMessage("__crx_bridge_stream_open__",c=>new Promise(d=>{const{sender:A,data:h}=c,{channel:y}=h;let E=!1,C=()=>{};const x=()=>{const N=r.get(y);typeof N=="function"?(N(new fc(n,wb(bb({},h),{endpoint:A}))),E&&C(),d(!0)):E||(E=!0,C=i.on("did-change-stream-callbacks",x))};x()}));async function o(c,d){if(t.has(c))throw new Error("webext-bridge: A Stream is already open at this channel");const A=typeof d=="string"?vb(d):d,h={streamId:dc(),channel:c,endpoint:A},y=new fc(n,h);return y.onClose(()=>t.delete(c)),await n.sendMessage("__crx_bridge_stream_open__",h,A),t.set(c,y),y}function l(c,d){if(r.has(c))throw new Error("webext-bridge: This channel has already been claimed. Stream allows only one-on-one communication");r.set(c,d),i.emit("did-change-stream-callbacks")}return{openStream:o,onOpenStreamChannel:l}},Nb=w1("popup"),UA=L1("popup",n=>Nb.postMessage(n));Nb.onMessage(UA.handleMessage);var{sendMessage:Rt,onMessage:lh}=UA;D1(UA);const R1=()=>{const[n,t]=L.useState(!1),r=L.useRef(null),i=L.useRef(0),o=(l,c)=>{setTimeout(()=>{if(r.current){const d=l/c*100;r.current.style.transition="none",r.current.style.width=`${d}%`,r.current.offsetHeight,requestAnimationFrame(()=>{r.current&&(r.current.style.transition=`width ${l}s linear`,r.current.style.width="0%")})}},10)};return L.useEffect(()=>{Rt("GET_CLIPBOARD_COUNTDOWN_STATE",{},"background").then(A=>{const h=A;h&&h.remaining>0&&(i.current=h.id,t(!0),o(h.remaining,h.total))}).catch(()=>{});const l=lh("CLIPBOARD_COUNTDOWN",({data:A})=>{const{remaining:h,total:y,id:E}=A;t(h>0),E!==i.current&&h>0&&(i.current=E,o(h,y))}),c=lh("CLIPBOARD_CLEARED",()=>{t(!1),i.current=0,r.current&&(r.current.style.transition="none",r.current.style.width="0%")}),d=lh("CLIPBOARD_COUNTDOWN_CANCELLED",()=>{t(!1),i.current=0,r.current&&(r.current.style.transition="none",r.current.style.width="0%")});return()=>{l(),c(),d()}},[]),n?f.jsx("div",{className:"fixed top-0 left-0 right-0 z-50 h-1 bg-gray-200 dark:bg-gray-700",children:f.jsx("div",{ref:r,className:"h-full bg-orange-500",style:{width:"100%",transition:"none"}})}):null},U1=()=>{const{t:n}=ht(),t=Fa(),r=sn(),[i,o]=L.useState("credentials");L.useEffect(()=>{const y=r.pathname.substring(1),C=["credentials","emails","settings"].find(x=>y===x||y.startsWith(`${x}/`));C&&o(C)},[r]);const l=y=>{o(y),t(`/${y}`)};return["/","/login","/auth-settings","/unlock","/unlock-success","/upgrade"].includes(r.pathname)||new URLSearchParams(window.location.search).get("mode")==="inline_unlock"?null:f.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:f.jsxs("div",{className:"flex justify-around items-center h-14",children:[f.jsxs("button",{onClick:()=>l("credentials"),className:`flex flex-col items-center justify-center w-1/3 h-full ${i==="credentials"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[f.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.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"})}),f.jsx("span",{className:"text-sm mt-1",children:n("menu.credentials")})]}),f.jsxs("button",{onClick:()=>l("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:[f.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.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"})}),f.jsx("span",{className:"text-sm mt-1",children:n("menu.emails")})]}),f.jsxs("button",{onClick:()=>l("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:[f.jsxs("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[f.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"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),f.jsx("span",{className:"text-sm mt-1",children:n("menu.settings")})]})]})})},Ib=({className:n="",width:t=200,height:r=50,showText:i=!0,color:o="currentColor"})=>f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",version:"1.1",viewBox:"0 0 2000 500",width:t,height:r,className:n,children:[f.jsx("path",{d:"m459.87 294.95c0.016205 5.4005 0.03241 10.801-0.35022 16.873-1.111 6.3392-1.1941 12.173-2.6351 17.649-10.922 41.508-36.731 69.481-77.351 83.408-7.2157 2.4739-14.972 3.3702-22.479 4.995-23.629 0.042205-47.257 0.11453-70.886 0.12027-46.762 0.011322-93.523-0.01416-140.95-0.43411-8.59-2.0024-16.766-2.8352-24.398-5.3326-21.595-7.0666-39.523-19.656-53.708-37.552-10.227-12.903-17.579-27.17-21.28-43.221-1.475-6.3967-2.4711-12.904-3.6852-19.361-0.051849-5.747-0.1037-11.494 0.26915-17.886 4.159-42.973 27.68-71.638 63.562-92.153 0-0.70761-0.001961-1.6988 3.12e-4 -2.69 0.022484-9.8293-1.3071-19.894 0.35664-29.438 3.2391-18.579 11.08-35.272 23.763-49.773 12.098-13.832 26.457-23.989 43.609-30.029 7.813-2.7512 16.14-4.0417 24.234-5.9948 7.392-0.025734 14.784-0.05146 22.835 0.32253 4.1959 0.95392 7.7946 1.2538 11.258 2.1053 17.16 4.2192 32.287 12.176 45.469 24.104 2.2558 2.0411 4.372 6.6241 9.621 3.868 16.839-8.8419 34.718-11.597 53.603-8.594 16.791 2.6699 31.602 9.4308 44.236 20.636 11.531 10.227 19.84 22.841 25.393 37.236 6.3436 16.445 10.389 33.163 6.0798 49.389 7.9587 8.9321 15.807 16.704 22.421 25.414 9.162 12.065 15.33 25.746 18.144 40.776 0.97046 5.1848 1.9111 10.375 2.8654 15.563m-71.597 71.012c5.5615-5.2284 12.002-9.7986 16.508-15.817 10.474-13.992 14.333-29.916 11.288-47.446-2.2496-12.95-8.1973-24.076-17.243-33.063-12.746-12.663-28.865-18.614-46.786-18.569-69.912 0.17712-139.82 0.56831-209.74 0.96176-15.922 0.089599-29.168 7.4209-39.685 18.296-14.45 14.944-20.408 33.343-16.655 54.368 2.2763 12.754 8.2167 23.748 17.158 32.66 13.299 13.255 30.097 18.653 48.728 18.651 59.321-0.005188 118.64 0.042358 177.96-0.046601 9.5912-0.014374 19.181-0.86588 28.773-0.88855 10.649-0.025146 19.978-3.825 29.687-9.1074z",fill:"#EEC170"}),f.jsx("path",{d:"m162.77 293c15.654 4.3883 20.627 22.967 10.304 34.98-5.3104 6.1795-14.817 8.3208-24.278 5.0472-7.0723-2.4471-12.332-10.362-12.876-17.933-1.0451-14.542 11.089-23.176 21.705-23.046 1.5794 0.019287 3.1517 0.61566 5.1461 0.95184z",fill:"#EEC170"}),f.jsx("path",{d:"m227.18 293.64c7.8499 2.3973 11.938 8.2143 13.524 15.077 1.8591 8.0439-0.44817 15.706-7.1588 21.121-6.7633 5.4572-14.417 6.8794-22.578 3.1483-8.2972-3.7933-12.836-10.849-12.736-19.438 0.1687-14.497 14.13-25.368 28.948-19.908z",fill:"#EEC170"}),f.jsx("path",{d:"m261.57 319.07c-2.495-14.418 4.6853-22.603 14.596-26.108 9.8945-3.4995 23.181 3.4303 26.267 13.779 4.6504 15.591-7.1651 29.064-21.665 28.161-8.5254-0.53088-17.202-6.5094-19.198-15.831z",fill:"#EEC170"}),f.jsx("path",{d:"m336.91 333.41c-9.0175-4.2491-15.337-14.349-13.829-21.682 3.0825-14.989 13.341-20.304 23.018-19.585 10.653 0.79141 17.93 7.407 19.765 17.547 1.9588 10.824-4.1171 19.939-13.494 23.703-5.272 2.1162-10.091 1.5086-15.46 0.017883z",fill:"#EEC170"}),i&&f.jsx("text",{x:"550",y:"355",fontFamily:"Arial, Helvetica, sans-serif",fontWeight:"700",fontSize:"290",letterSpacing:"-7",fill:o,children:"AliasVault"})]});var Fp=Object.prototype.hasOwnProperty;function lA(n,t){var r,i;if(n===t)return!0;if(n&&t&&(r=n.constructor)===t.constructor){if(r===Date)return n.getTime()===t.getTime();if(r===RegExp)return n.toString()===t.toString();if(r===Array){if((i=n.length)===t.length)for(;i--&&lA(n[i],t[i]););return i===-1}if(!r||typeof n=="object"){i=0;for(r in n)if(Fp.call(n,r)&&++i&&!Fp.call(t,r)||!(r in t)||!lA(n[r],t[r]))return!1;return Object.keys(t).length===i}}return n!==n&&t!==t}const M1=new Error("request for lock canceled");var j1=function(n,t,r,i){function o(l){return l instanceof r?l:new r(function(c){c(l)})}return new(r||(r=Promise))(function(l,c){function d(y){try{h(i.next(y))}catch(E){c(E)}}function A(y){try{h(i.throw(y))}catch(E){c(E)}}function h(y){y.done?l(y.value):o(y.value).then(d,A)}h((i=i.apply(n,t||[])).next())})};class O1{constructor(t,r=M1){this._value=t,this._cancelError=r,this._queue=[],this._weightedWaiters=[]}acquire(t=1,r=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise((i,o)=>{const l={resolve:i,reject:o,weight:t,priority:r},c=kb(this._queue,d=>r<=d.priority);c===-1&&t<=this._value?this._dispatchItem(l):this._queue.splice(c+1,0,l)})}runExclusive(t){return j1(this,arguments,void 0,function*(r,i=1,o=0){const[l,c]=yield this.acquire(i,o);try{return yield r(l)}finally{c()}})}waitForUnlock(t=1,r=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return this._couldLockImmediately(t,r)?Promise.resolve():new Promise(i=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),_1(this._weightedWaiters[t-1],{resolve:i,priority:r})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatchQueue()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatchQueue()}cancel(){this._queue.forEach(t=>t.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(t){const r=this._value;this._value-=t.weight,t.resolve([r,this._newReleaser(t.weight)])}_newReleaser(t){let r=!1;return()=>{r||(r=!0,this.release(t))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let t=this._value;t>0;t--){const r=this._weightedWaiters[t-1];r&&(r.forEach(i=>i.resolve()),this._weightedWaiters[t-1]=[])}else{const t=this._queue[0].priority;for(let r=this._value;r>0;r--){const i=this._weightedWaiters[r-1];if(!i)continue;const o=i.findIndex(l=>l.priority<=t);(o===-1?i:i.splice(0,o)).forEach(l=>l.resolve())}}}_couldLockImmediately(t,r){return(this._queue.length===0||this._queue[0].priority<r)&&t<=this._value}}function _1(n,t){const r=kb(n,i=>t.priority<=i.priority);n.splice(r+1,0,t)}function kb(n,t){for(let r=n.length-1;r>=0;r--)if(t(n[r]))return r;return-1}var P1=function(n,t,r,i){function o(l){return l instanceof r?l:new r(function(c){c(l)})}return new(r||(r=Promise))(function(l,c){function d(y){try{h(i.next(y))}catch(E){c(E)}}function A(y){try{h(i.throw(y))}catch(E){c(E)}}function h(y){y.done?l(y.value):o(y.value).then(d,A)}h((i=i.apply(n,t||[])).next())})};class F1{constructor(t){this._semaphore=new O1(1,t)}acquire(){return P1(this,arguments,void 0,function*(t=0){const[,r]=yield this._semaphore.acquire(1,t);return r})}runExclusive(t,r=0){return this._semaphore.runExclusive(()=>t(),1,r)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(t=0){return this._semaphore.waitForUnlock(1,t)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}var $E,ZE;const ac=((ZE=($E=globalThis.browser)==null?void 0:$E.runtime)==null?void 0:ZE.id)==null?globalThis.chrome:globalThis.browser,Oe=Q1();function Q1(){const n={local:zu("local"),session:zu("session"),sync:zu("sync"),managed:zu("managed")},t=I=>{const k=n[I];if(k==null){const S=Object.keys(n).join(", ");throw Error(`Invalid area "${I}". Options: ${S}`)}return k},r=I=>{const k=I.indexOf(":"),S=I.substring(0,k),U=I.substring(k+1);if(U==null)throw Error(`Storage key should be in the form of "area:key", but received "${I}"`);return{driverArea:S,driverKey:U,driver:t(S)}},i=I=>I+"$",o=(I,k)=>{const S={...I};return Object.entries(k).forEach(([U,B])=>{B==null?delete S[U]:S[U]=B}),S},l=(I,k)=>I??k??null,c=I=>typeof I=="object"&&!Array.isArray(I)?I:{},d=async(I,k,S)=>{const U=await I.getItem(k);return l(U,(S==null?void 0:S.fallback)??(S==null?void 0:S.defaultValue))},A=async(I,k)=>{const S=i(k),U=await I.getItem(S);return c(U)},h=async(I,k,S)=>{await I.setItem(k,S??null)},y=async(I,k,S)=>{const U=i(k),B=c(await I.getItem(U));await I.setItem(U,o(B,S))},E=async(I,k,S)=>{if(await I.removeItem(k),S!=null&&S.removeMeta){const U=i(k);await I.removeItem(U)}},C=async(I,k,S)=>{const U=i(k);if(S==null)await I.removeItem(U);else{const B=c(await I.getItem(U));[S].flat().forEach(F=>delete B[F]),await I.setItem(U,B)}},x=(I,k,S)=>I.watch(k,S);return{getItem:async(I,k)=>{const{driver:S,driverKey:U}=r(I);return await d(S,U,k)},getItems:async I=>{const k=new Map,S=new Map,U=[];I.forEach(F=>{let Q,V;typeof F=="string"?Q=F:"getValue"in F?(Q=F.key,V={fallback:F.fallback}):(Q=F.key,V=F.options),U.push(Q);const{driverArea:W,driverKey:J}=r(Q),z=k.get(W)??[];k.set(W,z.concat(J)),S.set(Q,V)});const B=new Map;return await Promise.all(Array.from(k.entries()).map(async([F,Q])=>{(await n[F].getItems(Q)).forEach(W=>{const J=`${F}:${W.key}`,z=S.get(J),G=l(W.value,(z==null?void 0:z.fallback)??(z==null?void 0:z.defaultValue));B.set(J,G)})})),U.map(F=>({key:F,value:B.get(F)}))},getMeta:async I=>{const{driver:k,driverKey:S}=r(I);return await A(k,S)},getMetas:async I=>{const k=I.map(B=>{const F=typeof B=="string"?B:B.key,{driverArea:Q,driverKey:V}=r(F);return{key:F,driverArea:Q,driverKey:V,driverMetaKey:i(V)}}),S=k.reduce((B,F)=>{var Q;return B[Q=F.driverArea]??(B[Q]=[]),B[F.driverArea].push(F),B},{}),U={};return await Promise.all(Object.entries(S).map(async([B,F])=>{const Q=await ac.storage[B].get(F.map(V=>V.driverMetaKey));F.forEach(V=>{U[V.key]=Q[V.driverMetaKey]??{}})})),k.map(B=>({key:B.key,meta:U[B.key]}))},setItem:async(I,k)=>{const{driver:S,driverKey:U}=r(I);await h(S,U,k)},setItems:async I=>{const k={};I.forEach(S=>{const{driverArea:U,driverKey:B}=r("key"in S?S.key:S.item.key);k[U]??(k[U]=[]),k[U].push({key:B,value:S.value})}),await Promise.all(Object.entries(k).map(async([S,U])=>{await t(S).setItems(U)}))},setMeta:async(I,k)=>{const{driver:S,driverKey:U}=r(I);await y(S,U,k)},setMetas:async I=>{const k={};I.forEach(S=>{const{driverArea:U,driverKey:B}=r("key"in S?S.key:S.item.key);k[U]??(k[U]=[]),k[U].push({key:B,properties:S.meta})}),await Promise.all(Object.entries(k).map(async([S,U])=>{const B=t(S),F=U.map(({key:J})=>i(J));console.log(S,F);const Q=await B.getItems(F),V=Object.fromEntries(Q.map(({key:J,value:z})=>[J,c(z)])),W=U.map(({key:J,properties:z})=>{const G=i(J);return{key:G,value:o(V[G]??{},z)}});await B.setItems(W)}))},removeItem:async(I,k)=>{const{driver:S,driverKey:U}=r(I);await E(S,U,k)},removeItems:async I=>{const k={};I.forEach(S=>{let U,B;typeof S=="string"?U=S:"getValue"in S?U=S.key:"item"in S?(U=S.item.key,B=S.options):(U=S.key,B=S.options);const{driverArea:F,driverKey:Q}=r(U);k[F]??(k[F]=[]),k[F].push(Q),B!=null&&B.removeMeta&&k[F].push(i(Q))}),await Promise.all(Object.entries(k).map(async([S,U])=>{await t(S).removeItems(U)}))},clear:async I=>{await t(I).clear()},removeMeta:async(I,k)=>{const{driver:S,driverKey:U}=r(I);await C(S,U,k)},snapshot:async(I,k)=>{var B;const U=await t(I).snapshot();return(B=k==null?void 0:k.excludeKeys)==null||B.forEach(F=>{delete U[F],delete U[i(F)]}),U},restoreSnapshot:async(I,k)=>{await t(I).restoreSnapshot(k)},watch:(I,k)=>{const{driver:S,driverKey:U}=r(I);return x(S,U,k)},unwatch(){Object.values(n).forEach(I=>{I.unwatch()})},defineItem:(I,k)=>{const{driver:S,driverKey:U}=r(I),{version:B=1,migrations:F={}}=k??{};if(B<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const Q=async()=>{var X;const G=i(U),[{value:Y},{value:ae}]=await S.getItems([U,G]);if(Y==null)return;const Z=(ae==null?void 0:ae.v)??1;if(Z>B)throw Error(`Version downgrade detected (v${Z} -> v${B}) for "${I}"`);if(Z===B)return;console.debug(`[@wxt-dev/storage] Running storage migration for ${I}: v${Z} -> v${B}`);const ce=Array.from({length:B-Z},(le,ge)=>Z+ge+1);let pe=Y;for(const le of ce)try{pe=await((X=F==null?void 0:F[le])==null?void 0:X.call(F,pe))??pe}catch(ge){throw new H1(I,le,{cause:ge})}await S.setItems([{key:U,value:pe},{key:G,value:{...ae,v:B}}]),console.debug(`[@wxt-dev/storage] Storage migration completed for ${I} v${B}`,{migratedValue:pe})},V=(k==null?void 0:k.migrations)==null?Promise.resolve():Q().catch(G=>{console.error(`[@wxt-dev/storage] Migration failed for ${I}`,G)}),W=new F1,J=()=>(k==null?void 0:k.fallback)??(k==null?void 0:k.defaultValue)??null,z=()=>W.runExclusive(async()=>{const G=await S.getItem(U);if(G!=null||(k==null?void 0:k.init)==null)return G;const Y=await k.init();return await S.setItem(U,Y),Y});return V.then(z),{key:I,get defaultValue(){return J()},get fallback(){return J()},getValue:async()=>(await V,k!=null&&k.init?await z():await d(S,U,k)),getMeta:async()=>(await V,await A(S,U)),setValue:async G=>(await V,await h(S,U,G)),setMeta:async G=>(await V,await y(S,U,G)),removeValue:async G=>(await V,await E(S,U,G)),removeMeta:async G=>(await V,await C(S,U,G)),watch:G=>x(S,U,(Y,ae)=>G(Y??J(),ae??J())),migrate:Q}}}}function zu(n){const t=()=>{if(ac.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(ac.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const i=ac.storage[n];if(i==null)throw Error(`"browser.storage.${n}" is undefined`);return i},r=new Set;return{getItem:async i=>(await t().get(i))[i],getItems:async i=>{const o=await t().get(i);return i.map(l=>({key:l,value:o[l]??null}))},setItem:async(i,o)=>{o==null?await t().remove(i):await t().set({[i]:o})},setItems:async i=>{const o=i.reduce((l,{key:c,value:d})=>(l[c]=d,l),{});await t().set(o)},removeItem:async i=>{await t().remove(i)},removeItems:async i=>{await t().remove(i)},clear:async()=>{await t().clear()},snapshot:async()=>await t().get(),restoreSnapshot:async i=>{await t().set(i)},watch(i,o){const l=c=>{const d=c[i];d!=null&&(lA(d.newValue,d.oldValue)||o(d.newValue??null,d.oldValue??null))};return t().onChanged.addListener(l),r.add(l),()=>{t().onChanged.removeListener(l),r.delete(l)}},unwatch(){r.forEach(i=>{t().onChanged.removeListener(i)}),r.clear()}}}class H1 extends Error{constructor(t,r,i){super(`v${r} migration failed for "${t}"`,i),this.key=t,this.version=r}}var uh={},hl={},Qp;function z1(){if(Qp)return hl;Qp=1,hl.byteLength=d,hl.toByteArray=h,hl.fromByteArray=C;for(var n=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=i.length;o<l;++o)n[o]=i[o],t[i.charCodeAt(o)]=o;t[45]=62,t[95]=63;function c(x){var N=x.length;if(N%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=x.indexOf("=");I===-1&&(I=N);var k=I===N?0:4-I%4;return[I,k]}function d(x){var N=c(x),I=N[0],k=N[1];return(I+k)*3/4-k}function A(x,N,I){return(N+I)*3/4-I}function h(x){var N,I=c(x),k=I[0],S=I[1],U=new r(A(x,k,S)),B=0,F=S>0?k-4:k,Q;for(Q=0;Q<F;Q+=4)N=t[x.charCodeAt(Q)]<<18|t[x.charCodeAt(Q+1)]<<12|t[x.charCodeAt(Q+2)]<<6|t[x.charCodeAt(Q+3)],U[B++]=N>>16&255,U[B++]=N>>8&255,U[B++]=N&255;return S===2&&(N=t[x.charCodeAt(Q)]<<2|t[x.charCodeAt(Q+1)]>>4,U[B++]=N&255),S===1&&(N=t[x.charCodeAt(Q)]<<10|t[x.charCodeAt(Q+1)]<<4|t[x.charCodeAt(Q+2)]>>2,U[B++]=N>>8&255,U[B++]=N&255),U}function y(x){return n[x>>18&63]+n[x>>12&63]+n[x>>6&63]+n[x&63]}function E(x,N,I){for(var k,S=[],U=N;U<I;U+=3)k=(x[U]<<16&16711680)+(x[U+1]<<8&65280)+(x[U+2]&255),S.push(y(k));return S.join("")}function C(x){for(var N,I=x.length,k=I%3,S=[],U=16383,B=0,F=I-k;B<F;B+=U)S.push(E(x,B,B+U>F?F:B+U));return k===1?(N=x[I-1],S.push(n[N>>2]+n[N<<4&63]+"==")):k===2&&(N=(x[I-2]<<8)+x[I-1],S.push(n[N>>10]+n[N>>4&63]+n[N<<2&63]+"=")),S.join("")}return hl}var Vu={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var Hp;function V1(){return Hp||(Hp=1,Vu.read=function(n,t,r,i,o){var l,c,d=o*8-i-1,A=(1<<d)-1,h=A>>1,y=-7,E=r?o-1:0,C=r?-1:1,x=n[t+E];for(E+=C,l=x&(1<<-y)-1,x>>=-y,y+=d;y>0;l=l*256+n[t+E],E+=C,y-=8);for(c=l&(1<<-y)-1,l>>=-y,y+=i;y>0;c=c*256+n[t+E],E+=C,y-=8);if(l===0)l=1-h;else{if(l===A)return c?NaN:(x?-1:1)*(1/0);c=c+Math.pow(2,i),l=l-h}return(x?-1:1)*c*Math.pow(2,l-i)},Vu.write=function(n,t,r,i,o,l){var c,d,A,h=l*8-o-1,y=(1<<h)-1,E=y>>1,C=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=i?0:l-1,N=i?1:-1,I=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(d=isNaN(t)?1:0,c=y):(c=Math.floor(Math.log(t)/Math.LN2),t*(A=Math.pow(2,-c))<1&&(c--,A*=2),c+E>=1?t+=C/A:t+=C*Math.pow(2,1-E),t*A>=2&&(c++,A/=2),c+E>=y?(d=0,c=y):c+E>=1?(d=(t*A-1)*Math.pow(2,o),c=c+E):(d=t*Math.pow(2,E-1)*Math.pow(2,o),c=0));o>=8;n[r+x]=d&255,x+=N,d/=256,o-=8);for(c=c<<o|d,h+=o;h>0;n[r+x]=c&255,x+=N,c/=256,h-=8);n[r+x-N]|=I*128}),Vu}/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var zp;function G1(){return zp||(zp=1,function(n){const t=z1(),r=V1(),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=d,n.SlowBuffer=U,n.INSPECT_MAX_BYTES=50;const o=2147483647;n.kMaxLength=o,d.TYPED_ARRAY_SUPPORT=l(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const M=new Uint8Array(1),w={foo:function(){return 42}};return Object.setPrototypeOf(w,Uint8Array.prototype),Object.setPrototypeOf(M,w),M.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function c(M){if(M>o)throw new RangeError('The value "'+M+'" is invalid for option "size"');const w=new Uint8Array(M);return Object.setPrototypeOf(w,d.prototype),w}function d(M,w,v){if(typeof M=="number"){if(typeof w=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(M)}return A(M,w,v)}d.poolSize=8192;function A(M,w,v){if(typeof M=="string")return C(M,w);if(ArrayBuffer.isView(M))return N(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(Ee(M,ArrayBuffer)||M&&Ee(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ee(M,SharedArrayBuffer)||M&&Ee(M.buffer,SharedArrayBuffer)))return I(M,w,v);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const K=M.valueOf&&M.valueOf();if(K!=null&&K!==M)return d.from(K,w,v);const ne=k(M);if(ne)return ne;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return d.from(M[Symbol.toPrimitive]("string"),w,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}d.from=function(M,w,v){return A(M,w,v)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array);function h(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 y(M,w,v){return h(M),M<=0?c(M):w!==void 0?typeof v=="string"?c(M).fill(w,v):c(M).fill(w):c(M)}d.alloc=function(M,w,v){return y(M,w,v)};function E(M){return h(M),c(M<0?0:S(M)|0)}d.allocUnsafe=function(M){return E(M)},d.allocUnsafeSlow=function(M){return E(M)};function C(M,w){if((typeof w!="string"||w==="")&&(w="utf8"),!d.isEncoding(w))throw new TypeError("Unknown encoding: "+w);const v=B(M,w)|0;let K=c(v);const ne=K.write(M,w);return ne!==v&&(K=K.slice(0,ne)),K}function x(M){const w=M.length<0?0:S(M.length)|0,v=c(w);for(let K=0;K<w;K+=1)v[K]=M[K]&255;return v}function N(M){if(Ee(M,Uint8Array)){const w=new Uint8Array(M);return I(w.buffer,w.byteOffset,w.byteLength)}return x(M)}function I(M,w,v){if(w<0||M.byteLength<w)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<w+(v||0))throw new RangeError('"length" is outside of buffer bounds');let K;return w===void 0&&v===void 0?K=new Uint8Array(M):v===void 0?K=new Uint8Array(M,w):K=new Uint8Array(M,w,v),Object.setPrototypeOf(K,d.prototype),K}function k(M){if(d.isBuffer(M)){const w=S(M.length)|0,v=c(w);return v.length===0||M.copy(v,0,0,w),v}if(M.length!==void 0)return typeof M.length!="number"||Fe(M.length)?c(0):x(M);if(M.type==="Buffer"&&Array.isArray(M.data))return x(M.data)}function S(M){if(M>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return M|0}function U(M){return+M!=M&&(M=0),d.alloc(+M)}d.isBuffer=function(w){return w!=null&&w._isBuffer===!0&&w!==d.prototype},d.compare=function(w,v){if(Ee(w,Uint8Array)&&(w=d.from(w,w.offset,w.byteLength)),Ee(v,Uint8Array)&&(v=d.from(v,v.offset,v.byteLength)),!d.isBuffer(w)||!d.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(w===v)return 0;let K=w.length,ne=v.length;for(let me=0,xe=Math.min(K,ne);me<xe;++me)if(w[me]!==v[me]){K=w[me],ne=v[me];break}return K<ne?-1:ne<K?1:0},d.isEncoding=function(w){switch(String(w).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.concat=function(w,v){if(!Array.isArray(w))throw new TypeError('"list" argument must be an Array of Buffers');if(w.length===0)return d.alloc(0);let K;if(v===void 0)for(v=0,K=0;K<w.length;++K)v+=w[K].length;const ne=d.allocUnsafe(v);let me=0;for(K=0;K<w.length;++K){let xe=w[K];if(Ee(xe,Uint8Array))me+xe.length>ne.length?(d.isBuffer(xe)||(xe=d.from(xe)),xe.copy(ne,me)):Uint8Array.prototype.set.call(ne,xe,me);else if(d.isBuffer(xe))xe.copy(ne,me);else throw new TypeError('"list" argument must be an Array of Buffers');me+=xe.length}return ne};function B(M,w){if(d.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||Ee(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 v=M.length,K=arguments.length>2&&arguments[2]===!0;if(!K&&v===0)return 0;let ne=!1;for(;;)switch(w){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return He(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return $(M).length;default:if(ne)return K?-1:He(M).length;w=(""+w).toLowerCase(),ne=!0}}d.byteLength=B;function F(M,w,v){let K=!1;if((w===void 0||w<0)&&(w=0),w>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,w>>>=0,v<=w))return"";for(M||(M="utf8");;)switch(M){case"hex":return je(this,w,v);case"utf8":case"utf-8":return ce(this,w,v);case"ascii":return le(this,w,v);case"latin1":case"binary":return ge(this,w,v);case"base64":return Z(this,w,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,w,v);default:if(K)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),K=!0}}d.prototype._isBuffer=!0;function Q(M,w,v){const K=M[w];M[w]=M[v],M[v]=K}d.prototype.swap16=function(){const w=this.length;if(w%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;v<w;v+=2)Q(this,v,v+1);return this},d.prototype.swap32=function(){const w=this.length;if(w%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let v=0;v<w;v+=4)Q(this,v,v+3),Q(this,v+1,v+2);return this},d.prototype.swap64=function(){const w=this.length;if(w%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let v=0;v<w;v+=8)Q(this,v,v+7),Q(this,v+1,v+6),Q(this,v+2,v+5),Q(this,v+3,v+4);return this},d.prototype.toString=function(){const w=this.length;return w===0?"":arguments.length===0?ce(this,0,w):F.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(w){if(!d.isBuffer(w))throw new TypeError("Argument must be a Buffer");return this===w?!0:d.compare(this,w)===0},d.prototype.inspect=function(){let w="";const v=n.INSPECT_MAX_BYTES;return w=this.toString("hex",0,v).replace(/(.{2})/g,"$1 ").trim(),this.length>v&&(w+=" ... "),"<Buffer "+w+">"},i&&(d.prototype[i]=d.prototype.inspect),d.prototype.compare=function(w,v,K,ne,me){if(Ee(w,Uint8Array)&&(w=d.from(w,w.offset,w.byteLength)),!d.isBuffer(w))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof w);if(v===void 0&&(v=0),K===void 0&&(K=w?w.length:0),ne===void 0&&(ne=0),me===void 0&&(me=this.length),v<0||K>w.length||ne<0||me>this.length)throw new RangeError("out of range index");if(ne>=me&&v>=K)return 0;if(ne>=me)return-1;if(v>=K)return 1;if(v>>>=0,K>>>=0,ne>>>=0,me>>>=0,this===w)return 0;let xe=me-ne,Pe=K-v;const Ie=Math.min(xe,Pe),Ye=this.slice(ne,me),nt=w.slice(v,K);for(let Xe=0;Xe<Ie;++Xe)if(Ye[Xe]!==nt[Xe]){xe=Ye[Xe],Pe=nt[Xe];break}return xe<Pe?-1:Pe<xe?1:0};function V(M,w,v,K,ne){if(M.length===0)return-1;if(typeof v=="string"?(K=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,Fe(v)&&(v=ne?0:M.length-1),v<0&&(v=M.length+v),v>=M.length){if(ne)return-1;v=M.length-1}else if(v<0)if(ne)v=0;else return-1;if(typeof w=="string"&&(w=d.from(w,K)),d.isBuffer(w))return w.length===0?-1:W(M,w,v,K,ne);if(typeof w=="number")return w=w&255,typeof Uint8Array.prototype.indexOf=="function"?ne?Uint8Array.prototype.indexOf.call(M,w,v):Uint8Array.prototype.lastIndexOf.call(M,w,v):W(M,[w],v,K,ne);throw new TypeError("val must be string, number or Buffer")}function W(M,w,v,K,ne){let me=1,xe=M.length,Pe=w.length;if(K!==void 0&&(K=String(K).toLowerCase(),K==="ucs2"||K==="ucs-2"||K==="utf16le"||K==="utf-16le")){if(M.length<2||w.length<2)return-1;me=2,xe/=2,Pe/=2,v/=2}function Ie(nt,Xe){return me===1?nt[Xe]:nt.readUInt16BE(Xe*me)}let Ye;if(ne){let nt=-1;for(Ye=v;Ye<xe;Ye++)if(Ie(M,Ye)===Ie(w,nt===-1?0:Ye-nt)){if(nt===-1&&(nt=Ye),Ye-nt+1===Pe)return nt*me}else nt!==-1&&(Ye-=Ye-nt),nt=-1}else for(v+Pe>xe&&(v=xe-Pe),Ye=v;Ye>=0;Ye--){let nt=!0;for(let Xe=0;Xe<Pe;Xe++)if(Ie(M,Ye+Xe)!==Ie(w,Xe)){nt=!1;break}if(nt)return Ye}return-1}d.prototype.includes=function(w,v,K){return this.indexOf(w,v,K)!==-1},d.prototype.indexOf=function(w,v,K){return V(this,w,v,K,!0)},d.prototype.lastIndexOf=function(w,v,K){return V(this,w,v,K,!1)};function J(M,w,v,K){v=Number(v)||0;const ne=M.length-v;K?(K=Number(K),K>ne&&(K=ne)):K=ne;const me=w.length;K>me/2&&(K=me/2);let xe;for(xe=0;xe<K;++xe){const Pe=parseInt(w.substr(xe*2,2),16);if(Fe(Pe))return xe;M[v+xe]=Pe}return xe}function z(M,w,v,K){return oe(He(w,M.length-v),M,v,K)}function G(M,w,v,K){return oe(it(w),M,v,K)}function Y(M,w,v,K){return oe($(w),M,v,K)}function ae(M,w,v,K){return oe(pt(w,M.length-v),M,v,K)}d.prototype.write=function(w,v,K,ne){if(v===void 0)ne="utf8",K=this.length,v=0;else if(K===void 0&&typeof v=="string")ne=v,K=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(K)?(K=K>>>0,ne===void 0&&(ne="utf8")):(ne=K,K=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const me=this.length-v;if((K===void 0||K>me)&&(K=me),w.length>0&&(K<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");ne||(ne="utf8");let xe=!1;for(;;)switch(ne){case"hex":return J(this,w,v,K);case"utf8":case"utf-8":return z(this,w,v,K);case"ascii":case"latin1":case"binary":return G(this,w,v,K);case"base64":return Y(this,w,v,K);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,w,v,K);default:if(xe)throw new TypeError("Unknown encoding: "+ne);ne=(""+ne).toLowerCase(),xe=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Z(M,w,v){return w===0&&v===M.length?t.fromByteArray(M):t.fromByteArray(M.slice(w,v))}function ce(M,w,v){v=Math.min(M.length,v);const K=[];let ne=w;for(;ne<v;){const me=M[ne];let xe=null,Pe=me>239?4:me>223?3:me>191?2:1;if(ne+Pe<=v){let Ie,Ye,nt,Xe;switch(Pe){case 1:me<128&&(xe=me);break;case 2:Ie=M[ne+1],(Ie&192)===128&&(Xe=(me&31)<<6|Ie&63,Xe>127&&(xe=Xe));break;case 3:Ie=M[ne+1],Ye=M[ne+2],(Ie&192)===128&&(Ye&192)===128&&(Xe=(me&15)<<12|(Ie&63)<<6|Ye&63,Xe>2047&&(Xe<55296||Xe>57343)&&(xe=Xe));break;case 4:Ie=M[ne+1],Ye=M[ne+2],nt=M[ne+3],(Ie&192)===128&&(Ye&192)===128&&(nt&192)===128&&(Xe=(me&15)<<18|(Ie&63)<<12|(Ye&63)<<6|nt&63,Xe>65535&&Xe<1114112&&(xe=Xe))}}xe===null?(xe=65533,Pe=1):xe>65535&&(xe-=65536,K.push(xe>>>10&1023|55296),xe=56320|xe&1023),K.push(xe),ne+=Pe}return X(K)}const pe=4096;function X(M){const w=M.length;if(w<=pe)return String.fromCharCode.apply(String,M);let v="",K=0;for(;K<w;)v+=String.fromCharCode.apply(String,M.slice(K,K+=pe));return v}function le(M,w,v){let K="";v=Math.min(M.length,v);for(let ne=w;ne<v;++ne)K+=String.fromCharCode(M[ne]&127);return K}function ge(M,w,v){let K="";v=Math.min(M.length,v);for(let ne=w;ne<v;++ne)K+=String.fromCharCode(M[ne]);return K}function je(M,w,v){const K=M.length;(!w||w<0)&&(w=0),(!v||v<0||v>K)&&(v=K);let ne="";for(let me=w;me<v;++me)ne+=_e[M[me]];return ne}function P(M,w,v){const K=M.slice(w,v);let ne="";for(let me=0;me<K.length-1;me+=2)ne+=String.fromCharCode(K[me]+K[me+1]*256);return ne}d.prototype.slice=function(w,v){const K=this.length;w=~~w,v=v===void 0?K:~~v,w<0?(w+=K,w<0&&(w=0)):w>K&&(w=K),v<0?(v+=K,v<0&&(v=0)):v>K&&(v=K),v<w&&(v=w);const ne=this.subarray(w,v);return Object.setPrototypeOf(ne,d.prototype),ne};function q(M,w,v){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+w>v)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(w,v,K){w=w>>>0,v=v>>>0,K||q(w,v,this.length);let ne=this[w],me=1,xe=0;for(;++xe<v&&(me*=256);)ne+=this[w+xe]*me;return ne},d.prototype.readUintBE=d.prototype.readUIntBE=function(w,v,K){w=w>>>0,v=v>>>0,K||q(w,v,this.length);let ne=this[w+--v],me=1;for(;v>0&&(me*=256);)ne+=this[w+--v]*me;return ne},d.prototype.readUint8=d.prototype.readUInt8=function(w,v){return w=w>>>0,v||q(w,1,this.length),this[w]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(w,v){return w=w>>>0,v||q(w,2,this.length),this[w]|this[w+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(w,v){return w=w>>>0,v||q(w,2,this.length),this[w]<<8|this[w+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(w,v){return w=w>>>0,v||q(w,4,this.length),(this[w]|this[w+1]<<8|this[w+2]<<16)+this[w+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(w,v){return w=w>>>0,v||q(w,4,this.length),this[w]*16777216+(this[w+1]<<16|this[w+2]<<8|this[w+3])},d.prototype.readBigUInt64LE=Ue(function(w){w=w>>>0,mt(w,"offset");const v=this[w],K=this[w+7];(v===void 0||K===void 0)&&wt(w,this.length-8);const ne=v+this[++w]*2**8+this[++w]*2**16+this[++w]*2**24,me=this[++w]+this[++w]*2**8+this[++w]*2**16+K*2**24;return BigInt(ne)+(BigInt(me)<<BigInt(32))}),d.prototype.readBigUInt64BE=Ue(function(w){w=w>>>0,mt(w,"offset");const v=this[w],K=this[w+7];(v===void 0||K===void 0)&&wt(w,this.length-8);const ne=v*2**24+this[++w]*2**16+this[++w]*2**8+this[++w],me=this[++w]*2**24+this[++w]*2**16+this[++w]*2**8+K;return(BigInt(ne)<<BigInt(32))+BigInt(me)}),d.prototype.readIntLE=function(w,v,K){w=w>>>0,v=v>>>0,K||q(w,v,this.length);let ne=this[w],me=1,xe=0;for(;++xe<v&&(me*=256);)ne+=this[w+xe]*me;return me*=128,ne>=me&&(ne-=Math.pow(2,8*v)),ne},d.prototype.readIntBE=function(w,v,K){w=w>>>0,v=v>>>0,K||q(w,v,this.length);let ne=v,me=1,xe=this[w+--ne];for(;ne>0&&(me*=256);)xe+=this[w+--ne]*me;return me*=128,xe>=me&&(xe-=Math.pow(2,8*v)),xe},d.prototype.readInt8=function(w,v){return w=w>>>0,v||q(w,1,this.length),this[w]&128?(255-this[w]+1)*-1:this[w]},d.prototype.readInt16LE=function(w,v){w=w>>>0,v||q(w,2,this.length);const K=this[w]|this[w+1]<<8;return K&32768?K|4294901760:K},d.prototype.readInt16BE=function(w,v){w=w>>>0,v||q(w,2,this.length);const K=this[w+1]|this[w]<<8;return K&32768?K|4294901760:K},d.prototype.readInt32LE=function(w,v){return w=w>>>0,v||q(w,4,this.length),this[w]|this[w+1]<<8|this[w+2]<<16|this[w+3]<<24},d.prototype.readInt32BE=function(w,v){return w=w>>>0,v||q(w,4,this.length),this[w]<<24|this[w+1]<<16|this[w+2]<<8|this[w+3]},d.prototype.readBigInt64LE=Ue(function(w){w=w>>>0,mt(w,"offset");const v=this[w],K=this[w+7];(v===void 0||K===void 0)&&wt(w,this.length-8);const ne=this[w+4]+this[w+5]*2**8+this[w+6]*2**16+(K<<24);return(BigInt(ne)<<BigInt(32))+BigInt(v+this[++w]*2**8+this[++w]*2**16+this[++w]*2**24)}),d.prototype.readBigInt64BE=Ue(function(w){w=w>>>0,mt(w,"offset");const v=this[w],K=this[w+7];(v===void 0||K===void 0)&&wt(w,this.length-8);const ne=(v<<24)+this[++w]*2**16+this[++w]*2**8+this[++w];return(BigInt(ne)<<BigInt(32))+BigInt(this[++w]*2**24+this[++w]*2**16+this[++w]*2**8+K)}),d.prototype.readFloatLE=function(w,v){return w=w>>>0,v||q(w,4,this.length),r.read(this,w,!0,23,4)},d.prototype.readFloatBE=function(w,v){return w=w>>>0,v||q(w,4,this.length),r.read(this,w,!1,23,4)},d.prototype.readDoubleLE=function(w,v){return w=w>>>0,v||q(w,8,this.length),r.read(this,w,!0,52,8)},d.prototype.readDoubleBE=function(w,v){return w=w>>>0,v||q(w,8,this.length),r.read(this,w,!1,52,8)};function se(M,w,v,K,ne,me){if(!d.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(w>ne||w<me)throw new RangeError('"value" argument is out of bounds');if(v+K>M.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(w,v,K,ne){if(w=+w,v=v>>>0,K=K>>>0,!ne){const Pe=Math.pow(2,8*K)-1;se(this,w,v,K,Pe,0)}let me=1,xe=0;for(this[v]=w&255;++xe<K&&(me*=256);)this[v+xe]=w/me&255;return v+K},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(w,v,K,ne){if(w=+w,v=v>>>0,K=K>>>0,!ne){const Pe=Math.pow(2,8*K)-1;se(this,w,v,K,Pe,0)}let me=K-1,xe=1;for(this[v+me]=w&255;--me>=0&&(xe*=256);)this[v+me]=w/xe&255;return v+K},d.prototype.writeUint8=d.prototype.writeUInt8=function(w,v,K){return w=+w,v=v>>>0,K||se(this,w,v,1,255,0),this[v]=w&255,v+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(w,v,K){return w=+w,v=v>>>0,K||se(this,w,v,2,65535,0),this[v]=w&255,this[v+1]=w>>>8,v+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(w,v,K){return w=+w,v=v>>>0,K||se(this,w,v,2,65535,0),this[v]=w>>>8,this[v+1]=w&255,v+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(w,v,K){return w=+w,v=v>>>0,K||se(this,w,v,4,4294967295,0),this[v+3]=w>>>24,this[v+2]=w>>>16,this[v+1]=w>>>8,this[v]=w&255,v+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(w,v,K){return w=+w,v=v>>>0,K||se(this,w,v,4,4294967295,0),this[v]=w>>>24,this[v+1]=w>>>16,this[v+2]=w>>>8,this[v+3]=w&255,v+4};function we(M,w,v,K,ne){kt(w,K,ne,M,v,7);let me=Number(w&BigInt(4294967295));M[v++]=me,me=me>>8,M[v++]=me,me=me>>8,M[v++]=me,me=me>>8,M[v++]=me;let xe=Number(w>>BigInt(32)&BigInt(4294967295));return M[v++]=xe,xe=xe>>8,M[v++]=xe,xe=xe>>8,M[v++]=xe,xe=xe>>8,M[v++]=xe,v}function Ce(M,w,v,K,ne){kt(w,K,ne,M,v,7);let me=Number(w&BigInt(4294967295));M[v+7]=me,me=me>>8,M[v+6]=me,me=me>>8,M[v+5]=me,me=me>>8,M[v+4]=me;let xe=Number(w>>BigInt(32)&BigInt(4294967295));return M[v+3]=xe,xe=xe>>8,M[v+2]=xe,xe=xe>>8,M[v+1]=xe,xe=xe>>8,M[v]=xe,v+8}d.prototype.writeBigUInt64LE=Ue(function(w,v=0){return we(this,w,v,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=Ue(function(w,v=0){return Ce(this,w,v,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(w,v,K,ne){if(w=+w,v=v>>>0,!ne){const Ie=Math.pow(2,8*K-1);se(this,w,v,K,Ie-1,-Ie)}let me=0,xe=1,Pe=0;for(this[v]=w&255;++me<K&&(xe*=256);)w<0&&Pe===0&&this[v+me-1]!==0&&(Pe=1),this[v+me]=(w/xe>>0)-Pe&255;return v+K},d.prototype.writeIntBE=function(w,v,K,ne){if(w=+w,v=v>>>0,!ne){const Ie=Math.pow(2,8*K-1);se(this,w,v,K,Ie-1,-Ie)}let me=K-1,xe=1,Pe=0;for(this[v+me]=w&255;--me>=0&&(xe*=256);)w<0&&Pe===0&&this[v+me+1]!==0&&(Pe=1),this[v+me]=(w/xe>>0)-Pe&255;return v+K},d.prototype.writeInt8=function(w,v,K){return w=+w,v=v>>>0,K||se(this,w,v,1,127,-128),w<0&&(w=255+w+1),this[v]=w&255,v+1},d.prototype.writeInt16LE=function(w,v,K){return w=+w,v=v>>>0,K||se(this,w,v,2,32767,-32768),this[v]=w&255,this[v+1]=w>>>8,v+2},d.prototype.writeInt16BE=function(w,v,K){return w=+w,v=v>>>0,K||se(this,w,v,2,32767,-32768),this[v]=w>>>8,this[v+1]=w&255,v+2},d.prototype.writeInt32LE=function(w,v,K){return w=+w,v=v>>>0,K||se(this,w,v,4,2147483647,-2147483648),this[v]=w&255,this[v+1]=w>>>8,this[v+2]=w>>>16,this[v+3]=w>>>24,v+4},d.prototype.writeInt32BE=function(w,v,K){return w=+w,v=v>>>0,K||se(this,w,v,4,2147483647,-2147483648),w<0&&(w=4294967295+w+1),this[v]=w>>>24,this[v+1]=w>>>16,this[v+2]=w>>>8,this[v+3]=w&255,v+4},d.prototype.writeBigInt64LE=Ue(function(w,v=0){return we(this,w,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=Ue(function(w,v=0){return Ce(this,w,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Be(M,w,v,K,ne,me){if(v+K>M.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function Le(M,w,v,K,ne){return w=+w,v=v>>>0,ne||Be(M,w,v,4),r.write(M,w,v,K,23,4),v+4}d.prototype.writeFloatLE=function(w,v,K){return Le(this,w,v,!0,K)},d.prototype.writeFloatBE=function(w,v,K){return Le(this,w,v,!1,K)};function Je(M,w,v,K,ne){return w=+w,v=v>>>0,ne||Be(M,w,v,8),r.write(M,w,v,K,52,8),v+8}d.prototype.writeDoubleLE=function(w,v,K){return Je(this,w,v,!0,K)},d.prototype.writeDoubleBE=function(w,v,K){return Je(this,w,v,!1,K)},d.prototype.copy=function(w,v,K,ne){if(!d.isBuffer(w))throw new TypeError("argument should be a Buffer");if(K||(K=0),!ne&&ne!==0&&(ne=this.length),v>=w.length&&(v=w.length),v||(v=0),ne>0&&ne<K&&(ne=K),ne===K||w.length===0||this.length===0)return 0;if(v<0)throw new RangeError("targetStart out of bounds");if(K<0||K>=this.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("sourceEnd out of bounds");ne>this.length&&(ne=this.length),w.length-v<ne-K&&(ne=w.length-v+K);const me=ne-K;return this===w&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,K,ne):Uint8Array.prototype.set.call(w,this.subarray(K,ne),v),me},d.prototype.fill=function(w,v,K,ne){if(typeof w=="string"){if(typeof v=="string"?(ne=v,v=0,K=this.length):typeof K=="string"&&(ne=K,K=this.length),ne!==void 0&&typeof ne!="string")throw new TypeError("encoding must be a string");if(typeof ne=="string"&&!d.isEncoding(ne))throw new TypeError("Unknown encoding: "+ne);if(w.length===1){const xe=w.charCodeAt(0);(ne==="utf8"&&xe<128||ne==="latin1")&&(w=xe)}}else typeof w=="number"?w=w&255:typeof w=="boolean"&&(w=Number(w));if(v<0||this.length<v||this.length<K)throw new RangeError("Out of range index");if(K<=v)return this;v=v>>>0,K=K===void 0?this.length:K>>>0,w||(w=0);let me;if(typeof w=="number")for(me=v;me<K;++me)this[me]=w;else{const xe=d.isBuffer(w)?w:d.from(w,ne),Pe=xe.length;if(Pe===0)throw new TypeError('The value "'+w+'" is invalid for argument "value"');for(me=0;me<K-v;++me)this[me+v]=xe[me%Pe]}return this};const Ke={};function We(M,w,v){Ke[M]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:w.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${M}]`,this.stack,delete this.name}get code(){return M}set code(ne){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ne,writable:!0})}toString(){return`${this.name} [${M}]: ${this.message}`}}}We("ERR_BUFFER_OUT_OF_BOUNDS",function(M){return M?`${M} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),We("ERR_INVALID_ARG_TYPE",function(M,w){return`The "${M}" argument must be of type number. Received type ${typeof w}`},TypeError),We("ERR_OUT_OF_RANGE",function(M,w,v){let K=`The value of "${M}" is out of range.`,ne=v;return Number.isInteger(v)&&Math.abs(v)>2**32?ne=dt(String(v)):typeof v=="bigint"&&(ne=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(ne=dt(ne)),ne+="n"),K+=` It must be ${w}. Received ${ne}`,K},RangeError);function dt(M){let w="",v=M.length;const K=M[0]==="-"?1:0;for(;v>=K+4;v-=3)w=`_${M.slice(v-3,v)}${w}`;return`${M.slice(0,v)}${w}`}function fa(M,w,v){mt(w,"offset"),(M[w]===void 0||M[w+v]===void 0)&&wt(w,M.length-(v+1))}function kt(M,w,v,K,ne,me){if(M>v||M<w){const xe=typeof w=="bigint"?"n":"";let Pe;throw w===0||w===BigInt(0)?Pe=`>= 0${xe} and < 2${xe} ** ${(me+1)*8}${xe}`:Pe=`>= -(2${xe} ** ${(me+1)*8-1}${xe}) and < 2 ** ${(me+1)*8-1}${xe}`,new Ke.ERR_OUT_OF_RANGE("value",Pe,M)}fa(K,ne,me)}function mt(M,w){if(typeof M!="number")throw new Ke.ERR_INVALID_ARG_TYPE(w,"number",M)}function wt(M,w,v){throw Math.floor(M)!==M?(mt(M,v),new Ke.ERR_OUT_OF_RANGE("offset","an integer",M)):w<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${w}`,M)}const Gt=/[^+/0-9A-Za-z-_]/g;function ke(M){if(M=M.split("=")[0],M=M.trim().replace(Gt,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function He(M,w){w=w||1/0;let v;const K=M.length;let ne=null;const me=[];for(let xe=0;xe<K;++xe){if(v=M.charCodeAt(xe),v>55295&&v<57344){if(!ne){if(v>56319){(w-=3)>-1&&me.push(239,191,189);continue}else if(xe+1===K){(w-=3)>-1&&me.push(239,191,189);continue}ne=v;continue}if(v<56320){(w-=3)>-1&&me.push(239,191,189),ne=v;continue}v=(ne-55296<<10|v-56320)+65536}else ne&&(w-=3)>-1&&me.push(239,191,189);if(ne=null,v<128){if((w-=1)<0)break;me.push(v)}else if(v<2048){if((w-=2)<0)break;me.push(v>>6|192,v&63|128)}else if(v<65536){if((w-=3)<0)break;me.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((w-=4)<0)break;me.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return me}function it(M){const w=[];for(let v=0;v<M.length;++v)w.push(M.charCodeAt(v)&255);return w}function pt(M,w){let v,K,ne;const me=[];for(let xe=0;xe<M.length&&!((w-=2)<0);++xe)v=M.charCodeAt(xe),K=v>>8,ne=v%256,me.push(ne),me.push(K);return me}function $(M){return t.toByteArray(ke(M))}function oe(M,w,v,K){let ne;for(ne=0;ne<K&&!(ne+v>=w.length||ne>=M.length);++ne)w[ne+v]=M[ne];return ne}function Ee(M,w){return M instanceof w||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===w.name}function Fe(M){return M!==M}const _e=function(){const M="0123456789abcdef",w=new Array(256);for(let v=0;v<16;++v){const K=v*16;for(let ne=0;ne<16;++ne)w[K+ne]=M[v]+M[ne]}return w}();function Ue(M){return typeof BigInt>"u"?qe:M}function qe(){throw new Error("BigInt not supported")}}(uh)),uh}var Wr=G1(),nc={exports:{}},K1=nc.exports,Vp;function q1(){return Vp||(Vp=1,function(n,t){(function(r,i){n.exports=i()})(K1,function(){return(()=>{var r,i,o={773:(d,A,h)=>{var y,E=typeof self<"u"&&self.Module!==void 0?self.Module:{},C={};for(y in E)E.hasOwnProperty(y)&&(C[y]=E[y]);var x,N,I,k;x=typeof window=="object",N=typeof importScripts=="function",I=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",k=!x&&!I&&!N;var S,U,B,F,Q,V="";I?(V=N?h(967).dirname(V)+"/":"//",S=function(ke,He){return F||(F=h(145)),Q||(Q=h(967)),ke=Q.normalize(ke),F.readFileSync(ke,He?null:"utf8")},B=function(ke){var He=S(ke,!0);return He.buffer||(He=new Uint8Array(He)),Y(He.buffer),He},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),d.exports=E,process.on("uncaughtException",function(ke){if(!(ke instanceof wt))throw ke}),process.on("unhandledRejection",se),E.inspect=function(){return"[Emscripten Module object]"}):k?(typeof read<"u"&&(S=function(ke){return read(ke)}),B=function(ke){var He;return typeof readbuffer=="function"?new Uint8Array(readbuffer(ke)):(Y(typeof(He=read(ke,"binary"))=="object"),He)},typeof scriptArgs<"u"&&scriptArgs,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(x||N)&&(N?V=self.location.href:typeof document<"u"&&document.currentScript&&(V=document.currentScript.src),V=V.indexOf("blob:")!==0?V.substr(0,V.lastIndexOf("/")+1):"",S=function(ke){var He=new XMLHttpRequest;return He.open("GET",ke,!1),He.send(null),He.responseText},N&&(B=function(ke){var He=new XMLHttpRequest;return He.open("GET",ke,!1),He.responseType="arraybuffer",He.send(null),new Uint8Array(He.response)}),U=function(ke,He,it){var pt=new XMLHttpRequest;pt.open("GET",ke,!0),pt.responseType="arraybuffer",pt.onload=function(){pt.status==200||pt.status==0&&pt.response?He(pt.response):it()},pt.onerror=it,pt.send(null)}),E.print||console.log.bind(console);var W,J,z=E.printErr||console.warn.bind(console);for(y in C)C.hasOwnProperty(y)&&(E[y]=C[y]);C=null,E.arguments&&E.arguments,E.thisProgram&&E.thisProgram,E.quit&&E.quit,E.wasmBinary&&(W=E.wasmBinary),E.noExitRuntime,typeof WebAssembly!="object"&&se("no native wasm support detected");var G=!1;function Y(ke,He){ke||se("Assertion failed: "+He)}var ae,Z,ce=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function pe(ke){ae=ke,E.HEAP8=new Int8Array(ke),E.HEAP16=new Int16Array(ke),E.HEAP32=new Int32Array(ke),E.HEAPU8=Z=new Uint8Array(ke),E.HEAPU16=new Uint16Array(ke),E.HEAPU32=new Uint32Array(ke),E.HEAPF32=new Float32Array(ke),E.HEAPF64=new Float64Array(ke)}E.INITIAL_MEMORY;var X,le=[],ge=[],je=[],P=0,q=null;function se(ke){throw E.onAbort&&E.onAbort(ke),z(ke+=""),G=!0,ke="abort("+ke+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(ke)}function we(ke){return ke.startsWith("data:application/octet-stream;base64,")}function Ce(ke){return ke.startsWith("file://")}E.preloadedImages={},E.preloadedAudios={};var Be,Le="argon2.wasm";function Je(ke){try{if(ke==Le&&W)return new Uint8Array(W);if(B)return B(ke);throw"both async and sync fetching of the wasm failed"}catch(He){se(He)}}function Ke(ke){for(;ke.length>0;){var He=ke.shift();if(typeof He!="function"){var it=He.func;typeof it=="number"?He.arg===void 0?X.get(it)():X.get(it)(He.arg):it(He.arg===void 0?null:He.arg)}else He(E)}}function We(ke){try{return J.grow(ke-ae.byteLength+65535>>>16),pe(J.buffer),1}catch{}}we(Le)||(Be=Le,Le=E.locateFile?E.locateFile(Be,V):V+Be);var dt,fa={a:function(ke,He,it){Z.copyWithin(ke,He,He+it)},b:function(ke){var He,it=Z.length,pt=2147418112;if((ke>>>=0)>pt)return!1;for(var $=1;$<=4;$*=2){var oe=it*(1+.2/$);if(oe=Math.min(oe,ke+100663296),We(Math.min(pt,((He=Math.max(ke,oe))%65536>0&&(He+=65536-He%65536),He))))return!0}return!1}},kt=(function(){var ke={a:fa};function He($,oe){var Ee,Fe=$.exports;E.asm=Fe,pe((J=E.asm.c).buffer),X=E.asm.k,Ee=E.asm.d,ge.unshift(Ee),function(_e){if(P--,E.monitorRunDependencies&&E.monitorRunDependencies(P),P==0&&q){var Ue=q;q=null,Ue()}}()}function it($){He($.instance)}function pt($){return function(){if(!W&&(x||N)){if(typeof fetch=="function"&&!Ce(Le))return fetch(Le,{credentials:"same-origin"}).then(function(oe){if(!oe.ok)throw"failed to load wasm binary file at '"+Le+"'";return oe.arrayBuffer()}).catch(function(){return Je(Le)});if(U)return new Promise(function(oe,Ee){U(Le,function(Fe){oe(new Uint8Array(Fe))},Ee)})}return Promise.resolve().then(function(){return Je(Le)})}().then(function(oe){return WebAssembly.instantiate(oe,ke)}).then($,function(oe){z("failed to asynchronously prepare wasm: "+oe),se(oe)})}if(P++,E.monitorRunDependencies&&E.monitorRunDependencies(P),E.instantiateWasm)try{return E.instantiateWasm(ke,He)}catch($){return z("Module.instantiateWasm callback failed with error: "+$),!1}W||typeof WebAssembly.instantiateStreaming!="function"||we(Le)||Ce(Le)||typeof fetch!="function"?pt(it):fetch(Le,{credentials:"same-origin"}).then(function($){return WebAssembly.instantiateStreaming($,ke).then(it,function(oe){return z("wasm streaming compile failed: "+oe),z("falling back to ArrayBuffer instantiation"),pt(it)})})}(),E.___wasm_call_ctors=function(){return(E.___wasm_call_ctors=E.asm.d).apply(null,arguments)},E._argon2_hash=function(){return(E._argon2_hash=E.asm.e).apply(null,arguments)},E._malloc=function(){return(kt=E._malloc=E.asm.f).apply(null,arguments)}),mt=(E._free=function(){return(E._free=E.asm.g).apply(null,arguments)},E._argon2_verify=function(){return(E._argon2_verify=E.asm.h).apply(null,arguments)},E._argon2_error_message=function(){return(E._argon2_error_message=E.asm.i).apply(null,arguments)},E._argon2_encodedlen=function(){return(E._argon2_encodedlen=E.asm.j).apply(null,arguments)},E._argon2_hash_ext=function(){return(E._argon2_hash_ext=E.asm.l).apply(null,arguments)},E._argon2_verify_ext=function(){return(E._argon2_verify_ext=E.asm.m).apply(null,arguments)},E.stackAlloc=function(){return(mt=E.stackAlloc=E.asm.n).apply(null,arguments)});function wt(ke){this.name="ExitStatus",this.message="Program terminated with exit("+ke+")",this.status=ke}function Gt(ke){function He(){dt||(dt=!0,E.calledRun=!0,G||(Ke(ge),E.onRuntimeInitialized&&E.onRuntimeInitialized(),function(){if(E.postRun)for(typeof E.postRun=="function"&&(E.postRun=[E.postRun]);E.postRun.length;)it=E.postRun.shift(),je.unshift(it);var it;Ke(je)}()))}P>0||(function(){if(E.preRun)for(typeof E.preRun=="function"&&(E.preRun=[E.preRun]);E.preRun.length;)it=E.preRun.shift(),le.unshift(it);var it;Ke(le)}(),P>0||(E.setStatus?(E.setStatus("Running..."),setTimeout(function(){setTimeout(function(){E.setStatus("")},1),He()},1)):He()))}if(E.allocate=function(ke,He){var it;return it=He==1?mt(ke.length):kt(ke.length),ke.subarray||ke.slice?Z.set(ke,it):Z.set(new Uint8Array(ke),it),it},E.UTF8ToString=function(ke,He){return ke?function(it,pt,$){for(var oe=pt+$,Ee=pt;it[Ee]&&!(Ee>=oe);)++Ee;if(Ee-pt>16&&it.subarray&&ce)return ce.decode(it.subarray(pt,Ee));for(var Fe="";pt<Ee;){var _e=it[pt++];if(128&_e){var Ue=63&it[pt++];if((224&_e)!=192){var qe=63&it[pt++];if((_e=(240&_e)==224?(15&_e)<<12|Ue<<6|qe:(7&_e)<<18|Ue<<12|qe<<6|63&it[pt++])<65536)Fe+=String.fromCharCode(_e);else{var M=_e-65536;Fe+=String.fromCharCode(55296|M>>10,56320|1023&M)}}else Fe+=String.fromCharCode((31&_e)<<6|Ue)}else Fe+=String.fromCharCode(_e)}return Fe}(Z,ke,He):""},E.ALLOC_NORMAL=0,q=function ke(){dt||Gt(),dt||(q=ke)},E.run=Gt,E.preInit)for(typeof E.preInit=="function"&&(E.preInit=[E.preInit]);E.preInit.length>0;)E.preInit.pop()();Gt(),d.exports=E,E.unloadRuntime=function(){typeof self<"u"&&delete self.Module,E=J=X=ae=Z=void 0,delete d.exports}},631:function(d,A,h){var y,E;(E=typeof(y=function(){const C=typeof self<"u"?self:this,x={Argon2d:0,Argon2i:1,Argon2id:2};function N(B){if(N._promise)return N._promise;if(N._module)return Promise.resolve(N._module);let F;return F=C.process&&C.process.versions&&C.process.versions.node?I().then(Q=>new Promise(V=>{Q.postRun=()=>V(Q)})):(C.loadArgon2WasmBinary?C.loadArgon2WasmBinary():Promise.resolve(h(721)).then(Q=>function(V){const W=atob(V),J=new Uint8Array(new ArrayBuffer(W.length));for(let z=0;z<W.length;z++)J[z]=W.charCodeAt(z);return J}(Q))).then(Q=>function(V,W){return new Promise(J=>(C.Module={wasmBinary:V,wasmMemory:W,postRun(){J(Module)}},I()))}(Q,B?function(V){const G=Math.min(Math.max(Math.ceil(V*1024/65536),256)+256,32767);return new WebAssembly.Memory({initial:G,maximum:32767})}(B):void 0)),N._promise=F,F.then(Q=>(N._module=Q,delete N._promise,Q))}function I(){return C.loadArgon2WasmModule?C.loadArgon2WasmModule():Promise.resolve(h(773))}function k(B,F){return B.allocate(F,"i8",B.ALLOC_NORMAL)}function S(B,F){return k(B,new Uint8Array([...F,0]))}function U(B){if(typeof B!="string")return B;if(typeof TextEncoder=="function")return new TextEncoder().encode(B);if(typeof Buffer=="function")return Buffer.from(B);throw new Error("Don't know how to encode UTF8")}return{ArgonType:x,hash:function(B){const F=B.mem||1024;return N(F).then(Q=>{const V=B.time||1,W=B.parallelism||1,J=U(B.pass),z=S(Q,J),G=J.length,Y=U(B.salt),ae=S(Q,Y),Z=Y.length,ce=B.type||x.Argon2d,pe=Q.allocate(new Array(B.hashLen||24),"i8",Q.ALLOC_NORMAL),X=B.secret?k(Q,B.secret):0,le=B.secret?B.secret.byteLength:0,ge=B.ad?k(Q,B.ad):0,je=B.ad?B.ad.byteLength:0,P=B.hashLen||24,q=Q._argon2_encodedlen(V,F,W,Z,P,ce),se=Q.allocate(new Array(q+1),"i8",Q.ALLOC_NORMAL);let we,Ce,Be;try{Ce=Q._argon2_hash_ext(V,F,W,z,G,ae,Z,pe,P,se,q,ce,X,le,ge,je,19)}catch(Le){we=Le}if(Ce!==0||we){try{we||(we=Q.UTF8ToString(Q._argon2_error_message(Ce)))}catch{}Be={message:we,code:Ce}}else{let Le="";const Je=new Uint8Array(P);for(let Ke=0;Ke<P;Ke++){const We=Q.HEAP8[pe+Ke];Je[Ke]=We,Le+=("0"+(255&We).toString(16)).slice(-2)}Be={hash:Je,hashHex:Le,encoded:Q.UTF8ToString(se)}}try{Q._free(z),Q._free(ae),Q._free(pe),Q._free(se),ge&&Q._free(ge),X&&Q._free(X)}catch{}if(we)throw Be;return Be})},verify:function(B){return N().then(F=>{const Q=U(B.pass),V=S(F,Q),W=Q.length,J=B.secret?k(F,B.secret):0,z=B.secret?B.secret.byteLength:0,G=B.ad?k(F,B.ad):0,Y=B.ad?B.ad.byteLength:0,ae=S(F,U(B.encoded));let Z,ce,pe,X=B.type;if(X===void 0){let le=B.encoded.split("$")[1];le&&(le=le.replace("a","A"),X=x[le]||x.Argon2d)}try{ce=F._argon2_verify_ext(ae,V,W,J,z,G,Y,X)}catch(le){Z=le}if(ce||Z){try{Z||(Z=F.UTF8ToString(F._argon2_error_message(ce)))}catch{}pe={message:Z,code:ce}}try{F._free(V),F._free(ae)}catch{}if(Z)throw pe;return pe})},unloadRuntime:function(){N._module&&(N._module.unloadRuntime(),delete N._promise,delete N._module)}}})=="function"?y.apply(A,[]):y)===void 0||(d.exports=E)},721:function(d,A){d.exports=" "},145:()=>{},967:()=>{}},l={};function c(d){var A=l[d];if(A!==void 0)return A.exports;var h=l[d]={exports:{}};return o[d].call(h.exports,h,h.exports,c),h.exports}return i=Object.getPrototypeOf?d=>Object.getPrototypeOf(d):d=>d.__proto__,c.t=function(d,A){if(1&A&&(d=this(d)),8&A||typeof d=="object"&&d&&(4&A&&d.__esModule||16&A&&typeof d.then=="function"))return d;var h=Object.create(null);c.r(h);var y={};r=r||[null,i({}),i([]),i(i)];for(var E=2&A&&d;typeof E=="object"&&!~r.indexOf(E);E=i(E))Object.getOwnPropertyNames(E).forEach(C=>y[C]=()=>d[C]);return y.default=()=>d,c.d(h,y),h},c.d=(d,A)=>{for(var h in A)c.o(A,h)&&!c.o(d,h)&&Object.defineProperty(d,h,{enumerable:!0,get:A[h]})},c.o=(d,A)=>Object.prototype.hasOwnProperty.call(d,A),c.r=d=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})},c(631)})()})}(nc)),nc.exports}var Y1=q1();const Sb=Zr(Y1);class Ut{static async deriveKeyFromPassword(t,r,i="Argon2Id",o='{"Iterations":2,"MemorySize":19456,"DegreeOfParallelism":1}'){const l=JSON.parse(o);try{if(i!=="Argon2Id")throw new Error("Unsupported encryption type");return(await Sb.hash({pass:t,salt:r,time:l.Iterations,mem:l.MemorySize,parallelism:l.DegreeOfParallelism,hashLen:32,type:2})).hash}catch(c){throw console.error("Argon2 hashing failed:",c),c}}static async symmetricEncrypt(t,r){if(!t)return t;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(r),h=>h.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["encrypt"]),o=crypto.getRandomValues(new Uint8Array(12)),c=new TextEncoder().encode(t),d=await crypto.subtle.encrypt({name:"AES-GCM",iv:o},i,c),A=new Uint8Array(o.length+d.byteLength);return A.set(o,0),A.set(new Uint8Array(d),o.length),btoa(Array.from(A).map(h=>String.fromCharCode(h)).join(""))}static async symmetricDecrypt(t,r){if(!t)return t;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(r),h=>h.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),o=Uint8Array.from(atob(t),h=>h.charCodeAt(0)),l=o.slice(0,12),c=o.slice(12),d=await crypto.subtle.decrypt({name:"AES-GCM",iv:l},i,c);return new TextDecoder().decode(d)}static async symmetricDecryptBytes(t,r){if(!t||t.length===0)return t;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(r),d=>d.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),o=t.slice(0,12),l=t.slice(12),c=await crypto.subtle.decrypt({name:"AES-GCM",iv:o},i,l);return new Uint8Array(c)}static async generateRsaKeyPair(){const t=await crypto.subtle.generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!0,["encrypt","decrypt"]),r=await crypto.subtle.exportKey("jwk",t.publicKey),i=await crypto.subtle.exportKey("jwk",t.privateKey);return{publicKey:JSON.stringify(r),privateKey:JSON.stringify(i)}}static async encryptWithPublicKey(t,r){const i=await crypto.subtle.importKey("jwk",JSON.parse(r),{name:"RSA-OAEP",hash:"SHA-256"},!1,["encrypt"]),o=new TextEncoder().encode(t),l=await crypto.subtle.encrypt({name:"RSA-OAEP"},i,o);return btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(l))))}static async decryptWithPrivateKey(t,r){try{const i=await crypto.subtle.importKey("jwk",JSON.parse(r),{name:"RSA-OAEP",hash:"SHA-256"},!0,["decrypt"]),o=Uint8Array.from(atob(t),c=>c.charCodeAt(0)),l=await crypto.subtle.decrypt({name:"RSA-OAEP"},i,o);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(t,r){try{const i=r.find(d=>d.PublicKey===t.encryptionKey);if(!i)throw new Error("Encryption key not found");const o=await Ut.decryptWithPrivateKey(t.encryptedSymmetricKey,i.PrivateKey),l=Wr.Buffer.from(o).toString("base64"),c={...t};return c.subject=await Ut.symmetricDecrypt(t.subject,l),c.fromDisplay=await Ut.symmetricDecrypt(t.fromDisplay,l),c.fromDomain=await Ut.symmetricDecrypt(t.fromDomain,l),c.fromLocal=await Ut.symmetricDecrypt(t.fromLocal,l),t.messageHtml&&(c.messageHtml=await Ut.symmetricDecrypt(t.messageHtml,l)),t.messagePlain&&(c.messagePlain=await Ut.symmetricDecrypt(t.messagePlain,l)),c}catch(i){throw new Error(i instanceof Error?i.message:"Failed to decrypt email")}}static async decryptEmailList(t,r){return Promise.all(t.map(async i=>{try{const o=r.find(A=>A.PublicKey===i.encryptionKey);if(!o)throw new Error("Encryption key not found");const l=await Ut.decryptWithPrivateKey(i.encryptedSymmetricKey,o.PrivateKey),c=Wr.Buffer.from(l).toString("base64"),d={...i};return d.subject=await Ut.symmetricDecrypt(i.subject,c),d.fromDisplay=await Ut.symmetricDecrypt(i.fromDisplay,c),d.fromDomain=await Ut.symmetricDecrypt(i.fromDomain,c),d.fromLocal=await Ut.symmetricDecrypt(i.fromLocal,c),i.messagePreview&&(d.messagePreview=await Ut.symmetricDecrypt(i.messagePreview,c)),d}catch(o){throw new Error(o instanceof Error?o.message:"Failed to decrypt email")}}))}static async decryptAttachment(t,r,i){try{const o=i.find(d=>d.PublicKey===r.encryptionKey);if(!o)throw new Error("Encryption key not found");const l=await Ut.decryptWithPrivateKey(r.encryptedSymmetricKey,o.PrivateKey),c=Wr.Buffer.from(l).toString("base64");return await Ut.symmetricDecryptBytes(t,c)}catch(o){throw new Error(o instanceof Error?o.message:"Failed to decrypt attachment")}}}const J1="modulepreload",W1=function(n){return"/"+n},Gp={},Kp=function(t,r,i){let o=Promise.resolve();if(r&&r.length>0){let c=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(E=>({status:"fulfilled",value:E}),E=>({status:"rejected",reason:E}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),A=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(r.map(h=>{if(h=W1(h),h in Gp)return;Gp[h]=!0;const y=h.endsWith(".css"),E=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${E}`))return;const C=document.createElement("link");if(C.rel=y?"stylesheet":J1,y||(C.as="script"),C.crossOrigin="",C.href=h,A&&C.setAttribute("nonce",A),document.head.appendChild(C),y)return new Promise((x,N)=>{C.addEventListener("load",x),C.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return o.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};var ch={exports:{}};const X1={},$1=Object.freeze(Object.defineProperty({__proto__:null,default:X1},Symbol.toStringTag,{value:"Module"})),qp=hC($1);var Yp;function Z1(){return Yp||(Yp=1,function(n,t){var r=void 0,i=function(o){return r||(r=new Promise(function(l,c){var d=typeof o<"u"?o:{},A=d.onAbort;d.onAbort=function(m){c(new Error(m)),A&&A(m)},d.postRun=d.postRun||[],d.postRun.push(function(){l(d)}),n=void 0;var h;h||(h=typeof d<"u"?d:{});var y=typeof window=="object",E=typeof WorkerGlobalScope<"u",C=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";h.onRuntimeInitialized=function(){function m(de,Me){switch(typeof Me){case"boolean":sd(de,Me?1:0);break;case"number":nd(de,Me);break;case"string":rd(de,Me,-1,-1);break;case"object":if(Me===null)Pl(de);else if(Me.length!=null){var Ze=H(Me,j);id(de,Ze,Me.length,-1),oa(Ze)}else oi(de,"Wrong API use : tried to return a value of an unknown type ("+Me+").",-1);break;default:Pl(de)}}function b(de,Me){for(var Ze=[],st=0;st<de;st+=1){var lt=kt(Me+4*st,"i32"),Lt=_l(lt);if(Lt===1||Lt===2)lt=ad(lt);else if(Lt===3)lt=ed(lt);else if(Lt===4){Lt=lt,lt=Zc(Lt),Lt=td(Lt);for(var bn=new Uint8Array(lt),un=0;un<lt;un+=1)bn[un]=G[Lt+un];lt=bn}else lt=null;Ze.push(lt)}return Ze}function D(de,Me){this.Qa=de,this.db=Me,this.Oa=1,this.lb=[]}function _(de,Me){if(this.db=Me,Me=qe(de)+1,this.eb=ka(Me),this.eb===null)throw Error("Unable to allocate memory for the SQL string");M(de,Y,this.eb,Me),this.kb=this.eb,this.Za=this.pb=null}function te(de){if(this.filename="dbfile_"+(4294967295*Math.random()>>>0),de!=null){var Me=this.filename,Ze="/",st=Me;if(Ze&&(Ze=typeof Ze=="string"?Ze:ei(Ze),st=Me?pt(Ze+"/"+Me):Ze),Me=Ie(!0,!0),st=qn(st,Me),de){if(typeof de=="string"){Ze=Array(de.length);for(var lt=0,Lt=de.length;lt<Lt;++lt)Ze[lt]=de.charCodeAt(lt);de=Ze}Ka(st,Me|146),Ze=Yn(st,577),xs(Ze,de,0,de.length,0),Dn(Ze),Ka(st,Me)}}this.handleError($e(this.filename,fe)),this.db=kt(fe,"i32"),Fl(this.db),this.fb={},this.Sa={}}var fe=Zt(4),ve=h.cwrap,$e=ve("sqlite3_open","number",["string","number"]),yt=ve("sqlite3_close_v2","number",["number"]),At=ve("sqlite3_exec","number",["number","string","number","number","number"]),ea=ve("sqlite3_changes","number",["number"]),Ma=ve("sqlite3_prepare_v2","number",["number","string","number","number","number"]),Is=ve("sqlite3_sql","string",["number"]),Ki=ve("sqlite3_normalized_sql","string",["number"]),qi=ve("sqlite3_prepare_v2","number",["number","number","number","number","number"]),Ml=ve("sqlite3_bind_text","number",["number","number","number","number","number"]),jl=ve("sqlite3_bind_blob","number",["number","number","number","number","number"]),Fc=ve("sqlite3_bind_double","number",["number","number","number"]),Qc=ve("sqlite3_bind_int","number",["number","number","number"]),bo=ve("sqlite3_bind_parameter_index","number",["number","string"]),Hc=ve("sqlite3_step","number",["number"]),zc=ve("sqlite3_errmsg","string",["number"]),Vc=ve("sqlite3_column_count","number",["number"]),Gc=ve("sqlite3_data_count","number",["number"]),Kc=ve("sqlite3_column_double","number",["number","number"]),wo=ve("sqlite3_column_text","string",["number","number"]),qc=ve("sqlite3_column_blob","number",["number","number"]),Yc=ve("sqlite3_column_bytes","number",["number","number"]),Jc=ve("sqlite3_column_type","number",["number","number"]),Wc=ve("sqlite3_column_name","string",["number","number"]),vo=ve("sqlite3_reset","number",["number"]),Xc=ve("sqlite3_clear_bindings","number",["number"]),$c=ve("sqlite3_finalize","number",["number"]),Ol=ve("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),_l=ve("sqlite3_value_type","number",["number"]),Zc=ve("sqlite3_value_bytes","number",["number"]),ed=ve("sqlite3_value_text","string",["number"]),td=ve("sqlite3_value_blob","number",["number"]),ad=ve("sqlite3_value_double","number",["number"]),nd=ve("sqlite3_result_double","",["number","number"]),Pl=ve("sqlite3_result_null","",["number"]),rd=ve("sqlite3_result_text","",["number","string","number","number"]),id=ve("sqlite3_result_blob","",["number","number","number","number"]),sd=ve("sqlite3_result_int","",["number","number"]),oi=ve("sqlite3_result_error","",["number","string","number"]),li=ve("sqlite3_aggregate_context","number",["number","number"]),Fl=ve("RegisterExtensionFunctions","number",["number"]),Co=ve("sqlite3_update_hook","number",["number","number","number"]);D.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},D.prototype.step=function(){if(!this.Qa)throw"Statement closed";this.Oa=1;var de=Hc(this.Qa);switch(de){case 100:return!0;case 101:return!1;default:throw this.db.handleError(de)}},D.prototype.wb=function(de){return de==null&&(de=this.Oa,this.Oa+=1),Kc(this.Qa,de)},D.prototype.Gb=function(de){if(de==null&&(de=this.Oa,this.Oa+=1),de=wo(this.Qa,de),typeof BigInt!="function")throw Error("BigInt is not supported");return BigInt(de)},D.prototype.Hb=function(de){return de==null&&(de=this.Oa,this.Oa+=1),wo(this.Qa,de)},D.prototype.getBlob=function(de){de==null&&(de=this.Oa,this.Oa+=1);var Me=Yc(this.Qa,de);de=qc(this.Qa,de);for(var Ze=new Uint8Array(Me),st=0;st<Me;st+=1)Ze[st]=G[de+st];return Ze},D.prototype.get=function(de,Me){Me=Me||{},de!=null&&this.bind(de)&&this.step(),de=[];for(var Ze=Gc(this.Qa),st=0;st<Ze;st+=1)switch(Jc(this.Qa,st)){case 1:var lt=Me.useBigInt?this.Gb(st):this.wb(st);de.push(lt);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},D.prototype.getColumnNames=function(){for(var de=[],Me=Vc(this.Qa),Ze=0;Ze<Me;Ze+=1)de.push(Wc(this.Qa,Ze));return de},D.prototype.getAsObject=function(de,Me){de=this.get(de,Me),Me=this.getColumnNames();for(var Ze={},st=0;st<Me.length;st+=1)Ze[Me[st]]=de[st];return Ze},D.prototype.getSQL=function(){return Is(this.Qa)},D.prototype.getNormalizedSQL=function(){return Ki(this.Qa)},D.prototype.run=function(de){return de!=null&&this.bind(de),this.step(),this.reset()},D.prototype.sb=function(de,Me){Me==null&&(Me=this.Oa,this.Oa+=1),de=w(de);var Ze=H(de,j);this.lb.push(Ze),this.db.handleError(Ml(this.Qa,Me,Ze,de.length-1,0))},D.prototype.Bb=function(de,Me){Me==null&&(Me=this.Oa,this.Oa+=1);var Ze=H(de,j);this.lb.push(Ze),this.db.handleError(jl(this.Qa,Me,Ze,de.length,0))},D.prototype.rb=function(de,Me){Me==null&&(Me=this.Oa,this.Oa+=1),this.db.handleError((de===(de|0)?Qc:Fc)(this.Qa,Me,de))},D.prototype.Eb=function(de){de==null&&(de=this.Oa,this.Oa+=1),jl(this.Qa,de,0,0,0)},D.prototype.tb=function(de,Me){switch(Me==null&&(Me=this.Oa,this.Oa+=1),typeof de){case"string":this.sb(de,Me);return;case"number":this.rb(de,Me);return;case"bigint":this.sb(de.toString(),Me);return;case"boolean":this.rb(de+0,Me);return;case"object":if(de===null){this.Eb(Me);return}if(de.length!=null){this.Bb(de,Me);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+de+")."},D.prototype.Db=function(de){var Me=this;return Object.keys(de).forEach(function(Ze){var st=bo(Me.Qa,Ze);st!==0&&Me.tb(de[Ze],st)}),!0},D.prototype.Cb=function(de){for(var Me=0;Me<de.length;Me+=1)this.tb(de[Me],Me+1);return!0},D.prototype.reset=function(){return this.freemem(),Xc(this.Qa)===0&&vo(this.Qa)===0},D.prototype.freemem=function(){for(var de;(de=this.lb.pop())!==void 0;)oa(de)},D.prototype.free=function(){this.freemem();var de=$c(this.Qa)===0;return delete this.db.fb[this.Qa],this.Qa=0,de},_.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=qa(),Me=Zt(4);wt(fe),wt(Me);try{this.db.handleError(qi(this.db.db,this.kb,-1,fe,Me)),this.kb=kt(Me,"i32");var Ze=kt(fe,"i32");return Ze===0?(this.mb(),{done:!0}):(this.Za=new D(Ze,this.db),this.db.fb[Ze]=this.Za,{value:this.Za,done:!1})}catch(st){throw this.pb=He(this.kb),this.mb(),st}finally{zt(de)}},_.prototype.mb=function(){oa(this.eb),this.eb=null},_.prototype.getRemainingSQL=function(){return this.pb!==null?this.pb:He(this.kb)},typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"&&(_.prototype[Symbol.iterator]=function(){return this}),te.prototype.run=function(de,Me){if(!this.db)throw"Database closed";if(Me){de=this.prepare(de,Me);try{de.step()}finally{de.free()}}else this.handleError(At(this.db,de,0,0,fe));return this},te.prototype.exec=function(de,Me,Ze){if(!this.db)throw"Database closed";var st=qa(),lt=null;try{var Lt=Tr(de),bn=Zt(4);for(de=[];kt(Lt,"i8")!==0;){wt(fe),wt(bn),this.handleError(qi(this.db,Lt,-1,fe,bn));var un=kt(fe,"i32");if(Lt=kt(bn,"i32"),un!==0){var Ya=null;for(lt=new D(un,this),Me!=null&&lt.bind(Me);lt.step();)Ya===null&&(Ya={columns:lt.getColumnNames(),values:[]},de.push(Ya)),Ya.values.push(lt.get(null,Ze));lt.free()}}return de}catch(cn){throw lt&&lt.free(),cn}finally{zt(st)}},te.prototype.each=function(de,Me,Ze,st,lt){typeof Me=="function"&&(st=Ze,Ze=Me,Me=void 0),de=this.prepare(de,Me);try{for(;de.step();)Ze(de.getAsObject(null,lt))}finally{de.free()}if(typeof st=="function")return st()},te.prototype.prepare=function(de,Me){if(wt(fe),this.handleError(Ma(this.db,de,-1,fe,0)),de=kt(fe,"i32"),de===0)throw"Nothing to prepare";var Ze=new D(de,this);return Me!=null&&Ze.bind(Me),this.fb[de]=Ze},te.prototype.iterateStatements=function(de){return new _(de,this)},te.prototype.export=function(){Object.values(this.fb).forEach(function(Me){Me.free()}),Object.values(this.Sa).forEach(Qe),this.Sa={},this.handleError(yt(this.db));var de=Ns(this.filename);return this.handleError($e(this.filename,fe)),this.db=kt(fe,"i32"),Fl(this.db),de},te.prototype.close=function(){this.db!==null&&(Object.values(this.fb).forEach(function(de){de.free()}),Object.values(this.Sa).forEach(Qe),this.Sa={},this.Ya&&(Qe(this.Ya),this.Ya=void 0),this.handleError(yt(this.db)),Cs("/"+this.filename),this.db=null)},te.prototype.handleError=function(de){if(de===0)return null;throw de=zc(this.db),Error(de)},te.prototype.getRowsModified=function(){return ea(this.db)},te.prototype.create_function=function(de,Me){Object.prototype.hasOwnProperty.call(this.Sa,de)&&(Qe(this.Sa[de]),delete this.Sa[de]);var Ze=Ge(function(st,lt,Lt){lt=b(lt,Lt);try{var bn=Me.apply(null,lt)}catch(un){oi(st,un,-1);return}m(st,bn)},"viii");return this.Sa[de]=Ze,this.handleError(Ol(this.db,de,Me.length,1,0,Ze,0,0,0)),this},te.prototype.create_aggregate=function(de,Me){var Ze=Me.init||function(){return null},st=Me.finalize||function(Ya){return Ya},lt=Me.step;if(!lt)throw"An aggregate function must have a step function in "+de;var Lt={};Object.hasOwnProperty.call(this.Sa,de)&&(Qe(this.Sa[de]),delete this.Sa[de]),Me=de+"__finalize",Object.hasOwnProperty.call(this.Sa,Me)&&(Qe(this.Sa[Me]),delete this.Sa[Me]);var bn=Ge(function(Ya,cn,Br){var wn=li(Ya,1);Object.hasOwnProperty.call(Lt,wn)||(Lt[wn]=Ze()),cn=b(cn,Br),cn=[Lt[wn]].concat(cn);try{Lt[wn]=lt.apply(null,cn)}catch(od){delete Lt[wn],oi(Ya,od,-1)}},"viii"),un=Ge(function(Ya){var cn=li(Ya,1);try{var Br=st(Lt[cn])}catch(wn){delete Lt[cn],oi(Ya,wn,-1);return}m(Ya,Br),delete Lt[cn]},"vi");return this.Sa[de]=bn,this.Sa[Me]=un,this.handleError(Ol(this.db,de,lt.length-1,1,0,0,bn,un,0)),this},te.prototype.updateHook=function(de){this.Ya&&(Co(this.db,0,0),Qe(this.Ya),this.Ya=void 0),de&&(this.Ya=Ge(function(Me,Ze,st,lt,Lt){switch(Ze){case 18:Me="insert";break;case 23:Me="update";break;case 9:Me="delete";break;default:throw"unknown operationCode in updateHook callback: "+Ze}if(st=st?ke(Y,st):"",lt=lt?ke(Y,lt):"",Lt>Number.MAX_SAFE_INTEGER)throw"rowId too big to fit inside a Number";de(Me,st,lt,Number(Lt))},"viiiij"),Co(this.db,this.Ya,0))},h.Database=te};var x={...h},N="./this.program",I=(m,b)=>{throw b},k="",S,U;if(C){var B=qp;k=__dirname+"/",U=m=>(m=ge(m)?new URL(m):m,B.readFileSync(m)),S=async m=>(m=ge(m)?new URL(m):m,B.readFileSync(m,void 0)),!h.thisProgram&&1<process.argv.length&&(N=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),n.exports=h,I=(m,b)=>{throw process.exitCode=m,b}}else(y||E)&&(E?k=self.location.href:typeof document<"u"&&document.currentScript&&(k=document.currentScript.src),k=k.startsWith("blob:")?"":k.slice(0,k.replace(/[?#].*/,"").lastIndexOf("/")+1),E&&(U=m=>{var b=new XMLHttpRequest;return b.open("GET",m,!1),b.responseType="arraybuffer",b.send(null),new Uint8Array(b.response)}),S=async m=>{if(ge(m))return new Promise((D,_)=>{var te=new XMLHttpRequest;te.open("GET",m,!0),te.responseType="arraybuffer",te.onload=()=>{te.status==200||te.status==0&&te.response?D(te.response):_(te.status)},te.onerror=_,te.send(null)});var b=await fetch(m,{credentials:"same-origin"});if(b.ok)return b.arrayBuffer();throw Error(b.status+" : "+b.url)});var F=h.print||console.log.bind(console),Q=h.printErr||console.error.bind(console);Object.assign(h,x),x=null,h.thisProgram&&(N=h.thisProgram);var V=h.wasmBinary,W,J=!1,z,G,Y,ae,Z,ce,pe,X,le,ge=m=>m.startsWith("file://");function je(){var m=W.buffer;h.HEAP8=G=new Int8Array(m),h.HEAP16=ae=new Int16Array(m),h.HEAPU8=Y=new Uint8Array(m),h.HEAPU16=new Uint16Array(m),h.HEAP32=Z=new Int32Array(m),h.HEAPU32=ce=new Uint32Array(m),h.HEAPF32=pe=new Float32Array(m),h.HEAPF64=le=new Float64Array(m),h.HEAP64=X=new BigInt64Array(m),h.HEAPU64=new BigUint64Array(m)}var P=0,q=null;function se(m){var b;throw(b=h.onAbort)==null||b.call(h,m),m="Aborted("+m+")",Q(m),J=!0,new WebAssembly.RuntimeError(m+". Build with -sASSERTIONS for more info.")}var we;async function Ce(m){if(!V)try{var b=await S(m);return new Uint8Array(b)}catch{}if(m==we&&V)m=new Uint8Array(V);else if(U)m=U(m);else throw"both async and sync fetching of the wasm failed";return m}async function Be(m,b){try{var D=await Ce(m);return await WebAssembly.instantiate(D,b)}catch(_){Q(`failed to asynchronously prepare wasm: ${_}`),se(_)}}async function Le(m){var b=we;if(!V&&typeof WebAssembly.instantiateStreaming=="function"&&!ge(b)&&!C)try{var D=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(D,m)}catch(_){Q(`wasm streaming compile failed: ${_}`),Q("falling back to ArrayBuffer instantiation")}return Be(b,m)}class Je{constructor(b){Ot(this,"name","ExitStatus");this.message=`Program terminated with exit(${b})`,this.status=b}}var Ke=m=>{for(;0<m.length;)m.shift()(h)},We=[],dt=[],fa=()=>{var m=h.preRun.shift();dt.unshift(m)};function kt(m,b="i8"){switch(b.endsWith("*")&&(b="*"),b){case"i1":return G[m];case"i8":return G[m];case"i16":return ae[m>>1];case"i32":return Z[m>>2];case"i64":return X[m>>3];case"float":return pe[m>>2];case"double":return le[m>>3];case"*":return ce[m>>2];default:se(`invalid type for getValue: ${b}`)}}var mt=h.noExitRuntime||!0;function wt(m){var b="i32";switch(b.endsWith("*")&&(b="*"),b){case"i1":G[m]=0;break;case"i8":G[m]=0;break;case"i16":ae[m>>1]=0;break;case"i32":Z[m>>2]=0;break;case"i64":X[m>>3]=BigInt(0);break;case"float":pe[m>>2]=0;break;case"double":le[m>>3]=0;break;case"*":ce[m>>2]=0;break;default:se(`invalid type for setValue: ${b}`)}}var Gt=typeof TextDecoder<"u"?new TextDecoder:void 0,ke=(m,b=0,D=NaN)=>{var _=b+D;for(D=b;m[D]&&!(D>=_);)++D;if(16<D-b&&m.buffer&&Gt)return Gt.decode(m.subarray(b,D));for(_="";b<D;){var te=m[b++];if(te&128){var fe=m[b++]&63;if((te&224)==192)_+=String.fromCharCode((te&31)<<6|fe);else{var ve=m[b++]&63;te=(te&240)==224?(te&15)<<12|fe<<6|ve:(te&7)<<18|fe<<12|ve<<6|m[b++]&63,65536>te?_+=String.fromCharCode(te):(te-=65536,_+=String.fromCharCode(55296|te>>10,56320|te&1023))}}else _+=String.fromCharCode(te)}return _},He=(m,b)=>m?ke(Y,m,b):"",it=(m,b)=>{for(var D=0,_=m.length-1;0<=_;_--){var te=m[_];te==="."?m.splice(_,1):te===".."?(m.splice(_,1),D++):D&&(m.splice(_,1),D--)}if(b)for(;D;D--)m.unshift("..");return m},pt=m=>{var b=m.charAt(0)==="/",D=m.slice(-1)==="/";return(m=it(m.split("/").filter(_=>!!_),!b).join("/"))||b||(m="."),m&&D&&(m+="/"),(b?"/":"")+m},$=m=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(m).slice(1);return m=b[0],b=b[1],!m&&!b?".":(b&&(b=b.slice(0,-1)),m+b)},oe=m=>m&&m.match(/([^\/]+|\/)\/*$/)[1],Ee=()=>{if(C){var m=qp;return b=>m.randomFillSync(b)}return b=>crypto.getRandomValues(b)},Fe=m=>{(Fe=Ee())(m)},_e=(...m)=>{for(var b="",D=!1,_=m.length-1;-1<=_&&!D;_--){if(D=0<=_?m[_]:"/",typeof D!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!D)return"";b=D+"/"+b,D=D.charAt(0)==="/"}return b=it(b.split("/").filter(te=>!!te),!D).join("/"),(D?"/":"")+b||"."},Ue=[],qe=m=>{for(var b=0,D=0;D<m.length;++D){var _=m.charCodeAt(D);127>=_?b++:2047>=_?b+=2:55296<=_&&57343>=_?(b+=4,++D):b+=3}return b},M=(m,b,D,_)=>{if(!(0<_))return 0;var te=D;_=D+_-1;for(var fe=0;fe<m.length;++fe){var ve=m.charCodeAt(fe);if(55296<=ve&&57343>=ve){var $e=m.charCodeAt(++fe);ve=65536+((ve&1023)<<10)|$e&1023}if(127>=ve){if(D>=_)break;b[D++]=ve}else{if(2047>=ve){if(D+1>=_)break;b[D++]=192|ve>>6}else{if(65535>=ve){if(D+2>=_)break;b[D++]=224|ve>>12}else{if(D+3>=_)break;b[D++]=240|ve>>18,b[D++]=128|ve>>12&63}b[D++]=128|ve>>6&63}b[D++]=128|ve&63}}return b[D]=0,D-te},w=(m,b)=>{var D=Array(qe(m)+1);return m=M(m,D,0,D.length),b&&(D.length=m),D},v=[];function K(m,b){v[m]={input:[],output:[],cb:b},$t(m,ne)}var ne={open(m){var b=v[m.node.rdev];if(!b)throw new ze(43);m.tty=b,m.seekable=!1},close(m){m.tty.cb.fsync(m.tty)},fsync(m){m.tty.cb.fsync(m.tty)},read(m,b,D,_){if(!m.tty||!m.tty.cb.xb)throw new ze(60);for(var te=0,fe=0;fe<_;fe++){try{var ve=m.tty.cb.xb(m.tty)}catch{throw new ze(29)}if(ve===void 0&&te===0)throw new ze(6);if(ve==null)break;te++,b[D+fe]=ve}return te&&(m.node.atime=Date.now()),te},write(m,b,D,_){if(!m.tty||!m.tty.cb.qb)throw new ze(60);try{for(var te=0;te<_;te++)m.tty.cb.qb(m.tty,b[D+te])}catch{throw new ze(29)}return _&&(m.node.mtime=m.node.ctime=Date.now()),te}},me={xb(){e:{if(!Ue.length){var m=null;if(C){var b=Buffer.alloc(256),D=0,_=process.stdin.fd;try{D=B.readSync(_,b,0,256)}catch(te){if(te.toString().includes("EOF"))D=0;else throw te}0<D&&(m=b.slice(0,D).toString("utf-8"))}else typeof window<"u"&&typeof window.prompt=="function"&&(m=window.prompt("Input: "),m!==null&&(m+=`
`));if(!m){m=null;break e}Ue=w(m,!0)}m=Ue.shift()}return m},qb(m,b){b===null||b===10?(F(ke(m.output)),m.output=[]):b!=0&&m.output.push(b)},fsync(m){var b;0<((b=m.output)==null?void 0:b.length)&&(F(ke(m.output)),m.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]}},xe={qb(m,b){b===null||b===10?(Q(ke(m.output)),m.output=[]):b!=0&&m.output.push(b)},fsync(m){var b;0<((b=m.output)==null?void 0:b.length)&&(Q(ke(m.output)),m.output=[])}},Pe={Wa:null,Xa(){return Pe.createNode(null,"/",16895,0)},createNode(m,b,D,_){if((D&61440)===24576||(D&61440)===4096)throw new ze(63);return Pe.Wa||(Pe.Wa={dir:{node:{Ta:Pe.La.Ta,Ua:Pe.La.Ua,lookup:Pe.La.lookup,hb:Pe.La.hb,rename:Pe.La.rename,unlink:Pe.La.unlink,rmdir:Pe.La.rmdir,readdir:Pe.La.readdir,symlink:Pe.La.symlink},stream:{Va:Pe.Ma.Va}},file:{node:{Ta:Pe.La.Ta,Ua:Pe.La.Ua},stream:{Va:Pe.Ma.Va,read:Pe.Ma.read,write:Pe.Ma.write,ib:Pe.Ma.ib,jb:Pe.Ma.jb}},link:{node:{Ta:Pe.La.Ta,Ua:Pe.La.Ua,readlink:Pe.La.readlink},stream:{}},ub:{node:{Ta:Pe.La.Ta,Ua:Pe.La.Ua},stream:Kn}}),D=Na(m,b,D,_),na(D.mode)?(D.La=Pe.Wa.dir.node,D.Ma=Pe.Wa.dir.stream,D.Na={}):(D.mode&61440)===32768?(D.La=Pe.Wa.file.node,D.Ma=Pe.Wa.file.stream,D.Ra=0,D.Na=null):(D.mode&61440)===40960?(D.La=Pe.Wa.link.node,D.Ma=Pe.Wa.link.stream):(D.mode&61440)===8192&&(D.La=Pe.Wa.ub.node,D.Ma=Pe.Wa.ub.stream),D.atime=D.mtime=D.ctime=Date.now(),m&&(m.Na[b]=D,m.atime=m.mtime=m.ctime=D.atime),D},Sb(m){return m.Na?m.Na.subarray?m.Na.subarray(0,m.Ra):new Uint8Array(m.Na):new Uint8Array(0)},La:{Ta(m){var b={};return b.dev=(m.mode&61440)===8192?m.id:1,b.ino=m.id,b.mode=m.mode,b.nlink=1,b.uid=0,b.gid=0,b.rdev=m.rdev,na(m.mode)?b.size=4096:(m.mode&61440)===32768?b.size=m.Ra:(m.mode&61440)===40960?b.size=m.link.length:b.size=0,b.atime=new Date(m.atime),b.mtime=new Date(m.mtime),b.ctime=new Date(m.ctime),b.blksize=4096,b.blocks=Math.ceil(b.size/b.blksize),b},Ua(m,b){for(var D of["mode","atime","mtime","ctime"])b[D]!=null&&(m[D]=b[D]);b.size!==void 0&&(b=b.size,m.Ra!=b&&(b==0?(m.Na=null,m.Ra=0):(D=m.Na,m.Na=new Uint8Array(b),D&&m.Na.set(D.subarray(0,Math.min(b,m.Ra))),m.Ra=b)))},lookup(){throw Pe.vb},hb(m,b,D,_){return Pe.createNode(m,b,D,_)},rename(m,b,D){try{var _=Kt(b,D)}catch{}if(_){if(na(m.mode))for(var te in _.Na)throw new ze(55);on(_)}delete m.parent.Na[m.name],b.Na[D]=m,m.name=D,b.ctime=b.mtime=m.parent.ctime=m.parent.mtime=Date.now()},unlink(m,b){delete m.Na[b],m.ctime=m.mtime=Date.now()},rmdir(m,b){var D=Kt(m,b),_;for(_ in D.Na)throw new ze(55);delete m.Na[b],m.ctime=m.mtime=Date.now()},readdir(m){return[".","..",...Object.keys(m.Na)]},symlink(m,b,D){return m=Pe.createNode(m,b,41471,0),m.link=D,m},readlink(m){if((m.mode&61440)!==40960)throw new ze(28);return m.link}},Ma:{read(m,b,D,_,te){var fe=m.node.Na;if(te>=m.node.Ra)return 0;if(m=Math.min(m.node.Ra-te,_),8<m&&fe.subarray)b.set(fe.subarray(te,te+m),D);else for(_=0;_<m;_++)b[D+_]=fe[te+_];return m},write(m,b,D,_,te,fe){if(b.buffer===G.buffer&&(fe=!1),!_)return 0;if(m=m.node,m.mtime=m.ctime=Date.now(),b.subarray&&(!m.Na||m.Na.subarray)){if(fe)return m.Na=b.subarray(D,D+_),m.Ra=_;if(m.Ra===0&&te===0)return m.Na=b.slice(D,D+_),m.Ra=_;if(te+_<=m.Ra)return m.Na.set(b.subarray(D,D+_),te),_}fe=te+_;var ve=m.Na?m.Na.length:0;if(ve>=fe||(fe=Math.max(fe,ve*(1048576>ve?2:1.125)>>>0),ve!=0&&(fe=Math.max(fe,256)),ve=m.Na,m.Na=new Uint8Array(fe),0<m.Ra&&m.Na.set(ve.subarray(0,m.Ra),0)),m.Na.subarray&&b.subarray)m.Na.set(b.subarray(D,D+_),te);else for(fe=0;fe<_;fe++)m.Na[te+fe]=b[D+fe];return m.Ra=Math.max(m.Ra,te+_),_},Va(m,b,D){if(D===1?b+=m.position:D===2&&(m.node.mode&61440)===32768&&(b+=m.node.Ra),0>b)throw new ze(28);return b},ib(m,b,D,_,te){if((m.node.mode&61440)!==32768)throw new ze(43);if(m=m.node.Na,te&2||!m||m.buffer!==G.buffer){te=!0,_=65536*Math.ceil(b/65536);var fe=en(65536,_);if(fe&&Y.fill(0,fe,fe+_),_=fe,!_)throw new ze(48);m&&((0<D||D+b<m.length)&&(m.subarray?m=m.subarray(D,D+b):m=Array.prototype.slice.call(m,D,D+b)),G.set(m,_))}else te=!1,_=m.byteOffset;return{Kb:_,Ab:te}},jb(m,b,D,_){return Pe.Ma.write(m,b,0,_,D,!1),0}}},Ie=(m,b)=>{var D=0;return m&&(D|=365),b&&(D|=146),D},Ye=null,nt={},Xe=[],Jt=1,ft=null,Wt=!1,Xt=!0,yn={},ze=class{constructor(m){Ot(this,"name","ErrnoError");this.Pa=m}},Nr=class{constructor(){Ot(this,"gb",{});Ot(this,"node",null)}get flags(){return this.gb.flags}set flags(m){this.gb.flags=m}get position(){return this.gb.position}set position(m){this.gb.position=m}},nr=class{constructor(m,b,D,_){Ot(this,"La",{});Ot(this,"Ma",{});Ot(this,"ab",null);m||(m=this),this.parent=m,this.Xa=m.Xa,this.id=Jt++,this.name=b,this.mode=D,this.rdev=_,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&365)===365}set read(m){m?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)===146}set write(m){m?this.mode|=146:this.mode&=-147}};function Ua(m,b={}){if(!m)throw new ze(44);b.nb??(b.nb=!0),m.charAt(0)==="/"||(m="//"+m);var D=0;e:for(;40>D;D++){m=m.split("/").filter($e=>!!$e);for(var _=Ye,te="/",fe=0;fe<m.length;fe++){var ve=fe===m.length-1;if(ve&&b.parent)break;if(m[fe]!==".")if(m[fe]==="..")te=$(te),_=_.parent;else{te=pt(te+"/"+m[fe]);try{_=Kt(_,m[fe])}catch($e){if(($e==null?void 0:$e.Pa)===44&&ve&&b.Jb)return{path:te};throw $e}if(!_.ab||ve&&!b.nb||(_=_.ab.root),(_.mode&61440)===40960&&(!ve||b.$a)){if(!_.La.readlink)throw new ze(52);_=_.La.readlink(_),_.charAt(0)==="/"||(_=$(te)+"/"+_),m=_+"/"+m.slice(fe+1).join("/");continue e}}}return{path:te,node:_}}throw new ze(32)}function ei(m){for(var b;;){if(m===m.parent)return m=m.Xa.zb,b?m[m.length-1]!=="/"?`${m}/${b}`:m+b:m;b=b?`${m.name}/${b}`:m.name,m=m.parent}}function Fi(m,b){for(var D=0,_=0;_<b.length;_++)D=(D<<5)-D+b.charCodeAt(_)|0;return(m+D>>>0)%ft.length}function on(m){var b=Fi(m.parent.id,m.name);if(ft[b]===m)ft[b]=m.bb;else for(b=ft[b];b;){if(b.bb===m){b.bb=m.bb;break}b=b.bb}}function Kt(m,b){var D=na(m.mode)?(D=rr(m,"x"))?D:m.La.lookup?0:2:54;if(D)throw new ze(D);for(D=ft[Fi(m.id,b)];D;D=D.bb){var _=D.name;if(D.parent.id===m.id&&_===b)return D}return m.La.lookup(m,b)}function Na(m,b,D,_){return m=new nr(m,b,D,_),b=Fi(m.parent.id,m.name),m.bb=ft[b],ft[b]=m}function na(m){return(m&61440)===16384}function ti(m){var b=["r","w","rw"][m&3];return m&512&&(b+="w"),b}function rr(m,b){if(Xt)return 0;if(!b.includes("r")||m.mode&292){if(b.includes("w")&&!(m.mode&146)||b.includes("x")&&!(m.mode&73))return 2}else return 2;return 0}function vs(m,b){if(!na(m.mode))return 54;try{return Kt(m,b),20}catch{}return rr(m,"wx")}function Qi(m,b,D){try{var _=Kt(m,b)}catch(te){return te.Pa}if(m=rr(m,"wx"))return m;if(D){if(!na(_.mode))return 54;if(_===_.parent||ei(_)==="/")return 10}else if(na(_.mode))return 31;return 0}function Bn(m){if(!m)throw new ze(63);return m}function ha(m){if(m=Xe[m],!m)throw new ze(8);return m}function Gn(m,b=-1){if(m=Object.assign(new Nr,m),b==-1)e:{for(b=0;4096>=b;b++)if(!Xe[b])break e;throw new ze(33)}return m.fd=b,Xe[b]=m}function ir(m,b=-1){var D,_;return m=Gn(m,b),(_=(D=m.Ma)==null?void 0:D.Rb)==null||_.call(D,m),m}function Za(m,b,D){var _=m==null?void 0:m.Ma.Ua;m=_?m:b,_??(_=b.La.Ua),Bn(_),_(m,D)}var Kn={open(m){var b,D;m.Ma=nt[m.node.rdev].Ma,(D=(b=m.Ma).open)==null||D.call(b,m)},Va(){throw new ze(70)}};function $t(m,b){nt[m]={Ma:b}}function Hi(m,b){var D=b==="/";if(D&&Ye)throw new ze(10);if(!D&&b){var _=Ua(b,{nb:!1});if(b=_.path,_=_.node,_.ab)throw new ze(10);if(!na(_.mode))throw new ze(54)}b={type:m,Wb:{},zb:b,Ib:[]},m=m.Xa(b),m.Xa=b,b.root=m,D?Ye=m:_&&(_.ab=b,_.Xa&&_.Xa.Ib.push(b))}function Ir(m,b,D){var _=Ua(m,{parent:!0}).node;if(m=oe(m),!m)throw new ze(28);if(m==="."||m==="..")throw new ze(20);var te=vs(_,m);if(te)throw new ze(te);if(!_.La.hb)throw new ze(63);return _.La.hb(_,m,b,D)}function qn(m,b=438){return Ir(m,b&4095|32768,0)}function Ia(m,b=511){return Ir(m,b&1023|16384,0)}function ln(m,b,D){typeof D>"u"&&(D=b,b=438),Ir(m,b|8192,D)}function ai(m,b){if(!_e(m))throw new ze(44);var D=Ua(b,{parent:!0}).node;if(!D)throw new ze(44);b=oe(b);var _=vs(D,b);if(_)throw new ze(_);if(!D.La.symlink)throw new ze(63);D.La.symlink(D,b,m)}function zi(m){var b=Ua(m,{parent:!0}).node;m=oe(m);var D=Kt(b,m),_=Qi(b,m,!0);if(_)throw new ze(_);if(!b.La.rmdir)throw new ze(63);if(D.ab)throw new ze(10);b.La.rmdir(b,m),on(D)}function Cs(m){var b=Ua(m,{parent:!0}).node;if(!b)throw new ze(44);m=oe(m);var D=Kt(b,m),_=Qi(b,m,!1);if(_)throw new ze(_);if(!b.La.unlink)throw new ze(63);if(D.ab)throw new ze(10);b.La.unlink(b,m),on(D)}function Ln(m,b){return m=Ua(m,{$a:!b}).node,Bn(m.La.Ta)(m)}function kr(m,b,D,_){Za(m,b,{mode:D&4095|b.mode&-4096,ctime:Date.now(),Fb:_})}function Ka(m,b){m=typeof m=="string"?Ua(m,{$a:!0}).node:m,kr(null,m,b)}function ni(m,b,D){if(na(b.mode))throw new ze(31);if((b.mode&61440)!==32768)throw new ze(28);var _=rr(b,"w");if(_)throw new ze(_);Za(m,b,{size:D,timestamp:Date.now()})}function Yn(m,b,D=438){if(m==="")throw new ze(44);if(typeof b=="string"){var _={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if(typeof _>"u")throw Error(`Unknown file open mode: ${b}`);b=_}if(D=b&64?D&4095|32768:0,typeof m=="object")_=m;else{var te=m.endsWith("/");m=Ua(m,{$a:!(b&131072),Jb:!0}),_=m.node,m=m.path}var fe=!1;if(b&64)if(_){if(b&128)throw new ze(20)}else{if(te)throw new ze(31);_=Ir(m,D|511,0),fe=!0}if(!_)throw new ze(44);if((_.mode&61440)===8192&&(b&=-513),b&65536&&!na(_.mode))throw new ze(54);if(!fe&&(te=_?(_.mode&61440)===40960?32:na(_.mode)&&(ti(b)!=="r"||b&576)?31:rr(_,ti(b)):44))throw new ze(te);return b&512&&!fe&&(te=_,te=typeof te=="string"?Ua(te,{$a:!0}).node:te,ni(null,te,0)),b&=-131713,te=Gn({node:_,path:ei(_),flags:b,seekable:!0,position:0,Ma:_.Ma,Lb:[],error:!1}),te.Ma.open&&te.Ma.open(te),fe&&Ka(_,D&511),!h.logReadFiles||b&1||m in yn||(yn[m]=1),te}function Dn(m){if(m.fd===null)throw new ze(8);m.ob&&(m.ob=null);try{m.Ma.close&&m.Ma.close(m)}catch(b){throw b}finally{Xe[m.fd]=null}m.fd=null}function sa(m,b,D){if(m.fd===null)throw new ze(8);if(!m.seekable||!m.Ma.Va)throw new ze(70);if(D!=0&&D!=1&&D!=2)throw new ze(28);m.position=m.Ma.Va(m,b,D),m.Lb=[]}function ri(m,b,D,_,te){if(0>_||0>te)throw new ze(28);if(m.fd===null)throw new ze(8);if((m.flags&2097155)===1)throw new ze(8);if(na(m.node.mode))throw new ze(31);if(!m.Ma.read)throw new ze(28);var fe=typeof te<"u";if(!fe)te=m.position;else if(!m.seekable)throw new ze(70);return b=m.Ma.read(m,b,D,_,te),fe||(m.position+=b),b}function xs(m,b,D,_,te){if(0>_||0>te)throw new ze(28);if(m.fd===null)throw new ze(8);if((m.flags&2097155)===0)throw new ze(8);if(na(m.node.mode))throw new ze(31);if(!m.Ma.write)throw new ze(28);m.seekable&&m.flags&1024&&sa(m,0,2);var fe=typeof te<"u";if(!fe)te=m.position;else if(!m.seekable)throw new ze(70);return b=m.Ma.write(m,b,D,_,te,void 0),fe||(m.position+=b),b}function Ns(m){var b,D=Yn(m,D||0);m=Ln(m).size;var _=new Uint8Array(m);return ri(D,_,0,m,0),b=_,Dn(D),b}function qt(m,b,D){m=pt("/dev/"+m);var _=Ie(!!b,!!D);qt.yb??(qt.yb=64);var te=qt.yb++<<8|0;$t(te,{open(fe){fe.seekable=!1},close(){var fe;(fe=D==null?void 0:D.buffer)!=null&&fe.length&&D(10)},read(fe,ve,$e,yt){for(var At=0,ea=0;ea<yt;ea++){try{var Ma=b()}catch{throw new ze(29)}if(Ma===void 0&&At===0)throw new ze(6);if(Ma==null)break;At++,ve[$e+ea]=Ma}return At&&(fe.node.atime=Date.now()),At},write(fe,ve,$e,yt){for(var At=0;At<yt;At++)try{D(ve[$e+At])}catch{throw new ze(29)}return yt&&(fe.node.mtime=fe.node.ctime=Date.now()),At}}),ln(m,_,te)}var Et={};function _t(m,b,D){if(b.charAt(0)==="/")return b;if(m=m===-100?"/":ha(m).path,b.length==0){if(!D)throw new ze(44);return m}return m+"/"+b}function Jn(m,b){Z[m>>2]=b.dev,Z[m+4>>2]=b.mode,ce[m+8>>2]=b.nlink,Z[m+12>>2]=b.uid,Z[m+16>>2]=b.gid,Z[m+20>>2]=b.rdev,X[m+24>>3]=BigInt(b.size),Z[m+32>>2]=4096,Z[m+36>>2]=b.blocks;var D=b.atime.getTime(),_=b.mtime.getTime(),te=b.ctime.getTime();return X[m+40>>3]=BigInt(Math.floor(D/1e3)),ce[m+48>>2]=D%1e3*1e6,X[m+56>>3]=BigInt(Math.floor(_/1e3)),ce[m+64>>2]=_%1e3*1e6,X[m+72>>3]=BigInt(Math.floor(te/1e3)),ce[m+80>>2]=te%1e3*1e6,X[m+88>>3]=BigInt(b.ino),0}var sr=void 0,Aa=()=>{var m=Z[+sr>>2];return sr+=4,m},ii=0,Qa=[0,31,60,91,121,152,182,213,244,274,305,335],Vi=[0,31,59,90,120,151,181,212,243,273,304,334],or={},Sr=m=>{var b;z=m,mt||0<ii||((b=h.onExit)==null||b.call(h,m),J=!0),I(m,new Je(m))},Rn=m=>{if(!J)try{if(m(),!(mt||0<ii))try{z=m=z,Sr(m)}catch(b){b instanceof Je||b=="unwind"||I(1,b)}}catch(b){b instanceof Je||b=="unwind"||I(1,b)}},si={},Gi=()=>{if(!Un){var m={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",_:N||"./this.program"},b;for(b in si)si[b]===void 0?delete m[b]:m[b]=si[b];var D=[];for(b in m)D.push(`${b}=${m[b]}`);Un=D}return Un},Un,Tr=m=>{var b=qe(m)+1,D=Zt(b);return M(m,Y,D,b),D},R=(m,b,D,_)=>{var te={string:At=>{var ea=0;return At!=null&&At!==0&&(ea=Tr(At)),ea},array:At=>{var ea=Zt(At.length);return G.set(At,ea),ea}};m=h["_"+m];var fe=[],ve=0;if(_)for(var $e=0;$e<_.length;$e++){var yt=te[D[$e]];yt?(ve===0&&(ve=qa()),fe[$e]=yt(_[$e])):fe[$e]=_[$e]}return D=m(...fe),D=function(At){return ve!==0&&zt(ve),b==="string"?At?ke(Y,At):"":b==="boolean"?!!At:At}(D)},j=0,H=(m,b)=>(b=b==1?Zt(m.length):ka(m.length),m.subarray||m.slice||(m=new Uint8Array(m)),Y.set(m,b),b),ie,Te=[],De,Qe=m=>{ie.delete(De.get(m)),De.set(m,null),Te.push(m)},Ge=(m,b)=>{if(!ie){ie=new WeakMap;var D=De.length;if(ie)for(var _=0;_<0+D;_++){var te=De.get(_);te&&ie.set(te,_)}}if(D=ie.get(m)||0)return D;if(Te.length)D=Te.pop();else{try{De.grow(1)}catch(yt){throw yt instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":yt}D=De.length-1}try{De.set(D,m)}catch(yt){if(!(yt instanceof TypeError))throw yt;if(typeof WebAssembly.Function=="function"){var fe=WebAssembly.Function;_={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},te={parameters:[],results:b[0]=="v"?[]:[_[b[0]]]};for(var ve=1;ve<b.length;++ve)te.parameters.push(_[b[ve]]);b=new fe(te,m)}else{_=[1],te=b.slice(0,1),b=b.slice(1),ve={i:127,p:127,j:126,f:125,d:124,e:111},_.push(96);var $e=b.length;128>$e?_.push($e):_.push($e%128|128,$e>>7);for(fe of b)_.push(ve[fe]);te=="v"?_.push(0):_.push(1,ve[te]),b=[0,97,115,109,1,0,0,0,1],fe=_.length,128>fe?b.push(fe):b.push(fe%128|128,fe>>7),b.push(..._),b.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),b=new WebAssembly.Module(new Uint8Array(b)),b=new WebAssembly.Instance(b,{e:{f:m}}).exports.f}De.set(D,b)}return ie.set(m,D),D};ft=Array(4096),Hi(Pe,"/"),Ia("/tmp"),Ia("/home"),Ia("/home/web_user"),function(){Ia("/dev"),$t(259,{read:()=>0,write:(_,te,fe,ve)=>ve,Va:()=>0}),ln("/dev/null",259),K(1280,me),K(1536,xe),ln("/dev/tty",1280),ln("/dev/tty1",1536);var m=new Uint8Array(1024),b=0,D=()=>(b===0&&(Fe(m),b=m.byteLength),m[--b]);qt("random",D),qt("urandom",D),Ia("/dev/shm"),Ia("/dev/shm/tmp")}(),function(){Ia("/proc");var m=Ia("/proc/self");Ia("/proc/self/fd"),Hi({Xa(){var b=Na(m,"fd",16895,73);return b.Ma={Va:Pe.Ma.Va},b.La={lookup(D,_){D=+_;var te=ha(D);return D={parent:null,Xa:{zb:"fake"},La:{readlink:()=>te.path},id:D+1},D.parent=D},readdir(){return Array.from(Xe.entries()).filter(([,D])=>D).map(([D])=>D.toString())}},b}},"/proc/self/fd")}(),Pe.vb=new ze(44),Pe.vb.stack="<generic error, no stack>";var St={a:(m,b,D,_)=>se(`Assertion failed: ${m?ke(Y,m):""}, at: `+[b?b?ke(Y,b):"":"unknown filename",D,_?_?ke(Y,_):"":"unknown function"]),i:function(m,b){try{return m=m?ke(Y,m):"",Ka(m,b),0}catch(D){if(typeof Et>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},L:function(m,b,D){try{if(b=b?ke(Y,b):"",b=_t(m,b),D&-8)return-28;var _=Ua(b,{$a:!0}).node;return _?(m="",D&4&&(m+="r"),D&2&&(m+="w"),D&1&&(m+="x"),m&&rr(_,m)?-2:0):-44}catch(te){if(typeof Et>"u"||te.name!=="ErrnoError")throw te;return-te.Pa}},j:function(m,b){try{var D=ha(m);return kr(D,D.node,b,!1),0}catch(_){if(typeof Et>"u"||_.name!=="ErrnoError")throw _;return-_.Pa}},h:function(m){try{var b=ha(m);return Za(b,b.node,{timestamp:Date.now(),Fb:!1}),0}catch(D){if(typeof Et>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},b:function(m,b,D){sr=D;try{var _=ha(m);switch(b){case 0:var te=Aa();if(0>te)break;for(;Xe[te];)te++;return ir(_,te).fd;case 1:case 2:return 0;case 3:return _.flags;case 4:return te=Aa(),_.flags|=te,0;case 12:return te=Aa(),ae[te+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(fe){if(typeof Et>"u"||fe.name!=="ErrnoError")throw fe;return-fe.Pa}},g:function(m,b){try{var D=ha(m),_=D.node,te=D.Ma.Ta;m=te?D:_,te??(te=_.La.Ta),Bn(te);var fe=te(m);return Jn(b,fe)}catch(ve){if(typeof Et>"u"||ve.name!=="ErrnoError")throw ve;return-ve.Pa}},H:function(m,b){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var D=ha(m);if(0>b||(D.flags&2097155)===0)throw new ze(28);return ni(D,D.node,b),0}catch(_){if(typeof Et>"u"||_.name!=="ErrnoError")throw _;return-_.Pa}},G:function(m,b){try{if(b===0)return-28;var D=qe("/")+1;return b<D?-68:(M("/",Y,m,b),D)}catch(_){if(typeof Et>"u"||_.name!=="ErrnoError")throw _;return-_.Pa}},K:function(m,b){try{return m=m?ke(Y,m):"",Jn(b,Ln(m,!0))}catch(D){if(typeof Et>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},C:function(m,b,D){try{return b=b?ke(Y,b):"",b=_t(m,b),Ia(b,D),0}catch(_){if(typeof Et>"u"||_.name!=="ErrnoError")throw _;return-_.Pa}},J:function(m,b,D,_){try{b=b?ke(Y,b):"";var te=_&256;return b=_t(m,b,_&4096),Jn(D,te?Ln(b,!0):Ln(b))}catch(fe){if(typeof Et>"u"||fe.name!=="ErrnoError")throw fe;return-fe.Pa}},x:function(m,b,D,_){sr=_;try{b=b?ke(Y,b):"",b=_t(m,b);var te=_?Aa():0;return Yn(b,D,te).fd}catch(fe){if(typeof Et>"u"||fe.name!=="ErrnoError")throw fe;return-fe.Pa}},v:function(m,b,D,_){try{if(b=b?ke(Y,b):"",b=_t(m,b),0>=_)return-28;var te=Ua(b).node;if(!te)throw new ze(44);if(!te.La.readlink)throw new ze(28);var fe=te.La.readlink(te),ve=Math.min(_,qe(fe)),$e=G[D+ve];return M(fe,Y,D,_+1),G[D+ve]=$e,ve}catch(yt){if(typeof Et>"u"||yt.name!=="ErrnoError")throw yt;return-yt.Pa}},u:function(m){try{return m=m?ke(Y,m):"",zi(m),0}catch(b){if(typeof Et>"u"||b.name!=="ErrnoError")throw b;return-b.Pa}},f:function(m,b){try{return m=m?ke(Y,m):"",Jn(b,Ln(m))}catch(D){if(typeof Et>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},r:function(m,b,D){try{return b=b?ke(Y,b):"",b=_t(m,b),D===0?Cs(b):D===512?zi(b):se("Invalid flags passed to unlinkat"),0}catch(_){if(typeof Et>"u"||_.name!=="ErrnoError")throw _;return-_.Pa}},q:function(m,b,D){try{b=b?ke(Y,b):"",b=_t(m,b,!0);var _=Date.now(),te,fe;if(D){var ve=ce[D>>2]+4294967296*Z[D+4>>2],$e=Z[D+8>>2];$e==1073741823?te=_:$e==1073741822?te=null:te=1e3*ve+$e/1e6,D+=16,ve=ce[D>>2]+4294967296*Z[D+4>>2],$e=Z[D+8>>2],$e==1073741823?fe=_:$e==1073741822?fe=null:fe=1e3*ve+$e/1e6}else fe=te=_;if((fe??te)!==null){m=te;var yt=Ua(b,{$a:!0}).node;Bn(yt.La.Ua)(yt,{atime:m,mtime:fe})}return 0}catch(At){if(typeof Et>"u"||At.name!=="ErrnoError")throw At;return-At.Pa}},m:()=>se(""),l:()=>{mt=!1,ii=0},A:function(m,b){m=-9007199254740992>m||9007199254740992<m?NaN:Number(m),m=new Date(1e3*m),Z[b>>2]=m.getSeconds(),Z[b+4>>2]=m.getMinutes(),Z[b+8>>2]=m.getHours(),Z[b+12>>2]=m.getDate(),Z[b+16>>2]=m.getMonth(),Z[b+20>>2]=m.getFullYear()-1900,Z[b+24>>2]=m.getDay();var D=m.getFullYear();Z[b+28>>2]=(D%4!==0||D%100===0&&D%400!==0?Vi:Qa)[m.getMonth()]+m.getDate()-1|0,Z[b+36>>2]=-(60*m.getTimezoneOffset()),D=new Date(m.getFullYear(),6,1).getTimezoneOffset();var _=new Date(m.getFullYear(),0,1).getTimezoneOffset();Z[b+32>>2]=(D!=_&&m.getTimezoneOffset()==Math.min(_,D))|0},y:function(m,b,D,_,te,fe,ve){te=-9007199254740992>te||9007199254740992<te?NaN:Number(te);try{if(isNaN(te))return 61;var $e=ha(_);if((b&2)!==0&&(D&2)===0&&($e.flags&2097155)!==2)throw new ze(2);if(($e.flags&2097155)===1)throw new ze(2);if(!$e.Ma.ib)throw new ze(43);if(!m)throw new ze(28);var yt=$e.Ma.ib($e,m,te,b,D),At=yt.Kb;return Z[fe>>2]=yt.Ab,ce[ve>>2]=At,0}catch(ea){if(typeof Et>"u"||ea.name!=="ErrnoError")throw ea;return-ea.Pa}},z:function(m,b,D,_,te,fe){fe=-9007199254740992>fe||9007199254740992<fe?NaN:Number(fe);try{var ve=ha(te);if(D&2){if(D=fe,(ve.node.mode&61440)!==32768)throw new ze(43);if(!(_&2)){var $e=Y.slice(m,m+b);ve.Ma.jb&&ve.Ma.jb(ve,$e,D,b,_)}}}catch(yt){if(typeof Et>"u"||yt.name!=="ErrnoError")throw yt;return-yt.Pa}},n:(m,b)=>{if(or[m]&&(clearTimeout(or[m].id),delete or[m]),!b)return 0;var D=setTimeout(()=>{delete or[m],Rn(()=>En(m,performance.now()))},b);return or[m]={id:D,Xb:b},0},B:(m,b,D,_)=>{var te=new Date().getFullYear(),fe=new Date(te,0,1).getTimezoneOffset();te=new Date(te,6,1).getTimezoneOffset(),ce[m>>2]=60*Math.max(fe,te),Z[b>>2]=+(fe!=te),b=ve=>{var $e=Math.abs(ve);return`UTC${0<=ve?"-":"+"}${String(Math.floor($e/60)).padStart(2,"0")}${String($e%60).padStart(2,"0")}`},m=b(fe),b=b(te),te<fe?(M(m,Y,D,17),M(b,Y,_,17)):(M(m,Y,_,17),M(b,Y,D,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:m=>{var b=Y.length;if(m>>>=0,2147483648<m)return!1;for(var D=1;4>=D;D*=2){var _=b*(1+.2/D);_=Math.min(_,m+100663296);e:{_=(Math.min(2147483648,65536*Math.ceil(Math.max(m,_)/65536))-W.buffer.byteLength+65535)/65536|0;try{W.grow(_),je();var te=1;break e}catch{}te=void 0}if(te)return!0}return!1},E:(m,b)=>{var D=0;return Gi().forEach((_,te)=>{var fe=b+D;for(te=ce[m+4*te>>2]=fe,fe=0;fe<_.length;++fe)G[te++]=_.charCodeAt(fe);G[te]=0,D+=_.length+1}),0},F:(m,b)=>{var D=Gi();ce[m>>2]=D.length;var _=0;return D.forEach(te=>_+=te.length+1),ce[b>>2]=_,0},e:function(m){try{var b=ha(m);return Dn(b),0}catch(D){if(typeof Et>"u"||D.name!=="ErrnoError")throw D;return D.Pa}},p:function(m,b){try{var D=ha(m);return G[b]=D.tty?2:na(D.mode)?3:(D.mode&61440)===40960?7:4,ae[b+2>>1]=0,X[b+8>>3]=BigInt(0),X[b+16>>3]=BigInt(0),0}catch(_){if(typeof Et>"u"||_.name!=="ErrnoError")throw _;return _.Pa}},w:function(m,b,D,_){try{e:{var te=ha(m);m=b;for(var fe,ve=b=0;ve<D;ve++){var $e=ce[m>>2],yt=ce[m+4>>2];m+=8;var At=ri(te,G,$e,yt,fe);if(0>At){var ea=-1;break e}if(b+=At,At<yt)break;typeof fe<"u"&&(fe+=At)}ea=b}return ce[_>>2]=ea,0}catch(Ma){if(typeof Et>"u"||Ma.name!=="ErrnoError")throw Ma;return Ma.Pa}},D:function(m,b,D,_){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var te=ha(m);return sa(te,b,D),X[_>>3]=BigInt(te.position),te.ob&&b===0&&D===0&&(te.ob=null),0}catch(fe){if(typeof Et>"u"||fe.name!=="ErrnoError")throw fe;return fe.Pa}},I:function(m){var D;try{var b=ha(m);return(D=b.Ma)!=null&&D.fsync?b.Ma.fsync(b):0}catch(_){if(typeof Et>"u"||_.name!=="ErrnoError")throw _;return _.Pa}},t:function(m,b,D,_){try{e:{var te=ha(m);m=b;for(var fe,ve=b=0;ve<D;ve++){var $e=ce[m>>2],yt=ce[m+4>>2];m+=8;var At=xs(te,G,$e,yt,fe);if(0>At){var ea=-1;break e}if(b+=At,At<yt)break;typeof fe<"u"&&(fe+=At)}ea=b}return ce[_>>2]=ea,0}catch(Ma){if(typeof Et>"u"||Ma.name!=="ErrnoError")throw Ma;return Ma.Pa}},k:Sr},Ve;(async function(){var D;function m(_){var te;return Ve=_.exports,W=Ve.M,je(),De=Ve.O,P--,(te=h.monitorRunDependencies)==null||te.call(h,P),P==0&&q&&(_=q,q=null,_()),Ve}P++,(D=h.monitorRunDependencies)==null||D.call(h,P);var b={a:St};return h.instantiateWasm?new Promise(_=>{h.instantiateWasm(b,(te,fe)=>{m(te),_(te.exports)})}):(we??(we=h.locateFile?h.locateFile("sql-wasm.wasm",k):k+"sql-wasm.wasm"),m((await Le(b)).instance))})(),h._sqlite3_free=m=>(h._sqlite3_free=Ve.P)(m),h._sqlite3_value_text=m=>(h._sqlite3_value_text=Ve.Q)(m),h._sqlite3_prepare_v2=(m,b,D,_,te)=>(h._sqlite3_prepare_v2=Ve.R)(m,b,D,_,te),h._sqlite3_step=m=>(h._sqlite3_step=Ve.S)(m),h._sqlite3_reset=m=>(h._sqlite3_reset=Ve.T)(m),h._sqlite3_exec=(m,b,D,_,te)=>(h._sqlite3_exec=Ve.U)(m,b,D,_,te),h._sqlite3_finalize=m=>(h._sqlite3_finalize=Ve.V)(m),h._sqlite3_column_name=(m,b)=>(h._sqlite3_column_name=Ve.W)(m,b),h._sqlite3_column_text=(m,b)=>(h._sqlite3_column_text=Ve.X)(m,b),h._sqlite3_column_type=(m,b)=>(h._sqlite3_column_type=Ve.Y)(m,b),h._sqlite3_errmsg=m=>(h._sqlite3_errmsg=Ve.Z)(m),h._sqlite3_clear_bindings=m=>(h._sqlite3_clear_bindings=Ve._)(m),h._sqlite3_value_blob=m=>(h._sqlite3_value_blob=Ve.$)(m),h._sqlite3_value_bytes=m=>(h._sqlite3_value_bytes=Ve.aa)(m),h._sqlite3_value_double=m=>(h._sqlite3_value_double=Ve.ba)(m),h._sqlite3_value_int=m=>(h._sqlite3_value_int=Ve.ca)(m),h._sqlite3_value_type=m=>(h._sqlite3_value_type=Ve.da)(m),h._sqlite3_result_blob=(m,b,D,_)=>(h._sqlite3_result_blob=Ve.ea)(m,b,D,_),h._sqlite3_result_double=(m,b)=>(h._sqlite3_result_double=Ve.fa)(m,b),h._sqlite3_result_error=(m,b,D)=>(h._sqlite3_result_error=Ve.ga)(m,b,D),h._sqlite3_result_int=(m,b)=>(h._sqlite3_result_int=Ve.ha)(m,b),h._sqlite3_result_int64=(m,b)=>(h._sqlite3_result_int64=Ve.ia)(m,b),h._sqlite3_result_null=m=>(h._sqlite3_result_null=Ve.ja)(m),h._sqlite3_result_text=(m,b,D,_)=>(h._sqlite3_result_text=Ve.ka)(m,b,D,_),h._sqlite3_aggregate_context=(m,b)=>(h._sqlite3_aggregate_context=Ve.la)(m,b),h._sqlite3_column_count=m=>(h._sqlite3_column_count=Ve.ma)(m),h._sqlite3_data_count=m=>(h._sqlite3_data_count=Ve.na)(m),h._sqlite3_column_blob=(m,b)=>(h._sqlite3_column_blob=Ve.oa)(m,b),h._sqlite3_column_bytes=(m,b)=>(h._sqlite3_column_bytes=Ve.pa)(m,b),h._sqlite3_column_double=(m,b)=>(h._sqlite3_column_double=Ve.qa)(m,b),h._sqlite3_bind_blob=(m,b,D,_,te)=>(h._sqlite3_bind_blob=Ve.ra)(m,b,D,_,te),h._sqlite3_bind_double=(m,b,D)=>(h._sqlite3_bind_double=Ve.sa)(m,b,D),h._sqlite3_bind_int=(m,b,D)=>(h._sqlite3_bind_int=Ve.ta)(m,b,D),h._sqlite3_bind_text=(m,b,D,_,te)=>(h._sqlite3_bind_text=Ve.ua)(m,b,D,_,te),h._sqlite3_bind_parameter_index=(m,b)=>(h._sqlite3_bind_parameter_index=Ve.va)(m,b),h._sqlite3_sql=m=>(h._sqlite3_sql=Ve.wa)(m),h._sqlite3_normalized_sql=m=>(h._sqlite3_normalized_sql=Ve.xa)(m),h._sqlite3_changes=m=>(h._sqlite3_changes=Ve.ya)(m),h._sqlite3_close_v2=m=>(h._sqlite3_close_v2=Ve.za)(m),h._sqlite3_create_function_v2=(m,b,D,_,te,fe,ve,$e,yt)=>(h._sqlite3_create_function_v2=Ve.Aa)(m,b,D,_,te,fe,ve,$e,yt),h._sqlite3_update_hook=(m,b,D)=>(h._sqlite3_update_hook=Ve.Ba)(m,b,D),h._sqlite3_open=(m,b)=>(h._sqlite3_open=Ve.Ca)(m,b);var ka=h._malloc=m=>(ka=h._malloc=Ve.Da)(m),oa=h._free=m=>(oa=h._free=Ve.Ea)(m);h._RegisterExtensionFunctions=m=>(h._RegisterExtensionFunctions=Ve.Fa)(m);var en=(m,b)=>(en=Ve.Ga)(m,b),En=(m,b)=>(En=Ve.Ha)(m,b),zt=m=>(zt=Ve.Ia)(m),Zt=m=>(Zt=Ve.Ja)(m),qa=()=>(qa=Ve.Ka)();h.stackSave=()=>qa(),h.stackRestore=m=>zt(m),h.stackAlloc=m=>Zt(m),h.cwrap=(m,b,D,_)=>{var te=!D||D.every(fe=>fe==="number"||fe==="boolean");return b!=="string"&&te&&!_?h["_"+m]:(...fe)=>R(m,b,D,fe)},h.addFunction=Ge,h.removeFunction=Qe,h.UTF8ToString=He,h.ALLOC_NORMAL=j,h.allocate=H,h.allocateUTF8OnStack=Tr;function ga(){function m(){var te;if(h.calledRun=!0,!J){if(!h.noFSInit&&!Wt){var b,D;Wt=!0,_??(_=h.stdin),b??(b=h.stdout),D??(D=h.stderr),_?qt("stdin",_):ai("/dev/tty","/dev/stdin"),b?qt("stdout",null,b):ai("/dev/tty","/dev/stdout"),D?qt("stderr",null,D):ai("/dev/tty1","/dev/stderr"),Yn("/dev/stdin",0),Yn("/dev/stdout",1),Yn("/dev/stderr",1)}if(Ve.N(),Xt=!1,(te=h.onRuntimeInitialized)==null||te.call(h),h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;){var _=h.postRun.shift();We.unshift(_)}Ke(We)}}if(0<P)q=ga;else{if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)fa();Ke(dt),0<P?q=ga:h.setStatus?(h.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>h.setStatus(""),1),m()},1)):m()}}if(h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();return ga(),d}),r)};n.exports=i,n.exports.default=i}(ch)),ch.exports}var eN=Z1();const tN=Zr(eN);function aN(n){return n.toISOString().replace("T"," ").replace("Z","").substring(0,23)}function us(){return aN(new Date)}var Jp=`
\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;
`,Wp={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;`},La=[{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.24.0"}],uA=class{getCreateVaultSql(){try{return{success:!0,sqlCommands:[Jp],version:La[La.length-1].version,migrationNumber:La[La.length-1].revision}}catch(n){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:n instanceof Error?n.message:"Unknown error creating vault SQL"}}}getUpgradeVaultSql(n,t){try{const r=t??La[La.length-1].revision,i=La.find(c=>c.revision===r);if(!i)return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:`Target migration number ${r} not found`};if(n>=r)return{success:!0,sqlCommands:[],version:i.version,migrationNumber:r};const o=La.filter(c=>c.revision>n&&c.revision<=r),l=[];for(const c of o){const d=c.revision-1,A=Wp[d];A&&l.push(A)}return{success:!0,sqlCommands:l,version:i.version,migrationNumber:r}}catch(r){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:r instanceof Error?r.message:"Unknown error generating upgrade SQL"}}}getUpgradeToLatestSql(n){return this.getUpgradeVaultSql(n)}getUpgradeToVersionSql(n,t){const r=La.find(i=>i.version===t);return r?this.getUpgradeVaultSql(n,r.revision):{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:`Target version ${t} not found`}}getVersionCheckSql(){return["SELECT name FROM sqlite_master WHERE type='table' AND name='Settings';","SELECT Value FROM Settings WHERE Key = 'vault_version' AND IsDeleted = 0 LIMIT 1;","SELECT Value FROM Settings WHERE Key = 'vault_migration_number' AND IsDeleted = 0 LIMIT 1;"]}getVaultValidationSql(){return`SELECT name FROM sqlite_master WHERE type='table' AND name IN
            ('Aliases', 'Services', 'Credentials', 'Passwords', 'Attachments', 'EncryptionKeys', 'Settings', 'TotpCodes');`}parseVaultVersionInfo(n,t,r){let i="0.0.0",o=0;n&&(t?i=t:(i="1.0.0",o=1),r&&(o=parseInt(r,10)));const l=La[La.length-1],c=o<l.revision,d=La.filter(A=>A.revision>o);return{currentVersion:i,currentMigrationNumber:o,targetVersion:l.version,targetMigrationNumber:l.revision,needsUpgrade:c,availableUpgrades:d}}validateVaultStructure(n){const t=["Aliases","Services","Credentials","Passwords","Attachments","EncryptionKeys","Settings","TotpCodes"];return n.filter(i=>t.includes(i)).length>=5}getAllVersions(){return[...La]}getLatestVersion(){return La[La.length-1]}getMigrationSql(n){return Wp[n]}getCompleteSchemaSql(){return Jp}};function Xp(n){const r=/^(\d+)\.(\d+)\.(\d+)$/.exec(n);return r?{major:parseInt(r[1],10),minor:parseInt(r[2],10),patch:parseInt(r[3],10)}:null}function nN(n,t){const r=Xp(n);if(!r)return{isCompatible:!1,databaseVersion:n,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const i=La.find(h=>h.version===n);if(i)return{isCompatible:!0,databaseVersion:n,clientVersion:i,isKnownVersion:!0,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const o=t?La.find(h=>h.version===t)??$p():$p(),l=Xp(o.version);if(!l)return{isCompatible:!1,databaseVersion:n,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const c=r.major!==l.major,d=!c&&(r.minor!==l.minor||r.patch!==l.patch);return{isCompatible:!c,databaseVersion:n,clientVersion:o,isKnownVersion:!1,isMajorVersionDifference:c,isMinorVersionDifference:d}}function $p(){return La[La.length-1]}function rN(n){const r=/_(\d+\.\d+\.\d+)-/.exec(n);return(r==null?void 0:r[1])??null}class ps extends Error{constructor(t){super(t),this.name="VaultVersionIncompatibleError",Object.setPrototypeOf(this,ps.prototype)}}const iN={loginTitle:"Bei AliasVault anmelden",username:"Benutzername oder E-Mail-Adresse",usernamePlaceholder:"Name / name@unternehmen.com",password:"Passwort",passwordPlaceholder:"Gib Dein Passwort ein",rememberMe:"Angemeldet bleiben",loginButton:"Anmelden",noAccount:"Noch kein Konto?",createVault:"Neuen Tresor erstellen",twoFactorTitle:"Bitte gib den Sicherheits-Code aus Deiner Authentifizierungs-App ein.",authCode:"Sicherheits-Code",authCodePlaceholder:"Gib den 6-stelligen Sicherheits-Code ein.",verify:"Bestätige",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",logout:"Abmelden",logoutConfirm:"Bist Du sicher, dass Du Dich abmelden möchtest?",unlockSuccessTitle:"Ihr Tresor wurde erfolgreich entsperrt",unlockSuccessDescription:"Du kannst jetzt die Autofill-Funktion in Anmeldeformularen in Deinem Browser nutzen.",closePopup:"Popup schließen",browseVault:"Tresor durchsuchen",connectingTo:"Verbinde zu",switchAccounts:"Konto wechseln?",loggedIn:"Angemeldet",loginWithMobile:"Mit mobiler App anmelden",unlockWithMobile:"Mit mobiler App entsperren",scanQrCode:"Scanne diesen QR-Code mit Deiner AliasVault-App, um Dich anzumelden und Deinen Tresor zu entsperren.",errors:{invalidCode:"Bitte gib einen gültigen 6-stelligen Sicherheits-Code ein.",serverError:"Der AliasVault-Server konnte nicht erreicht werden. Bitte versuche es später noch einmal oder kontaktiere den Support, falls das Problem weiterhin besteht.",wrongPassword:"Falsches Passwort. Bitte versuche es erneut.",accountLocked:"Das Konto wurde wegen zu vieler fehlgeschlagener Anmeldeversuche vorübergehend gesperrt.",networkError:"Netzwerkfehler. Bitte überprüfe Deine Verbindung und 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."}},sN={credentials:"Zugangsdaten",emails:"E-Mails",settings:"Einstellungen"},oN={loading:"Laden...",notice:"Hinweis",error:"Fehler",cancel:"Abbrechen",confirm:"Bestätigen",back:"Zurück",next:"Weiter",use:"Benutzen",delete:"Löschen",save:"Speichern",or:"Oder",close:"Schließen",copied:"Kopiert!",openInNewWindow:"In neuem Fenster öffnen",enabled:"Aktiviert",disabled:"Deaktiviert",showPassword:"Passwort anzeigen",hidePassword:"Passwort verbergen",showDetails:"Details anzeigen",hideDetails:"Details ausblenden",copyToClipboard:"In die Zwischenablage kopieren",loadingEmails:"E-Mails werden geladen...",loadingTotpCodes:"TOTP-Codes werden geladen...",attachments:"Anhänge",loadingAttachments:"Anhänge werden geladen...",settings:"Einstellungen",recentEmails:"Neueste E-Mails",loginCredentials:"Zugangsdaten",twoFactorAuthentication:"Zwei-Faktor-Authentifizierung",alias:"Alias",notes:"Notizen",fullName:"Vor- und Nachname",firstName:"Vorname",lastName:"Nachname",birthDate:"Geburtsdatum",nickname:"Spitzname",email:"E-Mail-Adresse",username:"Benutzername",password:"Passwort",syncingVault:"Tresor wird synchronisiert",savingChangesToVault:"Änderungen werden gespeichert",uploadingVaultToServer:"Tresor wird auf den Server hochgeladen",checkingVaultUpdates:"Prüfe auf Tresor-Updates",syncingUpdatedVault:"Aktualisierter Tresor wird synchronisiert",executingOperation:"Vorgang wird ausgeführt...",loadMore:"Mehr laden",errors:{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."},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."}},lN={or:"oder",new:"Neu",cancel:"Abbrechen",vaultLocked:"AliasVault ist gesperrt.",creatingNewAlias:"Neuen Alias erstellen...",noMatchesFound:"Keine Treffer gefunden",searchVault:"Tresor durchsuchen...",serviceName:"Name des Dienstes",email:"E-Mail-Adresse",username:"Benutzername",password:"Passwort",enterServiceName:"Name des Dienstes eingeben",enterEmailAddress:"E-Mail-Adresse eingeben",enterUsername:"Benutzername eingeben",hideFor1Hour:"Für 1 Stunde ausblenden (aktuelle Seite)",hidePermanently:"Dauerhaft ausblenden (aktuelle Seite)",createRandomAlias:"Zufälligen Alias generieren",createUsernamePassword:"Benutzername/Passwort erstellen",randomAlias:"Zufälliger Alias",usernamePassword:"Benutzername/Passwort",createAndSaveAlias:"Alias erstellen und speichern",createAndSaveCredential:"Zugang erstellen und speichern",randomIdentityDescription:"Generiere eine zufällige Identität mit einer zufälligen E-Mail-Adresse von AliasVault.",randomIdentityDescriptionDropdown:"Zufällige Identität mit zufälliger E-Mail-Adresse",manualCredentialDescription:"Gebe Deine eigene E-Mail-Adresse und Benutzernamen an.",manualCredentialDescriptionDropdown:"Manueller Benutzername und Passwort",failedToCreateIdentity:"Das Erstellen der Identität ist fehlgeschlagen. Bitte versuche es erneut.",enterEmailAndOrUsername:"E-Mail-Adresse und/oder Benutzername eingeben",autofillWithAliasVault:"Autofill mit AliasVault",generateRandomPassword:"Zufälliges Passwort erzeugen (wird in die Zwischenablage kopiert)",generateNewPassword:"Neues Passwort erzeugen",togglePasswordVisibility:"Passwort ein-/ausblenden",passwordCopiedToClipboard:"Passwort in die Zwischenablage kopiert",openAliasVaultToUpgrade:"Zum Aktualisieren AliasVault öffnen ",vaultUpgradeRequired:"Aktualisierung des Tresors erforderlich.",dismissPopup:"Popup schliessen"},uN={title:"Zugangsdaten",addCredential:"Zugang hinzufügen",editCredential:"Zugang bearbeiten",deleteCredential:"Zugang löschen",credentialDetails:"Details zum Zugang",serviceName:"Name des Dienstes",notes:"Notizen",totp:"Zwei-Faktor-Authentifizierung",totpCode:"TOTP-Code",copyTotp:"TOTP kopieren",totpSecret:"TOTP-Geheimcode",totpSecretPlaceholder:"TOTP-Geheimcode eingeben",welcomeTitle:"Willkommen bei AliasVault!",welcomeDescription:"Du möchtest die AliasVault-Browser-Erweiterung verwenden? Navigiere zu einer Website und verwende das AliasVault-Popup-Fenster um einen neuen Zugang zu erstellen.",noPasskeysFound:"Es wurden noch kein Passkey erstellt. Ein Passkey wird durch den Besuch einer Website erzeugt, die Passkeys als Authentifizierungsmethode anbietet.",noAttachmentsFound:"Es wurden keine Zugangsdaten mit Anhang gefunden",noMatchingCredentials:"Keine passenden Zugangsdaten gefunden",createdAt:"Erstellt",updatedAt:"Zuletzt aktualisiert",saveCredential:"Zugang speichern",deleteCredentialTitle:"Zugang löschen",deleteCredentialConfirm:"Bist Du sicher, dass Du diesen Zugang löschen möchtest? Diese Aktion kann nicht rückgängig gemacht werden.",filters:{all:"(Alle) Zugangsdaten",passkeys:"Passkeys",aliases:"Aliase",userpass:"Passwörter",attachments:"Anhänge"},randomAlias:"Zufälliger Alias",manual:"Manuell",service:"Dienst",serviceUrl:"URL des Dienstes",loginCredentials:"Zugangsdaten",generateRandomUsername:"Zufälligen Benutzernamen generieren",generateRandomPassword:"Zufälliges Passwort generieren",changePasswordComplexity:"Komplexität des Passworts ändern",passwordLength:"Passwortlänge",includeLowercase:"Kleinbuchstaben (a-z)",includeUppercase:"Großbuchstaben (A-Z)",includeNumbers:"Ziffern (0-9)",includeSpecialChars:"Sonderzeichen (!@#$%^&*)",avoidAmbiguousChars:"Mehrdeutige Zeichen (1, l, I, 0, O, etc.) vermeiden",generateNewPreview:"Neue Vorschau erstellen",generateRandomAlias:"Zufälligen Alias generieren",clearAliasFields:"Alias-Felder löschen",alias:"Alias",firstName:"Vorname",lastName:"Nachname",nickName:"Spitzname",gender:"Geschlecht",birthDate:"Geburtsdatum",birthDatePlaceholder:"JJJJ-MM-TT",metadata:"Metadaten",validation:{required:"Dieses Feld ist ein Pflichtfeld",serviceNameRequired:"Name des Dienstes ist erforderlich",invalidEmail:"Ungültiges E-Mail-Format",invalidDateFormat:"Bitte gib das Datum im Format JJJJ-MM-TT ein."},privateEmailTitle:"Private E-Mail-Adresse",privateEmailAliasVaultServer:"AliasVault-Server",privateEmailDescription:"Ende-zu-Ende verschlüsselt, vollständig privat.",publicEmailTitle:"Öffentliche Temp-E-Mail-Anbieter",publicEmailDescription:"Anonyme, aber beschränkte Privatsphäre. E-Mail-Inhalt ist für jeden lesbar, der die Adresse kennt.",useDomainChooser:"Domain-Auswahl verwenden",enterCustomDomain:"Eigene Domain eingeben",enterFullEmail:"Vollständige E-Mail-Adresse eingeben",enterEmailPrefix:"E-Mail-Präfix eingeben"},cN={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",errors:{invalidSecretKey:"Ungültiges Format des Secret-Key"}},dN={title:"E-Mails",deleteEmailTitle:"E-Mail löschen",deleteEmailConfirm:"Bist Du sicher, dass Du diese E-Mail unwiderruflich löschen möchtest?",from:"Von",to:"An",date:"Datum",emailContent:"Inhalt der E-Mail",attachments:"Anhänge",emailNotFound:"E-Mail nicht gefunden",noEmails:"Keine E-Mails gefunden",noEmailsDescription:"Du hast bisher keine E-Mails an Deine privaten E-Mail-Adressen erhalten. Neue E-Mails werden hier angezeigt, sobald sie eintreffen.",dateFormat:{justNow:"gerade eben",minutesAgo_single:"vor {{count}} Minute",minutesAgo_plural:"vor {{count}} Minuten",hoursAgo_single:"vor {{count}} Stunde",hoursAgo_plural:"vor {{count}} Stunden",yesterday:"gestern"},errors:{emailLoadError:"Beim Laden der E-Mails ist ein Fehler aufgetreten. Bitte versuche es später erneut.",emailUnexpectedError:"Beim Laden der E-Mails ist ein unerwarteter Fehler aufgetreten. Bitte versuche es später erneut."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Die aktuell gewählte E-Mail-Adresse wird bereits verwendet. Bitte ändere die E-Mail-Adresse, indem Du diese Zugangsdaten bearbeitest.",CLAIM_DOES_NOT_EXIST:"Beim Laden der E-Mails ist ein Fehler aufgetreten. Bitte bearbeite und speichere den Eintrag, um die Datenbank zu synchronisieren, und versuche es dann erneut."}},fN={title:"Einstellungen",serverUrl:"URL des Servers",language:"Sprache",autofillEnabled:"Autofill aktivieren",version:"Version",openInNewWindow:"In neuem Fenster öffnen",openWebApp:"Web-App öffnen",loggedIn:"Angemeldet",logout:"Abmelden",lock:"Sperren",globalSettings:"Allgemeine Einstellungen",autofillPopup:"Autofill-Popup",activeOnAllSites:"Auf allen Seiten aktiv (sofern nicht unten deaktiviert)",disabledOnAllSites:"Auf allen Seiten deaktiviert",rightClickContextMenu:"Kontextmenü mit Rechtsklick",autofillMatching:"Autofill-Übereinstimmung",autofillMatchingMode:"Autofill-Übereinstimmungs-Modus",autofillMatchingModeDescription:"Legt fest, welche Zugangsdaten als Übereinstimmung angesehen werden und wird als Vorschlag im Autofill-Popup für eine bestimmte Website angezeigt.",autofillMatchingDefault:"URL + Subdomain + Wildcard-Name",autofillMatchingUrlSubdomain:"URL + Subdomain",autofillMatchingUrlExact:"Nur exakte URL-Domain",siteSpecificSettings:"Seitenspezifische Einstellungen",autofillPopupOn:"Autofill-Popup auf: ",enabledForThisSite:"Für diese Seite aktiviert",disabledForThisSite:"Für diese Seite deaktivieren",temporarilyDisabledUntil:"Vorübergehend deaktiviert bis ",resetAllSiteSettings:"Alle seitenspezifischen Einstellungen zurücksetzen",appearance:"Erscheinungsbild",theme:"Thema",useDefault:"Standard verwenden",light:"Hell",dark:"Dunkel",keyboardShortcuts:"Tastaturkürzel",configureKeyboardShortcuts:"Tastaturkürzel konfigurieren",configure:"Konfigurieren",clipboardClearTimeout:"Zwischenablage nach dem Kopieren automatisch löschen",clipboardClearTimeoutDescription:"Zwischenablage nach dem Kopieren sensibler Daten automatisch löschen",clipboardClearDisabled:"Niemals löschen",clipboardClear5Seconds:"Nach 5 Sekunden löschen",clipboardClear10Seconds:"Nach 10 Sekunden löschen",clipboardClear15Seconds:"Nach 15 Sekunden löschen",autoLockTimeout:"Sperr-Timeout",autoLockTimeoutDescription:"Tresor bei Inaktivität automatisch sperren",autoLockTimeoutHelp:"Der Tresor wird erst nach dem angegebenen Zeitraum der Inaktivität gesperrt (keine Nutzung von Autofill oder Öffnen des Erweiterungs-Popups). Der Tresor wird immer gesperrt, wenn der Browser geschlossen wird, unabhängig von dieser Einstellung.",autoLockNever:"Niemals",autoLock15Seconds:"15 Sekunden",autoLock1Minute:"1 Minute",autoLock5Minutes:"5 Minuten",autoLock15Minutes:"15 Minuten",autoLock30Minutes:"30 Minuten",autoLock1Hour:"1 Stunde",autoLock4Hours:"4 Stunden",autoLock8Hours:"8 Stunden",autoLock24Hours:"24 Stunden",versionPrefix:"Version ",autofillSettings:"Autofill-Einstellungen",clipboardSettings:"Zwischenablage-Einstellungen",contextMenuSettings:"Kontextmenü-Einstellungen",passkeySettings:"Passkey-Einstellungen",contextMenu:"Kontextmenü",contextMenuEnabled:"Kontextmenü ist aktiviert",contextMenuDisabled:"Kontextmenü ist deaktiviert",contextMenuDescription:"Rechtsklicke auf Eingabefelder, um auf AliasVault-Optionen zuzugreifen",selectLanguage:"Sprache auswählen",serverConfiguration:"Serverkonfiguration",serverConfigurationDescription:"AliasVault-Server-URL für selbstgehostete Instanzen konfigurieren",customApiUrl:"API-URL",customClientUrl:"Client-URL",apiUrlHint:"Die API-Endpunkt-URL (normalerweise Client-URL + /api)",clientUrlHint:"Die URL der Webschnittstelle Deiner selbst gehosteten Instanz",autofillSettingsDescription:"Aktiviere oder deaktiviere das Autofill-Popup auf Webseiten",autofillEnabledDescription:"Autofill-Vorschläge werden auf den Anmeldeformularen angezeigt",autofillDisabledDescription:"Autofill-Vorschläge sind global deaktiviert",languageSettings:"Sprache",validation:{apiUrlRequired:"API-URL ist erforderlich",apiUrlInvalid:"Bitte gib eine gültige API-URL ein",clientUrlRequired:"Client-URL ist erforderlich",clientUrlInvalid:"Bitte gib eine gültige Client-URL ein"},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."}},hN={passkey:"Passkey",site:"Seite",displayName:"Name",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.",bypass:{title:"Browser-Passkey verwenden",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",useBrowserPasskey:"Browser-Passkey verwenden"},create:{title:"Passkey erstellen",createFor:"Neuen Passkey erstellen für",titleLabel:"Titel",titlePlaceholder:"Gib einen Namen für diesen Passkey ein",createButton:"Passkey erstellen",useBrowserPasskey:"Browser-Passkey verwenden",selectPasskeyToReplace:"Wähle einen Passkey zum Ersetzen:",createNewPasskey:"Neuen Passkey erstellen",replacingPasskey:"Ersetzen des Passkeys: {{displayName}}",confirmReplace:"Ersetzen bestätigen"},settings:{passkeyProvider:"Passkey-Anbieter",passkeyProviderOn:"Passkey-Anbieter an "}},AN={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...",logout:"Abmelden",whatsNew:"Neu in dieser Version",whatsNewDescription:"Eine Aktualisierung ist erforderlich, um die folgenden Änderungen zu unterstützen:",noDescriptionAvailable:"Für diese Version ist keine Beschreibung vorhanden.",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}})"}},gN={auth:iN,menu:sN,common:oN,content:lN,credentials:uN,totp:cN,emails:dN,settings:fN,passkeys:hN,upgrade:AN},mN={loginTitle:"Log in to AliasVault",username:"Username or email",usernamePlaceholder:"name / name@company.com",password:"Password",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",logout:"Logout",logoutConfirm:"Are you sure you want to logout?",unlockSuccessTitle:"Your vault is successfully unlocked",unlockSuccessDescription:"You can now use autofill in login forms in your browser.",closePopup:"Close this popup",browseVault:"Browse vault contents",connectingTo:"Connecting to",switchAccounts:"Switch accounts?",loggedIn:"Logged in",loginWithMobile:"Log in using Mobile App",unlockWithMobile:"Unlock using Mobile App",scanQrCode:"Scan this QR code with your AliasVault mobile app to log in and unlock your vault.",errors:{invalidCode:"Please enter a valid 6-digit authentication code.",serverError:"Could not reach AliasVault server. Please try again later or contact support if the problem persists.",wrongPassword:"Incorrect password. Please try again.",accountLocked:"Account temporarily locked due to too many failed attempts.",networkError:"Network error. Please check your connection and try again.",sessionExpired:"Your session has expired. Please log in again.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."}},pN={credentials:"Credentials",emails:"Emails",settings:"Settings"},yN={loading:"Loading...",notice:"Notice",error:"Error",cancel:"Cancel",confirm:"Confirm",back:"Back",next:"Next",use:"Use",delete:"Delete",save:"Save",or:"Or",close:"Close",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",showDetails:"Show details",hideDetails:"Hide details",copyToClipboard:"Copy to clipboard",loadingEmails:"Loading emails...",loadingTotpCodes:"Loading TOTP codes...",attachments:"Attachments",loadingAttachments:"Loading attachments...",settings:"Settings",recentEmails:"Recent emails",loginCredentials:"Login credentials",twoFactorAuthentication:"Two-factor authentication",alias:"Alias",notes:"Notes",fullName:"Full Name",firstName:"First Name",lastName:"Last Name",birthDate:"Birth Date",nickname:"Nickname",email:"Email",username:"Username",password:"Password",syncingVault:"Syncing vault",savingChangesToVault:"Saving changes to vault",uploadingVaultToServer:"Uploading vault to server",checkingVaultUpdates:"Checking for vault updates",syncingUpdatedVault:"Syncing updated vault",executingOperation:"Executing operation...",loadMore:"Load more",errors:{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."},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."}},EN={or:"or",new:"New",cancel:"Cancel",vaultLocked:"AliasVault is locked.",creatingNewAlias:"Creating new alias...",noMatchesFound:"No matches found",searchVault:"Search vault...",serviceName:"Service name",email:"Email",username:"Username",password:"Password",enterServiceName:"Enter service name",enterEmailAddress:"Enter email address",enterUsername:"Enter username",hideFor1Hour:"Hide for 1 hour (current site)",hidePermanently:"Hide permanently (current site)",createRandomAlias:"Create random alias",createUsernamePassword:"Create username/password",randomAlias:"Random alias",usernamePassword:"Username/password",createAndSaveAlias:"Create and save alias",createAndSaveCredential:"Create and save credential",randomIdentityDescription:"Generate a random identity with a random email address accessible in AliasVault.",randomIdentityDescriptionDropdown:"Random identity with random email",manualCredentialDescription:"Specify your own email address and username.",manualCredentialDescriptionDropdown:"Manual username and password",failedToCreateIdentity:"Failed to create identity. Please try again.",enterEmailAndOrUsername:"Enter email and/or username",autofillWithAliasVault:"Autofill with AliasVault",generateRandomPassword:"Generate random password (copy to clipboard)",generateNewPassword:"Generate new password",togglePasswordVisibility:"Toggle password visibility",passwordCopiedToClipboard:"Password copied to clipboard",openAliasVaultToUpgrade:"Open AliasVault to upgrade",vaultUpgradeRequired:"Vault upgrade required.",dismissPopup:"Dismiss popup"},bN={title:"Credentials",addCredential:"Add Credential",editCredential:"Edit Credential",deleteCredential:"Delete Credential",credentialDetails:"Credential Details",serviceName:"Service Name",notes:"Notes",totp:"Two-Factor Authentication",totpCode:"TOTP Code",copyTotp:"Copy TOTP",totpSecret:"TOTP Secret",totpSecretPlaceholder:"Enter TOTP secret key",welcomeTitle:"Welcome to AliasVault!",welcomeDescription:"To use the AliasVault browser extension: navigate to a website and use the AliasVault autofill popup to create a new credential.",noPasskeysFound:"No passkeys have been created yet. Passkeys are created by visiting a website that offers passkeys as an authentication method.",noAttachmentsFound:"No credentials with attachments found",noMatchingCredentials:"No matching credentials found",createdAt:"Created",updatedAt:"Last updated",saveCredential:"Save credential",deleteCredentialTitle:"Delete Credential",deleteCredentialConfirm:"Are you sure you want to delete this credential? This action cannot be undone.",filters:{all:"(All) Credentials",passkeys:"Passkeys",aliases:"Aliases",userpass:"Passwords",attachments:"Attachments"},randomAlias:"Random Alias",manual:"Manual",service:"Service",serviceUrl:"Service URL",loginCredentials:"Login Credentials",generateRandomUsername:"Generate random username",generateRandomPassword:"Generate random password",changePasswordComplexity:"Change password complexity",passwordLength:"Password length",includeLowercase:"Include lowercase letters",includeUppercase:"Include uppercase letters",includeNumbers:"Include numbers",includeSpecialChars:"Include special characters",avoidAmbiguousChars:"Avoid ambiguous characters (o, 0, etc.)",generateNewPreview:"Generate new preview",generateRandomAlias:"Generate Random Alias",clearAliasFields:"Clear Alias Fields",alias:"Alias",firstName:"First Name",lastName:"Last Name",nickName:"Nick Name",gender:"Gender",birthDate:"Birth Date",birthDatePlaceholder:"YYYY-MM-DD",metadata:"Metadata",validation:{required:"This field is required",serviceNameRequired:"Service name is required",invalidEmail:"Invalid email format",invalidDateFormat:"Date must be in YYYY-MM-DD format"},privateEmailTitle:"Private Email",privateEmailAliasVaultServer:"AliasVault server",privateEmailDescription:"E2E encrypted, fully private.",publicEmailTitle:"Public Temp Email Providers",publicEmailDescription:"Anonymous but limited privacy. Email content is readable by anyone that knows the address.",useDomainChooser:"Use domain chooser",enterCustomDomain:"Enter custom domain",enterFullEmail:"Enter full email address",enterEmailPrefix:"Enter email prefix"},wN={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",errors:{invalidSecretKey:"Invalid secret key format."}},vN={title:"Emails",deleteEmailTitle:"Delete Email",deleteEmailConfirm:"Are you sure you want to permanently delete this email?",from:"From",to:"To",date:"Date",emailContent:"Email content",attachments:"Attachments",emailNotFound:"Email not found",noEmails:"No emails found",noEmailsDescription:"You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",dateFormat:{justNow:"just now",minutesAgo_single:"{{count}} min ago",minutesAgo_plural:"{{count}} mins ago",hoursAgo_single:"{{count}} hr ago",hoursAgo_plural:"{{count}} hrs ago",yesterday:"yesterday"},errors:{emailLoadError:"An error occurred while loading emails. Please try again later.",emailUnexpectedError:"An unexpected error occurred while loading emails. Please try again later."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"The current chosen email address is already in use. Please change the email address by editing this credential.",CLAIM_DOES_NOT_EXIST:"An error occurred while trying to load the emails. Please try to edit and save the credential entry to synchronize the database, then try again."}},CN={title:"Settings",serverUrl:"Server URL",language:"Language",autofillEnabled:"Enable Autofill",version:"Version",openInNewWindow:"Open in new window",openWebApp:"Open web app",loggedIn:"Logged in",logout:"Logout",lock:"Lock",globalSettings:"Global Settings",autofillPopup:"Autofill popup",activeOnAllSites:"Active on all sites (unless disabled below)",disabledOnAllSites:"Disabled on all sites",rightClickContextMenu:"Right-click context menu",autofillMatching:"Autofill Matching",autofillMatchingMode:"Autofill matching mode",autofillMatchingModeDescription:"Determines which credentials are considered a match and shown as suggestions in the autofill popup for a given website.",autofillMatchingDefault:"URL + subdomain + name wildcard",autofillMatchingUrlSubdomain:"URL + subdomain",autofillMatchingUrlExact:"Exact URL domain only",siteSpecificSettings:"Site-Specific Settings",autofillPopupOn:"Autofill popup on: ",enabledForThisSite:"Enabled for this site",disabledForThisSite:"Disabled for this site",temporarilyDisabledUntil:"Temporarily disabled until ",resetAllSiteSettings:"Reset all site-specific settings",appearance:"Appearance",theme:"Theme",useDefault:"Use default",light:"Light",dark:"Dark",keyboardShortcuts:"Keyboard Shortcuts",configureKeyboardShortcuts:"Configure keyboard shortcuts",configure:"Configure",clipboardClearTimeout:"Clear clipboard after copying",clipboardClearTimeoutDescription:"Automatically clear the clipboard after copying sensitive data",clipboardClearDisabled:"Never clear",clipboardClear5Seconds:"Clear after 5 seconds",clipboardClear10Seconds:"Clear after 10 seconds",clipboardClear15Seconds:"Clear after 15 seconds",autoLockTimeout:"Auto-lock Timeout",autoLockTimeoutDescription:"Automatically lock the vault after a period of inactivity",autoLockTimeoutHelp:"The vault will only lock after the specified period of inactivity (no autofill usage or extension popup opened). The vault will always lock when the browser is closed, regardless of this setting.",autoLockNever:"Never",autoLock15Seconds:"15 seconds",autoLock1Minute:"1 minute",autoLock5Minutes:"5 minutes",autoLock15Minutes:"15 minutes",autoLock30Minutes:"30 minutes",autoLock1Hour:"1 hour",autoLock4Hours:"4 hours",autoLock8Hours:"8 hours",autoLock24Hours:"24 hours",versionPrefix:"Version ",autofillSettings:"Autofill Settings",clipboardSettings:"Clipboard Settings",contextMenuSettings:"Context Menu Settings",passkeySettings:"Passkey Settings",contextMenu:"Context Menu",contextMenuEnabled:"Context menu is enabled",contextMenuDisabled:"Context menu is disabled",contextMenuDescription:"Right-click on input fields to access AliasVault options",selectLanguage:"Select Language",serverConfiguration:"Server Configuration",serverConfigurationDescription:"Configure the AliasVault server URL for self-hosted instances",customApiUrl:"API URL",customClientUrl:"Client URL",apiUrlHint:"The API endpoint URL (usually client URL + /api)",clientUrlHint:"The web interface URL of your self-hosted instance",autofillSettingsDescription:"Enable or disable the autofill popup on web pages",autofillEnabledDescription:"Autofill suggestions will appear on login forms",autofillDisabledDescription:"Autofill suggestions are disabled globally",languageSettings:"Language",validation:{apiUrlRequired:"API URL is required",apiUrlInvalid:"Please enter a valid API URL",clientUrlRequired:"Client URL is required",clientUrlInvalid:"Please enter a valid client URL"},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."}},xN={passkey:"Passkey",site:"Site",displayName:"Name",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.",bypass:{title:"Use Browser Passkey",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",useBrowserPasskey:"Use Browser Passkey"},create:{title:"Create Passkey",createFor:"Create a new passkey for",titleLabel:"Title",titlePlaceholder:"Enter a name for this passkey",createButton:"Create Passkey",useBrowserPasskey:"Use Browser Passkey",selectPasskeyToReplace:"Select a passkey to replace:",createNewPasskey:"Create New Passkey",replacingPasskey:"Replacing passkey: {{displayName}}",confirmReplace:"Confirm Replace"},settings:{passkeyProvider:"Passkey Provider",passkeyProviderOn:"Passkey Provider on "}},NN={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...",logout:"Logout",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}})"}},IN={auth:mN,menu:pN,common:yN,content:EN,credentials:bN,totp:wN,emails:vN,settings:CN,passkeys:xN,upgrade:NN},kN={loginTitle:"Kirjaudu sisään AliasVaultiin",username:"Käyttäjänimi tai sähköposti",usernamePlaceholder:"nimi / nimi@yritys.fi",password:"Salasana",passwordPlaceholder:"Syötä salasanasi",rememberMe:"Muista minut",loginButton:"Kirjaudu 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",logout:"Uloskirjautuminen",logoutConfirm:"Oletko varma, että haluat kirjautua ulos?",unlockSuccessTitle:"Holvisi lukitus on avattu",unlockSuccessDescription:"Voit nyt käyttää automaattista täyttöä sisäänkirjautumislomakkeissa selaimessasi.",closePopup:"Sulje tämä ponnahdusikkuna",browseVault:"Selaa holvin sisältöä",connectingTo:"Yhdistetään kohteeseen",switchAccounts:"Vaihdetaanko tiliä?",loggedIn:"Sisäänkirjautuneena",loginWithMobile:"Kirjaudu sisään mobiilisovelluksella",unlockWithMobile:"Avaa käyttämällä mobiilisovellusta",scanQrCode:"Skannaa tämä QR-koodi AliasVault-mobiilisovelluksellasi kirjautuaksesi sisään ja avataksesi holvisi.",errors:{invalidCode:"Syötä kelvollinen 6-numeroinen tunnistautumiskoodi.",serverError:"AliasVault-palvelimeen ei saatu yhteyttä. Yritä myöhemmin uudelleen tai ota yhteyttä tukeen, jos ongelma jatkuu.",wrongPassword:"Virheellinen salasana. Yritä uudelleen.",accountLocked:"Tili tilapäisesti lukittu liian monen epäonnistuneen yrityksen vuoksi.",networkError:"Verkkovirhe: tarkista yhteytesi ja yritä uudelleen.",sessionExpired:"Istuntosi on vanhentunut. Kirjaudu sisään uudelleen.",mobileLoginRequestExpired:"Mobiilikirjautumispyyntö aikakatkaistiin. Lataa sivu uudelleen ja yritä uudelleen."}},SN={credentials:"Tunnistetiedot",emails:"Sähköpostit",settings:"Asetukset"},TN={loading:"Ladataan...",notice:"Huomautus",error:"Virhe",cancel:"Peruuta",confirm:"Vahvista",back:"Takaisin",next:"Seuraava",use:"Käytä",delete:"Poista",save:"Save",or:"Tai",close:"Sulje",copied:"Kopioitu!",openInNewWindow:"Avaa uudessa ikkunassa",enabled:"Otettu käyttöön",disabled:"Pois käytöstä",showPassword:"Näytä salasana",hidePassword:"Piilota salasana",showDetails:"Näytä tiedot",hideDetails:"Piilota tiedot",copyToClipboard:"Kopioi leikepöydälle",loadingEmails:"Ladataan sähköposteja...",loadingTotpCodes:"Ladataan TOTP-koodeja...",attachments:"Liitteet",loadingAttachments:"Ladataan liitteitä...",settings:"Asetukset",recentEmails:"Viimeaikaiset sähköpostit",loginCredentials:"Sisäänkirjautumistunnistetiedot",twoFactorAuthentication:"Kaksivaiheinen tunnistautuminen",alias:"Alias",notes:"Huomautukset",fullName:"Koko nimi",firstName:"Etunimi",lastName:"Sukunimi",birthDate:"Syntymäpäivä",nickname:"Lempinimi",email:"Sähköposti",username:"Käyttäjänimi",password:"Salasana",syncingVault:"Synkronoidaan holvia",savingChangesToVault:"Tallennetaan muutoksia holviin",uploadingVaultToServer:"Ladataan holvi palvelimelle",checkingVaultUpdates:"Tarkistetaan holvin päivitysten varalta",syncingUpdatedVault:"Synkronoidaan päivitettyä holvia",executingOperation:"Suoritetaan toimintoa...",loadMore:"Lataa lisää",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ä."},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."}},BN={or:"tai",new:"Uusi",cancel:"Peruuta",vaultLocked:"AliasVault on lukittu.",creatingNewAlias:"Luodaan uutta aliasta...",noMatchesFound:"Osumia ei löytynyt",searchVault:"Etsi holvi...",serviceName:"Palvelun nimi",email:"Sähköposti",username:"Käyttäjänimi",password:"Salasana",enterServiceName:"Syötä palvelun nimi",enterEmailAddress:"Syötä sähköpostiosoite",enterUsername:"Syötä käyttäjänimi",hideFor1Hour:"Piilota 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"},LN={title:"Tunnistetiedot",addCredential:"Lisää tunnistetieto",editCredential:"Muokkaa tunnistetietoa",deleteCredential:"Poista tunnistetieto",credentialDetails:"Tunnistetietojen yksityiskohdat",serviceName:"Palvelun nimi",notes:"Huomautukset",totp:"Kaksivaiheinen tunnistautuminen",totpCode:"TOTP-koodi",copyTotp:"Kopioi TOTP-koodi",totpSecret:"TOTP-salaisuus",totpSecretPlaceholder:"Syötä TOTP-salainen avain",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,  Passkey ei ole vielä luotu. Todennusavaimet on luotu vierailemalla verkkosivustolla, joka tarjoaa todennusavaimia todennusmenetelmänä.",noAttachmentsFound:"Tunnuksia liitteiden kanssa ei löytynyt",noMatchingCredentials:"Vastaavia tunnistetietoja ei löytynyt",createdAt:"Luotu",updatedAt:"Viimeksi päivitetty",saveCredential:"Tallenna tunnistetieto",deleteCredentialTitle:"Poista tunnistetieto",deleteCredentialConfirm:"Oletko varma, että haluat poistaa tämän tunnistetiedon? Tätä toimintoa ei voi perua.",filters:{all:"(All) Käyttäjätunnukset",passkeys:"Sala-avaimet",aliases:"Aliakset",userpass:"Salasanat",attachments:"Liitteet"},randomAlias:"Sattumanvarainen alias",manual:"Käyttöopas",service:"Palvelu",serviceUrl:"Palvelun URL-osoite",loginCredentials:"Sisäänkirjautumistunnistetiedot",generateRandomUsername:"Luo sattumanvarainen käyttäjänimi",generateRandomPassword:"Luo sattumanvarainen salasana",changePasswordComplexity:"Muuta salasanan monimutkaisuutta",passwordLength:"Salasanan pituus",includeLowercase:"Sisällytä pienet kirjaimet",includeUppercase:"Sisällytä isot kirjaimet",includeNumbers:"Sisällytä numerot",includeSpecialChars:"Sisällytä erikoismerkit",avoidAmbiguousChars:"Vältä epäselviä merkkejä (o, 0, jne.)",generateNewPreview:"Luo uusi esikatselu",generateRandomAlias:"Luo sattumanvarainen alias",clearAliasFields:"Tyhjennä alias-kentät",alias:"Alias",firstName:"Etunimi",lastName:"Sukunimi",nickName:"Lempinimi",gender:"Sukupuoli",birthDate:"Syntymäpäivä",birthDatePlaceholder:"VVVV-KK-PP.",metadata:"Metatiedot",validation:{required:"Tämä kenttä on pakollinen.",serviceNameRequired:"Palvelun nimi on pakollinen",invalidEmail:"Virheellinen sähköpostiosoitteen muoto",invalidDateFormat:"Päivämäärän on oltava muodossa VVVV-KK-PP."},privateEmailTitle:"Yksityinen sähköposti",privateEmailAliasVaultServer:"AliasVault-palvelin",privateEmailDescription:"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.",useDomainChooser:"Käytä verkkotunnuksen valitsijaa",enterCustomDomain:"Syötä mukautettu verkkotunnus",enterFullEmail:"Syötä koko sähköpostiosoite",enterEmailPrefix:"Syötä sähköpostin etuliite"},DN={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",errors:{invalidSecretKey:"Invalid secret key format."}},RN={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ö",attachments:"Liitteet",emailNotFound:"Sähköpostia ei löytynyt",noEmails:"Sähköposteja ei löytynyt",noEmailsDescription:"Et ole vielä vastaanottanut sähköposteja yksityisissä sähköpostiosoitteissasi. Kun saat uuden sähköpostiviestin, se näkyy täällä.",dateFormat:{justNow:"juuri nyt",minutesAgo_single:"{{count}} min sitten",minutesAgo_plural:"{{count}} minuuttia sitten",hoursAgo_single:"{{count}} tunti sitten",hoursAgo_plural:"{{count}} tuntia sitten",yesterday:"eilen"},errors:{emailLoadError:"Sähköpostien lataamisessa tapahtui virhe. Yritä myöhemmin uudelleen.",emailUnexpectedError:"Odottamaton virhe sähköpostien lataamisen aikana. Yritä myöhemmin uudelleen."},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."}},UN={title:"Asetukset",serverUrl:"Palvelimen URL-osoite",language:"Kieli",autofillEnabled:"Ota automaattinen täyttö käyttöön",version:"Versio",openInNewWindow:"Avaa uudessa ikkunassa",openWebApp:"Avaa verkkosovellus",loggedIn:"Sisäänkirjautuneena",logout:"Uloskirjautuminen",lock:"Lukitse",globalSettings:"Yleisesti pätevät asetukset",autofillPopup:"Automaattisen täytön ponnahdusikkuna",activeOnAllSites:"Aktiivisena kaikilla sivustoilla (ellei sitä ole poistettu käytöstä alla)",disabledOnAllSites:"Pois käytöstä kaikilla sivustoilla",rightClickContextMenu:"Oikea-napsauta kontekstivalikkoa",autofillMatching:"Automaattisen täytön täsmäytys",autofillMatchingMode:"Automaattisen täytön täsmäytystila",autofillMatchingModeDescription:"Määrittää, mitkä tunnistetiedot katsotaan osumiksi ja näytetään ehdotuksina tietyn verkkosivuston automaattisen täytön ponnahdusikkunassa.",autofillMatchingDefault:"URL + aliverkkotunnus + nimi jokerimerkki",autofillMatchingUrlSubdomain:"URL + aliverkkotunnus",autofillMatchingUrlExact:"Tarkka URL-verkkotunnus vain",siteSpecificSettings:"Sivustokohtaiset asetukset",autofillPopupOn:"Automaattisen täytön ponnahdusikkuna päällä: ",enabledForThisSite:"Otettu käyttöön tällä sivustolla",disabledForThisSite:"Poistettu käytöstä tällä sivustolla",temporarilyDisabledUntil:"Väliaikaisesti pois käytöstä, kunnes ",resetAllSiteSettings:"Nollaa kaikki sivustokohtaiset asetukset",appearance:"Ulkoasu",theme:"Teema",useDefault:"Käytä oletusta",light:"Vaalea",dark:"Tumma",keyboardShortcuts:"Näppäimistön pikanppäimet",configureKeyboardShortcuts:"Määritä näppäimistön pikanäppäimet",configure:"Määritä",clipboardClearTimeout:"Tyhjennä leikepöytä kopioimisen jälkeen",clipboardClearTimeoutDescription:"Tyhjennä leikepöytä automaattisesti arkaluonteisten tietojen kopioimisen jälkeen",clipboardClearDisabled:"Älä koskaan tyhjennä",clipboardClear5Seconds:"Tyhjennä 5 sekunnin jälkeen",clipboardClear10Seconds:"Tyhjennä 10 sekunnin jälkeen",clipboardClear15Seconds:"Tyhjennä 15 sekunnin jälkeen",autoLockTimeout:"Automaattisen lukituksen aikakatkaisu",autoLockTimeoutDescription:"Lukitse holvi automaattisesti käyttämättömyysjakson jälkeen",autoLockTimeoutHelp:"Holvi lukittuu vasta määritetyn käyttämättömyysjakson jälkeen (ei automaattista täyttöä tai laajennusten ponnahdusikkunoita ole avattu). Holvi lukittuu aina, kun selain suljetaan, tästä asetuksesta riippumatta.",autoLockNever:"Ei koskaan",autoLock15Seconds:"15 sekuntia",autoLock1Minute:"1 minuutti",autoLock5Minutes:"5 minuuttia",autoLock15Minutes:"15 minuuttia",autoLock30Minutes:"30 minuuttia",autoLock1Hour:"1 tunti",autoLock4Hours:"4 tuntia",autoLock8Hours:"8 tuntia",autoLock24Hours:"24 tuntia",versionPrefix:"Versio",autofillSettings:"Automaatisen täytön asetukset",clipboardSettings:"Leikepöydän asetukset",contextMenuSettings:"Kontekstivalikon asetukset",passkeySettings:"Todennusavainten asetukset",contextMenu:"Sisältövalikko",contextMenuEnabled:"Kontekstivalikko on otettu käyttöön",contextMenuDisabled:"Kontekstivalikko on poistettu käytöstä",contextMenuDescription:"Oikea-napsauta syöttökenttiä päästäksesi AliasVaultin vaihtoehtoihin",selectLanguage:"Valitse kieli",serverConfiguration:"Palvelimen asetukset",serverConfigurationDescription:"Määritä AliasVault-palvelimen URL-osoite itse isännöityille instanssille",customApiUrl:"API-URL-osoite",customClientUrl:"Asiakas-URL-osoite",apiUrlHint:"API päätepisteen URL (yleensä asiakkaan URL + /api)",clientUrlHint:"Web-käyttöliittymän URL-osoite itse isännöidyssä instanssissa",autofillSettingsDescription:"Ota käyttöön tai poista käytöstä automaattisen täytön ponnahdusikkuna verkkosivuilta",autofillEnabledDescription:"Automaattisen täytön ehdotukset näkyvät kirjautumislomakkeissa",autofillDisabledDescription:"Automaattitäyttöehdotukset on poistettu käytöstä kaikkialla",languageSettings:"Keili",validation:{apiUrlRequired:"API-URL-osoite vaaditaan",apiUrlInvalid:"Syötä kelvollinen API-URL-osoite",clientUrlRequired:"Asiakkaan URL-osoite vaaditaan",clientUrlInvalid:"Syötä kelvollinen asiakas-URL-osoite"},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."}},MN={passkey:"Sala-avain",site:"Sivusto",displayName:"Nimi",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.",bypass:{title:"Käytä selaimen sala-avainta",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",useBrowserPasskey:"Käytä selaimen todennusavainta"},create:{title:"Luo Passkey, todennusavain",createFor:"Luo uusi Passkey, todennusavain",titleLabel:"Otsikko",titlePlaceholder:"Anna nimi tälle todennusavaimelle",createButton:"Luo todennusavain, Passkey",useBrowserPasskey:"Käytä selaimen sala-avainta",selectPasskeyToReplace:"Valitse todennusavain, johon korvataan",createNewPasskey:"Luo uusi sala-avain",replacingPasskey:"Korvaava todennusavain: {{displayName}}",confirmReplace:"Vahvista korvaaminen"},settings:{passkeyProvider:"Todennusavaimen toimittaja",passkeyProviderOn:"Todennusavaimen toimittaja käytössä "}},jN={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...",logout:"Uloskirjautuminen",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}})"}},ON={auth:kN,menu:SN,common:TN,content:BN,credentials:LN,totp:DN,emails:RN,settings:UN,passkeys:MN,upgrade:jN},_N={loginTitle:"כניסה ל־AliasVault",username:"שם משתמש או דוא״ל",usernamePlaceholder:"שם / name@company.com",password:"סיסמה",passwordPlaceholder:"נא למלא את הסיסמה שלך",rememberMe:"לזכור אותי",loginButton:"Log in",noAccount:"אין לך חשבון עדיין?",createVault:"יצירת כספת חדשה",twoFactorTitle:"נא למלא את קוד האימות מיישומון המאמת שלך.",authCode:"קוד אימות",authCodePlaceholder:"נא למלא קוד באורך 6 ספרות",verify:"אימות",twoFactorNote:"לתשומת ליבך: אם אין לך גישה להתקן המאמת (authenticator) שלך, אפשר לאפס אימות דו־שלבי עם קוד שחזור על ידי כניסה דרך האתר.",masterPassword:"סיסמת על",unlockVault:"Unlock",unlockWithPin:"שחרור נעילה עם קוד אישי",enterPinToUnlock:"נא למלא את הקוד האישי שלך כדי לשחרר את הכספת שלך",useMasterPassword:"להשתמש בסיסמה על",unlockTitle:"שחרור נעילת הכספת שלך",logout:"יציאה",logoutConfirm:"לצאת?",unlockSuccessTitle:"נעילת הכספת שלך נפתחה בהצלחה",unlockSuccessDescription:"מעתה ניתן להשתמש בהשלמה אוטומטית בטופסי כניסה בדפדפן שלך.",closePopup:"סגירת החלונית הצצה הזאת",browseVault:"עיון בתוכן הכספת",connectingTo:"מתבצעת התחברות אל",switchAccounts:"להחליף חשבונות?",loggedIn:"נכנסת",loginWithMobile:"Log in using Mobile App",unlockWithMobile:"Unlock using Mobile App",scanQrCode:"Scan this QR code with your AliasVault mobile app to log in and unlock your vault.",errors:{invalidCode:"נא למלא קוד אימות באורך 6 ספרות.",serverError:"לא ניתן ליצור קשר עם השרת של AliasVault. נא לנסות שוב מאוחר יותר או ליצור קשר עם התמיכה אם הבעיה נשנית.",wrongPassword:"סיסמה שגויה. נא לנסות שוב.",accountLocked:"החשבון נעול זמנית עקב ריבוי ניסיונות כושלים.",networkError:"שגיאת רשת. נא לבדוק את החיבור ולנסות שוב.",sessionExpired:"תוקף ההפעלה שלך פג. נא להיכנס מחדש.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."}},PN={credentials:"פרטי גישה",emails:"הודעות דוא״ל",settings:"הגדרות"},FN={loading:"בטעינה…",notice:"לתשומת ליבך",error:"שגיאה",cancel:"ביטול",confirm:"אישור",back:"חזרה",next:"הבא",use:"להשתמש",delete:"מחיקה",save:"Save",or:"או",close:"סגירה",copied:"הועתק!",openInNewWindow:"פתיחה בחלון חדש",enabled:"פעיל",disabled:"כבוי",showPassword:"הצגת סיסמה",hidePassword:"הסתרת סיסמה",showDetails:"הצגת פרטים",hideDetails:"הסתרת פרטים",copyToClipboard:"העתקה ללוח הגזירים",loadingEmails:"הודעות הדוא״ל נטענות…",loadingTotpCodes:"הקודים החד־פעמיים הזמניים נטענים…",attachments:"צרופות",loadingAttachments:"הצרופות נטענות…",settings:"הגדרות",recentEmails:"הודעות דוא״ל אחרונות",loginCredentials:"פרטי הגישה",twoFactorAuthentication:"אימות דו־שלבי",alias:"כינוי",notes:"הערות",fullName:"שם מלא",firstName:"שם פרטי",lastName:"שם משפחה",birthDate:"תאריך לידה",nickname:"כינוי",email:"דוא״ל",username:"שם משתמש",password:"סיסמה",syncingVault:"הכספת מסתנכרת",savingChangesToVault:"השינוים לכספת נשמרים",uploadingVaultToServer:"הכספת נשלחת לשרת",checkingVaultUpdates:"מתבצעת בדיקה לשינויים בכספת",syncingUpdatedVault:"הכספת העדכנית מסתנכרת",executingOperation:"הפעולה רצה…",loadMore:"לטעון עוד",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:"הסיסמה שלך השתנתה מאז הפעם האחרונה שנכנסת למערכת. נא להיכנס שוב מטעמי אבטחת מידע."},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:"הכספת המקומית אינה עדכנית. נא לסנכרן את הכספת שלך על ידי ריענון העמוד ולנסות שוב."}},QN={or:"או",new:"חדש",cancel:"ביטול",vaultLocked:"AliasVault נעול.",creatingNewAlias:"נוצר כינוי חדש...",noMatchesFound:"לא נמצאו תוצאות",searchVault:"חיפוש בכספת…",serviceName:"שם השירות",email:"דוא״ל",username:"שם משתמש",password:"סיסמה",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:"התעלמות מחלונית"},HN={title:"פרטי גישה",addCredential:"הוספת פרטי גישה",editCredential:"עריכת פרטי גישה",deleteCredential:"מחיקת פרטי גישה",credentialDetails:"פירוט פרטי גישה",serviceName:"שם השירות",notes:"הערות",totp:"אימות דו־שלבי",totpCode:"קוד חד־פעמי זמני",copyTotp:"העתקת קוד חד־פעמי זמני",totpSecret:"סוג סיסמה חד־פעמית זמנית",totpSecretPlaceholder:"נא למלא מפתח סודי לסיסמה חד־פעמית זמנית",welcomeTitle:"ברוך בואך ל־AliasVault!",welcomeDescription:"כדי להשתמש בהרחבת הדפדפן של AliasVault: יש לנווט לאתר ולהשתמש בחלונית ההשלמה האוטומטית של AliasVault כדי ליצור פרטי גישה חדשים.",noPasskeysFound:"No passkeys have been created yet. Passkeys are created by visiting a website that offers passkeys as an authentication method.",noAttachmentsFound:"No credentials with attachments found",noMatchingCredentials:"No matching credentials found",createdAt:"יצירה",updatedAt:"עדכון אחרון",saveCredential:"שמירת פרטי גישה",deleteCredentialTitle:"מחיקת פרטי גישה",deleteCredentialConfirm:"למחוק את פרטי הגישה? זאת פעולה בלתי הפיכה.",filters:{all:"(כל) פרטי הגישה",passkeys:"Passkeys",aliases:"כינויים",userpass:"סיסמאות",attachments:"Attachments"},randomAlias:"כינוי אקראי",manual:"ידני",service:"שירות",serviceUrl:"כתובת השירות",loginCredentials:"פרטי הגישה",generateRandomUsername:"יצירת שם משתמש אקראי",generateRandomPassword:"יצירת סיסמה אקראית",changePasswordComplexity:"החלפת מורכבת הסיסמה",passwordLength:"אורך הסיסמה",includeLowercase:"לכלול אותיות קטנות",includeUppercase:"לכלול אותיות גדולות",includeNumbers:"לכלול מספרים",includeSpecialChars:"לכלול תווים מיוחדים",avoidAmbiguousChars:"עדיף להימנע מאותיות וספרות שדומים זה לזה (o,‏ 0 וכו׳)",generateNewPreview:"יצירת תצוגה מקדימה חדשה",generateRandomAlias:"יצירת כינוי אקראי",clearAliasFields:"לפנות שדות כינויים",alias:"כינוי",firstName:"שם פרטי",lastName:"שם משפחה",nickName:"כינוי",gender:"מגדר",birthDate:"תאריך לידה",birthDatePlaceholder:"YYYY-MM-DD",metadata:"נתוני על",validation:{required:"שדה חובה",serviceNameRequired:"שם השירות חובה",invalidEmail:"תבנית דוא״ל שגויה",invalidDateFormat:"התאריך חייב להיות בתבנית YYYY-MM-DD"},privateEmailTitle:"כתובת דוא״ל פרטית",privateEmailAliasVaultServer:"שרת AliasVault",privateEmailDescription:"הצפנה מקצה לקצה, פרטיות מלאה.",publicEmailTitle:"ספקי תיבת דוא״ל זמנית ציבוריים",publicEmailDescription:"פרטיות אלמונית אך מוגבלת. תוכן הדוא״ל נגיש לכל מי שיודע את הכתובת.",useDomainChooser:"להשתמש בבורר שמות התחום",enterCustomDomain:"נא למלא שם תחום מותאם אישית",enterFullEmail:"נא למלא כתובת דוא״ל מלאה",enterEmailPrefix:"נא למלא קידומת דוא״ל"},zN={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",errors:{invalidSecretKey:"Invalid secret key format."}},VN={title:"הודעות דוא״ל",deleteEmailTitle:"מחיקת הודעת דוא״ל",deleteEmailConfirm:"למחוק את הודעת הדוא״ל הזאת לצמיתות?",from:"מאת",to:"אל",date:"תאריך",emailContent:"תוכן הודעת דוא״ל",attachments:"צרופות",emailNotFound:"הודעת הדוא״ל לא נמצאה",noEmails:"לא נמצאו הודעות דוא״ל",noEmailsDescription:"לא קיבלת הודעות דוא״ל כלשהן לכתובות הדוא״ל הפרטיות שלך עדיין. כשמגיעה הודעה חדשה היא תופיע כאן.",dateFormat:{justNow:"ממש הרגע",minutesAgo_single:"לפני דקה",minutesAgo_plural:"לפני {{count}} דקות",hoursAgo_single:"לפני שעה",hoursAgo_plural:"לפני {{count}} שעות",yesterday:"אתמול"},errors:{emailLoadError:"אירעה שגיאה בטעינת הודעות הדוא״ל. נא לנסות שוב מאוחר יותר.",emailUnexpectedError:"אירעה שגיאה לא צפויה בטעינת הודעות הדוא״ל. נא לנסות שוב מאוחר יותר."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"כתובת הדוא״ל שנבחרה תפוסה. נא לשנות את כתובת הדוא״ל על ידי עריכת פרטי הגישה.",CLAIM_DOES_NOT_EXIST:"אירעה שגיאה בניסיון לטעון את הודעות הדוא״ל. נא לנסות לערוך ולשמור את רשומת פרטי הקשר כדי לסנכרן את מסד הנתונים ואז לנסות שוב."}},GN={title:"הגדרות",serverUrl:"כתובת שרת",language:"שפה",autofillEnabled:"הפעלת השלמה אוטומטית",version:"גרסה",openInNewWindow:"פתיחה בחלון חדש",openWebApp:"פתיחת אתר",loggedIn:"נכנסת",logout:"יציאה",lock:"נעילה",globalSettings:"הגדרות מקיפות",autofillPopup:"חלונית השלמה אוטומטית",activeOnAllSites:"פעיל בכל האתרים (למעט אם נכבה להלן)",disabledOnAllSites:"כבוי בכל האתרים",rightClickContextMenu:"תפריט הקשר בלחיצה ימנית",autofillMatching:"התאמת השלמה אוטומטית",autofillMatchingMode:"מצב התאמת השלמה אוטומטית",autofillMatchingModeDescription:"הגדרה אילו פרטי גישה נחשבים תואמים ויופיעו כהצעות בחלונית ההשלמה האוטומטית לאתר מסוים.",autofillMatchingDefault:"כתובת + שם תת־תחום + תו כל על שם",autofillMatchingUrlSubdomain:"כתובת + שם תת־תחום",autofillMatchingUrlExact:"תחום כתובת מדויקת בלבד",siteSpecificSettings:"הגדרות תואמות אתר",autofillPopupOn:"חלונית השלמה אוטומטית ב־: ",enabledForThisSite:"פעיל לאתר הזה",disabledForThisSite:"כבוי לאתר הזה",temporarilyDisabledUntil:"כבוי זמנית עד ",resetAllSiteSettings:"איפוס כל ההגדרות הנקודתיות לאתרים",appearance:"מראה",theme:"ערכת עיצוב",useDefault:"להשתמש בברירת המחדל",light:"בהירה",dark:"כהה",keyboardShortcuts:"קיצורי מקלדת",configureKeyboardShortcuts:"הגדרת קיצורי מקלדת",configure:"הגדרה",clipboardClearTimeout:"לפנות את לוח הגזירים לאחר העתקה",clipboardClearTimeoutDescription:"לפנות את לוח הגזירים אוטומטית לאחר העתקת נתונים רגישים",clipboardClearDisabled:"אף פעם לא לפנות",clipboardClear5Seconds:"לפנות אחרי 5 שניות",clipboardClear10Seconds:"לפנות אחרי 10 שניות",clipboardClear15Seconds:"לפנות אחרי 15 שניות",autoLockTimeout:"תום המתנה לנעילה אוטומטית",autoLockTimeoutDescription:"לנעול את הכספת אוטומטית לאחר פרק זמן של חוסר פעילות",autoLockTimeoutHelp:"הכספת תינעל רק לאחר משך זמן של חוסר פעילות (אין שימוש בהשלמה אוטומטית או פתיחת חלונית הרחבה). הכספת תמיד תינעל עם סגירת הדפדפן, ללא תלות בהגדרה הזאת.",autoLockNever:"אף פעם",autoLock15Seconds:"15 שניות",autoLock1Minute:"דקה",autoLock5Minutes:"5 דקות",autoLock15Minutes:"15 דקות",autoLock30Minutes:"30 דקות",autoLock1Hour:"שעה",autoLock4Hours:"4 שעות",autoLock8Hours:"8 שעות",autoLock24Hours:"24 שעות",versionPrefix:"גרסה ",autofillSettings:"הגדרות השלמה אוטומטית",clipboardSettings:"הגדרות לוח הגזירים",contextMenuSettings:"הגדרות תפריט הקשר",passkeySettings:"Passkey Settings",contextMenu:"תפריט הקשר",contextMenuEnabled:"תפריט הקשר פעיל",contextMenuDisabled:"תפריט הקשר כבוי",contextMenuDescription:"ניתן ללחוץ על שדה עם הלחצן הימני כדי לגשת לאפשרויות AliasVault",selectLanguage:"בחירת שפה",serverConfiguration:"הגדרות שרת",serverConfigurationDescription:"הגדרת כתובת שרת AliasVault לעותקים באירוח עצמי",customApiUrl:"כתובת API",customClientUrl:"כתובת לקוח",apiUrlHint:"נקודת הקצה של ה־API (בדרך כלל כתובת לקוח + ‎/api)",clientUrlHint:"כתובת ממשק המשתמש הדפדפני של העותק באירוע העצמי שלך",autofillSettingsDescription:"הפעלת או כיבוי חלוניות השלמה אוטומטית בעמודי אתרים",autofillEnabledDescription:"הצעות השלמה אוטומטית בטופסי כניסה למערכות",autofillDisabledDescription:"הצעות השלמה אוטומטית כבויות באופן מקיף",languageSettings:"שפה",validation:{apiUrlRequired:"כתובת API חובה",apiUrlInvalid:"נא למלא כתובת API תקפה",clientUrlRequired:"כתובת לקוח חובה",clientUrlInvalid:"נא למלא כתובת לקוח תקפה"},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."}},KN={passkey:"Passkey",site:"אתר",displayName:"שם",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.",bypass:{title:"Use Browser Passkey",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",useBrowserPasskey:"Use Browser Passkey"},create:{title:"Create Passkey",createFor:"Create a new passkey for",titleLabel:"כותרת",titlePlaceholder:"Enter a name for this passkey",createButton:"Create Passkey",useBrowserPasskey:"Use Browser Passkey",selectPasskeyToReplace:"Select a passkey to replace:",createNewPasskey:"Create New Passkey",replacingPasskey:"Replacing passkey: {{displayName}}",confirmReplace:"אישור החלפה"},settings:{passkeyProvider:"Passkey Provider",passkeyProviderOn:"Passkey Provider on "}},qN={title:"שדרוג כספת",subtitle:"AliasVault התעדכן וצריך לשדרג את הכספת שלך. הפעולה הזאת אמורה לארוך מספר שניות.",versionInformation:"פרטי גרסה",yourVault:"גרסת הכספת שלך:",newVersion:"הגרסה החדשה הזמינה:",upgrade:"שדרוג כספת",upgrading:"משתדרגת…",logout:"יציאה",whatsNew:"מה חדש",whatsNewDescription:"יש לשדרג כדי שתהיה תמיכה בשינויים הבאים:",noDescriptionAvailable:"אין תיאור זמין לגרסה הזאת.",alerts:{unableToGetVersionInfo:"לא ניתן לקבל את פרטי הגרסה. נא לנסות שוב מאוחר יותר.",selfHostedServer:"שרת באירוח עצמי",selfHostedWarning:"אם מדובר בשרת שמתארח עצמאית, נא לוודא שהעותק שמתארח אצלך גם כן מתעדכן כי אחרת הכניסה לאתר תפסיק לעבוד.",continueUpgrade:"להמשיך בשדרוג",upgradeFailed:"השדרוג נכשל",failedToApplyMigration:"החלת ההסבה נכשלה ({{current}} מתוך {{total}})"}},YN={auth:_N,menu:PN,common:FN,content:QN,credentials:HN,totp:zN,emails:VN,settings:GN,passkeys:KN,upgrade:qN},JN={loginTitle:"Accedi ad AliasVaultriem",username:"Nome utente o mail",usernamePlaceholder:"nome / nome@azienda.com",password:"Password",passwordPlaceholder:"Inserisci la tua password",rememberMe:"Ricordati di me",loginButton:"Accedi",noAccount:"Non hai ancora un account?",createVault:"Crea una nuova cassaforte",twoFactorTitle:"Inserisci il codice di autenticazione dalla tua app di autenticazione.",authCode:"Codice di Autenticazione",authCodePlaceholder:"Inserisci il codice a 6 cifre",verify:"Verifica",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",logout:"Disconnetti",logoutConfirm:"Sei sicuro di volerti disconnettere?",unlockSuccessTitle:"La cassaforte è stata sbloccata con successo",unlockSuccessDescription:"Ora puoi usare l'auto-riempimento nei moduli di accesso nel tuo browser.",closePopup:"Chiudi questo popup",browseVault:"Sfoglia i contenuti della cassaforte",connectingTo:"Connessione a",switchAccounts:"Cambia account",loggedIn:"Accesso effettuato",loginWithMobile:"Accedi con l'App Mobile",unlockWithMobile:"Sblocca con l'App Mobile",scanQrCode:"Scansiona questo codice QR con l'app mobile di AliasVault per accedere e sbloccare la cassaforte.",errors:{invalidCode:"Inserisci un codice di autenticazione a 6 cifre valido.",serverError:"Impossibile connettersi al server di AliasVault. Riprova più tardi o contatta il supporto se il problema persiste.",wrongPassword:"Password non corretta. Riprova nuovamente.",accountLocked:"Account temporaneamente bloccato a causa di troppi tentativi falliti.",networkError:"Errore di rete: Controlla la tua connessione e riprova.",sessionExpired:"La tua sessione è scaduta. Effettua di nuovo il login.",mobileLoginRequestExpired:"Richiesta di accesso mobile scaduta. Per favore ricarica la pagina e riprova."}},WN={credentials:"Credenziali",emails:"E-Mail",settings:"Impostazioni"},XN={loading:"Caricamento in corso...",notice:"Avviso",error:"Errore",cancel:"Annulla",confirm:"Conferma",back:"Indietro",next:"Avanti",use:"Usa",delete:"Elimina",save:"Salva",or:"O",close:"Chiudi",copied:"Copiato!",openInNewWindow:"Apri in una nuova finestra",enabled:"Abilitato",disabled:"Disabilitato",showPassword:"Mostra password",hidePassword:"Nascondi password",showDetails:"Mostra dettagli",hideDetails:"Nascondi dettagli",copyToClipboard:"Copia negli appunti",loadingEmails:"Caricamento e-mail in corso...",loadingTotpCodes:"Caricamento codici TOTP in corso...",attachments:"Allegati",loadingAttachments:"Caricamento allegati in corso...",settings:"Impostazioni",recentEmails:"E-mail recenti",loginCredentials:"Credenziali di accesso",twoFactorAuthentication:"Autenticazione a due fattori",alias:"Alias",notes:"Note",fullName:"Nome completo",firstName:"Nome",lastName:"Cognome",birthDate:"Data di nascita",nickname:"Soprannome",email:"E-mail",username:"Nome utente",password:"Password",syncingVault:"Sincronizzazione cassaforte",savingChangesToVault:"Salvataggio modifiche cassaforte",uploadingVaultToServer:"Caricamento cassaforte sul server",checkingVaultUpdates:"Controllo aggiornamenti cassaforte",syncingUpdatedVault:"Sincronizzazione cassaforte aggiornata",executingOperation:"Esecuzione operazione...",loadMore:"Carica altro",errors:{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."},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."}},$N={or:"o",new:"Nuovo",cancel:"Annulla",vaultLocked:"AliasVault è bloccato.",creatingNewAlias:"Creazione nuovo alias...",noMatchesFound:"Nessun risultato trovato",searchVault:"Cerca nella cassaforte...",serviceName:"Nome servizio",email:"E-mail",username:"Nome utente",password:"Password",enterServiceName:"Inserisci nome servizio",enterEmailAddress:"Inserisci indirizzo email",enterUsername:"Inserisci nome utente",hideFor1Hour:"Nascondi per 1 ora (sito corrente)",hidePermanently:"Nascondi permanentemente (sito corrente)",createRandomAlias:"Crea alias casuale",createUsernamePassword:"Crea nome utente/password",randomAlias:"Alias casuale",usernamePassword:"Nome utente/password",createAndSaveAlias:"Crea e salva alias",createAndSaveCredential:"Crea e salva credenziali",randomIdentityDescription:"Genera un'identità casuale con un indirizzo email casuale accessibile in AliasVault.",randomIdentityDescriptionDropdown:"Identità casuale con email casuale",manualCredentialDescription:"Specifica il tuo indirizzo email e nome utente.",manualCredentialDescriptionDropdown:"Nome utente e password manuali",failedToCreateIdentity:"Impossibile creare identità. Riprova.",enterEmailAndOrUsername:"Inserisci email e/o nome utente",autofillWithAliasVault:"Compilazione automatica con AliasVault",generateRandomPassword:"Genera password casuale (copia negli appunti)",generateNewPassword:"Genera nuova password",togglePasswordVisibility:"Mostra/Nascondi password",passwordCopiedToClipboard:"Password copiata negli appunti",openAliasVaultToUpgrade:"Apri AliasVault per aggiornare",vaultUpgradeRequired:"Aggiornamento della cassaforte richiesto.",dismissPopup:"Chiudi finestra"},ZN={title:"Credenziali",addCredential:"Aggiungi credenziali",editCredential:"Modifica credenziali",deleteCredential:"Elimina credenziali",credentialDetails:"Dettagli credenziali",serviceName:"Nome servizio",notes:"Note",totp:"Autenticazione a due fattori",totpCode:"Codice TOTP",copyTotp:"Copia TOTP",totpSecret:"Segreto TOTP",totpSecretPlaceholder:"Inserisci chiave segreta TOTP",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 chiavi di accesso. Le passkey vengono create visitando un sito web che offre le chiavi di accesso come metodo di autenticazione.",noAttachmentsFound:"Non sono state trovate credenziali con allegati",noMatchingCredentials:"Nessuna credenziale corrispondente trovata",createdAt:"Creato",updatedAt:"Ultimo aggiornamento",saveCredential:"Salva credenziale",deleteCredentialTitle:"Elimina credenziale",deleteCredentialConfirm:"Sei sicuro di voler eliminare queste credenziali? Questa azione non può essere annullata.",filters:{all:"(Tutte) Credenziali",passkeys:"Passkey",aliases:"Alias",userpass:"Password",attachments:"Allegati"},randomAlias:"Alias casuale",manual:"Manuale",service:"Servizio",serviceUrl:"URL del servizio",loginCredentials:"Credenziali di accesso",generateRandomUsername:"Genera nome utente casuale",generateRandomPassword:"Genera password casuale",changePasswordComplexity:"Modifica complessità password",passwordLength:"Lunghezza password",includeLowercase:"Includi lettere minuscole",includeUppercase:"Includi lettere maiuscole",includeNumbers:"Includi numeri",includeSpecialChars:"Includi caratteri speciali",avoidAmbiguousChars:"Evita caratteri ambigui (o, 0, ecc.)",generateNewPreview:"Genera nuova anteprima",generateRandomAlias:"Genera alias casuale",clearAliasFields:"Cancella Campi Alias",alias:"Alias",firstName:"Nome",lastName:"Cognome",nickName:"Soprannome",gender:"Genere",birthDate:"Data di nascita",birthDatePlaceholder:"AAAA-MM-GG",metadata:"Metadati",validation:{required:"Questo campo è obbligatorio",serviceNameRequired:"Il nome del servizio è obbligatorio",invalidEmail:"Formato email non valido",invalidDateFormat:"La data deve essere nel formato AAAA-MM-GG"},privateEmailTitle:"Email privata",privateEmailAliasVaultServer:"Server AliasVault",privateEmailDescription:"E2E crittografato, completamente privato.",publicEmailTitle:"Fornitori Pubblici di Email Temporanee",publicEmailDescription:"Anonimi ma con privacy ridotta. Accessibile a chiunque conosca l'indirizzo.",useDomainChooser:"Usa selettore di dominio",enterCustomDomain:"Inserisci un dominio personalizzato",enterFullEmail:"Inserisci l'indirizzo email completo",enterEmailPrefix:"Inserisci prefisso email"},eI={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",errors:{invalidSecretKey:"Formato chiave segreta non valido."}},tI={title:"Email",deleteEmailTitle:"Elimina Email",deleteEmailConfirm:"Sei sicuro di voler eliminare definitivamente questa email?",from:"Da",to:"A",date:"Data",emailContent:"Contenuto email",attachments:"Allegati",emailNotFound:"Email non trovata",noEmails:"Nessuna email trovata",noEmailsDescription:"Non hai ancora ricevuto email ai tuoi indirizzi email privati. Quando ne riceverai una nuova, apparirà qui.",dateFormat:{justNow:"proprio ora",minutesAgo_single:"{{count}} min fa",minutesAgo_plural:"{{count}} min fa",hoursAgo_single:"{{count}} ora fa",hoursAgo_plural:"{{count}} ore fa",yesterday:"ieri"},errors:{emailLoadError:"Si è verificato un errore durante il caricamento delle email. Riprova più tardi.",emailUnexpectedError:"Si è verificato un errore imprevisto durante il caricamento delle email. Riprova più tardi."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"L'indirizzo email attualmente scelto è già in uso. Cambia l'indirizzo modificando queste credenziali.",CLAIM_DOES_NOT_EXIST:"Si è verificato un errore durante il caricamento delle email. Prova a modificare e salvare le credenziali per sincronizzare il database, poi riprova."}},aI={title:"Impostazioni",serverUrl:"URL del server",language:"Lingua",autofillEnabled:"Abilita compilazione automatica",version:"Versione",openInNewWindow:"Apri in una nuova finestra",openWebApp:"Apri app web",loggedIn:"Accesso effettuato",logout:"Disconnetti",lock:"Blocca",globalSettings:"Impostazioni globali",autofillPopup:"Popup compilazione automatica",activeOnAllSites:"Attivo su tutti i siti (a meno che non sia disabilitato sotto)",disabledOnAllSites:"Disabilitato su tutti i siti",rightClickContextMenu:"Menu contestuale clic destro",autofillMatching:"Riconoscimento campi automatica.",autofillMatchingMode:"Modalità riconoscimento capi automatica",autofillMatchingModeDescription:"Determina quali credenziali vengono considerate corrispondenti e mostrate come suggerimenti nel popup di compilazione automatica per un determinato sito web.",autofillMatchingDefault:"URL + sottodominio + nome wildcard",autofillMatchingUrlSubdomain:"URL + sottodominio",autofillMatchingUrlExact:"Solo dominio URL esatto",siteSpecificSettings:"Impostazioni specifiche per sito",autofillPopupOn:"Finestra compilazione automatica su: ",enabledForThisSite:"Abilitato per questo sito",disabledForThisSite:"Disabilitato per questo sito",temporarilyDisabledUntil:"Disabilitato temporaneamente fino a ",resetAllSiteSettings:"Reimposta tutte le impostazioni specifiche per sito",appearance:"Aspetto",theme:"Tema",useDefault:"Usa predefinito",light:"Chiaro",dark:"Scuro",keyboardShortcuts:"Scorciatoie da tastiera",configureKeyboardShortcuts:"Configura scorciatoie da tastiera",configure:"Configura",clipboardClearTimeout:"Cancella appunti dopo la copia",clipboardClearTimeoutDescription:"Cancella automaticamente gli appunti dopo aver copiato i dati sensibili",clipboardClearDisabled:"Non pulire mai",clipboardClear5Seconds:"Cancella dopo 5 secondi",clipboardClear10Seconds:"Cancella dopo 10 secondi",clipboardClear15Seconds:"Cancella dopo 15 secondi",autoLockTimeout:"Timeout Blocco Automatico",autoLockTimeoutDescription:"Blocca automaticamente la cassaforte dopo un periodo di inattività",autoLockTimeoutHelp:"La cassaforte si bloccherà solo dopo il periodo specificato di inattività (nessun utilizzo di riempimento automatico o estensione popup aperto). La cassaforte si bloccherà sempre quando il browser è chiuso, indipendentemente da questa impostazione.",autoLockNever:"Mai",autoLock15Seconds:"15 secondi",autoLock1Minute:"1 minuto",autoLock5Minutes:"5 minuti",autoLock15Minutes:"15 minuti",autoLock30Minutes:"30 minuti",autoLock1Hour:"1 ora",autoLock4Hours:"4 ore",autoLock8Hours:"8 ore",autoLock24Hours:"24 ore",versionPrefix:"Versione ",autofillSettings:"Impostazioni di riempimento automatico",clipboardSettings:"Impostazioni appunti",contextMenuSettings:"Preferenze menu contestuale",passkeySettings:"Impostazioni Passkey",contextMenu:"Menu contestuale",contextMenuEnabled:"Il menu contestuale è attivato",contextMenuDisabled:"Il menu contestuale è disabilitato",contextMenuDescription:"Click destro sui campi di input per accedere alle opzioni di AliasVault",selectLanguage:"Seleziona la lingua",serverConfiguration:"Configurazione del server",serverConfigurationDescription:"Configurare l'URL del server AliasVault per le istanze self-hosted",customApiUrl:"API URL",customClientUrl:"Url Client",apiUrlHint:"L'URL endpoint API (di solito URL client + /api)",clientUrlHint:"L'URL dell'interfaccia web della tua istanza self-hosted",autofillSettingsDescription:"Abilita o disabilita il popup di riempimento automatico sulle pagine web",autofillEnabledDescription:"I suggerimenti di riempimento automatico appariranno nei moduli di accesso",autofillDisabledDescription:"I suggerimenti di riempimento automatico sono disabilitati",languageSettings:"Lingua",validation:{apiUrlRequired:"L'URL API è obbligatorio",apiUrlInvalid:"Inserisci un URL API valido",clientUrlRequired:"L'URL del client è obbligatorio",clientUrlInvalid:"Inserisci un URL del client valido"},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."}},nI={passkey:"Passkey",site:"Sito",displayName:"Nome",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.",bypass:{title:"Usa Browser Passkey",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",useBrowserPasskey:"Usa Browser Passkey"},create:{title:"Crea Passkey",createFor:"Crea una nuova passkey per",titleLabel:"Titolo",titlePlaceholder:"Inserisci un nome per questa passkey",createButton:"Crea Passkey",useBrowserPasskey:"Usa Browser Passkey",selectPasskeyToReplace:"Selezionare una chiave di accesso da sostituire:",createNewPasskey:"Crea Nuova Passkey",replacingPasskey:"Sostituzione passkey: {{displayName}}",confirmReplace:"Conferma la sostituzione"},settings:{passkeyProvider:"Provider Passkey",passkeyProviderOn:"Passkey Provider attivo"}},rI={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...",logout:"Disconnetti",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}})"}},iI={auth:JN,menu:WN,common:XN,content:$N,credentials:ZN,totp:eI,emails:tI,settings:aI,passkeys:nI,upgrade:rI},sI={loginTitle:"Inloggen bij AliasVault",username:"Gebruikersnaam of e-mail",usernamePlaceholder:"naam / naam@bedrijf.com",password:"Wachtwoord",passwordPlaceholder:"Voer je wachtwoord in",rememberMe:"Onthoud mij",loginButton:"Inloggen",noAccount:"Nog geen account?",createVault:"Nieuwe vault aanmaken",twoFactorTitle:"Voer de authenticatiecode van je authenticator-app in.",authCode:"Authenticatiecode",authCodePlaceholder:"Voer 6-cijferige code in",verify:"Verifiëren",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",logout:"Uitloggen",logoutConfirm:"Weet je zeker dat je wilt uitloggen?",unlockSuccessTitle:"Je vault is succesvol ontgrendeld",unlockSuccessDescription:"Je kunt nu automatisch invullen gebruiken in inlogformulieren in je browser.",closePopup:"Sluit deze popup",browseVault:"Bekijk vault inhoud",connectingTo:"Verbinden met",switchAccounts:"Wisselen van account?",loggedIn:"Ingelogd",loginWithMobile:"Log in via de mobiele app",unlockWithMobile:"Ontgrendel met mobiele app",scanQrCode:"Scan deze QR-code met de AliasVault mobiele app om in te loggen en je kluis te ontgrendelen.",errors:{invalidCode:"Voer een geldige 6-cijferige code in.",serverError:"Kon de AliasVault server niet bereiken. Probeer het later opnieuw of neem contact op met support als het probleem aanhoudt.",wrongPassword:"Onjuist wachtwoord. Probeer het opnieuw.",accountLocked:"Account tijdelijk vergrendeld vanwege te veel mislukte pogingen.",networkError:"Netwerkfout. Controleer de verbinding en probeer het opnieuw.",sessionExpired:"Je sessie is verlopen. Log opnieuw in.",mobileLoginRequestExpired:"Time-out van de mobiele inlogaanvraag. Herlaad de pagina en probeer opnieuw."}},oI={credentials:"Credentials",emails:"E-mails",settings:"Instellingen"},lI={loading:"Laden...",notice:"Melding",error:"Fout",cancel:"Annuleren",confirm:"Bevestigen",back:"Terug",next:"Volgende",use:"Gebruik",delete:"Verwijderen",save:"Opslaan",or:"Of",close:"Sluiten",copied:"Gekopieerd!",openInNewWindow:"Openen in nieuw venster",enabled:"Ingeschakeld",disabled:"Uitgeschakeld",showPassword:"Wachtwoord tonen",hidePassword:"Wachtwoord verbergen",showDetails:"Toon details",hideDetails:"Verberg details",copyToClipboard:"Naar klembord kopiëren",loadingEmails:"E-mails laden...",loadingTotpCodes:"TOTP-codes laden...",attachments:"Bijlagen",loadingAttachments:"Bijlagen laden...",settings:"Instellingen",recentEmails:"Recente e-mails",loginCredentials:"Inloggegevens",twoFactorAuthentication:"Tweestapsverificatie",alias:"Alias",notes:"Notities",fullName:"Volledige naam",firstName:"Voornaam",lastName:"Achternaam",birthDate:"Geboortedatum",nickname:"Bijnaam",email:"E-mail",username:"Gebruikersnaam",password:"Wachtwoord",syncingVault:"Vault synchroniseren",savingChangesToVault:"Wijzigingen opslaan in vault",uploadingVaultToServer:"Vault uploaden naar server",checkingVaultUpdates:"Controleren op vault updates",syncingUpdatedVault:"Bijgewerkte vault synchroniseren",executingOperation:"Actie uitvoeren...",loadMore:"Laad meer",errors:{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."},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."}},uI={or:"of",new:"Nieuw",cancel:"Annuleren",vaultLocked:"AliasVault is vergrendeld.",creatingNewAlias:"Nieuwe alias aanmaken...",noMatchesFound:"Geen resultaten gevonden",searchVault:"Vault doorzoeken...",serviceName:"Servicenaam",email:"E-mail",username:"Gebruikersnaam",password:"Wachtwoord",enterServiceName:"Voer servicenaam in",enterEmailAddress:"Voer e-mailadres in",enterUsername:"Voer gebruikersnaam in",hideFor1Hour:"Verberg voor 1 uur (huidige site)",hidePermanently:"Permanent verbergen (huidige site)",createRandomAlias:"Willekeurige alias aanmaken",createUsernamePassword:"Gebruikersnaam/wachtwoord aanmaken",randomAlias:"Alias",usernamePassword:"Gebruikersnaam/wachtwoord",createAndSaveAlias:"Alias aanmaken",createAndSaveCredential:"Credential aanmaken",randomIdentityDescription:"Genereer een willekeurige identiteit met een willekeurig e-mailadres toegankelijk in AliasVault.",randomIdentityDescriptionDropdown:"Willekeurige identiteit met willekeurige e-mail",manualCredentialDescription:"Specificeer je eigen e-mailadres en/of gebruikersnaam.",manualCredentialDescriptionDropdown:"Handmatige gebruikersnaam en wachtwoord",failedToCreateIdentity:"Identiteit aanmaken mislukt. Probeer opnieuw.",enterEmailAndOrUsername:"Voer e-mail en/of gebruikersnaam in",autofillWithAliasVault:"Autofill met AliasVault",generateRandomPassword:"Willekeurig wachtwoord genereren (kopiëren naar klembord)",generateNewPassword:"Genereer nieuw wachtwoord",togglePasswordVisibility:"Schakel zichtbaarheid van wachtwoord in/uit",passwordCopiedToClipboard:"Wachtwoord gekopieerd naar klembord",openAliasVaultToUpgrade:"Open AliasVault om te upgraden",vaultUpgradeRequired:"Update is vereist.",dismissPopup:"Pop-up sluiten"},cI={title:"Credentials",addCredential:"Credential toevoegen",editCredential:"Credential bewerken",deleteCredential:"Credential verwijderen",credentialDetails:"Credential details",serviceName:"Naam",notes:"Notities",totp:"Tweestapsverificatie",totpCode:"TOTP-code",copyTotp:"Kopiëren",totpSecret:"TOTP secret",totpSecretPlaceholder:"Voer TOTP secret in",welcomeTitle:"Welkom bij AliasVault!",welcomeDescription:"Om de AliasVault browser extensie te gebruiken: navigeer naar een website en gebruik de AliasVault autofill popup om nieuwe credentials aan te maken.",noPasskeysFound:"Er zijn nog geen passkeys aangemaakt. Passkeys worden gemaakt door een website te bezoeken die passkeys als een authenticatiemethode biedt.",noAttachmentsFound:"Geen credentials gevonden met bijlagen",noMatchingCredentials:"Geen credentials gevonden",createdAt:"Aangemaakt",updatedAt:"Laatst bijgewerkt",saveCredential:"Credential opslaan",deleteCredentialTitle:"Credential verwijderen",deleteCredentialConfirm:"Weet je zeker dat je deze credential wilt verwijderen? Deze actie kan niet ongedaan worden gemaakt.",filters:{all:"(Alle) Credentials",passkeys:"Passkeys",aliases:"Aliassen",userpass:"Wachtwoorden",attachments:"Bijlagen"},randomAlias:"Alias",manual:"Handmatig",service:"Naam",serviceUrl:"URL",loginCredentials:"Inloggegevens",generateRandomUsername:"Gebruikersnaam genereren",generateRandomPassword:"Wachtwoord genereren",changePasswordComplexity:"Wijzig wachtwoord complexiteit",passwordLength:"Wachtwoordlengte",includeLowercase:"Inclusief kleine letters",includeUppercase:"Inclusief hoofdletters",includeNumbers:"Inclusief cijfers",includeSpecialChars:"Inclusief speciale karakters",avoidAmbiguousChars:"Onduidelijke tekens vermijden (o, 0, etc.)",generateNewPreview:"Genereer nieuw voorbeeld",generateRandomAlias:"Alias genereren",clearAliasFields:"Leeg alias velden",alias:"Alias",firstName:"Voornaam",lastName:"Achternaam",nickName:"Bijnaam",gender:"Geslacht",birthDate:"Geboortedatum",birthDatePlaceholder:"YYYY-MM-DD",metadata:"Metadata",validation:{required:"Dit veld is verplicht",serviceNameRequired:"Servicenaam is verplicht",invalidEmail:"Ongeldig e-mailformaat",invalidDateFormat:"Datum moet in YYYY-MM-DD formaat zijn"},privateEmailTitle:"Privé e-mail",privateEmailAliasVaultServer:"AliasVault server",privateEmailDescription:"E2E versleuteld, volledig privé.",publicEmailTitle:"Publieke tijdelijke e-mailproviders",publicEmailDescription:"Anoniem maar beperkte privacy. E-mail inhoud is leesbaar door iedereen die het adres kent.",useDomainChooser:"Domein kiezen",enterCustomDomain:"Voer aangepast domein in",enterFullEmail:"Voer volledig e-mailadres in",enterEmailPrefix:"E-mailprefix invoeren"},dI={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",errors:{invalidSecretKey:"Ongeldig formaat."}},fI={title:"E-mails",deleteEmailTitle:"E-mail verwijderen",deleteEmailConfirm:"Weet je zeker dat je deze e-mail definitief wilt verwijderen?",from:"Van",to:"Naar",date:"Datum",emailContent:"E-mailinhoud",attachments:"Bijlagen",emailNotFound:"E-mail niet gevonden",noEmails:"Geen e-mails gevonden",noEmailsDescription:"Je hebt nog geen e-mails ontvangen op je privé e-mailadressen. Wanneer je een nieuwe e-mail ontvangt, zal deze hier verschijnen.",dateFormat:{justNow:"zojuist",minutesAgo_single:"{{count}} min geleden",minutesAgo_plural:"{{count}} min. geleden",hoursAgo_single:"{{count}} uur geleden",hoursAgo_plural:"{{count}} uur geleden",yesterday:"gisteren"},errors:{emailLoadError:"Er is een fout opgetreden bij het laden van e-mails. Probeer het later opnieuw.",emailUnexpectedError:"Er is een onverwachte fout opgetreden bij het laden van e-mails. Probeer het later opnieuw."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Het huidige gekozen e-mailadres is al in gebruik. Wijzig het e-mailadres door deze credential te bewerken.",CLAIM_DOES_NOT_EXIST:"Er is een fout opgetreden bij het laden van e-mails. Probeer de credential te bewerken en op te slaan om de database te synchroniseren, en probeer het opnieuw."}},hI={title:"Instellingen",serverUrl:"Server URL",language:"Taal",autofillEnabled:"Autofill",version:"Versie",openInNewWindow:"Openen in nieuw venster",openWebApp:"Web-app openen",loggedIn:"Ingelogd",logout:"Uitloggen",lock:"Vergrendelen",globalSettings:"Globale Instellingen",autofillPopup:"Autofill popup",activeOnAllSites:"Actief voor alle sites (tenzij hieronder uitgeschakeld)",disabledOnAllSites:"Uitgeschakeld op alle sites",rightClickContextMenu:"Rechtermuisknop menu",autofillMatching:"Autofill matching",autofillMatchingMode:"Autofill matching modus",autofillMatchingModeDescription:"Bepaalt op welke manier credentials worden beschouwd als matches en worden getoond als suggestie in de autofill popup voor een bepaalde website.",autofillMatchingDefault:"URL + subdomein + naam wildcard",autofillMatchingUrlSubdomain:"URL + subdomein",autofillMatchingUrlExact:"Exacte URL-domein",siteSpecificSettings:"Site-specifieke Instellingen",autofillPopupOn:"Autofill popup op: ",enabledForThisSite:"Ingeschakeld voor deze site",disabledForThisSite:"Uitgeschakeld voor deze site",temporarilyDisabledUntil:"Tijdelijk uitgeschakeld tot ",resetAllSiteSettings:"Alle site-specifieke instellingen resetten",appearance:"Uiterlijk",theme:"Thema",useDefault:"Standaard gebruiken",light:"Licht",dark:"Donker",keyboardShortcuts:"Snelkoppelingen",configureKeyboardShortcuts:"Snelkoppelingen configureren",configure:"Configureren",clipboardClearTimeout:"Automatisch klembord wissen na kopiëren",clipboardClearTimeoutDescription:"Automatisch het klembord wissen na kopiëren van gevoelige gegevens",clipboardClearDisabled:"Nooit wissen",clipboardClear5Seconds:"Wis na 5 seconden",clipboardClear10Seconds:"Wis na 10 seconden",clipboardClear15Seconds:"Wis na 15 seconden",autoLockTimeout:"Automatisch vergrendelen",autoLockTimeoutDescription:"Vergrendel de vault automatisch na inactiviteit",autoLockTimeoutHelp:"De vault zal alleen vergrendelen na de opgegeven periode van inactiviteit (geen automatisch invullen of extensie geopend). De vault wordt altijd vergrendeld wanneer de browser wordt afgesloten, ongeacht deze instelling.",autoLockNever:"Nooit",autoLock15Seconds:"15 seconden",autoLock1Minute:"1 minuut",autoLock5Minutes:"5 minuten",autoLock15Minutes:"15 minuten",autoLock30Minutes:"30 minuten",autoLock1Hour:"1 uur",autoLock4Hours:"4 uur",autoLock8Hours:"8 uur",autoLock24Hours:"24 uur",versionPrefix:"Versie ",autofillSettings:"Autofill instellingen",clipboardSettings:"Klembord instellingen",contextMenuSettings:"Context menu instellingen",passkeySettings:"Passkey instellingen",contextMenu:"Context menu",contextMenuEnabled:"Context menu is ingeschakeld",contextMenuDisabled:"Context menu is uitgeschakeld",contextMenuDescription:"Klik met de rechtermuisknop op invoervelden om AliasVault opties te zien",selectLanguage:"Selecteer taal",serverConfiguration:"Serverconfiguratie",serverConfigurationDescription:"Configureer de AliasVault server URL voor self-hosted omgevingen",customApiUrl:"API URL",customClientUrl:"Client URL",apiUrlHint:"De API endpoint URL (meestal client URL + /api)",clientUrlHint:"De webinterface URL van je self-hosted omgeving",autofillSettingsDescription:"Schakel de autofill pop-up in of uit op webpagina's",autofillEnabledDescription:"Autofill suggesties verschijnen op login formulieren",autofillDisabledDescription:"Autofill suggesties zijn uitgeschakeld",languageSettings:"Taal",validation:{apiUrlRequired:"API URL is vereist",apiUrlInvalid:"Voer een geldige API URL in",clientUrlRequired:"Client URL is vereist",clientUrlInvalid:"Voer een geldige client URL in"},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."}},AI={passkey:"Passkey",site:"Website",displayName:"Naam",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.",bypass:{title:"Gebruik browser passkey",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",useBrowserPasskey:"Gebruik browser passkey"},create:{title:"Passkey aanmaken",createFor:"Maak een nieuwe passkey voor",titleLabel:"Titel",titlePlaceholder:"Voer een naam in voor deze passkey",createButton:"Passkey aanmaken",useBrowserPasskey:"Gebruik browser passkey",selectPasskeyToReplace:"Selecteer een passkey om te vervangen:",createNewPasskey:"Passkey aanmaken",replacingPasskey:"Passkey vervangen: {{displayName}}",confirmReplace:"Bevestig vervanging"},settings:{passkeyProvider:"Passkey provider",passkeyProviderOn:"Passkey provider ingeschakeld"}},gI={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...",logout:"Uitloggen",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}})"}},mI={auth:sI,menu:oI,common:lI,content:uI,credentials:cI,totp:dI,emails:fI,settings:hI,passkeys:AI,upgrade:gI},pI={loginTitle:"Zaloguj się do AliasVault",username:"Nazwa użytkownika lub e-mail",usernamePlaceholder:"nazwa / nazwa@firma.com",password:"Hasło",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",logout:"Wyloguj się",logoutConfirm:"Czy na pewno chcesz się wylogować?",unlockSuccessTitle:"Twój sejf został pomyślnie odblokowany.",unlockSuccessDescription:"Możesz teraz używać automatycznego uzupełniania w formularzach logowania w przeglądarce.",closePopup:"Zamknij to okno.",browseVault:"Przeglądaj zawartość sejfu",connectingTo:"Łączenie z",switchAccounts:"Przełącz konto",loggedIn:"Zalogowano",loginWithMobile:"Zaloguj się za pomocą aplikacji mobilnej",unlockWithMobile:"Odblokuj za pomocą aplikacji mobilnej",scanQrCode:"Zeskanuj ten kod QR za pomocą aplikacji mobilnej AliasVault, aby się zalogować i odblokować sejf.",errors:{invalidCode:"Wprowadź prawidłowy 6-cyfrowy kod uwierzytelniający.",serverError:"Nie można połączyć się z serwerem AliasVault. Spróbuj ponownie później lub skontaktuj się z pomocą techniczną, jeśli problem będzie się powtarzał.",wrongPassword:"Hasło jest nieprawidłowe. Spróbuj ponownie.",accountLocked:"Konto tymczasowo zostało zablokowane z powodu zbyt wielu nieudanych prób.",networkError:"Błąd sieci. Sprawdź swoje połączenie i 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."}},yI={credentials:"Dane logowania",emails:"Skrzynka odbiorcza",settings:"Ustawienia"},EI={loading:"Wczytywanie…",notice:"Uwaga",error:"Błąd",cancel:"Anuluj",confirm:"Potwierdź",back:"Powrót",next:"Dalej",use:"Użyj",delete:"Usuń",save:"Save",or:"lub",close:"Zamknąć",copied:"Skopiowano",openInNewWindow:"Otwórz w nowym oknie.",enabled:"Aktywne",disabled:"Nie aktywne",showPassword:"Pokaż hasło",hidePassword:"Ukryj hasło",showDetails:"Pokaż szczegóły",hideDetails:"Ukryj szczegóły",copyToClipboard:"Skopiuj do schowka",loadingEmails:"Ładowanie wiadomości e-mail...",loadingTotpCodes:"Ładowanie kodów TOTP...",attachments:"Załączniki",loadingAttachments:"Ładowanie załączników...",settings:"Ustawienia",recentEmails:"Ostatnie wiadomości e-mail",loginCredentials:"Dane logowania",twoFactorAuthentication:"Weryfikacja dwuetapowa (2FA)",alias:"Alias",notes:"Notatki",fullName:"Nazwa",firstName:"Imię",lastName:"Nazwisko",birthDate:"Data urodzenia",nickname:"Pseudonim",email:"Adres e-mail",username:"Nazwa użytkownika",password:"Hasło",syncingVault:"Synchronizacja sejfu",savingChangesToVault:"Zapisywanie zmian w sejfie",uploadingVaultToServer:"Przesyłanie zawartości sejfu na serwer",checkingVaultUpdates:"Sprawdzanie aktualizacji sejfu",syncingUpdatedVault:"Synchronizacja zaktualizowanego sejfu",executingOperation:"Wykonywanie operacji...",loadMore:"Załaduj więcej",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ę."},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."}},bI={or:"lub",new:"Nowy",cancel:"Anulować",vaultLocked:"AliasVault jest zablokowany.",creatingNewAlias:"Tworzenie nowego aliasu...",noMatchesFound:"Nie znaleziono żadnych wyników",searchVault:"Przeszukaj sejf...",serviceName:"Nazwa usługi",email:"Adres e-mail",username:"Nazwa użytkownika",password:"Hasło",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"},wI={title:"Dane logowania",addCredential:"Dodaj dane logowania",editCredential:"Edytuj dane logowania",deleteCredential:"Usuń dane logowania",credentialDetails:"Dane uwierzytelniające",serviceName:"Nazwa usługi",notes:"Notatki",totp:"Weryfikacja dwuetapowa (2FA)",totpCode:"Kod TOTP",copyTotp:"Skopiuj kod TOTP",totpSecret:"Tajny klucz TOTP",totpSecretPlaceholder:"Wprowadź tajny klucz TOTP",welcomeTitle:"Witamy w AliasVault!",welcomeDescription:"Aby skorzystać z rozszerzenia przeglądarki AliasVault - przejdź do strony internetowej i użyj okienka autozupelniania, aby utworzyć nowa tożsamość.",noPasskeysFound:"Nie utworzono jeszcze żadnych kluczy dostępu. Klucze dostępu tworzy się, odwiedzając stronę internetową, która oferuje klucze dostępu jako metodę uwierzytelniania.",noAttachmentsFound:"Nie znaleziono danych logowania z załącznikami",noMatchingCredentials:"Nie znaleziono pasujących danych uwierzytelniających",createdAt:"Utworzono",updatedAt:"Ostatnia aktualizacja",saveCredential:"Zapisz dane logowania",deleteCredentialTitle:"Usuń dane logowania",deleteCredentialConfirm:"Czy na pewno chcesz usunąć te dane logowania? Tej akcji nie można cofnąć.",filters:{all:"(Wszystkie) Dane logowania",passkeys:"Klucze dostępu",aliases:"Aliasy",userpass:"Hasła",attachments:"Załączniki"},randomAlias:"Losowy alias",manual:"Ręcznie",service:"Usługa",serviceUrl:"Adres URL usługi",loginCredentials:"Dane logowania",generateRandomUsername:"Wygeneruj losową nazwę użytkownika",generateRandomPassword:"Wygeneruj losowe hasło",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.)",generateNewPreview:"Utwórz nowy podgląd",generateRandomAlias:"Utwórz losowy alias",clearAliasFields:"Wyczyść pola aliasu",alias:"Alias",firstName:"Imię",lastName:"Nazwisko",nickName:"Pseudonim",gender:"Płeć",birthDate:"Data urodzenia",birthDatePlaceholder:"RRRR-MM-DD",metadata:"Metadane",validation:{required:"To pole jest wymagane",serviceNameRequired:"Wymagana jest nazwa usługi",invalidEmail:"Niepoprawny format adresu e-mail",invalidDateFormat:"Data musi być w formacie RRRR-MM-DD"},privateEmailTitle:"Prywatny e-mail",privateEmailAliasVaultServer:"Serwer AliasVault",privateEmailDescription:"E2E zaszyfrowane, w pełni prywatne.",publicEmailTitle:"Publiczni dostawcy poczty tymczasowej",publicEmailDescription:"Anonimowa, ale ograniczona prywatność. Treści e-mail są czytelne dla każdego, kto zna adres.",useDomainChooser:"Użyj wybierania domen",enterCustomDomain:"Wprowadź własną domenę",enterFullEmail:"Wprowadź pełny adres e-mail",enterEmailPrefix:"Wprowadź prefiks e-mail"},vI={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",errors:{invalidSecretKey:"Invalid secret key format."}},CI={title:"Skrzynka odbiorcza",deleteEmailTitle:"Usuń adres e-mail",deleteEmailConfirm:"Czy na pewno chcesz trwale usunąć ten e-mail?",from:"Od",to:"Do",date:"Data",emailContent:"Treść wiadomości e-mail",attachments:"Załączniki",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.",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"},errors:{emailLoadError:"Wystąpił błąd podczas ładowania pliku. Proszę, spróbuj ponownie później.",emailUnexpectedError:"Wystąpił nieoczekiwany błąd podczas ładowania wiadomości. Spróbuj ponownie później."},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."}},xI={title:"Ustawienia",serverUrl:"Adres URL serwera",language:"Język",autofillEnabled:"Włącz autouzupełnianie",version:"Wersja",openInNewWindow:"Otwórz w nowym oknie",openWebApp:"Otwórz aplikację internetową",loggedIn:"Zalogowano",logout:"Wyloguj się",lock:"Zablokuj",globalSettings:"Ustawienia ogólne",autofillPopup:"Okno autouzupełniania",activeOnAllSites:"Aktywne we wszystkich witrynach (chyba że jest wyłączone)",disabledOnAllSites:"Wyłączone na wszystkich witrynach",rightClickContextMenu:"Aktywacja menu kontekstowego",autofillMatching:"Dopasowanie autouzupełniania",autofillMatchingMode:"Tryb dopasowania autouzupełniania",autofillMatchingModeDescription:"Określa, które dane logowania są uważane za dopasowane i wyświetlane jako sugestie w oknie autouzupełniania dla danej strony internetowej.",autofillMatchingDefault:"Adres URL + subdomena + nazwa wieloznaczna",autofillMatchingUrlSubdomain:"Adres URL + subdomena",autofillMatchingUrlExact:"Dokładna domena adresu URL",siteSpecificSettings:"Ustawienia dotyczące witryny",autofillPopupOn:"Wyskakujące okno autouzupełniania: ",enabledForThisSite:"Włączone dla tej witryny",disabledForThisSite:"Wyłączone dla tej witryny",temporarilyDisabledUntil:"Tymczasowo nieaktywne do ",resetAllSiteSettings:"Zresetuj wszystkie ustawienia witryny",appearance:"Wygląd",theme:"Motyw",useDefault:"Użyj domyślnego",light:"Jasny",dark:"Ciemny",keyboardShortcuts:"Skróty klawiaturowe",configureKeyboardShortcuts:"Skonfiguruj skróty klawiaturowe",configure:"Konfiguracja",clipboardClearTimeout:"Wyczyść schowek po skopiowaniu",clipboardClearTimeoutDescription:"Automatycznie wyczyść schowek po skopiowaniu poufnych danych",clipboardClearDisabled:"Nigdy nie czyść",clipboardClear5Seconds:"Wyczyść po 5 sekundach",clipboardClear10Seconds:"Wyczyść po 10 sekundach",clipboardClear15Seconds:"Wyczyść po 15 sekundach",autoLockTimeout:"Blokada rozszerzenia",autoLockTimeoutDescription:"Automatycznie zablokuj sejf po okresie bezczynności",autoLockTimeoutHelp:"Sejf zostanie zablokowany dopiero po określonym okresie nieaktywności (żadne użycie autouzupełniania lub okienko rozszerzenia nie zostało otwarte). Sejf zostanie zablokowany, gdy przeglądarka zostanie zamknięta, niezależnie od tego ustawienia.",autoLockNever:"Nigdy",autoLock15Seconds:"15 sekund",autoLock1Minute:"1 minuta",autoLock5Minutes:"5 minut",autoLock15Minutes:"15 minut",autoLock30Minutes:"30 minut",autoLock1Hour:"1 godzina",autoLock4Hours:"4 godziny",autoLock8Hours:"8 godzin",autoLock24Hours:"24 godziny",versionPrefix:"Wersja ",autofillSettings:"Ustawienia autouzupełniania",clipboardSettings:"Ustawienia schowka",contextMenuSettings:"Ustawienia menu kontekstowego",passkeySettings:"Ustawienia kluczy dostępu",contextMenu:"Menu kontekstowe",contextMenuEnabled:"Menu kontekstowe jest włączone",contextMenuDisabled:"Menu kontekstowe jest wyłączone",contextMenuDescription:"Kliknij prawym przyciskiem myszy na pola wejściowe, aby uzyskać dostęp do opcji AliasVault",selectLanguage:"Wybierz język",serverConfiguration:"Konfiguracja serwera",serverConfigurationDescription:"Skonfiguruj adres URL serwera sejfu AliasVault",customApiUrl:"Adres URL interfejsu API",customClientUrl:"Adresy URL klienta",apiUrlHint:"Adres URL punktu końcowego API (zazwyczaj adres URL klienta + /api)",clientUrlHint:"Adres URL interfejsu sieci web dla twojej samodzielnej instancji",autofillSettingsDescription:"Włącz lub wyłącz okno autouzupełniania na stronach internetowych",autofillEnabledDescription:"Sugestie autouzupełniania pojawią się na formularzach logowania",autofillDisabledDescription:"Podpowiedzi wyłączone we wszystkich polach",languageSettings:"Język",validation:{apiUrlRequired:"API URL jest wymagane",apiUrlInvalid:"Wprowadź poprawny adres URL API",clientUrlRequired:"Adres URL klienta jest wymagany",clientUrlInvalid:"Wprowadź prawidłowy adres URL klienta"},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."}},NI={passkey:"Kod dostępu",site:"Strona internetowa",displayName:"Nazwa",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.",bypass:{title:"Użyj klucza dostępu przeglądarki",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",useBrowserPasskey:"Użyj klucza dostępu przeglądarki"},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",useBrowserPasskey:"Użyj klucza dostępu przeglądarki",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ę"},settings:{passkeyProvider:"Dostawca klucza dostępu",passkeyProviderOn:"Dostawca klucza dostępu włączony "}},II={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...",logout:"Wyloguj się",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}})"}},kI={auth:pI,menu:yI,common:EI,content:bI,credentials:wI,totp:vI,emails:CI,settings:xI,passkeys:NI,upgrade:II},SI={loginTitle:"Fazer login no AliasVault",username:"Nome de usuário ou e-mai",usernamePlaceholder:"nome / nome@empresa.com",password:"Senha",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",logout:"Sair",logoutConfirm:"Tem certeza que deseja sair?",unlockSuccessTitle:"O seu cofre foi desbloqueado com sucesso",unlockSuccessDescription:"Agora você pode utilizar o preenchimento automático nos formulários de login no seu navegador.",closePopup:"Fechar este pop-up",browseVault:"Navegar por conteúdo do cofre",connectingTo:"Conectando à",switchAccounts:"Mudar de conta?",loggedIn:"Logado",loginWithMobile:"Entrar utilizado Dispositivo Móvel",unlockWithMobile:"Desbloquear utilizando Dispositivo Móvel",scanQrCode:"Escaneie este código QR com seu aplicativo AliasVault para dispositivo móvel para entrar e desbloquear seu cofre.",errors:{invalidCode:"Por favor digite o código de autenticação de 6 dígitos.",serverError:"Não foi possível conectar ao servidor do AliasVault. Por favor tente novamente mais tarde ou entre em contato com o suporte caso o problema persista.",wrongPassword:"Senha incorreta. Por favor tente novamente.",accountLocked:"Conta temporariamente bloqueada por muitas tentativas de login falhas. Por favor, tente novamente mais tarde.",networkError:"Conexão falhou. Por favor verifique sua conexão com a internet e 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."}},TI={credentials:"Credenciais",emails:"E-mails",settings:"Configurações"},BI={loading:"Carregando...",notice:"Aviso",error:"Erro",cancel:"Cancelar",confirm:"Confirmar",back:"Voltar",next:"Próximo",use:"Utilizar",delete:"Excluir",save:"Salvar",or:"Ou",close:"Fechar",copied:"Copiado!",openInNewWindow:"Abrir em uma nova janela",enabled:"Habilitado",disabled:"Desabilitado",showPassword:"Mostrar senha",hidePassword:"Ocultar senha",showDetails:"Exibir detalhes",hideDetails:"Esconder detalhes",copyToClipboard:"Copiar para a área de transferência",loadingEmails:"Carregando e-mails...",loadingTotpCodes:"Carregando códigos TOTP...",attachments:"Anexos",loadingAttachments:"Carregando anexos...",settings:"Configurações",recentEmails:"E-mails recentes",loginCredentials:"Credenciais de login",twoFactorAuthentication:"Autenticação de dois fatores",alias:"Alias",notes:"Notas",fullName:"Nome Completo",firstName:"Primeiro Nome",lastName:"Sobrenome",birthDate:"Data de Nascimento",nickname:"Apelido",email:"E-mail",username:"Nome de Usuário",password:"Senha",syncingVault:"Sincronizando cofre",savingChangesToVault:"Salvando alterações no cofre",uploadingVaultToServer:"Fazendo upload do cofre para o servidor",checkingVaultUpdates:"Verificando atualizações do cofre",syncingUpdatedVault:"Sincronizando cofre atualizado",executingOperation:"Realizando operação...",loadMore:"Carregar mais",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."},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."}},LI={or:"ou",new:"Novo",cancel:"Cancelar",vaultLocked:"AliasVault está bloqueado.",creatingNewAlias:"Criando novo alias...",noMatchesFound:"Nenhum resultado encontrado",searchVault:"Pesquisar cofre...",serviceName:"Nome do serviço",email:"E-mail",username:"Nome de usuário",password:"Senha",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"},DI={title:"Credenciais",addCredential:"Adicionar Credencial",editCredential:"Editar Credencial",deleteCredential:"Excluir Credencial",credentialDetails:"Detalhes da Credencial",serviceName:"Nome do Serviço",notes:"Notas",totp:"Autenticação de Dois Fatores",totpCode:"Código TOTP",copyTotp:"Copiar TOTP",totpSecret:"Segredo TOTP",totpSecretPlaceholder:"Digite a chave secreta TOTP",welcomeTitle:"Boas-vindas ao AliasVault!",welcomeDescription:"Para utilizar a extensão de navegador do AliasVault: navegue para um site e utilize o pop-up de preenchimento automático do AliasVault para criar uma nova credencial.",noPasskeysFound:"Nenhuma passkey foi criada ainda. Passkeys são veiadas visitando um website que ofereça passkey como método de autenticação.",noAttachmentsFound:"Nenhuma credencial com anexos encontrada",noMatchingCredentials:"Nenhuma credencial foi encontrada",createdAt:"Criado",updatedAt:"Última atualização há",saveCredential:"Salvar credencial",deleteCredentialTitle:"Excluir Credencial",deleteCredentialConfirm:"Tem certeza que deseja excluir esta credencial? Essa operação não pode ser desfeita.",filters:{all:"(Todas) Credenciais",passkeys:"Passkeys",aliases:"Aliases",userpass:"Senhas",attachments:"Anexos"},randomAlias:"Alias Aleatório",manual:"Manual",service:"Serviço",serviceUrl:"URL do Serviço",loginCredentials:"Credenciais de Login",generateRandomUsername:"Gerar nome de usuário aleatório",generateRandomPassword:"Gerar senha aleatória",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.)",generateNewPreview:"Gerar nova prévia",generateRandomAlias:"Gerar Alias Aleatório",clearAliasFields:"Limpar Campos de Alias",alias:"Alias",firstName:"Primeiro Nome",lastName:"Sobrenome",nickName:"Apelido",gender:"Gênero",birthDate:"Data de Nascimento",birthDatePlaceholder:"AAAA-MM-DD",metadata:"Metadados",validation:{required:"Este campo é obrigatório",serviceNameRequired:"Nome do serviço é obrigatório",invalidEmail:"Formato de e-mail inválido",invalidDateFormat:"Data deve estar no formato AAAA-MM-DD"},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.",useDomainChooser:"Utilizar seletor de domínio",enterCustomDomain:"Digitar domínio personalizado",enterFullEmail:"Digite o endereço de e-mail completo",enterEmailPrefix:"Digite o prefixo do e-mail"},RI={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",errors:{invalidSecretKey:"Formato de chave secreta inválido."}},UI={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",attachments:"Anexos",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.",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"},errors:{emailLoadError:"Ocorreu um erro ao carregar os e-mails. Por favor, tente novamente mais tarde.",emailUnexpectedError:"Ocorreu um erro inesperado ao carregar e-mails. Por favor, tente novamente mais tarde."},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."}},MI={title:"Configurações",serverUrl:"URL do servidor",language:"Idioma",autofillEnabled:"Ativar o Preenchimento Automático",version:"Versão",openInNewWindow:"Abrir em uma nova janela",openWebApp:"Abrir aplicativo web",loggedIn:"Logado",logout:"Sair",lock:"Bloquear",globalSettings:"Configurações Gerais",autofillPopup:"Pop-up de preenchimento automático",activeOnAllSites:"Ativado em todos os sites (a menos que esteja desabilitado abaixo)",disabledOnAllSites:"Desativado em todos os sites",rightClickContextMenu:"Menu do botão direito",autofillMatching:"Correspondência de Preenchimento Automático",autofillMatchingMode:"Modo de correspondência de preenchimento automático",autofillMatchingModeDescription:"Determina quais credenciais são consideradas uma correspondência e mostradas como sugestões no pop-up de preenchimento automático para um determinado site.",autofillMatchingDefault:"Wildcard URL + subdomínio + nome",autofillMatchingUrlSubdomain:"URL + subdomínio",autofillMatchingUrlExact:"Apenas URL exato do domínio",siteSpecificSettings:"Configurações Específicas do Site",autofillPopupOn:"Pop-up de preenchimento automático em: ",enabledForThisSite:"Habilitado para este site",disabledForThisSite:"Desabilitado para este site",temporarilyDisabledUntil:"Temporariamente desabilitado até ",resetAllSiteSettings:"Redefinir todas as configurações específicas do site",appearance:"Aparência",theme:"Tema",useDefault:"Utilizar padrão",light:"Claro",dark:"Escuro",keyboardShortcuts:"Atalhos do Teclado",configureKeyboardShortcuts:"Configurar atalhos do teclado",configure:"Configurar",clipboardClearTimeout:"Limpar área de transferência após copiar",clipboardClearTimeoutDescription:"Limpar automaticamente a área de transferência após copiar dados sensíveis",clipboardClearDisabled:"Nunca limpar",clipboardClear5Seconds:"Limpar após 5 segundos",clipboardClear10Seconds:"Limpar após 10 segundos",clipboardClear15Seconds:"Limpar após 15 segundos",autoLockTimeout:"Tempo para bloqueio automático",autoLockTimeoutDescription:"Bloquear o cofre automaticamente após período de inatividade",autoLockTimeoutHelp:"O cofre será bloqueado apenas após o período de inatividade especificado (nenhuma utilização de preenchimento automático ou pop-up da extensão abertos). O cofre sempre será bloqueado quando o navegador for fechado, independentemente desta configuração.",autoLockNever:"Nunca",autoLock15Seconds:"15 segundos",autoLock1Minute:"1 minuto",autoLock5Minutes:"5 minutos",autoLock15Minutes:"15 minutos",autoLock30Minutes:"30 minutos",autoLock1Hour:"1 hora",autoLock4Hours:"4 horas",autoLock8Hours:"8 horas",autoLock24Hours:"24 horas",versionPrefix:"Versão ",autofillSettings:"Configurações de Preenchimento Automático",clipboardSettings:"Configurações da Área de Transferência",contextMenuSettings:"Configurações do Menu de Contexto",passkeySettings:"Configurações de Passkey",contextMenu:"Menu de Contexto",contextMenuEnabled:"Menu de contexto está habilitado",contextMenuDisabled:"Menu de contexto está desabilitado",contextMenuDescription:"Clique com o botão direito nos campos para acessar as opções do AliasVault",selectLanguage:"Selecionar Idioma",serverConfiguration:"Configurações do Servidor",serverConfigurationDescription:"Configure o URL do servidor do AliasVault para instâncias self-hosted",customApiUrl:"URL da API",customClientUrl:"URL do Cliente",apiUrlHint:"O URL do endpoint da API (geralmente o URL do cliente + /api)",clientUrlHint:"O URL da interface web da sua instância self-hosted",autofillSettingsDescription:"Habilite ou desabilite o popup de autopreenchimento em páginas web",autofillEnabledDescription:"Sugestões de autopreenchimento aparecerão em formulários de login",autofillDisabledDescription:"Sugestões de autopreenchimento estão desabilitadas globalmente",languageSettings:"Idioma",validation:{apiUrlRequired:"URL de API é obrigatório",apiUrlInvalid:"Por favor, digite um URL de API válido",clientUrlRequired:"URL de Cliente é obrigatório",clientUrlInvalid:"Por favor, digite um URL de cliente válido"},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."}},jI={passkey:"Passkey",site:"Site",displayName:"Nome",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.",bypass:{title:"Utilizar Passkey no Navegador",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",useBrowserPasskey:"Utilizar Passkey do Navegador"},create:{title:"Criar Passkey",createFor:"Criar nova passkey para",titleLabel:"Título",titlePlaceholder:"Digite um nome para esta passkey",createButton:"Criar Passkey",useBrowserPasskey:"Utilizar Passkey do Navegador",selectPasskeyToReplace:"Selecione uma passkey para alterar:",createNewPasskey:"Criar Nova Passkey",replacingPasskey:"Alternado passkey: {{displayName}}",confirmReplace:"Confirmar Alterações"},settings:{passkeyProvider:"Provedor de Passkey",passkeyProviderOn:"Provedor de Passkey em "}},OI={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...",logout:"Sair",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}})"}},_I={auth:SI,menu:TI,common:BI,content:LI,credentials:DI,totp:RI,emails:UI,settings:MI,passkeys:jI,upgrade:OI},PI={loginTitle:"Войдите в AliasVault",username:"Имя пользователя или почта",usernamePlaceholder:"имя / имя@company.com",password:"Пароль",passwordPlaceholder:"Введите ваш пароль",rememberMe:"Запомнить меня",loginButton:"Войти",noAccount:"Нет аккаунта?",createVault:"Создать новое хранилище",twoFactorTitle:"Пожалуйста, введите код аутентификации из вашего приложения-аутентификатора.",authCode:"Код аутентификации",authCodePlaceholder:"Введите 6-значный код",verify:"Проверить",twoFactorNote:"Примечание: если у вас нет доступа к устройству аутентификации, вы можете сбросить ваш 2FA с помощью кода восстановления, войдя в систему через сайт.",masterPassword:"Мастер пароль",unlockVault:"Разблокировать",unlockWithPin:"Разблокировать ПИН-кодом\uFEFF",enterPinToUnlock:"Введите ПИН-код для разблокировки хранилища",useMasterPassword:"Использовать мастер-пароль",unlockTitle:"Разблокировать ваше хранилище",logout:"Выйти",logoutConfirm:"Вы уверены, что хотите выйти?",unlockSuccessTitle:"Ваше хранилище успешно разблокировано",unlockSuccessDescription:"Теперь вы можете использовать автозаполнение форм входа в Вашем браузере.",closePopup:"Закрыть окно",browseVault:"Обзор содержимого хранилища",connectingTo:"Подключение к",switchAccounts:"Переключить аккаунт?",loggedIn:"Вход выполнен",loginWithMobile:"Войти с помощью мобильного приложения",unlockWithMobile:"Разблокировать через мобильное приложение",scanQrCode:"Сканируйте QR-код в приложении AliasVault, чтобы войти.",errors:{invalidCode:"Пожалуйста, введите правильный 6-значный код аутентификации.",serverError:"Не удалось подключиться к серверу AliasVault. Пожалуйста, повторите попытку позже или обратитесь в службу поддержки, если проблема не устранится.",wrongPassword:"Неверный пароль. Пожалуйста, повторите попытку.",accountLocked:"Аккаунт временно заблокирован из-за слишком большого числа неудачных попыток.",networkError:"Ошибка сети. Пожалуйста, проверьте соединение и повторите еще раз.",sessionExpired:"Время сеанса истекло. Пожалуйста, войдите снова.",mobileLoginRequestExpired:"Истекло время ожидания входа. Перезагрузите страницу и повторите попытку."}},FI={credentials:"Учетные данные",emails:"Почта",settings:"Настройки"},QI={loading:"Загрузка...",notice:"Примечание",error:"Ошибка",cancel:"Отмена",confirm:"Подтвердить",back:"Назад",next:"Далее",use:"Использовать",delete:"Удалить",save:"Save",or:"Или",close:"Закрыть",copied:"Скопировано!",openInNewWindow:"Открыть в новом окне",enabled:"Включено",disabled:"Отключено",showPassword:"Показать пароль",hidePassword:"Скрыть пароль",showDetails:"Показать подробности",hideDetails:"Скрыть подробности",copyToClipboard:"Скопировать в буфер обмена",loadingEmails:"Загрузка писем...",loadingTotpCodes:"Загрузка TOTP кодов...",attachments:"Вложения",loadingAttachments:"Загрузка вложений...",settings:"Настройки",recentEmails:"Последние письма",loginCredentials:"Данные для авторизации",twoFactorAuthentication:"Двухфакторная аутентификация",alias:"Псевдоним",notes:"Заметки",fullName:"Полное имя",firstName:"Имя",lastName:"Фамилия",birthDate:"Дата рождения",nickname:"Никнейм",email:"Электронная почта",username:"Имя пользователя",password:"Пароль",syncingVault:"Синхронизация хранилища",savingChangesToVault:"Сохранение изменений в хранилище",uploadingVaultToServer:"Загрузка хранилища на сервер",checkingVaultUpdates:"Проверка наличия обновлений в хранилище",syncingUpdatedVault:"Синхронизация обновленного хранилища",executingOperation:"Выполнение операций...",loadMore:"Загрузить ещё",errors:{serverNotAvailable:"Сервер AliasVault недоступен. Пожалуйста, повторите попытку позже или обратитесь в службу поддержки, если проблема не устранится.",clientVersionNotSupported:"Эта версия браузерного расширения AliasVault больше не поддерживается сервером. Пожалуйста, обновите расширение вашего браузера до последней версии.",browserExtensionOutdated:"Это расширение браузера устарело и не может быть использовано для доступа к этому хранилищу. Пожалуйста, обновите расширение, чтобы продолжить.",serverVersionNotSupported:"Чтобы использовать это расширение для браузера, сервер AliasVault необходимо обновить до более новой версии. Пожалуйста, обратитесь в службу поддержки, если вам нужна помощь.",serverVersionTooOld:"Сервер AliasVault необходимо обновить до более новой версии, чтобы использовать эту функцию. Если вам нужна помощь, обратитесь к администратору сервера.",unknownError:"Произошла неизвестная ошибка",unknownErrorTryAgain:"Произошла неизвестная ошибка. Попробуйте снова.",vaultNotAvailable:"Хранилище недоступно",vaultIsLocked:"Хранилище заблокировано",passwordChanged:"С момента вашего последнего входа ваш пароль изменился. Пожалуйста, войдите еще раз в целях безопасности."},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:"Локальное хранилище не обновлено. Пожалуйста, синхронизируйте ваше хранилище, обновив страницу, и повторите попытку."}},HI={or:"или",new:"Новый",cancel:"отмена",vaultLocked:"AliasVault заблокирован.",creatingNewAlias:"Создание нового псевдонима...",noMatchesFound:"Совпадений не найдено",searchVault:"Поиск хранилища...",serviceName:"Имя сервиса",email:"Электронная почта",username:"Имя пользователя",password:"Пароль",enterServiceName:"Введите имя сервиса",enterEmailAddress:"Введите адрес электронной почты",enterUsername:"Введите имя пользователя",hideFor1Hour:"Скрыть на 1 час (текущий сайт)",hidePermanently:"Скрыть навсегда (текущий сайт)",createRandomAlias:"Создать случайный псевдоним",createUsernamePassword:"Создайте имя пользователя/пароль",randomAlias:"Случайный псевдоним",usernamePassword:"Имя пользователя/пароль",createAndSaveAlias:"Создать и сохранить псевдоним",createAndSaveCredential:"Создать и сохранить учетные данные",randomIdentityDescription:"Сгенерировать случайную личность со случайным адресом электронной почты, доступным в AliasVault.",randomIdentityDescriptionDropdown:"Случайная личность со случайным адресом электронной почты",manualCredentialDescription:"Укажите свой собственный адрес электронной почты и имя пользователя.",manualCredentialDescriptionDropdown:"Ручной ввод имени пользователя и пароля",failedToCreateIdentity:"Не удалось создать личность. Пожалуйста, попробуйте снова.",enterEmailAndOrUsername:"Введите адрес электронной почты и/или имя пользователя",autofillWithAliasVault:"Автозаполнение с помощью AliasVault",generateRandomPassword:"Сгенерировать случайный пароль (скопировать в буфер обмена)",generateNewPassword:"Сгенерировать новый пароль",togglePasswordVisibility:"Переключение видимости пароля",passwordCopiedToClipboard:"Пароль скопирован в буфер обмена",openAliasVaultToUpgrade:"Откройте AliasVault для обновления",vaultUpgradeRequired:"Требуется обновление хранилища.",dismissPopup:"Закрыть окно"},zI={title:"Учетные данные",addCredential:"Добавить учетные данные",editCredential:"Редактировать учетные данные",deleteCredential:"Удалить учетные данные",credentialDetails:"Подробности учетных данных",serviceName:"Название сервиса",notes:"Заметки",totp:"Двухфакторная аутентификация",totpCode:"TOTP код",copyTotp:"Скопировать TOTP",totpSecret:"TOTP секрет",totpSecretPlaceholder:"Введите секретный ключ TOTP",welcomeTitle:"Добро пожаловать в AliasVault!",welcomeDescription:"Чтобы использовать браузерное расширение AliasVault: перейдите на сайт и используйте всплывающее окно автозаполнения AliasVault для создания новых учетных данных.",noPasskeysFound:"Ключи доступа еще не созданы. Ключи доступа создаются при посещении веб-сайта, который предлагает их в качестве метода аутентификации.",noAttachmentsFound:"Не найдено учетных данных с вложениями",noMatchingCredentials:"Соответствующие учетные данные не найдены",createdAt:"Создан",updatedAt:"Последнее обновление",saveCredential:"Сохранить учетные данные",deleteCredentialTitle:"Удалить учетные данные",deleteCredentialConfirm:"Вы уверены, что хотите удалить эти учетные данные? Это действие невозможно отменить.",filters:{all:"(Все) учетные данные",passkeys:"Ключи доступа",aliases:"Псевдонимы",userpass:"Пароли",attachments:"Вложения"},randomAlias:"Случайный псевдоним",manual:"Инструкция",service:"Сервис",serviceUrl:"URL сервиса",loginCredentials:"Учетные данные для авторизации",generateRandomUsername:"Сгенерировать случайное имя пользователя",generateRandomPassword:"Сгенерировать случайный пароль",changePasswordComplexity:"Изменить сложность пароля",passwordLength:"Длина пароля",includeLowercase:"Включить строчные буквы",includeUppercase:"Включить заглавные буквы",includeNumbers:"Включить числа",includeSpecialChars:"Включить специальные символы",avoidAmbiguousChars:"Избегать двусмысленных символов (o, 0 и т.д.).",generateNewPreview:"Создать новый предварительный просмотр",generateRandomAlias:"Сгенерировать случайный псевдоним",clearAliasFields:"Очистить поля псевдонимов",alias:"Псевдоним",firstName:"Имя",lastName:"Фамилия",nickName:"Никнейм",gender:"Пол",birthDate:"Дата рождения",birthDatePlaceholder:"ГГГГ-ММ-ДД",metadata:"Метаданные",validation:{required:"Это поле является обязательным",serviceNameRequired:"Требуется указать название сервиса",invalidEmail:"Неверный формат электронной почты",invalidDateFormat:"Дата должна быть указана в формате ГГГГ-ММ-ДД"},privateEmailTitle:"Личная электронная почта",privateEmailAliasVaultServer:"Сервер AliasVault",privateEmailDescription:"Шифрование E2E, полностью приватный.",publicEmailTitle:"Общедоступные временные поставщики электронной почты",publicEmailDescription:"Анонимность, но ограниченная конфиденциальность. Содержимое письма может прочитать любой, кому известен адрес.",useDomainChooser:"Использовать выбор домена",enterCustomDomain:"Ввести пользовательский домен",enterFullEmail:"Введите полный адрес электронной почты",enterEmailPrefix:"Введите префикс электронной почты"},VI={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",errors:{invalidSecretKey:"Invalid secret key format."}},GI={title:"Письма",deleteEmailTitle:"Удалить письмо",deleteEmailConfirm:"Вы уверены, что хотите навсегда удалить это письмо?",from:"От",to:"К",date:"Дата",emailContent:"Содержимое письма",attachments:"Вложения",emailNotFound:"Адрес электронной почты не найден",noEmails:"Электронные письма не найдены",noEmailsDescription:"Вы еще не получали никаких электронных писем на свои личные адреса электронной почты. Когда вы получите новое электронное письмо, оно появится здесь.",dateFormat:{justNow:"прямо сейчас",minutesAgo_single:"{{count}} мин назад",minutesAgo_plural:"{{count}} минут назад",hoursAgo_single:"{{count}} часов назад",hoursAgo_plural:"{{count}} часов назад",yesterday:"вчера"},errors:{emailLoadError:"Произошла ошибка при загрузке писем. Пожалуйста, повторите попытку позже.",emailUnexpectedError:"При загрузке писем произошла непредвиденная ошибка. Пожалуйста, повторите попытку позже."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Текущий выбранный адрес электронной почты уже используется. Пожалуйста, измените адрес электронной почты, отредактировав эти учетные данные.",CLAIM_DOES_NOT_EXIST:"При попытке загрузить письма произошла ошибка. Пожалуйста, попробуйте отредактировать и сохранить данные для синхронизации базы данных, затем повторите попытку."}},KI={title:"Настройки",serverUrl:"URL-адрес сервера",language:"Язык",autofillEnabled:"Включить автозаполнение",version:"Версия",openInNewWindow:"Открыть в новом окне",openWebApp:"Открыть веб-приложение",loggedIn:"Вход выполнен",logout:"Выйти",lock:"Заблокировать",globalSettings:"Глобальные настройки",autofillPopup:"Всплывающее окно автозаполнения",activeOnAllSites:"Активен на всех сайтах (если не отключен ниже)",disabledOnAllSites:"Отключено на всех сайтах",rightClickContextMenu:"Контекстное меню правым щелчком мыши",autofillMatching:"Соответствие автозаполнения",autofillMatchingMode:"Режим сопоставления автозаполнения",autofillMatchingModeDescription:"Определяет, какие учетные данные считаются соответствующими и отображаются в качестве предложений во всплывающем окне автозаполнения для данного веб-сайта.",autofillMatchingDefault:"URL + поддомен + подстановочный знак в названии",autofillMatchingUrlSubdomain:"URL + поддомен",autofillMatchingUrlExact:"Только точный URL-адрес домена",siteSpecificSettings:"Настройки для конкретного сайта",autofillPopupOn:"Всплывающее окно автозаполнения: ",enabledForThisSite:"Включено для этого сайта",disabledForThisSite:"Отключено для этого сайта",temporarilyDisabledUntil:"Временно отключен до тех пор, пока",resetAllSiteSettings:"Сбросить все настройки для сайтов",appearance:"Внешний вид",theme:"Тема",useDefault:"Использовать по умолчанию",light:"Светлая",dark:"Темная",keyboardShortcuts:"Горячие клавиши",configureKeyboardShortcuts:"Настройка горячих клавиш",configure:"Настройка",clipboardClearTimeout:"Очистить буфер обмена после копирования",clipboardClearTimeoutDescription:"Автоматическая очистка буфера обмена после копирования конфиденциальных данных",clipboardClearDisabled:"Никогда не очищать",clipboardClear5Seconds:"Очистка через 5 секунд",clipboardClear10Seconds:"Очистка через 10 секунд",clipboardClear15Seconds:"Очистка через 15 секунд",autoLockTimeout:"Тайм-аут автоматической блокировки",autoLockTimeoutDescription:"Автоматическая блокировка хранилища после некоторого периода бездействия",autoLockTimeoutHelp:"Хранилище будет заблокировано только по истечении указанного периода бездействия (не будет использоваться функция автозаполнения или не откроется всплывающее окно с расширением). Хранилище всегда будет заблокировано при закрытии браузера, независимо от этого параметра.",autoLockNever:"Никогда",autoLock15Seconds:"15 секунд",autoLock1Minute:"1 минута",autoLock5Minutes:"5 минут",autoLock15Minutes:"15 минут",autoLock30Minutes:"30 минут",autoLock1Hour:"1 час",autoLock4Hours:"4 часа",autoLock8Hours:"8 часов",autoLock24Hours:"24 часов",versionPrefix:"Версия ",autofillSettings:"Настройки автозаполнения",clipboardSettings:"Настройки буфера обмена",contextMenuSettings:"Настройки контекстного меню",passkeySettings:"Настройки ключа доступа",contextMenu:"Контекстное меню",contextMenuEnabled:"Контекстное меню включено",contextMenuDisabled:"Контекстное меню отключено",contextMenuDescription:"Щелкните правой кнопкой мыши на полях ввода, чтобы получить доступ к параметрам AliasVault",selectLanguage:"Выбрать язык",serverConfiguration:"Конфигурация сервера",serverConfigurationDescription:"Настройте URL-адрес сервера AliasVault для самостоятельно размещенных экземпляров",customApiUrl:"URL-адрес API",customClientUrl:"URL-адрес клиента\uFEFF",apiUrlHint:"URL-адрес конечной точки API (обычно URL-адрес клиента + /api)\uFEFF",clientUrlHint:"URL-адрес веб-интерфейса вашего самостоятельно размещенного экземпляра",autofillSettingsDescription:"Включить или отключить всплывающее окно автозаполнения на веб-страницах",autofillEnabledDescription:"В формах входа будут появляться подсказки для автозаполнения",autofillDisabledDescription:"Подсказки автозаполнения отключены глобально",languageSettings:"Язык",validation:{apiUrlRequired:"Требуется URL-адрес API",apiUrlInvalid:"Пожалуйста, введите корректный URL-адрес API",clientUrlRequired:"Требуется URL-адрес клиента",clientUrlInvalid:"Пожалуйста, введите корректный URL-адрес клиента"},unlockMethod:{title:"Способ разблокировки хранилища",introText:"Выберите способ разблокировки хранилища. Вы можете использовать свой мастер-пароль (он доступен всегда) или установить ПИН-код для быстрого доступа. После 3 неудачных попыток ввода ПИН-кода необходимо будет ввести мастер-пароль.",password:"Мастер-пароль",pin:"ПИН-код",pinDescription:"Разблокировать хранилище ПИН-кодом",setupPin:"Установить ПИН-код",enterNewPinDescription:"Введите ПИН-код, состоящий как минимум из 6 цифр",confirmPin:"Подтвердите ПИН-код\uFEFF",confirmPinDescription:"Повторите ПИН-код для подтверждения",invalidPinFormat:"Неверный формат ПИН-кода\uFEFF",pinMismatch:"ПИН-коды не совпадают",incorrectPin:"Неверный ПИН-код. Осталось {{attemptsRemaining}} попытки.",incorrectPinSingular:"Неверный ПИН-код. Осталась 1 попытка.",enableSuccess:"Разблокировка по ПИН-коду успешно включена",pinLocked:"Разблокировка по ПИН-коду отключена. Пожалуйста, используйте ваш мастер-пароль для разблокировки хранилища.",pinSecurityWarning:"Разблокировка с помощью ПИН-кода в расширении для браузера может быть менее безопасной, чем использование вашего мастер-пароля, поскольку ПИН-коды обычно имеют более низкую энтропию и могут быть подобраны методом перебора (брутфорс), если ваше устройство будет скомпрометировано. Используйте этот способ только на устройствах, которым вы полностью доверяете."}},qI={passkey:"Ключ доступа",site:"Сайт",displayName:"Имя",helpText:"Ключи доступа создаются на веб-сайте по запросу. Их нельзя редактировать вручную. Чтобы удалить этот ключ доступа, вы можете удалить его из этой учетной записи. Чтобы заменить этот ключ доступа или создать новый, посетите веб-сайт и следуйте его инструкциям.",passkeyMarkedForDeletion:"Ключ доступа помечен на удаление\uFEFF",passkeyWillBeDeleted:"Этот ключ доступа будет удален при сохранении этой учетной записи.",bypass:{title:"Использовать ключ доступа браузера\uFEFF",description:"На какой срок вы хотите предоставить сайту {{origin}} доступ к ключам, сохраненным в браузере?",thisTimeOnly:"Только в этот раз",alwaysForSite:"Всегда для этого сайта"},authenticate:{title:"Вход с помощью ключа доступа",signInFor:"Вход с ключом доступа для",selectPasskey:"Выберите ключ доступа для входа:",noPasskeysFound:"Ключи доступа для этого сайта не найдены",useBrowserPasskey:"Использовать ключ доступа из браузера"},create:{title:"Создание ключа доступа",createFor:"Создайте новый ключ доступа для",titleLabel:"Название",titlePlaceholder:"Укажите название для этого ключа доступа",createButton:"Создать ключ доступа",useBrowserPasskey:"Использовать ключ доступа из браузера\uFEFF",selectPasskeyToReplace:"Выберите ключ доступа для замены:",createNewPasskey:"Создать новый ключ доступа",replacingPasskey:"Замена ключа доступа: {{displayName}}",confirmReplace:"Подтвердить замену"},settings:{passkeyProvider:"Провайдер ключей доступа",passkeyProviderOn:"Провайдер ключей доступа включен "}},YI={title:"Обновить хранилище",subtitle:"AliasVault обновился, и ваше хранилище необходимо обновить. Это займет всего несколько секунд.",versionInformation:"Информация о версии",yourVault:"Версия вашего хранилища:",newVersion:"Доступна новая версия:",upgrade:"Обновить хранилище",upgrading:"Обновление...",logout:"Выйти",whatsNew:"Что нового",whatsNewDescription:"Для поддержки следующих изменений требуется обновление:",noDescriptionAvailable:"Описание для этой версии недоступно.",alerts:{unableToGetVersionInfo:"Не удалось получить информацию о версии. Пожалуйста, попробуйте снова.",selfHostedServer:"Автономный сервер",selfHostedWarning:"Если вы используете автономный сервер, обязательно обновите свой автономный экземпляр, так как в противном случае вход в веб-клиент перестанет работать.",continueUpgrade:"Продолжить обновление",upgradeFailed:"Ошибка обновления",failedToApplyMigration:"Не удалось применить перенос ({{current}} из {{total}})"}},JI={auth:PI,menu:FI,common:QI,content:HI,credentials:zI,totp:VI,emails:GI,settings:KI,passkeys:qI,upgrade:YI},WI={loginTitle:"Увійти до AliasVault",username:"Ім'я користувача або електронна пошта",usernamePlaceholder:"ім'я / name@company.com",password:"Пароль",passwordPlaceholder:"Введіть ваш пароль",rememberMe:"Запам'ятати мене",loginButton:"Увійти",noAccount:"Ще не маєте облікового запису?",createVault:"Створити нове сховище",twoFactorTitle:"Будь ласка, введіть код автентифікації з вашого застосунку для автентифікації.",authCode:"Код автентифікації",authCodePlaceholder:"Введіть 6-значний код",verify:"Перевірка",twoFactorNote:"Примітка: якщо у вас немає доступу до вашого пристрою автентифікатора, ви можете скинути налаштування 2FA за допомогою коду відновлення, увійшовши через вебсайт.",masterPassword:"Головний пароль",unlockVault:"Розблокувати",unlockWithPin:"Розблокувати за допомогою ПІН-коду",enterPinToUnlock:"Введіть свій ПІН-код, щоб розблокувати сховище",useMasterPassword:"Використовуйте головний пароль",unlockTitle:"Розблокувати своє сховище",logout:"Вийти",logoutConfirm:"Ви впевнені, що хочете вийти?",unlockSuccessTitle:"Ваше сховище успішно розблоковано",unlockSuccessDescription:"Тепер ви можете використовувати автозаповнення форм входу у вашому браузері.",closePopup:"Закрити цю підказку",browseVault:"Переглянути вміст сховища",connectingTo:"Підключення до",switchAccounts:"Змінити обліковий запис?",loggedIn:"Вхід виконано",loginWithMobile:"Увійти за допомогою мобільного додатку",unlockWithMobile:"Розблокувати за допомогою мобільного додатку",scanQrCode:"Проскануйте цей QR-код за допомогою мобільного додатка AliasVault, щоб увійти та розблокувати сховище.",errors:{invalidCode:"Будь ласка, введіть дійсний 6-значний код автентифікації.",serverError:"Не вдалося зв’язатися зі сервером AliasVault. Будь ласка, спробуйте пізніше або зверніться до служби підтримки, якщо проблема не зникне.",wrongPassword:"Невірний пароль. Будь ласка, спробуйте ще раз.",accountLocked:"Обліковий запис тимчасово заблоковано через занадто багато невдалих спроб.",networkError:"Помилка мережі. Будь ласка, перевірте з’єднання та спробуйте ще раз.",sessionExpired:"Час сеансу закінчився. Будь ласка, увійдіть знову.",mobileLoginRequestExpired:"Час очікування запиту на вхід у мобільний додаток закінчився. Перезавантажте сторінку та спробуйте ще раз."}},XI={credentials:"Облікові дані",emails:"Електронні адреси",settings:"Налаштування"},$I={loading:"Завантаження даних...",notice:"Примітка",error:"Помилка",cancel:"Скасувати",confirm:"Підтвердити",back:"Назад",next:"Далі",use:"Використовувати",delete:"Видалити",save:"Save",or:"Або",close:"Закрити",copied:"Скопійовано!",openInNewWindow:"Відкрити у новому вікні",enabled:"Увімкнено",disabled:"Вимкнено",showPassword:"Показати пароль",hidePassword:"Приховати пароль",showDetails:"Показати подробиці",hideDetails:"Приховати подробиці",copyToClipboard:"Копіювати до буфера обміну",loadingEmails:"Завантаження електронних адрес...",loadingTotpCodes:"Завантаження кодів TOTP...",attachments:"Вкладення",loadingAttachments:"Завантаження вкладень...",settings:"Налаштування",recentEmails:"Останні електронні листи",loginCredentials:"Облікові дані для входу",twoFactorAuthentication:"Двофакторна автентифікація",alias:"Псевдонім",notes:"Нотатки",fullName:"Повне ім'я",firstName:"Ім’я",lastName:"Прізвище",birthDate:"Дата народження",nickname:"Нікнейм",email:"Електронна пошта",username:"Ім'я користувача",password:"Пароль",syncingVault:"Синхронізація сховища",savingChangesToVault:"Збереження змін у сховищі",uploadingVaultToServer:"Завантаження сховища на сервер",checkingVaultUpdates:"Перевірка оновлень сховища",syncingUpdatedVault:"Синхронізація оновленого сховища",executingOperation:"Виконання операції...",loadMore:"Завантажити ще",errors:{serverNotAvailable:"Не вдалося зв’язатися зі сервером AliasVault. Будь ласка, спробуйте пізніше або зверніться до служби підтримки, якщо проблема не зникне.",clientVersionNotSupported:"Ця версія розширення браузера AliasVault більше не підтримується сервером. Будь ласка, оновіть розширення браузера до останньої версії.",browserExtensionOutdated:"Це розширення браузера застаріло, і його не можна використовувати для доступу до цього сховища. Щоб продовжити, оновіть це розширення браузера.",serverVersionNotSupported:"Щоб використовувати це розширення браузера, потрібно оновити сервер AliasVault до новішої версії. Зверніться до служби підтримки, якщо вам потрібна допомога.",serverVersionTooOld:"Щоб скористатися цією функцією, потрібно оновити сервер AliasVault до нової версії. Якщо вам потрібна допомога, будь ласка, зверніться до адміністратора сервера.",unknownError:"Сталася невідома помилка",unknownErrorTryAgain:"Сталася невідома помилка. Будь ласка, спробуйте ще раз.",vaultNotAvailable:"Сховище недоступне",vaultIsLocked:"Сховище заблоковано",passwordChanged:"Ваш пароль змінився з моменту останнього входу. З міркувань безпеки, будь ласка, увійдіть ще раз."},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:"Локальне сховище не оновлене. Синхронізуйте своє сховище, оновивши сторінку, та повторіть спробу."}},ZI={or:"або",new:"Новий",cancel:"Скасувати",vaultLocked:"AliasVault заблоковано.",creatingNewAlias:"Створення нового псевдоніму...",noMatchesFound:"Збігів не знайдено",searchVault:"Пошук сховища...",serviceName:"Назва служби",email:"Електронна пошта",username:"Ім'я користувача",password:"Пароль",enterServiceName:"Введіть назву служби",enterEmailAddress:"Введіть електронну адресу",enterUsername:"Введіть ім'я користувача",hideFor1Hour:"Сховати протягом 1 години (поточний сайт)",hidePermanently:"Приховати назавжди (поточний сайт)",createRandomAlias:"Створити випадковий псевдонім",createUsernamePassword:"Створити ім'я користувача/пароль",randomAlias:"Випадковий псевдонім",usernamePassword:"Ім'я користувача/Пароль",createAndSaveAlias:"Створити та зберегти псевдонім",createAndSaveCredential:"Створити та зберегти облікові дані",randomIdentityDescription:"Згенеруйте випадкову особу з випадковою адресою електронної пошти, доступною в AliasVault.",randomIdentityDescriptionDropdown:"Випадкова ідентифікація з випадковою електронною поштою",manualCredentialDescription:"Вкажіть власну адресу електронної пошти та ім'я користувача.",manualCredentialDescriptionDropdown:"Ім'я користувача та пароль вручну",failedToCreateIdentity:"Не вдалося створити ідентифікатор. Спробуйте ще раз.",enterEmailAndOrUsername:"Введіть електронну пошту та/або ім'я користувача",autofillWithAliasVault:"Автозаповнення за допомогою AliasVault",generateRandomPassword:"Згенерувати випадковий пароль (скопіювати в буфер обміну)",generateNewPassword:"Згенерувати новий пароль",togglePasswordVisibility:"Перемикання видимості пароля",passwordCopiedToClipboard:"Пароль скопійовано в буфер обміну",openAliasVaultToUpgrade:"Відкрити AliasVault для покращення",vaultUpgradeRequired:"Потрібне оновлення сховища.",dismissPopup:"Закрити спливаюче вікно"},ek={title:"Облікові дані",addCredential:"Додати облікові дані",editCredential:"Редагувати облікові дані",deleteCredential:"Видалити облікові дані",credentialDetails:"Відомості про облікові дані",serviceName:"Назва сервісу",notes:"Нотатки",totp:"Двофакторна аутентифікація",totpCode:"Код TOTP",copyTotp:"Копіювати TOTP",totpSecret:"Секрет TOTP",totpSecretPlaceholder:"Введіть секретний ключ TOTP",welcomeTitle:"Ласкаво просимо до AliasVult!",welcomeDescription:"Щоб скористатися розширенням браузера AliasVault: перейдіть на вебсайт і скористайтеся спливаючим вікном автозаповнення AliasVault, щоб створити нові облікові дані.",noPasskeysFound:"Ключі доступу ще не створено. Ключі доступу створюються під час відвідування вебсайту, який пропонує ключі доступу як спосіб автентифікації.",noAttachmentsFound:"Не знайдено облікових даних із вкладеннями",noMatchingCredentials:"Не знайдено відповідних облікових даних",createdAt:"Створено",updatedAt:"Останнє оновлення",saveCredential:"Зберегти облікові дані",deleteCredentialTitle:"Видалити облікові дані",deleteCredentialConfirm:"Ви впевнені, що хочете видалити ці облікові дані? Цю дію неможливо скасувати.",filters:{all:"(Усі) Облікові дані",passkeys:"Ключі доступу",aliases:"Псевдоніми",userpass:"Паролі",attachments:"Вкладення"},randomAlias:"Випадковий псевдонім",manual:"Посібник",service:"Служба",serviceUrl:"URL-адреса сервісу",loginCredentials:"Дані для входу",generateRandomUsername:"Згенерувати випадкове ім'я користувача",generateRandomPassword:"Згенерувати випадковий пароль",changePasswordComplexity:"Зміна складності пароля",passwordLength:"Довжина пароля",includeLowercase:"Включити малі літери",includeUppercase:"Включити великі літери",includeNumbers:"Включити числа",includeSpecialChars:"Включити спеціальні символи",avoidAmbiguousChars:"Уникайте неоднозначних символів (o, 0 тощо)",generateNewPreview:"Згенерувати новий попередній перегляд",generateRandomAlias:"Генерувати випадковий псевдонім",clearAliasFields:"Очистити поля псевдоніма",alias:"Псевдонім",firstName:"Ім’я",lastName:"Прізвище",nickName:"Нікнейм",gender:"Стать",birthDate:"Дата народження",birthDatePlaceholder:"РРРР-ММ-ДД",metadata:"Метадані",validation:{required:"Це поле обов'язкове",serviceNameRequired:"Назва служби обов'язкова",invalidEmail:"Недійсний формат електронної пошти",invalidDateFormat:"Дата має бути у форматі РРРР-ММ-ДД"},privateEmailTitle:"Приватна електронна адреса",privateEmailAliasVaultServer:"Сервер AliasVault",privateEmailDescription:"Наскрізне шифрування, повністю конфіденційно.",publicEmailTitle:"Публічні тимчасові постачальники електронної пошти",publicEmailDescription:"Анонімність, але обмежена конфіденційність. Зміст електронного листа може прочитати будь-хто, хто знає адресу.",useDomainChooser:"Використовувати засіб вибору домену",enterCustomDomain:"Введіть користувацький домен",enterFullEmail:"Введіть повну електронну адресу",enterEmailPrefix:"Введіть префікс електронної адреси"},tk={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",errors:{invalidSecretKey:"Invalid secret key format."}},ak={title:"Електронні листи",deleteEmailTitle:"Видалити електронного листа",deleteEmailConfirm:"Ви впевнені, що хочете остаточно видалити цей електронний лист?",from:"Від",to:"До",date:"Дата",emailContent:"Вміст електронного листа",attachments:"Вкладення",emailNotFound:"Електронний лист не знайдено",noEmails:"Електронних листів не знайдено",noEmailsDescription:"Ви ще не отримували жодних листів на свої приватні адреси електронної пошти. Коли ви отримаєте новий лист, він з’явиться тут.",dateFormat:{justNow:"щойно",minutesAgo_single:"{{count}} хвилина тому",minutesAgo_plural:"{{count}} хвилин тому",hoursAgo_single:"{{count}} година тому",hoursAgo_plural:"{{count}} годин тому",yesterday:"учора"},errors:{emailLoadError:"Під час завантаження електронних листів сталася помилка. Спробуйте ще раз пізніше.",emailUnexpectedError:"Під час завантаження електронних листів сталася неочікувана помилка. Спробуйте ще раз пізніше."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Поточна вибрана електронна адреса вже використовується. Змініть електронну адресу, відредагувавши ці облікові дані.",CLAIM_DOES_NOT_EXIST:"Під час спроби завантажити електронні листи сталася помилка. Спробуйте відредагувати та зберегти запис облікових даних, щоб синхронізувати базу даних, а потім повторіть спробу."}},nk={title:"Налаштування",serverUrl:"URL-адреса сервера",language:"Мова",autofillEnabled:"Увімкнути автозаповнення",version:"Версія",openInNewWindow:"Відкрити у новому вікні",openWebApp:"Відкрити веб додаток",loggedIn:"Вхід виконано",logout:"Вийти",lock:"Заблокувати",globalSettings:"Глобальні налаштування",autofillPopup:"Спливаюче вікно автозаповнення",activeOnAllSites:"Активно на всіх сайтах (якщо не вимкнено нижче)",disabledOnAllSites:"Вимкнено на всіх сайтах",rightClickContextMenu:"Контекстне меню правою кнопкою миші",autofillMatching:"Автозаповнення відповідності",autofillMatchingMode:"Режим автозаповнення відповідностей",autofillMatchingModeDescription:"Визначає, які облікові дані вважаються відповідними та будуть показуватися як пропозиції у спливному вікні автозаповнення для певного вебсайту.",autofillMatchingDefault:"URL-адреса + піддомен + універсальне ім'я",autofillMatchingUrlSubdomain:"URL-адреса + піддомен",autofillMatchingUrlExact:"Лише точний домен URL-адреси",siteSpecificSettings:"Налаштування, специфічні для сайту",autofillPopupOn:"Спливаюче вікно автозаповнення на: ",enabledForThisSite:"Увімкнено для цього сайту",disabledForThisSite:"Вимкнено для цього сайту",temporarilyDisabledUntil:"Тимчасово вимкнено до ",resetAllSiteSettings:"Скинути всі налаштування, характерні для сайту",appearance:"Зовнішній вигляд",theme:"Тема",useDefault:"Використовувати за замовчуванням",light:"Світла",dark:"Темна",keyboardShortcuts:"Комбінації клавіш",configureKeyboardShortcuts:"Налаштування комбінацій клавіш",configure:"Налаштування",clipboardClearTimeout:"Очистити буфер обміну після копіювання",clipboardClearTimeoutDescription:"Автоматично очищати буфер обміну після копіювання конфіденційних даних",clipboardClearDisabled:"Ніколи не очищати",clipboardClear5Seconds:"Очистити після 5 секунд",clipboardClear10Seconds:"Очистити після 10 секунд",clipboardClear15Seconds:"Очистити після 15 секунд",autoLockTimeout:"Тайм-аут автоматичного блокування",autoLockTimeoutDescription:"Автоматично блокувати сховище після періоду бездіяльності",autoLockTimeoutHelp:"Сховище буде заблоковано лише після зазначеного періоду бездіяльності (не використовується автозаповнення або не відкривається спливне вікно розширення). Сховище завжди блокуватиметься, коли браузер закривається, незалежно від цього налаштування.",autoLockNever:"Ніколи",autoLock15Seconds:"15 секунд",autoLock1Minute:"1 хвилина",autoLock5Minutes:"5 хвилин",autoLock15Minutes:"15 хвилин",autoLock30Minutes:"30 хвилин",autoLock1Hour:"1 година",autoLock4Hours:"4 години",autoLock8Hours:"8 годин",autoLock24Hours:"24 години",versionPrefix:"Версія ",autofillSettings:"Налаштування автозаповнення",clipboardSettings:"Параметри буфера обміну",contextMenuSettings:"Налаштування контекстного меню",passkeySettings:"Налаштування ключа доступу",contextMenu:"Контекстне меню",contextMenuEnabled:"Контекстне меню увімкнено",contextMenuDisabled:"Контекстне меню вимкнено",contextMenuDescription:"Натисніть правою кнопкою миші на поля введення, щоб отримати доступ до параметрів AliasVault",selectLanguage:"Виберіть мову",serverConfiguration:"Конфігурація сервера",serverConfigurationDescription:"Налаштування URL-адреси сервера AliasVault для самостійно розміщених екземплярів",customApiUrl:"URL-адреса API",customClientUrl:"URL-адреса клієнта",apiUrlHint:"URL-адреса кінцевої точки API (зазвичай URL-адреса клієнта + /api)",clientUrlHint:"URL-адреса вебінтерфейсу вашого самостійного екземпляра",autofillSettingsDescription:"Увімкнення або вимкнення спливаючого вікна автозаповнення на вебсторінках",autofillEnabledDescription:"",autofillDisabledDescription:"Autofill suggestions are disabled globally",languageSettings:"Language",validation:{apiUrlRequired:"URL-адреса API обов'язкова",apiUrlInvalid:"Будь ласка, введіть дійсну URL-адресу API",clientUrlRequired:"URL-адреса клієнта обов'язкова",clientUrlInvalid:"Будь ласка, введіть дійсну URL-адресу клієнта"},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."}},rk={passkey:"Passkey",site:"Site",displayName:"Name",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.",bypass:{title:"Use Browser Passkey",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",useBrowserPasskey:"Use Browser Passkey"},create:{title:"Create Passkey",createFor:"Create a new passkey for",titleLabel:"Title",titlePlaceholder:"Enter a name for this passkey",createButton:"Create Passkey",useBrowserPasskey:"Use Browser Passkey",selectPasskeyToReplace:"Select a passkey to replace:",createNewPasskey:"Create New Passkey",replacingPasskey:"Replacing passkey: {{displayName}}",confirmReplace:"Confirm Replace"},settings:{passkeyProvider:"Passkey Provider",passkeyProviderOn:"Passkey Provider on "}},ik={title:"Оновлення сховища",subtitle:"AliasVault оновлено, і ваше сховище потрібно оновити. Це займе лише кілька секунд.",versionInformation:"Інформація про версію",yourVault:"Your vault version:",newVersion:"New available version:",upgrade:"Оновлення сховища",upgrading:"Оновлення...",logout:"Вихід",whatsNew:"Що нового",whatsNewDescription:"Для підтримки таких змін потрібне оновлення:",noDescriptionAvailable:"Для цієї версії немає опису.",alerts:{unableToGetVersionInfo:"Не вдалося отримати інформацію про версію. Спробуйте ще раз.",selfHostedServer:"Сервер із самостійним розміщенням",selfHostedWarning:"Якщо ви використовуєте власний сервер, обов’язково оновіть і свій власний екземпляр, інакше вхід до вебклієнта перестане працювати.",continueUpgrade:"Продовжити оновлення",upgradeFailed:"Помилка оновлення",failedToApplyMigration:"Не вдалося застосувати міграцію ({{current}} з {{total}})"}},sk={auth:WI,menu:XI,common:$I,content:ZI,credentials:ek,totp:tk,emails:ak,settings:nk,passkeys:rk,upgrade:ik},ok={loginTitle:"登录到 AliasVault",username:"用户名或电子邮箱",usernamePlaceholder:"姓名 / name@company.com",password:"密码",passwordPlaceholder:"输入您的密码",rememberMe:"记住我",loginButton:"登录",noAccount:"还没有账户？",createVault:"创建新密码库",twoFactorTitle:"请输入认证器的动态验证码。",authCode:"身份验证码",authCodePlaceholder:"输入 6 位数代码",verify:"验证",twoFactorNote:"注意：如果无法访问您的认证设备，您可以通过网站登录，使用恢复码重置双因素认证（2FA）。",masterPassword:"主密码",unlockVault:"解锁",unlockWithPin:"使用 PIN 解锁",enterPinToUnlock:"输入您的 PIN 以解锁密码库",useMasterPassword:"使用主密码",unlockTitle:"解锁您的密码库",logout:"退出登录",logoutConfirm:"确定要退出登录吗？",unlockSuccessTitle:"您的密码库已成功解锁",unlockSuccessDescription:"现在您可以在浏览器的登录表单中使用自动填充功能了。",closePopup:"关闭此弹窗",browseVault:"浏览密码库内容",connectingTo:"正在连接",switchAccounts:"切换账户？",loggedIn:"已登录",loginWithMobile:"使用移动应用登录",unlockWithMobile:"使用移动应用解锁",scanQrCode:"Scan this QR code with your AliasVault mobile app to log in and unlock your vault.",errors:{invalidCode:"请输入有效的6位动态验证码。",serverError:"无法连接到AliasVault服务器。请稍后重试，若问题依旧，请联系支持人员。",wrongPassword:"密码不正确。请重试。",accountLocked:"由于多次尝试失败，账户已暂时锁定。",networkError:"网络错误。请检查您的连接后重试。",sessionExpired:"您的会话已过期。请重新登录。",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."}},lk={credentials:"凭据",emails:"电子邮件",settings:"设置"},uk={loading:"加载中…",notice:"注意",error:"错误",cancel:"取消",confirm:"确认",back:"返回",next:"下一步",use:"使用",delete:"删除",save:"保存",or:"或",close:"关闭",copied:"已复制！",openInNewWindow:"在新窗口中打开",enabled:"启用",disabled:"禁用",showPassword:"显示密码",hidePassword:"隐藏密码",showDetails:"显示详情",hideDetails:"隐藏详情",copyToClipboard:"复制到剪贴板",loadingEmails:"加载邮件中…",loadingTotpCodes:"加载TOTP验证码中…",attachments:"附件",loadingAttachments:"加载附件中…",settings:"设置",recentEmails:"近期电子邮件",loginCredentials:"登录凭据",twoFactorAuthentication:"双因素认证（2FA）",alias:"别名",notes:"备注",fullName:"全名",firstName:"名",lastName:"姓",birthDate:"出生日期",nickname:"昵称",email:"电子邮箱",username:"用户名",password:"密码",syncingVault:"正在同步密码库",savingChangesToVault:"正在保存对密码库的更改",uploadingVaultToServer:"正在将密码库上传到服务器",checkingVaultUpdates:"检查密码库更新中",syncingUpdatedVault:"同步更新后的密码库",executingOperation:"执行操作中…",loadMore:"加载更多",errors:{serverNotAvailable:"AliasVault服务器不可用。请稍后重试，若问题持续请联系支持人员。",clientVersionNotSupported:"此版本的AliasVault浏览器扩展已不被服务器支持。请将浏览器扩展更新到最新版本。",browserExtensionOutdated:"此浏览器扩展已过时，无法用于访问此密码库。请更新此浏览器扩展以继续。",serverVersionNotSupported:"AliasVault服务器需要更新到新版本才能使用此浏览器扩展。如需帮助，请联系支持人员。",serverVersionTooOld:"AliasVault 服务器需要更新到更高版本才能使用此功能。如需帮助，请联系服务器管理员。",unknownError:"发生未知错误",unknownErrorTryAgain:"发生未知错误，请重试。",vaultNotAvailable:"密码库不可用",vaultIsLocked:"密码库已锁定",passwordChanged:"登录密码已更新，请重新登录以确保账户安全。"},apiErrors:{UNKNOWN_ERROR:"发生未知错误。请重试。",ACCOUNT_LOCKED:"由于多次尝试失败，账户已暂时锁定。请稍后重试。",ACCOUNT_BLOCKED:"您的账户已被停用。若您认为此操作有误，请联系支持人员。",USER_NOT_FOUND:"用户名或密码无效。请重试。",INVALID_AUTHENTICATOR_CODE:"认证器验证码无效。请重试。",INVALID_RECOVERY_CODE:"恢复码无效。请重试。",REFRESH_TOKEN_REQUIRED:"刷新令牌为必填项。",INVALID_REFRESH_TOKEN:"刷新令牌无效。",PUBLIC_REGISTRATION_DISABLED:"当前服务器已禁用新账户注册。请联系管理员。",USERNAME_REQUIRED:"用户名为必填项。",USERNAME_ALREADY_IN_USE:"用户名已被使用。",USERNAME_AVAILABLE:"用户名可用。",USERNAME_MISMATCH:"用户名与当前用户不匹配。",PASSWORD_MISMATCH:"提供的密码与您的当前密码不匹配。",ACCOUNT_SUCCESSFULLY_DELETED:"账户已成功删除。",USERNAME_EMPTY_OR_WHITESPACE:"用户名不能为空或仅含空格。",USERNAME_TOO_SHORT:"用户名过短：至少需要3个字符。",USERNAME_TOO_LONG:"用户名过长：不能超过40个字符。",USERNAME_INVALID_EMAIL:"无效的邮箱地址。",USERNAME_INVALID_CHARACTERS:"用户名无效，只能包含字母或数字。",VAULT_NOT_UP_TO_DATE:"您的密码库不是最新的。请同步您的密码库后重试。",INTERNAL_SERVER_ERROR:"服务器内部错误。",VAULT_ERROR:"本地密码库不是最新的。请刷新页面同步密码库后重试。"}},ck={or:"或",new:"新建",cancel:"取消",vaultLocked:"AliasVault已锁定。",creatingNewAlias:"正在创建新别名…",noMatchesFound:"未找到匹配项",searchVault:"搜索密码库…",serviceName:"服务名称",email:"电子邮箱",username:"用户名",password:"密码",enterServiceName:"输入服务名称",enterEmailAddress:"输入邮箱地址",enterUsername:"输入用户名",hideFor1Hour:"隐藏1小时（当前网站）",hidePermanently:"永久隐藏（当前网站）",createRandomAlias:"创建随机别名",createUsernamePassword:"创建用户名/密码",randomAlias:"随机别名",usernamePassword:"用户名/密码",createAndSaveAlias:"创建并保存别名",createAndSaveCredential:"创建并保存凭据",randomIdentityDescription:"生成一个包含随机邮箱地址的随机身份，可在AliasVault中查看。",randomIdentityDescriptionDropdown:"带随机邮箱的随机身份",manualCredentialDescription:"指定您自己的邮箱地址和用户名。",manualCredentialDescriptionDropdown:"手动输入用户名和密码",failedToCreateIdentity:"创建身份失败。请重试。",enterEmailAndOrUsername:"输入邮箱和/或用户名",autofillWithAliasVault:"使用AliasVault自动填充",generateRandomPassword:"生成随机密码（复制到剪贴板）",generateNewPassword:"生成新密码",togglePasswordVisibility:"切换密码可见性",passwordCopiedToClipboard:"密码已复制到剪贴板",openAliasVaultToUpgrade:"打开AliasVault进行升级",vaultUpgradeRequired:"需要升级密码库。",dismissPopup:"关闭弹窗"},dk={title:"凭据",addCredential:"添加凭据",editCredential:"编辑凭据",deleteCredential:"删除凭据",credentialDetails:"凭据详情",serviceName:"服务名称",notes:"备注",totp:"双因素认证（2FA）",totpCode:"TOTP验证码",copyTotp:"复制 TOTP",totpSecret:"TOTP密钥",totpSecretPlaceholder:"输入TOTP密钥",welcomeTitle:"欢迎使用AliasVault！",welcomeDescription:"要使用AliasVault浏览器扩展：导航到某个网站，使用AliasVault自动填充弹窗创建新凭据。",noPasskeysFound:"尚未创建通行密钥。访问以通行密钥为认证方式的网站才能创建通行密钥。",noAttachmentsFound:"未找到带有附件的凭据",noMatchingCredentials:"未找到匹配的凭据",createdAt:"创建时间",updatedAt:"最后更新时间",saveCredential:"保存凭据",deleteCredentialTitle:"删除凭据",deleteCredentialConfirm:"确定要删除此凭据吗？此操作无法撤销。",filters:{all:"（所有）凭据",passkeys:"通行密钥",aliases:"别名",userpass:"密码",attachments:"附件"},randomAlias:"随机别名",manual:"手动",service:"服务",serviceUrl:"服务 URL",loginCredentials:"登录凭据",generateRandomUsername:"生成随机用户名",generateRandomPassword:"生成随机密码",changePasswordComplexity:"修改密码复杂度",passwordLength:"密码长度",includeLowercase:"包含小写字母",includeUppercase:"包含大写字母",includeNumbers:"包含数字",includeSpecialChars:"包含特殊字符",avoidAmbiguousChars:"避免易混淆字符（o、0 等）",generateNewPreview:"生成新预览",generateRandomAlias:"生成随机别名",clearAliasFields:"清除别名字段",alias:"别名",firstName:"名",lastName:"姓",nickName:"昵称",gender:"性别",birthDate:"出生日期",birthDatePlaceholder:"YYYY-MM-DD",metadata:"元数据",validation:{required:"此字段为必填项",serviceNameRequired:"服务名称为必填项",invalidEmail:"电子邮箱格式无效",invalidDateFormat:"日期必须采用 YYYY-MM-DD 格式"},privateEmailTitle:"私人电子邮箱",privateEmailAliasVaultServer:"AliasVault服务器",privateEmailDescription:"端到端加密，完全私密。",publicEmailTitle:"公开临时邮箱供应商",publicEmailDescription:"匿名但隐私有限。任何知晓该邮箱地址的人均可查看邮件内容。",useDomainChooser:"使用域名选择器",enterCustomDomain:"输入自定义域名",enterFullEmail:"输入验证邮箱地址",enterEmailPrefix:"输入邮箱前缀"},fk={addCode:"添加两步验证码",instructions:"Enter the secret key shown by the website where you want to add two-factor authentication.",nameOptional:"名称（可选）",secretKey:"密钥",saveToViewCode:"保存以查看验证码",errors:{invalidSecretKey:"密钥格式无效。"}},hk={title:"邮件",deleteEmailTitle:"删除邮件",deleteEmailConfirm:"确定要永久删除此邮件吗？",from:"发件人",to:"收件人",date:"日期",emailContent:"邮件内容",attachments:"附件",emailNotFound:"未找到邮件",noEmails:"未找到邮件",noEmailsDescription:"您的私人邮箱地址尚未收到任何邮件。当您收到新邮件时，会显示在这里。",dateFormat:{justNow:"刚刚",minutesAgo_single:"{{count}}分钟前",minutesAgo_plural:"{{count}}分钟前",hoursAgo_single:"{{count}}小时前",hoursAgo_plural:"{{count}}小时前",yesterday:"昨天"},errors:{emailLoadError:"加载邮件时发生错误。请稍后重试。",emailUnexpectedError:"加载邮件时发生意外错误。请稍后重试。"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"当前选择的邮箱地址已被使用。请通过编辑此凭据修改邮箱地址。",CLAIM_DOES_NOT_EXIST:"加载邮件时发生错误。请尝试编辑并保存凭据条目以同步数据库，然后重试。"}},Ak={title:"设置",serverUrl:"服务器 URL",language:"语言",autofillEnabled:"启用自动填充",version:"版本",openInNewWindow:"在新窗口中打开",openWebApp:"打开网页应用",loggedIn:"已登录",logout:"退出登录",lock:"锁定",globalSettings:"全局设置",autofillPopup:"自动填充弹窗",activeOnAllSites:"在所有网站上激活（除非在下方禁用）",disabledOnAllSites:"在所有网站上禁用",rightClickContextMenu:"右键上下文菜单",autofillMatching:"自动填充匹配",autofillMatchingMode:"自动填充匹配模式",autofillMatchingModeDescription:"用于判定哪些凭据会被视为匹配项，并在指定网站的自动填充弹窗中显示为建议选项。",autofillMatchingDefault:"URL + 子域名 + 名称通配符",autofillMatchingUrlSubdomain:"URL + 子域名",autofillMatchingUrlExact:"精确匹配URL域名",siteSpecificSettings:"网站特定设置",autofillPopupOn:"自动填充弹窗在以下位置： ",enabledForThisSite:"对此网站启用",disabledForThisSite:"对此网站禁用",temporarilyDisabledUntil:"暂时禁用至 ",resetAllSiteSettings:"重置所有网站特定设置",appearance:"外观",theme:"主题",useDefault:"使用默认",light:"浅色",dark:"深色",keyboardShortcuts:"键盘快捷键",configureKeyboardShortcuts:"配置键盘快捷键",configure:"配置",clipboardClearTimeout:"复制后清除剪贴板",clipboardClearTimeoutDescription:"复制敏感数据后自动清除剪贴板",clipboardClearDisabled:"从不清除",clipboardClear5Seconds:"5秒后清除",clipboardClear10Seconds:"10 秒后清除",clipboardClear15Seconds:"15分钟后清除",autoLockTimeout:"自动锁定超时时间",autoLockTimeoutDescription:"无操作一段时间后自动锁定密码库",autoLockTimeoutHelp:"密码库仅在达到指定的无操作时长后才会锁定（未使用自动填充功能或未打开扩展程序弹窗）。无论此设置如何，关闭浏览器时密码库始终会锁定。",autoLockNever:"从不",autoLock15Seconds:"15 秒",autoLock1Minute:"1 分钟",autoLock5Minutes:"5 分钟",autoLock15Minutes:"15 分钟",autoLock30Minutes:"30 分钟",autoLock1Hour:"1 小时",autoLock4Hours:"4 小时",autoLock8Hours:"8 小时",autoLock24Hours:"24 小时",versionPrefix:"版本 ",autofillSettings:"自动填充设置",clipboardSettings:"剪贴板设置",contextMenuSettings:"上下文菜单设置",passkeySettings:"通行密钥设置",contextMenu:"上下文菜单",contextMenuEnabled:"上下文菜单已启用",contextMenuDisabled:"上下文菜单已停用",contextMenuDescription:"右键点击输入字段即可访问 AliasVault 选项",selectLanguage:"选择语言",serverConfiguration:"服务器配置",serverConfigurationDescription:"Configure the AliasVault server URL for self-hosted instances",customApiUrl:"API URL",customClientUrl:"客户端 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:"语言",validation:{apiUrlRequired:"API URL 为必填项",apiUrlInvalid:"请输入有效的 API URL",clientUrlRequired:"客户端 URL 为必填项",clientUrlInvalid:"请输入有效的客户端 URL"},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:"PIN 码",pinDescription:"使用 PIN 码解锁密码库",setupPin:"设置 PIN 码",enterNewPinDescription:"Enter a PIN code consisting of minimum 6 digits",confirmPin:"确认 PIN",confirmPinDescription:"再次输入您的 PIN 以确认",invalidPinFormat:"PIN 格式无效",pinMismatch:"PIN 不一致",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."}},gk={passkey:"通行密钥",site:"网站",displayName:"名称",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:"This passkey will be deleted when you save this credential.",bypass:{title:"使用浏览器通行密钥",description:"How long would you like to use the browser's passkey provider for {{origin}}?",thisTimeOnly:"仅一次",alwaysForSite:"始终为此网站"},authenticate:{title:"使用通行密钥登录",signInFor:"使用通行密钥登录或",selectPasskey:"选择要登录的通行密钥：",noPasskeysFound:"未找到此网站的通行密钥",useBrowserPasskey:"使用浏览器通行密钥"},create:{title:"创建通行密钥",createFor:"创建新通行密钥用于",titleLabel:"标题",titlePlaceholder:"输入此通行密钥的名称",createButton:"创建通行密钥",useBrowserPasskey:"使用浏览器通行密钥",selectPasskeyToReplace:"选择要替换的通行密钥：",createNewPasskey:"创建新通行密钥",replacingPasskey:"替换通行密钥：{{displayName}}",confirmReplace:"确认替换"},settings:{passkeyProvider:"通行密钥提供程序",passkeyProviderOn:"通行密钥提供程序于"}},mk={title:"升级密码库",subtitle:"AliasVault已更新，您的密码库需要升级，仅需数秒。",versionInformation:"版本信息",yourVault:"您的密码库版本：",newVersion:"新可用版本：",upgrade:"升级密码库",upgrading:"升级中…",logout:"退出登录",whatsNew:"新功能",whatsNewDescription:"需要升级才能支持以下更改：",noDescriptionAvailable:"此版本无可用说明。",alerts:{unableToGetVersionInfo:"无法获取版本信息。请重试。",selfHostedServer:"自托管服务器",selfHostedWarning:"如果您使用的是自托管服务器，请确保同时更新您的自托管实例，否则将无法登录网页客户端。",continueUpgrade:"继续升级",upgradeFailed:"升级失败",failedToApplyMigration:"应用迁移失败（{{current}} / {{total}}）"}},pk={auth:ok,menu:lk,common:uk,content:ck,credentials:dk,totp:fk,emails:hk,settings:Ak,passkeys:gk,upgrade:mk},vl={de:{translation:gN},en:{translation:IN},fi:{translation:ON},he:{translation:YN},it:{translation:iI},nl:{translation:mI},pl:{translation:kI},pt:{translation:_I},ru:{translation:JI},uk:{translation:sk},zh:{translation:pk}},Cl=[{code:"de",name:"German",nativeName:"Deutsch",flag:"🇩🇪"},{code:"en",name:"English",nativeName:"English",flag:"🇺🇸"},{code:"fi",name:"Finnish",nativeName:"Suomi",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:"ru",name:"Russian",nativeName:"Русский",flag:"🇷🇺"},{code:"uk",name:"Ukrainian",nativeName:"Українська",flag:"🇺🇦"},{code:"zh",name:"Chinese",nativeName:"简体中文",flag:"🇨🇳"}],yr="en",hc=Cl.map(n=>n.code),Gu=new Map;async function Zp(n){const t=`all:${n}`;if(Gu.has(t))return Gu.get(t);if(vl[n]){const r=vl[n].translation;return Gu.set(t,r),r}if(n!==yr&&vl[yr]){console.warn(`Translations not found for ${n}, falling back to ${yr}`);const r=vl[yr].translation;return Gu.set(t,r),r}return console.warn(`No translations found for ${n} and no fallback available`),{}}function yk(n){return Cl.find(t=>t.code===n)}function ey(n,t){return t.split(".").reduce((r,i)=>r&&typeof r=="object"&&r!==null&&i in r?r[i]:void 0,n)}async function Ek(){try{const n=await Oe.getItem("local:language");if(n&&hc.includes(n))return n;const t=navigator.language.split("-")[0],r=hc.includes(t)?t:yr;return await Oe.setItem("local:language",r),r}catch(n){return console.error("Failed to get current language:",n),yr}}async function bk(n,t){try{const r=await Ek(),i=await Zp(r),o=ey(i,n);if(o&&typeof o=="string")return o;if(r!==yr){const l=await Zp(yr),c=ey(l,n);if(c&&typeof c=="string")return c}return t||n}catch(r){return console.error("Translation error:",r),t||n}}const ty="UklGRjoEAABXRUJQVlA4IC4EAAAwFwCdASqAAIAAPpFCm0olo6Ihp5IraLASCWUA0eb/0s56RrLtCnYfLPiBshdXWMx8j1Ez65f169iA4xUDBTEV6ylMQeCIj2b7RngGi7gKZ9WjKdSoy9R8JcgOmjCMlDmLG20KhNo/i/Dc/Ah5GAvGfm8kfniV3AkR6fxN6eKwjDc6xrDgSfS48G5uGV6WzQt24YAVlLSK9BMwndzfHnePK1KFchFrL7O3ulB8cGNCeomu4o+l0SrS/JKblJ4WTzj0DAD++lCUEouSfgRKdiV2TiYCD+H+l3tANKSPQFPQuzi7rbvxqGeRmXB9kDwURaoSTTpYjA9REMUi9uA6aV7PWtBNXgUzMLowYMZeos6Xvyhb34GmufswMHA5ZyYpxzjTphOak4ZjNOiz8aScO5ygiTx99SqwX/uL+HSeVOSraHw8IymrMwm+jLxqN8BS8dGcItLlm/ioulqH2j4V8glDgSut+ExkxiD7m8TGPrrjCQNJbRDzpOFsyCyfBZupvp8QjGKW2KGziSZeIWes4aTB9tRmeEBhnUrmTDZQuXcc67Fg82KHrSfaeeOEq6jjuUjQ8wUnzM4Zz3dhrwSyslVz/WvnKqYkr4V/TTXPFF5EjF4rM1bHZ8bK63EfTnK41+n3n4gEFoYP4mXkNH0hntnYcdTqiE7Gn+q0BpRRxnkpBSZlA6Wa70jpW0FGqkw5e591A5/H+OV+60WAo+4Mi+NlsKrvLZ9EiVaPnoEFZlJQx1fA777AJ2MjXJ4KSsrWDWJi1lE8yPs8V6XvcC0chDTYt8456sKXAagCZyY+fzQriFMaddXyKQdG8qBqcdYjAsiIcjzaRFBBoOK9sU+sFY7N6B6+xtrlu3c37rQKkI3O2EoiJOris54EjJ5OFuumA0M6riNUuBf/MEPFBVx1JRcUEs+upEBsCnwYski7FT3TTqHrx7v5AjgFN97xhPTkmVpu6sxRnWBi1fxIRp8eWZeFM6mUcGgVk1WeVb1yhdV9hoMo2TsNEPE0tHo/wvuSJSzbZo7wibeXM9v/rRfKcx7X93rfiXVnyQ9f/5CaAQ4lxedPp/6uzLtOS4FyL0bCNeZ6L5w+AiuyWCTDFIYaUzhwfG+/YTQpWyeZCdQIKzhV+3GeXI2cxoP0ER/DlOKymf1gm+zRU3sqf1lBVQ0y+mK/Awl9bS3uaaQmI0FUyUwHUKP7PKuXnO+LcwDv4OfPT6hph8smc1EtMe5ib/apar/qZ9dyaEaElALJ1KKxnHziuvVl8atk1fINSQh7OtXDyqbPw9o/nGIpTnv5iFmwmWJLis2oyEgPkJqyx0vYI8rjkVEzKc8eQavAJBYSpjMwM193Swt+yJyjvaGYWPnqExxKiNarpB2WSO7soCAZXhS1uEYHryrK47BH6W1dRiruqT0xpLih3MXiwU3VDwAAAA==";class Ac{constructor(){Ot(this,"db",null);Ot(this,"isInTransaction",!1)}async initializeFromBase64(t){try{const r=atob(t),i=new Uint8Array(r.length);for(let l=0;l<r.length;l++)i[l]=r.charCodeAt(l);const o=await tN({locateFile:l=>`src/${l}`});this.db=new o.Database(i)}catch(r){throw console.error("Error initializing SQLite database:",r),r}}beginTransaction(){if(!this.db)throw new Error("Database not initialized");if(this.isInTransaction)throw new Error("Transaction already in progress");try{this.db.run("BEGIN TRANSACTION"),this.isInTransaction=!0}catch(t){throw console.error("Error beginning transaction:",t),t}}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(t){throw console.error("Error committing transaction:",t),t}}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(t){throw console.error("Error rolling back transaction:",t),t}}exportToBase64(){if(!this.db)throw new Error("Database not initialized");try{this.db.run("VACUUM");const t=this.db.export();let r="";for(let i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);return btoa(r)}catch(t){throw console.error("Error exporting SQLite database:",t),t}}executeQuery(t,r=[]){if(!this.db)throw new Error("Database not initialized");try{const i=this.db.prepare(t);i.bind(r);const o=[];for(;i.step();)o.push(i.getAsObject());return i.free(),o}catch(i){throw console.error("Error executing query:",i),i}}executeUpdate(t,r=[]){if(!this.db)throw new Error("Database not initialized");try{const i=this.db.prepare(t);i.bind(r),i.step();const o=this.db.getRowsModified();return i.free(),o}catch(i){throw console.error("Error executing update:",i),i}}close(){this.db&&(this.db.close(),this.db=null)}getCredentialById(t){const i=this.executeQuery(`
        SELECT DISTINCT
            c.Id,
            c.Username,
            c.Notes,
            c.ServiceId,
            s.Name as ServiceName,
            s.Url as ServiceUrl,
            s.Logo as Logo,
            a.FirstName,
            a.LastName,
            a.NickName,
            a.BirthDate,
            a.Gender,
            a.Email,
            p.Value as Password,
            CASE
                WHEN EXISTS (
                    SELECT 1 FROM Passkeys pk
                    WHERE pk.CredentialId = c.Id AND pk.IsDeleted = 0
                ) THEN 1
                ELSE 0
            END as HasPasskey,
            (SELECT pk.RpId FROM Passkeys pk WHERE pk.CredentialId = c.Id AND pk.IsDeleted = 0 LIMIT 1) as PasskeyRpId,
            (SELECT pk.DisplayName FROM Passkeys pk WHERE pk.CredentialId = c.Id AND pk.IsDeleted = 0 LIMIT 1) as PasskeyDisplayName
        FROM Credentials c
        LEFT JOIN Services s ON c.ServiceId = s.Id
        LEFT JOIN Aliases a ON c.AliasId = a.Id
        LEFT JOIN Passwords p ON p.CredentialId = c.Id
        WHERE c.IsDeleted = 0
        AND c.Id = ?`,[t]);if(i.length===0)return null;const o=i[0];return{Id:o.Id,Username:o.Username,Password:o.Password,ServiceName:o.ServiceName,ServiceUrl:o.ServiceUrl,Logo:o.Logo,Notes:o.Notes,HasPasskey:o.HasPasskey===1,PasskeyRpId:o.PasskeyRpId,PasskeyDisplayName:o.PasskeyDisplayName,Alias:{FirstName:o.FirstName,LastName:o.LastName,NickName:o.NickName,BirthDate:o.BirthDate,Gender:o.Gender,Email:o.Email}}}getAllCredentials(){return this.executeQuery(`
            SELECT DISTINCT
                c.Id,
                c.Username,
                c.Notes,
                c.ServiceId,
                s.Name as ServiceName,
                s.Url as ServiceUrl,
                s.Logo as Logo,
                a.FirstName,
                a.LastName,
                a.NickName,
                a.BirthDate,
                a.Gender,
                a.Email,
                p.Value as Password,
                CASE
                    WHEN EXISTS (
                        SELECT 1 FROM Passkeys pk
                        WHERE pk.CredentialId = c.Id AND pk.IsDeleted = 0
                    ) THEN 1
                    ELSE 0
                END as HasPasskey,
                CASE
                    WHEN EXISTS (
                        SELECT 1 FROM Attachments att
                        WHERE att.CredentialId = c.Id AND att.IsDeleted = 0
                    ) THEN 1
                    ELSE 0
                END as HasAttachment
            FROM Credentials c
            LEFT JOIN Services s ON c.ServiceId = s.Id
            LEFT JOIN Aliases a ON c.AliasId = a.Id
            LEFT JOIN Passwords p ON p.CredentialId = c.Id
            WHERE c.IsDeleted = 0
            ORDER BY c.CreatedAt DESC`).map(i=>({Id:i.Id,Username:i.Username,Password:i.Password,ServiceName:i.ServiceName,ServiceUrl:i.ServiceUrl,Logo:i.Logo,Notes:i.Notes,HasPasskey:i.HasPasskey===1,HasAttachment:i.HasAttachment===1,Alias:{FirstName:i.FirstName,LastName:i.LastName,NickName:i.NickName,BirthDate:i.BirthDate,Gender:i.Gender,Email:i.Email}}))}getAllEmailAddresses(){return this.executeQuery(`
      SELECT DISTINCT
        a.Email
      FROM Credentials c
      LEFT JOIN Aliases a ON c.AliasId = a.Id
      WHERE a.Email IS NOT NULL AND a.Email != '' AND c.IsDeleted = 0
    `).map(i=>i.Email)}getAllEncryptionKeys(){return this.executeQuery(`SELECT
                x.PublicKey,
                x.PrivateKey,
                x.IsPrimary
            FROM EncryptionKeys x`)}getSetting(t,r=""){const i=this.executeQuery(`SELECT
                s.Value
            FROM Settings s
            WHERE s.Key = ?`,[t]);return i.length>0?i[0].Value:r}async getDefaultEmailDomain(){const t=await Oe.getItem("session:publicEmailDomains")??[],r=await Oe.getItem("session:privateEmailDomains")??[],i=await Oe.getItem("session:hiddenPrivateEmailDomains")??[],o=this.getSetting("DefaultEmailDomain"),l=A=>!!(A&&A!=="DISABLED.TLD"&&A!==""&&!i.includes(A)&&(r.includes(A)||t.includes(A)));if(o&&l(o))return o;const c=r.find(l);if(c)return c;const d=t.find(l);return d||null}getDefaultIdentityLanguage(){return this.getSetting("DefaultIdentityLanguage")}async getEffectiveIdentityLanguage(){const t=this.getDefaultIdentityLanguage();if(t)return t;const{mapUiLanguageToIdentityLanguage:r}=await Kp(async()=>{const{mapUiLanguageToIdentityLanguage:c}=await Promise.resolve().then(()=>yB);return{mapUiLanguageToIdentityLanguage:c}},[]),{default:i}=await Kp(async()=>{const{default:c}=await Promise.resolve().then(()=>IL);return{default:c}},void 0),o=i.language;return r(o)??"en"}getDefaultIdentityGender(){return this.getSetting("DefaultIdentityGender","random")}getDefaultIdentityAgeRange(){return this.getSetting("DefaultIdentityAgeRange","random")}getPasswordSettings(){const t=this.getSetting("PasswordGenerationSettings"),r={Length:18,UseLowercase:!0,UseUppercase:!0,UseNumbers:!0,UseSpecialChars:!0,UseNonAmbiguousChars:!1};try{if(t)return{...r,...JSON.parse(t)}}catch(i){console.warn("Failed to parse password settings:",i)}return r}async createCredential(t,r,i=[]){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();let o=null;try{if(t.Logo)if(typeof t.Logo=="object"&&!ArrayBuffer.isView(t.Logo)){const C=Object.values(t.Logo);o=new Uint8Array(C)}else(Array.isArray(t.Logo)||t.Logo instanceof ArrayBuffer||t.Logo instanceof Uint8Array)&&(o=new Uint8Array(t.Logo))}catch(C){console.warn("Failed to convert logo to Uint8Array:",C),o=null}const l=`
                INSERT INTO Services (Id, Name, Url, Logo, CreatedAt, UpdatedAt, IsDeleted)
                VALUES (?, ?, ?, ?, ?, ?, ?)`,c=crypto.randomUUID().toUpperCase(),d=us();this.executeUpdate(l,[c,t.ServiceName,t.ServiceUrl??null,o,d,d,0]);const A=`
                INSERT INTO Aliases (Id, FirstName, LastName, NickName, BirthDate, Gender, Email, CreatedAt, UpdatedAt, IsDeleted)
                VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,h=crypto.randomUUID().toUpperCase();this.executeUpdate(A,[h,t.Alias.FirstName??null,t.Alias.LastName??null,t.Alias.NickName??null,t.Alias.BirthDate??null,t.Alias.Gender??null,t.Alias.Email??null,d,d,0]);const y=`
                INSERT INTO Credentials (Id, Username, Notes, ServiceId, AliasId, CreatedAt, UpdatedAt, IsDeleted)
                VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,E=crypto.randomUUID().toUpperCase();if(this.executeUpdate(y,[E,t.Username??null,t.Notes??null,c,h,d,d,0]),t.Password){const C=`
                    INSERT INTO Passwords (Id, Value, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
                    VALUES (?, ?, ?, ?, ?, ?)`,x=crypto.randomUUID().toUpperCase();this.executeUpdate(C,[x,t.Password,E,d,d,0])}if(r)for(const C of r){const x=`
            INSERT INTO Attachments (Id, Filename, Blob, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
            VALUES (?, ?, ?, ?, ?, ?, ?)`,N=crypto.randomUUID().toUpperCase();this.executeUpdate(x,[N,C.Filename,C.Blob,E,d,d,0])}if(i)for(const C of i){if(C.IsDeleted)continue;this.executeUpdate(`
            INSERT INTO TotpCodes (Id, Name, SecretKey, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
            VALUES (?, ?, ?, ?, ?, ?, ?)`,[C.Id||crypto.randomUUID().toUpperCase(),C.Name,C.SecretKey,E,d,d,0])}return await this.commitTransaction(),E}catch(o){throw this.rollbackTransaction(),console.error("Error creating credential:",o),o}}async getDatabaseVersion(){if(!this.db)throw new Error("Database not initialized");try{const t=this.executeQuery(`
        SELECT MigrationId
        FROM __EFMigrationsHistory
        ORDER BY MigrationId DESC
        LIMIT 1`);if(t.length===0)throw new Error("No migrations found in the database.");const r=t[0].MigrationId,i=rN(r);if(!i)throw new Error("Could not extract version from migration ID");const o=nN(i);if(!o.isCompatible){const d=await bk("common.errors.browserExtensionOutdated");throw new ps(d)}if(o.isKnownVersion&&o.clientVersion)return o.clientVersion;const c=new uA().getLatestVersion();return{revision:c.revision,version:i,description:`Unknown version ${i} (backwards compatible)`,releaseVersion:c.releaseVersion,compatibleUpToVersion:c.compatibleUpToVersion}}catch(t){throw console.error("Error getting database version:",t),t}}async getLatestDatabaseVersion(){const r=new uA().getAllVersions();return r[r.length-1]}async hasPendingMigrations(){try{const t=await this.getDatabaseVersion(),r=await this.getLatestDatabaseVersion();return t.revision<r.revision}catch(t){throw console.error("Error checking pending migrations:",t),t}}getTotpCodesForCredential(t){if(!this.db)throw new Error("Database not initialized");try{return this.tableExists("TotpCodes")?this.executeQuery(`
        SELECT
          Id,
          Name,
          SecretKey,
          CredentialId
        FROM TotpCodes
        WHERE CredentialId = ? AND IsDeleted = 0`,[t]):[]}catch(r){return console.error("Error getting TOTP codes:",r),[]}}getAttachmentsForCredential(t){if(!this.db)throw new Error("Database not initialized");try{return this.tableExists("Attachments")?this.executeQuery(`
        SELECT
          Id,
          Filename,
          Blob,
          CredentialId,
          CreatedAt,
          UpdatedAt,
          IsDeleted
        FROM Attachments
        WHERE CredentialId = ? AND IsDeleted = 0`,[t]):[]}catch(r){return console.error("Error getting attachments:",r),[]}}async deleteCredentialById(t){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();const r=us(),i=`
        UPDATE Credentials
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE Id = ?`,o=`
        UPDATE Aliases
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE Id = (
          SELECT AliasId
          FROM Credentials
          WHERE Id = ?
        )`,l=`
        UPDATE Services
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE Id = (
          SELECT ServiceId
          FROM Credentials
          WHERE Id = ?
        )`,c=`
        UPDATE Passkeys
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE CredentialId = ?`,d=this.executeUpdate(i,[r,t]);return this.executeUpdate(o,[r,t]),this.executeUpdate(l,[r,t]),this.executeUpdate(c,[r,t]),await this.commitTransaction(),d}catch(r){throw this.rollbackTransaction(),console.error("Error deleting credential:",r),r}}async updateCredentialById(t,r,i,o=[],l=[]){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();const c=us(),d=this.getCredentialById(t.Id);if(!d)throw new Error("Credential not found");const A=`
        UPDATE Services
        SET Name = ?,
            Url = ?,
            Logo = COALESCE(?, Logo),
            UpdatedAt = ?
        WHERE Id = (
          SELECT ServiceId
          FROM Credentials
          WHERE Id = ?
        )`;let h=null;try{if(t.Logo)if(typeof t.Logo=="object"&&!ArrayBuffer.isView(t.Logo)){const x=Object.values(t.Logo);h=new Uint8Array(x)}else(Array.isArray(t.Logo)||t.Logo instanceof ArrayBuffer||t.Logo instanceof Uint8Array)&&(h=new Uint8Array(t.Logo))}catch(x){console.warn("Failed to convert logo to Uint8Array:",x),h=null}this.executeUpdate(A,[t.ServiceName,t.ServiceUrl??null,h,c,t.Id]);const y=`
        UPDATE Aliases
        SET FirstName = ?,
            LastName = ?,
            NickName = ?,
            BirthDate = ?,
            Gender = ?,
            Email = ?,
            UpdatedAt = ?
        WHERE Id = (
          SELECT AliasId
          FROM Credentials
          WHERE Id = ?
        )`;let E=t.Alias.BirthDate;if(E&&d.Alias.BirthDate){const x=new Date(E),N=new Date(d.Alias.BirthDate);x.getTime()===N.getTime()&&(E=d.Alias.BirthDate)}if(this.executeUpdate(y,[t.Alias.FirstName??null,t.Alias.LastName??null,t.Alias.NickName??null,E??null,t.Alias.Gender??null,t.Alias.Email??null,c,t.Id]),this.executeUpdate(`
        UPDATE Credentials
        SET Username = ?,
            Notes = ?,
            UpdatedAt = ?
        WHERE Id = ?`,[t.Username??null,t.Notes??null,c,t.Id]),t.Password!==d.Password&&(this.executeQuery(`
          SELECT Id
          FROM Passwords
          WHERE CredentialId = ?`,[t.Id]).length===0?this.executeUpdate(`
            INSERT INTO Passwords (Id, Value, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
            VALUES (?, ?, ?, ?, ?, ?)`,[crypto.randomUUID().toUpperCase(),t.Password,t.Id,c,c,0]):this.executeUpdate(`
            UPDATE Passwords
            SET Value = ?, UpdatedAt = ?
            WHERE CredentialId = ?`,[t.Password,c,t.Id])),i){const x=i.map(I=>I.Id),N=r.filter(I=>!x.includes(I));for(const I of N)this.executeUpdate(`
            UPDATE Attachments
            SET IsDeleted = 1,
                UpdatedAt = ?
            WHERE Id = ?`,[c,I]);for(const I of i)r.includes(I.Id)||this.executeUpdate(`
              INSERT INTO Attachments (Id, Filename, Blob, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
              VALUES (?, ?, ?, ?, ?, ?, ?)`,[I.Id,I.Filename,I.Blob,t.Id,c,c,0])}if(l){const x=l.filter(k=>!k.IsDeleted).map(k=>k.Id),N=o.filter(k=>!x.includes(k));for(const k of N)this.executeUpdate(`
            UPDATE TotpCodes
            SET IsDeleted = 1,
                UpdatedAt = ?
            WHERE Id = ?`,[c,k]);const I=l.filter(k=>k.IsDeleted&&o.includes(k.Id));for(const k of I)this.executeUpdate(`
            UPDATE TotpCodes
            SET IsDeleted = 1,
                UpdatedAt = ?
            WHERE Id = ?`,[c,k.Id]);for(const k of l){if(k.IsDeleted)continue;o.includes(k.Id)?this.executeUpdate(`
              UPDATE TotpCodes
              SET Name = ?,
                  SecretKey = ?,
                  UpdatedAt = ?
              WHERE Id = ?`,[k.Name,k.SecretKey,c,k.Id]):this.executeUpdate(`
              INSERT INTO TotpCodes (Id, Name, SecretKey, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
              VALUES (?, ?, ?, ?, ?, ?, ?)`,[k.Id||crypto.randomUUID().toUpperCase(),k.Name,k.SecretKey,t.Id,c,c,0])}}return await this.commitTransaction(),1}catch(c){throw this.rollbackTransaction(),console.error("Error updating credential:",c),c}}static imgSrcFromBytes(t){if(t)try{const r=this.toUint8Array(t),i=this.base64Encode(r);return`data:${this.detectMimeType(r)};base64,${i}`}catch(r){return console.error("Error setting logo:",r),`data:image/x-icon;base64,${ty}`}else return`data:image/x-icon;base64,${ty}`}static detectMimeType(t){const r=()=>{const l=new TextDecoder().decode(t.slice(0,5)).toLowerCase();return l.includes("<?xml")||l.includes("<svg")},i=()=>t[0]===0&&t[1]===0&&t[2]===1&&t[3]===0,o=()=>t[0]===137&&t[1]===80&&t[2]===78&&t[3]===71;return r()?"image/svg+xml":i()?"image/x-icon":o()?"image/png":"image/x-icon"}static toUint8Array(t){if(t instanceof Uint8Array)return t;if(Array.isArray(t))return new Uint8Array(t);const r=Object.keys(t).length,i=new Uint8Array(r);for(let o=0;o<r;o++)i[o]=t[o];return i}static base64Encode(t){try{const r=Array.from(this.toUint8Array(t));return btoa(r.reduce((i,o)=>i+String.fromCharCode(o),""))}catch(r){return console.error("Error encoding to base64:",r),null}}tableExists(t){if(!this.db)throw new Error("Database not initialized");try{return this.executeQuery(`
        SELECT name FROM sqlite_master
        WHERE type='table' AND name=?`,[t]).length>0}catch(r){return console.error(`Error checking if table ${t} exists:`,r),!1}}executeRaw(t){if(!this.db)throw new Error("Database not initialized");try{const r=t.split(";");for(const i of r){const o=i.trim();o.length===0||o.toUpperCase().startsWith("BEGIN TRANSACTION")||o.toUpperCase().startsWith("COMMIT")||o.toUpperCase().startsWith("ROLLBACK")||this.db.run(o)}}catch(r){throw console.error("Error executing raw SQL:",r),r}}getPasskeysByRpId(t){if(!this.db)throw new Error("Database not initialized");return this.executeQuery(`
      SELECT
        p.Id,
        p.CredentialId,
        p.RpId,
        p.UserHandle,
        p.PublicKey,
        p.PrivateKey,
        p.DisplayName,
        p.PrfKey,
        p.AdditionalData,
        p.CreatedAt,
        p.UpdatedAt,
        p.IsDeleted,
        c.Username,
        s.Name as ServiceName
      FROM Passkeys p
      LEFT JOIN Credentials c ON p.CredentialId = c.Id
      LEFT JOIN Services s ON c.ServiceId = s.Id
      WHERE p.RpId = ? AND p.IsDeleted = 0
      ORDER BY p.CreatedAt DESC
    `,[t]).map(o=>({Id:o.Id,CredentialId:o.CredentialId,RpId:o.RpId,UserHandle:o.UserHandle,PublicKey:o.PublicKey,PrivateKey:o.PrivateKey,DisplayName:o.DisplayName,PrfKey:o.PrfKey,AdditionalData:o.AdditionalData,CreatedAt:o.CreatedAt,UpdatedAt:o.UpdatedAt,IsDeleted:o.IsDeleted,Username:o.Username,ServiceName:o.ServiceName}))}getPasskeyById(t){if(!this.db)throw new Error("Database not initialized");const i=this.executeQuery(`
      SELECT
        p.Id,
        p.CredentialId,
        p.RpId,
        p.UserHandle,
        p.PublicKey,
        p.PrivateKey,
        p.DisplayName,
        p.PrfKey,
        p.AdditionalData,
        p.CreatedAt,
        p.UpdatedAt,
        p.IsDeleted,
        c.Username,
        s.Name as ServiceName
      FROM Passkeys p
      LEFT JOIN Credentials c ON p.CredentialId = c.Id
      LEFT JOIN Services s ON c.ServiceId = s.Id
      WHERE p.Id = ? AND p.IsDeleted = 0
    `,[t]);if(i.length===0)return null;const o=i[0];return{Id:o.Id,CredentialId:o.CredentialId,RpId:o.RpId,UserHandle:o.UserHandle,PublicKey:o.PublicKey,PrivateKey:o.PrivateKey,DisplayName:o.DisplayName,PrfKey:o.PrfKey,AdditionalData:o.AdditionalData,CreatedAt:o.CreatedAt,UpdatedAt:o.UpdatedAt,IsDeleted:o.IsDeleted,Username:o.Username,ServiceName:o.ServiceName}}getPasskeysByCredentialId(t){if(!this.db)throw new Error("Database not initialized");return this.executeQuery(`
      SELECT
        p.Id,
        p.CredentialId,
        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.CredentialId = ? AND p.IsDeleted = 0
      ORDER BY p.CreatedAt DESC
    `,[t]).map(o=>({Id:o.Id,CredentialId:o.CredentialId,RpId:o.RpId,UserHandle:o.UserHandle,PublicKey:o.PublicKey,PrivateKey:o.PrivateKey,DisplayName:o.DisplayName,PrfKey:o.PrfKey,AdditionalData:o.AdditionalData,CreatedAt:o.CreatedAt,UpdatedAt:o.UpdatedAt,IsDeleted:o.IsDeleted}))}async createPasskey(t){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();const r=us(),i=`
        INSERT INTO Passkeys (
          Id, CredentialId, RpId, UserHandle, PublicKey, PrivateKey,
          PrfKey, DisplayName, AdditionalData, CreatedAt, UpdatedAt, IsDeleted
        )
        VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
      `;let o=null;t.PrfKey&&(o=t.PrfKey instanceof Uint8Array?t.PrfKey:new Uint8Array(t.PrfKey));let l=null;t.UserHandle&&(l=t.UserHandle instanceof Uint8Array?t.UserHandle:new Uint8Array(t.UserHandle)),this.executeUpdate(i,[t.Id,t.CredentialId,t.RpId,l,t.PublicKey,t.PrivateKey,o,t.DisplayName,t.AdditionalData??null,r,r,0]),await this.commitTransaction()}catch(r){throw this.rollbackTransaction(),console.error("Error creating passkey:",r),r}}async deletePasskeyById(t){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();const r=us(),o=this.executeUpdate(`
        UPDATE Passkeys
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE Id = ?
      `,[r,t]);return await this.commitTransaction(),o}catch(r){throw this.rollbackTransaction(),console.error("Error deleting passkey:",r),r}}async deletePasskeysByCredentialId(t){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();const r=us(),o=this.executeUpdate(`
        UPDATE Passkeys
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE CredentialId = ?
      `,[r,t]);return await this.commitTransaction(),o}catch(r){throw this.rollbackTransaction(),console.error("Error deleting passkeys for credential:",r),r}}async updatePasskeyDisplayName(t,r){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();const i=us(),l=this.executeUpdate(`
        UPDATE Passkeys
        SET DisplayName = ?,
            UpdatedAt = ?
        WHERE Id = ?
      `,[r,i,t]);return await this.commitTransaction(),l}catch(i){throw this.rollbackTransaction(),console.error("Error updating passkey display name:",i),i}}}const Tb=L.createContext(void 0),wk=({children:n})=>{const[t,r]=L.useState(null),[i,o]=L.useState(!1),[l,c]=L.useState(!1),d=L.useCallback(async(k,S)=>{const U=await Ut.symmetricDecrypt(k.vault.blob,S),B=new Ac;await B.initializeFromBase64(U),r(B),o(!0),c(!0);const F={vaultBlob:k.vault.blob,publicEmailDomainList:k.vault.publicEmailDomainList,privateEmailDomainList:k.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:k.vault.hiddenPrivateEmailDomainList,vaultRevisionNumber:k.vault.currentRevisionNumber};return await Rt("STORE_VAULT",F,"background"),B},[]),A=L.useCallback(async()=>{try{const k=await Rt("GET_VAULT",{},"background");if(k!=null&&k.vault){const S=new Ac;await S.initializeFromBase64(k.vault),r(S),o(!0),c(!0)}else o(!0),c(!1)}catch(k){console.error("Error retrieving vault from background:",k),o(!0),c(!1)}},[]),h=L.useCallback(async()=>{try{const k=await Oe.getItem("session:publicEmailDomains"),S=await Oe.getItem("session:privateEmailDomains"),U=await Oe.getItem("session:hiddenPrivateEmailDomains"),B=await Oe.getItem("session:vaultRevisionNumber");return!k&&!S?null:{publicEmailDomains:k??[],privateEmailDomains:S??[],hiddenPrivateEmailDomains:U??[],vaultRevisionNumber:B??0}}catch(k){return console.error("Error getting vault metadata from session storage:",k),null}},[]),y=L.useCallback(async k=>{await Oe.setItem("session:vaultRevisionNumber",k)},[]),E=L.useCallback(async()=>t?await t.hasPendingMigrations():!1,[t]);L.useEffect(()=>{i||A()},[i,A]);const C=L.useCallback(async k=>{await Rt("STORE_ENCRYPTION_KEY",k,"background")},[]),x=L.useCallback(async k=>{await Rt("STORE_ENCRYPTION_KEY_DERIVATION_PARAMS",k,"background")},[]),N=L.useCallback(()=>{r(null),o(!1),c(!1),Rt("CLEAR_VAULT",{},"background")},[]),I=L.useMemo(()=>({sqliteClient:t,dbInitialized:i,dbAvailable:l,initializeDatabase:d,storeEncryptionKey:C,storeEncryptionKeyDerivationParams:x,clearDatabase:N,getVaultMetadata:h,setCurrentVaultRevisionNumber:y,hasPendingMigrations:E}),[t,i,l,d,C,x,N,h,y,E]);return f.jsx(Tb.Provider,{value:I,children:n})},ia=()=>{const n=L.useContext(Tb);if(n===void 0)throw new Error("useDb must be used within a DbProvider");return n},rc="local:aliasvault_disabled_sites",gc="local:aliasvault_global_autofill_popup_enabled",ay="local:aliasvault_global_context_menu_enabled",co="local:aliasvault_vault_locked_dismiss_until",Ku="local:aliasvault_temporary_disabled_sites",ny="local:aliasvault_clipboard_clear_timeout",ry="local:aliasvault_auto_lock_timeout",iy="local:aliasvault_autofill_matching_mode",sy="local:aliasvault_passkey_provider_enabled",gs="local:aliasvault_passkey_disabled_sites",mc="session:pendingRedirectUrl",dh="local:aliasvault_skip_form_restore";var eb,tb;const vk=(tb=(eb=globalThis.browser)==null?void 0:eb.runtime)!=null&&tb.id?globalThis.browser:globalThis.chrome,fo=vk,MA="local:aliasvault_pin_enabled",jA="local:aliasvault_pin_encrypted_key",OA="local:aliasvault_pin_salt",_A="local:aliasvault_pin_length",Ao="local:aliasvault_pin_failed_attempts",cA=4;class ic extends Error{constructor(){super("PIN locked after too many failed attempts"),this.name="PinLockedError"}}class Tl extends Error{constructor(){super("Invalid PIN format"),this.name="InvalidPinFormatError"}}class Bb extends Error{constructor(r){super(`Incorrect PIN. ${r} attempts remaining.`);Ot(this,"attemptsRemaining");this.name="IncorrectPinError",this.attemptsRemaining=r}}async function Lb(){try{return await Oe.getItem(MA)===!0}catch{return!1}}async function Ck(){try{return await Oe.getItem(_A)||null}catch{return null}}function PA(n){return/^\d{6,8}$/.test(n)}async function Db(){try{return await Oe.getItem(Ao)||0}catch{return 0}}async function Rb(){return await Db()>=cA}async function xk(n,t){if(!PA(n))throw new Tl;try{const r=crypto.getRandomValues(new Uint8Array(16)),i=dA(r.buffer),o=await Ub(r),l=await Mb(n,o),c=crypto.getRandomValues(new Uint8Array(12)),d=await crypto.subtle.encrypt({name:"AES-GCM",iv:c},l,new TextEncoder().encode(t)),A=new Uint8Array(c.length+d.byteLength);A.set(c,0),A.set(new Uint8Array(d),c.length);const h=dA(A.buffer);await Promise.all([Oe.setItem(MA,!0),Oe.setItem(jA,h),Oe.setItem(OA,i),Oe.setItem(_A,n.length),Oe.setItem(Ao,0)])}catch(r){throw r instanceof Tl||console.error("[PinUnlockService] Failed to setup PIN:",r),r}}async function Nk(n){if(!PA(n))throw new Tl;if(await Rb())throw new ic;try{const[t,r]=await Promise.all([Oe.getItem(jA),Oe.getItem(OA)]);if(!t||!r)throw new ic;const i=new Uint8Array(ly(t)),o=i.slice(0,12),l=i.slice(12),c=new Uint8Array(ly(r)),d=await Ub(c),A=await Mb(n,d),h=await crypto.subtle.decrypt({name:"AES-GCM",iv:o},A,l),y=new TextDecoder().decode(h);return await Oe.setItem(Ao,0),y}catch{const r=await Db()+1;throw await Oe.setItem(Ao,r),r>=cA?(await FA(),new ic):new Bb(cA-r)}}async function FA(){try{await Promise.all([Oe.removeItem(MA),Oe.removeItem(jA),Oe.removeItem(OA),Oe.removeItem(_A),Oe.removeItem(Ao)])}catch(n){throw console.error("[PinUnlockService] Failed to disable PIN:",n),n}}async function oy(){try{await Oe.setItem(Ao,0)}catch(n){console.error("[PinUnlockService] Failed to reset failed attempts:",n)}}async function Ik(){const n=fo.runtime.id,t=new TextEncoder().encode(n),r=await crypto.subtle.digest("SHA-256",t);return new Uint8Array(r)}async function Ub(n){const t=await Ik(),r=new Uint8Array(n.length+t.length);return r.set(n,0),r.set(t,n.length),r}async function Mb(n,t){const r=dA(t.buffer),i=await Sb.hash({pass:n,salt:r,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 dA(n){const t=new Uint8Array(n);let r="";for(let i=0;i<t.byteLength;i++)r+=String.fromCharCode(t[i]);return btoa(r)}function ly(n){const t=atob(n),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r.buffer}const jb=L.createContext(void 0),kk=({children:n})=>{const[t,r]=L.useState(!1),[i,o]=L.useState(null),[l,c]=L.useState(null),d=ia(),A=L.useCallback(async()=>{const x=await Oe.getItem("local:accessToken"),N=await Oe.getItem("local:refreshToken"),I=await Oe.getItem("local:username");return r(!0),x&&N&&I?(o(I),!0):!1},[o]),h=L.useCallback(async(x,N,I)=>{await Oe.setItem("local:username",x),await Oe.setItem("local:accessToken",N),await Oe.setItem("local:refreshToken",I),await Oe.setItem(co,0),o(x)},[]),y=L.useCallback(async x=>{await Rt("CLEAR_VAULT",{},"background"),await Oe.removeItems(["local:username","local:accessToken","local:refreshToken"]),d==null||d.clearDatabase();try{await FA()}catch(N){console.error("Failed to remove PIN data:",N)}x&&c(x),o(null)},[d]),E=L.useCallback(()=>{c(null)},[]),C=L.useMemo(()=>({isInitialized:t,username:i,initializeAuth:A,setAuthTokens:h,clearAuth:y,globalMessage:l,clearGlobalMessage:E}),[t,i,A,l,h,y,E]);return f.jsx(jb.Provider,{value:C,children:n})},QA=()=>{const n=L.useContext(jb);if(n===void 0)throw new Error("useAuth must be used within an AuthProvider");return n};class Sk{constructor(){Ot(this,"listeners",new Set)}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}emit(t){this.listeners.forEach(r=>{try{r(t)}catch(i){console.error("Error in logout listener:",i)}})}}const fA=new Sk,qr=class qr{constructor(){}static isServerVersionSupported(t){return this.versionGreaterThanOrEqualTo(t,this.MIN_SERVER_VERSION)}static versionGreaterThanOrEqualTo(t,r){const[i,o]=t.split("-"),[l,c]=r.split("-"),d=i.split(".").map(Number),A=l.split(".").map(Number);for(let h=0;h<Math.max(d.length,A.length);h++){const y=d[h]??0,E=A[h]??0;if(y>E)return!0;if(y<E)return!1}return!o&&c?!0:o&&!c?!1:!o&&!c?!0:o>=c}};Ot(qr,"VERSION","0.25.0"),Ot(qr,"API_VERSION",qr.VERSION.split("-")[0]),Ot(qr,"MIN_SERVER_VERSION","0.12.0-dev"),Ot(qr,"CLIENT_NAME","edge"),Ot(qr,"DEFAULT_CLIENT_URL","https://app.aliasvault.net"),Ot(qr,"DEFAULT_API_URL","https://app.aliasvault.net/api");let Ga=qr;class Tk{async getBaseUrl(){return(await this.getApiUrl()).replace(/\/$/,"")+"/v1/"}async isSelfHosted(){return await this.getApiUrl()!==Ga.DEFAULT_API_URL}async authFetch(t,r={},i=!0,o=!0){const l=new Headers(r.headers??{}),c=await this.getAccessToken();c&&l.set("Authorization",`Bearer ${c}`);const d={...r,headers:l};try{const A=await this.rawFetch(t,d);if(A.status===401){const h=await this.refreshAccessToken();if(h){l.set("Authorization",`Bearer ${h}`);const y=await this.rawFetch(t,{...d,headers:l});if(!y.ok)throw new Error("Request failed after token refresh");return i?y.json():y}else throw fA.emit("auth.errors.sessionExpired"),new Error("Session expired")}if(!A.ok&&o)throw new Error(`HTTP error! status: ${A.status}`);return i?A.json():A}catch(A){throw console.error("API request failed:",A),A}}async rawFetch(t,r={}){const o=await this.getBaseUrl()+t,l=new Headers(r.headers??{});l.set("X-AliasVault-Client",`${Ga.CLIENT_NAME}-${Ga.API_VERSION}`);const c={...r,headers:l};try{return await fetch(o,c)}catch(d){throw console.error("API request failed:",d),d}}async get(t){return this.authFetch(t,{method:"GET"})}async downloadBlob(t){try{const i=await(await this.authFetch(t,{method:"GET",headers:{Accept:"application/octet-stream"}},!1)).arrayBuffer();return new Uint8Array(i)}catch(r){throw console.error("Error downloading blob:",r),r}}async post(t,r,i=!0){return this.authFetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)},i)}async put(t,r){return this.authFetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}async delete(t){return this.authFetch(t,{method:"DELETE"},!1)}async revokeTokens(){try{const t=await this.getRefreshToken();t&&await this.post("Auth/revoke",{token:await this.getAccessToken(),refreshToken:t},!1)}catch(t){console.error("WebApi revoke tokens error:",t)}}async getStatus(){try{return await this.get("Auth/status")}catch{return{clientVersionSupported:!0,serverVersion:"0.0.0",vaultRevision:0,srpSalt:""}}}validateStatusResponse(t){return t.clientVersionSupported?Ga.isServerVersionSupported(t.serverVersion)?null:"serverVersionNotSupported":"clientVersionNotSupported"}async refreshAccessToken(){const t=await this.getRefreshToken();if(!t)return null;try{const r=await this.rawFetch("Auth/refresh",{method:"POST",headers:{"Content-Type":"application/json","X-Ignore-Failure":"true"},body:JSON.stringify({token:await this.getAccessToken(),refreshToken:t})});if(!r.ok)throw new Error("Failed to refresh token");const i=await r.json();return this.updateTokens(i.token,i.refreshToken),i.token}catch{return fA.emit("auth.errors.sessionExpired"),null}}async getAccessToken(){return await Oe.getItem("local:accessToken")??null}async getRefreshToken(){return await Oe.getItem("local:refreshToken")??null}async updateTokens(t,r){await Oe.setItem("local:accessToken",t),await Oe.setItem("local:refreshToken",r)}async getApiUrl(){const t=await Oe.getItem("local:apiUrl");return!t||t.length===0?Ga.DEFAULT_API_URL:t}}const Ob=L.createContext(null),Bk=({children:n})=>{const[t,r]=L.useState(null);return L.useEffect(()=>{const i=new Tk;r(i)},[]),t?f.jsx(Ob.Provider,{value:t,children:n}):null},vr=()=>{const n=L.useContext(Ob);if(!n)throw new Error("useWebApi must be used within a WebApiProvider");return n},_b=L.createContext(void 0),Lk=({children:n})=>{const t=QA(),r=vr(),[i,o]=L.useState(!1),l=L.useRef(!1),{t:c}=ht(),d=L.useCallback(async y=>{if(!l.current)try{l.current=!0,await r.revokeTokens(),await t.clearAuth(y)}catch(E){console.error("Error during logout:",E)}finally{l.current=!1,o(!1)}},[t,r]),A=L.useCallback(async()=>{const y=await t.initializeAuth();return o(y),y},[t]);L.useEffect(()=>fA.subscribe(async E=>{await d(c(E))}),[d,c]),L.useEffect(()=>{A()},[A]);const h=L.useMemo(()=>({isInitialized:t.isInitialized,username:t.username,globalMessage:t.globalMessage,logout:d,initializeAuth:A,setAuthTokens:t.setAuthTokens,clearGlobalMessage:t.clearGlobalMessage,isLoggedIn:i}),[t.isInitialized,t.username,t.globalMessage,t.setAuthTokens,t.clearGlobalMessage,d,A,i]);return f.jsx(_b.Provider,{value:h,children:n})},Cr=()=>{const n=L.useContext(_b);if(n===void 0)throw new Error("useApp must be used within an AppProvider");return n},Pb=({routes:n=[],rightButtons:t})=>{const{t:r}=ht(),i=Cr(),o=Fa(),l=sn(),c=n==null?void 0:n.find(h=>{const y=h.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${y}$`).test(l.pathname)}),d=()=>{o("/auth-settings")},A=()=>{l.pathname==="/upgrade"||l.pathname==="/login"||l.pathname==="/unlock"||(i.isLoggedIn?o("/credentials"):o("/"))};return f.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:f.jsxs("div",{className:"flex items-center h-16 px-4",children:[c!=null&&c.showBackButton?f.jsx("button",{id:"back",onClick:()=>o(-1),className:"flex items-center gap-2 hover:bg-gray-100 dark:hover:bg-gray-700 pr-2 pt-1.5 pb-1.5 rounded-lg group",children:f.jsxs("div",{className:"flex items-center",children:[f.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:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),c.title&&f.jsx("h1",{className:"text-lg font-medium text-gray-900 dark:text-white ml-2",children:c.title})]})}):f.jsx("div",{className:"flex items-center",children:f.jsxs("button",{onClick:()=>A(),className:"flex items-center hover:opacity-80 transition-opacity",children:[f.jsx(Ib,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),f.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),f.jsx("div",{className:"flex-grow"}),f.jsx("div",{className:"flex items-center gap-2",children:i.isLoggedIn?t:f.jsxs(f.Fragment,{children:[t,f.jsxs("button",{id:"settings",onClick:d,className:"p-1 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700",children:[f.jsx("span",{className:"sr-only",children:r("common.settings")}),f.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:f.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"})})]})]})})]})})},Dk=({routes:n,headerButtons:t,message:r,children:i})=>f.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[f.jsx(R1,{}),f.jsx(Pb,{routes:n,rightButtons:t}),f.jsx("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px",height:"calc(100% - 120px)"},children:f.jsxs("div",{className:"px-4 pb-4 pt-2 mb-16",children:[r&&f.jsx("p",{className:"text-red-500 mb-4",children:r}),i||f.jsx(Ab,{children:n.map(o=>f.jsx(LA,{path:o.path,element:o.element},o.path))})]})}),f.jsx(U1,{})]}),Rk=({children:n})=>f.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[f.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:f.jsxs("div",{className:"flex items-center justify-center h-16 px-4",children:[f.jsx(Ib,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),f.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),f.jsx("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px"},children:f.jsx("div",{className:"p-4",children:n})})]}),$r=()=>{const n={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},t=f.jsxs(f.Fragment,{children:[f.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),f.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:n})]});return f.jsx("div",{className:"inline-flex items-center",children:t})},Fb=L.createContext(void 0),Uk=({children:n})=>{const[t,r]=L.useState(null),i=L.useCallback(l=>{r(l)},[]),o=L.useMemo(()=>({setHeaderButtons:i,headerButtons:t}),[i,t]);return f.jsx(Fb.Provider,{value:o,children:n})},xr=()=>{const n=L.useContext(Fb);if(n===void 0)throw new Error("useHeaderButtons must be used within a HeaderButtonsProvider");return n},Mk=()=>{const{isLoading:n}=da();if(!n)return null;const t={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},r=f.jsxs(f.Fragment,{children:[f.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),f.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:t})]});return f.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:f.jsx("div",{className:"relative",children:r})})},Qb=L.createContext(void 0),jk=({children:n})=>{const[t,r]=L.useState(!0),[i,o]=L.useState(!1),[l,c]=L.useState(void 0),d=y=>{o(!0),c(y)},A=()=>{o(!1),c(void 0)},h=L.useMemo(()=>({isLoading:i,loadingMessage:l,showLoading:d,hideLoading:A,isInitialLoading:t,setIsInitialLoading:r}),[i,l,t]);return f.jsxs(Qb.Provider,{value:h,children:[f.jsx(Mk,{message:l}),n]})},da=()=>{const n=L.useContext(Qb);if(n===void 0)throw new Error("useLoading must be used within a LoadingProvider");return n},Ok="session:lastVisitedPage",_k="session:lastVisitedTime",Pk="session:navigationHistory",Hb=L.createContext(void 0),Fk=({children:n})=>{const t=sn(),r=Fa(),{isInitialized:i,isLoggedIn:o}=Cr(),{dbInitialized:l,dbAvailable:c}=ia(),d=i&&l,A=d&&(!o||!c),h=L.useCallback(async()=>{if(d&&!A&&!["/","/reinitialize","/login","/unlock","/unlock-success","/auth-settings","/upgrade","/passkeys/create","/passkeys/authenticate"].includes(t.pathname)){const C=t.pathname.split("/").filter(Boolean),x=[];let N="";for(let I=0;I<C.length;I++)N+="/"+C[I],x.push({pathname:N,search:t.search,hash:t.hash});await Promise.all([Oe.setItem(Ok,t.pathname),Oe.setItem(_k,Date.now()),Oe.setItem(Pk,x)])}},[t,d,A]);L.useEffect(()=>{d&&h()},[t.pathname,t.search,t.hash,d,h]),L.useEffect(()=>{d&&!o&&r("/login",{replace:!0})},[d,o]);const y=L.useMemo(()=>({storeCurrentPage:h,isFullyInitialized:d,requiresAuth:A}),[h,d,A]);return f.jsx(Hb.Provider,{value:y,children:n})},Qk=()=>{const n=L.useContext(Hb);if(n===void 0)throw new Error("useNavigation must be used within a NavigationProvider");return n};var fh,uy;function Hk(){if(uy)return fh;uy=1;function n(S){this._maxSize=S,this.clear()}n.prototype.clear=function(){this._size=0,this._values=Object.create(null)},n.prototype.get=function(S){return this._values[S]},n.prototype.set=function(S,U){return this._size>=this._maxSize&&this.clear(),S in this._values||this._size++,this._values[S]=U};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,i=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,l=/^\s*(['"]?)(.*?)(\1)\s*$/,c=512,d=new n(c),A=new n(c),h=new n(c);fh={Cache:n,split:E,normalizePath:y,setter:function(S){var U=y(S);return A.get(S)||A.set(S,function(F,Q){for(var V=0,W=U.length,J=F;V<W-1;){var z=U[V];if(z==="__proto__"||z==="constructor"||z==="prototype")return F;J=J[U[V++]]}J[U[V]]=Q})},getter:function(S,U){var B=y(S);return h.get(S)||h.set(S,function(Q){for(var V=0,W=B.length;V<W;)if(Q!=null||!U)Q=Q[B[V++]];else return;return Q})},join:function(S){return S.reduce(function(U,B){return U+(x(B)||r.test(B)?"["+B+"]":(U?".":"")+B)},"")},forEach:function(S,U,B){C(Array.isArray(S)?S:E(S),U,B)}};function y(S){return d.get(S)||d.set(S,E(S).map(function(U){return U.replace(l,"$2")}))}function E(S){return S.match(t)||[""]}function C(S,U,B){var F=S.length,Q,V,W,J;for(V=0;V<F;V++)Q=S[V],Q&&(k(Q)&&(Q='"'+Q+'"'),J=x(Q),W=!J&&/^\d+$/.test(Q),U.call(B,Q,J,W,V,S))}function x(S){return typeof S=="string"&&S&&["'",'"'].indexOf(S.charAt(0))!==-1}function N(S){return S.match(i)&&!S.match(r)}function I(S){return o.test(S)}function k(S){return!x(S)&&(N(S)||I(S))}return fh}var ms=Hk(),hh,cy;function zk(){if(cy)return hh;cy=1;const n=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=y=>y.match(n)||[],r=y=>y[0].toUpperCase()+y.slice(1),i=(y,E)=>t(y).join(E).toLowerCase(),o=y=>t(y).reduce((E,C)=>`${E}${E?C[0].toUpperCase()+C.slice(1).toLowerCase():C.toLowerCase()}`,"");return hh={words:t,upperFirst:r,camelCase:o,pascalCase:y=>r(o(y)),snakeCase:y=>i(y,"_"),kebabCase:y=>i(y,"-"),sentenceCase:y=>r(i(y," ")),titleCase:y=>t(y).map(r).join(" ")},hh}var Ah=zk(),qu={exports:{}},dy;function Vk(){if(dy)return qu.exports;dy=1,qu.exports=function(o){return n(t(o),o)},qu.exports.array=n;function n(o,l){var c=o.length,d=new Array(c),A={},h=c,y=r(l),E=i(o);for(l.forEach(function(x){if(!E.has(x[0])||!E.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});h--;)A[h]||C(o[h],h,new Set);return d;function C(x,N,I){if(I.has(x)){var k;try{k=", node was:"+JSON.stringify(x)}catch{k=""}throw new Error("Cyclic dependency"+k)}if(!E.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!A[N]){A[N]=!0;var S=y.get(x)||new Set;if(S=Array.from(S),N=S.length){I.add(x);do{var U=S[--N];C(U,E.get(U),I)}while(N);I.delete(x)}d[--c]=x}}}function t(o){for(var l=new Set,c=0,d=o.length;c<d;c++){var A=o[c];l.add(A[0]),l.add(A[1])}return Array.from(l)}function r(o){for(var l=new Map,c=0,d=o.length;c<d;c++){var A=o[c];l.has(A[0])||l.set(A[0],new Set),l.has(A[1])||l.set(A[1],new Set),l.get(A[0]).add(A[1])}return l}function i(o){for(var l=new Map,c=0,d=o.length;c<d;c++)l.set(o[c],c);return l}return qu.exports}var Gk=Vk();const Kk=Zr(Gk),qk=Object.prototype.toString,Yk=Error.prototype.toString,Jk=RegExp.prototype.toString,Wk=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Xk=/^Symbol\((.*)\)(.*)$/;function $k(n){return n!=+n?"NaN":n===0&&1/n<0?"-0":""+n}function fy(n,t=!1){if(n==null||n===!0||n===!1)return""+n;const r=typeof n;if(r==="number")return $k(n);if(r==="string")return t?`"${n}"`:n;if(r==="function")return"[Function "+(n.name||"anonymous")+"]";if(r==="symbol")return Wk.call(n).replace(Xk,"Symbol($1)");const i=qk.call(n).slice(8,-1);return i==="Date"?isNaN(n.getTime())?""+n:n.toISOString(n):i==="Error"||n instanceof Error?"["+Yk.call(n)+"]":i==="RegExp"?Jk.call(n):null}function Pi(n,t){let r=fy(n,t);return r!==null?r:JSON.stringify(n,function(i,o){let l=fy(this[i],t);return l!==null?l:o},2)}function zb(n){return n==null?[]:[].concat(n)}let Vb,Gb,Kb,Zk=/\$\{\s*(\w+)\s*\}/g;Vb=Symbol.toStringTag;class hy{constructor(t,r,i,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Vb]="Error",this.name="ValidationError",this.value=r,this.path=i,this.type=o,this.errors=[],this.inner=[],zb(t).forEach(l=>{if($a.isError(l)){this.errors.push(...l.errors);const c=l.inner.length?l.inner:[l];this.inner.push(...c)}else this.errors.push(l)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Gb=Symbol.hasInstance;Kb=Symbol.toStringTag;class $a extends Error{static formatError(t,r){const i=r.label||r.path||"this";return r=Object.assign({},r,{path:i,originalPath:r.path}),typeof t=="string"?t.replace(Zk,(o,l)=>Pi(r[l])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,i,o,l){const c=new hy(t,r,i,o);if(l)return c;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Kb]="Error",this.name=c.name,this.message=c.message,this.type=c.type,this.value=c.value,this.path=c.path,this.errors=c.errors,this.inner=c.inner,Error.captureStackTrace&&Error.captureStackTrace(this,$a)}static[Gb](t){return hy[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let mr={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:n,type:t,value:r,originalValue:i})=>{const o=i!=null&&i!==r?` (cast from the value \`${Pi(i,!0)}\`).`:".";return t!=="mixed"?`${n} must be a \`${t}\` type, but the final value was: \`${Pi(r,!0)}\``+o:`${n} must match the configured type. The validated value was: \`${Pi(r,!0)}\``+o}},An={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"},eS={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"},hA={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},tS={isValue:"${path} field must be ${value}"},sc={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},aS={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"},nS={notType:n=>{const{path:t,value:r,spec:i}=n,o=i.types.length;if(Array.isArray(r)){if(r.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Pi(r,!0)}\``;if(r.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Pi(r,!0)}\``}return $a.formatError(mr.notType,n)}};Object.assign(Object.create(null),{mixed:mr,string:An,number:eS,date:hA,object:sc,array:aS,boolean:tS,tuple:nS});const HA=n=>n&&n.__isYupSchema__;class pc{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:i,then:o,otherwise:l}=r,c=typeof i=="function"?i:(...d)=>d.every(A=>A===i);return new pc(t,(d,A)=>{var h;let y=c(...d)?o:l;return(h=y==null?void 0:y(A))!=null?h:A})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let i=this.refs.map(l=>l.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(i,t,r);if(o===void 0||o===t)return t;if(!HA(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const Yu={context:"$",value:"."};class Es{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Yu.context,this.isValue=this.key[0]===Yu.value,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?Yu.context:this.isValue?Yu.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&ms.getter(this.path,!0),this.map=r.map}getValue(t,r,i){let o=this.isContext?i:this.isValue?t:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Es.prototype.__isYupRef=!0;const fs=n=>n==null;function to(n){function t({value:r,path:i="",options:o,originalValue:l,schema:c},d,A){const{name:h,test:y,params:E,message:C,skipAbsent:x}=n;let{parent:N,context:I,abortEarly:k=c.spec.abortEarly,disableStackTrace:S=c.spec.disableStackTrace}=o;function U(Y){return Es.isRef(Y)?Y.getValue(r,N,I):Y}function B(Y={}){const ae=Object.assign({value:r,originalValue:l,label:c.spec.label,path:Y.path||i,spec:c.spec,disableStackTrace:Y.disableStackTrace||S},E,Y.params);for(const ce of Object.keys(ae))ae[ce]=U(ae[ce]);const Z=new $a($a.formatError(Y.message||C,ae),r,ae.path,Y.type||h,ae.disableStackTrace);return Z.params=ae,Z}const F=k?d:A;let Q={path:i,parent:N,type:h,from:o.from,createError:B,resolve:U,options:o,originalValue:l,schema:c};const V=Y=>{$a.isError(Y)?F(Y):Y?A(null):F(B())},W=Y=>{$a.isError(Y)?F(Y):d(Y)};if(x&&fs(r))return V(!0);let z;try{var G;if(z=y.call(Q,r,Q),typeof((G=z)==null?void 0:G.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${Q.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(z).then(V,W)}}catch(Y){W(Y);return}V(z)}return t.OPTIONS=n,t}function rS(n,t,r,i=r){let o,l,c;return t?(ms.forEach(t,(d,A,h)=>{let y=A?d.slice(1,d.length-1):d;n=n.resolve({context:i,parent:o,value:r});let E=n.type==="tuple",C=h?parseInt(y,10):0;if(n.innerType||E){if(E&&!h)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${c}" must contain an index to the tuple element, e.g. "${c}[0]"`);if(r&&C>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${d}, in the path: ${t}. because there is no value at that index. `);o=r,r=r&&r[C],n=E?n.spec.types[C]:n.innerType}if(!h){if(!n.fields||!n.fields[y])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${c} which is a type: "${n.type}")`);o=r,r=r&&r[y],n=n.fields[y]}l=y,c=A?"["+d+"]":"."+d}),{schema:n,parent:o,parentPath:l}):{parent:o,parentPath:t,schema:n}}class yc extends Set{describe(){const t=[];for(const r of this.values())t.push(Es.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const i of this.values())r.push(t(i));return r}clone(){return new yc(this.values())}merge(t,r){const i=this.clone();return t.forEach(o=>i.add(o)),r.forEach(o=>i.delete(o)),i}}function uo(n,t=new Map){if(HA(n)||!n||typeof n!="object")return n;if(t.has(n))return t.get(n);let r;if(n instanceof Date)r=new Date(n.getTime()),t.set(n,r);else if(n instanceof RegExp)r=new RegExp(n),t.set(n,r);else if(Array.isArray(n)){r=new Array(n.length),t.set(n,r);for(let i=0;i<n.length;i++)r[i]=uo(n[i],t)}else if(n instanceof Map){r=new Map,t.set(n,r);for(const[i,o]of n.entries())r.set(i,uo(o,t))}else if(n instanceof Set){r=new Set,t.set(n,r);for(const i of n)r.add(uo(i,t))}else if(n instanceof Object){r={},t.set(n,r);for(const[i,o]of Object.entries(n))r[i]=uo(o,t)}else throw Error(`Unable to clone ${n}`);return r}class wr{constructor(t){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 yc,this._blacklist=new yc,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(mr.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=uo(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let i=t(this);return this._mutate=r,i}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,i=t.clone();const o=Object.assign({},r.spec,i.spec);return i.spec=o,i.internalTests=Object.assign({},r.internalTests,i.internalTests),i._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),i._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),i.tests=r.tests,i.exclusiveTests=r.exclusiveTests,i.withMutation(l=>{t.tests.forEach(c=>{l.test(c.OPTIONS)})}),i.transforms=[...r.transforms,...i.transforms],i}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let i=r.conditions;r=r.clone(),r.conditions=[],r=i.reduce((o,l)=>l.resolve(o,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,i,o,l;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(i=t.abortEarly)!=null?i:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(l=t.disableStackTrace)!=null?l:this.spec.disableStackTrace})}cast(t,r={}){let i=this.resolve(Object.assign({value:t},r)),o=r.assert==="ignore-optionality",l=i._cast(t,r);if(r.assert!==!1&&!i.isType(l)){if(o&&fs(l))return l;let c=Pi(t),d=Pi(l);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${i.type}". 

attempted value: ${c} 
`+(d!==c?`result of cast: ${d}`:""))}return l}_cast(t,r){let i=t===void 0?t:this.transforms.reduce((o,l)=>l.call(this,o,t,this),t);return i===void 0&&(i=this.getDefault(r)),i}_validate(t,r={},i,o){let{path:l,originalValue:c=t,strict:d=this.spec.strict}=r,A=t;d||(A=this._cast(A,Object.assign({assert:!1},r)));let h=[];for(let y of Object.values(this.internalTests))y&&h.push(y);this.runTests({path:l,value:A,originalValue:c,options:r,tests:h},i,y=>{if(y.length)return o(y,A);this.runTests({path:l,value:A,originalValue:c,options:r,tests:this.tests},i,o)})}runTests(t,r,i){let o=!1,{tests:l,value:c,originalValue:d,path:A,options:h}=t,y=I=>{o||(o=!0,r(I,c))},E=I=>{o||(o=!0,i(I,c))},C=l.length,x=[];if(!C)return E([]);let N={value:c,originalValue:d,path:A,options:h,schema:this};for(let I=0;I<l.length;I++){const k=l[I];k(N,y,function(U){U&&(Array.isArray(U)?x.push(...U):x.push(U)),--C<=0&&E(x)})}}asNestedTest({key:t,index:r,parent:i,parentPath:o,originalParent:l,options:c}){const d=t??r;if(d==null)throw TypeError("Must include `key` or `index` for nested validations");const A=typeof d=="number";let h=i[d];const y=Object.assign({},c,{strict:!0,parent:i,value:h,originalValue:l[d],key:void 0,[A?"index":"key"]:d,path:A||d.includes(".")?`${o||""}[${A?d:`"${d}"`}]`:(o?`${o}.`:"")+t});return(E,C,x)=>this.resolve(y)._validate(h,y,C,x)}validate(t,r){var i;let o=this.resolve(Object.assign({},r,{value:t})),l=(i=r==null?void 0:r.disableStackTrace)!=null?i:o.spec.disableStackTrace;return new Promise((c,d)=>o._validate(t,r,(A,h)=>{$a.isError(A)&&(A.value=h),d(A)},(A,h)=>{A.length?d(new $a(A,h,void 0,void 0,l)):c(h)}))}validateSync(t,r){var i;let o=this.resolve(Object.assign({},r,{value:t})),l,c=(i=r==null?void 0:r.disableStackTrace)!=null?i:o.spec.disableStackTrace;return o._validate(t,Object.assign({},r,{sync:!0}),(d,A)=>{throw $a.isError(d)&&(d.value=A),d},(d,A)=>{if(d.length)throw new $a(d,t,void 0,void 0,c);l=A}),l}isValid(t,r){return this.validate(t,r).then(()=>!0,i=>{if($a.isError(i))return!1;throw i})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(i){if($a.isError(i))return!1;throw i}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):uo(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const i=this.clone({nullable:t});return i.internalTests.nullable=to({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),i}optionality(t,r){const i=this.clone({optional:t});return i.internalTests.optionality=to({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),i}optional(){return this.optionality(!0)}defined(t=mr.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=mr.notNull){return this.nullability(!1,t)}required(t=mr.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=mr.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),o=to(r),l=r.exclusive||r.name&&i.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(i.exclusiveTests[r.name]=!!r.exclusive),i.tests=i.tests.filter(c=>!(c.OPTIONS.name===r.name&&(l||c.OPTIONS.test===o.OPTIONS.test))),i.tests.push(o),i}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let i=this.clone(),o=zb(t).map(l=>new Es(l));return o.forEach(l=>{l.isSibling&&i.deps.push(l.key)}),i.conditions.push(typeof r=="function"?new pc(o,r):pc.fromOptions(o,r)),i}typeError(t){let r=this.clone();return r.internalTests.typeError=to({message:t,name:"typeError",skipAbsent:!0,test(i){return this.schema._typeCheck(i)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=mr.oneOf){let i=this.clone();return t.forEach(o=>{i._whitelist.add(o),i._blacklist.delete(o)}),i.internalTests.whiteList=to({message:r,name:"oneOf",skipAbsent:!0,test(o){let l=this.schema._whitelist,c=l.resolveAll(this.resolve);return c.includes(o)?!0:this.createError({params:{values:Array.from(l).join(", "),resolved:c}})}}),i}notOneOf(t,r=mr.notOneOf){let i=this.clone();return t.forEach(o=>{i._blacklist.add(o),i._whitelist.delete(o)}),i.internalTests.blacklist=to({message:r,name:"notOneOf",test(o){let l=this.schema._blacklist,c=l.resolveAll(this.resolve);return c.includes(o)?this.createError({params:{values:Array.from(l).join(", "),resolved:c}}):!0}}),i}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:i,meta:o,optional:l,nullable:c}=r.spec;return{meta:o,label:i,optional:l,nullable:c,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(A=>({name:A.OPTIONS.name,params:A.OPTIONS.params})).filter((A,h,y)=>y.findIndex(E=>E.name===A.name)===h)}}}wr.prototype.__isYupSchema__=!0;for(const n of["validate","validateSync"])wr.prototype[`${n}At`]=function(t,r,i={}){const{parent:o,parentPath:l,schema:c}=rS(this,t,r,i.context);return c[n](o&&o[l],Object.assign({},i,{parent:o,path:t}))};for(const n of["equals","is"])wr.prototype[n]=wr.prototype.oneOf;for(const n of["not","nope"])wr.prototype[n]=wr.prototype.notOneOf;const iS=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function sS(n){const t=AA(n);if(!t)return Date.parse?Date.parse(n):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function AA(n){var t,r;const i=iS.exec(n);return i?{year:Vr(i[1]),month:Vr(i[2],1)-1,day:Vr(i[3],1),hour:Vr(i[4]),minute:Vr(i[5]),second:Vr(i[6]),millisecond:i[7]?Vr(i[7].substring(0,3)):0,precision:(t=(r=i[7])==null?void 0:r.length)!=null?t:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:Vr(i[10]),minuteOffset:Vr(i[11])}:null}function Vr(n,t=0){return Number(n)||t}let oS=/^[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])?)*$/,lS=/^((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,uS=/^(?:[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,cS="^\\d{4}-\\d{2}-\\d{2}",dS="\\d{2}:\\d{2}:\\d{2}",fS="(([+-]\\d{2}(:?\\d{2})?)|Z)",hS=new RegExp(`${cS}T${dS}(\\.\\d+)?${fS}$`),AS=n=>fs(n)||n===n.trim(),gS={}.toString();function an(){return new qb}class qb extends wr{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,i)=>{if(!i.spec.coerce||i.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===gS?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||mr.required,name:"required",skipAbsent:!0,test:i=>!!i.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=An.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(i){return i.length===this.resolve(t)}})}min(t,r=An.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i.length>=this.resolve(t)}})}max(t,r=An.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(i){return i.length<=this.resolve(t)}})}matches(t,r){let i=!1,o,l;return r&&(typeof r=="object"?{excludeEmptyString:i=!1,message:o,name:l}=r:o=r),this.test({name:l||"matches",message:o||An.matches,params:{regex:t},skipAbsent:!0,test:c=>c===""&&i||c.search(t)!==-1})}email(t=An.email){return this.matches(oS,{name:"email",message:t,excludeEmptyString:!0})}url(t=An.url){return this.matches(lS,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=An.uuid){return this.matches(uS,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",i,o;return t&&(typeof t=="object"?{message:r="",allowOffset:i=!1,precision:o=void 0}=t:r=t),this.matches(hS,{name:"datetime",message:r||An.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||An.datetime_offset,params:{allowOffset:i},skipAbsent:!0,test:l=>{if(!l||i)return!0;const c=AA(l);return c?!!c.z:!1}}).test({name:"datetime_precision",message:r||An.datetime_precision,params:{precision:o},skipAbsent:!0,test:l=>{if(!l||o==null)return!0;const c=AA(l);return c?c.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=An.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:AS})}lowercase(t=An.lowercase){return this.transform(r=>fs(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>fs(r)||r===r.toLowerCase()})}uppercase(t=An.uppercase){return this.transform(r=>fs(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>fs(r)||r===r.toUpperCase()})}}an.prototype=qb.prototype;let mS=new Date(""),pS=n=>Object.prototype.toString.call(n)==="[object Date]";class zA extends wr{constructor(){super({type:"date",check(t){return pS(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,i)=>!i.spec.coerce||i.isType(t)||t===null?t:(t=sS(t),isNaN(t)?zA.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let i;if(Es.isRef(t))i=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);i=o}return i}min(t,r=hA.min){let i=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(i)}})}max(t,r=hA.max){let i=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(i)}})}}zA.INVALID_DATE=mS;function yS(n,t=[]){let r=[],i=new Set,o=new Set(t.map(([c,d])=>`${c}-${d}`));function l(c,d){let A=ms.split(c)[0];i.add(A),o.has(`${d}-${A}`)||r.push([d,A])}for(const c of Object.keys(n)){let d=n[c];i.add(c),Es.isRef(d)&&d.isSibling?l(d.path,c):HA(d)&&"deps"in d&&d.deps.forEach(A=>l(A,c))}return Kk.array(Array.from(i),r).reverse()}function Ay(n,t){let r=1/0;return n.some((i,o)=>{var l;if((l=t.path)!=null&&l.includes(i))return r=o,!0}),r}function Yb(n){return(t,r)=>Ay(n,t)-Ay(n,r)}const ES=(n,t,r)=>{if(typeof n!="string")return n;let i=n;try{i=JSON.parse(n)}catch{}return r.isType(i)?i:n};function oc(n){if("fields"in n){const t={};for(const[r,i]of Object.entries(n.fields))t[r]=oc(i);return n.setFields(t)}if(n.type==="array"){const t=n.optional();return t.innerType&&(t.innerType=oc(t.innerType)),t}return n.type==="tuple"?n.optional().clone({types:n.spec.types.map(oc)}):"optional"in n?n.optional():n}const bS=(n,t)=>{const r=[...ms.normalizePath(t)];if(r.length===1)return r[0]in n;let i=r.pop(),o=ms.getter(ms.join(r),!0)(n);return!!(o&&i in o)};let gy=n=>Object.prototype.toString.call(n)==="[object Object]";function my(n,t){let r=Object.keys(n.fields);return Object.keys(t).filter(i=>r.indexOf(i)===-1)}const wS=Yb([]);function Ec(n){return new Jb(n)}class Jb extends wr{constructor(t){super({type:"object",check(r){return gy(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=wS,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var i;let o=super._cast(t,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let l=this.fields,c=(i=r.stripUnknown)!=null?i:this.spec.noUnknown,d=[].concat(this._nodes,Object.keys(o).filter(E=>!this._nodes.includes(E))),A={},h=Object.assign({},r,{parent:A,__validating:r.__validating||!1}),y=!1;for(const E of d){let C=l[E],x=E in o;if(C){let N,I=o[E];h.path=(r.path?`${r.path}.`:"")+E,C=C.resolve({value:I,context:r.context,parent:A});let k=C instanceof wr?C.spec:void 0,S=k==null?void 0:k.strict;if(k!=null&&k.strip){y=y||E in o;continue}N=!r.__validating||!S?C.cast(o[E],h):o[E],N!==void 0&&(A[E]=N)}else x&&!c&&(A[E]=o[E]);(x!==E in A||A[E]!==o[E])&&(y=!0)}return y?A:o}_validate(t,r={},i,o){let{from:l=[],originalValue:c=t,recursive:d=this.spec.recursive}=r;r.from=[{schema:this,value:c},...l],r.__validating=!0,r.originalValue=c,super._validate(t,r,i,(A,h)=>{if(!d||!gy(h)){o(A,h);return}c=c||h;let y=[];for(let E of this._nodes){let C=this.fields[E];!C||Es.isRef(C)||y.push(C.asNestedTest({options:r,key:E,parent:h,parentPath:r.path,originalParent:c}))}this.runTests({tests:y,value:h,originalValue:c,options:r},i,E=>{o(E.sort(this._sortErrors).concat(A),h)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),i=r.fields;for(let[o,l]of Object.entries(this.fields)){const c=i[o];i[o]=c===void 0?l:c}return r.withMutation(o=>o.setFields(i,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(i=>{var o;const l=this.fields[i];let c=t;(o=c)!=null&&o.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[i]})),r[i]=l&&"getDefault"in l?l.getDefault(c):void 0}),r}setFields(t,r){let i=this.clone();return i.fields=t,i._nodes=yS(t,r),i._sortErrors=Yb(Object.keys(t)),r&&(i._excludedEdges=r),i}shape(t,r=[]){return this.clone().withMutation(i=>{let o=i._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...i._excludedEdges,...r]),i.setFields(Object.assign(i.fields,t),o)})}partial(){const t={};for(const[r,i]of Object.entries(this.fields))t[r]="optional"in i&&i.optional instanceof Function?i.optional():i;return this.setFields(t)}deepPartial(){return oc(this)}pick(t){const r={};for(const i of t)this.fields[i]&&(r[i]=this.fields[i]);return this.setFields(r,this._excludedEdges.filter(([i,o])=>t.includes(i)&&t.includes(o)))}omit(t){const r=[];for(const i of Object.keys(this.fields))t.includes(i)||r.push(i);return this.pick(r)}from(t,r,i){let o=ms.getter(t,!0);return this.transform(l=>{if(!l)return l;let c=l;return bS(l,t)&&(c=Object.assign({},l),i||delete c[t],c[r]=o(l)),c})}json(){return this.transform(ES)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||sc.exact,test(r){if(r==null)return!0;const i=my(this.schema,r);return i.length===0||this.createError({params:{properties:i.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=sc.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let i=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;const l=my(this.schema,o);return!t||l.length===0||this.createError({params:{unknown:l.join(", ")}})}});return i.spec.noUnknown=t,i}unknown(t=!0,r=sc.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const i={};for(const o of Object.keys(r))i[t(o)]=r[o];return i})}camelCase(){return this.transformKeys(Ah.camelCase)}snakeCase(){return this.transformKeys(Ah.snakeCase)}constantCase(){return this.transformKeys(t=>Ah.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),i=super.describe(t);i.fields={};for(const[l,c]of Object.entries(r.fields)){var o;let d=t;(o=d)!=null&&o.value&&(d=Object.assign({},d,{parent:d.value,value:d.value[l]})),i.fields[l]=c.describe(d)}return i}}Ec.prototype=Jb.prototype;const Wb=({variant:n="dropdown",size:t="md"})=>{const{i18n:r}=ht(),[i,o]=L.useState(!1),l=L.useRef(null),c=yk(r.language)||Cl[0];L.useEffect(()=>{const A=h=>{l.current&&!l.current.contains(h.target)&&o(!1)};return document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[]);const d=async A=>{await r.changeLanguage(A),await Oe.setItem("local:language",A),o(!1),r.emit("languageChanged",A)};return n==="buttons"?f.jsx("div",{className:"flex space-x-2",children:Cl.map(A=>f.jsxs("button",{onClick:()=>d(A.code),className:`flex items-center space-x-1 px-2 py-1 text-xs rounded transition-colors ${r.language===A.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:A.nativeName,children:[f.jsx("span",{className:"text-sm",children:A.flag}),f.jsx("span",{children:A.code.toUpperCase()})]},A.code))}):f.jsxs("div",{className:"relative",ref:l,children:[f.jsxs("button",{onClick:()=>o(!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 ${t==="sm"?"text-sm":"text-base"}`,children:[f.jsxs("div",{className:"flex items-center space-x-2",children:[f.jsx("span",{className:"text-lg",children:c.flag}),f.jsx("span",{children:c.nativeName})]}),f.jsx("svg",{className:`w-4 h-4 transition-transform duration-200 ${i?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),i&&f.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:Cl.map(A=>f.jsxs("button",{onClick:()=>d(A.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 ${t==="sm"?"text-sm":"text-base"}`,children:[f.jsxs("div",{className:"flex items-center space-x-2",children:[f.jsx("span",{className:"text-lg",children:A.flag}),f.jsx("span",{className:"text-gray-700 dark:text-gray-200",children:A.nativeName})]}),r.language===A.code&&f.jsx("svg",{className:"w-4 h-4 text-primary-500",fill:"currentColor",viewBox:"0 0 20 20",children:f.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"})})]},A.code))})]})},gh=[{label:"Aliasvault.net",value:Ga.DEFAULT_API_URL},{label:"Self-hosted",value:"custom"}],vS=n=>Ec().shape({apiUrl:an().required(n("settings.validation.apiUrlRequired")).test("is-valid-api-url",n("settings.validation.apiUrlInvalid"),t=>{if(!t)return!0;try{const r=new URL(t);return r.protocol==="http:"||r.protocol==="https:"}catch{return!1}}),clientUrl:an().required(n("settings.validation.clientUrlRequired")).test("is-valid-client-url",n("settings.validation.clientUrlInvalid"),t=>{if(!t)return!0;try{const r=new URL(t);return r.protocol==="http:"||r.protocol==="https:"}catch{return!1}})}),CS=()=>{const{t:n}=ht(),[t,r]=L.useState(""),[i,o]=L.useState(""),[l,c]=L.useState(""),[d,A]=L.useState(!0),[h,y]=L.useState({}),{setIsInitialLoading:E}=da(),C=vS(n);L.useEffect(()=>{(async()=>{const U=await Oe.getItem("local:apiUrl"),B=await Oe.getItem("local:clientUrl"),F=await Oe.getItem(gc)!==!1,Q=await Oe.getItem(co);A(Q?!1:F);const V=gh.find(W=>W.value===U);V?r(V.value):U?(r("custom"),o(U),c(B??"")):r(gh[0].value),E(!1)})()},[E]);const x=async S=>{const U=S.target.value;r(U),U!=="custom"&&(await Oe.setItem("local:apiUrl",""),await Oe.setItem("local:clientUrl",""),o(""),c(""),y({}))},N=async S=>{const U=S.target.value;o(U);try{await C.validateAt("apiUrl",{apiUrl:U}),y(B=>({...B,apiUrl:void 0})),await Oe.setItem("local:apiUrl",U)}catch(B){B instanceof $a&&(y(F=>({...F,apiUrl:B.message})),await Oe.setItem("local:apiUrl",Ga.DEFAULT_API_URL),await Oe.setItem("local:clientUrl",Ga.DEFAULT_CLIENT_URL))}},I=async S=>{const U=S.target.value;c(U);try{await C.validateAt("clientUrl",{clientUrl:U}),y(B=>({...B,clientUrl:void 0})),await Oe.setItem("local:clientUrl",U)}catch(B){B instanceof $a&&y(F=>({...F,clientUrl:B.message}))}},k=async()=>{const S=!d;await Oe.setItem(gc,S),S&&(await Oe.setItem(rc,[]),await Oe.setItem(co,0)),A(S)};return f.jsxs("div",{className:"p-4 space-y-6",children:[f.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:n("settings.serverConfiguration","Server Configuration")}),f.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n("settings.serverConfigurationDescription","Configure the AliasVault server URL for self-hosted instances")})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"api-connection",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:n("settings.serverUrl")}),f.jsx("select",{id:"api-connection",value:t,onChange:x,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:gh.map(S=>f.jsx("option",{value:S.value,children:S.label},S.value))})]}),t==="custom"&&f.jsxs("div",{className:"space-y-4 pl-4 border-l-2 border-primary-500",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"custom-api-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:n("settings.customApiUrl","API URL")}),f.jsx("input",{id:"custom-api-url",type:"text",value:i,onChange:N,placeholder:"https://vault.example.com/api",className:`w-full bg-gray-50 border ${h.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`}),h.apiUrl&&f.jsx("p",{className:"mt-1 text-sm text-red-500",children:h.apiUrl}),f.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:n("settings.apiUrlHint","The API endpoint URL (usually client URL + /api)")})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"custom-client-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:n("settings.customClientUrl","Client URL")}),f.jsx("input",{id:"custom-client-url",type:"text",value:l,onChange:I,placeholder:"https://vault.example.com",className:`w-full bg-gray-50 border ${h.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`}),h.clientUrl&&f.jsx("p",{className:"mt-1 text-sm text-red-500",children:h.clientUrl}),f.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:n("settings.clientUrlHint","The web interface URL of your self-hosted instance")})]})]})]}),f.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:n("settings.autofillSettings","Autofill Settings")}),f.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n("settings.autofillSettingsDescription","Enable or disable the autofill popup on web pages")})]}),f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n("settings.autofillEnabled")}),f.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:d?n("settings.autofillEnabledDescription","Autofill suggestions will appear on login forms"):n("settings.autofillDisabledDescription","Autofill suggestions are disabled globally")})]}),f.jsx("button",{onClick:k,className:`px-4 py-2 rounded-md transition-colors font-medium text-sm ${d?"bg-green-200 text-green-800 hover:bg-green-300 dark:bg-green-900/30 dark:text-green-400 dark:hover:bg-green-900/50":"bg-red-200 text-red-800 hover:bg-red-300 dark:bg-red-900/30 dark:text-red-400 dark:hover:bg-red-900/50"}`,children:d?n("common.enabled","Enabled"):n("common.disabled","Disabled")})]})]}),f.jsxs("div",{className:"space-y-4 pb-6",children:[f.jsx("div",{children:f.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:n("settings.languageSettings","Language")})}),f.jsx("div",{children:f.jsx(Wb,{variant:"dropdown",size:"sm"})})]}),f.jsxs("div",{className:"text-center text-xs text-gray-400 dark:text-gray-600 pt-4 border-t border-gray-200 dark:border-gray-700",children:[n("settings.version"),": ",Ga.VERSION]})]})},Ca=L.forwardRef(({onClick:n,id:t,children:r,type:i="button",variant:o="primary"},l)=>{const c={primary:"bg-primary-500 hover:bg-primary-600",secondary:"bg-gray-500 hover:bg-gray-600"};return f.jsx("button",{ref:l,className:`${c[o]} text-white font-medium rounded-lg px-4 py-2 text-sm w-full`,onClick:n,type:i,id:t,children:r})});Ca.displayName="Button";var ao={},mh,py;function xS(){return py||(py=1,mh=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),mh}var ph={},Bi={},yy;function bs(){if(yy)return Bi;yy=1;let n;const t=[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 Bi.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},Bi.getSymbolTotalCodewords=function(i){return t[i]},Bi.getBCHDigit=function(r){let i=0;for(;r!==0;)i++,r>>>=1;return i},Bi.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');n=i},Bi.isKanjiModeEnabled=function(){return typeof n<"u"},Bi.toSJIS=function(i){return n(i)},Bi}var yh={},Ey;function VA(){return Ey||(Ey=1,function(n){n.L={bit:1},n.M={bit:0},n.Q={bit:3},n.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return n.L;case"m":case"medium":return n.M;case"q":case"quartile":return n.Q;case"h":case"high":return n.H;default:throw new Error("Unknown EC Level: "+r)}}n.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},n.from=function(i,o){if(n.isValid(i))return i;try{return t(i)}catch{return o}}}(yh)),yh}var Eh,by;function NS(){if(by)return Eh;by=1;function n(){this.buffer=[],this.length=0}return n.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let i=0;i<r;i++)this.putBit((t>>>r-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},Eh=n,Eh}var bh,wy;function IS(){if(wy)return bh;wy=1;function n(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return n.prototype.set=function(t,r,i,o){const l=t*this.size+r;this.data[l]=i,o&&(this.reservedBit[l]=!0)},n.prototype.get=function(t,r){return this.data[t*this.size+r]},n.prototype.xor=function(t,r,i){this.data[t*this.size+r]^=i},n.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},bh=n,bh}var wh={},vy;function kS(){return vy||(vy=1,function(n){const t=bs().getSymbolSize;n.getRowColCoords=function(i){if(i===1)return[];const o=Math.floor(i/7)+2,l=t(i),c=l===145?26:Math.ceil((l-13)/(2*o-2))*2,d=[l-7];for(let A=1;A<o-1;A++)d[A]=d[A-1]-c;return d.push(6),d.reverse()},n.getPositions=function(i){const o=[],l=n.getRowColCoords(i),c=l.length;for(let d=0;d<c;d++)for(let A=0;A<c;A++)d===0&&A===0||d===0&&A===c-1||d===c-1&&A===0||o.push([l[d],l[A]]);return o}}(wh)),wh}var vh={},Cy;function SS(){if(Cy)return vh;Cy=1;const n=bs().getSymbolSize,t=7;return vh.getPositions=function(i){const o=n(i);return[[0,0],[o-t,0],[0,o-t]]},vh}var Ch={},xy;function TS(){return xy||(xy=1,function(n){n.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};n.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},n.from=function(o){return n.isValid(o)?parseInt(o,10):void 0},n.getPenaltyN1=function(o){const l=o.size;let c=0,d=0,A=0,h=null,y=null;for(let E=0;E<l;E++){d=A=0,h=y=null;for(let C=0;C<l;C++){let x=o.get(E,C);x===h?d++:(d>=5&&(c+=t.N1+(d-5)),h=x,d=1),x=o.get(C,E),x===y?A++:(A>=5&&(c+=t.N1+(A-5)),y=x,A=1)}d>=5&&(c+=t.N1+(d-5)),A>=5&&(c+=t.N1+(A-5))}return c},n.getPenaltyN2=function(o){const l=o.size;let c=0;for(let d=0;d<l-1;d++)for(let A=0;A<l-1;A++){const h=o.get(d,A)+o.get(d,A+1)+o.get(d+1,A)+o.get(d+1,A+1);(h===4||h===0)&&c++}return c*t.N2},n.getPenaltyN3=function(o){const l=o.size;let c=0,d=0,A=0;for(let h=0;h<l;h++){d=A=0;for(let y=0;y<l;y++)d=d<<1&2047|o.get(h,y),y>=10&&(d===1488||d===93)&&c++,A=A<<1&2047|o.get(y,h),y>=10&&(A===1488||A===93)&&c++}return c*t.N3},n.getPenaltyN4=function(o){let l=0;const c=o.data.length;for(let A=0;A<c;A++)l+=o.data[A];return Math.abs(Math.ceil(l*100/c/5)-10)*t.N4};function r(i,o,l){switch(i){case n.Patterns.PATTERN000:return(o+l)%2===0;case n.Patterns.PATTERN001:return o%2===0;case n.Patterns.PATTERN010:return l%3===0;case n.Patterns.PATTERN011:return(o+l)%3===0;case n.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(l/3))%2===0;case n.Patterns.PATTERN101:return o*l%2+o*l%3===0;case n.Patterns.PATTERN110:return(o*l%2+o*l%3)%2===0;case n.Patterns.PATTERN111:return(o*l%3+(o+l)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}n.applyMask=function(o,l){const c=l.size;for(let d=0;d<c;d++)for(let A=0;A<c;A++)l.isReserved(A,d)||l.xor(A,d,r(o,A,d))},n.getBestMask=function(o,l){const c=Object.keys(n.Patterns).length;let d=0,A=1/0;for(let h=0;h<c;h++){l(h),n.applyMask(h,o);const y=n.getPenaltyN1(o)+n.getPenaltyN2(o)+n.getPenaltyN3(o)+n.getPenaltyN4(o);n.applyMask(h,o),y<A&&(A=y,d=h)}return d}}(Ch)),Ch}var Ju={},Ny;function Xb(){if(Ny)return Ju;Ny=1;const n=VA(),t=[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],r=[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 Ju.getBlocksCount=function(o,l){switch(l){case n.L:return t[(o-1)*4+0];case n.M:return t[(o-1)*4+1];case n.Q:return t[(o-1)*4+2];case n.H:return t[(o-1)*4+3];default:return}},Ju.getTotalCodewordsCount=function(o,l){switch(l){case n.L:return r[(o-1)*4+0];case n.M:return r[(o-1)*4+1];case n.Q:return r[(o-1)*4+2];case n.H:return r[(o-1)*4+3];default:return}},Ju}var xh={},Al={},Iy;function BS(){if(Iy)return Al;Iy=1;const n=new Uint8Array(512),t=new Uint8Array(256);return function(){let i=1;for(let o=0;o<255;o++)n[o]=i,t[i]=o,i<<=1,i&256&&(i^=285);for(let o=255;o<512;o++)n[o]=n[o-255]}(),Al.log=function(i){if(i<1)throw new Error("log("+i+")");return t[i]},Al.exp=function(i){return n[i]},Al.mul=function(i,o){return i===0||o===0?0:n[t[i]+t[o]]},Al}var ky;function LS(){return ky||(ky=1,function(n){const t=BS();n.mul=function(i,o){const l=new Uint8Array(i.length+o.length-1);for(let c=0;c<i.length;c++)for(let d=0;d<o.length;d++)l[c+d]^=t.mul(i[c],o[d]);return l},n.mod=function(i,o){let l=new Uint8Array(i);for(;l.length-o.length>=0;){const c=l[0];for(let A=0;A<o.length;A++)l[A]^=t.mul(o[A],c);let d=0;for(;d<l.length&&l[d]===0;)d++;l=l.slice(d)}return l},n.generateECPolynomial=function(i){let o=new Uint8Array([1]);for(let l=0;l<i;l++)o=n.mul(o,new Uint8Array([1,t.exp(l)]));return o}}(xh)),xh}var Nh,Sy;function DS(){if(Sy)return Nh;Sy=1;const n=LS();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(i){this.degree=i,this.genPoly=n.generateECPolynomial(this.degree)},t.prototype.encode=function(i){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(i.length+this.degree);o.set(i);const l=n.mod(o,this.genPoly),c=this.degree-l.length;if(c>0){const d=new Uint8Array(this.degree);return d.set(l,c),d}return l},Nh=t,Nh}var Ih={},kh={},Sh={},Ty;function $b(){return Ty||(Ty=1,Sh.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Sh}var hr={},By;function Zb(){if(By)return hr;By=1;const n="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
]))+`;hr.KANJI=new RegExp(r,"g"),hr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),hr.BYTE=new RegExp(i,"g"),hr.NUMERIC=new RegExp(n,"g"),hr.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+r+"$"),l=new RegExp("^"+n+"$"),c=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return hr.testKanji=function(A){return o.test(A)},hr.testNumeric=function(A){return l.test(A)},hr.testAlphanumeric=function(A){return c.test(A)},hr}var Ly;function ws(){return Ly||(Ly=1,function(n){const t=$b(),r=Zb();n.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},n.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},n.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},n.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},n.MIXED={bit:-1},n.getCharCountIndicator=function(l,c){if(!l.ccBits)throw new Error("Invalid mode: "+l);if(!t.isValid(c))throw new Error("Invalid version: "+c);return c>=1&&c<10?l.ccBits[0]:c<27?l.ccBits[1]:l.ccBits[2]},n.getBestModeForData=function(l){return r.testNumeric(l)?n.NUMERIC:r.testAlphanumeric(l)?n.ALPHANUMERIC:r.testKanji(l)?n.KANJI:n.BYTE},n.toString=function(l){if(l&&l.id)return l.id;throw new Error("Invalid mode")},n.isValid=function(l){return l&&l.bit&&l.ccBits};function i(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return n.NUMERIC;case"alphanumeric":return n.ALPHANUMERIC;case"kanji":return n.KANJI;case"byte":return n.BYTE;default:throw new Error("Unknown mode: "+o)}}n.from=function(l,c){if(n.isValid(l))return l;try{return i(l)}catch{return c}}}(kh)),kh}var Dy;function RS(){return Dy||(Dy=1,function(n){const t=bs(),r=Xb(),i=VA(),o=ws(),l=$b(),c=7973,d=t.getBCHDigit(c);function A(C,x,N){for(let I=1;I<=40;I++)if(x<=n.getCapacity(I,N,C))return I}function h(C,x){return o.getCharCountIndicator(C,x)+4}function y(C,x){let N=0;return C.forEach(function(I){const k=h(I.mode,x);N+=k+I.getBitsLength()}),N}function E(C,x){for(let N=1;N<=40;N++)if(y(C,N)<=n.getCapacity(N,x,o.MIXED))return N}n.from=function(x,N){return l.isValid(x)?parseInt(x,10):N},n.getCapacity=function(x,N,I){if(!l.isValid(x))throw new Error("Invalid QR Code version");typeof I>"u"&&(I=o.BYTE);const k=t.getSymbolTotalCodewords(x),S=r.getTotalCodewordsCount(x,N),U=(k-S)*8;if(I===o.MIXED)return U;const B=U-h(I,x);switch(I){case o.NUMERIC:return Math.floor(B/10*3);case o.ALPHANUMERIC:return Math.floor(B/11*2);case o.KANJI:return Math.floor(B/13);case o.BYTE:default:return Math.floor(B/8)}},n.getBestVersionForData=function(x,N){let I;const k=i.from(N,i.M);if(Array.isArray(x)){if(x.length>1)return E(x,k);if(x.length===0)return 1;I=x[0]}else I=x;return A(I.mode,I.getLength(),k)},n.getEncodedBits=function(x){if(!l.isValid(x)||x<7)throw new Error("Invalid QR Code version");let N=x<<12;for(;t.getBCHDigit(N)-d>=0;)N^=c<<t.getBCHDigit(N)-d;return x<<12|N}}(Ih)),Ih}var Th={},Ry;function US(){if(Ry)return Th;Ry=1;const n=bs(),t=1335,r=21522,i=n.getBCHDigit(t);return Th.getEncodedBits=function(l,c){const d=l.bit<<3|c;let A=d<<10;for(;n.getBCHDigit(A)-i>=0;)A^=t<<n.getBCHDigit(A)-i;return(d<<10|A)^r},Th}var Bh={},Lh,Uy;function MS(){if(Uy)return Lh;Uy=1;const n=ws();function t(r){this.mode=n.NUMERIC,this.data=r.toString()}return t.getBitsLength=function(i){return 10*Math.floor(i/3)+(i%3?i%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(i){let o,l,c;for(o=0;o+3<=this.data.length;o+=3)l=this.data.substr(o,3),c=parseInt(l,10),i.put(c,10);const d=this.data.length-o;d>0&&(l=this.data.substr(o),c=parseInt(l,10),i.put(c,d*3+1))},Lh=t,Lh}var Dh,My;function jS(){if(My)return Dh;My=1;const n=ws(),t=["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 r(i){this.mode=n.ALPHANUMERIC,this.data=i}return r.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(o){let l;for(l=0;l+2<=this.data.length;l+=2){let c=t.indexOf(this.data[l])*45;c+=t.indexOf(this.data[l+1]),o.put(c,11)}this.data.length%2&&o.put(t.indexOf(this.data[l]),6)},Dh=r,Dh}var Rh,jy;function OS(){if(jy)return Rh;jy=1;const n=ws();function t(r){this.mode=n.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return t.getBitsLength=function(i){return i*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){for(let i=0,o=this.data.length;i<o;i++)r.put(this.data[i],8)},Rh=t,Rh}var Uh,Oy;function _S(){if(Oy)return Uh;Oy=1;const n=ws(),t=bs();function r(i){this.mode=n.KANJI,this.data=i}return r.getBitsLength=function(o){return o*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(i){let o;for(o=0;o<this.data.length;o++){let l=t.toSJIS(this.data[o]);if(l>=33088&&l<=40956)l-=33088;else if(l>=57408&&l<=60351)l-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
Make sure your charset is UTF-8`);l=(l>>>8&255)*192+(l&255),i.put(l,13)}},Uh=r,Uh}var Mh={exports:{}},_y;function PS(){return _y||(_y=1,function(n){var t={single_source_shortest_paths:function(r,i,o){var l={},c={};c[i]=0;var d=t.PriorityQueue.make();d.push(i,0);for(var A,h,y,E,C,x,N,I,k;!d.empty();){A=d.pop(),h=A.value,E=A.cost,C=r[h]||{};for(y in C)C.hasOwnProperty(y)&&(x=C[y],N=E+x,I=c[y],k=typeof c[y]>"u",(k||I>N)&&(c[y]=N,d.push(y,N),l[y]=h))}if(typeof o<"u"&&typeof c[o]>"u"){var S=["Could not find a path from ",i," to ",o,"."].join("");throw new Error(S)}return l},extract_shortest_path_from_predecessor_list:function(r,i){for(var o=[],l=i;l;)o.push(l),r[l],l=r[l];return o.reverse(),o},find_path:function(r,i,o){var l=t.single_source_shortest_paths(r,i,o);return t.extract_shortest_path_from_predecessor_list(l,o)},PriorityQueue:{make:function(r){var i=t.PriorityQueue,o={},l;r=r||{};for(l in i)i.hasOwnProperty(l)&&(o[l]=i[l]);return o.queue=[],o.sorter=r.sorter||i.default_sorter,o},default_sorter:function(r,i){return r.cost-i.cost},push:function(r,i){var o={value:r,cost:i};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};n.exports=t}(Mh)),Mh.exports}var Py;function FS(){return Py||(Py=1,function(n){const t=ws(),r=MS(),i=jS(),o=OS(),l=_S(),c=Zb(),d=bs(),A=PS();function h(S){return unescape(encodeURIComponent(S)).length}function y(S,U,B){const F=[];let Q;for(;(Q=S.exec(B))!==null;)F.push({data:Q[0],index:Q.index,mode:U,length:Q[0].length});return F}function E(S){const U=y(c.NUMERIC,t.NUMERIC,S),B=y(c.ALPHANUMERIC,t.ALPHANUMERIC,S);let F,Q;return d.isKanjiModeEnabled()?(F=y(c.BYTE,t.BYTE,S),Q=y(c.KANJI,t.KANJI,S)):(F=y(c.BYTE_KANJI,t.BYTE,S),Q=[]),U.concat(B,F,Q).sort(function(W,J){return W.index-J.index}).map(function(W){return{data:W.data,mode:W.mode,length:W.length}})}function C(S,U){switch(U){case t.NUMERIC:return r.getBitsLength(S);case t.ALPHANUMERIC:return i.getBitsLength(S);case t.KANJI:return l.getBitsLength(S);case t.BYTE:return o.getBitsLength(S)}}function x(S){return S.reduce(function(U,B){const F=U.length-1>=0?U[U.length-1]:null;return F&&F.mode===B.mode?(U[U.length-1].data+=B.data,U):(U.push(B),U)},[])}function N(S){const U=[];for(let B=0;B<S.length;B++){const F=S[B];switch(F.mode){case t.NUMERIC:U.push([F,{data:F.data,mode:t.ALPHANUMERIC,length:F.length},{data:F.data,mode:t.BYTE,length:F.length}]);break;case t.ALPHANUMERIC:U.push([F,{data:F.data,mode:t.BYTE,length:F.length}]);break;case t.KANJI:U.push([F,{data:F.data,mode:t.BYTE,length:h(F.data)}]);break;case t.BYTE:U.push([{data:F.data,mode:t.BYTE,length:h(F.data)}])}}return U}function I(S,U){const B={},F={start:{}};let Q=["start"];for(let V=0;V<S.length;V++){const W=S[V],J=[];for(let z=0;z<W.length;z++){const G=W[z],Y=""+V+z;J.push(Y),B[Y]={node:G,lastCount:0},F[Y]={};for(let ae=0;ae<Q.length;ae++){const Z=Q[ae];B[Z]&&B[Z].node.mode===G.mode?(F[Z][Y]=C(B[Z].lastCount+G.length,G.mode)-C(B[Z].lastCount,G.mode),B[Z].lastCount+=G.length):(B[Z]&&(B[Z].lastCount=G.length),F[Z][Y]=C(G.length,G.mode)+4+t.getCharCountIndicator(G.mode,U))}}Q=J}for(let V=0;V<Q.length;V++)F[Q[V]].end=0;return{map:F,table:B}}function k(S,U){let B;const F=t.getBestModeForData(S);if(B=t.from(U,F),B!==t.BYTE&&B.bit<F.bit)throw new Error('"'+S+'" cannot be encoded with mode '+t.toString(B)+`.
 Suggested mode is: `+t.toString(F));switch(B===t.KANJI&&!d.isKanjiModeEnabled()&&(B=t.BYTE),B){case t.NUMERIC:return new r(S);case t.ALPHANUMERIC:return new i(S);case t.KANJI:return new l(S);case t.BYTE:return new o(S)}}n.fromArray=function(U){return U.reduce(function(B,F){return typeof F=="string"?B.push(k(F,null)):F.data&&B.push(k(F.data,F.mode)),B},[])},n.fromString=function(U,B){const F=E(U,d.isKanjiModeEnabled()),Q=N(F),V=I(Q,B),W=A.find_path(V.map,"start","end"),J=[];for(let z=1;z<W.length-1;z++)J.push(V.table[W[z]].node);return n.fromArray(x(J))},n.rawSplit=function(U){return n.fromArray(E(U,d.isKanjiModeEnabled()))}}(Bh)),Bh}var Fy;function QS(){if(Fy)return ph;Fy=1;const n=bs(),t=VA(),r=NS(),i=IS(),o=kS(),l=SS(),c=TS(),d=Xb(),A=DS(),h=RS(),y=US(),E=ws(),C=FS();function x(V,W){const J=V.size,z=l.getPositions(W);for(let G=0;G<z.length;G++){const Y=z[G][0],ae=z[G][1];for(let Z=-1;Z<=7;Z++)if(!(Y+Z<=-1||J<=Y+Z))for(let ce=-1;ce<=7;ce++)ae+ce<=-1||J<=ae+ce||(Z>=0&&Z<=6&&(ce===0||ce===6)||ce>=0&&ce<=6&&(Z===0||Z===6)||Z>=2&&Z<=4&&ce>=2&&ce<=4?V.set(Y+Z,ae+ce,!0,!0):V.set(Y+Z,ae+ce,!1,!0))}}function N(V){const W=V.size;for(let J=8;J<W-8;J++){const z=J%2===0;V.set(J,6,z,!0),V.set(6,J,z,!0)}}function I(V,W){const J=o.getPositions(W);for(let z=0;z<J.length;z++){const G=J[z][0],Y=J[z][1];for(let ae=-2;ae<=2;ae++)for(let Z=-2;Z<=2;Z++)ae===-2||ae===2||Z===-2||Z===2||ae===0&&Z===0?V.set(G+ae,Y+Z,!0,!0):V.set(G+ae,Y+Z,!1,!0)}}function k(V,W){const J=V.size,z=h.getEncodedBits(W);let G,Y,ae;for(let Z=0;Z<18;Z++)G=Math.floor(Z/3),Y=Z%3+J-8-3,ae=(z>>Z&1)===1,V.set(G,Y,ae,!0),V.set(Y,G,ae,!0)}function S(V,W,J){const z=V.size,G=y.getEncodedBits(W,J);let Y,ae;for(Y=0;Y<15;Y++)ae=(G>>Y&1)===1,Y<6?V.set(Y,8,ae,!0):Y<8?V.set(Y+1,8,ae,!0):V.set(z-15+Y,8,ae,!0),Y<8?V.set(8,z-Y-1,ae,!0):Y<9?V.set(8,15-Y-1+1,ae,!0):V.set(8,15-Y-1,ae,!0);V.set(z-8,8,1,!0)}function U(V,W){const J=V.size;let z=-1,G=J-1,Y=7,ae=0;for(let Z=J-1;Z>0;Z-=2)for(Z===6&&Z--;;){for(let ce=0;ce<2;ce++)if(!V.isReserved(G,Z-ce)){let pe=!1;ae<W.length&&(pe=(W[ae]>>>Y&1)===1),V.set(G,Z-ce,pe),Y--,Y===-1&&(ae++,Y=7)}if(G+=z,G<0||J<=G){G-=z,z=-z;break}}}function B(V,W,J){const z=new r;J.forEach(function(ce){z.put(ce.mode.bit,4),z.put(ce.getLength(),E.getCharCountIndicator(ce.mode,V)),ce.write(z)});const G=n.getSymbolTotalCodewords(V),Y=d.getTotalCodewordsCount(V,W),ae=(G-Y)*8;for(z.getLengthInBits()+4<=ae&&z.put(0,4);z.getLengthInBits()%8!==0;)z.putBit(0);const Z=(ae-z.getLengthInBits())/8;for(let ce=0;ce<Z;ce++)z.put(ce%2?17:236,8);return F(z,V,W)}function F(V,W,J){const z=n.getSymbolTotalCodewords(W),G=d.getTotalCodewordsCount(W,J),Y=z-G,ae=d.getBlocksCount(W,J),Z=z%ae,ce=ae-Z,pe=Math.floor(z/ae),X=Math.floor(Y/ae),le=X+1,ge=pe-X,je=new A(ge);let P=0;const q=new Array(ae),se=new Array(ae);let we=0;const Ce=new Uint8Array(V.buffer);for(let We=0;We<ae;We++){const dt=We<ce?X:le;q[We]=Ce.slice(P,P+dt),se[We]=je.encode(q[We]),P+=dt,we=Math.max(we,dt)}const Be=new Uint8Array(z);let Le=0,Je,Ke;for(Je=0;Je<we;Je++)for(Ke=0;Ke<ae;Ke++)Je<q[Ke].length&&(Be[Le++]=q[Ke][Je]);for(Je=0;Je<ge;Je++)for(Ke=0;Ke<ae;Ke++)Be[Le++]=se[Ke][Je];return Be}function Q(V,W,J,z){let G;if(Array.isArray(V))G=C.fromArray(V);else if(typeof V=="string"){let pe=W;if(!pe){const X=C.rawSplit(V);pe=h.getBestVersionForData(X,J)}G=C.fromString(V,pe||40)}else throw new Error("Invalid data");const Y=h.getBestVersionForData(G,J);if(!Y)throw new Error("The amount of data is too big to be stored in a QR Code");if(!W)W=Y;else if(W<Y)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+Y+`.
`);const ae=B(W,J,G),Z=n.getSymbolSize(W),ce=new i(Z);return x(ce,W),N(ce),I(ce,W),S(ce,J,0),W>=7&&k(ce,W),U(ce,ae),isNaN(z)&&(z=c.getBestMask(ce,S.bind(null,ce,J))),c.applyMask(z,ce),S(ce,J,z),{modules:ce,version:W,errorCorrectionLevel:J,maskPattern:z,segments:G}}return ph.create=function(W,J){if(typeof W>"u"||W==="")throw new Error("No input text");let z=t.M,G,Y;return typeof J<"u"&&(z=t.from(J.errorCorrectionLevel,t.M),G=h.from(J.version),Y=c.from(J.maskPattern),J.toSJISFunc&&n.setToSJISFunction(J.toSJISFunc)),Q(W,G,z,Y)},ph}var jh={},Oh={},Qy;function ew(){return Qy||(Qy=1,function(n){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let i=r.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+r);(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 o=parseInt(i.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+i.slice(0,6).join("")}}n.getOptions=function(i){i||(i={}),i.color||(i.color={});const o=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,l=i.width&&i.width>=21?i.width:void 0,c=i.scale||4;return{width:l,scale:l?4:c,margin:o,color:{dark:t(i.color.dark||"#000000ff"),light:t(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},n.getScale=function(i,o){return o.width&&o.width>=i+o.margin*2?o.width/(i+o.margin*2):o.scale},n.getImageWidth=function(i,o){const l=n.getScale(i,o);return Math.floor((i+o.margin*2)*l)},n.qrToImageData=function(i,o,l){const c=o.modules.size,d=o.modules.data,A=n.getScale(c,l),h=Math.floor((c+l.margin*2)*A),y=l.margin*A,E=[l.color.light,l.color.dark];for(let C=0;C<h;C++)for(let x=0;x<h;x++){let N=(C*h+x)*4,I=l.color.light;if(C>=y&&x>=y&&C<h-y&&x<h-y){const k=Math.floor((C-y)/A),S=Math.floor((x-y)/A);I=E[d[k*c+S]?1:0]}i[N++]=I.r,i[N++]=I.g,i[N++]=I.b,i[N]=I.a}}}(Oh)),Oh}var Hy;function HS(){return Hy||(Hy=1,function(n){const t=ew();function r(o,l,c){o.clearRect(0,0,l.width,l.height),l.style||(l.style={}),l.height=c,l.width=c,l.style.height=c+"px",l.style.width=c+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}n.render=function(l,c,d){let A=d,h=c;typeof A>"u"&&(!c||!c.getContext)&&(A=c,c=void 0),c||(h=i()),A=t.getOptions(A);const y=t.getImageWidth(l.modules.size,A),E=h.getContext("2d"),C=E.createImageData(y,y);return t.qrToImageData(C.data,l,A),r(E,h,y),E.putImageData(C,0,0),h},n.renderToDataURL=function(l,c,d){let A=d;typeof A>"u"&&(!c||!c.getContext)&&(A=c,c=void 0),A||(A={});const h=n.render(l,c,A),y=A.type||"image/png",E=A.rendererOpts||{};return h.toDataURL(y,E.quality)}}(jh)),jh}var _h={},zy;function zS(){if(zy)return _h;zy=1;const n=ew();function t(o,l){const c=o.a/255,d=l+'="'+o.hex+'"';return c<1?d+" "+l+'-opacity="'+c.toFixed(2).slice(1)+'"':d}function r(o,l,c){let d=o+l;return typeof c<"u"&&(d+=" "+c),d}function i(o,l,c){let d="",A=0,h=!1,y=0;for(let E=0;E<o.length;E++){const C=Math.floor(E%l),x=Math.floor(E/l);!C&&!h&&(h=!0),o[E]?(y++,E>0&&C>0&&o[E-1]||(d+=h?r("M",C+c,.5+x+c):r("m",A,0),A=0,h=!1),C+1<l&&o[E+1]||(d+=r("h",y),y=0)):A++}return d}return _h.render=function(l,c,d){const A=n.getOptions(c),h=l.modules.size,y=l.modules.data,E=h+A.margin*2,C=A.color.light.a?"<path "+t(A.color.light,"fill")+' d="M0 0h'+E+"v"+E+'H0z"/>':"",x="<path "+t(A.color.dark,"stroke")+' d="'+i(y,h,A.margin)+'"/>',N='viewBox="0 0 '+E+" "+E+'"',k='<svg xmlns="http://www.w3.org/2000/svg" '+(A.width?'width="'+A.width+'" height="'+A.width+'" ':"")+N+' shape-rendering="crispEdges">'+C+x+`</svg>
`;return typeof d=="function"&&d(null,k),k},_h}var Vy;function VS(){if(Vy)return ao;Vy=1;const n=xS(),t=QS(),r=HS(),i=zS();function o(l,c,d,A,h){const y=[].slice.call(arguments,1),E=y.length,C=typeof y[E-1]=="function";if(!C&&!n())throw new Error("Callback required as last argument");if(C){if(E<2)throw new Error("Too few arguments provided");E===2?(h=d,d=c,c=A=void 0):E===3&&(c.getContext&&typeof h>"u"?(h=A,A=void 0):(h=A,A=d,d=c,c=void 0))}else{if(E<1)throw new Error("Too few arguments provided");return E===1?(d=c,c=A=void 0):E===2&&!c.getContext&&(A=d,d=c,c=void 0),new Promise(function(x,N){try{const I=t.create(d,A);x(l(I,c,A))}catch(I){N(I)}})}try{const x=t.create(d,A);h(null,l(x,c,A))}catch(x){h(x)}}return ao.create=t.create,ao.toCanvas=o.bind(null,r.render),ao.toDataURL=o.bind(null,r.renderToDataURL),ao.toString=o.bind(null,function(l,c,d){return i.render(l,d)}),ao}var GS=VS();const KS=Zr(GS);var Tn=(n=>(n.TIMEOUT="TIMEOUT",n.GENERIC="GENERIC",n))(Tn||{});class qS{constructor(t){Ot(this,"webApi");Ot(this,"pollingInterval",null);Ot(this,"requestId",null);Ot(this,"privateKey",null);this.webApi=t}async initiate(){try{const t=await Ut.generateRsaKeyPair();this.privateKey=t.privateKey;const r=await this.webApi.rawFetch("auth/mobile-login/initiate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientPublicKey:t.publicKey})});if(!r.ok)throw Tn.GENERIC;const i=await r.json();return this.requestId=i.requestId,this.requestId}catch(t){throw typeof t=="string"&&Object.values(Tn).includes(t)?t:Tn.GENERIC}}async startPolling(t,r){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 o=await this.webApi.rawFetch(`auth/mobile-login/poll/${this.requestId}`,{method:"GET"});if(!o.ok){if(o.status===404){this.stopPolling(),this.privateKey=null,this.requestId=null,r(Tn.TIMEOUT);return}throw new Error(`Polling failed: ${o.status}`)}const l=await o.json();if(l.fulfilled&&l.encryptedSymmetricKey){this.stopPolling();const c=await Ut.decryptWithPrivateKey(l.encryptedDecryptionKey,this.privateKey),d=Wr.Buffer.from(c).toString("base64"),A=await Ut.decryptWithPrivateKey(l.encryptedSymmetricKey,this.privateKey),h=Wr.Buffer.from(A).toString("base64"),y=await Ut.symmetricDecrypt(l.encryptedToken,h),E=await Ut.symmetricDecrypt(l.encryptedRefreshToken,h),C=await Ut.symmetricDecrypt(l.encryptedUsername,h);this.privateKey=null,this.requestId=null;const x=await this.webApi.rawFetch("auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:C})});if(!x.ok){r(Tn.GENERIC);return}const N=await x.json(),I={username:C,token:y,refreshToken:E,decryptionKey:d,salt:N.salt,encryptionType:N.encryptionType,encryptionSettings:N.encryptionSettings};t(I)}}catch{this.stopPolling(),this.privateKey=null,this.requestId=null,r(Tn.GENERIC)}};this.pollingInterval=setInterval(i,3e3),setTimeout(()=>{this.pollingInterval&&(this.stopPolling(),this.privateKey=null,this.requestId=null,r(Tn.TIMEOUT))},21e4)}stopPolling(){this.pollingInterval&&(clearInterval(this.pollingInterval),this.pollingInterval=null)}cleanup(){this.stopPolling(),this.privateKey=null,this.requestId=null}}const tw=({isOpen:n,onClose:t,onSuccess:r,webApi:i,mode:o="login"})=>{const{t:l}=ht(),[c,d]=L.useState(null),[A,h]=L.useState(null),[y,E]=L.useState(120),C=L.useRef(null),x=L.useRef(null),N=B=>{switch(B){case Tn.TIMEOUT:return l("auth.errors.mobileLoginRequestExpired");case Tn.GENERIC:default:return l("common.errors.unknownError")}};L.useEffect(()=>{if(c&&y>0&&n)return x.current=setInterval(()=>{E(B=>B<=1?(x.current&&clearInterval(x.current),0):B-1)},1e3),()=>{x.current&&clearInterval(x.current)}},[c,y,n]),L.useEffect(()=>n?((async()=>{try{h(null),d(null),E(120),C.current||(C.current=new qS(i));const Q=`aliasvault://open/mobile-unlock/${await C.current.initiate()}`,V=await KS.toDataURL(Q,{width:256,margin:2});d(V),await C.current.startPolling(async W=>{try{await r(W),I()}catch{d(null),h(Tn.GENERIC)}},W=>{d(null),h(W)})}catch(F){typeof F=="string"&&Object.values(Tn).includes(F)?h(F):h(Tn.GENERIC)}})(),()=>{C.current&&C.current.cleanup(),x.current&&clearInterval(x.current)}):void 0,[n]);const I=()=>{C.current&&C.current.cleanup(),x.current&&clearInterval(x.current),d(null),h(null),E(120),t()},k=B=>{const F=Math.floor(B/60),Q=B%60;return`${F}:${Q.toString().padStart(2,"0")}`};if(!n)return null;const S=l(o==="unlock"?"auth.unlockWithMobile":"auth.loginWithMobile"),U=l("auth.scanQrCode");return f.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[f.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-80 transition-opacity",onClick:I}),f.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:f.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 px-6 pb-6 pt-5 text-left shadow-xl transition-all w-full max-w-md",children:[f.jsxs("button",{type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-500 focus:outline-none",onClick:I,children:[f.jsx("span",{className:"sr-only",children:l("common.close")}),f.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]}),f.jsxs("div",{className:"mt-3",children:[f.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-2",children:S}),f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:U}),A&&f.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:N(A)}),c&&f.jsxs("div",{className:"flex flex-col items-center mb-4",children:[f.jsx("img",{src:c,alt:"QR Code",className:"border-4 border-gray-200 dark:border-gray-600 rounded mb-3"}),f.jsx("div",{className:"text-gray-700 dark:text-gray-300 text-sm font-medium",children:k(y)})]}),!c&&!A&&f.jsx("div",{className:"flex justify-center py-8",children:f.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}),f.jsx("button",{type:"button",onClick:I,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 Ra=(n=>(n.EXPAND="expand",n.EDIT="edit",n.DELETE="delete",n.SETTINGS="settings",n.RELOAD="reload",n.EXTERNAL_LINK="external_link",n.SAVE="save",n.PLUS="plus",n.TAB="tab",n.EYE="eye",n.EYE_OFF="eye_off",n))(Ra||{});const GA=({type:n,className:t="w-5 h-5"})=>({expand:f.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.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:f.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.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:f.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.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:f.jsxs("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[f.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"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),reload:f.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.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:f.jsxs("svg",{className:t,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[f.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"}),f.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:f.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),plus:f.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),tab:f.jsxs("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[f.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"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z"})]}),eye:f.jsxs("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),f.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:f.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})})})[n]||null,pn=({onClick:n,title:t,iconType:r,variant:i="default"})=>{const o={default:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700",primary:"text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300 hover:bg-primary-100 dark:hover:bg-primary-900/20",danger:"text-red-500 hover:text-red-600 hover:bg-red-100 dark:hover:bg-red-900/20"};return f.jsx("button",{onClick:n,className:`p-2 rounded-lg ${o[i]}`,title:t,children:f.jsx(GA,{type:r})})},aw=()=>{const[n,t]=L.useState(Ga.DEFAULT_API_URL);return{apiUrl:n,setApiUrl:t,loadApiUrl:async()=>{const o=await Oe.getItem("local:apiUrl");o&&o.length>0?t(o):t(Ga.DEFAULT_API_URL)},getDisplayUrl:()=>{const o=n.replace("https://","").replace("http://","").replace(":443","").replace("/api","");return o==="app.aliasvault.net"?"aliasvault.net":o}}},YS=()=>{const{loadApiUrl:n,getDisplayUrl:t}=aw(),r=Fa(),{t:i}=ht();L.useEffect(()=>{n()},[n]);const o=()=>{r("/auth-settings")};return f.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:["(",i("auth.connectingTo")," ",f.jsx("button",{onClick:o,type:"button",className:"text-orange-500 hover:text-orange-600 dark:text-orange-400 dark:hover:text-orange-500 underline",children:t()}),")"]})};class JS{convertAnchorTagsToOpenInNewTab(t){try{const i=new DOMParser().parseFromString(t,"text/html"),o=i.querySelectorAll("a[href]");return o.length>0&&o.forEach(l=>{if((!l.hasAttribute("target")||l.getAttribute("target")!=="_blank")&&l.setAttribute("target","_blank"),!l.hasAttribute("rel"))l.setAttribute("rel","noopener noreferrer");else{const c=l.getAttribute("rel")??"",d=new Set(c.split(" ").filter(A=>A.trim()!==""));d.add("noopener"),d.add("noreferrer"),l.setAttribute("rel",Array.from(d).join(" "))}}),i.documentElement.outerHTML}catch(r){return console.error(`Error in convertAnchorTagsToOpenInNewTab: ${r instanceof Error?r.message:String(r)}`),t}}normalizeUsername(t){return t.toLowerCase().trim()}}const oo=new JS;class Da{static isPopup(){return new URLSearchParams(window.location.search).get("expanded")==="true"?!0:window.innerWidth>390}static openInNewPopup(t){const o=window.screen.width/2-400,l=window.screen.height/2-1e3/2,d=`popup.html?expanded=true#${t||window.location.hash.replace("#","")}`;window.open(d,"AliasVaultPopup",`width=800,height=1000,left=${o},top=${l},popup=true`),window.close()}}var Li={},Ph={},Fh,Gy;function nw(){return Gy||(Gy=1,Fh=function(t){if(typeof t!="object"||t===null||typeof t.byteLength!="number")throw new TypeError("Expected input to be an ArrayBuffer");for(var r=new Uint8Array(t),i="",o,l=0;l<r.length;l++)o=r[l].toString(16),i+=o.length===1?"0"+o:o;return i}),Fh}var Qh,Ky;function WS(){return Ky||(Ky=1,Qh=function(t){for(var r=[],i=t.length,o=0;o<i;o++){var l=t.charCodeAt(o);if(l>=55296&&l<=56319&&i>o+1){var c=t.charCodeAt(o+1);c>=56320&&c<=57343&&(l=(l-55296)*1024+c-56320+65536,o+=1)}if(l<128){r.push(l);continue}if(l<2048){r.push(l>>6|192),r.push(l&63|128);continue}if(l<55296||l>=57344&&l<65536){r.push(l>>12|224),r.push(l>>6&63|128),r.push(l&63|128);continue}if(l>=65536&&l<=1114111){r.push(l>>18|240),r.push(l>>12&63|128),r.push(l>>6&63|128),r.push(l&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer}),Qh}var Hh,qy;function XS(){return qy||(qy=1,Hh=function(t){if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t.length%2!==0)throw new RangeError("Expected string to be an even number of characters");for(var r=new Uint8Array(t.length/2),i=0;i<t.length;i+=2)r[i/2]=parseInt(t.substring(i,i+2),16);return r.buffer}),Hh}var zh,Yy;function $S(){if(Yy)return zh;Yy=1;const n=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function t(i,o,l){let c,d,A,h,y,E,C,x,N,I,k,S,U,B=0,F=l.length;for(;F>=64;){for(c=o[0],d=o[1],A=o[2],h=o[3],y=o[4],E=o[5],C=o[6],x=o[7],I=0;I<16;I++)k=B+I*4,i[I]=(l[k]&255)<<24|(l[k+1]&255)<<16|(l[k+2]&255)<<8|l[k+3]&255;for(I=16;I<64;I++)N=i[I-2],S=(N>>>17|N<<15)^(N>>>19|N<<13)^N>>>10,N=i[I-15],U=(N>>>7|N<<25)^(N>>>18|N<<14)^N>>>3,i[I]=(S+i[I-7]|0)+(U+i[I-16]|0);for(I=0;I<64;I++)S=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&E^~y&C)|0)+(x+(n[I]+i[I]|0)|0)|0,U=((c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10))+(c&d^c&A^d&A)|0,x=C,C=E,E=y,y=h+S|0,h=A,A=d,d=c,c=S+U|0;o[0]+=c,o[1]+=d,o[2]+=A,o[3]+=h,o[4]+=y,o[5]+=E,o[6]+=C,o[7]+=x,B+=64,F-=64}}function r(i){const o=i.length,l=o%64,c=o%64<56?64:128,d=new Uint8Array(c),A=o/536870912|0,h=o<<3;return d.set(i.subarray(o-l)),d[l]=128,d[c-8]=A>>>24&255,d[c-7]=A>>>16&255,d[c-6]=A>>>8&255,d[c-5]=A>>>0&255,d[c-4]=h>>>24&255,d[c-3]=h>>>16&255,d[c-2]=h>>>8&255,d[c-1]=h>>>0&255,d}return zh=function(o){const l=new Int32Array(8),c=new Int32Array(64);l[0]=1779033703,l[1]=3144134277,l[2]=1013904242,l[3]=2773480762,l[4]=1359893119,l[5]=2600822924,l[6]=528734635,l[7]=1541459225;const d=new Uint8Array(o),A=r(d);t(c,l,d),t(c,l,A);const h=new Uint8Array(32);for(let y=0;y<8;y++)h[y*4+0]=l[y]>>>24&255,h[y*4+1]=l[y]>>>16&255,h[y*4+2]=l[y]>>>8&255,h[y*4+3]=l[y]>>>0&255;return h.buffer},zh}var Vh,Jy;function ZS(){return Jy||(Jy=1,Vh=function(n,t,r){if(n==null||t==null)return n;var i=String(n),o=typeof t=="number"?t:parseInt(t,10);if(isNaN(o)||!isFinite(o))return i;var l=i.length;if(l>=o)return i;var c=r==null?"":String(r);c===""&&(c=" ");for(var d=o-l;c.length<d;)c+=c;var A=c.length>d?c.substr(0,d):c;return A+i}),Vh}var Gh,Wy;function eT(){if(Wy)return Gh;Wy=1;const n=nw();return Gh=function(r){const i=new Uint8Array(r);if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")crypto.getRandomValues(i);else if(typeof msCrypto=="object"&&typeof msCrypto.getRandomValues=="function")msCrypto.getRandomValues(i);else throw new Error("No secure random number generator available");return n(i.buffer)},Gh}var lc={exports:{}},tT=lc.exports,Xy;function aT(){return Xy||(Xy=1,function(n,t){(function(){var r,i=0xdeadbeefcafe,o=(i&16777215)==15715070;function l(R,j,H){R!=null&&(typeof R=="number"?this.fromNumber(R,j,H):j==null&&typeof R!="string"?this.fromString(R,256):this.fromString(R,j))}function c(){return new l(null)}function d(R,j,H,ie,Te,De){for(;--De>=0;){var Qe=j*this[R++]+H[ie]+Te;Te=Math.floor(Qe/67108864),H[ie++]=Qe&67108863}return Te}function A(R,j,H,ie,Te,De){for(var Qe=j&32767,Ge=j>>15;--De>=0;){var St=this[R]&32767,Ve=this[R++]>>15,ka=Ge*St+Ve*Qe;St=Qe*St+((ka&32767)<<15)+H[ie]+(Te&1073741823),Te=(St>>>30)+(ka>>>15)+Ge*Ve+(Te>>>30),H[ie++]=St&1073741823}return Te}function h(R,j,H,ie,Te,De){for(var Qe=j&16383,Ge=j>>14;--De>=0;){var St=this[R]&16383,Ve=this[R++]>>14,ka=Ge*St+Ve*Qe;St=Qe*St+((ka&16383)<<14)+H[ie]+Te,Te=(St>>28)+(ka>>14)+Ge*Ve,H[ie++]=St&268435455}return Te}var y=typeof navigator<"u";y&&o&&navigator.appName=="Microsoft Internet Explorer"?(l.prototype.am=A,r=30):y&&o&&navigator.appName!="Netscape"?(l.prototype.am=d,r=26):(l.prototype.am=h,r=28),l.prototype.DB=r,l.prototype.DM=(1<<r)-1,l.prototype.DV=1<<r;var E=52;l.prototype.FV=Math.pow(2,E),l.prototype.F1=E-r,l.prototype.F2=2*r-E;var C="0123456789abcdefghijklmnopqrstuvwxyz",x=new Array,N,I;for(N=48,I=0;I<=9;++I)x[N++]=I;for(N=97,I=10;I<36;++I)x[N++]=I;for(N=65,I=10;I<36;++I)x[N++]=I;function k(R){return C.charAt(R)}function S(R,j){var H=x[R.charCodeAt(j)];return H??-1}function U(R){for(var j=this.t-1;j>=0;--j)R[j]=this[j];R.t=this.t,R.s=this.s}function B(R){this.t=1,this.s=R<0?-1:0,R>0?this[0]=R:R<-1?this[0]=R+this.DV:this.t=0}function F(R){var j=c();return j.fromInt(R),j}function Q(R,j){var H;if(j==16)H=4;else if(j==8)H=3;else if(j==256)H=8;else if(j==2)H=1;else if(j==32)H=5;else if(j==4)H=2;else{this.fromRadix(R,j);return}this.t=0,this.s=0;for(var ie=R.length,Te=!1,De=0;--ie>=0;){var Qe=H==8?R[ie]&255:S(R,ie);if(Qe<0){R.charAt(ie)=="-"&&(Te=!0);continue}Te=!1,De==0?this[this.t++]=Qe:De+H>this.DB?(this[this.t-1]|=(Qe&(1<<this.DB-De)-1)<<De,this[this.t++]=Qe>>this.DB-De):this[this.t-1]|=Qe<<De,De+=H,De>=this.DB&&(De-=this.DB)}H==8&&(R[0]&128)!=0&&(this.s=-1,De>0&&(this[this.t-1]|=(1<<this.DB-De)-1<<De)),this.clamp(),Te&&l.ZERO.subTo(this,this)}function V(){for(var R=this.s&this.DM;this.t>0&&this[this.t-1]==R;)--this.t}function W(R){if(this.s<0)return"-"+this.negate().toString(R);var j;if(R==16)j=4;else if(R==8)j=3;else if(R==2)j=1;else if(R==32)j=5;else if(R==4)j=2;else return this.toRadix(R);var H=(1<<j)-1,ie,Te=!1,De="",Qe=this.t,Ge=this.DB-Qe*this.DB%j;if(Qe-- >0)for(Ge<this.DB&&(ie=this[Qe]>>Ge)>0&&(Te=!0,De=k(ie));Qe>=0;)Ge<j?(ie=(this[Qe]&(1<<Ge)-1)<<j-Ge,ie|=this[--Qe]>>(Ge+=this.DB-j)):(ie=this[Qe]>>(Ge-=j)&H,Ge<=0&&(Ge+=this.DB,--Qe)),ie>0&&(Te=!0),Te&&(De+=k(ie));return Te?De:"0"}function J(){var R=c();return l.ZERO.subTo(this,R),R}function z(){return this.s<0?this.negate():this}function G(R){var j=this.s-R.s;if(j!=0)return j;var H=this.t;if(j=H-R.t,j!=0)return this.s<0?-j:j;for(;--H>=0;)if((j=this[H]-R[H])!=0)return j;return 0}function Y(R){var j=1,H;return(H=R>>>16)!=0&&(R=H,j+=16),(H=R>>8)!=0&&(R=H,j+=8),(H=R>>4)!=0&&(R=H,j+=4),(H=R>>2)!=0&&(R=H,j+=2),(H=R>>1)!=0&&(R=H,j+=1),j}function ae(){return this.t<=0?0:this.DB*(this.t-1)+Y(this[this.t-1]^this.s&this.DM)}function Z(R,j){var H;for(H=this.t-1;H>=0;--H)j[H+R]=this[H];for(H=R-1;H>=0;--H)j[H]=0;j.t=this.t+R,j.s=this.s}function ce(R,j){for(var H=R;H<this.t;++H)j[H-R]=this[H];j.t=Math.max(this.t-R,0),j.s=this.s}function pe(R,j){var H=R%this.DB,ie=this.DB-H,Te=(1<<ie)-1,De=Math.floor(R/this.DB),Qe=this.s<<H&this.DM,Ge;for(Ge=this.t-1;Ge>=0;--Ge)j[Ge+De+1]=this[Ge]>>ie|Qe,Qe=(this[Ge]&Te)<<H;for(Ge=De-1;Ge>=0;--Ge)j[Ge]=0;j[De]=Qe,j.t=this.t+De+1,j.s=this.s,j.clamp()}function X(R,j){j.s=this.s;var H=Math.floor(R/this.DB);if(H>=this.t){j.t=0;return}var ie=R%this.DB,Te=this.DB-ie,De=(1<<ie)-1;j[0]=this[H]>>ie;for(var Qe=H+1;Qe<this.t;++Qe)j[Qe-H-1]|=(this[Qe]&De)<<Te,j[Qe-H]=this[Qe]>>ie;ie>0&&(j[this.t-H-1]|=(this.s&De)<<Te),j.t=this.t-H,j.clamp()}function le(R,j){for(var H=0,ie=0,Te=Math.min(R.t,this.t);H<Te;)ie+=this[H]-R[H],j[H++]=ie&this.DM,ie>>=this.DB;if(R.t<this.t){for(ie-=R.s;H<this.t;)ie+=this[H],j[H++]=ie&this.DM,ie>>=this.DB;ie+=this.s}else{for(ie+=this.s;H<R.t;)ie-=R[H],j[H++]=ie&this.DM,ie>>=this.DB;ie-=R.s}j.s=ie<0?-1:0,ie<-1?j[H++]=this.DV+ie:ie>0&&(j[H++]=ie),j.t=H,j.clamp()}function ge(R,j){var H=this.abs(),ie=R.abs(),Te=H.t;for(j.t=Te+ie.t;--Te>=0;)j[Te]=0;for(Te=0;Te<ie.t;++Te)j[Te+H.t]=H.am(0,ie[Te],j,Te,0,H.t);j.s=0,j.clamp(),this.s!=R.s&&l.ZERO.subTo(j,j)}function je(R){for(var j=this.abs(),H=R.t=2*j.t;--H>=0;)R[H]=0;for(H=0;H<j.t-1;++H){var ie=j.am(H,j[H],R,2*H,0,1);(R[H+j.t]+=j.am(H+1,2*j[H],R,2*H+1,ie,j.t-H-1))>=j.DV&&(R[H+j.t]-=j.DV,R[H+j.t+1]=1)}R.t>0&&(R[R.t-1]+=j.am(H,j[H],R,2*H,0,1)),R.s=0,R.clamp()}function P(R,j,H){var ie=R.abs();if(!(ie.t<=0)){var Te=this.abs();if(Te.t<ie.t){j!=null&&j.fromInt(0),H!=null&&this.copyTo(H);return}H==null&&(H=c());var De=c(),Qe=this.s,Ge=R.s,St=this.DB-Y(ie[ie.t-1]);St>0?(ie.lShiftTo(St,De),Te.lShiftTo(St,H)):(ie.copyTo(De),Te.copyTo(H));var Ve=De.t,ka=De[Ve-1];if(ka!=0){var oa=ka*(1<<this.F1)+(Ve>1?De[Ve-2]>>this.F2:0),en=this.FV/oa,En=(1<<this.F1)/oa,zt=1<<this.F2,Zt=H.t,qa=Zt-Ve,ga=j??c();for(De.dlShiftTo(qa,ga),H.compareTo(ga)>=0&&(H[H.t++]=1,H.subTo(ga,H)),l.ONE.dlShiftTo(Ve,ga),ga.subTo(De,De);De.t<Ve;)De[De.t++]=0;for(;--qa>=0;){var m=H[--Zt]==ka?this.DM:Math.floor(H[Zt]*en+(H[Zt-1]+zt)*En);if((H[Zt]+=De.am(0,m,H,qa,0,Ve))<m)for(De.dlShiftTo(qa,ga),H.subTo(ga,H);H[Zt]<--m;)H.subTo(ga,H)}j!=null&&(H.drShiftTo(Ve,j),Qe!=Ge&&l.ZERO.subTo(j,j)),H.t=Ve,H.clamp(),St>0&&H.rShiftTo(St,H),Qe<0&&l.ZERO.subTo(H,H)}}}function q(R){var j=c();return this.abs().divRemTo(R,null,j),this.s<0&&j.compareTo(l.ZERO)>0&&R.subTo(j,j),j}function se(R){this.m=R}function we(R){return R.s<0||R.compareTo(this.m)>=0?R.mod(this.m):R}function Ce(R){return R}function Be(R){R.divRemTo(this.m,null,R)}function Le(R,j,H){R.multiplyTo(j,H),this.reduce(H)}function Je(R,j){R.squareTo(j),this.reduce(j)}se.prototype.convert=we,se.prototype.revert=Ce,se.prototype.reduce=Be,se.prototype.mulTo=Le,se.prototype.sqrTo=Je;function Ke(){if(this.t<1)return 0;var R=this[0];if((R&1)==0)return 0;var j=R&3;return j=j*(2-(R&15)*j)&15,j=j*(2-(R&255)*j)&255,j=j*(2-((R&65535)*j&65535))&65535,j=j*(2-R*j%this.DV)%this.DV,j>0?this.DV-j:-j}function We(R){this.m=R,this.mp=R.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<R.DB-15)-1,this.mt2=2*R.t}function dt(R){var j=c();return R.abs().dlShiftTo(this.m.t,j),j.divRemTo(this.m,null,j),R.s<0&&j.compareTo(l.ZERO)>0&&this.m.subTo(j,j),j}function fa(R){var j=c();return R.copyTo(j),this.reduce(j),j}function kt(R){for(;R.t<=this.mt2;)R[R.t++]=0;for(var j=0;j<this.m.t;++j){var H=R[j]&32767,ie=H*this.mpl+((H*this.mph+(R[j]>>15)*this.mpl&this.um)<<15)&R.DM;for(H=j+this.m.t,R[H]+=this.m.am(0,ie,R,j,0,this.m.t);R[H]>=R.DV;)R[H]-=R.DV,R[++H]++}R.clamp(),R.drShiftTo(this.m.t,R),R.compareTo(this.m)>=0&&R.subTo(this.m,R)}function mt(R,j){R.squareTo(j),this.reduce(j)}function wt(R,j,H){R.multiplyTo(j,H),this.reduce(H)}We.prototype.convert=dt,We.prototype.revert=fa,We.prototype.reduce=kt,We.prototype.mulTo=wt,We.prototype.sqrTo=mt;function Gt(){return(this.t>0?this[0]&1:this.s)==0}function ke(R,j){if(R>4294967295||R<1)return l.ONE;var H=c(),ie=c(),Te=j.convert(this),De=Y(R)-1;for(Te.copyTo(H);--De>=0;)if(j.sqrTo(H,ie),(R&1<<De)>0)j.mulTo(ie,Te,H);else{var Qe=H;H=ie,ie=Qe}return j.revert(H)}function He(R,j){var H;return R<256||j.isEven()?H=new se(j):H=new We(j),this.exp(R,H)}l.prototype.copyTo=U,l.prototype.fromInt=B,l.prototype.fromString=Q,l.prototype.clamp=V,l.prototype.dlShiftTo=Z,l.prototype.drShiftTo=ce,l.prototype.lShiftTo=pe,l.prototype.rShiftTo=X,l.prototype.subTo=le,l.prototype.multiplyTo=ge,l.prototype.squareTo=je,l.prototype.divRemTo=P,l.prototype.invDigit=Ke,l.prototype.isEven=Gt,l.prototype.exp=ke,l.prototype.toString=W,l.prototype.negate=J,l.prototype.abs=z,l.prototype.compareTo=G,l.prototype.bitLength=ae,l.prototype.mod=q,l.prototype.modPowInt=He,l.ZERO=F(0),l.ONE=F(1);function it(){var R=c();return this.copyTo(R),R}function pt(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function $(){return this.t==0?this.s:this[0]<<24>>24}function oe(){return this.t==0?this.s:this[0]<<16>>16}function Ee(R){return Math.floor(Math.LN2*this.DB/Math.log(R))}function Fe(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function _e(R){if(R==null&&(R=10),this.signum()==0||R<2||R>36)return"0";var j=this.chunkSize(R),H=Math.pow(R,j),ie=F(H),Te=c(),De=c(),Qe="";for(this.divRemTo(ie,Te,De);Te.signum()>0;)Qe=(H+De.intValue()).toString(R).substr(1)+Qe,Te.divRemTo(ie,Te,De);return De.intValue().toString(R)+Qe}function Ue(R,j){this.fromInt(0),j==null&&(j=10);for(var H=this.chunkSize(j),ie=Math.pow(j,H),Te=!1,De=0,Qe=0,Ge=0;Ge<R.length;++Ge){var St=S(R,Ge);if(St<0){R.charAt(Ge)=="-"&&this.signum()==0&&(Te=!0);continue}Qe=j*Qe+St,++De>=H&&(this.dMultiply(ie),this.dAddOffset(Qe,0),De=0,Qe=0)}De>0&&(this.dMultiply(Math.pow(j,De)),this.dAddOffset(Qe,0)),Te&&l.ZERO.subTo(this,this)}function qe(R,j,H){if(typeof j=="number")if(R<2)this.fromInt(1);else for(this.fromNumber(R,H),this.testBit(R-1)||this.bitwiseTo(l.ONE.shiftLeft(R-1),Pe,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(j);)this.dAddOffset(2,0),this.bitLength()>R&&this.subTo(l.ONE.shiftLeft(R-1),this);else{var ie=new Array,Te=R&7;ie.length=(R>>3)+1,j.nextBytes(ie),Te>0?ie[0]&=(1<<Te)-1:ie[0]=0,this.fromString(ie,256)}}function M(){var R=this.t,j=new Array;j[0]=this.s;var H=this.DB-R*this.DB%8,ie,Te=0;if(R-- >0)for(H<this.DB&&(ie=this[R]>>H)!=(this.s&this.DM)>>H&&(j[Te++]=ie|this.s<<this.DB-H);R>=0;)H<8?(ie=(this[R]&(1<<H)-1)<<8-H,ie|=this[--R]>>(H+=this.DB-8)):(ie=this[R]>>(H-=8)&255,H<=0&&(H+=this.DB,--R)),(ie&128)!=0&&(ie|=-256),Te==0&&(this.s&128)!=(ie&128)&&++Te,(Te>0||ie!=this.s)&&(j[Te++]=ie);return j}function w(R){return this.compareTo(R)==0}function v(R){return this.compareTo(R)<0?this:R}function K(R){return this.compareTo(R)>0?this:R}function ne(R,j,H){var ie,Te,De=Math.min(R.t,this.t);for(ie=0;ie<De;++ie)H[ie]=j(this[ie],R[ie]);if(R.t<this.t){for(Te=R.s&this.DM,ie=De;ie<this.t;++ie)H[ie]=j(this[ie],Te);H.t=this.t}else{for(Te=this.s&this.DM,ie=De;ie<R.t;++ie)H[ie]=j(Te,R[ie]);H.t=R.t}H.s=j(this.s,R.s),H.clamp()}function me(R,j){return R&j}function xe(R){var j=c();return this.bitwiseTo(R,me,j),j}function Pe(R,j){return R|j}function Ie(R){var j=c();return this.bitwiseTo(R,Pe,j),j}function Ye(R,j){return R^j}function nt(R){var j=c();return this.bitwiseTo(R,Ye,j),j}function Xe(R,j){return R&~j}function Jt(R){var j=c();return this.bitwiseTo(R,Xe,j),j}function ft(){for(var R=c(),j=0;j<this.t;++j)R[j]=this.DM&~this[j];return R.t=this.t,R.s=~this.s,R}function Wt(R){var j=c();return R<0?this.rShiftTo(-R,j):this.lShiftTo(R,j),j}function Xt(R){var j=c();return R<0?this.lShiftTo(-R,j):this.rShiftTo(R,j),j}function yn(R){if(R==0)return-1;var j=0;return(R&65535)==0&&(R>>=16,j+=16),(R&255)==0&&(R>>=8,j+=8),(R&15)==0&&(R>>=4,j+=4),(R&3)==0&&(R>>=2,j+=2),(R&1)==0&&++j,j}function ze(){for(var R=0;R<this.t;++R)if(this[R]!=0)return R*this.DB+yn(this[R]);return this.s<0?this.t*this.DB:-1}function Nr(R){for(var j=0;R!=0;)R&=R-1,++j;return j}function nr(){for(var R=0,j=this.s&this.DM,H=0;H<this.t;++H)R+=Nr(this[H]^j);return R}function Ua(R){var j=Math.floor(R/this.DB);return j>=this.t?this.s!=0:(this[j]&1<<R%this.DB)!=0}function ei(R,j){var H=l.ONE.shiftLeft(R);return this.bitwiseTo(H,j,H),H}function Fi(R){return this.changeBit(R,Pe)}function on(R){return this.changeBit(R,Xe)}function Kt(R){return this.changeBit(R,Ye)}function Na(R,j){for(var H=0,ie=0,Te=Math.min(R.t,this.t);H<Te;)ie+=this[H]+R[H],j[H++]=ie&this.DM,ie>>=this.DB;if(R.t<this.t){for(ie+=R.s;H<this.t;)ie+=this[H],j[H++]=ie&this.DM,ie>>=this.DB;ie+=this.s}else{for(ie+=this.s;H<R.t;)ie+=R[H],j[H++]=ie&this.DM,ie>>=this.DB;ie+=R.s}j.s=ie<0?-1:0,ie>0?j[H++]=ie:ie<-1&&(j[H++]=this.DV+ie),j.t=H,j.clamp()}function na(R){var j=c();return this.addTo(R,j),j}function ti(R){var j=c();return this.subTo(R,j),j}function rr(R){var j=c();return this.multiplyTo(R,j),j}function vs(){var R=c();return this.squareTo(R),R}function Qi(R){var j=c();return this.divRemTo(R,j,null),j}function Bn(R){var j=c();return this.divRemTo(R,null,j),j}function ha(R){var j=c(),H=c();return this.divRemTo(R,j,H),new Array(j,H)}function Gn(R){this[this.t]=this.am(0,R-1,this,0,0,this.t),++this.t,this.clamp()}function ir(R,j){if(R!=0){for(;this.t<=j;)this[this.t++]=0;for(this[j]+=R;this[j]>=this.DV;)this[j]-=this.DV,++j>=this.t&&(this[this.t++]=0),++this[j]}}function Za(){}function Kn(R){return R}function $t(R,j,H){R.multiplyTo(j,H)}function Hi(R,j){R.squareTo(j)}Za.prototype.convert=Kn,Za.prototype.revert=Kn,Za.prototype.mulTo=$t,Za.prototype.sqrTo=Hi;function Ir(R){return this.exp(R,new Za)}function qn(R,j,H){var ie=Math.min(this.t+R.t,j);for(H.s=0,H.t=ie;ie>0;)H[--ie]=0;var Te;for(Te=H.t-this.t;ie<Te;++ie)H[ie+this.t]=this.am(0,R[ie],H,ie,0,this.t);for(Te=Math.min(R.t,j);ie<Te;++ie)this.am(0,R[ie],H,ie,0,j-ie);H.clamp()}function Ia(R,j,H){--j;var ie=H.t=this.t+R.t-j;for(H.s=0;--ie>=0;)H[ie]=0;for(ie=Math.max(j-this.t,0);ie<R.t;++ie)H[this.t+ie-j]=this.am(j-ie,R[ie],H,0,0,this.t+ie-j);H.clamp(),H.drShiftTo(1,H)}function ln(R){this.r2=c(),this.q3=c(),l.ONE.dlShiftTo(2*R.t,this.r2),this.mu=this.r2.divide(R),this.m=R}function ai(R){if(R.s<0||R.t>2*this.m.t)return R.mod(this.m);if(R.compareTo(this.m)<0)return R;var j=c();return R.copyTo(j),this.reduce(j),j}function zi(R){return R}function Cs(R){for(R.drShiftTo(this.m.t-1,this.r2),R.t>this.m.t+1&&(R.t=this.m.t+1,R.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);R.compareTo(this.r2)<0;)R.dAddOffset(1,this.m.t+1);for(R.subTo(this.r2,R);R.compareTo(this.m)>=0;)R.subTo(this.m,R)}function Ln(R,j){R.squareTo(j),this.reduce(j)}function kr(R,j,H){R.multiplyTo(j,H),this.reduce(H)}ln.prototype.convert=ai,ln.prototype.revert=zi,ln.prototype.reduce=Cs,ln.prototype.mulTo=kr,ln.prototype.sqrTo=Ln;function Ka(R,j){var H=R.bitLength(),ie,Te=F(1),De;if(H<=0)return Te;H<18?ie=1:H<48?ie=3:H<144?ie=4:H<768?ie=5:ie=6,H<8?De=new se(j):j.isEven()?De=new ln(j):De=new We(j);var Qe=new Array,Ge=3,St=ie-1,Ve=(1<<ie)-1;if(Qe[1]=De.convert(this),ie>1){var ka=c();for(De.sqrTo(Qe[1],ka);Ge<=Ve;)Qe[Ge]=c(),De.mulTo(ka,Qe[Ge-2],Qe[Ge]),Ge+=2}var oa=R.t-1,en,En=!0,zt=c(),Zt;for(H=Y(R[oa])-1;oa>=0;){for(H>=St?en=R[oa]>>H-St&Ve:(en=(R[oa]&(1<<H+1)-1)<<St-H,oa>0&&(en|=R[oa-1]>>this.DB+H-St)),Ge=ie;(en&1)==0;)en>>=1,--Ge;if((H-=Ge)<0&&(H+=this.DB,--oa),En)Qe[en].copyTo(Te),En=!1;else{for(;Ge>1;)De.sqrTo(Te,zt),De.sqrTo(zt,Te),Ge-=2;Ge>0?De.sqrTo(Te,zt):(Zt=Te,Te=zt,zt=Zt),De.mulTo(zt,Qe[en],Te)}for(;oa>=0&&(R[oa]&1<<H)==0;)De.sqrTo(Te,zt),Zt=Te,Te=zt,zt=Zt,--H<0&&(H=this.DB-1,--oa)}return De.revert(Te)}function ni(R){var j=this.s<0?this.negate():this.clone(),H=R.s<0?R.negate():R.clone();if(j.compareTo(H)<0){var ie=j;j=H,H=ie}var Te=j.getLowestSetBit(),De=H.getLowestSetBit();if(De<0)return j;for(Te<De&&(De=Te),De>0&&(j.rShiftTo(De,j),H.rShiftTo(De,H));j.signum()>0;)(Te=j.getLowestSetBit())>0&&j.rShiftTo(Te,j),(Te=H.getLowestSetBit())>0&&H.rShiftTo(Te,H),j.compareTo(H)>=0?(j.subTo(H,j),j.rShiftTo(1,j)):(H.subTo(j,H),H.rShiftTo(1,H));return De>0&&H.lShiftTo(De,H),H}function Yn(R){if(R<=0)return 0;var j=this.DV%R,H=this.s<0?R-1:0;if(this.t>0)if(j==0)H=this[0]%R;else for(var ie=this.t-1;ie>=0;--ie)H=(j*H+this[ie])%R;return H}function Dn(R){var j=R.isEven();if(this.isEven()&&j||R.signum()==0)return l.ZERO;for(var H=R.clone(),ie=this.clone(),Te=F(1),De=F(0),Qe=F(0),Ge=F(1);H.signum()!=0;){for(;H.isEven();)H.rShiftTo(1,H),j?((!Te.isEven()||!De.isEven())&&(Te.addTo(this,Te),De.subTo(R,De)),Te.rShiftTo(1,Te)):De.isEven()||De.subTo(R,De),De.rShiftTo(1,De);for(;ie.isEven();)ie.rShiftTo(1,ie),j?((!Qe.isEven()||!Ge.isEven())&&(Qe.addTo(this,Qe),Ge.subTo(R,Ge)),Qe.rShiftTo(1,Qe)):Ge.isEven()||Ge.subTo(R,Ge),Ge.rShiftTo(1,Ge);H.compareTo(ie)>=0?(H.subTo(ie,H),j&&Te.subTo(Qe,Te),De.subTo(Ge,De)):(ie.subTo(H,ie),j&&Qe.subTo(Te,Qe),Ge.subTo(De,Ge))}if(ie.compareTo(l.ONE)!=0)return l.ZERO;if(Ge.compareTo(R)>=0)return Ge.subtract(R);if(Ge.signum()<0)Ge.addTo(R,Ge);else return Ge;return Ge.signum()<0?Ge.add(R):Ge}var sa=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ri=(1<<26)/sa[sa.length-1];function xs(R){var j,H=this.abs();if(H.t==1&&H[0]<=sa[sa.length-1]){for(j=0;j<sa.length;++j)if(H[0]==sa[j])return!0;return!1}if(H.isEven())return!1;for(j=1;j<sa.length;){for(var ie=sa[j],Te=j+1;Te<sa.length&&ie<ri;)ie*=sa[Te++];for(ie=H.modInt(ie);j<Te;)if(ie%sa[j++]==0)return!1}return H.millerRabin(R)}function Ns(R){var j=this.subtract(l.ONE),H=j.getLowestSetBit();if(H<=0)return!1;var ie=j.shiftRight(H);R=R+1>>1,R>sa.length&&(R=sa.length);for(var Te=c(),De=0;De<R;++De){Te.fromInt(sa[Math.floor(Math.random()*sa.length)]);var Qe=Te.modPow(ie,this);if(Qe.compareTo(l.ONE)!=0&&Qe.compareTo(j)!=0){for(var Ge=1;Ge++<H&&Qe.compareTo(j)!=0;)if(Qe=Qe.modPowInt(2,this),Qe.compareTo(l.ONE)==0)return!1;if(Qe.compareTo(j)!=0)return!1}}return!0}l.prototype.chunkSize=Ee,l.prototype.toRadix=_e,l.prototype.fromRadix=Ue,l.prototype.fromNumber=qe,l.prototype.bitwiseTo=ne,l.prototype.changeBit=ei,l.prototype.addTo=Na,l.prototype.dMultiply=Gn,l.prototype.dAddOffset=ir,l.prototype.multiplyLowerTo=qn,l.prototype.multiplyUpperTo=Ia,l.prototype.modInt=Yn,l.prototype.millerRabin=Ns,l.prototype.clone=it,l.prototype.intValue=pt,l.prototype.byteValue=$,l.prototype.shortValue=oe,l.prototype.signum=Fe,l.prototype.toByteArray=M,l.prototype.equals=w,l.prototype.min=v,l.prototype.max=K,l.prototype.and=xe,l.prototype.or=Ie,l.prototype.xor=nt,l.prototype.andNot=Jt,l.prototype.not=ft,l.prototype.shiftLeft=Wt,l.prototype.shiftRight=Xt,l.prototype.getLowestSetBit=ze,l.prototype.bitCount=nr,l.prototype.testBit=Ua,l.prototype.setBit=Fi,l.prototype.clearBit=on,l.prototype.flipBit=Kt,l.prototype.add=na,l.prototype.subtract=ti,l.prototype.multiply=rr,l.prototype.divide=Qi,l.prototype.remainder=Bn,l.prototype.divideAndRemainder=ha,l.prototype.modPow=Ka,l.prototype.modInverse=Dn,l.prototype.pow=Ir,l.prototype.gcd=ni,l.prototype.isProbablePrime=xs,l.prototype.square=vs,l.prototype.Barrett=ln;var qt,Et,_t;function Jn(R){Et[_t++]^=R&255,Et[_t++]^=R>>8&255,Et[_t++]^=R>>16&255,Et[_t++]^=R>>24&255,_t>=Tr&&(_t-=Tr)}function sr(){Jn(new Date().getTime())}if(Et==null){Et=new Array,_t=0;var Aa;if(typeof window<"u"&&window.crypto){if(window.crypto.getRandomValues){var ii=new Uint8Array(32);for(window.crypto.getRandomValues(ii),Aa=0;Aa<32;++Aa)Et[_t++]=ii[Aa]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var Qa=window.crypto.random(32);for(Aa=0;Aa<Qa.length;++Aa)Et[_t++]=Qa.charCodeAt(Aa)&255}}for(;_t<Tr;)Aa=Math.floor(65536*Math.random()),Et[_t++]=Aa>>>8,Et[_t++]=Aa&255;_t=0,sr()}function Vi(){if(qt==null){for(sr(),qt=Un(),qt.init(Et),_t=0;_t<Et.length;++_t)Et[_t]=0;_t=0}return qt.next()}function or(R){var j;for(j=0;j<R.length;++j)R[j]=Vi()}function Sr(){}Sr.prototype.nextBytes=or;function Rn(){this.i=0,this.j=0,this.S=new Array}function si(R){var j,H,ie;for(j=0;j<256;++j)this.S[j]=j;for(H=0,j=0;j<256;++j)H=H+this.S[j]+R[j%R.length]&255,ie=this.S[j],this.S[j]=this.S[H],this.S[H]=ie;this.i=0,this.j=0}function Gi(){var R;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,R=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=R,this.S[R+this.S[this.i]&255]}Rn.prototype.init=si,Rn.prototype.next=Gi;function Un(){return new Rn}var Tr=256;n.exports={default:l,BigInteger:l,SecureRandom:Sr}}).call(tT)}(lc)),lc.exports}var Kh,$y;function KA(){if($y)return Kh;$y=1;const n=ZS(),t=eT(),{BigInteger:r}=aT(),i=Symbol("big-integer"),o=Symbol("hex-length");class l{constructor(d,A){this[i]=d,this[o]=A}add(d){return new l(this[i].add(d[i]),null)}equals(d){return this[i].equals(d[i])}multiply(d){return new l(this[i].multiply(d[i]),null)}modPow(d,A){return new l(this[i].modPow(d[i],A[i]),A[o])}mod(d){return new l(this[i].mod(d[i]),d[o])}subtract(d){return new l(this[i].subtract(d[i]),this[o])}xor(d){return new l(this[i].xor(d[i]),this[o])}pad(d){if(d<this[o])throw new Error("Cannot pad to a shorter length");return new l(this[i],d)}inspect(){const d=this[i].toString(16);return`<SRPInteger ${d.slice(0,16)}${d.length>16?"...":""}>`}toHex(){if(this[o]===null)throw new Error("This SRPInteger has no specified length");return n(this[i].toString(16),this[o],"0")}}return l.fromHex=function(c){return new l(new r(c,16),c.length)},l.randomInteger=function(c){return l.fromHex(t(c))},l.ZERO=new l(new r("0"),null),Kh=l,Kh}var qh,Zy;function nT(){if(Zy)return qh;Zy=1;const n=nw(),t=WS(),r=XS(),i=$S(),o=KA();function l(c){const d=c.reduce((h,y)=>h+y.byteLength,0),A=new Uint8Array(d);return c.reduce((h,y)=>(A.set(new Uint8Array(y),h),h+y.byteLength),0),A.buffer}return qh=function(...d){const A=l(d.map(h=>{if(h instanceof o)return r(h.toHex());if(typeof h=="string")return t(h);throw new TypeError("Expected string or SRPInteger")}));return o.fromHex(n(i(A)))},qh}var eE;function rT(){return eE||(eE=1,function(n){const t=nT(),r=KA(),i={largeSafePrime:`
    AC6BDB41 324A9A9B F166DE5E 1389582F AF72B665 1987EE07 FC319294
    3DB56050 A37329CB B4A099ED 8193E075 7767A13D D52312AB 4B03310D
    CD7F48A9 DA04FD50 E8083969 EDB767B0 CF609517 9A163AB3 661A05FB
    D5FAAAE8 2918A996 2F0B93B8 55F97993 EC975EEA A80D740A DBF4FF74
    7359D041 D5C33EA7 1D281E44 6B14773B CA97B43A 23FB8016 76BD207A
    436C6481 F1D2B907 8717461A 5B9D32E6 88F87748 544523B5 24B0D57D
    5EA77A27 75D2ECFA 032CFBDB F52FB378 61602790 04E57AE6 AF874E73
    03CE5329 9CCC041C 7BC308D8 2A5698F3 A8D0C382 71AE35F8 E9DBFBB6
    94B5C803 D89F7AE4 35DE236D 525F5475 9B65E372 FCD68EF2 0FA7111F
    9E4AFF73
  `,generatorModulo:"02",hashOutputBytes:256/8,paddedLength:512};function o(l){return l.pad(i.paddedLength)}n.N=r.fromHex(i.largeSafePrime.replace(/\s+/g,"")),n.g=r.fromHex(i.generatorModulo.replace(/\s+/g,"")),n.k=t(n.N,o(n.g)),n.H=t,n.PAD=o,n.hashOutputBytes=i.hashOutputBytes}(Ph)),Ph}var tE;function iT(){if(tE)return Li;tE=1;const n=rT(),t=KA();return Li.generateSalt=function(){return t.randomInteger(n.hashOutputBytes).toHex()},Li.derivePrivateKey=function(r,i,o){const{H:l}=n,c=t.fromHex(r),d=String(i),A=String(o);return l(c,l(`${d}:${A}`)).toHex()},Li.deriveVerifier=function(r){const{N:i,g:o}=n,l=t.fromHex(r);return o.modPow(l,i).toHex()},Li.generateEphemeral=function(){const{N:r,g:i}=n,o=t.randomInteger(n.hashOutputBytes),l=i.modPow(o,r);return{secret:o.toHex(),public:l.toHex()}},Li.deriveSession=function(r,i,o,l,c){const{N:d,g:A,k:h,H:y,PAD:E}=n,C=t.fromHex(r),x=t.fromHex(i),N=t.fromHex(o),I=String(l),k=t.fromHex(c),S=A.modPow(C,d);if(x.mod(d).equals(t.ZERO))throw new Error("The server sent an invalid public ephemeral");const U=y(E(S),E(x)),B=x.subtract(h.multiply(A.modPow(k,d))).modPow(C.add(U.multiply(k)),d),F=y(B),Q=y(y(d).xor(y(A)),y(I),N,S,x,F);return{key:F.toHex(),proof:Q.toHex()}},Li.verifySession=function(r,i,o){const{H:l}=n,c=t.fromHex(r),d=t.fromHex(i.proof),A=t.fromHex(i.key),h=l(c,d,A);if(!t.fromHex(o).equals(h))throw new Error("Server provided session proof is invalid")},Li}var sT=iT();const no=Zr(sT);class xl extends Error{constructor(t){super(t),this.name="ApiAuthError"}}class rw{constructor(t){Ot(this,"webApiService");this.webApiService=t}async initiateLogin(t){const r={username:t.toLowerCase().trim()},i=await this.webApiService.rawFetch("Auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(i.status===400){const l=await i.json();throw new xl(l.title)}return await i.json()}async validateLogin(t,r,i,o){const l=no.generateEphemeral(),c=no.derivePrivateKey(o.salt,t,r),d=no.deriveSession(l.secret,o.serverEphemeral,o.salt,t,c),A={username:t.toLowerCase().trim(),rememberMe:i,clientPublicEphemeral:l.public,clientSessionProof:d.proof},h=await this.webApiService.rawFetch("Auth/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});if(h.status===400){const E=await h.json();throw new xl(E.title)}return await h.json()}async validateLogin2Fa(t,r,i,o,l){const c=no.generateEphemeral(),d=no.derivePrivateKey(o.salt,t,r),A=no.deriveSession(c.secret,o.serverEphemeral,o.salt,t,d),h={username:t.toLowerCase().trim(),rememberMe:i,clientPublicEphemeral:c.public,clientSessionProof:A.proof,code2Fa:l},y=await this.webApiService.rawFetch("Auth/validate-2fa",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(y.status===400){const C=await y.json();throw new xl(C.title)}return await y.json()}}const oT=()=>{const{t:n}=ht(),t=Fa(),r=Cr(),i=ia(),{setHeaderButtons:o}=xr(),[l,c]=L.useState({username:"",password:""}),{showLoading:d,hideLoading:A,setIsInitialLoading:h}=da(),[y,E]=L.useState(!0),[C,x]=L.useState(!1),[N,I]=L.useState(null),[k,S]=L.useState(null),[U,B]=L.useState(null),[F,Q]=L.useState(!1),[V,W]=L.useState(""),[J,z]=L.useState(null),[G,Y]=L.useState(null),[ae,Z]=L.useState(!1),ce=vr(),pe=new rw(ce),X=async(q,se,we,Ce,Be)=>{const Le=await ce.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${se}`}});await r.setAuthTokens(q,se,we),await i.storeEncryptionKey(Ce),await i.storeEncryptionKeyDerivationParams({salt:Be.salt,encryptionType:Be.encryptionType,encryptionSettings:Be.encryptionSettings});const Je=await i.initializeDatabase(Le,Ce);try{if(await Je.hasPendingMigrations()){t("/upgrade",{replace:!0}),A();return}}catch(Ke){await r.logout(),Y(Ke instanceof Error?Ke.message:n("common.errors.unknownError")),A();return}t("/reinitialize",{replace:!0}),A()};L.useEffect(()=>{(async()=>{const se=await Oe.getItem("local:clientUrl");let we=Ga.DEFAULT_CLIENT_URL;se&&se.length>0&&(we=se),z(we),h(!1)})()},[h]),L.useEffect(()=>{const q=Da.isPopup()?null:f.jsx(f.Fragment,{children:f.jsx(pn,{onClick:()=>Da.openInNewPopup(),title:"Open in new window",iconType:Ra.EXPAND})});return o(q),()=>{o(null)}},[o]);const le=async q=>{q.preventDefault(),Y(null);try{d(),r.clearGlobalMessage();const se=await pe.initiateLogin(oo.normalizeUsername(l.username)),we=await Ut.deriveKeyFromPassword(l.password,se.salt,se.encryptionType,se.encryptionSettings),Ce=Wr.Buffer.from(we).toString("hex").toUpperCase(),Be=Wr.Buffer.from(we).toString("base64"),Le=await pe.validateLogin(oo.normalizeUsername(l.username),Ce,y,se);if(Le.requiresTwoFactor){I(se),S(Ce),B(Be),Q(!0),A();return}if(!Le.token)throw new Error(n("common.errors.unknownError"));await X(oo.normalizeUsername(l.username),Le.token.token,Le.token.refreshToken,Be,se)}catch(se){se instanceof xl?Y(n("common.apiErrors."+se.message)):Y(n("auth.errors.serverError")),A()}},ge=async q=>{q.preventDefault(),Y(null);try{if(d(),!k||!U||!N)throw new Error(n("common.errors.unknownError"));const se=V.trim();if(!/^\d{6}$/.test(se))throw new Error(n("auth.errors.invalidCode"));const we=await pe.validateLogin2Fa(oo.normalizeUsername(l.username),k,y,N,parseInt(V));if(!we.token)throw new Error(n("common.errors.unknownError"));await X(oo.normalizeUsername(l.username),we.token.token,we.token.refreshToken,U,N),Q(!1),W(""),S(null),B(null),I(null)}catch(se){console.error("2FA error:",se),se instanceof xl?Y(n("common.apiErrors."+se.message)):Y(n("auth.errors.serverError")),A()}},je=async q=>{d();try{r.clearGlobalMessage();const se=await ce.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${q.token}`}});await r.setAuthTokens(q.username,q.token,q.refreshToken),await i.storeEncryptionKey(q.decryptionKey),await i.storeEncryptionKeyDerivationParams({salt:q.salt,encryptionType:q.encryptionType,encryptionSettings:q.encryptionSettings});const we=await i.initializeDatabase(se,q.decryptionKey);try{if(await we.hasPendingMigrations()){t("/upgrade",{replace:!0}),A(),h(!1);return}}catch(Ce){await r.logout(),Y(Ce instanceof Error?Ce.message:n("common.errors.unknownError")),A();return}A(),h(!1),t("/reinitialize",{replace:!0})}catch(se){throw Y(se instanceof Error?se.message:n("common.errors.unknownError")),A(),se}},P=q=>{const{name:se,value:we}=q.target;c(Ce=>({...Ce,[se]:we}))};return F?f.jsx("div",{children:f.jsxs("form",{onSubmit:ge,className:"bg-white dark:bg-gray-700 w-full shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[G&&f.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:G}),f.jsxs("div",{className:"mb-6",children:[f.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:n("auth.twoFactorTitle")}),f.jsx("label",{className:"block text-gray-700 dark:text-gray-200 text-sm font-bold mb-2",htmlFor:"twoFactorCode",children:n("auth.authCode")}),f.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:q=>W(q.target.value),placeholder:n("auth.authCodePlaceholder"),required:!0})]}),f.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[f.jsx(Ca,{type:"submit",children:n("auth.verify")}),f.jsx(Ca,{type:"button",onClick:()=>{c({username:"",password:""}),Q(!1),W(""),S(null),B(null),I(null),Y(null)},variant:"secondary",children:n("common.cancel")})]}),f.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-4 text-center",children:n("auth.twoFactorNote")})]})}):f.jsx("div",{className:"flex flex-col items-center justify-center p-4",children:f.jsxs("div",{className:"w-full max-w-md",children:[f.jsxs("form",{onSubmit:le,className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[f.jsxs("div",{className:"text-center mb-6",children:[f.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:n("auth.loginTitle")}),f.jsx(YS,{})]}),G&&f.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:G}),f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"username",children:n("auth.username")}),f.jsx("input",{className:"shadow appearance-none border rounded-lg w-full py-2 px-3 text-gray-700 dark:text-gray-200 dark:bg-gray-700 dark:border-gray-600 leading-tight focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",id:"username",type:"text",name:"username",placeholder:n("auth.usernamePlaceholder"),value:l.username,onChange:P,required:!0})]}),f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"password",children:n("auth.password")}),f.jsxs("div",{className:"relative",children:[f.jsx("input",{className:"shadow appearance-none border rounded-lg w-full py-2 px-3 pr-10 text-gray-700 dark:text-gray-200 dark:bg-gray-700 dark:border-gray-600 leading-tight focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",id:"password",type:C?"text":"password",name:"password",placeholder:n("auth.passwordPlaceholder"),value:l.password,onChange:P,required:!0}),f.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:()=>x(!C),tabIndex:-1,children:f.jsx(GA,{type:C?Ra.EYE_OFF:Ra.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),f.jsx("div",{className:"mb-6",children:f.jsxs("label",{className:"flex items-center",children:[f.jsx("input",{type:"checkbox",checked:y,onChange:q=>E(q.target.checked),className:"mr-2"}),f.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-200",children:n("auth.rememberMe")})]})}),f.jsx(Ca,{type:"submit",children:f.jsx("div",{className:"flex items-center justify-center gap-2",children:n("auth.loginButton")})}),f.jsxs("button",{type:"button",onClick:()=>Z(!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:[f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"})}),n("auth.loginWithMobile")]}),f.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[n("auth.noAccount")," ",f.jsx("a",{href:J??"",target:"_blank",rel:"noopener noreferrer",className:"text-orange-500 hover:text-orange-600 dark:text-orange-400 dark:hover:text-orange-500",children:n("auth.createVault")})]})]}),f.jsx(tw,{isOpen:ae,onClose:()=>Z(!1),onSuccess:je,webApi:ce,mode:"login"})]})})},ds=({type:n,message:t,className:r=""})=>{const i=()=>{const o="p-3 border rounded-md text-sm";switch(n){case"error":return`${o} 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`${o} 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`${o} 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`${o} bg-blue-100 dark:bg-blue-900/30 border-blue-300 dark:border-blue-700 text-blue-800 dark:text-blue-300`;default:return o}};return f.jsx("div",{className:`${i()} ${r}`,children:t})},aE=()=>{var r;const{t:n}=ht(),{username:t}=QA();return f.jsxs("div",{className:"flex flex-col items-center mb-6",children:[f.jsx("div",{className:"w-12 h-12 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center mb-3",children:f.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-2xl font-medium",children:((r=t==null?void 0:t[0])==null?void 0:r.toUpperCase())||"?"})}),f.jsx("p",{className:"font-medium text-gray-900 dark:text-white text-base",children:t}),f.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n("auth.loggedIn")})]})},lT=()=>{const{t:n}=ht(),t=Cr(),r=QA(),i=ia(),o=Fa(),{setHeaderButtons:l}=xr(),c=vr(),d=new rw(c),[A,h]=L.useState("password"),[y,E]=L.useState(!1),[C,x]=L.useState(""),[N,I]=L.useState(!1),[k,S]=L.useState(""),[U,B]=L.useState(6),F=L.useRef(null),Q=L.useRef(null),[V,W]=L.useState(null),{showLoading:J,hideLoading:z,setIsInitialLoading:G}=da(),[Y,ae]=L.useState(!1),Z=async()=>{const Ce=await c.getStatus(),Be=c.validateStatusResponse(Ce);return Ce.serverVersion==="0.0.0"?(W(n("common.errors.serverNotAvailable")),!1):Be!==null?(await t.logout(n("common.errors."+Be)),!1):(G(!1),!0)};L.useEffect(()=>{(async()=>{const[Be,Le]=await Promise.all([Lb(),Ck()]);E(Be),B(Le||6),h(Be?"pin":"password"),await Z()})()},[]),L.useEffect(()=>{const Ce=Da.isPopup()?null:f.jsx(pn,{onClick:()=>Da.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Ra.EXPAND});return l(Ce),()=>{l(null)}},[l,n]),L.useEffect(()=>{if(A!=="pin")return;const Ce=()=>{F.current&&F.current.focus()},Be=()=>{Ce()},Le=()=>{Ce()};Ce();const Je=Q.current;return Je&&Je.addEventListener("click",Be),window.addEventListener("focus",Le),()=>{Je&&Je.removeEventListener("click",Be),window.removeEventListener("focus",Le)}},[A]);const ce=async Ce=>{if(Ce.preventDefault(),W(null),J(),!await Z()){z();return}try{const Le=await d.initiateLogin(r.username),Je=await Ut.deriveKeyFromPassword(C,Le.salt,Le.encryptionType,Le.encryptionSettings),Ke=await c.get("Vault"),We=Wr.Buffer.from(Je).toString("base64");if(await i.storeEncryptionKey(We),await(await i.initializeDatabase(Ke,We)).hasPendingMigrations()){o("/upgrade",{replace:!0}),z();return}await Oe.setItem(co,0),await oy(),o("/reinitialize",{replace:!0})}catch(Le){Le instanceof ps?await t.logout(Le.message):W(n("auth.errors.wrongPassword")),console.error("Unlock error:",Le)}finally{z()}},pe=L.useCallback(async Ce=>{S(Ce),W(null),Ce.length===U&&(await new Promise(Be=>setTimeout(Be,50)),await ge(Ce))},[U]),X=Ce=>{k.length<8&&pe(k+Ce)},le=()=>{S(k.slice(0,-1)),W(null)},ge=async(Ce=k)=>{if(Ce.length===U){W(null),J();try{const Be=await Nk(Ce),Le=await c.get("Vault");if(await i.storeEncryptionKey(Be),await(await i.initializeDatabase(Le,Be)).hasPendingMigrations()){o("/upgrade",{replace:!0}),z();return}await Oe.setItem(co,0),o("/reinitialize",{replace:!0}),z()}catch(Be){if(Be instanceof ic)E(!1),h("password"),W(n("settings.unlockMethod.pinLocked"));else if(Be instanceof Bb){const Le=Be.attemptsRemaining;W(Le===1?n("settings.unlockMethod.incorrectPinSingular"):n("settings.unlockMethod.incorrectPin",{attemptsRemaining:Le})),S("")}else Be instanceof Tl?(W(n("settings.unlockMethod.invalidPinFormat")),S("")):(console.error("PIN unlock failed:",Be),W(n("common.errors.unknownErrorTryAgain")),S(""));z()}}},je=()=>{t.logout()},P=async Ce=>{J();try{await c.revokeTokens(),await r.setAuthTokens(Ce.username,Ce.token,Ce.refreshToken);const Be=await c.get("Vault");if(await i.storeEncryptionKey(Ce.decryptionKey),await i.storeEncryptionKeyDerivationParams({salt:Ce.salt,encryptionType:Ce.encryptionType,encryptionSettings:Ce.encryptionSettings}),await(await i.initializeDatabase(Be,Ce.decryptionKey)).hasPendingMigrations()){o("/upgrade",{replace:!0}),z();return}await Oe.setItem(co,0),await oy(),o("/reinitialize",{replace:!0})}catch(Be){Be instanceof ps?await t.logout(Be.message):W(n("common.errors.unknownErrorTryAgain")),console.error("Mobile unlock error:",Be)}finally{z()}},q=()=>{h("password"),W(null)},se=()=>{h("pin"),W(null)},we=Array.from({length:U},(Ce,Be)=>f.jsx("div",{className:`w-4 h-4 rounded-full border-2 transition-all ${Be<k.length?"bg-primary-500 border-primary-500":"bg-transparent border-gray-300 dark:border-gray-600"}`},Be));return A==="pin"?f.jsx("div",{ref:Q,className:"flex flex-col items-center justify-center p-4",children:f.jsxs("div",{className:"w-full max-w-md",children:[f.jsx(aE,{}),f.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[f.jsxs("div",{className:"text-center mb-4",children:[f.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white mb-1",children:n("auth.unlockTitle")}),f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("auth.enterPinToUnlock")})]}),f.jsx("div",{className:"flex justify-center gap-2 mb-4",children:we}),V&&f.jsx(ds,{type:"error",message:V,className:"mb-3 text-center"}),f.jsx("input",{ref:F,type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:k,onChange:Ce=>pe(Ce.target.value.replace(/\D/g,"")),className:"w-0 h-0 opacity-0 absolute",autoFocus:!0,"aria-label":"PIN input"}),f.jsx("div",{children:f.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[[1,2,3,4,5,6,7,8,9].map(Ce=>f.jsx("button",{type:"button",onClick:()=>X(Ce.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:Ce},Ce)),f.jsx("div",{}),f.jsx("button",{type:"button",onClick:()=>X("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"}),f.jsx("button",{type:"button",onClick:le,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:f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.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"})})})]})})]}),f.jsx("div",{className:"mt-4",children:f.jsx("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:f.jsx("button",{type:"button",onClick:q,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:n("auth.useMasterPassword")})})})]})}):f.jsxs("div",{className:"flex flex-col items-center justify-center p-4",children:[f.jsxs("div",{className:"w-full max-w-md",children:[f.jsx(aE,{}),f.jsxs("form",{onSubmit:ce,className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[f.jsx("div",{className:"text-center mb-6",children:f.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:n("auth.unlockTitle")})}),V&&f.jsx(ds,{type:"error",message:V,className:"mb-4 text-center"}),f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"password",children:n("auth.masterPassword")}),f.jsxs("div",{className:"relative",children:[f.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:N?"text":"password",value:C,onChange:Ce=>x(Ce.target.value),placeholder:n("auth.passwordPlaceholder"),required:!0,autoFocus:!0}),f.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(!N),tabIndex:-1,children:f.jsx(GA,{type:N?Ra.EYE_OFF:Ra.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),f.jsx(Ca,{type:"submit",children:n("auth.unlockVault")}),f.jsxs("button",{type:"button",onClick:()=>ae(!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:[f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"})}),n("auth.unlockWithMobile")]}),f.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[n("auth.switchAccounts")," ",f.jsx("button",{type:"button",onClick:je,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:n("auth.logout")})]})]})]}),y&&f.jsx("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:f.jsx("button",{type:"button",onClick:se,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:n("auth.unlockWithPin")})}),f.jsx(tw,{isOpen:Y,onClose:()=>ae(!1),onSuccess:P,webApi:c,mode:"unlock"})]})},uT=()=>{const n=Fa(),{t}=ht(),r=()=>{const i=new URL(window.location.href);i.searchParams.delete("mode"),window.history.replaceState({},"",i),n("/credentials")};return f.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center",children:[f.jsx("div",{className:"mb-4 text-green-600 dark:text-green-400",children:f.jsx("svg",{className:"w-12 h-12 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.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"})})}),f.jsx("h2",{className:"text-xl font-semibold mb-4 text-gray-900 dark:text-white",children:t("auth.unlockSuccessTitle")}),f.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-400",children:t("auth.unlockSuccessDescription")}),f.jsxs("div",{className:"space-y-3 w-full",children:[f.jsx("button",{onClick:()=>window.close(),className:"w-full px-4 py-2 text-white bg-primary-600 rounded hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2",children:t("auth.closePopup")}),f.jsx("button",{onClick:r,className:"w-full px-4 py-2 text-gray-700 bg-gray-100 rounded hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600",children:t("auth.browseVault")})]})]})},bc=({isOpen:n,onClose:t,onConfirm:r,title:i,message:o,confirmText:l="",cancelText:c="",variant:d="default"})=>{const{t:A}=ht();if(!n)return null;const h=d==="danger"?"bg-red-600 hover:bg-red-700 focus:ring-red-500":"bg-primary-600 hover:bg-primary-700 focus:ring-primary-500";return f.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[f.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-80 transition-opacity",onClick:t}),f.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:f.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 px-4 pb-4 pt-5 text-left shadow-xl transition-all w-full max-w-lg",children:[f.jsxs("button",{type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-500 focus:outline-none",onClick:t,children:[f.jsx("span",{className:"sr-only",children:A("common.close")}),f.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]}),f.jsxs("div",{className:"sm:flex sm:items-start",children:[d==="danger"&&f.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:f.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:f.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"})})}),f.jsxs("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[f.jsx("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white",children:i}),f.jsx("div",{className:"mt-2",children:f.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:o})})]})]}),f.jsxs("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[l&&f.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 ${h}`,onClick:r,children:l}),c&&f.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:t,children:c})]})]})})]})},Yh=async(n,t,r=!0)=>{if(!r)return n();const i=Date.now(),o=await n(),l=Date.now()-i;return l<t&&await new Promise(c=>setTimeout(c,t-l)),o},Dc=()=>{const{t:n}=ht(),t=Cr(),r=ia(),i=vr();return{syncVault:L.useCallback(async(l={})=>{const{initialSync:c=!1,onSuccess:d,onError:A,onStatus:h,_onOffline:y,onUpgradeRequired:E}=l,C=c;try{if(!await t.initializeAuth())return!1;h==null||h(n("common.checkingVaultUpdates"));const N=await Yh(()=>i.getStatus(),300,C);if(N.serverVersion==="0.0.0")return A==null||A(n("common.errors.serverNotAvailable")),!1;const I=i.validateStatusResponse(N);if(I)return A==null||A(n("common.errors."+I)),!1;const k=await Rt("GET_ENCRYPTION_KEY_DERIVATION_PARAMS",{},"background");if(k&&N.srpSalt&&N.srpSalt!==k.salt)return await t.logout(n("common.errors.passwordChanged")),!1;const S=await r.getVaultMetadata(),U=(S==null?void 0:S.vaultRevisionNumber)??0;if(N.vaultRevision>U){h==null||h(n("common.syncingUpdatedVault"));const B=await Yh(()=>i.get("Vault"),1e3,C);try{const F=await Rt("GET_ENCRYPTION_KEY",{},"background");return await(await r.initializeDatabase(B,F)).hasPendingMigrations()?(E==null||E(),!1):(d==null||d(!0),!0)}catch(F){if(F instanceof ps)return await t.logout(F.message),!1;throw new Error("Vault could not be decrypted, if the problem persists please logout and login again.")}}return await r.hasPendingMigrations()?(E==null||E(),!1):(await Yh(()=>Promise.resolve(d==null?void 0:d(!1)),300,C),!1)}catch(x){const N=x instanceof Error?x.message:"Unknown error during vault sync";return console.error("Vault sync error:",x),x instanceof ps?(await t.logout(N),!1):(A==null||A(N),!1)}},[t,r,i,n])}};function qA(){const{t:n}=ht(),[t,r]=L.useState(!1),[i,o]=L.useState(n("common.syncingVault")),l=ia(),{syncVault:c}=Dc(),d=L.useCallback(async(h,y)=>{var k;o(n("common.savingChangesToVault")),await h(),o(n("common.uploadingVaultToServer"));const E=l.sqliteClient.exportToBase64(),C=await Rt("GET_ENCRYPTION_KEY",{},"background"),N={vaultBlob:await Ut.symmetricEncrypt(E,C)},I=await Rt("UPLOAD_VAULT",N,"background");if(I.status===0&&I.newRevisionNumber)await l.setCurrentVaultRevisionNumber(I.newRevisionNumber),(k=y.onSuccess)==null||k.call(y);else throw I.status===1?new Error("Vault merge required. Please login via the web app to merge the multiple pending updates to your vault."):I.status===2?new Error(n("common.errors.unknownError")):new Error(n("common.errors.unknownError"))},[l,n]);return{executeVaultMutation:L.useCallback(async(h,y={})=>{var E;try{if(r(!0),o(n("common.checkingVaultUpdates")),y.skipSyncCheck){o(n("common.executingOperation")),await d(h,y);return}await c({onStatus:C=>o(C),onSuccess:async C=>{await d(h,y)},onError:C=>{var x;(x=y.onError)==null||x.call(y,new Error(C))}})}catch(C){console.error("Error during vault mutation:",C),(E=y.onError)==null||E.call(y,C instanceof Error?C:new Error(n("common.errors.unknownError")))}finally{r(!1),o("")}},[c,d,n]),isLoading:t,syncStatus:i}}const cT=()=>{var pe;const{t:n}=ht(),{username:t,logout:r}=Cr(),i=ia(),{sqliteClient:o}=i,{setHeaderButtons:l}=xr(),[c,d]=L.useState(!1),[A,h]=L.useState(null),[y,E]=L.useState(null),[C,x]=L.useState(null),[N,I]=L.useState(!1),[k,S]=L.useState(!1),{setIsInitialLoading:U}=da(),B=vr(),{executeVaultMutation:F,isLoading:Q,syncStatus:V}=qA(),{syncVault:W}=Dc(),J=Fa();L.useEffect(()=>{const X=Da.isPopup()?null:f.jsx(f.Fragment,{children:f.jsx(pn,{onClick:()=>Da.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Ra.EXPAND})});return l(X),()=>{l(null)}},[l,n]);const z=L.useCallback(async()=>{try{if(o){const X=await o.getDatabaseVersion(),le=await o.getLatestDatabaseVersion();h(X),E(le)}U(!1)}catch(X){console.error("Failed to load version information:",X),x(n("upgrade.alerts.unableToGetVersionInfo"))}},[o,U,n]);L.useEffect(()=>{z()},[z]);const G=async()=>{if(!o||!A||!y){x(n("upgrade.alerts.unableToGetVersionInfo"));return}if(await B.isSelfHosted()){I(!0);return}await Y()},Y=async()=>{if(!o||!A||!y){x(n("upgrade.alerts.unableToGetVersionInfo"));return}d(!0),x(null);try{const le=new uA().getUpgradeVaultSql(A.revision,y.revision);if(!le.success)throw new Error(le.error??n("upgrade.alerts.upgradeFailed"));if(le.sqlCommands.length===0){await ae();return}await F(async()=>{o.beginTransaction();for(let ge=0;ge<le.sqlCommands.length;ge++){const je=le.sqlCommands[ge];try{o.executeRaw(je)}catch(P){throw console.error(`Error executing SQL command ${ge+1}:`,je,P),o.rollbackTransaction(),new Error(n("upgrade.alerts.failedToApplyMigration",{current:ge+1,total:le.sqlCommands.length}))}}o.commitTransaction()},{skipSyncCheck:!0,onSuccess:()=>{ae()},onError:ge=>{console.error("Upgrade failed:",ge),x(ge.message)}}),console.debug("executeVaultMutation done?")}catch(X){console.error("Upgrade failed:",X),x(X instanceof Error?X.message:n("common.errors.unknownError"))}finally{d(!1)}},ae=async()=>{try{await W({onSuccess:()=>{J("/credentials")},onError:X=>{console.error("Sync error after upgrade:",X),J("/credentials")}})}catch(X){console.error("Error during post-upgrade sync:",X),J("/credentials")}},Z=async()=>{r()},ce=()=>{S(!0)};return f.jsxs("div",{children:[(c||Q)&&f.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:[f.jsx($r,{}),f.jsx("div",{className:"text-sm text-gray-500 mt-2",children:V||n("upgrade.upgrading")})]}),f.jsx(bc,{isOpen:N,onClose:()=>I(!1),onConfirm:()=>{I(!1),Y()},title:n("upgrade.alerts.selfHostedServer"),message:n("upgrade.alerts.selfHostedWarning"),confirmText:n("upgrade.alerts.continueUpgrade"),cancelText:n("common.cancel")}),f.jsx(bc,{isOpen:k,onClose:()=>S(!1),onConfirm:()=>S(!1),title:n("upgrade.whatsNew"),message:`${n("upgrade.whatsNewDescription")}

${(y==null?void 0:y.description)??n("upgrade.noDescriptionAvailable")}`}),f.jsxs("form",{className:"w-full px-2 pt-2 pb-2 mb-4",children:[C&&f.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400",children:C}),f.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[f.jsx("div",{className:"flex-shrink-0",children:f.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:f.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((pe=t==null?void 0:t[0])==null?void 0:pe.toUpperCase())||"?"})})}),f.jsx("div",{children:f.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t})})]}),f.jsx("h2",{className:"text-xl font-bold dark:text-gray-200 mb-4",children:n("upgrade.title")}),f.jsxs("div",{className:"mb-6",children:[f.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:n("upgrade.subtitle")}),f.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded p-4 mb-4",children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("span",{className:"font-medium text-gray-700 dark:text-gray-200",children:n("upgrade.versionInformation")}),f.jsx("button",{type:"button",onClick:ce,className:"bg-gray-200 dark:bg-gray-600 text-gray-800 dark:text-gray-200 rounded-full w-6 h-6 flex items-center justify-center text-sm font-bold hover:bg-gray-300 dark:hover:bg-gray-500",title:n("upgrade.whatsNew"),children:"?"})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("upgrade.yourVault")}),f.jsx("span",{className:"text-sm font-bold text-orange-600 dark:text-orange-400",children:(A==null?void 0:A.compatibleUpToVersion)??"..."})]}),f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("upgrade.newVersion")}),f.jsx("span",{className:"text-sm font-bold text-green-600 dark:text-green-400",children:(y==null?void 0:y.releaseVersion)??"..."})]})]})]})]}),f.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[f.jsx(Ca,{type:"button",id:"upgrade-button",onClick:G,children:c||Q?V||n("upgrade.upgrading"):n("upgrade.upgrade")}),f.jsx("button",{type:"button",onClick:Z,className:"text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 text-sm font-medium py-2",disabled:c||Q,children:n("upgrade.logout")})]})]})]})};var Ul=n=>n.type==="checkbox",hs=n=>n instanceof Date,rn=n=>n==null;const iw=n=>typeof n=="object";var ya=n=>!rn(n)&&!Array.isArray(n)&&iw(n)&&!hs(n),dT=n=>ya(n)&&n.target?Ul(n.target)?n.target.checked:n.target.value:n,fT=n=>n.substring(0,n.search(/\.\d+(\.|$)/))||n,hT=(n,t)=>n.has(fT(t)),AT=n=>{const t=n.constructor&&n.constructor.prototype;return ya(t)&&t.hasOwnProperty("isPrototypeOf")},YA=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Xa(n){let t;const r=Array.isArray(n),i=typeof FileList<"u"?n instanceof FileList:!1;if(n instanceof Date)t=new Date(n);else if(n instanceof Set)t=new Set(n);else if(!(YA&&(n instanceof Blob||i))&&(r||ya(n)))if(t=r?[]:{},!r&&!AT(n))t=n;else for(const o in n)n.hasOwnProperty(o)&&(t[o]=Xa(n[o]));else return n;return t}var Rc=n=>Array.isArray(n)?n.filter(Boolean):[],va=n=>n===void 0,at=(n,t,r)=>{if(!t||!ya(n))return r;const i=Rc(t.split(/[,[\].]+?/)).reduce((o,l)=>rn(o)?o:o[l],n);return va(i)||i===n?va(n[t])?r:n[t]:i},pr=n=>typeof n=="boolean",JA=n=>/^\w*$/.test(n),sw=n=>Rc(n.replace(/["|']|\]/g,"").split(/\.|\[/)),Ht=(n,t,r)=>{let i=-1;const o=JA(t)?[t]:sw(t),l=o.length,c=l-1;for(;++i<l;){const d=o[i];let A=r;if(i!==c){const h=n[d];A=ya(h)||Array.isArray(h)?h:isNaN(+o[i+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;n[d]=A,n=n[d]}};const nE={BLUR:"blur",FOCUS_OUT:"focusout"},Zn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Gr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};gn.createContext(null);var gT=(n,t,r,i=!0)=>{const o={defaultValues:t._defaultValues};for(const l in n)Object.defineProperty(o,l,{get:()=>{const c=l;return t._proxyFormState[c]!==Zn.all&&(t._proxyFormState[c]=!i||Zn.all),n[c]}});return o};const mT=typeof window<"u"?L.useLayoutEffect:L.useEffect;var Er=n=>typeof n=="string",pT=(n,t,r,i,o)=>Er(n)?(i&&t.watch.add(n),at(r,n,o)):Array.isArray(n)?n.map(l=>(i&&t.watch.add(l),at(r,l))):(i&&(t.watchAll=!0),r),ow=(n,t,r,i,o)=>t?{...r[n],types:{...r[n]&&r[n].types?r[n].types:{},[i]:o||!0}}:{},Nl=n=>Array.isArray(n)?n:[n],rE=()=>{let n=[];return{get observers(){return n},next:o=>{for(const l of n)l.next&&l.next(o)},subscribe:o=>(n.push(o),{unsubscribe:()=>{n=n.filter(l=>l!==o)}}),unsubscribe:()=>{n=[]}}},gA=n=>rn(n)||!iw(n);function Oi(n,t){if(gA(n)||gA(t))return n===t;if(hs(n)&&hs(t))return n.getTime()===t.getTime();const r=Object.keys(n),i=Object.keys(t);if(r.length!==i.length)return!1;for(const o of r){const l=n[o];if(!i.includes(o))return!1;if(o!=="ref"){const c=t[o];if(hs(l)&&hs(c)||ya(l)&&ya(c)||Array.isArray(l)&&Array.isArray(c)?!Oi(l,c):l!==c)return!1}}return!0}var mn=n=>ya(n)&&!Object.keys(n).length,WA=n=>n.type==="file",er=n=>typeof n=="function",wc=n=>{if(!YA)return!1;const t=n?n.ownerDocument:0;return n instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},lw=n=>n.type==="select-multiple",XA=n=>n.type==="radio",yT=n=>XA(n)||Ul(n),Jh=n=>wc(n)&&n.isConnected;function ET(n,t){const r=t.slice(0,-1).length;let i=0;for(;i<r;)n=va(n)?i++:n[t[i++]];return n}function bT(n){for(const t in n)if(n.hasOwnProperty(t)&&!va(n[t]))return!1;return!0}function Ba(n,t){const r=Array.isArray(t)?t:JA(t)?[t]:sw(t),i=r.length===1?n:ET(n,r),o=r.length-1,l=r[o];return i&&delete i[l],o!==0&&(ya(i)&&mn(i)||Array.isArray(i)&&bT(i))&&Ba(n,r.slice(0,-1)),n}var uw=n=>{for(const t in n)if(er(n[t]))return!0;return!1};function vc(n,t={}){const r=Array.isArray(n);if(ya(n)||r)for(const i in n)Array.isArray(n[i])||ya(n[i])&&!uw(n[i])?(t[i]=Array.isArray(n[i])?[]:{},vc(n[i],t[i])):rn(n[i])||(t[i]=!0);return t}function cw(n,t,r){const i=Array.isArray(n);if(ya(n)||i)for(const o in n)Array.isArray(n[o])||ya(n[o])&&!uw(n[o])?va(t)||gA(r[o])?r[o]=Array.isArray(n[o])?vc(n[o],[]):{...vc(n[o])}:cw(n[o],rn(t)?{}:t[o],r[o]):r[o]=!Oi(n[o],t[o]);return r}var gl=(n,t)=>cw(n,t,vc(t));const iE={value:!1,isValid:!1},sE={value:!0,isValid:!0};var dw=n=>{if(Array.isArray(n)){if(n.length>1){const t=n.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return n[0].checked&&!n[0].disabled?n[0].attributes&&!va(n[0].attributes.value)?va(n[0].value)||n[0].value===""?sE:{value:n[0].value,isValid:!0}:sE:iE}return iE},fw=(n,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>va(n)?n:t?n===""?NaN:n&&+n:r&&Er(n)?new Date(n):i?i(n):n;const oE={isValid:!1,value:null};var hw=n=>Array.isArray(n)?n.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,oE):oE;function lE(n){const t=n.ref;return WA(t)?t.files:XA(t)?hw(n.refs).value:lw(t)?[...t.selectedOptions].map(({value:r})=>r):Ul(t)?dw(n.refs).value:fw(va(t.value)?n.ref.value:t.value,n)}var wT=(n,t,r,i)=>{const o={};for(const l of n){const c=at(t,l);c&&Ht(o,l,c._f)}return{criteriaMode:r,names:[...n],fields:o,shouldUseNativeValidation:i}},Cc=n=>n instanceof RegExp,ml=n=>va(n)?n:Cc(n)?n.source:ya(n)?Cc(n.value)?n.value.source:n.value:n,uE=n=>({isOnSubmit:!n||n===Zn.onSubmit,isOnBlur:n===Zn.onBlur,isOnChange:n===Zn.onChange,isOnAll:n===Zn.all,isOnTouch:n===Zn.onTouched});const cE="AsyncFunction";var vT=n=>!!n&&!!n.validate&&!!(er(n.validate)&&n.validate.constructor.name===cE||ya(n.validate)&&Object.values(n.validate).find(t=>t.constructor.name===cE)),CT=n=>n.mount&&(n.required||n.min||n.max||n.maxLength||n.minLength||n.pattern||n.validate),dE=(n,t,r)=>!r&&(t.watchAll||t.watch.has(n)||[...t.watch].some(i=>n.startsWith(i)&&/^\.\w+/.test(n.slice(i.length))));const Il=(n,t,r,i)=>{for(const o of r||Object.keys(n)){const l=at(n,o);if(l){const{_f:c,...d}=l;if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],o)&&!i)return!0;if(c.ref&&t(c.ref,c.name)&&!i)return!0;if(Il(d,t))break}else if(ya(d)&&Il(d,t))break}}};function fE(n,t,r){const i=at(n,r);if(i||JA(r))return{error:i,name:r};const o=r.split(".");for(;o.length;){const l=o.join("."),c=at(t,l),d=at(n,l);if(c&&!Array.isArray(c)&&r!==l)return{name:r};if(d&&d.type)return{name:l,error:d};if(d&&d.root&&d.root.type)return{name:`${l}.root`,error:d.root};o.pop()}return{name:r}}var xT=(n,t,r,i)=>{r(n);const{name:o,...l}=n;return mn(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(c=>t[c]===(!i||Zn.all))},NT=(n,t,r)=>!n||!t||n===t||Nl(n).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i))),IT=(n,t,r,i,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||n):(r?i.isOnBlur:o.isOnBlur)?!n:(r?i.isOnChange:o.isOnChange)?n:!0,kT=(n,t)=>!Rc(at(n,t)).length&&Ba(n,t),ST=(n,t,r)=>{const i=Nl(at(n,r));return Ht(i,"root",t[r]),Ht(n,r,i),n},uc=n=>Er(n);function hE(n,t,r="validate"){if(uc(n)||Array.isArray(n)&&n.every(uc)||pr(n)&&!n)return{type:r,message:uc(n)?n:"",ref:t}}var ro=n=>ya(n)&&!Cc(n)?n:{value:n,message:""},AE=async(n,t,r,i,o,l)=>{const{ref:c,refs:d,required:A,maxLength:h,minLength:y,min:E,max:C,pattern:x,validate:N,name:I,valueAsNumber:k,mount:S}=n._f,U=at(r,I);if(!S||t.has(I))return{};const B=d?d[0]:c,F=ae=>{o&&B.reportValidity&&(B.setCustomValidity(pr(ae)?"":ae||""),B.reportValidity())},Q={},V=XA(c),W=Ul(c),J=V||W,z=(k||WA(c))&&va(c.value)&&va(U)||wc(c)&&c.value===""||U===""||Array.isArray(U)&&!U.length,G=ow.bind(null,I,i,Q),Y=(ae,Z,ce,pe=Gr.maxLength,X=Gr.minLength)=>{const le=ae?Z:ce;Q[I]={type:ae?pe:X,message:le,ref:c,...G(ae?pe:X,le)}};if(l?!Array.isArray(U)||!U.length:A&&(!J&&(z||rn(U))||pr(U)&&!U||W&&!dw(d).isValid||V&&!hw(d).isValid)){const{value:ae,message:Z}=uc(A)?{value:!!A,message:A}:ro(A);if(ae&&(Q[I]={type:Gr.required,message:Z,ref:B,...G(Gr.required,Z)},!i))return F(Z),Q}if(!z&&(!rn(E)||!rn(C))){let ae,Z;const ce=ro(C),pe=ro(E);if(!rn(U)&&!isNaN(U)){const X=c.valueAsNumber||U&&+U;rn(ce.value)||(ae=X>ce.value),rn(pe.value)||(Z=X<pe.value)}else{const X=c.valueAsDate||new Date(U),le=P=>new Date(new Date().toDateString()+" "+P),ge=c.type=="time",je=c.type=="week";Er(ce.value)&&U&&(ae=ge?le(U)>le(ce.value):je?U>ce.value:X>new Date(ce.value)),Er(pe.value)&&U&&(Z=ge?le(U)<le(pe.value):je?U<pe.value:X<new Date(pe.value))}if((ae||Z)&&(Y(!!ae,ce.message,pe.message,Gr.max,Gr.min),!i))return F(Q[I].message),Q}if((h||y)&&!z&&(Er(U)||l&&Array.isArray(U))){const ae=ro(h),Z=ro(y),ce=!rn(ae.value)&&U.length>+ae.value,pe=!rn(Z.value)&&U.length<+Z.value;if((ce||pe)&&(Y(ce,ae.message,Z.message),!i))return F(Q[I].message),Q}if(x&&!z&&Er(U)){const{value:ae,message:Z}=ro(x);if(Cc(ae)&&!U.match(ae)&&(Q[I]={type:Gr.pattern,message:Z,ref:c,...G(Gr.pattern,Z)},!i))return F(Z),Q}if(N){if(er(N)){const ae=await N(U,r),Z=hE(ae,B);if(Z&&(Q[I]={...Z,...G(Gr.validate,Z.message)},!i))return F(Z.message),Q}else if(ya(N)){let ae={};for(const Z in N){if(!mn(ae)&&!i)break;const ce=hE(await N[Z](U,r),B,Z);ce&&(ae={...ce,...G(Z,ce.message)},F(ce.message),i&&(Q[I]=ae))}if(!mn(ae)&&(Q[I]={ref:B,...ae},!i))return Q}}return F(!0),Q};const TT={mode:Zn.onSubmit,reValidateMode:Zn.onChange,shouldFocusError:!0};function BT(n={}){let t={...TT,...n},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:er(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const i={};let o=ya(t.defaultValues)||ya(t.values)?Xa(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:Xa(o),c={action:!1,mount:!1,watch:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},A,h=0;const y={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let E={...y};const C={array:rE(),state:rE()},x=t.criteriaMode===Zn.all,N=$=>oe=>{clearTimeout(h),h=setTimeout($,oe)},I=async $=>{if(!t.disabled&&(y.isValid||E.isValid||$)){const oe=t.resolver?mn((await W()).errors):await z(i,!0);oe!==r.isValid&&C.state.next({isValid:oe})}},k=($,oe)=>{!t.disabled&&(y.isValidating||y.validatingFields||E.isValidating||E.validatingFields)&&(($||Array.from(d.mount)).forEach(Ee=>{Ee&&(oe?Ht(r.validatingFields,Ee,oe):Ba(r.validatingFields,Ee))}),C.state.next({validatingFields:r.validatingFields,isValidating:!mn(r.validatingFields)}))},S=($,oe=[],Ee,Fe,_e=!0,Ue=!0)=>{if(Fe&&Ee&&!t.disabled){if(c.action=!0,Ue&&Array.isArray(at(i,$))){const qe=Ee(at(i,$),Fe.argA,Fe.argB);_e&&Ht(i,$,qe)}if(Ue&&Array.isArray(at(r.errors,$))){const qe=Ee(at(r.errors,$),Fe.argA,Fe.argB);_e&&Ht(r.errors,$,qe),kT(r.errors,$)}if((y.touchedFields||E.touchedFields)&&Ue&&Array.isArray(at(r.touchedFields,$))){const qe=Ee(at(r.touchedFields,$),Fe.argA,Fe.argB);_e&&Ht(r.touchedFields,$,qe)}(y.dirtyFields||E.dirtyFields)&&(r.dirtyFields=gl(o,l)),C.state.next({name:$,isDirty:Y($,oe),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ht(l,$,oe)},U=($,oe)=>{Ht(r.errors,$,oe),C.state.next({errors:r.errors})},B=$=>{r.errors=$,C.state.next({errors:r.errors,isValid:!1})},F=($,oe,Ee,Fe)=>{const _e=at(i,$);if(_e){const Ue=at(l,$,va(Ee)?at(o,$):Ee);va(Ue)||Fe&&Fe.defaultChecked||oe?Ht(l,$,oe?Ue:lE(_e._f)):ce($,Ue),c.mount&&I()}},Q=($,oe,Ee,Fe,_e)=>{let Ue=!1,qe=!1;const M={name:$};if(!t.disabled){if(!Ee||Fe){(y.isDirty||E.isDirty)&&(qe=r.isDirty,r.isDirty=M.isDirty=Y(),Ue=qe!==M.isDirty);const w=Oi(at(o,$),oe);qe=!!at(r.dirtyFields,$),w?Ba(r.dirtyFields,$):Ht(r.dirtyFields,$,!0),M.dirtyFields=r.dirtyFields,Ue=Ue||(y.dirtyFields||E.dirtyFields)&&qe!==!w}if(Ee){const w=at(r.touchedFields,$);w||(Ht(r.touchedFields,$,Ee),M.touchedFields=r.touchedFields,Ue=Ue||(y.touchedFields||E.touchedFields)&&w!==Ee)}Ue&&_e&&C.state.next(M)}return Ue?M:{}},V=($,oe,Ee,Fe)=>{const _e=at(r.errors,$),Ue=(y.isValid||E.isValid)&&pr(oe)&&r.isValid!==oe;if(t.delayError&&Ee?(A=N(()=>U($,Ee)),A(t.delayError)):(clearTimeout(h),A=null,Ee?Ht(r.errors,$,Ee):Ba(r.errors,$)),(Ee?!Oi(_e,Ee):_e)||!mn(Fe)||Ue){const qe={...Fe,...Ue&&pr(oe)?{isValid:oe}:{},errors:r.errors,name:$};r={...r,...qe},C.state.next(qe)}},W=async $=>{k($,!0);const oe=await t.resolver(l,t.context,wT($||d.mount,i,t.criteriaMode,t.shouldUseNativeValidation));return k($),oe},J=async $=>{const{errors:oe}=await W($);if($)for(const Ee of $){const Fe=at(oe,Ee);Fe?Ht(r.errors,Ee,Fe):Ba(r.errors,Ee)}else r.errors=oe;return oe},z=async($,oe,Ee={valid:!0})=>{for(const Fe in $){const _e=$[Fe];if(_e){const{_f:Ue,...qe}=_e;if(Ue){const M=d.array.has(Ue.name),w=_e._f&&vT(_e._f);w&&y.validatingFields&&k([Fe],!0);const v=await AE(_e,d.disabled,l,x,t.shouldUseNativeValidation&&!oe,M);if(w&&y.validatingFields&&k([Fe]),v[Ue.name]&&(Ee.valid=!1,oe))break;!oe&&(at(v,Ue.name)?M?ST(r.errors,v,Ue.name):Ht(r.errors,Ue.name,v[Ue.name]):Ba(r.errors,Ue.name))}!mn(qe)&&await z(qe,oe,Ee)}}return Ee.valid},G=()=>{for(const $ of d.unMount){const oe=at(i,$);oe&&(oe._f.refs?oe._f.refs.every(Ee=>!Jh(Ee)):!Jh(oe._f.ref))&&Je($)}d.unMount=new Set},Y=($,oe)=>!t.disabled&&($&&oe&&Ht(l,$,oe),!Oi(P(),o)),ae=($,oe,Ee)=>pT($,d,{...c.mount?l:va(oe)?o:Er($)?{[$]:oe}:oe},Ee,oe),Z=$=>Rc(at(c.mount?l:o,$,t.shouldUnregister?at(o,$,[]):[])),ce=($,oe,Ee={})=>{const Fe=at(i,$);let _e=oe;if(Fe){const Ue=Fe._f;Ue&&(!Ue.disabled&&Ht(l,$,fw(oe,Ue)),_e=wc(Ue.ref)&&rn(oe)?"":oe,lw(Ue.ref)?[...Ue.ref.options].forEach(qe=>qe.selected=_e.includes(qe.value)):Ue.refs?Ul(Ue.ref)?Ue.refs.forEach(qe=>{(!qe.defaultChecked||!qe.disabled)&&(Array.isArray(_e)?qe.checked=!!_e.find(M=>M===qe.value):qe.checked=_e===qe.value||!!_e)}):Ue.refs.forEach(qe=>qe.checked=qe.value===_e):WA(Ue.ref)?Ue.ref.value="":(Ue.ref.value=_e,Ue.ref.type||C.state.next({name:$,values:Xa(l)})))}(Ee.shouldDirty||Ee.shouldTouch)&&Q($,_e,Ee.shouldTouch,Ee.shouldDirty,!0),Ee.shouldValidate&&je($)},pe=($,oe,Ee)=>{for(const Fe in oe){if(!oe.hasOwnProperty(Fe))return;const _e=oe[Fe],Ue=$+"."+Fe,qe=at(i,Ue);(d.array.has($)||ya(_e)||qe&&!qe._f)&&!hs(_e)?pe(Ue,_e,Ee):ce(Ue,_e,Ee)}},X=($,oe,Ee={})=>{const Fe=at(i,$),_e=d.array.has($),Ue=Xa(oe);Ht(l,$,Ue),_e?(C.array.next({name:$,values:Xa(l)}),(y.isDirty||y.dirtyFields||E.isDirty||E.dirtyFields)&&Ee.shouldDirty&&C.state.next({name:$,dirtyFields:gl(o,l),isDirty:Y($,Ue)})):Fe&&!Fe._f&&!rn(Ue)?pe($,Ue,Ee):ce($,Ue,Ee),dE($,d)&&C.state.next({...r}),C.state.next({name:c.mount?$:void 0,values:Xa(l)})},le=async $=>{c.mount=!0;const oe=$.target;let Ee=oe.name,Fe=!0;const _e=at(i,Ee),Ue=w=>{Fe=Number.isNaN(w)||hs(w)&&isNaN(w.getTime())||Oi(w,at(l,Ee,w))},qe=uE(t.mode),M=uE(t.reValidateMode);if(_e){let w,v;const K=oe.type?lE(_e._f):dT($),ne=$.type===nE.BLUR||$.type===nE.FOCUS_OUT,me=!CT(_e._f)&&!t.resolver&&!at(r.errors,Ee)&&!_e._f.deps||IT(ne,at(r.touchedFields,Ee),r.isSubmitted,M,qe),xe=dE(Ee,d,ne);Ht(l,Ee,K),ne?(_e._f.onBlur&&_e._f.onBlur($),A&&A(0)):_e._f.onChange&&_e._f.onChange($);const Pe=Q(Ee,K,ne),Ie=!mn(Pe)||xe;if(!ne&&C.state.next({name:Ee,type:$.type,values:Xa(l)}),me)return(y.isValid||E.isValid)&&(t.mode==="onBlur"?ne&&I():ne||I()),Ie&&C.state.next({name:Ee,...xe?{}:Pe});if(!ne&&xe&&C.state.next({...r}),t.resolver){const{errors:Ye}=await W([Ee]);if(Ue(K),Fe){const nt=fE(r.errors,i,Ee),Xe=fE(Ye,i,nt.name||Ee);w=Xe.error,Ee=Xe.name,v=mn(Ye)}}else k([Ee],!0),w=(await AE(_e,d.disabled,l,x,t.shouldUseNativeValidation))[Ee],k([Ee]),Ue(K),Fe&&(w?v=!1:(y.isValid||E.isValid)&&(v=await z(i,!0)));Fe&&(_e._f.deps&&je(_e._f.deps),V(Ee,v,w,Pe))}},ge=($,oe)=>{if(at(r.errors,oe)&&$.focus)return $.focus(),1},je=async($,oe={})=>{let Ee,Fe;const _e=Nl($);if(t.resolver){const Ue=await J(va($)?$:_e);Ee=mn(Ue),Fe=$?!_e.some(qe=>at(Ue,qe)):Ee}else $?(Fe=(await Promise.all(_e.map(async Ue=>{const qe=at(i,Ue);return await z(qe&&qe._f?{[Ue]:qe}:qe)}))).every(Boolean),!(!Fe&&!r.isValid)&&I()):Fe=Ee=await z(i);return C.state.next({...!Er($)||(y.isValid||E.isValid)&&Ee!==r.isValid?{}:{name:$},...t.resolver||!$?{isValid:Ee}:{},errors:r.errors}),oe.shouldFocus&&!Fe&&Il(i,ge,$?_e:d.mount),Fe},P=$=>{const oe={...c.mount?l:o};return va($)?oe:Er($)?at(oe,$):$.map(Ee=>at(oe,Ee))},q=($,oe)=>({invalid:!!at((oe||r).errors,$),isDirty:!!at((oe||r).dirtyFields,$),error:at((oe||r).errors,$),isValidating:!!at(r.validatingFields,$),isTouched:!!at((oe||r).touchedFields,$)}),se=$=>{$&&Nl($).forEach(oe=>Ba(r.errors,oe)),C.state.next({errors:$?r.errors:{}})},we=($,oe,Ee)=>{const Fe=(at(i,$,{_f:{}})._f||{}).ref,_e=at(r.errors,$)||{},{ref:Ue,message:qe,type:M,...w}=_e;Ht(r.errors,$,{...w,...oe,ref:Fe}),C.state.next({name:$,errors:r.errors,isValid:!1}),Ee&&Ee.shouldFocus&&Fe&&Fe.focus&&Fe.focus()},Ce=($,oe)=>er($)?C.state.subscribe({next:Ee=>$(ae(void 0,oe),Ee)}):ae($,oe,!0),Be=$=>C.state.subscribe({next:oe=>{NT($.name,oe.name,$.exact)&&xT(oe,$.formState||y,He,$.reRenderRoot)&&$.callback({values:{...l},...r,...oe})}}).unsubscribe,Le=$=>(c.mount=!0,E={...E,...$.formState},Be({...$,formState:E})),Je=($,oe={})=>{for(const Ee of $?Nl($):d.mount)d.mount.delete(Ee),d.array.delete(Ee),oe.keepValue||(Ba(i,Ee),Ba(l,Ee)),!oe.keepError&&Ba(r.errors,Ee),!oe.keepDirty&&Ba(r.dirtyFields,Ee),!oe.keepTouched&&Ba(r.touchedFields,Ee),!oe.keepIsValidating&&Ba(r.validatingFields,Ee),!t.shouldUnregister&&!oe.keepDefaultValue&&Ba(o,Ee);C.state.next({values:Xa(l)}),C.state.next({...r,...oe.keepDirty?{isDirty:Y()}:{}}),!oe.keepIsValid&&I()},Ke=({disabled:$,name:oe})=>{(pr($)&&c.mount||$||d.disabled.has(oe))&&($?d.disabled.add(oe):d.disabled.delete(oe))},We=($,oe={})=>{let Ee=at(i,$);const Fe=pr(oe.disabled)||pr(t.disabled);return Ht(i,$,{...Ee||{},_f:{...Ee&&Ee._f?Ee._f:{ref:{name:$}},name:$,mount:!0,...oe}}),d.mount.add($),Ee?Ke({disabled:pr(oe.disabled)?oe.disabled:t.disabled,name:$}):F($,!0,oe.value),{...Fe?{disabled:oe.disabled||t.disabled}:{},...t.progressive?{required:!!oe.required,min:ml(oe.min),max:ml(oe.max),minLength:ml(oe.minLength),maxLength:ml(oe.maxLength),pattern:ml(oe.pattern)}:{},name:$,onChange:le,onBlur:le,ref:_e=>{if(_e){We($,oe),Ee=at(i,$);const Ue=va(_e.value)&&_e.querySelectorAll&&_e.querySelectorAll("input,select,textarea")[0]||_e,qe=yT(Ue),M=Ee._f.refs||[];if(qe?M.find(w=>w===Ue):Ue===Ee._f.ref)return;Ht(i,$,{_f:{...Ee._f,...qe?{refs:[...M.filter(Jh),Ue,...Array.isArray(at(o,$))?[{}]:[]],ref:{type:Ue.type,name:$}}:{ref:Ue}}}),F($,!1,void 0,Ue)}else Ee=at(i,$,{}),Ee._f&&(Ee._f.mount=!1),(t.shouldUnregister||oe.shouldUnregister)&&!(hT(d.array,$)&&c.action)&&d.unMount.add($)}}},dt=()=>t.shouldFocusError&&Il(i,ge,d.mount),fa=$=>{pr($)&&(C.state.next({disabled:$}),Il(i,(oe,Ee)=>{const Fe=at(i,Ee);Fe&&(oe.disabled=Fe._f.disabled||$,Array.isArray(Fe._f.refs)&&Fe._f.refs.forEach(_e=>{_e.disabled=Fe._f.disabled||$}))},0,!1))},kt=($,oe)=>async Ee=>{let Fe;Ee&&(Ee.preventDefault&&Ee.preventDefault(),Ee.persist&&Ee.persist());let _e=Xa(l);if(C.state.next({isSubmitting:!0}),t.resolver){const{errors:Ue,values:qe}=await W();r.errors=Ue,_e=qe}else await z(i);if(d.disabled.size)for(const Ue of d.disabled)Ht(_e,Ue,void 0);if(Ba(r.errors,"root"),mn(r.errors)){C.state.next({errors:{}});try{await $(_e,Ee)}catch(Ue){Fe=Ue}}else oe&&await oe({...r.errors},Ee),dt(),setTimeout(dt);if(C.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:mn(r.errors)&&!Fe,submitCount:r.submitCount+1,errors:r.errors}),Fe)throw Fe},mt=($,oe={})=>{at(i,$)&&(va(oe.defaultValue)?X($,Xa(at(o,$))):(X($,oe.defaultValue),Ht(o,$,Xa(oe.defaultValue))),oe.keepTouched||Ba(r.touchedFields,$),oe.keepDirty||(Ba(r.dirtyFields,$),r.isDirty=oe.defaultValue?Y($,Xa(at(o,$))):Y()),oe.keepError||(Ba(r.errors,$),y.isValid&&I()),C.state.next({...r}))},wt=($,oe={})=>{const Ee=$?Xa($):o,Fe=Xa(Ee),_e=mn($),Ue=_e?o:Fe;if(oe.keepDefaultValues||(o=Ee),!oe.keepValues){if(oe.keepDirtyValues){const qe=new Set([...d.mount,...Object.keys(gl(o,l))]);for(const M of Array.from(qe))at(r.dirtyFields,M)?Ht(Ue,M,at(l,M)):X(M,at(Ue,M))}else{if(YA&&va($))for(const qe of d.mount){const M=at(i,qe);if(M&&M._f){const w=Array.isArray(M._f.refs)?M._f.refs[0]:M._f.ref;if(wc(w)){const v=w.closest("form");if(v){v.reset();break}}}}for(const qe of d.mount)X(qe,at(Ue,qe))}l=Xa(Ue),C.array.next({values:{...Ue}}),C.state.next({values:{...Ue}})}d={mount:oe.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!y.isValid||!!oe.keepIsValid||!!oe.keepDirtyValues,c.watch=!!t.shouldUnregister,C.state.next({submitCount:oe.keepSubmitCount?r.submitCount:0,isDirty:_e?!1:oe.keepDirty?r.isDirty:!!(oe.keepDefaultValues&&!Oi($,o)),isSubmitted:oe.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:_e?{}:oe.keepDirtyValues?oe.keepDefaultValues&&l?gl(o,l):r.dirtyFields:oe.keepDefaultValues&&$?gl(o,$):oe.keepDirty?r.dirtyFields:{},touchedFields:oe.keepTouched?r.touchedFields:{},errors:oe.keepErrors?r.errors:{},isSubmitSuccessful:oe.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Gt=($,oe)=>wt(er($)?$(l):$,oe),ke=($,oe={})=>{const Ee=at(i,$),Fe=Ee&&Ee._f;if(Fe){const _e=Fe.refs?Fe.refs[0]:Fe.ref;_e.focus&&(_e.focus(),oe.shouldSelect&&er(_e.select)&&_e.select())}},He=$=>{r={...r,...$}},pt={control:{register:We,unregister:Je,getFieldState:q,handleSubmit:kt,setError:we,_subscribe:Be,_runSchema:W,_focusError:dt,_getWatch:ae,_getDirty:Y,_setValid:I,_setFieldArray:S,_setDisabledField:Ke,_setErrors:B,_getFieldArray:Z,_reset:wt,_resetDefaultValues:()=>er(t.defaultValues)&&t.defaultValues().then($=>{Gt($,t.resetOptions),C.state.next({isLoading:!1})}),_removeUnmounted:G,_disableForm:fa,_subjects:C,_proxyFormState:y,get _fields(){return i},get _formValues(){return l},get _state(){return c},set _state($){c=$},get _defaultValues(){return o},get _names(){return d},set _names($){d=$},get _formState(){return r},get _options(){return t},set _options($){t={...t,...$}}},subscribe:Le,trigger:je,register:We,handleSubmit:kt,watch:Ce,setValue:X,getValues:P,reset:Gt,resetField:mt,clearErrors:se,unregister:Je,setError:we,setFocus:ke,getFieldState:q};return{...pt,formControl:pt}}function LT(n={}){const t=gn.useRef(void 0),r=gn.useRef(void 0),[i,o]=gn.useState({isDirty:!1,isValidating:!1,isLoading:er(n.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1,isReady:!1,defaultValues:er(n.defaultValues)?void 0:n.defaultValues});t.current||(t.current={...n.formControl?n.formControl:BT(n),formState:i},n.formControl&&n.defaultValues&&!er(n.defaultValues)&&n.formControl.reset(n.defaultValues,n.resetOptions));const l=t.current.control;return l._options=n,mT(()=>{const c=l._subscribe({formState:l._proxyFormState,callback:()=>o({...l._formState}),reRenderRoot:!0});return o(d=>({...d,isReady:!0})),l._formState.isReady=!0,c},[l]),gn.useEffect(()=>l._disableForm(n.disabled),[l,n.disabled]),gn.useEffect(()=>{n.mode&&(l._options.mode=n.mode),n.reValidateMode&&(l._options.reValidateMode=n.reValidateMode)},[l,n.mode,n.reValidateMode]),gn.useEffect(()=>{n.errors&&(l._setErrors(n.errors),l._focusError())},[l,n.errors]),gn.useEffect(()=>{n.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,n.shouldUnregister]),gn.useEffect(()=>{if(l._proxyFormState.isDirty){const c=l._getDirty();c!==i.isDirty&&l._subjects.state.next({isDirty:c})}},[l,i.isDirty]),gn.useEffect(()=>{n.values&&!Oi(n.values,r.current)?(l._reset(n.values,l._options.resetOptions),r.current=n.values,o(c=>({...c}))):l._resetDefaultValues()},[l,n.values]),gn.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),t.current.formState=gT(i,l),t.current}const gE=(n,t,r)=>{if(n&&"reportValidity"in n){const i=at(r,t);n.setCustomValidity(i&&i.message||""),n.reportValidity()}},Aw=(n,t)=>{for(const r in t.fields){const i=t.fields[r];i&&i.ref&&"reportValidity"in i.ref?gE(i.ref,r,n):i&&i.refs&&i.refs.forEach(o=>gE(o,r,n))}},DT=(n,t)=>{t.shouldUseNativeValidation&&Aw(n,t);const r={};for(const i in n){const o=at(t.fields,i),l=Object.assign(n[i]||{},{ref:o&&o.ref});if(RT(t.names||Object.keys(n),i)){const c=Object.assign({},at(r,i));Ht(c,"root",l),Ht(r,i,c)}else Ht(r,i,l)}return r},RT=(n,t)=>{const r=mE(t);return n.some(i=>mE(i).match(`^${r}\\.\\d+`))};function mE(n){return n.replace(/\]|\[/g,"")}function UT(n,t,r){return r===void 0&&(r={}),function(i,o,l){try{return Promise.resolve(function(c,d){try{var A=(t!=null&&t.context,Promise.resolve(n[r.mode==="sync"?"validateSync":"validate"](i,Object.assign({abortEarly:!1},t,{context:o}))).then(function(h){return l.shouldUseNativeValidation&&Aw({},l),{values:r.raw?Object.assign({},i):h,errors:{}}}))}catch(h){return d(h)}return A&&A.then?A.then(void 0,d):A}(0,function(c){if(!c.inner)throw c;return{values:{},errors:DT((d=c,A=!l.shouldUseNativeValidation&&l.criteriaMode==="all",(d.inner||[]).reduce(function(h,y){if(h[y.path]||(h[y.path]={message:y.message,type:y.type}),A){var E=h[y.path].types,C=E&&E[y.type];h[y.path]=ow(y.path,A,h,y.type,C?[].concat(C,y.message):y.message)}return h},{})),l)};var d,A}))}catch(c){return Promise.reject(c)}}}const MT=({attachments:n,onAttachmentsChange:t})=>{const{t:r}=ht(),[i,o]=L.useState(""),l=async A=>{const h=A.target.files;if(!(!h||h.length===0)){o("Uploading...");try{const y=[...n];for(const E of Array.from(h)){const C=await E.arrayBuffer(),x=new Uint8Array(C),N={Id:crypto.randomUUID(),Filename:E.name,Blob:x,CredentialId:"",CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString(),IsDeleted:!1};y.push(N)}t(y),o("Files uploaded successfully."),setTimeout(()=>o(""),3e3)}catch(y){console.error("Error uploading files:",y),o("Error uploading files."),setTimeout(()=>o(""),3e3)}A.target.value=""}},c=A=>{try{const h=[...n],y=h.findIndex(E=>E.Id===A.Id);y!==-1&&h.splice(y,1),t(h),o("Attachment deleted successfully."),setTimeout(()=>o(""),3e3)}catch(h){console.error("Error deleting attachment:",h),o("Error deleting attachment."),setTimeout(()=>o(""),3e3)}},d=n.filter(A=>!A.IsDeleted);return f.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[f.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:r("common.attachments")}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("input",{type:"file",multiple:!0,onChange:l,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"}),i&&f.jsx("p",{className:"mt-2 text-sm text-gray-500 dark:text-gray-400",children:i})]}),d.length>0&&f.jsxs("div",{children:[f.jsx("h4",{className:"mb-2 text-md font-medium text-gray-900 dark:text-white",children:"Current attachments:"}),f.jsx("div",{className:"space-y-2",children:d.map(A=>f.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:[f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:A.Filename}),f.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(A.CreatedAt).toLocaleDateString()})]}),f.jsx("button",{type:"button",onClick:()=>c(A),className:"text-red-500 hover:text-red-700 focus:outline-none","aria-label":`Delete ${A.Filename}`,children:f.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.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"})})})]},A.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 jT=n=>{const t=new ArrayBuffer(8),r=new Uint8Array(t);let i=n;for(let o=7;o>=0&&i!==0;o--)r[o]=i&255,i-=r[o],i/=256;return r};function xc(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function OT(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function Uc(n,...t){if(!OT(n))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(n.length))throw new Error("Uint8Array expected of length "+t+", got length="+n.length)}function _T(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");xc(n.outputLen),xc(n.blockLen)}function go(n,t=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(t&&n.finished)throw new Error("Hash#digest() has already been called")}function gw(n,t){Uc(n);const r=t.outputLen;if(n.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function PT(n){return new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4))}function Wh(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function Ar(n,t){return n<<32-t|n>>>t}function Xh(n,t){return n<<t|n>>>32-t>>>0}const pE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function FT(n){return n<<24&4278190080|n<<8&16711680|n>>>8&65280|n>>>24&255}function yE(n){for(let t=0;t<n.length;t++)n[t]=FT(n[t])}function QT(n){if(typeof n!="string")throw new Error("utf8ToBytes expected string, got "+typeof n);return new Uint8Array(new TextEncoder().encode(n))}function Mc(n){return typeof n=="string"&&(n=QT(n)),Uc(n),n}class $A{clone(){return this._cloneInto()}}function Eo(n){const t=i=>n().update(Mc(i)).digest(),r=n();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>n(),t}class mw extends $A{update(t){return go(this),this.iHash.update(t),this}digestInto(t){go(this),Uc(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:i,finished:o,destroyed:l,blockLen:c,outputLen:d}=this;return t=t,t.finished=o,t.destroyed=l,t.blockLen=c,t.outputLen=d,t.oHash=r._cloneInto(t.oHash),t.iHash=i._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(t,r){super(),this.finished=!1,this.destroyed=!1,_T(t);const i=Mc(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,l=new Uint8Array(o);l.set(i.length>o?t.create().update(i).digest():i);for(let c=0;c<l.length;c++)l[c]^=54;this.iHash.update(l),this.oHash=t.create();for(let c=0;c<l.length;c++)l[c]^=106;this.oHash.update(l),l.fill(0)}}const mA=(n,t,r)=>new mw(n,t).update(r).digest();mA.create=(n,t)=>new mw(n,t);function HT(n,t,r,i){if(typeof n.setBigUint64=="function")return n.setBigUint64(t,r,i);const o=BigInt(32),l=BigInt(4294967295),c=Number(r>>o&l),d=Number(r&l),A=i?4:0,h=i?0:4;n.setUint32(t+A,c,i),n.setUint32(t+h,d,i)}function pw(n,t,r){return n&t^~n&r}function yw(n,t,r){return n&t^n&r^t&r}class ZA extends $A{update(t){go(this);const{view:r,buffer:i,blockLen:o}=this;t=Mc(t);const l=t.length;for(let c=0;c<l;){const d=Math.min(o-this.pos,l-c);if(d===o){const A=Wh(t);for(;o<=l-c;c+=o)this.process(A,c);continue}i.set(t.subarray(c,c+d),this.pos),this.pos+=d,c+=d,this.pos===o&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){go(this),gw(t,this),this.finished=!0;const{buffer:r,view:i,blockLen:o,isLE:l}=this;let{pos:c}=this;r[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>o-c&&(this.process(i,0),c=0);for(let E=c;E<o;E++)r[E]=0;HT(i,o-8,BigInt(this.length*8),l),this.process(i,0);const d=Wh(t),A=this.outputLen;if(A%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=A/4,y=this.get();if(h>y.length)throw new Error("_sha2: outputLen bigger than state");for(let E=0;E<h;E++)d.setUint32(4*E,y[E],l)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const i=t.slice(0,r);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:i,length:o,finished:l,destroyed:c,pos:d}=this;return t.length=o,t.pos=d,t.finished=l,t.destroyed=c,o%r&&t.buffer.set(i),t}constructor(t,r,i,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=i,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Wh(this.buffer)}}const pl=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),Di=new Uint32Array(80);class zT extends ZA{get(){const{A:t,B:r,C:i,D:o,E:l}=this;return[t,r,i,o,l]}set(t,r,i,o,l){this.A=t|0,this.B=r|0,this.C=i|0,this.D=o|0,this.E=l|0}process(t,r){for(let A=0;A<16;A++,r+=4)Di[A]=t.getUint32(r,!1);for(let A=16;A<80;A++)Di[A]=Xh(Di[A-3]^Di[A-8]^Di[A-14]^Di[A-16],1);let{A:i,B:o,C:l,D:c,E:d}=this;for(let A=0;A<80;A++){let h,y;A<20?(h=pw(o,l,c),y=1518500249):A<40?(h=o^l^c,y=1859775393):A<60?(h=yw(o,l,c),y=2400959708):(h=o^l^c,y=3395469782);const E=Xh(i,5)+h+d+y+Di[A]|0;d=c,c=l,l=Xh(o,30),o=i,i=E}i=i+this.A|0,o=o+this.B|0,l=l+this.C|0,c=c+this.D|0,d=d+this.E|0,this.set(i,o,l,c,d)}roundClean(){Di.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}constructor(){super(64,20,8,!1),this.A=pl[0]|0,this.B=pl[1]|0,this.C=pl[2]|0,this.D=pl[3]|0,this.E=pl[4]|0}}const VT=Eo(()=>new zT),GT=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]),Ri=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ui=new Uint32Array(64);class Ew extends ZA{get(){const{A:t,B:r,C:i,D:o,E:l,F:c,G:d,H:A}=this;return[t,r,i,o,l,c,d,A]}set(t,r,i,o,l,c,d,A){this.A=t|0,this.B=r|0,this.C=i|0,this.D=o|0,this.E=l|0,this.F=c|0,this.G=d|0,this.H=A|0}process(t,r){for(let E=0;E<16;E++,r+=4)Ui[E]=t.getUint32(r,!1);for(let E=16;E<64;E++){const C=Ui[E-15],x=Ui[E-2],N=Ar(C,7)^Ar(C,18)^C>>>3,I=Ar(x,17)^Ar(x,19)^x>>>10;Ui[E]=I+Ui[E-7]+N+Ui[E-16]|0}let{A:i,B:o,C:l,D:c,E:d,F:A,G:h,H:y}=this;for(let E=0;E<64;E++){const C=Ar(d,6)^Ar(d,11)^Ar(d,25),x=y+C+pw(d,A,h)+GT[E]+Ui[E]|0,I=(Ar(i,2)^Ar(i,13)^Ar(i,22))+yw(i,o,l)|0;y=h,h=A,A=d,d=c+x|0,c=l,l=o,o=i,i=x+I|0}i=i+this.A|0,o=o+this.B|0,l=l+this.C|0,c=c+this.D|0,d=d+this.E|0,A=A+this.F|0,h=h+this.G|0,y=y+this.H|0,this.set(i,o,l,c,d,A,h,y)}roundClean(){Ui.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=Ri[0]|0,this.B=Ri[1]|0,this.C=Ri[2]|0,this.D=Ri[3]|0,this.E=Ri[4]|0,this.F=Ri[5]|0,this.G=Ri[6]|0,this.H=Ri[7]|0}}class KT extends Ew{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 qT=Eo(()=>new Ew),YT=Eo(()=>new KT),Wu=BigInt(2**32-1),pA=BigInt(32);function bw(n,t=!1){return t?{h:Number(n&Wu),l:Number(n>>pA&Wu)}:{h:Number(n>>pA&Wu)|0,l:Number(n&Wu)|0}}function ww(n,t=!1){let r=new Uint32Array(n.length),i=new Uint32Array(n.length);for(let o=0;o<n.length;o++){const{h:l,l:c}=bw(n[o],t);[r[o],i[o]]=[l,c]}return[r,i]}const JT=(n,t)=>BigInt(n>>>0)<<pA|BigInt(t>>>0),WT=(n,t,r)=>n>>>r,XT=(n,t,r)=>n<<32-r|t>>>r,$T=(n,t,r)=>n>>>r|t<<32-r,ZT=(n,t,r)=>n<<32-r|t>>>r,e2=(n,t,r)=>n<<64-r|t>>>r-32,t2=(n,t,r)=>n>>>r-32|t<<64-r,a2=(n,t)=>t,n2=(n,t)=>n,vw=(n,t,r)=>n<<r|t>>>32-r,Cw=(n,t,r)=>t<<r|n>>>32-r,xw=(n,t,r)=>t<<r-32|n>>>64-r,Nw=(n,t,r)=>n<<r-32|t>>>64-r;function r2(n,t,r,i){const o=(t>>>0)+(i>>>0);return{h:n+r+(o/2**32|0)|0,l:o|0}}const i2=(n,t,r)=>(n>>>0)+(t>>>0)+(r>>>0),s2=(n,t,r,i)=>t+r+i+(n/2**32|0)|0,o2=(n,t,r,i)=>(n>>>0)+(t>>>0)+(r>>>0)+(i>>>0),l2=(n,t,r,i,o)=>t+r+i+o+(n/2**32|0)|0,u2=(n,t,r,i,o)=>(n>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(o>>>0),c2=(n,t,r,i,o,l)=>t+r+i+o+l+(n/2**32|0)|0,vt={fromBig:bw,split:ww,toBig:JT,shrSH:WT,shrSL:XT,rotrSH:$T,rotrSL:ZT,rotrBH:e2,rotrBL:t2,rotr32H:a2,rotr32L:n2,rotlSH:vw,rotlSL:Cw,rotlBH:xw,rotlBL:Nw,add:r2,add3L:i2,add3H:s2,add4L:o2,add4H:l2,add5H:c2,add5L:u2},[d2,f2]=vt.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(n=>BigInt(n))),Mi=new Uint32Array(80),ji=new Uint32Array(80);class Iw extends ZA{get(){const{Ah:t,Al:r,Bh:i,Bl:o,Ch:l,Cl:c,Dh:d,Dl:A,Eh:h,El:y,Fh:E,Fl:C,Gh:x,Gl:N,Hh:I,Hl:k}=this;return[t,r,i,o,l,c,d,A,h,y,E,C,x,N,I,k]}set(t,r,i,o,l,c,d,A,h,y,E,C,x,N,I,k){this.Ah=t|0,this.Al=r|0,this.Bh=i|0,this.Bl=o|0,this.Ch=l|0,this.Cl=c|0,this.Dh=d|0,this.Dl=A|0,this.Eh=h|0,this.El=y|0,this.Fh=E|0,this.Fl=C|0,this.Gh=x|0,this.Gl=N|0,this.Hh=I|0,this.Hl=k|0}process(t,r){for(let B=0;B<16;B++,r+=4)Mi[B]=t.getUint32(r),ji[B]=t.getUint32(r+=4);for(let B=16;B<80;B++){const F=Mi[B-15]|0,Q=ji[B-15]|0,V=vt.rotrSH(F,Q,1)^vt.rotrSH(F,Q,8)^vt.shrSH(F,Q,7),W=vt.rotrSL(F,Q,1)^vt.rotrSL(F,Q,8)^vt.shrSL(F,Q,7),J=Mi[B-2]|0,z=ji[B-2]|0,G=vt.rotrSH(J,z,19)^vt.rotrBH(J,z,61)^vt.shrSH(J,z,6),Y=vt.rotrSL(J,z,19)^vt.rotrBL(J,z,61)^vt.shrSL(J,z,6),ae=vt.add4L(W,Y,ji[B-7],ji[B-16]),Z=vt.add4H(ae,V,G,Mi[B-7],Mi[B-16]);Mi[B]=Z|0,ji[B]=ae|0}let{Ah:i,Al:o,Bh:l,Bl:c,Ch:d,Cl:A,Dh:h,Dl:y,Eh:E,El:C,Fh:x,Fl:N,Gh:I,Gl:k,Hh:S,Hl:U}=this;for(let B=0;B<80;B++){const F=vt.rotrSH(E,C,14)^vt.rotrSH(E,C,18)^vt.rotrBH(E,C,41),Q=vt.rotrSL(E,C,14)^vt.rotrSL(E,C,18)^vt.rotrBL(E,C,41),V=E&x^~E&I,W=C&N^~C&k,J=vt.add5L(U,Q,W,f2[B],ji[B]),z=vt.add5H(J,S,F,V,d2[B],Mi[B]),G=J|0,Y=vt.rotrSH(i,o,28)^vt.rotrBH(i,o,34)^vt.rotrBH(i,o,39),ae=vt.rotrSL(i,o,28)^vt.rotrBL(i,o,34)^vt.rotrBL(i,o,39),Z=i&l^i&d^l&d,ce=o&c^o&A^c&A;S=I|0,U=k|0,I=x|0,k=N|0,x=E|0,N=C|0,{h:E,l:C}=vt.add(h|0,y|0,z|0,G|0),h=d|0,y=A|0,d=l|0,A=c|0,l=i|0,c=o|0;const pe=vt.add3L(G,ae,ce);i=vt.add3H(pe,z,Y,Z),o=pe|0}({h:i,l:o}=vt.add(this.Ah|0,this.Al|0,i|0,o|0)),{h:l,l:c}=vt.add(this.Bh|0,this.Bl|0,l|0,c|0),{h:d,l:A}=vt.add(this.Ch|0,this.Cl|0,d|0,A|0),{h,l:y}=vt.add(this.Dh|0,this.Dl|0,h|0,y|0),{h:E,l:C}=vt.add(this.Eh|0,this.El|0,E|0,C|0),{h:x,l:N}=vt.add(this.Fh|0,this.Fl|0,x|0,N|0),{h:I,l:k}=vt.add(this.Gh|0,this.Gl|0,I|0,k|0),{h:S,l:U}=vt.add(this.Hh|0,this.Hl|0,S|0,U|0),this.set(i,o,l,c,d,A,h,y,E,C,x,N,I,k,S,U)}roundClean(){Mi.fill(0),ji.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 h2 extends Iw{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 A2=Eo(()=>new Iw),g2=Eo(()=>new h2),kw=[],Sw=[],Tw=[],m2=BigInt(0),yl=BigInt(1),p2=BigInt(2),y2=BigInt(7),E2=BigInt(256),b2=BigInt(113);for(let n=0,t=yl,r=1,i=0;n<24;n++){[r,i]=[i,(2*r+3*i)%5],kw.push(2*(5*i+r)),Sw.push((n+1)*(n+2)/2%64);let o=m2;for(let l=0;l<7;l++)t=(t<<yl^(t>>y2)*b2)%E2,t&p2&&(o^=yl<<(yl<<BigInt(l))-yl);Tw.push(o)}const[w2,v2]=ww(Tw,!0),EE=(n,t,r)=>r>32?xw(n,t,r):vw(n,t,r),bE=(n,t,r)=>r>32?Nw(n,t,r):Cw(n,t,r);function C2(n,t=24){const r=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let c=0;c<10;c++)r[c]=n[c]^n[c+10]^n[c+20]^n[c+30]^n[c+40];for(let c=0;c<10;c+=2){const d=(c+8)%10,A=(c+2)%10,h=r[A],y=r[A+1],E=EE(h,y,1)^r[d],C=bE(h,y,1)^r[d+1];for(let x=0;x<50;x+=10)n[c+x]^=E,n[c+x+1]^=C}let o=n[2],l=n[3];for(let c=0;c<24;c++){const d=Sw[c],A=EE(o,l,d),h=bE(o,l,d),y=kw[c];o=n[y],l=n[y+1],n[y]=A,n[y+1]=h}for(let c=0;c<50;c+=10){for(let d=0;d<10;d++)r[d]=n[c+d];for(let d=0;d<10;d++)n[c+d]^=~r[(d+2)%10]&r[(d+4)%10]}n[0]^=w2[i],n[1]^=v2[i]}r.fill(0)}class eg extends $A{keccak(){pE||yE(this.state32),C2(this.state32,this.rounds),pE||yE(this.state32),this.posOut=0,this.pos=0}update(t){go(this);const{blockLen:r,state:i}=this;t=Mc(t);const o=t.length;for(let l=0;l<o;){const c=Math.min(r-this.pos,o-l);for(let d=0;d<c;d++)i[this.pos++]^=t[l++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:r,pos:i,blockLen:o}=this;t[i]^=r,(r&128)!==0&&i===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){go(this,!1),Uc(t),this.finish();const r=this.state,{blockLen:i}=this;for(let o=0,l=t.length;o<l;){this.posOut>=i&&this.keccak();const c=Math.min(i-this.posOut,l-o);t.set(r.subarray(this.posOut,this.posOut+c),o),this.posOut+=c,o+=c}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return xc(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(gw(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:r,suffix:i,outputLen:o,rounds:l,enableXOF:c}=this;return t||(t=new eg(r,i,o,c,l)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=l,t.suffix=i,t.outputLen=o,t.enableXOF=c,t.destroyed=this.destroyed,t}constructor(t,r,i,o=!1,l=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=i,this.enableXOF=o,this.rounds=l,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,xc(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=PT(this.state)}}const jc=(n,t,r)=>Eo(()=>new eg(t,n,r)),x2=jc(6,144,224/8),N2=jc(6,136,256/8),I2=jc(6,104,384/8),k2=jc(6,72,512/8),mo=(()=>{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})(),wE={SHA1:VT,SHA224:YT,SHA256:qT,SHA384:g2,SHA512:A2,"SHA3-224":x2,"SHA3-256":N2,"SHA3-384":I2,"SHA3-512":k2},tg=n=>{switch(!0){case/^(?:SHA-?1|SSL3-SHA1)$/i.test(n):return"SHA1";case/^SHA(?:2?-)?224$/i.test(n):return"SHA224";case/^SHA(?:2?-)?256$/i.test(n):return"SHA256";case/^SHA(?:2?-)?384$/i.test(n):return"SHA384";case/^SHA(?:2?-)?512$/i.test(n):return"SHA512";case/^SHA3-224$/i.test(n):return"SHA3-224";case/^SHA3-256$/i.test(n):return"SHA3-256";case/^SHA3-384$/i.test(n):return"SHA3-384";case/^SHA3-512$/i.test(n):return"SHA3-512";default:throw new TypeError(`Unknown hash algorithm: ${n}`)}},S2=(n,t,r)=>{if(mA){const i=wE[n]??wE[tg(n)];return mA(i,t,r)}else throw new Error("Missing HMAC function")},yA="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",T2=n=>{n=n.replace(/ /g,"");let t=n.length;for(;n[t-1]==="=";)--t;n=(t<n.length?n.substring(0,t):n).toUpperCase();const r=new ArrayBuffer(n.length*5/8|0),i=new Uint8Array(r);let o=0,l=0,c=0;for(let d=0;d<n.length;d++){const A=yA.indexOf(n[d]);if(A===-1)throw new TypeError(`Invalid character found: ${n[d]}`);l=l<<5|A,o+=5,o>=8&&(o-=8,i[c++]=l>>>o)}return i},B2=n=>{let t=0,r=0,i="";for(let o=0;o<n.length;o++)for(r=r<<8|n[o],t+=8;t>=5;)i+=yA[r>>>t-5&31],t-=5;return t>0&&(i+=yA[r<<5-t&31]),i},L2=n=>{n=n.replace(/ /g,"");const t=new ArrayBuffer(n.length/2),r=new Uint8Array(t);for(let i=0;i<n.length;i+=2)r[i/2]=parseInt(n.substring(i,i+2),16);return r},D2=n=>{let t="";for(let r=0;r<n.length;r++){const i=n[r].toString(16);i.length===1&&(t+="0"),t+=i}return t.toUpperCase()},R2=n=>{const t=new ArrayBuffer(n.length),r=new Uint8Array(t);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i)&255;return r},U2=n=>{let t="";for(let r=0;r<n.length;r++)t+=String.fromCharCode(n[r]);return t},vE=mo.TextEncoder?new mo.TextEncoder:null,CE=mo.TextDecoder?new mo.TextDecoder:null,M2=n=>{if(!vE)throw new Error("Encoding API not available");return vE.encode(n)},j2=n=>{if(!CE)throw new Error("Encoding API not available");return CE.decode(n)},O2=n=>{var t;if((t=mo.crypto)!=null&&t.getRandomValues)return mo.crypto.getRandomValues(new Uint8Array(n));throw new Error("Cryptography API not available")};class Yr{static fromLatin1(t){return new Yr({buffer:R2(t).buffer})}static fromUTF8(t){return new Yr({buffer:M2(t).buffer})}static fromBase32(t){return new Yr({buffer:T2(t).buffer})}static fromHex(t){return new Yr({buffer:L2(t).buffer})}get buffer(){return this.bytes.buffer}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,writable:!1,configurable:!1,value:U2(this.bytes)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,writable:!1,configurable:!1,value:j2(this.bytes)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,writable:!1,configurable:!1,value:B2(this.bytes)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,writable:!1,configurable:!1,value:D2(this.bytes)}),this.hex}constructor({buffer:t,size:r=20}={}){this.bytes=typeof t>"u"?O2(r):new Uint8Array(t),Object.defineProperty(this,"bytes",{enumerable:!0,writable:!1,configurable:!1,value:this.bytes})}}const _2=(n,t)=>{{if(n.length!==t.length)throw new TypeError("Input strings must have the same length");let r=-1,i=0;for(;++r<n.length;)i|=n.charCodeAt(r)^t.charCodeAt(r);return i===0}};class wa{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,counter:0,window:1}}static generate({secret:t,algorithm:r=wa.defaults.algorithm,digits:i=wa.defaults.digits,counter:o=wa.defaults.counter}){const l=S2(r,t.bytes,jT(o)),c=l[l.byteLength-1]&15;return(((l[c]&127)<<24|(l[c+1]&255)<<16|(l[c+2]&255)<<8|l[c+3]&255)%10**i).toString().padStart(i,"0")}generate({counter:t=this.counter++}={}){return wa.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:t})}static validate({token:t,secret:r,algorithm:i,digits:o=wa.defaults.digits,counter:l=wa.defaults.counter,window:c=wa.defaults.window}){if(t.length!==o)return null;let d=null;const A=h=>{const y=wa.generate({secret:r,algorithm:i,digits:o,counter:h});_2(t,y)&&(d=h-l)};A(l);for(let h=1;h<=c&&d===null&&(A(l-h),!(d!==null||(A(l+h),d!==null)));++h);return d}validate({token:t,counter:r=this.counter,window:i}){return wa.validate({token:t,secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:r,window:i})}toString(){const t=encodeURIComponent;return`otpauth://hotp/${this.issuer.length>0?this.issuerInLabel?`${t(this.issuer)}:${t(this.label)}?issuer=${t(this.issuer)}&`:`${t(this.label)}?issuer=${t(this.issuer)}&`:`${t(this.label)}?`}secret=${t(this.secret.base32)}&algorithm=${t(this.algorithm)}&digits=${t(this.digits)}&counter=${t(this.counter)}`}constructor({issuer:t=wa.defaults.issuer,label:r=wa.defaults.label,issuerInLabel:i=wa.defaults.issuerInLabel,secret:o=new Yr,algorithm:l=wa.defaults.algorithm,digits:c=wa.defaults.digits,counter:d=wa.defaults.counter}={}){this.issuer=t,this.label=r,this.issuerInLabel=i,this.secret=typeof o=="string"?Yr.fromBase32(o):o,this.algorithm=tg(l),this.digits=c,this.counter=d}}class ca{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}static counter({period:t=ca.defaults.period,timestamp:r=Date.now()}={}){return Math.floor(r/1e3/t)}counter({timestamp:t=Date.now()}={}){return ca.counter({period:this.period,timestamp:t})}static remaining({period:t=ca.defaults.period,timestamp:r=Date.now()}={}){return t*1e3-r%(t*1e3)}remaining({timestamp:t=Date.now()}={}){return ca.remaining({period:this.period,timestamp:t})}static generate({secret:t,algorithm:r,digits:i,period:o=ca.defaults.period,timestamp:l=Date.now()}){return wa.generate({secret:t,algorithm:r,digits:i,counter:ca.counter({period:o,timestamp:l})})}generate({timestamp:t=Date.now()}={}){return ca.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:t})}static validate({token:t,secret:r,algorithm:i,digits:o,period:l=ca.defaults.period,timestamp:c=Date.now(),window:d}){return wa.validate({token:t,secret:r,algorithm:i,digits:o,counter:ca.counter({period:l,timestamp:c}),window:d})}validate({token:t,timestamp:r,window:i}){return ca.validate({token:t,secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:r,window:i})}toString(){const t=encodeURIComponent;return`otpauth://totp/${this.issuer.length>0?this.issuerInLabel?`${t(this.issuer)}:${t(this.label)}?issuer=${t(this.issuer)}&`:`${t(this.label)}?issuer=${t(this.issuer)}&`:`${t(this.label)}?`}secret=${t(this.secret.base32)}&algorithm=${t(this.algorithm)}&digits=${t(this.digits)}&period=${t(this.period)}`}constructor({issuer:t=ca.defaults.issuer,label:r=ca.defaults.label,issuerInLabel:i=ca.defaults.issuerInLabel,secret:o=new Yr,algorithm:l=ca.defaults.algorithm,digits:c=ca.defaults.digits,period:d=ca.defaults.period}={}){this.issuer=t,this.label=r,this.issuerInLabel=i,this.secret=typeof o=="string"?Yr.fromBase32(o):o,this.algorithm=tg(l),this.digits=c,this.period=d}}const P2=/^otpauth:\/\/([ht]otp)\/(.+)\?([A-Z0-9.~_-]+=[^?&]*(?:&[A-Z0-9.~_-]+=[^?&]*)*)$/i,F2=/^[2-7A-Z]+=*$/i,Q2=/^SHA(?:1|224|256|384|512|3-224|3-256|3-384|3-512)$/i,H2=/^[+-]?\d+$/,xE=/^\+?[1-9]\d*$/;class z2{static parse(t){let r;try{r=t.match(P2)}catch{}if(!Array.isArray(r))throw new URIError("Invalid URI format");const i=r[1].toLowerCase(),o=r[2].split(/(?::|%3A) *(.+)/i,2).map(decodeURIComponent),l=r[3].split("&").reduce((A,h)=>{const y=h.split(/=(.*)/,2).map(decodeURIComponent),E=y[0].toLowerCase(),C=y[1],x=A;return x[E]=C,x},{});let c;const d={};if(i==="hotp")if(c=wa,typeof l.counter<"u"&&H2.test(l.counter))d.counter=parseInt(l.counter,10);else throw new TypeError("Missing or invalid 'counter' parameter");else if(i==="totp"){if(c=ca,typeof l.period<"u")if(xE.test(l.period))d.period=parseInt(l.period,10);else throw new TypeError("Invalid 'period' parameter")}else throw new TypeError("Unknown OTP type");if(typeof l.issuer<"u"&&(d.issuer=l.issuer),o.length===2?(d.label=o[1],typeof d.issuer>"u"||d.issuer===""?d.issuer=o[0]:o[0]===""&&(d.issuerInLabel=!1)):(d.label=o[0],typeof d.issuer<"u"&&d.issuer!==""&&(d.issuerInLabel=!1)),typeof l.secret<"u"&&F2.test(l.secret))d.secret=l.secret;else throw new TypeError("Missing or invalid 'secret' parameter");if(typeof l.algorithm<"u")if(Q2.test(l.algorithm))d.algorithm=l.algorithm;else throw new TypeError("Invalid 'algorithm' parameter");if(typeof l.digits<"u")if(xE.test(l.digits))d.digits=parseInt(l.digits,10);else throw new TypeError("Invalid 'digits' parameter");return new c(d)}static stringify(t){if(t instanceof wa||t instanceof ca)return t.toString();throw new TypeError("Invalid 'HOTP/TOTP' object")}}const V2=({totpCodes:n,onTotpCodesChange:t,originalTotpCodeIds:r,isAddFormVisible:i,formData:o,onStateChange:l})=>{const{t:c}=ht(),[d,A]=L.useState(null),h=(S,U)=>{let B=S.trim(),F=U.trim();if(B.toLowerCase().startsWith("otpauth://totp/"))try{const Q=z2.parse(B);Q instanceof ca&&(B=Q.secret.base32,!F&&Q.label&&(F=Q.label))}catch{throw new Error(c("totp.errors.invalidSecretKey"))}if(B=B.replace(/\s/g,""),!/^[A-Z2-7]+=*$/i.test(B))throw new Error(c("totp.errors.invalidSecretKey"));return{secretKey:B,name:F||"Authenticator"}},y=()=>{l({isAddFormVisible:!0,formData:{name:"",secretKey:""}}),A(null)},E=()=>{l({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),A(null)},C=S=>{l({isAddFormVisible:i,formData:{...o,...S}})},x=S=>{if(S==null||S.preventDefault(),A(null),!o.secretKey){A(c("credentials.validation.required"));return}try{const{secretKey:U,name:B}=h(o.secretKey,o.name),F={Id:crypto.randomUUID().toUpperCase(),Name:B,SecretKey:U,CredentialId:""},Q=[...n,F];t(Q),E()}catch(U){U instanceof Error?A(U.message):A(c("common.errors.unknownErrorTryAgain"))}},N=S=>{const U=r.includes(S.Id);let B;U?B=n.map(F=>F.Id===S.Id?{...F,IsDeleted:!0}:F):B=n.filter(F=>F.Id!==S.Id),t(B)},I=n.filter(S=>!S.IsDeleted),k=I.length>0;return f.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[f.jsxs("div",{className:"flex justify-between items-center mb-4",children:[f.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:c("common.twoFactorAuthentication")}),k&&!i&&f.jsx("button",{type:"button",onClick:y,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:c("totp.addCode"),children:f.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]}),!k&&!i&&f.jsxs("button",{type:"button",onClick:y,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:[f.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),f.jsx("span",{children:c("totp.addCode")})]}),i&&f.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:[f.jsxs("div",{className:"flex justify-between items-center mb-4",children:[f.jsx("h4",{className:"text-lg font-medium text-gray-900 dark:text-white",children:c("totp.addCode")}),f.jsx("button",{type:"button",onClick:E,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:f.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 14 14",children:f.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})})})]}),f.jsx("p",{className:"mb-4 text-sm text-gray-500 dark:text-gray-400",children:c("totp.instructions")}),d&&f.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:f.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:d})}),f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{htmlFor:"totp-name",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:c("totp.nameOptional")}),f.jsx("input",{id:"totp-name",type:"text",value:o.name,onChange:S=>C({name:S.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"})]}),f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{htmlFor:"totp-secret",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:c("totp.secretKey")}),f.jsx("input",{id:"totp-secret",type:"text",value:o.secretKey,onChange:S=>C({secretKey:S.target.value}),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),x(S))},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"})]}),f.jsx("div",{className:"flex justify-end",children:f.jsx("button",{type:"button",onClick:S=>x(S),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:c("common.save")})})]}),k&&f.jsx("div",{className:"grid grid-cols-1 gap-4 mt-4",children:I.map(S=>f.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:f.jsxs("div",{className:"flex justify-between items-center gap-2",children:[f.jsx("div",{className:"flex items-center flex-1",children:f.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:S.Name})}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:"flex flex-col items-end",children:f.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:c("totp.saveToViewCode")})}),f.jsx("button",{type:"button",onClick:()=>N(S),className:"text-red-600 hover:text-red-800 dark:text-red-500 dark:hover:text-red-400",children:f.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:f.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"})})})]})]})},S.Id))})]})},cs=["spamok.com","solarflarecorp.com","spamok.nl","3060.nl","landmail.nl","asdasd.nl","spamok.de","spamok.com.ua","spamok.es","spamok.fr"],NE=({id:n,label:t,value:r,onChange:i,error:o,required:l=!1})=>{const{t:c}=ht(),d=ia(),[A,h]=L.useState(!1),[y,E]=L.useState(""),[C,x]=L.useState(""),[N,I]=L.useState(!1),[k,S]=L.useState([]),[U,B]=L.useState([]),F=L.useRef(null);L.useEffect(()=>{(async()=>{const G=await d.getVaultMetadata();S((G==null?void 0:G.privateEmailDomains)??[]),B((G==null?void 0:G.hiddenPrivateEmailDomains)??[])})()},[d]);const Q=L.useMemo(()=>k.length>0&&!(k.length===1&&(k[0]==="DISABLED.TLD"||k[0]==="")),[k]);L.useEffect(()=>{if(!r){Q&&k[0]?x(k[0]):cs[0]&&x(cs[0]);return}if(r.includes("@")){const[z,G]=r.split("@");E(z),x(G);const Y=cs.includes(G)||k.includes(G)||U.includes(G);h(!Y)}else E(r),!C&&!r.includes("@")&&(Q&&k[0]?x(k[0]):cs[0]&&x(cs[0]))},[r,k,U,Q]);const V=L.useCallback(z=>{const G=z.target.value;if(A){i(G);return}if(G.includes("@")){h(!0),i(G);return}E(G),!G||G.trim()===""?i(""):C&&i(`${G}@${C}`)},[A,C,i]),W=L.useCallback(z=>{x(z);const G=y.includes("@")?y.split("@")[0]:y;!G||G.trim()===""?i(""):i(`${G}@${z}`),h(!1),I(!1)},[y,i]),J=L.useCallback(()=>{const z=!A;if(h(z),z){if(r&&r.includes("@")){const[G]=r.split("@");i(G),E(G)}}else{const G=Q&&k[0]?k[0]:cs[0];x(G),y&&y.trim()?i(`${y}@${G}`):r&&!r.includes("@")&&i(`${r}@${G}`)}},[A,r,y,Q,k,i]);return L.useEffect(()=>{const z=G=>{F.current&&!F.current.contains(G.target)&&I(!1)};if(N)return document.addEventListener("mousedown",z),()=>{document.removeEventListener("mousedown",z)}},[N]),f.jsxs("div",{className:"space-y-2",children:[f.jsxs("label",{htmlFor:n,className:"block font-medium text-gray-700 dark:text-gray-300",children:[t,l&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),f.jsxs("div",{className:"relative w-full",children:[f.jsxs("div",{className:"flex w-full",children:[f.jsx("input",{type:"text",id:n,className:`flex-1 min-w-0 px-3 py-2 border text-sm ${o?"border-red-500":"border-gray-300 dark:border-gray-600"} ${A?"rounded-md":"rounded-l-md"} focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white`,value:A?r:y,onChange:V,placeholder:c(A?"credentials.enterFullEmail":"credentials.enterEmailPrefix")}),!A&&f.jsxs("button",{type:"button",onClick:()=>I(!N),className:"inline-flex items-center px-2 py-2 border border-l-0 border-gray-300 dark:border-gray-600 rounded-r-md bg-gray-50 dark:bg-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-500 cursor-pointer text-sm truncate max-w-[120px]",children:[f.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"@"}),f.jsx("span",{className:"truncate ml-0.5",children:C})]})]}),N&&!A&&f.jsx("div",{ref:F,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:f.jsxs("div",{className:"p-4",children:[Q&&f.jsxs("div",{className:"mb-4",children:[f.jsxs("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:[c("credentials.privateEmailTitle")," ",f.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",c("credentials.privateEmailAliasVaultServer"),")"]})]}),f.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-3",children:c("credentials.privateEmailDescription")}),f.jsx("div",{className:"flex flex-wrap gap-2",children:k.filter(z=>!U.includes(z)).map(z=>f.jsx("button",{type:"button",onClick:()=>W(z),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${C===z?"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:z},z))})]}),f.jsxs("div",{className:Q?"border-t border-gray-200 dark:border-gray-600 pt-4":"",children:[f.jsx("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:c("credentials.publicEmailTitle")}),f.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:c("credentials.publicEmailDescription")}),f.jsx("div",{className:"flex flex-wrap gap-2",children:cs.map(z=>f.jsx("button",{type:"button",onClick:()=>W(z),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${C===z?"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:z},z))})]})]})})]}),f.jsx("div",{children:f.jsx("button",{type:"button",onClick:J,className:"text-sm text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300",children:c(A?"credentials.useDomainChooser":"credentials.enterCustomDomain")})}),o&&f.jsx("p",{className:"text-sm text-red-500 mt-1",children:o})]})},G2=({name:n})=>{switch(n){case"visibility":return f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),f.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return f.jsxs(f.Fragment,{children:[f.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"}),f.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"refresh":return f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M23 4v6h-6"}),f.jsx("path",{d:"M1 20v-6h6"}),f.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 f.jsxs(f.Fragment,{children:[f.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"}),f.jsx("path",{d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]});default:return null}},gr=L.forwardRef(({id:n,label:t,value:r,onChange:i,type:o="text",placeholder:l,required:c=!1,multiline:d=!1,rows:A=1,error:h,buttons:y=[],showPassword:E,onShowPasswordChange:C},x)=>{const{t:N}=ht(),[I,k]=gn.useState(!1),S=E!==void 0?E:I,U=Q=>{E!==void 0?C==null||C(Q):k(Q)},B=`mt-1 block text-sm w-full rounded-md ${h?"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=o==="password"?[...y,{icon:S?"visibility-off":"visibility",onClick:()=>U(!S),title:N(S?"common.hidePassword":"common.showPassword")}]:y;return f.jsxs("div",{children:[f.jsxs("label",{htmlFor:n,className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:[t,c&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),f.jsxs("div",{className:"relative",children:[d?f.jsx("textarea",{id:n,value:r,onChange:Q=>i(Q.target.value),rows:A,placeholder:l,className:B}):f.jsx("input",{ref:x,type:o==="password"&&!S?"password":"text",id:n,value:r,onChange:Q=>i(Q.target.value),placeholder:l,className:B}),F.length>0&&f.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:F.map((Q,V)=>f.jsx("button",{type:"button",onClick:Q.onClick,title:Q.title,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",children:f.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx(G2,{name:Q.icon})})},V))})]}),h&&f.jsx("p",{className:"mt-1 text-sm text-red-500",children:h})]})});gr.displayName="FormInput";var K2=class{constructor(n){this.lowercaseChars="abcdefghijklmnopqrstuvwxyz",this.uppercaseChars="ABCDEFGHIJKLMNOPQRSTUVWXYZ",this.numberChars="0123456789",this.specialChars="!@#$%^&*()_+-=[]{}|;:,.<>?",this.ambiguousChars="Il1O0o",this.length=18,this.useLowercase=!0,this.useUppercase=!0,this.useNumbers=!0,this.useSpecial=!0,this.useNonAmbiguous=!1,n&&this.applySettings(n)}applySettings(n){return this.length=n.Length,this.useLowercase=n.UseLowercase,this.useUppercase=n.UseUppercase,this.useNumbers=n.UseNumbers,this.useSpecial=n.UseSpecialChars,this.useNonAmbiguous=n.UseNonAmbiguousChars,this}setLength(n){return this.length=n,this}useLowercaseLetters(n){return this.useLowercase=n,this}useUppercaseLetters(n){return this.useUppercase=n,this}useNumericCharacters(n){return this.useNumbers=n,this}useSpecialCharacters(n){return this.useSpecial=n,this}useNonAmbiguousCharacters(n){return this.useNonAmbiguous=n,this}getUnbiasedRandomIndex(n){const t=Math.floor(4294967296/n)*n;for(;;){const r=new Uint32Array(1);crypto.getRandomValues(r);const i=r[0];if(i<t)return i%n}}generateRandomPassword(){const n=this.buildCharacterSet();let t=this.generateInitialPassword(n);return t=this.ensureRequirements(t),t}buildCharacterSet(){let n="";return this.useLowercase&&(n+=this.lowercaseChars),this.useUppercase&&(n+=this.uppercaseChars),this.useNumbers&&(n+=this.numberChars),this.useSpecial&&(n+=this.specialChars),n.length===0&&(n=this.lowercaseChars),this.useNonAmbiguous&&(n=this.removeAmbiguousCharacters(n)),n}removeAmbiguousCharacters(n){for(const t of this.ambiguousChars)n=n.replace(t,"");return n}generateInitialPassword(n){let t="";for(let r=0;r<this.length;r++)t+=n[this.getUnbiasedRandomIndex(n.length)];return t}ensureRequirements(n){return this.useLowercase&&!/[a-z]/.exec(n)&&(n=this.addCharacterFromSet(n,this.getSafeCharacterSet(this.lowercaseChars,!0))),this.useUppercase&&!/[A-Z]/.exec(n)&&(n=this.addCharacterFromSet(n,this.getSafeCharacterSet(this.uppercaseChars,!0))),this.useNumbers&&!/\d/.exec(n)&&(n=this.addCharacterFromSet(n,this.getSafeCharacterSet(this.numberChars,!1))),this.useSpecial&&!/[!@#$%^&*()_+\-=[\]{}|;:,.<>?]/.exec(n)&&(n=this.addCharacterFromSet(n,this.specialChars)),n}getSafeCharacterSet(n,t){if(!this.useNonAmbiguous)return n;let r=n;for(const i of this.ambiguousChars){if(!t&&!/\d/.test(i))continue;let o=i;t&&(n===this.lowercaseChars?o=i.toLowerCase():o=i.toUpperCase()),r=r.replace(o,"")}return r}addCharacterFromSet(n,t){const r=this.getUnbiasedRandomIndex(this.length),i=t[this.getUnbiasedRandomIndex(t.length)];return n.substring(0,r)+i+n.substring(r+1)}},ag=n=>new K2(n);const q2=({isOpen:n,onClose:t,onSave:r,onSettingsChange:i,initialSettings:o})=>{const{t:l}=ht(),[c,d]=L.useState(o),[A,h]=L.useState(""),y=L.useCallback(I=>{try{const S=ag(I).generateRandomPassword();h(S)}catch(k){console.error("Error generating preview password:",k),h("")}},[]);L.useEffect(()=>{n&&(d({...o}),y({...o}))},[n,o,y]);const E=L.useCallback((I,k)=>{const S={...c,[I]:k};d(S),y(S),i==null||i(S)},[c,y,i]),C=L.useCallback(()=>{y(c)},[c,y]),x=L.useCallback(()=>{r(A),t()},[A,r,t]),N=L.useCallback(()=>{t()},[t]);return n?f.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[f.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-60 transition-opacity",onClick:N}),f.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:f.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 px-4 pb-4 pt-5 text-left shadow-xl transition-all w-full max-w-lg",children:[f.jsx("button",{type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-500 focus:outline-none",onClick:N,children:f.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),f.jsx("div",{className:"sm:flex sm:items-start",children:f.jsxs("div",{className:"w-full mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[f.jsx("h3",{className:"text-lg font-medium leading-6 text-gray-900 dark:text-white mb-4",children:l("credentials.changePasswordComplexity")}),f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"mt-4",children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"text",value:A,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"}),f.jsx("button",{type:"button",onClick:C,className:"px-3 py-2 text-sm text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:l("credentials.generateNewPreview"),children:f.jsx("svg",{className:"w-4 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.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.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[f.jsx("button",{type:"button",onClick:()=>E("UseLowercase",!c.UseLowercase),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.UseLowercase?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:l("credentials.includeLowercase"),children:f.jsx("span",{className:"font-mono text-base",children:"a-z"})}),f.jsx("button",{type:"button",onClick:()=>E("UseUppercase",!c.UseUppercase),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.UseUppercase?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:l("credentials.includeUppercase"),children:f.jsx("span",{className:"font-mono text-base",children:"A-Z"})}),f.jsx("button",{type:"button",onClick:()=>E("UseNumbers",!c.UseNumbers),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.UseNumbers?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:l("credentials.includeNumbers"),children:f.jsx("span",{className:"font-mono text-base",children:"0-9"})}),f.jsx("button",{type:"button",onClick:()=>E("UseSpecialChars",!c.UseSpecialChars),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.UseSpecialChars?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:l("credentials.includeSpecialChars"),children:f.jsx("span",{className:"font-mono text-base",children:"!@#"})})]}),f.jsxs("div",{className:"flex items-center",children:[f.jsx("input",{id:"use-non-ambiguous",type:"checkbox",checked:c.UseNonAmbiguousChars,onChange:I=>E("UseNonAmbiguousChars",I.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"}),f.jsx("label",{htmlFor:"use-non-ambiguous",className:"ml-2 text-sm text-gray-700 dark:text-gray-300",children:l("credentials.avoidAmbiguousChars")})]})]})]}),f.jsx("div",{className:"mt-5 sm:mt-6 sm:flex sm:flex-row-reverse",children:f.jsxs("button",{type:"button",className:"inline-flex w-full justify-center items-center gap-1 rounded-md bg-gray-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-gray-500 sm:ml-3 sm:w-auto",onClick:x,children:[f.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.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")]})})]})})]})})]}):null},IE=({id:n,label:t,value:r,onChange:i,placeholder:o,error:l,showPassword:c,onShowPasswordChange:d})=>{const{t:A}=ht(),h=ia(),[y,E]=L.useState(!1),[C,x]=L.useState(!1),[N,I]=L.useState(null),[k,S]=L.useState(!1),U=c!==void 0?c:y,B=L.useCallback(Y=>{c!==void 0?d==null||d(Y):E(Y)},[c,d]);L.useEffect(()=>{(async()=>{try{if(h.sqliteClient){const ae=h.sqliteClient.getPasswordSettings();I(ae),S(!0)}}catch(ae){console.error("Error loading password settings:",ae)}})()},[h.sqliteClient]);const F=L.useCallback(Y=>{try{const Z=ag(Y).generateRandomPassword();i(Z),B(!0)}catch(ae){console.error("Error generating password:",ae)}},[i,B]),Q=L.useCallback(Y=>{if(!N)return;const ae=parseInt(Y.target.value,10),Z={...N,Length:ae};I(Z),F(Z)},[N,F]),V=L.useCallback(()=>{N&&F(N)},[F,N]),W=L.useCallback(Y=>{i(Y),B(!0)},[i,B]),J=L.useCallback(Y=>{I(Y)},[]),z=L.useCallback(()=>{B(!U)},[U,B]),G=L.useCallback(()=>{x(!0)},[]);return!N||!k?f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:t}),f.jsx("div",{className:"animate-pulse bg-gray-200 dark:bg-gray-700 h-10 rounded-lg"})]}):f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:t}),f.jsxs("div",{className:"flex",children:[f.jsx("div",{className:"relative flex-grow",children:f.jsx("input",{type:U?"text":"password",id:n,value:r,onChange:Y=>i(Y.target.value),placeholder:o,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"})}),f.jsxs("div",{className:"flex",children:[f.jsx("button",{type:"button",onClick:z,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(U?"common.hidePassword":"common.showPassword"),children:f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U?f.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"}):f.jsxs(f.Fragment,{children:[f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),f.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"})]})})}),f.jsx("button",{type:"button",onClick:V,className:"px-3 text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-r-lg text-sm border-l border-gray-300 dark:border-gray-700 dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:A("credentials.generateRandomPassword"),children:f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.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.jsxs("div",{className:"pt-2",children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("label",{htmlFor:`${n}-length`,className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:A("credentials.passwordLength")}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 font-mono",children:N.Length}),f.jsx("button",{type:"button",onClick:G,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300",title:A("credentials.changePasswordComplexity"),children:f.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[f.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"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})]}),f.jsx("input",{type:"range",id:`${n}-length`,min:"8",max:"64",value:N.Length,onChange:Q,className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"})]}),l&&f.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:l}),f.jsx(q2,{isOpen:C,onClose:()=>x(!1),onSave:W,onSettingsChange:J,initialSettings:N})]})},kE=({id:n,label:t,value:r,onChange:i,placeholder:o,error:l,onRegenerate:c})=>{const{t:d}=ht(),A=L.useCallback(y=>{i(y.target.value)},[i]),h=L.useCallback(()=>{c()},[c]);return f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:t}),f.jsxs("div",{className:"flex",children:[f.jsx("div",{className:"relative flex-grow",children:f.jsx("input",{type:"text",id:n,value:r,onChange:A,placeholder:o,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"})}),f.jsx("div",{className:"flex",children:f.jsx("button",{type:"button",onClick:h,className:"px-3 text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-r-lg text-sm dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:d("credentials.generateRandomUsername"),children:f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.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&&f.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:l})]})};var ng=(n=>(n.Male="Male",n.Female="Female",n.Other="Other",n))(ng||{}),rg=class Kr{constructor(){this.symbols=[".","-"]}generateUsername(t){let r=this.generateEmailPrefix(t);return r=r.replace(/[^a-zA-Z0-9]/g,""),r.length<Kr.MIN_LENGTH?r+=this.generateRandomString(Kr.MIN_LENGTH-r.length):r.length>Kr.MAX_LENGTH&&(r=r.substring(0,Kr.MAX_LENGTH)),r}generateEmailPrefix(t){const r=[];switch(typeof t.birthDate=="string"&&(t.birthDate=new Date(t.birthDate)),this.getSecureRandom(4)){case 0:r.push(t.firstName.substring(0,1).toLowerCase()+t.lastName.toLowerCase());break;case 1:r.push((t.firstName+t.lastName).toLowerCase());break;case 2:r.push(t.firstName.toLowerCase()+t.lastName.substring(0,1).toLowerCase());break;case 3:r.push(t.firstName.substring(0,Math.min(3,t.firstName.length)).toLowerCase()+t.lastName.toLowerCase());break}switch(this.getSecureRandom(2)){case 0:r.push(t.birthDate.getFullYear().toString());break;case 1:r.push(t.birthDate.getFullYear().toString().substring(2));break}let i=r.join(this.getRandomSymbol());if(this.getSecureRandom(2)===0){const o=this.getSecureRandom(i.length);i=i.slice(0,o)+this.getRandomSymbol()+i.slice(o)}return i=this.sanitizeEmailPrefix(i),i.length<Kr.MIN_LENGTH?i+=this.generateRandomString(Kr.MIN_LENGTH-i.length):i.length>Kr.MAX_LENGTH&&(i=i.substring(0,Kr.MAX_LENGTH)),i}sanitizeEmailPrefix(t){let r=t.replace(/[^a-zA-Z0-9._-]/g,"");return r=r.replace(/[-_.]{2,}/g,i=>i[0]),r=r.replace(/^[-._]+/,""),r=r.replace(/[-._]*$/,""),r}getRandomSymbol(){return this.getSecureRandom(3)===0?this.symbols[this.getSecureRandom(this.symbols.length)]:""}generateRandomString(t){const r="abcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:t},()=>r.charAt(this.getSecureRandom(r.length))).join("")}getSecureRandom(t){const r=new Uint32Array(1);return crypto.getRandomValues(r),r[0]%t}};rg.MIN_LENGTH=6;rg.MAX_LENGTH=20;var ig=rg,Oc=class{constructor(){this.firstNamesMale=[],this.firstNamesFemale=[],this.lastNames=[],this.random=Math.random,this.firstNamesMale=this.getFirstNamesMaleJson(),this.firstNamesFemale=this.getFirstNamesFemaleJson(),this.lastNames=this.getLastNamesJson()}getFirstNamesMaleByDecade(){return[]}getFirstNamesFemaleByDecade(){return[]}generateRandomDateOfBirth(n){if(n){const{targetYear:d,yearDeviation:A}=n;if(A===0){const h=new Date(d,0,1),y=new Date(d,11,31),E=h.getTime()+this.random()*(y.getTime()-h.getTime());return new Date(E)}else{const h=d-A,y=d+A,E=new Date(h,0,1),C=new Date(y,11,31),x=E.getTime()+this.random()*(C.getTime()-E.getTime());return new Date(x)}}const t=new Date,r=21,i=65,o=new Date(t.getFullYear()-i,t.getMonth(),t.getDate()),l=new Date(t.getFullYear()-r,t.getMonth(),t.getDate()),c=o.getTime()+this.random()*(l.getTime()-o.getTime());return new Date(c)}selectFirstnamesForBirthdate(n,t){const r=n.getFullYear(),i=t?this.getFirstNamesMaleByDecade():this.getFirstNamesFemaleByDecade();if(i.length===0)return t?this.firstNamesMale:this.firstNamesFemale;const o=i.filter(c=>r>=c.startYear&&r<=c.endYear);if(o.length>0){const c=[];return o.forEach(d=>c.push(...d.names)),c}const l=[];return i.forEach(c=>l.push(...c.names)),l.length>0?l:t?this.firstNamesMale:this.firstNamesFemale}generateRandomIdentity(n,t){const r={firstName:"",lastName:"",gender:"Male",birthDate:new Date,emailPrefix:"",nickName:""};let i;n==="random"||n===void 0?i=this.random()<.5?"Male":"Female":n==="male"?i="Male":n==="female"?i="Female":i="Male",r.gender=i,r.birthDate=this.generateRandomDateOfBirth(t);let o;if(i==="Male")o=this.selectFirstnamesForBirthdate(r.birthDate,!0);else if(i==="Female")o=this.selectFirstnamesForBirthdate(r.birthDate,!1);else{const c=this.random()<.5;o=this.selectFirstnamesForBirthdate(r.birthDate,c)}r.firstName=o[Math.floor(this.random()*o.length)],r.lastName=this.lastNames[Math.floor(this.random()*this.lastNames.length)];const l=new ig;return r.emailPrefix=l.generateEmailPrefix(r),r.nickName=l.generateUsername(r),r}},Y2=["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"],J2=["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"],W2=["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"],EA=class extends Oc{getFirstNamesMaleJson(){return Y2}getFirstNamesFemaleJson(){return J2}getLastNamesJson(){return W2}},X2=["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"],$2=["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"],Z2=["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"],Bw=class extends Oc{getFirstNamesMaleJson(){return X2}getFirstNamesFemaleJson(){return $2}getLastNamesJson(){return Z2}},eB=["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"],tB=["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"],aB=["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"],nB=["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"],rB=["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"],iB=["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"],sB=["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"],oB=["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"],lB=["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"],uB=["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"],cB=["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"],dB=["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"],fB=["Julia","Stefanie","Anna","Katharina","Katrin","Sarah","Sandra","Nadine","Melanie","Christina","Jennifer","Nicole","Sabrina","Jessica","Annika","Claudia","Nina","Anne","Daniela","Franziska","Anja","Carolin","Jasmin","Christin","Katja","Janina","Jana","Janine","Yvonne","Alexandra","Svenja","Maike","Lena","Laura","Maria","Tanja","Susanne","Lisa","Andrea","Christine","Miriam","Sonja","Johanna","Ann","Sabine","Vanessa","Kerstin","Natalie","Bianca","Eva","Mareike","Marie","Verena","Jacqueline","Isabell","Hannah","Saskia","Simone","Tina","Juliane","Maren","Elena","Rebecca","Martina","Christiane","Carina","Mandy","Olga","Denise","Wiebke","Diana","Marina","Tatjana","Jenny","Manuela","Linda","Michaela","Nadja","Inga","Antje","Corinna","Patricia","Silvia","Ulrike","Kim","Judith","Ines","Monika","Birte","Ina","Victoria","Elisabeth","Theresa","Sina","Irina","Sophie","Silke","Friederike","Britta","Nora","Lea","Nele","Natascha","Bettina","Doreen","Barbara","Angela","Ramona","Cornelia","Anke","Natalia","Magdalena","Nancy","Annette","Astrid","Aylin","Susann","Kathleen","Alina","Lydia","Joana","Kirsten","Jeanette","Martha","Heike","Mona","Anita","Dana","Veronika","Yasemin","Sophia","Carolina","Svetlana","Esther","Charlotte","Antonia","Constanze","Vivien","Luisa","Svantje","Helena","Petra","Steffi","Pia","Susan","Monique","Lina","Mariam","Vera","Merle","Angelika","Karin","Maja","Frauke","Agnes","Isabella","Josephine","Frederike","Michelle","Carmen","Carola","Cindy","Madeleine","Janna","Larissa","Gina","Marlene","Anastasia","Elisa","Regina","Viola","Özlem","Alice","Evelyn","Marleen","Dominique","Lara","Karen","Nikola","Marion","Annabell","Annett","Dorothea","Iris","Henrike","Kira","Mirja","Camilla","Ronja","Valentina","Alena","Ariane","Dorothee","Fatma","Gesa","Agnieszka","Birgit","Ricarda","Sandy","Beate"],hB=["Julia","Anna","Sarah","Lisa","Laura","Katharina","Lena","Vanessa","Annika","Jennifer","Jana","Lea","Marie","Jasmin","Franziska","Hannah","Jessica","Michelle","Nina","Alina","Johanna","Carolin","Christina","Kim","Nadine","Jacqueline","Ann","Luisa","Sophie","Lara","Natalie","Svenja","Sabrina","Isabell","Sandra","Janina","Melanie","Leonie","Antonia","Saskia","Stefanie","Aylin","Denise","Nele","Pia","Alexandra","Katrin","Sophia","Sina","Melina","Janine","Vivien","Rebecca","Anne","Miriam","Victoria","Nicole","Mareike","Lina","Josephine","Merle","Clara","Maria","Maike","Charlotte","Celina","Paula","Carina","Larissa","Christin","Linda","Mandy","Theresa","Kimberly","Elena","Melissa","Jule","Celine","Daniela","Jenny","Kira","Patricia","Ronja","Bianca","Eva","Sonja","Joana","Gina","Tanja","Nora","Yvonne","Pauline","Emily","Natascha","Anja","Marina","Friederike","Angelina","Nadja","Paulina","Lynn","Alicia","Svea","Amelie","Katja","Juliane","Lilly","Marlene","Verena","Chantal","Milena","Maja","Chiara","Selina","Alena","Carlotta","Mona","Annabell","Carla","Claudia","Tatjana","Maren","Elisabeth","Emma","Helena","Inga","Luise","Tamara","Christine","Fiona","Judith","Frederike","Finja","Jill","Fenja","Tina","Cindy","Ina","Janne","Marleen","Mia","Samantha","Annalena","Janika","Henrike","Wiebke","Elisa","Esther","Ricarda","Janna","Stella","Carolina","Dana","Helen","Madeleine","Mara","Simone","Corinna","Diana","Fabienne","Monique","Samira","Sandy","Tabea","Valerie","Malin","Andrea","Birte","Swantje","Veronika","Kerstin","Magdalena","Ramona","Susanne","Greta","Juli","Kaja","Lucy","Zoe","Angelique","Jasmina","Tessa","Lydia","Sabine","Dominique","Malina","Michaela","Charline","Monika","Karen","Mira","Yasemin","Alica","Alice","Alisa","Angelika","Emilia","Henriette","Marieke","Vera","Anneke","Felicia","Giulia","Liza","Maxi","Viola","Annkatrin","Lotta","Olivia","Anastasia","Dilara","Felicitas","Mariam","Marisa","Rieke","Rosa","Beatrice","Constanze","Dorothea","Isabella","Juliana","Katerina","Martina","Merve","Philine","Valentina","Justine","Melisa","Michele","Mika","Nancy","Selin","Alissa","Angela","Cara","Charleen","Deborah","Ellen","Imke","Irina","Jeanette","Leona","Lorena","Manuela","Martha","Silvia","Viviane","Aline","Desiree","Xenia"],AB=["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"],gB=["Mia","Emma","Hannah","Sophia","Emilia","Anna","Lea","Lina","Marie","Lena","Leonie","Emily","Amelie","Luisa","Johanna","Clara","Sophie","Lilly","Mila","Leni","Laura","Lara","Nele","Maja","Charlotte","Sarah","Ella","Ida","Mathilda","Frieda"],mB=["Emilia","Sophia","Emma","Hannah","Mia","Lina","Mila","Ella","Clara","Lea","Marie","Leni","Lia","Mathilda","Ida","Anna","Frieda","Leonie","Emily","Maja","Lilly","Luisa","Charlotte","Amelie","Sophie","Lena","Johanna","Lara","Mira","Nora","Nele","Sarah","Malia","Lotta","Juna","Paula","Luna","Elisa","Maria","Romy","Laura","Helena","Thea","Mara","Victoria","Antonia","Elena","Tilda","Carla","Eva"],Lw=class extends Oc{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return eB}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:tB},{startYear:1960,endYear:1969,names:aB},{startYear:1970,endYear:1979,names:nB},{startYear:1980,endYear:1989,names:rB},{startYear:1990,endYear:1999,names:iB},{startYear:2e3,endYear:2009,names:sB},{startYear:2010,endYear:2019,names:oB},{startYear:2020,endYear:2029,names:lB}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:uB},{startYear:1960,endYear:1969,names:cB},{startYear:1970,endYear:1979,names:dB},{startYear:1980,endYear:1989,names:fB},{startYear:1990,endYear:1999,names:hB},{startYear:2e3,endYear:2009,names:AB},{startYear:2010,endYear:2019,names:gB},{startYear:2020,endYear:2029,names:mB}]}},ho=class{static normalizeBirthDateForDisplay(n){return!n||n.startsWith("0001-01-01")?"":n.split(/[T ]/)[0]}static normalizeBirthDateForDb(n){if(!n||n.trim()==="")return"0001-01-01 00:00:00";const t=n.trim(),r=t.match(/^(\d{4})-(\d{2})-(\d{2})/);if(r){const[o,l,c,d]=r;return`${l}-${c}-${d} 00:00:00`}const i=new Date(t);if(!isNaN(i.getTime())){const o=i.getFullYear().toString().padStart(4,"0"),l=(i.getMonth()+1).toString().padStart(2,"0"),c=i.getDate().toString().padStart(2,"0");return`${o}-${l}-${c} 00:00:00`}return"0001-01-01 00:00:00"}static isValidBirthDate(n){if(!n||n.trim()===""||n.startsWith("0001-01-01"))return!1;const t=new Date(n);return isNaN(t.getTime())?!1:t.getFullYear()>1&&t.getFullYear()<9999}};function bA(n){if(n==="random"||!n)return null;const t=n.split("-");if(t.length!==2)return null;const r=parseInt(t[0],10),i=parseInt(t[1],10);if(isNaN(r)||isNaN(i))return null;const o=new Date().getFullYear(),l=Math.floor((r+i)/2),c=o-l,d=Math.floor((i-r)/2);return{targetYear:c,yearDeviation:d}}function Dw(){return[{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:"nl",label:"Nederlands",flag:"🇳🇱",alternativeCodes:["nl-NL","nl-BE"]},{value:"de",label:"Deutsch",flag:"🇩🇪",alternativeCodes:["de-DE","de-AT","de-CH","de-LU","de-LI"]}]}function pB(n){if(!n)return null;const t=n.toLowerCase(),r=Dw(),i=r.find(d=>d.value.toLowerCase()===t);if(i)return i.value;const o=r.find(d=>{var A;return(A=d.alternativeCodes)==null?void 0:A.some(h=>h.toLowerCase()===t)});if(o)return o.value;const l=t.split("-")[0],c=r.find(d=>d.value.toLowerCase()===l);return c?c.value:null}var Rw=n=>{switch(n.toLowerCase()){case"en":return new EA;case"nl":return new Bw;case"de":return new Lw;default:return console.warn(`Language '${n}' is not supported. Falling back to English.`),new EA}},Uw=()=>new ig;const yB=Object.freeze(Object.defineProperty({__proto__:null,CreateIdentityGenerator:Rw,CreateUsernameEmailGenerator:Uw,Gender:ng,IdentityGenerator:Oc,IdentityGeneratorDe:Lw,IdentityGeneratorEn:EA,IdentityGeneratorNl:Bw,IdentityHelperUtils:ho,UsernameEmailGenerator:ig,convertAgeRangeToBirthdateOptions:bA,getAvailableLanguages:Dw,mapUiLanguageToIdentityLanguage:pB},Symbol.toStringTag,{value:"Module"})),Hn={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"]},$h={male:["male","man","m","gender1","mr","mr."],female:["female","woman","f","gender2","mrs","mrs.","ms","ms."],other:["other","diverse","custom","prefer not","unknown","gender3"]},EB=new Set(["login","signin","sign","register","signup","account","authentication","password","access","auth","session","authenticate","credentials","logout","signout","portal","dashboard","home","welcome","page","site","secure","member","user","profile","settings","menu","overview","index","main","start","landing","free","create","new","your","special","offer","deal","discount","promotion","newsletter","help","support","contact","about","faq","terms","privacy","cookie","service","services","products","shop","store","cart","checkout","online","web","digital","mobile","my","personal","private","general","default","standard","website","system","admin","administrator","platform","portal","gateway","api","interface","console","today","now","current","latest","newest","recent","the","and","or","but","to","up"]),zn={username:["gebruikersnaam","gebruiker","login","identifier"],fullName:["volledige naam"],firstName:["voornaam","naam"],lastName:["achternaam"],email:["e-mailadres","e-mail"],emailConfirm:["bevestig","herhaal","verificatie"],password:["wachtwoord","pwd"],birthdate:["geboortedatum","geboorte-datum"],gender:["geslacht","aanhef"],birthDateDay:["dag"],birthDateMonth:["maand"],birthDateYear:["jaar"]},Zh={male:["man","mannelijk","heer"],female:["vrouw","vrouwelijk","mevrouw"],other:["anders","iets","overig","onbekend"]},bB=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"]),Pa={username:[...new Set([...Hn.username,...zn.username])],fullName:[...new Set([...Hn.fullName,...zn.fullName])],firstName:[...new Set([...Hn.firstName,...zn.firstName])],lastName:[...new Set([...Hn.lastName,...zn.lastName])],email:[...new Set([...zn.email,...Hn.email])],emailConfirm:[...new Set([...Hn.emailConfirm,...zn.emailConfirm])],password:[...new Set([...Hn.password,...zn.password])],birthdate:[...new Set([...Hn.birthdate,...zn.birthdate])],gender:[...new Set([...Hn.gender,...zn.gender])],birthDateDay:[...new Set([...Hn.birthDateDay,...zn.birthDateDay])],birthDateMonth:[...new Set([...Hn.birthDateMonth,...zn.birthDateMonth])],birthDateYear:[...new Set([...Hn.birthDateYear,...zn.birthDateYear])]},El={male:[...new Set([...$h.male,...Zh.male])],female:[...new Set([...$h.female,...Zh.female])],other:[...new Set([...$h.other,...Zh.other])]},SE=new Set([...EB,...bB]);class TE{constructor(t,r){Ot(this,"document");Ot(this,"clickedElement");Ot(this,"visibilityCache");this.document=t,this.clickedElement=r??null,this.visibilityCache=new Map}containsLoginForm(){let t=this.getFormWrapper();return(t==null?void 0:t.getAttribute("role"))==="dialog"&&(t=t.querySelector("form")??t),t||(t=this.document.body),t.querySelectorAll("input").length>200?!1:!!(this.containsPasswordField(t)||this.containsLikelyUsernameOrEmailField(t))}getForm(){if(!this.clickedElement)return null;const t=this.getFormWrapper();return this.detectFormFields(t)}static getSuggestedServiceName(t,r){const i=t.title,o=4,l=50,c=N=>{const I=N.length>=3&&N.length<=l,k=N.split(/[\s|\-—/\\]+/).length<=o;return I&&k},d=N=>{const I=N.toLowerCase().split(" ").map(U=>U.toLowerCase());let k=0;for(;k<I.length&&SE.has(I[k].toLowerCase());)k++;let S=I.length-1;for(;S>k&&SE.has(I[S].toLowerCase());)S--;return I.slice(k,S+1)},A=(N,I)=>N.split(/[\s|]+/).filter(k=>I.includes(k.toLowerCase())).join(" "),h=r.hostname.replace(/^www\./,""),E=/[|\-—/\\:]/.exec(i);if(E){const N=E.index,I=i.substring(0,N).trim(),k=i.substring(N+1).trim(),S=d(I),U=d(k),B=A(I,S),F=A(k,U),Q=c(B),V=c(F);if(Q&&V)return[B,F,h];if(Q)return[B,h];if(V)return[F,h]}const C=d(i),x=A(i,C);return c(x)?[x,h]:[h]}getFormWrapper(){var t;return(t=this.clickedElement)==null?void 0:t.closest('form, [role="dialog"]')}getActualInputElement(t){if(t.tagName.toLowerCase()==="input")return t;const r=t;if(r.shadowRoot){const o=r.shadowRoot.querySelector("input, textarea");if(o)return o}const i=t.querySelector("input, textarea");return i||t}isElementVisible(t){var i;if(!t)return!1;if(this.visibilityCache.has(t))return this.visibilityCache.get(t);let r=t;for(;r;){try{const o=(i=this.document.defaultView)==null?void 0:i.getComputedStyle(r);if(!o){let l=r;for(;l;)this.visibilityCache.set(l,!0),l=l.parentElement;return!0}if(o.display==="none"){let l=r;for(;l;)this.visibilityCache.set(l,!1),l=l.parentElement;return!1}if(o.visibility==="hidden"){let l=r;for(;l;)this.visibilityCache.set(l,!1),l=l.parentElement;return!1}if(parseFloat(o.opacity)===0){let l=r;for(;l;)this.visibilityCache.set(l,!1),l=l.parentElement;return!1}}catch{let o=r;for(;o;)this.visibilityCache.set(o,!0),o=o.parentElement;return!0}r=r.parentElement}return this.visibilityCache.set(t,!0),!0}findAllInputFields(t,r,i,o=[]){var E,C,x,N,I,k,S,U;const l=t?Array.from(t.querySelectorAll("input, select, [type]")):Array.from(this.document.querySelectorAll("input, select, [type]")),d=(t?Array.from(t.querySelectorAll("*")):Array.from(this.document.querySelectorAll("*"))).filter(B=>{const F=B;return F.shadowRoot?F.shadowRoot.querySelector("input, textarea")!==null:!1}),h=[...l,...d].filter((B,F,Q)=>Q.indexOf(B)===F),y=[];for(const B of Array.from(h)){if(o.includes(B)||!this.isElementVisible(B))continue;let Q=B.tagName.toLowerCase()==="select"?"select":((E=B.type)==null?void 0:E.toLowerCase())||((C=B.getAttribute("type"))==null?void 0:C.toLowerCase())||"";const V=B,W=V.shadowRoot&&V.shadowRoot.querySelector("input, textarea");if(W&&!Q){const Z=V.shadowRoot.querySelector("input, textarea");Z&&(Q=((x=Z.type)==null?void 0:x.toLowerCase())||"text")}if(!i.includes(Q)&&!(W&&i.includes("text")&&!Q))continue;if(i.includes("email")&&Q==="email"){y.push({input:B,score:-1});continue}const J=[B.id,B.getAttribute("name"),B.getAttribute("placeholder")].map(Z=>(Z==null?void 0:Z.toLowerCase())??"");if(B.id||B.getAttribute("name")){const Z=this.document.querySelector(`label[for="${B.id||B.getAttribute("name")}"]`);Z&&J.push(((N=Z.textContent)==null?void 0:N.toLowerCase())??"")}let z=B;for(let Z=0;Z<3&&z;Z++){const ce=z.querySelectorAll('[slot="label"], [slot="helper-text"]');for(const pe of Array.from(ce)){const X=((I=pe.textContent)==null?void 0:I.toLowerCase())??"";X&&J.push(X)}if(z.shadowRoot){const pe=z.shadowRoot.querySelectorAll('slot[name="label"], slot[name="helper-text"]');for(const X of Array.from(pe)){const le=X.assignedNodes();for(const ge of le)ge.textContent&&J.push(ge.textContent.toLowerCase())}}z=z.parentElement}const G=B.parentElement;if(G)for(const Z of Array.from(G.children))Z!==B&&Array.from(Z.classList).some(ce=>ce.toLowerCase().includes("label"))&&J.push(((k=Z.textContent)==null?void 0:k.toLowerCase())??"");let Y=B;for(let Z=0;Z<5&&Y&&!(Y.children.length>15);Z++){const ce=Y.querySelector("label");if(ce){J.push(((S=ce.textContent)==null?void 0:S.toLowerCase())??"");break}const pe=Y.closest("td");if(pe){const X=pe.closest("tr");if(X){for(const le of Array.from(X.querySelectorAll("td")))if(le!==pe){J.push(((U=le.textContent)==null?void 0:U.toLowerCase())??"");break}}break}Y=Y.parentElement}let ae=r.length;for(let Z=0;Z<r.length;Z++)if(J.some(ce=>ce.includes(r[Z]))){ae=Z;break}ae<r.length&&y.push({input:B,score:ae})}return y.sort((B,F)=>B.score-F.score).map(B=>B.input)}findInputField(t,r,i,o=[]){const l=this.findAllInputFields(t,r,i,o),c=this.filterOutNestedDuplicates(l,o);if(i.includes("email")){const d=c.find(A=>(A.type||"").toLowerCase()==="email");if(d)return d}return c.length>0?c[0]:null}findEmailField(t){const r=this.findAllInputFields(t,Pa.email,["text","email"]),o=this.filterOutNestedDuplicates(r)[0]??null,l=o?this.findAllInputFields(t,Pa.emailConfirm,["text","email"],[o]):[],d=this.filterOutNestedDuplicates(l)[0]??null;return{primary:o,confirm:d}}findBirthdateFields(t,r=[]){const i=this.findInputField(t,Pa.birthdate,["date","text"],r);let o="yyyy-mm-dd";if(t&&i){const A=i.closest("div");if(A){const y=[...Array.from(A.getElementsByTagName("label")),...Array.from(A.getElementsByTagName("span")),A].map(E=>{var C;return((C=E.textContent)==null?void 0:C.toLowerCase())??""}).join(" ").replace(/[\s\u00A0]/g,"").toLowerCase();if(/dd[-/]mm[-/]jj/i.test(y)||/dd[-/]mm[-/]yyyy/i.test(y)?o=y.includes("/")?"dd/mm/yyyy":"dd-mm-yyyy":/mm[-/]dd[-/]yyyy/i.test(y)?o=y.includes("/")?"mm/dd/yyyy":"mm-dd-yyyy":/yyyy[-/]mm[-/]dd/i.test(y)&&(o=y.includes("/")?"yyyy/mm/dd":"yyyy-mm-dd"),o==="yyyy-mm-dd"&&i.placeholder){const E=i.placeholder.toLowerCase();/dd[-/]mm/i.test(E)?o=E.includes("/")?"dd/mm/yyyy":"dd-mm-yyyy":/mm[-/]dd/i.test(E)&&(o=E.includes("/")?"mm/dd/yyyy":"mm-dd-yyyy")}}}if(i)return{single:i,format:o,day:null,month:null,year:null};const l=this.findInputField(t,Pa.birthDateDay,["text","number","select"],r),c=this.findInputField(t,Pa.birthDateMonth,["text","number","select"],r),d=this.findInputField(t,Pa.birthDateYear,["text","number","select"],r);return{single:null,format:"yyyy-mm-dd",day:l,month:c,year:d}}findGenderField(t,r=[]){const i=this.findInputField(t,Pa.gender,["select"],r);if((i==null?void 0:i.tagName.toLowerCase())==="select")return{type:"select",field:i};const o=t?t.querySelectorAll('input[type="radio"][name*="gender"], input[type="radio"][name*="sex"]'):null;if(o&&o.length>0){const c=(d,A=!1)=>Array.from(o).find(h=>{var E,C;const y=[h.value,h.id,h.name,((C=(E=h.labels)==null?void 0:E[0])==null?void 0:C.textContent)??""].map(x=>(x==null?void 0:x.toLowerCase())??"");return A&&(El.male.some(x=>y.some(N=>N.includes(x)))||El.female.some(x=>y.some(N=>N.includes(x))))?!1:d.some(x=>y.some(N=>N.includes(x)))})??null;return{type:"radio",field:null,radioButtons:{male:c(El.male),female:c(El.female),other:c(El.other)}}}return{type:"text",field:this.findInputField(t,Pa.gender,["text"],r)}}filterOutNestedDuplicates(t,r=[]){if(t.length===0)return t;const i=[];for(const o of t){let l=!0;for(const c of r){if(o===c){l=!1;break}if(c.contains(o)){l=!1;break}if(o.contains(c)){l=!1;break}const d=o,A=c;if(A.shadowRoot&&A.shadowRoot.contains(o)){l=!1;break}if(d.shadowRoot&&d.shadowRoot.contains(c)){l=!1;break}const h=this.getActualInputElement(o),y=this.getActualInputElement(c);if(h===y){l=!1;break}}if(l){for(const c of t)if(o!==c){if(o.contains(c)){l=!1;break}const d=o;if(d.shadowRoot&&d.shadowRoot.contains(c)){l=!1;break}}if(l){const c=this.getActualInputElement(o);if(c!==o&&t.includes(c))continue;i.push(o)}}}return i}findPasswordField(t){const r=this.findAllInputFields(t,Pa.password,["password"]),i=this.filterOutNestedDuplicates(r);return{primary:i[0]??null,confirm:i[1]??null}}containsPasswordField(t){const r=this.findPasswordField(t);return!!(r.primary&&this.isElementVisible(r.primary))}containsLikelyUsernameOrEmailField(t){const r=this.findEmailField(t);if(r.primary&&this.isElementVisible(r.primary))return!0;const i=this.findInputField(t,Pa.username,["text"],[]);if(i&&this.isElementVisible(i))return!0;const o=this.findInputField(t,Pa.firstName,["text"],[]);if(o&&this.isElementVisible(o))return!0;const l=this.findInputField(t,Pa.lastName,["text"],[]);return!!(l&&this.isElementVisible(l))}isAutofillTriggerableField(){const t=this.getFormWrapper();if(!this.clickedElement)return!1;const r=this.getActualInputElement(this.clickedElement),i=[this.clickedElement,r].filter((d,A,h)=>d&&h.indexOf(d)===A);if(this.findAllInputFields(t,Pa.username,["text"]).some(d=>i.includes(d)))return!0;const l=this.findPasswordField(t);return!!(l.primary&&i.includes(l.primary)||l.confirm&&i.includes(l.confirm)||this.findAllInputFields(t,Pa.email,["text","email"]).some(d=>i.includes(d)))}detectFormFields(t){const r=[],i=this.findEmailField(t);i.primary&&r.push(i.primary),i.confirm&&r.push(i.confirm);const o=this.findPasswordField(t);o.primary&&r.push(o.primary),o.confirm&&r.push(o.confirm);const l=this.findInputField(t,Pa.username,["text"],r);l&&r.push(l);const c=this.findInputField(t,Pa.fullName,["text"],r);c&&r.push(c);const d=this.findInputField(t,Pa.lastName,["text"],r);d&&r.push(d);const A=this.findInputField(t,Pa.firstName,["text"],r);A&&r.push(A);const h=this.findBirthdateFields(t,r);h.single&&r.push(h.single),h.day&&r.push(h.day),h.month&&r.push(h.month),h.year&&r.push(h.year);const y=this.findGenderField(t,r);return y.field&&r.push(y.field),{form:t,emailField:i.primary,emailConfirmField:i.confirm,usernameField:l,passwordField:o.primary,passwordConfirmField:o.confirm,fullNameField:c,firstNameField:A,lastNameField:d,birthdateField:h,genderField:y}}}class BE{static getServiceInfo(t,r){const i=TE.getSuggestedServiceName(t,r),o=r.href;let l="";try{const c=new URL(o);(c.protocol==="http:"||c.protocol==="https:")&&(l=c.origin+c.pathname,l.endsWith("/")&&(l=l.slice(0,-1)))}catch(c){console.error("Error parsing current URL:",c)}return{suggestedNames:i,currentUrl:o,serviceUrl:l,domain:r.hostname.replace(/^www\./,"")}}static getServiceInfoFromTab(t,r){try{const i=new URL(t),o={href:t,hostname:i.hostname,protocol:i.protocol,pathname:i.pathname,origin:i.origin},l={title:r||i.hostname},c=TE.getSuggestedServiceName(l,o);let d="";return(i.protocol==="http:"||i.protocol==="https:")&&(d=i.origin+i.pathname,d.endsWith("/")&&(d=d.slice(0,-1))),{suggestedNames:c,currentUrl:t,serviceUrl:d,domain:i.hostname.replace(/^www\./,"")}}catch(i){console.error("Error parsing tab URL:",i);const o=t.replace(/^https?:\/\/(www\.)?/,"").split("/")[0];return{suggestedNames:[o],currentUrl:t,serviceUrl:t,domain:o}}}static getEncodedServiceInfo(t,r){const i=this.getServiceInfo(t,r);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(t,r){const i=this.getServiceInfoFromTab(t,r);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 LE=()=>{var wt,Gt,ke,He,it,pt,$,oe,Ee,Fe,_e,Ue,qe,M,w,v,K,ne,me,xe,Pe;const{t:n}=ht(),{id:t}=SA(),r=Fa(),i=ia(),o=t!==void 0&&t.length>0,l=L.useMemo(()=>Ec().shape({Id:an(),ServiceName:an().required(n("credentials.validation.serviceNameRequired")),ServiceUrl:an().nullable().optional(),Alias:Ec().shape({FirstName:an().nullable().optional(),LastName:an().nullable().optional(),NickName:an().nullable().optional(),BirthDate:an().nullable().optional().test("is-valid-date-format",n("credentials.validation.invalidDateFormat"),Ie=>Ie?/^\d{4}-\d{2}-\d{2}$/.test(Ie):!0),Gender:an().nullable().optional(),Email:an().email(n("credentials.validation.invalidEmail")).nullable().optional()}),Username:an().nullable().optional(),Password:an().nullable().optional(),Notes:an().nullable().optional()}),[n]),{executeVaultMutation:c,isLoading:d,syncStatus:A}=qA(),[h,y]=L.useState("random"),{setHeaderButtons:E}=xr(),{setIsInitialLoading:C}=da(),[x,N]=L.useState(!0),[I,k]=L.useState(!o),[S,U]=L.useState(!1),[B,F]=L.useState([]),[Q,V]=L.useState([]),[W,J]=L.useState([]),[z,G]=L.useState([]),[Y,ae]=L.useState({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),[Z,ce]=L.useState(!1),pe=vr(),[X,le]=L.useState({username:null,password:null,email:null}),ge=L.useRef(null),{handleSubmit:je,setValue:P,watch:q,formState:{errors:se}}=LT({resolver:UT(l),defaultValues:{Id:"",Username:"",Password:"",ServiceName:"",ServiceUrl:"https://",Notes:"",Alias:{FirstName:"",LastName:"",NickName:"",BirthDate:"",Gender:void 0,Email:""}}}),we=L.useCallback(async()=>{if(x)return;const Ie=q(),Ye={credentialId:t||null,mode:h,formValues:{...Ie,Logo:null},totpEditorState:Y};await Rt("PERSIST_FORM_VALUES",JSON.stringify(Ye),"background")},[q,t,h,x,Y]);L.useEffect(()=>{x||we()},[h,Y,we,x]),L.useEffect(()=>{const Ie=q(()=>{we()});return()=>Ie.unsubscribe()},[q,we]);const Ce=L.useCallback(async()=>{const Ie=await Rt("GET_PERSISTED_FORM_VALUES",null,"background");try{let Ye=null;try{Ie&&(Ye=JSON.parse(Ie))}catch(Jt){console.error("Error parsing persisted data:",Jt)}if(Ye==null){N(!1);return}const Xe=(Ye==null?void 0:Ye.credentialId)==t;Ye&&Xe?(y(Ye.mode),Object.entries(Ye.formValues).forEach(([Jt,ft])=>{P(Jt,ft)}),Ye.totpEditorState&&ae(Ye.totpEditorState)):console.error("Persisted values do not match current page")}catch(Ye){console.error("Error loading persisted data:",Ye)}N(!1)},[P,t,y,N]),Be=L.useCallback(async()=>{await Rt("CLEAR_PERSISTED_FORM_VALUES",null,"background")},[]);L.useEffect(()=>()=>{Be()},[Be]),L.useEffect(()=>{if(i!=null&&i.sqliteClient){if(!t){const Ie=new URLSearchParams(window.location.search),Ye=Ie.get("serviceName"),nt=Ie.get("serviceUrl"),Xe=Ie.get("currentUrl");(async()=>{try{if(Ye||nt||Xe){if(Ye&&P("ServiceName",decodeURIComponent(Ye)),nt&&P("ServiceUrl",decodeURIComponent(nt)),Xe&&(!Ye||!nt)){const Wt=decodeURIComponent(Xe),Xt=BE.getServiceInfoFromTab(Wt);!Ye&&Xt.suggestedNames.length>0&&P("ServiceName",Xt.suggestedNames[0]),!nt&&Xt.serviceUrl&&P("ServiceUrl",Xt.serviceUrl)}return}const[ft]=await fo.tabs.query({active:!0,currentWindow:!0});if(ft!=null&&ft.url){const Wt=BE.getServiceInfoFromTab(ft.url,ft.title);Wt.suggestedNames.length>0&&P("ServiceName",Wt.suggestedNames[0]),Wt.serviceUrl&&P("ServiceUrl",Wt.serviceUrl)}}catch(ft){console.error("Error detecting service information:",ft)}})(),setTimeout(()=>{var ft;(ft=ge.current)==null||ft.focus()},100),C(!1),fo.storage.local.get([dh]).then(ft=>{ft[dh]?(fo.storage.local.remove([dh]),N(!1)):Ce()});return}try{const Ie=i.sqliteClient.getCredentialById(t);if(Ie){Ie.Alias.BirthDate=ho.normalizeBirthDateForDisplay(Ie.Alias.BirthDate),Object.entries(Ie).forEach(([Xe,Jt])=>{P(Xe,Jt)});const Ye=i.sqliteClient.getAttachmentsForCredential(t);F(Ye),V(Ye.map(Xe=>Xe.Id));const nt=i.sqliteClient.getTotpCodesForCredential(t);J(nt),G(nt.map(Xe=>Xe.Id)),y("manual"),C(!1),Ce()}else console.error("Credential not found"),r("/credentials")}catch(Ie){console.error("Error loading credential:",Ie),C(!1)}}},[i.sqliteClient,t,r,C,P,Ce,Be]);const Le=L.useCallback(async()=>{t&&c(async()=>{i.sqliteClient.deleteCredentialById(t)},{onSuccess:()=>{Be(),r("/credentials")}})},[t,c,i.sqliteClient,r,Be]),Je=L.useCallback(async()=>{const Ie=await i.sqliteClient.getEffectiveIdentityLanguage(),Ye=Rw(Ie),nt=i.sqliteClient.getPasswordSettings(),Xe=ag(nt);return{identityGenerator:Ye,passwordGenerator:Xe}},[i.sqliteClient]),Ke=L.useCallback(async()=>{const{identityGenerator:Ie,passwordGenerator:Ye}=await Je(),nt=i.sqliteClient.getDefaultIdentityGender(),Xe=i.sqliteClient.getDefaultIdentityAgeRange(),Jt=bA(Xe),ft=Ie.generateRandomIdentity(nt,Jt),Wt=Ye.generateRandomPassword(),Xt=await i.sqliteClient.getDefaultEmailDomain(),yn=Xt?`${ft.emailPrefix}@${Xt}`:ft.emailPrefix,ze=q("Username")??"",Nr=q("Password")??"",nr=q("Alias.Email")??"";(!nr||nr===X.email)&&P("Alias.Email",yn),P("Alias.FirstName",ft.firstName),P("Alias.LastName",ft.lastName),P("Alias.NickName",ft.nickName),P("Alias.Gender",ft.gender),P("Alias.BirthDate",ho.normalizeBirthDateForDisplay(ft.birthDate.toISOString())),(!ze||ze===X.username)&&P("Username",ft.nickName),(!Nr||Nr===X.password)&&P("Password",Wt),le({username:ft.nickName,password:Wt,email:yn})},[q,P,Je,i,X,le]),We=L.useCallback(()=>{P("Alias.FirstName",""),P("Alias.LastName",""),P("Alias.NickName",""),P("Alias.Gender",""),P("Alias.BirthDate","")},[P]),dt=!!(q("Alias.FirstName")||q("Alias.LastName")||q("Alias.NickName")||q("Alias.Gender")||q("Alias.BirthDate")),fa=L.useCallback(()=>{dt?We():Ke()},[Ke,We,dt]),kt=L.useCallback(async()=>{try{const Ie=q("Alias.FirstName")??"",Ye=q("Alias.LastName")??"",nt=q("Alias.NickName")??"",Xe=q("Alias.BirthDate")??"";let Jt;if(!Ie&&!Ye&&!nt&&!Xe){const{identityGenerator:ft}=await Je(),Wt=i.sqliteClient.getDefaultIdentityGender(),Xt=i.sqliteClient.getDefaultIdentityAgeRange(),yn=bA(Xt);Jt=ft.generateRandomIdentity(Wt,yn).nickName}else{const ft=Uw();let Wt=ng.Other;try{Wt=q("Alias.Gender")}catch{}let Xt=new Date(Xe);(!Xe||isNaN(Xt.getTime()))&&(Xt=new Date);const yn={firstName:Ie,lastName:Ye,nickName:nt,gender:Wt,birthDate:Xt,emailPrefix:q("Alias.Email")??""};Jt=ft.generateUsername(yn)}P("Username",Jt),le(ft=>({...ft,username:Jt}))}catch(Ie){console.error("Error generating random username:",Ie)}},[P,q,le,Je,i.sqliteClient]),mt=L.useCallback(async Ie=>{let Ye=Ie.Alias.BirthDate;if(Ye&&(Ye=ho.normalizeBirthDateForDb(Ye)),(Ie.ServiceUrl==="http://"||Ie.ServiceUrl==="https://")&&(Ie.ServiceUrl=""),!o&&h==="random"){await Ke(),Ie.Username=q("Username"),Ie.Password=q("Password"),Ie.Alias.FirstName=q("Alias.FirstName"),Ie.Alias.LastName=q("Alias.LastName"),Ie.Alias.NickName=q("Alias.NickName"),Ie.Alias.BirthDate=q("Alias.BirthDate"),Ie.Alias.Gender=q("Alias.Gender"),Ie.Alias.Email=q("Alias.Email");const nt=q("ServiceUrl");Ie.ServiceUrl=nt==="http://"||nt==="https://"?"":nt}if(Ie.ServiceUrl){N(!0);try{const nt=new Promise((ft,Wt)=>setTimeout(()=>Wt(new Error("Favicon extraction timed out")),5e3)),Xe=pe.get("Favicon/Extract?url="+Ie.ServiceUrl),Jt=await Promise.race([Xe,nt]);if(Jt!=null&&Jt.image){const ft=Uint8Array.from(Wr.Buffer.from(Jt.image,"base64"));Ie.Logo=ft}}catch{}}c(async()=>{if(N(!1),o)await i.sqliteClient.updateCredentialById(Ie,Q,B,z,W),Z&&await i.sqliteClient.deletePasskeysByCredentialId(Ie.Id);else{const nt=await i.sqliteClient.createCredential(Ie,B,W);Ie.Id=nt.toString()}},{onSuccess:()=>{Be(),o?r(-1):r(`/credentials/${Ie.Id}`,{replace:!0})}})},[o,i.sqliteClient,c,r,h,q,Ke,pe,Be,Q,B,z,W,Z]);return L.useEffect(()=>{const Ie=f.jsxs("div",{className:"flex items-center gap-2",children:[o&&f.jsx(pn,{onClick:()=>U(!0),title:n("credentials.deleteCredential"),iconType:Ra.DELETE,variant:"danger"}),f.jsx(pn,{onClick:je(mt),title:n("credentials.saveCredential"),iconType:Ra.SAVE})]});return E(Ie),()=>{}},[E,je,mt,o,n]),L.useEffect(()=>()=>E(null),[E]),o&&!q("ServiceName")?f.jsx("div",{children:n("common.loading")}):f.jsxs("form",{onSubmit:je(mt),children:[f.jsx("button",{type:"submit",style:{display:"none"}}),(x||d)&&f.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:[f.jsx($r,{}),f.jsx("div",{className:"text-sm text-gray-500 mt-2",children:A})]}),f.jsx(bc,{isOpen:S,onClose:()=>U(!1),onConfirm:()=>{U(!1),Le()},title:n("credentials.deleteCredentialTitle"),message:n("credentials.deleteCredentialConfirm"),confirmText:n("common.delete"),cancelText:n("common.cancel"),variant:"danger"}),!o&&f.jsxs("div",{className:"flex space-x-2 mb-4",children:[f.jsxs("button",{type:"button",onClick:()=>y("random"),className:`flex-1 py-2 text-sm px-4 rounded flex items-center justify-center gap-2 ${h==="random"?"bg-primary-500 text-white font-medium":"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:[f.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),f.jsx("circle",{cx:"8",cy:"8",r:"1"}),f.jsx("circle",{cx:"16",cy:"8",r:"1"}),f.jsx("circle",{cx:"12",cy:"12",r:"1"}),f.jsx("circle",{cx:"8",cy:"16",r:"1"}),f.jsx("circle",{cx:"16",cy:"16",r:"1"})]}),n("credentials.randomAlias")]}),f.jsxs("button",{type:"button",onClick:()=>y("manual"),className:`flex-1 py-2 text-sm px-4 rounded flex items-center justify-center gap-2 ${h==="manual"?"bg-primary-500 text-white font-medium":"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:[f.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("circle",{cx:"12",cy:"7",r:"4"}),f.jsx("path",{d:"M5.5 20a6.5 6.5 0 0 1 13 0"})]}),n("credentials.manual")]})]}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[f.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.service")}),f.jsxs("div",{className:"space-y-4",children:[f.jsx(gr,{id:"serviceName",label:n("credentials.serviceName"),ref:ge,value:q("ServiceName")??"",onChange:Ie=>P("ServiceName",Ie),required:!0,error:(wt=se.ServiceName)==null?void 0:wt.message}),f.jsx(gr,{id:"serviceUrl",label:n("credentials.serviceUrl"),value:q("ServiceUrl")??"",onChange:Ie=>P("ServiceUrl",Ie),error:(Gt=se.ServiceUrl)==null?void 0:Gt.message})]})]}),(h==="manual"||o)&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[f.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.loginCredentials")}),f.jsx("div",{className:"space-y-4",children:q("HasPasskey")?f.jsxs(f.Fragment,{children:[f.jsx(kE,{id:"username",label:n("common.username"),value:q("Username")??"",onChange:Ie=>P("Username",Ie),error:(ke=se.Username)==null?void 0:ke.message,onRegenerate:kt}),!Z&&f.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:f.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"})}),f.jsxs("div",{className:"flex-1",children:[f.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[f.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n("passkeys.passkey")}),f.jsx("button",{type:"button",onClick:()=>ce(!0),className:"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300",title:"Delete passkey",children:f.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("polyline",{points:"3 6 5 6 21 6"}),f.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"}),f.jsx("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),f.jsx("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]})})]}),f.jsxs("div",{className:"space-y-1 mb-2",children:[q("PasskeyRpId")&&f.jsxs("div",{children:[f.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[n("passkeys.site"),": "]}),f.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:q("PasskeyRpId")})]}),q("PasskeyDisplayName")&&f.jsxs("div",{children:[f.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[n("passkeys.displayName"),": "]}),f.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:q("PasskeyDisplayName")})]})]}),f.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:n("passkeys.helpText")})]})]})}),Z&&f.jsx("div",{className:"p-3 rounded bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("svg",{className:"w-5 h-5 text-red-600 dark:text-red-400 mt-0.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:f.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"})}),f.jsxs("div",{className:"flex-1",children:[f.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[f.jsx("span",{className:"text-sm font-medium text-red-900 dark:text-red-100",children:n("passkeys.passkeyMarkedForDeletion")}),f.jsx("button",{type:"button",onClick:()=>ce(!1),className:"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300",title:"Undo",children:f.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{d:"M3 7v6h6"}),f.jsx("path",{d:"M21 17a9 9 0 00-9-9 9 9 0 00-6 2.3L3 13"})]})})]}),f.jsx("p",{className:"text-xs text-red-800 dark:text-red-200",children:n("passkeys.passkeyWillBeDeleted")})]})]})}),f.jsx(NE,{id:"email",label:n("common.email"),value:q("Alias.Email")??"",onChange:Ie=>P("Alias.Email",Ie),error:(it=(He=se.Alias)==null?void 0:He.Email)==null?void 0:it.message}),f.jsx(IE,{id:"password",label:n("common.password"),value:q("Password")??"",onChange:Ie=>P("Password",Ie),error:(pt=se.Password)==null?void 0:pt.message,showPassword:I,onShowPasswordChange:k})]}):f.jsxs(f.Fragment,{children:[f.jsx(NE,{id:"email",label:n("common.email"),value:q("Alias.Email")??"",onChange:Ie=>P("Alias.Email",Ie),error:(oe=($=se.Alias)==null?void 0:$.Email)==null?void 0:oe.message}),f.jsx(kE,{id:"username",label:n("common.username"),value:q("Username")??"",onChange:Ie=>P("Username",Ie),error:(Ee=se.Username)==null?void 0:Ee.message,onRegenerate:kt}),f.jsx(IE,{id:"password",label:n("common.password"),value:q("Password")??"",onChange:Ie=>P("Password",Ie),error:(Fe=se.Password)==null?void 0:Fe.message,showPassword:I,onShowPasswordChange:k})]})})]}),f.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[f.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.alias")}),f.jsxs("div",{className:"space-y-4",children:[f.jsx("button",{type:"button",onClick:fa,className:`w-full text-sm py-2 px-4 rounded focus:outline-none focus:ring-2 focus:ring-offset-2 flex items-center justify-center gap-2 ${dt?"bg-gray-500 text-white hover:bg-gray-600 focus:ring-gray-500":"bg-primary-500 text-white hover:bg-primary-600 focus:ring-primary-500"}`,children:dt?f.jsxs(f.Fragment,{children:[f.jsxs("svg",{className:"w-5 h-5 inline-block",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),f.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),f.jsx("span",{children:n("credentials.clearAliasFields")})]}):f.jsxs(f.Fragment,{children:[f.jsxs("svg",{className:"w-5 h-5 inline-block",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),f.jsx("circle",{cx:"8",cy:"8",r:"1"}),f.jsx("circle",{cx:"16",cy:"8",r:"1"}),f.jsx("circle",{cx:"12",cy:"12",r:"1"}),f.jsx("circle",{cx:"8",cy:"16",r:"1"}),f.jsx("circle",{cx:"16",cy:"16",r:"1"})]}),f.jsx("span",{children:n("credentials.generateRandomAlias")})]})}),f.jsx(gr,{id:"firstName",label:n("credentials.firstName"),value:q("Alias.FirstName")??"",onChange:Ie=>P("Alias.FirstName",Ie),error:(Ue=(_e=se.Alias)==null?void 0:_e.FirstName)==null?void 0:Ue.message}),f.jsx(gr,{id:"lastName",label:n("credentials.lastName"),value:q("Alias.LastName")??"",onChange:Ie=>P("Alias.LastName",Ie),error:(M=(qe=se.Alias)==null?void 0:qe.LastName)==null?void 0:M.message}),f.jsx(gr,{id:"nickName",label:n("credentials.nickName"),value:q("Alias.NickName")??"",onChange:Ie=>P("Alias.NickName",Ie),error:(v=(w=se.Alias)==null?void 0:w.NickName)==null?void 0:v.message}),f.jsx(gr,{id:"gender",label:n("credentials.gender"),value:q("Alias.Gender")??"",onChange:Ie=>P("Alias.Gender",Ie),error:(ne=(K=se.Alias)==null?void 0:K.Gender)==null?void 0:ne.message}),f.jsx(gr,{id:"birthDate",label:n("credentials.birthDate"),placeholder:n("credentials.birthDatePlaceholder"),value:q("Alias.BirthDate")??"",onChange:Ie=>P("Alias.BirthDate",Ie),error:(xe=(me=se.Alias)==null?void 0:me.BirthDate)==null?void 0:xe.message})]})]}),f.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[f.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.metadata")}),f.jsx("div",{className:"space-y-4",children:f.jsx(gr,{id:"notes",label:n("credentials.notes"),value:q("Notes")??"",onChange:Ie=>P("Notes",Ie),multiline:!0,rows:4,error:(Pe=se.Notes)==null?void 0:Pe.message})})]}),f.jsx(V2,{totpCodes:W,onTotpCodesChange:J,originalTotpCodeIds:z,isAddFormVisible:Y.isAddFormVisible,formData:Y.formData,onStateChange:ae}),f.jsx(MT,{attachments:B,onAttachmentsChange:F,originalAttachmentIds:Q})]})]})]})};class wB{constructor(){Ot(this,"currentCopiedId","");Ot(this,"onCopyCallbacks",[])}setCopied(t){this.currentCopiedId=t,this.notifySubscribers()}getCopiedId(){return this.currentCopiedId}subscribe(t){return this.onCopyCallbacks.push(t),()=>{this.onCopyCallbacks=this.onCopyCallbacks.filter(r=>r!==t)}}notifySubscribers(){this.onCopyCallbacks.forEach(t=>t(this.currentCopiedId))}}const Xu=new wB,eA=({name:n})=>{switch(n){case"visibility":return f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),f.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return f.jsxs(f.Fragment,{children:[f.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"}),f.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"copy":return f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),f.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 f.jsx(f.Fragment,{children:f.jsx("polyline",{points:"20 6 9 17 4 12"})});default:return null}},_i=({id:n,label:t,value:r,type:i="text"})=>{const{t:o}=ht(),[l,c]=L.useState(!1),[d,A]=L.useState(!1);L.useEffect(()=>{const y=Xu.subscribe(E=>{A(E===n)});return()=>{y()}},[n]);const h=async()=>{try{await navigator.clipboard.writeText(r),Xu.setCopied(n),await Rt("CLIPBOARD_COPIED",{value:r},"background"),setTimeout(()=>{Xu.getCopiedId()===n&&Xu.setCopied("")},2e3)}catch(y){console.error("Failed to copy text:",y)}};return f.jsxs("div",{children:[f.jsx("label",{htmlFor:n,className:"block mb-2 text-sm font-medium text-gray-700 dark:text-gray-300",children:t}),f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:i==="password"&&!l?"password":"text",id:n,readOnly:!0,value:r,onClick:h,className:`w-full px-3 py-2.5 bg-white border ${d?"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`}),f.jsxs("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:[d?f.jsx("button",{type:"button",className:"p-1 text-green-500 dark:text-green-400 transition-colors duration-200",title:o("common.copied"),children:f.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx(eA,{name:"check"})})}):f.jsx("button",{type:"button",onClick:h,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:o("common.copyToClipboard"),children:f.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx(eA,{name:"copy"})})}),i==="password"&&f.jsx("button",{type:"button",onClick:()=>c(!l),className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:o(l?"common.hidePassword":"common.showPassword"),children:f.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx(eA,{name:l?"visibility-off":"visibility"})})})]})]})]})},vB=({credential:n})=>{var c,d,A,h,y,E,C,x,N,I,k,S,U;const{t}=ht(),r=!!((d=(c=n.Alias)==null?void 0:c.FirstName)!=null&&d.trim()),i=!!((h=(A=n.Alias)==null?void 0:A.LastName)!=null&&h.trim()),o=!!((E=(y=n.Alias)==null?void 0:y.NickName)!=null&&E.trim()),l=ho.isValidBirthDate((C=n.Alias)==null?void 0:C.BirthDate);return!r&&!i&&!o&&!l?null:f.jsxs("div",{className:"space-y-2",children:[f.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t("common.alias")}),(r||i)&&f.jsx(_i,{id:"fullName",label:t("common.fullName"),value:[(x=n.Alias)==null?void 0:x.FirstName,(N=n.Alias)==null?void 0:N.LastName].filter(Boolean).join(" ")}),r&&f.jsx(_i,{id:"firstName",label:t("common.firstName"),value:((I=n.Alias)==null?void 0:I.FirstName)??""}),i&&f.jsx(_i,{id:"lastName",label:t("common.lastName"),value:((k=n.Alias)==null?void 0:k.LastName)??""}),l&&f.jsx(_i,{id:"birthDate",label:t("common.birthDate"),value:ho.normalizeBirthDateForDisplay((S=n.Alias)==null?void 0:S.BirthDate)}),o&&f.jsx(_i,{id:"nickName",label:t("common.nickname"),value:((U=n.Alias)==null?void 0:U.NickName)??""})]})},CB=({credentialId:n})=>{const{t}=ht(),[r,i]=L.useState([]),[o,l]=L.useState(!0),c=ia(),d=A=>{try{const h=A.Blob instanceof Uint8Array?A.Blob:new Uint8Array(A.Blob),y=new Blob([h]),E=URL.createObjectURL(y),C=document.createElement("a");C.href=E,C.download=A.Filename,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(E)}catch(h){console.error("Error downloading attachment:",h)}};return L.useEffect(()=>{(async()=>{if(c!=null&&c.sqliteClient)try{const h=c.sqliteClient.getAttachmentsForCredential(n);i(h)}catch(h){console.error("Error loading attachments:",h)}finally{l(!1)}})()},[n,c==null?void 0:c.sqliteClient]),o?f.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[f.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:t("common.attachments")}),t("common.loadingAttachments")]}):r.length===0?null:f.jsx("div",{className:"mb-4",children:f.jsxs("div",{className:"space-y-2",children:[f.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("common.attachments")}),f.jsx("div",{className:"grid grid-cols-1 gap-2",children:r.map(A=>f.jsx("button",{className:"w-full text-left p-2 ps-3 pe-3 rounded bg-white dark:bg-gray-800 shadow hover:shadow-md transition-all border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700",onClick:()=>d(A),"aria-label":`Download ${A.Filename}`,children:f.jsxs("div",{className:"flex justify-between items-center gap-2",children:[f.jsx("div",{className:"flex items-center flex-1",children:f.jsxs("div",{className:"flex flex-col",children:[f.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:A.Filename}),f.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(A.CreatedAt).toLocaleDateString()})]})}),f.jsx("div",{className:"flex items-center",children:f.jsx("svg",{className:"w-4 h-4 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.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"})})})]})},A.Id))})]})})},xB=({email:n})=>{const{t}=ht(),[r,i]=L.useState([]),[o,l]=L.useState([]),[c,d]=L.useState(!0),[A,h]=L.useState(0),[y,E]=L.useState(!1),[C,x]=L.useState(null),[N,I]=L.useState(!1),[k,S]=L.useState(2),U=vr(),B=ia(),F=3,Q=k<r.length,V=(G,Y)=>{const ae=G.slice(0,Y);l(ae)},W=()=>{const G=Math.min(k+F,r.length);S(G),V(r,G)},J=async G=>(await Oe.getItem("session:publicEmailDomains")??[]).some(ae=>G.toLowerCase().endsWith(`@${ae.toLowerCase()}`)),z=async G=>(await Oe.getItem("session:privateEmailDomains")??[]).some(ae=>G.toLowerCase().endsWith(`@${ae.toLowerCase()}`));return L.useEffect(()=>{const G=async()=>{var ae;try{x(null);const Z=await J(n),ce=await z(n),pe=Z||ce;if(E(Z),I(pe),!pe)return;if(Z){const X=n.split("@")[0],le=await fetch(`https://api.spamok.com/v2/EmailBox/${X}`,{headers:{"X-Asdasd-Platform-Id":"av-chrome","X-Asdasd-Platform-Version":Ga.VERSION}});if(!le.ok){x(t("emails.errors.emailLoadError"));return}const ge=await le.json(),je=((ae=ge==null?void 0:ge.mails)==null?void 0:ae.toSorted((P,q)=>new Date(q.dateSystem).getTime()-new Date(P.dateSystem).getTime()))??[];c&&je.length>0&&h(je[0].id),i(P=>JSON.stringify(P.map(se=>se.id))!==JSON.stringify(je.map(se=>se.id))?(V(je,k),je):P)}else if(ce)try{const X=await U.authFetch(`EmailBox/${n}`,{method:"GET"},!0,!1);try{const ge=X.mails.toSorted((je,P)=>new Date(P.dateSystem).getTime()-new Date(je.dateSystem).getTime());if(ge){const je=await Ut.decryptEmailList(ge,B.sqliteClient.getAllEncryptionKeys());c&&je.length>0&&h(je[0].id),i(P=>JSON.stringify(P.map(se=>se.id))!==JSON.stringify(je.map(se=>se.id))?(V(je,k),je):P)}}catch{const le=X;x(t("emails.apiErrors."+(le==null?void 0:le.code)));return}}catch{x(t("emails.errors.emailLoadError"));return}}catch(Z){console.error("Error loading emails:",Z),x(t("emails.errors.emailUnexpectedError"))}d(!1)};G();const Y=setInterval(G,2e3);return()=>clearInterval(Y)},[n,c,U,B,t,k]),N?C?f.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[f.jsx("div",{className:"flex items-center gap-2 mb-2",children:f.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.recentEmails")})}),f.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded",children:f.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:C})})]}):c?f.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.recentEmails")}),f.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),t("common.loadingEmails")]}):r.length===0?f.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4 text-sm",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.recentEmails")}),f.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),t("emails.noEmails")]}):f.jsxs("div",{className:"space-y-2 mb-4",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.recentEmails")}),f.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),o.map(G=>y?f.jsxs("a",{href:`https://spamok.com/${n.split("@")[0]}/${G.id}`,target:"_blank",rel:"noopener noreferrer",className:`flex justify-between items-center p-2 ps-3 pe-3 rounded cursor-pointer bg-white dark:bg-gray-800 shadow hover:shadow-md transition-all border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 ${G.id>A?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[f.jsx("div",{className:"truncate flex-1",children:f.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[G.subject.substring(0,30),G.subject.length>30?"...":""]})}),f.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(G.dateSystem).toLocaleDateString()})]},G.id):f.jsxs(Lc,{to:`/emails/${G.id}`,className:`flex justify-between items-center p-2 ps-3 pe-3 rounded cursor-pointer bg-white dark:bg-gray-800 shadow hover:shadow-md transition-all border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 ${G.id>A?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[f.jsx("span",{className:"truncate flex-1",children:f.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[G.subject.substring(0,30),G.subject.length>30?"...":""]})}),f.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(G.dateSystem).toLocaleDateString()})]},G.id)),Q&&f.jsxs("button",{onClick:W,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:[f.jsx("span",{children:t("common.loadMore")}),f.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}):null},NB=({email:n})=>{const t=ia();return(async i=>{var A;const o=(A=i.split("@")[1])==null?void 0:A.toLowerCase();if(!o)return!1;const l=await t.getVaultMetadata(),c=(l==null?void 0:l.publicEmailDomains)??[],d=(l==null?void 0:l.privateEmailDomains)??[];return[...c,...d].some(h=>o===h.toLowerCase())})(n)?f.jsx(f.Fragment,{children:f.jsx(xB,{email:n})}):null},IB=({credential:n})=>f.jsx("div",{className:"flex items-center justify-between",children:f.jsxs("div",{className:"flex items-center",children:[f.jsx("img",{src:Ac.imgSrcFromBytes(n.Logo),alt:n.ServiceName,className:"w-12 h-12 rounded-lg mr-4"}),f.jsxs("div",{children:[f.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:n.ServiceName}),n.ServiceUrl&&(/^https?:\/\//i.test(n.ServiceUrl)?f.jsx("a",{href:n.ServiceUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300 break-all",children:n.ServiceUrl}):f.jsx("span",{className:"text-gray-500 dark:text-gray-300 break-all",children:n.ServiceUrl}))]})]})}),kB=({credential:n})=>{var l,c,d,A;const{t}=ht(),r=(c=(l=n.Alias)==null?void 0:l.Email)==null?void 0:c.trim(),i=(d=n.Username)==null?void 0:d.trim(),o=(A=n.Password)==null?void 0:A.trim();return!r&&!i&&!o&&!n.HasPasskey?null:f.jsxs("div",{className:"space-y-2",children:[f.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t("common.loginCredentials")}),r&&f.jsx(_i,{id:"email",label:t("common.email"),value:r}),i&&f.jsx(_i,{id:"username",label:t("common.username"),value:i}),n.HasPasskey&&f.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:f.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"})}),f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{className:"mb-1",children:f.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:t("passkeys.passkey")})}),f.jsxs("div",{className:"space-y-1 mb-2",children:[n.PasskeyRpId&&f.jsxs("div",{children:[f.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[t("passkeys.site"),": "]}),f.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:n.PasskeyRpId})]}),n.PasskeyDisplayName&&f.jsxs("div",{children:[f.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[t("passkeys.displayName"),": "]}),f.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:n.PasskeyDisplayName})]})]}),f.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:t("passkeys.helpText")})]})]})}),o&&f.jsx(_i,{id:"password",label:t("common.password"),value:o,type:"password"})]})},SB=n=>{const t=/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/g;return n.replace(t,r=>`<a href="${r.startsWith("http")?r:`http://${r}`}" target="_blank" rel="noopener noreferrer" class="text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300">${r}</a>`)},TB=({notes:n})=>{const{t}=ht();if(!n)return null;const r=SB(n);return f.jsxs("div",{children:[f.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t("common.notes")}),f.jsx("div",{className:"p-4 bg-gray-50 rounded-lg dark:bg-gray-700",children:f.jsx("p",{className:"text-gray-900 dark:text-gray-100 whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:r}})})]})},BB=({credentialId:n})=>{const{t}=ht(),[r,i]=L.useState([]),[o,l]=L.useState(!0),[c,d]=L.useState({}),[A,h]=L.useState(null),y=ia(),E=(I=30)=>{const k=new ca({secret:"dummy",algorithm:"SHA1",digits:6,period:I});return k.period-Math.floor(Date.now()/1e3)%k.period},C=()=>{const I=E();return Math.floor((30-I)/30*100)},x=I=>{try{return new ca({secret:I,algorithm:"SHA1",digits:6,period:30}).generate()}catch(k){return console.error("Error generating TOTP code:",k),"Error"}},N=async(I,k)=>{try{await navigator.clipboard.writeText(I),h(k),await Rt("CLIPBOARD_COPIED",{value:I},"background"),setTimeout(()=>{h(null)},2e3)}catch(S){console.error("Failed to copy:",S)}};return L.useEffect(()=>{(async()=>{if(y!=null&&y.sqliteClient)try{const k=y.sqliteClient.getTotpCodesForCredential(n);i(k)}catch(k){console.error("Error loading TOTP codes:",k)}finally{l(!1)}})()},[n,y==null?void 0:y.sqliteClient]),L.useEffect(()=>{const I=U=>{const B={};return r.forEach(F=>{const Q=x(F.SecretKey);Q!=="Error"?B[F.Id]=Q:B[F.Id]=U[F.Id]??"Error"}),B},k={};r.forEach(U=>{k[U.Id]=x(U.SecretKey)}),d(k);const S=setInterval(()=>{d(I)},1e3);return()=>{clearInterval(S)}},[r]),o?f.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[f.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:t("common.twoFactorAuthentication")}),t("common.loadingTotpCodes")]}):r.length===0?null:f.jsx("div",{className:"mb-4",children:f.jsxs("div",{className:"space-y-2",children:[f.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("common.twoFactorAuthentication")}),f.jsx("div",{className:"grid grid-cols-1 gap-2",children:r.map(I=>f.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:()=>N(c[I.Id],I.Id),"aria-label":`Copy ${I.Name} code`,children:f.jsxs("div",{className:"flex justify-between items-center gap-2",children:[f.jsx("div",{className:"flex items-center flex-1",children:f.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:I.Name})}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("div",{className:"flex flex-col items-end",children:[f.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:c[I.Id]}),f.jsx("div",{className:"text-xs",children:A===I.Id?f.jsx("span",{className:"text-green-600 dark:text-green-400",children:t("common.copied")}):f.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[E(),"s"]})})]}),f.jsx("div",{className:"w-1 h-6 bg-gray-200 rounded-full dark:bg-gray-600",children:f.jsx("div",{className:"bg-blue-600 rounded-full transition-all",style:{height:`${C()}%`,width:"100%"}})})]})]})},I.Id))})]})})},LB=()=>{var y;const{t:n}=ht(),{id:t}=SA(),r=Fa(),i=ia(),[o,l]=L.useState(null),{setIsInitialLoading:c}=da(),{setHeaderButtons:d}=xr(),A=L.useCallback(()=>{Da.openInNewPopup(`/credentials/${t}`)},[t]),h=L.useCallback(()=>{r(`/credentials/${t}/edit`)},[t,r]);return L.useEffect(()=>{if(Da.isPopup()&&(window.history.replaceState({},"","popup.html#/credentials"),window.history.pushState({},"",`popup.html#/credentials/${t}`)),!(!(i!=null&&i.sqliteClient)||!t))try{const E=i.sqliteClient.getCredentialById(t);E?(l(E),c(!1)):(console.error("Credential not found"),r("/credentials"))}catch(E){console.error("Error loading credential:",E)}},[i.sqliteClient,t,r,c]),L.useEffect(()=>{const E=f.jsxs("div",{className:"flex items-center gap-2",children:[!Da.isPopup()&&f.jsx(pn,{onClick:A,title:n("common.openInNewWindow"),iconType:Ra.EXPAND}),f.jsx(pn,{onClick:h,title:n("credentials.editCredential"),iconType:Ra.EDIT})]});return d(E),()=>{}},[d,h,A,n]),L.useEffect(()=>()=>d(null),[d]),o?f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"flex justify-between items-center",children:f.jsx(IB,{credential:o})}),((y=o.Alias)==null?void 0:y.Email)&&f.jsx(NB,{email:o.Alias.Email}),f.jsx(BB,{credentialId:o.Id}),f.jsx(kB,{credential:o}),f.jsx(vB,{credential:o}),f.jsx(TB,{notes:o.Notes}),f.jsx(CB,{credentialId:o.Id})]}):f.jsx("div",{children:n("common.loading")})},DB=({credential:n})=>{const t=Fa(),r=o=>{var c;let l="";return o.Username&&(l=o.Username),(c=o.Alias)!=null&&c.Email&&(l=o.Alias.Email),l.length>33?l.slice(0,30)+"...":l},i=o=>{let l="Untitled";return o.ServiceName&&(l=o.ServiceName),l.length>33?l.slice(0,30)+"...":l};return f.jsx("li",{children:f.jsxs("button",{onClick:()=>t(`/credentials/${n.Id}`),className:"w-full p-2 border dark:border-gray-600 rounded flex items-center bg-white dark:bg-gray-800 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",children:[f.jsx("img",{src:Ac.imgSrcFromBytes(n.Logo),alt:n.ServiceName,className:"w-8 h-8 mr-2 flex-shrink-0",onError:o=>{const l=o.target;l.src="/assets/images/service-placeholder.webp"}}),f.jsxs("div",{className:"text-left flex-1",children:[f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:i(n)}),n.HasPasskey&&f.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:f.jsx("path",{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"})}),n.HasAttachment&&f.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:f.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"})})]}),f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r(n)})]})]})})},wA=({onClick:n})=>f.jsxs("div",{className:"px-2 items-center",children:[f.jsxs("div",{className:"relative inline-flex items-center",children:[f.jsx("button",{onClick:n,className:"absolute p-2 hover:bg-gray-200 rounded-2xl",children:f.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:f.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"})})}),f.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:[f.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"}),f.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"})]})]}),f.jsx("span",{className:"sr-only",children:"Loading..."})]}),_c=(n=!1,t=300)=>{const[r,i]=L.useState(n),o=L.useRef(null),l=L.useRef(null),c=L.useCallback(d=>{if(d)i(!0),l.current=Date.now();else{const A=l.current?Date.now()-l.current:0,h=Math.max(0,t-A);h===0?i(!1):(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{i(!1)},h))}},[t]);return L.useEffect(()=>{n&&(i(!0),l.current=Date.now())},[n,i]),L.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]),[r,c]},vA="credentials-filter",RB=5*60*1e3,UB=()=>{try{const n=localStorage.getItem(vA);if(!n)return"all";const{filter:t,timestamp:r}=JSON.parse(n);return Date.now()-r>RB?(localStorage.removeItem(vA),"all"):t}catch{return"all"}},bl=n=>{try{localStorage.setItem(vA,JSON.stringify({filter:n,timestamp:Date.now()}))}catch{}},MB=()=>{const{t:n}=ht(),t=ia(),r=Cr(),i=Fa(),{syncVault:o}=Dc(),{setHeaderButtons:l}=xr(),[c,d]=L.useState([]),[A,h]=L.useState(""),[y,E]=L.useState(UB()),[C,x]=L.useState(!1),{setIsInitialLoading:N}=da(),[I,k]=_c(!0,100),S=L.useCallback(()=>{i("/credentials/add")},[i]),U=L.useCallback(async()=>{if(t!=null&&t.sqliteClient)try{await o({onSuccess:async V=>{},_onOffline:()=>{},onError:async V=>{console.error("Error syncing vault:",V)}})}catch(V){console.error("Error refreshing credentials:",V),await r.logout("Error while syncing vault, please re-authenticate.")}},[t,r,o]),B=L.useCallback(async()=>{k(!0),await U(),k(!1)},[U,k]);L.useEffect(()=>{const V=f.jsxs("div",{className:"flex items-center gap-2",children:[!Da.isPopup()&&f.jsx(pn,{onClick:()=>Da.openInNewPopup(),title:"Open in new window",iconType:Ra.EXPAND}),f.jsx(pn,{onClick:S,title:"Add new credential",iconType:Ra.PLUS})]});return l(V),()=>l(null)},[l,S]),L.useEffect(()=>{(async()=>{var W;if(t!=null&&t.sqliteClient){k(!0);const J=((W=t.sqliteClient)==null?void 0:W.getAllCredentials())??[];d(J),k(!1),N(!1)}})()},[t==null?void 0:t.sqliteClient,k,N]);const F=()=>{switch(y){case"passkeys":return n("credentials.filters.passkeys");case"aliases":return n("credentials.filters.aliases");case"userpass":return n("credentials.filters.userpass");case"attachments":return n("credentials.filters.attachments");default:return n("credentials.title")}},Q=c.filter(V=>{var Y,ae,Z,ce,pe,X,le,ge,je,P,q,se,we,Ce,Be,Le;let W=!0;if(y==="passkeys")W=V.HasPasskey===!0;else if(y==="aliases")W=!!((Y=V.Alias)!=null&&Y.FirstName&&V.Alias.FirstName.trim()||(ae=V.Alias)!=null&&ae.LastName&&V.Alias.LastName.trim()||(Z=V.Alias)!=null&&Z.NickName&&V.Alias.NickName.trim()||(ce=V.Alias)!=null&&ce.Gender&&V.Alias.Gender.trim()||(pe=V.Alias)!=null&&pe.BirthDate&&V.Alias.BirthDate.trim()&&V.Alias.BirthDate.trim().startsWith("0001-01-01")!==!0);else if(y==="userpass"){const Je=!!((X=V.Alias)!=null&&X.FirstName&&V.Alias.FirstName.trim()||(le=V.Alias)!=null&&le.LastName&&V.Alias.LastName.trim()||(ge=V.Alias)!=null&&ge.NickName&&V.Alias.NickName.trim()||(je=V.Alias)!=null&&je.Gender&&V.Alias.Gender.trim()||(P=V.Alias)!=null&&P.BirthDate&&V.Alias.BirthDate.trim()&&V.Alias.BirthDate.trim().startsWith("0001-01-01")!==!0);W=!!(V.Username&&V.Username.trim()||V.Password&&V.Password.trim())&&!V.HasPasskey&&!Je}else y==="attachments"&&(W=V.HasAttachment===!0);if(!W)return!1;const J=A.toLowerCase().trim();if(!J)return!0;const z=[((q=V.ServiceName)==null?void 0:q.toLowerCase())||"",((se=V.Username)==null?void 0:se.toLowerCase())||"",((Ce=(we=V.Alias)==null?void 0:we.Email)==null?void 0:Ce.toLowerCase())||"",((Be=V.ServiceUrl)==null?void 0:Be.toLowerCase())||"",((Le=V.Notes)==null?void 0:Le.toLowerCase())||""];return J.split(/\s+/).filter(Je=>Je.length>0).every(Je=>z.some(Ke=>Ke.includes(Je)))});return I?f.jsx("div",{className:"flex justify-center items-center p-8",children:f.jsx($r,{})}):f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between items-center mb-4",children:[f.jsxs("div",{className:"relative",children:[f.jsxs("button",{onClick:()=>x(!C),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",children:[f.jsxs("h2",{className:"flex items-baseline gap-1.5",children:[F(),f.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["(",Q.length,")"]})]}),f.jsx("svg",{className:"w-4 h-4 mt-1",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),C&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>x(!1)}),f.jsx("div",{className:"absolute left-0 mt-2 w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-20",children:f.jsxs("div",{className:"py-1",children:[f.jsx("button",{onClick:()=>{const V="all";E(V),bl(V),x(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${y==="all"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:n("credentials.filters.all")}),f.jsx("button",{onClick:()=>{const V="passkeys";E(V),bl(V),x(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${y==="passkeys"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:n("credentials.filters.passkeys")}),f.jsx("button",{onClick:()=>{const V="aliases";E(V),bl(V),x(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${y==="aliases"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:n("credentials.filters.aliases")}),f.jsx("button",{onClick:()=>{const V="userpass";E(V),bl(V),x(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${y==="userpass"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:n("credentials.filters.userpass")}),f.jsx("button",{onClick:()=>{const V="attachments";E(V),bl(V),x(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${y==="attachments"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:n("credentials.filters.attachments")})]})})]})]}),f.jsx(wA,{onClick:B})]}),c.length>0?f.jsx("div",{className:"mb-4",children:f.jsx("input",{type:"text",value:A,onChange:V=>h(V.target.value),placeholder:`${n("content.searchVault")}`,autoFocus:!0,className:"w-full p-2 border dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:ring-blue-500 focus:border-blue-500"})}):f.jsx(f.Fragment,{}),c.length===0?f.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:[f.jsx("p",{children:n("credentials.welcomeTitle")}),f.jsx("p",{children:n("credentials.welcomeDescription")})]}):Q.length===0?f.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:f.jsx("p",{children:n(y==="passkeys"?"credentials.noPasskeysFound":y==="attachments"?"credentials.noAttachmentsFound":"credentials.noMatchingCredentials")})}):f.jsx("ul",{className:"space-y-2",children:Q.map(V=>f.jsx(DB,{credential:V},V.Id))})]})},jB=()=>{const{t:n}=ht(),{id:t}=SA(),r=Fa(),i=ia(),o=vr(),[l,c]=L.useState(null),[d,A]=L.useState(null),[h,y]=_c(!0,150),[E,C]=L.useState(!1),[x,N]=L.useState(!1),{setIsInitialLoading:I}=da(),{setHeaderButtons:k}=xr(),[S,U]=L.useState(!1);L.useEffect(()=>{Da.isPopup()&&(window.history.replaceState({},"","popup.html#/emails"),window.history.pushState({},"",`popup.html#/emails/${t}`)),(async()=>{try{if(y(!0),c(null),!(i!=null&&i.sqliteClient)||!t)return;const W=await o.get(`Email/${t}`),J=i.sqliteClient.getAllEncryptionKeys(),z=await Ut.decryptEmail(W,J);A(z)}catch(W){c(W instanceof Error?W.message:"An error occurred")}finally{y(!1),I(!1)}})()},[t,i==null?void 0:i.sqliteClient,o,y,I]);const B=L.useCallback(async()=>{try{await o.delete(`Email/${t}`),Da.isPopup()?window.close():r("/emails")}catch(V){c(V instanceof Error?V.message:"Failed to delete email")}},[t,o,r]),F=L.useCallback(()=>{Da.openInNewPopup(`/emails/${t}`)},[t]),Q=async V=>{try{const W=await o.downloadBlob(`Email/${t}/attachments/${V.id}`);if(!(i!=null&&i.sqliteClient)||!d){c("Database context or email not available");return}const J=i.sqliteClient.getAllEncryptionKeys(),z=await Ut.decryptAttachment(W,d,J);if(!z){c("Failed to decrypt attachment");return}const G=new Blob([new Uint8Array(z)],{type:V.mimeType??"application/octet-stream"}),Y=window.URL.createObjectURL(G),ae=document.createElement("a");ae.href=Y,ae.download=V.filename,document.body.appendChild(ae),ae.click(),window.URL.revokeObjectURL(Y),document.body.removeChild(ae)}catch(W){console.error("handleDownloadAttachment error",W),c(W instanceof Error?W.message:"Failed to download attachment")}};return L.useEffect(()=>{if(!S){const V=f.jsxs("div",{className:"flex items-center gap-2",children:[!Da.isPopup()&&f.jsx(pn,{onClick:F,title:n("common.openInNewWindow"),iconType:Ra.EXPAND}),f.jsx(pn,{onClick:()=>C(!0),title:n("emails.deleteEmailTitle"),iconType:Ra.DELETE,variant:"danger"})]});k(V),U(!0)}return()=>{}},[k,S,F,n]),L.useEffect(()=>()=>k(null),[k]),h?f.jsx("div",{className:"flex justify-center items-center p-8",children:f.jsx($r,{})}):l?f.jsxs("div",{className:"text-red-500",children:[n("common.error")," ",l]}):d?f.jsxs("div",{className:"max-w-4xl mx-auto",children:[f.jsx(bc,{isOpen:E,onClose:()=>C(!1),onConfirm:()=>{C(!1),B()},title:n("emails.deleteEmailTitle"),message:n("emails.deleteEmailConfirm"),confirmText:n("common.delete"),cancelText:n("common.cancel"),variant:"danger"}),f.jsxs("div",{children:[f.jsxs("div",{children:[f.jsx("div",{className:"flex justify-between items-start",children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:d.subject}),f.jsx("button",{onClick:()=>N(!x),className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",title:n(x?"common.hideDetails":"common.showDetails"),children:f.jsx("svg",{className:`w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform ${x?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.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"})})})]})}),x&&f.jsxs("div",{className:"space-y-1 text-sm text-gray-600 dark:text-gray-400 mt-2",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-bold",children:n("emails.from")})," ",f.jsx("span",{title:d.fromLocal+"@"+d.fromDomain,children:d.fromDisplay})]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-bold",children:n("emails.to")})," ",f.jsxs("span",{title:d.toLocal+"@"+d.toDomain,children:[d.toLocal,"@",d.toDomain]})]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-bold",children:n("emails.date")})," ",new Date(d.dateSystem).toLocaleString()]})]})]}),f.jsx("div",{className:"bg-white mt-4",children:d.messageHtml?f.jsx("iframe",{srcDoc:oo.convertAnchorTagsToOpenInNewTab(d.messageHtml),className:"w-full min-h-[500px] border-0",title:n("emails.emailContent")}):f.jsx("pre",{className:"whitespace-pre-wrap text-gray-800 p-3",children:d.messagePlain})}),d.attachments&&d.attachments.length>0&&f.jsxs("div",{className:"p-6 border-t border-gray-200 dark:border-gray-700",children:[f.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("emails.attachments")}),f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4",children:d.attachments.map(V=>f.jsxs("button",{onClick:()=>Q(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:[f.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.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"})}),f.jsxs("span",{children:[V.filename," (",Math.ceil(V.filesize/1024)," KB)"]})]},V.id))})]})]})]}):f.jsx("div",{className:"text-gray-500",children:n("emails.emailNotFound")})},OB=()=>{const{t:n}=ht(),t=ia(),r=vr(),{setHeaderButtons:i}=xr(),[o,l]=L.useState(null),[c,d]=L.useState([]),{setIsInitialLoading:A}=da(),[h,y]=_c(!0,100),E=L.useCallback(async()=>{try{if(y(!0),l(null),!(t!=null&&t.sqliteClient))return;const x=t.sqliteClient.getAllEmailAddresses();try{const N=await r.post("EmailBox/bulk",{addresses:x,page:1,pageSize:50}),I=t.sqliteClient.getAllEncryptionKeys(),k=await Ut.decryptEmailList(N.mails,I);d(k)}catch(N){throw console.error(N),new Error(n("emails.errors.emailLoadError"))}}catch(x){l(x instanceof Error?x.message:n("common.errors.unknownError"))}finally{y(!1),A(!1)}},[t==null?void 0:t.sqliteClient,r,y,A,n]);L.useEffect(()=>{E()},[E]),L.useEffect(()=>{const x=Da.isPopup()?null:f.jsx(pn,{onClick:()=>Da.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Ra.EXPAND});return i(x),()=>{i(null)}},[i,n]);const C=x=>{const N=new Date,I=new Date(x),k=Math.floor((N.getTime()-I.getTime())/1e3);if(k<60)return n("emails.dateFormat.justNow");if(k<3600){const S=Math.floor(k/60);return S===1?n("emails.dateFormat.minutesAgo_single",{count:S}):n("emails.dateFormat.minutesAgo_plural",{count:S})}else if(k<86400){const S=Math.floor(k/3600);return S===1?n("emails.dateFormat.hoursAgo_single",{count:S}):n("emails.dateFormat.hoursAgo_plural",{count:S})}else return k<172800?n("emails.dateFormat.yesterday"):I.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit"})};return h?f.jsx("div",{className:"flex justify-center items-center p-8",children:f.jsx($r,{})}):o?f.jsxs("div",{className:"text-red-500",children:[n("common.error"),": ",o]}):c.length===0?f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between items-center mb-4",children:[f.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("emails.title")}),f.jsx(wA,{onClick:E})]}),f.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:f.jsx("p",{className:"text-sm",children:n("emails.noEmailsDescription")})})]}):f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between items-center mb-4",children:[f.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("emails.title")}),f.jsx(wA,{onClick:E})]}),f.jsx("div",{className:"space-y-2",children:c.map(x=>f.jsxs(Lc,{to:`/emails/${x.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:[f.jsxs("div",{className:"flex justify-between items-start mb-2",children:[f.jsx("div",{className:"text-gray-900 dark:text-white mb-1 font-bold",children:x.subject}),f.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:C(x.dateSystem)})]}),f.jsx("div",{className:"text-gray-600 text-sm dark:text-gray-300 line-clamp-2",children:x.messagePreview})]},x.id))})]})},_B=()=>{const{isFullyInitialized:n}=Qk();return n?f.jsx(Bx,{to:"/reinitialize",replace:!0}):null};var lo=(n=>(n.DEFAULT="default",n.URL_EXACT="url_exact",n.URL_SUBDOMAIN="url_subdomain",n))(lo||{});const PB=new Set(["com","net","org","edu","gov","mil","int","nl","de","uk","fr","it","es","pl","be","ch","at","se","no","dk","fi","pt","gr","cz","hu","ro","bg","hr","sk","si","lt","lv","ee","ie","lu","us","ca","mx","br","ar","cl","co","ve","pe","ec","au","nz","jp","cn","in","kr","tw","hk","sg","my","th","id","ph","vn","za","eg","ng","ke","ug","tz","ma","ru","ua","by","kz","il","tr","sa","ae","qa","kw","app","dev","io","ai","tech","shop","store","online","site","website","blog","news","media","tv","video","music","pro","info","biz","name"]);function FB(n){if(!n.includes(".")||n.startsWith("http://")||n.startsWith("https://"))return!1;const t=n.split(".")[0].toLowerCase();return PB.has(t)}function sg(n){if(!n)return"";let t=n.toLowerCase().trim();return!(t.startsWith("http://")||t.startsWith("https://"))&&FB(t)||(t=t.replace(/^https?:\/\//,""),t=t.replace(/^www\./,""),t=t.split("/")[0],t=t.split("?")[0],t=t.split("#")[0],!t.includes(".")||!/^[a-z0-9.-]+$/.test(t))||t.startsWith(".")||t.endsWith(".")||t.includes("..")?"":t}function og(n){const t=n.split(".");if(t.length<2)return n;const r=new Set(["com.au","net.au","org.au","edu.au","gov.au","asn.au","id.au","co.uk","org.uk","net.uk","ac.uk","gov.uk","plc.uk","ltd.uk","me.uk","co.ca","net.ca","org.ca","gc.ca","ab.ca","bc.ca","mb.ca","nb.ca","nf.ca","nl.ca","ns.ca","nt.ca","nu.ca","on.ca","pe.ca","qc.ca","sk.ca","yk.ca","co.in","net.in","org.in","edu.in","gov.in","ac.in","res.in","gen.in","firm.in","ind.in","co.jp","ne.jp","or.jp","ac.jp","ad.jp","ed.jp","go.jp","gr.jp","lg.jp","co.za","net.za","org.za","edu.za","gov.za","ac.za","web.za","co.nz","net.nz","org.nz","edu.nz","govt.nz","ac.nz","geek.nz","gen.nz","kiwi.nz","maori.nz","mil.nz","school.nz","com.br","net.br","org.br","edu.br","gov.br","mil.br","art.br","etc.br","adv.br","arq.br","bio.br","cim.br","cng.br","cnt.br","ecn.br","eng.br","esp.br","eti.br","far.br","fnd.br","fot.br","fst.br","g12.br","geo.br","ggf.br","jor.br","lel.br","mat.br","med.br","mus.br","not.br","ntr.br","odo.br","ppg.br","pro.br","psc.br","psi.br","qsl.br","rec.br","slg.br","srv.br","tmp.br","trd.br","tur.br","tv.br","vet.br","zlg.br","com.ru","net.ru","org.ru","edu.ru","gov.ru","int.ru","mil.ru","spb.ru","msk.ru","com.cn","net.cn","org.cn","edu.cn","gov.cn","mil.cn","ac.cn","ah.cn","bj.cn","cq.cn","fj.cn","gd.cn","gs.cn","gz.cn","gx.cn","ha.cn","hb.cn","he.cn","hi.cn","hk.cn","hl.cn","hn.cn","jl.cn","js.cn","jx.cn","ln.cn","mo.cn","nm.cn","nx.cn","qh.cn","sc.cn","sd.cn","sh.cn","sn.cn","sx.cn","tj.cn","tw.cn","xj.cn","xz.cn","yn.cn","zj.cn","com.mx","net.mx","org.mx","edu.mx","gob.mx","com.ar","net.ar","org.ar","edu.ar","gov.ar","mil.ar","int.ar","com.cl","net.cl","org.cl","edu.cl","gov.cl","mil.cl","com.co","net.co","org.co","edu.co","gov.co","mil.co","nom.co","com.ve","net.ve","org.ve","edu.ve","gov.ve","mil.ve","web.ve","com.pe","net.pe","org.pe","edu.pe","gob.pe","mil.pe","nom.pe","com.ec","net.ec","org.ec","edu.ec","gov.ec","mil.ec","med.ec","fin.ec","pro.ec","info.ec","co.at","or.at","ac.at","gv.at","priv.at","co.be","ac.be","co.dk","ac.dk","co.il","net.il","org.il","ac.il","gov.il","idf.il","k12.il","muni.il","co.no","ac.no","priv.no","co.pl","net.pl","org.pl","edu.pl","gov.pl","mil.pl","nom.pl","com.pl","co.th","net.th","org.th","edu.th","gov.th","mil.th","ac.th","in.th","co.kr","net.kr","org.kr","edu.kr","gov.kr","mil.kr","ac.kr","go.kr","ne.kr","or.kr","pe.kr","re.kr","seoul.kr","kyonggi.kr","co.id","net.id","org.id","edu.id","gov.id","mil.id","web.id","ac.id","sch.id","co.ma","net.ma","org.ma","edu.ma","gov.ma","ac.ma","press.ma","co.ke","net.ke","org.ke","edu.ke","gov.ke","ac.ke","go.ke","info.ke","me.ke","mobi.ke","sc.ke","co.ug","net.ug","org.ug","edu.ug","gov.ug","ac.ug","sc.ug","go.ug","ne.ug","or.ug","co.tz","net.tz","org.tz","edu.tz","gov.tz","ac.tz","go.tz","hotel.tz","info.tz","me.tz","mil.tz","mobi.tz","ne.tz","or.tz","sc.tz","tv.tz"]);if(t.length>=3){const i=t.slice(-2).join(".");if(r.has(i))return t.slice(-3).join(".")}return t.length>=2?t.slice(-2).join("."):n}const Mw=({origin:n,onChoice:t,onCancel:r})=>{const{t:i}=ht();return f.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4",children:f.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-md w-full p-6",children:[f.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:i("passkeys.bypass.title")}),f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:i("passkeys.bypass.description",{origin:n})}),f.jsxs("div",{className:"space-y-3",children:[f.jsx(Ca,{variant:"primary",onClick:()=>t("once"),children:i("passkeys.bypass.thisTimeOnly")}),f.jsx(Ca,{variant:"secondary",onClick:()=>t("always"),children:i("passkeys.bypass.alwaysForSite")}),f.jsx(Ca,{variant:"secondary",onClick:r,children:i("common.cancel")})]})]})})};function jw(n={}){const{enabled:t=!0}=n,r=sn(),i=Fa(),{dbInitialized:o,dbAvailable:l}=ia();return L.useEffect(()=>{if(!(!t||!o)&&!l){const c=`${r.pathname}${r.search}`;Oe.setItem(mc,c),i("/unlock")}},[t,o,l,r,i]),{isLocked:o&&!l}}async function QB(){const n=await Oe.getItem(mc);return n&&await Oe.removeItem(mc),n}async function HB(){await Oe.removeItem(mc)}const tt=class tt{constructor(){}static async createPasskey(t,r,i){var ce,pe,X,le,ge;tt.pickSupportedAlgorithm(r.publicKey.pubKeyCredParams);const o=((ce=r.publicKey.rp)==null?void 0:ce.id)||new URL(r.origin).hostname,l=new Uint8Array(await crypto.subtle.digest("SHA-256",tt.te(o))),c=await crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"]),d=await crypto.subtle.exportKey("jwk",c.publicKey),A=await crypto.subtle.exportKey("jwk",c.privateKey),h=tt.toB64u(t),y=tt.buildCoseEc2Es256(d);let E=65;const C=(pe=r.publicKey.authenticatorSelection)==null?void 0:pe.userVerification,x=!!(i!=null&&i.uvPerformed);(C==="required"||C==="preferred"&&x)&&(E|=4),E|=8,E|=16;const N=new Uint8Array([0,0,0,0]),I=new Uint8Array([t.length>>8&255,t.length&255]),k=tt.concat(tt.AAGUID,I,t,y),S=tt.concat(l,new Uint8Array([E]),N,k),B={type:"webauthn.create",challenge:tt.challengeToB64u(r.publicKey.challenge),origin:r.origin,crossOrigin:!1},F=JSON.stringify(B),Q=tt.te(F),V=r.publicKey.attestation||"none",W=V==="none"||V==="indirect"?tt.buildAttObjNone(S):await tt.buildAttObjPackedSelf(S,Q,c.privateKey);let J=null;(X=r.publicKey.user)!=null&&X.id&&(J=typeof r.publicKey.user.id=="string"?r.publicKey.user.id:tt.toB64(r.publicKey.user.id instanceof Uint8Array?r.publicKey.user.id:new Uint8Array(r.publicKey.user.id)));let z,G=!1,Y;if(i!=null&&i.enablePrf){const je=new Uint8Array(32);if(crypto.getRandomValues(je),z=tt.toB64u(je),G=!0,i!=null&&i.prfInputs){const P=tt.fromB64u(i.prfInputs.first);if(Y={first:await tt.evaluatePrf(je,P)},i.prfInputs.second){const q=tt.fromB64u(i.prfInputs.second);Y.second=await tt.evaluatePrf(je,q)}}}const ae={rpId:o,credentialId:h,publicKey:d,privateKey:A,userId:J,userName:(le=r.publicKey.user)==null?void 0:le.name,userDisplayName:(ge=r.publicKey.user)==null?void 0:ge.displayName,prfSecret:z};return{credential:{id:h,rawId:h,response:{clientDataJSON:tt.toB64u(Q),attestationObject:tt.toB64u(W)},type:"public-key"},stored:ae,prfEnabled:G,prfResults:Y}}static async getAssertion(t,r,i){const o=r,l=t.publicKey.rpId||new URL(t.origin).hostname,c=new Uint8Array(await crypto.subtle.digest("SHA-256",tt.te(l)));let d=1;const A=t.publicKey.userVerification,h=!!(i!=null&&i.uvPerformed);(A==="required"||A==="preferred"&&h)&&(d|=4),((i==null?void 0:i.includeBEBS)??!0)&&(d|=8,d|=16);const y=new Uint8Array([0,0,0,0]),E=tt.concat(c,new Uint8Array([d]),y),x={type:"webauthn.get",challenge:tt.challengeToB64u(t.publicKey.challenge),origin:t.origin,crossOrigin:!1},N=JSON.stringify(x),I=tt.te(N),k=new Uint8Array(await crypto.subtle.digest("SHA-256",I)),S=tt.concat(E,k),U=await crypto.subtle.importKey("jwk",o.privateKey,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]),B=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},U,S)),F=tt.ecdsaRawToDer(B);let Q=null;o.userId&&(Q=o.userId.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""));let V;if(i!=null&&i.prfInputs&&o.prfSecret){const W=tt.fromB64u(o.prfSecret);if(V={first:await tt.evaluatePrf(W,i.prfInputs.first)},i.prfInputs.second){const z=await tt.evaluatePrf(W,i.prfInputs.second);V.second=z}}return{id:o.credentialId,rawId:o.credentialId,clientDataJSON:tt.toB64u(I),authenticatorData:tt.toB64u(E),signature:tt.toB64u(F),userHandle:Q,prfResults:V}}static async evaluatePrf(t,r){const i=r instanceof Uint8Array?r:new Uint8Array(r),o=tt.te("WebAuthn PRF\0"),l=tt.concat(o,i),c=await crypto.subtle.digest("SHA-256",l),d=await crypto.subtle.importKey("raw",t,{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return await crypto.subtle.sign("HMAC",d,c)}static pickSupportedAlgorithm(t){if(!t||t.length===0)return-7;if(!t.some(i=>i.type==="public-key"&&i.alg===-7))throw new Error("No supported algorithm (ES256) in pubKeyCredParams");return-7}static buildCoseEc2Es256(t){const r=tt.pad32(tt.fromB64u(t.x)),i=tt.pad32(tt.fromB64u(t.y));return new Uint8Array([165,1,2,3,38,32,1,33,88,32,...r,34,88,32,...i])}static buildAttObjNone(t){const r=tt.cborText("fmt"),i=tt.cborText("none"),o=tt.cborText("attStmt"),l=new Uint8Array([160]),c=tt.cborText("authData"),d=tt.cborBstr(t);return tt.concat(new Uint8Array([163]),r,i,o,l,c,d)}static async buildAttObjPackedSelf(t,r,i){const o=new Uint8Array(await crypto.subtle.digest("SHA-256",r)),l=tt.concat(t,o),c=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},i,l)),d=tt.ecdsaRawToDer(c),A=tt.concat(tt.cborText("alg"),new Uint8Array([38]),tt.cborText("sig"),tt.cborBstr(d)),h=tt.concat(new Uint8Array([162]),A),y=tt.cborText("fmt"),E=tt.cborText("packed"),C=tt.cborText("attStmt"),x=tt.cborText("authData"),N=tt.cborBstr(t);return tt.concat(new Uint8Array([163]),y,E,C,h,x,N)}static cborText(t){const r=tt.te(t);return r.length<=23?new Uint8Array([96|r.length,...r]):r.length<=255?new Uint8Array([120,r.length,...r]):new Uint8Array([121,r.length>>8&255,r.length&255,...r])}static cborBstr(t){return t.length<=23?new Uint8Array([64|t.length,...t]):t.length<=255?new Uint8Array([88,t.length,...t]):new Uint8Array([89,t.length>>8&255,t.length&255,...t])}static ecdsaRawToDer(t){if(t.length!==64)throw new Error("Unexpected ECDSA signature length");const r=t.slice(0,32),i=t.slice(32,64),o=tt.derInt(r),l=tt.derInt(i);return new Uint8Array([48,o.length+l.length,...o,...l])}static derInt(t){let r=0;for(;r<t.length-1&&t[r]===0;)r++;let i=t.slice(r);if((i[0]&128)!==0){const o=new Uint8Array(i.length+1);o[0]=0,o.set(i,1),i=o}return new Uint8Array([2,i.length,...i])}static te(t){return new TextEncoder().encode(t)}static toB64(t){let r="";for(let i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);return btoa(r)}static toB64u(t){return tt.toB64(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}static fromB64u(t){const r=t.replace(/-/g,"+").replace(/_/g,"/"),i=r.length%4===2?"==":r.length%4===3?"=":"",o=atob(r+i),l=new Uint8Array(o.length);for(let c=0;c<o.length;c++)l[c]=o.charCodeAt(c);return l}static challengeToB64u(t){if(typeof t=="string")return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");const r=t instanceof Uint8Array?t:new Uint8Array(t);return tt.toB64u(r)}static pad32(t){if(t.length===32)return t;const r=new Uint8Array(32);return r.set(t,32-t.length),r}static concat(...t){const r=t.reduce((l,c)=>l+c.length,0),i=new Uint8Array(r);let o=0;for(const l of t)i.set(l,o),o+=l.length;return i}};Ot(tt,"AAGUID",new Uint8Array([161,26,95,170,159,50,75,140,140,93,47,125,19,232,201,66]));let Nc=tt;class nn{constructor(){}static guidToBytes(t){const r=t.replace(/-/g,"");if(r.length!==32)throw new Error("Invalid GUID format");const i=new Uint8Array(16);for(let o=0;o<16;o++)i[o]=parseInt(r.substr(o*2,2),16);return i}static bytesToGuid(t){if(t.length!==16)throw new Error("Invalid byte length for GUID");const r=Array.from(t).map(i=>i.toString(16).padStart(2,"0")).join("");return[r.substr(0,8),r.substr(8,4),r.substr(12,4),r.substr(16,4),r.substr(20)].join("-").toUpperCase()}static bytesToBase64Url(t){let r="";return t.forEach(o=>r+=String.fromCharCode(o)),btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}static base64UrlToBytes(t){let i=t.replace(/=+$/,"").replace(/-/g,"+").replace(/_/g,"/");for(;i.length%4;)i+="=";const o=atob(i),l=new Uint8Array(o.length);for(let c=0;c<o.length;c++)l[c]=o.charCodeAt(c);return l}static guidToBase64url(t){return this.bytesToBase64Url(this.guidToBytes(t))}static base64urlToGuid(t){return this.bytesToGuid(this.base64UrlToBytes(t))}static arrayBufferToBase64(t){const r=new Uint8Array(t);let i="";for(let o=0;o<r.length;o++)i+=String.fromCharCode(r[o]);return btoa(i)}static bytesToBase64url(t){const r=t instanceof Uint8Array?t:new Uint8Array(t);return this.bytesToBase64Url(r)}static base64urlToBytes(t){return this.base64UrlToBytes(t)}}const zB=()=>{const{t:n}=ht(),t=sn(),{setIsInitialLoading:r}=da(),i=ia(),[o,l]=L.useState(null),[c,d]=L.useState(!1),[A,h]=L.useState(null),[y,E]=L.useState([]),[C,x]=L.useState(!1),{isLocked:N}=jw(),I=L.useRef(null);L.useEffect(()=>{(async()=>{if(!i.dbInitialized||N)return;const V=new URLSearchParams(t.search).get("requestId");if(V)try{const W=await Rt("GET_REQUEST_DATA",{requestId:V},"background");if(W&&W.type==="get"){l(W);const J=W.publicKey.rpId||new URL(W.origin).hostname,z=i.sqliteClient.getPasskeysByRpId(J);let G=z;if(W.publicKey.allowCredentials&&W.publicKey.allowCredentials.length>0){const Y=new Set(W.publicKey.allowCredentials.map(ae=>{try{return nn.base64urlToGuid(ae.id)}catch(Z){return console.warn("Failed to convert credential ID to GUID:",ae.id,Z),null}}).filter(ae=>ae!==null));G=z.filter(ae=>Y.has(ae.Id))}E(G.map(Y=>({id:Y.Id,displayName:Y.DisplayName,serviceName:Y.ServiceName,rpId:Y.RpId,username:Y.Username})))}}catch(W){console.error("Failed to fetch request data:",W),h(n("common.errors.unknownError"))}r(!1)})()},[t,r,i.dbInitialized,N,i.sqliteClient,n]),L.useEffect(()=>{y.length>0&&I.current&&I.current.focus()},[y.length]),L.useEffect(()=>{const F=Q=>{Q.key==="Enter"&&!c&&y.length>0&&k(y[0].id)};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[c,y]);const k=async F=>{var Q,V;if(!(!o||!i.sqliteClient)){d(!0),h(null);try{const W=i.sqliteClient.getPasskeyById(F);if(!W)throw new Error(n("common.errors.unknownError"));const J=JSON.parse(W.PublicKey),z=JSON.parse(W.PrivateKey);let G;if(W.PrfKey)try{G=nn.bytesToBase64url(W.PrfKey)}catch(ge){console.warn("Failed to convert PrfKey to base64url",ge)}let Y=null;if(W.UserHandle)try{const ge=W.UserHandle instanceof Uint8Array?W.UserHandle:new Uint8Array(W.UserHandle);Y=nn.bytesToBase64url(ge)}catch(ge){console.warn("Failed to convert UserHandle to base64",ge)}const ae={rpId:W.RpId,credentialId:nn.guidToBase64url(W.Id),publicKey:J,privateKey:z,userId:Y,userName:W.Username??void 0,userDisplayName:W.ServiceName??void 0,prfSecret:G},Z={origin:o.origin,requestId:o.requestId,publicKey:{rpId:o.publicKey.rpId,challenge:o.publicKey.challenge,userVerification:o.publicKey.userVerification}};let ce;if((V=(Q=o.publicKey.extensions)==null?void 0:Q.prf)!=null&&V.eval){const ge=o.publicKey.extensions.prf.eval.first;let je;if(typeof ge=="object"&&ge!==null&&!Array.isArray(ge)){const P=Object.keys(ge).map(Number).sort((q,se)=>q-se);je=new Uint8Array(P.length);for(let q=0;q<P.length;q++)je[q]=ge[q]}else if(typeof ge=="string"){const P=atob(ge);je=new Uint8Array(P.length);for(let q=0;q<P.length;q++)je[q]=P.charCodeAt(q)}else throw new Error("Unknown PRF input format");if(ce={first:je},o.publicKey.extensions.prf.eval.second){const P=o.publicKey.extensions.prf.eval.second;let q;if(typeof P=="object"&&P!==null&&!Array.isArray(P)){const se=Object.keys(P).map(Number).sort((we,Ce)=>we-Ce);q=new Uint8Array(se.length);for(let we=0;we<se.length;we++)q[we]=P[we]}else if(typeof P=="string"){const se=atob(P);q=new Uint8Array(se.length);for(let we=0;we<se.length;we++)q[we]=se.charCodeAt(we)}else throw console.error("[PasskeyAuth] Unknown PRF second input type:",typeof P),new Error("Unknown PRF second input format");ce.second=q}}const pe=await Nc.getAssertion(Z,ae,{uvPerformed:!0,includeBEBS:!0,prfInputs:ce});let X;pe.prfResults&&(X={first:nn.arrayBufferToBase64(pe.prfResults.first)},pe.prfResults.second&&(X.second=nn.arrayBufferToBase64(pe.prfResults.second)));const le={id:pe.id,rawId:pe.rawId,clientDataJSON:pe.clientDataJSON,authenticatorData:pe.authenticatorData,signature:pe.signature,userHandle:pe.userHandle,prfResults:X};await Rt("PASSKEY_POPUP_RESPONSE",{requestId:o.requestId,credential:le},"background")}catch(W){console.error("PasskeyAuthenticate: Error during authentication",W),d(!1),h(n("common.errors.unknownError"))}}},S=async()=>{x(!0)},U=async F=>{if(o){if(F==="always"){const Q=new URL(o.origin).hostname,V=og(sg(Q)),W=await Oe.getItem(gs)??[];W.includes(V)||(W.push(V),await Oe.setItem(gs,W))}await Rt("PASSKEY_POPUP_RESPONSE",{requestId:o.requestId,fallback:!0},"background")}},B=async()=>{o&&await Rt("PASSKEY_POPUP_RESPONSE",{requestId:o.requestId,cancelled:!0},"background")};return o?f.jsxs(f.Fragment,{children:[C&&o&&f.jsx(Mw,{origin:new URL(o.origin).hostname,onChoice:U,onCancel:()=>x(!1)}),f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"text-center",children:[f.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:n("passkeys.authenticate.title")}),f.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[n("passkeys.authenticate.signInFor")," ",f.jsx("strong",{children:o.origin})]})]}),A&&f.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:f.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:A})}),f.jsx("div",{className:"space-y-4",children:y&&y.length>0?f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:n("passkeys.authenticate.selectPasskey")}),f.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:y.map((F,Q)=>f.jsxs("div",{ref:Q===0?I: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:()=>!c&&k(F.id),onKeyDown:V=>{V.key==="Enter"&&!c&&k(F.id)},children:[f.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:F.serviceName}),f.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:f.jsx("span",{className:"truncate",children:F.displayName})})]},F.id))})]}):f.jsx("div",{className:"text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg",children:f.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:n("passkeys.authenticate.noPasskeysFound")})})}),f.jsxs("div",{className:"space-y-3",children:[f.jsx(Ca,{variant:"secondary",onClick:S,children:n("passkeys.authenticate.useBrowserPasskey")}),f.jsx(Ca,{variant:"secondary",onClick:B,children:n("common.cancel")})]})]})]}):f.jsx("div",{className:"flex justify-center py-8",children:f.jsx($r,{})})},DE=({variant:n,children:t,className:r=""})=>{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 f.jsx("div",{className:`p-3 border rounded-lg ${i[n]} ${r}`,children:f.jsx("p",{className:"text-sm",children:t})})},VB=()=>{var le;const{t:n}=ht(),t=sn(),{setIsInitialLoading:r}=da(),i=ia(),o=vr(),{executeVaultMutation:l,isLoading:c,syncStatus:d}=qA(),[A,h]=L.useState(null),[y,E]=L.useState(""),[C,x]=L.useState(null),{isLocked:N}=jw(),[I,k]=L.useState([]),[S,U]=L.useState(null),[B,F]=L.useState(!1),[Q,V]=L.useState(!1),[W,J]=L.useState(!1),z=L.useRef(null),G=L.useRef(null);L.useEffect(()=>{(async()=>{var q,se,we,Ce,Be,Le,Je,Ke;if(!i.dbInitialized||N)return;const P=new URLSearchParams(t.search).get("requestId");if(P)try{const We=await Rt("GET_REQUEST_DATA",{requestId:P},"background");if(We&&We.type==="create"){h(We);const dt=((se=(q=We.publicKey)==null?void 0:q.rp)==null?void 0:se.name)||((Ce=(we=We.publicKey)==null?void 0:we.rp)==null?void 0:Ce.id)||"Passkey";if(E(dt),i.sqliteClient&&((Le=(Be=We.publicKey)==null?void 0:Be.rp)!=null&&Le.id)){const fa=i.sqliteClient.getPasskeysByRpId(We.publicKey.rp.id);let kt=fa;((Je=We.publicKey.user)!=null&&Je.id||(Ke=We.publicKey.user)!=null&&Ke.name)&&(kt=fa.filter(mt=>{var wt,Gt;if((wt=We.publicKey.user)!=null&&wt.id&&mt.UserHandle)try{const ke=nn.base64urlToBytes(We.publicKey.user.id),He=mt.UserHandle instanceof Uint8Array?mt.UserHandle:new Uint8Array(mt.UserHandle);if(ke.length===He.length&&ke.every((it,pt)=>it===He[pt]))return!0}catch{}return!!((Gt=We.publicKey.user)!=null&&Gt.name&&mt.Username&&mt.Username===We.publicKey.user.name)})),k(kt),kt.length===0&&F(!0)}}}catch(We){console.error("Failed to fetch request data:",We),x(n("common.errors.unknownError"))}r(!1)})()},[t,r,i.dbInitialized,i.sqliteClient,N,n]),L.useEffect(()=>{B&&G.current?G.current.focus():!B&&I.length>0&&z.current&&z.current.focus()},[B,I.length]),L.useEffect(()=>{const ge=je=>{je.key==="Enter"&&!Q&&!c&&B&&Z()};return window.addEventListener("keydown",ge),()=>window.removeEventListener("keydown",ge)},[B,Q,c]);const Y=()=>{U(null),F(!0)},ae=ge=>{U(ge),F(!0)},Z=async()=>{var ge,je;if(!(!A||!i.sqliteClient)){x(null);try{let P;if(A.origin){V(!0);try{const mt=new Promise((ke,He)=>setTimeout(()=>He(new Error("Favicon extraction timed out")),5e3)),wt=o.get("Favicon/Extract?url="+A.origin),Gt=await Promise.race([wt,mt]);if(Gt!=null&&Gt.image){const ke=atob(Gt.image),He=new Uint8Array(ke.length);for(let it=0;it<ke.length;it++)He[it]=ke.charCodeAt(it);P=He}}catch{}}const q={origin:A.origin,requestId:A.requestId,publicKey:{rp:A.publicKey.rp,user:A.publicKey.user,challenge:A.publicKey.challenge,pubKeyCredParams:A.publicKey.pubKeyCredParams,attestation:A.publicKey.attestation,authenticatorSelection:A.publicKey.authenticatorSelection}},se=crypto.randomUUID().toUpperCase(),we=nn.guidToBytes(se),Ce=nn.guidToBase64url(se),Be=(je=(ge=A.publicKey)==null?void 0:ge.extensions)==null?void 0:je.prf,Le=!!Be,Je=Be==null?void 0:Be.eval,Ke=await Nc.createPasskey(we,q,{uvPerformed:!0,credentialIdBytes:16,enablePrf:Le,prfInputs:Je}),{credential:We,stored:dt,prfEnabled:fa,prfResults:kt}=Ke;await l(async()=>{if(S){const mt=i.sqliteClient.getPasskeyById(S);if(mt){await i.sqliteClient.updateCredentialById({Id:mt.CredentialId,ServiceName:y,ServiceUrl:A.origin,Username:A.publicKey.user.name,Password:"",Notes:"",Logo:P??void 0,Alias:{FirstName:"",LastName:"",NickName:"",BirthDate:"0001-01-01 00:00:00",Gender:"",Email:""}},[],[]),await i.sqliteClient.deletePasskeyById(S);let wt=null;if(dt.userId)try{wt=nn.base64urlToBytes(dt.userId)}catch{wt=null}await i.sqliteClient.createPasskey({Id:se,CredentialId:mt.CredentialId,RpId:dt.rpId,UserHandle:wt,PublicKey:JSON.stringify(dt.publicKey),PrivateKey:JSON.stringify(dt.privateKey),DisplayName:A.publicKey.user.displayName||A.publicKey.user.name||"",PrfKey:dt.prfSecret?nn.base64urlToBytes(dt.prfSecret):void 0,AdditionalData:null})}}else{const mt=await i.sqliteClient.createCredential({Id:"",ServiceName:y,ServiceUrl:A.origin,Username:A.publicKey.user.name,Password:"",Notes:"",Logo:P??void 0,Alias:{FirstName:"",LastName:"",NickName:"",BirthDate:"0001-01-01 00:00:00",Gender:"",Email:""}},[]);let wt=null;if(dt.userId)try{wt=nn.base64urlToBytes(dt.userId)}catch{wt=null}await i.sqliteClient.createPasskey({Id:se,CredentialId:mt,RpId:dt.rpId,UserHandle:wt,PublicKey:JSON.stringify(dt.publicKey),PrivateKey:JSON.stringify(dt.privateKey),DisplayName:A.publicKey.user.displayName||A.publicKey.user.name||"",PrfKey:dt.prfSecret?nn.base64urlToBytes(dt.prfSecret):void 0,AdditionalData:null})}},{onSuccess:async()=>{let mt;fa&&(mt={prf:{enabled:!0,results:kt?{first:nn.bytesToBase64url(new Uint8Array(kt.first)),second:kt.second?nn.bytesToBase64url(new Uint8Array(kt.second)):void 0}:void 0}});const wt={id:Ce,rawId:Ce,clientDataJSON:We.response.clientDataJSON,attestationObject:We.response.attestationObject,extensions:mt};await Rt("PASSKEY_POPUP_RESPONSE",{requestId:A.requestId,credential:wt},"background")},onError:mt=>{console.error("PasskeyCreate: Error storing passkey",mt),x(n("common.errors.unknownError"))}})}catch(P){console.error("PasskeyCreate: Error creating passkey",P),x(n("common.errors.unknownError"))}}},ce=async()=>{J(!0)},pe=async ge=>{if(A){if(ge==="always"){const je=new URL(A.origin).hostname,P=og(sg(je)),q=await Oe.getItem(gs)??[];q.includes(P)||(q.push(P),await Oe.setItem(gs,q))}await Rt("PASSKEY_POPUP_RESPONSE",{requestId:A.requestId,fallback:!0},"background")}},X=async()=>{A&&await Rt("PASSKEY_POPUP_RESPONSE",{requestId:A.requestId,cancelled:!0},"background")};return A?f.jsxs(f.Fragment,{children:[W&&A&&f.jsx(Mw,{origin:new URL(A.origin).hostname,onChoice:pe,onCancel:()=>J(!1)}),(Q||c)&&f.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:[f.jsx($r,{}),f.jsx("div",{className:"text-sm text-gray-500 mt-2",children:d})]}),f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"text-center",children:[f.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:n("passkeys.create.title")}),f.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[n("passkeys.create.createFor")," ",f.jsx("strong",{children:A.origin})]})]}),C&&f.jsx(DE,{variant:"error",children:C}),!B&&I.length>0&&f.jsxs("div",{className:"space-y-4",children:[f.jsx(Ca,{variant:"primary",onClick:Y,ref:z,children:n("passkeys.create.createNewPasskey")}),f.jsx(Ca,{variant:"secondary",onClick:ce,children:n("passkeys.create.useBrowserPasskey")}),f.jsxs("div",{className:"relative",children:[f.jsx("div",{className:"absolute inset-0 flex items-center",children:f.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),f.jsx("div",{className:"relative flex justify-center text-sm",children:f.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:n("common.or")})})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:n("passkeys.create.selectPasskeyToReplace")}),f.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(ge=>f.jsx("button",{onClick:()=>ae(ge.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:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:ge.ServiceName}),f.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:f.jsx("span",{className:"truncate",children:ge.DisplayName})})]}),f.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},ge.Id))})]}),f.jsx(Ca,{variant:"secondary",onClick:X,children:n("common.cancel")})]}),B&&f.jsxs("div",{className:"space-y-4",children:[S&&f.jsx(DE,{variant:"warning",children:n("passkeys.create.replacingPasskey",{displayName:((le=I.find(ge=>ge.Id===S))==null?void 0:le.DisplayName)||""})}),f.jsx(gr,{id:"displayName",label:n("passkeys.create.titleLabel"),value:y,onChange:E,placeholder:n("passkeys.create.titlePlaceholder"),ref:G}),f.jsxs("div",{className:"space-y-3",children:[f.jsx(Ca,{variant:"primary",onClick:Z,children:n(S?"passkeys.create.confirmReplace":"passkeys.create.createButton")}),I.length>0?f.jsx(Ca,{variant:"secondary",onClick:()=>{F(!1),U(null)},children:n("common.back")}):f.jsxs(f.Fragment,{children:[f.jsx(Ca,{variant:"secondary",onClick:ce,children:n("passkeys.create.useBrowserPasskey")}),f.jsx(Ca,{variant:"secondary",onClick:X,children:n("common.cancel")})]})]})]})]})]}):f.jsx("div",{className:"flex justify-center py-8",children:f.jsx($r,{})})},RE="session:lastVisitedPage",UE="session:lastVisitedTime",ME="session:navigationHistory",GB=120*1e3,KB=()=>{const n=Fa(),{setIsInitialLoading:t}=da(),{syncVault:r}=Dc(),i=L.useRef(!1),{isInitialized:o,isLoggedIn:l}=Cr(),{dbInitialized:c,dbAvailable:d}=ia(),A=o&&c,h=A&&(!l||!d),y=L.useCallback(async()=>{const[E,C,x]=await Promise.all([Oe.getItem(RE),Oe.getItem(UE),Oe.getItem(ME)]);if(E&&C&&Date.now()-C<=GB){(x==null?void 0:x.length)>1?(n(x[0].pathname,{replace:!0}),n(E,{replace:!1})):n(E,{replace:!0});return}await Promise.all([Oe.removeItem(RE),Oe.removeItem(UE),Oe.removeItem(ME),Rt("CLEAR_PERSISTED_FORM_VALUES",null,"background")]),n("/credentials",{replace:!0})},[n]);return L.useEffect(()=>{(async()=>{const x=new URLSearchParams(window.location.search).get("mode")==="inline_unlock",N=await QB();if(!A)return;const I=!i.current;h?(t(!1),l?d||n("/unlock",{replace:!0}):n("/login",{replace:!0})):I?(i.current=!0,r({initialSync:!1,onSuccess:async()=>{x?(t(!1),n("/unlock-success",{replace:!0})):N?(t(!1),n(N,{replace:!0})):await y()},onError:k=>{console.error("Vault sync error during initialization:",k),y().then(()=>{t(!1)})},onUpgradeRequired:()=>{n("/upgrade",{replace:!0}),t(!1)}})):(t(!1),y())})()},[A,h,l,d,n,t,r,y]),null},qB=()=>{const{t:n}=ht(),{setIsInitialLoading:t}=da(),[r,i]=L.useState({disabledUrls:[],temporaryDisabledUrls:{},currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),[o,l]=L.useState(lo.DEFAULT),c=async()=>{const C={active:!0,currentWindow:!0},[x]=await fo.tabs.query(C);return x},d=L.useCallback(async()=>{const C=await c(),x=new URL(C.url??"").hostname,N=await Oe.getItem(rc)??[],I=await Oe.getItem(Ku)??{},k=await Oe.getItem(gc)!==!1,S=Date.now(),U=Object.fromEntries(Object.entries(I).filter(([F,Q])=>Q>S));Object.keys(U).length!==Object.keys(I).length&&await Oe.setItem(Ku,U);const B=await Oe.getItem(iy)??lo.DEFAULT;l(B),i({disabledUrls:N,temporaryDisabledUrls:U,currentUrl:x,isEnabled:!N.includes(x)&&!(x in U),isGloballyEnabled:k}),t(!1)},[t]);L.useEffect(()=>{d()},[d]);const A=async()=>{const{currentUrl:C,disabledUrls:x,temporaryDisabledUrls:N,isEnabled:I}=r;let k=[...x],S={...N};I?(k.includes(C)||k.push(C),delete S[C]):(k=k.filter(U=>U!==C),delete S[C]),await Oe.setItem(rc,k),await Oe.setItem(Ku,S),i(U=>({...U,disabledUrls:k,temporaryDisabledUrls:S,isEnabled:!I}))},h=async()=>{await Oe.setItem(rc,[]),await Oe.setItem(Ku,{}),i(C=>({...C,disabledUrls:[],temporaryDisabledUrls:{},isEnabled:!0}))},y=async()=>{const C=!r.isGloballyEnabled;await Oe.setItem(gc,C),i(x=>({...x,isGloballyEnabled:C}))},E=async C=>{await Oe.setItem(iy,C),l(C)};return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("section",{children:[f.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.globalSettings")}),f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsx("div",{className:"p-4",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.autofillPopup")}),f.jsx("p",{className:`text-sm mt-1 ${r.isGloballyEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:r.isGloballyEnabled?n("settings.activeOnAllSites"):n("settings.disabledOnAllSites")})]}),f.jsx("button",{onClick:y,className:`px-4 py-2 rounded-md transition-colors ${r.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:r.isGloballyEnabled?n("common.enabled"):n("common.disabled")})]})})})]}),r.isGloballyEnabled&&f.jsxs("section",{children:[f.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.siteSpecificSettings")}),f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsxs("div",{className:"p-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:[n("settings.autofillPopupOn"),r.currentUrl]}),f.jsx("p",{className:`text-sm mt-1 ${r.isEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:r.isEnabled?n("settings.enabledForThisSite"):n("settings.disabledForThisSite")}),!r.isEnabled&&r.temporaryDisabledUrls[r.currentUrl]&&f.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:[n("settings.temporarilyDisabledUntil"),new Date(r.temporaryDisabledUrls[r.currentUrl]).toLocaleTimeString()]})]}),r.isGloballyEnabled&&f.jsx("button",{onClick:A,className:`px-4 py-2 ml-1 rounded-md transition-colors ${r.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:r.isEnabled?n("common.enabled"):n("common.disabled")})]}),f.jsx("div",{className:"mt-4",children:f.jsx("button",{onClick:h,className:"w-full px-4 py-2 bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md text-gray-700 dark:text-gray-300 transition-colors text-sm",children:n("settings.resetAllSiteSettings")})})]})})]}),f.jsxs("section",{children:[f.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.autofillMatching")}),f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsx("div",{className:"p-4",children:f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.autofillMatchingMode")}),f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.autofillMatchingModeDescription")}),f.jsxs("select",{value:o,onChange:C=>E(C.target.value),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[f.jsx("option",{value:lo.DEFAULT,children:n("settings.autofillMatchingDefault")}),f.jsx("option",{value:lo.URL_SUBDOMAIN,children:n("settings.autofillMatchingUrlSubdomain")}),f.jsx("option",{value:lo.URL_EXACT,children:n("settings.autofillMatchingUrlExact")})]})]})})})]})]})},Ow=({title:n,content:t,className:r=""})=>{const{t:i}=ht(),[o,l]=L.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>l(!0),className:`${r}`,type:"button","aria-label":"Help",children:f.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:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o&&f.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4",children:f.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg p-6 max-w-sm w-full",children:[f.jsxs("div",{className:"flex items-center justify-between mb-4",children:[f.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:n}),f.jsx("button",{onClick:()=>l(!1),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","aria-label":i("common.close"),children:f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:t}),f.jsx("button",{onClick:()=>l(!1),className:"mt-4 w-full px-4 py-2 bg-primary-600 hover:bg-primary-700 text-white rounded-md transition-colors",children:i("common.close")})]})})]})},YB=()=>{const{t:n}=ht(),{setIsInitialLoading:t}=da(),[r,i]=L.useState(0);L.useEffect(()=>{(async()=>{const c=await Oe.getItem(ry)??0;i(c),t(!1)})()},[t]);const o=async l=>{await Oe.setItem(ry,l),await Rt("SET_AUTO_LOCK_TIMEOUT",l,"background"),i(l)};return f.jsx("div",{className:"space-y-6",children:f.jsxs("section",{children:[f.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.autoLockTimeout")}),f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsx("div",{className:"p-4",children:f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center mb-2",children:[f.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.autoLockTimeout")}),f.jsx(Ow,{title:n("settings.autoLockTimeout"),content:n("settings.autoLockTimeoutHelp"),className:"ml-2"})]}),f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.autoLockTimeoutDescription")}),f.jsxs("select",{value:r,onChange:l=>o(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:[f.jsx("option",{value:"0",children:n("settings.autoLockNever")}),f.jsx("option",{value:"15",children:n("settings.autoLock15Seconds")}),f.jsx("option",{value:"60",children:n("settings.autoLock1Minute")}),f.jsx("option",{value:"300",children:n("settings.autoLock5Minutes")}),f.jsx("option",{value:"900",children:n("settings.autoLock15Minutes")}),f.jsx("option",{value:"1800",children:n("settings.autoLock30Minutes")}),f.jsx("option",{value:"3600",children:n("settings.autoLock1Hour")}),f.jsx("option",{value:"14400",children:n("settings.autoLock4Hours")}),f.jsx("option",{value:"28800",children:n("settings.autoLock8Hours")}),f.jsx("option",{value:"86400",children:n("settings.autoLock24Hours")})]})]})})})]})})},JB=()=>{const{t:n}=ht(),{setIsInitialLoading:t}=da(),[r,i]=L.useState(10);L.useEffect(()=>{(async()=>{const c=await Oe.getItem(ny)??10;i(c),t(!1)})()},[t]);const o=async l=>{await Oe.setItem(ny,l),await Rt("SET_CLIPBOARD_CLEAR_TIMEOUT",l,"background"),i(l)};return f.jsx("div",{className:"space-y-6",children:f.jsxs("section",{children:[f.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.clipboardSettings")}),f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsx("div",{className:"p-4",children:f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.clipboardClearTimeout")}),f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.clipboardClearTimeoutDescription")}),f.jsxs("select",{value:r,onChange:l=>o(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:[f.jsx("option",{value:"0",children:n("settings.clipboardClearDisabled")}),f.jsx("option",{value:"5",children:n("settings.clipboardClear5Seconds")}),f.jsx("option",{value:"10",children:n("settings.clipboardClear10Seconds")}),f.jsx("option",{value:"15",children:n("settings.clipboardClear15Seconds")})]})]})})})]})})},WB=()=>{const{t:n}=ht(),{setIsInitialLoading:t}=da(),[r,i]=L.useState(!0),o=L.useCallback(async()=>{const c=await Oe.getItem(ay)!==!1;i(c),t(!1)},[t]);L.useEffect(()=>{o()},[o]);const l=async()=>{const c=!r;await Oe.setItem(ay,c),await Rt("TOGGLE_CONTEXT_MENU",{enabled:c},"background"),i(c)};return f.jsx("div",{className:"space-y-6",children:f.jsxs("section",{children:[f.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.contextMenu")}),f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsx("div",{className:"p-4",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.rightClickContextMenu")}),f.jsx("p",{className:`text-sm mt-1 ${r?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:n(r?"settings.contextMenuEnabled":"settings.contextMenuDisabled")}),f.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:n("settings.contextMenuDescription")})]}),f.jsx("button",{onClick:l,className:`px-4 py-2 rounded-md transition-colors ${r?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:n(r?"common.enabled":"common.disabled")})]})})})]})})},XB=()=>{const{t:n}=ht(),{setIsInitialLoading:t}=da();return L.useEffect(()=>{t(!1)},[t]),f.jsx("div",{className:"space-y-6",children:f.jsxs("section",{children:[f.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.language")}),f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsx("div",{className:"p-4",children:f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-3",children:n("settings.selectLanguage")}),f.jsx(Wb,{variant:"dropdown",size:"sm"})]})})})]})})},$B=()=>{const{t:n}=ht(),{setIsInitialLoading:t}=da(),[r,i]=L.useState({disabledUrls:[],currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),o=async()=>{const h={active:!0,currentWindow:!0},[y]=await fo.tabs.query(h);return y},l=L.useCallback(async()=>{const h=await o(),y=new URL(h.url??"").hostname,E=og(sg(y)),C=await Oe.getItem(gs)??[],x=await Oe.getItem(sy)!==!1,N=!C.includes(E);i({disabledUrls:C,currentUrl:E,isEnabled:N,isGloballyEnabled:x}),t(!1)},[t]);L.useEffect(()=>{l()},[l]);const c=async()=>{const{currentUrl:h,disabledUrls:y,isEnabled:E}=r;let C=[...y];E?C.includes(h)||C.push(h):C=C.filter(x=>x!==h),await Oe.setItem(gs,C),i(x=>({...x,disabledUrls:C,isEnabled:!E}))},d=async()=>{await Oe.setItem(gs,[]),i(h=>({...h,disabledUrls:[],isEnabled:!0}))},A=async()=>{const h=!r.isGloballyEnabled;await Oe.setItem(sy,h),i(y=>({...y,isGloballyEnabled:h}))};return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("section",{children:[f.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.globalSettings")}),f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsx("div",{className:"p-4",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("passkeys.settings.passkeyProvider")}),f.jsx("p",{className:`text-sm mt-1 ${r.isGloballyEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:r.isGloballyEnabled?n("settings.activeOnAllSites"):n("settings.disabledOnAllSites")})]}),f.jsx("button",{onClick:A,className:`px-4 py-2 rounded-md transition-colors ${r.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:r.isGloballyEnabled?n("common.enabled"):n("common.disabled")})]})})})]}),r.isGloballyEnabled&&f.jsxs("section",{children:[f.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.siteSpecificSettings")}),f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsxs("div",{className:"p-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:[n("passkeys.settings.passkeyProviderOn"),r.currentUrl]}),f.jsx("p",{className:`text-sm mt-1 ${r.isEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:r.isEnabled?n("settings.enabledForThisSite"):n("settings.disabledForThisSite")})]}),r.isGloballyEnabled&&f.jsx("button",{onClick:c,className:`px-4 py-2 ml-1 rounded-md transition-colors ${r.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:r.isEnabled?n("common.enabled"):n("common.disabled")})]}),f.jsx("div",{className:"mt-4",children:f.jsx("button",{onClick:d,className:"w-full px-4 py-2 bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md text-gray-700 dark:text-gray-300 transition-colors text-sm",children:n("settings.resetAllSiteSettings")})})]})})]})]})},jE="local:theme",_w=L.createContext(void 0),ZB=({children:n})=>{const[t,r]=L.useState("system"),[i,o]=L.useState(!1);L.useEffect(()=>{(async()=>{const y=await c();r(y)})()},[]);const l=L.useCallback(h=>{r(h),d(h)},[]),c=async()=>await Oe.getItem(jE)||"system",d=async h=>{await Oe.setItem(jE,h)};L.useEffect(()=>{const h=()=>{if(t==="system"){const y=window.matchMedia("(prefers-color-scheme: dark)").matches;o(y),document.documentElement.classList.toggle("dark",y)}else{const y=t==="dark";o(y),document.documentElement.classList.toggle("dark",y)}};if(h(),t==="system"){const y=window.matchMedia("(prefers-color-scheme: dark)"),E=()=>h();return y.addEventListener("change",E),()=>y.removeEventListener("change",E)}},[t]);const A=L.useMemo(()=>({theme:t,setTheme:l,isDarkMode:i}),[t,i,l]);return f.jsx(_w.Provider,{value:A,children:n})},eL=()=>{const n=L.useContext(_w);if(n===void 0)throw new Error("useTheme must be used within a ThemeProvider");return n},tL=()=>{var W,J;const{t:n}=ht(),{theme:t,setTheme:r}=eL(),i=Cr(),{setHeaderButtons:o}=xr(),{setIsInitialLoading:l}=da(),{loadApiUrl:c,getDisplayUrl:d}=aw(),A=Fa(),[h,y]=gn.useState(!1),E=async()=>{const z=await Oe.getItem("local:clientUrl");let G=Ga.DEFAULT_CLIENT_URL;z&&z.length>0&&(G=z),window.open(G,"_blank")};L.useEffect(()=>{const z=f.jsxs("div",{className:"flex items-center gap-2",children:[!Da.isPopup()&&f.jsx(f.Fragment,{children:f.jsx(pn,{onClick:()=>Da.openInNewPopup(),title:n("settings.openInNewWindow"),iconType:Ra.EXPAND})}),f.jsx(pn,{onClick:E,title:n("settings.openWebApp"),iconType:Ra.EXTERNAL_LINK})]});return o(z),()=>o(null)},[o,n]);const C=L.useCallback(async()=>{await c(),l(!1)},[l,c]);L.useEffect(()=>{C()},[C]);const x=async z=>{r(z)},N=async()=>{y(!1),i.logout()},I=async()=>{await Rt("CLEAR_VAULT",{},"background"),A("/unlock")},k=()=>{A("/settings/autofill")},S=()=>{A("/settings/clipboard")},U=()=>{A("/settings/language")},B=()=>{A("/settings/auto-lock")},F=()=>{A("/settings/unlock-method")},Q=()=>{A("/settings/context-menu")},V=()=>{A("/settings/passkeys")};return f.jsxs(f.Fragment,{children:[h&&f.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:f.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg p-6 max-w-sm w-full mx-4",children:[f.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:n("auth.logout")}),f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:n("auth.logoutConfirm")}),f.jsxs("div",{className:"flex gap-3",children:[f.jsx("button",{onClick:()=>y(!1),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:n("common.cancel")}),f.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:n("settings.logout")})]})]})}),f.jsxs("div",{className:"space-y-6",children:[f.jsx("div",{className:"flex justify-between items-center mb-4",children:f.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("settings.title")})}),f.jsx("section",{children:f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsx("div",{className:"p-4",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center space-x-3",children:[f.jsx("div",{className:"flex-shrink-0",children:f.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:f.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((J=(W=i.username)==null?void 0:W[0])==null?void 0:J.toUpperCase())||"?"})})}),f.jsxs("div",{children:[f.jsx("p",{className:"text font-medium text-gray-900 dark:text-white",children:i.username}),f.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n("settings.loggedIn")})]})]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{onClick:I,title:n("settings.lock"),className:"p-2 bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-600 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 rounded-md transition-colors",children:f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":n("settings.lock"),children:f.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"})})}),f.jsx("button",{onClick:()=>y(!0),title:n("settings.logout"),className:"p-2 bg-red-100 hover:bg-red-200 dark:bg-red-900/30 dark:hover:bg-red-900/50 text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 rounded-md transition-colors",children:f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":n("settings.logout"),children:f.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"})})})]})]})})})}),f.jsx("section",{children:f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[f.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:[f.jsxs("div",{className:"flex items-center",children:[f.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:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),f.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.unlockMethod.title")})]}),f.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),f.jsxs("button",{onClick:B,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[f.jsxs("div",{className:"flex items-center",children:[f.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:f.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"})}),f.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.autoLockTimeout")})]}),f.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),f.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:[f.jsxs("div",{className:"flex items-center",children:[f.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:f.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"})}),f.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.autofillSettings")})]}),f.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),f.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:[f.jsxs("div",{className:"flex items-center",children:[f.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:f.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"})}),f.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.passkeySettings")})]}),f.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})}),f.jsx("section",{children:f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[f.jsxs("button",{onClick:S,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[f.jsxs("div",{className:"flex items-center",children:[f.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:f.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"})}),f.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.clipboardSettings")})]}),f.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),f.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:[f.jsxs("div",{className:"flex items-center",children:[f.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:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16m-7 6h7"})}),f.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.contextMenuSettings")})]}),f.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),f.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:[f.jsxs("div",{className:"flex items-center",children:[f.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:f.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"})}),f.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.language")})]}),f.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})}),f.jsxs("section",{children:[f.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.appearance")}),f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsx("div",{className:"p-4",children:f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.theme")}),f.jsxs("div",{className:"flex flex-col space-y-2",children:[f.jsxs("label",{className:"flex items-center",children:[f.jsx("input",{type:"radio",name:"theme",value:"system",checked:t==="system",onChange:()=>x("system"),className:"mr-2"}),f.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:n("settings.useDefault")})]}),f.jsxs("label",{className:"flex items-center",children:[f.jsx("input",{type:"radio",name:"theme",value:"light",checked:t==="light",onChange:()=>x("light"),className:"mr-2"}),f.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:n("settings.light")})]}),f.jsxs("label",{className:"flex items-center",children:[f.jsx("input",{type:"radio",name:"theme",value:"dark",checked:t==="dark",onChange:()=>x("dark"),className:"mr-2"}),f.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:n("settings.dark")})]})]})]})})})]}),!1,f.jsxs("div",{className:"text-center text-gray-400 dark:text-gray-600",children:[n("settings.versionPrefix"),Ga.VERSION," (",d(),")"]})]})]})},aL=()=>{const{t:n}=ht(),t=ia(),{setIsInitialLoading:r,showLoading:i,hideLoading:o}=da(),[l,c]=L.useState(void 0),[d,A]=L.useState(null),[h,y]=L.useState(null),[E,C]=L.useState(!1),[x,N]=L.useState(1),[I,k]=L.useState(""),[S,U]=L.useState(""),[B,F]=L.useState(!1),Q=L.useCallback(async()=>{try{const[G,Y]=await Promise.all([Lb(),Rb()]);c(G),F(Y),r(!1)}catch(G){console.error("Failed to load PIN settings:",G),A(n("common.errors.unknownErrorTryAgain")),r(!1)}},[r,n]);L.useEffect(()=>{Q()},[Q]);const V=()=>{if(A(null),y(null),!t.dbAvailable){A(n("common.errors.unknownErrorTryAgain"));return}N(1),k(""),U(""),C(!0)},W=G=>{if(G.preventDefault(),A(null),!PA(I)){A(n("settings.unlockMethod.invalidPinFormat"));return}N(2)},J=async G=>{if(G.preventDefault(),A(null),y(null),I!==S){A(n("settings.unlockMethod.pinMismatch"));return}try{i();const ae=await Oe.getItem("session:encryptionKey");if(!ae){A(n("common.errors.unknownErrorTryAgain")),o();return}await xk(I,ae),c(!0),C(!1),N(1),k(""),U(""),y(n("settings.unlockMethod.enableSuccess")),o()}catch(Y){console.error("Failed to enable PIN:",Y),Y instanceof Tl?A(n("settings.unlockMethod.invalidPinFormat")):A(n("common.errors.unknownErrorTryAgain")),o()}},z=async()=>{A(null),y(null);try{i(),await FA(),c(!1),F(!1),o()}catch(G){console.error("Failed to disable PIN:",G),A(n("common.errors.unknownErrorTryAgain")),o()}};return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"flex items-start gap-2",children:f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("settings.unlockMethod.introText")})}),f.jsxs("div",{className:"mt-6",children:[d&&f.jsx(ds,{type:"error",message:d,className:"mb-4"}),h&&f.jsx(ds,{type:"success",message:h,className:"mb-4"}),B&&f.jsx(ds,{type:"warning",message:n("settings.unlockMethod.pinLocked"),className:"mb-4"}),f.jsx("section",{children:f.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsx("div",{className:"p-4",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center",children:[f.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:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center",children:[f.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.unlockMethod.pin")}),f.jsx(Ow,{title:n("common.notice"),content:n("settings.unlockMethod.pinSecurityWarning"),className:"ml-2"})]}),f.jsx("p",{className:"text-sm mt-1 text-gray-600 dark:text-gray-400",children:n("settings.unlockMethod.pinDescription")})]})]}),l!==void 0&&f.jsx("button",{onClick:l&&!B?z:V,className:`px-4 py-2 rounded-md transition-colors ${l&&!B?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:n(l&&!B?"common.enabled":"common.disabled")})]})})})}),f.jsx("section",{className:"mt-4",children:f.jsx("div",{className:"bg-gray-50 dark:bg-gray-700/30 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:f.jsx("div",{className:"p-4",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center",children:[f.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:f.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"})}),f.jsx("div",{children:f.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.unlockMethod.password")})})]}),f.jsx("div",{className:"px-4 py-2 rounded-md bg-green-500 text-white hover:bg-green-600 cursor-not-allowed",children:n("common.enabled")})]})})})}),E&&f.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:f.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg p-6 max-w-md w-full mx-4 relative",children:[f.jsx("button",{type:"button",onClick:()=>{C(!1),N(1),k(""),U(""),A(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:f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),x===1&&f.jsxs(f.Fragment,{children:[f.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 pr-8",children:n("settings.unlockMethod.setupPin")}),f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:n("settings.unlockMethod.enterNewPinDescription")}),f.jsxs("form",{onSubmit:W,children:[f.jsx("div",{className:"mb-4",children:f.jsx("input",{type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:I,onChange:G=>k(G.target.value.replace(/\D/g,"")),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-center text-2xl tracking-widest",autoFocus:!0})}),d&&f.jsx(ds,{type:"error",message:d,className:"mb-4"}),f.jsx(Ca,{type:"submit",children:n("common.next")})]})]}),x===2&&f.jsxs(f.Fragment,{children:[f.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 pr-8",children:n("settings.unlockMethod.confirmPin")}),f.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:n("settings.unlockMethod.confirmPinDescription")}),f.jsxs("form",{onSubmit:J,children:[f.jsx("div",{className:"mb-4",children:f.jsx("input",{type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:S,onChange:G=>U(G.target.value.replace(/\D/g,"")),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-center text-2xl tracking-widest",autoFocus:!0})}),d&&f.jsx(ds,{type:"error",message:d,className:"mb-4"}),f.jsx(Ca,{type:"submit",children:n("common.confirm")})]})]})]})})]})]})},nL=({routes:n,isLoading:t,message:r,headerButtons:i})=>{const o=sn(),l=n.find(h=>{const y=h.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${y}$`).test(o.pathname)}),c=(l==null?void 0:l.layout)??"default",d=t&&f.jsx("div",{className:"fixed inset-0 bg-white dark:bg-gray-900 z-50 flex items-center justify-center",children:f.jsx($r,{})}),A=f.jsx(Ab,{children:n.map(h=>f.jsx(LA,{path:h.path,element:h.element},h.path))});switch(c){case"passkey":return f.jsxs(Rk,{children:[d,r&&f.jsx("p",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:r}),A]});case"auth":return f.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[d,f.jsx(Pb,{routes:n,rightButtons:i}),f.jsxs("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px",height:"100%"},children:[r&&f.jsx("div",{className:"px-4 pt-0",children:f.jsx("p",{className:"text-red-500 dark:text-red-400 text-sm",children:r})}),A]})]});case"default":default:return f.jsxs(f.Fragment,{children:[d,f.jsx(Dk,{routes:n,headerButtons:i,message:r,children:A})]})}},rL=()=>{const{t:n}=ht(),t=Cr(),{isInitialLoading:r}=da(),[i,o]=_c(!0,150),[l,c]=L.useState(null),{headerButtons:d}=xr(),A=gn.useMemo(()=>[{path:"/",element:f.jsx(_B,{}),showBackButton:!1},{path:"/reinitialize",element:f.jsx(KB,{}),showBackButton:!1},{path:"/login",element:f.jsx(oT,{}),showBackButton:!1,layout:"auth"},{path:"/unlock",element:f.jsx(lT,{}),showBackButton:!1,layout:"auth"},{path:"/unlock-success",element:f.jsx(uT,{}),showBackButton:!1},{path:"/upgrade",element:f.jsx(cT,{}),showBackButton:!1},{path:"/auth-settings",element:f.jsx(CS,{}),showBackButton:!0,title:n("settings.title")},{path:"/credentials",element:f.jsx(MB,{}),showBackButton:!1},{path:"/credentials/add",element:f.jsx(LE,{}),showBackButton:!0,title:n("credentials.addCredential")},{path:"/credentials/:id",element:f.jsx(LB,{}),showBackButton:!0,title:n("credentials.credentialDetails")},{path:"/credentials/:id/edit",element:f.jsx(LE,{}),showBackButton:!0,title:n("credentials.editCredential")},{path:"/passkeys/create",element:f.jsx(VB,{}),layout:"passkey"},{path:"/passkeys/authenticate",element:f.jsx(zB,{}),layout:"passkey"},{path:"/emails",element:f.jsx(OB,{}),showBackButton:!1},{path:"/emails/:id",element:f.jsx(jB,{}),showBackButton:!0,title:n("emails.title")},{path:"/settings",element:f.jsx(tL,{}),showBackButton:!1},{path:"/settings/unlock-method",element:f.jsx(aL,{}),showBackButton:!0,title:n("settings.unlockMethod.title")},{path:"/settings/autofill",element:f.jsx(qB,{}),showBackButton:!0,title:n("settings.autofillSettings")},{path:"/settings/context-menu",element:f.jsx(WB,{}),showBackButton:!0,title:n("settings.contextMenuSettings")},{path:"/settings/clipboard",element:f.jsx(JB,{}),showBackButton:!0,title:n("settings.clipboardSettings")},{path:"/settings/language",element:f.jsx(XB,{}),showBackButton:!0,title:n("settings.language")},{path:"/settings/auto-lock",element:f.jsx(YB,{}),showBackButton:!0,title:n("settings.autoLockTimeout")},{path:"/settings/passkeys",element:f.jsx($B,{}),showBackButton:!0,title:n("settings.passkeySettings")}],[n]);return L.useEffect(()=>{r||o(!1)},[r,o]),L.useEffect(()=>{Rt("POPUP_HEARTBEAT",{},"background").catch(()=>{});const h=setInterval(()=>{Rt("POPUP_HEARTBEAT",{},"background").catch(()=>{})},5e3);return()=>{clearInterval(h)}},[]),L.useEffect(()=>{window.location.hash&&window.location.hash!=="#/"&&window.location.hash!=="#"||HB()},[]),L.useEffect(()=>{t.globalMessage?c(t.globalMessage):c(null)},[t,t.globalMessage]),f.jsx(t1,{children:f.jsx(Fk,{children:f.jsx(nL,{routes:A,isLoading:i,message:l,headerButtons:d})})})},gt=n=>typeof n=="string",wl=()=>{let n,t;const r=new Promise((i,o)=>{n=i,t=o});return r.resolve=n,r.reject=t,r},OE=n=>n==null?"":""+n,iL=(n,t,r)=>{n.forEach(i=>{t[i]&&(r[i]=t[i])})},sL=/###/g,_E=n=>n&&n.indexOf("###")>-1?n.replace(sL,"."):n,PE=n=>!n||gt(n),kl=(n,t,r)=>{const i=gt(t)?t.split("."):t;let o=0;for(;o<i.length-1;){if(PE(n))return{};const l=_E(i[o]);!n[l]&&r&&(n[l]=new r),Object.prototype.hasOwnProperty.call(n,l)?n=n[l]:n={},++o}return PE(n)?{}:{obj:n,k:_E(i[o])}},FE=(n,t,r)=>{const{obj:i,k:o}=kl(n,t,Object);if(i!==void 0||t.length===1){i[o]=r;return}let l=t[t.length-1],c=t.slice(0,t.length-1),d=kl(n,c,Object);for(;d.obj===void 0&&c.length;)l=`${c[c.length-1]}.${l}`,c=c.slice(0,c.length-1),d=kl(n,c,Object),d!=null&&d.obj&&typeof d.obj[`${d.k}.${l}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${l}`]=r},oL=(n,t,r,i)=>{const{obj:o,k:l}=kl(n,t,Object);o[l]=o[l]||[],o[l].push(r)},Ic=(n,t)=>{const{obj:r,k:i}=kl(n,t);if(r&&Object.prototype.hasOwnProperty.call(r,i))return r[i]},lL=(n,t,r)=>{const i=Ic(n,r);return i!==void 0?i:Ic(t,r)},Pw=(n,t,r)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(i in n?gt(n[i])||n[i]instanceof String||gt(t[i])||t[i]instanceof String?r&&(n[i]=t[i]):Pw(n[i],t[i],r):n[i]=t[i]);return n},io=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var uL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const cL=n=>gt(n)?n.replace(/[&<>"'\/]/g,t=>uL[t]):n;class dL{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const i=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,i),this.regExpQueue.push(t),i}}const fL=[" ",",","?","!",";"],hL=new dL(20),AL=(n,t,r)=>{t=t||"",r=r||"";const i=fL.filter(c=>t.indexOf(c)<0&&r.indexOf(c)<0);if(i.length===0)return!0;const o=hL.getRegExp(`(${i.map(c=>c==="?"?"\\?":c).join("|")})`);let l=!o.test(n);if(!l){const c=n.indexOf(r);c>0&&!o.test(n.substring(0,c))&&(l=!0)}return l},CA=(n,t,r=".")=>{if(!n)return;if(n[t])return Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0;const i=t.split(r);let o=n;for(let l=0;l<i.length;){if(!o||typeof o!="object")return;let c,d="";for(let A=l;A<i.length;++A)if(A!==l&&(d+=r),d+=i[A],c=o[d],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&A<i.length-1)continue;l+=A-l+1;break}o=c}return o},Bl=n=>n==null?void 0:n.replace("_","-"),gL={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,t){var r,i;(i=(r=console==null?void 0:console[n])==null?void 0:r.apply)==null||i.call(r,console,t)}};class kc{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||gL,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,i,o){return o&&!this.debug?null:(gt(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new kc(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new kc(this.logger,t)}}var br=new kc;class Pc{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const o=this.observers[i].get(r)||0;this.observers[i].set(r,o+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,l])=>{for(let c=0;c<l;c++)o(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,l])=>{for(let c=0;c<l;c++)o.apply(o,[t,...r])})}}class QE extends Pc{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,i,o={}){var h,y;const l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;t.indexOf(".")>-1?d=t.split("."):(d=[t,r],i&&(Array.isArray(i)?d.push(...i):gt(i)&&l?d.push(...i.split(l)):d.push(i)));const A=Ic(this.data,d);return!A&&!r&&!i&&t.indexOf(".")>-1&&(t=d[0],r=d[1],i=d.slice(2).join(".")),A||!c||!gt(i)?A:CA((y=(h=this.data)==null?void 0:h[t])==null?void 0:y[r],i,l)}addResource(t,r,i,o,l={silent:!1}){const c=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let d=[t,r];i&&(d=d.concat(c?i.split(c):i)),t.indexOf(".")>-1&&(d=t.split("."),o=r,r=d[1]),this.addNamespaces(r),FE(this.data,d,o),l.silent||this.emit("added",t,r,i,o)}addResources(t,r,i,o={silent:!1}){for(const l in i)(gt(i[l])||Array.isArray(i[l]))&&this.addResource(t,r,l,i[l],{silent:!0});o.silent||this.emit("added",t,r,i)}addResourceBundle(t,r,i,o,l,c={silent:!1,skipCopy:!1}){let d=[t,r];t.indexOf(".")>-1&&(d=t.split("."),o=i,i=r,r=d[1]),this.addNamespaces(r);let A=Ic(this.data,d)||{};c.skipCopy||(i=JSON.parse(JSON.stringify(i))),o?Pw(A,i,l):A={...A,...i},FE(this.data,d,A),c.silent||this.emit("added",t,r,i)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(o=>r[o]&&Object.keys(r[o]).length>0)}toJSON(){return this.data}}var Fw={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,t,r,i,o){return n.forEach(l=>{var c;t=((c=this.processors[l])==null?void 0:c.process(t,r,i,o))??t}),t}};const HE={},zE=n=>!gt(n)&&typeof n!="boolean"&&typeof n!="number";class Sc extends Pc{constructor(t,r={}){super(),iL(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=br.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const i={...r};if(t==null)return!1;const o=this.resolve(t,i);return(o==null?void 0:o.res)!==void 0}extractFromKey(t,r){let i=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let l=r.ns||this.options.defaultNS||[];const c=i&&t.indexOf(i)>-1,d=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!AL(t,i,o);if(c&&!d){const A=t.match(this.interpolator.nestingRegexp);if(A&&A.length>0)return{key:t,namespaces:gt(l)?[l]:l};const h=t.split(i);(i!==o||i===o&&this.options.ns.indexOf(h[0])>-1)&&(l=h.shift()),t=h.join(o)}return{key:t,namespaces:gt(l)?[l]:l}}translate(t,r,i){let o=typeof r=="object"?{...r}:r;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(o={...o}),o||(o={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:d,namespaces:A}=this.extractFromKey(t[t.length-1],o),h=A[A.length-1];let y=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const E=o.lng||this.language,C=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((E==null?void 0:E.toLowerCase())==="cimode")return C?l?{res:`${h}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:E,usedNS:h,usedParams:this.getUsedParamsDetails(o)}:`${h}${y}${d}`:l?{res:d,usedKey:d,exactUsedKey:d,usedLng:E,usedNS:h,usedParams:this.getUsedParamsDetails(o)}:d;const x=this.resolve(t,o);let N=x==null?void 0:x.res;const I=(x==null?void 0:x.usedKey)||d,k=(x==null?void 0:x.exactUsedKey)||d,S=["[object Number]","[object Function]","[object RegExp]"],U=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,B=!this.i18nFormat||this.i18nFormat.handleAsObject,F=o.count!==void 0&&!gt(o.count),Q=Sc.hasDefaultValue(o),V=F?this.pluralResolver.getSuffix(E,o.count,o):"",W=o.ordinal&&F?this.pluralResolver.getSuffix(E,o.count,{ordinal:!1}):"",J=F&&!o.ordinal&&o.count===0,z=J&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${V}`]||o[`defaultValue${W}`]||o.defaultValue;let G=N;B&&!N&&Q&&(G=z);const Y=zE(G),ae=Object.prototype.toString.apply(G);if(B&&G&&Y&&S.indexOf(ae)<0&&!(gt(U)&&Array.isArray(G))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(I,G,{...o,ns:A}):`key '${d} (${this.language})' returned an object instead of string.`;return l?(x.res=Z,x.usedParams=this.getUsedParamsDetails(o),x):Z}if(c){const Z=Array.isArray(G),ce=Z?[]:{},pe=Z?k:I;for(const X in G)if(Object.prototype.hasOwnProperty.call(G,X)){const le=`${pe}${c}${X}`;Q&&!N?ce[X]=this.translate(le,{...o,defaultValue:zE(z)?z[X]:void 0,joinArrays:!1,ns:A}):ce[X]=this.translate(le,{...o,joinArrays:!1,ns:A}),ce[X]===le&&(ce[X]=G[X])}N=ce}}else if(B&&gt(U)&&Array.isArray(N))N=N.join(U),N&&(N=this.extendTranslation(N,t,o,i));else{let Z=!1,ce=!1;!this.isValidLookup(N)&&Q&&(Z=!0,N=z),this.isValidLookup(N)||(ce=!0,N=d);const X=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ce?void 0:N,le=Q&&z!==N&&this.options.updateMissing;if(ce||Z||le){if(this.logger.log(le?"updateKey":"missingKey",E,h,d,le?z:N),c){const q=this.resolve(d,{...o,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 ge=[];const je=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&je&&je[0])for(let q=0;q<je.length;q++)ge.push(je[q]);else this.options.saveMissingTo==="all"?ge=this.languageUtils.toResolveHierarchy(o.lng||this.language):ge.push(o.lng||this.language);const P=(q,se,we)=>{var Be;const Ce=Q&&we!==N?we:X;this.options.missingKeyHandler?this.options.missingKeyHandler(q,h,se,Ce,le,o):(Be=this.backendConnector)!=null&&Be.saveMissing&&this.backendConnector.saveMissing(q,h,se,Ce,le,o),this.emit("missingKey",q,h,se,N)};this.options.saveMissing&&(this.options.saveMissingPlurals&&F?ge.forEach(q=>{const se=this.pluralResolver.getSuffixes(q,o);J&&o[`defaultValue${this.options.pluralSeparator}zero`]&&se.indexOf(`${this.options.pluralSeparator}zero`)<0&&se.push(`${this.options.pluralSeparator}zero`),se.forEach(we=>{P([q],d+we,o[`defaultValue${we}`]||z)})}):P(ge,d,z))}N=this.extendTranslation(N,t,o,x,i),ce&&N===d&&this.options.appendNamespaceToMissingKey&&(N=`${h}${y}${d}`),(ce||Z)&&this.options.parseMissingKeyHandler&&(N=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${y}${d}`:d,Z?N:void 0,o))}return l?(x.res=N,x.usedParams=this.getUsedParamsDetails(o),x):N}extendTranslation(t,r,i,o,l){var A,h;if((A=this.i18nFormat)!=null&&A.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const y=gt(t)&&(((h=i==null?void 0:i.interpolation)==null?void 0:h.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let E;if(y){const x=t.match(this.interpolator.nestingRegexp);E=x&&x.length}let C=i.replace&&!gt(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(C={...this.options.interpolation.defaultVariables,...C}),t=this.interpolator.interpolate(t,C,i.lng||this.language||o.usedLng,i),y){const x=t.match(this.interpolator.nestingRegexp),N=x&&x.length;E<N&&(i.nest=!1)}!i.lng&&o&&o.res&&(i.lng=this.language||o.usedLng),i.nest!==!1&&(t=this.interpolator.nest(t,(...x)=>(l==null?void 0:l[0])===x[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${r[0]}`),null):this.translate(...x,r),i)),i.interpolation&&this.interpolator.reset()}const c=i.postProcess||this.options.postProcess,d=gt(c)?[c]:c;return t!=null&&(d!=null&&d.length)&&i.applyPostProcessor!==!1&&(t=Fw.handle(d,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,r={}){let i,o,l,c,d;return gt(t)&&(t=[t]),t.forEach(A=>{if(this.isValidLookup(i))return;const h=this.extractFromKey(A,r),y=h.key;o=y;let E=h.namespaces;this.options.fallbackNS&&(E=E.concat(this.options.fallbackNS));const C=r.count!==void 0&&!gt(r.count),x=C&&!r.ordinal&&r.count===0,N=r.context!==void 0&&(gt(r.context)||typeof r.context=="number")&&r.context!=="",I=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);E.forEach(k=>{var S,U;this.isValidLookup(i)||(d=k,!HE[`${I[0]}-${k}`]&&((S=this.utils)!=null&&S.hasLoadedNamespace)&&!((U=this.utils)!=null&&U.hasLoadedNamespace(d))&&(HE[`${I[0]}-${k}`]=!0,this.logger.warn(`key "${o}" for languages "${I.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),I.forEach(B=>{var V;if(this.isValidLookup(i))return;c=B;const F=[y];if((V=this.i18nFormat)!=null&&V.addLookupKeys)this.i18nFormat.addLookupKeys(F,y,B,k,r);else{let W;C&&(W=this.pluralResolver.getSuffix(B,r.count,r));const J=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(C&&(F.push(y+W),r.ordinal&&W.indexOf(z)===0&&F.push(y+W.replace(z,this.options.pluralSeparator)),x&&F.push(y+J)),N){const G=`${y}${this.options.contextSeparator}${r.context}`;F.push(G),C&&(F.push(G+W),r.ordinal&&W.indexOf(z)===0&&F.push(G+W.replace(z,this.options.pluralSeparator)),x&&F.push(G+J))}}let Q;for(;Q=F.pop();)this.isValidLookup(i)||(l=Q,i=this.getResource(B,k,Q,r))}))})}),{res:i,usedKey:o,exactUsedKey:l,usedLng:c,usedNS:d}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,i,o={}){var l;return(l=this.i18nFormat)!=null&&l.getResource?this.i18nFormat.getResource(t,r,i,o):this.resourceStore.getResource(t,r,i,o)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!gt(t.replace);let o=i?t.replace:t;if(i&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!i){o={...o};for(const l of r)delete o[l]}return o}static hasDefaultValue(t){const r="defaultValue";for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&r===i.substring(0,r.length)&&t[i]!==void 0)return!0;return!1}}class VE{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=br.create("languageUtils")}getScriptPartFromCode(t){if(t=Bl(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=Bl(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(gt(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(i=>{if(r)return;const o=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(o))&&(r=o)}),!r&&this.options.supportedLngs&&t.forEach(i=>{if(r)return;const o=this.getScriptPartFromCode(i);if(this.isSupportedCode(o))return r=o;const l=this.getLanguagePartFromCode(i);if(this.isSupportedCode(l))return r=l;r=this.options.supportedLngs.find(c=>{if(c===l)return c;if(!(c.indexOf("-")<0&&l.indexOf("-")<0)&&(c.indexOf("-")>0&&l.indexOf("-")<0&&c.substring(0,c.indexOf("-"))===l||c.indexOf(l)===0&&l.length>1))return c})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),gt(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let i=t[r];return i||(i=t[this.getScriptPartFromCode(r)]),i||(i=t[this.formatLanguageCode(r)]),i||(i=t[this.getLanguagePartFromCode(r)]),i||(i=t.default),i||[]}toResolveHierarchy(t,r){const i=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),o=[],l=c=>{c&&(this.isSupportedCode(c)?o.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return gt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(t))):gt(t)&&l(this.formatLanguageCode(t)),i.forEach(c=>{o.indexOf(c)<0&&l(this.formatLanguageCode(c))}),o}}const GE={zero:0,one:1,two:2,few:3,many:4,other:5},KE={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class mL{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=br.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const i=Bl(t==="dev"?"en":t),o=r.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:i,type:o});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let c;try{c=new Intl.PluralRules(i,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),KE;if(!t.match(/-|_/))return KE;const A=this.languageUtils.getLanguagePartFromCode(t);c=this.getRule(A,r)}return this.pluralRulesCache[l]=c,c}needsPlural(t,r={}){let i=this.getRule(t,r);return i||(i=this.getRule("dev",r)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,r,i={}){return this.getSuffixes(t,i).map(o=>`${r}${o}`)}getSuffixes(t,r={}){let i=this.getRule(t,r);return i||(i=this.getRule("dev",r)),i?i.resolvedOptions().pluralCategories.sort((o,l)=>GE[o]-GE[l]).map(o=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,r,i={}){const o=this.getRule(t,i);return o?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${o.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,i))}}const qE=(n,t,r,i=".",o=!0)=>{let l=lL(n,t,r);return!l&&o&&gt(r)&&(l=CA(n,r,i),l===void 0&&(l=CA(t,r,i))),l},tA=n=>n.replace(/\$/g,"$$$$");class pL{constructor(t={}){var r;this.logger=br.create("interpolator"),this.options=t,this.format=((r=t==null?void 0:t.interpolation)==null?void 0:r.format)||(i=>i),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:i,useRawValueToEscape:o,prefix:l,prefixEscaped:c,suffix:d,suffixEscaped:A,formatSeparator:h,unescapeSuffix:y,unescapePrefix:E,nestingPrefix:C,nestingPrefixEscaped:x,nestingSuffix:N,nestingSuffixEscaped:I,nestingOptionsSeparator:k,maxReplaces:S,alwaysFormat:U}=t.interpolation;this.escape=r!==void 0?r:cL,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=l?io(l):c||"{{",this.suffix=d?io(d):A||"}}",this.formatSeparator=h||",",this.unescapePrefix=y?"":E||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=C?io(C):x||io("$t("),this.nestingSuffix=N?io(N):I||io(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=S||1e3,this.alwaysFormat=U!==void 0?U:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,i)=>(r==null?void 0:r.source)===i?(r.lastIndex=0,r):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,r,i,o){var x;let l,c,d;const A=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=N=>{if(N.indexOf(this.formatSeparator)<0){const U=qE(r,A,N,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(U,void 0,i,{...o,...r,interpolationkey:N}):U}const I=N.split(this.formatSeparator),k=I.shift().trim(),S=I.join(this.formatSeparator).trim();return this.format(qE(r,A,k,this.options.keySeparator,this.options.ignoreJSONStructure),S,i,{...o,...r,interpolationkey:k})};this.resetRegExp();const y=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,E=((x=o==null?void 0:o.interpolation)==null?void 0:x.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:N=>tA(N)},{regex:this.regexp,safeValue:N=>this.escapeValue?tA(this.escape(N)):tA(N)}].forEach(N=>{for(d=0;l=N.regex.exec(t);){const I=l[1].trim();if(c=h(I),c===void 0)if(typeof y=="function"){const S=y(t,l,o);c=gt(S)?S:""}else if(o&&Object.prototype.hasOwnProperty.call(o,I))c="";else if(E){c=l[0];continue}else this.logger.warn(`missed to pass in variable ${I} for interpolating ${t}`),c="";else!gt(c)&&!this.useRawValueToEscape&&(c=OE(c));const k=N.safeValue(c);if(t=t.replace(l[0],k),E?(N.regex.lastIndex+=c.length,N.regex.lastIndex-=l[0].length):N.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),t}nest(t,r,i={}){let o,l,c;const d=(A,h)=>{const y=this.nestingOptionsSeparator;if(A.indexOf(y)<0)return A;const E=A.split(new RegExp(`${y}[ ]*{`));let C=`{${E[1]}`;A=E[0],C=this.interpolate(C,c);const x=C.match(/'/g),N=C.match(/"/g);(((x==null?void 0:x.length)??0)%2===0&&!N||N.length%2!==0)&&(C=C.replace(/'/g,'"'));try{c=JSON.parse(C),h&&(c={...h,...c})}catch(I){return this.logger.warn(`failed parsing options string in nesting for key ${A}`,I),`${A}${y}${C}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,A};for(;o=this.nestingRegexp.exec(t);){let A=[];c={...i},c=c.replace&&!gt(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const h=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(h!==-1&&(A=o[1].slice(h).split(this.formatSeparator).map(y=>y.trim()).filter(Boolean),o[1]=o[1].slice(0,h)),l=r(d.call(this,o[1].trim(),c),c),l&&o[0]===t&&!gt(l))return l;gt(l)||(l=OE(l)),l||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),l=""),A.length&&(l=A.reduce((y,E)=>this.format(y,E,i.lng,{...i,interpolationkey:o[1].trim()}),l.trim())),t=t.replace(o[0],l),this.regexp.lastIndex=0}return t}}const yL=n=>{let t=n.toLowerCase().trim();const r={};if(n.indexOf("(")>-1){const i=n.split("(");t=i[0].toLowerCase().trim();const o=i[1].substring(0,i[1].length-1);t==="currency"&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(c=>{if(c){const[d,...A]=c.split(":"),h=A.join(":").trim().replace(/^'+|'+$/g,""),y=d.trim();r[y]||(r[y]=h),h==="false"&&(r[y]=!1),h==="true"&&(r[y]=!0),isNaN(h)||(r[y]=parseInt(h,10))}})}return{formatName:t,formatOptions:r}},YE=n=>{const t={};return(r,i,o)=>{let l=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(l={...l,[o.interpolationkey]:void 0});const c=i+JSON.stringify(l);let d=t[c];return d||(d=n(Bl(i),o),t[c]=d),d(r)}},EL=n=>(t,r,i)=>n(Bl(r),i)(t);class bL{constructor(t={}){this.logger=br.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const i=r.cacheInBuiltFormats?YE:EL;this.formats={number:i((o,l)=>{const c=new Intl.NumberFormat(o,{...l});return d=>c.format(d)}),currency:i((o,l)=>{const c=new Intl.NumberFormat(o,{...l,style:"currency"});return d=>c.format(d)}),datetime:i((o,l)=>{const c=new Intl.DateTimeFormat(o,{...l});return d=>c.format(d)}),relativetime:i((o,l)=>{const c=new Intl.RelativeTimeFormat(o,{...l});return d=>c.format(d,l.range||"day")}),list:i((o,l)=>{const c=new Intl.ListFormat(o,{...l});return d=>c.format(d)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=YE(r)}format(t,r,i,o={}){const l=r.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(d=>d.indexOf(")")>-1)){const d=l.findIndex(A=>A.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,d)].join(this.formatSeparator)}return l.reduce((d,A)=>{var E;const{formatName:h,formatOptions:y}=yL(A);if(this.formats[h]){let C=d;try{const x=((E=o==null?void 0:o.formatParams)==null?void 0:E[o.interpolationkey])||{},N=x.locale||x.lng||o.locale||o.lng||i;C=this.formats[h](d,N,{...y,...o,...x})}catch(x){this.logger.warn(x)}return C}else this.logger.warn(`there was no format function for ${h}`);return d},t)}}const wL=(n,t)=>{n.pending[t]!==void 0&&(delete n.pending[t],n.pendingCount--)};class vL extends Pc{constructor(t,r,i,o={}){var l,c;super(),this.backend=t,this.store=r,this.services=i,this.languageUtils=i.languageUtils,this.options=o,this.logger=br.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(c=(l=this.backend)==null?void 0:l.init)==null||c.call(l,i,o.backend,o)}queueLoad(t,r,i,o){const l={},c={},d={},A={};return t.forEach(h=>{let y=!0;r.forEach(E=>{const C=`${h}|${E}`;!i.reload&&this.store.hasResourceBundle(h,E)?this.state[C]=2:this.state[C]<0||(this.state[C]===1?c[C]===void 0&&(c[C]=!0):(this.state[C]=1,y=!1,c[C]===void 0&&(c[C]=!0),l[C]===void 0&&(l[C]=!0),A[E]===void 0&&(A[E]=!0)))}),y||(d[h]=!0)}),(Object.keys(l).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(l),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(A)}}loaded(t,r,i){const o=t.split("|"),l=o[0],c=o[1];r&&this.emit("failedLoading",l,c,r),!r&&i&&this.store.addResourceBundle(l,c,i,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&i&&(this.state[t]=0);const d={};this.queue.forEach(A=>{oL(A.loaded,[l],c),wL(A,t),r&&A.errors.push(r),A.pendingCount===0&&!A.done&&(Object.keys(A.loaded).forEach(h=>{d[h]||(d[h]={});const y=A.loaded[h];y.length&&y.forEach(E=>{d[h][E]===void 0&&(d[h][E]=!0)})}),A.done=!0,A.errors.length?A.callback(A.errors):A.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(A=>!A.done)}read(t,r,i,o=0,l=this.retryTimeout,c){if(!t.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:i,tried:o,wait:l,callback:c});return}this.readingCalls++;const d=(h,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const E=this.waitingReads.shift();this.read(E.lng,E.ns,E.fcName,E.tried,E.wait,E.callback)}if(h&&y&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,i,o+1,l*2,c)},l);return}c(h,y)},A=this.backend[i].bind(this.backend);if(A.length===2){try{const h=A(t,r);h&&typeof h.then=="function"?h.then(y=>d(null,y)).catch(d):d(null,h)}catch(h){d(h)}return}return A(t,r,d)}prepareLoading(t,r,i={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();gt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),gt(r)&&(r=[r]);const l=this.queueLoad(t,r,i,o);if(!l.toLoad.length)return l.pending.length||o(),null;l.toLoad.forEach(c=>{this.loadOne(c)})}load(t,r,i){this.prepareLoading(t,r,{},i)}reload(t,r,i){this.prepareLoading(t,r,{reload:!0},i)}loadOne(t,r=""){const i=t.split("|"),o=i[0],l=i[1];this.read(o,l,"read",void 0,void 0,(c,d)=>{c&&this.logger.warn(`${r}loading namespace ${l} for language ${o} failed`,c),!c&&d&&this.logger.log(`${r}loaded namespace ${l} for language ${o}`,d),this.loaded(t,c,d)})}saveMissing(t,r,i,o,l,c={},d=()=>{}){var A,h,y,E,C;if((h=(A=this.services)==null?void 0:A.utils)!=null&&h.hasLoadedNamespace&&!((E=(y=this.services)==null?void 0:y.utils)!=null&&E.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${i}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if((C=this.backend)!=null&&C.create){const x={...c,isUpdate:l},N=this.backend.create.bind(this.backend);if(N.length<6)try{let I;N.length===5?I=N(t,r,i,o,x):I=N(t,r,i,o),I&&typeof I.then=="function"?I.then(k=>d(null,k)).catch(d):d(null,I)}catch(I){d(I)}else N(t,r,i,o,d,x)}!t||!t[0]||this.store.addResource(t[0],r,i,o)}}}const JE=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let t={};if(typeof n[1]=="object"&&(t=n[1]),gt(n[1])&&(t.defaultValue=n[1]),gt(n[2])&&(t.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const r=n[3]||n[2];Object.keys(r).forEach(i=>{t[i]=r[i]})}return t},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),WE=n=>{var t,r;return gt(n.ns)&&(n.ns=[n.ns]),gt(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),gt(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((r=(t=n.supportedLngs)==null?void 0:t.indexOf)==null?void 0:r.call(t,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},$u=()=>{},CL=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(r=>{typeof n[r]=="function"&&(n[r]=n[r].bind(n))})};class Ll extends Pc{constructor(t={},r){if(super(),this.options=WE(t),this.services={},this.logger=br,this.modules={external:[]},CL(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(gt(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=JE();this.options={...i,...this.options,...WE(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?br.init(o(this.modules.logger),this.options):br.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=bL;const y=new VE(this.options);this.store=new QE(this.options.resources,this.options);const E=this.services;E.logger=br,E.resourceStore=this.store,E.languageUtils=y,E.pluralResolver=new mL(y,{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"),h&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(E.formatter=o(h),E.formatter.init&&E.formatter.init(E,this.options),this.options.interpolation.format=E.formatter.format.bind(E.formatter)),E.interpolator=new pL(this.options),E.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},E.backendConnector=new vL(o(this.modules.backend),E.resourceStore,E,this.options),E.backendConnector.on("*",(x,...N)=>{this.emit(x,...N)}),this.modules.languageDetector&&(E.languageDetector=o(this.modules.languageDetector),E.languageDetector.init&&E.languageDetector.init(E,this.options.detection,this.options)),this.modules.i18nFormat&&(E.i18nFormat=o(this.modules.i18nFormat),E.i18nFormat.init&&E.i18nFormat.init(this)),this.translator=new Sc(this.services,this.options),this.translator.on("*",(x,...N)=>{this.emit(x,...N)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,r||(r=$u),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[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(h=>{this[h]=(...y)=>this.store[h](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=(...y)=>(this.store[h](...y),this)});const d=wl(),A=()=>{const h=(y,E)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(E),r(y,E)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?A():setTimeout(A,0),d}loadResources(t,r=$u){var l,c;let i=r;const o=gt(t)?t:this.language;if(typeof t=="function"&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const d=[],A=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(E=>{E!=="cimode"&&d.indexOf(E)<0&&d.push(E)})};o?A(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>A(y)),(c=(l=this.options.preload)==null?void 0:l.forEach)==null||c.call(l,h=>A(h)),this.services.backendConnector.load(d,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(h)})}else i(null)}reloadResources(t,r,i){const o=wl();return typeof t=="function"&&(i=t,t=void 0),typeof r=="function"&&(i=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),i||(i=$u),this.services.backendConnector.reload(t,r,l=>{o.resolve(),i(l)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Fw.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const i=this.languages[r];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const i=wl();this.emit("languageChanging",t);const o=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},l=(d,A)=>{A?this.isLanguageChangingTo===t&&(o(A),this.translator.changeLanguage(A),this.isLanguageChangingTo=void 0,this.emit("languageChanged",A),this.logger.log("languageChanged",A)):this.isLanguageChangingTo=void 0,i.resolve((...h)=>this.t(...h)),r&&r(d,(...h)=>this.t(...h))},c=d=>{var y,E;!t&&!d&&this.services.languageDetector&&(d=[]);const A=gt(d)?d:d&&d[0],h=this.store.hasLanguageSomeTranslations(A)?A:this.services.languageUtils.getBestMatchFromCodes(gt(d)?[d]:d);h&&(this.language||o(h),this.translator.language||this.translator.changeLanguage(h),(E=(y=this.services.languageDetector)==null?void 0:y.cacheUserLanguage)==null||E.call(y,h)),this.loadResources(h,C=>{l(C,h)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),i}getFixedT(t,r,i){const o=(l,c,...d)=>{let A;typeof c!="object"?A=this.options.overloadTranslationOptionHandler([l,c].concat(d)):A={...c},A.lng=A.lng||o.lng,A.lngs=A.lngs||o.lngs,A.ns=A.ns||o.ns,A.keyPrefix!==""&&(A.keyPrefix=A.keyPrefix||i||o.keyPrefix);const h=this.options.keySeparator||".";let y;return A.keyPrefix&&Array.isArray(l)?y=l.map(E=>`${A.keyPrefix}${h}${E}`):y=A.keyPrefix?`${A.keyPrefix}${h}${l}`:l,this.t(y,A)};return gt(t)?o.lng=t:o.lngs=t,o.ns=r,o.keyPrefix=i,o}t(...t){var r;return(r=this.translator)==null?void 0:r.translate(...t)}exists(...t){var r;return(r=this.translator)==null?void 0:r.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=r.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const c=(d,A)=>{const h=this.services.backendConnector.state[`${d}|${A}`];return h===-1||h===0||h===2};if(r.precheck){const d=r.precheck(this,c);if(d!==void 0)return d}return!!(this.hasResourceBundle(i,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(i,t)&&(!o||c(l,t)))}loadNamespaces(t,r){const i=wl();return this.options.ns?(gt(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{i.resolve(),r&&r(o)}),i):(r&&r(),Promise.resolve())}loadLanguages(t,r){const i=wl();gt(t)&&(t=[t]);const o=this.options.preload||[],l=t.filter(c=>o.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return l.length?(this.options.preload=o.concat(l),this.loadResources(c=>{i.resolve(),r&&r(c)}),i):(r&&r(),Promise.resolve())}dir(t){var o,l;if(t||(t=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!t)return"rtl";if(Intl.Locale){const c=new Intl.Locale(t);if(c&&c.getTextInfo){const d=c.getTextInfo();if(d&&d.direction)return d.direction}}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=((l=this.services)==null?void 0:l.languageUtils)||new VE(JE());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){return new Ll(t,r)}cloneInstance(t={},r=$u){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},l=new Ll(o);if((t.debug!==void 0||t.prefix!==void 0)&&(l.logger=l.logger.clone(t)),["store","services","language"].forEach(d=>{l[d]=this[d]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},i){const d=Object.keys(this.store.data).reduce((A,h)=>(A[h]={...this.store.data[h]},A[h]=Object.keys(A[h]).reduce((y,E)=>(y[E]={...A[h][E]},y),A[h]),A),{});l.store=new QE(d,o),l.services.resourceStore=l.store}return l.translator=new Sc(l.services,o),l.translator.on("*",(d,...A)=>{l.emit(d,...A)}),l.init(o,r),l.translator.options=o,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 xa=Ll.createInstance();xa.createInstance=Ll.createInstance;xa.createInstance;xa.dir;xa.init;xa.loadResources;xa.reloadResources;xa.use;xa.changeLanguage;xa.getFixedT;xa.t;xa.exists;xa.setDefaultNamespace;xa.hasLoadedNamespace;xa.loadNamespaces;xa.loadLanguages;const xL=async()=>{const n=await Oe.getItem("local:language");if(n&&hc.includes(n))return n;const t=navigator.language.split("-")[0];return hc.includes(t)?t:yr},NL=async()=>{const n=await xL();await xa.use(jC).init({resources:vl,lng:n,fallbackLng:yr,debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1,bindI18n:"languageChanged loaded",bindI18nStore:""}})};NL().catch(n=>{console.error("Failed to initialize i18n:",n),xa.emit("initialized")});const IL=Object.freeze(Object.defineProperty({__proto__:null,default:xa},Symbol.toStringTag,{value:"Module"})),XE=()=>{xC.createRoot(document.getElementById("root")).render(f.jsx(wk,{children:f.jsx(Bk,{children:f.jsx(kk,{children:f.jsx(Lk,{children:f.jsx(jk,{children:f.jsx(Uk,{children:f.jsx(ZB,{children:f.jsx(rL,{})})})})})})})}))};xa.isInitialized?XE():xa.on("initialized",XE);
