1import{r as e,t}from"./dist-CQS6rvaI.js";import{B as n,D as r,E as i,F as a,H as o,I as s,K as c,L as l,M as u,N as d,P as f,R as p,T as m,U as h,V as g,W as _,Y as v,a as y,d as b,i as x,j as S,k as C,n as w,q as T,r as ee,t as E,z as te}from"./index-rf_MMY20.js";var D=p(`<span class=peach-pro-mark aria-label="Pro feature">✦`),ne=p(`<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=p(`<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=p(`<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=p(`<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=p(`<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=p(`<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=p(`<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=p(`<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=p(`<p class=peach-settings-nav-label>MOBILE`),de=p(`<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=p(`<div class="peach-settings-row peach-settings-row--meta"><span>Last check</span><span class=peach-settings-value>`),pe=p(`<p class="peach-hint peach-hint-error"style=margin:0>`),me=p(`<p class=peach-hint style=margin:0;color:var(--peach-accent)>password changed ✓`),he=p(`<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=p(`<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=p(`<div class="peach-settings-row peach-settings-row--meta"><span class=peach-settings-value style=color:var(--peach-sync-ok)>`),ve=p(`<div class="peach-settings-row peach-settings-row--meta"><button class="peach-btn peach-btn--subtle peach-btn--sm">`),ye=p(`<label class=peach-label>new duress password`),be=p(`<input class=peach-settings-input type=password placeholder="duress password (min 8 chars)"autocomplete=new-password>`),xe=p(`<label class=peach-label>confirm duress password`),Se=p(`<input class=peach-settings-input type=password placeholder="confirm duress password"autocomplete=new-password>`),Ce=p(`<p class="peach-hint peach-hint-error">`),we=p(`<button class="peach-btn peach-btn--ghost peach-btn--sm"style=color:var(--peach-breach)>`),Te=p(`<button class="peach-btn peach-btn--accent peach-btn--sm">`),Ee=p(`<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=p(`<div class="peach-settings-row peach-settings-row--meta"><span class=peach-settings-value style=color:#e7b36b>`),Oe=p(`<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=p(`<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=p(`<span class=peach-settings-value style=color:var(--peach-sync-ok)>`),je=p(`<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=p(`<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=p(`<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`),Pe=p(`<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><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`),Fe=p(`<button class="peach-btn peach-btn--subtle peach-btn--sm">`),Ie=p(`<div class=peach-settings-body><div class=peach-pro-upgrade><div class=peach-pro-upgrade-hero><svg class=peach-sync-hero-icon width=36 height=36 viewBox="0 0 36 36"fill=none aria-hidden=true><circle cx=9 cy=18 r=4.5 stroke=currentColor stroke-width=1.2 opacity=0.9></circle><circle cx=27 cy=18 r=4.5 stroke=currentColor stroke-width=1.2 opacity=0.9></circle><path d="M13.5 15.5C15 12 17 10 18 10C19 10 21 12 22.5 15.5"stroke=currentColor stroke-width=1.2 stroke-linecap=round opacity=0.6></path><path d="M13.5 20.5C15 24 17 26 18 26C19 26 21 24 22.5 20.5"stroke=currentColor stroke-width=1.2 stroke-linecap=round opacity=0.6></path><path d="M13.5 18H22.5"stroke=currentColor stroke-width=1.2 stroke-linecap=round opacity=0.35></path><path d="M20 16L22.5 18L20 20"stroke=var(--peach-accent) stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></path><path d="M16 16L13.5 18L16 20"stroke=var(--peach-accent) stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></path></svg><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 →`),Le=p(`<button class="peach-btn peach-btn--subtle peach-btn--sm">Mark current network as trusted`),Re=p(`<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">`),ze=p(`<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><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">Pair a new device</button><button class="peach-btn peach-btn--subtle peach-btn--sm">Pair with another 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><span class=peach-sync-device-meta>Tailscale is always trusted</span></div><div class="peach-settings-row peach-settings-row--meta peach-settings-row--stack"><span class=peach-sync-section-label>Advanced`),Be=p(`<div class=peach-sync-device-row><div class=peach-sync-device-info><span class=peach-sync-device-name></span><span class=peach-sync-device-meta>Last seen: <!> · Last synced: </span></div><button class="peach-btn peach-btn--ghost peach-btn--sm peach-sync-remove-btn">Remove`),Ve=p(`<div class=peach-sync-device-row><span class=peach-sync-device-name></span><button class="peach-btn peach-btn--ghost peach-btn--sm peach-sync-remove-btn">Remove`),He=p(`<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`),Ue=p(`<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">`),We=p(`<button class=peach-accent-swatch>`),Ge=p(`<button class=peach-font-swatch><span class=peach-font-swatch-glyph></span><span class=peach-font-swatch-name>`),Ke=p(`<button class="peach-btn peach-btn--ghost peach-btn--sm">`),qe=p(`<div class=peach-shortcuts-conflict>`),Je=p(`<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`),Ye=p(`<button class=peach-shortcut-reset title="Reset to default">↺`),Xe=p(`<div class=peach-shortcut-row><span class=peach-shortcut-row-label></span><button class=peach-shortcut-chip>`),Ze=p(`<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>`),Qe=p(`<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>`),$e=p(`<div class=peach-settings-body>`),et=p(`<p class=peach-pro-key-error>That key doesn't look right.`),tt=p(`<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`),nt=p(`<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`),rt=p(`<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>`),it=p(`<div class=peach-pro-active-feature><span class=peach-pro-active-feature-mark>✦</span><span class=peach-pro-active-feature-name>`),at=p(`<p class="peach-feedback-result peach-feedback-result--ok">Sent — thank you`),ot=p(`<p class="peach-feedback-result peach-feedback-result--err">Failed to send — try again`),st=p(`<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`),ct=p(`<button>`),lt=p(`<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>`),ut=p(`<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>`),dt=[`Bug report`,`Feature request`,`Question`,`Other`];function ft(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 pt(e){return e===`security`||e===`vault`||e===`sync`||e===`appearance`||e===`shortcuts`||e===`license`||e===`feedback`||e===`mobile`}function O(d){let p=chrome.runtime.getManifest().version,O=d.initialSection,[k,A]=T(O&&pt(O)?O:null),[mt,ht]=T(!1),[gt,_t]=T(null),[vt,yt]=T(null),[bt,xt]=T(``),[St,j]=T(null),[Ct,wt]=T(null),[Tt,Et]=T(!1),[Dt,Ot]=T([]),[kt,At]=T([]),[M,jt]=T(`offline`),[Mt,Nt]=T(void 0),[Pt,Ft]=T(!1),N=()=>d.isPro??Pt(),[It,Lt]=T(!1),[P,Rt]=T(null),[zt,Bt]=T(!1),[F,Vt]=T(null),[I,L]=T(!1),[R,Ht]=T(null),[Ut,Wt]=T(0),[Gt,Kt]=T(!1),[z,qt]=T(``),[B,Jt]=T(``),[Yt,Xt]=T(``),[Zt,Qt]=T(!1),[$t,V]=T(null),[en,tn]=T(!1),[H,nn]=T(!1),[rn,U]=T(!1),[an,on]=T(``),[sn,cn]=T(``),[W,G]=T(``),[K,q]=T(!1),[ln,J]=T(null),[un,Y]=T(null),[X,dn]=T([]);function fn(){try{return e(`Autofill`)}catch{return null}}let pn=fn(),[mn,hn]=T(!1),[gn,_n]=T(!1),vn=t.getPlatform()===`android`,[yn,bn]=T(null),[xn,Sn]=T(null),[Cn,wn]=T(`Bug report`),[Z,Tn]=T(``),[En,Dn]=T(!1),[On,Q]=T(null);v(async()=>{let[e,t,n,r,i,a]=await Promise.all([C({type:`GET_LICENSE`}),C({type:`GET_SYNC_STATE`}),C({type:`GET_PASSKEY_PROVIDER_STATE`}),C({type:`IS_DURESS_ENABLED`}),C({type:`GET_SETTINGS`}),C({type:`GET_LICENSE_KEY`})]);if(e.ok&&yt(e.data??null),t.ok){let e=t;e.data&&(Ot(e.data.pairedDevices??[]),At(e.data.trustedNetworks??[]),jt(e.data.status??`offline`),Nt(e.data.lastSyncAt),Ft(e.data.isPro??!1))}if(n.ok&&Rt(n.data??null),r.ok&&nn(r.data??!1),i.ok){let e=i.data;Wt(e?.declinedCardFingerprints?.length??0)}a.ok&&vr(a.data??null);let o=await C({type:`GET_ENTRIES`});if(o.ok&&dn((o.data??[]).filter(e=>e.canary?.webhookUrl).map(e=>({id:e.id,title:e.title,canary:e.canary}))),vn){if(pn){let{enabled:e}=await pn.isEnabledAsAutofillService();hn(e)}_n(await b())}chrome.runtime.onMessage.addListener(e=>{e.type===`SYNC_STATE_UPDATE`&&(Ot(e.pairedDevices??[]),At(e.trustedNetworks??[]),jt(e.status??`offline`),Nt(e.lastSyncAt),Ft(e.isPro??!1))})});async function kn(){if(V(null),!z().trim()){V(`enter your current password`);return}if(B().length<12){V(`new password must be at least 12 characters`);return}if(B()!==Yt()){V(`new passwords do not match`);return}if(B()===z()){V(`new password must differ from current`);return}Qt(!0);let e=await C({type:`CHANGE_PASSWORD`,payload:{currentPassword:z(),newPassword:B()}});e.ok?(tn(!0),qt(``),Jt(``),Xt(``),setTimeout(()=>{tn(!1),Kt(!1)},2200)):V(e.error??`failed to change password`),Qt(!1)}let[An,jn]=T(!1);async function Mn(e){await navigator.clipboard.writeText(e),jn(!0),setTimeout(()=>jn(!1),2e3)}async function Nn(){let e=bt().trim();if(!e)return;Et(!0),j(null),wt(null);let t=await C({type:`ACTIVATE_LICENSE`,payload:{key:e}});if(Et(!1),t.ok){let n=t.data;n?.valid?(yt(n),vr(e),wt(`License activated!`),xt(``)):j(`Invalid license key`)}else j(`Activation failed`)}async function Pn(){let e=P();if(!e||!e.supported)return;Bt(!0);let t=await C({type:`SET_PASSKEY_PROVIDER_ENABLED`,payload:{enabled:!e.enabled}});Bt(!1),t.ok&&Rt(t.data??null)}async function Fn(){ht(!0),_t(null);let e=await C({type:`CHECK_ALL_BREACHES`});if(ht(!1),e.ok){let t=e.data??{},n=Object.values(t).filter(e=>e>0).length;_t(n>0?`${n} password${n>1?`s`:``} found in breaches`:`All passwords clean`),d.onBreachCheckDone()}}async function In(){M()!==`not_trusted`&&(Lt(!0),await C({type:`TRIGGER_SYNC`}),setTimeout(()=>Lt(!1),3e3))}async function Ln(e){await C({type:`REMOVE_PAIRED_DEVICE`,payload:{deviceId:e}})}async function Rn(e,t,n){await C({type:`REMOVE_TRUSTED_NETWORK`,payload:{ssid:e,bssid:t,isTailscale:n}})}async function zn(){await C({type:`MARK_NETWORK_TRUSTED`})}let[Bn,Vn]=T(!1),[Hn,Un]=T(!1);async function Wn(){Un(!0);let e=await C({type:`RESET_SYNC_IDENTITY`});Un(!1),e.ok&&(Ot([]),Vn(!1))}function Gn(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 Kn(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 qn(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 Jn(){return kt().length>0}async function Yn(){let e=W().trim(),t=an().trim(),n=sn().trim();if(!e){J(`enter your main password to confirm`);return}if(t.length<8){J(`duress password must be at least 8 characters`);return}if(t===e){J(`duress password must differ from your main password`);return}if(t!==n){J(`passwords do not match`);return}q(!0),J(null);let r=await C({type:`VERIFY_MAIN_PASSWORD`,payload:{password:e}});if(!r.ok||!r.data){J(`incorrect main password`),q(!1);return}let i=await C({type:`SETUP_DURESS`,payload:{duressPassword:t}});q(!1),i.ok?(nn(!0),U(!1),on(``),cn(``),G(``),Y(`Duress password set. If entered, a decoy vault will be shown.`),setTimeout(()=>Y(null),5e3)):J(i.error??`failed to set duress password`)}async function Xn(){await C({type:`UPDATE_SETTINGS`,payload:{declinedCardFingerprints:[]}}),Wt(0)}async function Zn(){L(!0),Ht(null);let e=await C({type:`COUNT_DUPLICATES`});L(!1),e.ok&&Vt(e.data??0)}async function Qn(){L(!0);let e=await C({type:`DEDUPLICATE_ENTRIES`});L(!1),e.ok&&(Ht(e.data??0),Vt(0))}async function $n(){let e=W().trim();if(!e){J(`enter your main password to confirm`);return}q(!0),J(null);let t=await C({type:`VERIFY_MAIN_PASSWORD`,payload:{password:e}});if(!t.ok||!t.data){J(`incorrect main password`),q(!1);return}let n=await C({type:`DISABLE_DURESS`});q(!1),n.ok?(nn(!1),U(!1),G(``),Y(`Duress password disabled.`),setTimeout(()=>Y(null),4e3)):J(n.error??`failed to disable duress password`)}async function er(){if(!Z().trim()||En())return;Dn(!0),Q(null);let e=await C({type:`SUBMIT_FEEDBACK`,payload:{category:Cn(),message:Z().trim(),version:p,browser:navigator.userAgent}});Dn(!1),e.ok?(Q(`success`),Tn(``),setTimeout(()=>Q(null),4e3)):Q(`error`)}function tr(){k()===null?d.onBack():A(null)}function nr(){let e=k();return e===null?`settings`:e===`license`?`account`:e}function $(e){return(()=>{var t=ne(),n=t.firstChild,r=n.nextSibling.firstChild,i=r.nextSibling;return t.$$click=()=>A(e.section),f(n,()=>e.icon()),f(r,()=>e.name,null),f(r,_(o,{get when(){return a(()=>!!e.pro)()&&!N()},get children(){return D()}}),null),f(i,()=>e.desc),t})()}let rr=()=>re(),ir=()=>ie(),ar=()=>ae(),or=()=>oe(),sr=()=>se(),cr=()=>ce(),lr=()=>le();function ur(){return(()=>{var e=de(),t=e.firstChild.nextSibling,n=t.nextSibling,r=n.nextSibling,i=r.nextSibling,s=i.firstChild;return s.firstChild,f(e,()=>$({section:`security`,name:`Security`,desc:`Locking, breach monitoring, passkeys`,icon:rr}),t),f(e,()=>$({section:`license`,name:`Peach Pro`,desc:N()?`Active · manage your license`:`Upgrade · $39 · yours forever`,icon:ir}),t),f(e,()=>$({section:`vault`,name:`Vault`,desc:`Entries, health, import & export`,icon:ar}),n),f(e,()=>$({section:`sync`,name:`Sync`,desc:`Paired devices & trusted networks`,icon:or,pro:!0}),n),f(e,()=>$({section:`appearance`,name:`Appearance`,desc:`Theme & accent color`,icon:sr}),r),f(e,()=>$({section:`shortcuts`,name:`Shortcuts`,desc:`Keyboard reference`,icon:cr}),r),f(e,_(o,{when:vn,get children(){return[ue(),a(()=>$({section:`mobile`,name:`Mobile`,desc:`Autofill & biometric settings`,icon:or}))]}}),r),f(e,()=>$({section:`feedback`,name:`Feedback`,desc:`Report issues, suggest features`,icon:lr}),i),f(s,p,null),e})()}function dr(){return(()=>{var e=Oe(),t=e.firstChild,r=t.firstChild.nextSibling,i=r.firstChild.nextSibling,s=r.nextSibling,l=s.firstChild.nextSibling,p=s.nextSibling.nextSibling,m=p.firstChild.nextSibling,h=p.nextSibling,g=h.firstChild.nextSibling,v=h.nextSibling,y=v.nextSibling,b=y.firstChild.nextSibling,x=y.nextSibling,S=x.nextSibling,C=S.firstChild.nextSibling,w=S.nextSibling,T=w.nextSibling,ee=T.firstChild.nextSibling,E=T.nextSibling,te=E.nextSibling,D=te.firstChild.nextSibling,ne=te.nextSibling,re=ne.firstChild.nextSibling,ie=ne.nextSibling,ae=ie.firstChild.nextSibling;return ie.nextSibling,i.$$click=()=>void d.onLockOnCloseChange(!d.lockOnClose),l.addEventListener(`change`,e=>void d.onAutoLockMinutesChange(Number(e.currentTarget.value))),m.$$click=()=>void d.onBreachMonitoringChange(!d.breachMonitoring),g.$$click=()=>void Fn(),f(g,()=>mt()?`checking...`:`run`),f(t,_(o,{get when(){return gt()},get children(){var e=fe(),t=e.firstChild.nextSibling;return f(t,gt),e}}),v),b.$$click=()=>{Kt(e=>!e),V(null)},f(b,()=>Gt()?`cancel`:`change`),f(t,_(o,{get when(){return Gt()},get children(){var e=he(),t=e.firstChild,n=t.nextSibling,r=n.nextSibling,i=r.nextSibling;return t.$$input=e=>qt(e.target.value),n.$$input=e=>Jt(e.target.value),r.$$keydown=e=>{e.key===`Enter`&&kn()},r.$$input=e=>Xt(e.target.value),f(e,_(o,{get when(){return $t()},get children(){var e=pe();return f(e,$t),e}}),i),f(e,_(o,{get when(){return en()},get children(){return me()}}),i),i.$$click=()=>void kn(),f(i,()=>Zt()?`saving…`:`save new password`),c(()=>i.disabled=Zt()||!z()||!B()||!Yt()),c(()=>t.value=z()),c(()=>n.value=B()),c(()=>r.value=Yt()),e}}),x),f(C,()=>H()?`on`:`off`),f(t,_(o,{get when(){return a(()=>!!H())()&&!rn()},get children(){return ge()}}),w),f(t,_(o,{get when(){return un()},get children(){var e=_e(),t=e.firstChild;return f(t,un),e}}),w),f(t,_(o,{get when(){return!rn()},get children(){var e=ve(),t=e.firstChild;return t.$$click=()=>{U(!0),J(null),Y(null),on(``),cn(``),G(``)},f(t,()=>H()?`Change / disable`:`Set up`),e}}),w),f(t,_(o,{get when(){return rn()},get children(){var e=Ee(),t=e.firstChild.nextSibling,n=t.nextSibling,r=n.firstChild;return t.$$input=e=>G(e.currentTarget.value),f(e,_(o,{get when(){return!H()},get children(){return[ye(),(()=>{var e=be();return e.$$input=e=>on(e.currentTarget.value),c(()=>e.value=an()),e})(),xe(),(()=>{var e=Se();return e.$$input=e=>cn(e.currentTarget.value),c(()=>e.value=sn()),e})()]}}),n),f(e,_(o,{get when(){return ln()},get children(){var e=Ce();return f(e,ln),e}}),n),r.$$click=()=>{U(!1),J(null)},f(n,_(o,{get when(){return H()},get children(){var e=we();return e.$$click=()=>void $n(),f(e,()=>K()?`disabling...`:`disable duress`),c(()=>e.disabled=K()),e}}),null),f(n,_(o,{get when(){return!H()},get children(){var e=Te();return e.$$click=()=>void Yn(),f(e,()=>K()?`saving...`:`save`),c(()=>e.disabled=K()||!W()||!an()||!sn()),e}}),null),c(()=>t.value=W()),e}}),w),f(ee,(()=>{var e=a(()=>X().length>0);return()=>e()?`${X().length} active`:`none`})()),f(t,_(o,{get when(){return X().length>0},get children(){return _(n,{get each(){return X()},children:e=>(()=>{var t=ke(),n=t.firstChild,r=n.nextSibling;return f(n,()=>e.title),r.$$click=()=>void wr(e),f(r,(()=>{var t=a(()=>yn()===e.id);return()=>t()?`sending…`:a(()=>xn()?.id===e.id)()?xn().ok?`sent ✓`:`failed ✗`:`test`})()),c(()=>r.disabled=yn()===e.id),t})()})}}),E),D.$$click=()=>void Pn(),f(re,()=>P()?.statusLabel??`Unavailable`),f(ae,()=>P()?.browserLabel??`Unknown`,null),f(ae,()=>P()?.supported?` ✓`:` (interception unavailable)`,null),f(t,_(o,{get when(){return P()?.conflict},get children(){var e=De(),t=e.firstChild;return f(t,()=>P().conflict),e}}),null),c(e=>{var t=`peach-toggle ${d.lockOnClose?`is-on`:``}`,n=`peach-toggle ${d.breachMonitoring?`is-on`:``}`,r=mt(),a=`peach-duress-status-pill ${H()?`is-active`:``}`,o=`peach-toggle ${P()?.enabled?`is-on`:``}`,s=!P()?.supported||zt();return t!==e.e&&u(i,e.e=t),n!==e.t&&u(m,e.t=n),r!==e.a&&(g.disabled=e.a=r),a!==e.o&&u(C,e.o=a),o!==e.i&&u(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}),c(()=>l.value=String(d.autoLockMinutes)),e})()}function fr(){return(()=>{var e=Pe(),t=e.firstChild,n=t.firstChild.nextSibling,r=n.firstChild.nextSibling,i=n.nextSibling;i.firstChild;var s=i.nextSibling,l=s.nextSibling,u=l.firstChild.nextSibling,p=l.nextSibling,m=p.firstChild.nextSibling,h=p.nextSibling,g=h.nextSibling,v=g.firstChild.nextSibling,y=g.nextSibling,b=y.firstChild.nextSibling,x=y.nextSibling.firstChild.nextSibling.nextSibling;return f(r,()=>d.entriesCount),f(i,_(o,{get when(){return R()!==null},get fallback(){return(()=>{var e=Fe();return e.$$click=()=>void Zn(),f(e,(()=>{var e=a(()=>!!I());return()=>e()?`scanning...`:a(()=>F()===null)()?`scan`:a(()=>F()===0)()?`none found`:`${F()} found — remove?`})()),c(()=>e.disabled=I()),e})()},get children(){var e=Ae();return f(e,(()=>{var e=a(()=>R()===0);return()=>e()?`already clean`:`removed ${R()}`})()),e}}),null),f(t,_(o,{get when(){return a(()=>F()!==null&&F()>0)()&&R()===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 f(t,F,n),f(t,()=>F()===1?`entry`:`entries`,r),i.$$click=()=>Vt(null),a.$$click=()=>void Qn(),f(a,()=>I()?`removing...`:`remove duplicates`),c(()=>a.disabled=I()),e}}),s),u.addEventListener(`change`,e=>void d.onTrashRetentionChange(Number(e.currentTarget.value))),S(m,`click`,d.onOpenHealth,!0),f(t,_(o,{get when(){return Ut()>0},get children(){var e=Me(),t=e.firstChild,n=t.firstChild,r=n.nextSibling;r.nextSibling;var i=t.nextSibling;return f(t,Ut,n),f(t,()=>Ut()===1?``:`s`,r),i.$$click=()=>void Xn(),e}}),h),S(v,`click`,d.onImport,!0),S(b,`click`,d.onExport,!0),x.$$click=()=>d.onOpenFileImport?.(),f(t,_(o,{get when(){return d.onOpenPanic},get children(){var e=Ne(),t=e.firstChild.nextSibling.nextSibling;return t.$$click=()=>d.onOpenPanic?.(),e}}),null),c(()=>u.value=String(d.trashRetentionDays)),e})()}function pr(){return N()?(()=>{var e=ze(),t=e.firstChild.firstChild,n=t.firstChild.nextSibling,r=n.firstChild,i=t.nextSibling,s=i.firstChild.nextSibling,u=i.nextSibling,p=u.firstChild,m=u.nextSibling,h=m.firstChild,g=h.firstChild.nextSibling;g.nextSibling;var v=h.nextSibling,y=v.firstChild,b=y.nextSibling,x=m.nextSibling,S=x.firstChild,C=S.firstChild.nextSibling;C.nextSibling;var w=S.nextSibling,T=x.nextSibling;return T.firstChild,f(n,()=>qn(M()),null),f(s,(()=>{var e=a(()=>!!Mt());return()=>e()?Gn(Mt()):`Never synced`})()),p.$$click=()=>void In(),f(p,()=>It()?`Syncing...`:`Sync now`),f(h,()=>Dt().length,g),f(m,()=>Dt().map(e=>(()=>{var t=Be(),n=t.firstChild,r=n.firstChild,i=r.nextSibling,a=i.firstChild.nextSibling;a.nextSibling;var o=n.nextSibling;return f(r,()=>e.displayName),f(i,()=>Gn(e.lastSeenAt),a),f(i,()=>Gn(e.lastSyncAt),null),o.$$click=()=>void Ln(e.deviceId),t})()),v),y.$$click=()=>d.onOpenSyncPairing?.(`initiate`),b.$$click=()=>d.onOpenSyncPairing?.(`accept`),f(S,()=>kt().length,C),f(x,()=>kt().filter(e=>!e.isTailscale).map(e=>(()=>{var t=Ve(),n=t.firstChild,r=n.nextSibling;return f(n,()=>e.ssid??`Unknown network`),r.$$click=()=>void Rn(e.ssid,e.bssid,e.isTailscale),t})()),w),f(w,_(o,{get when(){return!Jn()},get children(){var e=Le();return e.$$click=()=>void zn(),e}})),f(T,_(o,{get when(){return Bn()},get fallback(){return(()=>{var e=He(),t=e.firstChild.nextSibling;return t.$$click=()=>Vn(!0),e})()},get children(){var e=Re(),t=e.firstChild.nextSibling.nextSibling.firstChild,n=t.nextSibling;return t.$$click=()=>Vn(!1),n.$$click=()=>void Wn(),f(n,()=>Hn()?`Resetting...`:`Reset`),c(e=>{var r=Hn(),i=Hn();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),c(e=>{var t=Kn(M()),n=M()===`not_trusted`||M()===`syncing`;return t!==e.e&&l(r,`background`,e.e=t),n!==e.t&&(p.disabled=e.t=n),e},{e:void 0,t:void 0}),e})():(()=>{var e=Ie(),t=e.firstChild.firstChild.nextSibling.nextSibling,n=t.nextSibling;return t.$$click=()=>A(`license`),n.$$click=()=>A(`license`),e})()}function mr(){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 i=Ue(),a=i.firstChild.firstChild.nextSibling,o=a.firstChild.nextSibling,u=a.nextSibling.nextSibling,p=u.firstChild.nextSibling,m=u.nextSibling.nextSibling,h=m.firstChild.nextSibling,g=m.nextSibling.nextSibling,v=g.firstChild.nextSibling,y=g.nextSibling.nextSibling.firstChild.nextSibling;return o.$$click=()=>d.onThemeChange(d.theme===`dark`?`light`:`dark`),f(o,()=>d.theme===`dark`?`Switch to light`:`Switch to dark`),f(p,_(n,{each:r,children:e=>(()=>{var t=We();return t.$$click=()=>void d.onAccentChange(e.name),c(n=>{var r=d.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&&l(t,`background`,n.t=i),a!==n.a&&s(t,`aria-label`,n.a=a),o!==n.o&&s(t,`title`,n.o=o),n},{e:void 0,t:void 0,a:void 0,o:void 0}),t})()})),f(h,_(n,{each:e,children:e=>(()=>{var t=Ge(),n=t.firstChild,r=n.nextSibling;return t.$$click=()=>void d.onDisplayFontChange(e.id),f(n,()=>e.preview),f(r,()=>e.label),c(n=>{var r=d.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&&s(t,`data-font-preview`,n.t=i),a!==n.a&&s(t,`aria-label`,n.a=a),o!==n.o&&s(t,`title`,n.o=o),n},{e:void 0,t:void 0,a:void 0,o:void 0}),t})()})),f(v,_(n,{each:t,children:e=>(()=>{var t=Ke();return t.$$click=()=>void d.onTextSizeChange(e.id),f(t,()=>e.label),c(()=>t.classList.toggle(`is-active`,d.textSize===e.id)),t})()})),y.$$click=()=>void d.onReduceMotionChange(!d.reduceMotion),f(y,()=>d.reduceMotion?`On`:`Off`),i})()}function hr(){let[e,t]=T(null),[r,i]=T(null);function s(e){i(null),t(e)}function l(){t(null),i(null)}function u(e,n){let r=ee(d.shortcuts,n,e);if(r){i(`Already bound to "${w.find(e=>e.action===r)?.label??r}"`);return}let a={...d.shortcuts,[e]:n};t(null),i(null),d.onShortcutsChange(a)}function p(e){let t={...d.shortcuts,[e]:E[e]};d.onShortcutsChange(t)}function m(){d.onShortcutsChange({...E})}function h(t){if(t.preventDefault(),t.stopPropagation(),t.key===`Escape`){l();return}let n=y(t);if(!n)return;let r=e();r&&u(r,n)}return(()=>{var t=Je(),i=t.firstChild;i.firstChild;var a=i.nextSibling;a.firstChild;var c=a.nextSibling,u=c.firstChild,d=u.firstChild.nextSibling,v=u.nextSibling;return f(i,_(n,{get each(){return w.filter(e=>e.scope===`entry`)},children:t=>g(t,e,s,l,p,h)}),null),f(a,_(n,{get each(){return w.filter(e=>e.scope===`global`)},children:t=>g(t,e,s,l,p,h)}),null),f(t,_(o,{get when(){return r()},get children(){var e=qe();return f(e,r),e}}),c),d.$$click=e=>{e.preventDefault(),chrome.tabs.create({url:`chrome://extensions/shortcuts`})},v.$$click=m,t})();function g(e,t,n,r,i,s){let l=()=>t()===e.action,u=()=>d.shortcuts[e.action],p=()=>{let t=u(),n=E[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=Xe(),d=t.firstChild,m=d.nextSibling;return f(d,()=>e.label),te(e=>{e&&queueMicrotask(()=>{l()&&e.focus()})},m),m.$$keydown=e=>{l()&&s(e)},m.$$click=()=>l()?r():n(e.action),f(m,(()=>{var e=a(()=>!!l());return()=>e()?`Press a key…`:x(u())})()),f(t,_(o,{get when(){return a(()=>!!p())()&&!l()},get children(){var t=Ye();return t.$$click=()=>i(e.action),t}}),null),c(e=>{var t=!!l(),n=!!p();return t!==e.e&&m.classList.toggle(`is-capturing`,e.e=t),n!==e.t&&m.classList.toggle(`is-custom`,e.t=n),e},{e:void 0,t:void 0}),t})()}}let gr=[{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`}],[_r,vr]=T(null),[yr,br]=T(!1),[xr,Sr]=T(!1);async function Cr(){Sr(!0),await C({type:`DEACTIVATE_LICENSE`}),yt(null),await d.onLicenseChange?.(),Sr(!1)}async function wr(e){bn(e.id),Sn(null);let t=await C({type:`FIRE_CANARY_PING`,payload:{webhookUrl:e.canary.webhookUrl,entryTitle:e.title,trigger:`test`}});Sn({id:e.id,ok:t.ok}),bn(null),setTimeout(()=>Sn(t=>t?.id===e.id?null:t),3e3)}function Tr(){async function e(){await Nn(),(vt()?.valid??!1)&&vt()?.plan===`pro`&&await d.onLicenseChange?.()}return(()=>{var t=$e();return f(t,_(o,{get when(){return N()},get fallback(){return _(o,{get when(){return yr()},get fallback(){return(()=>{var e=nt(),t=e.firstChild,r=t.firstChild,i=t.nextSibling,a=i.nextSibling.firstChild.nextSibling.nextSibling.nextSibling;return f(r,_(m,{class:`peach-pro-upgrade-mark`})),f(i,_(n,{each:gr,children:e=>(()=>{var t=rt(),n=t.firstChild.nextSibling.firstChild,r=n.nextSibling;return f(n,()=>e.name),f(r,()=>e.desc),c(()=>t.classList.toggle(`is-highlighted`,d.upgradeHighlight===e.feature)),t})()})),a.$$click=()=>br(!0),e})()},get children(){var t=tt(),n=t.firstChild,r=n.nextSibling,a=r.nextSibling,l=a.nextSibling;return f(t,_(i,{}),n),r.$$keydown=t=>{t.key===`Enter`&&e()},r.$$input=e=>xt(e.currentTarget.value),s(r,`spellcheck`,!1),f(t,_(o,{get when(){return St()},get children(){return et()}}),a),a.$$click=()=>void e(),f(a,()=>Tt()?`activating…`:`Activate`),l.$$click=()=>{br(!1),j(null),xt(``)},c(()=>a.disabled=Tt()||!bt().trim()),c(()=>r.value=bt()),t}})},get children(){var e=Qe(),t=e.firstChild,r=t.firstChild,i=r.nextSibling.nextSibling,a=t.nextSibling,s=a.nextSibling;return f(r,_(m,{class:`peach-pro-active-mark`})),f(i,()=>ft(vt()?.issued)),f(e,_(o,{get when(){return _r()},get children(){var e=Ze(),t=e.firstChild.nextSibling.firstChild,n=t.nextSibling;return f(t,()=>_r()),n.$$click=()=>Mn(_r()),f(n,()=>An()?`✓`:`copy`),e}}),a),f(a,_(n,{each:gr,children:e=>(()=>{var t=it(),n=t.firstChild.nextSibling;return f(n,()=>e.name),t})()})),s.$$click=()=>void Cr(),f(s,()=>xr()?`Deactivating…`:`Deactivate`),c(()=>s.disabled=xr()),e}})),t})()}function Er(){return(()=>{var e=st(),t=e.firstChild,r=t.firstChild.nextSibling.nextSibling,i=r.nextSibling.nextSibling,a=i.nextSibling,s=a.firstChild.nextSibling;s.nextSibling;var l=a.nextSibling;return f(r,_(n,{each:dt,children:e=>(()=>{var t=ct();return t.$$click=()=>wn(e),f(t,e),c(()=>u(t,`peach-feedback-chip ${Cn()===e?`is-active`:``}`)),t})()})),i.$$input=e=>Tn(e.currentTarget.value),f(a,p,s),f(t,_(o,{get when(){return On()===`success`},get children(){return at()}}),l),f(t,_(o,{get when(){return On()===`error`},get children(){return ot()}}),l),l.$$click=()=>void er(),f(l,()=>En()?`Sending...`:`Send feedback`),c(()=>l.disabled=En()||!Z().trim()),c(()=>i.value=Z()),e})()}function Dr(){return(()=>{var e=lt(),t=e.firstChild,n=t.firstChild.nextSibling.firstChild,r=n.nextSibling,i=t.nextSibling.firstChild.nextSibling.firstChild;return f(n,()=>mn()?`Enabled`:`Disabled`),r.$$click=()=>void pn?.openAutofillSettings(),f(r,()=>mn()?`Change`:`Enable`),f(i,()=>gn()?`Available`:`Not available`),e})()}return(()=>{var e=ut(),t=e.firstChild.firstChild,n=t.nextSibling;return t.$$click=tr,f(n,nr),f(e,_(h,{get fallback(){return ur()},get children(){return[_(g,{get when(){return k()===`security`},get children(){return dr()}}),_(g,{get when(){return k()===`vault`},get children(){return fr()}}),_(g,{get when(){return k()===`sync`},get children(){return pr()}}),_(g,{get when(){return k()===`appearance`},get children(){return mr()}}),_(g,{get when(){return k()===`shortcuts`},get children(){return hr()}}),_(g,{get when(){return k()===`license`},get children(){return Tr()}}),_(g,{get when(){return k()===`feedback`},get children(){return Er()}}),_(g,{get when(){return k()===`mobile`},get children(){return Dr()}})]}}),null),e})()}d([`click`,`input`,`keydown`]);export{O as SettingsView};