1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/android-sync-identity-C0F3-ylh.js","assets/dist-Cgg5UYwv.js","assets/chunk-CilyBKbf.js","assets/x25519-Db67hy0X.js"])))=>i.map(i=>d[i]);2import{a as e,t}from"./dist-Cgg5UYwv.js";import{t as n}from"./preload-helper-D4M6sveU.js";import{A as r,B as i,F as a,G as o,H as s,I as c,J as l,K as u,L as d,M as f,N as p,Q as m,R as h,U as g,V as _,W as v,Y as y,Z as b,a as x,et as S,i as C,k as w,n as T,q as E,r as ee,t as D,z as O}from"./index-C3AHYAm6.js";var te=g(`<span class=peach-pro-mark aria-label="Pro feature">✦`),ne=g(`<button class=peach-settings-cat-row><div class=peach-settings-cat-icon></div><div class=peach-settings-cat-content><span class=peach-settings-cat-name></span><span class=peach-settings-cat-desc></span></div><svg class=peach-settings-cat-chevron width=6 height=10 viewBox="0 0 6 10"fill=none stroke=currentColor stroke-width=1.1 stroke-linecap=round stroke-linejoin=round><path d="M1 1l4 4-4 4">`),re=g(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><path d="M8 2L3 4.5V8c0 3 2.5 5 5 6 2.5-1 5-3 5-6V4.5L8 2z">`),ie=g(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><path d="M4 10a3 3 0 100-6 3 3 0 000 6zm3-3h6m-2-2v4">`),ae=g(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><rect x=3 y=7 width=10 height=7 rx=1.5></rect><path d="M6 7V5a3 3 0 016 0v2">`),oe=g(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><path d="M4 8a4 4 0 014-4m4 4a4 4 0 01-4 4"></path><path d="M14 6l-2 2-2-2"></path><path d="M2 10l2-2 2 2">`),se=g(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><circle cx=8 cy=8 r=3></circle><path d="M8 2v1m0 10v1M2 8h1m10 0h1m-2.1-4.1-.7.7M4.8 11.3l-.7.7m0-7.7.7.7m6.5 6.3-.7.7">`),ce=g(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><rect x=2 y=5 width=5 height=4 rx=1></rect><rect x=9 y=7 width=5 height=4 rx=1></rect><path d="M7 7h2m-2 2h2">`),le=g(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><path d="M3 4h10a1 1 0 011 1v6a1 1 0 01-1 1H5l-3 2V5a1 1 0 011-1z">`),ue=g(`<p class=peach-settings-nav-label>MOBILE`),de=g(`<div class=peach-settings-body><p class=peach-settings-nav-label>PROTECTION</p><p class=peach-settings-nav-label>VAULT</p><p class=peach-settings-nav-label>PREFERENCES</p><p class=peach-settings-nav-label>SUPPORT</p><div class=peach-settings-footer><span>Peach </span><span class=peach-divider></span><span>Browser extension`),fe=g(`<div class="peach-settings-row peach-settings-row--meta"><span>Last check</span><span class=peach-settings-value>`),pe=g(`<p class="peach-hint peach-hint-error"style=margin:0>`),me=g(`<p class=peach-hint style=margin:0;color:var(--peach-accent)>password changed ✓`),he=g(`<div class=peach-settings-stack style="padding:4px 0 2px;gap:6px"><input class=peach-settings-input type=password placeholder="current password"autocomplete=current-password><input class=peach-settings-input type=password placeholder="new password (min 12 chars)"autocomplete=new-password><input class=peach-settings-input type=password placeholder="confirm new password"autocomplete=new-password><button class="peach-btn peach-btn--accent peach-btn--sm"style=align-self:flex-start>`),ge=g(`<div class="peach-settings-row peach-settings-row--meta"><span class=peach-settings-value style=font-size:11px;line-height:1.5;color:var(--peach-t2)>If someone forces you to unlock Peach, enter the duress password instead. A decoy empty vault opens; your real vault stays hidden.`),_e=g(`<div class="peach-settings-row peach-settings-row--meta"><span class=peach-settings-value style=color:var(--peach-sync-ok)>`),ve=g(`<div class="peach-settings-row peach-settings-row--meta"><button class="peach-btn peach-btn--subtle peach-btn--sm">`),ye=g(`<label class=peach-label>new duress password`),be=g(`<input class=peach-settings-input type=password placeholder="duress password (min 8 chars)"autocomplete=new-password>`),xe=g(`<label class=peach-label>confirm duress password`),Se=g(`<input class=peach-settings-input type=password placeholder="confirm duress password"autocomplete=new-password>`),Ce=g(`<p class="peach-hint peach-hint-error">`),we=g(`<button class="peach-btn peach-btn--ghost peach-btn--sm"style=color:var(--peach-breach)>`),Te=g(`<button class="peach-btn peach-btn--accent peach-btn--sm">`),Ee=g(`<div class=peach-duress-form><label class=peach-label>main password (to confirm)</label><input class=peach-settings-input type=password placeholder="your current master password"autocomplete=current-password><div class=peach-duress-actions><button class="peach-btn peach-btn--subtle peach-btn--sm">cancel`),De=g(`<div class="peach-settings-row peach-settings-row--meta"><span class=peach-settings-value style=color:#e7b36b>`),Oe=g(`<div class=peach-settings-body><div class=peach-settings-group><p class=peach-settings-sub-label>LOCKING</p><div class=peach-settings-row><span>Lock on close</span><button aria-label="Toggle lock on close"><span class=peach-toggle-knob></span></button></div><div class=peach-settings-row><span>Auto-lock after</span><select class=peach-settings-select><option value=1>1 minute</option><option value=5>5 minutes</option><option value=15>15 minutes</option><option value=30>30 minutes</option><option value=0>Never</option></select></div><p class=peach-settings-sub-label>BREACH PROTECTION</p><div class=peach-settings-row><span>Breach monitoring</span><button aria-label="Toggle breach monitoring"><span class=peach-toggle-knob></span></button></div><div class="peach-settings-row peach-settings-row--meta"><span>Check all passwords</span><button class="peach-btn peach-btn--subtle peach-btn--sm"></button></div><p class=peach-settings-sub-label>MASTER PASSWORD</p><div class="peach-settings-row peach-settings-row--meta"><span>Master password</span><button class="peach-btn peach-btn--subtle peach-btn--sm"></button></div><p class=peach-settings-sub-label>DURESS PASSWORD</p><div class="peach-settings-row peach-settings-row--top"><div class=peach-settings-row-main><span>Duress password</span><span class=peach-settings-value style=font-size:11px;line-height:1.5;color:var(--t2)>If entered under coercion, shows a decoy empty vault instead of your real one.</span></div><div></div></div><p class=peach-settings-sub-label>CANARY ENTRIES</p><div class="peach-settings-row peach-settings-row--top"><div class=peach-settings-row-main><span>Canary entries</span><span class=peach-settings-value style=font-size:11px;line-height:1.5;color:var(--peach-t2)>Silently pings a webhook when an entry is accessed. Configure canary on any entry in your vault.</span></div><span class=peach-settings-value style=flex-shrink:0></span></div><p class=peach-settings-sub-label>PASSKEYS</p><div class="peach-settings-row peach-settings-row--top"><div class=peach-settings-row-main><span>Intercept passkey requests</span><span class=peach-settings-value style=font-size:11px;line-height:1.5;color:var(--t2)>Peach can handle passkey sign-in and creation on supported Chromium browsers.</span></div><button aria-label="Toggle passkey interception"><span class=peach-toggle-knob></span></button></div><div class="peach-settings-row peach-settings-row--meta"><span>Status</span><span class=peach-settings-value></span></div><div class="peach-settings-row peach-settings-row--meta"><span>Browser</span><span class=peach-settings-value></span></div><div class=peach-info-notice style=margin-top:8px>Only one passkey provider can be active at a time. Disable Bitwarden or 1Password passkey interception if Peach reports a conflict.`),ke=g(`<div class="peach-settings-row peach-settings-row--meta"><span style=overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0></span><button class="peach-btn peach-btn--subtle peach-btn--sm"style=flex-shrink:0>`),Ae=g(`<span class=peach-settings-value style=color:var(--peach-sync-ok)>`),je=g(`<div class="peach-settings-row peach-settings-row--meta"style=flex-direction:column;align-items:stretch;gap:6px><div class=peach-restore-warning> duplicate <!> found. The newest copy of each will be kept; older duplicates will be moved to trash.</div><div style=display:flex;gap:6px><button class="peach-btn peach-btn--subtle peach-btn--sm">cancel</button><button class="peach-btn peach-btn--accent peach-btn--sm">`),Me=g(`<div class="peach-settings-row peach-settings-row--meta"><span> card<!> set to never save</span><button class="peach-btn peach-btn--subtle peach-btn--sm">Clear`),Ne=g(`<p class=peach-settings-hint>Loading…`),Pe=g(`<p class=peach-settings-hint>No snapshots yet. Peach saves automatically before every change — saves, syncs, and imports.`),Fe=g(`<p class=peach-settings-hint>Restoring locks your vault. Unlock with the password that encrypted that snapshot to confirm.`),Ie=g(`<div class=peach-history-list>`),Le=g(`<p class=peach-history-footer> of 10 snapshots`),Re=g(`<div class=peach-danger-card><div class=peach-danger-card-head><span class=peach-danger-card-glyph aria-hidden=true>⟳</span><h3 class=peach-danger-card-title>Replace vault from backup</h3></div><p class=peach-danger-card-copy>Wipes the current vault and restores from a backup file. Recoverable only if your backup is good.</p><button class=peach-danger-card-button>Choose backup file`),ze=g(`<div class="peach-danger-card peach-danger-card--hazard"><div class=peach-danger-card-head><span class=peach-danger-card-glyph aria-hidden=true>⚠</span><h3 class=peach-danger-card-title>Destroy vault</h3></div><p class=peach-danger-card-copy>Permanently wipes every entry, setting, and license on this device. There is no recovery.</p><button class=peach-danger-card-button>Begin destruction`),Be=g(`<div class=peach-settings-body><div class=peach-settings-group><p class=peach-settings-sub-label>ENTRIES</p><div class="peach-settings-row peach-settings-row--meta"><span>Entries</span><span class=peach-settings-value></span></div><div class="peach-settings-row peach-settings-row--meta"><span>Duplicates</span></div><p class=peach-settings-sub-label>MAINTENANCE</p><div class="peach-settings-row peach-settings-row--meta"><span>Trash auto-delete</span><select class=peach-settings-select><option value=7>7 days</option><option value=30>30 days</option><option value=90>90 days</option><option value=0>Never</option></select></div><div class="peach-settings-row peach-settings-row--meta"><span>Vault Health</span><button class="peach-btn peach-btn--subtle peach-btn--sm">open</button></div><p class=peach-settings-sub-label>DATA</p><div class="peach-settings-row peach-settings-row--meta"><span>Import passwords</span><button class="peach-btn peach-btn--subtle peach-btn--sm">open</button></div><div class="peach-settings-row peach-settings-row--meta"><span>Export backup</span><button class="peach-btn peach-btn--subtle peach-btn--sm">open</button></div><p class=peach-settings-sub-label>VAULT HISTORY</p><button class=peach-settings-advanced-toggle><span class=peach-settings-sub-label style=margin:0>ADVANCED</span><span class=peach-settings-advanced-chevron>`),Ve=g(`<button class="peach-btn peach-btn--subtle peach-btn--sm">`),He=g(`<div class=peach-history-row><div class=peach-history-meta><span class=peach-history-time></span><span class=peach-history-sub></span></div><button>`),Ue=g(`<div class=peach-settings-body><div class=peach-pro-upgrade><div class=peach-pro-upgrade-hero><h2 class=peach-pro-upgrade-title>Peach Sync</h2><p class=peach-pro-upgrade-tagline>Encrypted · peer-to-peer · local</p></div><div class=peach-pro-features><div class=peach-pro-feature><span class=peach-pro-feature-mark>✦</span><div class=peach-pro-feature-text><span class=peach-pro-feature-name>Always in sync</span><span class=peach-pro-feature-desc>Your vault stays current across all your devices automatically</span></div></div><div class=peach-pro-feature><span class=peach-pro-feature-mark>✦</span><div class=peach-pro-feature-text><span class=peach-pro-feature-name>No cloud. No relay.</span><span class=peach-pro-feature-desc>Direct device-to-device on your local network — nothing leaves your hands</span></div></div><div class=peach-pro-feature><span class=peach-pro-feature-mark>✦</span><div class=peach-pro-feature-text><span class=peach-pro-feature-name>Tailscale supported</span><span class=peach-pro-feature-desc>Sync securely from anywhere over your private Tailscale network</span></div></div><div class=peach-pro-feature><span class=peach-pro-feature-mark>✦</span><div class=peach-pro-feature-text><span class=peach-pro-feature-name>Zero friction after setup</span><span class=peach-pro-feature-desc>Mark a network as trusted once — sync happens in the background</span></div></div></div><button class="peach-btn peach-btn--accent peach-pro-upgrade-cta">Upgrade to Pro</button><button class=peach-pro-key-link>Already have a key? Enter it →`),We=g(`<p class=peach-settings-hint>No paired devices yet. Add a device to start syncing.`),Ge=g(`<div class=peach-sync-reset-confirm><p class=peach-sync-reset-confirm-headline>Reset sync identity?</p><p class=peach-sync-reset-confirm-body>This will unpair all devices. You will need to pair them again from scratch.</p><div class=peach-settings-actions--row><button class="peach-btn peach-btn--ghost peach-btn--sm">Cancel</button><button class="peach-btn peach-btn--danger peach-btn--sm">`),Ke=g(`<div class=peach-settings-body><div class=peach-settings-group><div class=peach-settings-row><span>Status</span><span class="peach-settings-value peach-settings-value--status"><span class=peach-sync-status-dot></span></span></div><div class="peach-settings-row peach-settings-row--meta"><span>Last sync</span><span class=peach-settings-value></span></div><div class="peach-settings-row peach-settings-row--meta"><button class="peach-btn peach-btn--subtle peach-btn--sm"></button></div><p class=peach-settings-hint>If you edit on multiple devices before syncing, the most recently changed device wins. Use Vault History above to recover older versions if needed.</p><div class="peach-settings-row peach-settings-row--meta peach-settings-row--stack"><span class=peach-sync-section-label>Paired devices (<!>)</span><div class=peach-settings-actions--row><button class="peach-btn peach-btn--subtle peach-btn--sm">Add a device</button></div></div><div class="peach-settings-row peach-settings-row--meta peach-settings-row--stack"><span class=peach-sync-section-label>Trusted networks (<!>)</span><div class=peach-settings-actions--row></div></div><div class="peach-settings-row peach-settings-row--meta peach-settings-row--stack"><span class=peach-sync-section-label>Advanced`),qe=g(`<div class=peach-history-row><div class=peach-history-meta><span class=peach-history-time></span><span class=peach-history-sub></span></div><button class="peach-btn peach-btn--subtle peach-btn--sm peach-history-btn">Remove`),Je=g(`<button class="peach-btn peach-btn--ghost peach-btn--sm peach-sync-remove-btn">Remove`),Ye=g(`<div class=peach-sync-device-row><span class=peach-sync-device-name>`),Xe=g(`<span class=peach-sync-device-meta>Always trusted`),Ze=g(`<div class=peach-sync-advanced-row><div class=peach-sync-advanced-info><span class=peach-sync-advanced-name>Reset sync identity</span><span class=peach-sync-device-meta>Generates a new keypair and unpairs every device.</span></div><button class="peach-btn peach-btn--ghost peach-btn--sm peach-sync-remove-btn">Reset`),Qe=g(`<div class=peach-settings-body><div class=peach-settings-group><p class=peach-settings-sub-label>THEME</p><div class="peach-settings-row peach-settings-row--meta"><span>Theme</span><button class="peach-btn peach-btn--subtle peach-btn--sm"></button></div><p class=peach-settings-sub-label>ACCENT</p><div class="peach-settings-row peach-settings-row--meta peach-settings-row--accent"><span>Accent</span><div class=peach-accent-picker></div></div><p class=peach-settings-sub-label>DISPLAY FONT</p><div class="peach-settings-row peach-settings-row--meta peach-settings-row--font"><span>Font</span><div class=peach-font-picker></div></div><p class=peach-settings-sub-label>TEXT SIZE</p><div class="peach-settings-row peach-settings-row--meta"><span>Size</span><div class=peach-pill-group></div></div><p class=peach-settings-sub-label>MOTION</p><div class="peach-settings-row peach-settings-row--meta"><span>Reduce motion</span><button class="peach-btn peach-btn--subtle peach-btn--sm">`),$e=g(`<button class=peach-accent-swatch>`),et=g(`<button class=peach-font-swatch><span class=peach-font-swatch-glyph></span><span class=peach-font-swatch-name>`),tt=g(`<button class="peach-btn peach-btn--ghost peach-btn--sm">`),nt=g(`<div class=peach-shortcuts-conflict>`),rt=g(`<div class=peach-settings-body><div class="peach-settings-group peach-shortcuts-group"><p class=peach-settings-sub-label>ENTRY VIEW</p></div><div class="peach-settings-group peach-shortcuts-group"><p class=peach-settings-sub-label>ANYWHERE IN POPUP</p></div><div class=peach-settings-group style=display:flex;flex-direction:column;gap:8px><div class="peach-settings-row peach-settings-row--meta"><span>Inline autofill on page</span><a class=peach-settings-link href=chrome://extensions/shortcuts>⌘⇧P — customize ↗</a></div><button class="peach-btn peach-btn--subtle peach-btn--sm"style=align-self:flex-start>Reset all to defaults`),it=g(`<button class=peach-shortcut-reset title="Reset to default">↺`),at=g(`<div class=peach-shortcut-row><span class=peach-shortcut-row-label></span><button class=peach-shortcut-chip>`),ot=g(`<div class=peach-settings-license><span class=peach-settings-label>LICENSE KEY</span><div class=peach-settings-license-row><span class=peach-settings-license-key></span><button class=peach-settings-license-copy>`),st=g(`<div class=peach-pro-active><div class=peach-pro-active-hero><div class=peach-pro-active-mark-wrap></div><h2 class=peach-pro-active-title>Peach Pro</h2><p class=peach-pro-active-since></p></div><div class=peach-pro-active-features></div><button class=peach-pro-deactivate>`),ct=g(`<div class=peach-settings-body>`),lt=g(`<p class=peach-pro-key-error>That key doesn't look right.`),ut=g(`<div class=peach-pro-key-ceremony><p class=peach-pro-key-ceremony-label>Enter your license key</p><input class="peach-underline-input peach-pro-key-input"type=text placeholder=PPK-XXXX-XXXX-XXXX-XXXX-XXXX autocomplete=off><button class="peach-btn peach-btn--accent peach-pro-key-activate"></button><button class=peach-pro-key-cancel>cancel`),dt=g(`<div class=peach-pro-upgrade><div class=peach-pro-upgrade-hero><div class=peach-pro-upgrade-mark-wrap></div><h2 class=peach-pro-upgrade-title>Peach Pro</h2><p class=peach-pro-upgrade-tagline>Everything on every device.</p></div><div class=peach-pro-features></div><div class=peach-pro-upgrade-actions><p class=peach-pro-pricing>$39 · once · yours forever</p><a href=https://peachpasswords.com/#pricing target=_blank rel="noopener noreferrer"class="peach-btn peach-btn--accent peach-pro-upgrade-cta">Get Peach Pro</a><div class=peach-pro-key-divider><span>or</span></div><button class=peach-pro-key-link>Activate a license key`),ft=g(`<div class=peach-pro-feature><span class=peach-pro-feature-mark>✦</span><div class=peach-pro-feature-text><span class=peach-pro-feature-name></span><span class=peach-pro-feature-desc>`),pt=g(`<div class=peach-pro-active-feature><span class=peach-pro-active-feature-mark>✦</span><span class=peach-pro-active-feature-name>`),mt=g(`<p class="peach-feedback-result peach-feedback-result--ok">Sent — thank you`),ht=g(`<p class="peach-feedback-result peach-feedback-result--err">Failed to send — try again`),gt=g(`<div class=peach-settings-body><div class="peach-settings-group peach-feedback-group"><p class=peach-feedback-intro>Help us improve Peach. Every report goes directly to our inbox.</p><p class=peach-settings-sub-label>TYPE</p><div class=peach-feedback-chips></div><p class=peach-settings-sub-label>MESSAGE</p><textarea class=peach-feedback-textarea placeholder="Describe the issue or idea..."></textarea><p class=peach-feedback-meta>Version <!> · will be included automatically</p><button class="peach-btn peach-btn--accent peach-btn--sm peach-feedback-submit"></button><p class=peach-feedback-anon>Sent anonymously · no account required`),_t=g(`<button>`),vt=g(`<div class=peach-settings-body><div class=peach-settings-group><p class=peach-settings-label>Autofill service</p><div class=peach-mobile-row><span class=peach-mobile-status></span><button class="peach-btn peach-btn--subtle peach-btn--sm"></button></div></div><div class=peach-settings-group><p class=peach-settings-label>Biometric unlock</p><div class=peach-mobile-row><span class=peach-mobile-status>`),yt=g(`<div class="peach-overlay-view ov-enter-right"style=display:flex><div class=peach-overlay-header><button class="peach-btn peach-btn--ghost peach-btn--sm peach-icon-btn"aria-label=Back><svg width=7 height=12 viewBox="0 0 7 12"fill=none stroke=currentColor stroke-width=1.1 stroke-linecap=round stroke-linejoin=round><path d="M6 1L1 6L6 11"></path></svg></button><span class=peach-overlay-title></span><div class=peach-overlay-spacer>`),bt=[`Bug report`,`Feature request`,`Question`,`Other`];function xt(e){if(!e)return`Active`;try{let t=new Date(e);return Number.isNaN(t.getTime())?`Active`:`Active since ${t.toLocaleDateString(void 0,{month:`long`,year:`numeric`})}`}catch{return`Active`}}function St(e){return e===`security`||e===`vault`||e===`sync`||e===`appearance`||e===`shortcuts`||e===`license`||e===`feedback`||e===`mobile`}function Ct(h){let g=chrome.runtime.getManifest().version,Ct=h.initialSection,[k,A]=m(Ct&&St(Ct)?Ct:null),[wt,Tt]=m(!1),[Et,Dt]=m(null),[Ot,kt]=m(null),[At,jt]=m(``),[Mt,j]=m(null),[Nt,Pt]=m(null),[Ft,It]=m(!1),[M,N]=m([]),[Lt,Rt]=m([]),[zt,Bt]=m(`offline`),[Vt,P]=m(void 0),[Ht,Ut]=m(!1),F=()=>h.isPro??Ht(),[Wt,Gt]=m(!1),[I,L]=m(null),[R,Kt]=m(null),[qt,Jt]=m(!1),[z,Yt]=m(null),[Xt,Zt]=m(!1),[B,Qt]=m(null),[$t,en]=m(0),[V,tn]=m([]),[nn,rn]=m(!1),[H,an]=m(null);async function on(){rn(!0);try{tn((await a({type:`GET_VAULT_HISTORY`})).data??[])}finally{rn(!1)}}async function sn(e){if(H())return;an(e);let t=await a({type:`RESTORE_VAULT_SNAPSHOT`,payload:{snapshotId:e}});an(null),t.ok&&h.onBack()}function cn(e){let t=Date.now()-e;if(t<6e4)return`Just now`;if(t<36e5)return`${Math.floor(t/6e4)}m ago`;let n=new Date(e),r=new Date().toDateString()===n.toDateString(),i=new Date(Date.now()-864e5).toDateString()===n.toDateString(),a=n.toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`});return r?`Today ${a}`:i?`Yesterday ${a}`:`${n.toLocaleDateString([],{month:`short`,day:`numeric`})} ${a}`}function ln(e){return{local_save:`saved`,sync_received:`synced`,import:`imported`,restore:`restored`}[e]??e}let[un,dn]=m(!1),[fn,pn]=m(!1),[U,mn]=m(``),[W,hn]=m(``),[gn,_n]=m(``),[vn,yn]=m(!1),[bn,G]=m(null),[xn,Sn]=m(!1),[K,Cn]=m(!1),[wn,q]=m(!1),[Tn,En]=m(``),[Dn,On]=m(``),[J,Y]=m(``),[kn,X]=m(!1),[An,Z]=m(null),[jn,Q]=m(null),[Mn,Nn]=m([]);function Pn(){try{return e(`Autofill`)}catch{return null}}let Fn=Pn(),[In,Ln]=m(!1),[Rn,zn]=m(!1),Bn=t.getPlatform()===`android`;t.isNativePlatform();let[Vn,Hn]=m(null),[Un,Wn]=m(null),[Gn,Kn]=m(`Bug report`),[qn,Jn]=m(``),[Yn,Xn]=m(!1),[Zn,Qn]=m(null);S(async()=>{let[e,t,n,r,i,o]=await Promise.all([a({type:`GET_LICENSE`}),a({type:`GET_SYNC_STATE`}),a({type:`GET_PASSKEY_PROVIDER_STATE`}),a({type:`IS_DURESS_ENABLED`}),a({type:`GET_SETTINGS`}),a({type:`GET_LICENSE_KEY`})]);if(on(),e.ok&&kt(e.data??null),t.ok){let e=t;e.data&&(N(e.data.pairedDevices??[]),Rt(e.data.trustedNetworks??[]),Bt(e.data.status??`offline`),P(e.data.lastSyncAt),Ut(e.data.isPro??!1))}if(n.ok&&Kt(n.data??null),r.ok&&Cn(r.data??!1),i.ok){let e=i.data;en(e?.declinedCardFingerprints?.length??0)}o.ok&&Gr(o.data??null);let s=await a({type:`GET_ENTRIES`});if(s.ok&&Nn((s.data??[]).filter(e=>e.canary?.webhookUrl).map(e=>({id:e.id,title:e.title,canary:e.canary}))),Bn){if(Fn){let{enabled:e}=await Fn.isEnabledAsAutofillService();Ln(e)}zn(await w())}chrome.runtime.onMessage.addListener(e=>{e.type===`SYNC_STATE_UPDATE`&&(N(e.pairedDevices??[]),Rt(e.trustedNetworks??[]),Bt(e.status??`offline`),P(e.lastSyncAt),Ut(e.isPro??!1))})});async function $n(){if(G(null),!U().trim()){G(`enter your current password`);return}if(W().length<12){G(`new password must be at least 12 characters`);return}if(W()!==gn()){G(`new passwords do not match`);return}if(W()===U()){G(`new password must differ from current`);return}yn(!0);let e=await a({type:`CHANGE_PASSWORD`,payload:{currentPassword:U(),newPassword:W()}});e.ok?(Sn(!0),mn(``),hn(``),_n(``),setTimeout(()=>{Sn(!1),pn(!1)},2200)):G(e.error??`failed to change password`),yn(!1)}let[er,tr]=m(!1);async function nr(e){await navigator.clipboard.writeText(e),tr(!0),setTimeout(()=>tr(!1),2e3)}async function rr(){let e=At().trim();if(!e)return;It(!0),j(null),Pt(null);let t=await a({type:`ACTIVATE_LICENSE`,payload:{key:e}});if(It(!1),t.ok){let n=t.data;n?.valid?(kt(n),Gr(e),Pt(`License activated!`),jt(``)):j(`Invalid license key`)}else j(`Activation failed`)}async function ir(){let e=R();if(!e||!e.supported)return;Jt(!0);let t=await a({type:`SET_PASSKEY_PROVIDER_ENABLED`,payload:{enabled:!e.enabled}});Jt(!1),t.ok&&Kt(t.data??null)}async function ar(){Tt(!0),Dt(null);let e=await a({type:`CHECK_ALL_BREACHES`});if(Tt(!1),e.ok){let t=e.data??{},n=Object.values(t).filter(e=>e>0).length;Dt(n>0?`${n} password${n>1?`s`:``} found in breaches`:`All passwords clean`),h.onBreachCheckDone()}}async function or(){if(zt()===`not_trusted`)return;Gt(!0),L(null);let e=await a({type:`TRIGGER_SYNC`});if(e.ok){let t=e.data?.syncedCount??0;L({kind:`ok`,text:t>0?`Synced with ${t} ${t===1?`device`:`devices`}`:`Up to date`}),P(Date.now()),sr()}else{let t=e.error;L({kind:`err`,text:{no_paired_devices:`No paired devices`,no_devices_reachable:`No devices found`,vault_locked:`Vault is locked`,pro_required:`Sync requires Pro`}[t??``]??`Sync failed`})}setTimeout(()=>{Gt(!1),L(null)},3500)}async function sr(){let e=(await a({type:`GET_SYNC_STATE`})).data;e&&(N(e.pairedDevices??[]),Rt(e.trustedNetworks??[]),Bt(e.status??`offline`),P(e.lastSyncAt))}async function cr(e){N(t=>t.filter(t=>t.deviceId!==e)),await a({type:`REMOVE_PAIRED_DEVICE`,payload:{deviceId:e}}),sr()}async function lr(e,t,n){await a({type:`REMOVE_TRUSTED_NETWORK`,payload:{ssid:e,bssid:t,isTailscale:n}}),sr()}let[ur,dr]=m(!1);async function fr(){ur()||(dr(!0),await a({type:`MARK_NETWORK_TRUSTED`}),await sr(),dr(!1))}let[pr,mr]=m(!1),[hr,gr]=m(!1);async function _r(){if(gr(!0),t.isNativePlatform()){let{clearAndroidSyncIdentity:e}=await n(async()=>{let{clearAndroidSyncIdentity:e}=await import(`./android-sync-identity-C0F3-ylh.js`);return{clearAndroidSyncIdentity:e}},__vite__mapDeps([0,1,2,3]));await e()}let e=await a({type:`RESET_SYNC_IDENTITY`});gr(!1),e.ok&&(N([]),mr(!1))}function vr(e){if(!e)return`Never`;let t=Date.now()-e,n=Math.floor(t/6e4),r=Math.floor(t/36e5),i=Math.floor(t/864e5);return n<1?`Just now`:n<60?`${n}m ago`:r<24?`${r}h ago`:`${i}d ago`}function yr(e){switch(e){case`synced`:return`var(--peach-sync-ok)`;case`syncing`:return`var(--peach-sync-busy)`;case`no_peers`:return`var(--peach-sync-off)`;case`not_trusted`:return`var(--peach-sync-err)`;case`offline`:return`var(--peach-sync-off)`;default:return`var(--peach-sync-off)`}}function br(e){switch(e){case`synced`:return`Synced`;case`syncing`:return`Syncing`;case`no_peers`:return`No peers visible`;case`not_trusted`:return`Not on a trusted network`;case`offline`:return`Offline`;default:return`Unknown`}}function xr(){return Lt().length>0}async function Sr(){let e=J().trim(),t=Tn().trim(),n=Dn().trim();if(!e){Z(`enter your main password to confirm`);return}if(t.length<8){Z(`duress password must be at least 8 characters`);return}if(t===e){Z(`duress password must differ from your main password`);return}if(t!==n){Z(`passwords do not match`);return}X(!0),Z(null);let r=await a({type:`VERIFY_MAIN_PASSWORD`,payload:{password:e}});if(!r.ok||!r.data){Z(`incorrect main password`),X(!1);return}let i=await a({type:`SETUP_DURESS`,payload:{duressPassword:t}});X(!1),i.ok?(Cn(!0),q(!1),En(``),On(``),Y(``),Q(`Duress password set. If entered, a decoy vault will be shown.`),setTimeout(()=>Q(null),5e3)):Z(i.error??`failed to set duress password`)}async function Cr(){await a({type:`UPDATE_SETTINGS`,payload:{declinedCardFingerprints:[]}}),en(0)}async function wr(){Zt(!0),Qt(null);let e=await a({type:`COUNT_DUPLICATES`});Zt(!1),e.ok&&Yt(e.data??0)}async function Tr(){Zt(!0);let e=await a({type:`DEDUPLICATE_ENTRIES`});Zt(!1),e.ok&&(Qt(e.data??0),Yt(0))}async function Er(){let e=J().trim();if(!e){Z(`enter your main password to confirm`);return}X(!0),Z(null);let t=await a({type:`VERIFY_MAIN_PASSWORD`,payload:{password:e}});if(!t.ok||!t.data){Z(`incorrect main password`),X(!1);return}let n=await a({type:`DISABLE_DURESS`});X(!1),n.ok?(Cn(!1),q(!1),Y(``),Q(`Duress password disabled.`),setTimeout(()=>Q(null),4e3)):Z(n.error??`failed to disable duress password`)}async function Dr(){if(!qn().trim()||Yn())return;Xn(!0),Qn(null);let e=await a({type:`SUBMIT_FEEDBACK`,payload:{category:Gn(),message:qn().trim(),version:g,browser:navigator.userAgent}});Xn(!1),e.ok?(Qn(`success`),Jn(``),setTimeout(()=>Qn(null),4e3)):Qn(`error`)}function Or(){k()===null?h.onBack():A(null)}function kr(){let e=k();return e===null?`settings`:e===`license`?`account`:e}function $(e){return(()=>{var t=ne(),n=t.firstChild,r=n.nextSibling.firstChild,a=r.nextSibling;return t.$$click=()=>A(e.section),O(n,()=>e.icon()),O(r,()=>e.name,null),O(r,y(E,{get when(){return i(()=>!!e.pro)()&&!F()},get children(){return te()}}),null),O(a,()=>e.desc),t})()}let Ar=()=>re(),jr=()=>ie(),Mr=()=>ae(),Nr=()=>oe(),Pr=()=>se(),Fr=()=>ce(),Ir=()=>le();function Lr(){return(()=>{var e=de(),t=e.firstChild.nextSibling,n=t.nextSibling,r=n.nextSibling,a=r.nextSibling,o=a.firstChild;return o.firstChild,O(e,()=>$({section:`security`,name:`Security`,desc:`Locking, breach monitoring, passkeys`,icon:Ar}),t),O(e,()=>$({section:`license`,name:`Peach Pro`,desc:F()?`Active · manage your license`:`Upgrade · $39 · yours forever`,icon:jr}),t),O(e,()=>$({section:`vault`,name:`Vault`,desc:`Entries, health, import & export`,icon:Mr}),n),O(e,()=>$({section:`sync`,name:`Sync`,desc:`Paired devices & trusted networks`,icon:Nr,pro:!0}),n),O(e,()=>$({section:`appearance`,name:`Appearance`,desc:`Theme & accent color`,icon:Pr}),r),O(e,()=>$({section:`shortcuts`,name:`Shortcuts`,desc:`Keyboard reference`,icon:Fr}),r),O(e,y(E,{when:Bn,get children(){return[ue(),i(()=>$({section:`mobile`,name:`Mobile`,desc:`Autofill & biometric settings`,icon:Nr}))]}}),r),O(e,()=>$({section:`feedback`,name:`Feedback`,desc:`Report issues, suggest features`,icon:Ir}),a),O(o,g,null),e})()}function Rr(){return(()=>{var e=Oe(),t=e.firstChild,n=t.firstChild.nextSibling,r=n.firstChild.nextSibling,a=n.nextSibling,s=a.firstChild.nextSibling,c=a.nextSibling.nextSibling,l=c.firstChild.nextSibling,u=c.nextSibling,f=u.firstChild.nextSibling,p=u.nextSibling,m=p.nextSibling,g=m.firstChild.nextSibling,_=m.nextSibling,v=_.nextSibling,x=v.firstChild.nextSibling,S=v.nextSibling,C=S.nextSibling,w=C.firstChild.nextSibling,T=C.nextSibling,ee=T.nextSibling,D=ee.firstChild.nextSibling,te=ee.nextSibling,ne=te.firstChild.nextSibling,re=te.nextSibling,ie=re.firstChild.nextSibling;return re.nextSibling,r.$$click=()=>void h.onLockOnCloseChange(!h.lockOnClose),s.addEventListener(`change`,e=>void h.onAutoLockMinutesChange(Number(e.currentTarget.value))),l.$$click=()=>void h.onBreachMonitoringChange(!h.breachMonitoring),f.$$click=()=>void ar(),O(f,()=>wt()?`checking...`:`run`),O(t,y(E,{get when(){return Et()},get children(){var e=fe(),t=e.firstChild.nextSibling;return O(t,Et),e}}),p),g.$$click=()=>{pn(e=>!e),G(null)},O(g,()=>fn()?`cancel`:`change`),O(t,y(E,{get when(){return fn()},get children(){var e=he(),t=e.firstChild,n=t.nextSibling,r=n.nextSibling,i=r.nextSibling;return t.$$input=e=>mn(e.target.value),n.$$input=e=>hn(e.target.value),r.$$keydown=e=>{e.key===`Enter`&&$n()},r.$$input=e=>_n(e.target.value),O(e,y(E,{get when(){return bn()},get children(){var e=pe();return O(e,bn),e}}),i),O(e,y(E,{get when(){return xn()},get children(){return me()}}),i),i.$$click=()=>void $n(),O(i,()=>vn()?`saving…`:`save new password`),b(()=>i.disabled=vn()||!U()||!W()||!gn()),b(()=>t.value=U()),b(()=>n.value=W()),b(()=>r.value=gn()),e}}),_),O(x,()=>K()?`on`:`off`),O(t,y(E,{get when(){return i(()=>!!K())()&&!wn()},get children(){return ge()}}),S),O(t,y(E,{get when(){return jn()},get children(){var e=_e(),t=e.firstChild;return O(t,jn),e}}),S),O(t,y(E,{get when(){return!wn()},get children(){var e=ve(),t=e.firstChild;return t.$$click=()=>{q(!0),Z(null),Q(null),En(``),On(``),Y(``)},O(t,()=>K()?`Change / disable`:`Set up`),e}}),S),O(t,y(E,{get when(){return wn()},get children(){var e=Ee(),t=e.firstChild.nextSibling,n=t.nextSibling,r=n.firstChild;return t.$$input=e=>Y(e.currentTarget.value),O(e,y(E,{get when(){return!K()},get children(){return[ye(),(()=>{var e=be();return e.$$input=e=>En(e.currentTarget.value),b(()=>e.value=Tn()),e})(),xe(),(()=>{var e=Se();return e.$$input=e=>On(e.currentTarget.value),b(()=>e.value=Dn()),e})()]}}),n),O(e,y(E,{get when(){return An()},get children(){var e=Ce();return O(e,An),e}}),n),r.$$click=()=>{q(!1),Z(null)},O(n,y(E,{get when(){return K()},get children(){var e=we();return e.$$click=()=>void Er(),O(e,()=>kn()?`disabling...`:`disable duress`),b(()=>e.disabled=kn()),e}}),null),O(n,y(E,{get when(){return!K()},get children(){var e=Te();return e.$$click=()=>void Sr(),O(e,()=>kn()?`saving...`:`save`),b(()=>e.disabled=kn()||!J()||!Tn()||!Dn()),e}}),null),b(()=>t.value=J()),e}}),S),O(w,(()=>{var e=i(()=>Mn().length>0);return()=>e()?`${Mn().length} active`:`none`})()),O(t,y(E,{get when(){return Mn().length>0},get children(){return y(o,{get each(){return Mn()},children:e=>(()=>{var t=ke(),n=t.firstChild,r=n.nextSibling;return O(n,()=>e.title),r.$$click=()=>void Zr(e),O(r,(()=>{var t=i(()=>Vn()===e.id);return()=>t()?`sending…`:i(()=>Un()?.id===e.id)()?Un().ok?`sent ✓`:`failed ✗`:`test`})()),b(()=>r.disabled=Vn()===e.id),t})()})}}),T),D.$$click=()=>void ir(),O(ne,()=>R()?.statusLabel??`Unavailable`),O(ie,()=>R()?.browserLabel??`Unknown`,null),O(ie,()=>R()?.supported?` ✓`:` (interception unavailable)`,null),O(t,y(E,{get when(){return R()?.conflict},get children(){var e=De(),t=e.firstChild;return O(t,()=>R().conflict),e}}),null),b(e=>{var t=`peach-toggle ${h.lockOnClose?`is-on`:``}`,n=`peach-toggle ${h.breachMonitoring?`is-on`:``}`,i=wt(),a=`peach-duress-status-pill ${K()?`is-active`:``}`,o=`peach-toggle ${R()?.enabled?`is-on`:``}`,s=!R()?.supported||qt();return t!==e.e&&d(r,e.e=t),n!==e.t&&d(l,e.t=n),i!==e.a&&(f.disabled=e.a=i),a!==e.o&&d(x,e.o=a),o!==e.i&&d(D,e.i=o),s!==e.n&&(D.disabled=e.n=s),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),b(()=>s.value=String(h.autoLockMinutes)),e})()}function zr(){return(()=>{var e=Be(),t=e.firstChild,n=t.firstChild.nextSibling,r=n.firstChild.nextSibling,a=n.nextSibling;a.firstChild;var s=a.nextSibling,l=s.nextSibling,u=l.firstChild.nextSibling,f=l.nextSibling,p=f.firstChild.nextSibling,m=f.nextSibling,g=m.nextSibling,v=g.firstChild.nextSibling,x=g.nextSibling,S=x.firstChild.nextSibling,C=x.nextSibling.nextSibling,w=C.firstChild.nextSibling;return O(r,()=>h.entriesCount),O(a,y(E,{get when(){return B()!==null},get fallback(){return(()=>{var e=Ve();return e.$$click=()=>void wr(),O(e,(()=>{var e=i(()=>!!Xt());return()=>e()?`scanning...`:i(()=>z()===null)()?`scan`:i(()=>z()===0)()?`none found`:`${z()} found — remove?`})()),b(()=>e.disabled=Xt()),e})()},get children(){var e=Ae();return O(e,(()=>{var e=i(()=>B()===0);return()=>e()?`already clean`:`removed ${B()}`})()),e}}),null),O(t,y(E,{get when(){return i(()=>z()!==null&&z()>0)()&&B()===null},get children(){var e=je(),t=e.firstChild,n=t.firstChild,r=n.nextSibling;r.nextSibling;var i=t.nextSibling.firstChild,a=i.nextSibling;return O(t,z,n),O(t,()=>z()===1?`entry`:`entries`,r),i.$$click=()=>Yt(null),a.$$click=()=>void Tr(),O(a,()=>Xt()?`removing...`:`remove duplicates`),b(()=>a.disabled=Xt()),e}}),s),u.addEventListener(`change`,e=>void h.onTrashRetentionChange(Number(e.currentTarget.value))),c(p,`click`,h.onOpenHealth,!0),O(t,y(E,{get when(){return $t()>0},get children(){var e=Me(),t=e.firstChild,n=t.firstChild,r=n.nextSibling;r.nextSibling;var i=t.nextSibling;return O(t,$t,n),O(t,()=>$t()===1?``:`s`,r),i.$$click=()=>void Cr(),e}}),m),c(v,`click`,h.onImport,!0),c(S,`click`,h.onExport,!0),O(t,y(E,{get when(){return nn()},get children(){return Ne()}}),C),O(t,y(E,{get when(){return i(()=>!nn())()&&V().length===0},get children(){return Pe()}}),C),O(t,y(E,{get when(){return i(()=>!nn())()&&V().length>0},get children(){return[Fe(),(()=>{var e=Ie();return O(e,y(o,{get each(){return V()},children:e=>(()=>{var t=He(),n=t.firstChild,r=n.firstChild,i=r.nextSibling,a=n.nextSibling;return O(r,()=>cn(e.savedAt)),O(i,()=>[e.entryCount===null?null:`${e.entryCount} ${e.entryCount===1?`entry`:`entries`}`,ln(e.reason)].filter(Boolean).join(` · `)),a.$$click=()=>void sn(e.id),O(a,y(E,{get when(){return H()===e.id},fallback:`Restore`,children:`…`})),b(t=>{var n=`peach-btn peach-btn--subtle peach-btn--sm peach-history-btn${H()===e.id?` is-busy`:``}`,r=H()!==null;return n!==t.e&&d(a,t.e=n),r!==t.t&&(a.disabled=t.t=r),t},{e:void 0,t:void 0}),t})()})),e})(),(()=>{var e=Le(),t=e.firstChild;return O(e,()=>V().length,t),e})()]}}),C),C.$$click=()=>dn(e=>!e),O(w,()=>un()?`▲`:`▼`),O(t,y(E,{get when(){return un()},get children(){return[(()=>{var e=Re(),t=e.firstChild.nextSibling.nextSibling;return t.$$click=()=>h.onOpenFileImport?.(),e})(),y(E,{get when(){return h.onOpenPanic},get children(){var e=ze(),t=e.firstChild.nextSibling.nextSibling;return t.$$click=()=>h.onOpenPanic?.(),e}})]}}),null),b(()=>_(C,`aria-expanded`,un())),b(()=>u.value=String(h.trashRetentionDays)),e})()}function Br(){return F()?(()=>{var e=Ke(),t=e.firstChild.firstChild,n=t.firstChild.nextSibling,r=n.firstChild,a=t.nextSibling,c=a.firstChild.nextSibling,d=a.nextSibling,f=d.firstChild,p=d.nextSibling.nextSibling,m=p.firstChild,g=m.firstChild.nextSibling;g.nextSibling;var _=m.nextSibling,v=_.firstChild,x=p.nextSibling,S=x.firstChild,C=S.firstChild.nextSibling;C.nextSibling;var w=S.nextSibling,T=x.nextSibling;return T.firstChild,O(n,()=>br(zt()),null),O(c,(()=>{var e=i(()=>!!Vt());return()=>e()?vr(Vt()):`Never synced`})()),f.$$click=()=>void or(),O(f,y(l,{get children(){return[y(u,{get when(){return Wt()},children:`Syncing…`}),y(u,{get when(){return I()?.kind===`ok`},get children(){return[`✓ `,i(()=>I().text)]}}),y(u,{get when(){return I()?.kind===`err`},get children(){return I().text}}),y(u,{when:!0,children:`Sync now`})]}})),O(m,()=>M().length,g),O(p,y(E,{get when(){return M().length===0},get children(){return We()}}),_),O(p,y(E,{get when(){return M().length>0},get children(){var e=Ie();return O(e,y(o,{get each(){return M()},children:e=>(()=>{var t=qe(),n=t.firstChild,r=n.firstChild,a=r.nextSibling,o=n.nextSibling;return O(r,()=>e.displayName),O(a,(()=>{var t=i(()=>!!e.lastSyncAt);return()=>t()?`Last synced: ${cn(e.lastSyncAt)}`:`Never synced`})()),o.$$click=()=>void cr(e.deviceId),t})()})),e}}),_),v.$$click=()=>h.onOpenSyncPairing?.(),O(S,()=>Lt().length,C),O(x,y(o,{get each(){return Lt()},children:e=>(()=>{var t=Ye(),n=t.firstChild;return O(n,(()=>{var t=i(()=>!!e.isTailscale);return()=>t()?`Tailscale`:e.ssid??`Unknown network`})()),O(t,y(E,{get when(){return!e.isTailscale},get fallback(){return Xe()},get children(){var t=Je();return t.$$click=()=>void lr(e.ssid,e.bssid,e.isTailscale),t}}),null),t})()}),w),O(w,y(E,{get when(){return!xr()},get children(){var e=Ve();return e.$$click=()=>void fr(),O(e,()=>ur()?`Marking…`:`Mark current network as trusted`),b(()=>e.disabled=ur()),e}})),O(T,y(E,{get when(){return pr()},get fallback(){return(()=>{var e=Ze(),t=e.firstChild.nextSibling;return t.$$click=()=>mr(!0),e})()},get children(){var e=Ge(),t=e.firstChild.nextSibling.nextSibling.firstChild,n=t.nextSibling;return t.$$click=()=>mr(!1),n.$$click=()=>void _r(),O(n,()=>hr()?`Resetting...`:`Reset`),b(e=>{var r=hr(),i=hr();return r!==e.e&&(t.disabled=e.e=r),i!==e.t&&(n.disabled=e.t=i),e},{e:void 0,t:void 0}),e}}),null),b(e=>{var t=yr(zt()),n=zt()===`not_trusted`||Wt();return t!==e.e&&s(r,`background`,e.e=t),n!==e.t&&(f.disabled=e.t=n),e},{e:void 0,t:void 0}),e})():(()=>{var e=Ue(),t=e.firstChild.firstChild.nextSibling.nextSibling,n=t.nextSibling;return t.$$click=()=>A(`license`),n.$$click=()=>A(`license`),e})()}function Vr(){let e=[{id:`cormorant-italic`,label:`Cormorant Italic`,preview:`Aa`},{id:`cormorant`,label:`Cormorant`,preview:`Aa`},{id:`inter`,label:`Inter`,preview:`Aa`},{id:`system`,label:`System`,preview:`Aa`}],t=[{id:`small`,label:`Small`},{id:`medium`,label:`Default`},{id:`large`,label:`Large`}];return(()=>{var n=Qe(),r=n.firstChild.firstChild.nextSibling,i=r.firstChild.nextSibling,a=r.nextSibling.nextSibling,c=a.firstChild.nextSibling,l=a.nextSibling.nextSibling,u=l.firstChild.nextSibling,d=l.nextSibling.nextSibling,f=d.firstChild.nextSibling,m=d.nextSibling.nextSibling.firstChild.nextSibling;return i.$$click=()=>h.onThemeChange(h.theme===`dark`?`light`:`dark`),O(i,()=>h.theme===`dark`?`Switch to light`:`Switch to dark`),O(c,y(o,{each:p,children:e=>(()=>{var t=$e();return t.$$click=()=>void h.onAccentChange(e.name),b(n=>{var r=h.accentColor===e.name,i=e.hex,a=e.name,o=e.name;return r!==n.e&&t.classList.toggle(`is-active`,n.e=r),i!==n.t&&s(t,`background`,n.t=i),a!==n.a&&_(t,`aria-label`,n.a=a),o!==n.o&&_(t,`title`,n.o=o),n},{e:void 0,t:void 0,a:void 0,o:void 0}),t})()})),O(u,y(o,{each:e,children:e=>(()=>{var t=et(),n=t.firstChild,r=n.nextSibling;return t.$$click=()=>void h.onDisplayFontChange(e.id),O(n,()=>e.preview),O(r,()=>e.label),b(n=>{var r=h.displayFont===e.id,i=e.id,a=e.label,o=e.label;return r!==n.e&&t.classList.toggle(`is-active`,n.e=r),i!==n.t&&_(t,`data-font-preview`,n.t=i),a!==n.a&&_(t,`aria-label`,n.a=a),o!==n.o&&_(t,`title`,n.o=o),n},{e:void 0,t:void 0,a:void 0,o:void 0}),t})()})),O(f,y(o,{each:t,children:e=>(()=>{var t=tt();return t.$$click=()=>void h.onTextSizeChange(e.id),O(t,()=>e.label),b(()=>t.classList.toggle(`is-active`,h.textSize===e.id)),t})()})),m.$$click=()=>void h.onReduceMotionChange(!h.reduceMotion),O(m,()=>h.reduceMotion?`On`:`Off`),n})()}function Hr(){let[e,t]=m(null),[n,r]=m(null);function a(e){r(null),t(e)}function s(){t(null),r(null)}function c(e,n){let i=ee(h.shortcuts,n,e);if(i){r(`Already bound to "${T.find(e=>e.action===i)?.label??i}"`);return}let a={...h.shortcuts,[e]:n};t(null),r(null),h.onShortcutsChange(a)}function l(e){let t={...h.shortcuts,[e]:D[e]};h.onShortcutsChange(t)}function u(){h.onShortcutsChange({...D})}function d(t){if(t.preventDefault(),t.stopPropagation(),t.key===`Escape`){s();return}let n=x(t);if(!n)return;let r=e();r&&c(r,n)}return(()=>{var t=rt(),r=t.firstChild;r.firstChild;var i=r.nextSibling;i.firstChild;var c=i.nextSibling,p=c.firstChild,m=p.firstChild.nextSibling,h=p.nextSibling;return O(r,y(o,{get each(){return T.filter(e=>e.scope===`entry`)},children:t=>f(t,e,a,s,l,d)}),null),O(i,y(o,{get each(){return T.filter(e=>e.scope===`global`)},children:t=>f(t,e,a,s,l,d)}),null),O(t,y(E,{get when(){return n()},get children(){var e=nt();return O(e,n),e}}),c),m.$$click=e=>{e.preventDefault(),chrome.tabs.create({url:`chrome://extensions/shortcuts`})},h.$$click=u,t})();function f(e,t,n,r,a,o){let s=()=>t()===e.action,c=()=>h.shortcuts[e.action],l=()=>{let t=c(),n=D[e.action];return t.key!==n.key||!!t.ctrl!=!!n.ctrl||!!t.meta!=!!n.meta||!!t.shift!=!!n.shift||!!t.alt!=!!n.alt};return(()=>{var t=at(),u=t.firstChild,d=u.nextSibling;return O(u,()=>e.label),v(e=>{e&&queueMicrotask(()=>{s()&&e.focus()})},d),d.$$keydown=e=>{s()&&o(e)},d.$$click=()=>s()?r():n(e.action),O(d,(()=>{var e=i(()=>!!s());return()=>e()?`Press a key…`:C(c())})()),O(t,y(E,{get when(){return i(()=>!!l())()&&!s()},get children(){var t=it();return t.$$click=()=>a(e.action),t}}),null),b(e=>{var t=!!s(),n=!!l();return t!==e.e&&d.classList.toggle(`is-capturing`,e.e=t),n!==e.t&&d.classList.toggle(`is-custom`,e.t=n),e},{e:void 0,t:void 0}),t})()}}let Ur=[{feature:`sync`,name:`Peach Sync`,desc:`Encrypted · peer-to-peer · local`},{feature:`ios_app`,name:`Android & iOS`,desc:`Your vault everywhere`},{feature:`passkeys`,name:`Passkeys`,desc:`Zero-knowledge WebAuthn`},{feature:`advanced_health`,name:`Advanced Vault Health`,desc:`Reuse · age · exposure scoring`},{feature:`smart_password_change`,name:`Smart Password Change`,desc:`Guided reset · pre-filled · vault updated`}],[Wr,Gr]=m(null),[Kr,qr]=m(!1),[Jr,Yr]=m(!1);async function Xr(){Yr(!0),await a({type:`DEACTIVATE_LICENSE`}),kt(null),await h.onLicenseChange?.(),Yr(!1)}async function Zr(e){Hn(e.id),Wn(null);let t=await a({type:`FIRE_CANARY_PING`,payload:{webhookUrl:e.canary.webhookUrl,entryTitle:e.title,trigger:`test`}});Wn({id:e.id,ok:t.ok}),Hn(null),setTimeout(()=>Wn(t=>t?.id===e.id?null:t),3e3)}function Qr(){async function e(){await rr(),(Ot()?.valid??!1)&&Ot()?.plan===`pro`&&await h.onLicenseChange?.()}return(()=>{var t=ct();return O(t,y(E,{get when(){return F()},get fallback(){return y(E,{get when(){return Kr()},get fallback(){return(()=>{var e=dt(),t=e.firstChild,n=t.firstChild,i=t.nextSibling,a=i.nextSibling.firstChild.nextSibling.nextSibling.nextSibling;return O(n,y(r,{class:`peach-pro-upgrade-mark`})),O(i,y(o,{each:Ur,children:e=>(()=>{var t=ft(),n=t.firstChild.nextSibling.firstChild,r=n.nextSibling;return O(n,()=>e.name),O(r,()=>e.desc),b(()=>t.classList.toggle(`is-highlighted`,h.upgradeHighlight===e.feature)),t})()})),a.$$click=()=>qr(!0),e})()},get children(){var t=ut(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling,a=i.nextSibling;return O(t,y(f,{}),n),r.$$keydown=t=>{t.key===`Enter`&&e()},r.$$input=e=>jt(e.currentTarget.value),_(r,`spellcheck`,!1),O(t,y(E,{get when(){return Mt()},get children(){return lt()}}),i),i.$$click=()=>void e(),O(i,()=>Ft()?`activating…`:`Activate`),a.$$click=()=>{qr(!1),j(null),jt(``)},b(()=>i.disabled=Ft()||!At().trim()),b(()=>r.value=At()),t}})},get children(){var e=st(),t=e.firstChild,n=t.firstChild,i=n.nextSibling.nextSibling,a=t.nextSibling,s=a.nextSibling;return O(n,y(r,{class:`peach-pro-active-mark`})),O(i,()=>xt(Ot()?.issued)),O(e,y(E,{get when(){return Wr()},get children(){var e=ot(),t=e.firstChild.nextSibling.firstChild,n=t.nextSibling;return O(t,()=>Wr()),n.$$click=()=>nr(Wr()),O(n,()=>er()?`✓`:`copy`),e}}),a),O(a,y(o,{each:Ur,children:e=>(()=>{var t=pt(),n=t.firstChild.nextSibling;return O(n,()=>e.name),t})()})),s.$$click=()=>void Xr(),O(s,()=>Jr()?`Deactivating…`:`Deactivate`),b(()=>s.disabled=Jr()),e}})),t})()}function $r(){return(()=>{var e=gt(),t=e.firstChild,n=t.firstChild.nextSibling.nextSibling,r=n.nextSibling.nextSibling,i=r.nextSibling,a=i.firstChild.nextSibling;a.nextSibling;var s=i.nextSibling;return O(n,y(o,{each:bt,children:e=>(()=>{var t=_t();return t.$$click=()=>Kn(e),O(t,e),b(()=>d(t,`peach-feedback-chip ${Gn()===e?`is-active`:``}`)),t})()})),r.$$input=e=>Jn(e.currentTarget.value),O(i,g,a),O(t,y(E,{get when(){return Zn()===`success`},get children(){return mt()}}),s),O(t,y(E,{get when(){return Zn()===`error`},get children(){return ht()}}),s),s.$$click=()=>void Dr(),O(s,()=>Yn()?`Sending...`:`Send feedback`),b(()=>s.disabled=Yn()||!qn().trim()),b(()=>r.value=qn()),e})()}function ei(){return(()=>{var e=vt(),t=e.firstChild,n=t.firstChild.nextSibling.firstChild,r=n.nextSibling,i=t.nextSibling.firstChild.nextSibling.firstChild;return O(n,()=>In()?`Enabled`:`Disabled`),r.$$click=()=>void Fn?.openAutofillSettings(),O(r,()=>In()?`Change`:`Enable`),O(i,()=>Rn()?`Available`:`Not available`),e})()}return(()=>{var e=yt(),t=e.firstChild.firstChild,n=t.nextSibling;return t.$$click=Or,O(n,kr),O(e,y(l,{get fallback(){return Lr()},get children(){return[y(u,{get when(){return k()===`security`},get children(){return Rr()}}),y(u,{get when(){return k()===`vault`},get children(){return zr()}}),y(u,{get when(){return k()===`sync`},get children(){return Br()}}),y(u,{get when(){return k()===`appearance`},get children(){return Vr()}}),y(u,{get when(){return k()===`shortcuts`},get children(){return Hr()}}),y(u,{get when(){return k()===`license`},get children(){return Qr()}}),y(u,{get when(){return k()===`feedback`},get children(){return $r()}}),y(u,{get when(){return k()===`mobile`},get children(){return ei()}})]}}),null),e})()}h([`click`,`input`,`keydown`]);export{Ct as SettingsView};