var bw=Object.defineProperty;var ww=(n,t,r)=>t in n?bw(n,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[t]=r;var Xt=(n,t,r)=>ww(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 u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(o){if(o.ep)return;o.ep=!0;const u=r(o);fetch(o.href,u)}})();try{}catch(n){console.error("[wxt] Failed to initialize plugins",n)}function Li(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function vw(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 QA={exports:{}},Zo={};/**
 * @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 v0;function Cw(){if(v0)return Zo;v0=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var d in o)d!=="key"&&(u[d]=o[d])}else u=o;return o=u.ref,{$$typeof:n,type:i,key:c,ref:o!==void 0?o:null,props:u}}return Zo.Fragment=t,Zo.jsx=r,Zo.jsxs=r,Zo}var C0;function xw(){return C0||(C0=1,QA.exports=Cw()),QA.exports}var A=xw(),FA={exports:{}},el={},PA={exports:{}},HA={};/**
 * @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 x0;function Iw(){return x0||(x0=1,function(n){function t(G,oe){var Ae=G.length;G.push(oe);e:for(;0<Ae;){var xe=Ae-1>>>1,P=G[xe];if(0<o(P,oe))G[xe]=oe,G[Ae]=P,Ae=xe;else break e}}function r(G){return G.length===0?null:G[0]}function i(G){if(G.length===0)return null;var oe=G[0],Ae=G.pop();if(Ae!==oe){G[0]=Ae;e:for(var xe=0,P=G.length,te=P>>>1;xe<te;){var pe=2*(xe+1)-1,Ce=G[pe],Me=pe+1,Ge=G[Me];if(0>o(Ce,Ae))Me<P&&0>o(Ge,Ce)?(G[xe]=Ge,G[Me]=Ae,xe=Me):(G[xe]=Ce,G[pe]=Ae,xe=pe);else if(Me<P&&0>o(Ge,Ae))G[xe]=Ge,G[Me]=Ae,xe=Me;else break e}}return oe}function o(G,oe){var Ae=G.sortIndex-oe.sortIndex;return Ae!==0?Ae:G.id-oe.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();n.unstable_now=function(){return c.now()-d}}var m=[],h=[],y=1,E=null,C=3,x=!1,S=!1,N=!1,B=!1,R=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function z(G){for(var oe=r(h);oe!==null;){if(oe.callback===null)i(h);else if(oe.startTime<=G)i(h),oe.sortIndex=oe.expirationTime,t(m,oe);else break;oe=r(h)}}function H(G){if(N=!1,z(G),!S)if(r(m)!==null)S=!0,V||(V=!0,ge());else{var oe=r(h);oe!==null&&ne(H,oe.startTime-G)}}var V=!1,ee=-1,q=5,J=-1;function Z(){return B?!0:!(n.unstable_now()-J<q)}function $(){if(B=!1,V){var G=n.unstable_now();J=G;var oe=!0;try{e:{S=!1,N&&(N=!1,M(ee),ee=-1),x=!0;var Ae=C;try{t:{for(z(G),E=r(m);E!==null&&!(E.expirationTime>G&&Z());){var xe=E.callback;if(typeof xe=="function"){E.callback=null,C=E.priorityLevel;var P=xe(E.expirationTime<=G);if(G=n.unstable_now(),typeof P=="function"){E.callback=P,z(G),oe=!0;break t}E===r(m)&&i(m),z(G)}else i(m);E=r(m)}if(E!==null)oe=!0;else{var te=r(h);te!==null&&ne(H,te.startTime-G),oe=!1}}break e}finally{E=null,C=Ae,x=!1}oe=void 0}}finally{oe?ge():V=!1}}}var ge;if(typeof O=="function")ge=function(){O($)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=$,ge=function(){ce.postMessage(null)}}else ge=function(){R($,0)};function ne(G,oe){ee=R(function(){G(n.unstable_now())},oe)}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(G){G.callback=null},n.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<G?Math.floor(1e3/G):5},n.unstable_getCurrentPriorityLevel=function(){return C},n.unstable_next=function(G){switch(C){case 1:case 2:case 3:var oe=3;break;default:oe=C}var Ae=C;C=oe;try{return G()}finally{C=Ae}},n.unstable_requestPaint=function(){B=!0},n.unstable_runWithPriority=function(G,oe){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var Ae=C;C=G;try{return oe()}finally{C=Ae}},n.unstable_scheduleCallback=function(G,oe,Ae){var xe=n.unstable_now();switch(typeof Ae=="object"&&Ae!==null?(Ae=Ae.delay,Ae=typeof Ae=="number"&&0<Ae?xe+Ae:xe):Ae=xe,G){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=Ae+P,G={id:y++,callback:oe,priorityLevel:G,startTime:Ae,expirationTime:P,sortIndex:-1},Ae>xe?(G.sortIndex=Ae,t(h,G),r(m)===null&&G===r(h)&&(N?(M(ee),ee=-1):N=!0,ne(H,Ae-xe))):(G.sortIndex=P,t(m,G),S||x||(S=!0,V||(V=!0,ge()))),G},n.unstable_shouldYield=Z,n.unstable_wrapCallback=function(G){var oe=C;return function(){var Ae=C;C=oe;try{return G.apply(this,arguments)}finally{C=Ae}}}}(HA)),HA}var I0;function Nw(){return I0||(I0=1,PA.exports=Iw()),PA.exports}var zA={exports:{}},pt={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var N0;function Sw(){if(N0)return pt;N0=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"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=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(){}},S=Object.assign,N={};function B(P,te,pe){this.props=P,this.context=te,this.refs=N,this.updater=pe||x}B.prototype.isReactComponent={},B.prototype.setState=function(P,te){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,te,"setState")},B.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function R(){}R.prototype=B.prototype;function M(P,te,pe){this.props=P,this.context=te,this.refs=N,this.updater=pe||x}var O=M.prototype=new R;O.constructor=M,S(O,B.prototype),O.isPureReactComponent=!0;var z=Array.isArray,H={H:null,A:null,T:null,S:null,V:null},V=Object.prototype.hasOwnProperty;function ee(P,te,pe,Ce,Me,Ge){return pe=Ge.ref,{$$typeof:n,type:P,key:te,ref:pe!==void 0?pe:null,props:Ge}}function q(P,te){return ee(P.type,te,void 0,void 0,void 0,P.props)}function J(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function Z(P){var te={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(pe){return te[pe]})}var $=/\/+/g;function ge(P,te){return typeof P=="object"&&P!==null&&P.key!=null?Z(""+P.key):te.toString(36)}function se(){}function ce(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(se,se):(P.status="pending",P.then(function(te){P.status==="pending"&&(P.status="fulfilled",P.value=te)},function(te){P.status==="pending"&&(P.status="rejected",P.reason=te)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function ne(P,te,pe,Ce,Me){var Ge=typeof P;(Ge==="undefined"||Ge==="boolean")&&(P=null);var Qe=!1;if(P===null)Qe=!0;else switch(Ge){case"bigint":case"string":case"number":Qe=!0;break;case"object":switch(P.$$typeof){case n:case t:Qe=!0;break;case y:return Qe=P._init,ne(Qe(P._payload),te,pe,Ce,Me)}}if(Qe)return Me=Me(P),Qe=Ce===""?"."+ge(P,0):Ce,z(Me)?(pe="",Qe!=null&&(pe=Qe.replace($,"$&/")+"/"),ne(Me,te,pe,"",function(Ze){return Ze})):Me!=null&&(J(Me)&&(Me=q(Me,pe+(Me.key==null||P&&P.key===Me.key?"":(""+Me.key).replace($,"$&/")+"/")+Qe)),te.push(Me)),1;Qe=0;var ot=Ce===""?".":Ce+":";if(z(P))for(var Je=0;Je<P.length;Je++)Ce=P[Je],Ge=ot+ge(Ce,Je),Qe+=ne(Ce,te,pe,Ge,Me);else if(Je=C(P),typeof Je=="function")for(P=Je.call(P),Je=0;!(Ce=P.next()).done;)Ce=Ce.value,Ge=ot+ge(Ce,Je++),Qe+=ne(Ce,te,pe,Ge,Me);else if(Ge==="object"){if(typeof P.then=="function")return ne(ce(P),te,pe,Ce,Me);throw te=String(P),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return Qe}function G(P,te,pe){if(P==null)return P;var Ce=[],Me=0;return ne(P,Ce,"","",function(Ge){return te.call(pe,Ge,Me++)}),Ce}function oe(P){if(P._status===-1){var te=P._result;te=te(),te.then(function(pe){(P._status===0||P._status===-1)&&(P._status=1,P._result=pe)},function(pe){(P._status===0||P._status===-1)&&(P._status=2,P._result=pe)}),P._status===-1&&(P._status=0,P._result=te)}if(P._status===1)return P._result.default;throw P._result}var Ae=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=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(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)};function xe(){}return pt.Children={map:G,forEach:function(P,te,pe){G(P,function(){te.apply(this,arguments)},pe)},count:function(P){var te=0;return G(P,function(){te++}),te},toArray:function(P){return G(P,function(te){return te})||[]},only:function(P){if(!J(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},pt.Component=B,pt.Fragment=r,pt.Profiler=o,pt.PureComponent=M,pt.StrictMode=i,pt.Suspense=m,pt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,pt.__COMPILER_RUNTIME={__proto__:null,c:function(P){return H.H.useMemoCache(P)}},pt.cache=function(P){return function(){return P.apply(null,arguments)}},pt.cloneElement=function(P,te,pe){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var Ce=S({},P.props),Me=P.key,Ge=void 0;if(te!=null)for(Qe in te.ref!==void 0&&(Ge=void 0),te.key!==void 0&&(Me=""+te.key),te)!V.call(te,Qe)||Qe==="key"||Qe==="__self"||Qe==="__source"||Qe==="ref"&&te.ref===void 0||(Ce[Qe]=te[Qe]);var Qe=arguments.length-2;if(Qe===1)Ce.children=pe;else if(1<Qe){for(var ot=Array(Qe),Je=0;Je<Qe;Je++)ot[Je]=arguments[Je+2];Ce.children=ot}return ee(P.type,Me,void 0,void 0,Ge,Ce)},pt.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:u,_context:P},P},pt.createElement=function(P,te,pe){var Ce,Me={},Ge=null;if(te!=null)for(Ce in te.key!==void 0&&(Ge=""+te.key),te)V.call(te,Ce)&&Ce!=="key"&&Ce!=="__self"&&Ce!=="__source"&&(Me[Ce]=te[Ce]);var Qe=arguments.length-2;if(Qe===1)Me.children=pe;else if(1<Qe){for(var ot=Array(Qe),Je=0;Je<Qe;Je++)ot[Je]=arguments[Je+2];Me.children=ot}if(P&&P.defaultProps)for(Ce in Qe=P.defaultProps,Qe)Me[Ce]===void 0&&(Me[Ce]=Qe[Ce]);return ee(P,Ge,void 0,void 0,null,Me)},pt.createRef=function(){return{current:null}},pt.forwardRef=function(P){return{$$typeof:d,render:P}},pt.isValidElement=J,pt.lazy=function(P){return{$$typeof:y,_payload:{_status:-1,_result:P},_init:oe}},pt.memo=function(P,te){return{$$typeof:h,type:P,compare:te===void 0?null:te}},pt.startTransition=function(P){var te=H.T,pe={};H.T=pe;try{var Ce=P(),Me=H.S;Me!==null&&Me(pe,Ce),typeof Ce=="object"&&Ce!==null&&typeof Ce.then=="function"&&Ce.then(xe,Ae)}catch(Ge){Ae(Ge)}finally{H.T=te}},pt.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},pt.use=function(P){return H.H.use(P)},pt.useActionState=function(P,te,pe){return H.H.useActionState(P,te,pe)},pt.useCallback=function(P,te){return H.H.useCallback(P,te)},pt.useContext=function(P){return H.H.useContext(P)},pt.useDebugValue=function(){},pt.useDeferredValue=function(P,te){return H.H.useDeferredValue(P,te)},pt.useEffect=function(P,te,pe){var Ce=H.H;if(typeof pe=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Ce.useEffect(P,te)},pt.useId=function(){return H.H.useId()},pt.useImperativeHandle=function(P,te,pe){return H.H.useImperativeHandle(P,te,pe)},pt.useInsertionEffect=function(P,te){return H.H.useInsertionEffect(P,te)},pt.useLayoutEffect=function(P,te){return H.H.useLayoutEffect(P,te)},pt.useMemo=function(P,te){return H.H.useMemo(P,te)},pt.useOptimistic=function(P,te){return H.H.useOptimistic(P,te)},pt.useReducer=function(P,te,pe){return H.H.useReducer(P,te,pe)},pt.useRef=function(P){return H.H.useRef(P)},pt.useState=function(P){return H.H.useState(P)},pt.useSyncExternalStore=function(P,te,pe){return H.H.useSyncExternalStore(P,te,pe)},pt.useTransition=function(){return H.H.useTransition()},pt.version="19.1.0",pt}var S0;function jf(){return S0||(S0=1,zA.exports=Sw()),zA.exports}var VA={exports:{}},qa={};/**
 * @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 T0;function Tw(){if(T0)return qa;T0=1;var n=jf();function t(m){var h="https://react.dev/errors/"+m;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 #"+m+"; 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 u(m,h,y){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:E==null?null:""+E,children:m,containerInfo:h,implementation:y}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return qa.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,qa.createPortal=function(m,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 u(m,h,null,y)},qa.flushSync=function(m){var h=c.T,y=i.p;try{if(c.T=null,i.p=2,m)return m()}finally{c.T=h,i.p=y,i.d.f()}},qa.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(m,h))},qa.prefetchDNS=function(m){typeof m=="string"&&i.d.D(m)},qa.preinit=function(m,h){if(typeof m=="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(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:E,integrity:C,fetchPriority:x}):y==="script"&&i.d.X(m,{crossOrigin:E,integrity:C,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},qa.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=d(h.as,h.crossOrigin);i.d.M(m,{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(m)},qa.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,E=d(y,h.crossOrigin);i.d.L(m,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})}},qa.preloadModule=function(m,h){if(typeof m=="string")if(h){var y=d(h.as,h.crossOrigin);i.d.m(m,{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(m)},qa.requestFormReset=function(m){i.d.r(m)},qa.unstable_batchedUpdates=function(m,h){return m(h)},qa.useFormState=function(m,h,y){return c.H.useFormState(m,h,y)},qa.useFormStatus=function(){return c.H.useHostTransitionStatus()},qa.version="19.1.0",qa}var k0;function kw(){if(k0)return VA.exports;k0=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(),VA.exports=Tw(),VA.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 B0;function Bw(){if(B0)return el;B0=1;var n=Nw(),t=jf(),r=kw();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 u(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(u(e)!==e)throw Error(i(188))}function m(e){var a=e.alternate;if(!a){if(a=u(e),a===null)throw Error(i(188));return a!==e?null:e}for(var s=e,l=a;;){var f=s.return;if(f===null)break;var p=f.alternate;if(p===null){if(l=f.return,l!==null){s=l;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===s)return d(f),e;if(p===l)return d(f),a;p=p.sibling}throw Error(i(188))}if(s.return!==l.return)s=f,l=p;else{for(var I=!1,_=f.child;_;){if(_===s){I=!0,s=f,l=p;break}if(_===l){I=!0,l=f,s=p;break}_=_.sibling}if(!I){for(_=p.child;_;){if(_===s){I=!0,s=p,l=f;break}if(_===l){I=!0,l=p,s=f;break}_=_.sibling}if(!I)throw Error(i(189))}}if(s.alternate!==l)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"),S=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),M=Symbol.for("react.consumer"),O=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function ge(e){return e===null||typeof e!="object"?null:(e=$&&e[$]||e["@@iterator"],typeof e=="function"?e:null)}var se=Symbol.for("react.client.reference");function ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case B:return"Profiler";case N:return"StrictMode";case H:return"Suspense";case V:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case O:return(e.displayName||"Context")+".Provider";case M:return(e._context.displayName||"Context")+".Consumer";case z:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return a=e.displayName||null,a!==null?a:ce(e.type)||"Memo";case q:a=e._payload,e=e._init;try{return ce(e(a))}catch{}}return null}var ne=Array.isArray,G=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ae={pending:!1,data:null,method:null,action:null},xe=[],P=-1;function te(e){return{current:e}}function pe(e){0>P||(e.current=xe[P],xe[P]=null,P--)}function Ce(e,a){P++,xe[P]=e.current,e.current=a}var Me=te(null),Ge=te(null),Qe=te(null),ot=te(null);function Je(e,a){switch(Ce(Qe,a),Ce(Ge,e),Ce(Me,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?Xm(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=Xm(a),e=Jm(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}pe(Me),Ce(Me,e)}function Ze(){pe(Me),pe(Ge),pe(Qe)}function yt(e){e.memoizedState!==null&&Ce(ot,e);var a=Me.current,s=Jm(a,e.type);a!==s&&(Ce(Ge,e),Ce(Me,s))}function ta(e){Ge.current===e&&(pe(Me),pe(Ge)),ot.current===e&&(pe(ot),Yo._currentValue=Ae)}var Nt=Object.prototype.hasOwnProperty,At=n.unstable_scheduleCallback,Et=n.unstable_cancelCallback,Ht=n.unstable_shouldYield,Se=n.unstable_requestPaint,je=n.unstable_now,et=n.unstable_getCurrentPriorityLevel,ft=n.unstable_ImmediatePriority,K=n.unstable_UserBlockingPriority,ie=n.unstable_NormalPriority,Ee=n.unstable_LowPriority,Oe=n.unstable_IdlePriority,Ue=n.log,Le=n.unstable_setDisableYieldValue,ze=null,L=null;function v(e){if(typeof Ue=="function"&&Le(e),L&&typeof L.setStrictMode=="function")try{L.setStrictMode(ze,e)}catch{}}var w=Math.clz32?Math.clz32:ue,Q=Math.log,X=Math.LN2;function ue(e){return e>>>=0,e===0?32:31-(Q(e)/X|0)|0}var we=256,Ne=4194304;function it(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 lt(e,a,s){var l=e.pendingLanes;if(l===0)return 0;var f=0,p=e.suspendedLanes,I=e.pingedLanes;e=e.warmLanes;var _=l&134217727;return _!==0?(l=_&~p,l!==0?f=it(l):(I&=_,I!==0?f=it(I):s||(s=_&~e,s!==0&&(f=it(s))))):(_=l&~p,_!==0?f=it(_):I!==0?f=it(I):s||(s=l&~e,s!==0&&(f=it(s)))),f===0?0:a!==0&&a!==f&&(a&p)===0&&(p=f&-f,s=a&-a,p>=s||p===32&&(s&4194048)!==0)?a:f}function vt(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function dt(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 bn(){var e=we;return we<<=1,(we&4194048)===0&&(we=256),e}function Ha(){var e=Ne;return Ne<<=1,(Ne&62914560)===0&&(Ne=4194304),e}function Qr(e){for(var a=[],s=0;31>s;s++)a.push(e);return a}function $r(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fs(e,a,s,l,f,p){var I=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 _=e.entanglements,Y=e.expirationTimes,me=e.hiddenUpdates;for(s=I&~s;0<s;){var Ie=31-w(s),De=1<<Ie;_[Ie]=0,Y[Ie]=-1;var ye=me[Ie];if(ye!==null)for(me[Ie]=null,Ie=0;Ie<ye.length;Ie++){var be=ye[Ie];be!==null&&(be.lane&=-536870913)}s&=~De}l!==0&&Fe(e,l,0),p!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=p&~(I&~a))}function Fe(e,a,s){e.pendingLanes|=a,e.suspendedLanes&=~a;var l=31-w(a);e.entangledLanes|=a,e.entanglements[l]=e.entanglements[l]|1073741824|s&4194090}function hs(e,a){var s=e.entangledLanes|=a;for(e=e.entanglements;s;){var l=31-w(s),f=1<<l;f&a|e[l]&a&&(e[l]|=a),s&=~f}}function Ri(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 Ta(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function qn(){var e=oe.p;return e!==0?e:(e=window.event,e===void 0?32:m0(e.type))}function Ui(e,a){var s=oe.p;try{return oe.p=e,a()}finally{oe.p=s}}var rr=Math.random().toString(36).slice(2),zt="__reactFiber$"+rr,pa="__reactProps$"+rr,Zt="__reactContainer$"+rr,Yn="__reactEvents$"+rr,Zr="__reactListeners$"+rr,gs="__reactHandles$"+rr,Oi="__reactResources$"+rr,xr="__reactMarker$"+rr;function oa(e){delete e[zt],delete e[pa],delete e[Yn],delete e[Zr],delete e[gs]}function Fr(e){var a=e[zt];if(a)return a;for(var s=e.parentNode;s;){if(a=s[Zt]||s[zt]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(e=t0(e);e!==null;){if(s=e[zt])return s;e=t0(e)}return a}e=s,s=e.parentNode}return null}function en(e){if(e=e[zt]||e[Zt]){var a=e.tag;if(a===5||a===6||a===13||a===26||a===27||a===3)return e}return null}function Xa(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e.stateNode;throw Error(i(33))}function Pr(e){var a=e[Oi];return a||(a=e[Oi]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Kt(e){e[xr]=!0}var Mi=new Set,wn={};function Hr(e,a){ya(e,a),ya(e+"Capture",a)}function ya(e,a){for(wn[e]=a,e=0;e<a.length;e++)Mi.add(a[e])}var nr=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]*$"),Wn={},_i={};function ms(e){return Nt.call(_i,e)?!0:Nt.call(Wn,e)?!1:nr.test(e)?_i[e]=!0:(Wn[e]=!0,!1)}function Ir(e,a,s){if(ms(a))if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(a);return;case"boolean":var l=a.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(a);return}}e.setAttribute(a,""+s)}}function vn(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 za(e,a,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(a,s,""+l)}}var Xn,zr;function Nr(e){if(Xn===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);Xn=a&&a[1]||"",zr=-1<s.stack.indexOf(`
    at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Xn+e+zr}var aa=!1;function Jn(e,a){if(!e||aa)return"";aa=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(a){var De=function(){throw Error()};if(Object.defineProperty(De.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(De,[])}catch(be){var ye=be}Reflect.construct(e,[],De)}else{try{De.call()}catch(be){ye=be}e.call(De.prototype)}}else{try{throw Error()}catch(be){ye=be}(De=e())&&typeof De.catch=="function"&&De.catch(function(){})}}catch(be){if(be&&ye&&typeof be.stack=="string")return[be.stack,ye.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=l.DetermineComponentFrameRoot(),I=p[0],_=p[1];if(I&&_){var Y=I.split(`
`),me=_.split(`
`);for(f=l=0;l<Y.length&&!Y[l].includes("DetermineComponentFrameRoot");)l++;for(;f<me.length&&!me[f].includes("DetermineComponentFrameRoot");)f++;if(l===Y.length||f===me.length)for(l=Y.length-1,f=me.length-1;1<=l&&0<=f&&Y[l]!==me[f];)f--;for(;1<=l&&0<=f;l--,f--)if(Y[l]!==me[f]){if(l!==1||f!==1)do if(l--,f--,0>f||Y[l]!==me[f]){var Ie=`
`+Y[l].replace(" at new "," at ");return e.displayName&&Ie.includes("<anonymous>")&&(Ie=Ie.replace("<anonymous>",e.displayName)),Ie}while(1<=l&&0<=f);break}}}finally{aa=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Nr(s):""}function ps(e){switch(e.tag){case 26:case 27:case 5:return Nr(e.type);case 16:return Nr("Lazy");case 13:return Nr("Suspense");case 19:return Nr("SuspenseList");case 0:case 15:return Jn(e.type,!1);case 11:return Jn(e.type.render,!1);case 1:return Jn(e.type,!0);case 31:return Nr("Activity");default:return""}}function ys(e){try{var a="";do a+=ps(e),e=e.return;while(e);return a}catch(s){return`
Error generating stack: `+s.message+`
`+s.stack}}function Vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mt(e){var a=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Ot(e){var a=mt(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,a),l=""+e[a];if(!e.hasOwnProperty(a)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,p=s.set;return Object.defineProperty(e,a,{configurable:!0,get:function(){return f.call(this)},set:function(I){l=""+I,p.call(this,I)}}),Object.defineProperty(e,a,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(I){l=""+I},stopTracking:function(){e._valueTracker=null,delete e[a]}}}}function Vr(e){e._valueTracker||(e._valueTracker=Ot(e))}function tn(e){if(!e)return!1;var a=e._valueTracker;if(!a)return!0;var s=a.getValue(),l="";return e&&(l=mt(e)?e.checked?"true":"false":e.value),e=l,e!==s?(a.setValue(e),!0):!1}function la(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 $n=/[\n"\\]/g;function _a(e){return e.replace($n,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function ji(e,a,s,l,f,p,I,_){e.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?e.type=I:e.removeAttribute("type"),a!=null?I==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+Vt(a)):e.value!==""+Vt(a)&&(e.value=""+Vt(a)):I!=="submit"&&I!=="reset"||e.removeAttribute("value"),a!=null?Cn(e,I,Vt(a)):s!=null?Cn(e,I,Vt(s)):l!=null&&e.removeAttribute("value"),f==null&&p!=null&&(e.defaultChecked=!!p),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+Vt(_):e.removeAttribute("name")}function an(e,a,s,l,f,p,I,_){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?""+Vt(s):"",a=a!=null?""+Vt(a):s,_||a===e.value||(e.value=a),e.defaultValue=a}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=_?e.checked:!!l,e.defaultChecked=!!l,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(e.name=I)}function Cn(e,a,s){a==="number"&&la(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Sr(e,a,s,l){if(e=e.options,a){a={};for(var f=0;f<s.length;f++)a["$"+s[f]]=!0;for(s=0;s<e.length;s++)f=a.hasOwnProperty("$"+e[s].value),e[s].selected!==f&&(e[s].selected=f),f&&l&&(e[s].defaultSelected=!0)}else{for(s=""+Vt(s),a=null,f=0;f<e.length;f++){if(e[f].value===s){e[f].selected=!0,l&&(e[f].defaultSelected=!0);return}a!==null||e[f].disabled||(a=e[f])}a!==null&&(a.selected=!0)}}function Zn(e,a,s){if(a!=null&&(a=""+Vt(a),a!==e.value&&(e.value=a),s==null)){e.defaultValue!==a&&(e.defaultValue=a);return}e.defaultValue=s!=null?""+Vt(s):""}function Qi(e,a,s,l){if(a==null){if(l!=null){if(s!=null)throw Error(i(92));if(ne(l)){if(1<l.length)throw Error(i(93));l=l[0]}s=l}s==null&&(s=""),a=s}s=Vt(a),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l)}function Tr(e,a){if(a){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=a;return}}e.textContent=a}var xn=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 k(e,a,s){var l=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="":l?e.setProperty(a,s):typeof s!="number"||s===0||xn.has(a)?a==="float"?e.cssFloat=s:e[a]=(""+s).trim():e[a]=s+"px"}function U(e,a,s){if(a!=null&&typeof a!="object")throw Error(i(62));if(e=e.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||a!=null&&a.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var f in a)l=a[f],a.hasOwnProperty(f)&&s[f]!==l&&k(e,f,l)}else for(var p in a)a.hasOwnProperty(p)&&k(e,p,a[p])}function F(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 re=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"]]),ke=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Be(e){return ke.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var _e=null;function He(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var St=null,Pe=null;function Ea(e){var a=en(e);if(a&&(e=a.stateNode)){var s=e[pa]||null;e:switch(e=a.stateNode,a.type){case"input":if(ji(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="'+_a(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var l=s[a];if(l!==e&&l.form===e.form){var f=l[pa]||null;if(!f)throw Error(i(90));ji(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(a=0;a<s.length;a++)l=s[a],l.form===e.form&&tn(l)}break e;case"textarea":Zn(e,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Sr(e,!!s.multiple,a,!1)}}}var ra=!1;function Ja(e,a,s){if(ra)return e(a,s);ra=!0;try{var l=e(a);return l}finally{if(ra=!1,(St!==null||Pe!==null)&&(uu(),St&&(a=St,e=Pe,Pe=St=null,Ea(a),e)))for(a=0;a<e.length;a++)Ea(e[a])}}function fr(e,a){var s=e.stateNode;if(s===null)return null;var l=s[pa]||null;if(l===null)return null;s=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(i(231,a,typeof s));return s}var Ft=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qt=!1;if(Ft)try{var Va={};Object.defineProperty(Va,"passive",{get:function(){qt=!0}}),window.addEventListener("test",Va,Va),window.removeEventListener("test",Va,Va)}catch{qt=!1}var ua=null,g=null,b=null;function T(){if(b)return b;var e,a=g,s=a.length,l,f="value"in ua?ua.value:ua.textContent,p=f.length;for(e=0;e<s&&a[e]===f[e];e++);var I=s-e;for(l=1;l<=I&&a[s-l]===f[p-l];l++);return b=f.slice(e,1<l?1-l:void 0)}function j(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 W(){return!0}function fe(){return!1}function ve(e){function a(s,l,f,p,I){this._reactName=s,this._targetInst=f,this.type=l,this.nativeEvent=p,this.target=I,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(s=e[_],this[_]=s?s(p):p[_]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?W: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=W)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=W)},persist:function(){},isPersistent:W}),a}var Ke={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ht=ve(Ke),ut=y({},Ke,{view:0,detail:0}),Yt=ve(ut),ka,Es,Fi,Pi=y({},ut,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ao,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!==Fi&&(Fi&&e.type==="mousemove"?(ka=e.screenX-Fi.screenX,Es=e.screenY-Fi.screenY):Es=ka=0,Fi=e),ka)},movementY:function(e){return"movementY"in e?e.movementY:Es}}),xl=ve(Pi),Il=y({},Pi,{dataTransfer:0}),Sc=ve(Il),Tc=y({},ut,{relatedTarget:0}),uo=ve(Tc),kc=y({},Ke,{animationName:0,elapsedTime:0,pseudoElement:0}),Bc=ve(kc),Dc=y({},Ke,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lc=ve(Dc),Rc=y({},Ke,{data:0}),co=ve(Rc),Uc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Oc={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"},Mc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _c(e){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(e):(e=Mc[e])?!!a[e]:!1}function Ao(){return _c}var jc=y({},ut,{key:function(e){if(e.key){var a=Uc[e.key]||e.key;if(a!=="Unidentified")return a}return e.type==="keypress"?(e=j(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Oc[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ao,charCode:function(e){return e.type==="keypress"?j(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?j(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qc=ve(jc),Nl=y({},Pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sl=ve(Nl),Fc=y({},ut,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ao}),Pc=ve(Fc),Hc=y({},Ke,{propertyName:0,elapsedTime:0,pseudoElement:0}),zc=ve(Hc),Vc=y({},Pi,{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}),Tl=ve(Vc),Gc=y({},Ke,{newState:0,oldState:0}),Kc=ve(Gc),qc=[9,13,27,32],ei=Ft&&"CompositionEvent"in window,ti=null;Ft&&"documentMode"in document&&(ti=document.documentMode);var kl=Ft&&"TextEvent"in window&&!ti,fo=Ft&&(!ei||ti&&8<ti&&11>=ti),de=" ",Re=!1;function qe(e,a){switch(e){case"keyup":return qc.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tt(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rt=!1;function Bt(e,a){switch(e){case"compositionend":return tt(a);case"keypress":return a.which!==32?null:(Re=!0,de);case"textInput":return e=a.data,e===de&&Re?null:e;default:return null}}function hr(e,a){if(rt)return e==="compositionend"||!ei&&qe(e,a)?(e=T(),b=g=ua=null,rt=!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 fo&&a.locale!=="ko"?null:a.data;default:return null}}var ir={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 Ga(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a==="input"?!!ir[e.type]:a==="textarea"}function sr(e,a,s,l){St?Pe?Pe.push(l):Pe=[l]:St=l,a=gu(a,"onChange"),0<a.length&&(s=new ht("onChange","change",null,s,l),e.push({event:s,listeners:a}))}var In=null,gr=null;function Yc(e){Gm(e,0)}function Bl(e){var a=Xa(e);if(tn(a))return e}function Ah(e,a){if(e==="change")return a}var fh=!1;if(Ft){var Wc;if(Ft){var Xc="oninput"in document;if(!Xc){var hh=document.createElement("div");hh.setAttribute("oninput","return;"),Xc=typeof hh.oninput=="function"}Wc=Xc}else Wc=!1;fh=Wc&&(!document.documentMode||9<document.documentMode)}function gh(){In&&(In.detachEvent("onpropertychange",mh),gr=In=null)}function mh(e){if(e.propertyName==="value"&&Bl(gr)){var a=[];sr(a,gr,e,He(e)),Ja(Yc,a)}}function XE(e,a,s){e==="focusin"?(gh(),In=a,gr=s,In.attachEvent("onpropertychange",mh)):e==="focusout"&&gh()}function JE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bl(gr)}function $E(e,a){if(e==="click")return Bl(a)}function ZE(e,a){if(e==="input"||e==="change")return Bl(a)}function eb(e,a){return e===a&&(e!==0||1/e===1/a)||e!==e&&a!==a}var mr=typeof Object.is=="function"?Object.is:eb;function ho(e,a){if(mr(e,a))return!0;if(typeof e!="object"||e===null||typeof a!="object"||a===null)return!1;var s=Object.keys(e),l=Object.keys(a);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var f=s[l];if(!Nt.call(a,f)||!mr(e[f],a[f]))return!1}return!0}function ph(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yh(e,a){var s=ph(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=a&&l>=a)return{node:s,offset:a-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=ph(s)}}function Eh(e,a){return e&&a?e===a?!0:e&&e.nodeType===3?!1:a&&a.nodeType===3?Eh(e,a.parentNode):"contains"in e?e.contains(a):e.compareDocumentPosition?!!(e.compareDocumentPosition(a)&16):!1:!1}function bh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var a=la(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=la(e.document)}return a}function Jc(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 tb=Ft&&"documentMode"in document&&11>=document.documentMode,bs=null,$c=null,go=null,Zc=!1;function wh(e,a,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Zc||bs==null||bs!==la(l)||(l=bs,"selectionStart"in l&&Jc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),go&&ho(go,l)||(go=l,l=gu($c,"onSelect"),0<l.length&&(a=new ht("onSelect","select",null,a,s),e.push({event:a,listeners:l}),a.target=bs)))}function Hi(e,a){var s={};return s[e.toLowerCase()]=a.toLowerCase(),s["Webkit"+e]="webkit"+a,s["Moz"+e]="moz"+a,s}var ws={animationend:Hi("Animation","AnimationEnd"),animationiteration:Hi("Animation","AnimationIteration"),animationstart:Hi("Animation","AnimationStart"),transitionrun:Hi("Transition","TransitionRun"),transitionstart:Hi("Transition","TransitionStart"),transitioncancel:Hi("Transition","TransitionCancel"),transitionend:Hi("Transition","TransitionEnd")},ed={},vh={};Ft&&(vh=document.createElement("div").style,"AnimationEvent"in window||(delete ws.animationend.animation,delete ws.animationiteration.animation,delete ws.animationstart.animation),"TransitionEvent"in window||delete ws.transitionend.transition);function zi(e){if(ed[e])return ed[e];if(!ws[e])return e;var a=ws[e],s;for(s in a)if(a.hasOwnProperty(s)&&s in vh)return ed[e]=a[s];return e}var Ch=zi("animationend"),xh=zi("animationiteration"),Ih=zi("animationstart"),ab=zi("transitionrun"),rb=zi("transitionstart"),nb=zi("transitioncancel"),Nh=zi("transitionend"),Sh=new Map,td="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(" ");td.push("scrollEnd");function Gr(e,a){Sh.set(e,a),Hr(a,[e])}var Th=new WeakMap;function kr(e,a){if(typeof e=="object"&&e!==null){var s=Th.get(e);return s!==void 0?s:(a={value:e,source:a,stack:ys(a)},Th.set(e,a),a)}return{value:e,source:a,stack:ys(a)}}var Br=[],vs=0,ad=0;function Dl(){for(var e=vs,a=ad=vs=0;a<e;){var s=Br[a];Br[a++]=null;var l=Br[a];Br[a++]=null;var f=Br[a];Br[a++]=null;var p=Br[a];if(Br[a++]=null,l!==null&&f!==null){var I=l.pending;I===null?f.next=f:(f.next=I.next,I.next=f),l.pending=f}p!==0&&kh(s,f,p)}}function Ll(e,a,s,l){Br[vs++]=e,Br[vs++]=a,Br[vs++]=s,Br[vs++]=l,ad|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function rd(e,a,s,l){return Ll(e,a,s,l),Rl(e)}function Cs(e,a){return Ll(e,null,null,a),Rl(e)}function kh(e,a,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var f=!1,p=e.return;p!==null;)p.childLanes|=s,l=p.alternate,l!==null&&(l.childLanes|=s),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(f=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,f&&a!==null&&(f=31-w(s),e=p.hiddenUpdates,l=e[f],l===null?e[f]=[a]:l.push(a),a.lane=s|536870912),p):null}function Rl(e){if(50<Fo)throw Fo=0,uA=null,Error(i(185));for(var a=e.return;a!==null;)e=a,a=e.return;return e.tag===3?e.stateNode:null}var xs={};function ib(e,a,s,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pr(e,a,s,l){return new ib(e,a,s,l)}function nd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Nn(e,a){var s=e.alternate;return s===null?(s=pr(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 Bh(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 Ul(e,a,s,l,f,p){var I=0;if(l=e,typeof e=="function")nd(e)&&(I=1);else if(typeof e=="string")I=ow(e,s,Me.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=pr(31,s,a,f),e.elementType=J,e.lanes=p,e;case S:return Vi(s.children,f,p,a);case N:I=8,f|=24;break;case B:return e=pr(12,s,a,f|2),e.elementType=B,e.lanes=p,e;case H:return e=pr(13,s,a,f),e.elementType=H,e.lanes=p,e;case V:return e=pr(19,s,a,f),e.elementType=V,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:case O:I=10;break e;case M:I=9;break e;case z:I=11;break e;case ee:I=14;break e;case q:I=16,l=null;break e}I=29,s=Error(i(130,e===null?"null":typeof e,"")),l=null}return a=pr(I,s,a,f),a.elementType=e,a.type=l,a.lanes=p,a}function Vi(e,a,s,l){return e=pr(7,e,l,a),e.lanes=s,e}function id(e,a,s){return e=pr(6,e,null,a),e.lanes=s,e}function sd(e,a,s){return a=pr(4,e.children!==null?e.children:[],e.key,a),a.lanes=s,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}var Is=[],Ns=0,Ol=null,Ml=0,Dr=[],Lr=0,Gi=null,Sn=1,Tn="";function Ki(e,a){Is[Ns++]=Ml,Is[Ns++]=Ol,Ol=e,Ml=a}function Dh(e,a,s){Dr[Lr++]=Sn,Dr[Lr++]=Tn,Dr[Lr++]=Gi,Gi=e;var l=Sn;e=Tn;var f=32-w(l)-1;l&=~(1<<f),s+=1;var p=32-w(a)+f;if(30<p){var I=f-f%5;p=(l&(1<<I)-1).toString(32),l>>=I,f-=I,Sn=1<<32-w(a)+f|s<<f|l,Tn=p+e}else Sn=1<<p|s<<f|l,Tn=e}function od(e){e.return!==null&&(Ki(e,1),Dh(e,1,0))}function ld(e){for(;e===Ol;)Ol=Is[--Ns],Is[Ns]=null,Ml=Is[--Ns],Is[Ns]=null;for(;e===Gi;)Gi=Dr[--Lr],Dr[Lr]=null,Tn=Dr[--Lr],Dr[Lr]=null,Sn=Dr[--Lr],Dr[Lr]=null}var $a=null,na=null,Dt=!1,qi=null,rn=!1,ud=Error(i(519));function Yi(e){var a=Error(i(418,""));throw yo(kr(a,e)),ud}function Lh(e){var a=e.stateNode,s=e.type,l=e.memoizedProps;switch(a[zt]=e,a[pa]=l,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<Ho.length;s++)It(Ho[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),an(a,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),Vr(a);break;case"select":It("invalid",a);break;case"textarea":It("invalid",a),Qi(a,l.value,l.defaultValue,l.children),Vr(a)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||l.suppressHydrationWarning===!0||Wm(a.textContent,s)?(l.popover!=null&&(It("beforetoggle",a),It("toggle",a)),l.onScroll!=null&&It("scroll",a),l.onScrollEnd!=null&&It("scrollend",a),l.onClick!=null&&(a.onclick=mu),a=!0):a=!1,a||Yi(e)}function Rh(e){for($a=e.return;$a;)switch($a.tag){case 5:case 13:rn=!1;return;case 27:case 3:rn=!0;return;default:$a=$a.return}}function mo(e){if(e!==$a)return!1;if(!Dt)return Rh(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")||IA(e.type,e.memoizedProps)),s=!s),s&&na&&Yi(e),Rh(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){na=qr(e.nextSibling);break e}a--}else s!=="$"&&s!=="$!"&&s!=="$?"||a++;e=e.nextSibling}na=null}}else a===27?(a=na,pi(e.type)?(e=kA,kA=null,na=e):na=a):na=$a?qr(e.stateNode.nextSibling):null;return!0}function po(){na=$a=null,Dt=!1}function Uh(){var e=qi;return e!==null&&(ur===null?ur=e:ur.push.apply(ur,e),qi=null),e}function yo(e){qi===null?qi=[e]:qi.push(e)}var cd=te(null),Wi=null,kn=null;function ai(e,a,s){Ce(cd,a._currentValue),a._currentValue=s}function Bn(e){e._currentValue=cd.current,pe(cd)}function dd(e,a,s){for(;e!==null;){var l=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,l!==null&&(l.childLanes|=a)):l!==null&&(l.childLanes&a)!==a&&(l.childLanes|=a),e===s)break;e=e.return}}function Ad(e,a,s,l){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var p=f.dependencies;if(p!==null){var I=f.child;p=p.firstContext;e:for(;p!==null;){var _=p;p=f;for(var Y=0;Y<a.length;Y++)if(_.context===a[Y]){p.lanes|=s,_=p.alternate,_!==null&&(_.lanes|=s),dd(p.return,s,e),l||(I=null);break e}p=_.next}}else if(f.tag===18){if(I=f.return,I===null)throw Error(i(341));I.lanes|=s,p=I.alternate,p!==null&&(p.lanes|=s),dd(I,s,e),I=null}else I=f.child;if(I!==null)I.return=f;else for(I=f;I!==null;){if(I===e){I=null;break}if(f=I.sibling,f!==null){f.return=I.return,I=f;break}I=I.return}f=I}}function Eo(e,a,s,l){e=null;for(var f=a,p=!1;f!==null;){if(!p){if((f.flags&524288)!==0)p=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var I=f.alternate;if(I===null)throw Error(i(387));if(I=I.memoizedProps,I!==null){var _=f.type;mr(f.pendingProps.value,I.value)||(e!==null?e.push(_):e=[_])}}else if(f===ot.current){if(I=f.alternate,I===null)throw Error(i(387));I.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Yo):e=[Yo])}f=f.return}e!==null&&Ad(a,e,s,l),a.flags|=262144}function _l(e){for(e=e.firstContext;e!==null;){if(!mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Xi(e){Wi=e,kn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ka(e){return Oh(Wi,e)}function jl(e,a){return Wi===null&&Xi(e),Oh(e,a)}function Oh(e,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},kn===null){if(e===null)throw Error(i(308));kn=a,e.dependencies={lanes:0,firstContext:a},e.flags|=524288}else kn=kn.next=a;return s}var sb=typeof AbortController<"u"?AbortController:function(){var e=[],a=this.signal={aborted:!1,addEventListener:function(s,l){e.push(l)}};this.abort=function(){a.aborted=!0,e.forEach(function(s){return s()})}},ob=n.unstable_scheduleCallback,lb=n.unstable_NormalPriority,ba={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fd(){return{controller:new sb,data:new Map,refCount:0}}function bo(e){e.refCount--,e.refCount===0&&ob(lb,function(){e.controller.abort()})}var wo=null,hd=0,Ss=0,Ts=null;function ub(e,a){if(wo===null){var s=wo=[];hd=0,Ss=mA(),Ts={status:"pending",value:void 0,then:function(l){s.push(l)}}}return hd++,a.then(Mh,Mh),a}function Mh(){if(--hd===0&&wo!==null){Ts!==null&&(Ts.status="fulfilled");var e=wo;wo=null,Ss=0,Ts=null;for(var a=0;a<e.length;a++)(0,e[a])()}}function cb(e,a){var s=[],l={status:"pending",value:null,reason:null,then:function(f){s.push(f)}};return e.then(function(){l.status="fulfilled",l.value=a;for(var f=0;f<s.length;f++)(0,s[f])(a)},function(f){for(l.status="rejected",l.reason=f,f=0;f<s.length;f++)(0,s[f])(void 0)}),l}var _h=G.S;G.S=function(e,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&ub(e,a),_h!==null&&_h(e,a)};var Ji=te(null);function gd(){var e=Ji.current;return e!==null?e:Gt.pooledCache}function Ql(e,a){a===null?Ce(Ji,Ji.current):Ce(Ji,a.pool)}function jh(){var e=gd();return e===null?null:{parent:ba._currentValue,pool:e}}var vo=Error(i(460)),Qh=Error(i(474)),Fl=Error(i(542)),md={then:function(){}};function Fh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Pl(){}function Ph(e,a,s){switch(s=e[s],s===void 0?e.push(a):s!==a&&(a.then(Pl,Pl),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,zh(e),e;default:if(typeof a.status=="string")a.then(Pl,Pl);else{if(e=Gt,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=a,e.status="pending",e.then(function(l){if(a.status==="pending"){var f=a;f.status="fulfilled",f.value=l}},function(l){if(a.status==="pending"){var f=a;f.status="rejected",f.reason=l}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,zh(e),e}throw Co=a,vo}}var Co=null;function Hh(){if(Co===null)throw Error(i(459));var e=Co;return Co=null,e}function zh(e){if(e===vo||e===Fl)throw Error(i(483))}var ri=!1;function pd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yd(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 ni(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ii(e,a,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Rt&2)!==0){var f=l.pending;return f===null?a.next=a:(a.next=f.next,f.next=a),l.pending=a,a=Rl(e),kh(e,null,s),a}return Ll(e,l,a,s),Rl(e)}function xo(e,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var l=a.lanes;l&=e.pendingLanes,s|=l,a.lanes=s,hs(e,s)}}function Ed(e,a){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var f=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var I={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};p===null?f=p=I:p=p.next=I,s=s.next}while(s!==null);p===null?f=p=a:p=p.next=a}else f=p=a;s={baseState:l.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:l.shared,callbacks:l.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=a:e.next=a,s.lastBaseUpdate=a}var bd=!1;function Io(){if(bd){var e=Ts;if(e!==null)throw e}}function No(e,a,s,l){bd=!1;var f=e.updateQueue;ri=!1;var p=f.firstBaseUpdate,I=f.lastBaseUpdate,_=f.shared.pending;if(_!==null){f.shared.pending=null;var Y=_,me=Y.next;Y.next=null,I===null?p=me:I.next=me,I=Y;var Ie=e.alternate;Ie!==null&&(Ie=Ie.updateQueue,_=Ie.lastBaseUpdate,_!==I&&(_===null?Ie.firstBaseUpdate=me:_.next=me,Ie.lastBaseUpdate=Y))}if(p!==null){var De=f.baseState;I=0,Ie=me=Y=null,_=p;do{var ye=_.lane&-536870913,be=ye!==_.lane;if(be?(Tt&ye)===ye:(l&ye)===ye){ye!==0&&ye===Ss&&(bd=!0),Ie!==null&&(Ie=Ie.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var st=e,at=_;ye=a;var jt=s;switch(at.tag){case 1:if(st=at.payload,typeof st=="function"){De=st.call(jt,De,ye);break e}De=st;break e;case 3:st.flags=st.flags&-65537|128;case 0:if(st=at.payload,ye=typeof st=="function"?st.call(jt,De,ye):st,ye==null)break e;De=y({},De,ye);break e;case 2:ri=!0}}ye=_.callback,ye!==null&&(e.flags|=64,be&&(e.flags|=8192),be=f.callbacks,be===null?f.callbacks=[ye]:be.push(ye))}else be={lane:ye,tag:_.tag,payload:_.payload,callback:_.callback,next:null},Ie===null?(me=Ie=be,Y=De):Ie=Ie.next=be,I|=ye;if(_=_.next,_===null){if(_=f.shared.pending,_===null)break;be=_,_=be.next,be.next=null,f.lastBaseUpdate=be,f.shared.pending=null}}while(!0);Ie===null&&(Y=De),f.baseState=Y,f.firstBaseUpdate=me,f.lastBaseUpdate=Ie,p===null&&(f.shared.lanes=0),fi|=I,e.lanes=I,e.memoizedState=De}}function Vh(e,a){if(typeof e!="function")throw Error(i(191,e));e.call(a)}function Gh(e,a){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Vh(s[e],a)}var ks=te(null),Hl=te(0);function Kh(e,a){e=_n,Ce(Hl,e),Ce(ks,a),_n=e|a.baseLanes}function wd(){Ce(Hl,_n),Ce(ks,ks.current)}function vd(){_n=Hl.current,pe(ks),pe(Hl)}var si=0,wt=null,Mt=null,ha=null,zl=!1,Bs=!1,$i=!1,Vl=0,So=0,Ds=null,db=0;function ca(){throw Error(i(321))}function Cd(e,a){if(a===null)return!1;for(var s=0;s<a.length&&s<e.length;s++)if(!mr(e[s],a[s]))return!1;return!0}function xd(e,a,s,l,f,p){return si=p,wt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,G.H=e===null||e.memoizedState===null?kg:Bg,$i=!1,p=s(l,f),$i=!1,Bs&&(p=Yh(a,s,l,f)),qh(e),p}function qh(e){G.H=Xl;var a=Mt!==null&&Mt.next!==null;if(si=0,ha=Mt=wt=null,zl=!1,So=0,Ds=null,a)throw Error(i(300));e===null||Ba||(e=e.dependencies,e!==null&&_l(e)&&(Ba=!0))}function Yh(e,a,s,l){wt=e;var f=0;do{if(Bs&&(Ds=null),So=0,Bs=!1,25<=f)throw Error(i(301));if(f+=1,ha=Mt=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}G.H=yb,p=a(s,l)}while(Bs);return p}function Ab(){var e=G.H,a=e.useState()[0];return a=typeof a.then=="function"?To(a):a,e=e.useState()[0],(Mt!==null?Mt.memoizedState:null)!==e&&(wt.flags|=1024),a}function Id(){var e=Vl!==0;return Vl=0,e}function Nd(e,a,s){a.updateQueue=e.updateQueue,a.flags&=-2053,e.lanes&=~s}function Sd(e){if(zl){for(e=e.memoizedState;e!==null;){var a=e.queue;a!==null&&(a.pending=null),e=e.next}zl=!1}si=0,ha=Mt=wt=null,Bs=!1,So=Vl=0,Ds=null}function or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ha===null?wt.memoizedState=ha=e:ha=ha.next=e,ha}function ga(){if(Mt===null){var e=wt.alternate;e=e!==null?e.memoizedState:null}else e=Mt.next;var a=ha===null?wt.memoizedState:ha.next;if(a!==null)ha=a,Mt=e;else{if(e===null)throw wt.alternate===null?Error(i(467)):Error(i(310));Mt=e,e={memoizedState:Mt.memoizedState,baseState:Mt.baseState,baseQueue:Mt.baseQueue,queue:Mt.queue,next:null},ha===null?wt.memoizedState=ha=e:ha=ha.next=e}return ha}function Td(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function To(e){var a=So;return So+=1,Ds===null&&(Ds=[]),e=Ph(Ds,e,a),a=wt,(ha===null?a.memoizedState:ha.next)===null&&(a=a.alternate,G.H=a===null||a.memoizedState===null?kg:Bg),e}function Gl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return To(e);if(e.$$typeof===O)return Ka(e)}throw Error(i(438,String(e)))}function kd(e){var a=null,s=wt.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var l=wt.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(a={data:l.data.map(function(f){return f.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=Td(),wt.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(e),l=0;l<e;l++)s[l]=Z;return a.index++,s}function Dn(e,a){return typeof a=="function"?a(e):a}function Kl(e){var a=ga();return Bd(a,Mt,e)}function Bd(e,a,s){var l=e.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=s;var f=e.baseQueue,p=l.pending;if(p!==null){if(f!==null){var I=f.next;f.next=p.next,p.next=I}a.baseQueue=f=p,l.pending=null}if(p=e.baseState,f===null)e.memoizedState=p;else{a=f.next;var _=I=null,Y=null,me=a,Ie=!1;do{var De=me.lane&-536870913;if(De!==me.lane?(Tt&De)===De:(si&De)===De){var ye=me.revertLane;if(ye===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null}),De===Ss&&(Ie=!0);else if((si&ye)===ye){me=me.next,ye===Ss&&(Ie=!0);continue}else De={lane:0,revertLane:me.revertLane,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},Y===null?(_=Y=De,I=p):Y=Y.next=De,wt.lanes|=ye,fi|=ye;De=me.action,$i&&s(p,De),p=me.hasEagerState?me.eagerState:s(p,De)}else ye={lane:De,revertLane:me.revertLane,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},Y===null?(_=Y=ye,I=p):Y=Y.next=ye,wt.lanes|=De,fi|=De;me=me.next}while(me!==null&&me!==a);if(Y===null?I=p:Y.next=_,!mr(p,e.memoizedState)&&(Ba=!0,Ie&&(s=Ts,s!==null)))throw s;e.memoizedState=p,e.baseState=I,e.baseQueue=Y,l.lastRenderedState=p}return f===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Dd(e){var a=ga(),s=a.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=e;var l=s.dispatch,f=s.pending,p=a.memoizedState;if(f!==null){s.pending=null;var I=f=f.next;do p=e(p,I.action),I=I.next;while(I!==f);mr(p,a.memoizedState)||(Ba=!0),a.memoizedState=p,a.baseQueue===null&&(a.baseState=p),s.lastRenderedState=p}return[p,l]}function Wh(e,a,s){var l=wt,f=ga(),p=Dt;if(p){if(s===void 0)throw Error(i(407));s=s()}else s=a();var I=!mr((Mt||f).memoizedState,s);I&&(f.memoizedState=s,Ba=!0),f=f.queue;var _=$h.bind(null,l,f,e);if(ko(2048,8,_,[e]),f.getSnapshot!==a||I||ha!==null&&ha.memoizedState.tag&1){if(l.flags|=2048,Ls(9,ql(),Jh.bind(null,l,f,s,a),null),Gt===null)throw Error(i(349));p||(si&124)!==0||Xh(l,a,s)}return s}function Xh(e,a,s){e.flags|=16384,e={getSnapshot:a,value:s},a=wt.updateQueue,a===null?(a=Td(),wt.updateQueue=a,a.stores=[e]):(s=a.stores,s===null?a.stores=[e]:s.push(e))}function Jh(e,a,s,l){a.value=s,a.getSnapshot=l,Zh(a)&&eg(e)}function $h(e,a,s){return s(function(){Zh(a)&&eg(e)})}function Zh(e){var a=e.getSnapshot;e=e.value;try{var s=a();return!mr(e,s)}catch{return!0}}function eg(e){var a=Cs(e,2);a!==null&&vr(a,e,2)}function Ld(e){var a=or();if(typeof e=="function"){var s=e;if(e=s(),$i){v(!0);try{s()}finally{v(!1)}}}return a.memoizedState=a.baseState=e,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:e},a}function tg(e,a,s,l){return e.baseState=s,Bd(e,Mt,typeof l=="function"?l:Dn)}function fb(e,a,s,l,f){if(Wl(e))throw Error(i(485));if(e=a.action,e!==null){var p={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(I){p.listeners.push(I)}};G.T!==null?s(!0):p.isTransition=!1,l(p),s=a.pending,s===null?(p.next=a.pending=p,ag(a,p)):(p.next=s.next,a.pending=s.next=p)}}function ag(e,a){var s=a.action,l=a.payload,f=e.state;if(a.isTransition){var p=G.T,I={};G.T=I;try{var _=s(f,l),Y=G.S;Y!==null&&Y(I,_),rg(e,a,_)}catch(me){Rd(e,a,me)}finally{G.T=p}}else try{p=s(f,l),rg(e,a,p)}catch(me){Rd(e,a,me)}}function rg(e,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){ng(e,a,l)},function(l){return Rd(e,a,l)}):ng(e,a,s)}function ng(e,a,s){a.status="fulfilled",a.value=s,ig(a),e.state=s,a=e.pending,a!==null&&(s=a.next,s===a?e.pending=null:(s=s.next,a.next=s,ag(e,s)))}function Rd(e,a,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do a.status="rejected",a.reason=s,ig(a),a=a.next;while(a!==l)}e.action=null}function ig(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function sg(e,a){return a}function og(e,a){if(Dt){var s=Gt.formState;if(s!==null){e:{var l=wt;if(Dt){if(na){t:{for(var f=na,p=rn;f.nodeType!==8;){if(!p){f=null;break t}if(f=qr(f.nextSibling),f===null){f=null;break t}}p=f.data,f=p==="F!"||p==="F"?f:null}if(f){na=qr(f.nextSibling),l=f.data==="F!";break e}}Yi(l)}l=!1}l&&(a=s[0])}}return s=or(),s.memoizedState=s.baseState=a,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sg,lastRenderedState:a},s.queue=l,s=Ng.bind(null,wt,l),l.dispatch=s,l=Ld(!1),p=jd.bind(null,wt,!1,l.queue),l=or(),f={state:a,dispatch:null,action:e,pending:null},l.queue=f,s=fb.bind(null,wt,f,p,s),f.dispatch=s,l.memoizedState=e,[a,s,!1]}function lg(e){var a=ga();return ug(a,Mt,e)}function ug(e,a,s){if(a=Bd(e,a,sg)[0],e=Kl(Dn)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var l=To(a)}catch(I){throw I===vo?Fl:I}else l=a;a=ga();var f=a.queue,p=f.dispatch;return s!==a.memoizedState&&(wt.flags|=2048,Ls(9,ql(),hb.bind(null,f,s),null)),[l,p,e]}function hb(e,a){e.action=a}function cg(e){var a=ga(),s=Mt;if(s!==null)return ug(a,s,e);ga(),a=a.memoizedState,s=ga();var l=s.queue.dispatch;return s.memoizedState=e,[a,l,!1]}function Ls(e,a,s,l){return e={tag:e,create:s,deps:l,inst:a,next:null},a=wt.updateQueue,a===null&&(a=Td(),wt.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,a.lastEffect=e),e}function ql(){return{destroy:void 0,resource:void 0}}function dg(){return ga().memoizedState}function Yl(e,a,s,l){var f=or();l=l===void 0?null:l,wt.flags|=e,f.memoizedState=Ls(1|a,ql(),s,l)}function ko(e,a,s,l){var f=ga();l=l===void 0?null:l;var p=f.memoizedState.inst;Mt!==null&&l!==null&&Cd(l,Mt.memoizedState.deps)?f.memoizedState=Ls(a,p,s,l):(wt.flags|=e,f.memoizedState=Ls(1|a,p,s,l))}function Ag(e,a){Yl(8390656,8,e,a)}function fg(e,a){ko(2048,8,e,a)}function hg(e,a){return ko(4,2,e,a)}function gg(e,a){return ko(4,4,e,a)}function mg(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 pg(e,a,s){s=s!=null?s.concat([e]):null,ko(4,4,mg.bind(null,a,e),s)}function Ud(){}function yg(e,a){var s=ga();a=a===void 0?null:a;var l=s.memoizedState;return a!==null&&Cd(a,l[1])?l[0]:(s.memoizedState=[e,a],e)}function Eg(e,a){var s=ga();a=a===void 0?null:a;var l=s.memoizedState;if(a!==null&&Cd(a,l[1]))return l[0];if(l=e(),$i){v(!0);try{e()}finally{v(!1)}}return s.memoizedState=[l,a],l}function Od(e,a,s){return s===void 0||(si&1073741824)!==0?e.memoizedState=a:(e.memoizedState=s,e=vm(),wt.lanes|=e,fi|=e,s)}function bg(e,a,s,l){return mr(s,a)?s:ks.current!==null?(e=Od(e,s,l),mr(e,a)||(Ba=!0),e):(si&42)===0?(Ba=!0,e.memoizedState=s):(e=vm(),wt.lanes|=e,fi|=e,a)}function wg(e,a,s,l,f){var p=oe.p;oe.p=p!==0&&8>p?p:8;var I=G.T,_={};G.T=_,jd(e,!1,a,s);try{var Y=f(),me=G.S;if(me!==null&&me(_,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var Ie=cb(Y,l);Bo(e,a,Ie,wr(e))}else Bo(e,a,l,wr(e))}catch(De){Bo(e,a,{then:function(){},status:"rejected",reason:De},wr())}finally{oe.p=p,G.T=I}}function gb(){}function Md(e,a,s,l){if(e.tag!==5)throw Error(i(476));var f=vg(e).queue;wg(e,f,a,Ae,s===null?gb:function(){return Cg(e),s(l)})}function vg(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:Ae,baseState:Ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:Ae},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:s},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function Cg(e){var a=vg(e).next.queue;Bo(e,a,{},wr())}function _d(){return Ka(Yo)}function xg(){return ga().memoizedState}function Ig(){return ga().memoizedState}function mb(e){for(var a=e.return;a!==null;){switch(a.tag){case 24:case 3:var s=wr();e=ni(s);var l=ii(a,e,s);l!==null&&(vr(l,a,s),xo(l,a,s)),a={cache:fd()},e.payload=a;return}a=a.return}}function pb(e,a,s){var l=wr();s={lane:l,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null},Wl(e)?Sg(a,s):(s=rd(e,a,s,l),s!==null&&(vr(s,e,l),Tg(s,a,l)))}function Ng(e,a,s){var l=wr();Bo(e,a,s,l)}function Bo(e,a,s,l){var f={lane:l,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};if(Wl(e))Sg(a,f);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=a.lastRenderedReducer,p!==null))try{var I=a.lastRenderedState,_=p(I,s);if(f.hasEagerState=!0,f.eagerState=_,mr(_,I))return Ll(e,a,f,0),Gt===null&&Dl(),!1}catch{}finally{}if(s=rd(e,a,f,l),s!==null)return vr(s,e,l),Tg(s,a,l),!0}return!1}function jd(e,a,s,l){if(l={lane:2,revertLane:mA(),action:l,hasEagerState:!1,eagerState:null,next:null},Wl(e)){if(a)throw Error(i(479))}else a=rd(e,s,l,2),a!==null&&vr(a,e,2)}function Wl(e){var a=e.alternate;return e===wt||a!==null&&a===wt}function Sg(e,a){Bs=zl=!0;var s=e.pending;s===null?a.next=a:(a.next=s.next,s.next=a),e.pending=a}function Tg(e,a,s){if((s&4194048)!==0){var l=a.lanes;l&=e.pendingLanes,s|=l,a.lanes=s,hs(e,s)}}var Xl={readContext:Ka,use:Gl,useCallback:ca,useContext:ca,useEffect:ca,useImperativeHandle:ca,useLayoutEffect:ca,useInsertionEffect:ca,useMemo:ca,useReducer:ca,useRef:ca,useState:ca,useDebugValue:ca,useDeferredValue:ca,useTransition:ca,useSyncExternalStore:ca,useId:ca,useHostTransitionStatus:ca,useFormState:ca,useActionState:ca,useOptimistic:ca,useMemoCache:ca,useCacheRefresh:ca},kg={readContext:Ka,use:Gl,useCallback:function(e,a){return or().memoizedState=[e,a===void 0?null:a],e},useContext:Ka,useEffect:Ag,useImperativeHandle:function(e,a,s){s=s!=null?s.concat([e]):null,Yl(4194308,4,mg.bind(null,a,e),s)},useLayoutEffect:function(e,a){return Yl(4194308,4,e,a)},useInsertionEffect:function(e,a){Yl(4,2,e,a)},useMemo:function(e,a){var s=or();a=a===void 0?null:a;var l=e();if($i){v(!0);try{e()}finally{v(!1)}}return s.memoizedState=[l,a],l},useReducer:function(e,a,s){var l=or();if(s!==void 0){var f=s(a);if($i){v(!0);try{s(a)}finally{v(!1)}}}else f=a;return l.memoizedState=l.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},l.queue=e,e=e.dispatch=pb.bind(null,wt,e),[l.memoizedState,e]},useRef:function(e){var a=or();return e={current:e},a.memoizedState=e},useState:function(e){e=Ld(e);var a=e.queue,s=Ng.bind(null,wt,a);return a.dispatch=s,[e.memoizedState,s]},useDebugValue:Ud,useDeferredValue:function(e,a){var s=or();return Od(s,e,a)},useTransition:function(){var e=Ld(!1);return e=wg.bind(null,wt,e.queue,!0,!1),or().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,a,s){var l=wt,f=or();if(Dt){if(s===void 0)throw Error(i(407));s=s()}else{if(s=a(),Gt===null)throw Error(i(349));(Tt&124)!==0||Xh(l,a,s)}f.memoizedState=s;var p={value:s,getSnapshot:a};return f.queue=p,Ag($h.bind(null,l,p,e),[e]),l.flags|=2048,Ls(9,ql(),Jh.bind(null,l,p,s,a),null),s},useId:function(){var e=or(),a=Gt.identifierPrefix;if(Dt){var s=Tn,l=Sn;s=(l&~(1<<32-w(l)-1)).toString(32)+s,a="«"+a+"R"+s,s=Vl++,0<s&&(a+="H"+s.toString(32)),a+="»"}else s=db++,a="«"+a+"r"+s.toString(32)+"»";return e.memoizedState=a},useHostTransitionStatus:_d,useFormState:og,useActionState:og,useOptimistic:function(e){var a=or();a.memoizedState=a.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=jd.bind(null,wt,!0,s),s.dispatch=a,[e,a]},useMemoCache:kd,useCacheRefresh:function(){return or().memoizedState=mb.bind(null,wt)}},Bg={readContext:Ka,use:Gl,useCallback:yg,useContext:Ka,useEffect:fg,useImperativeHandle:pg,useInsertionEffect:hg,useLayoutEffect:gg,useMemo:Eg,useReducer:Kl,useRef:dg,useState:function(){return Kl(Dn)},useDebugValue:Ud,useDeferredValue:function(e,a){var s=ga();return bg(s,Mt.memoizedState,e,a)},useTransition:function(){var e=Kl(Dn)[0],a=ga().memoizedState;return[typeof e=="boolean"?e:To(e),a]},useSyncExternalStore:Wh,useId:xg,useHostTransitionStatus:_d,useFormState:lg,useActionState:lg,useOptimistic:function(e,a){var s=ga();return tg(s,Mt,e,a)},useMemoCache:kd,useCacheRefresh:Ig},yb={readContext:Ka,use:Gl,useCallback:yg,useContext:Ka,useEffect:fg,useImperativeHandle:pg,useInsertionEffect:hg,useLayoutEffect:gg,useMemo:Eg,useReducer:Dd,useRef:dg,useState:function(){return Dd(Dn)},useDebugValue:Ud,useDeferredValue:function(e,a){var s=ga();return Mt===null?Od(s,e,a):bg(s,Mt.memoizedState,e,a)},useTransition:function(){var e=Dd(Dn)[0],a=ga().memoizedState;return[typeof e=="boolean"?e:To(e),a]},useSyncExternalStore:Wh,useId:xg,useHostTransitionStatus:_d,useFormState:cg,useActionState:cg,useOptimistic:function(e,a){var s=ga();return Mt!==null?tg(s,Mt,e,a):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:kd,useCacheRefresh:Ig},Rs=null,Do=0;function Jl(e){var a=Do;return Do+=1,Rs===null&&(Rs=[]),Ph(Rs,e,a)}function Lo(e,a){a=a.props.ref,e.ref=a!==void 0?a:null}function $l(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 Dg(e){var a=e._init;return a(e._payload)}function Lg(e){function a(le,ae){if(e){var he=le.deletions;he===null?(le.deletions=[ae],le.flags|=16):he.push(ae)}}function s(le,ae){if(!e)return null;for(;ae!==null;)a(le,ae),ae=ae.sibling;return null}function l(le){for(var ae=new Map;le!==null;)le.key!==null?ae.set(le.key,le):ae.set(le.index,le),le=le.sibling;return ae}function f(le,ae){return le=Nn(le,ae),le.index=0,le.sibling=null,le}function p(le,ae,he){return le.index=he,e?(he=le.alternate,he!==null?(he=he.index,he<ae?(le.flags|=67108866,ae):he):(le.flags|=67108866,ae)):(le.flags|=1048576,ae)}function I(le){return e&&le.alternate===null&&(le.flags|=67108866),le}function _(le,ae,he,Te){return ae===null||ae.tag!==6?(ae=id(he,le.mode,Te),ae.return=le,ae):(ae=f(ae,he),ae.return=le,ae)}function Y(le,ae,he,Te){var Ye=he.type;return Ye===S?Ie(le,ae,he.props.children,Te,he.key):ae!==null&&(ae.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===q&&Dg(Ye)===ae.type)?(ae=f(ae,he.props),Lo(ae,he),ae.return=le,ae):(ae=Ul(he.type,he.key,he.props,null,le.mode,Te),Lo(ae,he),ae.return=le,ae)}function me(le,ae,he,Te){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==he.containerInfo||ae.stateNode.implementation!==he.implementation?(ae=sd(he,le.mode,Te),ae.return=le,ae):(ae=f(ae,he.children||[]),ae.return=le,ae)}function Ie(le,ae,he,Te,Ye){return ae===null||ae.tag!==7?(ae=Vi(he,le.mode,Te,Ye),ae.return=le,ae):(ae=f(ae,he),ae.return=le,ae)}function De(le,ae,he){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ae=id(""+ae,le.mode,he),ae.return=le,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case C:return he=Ul(ae.type,ae.key,ae.props,null,le.mode,he),Lo(he,ae),he.return=le,he;case x:return ae=sd(ae,le.mode,he),ae.return=le,ae;case q:var Te=ae._init;return ae=Te(ae._payload),De(le,ae,he)}if(ne(ae)||ge(ae))return ae=Vi(ae,le.mode,he,null),ae.return=le,ae;if(typeof ae.then=="function")return De(le,Jl(ae),he);if(ae.$$typeof===O)return De(le,jl(le,ae),he);$l(le,ae)}return null}function ye(le,ae,he,Te){var Ye=ae!==null?ae.key:null;if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return Ye!==null?null:_(le,ae,""+he,Te);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case C:return he.key===Ye?Y(le,ae,he,Te):null;case x:return he.key===Ye?me(le,ae,he,Te):null;case q:return Ye=he._init,he=Ye(he._payload),ye(le,ae,he,Te)}if(ne(he)||ge(he))return Ye!==null?null:Ie(le,ae,he,Te,null);if(typeof he.then=="function")return ye(le,ae,Jl(he),Te);if(he.$$typeof===O)return ye(le,ae,jl(le,he),Te);$l(le,he)}return null}function be(le,ae,he,Te,Ye){if(typeof Te=="string"&&Te!==""||typeof Te=="number"||typeof Te=="bigint")return le=le.get(he)||null,_(ae,le,""+Te,Ye);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case C:return le=le.get(Te.key===null?he:Te.key)||null,Y(ae,le,Te,Ye);case x:return le=le.get(Te.key===null?he:Te.key)||null,me(ae,le,Te,Ye);case q:var Ct=Te._init;return Te=Ct(Te._payload),be(le,ae,he,Te,Ye)}if(ne(Te)||ge(Te))return le=le.get(he)||null,Ie(ae,le,Te,Ye,null);if(typeof Te.then=="function")return be(le,ae,he,Jl(Te),Ye);if(Te.$$typeof===O)return be(le,ae,he,jl(ae,Te),Ye);$l(ae,Te)}return null}function st(le,ae,he,Te){for(var Ye=null,Ct=null,$e=ae,nt=ae=0,La=null;$e!==null&&nt<he.length;nt++){$e.index>nt?(La=$e,$e=null):La=$e.sibling;var kt=ye(le,$e,he[nt],Te);if(kt===null){$e===null&&($e=La);break}e&&$e&&kt.alternate===null&&a(le,$e),ae=p(kt,ae,nt),Ct===null?Ye=kt:Ct.sibling=kt,Ct=kt,$e=La}if(nt===he.length)return s(le,$e),Dt&&Ki(le,nt),Ye;if($e===null){for(;nt<he.length;nt++)$e=De(le,he[nt],Te),$e!==null&&(ae=p($e,ae,nt),Ct===null?Ye=$e:Ct.sibling=$e,Ct=$e);return Dt&&Ki(le,nt),Ye}for($e=l($e);nt<he.length;nt++)La=be($e,le,nt,he[nt],Te),La!==null&&(e&&La.alternate!==null&&$e.delete(La.key===null?nt:La.key),ae=p(La,ae,nt),Ct===null?Ye=La:Ct.sibling=La,Ct=La);return e&&$e.forEach(function(vi){return a(le,vi)}),Dt&&Ki(le,nt),Ye}function at(le,ae,he,Te){if(he==null)throw Error(i(151));for(var Ye=null,Ct=null,$e=ae,nt=ae=0,La=null,kt=he.next();$e!==null&&!kt.done;nt++,kt=he.next()){$e.index>nt?(La=$e,$e=null):La=$e.sibling;var vi=ye(le,$e,kt.value,Te);if(vi===null){$e===null&&($e=La);break}e&&$e&&vi.alternate===null&&a(le,$e),ae=p(vi,ae,nt),Ct===null?Ye=vi:Ct.sibling=vi,Ct=vi,$e=La}if(kt.done)return s(le,$e),Dt&&Ki(le,nt),Ye;if($e===null){for(;!kt.done;nt++,kt=he.next())kt=De(le,kt.value,Te),kt!==null&&(ae=p(kt,ae,nt),Ct===null?Ye=kt:Ct.sibling=kt,Ct=kt);return Dt&&Ki(le,nt),Ye}for($e=l($e);!kt.done;nt++,kt=he.next())kt=be($e,le,nt,kt.value,Te),kt!==null&&(e&&kt.alternate!==null&&$e.delete(kt.key===null?nt:kt.key),ae=p(kt,ae,nt),Ct===null?Ye=kt:Ct.sibling=kt,Ct=kt);return e&&$e.forEach(function(Ew){return a(le,Ew)}),Dt&&Ki(le,nt),Ye}function jt(le,ae,he,Te){if(typeof he=="object"&&he!==null&&he.type===S&&he.key===null&&(he=he.props.children),typeof he=="object"&&he!==null){switch(he.$$typeof){case C:e:{for(var Ye=he.key;ae!==null;){if(ae.key===Ye){if(Ye=he.type,Ye===S){if(ae.tag===7){s(le,ae.sibling),Te=f(ae,he.props.children),Te.return=le,le=Te;break e}}else if(ae.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===q&&Dg(Ye)===ae.type){s(le,ae.sibling),Te=f(ae,he.props),Lo(Te,he),Te.return=le,le=Te;break e}s(le,ae);break}else a(le,ae);ae=ae.sibling}he.type===S?(Te=Vi(he.props.children,le.mode,Te,he.key),Te.return=le,le=Te):(Te=Ul(he.type,he.key,he.props,null,le.mode,Te),Lo(Te,he),Te.return=le,le=Te)}return I(le);case x:e:{for(Ye=he.key;ae!==null;){if(ae.key===Ye)if(ae.tag===4&&ae.stateNode.containerInfo===he.containerInfo&&ae.stateNode.implementation===he.implementation){s(le,ae.sibling),Te=f(ae,he.children||[]),Te.return=le,le=Te;break e}else{s(le,ae);break}else a(le,ae);ae=ae.sibling}Te=sd(he,le.mode,Te),Te.return=le,le=Te}return I(le);case q:return Ye=he._init,he=Ye(he._payload),jt(le,ae,he,Te)}if(ne(he))return st(le,ae,he,Te);if(ge(he)){if(Ye=ge(he),typeof Ye!="function")throw Error(i(150));return he=Ye.call(he),at(le,ae,he,Te)}if(typeof he.then=="function")return jt(le,ae,Jl(he),Te);if(he.$$typeof===O)return jt(le,ae,jl(le,he),Te);$l(le,he)}return typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint"?(he=""+he,ae!==null&&ae.tag===6?(s(le,ae.sibling),Te=f(ae,he),Te.return=le,le=Te):(s(le,ae),Te=id(he,le.mode,Te),Te.return=le,le=Te),I(le)):s(le,ae)}return function(le,ae,he,Te){try{Do=0;var Ye=jt(le,ae,he,Te);return Rs=null,Ye}catch($e){if($e===vo||$e===Fl)throw $e;var Ct=pr(29,$e,null,le.mode);return Ct.lanes=Te,Ct.return=le,Ct}finally{}}}var Us=Lg(!0),Rg=Lg(!1),Rr=te(null),nn=null;function oi(e){var a=e.alternate;Ce(wa,wa.current&1),Ce(Rr,e),nn===null&&(a===null||ks.current!==null||a.memoizedState!==null)&&(nn=e)}function Ug(e){if(e.tag===22){if(Ce(wa,wa.current),Ce(Rr,e),nn===null){var a=e.alternate;a!==null&&a.memoizedState!==null&&(nn=e)}}else li()}function li(){Ce(wa,wa.current),Ce(Rr,Rr.current)}function Ln(e){pe(Rr),nn===e&&(nn=null),pe(wa)}var wa=te(0);function Zl(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==="$?"||TA(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 Qd(e,a,s,l){a=e.memoizedState,s=s(l,a),s=s==null?a:y({},a,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Fd={enqueueSetState:function(e,a,s){e=e._reactInternals;var l=wr(),f=ni(l);f.payload=a,s!=null&&(f.callback=s),a=ii(e,f,l),a!==null&&(vr(a,e,l),xo(a,e,l))},enqueueReplaceState:function(e,a,s){e=e._reactInternals;var l=wr(),f=ni(l);f.tag=1,f.payload=a,s!=null&&(f.callback=s),a=ii(e,f,l),a!==null&&(vr(a,e,l),xo(a,e,l))},enqueueForceUpdate:function(e,a){e=e._reactInternals;var s=wr(),l=ni(s);l.tag=2,a!=null&&(l.callback=a),a=ii(e,l,s),a!==null&&(vr(a,e,s),xo(a,e,s))}};function Og(e,a,s,l,f,p,I){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,p,I):a.prototype&&a.prototype.isPureReactComponent?!ho(s,l)||!ho(f,p):!0}function Mg(e,a,s,l){e=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,l),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,l),a.state!==e&&Fd.enqueueReplaceState(a,a.state,null)}function Zi(e,a){var s=a;if("ref"in a){s={};for(var l in a)l!=="ref"&&(s[l]=a[l])}if(e=e.defaultProps){s===a&&(s=y({},s));for(var f in e)s[f]===void 0&&(s[f]=e[f])}return s}var eu=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 _g(e){eu(e)}function jg(e){console.error(e)}function Qg(e){eu(e)}function tu(e,a){try{var s=e.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(l){setTimeout(function(){throw l})}}function Fg(e,a,s){try{var l=e.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Pd(e,a,s){return s=ni(s),s.tag=3,s.payload={element:null},s.callback=function(){tu(e,a)},s}function Pg(e){return e=ni(e),e.tag=3,e}function Hg(e,a,s,l){var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var p=l.value;e.payload=function(){return f(p)},e.callback=function(){Fg(a,s,l)}}var I=s.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(e.callback=function(){Fg(a,s,l),typeof f!="function"&&(hi===null?hi=new Set([this]):hi.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}function Eb(e,a,s,l,f){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(a=s.alternate,a!==null&&Eo(a,s,f,!0),s=Rr.current,s!==null){switch(s.tag){case 13:return nn===null?dA():s.alternate===null&&ia===0&&(ia=3),s.flags&=-257,s.flags|=65536,s.lanes=f,l===md?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([l]):a.add(l),fA(e,l,f)),!1;case 22:return s.flags|=65536,l===md?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([l]):s.add(l)),fA(e,l,f)),!1}throw Error(i(435,s.tag))}return fA(e,l,f),dA(),!1}if(Dt)return a=Rr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=f,l!==ud&&(e=Error(i(422),{cause:l}),yo(kr(e,s)))):(l!==ud&&(a=Error(i(423),{cause:l}),yo(kr(a,s))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,l=kr(l,s),f=Pd(e.stateNode,l,f),Ed(e,f),ia!==4&&(ia=2)),!1;var p=Error(i(520),{cause:l});if(p=kr(p,s),Qo===null?Qo=[p]:Qo.push(p),ia!==4&&(ia=2),a===null)return!0;l=kr(l,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,e=f&-f,s.lanes|=e,e=Pd(s.stateNode,l,e),Ed(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"&&(hi===null||!hi.has(p))))return s.flags|=65536,f&=-f,s.lanes|=f,f=Pg(f),Hg(f,e,s,l),Ed(s,f),!1}s=s.return}while(s!==null);return!1}var zg=Error(i(461)),Ba=!1;function ja(e,a,s,l){a.child=e===null?Rg(a,null,s,l):Us(a,e.child,s,l)}function Vg(e,a,s,l,f){s=s.render;var p=a.ref;if("ref"in l){var I={};for(var _ in l)_!=="ref"&&(I[_]=l[_])}else I=l;return Xi(a),l=xd(e,a,s,I,p,f),_=Id(),e!==null&&!Ba?(Nd(e,a,f),Rn(e,a,f)):(Dt&&_&&od(a),a.flags|=1,ja(e,a,l,f),a.child)}function Gg(e,a,s,l,f){if(e===null){var p=s.type;return typeof p=="function"&&!nd(p)&&p.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=p,Kg(e,a,p,l,f)):(e=Ul(s.type,null,l,a,a.mode,f),e.ref=a.ref,e.return=a,a.child=e)}if(p=e.child,!Wd(e,f)){var I=p.memoizedProps;if(s=s.compare,s=s!==null?s:ho,s(I,l)&&e.ref===a.ref)return Rn(e,a,f)}return a.flags|=1,e=Nn(p,l),e.ref=a.ref,e.return=a,a.child=e}function Kg(e,a,s,l,f){if(e!==null){var p=e.memoizedProps;if(ho(p,l)&&e.ref===a.ref)if(Ba=!1,a.pendingProps=l=p,Wd(e,f))(e.flags&131072)!==0&&(Ba=!0);else return a.lanes=e.lanes,Rn(e,a,f)}return Hd(e,a,s,l,f)}function qg(e,a,s){var l=a.pendingProps,f=l.children,p=e!==null?e.memoizedState:null;if(l.mode==="hidden"){if((a.flags&128)!==0){if(l=p!==null?p.baseLanes|s:s,e!==null){for(f=a.child=e.child,p=0;f!==null;)p=p|f.lanes|f.childLanes,f=f.sibling;a.childLanes=p&~l}else a.childLanes=0,a.child=null;return Yg(e,a,l,s)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ql(a,p!==null?p.cachePool:null),p!==null?Kh(a,p):wd(),Ug(a);else return a.lanes=a.childLanes=536870912,Yg(e,a,p!==null?p.baseLanes|s:s,s)}else p!==null?(Ql(a,p.cachePool),Kh(a,p),li(),a.memoizedState=null):(e!==null&&Ql(a,null),wd(),li());return ja(e,a,f,s),a.child}function Yg(e,a,s,l){var f=gd();return f=f===null?null:{parent:ba._currentValue,pool:f},a.memoizedState={baseLanes:s,cachePool:f},e!==null&&Ql(a,null),wd(),Ug(a),e!==null&&Eo(e,a,l,!0),null}function au(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 Hd(e,a,s,l,f){return Xi(a),s=xd(e,a,s,l,void 0,f),l=Id(),e!==null&&!Ba?(Nd(e,a,f),Rn(e,a,f)):(Dt&&l&&od(a),a.flags|=1,ja(e,a,s,f),a.child)}function Wg(e,a,s,l,f,p){return Xi(a),a.updateQueue=null,s=Yh(a,l,s,f),qh(e),l=Id(),e!==null&&!Ba?(Nd(e,a,p),Rn(e,a,p)):(Dt&&l&&od(a),a.flags|=1,ja(e,a,s,p),a.child)}function Xg(e,a,s,l,f){if(Xi(a),a.stateNode===null){var p=xs,I=s.contextType;typeof I=="object"&&I!==null&&(p=Ka(I)),p=new s(l,p),a.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Fd,a.stateNode=p,p._reactInternals=a,p=a.stateNode,p.props=l,p.state=a.memoizedState,p.refs={},pd(a),I=s.contextType,p.context=typeof I=="object"&&I!==null?Ka(I):xs,p.state=a.memoizedState,I=s.getDerivedStateFromProps,typeof I=="function"&&(Qd(a,s,I,l),p.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(I=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),I!==p.state&&Fd.enqueueReplaceState(p,p.state,null),No(a,l,p,f),Io(),p.state=a.memoizedState),typeof p.componentDidMount=="function"&&(a.flags|=4194308),l=!0}else if(e===null){p=a.stateNode;var _=a.memoizedProps,Y=Zi(s,_);p.props=Y;var me=p.context,Ie=s.contextType;I=xs,typeof Ie=="object"&&Ie!==null&&(I=Ka(Ie));var De=s.getDerivedStateFromProps;Ie=typeof De=="function"||typeof p.getSnapshotBeforeUpdate=="function",_=a.pendingProps!==_,Ie||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(_||me!==I)&&Mg(a,p,l,I),ri=!1;var ye=a.memoizedState;p.state=ye,No(a,l,p,f),Io(),me=a.memoizedState,_||ye!==me||ri?(typeof De=="function"&&(Qd(a,s,De,l),me=a.memoizedState),(Y=ri||Og(a,s,Y,l,ye,me,I))?(Ie||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=l,a.memoizedState=me),p.props=l,p.state=me,p.context=I,l=Y):(typeof p.componentDidMount=="function"&&(a.flags|=4194308),l=!1)}else{p=a.stateNode,yd(e,a),I=a.memoizedProps,Ie=Zi(s,I),p.props=Ie,De=a.pendingProps,ye=p.context,me=s.contextType,Y=xs,typeof me=="object"&&me!==null&&(Y=Ka(me)),_=s.getDerivedStateFromProps,(me=typeof _=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(I!==De||ye!==Y)&&Mg(a,p,l,Y),ri=!1,ye=a.memoizedState,p.state=ye,No(a,l,p,f),Io();var be=a.memoizedState;I!==De||ye!==be||ri||e!==null&&e.dependencies!==null&&_l(e.dependencies)?(typeof _=="function"&&(Qd(a,s,_,l),be=a.memoizedState),(Ie=ri||Og(a,s,Ie,l,ye,be,Y)||e!==null&&e.dependencies!==null&&_l(e.dependencies))?(me||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(l,be,Y),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(l,be,Y)),typeof p.componentDidUpdate=="function"&&(a.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof p.componentDidUpdate!="function"||I===e.memoizedProps&&ye===e.memoizedState||(a.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||I===e.memoizedProps&&ye===e.memoizedState||(a.flags|=1024),a.memoizedProps=l,a.memoizedState=be),p.props=l,p.state=be,p.context=Y,l=Ie):(typeof p.componentDidUpdate!="function"||I===e.memoizedProps&&ye===e.memoizedState||(a.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||I===e.memoizedProps&&ye===e.memoizedState||(a.flags|=1024),l=!1)}return p=l,au(e,a),l=(a.flags&128)!==0,p||l?(p=a.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:p.render(),a.flags|=1,e!==null&&l?(a.child=Us(a,e.child,null,f),a.child=Us(a,null,s,f)):ja(e,a,s,f),a.memoizedState=p.state,e=a.child):e=Rn(e,a,f),e}function Jg(e,a,s,l){return po(),a.flags|=256,ja(e,a,s,l),a.child}var zd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Vd(e){return{baseLanes:e,cachePool:jh()}}function Gd(e,a,s){return e=e!==null?e.childLanes&~s:0,a&&(e|=Ur),e}function $g(e,a,s){var l=a.pendingProps,f=!1,p=(a.flags&128)!==0,I;if((I=p)||(I=e!==null&&e.memoizedState===null?!1:(wa.current&2)!==0),I&&(f=!0,a.flags&=-129),I=(a.flags&32)!==0,a.flags&=-33,e===null){if(Dt){if(f?oi(a):li(),Dt){var _=na,Y;if(Y=_){e:{for(Y=_,_=rn;Y.nodeType!==8;){if(!_){_=null;break e}if(Y=qr(Y.nextSibling),Y===null){_=null;break e}}_=Y}_!==null?(a.memoizedState={dehydrated:_,treeContext:Gi!==null?{id:Sn,overflow:Tn}:null,retryLane:536870912,hydrationErrors:null},Y=pr(18,null,null,0),Y.stateNode=_,Y.return=a,a.child=Y,$a=a,na=null,Y=!0):Y=!1}Y||Yi(a)}if(_=a.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return TA(_)?a.lanes=32:a.lanes=536870912,null;Ln(a)}return _=l.children,l=l.fallback,f?(li(),f=a.mode,_=ru({mode:"hidden",children:_},f),l=Vi(l,f,s,null),_.return=a,l.return=a,_.sibling=l,a.child=_,f=a.child,f.memoizedState=Vd(s),f.childLanes=Gd(e,I,s),a.memoizedState=zd,l):(oi(a),Kd(a,_))}if(Y=e.memoizedState,Y!==null&&(_=Y.dehydrated,_!==null)){if(p)a.flags&256?(oi(a),a.flags&=-257,a=qd(e,a,s)):a.memoizedState!==null?(li(),a.child=e.child,a.flags|=128,a=null):(li(),f=l.fallback,_=a.mode,l=ru({mode:"visible",children:l.children},_),f=Vi(f,_,s,null),f.flags|=2,l.return=a,f.return=a,l.sibling=f,a.child=l,Us(a,e.child,null,s),l=a.child,l.memoizedState=Vd(s),l.childLanes=Gd(e,I,s),a.memoizedState=zd,a=f);else if(oi(a),TA(_)){if(I=_.nextSibling&&_.nextSibling.dataset,I)var me=I.dgst;I=me,l=Error(i(419)),l.stack="",l.digest=I,yo({value:l,source:null,stack:null}),a=qd(e,a,s)}else if(Ba||Eo(e,a,s,!1),I=(s&e.childLanes)!==0,Ba||I){if(I=Gt,I!==null&&(l=s&-s,l=(l&42)!==0?1:Ri(l),l=(l&(I.suspendedLanes|s))!==0?0:l,l!==0&&l!==Y.retryLane))throw Y.retryLane=l,Cs(e,l),vr(I,e,l),zg;_.data==="$?"||dA(),a=qd(e,a,s)}else _.data==="$?"?(a.flags|=192,a.child=e.child,a=null):(e=Y.treeContext,na=qr(_.nextSibling),$a=a,Dt=!0,qi=null,rn=!1,e!==null&&(Dr[Lr++]=Sn,Dr[Lr++]=Tn,Dr[Lr++]=Gi,Sn=e.id,Tn=e.overflow,Gi=a),a=Kd(a,l.children),a.flags|=4096);return a}return f?(li(),f=l.fallback,_=a.mode,Y=e.child,me=Y.sibling,l=Nn(Y,{mode:"hidden",children:l.children}),l.subtreeFlags=Y.subtreeFlags&65011712,me!==null?f=Nn(me,f):(f=Vi(f,_,s,null),f.flags|=2),f.return=a,l.return=a,l.sibling=f,a.child=l,l=f,f=a.child,_=e.child.memoizedState,_===null?_=Vd(s):(Y=_.cachePool,Y!==null?(me=ba._currentValue,Y=Y.parent!==me?{parent:me,pool:me}:Y):Y=jh(),_={baseLanes:_.baseLanes|s,cachePool:Y}),f.memoizedState=_,f.childLanes=Gd(e,I,s),a.memoizedState=zd,l):(oi(a),s=e.child,e=s.sibling,s=Nn(s,{mode:"visible",children:l.children}),s.return=a,s.sibling=null,e!==null&&(I=a.deletions,I===null?(a.deletions=[e],a.flags|=16):I.push(e)),a.child=s,a.memoizedState=null,s)}function Kd(e,a){return a=ru({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function ru(e,a){return e=pr(22,e,null,a),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function qd(e,a,s){return Us(a,e.child,null,s),e=Kd(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function Zg(e,a,s){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a),dd(e.return,a,s)}function Yd(e,a,s,l,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:f}:(p.isBackwards=a,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=s,p.tailMode=f)}function em(e,a,s){var l=a.pendingProps,f=l.revealOrder,p=l.tail;if(ja(e,a,l.children,s),l=wa.current,(l&2)!==0)l=l&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&&Zg(e,s,a);else if(e.tag===19)Zg(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}l&=1}switch(Ce(wa,l),f){case"forwards":for(s=a.child,f=null;s!==null;)e=s.alternate,e!==null&&Zl(e)===null&&(f=s),s=s.sibling;s=f,s===null?(f=a.child,a.child=null):(f=s.sibling,s.sibling=null),Yd(a,!1,f,s,p);break;case"backwards":for(s=null,f=a.child,a.child=null;f!==null;){if(e=f.alternate,e!==null&&Zl(e)===null){a.child=f;break}e=f.sibling,f.sibling=s,s=f,f=e}Yd(a,!0,s,null,p);break;case"together":Yd(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Rn(e,a,s){if(e!==null&&(a.dependencies=e.dependencies),fi|=a.lanes,(s&a.childLanes)===0)if(e!==null){if(Eo(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=Nn(e,e.pendingProps),a.child=s,s.return=a;e.sibling!==null;)e=e.sibling,s=s.sibling=Nn(e,e.pendingProps),s.return=a;s.sibling=null}return a.child}function Wd(e,a){return(e.lanes&a)!==0?!0:(e=e.dependencies,!!(e!==null&&_l(e)))}function bb(e,a,s){switch(a.tag){case 3:Je(a,a.stateNode.containerInfo),ai(a,ba,e.memoizedState.cache),po();break;case 27:case 5:yt(a);break;case 4:Je(a,a.stateNode.containerInfo);break;case 10:ai(a,a.type,a.memoizedProps.value);break;case 13:var l=a.memoizedState;if(l!==null)return l.dehydrated!==null?(oi(a),a.flags|=128,null):(s&a.child.childLanes)!==0?$g(e,a,s):(oi(a),e=Rn(e,a,s),e!==null?e.sibling:null);oi(a);break;case 19:var f=(e.flags&128)!==0;if(l=(s&a.childLanes)!==0,l||(Eo(e,a,s,!1),l=(s&a.childLanes)!==0),f){if(l)return em(e,a,s);a.flags|=128}if(f=a.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Ce(wa,wa.current),l)break;return null;case 22:case 23:return a.lanes=0,qg(e,a,s);case 24:ai(a,ba,e.memoizedState.cache)}return Rn(e,a,s)}function tm(e,a,s){if(e!==null)if(e.memoizedProps!==a.pendingProps)Ba=!0;else{if(!Wd(e,s)&&(a.flags&128)===0)return Ba=!1,bb(e,a,s);Ba=(e.flags&131072)!==0}else Ba=!1,Dt&&(a.flags&1048576)!==0&&Dh(a,Ml,a.index);switch(a.lanes=0,a.tag){case 16:e:{e=a.pendingProps;var l=a.elementType,f=l._init;if(l=f(l._payload),a.type=l,typeof l=="function")nd(l)?(e=Zi(l,e),a.tag=1,a=Xg(null,a,l,e,s)):(a.tag=0,a=Hd(null,a,l,e,s));else{if(l!=null){if(f=l.$$typeof,f===z){a.tag=11,a=Vg(null,a,l,e,s);break e}else if(f===ee){a.tag=14,a=Gg(null,a,l,e,s);break e}}throw a=ce(l)||l,Error(i(306,a,""))}}return a;case 0:return Hd(e,a,a.type,a.pendingProps,s);case 1:return l=a.type,f=Zi(l,a.pendingProps),Xg(e,a,l,f,s);case 3:e:{if(Je(a,a.stateNode.containerInfo),e===null)throw Error(i(387));l=a.pendingProps;var p=a.memoizedState;f=p.element,yd(e,a),No(a,l,null,s);var I=a.memoizedState;if(l=I.cache,ai(a,ba,l),l!==p.cache&&Ad(a,[ba],s,!0),Io(),l=I.element,p.isDehydrated)if(p={element:l,isDehydrated:!1,cache:I.cache},a.updateQueue.baseState=p,a.memoizedState=p,a.flags&256){a=Jg(e,a,l,s);break e}else if(l!==f){f=kr(Error(i(424)),a),yo(f),a=Jg(e,a,l,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(na=qr(e.firstChild),$a=a,Dt=!0,qi=null,rn=!0,s=Rg(a,null,l,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(po(),l===f){a=Rn(e,a,s);break e}ja(e,a,l,s)}a=a.child}return a;case 26:return au(e,a),e===null?(s=i0(a.type,null,a.pendingProps,null))?a.memoizedState=s:Dt||(s=a.type,e=a.pendingProps,l=pu(Qe.current).createElement(s),l[zt]=a,l[pa]=e,Fa(l,s,e),Kt(l),a.stateNode=l):a.memoizedState=i0(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:return yt(a),e===null&&Dt&&(l=a.stateNode=a0(a.type,a.pendingProps,Qe.current),$a=a,rn=!0,f=na,pi(a.type)?(kA=f,na=qr(l.firstChild)):na=f),ja(e,a,a.pendingProps.children,s),au(e,a),e===null&&(a.flags|=4194304),a.child;case 5:return e===null&&Dt&&((f=l=na)&&(l=Yb(l,a.type,a.pendingProps,rn),l!==null?(a.stateNode=l,$a=a,na=qr(l.firstChild),rn=!1,f=!0):f=!1),f||Yi(a)),yt(a),f=a.type,p=a.pendingProps,I=e!==null?e.memoizedProps:null,l=p.children,IA(f,p)?l=null:I!==null&&IA(f,I)&&(a.flags|=32),a.memoizedState!==null&&(f=xd(e,a,Ab,null,null,s),Yo._currentValue=f),au(e,a),ja(e,a,l,s),a.child;case 6:return e===null&&Dt&&((e=s=na)&&(s=Wb(s,a.pendingProps,rn),s!==null?(a.stateNode=s,$a=a,na=null,e=!0):e=!1),e||Yi(a)),null;case 13:return $g(e,a,s);case 4:return Je(a,a.stateNode.containerInfo),l=a.pendingProps,e===null?a.child=Us(a,null,l,s):ja(e,a,l,s),a.child;case 11:return Vg(e,a,a.type,a.pendingProps,s);case 7:return ja(e,a,a.pendingProps,s),a.child;case 8:return ja(e,a,a.pendingProps.children,s),a.child;case 12:return ja(e,a,a.pendingProps.children,s),a.child;case 10:return l=a.pendingProps,ai(a,a.type,l.value),ja(e,a,l.children,s),a.child;case 9:return f=a.type._context,l=a.pendingProps.children,Xi(a),f=Ka(f),l=l(f),a.flags|=1,ja(e,a,l,s),a.child;case 14:return Gg(e,a,a.type,a.pendingProps,s);case 15:return Kg(e,a,a.type,a.pendingProps,s);case 19:return em(e,a,s);case 31:return l=a.pendingProps,s=a.mode,l={mode:l.mode,children:l.children},e===null?(s=ru(l,s),s.ref=a.ref,a.child=s,s.return=a,a=s):(s=Nn(e.child,l),s.ref=a.ref,a.child=s,s.return=a,a=s),a;case 22:return qg(e,a,s);case 24:return Xi(a),l=Ka(ba),e===null?(f=gd(),f===null&&(f=Gt,p=fd(),f.pooledCache=p,p.refCount++,p!==null&&(f.pooledCacheLanes|=s),f=p),a.memoizedState={parent:l,cache:f},pd(a),ai(a,ba,f)):((e.lanes&s)!==0&&(yd(e,a),No(a,null,null,s),Io()),f=e.memoizedState,p=a.memoizedState,f.parent!==l?(f={parent:l,cache:l},a.memoizedState=f,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=f),ai(a,ba,l)):(l=p.cache,ai(a,ba,l),l!==f.cache&&Ad(a,[ba],s,!0))),ja(e,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Un(e){e.flags|=4}function am(e,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!c0(a)){if(a=Rr.current,a!==null&&((Tt&4194048)===Tt?nn!==null:(Tt&62914560)!==Tt&&(Tt&536870912)===0||a!==nn))throw Co=md,Qh;e.flags|=8192}}function nu(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?Ha():536870912,e.lanes|=a,js|=a)}function Ro(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 l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ea(e){var a=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(a)for(var f=e.child;f!==null;)s|=f.lanes|f.childLanes,l|=f.subtreeFlags&65011712,l|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)s|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=l,e.childLanes=s,a}function wb(e,a,s){var l=a.pendingProps;switch(ld(a),a.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ea(a),null;case 1:return ea(a),null;case 3:return s=a.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),Bn(ba),Ze(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(mo(a)?Un(a):e===null||e.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Uh())),ea(a),null;case 26:return s=a.memoizedState,e===null?(Un(a),s!==null?(ea(a),am(a,s)):(ea(a),a.flags&=-16777217)):s?s!==e.memoizedState?(Un(a),ea(a),am(a,s)):(ea(a),a.flags&=-16777217):(e.memoizedProps!==l&&Un(a),ea(a),a.flags&=-16777217),null;case 27:ta(a),s=Qe.current;var f=a.type;if(e!==null&&a.stateNode!=null)e.memoizedProps!==l&&Un(a);else{if(!l){if(a.stateNode===null)throw Error(i(166));return ea(a),null}e=Me.current,mo(a)?Lh(a):(e=a0(f,l,s),a.stateNode=e,Un(a))}return ea(a),null;case 5:if(ta(a),s=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==l&&Un(a);else{if(!l){if(a.stateNode===null)throw Error(i(166));return ea(a),null}if(e=Me.current,mo(a))Lh(a);else{switch(f=pu(Qe.current),e){case 1:e=f.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:e=f.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":e=f.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":e=f.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":e=f.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?f.createElement(s,{is:l.is}):f.createElement(s)}}e[zt]=a,e[pa]=l;e:for(f=a.child;f!==null;){if(f.tag===5||f.tag===6)e.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===a)break e;for(;f.sibling===null;){if(f.return===null||f.return===a)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}a.stateNode=e;e:switch(Fa(e,s,l),s){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Un(a)}}return ea(a),a.flags&=-16777217,null;case 6:if(e&&a.stateNode!=null)e.memoizedProps!==l&&Un(a);else{if(typeof l!="string"&&a.stateNode===null)throw Error(i(166));if(e=Qe.current,mo(a)){if(e=a.stateNode,s=a.memoizedProps,l=null,f=$a,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}e[zt]=a,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||Wm(e.nodeValue,s)),e||Yi(a)}else e=pu(e).createTextNode(l),e[zt]=a,a.stateNode=e}return ea(a),null;case 13:if(l=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=mo(a),l!==null&&l.dehydrated!==null){if(e===null){if(!f)throw Error(i(318));if(f=a.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(i(317));f[zt]=a}else po(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ea(a),f=!1}else f=Uh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return a.flags&256?(Ln(a),a):(Ln(a),null)}if(Ln(a),(a.flags&128)!==0)return a.lanes=s,a;if(s=l!==null,e=e!==null&&e.memoizedState!==null,s){l=a.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool);var p=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==f&&(l.flags|=2048)}return s!==e&&s&&(a.child.flags|=8192),nu(a,a.updateQueue),ea(a),null;case 4:return Ze(),e===null&&bA(a.stateNode.containerInfo),ea(a),null;case 10:return Bn(a.type),ea(a),null;case 19:if(pe(wa),f=a.memoizedState,f===null)return ea(a),null;if(l=(a.flags&128)!==0,p=f.rendering,p===null)if(l)Ro(f,!1);else{if(ia!==0||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(p=Zl(e),p!==null){for(a.flags|=128,Ro(f,!1),e=p.updateQueue,a.updateQueue=e,nu(a,e),a.subtreeFlags=0,e=s,s=a.child;s!==null;)Bh(s,e),s=s.sibling;return Ce(wa,wa.current&1|2),a.child}e=e.sibling}f.tail!==null&&je()>ou&&(a.flags|=128,l=!0,Ro(f,!1),a.lanes=4194304)}else{if(!l)if(e=Zl(p),e!==null){if(a.flags|=128,l=!0,e=e.updateQueue,a.updateQueue=e,nu(a,e),Ro(f,!0),f.tail===null&&f.tailMode==="hidden"&&!p.alternate&&!Dt)return ea(a),null}else 2*je()-f.renderingStartTime>ou&&s!==536870912&&(a.flags|=128,l=!0,Ro(f,!1),a.lanes=4194304);f.isBackwards?(p.sibling=a.child,a.child=p):(e=f.last,e!==null?e.sibling=p:a.child=p,f.last=p)}return f.tail!==null?(a=f.tail,f.rendering=a,f.tail=a.sibling,f.renderingStartTime=je(),a.sibling=null,e=wa.current,Ce(wa,l?e&1|2:e&1),a):(ea(a),null);case 22:case 23:return Ln(a),vd(),l=a.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(a.flags|=8192):l&&(a.flags|=8192),l?(s&536870912)!==0&&(a.flags&128)===0&&(ea(a),a.subtreeFlags&6&&(a.flags|=8192)):ea(a),s=a.updateQueue,s!==null&&nu(a,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),l!==s&&(a.flags|=2048),e!==null&&pe(Ji),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),Bn(ba),ea(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function vb(e,a){switch(ld(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 3:return Bn(ba),Ze(),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return ta(a),null;case 13:if(Ln(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error(i(340));po()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 19:return pe(wa),null;case 4:return Ze(),null;case 10:return Bn(a.type),null;case 22:case 23:return Ln(a),vd(),e!==null&&pe(Ji),e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 24:return Bn(ba),null;case 25:return null;default:return null}}function rm(e,a){switch(ld(a),a.tag){case 3:Bn(ba),Ze();break;case 26:case 27:case 5:ta(a);break;case 4:Ze();break;case 13:Ln(a);break;case 19:pe(wa);break;case 10:Bn(a.type);break;case 22:case 23:Ln(a),vd(),e!==null&&pe(Ji);break;case 24:Bn(ba)}}function Uo(e,a){try{var s=a.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var f=l.next;s=f;do{if((s.tag&e)===e){l=void 0;var p=s.create,I=s.inst;l=p(),I.destroy=l}s=s.next}while(s!==f)}}catch(_){Pt(a,a.return,_)}}function ui(e,a,s){try{var l=a.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var p=f.next;l=p;do{if((l.tag&e)===e){var I=l.inst,_=I.destroy;if(_!==void 0){I.destroy=void 0,f=a;var Y=s,me=_;try{me()}catch(Ie){Pt(f,Y,Ie)}}}l=l.next}while(l!==p)}}catch(Ie){Pt(a,a.return,Ie)}}function nm(e){var a=e.updateQueue;if(a!==null){var s=e.stateNode;try{Gh(a,s)}catch(l){Pt(e,e.return,l)}}}function im(e,a,s){s.props=Zi(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){Pt(e,a,l)}}function Oo(e,a){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof s=="function"?e.refCleanup=s(l):s.current=l}}catch(f){Pt(e,a,f)}}function sn(e,a){var s=e.ref,l=e.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(f){Pt(e,a,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(f){Pt(e,a,f)}else s.current=null}function sm(e){var a=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(f){Pt(e,e.return,f)}}function Xd(e,a,s){try{var l=e.stateNode;zb(l,e.type,s,a),l[pa]=a}catch(f){Pt(e,e.return,f)}}function om(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&pi(e.type)||e.tag===4}function Jd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||om(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&&pi(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 $d(e,a,s){var l=e.tag;if(l===5||l===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=mu));else if(l!==4&&(l===27&&pi(e.type)&&(s=e.stateNode,a=null),e=e.child,e!==null))for($d(e,a,s),e=e.sibling;e!==null;)$d(e,a,s),e=e.sibling}function iu(e,a,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,a?s.insertBefore(e,a):s.appendChild(e);else if(l!==4&&(l===27&&pi(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(iu(e,a,s),e=e.sibling;e!==null;)iu(e,a,s),e=e.sibling}function lm(e){var a=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,f=a.attributes;f.length;)a.removeAttributeNode(f[0]);Fa(a,l,s),a[zt]=e,a[pa]=s}catch(p){Pt(e,e.return,p)}}var On=!1,da=!1,Zd=!1,um=typeof WeakSet=="function"?WeakSet:Set,Da=null;function Cb(e,a){if(e=e.containerInfo,CA=Cu,e=bh(e),Jc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var f=l.anchorOffset,p=l.focusNode;l=l.focusOffset;try{s.nodeType,p.nodeType}catch{s=null;break e}var I=0,_=-1,Y=-1,me=0,Ie=0,De=e,ye=null;t:for(;;){for(var be;De!==s||f!==0&&De.nodeType!==3||(_=I+f),De!==p||l!==0&&De.nodeType!==3||(Y=I+l),De.nodeType===3&&(I+=De.nodeValue.length),(be=De.firstChild)!==null;)ye=De,De=be;for(;;){if(De===e)break t;if(ye===s&&++me===f&&(_=I),ye===p&&++Ie===l&&(Y=I),(be=De.nextSibling)!==null)break;De=ye,ye=De.parentNode}De=be}s=_===-1||Y===-1?null:{start:_,end:Y}}else s=null}s=s||{start:0,end:0}}else s=null;for(xA={focusedElem:e,selectionRange:s},Cu=!1,Da=a;Da!==null;)if(a=Da,e=a.child,(a.subtreeFlags&1024)!==0&&e!==null)e.return=a,Da=e;else for(;Da!==null;){switch(a=Da,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,f=p.memoizedProps,p=p.memoizedState,l=s.stateNode;try{var st=Zi(s.type,f,s.elementType===s.type);e=l.getSnapshotBeforeUpdate(st,p),l.__reactInternalSnapshotBeforeUpdate=e}catch(at){Pt(s,s.return,at)}}break;case 3:if((e&1024)!==0){if(e=a.stateNode.containerInfo,s=e.nodeType,s===9)SA(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":SA(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,Da=e;break}Da=a.return}}function cm(e,a,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:ci(e,s),l&4&&Uo(5,s);break;case 1:if(ci(e,s),l&4)if(e=s.stateNode,a===null)try{e.componentDidMount()}catch(I){Pt(s,s.return,I)}else{var f=Zi(s.type,a.memoizedProps);a=a.memoizedState;try{e.componentDidUpdate(f,a,e.__reactInternalSnapshotBeforeUpdate)}catch(I){Pt(s,s.return,I)}}l&64&&nm(s),l&512&&Oo(s,s.return);break;case 3:if(ci(e,s),l&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{Gh(e,a)}catch(I){Pt(s,s.return,I)}}break;case 27:a===null&&l&4&&lm(s);case 26:case 5:ci(e,s),a===null&&l&4&&sm(s),l&512&&Oo(s,s.return);break;case 12:ci(e,s);break;case 13:ci(e,s),l&4&&fm(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=Lb.bind(null,s),Xb(e,s))));break;case 22:if(l=s.memoizedState!==null||On,!l){a=a!==null&&a.memoizedState!==null||da,f=On;var p=da;On=l,(da=a)&&!p?di(e,s,(s.subtreeFlags&8772)!==0):ci(e,s),On=f,da=p}break;case 30:break;default:ci(e,s)}}function dm(e){var a=e.alternate;a!==null&&(e.alternate=null,dm(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&oa(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 Wt=null,lr=!1;function Mn(e,a,s){for(s=s.child;s!==null;)Am(e,a,s),s=s.sibling}function Am(e,a,s){if(L&&typeof L.onCommitFiberUnmount=="function")try{L.onCommitFiberUnmount(ze,s)}catch{}switch(s.tag){case 26:da||sn(s,a),Mn(e,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:da||sn(s,a);var l=Wt,f=lr;pi(s.type)&&(Wt=s.stateNode,lr=!1),Mn(e,a,s),Vo(s.stateNode),Wt=l,lr=f;break;case 5:da||sn(s,a);case 6:if(l=Wt,f=lr,Wt=null,Mn(e,a,s),Wt=l,lr=f,Wt!==null)if(lr)try{(Wt.nodeType===9?Wt.body:Wt.nodeName==="HTML"?Wt.ownerDocument.body:Wt).removeChild(s.stateNode)}catch(p){Pt(s,a,p)}else try{Wt.removeChild(s.stateNode)}catch(p){Pt(s,a,p)}break;case 18:Wt!==null&&(lr?(e=Wt,e0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),$o(e)):e0(Wt,s.stateNode));break;case 4:l=Wt,f=lr,Wt=s.stateNode.containerInfo,lr=!0,Mn(e,a,s),Wt=l,lr=f;break;case 0:case 11:case 14:case 15:da||ui(2,s,a),da||ui(4,s,a),Mn(e,a,s);break;case 1:da||(sn(s,a),l=s.stateNode,typeof l.componentWillUnmount=="function"&&im(s,a,l)),Mn(e,a,s);break;case 21:Mn(e,a,s);break;case 22:da=(l=da)||s.memoizedState!==null,Mn(e,a,s),da=l;break;default:Mn(e,a,s)}}function fm(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{$o(e)}catch(s){Pt(a,a.return,s)}}function xb(e){switch(e.tag){case 13:case 19:var a=e.stateNode;return a===null&&(a=e.stateNode=new um),a;case 22:return e=e.stateNode,a=e._retryCache,a===null&&(a=e._retryCache=new um),a;default:throw Error(i(435,e.tag))}}function eA(e,a){var s=xb(e);a.forEach(function(l){var f=Rb.bind(null,e,l);s.has(l)||(s.add(l),l.then(f,f))})}function yr(e,a){var s=a.deletions;if(s!==null)for(var l=0;l<s.length;l++){var f=s[l],p=e,I=a,_=I;e:for(;_!==null;){switch(_.tag){case 27:if(pi(_.type)){Wt=_.stateNode,lr=!1;break e}break;case 5:Wt=_.stateNode,lr=!1;break e;case 3:case 4:Wt=_.stateNode.containerInfo,lr=!0;break e}_=_.return}if(Wt===null)throw Error(i(160));Am(p,I,f),Wt=null,lr=!1,p=f.alternate,p!==null&&(p.return=null),f.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)hm(a,e),a=a.sibling}var Kr=null;function hm(e,a){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yr(a,e),Er(e),l&4&&(ui(3,e,e.return),Uo(3,e),ui(5,e,e.return));break;case 1:yr(a,e),Er(e),l&512&&(da||s===null||sn(s,s.return)),l&64&&On&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var f=Kr;if(yr(a,e),Er(e),l&512&&(da||s===null||sn(s,s.return)),l&4){var p=s!==null?s.memoizedState:null;if(l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null){e:{l=e.type,s=e.memoizedProps,f=f.ownerDocument||f;t:switch(l){case"title":p=f.getElementsByTagName("title")[0],(!p||p[xr]||p[zt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=f.createElement(l),f.head.insertBefore(p,f.querySelector("head > title"))),Fa(p,l,s),p[zt]=e,Kt(p),l=p;break e;case"link":var I=l0("link","href",f).get(l+(s.href||""));if(I){for(var _=0;_<I.length;_++)if(p=I[_],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)){I.splice(_,1);break t}}p=f.createElement(l),Fa(p,l,s),f.head.appendChild(p);break;case"meta":if(I=l0("meta","content",f).get(l+(s.content||""))){for(_=0;_<I.length;_++)if(p=I[_],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)){I.splice(_,1);break t}}p=f.createElement(l),Fa(p,l,s),f.head.appendChild(p);break;default:throw Error(i(468,l))}p[zt]=e,Kt(p),l=p}e.stateNode=l}else u0(f,e.type,e.stateNode);else e.stateNode=o0(f,l,e.memoizedProps);else p!==l?(p===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):p.count--,l===null?u0(f,e.type,e.stateNode):o0(f,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Xd(e,e.memoizedProps,s.memoizedProps)}break;case 27:yr(a,e),Er(e),l&512&&(da||s===null||sn(s,s.return)),s!==null&&l&4&&Xd(e,e.memoizedProps,s.memoizedProps);break;case 5:if(yr(a,e),Er(e),l&512&&(da||s===null||sn(s,s.return)),e.flags&32){f=e.stateNode;try{Tr(f,"")}catch(be){Pt(e,e.return,be)}}l&4&&e.stateNode!=null&&(f=e.memoizedProps,Xd(e,f,s!==null?s.memoizedProps:f)),l&1024&&(Zd=!0);break;case 6:if(yr(a,e),Er(e),l&4){if(e.stateNode===null)throw Error(i(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(be){Pt(e,e.return,be)}}break;case 3:if(bu=null,f=Kr,Kr=yu(a.containerInfo),yr(a,e),Kr=f,Er(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{$o(a.containerInfo)}catch(be){Pt(e,e.return,be)}Zd&&(Zd=!1,gm(e));break;case 4:l=Kr,Kr=yu(e.stateNode.containerInfo),yr(a,e),Er(e),Kr=l;break;case 12:yr(a,e),Er(e);break;case 13:yr(a,e),Er(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(sA=je()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,eA(e,l)));break;case 22:f=e.memoizedState!==null;var Y=s!==null&&s.memoizedState!==null,me=On,Ie=da;if(On=me||f,da=Ie||Y,yr(a,e),da=Ie,On=me,Er(e),l&8192)e:for(a=e.stateNode,a._visibility=f?a._visibility&-2:a._visibility|1,f&&(s===null||Y||On||da||es(e)),s=null,a=e;;){if(a.tag===5||a.tag===26){if(s===null){Y=s=a;try{if(p=Y.stateNode,f)I=p.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none";else{_=Y.stateNode;var De=Y.memoizedProps.style,ye=De!=null&&De.hasOwnProperty("display")?De.display:null;_.style.display=ye==null||typeof ye=="boolean"?"":(""+ye).trim()}}catch(be){Pt(Y,Y.return,be)}}}else if(a.tag===6){if(s===null){Y=a;try{Y.stateNode.nodeValue=f?"":Y.memoizedProps}catch(be){Pt(Y,Y.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}l&4&&(l=e.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,eA(e,s))));break;case 19:yr(a,e),Er(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,eA(e,l)));break;case 30:break;case 21:break;default:yr(a,e),Er(e)}}function Er(e){var a=e.flags;if(a&2){try{for(var s,l=e.return;l!==null;){if(om(l)){s=l;break}l=l.return}if(s==null)throw Error(i(160));switch(s.tag){case 27:var f=s.stateNode,p=Jd(e);iu(e,p,f);break;case 5:var I=s.stateNode;s.flags&32&&(Tr(I,""),s.flags&=-33);var _=Jd(e);iu(e,_,I);break;case 3:case 4:var Y=s.stateNode.containerInfo,me=Jd(e);$d(e,me,Y);break;default:throw Error(i(161))}}catch(Ie){Pt(e,e.return,Ie)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function gm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;gm(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),e=e.sibling}}function ci(e,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)cm(e,a.alternate,a),a=a.sibling}function es(e){for(e=e.child;e!==null;){var a=e;switch(a.tag){case 0:case 11:case 14:case 15:ui(4,a,a.return),es(a);break;case 1:sn(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&im(a,a.return,s),es(a);break;case 27:Vo(a.stateNode);case 26:case 5:sn(a,a.return),es(a);break;case 22:a.memoizedState===null&&es(a);break;case 30:es(a);break;default:es(a)}e=e.sibling}}function di(e,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var l=a.alternate,f=e,p=a,I=p.flags;switch(p.tag){case 0:case 11:case 15:di(f,p,s),Uo(4,p);break;case 1:if(di(f,p,s),l=p,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(me){Pt(l,l.return,me)}if(l=p,f=l.updateQueue,f!==null){var _=l.stateNode;try{var Y=f.shared.hiddenCallbacks;if(Y!==null)for(f.shared.hiddenCallbacks=null,f=0;f<Y.length;f++)Vh(Y[f],_)}catch(me){Pt(l,l.return,me)}}s&&I&64&&nm(p),Oo(p,p.return);break;case 27:lm(p);case 26:case 5:di(f,p,s),s&&l===null&&I&4&&sm(p),Oo(p,p.return);break;case 12:di(f,p,s);break;case 13:di(f,p,s),s&&I&4&&fm(f,p);break;case 22:p.memoizedState===null&&di(f,p,s),Oo(p,p.return);break;case 30:break;default:di(f,p,s)}a=a.sibling}}function tA(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 aA(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 on(e,a,s,l){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)mm(e,a,s,l),a=a.sibling}function mm(e,a,s,l){var f=a.flags;switch(a.tag){case 0:case 11:case 15:on(e,a,s,l),f&2048&&Uo(9,a);break;case 1:on(e,a,s,l);break;case 3:on(e,a,s,l),f&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(f&2048){on(e,a,s,l),e=a.stateNode;try{var p=a.memoizedProps,I=p.id,_=p.onPostCommit;typeof _=="function"&&_(I,a.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Y){Pt(a,a.return,Y)}}else on(e,a,s,l);break;case 13:on(e,a,s,l);break;case 23:break;case 22:p=a.stateNode,I=a.alternate,a.memoizedState!==null?p._visibility&2?on(e,a,s,l):Mo(e,a):p._visibility&2?on(e,a,s,l):(p._visibility|=2,Os(e,a,s,l,(a.subtreeFlags&10256)!==0)),f&2048&&tA(I,a);break;case 24:on(e,a,s,l),f&2048&&aA(a.alternate,a);break;default:on(e,a,s,l)}}function Os(e,a,s,l,f){for(f=f&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var p=e,I=a,_=s,Y=l,me=I.flags;switch(I.tag){case 0:case 11:case 15:Os(p,I,_,Y,f),Uo(8,I);break;case 23:break;case 22:var Ie=I.stateNode;I.memoizedState!==null?Ie._visibility&2?Os(p,I,_,Y,f):Mo(p,I):(Ie._visibility|=2,Os(p,I,_,Y,f)),f&&me&2048&&tA(I.alternate,I);break;case 24:Os(p,I,_,Y,f),f&&me&2048&&aA(I.alternate,I);break;default:Os(p,I,_,Y,f)}a=a.sibling}}function Mo(e,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=e,l=a,f=l.flags;switch(l.tag){case 22:Mo(s,l),f&2048&&tA(l.alternate,l);break;case 24:Mo(s,l),f&2048&&aA(l.alternate,l);break;default:Mo(s,l)}a=a.sibling}}var _o=8192;function Ms(e){if(e.subtreeFlags&_o)for(e=e.child;e!==null;)pm(e),e=e.sibling}function pm(e){switch(e.tag){case 26:Ms(e),e.flags&_o&&e.memoizedState!==null&&uw(Kr,e.memoizedState,e.memoizedProps);break;case 5:Ms(e);break;case 3:case 4:var a=Kr;Kr=yu(e.stateNode.containerInfo),Ms(e),Kr=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=_o,_o=16777216,Ms(e),_o=a):Ms(e));break;default:Ms(e)}}function ym(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 jo(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var l=a[s];Da=l,bm(l,e)}ym(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Em(e),e=e.sibling}function Em(e){switch(e.tag){case 0:case 11:case 15:jo(e),e.flags&2048&&ui(9,e,e.return);break;case 3:jo(e);break;case 12:jo(e);break;case 22:var a=e.stateNode;e.memoizedState!==null&&a._visibility&2&&(e.return===null||e.return.tag!==13)?(a._visibility&=-3,su(e)):jo(e);break;default:jo(e)}}function su(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var l=a[s];Da=l,bm(l,e)}ym(e)}for(e=e.child;e!==null;){switch(a=e,a.tag){case 0:case 11:case 15:ui(8,a,a.return),su(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,su(a));break;default:su(a)}e=e.sibling}}function bm(e,a){for(;Da!==null;){var s=Da;switch(s.tag){case 0:case 11:case 15:ui(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:bo(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,Da=l;else e:for(s=e;Da!==null;){l=Da;var f=l.sibling,p=l.return;if(dm(l),l===s){Da=null;break e}if(f!==null){f.return=p,Da=f;break e}Da=p}}}var Ib={getCacheForType:function(e){var a=Ka(ba),s=a.data.get(e);return s===void 0&&(s=e(),a.data.set(e,s)),s}},Nb=typeof WeakMap=="function"?WeakMap:Map,Rt=0,Gt=null,xt=null,Tt=0,Ut=0,br=null,Ai=!1,_s=!1,rA=!1,_n=0,ia=0,fi=0,ts=0,nA=0,Ur=0,js=0,Qo=null,ur=null,iA=!1,sA=0,ou=1/0,lu=null,hi=null,Qa=0,gi=null,Qs=null,Fs=0,oA=0,lA=null,wm=null,Fo=0,uA=null;function wr(){if((Rt&2)!==0&&Tt!==0)return Tt&-Tt;if(G.T!==null){var e=Ss;return e!==0?e:mA()}return qn()}function vm(){Ur===0&&(Ur=(Tt&536870912)===0||Dt?bn():536870912);var e=Rr.current;return e!==null&&(e.flags|=32),Ur}function vr(e,a,s){(e===Gt&&(Ut===2||Ut===9)||e.cancelPendingCommit!==null)&&(Ps(e,0),mi(e,Tt,Ur,!1)),$r(e,s),((Rt&2)===0||e!==Gt)&&(e===Gt&&((Rt&2)===0&&(ts|=s),ia===4&&mi(e,Tt,Ur,!1)),ln(e))}function Cm(e,a,s){if((Rt&6)!==0)throw Error(i(327));var l=!s&&(a&124)===0&&(a&e.expiredLanes)===0||vt(e,a),f=l?kb(e,a):AA(e,a,!0),p=l;do{if(f===0){_s&&!l&&mi(e,a,0,!1);break}else{if(s=e.current.alternate,p&&!Sb(s)){f=AA(e,a,!1),p=!1;continue}if(f===2){if(p=a,e.errorRecoveryDisabledLanes&p)var I=0;else I=e.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){a=I;e:{var _=e;f=Qo;var Y=_.current.memoizedState.isDehydrated;if(Y&&(Ps(_,I).flags|=256),I=AA(_,I,!1),I!==2){if(rA&&!Y){_.errorRecoveryDisabledLanes|=p,ts|=p,f=4;break e}p=ur,ur=f,p!==null&&(ur===null?ur=p:ur.push.apply(ur,p))}f=I}if(p=!1,f!==2)continue}}if(f===1){Ps(e,0),mi(e,a,0,!0);break}e:{switch(l=e,p=f,p){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:mi(l,a,Ur,!Ai);break e;case 2:ur=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(f=sA+300-je(),10<f)){if(mi(l,a,Ur,!Ai),lt(l,0,!0)!==0)break e;l.timeoutHandle=$m(xm.bind(null,l,s,ur,lu,iA,a,Ur,ts,js,Ai,p,2,-0,0),f);break e}xm(l,s,ur,lu,iA,a,Ur,ts,js,Ai,p,0,-0,0)}}break}while(!0);ln(e)}function xm(e,a,s,l,f,p,I,_,Y,me,Ie,De,ye,be){if(e.timeoutHandle=-1,De=a.subtreeFlags,(De&8192||(De&16785408)===16785408)&&(qo={stylesheets:null,count:0,unsuspend:lw},pm(a),De=cw(),De!==null)){e.cancelPendingCommit=De(Dm.bind(null,e,a,p,s,l,f,I,_,Y,Ie,1,ye,be)),mi(e,p,I,!me);return}Dm(e,a,p,s,l,f,I,_,Y)}function Sb(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 l=0;l<s.length;l++){var f=s[l],p=f.getSnapshot;f=f.value;try{if(!mr(p(),f))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 mi(e,a,s,l){a&=~nA,a&=~ts,e.suspendedLanes|=a,e.pingedLanes&=~a,l&&(e.warmLanes|=a),l=e.expirationTimes;for(var f=a;0<f;){var p=31-w(f),I=1<<p;l[p]=-1,f&=~I}s!==0&&Fe(e,s,a)}function uu(){return(Rt&6)===0?(Po(0),!1):!0}function cA(){if(xt!==null){if(Ut===0)var e=xt.return;else e=xt,kn=Wi=null,Sd(e),Rs=null,Do=0,e=xt;for(;e!==null;)rm(e.alternate,e),e=e.return;xt=null}}function Ps(e,a){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,Gb(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),cA(),Gt=e,xt=s=Nn(e.current,null),Tt=a,Ut=0,br=null,Ai=!1,_s=vt(e,a),rA=!1,js=Ur=nA=ts=fi=ia=0,ur=Qo=null,iA=!1,(a&8)!==0&&(a|=a&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=a;0<l;){var f=31-w(l),p=1<<f;a|=e[f],l&=~p}return _n=a,Dl(),s}function Im(e,a){wt=null,G.H=Xl,a===vo||a===Fl?(a=Hh(),Ut=3):a===Qh?(a=Hh(),Ut=4):Ut=a===zg?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,br=a,xt===null&&(ia=1,tu(e,kr(a,e.current)))}function Nm(){var e=G.H;return G.H=Xl,e===null?Xl:e}function Sm(){var e=G.A;return G.A=Ib,e}function dA(){ia=4,Ai||(Tt&4194048)!==Tt&&Rr.current!==null||(_s=!0),(fi&134217727)===0&&(ts&134217727)===0||Gt===null||mi(Gt,Tt,Ur,!1)}function AA(e,a,s){var l=Rt;Rt|=2;var f=Nm(),p=Sm();(Gt!==e||Tt!==a)&&(lu=null,Ps(e,a)),a=!1;var I=ia;e:do try{if(Ut!==0&&xt!==null){var _=xt,Y=br;switch(Ut){case 8:cA(),I=6;break e;case 3:case 2:case 9:case 6:Rr.current===null&&(a=!0);var me=Ut;if(Ut=0,br=null,Hs(e,_,Y,me),s&&_s){I=0;break e}break;default:me=Ut,Ut=0,br=null,Hs(e,_,Y,me)}}Tb(),I=ia;break}catch(Ie){Im(e,Ie)}while(!0);return a&&e.shellSuspendCounter++,kn=Wi=null,Rt=l,G.H=f,G.A=p,xt===null&&(Gt=null,Tt=0,Dl()),I}function Tb(){for(;xt!==null;)Tm(xt)}function kb(e,a){var s=Rt;Rt|=2;var l=Nm(),f=Sm();Gt!==e||Tt!==a?(lu=null,ou=je()+500,Ps(e,a)):_s=vt(e,a);e:do try{if(Ut!==0&&xt!==null){a=xt;var p=br;t:switch(Ut){case 1:Ut=0,br=null,Hs(e,a,p,1);break;case 2:case 9:if(Fh(p)){Ut=0,br=null,km(a);break}a=function(){Ut!==2&&Ut!==9||Gt!==e||(Ut=7),ln(e)},p.then(a,a);break e;case 3:Ut=7;break e;case 4:Ut=5;break e;case 7:Fh(p)?(Ut=0,br=null,km(a)):(Ut=0,br=null,Hs(e,a,p,7));break;case 5:var I=null;switch(xt.tag){case 26:I=xt.memoizedState;case 5:case 27:var _=xt;if(!I||c0(I)){Ut=0,br=null;var Y=_.sibling;if(Y!==null)xt=Y;else{var me=_.return;me!==null?(xt=me,cu(me)):xt=null}break t}}Ut=0,br=null,Hs(e,a,p,5);break;case 6:Ut=0,br=null,Hs(e,a,p,6);break;case 8:cA(),ia=6;break e;default:throw Error(i(462))}}Bb();break}catch(Ie){Im(e,Ie)}while(!0);return kn=Wi=null,G.H=l,G.A=f,Rt=s,xt!==null?0:(Gt=null,Tt=0,Dl(),ia)}function Bb(){for(;xt!==null&&!Ht();)Tm(xt)}function Tm(e){var a=tm(e.alternate,e,_n);e.memoizedProps=e.pendingProps,a===null?cu(e):xt=a}function km(e){var a=e,s=a.alternate;switch(a.tag){case 15:case 0:a=Wg(s,a,a.pendingProps,a.type,void 0,Tt);break;case 11:a=Wg(s,a,a.pendingProps,a.type.render,a.ref,Tt);break;case 5:Sd(a);default:rm(s,a),a=xt=Bh(a,_n),a=tm(s,a,_n)}e.memoizedProps=e.pendingProps,a===null?cu(e):xt=a}function Hs(e,a,s,l){kn=Wi=null,Sd(a),Rs=null,Do=0;var f=a.return;try{if(Eb(e,f,a,s,Tt)){ia=1,tu(e,kr(s,e.current)),xt=null;return}}catch(p){if(f!==null)throw xt=f,p;ia=1,tu(e,kr(s,e.current)),xt=null;return}a.flags&32768?(Dt||l===1?e=!0:_s||(Tt&536870912)!==0?e=!1:(Ai=e=!0,(l===2||l===9||l===3||l===6)&&(l=Rr.current,l!==null&&l.tag===13&&(l.flags|=16384))),Bm(a,e)):cu(a)}function cu(e){var a=e;do{if((a.flags&32768)!==0){Bm(a,Ai);return}e=a.return;var s=wb(a.alternate,a,_n);if(s!==null){xt=s;return}if(a=a.sibling,a!==null){xt=a;return}xt=a=e}while(a!==null);ia===0&&(ia=5)}function Bm(e,a){do{var s=vb(e.alternate,e);if(s!==null){s.flags&=32767,xt=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(e=e.sibling,e!==null)){xt=e;return}xt=e=s}while(e!==null);ia=6,xt=null}function Dm(e,a,s,l,f,p,I,_,Y){e.cancelPendingCommit=null;do du();while(Qa!==0);if((Rt&6)!==0)throw Error(i(327));if(a!==null){if(a===e.current)throw Error(i(177));if(p=a.lanes|a.childLanes,p|=ad,fs(e,s,p,I,_,Y),e===Gt&&(xt=Gt=null,Tt=0),Qs=a,gi=e,Fs=s,oA=p,lA=f,wm=l,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ub(ie,function(){return Mm(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||l){l=G.T,G.T=null,f=oe.p,oe.p=2,I=Rt,Rt|=4;try{Cb(e,a,s)}finally{Rt=I,oe.p=f,G.T=l}}Qa=1,Lm(),Rm(),Um()}}function Lm(){if(Qa===1){Qa=0;var e=gi,a=Qs,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=G.T,G.T=null;var l=oe.p;oe.p=2;var f=Rt;Rt|=4;try{hm(a,e);var p=xA,I=bh(e.containerInfo),_=p.focusedElem,Y=p.selectionRange;if(I!==_&&_&&_.ownerDocument&&Eh(_.ownerDocument.documentElement,_)){if(Y!==null&&Jc(_)){var me=Y.start,Ie=Y.end;if(Ie===void 0&&(Ie=me),"selectionStart"in _)_.selectionStart=me,_.selectionEnd=Math.min(Ie,_.value.length);else{var De=_.ownerDocument||document,ye=De&&De.defaultView||window;if(ye.getSelection){var be=ye.getSelection(),st=_.textContent.length,at=Math.min(Y.start,st),jt=Y.end===void 0?at:Math.min(Y.end,st);!be.extend&&at>jt&&(I=jt,jt=at,at=I);var le=yh(_,at),ae=yh(_,jt);if(le&&ae&&(be.rangeCount!==1||be.anchorNode!==le.node||be.anchorOffset!==le.offset||be.focusNode!==ae.node||be.focusOffset!==ae.offset)){var he=De.createRange();he.setStart(le.node,le.offset),be.removeAllRanges(),at>jt?(be.addRange(he),be.extend(ae.node,ae.offset)):(he.setEnd(ae.node,ae.offset),be.addRange(he))}}}}for(De=[],be=_;be=be.parentNode;)be.nodeType===1&&De.push({element:be,left:be.scrollLeft,top:be.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<De.length;_++){var Te=De[_];Te.element.scrollLeft=Te.left,Te.element.scrollTop=Te.top}}Cu=!!CA,xA=CA=null}finally{Rt=f,oe.p=l,G.T=s}}e.current=a,Qa=2}}function Rm(){if(Qa===2){Qa=0;var e=gi,a=Qs,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=G.T,G.T=null;var l=oe.p;oe.p=2;var f=Rt;Rt|=4;try{cm(e,a.alternate,a)}finally{Rt=f,oe.p=l,G.T=s}}Qa=3}}function Um(){if(Qa===4||Qa===3){Qa=0,Se();var e=gi,a=Qs,s=Fs,l=wm;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Qa=5:(Qa=0,Qs=gi=null,Om(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(hi=null),Ta(s),a=a.stateNode,L&&typeof L.onCommitFiberRoot=="function")try{L.onCommitFiberRoot(ze,a,void 0,(a.current.flags&128)===128)}catch{}if(l!==null){a=G.T,f=oe.p,oe.p=2,G.T=null;try{for(var p=e.onRecoverableError,I=0;I<l.length;I++){var _=l[I];p(_.value,{componentStack:_.stack})}}finally{G.T=a,oe.p=f}}(Fs&3)!==0&&du(),ln(e),f=e.pendingLanes,(s&4194090)!==0&&(f&42)!==0?e===uA?Fo++:(Fo=0,uA=e):Fo=0,Po(0)}}function Om(e,a){(e.pooledCacheLanes&=a)===0&&(a=e.pooledCache,a!=null&&(e.pooledCache=null,bo(a)))}function du(e){return Lm(),Rm(),Um(),Mm()}function Mm(){if(Qa!==5)return!1;var e=gi,a=oA;oA=0;var s=Ta(Fs),l=G.T,f=oe.p;try{oe.p=32>s?32:s,G.T=null,s=lA,lA=null;var p=gi,I=Fs;if(Qa=0,Qs=gi=null,Fs=0,(Rt&6)!==0)throw Error(i(331));var _=Rt;if(Rt|=4,Em(p.current),mm(p,p.current,I,s),Rt=_,Po(0,!1),L&&typeof L.onPostCommitFiberRoot=="function")try{L.onPostCommitFiberRoot(ze,p)}catch{}return!0}finally{oe.p=f,G.T=l,Om(e,a)}}function _m(e,a,s){a=kr(s,a),a=Pd(e.stateNode,a,2),e=ii(e,a,2),e!==null&&($r(e,2),ln(e))}function Pt(e,a,s){if(e.tag===3)_m(e,e,s);else for(;a!==null;){if(a.tag===3){_m(a,e,s);break}else if(a.tag===1){var l=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(hi===null||!hi.has(l))){e=kr(s,e),s=Pg(2),l=ii(a,s,2),l!==null&&(Hg(s,l,a,e),$r(l,2),ln(l));break}}a=a.return}}function fA(e,a,s){var l=e.pingCache;if(l===null){l=e.pingCache=new Nb;var f=new Set;l.set(a,f)}else f=l.get(a),f===void 0&&(f=new Set,l.set(a,f));f.has(s)||(rA=!0,f.add(s),e=Db.bind(null,e,a,s),a.then(e,e))}function Db(e,a,s){var l=e.pingCache;l!==null&&l.delete(a),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Gt===e&&(Tt&s)===s&&(ia===4||ia===3&&(Tt&62914560)===Tt&&300>je()-sA?(Rt&2)===0&&Ps(e,0):nA|=s,js===Tt&&(js=0)),ln(e)}function jm(e,a){a===0&&(a=Ha()),e=Cs(e,a),e!==null&&($r(e,a),ln(e))}function Lb(e){var a=e.memoizedState,s=0;a!==null&&(s=a.retryLane),jm(e,s)}function Rb(e,a){var s=0;switch(e.tag){case 13:var l=e.stateNode,f=e.memoizedState;f!==null&&(s=f.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(a),jm(e,s)}function Ub(e,a){return At(e,a)}var Au=null,zs=null,hA=!1,fu=!1,gA=!1,as=0;function ln(e){e!==zs&&e.next===null&&(zs===null?Au=zs=e:zs=zs.next=e),fu=!0,hA||(hA=!0,Mb())}function Po(e,a){if(!gA&&fu){gA=!0;do for(var s=!1,l=Au;l!==null;){if(e!==0){var f=l.pendingLanes;if(f===0)var p=0;else{var I=l.suspendedLanes,_=l.pingedLanes;p=(1<<31-w(42|e)+1)-1,p&=f&~(I&~_),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(s=!0,Hm(l,p))}else p=Tt,p=lt(l,l===Gt?p:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(p&3)===0||vt(l,p)||(s=!0,Hm(l,p));l=l.next}while(s);gA=!1}}function Ob(){Qm()}function Qm(){fu=hA=!1;var e=0;as!==0&&(Vb()&&(e=as),as=0);for(var a=je(),s=null,l=Au;l!==null;){var f=l.next,p=Fm(l,a);p===0?(l.next=null,s===null?Au=f:s.next=f,f===null&&(zs=s)):(s=l,(e!==0||(p&3)!==0)&&(fu=!0)),l=f}Po(e)}function Fm(e,a){for(var s=e.suspendedLanes,l=e.pingedLanes,f=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var I=31-w(p),_=1<<I,Y=f[I];Y===-1?((_&s)===0||(_&l)!==0)&&(f[I]=dt(_,a)):Y<=a&&(e.expiredLanes|=_),p&=~_}if(a=Gt,s=Tt,s=lt(e,e===a?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===a&&(Ut===2||Ut===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Et(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||vt(e,s)){if(a=s&-s,a===e.callbackPriority)return a;switch(l!==null&&Et(l),Ta(s)){case 2:case 8:s=K;break;case 32:s=ie;break;case 268435456:s=Oe;break;default:s=ie}return l=Pm.bind(null,e),s=At(s,l),e.callbackPriority=a,e.callbackNode=s,a}return l!==null&&l!==null&&Et(l),e.callbackPriority=2,e.callbackNode=null,2}function Pm(e,a){if(Qa!==0&&Qa!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(du()&&e.callbackNode!==s)return null;var l=Tt;return l=lt(e,e===Gt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Cm(e,l,a),Fm(e,je()),e.callbackNode!=null&&e.callbackNode===s?Pm.bind(null,e):null)}function Hm(e,a){if(du())return null;Cm(e,a,!0)}function Mb(){Kb(function(){(Rt&6)!==0?At(ft,Ob):Qm()})}function mA(){return as===0&&(as=bn()),as}function zm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Be(""+e)}function Vm(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 _b(e,a,s,l,f){if(a==="submit"&&s&&s.stateNode===f){var p=zm((f[pa]||null).action),I=l.submitter;I&&(a=(a=I[pa]||null)?zm(a.formAction):I.getAttribute("formAction"),a!==null&&(p=a,I=null));var _=new ht("action","action",null,l,f);e.push({event:_,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(as!==0){var Y=I?Vm(f,I):new FormData(f);Md(s,{pending:!0,data:Y,method:f.method,action:p},null,Y)}}else typeof p=="function"&&(_.preventDefault(),Y=I?Vm(f,I):new FormData(f),Md(s,{pending:!0,data:Y,method:f.method,action:p},p,Y))},currentTarget:f}]})}}for(var pA=0;pA<td.length;pA++){var yA=td[pA],jb=yA.toLowerCase(),Qb=yA[0].toUpperCase()+yA.slice(1);Gr(jb,"on"+Qb)}Gr(Ch,"onAnimationEnd"),Gr(xh,"onAnimationIteration"),Gr(Ih,"onAnimationStart"),Gr("dblclick","onDoubleClick"),Gr("focusin","onFocus"),Gr("focusout","onBlur"),Gr(ab,"onTransitionRun"),Gr(rb,"onTransitionStart"),Gr(nb,"onTransitionCancel"),Gr(Nh,"onTransitionEnd"),ya("onMouseEnter",["mouseout","mouseover"]),ya("onMouseLeave",["mouseout","mouseover"]),ya("onPointerEnter",["pointerout","pointerover"]),ya("onPointerLeave",["pointerout","pointerover"]),Hr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ho="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(" "),Fb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ho));function Gm(e,a){a=(a&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],f=l.event;l=l.listeners;e:{var p=void 0;if(a)for(var I=l.length-1;0<=I;I--){var _=l[I],Y=_.instance,me=_.currentTarget;if(_=_.listener,Y!==p&&f.isPropagationStopped())break e;p=_,f.currentTarget=me;try{p(f)}catch(Ie){eu(Ie)}f.currentTarget=null,p=Y}else for(I=0;I<l.length;I++){if(_=l[I],Y=_.instance,me=_.currentTarget,_=_.listener,Y!==p&&f.isPropagationStopped())break e;p=_,f.currentTarget=me;try{p(f)}catch(Ie){eu(Ie)}f.currentTarget=null,p=Y}}}}function It(e,a){var s=a[Yn];s===void 0&&(s=a[Yn]=new Set);var l=e+"__bubble";s.has(l)||(Km(a,e,2,!1),s.add(l))}function EA(e,a,s){var l=0;a&&(l|=4),Km(s,e,l,a)}var hu="_reactListening"+Math.random().toString(36).slice(2);function bA(e){if(!e[hu]){e[hu]=!0,Mi.forEach(function(s){s!=="selectionchange"&&(Fb.has(s)||EA(s,!1,e),EA(s,!0,e))});var a=e.nodeType===9?e:e.ownerDocument;a===null||a[hu]||(a[hu]=!0,EA("selectionchange",!1,a))}}function Km(e,a,s,l){switch(m0(a)){case 2:var f=fw;break;case 8:f=hw;break;default:f=UA}s=f.bind(null,a,s,e),f=void 0,!qt||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(f=!0),l?f!==void 0?e.addEventListener(a,s,{capture:!0,passive:f}):e.addEventListener(a,s,!0):f!==void 0?e.addEventListener(a,s,{passive:f}):e.addEventListener(a,s,!1)}function wA(e,a,s,l,f){var p=l;if((a&1)===0&&(a&2)===0&&l!==null)e:for(;;){if(l===null)return;var I=l.tag;if(I===3||I===4){var _=l.stateNode.containerInfo;if(_===f)break;if(I===4)for(I=l.return;I!==null;){var Y=I.tag;if((Y===3||Y===4)&&I.stateNode.containerInfo===f)return;I=I.return}for(;_!==null;){if(I=Fr(_),I===null)return;if(Y=I.tag,Y===5||Y===6||Y===26||Y===27){l=p=I;continue e}_=_.parentNode}}l=l.return}Ja(function(){var me=p,Ie=He(s),De=[];e:{var ye=Sh.get(e);if(ye!==void 0){var be=ht,st=e;switch(e){case"keypress":if(j(s)===0)break e;case"keydown":case"keyup":be=Qc;break;case"focusin":st="focus",be=uo;break;case"focusout":st="blur",be=uo;break;case"beforeblur":case"afterblur":be=uo;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=xl;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":be=Sc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":be=Pc;break;case Ch:case xh:case Ih:be=Bc;break;case Nh:be=zc;break;case"scroll":case"scrollend":be=Yt;break;case"wheel":be=Tl;break;case"copy":case"cut":case"paste":be=Lc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":be=Sl;break;case"toggle":case"beforetoggle":be=Kc}var at=(a&4)!==0,jt=!at&&(e==="scroll"||e==="scrollend"),le=at?ye!==null?ye+"Capture":null:ye;at=[];for(var ae=me,he;ae!==null;){var Te=ae;if(he=Te.stateNode,Te=Te.tag,Te!==5&&Te!==26&&Te!==27||he===null||le===null||(Te=fr(ae,le),Te!=null&&at.push(zo(ae,Te,he))),jt)break;ae=ae.return}0<at.length&&(ye=new be(ye,st,null,s,Ie),De.push({event:ye,listeners:at}))}}if((a&7)===0){e:{if(ye=e==="mouseover"||e==="pointerover",be=e==="mouseout"||e==="pointerout",ye&&s!==_e&&(st=s.relatedTarget||s.fromElement)&&(Fr(st)||st[Zt]))break e;if((be||ye)&&(ye=Ie.window===Ie?Ie:(ye=Ie.ownerDocument)?ye.defaultView||ye.parentWindow:window,be?(st=s.relatedTarget||s.toElement,be=me,st=st?Fr(st):null,st!==null&&(jt=u(st),at=st.tag,st!==jt||at!==5&&at!==27&&at!==6)&&(st=null)):(be=null,st=me),be!==st)){if(at=xl,Te="onMouseLeave",le="onMouseEnter",ae="mouse",(e==="pointerout"||e==="pointerover")&&(at=Sl,Te="onPointerLeave",le="onPointerEnter",ae="pointer"),jt=be==null?ye:Xa(be),he=st==null?ye:Xa(st),ye=new at(Te,ae+"leave",be,s,Ie),ye.target=jt,ye.relatedTarget=he,Te=null,Fr(Ie)===me&&(at=new at(le,ae+"enter",st,s,Ie),at.target=he,at.relatedTarget=jt,Te=at),jt=Te,be&&st)t:{for(at=be,le=st,ae=0,he=at;he;he=Vs(he))ae++;for(he=0,Te=le;Te;Te=Vs(Te))he++;for(;0<ae-he;)at=Vs(at),ae--;for(;0<he-ae;)le=Vs(le),he--;for(;ae--;){if(at===le||le!==null&&at===le.alternate)break t;at=Vs(at),le=Vs(le)}at=null}else at=null;be!==null&&qm(De,ye,be,at,!1),st!==null&&jt!==null&&qm(De,jt,st,at,!0)}}e:{if(ye=me?Xa(me):window,be=ye.nodeName&&ye.nodeName.toLowerCase(),be==="select"||be==="input"&&ye.type==="file")var Ye=Ah;else if(Ga(ye))if(fh)Ye=ZE;else{Ye=JE;var Ct=XE}else be=ye.nodeName,!be||be.toLowerCase()!=="input"||ye.type!=="checkbox"&&ye.type!=="radio"?me&&F(me.elementType)&&(Ye=Ah):Ye=$E;if(Ye&&(Ye=Ye(e,me))){sr(De,Ye,s,Ie);break e}Ct&&Ct(e,ye,me),e==="focusout"&&me&&ye.type==="number"&&me.memoizedProps.value!=null&&Cn(ye,"number",ye.value)}switch(Ct=me?Xa(me):window,e){case"focusin":(Ga(Ct)||Ct.contentEditable==="true")&&(bs=Ct,$c=me,go=null);break;case"focusout":go=$c=bs=null;break;case"mousedown":Zc=!0;break;case"contextmenu":case"mouseup":case"dragend":Zc=!1,wh(De,s,Ie);break;case"selectionchange":if(tb)break;case"keydown":case"keyup":wh(De,s,Ie)}var $e;if(ei)e:{switch(e){case"compositionstart":var nt="onCompositionStart";break e;case"compositionend":nt="onCompositionEnd";break e;case"compositionupdate":nt="onCompositionUpdate";break e}nt=void 0}else rt?qe(e,s)&&(nt="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(nt="onCompositionStart");nt&&(fo&&s.locale!=="ko"&&(rt||nt!=="onCompositionStart"?nt==="onCompositionEnd"&&rt&&($e=T()):(ua=Ie,g="value"in ua?ua.value:ua.textContent,rt=!0)),Ct=gu(me,nt),0<Ct.length&&(nt=new co(nt,e,null,s,Ie),De.push({event:nt,listeners:Ct}),$e?nt.data=$e:($e=tt(s),$e!==null&&(nt.data=$e)))),($e=kl?Bt(e,s):hr(e,s))&&(nt=gu(me,"onBeforeInput"),0<nt.length&&(Ct=new co("onBeforeInput","beforeinput",null,s,Ie),De.push({event:Ct,listeners:nt}),Ct.data=$e)),_b(De,e,me,s,Ie)}Gm(De,a)})}function zo(e,a,s){return{instance:e,listener:a,currentTarget:s}}function gu(e,a){for(var s=a+"Capture",l=[];e!==null;){var f=e,p=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||p===null||(f=fr(e,s),f!=null&&l.unshift(zo(e,f,p)),f=fr(e,a),f!=null&&l.push(zo(e,f,p))),e.tag===3)return l;e=e.return}return[]}function Vs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function qm(e,a,s,l,f){for(var p=a._reactName,I=[];s!==null&&s!==l;){var _=s,Y=_.alternate,me=_.stateNode;if(_=_.tag,Y!==null&&Y===l)break;_!==5&&_!==26&&_!==27||me===null||(Y=me,f?(me=fr(s,p),me!=null&&I.unshift(zo(s,me,Y))):f||(me=fr(s,p),me!=null&&I.push(zo(s,me,Y)))),s=s.return}I.length!==0&&e.push({event:a,listeners:I})}var Pb=/\r\n?/g,Hb=/\u0000|\uFFFD/g;function Ym(e){return(typeof e=="string"?e:""+e).replace(Pb,`
`).replace(Hb,"")}function Wm(e,a){return a=Ym(a),Ym(e)===a}function mu(){}function _t(e,a,s,l,f,p){switch(s){case"children":typeof l=="string"?a==="body"||a==="textarea"&&l===""||Tr(e,l):(typeof l=="number"||typeof l=="bigint")&&a!=="body"&&Tr(e,""+l);break;case"className":vn(e,"class",l);break;case"tabIndex":vn(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":vn(e,s,l);break;case"style":U(e,l,p);break;case"data":if(a!=="object"){vn(e,"data",l);break}case"src":case"href":if(l===""&&(a!=="a"||s!=="href")){e.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=Be(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="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"&&_t(e,a,"name",f.name,f,null),_t(e,a,"formEncType",f.formEncType,f,null),_t(e,a,"formMethod",f.formMethod,f,null),_t(e,a,"formTarget",f.formTarget,f,null)):(_t(e,a,"encType",f.encType,f,null),_t(e,a,"method",f.method,f,null),_t(e,a,"target",f.target,f,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=Be(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=mu);break;case"onScroll":l!=null&&It("scroll",e);break;case"onScrollEnd":l!=null&&It("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(s=l.__html,s!=null){if(f.children!=null)throw Error(i(60));e.innerHTML=s}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}s=Be(""+l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""+l):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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":It("beforetoggle",e),It("toggle",e),Ir(e,"popover",l);break;case"xlinkActuate":za(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":za(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":za(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":za(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":za(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":za(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":za(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":za(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":za(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ir(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=re.get(s)||s,Ir(e,s,l))}}function vA(e,a,s,l,f,p){switch(s){case"style":U(e,l,p);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(s=l.__html,s!=null){if(f.children!=null)throw Error(i(60));e.innerHTML=s}}break;case"children":typeof l=="string"?Tr(e,l):(typeof l=="number"||typeof l=="bigint")&&Tr(e,""+l);break;case"onScroll":l!=null&&It("scroll",e);break;case"onScrollEnd":l!=null&&It("scrollend",e);break;case"onClick":l!=null&&(e.onclick=mu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wn.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(f=s.endsWith("Capture"),a=s.slice(2,f?s.length-7:void 0),p=e[pa]||null,p=p!=null?p[s]:null,typeof p=="function"&&e.removeEventListener(a,p,f),typeof l=="function")){typeof p!="function"&&p!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(a,l,f);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):Ir(e,s,l)}}}function Fa(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 l=!1,f=!1,p;for(p in s)if(s.hasOwnProperty(p)){var I=s[p];if(I!=null)switch(p){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:_t(e,a,p,I,s,null)}}f&&_t(e,a,"srcSet",s.srcSet,s,null),l&&_t(e,a,"src",s.src,s,null);return;case"input":It("invalid",e);var _=p=I=f=null,Y=null,me=null;for(l in s)if(s.hasOwnProperty(l)){var Ie=s[l];if(Ie!=null)switch(l){case"name":f=Ie;break;case"type":I=Ie;break;case"checked":Y=Ie;break;case"defaultChecked":me=Ie;break;case"value":p=Ie;break;case"defaultValue":_=Ie;break;case"children":case"dangerouslySetInnerHTML":if(Ie!=null)throw Error(i(137,a));break;default:_t(e,a,l,Ie,s,null)}}an(e,p,_,Y,me,I,f,!1),Vr(e);return;case"select":It("invalid",e),l=I=p=null;for(f in s)if(s.hasOwnProperty(f)&&(_=s[f],_!=null))switch(f){case"value":p=_;break;case"defaultValue":I=_;break;case"multiple":l=_;default:_t(e,a,f,_,s,null)}a=p,s=I,e.multiple=!!l,a!=null?Sr(e,!!l,a,!1):s!=null&&Sr(e,!!l,s,!0);return;case"textarea":It("invalid",e),p=f=l=null;for(I in s)if(s.hasOwnProperty(I)&&(_=s[I],_!=null))switch(I){case"value":l=_;break;case"defaultValue":f=_;break;case"children":p=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(i(91));break;default:_t(e,a,I,_,s,null)}Qi(e,l,f,p),Vr(e);return;case"option":for(Y in s)if(s.hasOwnProperty(Y)&&(l=s[Y],l!=null))switch(Y){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:_t(e,a,Y,l,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(l=0;l<Ho.length;l++)It(Ho[l],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(me in s)if(s.hasOwnProperty(me)&&(l=s[me],l!=null))switch(me){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:_t(e,a,me,l,s,null)}return;default:if(F(a)){for(Ie in s)s.hasOwnProperty(Ie)&&(l=s[Ie],l!==void 0&&vA(e,a,Ie,l,s,void 0));return}}for(_ in s)s.hasOwnProperty(_)&&(l=s[_],l!=null&&_t(e,a,_,l,s,null))}function zb(e,a,s,l){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,p=null,I=null,_=null,Y=null,me=null,Ie=null;for(be in s){var De=s[be];if(s.hasOwnProperty(be)&&De!=null)switch(be){case"checked":break;case"value":break;case"defaultValue":Y=De;default:l.hasOwnProperty(be)||_t(e,a,be,null,l,De)}}for(var ye in l){var be=l[ye];if(De=s[ye],l.hasOwnProperty(ye)&&(be!=null||De!=null))switch(ye){case"type":p=be;break;case"name":f=be;break;case"checked":me=be;break;case"defaultChecked":Ie=be;break;case"value":I=be;break;case"defaultValue":_=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(i(137,a));break;default:be!==De&&_t(e,a,ye,be,l,De)}}ji(e,I,_,Y,me,Ie,p,f);return;case"select":be=I=_=ye=null;for(p in s)if(Y=s[p],s.hasOwnProperty(p)&&Y!=null)switch(p){case"value":break;case"multiple":be=Y;default:l.hasOwnProperty(p)||_t(e,a,p,null,l,Y)}for(f in l)if(p=l[f],Y=s[f],l.hasOwnProperty(f)&&(p!=null||Y!=null))switch(f){case"value":ye=p;break;case"defaultValue":_=p;break;case"multiple":I=p;default:p!==Y&&_t(e,a,f,p,l,Y)}a=_,s=I,l=be,ye!=null?Sr(e,!!s,ye,!1):!!l!=!!s&&(a!=null?Sr(e,!!s,a,!0):Sr(e,!!s,s?[]:"",!1));return;case"textarea":be=ye=null;for(_ in s)if(f=s[_],s.hasOwnProperty(_)&&f!=null&&!l.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:_t(e,a,_,null,l,f)}for(I in l)if(f=l[I],p=s[I],l.hasOwnProperty(I)&&(f!=null||p!=null))switch(I){case"value":ye=f;break;case"defaultValue":be=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(i(91));break;default:f!==p&&_t(e,a,I,f,l,p)}Zn(e,ye,be);return;case"option":for(var st in s)if(ye=s[st],s.hasOwnProperty(st)&&ye!=null&&!l.hasOwnProperty(st))switch(st){case"selected":e.selected=!1;break;default:_t(e,a,st,null,l,ye)}for(Y in l)if(ye=l[Y],be=s[Y],l.hasOwnProperty(Y)&&ye!==be&&(ye!=null||be!=null))switch(Y){case"selected":e.selected=ye&&typeof ye!="function"&&typeof ye!="symbol";break;default:_t(e,a,Y,ye,l,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 at in s)ye=s[at],s.hasOwnProperty(at)&&ye!=null&&!l.hasOwnProperty(at)&&_t(e,a,at,null,l,ye);for(me in l)if(ye=l[me],be=s[me],l.hasOwnProperty(me)&&ye!==be&&(ye!=null||be!=null))switch(me){case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(i(137,a));break;default:_t(e,a,me,ye,l,be)}return;default:if(F(a)){for(var jt in s)ye=s[jt],s.hasOwnProperty(jt)&&ye!==void 0&&!l.hasOwnProperty(jt)&&vA(e,a,jt,void 0,l,ye);for(Ie in l)ye=l[Ie],be=s[Ie],!l.hasOwnProperty(Ie)||ye===be||ye===void 0&&be===void 0||vA(e,a,Ie,ye,l,be);return}}for(var le in s)ye=s[le],s.hasOwnProperty(le)&&ye!=null&&!l.hasOwnProperty(le)&&_t(e,a,le,null,l,ye);for(De in l)ye=l[De],be=s[De],!l.hasOwnProperty(De)||ye===be||ye==null&&be==null||_t(e,a,De,ye,l,be)}var CA=null,xA=null;function pu(e){return e.nodeType===9?e:e.ownerDocument}function Xm(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 Jm(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 IA(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 NA=null;function Vb(){var e=window.event;return e&&e.type==="popstate"?e===NA?!1:(NA=e,!0):(NA=null,!1)}var $m=typeof setTimeout=="function"?setTimeout:void 0,Gb=typeof clearTimeout=="function"?clearTimeout:void 0,Zm=typeof Promise=="function"?Promise:void 0,Kb=typeof queueMicrotask=="function"?queueMicrotask:typeof Zm<"u"?function(e){return Zm.resolve(null).then(e).catch(qb)}:$m;function qb(e){setTimeout(function(){throw e})}function pi(e){return e==="head"}function e0(e,a){var s=a,l=0,f=0;do{var p=s.nextSibling;if(e.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"){if(0<l&&8>l){s=l;var I=e.ownerDocument;if(s&1&&Vo(I.documentElement),s&2&&Vo(I.body),s&4)for(s=I.head,Vo(s),I=s.firstChild;I;){var _=I.nextSibling,Y=I.nodeName;I[xr]||Y==="SCRIPT"||Y==="STYLE"||Y==="LINK"&&I.rel.toLowerCase()==="stylesheet"||s.removeChild(I),I=_}}if(f===0){e.removeChild(p),$o(a);return}f--}else s==="$"||s==="$?"||s==="$!"?f++:l=s.charCodeAt(0)-48;else l=0;s=p}while(s);$o(a)}function SA(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":SA(s),oa(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function Yb(e,a,s,l){for(;e.nodeType===1;){var f=s;if(e.nodeName.toLowerCase()!==a.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[xr])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!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(a==="input"&&e.type==="hidden"){var p=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=qr(e.nextSibling),e===null)break}return null}function Wb(e,a,s){if(a==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=qr(e.nextSibling),e===null))return null;return e}function TA(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Xb(e,a){var s=e.ownerDocument;if(e.data!=="$?"||s.readyState==="complete")a();else{var l=function(){a(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function qr(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 kA=null;function t0(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 a0(e,a,s){switch(a=pu(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 Vo(e){for(var a=e.attributes;a.length;)e.removeAttributeNode(a[0]);oa(e)}var Or=new Map,r0=new Set;function yu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var jn=oe.d;oe.d={f:Jb,r:$b,D:Zb,C:ew,L:tw,m:aw,X:nw,S:rw,M:iw};function Jb(){var e=jn.f(),a=uu();return e||a}function $b(e){var a=en(e);a!==null&&a.tag===5&&a.type==="form"?Cg(a):jn.r(e)}var Gs=typeof document>"u"?null:document;function n0(e,a,s){var l=Gs;if(l&&typeof a=="string"&&a){var f=_a(a);f='link[rel="'+e+'"][href="'+f+'"]',typeof s=="string"&&(f+='[crossorigin="'+s+'"]'),r0.has(f)||(r0.add(f),e={rel:e,crossOrigin:s,href:a},l.querySelector(f)===null&&(a=l.createElement("link"),Fa(a,"link",e),Kt(a),l.head.appendChild(a)))}}function Zb(e){jn.D(e),n0("dns-prefetch",e,null)}function ew(e,a){jn.C(e,a),n0("preconnect",e,a)}function tw(e,a,s){jn.L(e,a,s);var l=Gs;if(l&&e&&a){var f='link[rel="preload"][as="'+_a(a)+'"]';a==="image"&&s&&s.imageSrcSet?(f+='[imagesrcset="'+_a(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(f+='[imagesizes="'+_a(s.imageSizes)+'"]')):f+='[href="'+_a(e)+'"]';var p=f;switch(a){case"style":p=Ks(e);break;case"script":p=qs(e)}Or.has(p)||(e=y({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:e,as:a},s),Or.set(p,e),l.querySelector(f)!==null||a==="style"&&l.querySelector(Go(p))||a==="script"&&l.querySelector(Ko(p))||(a=l.createElement("link"),Fa(a,"link",e),Kt(a),l.head.appendChild(a)))}}function aw(e,a){jn.m(e,a);var s=Gs;if(s&&e){var l=a&&typeof a.as=="string"?a.as:"script",f='link[rel="modulepreload"][as="'+_a(l)+'"][href="'+_a(e)+'"]',p=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=qs(e)}if(!Or.has(p)&&(e=y({rel:"modulepreload",href:e},a),Or.set(p,e),s.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ko(p)))return}l=s.createElement("link"),Fa(l,"link",e),Kt(l),s.head.appendChild(l)}}}function rw(e,a,s){jn.S(e,a,s);var l=Gs;if(l&&e){var f=Pr(l).hoistableStyles,p=Ks(e);a=a||"default";var I=f.get(p);if(!I){var _={loading:0,preload:null};if(I=l.querySelector(Go(p)))_.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":a},s),(s=Or.get(p))&&BA(e,s);var Y=I=l.createElement("link");Kt(Y),Fa(Y,"link",e),Y._p=new Promise(function(me,Ie){Y.onload=me,Y.onerror=Ie}),Y.addEventListener("load",function(){_.loading|=1}),Y.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Eu(I,a,l)}I={type:"stylesheet",instance:I,count:1,state:_},f.set(p,I)}}}function nw(e,a){jn.X(e,a);var s=Gs;if(s&&e){var l=Pr(s).hoistableScripts,f=qs(e),p=l.get(f);p||(p=s.querySelector(Ko(f)),p||(e=y({src:e,async:!0},a),(a=Or.get(f))&&DA(e,a),p=s.createElement("script"),Kt(p),Fa(p,"link",e),s.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(f,p))}}function iw(e,a){jn.M(e,a);var s=Gs;if(s&&e){var l=Pr(s).hoistableScripts,f=qs(e),p=l.get(f);p||(p=s.querySelector(Ko(f)),p||(e=y({src:e,async:!0,type:"module"},a),(a=Or.get(f))&&DA(e,a),p=s.createElement("script"),Kt(p),Fa(p,"link",e),s.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(f,p))}}function i0(e,a,s,l){var f=(f=Qe.current)?yu(f):null;if(!f)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=Ks(s.href),s=Pr(f).hoistableStyles,l=s.get(a),l||(l={type:"style",instance:null,count:0,state:null},s.set(a,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=Ks(s.href);var p=Pr(f).hoistableStyles,I=p.get(e);if(I||(f=f.ownerDocument||f,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,I),(p=f.querySelector(Go(e)))&&!p._p&&(I.instance=p,I.state.loading=5),Or.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},Or.set(e,s),p||sw(f,e,s,I.state))),a&&l===null)throw Error(i(528,""));return I}if(a&&l!==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=qs(s),s=Pr(f).hoistableScripts,l=s.get(a),l||(l={type:"script",instance:null,count:0,state:null},s.set(a,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Ks(e){return'href="'+_a(e)+'"'}function Go(e){return'link[rel="stylesheet"]['+e+"]"}function s0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function sw(e,a,s,l){e.querySelector('link[rel="preload"][as="style"]['+a+"]")?l.loading=1:(a=e.createElement("link"),l.preload=a,a.addEventListener("load",function(){return l.loading|=1}),a.addEventListener("error",function(){return l.loading|=2}),Fa(a,"link",s),Kt(a),e.head.appendChild(a))}function qs(e){return'[src="'+_a(e)+'"]'}function Ko(e){return"script[async]"+e}function o0(e,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var l=e.querySelector('style[data-href~="'+_a(s.href)+'"]');if(l)return a.instance=l,Kt(l),l;var f=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Kt(l),Fa(l,"style",f),Eu(l,s.precedence,e),a.instance=l;case"stylesheet":f=Ks(s.href);var p=e.querySelector(Go(f));if(p)return a.state.loading|=4,a.instance=p,Kt(p),p;l=s0(s),(f=Or.get(f))&&BA(l,f),p=(e.ownerDocument||e).createElement("link"),Kt(p);var I=p;return I._p=new Promise(function(_,Y){I.onload=_,I.onerror=Y}),Fa(p,"link",l),a.state.loading|=4,Eu(p,s.precedence,e),a.instance=p;case"script":return p=qs(s.src),(f=e.querySelector(Ko(p)))?(a.instance=f,Kt(f),f):(l=s,(f=Or.get(p))&&(l=y({},s),DA(l,f)),e=e.ownerDocument||e,f=e.createElement("script"),Kt(f),Fa(f,"link",l),e.head.appendChild(f),a.instance=f);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(l=a.instance,a.state.loading|=4,Eu(l,s.precedence,e));return a.instance}function Eu(e,a,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,p=f,I=0;I<l.length;I++){var _=l[I];if(_.dataset.precedence===a)p=_;else if(p!==f)break}p?p.parentNode.insertBefore(e,p.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(e,a.firstChild))}function BA(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.title==null&&(e.title=a.title)}function DA(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.integrity==null&&(e.integrity=a.integrity)}var bu=null;function l0(e,a,s){if(bu===null){var l=new Map,f=bu=new Map;f.set(s,l)}else f=bu,l=f.get(s),l||(l=new Map,f.set(s,l));if(l.has(e))return l;for(l.set(e,null),s=s.getElementsByTagName(e),f=0;f<s.length;f++){var p=s[f];if(!(p[xr]||p[zt]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var I=p.getAttribute(a)||"";I=e+I;var _=l.get(I);_?_.push(p):l.set(I,[p])}}return l}function u0(e,a,s){e=e.ownerDocument||e,e.head.insertBefore(s,a==="title"?e.querySelector("head > title"):null)}function ow(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 c0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var qo=null;function lw(){}function uw(e,a,s){if(qo===null)throw Error(i(475));var l=qo;if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=Ks(s.href),p=e.querySelector(Go(f));if(p){e=p._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=wu.bind(l),e.then(l,l)),a.state.loading|=4,a.instance=p,Kt(p);return}p=e.ownerDocument||e,s=s0(s),(f=Or.get(f))&&BA(s,f),p=p.createElement("link"),Kt(p);var I=p;I._p=new Promise(function(_,Y){I.onload=_,I.onerror=Y}),Fa(p,"link",s),a.instance=p}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(a,e),(e=a.state.preload)&&(a.state.loading&3)===0&&(l.count++,a=wu.bind(l),e.addEventListener("load",a),e.addEventListener("error",a))}}function cw(){if(qo===null)throw Error(i(475));var e=qo;return e.stylesheets&&e.count===0&&LA(e,e.stylesheets),0<e.count?function(a){var s=setTimeout(function(){if(e.stylesheets&&LA(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s)}}:null}function wu(){if(this.count--,this.count===0){if(this.stylesheets)LA(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var vu=null;function LA(e,a){e.stylesheets=null,e.unsuspend!==null&&(e.count++,vu=new Map,a.forEach(dw,e),vu=null,wu.call(e))}function dw(e,a){if(!(a.state.loading&4)){var s=vu.get(e);if(s)var l=s.get(null);else{s=new Map,vu.set(e,s);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<f.length;p++){var I=f[p];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(s.set(I.dataset.precedence,I),l=I)}l&&s.set(null,l)}f=a.instance,I=f.getAttribute("data-precedence"),p=s.get(I)||l,p===l&&s.set(null,f),s.set(I,f),this.count++,l=wu.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),p?p.parentNode.insertBefore(f,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),a.state.loading|=4}}var Yo={$$typeof:O,Provider:null,Consumer:null,_currentValue:Ae,_currentValue2:Ae,_threadCount:0};function Aw(e,a,s,l,f,p,I,_){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=Qr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qr(0),this.hiddenUpdates=Qr(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=p,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function d0(e,a,s,l,f,p,I,_,Y,me,Ie,De){return e=new Aw(e,a,s,I,_,Y,me,De),a=1,p===!0&&(a|=24),p=pr(3,null,null,a),e.current=p,p.stateNode=e,a=fd(),a.refCount++,e.pooledCache=a,a.refCount++,p.memoizedState={element:l,isDehydrated:s,cache:a},pd(p),e}function A0(e){return e?(e=xs,e):xs}function f0(e,a,s,l,f,p){f=A0(f),l.context===null?l.context=f:l.pendingContext=f,l=ni(a),l.payload={element:s},p=p===void 0?null:p,p!==null&&(l.callback=p),s=ii(e,l,a),s!==null&&(vr(s,e,a),xo(s,e,a))}function h0(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<a?s:a}}function RA(e,a){h0(e,a),(e=e.alternate)&&h0(e,a)}function g0(e){if(e.tag===13){var a=Cs(e,67108864);a!==null&&vr(a,e,67108864),RA(e,67108864)}}var Cu=!0;function fw(e,a,s,l){var f=G.T;G.T=null;var p=oe.p;try{oe.p=2,UA(e,a,s,l)}finally{oe.p=p,G.T=f}}function hw(e,a,s,l){var f=G.T;G.T=null;var p=oe.p;try{oe.p=8,UA(e,a,s,l)}finally{oe.p=p,G.T=f}}function UA(e,a,s,l){if(Cu){var f=OA(l);if(f===null)wA(e,a,l,xu,s),p0(e,l);else if(mw(f,e,a,s,l))l.stopPropagation();else if(p0(e,l),a&4&&-1<gw.indexOf(e)){for(;f!==null;){var p=en(f);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var I=it(p.pendingLanes);if(I!==0){var _=p;for(_.pendingLanes|=2,_.entangledLanes|=2;I;){var Y=1<<31-w(I);_.entanglements[1]|=Y,I&=~Y}ln(p),(Rt&6)===0&&(ou=je()+500,Po(0))}}break;case 13:_=Cs(p,2),_!==null&&vr(_,p,2),uu(),RA(p,2)}if(p=OA(l),p===null&&wA(e,a,l,xu,s),p===f)break;f=p}f!==null&&l.stopPropagation()}else wA(e,a,l,null,s)}}function OA(e){return e=He(e),MA(e)}var xu=null;function MA(e){if(xu=null,e=Fr(e),e!==null){var a=u(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 xu=e,null}function m0(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(et()){case ft:return 2;case K:return 8;case ie:case Ee:return 32;case Oe:return 268435456;default:return 32}default:return 32}}var _A=!1,yi=null,Ei=null,bi=null,Wo=new Map,Xo=new Map,wi=[],gw="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 p0(e,a){switch(e){case"focusin":case"focusout":yi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":bi=null;break;case"pointerover":case"pointerout":Wo.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xo.delete(a.pointerId)}}function Jo(e,a,s,l,f,p){return e===null||e.nativeEvent!==p?(e={blockedOn:a,domEventName:s,eventSystemFlags:l,nativeEvent:p,targetContainers:[f]},a!==null&&(a=en(a),a!==null&&g0(a)),e):(e.eventSystemFlags|=l,a=e.targetContainers,f!==null&&a.indexOf(f)===-1&&a.push(f),e)}function mw(e,a,s,l,f){switch(a){case"focusin":return yi=Jo(yi,e,a,s,l,f),!0;case"dragenter":return Ei=Jo(Ei,e,a,s,l,f),!0;case"mouseover":return bi=Jo(bi,e,a,s,l,f),!0;case"pointerover":var p=f.pointerId;return Wo.set(p,Jo(Wo.get(p)||null,e,a,s,l,f)),!0;case"gotpointercapture":return p=f.pointerId,Xo.set(p,Jo(Xo.get(p)||null,e,a,s,l,f)),!0}return!1}function y0(e){var a=Fr(e.target);if(a!==null){var s=u(a);if(s!==null){if(a=s.tag,a===13){if(a=c(s),a!==null){e.blockedOn=a,Ui(e.priority,function(){if(s.tag===13){var l=wr();l=Ri(l);var f=Cs(s,l);f!==null&&vr(f,s,l),RA(s,l)}});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Iu(e){if(e.blockedOn!==null)return!1;for(var a=e.targetContainers;0<a.length;){var s=OA(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);_e=l,s.target.dispatchEvent(l),_e=null}else return a=en(s),a!==null&&g0(a),e.blockedOn=s,!1;a.shift()}return!0}function E0(e,a,s){Iu(e)&&s.delete(a)}function pw(){_A=!1,yi!==null&&Iu(yi)&&(yi=null),Ei!==null&&Iu(Ei)&&(Ei=null),bi!==null&&Iu(bi)&&(bi=null),Wo.forEach(E0),Xo.forEach(E0)}function Nu(e,a){e.blockedOn===a&&(e.blockedOn=null,_A||(_A=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,pw)))}var Su=null;function b0(e){Su!==e&&(Su=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Su===e&&(Su=null);for(var a=0;a<e.length;a+=3){var s=e[a],l=e[a+1],f=e[a+2];if(typeof l!="function"){if(MA(l||s)===null)continue;break}var p=en(s);p!==null&&(e.splice(a,3),a-=3,Md(p,{pending:!0,data:f,method:s.method,action:l},l,f))}}))}function $o(e){function a(Y){return Nu(Y,e)}yi!==null&&Nu(yi,e),Ei!==null&&Nu(Ei,e),bi!==null&&Nu(bi,e),Wo.forEach(a),Xo.forEach(a);for(var s=0;s<wi.length;s++){var l=wi[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<wi.length&&(s=wi[0],s.blockedOn===null);)y0(s),s.blockedOn===null&&wi.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var f=s[l],p=s[l+1],I=f[pa]||null;if(typeof p=="function")I||b0(s);else if(I){var _=null;if(p&&p.hasAttribute("formAction")){if(f=p,I=p[pa]||null)_=I.formAction;else if(MA(f)!==null)continue}else _=I.action;typeof _=="function"?s[l+1]=_:(s.splice(l,3),l-=3),b0(s)}}}function jA(e){this._internalRoot=e}Tu.prototype.render=jA.prototype.render=function(e){var a=this._internalRoot;if(a===null)throw Error(i(409));var s=a.current,l=wr();f0(s,l,e,a,null,null)},Tu.prototype.unmount=jA.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var a=e.containerInfo;f0(e.current,2,null,e,null,null),uu(),a[Zt]=null}};function Tu(e){this._internalRoot=e}Tu.prototype.unstable_scheduleHydration=function(e){if(e){var a=qn();e={blockedOn:null,target:e,priority:a};for(var s=0;s<wi.length&&a!==0&&a<wi[s].priority;s++);wi.splice(s,0,e),s===0&&y0(e)}};var w0=t.version;if(w0!=="19.1.0")throw Error(i(527,w0,"19.1.0"));oe.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=m(a),e=e!==null?h(e):null,e=e===null?null:e.stateNode,e};var yw={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ku.isDisabled&&ku.supportsFiber)try{ze=ku.inject(yw),L=ku}catch{}}return el.createRoot=function(e,a){if(!o(e))throw Error(i(299));var s=!1,l="",f=_g,p=jg,I=Qg,_=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(l=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(I=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(_=a.unstable_transitionCallbacks)),a=d0(e,1,!1,null,null,s,l,f,p,I,_,null),e[Zt]=a.current,bA(e),new jA(a)},el.hydrateRoot=function(e,a,s){if(!o(e))throw Error(i(299));var l=!1,f="",p=_g,I=jg,_=Qg,Y=null,me=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onUncaughtError!==void 0&&(p=s.onUncaughtError),s.onCaughtError!==void 0&&(I=s.onCaughtError),s.onRecoverableError!==void 0&&(_=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(Y=s.unstable_transitionCallbacks),s.formState!==void 0&&(me=s.formState)),a=d0(e,1,!0,a,s??null,l,f,p,I,_,Y,me),a.context=A0(null),s=a.current,l=wr(),l=Ri(l),f=ni(l),f.callback=null,ii(s,f,l),s=l,a.current.lanes=s,$r(a,s),ln(a),e[Zt]=a.current,bA(e),new Tu(a)},el.version="19.1.0",el}var D0;function Dw(){if(D0)return FA.exports;D0=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(),FA.exports=Bw(),FA.exports}var Lw=Dw();const Rw=Li(Lw);var D=jf();const Cr=Li(D),Uw=(n,t,r,i)=>{var u,c,d,m;const o=[r,{code:t,...i||{}}];if((c=(u=n==null?void 0:n.services)==null?void 0:u.logger)!=null&&c.forward)return n.services.logger.forward(o,"warn","react-i18next::",!0);os(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),(m=(d=n==null?void 0:n.services)==null?void 0:d.logger)!=null&&m.warn?n.services.logger.warn(...o):console!=null&&console.warn&&console.warn(...o)},L0={},bf=(n,t,r,i)=>{os(r)&&L0[r]||(os(r)&&(L0[r]=new Date),Uw(n,t,r,i))},Ny=(n,t)=>()=>{if(n.isInitialized)t();else{const r=()=>{setTimeout(()=>{n.off("initialized",r)},0),t()};n.on("initialized",r)}},wf=(n,t,r)=>{n.loadNamespaces(t,Ny(n,r))},R0=(n,t,r,i)=>{if(os(r)&&(r=[r]),n.options.preload&&n.options.preload.indexOf(t)>-1)return wf(n,r,i);r.forEach(o=>{n.options.ns.indexOf(o)<0&&n.options.ns.push(o)}),n.loadLanguages(t,Ny(n,i))},Ow=(n,t,r={})=>!t.languages||!t.languages.length?(bf(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(n,{lng:r.lng,precheck:(i,o)=>{var u;if(((u=r.bindI18n)==null?void 0:u.indexOf("languageChanging"))>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,n))return!1}}),os=n=>typeof n=="string",Mw=n=>typeof n=="object"&&n!==null,_w=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,jw={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Qw=n=>jw[n],Fw=n=>n.replace(_w,Qw);let vf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Fw};const Pw=(n={})=>{vf={...vf,...n}},Hw=()=>vf;let Sy;const zw=n=>{Sy=n},Vw=()=>Sy,Gw={type:"3rdParty",init(n){Pw(n.options.react),zw(n)}},Kw=D.createContext();class qw{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Yw=(n,t)=>{const r=D.useRef();return D.useEffect(()=>{r.current=n},[n,t]),r.current},Ty=(n,t,r,i)=>n.getFixedT(t,r,i),Ww=(n,t,r,i)=>D.useCallback(Ty(n,t,r,i),[n,t,r,i]),gt=(n,t={})=>{var z,H,V,ee;const{i18n:r}=t,{i18n:i,defaultNS:o}=D.useContext(Kw)||{},u=r||i||Vw();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new qw),!u){bf(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const q=(Z,$)=>os($)?$:Mw($)&&os($.defaultValue)?$.defaultValue:Array.isArray(Z)?Z[Z.length-1]:Z,J=[q,{},!1];return J.t=q,J.i18n={},J.ready=!1,J}(z=u.options.react)!=null&&z.wait&&bf(u,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const c={...Hw(),...u.options.react,...t},{useSuspense:d,keyPrefix:m}=c;let h=o||((H=u.options)==null?void 0:H.defaultNS);h=os(h)?[h]:h||["translation"],(ee=(V=u.reportNamespaces).addUsedNamespaces)==null||ee.call(V,h);const y=(u.isInitialized||u.initializedStoreOnce)&&h.every(q=>Ow(q,u,c)),E=Ww(u,t.lng||null,c.nsMode==="fallback"?h:h[0],m),C=()=>E,x=()=>Ty(u,t.lng||null,c.nsMode==="fallback"?h:h[0],m),[S,N]=D.useState(C);let B=h.join();t.lng&&(B=`${t.lng}${B}`);const R=Yw(B),M=D.useRef(!0);D.useEffect(()=>{const{bindI18n:q,bindI18nStore:J}=c;M.current=!0,!y&&!d&&(t.lng?R0(u,t.lng,h,()=>{M.current&&N(x)}):wf(u,h,()=>{M.current&&N(x)})),y&&R&&R!==B&&M.current&&N(x);const Z=()=>{M.current&&N(x)};return q&&(u==null||u.on(q,Z)),J&&(u==null||u.store.on(J,Z)),()=>{M.current=!1,u&&(q==null||q.split(" ").forEach($=>u.off($,Z))),J&&u&&J.split(" ").forEach($=>u.store.off($,Z))}},[u,B]),D.useEffect(()=>{M.current&&y&&N(C)},[u,m,y]);const O=[S,u,y];if(O.t=S,O.i18n=u,O.ready=y,y||!y&&!d)return O;throw new Promise(q=>{t.lng?R0(u,t.lng,h,()=>q()):wf(u,h,()=>q())})};var tl={},U0;function Xw(){if(U0)return tl;U0=1,Object.defineProperty(tl,"__esModule",{value:!0}),tl.parse=c,tl.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,u=(()=>{const C=function(){};return C.prototype=Object.create(null),C})();function c(C,x){const S=new u,N=C.length;if(N<2)return S;const B=(x==null?void 0:x.decode)||y;let R=0;do{const M=C.indexOf("=",R);if(M===-1)break;const O=C.indexOf(";",R),z=O===-1?N:O;if(M>z){R=C.lastIndexOf(";",M-1)+1;continue}const H=d(C,R,M),V=m(C,M,H),ee=C.slice(H,V);if(S[ee]===void 0){let q=d(C,M+1,z),J=m(C,z,q);const Z=B(C.slice(q,J));S[ee]=Z}R=z+1}while(R<N);return S}function d(C,x,S){do{const N=C.charCodeAt(x);if(N!==32&&N!==9)return x}while(++x<S);return S}function m(C,x,S){for(;x>S;){const N=C.charCodeAt(--x);if(N!==32&&N!==9)return x+1}return S}function h(C,x,S){const N=(S==null?void 0:S.encode)||encodeURIComponent;if(!n.test(C))throw new TypeError(`argument name is invalid: ${C}`);const B=N(x);if(!t.test(B))throw new TypeError(`argument val is invalid: ${x}`);let R=C+"="+B;if(!S)return R;if(S.maxAge!==void 0){if(!Number.isInteger(S.maxAge))throw new TypeError(`option maxAge is invalid: ${S.maxAge}`);R+="; Max-Age="+S.maxAge}if(S.domain){if(!r.test(S.domain))throw new TypeError(`option domain is invalid: ${S.domain}`);R+="; Domain="+S.domain}if(S.path){if(!i.test(S.path))throw new TypeError(`option path is invalid: ${S.path}`);R+="; Path="+S.path}if(S.expires){if(!E(S.expires)||!Number.isFinite(S.expires.valueOf()))throw new TypeError(`option expires is invalid: ${S.expires}`);R+="; Expires="+S.expires.toUTCString()}if(S.httpOnly&&(R+="; HttpOnly"),S.secure&&(R+="; Secure"),S.partitioned&&(R+="; Partitioned"),S.priority)switch(typeof S.priority=="string"?S.priority.toLowerCase():void 0){case"low":R+="; Priority=Low";break;case"medium":R+="; Priority=Medium";break;case"high":R+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${S.priority}`)}if(S.sameSite)switch(typeof S.sameSite=="string"?S.sameSite.toLowerCase():S.sameSite){case!0:case"strict":R+="; SameSite=Strict";break;case"lax":R+="; SameSite=Lax";break;case"none":R+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${S.sameSite}`)}return R}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 tl}Xw();var O0="popstate";function Jw(n={}){function t(o,u){let{pathname:c="/",search:d="",hash:m=""}=ds(o.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),Cf("",{pathname:c,search:d,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function r(o,u){let c=o.document.querySelector("base"),d="";if(c&&c.getAttribute("href")){let m=o.location.href,h=m.indexOf("#");d=h===-1?m:m.slice(0,h)}return d+"#"+(typeof u=="string"?u:yl(u))}function i(o,u){jr(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(u)})`)}return Zw(t,r,i,n)}function $t(n,t){if(n===!1||n===null||typeof n>"u")throw new Error(t)}function jr(n,t){if(!n){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $w(){return Math.random().toString(36).substring(2,10)}function M0(n,t){return{usr:n.state,key:n.key,idx:t}}function Cf(n,t,r=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof t=="string"?ds(t):t,state:r,key:t&&t.key||i||$w()}}function yl({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 ds(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 Zw(n,t,r,i={}){let{window:o=document.defaultView,v5Compat:u=!1}=i,c=o.history,d="POP",m=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 B=y(),R=B==null?null:B-h;h=B,m&&m({action:d,location:N.location,delta:R})}function C(B,R){d="PUSH";let M=Cf(N.location,B,R);r&&r(M,B),h=y()+1;let O=M0(M,h),z=N.createHref(M);try{c.pushState(O,"",z)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;o.location.assign(z)}u&&m&&m({action:d,location:N.location,delta:1})}function x(B,R){d="REPLACE";let M=Cf(N.location,B,R);r&&r(M,B),h=y();let O=M0(M,h),z=N.createHref(M);c.replaceState(O,"",z),u&&m&&m({action:d,location:N.location,delta:0})}function S(B){return ev(B)}let N={get action(){return d},get location(){return n(o,c)},listen(B){if(m)throw new Error("A history only accepts one active listener");return o.addEventListener(O0,E),m=B,()=>{o.removeEventListener(O0,E),m=null}},createHref(B){return t(o,B)},createURL:S,encodeLocation(B){let R=S(B);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:C,replace:x,go(B){return c.go(B)}};return N}function ev(n,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),$t(r,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:yl(n);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function ky(n,t,r="/"){return tv(n,t,r,!1)}function tv(n,t,r,i){let o=typeof t=="string"?ds(t):t,u=Gn(o.pathname||"/",r);if(u==null)return null;let c=By(n);av(c);let d=null;for(let m=0;d==null&&m<c.length;++m){let h=fv(u);d=dv(c[m],h,i)}return d}function By(n,t=[],r=[],i=""){let o=(u,c,d)=>{let m={relativePath:d===void 0?u.path||"":d,caseSensitive:u.caseSensitive===!0,childrenIndex:c,route:u};m.relativePath.startsWith("/")&&($t(m.relativePath.startsWith(i),`Absolute route path "${m.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(i.length));let h=Vn([i,m.relativePath]),y=r.concat(m);u.children&&u.children.length>0&&($t(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),By(u.children,t,y,h)),!(u.path==null&&!u.index)&&t.push({path:h,score:uv(h,u.index),routesMeta:y})};return n.forEach((u,c)=>{var d;if(u.path===""||!((d=u.path)!=null&&d.includes("?")))o(u,c);else for(let m of Dy(u.path))o(u,c,m)}),t}function Dy(n){let t=n.split("/");if(t.length===0)return[];let[r,...i]=t,o=r.endsWith("?"),u=r.replace(/\?$/,"");if(i.length===0)return o?[u,""]:[u];let c=Dy(i.join("/")),d=[];return d.push(...c.map(m=>m===""?u:[u,m].join("/"))),o&&d.push(...c),d.map(m=>n.startsWith("/")&&m===""?"/":m)}function av(n){n.sort((t,r)=>t.score!==r.score?r.score-t.score:cv(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var rv=/^:[\w-]+$/,nv=3,iv=2,sv=1,ov=10,lv=-2,_0=n=>n==="*";function uv(n,t){let r=n.split("/"),i=r.length;return r.some(_0)&&(i+=lv),t&&(i+=iv),r.filter(o=>!_0(o)).reduce((o,u)=>o+(rv.test(u)?nv:u===""?sv:ov),i)}function cv(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 dv(n,t,r=!1){let{routesMeta:i}=n,o={},u="/",c=[];for(let d=0;d<i.length;++d){let m=i[d],h=d===i.length-1,y=u==="/"?t:t.slice(u.length)||"/",E=Ju({path:m.relativePath,caseSensitive:m.caseSensitive,end:h},y),C=m.route;if(!E&&h&&r&&!i[i.length-1].route.index&&(E=Ju({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},y)),!E)return null;Object.assign(o,E.params),c.push({params:o,pathname:Vn([u,E.pathname]),pathnameBase:pv(Vn([u,E.pathnameBase])),route:C}),E.pathnameBase!=="/"&&(u=Vn([u,E.pathnameBase]))}return c}function Ju(n,t){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,i]=Av(n.path,n.caseSensitive,n.end),o=t.match(r);if(!o)return null;let u=o[0],c=u.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:i.reduce((h,{paramName:y,isOptional:E},C)=>{if(y==="*"){let S=d[C]||"";c=u.slice(0,u.length-S.length).replace(/(.)\/+$/,"$1")}const x=d[C];return E&&!x?h[y]=void 0:h[y]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:c,pattern:n}}function Av(n,t=!1,r=!0){jr(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,m)=>(i.push({paramName:d,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),o+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":n!==""&&n!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function fv(n){try{return n.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jr(!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 Gn(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 hv(n,t="/"){let{pathname:r,search:i="",hash:o=""}=typeof n=="string"?ds(n):n;return{pathname:r?r.startsWith("/")?r:gv(r,t):t,search:yv(i),hash:Ev(o)}}function gv(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 GA(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 mv(n){return n.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Qf(n){let t=mv(n);return t.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase)}function Ff(n,t,r,i=!1){let o;typeof n=="string"?o=ds(n):(o={...n},$t(!o.pathname||!o.pathname.includes("?"),GA("?","pathname","search",o)),$t(!o.pathname||!o.pathname.includes("#"),GA("#","pathname","hash",o)),$t(!o.search||!o.search.includes("#"),GA("#","search","hash",o)));let u=n===""||o.pathname==="",c=u?"/":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 m=hv(o,d),h=c&&c!=="/"&&c.endsWith("/"),y=(u||c===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(h||y)&&(m.pathname+="/"),m}var Vn=n=>n.join("/").replace(/\/\/+/g,"/"),pv=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),yv=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Ev=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function bv(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var Ly=["POST","PUT","PATCH","DELETE"];new Set(Ly);var wv=["GET",...Ly];new Set(wv);var so=D.createContext(null);so.displayName="DataRouter";var pc=D.createContext(null);pc.displayName="DataRouterState";var Ry=D.createContext({isTransitioning:!1});Ry.displayName="ViewTransition";var vv=D.createContext(new Map);vv.displayName="Fetchers";var Cv=D.createContext(null);Cv.displayName="Await";var Xr=D.createContext(null);Xr.displayName="Navigation";var wl=D.createContext(null);wl.displayName="Location";var Jr=D.createContext({outlet:null,matches:[],isDataRoute:!1});Jr.displayName="Route";var Pf=D.createContext(null);Pf.displayName="RouteError";function xv(n,{relative:t}={}){$t(oo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=D.useContext(Xr),{hash:o,pathname:u,search:c}=vl(n,{relative:t}),d=u;return r!=="/"&&(d=u==="/"?r:Vn([r,u])),i.createHref({pathname:d,search:c,hash:o})}function oo(){return D.useContext(wl)!=null}function ar(){return $t(oo(),"useLocation() may be used only in the context of a <Router> component."),D.useContext(wl).location}var Uy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Oy(n){D.useContext(Xr).static||D.useLayoutEffect(n)}function Ma(){let{isDataRoute:n}=D.useContext(Jr);return n?_v():Iv()}function Iv(){$t(oo(),"useNavigate() may be used only in the context of a <Router> component.");let n=D.useContext(so),{basename:t,navigator:r}=D.useContext(Xr),{matches:i}=D.useContext(Jr),{pathname:o}=ar(),u=JSON.stringify(Qf(i)),c=D.useRef(!1);return Oy(()=>{c.current=!0}),D.useCallback((m,h={})=>{if(jr(c.current,Uy),!c.current)return;if(typeof m=="number"){r.go(m);return}let y=Ff(m,JSON.parse(u),o,h.relative==="path");n==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Vn([t,y.pathname])),(h.replace?r.replace:r.push)(y,h.state,h)},[t,r,u,o,n])}D.createContext(null);function Hf(){let{matches:n}=D.useContext(Jr),t=n[n.length-1];return t?t.params:{}}function vl(n,{relative:t}={}){let{matches:r}=D.useContext(Jr),{pathname:i}=ar(),o=JSON.stringify(Qf(r));return D.useMemo(()=>Ff(n,JSON.parse(o),i,t==="path"),[n,o,i,t])}function Nv(n,t){return My(n,t)}function My(n,t,r,i){var M;$t(oo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o,static:u}=D.useContext(Xr),{matches:c}=D.useContext(Jr),d=c[c.length-1],m=d?d.params:{},h=d?d.pathname:"/",y=d?d.pathnameBase:"/",E=d&&d.route;{let O=E&&E.path||"";_y(h,!E||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${O}">) 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="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let C=ar(),x;if(t){let O=typeof t=="string"?ds(t):t;$t(y==="/"||((M=O.pathname)==null?void 0:M.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 "${O.pathname}" was given in the \`location\` prop.`),x=O}else x=C;let S=x.pathname||"/",N=S;if(y!=="/"){let O=y.replace(/^\//,"").split("/");N="/"+S.replace(/^\//,"").split("/").slice(O.length).join("/")}let B=!u&&r&&r.matches&&r.matches.length>0?r.matches:ky(n,{pathname:N});jr(E||B!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),jr(B==null||B[B.length-1].route.element!==void 0||B[B.length-1].route.Component!==void 0||B[B.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 R=Dv(B&&B.map(O=>Object.assign({},O,{params:Object.assign({},m,O.params),pathname:Vn([y,o.encodeLocation?o.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?y:Vn([y,o.encodeLocation?o.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),c,r,i);return t&&R?D.createElement(wl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...x},navigationType:"POP"}},R):R}function Sv(){let n=Mv(),t=bv(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},u={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",n),c=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:u},"ErrorBoundary")," or"," ",D.createElement("code",{style:u},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},t),r?D.createElement("pre",{style:o},r):null,c)}var Tv=D.createElement(Sv,null),kv=class extends D.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?D.createElement(Jr.Provider,{value:this.props.routeContext},D.createElement(Pf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Bv({routeContext:n,match:t,children:r}){let i=D.useContext(so);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),D.createElement(Jr.Provider,{value:n},r)}function Dv(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,u=r==null?void 0:r.errors;if(u!=null){let m=o.findIndex(h=>h.route.id&&(u==null?void 0:u[h.route.id])!==void 0);$t(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let c=!1,d=-1;if(r)for(let m=0;m<o.length;m++){let h=o[m];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=m),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((m,h,y)=>{let E,C=!1,x=null,S=null;r&&(E=u&&h.route.id?u[h.route.id]:void 0,x=h.route.errorElement||Tv,c&&(d<0&&y===0?(_y("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,S=null):d===y&&(C=!0,S=h.route.hydrateFallbackElement||null)));let N=t.concat(o.slice(0,y+1)),B=()=>{let R;return E?R=x:C?R=S:h.route.Component?R=D.createElement(h.route.Component,null):h.route.element?R=h.route.element:R=m,D.createElement(Bv,{match:h,routeContext:{outlet:m,matches:N,isDataRoute:r!=null},children:R})};return r&&(h.route.ErrorBoundary||h.route.errorElement||y===0)?D.createElement(kv,{location:r.location,revalidation:r.revalidation,component:x,error:E,children:B(),routeContext:{outlet:null,matches:N,isDataRoute:!0}}):B()},null)}function zf(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Lv(n){let t=D.useContext(so);return $t(t,zf(n)),t}function Rv(n){let t=D.useContext(pc);return $t(t,zf(n)),t}function Uv(n){let t=D.useContext(Jr);return $t(t,zf(n)),t}function Vf(n){let t=Uv(n),r=t.matches[t.matches.length-1];return $t(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function Ov(){return Vf("useRouteId")}function Mv(){var i;let n=D.useContext(Pf),t=Rv("useRouteError"),r=Vf("useRouteError");return n!==void 0?n:(i=t.errors)==null?void 0:i[r]}function _v(){let{router:n}=Lv("useNavigate"),t=Vf("useNavigate"),r=D.useRef(!1);return Oy(()=>{r.current=!0}),D.useCallback(async(o,u={})=>{jr(r.current,Uy),r.current&&(typeof o=="number"?n.navigate(o):await n.navigate(o,{fromRouteId:t,...u}))},[n,t])}var j0={};function _y(n,t,r){!t&&!j0[n]&&(j0[n]=!0,jr(!1,r))}D.memo(jv);function jv({routes:n,future:t,state:r}){return My(n,void 0,r,t)}function Qv({to:n,replace:t,state:r,relative:i}){$t(oo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=D.useContext(Xr);jr(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=D.useContext(Jr),{pathname:c}=ar(),d=Ma(),m=Ff(n,Qf(u),c,i==="path"),h=JSON.stringify(m);return D.useEffect(()=>{d(JSON.parse(h),{replace:t,state:r,relative:i})},[d,h,i,t,r]),null}function Gf(n){$t(!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 Fv({basename:n="/",children:t=null,location:r,navigationType:i="POP",navigator:o,static:u=!1}){$t(!oo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=n.replace(/^\/*/,"/"),d=D.useMemo(()=>({basename:c,navigator:o,static:u,future:{}}),[c,o,u]);typeof r=="string"&&(r=ds(r));let{pathname:m="/",search:h="",hash:y="",state:E=null,key:C="default"}=r,x=D.useMemo(()=>{let S=Gn(m,c);return S==null?null:{location:{pathname:S,search:h,hash:y,state:E,key:C},navigationType:i}},[c,m,h,y,E,C,i]);return jr(x!=null,`<Router basename="${c}"> is not able to match the URL "${m}${h}${y}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:D.createElement(Xr.Provider,{value:d},D.createElement(wl.Provider,{children:t,value:x}))}function jy({children:n,location:t}){return Nv(xf(n),t)}function xf(n,t=[]){let r=[];return D.Children.forEach(n,(i,o)=>{if(!D.isValidElement(i))return;let u=[...t,o];if(i.type===D.Fragment){r.push.apply(r,xf(i.props.children,u));return}$t(i.type===Gf,`[${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>`),$t(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||u.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=xf(i.props.children,u)),r.push(c)}),r}var Pu="get",Hu="application/x-www-form-urlencoded";function yc(n){return n!=null&&typeof n.tagName=="string"}function Pv(n){return yc(n)&&n.tagName.toLowerCase()==="button"}function Hv(n){return yc(n)&&n.tagName.toLowerCase()==="form"}function zv(n){return yc(n)&&n.tagName.toLowerCase()==="input"}function Vv(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Gv(n,t){return n.button===0&&(!t||t==="_self")&&!Vv(n)}var Bu=null;function Kv(){if(Bu===null)try{new FormData(document.createElement("form"),0),Bu=!1}catch{Bu=!0}return Bu}var qv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function KA(n){return n!=null&&!qv.has(n)?(jr(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Hu}"`),null):n}function Yv(n,t){let r,i,o,u,c;if(Hv(n)){let d=n.getAttribute("action");i=d?Gn(d,t):null,r=n.getAttribute("method")||Pu,o=KA(n.getAttribute("enctype"))||Hu,u=new FormData(n)}else if(Pv(n)||zv(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 m=n.getAttribute("formaction")||d.getAttribute("action");if(i=m?Gn(m,t):null,r=n.getAttribute("formmethod")||d.getAttribute("method")||Pu,o=KA(n.getAttribute("formenctype"))||KA(d.getAttribute("enctype"))||Hu,u=new FormData(d,n),!Kv()){let{name:h,type:y,value:E}=n;if(y==="image"){let C=h?`${h}.`:"";u.append(`${C}x`,"0"),u.append(`${C}y`,"0")}else h&&u.append(h,E)}}else{if(yc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Pu,i=null,o=Hu,c=n}return u&&o==="text/plain"&&(c=u,u=void 0),{action:i,method:r.toLowerCase(),encType:o,formData:u,body:c}}function Kf(n,t){if(n===!1||n===null||typeof n>"u")throw new Error(t)}async function Wv(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 Xv(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 Jv(n,t,r){let i=await Promise.all(n.map(async o=>{let u=t.routes[o.route.id];if(u){let c=await Wv(u,r);return c.links?c.links():[]}return[]}));return tC(i.flat(1).filter(Xv).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Q0(n,t,r,i,o,u){let c=(m,h)=>r[h]?m.route.id!==r[h].route.id:!0,d=(m,h)=>{var y;return r[h].pathname!==m.pathname||((y=r[h].route.path)==null?void 0:y.endsWith("*"))&&r[h].params["*"]!==m.params["*"]};return u==="assets"?t.filter((m,h)=>c(m,h)||d(m,h)):u==="data"?t.filter((m,h)=>{var E;let y=i.routes[m.route.id];if(!y||!y.hasLoader)return!1;if(c(m,h)||d(m,h))return!0;if(m.route.shouldRevalidate){let C=m.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:m.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function $v(n,t,{includeHydrateFallback:r}={}){return Zv(n.map(i=>{let o=t.routes[i.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function Zv(n){return[...new Set(n)]}function eC(n){let t={},r=Object.keys(n).sort();for(let i of r)t[i]=n[i];return t}function tC(n,t){let r=new Set;return new Set(t),n.reduce((i,o)=>{let u=JSON.stringify(eC(o));return r.has(u)||(r.add(u),i.push({key:u,link:o})),i},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var aC=new Set([100,101,204,205]);function rC(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&&Gn(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Qy(){let n=D.useContext(so);return Kf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function nC(){let n=D.useContext(pc);return Kf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var qf=D.createContext(void 0);qf.displayName="FrameworkContext";function Fy(){let n=D.useContext(qf);return Kf(n,"You must render this element inside a <HydratedRouter> element"),n}function iC(n,t){let r=D.useContext(qf),[i,o]=D.useState(!1),[u,c]=D.useState(!1),{onFocus:d,onBlur:m,onMouseEnter:h,onMouseLeave:y,onTouchStart:E}=t,C=D.useRef(null);D.useEffect(()=>{if(n==="render"&&c(!0),n==="viewport"){let N=R=>{R.forEach(M=>{c(M.isIntersecting)})},B=new IntersectionObserver(N,{threshold:.5});return C.current&&B.observe(C.current),()=>{B.disconnect()}}},[n]),D.useEffect(()=>{if(i){let N=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(N)}}},[i]);let x=()=>{o(!0)},S=()=>{o(!1),c(!1)};return r?n!=="intent"?[u,C,{}]:[u,C,{onFocus:al(d,x),onBlur:al(m,S),onMouseEnter:al(h,x),onMouseLeave:al(y,S),onTouchStart:al(E,x)}]:[!1,C,{}]}function al(n,t){return r=>{n&&n(r),r.defaultPrevented||t(r)}}function sC({page:n,...t}){let{router:r}=Qy(),i=D.useMemo(()=>ky(r.routes,n,r.basename),[r.routes,n,r.basename]);return i?D.createElement(lC,{page:n,matches:i,...t}):null}function oC(n){let{manifest:t,routeModules:r}=Fy(),[i,o]=D.useState([]);return D.useEffect(()=>{let u=!1;return Jv(n,t,r).then(c=>{u||o(c)}),()=>{u=!0}},[n,t,r]),i}function lC({page:n,matches:t,...r}){let i=ar(),{manifest:o,routeModules:u}=Fy(),{basename:c}=Qy(),{loaderData:d,matches:m}=nC(),h=D.useMemo(()=>Q0(n,t,m,o,i,"data"),[n,t,m,o,i]),y=D.useMemo(()=>Q0(n,t,m,o,i,"assets"),[n,t,m,o,i]),E=D.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let S=new Set,N=!1;if(t.forEach(R=>{var O;let M=o.routes[R.route.id];!M||!M.hasLoader||(!h.some(z=>z.route.id===R.route.id)&&R.route.id in d&&((O=u[R.route.id])!=null&&O.shouldRevalidate)||M.hasClientLoader?N=!0:S.add(R.route.id))}),S.size===0)return[];let B=rC(n,c);return N&&S.size>0&&B.searchParams.set("_routes",t.filter(R=>S.has(R.route.id)).map(R=>R.route.id).join(",")),[B.pathname+B.search]},[c,d,i,o,h,t,n,u]),C=D.useMemo(()=>$v(y,o),[y,o]),x=oC(y);return D.createElement(D.Fragment,null,E.map(S=>D.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),C.map(S=>D.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),x.map(({key:S,link:N})=>D.createElement("link",{key:S,...N})))}function uC(...n){return t=>{n.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Py=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Py&&(window.__reactRouterVersion="7.6.0")}catch{}function cC({basename:n,children:t,window:r}){let i=D.useRef();i.current==null&&(i.current=Jw({window:r,v5Compat:!0}));let o=i.current,[u,c]=D.useState({action:o.action,location:o.location}),d=D.useCallback(m=>{D.startTransition(()=>c(m))},[c]);return D.useLayoutEffect(()=>o.listen(d),[o,d]),D.createElement(Fv,{basename:n,children:t,location:u.location,navigationType:u.action,navigator:o})}var Hy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ec=D.forwardRef(function({onClick:t,discover:r="render",prefetch:i="none",relative:o,reloadDocument:u,replace:c,state:d,target:m,to:h,preventScrollReset:y,viewTransition:E,...C},x){let{basename:S}=D.useContext(Xr),N=typeof h=="string"&&Hy.test(h),B,R=!1;if(typeof h=="string"&&N&&(B=h,Py))try{let J=new URL(window.location.href),Z=h.startsWith("//")?new URL(J.protocol+h):new URL(h),$=Gn(Z.pathname,S);Z.origin===J.origin&&$!=null?h=$+Z.search+Z.hash:R=!0}catch{jr(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let M=xv(h,{relative:o}),[O,z,H]=iC(i,C),V=hC(h,{replace:c,state:d,target:m,preventScrollReset:y,relative:o,viewTransition:E});function ee(J){t&&t(J),J.defaultPrevented||V(J)}let q=D.createElement("a",{...C,...H,href:B||M,onClick:R||u?t:ee,ref:uC(x,z),target:m,"data-discover":!N&&r==="render"?"true":void 0});return O&&!N?D.createElement(D.Fragment,null,q,D.createElement(sC,{page:M})):q});Ec.displayName="Link";var dC=D.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:i="",end:o=!1,style:u,to:c,viewTransition:d,children:m,...h},y){let E=vl(c,{relative:h.relative}),C=ar(),x=D.useContext(pc),{navigator:S,basename:N}=D.useContext(Xr),B=x!=null&&EC(E)&&d===!0,R=S.encodeLocation?S.encodeLocation(E).pathname:E.pathname,M=C.pathname,O=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;r||(M=M.toLowerCase(),O=O?O.toLowerCase():null,R=R.toLowerCase()),O&&N&&(O=Gn(O,N)||O);const z=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let H=M===R||!o&&M.startsWith(R)&&M.charAt(z)==="/",V=O!=null&&(O===R||!o&&O.startsWith(R)&&O.charAt(R.length)==="/"),ee={isActive:H,isPending:V,isTransitioning:B},q=H?t:void 0,J;typeof i=="function"?J=i(ee):J=[i,H?"active":null,V?"pending":null,B?"transitioning":null].filter(Boolean).join(" ");let Z=typeof u=="function"?u(ee):u;return D.createElement(Ec,{...h,"aria-current":q,className:J,ref:y,style:Z,to:c,viewTransition:d},typeof m=="function"?m(ee):m)});dC.displayName="NavLink";var AC=D.forwardRef(({discover:n="render",fetcherKey:t,navigate:r,reloadDocument:i,replace:o,state:u,method:c=Pu,action:d,onSubmit:m,relative:h,preventScrollReset:y,viewTransition:E,...C},x)=>{let S=pC(),N=yC(d,{relative:h}),B=c.toLowerCase()==="get"?"get":"post",R=typeof d=="string"&&Hy.test(d),M=O=>{if(m&&m(O),O.defaultPrevented)return;O.preventDefault();let z=O.nativeEvent.submitter,H=(z==null?void 0:z.getAttribute("formmethod"))||c;S(z||O.currentTarget,{fetcherKey:t,method:H,navigate:r,replace:o,state:u,relative:h,preventScrollReset:y,viewTransition:E})};return D.createElement("form",{ref:x,method:B,action:N,onSubmit:i?m:M,...C,"data-discover":!R&&n==="render"?"true":void 0})});AC.displayName="Form";function fC(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function zy(n){let t=D.useContext(so);return $t(t,fC(n)),t}function hC(n,{target:t,replace:r,state:i,preventScrollReset:o,relative:u,viewTransition:c}={}){let d=Ma(),m=ar(),h=vl(n,{relative:u});return D.useCallback(y=>{if(Gv(y,t)){y.preventDefault();let E=r!==void 0?r:yl(m)===yl(h);d(n,{replace:E,state:i,preventScrollReset:o,relative:u,viewTransition:c})}},[m,d,h,r,i,t,n,o,u,c])}var gC=0,mC=()=>`__${String(++gC)}__`;function pC(){let{router:n}=zy("useSubmit"),{basename:t}=D.useContext(Xr),r=Ov();return D.useCallback(async(i,o={})=>{let{action:u,method:c,encType:d,formData:m,body:h}=Yv(i,t);if(o.navigate===!1){let y=o.fetcherKey||mC();await n.fetch(y,r,o.action||u,{preventScrollReset:o.preventScrollReset,formData:m,body:h,formMethod:o.method||c,formEncType:o.encType||d,flushSync:o.flushSync})}else await n.navigate(o.action||u,{preventScrollReset:o.preventScrollReset,formData:m,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 yC(n,{relative:t}={}){let{basename:r}=D.useContext(Xr),i=D.useContext(Jr);$t(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),u={...vl(n||".",{relative:t})},c=ar();if(n==null){u.search=c.search;let d=new URLSearchParams(u.search),m=d.getAll("index");if(m.some(y=>y==="")){d.delete("index"),m.filter(E=>E).forEach(E=>d.append("index",E));let y=d.toString();u.search=y?`?${y}`:""}}return(!n||n===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:Vn([r,u.pathname])),yl(u)}function EC(n,t={}){let r=D.useContext(Ry);$t(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=zy("useViewTransitionState"),o=vl(n,{relative:t.relative});if(!r.isTransitioning)return!1;let u=Gn(r.currentLocation.pathname,i)||r.currentLocation.pathname,c=Gn(r.nextLocation.pathname,i)||r.nextLocation.pathname;return Ju(o.pathname,c)!=null||Ju(o.pathname,u)!=null}[...aC];var Du={exports:{}},F0;function bC(){if(F0)return Du.exports;F0=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 Du.exports=t,Du.exports.default=t,Du.exports}var wC=bC();const $u=Li(wC);var vC=()=>`uid::${$u(7)}`,CC=(n,t=["endpointName","fingerprint"])=>typeof n=="object"&&n!==null&&t.every(r=>r in n),xC=n=>{if(!CC(n))throw new TypeError("Invalid connection args");return JSON.stringify(n)},IC=()=>{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}},qA=class{static toBackground(n,t){return n.postMessage(t)}static toExtensionContext(n,t){return n.postMessage(t)}},zu={exports:{}},NC=zu.exports,P0;function SC(){return P0||(P0=1,function(n,t){(function(r,i){i(n)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:NC,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)",u=c=>{const d={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(d).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class m extends WeakMap{constructor(J,Z=void 0){super(Z),this.createItem=J}get(J){return this.has(J)||this.set(J,this.createItem(J)),super.get(J)}}const h=q=>q&&typeof q=="object"&&typeof q.then=="function",y=(q,J)=>(...Z)=>{c.runtime.lastError?q.reject(new Error(c.runtime.lastError.message)):J.singleCallbackArg||Z.length<=1&&J.singleCallbackArg!==!1?q.resolve(Z[0]):q.resolve(Z)},E=q=>q==1?"argument":"arguments",C=(q,J)=>function($,...ge){if(ge.length<J.minArgs)throw new Error(`Expected at least ${J.minArgs} ${E(J.minArgs)} for ${q}(), got ${ge.length}`);if(ge.length>J.maxArgs)throw new Error(`Expected at most ${J.maxArgs} ${E(J.maxArgs)} for ${q}(), got ${ge.length}`);return new Promise((se,ce)=>{if(J.fallbackToNoCallback)try{$[q](...ge,y({resolve:se,reject:ce},J))}catch(ne){console.warn(`${q} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,ne),$[q](...ge),J.fallbackToNoCallback=!1,J.noCallback=!0,se()}else J.noCallback?($[q](...ge),se()):$[q](...ge,y({resolve:se,reject:ce},J))})},x=(q,J,Z)=>new Proxy(J,{apply($,ge,se){return Z.call(ge,q,...se)}});let S=Function.call.bind(Object.prototype.hasOwnProperty);const N=(q,J={},Z={})=>{let $=Object.create(null),ge={has(ce,ne){return ne in q||ne in $},get(ce,ne,G){if(ne in $)return $[ne];if(!(ne in q))return;let oe=q[ne];if(typeof oe=="function")if(typeof J[ne]=="function")oe=x(q,q[ne],J[ne]);else if(S(Z,ne)){let Ae=C(ne,Z[ne]);oe=x(q,q[ne],Ae)}else oe=oe.bind(q);else if(typeof oe=="object"&&oe!==null&&(S(J,ne)||S(Z,ne)))oe=N(oe,J[ne],Z[ne]);else if(S(Z,"*"))oe=N(oe,J[ne],Z["*"]);else return Object.defineProperty($,ne,{configurable:!0,enumerable:!0,get(){return q[ne]},set(Ae){q[ne]=Ae}}),oe;return $[ne]=oe,oe},set(ce,ne,G,oe){return ne in $?$[ne]=G:q[ne]=G,!0},defineProperty(ce,ne,G){return Reflect.defineProperty($,ne,G)},deleteProperty(ce,ne){return Reflect.deleteProperty($,ne)}},se=Object.create(q);return new Proxy(se,ge)},B=q=>({addListener(J,Z,...$){J.addListener(q.get(Z),...$)},hasListener(J,Z){return J.hasListener(q.get(Z))},removeListener(J,Z){J.removeListener(q.get(Z))}}),R=new m(q=>typeof q!="function"?q:function(Z){const $=N(Z,{},{getContent:{minArgs:0,maxArgs:0}});q($)});let M=!1;const O=new m(q=>typeof q!="function"?q:function(Z,$,ge){let se=!1,ce,ne=new Promise(xe=>{ce=function(P){M||(console.warn(o,new Error().stack),M=!0),se=!0,xe(P)}}),G;try{G=q(Z,$,ce)}catch(xe){G=Promise.reject(xe)}const oe=G!==!0&&h(G);if(G!==!0&&!oe&&!se)return!1;const Ae=xe=>{xe.then(P=>{ge(P)},P=>{let te;P&&(P instanceof Error||typeof P.message=="string")?te=P.message:te="An unexpected error occurred",ge({__mozWebExtensionPolyfillReject__:!0,message:te})}).catch(P=>{console.error("Failed to send onMessage rejected reply",P)})};return Ae(oe?G:ne),!0}),z=({reject:q,resolve:J},Z)=>{c.runtime.lastError?c.runtime.lastError.message===i?J():q(new Error(c.runtime.lastError.message)):Z&&Z.__mozWebExtensionPolyfillReject__?q(new Error(Z.message)):J(Z)},H=(q,J,Z,...$)=>{if($.length<J.minArgs)throw new Error(`Expected at least ${J.minArgs} ${E(J.minArgs)} for ${q}(), got ${$.length}`);if($.length>J.maxArgs)throw new Error(`Expected at most ${J.maxArgs} ${E(J.maxArgs)} for ${q}(), got ${$.length}`);return new Promise((ge,se)=>{const ce=z.bind(null,{resolve:ge,reject:se});$.push(ce),Z.sendMessage(...$)})},V={devtools:{network:{onRequestFinished:B(R)}},runtime:{onMessage:B(O),onMessageExternal:B(O),sendMessage:H.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:H.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},ee={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return d.privacy={network:{"*":ee},services:{"*":ee},websites:{"*":ee}},N(c,V,d)};r.exports=u(chrome)}else r.exports=globalThis.browser})}(zu)),zu.exports}var TC=SC();const kC=Li(TC);var BC=(n="")=>{const t=vC();let r,i=[];const o=IC(),u=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?(qA.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),u.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)))}}},m=()=>{r=kC.runtime.connect({name:xC({endpointName:n,fingerprint:t})}),r.onMessage.addListener(d),r.onDisconnect.addListener(m),qA.toBackground(r,{type:"sync",pendingResponses:o.entries(),pendingDeliveries:[...new Set(i.map(({resolvedDestination:h})=>h))]})};return m(),{onFailure(h){c.add(h)},onMessage(h){u.add(h)},postMessage(h){qA.toBackground(r,{type:"deliver",message:h})}}},DC=Object.defineProperty,LC=Object.defineProperties,RC=Object.getOwnPropertyDescriptors,H0=Object.getOwnPropertySymbols,UC=Object.prototype.hasOwnProperty,OC=Object.prototype.propertyIsEnumerable,z0=(n,t,r)=>t in n?DC(n,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[t]=r,Vy=(n,t)=>{for(var r in t||(t={}))UC.call(t,r)&&z0(n,r,t[r]);if(H0)for(var r of H0(t))OC.call(t,r)&&z0(n,r,t[r]);return n},Gy=(n,t)=>LC(n,RC(t)),MC=/^((?:background$)|devtools|popup|options|content-script|window)(?:@(\d+)(?:\.(\d+))?)?$/,Ky=n=>{const[,t,r,i]=n.match(MC)||[];return{context:t,tabId:+r,frameId:i?+i:void 0}};const _C=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],If=Symbol(".toJSON was called"),jC=n=>{n[If]=!0;const t=n.toJSON();return delete n[If],t},qy=({from:n,seen:t,to_:r,forceEnumerable:i,maxDepth:o,depth:u})=>{const c=r||(Array.isArray(n)?[]:{});if(t.push(n),u>=o)return c;if(typeof n.toJSON=="function"&&n[If]!==!0)return jC(n);for(const[d,m]of Object.entries(n)){if(typeof Buffer=="function"&&Buffer.isBuffer(m)){c[d]="[object Buffer]";continue}if(m!==null&&typeof m=="object"&&typeof m.pipe=="function"){c[d]="[object Stream]";continue}if(typeof m!="function"){if(!m||typeof m!="object"){c[d]=m;continue}if(!t.includes(n[d])){u++,c[d]=qy({from:n[d],seen:[...t],forceEnumerable:i,maxDepth:o,depth:u});continue}c[d]="[Circular]"}}for(const{property:d,enumerable:m}of _C)typeof n[d]=="string"&&Object.defineProperty(c,d,{value:n[d],enumerable:!0,configurable:!0,writable:!0});return c};function QC(n,t={}){const{maxDepth:r=Number.POSITIVE_INFINITY}=t;return typeof n=="object"&&n!==null?qy({from:n,seen:[],forceEnumerable:!0,maxDepth:r,depth:0}):typeof n=="function"?`[Function: ${n.name||"anonymous"}]`:n}let Yy=()=>({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 FC=(n,t,r)=>{const i=$u(),o=new Map,u=new Map,c=d=>{if(d.destination.context===n&&!d.destination.frameId&&!d.destination.tabId){const{transactionId:m,messageID:h,messageType:y}=d,E=()=>{const x=o.get(m);if(x){const{err:S,data:N}=d;if(S){const B=S,R=self[B.name],M=new(typeof R=="function"?R:Error)(B.message);for(const O in B)M[O]=B[O];x.reject(M)}else x.resolve(N);o.delete(m)}},C=async()=>{let x,S,N=!1;try{const B=u.get(h);if(typeof B=="function")x=await B({sender:d.origin,id:h,data:d.data,timestamp:d.timestamp});else throw N=!0,new Error(`[webext-bridge] No handler registered in '${n}' to accept messages with id '${h}'`)}catch(B){S=B}finally{if(S&&(d.err=QC(S)),c(Gy(Vy({},d),{messageType:"reply",data:x,origin:{context:n,tabId:null},destination:d.origin,hops:[]})),S&&!N)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 m=o.get(d);m==null||m.reject("Transaction was ended before it could complete"),o.delete(d)},sendMessage:(d,m,h="background")=>{const y=typeof h=="string"?Ky(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 S={messageID:d,data:m,destination:y,messageType:"message",transactionId:$u(),origin:{context:n,tabId:null},hops:[],timestamp:Date.now()};o.set(S.transactionId,{resolve:C,reject:x});try{c(S)}catch(N){o.delete(S.transactionId),x(N)}})},onMessage:(d,m)=>(u.set(d,m),()=>u.delete(d))}},$s=class{constructor(n,t){this.endpointRuntime=n,this.streamInfo=t,this.emitter=Yy(),this.isClosed=!1,this.handleStreamClose=()=>{this.isClosed||(this.isClosed=!0,this.emitter.emit("closed",!0),this.emitter.events={})},$s.initDone||(n.onMessage("__crx_bridge_stream_transfer__",r=>{const{streamId:i,streamTransfer:o,action:u}=r.data,c=$s.openStreams.get(i);c&&!c.isClosed&&(u==="transfer"&&c.emitter.emit("message",o),u==="close"&&($s.openStreams.delete(i),c.handleStreamClose()))}),$s.initDone=!0),$s.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})}},Zu=$s;Zu.initDone=!1;Zu.openStreams=new Map;var PC=n=>{const t=new Map,r=new Map,i=Yy();n.onMessage("__crx_bridge_stream_open__",c=>new Promise(d=>{const{sender:m,data:h}=c,{channel:y}=h;let E=!1,C=()=>{};const x=()=>{const S=r.get(y);typeof S=="function"?(S(new Zu(n,Gy(Vy({},h),{endpoint:m}))),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 m=typeof d=="string"?Ky(d):d,h={streamId:$u(),channel:c,endpoint:m},y=new Zu(n,h);return y.onClose(()=>t.delete(c)),await n.sendMessage("__crx_bridge_stream_open__",h,m),t.set(c,y),y}function u(c,d){if(r.has(c))throw new Error("webext-bridge: This channel has already been claimed. Stream allows only one-on-one communication");r.set(c,d),i.emit("did-change-stream-callbacks")}return{openStream:o,onOpenStreamChannel:u}},Wy=BC("popup"),Yf=FC("popup",n=>Wy.postMessage(n));Wy.onMessage(Yf.handleMessage);var{sendMessage:Lt,onMessage:YA}=Yf;PC(Yf);const HC=()=>{const[n,t]=D.useState(!1),r=D.useRef(null),i=D.useRef(0),o=(u,c)=>{setTimeout(()=>{if(r.current){const d=u/c*100;r.current.style.transition="none",r.current.style.width=`${d}%`,r.current.offsetHeight,requestAnimationFrame(()=>{r.current&&(r.current.style.transition=`width ${u}s linear`,r.current.style.width="0%")})}},10)};return D.useEffect(()=>{Lt("GET_CLIPBOARD_COUNTDOWN_STATE",{},"background").then(m=>{const h=m;h&&h.remaining>0&&(i.current=h.id,t(!0),o(h.remaining,h.total))}).catch(()=>{});const u=YA("CLIPBOARD_COUNTDOWN",({data:m})=>{const{remaining:h,total:y,id:E}=m;t(h>0),E!==i.current&&h>0&&(i.current=E,o(h,y))}),c=YA("CLIPBOARD_CLEARED",()=>{t(!1),i.current=0,r.current&&(r.current.style.transition="none",r.current.style.width="0%")}),d=YA("CLIPBOARD_COUNTDOWN_CANCELLED",()=>{t(!1),i.current=0,r.current&&(r.current.style.transition="none",r.current.style.width="0%")});return()=>{u(),c(),d()}},[]),n?A.jsx("div",{className:"fixed top-0 left-0 right-0 z-50 h-1 bg-gray-200 dark:bg-gray-700",children:A.jsx("div",{ref:r,className:"h-full bg-orange-500",style:{width:"100%",transition:"none"}})}):null},zC=()=>{const{t:n}=gt(),t=Ma(),r=ar(),[i,o]=D.useState("credentials");D.useEffect(()=>{const y=r.pathname.substring(1),C=["credentials","emails","settings"].find(x=>y===x||y.startsWith(`${x}/`));C&&o(C)},[r]);const u=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:A.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:A.jsxs("div",{className:"flex justify-around items-center h-14",children:[A.jsxs("button",{onClick:()=>u("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:[A.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:A.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"})}),A.jsx("span",{className:"text-sm mt-1",children:n("menu.credentials")})]}),A.jsxs("button",{onClick:()=>u("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:[A.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:A.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"})}),A.jsx("span",{className:"text-sm mt-1",children:n("menu.emails")})]}),A.jsxs("button",{onClick:()=>u("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:[A.jsxs("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[A.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"}),A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),A.jsx("span",{className:"text-sm mt-1",children:n("menu.settings")})]})]})})},Xy=({className:n="",width:t=200,height:r=50,showText:i=!0,color:o="currentColor"})=>A.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:[A.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"}),A.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"}),A.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"}),A.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"}),A.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&&A.jsx("text",{x:"550",y:"355",fontFamily:"Arial, Helvetica, sans-serif",fontWeight:"700",fontSize:"290",letterSpacing:"-7",fill:o,children:"AliasVault"})]});var V0=Object.prototype.hasOwnProperty;function Nf(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--&&Nf(n[i],t[i]););return i===-1}if(!r||typeof n=="object"){i=0;for(r in n)if(V0.call(n,r)&&++i&&!V0.call(t,r)||!(r in t)||!Nf(n[r],t[r]))return!1;return Object.keys(t).length===i}}return n!==n&&t!==t}const VC=new Error("request for lock canceled");var GC=function(n,t,r,i){function o(u){return u instanceof r?u:new r(function(c){c(u)})}return new(r||(r=Promise))(function(u,c){function d(y){try{h(i.next(y))}catch(E){c(E)}}function m(y){try{h(i.throw(y))}catch(E){c(E)}}function h(y){y.done?u(y.value):o(y.value).then(d,m)}h((i=i.apply(n,t||[])).next())})};class KC{constructor(t,r=VC){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 u={resolve:i,reject:o,weight:t,priority:r},c=Jy(this._queue,d=>r<=d.priority);c===-1&&t<=this._value?this._dispatchItem(u):this._queue.splice(c+1,0,u)})}runExclusive(t){return GC(this,arguments,void 0,function*(r,i=1,o=0){const[u,c]=yield this.acquire(i,o);try{return yield r(u)}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]=[]),qC(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(u=>u.priority<=t);(o===-1?i:i.splice(0,o)).forEach(u=>u.resolve())}}}_couldLockImmediately(t,r){return(this._queue.length===0||this._queue[0].priority<r)&&t<=this._value}}function qC(n,t){const r=Jy(n,i=>t.priority<=i.priority);n.splice(r+1,0,t)}function Jy(n,t){for(let r=n.length-1;r>=0;r--)if(t(n[r]))return r;return-1}var YC=function(n,t,r,i){function o(u){return u instanceof r?u:new r(function(c){c(u)})}return new(r||(r=Promise))(function(u,c){function d(y){try{h(i.next(y))}catch(E){c(E)}}function m(y){try{h(i.throw(y))}catch(E){c(E)}}function h(y){y.done?u(y.value):o(y.value).then(d,m)}h((i=i.apply(n,t||[])).next())})};class WC{constructor(t){this._semaphore=new KC(1,t)}acquire(){return YC(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 vy,Cy;const Vu=((Cy=(vy=globalThis.browser)==null?void 0:vy.runtime)==null?void 0:Cy.id)==null?globalThis.chrome:globalThis.browser,Ve=XC();function XC(){const n={local:Lu("local"),session:Lu("session"),sync:Lu("sync"),managed:Lu("managed")},t=N=>{const B=n[N];if(B==null){const R=Object.keys(n).join(", ");throw Error(`Invalid area "${N}". Options: ${R}`)}return B},r=N=>{const B=N.indexOf(":"),R=N.substring(0,B),M=N.substring(B+1);if(M==null)throw Error(`Storage key should be in the form of "area:key", but received "${N}"`);return{driverArea:R,driverKey:M,driver:t(R)}},i=N=>N+"$",o=(N,B)=>{const R={...N};return Object.entries(B).forEach(([M,O])=>{O==null?delete R[M]:R[M]=O}),R},u=(N,B)=>N??B??null,c=N=>typeof N=="object"&&!Array.isArray(N)?N:{},d=async(N,B,R)=>{const M=await N.getItem(B);return u(M,(R==null?void 0:R.fallback)??(R==null?void 0:R.defaultValue))},m=async(N,B)=>{const R=i(B),M=await N.getItem(R);return c(M)},h=async(N,B,R)=>{await N.setItem(B,R??null)},y=async(N,B,R)=>{const M=i(B),O=c(await N.getItem(M));await N.setItem(M,o(O,R))},E=async(N,B,R)=>{if(await N.removeItem(B),R!=null&&R.removeMeta){const M=i(B);await N.removeItem(M)}},C=async(N,B,R)=>{const M=i(B);if(R==null)await N.removeItem(M);else{const O=c(await N.getItem(M));[R].flat().forEach(z=>delete O[z]),await N.setItem(M,O)}},x=(N,B,R)=>N.watch(B,R);return{getItem:async(N,B)=>{const{driver:R,driverKey:M}=r(N);return await d(R,M,B)},getItems:async N=>{const B=new Map,R=new Map,M=[];N.forEach(z=>{let H,V;typeof z=="string"?H=z:"getValue"in z?(H=z.key,V={fallback:z.fallback}):(H=z.key,V=z.options),M.push(H);const{driverArea:ee,driverKey:q}=r(H),J=B.get(ee)??[];B.set(ee,J.concat(q)),R.set(H,V)});const O=new Map;return await Promise.all(Array.from(B.entries()).map(async([z,H])=>{(await n[z].getItems(H)).forEach(ee=>{const q=`${z}:${ee.key}`,J=R.get(q),Z=u(ee.value,(J==null?void 0:J.fallback)??(J==null?void 0:J.defaultValue));O.set(q,Z)})})),M.map(z=>({key:z,value:O.get(z)}))},getMeta:async N=>{const{driver:B,driverKey:R}=r(N);return await m(B,R)},getMetas:async N=>{const B=N.map(O=>{const z=typeof O=="string"?O:O.key,{driverArea:H,driverKey:V}=r(z);return{key:z,driverArea:H,driverKey:V,driverMetaKey:i(V)}}),R=B.reduce((O,z)=>{var H;return O[H=z.driverArea]??(O[H]=[]),O[z.driverArea].push(z),O},{}),M={};return await Promise.all(Object.entries(R).map(async([O,z])=>{const H=await Vu.storage[O].get(z.map(V=>V.driverMetaKey));z.forEach(V=>{M[V.key]=H[V.driverMetaKey]??{}})})),B.map(O=>({key:O.key,meta:M[O.key]}))},setItem:async(N,B)=>{const{driver:R,driverKey:M}=r(N);await h(R,M,B)},setItems:async N=>{const B={};N.forEach(R=>{const{driverArea:M,driverKey:O}=r("key"in R?R.key:R.item.key);B[M]??(B[M]=[]),B[M].push({key:O,value:R.value})}),await Promise.all(Object.entries(B).map(async([R,M])=>{await t(R).setItems(M)}))},setMeta:async(N,B)=>{const{driver:R,driverKey:M}=r(N);await y(R,M,B)},setMetas:async N=>{const B={};N.forEach(R=>{const{driverArea:M,driverKey:O}=r("key"in R?R.key:R.item.key);B[M]??(B[M]=[]),B[M].push({key:O,properties:R.meta})}),await Promise.all(Object.entries(B).map(async([R,M])=>{const O=t(R),z=M.map(({key:q})=>i(q));console.log(R,z);const H=await O.getItems(z),V=Object.fromEntries(H.map(({key:q,value:J})=>[q,c(J)])),ee=M.map(({key:q,properties:J})=>{const Z=i(q);return{key:Z,value:o(V[Z]??{},J)}});await O.setItems(ee)}))},removeItem:async(N,B)=>{const{driver:R,driverKey:M}=r(N);await E(R,M,B)},removeItems:async N=>{const B={};N.forEach(R=>{let M,O;typeof R=="string"?M=R:"getValue"in R?M=R.key:"item"in R?(M=R.item.key,O=R.options):(M=R.key,O=R.options);const{driverArea:z,driverKey:H}=r(M);B[z]??(B[z]=[]),B[z].push(H),O!=null&&O.removeMeta&&B[z].push(i(H))}),await Promise.all(Object.entries(B).map(async([R,M])=>{await t(R).removeItems(M)}))},clear:async N=>{await t(N).clear()},removeMeta:async(N,B)=>{const{driver:R,driverKey:M}=r(N);await C(R,M,B)},snapshot:async(N,B)=>{var O;const M=await t(N).snapshot();return(O=B==null?void 0:B.excludeKeys)==null||O.forEach(z=>{delete M[z],delete M[i(z)]}),M},restoreSnapshot:async(N,B)=>{await t(N).restoreSnapshot(B)},watch:(N,B)=>{const{driver:R,driverKey:M}=r(N);return x(R,M,B)},unwatch(){Object.values(n).forEach(N=>{N.unwatch()})},defineItem:(N,B)=>{const{driver:R,driverKey:M}=r(N),{version:O=1,migrations:z={}}=B??{};if(O<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const H=async()=>{var G;const Z=i(M),[{value:$},{value:ge}]=await R.getItems([M,Z]);if($==null)return;const se=(ge==null?void 0:ge.v)??1;if(se>O)throw Error(`Version downgrade detected (v${se} -> v${O}) for "${N}"`);if(se===O)return;console.debug(`[@wxt-dev/storage] Running storage migration for ${N}: v${se} -> v${O}`);const ce=Array.from({length:O-se},(oe,Ae)=>se+Ae+1);let ne=$;for(const oe of ce)try{ne=await((G=z==null?void 0:z[oe])==null?void 0:G.call(z,ne))??ne}catch(Ae){throw new JC(N,oe,{cause:Ae})}await R.setItems([{key:M,value:ne},{key:Z,value:{...ge,v:O}}]),console.debug(`[@wxt-dev/storage] Storage migration completed for ${N} v${O}`,{migratedValue:ne})},V=(B==null?void 0:B.migrations)==null?Promise.resolve():H().catch(Z=>{console.error(`[@wxt-dev/storage] Migration failed for ${N}`,Z)}),ee=new WC,q=()=>(B==null?void 0:B.fallback)??(B==null?void 0:B.defaultValue)??null,J=()=>ee.runExclusive(async()=>{const Z=await R.getItem(M);if(Z!=null||(B==null?void 0:B.init)==null)return Z;const $=await B.init();return await R.setItem(M,$),$});return V.then(J),{key:N,get defaultValue(){return q()},get fallback(){return q()},getValue:async()=>(await V,B!=null&&B.init?await J():await d(R,M,B)),getMeta:async()=>(await V,await m(R,M)),setValue:async Z=>(await V,await h(R,M,Z)),setMeta:async Z=>(await V,await y(R,M,Z)),removeValue:async Z=>(await V,await E(R,M,Z)),removeMeta:async Z=>(await V,await C(R,M,Z)),watch:Z=>x(R,M,($,ge)=>Z($??q(),ge??q())),migrate:H}}}}function Lu(n){const t=()=>{if(Vu.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(Vu.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const i=Vu.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(u=>({key:u,value:o[u]??null}))},setItem:async(i,o)=>{o==null?await t().remove(i):await t().set({[i]:o})},setItems:async i=>{const o=i.reduce((u,{key:c,value:d})=>(u[c]=d,u),{});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 u=c=>{const d=c[i];d!=null&&(Nf(d.newValue,d.oldValue)||o(d.newValue??null,d.oldValue??null))};return t().onChanged.addListener(u),r.add(u),()=>{t().onChanged.removeListener(u),r.delete(u)}},unwatch(){r.forEach(i=>{t().onChanged.removeListener(i)}),r.clear()}}}class JC extends Error{constructor(t,r,i){super(`v${r} migration failed for "${t}"`,i),this.key=t,this.version=r}}var WA={},rl={},G0;function $C(){if(G0)return rl;G0=1,rl.byteLength=d,rl.toByteArray=h,rl.fromByteArray=C;for(var n=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=i.length;o<u;++o)n[o]=i[o],t[i.charCodeAt(o)]=o;t[45]=62,t[95]=63;function c(x){var S=x.length;if(S%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var N=x.indexOf("=");N===-1&&(N=S);var B=N===S?0:4-N%4;return[N,B]}function d(x){var S=c(x),N=S[0],B=S[1];return(N+B)*3/4-B}function m(x,S,N){return(S+N)*3/4-N}function h(x){var S,N=c(x),B=N[0],R=N[1],M=new r(m(x,B,R)),O=0,z=R>0?B-4:B,H;for(H=0;H<z;H+=4)S=t[x.charCodeAt(H)]<<18|t[x.charCodeAt(H+1)]<<12|t[x.charCodeAt(H+2)]<<6|t[x.charCodeAt(H+3)],M[O++]=S>>16&255,M[O++]=S>>8&255,M[O++]=S&255;return R===2&&(S=t[x.charCodeAt(H)]<<2|t[x.charCodeAt(H+1)]>>4,M[O++]=S&255),R===1&&(S=t[x.charCodeAt(H)]<<10|t[x.charCodeAt(H+1)]<<4|t[x.charCodeAt(H+2)]>>2,M[O++]=S>>8&255,M[O++]=S&255),M}function y(x){return n[x>>18&63]+n[x>>12&63]+n[x>>6&63]+n[x&63]}function E(x,S,N){for(var B,R=[],M=S;M<N;M+=3)B=(x[M]<<16&16711680)+(x[M+1]<<8&65280)+(x[M+2]&255),R.push(y(B));return R.join("")}function C(x){for(var S,N=x.length,B=N%3,R=[],M=16383,O=0,z=N-B;O<z;O+=M)R.push(E(x,O,O+M>z?z:O+M));return B===1?(S=x[N-1],R.push(n[S>>2]+n[S<<4&63]+"==")):B===2&&(S=(x[N-2]<<8)+x[N-1],R.push(n[S>>10]+n[S>>4&63]+n[S<<2&63]+"=")),R.join("")}return rl}var Ru={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var K0;function ZC(){return K0||(K0=1,Ru.read=function(n,t,r,i,o){var u,c,d=o*8-i-1,m=(1<<d)-1,h=m>>1,y=-7,E=r?o-1:0,C=r?-1:1,x=n[t+E];for(E+=C,u=x&(1<<-y)-1,x>>=-y,y+=d;y>0;u=u*256+n[t+E],E+=C,y-=8);for(c=u&(1<<-y)-1,u>>=-y,y+=i;y>0;c=c*256+n[t+E],E+=C,y-=8);if(u===0)u=1-h;else{if(u===m)return c?NaN:(x?-1:1)*(1/0);c=c+Math.pow(2,i),u=u-h}return(x?-1:1)*c*Math.pow(2,u-i)},Ru.write=function(n,t,r,i,o,u){var c,d,m,h=u*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:u-1,S=i?1:-1,N=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*(m=Math.pow(2,-c))<1&&(c--,m*=2),c+E>=1?t+=C/m:t+=C*Math.pow(2,1-E),t*m>=2&&(c++,m/=2),c+E>=y?(d=0,c=y):c+E>=1?(d=(t*m-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+=S,d/=256,o-=8);for(c=c<<o|d,h+=o;h>0;n[r+x]=c&255,x+=S,c/=256,h-=8);n[r+x-S]|=N*128}),Ru}/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var q0;function ex(){return q0||(q0=1,function(n){const t=$C(),r=ZC(),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=d,n.SlowBuffer=M,n.INSPECT_MAX_BYTES=50;const o=2147483647;n.kMaxLength=o,d.TYPED_ARRAY_SUPPORT=u(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function u(){try{const L=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(L,v),L.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(L){if(L>o)throw new RangeError('The value "'+L+'" is invalid for option "size"');const v=new Uint8Array(L);return Object.setPrototypeOf(v,d.prototype),v}function d(L,v,w){if(typeof L=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(L)}return m(L,v,w)}d.poolSize=8192;function m(L,v,w){if(typeof L=="string")return C(L,v);if(ArrayBuffer.isView(L))return S(L);if(L==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L);if(Ee(L,ArrayBuffer)||L&&Ee(L.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ee(L,SharedArrayBuffer)||L&&Ee(L.buffer,SharedArrayBuffer)))return N(L,v,w);if(typeof L=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Q=L.valueOf&&L.valueOf();if(Q!=null&&Q!==L)return d.from(Q,v,w);const X=B(L);if(X)return X;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof L[Symbol.toPrimitive]=="function")return d.from(L[Symbol.toPrimitive]("string"),v,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L)}d.from=function(L,v,w){return m(L,v,w)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array);function h(L){if(typeof L!="number")throw new TypeError('"size" argument must be of type number');if(L<0)throw new RangeError('The value "'+L+'" is invalid for option "size"')}function y(L,v,w){return h(L),L<=0?c(L):v!==void 0?typeof w=="string"?c(L).fill(v,w):c(L).fill(v):c(L)}d.alloc=function(L,v,w){return y(L,v,w)};function E(L){return h(L),c(L<0?0:R(L)|0)}d.allocUnsafe=function(L){return E(L)},d.allocUnsafeSlow=function(L){return E(L)};function C(L,v){if((typeof v!="string"||v==="")&&(v="utf8"),!d.isEncoding(v))throw new TypeError("Unknown encoding: "+v);const w=O(L,v)|0;let Q=c(w);const X=Q.write(L,v);return X!==w&&(Q=Q.slice(0,X)),Q}function x(L){const v=L.length<0?0:R(L.length)|0,w=c(v);for(let Q=0;Q<v;Q+=1)w[Q]=L[Q]&255;return w}function S(L){if(Ee(L,Uint8Array)){const v=new Uint8Array(L);return N(v.buffer,v.byteOffset,v.byteLength)}return x(L)}function N(L,v,w){if(v<0||L.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(L.byteLength<v+(w||0))throw new RangeError('"length" is outside of buffer bounds');let Q;return v===void 0&&w===void 0?Q=new Uint8Array(L):w===void 0?Q=new Uint8Array(L,v):Q=new Uint8Array(L,v,w),Object.setPrototypeOf(Q,d.prototype),Q}function B(L){if(d.isBuffer(L)){const v=R(L.length)|0,w=c(v);return w.length===0||L.copy(w,0,0,v),w}if(L.length!==void 0)return typeof L.length!="number"||Oe(L.length)?c(0):x(L);if(L.type==="Buffer"&&Array.isArray(L.data))return x(L.data)}function R(L){if(L>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return L|0}function M(L){return+L!=L&&(L=0),d.alloc(+L)}d.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==d.prototype},d.compare=function(v,w){if(Ee(v,Uint8Array)&&(v=d.from(v,v.offset,v.byteLength)),Ee(w,Uint8Array)&&(w=d.from(w,w.offset,w.byteLength)),!d.isBuffer(v)||!d.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===w)return 0;let Q=v.length,X=w.length;for(let ue=0,we=Math.min(Q,X);ue<we;++ue)if(v[ue]!==w[ue]){Q=v[ue],X=w[ue];break}return Q<X?-1:X<Q?1:0},d.isEncoding=function(v){switch(String(v).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.concat=function(v,w){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return d.alloc(0);let Q;if(w===void 0)for(w=0,Q=0;Q<v.length;++Q)w+=v[Q].length;const X=d.allocUnsafe(w);let ue=0;for(Q=0;Q<v.length;++Q){let we=v[Q];if(Ee(we,Uint8Array))ue+we.length>X.length?(d.isBuffer(we)||(we=d.from(we)),we.copy(X,ue)):Uint8Array.prototype.set.call(X,we,ue);else if(d.isBuffer(we))we.copy(X,ue);else throw new TypeError('"list" argument must be an Array of Buffers');ue+=we.length}return X};function O(L,v){if(d.isBuffer(L))return L.length;if(ArrayBuffer.isView(L)||Ee(L,ArrayBuffer))return L.byteLength;if(typeof L!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof L);const w=L.length,Q=arguments.length>2&&arguments[2]===!0;if(!Q&&w===0)return 0;let X=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return je(L).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return K(L).length;default:if(X)return Q?-1:je(L).length;v=(""+v).toLowerCase(),X=!0}}d.byteLength=O;function z(L,v,w){let Q=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,v>>>=0,w<=v))return"";for(L||(L="utf8");;)switch(L){case"hex":return xe(this,v,w);case"utf8":case"utf-8":return ce(this,v,w);case"ascii":return oe(this,v,w);case"latin1":case"binary":return Ae(this,v,w);case"base64":return se(this,v,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,v,w);default:if(Q)throw new TypeError("Unknown encoding: "+L);L=(L+"").toLowerCase(),Q=!0}}d.prototype._isBuffer=!0;function H(L,v,w){const Q=L[v];L[v]=L[w],L[w]=Q}d.prototype.swap16=function(){const v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<v;w+=2)H(this,w,w+1);return this},d.prototype.swap32=function(){const v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<v;w+=4)H(this,w,w+3),H(this,w+1,w+2);return this},d.prototype.swap64=function(){const v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<v;w+=8)H(this,w,w+7),H(this,w+1,w+6),H(this,w+2,w+5),H(this,w+3,w+4);return this},d.prototype.toString=function(){const v=this.length;return v===0?"":arguments.length===0?ce(this,0,v):z.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(v){if(!d.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:d.compare(this,v)===0},d.prototype.inspect=function(){let v="";const w=n.INSPECT_MAX_BYTES;return v=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(v+=" ... "),"<Buffer "+v+">"},i&&(d.prototype[i]=d.prototype.inspect),d.prototype.compare=function(v,w,Q,X,ue){if(Ee(v,Uint8Array)&&(v=d.from(v,v.offset,v.byteLength)),!d.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(w===void 0&&(w=0),Q===void 0&&(Q=v?v.length:0),X===void 0&&(X=0),ue===void 0&&(ue=this.length),w<0||Q>v.length||X<0||ue>this.length)throw new RangeError("out of range index");if(X>=ue&&w>=Q)return 0;if(X>=ue)return-1;if(w>=Q)return 1;if(w>>>=0,Q>>>=0,X>>>=0,ue>>>=0,this===v)return 0;let we=ue-X,Ne=Q-w;const it=Math.min(we,Ne),lt=this.slice(X,ue),vt=v.slice(w,Q);for(let dt=0;dt<it;++dt)if(lt[dt]!==vt[dt]){we=lt[dt],Ne=vt[dt];break}return we<Ne?-1:Ne<we?1:0};function V(L,v,w,Q,X){if(L.length===0)return-1;if(typeof w=="string"?(Q=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,Oe(w)&&(w=X?0:L.length-1),w<0&&(w=L.length+w),w>=L.length){if(X)return-1;w=L.length-1}else if(w<0)if(X)w=0;else return-1;if(typeof v=="string"&&(v=d.from(v,Q)),d.isBuffer(v))return v.length===0?-1:ee(L,v,w,Q,X);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(L,v,w):Uint8Array.prototype.lastIndexOf.call(L,v,w):ee(L,[v],w,Q,X);throw new TypeError("val must be string, number or Buffer")}function ee(L,v,w,Q,X){let ue=1,we=L.length,Ne=v.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(L.length<2||v.length<2)return-1;ue=2,we/=2,Ne/=2,w/=2}function it(vt,dt){return ue===1?vt[dt]:vt.readUInt16BE(dt*ue)}let lt;if(X){let vt=-1;for(lt=w;lt<we;lt++)if(it(L,lt)===it(v,vt===-1?0:lt-vt)){if(vt===-1&&(vt=lt),lt-vt+1===Ne)return vt*ue}else vt!==-1&&(lt-=lt-vt),vt=-1}else for(w+Ne>we&&(w=we-Ne),lt=w;lt>=0;lt--){let vt=!0;for(let dt=0;dt<Ne;dt++)if(it(L,lt+dt)!==it(v,dt)){vt=!1;break}if(vt)return lt}return-1}d.prototype.includes=function(v,w,Q){return this.indexOf(v,w,Q)!==-1},d.prototype.indexOf=function(v,w,Q){return V(this,v,w,Q,!0)},d.prototype.lastIndexOf=function(v,w,Q){return V(this,v,w,Q,!1)};function q(L,v,w,Q){w=Number(w)||0;const X=L.length-w;Q?(Q=Number(Q),Q>X&&(Q=X)):Q=X;const ue=v.length;Q>ue/2&&(Q=ue/2);let we;for(we=0;we<Q;++we){const Ne=parseInt(v.substr(we*2,2),16);if(Oe(Ne))return we;L[w+we]=Ne}return we}function J(L,v,w,Q){return ie(je(v,L.length-w),L,w,Q)}function Z(L,v,w,Q){return ie(et(v),L,w,Q)}function $(L,v,w,Q){return ie(K(v),L,w,Q)}function ge(L,v,w,Q){return ie(ft(v,L.length-w),L,w,Q)}d.prototype.write=function(v,w,Q,X){if(w===void 0)X="utf8",Q=this.length,w=0;else if(Q===void 0&&typeof w=="string")X=w,Q=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(Q)?(Q=Q>>>0,X===void 0&&(X="utf8")):(X=Q,Q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ue=this.length-w;if((Q===void 0||Q>ue)&&(Q=ue),v.length>0&&(Q<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");X||(X="utf8");let we=!1;for(;;)switch(X){case"hex":return q(this,v,w,Q);case"utf8":case"utf-8":return J(this,v,w,Q);case"ascii":case"latin1":case"binary":return Z(this,v,w,Q);case"base64":return $(this,v,w,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,v,w,Q);default:if(we)throw new TypeError("Unknown encoding: "+X);X=(""+X).toLowerCase(),we=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(L,v,w){return v===0&&w===L.length?t.fromByteArray(L):t.fromByteArray(L.slice(v,w))}function ce(L,v,w){w=Math.min(L.length,w);const Q=[];let X=v;for(;X<w;){const ue=L[X];let we=null,Ne=ue>239?4:ue>223?3:ue>191?2:1;if(X+Ne<=w){let it,lt,vt,dt;switch(Ne){case 1:ue<128&&(we=ue);break;case 2:it=L[X+1],(it&192)===128&&(dt=(ue&31)<<6|it&63,dt>127&&(we=dt));break;case 3:it=L[X+1],lt=L[X+2],(it&192)===128&&(lt&192)===128&&(dt=(ue&15)<<12|(it&63)<<6|lt&63,dt>2047&&(dt<55296||dt>57343)&&(we=dt));break;case 4:it=L[X+1],lt=L[X+2],vt=L[X+3],(it&192)===128&&(lt&192)===128&&(vt&192)===128&&(dt=(ue&15)<<18|(it&63)<<12|(lt&63)<<6|vt&63,dt>65535&&dt<1114112&&(we=dt))}}we===null?(we=65533,Ne=1):we>65535&&(we-=65536,Q.push(we>>>10&1023|55296),we=56320|we&1023),Q.push(we),X+=Ne}return G(Q)}const ne=4096;function G(L){const v=L.length;if(v<=ne)return String.fromCharCode.apply(String,L);let w="",Q=0;for(;Q<v;)w+=String.fromCharCode.apply(String,L.slice(Q,Q+=ne));return w}function oe(L,v,w){let Q="";w=Math.min(L.length,w);for(let X=v;X<w;++X)Q+=String.fromCharCode(L[X]&127);return Q}function Ae(L,v,w){let Q="";w=Math.min(L.length,w);for(let X=v;X<w;++X)Q+=String.fromCharCode(L[X]);return Q}function xe(L,v,w){const Q=L.length;(!v||v<0)&&(v=0),(!w||w<0||w>Q)&&(w=Q);let X="";for(let ue=v;ue<w;++ue)X+=Ue[L[ue]];return X}function P(L,v,w){const Q=L.slice(v,w);let X="";for(let ue=0;ue<Q.length-1;ue+=2)X+=String.fromCharCode(Q[ue]+Q[ue+1]*256);return X}d.prototype.slice=function(v,w){const Q=this.length;v=~~v,w=w===void 0?Q:~~w,v<0?(v+=Q,v<0&&(v=0)):v>Q&&(v=Q),w<0?(w+=Q,w<0&&(w=0)):w>Q&&(w=Q),w<v&&(w=v);const X=this.subarray(v,w);return Object.setPrototypeOf(X,d.prototype),X};function te(L,v,w){if(L%1!==0||L<0)throw new RangeError("offset is not uint");if(L+v>w)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(v,w,Q){v=v>>>0,w=w>>>0,Q||te(v,w,this.length);let X=this[v],ue=1,we=0;for(;++we<w&&(ue*=256);)X+=this[v+we]*ue;return X},d.prototype.readUintBE=d.prototype.readUIntBE=function(v,w,Q){v=v>>>0,w=w>>>0,Q||te(v,w,this.length);let X=this[v+--w],ue=1;for(;w>0&&(ue*=256);)X+=this[v+--w]*ue;return X},d.prototype.readUint8=d.prototype.readUInt8=function(v,w){return v=v>>>0,w||te(v,1,this.length),this[v]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(v,w){return v=v>>>0,w||te(v,2,this.length),this[v]|this[v+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(v,w){return v=v>>>0,w||te(v,2,this.length),this[v]<<8|this[v+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(v,w){return v=v>>>0,w||te(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(v,w){return v=v>>>0,w||te(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},d.prototype.readBigUInt64LE=Le(function(v){v=v>>>0,At(v,"offset");const w=this[v],Q=this[v+7];(w===void 0||Q===void 0)&&Et(v,this.length-8);const X=w+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24,ue=this[++v]+this[++v]*2**8+this[++v]*2**16+Q*2**24;return BigInt(X)+(BigInt(ue)<<BigInt(32))}),d.prototype.readBigUInt64BE=Le(function(v){v=v>>>0,At(v,"offset");const w=this[v],Q=this[v+7];(w===void 0||Q===void 0)&&Et(v,this.length-8);const X=w*2**24+this[++v]*2**16+this[++v]*2**8+this[++v],ue=this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+Q;return(BigInt(X)<<BigInt(32))+BigInt(ue)}),d.prototype.readIntLE=function(v,w,Q){v=v>>>0,w=w>>>0,Q||te(v,w,this.length);let X=this[v],ue=1,we=0;for(;++we<w&&(ue*=256);)X+=this[v+we]*ue;return ue*=128,X>=ue&&(X-=Math.pow(2,8*w)),X},d.prototype.readIntBE=function(v,w,Q){v=v>>>0,w=w>>>0,Q||te(v,w,this.length);let X=w,ue=1,we=this[v+--X];for(;X>0&&(ue*=256);)we+=this[v+--X]*ue;return ue*=128,we>=ue&&(we-=Math.pow(2,8*w)),we},d.prototype.readInt8=function(v,w){return v=v>>>0,w||te(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},d.prototype.readInt16LE=function(v,w){v=v>>>0,w||te(v,2,this.length);const Q=this[v]|this[v+1]<<8;return Q&32768?Q|4294901760:Q},d.prototype.readInt16BE=function(v,w){v=v>>>0,w||te(v,2,this.length);const Q=this[v+1]|this[v]<<8;return Q&32768?Q|4294901760:Q},d.prototype.readInt32LE=function(v,w){return v=v>>>0,w||te(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},d.prototype.readInt32BE=function(v,w){return v=v>>>0,w||te(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},d.prototype.readBigInt64LE=Le(function(v){v=v>>>0,At(v,"offset");const w=this[v],Q=this[v+7];(w===void 0||Q===void 0)&&Et(v,this.length-8);const X=this[v+4]+this[v+5]*2**8+this[v+6]*2**16+(Q<<24);return(BigInt(X)<<BigInt(32))+BigInt(w+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24)}),d.prototype.readBigInt64BE=Le(function(v){v=v>>>0,At(v,"offset");const w=this[v],Q=this[v+7];(w===void 0||Q===void 0)&&Et(v,this.length-8);const X=(w<<24)+this[++v]*2**16+this[++v]*2**8+this[++v];return(BigInt(X)<<BigInt(32))+BigInt(this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+Q)}),d.prototype.readFloatLE=function(v,w){return v=v>>>0,w||te(v,4,this.length),r.read(this,v,!0,23,4)},d.prototype.readFloatBE=function(v,w){return v=v>>>0,w||te(v,4,this.length),r.read(this,v,!1,23,4)},d.prototype.readDoubleLE=function(v,w){return v=v>>>0,w||te(v,8,this.length),r.read(this,v,!0,52,8)},d.prototype.readDoubleBE=function(v,w){return v=v>>>0,w||te(v,8,this.length),r.read(this,v,!1,52,8)};function pe(L,v,w,Q,X,ue){if(!d.isBuffer(L))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>X||v<ue)throw new RangeError('"value" argument is out of bounds');if(w+Q>L.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(v,w,Q,X){if(v=+v,w=w>>>0,Q=Q>>>0,!X){const Ne=Math.pow(2,8*Q)-1;pe(this,v,w,Q,Ne,0)}let ue=1,we=0;for(this[w]=v&255;++we<Q&&(ue*=256);)this[w+we]=v/ue&255;return w+Q},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(v,w,Q,X){if(v=+v,w=w>>>0,Q=Q>>>0,!X){const Ne=Math.pow(2,8*Q)-1;pe(this,v,w,Q,Ne,0)}let ue=Q-1,we=1;for(this[w+ue]=v&255;--ue>=0&&(we*=256);)this[w+ue]=v/we&255;return w+Q},d.prototype.writeUint8=d.prototype.writeUInt8=function(v,w,Q){return v=+v,w=w>>>0,Q||pe(this,v,w,1,255,0),this[w]=v&255,w+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(v,w,Q){return v=+v,w=w>>>0,Q||pe(this,v,w,2,65535,0),this[w]=v&255,this[w+1]=v>>>8,w+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(v,w,Q){return v=+v,w=w>>>0,Q||pe(this,v,w,2,65535,0),this[w]=v>>>8,this[w+1]=v&255,w+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(v,w,Q){return v=+v,w=w>>>0,Q||pe(this,v,w,4,4294967295,0),this[w+3]=v>>>24,this[w+2]=v>>>16,this[w+1]=v>>>8,this[w]=v&255,w+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(v,w,Q){return v=+v,w=w>>>0,Q||pe(this,v,w,4,4294967295,0),this[w]=v>>>24,this[w+1]=v>>>16,this[w+2]=v>>>8,this[w+3]=v&255,w+4};function Ce(L,v,w,Q,X){Nt(v,Q,X,L,w,7);let ue=Number(v&BigInt(4294967295));L[w++]=ue,ue=ue>>8,L[w++]=ue,ue=ue>>8,L[w++]=ue,ue=ue>>8,L[w++]=ue;let we=Number(v>>BigInt(32)&BigInt(4294967295));return L[w++]=we,we=we>>8,L[w++]=we,we=we>>8,L[w++]=we,we=we>>8,L[w++]=we,w}function Me(L,v,w,Q,X){Nt(v,Q,X,L,w,7);let ue=Number(v&BigInt(4294967295));L[w+7]=ue,ue=ue>>8,L[w+6]=ue,ue=ue>>8,L[w+5]=ue,ue=ue>>8,L[w+4]=ue;let we=Number(v>>BigInt(32)&BigInt(4294967295));return L[w+3]=we,we=we>>8,L[w+2]=we,we=we>>8,L[w+1]=we,we=we>>8,L[w]=we,w+8}d.prototype.writeBigUInt64LE=Le(function(v,w=0){return Ce(this,v,w,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=Le(function(v,w=0){return Me(this,v,w,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(v,w,Q,X){if(v=+v,w=w>>>0,!X){const it=Math.pow(2,8*Q-1);pe(this,v,w,Q,it-1,-it)}let ue=0,we=1,Ne=0;for(this[w]=v&255;++ue<Q&&(we*=256);)v<0&&Ne===0&&this[w+ue-1]!==0&&(Ne=1),this[w+ue]=(v/we>>0)-Ne&255;return w+Q},d.prototype.writeIntBE=function(v,w,Q,X){if(v=+v,w=w>>>0,!X){const it=Math.pow(2,8*Q-1);pe(this,v,w,Q,it-1,-it)}let ue=Q-1,we=1,Ne=0;for(this[w+ue]=v&255;--ue>=0&&(we*=256);)v<0&&Ne===0&&this[w+ue+1]!==0&&(Ne=1),this[w+ue]=(v/we>>0)-Ne&255;return w+Q},d.prototype.writeInt8=function(v,w,Q){return v=+v,w=w>>>0,Q||pe(this,v,w,1,127,-128),v<0&&(v=255+v+1),this[w]=v&255,w+1},d.prototype.writeInt16LE=function(v,w,Q){return v=+v,w=w>>>0,Q||pe(this,v,w,2,32767,-32768),this[w]=v&255,this[w+1]=v>>>8,w+2},d.prototype.writeInt16BE=function(v,w,Q){return v=+v,w=w>>>0,Q||pe(this,v,w,2,32767,-32768),this[w]=v>>>8,this[w+1]=v&255,w+2},d.prototype.writeInt32LE=function(v,w,Q){return v=+v,w=w>>>0,Q||pe(this,v,w,4,2147483647,-2147483648),this[w]=v&255,this[w+1]=v>>>8,this[w+2]=v>>>16,this[w+3]=v>>>24,w+4},d.prototype.writeInt32BE=function(v,w,Q){return v=+v,w=w>>>0,Q||pe(this,v,w,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[w]=v>>>24,this[w+1]=v>>>16,this[w+2]=v>>>8,this[w+3]=v&255,w+4},d.prototype.writeBigInt64LE=Le(function(v,w=0){return Ce(this,v,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=Le(function(v,w=0){return Me(this,v,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ge(L,v,w,Q,X,ue){if(w+Q>L.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function Qe(L,v,w,Q,X){return v=+v,w=w>>>0,X||Ge(L,v,w,4),r.write(L,v,w,Q,23,4),w+4}d.prototype.writeFloatLE=function(v,w,Q){return Qe(this,v,w,!0,Q)},d.prototype.writeFloatBE=function(v,w,Q){return Qe(this,v,w,!1,Q)};function ot(L,v,w,Q,X){return v=+v,w=w>>>0,X||Ge(L,v,w,8),r.write(L,v,w,Q,52,8),w+8}d.prototype.writeDoubleLE=function(v,w,Q){return ot(this,v,w,!0,Q)},d.prototype.writeDoubleBE=function(v,w,Q){return ot(this,v,w,!1,Q)},d.prototype.copy=function(v,w,Q,X){if(!d.isBuffer(v))throw new TypeError("argument should be a Buffer");if(Q||(Q=0),!X&&X!==0&&(X=this.length),w>=v.length&&(w=v.length),w||(w=0),X>0&&X<Q&&(X=Q),X===Q||v.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(Q<0||Q>=this.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("sourceEnd out of bounds");X>this.length&&(X=this.length),v.length-w<X-Q&&(X=v.length-w+Q);const ue=X-Q;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(w,Q,X):Uint8Array.prototype.set.call(v,this.subarray(Q,X),w),ue},d.prototype.fill=function(v,w,Q,X){if(typeof v=="string"){if(typeof w=="string"?(X=w,w=0,Q=this.length):typeof Q=="string"&&(X=Q,Q=this.length),X!==void 0&&typeof X!="string")throw new TypeError("encoding must be a string");if(typeof X=="string"&&!d.isEncoding(X))throw new TypeError("Unknown encoding: "+X);if(v.length===1){const we=v.charCodeAt(0);(X==="utf8"&&we<128||X==="latin1")&&(v=we)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(w<0||this.length<w||this.length<Q)throw new RangeError("Out of range index");if(Q<=w)return this;w=w>>>0,Q=Q===void 0?this.length:Q>>>0,v||(v=0);let ue;if(typeof v=="number")for(ue=w;ue<Q;++ue)this[ue]=v;else{const we=d.isBuffer(v)?v:d.from(v,X),Ne=we.length;if(Ne===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(ue=0;ue<Q-w;++ue)this[ue+w]=we[ue%Ne]}return this};const Je={};function Ze(L,v,w){Je[L]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:v.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${L}]`,this.stack,delete this.name}get code(){return L}set code(X){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:X,writable:!0})}toString(){return`${this.name} [${L}]: ${this.message}`}}}Ze("ERR_BUFFER_OUT_OF_BOUNDS",function(L){return L?`${L} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ze("ERR_INVALID_ARG_TYPE",function(L,v){return`The "${L}" argument must be of type number. Received type ${typeof v}`},TypeError),Ze("ERR_OUT_OF_RANGE",function(L,v,w){let Q=`The value of "${L}" is out of range.`,X=w;return Number.isInteger(w)&&Math.abs(w)>2**32?X=yt(String(w)):typeof w=="bigint"&&(X=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(X=yt(X)),X+="n"),Q+=` It must be ${v}. Received ${X}`,Q},RangeError);function yt(L){let v="",w=L.length;const Q=L[0]==="-"?1:0;for(;w>=Q+4;w-=3)v=`_${L.slice(w-3,w)}${v}`;return`${L.slice(0,w)}${v}`}function ta(L,v,w){At(v,"offset"),(L[v]===void 0||L[v+w]===void 0)&&Et(v,L.length-(w+1))}function Nt(L,v,w,Q,X,ue){if(L>w||L<v){const we=typeof v=="bigint"?"n":"";let Ne;throw v===0||v===BigInt(0)?Ne=`>= 0${we} and < 2${we} ** ${(ue+1)*8}${we}`:Ne=`>= -(2${we} ** ${(ue+1)*8-1}${we}) and < 2 ** ${(ue+1)*8-1}${we}`,new Je.ERR_OUT_OF_RANGE("value",Ne,L)}ta(Q,X,ue)}function At(L,v){if(typeof L!="number")throw new Je.ERR_INVALID_ARG_TYPE(v,"number",L)}function Et(L,v,w){throw Math.floor(L)!==L?(At(L,w),new Je.ERR_OUT_OF_RANGE("offset","an integer",L)):v<0?new Je.ERR_BUFFER_OUT_OF_BOUNDS:new Je.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${v}`,L)}const Ht=/[^+/0-9A-Za-z-_]/g;function Se(L){if(L=L.split("=")[0],L=L.trim().replace(Ht,""),L.length<2)return"";for(;L.length%4!==0;)L=L+"=";return L}function je(L,v){v=v||1/0;let w;const Q=L.length;let X=null;const ue=[];for(let we=0;we<Q;++we){if(w=L.charCodeAt(we),w>55295&&w<57344){if(!X){if(w>56319){(v-=3)>-1&&ue.push(239,191,189);continue}else if(we+1===Q){(v-=3)>-1&&ue.push(239,191,189);continue}X=w;continue}if(w<56320){(v-=3)>-1&&ue.push(239,191,189),X=w;continue}w=(X-55296<<10|w-56320)+65536}else X&&(v-=3)>-1&&ue.push(239,191,189);if(X=null,w<128){if((v-=1)<0)break;ue.push(w)}else if(w<2048){if((v-=2)<0)break;ue.push(w>>6|192,w&63|128)}else if(w<65536){if((v-=3)<0)break;ue.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((v-=4)<0)break;ue.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return ue}function et(L){const v=[];for(let w=0;w<L.length;++w)v.push(L.charCodeAt(w)&255);return v}function ft(L,v){let w,Q,X;const ue=[];for(let we=0;we<L.length&&!((v-=2)<0);++we)w=L.charCodeAt(we),Q=w>>8,X=w%256,ue.push(X),ue.push(Q);return ue}function K(L){return t.toByteArray(Se(L))}function ie(L,v,w,Q){let X;for(X=0;X<Q&&!(X+w>=v.length||X>=L.length);++X)v[X+w]=L[X];return X}function Ee(L,v){return L instanceof v||L!=null&&L.constructor!=null&&L.constructor.name!=null&&L.constructor.name===v.name}function Oe(L){return L!==L}const Ue=function(){const L="0123456789abcdef",v=new Array(256);for(let w=0;w<16;++w){const Q=w*16;for(let X=0;X<16;++X)v[Q+X]=L[w]+L[X]}return v}();function Le(L){return typeof BigInt>"u"?ze:L}function ze(){throw new Error("BigInt not supported")}}(WA)),WA}var ls=ex(),Gu={exports:{}},tx=Gu.exports,Y0;function ax(){return Y0||(Y0=1,function(n,t){(function(r,i){n.exports=i()})(tx,function(){return(()=>{var r,i,o={773:(d,m,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,S,N,B;x=typeof window=="object",S=typeof importScripts=="function",N=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",B=!x&&!N&&!S;var R,M,O,z,H,V="";N?(V=S?h(967).dirname(V)+"/":"//",R=function(Se,je){return z||(z=h(145)),H||(H=h(967)),Se=H.normalize(Se),z.readFileSync(Se,je?null:"utf8")},O=function(Se){var je=R(Se,!0);return je.buffer||(je=new Uint8Array(je)),$(je.buffer),je},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),d.exports=E,process.on("uncaughtException",function(Se){if(!(Se instanceof Et))throw Se}),process.on("unhandledRejection",pe),E.inspect=function(){return"[Emscripten Module object]"}):B?(typeof read<"u"&&(R=function(Se){return read(Se)}),O=function(Se){var je;return typeof readbuffer=="function"?new Uint8Array(readbuffer(Se)):($(typeof(je=read(Se,"binary"))=="object"),je)},typeof scriptArgs<"u"&&scriptArgs,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(x||S)&&(S?V=self.location.href:typeof document<"u"&&document.currentScript&&(V=document.currentScript.src),V=V.indexOf("blob:")!==0?V.substr(0,V.lastIndexOf("/")+1):"",R=function(Se){var je=new XMLHttpRequest;return je.open("GET",Se,!1),je.send(null),je.responseText},S&&(O=function(Se){var je=new XMLHttpRequest;return je.open("GET",Se,!1),je.responseType="arraybuffer",je.send(null),new Uint8Array(je.response)}),M=function(Se,je,et){var ft=new XMLHttpRequest;ft.open("GET",Se,!0),ft.responseType="arraybuffer",ft.onload=function(){ft.status==200||ft.status==0&&ft.response?je(ft.response):et()},ft.onerror=et,ft.send(null)}),E.print||console.log.bind(console);var ee,q,J=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&&(ee=E.wasmBinary),E.noExitRuntime,typeof WebAssembly!="object"&&pe("no native wasm support detected");var Z=!1;function $(Se,je){Se||pe("Assertion failed: "+je)}var ge,se,ce=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function ne(Se){ge=Se,E.HEAP8=new Int8Array(Se),E.HEAP16=new Int16Array(Se),E.HEAP32=new Int32Array(Se),E.HEAPU8=se=new Uint8Array(Se),E.HEAPU16=new Uint16Array(Se),E.HEAPU32=new Uint32Array(Se),E.HEAPF32=new Float32Array(Se),E.HEAPF64=new Float64Array(Se)}E.INITIAL_MEMORY;var G,oe=[],Ae=[],xe=[],P=0,te=null;function pe(Se){throw E.onAbort&&E.onAbort(Se),J(Se+=""),Z=!0,Se="abort("+Se+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(Se)}function Ce(Se){return Se.startsWith("data:application/octet-stream;base64,")}function Me(Se){return Se.startsWith("file://")}E.preloadedImages={},E.preloadedAudios={};var Ge,Qe="argon2.wasm";function ot(Se){try{if(Se==Qe&&ee)return new Uint8Array(ee);if(O)return O(Se);throw"both async and sync fetching of the wasm failed"}catch(je){pe(je)}}function Je(Se){for(;Se.length>0;){var je=Se.shift();if(typeof je!="function"){var et=je.func;typeof et=="number"?je.arg===void 0?G.get(et)():G.get(et)(je.arg):et(je.arg===void 0?null:je.arg)}else je(E)}}function Ze(Se){try{return q.grow(Se-ge.byteLength+65535>>>16),ne(q.buffer),1}catch{}}Ce(Qe)||(Ge=Qe,Qe=E.locateFile?E.locateFile(Ge,V):V+Ge);var yt,ta={a:function(Se,je,et){se.copyWithin(Se,je,je+et)},b:function(Se){var je,et=se.length,ft=2147418112;if((Se>>>=0)>ft)return!1;for(var K=1;K<=4;K*=2){var ie=et*(1+.2/K);if(ie=Math.min(ie,Se+100663296),Ze(Math.min(ft,((je=Math.max(Se,ie))%65536>0&&(je+=65536-je%65536),je))))return!0}return!1}},Nt=(function(){var Se={a:ta};function je(K,ie){var Ee,Oe=K.exports;E.asm=Oe,ne((q=E.asm.c).buffer),G=E.asm.k,Ee=E.asm.d,Ae.unshift(Ee),function(Ue){if(P--,E.monitorRunDependencies&&E.monitorRunDependencies(P),P==0&&te){var Le=te;te=null,Le()}}()}function et(K){je(K.instance)}function ft(K){return function(){if(!ee&&(x||S)){if(typeof fetch=="function"&&!Me(Qe))return fetch(Qe,{credentials:"same-origin"}).then(function(ie){if(!ie.ok)throw"failed to load wasm binary file at '"+Qe+"'";return ie.arrayBuffer()}).catch(function(){return ot(Qe)});if(M)return new Promise(function(ie,Ee){M(Qe,function(Oe){ie(new Uint8Array(Oe))},Ee)})}return Promise.resolve().then(function(){return ot(Qe)})}().then(function(ie){return WebAssembly.instantiate(ie,Se)}).then(K,function(ie){J("failed to asynchronously prepare wasm: "+ie),pe(ie)})}if(P++,E.monitorRunDependencies&&E.monitorRunDependencies(P),E.instantiateWasm)try{return E.instantiateWasm(Se,je)}catch(K){return J("Module.instantiateWasm callback failed with error: "+K),!1}ee||typeof WebAssembly.instantiateStreaming!="function"||Ce(Qe)||Me(Qe)||typeof fetch!="function"?ft(et):fetch(Qe,{credentials:"same-origin"}).then(function(K){return WebAssembly.instantiateStreaming(K,Se).then(et,function(ie){return J("wasm streaming compile failed: "+ie),J("falling back to ArrayBuffer instantiation"),ft(et)})})}(),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(Nt=E._malloc=E.asm.f).apply(null,arguments)}),At=(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(At=E.stackAlloc=E.asm.n).apply(null,arguments)});function Et(Se){this.name="ExitStatus",this.message="Program terminated with exit("+Se+")",this.status=Se}function Ht(Se){function je(){yt||(yt=!0,E.calledRun=!0,Z||(Je(Ae),E.onRuntimeInitialized&&E.onRuntimeInitialized(),function(){if(E.postRun)for(typeof E.postRun=="function"&&(E.postRun=[E.postRun]);E.postRun.length;)et=E.postRun.shift(),xe.unshift(et);var et;Je(xe)}()))}P>0||(function(){if(E.preRun)for(typeof E.preRun=="function"&&(E.preRun=[E.preRun]);E.preRun.length;)et=E.preRun.shift(),oe.unshift(et);var et;Je(oe)}(),P>0||(E.setStatus?(E.setStatus("Running..."),setTimeout(function(){setTimeout(function(){E.setStatus("")},1),je()},1)):je()))}if(E.allocate=function(Se,je){var et;return et=je==1?At(Se.length):Nt(Se.length),Se.subarray||Se.slice?se.set(Se,et):se.set(new Uint8Array(Se),et),et},E.UTF8ToString=function(Se,je){return Se?function(et,ft,K){for(var ie=ft+K,Ee=ft;et[Ee]&&!(Ee>=ie);)++Ee;if(Ee-ft>16&&et.subarray&&ce)return ce.decode(et.subarray(ft,Ee));for(var Oe="";ft<Ee;){var Ue=et[ft++];if(128&Ue){var Le=63&et[ft++];if((224&Ue)!=192){var ze=63&et[ft++];if((Ue=(240&Ue)==224?(15&Ue)<<12|Le<<6|ze:(7&Ue)<<18|Le<<12|ze<<6|63&et[ft++])<65536)Oe+=String.fromCharCode(Ue);else{var L=Ue-65536;Oe+=String.fromCharCode(55296|L>>10,56320|1023&L)}}else Oe+=String.fromCharCode((31&Ue)<<6|Le)}else Oe+=String.fromCharCode(Ue)}return Oe}(se,Se,je):""},E.ALLOC_NORMAL=0,te=function Se(){yt||Ht(),yt||(te=Se)},E.run=Ht,E.preInit)for(typeof E.preInit=="function"&&(E.preInit=[E.preInit]);E.preInit.length>0;)E.preInit.pop()();Ht(),d.exports=E,E.unloadRuntime=function(){typeof self<"u"&&delete self.Module,E=q=G=ge=se=void 0,delete d.exports}},631:function(d,m,h){var y,E;(E=typeof(y=function(){const C=typeof self<"u"?self:this,x={Argon2d:0,Argon2i:1,Argon2id:2};function S(O){if(S._promise)return S._promise;if(S._module)return Promise.resolve(S._module);let z;return z=C.process&&C.process.versions&&C.process.versions.node?N().then(H=>new Promise(V=>{H.postRun=()=>V(H)})):(C.loadArgon2WasmBinary?C.loadArgon2WasmBinary():Promise.resolve(h(721)).then(H=>function(V){const ee=atob(V),q=new Uint8Array(new ArrayBuffer(ee.length));for(let J=0;J<ee.length;J++)q[J]=ee.charCodeAt(J);return q}(H))).then(H=>function(V,ee){return new Promise(q=>(C.Module={wasmBinary:V,wasmMemory:ee,postRun(){q(Module)}},N()))}(H,O?function(V){const Z=Math.min(Math.max(Math.ceil(V*1024/65536),256)+256,32767);return new WebAssembly.Memory({initial:Z,maximum:32767})}(O):void 0)),S._promise=z,z.then(H=>(S._module=H,delete S._promise,H))}function N(){return C.loadArgon2WasmModule?C.loadArgon2WasmModule():Promise.resolve(h(773))}function B(O,z){return O.allocate(z,"i8",O.ALLOC_NORMAL)}function R(O,z){return B(O,new Uint8Array([...z,0]))}function M(O){if(typeof O!="string")return O;if(typeof TextEncoder=="function")return new TextEncoder().encode(O);if(typeof Buffer=="function")return Buffer.from(O);throw new Error("Don't know how to encode UTF8")}return{ArgonType:x,hash:function(O){const z=O.mem||1024;return S(z).then(H=>{const V=O.time||1,ee=O.parallelism||1,q=M(O.pass),J=R(H,q),Z=q.length,$=M(O.salt),ge=R(H,$),se=$.length,ce=O.type||x.Argon2d,ne=H.allocate(new Array(O.hashLen||24),"i8",H.ALLOC_NORMAL),G=O.secret?B(H,O.secret):0,oe=O.secret?O.secret.byteLength:0,Ae=O.ad?B(H,O.ad):0,xe=O.ad?O.ad.byteLength:0,P=O.hashLen||24,te=H._argon2_encodedlen(V,z,ee,se,P,ce),pe=H.allocate(new Array(te+1),"i8",H.ALLOC_NORMAL);let Ce,Me,Ge;try{Me=H._argon2_hash_ext(V,z,ee,J,Z,ge,se,ne,P,pe,te,ce,G,oe,Ae,xe,19)}catch(Qe){Ce=Qe}if(Me!==0||Ce){try{Ce||(Ce=H.UTF8ToString(H._argon2_error_message(Me)))}catch{}Ge={message:Ce,code:Me}}else{let Qe="";const ot=new Uint8Array(P);for(let Je=0;Je<P;Je++){const Ze=H.HEAP8[ne+Je];ot[Je]=Ze,Qe+=("0"+(255&Ze).toString(16)).slice(-2)}Ge={hash:ot,hashHex:Qe,encoded:H.UTF8ToString(pe)}}try{H._free(J),H._free(ge),H._free(ne),H._free(pe),Ae&&H._free(Ae),G&&H._free(G)}catch{}if(Ce)throw Ge;return Ge})},verify:function(O){return S().then(z=>{const H=M(O.pass),V=R(z,H),ee=H.length,q=O.secret?B(z,O.secret):0,J=O.secret?O.secret.byteLength:0,Z=O.ad?B(z,O.ad):0,$=O.ad?O.ad.byteLength:0,ge=R(z,M(O.encoded));let se,ce,ne,G=O.type;if(G===void 0){let oe=O.encoded.split("$")[1];oe&&(oe=oe.replace("a","A"),G=x[oe]||x.Argon2d)}try{ce=z._argon2_verify_ext(ge,V,ee,q,J,Z,$,G)}catch(oe){se=oe}if(ce||se){try{se||(se=z.UTF8ToString(z._argon2_error_message(ce)))}catch{}ne={message:se,code:ce}}try{z._free(V),z._free(ge)}catch{}if(se)throw ne;return ne})},unloadRuntime:function(){S._module&&(S._module.unloadRuntime(),delete S._promise,delete S._module)}}})=="function"?y.apply(m,[]):y)===void 0||(d.exports=E)},721:function(d,m){d.exports=" "},145:()=>{},967:()=>{}},u={};function c(d){var m=u[d];if(m!==void 0)return m.exports;var h=u[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,m){if(1&m&&(d=this(d)),8&m||typeof d=="object"&&d&&(4&m&&d.__esModule||16&m&&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&m&&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,m)=>{for(var h in m)c.o(m,h)&&!c.o(d,h)&&Object.defineProperty(d,h,{enumerable:!0,get:m[h]})},c.o=(d,m)=>Object.prototype.hasOwnProperty.call(d,m),c.r=d=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})},c(631)})()})}(Gu)),Gu.exports}var rx=ax();const nx=Li(rx);class Jt{static async deriveKeyFromPassword(t,r,i="Argon2Id",o='{"Iterations":2,"MemorySize":19456,"DegreeOfParallelism":1}'){const u=JSON.parse(o);try{if(i!=="Argon2Id")throw new Error("Unsupported encryption type");return(await nx.hash({pass:t,salt:r,time:u.Iterations,mem:u.MemorySize,parallelism:u.DegreeOfParallelism,hashLen:32,type:2})).hash}catch(c){throw console.error("Argon2 hashing failed:",c),c}}static async symmetricEncrypt(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),m=new Uint8Array(o.length+d.byteLength);return m.set(o,0),m.set(new Uint8Array(d),o.length),btoa(Array.from(m).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)),u=o.slice(0,12),c=o.slice(12),d=await crypto.subtle.decrypt({name:"AES-GCM",iv:u},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),u=t.slice(12),c=await crypto.subtle.decrypt({name:"AES-GCM",iv:o},i,u);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),u=await crypto.subtle.encrypt({name:"RSA-OAEP"},i,o);return btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(u))))}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)),u=await crypto.subtle.decrypt({name:"RSA-OAEP"},i,o);return new Uint8Array(u)}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 Jt.decryptWithPrivateKey(t.encryptedSymmetricKey,i.PrivateKey),u=ls.Buffer.from(o).toString("base64"),c={...t};return c.subject=await Jt.symmetricDecrypt(t.subject,u),c.fromDisplay=await Jt.symmetricDecrypt(t.fromDisplay,u),c.fromDomain=await Jt.symmetricDecrypt(t.fromDomain,u),c.fromLocal=await Jt.symmetricDecrypt(t.fromLocal,u),t.messageHtml&&(c.messageHtml=await Jt.symmetricDecrypt(t.messageHtml,u)),t.messagePlain&&(c.messagePlain=await Jt.symmetricDecrypt(t.messagePlain,u)),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(m=>m.PublicKey===i.encryptionKey);if(!o)throw new Error("Encryption key not found");const u=await Jt.decryptWithPrivateKey(i.encryptedSymmetricKey,o.PrivateKey),c=ls.Buffer.from(u).toString("base64"),d={...i};return d.subject=await Jt.symmetricDecrypt(i.subject,c),d.fromDisplay=await Jt.symmetricDecrypt(i.fromDisplay,c),d.fromDomain=await Jt.symmetricDecrypt(i.fromDomain,c),d.fromLocal=await Jt.symmetricDecrypt(i.fromLocal,c),i.messagePreview&&(d.messagePreview=await Jt.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 u=await Jt.decryptWithPrivateKey(r.encryptedSymmetricKey,o.PrivateKey),c=ls.Buffer.from(u).toString("base64");return await Jt.symmetricDecryptBytes(t,c)}catch(o){throw new Error(o instanceof Error?o.message:"Failed to decrypt attachment")}}}var XA={exports:{}};const ix={},sx=Object.freeze(Object.defineProperty({__proto__:null,default:ix},Symbol.toStringTag,{value:"Module"})),W0=vw(sx);var X0;function ox(){return X0||(X0=1,function(n,t){var r=void 0,i=function(o){return r||(r=new Promise(function(u,c){var d=typeof o<"u"?o:{},m=d.onAbort;d.onAbort=function(g){c(new Error(g)),m&&m(g)},d.postRun=d.postRun||[],d.postRun.push(function(){u(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 g(de,Re){switch(typeof Re){case"boolean":qc(de,Re?1:0);break;case"number":Vc(de,Re);break;case"string":Gc(de,Re,-1,-1);break;case"object":if(Re===null)Tl(de);else if(Re.length!=null){var qe=F(Re,U);Kc(de,qe,Re.length,-1),ra(qe)}else ei(de,"Wrong API use : tried to return a value of an unknown type ("+Re+").",-1);break;default:Tl(de)}}function b(de,Re){for(var qe=[],tt=0;tt<de;tt+=1){var rt=Nt(Re+4*tt,"i32"),Bt=Sl(rt);if(Bt===1||Bt===2)rt=zc(rt);else if(Bt===3)rt=Pc(rt);else if(Bt===4){Bt=rt,rt=Fc(Bt),Bt=Hc(Bt);for(var hr=new Uint8Array(rt),ir=0;ir<rt;ir+=1)hr[ir]=Z[Bt+ir];rt=hr}else rt=null;qe.push(rt)}return qe}function T(de,Re){this.Qa=de,this.db=Re,this.Oa=1,this.lb=[]}function j(de,Re){if(this.db=Re,Re=ze(de)+1,this.eb=Ea(Re),this.eb===null)throw Error("Unable to allocate memory for the SQL string");L(de,$,this.eb,Re),this.kb=this.eb,this.Za=this.pb=null}function W(de){if(this.filename="dbfile_"+(4294967295*Math.random()>>>0),de!=null){var Re=this.filename,qe="/",tt=Re;if(qe&&(qe=typeof qe=="string"?qe:qn(qe),tt=Re?ft(qe+"/"+Re):qe),Re=it(!0,!0),tt=Hr(tt,Re),de){if(typeof de=="string"){qe=Array(de.length);for(var rt=0,Bt=de.length;rt<Bt;++rt)qe[rt]=de.charCodeAt(rt);de=qe}za(tt,Re|146),qe=zr(tt,577),ps(qe,de,0,de.length,0),Nr(qe),za(tt,Re)}}this.handleError(Ke(this.filename,fe)),this.db=Nt(fe,"i32"),kl(this.db),this.fb={},this.Sa={}}var fe=qt(4),ve=h.cwrap,Ke=ve("sqlite3_open","number",["string","number"]),ht=ve("sqlite3_close_v2","number",["number"]),ut=ve("sqlite3_exec","number",["number","string","number","number","number"]),Yt=ve("sqlite3_changes","number",["number"]),ka=ve("sqlite3_prepare_v2","number",["number","string","number","number","number"]),Es=ve("sqlite3_sql","string",["number"]),Fi=ve("sqlite3_normalized_sql","string",["number"]),Pi=ve("sqlite3_prepare_v2","number",["number","number","number","number","number"]),xl=ve("sqlite3_bind_text","number",["number","number","number","number","number"]),Il=ve("sqlite3_bind_blob","number",["number","number","number","number","number"]),Sc=ve("sqlite3_bind_double","number",["number","number","number"]),Tc=ve("sqlite3_bind_int","number",["number","number","number"]),uo=ve("sqlite3_bind_parameter_index","number",["number","string"]),kc=ve("sqlite3_step","number",["number"]),Bc=ve("sqlite3_errmsg","string",["number"]),Dc=ve("sqlite3_column_count","number",["number"]),Lc=ve("sqlite3_data_count","number",["number"]),Rc=ve("sqlite3_column_double","number",["number","number"]),co=ve("sqlite3_column_text","string",["number","number"]),Uc=ve("sqlite3_column_blob","number",["number","number"]),Oc=ve("sqlite3_column_bytes","number",["number","number"]),Mc=ve("sqlite3_column_type","number",["number","number"]),_c=ve("sqlite3_column_name","string",["number","number"]),Ao=ve("sqlite3_reset","number",["number"]),jc=ve("sqlite3_clear_bindings","number",["number"]),Qc=ve("sqlite3_finalize","number",["number"]),Nl=ve("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),Sl=ve("sqlite3_value_type","number",["number"]),Fc=ve("sqlite3_value_bytes","number",["number"]),Pc=ve("sqlite3_value_text","string",["number"]),Hc=ve("sqlite3_value_blob","number",["number"]),zc=ve("sqlite3_value_double","number",["number"]),Vc=ve("sqlite3_result_double","",["number","number"]),Tl=ve("sqlite3_result_null","",["number"]),Gc=ve("sqlite3_result_text","",["number","string","number","number"]),Kc=ve("sqlite3_result_blob","",["number","number","number","number"]),qc=ve("sqlite3_result_int","",["number","number"]),ei=ve("sqlite3_result_error","",["number","string","number"]),ti=ve("sqlite3_aggregate_context","number",["number","number"]),kl=ve("RegisterExtensionFunctions","number",["number"]),fo=ve("sqlite3_update_hook","number",["number","number","number"]);T.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},T.prototype.step=function(){if(!this.Qa)throw"Statement closed";this.Oa=1;var de=kc(this.Qa);switch(de){case 100:return!0;case 101:return!1;default:throw this.db.handleError(de)}},T.prototype.wb=function(de){return de==null&&(de=this.Oa,this.Oa+=1),Rc(this.Qa,de)},T.prototype.Gb=function(de){if(de==null&&(de=this.Oa,this.Oa+=1),de=co(this.Qa,de),typeof BigInt!="function")throw Error("BigInt is not supported");return BigInt(de)},T.prototype.Hb=function(de){return de==null&&(de=this.Oa,this.Oa+=1),co(this.Qa,de)},T.prototype.getBlob=function(de){de==null&&(de=this.Oa,this.Oa+=1);var Re=Oc(this.Qa,de);de=Uc(this.Qa,de);for(var qe=new Uint8Array(Re),tt=0;tt<Re;tt+=1)qe[tt]=Z[de+tt];return qe},T.prototype.get=function(de,Re){Re=Re||{},de!=null&&this.bind(de)&&this.step(),de=[];for(var qe=Lc(this.Qa),tt=0;tt<qe;tt+=1)switch(Mc(this.Qa,tt)){case 1:var rt=Re.useBigInt?this.Gb(tt):this.wb(tt);de.push(rt);break;case 2:de.push(this.wb(tt));break;case 3:de.push(this.Hb(tt));break;case 4:de.push(this.getBlob(tt));break;default:de.push(null)}return de},T.prototype.getColumnNames=function(){for(var de=[],Re=Dc(this.Qa),qe=0;qe<Re;qe+=1)de.push(_c(this.Qa,qe));return de},T.prototype.getAsObject=function(de,Re){de=this.get(de,Re),Re=this.getColumnNames();for(var qe={},tt=0;tt<Re.length;tt+=1)qe[Re[tt]]=de[tt];return qe},T.prototype.getSQL=function(){return Es(this.Qa)},T.prototype.getNormalizedSQL=function(){return Fi(this.Qa)},T.prototype.run=function(de){return de!=null&&this.bind(de),this.step(),this.reset()},T.prototype.sb=function(de,Re){Re==null&&(Re=this.Oa,this.Oa+=1),de=v(de);var qe=F(de,U);this.lb.push(qe),this.db.handleError(xl(this.Qa,Re,qe,de.length-1,0))},T.prototype.Bb=function(de,Re){Re==null&&(Re=this.Oa,this.Oa+=1);var qe=F(de,U);this.lb.push(qe),this.db.handleError(Il(this.Qa,Re,qe,de.length,0))},T.prototype.rb=function(de,Re){Re==null&&(Re=this.Oa,this.Oa+=1),this.db.handleError((de===(de|0)?Tc:Sc)(this.Qa,Re,de))},T.prototype.Eb=function(de){de==null&&(de=this.Oa,this.Oa+=1),Il(this.Qa,de,0,0,0)},T.prototype.tb=function(de,Re){switch(Re==null&&(Re=this.Oa,this.Oa+=1),typeof de){case"string":this.sb(de,Re);return;case"number":this.rb(de,Re);return;case"bigint":this.sb(de.toString(),Re);return;case"boolean":this.rb(de+0,Re);return;case"object":if(de===null){this.Eb(Re);return}if(de.length!=null){this.Bb(de,Re);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+de+")."},T.prototype.Db=function(de){var Re=this;return Object.keys(de).forEach(function(qe){var tt=uo(Re.Qa,qe);tt!==0&&Re.tb(de[qe],tt)}),!0},T.prototype.Cb=function(de){for(var Re=0;Re<de.length;Re+=1)this.tb(de[Re],Re+1);return!0},T.prototype.reset=function(){return this.freemem(),jc(this.Qa)===0&&Ao(this.Qa)===0},T.prototype.freemem=function(){for(var de;(de=this.lb.pop())!==void 0;)ra(de)},T.prototype.free=function(){this.freemem();var de=Qc(this.Qa)===0;return delete this.db.fb[this.Qa],this.Qa=0,de},j.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=Va(),Re=qt(4);Et(fe),Et(Re);try{this.db.handleError(Pi(this.db.db,this.kb,-1,fe,Re)),this.kb=Nt(Re,"i32");var qe=Nt(fe,"i32");return qe===0?(this.mb(),{done:!0}):(this.Za=new T(qe,this.db),this.db.fb[qe]=this.Za,{value:this.Za,done:!1})}catch(tt){throw this.pb=je(this.kb),this.mb(),tt}finally{Ft(de)}},j.prototype.mb=function(){ra(this.eb),this.eb=null},j.prototype.getRemainingSQL=function(){return this.pb!==null?this.pb:je(this.kb)},typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"&&(j.prototype[Symbol.iterator]=function(){return this}),W.prototype.run=function(de,Re){if(!this.db)throw"Database closed";if(Re){de=this.prepare(de,Re);try{de.step()}finally{de.free()}}else this.handleError(ut(this.db,de,0,0,fe));return this},W.prototype.exec=function(de,Re,qe){if(!this.db)throw"Database closed";var tt=Va(),rt=null;try{var Bt=xn(de),hr=qt(4);for(de=[];Nt(Bt,"i8")!==0;){Et(fe),Et(hr),this.handleError(Pi(this.db,Bt,-1,fe,hr));var ir=Nt(fe,"i32");if(Bt=Nt(hr,"i32"),ir!==0){var Ga=null;for(rt=new T(ir,this),Re!=null&&rt.bind(Re);rt.step();)Ga===null&&(Ga={columns:rt.getColumnNames(),values:[]},de.push(Ga)),Ga.values.push(rt.get(null,qe));rt.free()}}return de}catch(sr){throw rt&&rt.free(),sr}finally{Ft(tt)}},W.prototype.each=function(de,Re,qe,tt,rt){typeof Re=="function"&&(tt=qe,qe=Re,Re=void 0),de=this.prepare(de,Re);try{for(;de.step();)qe(de.getAsObject(null,rt))}finally{de.free()}if(typeof tt=="function")return tt()},W.prototype.prepare=function(de,Re){if(Et(fe),this.handleError(ka(this.db,de,-1,fe,0)),de=Nt(fe,"i32"),de===0)throw"Nothing to prepare";var qe=new T(de,this);return Re!=null&&qe.bind(Re),this.fb[de]=qe},W.prototype.iterateStatements=function(de){return new j(de,this)},W.prototype.export=function(){Object.values(this.fb).forEach(function(Re){Re.free()}),Object.values(this.Sa).forEach(_e),this.Sa={},this.handleError(ht(this.db));var de=ys(this.filename);return this.handleError(Ke(this.filename,fe)),this.db=Nt(fe,"i32"),kl(this.db),de},W.prototype.close=function(){this.db!==null&&(Object.values(this.fb).forEach(function(de){de.free()}),Object.values(this.Sa).forEach(_e),this.Sa={},this.Ya&&(_e(this.Ya),this.Ya=void 0),this.handleError(ht(this.db)),ms("/"+this.filename),this.db=null)},W.prototype.handleError=function(de){if(de===0)return null;throw de=Bc(this.db),Error(de)},W.prototype.getRowsModified=function(){return Yt(this.db)},W.prototype.create_function=function(de,Re){Object.prototype.hasOwnProperty.call(this.Sa,de)&&(_e(this.Sa[de]),delete this.Sa[de]);var qe=He(function(tt,rt,Bt){rt=b(rt,Bt);try{var hr=Re.apply(null,rt)}catch(ir){ei(tt,ir,-1);return}g(tt,hr)},"viii");return this.Sa[de]=qe,this.handleError(Nl(this.db,de,Re.length,1,0,qe,0,0,0)),this},W.prototype.create_aggregate=function(de,Re){var qe=Re.init||function(){return null},tt=Re.finalize||function(Ga){return Ga},rt=Re.step;if(!rt)throw"An aggregate function must have a step function in "+de;var Bt={};Object.hasOwnProperty.call(this.Sa,de)&&(_e(this.Sa[de]),delete this.Sa[de]),Re=de+"__finalize",Object.hasOwnProperty.call(this.Sa,Re)&&(_e(this.Sa[Re]),delete this.Sa[Re]);var hr=He(function(Ga,sr,In){var gr=ti(Ga,1);Object.hasOwnProperty.call(Bt,gr)||(Bt[gr]=qe()),sr=b(sr,In),sr=[Bt[gr]].concat(sr);try{Bt[gr]=rt.apply(null,sr)}catch(Yc){delete Bt[gr],ei(Ga,Yc,-1)}},"viii"),ir=He(function(Ga){var sr=ti(Ga,1);try{var In=tt(Bt[sr])}catch(gr){delete Bt[sr],ei(Ga,gr,-1);return}g(Ga,In),delete Bt[sr]},"vi");return this.Sa[de]=hr,this.Sa[Re]=ir,this.handleError(Nl(this.db,de,rt.length-1,1,0,0,hr,ir,0)),this},W.prototype.updateHook=function(de){this.Ya&&(fo(this.db,0,0),_e(this.Ya),this.Ya=void 0),de&&(this.Ya=He(function(Re,qe,tt,rt,Bt){switch(qe){case 18:Re="insert";break;case 23:Re="update";break;case 9:Re="delete";break;default:throw"unknown operationCode in updateHook callback: "+qe}if(tt=tt?Se($,tt):"",rt=rt?Se($,rt):"",Bt>Number.MAX_SAFE_INTEGER)throw"rowId too big to fit inside a Number";de(Re,tt,rt,Number(Bt))},"viiiij"),fo(this.db,this.Ya,0))},h.Database=W};var x={...h},S="./this.program",N=(g,b)=>{throw b},B="",R,M;if(C){var O=W0;B=__dirname+"/",M=g=>(g=Ae(g)?new URL(g):g,O.readFileSync(g)),R=async g=>(g=Ae(g)?new URL(g):g,O.readFileSync(g,void 0)),!h.thisProgram&&1<process.argv.length&&(S=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),n.exports=h,N=(g,b)=>{throw process.exitCode=g,b}}else(y||E)&&(E?B=self.location.href:typeof document<"u"&&document.currentScript&&(B=document.currentScript.src),B=B.startsWith("blob:")?"":B.slice(0,B.replace(/[?#].*/,"").lastIndexOf("/")+1),E&&(M=g=>{var b=new XMLHttpRequest;return b.open("GET",g,!1),b.responseType="arraybuffer",b.send(null),new Uint8Array(b.response)}),R=async g=>{if(Ae(g))return new Promise((T,j)=>{var W=new XMLHttpRequest;W.open("GET",g,!0),W.responseType="arraybuffer",W.onload=()=>{W.status==200||W.status==0&&W.response?T(W.response):j(W.status)},W.onerror=j,W.send(null)});var b=await fetch(g,{credentials:"same-origin"});if(b.ok)return b.arrayBuffer();throw Error(b.status+" : "+b.url)});var z=h.print||console.log.bind(console),H=h.printErr||console.error.bind(console);Object.assign(h,x),x=null,h.thisProgram&&(S=h.thisProgram);var V=h.wasmBinary,ee,q=!1,J,Z,$,ge,se,ce,ne,G,oe,Ae=g=>g.startsWith("file://");function xe(){var g=ee.buffer;h.HEAP8=Z=new Int8Array(g),h.HEAP16=ge=new Int16Array(g),h.HEAPU8=$=new Uint8Array(g),h.HEAPU16=new Uint16Array(g),h.HEAP32=se=new Int32Array(g),h.HEAPU32=ce=new Uint32Array(g),h.HEAPF32=ne=new Float32Array(g),h.HEAPF64=oe=new Float64Array(g),h.HEAP64=G=new BigInt64Array(g),h.HEAPU64=new BigUint64Array(g)}var P=0,te=null;function pe(g){var b;throw(b=h.onAbort)==null||b.call(h,g),g="Aborted("+g+")",H(g),q=!0,new WebAssembly.RuntimeError(g+". Build with -sASSERTIONS for more info.")}var Ce;async function Me(g){if(!V)try{var b=await R(g);return new Uint8Array(b)}catch{}if(g==Ce&&V)g=new Uint8Array(V);else if(M)g=M(g);else throw"both async and sync fetching of the wasm failed";return g}async function Ge(g,b){try{var T=await Me(g);return await WebAssembly.instantiate(T,b)}catch(j){H(`failed to asynchronously prepare wasm: ${j}`),pe(j)}}async function Qe(g){var b=Ce;if(!V&&typeof WebAssembly.instantiateStreaming=="function"&&!Ae(b)&&!C)try{var T=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(T,g)}catch(j){H(`wasm streaming compile failed: ${j}`),H("falling back to ArrayBuffer instantiation")}return Ge(b,g)}class ot{constructor(b){Xt(this,"name","ExitStatus");this.message=`Program terminated with exit(${b})`,this.status=b}}var Je=g=>{for(;0<g.length;)g.shift()(h)},Ze=[],yt=[],ta=()=>{var g=h.preRun.shift();yt.unshift(g)};function Nt(g,b="i8"){switch(b.endsWith("*")&&(b="*"),b){case"i1":return Z[g];case"i8":return Z[g];case"i16":return ge[g>>1];case"i32":return se[g>>2];case"i64":return G[g>>3];case"float":return ne[g>>2];case"double":return oe[g>>3];case"*":return ce[g>>2];default:pe(`invalid type for getValue: ${b}`)}}var At=h.noExitRuntime||!0;function Et(g){var b="i32";switch(b.endsWith("*")&&(b="*"),b){case"i1":Z[g]=0;break;case"i8":Z[g]=0;break;case"i16":ge[g>>1]=0;break;case"i32":se[g>>2]=0;break;case"i64":G[g>>3]=BigInt(0);break;case"float":ne[g>>2]=0;break;case"double":oe[g>>3]=0;break;case"*":ce[g>>2]=0;break;default:pe(`invalid type for setValue: ${b}`)}}var Ht=typeof TextDecoder<"u"?new TextDecoder:void 0,Se=(g,b=0,T=NaN)=>{var j=b+T;for(T=b;g[T]&&!(T>=j);)++T;if(16<T-b&&g.buffer&&Ht)return Ht.decode(g.subarray(b,T));for(j="";b<T;){var W=g[b++];if(W&128){var fe=g[b++]&63;if((W&224)==192)j+=String.fromCharCode((W&31)<<6|fe);else{var ve=g[b++]&63;W=(W&240)==224?(W&15)<<12|fe<<6|ve:(W&7)<<18|fe<<12|ve<<6|g[b++]&63,65536>W?j+=String.fromCharCode(W):(W-=65536,j+=String.fromCharCode(55296|W>>10,56320|W&1023))}}else j+=String.fromCharCode(W)}return j},je=(g,b)=>g?Se($,g,b):"",et=(g,b)=>{for(var T=0,j=g.length-1;0<=j;j--){var W=g[j];W==="."?g.splice(j,1):W===".."?(g.splice(j,1),T++):T&&(g.splice(j,1),T--)}if(b)for(;T;T--)g.unshift("..");return g},ft=g=>{var b=g.charAt(0)==="/",T=g.slice(-1)==="/";return(g=et(g.split("/").filter(j=>!!j),!b).join("/"))||b||(g="."),g&&T&&(g+="/"),(b?"/":"")+g},K=g=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(g).slice(1);return g=b[0],b=b[1],!g&&!b?".":(b&&(b=b.slice(0,-1)),g+b)},ie=g=>g&&g.match(/([^\/]+|\/)\/*$/)[1],Ee=()=>{if(C){var g=W0;return b=>g.randomFillSync(b)}return b=>crypto.getRandomValues(b)},Oe=g=>{(Oe=Ee())(g)},Ue=(...g)=>{for(var b="",T=!1,j=g.length-1;-1<=j&&!T;j--){if(T=0<=j?g[j]:"/",typeof T!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!T)return"";b=T+"/"+b,T=T.charAt(0)==="/"}return b=et(b.split("/").filter(W=>!!W),!T).join("/"),(T?"/":"")+b||"."},Le=[],ze=g=>{for(var b=0,T=0;T<g.length;++T){var j=g.charCodeAt(T);127>=j?b++:2047>=j?b+=2:55296<=j&&57343>=j?(b+=4,++T):b+=3}return b},L=(g,b,T,j)=>{if(!(0<j))return 0;var W=T;j=T+j-1;for(var fe=0;fe<g.length;++fe){var ve=g.charCodeAt(fe);if(55296<=ve&&57343>=ve){var Ke=g.charCodeAt(++fe);ve=65536+((ve&1023)<<10)|Ke&1023}if(127>=ve){if(T>=j)break;b[T++]=ve}else{if(2047>=ve){if(T+1>=j)break;b[T++]=192|ve>>6}else{if(65535>=ve){if(T+2>=j)break;b[T++]=224|ve>>12}else{if(T+3>=j)break;b[T++]=240|ve>>18,b[T++]=128|ve>>12&63}b[T++]=128|ve>>6&63}b[T++]=128|ve&63}}return b[T]=0,T-W},v=(g,b)=>{var T=Array(ze(g)+1);return g=L(g,T,0,T.length),b&&(T.length=g),T},w=[];function Q(g,b){w[g]={input:[],output:[],cb:b},Kt(g,X)}var X={open(g){var b=w[g.node.rdev];if(!b)throw new Fe(43);g.tty=b,g.seekable=!1},close(g){g.tty.cb.fsync(g.tty)},fsync(g){g.tty.cb.fsync(g.tty)},read(g,b,T,j){if(!g.tty||!g.tty.cb.xb)throw new Fe(60);for(var W=0,fe=0;fe<j;fe++){try{var ve=g.tty.cb.xb(g.tty)}catch{throw new Fe(29)}if(ve===void 0&&W===0)throw new Fe(6);if(ve==null)break;W++,b[T+fe]=ve}return W&&(g.node.atime=Date.now()),W},write(g,b,T,j){if(!g.tty||!g.tty.cb.qb)throw new Fe(60);try{for(var W=0;W<j;W++)g.tty.cb.qb(g.tty,b[T+W])}catch{throw new Fe(29)}return j&&(g.node.mtime=g.node.ctime=Date.now()),W}},ue={xb(){e:{if(!Le.length){var g=null;if(C){var b=Buffer.alloc(256),T=0,j=process.stdin.fd;try{T=O.readSync(j,b,0,256)}catch(W){if(W.toString().includes("EOF"))T=0;else throw W}0<T&&(g=b.slice(0,T).toString("utf-8"))}else typeof window<"u"&&typeof window.prompt=="function"&&(g=window.prompt("Input: "),g!==null&&(g+=`
`));if(!g){g=null;break e}Le=v(g,!0)}g=Le.shift()}return g},qb(g,b){b===null||b===10?(z(Se(g.output)),g.output=[]):b!=0&&g.output.push(b)},fsync(g){var b;0<((b=g.output)==null?void 0:b.length)&&(z(Se(g.output)),g.output=[])},Tb(){return{Ob:25856,Qb:5,Nb:191,Pb:35387,Mb:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Ub(){return 0},Vb(){return[24,80]}},we={qb(g,b){b===null||b===10?(H(Se(g.output)),g.output=[]):b!=0&&g.output.push(b)},fsync(g){var b;0<((b=g.output)==null?void 0:b.length)&&(H(Se(g.output)),g.output=[])}},Ne={Wa:null,Xa(){return Ne.createNode(null,"/",16895,0)},createNode(g,b,T,j){if((T&61440)===24576||(T&61440)===4096)throw new Fe(63);return Ne.Wa||(Ne.Wa={dir:{node:{Ta:Ne.La.Ta,Ua:Ne.La.Ua,lookup:Ne.La.lookup,hb:Ne.La.hb,rename:Ne.La.rename,unlink:Ne.La.unlink,rmdir:Ne.La.rmdir,readdir:Ne.La.readdir,symlink:Ne.La.symlink},stream:{Va:Ne.Ma.Va}},file:{node:{Ta:Ne.La.Ta,Ua:Ne.La.Ua},stream:{Va:Ne.Ma.Va,read:Ne.Ma.read,write:Ne.Ma.write,ib:Ne.Ma.ib,jb:Ne.Ma.jb}},link:{node:{Ta:Ne.La.Ta,Ua:Ne.La.Ua,readlink:Ne.La.readlink},stream:{}},ub:{node:{Ta:Ne.La.Ta,Ua:Ne.La.Ua},stream:Pr}}),T=pa(g,b,T,j),Zt(T.mode)?(T.La=Ne.Wa.dir.node,T.Ma=Ne.Wa.dir.stream,T.Na={}):(T.mode&61440)===32768?(T.La=Ne.Wa.file.node,T.Ma=Ne.Wa.file.stream,T.Ra=0,T.Na=null):(T.mode&61440)===40960?(T.La=Ne.Wa.link.node,T.Ma=Ne.Wa.link.stream):(T.mode&61440)===8192&&(T.La=Ne.Wa.ub.node,T.Ma=Ne.Wa.ub.stream),T.atime=T.mtime=T.ctime=Date.now(),g&&(g.Na[b]=T,g.atime=g.mtime=g.ctime=T.atime),T},Sb(g){return g.Na?g.Na.subarray?g.Na.subarray(0,g.Ra):new Uint8Array(g.Na):new Uint8Array(0)},La:{Ta(g){var b={};return b.dev=(g.mode&61440)===8192?g.id:1,b.ino=g.id,b.mode=g.mode,b.nlink=1,b.uid=0,b.gid=0,b.rdev=g.rdev,Zt(g.mode)?b.size=4096:(g.mode&61440)===32768?b.size=g.Ra:(g.mode&61440)===40960?b.size=g.link.length:b.size=0,b.atime=new Date(g.atime),b.mtime=new Date(g.mtime),b.ctime=new Date(g.ctime),b.blksize=4096,b.blocks=Math.ceil(b.size/b.blksize),b},Ua(g,b){for(var T of["mode","atime","mtime","ctime"])b[T]!=null&&(g[T]=b[T]);b.size!==void 0&&(b=b.size,g.Ra!=b&&(b==0?(g.Na=null,g.Ra=0):(T=g.Na,g.Na=new Uint8Array(b),T&&g.Na.set(T.subarray(0,Math.min(b,g.Ra))),g.Ra=b)))},lookup(){throw Ne.vb},hb(g,b,T,j){return Ne.createNode(g,b,T,j)},rename(g,b,T){try{var j=zt(b,T)}catch{}if(j){if(Zt(g.mode))for(var W in j.Na)throw new Fe(55);rr(j)}delete g.parent.Na[g.name],b.Na[T]=g,g.name=T,b.ctime=b.mtime=g.parent.ctime=g.parent.mtime=Date.now()},unlink(g,b){delete g.Na[b],g.ctime=g.mtime=Date.now()},rmdir(g,b){var T=zt(g,b),j;for(j in T.Na)throw new Fe(55);delete g.Na[b],g.ctime=g.mtime=Date.now()},readdir(g){return[".","..",...Object.keys(g.Na)]},symlink(g,b,T){return g=Ne.createNode(g,b,41471,0),g.link=T,g},readlink(g){if((g.mode&61440)!==40960)throw new Fe(28);return g.link}},Ma:{read(g,b,T,j,W){var fe=g.node.Na;if(W>=g.node.Ra)return 0;if(g=Math.min(g.node.Ra-W,j),8<g&&fe.subarray)b.set(fe.subarray(W,W+g),T);else for(j=0;j<g;j++)b[T+j]=fe[W+j];return g},write(g,b,T,j,W,fe){if(b.buffer===Z.buffer&&(fe=!1),!j)return 0;if(g=g.node,g.mtime=g.ctime=Date.now(),b.subarray&&(!g.Na||g.Na.subarray)){if(fe)return g.Na=b.subarray(T,T+j),g.Ra=j;if(g.Ra===0&&W===0)return g.Na=b.slice(T,T+j),g.Ra=j;if(W+j<=g.Ra)return g.Na.set(b.subarray(T,T+j),W),j}fe=W+j;var ve=g.Na?g.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=g.Na,g.Na=new Uint8Array(fe),0<g.Ra&&g.Na.set(ve.subarray(0,g.Ra),0)),g.Na.subarray&&b.subarray)g.Na.set(b.subarray(T,T+j),W);else for(fe=0;fe<j;fe++)g.Na[W+fe]=b[T+fe];return g.Ra=Math.max(g.Ra,W+j),j},Va(g,b,T){if(T===1?b+=g.position:T===2&&(g.node.mode&61440)===32768&&(b+=g.node.Ra),0>b)throw new Fe(28);return b},ib(g,b,T,j,W){if((g.node.mode&61440)!==32768)throw new Fe(43);if(g=g.node.Na,W&2||!g||g.buffer!==Z.buffer){W=!0,j=65536*Math.ceil(b/65536);var fe=Ja(65536,j);if(fe&&$.fill(0,fe,fe+j),j=fe,!j)throw new Fe(48);g&&((0<T||T+b<g.length)&&(g.subarray?g=g.subarray(T,T+b):g=Array.prototype.slice.call(g,T,T+b)),Z.set(g,j))}else W=!1,j=g.byteOffset;return{Kb:j,Ab:W}},jb(g,b,T,j){return Ne.Ma.write(g,b,0,j,T,!1),0}}},it=(g,b)=>{var T=0;return g&&(T|=365),b&&(T|=146),T},lt=null,vt={},dt=[],bn=1,Ha=null,Qr=!1,$r=!0,fs={},Fe=class{constructor(g){Xt(this,"name","ErrnoError");this.Pa=g}},hs=class{constructor(){Xt(this,"gb",{});Xt(this,"node",null)}get flags(){return this.gb.flags}set flags(g){this.gb.flags=g}get position(){return this.gb.position}set position(g){this.gb.position=g}},Ri=class{constructor(g,b,T,j){Xt(this,"La",{});Xt(this,"Ma",{});Xt(this,"ab",null);g||(g=this),this.parent=g,this.Xa=g.Xa,this.id=bn++,this.name=b,this.mode=T,this.rdev=j,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&365)===365}set read(g){g?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)===146}set write(g){g?this.mode|=146:this.mode&=-147}};function Ta(g,b={}){if(!g)throw new Fe(44);b.nb??(b.nb=!0),g.charAt(0)==="/"||(g="//"+g);var T=0;e:for(;40>T;T++){g=g.split("/").filter(Ke=>!!Ke);for(var j=lt,W="/",fe=0;fe<g.length;fe++){var ve=fe===g.length-1;if(ve&&b.parent)break;if(g[fe]!==".")if(g[fe]==="..")W=K(W),j=j.parent;else{W=ft(W+"/"+g[fe]);try{j=zt(j,g[fe])}catch(Ke){if((Ke==null?void 0:Ke.Pa)===44&&ve&&b.Jb)return{path:W};throw Ke}if(!j.ab||ve&&!b.nb||(j=j.ab.root),(j.mode&61440)===40960&&(!ve||b.$a)){if(!j.La.readlink)throw new Fe(52);j=j.La.readlink(j),j.charAt(0)==="/"||(j=K(W)+"/"+j),g=j+"/"+g.slice(fe+1).join("/");continue e}}}return{path:W,node:j}}throw new Fe(32)}function qn(g){for(var b;;){if(g===g.parent)return g=g.Xa.zb,b?g[g.length-1]!=="/"?`${g}/${b}`:g+b:g;b=b?`${g.name}/${b}`:g.name,g=g.parent}}function Ui(g,b){for(var T=0,j=0;j<b.length;j++)T=(T<<5)-T+b.charCodeAt(j)|0;return(g+T>>>0)%Ha.length}function rr(g){var b=Ui(g.parent.id,g.name);if(Ha[b]===g)Ha[b]=g.bb;else for(b=Ha[b];b;){if(b.bb===g){b.bb=g.bb;break}b=b.bb}}function zt(g,b){var T=Zt(g.mode)?(T=Zr(g,"x"))?T:g.La.lookup?0:2:54;if(T)throw new Fe(T);for(T=Ha[Ui(g.id,b)];T;T=T.bb){var j=T.name;if(T.parent.id===g.id&&j===b)return T}return g.La.lookup(g,b)}function pa(g,b,T,j){return g=new Ri(g,b,T,j),b=Ui(g.parent.id,g.name),g.bb=Ha[b],Ha[b]=g}function Zt(g){return(g&61440)===16384}function Yn(g){var b=["r","w","rw"][g&3];return g&512&&(b+="w"),b}function Zr(g,b){if($r)return 0;if(!b.includes("r")||g.mode&292){if(b.includes("w")&&!(g.mode&146)||b.includes("x")&&!(g.mode&73))return 2}else return 2;return 0}function gs(g,b){if(!Zt(g.mode))return 54;try{return zt(g,b),20}catch{}return Zr(g,"wx")}function Oi(g,b,T){try{var j=zt(g,b)}catch(W){return W.Pa}if(g=Zr(g,"wx"))return g;if(T){if(!Zt(j.mode))return 54;if(j===j.parent||qn(j)==="/")return 10}else if(Zt(j.mode))return 31;return 0}function xr(g){if(!g)throw new Fe(63);return g}function oa(g){if(g=dt[g],!g)throw new Fe(8);return g}function Fr(g,b=-1){if(g=Object.assign(new hs,g),b==-1)e:{for(b=0;4096>=b;b++)if(!dt[b])break e;throw new Fe(33)}return g.fd=b,dt[b]=g}function en(g,b=-1){var T,j;return g=Fr(g,b),(j=(T=g.Ma)==null?void 0:T.Rb)==null||j.call(T,g),g}function Xa(g,b,T){var j=g==null?void 0:g.Ma.Ua;g=j?g:b,j??(j=b.La.Ua),xr(j),j(g,T)}var Pr={open(g){var b,T;g.Ma=vt[g.node.rdev].Ma,(T=(b=g.Ma).open)==null||T.call(b,g)},Va(){throw new Fe(70)}};function Kt(g,b){vt[g]={Ma:b}}function Mi(g,b){var T=b==="/";if(T&&lt)throw new Fe(10);if(!T&&b){var j=Ta(b,{nb:!1});if(b=j.path,j=j.node,j.ab)throw new Fe(10);if(!Zt(j.mode))throw new Fe(54)}b={type:g,Wb:{},zb:b,Ib:[]},g=g.Xa(b),g.Xa=b,b.root=g,T?lt=g:j&&(j.ab=b,j.Xa&&j.Xa.Ib.push(b))}function wn(g,b,T){var j=Ta(g,{parent:!0}).node;if(g=ie(g),!g)throw new Fe(28);if(g==="."||g==="..")throw new Fe(20);var W=gs(j,g);if(W)throw new Fe(W);if(!j.La.hb)throw new Fe(63);return j.La.hb(j,g,b,T)}function Hr(g,b=438){return wn(g,b&4095|32768,0)}function ya(g,b=511){return wn(g,b&1023|16384,0)}function nr(g,b,T){typeof T>"u"&&(T=b,b=438),wn(g,b|8192,T)}function Wn(g,b){if(!Ue(g))throw new Fe(44);var T=Ta(b,{parent:!0}).node;if(!T)throw new Fe(44);b=ie(b);var j=gs(T,b);if(j)throw new Fe(j);if(!T.La.symlink)throw new Fe(63);T.La.symlink(T,b,g)}function _i(g){var b=Ta(g,{parent:!0}).node;g=ie(g);var T=zt(b,g),j=Oi(b,g,!0);if(j)throw new Fe(j);if(!b.La.rmdir)throw new Fe(63);if(T.ab)throw new Fe(10);b.La.rmdir(b,g),rr(T)}function ms(g){var b=Ta(g,{parent:!0}).node;if(!b)throw new Fe(44);g=ie(g);var T=zt(b,g),j=Oi(b,g,!1);if(j)throw new Fe(j);if(!b.La.unlink)throw new Fe(63);if(T.ab)throw new Fe(10);b.La.unlink(b,g),rr(T)}function Ir(g,b){return g=Ta(g,{$a:!b}).node,xr(g.La.Ta)(g)}function vn(g,b,T,j){Xa(g,b,{mode:T&4095|b.mode&-4096,ctime:Date.now(),Fb:j})}function za(g,b){g=typeof g=="string"?Ta(g,{$a:!0}).node:g,vn(null,g,b)}function Xn(g,b,T){if(Zt(b.mode))throw new Fe(31);if((b.mode&61440)!==32768)throw new Fe(28);var j=Zr(b,"w");if(j)throw new Fe(j);Xa(g,b,{size:T,timestamp:Date.now()})}function zr(g,b,T=438){if(g==="")throw new Fe(44);if(typeof b=="string"){var j={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if(typeof j>"u")throw Error(`Unknown file open mode: ${b}`);b=j}if(T=b&64?T&4095|32768:0,typeof g=="object")j=g;else{var W=g.endsWith("/");g=Ta(g,{$a:!(b&131072),Jb:!0}),j=g.node,g=g.path}var fe=!1;if(b&64)if(j){if(b&128)throw new Fe(20)}else{if(W)throw new Fe(31);j=wn(g,T|511,0),fe=!0}if(!j)throw new Fe(44);if((j.mode&61440)===8192&&(b&=-513),b&65536&&!Zt(j.mode))throw new Fe(54);if(!fe&&(W=j?(j.mode&61440)===40960?32:Zt(j.mode)&&(Yn(b)!=="r"||b&576)?31:Zr(j,Yn(b)):44))throw new Fe(W);return b&512&&!fe&&(W=j,W=typeof W=="string"?Ta(W,{$a:!0}).node:W,Xn(null,W,0)),b&=-131713,W=Fr({node:j,path:qn(j),flags:b,seekable:!0,position:0,Ma:j.Ma,Lb:[],error:!1}),W.Ma.open&&W.Ma.open(W),fe&&za(j,T&511),!h.logReadFiles||b&1||g in fs||(fs[g]=1),W}function Nr(g){if(g.fd===null)throw new Fe(8);g.ob&&(g.ob=null);try{g.Ma.close&&g.Ma.close(g)}catch(b){throw b}finally{dt[g.fd]=null}g.fd=null}function aa(g,b,T){if(g.fd===null)throw new Fe(8);if(!g.seekable||!g.Ma.Va)throw new Fe(70);if(T!=0&&T!=1&&T!=2)throw new Fe(28);g.position=g.Ma.Va(g,b,T),g.Lb=[]}function Jn(g,b,T,j,W){if(0>j||0>W)throw new Fe(28);if(g.fd===null)throw new Fe(8);if((g.flags&2097155)===1)throw new Fe(8);if(Zt(g.node.mode))throw new Fe(31);if(!g.Ma.read)throw new Fe(28);var fe=typeof W<"u";if(!fe)W=g.position;else if(!g.seekable)throw new Fe(70);return b=g.Ma.read(g,b,T,j,W),fe||(g.position+=b),b}function ps(g,b,T,j,W){if(0>j||0>W)throw new Fe(28);if(g.fd===null)throw new Fe(8);if((g.flags&2097155)===0)throw new Fe(8);if(Zt(g.node.mode))throw new Fe(31);if(!g.Ma.write)throw new Fe(28);g.seekable&&g.flags&1024&&aa(g,0,2);var fe=typeof W<"u";if(!fe)W=g.position;else if(!g.seekable)throw new Fe(70);return b=g.Ma.write(g,b,T,j,W,void 0),fe||(g.position+=b),b}function ys(g){var b,T=zr(g,T||0);g=Ir(g).size;var j=new Uint8Array(g);return Jn(T,j,0,g,0),b=j,Nr(T),b}function Vt(g,b,T){g=ft("/dev/"+g);var j=it(!!b,!!T);Vt.yb??(Vt.yb=64);var W=Vt.yb++<<8|0;Kt(W,{open(fe){fe.seekable=!1},close(){var fe;(fe=T==null?void 0:T.buffer)!=null&&fe.length&&T(10)},read(fe,ve,Ke,ht){for(var ut=0,Yt=0;Yt<ht;Yt++){try{var ka=b()}catch{throw new Fe(29)}if(ka===void 0&&ut===0)throw new Fe(6);if(ka==null)break;ut++,ve[Ke+Yt]=ka}return ut&&(fe.node.atime=Date.now()),ut},write(fe,ve,Ke,ht){for(var ut=0;ut<ht;ut++)try{T(ve[Ke+ut])}catch{throw new Fe(29)}return ht&&(fe.node.mtime=fe.node.ctime=Date.now()),ut}}),nr(g,j,W)}var mt={};function Ot(g,b,T){if(b.charAt(0)==="/")return b;if(g=g===-100?"/":oa(g).path,b.length==0){if(!T)throw new Fe(44);return g}return g+"/"+b}function Vr(g,b){se[g>>2]=b.dev,se[g+4>>2]=b.mode,ce[g+8>>2]=b.nlink,se[g+12>>2]=b.uid,se[g+16>>2]=b.gid,se[g+20>>2]=b.rdev,G[g+24>>3]=BigInt(b.size),se[g+32>>2]=4096,se[g+36>>2]=b.blocks;var T=b.atime.getTime(),j=b.mtime.getTime(),W=b.ctime.getTime();return G[g+40>>3]=BigInt(Math.floor(T/1e3)),ce[g+48>>2]=T%1e3*1e6,G[g+56>>3]=BigInt(Math.floor(j/1e3)),ce[g+64>>2]=j%1e3*1e6,G[g+72>>3]=BigInt(Math.floor(W/1e3)),ce[g+80>>2]=W%1e3*1e6,G[g+88>>3]=BigInt(b.ino),0}var tn=void 0,la=()=>{var g=se[+tn>>2];return tn+=4,g},$n=0,_a=[0,31,60,91,121,152,182,213,244,274,305,335],ji=[0,31,59,90,120,151,181,212,243,273,304,334],an={},Cn=g=>{var b;J=g,At||0<$n||((b=h.onExit)==null||b.call(h,g),q=!0),N(g,new ot(g))},Sr=g=>{if(!q)try{if(g(),!(At||0<$n))try{J=g=J,Cn(g)}catch(b){b instanceof ot||b=="unwind"||N(1,b)}}catch(b){b instanceof ot||b=="unwind"||N(1,b)}},Zn={},Qi=()=>{if(!Tr){var g={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:S||"./this.program"},b;for(b in Zn)Zn[b]===void 0?delete g[b]:g[b]=Zn[b];var T=[];for(b in g)T.push(`${b}=${g[b]}`);Tr=T}return Tr},Tr,xn=g=>{var b=ze(g)+1,T=qt(b);return L(g,$,T,b),T},k=(g,b,T,j)=>{var W={string:ut=>{var Yt=0;return ut!=null&&ut!==0&&(Yt=xn(ut)),Yt},array:ut=>{var Yt=qt(ut.length);return Z.set(ut,Yt),Yt}};g=h["_"+g];var fe=[],ve=0;if(j)for(var Ke=0;Ke<j.length;Ke++){var ht=W[T[Ke]];ht?(ve===0&&(ve=Va()),fe[Ke]=ht(j[Ke])):fe[Ke]=j[Ke]}return T=g(...fe),T=function(ut){return ve!==0&&Ft(ve),b==="string"?ut?Se($,ut):"":b==="boolean"?!!ut:ut}(T)},U=0,F=(g,b)=>(b=b==1?qt(g.length):Ea(g.length),g.subarray||g.slice||(g=new Uint8Array(g)),$.set(g,b),b),re,ke=[],Be,_e=g=>{re.delete(Be.get(g)),Be.set(g,null),ke.push(g)},He=(g,b)=>{if(!re){re=new WeakMap;var T=Be.length;if(re)for(var j=0;j<0+T;j++){var W=Be.get(j);W&&re.set(W,j)}}if(T=re.get(g)||0)return T;if(ke.length)T=ke.pop();else{try{Be.grow(1)}catch(ht){throw ht instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":ht}T=Be.length-1}try{Be.set(T,g)}catch(ht){if(!(ht instanceof TypeError))throw ht;if(typeof WebAssembly.Function=="function"){var fe=WebAssembly.Function;j={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},W={parameters:[],results:b[0]=="v"?[]:[j[b[0]]]};for(var ve=1;ve<b.length;++ve)W.parameters.push(j[b[ve]]);b=new fe(W,g)}else{j=[1],W=b.slice(0,1),b=b.slice(1),ve={i:127,p:127,j:126,f:125,d:124,e:111},j.push(96);var Ke=b.length;128>Ke?j.push(Ke):j.push(Ke%128|128,Ke>>7);for(fe of b)j.push(ve[fe]);W=="v"?j.push(0):j.push(1,ve[W]),b=[0,97,115,109,1,0,0,0,1],fe=j.length,128>fe?b.push(fe):b.push(fe%128|128,fe>>7),b.push(...j),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:g}}).exports.f}Be.set(T,b)}return re.set(g,T),T};Ha=Array(4096),Mi(Ne,"/"),ya("/tmp"),ya("/home"),ya("/home/web_user"),function(){ya("/dev"),Kt(259,{read:()=>0,write:(j,W,fe,ve)=>ve,Va:()=>0}),nr("/dev/null",259),Q(1280,ue),Q(1536,we),nr("/dev/tty",1280),nr("/dev/tty1",1536);var g=new Uint8Array(1024),b=0,T=()=>(b===0&&(Oe(g),b=g.byteLength),g[--b]);Vt("random",T),Vt("urandom",T),ya("/dev/shm"),ya("/dev/shm/tmp")}(),function(){ya("/proc");var g=ya("/proc/self");ya("/proc/self/fd"),Mi({Xa(){var b=pa(g,"fd",16895,73);return b.Ma={Va:Ne.Ma.Va},b.La={lookup(T,j){T=+j;var W=oa(T);return T={parent:null,Xa:{zb:"fake"},La:{readlink:()=>W.path},id:T+1},T.parent=T},readdir(){return Array.from(dt.entries()).filter(([,T])=>T).map(([T])=>T.toString())}},b}},"/proc/self/fd")}(),Ne.vb=new Fe(44),Ne.vb.stack="<generic error, no stack>";var St={a:(g,b,T,j)=>pe(`Assertion failed: ${g?Se($,g):""}, at: `+[b?b?Se($,b):"":"unknown filename",T,j?j?Se($,j):"":"unknown function"]),i:function(g,b){try{return g=g?Se($,g):"",za(g,b),0}catch(T){if(typeof mt>"u"||T.name!=="ErrnoError")throw T;return-T.Pa}},L:function(g,b,T){try{if(b=b?Se($,b):"",b=Ot(g,b),T&-8)return-28;var j=Ta(b,{$a:!0}).node;return j?(g="",T&4&&(g+="r"),T&2&&(g+="w"),T&1&&(g+="x"),g&&Zr(j,g)?-2:0):-44}catch(W){if(typeof mt>"u"||W.name!=="ErrnoError")throw W;return-W.Pa}},j:function(g,b){try{var T=oa(g);return vn(T,T.node,b,!1),0}catch(j){if(typeof mt>"u"||j.name!=="ErrnoError")throw j;return-j.Pa}},h:function(g){try{var b=oa(g);return Xa(b,b.node,{timestamp:Date.now(),Fb:!1}),0}catch(T){if(typeof mt>"u"||T.name!=="ErrnoError")throw T;return-T.Pa}},b:function(g,b,T){tn=T;try{var j=oa(g);switch(b){case 0:var W=la();if(0>W)break;for(;dt[W];)W++;return en(j,W).fd;case 1:case 2:return 0;case 3:return j.flags;case 4:return W=la(),j.flags|=W,0;case 12:return W=la(),ge[W+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(fe){if(typeof mt>"u"||fe.name!=="ErrnoError")throw fe;return-fe.Pa}},g:function(g,b){try{var T=oa(g),j=T.node,W=T.Ma.Ta;g=W?T:j,W??(W=j.La.Ta),xr(W);var fe=W(g);return Vr(b,fe)}catch(ve){if(typeof mt>"u"||ve.name!=="ErrnoError")throw ve;return-ve.Pa}},H:function(g,b){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var T=oa(g);if(0>b||(T.flags&2097155)===0)throw new Fe(28);return Xn(T,T.node,b),0}catch(j){if(typeof mt>"u"||j.name!=="ErrnoError")throw j;return-j.Pa}},G:function(g,b){try{if(b===0)return-28;var T=ze("/")+1;return b<T?-68:(L("/",$,g,b),T)}catch(j){if(typeof mt>"u"||j.name!=="ErrnoError")throw j;return-j.Pa}},K:function(g,b){try{return g=g?Se($,g):"",Vr(b,Ir(g,!0))}catch(T){if(typeof mt>"u"||T.name!=="ErrnoError")throw T;return-T.Pa}},C:function(g,b,T){try{return b=b?Se($,b):"",b=Ot(g,b),ya(b,T),0}catch(j){if(typeof mt>"u"||j.name!=="ErrnoError")throw j;return-j.Pa}},J:function(g,b,T,j){try{b=b?Se($,b):"";var W=j&256;return b=Ot(g,b,j&4096),Vr(T,W?Ir(b,!0):Ir(b))}catch(fe){if(typeof mt>"u"||fe.name!=="ErrnoError")throw fe;return-fe.Pa}},x:function(g,b,T,j){tn=j;try{b=b?Se($,b):"",b=Ot(g,b);var W=j?la():0;return zr(b,T,W).fd}catch(fe){if(typeof mt>"u"||fe.name!=="ErrnoError")throw fe;return-fe.Pa}},v:function(g,b,T,j){try{if(b=b?Se($,b):"",b=Ot(g,b),0>=j)return-28;var W=Ta(b).node;if(!W)throw new Fe(44);if(!W.La.readlink)throw new Fe(28);var fe=W.La.readlink(W),ve=Math.min(j,ze(fe)),Ke=Z[T+ve];return L(fe,$,T,j+1),Z[T+ve]=Ke,ve}catch(ht){if(typeof mt>"u"||ht.name!=="ErrnoError")throw ht;return-ht.Pa}},u:function(g){try{return g=g?Se($,g):"",_i(g),0}catch(b){if(typeof mt>"u"||b.name!=="ErrnoError")throw b;return-b.Pa}},f:function(g,b){try{return g=g?Se($,g):"",Vr(b,Ir(g))}catch(T){if(typeof mt>"u"||T.name!=="ErrnoError")throw T;return-T.Pa}},r:function(g,b,T){try{return b=b?Se($,b):"",b=Ot(g,b),T===0?ms(b):T===512?_i(b):pe("Invalid flags passed to unlinkat"),0}catch(j){if(typeof mt>"u"||j.name!=="ErrnoError")throw j;return-j.Pa}},q:function(g,b,T){try{b=b?Se($,b):"",b=Ot(g,b,!0);var j=Date.now(),W,fe;if(T){var ve=ce[T>>2]+4294967296*se[T+4>>2],Ke=se[T+8>>2];Ke==1073741823?W=j:Ke==1073741822?W=null:W=1e3*ve+Ke/1e6,T+=16,ve=ce[T>>2]+4294967296*se[T+4>>2],Ke=se[T+8>>2],Ke==1073741823?fe=j:Ke==1073741822?fe=null:fe=1e3*ve+Ke/1e6}else fe=W=j;if((fe??W)!==null){g=W;var ht=Ta(b,{$a:!0}).node;xr(ht.La.Ua)(ht,{atime:g,mtime:fe})}return 0}catch(ut){if(typeof mt>"u"||ut.name!=="ErrnoError")throw ut;return-ut.Pa}},m:()=>pe(""),l:()=>{At=!1,$n=0},A:function(g,b){g=-9007199254740992>g||9007199254740992<g?NaN:Number(g),g=new Date(1e3*g),se[b>>2]=g.getSeconds(),se[b+4>>2]=g.getMinutes(),se[b+8>>2]=g.getHours(),se[b+12>>2]=g.getDate(),se[b+16>>2]=g.getMonth(),se[b+20>>2]=g.getFullYear()-1900,se[b+24>>2]=g.getDay();var T=g.getFullYear();se[b+28>>2]=(T%4!==0||T%100===0&&T%400!==0?ji:_a)[g.getMonth()]+g.getDate()-1|0,se[b+36>>2]=-(60*g.getTimezoneOffset()),T=new Date(g.getFullYear(),6,1).getTimezoneOffset();var j=new Date(g.getFullYear(),0,1).getTimezoneOffset();se[b+32>>2]=(T!=j&&g.getTimezoneOffset()==Math.min(j,T))|0},y:function(g,b,T,j,W,fe,ve){W=-9007199254740992>W||9007199254740992<W?NaN:Number(W);try{if(isNaN(W))return 61;var Ke=oa(j);if((b&2)!==0&&(T&2)===0&&(Ke.flags&2097155)!==2)throw new Fe(2);if((Ke.flags&2097155)===1)throw new Fe(2);if(!Ke.Ma.ib)throw new Fe(43);if(!g)throw new Fe(28);var ht=Ke.Ma.ib(Ke,g,W,b,T),ut=ht.Kb;return se[fe>>2]=ht.Ab,ce[ve>>2]=ut,0}catch(Yt){if(typeof mt>"u"||Yt.name!=="ErrnoError")throw Yt;return-Yt.Pa}},z:function(g,b,T,j,W,fe){fe=-9007199254740992>fe||9007199254740992<fe?NaN:Number(fe);try{var ve=oa(W);if(T&2){if(T=fe,(ve.node.mode&61440)!==32768)throw new Fe(43);if(!(j&2)){var Ke=$.slice(g,g+b);ve.Ma.jb&&ve.Ma.jb(ve,Ke,T,b,j)}}}catch(ht){if(typeof mt>"u"||ht.name!=="ErrnoError")throw ht;return-ht.Pa}},n:(g,b)=>{if(an[g]&&(clearTimeout(an[g].id),delete an[g]),!b)return 0;var T=setTimeout(()=>{delete an[g],Sr(()=>fr(g,performance.now()))},b);return an[g]={id:T,Xb:b},0},B:(g,b,T,j)=>{var W=new Date().getFullYear(),fe=new Date(W,0,1).getTimezoneOffset();W=new Date(W,6,1).getTimezoneOffset(),ce[g>>2]=60*Math.max(fe,W),se[b>>2]=+(fe!=W),b=ve=>{var Ke=Math.abs(ve);return`UTC${0<=ve?"-":"+"}${String(Math.floor(Ke/60)).padStart(2,"0")}${String(Ke%60).padStart(2,"0")}`},g=b(fe),b=b(W),W<fe?(L(g,$,T,17),L(b,$,j,17)):(L(g,$,j,17),L(b,$,T,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:g=>{var b=$.length;if(g>>>=0,2147483648<g)return!1;for(var T=1;4>=T;T*=2){var j=b*(1+.2/T);j=Math.min(j,g+100663296);e:{j=(Math.min(2147483648,65536*Math.ceil(Math.max(g,j)/65536))-ee.buffer.byteLength+65535)/65536|0;try{ee.grow(j),xe();var W=1;break e}catch{}W=void 0}if(W)return!0}return!1},E:(g,b)=>{var T=0;return Qi().forEach((j,W)=>{var fe=b+T;for(W=ce[g+4*W>>2]=fe,fe=0;fe<j.length;++fe)Z[W++]=j.charCodeAt(fe);Z[W]=0,T+=j.length+1}),0},F:(g,b)=>{var T=Qi();ce[g>>2]=T.length;var j=0;return T.forEach(W=>j+=W.length+1),ce[b>>2]=j,0},e:function(g){try{var b=oa(g);return Nr(b),0}catch(T){if(typeof mt>"u"||T.name!=="ErrnoError")throw T;return T.Pa}},p:function(g,b){try{var T=oa(g);return Z[b]=T.tty?2:Zt(T.mode)?3:(T.mode&61440)===40960?7:4,ge[b+2>>1]=0,G[b+8>>3]=BigInt(0),G[b+16>>3]=BigInt(0),0}catch(j){if(typeof mt>"u"||j.name!=="ErrnoError")throw j;return j.Pa}},w:function(g,b,T,j){try{e:{var W=oa(g);g=b;for(var fe,ve=b=0;ve<T;ve++){var Ke=ce[g>>2],ht=ce[g+4>>2];g+=8;var ut=Jn(W,Z,Ke,ht,fe);if(0>ut){var Yt=-1;break e}if(b+=ut,ut<ht)break;typeof fe<"u"&&(fe+=ut)}Yt=b}return ce[j>>2]=Yt,0}catch(ka){if(typeof mt>"u"||ka.name!=="ErrnoError")throw ka;return ka.Pa}},D:function(g,b,T,j){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var W=oa(g);return aa(W,b,T),G[j>>3]=BigInt(W.position),W.ob&&b===0&&T===0&&(W.ob=null),0}catch(fe){if(typeof mt>"u"||fe.name!=="ErrnoError")throw fe;return fe.Pa}},I:function(g){var T;try{var b=oa(g);return(T=b.Ma)!=null&&T.fsync?b.Ma.fsync(b):0}catch(j){if(typeof mt>"u"||j.name!=="ErrnoError")throw j;return j.Pa}},t:function(g,b,T,j){try{e:{var W=oa(g);g=b;for(var fe,ve=b=0;ve<T;ve++){var Ke=ce[g>>2],ht=ce[g+4>>2];g+=8;var ut=ps(W,Z,Ke,ht,fe);if(0>ut){var Yt=-1;break e}if(b+=ut,ut<ht)break;typeof fe<"u"&&(fe+=ut)}Yt=b}return ce[j>>2]=Yt,0}catch(ka){if(typeof mt>"u"||ka.name!=="ErrnoError")throw ka;return ka.Pa}},k:Cn},Pe;(async function(){var T;function g(j){var W;return Pe=j.exports,ee=Pe.M,xe(),Be=Pe.O,P--,(W=h.monitorRunDependencies)==null||W.call(h,P),P==0&&te&&(j=te,te=null,j()),Pe}P++,(T=h.monitorRunDependencies)==null||T.call(h,P);var b={a:St};return h.instantiateWasm?new Promise(j=>{h.instantiateWasm(b,(W,fe)=>{g(W),j(W.exports)})}):(Ce??(Ce=h.locateFile?h.locateFile("sql-wasm.wasm",B):B+"sql-wasm.wasm"),g((await Qe(b)).instance))})(),h._sqlite3_free=g=>(h._sqlite3_free=Pe.P)(g),h._sqlite3_value_text=g=>(h._sqlite3_value_text=Pe.Q)(g),h._sqlite3_prepare_v2=(g,b,T,j,W)=>(h._sqlite3_prepare_v2=Pe.R)(g,b,T,j,W),h._sqlite3_step=g=>(h._sqlite3_step=Pe.S)(g),h._sqlite3_reset=g=>(h._sqlite3_reset=Pe.T)(g),h._sqlite3_exec=(g,b,T,j,W)=>(h._sqlite3_exec=Pe.U)(g,b,T,j,W),h._sqlite3_finalize=g=>(h._sqlite3_finalize=Pe.V)(g),h._sqlite3_column_name=(g,b)=>(h._sqlite3_column_name=Pe.W)(g,b),h._sqlite3_column_text=(g,b)=>(h._sqlite3_column_text=Pe.X)(g,b),h._sqlite3_column_type=(g,b)=>(h._sqlite3_column_type=Pe.Y)(g,b),h._sqlite3_errmsg=g=>(h._sqlite3_errmsg=Pe.Z)(g),h._sqlite3_clear_bindings=g=>(h._sqlite3_clear_bindings=Pe._)(g),h._sqlite3_value_blob=g=>(h._sqlite3_value_blob=Pe.$)(g),h._sqlite3_value_bytes=g=>(h._sqlite3_value_bytes=Pe.aa)(g),h._sqlite3_value_double=g=>(h._sqlite3_value_double=Pe.ba)(g),h._sqlite3_value_int=g=>(h._sqlite3_value_int=Pe.ca)(g),h._sqlite3_value_type=g=>(h._sqlite3_value_type=Pe.da)(g),h._sqlite3_result_blob=(g,b,T,j)=>(h._sqlite3_result_blob=Pe.ea)(g,b,T,j),h._sqlite3_result_double=(g,b)=>(h._sqlite3_result_double=Pe.fa)(g,b),h._sqlite3_result_error=(g,b,T)=>(h._sqlite3_result_error=Pe.ga)(g,b,T),h._sqlite3_result_int=(g,b)=>(h._sqlite3_result_int=Pe.ha)(g,b),h._sqlite3_result_int64=(g,b)=>(h._sqlite3_result_int64=Pe.ia)(g,b),h._sqlite3_result_null=g=>(h._sqlite3_result_null=Pe.ja)(g),h._sqlite3_result_text=(g,b,T,j)=>(h._sqlite3_result_text=Pe.ka)(g,b,T,j),h._sqlite3_aggregate_context=(g,b)=>(h._sqlite3_aggregate_context=Pe.la)(g,b),h._sqlite3_column_count=g=>(h._sqlite3_column_count=Pe.ma)(g),h._sqlite3_data_count=g=>(h._sqlite3_data_count=Pe.na)(g),h._sqlite3_column_blob=(g,b)=>(h._sqlite3_column_blob=Pe.oa)(g,b),h._sqlite3_column_bytes=(g,b)=>(h._sqlite3_column_bytes=Pe.pa)(g,b),h._sqlite3_column_double=(g,b)=>(h._sqlite3_column_double=Pe.qa)(g,b),h._sqlite3_bind_blob=(g,b,T,j,W)=>(h._sqlite3_bind_blob=Pe.ra)(g,b,T,j,W),h._sqlite3_bind_double=(g,b,T)=>(h._sqlite3_bind_double=Pe.sa)(g,b,T),h._sqlite3_bind_int=(g,b,T)=>(h._sqlite3_bind_int=Pe.ta)(g,b,T),h._sqlite3_bind_text=(g,b,T,j,W)=>(h._sqlite3_bind_text=Pe.ua)(g,b,T,j,W),h._sqlite3_bind_parameter_index=(g,b)=>(h._sqlite3_bind_parameter_index=Pe.va)(g,b),h._sqlite3_sql=g=>(h._sqlite3_sql=Pe.wa)(g),h._sqlite3_normalized_sql=g=>(h._sqlite3_normalized_sql=Pe.xa)(g),h._sqlite3_changes=g=>(h._sqlite3_changes=Pe.ya)(g),h._sqlite3_close_v2=g=>(h._sqlite3_close_v2=Pe.za)(g),h._sqlite3_create_function_v2=(g,b,T,j,W,fe,ve,Ke,ht)=>(h._sqlite3_create_function_v2=Pe.Aa)(g,b,T,j,W,fe,ve,Ke,ht),h._sqlite3_update_hook=(g,b,T)=>(h._sqlite3_update_hook=Pe.Ba)(g,b,T),h._sqlite3_open=(g,b)=>(h._sqlite3_open=Pe.Ca)(g,b);var Ea=h._malloc=g=>(Ea=h._malloc=Pe.Da)(g),ra=h._free=g=>(ra=h._free=Pe.Ea)(g);h._RegisterExtensionFunctions=g=>(h._RegisterExtensionFunctions=Pe.Fa)(g);var Ja=(g,b)=>(Ja=Pe.Ga)(g,b),fr=(g,b)=>(fr=Pe.Ha)(g,b),Ft=g=>(Ft=Pe.Ia)(g),qt=g=>(qt=Pe.Ja)(g),Va=()=>(Va=Pe.Ka)();h.stackSave=()=>Va(),h.stackRestore=g=>Ft(g),h.stackAlloc=g=>qt(g),h.cwrap=(g,b,T,j)=>{var W=!T||T.every(fe=>fe==="number"||fe==="boolean");return b!=="string"&&W&&!j?h["_"+g]:(...fe)=>k(g,b,T,fe)},h.addFunction=He,h.removeFunction=_e,h.UTF8ToString=je,h.ALLOC_NORMAL=U,h.allocate=F,h.allocateUTF8OnStack=xn;function ua(){function g(){var W;if(h.calledRun=!0,!q){if(!h.noFSInit&&!Qr){var b,T;Qr=!0,j??(j=h.stdin),b??(b=h.stdout),T??(T=h.stderr),j?Vt("stdin",j):Wn("/dev/tty","/dev/stdin"),b?Vt("stdout",null,b):Wn("/dev/tty","/dev/stdout"),T?Vt("stderr",null,T):Wn("/dev/tty1","/dev/stderr"),zr("/dev/stdin",0),zr("/dev/stdout",1),zr("/dev/stderr",1)}if(Pe.N(),$r=!1,(W=h.onRuntimeInitialized)==null||W.call(h),h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;){var j=h.postRun.shift();Ze.unshift(j)}Je(Ze)}}if(0<P)te=ua;else{if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)ta();Je(yt),0<P?te=ua:h.setStatus?(h.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>h.setStatus(""),1),g()},1)):g()}}if(h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();return ua(),d}),r)};n.exports=i,n.exports.default=i}(XA)),XA.exports}var lx=ox();const ux=Li(lx);function cx(n){return n.toISOString().replace("T"," ").replace("Z","").substring(0,23)}function rs(){return cx(new Date)}var J0=`
\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;
`,$0={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;`},xa=[{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"}],Sf=class{getCreateVaultSql(){try{return{success:!0,sqlCommands:[J0],version:xa[xa.length-1].version,migrationNumber:xa[xa.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??xa[xa.length-1].revision,i=xa.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=xa.filter(c=>c.revision>n&&c.revision<=r),u=[];for(const c of o){const d=c.revision-1,m=$0[d];m&&u.push(m)}return{success:!0,sqlCommands:u,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=xa.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 u=xa[xa.length-1],c=o<u.revision,d=xa.filter(m=>m.revision>o);return{currentVersion:i,currentMigrationNumber:o,targetVersion:u.version,targetMigrationNumber:u.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[...xa]}getLatestVersion(){return xa[xa.length-1]}getMigrationSql(n){return $0[n]}getCompleteSchemaSql(){return J0}};function Z0(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 dx(n,t){const r=Z0(n);if(!r)return{isCompatible:!1,databaseVersion:n,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const i=xa.find(h=>h.version===n);if(i)return{isCompatible:!0,databaseVersion:n,clientVersion:i,isKnownVersion:!0,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const o=t?xa.find(h=>h.version===t)??ep():ep(),u=Z0(o.version);if(!u)return{isCompatible:!1,databaseVersion:n,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const c=r.major!==u.major,d=!c&&(r.minor!==u.minor||r.patch!==u.patch);return{isCompatible:!c,databaseVersion:n,clientVersion:o,isKnownVersion:!1,isMajorVersionDifference:c,isMinorVersionDifference:d}}function ep(){return xa[xa.length-1]}function Ax(n){const r=/_(\d+\.\d+\.\d+)-/.exec(n);return(r==null?void 0:r[1])??null}class ro extends Error{constructor(t){super(t),this.name="VaultVersionIncompatibleError",Object.setPrototypeOf(this,ro.prototype)}}const fx={loginTitle:"Bei AliasVault anmelden",username:"Benutzername oder E-Mail-Adresse",usernamePlaceholder:"Name / name@unternehmen.com",password:"Passwort",passwordPlaceholder:"Gib Dein Passwort ein",rememberMe:"Angemeldet bleiben",loginButton:"Anmelden",noAccount:"Noch kein Konto?",createVault:"Neuen Tresor erstellen",twoFactorTitle:"Bitte gib den Sicherheits-Code aus Deiner Authentifizierungs-App ein.",authCode:"Sicherheits-Code",authCodePlaceholder:"Gib den 6-stelligen Sicherheits-Code ein.",verify:"Bestätige",cancel:"Abbrechen",twoFactorNote:"Hinweis: Wenn Du keinen Zugriff auf Dein Authentifizierungsgerät hast, kannst Du Deine Zwei-Faktor-Authentifizierung (2FA) mit einem Wiederherstellungscode zurücksetzen, indem Du Dich über die Website anmeldest.",masterPassword:"Master-Passwort",unlockVault:"Tresor entsperren",unlockTitle:"Entsperre Deinen Tresor",unlockDescription:"Bitte gib Dein Master-Passwort zum Entsperren des Tresors ein.",logout:"Abmelden",logoutConfirm:"Bist Du sicher, dass Du Dich abmelden möchtest?",sessionExpired:"Deine Sitzung ist abgelaufen. Bitte melde Dich erneut an.",unlockSuccess:"Tresor erfolgreich entsperrt!",unlockSuccessTitle:"Ihr Tresor wurde erfolgreich entsperrt",unlockSuccessDescription:"Du kannst jetzt die Autofill-Funktion in Anmeldeformularen in Deinem Browser nutzen.",closePopup:"Popup schließen",browseVault:"Tresor durchsuchen",connectingTo:"Verbinde zu",switchAccounts:"Konto wechseln?",loggedIn:"Angemeldet",errors:{invalidCode:"Bitte gib einen gültigen 6-stelligen Sicherheits-Code ein.",serverError:"Der AliasVault-Server konnte nicht erreicht werden. Bitte versuche es später noch einmal oder kontaktiere den Support, falls das Problem weiterhin besteht.",noToken:"Anmeldung fehlgeschlagen -- es wurde kein Token zurückgegeben",migrationError:"Beim Prüfen auf ausstehende Migrationen ist ein Fehler aufgetreten.",wrongPassword:"Falsches Passwort. Bitte versuche es erneut.",accountLocked:"Das Konto wurde wegen zu vieler fehlgeschlagener Anmeldeversuche vorübergehend gesperrt.",networkError:"Netzwerkfehler. Bitte überprüfe Deine Verbindung und versuche es erneut.",sessionExpired:"Deine Sitzung ist abgelaufen. Bitte melde Dich erneut an."}},hx={credentials:"Zugangsdaten",emails:"E-Mails",settings:"Einstellungen"},gx={appName:"AliasVault",loading:"Laden...",error:"Fehler",success:"Aktion erfolgreich",cancel:"Abbrechen",back:"Back",use:"Benutzen",delete:"Löschen",or:"Or",close:"Schließen",copied:"Kopiert!",openInNewWindow:"In neuem Fenster öffnen",language:"Sprache",enabled:"Aktiviert",disabled:"Deaktiviert",showPassword:"Passwort anzeigen",hidePassword:"Passwort verbergen",copyToClipboard:"In die Zwischenablage kopieren",loadingEmails:"E-Mails werden geladen...",loadingTotpCodes:"TOTP-Codes werden geladen...",attachments:"Anhänge",loadingAttachments:"Anhänge werden geladen...",settings:"Einstellungen",recentEmails:"Neueste E-Mails",loginCredentials:"Zugangsdaten",twoFactorAuthentication:"Zwei-Faktor-Authentifizierung",alias:"Alias",notes:"Notizen",fullName:"Vor- und Nachname",firstName:"Vorname",lastName:"Nachname",birthDate:"Geburtsdatum",nickname:"Spitzname",email:"E-Mail-Adresse",username:"Benutzername",password:"Passwort",syncingVault:"Tresor wird synchronisiert",savingChangesToVault:"Änderungen werden gespeichert",uploadingVaultToServer:"Tresor wird auf den Server hochgeladen",checkingVaultUpdates:"Prüfe auf Tresor-Updates",syncingUpdatedVault:"Aktualisierter Tresor wird synchronisiert",executingOperation:"Vorgang wird ausgeführt...",loadMore:"Mehr laden",errors:{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.",unknownError:"Ein unbekannter Fehler ist aufgetreten",vaultNotAvailable:"Tresor nicht verfügbar",failedToRetrieveData:"Abruf der Daten fehlgeschlagen",vaultIsLocked:"Der Tresor ist gesperrt.",failedToUploadVault:"Das Hochladen des Tresors ist fehlgeschlagen",passwordChanged:"Dein Passwort hat sich seit Deiner letzten Anmeldung geändert. Bitte melden Dich aus Sicherheitsgründen erneut an."},apiErrors:{UNKNOWN_ERROR:"Ein unbekannter Fehler ist aufgetreten. Bitte versuche es erneut.",ACCOUNT_LOCKED:"Das Konto wurde wegen zu vieler fehlgeschlagener Anmeldeversuche vorübergehend gesperrt. Bitte versuche es später erneut.",ACCOUNT_BLOCKED:"Dein Konto wurde deaktiviert. Wenn Du glaubst, dass dies ein Fehler ist, kontaktiere bitte den Support.",USER_NOT_FOUND:"Ungültiger Benutzername oder Passwort. Bitte versuche es erneut.",INVALID_AUTHENTICATOR_CODE:"Ungültiger Sicherheits-Code. Bitte versuche es erneut.",INVALID_RECOVERY_CODE:"Ungültiger Wiederherstellungscode. Bitte versuche es erneut.",REFRESH_TOKEN_REQUIRED:"Aktualisierungstoken ist erforderlich.",INVALID_REFRESH_TOKEN:"Ungültiger Aktualisierungstoken.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Aktualisierungstoken wurde erfolgreich widerrufen.",PUBLIC_REGISTRATION_DISABLED:"Die Registrierung eines neuen Kontos ist auf diesem Server derzeit deaktiviert. Bitte kontaktiere den Administrator.",USERNAME_REQUIRED:"Der Benutzername ist erforderlich.",USERNAME_ALREADY_IN_USE:"Benutzername ist bereits vergeben.",USERNAME_AVAILABLE:"Der Benutzername ist verfügbar.",USERNAME_MISMATCH:"Der Benutzername stimmt nicht mit dem aktuellen Benutzer überein.",PASSWORD_MISMATCH:"Das angegebene Passwort stimmt nicht mit Deinem aktuellen Passwort überein.",ACCOUNT_SUCCESSFULLY_DELETED:"Konto erfolgreich gelöscht.",USERNAME_EMPTY_OR_WHITESPACE:"Der Benutzername darf nicht leer sein.",USERNAME_TOO_SHORT:"Der Benutzername ist zu kurz. Er muss mindestens 3 Zeichen lang sein.",USERNAME_TOO_LONG:"Der Benutzername ist zu lang. Er darf höchstens 40 Zeichen lang sein.",USERNAME_INVALID_EMAIL:"Ungültige E-Mail-Adresse.",USERNAME_INVALID_CHARACTERS:"Der Benutzername ist ungültig. Er darf nur aus Buchstaben oder Ziffern bestehen.",VAULT_NOT_UP_TO_DATE:"Dein Tresor ist nicht aktuell. Bitte synchronisiere Deinen Tresor und versuche es erneut.",INTERNAL_SERVER_ERROR:"Internal server error.",VAULT_ERROR:"Der lokale Tresor ist nicht aktuell. Bitte synchronisiere Deinen Tresor, indem Du die Seite aktualisierst, und versuche es erneut."}},mx={or:"oder",new:"Neu",cancel:"Abbrechen",search:"Suche",vaultLocked:"AliasVault ist gesperrt.",creatingNewAlias:"Neuen Alias erstellen...",noMatchesFound:"Keine Treffer gefunden",searchVault:"Tresor durchsuchen...",serviceName:"Name des Dienstes",email:"E-Mail-Adresse",username:"Benutzername",password:"Passwort",enterServiceName:"Name des Dienstes eingeben",enterEmailAddress:"E-Mail-Adresse eingeben",enterUsername:"Benutzername eingeben",hideFor1Hour:"Für 1 Stunde ausblenden (aktuelle Seite)",hidePermanently:"Dauerhaft ausblenden (aktuelle Seite)",createRandomAlias:"Zufälligen Alias generieren",createUsernamePassword:"Benutzername/Passwort erstellen",randomAlias:"Zufälliger Alias",usernamePassword:"Benutzername/Passwort",createAndSaveAlias:"Alias erstellen und speichern",createAndSaveCredential:"Zugang erstellen und speichern",randomIdentityDescription:"Generiere eine zufällige Identität mit einer zufälligen E-Mail-Adresse von AliasVault.",randomIdentityDescriptionDropdown:"Zufällige Identität mit zufälliger E-Mail-Adresse",manualCredentialDescription:"Gebe Deine eigene E-Mail-Adresse und Benutzernamen an.",manualCredentialDescriptionDropdown:"Manueller Benutzername und Passwort",failedToCreateIdentity:"Das Erstellen der Identität ist fehlgeschlagen. Bitte versuche es erneut.",enterEmailAndOrUsername:"E-Mail-Adresse und/oder Benutzername eingeben",autofillWithAliasVault:"Autofill mit AliasVault",generateRandomPassword:"Zufälliges Passwort erzeugen (wird in die Zwischenablage kopiert)",generateNewPassword:"Neues Passwort erzeugen",togglePasswordVisibility:"Passwort ein-/ausblenden",passwordCopiedToClipboard:"Passwort in die Zwischenablage kopiert",enterEmailAndOrUsernameError:"E-Mail-Adresse und/oder Benutzername eingeben",openAliasVaultToUpgrade:"Zum Aktualisieren AliasVault öffnen ",vaultUpgradeRequired:"Aktualisierung des Tresors erforderlich.",dismissPopup:"Popup schliessen"},px={title:"Zugangsdaten",addCredential:"Zugang hinzufügen",editCredential:"Zugang bearbeiten",deleteCredential:"Zugang löschen",credentialDetails:"Details zum Zugang",serviceName:"Name des Dienstes",serviceNamePlaceholder:"z. B. Gmail, Facebook, Bank",website:"Webseite",websitePlaceholder:"https://example.com",username:"Benutzername",usernamePlaceholder:"Benutzername eingeben",password:"Passwort",passwordPlaceholder:"Passwort eingeben",generatePassword:"Passwort generieren",copyPassword:"Passwort kopieren",showPassword:"Passwort anzeigen",hidePassword:"Passwort verbergen",notes:"Notizen",notesPlaceholder:"Zusätzliche Notizen...",totp:"Zwei-Faktor-Authentifizierung",totpCode:"TOTP-Code",copyTotp:"TOTP kopieren",totpSecret:"TOTP-Geheimcode",totpSecretPlaceholder:"TOTP-Geheimcode eingeben",noCredentials:"Keine Zugangsdaten gefunden",noCredentialsDescription:"Erstelle Deinen ersten Zugang, um loszulegen",searchPlaceholder:"Zugangsdaten suchen...",welcomeTitle:"Willkommen bei AliasVault!",welcomeDescription:"Du möchtest die AliasVault-Browser-Erweiterung verwenden? Navigiere zu einer Website und verwende das AliasVault-Popup-Fenster um einen neuen Zugang zu erstellen.",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:"Erstellt",updatedAt:"Zuletzt aktualisiert",autofill:"Autofill",fillForm:"Formular ausfüllen",deleteConfirm:"Bist Du sicher, dass Du diesen Zugang löschen möchtest?",saveSuccess:"Zugang erfolgreich gespeichert.",tags:"Schlagwörter",addTag:"Schlagwort hinzufügen",removeTag:"Schlagwort entfernen",folder:"Ordner",selectFolder:"Ordner auswählen",createFolder:"Ordner erstellen",saveCredential:"Zugang speichern",deleteCredentialTitle:"Zugang löschen",deleteCredentialConfirm:"Bist Du sicher, dass Du diesen Zugang löschen möchtest? Diese Aktion kann nicht rückgängig gemacht werden.",filters:{all:"(All) Credentials",passkeys:"Passkeys",aliases:"Aliases",userpass:"Passwords",attachments:"Attachments"},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"},yx={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."}},Ex={title:"Einstellungen",serverUrl:"URL des Servers",language:"Sprache",autofillEnabled:"Autofill aktivieren",version:"Version",openInNewWindow:"In neuem Fenster öffnen",openWebApp:"Web-App öffnen",loggedIn:"Angemeldet",logout:"Abmelden",globalSettings:"Allgemeine Einstellungen",autofillPopup:"Autofill-Popup",activeOnAllSites:"Auf allen Seiten aktiv (sofern nicht unten deaktiviert)",disabledOnAllSites:"Auf allen Seiten deaktiviert",enabled:"Aktiviert",disabled:"Deaktiviert",rightClickContextMenu:"Kontextmenü mit Rechtsklick",autofillMatching:"Autofill-Übereinstimmung",autofillMatchingMode:"Autofill-Übereinstimmungs-Modus",autofillMatchingModeDescription:"Legt fest, welche Zugangsdaten als Übereinstimmung angesehen werden und wird als Vorschlag im Autofill-Popup für eine bestimmte Website angezeigt.",autofillMatchingDefault:"URL + Subdomain + Wildcard-Name",autofillMatchingUrlSubdomain:"URL + Subdomain",autofillMatchingUrlExact:"Nur exakte URL-Domain",siteSpecificSettings:"Seitenspezifische Einstellungen",autofillPopupOn:"Autofill-Popup auf: ",enabledForThisSite:"Für diese Seite aktiviert",disabledForThisSite:"Für diese Seite deaktivieren",temporarilyDisabledUntil:"Vorübergehend deaktiviert bis ",resetAllSiteSettings:"Alle seitenspezifischen Einstellungen zurücksetzen",appearance:"Erscheinungsbild",theme:"Thema",useDefault:"Standard verwenden",light:"Hell",dark:"Dunkel",keyboardShortcuts:"Tastaturkürzel",configureKeyboardShortcuts:"Tastaturkürzel konfigurieren",configure:"Konfigurieren",security:"Sicherheit",clipboardClearTimeout:"Zwischenablage nach dem Kopieren automatisch löschen",clipboardClearTimeoutDescription:"Zwischenablage nach dem Kopieren sensibler Daten automatisch löschen",clipboardClearDisabled:"Niemals löschen",clipboardClear5Seconds:"Nach 5 Sekunden löschen",clipboardClear10Seconds:"Nach 10 Sekunden löschen",clipboardClear15Seconds:"Nach 15 Sekunden löschen",autoLockTimeout:"Sperr-Timeout",autoLockTimeoutDescription:"Tresor bei Inaktivität automatisch sperren",autoLockTimeoutHelp:"Der Tresor wird erst nach dem angegebenen Zeitraum der Inaktivität gesperrt (keine Nutzung von Autofill oder Öffnen des Erweiterungs-Popups). Der Tresor wird immer gesperrt, wenn der Browser geschlossen wird, unabhängig von dieser Einstellung.",autoLockNever:"Niemals",autoLock15Seconds:"15 Sekunden",autoLock1Minute:"1 Minute",autoLock5Minutes:"5 Minuten",autoLock15Minutes:"15 Minuten",autoLock30Minutes:"30 Minuten",autoLock1Hour:"1 Stunde",autoLock4Hours:"4 Stunden",autoLock8Hours:"8 Stunden",autoLock24Hours:"24 Stunden",versionPrefix:"Version ",preferences:"Einstellungen",autofillSettings:"Autofill-Einstellungen",clipboardSettings:"Zwischenablage-Einstellungen",contextMenuSettings:"Kontextmenü-Einstellungen",passkeySettings:"Passkey Settings",contextMenu:"Kontextmenü",contextMenuEnabled:"Kontextmenü ist aktiviert",contextMenuDisabled:"Kontextmenü ist deaktiviert",contextMenuDescription:"Rechtsklicke auf Eingabefelder, um auf AliasVault-Optionen zuzugreifen",selectLanguage:"Sprache auswählen",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",languageSettingsDescription:"Choose your preferred language",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"}},bx={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",creatingButton:"Creating...",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 ",enable:"Enable AliasVault as passkey provider",description:"When enabled, AliasVault will handle passkey requests from websites. When a website requests a passkey, the AliasVault popup will be shown instead of the native browser or OS passkey interface."}},wx={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.",okay:"OK",status:{preparingUpgrade:"Aktualisierung wird vorbereitet...",vaultAlreadyUpToDate:"Tresor ist bereits aktualisiert",startingDatabaseTransaction:"Datenbanktransaktion wird gestartet...",applyingDatabaseMigrations:"Datenbankmigration wird durchgeführt...",applyingMigration:"Führe Migration {{current}} von {{total}} durch...",committingChanges:"Änderungen werden übernommen..."},alerts:{error:"Fehler",unableToGetVersionInfo:"Versionsinformationen konnten nicht abgerufen werden. Bitte versuche es erneut.",selfHostedServer:"Selbstgehosteter Server",selfHostedWarning:"Nutzt Du einen selbst gehosteten Server, musst Du Deine Instanz ebenfalls updaten. Andernfalls kannst Du Dich im Web-Client nicht mehr anmelden.",cancel:"Abbrechen",continueUpgrade:"Aktualisierung fortsetzen",upgradeFailed:"Aktualisierung fehlgeschlagen",failedToApplyMigration:"Migration fehlgeschlagen ({{current}} von {{total}})"}},vx={auth:fx,menu:hx,common:gx,content:mx,credentials:px,emails:yx,settings:Ex,passkeys:bx,upgrade:wx},Cx={loginTitle:"Log in to AliasVault",username:"Username or email",usernamePlaceholder:"name / name@company.com",password:"Password",passwordPlaceholder:"Enter your password",rememberMe:"Remember me",loginButton:"Login",noAccount:"No account yet?",createVault:"Create new vault",twoFactorTitle:"Please enter the authentication code from your authenticator app.",authCode:"Authentication Code",authCodePlaceholder:"Enter 6-digit code",verify:"Verify",cancel:"Cancel",twoFactorNote:"Note: if you don't have access to your authenticator device, you can reset your 2FA with a recovery code by logging in via the website.",masterPassword:"Master Password",unlockVault:"Unlock Vault",unlockTitle:"Unlock Your Vault",unlockDescription:"Enter your master password to unlock your vault.",logout:"Logout",logoutConfirm:"Are you sure you want to logout?",sessionExpired:"Your session has expired. Please log in again.",unlockSuccess:"Vault unlocked successfully!",unlockSuccessTitle:"Your vault is successfully unlocked",unlockSuccessDescription:"You can now use autofill in login forms in your browser.",closePopup:"Close this popup",browseVault:"Browse vault contents",connectingTo:"Connecting to",switchAccounts:"Switch accounts?",loggedIn:"Logged in",errors:{invalidCode:"Please enter a valid 6-digit authentication code.",serverError:"Could not reach AliasVault server. Please try again later or contact support if the problem persists.",noToken:"Login failed -- no token returned",migrationError:"An error occurred while checking for pending migrations.",wrongPassword:"Incorrect password. Please try again.",accountLocked:"Account temporarily locked due to too many failed attempts.",networkError:"Network error. Please check your connection and try again.",sessionExpired:"Your session has expired. Please log in again."}},xx={credentials:"Credentials",emails:"Emails",settings:"Settings"},Ix={appName:"AliasVault",loading:"Loading...",error:"Error",success:"Success",cancel:"Cancel",back:"Back",use:"Use",delete:"Delete",or:"Or",close:"Close",copied:"Copied!",openInNewWindow:"Open in new window",language:"Language",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",copyToClipboard:"Copy to clipboard",loadingEmails:"Loading emails...",loadingTotpCodes:"Loading TOTP codes...",attachments:"Attachments",loadingAttachments:"Loading attachments...",settings:"Settings",recentEmails:"Recent emails",loginCredentials:"Login credentials",twoFactorAuthentication:"Two-factor authentication",alias:"Alias",notes:"Notes",fullName:"Full Name",firstName:"First Name",lastName:"Last Name",birthDate:"Birth Date",nickname:"Nickname",email:"Email",username:"Username",password:"Password",syncingVault:"Syncing vault",savingChangesToVault:"Saving changes to vault",uploadingVaultToServer:"Uploading vault to server",checkingVaultUpdates:"Checking for vault updates",syncingUpdatedVault:"Syncing updated vault",executingOperation:"Executing operation...",loadMore:"Load more",errors:{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.",unknownError:"An unknown error occurred",vaultNotAvailable:"Vault not available",failedToRetrieveData:"Failed to retrieve data",vaultIsLocked:"Vault is locked",failedToUploadVault:"Failed to upload vault",passwordChanged:"Your password has changed since the last time you logged in. Please login again for security reasons."},apiErrors:{UNKNOWN_ERROR:"An unknown error occurred. Please try again.",ACCOUNT_LOCKED:"Account temporarily locked due to too many failed attempts. Please try again later.",ACCOUNT_BLOCKED:"Your account has been disabled. If you believe this is a mistake, please contact support.",USER_NOT_FOUND:"Invalid username or password. Please try again.",INVALID_AUTHENTICATOR_CODE:"Invalid authenticator code. Please try again.",INVALID_RECOVERY_CODE:"Invalid recovery code. Please try again.",REFRESH_TOKEN_REQUIRED:"Refresh token is required.",INVALID_REFRESH_TOKEN:"Invalid refresh token.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Refresh token revoked successfully.",PUBLIC_REGISTRATION_DISABLED:"New account registration is currently disabled on this server. Please contact the administrator.",USERNAME_REQUIRED:"Username is required.",USERNAME_ALREADY_IN_USE:"Username is already in use.",USERNAME_AVAILABLE:"Username is available.",USERNAME_MISMATCH:"Username does not match the current user.",PASSWORD_MISMATCH:"The provided password does not match your current password.",ACCOUNT_SUCCESSFULLY_DELETED:"Account successfully deleted.",USERNAME_EMPTY_OR_WHITESPACE:"Username cannot be empty or whitespace.",USERNAME_TOO_SHORT:"Username too short: must be at least 3 characters long.",USERNAME_TOO_LONG:"Username too long: cannot be longer than 40 characters.",USERNAME_INVALID_EMAIL:"Invalid email address.",USERNAME_INVALID_CHARACTERS:"Username is invalid, can only contain letters or digits.",VAULT_NOT_UP_TO_DATE:"Your vault is not up-to-date. Please synchronize your vault and try again.",INTERNAL_SERVER_ERROR:"Internal server error.",VAULT_ERROR:"The local vault is not up-to-date. Please synchronize your vault by refreshing the page and try again."}},Nx={or:"or",new:"New",cancel:"Cancel",search:"Search",vaultLocked:"AliasVault is locked.",creatingNewAlias:"Creating new alias...",noMatchesFound:"No matches found",searchVault:"Search vault...",serviceName:"Service name",email:"Email",username:"Username",password:"Password",enterServiceName:"Enter service name",enterEmailAddress:"Enter email address",enterUsername:"Enter username",hideFor1Hour:"Hide for 1 hour (current site)",hidePermanently:"Hide permanently (current site)",createRandomAlias:"Create random alias",createUsernamePassword:"Create username/password",randomAlias:"Random alias",usernamePassword:"Username/password",createAndSaveAlias:"Create and save alias",createAndSaveCredential:"Create and save credential",randomIdentityDescription:"Generate a random identity with a random email address accessible in AliasVault.",randomIdentityDescriptionDropdown:"Random identity with random email",manualCredentialDescription:"Specify your own email address and username.",manualCredentialDescriptionDropdown:"Manual username and password",failedToCreateIdentity:"Failed to create identity. Please try again.",enterEmailAndOrUsername:"Enter email and/or username",autofillWithAliasVault:"Autofill with AliasVault",generateRandomPassword:"Generate random password (copy to clipboard)",generateNewPassword:"Generate new password",togglePasswordVisibility:"Toggle password visibility",passwordCopiedToClipboard:"Password copied to clipboard",enterEmailAndOrUsernameError:"Enter email and/or username",openAliasVaultToUpgrade:"Open AliasVault to upgrade",vaultUpgradeRequired:"Vault upgrade required.",dismissPopup:"Dismiss popup"},Sx={title:"Credentials",addCredential:"Add Credential",editCredential:"Edit Credential",deleteCredential:"Delete Credential",credentialDetails:"Credential Details",serviceName:"Service Name",serviceNamePlaceholder:"e.g., Gmail, Facebook, Bank",website:"Website",websitePlaceholder:"https://example.com",username:"Username",usernamePlaceholder:"Enter username",password:"Password",passwordPlaceholder:"Enter password",generatePassword:"Generate Password",copyPassword:"Copy Password",showPassword:"Show Password",hidePassword:"Hide Password",notes:"Notes",notesPlaceholder:"Additional notes...",totp:"Two-Factor Authentication",totpCode:"TOTP Code",copyTotp:"Copy TOTP",totpSecret:"TOTP Secret",totpSecretPlaceholder:"Enter TOTP secret key",noCredentials:"No credentials found",noCredentialsDescription:"Add your first credential to get started",searchPlaceholder:"Search credentials...",welcomeTitle:"Welcome to AliasVault!",welcomeDescription:"To use the AliasVault browser extension: navigate to a website and use the AliasVault autofill popup to create a new credential.",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",autofill:"Autofill",fillForm:"Fill Form",deleteConfirm:"Are you sure you want to delete this credential?",saveSuccess:"Credential saved successfully",tags:"Tags",addTag:"Add Tag",removeTag:"Remove Tag",folder:"Folder",selectFolder:"Select Folder",createFolder:"Create Folder",saveCredential:"Save credential",deleteCredentialTitle:"Delete Credential",deleteCredentialConfirm:"Are you sure you want to delete this credential? This action cannot be undone.",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"},Tx={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."}},kx={title:"Settings",serverUrl:"Server URL",language:"Language",autofillEnabled:"Enable Autofill",version:"Version",openInNewWindow:"Open in new window",openWebApp:"Open web app",loggedIn:"Logged in",logout:"Logout",globalSettings:"Global Settings",autofillPopup:"Autofill popup",activeOnAllSites:"Active on all sites (unless disabled below)",disabledOnAllSites:"Disabled on all sites",enabled:"Enabled",disabled:"Disabled",rightClickContextMenu:"Right-click context menu",autofillMatching:"Autofill Matching",autofillMatchingMode:"Autofill matching mode",autofillMatchingModeDescription:"Determines which credentials are considered a match and shown as suggestions in the autofill popup for a given website.",autofillMatchingDefault:"URL + subdomain + name wildcard",autofillMatchingUrlSubdomain:"URL + subdomain",autofillMatchingUrlExact:"Exact URL domain only",siteSpecificSettings:"Site-Specific Settings",autofillPopupOn:"Autofill popup on: ",enabledForThisSite:"Enabled for this site",disabledForThisSite:"Disabled for this site",temporarilyDisabledUntil:"Temporarily disabled until ",resetAllSiteSettings:"Reset all site-specific settings",appearance:"Appearance",theme:"Theme",useDefault:"Use default",light:"Light",dark:"Dark",keyboardShortcuts:"Keyboard Shortcuts",configureKeyboardShortcuts:"Configure keyboard shortcuts",configure:"Configure",security:"Security",clipboardClearTimeout:"Clear clipboard after copying",clipboardClearTimeoutDescription:"Automatically clear the clipboard after copying sensitive data",clipboardClearDisabled:"Never clear",clipboardClear5Seconds:"Clear after 5 seconds",clipboardClear10Seconds:"Clear after 10 seconds",clipboardClear15Seconds:"Clear after 15 seconds",autoLockTimeout:"Auto-lock Timeout",autoLockTimeoutDescription:"Automatically lock the vault after a period of inactivity",autoLockTimeoutHelp:"The vault will only lock after the specified period of inactivity (no autofill usage or extension popup opened). The vault will always lock when the browser is closed, regardless of this setting.",autoLockNever:"Never",autoLock15Seconds:"15 seconds",autoLock1Minute:"1 minute",autoLock5Minutes:"5 minutes",autoLock15Minutes:"15 minutes",autoLock30Minutes:"30 minutes",autoLock1Hour:"1 hour",autoLock4Hours:"4 hours",autoLock8Hours:"8 hours",autoLock24Hours:"24 hours",versionPrefix:"Version ",preferences:"Preferences",autofillSettings:"Autofill Settings",clipboardSettings:"Clipboard Settings",contextMenuSettings:"Context Menu Settings",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",languageSettingsDescription:"Choose your preferred 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"}},Bx={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",creatingButton:"Creating...",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 ",enable:"Enable AliasVault as passkey provider",description:"When enabled, AliasVault will handle passkey requests from websites. When a website requests a passkey, the AliasVault popup will be shown instead of the native browser or OS passkey interface."}},Dx={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.",okay:"Ok",status:{preparingUpgrade:"Preparing upgrade...",vaultAlreadyUpToDate:"Vault is already up to date",startingDatabaseTransaction:"Starting database transaction...",applyingDatabaseMigrations:"Applying database migrations...",applyingMigration:"Applying migration {{current}} of {{total}}...",committingChanges:"Committing changes..."},alerts:{error:"Error",unableToGetVersionInfo:"Unable to get version information. Please try again.",selfHostedServer:"Self-Hosted Server",selfHostedWarning:"If you're using a self-hosted server, make sure to also update your self-hosted instance as otherwise logging in to the web client will stop working.",cancel:"Cancel",continueUpgrade:"Continue Upgrade",upgradeFailed:"Upgrade Failed",failedToApplyMigration:"Failed to apply migration ({{current}} of {{total}})"}},Lx={auth:Cx,menu:xx,common:Ix,content:Nx,credentials:Sx,emails:Tx,settings:kx,passkeys:Bx,upgrade:Dx},Rx={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",cancel:"Peruuta",twoFactorNote:"Huomautus: jos sinulla ei ole pääsyä tunnistautumislaitteeseen, voit palauttaa 2FA:n palautuskoodilla kirjautumalla sisään sivuston kautta.",masterPassword:"Pääsalasana",unlockVault:"Avaa holvin lukitus",unlockTitle:"Avaa holvisi lukitus",unlockDescription:"Syötä pääsalasanasi avataksesi holvisi lukituksen.",logout:"Uloskirjautuminen",logoutConfirm:"Oletko varma, että haluat kirjautua ulos?",sessionExpired:"Istuntosi on vanhentunut. Kirjaudu sisään uudelleen.",unlockSuccess:"Holvin lukitus avattu!",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",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.",noToken:"Sisäänkirjautuminen epäonnistui -- polettia ei palautettu",migrationError:"Tapahtui virhe tarkistettaessa odottavia siirtoja.",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."}},Ux={credentials:"Tunnistetiedot",emails:"Sähköpostit",settings:"Asetukset"},Ox={appName:"AliasVault",loading:"Ladataan...",error:"Virhe",success:"Onnistui",cancel:"Peruuta",back:"Takaisin",use:"Käytä",delete:"Poista",or:"Tai",close:"Sulje",copied:"Kopioitu!",openInNewWindow:"Avaa uudessa ikkunassa",language:"Kieli",enabled:"Otettu käyttöön",disabled:"Pois käytöstä",showPassword:"Näytä salasana",hidePassword:"Piilota salasana",copyToClipboard:"Kopioi leikepöydälle",loadingEmails:"Ladataan sähköposteja...",loadingTotpCodes:"Ladataan TOTP-koodeja...",attachments:"Liitteet",loadingAttachments:"Ladataan liitteitä...",settings:"Asetukset",recentEmails:"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.",unknownError:"Tapahtui tuntematon virhe",vaultNotAvailable:"Holvi ei käytettävissä",failedToRetrieveData:"Tietojen nouto epäonnistui",vaultIsLocked:"Holvi on lukittu",failedToUploadVault:"Holvin ulospäinlataaminen epäonnistui",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.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Virkistyspoletti peruutettu.",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."}},Mx={or:"tai",new:"Uusi",cancel:"Peruuta",search:"Etsi",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",enterEmailAndOrUsernameError:"Syötä sähköpostiosoite ja/tai käyttäjänimi",openAliasVaultToUpgrade:"Avaa AliasVault päivittääksesi",vaultUpgradeRequired:"Holvin päivitys vaaditaan.",dismissPopup:"Hylkää ponnahdusikkuna"},_x={title:"Tunnistetiedot",addCredential:"Lisää tunnistetieto",editCredential:"Muokkaa tunnistetietoa",deleteCredential:"Poista tunnistetieto",credentialDetails:"Tunnistetietojen yksityiskohdat",serviceName:"Palvelun nimi",serviceNamePlaceholder:"esim. Gmail, Facebook, pankki",website:"Verkkosivusto",websitePlaceholder:"https://esimerkki.fi",username:"Käyttäjänimi",usernamePlaceholder:"Syötä käyttäjänimi",password:"Salasana",passwordPlaceholder:"Syötä salasana",generatePassword:"Luo salasana",copyPassword:"Kopioi salasana",showPassword:"Näytä salasana",hidePassword:"Piilota salasana",notes:"Huomautukset",notesPlaceholder:"Lisähuomautukset...",totp:"Kaksivaiheinen tunnistautuminen",totpCode:"TOTP-koodi",copyTotp:"Kopioi TOTP-koodi",totpSecret:"TOTP-salaisuus",totpSecretPlaceholder:"Syötä TOTP-salainen avain",noCredentials:"Tunnistetietoja ei löytynyt",noCredentialsDescription:"Lisää ensimmäinen tunnistetietosi aloittaaksesi",searchPlaceholder:"Etsi tunnistetietoja...",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",autofill:"Automaattinen täyttö",fillForm:"Täytä lomake",deleteConfirm:"Oletko varma, että haluat poistaa tämän tunnistetiedon?",saveSuccess:"Tunnistetieto tallennettu",tags:"Tunnisteet",addTag:"Lisää tunniste",removeTag:"Poista tunniste",folder:"Kansio",selectFolder:"Valitse kansio",createFolder:"Luo kansio",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"},jx={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."}},Qx={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",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",enabled:"Otettu käyttöön",disabled:"Pois käytöstä",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ä",security:"Tietoturva",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",preferences:"Määritykset",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",languageSettingsDescription:"Valitse ensisijainen kieli",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"}},Fx={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",creatingButton:"Luodaan...",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ä ",enable:"Ota AliasVault käyttöön todennusavainten tarjoajana",description:"Kun AliasVault on käytössä, se käsittelee todennusavaimia verkkosivustoilta. Kun sivusto pyytää todennusavainta, AliasVaultin ponnahdusikkuna näytetään natiivin selaimen tai käyttöjärjestelmän todennusavaimen sijaan."}},Px={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.",okay:"Hyvä on",status:{preparingUpgrade:"Valmistellaan päivitystä...",vaultAlreadyUpToDate:"Holvi on jo ajan tasalla",startingDatabaseTransaction:"Aloitetaan tietokannan transaktiota...",applyingDatabaseMigrations:"Toteutetaan tietokannan siirtoja...",applyingMigration:"Otetaan siirto käyttöön {{current}} / {{total}}...",committingChanges:"Otetaan muutokset käyttöön..."},alerts:{error:"Virhe",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.",cancel:"Peruuta",continueUpgrade:"Jatka päivitystä",upgradeFailed:"Päivitys epäonnistui",failedToApplyMigration:"Siirron käyttöönotto epäonnistui ({{current}} / {{total}})"}},Hx={auth:Rx,menu:Ux,common:Ox,content:Mx,credentials:_x,emails:jx,settings:Qx,passkeys:Fx,upgrade:Px},zx={loginTitle:"כניסה ל־AliasVault",username:"שם משתמש או דוא״ל",usernamePlaceholder:"שם / name@company.com",password:"סיסמה",passwordPlaceholder:"נא למלא את הסיסמה שלך",rememberMe:"לזכור אותי",loginButton:"כניסה",noAccount:"אין לך חשבון עדיין?",createVault:"יצירת כספת חדשה",twoFactorTitle:"נא למלא את קוד האימות מיישומון המאמת שלך.",authCode:"קוד אימות",authCodePlaceholder:"נא למלא קוד באורך 6 ספרות",verify:"אימות",cancel:"ביטול",twoFactorNote:"לתשומת ליבך: אם אין לך גישה להתקן המאמת (authenticator) שלך, אפשר לאפס אימות דו־שלבי עם קוד שחזור על ידי כניסה דרך האתר.",masterPassword:"סיסמת על",unlockVault:"שחרור נעילת כספת",unlockTitle:"שחרור נעילת הכספת שלך",unlockDescription:"נא למלא את סיסמת העל שלך כדי לשחרר את הכספת שלך.",logout:"יציאה",logoutConfirm:"לצאת?",sessionExpired:"תוקף ההפעלה שלך פג. נא להיכנס מחדש.",unlockSuccess:"נעילת הכספת שוחררה בהצלחה!",unlockSuccessTitle:"נעילת הכספת שלך נפתחה בהצלחה",unlockSuccessDescription:"מעתה ניתן להשתמש בהשלמה אוטומטית בטופסי כניסה בדפדפן שלך.",closePopup:"סגירת החלונית הצצה הזאת",browseVault:"עיון בתוכן הכספת",connectingTo:"מתבצעת התחברות אל",switchAccounts:"להחליף חשבונות?",loggedIn:"נכנסת",errors:{invalidCode:"נא למלא קוד אימות באורך 6 ספרות.",serverError:"לא ניתן ליצור קשר עם השרת של AliasVault. נא לנסות שוב מאוחר יותר או ליצור קשר עם התמיכה אם הבעיה נשנית.",noToken:"הכניסה נכשלה - לא הוחזר אסימון",migrationError:"אירעה שגיאה בעת בדיקה לאיתור הסבות ממתינות.",wrongPassword:"סיסמה שגויה. נא לנסות שוב.",accountLocked:"החשבון נעול זמנית עקב ריבוי ניסיונות כושלים.",networkError:"שגיאת רשת. נא לבדוק את החיבור ולנסות שוב.",sessionExpired:"תוקף ההפעלה שלך פג. נא להיכנס מחדש."}},Vx={credentials:"פרטי גישה",emails:"הודעות דוא״ל",settings:"הגדרות"},Gx={appName:"AliasVault",loading:"בטעינה…",error:"שגיאה",success:"הצליח",cancel:"ביטול",back:"חזרה",use:"להשתמש",delete:"מחיקה",or:"או",close:"סגירה",copied:"הועתק!",openInNewWindow:"פתיחה בחלון חדש",language:"שפה",enabled:"פעיל",disabled:"כבוי",showPassword:"הצגת סיסמה",hidePassword:"הסתרת סיסמה",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 לגרסה חדשה יותר כדי להשתמש בהרחבת הדפדפן הזאת. נא ליצור קשר עם התמיכה לקבלת עזרה.",unknownError:"אירעה שגיאה לא ידועה",vaultNotAvailable:"הכספת לא זמינה",failedToRetrieveData:"משיכת הנתונים נכשלה",vaultIsLocked:"הכספת נעולה",failedToUploadVault:"העלאת הכספת נכשלה",passwordChanged:"הסיסמה שלך השתנתה מאז הפעם האחרונה שנכנסת למערכת. נא להיכנס שוב מטעמי אבטחת מידע."},apiErrors:{UNKNOWN_ERROR:"אירעה שגיאה לא ידועה, נא לנסות שוב.",ACCOUNT_LOCKED:"החשבון נעול זמנית עקב ריבוי ניסיונות כושלים. נא לנסות שוב מאוחר יותר.",ACCOUNT_BLOCKED:"החשבון שלך הושבת. אם לדעתך מדובר בטעות, נא ליצור קשר עם התמיכה.",USER_NOT_FOUND:"שם המשתמש או הסיסמה שגויים. נא לנסות שוב.",INVALID_AUTHENTICATOR_CODE:"קוד מאמת שגוי. נא לנסות שוב.",INVALID_RECOVERY_CODE:"קוד שחזור שגוי. נא לנסות שוב.",REFRESH_TOKEN_REQUIRED:"אסימון ריענון חובה.",INVALID_REFRESH_TOKEN:"אסימון ריענון שגוי.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"אסימון הריענון נשלל בהצלחה.",PUBLIC_REGISTRATION_DISABLED:"רישום חשבון חדש מושבת כרגע בשרת הזה. נא ליצור קשר עם ההנהלה.",USERNAME_REQUIRED:"שם משתמש חובה.",USERNAME_ALREADY_IN_USE:"שם המשתמש כבר תפוס.",USERNAME_AVAILABLE:"שם המשתמש פנוי.",USERNAME_MISMATCH:"שם המשתמש לא מתאים למשתמש הנוכחי.",PASSWORD_MISMATCH:"הסיסמה שסופקה לא תואמת לסיסמה הנוכחית שלך.",ACCOUNT_SUCCESSFULLY_DELETED:"החשבון נמחק בהצלחה.",USERNAME_EMPTY_OR_WHITESPACE:"שם המשתמש לא יכול להיות ריק או מורכב מרווחים בלבד.",USERNAME_TOO_SHORT:"שם המשתמש קצר מדי: חייב להיות באורך 3 תווים לפחות.",USERNAME_TOO_LONG:"שם המשתמש ארוך מדי: לא יכול להיות ארוך מ־40 תווים.",USERNAME_INVALID_EMAIL:"כתובת דוא״ל שגויה.",USERNAME_INVALID_CHARACTERS:"שם המשתמש שגוי, יכול להכיל רק תווים או ספרות.",VAULT_NOT_UP_TO_DATE:"הכספת שלך אינה עדכנית. נא לסנכרן את הכספת שלך ולנסות שוב.",INTERNAL_SERVER_ERROR:"שגיאת שרת פנימית.",VAULT_ERROR:"הכספת המקומית אינה עדכנית. נא לסנכרן את הכספת שלך על ידי ריענון העמוד ולנסות שוב."}},Kx={or:"או",new:"חדש",cancel:"ביטול",search:"חיפוש",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:"הסיסמה הועתקה ללוח הגזירים",enterEmailAndOrUsernameError:"נא למלא דוא״ל ו/או שם משתמש",openAliasVaultToUpgrade:"יש לפתוח את AliasVault כדי לשדרג",vaultUpgradeRequired:"יש לשדרג את הכספת.",dismissPopup:"התעלמות מחלונית"},qx={title:"פרטי גישה",addCredential:"הוספת פרטי גישה",editCredential:"עריכת פרטי גישה",deleteCredential:"מחיקת פרטי גישה",credentialDetails:"פירוט פרטי גישה",serviceName:"שם השירות",serviceNamePlaceholder:"למשל: ג׳ימייל, פייסבוק, בנק",website:"אתר",websitePlaceholder:"https://example.com",username:"שם משתמש",usernamePlaceholder:"נא למלא שם משתמש",password:"סיסמה",passwordPlaceholder:"נא למלא סיסמה",generatePassword:"יצירת סיסמה",copyPassword:"העתקת סיסמה",showPassword:"הצגת סיסמה",hidePassword:"הסתרת סיסמה",notes:"הערות",notesPlaceholder:"הערות נוספות…",totp:"אימות דו־שלבי",totpCode:"קוד חד־פעמי זמני",copyTotp:"העתקת קוד חד־פעמי זמני",totpSecret:"סוג סיסמה חד־פעמית זמנית",totpSecretPlaceholder:"נא למלא מפתח סודי לסיסמה חד־פעמית זמנית",noCredentials:"לא נמצאו פרטי גישה",noCredentialsDescription:"יש להוסיף את פרטי הגישה הראשונים שלך כדי להתחיל",searchPlaceholder:"חיפוש פרטי גישה…",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:"עדכון אחרון",autofill:"השלמה אוטומטית",fillForm:"מילוי טופס",deleteConfirm:"למחוק את פרטי הגישה האלה?",saveSuccess:"פרטי הגישה נשמרו בהצלחה",tags:"תגיות",addTag:"הוספת תגית",removeTag:"הסרת תגית",folder:"תיקייה",selectFolder:"בחירת תיקייה",createFolder:"יצירת תיקייה",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:"נא למלא קידומת דוא״ל"},Yx={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:"אירעה שגיאה בניסיון לטעון את הודעות הדוא״ל. נא לנסות לערוך ולשמור את רשומת פרטי הקשר כדי לסנכרן את מסד הנתונים ואז לנסות שוב."}},Wx={title:"הגדרות",serverUrl:"כתובת שרת",language:"שפה",autofillEnabled:"הפעלת השלמה אוטומטית",version:"גרסה",openInNewWindow:"פתיחה בחלון חדש",openWebApp:"פתיחת אתר",loggedIn:"נכנסת",logout:"יציאה",globalSettings:"הגדרות מקיפות",autofillPopup:"חלונית השלמה אוטומטית",activeOnAllSites:"פעיל בכל האתרים (למעט אם נכבה להלן)",disabledOnAllSites:"כבוי בכל האתרים",enabled:"פעיל",disabled:"כבוי",rightClickContextMenu:"תפריט הקשר בלחיצה ימנית",autofillMatching:"התאמת השלמה אוטומטית",autofillMatchingMode:"מצב התאמת השלמה אוטומטית",autofillMatchingModeDescription:"הגדרה אילו פרטי גישה נחשבים תואמים ויופיעו כהצעות בחלונית ההשלמה האוטומטית לאתר מסוים.",autofillMatchingDefault:"כתובת + שם תת־תחום + תו כל על שם",autofillMatchingUrlSubdomain:"כתובת + שם תת־תחום",autofillMatchingUrlExact:"תחום כתובת מדויקת בלבד",siteSpecificSettings:"הגדרות תואמות אתר",autofillPopupOn:"חלונית השלמה אוטומטית ב־: ",enabledForThisSite:"פעיל לאתר הזה",disabledForThisSite:"כבוי לאתר הזה",temporarilyDisabledUntil:"כבוי זמנית עד ",resetAllSiteSettings:"איפוס כל ההגדרות הנקודתיות לאתרים",appearance:"מראה",theme:"ערכת עיצוב",useDefault:"להשתמש בברירת המחדל",light:"בהירה",dark:"כהה",keyboardShortcuts:"קיצורי מקלדת",configureKeyboardShortcuts:"הגדרת קיצורי מקלדת",configure:"הגדרה",security:"אבטחה",clipboardClearTimeout:"לפנות את לוח הגזירים לאחר העתקה",clipboardClearTimeoutDescription:"לפנות את לוח הגזירים אוטומטית לאחר העתקת נתונים רגישים",clipboardClearDisabled:"אף פעם לא לפנות",clipboardClear5Seconds:"לפנות אחרי 5 שניות",clipboardClear10Seconds:"לפנות אחרי 10 שניות",clipboardClear15Seconds:"לפנות אחרי 15 שניות",autoLockTimeout:"תום המתנה לנעילה אוטומטית",autoLockTimeoutDescription:"לנעול את הכספת אוטומטית לאחר פרק זמן של חוסר פעילות",autoLockTimeoutHelp:"הכספת תינעל רק לאחר משך זמן של חוסר פעילות (אין שימוש בהשלמה אוטומטית או פתיחת חלונית הרחבה). הכספת תמיד תינעל עם סגירת הדפדפן, ללא תלות בהגדרה הזאת.",autoLockNever:"אף פעם",autoLock15Seconds:"15 שניות",autoLock1Minute:"דקה",autoLock5Minutes:"5 דקות",autoLock15Minutes:"15 דקות",autoLock30Minutes:"30 דקות",autoLock1Hour:"שעה",autoLock4Hours:"4 שעות",autoLock8Hours:"8 שעות",autoLock24Hours:"24 שעות",versionPrefix:"גרסה ",preferences:"העדפות",autofillSettings:"הגדרות השלמה אוטומטית",clipboardSettings:"הגדרות לוח הגזירים",contextMenuSettings:"הגדרות תפריט הקשר",passkeySettings:"Passkey Settings",contextMenu:"תפריט הקשר",contextMenuEnabled:"תפריט הקשר פעיל",contextMenuDisabled:"תפריט הקשר כבוי",contextMenuDescription:"ניתן ללחוץ על שדה עם הלחצן הימני כדי לגשת לאפשרויות AliasVault",selectLanguage:"בחירת שפה",serverConfiguration:"Server Configuration",serverConfigurationDescription:"Configure the AliasVault server URL for self-hosted instances",customApiUrl:"כתובת API",customClientUrl:"כתובת לקוח",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",languageSettingsDescription:"Choose your preferred language",validation:{apiUrlRequired:"כתובת API חובה",apiUrlInvalid:"נא למלא כתובת API תקפה",clientUrlRequired:"כתובת לקוח חובה",clientUrlInvalid:"נא למלא כתובת לקוח תקפה"}},Xx={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",creatingButton:"נוצר…",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 ",enable:"Enable AliasVault as passkey provider",description:"When enabled, AliasVault will handle passkey requests from websites. When a website requests a passkey, the AliasVault popup will be shown instead of the native browser or OS passkey interface."}},Jx={title:"שדרוג כספת",subtitle:"AliasVault התעדכן וצריך לשדרג את הכספת שלך. הפעולה הזאת אמורה לארוך מספר שניות.",versionInformation:"פרטי גרסה",yourVault:"גרסת הכספת שלך:",newVersion:"הגרסה החדשה הזמינה:",upgrade:"שדרוג כספת",upgrading:"משתדרגת…",logout:"יציאה",whatsNew:"מה חדש",whatsNewDescription:"יש לשדרג כדי שתהיה תמיכה בשינויים הבאים:",noDescriptionAvailable:"אין תיאור זמין לגרסה הזאת.",okay:"אישור",status:{preparingUpgrade:"השדרוג בהכנה…",vaultAlreadyUpToDate:"הכספת כבר עדכנית",startingDatabaseTransaction:"הסבת מסד הנתונים מתחילה…",applyingDatabaseMigrations:"השינויים חלים על מסד הנתונים…",applyingMigration:"חלה ההסבה {{current}} מתוך {{total}}…",committingChanges:"השינויים מקובעים…"},alerts:{error:"שגיאה",unableToGetVersionInfo:"לא ניתן לקבל את פרטי הגרסה. נא לנסות שוב מאוחר יותר.",selfHostedServer:"שרת באירוח עצמי",selfHostedWarning:"אם מדובר בשרת שמתארח עצמאית, נא לוודא שהעותק שמתארח אצלך גם כן מתעדכן כי אחרת הכניסה לאתר תפסיק לעבוד.",cancel:"ביטול",continueUpgrade:"להמשיך בשדרוג",upgradeFailed:"השדרוג נכשל",failedToApplyMigration:"החלת ההסבה נכשלה ({{current}} מתוך {{total}})"}},$x={auth:zx,menu:Vx,common:Gx,content:Kx,credentials:qx,emails:Yx,settings:Wx,passkeys:Xx,upgrade:Jx},Zx={loginTitle:"Accedi ad AliasVaultriem",username:"Nome utente o mail",usernamePlaceholder:"nome / nome@azienda.com",password:"Password",passwordPlaceholder:"Inserisci la tua password",rememberMe:"Ricordati di me",loginButton:"Accedi",noAccount:"Non hai ancora un account?",createVault:"Crea una nuova cassaforte",twoFactorTitle:"Inserisci il codice di autenticazione dalla tua app di autenticazione.",authCode:"Codice di Autenticazione",authCodePlaceholder:"Inserisci il codice a 6 cifre",verify:"Verifica",cancel:"Annulla",twoFactorNote:"Nota: se non hai accesso al tuo dispositivo di autenticazione, puoi reimpostare il tuo 2FA con un codice di recupero accedendo tramite il sito web.",masterPassword:"Password principale",unlockVault:"Sblocca Cassaforte",unlockTitle:"Sblocca la tua cassaforte",unlockDescription:"Inserisci la tua password principale per sbloccare la tua cassaforte.",logout:"Disconnetti",logoutConfirm:"Sei sicuro di volerti disconnettere?",sessionExpired:"La sessione è scaduta. Effettua di nuovo il login.",unlockSuccess:"Cassaforte sbloccata con successo!",unlockSuccessTitle:"La cassaforte è stata sbloccata con successo",unlockSuccessDescription:"Ora puoi usare l'auto-riempimento nei moduli di accesso nel tuo browser.",closePopup:"Chiudi questo popup",browseVault:"Sfoglia i contenuti della cassaforte",connectingTo:"Connessione a",switchAccounts:"Cambia account",loggedIn:"Accesso effettuato",errors:{invalidCode:"Inserisci un codice di autenticazione a 6 cifre valido.",serverError:"Impossibile connettersi al server di AliasVault. Riprova più tardi o contatta il supporto se il problema persiste.",noToken:"Accesso fallito — nessun token ricevuto",migrationError:"Si è verificato un errore nel controllo delle migrazioni pendenti.",wrongPassword:"Password non corretta. Riprova nuovamente.",accountLocked:"Account temporaneamente bloccato a causa di troppi tentativi falliti.",networkError:"Errore di rete: Controlla la tua connessione e riprova.",sessionExpired:"La tua sessione è scaduta. Effettua di nuovo il login."}},eI={credentials:"Credenziali",emails:"E-Mail",settings:"Impostazioni"},tI={appName:"AliasVault",loading:"Caricamento in corso...",error:"Errore",success:"Riuscito",cancel:"Annulla",back:"Indietro",use:"Usa",delete:"Elimina",or:"O",close:"Chiudi",copied:"Copiato!",openInNewWindow:"Apri in una nuova finestra",language:"Lingua",enabled:"Abilitato",disabled:"Disabilitato",showPassword:"Mostra password",hidePassword:"Nascondi password",copyToClipboard:"Copia negli appunti",loadingEmails:"Caricamento e-mail in corso...",loadingTotpCodes:"Caricamento codici TOTP in corso...",attachments:"Allegati",loadingAttachments:"Caricamento allegati in corso...",settings:"Impostazioni",recentEmails:"E-mail recenti",loginCredentials:"Credenziali di accesso",twoFactorAuthentication:"Autenticazione a due fattori",alias:"Alias",notes:"Note",fullName:"Nome completo",firstName:"Nome",lastName:"Cognome",birthDate:"Data di nascita",nickname:"Soprannome",email:"E-mail",username:"Nome utente",password:"Password",syncingVault:"Sincronizzazione cassaforte",savingChangesToVault:"Salvataggio modifiche cassaforte",uploadingVaultToServer:"Caricamento cassaforte sul server",checkingVaultUpdates:"Controllo aggiornamenti cassaforte",syncingUpdatedVault:"Sincronizzazione cassaforte aggiornata",executingOperation:"Esecuzione operazione...",loadMore:"Carica altro",errors:{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.",unknownError:"Si è verificato un errore sconosciuto",vaultNotAvailable:"Cassaforte non disponibile",failedToRetrieveData:"Recupero dati non riuscito",vaultIsLocked:"La cassaforte è bloccata",failedToUploadVault:"Caricare della cassaforte non riuscito.",passwordChanged:"La tua password è cambiata dall'ultima volta che hai effettuato l'accesso. Effettua nuovamente l'accesso per motivi di sicurezza."},apiErrors:{UNKNOWN_ERROR:"Si è verificato un errore sconosciuto. Riprova.",ACCOUNT_LOCKED:"Account temporaneamente bloccato a causa di troppi tentativi falliti. Riprova più tardi.",ACCOUNT_BLOCKED:"Il tuo account è stato disabilitato. Se ritieni che sia un errore, contatta il supporto.",USER_NOT_FOUND:"Nome utente o password non validi. Riprova.",INVALID_AUTHENTICATOR_CODE:"Codice di autenticazione non valido. Riprova.",INVALID_RECOVERY_CODE:"Codice di recupero non valido. Riprova.",REFRESH_TOKEN_REQUIRED:"È necessario aggiornare il token.",INVALID_REFRESH_TOKEN:"Token di aggiornamento non valido",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Aggiornamento token revocato con successo.",PUBLIC_REGISTRATION_DISABLED:"La registrazione di nuovi account è attualmente disabilitata su questo server. Contatta l'amministratore.",USERNAME_REQUIRED:"È richiesto il nome utente.",USERNAME_ALREADY_IN_USE:"Il nome utente è già in uso.",USERNAME_AVAILABLE:"Il nome utente è disponibile.",USERNAME_MISMATCH:"Il nome utente non corrisponde all'utente corrente.",PASSWORD_MISMATCH:"La password fornita non corrisponde alla password attuale.",ACCOUNT_SUCCESSFULLY_DELETED:"Account eliminato con successo.",USERNAME_EMPTY_OR_WHITESPACE:"Il nome utente non può essere vuoto o contenere spazi.",USERNAME_TOO_SHORT:"Nome utente troppo corto: deve contenere almeno 3 caratteri.",USERNAME_TOO_LONG:"Nome utente troppo lungo: non può superare i 40 caratteri.",USERNAME_INVALID_EMAIL:"Indirizzo email non valido.",USERNAME_INVALID_CHARACTERS:"Il nome utente non è valido, può contenere solo lettere o cifre.",VAULT_NOT_UP_TO_DATE:"La tua cassaforte non è aggiornata. Sincronizzala e riprova.",INTERNAL_SERVER_ERROR:"Errore interno del server.",VAULT_ERROR:"La cassaforte locale non è aggiornata. Sincronizzala ricaricando la pagina e riprova."}},aI={or:"o",new:"Nuovo",cancel:"Annulla",search:"Cerca",vaultLocked:"AliasVault è bloccato.",creatingNewAlias:"Creazione nuovo alias...",noMatchesFound:"Nessun risultato trovato",searchVault:"Cerca nella cassaforte...",serviceName:"Nome servizio",email:"E-mail",username:"Nome utente",password:"Password",enterServiceName:"Inserisci nome servizio",enterEmailAddress:"Inserisci indirizzo email",enterUsername:"Inserisci nome utente",hideFor1Hour:"Nascondi per 1 ora (sito corrente)",hidePermanently:"Nascondi permanentemente (sito corrente)",createRandomAlias:"Crea alias casuale",createUsernamePassword:"Crea nome utente/password",randomAlias:"Alias casuale",usernamePassword:"Nome utente/password",createAndSaveAlias:"Crea e salva alias",createAndSaveCredential:"Crea e salva credenziali",randomIdentityDescription:"Genera un'identità casuale con un indirizzo email casuale accessibile in AliasVault.",randomIdentityDescriptionDropdown:"Identità casuale con email casuale",manualCredentialDescription:"Specifica il tuo indirizzo email e nome utente.",manualCredentialDescriptionDropdown:"Nome utente e password manuali",failedToCreateIdentity:"Impossibile creare identità. Riprova.",enterEmailAndOrUsername:"Inserisci email e/o nome utente",autofillWithAliasVault:"Compilazione automatica con AliasVault",generateRandomPassword:"Genera password casuale (copia negli appunti)",generateNewPassword:"Genera nuova password",togglePasswordVisibility:"Mostra/Nascondi password",passwordCopiedToClipboard:"Password copiata negli appunti",enterEmailAndOrUsernameError:"Inserisci email e/o nome utente",openAliasVaultToUpgrade:"Apri AliasVault per aggiornare",vaultUpgradeRequired:"Aggiornamento della cassaforte richiesto.",dismissPopup:"Chiudi finestra"},rI={title:"Credenziali",addCredential:"Aggiungi credenziali",editCredential:"Modifica credenziali",deleteCredential:"Elimina credenziali",credentialDetails:"Dettagli credenziali",serviceName:"Nome servizio",serviceNamePlaceholder:"es. Gmail, Facebook, Banca",website:"Sito web",websitePlaceholder:"https://esempio.com",username:"Nome utente",usernamePlaceholder:"Inserisci nome utente",password:"Password",passwordPlaceholder:"Inserisci password",generatePassword:"Genera password",copyPassword:"Copia password",showPassword:"Mostra password",hidePassword:"Nascondi password",notes:"Note",notesPlaceholder:"Note aggiuntive...",totp:"Autenticazione a due fattori",totpCode:"Codice TOTP",copyTotp:"Copia TOTP",totpSecret:"Segreto TOTP",totpSecretPlaceholder:"Inserisci chiave segreta TOTP",noCredentials:"Credenziali non trovate",noCredentialsDescription:"Aggiungi le tue prime credenziali per iniziare",searchPlaceholder:"Cerca credenziali...",welcomeTitle:"Benvenuto in AliasVault!",welcomeDescription:"Per usare l'estensione browser AliasVault: naviga su un sito e usa la finestra di compilazione automatica per creare una nuova credenziale.",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:"No credentials with attachments found",noMatchingCredentials:"Nessuna credenziale corrispondente trovata",createdAt:"Creato",updatedAt:"Ultimo aggiornamento",autofill:"Compilazione automatica",fillForm:"Compila modulo",deleteConfirm:"Sei sicuro di voler eliminare questa credenziale?",saveSuccess:"Credenziali salvate con successo",tags:"Tag",addTag:"Aggiungi tag",removeTag:"Rimuovi tag",folder:"Cartella",selectFolder:"Seleziona cartella",createFolder:"Crea cartella",saveCredential:"Salva credenziale",deleteCredentialTitle:"Elimina credenziale",deleteCredentialConfirm:"Sei sicuro di voler eliminare queste credenziali? Questa azione non può essere annullata.",filters:{all:"(Tutte) Credenziali",passkeys:"Passkey",aliases:"Alias",userpass:"Password",attachments:"Attachments"},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"},nI={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."}},iI={title:"Impostazioni",serverUrl:"URL del server",language:"Lingua",autofillEnabled:"Abilita compilazione automatica",version:"Versione",openInNewWindow:"Apri in una nuova finestra",openWebApp:"Apri app web",loggedIn:"Accesso effettuato",logout:"Disconnetti",globalSettings:"Impostazioni globali",autofillPopup:"Popup compilazione automatica",activeOnAllSites:"Attivo su tutti i siti (a meno che non sia disabilitato sotto)",disabledOnAllSites:"Disabilitato su tutti i siti",enabled:"Abilitato",disabled:"Disabilitato",rightClickContextMenu:"Menu contestuale clic destro",autofillMatching:"Riconoscimento campi automatica.",autofillMatchingMode:"Modalità riconoscimento capi automatica",autofillMatchingModeDescription:"Determina quali credenziali vengono considerate corrispondenti e mostrate come suggerimenti nel popup di compilazione automatica per un determinato sito web.",autofillMatchingDefault:"URL + sottodominio + nome wildcard",autofillMatchingUrlSubdomain:"URL + sottodominio",autofillMatchingUrlExact:"Solo dominio URL esatto",siteSpecificSettings:"Impostazioni specifiche per sito",autofillPopupOn:"Finestra compilazione automatica su: ",enabledForThisSite:"Abilitato per questo sito",disabledForThisSite:"Disabilitato per questo sito",temporarilyDisabledUntil:"Disabilitato temporaneamente fino a ",resetAllSiteSettings:"Reimposta tutte le impostazioni specifiche per sito",appearance:"Aspetto",theme:"Tema",useDefault:"Usa predefinito",light:"Chiaro",dark:"Scuro",keyboardShortcuts:"Scorciatoie da tastiera",configureKeyboardShortcuts:"Configura scorciatoie da tastiera",configure:"Configura",security:"Sicurezza",clipboardClearTimeout:"Cancella appunti dopo la copia",clipboardClearTimeoutDescription:"Cancella automaticamente gli appunti dopo aver copiato i dati sensibili",clipboardClearDisabled:"Non pulire mai",clipboardClear5Seconds:"Cancella dopo 5 secondi",clipboardClear10Seconds:"Cancella dopo 10 secondi",clipboardClear15Seconds:"Cancella dopo 15 secondi",autoLockTimeout:"Timeout Blocco Automatico",autoLockTimeoutDescription:"Blocca automaticamente la cassaforte dopo un periodo di inattività",autoLockTimeoutHelp:"La cassaforte si bloccherà solo dopo il periodo specificato di inattività (nessun utilizzo di riempimento automatico o estensione popup aperto). La cassaforte si bloccherà sempre quando il browser è chiuso, indipendentemente da questa impostazione.",autoLockNever:"Mai",autoLock15Seconds:"15 secondi",autoLock1Minute:"1 minuto",autoLock5Minutes:"5 minuti",autoLock15Minutes:"15 minuti",autoLock30Minutes:"30 minuti",autoLock1Hour:"1 ora",autoLock4Hours:"4 ore",autoLock8Hours:"8 ore",autoLock24Hours:"24 ore",versionPrefix:"Versione ",preferences:"Preferenze",autofillSettings:"Impostazioni di riempimento automatico",clipboardSettings:"Impostazioni appunti",contextMenuSettings:"Preferenze menu contestuale",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:"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",languageSettingsDescription:"Choose your preferred language",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"}},sI={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",creatingButton:"Creazione in corso...",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",enable:"Abilita AliasVault come provider di passkey",description:"Quando abilitato, AliasVault gestirà le richieste di passkey dai siti web. Quando un sito web richiede una passkey, verrà mostrato il popup di AliasVault invece dell'interfaccia nativa del browser o dell'interfaccia di password del sistema operativo."}},oI={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.",okay:"Ok",status:{preparingUpgrade:"Preparazione aggiornamento...",vaultAlreadyUpToDate:"La cassaforte è già aggiornata",startingDatabaseTransaction:"Avvio transazione database...",applyingDatabaseMigrations:"Applicazione migrazioni database...",applyingMigration:"Applicazione migrazione {{current}} di {{total}}...",committingChanges:"Modifica in corso..."},alerts:{error:"Errore",unableToGetVersionInfo:"Impossibile ottenere informazioni sulla versione. Riprova.",selfHostedServer:"Server Autospitato",selfHostedWarning:"Se usi un server autospitato, assicurati di aggiornare anche la tua istanza, altrimenti l'accesso al client web smetterà di funzionare.",cancel:"Annulla",continueUpgrade:"Continua aggiornamento",upgradeFailed:"Aggiornamento non riuscito",failedToApplyMigration:"Impossibile eseguire la migrazione ({{current}} di {{total}})"}},lI={auth:Zx,menu:eI,common:tI,content:aI,credentials:rI,emails:nI,settings:iI,passkeys:sI,upgrade:oI},uI={loginTitle:"Inloggen bij AliasVault",username:"Gebruikersnaam of e-mail",usernamePlaceholder:"naam / naam@bedrijf.com",password:"Wachtwoord",passwordPlaceholder:"Voer je wachtwoord in",rememberMe:"Onthoud mij",loginButton:"Inloggen",noAccount:"Nog geen account?",createVault:"Nieuwe vault aanmaken",twoFactorTitle:"Voer de authenticatiecode van je authenticator-app in.",authCode:"Authenticatiecode",authCodePlaceholder:"Voer 6-cijferige code in",verify:"Verifiëren",cancel:"Annuleren",twoFactorNote:"Opmerking: als je geen toegang hebt tot je authenticator, kunt je je 2FA resetten door met een in te loggen via de website.",masterPassword:"Hoofdwachtwoord",unlockVault:"Vault ontgrendelen",unlockTitle:"Ontgrendel je vault",unlockDescription:"Voer je hoofdwachtwoord in om je vault te ontgrendelen.",logout:"Uitloggen",logoutConfirm:"Weet je zeker dat je wilt uitloggen?",sessionExpired:"Je sessie is verlopen. Log opnieuw in.",unlockSuccess:"Vault succesvol ontgrendeld!",unlockSuccessTitle:"Je vault is succesvol ontgrendeld",unlockSuccessDescription:"Je kunt nu automatisch invullen gebruiken in inlogformulieren in je browser.",closePopup:"Sluit deze popup",browseVault:"Bekijk vault inhoud",connectingTo:"Verbinden met",switchAccounts:"Wisselen van account?",loggedIn:"Ingelogd",errors:{invalidCode:"Voer een geldige 6-cijferige code in.",serverError:"Kon de AliasVault server niet bereiken. Probeer het later opnieuw of neem contact op met support als het probleem aanhoudt.",noToken:"Inloggen mislukt -- geen token ontvangen",migrationError:"Er is een fout opgetreden bij het controleren op updates.",wrongPassword:"Onjuist wachtwoord. Probeer het opnieuw.",accountLocked:"Account tijdelijk vergrendeld vanwege te veel mislukte pogingen.",networkError:"Netwerkfout. Controleer de verbinding en probeer het opnieuw.",sessionExpired:"Je sessie is verlopen. Log opnieuw in."}},cI={credentials:"Credentials",emails:"E-mails",settings:"Instellingen"},dI={appName:"AliasVault",loading:"Laden...",error:"Fout",success:"Succes",cancel:"Annuleren",back:"Terug",use:"Gebruik",delete:"Verwijderen",or:"Of",close:"Sluiten",copied:"Gekopieerd!",openInNewWindow:"Openen in nieuw venster",language:"Taal",enabled:"Ingeschakeld",disabled:"Uitgeschakeld",showPassword:"Wachtwoord tonen",hidePassword:"Wachtwoord verbergen",copyToClipboard:"Naar klembord kopiëren",loadingEmails:"E-mails laden...",loadingTotpCodes:"TOTP-codes laden...",attachments:"Bijlagen",loadingAttachments:"Bijlagen laden...",settings:"Instellingen",recentEmails:"Recente e-mails",loginCredentials:"Inloggegevens",twoFactorAuthentication:"Tweestapsverificatie",alias:"Alias",notes:"Notities",fullName:"Volledige naam",firstName:"Voornaam",lastName:"Achternaam",birthDate:"Geboortedatum",nickname:"Bijnaam",email:"E-mail",username:"Gebruikersnaam",password:"Wachtwoord",syncingVault:"Vault synchroniseren",savingChangesToVault:"Wijzigingen opslaan in vault",uploadingVaultToServer:"Vault uploaden naar server",checkingVaultUpdates:"Controleren op vault updates",syncingUpdatedVault:"Bijgewerkte vault synchroniseren",executingOperation:"Actie uitvoeren...",loadMore:"Laad meer",errors:{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.",unknownError:"Er is een onbekende fout opgetreden",vaultNotAvailable:"Vault niet beschikbaar",failedToRetrieveData:"Gegevens ophalen mislukt",vaultIsLocked:"Vault is vergrendeld",failedToUploadVault:"Vault uploaden mislukt",passwordChanged:"Je wachtwoord is veranderd sinds de laatste keer dat je bent ingelogd. Log opnieuw in."},apiErrors:{UNKNOWN_ERROR:"Er is een onbekende fout opgetreden. Probeer het opnieuw.",ACCOUNT_LOCKED:"Account tijdelijk vergrendeld vanwege te veel mislukte pogingen. Probeer het later opnieuw.",ACCOUNT_BLOCKED:"Je account is uitgeschakeld. Als je denkt dat dit een vergissing is, neem dan contact op met support.",USER_NOT_FOUND:"Gebruikersnaam of wachtwoord is onjuist. Probeer het opnieuw.",INVALID_AUTHENTICATOR_CODE:"Ongeldige authenticator code. Probeer het opnieuw.",INVALID_RECOVERY_CODE:"Ongeldige herstelcode. Probeer het opnieuw.",REFRESH_TOKEN_REQUIRED:"Refresh token is vereist.",INVALID_REFRESH_TOKEN:"Ongeldig refresh token.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Refresh token succesvol ingetrokken.",PUBLIC_REGISTRATION_DISABLED:"Registratie van nieuwe accounts is momenteel uitgeschakeld op deze server. Neem contact op met de beheerder.",USERNAME_REQUIRED:"Gebruikersnaam is vereist.",USERNAME_ALREADY_IN_USE:"Gebruikersnaam is al in gebruik.",USERNAME_AVAILABLE:"Gebruikersnaam is beschikbaar.",USERNAME_MISMATCH:"Gebruikersnaam komt niet overeen met de huidige gebruiker.",PASSWORD_MISMATCH:"Het opgegeven wachtwoord komt niet overeen met je huidige wachtwoord.",ACCOUNT_SUCCESSFULLY_DELETED:"Account succesvol verwijderd.",USERNAME_EMPTY_OR_WHITESPACE:"Gebruikersnaam mag niet leeg zijn of alleen uit spaties bestaan.",USERNAME_TOO_SHORT:"Gebruikersnaam te kort: moet minimaal 3 tekens lang zijn.",USERNAME_TOO_LONG:"Gebruikersnaam te lang: mag niet langer zijn dan 40 tekens.",USERNAME_INVALID_EMAIL:"Ongeldig e-mailadres.",USERNAME_INVALID_CHARACTERS:"Gebruikersnaam is ongeldig, mag alleen letters of cijfers bevatten.",VAULT_NOT_UP_TO_DATE:"Je vault is niet up-to-date. Synchroniseer je vault en probeer het opnieuw.",INTERNAL_SERVER_ERROR:"Interne serverfout.",VAULT_ERROR:"Je lokale vault is niet up-to-date. Synchroniseer je vault door de pagina te vernieuwen en probeer het opnieuw."}},AI={or:"of",new:"Nieuw",cancel:"Annuleren",search:"Zoeken",vaultLocked:"AliasVault is vergrendeld.",creatingNewAlias:"Nieuwe alias aanmaken...",noMatchesFound:"Geen resultaten gevonden",searchVault:"Vault doorzoeken...",serviceName:"Servicenaam",email:"E-mail",username:"Gebruikersnaam",password:"Wachtwoord",enterServiceName:"Voer servicenaam in",enterEmailAddress:"Voer e-mailadres in",enterUsername:"Voer gebruikersnaam in",hideFor1Hour:"Verberg voor 1 uur (huidige site)",hidePermanently:"Permanent verbergen (huidige site)",createRandomAlias:"Willekeurige alias aanmaken",createUsernamePassword:"Gebruikersnaam/wachtwoord aanmaken",randomAlias:"Alias",usernamePassword:"Gebruikersnaam/wachtwoord",createAndSaveAlias:"Alias aanmaken",createAndSaveCredential:"Credential aanmaken",randomIdentityDescription:"Genereer een willekeurige identiteit met een willekeurig e-mailadres toegankelijk in AliasVault.",randomIdentityDescriptionDropdown:"Willekeurige identiteit met willekeurige e-mail",manualCredentialDescription:"Specificeer je eigen e-mailadres en/of gebruikersnaam.",manualCredentialDescriptionDropdown:"Handmatige gebruikersnaam en wachtwoord",failedToCreateIdentity:"Identiteit aanmaken mislukt. Probeer opnieuw.",enterEmailAndOrUsername:"Voer e-mail en/of gebruikersnaam in",autofillWithAliasVault:"Autofill met AliasVault",generateRandomPassword:"Willekeurig wachtwoord genereren (kopiëren naar klembord)",generateNewPassword:"Genereer nieuw wachtwoord",togglePasswordVisibility:"Schakel zichtbaarheid van wachtwoord in/uit",passwordCopiedToClipboard:"Wachtwoord gekopieerd naar klembord",enterEmailAndOrUsernameError:"Voer e-mail en/of gebruikersnaam in",openAliasVaultToUpgrade:"Open AliasVault om te upgraden",vaultUpgradeRequired:"Update is vereist.",dismissPopup:"Pop-up sluiten"},fI={title:"Credentials",addCredential:"Credential toevoegen",editCredential:"Credential bewerken",deleteCredential:"Credential verwijderen",credentialDetails:"Credential details",serviceName:"Naam",serviceNamePlaceholder:"bijv. Gmail, Facebook, Bank",website:"Website",websitePlaceholder:"https://voorbeeld.nl",username:"Gebruikersnaam",usernamePlaceholder:"Voer gebruikersnaam in",password:"Wachtwoord",passwordPlaceholder:"Voer wachtwoord in",generatePassword:"Wachtwoord genereren",copyPassword:"Wachtwoord kopiëren",showPassword:"Wachtwoord tonen",hidePassword:"Wachtwoord verbergen",notes:"Notities",notesPlaceholder:"Aanvullende notities...",totp:"Tweestapsverificatie",totpCode:"TOTP-code",copyTotp:"Kopiëren",totpSecret:"TOTP secret",totpSecretPlaceholder:"Voer TOTP secret in",noCredentials:"Geen credentials gevonden",noCredentialsDescription:"Voeg je eerste credentials toe om te beginnen",searchPlaceholder:"Credentials zoeken...",welcomeTitle:"Welkom bij AliasVault!",welcomeDescription:"Om de AliasVault browser extensie te gebruiken: navigeer naar een website en gebruik de AliasVault autofill popup om nieuwe credentials aan te maken.",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",autofill:"Autofill",fillForm:"Formulier invullen",deleteConfirm:"Weet je zeker dat je deze credential wilt verwijderen?",saveSuccess:"Credential succesvol opgeslagen",tags:"Labels",addTag:"Label toevoegen",removeTag:"Label verwijderen",folder:"Map",selectFolder:"Map selecteren",createFolder:"Map aanmaken",saveCredential:"Credential opslaan",deleteCredentialTitle:"Credential verwijderen",deleteCredentialConfirm:"Weet je zeker dat je deze credential wilt verwijderen? Deze actie kan niet ongedaan worden gemaakt.",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"},hI={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."}},gI={title:"Instellingen",serverUrl:"Server URL",language:"Taal",autofillEnabled:"Autofill",version:"Versie",openInNewWindow:"Openen in nieuw venster",openWebApp:"Web-app openen",loggedIn:"Ingelogd",logout:"Uitloggen",globalSettings:"Globale Instellingen",autofillPopup:"Autofill popup",activeOnAllSites:"Actief voor alle sites (tenzij hieronder uitgeschakeld)",disabledOnAllSites:"Uitgeschakeld op alle sites",enabled:"Ingeschakeld",disabled:"Uitgeschakeld",rightClickContextMenu:"Rechtermuisknop menu",autofillMatching:"Autofill matching",autofillMatchingMode:"Autofill matching modus",autofillMatchingModeDescription:"Bepaalt op welke manier credentials worden beschouwd als matches en worden getoond als suggestie in de autofill popup voor een bepaalde website.",autofillMatchingDefault:"URL + subdomein + naam wildcard",autofillMatchingUrlSubdomain:"URL + subdomein",autofillMatchingUrlExact:"Exacte URL-domein",siteSpecificSettings:"Site-specifieke Instellingen",autofillPopupOn:"Autofill popup op: ",enabledForThisSite:"Ingeschakeld voor deze site",disabledForThisSite:"Uitgeschakeld voor deze site",temporarilyDisabledUntil:"Tijdelijk uitgeschakeld tot ",resetAllSiteSettings:"Alle site-specifieke instellingen resetten",appearance:"Uiterlijk",theme:"Thema",useDefault:"Standaard gebruiken",light:"Licht",dark:"Donker",keyboardShortcuts:"Snelkoppelingen",configureKeyboardShortcuts:"Snelkoppelingen configureren",configure:"Configureren",security:"Beveiliging",clipboardClearTimeout:"Automatisch klembord wissen na kopiëren",clipboardClearTimeoutDescription:"Automatisch het klembord wissen na kopiëren van gevoelige gegevens",clipboardClearDisabled:"Nooit wissen",clipboardClear5Seconds:"Wis na 5 seconden",clipboardClear10Seconds:"Wis na 10 seconden",clipboardClear15Seconds:"Wis na 15 seconden",autoLockTimeout:"Automatisch vergrendelen",autoLockTimeoutDescription:"Vergrendel de vault automatisch na inactiviteit",autoLockTimeoutHelp:"De vault zal alleen vergrendelen na de opgegeven periode van inactiviteit (geen automatisch invullen of extensie geopend). De vault wordt altijd vergrendeld wanneer de browser wordt afgesloten, ongeacht deze instelling.",autoLockNever:"Nooit",autoLock15Seconds:"15 seconden",autoLock1Minute:"1 minuut",autoLock5Minutes:"5 minuten",autoLock15Minutes:"15 minuten",autoLock30Minutes:"30 minuten",autoLock1Hour:"1 uur",autoLock4Hours:"4 uur",autoLock8Hours:"8 uur",autoLock24Hours:"24 uur",versionPrefix:"Versie ",preferences:"Voorkeuren",autofillSettings:"Autofill instellingen",clipboardSettings:"Klembord instellingen",contextMenuSettings:"Context menu instellingen",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",languageSettingsDescription:"Kies je voorkeurstaal",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"}},mI={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",creatingButton:"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",enable:"AliasVault als passkey provider inschakelen",description:"Wanneer ingeschakeld, behandelt AliasVault passkey verzoeken van websites. Wanneer een website een passkey aanvraagt, wordt de AliasVault pop-up getoond in plaats van de browser of OS pop-up."}},pI={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.",okay:"Ok",status:{preparingUpgrade:"Upgrade voorbereiden...",vaultAlreadyUpToDate:"De vault is al bijgewerkt",startingDatabaseTransaction:"Starten van database transactie...",applyingDatabaseMigrations:"Databasemigratie toepassen...",applyingMigration:"Toepassen van migratie {{current}} van {{total}}...",committingChanges:"Wijzigingen doorvoeren..."},alerts:{error:"Fout",unableToGetVersionInfo:"Kan versie-informatie niet ophalen. Probeer het opnieuw.",selfHostedServer:"Self-hosted server",selfHostedWarning:"Als je een self-hosted server gebruikt, zorg er dan voor dat je ook je eigen self-hosted instantie bijwerkt, omdat anders het inloggen via de web client niet meer zal werken.",cancel:"Annuleren",continueUpgrade:"Verdergaan",upgradeFailed:"Upgrade mislukt",failedToApplyMigration:"Kon migratie niet toepassen ({{current}} van {{total}})"}},yI={auth:uI,menu:cI,common:dI,content:AI,credentials:fI,emails:hI,settings:gI,passkeys:mI,upgrade:pI},EI={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ź",cancel:"Anuluj",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 sejf",unlockTitle:"Odblokuj swój sejf",unlockDescription:"Wprowadź hasło główne, aby odblokować sejf.",logout:"Wyloguj się",logoutConfirm:"Czy na pewno chcesz się wylogować?",sessionExpired:"Twoja sesja wygasła. Zaloguj się ponownie.",unlockSuccess:"Sejf odblokowany pomyślnie!",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",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ł.",noToken:"Logowanie nie powiodło się — nie zwrócono tokena.",migrationError:"Wystąpił błąd podczas sprawdzania oczekujących migracji.",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."}},bI={credentials:"Dane logowania",emails:"Skrzynka odbiorcza",settings:"Ustawienia"},wI={appName:"AliasVault",loading:"Wczytywanie…",error:"Błąd",success:"Gotowe",cancel:"Anuluj",back:"Powrót",use:"Użyj",delete:"Usuń",or:"lub",close:"Zamknąć",copied:"Skopiowano",openInNewWindow:"Otwórz w nowym oknie.",language:"Język",enabled:"Aktywne",disabled:"Nie aktywne",showPassword:"Pokaż hasło",hidePassword:"Ukryj hasło",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.",unknownError:"Wystąpił nieznany błąd",vaultNotAvailable:"Sejf niedostępny",failedToRetrieveData:"Nie udało się pobrać danych",vaultIsLocked:"Sejf jest zablokowany",failedToUploadVault:"Nie udało się załadować sejfu",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.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Odnowienie tokenu zakończyło się powodzeniem.",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."}},vI={or:"lub",new:"Nowy",cancel:"Anulować",search:"Wyszukiwanie",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",enterEmailAndOrUsernameError:"Wprowadź adres e-mail i/lub nazwę użytkownika",openAliasVaultToUpgrade:"Otwórz AliasVault, aby dokonać aktualizacji",vaultUpgradeRequired:"Wymagana aktualizacja sejfu.",dismissPopup:"Zamknij wyskakujące okienko"},CI={title:"Dane logowania",addCredential:"Dodaj dane logowania",editCredential:"Edytuj dane logowania",deleteCredential:"Usuń dane logowania",credentialDetails:"Dane uwierzytelniające",serviceName:"Nazwa usługi",serviceNamePlaceholder:"np. Gmail, Facebook, Bank",website:"Strona internetowa",websitePlaceholder:"https://adresstronywww.com",username:"Nazwa użytkownika",usernamePlaceholder:"Wprowadź nazwę użytkownika",password:"Hasło",passwordPlaceholder:"Wprowadź hasło",generatePassword:"Utwórz hasło",copyPassword:"Skopiuj hasło",showPassword:"Pokaż hasło",hidePassword:"Ukryj hasło",notes:"Notatki",notesPlaceholder:"Dodatkowe informacje...",totp:"Weryfikacja dwuetapowa (2FA)",totpCode:"Kod TOTP",copyTotp:"Skopiuj kod TOTP",totpSecret:"Tajny klucz TOTP",totpSecretPlaceholder:"Wprowadź tajny klucz TOTP",noCredentials:"Nie znaleziono zapisanych danych uwierzytelniających",noCredentialsDescription:"Dodaj pierwsze dane, aby rozpocząć",searchPlaceholder:"Wyszukaj dane uwierzytelniające...",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",autofill:"Autouzupełnianie",fillForm:"Wypełnij formularz",deleteConfirm:"Czy na pewno chcesz usunąć te dane uwierzytelniające?",saveSuccess:"Dane logowania zostały zapisane",tags:"Znaczniki",addTag:"Dodaj znacznik",removeTag:"Usuń znacznik",folder:"Katalog",selectFolder:"Wybierz folder",createFolder:"Utwórz folder",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"},xI={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."}},II={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ę",globalSettings:"Ustawienia ogólne",autofillPopup:"Okno autouzupełniania",activeOnAllSites:"Aktywne we wszystkich witrynach (chyba że jest wyłączone)",disabledOnAllSites:"Wyłączone na wszystkich witrynach",enabled:"Włączone",disabled:"Wyłączone",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",security:"Bezpieczeństwo",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 ",preferences:"Ustawienia",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",languageSettingsDescription:"Wybierz preferowany język interfejsu",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"}},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",creatingButton:"Tworzenie...",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 ",enable:"Włącz AliasVault jako dostawcę kluczy dostępu",description:"Po włączeniu AliasVault będzie obsługiwać żądania kluczy dostępu od stron internetowych. Gdy strona internetowa zażąda klucza dostępu, zamiast natywnego interfejsu przeglądarki lub systemu operacyjnego wyświetli się okienko AliasVault."}},SI={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.",okay:"Ok",status:{preparingUpgrade:"Przygotowywanie aktualizacji...",vaultAlreadyUpToDate:"Sejf jest już aktualny",startingDatabaseTransaction:"Rozpoczynanie transakcji w bazie danych...",applyingDatabaseMigrations:"Stosowanie migracji do bazy danych...",applyingMigration:"Aplikacja migracji {{current}} z {{total}}...",committingChanges:"Wprowadzanie zmian..."},alerts:{error:"Błąd",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ć.",cancel:"Anuluj",continueUpgrade:"Kontynuuj aktualizację",upgradeFailed:"Aktualizacja nie powiodła się",failedToApplyMigration:"Nie udało się zastosować migracji ({{current}} of {{total}})"}},TI={auth:EI,menu:bI,common:wI,content:vI,credentials:CI,emails:xI,settings:II,passkeys:NI,upgrade:SI},kI={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:"Login",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",cancel:"Cancelar",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 cofre",unlockTitle:"Desbloquear Seu Cofre",unlockDescription:"Digite sua senha para desbloquear o cofre.",logout:"Sair",logoutConfirm:"Tem certeza que deseja sair?",sessionExpired:"Sua sessão expirou. Por favor, faça login novamente.",unlockSuccess:"Cofre sincronizado com sucesso!",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",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.",noToken:"Login falhou -- nenhum token retornado",migrationError:"Ocorreu um erro durante a verificação de migrações pendentes.",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."}},BI={credentials:"Credenciais",emails:"E-mails",settings:"Configurações"},DI={appName:"AliasVault",loading:"Carregando...",error:"Erro",success:"Sucesso",cancel:"Cancelar",back:"Voltar",use:"Utilizar",delete:"Excluir",or:"Ou",close:"Fechar",copied:"Copiado!",openInNewWindow:"Abrir em uma nova janela",language:"Idioma",enabled:"Habilitado",disabled:"Desabilitado",showPassword:"Mostrar senha",hidePassword:"Ocultar senha",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.",unknownError:"Ocorreu um erro desconhecido",vaultNotAvailable:"Cofre não disponível",failedToRetrieveData:"Falha ao recuperar dados",vaultIsLocked:"O cofre está bloqueado",failedToUploadVault:"Falha ao fazer upload do cofre",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.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Token de atualização revogado com sucesso.",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",search:"Pesquisar",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",enterEmailAndOrUsernameError:"Digite o e-mail e/ou nome de usuário",openAliasVaultToUpgrade:"Abra o AliasVault para atualizar",vaultUpgradeRequired:"Atualização de cofre necessária.",dismissPopup:"Ignorar pop-up"},RI={title:"Credenciais",addCredential:"Adicionar Credencial",editCredential:"Editar Credencial",deleteCredential:"Excluir Credencial",credentialDetails:"Detalhes da Credencial",serviceName:"Nome do Serviço",serviceNamePlaceholder:"ex: G-mail, Facebook, Banco",website:"Site",websitePlaceholder:"https://exemplo.com",username:"Nome de Usuário",usernamePlaceholder:"Digite o nome de usuário",password:"Senha",passwordPlaceholder:"Digite a senha",generatePassword:"Gerar Senha",copyPassword:"Copiar Senha",showPassword:"Mostrar Senha",hidePassword:"Ocultar Senha",notes:"Notas",notesPlaceholder:"Notas adicionais...",totp:"Autenticação de Dois Fatores",totpCode:"Código TOTP",copyTotp:"Copiar TOTP",totpSecret:"Segredo TOTP",totpSecretPlaceholder:"Digite a chave secreta TOTP",noCredentials:"Nenhuma credencial encontrada",noCredentialsDescription:"Adicione sua primeira credencial para começar",searchPlaceholder:"Pesquisar credenciais...",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á",autofill:"Preenchimento Automático",fillForm:"Preencher Formulário",deleteConfirm:"Tem certeza que deseja excluir esta credencial?",saveSuccess:"Credencial salva com sucesso",tags:"Tags",addTag:"Adicionar Tag",removeTag:"Remover Tag",folder:"Pasta",selectFolder:"Selecionar Pasta",createFolder:"Criar Pasta",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"},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."}},OI={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",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",enabled:"Habilitado",disabled:"Desabilitado",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",security:"Segurança",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 ",preferences:"Preferências",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",languageSettingsDescription:"Selecione seu idioma preferido",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"}},MI={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",creatingButton:"Criando...",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 ",enable:"Habilitar AliasVault como provedor de passkey",description:"Quando habilitado, o AliasVault cuidará de solicitações de passkey de websites. Quando um website solicita uma passkey, o AliasVault mostrará um popup ao invés da interface de passkey padrão do navegador ou do OS."}},_I={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.",okay:"Ok",status:{preparingUpgrade:"Preparando atualização...",vaultAlreadyUpToDate:"Cofre já está atualizado",startingDatabaseTransaction:"Iniciando transação no banco de dados...",applyingDatabaseMigrations:"Aplicando migrações do banco de dados...",applyingMigration:"Aplicando migração {{current}} de {{total}}...",committingChanges:"Confirmando mudanças..."},alerts:{error:"Erro",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.",cancel:"Cancelar",continueUpgrade:"Continuar Atualização",upgradeFailed:"Atualização Falhou",failedToApplyMigration:"Falha ao aplicar migração ({{current}} de {{total}})"}},jI={auth:kI,menu:BI,common:DI,content:LI,credentials:RI,emails:UI,settings:OI,passkeys:MI,upgrade:_I},QI={loginTitle:"Войдите в AliasVault",username:"Имя пользователя или почта",usernamePlaceholder:"имя / имя@company.com",password:"Пароль",passwordPlaceholder:"Введите ваш пароль",rememberMe:"Запомнить меня",loginButton:"Логин",noAccount:"Нет аккаунта?",createVault:"Создать новое хранилище",twoFactorTitle:"Пожалуйста, введите код аутентификации из вашего приложения-аутентификатора.",authCode:"Код аутентификации",authCodePlaceholder:"Введите 6-значный код",verify:"Проверить",cancel:"Отменить",twoFactorNote:"Примечание: если у вас нет доступа к устройству аутентификации, вы можете сбросить ваш 2FA с помощью кода восстановления, войдя в систему через сайт.",masterPassword:"Мастер пароль",unlockVault:"Разблокировать хранилище",unlockTitle:"Разблокировать ваше хранилище",unlockDescription:"Введите ваш мастер пароль для разблокировки вашего хранилища.",logout:"Выйти",logoutConfirm:"Вы уверены, что хотите выйти?",sessionExpired:"Время сеанса истекло. Пожалуйста, войдите снова.",unlockSuccess:"Хранилище успешно разблокировано!",unlockSuccessTitle:"Ваше хранилище успешно разблокировано",unlockSuccessDescription:"Теперь вы можете использовать автозаполнение форм входа в Вашем браузере.",closePopup:"Закрыть окно",browseVault:"Обзор содержимого хранилища",connectingTo:"Подключение к",switchAccounts:"Переключить аккаунт?",loggedIn:"Вход выполнен",errors:{invalidCode:"Пожалуйста, введите правильный 6-значный код аутентификации.",serverError:"Не удалось подключиться к серверу AliasVault. Пожалуйста, повторите попытку позже или обратитесь в службу поддержки, если проблема не устранится.",noToken:"Вход не удался -- токен не возвращён",migrationError:"Возникла ошибка при проверке ожидающих перемещений.",wrongPassword:"Неверный пароль. Пожалуйста, повторите попытку.",accountLocked:"Аккаунт временно заблокирован из-за слишком большого числа неудачных попыток.",networkError:"Ошибка сети. Пожалуйста, проверьте соединение и повторите еще раз.",sessionExpired:"Время сеанса истекло. Пожалуйста, войдите снова."}},FI={credentials:"Учетные данные",emails:"Почта",settings:"Настройки"},PI={appName:"AliasVault",loading:"Загрузка...",error:"Ошибка",success:"Успешно",cancel:"Отмена",back:"Back",use:"Использовать",delete:"Удалить",or:"Or",close:"Закрыть",copied:"Скопировано!",openInNewWindow:"Открыть в новом окне",language:"Язык",enabled:"Включено",disabled:"Отключено",showPassword:"Показать пароль",hidePassword:"Скрыть пароль",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 необходимо обновить до более новой версии. Пожалуйста, обратитесь в службу поддержки, если вам нужна помощь.",unknownError:"Произошла неизвестная ошибка",vaultNotAvailable:"Хранилище недоступно",failedToRetrieveData:"Не удалось получить данные",vaultIsLocked:"Хранилище заблокировано",failedToUploadVault:"Не удалось загрузить хранилище",passwordChanged:"С момента вашего последнего входа ваш пароль изменился. Пожалуйста, войдите еще раз в целях безопасности."},apiErrors:{UNKNOWN_ERROR:"Произошла неизвестная ошибка. Пожалуйста, попробуйте снова.",ACCOUNT_LOCKED:"Учетная запись временно заблокирована из-за слишком большого количества неудачных попыток. Пожалуйста, повторите попытку позже.",ACCOUNT_BLOCKED:"Ваша учетная запись была заблокирована. Если вы считаете, что это ошибка, пожалуйста, свяжитесь со службой поддержки.",USER_NOT_FOUND:"Неверное имя пользователя или пароль. Пожалуйста, попробуйте снова.",INVALID_AUTHENTICATOR_CODE:"Неверный код аутентификатора. Пожалуйста, попробуйте снова.",INVALID_RECOVERY_CODE:"Неверный код восстановления. Пожалуйста, попробуйте снова.",REFRESH_TOKEN_REQUIRED:"Требуется токен обновления.",INVALID_REFRESH_TOKEN:"Недопустимый токен обновления.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Токен обновления успешно отозван.",PUBLIC_REGISTRATION_DISABLED:"В настоящее время регистрация новой учетной записи на этом сервере отключена. Пожалуйста, свяжитесь с администратором.",USERNAME_REQUIRED:"Требуется ввести имя пользователя.",USERNAME_ALREADY_IN_USE:"Имя пользователя уже используется.",USERNAME_AVAILABLE:"Имя пользователя доступно.",USERNAME_MISMATCH:"Имя пользователя не соответствует текущему пользователю.",PASSWORD_MISMATCH:"Указанный пароль не совпадает с вашим текущим паролем.",ACCOUNT_SUCCESSFULLY_DELETED:"Аккаунт успешно удалена.",USERNAME_EMPTY_OR_WHITESPACE:"Имя пользователя не может быть пустым или через пробел.",USERNAME_TOO_SHORT:"Слишком короткое имя пользователя: должно быть не менее 3-х символов.",USERNAME_TOO_LONG:"Слишком длинное имя пользователя: оно не может быть длиннее 40 символов.",USERNAME_INVALID_EMAIL:"Неверный адрес электронной почты.",USERNAME_INVALID_CHARACTERS:"Имя пользователя неверно, может содержать только буквы или цифры.",VAULT_NOT_UP_TO_DATE:"Ваше хранилище не обновлено. Пожалуйста, синхронизируйте ваше хранилище и повторите попытку.",INTERNAL_SERVER_ERROR:"Внутренняя ошибка сервера.",VAULT_ERROR:"Локальное хранилище не обновлено. Пожалуйста, синхронизируйте ваше хранилище, обновив страницу, и повторите попытку."}},HI={or:"или",new:"Новый",cancel:"отмена",search:"Поиск",vaultLocked:"AliasVault заблокирован.",creatingNewAlias:"Создание нового псевдонима...",noMatchesFound:"Совпадений не найдено",searchVault:"Поиск хранилища...",serviceName:"Имя сервиса",email:"Электронная почта",username:"Имя пользователя",password:"Пароль",enterServiceName:"Введите имя сервиса",enterEmailAddress:"Введите адрес электронной почты",enterUsername:"Введите имя пользователя",hideFor1Hour:"Скрыть на 1 час (текущий сайт)",hidePermanently:"Скрыть навсегда (текущий сайт)",createRandomAlias:"Создать случайный псевдоним",createUsernamePassword:"Создайте имя пользователя/пароль",randomAlias:"Случайный псевдоним",usernamePassword:"Имя пользователя/пароль",createAndSaveAlias:"Создать и сохранить псевдоним",createAndSaveCredential:"Создать и сохранить учетные данные",randomIdentityDescription:"Сгенерировать случайную личность со случайным адресом электронной почты, доступным в AliasVault.",randomIdentityDescriptionDropdown:"Случайная личность со случайным адресом электронной почты",manualCredentialDescription:"Укажите свой собственный адрес электронной почты и имя пользователя.",manualCredentialDescriptionDropdown:"Ручной ввод имени пользователя и пароля",failedToCreateIdentity:"Не удалось создать личность. Пожалуйста, попробуйте снова.",enterEmailAndOrUsername:"Введите адрес электронной почты и/или имя пользователя",autofillWithAliasVault:"Автозаполнение с помощью AliasVault",generateRandomPassword:"Сгенерировать случайный пароль (скопировать в буфер обмена)",generateNewPassword:"Сгенерировать новый пароль",togglePasswordVisibility:"Переключение видимости пароля",passwordCopiedToClipboard:"Пароль скопирован в буфер обмена",enterEmailAndOrUsernameError:"Введите адрес электронной почты и/или имя пользователя",openAliasVaultToUpgrade:"Откройте AliasVault для обновления",vaultUpgradeRequired:"Требуется обновление хранилища.",dismissPopup:"Закрыть окно"},zI={title:"Учетные данные",addCredential:"Добавить учетные данные",editCredential:"Редактировать учетные данные",deleteCredential:"Удалить учетные данные",credentialDetails:"Подробности учетных данных",serviceName:"Название сервиса",serviceNamePlaceholder:"например, Gmail, Facebook, Банк",website:"Сайт",websitePlaceholder:"https://example.com",username:"Имя пользователя",usernamePlaceholder:"Введите имя пользователя",password:"Пароль",passwordPlaceholder:"Введите пароль",generatePassword:"Сгенерировать пароль",copyPassword:"Скопировать пароль",showPassword:"Показать пароль",hidePassword:"Скрыть пароль",notes:"Заметки",notesPlaceholder:"Дополнительные заметки...",totp:"Двухфакторная аутентификация",totpCode:"TOTP код",copyTotp:"Скопировать TOTP",totpSecret:"TOTP секрет",totpSecretPlaceholder:"Введите секретный ключ TOTP",noCredentials:"Учетные данные не найдены",noCredentialsDescription:"Добавьте свои первые учетные данные, чтобы начать работу",searchPlaceholder:"Поиск учетных данных...",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:"Последнее обновление",autofill:"Автозаполнение",fillForm:"Заполнить форму",deleteConfirm:"Вы уверены, что хотите удалить эти учетные данные?",saveSuccess:"Учетные данные успешно сохранены",tags:"Теги",addTag:"Добавить тег",removeTag:"Удалить тег",folder:"Папка",selectFolder:"Выбрать папку",createFolder:"Создать папку",saveCredential:"Сохранить учетные данные",deleteCredentialTitle:"Удалить учетные данные",deleteCredentialConfirm:"Вы уверены, что хотите удалить эти учетные данные? Это действие невозможно отменить.",filters:{all:"(All) Credentials",passkeys:"Passkeys",aliases:"Aliases",userpass:"Passwords",attachments:"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={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:"При попытке загрузить письма произошла ошибка. Пожалуйста, попробуйте отредактировать и сохранить данные для синхронизации базы данных, затем повторите попытку."}},GI={title:"Настройки",serverUrl:"URL-адрес сервера",language:"Язык",autofillEnabled:"Включить автозаполнение",version:"Версия",openInNewWindow:"Открыть в новом окне",openWebApp:"Открыть веб-приложение",loggedIn:"Вход выполнен",logout:"Выйти",globalSettings:"Глобальные настройки",autofillPopup:"Всплывающее окно автозаполнения",activeOnAllSites:"Активен на всех сайтах (если не отключен ниже)",disabledOnAllSites:"Отключено на всех сайтах",enabled:"Включен",disabled:"Выключен",rightClickContextMenu:"Контекстное меню правым щелчком мыши",autofillMatching:"Соответствие автозаполнения",autofillMatchingMode:"Режим сопоставления автозаполнения",autofillMatchingModeDescription:"Определяет, какие учетные данные считаются соответствующими и отображаются в качестве предложений во всплывающем окне автозаполнения для данного веб-сайта.",autofillMatchingDefault:"URL + поддомен + подстановочный знак в названии",autofillMatchingUrlSubdomain:"URL + поддомен",autofillMatchingUrlExact:"Только точный URL-адрес домена",siteSpecificSettings:"Настройки для конкретного сайта",autofillPopupOn:"Всплывающее окно автозаполнения: ",enabledForThisSite:"Включено для этого сайта",disabledForThisSite:"Отключено для этого сайта",temporarilyDisabledUntil:"Временно отключен до тех пор, пока",resetAllSiteSettings:"Сбросить все настройки для сайтов",appearance:"Внешний вид",theme:"Тема",useDefault:"Использовать по умолчанию",light:"Светлая",dark:"Темная",keyboardShortcuts:"Горячие клавиши",configureKeyboardShortcuts:"Настройка горячих клавиш",configure:"Настройка",security:"Безопасность",clipboardClearTimeout:"Очистить буфер обмена после копирования",clipboardClearTimeoutDescription:"Автоматическая очистка буфера обмена после копирования конфиденциальных данных",clipboardClearDisabled:"Никогда не очищать",clipboardClear5Seconds:"Очистка через 5 секунд",clipboardClear10Seconds:"Очистка через 10 секунд",clipboardClear15Seconds:"Очистка через 15 секунд",autoLockTimeout:"Тайм-аут автоматической блокировки",autoLockTimeoutDescription:"Автоматическая блокировка хранилища после некоторого периода бездействия",autoLockTimeoutHelp:"Хранилище будет заблокировано только по истечении указанного периода бездействия (не будет использоваться функция автозаполнения или не откроется всплывающее окно с расширением). Хранилище всегда будет заблокировано при закрытии браузера, независимо от этого параметра.",autoLockNever:"Никогда",autoLock15Seconds:"15 секунд",autoLock1Minute:"1 минута",autoLock5Minutes:"5 минут",autoLock15Minutes:"15 минут",autoLock30Minutes:"30 минут",autoLock1Hour:"1 час",autoLock4Hours:"4 часа",autoLock8Hours:"8 часов",autoLock24Hours:"24 часов",versionPrefix:"Версия ",preferences:"Предпочтения",autofillSettings:"Настройки автозаполнения",clipboardSettings:"Настройки буфера обмена",contextMenuSettings:"Настройки контекстного меню",passkeySettings:"Passkey Settings",contextMenu:"Контекстное меню",contextMenuEnabled:"Контекстное меню включено",contextMenuDisabled:"Контекстное меню отключено",contextMenuDescription:"Щелкните правой кнопкой мыши на полях ввода, чтобы получить доступ к параметрам AliasVault",selectLanguage:"Выбрать язык",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",languageSettingsDescription:"Choose your preferred language",validation:{apiUrlRequired:"Требуется URL-адрес API",apiUrlInvalid:"Пожалуйста, введите корректный URL-адрес API",clientUrlRequired:"Требуется URL-адрес клиента",clientUrlInvalid:"Пожалуйста, введите корректный URL-адрес клиента"}},KI={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",creatingButton:"Creating...",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 ",enable:"Enable AliasVault as passkey provider",description:"When enabled, AliasVault will handle passkey requests from websites. When a website requests a passkey, the AliasVault popup will be shown instead of the native browser or OS passkey interface."}},qI={title:"Обновить хранилище",subtitle:"AliasVault обновился, и ваше хранилище необходимо обновить. Это займет всего несколько секунд.",versionInformation:"Информация о версии",yourVault:"Версия вашего хранилища:",newVersion:"Доступна новая версия:",upgrade:"Обновить хранилище",upgrading:"Обновление...",logout:"Выйти",whatsNew:"Что нового",whatsNewDescription:"Для поддержки следующих изменений требуется обновление:",noDescriptionAvailable:"Описание для этой версии недоступно.",okay:"ОК",status:{preparingUpgrade:"Подготовка обновления...",vaultAlreadyUpToDate:"Хранилище уже обновлено",startingDatabaseTransaction:"Запуск операции с базой данных...",applyingDatabaseMigrations:"Применение перемещения базы данных...",applyingMigration:"Применяя перемещение {{current}} из {{total}}...",committingChanges:"Фиксация изменений..."},alerts:{error:"Ошибка",unableToGetVersionInfo:"Не удалось получить информацию о версии. Пожалуйста, попробуйте снова.",selfHostedServer:"Автономный сервер",selfHostedWarning:"Если вы используете автономный сервер, обязательно обновите свой автономный экземпляр, так как в противном случае вход в веб-клиент перестанет работать.",cancel:"Отменить",continueUpgrade:"Продолжить обновление",upgradeFailed:"Ошибка обновления",failedToApplyMigration:"Не удалось применить перенос ({{current}} из {{total}})"}},YI={auth:QI,menu:FI,common:PI,content:HI,credentials:zI,emails:VI,settings:GI,passkeys:KI,upgrade:qI},WI={loginTitle:"Увійти до AliasVault",username:"Ім'я користувача або електронна пошта",usernamePlaceholder:"ім'я / name@company.com",password:"Пароль",passwordPlaceholder:"Введіть ваш пароль",rememberMe:"Запам'ятати мене",loginButton:"Увійти",noAccount:"Ще не маєте облікового запису?",createVault:"Створити нове сховище",twoFactorTitle:"Будь ласка, введіть код автентифікації з вашого застосунку для автентифікації.",authCode:"Код автентифікації",authCodePlaceholder:"Введіть 6-значний код",verify:"Перевірка",cancel:"Скасувати",twoFactorNote:"Примітка: якщо у вас немає доступу до вашого пристрою автентифікатора, ви можете скинути налаштування 2FA за допомогою коду відновлення, увійшовши через вебсайт.",masterPassword:"Головний пароль",unlockVault:"Розблокувати Vault",unlockTitle:"Розблокувати своє сховище",unlockDescription:"Введіть свій головний пароль, щоб розблокувати сховище.",logout:"Вийти",logoutConfirm:"Ви впевнені, що хочете вийти?",sessionExpired:"Ваш сеанс закінчився. Будь ласка, увійдіть знову.",unlockSuccess:"Сховище успішно розблоковано!",unlockSuccessTitle:"Ваше сховище успішно розблоковано",unlockSuccessDescription:"Тепер ви можете використовувати автозаповнення форм входу у вашому браузері.",closePopup:"Закрити цю підказку",browseVault:"Переглянути вміст сховища",connectingTo:"Підключення до",switchAccounts:"Змінити обліковий запис?",loggedIn:"Вхід виконано",errors:{invalidCode:"Будь ласка, введіть дійсний 6-значний код автентифікації.",serverError:"Не вдалося зв’язатися зі сервером AliasVault. Будь ласка, спробуйте пізніше або зверніться до служби підтримки, якщо проблема не зникне.",noToken:"Не вдалося ввійти -- токен не знайдено",migrationError:"Під час перевірки незавершених перенесень сталася помилка.",wrongPassword:"Невірний пароль. Будь ласка, спробуйте ще раз.",accountLocked:"Обліковий запис тимчасово заблоковано через занадто багато невдалих спроб.",networkError:"Помилка мережі. Будь ласка, перевірте з’єднання та спробуйте ще раз.",sessionExpired:"Your session has expired. Please log in again."}},XI={credentials:"Облікові дані",emails:"Електронні адреси",settings:"Налаштування"},JI={appName:"AliasVault",loading:"Завантаження даних...",error:"Помилка",success:"Успішно",cancel:"Скасувати",back:"Back",use:"Використовувати",delete:"Видалити",or:"Or",close:"Закрити",copied:"Скопійовано!",openInNewWindow:"Відкрити у новому вікні",language:"Мова",enabled:"Увімкнено",disabled:"Вимкнено",showPassword:"Показати пароль",hidePassword:"Приховати пароль",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:"This browser extension is outdated and cannot be used to access this vault. Please update this browser extension to continue.",serverVersionNotSupported:"Щоб використовувати це розширення браузера, потрібно оновити сервер AliasVault до новішої версії. Зверніться до служби підтримки, якщо вам потрібна допомога.",unknownError:"Сталася невідома помилка",vaultNotAvailable:"Сховище недоступне",failedToRetrieveData:"Не вдалося отримати дані",vaultIsLocked:"Сховище заблоковано",failedToUploadVault:"Не вдалося завантажити сховище",passwordChanged:"Ваш пароль змінився з моменту останнього входу. З міркувань безпеки, будь ласка, увійдіть ще раз."},apiErrors:{UNKNOWN_ERROR:"Сталася невідома помилка. Будь ласка, спробуйте ще раз.",ACCOUNT_LOCKED:"Обліковий запис тимчасово заблоковано через занадто багато невдалих спроб. Будь ласка, спробуйте пізніше.",ACCOUNT_BLOCKED:"Ваш обліковий запис вимкнено. Якщо ви вважаєте, що це помилка, зверніться до служби підтримки.",USER_NOT_FOUND:"Недійсне ім'я користувача або пароль. Спробуйте ще раз.",INVALID_AUTHENTICATOR_CODE:"Недійсний код автентифікатора. Спробуйте ще раз.",INVALID_RECOVERY_CODE:"Недійсний код відновлення. Будь ласка, спробуйте ще раз.",REFRESH_TOKEN_REQUIRED:"Необхідне оновлення токена.",INVALID_REFRESH_TOKEN:"Оновлення токена невдале.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Оновлення токена відкликано успішно.",PUBLIC_REGISTRATION_DISABLED:"Реєстрація нових облікових записів на цьому сервері наразі вимкнена. Зверніться до адміністратора.",USERNAME_REQUIRED:"Ім'я користувача обов'язкове.",USERNAME_ALREADY_IN_USE:"Ім'я користувача вже використовується.",USERNAME_AVAILABLE:"Ім'я користувача доступне.",USERNAME_MISMATCH:"Ім'я користувача не відповідає поточному користувачеві.",PASSWORD_MISMATCH:"Введений пароль не відповідає вашому поточному паролю.",ACCOUNT_SUCCESSFULLY_DELETED:"Обліковий запис успішно видалено.",USERNAME_EMPTY_OR_WHITESPACE:"Ім’я користувача не може бути порожнім або містити пробіли.",USERNAME_TOO_SHORT:"Ім’я користувача закоротке: має містити щонайменше 3 символи.",USERNAME_TOO_LONG:"Ім'я користувача занадто довге: не може бути довшим за 40 символів.",USERNAME_INVALID_EMAIL:"Недійсна адреса електронної пошти.",USERNAME_INVALID_CHARACTERS:"Ім'я користувача недійсне, може містити лише літери або цифри.",VAULT_NOT_UP_TO_DATE:"Ваше сховище застаріло. Синхронізуйте його та спробуйте ще раз.",INTERNAL_SERVER_ERROR:"Внутрішня помилка сервера.",VAULT_ERROR:"Локальне сховище не оновлене. Синхронізуйте своє сховище, оновивши сторінку, та повторіть спробу."}},$I={or:"або",new:"Новий",cancel:"Скасувати",search:"Пошук",vaultLocked:"AliasVault заблоковано.",creatingNewAlias:"Створення нового псевдоніму...",noMatchesFound:"Збігів не знайдено",searchVault:"Пошук сховища...",serviceName:"Назва служби",email:"Електронна пошта",username:"Ім'я користувача",password:"Пароль",enterServiceName:"Введіть назву служби",enterEmailAddress:"Введіть електронну адресу",enterUsername:"Введіть ім'я користувача",hideFor1Hour:"Сховати протягом 1 години (поточний сайт)",hidePermanently:"Приховати назавжди (поточний сайт)",createRandomAlias:"Створити випадковий псевдонім",createUsernamePassword:"Створити ім'я користувача/пароль",randomAlias:"Випадковий псевдонім",usernamePassword:"Ім'я користувача/Пароль",createAndSaveAlias:"Створити та зберегти псевдонім",createAndSaveCredential:"Створити та зберегти облікові дані",randomIdentityDescription:"Згенеруйте випадкову особу з випадковою адресою електронної пошти, доступною в AliasVault.",randomIdentityDescriptionDropdown:"Випадкова ідентифікація з випадковою електронною поштою",manualCredentialDescription:"Вкажіть власну адресу електронної пошти та ім'я користувача.",manualCredentialDescriptionDropdown:"Ім'я користувача та пароль вручну",failedToCreateIdentity:"Не вдалося створити ідентифікатор. Спробуйте ще раз.",enterEmailAndOrUsername:"Введіть електронну пошту та/або ім'я користувача",autofillWithAliasVault:"Автозаповнення за допомогою AliasVault",generateRandomPassword:"Згенерувати випадковий пароль (скопіювати в буфер обміну)",generateNewPassword:"Згенерувати новий пароль",togglePasswordVisibility:"Перемикання видимості пароля",passwordCopiedToClipboard:"Пароль скопійовано в буфер обміну",enterEmailAndOrUsernameError:"Введіть електронну пошту та/або ім'я користувача",openAliasVaultToUpgrade:"Відкрити AliasVault для покращення",vaultUpgradeRequired:"Потрібне оновлення сховища.",dismissPopup:"Закрити спливаюче вікно"},ZI={title:"Облікові дані",addCredential:"Додати облікові дані",editCredential:"Редагувати облікові дані",deleteCredential:"Видалити облікові дані",credentialDetails:"Відомості про облікові дані",serviceName:"Назва сервісу",serviceNamePlaceholder:"наприклад, Gmail, Facebook, Bank",website:"Вебсайт",websitePlaceholder:"https://example.com",username:"Ім'я користувача",usernamePlaceholder:"Введіть ім'я користувача",password:"Пароль",passwordPlaceholder:"Введіть пароль",generatePassword:"Згенерувати пароль",copyPassword:"Копіювати пароль",showPassword:"Показати пароль",hidePassword:"Приховати пароль",notes:"Нотатки",notesPlaceholder:"Додаткові нотатки...",totp:"Двофакторна аутентифікація",totpCode:"Код TOTP",copyTotp:"Копіювати TOTP",totpSecret:"Секрет TOTP",totpSecretPlaceholder:"Введіть секретний ключ TOTP",noCredentials:"Облікових даних не знайдено",noCredentialsDescription:"Додайте свої перші облікові дані, щоб розпочати",searchPlaceholder:"Пошук облікових даних...",welcomeTitle:"Ласкаво просимо до AliasVult!",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:"Останнє оновлення",autofill:"Автозаповнення",fillForm:"Заповнити форму",deleteConfirm:"Ви впевнені, що хочете видалити ці облікові дані?",saveSuccess:"Облікові дані успішно збережено",tags:"Теги",addTag:"Додати тег",removeTag:"Видалити тег",folder:"Тека",selectFolder:"Вибрати теку",createFolder:"Створити теку",saveCredential:"Зберегти облікові дані",deleteCredentialTitle:"Видалити облікові дані",deleteCredentialConfirm:"Ви впевнені, що хочете видалити ці облікові дані? Цю дію неможливо скасувати.",filters:{all:"(All) Credentials",passkeys:"Passkeys",aliases:"Aliases",userpass:"Passwords",attachments:"Attachments"},randomAlias:"Випадковий псевдонім",manual:"Посібник",service:"Служба",serviceUrl:"URL-адреса сервісу",loginCredentials:"Дані для входу",generateRandomUsername:"Згенерувати випадкове ім'я користувача",generateRandomPassword:"Згенерувати випадковий пароль",changePasswordComplexity:"Зміна складності пароля",passwordLength:"Довжина пароля",includeLowercase:"Включити малі літери",includeUppercase:"Включити великі літери",includeNumbers:"Включити числа",includeSpecialChars:"Включити спеціальні символи",avoidAmbiguousChars:"Уникайте неоднозначних символів (o, 0 тощо)",generateNewPreview:"Згенерувати новий попередній перегляд",generateRandomAlias:"Генерувати випадковий псевдонім",clearAliasFields:"Clear Alias Fields",alias:"Псевдонім",firstName:"Ім’я",lastName:"Прізвище",nickName:"Нікнейм",gender:"Стать",birthDate:"Дата народження",birthDatePlaceholder:"РРРР-ММ-ДД",metadata:"Метадані",validation:{required:"Це поле обов'язкове",serviceNameRequired:"Назва служби обов'язкова",invalidEmail:"Недійсний формат електронної пошти",invalidDateFormat:"Дата має бути у форматі РРРР-ММ-ДД"},privateEmailTitle:"Приватна електронна адреса",privateEmailAliasVaultServer:"Сервер AliasVault",privateEmailDescription:"Наскрізне шифрування, повністю конфіденційно.",publicEmailTitle:"Публічні тимчасові постачальники електронної пошти",publicEmailDescription:"Анонімність, але обмежена конфіденційність. Зміст електронного листа може прочитати будь-хто, хто знає адресу.",useDomainChooser:"Використовувати засіб вибору домену",enterCustomDomain:"Введіть користувацький домен",enterFullEmail:"Введіть повну електронну адресу",enterEmailPrefix:"Введіть префікс електронної адреси"},eN={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:"Під час спроби завантажити електронні листи сталася помилка. Спробуйте відредагувати та зберегти запис облікових даних, щоб синхронізувати базу даних, а потім повторіть спробу."}},tN={title:"Налаштування",serverUrl:"URL-адреса сервера",language:"Мова",autofillEnabled:"Увімкнути автозаповнення",version:"Версія",openInNewWindow:"Відкрити у новому вікні",openWebApp:"Відкрити веб додаток",loggedIn:"Вхід виконано",logout:"Вийти",globalSettings:"Глобальні налаштування",autofillPopup:"Спливаюче вікно автозаповнення",activeOnAllSites:"Активно на всіх сайтах (якщо не вимкнено нижче)",disabledOnAllSites:"Вимкнено на всіх сайтах",enabled:"Увімкнено",disabled:"Вимкнено",rightClickContextMenu:"Контекстне меню правою кнопкою миші",autofillMatching:"Автозаповнення відповідності",autofillMatchingMode:"Режим автозаповнення відповідностей",autofillMatchingModeDescription:"Визначає, які облікові дані вважаються відповідними та будуть показуватися як пропозиції у спливному вікні автозаповнення для певного вебсайту.",autofillMatchingDefault:"URL-адреса + піддомен + універсальне ім'я",autofillMatchingUrlSubdomain:"URL-адреса + піддомен",autofillMatchingUrlExact:"Лише точний домен URL-адреси",siteSpecificSettings:"Налаштування, специфічні для сайту",autofillPopupOn:"Спливаюче вікно автозаповнення на: ",enabledForThisSite:"Увімкнено для цього сайту",disabledForThisSite:"Вимкнено для цього сайту",temporarilyDisabledUntil:"Тимчасово вимкнено до ",resetAllSiteSettings:"Скинути всі налаштування, характерні для сайту",appearance:"Зовнішній вигляд",theme:"Тема",useDefault:"Використовувати за замовчуванням",light:"Світла",dark:"Темна",keyboardShortcuts:"Комбінації клавіш",configureKeyboardShortcuts:"Налаштування комбінацій клавіш",configure:"Налаштування",security:"Безпека",clipboardClearTimeout:"Очистити буфер обміну після копіювання",clipboardClearTimeoutDescription:"Автоматично очищати буфер обміну після копіювання конфіденційних даних",clipboardClearDisabled:"Ніколи не очищати",clipboardClear5Seconds:"Очистити після 5 секунд",clipboardClear10Seconds:"Очистити після 10 секунд",clipboardClear15Seconds:"Очистити після 15 секунд",autoLockTimeout:"Тайм-аут автоматичного блокування",autoLockTimeoutDescription:"Автоматично блокувати сховище після періоду бездіяльності",autoLockTimeoutHelp:"Сховище буде заблоковано лише після зазначеного періоду бездіяльності (не використовується автозаповнення або не відкривається спливне вікно розширення). Сховище завжди блокуватиметься, коли браузер закривається, незалежно від цього налаштування.",autoLockNever:"Ніколи",autoLock15Seconds:"15 секунд",autoLock1Minute:"1 хвилина",autoLock5Minutes:"5 хвилин",autoLock15Minutes:"15 хвилин",autoLock30Minutes:"30 хвилин",autoLock1Hour:"1 година",autoLock4Hours:"4 години",autoLock8Hours:"8 годин",autoLock24Hours:"24 години",versionPrefix:"Версія ",preferences:"Налаштування",autofillSettings:"Налаштування автозаповнення",clipboardSettings:"Параметри буфера обміну",contextMenuSettings:"Налаштування контекстного меню",passkeySettings:"Passkey Settings",contextMenu:"Контекстне меню",contextMenuEnabled:"Контекстне меню увімкнено",contextMenuDisabled:"Контекстне меню вимкнено",contextMenuDescription:"Натисніть правою кнопкою миші на поля введення, щоб отримати доступ до параметрів AliasVault",selectLanguage:"Виберіть мову",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",languageSettingsDescription:"Choose your preferred language",validation:{apiUrlRequired:"URL-адреса API обов'язкова",apiUrlInvalid:"Будь ласка, введіть дійсну URL-адресу API",clientUrlRequired:"URL-адреса клієнта обов'язкова",clientUrlInvalid:"Будь ласка, введіть дійсну URL-адресу клієнта"}},aN={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",creatingButton:"Creating...",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 ",enable:"Enable AliasVault as passkey provider",description:"When enabled, AliasVault will handle passkey requests from websites. When a website requests a passkey, the AliasVault popup will be shown instead of the native browser or OS passkey interface."}},rN={title:"Оновлення сховища",subtitle:"AliasVault оновлено, і ваше сховище потрібно оновити. Це займе лише кілька секунд.",versionInformation:"Інформація про версію",yourVault:"Your vault version:",newVersion:"New available version:",upgrade:"Оновлення сховища",upgrading:"Оновлення...",logout:"Вихід",whatsNew:"Що нового",whatsNewDescription:"Для підтримки таких змін потрібне оновлення:",noDescriptionAvailable:"Для цієї версії немає опису.",okay:"Ок",status:{preparingUpgrade:"Підготовка оновлення...",vaultAlreadyUpToDate:"Сховище вже оновлено",startingDatabaseTransaction:"Початок транзакції бази даних...",applyingDatabaseMigrations:"Застосування міграцій бази даних...",applyingMigration:"Застосування міграції {{current}} з {{total}}...",committingChanges:"Внесення змін..."},alerts:{error:"Помилка",unableToGetVersionInfo:"Не вдалося отримати інформацію про версію. Спробуйте ще раз.",selfHostedServer:"Сервер із самостійним розміщенням",selfHostedWarning:"Якщо ви використовуєте власний сервер, обов’язково оновіть і свій власний екземпляр, інакше вхід до вебклієнта перестане працювати.",cancel:"Скасувати",continueUpgrade:"Продовжити оновлення",upgradeFailed:"Помилка оновлення",failedToApplyMigration:"Не вдалося застосувати міграцію ({{current}} з {{total}})"}},nN={auth:WI,menu:XI,common:JI,content:$I,credentials:ZI,emails:eN,settings:tN,passkeys:aN,upgrade:rN},iN={loginTitle:"登录AliasVault",username:"用户名或电子邮箱",usernamePlaceholder:"姓名 / name@company.com",password:"密码",passwordPlaceholder:"输入您的密码",rememberMe:"记住我",loginButton:"登录",noAccount:"还没有账户？",createVault:"创建新密码库",twoFactorTitle:"请输入认证器的动态验证码。",authCode:"动态验证码",authCodePlaceholder:"输入6位动态验证码",verify:"验证",cancel:"取消",twoFactorNote:"注意：如果无法访问您的认证设备，您可以通过网站登录，使用恢复码重置双因素认证（2FA）。",masterPassword:"主密码",unlockVault:"解锁密码库",unlockTitle:"解锁您的密码库",unlockDescription:"输入您的主密码以解锁密码库。",logout:"登出",logoutConfirm:"确定要退出登录吗？",sessionExpired:"您的会话已过期。请重新登录。",unlockSuccess:"密码库解锁成功！",unlockSuccessTitle:"您的密码库已成功解锁",unlockSuccessDescription:"现在您可以在浏览器的登录表单中使用自动填充功能了。",closePopup:"关闭此弹窗",browseVault:"浏览密码库内容",connectingTo:"正在连接到",switchAccounts:"切换账户？",loggedIn:"已登录",errors:{invalidCode:"请输入有效的6位动态验证码。",serverError:"无法连接到AliasVault服务器。请稍后重试，若问题依旧，请联系支持人员。",noToken:"登录失败——未返回令牌",migrationError:"检查待处理迁移时发生错误。",wrongPassword:"密码不正确。请重试。",accountLocked:"由于多次尝试失败，账户已暂时锁定。",networkError:"网络错误。请检查您的连接后重试。",sessionExpired:"您的会话已过期。请重新登录。"}},sN={credentials:"凭据",emails:"电子邮件",settings:"设置"},oN={appName:"AliasVault",loading:"加载中…",error:"错误",success:"成功",cancel:"取消",back:"Back",use:"使用",delete:"删除",or:"Or",close:"关闭",copied:"已复制！",openInNewWindow:"在新窗口中打开",language:"语言",enabled:"启用",disabled:"禁用",showPassword:"显示密码",hidePassword:"隐藏密码",copyToClipboard:"复制到剪贴板",loadingEmails:"加载邮件中…",loadingTotpCodes:"加载TOTP验证码中…",attachments:"附件",loadingAttachments:"加载附件中…",settings:"设置",recentEmails:"最近邮件",loginCredentials:"登录凭据",twoFactorAuthentication:"双因素认证（2FA）",alias:"别名",notes:"备注",fullName:"全名",firstName:"名",lastName:"姓",birthDate:"出生日期",nickname:"昵称",email:"电子邮箱",username:"用户名",password:"密码",syncingVault:"正在同步密码库",savingChangesToVault:"正在保存对密码库的更改",uploadingVaultToServer:"正在将密码库上传到服务器",checkingVaultUpdates:"检查密码库更新中",syncingUpdatedVault:"同步更新后的密码库",executingOperation:"执行操作中…",loadMore:"加载更多",errors:{serverNotAvailable:"AliasVault服务器不可用。请稍后重试，若问题持续请联系支持人员。",clientVersionNotSupported:"此版本的AliasVault浏览器扩展已不被服务器支持。请将浏览器扩展更新到最新版本。",browserExtensionOutdated:"此浏览器扩展已过时，无法用于访问此密码库。请更新此浏览器扩展以继续。",serverVersionNotSupported:"AliasVault服务器需要更新到新版本才能使用此浏览器扩展。如需帮助，请联系支持人员。",unknownError:"发生未知错误",vaultNotAvailable:"密码库不可用",failedToRetrieveData:"无法检索数据",vaultIsLocked:"密码库已锁定",failedToUploadVault:"上传密码库失败",passwordChanged:"登录密码已更新，请重新登录以确保账户安全。"},apiErrors:{UNKNOWN_ERROR:"发生未知错误。请重试。",ACCOUNT_LOCKED:"由于多次尝试失败，账户已暂时锁定。请稍后重试。",ACCOUNT_BLOCKED:"您的账户已被停用。若您认为此操作有误，请联系支持人员。",USER_NOT_FOUND:"用户名或密码无效。请重试。",INVALID_AUTHENTICATOR_CODE:"认证器验证码无效。请重试。",INVALID_RECOVERY_CODE:"恢复码无效。请重试。",REFRESH_TOKEN_REQUIRED:"刷新令牌为必填项。",INVALID_REFRESH_TOKEN:"刷新令牌无效。",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"刷新令牌已成功撤销。",PUBLIC_REGISTRATION_DISABLED:"当前服务器已禁用新账户注册。请联系管理员。",USERNAME_REQUIRED:"用户名为必填项。",USERNAME_ALREADY_IN_USE:"用户名已被使用。",USERNAME_AVAILABLE:"用户名可用。",USERNAME_MISMATCH:"用户名与当前用户不匹配。",PASSWORD_MISMATCH:"提供的密码与您的当前密码不匹配。",ACCOUNT_SUCCESSFULLY_DELETED:"账户已成功删除。",USERNAME_EMPTY_OR_WHITESPACE:"用户名不能为空或仅含空格。",USERNAME_TOO_SHORT:"用户名过短：至少需要3个字符。",USERNAME_TOO_LONG:"用户名过长：不能超过40个字符。",USERNAME_INVALID_EMAIL:"无效的邮箱地址。",USERNAME_INVALID_CHARACTERS:"用户名无效，只能包含字母或数字。",VAULT_NOT_UP_TO_DATE:"您的密码库不是最新的。请同步您的密码库后重试。",INTERNAL_SERVER_ERROR:"服务器内部错误。",VAULT_ERROR:"本地密码库不是最新的。请刷新页面同步密码库后重试。"}},lN={or:"或",new:"新建",cancel:"取消",search:"搜索",vaultLocked:"AliasVault已锁定。",creatingNewAlias:"正在创建新别名…",noMatchesFound:"未找到匹配项",searchVault:"搜索密码库…",serviceName:"服务名称",email:"电子邮箱",username:"用户名",password:"密码",enterServiceName:"输入服务名称",enterEmailAddress:"输入邮箱地址",enterUsername:"输入用户名",hideFor1Hour:"隐藏1小时（当前网站）",hidePermanently:"永久隐藏（当前网站）",createRandomAlias:"创建随机别名",createUsernamePassword:"创建用户名/密码",randomAlias:"随机别名",usernamePassword:"用户名/密码",createAndSaveAlias:"创建并保存别名",createAndSaveCredential:"创建并保存凭据",randomIdentityDescription:"生成一个包含随机邮箱地址的随机身份，可在AliasVault中查看。",randomIdentityDescriptionDropdown:"带随机邮箱的随机身份",manualCredentialDescription:"指定您自己的邮箱地址和用户名。",manualCredentialDescriptionDropdown:"手动输入用户名和密码",failedToCreateIdentity:"创建身份失败。请重试。",enterEmailAndOrUsername:"输入邮箱和/或用户名",autofillWithAliasVault:"使用AliasVault自动填充",generateRandomPassword:"生成随机密码（复制到剪贴板）",generateNewPassword:"生成新密码",togglePasswordVisibility:"切换密码可见性",passwordCopiedToClipboard:"密码已复制到剪贴板",enterEmailAndOrUsernameError:"请输入邮箱和/或用户名",openAliasVaultToUpgrade:"打开AliasVault进行升级",vaultUpgradeRequired:"需要升级密码库。",dismissPopup:"关闭弹窗"},uN={title:"凭据",addCredential:"添加凭据",editCredential:"编辑凭据",deleteCredential:"删除凭据",credentialDetails:"凭据详情",serviceName:"服务名称",serviceNamePlaceholder:"例如：Gmail、Facebook、银行",website:"网站",websitePlaceholder:"https://example.com",username:"用户名",usernamePlaceholder:"输入用户名",password:"密码",passwordPlaceholder:"输入密码",generatePassword:"生成密码",copyPassword:"复制密码",showPassword:"显示密码",hidePassword:"隐藏密码",notes:"备注",notesPlaceholder:"附加备注…",totp:"双因素认证（2FA）",totpCode:"TOTP验证码",copyTotp:"复制 TOTP",totpSecret:"TOTP密钥",totpSecretPlaceholder:"输入TOTP密钥",noCredentials:"未找到凭据",noCredentialsDescription:"添加您的第一个凭据开始使用",searchPlaceholder:"搜索凭据…",welcomeTitle:"欢迎使用AliasVault！",welcomeDescription:"要使用AliasVault浏览器扩展：导航到某个网站，使用AliasVault自动填充弹窗创建新凭据。",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:"最后更新时间",autofill:"自动填充",fillForm:"填充表单",deleteConfirm:"确定要删除此凭据吗？",saveSuccess:"凭据保存成功",tags:"标签",addTag:"添加标签",removeTag:"移除标签",folder:"文件夹",selectFolder:"选择文件夹",createFolder:"创建文件夹",saveCredential:"保存凭据",deleteCredentialTitle:"删除凭据",deleteCredentialConfirm:"确定要删除此凭据吗？此操作无法撤销。",filters:{all:"(All) Credentials",passkeys:"Passkeys",aliases:"Aliases",userpass:"Passwords",attachments:"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:"输入邮箱前缀"},cN={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:"加载邮件时发生错误。请尝试编辑并保存凭据条目以同步数据库，然后重试。"}},dN={title:"设置",serverUrl:"服务器 URL",language:"语言",autofillEnabled:"启用自动填充",version:"版本",openInNewWindow:"在新窗口中打开",openWebApp:"打开网页应用",loggedIn:"已登录",logout:"登出",globalSettings:"全局设置",autofillPopup:"自动填充弹窗",activeOnAllSites:"在所有网站上激活（除非在下方禁用）",disabledOnAllSites:"在所有网站上禁用",enabled:"启用",disabled:"禁用",rightClickContextMenu:"右键上下文菜单",autofillMatching:"自动填充匹配",autofillMatchingMode:"自动填充匹配模式",autofillMatchingModeDescription:"用于判定哪些凭据会被视为匹配项，并在指定网站的自动填充弹窗中显示为建议选项。",autofillMatchingDefault:"URL + 子域名 + 名称通配符",autofillMatchingUrlSubdomain:"URL + 子域名",autofillMatchingUrlExact:"精确匹配URL域名",siteSpecificSettings:"网站特定设置",autofillPopupOn:"自动填充弹窗在以下位置： ",enabledForThisSite:"对此网站启用",disabledForThisSite:"对此网站禁用",temporarilyDisabledUntil:"暂时禁用至 ",resetAllSiteSettings:"重置所有网站特定设置",appearance:"外观",theme:"主题",useDefault:"使用默认",light:"浅色",dark:"深色",keyboardShortcuts:"键盘快捷键",configureKeyboardShortcuts:"配置键盘快捷键",configure:"配置",security:"安全",clipboardClearTimeout:"复制后清除剪贴板",clipboardClearTimeoutDescription:"复制敏感数据后自动清除剪贴板",clipboardClearDisabled:"从不清除",clipboardClear5Seconds:"5秒后清除",clipboardClear10Seconds:"10 秒后清除",clipboardClear15Seconds:"15分钟后清除",autoLockTimeout:"自动锁定超时时间",autoLockTimeoutDescription:"无操作一段时间后自动锁定密码库",autoLockTimeoutHelp:"密码库仅在达到指定的无操作时长后才会锁定（未使用自动填充功能或未打开扩展程序弹窗）。无论此设置如何，关闭浏览器时密码库始终会锁定。",autoLockNever:"从不",autoLock15Seconds:"15 秒",autoLock1Minute:"1 分钟",autoLock5Minutes:"5 分钟",autoLock15Minutes:"15 分钟",autoLock30Minutes:"30 分钟",autoLock1Hour:"1 小时",autoLock4Hours:"4 小时",autoLock8Hours:"8 小时",autoLock24Hours:"24 小时",versionPrefix:"版本 ",preferences:"首选项",autofillSettings:"自动填充设置",clipboardSettings:"剪贴板设置",contextMenuSettings:"上下文菜单设置",passkeySettings:"Passkey Settings",contextMenu:"上下文菜单",contextMenuEnabled:"上下文菜单已启用",contextMenuDisabled:"上下文菜单已停用",contextMenuDescription:"右键点击输入字段即可访问 AliasVault 选项",selectLanguage:"选择语言",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",languageSettingsDescription:"Choose your preferred language",validation:{apiUrlRequired:"API URL 为必填项",apiUrlInvalid:"请输入有效的 API URL",clientUrlRequired:"客户端 URL 为必填项",clientUrlInvalid:"请输入有效的客户端 URL"}},AN={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",creatingButton:"Creating...",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 ",enable:"Enable AliasVault as passkey provider",description:"When enabled, AliasVault will handle passkey requests from websites. When a website requests a passkey, the AliasVault popup will be shown instead of the native browser or OS passkey interface."}},fN={title:"升级密码库",subtitle:"AliasVault已更新，您的密码库需要升级，仅需数秒。",versionInformation:"版本信息",yourVault:"您的密码库版本：",newVersion:"新可用版本：",upgrade:"升级密码库",upgrading:"升级中…",logout:"退出登录",whatsNew:"新功能",whatsNewDescription:"需要升级才能支持以下更改：",noDescriptionAvailable:"此版本无可用说明。",okay:"确定",status:{preparingUpgrade:"准备升级中…",vaultAlreadyUpToDate:"当前密码库数据已是最新",startingDatabaseTransaction:"开始数据库事务…",applyingDatabaseMigrations:"应用数据库迁移…",applyingMigration:"应用迁移 {{current}} / {{total}}…",committingChanges:"提交更改中…"},alerts:{error:"错误",unableToGetVersionInfo:"无法获取版本信息。请重试。",selfHostedServer:"自托管服务器",selfHostedWarning:"如果您使用的是自托管服务器，请确保同时更新您的自托管实例，否则将无法登录网页客户端。",cancel:"取消",continueUpgrade:"继续升级",upgradeFailed:"升级失败",failedToApplyMigration:"应用迁移失败（{{current}} / {{total}}）"}},hN={auth:iN,menu:sN,common:oN,content:lN,credentials:uN,emails:cN,settings:dN,passkeys:AN,upgrade:fN},dl={de:{translation:vx},en:{translation:Lx},fi:{translation:Hx},he:{translation:$x},it:{translation:lI},nl:{translation:yI},pl:{translation:TI},pt:{translation:jI},ru:{translation:YI},uk:{translation:nN},zh:{translation:hN}},Al=[{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:"🇨🇳"}],fn="en",ec=Al.map(n=>n.code),Uu=new Map;async function tp(n){const t=`all:${n}`;if(Uu.has(t))return Uu.get(t);if(dl[n]){const r=dl[n].translation;return Uu.set(t,r),r}if(n!==fn&&dl[fn]){console.warn(`Translations not found for ${n}, falling back to ${fn}`);const r=dl[fn].translation;return Uu.set(t,r),r}return console.warn(`No translations found for ${n} and no fallback available`),{}}function gN(n){return Al.find(t=>t.code===n)}function ap(n,t){return t.split(".").reduce((r,i)=>r&&typeof r=="object"&&r!==null&&i in r?r[i]:void 0,n)}async function mN(){try{const n=await Ve.getItem("local:language");if(n&&ec.includes(n))return n;const t=navigator.language.split("-")[0],r=ec.includes(t)?t:fn;return await Ve.setItem("local:language",r),r}catch(n){return console.error("Failed to get current language:",n),fn}}async function pN(n,t){try{const r=await mN(),i=await tp(r),o=ap(i,n);if(o&&typeof o=="string")return o;if(r!==fn){const u=await tp(fn),c=ap(u,n);if(c&&typeof c=="string")return c}return t||n}catch(r){return console.error("Translation error:",r),t||n}}const rp="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 tc{constructor(){Xt(this,"db",null);Xt(this,"isInTransaction",!1)}async initializeFromBase64(t){try{const r=atob(t),i=new Uint8Array(r.length);for(let u=0;u<r.length;u++)i[u]=r.charCodeAt(u);const o=await ux({locateFile:u=>`src/${u}`});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}getDefaultEmailDomain(t,r){const i=this.getSetting("DefaultEmailDomain"),o=d=>!!(d&&d!=="DISABLED.TLD"&&d!==""&&(t.includes(d)||r.includes(d)));if(i&&o(i))return i;const u=t.find(o);if(u)return u;const c=r.find(o);return c||null}getDefaultIdentityLanguage(){return this.getSetting("DefaultIdentityLanguage","en")}getDefaultIdentityGender(){return this.getSetting("DefaultIdentityGender","random")}getPasswordSettings(){const 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){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();let i=null;try{if(t.Logo)if(typeof t.Logo=="object"&&!ArrayBuffer.isView(t.Logo)){const E=Object.values(t.Logo);i=new Uint8Array(E)}else(Array.isArray(t.Logo)||t.Logo instanceof ArrayBuffer||t.Logo instanceof Uint8Array)&&(i=new Uint8Array(t.Logo))}catch(E){console.warn("Failed to convert logo to Uint8Array:",E),i=null}const o=`
                INSERT INTO Services (Id, Name, Url, Logo, CreatedAt, UpdatedAt, IsDeleted)
                VALUES (?, ?, ?, ?, ?, ?, ?)`,u=crypto.randomUUID().toUpperCase(),c=rs();this.executeUpdate(o,[u,t.ServiceName,t.ServiceUrl??null,i,c,c,0]);const d=`
                INSERT INTO Aliases (Id, FirstName, LastName, NickName, BirthDate, Gender, Email, CreatedAt, UpdatedAt, IsDeleted)
                VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,m=crypto.randomUUID().toUpperCase();this.executeUpdate(d,[m,t.Alias.FirstName??null,t.Alias.LastName??null,t.Alias.NickName??null,t.Alias.BirthDate??null,t.Alias.Gender??null,t.Alias.Email??null,c,c,0]);const h=`
                INSERT INTO Credentials (Id, Username, Notes, ServiceId, AliasId, CreatedAt, UpdatedAt, IsDeleted)
                VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,y=crypto.randomUUID().toUpperCase();if(this.executeUpdate(h,[y,t.Username??null,t.Notes??null,u,m,c,c,0]),t.Password){const E=`
                    INSERT INTO Passwords (Id, Value, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
                    VALUES (?, ?, ?, ?, ?, ?)`,C=crypto.randomUUID().toUpperCase();this.executeUpdate(E,[C,t.Password,y,c,c,0])}if(r)for(const E of r){const C=`
            INSERT INTO Attachments (Id, Filename, Blob, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
            VALUES (?, ?, ?, ?, ?, ?, ?)`,x=crypto.randomUUID().toUpperCase();this.executeUpdate(C,[x,E.Filename,E.Blob,y,c,c,0])}return await this.commitTransaction(),y}catch(i){throw this.rollbackTransaction(),console.error("Error creating credential:",i),i}}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=Ax(r);if(!i)throw new Error("Could not extract version from migration ID");const o=dx(i);if(!o.isCompatible){const d=await pN("common.errors.browserExtensionOutdated");throw new ro(d)}if(o.isKnownVersion&&o.clientVersion)return o.clientVersion;const c=new Sf().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 Sf().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=rs(),i=`
        UPDATE Credentials
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE Id = ?`,o=`
        UPDATE Aliases
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE Id = (
          SELECT AliasId
          FROM Credentials
          WHERE Id = ?
        )`,u=`
        UPDATE Services
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE Id = (
          SELECT ServiceId
          FROM Credentials
          WHERE Id = ?
        )`,c=`
        UPDATE Passkeys
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE CredentialId = ?`,d=this.executeUpdate(i,[r,t]);return this.executeUpdate(o,[r,t]),this.executeUpdate(u,[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){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();const o=rs(),u=this.getCredentialById(t.Id);if(!u)throw new Error("Credential not found");const c=`
        UPDATE Services
        SET Name = ?,
            Url = ?,
            Logo = COALESCE(?, Logo),
            UpdatedAt = ?
        WHERE Id = (
          SELECT ServiceId
          FROM Credentials
          WHERE Id = ?
        )`;let d=null;try{if(t.Logo)if(typeof t.Logo=="object"&&!ArrayBuffer.isView(t.Logo)){const E=Object.values(t.Logo);d=new Uint8Array(E)}else(Array.isArray(t.Logo)||t.Logo instanceof ArrayBuffer||t.Logo instanceof Uint8Array)&&(d=new Uint8Array(t.Logo))}catch(E){console.warn("Failed to convert logo to Uint8Array:",E),d=null}this.executeUpdate(c,[t.ServiceName,t.ServiceUrl??null,d,o,t.Id]);const m=`
        UPDATE Aliases
        SET FirstName = ?,
            LastName = ?,
            NickName = ?,
            BirthDate = ?,
            Gender = ?,
            Email = ?,
            UpdatedAt = ?
        WHERE Id = (
          SELECT AliasId
          FROM Credentials
          WHERE Id = ?
        )`;let h=t.Alias.BirthDate;if(h&&u.Alias.BirthDate){const E=new Date(h),C=new Date(u.Alias.BirthDate);E.getTime()===C.getTime()&&(h=u.Alias.BirthDate)}if(this.executeUpdate(m,[t.Alias.FirstName??null,t.Alias.LastName??null,t.Alias.NickName??null,h??null,t.Alias.Gender??null,t.Alias.Email??null,o,t.Id]),this.executeUpdate(`
        UPDATE Credentials
        SET Username = ?,
            Notes = ?,
            UpdatedAt = ?
        WHERE Id = ?`,[t.Username??null,t.Notes??null,o,t.Id]),t.Password!==u.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,o,o,0]):this.executeUpdate(`
            UPDATE Passwords
            SET Value = ?, UpdatedAt = ?
            WHERE CredentialId = ?`,[t.Password,o,t.Id])),i){const E=i.map(x=>x.Id),C=r.filter(x=>!E.includes(x));for(const x of C)this.executeUpdate(`
            UPDATE Attachments
            SET IsDeleted = 1,
                UpdatedAt = ?
            WHERE Id = ?`,[o,x]);for(const x of i)r.includes(x.Id)||this.executeUpdate(`
              INSERT INTO Attachments (Id, Filename, Blob, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
              VALUES (?, ?, ?, ?, ?, ?, ?)`,[x.Id,x.Filename,x.Blob,t.Id,o,o,0])}return await this.commitTransaction(),1}catch(o){throw this.rollbackTransaction(),console.error("Error updating credential:",o),o}}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,${rp}`}else return`data:image/x-icon;base64,${rp}`}static detectMimeType(t){const r=()=>{const u=new TextDecoder().decode(t.slice(0,5)).toLowerCase();return u.includes("<?xml")||u.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=rs(),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 u=null;t.UserHandle&&(u=t.UserHandle instanceof Uint8Array?t.UserHandle:new Uint8Array(t.UserHandle)),this.executeUpdate(i,[t.Id,t.CredentialId,t.RpId,u,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=rs(),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=rs(),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=rs(),u=this.executeUpdate(`
        UPDATE Passkeys
        SET DisplayName = ?,
            UpdatedAt = ?
        WHERE Id = ?
      `,[r,i,t]);return await this.commitTransaction(),u}catch(i){throw this.rollbackTransaction(),console.error("Error updating passkey display name:",i),i}}}const $y=D.createContext(void 0),yN=({children:n})=>{const[t,r]=D.useState(null),[i,o]=D.useState(!1),[u,c]=D.useState(!1),[d,m]=D.useState(null),h=D.useCallback(async(M,O)=>{const z=await Jt.symmetricDecrypt(M.vault.blob,O),H=new tc;await H.initializeFromBase64(z),r(H),o(!0),c(!0),m({publicEmailDomains:M.vault.publicEmailDomainList,privateEmailDomains:M.vault.privateEmailDomainList,vaultRevisionNumber:M.vault.currentRevisionNumber});const V={vaultBlob:M.vault.blob,publicEmailDomainList:M.vault.publicEmailDomainList,privateEmailDomainList:M.vault.privateEmailDomainList,vaultRevisionNumber:M.vault.currentRevisionNumber};return await Lt("STORE_VAULT",V,"background"),H},[]),y=D.useCallback(async()=>{try{const M=await Lt("GET_VAULT",{},"background");if(M!=null&&M.vault){const O=new tc;await O.initializeFromBase64(M.vault),r(O),o(!0),c(!0),m({publicEmailDomains:M.publicEmailDomains??[],privateEmailDomains:M.privateEmailDomains??[],vaultRevisionNumber:M.vaultRevisionNumber??0})}else o(!0),c(!1)}catch(M){console.error("Error retrieving vault from background:",M),o(!0),c(!1)}},[]),E=D.useCallback(async()=>d,[d]),C=D.useCallback(async M=>{m({publicEmailDomains:(d==null?void 0:d.publicEmailDomains)??[],privateEmailDomains:(d==null?void 0:d.privateEmailDomains)??[],vaultRevisionNumber:M})},[d]),x=D.useCallback(async()=>t?await t.hasPendingMigrations():!1,[t]);D.useEffect(()=>{i||y()},[i,y]);const S=D.useCallback(async M=>{await Lt("STORE_ENCRYPTION_KEY",M,"background")},[]),N=D.useCallback(async M=>{await Lt("STORE_ENCRYPTION_KEY_DERIVATION_PARAMS",M,"background")},[]),B=D.useCallback(()=>{r(null),o(!1),c(!1),Lt("CLEAR_VAULT",{},"background")},[]),R=D.useMemo(()=>({sqliteClient:t,dbInitialized:i,dbAvailable:u,initializeDatabase:h,storeEncryptionKey:S,storeEncryptionKeyDerivationParams:N,clearDatabase:B,getVaultMetadata:E,setCurrentVaultRevisionNumber:C,hasPendingMigrations:x}),[t,i,u,h,S,N,B,E,C,x]);return A.jsx($y.Provider,{value:R,children:n})},sa=()=>{const n=D.useContext($y);if(n===void 0)throw new Error("useDb must be used within a DbProvider");return n},Ku="local:aliasvault_disabled_sites",ac="local:aliasvault_global_autofill_popup_enabled",np="local:aliasvault_global_context_menu_enabled",rc="local:aliasvault_vault_locked_dismiss_until",Ou="local:aliasvault_temporary_disabled_sites",ip="local:aliasvault_clipboard_clear_timeout",sp="local:aliasvault_auto_lock_timeout",op="local:aliasvault_autofill_matching_mode",lp="local:aliasvault_passkey_provider_enabled",us="local:aliasvault_passkey_disabled_sites",nc="session:pendingRedirectUrl",JA="local:aliasvault_skip_form_restore",Zy=D.createContext(void 0),EN=({children:n})=>{const[t,r]=D.useState(!1),[i,o]=D.useState(null),[u,c]=D.useState(null),d=sa(),m=D.useCallback(async()=>{const x=await Ve.getItem("local:accessToken"),S=await Ve.getItem("local:refreshToken"),N=await Ve.getItem("local:username");return r(!0),x&&S&&N?(o(N),!0):!1},[o]),h=D.useCallback(async(x,S,N)=>{await Ve.setItem("local:username",x),await Ve.setItem("local:accessToken",S),await Ve.setItem("local:refreshToken",N),await Ve.setItem(rc,0),o(x)},[]),y=D.useCallback(async x=>{await Lt("CLEAR_VAULT",{},"background"),await Ve.removeItems(["local:username","local:accessToken","local:refreshToken"]),d==null||d.clearDatabase(),x&&c(x),o(null)},[d]),E=D.useCallback(()=>{c(null)},[]),C=D.useMemo(()=>({isInitialized:t,username:i,initializeAuth:m,setAuthTokens:h,clearAuth:y,globalMessage:u,clearGlobalMessage:E}),[t,i,m,u,h,y,E]);return A.jsx(Zy.Provider,{value:C,children:n})},eE=()=>{const n=D.useContext(Zy);if(n===void 0)throw new Error("useAuth must be used within an AuthProvider");return n};class bN{constructor(){Xt(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 Tf=new bN,Hn=class Hn{constructor(){}static isServerVersionSupported(t){return this.versionGreaterThanOrEqualTo(t,this.MIN_SERVER_VERSION)}static versionGreaterThanOrEqualTo(t,r){const[i,o]=t.split("-"),[u,c]=r.split("-"),d=i.split(".").map(Number),m=u.split(".").map(Number);for(let h=0;h<Math.max(d.length,m.length);h++){const y=d[h]??0,E=m[h]??0;if(y>E)return!0;if(y<E)return!1}return!o&&c?!0:o&&!c?!1:!o&&!c?!0:o>=c}};Xt(Hn,"VERSION","0.24.0-beta"),Xt(Hn,"API_VERSION",Hn.VERSION.split("-")[0]),Xt(Hn,"MIN_SERVER_VERSION","0.12.0-dev"),Xt(Hn,"CLIENT_NAME","edge"),Xt(Hn,"DEFAULT_CLIENT_URL","https://app.aliasvault.net"),Xt(Hn,"DEFAULT_API_URL","https://app.aliasvault.net/api");let Pa=Hn;class wN{async getBaseUrl(){return(await this.getApiUrl()).replace(/\/$/,"")+"/v1/"}async isSelfHosted(){return await this.getApiUrl()!==Pa.DEFAULT_API_URL}async authFetch(t,r={},i=!0,o=!0){const u=new Headers(r.headers??{}),c=await this.getAccessToken();c&&u.set("Authorization",`Bearer ${c}`);const d={...r,headers:u};try{const m=await this.rawFetch(t,d);if(m.status===401){const h=await this.refreshAccessToken();if(h){u.set("Authorization",`Bearer ${h}`);const y=await this.rawFetch(t,{...d,headers:u});if(!y.ok)throw new Error("Request failed after token refresh");return i?y.json():y}else throw Tf.emit("auth.errors.sessionExpired"),new Error("Session expired")}if(!m.ok&&o)throw new Error(`HTTP error! status: ${m.status}`);return i?m.json():m}catch(m){throw console.error("API request failed:",m),m}}async rawFetch(t,r={}){const o=await this.getBaseUrl()+t,u=new Headers(r.headers??{});u.set("X-AliasVault-Client",`${Pa.CLIENT_NAME}-${Pa.API_VERSION}`);const c={...r,headers:u};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?Pa.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 Tf.emit("auth.errors.sessionExpired"),null}}async getAccessToken(){return await Ve.getItem("local:accessToken")??null}async getRefreshToken(){return await Ve.getItem("local:refreshToken")??null}async updateTokens(t,r){await Ve.setItem("local:accessToken",t),await Ve.setItem("local:refreshToken",r)}async getApiUrl(){const t=await Ve.getItem("local:apiUrl");return!t||t.length===0?Pa.DEFAULT_API_URL:t}}const tE=D.createContext(null),vN=({children:n})=>{const[t,r]=D.useState(null);return D.useEffect(()=>{const i=new wN;r(i)},[]),t?A.jsx(tE.Provider,{value:t,children:n}):null},pn=()=>{const n=D.useContext(tE);if(!n)throw new Error("useWebApi must be used within a WebApiProvider");return n},aE=D.createContext(void 0),CN=({children:n})=>{const t=eE(),r=pn(),[i,o]=D.useState(!1),u=D.useRef(!1),{t:c}=gt(),d=D.useCallback(async y=>{if(!u.current)try{u.current=!0,await r.revokeTokens(),await t.clearAuth(y)}catch(E){console.error("Error during logout:",E)}finally{u.current=!1,o(!1)}},[t,r]),m=D.useCallback(async()=>{const y=await t.initializeAuth();return o(y),y},[t]);D.useEffect(()=>Tf.subscribe(async E=>{await d(c(E))}),[d,c]),D.useEffect(()=>{m()},[m]);const h=D.useMemo(()=>({isInitialized:t.isInitialized,username:t.username,globalMessage:t.globalMessage,logout:d,initializeAuth:m,setAuthTokens:t.setAuthTokens,clearGlobalMessage:t.clearGlobalMessage,isLoggedIn:i}),[t.isInitialized,t.username,t.globalMessage,t.setAuthTokens,t.clearGlobalMessage,d,m,i]);return A.jsx(aE.Provider,{value:h,children:n})},yn=()=>{const n=D.useContext(aE);if(n===void 0)throw new Error("useApp must be used within an AppProvider");return n},xN=({routes:n=[],rightButtons:t})=>{const{t:r}=gt(),i=yn(),o=Ma(),u=ar(),c=n==null?void 0:n.find(h=>{const y=h.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${y}$`).test(u.pathname)}),d=()=>{o("/auth-settings")},m=()=>{u.pathname==="/upgrade"||u.pathname==="/login"||u.pathname==="/unlock"||(i.isLoggedIn?o("/credentials"):o("/"))};return A.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:A.jsxs("div",{className:"flex items-center h-16 px-4",children:[c!=null&&c.showBackButton?A.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:A.jsxs("div",{className:"flex items-center",children:[A.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:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),c.title&&A.jsx("h1",{className:"text-lg font-medium text-gray-900 dark:text-white ml-2",children:c.title})]})}):A.jsx("div",{className:"flex items-center",children:A.jsxs("button",{onClick:()=>m(),className:"flex items-center hover:opacity-80 transition-opacity",children:[A.jsx(Xy,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),A.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),A.jsx("div",{className:"flex-grow"}),A.jsx("div",{className:"flex items-center gap-2",children:i.isLoggedIn?t:A.jsxs(A.Fragment,{children:[t,A.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:[A.jsx("span",{className:"sr-only",children:r("common.settings")}),A.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:A.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"})})]})]})})]})})},IN=({routes:n,headerButtons:t,message:r,children:i})=>A.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[A.jsx(HC,{}),A.jsx(xN,{routes:n,rightButtons:t}),A.jsx("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px",height:"calc(100% - 120px)"},children:A.jsxs("div",{className:"p-4 mb-16",children:[r&&A.jsx("p",{className:"text-red-500 mb-4",children:r}),i||A.jsx(jy,{children:n.map(o=>A.jsx(Gf,{path:o.path,element:o.element},o.path))})]})}),A.jsx(zC,{})]}),NN=({children:n})=>A.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[A.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:A.jsxs("div",{className:"flex items-center justify-center h-16 px-4",children:[A.jsx(Xy,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),A.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),A.jsx("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px"},children:A.jsx("div",{className:"p-4",children:n})})]}),Kn=()=>{const n={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},t=A.jsxs(A.Fragment,{children:[A.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),A.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:n})]});return A.jsx("div",{className:"inline-flex items-center",children:t})},rE=D.createContext(void 0),SN=({children:n})=>{const[t,r]=D.useState(null),i=D.useCallback(u=>{r(u)},[]),o=D.useMemo(()=>({setHeaderButtons:i,headerButtons:t}),[i,t]);return A.jsx(rE.Provider,{value:o,children:n})},En=()=>{const n=D.useContext(rE);if(n===void 0)throw new Error("useHeaderButtons must be used within a HeaderButtonsProvider");return n},TN=()=>{const{isLoading:n}=fa();if(!n)return null;const t={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},r=A.jsxs(A.Fragment,{children:[A.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),A.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:t})]});return A.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:A.jsx("div",{className:"relative",children:r})})},nE=D.createContext(void 0),kN=({children:n})=>{const[t,r]=D.useState(!0),[i,o]=D.useState(!1),[u,c]=D.useState(void 0),d=y=>{o(!0),c(y)},m=()=>{o(!1),c(void 0)},h=D.useMemo(()=>({isLoading:i,loadingMessage:u,showLoading:d,hideLoading:m,isInitialLoading:t,setIsInitialLoading:r}),[i,u,t]);return A.jsxs(nE.Provider,{value:h,children:[A.jsx(TN,{message:u}),n]})},fa=()=>{const n=D.useContext(nE);if(n===void 0)throw new Error("useLoading must be used within a LoadingProvider");return n},BN="session:lastVisitedPage",DN="session:lastVisitedTime",LN="session:navigationHistory",iE=D.createContext(void 0),RN=({children:n})=>{const t=ar(),r=Ma(),{isInitialized:i,isLoggedIn:o}=yn(),{dbInitialized:u,dbAvailable:c}=sa(),d=i&&u,m=d&&(!o||!c),h=D.useCallback(async()=>{if(d&&!m&&!["/","/reinitialize","/login","/unlock","/unlock-success","/auth-settings","/upgrade","/passkeys/create","/passkeys/authenticate"].includes(t.pathname)){const C=t.pathname.split("/").filter(Boolean),x=[];let S="";for(let N=0;N<C.length;N++)S+="/"+C[N],x.push({pathname:S,search:t.search,hash:t.hash});await Promise.all([Ve.setItem(BN,t.pathname),Ve.setItem(DN,Date.now()),Ve.setItem(LN,x)])}},[t,d,m]);D.useEffect(()=>{d&&h()},[t.pathname,t.search,t.hash,d,h]),D.useEffect(()=>{d&&!o&&r("/login",{replace:!0})},[d,o]);const y=D.useMemo(()=>({storeCurrentPage:h,isFullyInitialized:d,requiresAuth:m}),[h,d,m]);return A.jsx(iE.Provider,{value:y,children:n})},UN=()=>{const n=D.useContext(iE);if(n===void 0)throw new Error("useNavigation must be used within a NavigationProvider");return n};var $A,up;function ON(){if(up)return $A;up=1;function n(R){this._maxSize=R,this.clear()}n.prototype.clear=function(){this._size=0,this._values=Object.create(null)},n.prototype.get=function(R){return this._values[R]},n.prototype.set=function(R,M){return this._size>=this._maxSize&&this.clear(),R in this._values||this._size++,this._values[R]=M};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,i=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,u=/^\s*(['"]?)(.*?)(\1)\s*$/,c=512,d=new n(c),m=new n(c),h=new n(c);$A={Cache:n,split:E,normalizePath:y,setter:function(R){var M=y(R);return m.get(R)||m.set(R,function(z,H){for(var V=0,ee=M.length,q=z;V<ee-1;){var J=M[V];if(J==="__proto__"||J==="constructor"||J==="prototype")return z;q=q[M[V++]]}q[M[V]]=H})},getter:function(R,M){var O=y(R);return h.get(R)||h.set(R,function(H){for(var V=0,ee=O.length;V<ee;)if(H!=null||!M)H=H[O[V++]];else return;return H})},join:function(R){return R.reduce(function(M,O){return M+(x(O)||r.test(O)?"["+O+"]":(M?".":"")+O)},"")},forEach:function(R,M,O){C(Array.isArray(R)?R:E(R),M,O)}};function y(R){return d.get(R)||d.set(R,E(R).map(function(M){return M.replace(u,"$2")}))}function E(R){return R.match(t)||[""]}function C(R,M,O){var z=R.length,H,V,ee,q;for(V=0;V<z;V++)H=R[V],H&&(B(H)&&(H='"'+H+'"'),q=x(H),ee=!q&&/^\d+$/.test(H),M.call(O,H,q,ee,V,R))}function x(R){return typeof R=="string"&&R&&["'",'"'].indexOf(R.charAt(0))!==-1}function S(R){return R.match(i)&&!R.match(r)}function N(R){return o.test(R)}function B(R){return!x(R)&&(S(R)||N(R))}return $A}var cs=ON(),ZA,cp;function MN(){if(cp)return ZA;cp=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 ZA={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(" ")},ZA}var ef=MN(),Mu={exports:{}},dp;function _N(){if(dp)return Mu.exports;dp=1,Mu.exports=function(o){return n(t(o),o)},Mu.exports.array=n;function n(o,u){var c=o.length,d=new Array(c),m={},h=c,y=r(u),E=i(o);for(u.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--;)m[h]||C(o[h],h,new Set);return d;function C(x,S,N){if(N.has(x)){var B;try{B=", node was:"+JSON.stringify(x)}catch{B=""}throw new Error("Cyclic dependency"+B)}if(!E.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!m[S]){m[S]=!0;var R=y.get(x)||new Set;if(R=Array.from(R),S=R.length){N.add(x);do{var M=R[--S];C(M,E.get(M),N)}while(S);N.delete(x)}d[--c]=x}}}function t(o){for(var u=new Set,c=0,d=o.length;c<d;c++){var m=o[c];u.add(m[0]),u.add(m[1])}return Array.from(u)}function r(o){for(var u=new Map,c=0,d=o.length;c<d;c++){var m=o[c];u.has(m[0])||u.set(m[0],new Set),u.has(m[1])||u.set(m[1],new Set),u.get(m[0]).add(m[1])}return u}function i(o){for(var u=new Map,c=0,d=o.length;c<d;c++)u.set(o[c],c);return u}return Mu.exports}var jN=_N();const QN=Li(jN),FN=Object.prototype.toString,PN=Error.prototype.toString,HN=RegExp.prototype.toString,zN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",VN=/^Symbol\((.*)\)(.*)$/;function GN(n){return n!=+n?"NaN":n===0&&1/n<0?"-0":""+n}function Ap(n,t=!1){if(n==null||n===!0||n===!1)return""+n;const r=typeof n;if(r==="number")return GN(n);if(r==="string")return t?`"${n}"`:n;if(r==="function")return"[Function "+(n.name||"anonymous")+"]";if(r==="symbol")return zN.call(n).replace(VN,"Symbol($1)");const i=FN.call(n).slice(8,-1);return i==="Date"?isNaN(n.getTime())?""+n:n.toISOString(n):i==="Error"||n instanceof Error?"["+PN.call(n)+"]":i==="RegExp"?HN.call(n):null}function Di(n,t){let r=Ap(n,t);return r!==null?r:JSON.stringify(n,function(i,o){let u=Ap(this[i],t);return u!==null?u:o},2)}function sE(n){return n==null?[]:[].concat(n)}let oE,lE,uE,KN=/\$\{\s*(\w+)\s*\}/g;oE=Symbol.toStringTag;class fp{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[oE]="Error",this.name="ValidationError",this.value=r,this.path=i,this.type=o,this.errors=[],this.inner=[],sE(t).forEach(u=>{if(Wa.isError(u)){this.errors.push(...u.errors);const c=u.inner.length?u.inner:[u];this.inner.push(...c)}else this.errors.push(u)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}lE=Symbol.hasInstance;uE=Symbol.toStringTag;class Wa 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(KN,(o,u)=>Di(r[u])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,i,o,u){const c=new fp(t,r,i,o);if(u)return c;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[uE]="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,Wa)}static[lE](t){return fp[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let dn={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 \`${Di(i,!0)}\`).`:".";return t!=="mixed"?`${n} must be a \`${t}\` type, but the final value was: \`${Di(r,!0)}\``+o:`${n} must match the configured type. The validated value was: \`${Di(r,!0)}\``+o}},cr={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"},qN={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"},kf={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},YN={isValue:"${path} field must be ${value}"},qu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},WN={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"},XN={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: \`${Di(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: \`${Di(r,!0)}\``}return Wa.formatError(dn.notType,n)}};Object.assign(Object.create(null),{mixed:dn,string:cr,number:qN,date:kf,object:qu,array:WN,boolean:YN,tuple:XN});const Wf=n=>n&&n.__isYupSchema__;class ic{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:u}=r,c=typeof i=="function"?i:(...d)=>d.every(m=>m===i);return new ic(t,(d,m)=>{var h;let y=c(...d)?o:u;return(h=y==null?void 0:y(m))!=null?h:m})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let i=this.refs.map(u=>u.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(i,t,r);if(o===void 0||o===t)return t;if(!Wf(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const _u={context:"$",value:"."};class As{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]===_u.context,this.isValue=this.key[0]===_u.value,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?_u.context:this.isValue?_u.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&cs.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}}As.prototype.__isYupRef=!0;const is=n=>n==null;function Ys(n){function t({value:r,path:i="",options:o,originalValue:u,schema:c},d,m){const{name:h,test:y,params:E,message:C,skipAbsent:x}=n;let{parent:S,context:N,abortEarly:B=c.spec.abortEarly,disableStackTrace:R=c.spec.disableStackTrace}=o;function M($){return As.isRef($)?$.getValue(r,S,N):$}function O($={}){const ge=Object.assign({value:r,originalValue:u,label:c.spec.label,path:$.path||i,spec:c.spec,disableStackTrace:$.disableStackTrace||R},E,$.params);for(const ce of Object.keys(ge))ge[ce]=M(ge[ce]);const se=new Wa(Wa.formatError($.message||C,ge),r,ge.path,$.type||h,ge.disableStackTrace);return se.params=ge,se}const z=B?d:m;let H={path:i,parent:S,type:h,from:o.from,createError:O,resolve:M,options:o,originalValue:u,schema:c};const V=$=>{Wa.isError($)?z($):$?m(null):z(O())},ee=$=>{Wa.isError($)?z($):d($)};if(x&&is(r))return V(!0);let J;try{var Z;if(J=y.call(H,r,H),typeof((Z=J)==null?void 0:Z.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${H.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(J).then(V,ee)}}catch($){ee($);return}V(J)}return t.OPTIONS=n,t}function JN(n,t,r,i=r){let o,u,c;return t?(cs.forEach(t,(d,m,h)=>{let y=m?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]}u=y,c=m?"["+d+"]":"."+d}),{schema:n,parent:o,parentPath:u}):{parent:o,parentPath:t,schema:n}}class sc extends Set{describe(){const t=[];for(const r of this.values())t.push(As.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 sc(this.values())}merge(t,r){const i=this.clone();return t.forEach(o=>i.add(o)),r.forEach(o=>i.delete(o)),i}}function to(n,t=new Map){if(Wf(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]=to(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,to(o,t))}else if(n instanceof Set){r=new Set,t.set(n,r);for(const i of n)r.add(to(i,t))}else if(n instanceof Object){r={},t.set(n,r);for(const[i,o]of Object.entries(n))r[i]=to(o,t)}else throw Error(`Unable to clone ${n}`);return r}class mn{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 sc,this._blacklist=new sc,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(dn.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=to(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(u=>{t.tests.forEach(c=>{u.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,u)=>u.resolve(o,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,i,o,u;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:(u=t.disableStackTrace)!=null?u:this.spec.disableStackTrace})}cast(t,r={}){let i=this.resolve(Object.assign({value:t},r)),o=r.assert==="ignore-optionality",u=i._cast(t,r);if(r.assert!==!1&&!i.isType(u)){if(o&&is(u))return u;let c=Di(t),d=Di(u);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 u}_cast(t,r){let i=t===void 0?t:this.transforms.reduce((o,u)=>u.call(this,o,t,this),t);return i===void 0&&(i=this.getDefault(r)),i}_validate(t,r={},i,o){let{path:u,originalValue:c=t,strict:d=this.spec.strict}=r,m=t;d||(m=this._cast(m,Object.assign({assert:!1},r)));let h=[];for(let y of Object.values(this.internalTests))y&&h.push(y);this.runTests({path:u,value:m,originalValue:c,options:r,tests:h},i,y=>{if(y.length)return o(y,m);this.runTests({path:u,value:m,originalValue:c,options:r,tests:this.tests},i,o)})}runTests(t,r,i){let o=!1,{tests:u,value:c,originalValue:d,path:m,options:h}=t,y=N=>{o||(o=!0,r(N,c))},E=N=>{o||(o=!0,i(N,c))},C=u.length,x=[];if(!C)return E([]);let S={value:c,originalValue:d,path:m,options:h,schema:this};for(let N=0;N<u.length;N++){const B=u[N];B(S,y,function(M){M&&(Array.isArray(M)?x.push(...M):x.push(M)),--C<=0&&E(x)})}}asNestedTest({key:t,index:r,parent:i,parentPath:o,originalParent:u,options:c}){const d=t??r;if(d==null)throw TypeError("Must include `key` or `index` for nested validations");const m=typeof d=="number";let h=i[d];const y=Object.assign({},c,{strict:!0,parent:i,value:h,originalValue:u[d],key:void 0,[m?"index":"key"]:d,path:m||d.includes(".")?`${o||""}[${m?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})),u=(i=r==null?void 0:r.disableStackTrace)!=null?i:o.spec.disableStackTrace;return new Promise((c,d)=>o._validate(t,r,(m,h)=>{Wa.isError(m)&&(m.value=h),d(m)},(m,h)=>{m.length?d(new Wa(m,h,void 0,void 0,u)):c(h)}))}validateSync(t,r){var i;let o=this.resolve(Object.assign({},r,{value:t})),u,c=(i=r==null?void 0:r.disableStackTrace)!=null?i:o.spec.disableStackTrace;return o._validate(t,Object.assign({},r,{sync:!0}),(d,m)=>{throw Wa.isError(d)&&(d.value=m),d},(d,m)=>{if(d.length)throw new Wa(d,t,void 0,void 0,c);u=m}),u}isValid(t,r){return this.validate(t,r).then(()=>!0,i=>{if(Wa.isError(i))return!1;throw i})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(i){if(Wa.isError(i))return!1;throw i}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):to(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=Ys({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=Ys({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),i}optional(){return this.optionality(!0)}defined(t=dn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=dn.notNull){return this.nullability(!1,t)}required(t=dn.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=dn.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),o=Ys(r),u=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&&(u||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=sE(t).map(u=>new As(u));return o.forEach(u=>{u.isSibling&&i.deps.push(u.key)}),i.conditions.push(typeof r=="function"?new ic(o,r):ic.fromOptions(o,r)),i}typeError(t){let r=this.clone();return r.internalTests.typeError=Ys({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=dn.oneOf){let i=this.clone();return t.forEach(o=>{i._whitelist.add(o),i._blacklist.delete(o)}),i.internalTests.whiteList=Ys({message:r,name:"oneOf",skipAbsent:!0,test(o){let u=this.schema._whitelist,c=u.resolveAll(this.resolve);return c.includes(o)?!0:this.createError({params:{values:Array.from(u).join(", "),resolved:c}})}}),i}notOneOf(t,r=dn.notOneOf){let i=this.clone();return t.forEach(o=>{i._blacklist.add(o),i._whitelist.delete(o)}),i.internalTests.blacklist=Ys({message:r,name:"notOneOf",test(o){let u=this.schema._blacklist,c=u.resolveAll(this.resolve);return c.includes(o)?this.createError({params:{values:Array.from(u).join(", "),resolved:c}}):!0}}),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:u,nullable:c}=r.spec;return{meta:o,label:i,optional:u,nullable:c,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(m=>({name:m.OPTIONS.name,params:m.OPTIONS.params})).filter((m,h,y)=>y.findIndex(E=>E.name===m.name)===h)}}}mn.prototype.__isYupSchema__=!0;for(const n of["validate","validateSync"])mn.prototype[`${n}At`]=function(t,r,i={}){const{parent:o,parentPath:u,schema:c}=JN(this,t,r,i.context);return c[n](o&&o[u],Object.assign({},i,{parent:o,path:t}))};for(const n of["equals","is"])mn.prototype[n]=mn.prototype.oneOf;for(const n of["not","nope"])mn.prototype[n]=mn.prototype.notOneOf;const $N=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ZN(n){const t=Bf(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 Bf(n){var t,r;const i=$N.exec(n);return i?{year:Qn(i[1]),month:Qn(i[2],1)-1,day:Qn(i[3],1),hour:Qn(i[4]),minute:Qn(i[5]),second:Qn(i[6]),millisecond:i[7]?Qn(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:Qn(i[10]),minuteOffset:Qn(i[11])}:null}function Qn(n,t=0){return Number(n)||t}let e1=/^[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])?)*$/,t1=/^((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,a1=/^(?:[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,r1="^\\d{4}-\\d{2}-\\d{2}",n1="\\d{2}:\\d{2}:\\d{2}",i1="(([+-]\\d{2}(:?\\d{2})?)|Z)",s1=new RegExp(`${r1}T${n1}(\\.\\d+)?${i1}$`),o1=n=>is(n)||n===n.trim(),l1={}.toString();function Za(){return new cE}class cE extends mn{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===l1?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||dn.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=cr.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=cr.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=cr.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,u;return r&&(typeof r=="object"?{excludeEmptyString:i=!1,message:o,name:u}=r:o=r),this.test({name:u||"matches",message:o||cr.matches,params:{regex:t},skipAbsent:!0,test:c=>c===""&&i||c.search(t)!==-1})}email(t=cr.email){return this.matches(e1,{name:"email",message:t,excludeEmptyString:!0})}url(t=cr.url){return this.matches(t1,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=cr.uuid){return this.matches(a1,{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(s1,{name:"datetime",message:r||cr.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||cr.datetime_offset,params:{allowOffset:i},skipAbsent:!0,test:u=>{if(!u||i)return!0;const c=Bf(u);return c?!!c.z:!1}}).test({name:"datetime_precision",message:r||cr.datetime_precision,params:{precision:o},skipAbsent:!0,test:u=>{if(!u||o==null)return!0;const c=Bf(u);return c?c.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=cr.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:o1})}lowercase(t=cr.lowercase){return this.transform(r=>is(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>is(r)||r===r.toLowerCase()})}uppercase(t=cr.uppercase){return this.transform(r=>is(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>is(r)||r===r.toUpperCase()})}}Za.prototype=cE.prototype;let u1=new Date(""),c1=n=>Object.prototype.toString.call(n)==="[object Date]";class Xf extends mn{constructor(){super({type:"date",check(t){return c1(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,i)=>!i.spec.coerce||i.isType(t)||t===null?t:(t=ZN(t),isNaN(t)?Xf.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let i;if(As.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=kf.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=kf.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)}})}}Xf.INVALID_DATE=u1;function d1(n,t=[]){let r=[],i=new Set,o=new Set(t.map(([c,d])=>`${c}-${d}`));function u(c,d){let m=cs.split(c)[0];i.add(m),o.has(`${d}-${m}`)||r.push([d,m])}for(const c of Object.keys(n)){let d=n[c];i.add(c),As.isRef(d)&&d.isSibling?u(d.path,c):Wf(d)&&"deps"in d&&d.deps.forEach(m=>u(m,c))}return QN.array(Array.from(i),r).reverse()}function hp(n,t){let r=1/0;return n.some((i,o)=>{var u;if((u=t.path)!=null&&u.includes(i))return r=o,!0}),r}function dE(n){return(t,r)=>hp(n,t)-hp(n,r)}const A1=(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 Yu(n){if("fields"in n){const t={};for(const[r,i]of Object.entries(n.fields))t[r]=Yu(i);return n.setFields(t)}if(n.type==="array"){const t=n.optional();return t.innerType&&(t.innerType=Yu(t.innerType)),t}return n.type==="tuple"?n.optional().clone({types:n.spec.types.map(Yu)}):"optional"in n?n.optional():n}const f1=(n,t)=>{const r=[...cs.normalizePath(t)];if(r.length===1)return r[0]in n;let i=r.pop(),o=cs.getter(cs.join(r),!0)(n);return!!(o&&i in o)};let gp=n=>Object.prototype.toString.call(n)==="[object Object]";function mp(n,t){let r=Object.keys(n.fields);return Object.keys(t).filter(i=>r.indexOf(i)===-1)}const h1=dE([]);function oc(n){return new AE(n)}class AE extends mn{constructor(t){super({type:"object",check(r){return gp(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=h1,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 u=this.fields,c=(i=r.stripUnknown)!=null?i:this.spec.noUnknown,d=[].concat(this._nodes,Object.keys(o).filter(E=>!this._nodes.includes(E))),m={},h=Object.assign({},r,{parent:m,__validating:r.__validating||!1}),y=!1;for(const E of d){let C=u[E],x=E in o;if(C){let S,N=o[E];h.path=(r.path?`${r.path}.`:"")+E,C=C.resolve({value:N,context:r.context,parent:m});let B=C instanceof mn?C.spec:void 0,R=B==null?void 0:B.strict;if(B!=null&&B.strip){y=y||E in o;continue}S=!r.__validating||!R?C.cast(o[E],h):o[E],S!==void 0&&(m[E]=S)}else x&&!c&&(m[E]=o[E]);(x!==E in m||m[E]!==o[E])&&(y=!0)}return y?m:o}_validate(t,r={},i,o){let{from:u=[],originalValue:c=t,recursive:d=this.spec.recursive}=r;r.from=[{schema:this,value:c},...u],r.__validating=!0,r.originalValue=c,super._validate(t,r,i,(m,h)=>{if(!d||!gp(h)){o(m,h);return}c=c||h;let y=[];for(let E of this._nodes){let C=this.fields[E];!C||As.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(m),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,u]of Object.entries(this.fields)){const c=i[o];i[o]=c===void 0?u: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 u=this.fields[i];let c=t;(o=c)!=null&&o.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[i]})),r[i]=u&&"getDefault"in u?u.getDefault(c):void 0}),r}setFields(t,r){let i=this.clone();return i.fields=t,i._nodes=d1(t,r),i._sortErrors=dE(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 Yu(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=cs.getter(t,!0);return this.transform(u=>{if(!u)return u;let c=u;return f1(u,t)&&(c=Object.assign({},u),i||delete c[t],c[r]=o(u)),c})}json(){return this.transform(A1)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||qu.exact,test(r){if(r==null)return!0;const i=mp(this.schema,r);return i.length===0||this.createError({params:{properties:i.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=qu.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 u=mp(this.schema,o);return!t||u.length===0||this.createError({params:{unknown:u.join(", ")}})}});return i.spec.noUnknown=t,i}unknown(t=!0,r=qu.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(ef.camelCase)}snakeCase(){return this.transformKeys(ef.snakeCase)}constantCase(){return this.transformKeys(t=>ef.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),i=super.describe(t);i.fields={};for(const[u,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[u]})),i.fields[u]=c.describe(d)}return i}}oc.prototype=AE.prototype;const fE=({variant:n="dropdown",size:t="md"})=>{const{i18n:r}=gt(),[i,o]=D.useState(!1),u=D.useRef(null),c=gN(r.language)||Al[0];D.useEffect(()=>{const m=h=>{u.current&&!u.current.contains(h.target)&&o(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[]);const d=async m=>{await r.changeLanguage(m),await Ve.setItem("local:language",m),o(!1),r.emit("languageChanged",m)};return n==="buttons"?A.jsx("div",{className:"flex space-x-2",children:Al.map(m=>A.jsxs("button",{onClick:()=>d(m.code),className:`flex items-center space-x-1 px-2 py-1 text-xs rounded transition-colors ${r.language===m.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:m.nativeName,children:[A.jsx("span",{className:"text-sm",children:m.flag}),A.jsx("span",{children:m.code.toUpperCase()})]},m.code))}):A.jsxs("div",{className:"relative",ref:u,children:[A.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:[A.jsxs("div",{className:"flex items-center space-x-2",children:[A.jsx("span",{className:"text-lg",children:c.flag}),A.jsx("span",{children:c.nativeName})]}),A.jsx("svg",{className:`w-4 h-4 transition-transform duration-200 ${i?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),i&&A.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:Al.map(m=>A.jsxs("button",{onClick:()=>d(m.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:[A.jsxs("div",{className:"flex items-center space-x-2",children:[A.jsx("span",{className:"text-lg",children:m.flag}),A.jsx("span",{className:"text-gray-700 dark:text-gray-200",children:m.nativeName})]}),r.language===m.code&&A.jsx("svg",{className:"w-4 h-4 text-primary-500",fill:"currentColor",viewBox:"0 0 20 20",children:A.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"})})]},m.code))})]})},tf=[{label:"Aliasvault.net",value:Pa.DEFAULT_API_URL},{label:"Self-hosted",value:"custom"}],g1=n=>oc().shape({apiUrl:Za().required(n("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:Za().required(n("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}})}),m1=()=>{const{t:n}=gt(),[t,r]=D.useState(""),[i,o]=D.useState(""),[u,c]=D.useState(""),[d,m]=D.useState(!0),[h,y]=D.useState({}),{setIsInitialLoading:E}=fa(),C=g1(n);D.useEffect(()=>{(async()=>{const M=await Ve.getItem("local:apiUrl"),O=await Ve.getItem("local:clientUrl"),z=await Ve.getItem(ac)!==!1,H=await Ve.getItem(rc);m(H?!1:z);const V=tf.find(ee=>ee.value===M);V?r(V.value):M?(r("custom"),o(M),c(O??"")):r(tf[0].value),E(!1)})()},[E]);const x=async R=>{const M=R.target.value;r(M),M!=="custom"&&(await Ve.setItem("local:apiUrl",""),await Ve.setItem("local:clientUrl",""),o(""),c(""),y({}))},S=async R=>{const M=R.target.value;o(M);try{await C.validateAt("apiUrl",{apiUrl:M}),y(O=>({...O,apiUrl:void 0})),await Ve.setItem("local:apiUrl",M)}catch(O){O instanceof Wa&&(y(z=>({...z,apiUrl:O.message})),await Ve.setItem("local:apiUrl",Pa.DEFAULT_API_URL),await Ve.setItem("local:clientUrl",Pa.DEFAULT_CLIENT_URL))}},N=async R=>{const M=R.target.value;c(M);try{await C.validateAt("clientUrl",{clientUrl:M}),y(O=>({...O,clientUrl:void 0})),await Ve.setItem("local:clientUrl",M)}catch(O){O instanceof Wa&&y(z=>({...z,clientUrl:O.message}))}},B=async()=>{const R=!d;await Ve.setItem(ac,R),R&&(await Ve.setItem(Ku,[]),await Ve.setItem(rc,0)),m(R)};return A.jsxs("div",{className:"p-4 space-y-6",children:[A.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[A.jsxs("div",{children:[A.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:n("settings.serverConfiguration","Server Configuration")}),A.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")})]}),A.jsxs("div",{children:[A.jsx("label",{htmlFor:"api-connection",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:n("settings.serverUrl")}),A.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:tf.map(R=>A.jsx("option",{value:R.value,children:R.label},R.value))})]}),t==="custom"&&A.jsxs("div",{className:"space-y-4 pl-4 border-l-2 border-primary-500",children:[A.jsxs("div",{children:[A.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")}),A.jsx("input",{id:"custom-api-url",type:"text",value:i,onChange:S,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&&A.jsx("p",{className:"mt-1 text-sm text-red-500",children:h.apiUrl}),A.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)")})]}),A.jsxs("div",{children:[A.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")}),A.jsx("input",{id:"custom-client-url",type:"text",value:u,onChange:N,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&&A.jsx("p",{className:"mt-1 text-sm text-red-500",children:h.clientUrl}),A.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")})]})]})]}),A.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[A.jsxs("div",{children:[A.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:n("settings.autofillSettings","Autofill Settings")}),A.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")})]}),A.jsxs("div",{className:"flex items-center justify-between gap-4",children:[A.jsxs("div",{children:[A.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n("settings.autofillEnabled")}),A.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")})]}),A.jsx("button",{onClick:B,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")})]})]}),A.jsxs("div",{className:"space-y-4 pb-6",children:[A.jsx("div",{children:A.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:n("settings.languageSettings","Language")})}),A.jsx("div",{children:A.jsx(fE,{variant:"dropdown",size:"sm"})})]}),A.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"),": ",Pa.VERSION]})]})},Oa=D.forwardRef(({onClick:n,id:t,children:r,type:i="button",variant:o="primary"},u)=>{const c={primary:"bg-primary-500 hover:bg-primary-600",secondary:"bg-gray-500 hover:bg-gray-600"};return A.jsx("button",{ref:u,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})});Oa.displayName="Button";var Na=(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))(Na||{});const Jf=({type:n,className:t="w-5 h-5"})=>({expand:A.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:A.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:A.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:A.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:A.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:A.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:A.jsxs("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[A.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"}),A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),reload:A.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:A.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:A.jsxs("svg",{className:t,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[A.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"}),A.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:A.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),plus:A.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),tab:A.jsxs("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[A.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"}),A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z"})]}),eye:A.jsxs("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),A.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:A.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:A.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,Ar=({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 A.jsx("button",{onClick:n,className:`p-2 rounded-lg ${o[i]}`,title:t,children:A.jsx(Jf,{type:r})})},hE=()=>{const[n,t]=D.useState(Pa.DEFAULT_API_URL);return{apiUrl:n,setApiUrl:t,loadApiUrl:async()=>{const o=await Ve.getItem("local:apiUrl");o&&o.length>0?t(o):t(Pa.DEFAULT_API_URL)},getDisplayUrl:()=>{const o=n.replace("https://","").replace("http://","").replace(":443","").replace("/api","");return o==="app.aliasvault.net"?"aliasvault.net":o}}},p1=()=>{const{loadApiUrl:n,getDisplayUrl:t}=hE(),r=Ma(),{t:i}=gt();D.useEffect(()=>{n()},[n]);const o=()=>{r("/auth-settings")};return A.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:["(",i("auth.connectingTo")," ",A.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 y1{convertAnchorTagsToOpenInNewTab(t){try{const i=new DOMParser().parseFromString(t,"text/html"),o=i.querySelectorAll("a[href]");return o.length>0&&o.forEach(u=>{if((!u.hasAttribute("target")||u.getAttribute("target")!=="_blank")&&u.setAttribute("target","_blank"),!u.hasAttribute("rel"))u.setAttribute("rel","noopener noreferrer");else{const c=u.getAttribute("rel")??"",d=new Set(c.split(" ").filter(m=>m.trim()!==""));d.add("noopener"),d.add("noreferrer"),u.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 Zs=new y1;class Ia{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,u=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=${u},popup=true`),window.close()}}var Ci={},af={},rf,pp;function gE(){return pp||(pp=1,rf=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,u=0;u<r.length;u++)o=r[u].toString(16),i+=o.length===1?"0"+o:o;return i}),rf}var nf,yp;function E1(){return yp||(yp=1,nf=function(t){for(var r=[],i=t.length,o=0;o<i;o++){var u=t.charCodeAt(o);if(u>=55296&&u<=56319&&i>o+1){var c=t.charCodeAt(o+1);c>=56320&&c<=57343&&(u=(u-55296)*1024+c-56320+65536,o+=1)}if(u<128){r.push(u);continue}if(u<2048){r.push(u>>6|192),r.push(u&63|128);continue}if(u<55296||u>=57344&&u<65536){r.push(u>>12|224),r.push(u>>6&63|128),r.push(u&63|128);continue}if(u>=65536&&u<=1114111){r.push(u>>18|240),r.push(u>>12&63|128),r.push(u>>6&63|128),r.push(u&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer}),nf}var sf,Ep;function b1(){return Ep||(Ep=1,sf=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}),sf}var of,bp;function w1(){if(bp)return of;bp=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,u){let c,d,m,h,y,E,C,x,S,N,B,R,M,O=0,z=u.length;for(;z>=64;){for(c=o[0],d=o[1],m=o[2],h=o[3],y=o[4],E=o[5],C=o[6],x=o[7],N=0;N<16;N++)B=O+N*4,i[N]=(u[B]&255)<<24|(u[B+1]&255)<<16|(u[B+2]&255)<<8|u[B+3]&255;for(N=16;N<64;N++)S=i[N-2],R=(S>>>17|S<<15)^(S>>>19|S<<13)^S>>>10,S=i[N-15],M=(S>>>7|S<<25)^(S>>>18|S<<14)^S>>>3,i[N]=(R+i[N-7]|0)+(M+i[N-16]|0);for(N=0;N<64;N++)R=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&E^~y&C)|0)+(x+(n[N]+i[N]|0)|0)|0,M=((c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10))+(c&d^c&m^d&m)|0,x=C,C=E,E=y,y=h+R|0,h=m,m=d,d=c,c=R+M|0;o[0]+=c,o[1]+=d,o[2]+=m,o[3]+=h,o[4]+=y,o[5]+=E,o[6]+=C,o[7]+=x,O+=64,z-=64}}function r(i){const o=i.length,u=o%64,c=o%64<56?64:128,d=new Uint8Array(c),m=o/536870912|0,h=o<<3;return d.set(i.subarray(o-u)),d[u]=128,d[c-8]=m>>>24&255,d[c-7]=m>>>16&255,d[c-6]=m>>>8&255,d[c-5]=m>>>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 of=function(o){const u=new Int32Array(8),c=new Int32Array(64);u[0]=1779033703,u[1]=3144134277,u[2]=1013904242,u[3]=2773480762,u[4]=1359893119,u[5]=2600822924,u[6]=528734635,u[7]=1541459225;const d=new Uint8Array(o),m=r(d);t(c,u,d),t(c,u,m);const h=new Uint8Array(32);for(let y=0;y<8;y++)h[y*4+0]=u[y]>>>24&255,h[y*4+1]=u[y]>>>16&255,h[y*4+2]=u[y]>>>8&255,h[y*4+3]=u[y]>>>0&255;return h.buffer},of}var lf,wp;function v1(){return wp||(wp=1,lf=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 u=i.length;if(u>=o)return i;var c=r==null?"":String(r);c===""&&(c=" ");for(var d=o-u;c.length<d;)c+=c;var m=c.length>d?c.substr(0,d):c;return m+i}),lf}var uf,vp;function C1(){if(vp)return uf;vp=1;const n=gE();return uf=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)},uf}var Wu={exports:{}},x1=Wu.exports,Cp;function I1(){return Cp||(Cp=1,function(n,t){(function(){var r,i=0xdeadbeefcafe,o=(i&16777215)==15715070;function u(k,U,F){k!=null&&(typeof k=="number"?this.fromNumber(k,U,F):U==null&&typeof k!="string"?this.fromString(k,256):this.fromString(k,U))}function c(){return new u(null)}function d(k,U,F,re,ke,Be){for(;--Be>=0;){var _e=U*this[k++]+F[re]+ke;ke=Math.floor(_e/67108864),F[re++]=_e&67108863}return ke}function m(k,U,F,re,ke,Be){for(var _e=U&32767,He=U>>15;--Be>=0;){var St=this[k]&32767,Pe=this[k++]>>15,Ea=He*St+Pe*_e;St=_e*St+((Ea&32767)<<15)+F[re]+(ke&1073741823),ke=(St>>>30)+(Ea>>>15)+He*Pe+(ke>>>30),F[re++]=St&1073741823}return ke}function h(k,U,F,re,ke,Be){for(var _e=U&16383,He=U>>14;--Be>=0;){var St=this[k]&16383,Pe=this[k++]>>14,Ea=He*St+Pe*_e;St=_e*St+((Ea&16383)<<14)+F[re]+ke,ke=(St>>28)+(Ea>>14)+He*Pe,F[re++]=St&268435455}return ke}var y=typeof navigator<"u";y&&o&&navigator.appName=="Microsoft Internet Explorer"?(u.prototype.am=m,r=30):y&&o&&navigator.appName!="Netscape"?(u.prototype.am=d,r=26):(u.prototype.am=h,r=28),u.prototype.DB=r,u.prototype.DM=(1<<r)-1,u.prototype.DV=1<<r;var E=52;u.prototype.FV=Math.pow(2,E),u.prototype.F1=E-r,u.prototype.F2=2*r-E;var C="0123456789abcdefghijklmnopqrstuvwxyz",x=new Array,S,N;for(S=48,N=0;N<=9;++N)x[S++]=N;for(S=97,N=10;N<36;++N)x[S++]=N;for(S=65,N=10;N<36;++N)x[S++]=N;function B(k){return C.charAt(k)}function R(k,U){var F=x[k.charCodeAt(U)];return F??-1}function M(k){for(var U=this.t-1;U>=0;--U)k[U]=this[U];k.t=this.t,k.s=this.s}function O(k){this.t=1,this.s=k<0?-1:0,k>0?this[0]=k:k<-1?this[0]=k+this.DV:this.t=0}function z(k){var U=c();return U.fromInt(k),U}function H(k,U){var F;if(U==16)F=4;else if(U==8)F=3;else if(U==256)F=8;else if(U==2)F=1;else if(U==32)F=5;else if(U==4)F=2;else{this.fromRadix(k,U);return}this.t=0,this.s=0;for(var re=k.length,ke=!1,Be=0;--re>=0;){var _e=F==8?k[re]&255:R(k,re);if(_e<0){k.charAt(re)=="-"&&(ke=!0);continue}ke=!1,Be==0?this[this.t++]=_e:Be+F>this.DB?(this[this.t-1]|=(_e&(1<<this.DB-Be)-1)<<Be,this[this.t++]=_e>>this.DB-Be):this[this.t-1]|=_e<<Be,Be+=F,Be>=this.DB&&(Be-=this.DB)}F==8&&(k[0]&128)!=0&&(this.s=-1,Be>0&&(this[this.t-1]|=(1<<this.DB-Be)-1<<Be)),this.clamp(),ke&&u.ZERO.subTo(this,this)}function V(){for(var k=this.s&this.DM;this.t>0&&this[this.t-1]==k;)--this.t}function ee(k){if(this.s<0)return"-"+this.negate().toString(k);var U;if(k==16)U=4;else if(k==8)U=3;else if(k==2)U=1;else if(k==32)U=5;else if(k==4)U=2;else return this.toRadix(k);var F=(1<<U)-1,re,ke=!1,Be="",_e=this.t,He=this.DB-_e*this.DB%U;if(_e-- >0)for(He<this.DB&&(re=this[_e]>>He)>0&&(ke=!0,Be=B(re));_e>=0;)He<U?(re=(this[_e]&(1<<He)-1)<<U-He,re|=this[--_e]>>(He+=this.DB-U)):(re=this[_e]>>(He-=U)&F,He<=0&&(He+=this.DB,--_e)),re>0&&(ke=!0),ke&&(Be+=B(re));return ke?Be:"0"}function q(){var k=c();return u.ZERO.subTo(this,k),k}function J(){return this.s<0?this.negate():this}function Z(k){var U=this.s-k.s;if(U!=0)return U;var F=this.t;if(U=F-k.t,U!=0)return this.s<0?-U:U;for(;--F>=0;)if((U=this[F]-k[F])!=0)return U;return 0}function $(k){var U=1,F;return(F=k>>>16)!=0&&(k=F,U+=16),(F=k>>8)!=0&&(k=F,U+=8),(F=k>>4)!=0&&(k=F,U+=4),(F=k>>2)!=0&&(k=F,U+=2),(F=k>>1)!=0&&(k=F,U+=1),U}function ge(){return this.t<=0?0:this.DB*(this.t-1)+$(this[this.t-1]^this.s&this.DM)}function se(k,U){var F;for(F=this.t-1;F>=0;--F)U[F+k]=this[F];for(F=k-1;F>=0;--F)U[F]=0;U.t=this.t+k,U.s=this.s}function ce(k,U){for(var F=k;F<this.t;++F)U[F-k]=this[F];U.t=Math.max(this.t-k,0),U.s=this.s}function ne(k,U){var F=k%this.DB,re=this.DB-F,ke=(1<<re)-1,Be=Math.floor(k/this.DB),_e=this.s<<F&this.DM,He;for(He=this.t-1;He>=0;--He)U[He+Be+1]=this[He]>>re|_e,_e=(this[He]&ke)<<F;for(He=Be-1;He>=0;--He)U[He]=0;U[Be]=_e,U.t=this.t+Be+1,U.s=this.s,U.clamp()}function G(k,U){U.s=this.s;var F=Math.floor(k/this.DB);if(F>=this.t){U.t=0;return}var re=k%this.DB,ke=this.DB-re,Be=(1<<re)-1;U[0]=this[F]>>re;for(var _e=F+1;_e<this.t;++_e)U[_e-F-1]|=(this[_e]&Be)<<ke,U[_e-F]=this[_e]>>re;re>0&&(U[this.t-F-1]|=(this.s&Be)<<ke),U.t=this.t-F,U.clamp()}function oe(k,U){for(var F=0,re=0,ke=Math.min(k.t,this.t);F<ke;)re+=this[F]-k[F],U[F++]=re&this.DM,re>>=this.DB;if(k.t<this.t){for(re-=k.s;F<this.t;)re+=this[F],U[F++]=re&this.DM,re>>=this.DB;re+=this.s}else{for(re+=this.s;F<k.t;)re-=k[F],U[F++]=re&this.DM,re>>=this.DB;re-=k.s}U.s=re<0?-1:0,re<-1?U[F++]=this.DV+re:re>0&&(U[F++]=re),U.t=F,U.clamp()}function Ae(k,U){var F=this.abs(),re=k.abs(),ke=F.t;for(U.t=ke+re.t;--ke>=0;)U[ke]=0;for(ke=0;ke<re.t;++ke)U[ke+F.t]=F.am(0,re[ke],U,ke,0,F.t);U.s=0,U.clamp(),this.s!=k.s&&u.ZERO.subTo(U,U)}function xe(k){for(var U=this.abs(),F=k.t=2*U.t;--F>=0;)k[F]=0;for(F=0;F<U.t-1;++F){var re=U.am(F,U[F],k,2*F,0,1);(k[F+U.t]+=U.am(F+1,2*U[F],k,2*F+1,re,U.t-F-1))>=U.DV&&(k[F+U.t]-=U.DV,k[F+U.t+1]=1)}k.t>0&&(k[k.t-1]+=U.am(F,U[F],k,2*F,0,1)),k.s=0,k.clamp()}function P(k,U,F){var re=k.abs();if(!(re.t<=0)){var ke=this.abs();if(ke.t<re.t){U!=null&&U.fromInt(0),F!=null&&this.copyTo(F);return}F==null&&(F=c());var Be=c(),_e=this.s,He=k.s,St=this.DB-$(re[re.t-1]);St>0?(re.lShiftTo(St,Be),ke.lShiftTo(St,F)):(re.copyTo(Be),ke.copyTo(F));var Pe=Be.t,Ea=Be[Pe-1];if(Ea!=0){var ra=Ea*(1<<this.F1)+(Pe>1?Be[Pe-2]>>this.F2:0),Ja=this.FV/ra,fr=(1<<this.F1)/ra,Ft=1<<this.F2,qt=F.t,Va=qt-Pe,ua=U??c();for(Be.dlShiftTo(Va,ua),F.compareTo(ua)>=0&&(F[F.t++]=1,F.subTo(ua,F)),u.ONE.dlShiftTo(Pe,ua),ua.subTo(Be,Be);Be.t<Pe;)Be[Be.t++]=0;for(;--Va>=0;){var g=F[--qt]==Ea?this.DM:Math.floor(F[qt]*Ja+(F[qt-1]+Ft)*fr);if((F[qt]+=Be.am(0,g,F,Va,0,Pe))<g)for(Be.dlShiftTo(Va,ua),F.subTo(ua,F);F[qt]<--g;)F.subTo(ua,F)}U!=null&&(F.drShiftTo(Pe,U),_e!=He&&u.ZERO.subTo(U,U)),F.t=Pe,F.clamp(),St>0&&F.rShiftTo(St,F),_e<0&&u.ZERO.subTo(F,F)}}}function te(k){var U=c();return this.abs().divRemTo(k,null,U),this.s<0&&U.compareTo(u.ZERO)>0&&k.subTo(U,U),U}function pe(k){this.m=k}function Ce(k){return k.s<0||k.compareTo(this.m)>=0?k.mod(this.m):k}function Me(k){return k}function Ge(k){k.divRemTo(this.m,null,k)}function Qe(k,U,F){k.multiplyTo(U,F),this.reduce(F)}function ot(k,U){k.squareTo(U),this.reduce(U)}pe.prototype.convert=Ce,pe.prototype.revert=Me,pe.prototype.reduce=Ge,pe.prototype.mulTo=Qe,pe.prototype.sqrTo=ot;function Je(){if(this.t<1)return 0;var k=this[0];if((k&1)==0)return 0;var U=k&3;return U=U*(2-(k&15)*U)&15,U=U*(2-(k&255)*U)&255,U=U*(2-((k&65535)*U&65535))&65535,U=U*(2-k*U%this.DV)%this.DV,U>0?this.DV-U:-U}function Ze(k){this.m=k,this.mp=k.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<k.DB-15)-1,this.mt2=2*k.t}function yt(k){var U=c();return k.abs().dlShiftTo(this.m.t,U),U.divRemTo(this.m,null,U),k.s<0&&U.compareTo(u.ZERO)>0&&this.m.subTo(U,U),U}function ta(k){var U=c();return k.copyTo(U),this.reduce(U),U}function Nt(k){for(;k.t<=this.mt2;)k[k.t++]=0;for(var U=0;U<this.m.t;++U){var F=k[U]&32767,re=F*this.mpl+((F*this.mph+(k[U]>>15)*this.mpl&this.um)<<15)&k.DM;for(F=U+this.m.t,k[F]+=this.m.am(0,re,k,U,0,this.m.t);k[F]>=k.DV;)k[F]-=k.DV,k[++F]++}k.clamp(),k.drShiftTo(this.m.t,k),k.compareTo(this.m)>=0&&k.subTo(this.m,k)}function At(k,U){k.squareTo(U),this.reduce(U)}function Et(k,U,F){k.multiplyTo(U,F),this.reduce(F)}Ze.prototype.convert=yt,Ze.prototype.revert=ta,Ze.prototype.reduce=Nt,Ze.prototype.mulTo=Et,Ze.prototype.sqrTo=At;function Ht(){return(this.t>0?this[0]&1:this.s)==0}function Se(k,U){if(k>4294967295||k<1)return u.ONE;var F=c(),re=c(),ke=U.convert(this),Be=$(k)-1;for(ke.copyTo(F);--Be>=0;)if(U.sqrTo(F,re),(k&1<<Be)>0)U.mulTo(re,ke,F);else{var _e=F;F=re,re=_e}return U.revert(F)}function je(k,U){var F;return k<256||U.isEven()?F=new pe(U):F=new Ze(U),this.exp(k,F)}u.prototype.copyTo=M,u.prototype.fromInt=O,u.prototype.fromString=H,u.prototype.clamp=V,u.prototype.dlShiftTo=se,u.prototype.drShiftTo=ce,u.prototype.lShiftTo=ne,u.prototype.rShiftTo=G,u.prototype.subTo=oe,u.prototype.multiplyTo=Ae,u.prototype.squareTo=xe,u.prototype.divRemTo=P,u.prototype.invDigit=Je,u.prototype.isEven=Ht,u.prototype.exp=Se,u.prototype.toString=ee,u.prototype.negate=q,u.prototype.abs=J,u.prototype.compareTo=Z,u.prototype.bitLength=ge,u.prototype.mod=te,u.prototype.modPowInt=je,u.ZERO=z(0),u.ONE=z(1);function et(){var k=c();return this.copyTo(k),k}function ft(){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 K(){return this.t==0?this.s:this[0]<<24>>24}function ie(){return this.t==0?this.s:this[0]<<16>>16}function Ee(k){return Math.floor(Math.LN2*this.DB/Math.log(k))}function Oe(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function Ue(k){if(k==null&&(k=10),this.signum()==0||k<2||k>36)return"0";var U=this.chunkSize(k),F=Math.pow(k,U),re=z(F),ke=c(),Be=c(),_e="";for(this.divRemTo(re,ke,Be);ke.signum()>0;)_e=(F+Be.intValue()).toString(k).substr(1)+_e,ke.divRemTo(re,ke,Be);return Be.intValue().toString(k)+_e}function Le(k,U){this.fromInt(0),U==null&&(U=10);for(var F=this.chunkSize(U),re=Math.pow(U,F),ke=!1,Be=0,_e=0,He=0;He<k.length;++He){var St=R(k,He);if(St<0){k.charAt(He)=="-"&&this.signum()==0&&(ke=!0);continue}_e=U*_e+St,++Be>=F&&(this.dMultiply(re),this.dAddOffset(_e,0),Be=0,_e=0)}Be>0&&(this.dMultiply(Math.pow(U,Be)),this.dAddOffset(_e,0)),ke&&u.ZERO.subTo(this,this)}function ze(k,U,F){if(typeof U=="number")if(k<2)this.fromInt(1);else for(this.fromNumber(k,F),this.testBit(k-1)||this.bitwiseTo(u.ONE.shiftLeft(k-1),Ne,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(U);)this.dAddOffset(2,0),this.bitLength()>k&&this.subTo(u.ONE.shiftLeft(k-1),this);else{var re=new Array,ke=k&7;re.length=(k>>3)+1,U.nextBytes(re),ke>0?re[0]&=(1<<ke)-1:re[0]=0,this.fromString(re,256)}}function L(){var k=this.t,U=new Array;U[0]=this.s;var F=this.DB-k*this.DB%8,re,ke=0;if(k-- >0)for(F<this.DB&&(re=this[k]>>F)!=(this.s&this.DM)>>F&&(U[ke++]=re|this.s<<this.DB-F);k>=0;)F<8?(re=(this[k]&(1<<F)-1)<<8-F,re|=this[--k]>>(F+=this.DB-8)):(re=this[k]>>(F-=8)&255,F<=0&&(F+=this.DB,--k)),(re&128)!=0&&(re|=-256),ke==0&&(this.s&128)!=(re&128)&&++ke,(ke>0||re!=this.s)&&(U[ke++]=re);return U}function v(k){return this.compareTo(k)==0}function w(k){return this.compareTo(k)<0?this:k}function Q(k){return this.compareTo(k)>0?this:k}function X(k,U,F){var re,ke,Be=Math.min(k.t,this.t);for(re=0;re<Be;++re)F[re]=U(this[re],k[re]);if(k.t<this.t){for(ke=k.s&this.DM,re=Be;re<this.t;++re)F[re]=U(this[re],ke);F.t=this.t}else{for(ke=this.s&this.DM,re=Be;re<k.t;++re)F[re]=U(ke,k[re]);F.t=k.t}F.s=U(this.s,k.s),F.clamp()}function ue(k,U){return k&U}function we(k){var U=c();return this.bitwiseTo(k,ue,U),U}function Ne(k,U){return k|U}function it(k){var U=c();return this.bitwiseTo(k,Ne,U),U}function lt(k,U){return k^U}function vt(k){var U=c();return this.bitwiseTo(k,lt,U),U}function dt(k,U){return k&~U}function bn(k){var U=c();return this.bitwiseTo(k,dt,U),U}function Ha(){for(var k=c(),U=0;U<this.t;++U)k[U]=this.DM&~this[U];return k.t=this.t,k.s=~this.s,k}function Qr(k){var U=c();return k<0?this.rShiftTo(-k,U):this.lShiftTo(k,U),U}function $r(k){var U=c();return k<0?this.lShiftTo(-k,U):this.rShiftTo(k,U),U}function fs(k){if(k==0)return-1;var U=0;return(k&65535)==0&&(k>>=16,U+=16),(k&255)==0&&(k>>=8,U+=8),(k&15)==0&&(k>>=4,U+=4),(k&3)==0&&(k>>=2,U+=2),(k&1)==0&&++U,U}function Fe(){for(var k=0;k<this.t;++k)if(this[k]!=0)return k*this.DB+fs(this[k]);return this.s<0?this.t*this.DB:-1}function hs(k){for(var U=0;k!=0;)k&=k-1,++U;return U}function Ri(){for(var k=0,U=this.s&this.DM,F=0;F<this.t;++F)k+=hs(this[F]^U);return k}function Ta(k){var U=Math.floor(k/this.DB);return U>=this.t?this.s!=0:(this[U]&1<<k%this.DB)!=0}function qn(k,U){var F=u.ONE.shiftLeft(k);return this.bitwiseTo(F,U,F),F}function Ui(k){return this.changeBit(k,Ne)}function rr(k){return this.changeBit(k,dt)}function zt(k){return this.changeBit(k,lt)}function pa(k,U){for(var F=0,re=0,ke=Math.min(k.t,this.t);F<ke;)re+=this[F]+k[F],U[F++]=re&this.DM,re>>=this.DB;if(k.t<this.t){for(re+=k.s;F<this.t;)re+=this[F],U[F++]=re&this.DM,re>>=this.DB;re+=this.s}else{for(re+=this.s;F<k.t;)re+=k[F],U[F++]=re&this.DM,re>>=this.DB;re+=k.s}U.s=re<0?-1:0,re>0?U[F++]=re:re<-1&&(U[F++]=this.DV+re),U.t=F,U.clamp()}function Zt(k){var U=c();return this.addTo(k,U),U}function Yn(k){var U=c();return this.subTo(k,U),U}function Zr(k){var U=c();return this.multiplyTo(k,U),U}function gs(){var k=c();return this.squareTo(k),k}function Oi(k){var U=c();return this.divRemTo(k,U,null),U}function xr(k){var U=c();return this.divRemTo(k,null,U),U}function oa(k){var U=c(),F=c();return this.divRemTo(k,U,F),new Array(U,F)}function Fr(k){this[this.t]=this.am(0,k-1,this,0,0,this.t),++this.t,this.clamp()}function en(k,U){if(k!=0){for(;this.t<=U;)this[this.t++]=0;for(this[U]+=k;this[U]>=this.DV;)this[U]-=this.DV,++U>=this.t&&(this[this.t++]=0),++this[U]}}function Xa(){}function Pr(k){return k}function Kt(k,U,F){k.multiplyTo(U,F)}function Mi(k,U){k.squareTo(U)}Xa.prototype.convert=Pr,Xa.prototype.revert=Pr,Xa.prototype.mulTo=Kt,Xa.prototype.sqrTo=Mi;function wn(k){return this.exp(k,new Xa)}function Hr(k,U,F){var re=Math.min(this.t+k.t,U);for(F.s=0,F.t=re;re>0;)F[--re]=0;var ke;for(ke=F.t-this.t;re<ke;++re)F[re+this.t]=this.am(0,k[re],F,re,0,this.t);for(ke=Math.min(k.t,U);re<ke;++re)this.am(0,k[re],F,re,0,U-re);F.clamp()}function ya(k,U,F){--U;var re=F.t=this.t+k.t-U;for(F.s=0;--re>=0;)F[re]=0;for(re=Math.max(U-this.t,0);re<k.t;++re)F[this.t+re-U]=this.am(U-re,k[re],F,0,0,this.t+re-U);F.clamp(),F.drShiftTo(1,F)}function nr(k){this.r2=c(),this.q3=c(),u.ONE.dlShiftTo(2*k.t,this.r2),this.mu=this.r2.divide(k),this.m=k}function Wn(k){if(k.s<0||k.t>2*this.m.t)return k.mod(this.m);if(k.compareTo(this.m)<0)return k;var U=c();return k.copyTo(U),this.reduce(U),U}function _i(k){return k}function ms(k){for(k.drShiftTo(this.m.t-1,this.r2),k.t>this.m.t+1&&(k.t=this.m.t+1,k.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);k.compareTo(this.r2)<0;)k.dAddOffset(1,this.m.t+1);for(k.subTo(this.r2,k);k.compareTo(this.m)>=0;)k.subTo(this.m,k)}function Ir(k,U){k.squareTo(U),this.reduce(U)}function vn(k,U,F){k.multiplyTo(U,F),this.reduce(F)}nr.prototype.convert=Wn,nr.prototype.revert=_i,nr.prototype.reduce=ms,nr.prototype.mulTo=vn,nr.prototype.sqrTo=Ir;function za(k,U){var F=k.bitLength(),re,ke=z(1),Be;if(F<=0)return ke;F<18?re=1:F<48?re=3:F<144?re=4:F<768?re=5:re=6,F<8?Be=new pe(U):U.isEven()?Be=new nr(U):Be=new Ze(U);var _e=new Array,He=3,St=re-1,Pe=(1<<re)-1;if(_e[1]=Be.convert(this),re>1){var Ea=c();for(Be.sqrTo(_e[1],Ea);He<=Pe;)_e[He]=c(),Be.mulTo(Ea,_e[He-2],_e[He]),He+=2}var ra=k.t-1,Ja,fr=!0,Ft=c(),qt;for(F=$(k[ra])-1;ra>=0;){for(F>=St?Ja=k[ra]>>F-St&Pe:(Ja=(k[ra]&(1<<F+1)-1)<<St-F,ra>0&&(Ja|=k[ra-1]>>this.DB+F-St)),He=re;(Ja&1)==0;)Ja>>=1,--He;if((F-=He)<0&&(F+=this.DB,--ra),fr)_e[Ja].copyTo(ke),fr=!1;else{for(;He>1;)Be.sqrTo(ke,Ft),Be.sqrTo(Ft,ke),He-=2;He>0?Be.sqrTo(ke,Ft):(qt=ke,ke=Ft,Ft=qt),Be.mulTo(Ft,_e[Ja],ke)}for(;ra>=0&&(k[ra]&1<<F)==0;)Be.sqrTo(ke,Ft),qt=ke,ke=Ft,Ft=qt,--F<0&&(F=this.DB-1,--ra)}return Be.revert(ke)}function Xn(k){var U=this.s<0?this.negate():this.clone(),F=k.s<0?k.negate():k.clone();if(U.compareTo(F)<0){var re=U;U=F,F=re}var ke=U.getLowestSetBit(),Be=F.getLowestSetBit();if(Be<0)return U;for(ke<Be&&(Be=ke),Be>0&&(U.rShiftTo(Be,U),F.rShiftTo(Be,F));U.signum()>0;)(ke=U.getLowestSetBit())>0&&U.rShiftTo(ke,U),(ke=F.getLowestSetBit())>0&&F.rShiftTo(ke,F),U.compareTo(F)>=0?(U.subTo(F,U),U.rShiftTo(1,U)):(F.subTo(U,F),F.rShiftTo(1,F));return Be>0&&F.lShiftTo(Be,F),F}function zr(k){if(k<=0)return 0;var U=this.DV%k,F=this.s<0?k-1:0;if(this.t>0)if(U==0)F=this[0]%k;else for(var re=this.t-1;re>=0;--re)F=(U*F+this[re])%k;return F}function Nr(k){var U=k.isEven();if(this.isEven()&&U||k.signum()==0)return u.ZERO;for(var F=k.clone(),re=this.clone(),ke=z(1),Be=z(0),_e=z(0),He=z(1);F.signum()!=0;){for(;F.isEven();)F.rShiftTo(1,F),U?((!ke.isEven()||!Be.isEven())&&(ke.addTo(this,ke),Be.subTo(k,Be)),ke.rShiftTo(1,ke)):Be.isEven()||Be.subTo(k,Be),Be.rShiftTo(1,Be);for(;re.isEven();)re.rShiftTo(1,re),U?((!_e.isEven()||!He.isEven())&&(_e.addTo(this,_e),He.subTo(k,He)),_e.rShiftTo(1,_e)):He.isEven()||He.subTo(k,He),He.rShiftTo(1,He);F.compareTo(re)>=0?(F.subTo(re,F),U&&ke.subTo(_e,ke),Be.subTo(He,Be)):(re.subTo(F,re),U&&_e.subTo(ke,_e),He.subTo(Be,He))}if(re.compareTo(u.ONE)!=0)return u.ZERO;if(He.compareTo(k)>=0)return He.subtract(k);if(He.signum()<0)He.addTo(k,He);else return He;return He.signum()<0?He.add(k):He}var aa=[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],Jn=(1<<26)/aa[aa.length-1];function ps(k){var U,F=this.abs();if(F.t==1&&F[0]<=aa[aa.length-1]){for(U=0;U<aa.length;++U)if(F[0]==aa[U])return!0;return!1}if(F.isEven())return!1;for(U=1;U<aa.length;){for(var re=aa[U],ke=U+1;ke<aa.length&&re<Jn;)re*=aa[ke++];for(re=F.modInt(re);U<ke;)if(re%aa[U++]==0)return!1}return F.millerRabin(k)}function ys(k){var U=this.subtract(u.ONE),F=U.getLowestSetBit();if(F<=0)return!1;var re=U.shiftRight(F);k=k+1>>1,k>aa.length&&(k=aa.length);for(var ke=c(),Be=0;Be<k;++Be){ke.fromInt(aa[Math.floor(Math.random()*aa.length)]);var _e=ke.modPow(re,this);if(_e.compareTo(u.ONE)!=0&&_e.compareTo(U)!=0){for(var He=1;He++<F&&_e.compareTo(U)!=0;)if(_e=_e.modPowInt(2,this),_e.compareTo(u.ONE)==0)return!1;if(_e.compareTo(U)!=0)return!1}}return!0}u.prototype.chunkSize=Ee,u.prototype.toRadix=Ue,u.prototype.fromRadix=Le,u.prototype.fromNumber=ze,u.prototype.bitwiseTo=X,u.prototype.changeBit=qn,u.prototype.addTo=pa,u.prototype.dMultiply=Fr,u.prototype.dAddOffset=en,u.prototype.multiplyLowerTo=Hr,u.prototype.multiplyUpperTo=ya,u.prototype.modInt=zr,u.prototype.millerRabin=ys,u.prototype.clone=et,u.prototype.intValue=ft,u.prototype.byteValue=K,u.prototype.shortValue=ie,u.prototype.signum=Oe,u.prototype.toByteArray=L,u.prototype.equals=v,u.prototype.min=w,u.prototype.max=Q,u.prototype.and=we,u.prototype.or=it,u.prototype.xor=vt,u.prototype.andNot=bn,u.prototype.not=Ha,u.prototype.shiftLeft=Qr,u.prototype.shiftRight=$r,u.prototype.getLowestSetBit=Fe,u.prototype.bitCount=Ri,u.prototype.testBit=Ta,u.prototype.setBit=Ui,u.prototype.clearBit=rr,u.prototype.flipBit=zt,u.prototype.add=Zt,u.prototype.subtract=Yn,u.prototype.multiply=Zr,u.prototype.divide=Oi,u.prototype.remainder=xr,u.prototype.divideAndRemainder=oa,u.prototype.modPow=za,u.prototype.modInverse=Nr,u.prototype.pow=wn,u.prototype.gcd=Xn,u.prototype.isProbablePrime=ps,u.prototype.square=gs,u.prototype.Barrett=nr;var Vt,mt,Ot;function Vr(k){mt[Ot++]^=k&255,mt[Ot++]^=k>>8&255,mt[Ot++]^=k>>16&255,mt[Ot++]^=k>>24&255,Ot>=xn&&(Ot-=xn)}function tn(){Vr(new Date().getTime())}if(mt==null){mt=new Array,Ot=0;var la;if(typeof window<"u"&&window.crypto){if(window.crypto.getRandomValues){var $n=new Uint8Array(32);for(window.crypto.getRandomValues($n),la=0;la<32;++la)mt[Ot++]=$n[la]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var _a=window.crypto.random(32);for(la=0;la<_a.length;++la)mt[Ot++]=_a.charCodeAt(la)&255}}for(;Ot<xn;)la=Math.floor(65536*Math.random()),mt[Ot++]=la>>>8,mt[Ot++]=la&255;Ot=0,tn()}function ji(){if(Vt==null){for(tn(),Vt=Tr(),Vt.init(mt),Ot=0;Ot<mt.length;++Ot)mt[Ot]=0;Ot=0}return Vt.next()}function an(k){var U;for(U=0;U<k.length;++U)k[U]=ji()}function Cn(){}Cn.prototype.nextBytes=an;function Sr(){this.i=0,this.j=0,this.S=new Array}function Zn(k){var U,F,re;for(U=0;U<256;++U)this.S[U]=U;for(F=0,U=0;U<256;++U)F=F+this.S[U]+k[U%k.length]&255,re=this.S[U],this.S[U]=this.S[F],this.S[F]=re;this.i=0,this.j=0}function Qi(){var k;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,k=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=k,this.S[k+this.S[this.i]&255]}Sr.prototype.init=Zn,Sr.prototype.next=Qi;function Tr(){return new Sr}var xn=256;n.exports={default:u,BigInteger:u,SecureRandom:Cn}}).call(x1)}(Wu)),Wu.exports}var cf,xp;function $f(){if(xp)return cf;xp=1;const n=v1(),t=C1(),{BigInteger:r}=I1(),i=Symbol("big-integer"),o=Symbol("hex-length");class u{constructor(d,m){this[i]=d,this[o]=m}add(d){return new u(this[i].add(d[i]),null)}equals(d){return this[i].equals(d[i])}multiply(d){return new u(this[i].multiply(d[i]),null)}modPow(d,m){return new u(this[i].modPow(d[i],m[i]),m[o])}mod(d){return new u(this[i].mod(d[i]),d[o])}subtract(d){return new u(this[i].subtract(d[i]),this[o])}xor(d){return new u(this[i].xor(d[i]),this[o])}pad(d){if(d<this[o])throw new Error("Cannot pad to a shorter length");return new u(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 u.fromHex=function(c){return new u(new r(c,16),c.length)},u.randomInteger=function(c){return u.fromHex(t(c))},u.ZERO=new u(new r("0"),null),cf=u,cf}var df,Ip;function N1(){if(Ip)return df;Ip=1;const n=gE(),t=E1(),r=b1(),i=w1(),o=$f();function u(c){const d=c.reduce((h,y)=>h+y.byteLength,0),m=new Uint8Array(d);return c.reduce((h,y)=>(m.set(new Uint8Array(y),h),h+y.byteLength),0),m.buffer}return df=function(...d){const m=u(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(m)))},df}var Np;function S1(){return Np||(Np=1,function(n){const t=N1(),r=$f(),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(u){return u.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}(af)),af}var Sp;function T1(){if(Sp)return Ci;Sp=1;const n=S1(),t=$f();return Ci.generateSalt=function(){return t.randomInteger(n.hashOutputBytes).toHex()},Ci.derivePrivateKey=function(r,i,o){const{H:u}=n,c=t.fromHex(r),d=String(i),m=String(o);return u(c,u(`${d}:${m}`)).toHex()},Ci.deriveVerifier=function(r){const{N:i,g:o}=n,u=t.fromHex(r);return o.modPow(u,i).toHex()},Ci.generateEphemeral=function(){const{N:r,g:i}=n,o=t.randomInteger(n.hashOutputBytes),u=i.modPow(o,r);return{secret:o.toHex(),public:u.toHex()}},Ci.deriveSession=function(r,i,o,u,c){const{N:d,g:m,k:h,H:y,PAD:E}=n,C=t.fromHex(r),x=t.fromHex(i),S=t.fromHex(o),N=String(u),B=t.fromHex(c),R=m.modPow(C,d);if(x.mod(d).equals(t.ZERO))throw new Error("The server sent an invalid public ephemeral");const M=y(E(R),E(x)),O=x.subtract(h.multiply(m.modPow(B,d))).modPow(C.add(M.multiply(B)),d),z=y(O),H=y(y(d).xor(y(m)),y(N),S,R,x,z);return{key:z.toHex(),proof:H.toHex()}},Ci.verifySession=function(r,i,o){const{H:u}=n,c=t.fromHex(r),d=t.fromHex(i.proof),m=t.fromHex(i.key),h=u(c,d,m);if(!t.fromHex(o).equals(h))throw new Error("Server provided session proof is invalid")},Ci}var k1=T1();const Ws=Li(k1);class fl extends Error{constructor(t){super(t),this.name="ApiAuthError"}}class mE{constructor(t){Xt(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 u=await i.json();throw new fl(u.title)}return await i.json()}async validateLogin(t,r,i,o){const u=Ws.generateEphemeral(),c=Ws.derivePrivateKey(o.salt,t,r),d=Ws.deriveSession(u.secret,o.serverEphemeral,o.salt,t,c),m={username:t.toLowerCase().trim(),rememberMe:i,clientPublicEphemeral:u.public,clientSessionProof:d.proof},h=await this.webApiService.rawFetch("Auth/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)});if(h.status===400){const E=await h.json();throw new fl(E.title)}return await h.json()}async validateLogin2Fa(t,r,i,o,u){const c=Ws.generateEphemeral(),d=Ws.derivePrivateKey(o.salt,t,r),m=Ws.deriveSession(c.secret,o.serverEphemeral,o.salt,t,d),h={username:t.toLowerCase().trim(),rememberMe:i,clientPublicEphemeral:c.public,clientSessionProof:m.proof,code2Fa:u},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 fl(C.title)}return await y.json()}}const B1=()=>{const{t:n}=gt(),t=Ma(),r=yn(),i=sa(),{setHeaderButtons:o}=En(),[u,c]=D.useState({username:"",password:""}),{showLoading:d,hideLoading:m,setIsInitialLoading:h}=fa(),[y,E]=D.useState(!0),[C,x]=D.useState(!1),[S,N]=D.useState(null),[B,R]=D.useState(null),[M,O]=D.useState(null),[z,H]=D.useState(!1),[V,ee]=D.useState(""),[q,J]=D.useState(null),[Z,$]=D.useState(null),ge=pn(),se=new mE(ge),ce=async(Ae,xe,P,te,pe)=>{const Ce=await ge.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${xe}`}});await r.setAuthTokens(Ae,xe,P),await i.storeEncryptionKey(te),await i.storeEncryptionKeyDerivationParams({salt:pe.salt,encryptionType:pe.encryptionType,encryptionSettings:pe.encryptionSettings});const Me=await i.initializeDatabase(Ce,te);try{if(await Me.hasPendingMigrations()){t("/upgrade",{replace:!0}),m();return}}catch(Ge){await r.logout(),$(Ge instanceof Error?Ge.message:n("auth.errors.migrationError")),m();return}t("/reinitialize",{replace:!0}),m()};D.useEffect(()=>{(async()=>{const xe=await Ve.getItem("local:clientUrl");let P=Pa.DEFAULT_CLIENT_URL;xe&&xe.length>0&&(P=xe),J(P),h(!1)})()},[h]),D.useEffect(()=>{const Ae=Ia.isPopup()?null:A.jsx(A.Fragment,{children:A.jsx(Ar,{onClick:()=>Ia.openInNewPopup(),title:"Open in new window",iconType:Na.EXPAND})});return o(Ae),()=>{o(null)}},[o]);const ne=async Ae=>{Ae.preventDefault(),$(null);try{d(),r.clearGlobalMessage();const xe=await se.initiateLogin(Zs.normalizeUsername(u.username)),P=await Jt.deriveKeyFromPassword(u.password,xe.salt,xe.encryptionType,xe.encryptionSettings),te=ls.Buffer.from(P).toString("hex").toUpperCase(),pe=ls.Buffer.from(P).toString("base64"),Ce=await se.validateLogin(Zs.normalizeUsername(u.username),te,y,xe);if(Ce.requiresTwoFactor){N(xe),R(te),O(pe),H(!0),m();return}if(!Ce.token)throw new Error(n("auth.errors.noToken"));await ce(Zs.normalizeUsername(u.username),Ce.token.token,Ce.token.refreshToken,pe,xe)}catch(xe){xe instanceof fl?$(n("common.apiErrors."+xe.message)):$(n("auth.errors.serverError")),m()}},G=async Ae=>{Ae.preventDefault(),$(null);try{if(d(),!B||!M||!S)throw new Error(n("common.errors.unknownError"));const xe=V.trim();if(!/^\d{6}$/.test(xe))throw new Error(n("auth.errors.invalidCode"));const P=await se.validateLogin2Fa(Zs.normalizeUsername(u.username),B,y,S,parseInt(V));if(!P.token)throw new Error(n("auth.errors.noToken"));await ce(Zs.normalizeUsername(u.username),P.token.token,P.token.refreshToken,M,S),H(!1),ee(""),R(null),O(null),N(null)}catch(xe){console.error("2FA error:",xe),xe instanceof fl?$(n("common.apiErrors."+xe.message)):$(n("auth.errors.serverError")),m()}},oe=Ae=>{const{name:xe,value:P}=Ae.target;c(te=>({...te,[xe]:P}))};return z?A.jsx("div",{children:A.jsxs("form",{onSubmit:G,className:"bg-white dark:bg-gray-700 w-full shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[Z&&A.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:Z}),A.jsxs("div",{className:"mb-6",children:[A.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:n("auth.twoFactorTitle")}),A.jsx("label",{className:"block text-gray-700 dark:text-gray-200 text-sm font-bold mb-2",htmlFor:"twoFactorCode",children:n("auth.authCode")}),A.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:Ae=>ee(Ae.target.value),placeholder:n("auth.authCodePlaceholder"),required:!0})]}),A.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[A.jsx(Oa,{type:"submit",children:n("auth.verify")}),A.jsx(Oa,{type:"button",onClick:()=>{c({username:"",password:""}),H(!1),ee(""),R(null),O(null),N(null),$(null)},variant:"secondary",children:n("auth.cancel")})]}),A.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-4 text-center",children:n("auth.twoFactorNote")})]})}):A.jsxs("div",{children:[A.jsxs("form",{onSubmit:ne,className:"bg-white dark:bg-gray-700 w-full shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[Z&&A.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:Z}),A.jsx("h2",{className:"text-xl font-bold dark:text-gray-200",children:n("auth.loginTitle")}),A.jsx(p1,{}),A.jsxs("div",{className:"mb-4",children:[A.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-bold mb-2",htmlFor:"username",children:n("auth.username")}),A.jsx("input",{className:"shadow text-sm appearance-none border rounded w-full py-2 px-3 text-gray-700 dark:text-gray-200 dark:bg-gray-800 dark:border-gray-600 leading-tight focus:outline-none focus:shadow-outline",id:"username",type:"text",name:"username",placeholder:n("auth.usernamePlaceholder"),value:u.username,onChange:oe,required:!0})]}),A.jsxs("div",{className:"mb-4",children:[A.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-bold mb-2",htmlFor:"password",children:n("auth.password")}),A.jsxs("div",{className:"relative",children:[A.jsx("input",{className:"shadow text-sm appearance-none border rounded w-full py-2 px-3 pr-10 text-gray-700 dark:text-gray-200 dark:bg-gray-800 dark:border-gray-600 mb-3 leading-tight focus:outline-none focus:shadow-outline",id:"password",type:C?"text":"password",name:"password",placeholder:n("auth.passwordPlaceholder"),value:u.password,onChange:oe,required:!0}),A.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:A.jsx(Jf,{type:C?Na.EYE_OFF:Na.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),A.jsx("div",{className:"mb-6",children:A.jsxs("label",{className:"flex items-center",children:[A.jsx("input",{type:"checkbox",checked:y,onChange:Ae=>E(Ae.target.checked),className:"mr-2"}),A.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-200",children:n("auth.rememberMe")})]})}),A.jsx("div",{className:"flex w-full",children:A.jsx(Oa,{type:"submit",children:n("auth.loginButton")})})]}),A.jsxs("div",{className:"text-center text-gray-600 dark:text-gray-400",children:[n("auth.noAccount")," ",A.jsx("a",{href:q??"",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")})]})]})},D1=()=>{var z,H;const{t:n}=gt(),t=yn(),r=eE(),i=sa(),o=Ma(),{setHeaderButtons:u}=En(),c=pn(),d=new mE(c),[m,h]=D.useState(""),[y,E]=D.useState(!1),[C,x]=D.useState(null),{showLoading:S,hideLoading:N,setIsInitialLoading:B}=fa(),R=async()=>{const V=await c.getStatus(),ee=c.validateStatusResponse(V);return V.serverVersion==="0.0.0"?(x(n("common.errors.serverNotAvailable")),!1):ee!==null?(await t.logout(n("common.errors."+ee)),!1):(B(!1),!0)};D.useEffect(()=>{R()},[]),D.useEffect(()=>{const V=Ia.isPopup()?null:A.jsx(Ar,{onClick:()=>Ia.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Na.EXPAND});return u(V),()=>{u(null)}},[u,n]);const M=async V=>{if(V.preventDefault(),x(null),S(),!await R()){N();return}try{const q=await d.initiateLogin(r.username),J=await Jt.deriveKeyFromPassword(m,q.salt,q.encryptionType,q.encryptionSettings),Z=await c.get("Vault"),$=ls.Buffer.from(J).toString("base64");if(await i.storeEncryptionKey($),await(await i.initializeDatabase(Z,$)).hasPendingMigrations()){o("/upgrade",{replace:!0}),N();return}await Ve.setItem(rc,0),o("/reinitialize",{replace:!0})}catch(q){q instanceof ro?await t.logout(q.message):x(n("auth.errors.wrongPassword")),console.error("Unlock error:",q)}finally{N()}},O=()=>{t.logout()};return A.jsx("div",{children:A.jsxs("form",{onSubmit:M,className:"bg-white dark:bg-gray-700 w-full shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[A.jsxs("div",{className:"flex items-center space-x-3 mb-6",children:[A.jsx("div",{className:"flex-shrink-0",children:A.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:A.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((H=(z=r.username)==null?void 0:z[0])==null?void 0:H.toUpperCase())||"?"})})}),A.jsxs("div",{children:[A.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:r.username}),A.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n("auth.loggedIn")})]})]}),A.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:n("auth.unlockTitle")}),C&&A.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400",children:C}),A.jsxs("div",{className:"mb-2",children:[A.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-bold mb-2",htmlFor:"password",children:n("auth.masterPassword")}),A.jsxs("div",{className:"relative",children:[A.jsx("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 pr-10 text-gray-700 dark:text-gray-200 dark:bg-gray-800 dark:border-gray-600 mb-3 leading-tight focus:outline-none focus:shadow-outline",id:"password",type:y?"text":"password",value:m,onChange:V=>h(V.target.value),placeholder:n("auth.passwordPlaceholder"),required:!0,autoFocus:!0}),A.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:()=>E(!y),tabIndex:-1,children:A.jsx(Jf,{type:y?Na.EYE_OFF:Na.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),A.jsx(Oa,{type:"submit",children:n("auth.unlockVault")}),A.jsxs("div",{className:"font-medium text-gray-500 dark:text-gray-200 mt-6",children:[n("auth.switchAccounts")," ",A.jsx("button",{onClick:O,className:"text-primary-700 hover:underline dark:text-primary-500",children:n("auth.logout")})]})]})})},L1=()=>{const n=Ma(),{t}=gt(),r=()=>{const i=new URL(window.location.href);i.searchParams.delete("mode"),window.history.replaceState({},"",i),n("/credentials")};return A.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center",children:[A.jsx("div",{className:"mb-4 text-green-600 dark:text-green-400",children:A.jsx("svg",{className:"w-12 h-12 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})})}),A.jsx("h2",{className:"text-xl font-semibold mb-4 text-gray-900 dark:text-white",children:t("auth.unlockSuccessTitle")}),A.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-400",children:t("auth.unlockSuccessDescription")}),A.jsxs("div",{className:"space-y-3 w-full",children:[A.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")}),A.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")})]})]})},lc=({isOpen:n,onClose:t,onConfirm:r,title:i,message:o,confirmText:u="",cancelText:c="",variant:d="default"})=>{const{t:m}=gt();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 A.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[A.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-80 transition-opacity",onClick:t}),A.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:A.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:[A.jsxs("button",{type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-500 focus:outline-none",onClick:t,children:[A.jsx("span",{className:"sr-only",children:m("common.close")}),A.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]}),A.jsxs("div",{className:"sm:flex sm:items-start",children:[d==="danger"&&A.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:A.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:A.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"})})}),A.jsxs("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[A.jsx("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white",children:i}),A.jsx("div",{className:"mt-2",children:A.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:o})})]})]}),A.jsxs("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[u&&A.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:u}),c&&A.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})]})]})})]})},Af=async(n,t,r=!0)=>{if(!r)return n();const i=Date.now(),o=await n(),u=Date.now()-i;return u<t&&await new Promise(c=>setTimeout(c,t-u)),o},bc=()=>{const{t:n}=gt(),t=yn(),r=sa(),i=pn();return{syncVault:D.useCallback(async(u={})=>{const{initialSync:c=!1,onSuccess:d,onError:m,onStatus:h,_onOffline:y,onUpgradeRequired:E}=u,C=c;try{if(!await t.initializeAuth())return!1;h==null||h(n("common.checkingVaultUpdates"));const S=await Af(()=>i.getStatus(),300,C);if(S.serverVersion==="0.0.0")return m==null||m(n("common.errors.serverNotAvailable")),!1;const N=i.validateStatusResponse(S);if(N)return m==null||m(n("common.errors."+N)),!1;const B=await Lt("GET_ENCRYPTION_KEY_DERIVATION_PARAMS",{},"background");if(B&&S.srpSalt&&S.srpSalt!==B.salt)return await t.logout(n("common.errors.passwordChanged")),!1;const R=await r.getVaultMetadata(),M=(R==null?void 0:R.vaultRevisionNumber)??0;if(S.vaultRevision>M){h==null||h(n("common.syncingUpdatedVault"));const O=await Af(()=>i.get("Vault"),1e3,C);try{const z=await Lt("GET_ENCRYPTION_KEY",{},"background");return await(await r.initializeDatabase(O,z)).hasPendingMigrations()?(E==null||E(),!1):(d==null||d(!0),!0)}catch(z){if(z instanceof ro)return await t.logout(z.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 Af(()=>Promise.resolve(d==null?void 0:d(!1)),300,C),!1)}catch(x){const S=x instanceof Error?x.message:"Unknown error during vault sync";return console.error("Vault sync error:",x),x instanceof ro?(await t.logout(S),!1):(m==null||m(S),!1)}},[t,r,i,n])}};function Zf(){const{t:n}=gt(),[t,r]=D.useState(!1),[i,o]=D.useState(n("common.syncingVault")),u=sa(),{syncVault:c}=bc(),d=D.useCallback(async(h,y)=>{var B;o(n("common.savingChangesToVault")),await h(),o(n("common.uploadingVaultToServer"));const E=u.sqliteClient.exportToBase64(),C=await Lt("GET_ENCRYPTION_KEY",{},"background"),S={vaultBlob:await Jt.symmetricEncrypt(E,C)},N=await Lt("UPLOAD_VAULT",S,"background");if(N.status===0&&N.newRevisionNumber)await u.setCurrentVaultRevisionNumber(N.newRevisionNumber),(B=y.onSuccess)==null||B.call(y);else throw N.status===1?new Error("Vault merge required. Please login via the web app to merge the multiple pending updates to your vault."):N.status===2?new Error(n("common.errors.failedToUploadVault")):new Error(n("common.errors.failedToUploadVault"))},[u,n]);return{executeVaultMutation:D.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 R1=()=>{var ne;const{t:n}=gt(),{username:t,logout:r}=yn(),i=sa(),{sqliteClient:o}=i,{setHeaderButtons:u}=En(),[c,d]=D.useState(!1),[m,h]=D.useState(null),[y,E]=D.useState(null),[C,x]=D.useState(null),[S,N]=D.useState(!1),[B,R]=D.useState(!1),{setIsInitialLoading:M}=fa(),O=pn(),{executeVaultMutation:z,isLoading:H,syncStatus:V}=Zf(),{syncVault:ee}=bc(),q=Ma();D.useEffect(()=>{const G=Ia.isPopup()?null:A.jsx(A.Fragment,{children:A.jsx(Ar,{onClick:()=>Ia.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Na.EXPAND})});return u(G),()=>{u(null)}},[u,n]);const J=D.useCallback(async()=>{try{if(o){const G=await o.getDatabaseVersion(),oe=await o.getLatestDatabaseVersion();h(G),E(oe)}M(!1)}catch(G){console.error("Failed to load version information:",G),x(n("upgrade.alerts.unableToGetVersionInfo"))}},[o,M,n]);D.useEffect(()=>{J()},[J]);const Z=async()=>{if(!o||!m||!y){x(n("upgrade.alerts.unableToGetVersionInfo"));return}if(await O.isSelfHosted()){N(!0);return}await $()},$=async()=>{if(!o||!m||!y){x(n("upgrade.alerts.unableToGetVersionInfo"));return}d(!0),x(null);try{const oe=new Sf().getUpgradeVaultSql(m.revision,y.revision);if(!oe.success)throw new Error(oe.error??n("upgrade.alerts.upgradeFailed"));if(oe.sqlCommands.length===0){await ge();return}await z(async()=>{o.beginTransaction();for(let Ae=0;Ae<oe.sqlCommands.length;Ae++){const xe=oe.sqlCommands[Ae];try{o.executeRaw(xe)}catch(P){throw console.error(`Error executing SQL command ${Ae+1}:`,xe,P),o.rollbackTransaction(),new Error(n("upgrade.alerts.failedToApplyMigration",{current:Ae+1,total:oe.sqlCommands.length}))}}o.commitTransaction()},{skipSyncCheck:!0,onSuccess:()=>{ge()},onError:Ae=>{console.error("Upgrade failed:",Ae),x(Ae.message)}}),console.debug("executeVaultMutation done?")}catch(G){console.error("Upgrade failed:",G),x(G instanceof Error?G.message:n("common.errors.unknownError"))}finally{d(!1)}},ge=async()=>{try{await ee({onSuccess:()=>{q("/credentials")},onError:G=>{console.error("Sync error after upgrade:",G),q("/credentials")}})}catch(G){console.error("Error during post-upgrade sync:",G),q("/credentials")}},se=async()=>{r()},ce=()=>{R(!0)};return A.jsxs("div",{children:[(c||H)&&A.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:[A.jsx(Kn,{}),A.jsx("div",{className:"text-sm text-gray-500 mt-2",children:V||n("upgrade.upgrading")})]}),A.jsx(lc,{isOpen:S,onClose:()=>N(!1),onConfirm:()=>{N(!1),$()},title:n("upgrade.alerts.selfHostedServer"),message:n("upgrade.alerts.selfHostedWarning"),confirmText:n("upgrade.alerts.continueUpgrade"),cancelText:n("common.cancel")}),A.jsx(lc,{isOpen:B,onClose:()=>R(!1),onConfirm:()=>R(!1),title:n("upgrade.whatsNew"),message:`${n("upgrade.whatsNewDescription")}

${(y==null?void 0:y.description)??n("upgrade.noDescriptionAvailable")}`}),A.jsxs("form",{className:"w-full px-2 pt-2 pb-2 mb-4",children:[C&&A.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400",children:C}),A.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[A.jsx("div",{className:"flex-shrink-0",children:A.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:A.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((ne=t==null?void 0:t[0])==null?void 0:ne.toUpperCase())||"?"})})}),A.jsx("div",{children:A.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t})})]}),A.jsx("h2",{className:"text-xl font-bold dark:text-gray-200 mb-4",children:n("upgrade.title")}),A.jsxs("div",{className:"mb-6",children:[A.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:n("upgrade.subtitle")}),A.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded p-4 mb-4",children:[A.jsxs("div",{className:"flex items-center justify-between mb-2",children:[A.jsx("span",{className:"font-medium text-gray-700 dark:text-gray-200",children:n("upgrade.versionInformation")}),A.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:"?"})]}),A.jsxs("div",{className:"space-y-2",children:[A.jsxs("div",{className:"flex justify-between items-center",children:[A.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("upgrade.yourVault")}),A.jsx("span",{className:"text-sm font-bold text-orange-600 dark:text-orange-400",children:(m==null?void 0:m.compatibleUpToVersion)??"..."})]}),A.jsxs("div",{className:"flex justify-between items-center",children:[A.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("upgrade.newVersion")}),A.jsx("span",{className:"text-sm font-bold text-green-600 dark:text-green-400",children:(y==null?void 0:y.releaseVersion)??"..."})]})]})]})]}),A.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[A.jsx(Oa,{type:"button",id:"upgrade-button",onClick:Z,children:c||H?V||n("upgrade.upgrading"):n("upgrade.upgrade")}),A.jsx("button",{type:"button",onClick:se,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||H,children:n("upgrade.logout")})]})]})]})};var xy,Iy;const U1=(Iy=(xy=globalThis.browser)==null?void 0:xy.runtime)!=null&&Iy.id?globalThis.browser:globalThis.chrome,ao=U1;var Cl=n=>n.type==="checkbox",ss=n=>n instanceof Date,tr=n=>n==null;const pE=n=>typeof n=="object";var Aa=n=>!tr(n)&&!Array.isArray(n)&&pE(n)&&!ss(n),O1=n=>Aa(n)&&n.target?Cl(n.target)?n.target.checked:n.target.value:n,M1=n=>n.substring(0,n.search(/\.\d+(\.|$)/))||n,_1=(n,t)=>n.has(M1(t)),j1=n=>{const t=n.constructor&&n.constructor.prototype;return Aa(t)&&t.hasOwnProperty("isPrototypeOf")},eh=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ya(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(!(eh&&(n instanceof Blob||i))&&(r||Aa(n)))if(t=r?[]:{},!r&&!j1(n))t=n;else for(const o in n)n.hasOwnProperty(o)&&(t[o]=Ya(n[o]));else return n;return t}var wc=n=>Array.isArray(n)?n.filter(Boolean):[],ma=n=>n===void 0,Xe=(n,t,r)=>{if(!t||!Aa(n))return r;const i=wc(t.split(/[,[\].]+?/)).reduce((o,u)=>tr(o)?o:o[u],n);return ma(i)||i===n?ma(n[t])?r:n[t]:i},An=n=>typeof n=="boolean",th=n=>/^\w*$/.test(n),yE=n=>wc(n.replace(/["|']|\]/g,"").split(/\.|\[/)),Qt=(n,t,r)=>{let i=-1;const o=th(t)?[t]:yE(t),u=o.length,c=u-1;for(;++i<u;){const d=o[i];let m=r;if(i!==c){const h=n[d];m=Aa(h)||Array.isArray(h)?h:isNaN(+o[i+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;n[d]=m,n=n[d]}};const Tp={BLUR:"blur",FOCUS_OUT:"focusout"},Yr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Fn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};Cr.createContext(null);var Q1=(n,t,r,i=!0)=>{const o={defaultValues:t._defaultValues};for(const u in n)Object.defineProperty(o,u,{get:()=>{const c=u;return t._proxyFormState[c]!==Yr.all&&(t._proxyFormState[c]=!i||Yr.all),n[c]}});return o};const F1=typeof window<"u"?D.useLayoutEffect:D.useEffect;var hn=n=>typeof n=="string",P1=(n,t,r,i,o)=>hn(n)?(i&&t.watch.add(n),Xe(r,n,o)):Array.isArray(n)?n.map(u=>(i&&t.watch.add(u),Xe(r,u))):(i&&(t.watchAll=!0),r),EE=(n,t,r,i,o)=>t?{...r[n],types:{...r[n]&&r[n].types?r[n].types:{},[i]:o||!0}}:{},hl=n=>Array.isArray(n)?n:[n],kp=()=>{let n=[];return{get observers(){return n},next:o=>{for(const u of n)u.next&&u.next(o)},subscribe:o=>(n.push(o),{unsubscribe:()=>{n=n.filter(u=>u!==o)}}),unsubscribe:()=>{n=[]}}},Df=n=>tr(n)||!pE(n);function ki(n,t){if(Df(n)||Df(t))return n===t;if(ss(n)&&ss(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 u=n[o];if(!i.includes(o))return!1;if(o!=="ref"){const c=t[o];if(ss(u)&&ss(c)||Aa(u)&&Aa(c)||Array.isArray(u)&&Array.isArray(c)?!ki(u,c):u!==c)return!1}}return!0}var dr=n=>Aa(n)&&!Object.keys(n).length,ah=n=>n.type==="file",Wr=n=>typeof n=="function",uc=n=>{if(!eh)return!1;const t=n?n.ownerDocument:0;return n instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},bE=n=>n.type==="select-multiple",rh=n=>n.type==="radio",H1=n=>rh(n)||Cl(n),ff=n=>uc(n)&&n.isConnected;function z1(n,t){const r=t.slice(0,-1).length;let i=0;for(;i<r;)n=ma(n)?i++:n[t[i++]];return n}function V1(n){for(const t in n)if(n.hasOwnProperty(t)&&!ma(n[t]))return!1;return!0}function va(n,t){const r=Array.isArray(t)?t:th(t)?[t]:yE(t),i=r.length===1?n:z1(n,r),o=r.length-1,u=r[o];return i&&delete i[u],o!==0&&(Aa(i)&&dr(i)||Array.isArray(i)&&V1(i))&&va(n,r.slice(0,-1)),n}var wE=n=>{for(const t in n)if(Wr(n[t]))return!0;return!1};function cc(n,t={}){const r=Array.isArray(n);if(Aa(n)||r)for(const i in n)Array.isArray(n[i])||Aa(n[i])&&!wE(n[i])?(t[i]=Array.isArray(n[i])?[]:{},cc(n[i],t[i])):tr(n[i])||(t[i]=!0);return t}function vE(n,t,r){const i=Array.isArray(n);if(Aa(n)||i)for(const o in n)Array.isArray(n[o])||Aa(n[o])&&!wE(n[o])?ma(t)||Df(r[o])?r[o]=Array.isArray(n[o])?cc(n[o],[]):{...cc(n[o])}:vE(n[o],tr(t)?{}:t[o],r[o]):r[o]=!ki(n[o],t[o]);return r}var nl=(n,t)=>vE(n,t,cc(t));const Bp={value:!1,isValid:!1},Dp={value:!0,isValid:!0};var CE=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&&!ma(n[0].attributes.value)?ma(n[0].value)||n[0].value===""?Dp:{value:n[0].value,isValid:!0}:Dp:Bp}return Bp},xE=(n,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>ma(n)?n:t?n===""?NaN:n&&+n:r&&hn(n)?new Date(n):i?i(n):n;const Lp={isValid:!1,value:null};var IE=n=>Array.isArray(n)?n.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Lp):Lp;function Rp(n){const t=n.ref;return ah(t)?t.files:rh(t)?IE(n.refs).value:bE(t)?[...t.selectedOptions].map(({value:r})=>r):Cl(t)?CE(n.refs).value:xE(ma(t.value)?n.ref.value:t.value,n)}var G1=(n,t,r,i)=>{const o={};for(const u of n){const c=Xe(t,u);c&&Qt(o,u,c._f)}return{criteriaMode:r,names:[...n],fields:o,shouldUseNativeValidation:i}},dc=n=>n instanceof RegExp,il=n=>ma(n)?n:dc(n)?n.source:Aa(n)?dc(n.value)?n.value.source:n.value:n,Up=n=>({isOnSubmit:!n||n===Yr.onSubmit,isOnBlur:n===Yr.onBlur,isOnChange:n===Yr.onChange,isOnAll:n===Yr.all,isOnTouch:n===Yr.onTouched});const Op="AsyncFunction";var K1=n=>!!n&&!!n.validate&&!!(Wr(n.validate)&&n.validate.constructor.name===Op||Aa(n.validate)&&Object.values(n.validate).find(t=>t.constructor.name===Op)),q1=n=>n.mount&&(n.required||n.min||n.max||n.maxLength||n.minLength||n.pattern||n.validate),Mp=(n,t,r)=>!r&&(t.watchAll||t.watch.has(n)||[...t.watch].some(i=>n.startsWith(i)&&/^\.\w+/.test(n.slice(i.length))));const gl=(n,t,r,i)=>{for(const o of r||Object.keys(n)){const u=Xe(n,o);if(u){const{_f:c,...d}=u;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(gl(d,t))break}else if(Aa(d)&&gl(d,t))break}}};function _p(n,t,r){const i=Xe(n,r);if(i||th(r))return{error:i,name:r};const o=r.split(".");for(;o.length;){const u=o.join("."),c=Xe(t,u),d=Xe(n,u);if(c&&!Array.isArray(c)&&r!==u)return{name:r};if(d&&d.type)return{name:u,error:d};if(d&&d.root&&d.root.type)return{name:`${u}.root`,error:d.root};o.pop()}return{name:r}}var Y1=(n,t,r,i)=>{r(n);const{name:o,...u}=n;return dr(u)||Object.keys(u).length>=Object.keys(t).length||Object.keys(u).find(c=>t[c]===(!i||Yr.all))},W1=(n,t,r)=>!n||!t||n===t||hl(n).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i))),X1=(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,J1=(n,t)=>!wc(Xe(n,t)).length&&va(n,t),$1=(n,t,r)=>{const i=hl(Xe(n,r));return Qt(i,"root",t[r]),Qt(n,r,i),n},Xu=n=>hn(n);function jp(n,t,r="validate"){if(Xu(n)||Array.isArray(n)&&n.every(Xu)||An(n)&&!n)return{type:r,message:Xu(n)?n:"",ref:t}}var Xs=n=>Aa(n)&&!dc(n)?n:{value:n,message:""},Qp=async(n,t,r,i,o,u)=>{const{ref:c,refs:d,required:m,maxLength:h,minLength:y,min:E,max:C,pattern:x,validate:S,name:N,valueAsNumber:B,mount:R}=n._f,M=Xe(r,N);if(!R||t.has(N))return{};const O=d?d[0]:c,z=ge=>{o&&O.reportValidity&&(O.setCustomValidity(An(ge)?"":ge||""),O.reportValidity())},H={},V=rh(c),ee=Cl(c),q=V||ee,J=(B||ah(c))&&ma(c.value)&&ma(M)||uc(c)&&c.value===""||M===""||Array.isArray(M)&&!M.length,Z=EE.bind(null,N,i,H),$=(ge,se,ce,ne=Fn.maxLength,G=Fn.minLength)=>{const oe=ge?se:ce;H[N]={type:ge?ne:G,message:oe,ref:c,...Z(ge?ne:G,oe)}};if(u?!Array.isArray(M)||!M.length:m&&(!q&&(J||tr(M))||An(M)&&!M||ee&&!CE(d).isValid||V&&!IE(d).isValid)){const{value:ge,message:se}=Xu(m)?{value:!!m,message:m}:Xs(m);if(ge&&(H[N]={type:Fn.required,message:se,ref:O,...Z(Fn.required,se)},!i))return z(se),H}if(!J&&(!tr(E)||!tr(C))){let ge,se;const ce=Xs(C),ne=Xs(E);if(!tr(M)&&!isNaN(M)){const G=c.valueAsNumber||M&&+M;tr(ce.value)||(ge=G>ce.value),tr(ne.value)||(se=G<ne.value)}else{const G=c.valueAsDate||new Date(M),oe=P=>new Date(new Date().toDateString()+" "+P),Ae=c.type=="time",xe=c.type=="week";hn(ce.value)&&M&&(ge=Ae?oe(M)>oe(ce.value):xe?M>ce.value:G>new Date(ce.value)),hn(ne.value)&&M&&(se=Ae?oe(M)<oe(ne.value):xe?M<ne.value:G<new Date(ne.value))}if((ge||se)&&($(!!ge,ce.message,ne.message,Fn.max,Fn.min),!i))return z(H[N].message),H}if((h||y)&&!J&&(hn(M)||u&&Array.isArray(M))){const ge=Xs(h),se=Xs(y),ce=!tr(ge.value)&&M.length>+ge.value,ne=!tr(se.value)&&M.length<+se.value;if((ce||ne)&&($(ce,ge.message,se.message),!i))return z(H[N].message),H}if(x&&!J&&hn(M)){const{value:ge,message:se}=Xs(x);if(dc(ge)&&!M.match(ge)&&(H[N]={type:Fn.pattern,message:se,ref:c,...Z(Fn.pattern,se)},!i))return z(se),H}if(S){if(Wr(S)){const ge=await S(M,r),se=jp(ge,O);if(se&&(H[N]={...se,...Z(Fn.validate,se.message)},!i))return z(se.message),H}else if(Aa(S)){let ge={};for(const se in S){if(!dr(ge)&&!i)break;const ce=jp(await S[se](M,r),O,se);ce&&(ge={...ce,...Z(se,ce.message)},z(ce.message),i&&(H[N]=ge))}if(!dr(ge)&&(H[N]={ref:O,...ge},!i))return H}}return z(!0),H};const Z1={mode:Yr.onSubmit,reValidateMode:Yr.onChange,shouldFocusError:!0};function eS(n={}){let t={...Z1,...n},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Wr(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=Aa(t.defaultValues)||Aa(t.values)?Ya(t.defaultValues||t.values)||{}:{},u=t.shouldUnregister?{}:Ya(o),c={action:!1,mount:!1,watch:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},m,h=0;const y={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let E={...y};const C={array:kp(),state:kp()},x=t.criteriaMode===Yr.all,S=K=>ie=>{clearTimeout(h),h=setTimeout(K,ie)},N=async K=>{if(!t.disabled&&(y.isValid||E.isValid||K)){const ie=t.resolver?dr((await ee()).errors):await J(i,!0);ie!==r.isValid&&C.state.next({isValid:ie})}},B=(K,ie)=>{!t.disabled&&(y.isValidating||y.validatingFields||E.isValidating||E.validatingFields)&&((K||Array.from(d.mount)).forEach(Ee=>{Ee&&(ie?Qt(r.validatingFields,Ee,ie):va(r.validatingFields,Ee))}),C.state.next({validatingFields:r.validatingFields,isValidating:!dr(r.validatingFields)}))},R=(K,ie=[],Ee,Oe,Ue=!0,Le=!0)=>{if(Oe&&Ee&&!t.disabled){if(c.action=!0,Le&&Array.isArray(Xe(i,K))){const ze=Ee(Xe(i,K),Oe.argA,Oe.argB);Ue&&Qt(i,K,ze)}if(Le&&Array.isArray(Xe(r.errors,K))){const ze=Ee(Xe(r.errors,K),Oe.argA,Oe.argB);Ue&&Qt(r.errors,K,ze),J1(r.errors,K)}if((y.touchedFields||E.touchedFields)&&Le&&Array.isArray(Xe(r.touchedFields,K))){const ze=Ee(Xe(r.touchedFields,K),Oe.argA,Oe.argB);Ue&&Qt(r.touchedFields,K,ze)}(y.dirtyFields||E.dirtyFields)&&(r.dirtyFields=nl(o,u)),C.state.next({name:K,isDirty:$(K,ie),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Qt(u,K,ie)},M=(K,ie)=>{Qt(r.errors,K,ie),C.state.next({errors:r.errors})},O=K=>{r.errors=K,C.state.next({errors:r.errors,isValid:!1})},z=(K,ie,Ee,Oe)=>{const Ue=Xe(i,K);if(Ue){const Le=Xe(u,K,ma(Ee)?Xe(o,K):Ee);ma(Le)||Oe&&Oe.defaultChecked||ie?Qt(u,K,ie?Le:Rp(Ue._f)):ce(K,Le),c.mount&&N()}},H=(K,ie,Ee,Oe,Ue)=>{let Le=!1,ze=!1;const L={name:K};if(!t.disabled){if(!Ee||Oe){(y.isDirty||E.isDirty)&&(ze=r.isDirty,r.isDirty=L.isDirty=$(),Le=ze!==L.isDirty);const v=ki(Xe(o,K),ie);ze=!!Xe(r.dirtyFields,K),v?va(r.dirtyFields,K):Qt(r.dirtyFields,K,!0),L.dirtyFields=r.dirtyFields,Le=Le||(y.dirtyFields||E.dirtyFields)&&ze!==!v}if(Ee){const v=Xe(r.touchedFields,K);v||(Qt(r.touchedFields,K,Ee),L.touchedFields=r.touchedFields,Le=Le||(y.touchedFields||E.touchedFields)&&v!==Ee)}Le&&Ue&&C.state.next(L)}return Le?L:{}},V=(K,ie,Ee,Oe)=>{const Ue=Xe(r.errors,K),Le=(y.isValid||E.isValid)&&An(ie)&&r.isValid!==ie;if(t.delayError&&Ee?(m=S(()=>M(K,Ee)),m(t.delayError)):(clearTimeout(h),m=null,Ee?Qt(r.errors,K,Ee):va(r.errors,K)),(Ee?!ki(Ue,Ee):Ue)||!dr(Oe)||Le){const ze={...Oe,...Le&&An(ie)?{isValid:ie}:{},errors:r.errors,name:K};r={...r,...ze},C.state.next(ze)}},ee=async K=>{B(K,!0);const ie=await t.resolver(u,t.context,G1(K||d.mount,i,t.criteriaMode,t.shouldUseNativeValidation));return B(K),ie},q=async K=>{const{errors:ie}=await ee(K);if(K)for(const Ee of K){const Oe=Xe(ie,Ee);Oe?Qt(r.errors,Ee,Oe):va(r.errors,Ee)}else r.errors=ie;return ie},J=async(K,ie,Ee={valid:!0})=>{for(const Oe in K){const Ue=K[Oe];if(Ue){const{_f:Le,...ze}=Ue;if(Le){const L=d.array.has(Le.name),v=Ue._f&&K1(Ue._f);v&&y.validatingFields&&B([Oe],!0);const w=await Qp(Ue,d.disabled,u,x,t.shouldUseNativeValidation&&!ie,L);if(v&&y.validatingFields&&B([Oe]),w[Le.name]&&(Ee.valid=!1,ie))break;!ie&&(Xe(w,Le.name)?L?$1(r.errors,w,Le.name):Qt(r.errors,Le.name,w[Le.name]):va(r.errors,Le.name))}!dr(ze)&&await J(ze,ie,Ee)}}return Ee.valid},Z=()=>{for(const K of d.unMount){const ie=Xe(i,K);ie&&(ie._f.refs?ie._f.refs.every(Ee=>!ff(Ee)):!ff(ie._f.ref))&&ot(K)}d.unMount=new Set},$=(K,ie)=>!t.disabled&&(K&&ie&&Qt(u,K,ie),!ki(P(),o)),ge=(K,ie,Ee)=>P1(K,d,{...c.mount?u:ma(ie)?o:hn(K)?{[K]:ie}:ie},Ee,ie),se=K=>wc(Xe(c.mount?u:o,K,t.shouldUnregister?Xe(o,K,[]):[])),ce=(K,ie,Ee={})=>{const Oe=Xe(i,K);let Ue=ie;if(Oe){const Le=Oe._f;Le&&(!Le.disabled&&Qt(u,K,xE(ie,Le)),Ue=uc(Le.ref)&&tr(ie)?"":ie,bE(Le.ref)?[...Le.ref.options].forEach(ze=>ze.selected=Ue.includes(ze.value)):Le.refs?Cl(Le.ref)?Le.refs.forEach(ze=>{(!ze.defaultChecked||!ze.disabled)&&(Array.isArray(Ue)?ze.checked=!!Ue.find(L=>L===ze.value):ze.checked=Ue===ze.value||!!Ue)}):Le.refs.forEach(ze=>ze.checked=ze.value===Ue):ah(Le.ref)?Le.ref.value="":(Le.ref.value=Ue,Le.ref.type||C.state.next({name:K,values:Ya(u)})))}(Ee.shouldDirty||Ee.shouldTouch)&&H(K,Ue,Ee.shouldTouch,Ee.shouldDirty,!0),Ee.shouldValidate&&xe(K)},ne=(K,ie,Ee)=>{for(const Oe in ie){if(!ie.hasOwnProperty(Oe))return;const Ue=ie[Oe],Le=K+"."+Oe,ze=Xe(i,Le);(d.array.has(K)||Aa(Ue)||ze&&!ze._f)&&!ss(Ue)?ne(Le,Ue,Ee):ce(Le,Ue,Ee)}},G=(K,ie,Ee={})=>{const Oe=Xe(i,K),Ue=d.array.has(K),Le=Ya(ie);Qt(u,K,Le),Ue?(C.array.next({name:K,values:Ya(u)}),(y.isDirty||y.dirtyFields||E.isDirty||E.dirtyFields)&&Ee.shouldDirty&&C.state.next({name:K,dirtyFields:nl(o,u),isDirty:$(K,Le)})):Oe&&!Oe._f&&!tr(Le)?ne(K,Le,Ee):ce(K,Le,Ee),Mp(K,d)&&C.state.next({...r}),C.state.next({name:c.mount?K:void 0,values:Ya(u)})},oe=async K=>{c.mount=!0;const ie=K.target;let Ee=ie.name,Oe=!0;const Ue=Xe(i,Ee),Le=v=>{Oe=Number.isNaN(v)||ss(v)&&isNaN(v.getTime())||ki(v,Xe(u,Ee,v))},ze=Up(t.mode),L=Up(t.reValidateMode);if(Ue){let v,w;const Q=ie.type?Rp(Ue._f):O1(K),X=K.type===Tp.BLUR||K.type===Tp.FOCUS_OUT,ue=!q1(Ue._f)&&!t.resolver&&!Xe(r.errors,Ee)&&!Ue._f.deps||X1(X,Xe(r.touchedFields,Ee),r.isSubmitted,L,ze),we=Mp(Ee,d,X);Qt(u,Ee,Q),X?(Ue._f.onBlur&&Ue._f.onBlur(K),m&&m(0)):Ue._f.onChange&&Ue._f.onChange(K);const Ne=H(Ee,Q,X),it=!dr(Ne)||we;if(!X&&C.state.next({name:Ee,type:K.type,values:Ya(u)}),ue)return(y.isValid||E.isValid)&&(t.mode==="onBlur"?X&&N():X||N()),it&&C.state.next({name:Ee,...we?{}:Ne});if(!X&&we&&C.state.next({...r}),t.resolver){const{errors:lt}=await ee([Ee]);if(Le(Q),Oe){const vt=_p(r.errors,i,Ee),dt=_p(lt,i,vt.name||Ee);v=dt.error,Ee=dt.name,w=dr(lt)}}else B([Ee],!0),v=(await Qp(Ue,d.disabled,u,x,t.shouldUseNativeValidation))[Ee],B([Ee]),Le(Q),Oe&&(v?w=!1:(y.isValid||E.isValid)&&(w=await J(i,!0)));Oe&&(Ue._f.deps&&xe(Ue._f.deps),V(Ee,w,v,Ne))}},Ae=(K,ie)=>{if(Xe(r.errors,ie)&&K.focus)return K.focus(),1},xe=async(K,ie={})=>{let Ee,Oe;const Ue=hl(K);if(t.resolver){const Le=await q(ma(K)?K:Ue);Ee=dr(Le),Oe=K?!Ue.some(ze=>Xe(Le,ze)):Ee}else K?(Oe=(await Promise.all(Ue.map(async Le=>{const ze=Xe(i,Le);return await J(ze&&ze._f?{[Le]:ze}:ze)}))).every(Boolean),!(!Oe&&!r.isValid)&&N()):Oe=Ee=await J(i);return C.state.next({...!hn(K)||(y.isValid||E.isValid)&&Ee!==r.isValid?{}:{name:K},...t.resolver||!K?{isValid:Ee}:{},errors:r.errors}),ie.shouldFocus&&!Oe&&gl(i,Ae,K?Ue:d.mount),Oe},P=K=>{const ie={...c.mount?u:o};return ma(K)?ie:hn(K)?Xe(ie,K):K.map(Ee=>Xe(ie,Ee))},te=(K,ie)=>({invalid:!!Xe((ie||r).errors,K),isDirty:!!Xe((ie||r).dirtyFields,K),error:Xe((ie||r).errors,K),isValidating:!!Xe(r.validatingFields,K),isTouched:!!Xe((ie||r).touchedFields,K)}),pe=K=>{K&&hl(K).forEach(ie=>va(r.errors,ie)),C.state.next({errors:K?r.errors:{}})},Ce=(K,ie,Ee)=>{const Oe=(Xe(i,K,{_f:{}})._f||{}).ref,Ue=Xe(r.errors,K)||{},{ref:Le,message:ze,type:L,...v}=Ue;Qt(r.errors,K,{...v,...ie,ref:Oe}),C.state.next({name:K,errors:r.errors,isValid:!1}),Ee&&Ee.shouldFocus&&Oe&&Oe.focus&&Oe.focus()},Me=(K,ie)=>Wr(K)?C.state.subscribe({next:Ee=>K(ge(void 0,ie),Ee)}):ge(K,ie,!0),Ge=K=>C.state.subscribe({next:ie=>{W1(K.name,ie.name,K.exact)&&Y1(ie,K.formState||y,je,K.reRenderRoot)&&K.callback({values:{...u},...r,...ie})}}).unsubscribe,Qe=K=>(c.mount=!0,E={...E,...K.formState},Ge({...K,formState:E})),ot=(K,ie={})=>{for(const Ee of K?hl(K):d.mount)d.mount.delete(Ee),d.array.delete(Ee),ie.keepValue||(va(i,Ee),va(u,Ee)),!ie.keepError&&va(r.errors,Ee),!ie.keepDirty&&va(r.dirtyFields,Ee),!ie.keepTouched&&va(r.touchedFields,Ee),!ie.keepIsValidating&&va(r.validatingFields,Ee),!t.shouldUnregister&&!ie.keepDefaultValue&&va(o,Ee);C.state.next({values:Ya(u)}),C.state.next({...r,...ie.keepDirty?{isDirty:$()}:{}}),!ie.keepIsValid&&N()},Je=({disabled:K,name:ie})=>{(An(K)&&c.mount||K||d.disabled.has(ie))&&(K?d.disabled.add(ie):d.disabled.delete(ie))},Ze=(K,ie={})=>{let Ee=Xe(i,K);const Oe=An(ie.disabled)||An(t.disabled);return Qt(i,K,{...Ee||{},_f:{...Ee&&Ee._f?Ee._f:{ref:{name:K}},name:K,mount:!0,...ie}}),d.mount.add(K),Ee?Je({disabled:An(ie.disabled)?ie.disabled:t.disabled,name:K}):z(K,!0,ie.value),{...Oe?{disabled:ie.disabled||t.disabled}:{},...t.progressive?{required:!!ie.required,min:il(ie.min),max:il(ie.max),minLength:il(ie.minLength),maxLength:il(ie.maxLength),pattern:il(ie.pattern)}:{},name:K,onChange:oe,onBlur:oe,ref:Ue=>{if(Ue){Ze(K,ie),Ee=Xe(i,K);const Le=ma(Ue.value)&&Ue.querySelectorAll&&Ue.querySelectorAll("input,select,textarea")[0]||Ue,ze=H1(Le),L=Ee._f.refs||[];if(ze?L.find(v=>v===Le):Le===Ee._f.ref)return;Qt(i,K,{_f:{...Ee._f,...ze?{refs:[...L.filter(ff),Le,...Array.isArray(Xe(o,K))?[{}]:[]],ref:{type:Le.type,name:K}}:{ref:Le}}}),z(K,!1,void 0,Le)}else Ee=Xe(i,K,{}),Ee._f&&(Ee._f.mount=!1),(t.shouldUnregister||ie.shouldUnregister)&&!(_1(d.array,K)&&c.action)&&d.unMount.add(K)}}},yt=()=>t.shouldFocusError&&gl(i,Ae,d.mount),ta=K=>{An(K)&&(C.state.next({disabled:K}),gl(i,(ie,Ee)=>{const Oe=Xe(i,Ee);Oe&&(ie.disabled=Oe._f.disabled||K,Array.isArray(Oe._f.refs)&&Oe._f.refs.forEach(Ue=>{Ue.disabled=Oe._f.disabled||K}))},0,!1))},Nt=(K,ie)=>async Ee=>{let Oe;Ee&&(Ee.preventDefault&&Ee.preventDefault(),Ee.persist&&Ee.persist());let Ue=Ya(u);if(C.state.next({isSubmitting:!0}),t.resolver){const{errors:Le,values:ze}=await ee();r.errors=Le,Ue=ze}else await J(i);if(d.disabled.size)for(const Le of d.disabled)Qt(Ue,Le,void 0);if(va(r.errors,"root"),dr(r.errors)){C.state.next({errors:{}});try{await K(Ue,Ee)}catch(Le){Oe=Le}}else ie&&await ie({...r.errors},Ee),yt(),setTimeout(yt);if(C.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:dr(r.errors)&&!Oe,submitCount:r.submitCount+1,errors:r.errors}),Oe)throw Oe},At=(K,ie={})=>{Xe(i,K)&&(ma(ie.defaultValue)?G(K,Ya(Xe(o,K))):(G(K,ie.defaultValue),Qt(o,K,Ya(ie.defaultValue))),ie.keepTouched||va(r.touchedFields,K),ie.keepDirty||(va(r.dirtyFields,K),r.isDirty=ie.defaultValue?$(K,Ya(Xe(o,K))):$()),ie.keepError||(va(r.errors,K),y.isValid&&N()),C.state.next({...r}))},Et=(K,ie={})=>{const Ee=K?Ya(K):o,Oe=Ya(Ee),Ue=dr(K),Le=Ue?o:Oe;if(ie.keepDefaultValues||(o=Ee),!ie.keepValues){if(ie.keepDirtyValues){const ze=new Set([...d.mount,...Object.keys(nl(o,u))]);for(const L of Array.from(ze))Xe(r.dirtyFields,L)?Qt(Le,L,Xe(u,L)):G(L,Xe(Le,L))}else{if(eh&&ma(K))for(const ze of d.mount){const L=Xe(i,ze);if(L&&L._f){const v=Array.isArray(L._f.refs)?L._f.refs[0]:L._f.ref;if(uc(v)){const w=v.closest("form");if(w){w.reset();break}}}}for(const ze of d.mount)G(ze,Xe(Le,ze))}u=Ya(Le),C.array.next({values:{...Le}}),C.state.next({values:{...Le}})}d={mount:ie.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!y.isValid||!!ie.keepIsValid||!!ie.keepDirtyValues,c.watch=!!t.shouldUnregister,C.state.next({submitCount:ie.keepSubmitCount?r.submitCount:0,isDirty:Ue?!1:ie.keepDirty?r.isDirty:!!(ie.keepDefaultValues&&!ki(K,o)),isSubmitted:ie.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:Ue?{}:ie.keepDirtyValues?ie.keepDefaultValues&&u?nl(o,u):r.dirtyFields:ie.keepDefaultValues&&K?nl(o,K):ie.keepDirty?r.dirtyFields:{},touchedFields:ie.keepTouched?r.touchedFields:{},errors:ie.keepErrors?r.errors:{},isSubmitSuccessful:ie.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ht=(K,ie)=>Et(Wr(K)?K(u):K,ie),Se=(K,ie={})=>{const Ee=Xe(i,K),Oe=Ee&&Ee._f;if(Oe){const Ue=Oe.refs?Oe.refs[0]:Oe.ref;Ue.focus&&(Ue.focus(),ie.shouldSelect&&Wr(Ue.select)&&Ue.select())}},je=K=>{r={...r,...K}},ft={control:{register:Ze,unregister:ot,getFieldState:te,handleSubmit:Nt,setError:Ce,_subscribe:Ge,_runSchema:ee,_focusError:yt,_getWatch:ge,_getDirty:$,_setValid:N,_setFieldArray:R,_setDisabledField:Je,_setErrors:O,_getFieldArray:se,_reset:Et,_resetDefaultValues:()=>Wr(t.defaultValues)&&t.defaultValues().then(K=>{Ht(K,t.resetOptions),C.state.next({isLoading:!1})}),_removeUnmounted:Z,_disableForm:ta,_subjects:C,_proxyFormState:y,get _fields(){return i},get _formValues(){return u},get _state(){return c},set _state(K){c=K},get _defaultValues(){return o},get _names(){return d},set _names(K){d=K},get _formState(){return r},get _options(){return t},set _options(K){t={...t,...K}}},subscribe:Qe,trigger:xe,register:Ze,handleSubmit:Nt,watch:Me,setValue:G,getValues:P,reset:Ht,resetField:At,clearErrors:pe,unregister:ot,setError:Ce,setFocus:Se,getFieldState:te};return{...ft,formControl:ft}}function tS(n={}){const t=Cr.useRef(void 0),r=Cr.useRef(void 0),[i,o]=Cr.useState({isDirty:!1,isValidating:!1,isLoading:Wr(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:Wr(n.defaultValues)?void 0:n.defaultValues});t.current||(t.current={...n.formControl?n.formControl:eS(n),formState:i},n.formControl&&n.defaultValues&&!Wr(n.defaultValues)&&n.formControl.reset(n.defaultValues,n.resetOptions));const u=t.current.control;return u._options=n,F1(()=>{const c=u._subscribe({formState:u._proxyFormState,callback:()=>o({...u._formState}),reRenderRoot:!0});return o(d=>({...d,isReady:!0})),u._formState.isReady=!0,c},[u]),Cr.useEffect(()=>u._disableForm(n.disabled),[u,n.disabled]),Cr.useEffect(()=>{n.mode&&(u._options.mode=n.mode),n.reValidateMode&&(u._options.reValidateMode=n.reValidateMode)},[u,n.mode,n.reValidateMode]),Cr.useEffect(()=>{n.errors&&(u._setErrors(n.errors),u._focusError())},[u,n.errors]),Cr.useEffect(()=>{n.shouldUnregister&&u._subjects.state.next({values:u._getWatch()})},[u,n.shouldUnregister]),Cr.useEffect(()=>{if(u._proxyFormState.isDirty){const c=u._getDirty();c!==i.isDirty&&u._subjects.state.next({isDirty:c})}},[u,i.isDirty]),Cr.useEffect(()=>{n.values&&!ki(n.values,r.current)?(u._reset(n.values,u._options.resetOptions),r.current=n.values,o(c=>({...c}))):u._resetDefaultValues()},[u,n.values]),Cr.useEffect(()=>{u._state.mount||(u._setValid(),u._state.mount=!0),u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),t.current.formState=Q1(i,u),t.current}const Fp=(n,t,r)=>{if(n&&"reportValidity"in n){const i=Xe(r,t);n.setCustomValidity(i&&i.message||""),n.reportValidity()}},NE=(n,t)=>{for(const r in t.fields){const i=t.fields[r];i&&i.ref&&"reportValidity"in i.ref?Fp(i.ref,r,n):i&&i.refs&&i.refs.forEach(o=>Fp(o,r,n))}},aS=(n,t)=>{t.shouldUseNativeValidation&&NE(n,t);const r={};for(const i in n){const o=Xe(t.fields,i),u=Object.assign(n[i]||{},{ref:o&&o.ref});if(rS(t.names||Object.keys(n),i)){const c=Object.assign({},Xe(r,i));Qt(c,"root",u),Qt(r,i,c)}else Qt(r,i,u)}return r},rS=(n,t)=>{const r=Pp(t);return n.some(i=>Pp(i).match(`^${r}\\.\\d+`))};function Pp(n){return n.replace(/\]|\[/g,"")}function nS(n,t,r){return r===void 0&&(r={}),function(i,o,u){try{return Promise.resolve(function(c,d){try{var m=(t!=null&&t.context,Promise.resolve(n[r.mode==="sync"?"validateSync":"validate"](i,Object.assign({abortEarly:!1},t,{context:o}))).then(function(h){return u.shouldUseNativeValidation&&NE({},u),{values:r.raw?Object.assign({},i):h,errors:{}}}))}catch(h){return d(h)}return m&&m.then?m.then(void 0,d):m}(0,function(c){if(!c.inner)throw c;return{values:{},errors:aS((d=c,m=!u.shouldUseNativeValidation&&u.criteriaMode==="all",(d.inner||[]).reduce(function(h,y){if(h[y.path]||(h[y.path]={message:y.message,type:y.type}),m){var E=h[y.path].types,C=E&&E[y.type];h[y.path]=EE(y.path,m,h,y.type,C?[].concat(C,y.message):y.message)}return h},{})),u)};var d,m}))}catch(c){return Promise.reject(c)}}}const iS=({attachments:n,onAttachmentsChange:t})=>{const{t:r}=gt(),[i,o]=D.useState(""),u=async m=>{const h=m.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),S={Id:crypto.randomUUID(),Filename:E.name,Blob:x,CredentialId:"",CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString(),IsDeleted:!1};y.push(S)}t(y),o("Files uploaded successfully."),setTimeout(()=>o(""),3e3)}catch(y){console.error("Error uploading files:",y),o("Error uploading files."),setTimeout(()=>o(""),3e3)}m.target.value=""}},c=m=>{try{const h=[...n],y=h.findIndex(E=>E.Id===m.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(m=>!m.IsDeleted);return A.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[A.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:r("common.attachments")}),A.jsxs("div",{className:"space-y-4",children:[A.jsxs("div",{children:[A.jsx("input",{type:"file",multiple:!0,onChange:u,className:"block w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400"}),i&&A.jsx("p",{className:"mt-2 text-sm text-gray-500 dark:text-gray-400",children:i})]}),d.length>0&&A.jsxs("div",{children:[A.jsx("h4",{className:"mb-2 text-md font-medium text-gray-900 dark:text-white",children:"Current attachments:"}),A.jsx("div",{className:"space-y-2",children:d.map(m=>A.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:[A.jsxs("div",{className:"flex flex-col",children:[A.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:m.Filename}),A.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(m.CreatedAt).toLocaleDateString()})]}),A.jsx("button",{type:"button",onClick:()=>c(m),className:"text-red-500 hover:text-red-700 focus:outline-none","aria-label":`Delete ${m.Filename}`,children:A.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})})})]},m.Id))})]})]})]})},ns=["spamok.com","solarflarecorp.com","spamok.nl","3060.nl","landmail.nl","asdasd.nl","spamok.de","spamok.com.ua","spamok.es","spamok.fr"],Hp=({id:n,label:t,value:r,onChange:i,error:o,required:u=!1})=>{const{t:c}=gt(),d=sa(),[m,h]=D.useState(!1),[y,E]=D.useState(""),[C,x]=D.useState(""),[S,N]=D.useState(!1),[B,R]=D.useState([]),M=D.useRef(null);D.useEffect(()=>{(async()=>{const q=await d.getVaultMetadata();q!=null&&q.privateEmailDomains&&R(q.privateEmailDomains)})()},[d]);const O=D.useMemo(()=>B.length>0&&!(B.length===1&&(B[0]==="DISABLED.TLD"||B[0]==="")),[B]);D.useEffect(()=>{if(!r){O&&B[0]?x(B[0]):ns[0]&&x(ns[0]);return}if(r.includes("@")){const[ee,q]=r.split("@");E(ee),x(q);const J=ns.includes(q)||B.includes(q);h(!J)}else E(r),!C&&!r.includes("@")&&(O&&B[0]?x(B[0]):ns[0]&&x(ns[0]))},[r,B,O]);const z=D.useCallback(ee=>{const q=ee.target.value;if(m){i(q);return}if(q.includes("@")){h(!0),i(q);return}E(q),!q||q.trim()===""?i(""):C&&i(`${q}@${C}`)},[m,C,i]),H=D.useCallback(ee=>{x(ee);const q=y.includes("@")?y.split("@")[0]:y;!q||q.trim()===""?i(""):i(`${q}@${ee}`),h(!1),N(!1)},[y,i]),V=D.useCallback(()=>{const ee=!m;if(h(ee),ee){if(r&&r.includes("@")){const[q]=r.split("@");i(q),E(q)}}else{const q=O&&B[0]?B[0]:ns[0];x(q),y&&y.trim()?i(`${y}@${q}`):r&&!r.includes("@")&&i(`${r}@${q}`)}},[m,r,y,O,B,i]);return D.useEffect(()=>{const ee=q=>{M.current&&!M.current.contains(q.target)&&N(!1)};if(S)return document.addEventListener("mousedown",ee),()=>{document.removeEventListener("mousedown",ee)}},[S]),A.jsxs("div",{className:"space-y-2",children:[A.jsxs("label",{htmlFor:n,className:"block font-medium text-gray-700 dark:text-gray-300",children:[t,u&&A.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),A.jsxs("div",{className:"relative w-full",children:[A.jsxs("div",{className:"flex w-full",children:[A.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"} ${m?"rounded-md":"rounded-l-md"} focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white`,value:m?r:y,onChange:z,placeholder:c(m?"credentials.enterFullEmail":"credentials.enterEmailPrefix")}),!m&&A.jsxs("button",{type:"button",onClick:()=>N(!S),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:[A.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"@"}),A.jsx("span",{className:"truncate ml-0.5",children:C})]})]}),S&&!m&&A.jsx("div",{ref:M,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:A.jsxs("div",{className:"p-4",children:[O&&A.jsxs("div",{className:"mb-4",children:[A.jsxs("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:[c("credentials.privateEmailTitle")," ",A.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",c("credentials.privateEmailAliasVaultServer"),")"]})]}),A.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-3",children:c("credentials.privateEmailDescription")}),A.jsx("div",{className:"flex flex-wrap gap-2",children:B.map(ee=>A.jsx("button",{type:"button",onClick:()=>H(ee),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${C===ee?"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:ee},ee))})]}),A.jsxs("div",{className:O?"border-t border-gray-200 dark:border-gray-600 pt-4":"",children:[A.jsx("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:c("credentials.publicEmailTitle")}),A.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:c("credentials.publicEmailDescription")}),A.jsx("div",{className:"flex flex-wrap gap-2",children:ns.map(ee=>A.jsx("button",{type:"button",onClick:()=>H(ee),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${C===ee?"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:ee},ee))})]})]})})]}),A.jsx("div",{children:A.jsx("button",{type:"button",onClick:V,className:"text-sm text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300",children:c(m?"credentials.useDomainChooser":"credentials.enterCustomDomain")})}),o&&A.jsx("p",{className:"text-sm text-red-500 mt-1",children:o})]})},sS=({name:n})=>{switch(n){case"visibility":return A.jsxs(A.Fragment,{children:[A.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),A.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return A.jsxs(A.Fragment,{children:[A.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"}),A.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"refresh":return A.jsxs(A.Fragment,{children:[A.jsx("path",{d:"M23 4v6h-6"}),A.jsx("path",{d:"M1 20v-6h6"}),A.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 A.jsxs(A.Fragment,{children:[A.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"}),A.jsx("path",{d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]});default:return null}},cn=D.forwardRef(({id:n,label:t,value:r,onChange:i,type:o="text",placeholder:u,required:c=!1,multiline:d=!1,rows:m=1,error:h,buttons:y=[],showPassword:E,onShowPasswordChange:C},x)=>{const{t:S}=gt(),[N,B]=Cr.useState(!1),R=E!==void 0?E:N,M=H=>{E!==void 0?C==null||C(H):B(H)},O=`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`,z=o==="password"?[...y,{icon:R?"visibility-off":"visibility",onClick:()=>M(!R),title:S(R?"common.hidePassword":"common.showPassword")}]:y;return A.jsxs("div",{children:[A.jsxs("label",{htmlFor:n,className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:[t,c&&A.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),A.jsxs("div",{className:"relative",children:[d?A.jsx("textarea",{id:n,value:r,onChange:H=>i(H.target.value),rows:m,placeholder:u,className:O}):A.jsx("input",{ref:x,type:o==="password"&&!R?"password":"text",id:n,value:r,onChange:H=>i(H.target.value),placeholder:u,className:O}),z.length>0&&A.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:z.map((H,V)=>A.jsx("button",{type:"button",onClick:H.onClick,title:H.title,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",children:A.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:A.jsx(sS,{name:H.icon})})},V))})]}),h&&A.jsx("p",{className:"mt-1 text-sm text-red-500",children:h})]})});cn.displayName="FormInput";var oS=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)}},nh=n=>new oS(n);const lS=({isOpen:n,onClose:t,onSave:r,onSettingsChange:i,initialSettings:o})=>{const{t:u}=gt(),[c,d]=D.useState(o),[m,h]=D.useState(""),y=D.useCallback(N=>{try{const R=nh(N).generateRandomPassword();h(R)}catch(B){console.error("Error generating preview password:",B),h("")}},[]);D.useEffect(()=>{n&&(d({...o}),y({...o}))},[n,o,y]);const E=D.useCallback((N,B)=>{const R={...c,[N]:B};d(R),y(R),i==null||i(R)},[c,y,i]),C=D.useCallback(()=>{y(c)},[c,y]),x=D.useCallback(()=>{r(m),t()},[m,r,t]),S=D.useCallback(()=>{t()},[t]);return n?A.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[A.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-60 transition-opacity",onClick:S}),A.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:A.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:[A.jsx("button",{type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-500 focus:outline-none",onClick:S,children:A.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),A.jsx("div",{className:"sm:flex sm:items-start",children:A.jsxs("div",{className:"w-full mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[A.jsx("h3",{className:"text-lg font-medium leading-6 text-gray-900 dark:text-white mb-4",children:u("credentials.changePasswordComplexity")}),A.jsxs("div",{className:"space-y-4",children:[A.jsx("div",{className:"mt-4",children:A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("input",{type:"text",value:m,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"}),A.jsx("button",{type:"button",onClick:C,className:"px-3 py-2 text-sm text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:u("credentials.generateNewPreview"),children:A.jsx("svg",{className:"w-4 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})}),A.jsxs("div",{className:"space-y-3",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[A.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:u("credentials.includeLowercase"),children:A.jsx("span",{className:"font-mono text-base",children:"a-z"})}),A.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:u("credentials.includeUppercase"),children:A.jsx("span",{className:"font-mono text-base",children:"A-Z"})}),A.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:u("credentials.includeNumbers"),children:A.jsx("span",{className:"font-mono text-base",children:"0-9"})}),A.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:u("credentials.includeSpecialChars"),children:A.jsx("span",{className:"font-mono text-base",children:"!@#"})})]}),A.jsxs("div",{className:"flex items-center",children:[A.jsx("input",{id:"use-non-ambiguous",type:"checkbox",checked:c.UseNonAmbiguousChars,onChange:N=>E("UseNonAmbiguousChars",N.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"}),A.jsx("label",{htmlFor:"use-non-ambiguous",className:"ml-2 text-sm text-gray-700 dark:text-gray-300",children:u("credentials.avoidAmbiguousChars")})]})]})]}),A.jsx("div",{className:"mt-5 sm:mt-6 sm:flex sm:flex-row-reverse",children:A.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:[A.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 13l-3 3m0 0l-3-3m3 3V8m0 13a9 9 0 110-18 9 9 0 010 18z"})}),u("common.use")]})})]})})]})})]}):null},zp=({id:n,label:t,value:r,onChange:i,placeholder:o,error:u,showPassword:c,onShowPasswordChange:d})=>{const{t:m}=gt(),h=sa(),[y,E]=D.useState(!1),[C,x]=D.useState(!1),[S,N]=D.useState(null),[B,R]=D.useState(!1),M=c!==void 0?c:y,O=D.useCallback($=>{c!==void 0?d==null||d($):E($)},[c,d]);D.useEffect(()=>{(async()=>{try{if(h.sqliteClient){const ge=h.sqliteClient.getPasswordSettings();N(ge),R(!0)}}catch(ge){console.error("Error loading password settings:",ge)}})()},[h.sqliteClient]);const z=D.useCallback($=>{try{const se=nh($).generateRandomPassword();i(se),O(!0)}catch(ge){console.error("Error generating password:",ge)}},[i,O]),H=D.useCallback($=>{if(!S)return;const ge=parseInt($.target.value,10),se={...S,Length:ge};N(se),z(se)},[S,z]),V=D.useCallback(()=>{S&&z(S)},[z,S]),ee=D.useCallback($=>{i($),O(!0)},[i,O]),q=D.useCallback($=>{N($)},[]),J=D.useCallback(()=>{O(!M)},[M,O]),Z=D.useCallback(()=>{x(!0)},[]);return!S||!B?A.jsxs("div",{className:"space-y-2",children:[A.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:t}),A.jsx("div",{className:"animate-pulse bg-gray-200 dark:bg-gray-700 h-10 rounded-lg"})]}):A.jsxs("div",{className:"space-y-2",children:[A.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:t}),A.jsxs("div",{className:"flex",children:[A.jsx("div",{className:"relative flex-grow",children:A.jsx("input",{type:M?"text":"password",id:n,value:r,onChange:$=>i($.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"})}),A.jsxs("div",{className:"flex",children:[A.jsx("button",{type:"button",onClick:J,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:m(M?"common.hidePassword":"common.showPassword"),children:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:M?A.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"}):A.jsxs(A.Fragment,{children:[A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),A.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"})]})})}),A.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:m("credentials.generateRandomPassword"),children:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})]}),A.jsxs("div",{className:"pt-2",children:[A.jsxs("div",{className:"flex items-center justify-between mb-2",children:[A.jsx("label",{htmlFor:`${n}-length`,className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:m("credentials.passwordLength")}),A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 font-mono",children:S.Length}),A.jsx("button",{type:"button",onClick:Z,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300",title:m("credentials.changePasswordComplexity"),children:A.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[A.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"}),A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})]}),A.jsx("input",{type:"range",id:`${n}-length`,min:"8",max:"64",value:S.Length,onChange:H,className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"})]}),u&&A.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:u}),A.jsx(lS,{isOpen:C,onClose:()=>x(!1),onSave:ee,onSettingsChange:q,initialSettings:S})]})},Vp=({id:n,label:t,value:r,onChange:i,placeholder:o,error:u,onRegenerate:c})=>{const{t:d}=gt(),m=D.useCallback(y=>{i(y.target.value)},[i]),h=D.useCallback(()=>{c()},[c]);return A.jsxs("div",{className:"space-y-2",children:[A.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:t}),A.jsxs("div",{className:"flex",children:[A.jsx("div",{className:"relative flex-grow",children:A.jsx("input",{type:"text",id:n,value:r,onChange:m,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"})}),A.jsx("div",{className:"flex",children:A.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:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})})]}),u&&A.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:u})]})};var SE=(n=>(n.Male="Male",n.Female="Female",n.Other="Other",n))(SE||{}),ih=class Pn{constructor(){this.symbols=[".","-"]}generateUsername(t){let r=this.generateEmailPrefix(t);return r=r.replace(/[^a-zA-Z0-9]/g,""),r.length<Pn.MIN_LENGTH?r+=this.generateRandomString(Pn.MIN_LENGTH-r.length):r.length>Pn.MAX_LENGTH&&(r=r.substring(0,Pn.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<Pn.MIN_LENGTH?i+=this.generateRandomString(Pn.MIN_LENGTH-i.length):i.length>Pn.MAX_LENGTH&&(i=i.substring(0,Pn.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}};ih.MIN_LENGTH=6;ih.MAX_LENGTH=20;var TE=ih,kE=class{constructor(){this.firstNamesMale=[],this.firstNamesFemale=[],this.lastNames=[],this.random=Math.random,this.firstNamesMale=this.getFirstNamesMaleJson(),this.firstNamesFemale=this.getFirstNamesFemaleJson(),this.lastNames=this.getLastNamesJson()}generateRandomDateOfBirth(){const n=new Date,t=21,r=65,i=new Date(n.getFullYear()-r,n.getMonth(),n.getDate()),o=new Date(n.getFullYear()-t,n.getMonth(),n.getDate()),u=i.getTime()+this.random()*(o.getTime()-i.getTime());return new Date(u)}generateRandomIdentity(n){const t={firstName:"",lastName:"",gender:"Male",birthDate:new Date,emailPrefix:"",nickName:""};let r;if(n==="random"||n===void 0?r=this.random()<.5?"Male":"Female":n==="male"?r="Male":n==="female"?r="Female":r="Male",t.gender=r,r==="Male")t.firstName=this.firstNamesMale[Math.floor(this.random()*this.firstNamesMale.length)];else if(r==="Female")t.firstName=this.firstNamesFemale[Math.floor(this.random()*this.firstNamesFemale.length)];else{const o=this.random()<.5;t.firstName=o?this.firstNamesMale[Math.floor(this.random()*this.firstNamesMale.length)]:this.firstNamesFemale[Math.floor(this.random()*this.firstNamesFemale.length)]}t.lastName=this.lastNames[Math.floor(this.random()*this.lastNames.length)],t.birthDate=this.generateRandomDateOfBirth();const i=new TE;return t.emailPrefix=i.generateEmailPrefix(t),t.nickName=i.generateUsername(t),t}},uS=["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"],cS=["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"],dS=["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"],AS=class extends kE{getFirstNamesMaleJson(){return uS}getFirstNamesFemaleJson(){return cS}getLastNamesJson(){return dS}},fS=["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"],hS=["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"],gS=["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"],mS=class extends kE{getFirstNamesMaleJson(){return fS}getFirstNamesFemaleJson(){return hS}getLastNamesJson(){return gS}},ml=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,u,c,d]=r;return`${u}-${c}-${d} 00:00:00`}const i=new Date(t);if(!isNaN(i.getTime())){const o=i.getFullYear().toString().padStart(4,"0"),u=(i.getMonth()+1).toString().padStart(2,"0"),c=i.getDate().toString().padStart(2,"0");return`${o}-${u}-${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}},pS=n=>{switch(n){case"en":return new AS;case"nl":return new mS}throw new Error(`Unsupported language: ${n}`)},yS=()=>new TE;const Mr={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"]},hf={male:["male","man","m","gender1","mr","mr."],female:["female","woman","f","gender2","mrs","mrs.","ms","ms."],other:["other","diverse","custom","prefer not","unknown","gender3"]},ES=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"]),_r={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"]},gf={male:["man","mannelijk","heer"],female:["vrouw","vrouwelijk","mevrouw"],other:["anders","iets","overig","onbekend"]},bS=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"]),Ra={username:[...new Set([...Mr.username,..._r.username])],fullName:[...new Set([...Mr.fullName,..._r.fullName])],firstName:[...new Set([...Mr.firstName,..._r.firstName])],lastName:[...new Set([...Mr.lastName,..._r.lastName])],email:[...new Set([..._r.email,...Mr.email])],emailConfirm:[...new Set([...Mr.emailConfirm,..._r.emailConfirm])],password:[...new Set([...Mr.password,..._r.password])],birthdate:[...new Set([...Mr.birthdate,..._r.birthdate])],gender:[...new Set([...Mr.gender,..._r.gender])],birthDateDay:[...new Set([...Mr.birthDateDay,..._r.birthDateDay])],birthDateMonth:[...new Set([...Mr.birthDateMonth,..._r.birthDateMonth])],birthDateYear:[...new Set([...Mr.birthDateYear,..._r.birthDateYear])]},sl={male:[...new Set([...hf.male,...gf.male])],female:[...new Set([...hf.female,...gf.female])],other:[...new Set([...hf.other,...gf.other])]},Gp=new Set([...ES,...bS]);class Kp{constructor(t,r){Xt(this,"document");Xt(this,"clickedElement");Xt(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,u=50,c=S=>{const N=S.length>=3&&S.length<=u,B=S.split(/[\s|\-—/\\]+/).length<=o;return N&&B},d=S=>{const N=S.toLowerCase().split(" ").map(M=>M.toLowerCase());let B=0;for(;B<N.length&&Gp.has(N[B].toLowerCase());)B++;let R=N.length-1;for(;R>B&&Gp.has(N[R].toLowerCase());)R--;return N.slice(B,R+1)},m=(S,N)=>S.split(/[\s|]+/).filter(B=>N.includes(B.toLowerCase())).join(" "),h=r.hostname.replace(/^www\./,""),E=/[|\-—/\\:]/.exec(i);if(E){const S=E.index,N=i.substring(0,S).trim(),B=i.substring(S+1).trim(),R=d(N),M=d(B),O=m(N,R),z=m(B,M),H=c(O),V=c(z);if(H&&V)return[O,z,h];if(H)return[O,h];if(V)return[z,h]}const C=d(i),x=m(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 u=r;for(;u;)this.visibilityCache.set(u,!0),u=u.parentElement;return!0}if(o.display==="none"){let u=r;for(;u;)this.visibilityCache.set(u,!1),u=u.parentElement;return!1}if(o.visibility==="hidden"){let u=r;for(;u;)this.visibilityCache.set(u,!1),u=u.parentElement;return!1}if(parseFloat(o.opacity)===0){let u=r;for(;u;)this.visibilityCache.set(u,!1),u=u.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,S,N,B,R,M;const u=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(O=>{const z=O;return z.shadowRoot?z.shadowRoot.querySelector("input, textarea")!==null:!1}),h=[...u,...d].filter((O,z,H)=>H.indexOf(O)===z),y=[];for(const O of Array.from(h)){if(o.includes(O)||!this.isElementVisible(O))continue;let H=O.tagName.toLowerCase()==="select"?"select":((E=O.type)==null?void 0:E.toLowerCase())||((C=O.getAttribute("type"))==null?void 0:C.toLowerCase())||"";const V=O,ee=V.shadowRoot&&V.shadowRoot.querySelector("input, textarea");if(ee&&!H){const se=V.shadowRoot.querySelector("input, textarea");se&&(H=((x=se.type)==null?void 0:x.toLowerCase())||"text")}if(!i.includes(H)&&!(ee&&i.includes("text")&&!H))continue;if(i.includes("email")&&H==="email"){y.push({input:O,score:-1});continue}const q=[O.id,O.getAttribute("name"),O.getAttribute("placeholder")].map(se=>(se==null?void 0:se.toLowerCase())??"");if(O.id||O.getAttribute("name")){const se=this.document.querySelector(`label[for="${O.id||O.getAttribute("name")}"]`);se&&q.push(((S=se.textContent)==null?void 0:S.toLowerCase())??"")}let J=O;for(let se=0;se<3&&J;se++){const ce=J.querySelectorAll('[slot="label"], [slot="helper-text"]');for(const ne of Array.from(ce)){const G=((N=ne.textContent)==null?void 0:N.toLowerCase())??"";G&&q.push(G)}if(J.shadowRoot){const ne=J.shadowRoot.querySelectorAll('slot[name="label"], slot[name="helper-text"]');for(const G of Array.from(ne)){const oe=G.assignedNodes();for(const Ae of oe)Ae.textContent&&q.push(Ae.textContent.toLowerCase())}}J=J.parentElement}const Z=O.parentElement;if(Z)for(const se of Array.from(Z.children))se!==O&&Array.from(se.classList).some(ce=>ce.toLowerCase().includes("label"))&&q.push(((B=se.textContent)==null?void 0:B.toLowerCase())??"");let $=O;for(let se=0;se<5&&$&&!($.children.length>15);se++){const ce=$.querySelector("label");if(ce){q.push(((R=ce.textContent)==null?void 0:R.toLowerCase())??"");break}const ne=$.closest("td");if(ne){const G=ne.closest("tr");if(G){for(const oe of Array.from(G.querySelectorAll("td")))if(oe!==ne){q.push(((M=oe.textContent)==null?void 0:M.toLowerCase())??"");break}}break}$=$.parentElement}let ge=r.length;for(let se=0;se<r.length;se++)if(q.some(ce=>ce.includes(r[se]))){ge=se;break}ge<r.length&&y.push({input:O,score:ge})}return y.sort((O,z)=>O.score-z.score).map(O=>O.input)}findInputField(t,r,i,o=[]){const u=this.findAllInputFields(t,r,i,o),c=this.filterOutNestedDuplicates(u,o);if(i.includes("email")){const d=c.find(m=>(m.type||"").toLowerCase()==="email");if(d)return d}return c.length>0?c[0]:null}findEmailField(t){const r=this.findAllInputFields(t,Ra.email,["text","email"]),o=this.filterOutNestedDuplicates(r)[0]??null,u=o?this.findAllInputFields(t,Ra.emailConfirm,["text","email"],[o]):[],d=this.filterOutNestedDuplicates(u)[0]??null;return{primary:o,confirm:d}}findBirthdateFields(t,r=[]){const i=this.findInputField(t,Ra.birthdate,["date","text"],r);let o="yyyy-mm-dd";if(t&&i){const m=i.closest("div");if(m){const y=[...Array.from(m.getElementsByTagName("label")),...Array.from(m.getElementsByTagName("span")),m].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 u=this.findInputField(t,Ra.birthDateDay,["text","number","select"],r),c=this.findInputField(t,Ra.birthDateMonth,["text","number","select"],r),d=this.findInputField(t,Ra.birthDateYear,["text","number","select"],r);return{single:null,format:"yyyy-mm-dd",day:u,month:c,year:d}}findGenderField(t,r=[]){const i=this.findInputField(t,Ra.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,m=!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 m&&(sl.male.some(x=>y.some(S=>S.includes(x)))||sl.female.some(x=>y.some(S=>S.includes(x))))?!1:d.some(x=>y.some(S=>S.includes(x)))})??null;return{type:"radio",field:null,radioButtons:{male:c(sl.male),female:c(sl.female),other:c(sl.other)}}}return{type:"text",field:this.findInputField(t,Ra.gender,["text"],r)}}filterOutNestedDuplicates(t,r=[]){if(t.length===0)return t;const i=[];for(const o of t){let u=!0;for(const c of r){if(o===c){u=!1;break}if(c.contains(o)){u=!1;break}if(o.contains(c)){u=!1;break}const d=o,m=c;if(m.shadowRoot&&m.shadowRoot.contains(o)){u=!1;break}if(d.shadowRoot&&d.shadowRoot.contains(c)){u=!1;break}const h=this.getActualInputElement(o),y=this.getActualInputElement(c);if(h===y){u=!1;break}}if(u){for(const c of t)if(o!==c){if(o.contains(c)){u=!1;break}const d=o;if(d.shadowRoot&&d.shadowRoot.contains(c)){u=!1;break}}if(u){const c=this.getActualInputElement(o);if(c!==o&&t.includes(c))continue;i.push(o)}}}return i}findPasswordField(t){const r=this.findAllInputFields(t,Ra.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,Ra.username,["text"],[]);if(i&&this.isElementVisible(i))return!0;const o=this.findInputField(t,Ra.firstName,["text"],[]);if(o&&this.isElementVisible(o))return!0;const u=this.findInputField(t,Ra.lastName,["text"],[]);return!!(u&&this.isElementVisible(u))}isAutofillTriggerableField(){const t=this.getFormWrapper();if(!this.clickedElement)return!1;const r=this.getActualInputElement(this.clickedElement),i=[this.clickedElement,r].filter((d,m,h)=>d&&h.indexOf(d)===m);if(this.findAllInputFields(t,Ra.username,["text"]).some(d=>i.includes(d)))return!0;const u=this.findPasswordField(t);return!!(u.primary&&i.includes(u.primary)||u.confirm&&i.includes(u.confirm)||this.findAllInputFields(t,Ra.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 u=this.findInputField(t,Ra.username,["text"],r);u&&r.push(u);const c=this.findInputField(t,Ra.fullName,["text"],r);c&&r.push(c);const d=this.findInputField(t,Ra.lastName,["text"],r);d&&r.push(d);const m=this.findInputField(t,Ra.firstName,["text"],r);m&&r.push(m);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:u,passwordField:o.primary,passwordConfirmField:o.confirm,fullNameField:c,firstNameField:m,lastNameField:d,birthdateField:h,genderField:y}}}class qp{static getServiceInfo(t,r){const i=Kp.getSuggestedServiceName(t,r),o=r.href;let u="";try{const c=new URL(o);(c.protocol==="http:"||c.protocol==="https:")&&(u=c.origin+c.pathname,u.endsWith("/")&&(u=u.slice(0,-1)))}catch(c){console.error("Error parsing current URL:",c)}return{suggestedNames:i,currentUrl:o,serviceUrl:u,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},u={title:r||i.hostname},c=Kp.getSuggestedServiceName(u,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 Yp=()=>{var Je,Ze,yt,ta,Nt,At,Et,Ht,Se,je,et,ft,K,ie,Ee,Oe,Ue,Le,ze,L,v;const{t:n}=gt(),{id:t}=Hf(),r=Ma(),i=sa(),o=t!==void 0&&t.length>0,u=D.useMemo(()=>oc().shape({Id:Za(),ServiceName:Za().required(n("credentials.validation.serviceNameRequired")),ServiceUrl:Za().nullable().optional(),Alias:oc().shape({FirstName:Za().nullable().optional(),LastName:Za().nullable().optional(),NickName:Za().nullable().optional(),BirthDate:Za().nullable().optional().test("is-valid-date-format",n("credentials.validation.invalidDateFormat"),w=>w?/^\d{4}-\d{2}-\d{2}$/.test(w):!0),Gender:Za().nullable().optional(),Email:Za().email(n("credentials.validation.invalidEmail")).nullable().optional()}),Username:Za().nullable().optional(),Password:Za().nullable().optional(),Notes:Za().nullable().optional()}),[n]),{executeVaultMutation:c,isLoading:d,syncStatus:m}=Zf(),[h,y]=D.useState("random"),{setHeaderButtons:E}=En(),{setIsInitialLoading:C}=fa(),[x,S]=D.useState(!0),[N,B]=D.useState(!o),[R,M]=D.useState(!1),[O,z]=D.useState([]),[H,V]=D.useState([]),[ee,q]=D.useState(!1),J=pn(),[Z,$]=D.useState({username:null,password:null,email:null}),ge=D.useRef(null),{handleSubmit:se,setValue:ce,watch:ne,formState:{errors:G}}=tS({resolver:nS(u),defaultValues:{Id:"",Username:"",Password:"",ServiceName:"",ServiceUrl:"https://",Notes:"",Alias:{FirstName:"",LastName:"",NickName:"",BirthDate:"",Gender:void 0,Email:""}}}),oe=D.useCallback(async()=>{if(x)return;const w=ne(),Q={credentialId:t||null,mode:h,formValues:{...w,Logo:null}};await Lt("PERSIST_FORM_VALUES",JSON.stringify(Q),"background")},[ne,t,h,x]);D.useEffect(()=>{x||oe()},[h,oe,x]),D.useEffect(()=>{const w=ne(()=>{oe()});return()=>w.unsubscribe()},[ne,oe]);const Ae=D.useCallback(async()=>{const w=await Lt("GET_PERSISTED_FORM_VALUES",null,"background");try{let Q=null;try{w&&(Q=JSON.parse(w))}catch(we){console.error("Error parsing persisted data:",we)}if(Q==null){S(!1);return}const ue=(Q==null?void 0:Q.credentialId)==t;Q&&ue?(y(Q.mode),Object.entries(Q.formValues).forEach(([we,Ne])=>{ce(we,Ne)})):console.error("Persisted values do not match current page")}catch(Q){console.error("Error loading persisted data:",Q)}S(!1)},[ce,t,y,S]),xe=D.useCallback(async()=>{await Lt("CLEAR_PERSISTED_FORM_VALUES",null,"background")},[]);D.useEffect(()=>()=>{xe()},[xe]),D.useEffect(()=>{if(i!=null&&i.sqliteClient){if(!t){const w=new URLSearchParams(window.location.search),Q=w.get("serviceName"),X=w.get("serviceUrl"),ue=w.get("currentUrl");(async()=>{try{if(Q||X||ue){if(Q&&ce("ServiceName",decodeURIComponent(Q)),X&&ce("ServiceUrl",decodeURIComponent(X)),ue&&(!Q||!X)){const it=decodeURIComponent(ue),lt=qp.getServiceInfoFromTab(it);!Q&&lt.suggestedNames.length>0&&ce("ServiceName",lt.suggestedNames[0]),!X&&lt.serviceUrl&&ce("ServiceUrl",lt.serviceUrl)}return}const[Ne]=await ao.tabs.query({active:!0,currentWindow:!0});if(Ne!=null&&Ne.url){const it=qp.getServiceInfoFromTab(Ne.url,Ne.title);it.suggestedNames.length>0&&ce("ServiceName",it.suggestedNames[0]),it.serviceUrl&&ce("ServiceUrl",it.serviceUrl)}}catch(Ne){console.error("Error detecting service information:",Ne)}})(),setTimeout(()=>{var Ne;(Ne=ge.current)==null||Ne.focus()},100),C(!1),ao.storage.local.get([JA]).then(Ne=>{Ne[JA]?(ao.storage.local.remove([JA]),S(!1)):Ae()});return}try{const w=i.sqliteClient.getCredentialById(t);if(w){w.Alias.BirthDate=ml.normalizeBirthDateForDisplay(w.Alias.BirthDate),Object.entries(w).forEach(([X,ue])=>{ce(X,ue)});const Q=i.sqliteClient.getAttachmentsForCredential(t);z(Q),V(Q.map(X=>X.Id)),y("manual"),C(!1),Ae()}else console.error("Credential not found"),r("/credentials")}catch(w){console.error("Error loading credential:",w),C(!1)}}},[i.sqliteClient,t,r,C,ce,Ae,xe]);const P=D.useCallback(async()=>{t&&c(async()=>{i.sqliteClient.deleteCredentialById(t)},{onSuccess:()=>{xe(),r("/credentials")}})},[t,c,i.sqliteClient,r,xe]),te=D.useCallback(async()=>{const w=i.sqliteClient.getDefaultIdentityLanguage(),Q=pS(w),X=i.sqliteClient.getPasswordSettings(),ue=nh(X);return{identityGenerator:Q,passwordGenerator:ue}},[i.sqliteClient]),pe=D.useCallback(async()=>{const{identityGenerator:w,passwordGenerator:Q}=await te(),X=i.sqliteClient.getDefaultIdentityGender(),ue=w.generateRandomIdentity(X),we=Q.generateRandomPassword(),Ne=await i.getVaultMetadata(),it=(Ne==null?void 0:Ne.privateEmailDomains)??[],lt=(Ne==null?void 0:Ne.publicEmailDomains)??[],vt=i.sqliteClient.getDefaultEmailDomain(it,lt),dt=vt?`${ue.emailPrefix}@${vt}`:ue.emailPrefix,bn=ne("Username")??"",Ha=ne("Password")??"",Qr=ne("Alias.Email")??"";(!Qr||Qr===Z.email)&&ce("Alias.Email",dt),ce("Alias.FirstName",ue.firstName),ce("Alias.LastName",ue.lastName),ce("Alias.NickName",ue.nickName),ce("Alias.Gender",ue.gender),ce("Alias.BirthDate",ml.normalizeBirthDateForDisplay(ue.birthDate.toISOString())),(!bn||bn===Z.username)&&ce("Username",ue.nickName),(!Ha||Ha===Z.password)&&ce("Password",we),$({username:ue.nickName,password:we,email:dt})},[ne,ce,te,i,Z,$]),Ce=D.useCallback(()=>{ce("Alias.FirstName",""),ce("Alias.LastName",""),ce("Alias.NickName",""),ce("Alias.Gender",""),ce("Alias.BirthDate","")},[ce]),Me=!!(ne("Alias.FirstName")||ne("Alias.LastName")||ne("Alias.NickName")||ne("Alias.Gender")||ne("Alias.BirthDate")),Ge=D.useCallback(()=>{Me?Ce():pe()},[pe,Ce,Me]),Qe=D.useCallback(async()=>{try{const w=yS();let Q=SE.Other;try{Q=ne("Alias.Gender")}catch{}const X={firstName:ne("Alias.FirstName")??"",lastName:ne("Alias.LastName")??"",nickName:ne("Alias.NickName")??"",gender:Q,birthDate:new Date(ne("Alias.BirthDate")??""),emailPrefix:ne("Alias.Email")??""},ue=w.generateUsername(X),we=ne("Username")??"";(!we||we===Z.username)&&(ce("Username",ue),$(Ne=>({...Ne,username:ue})))}catch(w){console.error("Error generating random username:",w)}},[ce,ne,Z,$]),ot=D.useCallback(async w=>{let Q=w.Alias.BirthDate;if(Q&&(Q=ml.normalizeBirthDateForDb(Q)),(w.ServiceUrl==="http://"||w.ServiceUrl==="https://")&&(w.ServiceUrl=""),!o&&h==="random"){await pe(),w.Username=ne("Username"),w.Password=ne("Password"),w.Alias.FirstName=ne("Alias.FirstName"),w.Alias.LastName=ne("Alias.LastName"),w.Alias.NickName=ne("Alias.NickName"),w.Alias.BirthDate=Q,w.Alias.Gender=ne("Alias.Gender"),w.Alias.Email=ne("Alias.Email");const X=ne("ServiceUrl");w.ServiceUrl=X==="http://"||X==="https://"?"":X}if(w.ServiceUrl){S(!0);try{const X=new Promise((Ne,it)=>setTimeout(()=>it(new Error("Favicon extraction timed out")),5e3)),ue=J.get("Favicon/Extract?url="+w.ServiceUrl),we=await Promise.race([ue,X]);if(we!=null&&we.image){const Ne=Uint8Array.from(ls.Buffer.from(we.image,"base64"));w.Logo=Ne}}catch{}}c(async()=>{if(S(!1),o)await i.sqliteClient.updateCredentialById(w,H,O),ee&&await i.sqliteClient.deletePasskeysByCredentialId(w.Id);else{const X=await i.sqliteClient.createCredential(w,O);w.Id=X.toString()}},{onSuccess:()=>{xe(),o?r(-1):r(`/credentials/${w.Id}`,{replace:!0})}})},[o,i.sqliteClient,c,r,h,ne,pe,J,xe,H,O,ee]);return D.useEffect(()=>{const w=A.jsxs("div",{className:"flex items-center gap-2",children:[o&&A.jsx(Ar,{onClick:()=>M(!0),title:n("credentials.deleteCredential"),iconType:Na.DELETE,variant:"danger"}),A.jsx(Ar,{onClick:se(ot),title:n("credentials.saveCredential"),iconType:Na.SAVE})]});return E(w),()=>{}},[E,se,ot,o,n]),D.useEffect(()=>()=>E(null),[E]),o&&!ne("ServiceName")?A.jsx("div",{children:n("common.loading")}):A.jsxs("form",{onSubmit:se(ot),children:[A.jsx("button",{type:"submit",style:{display:"none"}}),(x||d)&&A.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:[A.jsx(Kn,{}),A.jsx("div",{className:"text-sm text-gray-500 mt-2",children:m})]}),A.jsx(lc,{isOpen:R,onClose:()=>M(!1),onConfirm:()=>{M(!1),P()},title:n("credentials.deleteCredentialTitle"),message:n("credentials.deleteCredentialConfirm"),confirmText:n("common.delete"),cancelText:n("common.cancel"),variant:"danger"}),!o&&A.jsxs("div",{className:"flex space-x-2 mb-4",children:[A.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:[A.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[A.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),A.jsx("circle",{cx:"8",cy:"8",r:"1"}),A.jsx("circle",{cx:"16",cy:"8",r:"1"}),A.jsx("circle",{cx:"12",cy:"12",r:"1"}),A.jsx("circle",{cx:"8",cy:"16",r:"1"}),A.jsx("circle",{cx:"16",cy:"16",r:"1"})]}),n("credentials.randomAlias")]}),A.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:[A.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[A.jsx("circle",{cx:"12",cy:"7",r:"4"}),A.jsx("path",{d:"M5.5 20a6.5 6.5 0 0 1 13 0"})]}),n("credentials.manual")]})]}),A.jsxs("div",{className:"space-y-4",children:[A.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[A.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.service")}),A.jsxs("div",{className:"space-y-4",children:[A.jsx(cn,{id:"serviceName",label:n("credentials.serviceName"),ref:ge,value:ne("ServiceName")??"",onChange:w=>ce("ServiceName",w),required:!0,error:(Je=G.ServiceName)==null?void 0:Je.message}),A.jsx(cn,{id:"serviceUrl",label:n("credentials.serviceUrl"),value:ne("ServiceUrl")??"",onChange:w=>ce("ServiceUrl",w),error:(Ze=G.ServiceUrl)==null?void 0:Ze.message})]})]}),(h==="manual"||o)&&A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[A.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.loginCredentials")}),A.jsx("div",{className:"space-y-4",children:ne("HasPasskey")?A.jsxs(A.Fragment,{children:[A.jsx(Vp,{id:"username",label:n("common.username"),value:ne("Username")??"",onChange:w=>ce("Username",w),error:(yt=G.Username)==null?void 0:yt.message,onRegenerate:Qe}),!ee&&A.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:A.jsxs("div",{className:"flex items-start gap-2",children:[A.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:A.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"})}),A.jsxs("div",{className:"flex-1",children:[A.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n("passkeys.passkey")}),A.jsx("button",{type:"button",onClick:()=>q(!0),className:"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300",title:"Delete passkey",children:A.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[A.jsx("polyline",{points:"3 6 5 6 21 6"}),A.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"}),A.jsx("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),A.jsx("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]})})]}),A.jsxs("div",{className:"space-y-1 mb-2",children:[ne("PasskeyRpId")&&A.jsxs("div",{children:[A.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[n("passkeys.site"),": "]}),A.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:ne("PasskeyRpId")})]}),ne("PasskeyDisplayName")&&A.jsxs("div",{children:[A.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[n("passkeys.displayName"),": "]}),A.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:ne("PasskeyDisplayName")})]})]}),A.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:n("passkeys.helpText")})]})]})}),ee&&A.jsx("div",{className:"p-3 rounded bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:A.jsxs("div",{className:"flex items-start gap-2",children:[A.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:A.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"})}),A.jsxs("div",{className:"flex-1",children:[A.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-red-900 dark:text-red-100",children:n("passkeys.passkeyMarkedForDeletion")}),A.jsx("button",{type:"button",onClick:()=>q(!1),className:"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300",title:"Undo",children:A.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[A.jsx("path",{d:"M3 7v6h6"}),A.jsx("path",{d:"M21 17a9 9 0 00-9-9 9 9 0 00-6 2.3L3 13"})]})})]}),A.jsx("p",{className:"text-xs text-red-800 dark:text-red-200",children:n("passkeys.passkeyWillBeDeleted")})]})]})}),A.jsx(Hp,{id:"email",label:n("common.email"),value:ne("Alias.Email")??"",onChange:w=>ce("Alias.Email",w),error:(Nt=(ta=G.Alias)==null?void 0:ta.Email)==null?void 0:Nt.message}),A.jsx(zp,{id:"password",label:n("common.password"),value:ne("Password")??"",onChange:w=>ce("Password",w),error:(At=G.Password)==null?void 0:At.message,showPassword:N,onShowPasswordChange:B})]}):A.jsxs(A.Fragment,{children:[A.jsx(Hp,{id:"email",label:n("common.email"),value:ne("Alias.Email")??"",onChange:w=>ce("Alias.Email",w),error:(Ht=(Et=G.Alias)==null?void 0:Et.Email)==null?void 0:Ht.message}),A.jsx(Vp,{id:"username",label:n("common.username"),value:ne("Username")??"",onChange:w=>ce("Username",w),error:(Se=G.Username)==null?void 0:Se.message,onRegenerate:Qe}),A.jsx(zp,{id:"password",label:n("common.password"),value:ne("Password")??"",onChange:w=>ce("Password",w),error:(je=G.Password)==null?void 0:je.message,showPassword:N,onShowPasswordChange:B})]})})]}),A.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[A.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.alias")}),A.jsxs("div",{className:"space-y-4",children:[A.jsx("button",{type:"button",onClick:Ge,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 ${Me?"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:Me?A.jsxs(A.Fragment,{children:[A.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:[A.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),A.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),A.jsx("span",{children:n("credentials.clearAliasFields")})]}):A.jsxs(A.Fragment,{children:[A.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:[A.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),A.jsx("circle",{cx:"8",cy:"8",r:"1"}),A.jsx("circle",{cx:"16",cy:"8",r:"1"}),A.jsx("circle",{cx:"12",cy:"12",r:"1"}),A.jsx("circle",{cx:"8",cy:"16",r:"1"}),A.jsx("circle",{cx:"16",cy:"16",r:"1"})]}),A.jsx("span",{children:n("credentials.generateRandomAlias")})]})}),A.jsx(cn,{id:"firstName",label:n("credentials.firstName"),value:ne("Alias.FirstName")??"",onChange:w=>ce("Alias.FirstName",w),error:(ft=(et=G.Alias)==null?void 0:et.FirstName)==null?void 0:ft.message}),A.jsx(cn,{id:"lastName",label:n("credentials.lastName"),value:ne("Alias.LastName")??"",onChange:w=>ce("Alias.LastName",w),error:(ie=(K=G.Alias)==null?void 0:K.LastName)==null?void 0:ie.message}),A.jsx(cn,{id:"nickName",label:n("credentials.nickName"),value:ne("Alias.NickName")??"",onChange:w=>ce("Alias.NickName",w),error:(Oe=(Ee=G.Alias)==null?void 0:Ee.NickName)==null?void 0:Oe.message}),A.jsx(cn,{id:"gender",label:n("credentials.gender"),value:ne("Alias.Gender")??"",onChange:w=>ce("Alias.Gender",w),error:(Le=(Ue=G.Alias)==null?void 0:Ue.Gender)==null?void 0:Le.message}),A.jsx(cn,{id:"birthDate",label:n("credentials.birthDate"),placeholder:n("credentials.birthDatePlaceholder"),value:ne("Alias.BirthDate")??"",onChange:w=>ce("Alias.BirthDate",w),error:(L=(ze=G.Alias)==null?void 0:ze.BirthDate)==null?void 0:L.message})]})]}),A.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[A.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.metadata")}),A.jsx("div",{className:"space-y-4",children:A.jsx(cn,{id:"notes",label:n("credentials.notes"),value:ne("Notes")??"",onChange:w=>ce("Notes",w),multiline:!0,rows:4,error:(v=G.Notes)==null?void 0:v.message})})]}),A.jsx(iS,{attachments:O,onAttachmentsChange:z,originalAttachmentIds:H})]})]})]})};class wS{constructor(){Xt(this,"currentCopiedId","");Xt(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 ju=new wS,mf=({name:n})=>{switch(n){case"visibility":return A.jsxs(A.Fragment,{children:[A.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),A.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return A.jsxs(A.Fragment,{children:[A.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"}),A.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"copy":return A.jsxs(A.Fragment,{children:[A.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),A.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 A.jsx(A.Fragment,{children:A.jsx("polyline",{points:"20 6 9 17 4 12"})});default:return null}},Bi=({id:n,label:t,value:r,type:i="text"})=>{const{t:o}=gt(),[u,c]=D.useState(!1),[d,m]=D.useState(!1);D.useEffect(()=>{const y=ju.subscribe(E=>{m(E===n)});return()=>{y()}},[n]);const h=async()=>{try{await navigator.clipboard.writeText(r),ju.setCopied(n),await Lt("CLIPBOARD_COPIED",{value:r},"background"),setTimeout(()=>{ju.getCopiedId()===n&&ju.setCopied("")},2e3)}catch(y){console.error("Failed to copy text:",y)}};return A.jsxs("div",{children:[A.jsx("label",{htmlFor:n,className:"block mb-2 text-sm font-medium text-gray-700 dark:text-gray-300",children:t}),A.jsxs("div",{className:"relative",children:[A.jsx("input",{type:i==="password"&&!u?"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`}),A.jsxs("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:[d?A.jsx("button",{type:"button",className:"p-1 text-green-500 dark:text-green-400 transition-colors duration-200",title:o("common.copied"),children:A.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:A.jsx(mf,{name:"check"})})}):A.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:A.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:A.jsx(mf,{name:"copy"})})}),i==="password"&&A.jsx("button",{type:"button",onClick:()=>c(!u),className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:o(u?"common.hidePassword":"common.showPassword"),children:A.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:A.jsx(mf,{name:u?"visibility-off":"visibility"})})})]})]})]})},vS=({credential:n})=>{var c,d,m,h,y,E,C,x,S,N,B,R,M;const{t}=gt(),r=!!((d=(c=n.Alias)==null?void 0:c.FirstName)!=null&&d.trim()),i=!!((h=(m=n.Alias)==null?void 0:m.LastName)!=null&&h.trim()),o=!!((E=(y=n.Alias)==null?void 0:y.NickName)!=null&&E.trim()),u=ml.isValidBirthDate((C=n.Alias)==null?void 0:C.BirthDate);return!r&&!i&&!o&&!u?null:A.jsxs("div",{className:"space-y-2",children:[A.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t("common.alias")}),(r||i)&&A.jsx(Bi,{id:"fullName",label:t("common.fullName"),value:[(x=n.Alias)==null?void 0:x.FirstName,(S=n.Alias)==null?void 0:S.LastName].filter(Boolean).join(" ")}),r&&A.jsx(Bi,{id:"firstName",label:t("common.firstName"),value:((N=n.Alias)==null?void 0:N.FirstName)??""}),i&&A.jsx(Bi,{id:"lastName",label:t("common.lastName"),value:((B=n.Alias)==null?void 0:B.LastName)??""}),u&&A.jsx(Bi,{id:"birthDate",label:t("common.birthDate"),value:ml.normalizeBirthDateForDisplay((R=n.Alias)==null?void 0:R.BirthDate)}),o&&A.jsx(Bi,{id:"nickName",label:t("common.nickname"),value:((M=n.Alias)==null?void 0:M.NickName)??""})]})},CS=({credentialId:n})=>{const{t}=gt(),[r,i]=D.useState([]),[o,u]=D.useState(!0),c=sa(),d=m=>{try{const h=m.Blob instanceof Uint8Array?m.Blob:new Uint8Array(m.Blob),y=new Blob([h]),E=URL.createObjectURL(y),C=document.createElement("a");C.href=E,C.download=m.Filename,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(E)}catch(h){console.error("Error downloading attachment:",h)}};return D.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{u(!1)}})()},[n,c==null?void 0:c.sqliteClient]),o?A.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[A.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:A.jsx("div",{className:"mb-4",children:A.jsxs("div",{className:"space-y-2",children:[A.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("common.attachments")}),A.jsx("div",{className:"grid grid-cols-1 gap-2",children:r.map(m=>A.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(m),"aria-label":`Download ${m.Filename}`,children:A.jsxs("div",{className:"flex justify-between items-center gap-2",children:[A.jsx("div",{className:"flex items-center flex-1",children:A.jsxs("div",{className:"flex flex-col",children:[A.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:m.Filename}),A.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(m.CreatedAt).toLocaleDateString()})]})}),A.jsx("div",{className:"flex items-center",children:A.jsx("svg",{className:"w-4 h-4 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})})})]})},m.Id))})]})})},xS=({email:n})=>{const{t}=gt(),[r,i]=D.useState([]),[o,u]=D.useState([]),[c,d]=D.useState(!0),[m,h]=D.useState(0),[y,E]=D.useState(!1),[C,x]=D.useState(null),[S,N]=D.useState(!1),[B,R]=D.useState(2),M=pn(),O=sa(),z=3,H=B<r.length,V=(Z,$)=>{const ge=Z.slice(0,$);u(ge)},ee=()=>{const Z=Math.min(B+z,r.length);R(Z),V(r,Z)},q=async Z=>(await Ve.getItem("session:publicEmailDomains")??[]).some(ge=>Z.toLowerCase().endsWith(`@${ge.toLowerCase()}`)),J=async Z=>(await Ve.getItem("session:privateEmailDomains")??[]).some(ge=>Z.toLowerCase().endsWith(`@${ge.toLowerCase()}`));return D.useEffect(()=>{const Z=async()=>{var ge;try{x(null);const se=await q(n),ce=await J(n),ne=se||ce;if(E(se),N(ne),!ne)return;if(se){const G=n.split("@")[0],oe=await fetch(`https://api.spamok.com/v2/EmailBox/${G}`,{headers:{"X-Asdasd-Platform-Id":"av-chrome","X-Asdasd-Platform-Version":Pa.VERSION}});if(!oe.ok){x(t("emails.errors.emailLoadError"));return}const Ae=await oe.json(),xe=((ge=Ae==null?void 0:Ae.mails)==null?void 0:ge.toSorted((P,te)=>new Date(te.dateSystem).getTime()-new Date(P.dateSystem).getTime()))??[];c&&xe.length>0&&h(xe[0].id),i(P=>JSON.stringify(P.map(pe=>pe.id))!==JSON.stringify(xe.map(pe=>pe.id))?(V(xe,B),xe):P)}else if(ce)try{const G=await M.authFetch(`EmailBox/${n}`,{method:"GET"},!0,!1);try{const Ae=G.mails.toSorted((xe,P)=>new Date(P.dateSystem).getTime()-new Date(xe.dateSystem).getTime());if(Ae){const xe=await Jt.decryptEmailList(Ae,O.sqliteClient.getAllEncryptionKeys());c&&xe.length>0&&h(xe[0].id),i(P=>JSON.stringify(P.map(pe=>pe.id))!==JSON.stringify(xe.map(pe=>pe.id))?(V(xe,B),xe):P)}}catch{const oe=G;x(t("emails.apiErrors."+(oe==null?void 0:oe.code)));return}}catch{x(t("emails.errors.emailLoadError"));return}}catch(se){console.error("Error loading emails:",se),x(t("emails.errors.emailUnexpectedError"))}d(!1)};Z();const $=setInterval(Z,2e3);return()=>clearInterval($)},[n,c,M,O,t,B]),S?C?A.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[A.jsx("div",{className:"flex items-center gap-2 mb-2",children:A.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.recentEmails")})}),A.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded",children:A.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:C})})]}):c?A.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[A.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[A.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.recentEmails")}),A.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),t("common.loadingEmails")]}):r.length===0?A.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4 text-sm",children:[A.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[A.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.recentEmails")}),A.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),t("emails.noEmails")]}):A.jsxs("div",{className:"space-y-2 mb-4",children:[A.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[A.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.recentEmails")}),A.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),o.map(Z=>y?A.jsxs("a",{href:`https://spamok.com/${n.split("@")[0]}/${Z.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 ${Z.id>m?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[A.jsx("div",{className:"truncate flex-1",children:A.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[Z.subject.substring(0,30),Z.subject.length>30?"...":""]})}),A.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(Z.dateSystem).toLocaleDateString()})]},Z.id):A.jsxs(Ec,{to:`/emails/${Z.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 ${Z.id>m?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[A.jsx("span",{className:"truncate flex-1",children:A.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[Z.subject.substring(0,30),Z.subject.length>30?"...":""]})}),A.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(Z.dateSystem).toLocaleDateString()})]},Z.id)),H&&A.jsxs("button",{onClick:ee,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:[A.jsx("span",{children:t("common.loadMore")}),A.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}):null},IS=({email:n})=>{const t=sa();return(async i=>{var m;const o=(m=i.split("@")[1])==null?void 0:m.toLowerCase();if(!o)return!1;const u=await t.getVaultMetadata(),c=(u==null?void 0:u.publicEmailDomains)??[],d=(u==null?void 0:u.privateEmailDomains)??[];return[...c,...d].some(h=>o===h.toLowerCase())})(n)?A.jsx(A.Fragment,{children:A.jsx(xS,{email:n})}):null},NS=({credential:n})=>A.jsx("div",{className:"flex items-center justify-between",children:A.jsxs("div",{className:"flex items-center",children:[A.jsx("img",{src:tc.imgSrcFromBytes(n.Logo),alt:n.ServiceName,className:"w-12 h-12 rounded-lg mr-4"}),A.jsxs("div",{children:[A.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:n.ServiceName}),n.ServiceUrl&&(/^https?:\/\//i.test(n.ServiceUrl)?A.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}):A.jsx("span",{className:"break-all",children:n.ServiceUrl}))]})]})}),SS=({credential:n})=>{var u,c,d,m;const{t}=gt(),r=(c=(u=n.Alias)==null?void 0:u.Email)==null?void 0:c.trim(),i=(d=n.Username)==null?void 0:d.trim(),o=(m=n.Password)==null?void 0:m.trim();return!r&&!i&&!o&&!n.HasPasskey?null:A.jsxs("div",{className:"space-y-2",children:[A.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t("common.loginCredentials")}),r&&A.jsx(Bi,{id:"email",label:t("common.email"),value:r}),i&&A.jsx(Bi,{id:"username",label:t("common.username"),value:i}),n.HasPasskey&&A.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:A.jsxs("div",{className:"flex items-start gap-2",children:[A.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:A.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"})}),A.jsxs("div",{className:"flex-1",children:[A.jsx("div",{className:"mb-1",children:A.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:t("passkeys.passkey")})}),A.jsxs("div",{className:"space-y-1 mb-2",children:[n.PasskeyRpId&&A.jsxs("div",{children:[A.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[t("passkeys.site"),": "]}),A.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:n.PasskeyRpId})]}),n.PasskeyDisplayName&&A.jsxs("div",{children:[A.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[t("passkeys.displayName"),": "]}),A.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:n.PasskeyDisplayName})]})]}),A.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:t("passkeys.helpText")})]})]})}),o&&A.jsx(Bi,{id:"password",label:t("common.password"),value:o,type:"password"})]})},TS=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>`)},kS=({notes:n})=>{const{t}=gt();if(!n)return null;const r=TS(n);return A.jsxs("div",{children:[A.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t("common.notes")}),A.jsx("div",{className:"p-4 bg-gray-50 rounded-lg dark:bg-gray-700",children:A.jsx("p",{className:"text-gray-900 dark:text-gray-100 whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:r}})})]})};//! otpauth 9.4.0 | (c) Héctor Molinero Fernández | MIT | https://github.com/hectorm/otpauth
//! noble-hashes 1.7.1 | (c) Paul Miller | MIT | https://github.com/paulmillr/noble-hashes
const BS=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 Ac(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function DS(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function vc(n,...t){if(!DS(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 LS(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ac(n.outputLen),Ac(n.blockLen)}function no(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 BE(n,t){vc(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 RS(n){return new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4))}function pf(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function un(n,t){return n<<32-t|n>>>t}function yf(n,t){return n<<t|n>>>32-t>>>0}const Wp=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function US(n){return n<<24&4278190080|n<<8&16711680|n>>>8&65280|n>>>24&255}function Xp(n){for(let t=0;t<n.length;t++)n[t]=US(n[t])}function OS(n){if(typeof n!="string")throw new Error("utf8ToBytes expected string, got "+typeof n);return new Uint8Array(new TextEncoder().encode(n))}function Cc(n){return typeof n=="string"&&(n=OS(n)),vc(n),n}class sh{clone(){return this._cloneInto()}}function lo(n){const t=i=>n().update(Cc(i)).digest(),r=n();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>n(),t}class DE extends sh{update(t){return no(this),this.iHash.update(t),this}digestInto(t){no(this),vc(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:u,blockLen:c,outputLen:d}=this;return t=t,t.finished=o,t.destroyed=u,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,LS(t);const i=Cc(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,u=new Uint8Array(o);u.set(i.length>o?t.create().update(i).digest():i);for(let c=0;c<u.length;c++)u[c]^=54;this.iHash.update(u),this.oHash=t.create();for(let c=0;c<u.length;c++)u[c]^=106;this.oHash.update(u),u.fill(0)}}const Lf=(n,t,r)=>new DE(n,t).update(r).digest();Lf.create=(n,t)=>new DE(n,t);function MS(n,t,r,i){if(typeof n.setBigUint64=="function")return n.setBigUint64(t,r,i);const o=BigInt(32),u=BigInt(4294967295),c=Number(r>>o&u),d=Number(r&u),m=i?4:0,h=i?0:4;n.setUint32(t+m,c,i),n.setUint32(t+h,d,i)}function LE(n,t,r){return n&t^~n&r}function RE(n,t,r){return n&t^n&r^t&r}class oh extends sh{update(t){no(this);const{view:r,buffer:i,blockLen:o}=this;t=Cc(t);const u=t.length;for(let c=0;c<u;){const d=Math.min(o-this.pos,u-c);if(d===o){const m=pf(t);for(;o<=u-c;c+=o)this.process(m,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){no(this),BE(t,this),this.finished=!0;const{buffer:r,view:i,blockLen:o,isLE:u}=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;MS(i,o-8,BigInt(this.length*8),u),this.process(i,0);const d=pf(t),m=this.outputLen;if(m%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=m/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],u)}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:u,destroyed:c,pos:d}=this;return t.length=o,t.pos=d,t.finished=u,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=pf(this.buffer)}}const ol=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),xi=new Uint32Array(80);class _S extends oh{get(){const{A:t,B:r,C:i,D:o,E:u}=this;return[t,r,i,o,u]}set(t,r,i,o,u){this.A=t|0,this.B=r|0,this.C=i|0,this.D=o|0,this.E=u|0}process(t,r){for(let m=0;m<16;m++,r+=4)xi[m]=t.getUint32(r,!1);for(let m=16;m<80;m++)xi[m]=yf(xi[m-3]^xi[m-8]^xi[m-14]^xi[m-16],1);let{A:i,B:o,C:u,D:c,E:d}=this;for(let m=0;m<80;m++){let h,y;m<20?(h=LE(o,u,c),y=1518500249):m<40?(h=o^u^c,y=1859775393):m<60?(h=RE(o,u,c),y=2400959708):(h=o^u^c,y=3395469782);const E=yf(i,5)+h+d+y+xi[m]|0;d=c,c=u,u=yf(o,30),o=i,i=E}i=i+this.A|0,o=o+this.B|0,u=u+this.C|0,c=c+this.D|0,d=d+this.E|0,this.set(i,o,u,c,d)}roundClean(){xi.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}constructor(){super(64,20,8,!1),this.A=ol[0]|0,this.B=ol[1]|0,this.C=ol[2]|0,this.D=ol[3]|0,this.E=ol[4]|0}}const jS=lo(()=>new _S),QS=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]),Ii=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ni=new Uint32Array(64);class UE extends oh{get(){const{A:t,B:r,C:i,D:o,E:u,F:c,G:d,H:m}=this;return[t,r,i,o,u,c,d,m]}set(t,r,i,o,u,c,d,m){this.A=t|0,this.B=r|0,this.C=i|0,this.D=o|0,this.E=u|0,this.F=c|0,this.G=d|0,this.H=m|0}process(t,r){for(let E=0;E<16;E++,r+=4)Ni[E]=t.getUint32(r,!1);for(let E=16;E<64;E++){const C=Ni[E-15],x=Ni[E-2],S=un(C,7)^un(C,18)^C>>>3,N=un(x,17)^un(x,19)^x>>>10;Ni[E]=N+Ni[E-7]+S+Ni[E-16]|0}let{A:i,B:o,C:u,D:c,E:d,F:m,G:h,H:y}=this;for(let E=0;E<64;E++){const C=un(d,6)^un(d,11)^un(d,25),x=y+C+LE(d,m,h)+QS[E]+Ni[E]|0,N=(un(i,2)^un(i,13)^un(i,22))+RE(i,o,u)|0;y=h,h=m,m=d,d=c+x|0,c=u,u=o,o=i,i=x+N|0}i=i+this.A|0,o=o+this.B|0,u=u+this.C|0,c=c+this.D|0,d=d+this.E|0,m=m+this.F|0,h=h+this.G|0,y=y+this.H|0,this.set(i,o,u,c,d,m,h,y)}roundClean(){Ni.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=Ii[0]|0,this.B=Ii[1]|0,this.C=Ii[2]|0,this.D=Ii[3]|0,this.E=Ii[4]|0,this.F=Ii[5]|0,this.G=Ii[6]|0,this.H=Ii[7]|0}}class FS extends UE{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 PS=lo(()=>new UE),HS=lo(()=>new FS),Qu=BigInt(2**32-1),Rf=BigInt(32);function OE(n,t=!1){return t?{h:Number(n&Qu),l:Number(n>>Rf&Qu)}:{h:Number(n>>Rf&Qu)|0,l:Number(n&Qu)|0}}function ME(n,t=!1){let r=new Uint32Array(n.length),i=new Uint32Array(n.length);for(let o=0;o<n.length;o++){const{h:u,l:c}=OE(n[o],t);[r[o],i[o]]=[u,c]}return[r,i]}const zS=(n,t)=>BigInt(n>>>0)<<Rf|BigInt(t>>>0),VS=(n,t,r)=>n>>>r,GS=(n,t,r)=>n<<32-r|t>>>r,KS=(n,t,r)=>n>>>r|t<<32-r,qS=(n,t,r)=>n<<32-r|t>>>r,YS=(n,t,r)=>n<<64-r|t>>>r-32,WS=(n,t,r)=>n>>>r-32|t<<64-r,XS=(n,t)=>t,JS=(n,t)=>n,_E=(n,t,r)=>n<<r|t>>>32-r,jE=(n,t,r)=>t<<r|n>>>32-r,QE=(n,t,r)=>t<<r-32|n>>>64-r,FE=(n,t,r)=>n<<r-32|t>>>64-r;function $S(n,t,r,i){const o=(t>>>0)+(i>>>0);return{h:n+r+(o/2**32|0)|0,l:o|0}}const ZS=(n,t,r)=>(n>>>0)+(t>>>0)+(r>>>0),eT=(n,t,r,i)=>t+r+i+(n/2**32|0)|0,tT=(n,t,r,i)=>(n>>>0)+(t>>>0)+(r>>>0)+(i>>>0),aT=(n,t,r,i,o)=>t+r+i+o+(n/2**32|0)|0,rT=(n,t,r,i,o)=>(n>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(o>>>0),nT=(n,t,r,i,o,u)=>t+r+i+o+u+(n/2**32|0)|0,bt={fromBig:OE,split:ME,toBig:zS,shrSH:VS,shrSL:GS,rotrSH:KS,rotrSL:qS,rotrBH:YS,rotrBL:WS,rotr32H:XS,rotr32L:JS,rotlSH:_E,rotlSL:jE,rotlBH:QE,rotlBL:FE,add:$S,add3L:ZS,add3H:eT,add4L:tT,add4H:aT,add5H:nT,add5L:rT},[iT,sT]=bt.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))),Si=new Uint32Array(80),Ti=new Uint32Array(80);class PE extends oh{get(){const{Ah:t,Al:r,Bh:i,Bl:o,Ch:u,Cl:c,Dh:d,Dl:m,Eh:h,El:y,Fh:E,Fl:C,Gh:x,Gl:S,Hh:N,Hl:B}=this;return[t,r,i,o,u,c,d,m,h,y,E,C,x,S,N,B]}set(t,r,i,o,u,c,d,m,h,y,E,C,x,S,N,B){this.Ah=t|0,this.Al=r|0,this.Bh=i|0,this.Bl=o|0,this.Ch=u|0,this.Cl=c|0,this.Dh=d|0,this.Dl=m|0,this.Eh=h|0,this.El=y|0,this.Fh=E|0,this.Fl=C|0,this.Gh=x|0,this.Gl=S|0,this.Hh=N|0,this.Hl=B|0}process(t,r){for(let O=0;O<16;O++,r+=4)Si[O]=t.getUint32(r),Ti[O]=t.getUint32(r+=4);for(let O=16;O<80;O++){const z=Si[O-15]|0,H=Ti[O-15]|0,V=bt.rotrSH(z,H,1)^bt.rotrSH(z,H,8)^bt.shrSH(z,H,7),ee=bt.rotrSL(z,H,1)^bt.rotrSL(z,H,8)^bt.shrSL(z,H,7),q=Si[O-2]|0,J=Ti[O-2]|0,Z=bt.rotrSH(q,J,19)^bt.rotrBH(q,J,61)^bt.shrSH(q,J,6),$=bt.rotrSL(q,J,19)^bt.rotrBL(q,J,61)^bt.shrSL(q,J,6),ge=bt.add4L(ee,$,Ti[O-7],Ti[O-16]),se=bt.add4H(ge,V,Z,Si[O-7],Si[O-16]);Si[O]=se|0,Ti[O]=ge|0}let{Ah:i,Al:o,Bh:u,Bl:c,Ch:d,Cl:m,Dh:h,Dl:y,Eh:E,El:C,Fh:x,Fl:S,Gh:N,Gl:B,Hh:R,Hl:M}=this;for(let O=0;O<80;O++){const z=bt.rotrSH(E,C,14)^bt.rotrSH(E,C,18)^bt.rotrBH(E,C,41),H=bt.rotrSL(E,C,14)^bt.rotrSL(E,C,18)^bt.rotrBL(E,C,41),V=E&x^~E&N,ee=C&S^~C&B,q=bt.add5L(M,H,ee,sT[O],Ti[O]),J=bt.add5H(q,R,z,V,iT[O],Si[O]),Z=q|0,$=bt.rotrSH(i,o,28)^bt.rotrBH(i,o,34)^bt.rotrBH(i,o,39),ge=bt.rotrSL(i,o,28)^bt.rotrBL(i,o,34)^bt.rotrBL(i,o,39),se=i&u^i&d^u&d,ce=o&c^o&m^c&m;R=N|0,M=B|0,N=x|0,B=S|0,x=E|0,S=C|0,{h:E,l:C}=bt.add(h|0,y|0,J|0,Z|0),h=d|0,y=m|0,d=u|0,m=c|0,u=i|0,c=o|0;const ne=bt.add3L(Z,ge,ce);i=bt.add3H(ne,J,$,se),o=ne|0}({h:i,l:o}=bt.add(this.Ah|0,this.Al|0,i|0,o|0)),{h:u,l:c}=bt.add(this.Bh|0,this.Bl|0,u|0,c|0),{h:d,l:m}=bt.add(this.Ch|0,this.Cl|0,d|0,m|0),{h,l:y}=bt.add(this.Dh|0,this.Dl|0,h|0,y|0),{h:E,l:C}=bt.add(this.Eh|0,this.El|0,E|0,C|0),{h:x,l:S}=bt.add(this.Fh|0,this.Fl|0,x|0,S|0),{h:N,l:B}=bt.add(this.Gh|0,this.Gl|0,N|0,B|0),{h:R,l:M}=bt.add(this.Hh|0,this.Hl|0,R|0,M|0),this.set(i,o,u,c,d,m,h,y,E,C,x,S,N,B,R,M)}roundClean(){Si.fill(0),Ti.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 oT extends PE{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 lT=lo(()=>new PE),uT=lo(()=>new oT),HE=[],zE=[],VE=[],cT=BigInt(0),ll=BigInt(1),dT=BigInt(2),AT=BigInt(7),fT=BigInt(256),hT=BigInt(113);for(let n=0,t=ll,r=1,i=0;n<24;n++){[r,i]=[i,(2*r+3*i)%5],HE.push(2*(5*i+r)),zE.push((n+1)*(n+2)/2%64);let o=cT;for(let u=0;u<7;u++)t=(t<<ll^(t>>AT)*hT)%fT,t&dT&&(o^=ll<<(ll<<BigInt(u))-ll);VE.push(o)}const[gT,mT]=ME(VE,!0),Jp=(n,t,r)=>r>32?QE(n,t,r):_E(n,t,r),$p=(n,t,r)=>r>32?FE(n,t,r):jE(n,t,r);function pT(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,m=(c+2)%10,h=r[m],y=r[m+1],E=Jp(h,y,1)^r[d],C=$p(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],u=n[3];for(let c=0;c<24;c++){const d=zE[c],m=Jp(o,u,d),h=$p(o,u,d),y=HE[c];o=n[y],u=n[y+1],n[y]=m,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]^=gT[i],n[1]^=mT[i]}r.fill(0)}class lh extends sh{keccak(){Wp||Xp(this.state32),pT(this.state32,this.rounds),Wp||Xp(this.state32),this.posOut=0,this.pos=0}update(t){no(this);const{blockLen:r,state:i}=this;t=Cc(t);const o=t.length;for(let u=0;u<o;){const c=Math.min(r-this.pos,o-u);for(let d=0;d<c;d++)i[this.pos++]^=t[u++];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){no(this,!1),vc(t),this.finish();const r=this.state,{blockLen:i}=this;for(let o=0,u=t.length;o<u;){this.posOut>=i&&this.keccak();const c=Math.min(i-this.posOut,u-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 Ac(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(BE(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:u,enableXOF:c}=this;return t||(t=new lh(r,i,o,c,u)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=u,t.suffix=i,t.outputLen=o,t.enableXOF=c,t.destroyed=this.destroyed,t}constructor(t,r,i,o=!1,u=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=i,this.enableXOF=o,this.rounds=u,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Ac(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=RS(this.state)}}const xc=(n,t,r)=>lo(()=>new lh(t,n,r)),yT=xc(6,144,224/8),ET=xc(6,136,256/8),bT=xc(6,104,384/8),wT=xc(6,72,512/8),io=(()=>{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})(),Zp={SHA1:jS,SHA224:HS,SHA256:PS,SHA384:uT,SHA512:lT,"SHA3-224":yT,"SHA3-256":ET,"SHA3-384":bT,"SHA3-512":wT},uh=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}`)}},vT=(n,t,r)=>{if(Lf){const i=Zp[n]??Zp[uh(n)];return Lf(i,t,r)}else throw new Error("Missing HMAC function")},Uf="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",CT=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,u=0,c=0;for(let d=0;d<n.length;d++){const m=Uf.indexOf(n[d]);if(m===-1)throw new TypeError(`Invalid character found: ${n[d]}`);u=u<<5|m,o+=5,o>=8&&(o-=8,i[c++]=u>>>o)}return i},xT=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+=Uf[r>>>t-5&31],t-=5;return t>0&&(i+=Uf[r<<5-t&31]),i},IT=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},NT=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()},ST=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},TT=n=>{let t="";for(let r=0;r<n.length;r++)t+=String.fromCharCode(n[r]);return t},ey=io.TextEncoder?new io.TextEncoder:null,ty=io.TextDecoder?new io.TextDecoder:null,kT=n=>{if(!ey)throw new Error("Encoding API not available");return ey.encode(n)},BT=n=>{if(!ty)throw new Error("Encoding API not available");return ty.decode(n)},DT=n=>{var t;if((t=io.crypto)!=null&&t.getRandomValues)return io.crypto.getRandomValues(new Uint8Array(n));throw new Error("Cryptography API not available")};class zn{static fromLatin1(t){return new zn({buffer:ST(t).buffer})}static fromUTF8(t){return new zn({buffer:kT(t).buffer})}static fromBase32(t){return new zn({buffer:CT(t).buffer})}static fromHex(t){return new zn({buffer:IT(t).buffer})}get buffer(){return this.bytes.buffer}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,writable:!1,configurable:!1,value:TT(this.bytes)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,writable:!1,configurable:!1,value:BT(this.bytes)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,writable:!1,configurable:!1,value:xT(this.bytes)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,writable:!1,configurable:!1,value:NT(this.bytes)}),this.hex}constructor({buffer:t,size:r=20}={}){this.bytes=typeof t>"u"?DT(r):new Uint8Array(t),Object.defineProperty(this,"bytes",{enumerable:!0,writable:!1,configurable:!1,value:this.bytes})}}const LT=(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 Ua{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,counter:0,window:1}}static generate({secret:t,algorithm:r=Ua.defaults.algorithm,digits:i=Ua.defaults.digits,counter:o=Ua.defaults.counter}){const u=vT(r,t.bytes,BS(o)),c=u[u.byteLength-1]&15;return(((u[c]&127)<<24|(u[c+1]&255)<<16|(u[c+2]&255)<<8|u[c+3]&255)%10**i).toString().padStart(i,"0")}generate({counter:t=this.counter++}={}){return Ua.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:t})}static validate({token:t,secret:r,algorithm:i,digits:o=Ua.defaults.digits,counter:u=Ua.defaults.counter,window:c=Ua.defaults.window}){if(t.length!==o)return null;let d=null;const m=h=>{const y=Ua.generate({secret:r,algorithm:i,digits:o,counter:h});LT(t,y)&&(d=h-u)};m(u);for(let h=1;h<=c&&d===null&&(m(u-h),!(d!==null||(m(u+h),d!==null)));++h);return d}validate({token:t,counter:r=this.counter,window:i}){return Ua.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=Ua.defaults.issuer,label:r=Ua.defaults.label,issuerInLabel:i=Ua.defaults.issuerInLabel,secret:o=new zn,algorithm:u=Ua.defaults.algorithm,digits:c=Ua.defaults.digits,counter:d=Ua.defaults.counter}={}){this.issuer=t,this.label=r,this.issuerInLabel=i,this.secret=typeof o=="string"?zn.fromBase32(o):o,this.algorithm=uh(u),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:u=Date.now()}){return Ua.generate({secret:t,algorithm:r,digits:i,counter:Ca.counter({period:o,timestamp:u})})}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:u=Ca.defaults.period,timestamp:c=Date.now(),window:d}){return Ua.validate({token:t,secret:r,algorithm:i,digits:o,counter:Ca.counter({period:u,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 zn,algorithm:u=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"?zn.fromBase32(o):o,this.algorithm=uh(u),this.digits=c,this.period=d}}const RT=({credentialId:n})=>{const{t}=gt(),[r,i]=D.useState([]),[o,u]=D.useState(!0),[c,d]=D.useState({}),[m,h]=D.useState(null),y=sa(),E=(N=30)=>{const B=new Ca({secret:"dummy",algorithm:"SHA1",digits:6,period:N});return B.period-Math.floor(Date.now()/1e3)%B.period},C=()=>{const N=E();return Math.floor((30-N)/30*100)},x=N=>{try{return new Ca({secret:N,algorithm:"SHA1",digits:6,period:30}).generate()}catch(B){return console.error("Error generating TOTP code:",B),"Error"}},S=async(N,B)=>{try{await navigator.clipboard.writeText(N),h(B),await Lt("CLIPBOARD_COPIED",{value:N},"background"),setTimeout(()=>{h(null)},2e3)}catch(R){console.error("Failed to copy:",R)}};return D.useEffect(()=>{(async()=>{if(y!=null&&y.sqliteClient)try{const B=y.sqliteClient.getTotpCodesForCredential(n);i(B)}catch(B){console.error("Error loading TOTP codes:",B)}finally{u(!1)}})()},[n,y==null?void 0:y.sqliteClient]),D.useEffect(()=>{const N=M=>{const O={};return r.forEach(z=>{const H=x(z.SecretKey);H!=="Error"?O[z.Id]=H:O[z.Id]=M[z.Id]??"Error"}),O},B={};r.forEach(M=>{B[M.Id]=x(M.SecretKey)}),d(B);const R=setInterval(()=>{d(N)},1e3);return()=>{clearInterval(R)}},[r]),o?A.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[A.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:A.jsx("div",{className:"mb-4",children:A.jsxs("div",{className:"space-y-2",children:[A.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("common.twoFactorAuthentication")}),A.jsx("div",{className:"grid grid-cols-1 gap-2",children:r.map(N=>A.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:()=>S(c[N.Id],N.Id),"aria-label":`Copy ${N.Name} code`,children:A.jsxs("div",{className:"flex justify-between items-center gap-2",children:[A.jsx("div",{className:"flex items-center flex-1",children:A.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:N.Name})}),A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsxs("div",{className:"flex flex-col items-end",children:[A.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:c[N.Id]}),A.jsx("div",{className:"text-xs",children:m===N.Id?A.jsx("span",{className:"text-green-600 dark:text-green-400",children:t("common.copied")}):A.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[E(),"s"]})})]}),A.jsx("div",{className:"w-1 h-6 bg-gray-200 rounded-full dark:bg-gray-600",children:A.jsx("div",{className:"bg-blue-600 rounded-full transition-all",style:{height:`${C()}%`,width:"100%"}})})]})]})},N.Id))})]})})},UT=()=>{var y;const{t:n}=gt(),{id:t}=Hf(),r=Ma(),i=sa(),[o,u]=D.useState(null),{setIsInitialLoading:c}=fa(),{setHeaderButtons:d}=En(),m=D.useCallback(()=>{Ia.openInNewPopup(`/credentials/${t}`)},[t]),h=D.useCallback(()=>{r(`/credentials/${t}/edit`)},[t,r]);return D.useEffect(()=>{if(Ia.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?(u(E),c(!1)):(console.error("Credential not found"),r("/credentials"))}catch(E){console.error("Error loading credential:",E)}},[i.sqliteClient,t,r,c]),D.useEffect(()=>{const E=A.jsxs("div",{className:"flex items-center gap-2",children:[!Ia.isPopup()&&A.jsx(Ar,{onClick:m,title:n("common.openInNewWindow"),iconType:Na.EXPAND}),A.jsx(Ar,{onClick:h,title:n("credentials.editCredential"),iconType:Na.EDIT})]});return d(E),()=>{}},[d,h,m,n]),D.useEffect(()=>()=>d(null),[d]),o?A.jsxs("div",{className:"space-y-4",children:[A.jsx("div",{className:"flex justify-between items-center",children:A.jsx(NS,{credential:o})}),((y=o.Alias)==null?void 0:y.Email)&&A.jsx(IS,{email:o.Alias.Email}),A.jsx(RT,{credentialId:o.Id}),A.jsx(SS,{credential:o}),A.jsx(vS,{credential:o}),A.jsx(kS,{notes:o.Notes}),A.jsx(CS,{credentialId:o.Id})]}):A.jsx("div",{children:n("common.loading")})},OT=({credential:n})=>{const t=Ma(),r=o=>{var c;let u="";return o.Username&&(u=o.Username),(c=o.Alias)!=null&&c.Email&&(u=o.Alias.Email),u.length>33?u.slice(0,30)+"...":u},i=o=>{let u="Untitled";return o.ServiceName&&(u=o.ServiceName),u.length>33?u.slice(0,30)+"...":u};return A.jsx("li",{children:A.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:[A.jsx("img",{src:tc.imgSrcFromBytes(n.Logo),alt:n.ServiceName,className:"w-8 h-8 mr-2 flex-shrink-0",onError:o=>{const u=o.target;u.src="/assets/images/service-placeholder.webp"}}),A.jsxs("div",{className:"text-left flex-1",children:[A.jsxs("div",{className:"flex items-center gap-1.5",children:[A.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:i(n)}),n.HasPasskey&&A.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:A.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&&A.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:A.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"})})]}),A.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r(n)})]})]})})},Of=({onClick:n})=>A.jsxs("div",{className:"px-2 items-center",children:[A.jsxs("div",{className:"relative inline-flex items-center",children:[A.jsx("button",{onClick:n,className:"absolute p-2 hover:bg-gray-200 rounded-2xl",children:A.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:A.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"})})}),A.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:[A.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"}),A.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"})]})]}),A.jsx("span",{className:"sr-only",children:"Loading..."})]}),Ic=(n=!1,t=300)=>{const[r,i]=D.useState(n),o=D.useRef(null),u=D.useRef(null),c=D.useCallback(d=>{if(d)i(!0),u.current=Date.now();else{const m=u.current?Date.now()-u.current:0,h=Math.max(0,t-m);h===0?i(!1):(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{i(!1)},h))}},[t]);return D.useEffect(()=>{n&&(i(!0),u.current=Date.now())},[n,i]),D.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]),[r,c]},Mf="credentials-filter",MT=5*60*1e3,_T=()=>{try{const n=localStorage.getItem(Mf);if(!n)return"all";const{filter:t,timestamp:r}=JSON.parse(n);return Date.now()-r>MT?(localStorage.removeItem(Mf),"all"):t}catch{return"all"}},ul=n=>{try{localStorage.setItem(Mf,JSON.stringify({filter:n,timestamp:Date.now()}))}catch{}},jT=()=>{const{t:n}=gt(),t=sa(),r=yn(),i=Ma(),{syncVault:o}=bc(),{setHeaderButtons:u}=En(),[c,d]=D.useState([]),[m,h]=D.useState(""),[y,E]=D.useState(_T()),[C,x]=D.useState(!1),{setIsInitialLoading:S}=fa(),[N,B]=Ic(!0,100),R=D.useCallback(()=>{i("/credentials/add")},[i]),M=D.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]),O=D.useCallback(async()=>{B(!0),await M(),B(!1)},[M,B]);D.useEffect(()=>{const V=A.jsxs("div",{className:"flex items-center gap-2",children:[!Ia.isPopup()&&A.jsx(Ar,{onClick:()=>Ia.openInNewPopup(),title:"Open in new window",iconType:Na.EXPAND}),A.jsx(Ar,{onClick:R,title:"Add new credential",iconType:Na.PLUS})]});return u(V),()=>u(null)},[u,R]),D.useEffect(()=>{(async()=>{var ee;if(t!=null&&t.sqliteClient){B(!0);const q=((ee=t.sqliteClient)==null?void 0:ee.getAllCredentials())??[];d(q),B(!1),S(!1)}})()},[t==null?void 0:t.sqliteClient,B,S]);const z=()=>{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")}},H=c.filter(V=>{var $,ge,se,ce,ne,G,oe,Ae,xe,P,te,pe,Ce,Me,Ge,Qe;let ee=!0;if(y==="passkeys")ee=V.HasPasskey===!0;else if(y==="aliases")ee=!!(($=V.Alias)!=null&&$.FirstName&&V.Alias.FirstName.trim()||(ge=V.Alias)!=null&&ge.LastName&&V.Alias.LastName.trim()||(se=V.Alias)!=null&&se.NickName&&V.Alias.NickName.trim()||(ce=V.Alias)!=null&&ce.Gender&&V.Alias.Gender.trim()||(ne=V.Alias)!=null&&ne.BirthDate&&V.Alias.BirthDate.trim()&&V.Alias.BirthDate.trim().startsWith("0001-01-01")!==!0);else if(y==="userpass"){const ot=!!((G=V.Alias)!=null&&G.FirstName&&V.Alias.FirstName.trim()||(oe=V.Alias)!=null&&oe.LastName&&V.Alias.LastName.trim()||(Ae=V.Alias)!=null&&Ae.NickName&&V.Alias.NickName.trim()||(xe=V.Alias)!=null&&xe.Gender&&V.Alias.Gender.trim()||(P=V.Alias)!=null&&P.BirthDate&&V.Alias.BirthDate.trim()&&V.Alias.BirthDate.trim().startsWith("0001-01-01")!==!0);ee=!!(V.Username&&V.Username.trim()||V.Password&&V.Password.trim())&&!V.HasPasskey&&!ot}else y==="attachments"&&(ee=V.HasAttachment===!0);if(!ee)return!1;const q=m.toLowerCase().trim();if(!q)return!0;const J=[((te=V.ServiceName)==null?void 0:te.toLowerCase())||"",((pe=V.Username)==null?void 0:pe.toLowerCase())||"",((Me=(Ce=V.Alias)==null?void 0:Ce.Email)==null?void 0:Me.toLowerCase())||"",((Ge=V.ServiceUrl)==null?void 0:Ge.toLowerCase())||"",((Qe=V.Notes)==null?void 0:Qe.toLowerCase())||""];return q.split(/\s+/).filter(ot=>ot.length>0).every(ot=>J.some(Je=>Je.includes(ot)))});return N?A.jsx("div",{className:"flex justify-center items-center p-8",children:A.jsx(Kn,{})}):A.jsxs("div",{children:[A.jsxs("div",{className:"flex justify-between items-center mb-4",children:[A.jsxs("div",{className:"relative",children:[A.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:[A.jsxs("h2",{className:"flex items-baseline gap-1.5",children:[z(),A.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["(",H.length,")"]})]}),A.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:A.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),C&&A.jsxs(A.Fragment,{children:[A.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>x(!1)}),A.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:A.jsxs("div",{className:"py-1",children:[A.jsx("button",{onClick:()=>{const V="all";E(V),ul(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")}),A.jsx("button",{onClick:()=>{const V="passkeys";E(V),ul(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")}),A.jsx("button",{onClick:()=>{const V="aliases";E(V),ul(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")}),A.jsx("button",{onClick:()=>{const V="userpass";E(V),ul(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")}),A.jsx("button",{onClick:()=>{const V="attachments";E(V),ul(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")})]})})]})]}),A.jsx(Of,{onClick:O})]}),c.length>0?A.jsx("div",{className:"mb-4",children:A.jsx("input",{type:"text",value:m,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"})}):A.jsx(A.Fragment,{}),c.length===0?A.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:[A.jsx("p",{children:n("credentials.welcomeTitle")}),A.jsx("p",{children:n("credentials.welcomeDescription")})]}):H.length===0?A.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:A.jsx("p",{children:n(y==="passkeys"?"credentials.noPasskeysFound":y==="attachments"?"credentials.noAttachmentsFound":"credentials.noMatchingCredentials")})}):A.jsx("ul",{className:"space-y-2",children:H.map(V=>A.jsx(OT,{credential:V},V.Id))})]})},QT=()=>{const{t:n}=gt(),{id:t}=Hf(),r=Ma(),i=sa(),o=pn(),[u,c]=D.useState(null),[d,m]=D.useState(null),[h,y]=Ic(!0,150),[E,C]=D.useState(!1),[x,S]=D.useState(!1),{setIsInitialLoading:N}=fa(),{setHeaderButtons:B}=En(),[R,M]=D.useState(!1);D.useEffect(()=>{Ia.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 ee=await o.get(`Email/${t}`),q=i.sqliteClient.getAllEncryptionKeys(),J=await Jt.decryptEmail(ee,q);m(J)}catch(ee){c(ee instanceof Error?ee.message:"An error occurred")}finally{y(!1),N(!1)}})()},[t,i==null?void 0:i.sqliteClient,o,y,N]);const O=D.useCallback(async()=>{try{await o.delete(`Email/${t}`),Ia.isPopup()?window.close():r("/emails")}catch(V){c(V instanceof Error?V.message:"Failed to delete email")}},[t,o,r]),z=D.useCallback(()=>{Ia.openInNewPopup(`/emails/${t}`)},[t]),H=async V=>{try{const ee=await o.downloadBlob(`Email/${t}/attachments/${V.id}`);if(!(i!=null&&i.sqliteClient)||!d){c("Database context or email not available");return}const q=i.sqliteClient.getAllEncryptionKeys(),J=await Jt.decryptAttachment(ee,d,q);if(!J){c("Failed to decrypt attachment");return}const Z=new Blob([new Uint8Array(J)],{type:V.mimeType??"application/octet-stream"}),$=window.URL.createObjectURL(Z),ge=document.createElement("a");ge.href=$,ge.download=V.filename,document.body.appendChild(ge),ge.click(),window.URL.revokeObjectURL($),document.body.removeChild(ge)}catch(ee){console.error("handleDownloadAttachment error",ee),c(ee instanceof Error?ee.message:"Failed to download attachment")}};return D.useEffect(()=>{if(!R){const V=A.jsxs("div",{className:"flex items-center gap-2",children:[!Ia.isPopup()&&A.jsx(Ar,{onClick:z,title:n("common.openInNewWindow"),iconType:Na.EXPAND}),A.jsx(Ar,{onClick:()=>C(!0),title:n("emails.deleteEmail"),iconType:Na.DELETE,variant:"danger"})]});B(V),M(!0)}return()=>{}},[B,R,z,n]),D.useEffect(()=>()=>B(null),[B]),h?A.jsx("div",{className:"flex justify-center items-center p-8",children:A.jsx(Kn,{})}):u?A.jsxs("div",{className:"text-red-500",children:[n("common.error")," ",u]}):d?A.jsxs("div",{className:"max-w-4xl mx-auto",children:[A.jsx(lc,{isOpen:E,onClose:()=>C(!1),onConfirm:()=>{C(!1),O()},title:n("emails.deleteEmailTitle"),message:n("emails.deleteEmailConfirm"),confirmText:n("common.delete"),cancelText:n("common.cancel"),variant:"danger"}),A.jsxs("div",{children:[A.jsxs("div",{children:[A.jsx("div",{className:"flex justify-between items-start",children:A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:d.subject}),A.jsx("button",{onClick:()=>S(!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:A.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:A.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&&A.jsxs("div",{className:"space-y-1 text-sm text-gray-600 dark:text-gray-400 mt-2",children:[A.jsxs("p",{children:[A.jsx("span",{className:"font-bold",children:n("emails.from")})," ",A.jsx("span",{title:d.fromLocal+"@"+d.fromDomain,children:d.fromDisplay})]}),A.jsxs("p",{children:[A.jsx("span",{className:"font-bold",children:n("emails.to")})," ",A.jsxs("span",{title:d.toLocal+"@"+d.toDomain,children:[d.toLocal,"@",d.toDomain]})]}),A.jsxs("p",{children:[A.jsx("span",{className:"font-bold",children:n("emails.date")})," ",new Date(d.dateSystem).toLocaleString()]})]})]}),A.jsx("div",{className:"bg-white mt-4",children:d.messageHtml?A.jsx("iframe",{srcDoc:Zs.convertAnchorTagsToOpenInNewTab(d.messageHtml),className:"w-full min-h-[500px] border-0",title:n("emails.emailContent")}):A.jsx("pre",{className:"whitespace-pre-wrap text-gray-800 p-3",children:d.messagePlain})}),d.attachments&&d.attachments.length>0&&A.jsxs("div",{className:"p-6 border-t border-gray-200 dark:border-gray-700",children:[A.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("emails.attachments")}),A.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4",children:d.attachments.map(V=>A.jsxs("button",{onClick:()=>H(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:[A.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})}),A.jsxs("span",{children:[V.filename," (",Math.ceil(V.filesize/1024)," KB)"]})]},V.id))})]})]})]}):A.jsx("div",{className:"text-gray-500",children:n("emails.emailNotFound")})},FT=()=>{const{t:n}=gt(),t=sa(),r=pn(),{setHeaderButtons:i}=En(),[o,u]=D.useState(null),[c,d]=D.useState([]),{setIsInitialLoading:m}=fa(),[h,y]=Ic(!0,100),E=D.useCallback(async()=>{try{if(y(!0),u(null),!(t!=null&&t.sqliteClient))return;const x=t.sqliteClient.getAllEmailAddresses();try{const S=await r.post("EmailBox/bulk",{addresses:x,page:1,pageSize:50}),N=t.sqliteClient.getAllEncryptionKeys(),B=await Jt.decryptEmailList(S.mails,N);d(B)}catch(S){throw console.error(S),new Error(n("emails.errors.emailLoadError"))}}catch(x){u(x instanceof Error?x.message:n("common.errors.unknownError"))}finally{y(!1),m(!1)}},[t==null?void 0:t.sqliteClient,r,y,m,n]);D.useEffect(()=>{E()},[E]),D.useEffect(()=>{const x=Ia.isPopup()?null:A.jsx(Ar,{onClick:()=>Ia.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Na.EXPAND});return i(x),()=>{i(null)}},[i,n]);const C=x=>{const S=new Date,N=new Date(x),B=Math.floor((S.getTime()-N.getTime())/1e3);if(B<60)return n("emails.dateFormat.justNow");if(B<3600){const R=Math.floor(B/60);return R===1?n("emails.dateFormat.minutesAgo_single",{count:R}):n("emails.dateFormat.minutesAgo_plural",{count:R})}else if(B<86400){const R=Math.floor(B/3600);return R===1?n("emails.dateFormat.hoursAgo_single",{count:R}):n("emails.dateFormat.hoursAgo_plural",{count:R})}else return B<172800?n("emails.dateFormat.yesterday"):N.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit"})};return h?A.jsx("div",{className:"flex justify-center items-center p-8",children:A.jsx(Kn,{})}):o?A.jsxs("div",{className:"text-red-500",children:[n("common.error"),": ",o]}):c.length===0?A.jsxs("div",{children:[A.jsxs("div",{className:"flex justify-between items-center mb-4",children:[A.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("emails.title")}),A.jsx(Of,{onClick:E})]}),A.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:A.jsx("p",{className:"text-sm",children:n("emails.noEmailsDescription")})})]}):A.jsxs("div",{children:[A.jsxs("div",{className:"flex justify-between items-center mb-4",children:[A.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("emails.title")}),A.jsx(Of,{onClick:E})]}),A.jsx("div",{className:"space-y-2",children:c.map(x=>A.jsxs(Ec,{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:[A.jsxs("div",{className:"flex justify-between items-start mb-2",children:[A.jsx("div",{className:"text-gray-900 dark:text-white mb-1 font-bold",children:x.subject}),A.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:C(x.dateSystem)})]}),A.jsx("div",{className:"text-gray-600 text-sm dark:text-gray-300 line-clamp-2",children:x.messagePreview})]},x.id))})]})},PT=()=>{const{isFullyInitialized:n}=UN();return n?A.jsx(Qv,{to:"/reinitialize",replace:!0}):null};var eo=(n=>(n.DEFAULT="default",n.URL_EXACT="url_exact",n.URL_SUBDOMAIN="url_subdomain",n))(eo||{});function ch(n){if(!n)return"";let t=n.toLowerCase().trim();return t=t.replace(/^https?:\/\//,""),t=t.replace(/^www\./,""),t=t.split("/")[0],t=t.split("?")[0],t=t.split("#")[0],t}function dh(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 GE=({origin:n,onChoice:t,onCancel:r})=>{const{t:i}=gt();return A.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4",children:A.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-md w-full p-6",children:[A.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:i("passkeys.bypass.title")}),A.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:i("passkeys.bypass.description",{origin:n})}),A.jsxs("div",{className:"space-y-3",children:[A.jsx(Oa,{variant:"primary",onClick:()=>t("once"),children:i("passkeys.bypass.thisTimeOnly")}),A.jsx(Oa,{variant:"secondary",onClick:()=>t("always"),children:i("passkeys.bypass.alwaysForSite")}),A.jsx(Oa,{variant:"secondary",onClick:r,children:i("common.cancel")})]})]})})};function KE(n={}){const{enabled:t=!0}=n,r=ar(),i=Ma(),{dbInitialized:o,dbAvailable:u}=sa();return D.useEffect(()=>{if(!(!t||!o)&&!u){const c=`${r.pathname}${r.search}`;Ve.setItem(nc,c),i("/unlock")}},[t,o,u,r,i]),{isLocked:o&&!u}}async function HT(){const n=await Ve.getItem(nc);return n&&await Ve.removeItem(nc),n}async function zT(){await Ve.removeItem(nc)}const We=class We{constructor(){}static async createPasskey(t,r,i){var ce,ne,G,oe,Ae;We.pickSupportedAlgorithm(r.publicKey.pubKeyCredParams);const o=((ce=r.publicKey.rp)==null?void 0:ce.id)||new URL(r.origin).hostname,u=new Uint8Array(await crypto.subtle.digest("SHA-256",We.te(o))),c=await crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"]),d=await crypto.subtle.exportKey("jwk",c.publicKey),m=await crypto.subtle.exportKey("jwk",c.privateKey),h=We.toB64u(t),y=We.buildCoseEc2Es256(d);let E=65;const C=(ne=r.publicKey.authenticatorSelection)==null?void 0:ne.userVerification,x=!!(i!=null&&i.uvPerformed);(C==="required"||C==="preferred"&&x)&&(E|=4),E|=8,E|=16;const S=new Uint8Array([0,0,0,0]),N=new Uint8Array([t.length>>8&255,t.length&255]),B=We.concat(We.AAGUID,N,t,y),R=We.concat(u,new Uint8Array([E]),S,B),O={type:"webauthn.create",challenge:We.challengeToB64u(r.publicKey.challenge),origin:r.origin,crossOrigin:!1},z=JSON.stringify(O),H=We.te(z),V=r.publicKey.attestation||"none",ee=V==="none"||V==="indirect"?We.buildAttObjNone(R):await We.buildAttObjPackedSelf(R,H,c.privateKey);let q=null;(G=r.publicKey.user)!=null&&G.id&&(q=typeof r.publicKey.user.id=="string"?r.publicKey.user.id:We.toB64(r.publicKey.user.id instanceof Uint8Array?r.publicKey.user.id:new Uint8Array(r.publicKey.user.id)));let J,Z=!1,$;if(i!=null&&i.enablePrf){const xe=new Uint8Array(32);if(crypto.getRandomValues(xe),J=We.toB64u(xe),Z=!0,i!=null&&i.prfInputs){const P=We.fromB64u(i.prfInputs.first);if($={first:await We.evaluatePrf(xe,P)},i.prfInputs.second){const te=We.fromB64u(i.prfInputs.second);$.second=await We.evaluatePrf(xe,te)}}}const ge={rpId:o,credentialId:h,publicKey:d,privateKey:m,userId:q,userName:(oe=r.publicKey.user)==null?void 0:oe.name,userDisplayName:(Ae=r.publicKey.user)==null?void 0:Ae.displayName,prfSecret:J};return{credential:{id:h,rawId:h,response:{clientDataJSON:We.toB64u(H),attestationObject:We.toB64u(ee)},type:"public-key"},stored:ge,prfEnabled:Z,prfResults:$}}static async getAssertion(t,r,i){const o=r,u=t.publicKey.rpId||new URL(t.origin).hostname,c=new Uint8Array(await crypto.subtle.digest("SHA-256",We.te(u)));let d=1;const m=t.publicKey.userVerification,h=!!(i!=null&&i.uvPerformed);(m==="required"||m==="preferred"&&h)&&(d|=4),((i==null?void 0:i.includeBEBS)??!0)&&(d|=8,d|=16);const y=new Uint8Array([0,0,0,0]),E=We.concat(c,new Uint8Array([d]),y),x={type:"webauthn.get",challenge:We.challengeToB64u(t.publicKey.challenge),origin:t.origin,crossOrigin:!1},S=JSON.stringify(x),N=We.te(S),B=new Uint8Array(await crypto.subtle.digest("SHA-256",N)),R=We.concat(E,B),M=await crypto.subtle.importKey("jwk",o.privateKey,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]),O=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},M,R)),z=We.ecdsaRawToDer(O);let H=null;o.userId&&(H=o.userId.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""));let V;if(i!=null&&i.prfInputs&&o.prfSecret){const ee=We.fromB64u(o.prfSecret);if(V={first:await We.evaluatePrf(ee,i.prfInputs.first)},i.prfInputs.second){const J=await We.evaluatePrf(ee,i.prfInputs.second);V.second=J}}return{id:o.credentialId,rawId:o.credentialId,clientDataJSON:We.toB64u(N),authenticatorData:We.toB64u(E),signature:We.toB64u(z),userHandle:H,prfResults:V}}static async evaluatePrf(t,r){const i=r instanceof Uint8Array?r:new Uint8Array(r),o=We.te("WebAuthn PRF\0"),u=We.concat(o,i),c=await crypto.subtle.digest("SHA-256",u),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=We.pad32(We.fromB64u(t.x)),i=We.pad32(We.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=We.cborText("fmt"),i=We.cborText("none"),o=We.cborText("attStmt"),u=new Uint8Array([160]),c=We.cborText("authData"),d=We.cborBstr(t);return We.concat(new Uint8Array([163]),r,i,o,u,c,d)}static async buildAttObjPackedSelf(t,r,i){const o=new Uint8Array(await crypto.subtle.digest("SHA-256",r)),u=We.concat(t,o),c=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},i,u)),d=We.ecdsaRawToDer(c),m=We.concat(We.cborText("alg"),new Uint8Array([38]),We.cborText("sig"),We.cborBstr(d)),h=We.concat(new Uint8Array([162]),m),y=We.cborText("fmt"),E=We.cborText("packed"),C=We.cborText("attStmt"),x=We.cborText("authData"),S=We.cborBstr(t);return We.concat(new Uint8Array([163]),y,E,C,h,x,S)}static cborText(t){const r=We.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=We.derInt(r),u=We.derInt(i);return new Uint8Array([48,o.length+u.length,...o,...u])}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 We.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),u=new Uint8Array(o.length);for(let c=0;c<o.length;c++)u[c]=o.charCodeAt(c);return u}static challengeToB64u(t){if(typeof t=="string")return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");const r=t instanceof Uint8Array?t:new Uint8Array(t);return We.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((u,c)=>u+c.length,0),i=new Uint8Array(r);let o=0;for(const u of t)i.set(u,o),o+=u.length;return i}};Xt(We,"AAGUID",new Uint8Array([161,26,95,170,159,50,75,140,140,93,47,125,19,232,201,66]));let fc=We;class er{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),u=new Uint8Array(o.length);for(let c=0;c<o.length;c++)u[c]=o.charCodeAt(c);return u}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 VT=()=>{const{t:n}=gt(),t=ar(),{setIsInitialLoading:r}=fa(),i=sa(),[o,u]=D.useState(null),[c,d]=D.useState(!1),[m,h]=D.useState(null),[y,E]=D.useState([]),[C,x]=D.useState(!1),{isLocked:S}=KE(),N=D.useRef(null);D.useEffect(()=>{(async()=>{if(!i.dbInitialized||S)return;const V=new URLSearchParams(t.search).get("requestId");if(V)try{const ee=await Lt("GET_REQUEST_DATA",{requestId:V},"background");if(ee&&ee.type==="get"){u(ee);const q=ee.publicKey.rpId||new URL(ee.origin).hostname,J=i.sqliteClient.getPasskeysByRpId(q);let Z=J;if(ee.publicKey.allowCredentials&&ee.publicKey.allowCredentials.length>0){const $=new Set(ee.publicKey.allowCredentials.map(ge=>{try{return er.base64urlToGuid(ge.id)}catch(se){return console.warn("Failed to convert credential ID to GUID:",ge.id,se),null}}).filter(ge=>ge!==null));Z=J.filter(ge=>$.has(ge.Id))}E(Z.map($=>({id:$.Id,displayName:$.DisplayName,serviceName:$.ServiceName,rpId:$.RpId,username:$.Username})))}}catch(ee){console.error("Failed to fetch request data:",ee),h(n("common.errors.unknownError"))}r(!1)})()},[t,r,i.dbInitialized,S,i.sqliteClient,n]),D.useEffect(()=>{y.length>0&&N.current&&N.current.focus()},[y.length]),D.useEffect(()=>{const z=H=>{H.key==="Enter"&&!c&&y.length>0&&B(y[0].id)};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[c,y]);const B=async z=>{var H,V;if(!(!o||!i.sqliteClient)){d(!0),h(null);try{const ee=i.sqliteClient.getPasskeyById(z);if(!ee)throw new Error(n("common.errors.unknownError"));const q=JSON.parse(ee.PublicKey),J=JSON.parse(ee.PrivateKey);let Z;if(ee.PrfKey)try{Z=er.bytesToBase64url(ee.PrfKey)}catch(Ae){console.warn("Failed to convert PrfKey to base64url",Ae)}let $=null;if(ee.UserHandle)try{const Ae=ee.UserHandle instanceof Uint8Array?ee.UserHandle:new Uint8Array(ee.UserHandle);$=er.bytesToBase64url(Ae)}catch(Ae){console.warn("Failed to convert UserHandle to base64",Ae)}const ge={rpId:ee.RpId,credentialId:er.guidToBase64url(ee.Id),publicKey:q,privateKey:J,userId:$,userName:ee.Username??void 0,userDisplayName:ee.ServiceName??void 0,prfSecret:Z},se={origin:o.origin,requestId:o.requestId,publicKey:{rpId:o.publicKey.rpId,challenge:o.publicKey.challenge,userVerification:o.publicKey.userVerification}};let ce;if((V=(H=o.publicKey.extensions)==null?void 0:H.prf)!=null&&V.eval){const Ae=o.publicKey.extensions.prf.eval.first;let xe;if(typeof Ae=="object"&&Ae!==null&&!Array.isArray(Ae)){const P=Object.keys(Ae).map(Number).sort((te,pe)=>te-pe);xe=new Uint8Array(P.length);for(let te=0;te<P.length;te++)xe[te]=Ae[te]}else if(typeof Ae=="string"){const P=atob(Ae);xe=new Uint8Array(P.length);for(let te=0;te<P.length;te++)xe[te]=P.charCodeAt(te)}else throw new Error("Unknown PRF input format");if(ce={first:xe},o.publicKey.extensions.prf.eval.second){const P=o.publicKey.extensions.prf.eval.second;let te;if(typeof P=="object"&&P!==null&&!Array.isArray(P)){const pe=Object.keys(P).map(Number).sort((Ce,Me)=>Ce-Me);te=new Uint8Array(pe.length);for(let Ce=0;Ce<pe.length;Ce++)te[Ce]=P[Ce]}else if(typeof P=="string"){const pe=atob(P);te=new Uint8Array(pe.length);for(let Ce=0;Ce<pe.length;Ce++)te[Ce]=pe.charCodeAt(Ce)}else throw console.error("[PasskeyAuth] Unknown PRF second input type:",typeof P),new Error("Unknown PRF second input format");ce.second=te}}const ne=await fc.getAssertion(se,ge,{uvPerformed:!0,includeBEBS:!0,prfInputs:ce});let G;ne.prfResults&&(G={first:er.arrayBufferToBase64(ne.prfResults.first)},ne.prfResults.second&&(G.second=er.arrayBufferToBase64(ne.prfResults.second)));const oe={id:ne.id,rawId:ne.rawId,clientDataJSON:ne.clientDataJSON,authenticatorData:ne.authenticatorData,signature:ne.signature,userHandle:ne.userHandle,prfResults:G};await Lt("PASSKEY_POPUP_RESPONSE",{requestId:o.requestId,credential:oe},"background")}catch(ee){console.error("PasskeyAuthenticate: Error during authentication",ee),d(!1),h(n("common.errors.unknownError"))}}},R=async()=>{x(!0)},M=async z=>{if(o){if(z==="always"){const H=new URL(o.origin).hostname,V=dh(ch(H)),ee=await Ve.getItem(us)??[];ee.includes(V)||(ee.push(V),await Ve.setItem(us,ee))}await Lt("PASSKEY_POPUP_RESPONSE",{requestId:o.requestId,fallback:!0},"background")}},O=async()=>{o&&await Lt("PASSKEY_POPUP_RESPONSE",{requestId:o.requestId,cancelled:!0},"background")};return o?A.jsxs(A.Fragment,{children:[C&&o&&A.jsx(GE,{origin:new URL(o.origin).hostname,onChoice:M,onCancel:()=>x(!1)}),A.jsxs("div",{className:"space-y-6",children:[A.jsxs("div",{className:"text-center",children:[A.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:n("passkeys.authenticate.title")}),A.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[n("passkeys.authenticate.signInFor")," ",A.jsx("strong",{children:o.origin})]})]}),m&&A.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:A.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:m})}),A.jsx("div",{className:"space-y-4",children:y&&y.length>0?A.jsxs("div",{className:"space-y-2",children:[A.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:n("passkeys.authenticate.selectPasskey")}),A.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((z,H)=>A.jsxs("div",{ref:H===0?N:null,tabIndex:0,className:"p-3 rounded-lg border cursor-pointer transition-colors bg-white border-gray-200 hover:bg-gray-100 hover:border-gray-300 dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:border-gray-500 focus:outline-none focus:ring-1 focus:ring-primary-500 focus:border-primary-500",onClick:()=>!c&&B(z.id),onKeyDown:V=>{V.key==="Enter"&&!c&&B(z.id)},children:[A.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:z.serviceName}),A.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:A.jsx("span",{className:"truncate",children:z.displayName})})]},z.id))})]}):A.jsx("div",{className:"text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg",children:A.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:n("passkeys.authenticate.noPasskeysFound")})})}),A.jsxs("div",{className:"space-y-3",children:[A.jsx(Oa,{variant:"secondary",onClick:R,children:n("passkeys.authenticate.useBrowserPasskey")}),A.jsx(Oa,{variant:"secondary",onClick:O,children:n("common.cancel")})]})]})]}):A.jsx("div",{className:"flex justify-center py-8",children:A.jsx(Kn,{})})},ay=({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 A.jsx("div",{className:`p-3 border rounded-lg ${i[n]} ${r}`,children:A.jsx("p",{className:"text-sm",children:t})})},GT=()=>{var oe;const{t:n}=gt(),t=ar(),{setIsInitialLoading:r}=fa(),i=sa(),o=pn(),{executeVaultMutation:u,isLoading:c,syncStatus:d}=Zf(),[m,h]=D.useState(null),[y,E]=D.useState(""),[C,x]=D.useState(null),{isLocked:S}=KE(),[N,B]=D.useState([]),[R,M]=D.useState(null),[O,z]=D.useState(!1),[H,V]=D.useState(!1),[ee,q]=D.useState(!1),J=D.useRef(null),Z=D.useRef(null);D.useEffect(()=>{(async()=>{var te,pe,Ce,Me,Ge,Qe,ot,Je;if(!i.dbInitialized||S)return;const P=new URLSearchParams(t.search).get("requestId");if(P)try{const Ze=await Lt("GET_REQUEST_DATA",{requestId:P},"background");if(Ze&&Ze.type==="create"){h(Ze);const yt=((pe=(te=Ze.publicKey)==null?void 0:te.rp)==null?void 0:pe.name)||((Me=(Ce=Ze.publicKey)==null?void 0:Ce.rp)==null?void 0:Me.id)||"Passkey";if(E(yt),i.sqliteClient&&((Qe=(Ge=Ze.publicKey)==null?void 0:Ge.rp)!=null&&Qe.id)){const ta=i.sqliteClient.getPasskeysByRpId(Ze.publicKey.rp.id);let Nt=ta;((ot=Ze.publicKey.user)!=null&&ot.id||(Je=Ze.publicKey.user)!=null&&Je.name)&&(Nt=ta.filter(At=>{var Et,Ht;if((Et=Ze.publicKey.user)!=null&&Et.id&&At.UserHandle)try{const Se=er.base64urlToBytes(Ze.publicKey.user.id),je=At.UserHandle instanceof Uint8Array?At.UserHandle:new Uint8Array(At.UserHandle);if(Se.length===je.length&&Se.every((et,ft)=>et===je[ft]))return!0}catch{}return!!((Ht=Ze.publicKey.user)!=null&&Ht.name&&At.Username&&At.Username===Ze.publicKey.user.name)})),B(Nt),Nt.length===0&&z(!0)}}}catch(Ze){console.error("Failed to fetch request data:",Ze),x(n("common.errors.unknownError"))}r(!1)})()},[t,r,i.dbInitialized,i.sqliteClient,S,n]),D.useEffect(()=>{O&&Z.current?Z.current.focus():!O&&N.length>0&&J.current&&J.current.focus()},[O,N.length]),D.useEffect(()=>{const Ae=xe=>{xe.key==="Enter"&&!H&&!c&&O&&se()};return window.addEventListener("keydown",Ae),()=>window.removeEventListener("keydown",Ae)},[O,H,c]);const $=()=>{M(null),z(!0)},ge=Ae=>{M(Ae),z(!0)},se=async()=>{var Ae,xe;if(!(!m||!i.sqliteClient)){x(null);try{let P;if(m.origin){V(!0);try{const At=new Promise((Se,je)=>setTimeout(()=>je(new Error("Favicon extraction timed out")),5e3)),Et=o.get("Favicon/Extract?url="+m.origin),Ht=await Promise.race([Et,At]);if(Ht!=null&&Ht.image){const Se=atob(Ht.image),je=new Uint8Array(Se.length);for(let et=0;et<Se.length;et++)je[et]=Se.charCodeAt(et);P=je}}catch{}}const te={origin:m.origin,requestId:m.requestId,publicKey:{rp:m.publicKey.rp,user:m.publicKey.user,challenge:m.publicKey.challenge,pubKeyCredParams:m.publicKey.pubKeyCredParams,attestation:m.publicKey.attestation,authenticatorSelection:m.publicKey.authenticatorSelection}},pe=crypto.randomUUID().toUpperCase(),Ce=er.guidToBytes(pe),Me=er.guidToBase64url(pe),Ge=(xe=(Ae=m.publicKey)==null?void 0:Ae.extensions)==null?void 0:xe.prf,Qe=!!Ge,ot=Ge==null?void 0:Ge.eval,Je=await fc.createPasskey(Ce,te,{uvPerformed:!0,credentialIdBytes:16,enablePrf:Qe,prfInputs:ot}),{credential:Ze,stored:yt,prfEnabled:ta,prfResults:Nt}=Je;await u(async()=>{if(R){const At=i.sqliteClient.getPasskeyById(R);if(At){await i.sqliteClient.updateCredentialById({Id:At.CredentialId,ServiceName:y,ServiceUrl:m.origin,Username:m.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(R);let Et=null;if(yt.userId)try{Et=er.base64urlToBytes(yt.userId)}catch{Et=null}await i.sqliteClient.createPasskey({Id:pe,CredentialId:At.CredentialId,RpId:yt.rpId,UserHandle:Et,PublicKey:JSON.stringify(yt.publicKey),PrivateKey:JSON.stringify(yt.privateKey),DisplayName:m.publicKey.user.displayName||m.publicKey.user.name||"",PrfKey:yt.prfSecret?er.base64urlToBytes(yt.prfSecret):void 0,AdditionalData:null})}}else{const At=await i.sqliteClient.createCredential({Id:"",ServiceName:y,ServiceUrl:m.origin,Username:m.publicKey.user.name,Password:"",Notes:"",Logo:P??void 0,Alias:{FirstName:"",LastName:"",NickName:"",BirthDate:"0001-01-01 00:00:00",Gender:"",Email:""}},[]);let Et=null;if(yt.userId)try{Et=er.base64urlToBytes(yt.userId)}catch{Et=null}await i.sqliteClient.createPasskey({Id:pe,CredentialId:At,RpId:yt.rpId,UserHandle:Et,PublicKey:JSON.stringify(yt.publicKey),PrivateKey:JSON.stringify(yt.privateKey),DisplayName:m.publicKey.user.displayName||m.publicKey.user.name||"",PrfKey:yt.prfSecret?er.base64urlToBytes(yt.prfSecret):void 0,AdditionalData:null})}},{onSuccess:async()=>{let At;ta&&(At={prf:{enabled:!0,results:Nt?{first:er.bytesToBase64url(new Uint8Array(Nt.first)),second:Nt.second?er.bytesToBase64url(new Uint8Array(Nt.second)):void 0}:void 0}});const Et={id:Me,rawId:Me,clientDataJSON:Ze.response.clientDataJSON,attestationObject:Ze.response.attestationObject,extensions:At};await Lt("PASSKEY_POPUP_RESPONSE",{requestId:m.requestId,credential:Et},"background")},onError:At=>{console.error("PasskeyCreate: Error storing passkey",At),x(n("common.errors.unknownError"))}})}catch(P){console.error("PasskeyCreate: Error creating passkey",P),x(n("common.errors.unknownError"))}}},ce=async()=>{q(!0)},ne=async Ae=>{if(m){if(Ae==="always"){const xe=new URL(m.origin).hostname,P=dh(ch(xe)),te=await Ve.getItem(us)??[];te.includes(P)||(te.push(P),await Ve.setItem(us,te))}await Lt("PASSKEY_POPUP_RESPONSE",{requestId:m.requestId,fallback:!0},"background")}},G=async()=>{m&&await Lt("PASSKEY_POPUP_RESPONSE",{requestId:m.requestId,cancelled:!0},"background")};return m?A.jsxs(A.Fragment,{children:[ee&&m&&A.jsx(GE,{origin:new URL(m.origin).hostname,onChoice:ne,onCancel:()=>q(!1)}),(H||c)&&A.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:[A.jsx(Kn,{}),A.jsx("div",{className:"text-sm text-gray-500 mt-2",children:d})]}),A.jsxs("div",{className:"space-y-6",children:[A.jsxs("div",{className:"text-center",children:[A.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:n("passkeys.create.title")}),A.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[n("passkeys.create.createFor")," ",A.jsx("strong",{children:m.origin})]})]}),C&&A.jsx(ay,{variant:"error",children:C}),!O&&N.length>0&&A.jsxs("div",{className:"space-y-4",children:[A.jsx(Oa,{variant:"primary",onClick:$,ref:J,children:n("passkeys.create.createNewPasskey")}),A.jsx(Oa,{variant:"secondary",onClick:ce,children:n("passkeys.create.useBrowserPasskey")}),A.jsxs("div",{className:"relative",children:[A.jsx("div",{className:"absolute inset-0 flex items-center",children:A.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),A.jsx("div",{className:"relative flex justify-center text-sm",children:A.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:n("common.or")})})]}),A.jsxs("div",{className:"space-y-2",children:[A.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:n("passkeys.create.selectPasskeyToReplace")}),A.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto border rounded-lg p-2 bg-gray-50 dark:bg-gray-800",children:N.map(Ae=>A.jsx("button",{onClick:()=>ge(Ae.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:A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("div",{className:"flex-1",children:[A.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:Ae.ServiceName}),A.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:A.jsx("span",{className:"truncate",children:Ae.DisplayName})})]}),A.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},Ae.Id))})]}),A.jsx(Oa,{variant:"secondary",onClick:G,children:n("common.cancel")})]}),O&&A.jsxs("div",{className:"space-y-4",children:[R&&A.jsx(ay,{variant:"warning",children:n("passkeys.create.replacingPasskey",{displayName:((oe=N.find(Ae=>Ae.Id===R))==null?void 0:oe.DisplayName)||""})}),A.jsx(cn,{id:"displayName",label:n("passkeys.create.titleLabel"),value:y,onChange:E,placeholder:n("passkeys.create.titlePlaceholder"),ref:Z}),A.jsxs("div",{className:"space-y-3",children:[A.jsx(Oa,{variant:"primary",onClick:se,children:n(R?"passkeys.create.confirmReplace":"passkeys.create.createButton")}),N.length>0?A.jsx(Oa,{variant:"secondary",onClick:()=>{z(!1),M(null)},children:n("common.back")}):A.jsxs(A.Fragment,{children:[A.jsx(Oa,{variant:"secondary",onClick:ce,children:n("passkeys.create.useBrowserPasskey")}),A.jsx(Oa,{variant:"secondary",onClick:G,children:n("common.cancel")})]})]})]})]})]}):A.jsx("div",{className:"flex justify-center py-8",children:A.jsx(Kn,{})})},ry="session:lastVisitedPage",ny="session:lastVisitedTime",iy="session:navigationHistory",KT=120*1e3,qT=()=>{const n=Ma(),{setIsInitialLoading:t}=fa(),{syncVault:r}=bc(),i=D.useRef(!1),{isInitialized:o,isLoggedIn:u}=yn(),{dbInitialized:c,dbAvailable:d}=sa(),m=o&&c,h=m&&(!u||!d),y=D.useCallback(async()=>{const[E,C,x]=await Promise.all([Ve.getItem(ry),Ve.getItem(ny),Ve.getItem(iy)]);if(E&&C&&Date.now()-C<=KT){(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([Ve.removeItem(ry),Ve.removeItem(ny),Ve.removeItem(iy),Lt("CLEAR_PERSISTED_FORM_VALUES",null,"background")]),n("/credentials",{replace:!0})},[n]);return D.useEffect(()=>{(async()=>{const x=new URLSearchParams(window.location.search).get("mode")==="inline_unlock",S=await HT();if(!m)return;const N=!i.current;h?(t(!1),u?d||n("/unlock",{replace:!0}):n("/login",{replace:!0})):N?(i.current=!0,r({initialSync:!1,onSuccess:async()=>{x?(t(!1),n("/unlock-success",{replace:!0})):S?(t(!1),n(S,{replace:!0})):await y()},onError:B=>{console.error("Vault sync error during initialization:",B),y().then(()=>{t(!1)})},onUpgradeRequired:()=>{n("/upgrade",{replace:!0}),t(!1)}})):(t(!1),y())})()},[m,h,u,d,n,t,r,y]),null},YT=()=>{const{t:n}=gt(),{setIsInitialLoading:t}=fa(),[r,i]=D.useState({disabledUrls:[],temporaryDisabledUrls:{},currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),[o,u]=D.useState(eo.DEFAULT),c=async()=>{const C={active:!0,currentWindow:!0},[x]=await ao.tabs.query(C);return x},d=D.useCallback(async()=>{const C=await c(),x=new URL(C.url??"").hostname,S=await Ve.getItem(Ku)??[],N=await Ve.getItem(Ou)??{},B=await Ve.getItem(ac)!==!1,R=Date.now(),M=Object.fromEntries(Object.entries(N).filter(([z,H])=>H>R));Object.keys(M).length!==Object.keys(N).length&&await Ve.setItem(Ou,M);const O=await Ve.getItem(op)??eo.DEFAULT;u(O),i({disabledUrls:S,temporaryDisabledUrls:M,currentUrl:x,isEnabled:!S.includes(x)&&!(x in M),isGloballyEnabled:B}),t(!1)},[t]);D.useEffect(()=>{d()},[d]);const m=async()=>{const{currentUrl:C,disabledUrls:x,temporaryDisabledUrls:S,isEnabled:N}=r;let B=[...x],R={...S};N?(B.includes(C)||B.push(C),delete R[C]):(B=B.filter(M=>M!==C),delete R[C]),await Ve.setItem(Ku,B),await Ve.setItem(Ou,R),i(M=>({...M,disabledUrls:B,temporaryDisabledUrls:R,isEnabled:!N}))},h=async()=>{await Ve.setItem(Ku,[]),await Ve.setItem(Ou,{}),i(C=>({...C,disabledUrls:[],temporaryDisabledUrls:{},isEnabled:!0}))},y=async()=>{const C=!r.isGloballyEnabled;await Ve.setItem(ac,C),i(x=>({...x,isGloballyEnabled:C}))},E=async C=>{await Ve.setItem(op,C),u(C)};return A.jsxs("div",{className:"space-y-6",children:[A.jsxs("section",{children:[A.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.globalSettings")}),A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsx("div",{className:"p-4",children:A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("div",{children:[A.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.autofillPopup")}),A.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")})]}),A.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("settings.enabled"):n("settings.disabled")})]})})})]}),r.isGloballyEnabled&&A.jsxs("section",{children:[A.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.siteSpecificSettings")}),A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsxs("div",{className:"p-4",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("div",{children:[A.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:[n("settings.autofillPopupOn"),r.currentUrl]}),A.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]&&A.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&&A.jsx("button",{onClick:m,className:`px-4 py-2 ml-1 rounded-md transition-colors ${r.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:r.isEnabled?n("settings.enabled"):n("settings.disabled")})]}),A.jsx("div",{className:"mt-4",children:A.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")})})]})})]}),A.jsxs("section",{children:[A.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.autofillMatching")}),A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsx("div",{className:"p-4",children:A.jsxs("div",{children:[A.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.autofillMatchingMode")}),A.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.autofillMatchingModeDescription")}),A.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:[A.jsx("option",{value:eo.DEFAULT,children:n("settings.autofillMatchingDefault")}),A.jsx("option",{value:eo.URL_SUBDOMAIN,children:n("settings.autofillMatchingUrlSubdomain")}),A.jsx("option",{value:eo.URL_EXACT,children:n("settings.autofillMatchingUrlExact")})]})]})})})]})]})},WT=({titleKey:n,contentKey:t,className:r=""})=>{const{t:i}=gt(),[o,u]=D.useState(!1);return A.jsxs(A.Fragment,{children:[A.jsx("button",{onClick:()=>u(!0),className:`${r}`,type:"button","aria-label":"Help",children:A.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:A.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&&A.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4",children:A.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg p-6 max-w-sm w-full",children:[A.jsxs("div",{className:"flex items-center justify-between mb-4",children:[A.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:i(n)}),A.jsx("button",{onClick:()=>u(!1),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","aria-label":i("common.close"),children:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),A.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:i(t)}),A.jsx("button",{onClick:()=>u(!1),className:"mt-4 w-full px-4 py-2 bg-primary-600 hover:bg-primary-700 text-white rounded-md transition-colors",children:i("common.close")})]})})]})},XT=()=>{const{t:n}=gt(),{setIsInitialLoading:t}=fa(),[r,i]=D.useState(0);D.useEffect(()=>{(async()=>{const c=await Ve.getItem(sp)??0;i(c),t(!1)})()},[t]);const o=async u=>{await Ve.setItem(sp,u),await Lt("SET_AUTO_LOCK_TIMEOUT",u,"background"),i(u)};return A.jsx("div",{className:"space-y-6",children:A.jsxs("section",{children:[A.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.autoLockTimeout")}),A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsx("div",{className:"p-4",children:A.jsxs("div",{children:[A.jsxs("div",{className:"flex items-center mb-2",children:[A.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.autoLockTimeout")}),A.jsx(WT,{titleKey:"settings.autoLockTimeout",contentKey:"settings.autoLockTimeoutHelp",className:"ml-2"})]}),A.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.autoLockTimeoutDescription")}),A.jsxs("select",{value:r,onChange:u=>o(Number(u.target.value)),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[A.jsx("option",{value:"0",children:n("settings.autoLockNever")}),A.jsx("option",{value:"15",children:n("settings.autoLock15Seconds")}),A.jsx("option",{value:"60",children:n("settings.autoLock1Minute")}),A.jsx("option",{value:"300",children:n("settings.autoLock5Minutes")}),A.jsx("option",{value:"900",children:n("settings.autoLock15Minutes")}),A.jsx("option",{value:"1800",children:n("settings.autoLock30Minutes")}),A.jsx("option",{value:"3600",children:n("settings.autoLock1Hour")}),A.jsx("option",{value:"14400",children:n("settings.autoLock4Hours")}),A.jsx("option",{value:"28800",children:n("settings.autoLock8Hours")}),A.jsx("option",{value:"86400",children:n("settings.autoLock24Hours")})]})]})})})]})})},JT=()=>{const{t:n}=gt(),{setIsInitialLoading:t}=fa(),[r,i]=D.useState(10);D.useEffect(()=>{(async()=>{const c=await Ve.getItem(ip)??10;i(c),t(!1)})()},[t]);const o=async u=>{await Ve.setItem(ip,u),await Lt("SET_CLIPBOARD_CLEAR_TIMEOUT",u,"background"),i(u)};return A.jsx("div",{className:"space-y-6",children:A.jsxs("section",{children:[A.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.clipboardSettings")}),A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsx("div",{className:"p-4",children:A.jsxs("div",{children:[A.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.clipboardClearTimeout")}),A.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:n("settings.clipboardClearTimeoutDescription")}),A.jsxs("select",{value:r,onChange:u=>o(Number(u.target.value)),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[A.jsx("option",{value:"0",children:n("settings.clipboardClearDisabled")}),A.jsx("option",{value:"5",children:n("settings.clipboardClear5Seconds")}),A.jsx("option",{value:"10",children:n("settings.clipboardClear10Seconds")}),A.jsx("option",{value:"15",children:n("settings.clipboardClear15Seconds")})]})]})})})]})})},$T=()=>{const{t:n}=gt(),{setIsInitialLoading:t}=fa(),[r,i]=D.useState(!0),o=D.useCallback(async()=>{const c=await Ve.getItem(np)!==!1;i(c),t(!1)},[t]);D.useEffect(()=>{o()},[o]);const u=async()=>{const c=!r;await Ve.setItem(np,c),await Lt("TOGGLE_CONTEXT_MENU",{enabled:c},"background"),i(c)};return A.jsx("div",{className:"space-y-6",children:A.jsxs("section",{children:[A.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.contextMenu")}),A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsx("div",{className:"p-4",children:A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("div",{children:[A.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("settings.rightClickContextMenu")}),A.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")}),A.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:n("settings.contextMenuDescription")})]}),A.jsx("button",{onClick:u,className:`px-4 py-2 rounded-md transition-colors ${r?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:n(r?"settings.enabled":"settings.disabled")})]})})})]})})},ZT=()=>{const{t:n}=gt(),{setIsInitialLoading:t}=fa();return D.useEffect(()=>{t(!1)},[t]),A.jsx("div",{className:"space-y-6",children:A.jsxs("section",{children:[A.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.language")}),A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsx("div",{className:"p-4",children:A.jsxs("div",{children:[A.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-3",children:n("settings.selectLanguage")}),A.jsx(fE,{variant:"dropdown",size:"sm"})]})})})]})})},ek=()=>{const{t:n}=gt(),{setIsInitialLoading:t}=fa(),[r,i]=D.useState({disabledUrls:[],currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),o=async()=>{const h={active:!0,currentWindow:!0},[y]=await ao.tabs.query(h);return y},u=D.useCallback(async()=>{const h=await o(),y=new URL(h.url??"").hostname,E=dh(ch(y)),C=await Ve.getItem(us)??[],x=await Ve.getItem(lp)!==!1,S=!C.includes(E);i({disabledUrls:C,currentUrl:E,isEnabled:S,isGloballyEnabled:x}),t(!1)},[t]);D.useEffect(()=>{u()},[u]);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 Ve.setItem(us,C),i(x=>({...x,disabledUrls:C,isEnabled:!E}))},d=async()=>{await Ve.setItem(us,[]),i(h=>({...h,disabledUrls:[],isEnabled:!0}))},m=async()=>{const h=!r.isGloballyEnabled;await Ve.setItem(lp,h),i(y=>({...y,isGloballyEnabled:h}))};return A.jsxs("div",{className:"space-y-6",children:[A.jsxs("section",{children:[A.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.globalSettings")}),A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsx("div",{className:"p-4",children:A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("div",{children:[A.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:n("passkeys.settings.passkeyProvider")}),A.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")})]}),A.jsx("button",{onClick:m,className:`px-4 py-2 rounded-md transition-colors ${r.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:r.isGloballyEnabled?n("settings.enabled"):n("settings.disabled")})]})})})]}),r.isGloballyEnabled&&A.jsxs("section",{children:[A.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.siteSpecificSettings")}),A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsxs("div",{className:"p-4",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("div",{children:[A.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:[n("passkeys.settings.passkeyProviderOn"),r.currentUrl]}),A.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&&A.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("settings.enabled"):n("settings.disabled")})]}),A.jsx("div",{className:"mt-4",children:A.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")})})]})})]})]})},sy="local:theme",qE=D.createContext(void 0),tk=({children:n})=>{const[t,r]=D.useState("system"),[i,o]=D.useState(!1);D.useEffect(()=>{(async()=>{const y=await c();r(y)})()},[]);const u=D.useCallback(h=>{r(h),d(h)},[]),c=async()=>await Ve.getItem(sy)||"system",d=async h=>{await Ve.setItem(sy,h)};D.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 m=D.useMemo(()=>({theme:t,setTheme:u,isDarkMode:i}),[t,i,u]);return A.jsx(qE.Provider,{value:m,children:n})},ak=()=>{const n=D.useContext(qE);if(n===void 0)throw new Error("useTheme must be used within a ThemeProvider");return n},rk=()=>{var O,z;const{t:n}=gt(),{theme:t,setTheme:r}=ak(),i=yn(),{setHeaderButtons:o}=En(),{setIsInitialLoading:u}=fa(),{loadApiUrl:c,getDisplayUrl:d}=hE(),m=Ma(),h=async()=>{const H=await ao.storage.local.get("clientUrl");let V=Pa.DEFAULT_CLIENT_URL;H!=null&&H.clientUrl&&H.clientUrl.length>0&&(V=H.clientUrl),window.open(V,"_blank")};D.useEffect(()=>{const H=A.jsxs("div",{className:"flex items-center gap-2",children:[!Ia.isPopup()&&A.jsx(A.Fragment,{children:A.jsx(Ar,{onClick:()=>Ia.openInNewPopup(),title:n("settings.openInNewWindow"),iconType:Na.EXPAND})}),A.jsx(Ar,{onClick:h,title:n("settings.openWebApp"),iconType:Na.EXTERNAL_LINK})]});return o(H),()=>o(null)},[o,n]);const y=D.useCallback(async()=>{await c(),u(!1)},[u,c]);D.useEffect(()=>{y()},[y]);const E=async H=>{r(H)},C=async()=>{i.logout()},x=()=>{m("/settings/autofill")},S=()=>{m("/settings/clipboard")},N=()=>{m("/settings/language")},B=()=>{m("/settings/auto-lock")},R=()=>{m("/settings/context-menu")},M=()=>{m("/settings/passkeys")};return A.jsxs("div",{className:"space-y-6",children:[A.jsx("div",{className:"flex justify-between items-center mb-4",children:A.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("settings.title")})}),A.jsx("section",{children:A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsx("div",{className:"p-4",children:A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("div",{className:"flex items-center space-x-3",children:[A.jsx("div",{className:"flex-shrink-0",children:A.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:A.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((z=(O=i.username)==null?void 0:O[0])==null?void 0:z.toUpperCase())||"?"})})}),A.jsxs("div",{children:[A.jsx("p",{className:"text font-medium text-gray-900 dark:text-white",children:i.username}),A.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n("settings.loggedIn")})]})]}),A.jsx("button",{onClick:C,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:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":n("settings.logout"),children:A.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"})})})]})})})}),A.jsxs("section",{children:[A.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.preferences")}),A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[A.jsxs("button",{onClick:x,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[A.jsxs("div",{className:"flex items-center",children:[A.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:A.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"})}),A.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.autofillSettings")})]}),A.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),A.jsxs("button",{onClick:M,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[A.jsxs("div",{className:"flex items-center",children:[A.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:A.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"})}),A.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.passkeySettings")})]}),A.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),A.jsxs("button",{onClick:R,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[A.jsxs("div",{className:"flex items-center",children:[A.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:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16m-7 6h7"})}),A.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.contextMenuSettings")})]}),A.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),A.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:[A.jsxs("div",{className:"flex items-center",children:[A.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:A.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"})}),A.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.autoLockTimeout")})]}),A.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),A.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:[A.jsxs("div",{className:"flex items-center",children:[A.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:A.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"})}),A.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.clipboardSettings")})]}),A.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),A.jsxs("button",{onClick:N,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[A.jsxs("div",{className:"flex items-center",children:[A.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:A.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"})}),A.jsx("span",{className:"text-gray-900 dark:text-white",children:n("settings.language")})]}),A.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})]}),A.jsxs("section",{children:[A.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.appearance")}),A.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:A.jsx("div",{className:"p-4",children:A.jsxs("div",{children:[A.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:n("settings.theme")}),A.jsxs("div",{className:"flex flex-col space-y-2",children:[A.jsxs("label",{className:"flex items-center",children:[A.jsx("input",{type:"radio",name:"theme",value:"system",checked:t==="system",onChange:()=>E("system"),className:"mr-2"}),A.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:n("settings.useDefault")})]}),A.jsxs("label",{className:"flex items-center",children:[A.jsx("input",{type:"radio",name:"theme",value:"light",checked:t==="light",onChange:()=>E("light"),className:"mr-2"}),A.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:n("settings.light")})]}),A.jsxs("label",{className:"flex items-center",children:[A.jsx("input",{type:"radio",name:"theme",value:"dark",checked:t==="dark",onChange:()=>E("dark"),className:"mr-2"}),A.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:n("settings.dark")})]})]})]})})})]}),!1,A.jsxs("div",{className:"text-center text-gray-400 dark:text-gray-600",children:[n("settings.versionPrefix"),Pa.VERSION," (",d(),")"]})]})},nk=({routes:n,isLoading:t,message:r,headerButtons:i})=>{const o=ar(),u=n.find(h=>{const y=h.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${y}$`).test(o.pathname)}),c=(u==null?void 0:u.layout)??"default",d=t&&A.jsx("div",{className:"fixed inset-0 bg-white dark:bg-gray-900 z-50 flex items-center justify-center",children:A.jsx(Kn,{})}),m=A.jsx(jy,{children:n.map(h=>A.jsx(Gf,{path:h.path,element:h.element},h.path))});switch(c){case"passkey":return A.jsxs(NN,{children:[d,r&&A.jsx("p",{className:"text-red-500 mb-4",children:r}),m]});case"default":default:return A.jsxs(A.Fragment,{children:[d,A.jsx(IN,{routes:n,headerButtons:i,message:r,children:m})]})}},ik=()=>{const{t:n}=gt(),t=yn(),{isInitialLoading:r}=fa(),[i,o]=Ic(!0,150),[u,c]=D.useState(null),{headerButtons:d}=En(),m=Cr.useMemo(()=>[{path:"/",element:A.jsx(PT,{}),showBackButton:!1},{path:"/reinitialize",element:A.jsx(qT,{}),showBackButton:!1},{path:"/login",element:A.jsx(B1,{}),showBackButton:!1},{path:"/unlock",element:A.jsx(D1,{}),showBackButton:!1},{path:"/unlock-success",element:A.jsx(L1,{}),showBackButton:!1},{path:"/upgrade",element:A.jsx(R1,{}),showBackButton:!1},{path:"/auth-settings",element:A.jsx(m1,{}),showBackButton:!0,title:n("settings.title")},{path:"/credentials",element:A.jsx(jT,{}),showBackButton:!1},{path:"/credentials/add",element:A.jsx(Yp,{}),showBackButton:!0,title:n("credentials.addCredential")},{path:"/credentials/:id",element:A.jsx(UT,{}),showBackButton:!0,title:n("credentials.credentialDetails")},{path:"/credentials/:id/edit",element:A.jsx(Yp,{}),showBackButton:!0,title:n("credentials.editCredential")},{path:"/passkeys/create",element:A.jsx(GT,{}),layout:"passkey"},{path:"/passkeys/authenticate",element:A.jsx(VT,{}),layout:"passkey"},{path:"/emails",element:A.jsx(FT,{}),showBackButton:!1},{path:"/emails/:id",element:A.jsx(QT,{}),showBackButton:!0,title:n("emails.title")},{path:"/settings",element:A.jsx(rk,{}),showBackButton:!1},{path:"/settings/autofill",element:A.jsx(YT,{}),showBackButton:!0,title:n("settings.autofillSettings")},{path:"/settings/context-menu",element:A.jsx($T,{}),showBackButton:!0,title:n("settings.contextMenuSettings")},{path:"/settings/clipboard",element:A.jsx(JT,{}),showBackButton:!0,title:n("settings.clipboardSettings")},{path:"/settings/language",element:A.jsx(ZT,{}),showBackButton:!0,title:n("settings.language")},{path:"/settings/auto-lock",element:A.jsx(XT,{}),showBackButton:!0,title:n("settings.autoLockTimeout")},{path:"/settings/passkeys",element:A.jsx(ek,{}),showBackButton:!0,title:n("settings.passkeySettings")}],[n]);return D.useEffect(()=>{r||o(!1)},[r,o]),D.useEffect(()=>{Lt("POPUP_HEARTBEAT",{},"background").catch(()=>{});const h=setInterval(()=>{Lt("POPUP_HEARTBEAT",{},"background").catch(()=>{})},5e3);return()=>{clearInterval(h)}},[]),D.useEffect(()=>{window.location.hash&&window.location.hash!=="#/"&&window.location.hash!=="#"||zT()},[]),D.useEffect(()=>{t.globalMessage?c(t.globalMessage):c(null)},[t,t.globalMessage]),A.jsx(cC,{children:A.jsx(RN,{children:A.jsx(nk,{routes:m,isLoading:i,message:u,headerButtons:d})})})},ct=n=>typeof n=="string",cl=()=>{let n,t;const r=new Promise((i,o)=>{n=i,t=o});return r.resolve=n,r.reject=t,r},oy=n=>n==null?"":""+n,sk=(n,t,r)=>{n.forEach(i=>{t[i]&&(r[i]=t[i])})},ok=/###/g,ly=n=>n&&n.indexOf("###")>-1?n.replace(ok,"."):n,uy=n=>!n||ct(n),pl=(n,t,r)=>{const i=ct(t)?t.split("."):t;let o=0;for(;o<i.length-1;){if(uy(n))return{};const u=ly(i[o]);!n[u]&&r&&(n[u]=new r),Object.prototype.hasOwnProperty.call(n,u)?n=n[u]:n={},++o}return uy(n)?{}:{obj:n,k:ly(i[o])}},cy=(n,t,r)=>{const{obj:i,k:o}=pl(n,t,Object);if(i!==void 0||t.length===1){i[o]=r;return}let u=t[t.length-1],c=t.slice(0,t.length-1),d=pl(n,c,Object);for(;d.obj===void 0&&c.length;)u=`${c[c.length-1]}.${u}`,c=c.slice(0,c.length-1),d=pl(n,c,Object),d!=null&&d.obj&&typeof d.obj[`${d.k}.${u}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${u}`]=r},lk=(n,t,r,i)=>{const{obj:o,k:u}=pl(n,t,Object);o[u]=o[u]||[],o[u].push(r)},hc=(n,t)=>{const{obj:r,k:i}=pl(n,t);if(r&&Object.prototype.hasOwnProperty.call(r,i))return r[i]},uk=(n,t,r)=>{const i=hc(n,r);return i!==void 0?i:hc(t,r)},YE=(n,t,r)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(i in n?ct(n[i])||n[i]instanceof String||ct(t[i])||t[i]instanceof String?r&&(n[i]=t[i]):YE(n[i],t[i],r):n[i]=t[i]);return n},Js=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ck={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const dk=n=>ct(n)?n.replace(/[&<>"'\/]/g,t=>ck[t]):n;class Ak{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 fk=[" ",",","?","!",";"],hk=new Ak(20),gk=(n,t,r)=>{t=t||"",r=r||"";const i=fk.filter(c=>t.indexOf(c)<0&&r.indexOf(c)<0);if(i.length===0)return!0;const o=hk.getRegExp(`(${i.map(c=>c==="?"?"\\?":c).join("|")})`);let u=!o.test(n);if(!u){const c=n.indexOf(r);c>0&&!o.test(n.substring(0,c))&&(u=!0)}return u},_f=(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 u=0;u<i.length;){if(!o||typeof o!="object")return;let c,d="";for(let m=u;m<i.length;++m)if(m!==u&&(d+=r),d+=i[m],c=o[d],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&m<i.length-1)continue;u+=m-u+1;break}o=c}return o},El=n=>n==null?void 0:n.replace("_","-"),mk={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 gc{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||mk,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:(ct(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new gc(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new gc(this.logger,t)}}var gn=new gc;class Nc{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,u])=>{for(let c=0;c<u;c++)o(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,u])=>{for(let c=0;c<u;c++)o.apply(o,[t,...r])})}}class dy extends Nc{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 u=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):ct(i)&&u?d.push(...i.split(u)):d.push(i)));const m=hc(this.data,d);return!m&&!r&&!i&&t.indexOf(".")>-1&&(t=d[0],r=d[1],i=d.slice(2).join(".")),m||!c||!ct(i)?m:_f((y=(h=this.data)==null?void 0:h[t])==null?void 0:y[r],i,u)}addResource(t,r,i,o,u={silent:!1}){const c=u.keySeparator!==void 0?u.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),cy(this.data,d,o),u.silent||this.emit("added",t,r,i,o)}addResources(t,r,i,o={silent:!1}){for(const u in i)(ct(i[u])||Array.isArray(i[u]))&&this.addResource(t,r,u,i[u],{silent:!0});o.silent||this.emit("added",t,r,i)}addResourceBundle(t,r,i,o,u,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 m=hc(this.data,d)||{};c.skipCopy||(i=JSON.parse(JSON.stringify(i))),o?YE(m,i,u):m={...m,...i},cy(this.data,d,m),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 WE={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,t,r,i,o){return n.forEach(u=>{var c;t=((c=this.processors[u])==null?void 0:c.process(t,r,i,o))??t}),t}};const Ay={},fy=n=>!ct(n)&&typeof n!="boolean"&&typeof n!="number";class mc extends Nc{constructor(t,r={}){super(),sk(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=gn.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 u=r.ns||this.options.defaultNS||[];const c=i&&t.indexOf(i)>-1,d=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!gk(t,i,o);if(c&&!d){const m=t.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:t,namespaces:ct(u)?[u]:u};const h=t.split(i);(i!==o||i===o&&this.options.ns.indexOf(h[0])>-1)&&(u=h.shift()),t=h.join(o)}return{key:t,namespaces:ct(u)?[u]:u}}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 u=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:d,namespaces:m}=this.extractFromKey(t[t.length-1],o),h=m[m.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?u?{res:`${h}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:E,usedNS:h,usedParams:this.getUsedParamsDetails(o)}:`${h}${y}${d}`:u?{res:d,usedKey:d,exactUsedKey:d,usedLng:E,usedNS:h,usedParams:this.getUsedParamsDetails(o)}:d;const x=this.resolve(t,o);let S=x==null?void 0:x.res;const N=(x==null?void 0:x.usedKey)||d,B=(x==null?void 0:x.exactUsedKey)||d,R=["[object Number]","[object Function]","[object RegExp]"],M=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,z=o.count!==void 0&&!ct(o.count),H=mc.hasDefaultValue(o),V=z?this.pluralResolver.getSuffix(E,o.count,o):"",ee=o.ordinal&&z?this.pluralResolver.getSuffix(E,o.count,{ordinal:!1}):"",q=z&&!o.ordinal&&o.count===0,J=q&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${V}`]||o[`defaultValue${ee}`]||o.defaultValue;let Z=S;O&&!S&&H&&(Z=J);const $=fy(Z),ge=Object.prototype.toString.apply(Z);if(O&&Z&&$&&R.indexOf(ge)<0&&!(ct(M)&&Array.isArray(Z))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const se=this.options.returnedObjectHandler?this.options.returnedObjectHandler(N,Z,{...o,ns:m}):`key '${d} (${this.language})' returned an object instead of string.`;return u?(x.res=se,x.usedParams=this.getUsedParamsDetails(o),x):se}if(c){const se=Array.isArray(Z),ce=se?[]:{},ne=se?B:N;for(const G in Z)if(Object.prototype.hasOwnProperty.call(Z,G)){const oe=`${ne}${c}${G}`;H&&!S?ce[G]=this.translate(oe,{...o,defaultValue:fy(J)?J[G]:void 0,joinArrays:!1,ns:m}):ce[G]=this.translate(oe,{...o,joinArrays:!1,ns:m}),ce[G]===oe&&(ce[G]=Z[G])}S=ce}}else if(O&&ct(M)&&Array.isArray(S))S=S.join(M),S&&(S=this.extendTranslation(S,t,o,i));else{let se=!1,ce=!1;!this.isValidLookup(S)&&H&&(se=!0,S=J),this.isValidLookup(S)||(ce=!0,S=d);const G=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ce?void 0:S,oe=H&&J!==S&&this.options.updateMissing;if(ce||se||oe){if(this.logger.log(oe?"updateKey":"missingKey",E,h,d,oe?J:S),c){const te=this.resolve(d,{...o,keySeparator:!1});te&&te.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 Ae=[];const xe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&xe&&xe[0])for(let te=0;te<xe.length;te++)Ae.push(xe[te]);else this.options.saveMissingTo==="all"?Ae=this.languageUtils.toResolveHierarchy(o.lng||this.language):Ae.push(o.lng||this.language);const P=(te,pe,Ce)=>{var Ge;const Me=H&&Ce!==S?Ce:G;this.options.missingKeyHandler?this.options.missingKeyHandler(te,h,pe,Me,oe,o):(Ge=this.backendConnector)!=null&&Ge.saveMissing&&this.backendConnector.saveMissing(te,h,pe,Me,oe,o),this.emit("missingKey",te,h,pe,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&z?Ae.forEach(te=>{const pe=this.pluralResolver.getSuffixes(te,o);q&&o[`defaultValue${this.options.pluralSeparator}zero`]&&pe.indexOf(`${this.options.pluralSeparator}zero`)<0&&pe.push(`${this.options.pluralSeparator}zero`),pe.forEach(Ce=>{P([te],d+Ce,o[`defaultValue${Ce}`]||J)})}):P(Ae,d,J))}S=this.extendTranslation(S,t,o,x,i),ce&&S===d&&this.options.appendNamespaceToMissingKey&&(S=`${h}${y}${d}`),(ce||se)&&this.options.parseMissingKeyHandler&&(S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${y}${d}`:d,se?S:void 0,o))}return u?(x.res=S,x.usedParams=this.getUsedParamsDetails(o),x):S}extendTranslation(t,r,i,o,u){var m,h;if((m=this.i18nFormat)!=null&&m.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=ct(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&&!ct(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),S=x&&x.length;E<S&&(i.nest=!1)}!i.lng&&o&&o.res&&(i.lng=this.language||o.usedLng),i.nest!==!1&&(t=this.interpolator.nest(t,(...x)=>(u==null?void 0:u[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=ct(c)?[c]:c;return t!=null&&(d!=null&&d.length)&&i.applyPostProcessor!==!1&&(t=WE.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,u,c,d;return ct(t)&&(t=[t]),t.forEach(m=>{if(this.isValidLookup(i))return;const h=this.extractFromKey(m,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&&!ct(r.count),x=C&&!r.ordinal&&r.count===0,S=r.context!==void 0&&(ct(r.context)||typeof r.context=="number")&&r.context!=="",N=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);E.forEach(B=>{var R,M;this.isValidLookup(i)||(d=B,!Ay[`${N[0]}-${B}`]&&((R=this.utils)!=null&&R.hasLoadedNamespace)&&!((M=this.utils)!=null&&M.hasLoadedNamespace(d))&&(Ay[`${N[0]}-${B}`]=!0,this.logger.warn(`key "${o}" for languages "${N.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!!!")),N.forEach(O=>{var V;if(this.isValidLookup(i))return;c=O;const z=[y];if((V=this.i18nFormat)!=null&&V.addLookupKeys)this.i18nFormat.addLookupKeys(z,y,O,B,r);else{let ee;C&&(ee=this.pluralResolver.getSuffix(O,r.count,r));const q=`${this.options.pluralSeparator}zero`,J=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(C&&(z.push(y+ee),r.ordinal&&ee.indexOf(J)===0&&z.push(y+ee.replace(J,this.options.pluralSeparator)),x&&z.push(y+q)),S){const Z=`${y}${this.options.contextSeparator}${r.context}`;z.push(Z),C&&(z.push(Z+ee),r.ordinal&&ee.indexOf(J)===0&&z.push(Z+ee.replace(J,this.options.pluralSeparator)),x&&z.push(Z+q))}}let H;for(;H=z.pop();)this.isValidLookup(i)||(u=H,i=this.getResource(O,B,H,r))}))})}),{res:i,usedKey:o,exactUsedKey:u,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 u;return(u=this.i18nFormat)!=null&&u.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&&!ct(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 u of r)delete o[u]}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 hy{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=gn.create("languageUtils")}getScriptPartFromCode(t){if(t=El(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=El(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(ct(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 u=this.getLanguagePartFromCode(i);if(this.isSupportedCode(u))return r=u;r=this.options.supportedLngs.find(c=>{if(c===u)return c;if(!(c.indexOf("-")<0&&u.indexOf("-")<0)&&(c.indexOf("-")>0&&u.indexOf("-")<0&&c.substring(0,c.indexOf("-"))===u||c.indexOf(u)===0&&u.length>1))return c})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),ct(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=[],u=c=>{c&&(this.isSupportedCode(c)?o.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return ct(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(t))):ct(t)&&u(this.formatLanguageCode(t)),i.forEach(c=>{o.indexOf(c)<0&&u(this.formatLanguageCode(c))}),o}}const gy={zero:0,one:1,two:2,few:3,many:4,other:5},my={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class pk{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=gn.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const i=El(t==="dev"?"en":t),o=r.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:i,type:o});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];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!"),my;if(!t.match(/-|_/))return my;const m=this.languageUtils.getLanguagePartFromCode(t);c=this.getRule(m,r)}return this.pluralRulesCache[u]=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,u)=>gy[o]-gy[u]).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 py=(n,t,r,i=".",o=!0)=>{let u=uk(n,t,r);return!u&&o&&ct(r)&&(u=_f(n,r,i),u===void 0&&(u=_f(t,r,i))),u},Ef=n=>n.replace(/\$/g,"$$$$");class yk{constructor(t={}){var r;this.logger=gn.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:u,prefixEscaped:c,suffix:d,suffixEscaped:m,formatSeparator:h,unescapeSuffix:y,unescapePrefix:E,nestingPrefix:C,nestingPrefixEscaped:x,nestingSuffix:S,nestingSuffixEscaped:N,nestingOptionsSeparator:B,maxReplaces:R,alwaysFormat:M}=t.interpolation;this.escape=r!==void 0?r:dk,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=u?Js(u):c||"{{",this.suffix=d?Js(d):m||"}}",this.formatSeparator=h||",",this.unescapePrefix=y?"":E||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=C?Js(C):x||Js("$t("),this.nestingSuffix=S?Js(S):N||Js(")"),this.nestingOptionsSeparator=B||",",this.maxReplaces=R||1e3,this.alwaysFormat=M!==void 0?M:!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 u,c,d;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=S=>{if(S.indexOf(this.formatSeparator)<0){const M=py(r,m,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(M,void 0,i,{...o,...r,interpolationkey:S}):M}const N=S.split(this.formatSeparator),B=N.shift().trim(),R=N.join(this.formatSeparator).trim();return this.format(py(r,m,B,this.options.keySeparator,this.options.ignoreJSONStructure),R,i,{...o,...r,interpolationkey:B})};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:S=>Ef(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?Ef(this.escape(S)):Ef(S)}].forEach(S=>{for(d=0;u=S.regex.exec(t);){const N=u[1].trim();if(c=h(N),c===void 0)if(typeof y=="function"){const R=y(t,u,o);c=ct(R)?R:""}else if(o&&Object.prototype.hasOwnProperty.call(o,N))c="";else if(E){c=u[0];continue}else this.logger.warn(`missed to pass in variable ${N} for interpolating ${t}`),c="";else!ct(c)&&!this.useRawValueToEscape&&(c=oy(c));const B=S.safeValue(c);if(t=t.replace(u[0],B),E?(S.regex.lastIndex+=c.length,S.regex.lastIndex-=u[0].length):S.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),t}nest(t,r,i={}){let o,u,c;const d=(m,h)=>{const y=this.nestingOptionsSeparator;if(m.indexOf(y)<0)return m;const E=m.split(new RegExp(`${y}[ ]*{`));let C=`{${E[1]}`;m=E[0],C=this.interpolate(C,c);const x=C.match(/'/g),S=C.match(/"/g);(((x==null?void 0:x.length)??0)%2===0&&!S||S.length%2!==0)&&(C=C.replace(/'/g,'"'));try{c=JSON.parse(C),h&&(c={...h,...c})}catch(N){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,N),`${m}${y}${C}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,m};for(;o=this.nestingRegexp.exec(t);){let m=[];c={...i},c=c.replace&&!ct(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&&(m=o[1].slice(h).split(this.formatSeparator).map(y=>y.trim()).filter(Boolean),o[1]=o[1].slice(0,h)),u=r(d.call(this,o[1].trim(),c),c),u&&o[0]===t&&!ct(u))return u;ct(u)||(u=oy(u)),u||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),u=""),m.length&&(u=m.reduce((y,E)=>this.format(y,E,i.lng,{...i,interpolationkey:o[1].trim()}),u.trim())),t=t.replace(o[0],u),this.regexp.lastIndex=0}return t}}const Ek=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,...m]=c.split(":"),h=m.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}},yy=n=>{const t={};return(r,i,o)=>{let u=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(u={...u,[o.interpolationkey]:void 0});const c=i+JSON.stringify(u);let d=t[c];return d||(d=n(El(i),o),t[c]=d),d(r)}},bk=n=>(t,r,i)=>n(El(r),i)(t);class wk{constructor(t={}){this.logger=gn.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const i=r.cacheInBuiltFormats?yy:bk;this.formats={number:i((o,u)=>{const c=new Intl.NumberFormat(o,{...u});return d=>c.format(d)}),currency:i((o,u)=>{const c=new Intl.NumberFormat(o,{...u,style:"currency"});return d=>c.format(d)}),datetime:i((o,u)=>{const c=new Intl.DateTimeFormat(o,{...u});return d=>c.format(d)}),relativetime:i((o,u)=>{const c=new Intl.RelativeTimeFormat(o,{...u});return d=>c.format(d,u.range||"day")}),list:i((o,u)=>{const c=new Intl.ListFormat(o,{...u});return d=>c.format(d)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=yy(r)}format(t,r,i,o={}){const u=r.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(d=>d.indexOf(")")>-1)){const d=u.findIndex(m=>m.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,d)].join(this.formatSeparator)}return u.reduce((d,m)=>{var E;const{formatName:h,formatOptions:y}=Ek(m);if(this.formats[h]){let C=d;try{const x=((E=o==null?void 0:o.formatParams)==null?void 0:E[o.interpolationkey])||{},S=x.locale||x.lng||o.locale||o.lng||i;C=this.formats[h](d,S,{...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 vk=(n,t)=>{n.pending[t]!==void 0&&(delete n.pending[t],n.pendingCount--)};class Ck extends Nc{constructor(t,r,i,o={}){var u,c;super(),this.backend=t,this.store=r,this.services=i,this.languageUtils=i.languageUtils,this.options=o,this.logger=gn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(c=(u=this.backend)==null?void 0:u.init)==null||c.call(u,i,o.backend,o)}queueLoad(t,r,i,o){const u={},c={},d={},m={};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),u[C]===void 0&&(u[C]=!0),m[E]===void 0&&(m[E]=!0)))}),y||(d[h]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(m)}}loaded(t,r,i){const o=t.split("|"),u=o[0],c=o[1];r&&this.emit("failedLoading",u,c,r),!r&&i&&this.store.addResourceBundle(u,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(m=>{lk(m.loaded,[u],c),vk(m,t),r&&m.errors.push(r),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(h=>{d[h]||(d[h]={});const y=m.loaded[h];y.length&&y.forEach(E=>{d[h][E]===void 0&&(d[h][E]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(m=>!m.done)}read(t,r,i,o=0,u=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:u,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,u*2,c)},u);return}c(h,y)},m=this.backend[i].bind(this.backend);if(m.length===2){try{const h=m(t,r);h&&typeof h.then=="function"?h.then(y=>d(null,y)).catch(d):d(null,h)}catch(h){d(h)}return}return m(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();ct(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ct(r)&&(r=[r]);const u=this.queueLoad(t,r,i,o);if(!u.toLoad.length)return u.pending.length||o(),null;u.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],u=i[1];this.read(o,u,"read",void 0,void 0,(c,d)=>{c&&this.logger.warn(`${r}loading namespace ${u} for language ${o} failed`,c),!c&&d&&this.logger.log(`${r}loaded namespace ${u} for language ${o}`,d),this.loaded(t,c,d)})}saveMissing(t,r,i,o,u,c={},d=()=>{}){var m,h,y,E,C;if((h=(m=this.services)==null?void 0:m.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:u},S=this.backend.create.bind(this.backend);if(S.length<6)try{let N;S.length===5?N=S(t,r,i,o,x):N=S(t,r,i,o),N&&typeof N.then=="function"?N.then(B=>d(null,B)).catch(d):d(null,N)}catch(N){d(N)}else S(t,r,i,o,d,x)}!t||!t[0]||this.store.addResource(t[0],r,i,o)}}}const Ey=()=>({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]),ct(n[1])&&(t.defaultValue=n[1]),ct(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}),by=n=>{var t,r;return ct(n.ns)&&(n.ns=[n.ns]),ct(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),ct(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},Fu=()=>{},xk=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(r=>{typeof n[r]=="function"&&(n[r]=n[r].bind(n))})};class bl extends Nc{constructor(t={},r){if(super(),this.options=by(t),this.services={},this.logger=gn,this.modules={external:[]},xk(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&&(ct(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=Ey();this.options={...i,...this.options,...by(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?gn.init(o(this.modules.logger),this.options):gn.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=wk;const y=new hy(this.options);this.store=new dy(this.options.resources,this.options);const E=this.services;E.logger=gn,E.resourceStore=this.store,E.languageUtils=y,E.pluralResolver=new pk(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 yk(this.options),E.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},E.backendConnector=new Ck(o(this.modules.backend),E.resourceStore,E,this.options),E.backendConnector.on("*",(x,...S)=>{this.emit(x,...S)}),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 mc(this.services,this.options),this.translator.on("*",(x,...S)=>{this.emit(x,...S)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Fu),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=cl(),m=()=>{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?m():setTimeout(m,0),d}loadResources(t,r=Fu){var u,c;let i=r;const o=ct(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=[],m=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(E=>{E!=="cimode"&&d.indexOf(E)<0&&d.push(E)})};o?m(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>m(y)),(c=(u=this.options.preload)==null?void 0:u.forEach)==null||c.call(u,h=>m(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=cl();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=Fu),this.services.backendConnector.reload(t,r,u=>{o.resolve(),i(u)}),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"&&WE.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=cl();this.emit("languageChanging",t);const o=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},u=(d,m)=>{m?this.isLanguageChangingTo===t&&(o(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):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 m=ct(d)?d:d&&d[0],h=this.store.hasLanguageSomeTranslations(m)?m:this.services.languageUtils.getBestMatchFromCodes(ct(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=>{u(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=(u,c,...d)=>{let m;typeof c!="object"?m=this.options.overloadTranslationOptionHandler([u,c].concat(d)):m={...c},m.lng=m.lng||o.lng,m.lngs=m.lngs||o.lngs,m.ns=m.ns||o.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||i||o.keyPrefix);const h=this.options.keySeparator||".";let y;return m.keyPrefix&&Array.isArray(u)?y=u.map(E=>`${m.keyPrefix}${h}${E}`):y=m.keyPrefix?`${m.keyPrefix}${h}${u}`:u,this.t(y,m)};return ct(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,u=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const c=(d,m)=>{const h=this.services.backendConnector.state[`${d}|${m}`];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(u,t)))}loadNamespaces(t,r){const i=cl();return this.options.ns?(ct(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=cl();ct(t)&&(t=[t]);const o=this.options.preload||[],u=t.filter(c=>o.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return u.length?(this.options.preload=o.concat(u),this.loadResources(c=>{i.resolve(),r&&r(c)}),i):(r&&r(),Promise.resolve())}dir(t){var o,u;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=((u=this.services)==null?void 0:u.languageUtils)||new hy(Ey());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 bl(t,r)}cloneInstance(t={},r=Fu){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},u=new bl(o);if((t.debug!==void 0||t.prefix!==void 0)&&(u.logger=u.logger.clone(t)),["store","services","language"].forEach(d=>{u[d]=this[d]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},i){const d=Object.keys(this.store.data).reduce((m,h)=>(m[h]={...this.store.data[h]},m[h]=Object.keys(m[h]).reduce((y,E)=>(y[E]={...m[h][E]},y),m[h]),m),{});u.store=new dy(d,o),u.services.resourceStore=u.store}return u.translator=new mc(u.services,o),u.translator.on("*",(d,...m)=>{u.emit(d,...m)}),u.init(o,r),u.translator.options=o,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Sa=bl.createInstance();Sa.createInstance=bl.createInstance;Sa.createInstance;Sa.dir;Sa.init;Sa.loadResources;Sa.reloadResources;Sa.use;Sa.changeLanguage;Sa.getFixedT;Sa.t;Sa.exists;Sa.setDefaultNamespace;Sa.hasLoadedNamespace;Sa.loadNamespaces;Sa.loadLanguages;const Ik=async()=>{const n=await Ve.getItem("local:language");if(n&&ec.includes(n))return n;const t=navigator.language.split("-")[0];return ec.includes(t)?t:fn},Nk=async()=>{const n=await Ik();await Sa.use(Gw).init({resources:dl,lng:n,fallbackLng:fn,debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1,bindI18n:"languageChanged loaded",bindI18nStore:""}})};Nk().catch(n=>{console.error("Failed to initialize i18n:",n),Sa.emit("initialized")});const wy=()=>{Rw.createRoot(document.getElementById("root")).render(A.jsx(yN,{children:A.jsx(vN,{children:A.jsx(EN,{children:A.jsx(CN,{children:A.jsx(kN,{children:A.jsx(SN,{children:A.jsx(tk,{children:A.jsx(ik,{})})})})})})})}))};Sa.isInitialized?wy():Sa.on("initialized",wy);
