@mavea/mavea 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/.vite/manifest.json +298 -298
  3. package/dist/assets/{AnnotationLayer-qV6CIUZv.js → AnnotationLayer-8JABh1Dm.js} +0 -0
  4. package/dist/assets/{AppCommandPalette-BHaYBZ5e.js → AppCommandPalette-CgDUWU08.js} +1 -1
  5. package/dist/assets/{CheckLogRail-DkHIHL0E.js → CheckLogRail-DO7sbZwC.js} +1 -1
  6. package/dist/assets/{ConversationVideoStudio-C1sd4k53.js → ConversationVideoStudio-tpqQQnOs.js} +1 -1
  7. package/dist/assets/{CourseLessonReader-YCcNKEW7.js → CourseLessonReader-PFJn-4tj.js} +2 -2
  8. package/dist/assets/{CoursesApp-Dz6xjf4V.js → CoursesApp-5pnHYJR8.js} +1 -1
  9. package/dist/assets/{DashPresent-5SRScC2i.js → DashPresent-B6MP1i_4.js} +1 -1
  10. package/dist/assets/{DashboardDetail-DOfm8UCQ.js → DashboardDetail-DYFghZ4p.js} +1 -1
  11. package/dist/assets/{DashboardLoopGate-Cf0y_HQ7.js → DashboardLoopGate-C0blM1w9.js} +2 -2
  12. package/dist/assets/DashboardLoopRuntime-C9R-z9-o.js +1 -0
  13. package/dist/assets/{DashboardsApp-_gbfdbX6.js → DashboardsApp-Dh_jh1dF.js} +2 -2
  14. package/dist/assets/{DeepZoomApp-BOLEl-kQ.js → DeepZoomApp-UEPtylG7.js} +1 -1
  15. package/dist/assets/{DelegatePanel-CHEB-OZl.js → DelegatePanel-DKWsRY9I.js} +1 -1
  16. package/dist/assets/{DemoGallery-DBqnu8TR.js → DemoGallery-CkuqAXje.js} +1 -1
  17. package/dist/assets/{DropSelect-DjbdVfIR.js → DropSelect-QcBm3N4D.js} +1 -1
  18. package/dist/assets/{ExportModal-CLobMv1F.js → ExportModal-Ya0VBbxa.js} +1 -1
  19. package/dist/assets/{ExtractionPreview-QZ2VHmsb.js → ExtractionPreview-BFrmqKDo.js} +1 -1
  20. package/dist/assets/{FeatureUseNotice-Dc8joBGM.js → FeatureUseNotice-Dc3GNBvy.js} +1 -1
  21. package/dist/assets/{FlagshipCommandPalette-DnWuBjYI.js → FlagshipCommandPalette-B1yHwI6V.js} +1 -1
  22. package/dist/assets/{FlagshipShowcase-3qQDOK6g.js → FlagshipShowcase-BHAlRDAE.js} +1 -1
  23. package/dist/assets/{FlashcardsApp-BQGM-Tr1.js → FlashcardsApp-DteNeHpz.js} +1 -1
  24. package/dist/assets/{GalleryApp-BWQ-J450.js → GalleryApp-DziLKFJZ.js} +1 -1
  25. package/dist/assets/{HonestByDesign-57LDf-gm.js → HonestByDesign-DZltb3Ss.js} +1 -1
  26. package/dist/assets/{HowItWorks-DMfPX3GK.js → HowItWorks-D-hgfN6a.js} +1 -1
  27. package/dist/assets/{LegalApp-CcO5Qq6R.js → LegalApp-ChzcKiY0.js} +1 -1
  28. package/dist/assets/{LegalMarkdownDocument-Be_fQbZ_.js → LegalMarkdownDocument-j6UHhPnp.js} +1 -1
  29. package/dist/assets/{LegalPageShell-B-HY1WG7.js → LegalPageShell-Wcsviye1.js} +1 -1
  30. package/dist/assets/{LibraryOverlay-BilW6q_z.js → LibraryOverlay-YHBrdVKo.js} +1 -1
  31. package/dist/assets/{LiveApp-DH3OxJFV.js → LiveApp-D6vkyhZb.js} +3 -3
  32. package/dist/assets/{LiveSettings-CuVMy7rZ.js → LiveSettings-C9cKOrSb.js} +1 -1
  33. package/dist/assets/{PinToDashboard-Cz5UJCmq.js → PinToDashboard-BCiWaSg8.js} +1 -1
  34. package/dist/assets/{PlanReview-CmUxzNqL.js → PlanReview-BIERfK1t.js} +1 -1
  35. package/dist/assets/{PresentationDeck-B_EI33Pp.js → PresentationDeck-BW_7qecK.js} +1 -1
  36. package/dist/assets/{PrismApp-DtLsPiQF.js → PrismApp-BY71jJvW.js} +2 -2
  37. package/dist/assets/{PrismBriefingPlayer-DzdtnFj4.js → PrismBriefingPlayer-DLAPs6eZ.js} +2 -2
  38. package/dist/assets/{PrismOverlay-D1cDZamt.js → PrismOverlay-DJDGPGxo.js} +3 -3
  39. package/dist/assets/{PrismWorkbench-BEIp4MiL.js → PrismWorkbench-DHLvpguj.js} +1 -1
  40. package/dist/assets/{PrivacyApp-B4DT2RUz.js → PrivacyApp-uMjq2z14.js} +1 -1
  41. package/dist/assets/{ReplayCard-Dx46HCBT.js → ReplayCard-F7U3LYAg.js} +2 -2
  42. package/dist/assets/{ReplayOverlay-CnJAxf0u.js → ReplayOverlay-BTldvkU7.js} +1 -1
  43. package/dist/assets/{RippleApp-D5j2VCt2.js → RippleApp-DZw8op-E.js} +2 -2
  44. package/dist/assets/{RippleOverlay-zcXAHPuJ.js → RippleOverlay-D7ItTvS-.js} +2 -2
  45. package/dist/assets/{SeeDontRead-Dqfzha0V.js → SeeDontRead-DmmtWAzn.js} +1 -1
  46. package/dist/assets/{ShareModal-DWxlrJSz.js → ShareModal-9jSn52Mw.js} +2 -2
  47. package/dist/assets/{ShipCourse-BavQppkt.js → ShipCourse-Up9gRR07.js} +1 -1
  48. package/dist/assets/{SignatureLoop-L8W2h62w.js → SignatureLoop-Cq790dMw.js} +1 -1
  49. package/dist/assets/{SynthesisApp-C2O6pFeM.js → SynthesisApp-4ZPLZgmJ.js} +2 -2
  50. package/dist/assets/{SynthesisOverlay-DLvwiSMv.js → SynthesisOverlay-iesJ0hEt.js} +1 -1
  51. package/dist/assets/{TermsApp-CxY1yorm.js → TermsApp-DL2hFKsv.js} +1 -1
  52. package/dist/assets/{TopicCanvas-LMI0zC7R.js → TopicCanvas-DozfZFto.js} +2 -2
  53. package/dist/assets/{TourPrism-CI-iJZil.js → TourPrism-kInUOv-M.js} +1 -1
  54. package/dist/assets/{TrackerTile-oz6IoG8m.js → TrackerTile-BryDo0sm.js} +2 -2
  55. package/dist/assets/{TwoSurfaces-Rnf-_WgY.js → TwoSurfaces-Cmj95ofx.js} +1 -1
  56. package/dist/assets/{WorldOverlay-BaQNNClA.js → WorldOverlay-yhxq328s.js} +1 -1
  57. package/dist/assets/{WowFeatures-C4efSbNV.js → WowFeatures-DDICbxl_.js} +1 -1
  58. package/dist/assets/{ZoomDeck-CBrr0yfy.js → ZoomDeck-CKOjYS9z.js} +1 -1
  59. package/dist/assets/canvas-vqIFVmtP.js +1 -0
  60. package/dist/assets/{capture-D8uPIcfj.js → capture-9OrAc1p2.js} +1 -1
  61. package/dist/assets/{confirmAdd-DzMO9jKV.js → confirmAdd-DkmbWaSk.js} +1 -1
  62. package/dist/assets/{dashboardEvents-DKl5rrTD.js → dashboardEvents-D-XVj666.js} +1 -1
  63. package/dist/assets/{generateBeats-DZHkvFvh.js → generateBeats-DtptFLlG.js} +1 -1
  64. package/dist/assets/{index-DmKgC_TJ.css → index-DrzNHwlO.css} +1 -1
  65. package/dist/assets/{index-Dk0QapqQ.js → index-zIa6h_8b.js} +3 -3
  66. package/dist/assets/{kokoro-P_fkcX-A.js → kokoro-B3oG_8sd.js} +1 -1
  67. package/dist/assets/{loader-DKJEcbPm.js → loader-DCA6Njbf.js} +2 -2
  68. package/dist/assets/{notes-B0-EE0FK.js → notes-B6eX5XWk.js} +1 -1
  69. package/dist/assets/{perfProbe-B9zJpjo9.js → perfProbe-CE7hsUEo.js} +1 -1
  70. package/dist/assets/{pin-CZAIlpXt.js → pin-BZuh1acO.js} +1 -1
  71. package/dist/assets/{portal-Dogggsub.js → portal-k_BMgWND.js} +1 -1
  72. package/dist/assets/{prewarm-B4ELBOxf.js → prewarm-uKxmzjjd.js} +1 -1
  73. package/dist/assets/{quietHours-CeBje_uU.js → quietHours-DI1ayIIq.js} +1 -1
  74. package/dist/assets/{registry-GeAC3ZD7.js → registry-1wlTAh5b.js} +1 -1
  75. package/dist/assets/{registry-CqhpLHM7.js → registry-B2QzCuWH.js} +1 -1
  76. package/dist/assets/{registry-CD1s3eQ-.js → registry-DtV2UjBx.js} +1 -1
  77. package/dist/assets/{registry-6MOD-I7p.js → registry-Dwbh-GWu.js} +1 -1
  78. package/dist/assets/{relate-BYdM5eiV.js → relate-UW-sUlJH.js} +1 -1
  79. package/dist/assets/{replay-TYXO0Brm.js → replay-B5TkHPri.js} +1 -1
  80. package/dist/assets/{useDashboardLoop-DDqCFJKY.js → useDashboardLoop-BoVNM-pT.js} +1 -1
  81. package/dist/assets/{useStudy-GwNcQWtv.js → useStudy-5CsF_L-s.js} +1 -1
  82. package/dist/assets/{walkSync-CPsd-xu7.js → walkSync-CT8kmbzY.js} +1 -1
  83. package/dist/index.html +2 -2
  84. package/package.json +1 -1
  85. package/dist/assets/DashboardLoopRuntime-CnN5VayH.js +0 -1
  86. package/dist/assets/canvas-Bsx3eSaS.js +0 -1
@@ -1 +1 @@
1
- import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{it as r}from"./index-Dk0QapqQ.js";import{n as i}from"./http-Lar_UMKb.js";import{S as a,f as o,g as s,n as c,p as l,r as u,w as d,x as f}from"./kokoro-P_fkcX-A.js";import{i as p,t as m}from"./info-CiqHR5cs.js";import{r as h,t as g}from"./store-gohr8YVT.js";import{a as _,t as v}from"./store-BWLbFXiY.js";import{n as ee}from"./DropSelect-DjbdVfIR.js";var y=t(),b=e();function te(){let e=(0,y.c)(2),[t,n]=(0,b.useState)(ne),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{if(typeof window>`u`)return;let e=()=>n(h());return window.addEventListener(g,e),()=>window.removeEventListener(g,e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,b.useEffect)(r,i),t}function ne(){return h()}var re=r(),x=n();function S(e){return e.split(` · `)[1]??e}function C({provider:e,value:t,onChange:n,ariaLabel:r=`Model`}){let i=p(e),a=(0,b.useId)(),o=(0,b.useRef)(null),s=(0,b.useRef)(null),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(-1),f=ee(c,o),h=i.suggestedModels,g=t||i.defaultModel,_=e=>`${a}-opt-${e}`,v=()=>{d(h.indexOf(g)),l(!0)},y=e=>{n(e),l(!1),s.current?.focus()};return(0,b.useEffect)(()=>{c&&u>=0&&document.getElementById(_(u))?.scrollIntoView?.({block:`nearest`})},[c,u]),(0,x.jsxs)(`div`,{className:`drop-select`,ref:o,children:[(0,x.jsx)(`input`,{ref:s,className:`setup-input drop-select-input`,role:`combobox`,"aria-expanded":c,"aria-controls":a,"aria-activedescendant":c&&u>=0?_(u):void 0,"aria-autocomplete":`none`,"aria-label":r,value:t,onChange:e=>{n(e.target.value),c||v(),d(-1)},onClick:()=>c?l(!1):v(),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),!c)return v();if(!h.length)return;let t=e.key===`ArrowDown`?1:-1;d(e=>(e+t+h.length)%h.length)}else e.key===`Enter`&&c&&u>=0?(e.preventDefault(),y(h[u])):e.key===`Escape`&&c&&(e.preventDefault(),l(!1))},onBlur:()=>l(!1),placeholder:i.defaultModel||i.modelPlaceholder,spellCheck:!1}),(0,x.jsx)(`button`,{type:`button`,className:`drop-select-chevron`,"aria-label":`Show model options`,"aria-expanded":c,tabIndex:-1,onPointerDown:e=>e.preventDefault(),onClick:()=>{s.current?.focus(),c?l(!1):v()},children:(0,x.jsx)(`svg`,{viewBox:`0 0 12 8`,fill:`none`,"aria-hidden":!0,children:(0,x.jsx)(`path`,{d:`M1 1.5L6 6.5L11 1.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),c&&(0,re.createPortal)((0,x.jsxs)(`div`,{className:`drop-select-menu`,style:f,role:`listbox`,id:a,"aria-label":`${S(i.label)} models`,onPointerDown:e=>e.preventDefault(),children:[h.map((e,t)=>(0,x.jsxs)(`div`,{id:_(t),role:`option`,tabIndex:-1,"aria-selected":e===g,className:`drop-select-option`+(t===u?` is-active`:``)+(e===g?` is-current`:``),onMouseEnter:()=>d(t),onClick:()=>y(e),children:[(0,x.jsxs)(`span`,{className:`drop-select-option-head`,children:[(0,x.jsx)(`span`,{className:`drop-select-id`,children:e}),e===i.defaultModel&&(0,x.jsx)(`span`,{className:`drop-select-badge`,children:`Default`})]}),i.modelNotes?.[e]&&(0,x.jsx)(`span`,{className:`drop-select-note`,children:i.modelNotes[e]})]},e)),(0,x.jsxs)(`div`,{className:`drop-select-foot`,children:[(0,x.jsxs)(`span`,{children:[`Any `,S(i.label),` model ID works — type it above.`]}),(0,x.jsx)(`a`,{href:m.sources[e],target:`_blank`,rel:`noreferrer noopener`,children:`All models↗`})]})]}),document.body)]})}function w(){let e=(0,y.c)(5),t,n,r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,x.jsx)(`strong`,{children:`Before you connect`}),n=(0,x.jsx)(`p`,{children:`You provide the API keys or connected accounts, and those providers bill you directly under their own terms. Each model, web-search, speech, or connected-service request can consume your quota or incur a third-party charge; automatic and cadence-based features can repeat those requests while Mavéa is open. AI output can be incomplete, inaccurate, offensive, or unsafe; accuracy, quality, and availability are not guaranteed. Verify important information independently. Mavéa is not medical, legal, financial, safety, or other professional advice, or an emergency or monitoring service. To the fullest extent permitted by law, Mavéa and its outputs are provided “as is,” without warranties; you use them at your own risk, and Mavéa is not responsible for decisions, actions, losses, harm, or provider charges arising from their use.`}),r=(0,x.jsx)(`p`,{children:`Anything you type, paste, attach, or upload—including work-related, personal, identifiable, confidential, sensitive, or regulated information—may be sent to the model, search, or connected provider you select. Submit it only when you are authorized to share it and when you accept that provider’s processing and retention practices; Mavéa does not control those third parties.`}),i=(0,x.jsx)(`p`,{children:`Choosing Remember stores an encrypted copy of provider and search keys in this browser, sealed with a device-bound key when browser cryptography is available; otherwise they remain session-only. Encryption at rest is a convenience, not a security guarantee: an unlocked, shared, lost, or compromised device, browser profile, or extension can still expose or misuse keys, and Mavéa is not responsible for key theft, unauthorized use, or resulting charges. Keeping keys secure is your responsibility — use restricted, revocable keys with spending caps on trusted devices you control, revoke a key with its provider immediately if you suspect exposure, and monitor your provider account. Keys pass through this deployment’s request proxy when used; settings exports exclude them.`}),e[0]=t,e[1]=n,e[2]=r,e[3]=i):(t=e[0],n=e[1],r=e[2],i=e[3]);let a;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,x.jsxs)(`aside`,{className:`provider-responsibility`,"aria-label":`Provider billing, data sharing, and AI output responsibility`,children:[t,n,r,i,(0,x.jsxs)(`nav`,{className:`provider-responsibility-links`,"aria-label":`Terms and privacy documents`,children:[(0,x.jsx)(`a`,{className:`provider-responsibility-link`,href:`#/terms?from=live`,children:`Terms`}),(0,x.jsx)(`a`,{className:`provider-responsibility-link`,href:`#/privacy?from=live`,children:`Privacy`}),(0,x.jsx)(`a`,{className:`provider-responsibility-link`,href:`#/legal?from=live`,children:`Read all important information →`})]})]}),e[4]=a):a=e[4],a}function T(){let e=(0,y.c)(2),[t,n]=(0,b.useState)(E),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{if(typeof window>`u`)return;let e=()=>n(_());return window.addEventListener(v,e),()=>window.removeEventListener(v,e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,b.useEffect)(r,i),t}function E(){return _()}var D=`Hi, I'm ready. Ask me anything.`,O=null,k=null,A=null,j=null,M=0;function N(e){return e===M}function P(e,t){if(e)try{e.pause(),e.src=``}catch{}if(t)try{URL.revokeObjectURL(t)}catch{}}function F(){l(),j?.abort(),j=null,A?.(),A=null,P(O,k),O=null,k=null,M++}async function I(e,t,n){try{let r=await i(`/tts/v1/audio/speech`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:`kokoro`,input:D,voice:e.kokoro,response_format:`wav`,speed:1})},1e4,n);if(!r.ok||!N(t))return;let a=await r.blob();if(!a.size||!N(t))return;let s=URL.createObjectURL(a),c=new Audio(s),l=o(c),u=()=>{l(),N(t)&&(O=null,k=null,j=null,A=null),P(c,s)};k=s,O=c,A=l,c.onended=u,c.onerror=u;let d=c.play();d&&typeof d.catch==`function`&&d.catch(u)}catch{}}async function L(e,t){let n=await f(D,e.kokoro);if(!N(t)){l();return}if(n)return;let r=new AbortController;j=r,await I(e,t,r.signal)}function R(e){s()||(d(),F(),L(e,M))}var z=`Voice is off — answers will show as captions only. To hear Mavéa, start the local TTS service (docker compose up -d).`,B=`Mavéa is muted — an audition stays silent until you unmute.`;function V(){let e=(0,y.c)(2),[t,n]=(0,b.useState)(H),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!0;return c().then(t=>{e&&n(t)}),()=>{e=!1}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,b.useEffect)(r,i),t}function H(){return u()}function U(){let e=(0,y.c)(2),t=V(),n=(0,b.useSyncExternalStore)(a,s),r=t===!1?z:n?B:null;if(!r)return null;let i;return e[0]===r?i=e[1]:(i=(0,x.jsx)(`p`,{className:`voice-off-hint`,role:`status`,children:r}),e[0]=r,e[1]=i),i}var W=350,G={Alt:`altKey`,Control:`ctrlKey`,Shift:`shiftKey`},K=[`altKey`,`ctrlKey`,`metaKey`,`shiftKey`];function q(e,t,n){if(e.key!==t||n!==`any`&&e.code!==t+(n===`left`?`Left`:`Right`))return!1;let r=G[t];return!K.some(t=>t!==r&&e[t])}function J(e){let t=(0,b.useRef)(e);t.current=e,(0,b.useEffect)(()=>{if(!e.enabled)return;let n=e.pttKey||`Alt`,r=e.pttSide||`any`,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{o(),a&&(a=!1,t.current.onStop())},c=e=>{if(!q(e,n,r)){e.key!==n&&s();return}e.repeat||i!==null||a||(i=window.setTimeout(()=>{i=null,a=!0,t.current.onStart()},W))},l=e=>{e.key===n&&s()};return window.addEventListener(`keydown`,c),window.addEventListener(`keyup`,l),window.addEventListener(`blur`,s),()=>{window.removeEventListener(`keydown`,c),window.removeEventListener(`keyup`,l),window.removeEventListener(`blur`,s),s()}},[e.enabled,e.pttKey,e.pttSide])}function Y(e,t=`any`){let n=typeof navigator<`u`&&/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent),r=e===`Alt`?n?`⌥`:`Alt`:e===`Control`?n?`⌃`:`Ctrl`:e===`Shift`?n?`⇧`:`Shift`:e;return t===`left`?`Left ${r}`:t===`right`?`Right ${r}`:r}function X(e){return e>=22||e<6}var Z=`mavea-live-quiet-hours-on`,Q=Z;function $(){try{return localStorage.getItem(Z)===`1`}catch{return!1}}function ie(e){try{e?localStorage.setItem(Z,`1`):localStorage.removeItem(Z)}catch{}try{window.dispatchEvent(new CustomEvent(Q))}catch{}}var ae=.45,oe=6e4;function se(){let e=(0,y.c)(2),[t,n]=(0,b.useState)(ce),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=()=>n($()&&X(new Date().getHours()));e();let t=window.setInterval(e,oe);return window.addEventListener(Q,e),()=>{window.clearInterval(t),window.removeEventListener(Q,e)}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,b.useEffect)(r,i),t}function ce(){return $()&&X(new Date().getHours())}export{Y as a,V as c,T as d,w as f,se as i,R as l,te as m,$ as n,J as o,C as p,ie as r,U as s,ae as t,F as u};
1
+ import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{it as r}from"./index-zIa6h_8b.js";import{n as i}from"./http-Lar_UMKb.js";import{S as a,f as o,g as s,n as c,p as l,r as u,w as d,x as f}from"./kokoro-B3oG_8sd.js";import{i as p,t as m}from"./info-CiqHR5cs.js";import{r as h,t as g}from"./store-gohr8YVT.js";import{a as _,t as v}from"./store-BWLbFXiY.js";import{n as ee}from"./DropSelect-QcBm3N4D.js";var y=t(),b=e();function te(){let e=(0,y.c)(2),[t,n]=(0,b.useState)(ne),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{if(typeof window>`u`)return;let e=()=>n(h());return window.addEventListener(g,e),()=>window.removeEventListener(g,e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,b.useEffect)(r,i),t}function ne(){return h()}var re=r(),x=n();function S(e){return e.split(` · `)[1]??e}function C({provider:e,value:t,onChange:n,ariaLabel:r=`Model`}){let i=p(e),a=(0,b.useId)(),o=(0,b.useRef)(null),s=(0,b.useRef)(null),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(-1),f=ee(c,o),h=i.suggestedModels,g=t||i.defaultModel,_=e=>`${a}-opt-${e}`,v=()=>{d(h.indexOf(g)),l(!0)},y=e=>{n(e),l(!1),s.current?.focus()};return(0,b.useEffect)(()=>{c&&u>=0&&document.getElementById(_(u))?.scrollIntoView?.({block:`nearest`})},[c,u]),(0,x.jsxs)(`div`,{className:`drop-select`,ref:o,children:[(0,x.jsx)(`input`,{ref:s,className:`setup-input drop-select-input`,role:`combobox`,"aria-expanded":c,"aria-controls":a,"aria-activedescendant":c&&u>=0?_(u):void 0,"aria-autocomplete":`none`,"aria-label":r,value:t,onChange:e=>{n(e.target.value),c||v(),d(-1)},onClick:()=>c?l(!1):v(),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),!c)return v();if(!h.length)return;let t=e.key===`ArrowDown`?1:-1;d(e=>(e+t+h.length)%h.length)}else e.key===`Enter`&&c&&u>=0?(e.preventDefault(),y(h[u])):e.key===`Escape`&&c&&(e.preventDefault(),l(!1))},onBlur:()=>l(!1),placeholder:i.defaultModel||i.modelPlaceholder,spellCheck:!1}),(0,x.jsx)(`button`,{type:`button`,className:`drop-select-chevron`,"aria-label":`Show model options`,"aria-expanded":c,tabIndex:-1,onPointerDown:e=>e.preventDefault(),onClick:()=>{s.current?.focus(),c?l(!1):v()},children:(0,x.jsx)(`svg`,{viewBox:`0 0 12 8`,fill:`none`,"aria-hidden":!0,children:(0,x.jsx)(`path`,{d:`M1 1.5L6 6.5L11 1.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),c&&(0,re.createPortal)((0,x.jsxs)(`div`,{className:`drop-select-menu`,style:f,role:`listbox`,id:a,"aria-label":`${S(i.label)} models`,onPointerDown:e=>e.preventDefault(),children:[h.map((e,t)=>(0,x.jsxs)(`div`,{id:_(t),role:`option`,tabIndex:-1,"aria-selected":e===g,className:`drop-select-option`+(t===u?` is-active`:``)+(e===g?` is-current`:``),onMouseEnter:()=>d(t),onClick:()=>y(e),children:[(0,x.jsxs)(`span`,{className:`drop-select-option-head`,children:[(0,x.jsx)(`span`,{className:`drop-select-id`,children:e}),e===i.defaultModel&&(0,x.jsx)(`span`,{className:`drop-select-badge`,children:`Default`})]}),i.modelNotes?.[e]&&(0,x.jsx)(`span`,{className:`drop-select-note`,children:i.modelNotes[e]})]},e)),(0,x.jsxs)(`div`,{className:`drop-select-foot`,children:[(0,x.jsxs)(`span`,{children:[`Any `,S(i.label),` model ID works — type it above.`]}),(0,x.jsx)(`a`,{href:m.sources[e],target:`_blank`,rel:`noreferrer noopener`,children:`All models↗`})]})]}),document.body)]})}function w(){let e=(0,y.c)(5),t,n,r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,x.jsx)(`strong`,{children:`Before you connect`}),n=(0,x.jsx)(`p`,{children:`You provide the API keys or connected accounts, and those providers bill you directly under their own terms. Each model, web-search, speech, or connected-service request can consume your quota or incur a third-party charge; automatic and cadence-based features can repeat those requests while Mavéa is open. AI output can be incomplete, inaccurate, offensive, or unsafe; accuracy, quality, and availability are not guaranteed. Verify important information independently. Mavéa is not medical, legal, financial, safety, or other professional advice, or an emergency or monitoring service. To the fullest extent permitted by law, Mavéa and its outputs are provided “as is,” without warranties; you use them at your own risk, and Mavéa is not responsible for decisions, actions, losses, harm, or provider charges arising from their use.`}),r=(0,x.jsx)(`p`,{children:`Anything you type, paste, attach, or upload—including work-related, personal, identifiable, confidential, sensitive, or regulated information—may be sent to the model, search, or connected provider you select. Submit it only when you are authorized to share it and when you accept that provider’s processing and retention practices; Mavéa does not control those third parties.`}),i=(0,x.jsx)(`p`,{children:`Choosing Remember stores an encrypted copy of provider and search keys in this browser, sealed with a device-bound key when browser cryptography is available; otherwise they remain session-only. Encryption at rest is a convenience, not a security guarantee: an unlocked, shared, lost, or compromised device, browser profile, or extension can still expose or misuse keys, and Mavéa is not responsible for key theft, unauthorized use, or resulting charges. Keeping keys secure is your responsibility — use restricted, revocable keys with spending caps on trusted devices you control, revoke a key with its provider immediately if you suspect exposure, and monitor your provider account. Keys pass through this deployment’s request proxy when used; settings exports exclude them.`}),e[0]=t,e[1]=n,e[2]=r,e[3]=i):(t=e[0],n=e[1],r=e[2],i=e[3]);let a;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,x.jsxs)(`aside`,{className:`provider-responsibility`,"aria-label":`Provider billing, data sharing, and AI output responsibility`,children:[t,n,r,i,(0,x.jsxs)(`nav`,{className:`provider-responsibility-links`,"aria-label":`Terms and privacy documents`,children:[(0,x.jsx)(`a`,{className:`provider-responsibility-link`,href:`#/terms?from=live`,children:`Terms`}),(0,x.jsx)(`a`,{className:`provider-responsibility-link`,href:`#/privacy?from=live`,children:`Privacy`}),(0,x.jsx)(`a`,{className:`provider-responsibility-link`,href:`#/legal?from=live`,children:`Read all important information →`})]})]}),e[4]=a):a=e[4],a}function T(){let e=(0,y.c)(2),[t,n]=(0,b.useState)(E),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{if(typeof window>`u`)return;let e=()=>n(_());return window.addEventListener(v,e),()=>window.removeEventListener(v,e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,b.useEffect)(r,i),t}function E(){return _()}var D=`Hi, I'm ready. Ask me anything.`,O=null,k=null,A=null,j=null,M=0;function N(e){return e===M}function P(e,t){if(e)try{e.pause(),e.src=``}catch{}if(t)try{URL.revokeObjectURL(t)}catch{}}function F(){l(),j?.abort(),j=null,A?.(),A=null,P(O,k),O=null,k=null,M++}async function I(e,t,n){try{let r=await i(`/tts/v1/audio/speech`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:`kokoro`,input:D,voice:e.kokoro,response_format:`wav`,speed:1})},1e4,n);if(!r.ok||!N(t))return;let a=await r.blob();if(!a.size||!N(t))return;let s=URL.createObjectURL(a),c=new Audio(s),l=o(c),u=()=>{l(),N(t)&&(O=null,k=null,j=null,A=null),P(c,s)};k=s,O=c,A=l,c.onended=u,c.onerror=u;let d=c.play();d&&typeof d.catch==`function`&&d.catch(u)}catch{}}async function L(e,t){let n=await f(D,e.kokoro);if(!N(t)){l();return}if(n)return;let r=new AbortController;j=r,await I(e,t,r.signal)}function R(e){s()||(d(),F(),L(e,M))}var z=`Voice is off — answers will show as captions only. To hear Mavéa, start the local TTS service (docker compose up -d).`,B=`Mavéa is muted — an audition stays silent until you unmute.`;function V(){let e=(0,y.c)(2),[t,n]=(0,b.useState)(H),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!0;return c().then(t=>{e&&n(t)}),()=>{e=!1}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,b.useEffect)(r,i),t}function H(){return u()}function U(){let e=(0,y.c)(2),t=V(),n=(0,b.useSyncExternalStore)(a,s),r=t===!1?z:n?B:null;if(!r)return null;let i;return e[0]===r?i=e[1]:(i=(0,x.jsx)(`p`,{className:`voice-off-hint`,role:`status`,children:r}),e[0]=r,e[1]=i),i}var W=350,G={Alt:`altKey`,Control:`ctrlKey`,Shift:`shiftKey`},K=[`altKey`,`ctrlKey`,`metaKey`,`shiftKey`];function q(e,t,n){if(e.key!==t||n!==`any`&&e.code!==t+(n===`left`?`Left`:`Right`))return!1;let r=G[t];return!K.some(t=>t!==r&&e[t])}function J(e){let t=(0,b.useRef)(e);t.current=e,(0,b.useEffect)(()=>{if(!e.enabled)return;let n=e.pttKey||`Alt`,r=e.pttSide||`any`,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{o(),a&&(a=!1,t.current.onStop())},c=e=>{if(!q(e,n,r)){e.key!==n&&s();return}e.repeat||i!==null||a||(i=window.setTimeout(()=>{i=null,a=!0,t.current.onStart()},W))},l=e=>{e.key===n&&s()};return window.addEventListener(`keydown`,c),window.addEventListener(`keyup`,l),window.addEventListener(`blur`,s),()=>{window.removeEventListener(`keydown`,c),window.removeEventListener(`keyup`,l),window.removeEventListener(`blur`,s),s()}},[e.enabled,e.pttKey,e.pttSide])}function Y(e,t=`any`){let n=typeof navigator<`u`&&/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent),r=e===`Alt`?n?`⌥`:`Alt`:e===`Control`?n?`⌃`:`Ctrl`:e===`Shift`?n?`⇧`:`Shift`:e;return t===`left`?`Left ${r}`:t===`right`?`Right ${r}`:r}function X(e){return e>=22||e<6}var Z=`mavea-live-quiet-hours-on`,Q=Z;function $(){try{return localStorage.getItem(Z)===`1`}catch{return!1}}function ie(e){try{e?localStorage.setItem(Z,`1`):localStorage.removeItem(Z)}catch{}try{window.dispatchEvent(new CustomEvent(Q))}catch{}}var ae=.45,oe=6e4;function se(){let e=(0,y.c)(2),[t,n]=(0,b.useState)(ce),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=()=>n($()&&X(new Date().getHours()));e();let t=window.setInterval(e,oe);return window.addEventListener(Q,e),()=>{window.clearInterval(t),window.removeEventListener(Q,e)}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,b.useEffect)(r,i),t}function ce(){return $()&&X(new Date().getHours())}export{Y as a,V as c,T as d,w as f,se as i,R as l,te as m,$ as n,J as o,C as p,ie as r,U as s,ae as t,F as u};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./react-BZJXY1be.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{it as r}from"./index-Dk0QapqQ.js";import{n as i}from"./icons-gLFQTv74.js";import{t as a}from"./richText-BkxJhl9N.js";import{t as o}from"./lib-B7OE1ZQQ.js";import{t as s}from"./registry-types-D3q_LrlV.js";import{t as c}from"./useTimeout-Cm4yzted.js";var l=n();function u({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,intro:r,slots:s,footer:c,delay:u}){let d=i[t]||i.edit;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`p`,{className:`blanks-intro`,children:r}),(0,l.jsx)(`div`,{className:`blanks-grid`,children:s.map(e=>(0,l.jsx)(o,{blank:e},e.key))}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(c)})]})}var d=t(),f={primary:`Primary`,secondary:`Secondary`,ghost:`Ghost`,outline:`Outline`,destructive:`Destructive`,icon:``,loading:`Loading`};function p({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,buttons:r,hint:o=`Try pressing any button.`,color:s=`var(--presence)`,footer:u,delay:p}){let m=i[t]||i.layers,[h,g]=(0,d.useState)(null),[_,v]=(0,d.useState)(null);c(()=>v(null),_===null?null:1400);let y=(e,t)=>{e.disabled||(g(e.label||f[e.variant]||e.variant),e.variant===`loading`&&v(t))};return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`,"--bb-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`bb-gallery`,children:r.map((e,t)=>{let n=e.icon?i[e.icon]:null,r=e.variant===`loading`&&_===t,a=`bb-btn bb-${e.variant}`+(e.disabled?` is-disabled`:``)+(r?` is-busy`:``);if(e.variant===`icon`){let n=e.icon&&i[e.icon]||i.spark;return(0,l.jsx)(`button`,{type:`button`,className:a,disabled:e.disabled,"aria-label":e.label||`icon button`,onClick:()=>y(e,t),children:(0,l.jsx)(n,{className:`ic`})},t)}return(0,l.jsxs)(`button`,{type:`button`,className:a,disabled:e.disabled,onClick:()=>y(e,t),children:[r?(0,l.jsx)(`span`,{className:`bb-spin`,"aria-hidden":!0}):n&&(0,l.jsx)(n,{className:`ic`}),(0,l.jsx)(`span`,{children:r?`Working…`:e.label||f[e.variant]})]},t)})}),(0,l.jsx)(`div`,{className:`bb-hint dim`,children:h?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.check,{className:`ic`,style:{color:s}}),(0,l.jsxs)(`span`,{children:[`Pressed `,(0,l.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:h})]})]}):o}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function m({f:e,accent:t}){let n=(0,d.useId)(),[r,a]=(0,d.useState)(e.value??``),[o,s]=(0,d.useState)(!1),[c,u]=(0,d.useState)(!1),f=e.icon?i[e.icon]:null,p=e.state??`default`,m=p===`error`?`var(--danger)`:p===`success`?`var(--insight)`:t,h=e.password&&!c?`password`:`text`;return(0,l.jsxs)(`div`,{className:`tf-field tf-${p}`,style:{"--tf-c":m},children:[(0,l.jsxs)(`div`,{className:`tf-labelrow`,children:[(0,l.jsx)(`label`,{className:`tf-label`,htmlFor:n,children:e.label}),e.optional&&(0,l.jsx)(`span`,{className:`tf-optional faint`,children:`Optional`})]}),(0,l.jsxs)(`div`,{className:`tf-input ${o?`is-focus`:``}`,children:[f&&(0,l.jsx)(f,{className:`ic tf-lead`}),(0,l.jsx)(`input`,{id:n,className:`tf-control`,type:h,value:r,placeholder:e.placeholder,onChange:e=>a(e.target.value),onFocus:()=>s(!0),onBlur:()=>s(!1)}),e.password?(0,l.jsx)(`button`,{type:`button`,className:`tf-eye`,onClick:()=>u(e=>!e),"aria-label":c?`Hide`:`Show`,children:c?(0,l.jsx)(i.eyeOff,{className:`ic`}):(0,l.jsx)(i.eye,{className:`ic`})}):p===`success`?(0,l.jsx)(i.check,{className:`ic tf-trail tf-ok`}):p===`error`?(0,l.jsx)(i.alert,{className:`ic tf-trail tf-err`}):null]}),e.helper&&(0,l.jsxs)(`div`,{className:`tf-helper`,children:[p===`error`&&(0,l.jsx)(i.alert,{className:`ic`}),p===`success`&&(0,l.jsx)(i.check,{className:`ic`}),e.helper]})]})}function h({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,fields:r,color:o=`var(--presence)`,footer:s,delay:c}){let u=i[t]||i.edit;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`tf-stack`,children:r.map((e,t)=>(0,l.jsx)(m,{f:e,accent:o},t))}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(s)})]})}function g({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,label:r=`Message`,placeholder:o=`Write something…`,value:s=``,max:c=280,minRows:u=3,color:f=`var(--presence)`,footer:p,delay:m}){let h=i[t]||i.edit,g=(0,d.useId)(),_=c>0?c:1,[v,y]=(0,d.useState)(s.slice(0,_)),[b,x]=(0,d.useState)(!1),S=v.length,C=S/_,w=S>=_?`var(--danger)`:C>.85?`var(--warning)`:`var(--text-muted)`;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(m||0)+`ms`,"--ta-c":f},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(h,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`label`,{className:`tf-label`,htmlFor:g,style:{display:`block`,marginBottom:7},children:r}),(0,l.jsxs)(`div`,{className:`ta-wrap ${b?`is-focus`:``}`,children:[(0,l.jsx)(`textarea`,{id:g,className:`ta-control`,value:v,placeholder:o,rows:u,maxLength:_,onChange:e=>y(e.target.value),onFocus:()=>x(!0),onBlur:()=>x(!1),onInput:e=>{let t=e.currentTarget;t.style.height=`auto`,t.style.height=Math.max(t.scrollHeight,0)+`px`}}),(0,l.jsxs)(`div`,{className:`ta-foot`,children:[(0,l.jsx)(`div`,{className:`ta-meter`,"aria-hidden":!0,children:(0,l.jsx)(`span`,{className:`ta-meter-fill`,style:{width:Math.min(100,C*100)+`%`,background:w}})}),(0,l.jsxs)(`span`,{className:`ta-count tab-num`,style:{color:w},children:[S.toLocaleString(),` / `,_.toLocaleString()]})]})]}),p&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(p)})]})}var _=r();function v({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,label:r,placeholder:o=`Select an option…`,options:s,selected:c,color:u=`var(--presence)`,footer:f,delay:p}){let m=i[t]||i.layers,[h,g]=(0,d.useState)(c??null),[v,b]=(0,d.useState)(!1),[x,S]=(0,d.useState)(c??0),C=(0,d.useRef)(null),w=(0,d.useRef)(null),[T,E]=(0,d.useState)(null),D=(0,d.useCallback)(()=>{let e=C.current?.getBoundingClientRect();e&&E({top:e.bottom+6,left:e.left,width:e.width})},[]);(0,d.useEffect)(()=>{if(!v)return;D();let e=()=>D();window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e);let t=e=>{let t=e.target;!C.current?.contains(t)&&!w.current?.contains(t)&&b(!1)},n=e=>{e.key===`Escape`?b(!1):e.key===`ArrowDown`?(e.preventDefault(),S(e=>y(s,e,1))):e.key===`ArrowUp`?(e.preventDefault(),S(e=>y(s,e,-1))):e.key===`Enter`&&(e.preventDefault(),s[x]?.disabled||(g(x),b(!1)))};return document.addEventListener(`mousedown`,t),document.addEventListener(`keydown`,n),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e),document.removeEventListener(`mousedown`,t),document.removeEventListener(`keydown`,n)}},[v,x,s,D]);let O=h==null?null:s[h],k=O?.icon?i[O.icon]:null;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`,"--se-c":u},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`label`,{className:`tf-label`,style:{display:`block`,marginBottom:7},children:r}),(0,l.jsxs)(`div`,{className:`se-root`,children:[(0,l.jsxs)(`button`,{type:`button`,ref:C,className:`se-trigger ${v?`is-open`:``} ${O?`has-val`:``}`,onClick:()=>{b(e=>!e),S(h??0)},"aria-haspopup":`listbox`,"aria-expanded":v,children:[k&&(0,l.jsx)(k,{className:`ic se-lead`}),(0,l.jsx)(`span`,{className:`se-value`,children:O?O.label:o}),(0,l.jsx)(i.chevR,{className:`ic se-chev`})]}),v&&T&&(0,_.createPortal)((0,l.jsx)(`div`,{className:`se-menu se-menu--portal`,role:`listbox`,ref:w,style:{position:`fixed`,top:T.top,left:T.left,right:`auto`,width:T.width},children:s.map((e,t)=>{let n=e.icon?i[e.icon]:null;return(0,l.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":h===t,disabled:e.disabled,className:`se-opt ${x===t?`hi`:``} ${h===t?`on`:``}`,onMouseEnter:()=>S(t),onClick:()=>{e.disabled||(g(t),b(!1))},children:[n&&(0,l.jsx)(n,{className:`ic se-opt-ic`}),(0,l.jsxs)(`span`,{className:`se-opt-meta`,children:[(0,l.jsx)(`span`,{className:`se-opt-label`,children:e.label}),e.caption&&(0,l.jsx)(`span`,{className:`se-opt-cap faint`,children:e.caption})]}),h===t&&(0,l.jsx)(i.check,{className:`ic se-check`})]},t)})}),document.body)]}),f&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(f)})]})}function y(e,t,n){let r=e.length,i=t;for(let t=0;t<r;t++)if(i=(i+n+r)%r,!e[i]?.disabled)return i;return t}function b({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,label:r,placeholder:o=`Search…`,items:s,selected:c,noun:u=`results`,color:f=`var(--presence)`,footer:p,delay:m}){let h=i[t]||i.edit,g=(0,d.useId)(),[v,y]=(0,d.useState)(c??null),[b,S]=(0,d.useState)(``),[C,w]=(0,d.useState)(!1),[T,E]=(0,d.useState)(0),D=(0,d.useRef)(null),O=(0,d.useRef)(null),[k,A]=(0,d.useState)(null),j=(0,d.useCallback)(()=>{let e=D.current?.getBoundingClientRect();e&&A({top:e.bottom+6,left:e.left,width:e.width})},[]),M=(0,d.useMemo)(()=>{let e=b.trim().toLowerCase();return s.map((e,t)=>({it:e,idx:t})).filter(({it:t})=>!e||t.label.toLowerCase().includes(e)||(t.meta||``).toLowerCase().includes(e))},[s,b]);(0,d.useEffect)(()=>{E(0)},[b]),(0,d.useEffect)(()=>{if(!C)return;j();let e=()=>j();window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e);let t=e=>{let t=e.target;!D.current?.contains(t)&&!O.current?.contains(t)&&w(!1)};return document.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e),document.removeEventListener(`mousedown`,t)}},[C,j]);let N=e=>{y(e),w(!1),S(``)},P=e=>{e.key===`ArrowDown`?(e.preventDefault(),w(!0),E(e=>Math.min(M.length-1,e+1))):e.key===`ArrowUp`?(e.preventDefault(),E(e=>Math.max(0,e-1))):e.key===`Enter`?(e.preventDefault(),C&&M[T]&&N(M[T].idx)):e.key===`Escape`&&w(!1)},F=v==null?null:s[v],I=F?.icon?i[F.icon]:null;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(m||0)+`ms`,"--cb-c":f},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(h,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`label`,{className:`tf-label`,style:{display:`block`,marginBottom:7},children:r}),(0,l.jsxs)(`div`,{className:`cb-root`,children:[(0,l.jsxs)(`div`,{className:`cb-input ${C?`is-open`:``}`,ref:D,children:[(0,l.jsx)(i.eye,{className:`ic cb-search`}),!C&&F&&I&&(0,l.jsx)(I,{className:`ic cb-curic`}),(0,l.jsx)(`input`,{className:`cb-control`,"aria-label":r||e||o,role:`combobox`,"aria-expanded":C,"aria-controls":g,"aria-autocomplete":`list`,value:C?b:F?F.label:b,placeholder:F&&!C?``:o,onChange:e=>{S(e.target.value),w(!0)},onFocus:()=>w(!0),onKeyDown:P}),(F||b)&&(0,l.jsx)(`button`,{type:`button`,className:`cb-clear`,"aria-label":`Clear`,onClick:()=>{y(null),S(``),w(!0)},children:(0,l.jsx)(i.x,{className:`ic`})})]}),C&&k&&(0,_.createPortal)((0,l.jsxs)(`div`,{className:`cb-menu cb-menu--portal`,role:`listbox`,id:g,ref:O,style:{position:`fixed`,top:k.top,left:k.left,right:`auto`,width:k.width},children:[M.length===0?(0,l.jsxs)(`div`,{className:`cb-empty faint`,children:[`No `,u,` match “`,b,`”.`]}):M.map(({it:e,idx:t},n)=>{let r=e.icon?i[e.icon]:null;return(0,l.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":v===t,className:`cb-opt ${T===n?`hi`:``} ${v===t?`on`:``}`,onMouseEnter:()=>E(n),onClick:()=>N(t),children:[r?(0,l.jsx)(r,{className:`ic cb-opt-ic`}):(0,l.jsx)(`span`,{className:`cb-opt-dot`}),(0,l.jsxs)(`span`,{className:`cb-opt-meta`,children:[(0,l.jsx)(`span`,{className:`cb-opt-label`,children:x(e.label,b)}),e.meta&&(0,l.jsx)(`span`,{className:`cb-opt-cap faint`,children:e.meta})]}),v===t&&(0,l.jsx)(i.check,{className:`ic cb-check`})]},t)}),(0,l.jsxs)(`div`,{className:`cb-foot faint`,children:[M.length,` `,u]})]}),document.body)]}),p&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(p)})]})}function x(e,t){let n=t.trim();if(!n)return e;let r=e.toLowerCase().indexOf(n.toLowerCase());return r<0?e:(0,l.jsxs)(l.Fragment,{children:[e.slice(0,r),(0,l.jsx)(`mark`,{className:`cb-mark`,children:e.slice(r,r+n.length)}),e.slice(r+n.length)]})}function S({title:e,icon:t=`check`,iconColor:n=`var(--presence)`,allLabel:r=`Select all`,items:o,color:s=`var(--presence)`,footer:c,delay:u}){let f=i[t]||i.check,[p,m]=(0,d.useState)(o.map(e=>!!e.checked)),h=o.map((e,t)=>e.disabled?null:t).filter(e=>e!=null),g=h.filter(e=>p[e]).length,_=h.length>0&&g===h.length,v=g>0&&!_,y=e=>{o[e].disabled||m(t=>t.map((t,n)=>n===e?!t:t))};return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`,"--cg-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`button`,{type:`button`,className:`cg-all`,onClick:()=>{let e=!_;m(t=>t.map((t,n)=>o[n].disabled?t:e))},"aria-checked":v?`mixed`:_,role:`checkbox`,children:[(0,l.jsx)(`span`,{className:`cg-box ${_?`on`:``} ${v?`mixed`:``}`,children:_?(0,l.jsx)(i.check,{className:`cg-tick`}):v?(0,l.jsx)(`span`,{className:`cg-dash`}):null}),(0,l.jsx)(`span`,{className:`cg-all-label`,children:r}),(0,l.jsxs)(`span`,{className:`cg-count tab-num`,children:[g,`/`,h.length]})]}),(0,l.jsx)(`div`,{className:`cg-sep`}),(0,l.jsx)(`div`,{className:`cg-list`,children:o.map((e,t)=>(0,l.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":!!p[t],disabled:e.disabled,className:`cg-row ${p[t]?`on`:``} ${e.disabled?`is-disabled`:``}`,onClick:()=>y(t),children:[(0,l.jsx)(`span`,{className:`cg-box ${p[t]?`on`:``}`,children:p[t]&&(0,l.jsx)(i.check,{className:`cg-tick`})}),(0,l.jsxs)(`span`,{className:`cg-meta`,children:[(0,l.jsx)(`span`,{className:`cg-label`,children:e.label}),e.caption&&(0,l.jsx)(`span`,{className:`cg-cap faint`,children:e.caption})]})]},t))}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(c)})]})}function C({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,layout:r=`card`,options:o,selected:s=0,color:c=`var(--presence)`,footer:u,delay:f}){let p=i[t]||i.layers,m=o.findIndex(e=>!e.disabled),h=o[s]&&!o[s].disabled?s:Math.max(0,m),[g,_]=(0,d.useState)(h),v=(e,t)=>{e.key===`ArrowDown`||e.key===`ArrowRight`?(e.preventDefault(),_(w(o,t,1))):(e.key===`ArrowUp`||e.key===`ArrowLeft`)&&(e.preventDefault(),_(w(o,t,-1)))};return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`,"--rg-c":c},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`rg-list rg-${r}`,role:`radiogroup`,children:o.map((e,t)=>{let n=e.icon?i[e.icon]:null,r=g===t;return(0,l.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,disabled:e.disabled,tabIndex:r?0:-1,className:`rg-opt ${r?`on`:``} ${e.disabled?`is-disabled`:``}`,onClick:()=>!e.disabled&&_(t),onKeyDown:e=>v(e,t),children:[(0,l.jsx)(`span`,{className:`rg-radio`,children:(0,l.jsx)(`span`,{className:`rg-dot`})}),n&&(0,l.jsx)(`span`,{className:`rg-icon`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`rg-meta`,children:[(0,l.jsx)(`span`,{className:`rg-label`,children:e.label}),e.caption&&(0,l.jsx)(`span`,{className:`rg-cap faint`,children:e.caption})]}),e.value&&(0,l.jsx)(`span`,{className:`rg-value tab-num`,children:e.value})]},t)})}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(u)})]})}function w(e,t,n){let r=e.length,i=t;for(let t=0;t<r;t++)if(i=(i+n+r)%r,!e[i]?.disabled)return i;return t}function T({title:e,icon:t=`bell`,iconColor:n=`var(--presence)`,items:r,color:o=`var(--presence)`,footer:s,delay:c}){let u=i[t]||i.bell,[f,p]=(0,d.useState)(r.map(e=>!!e.on)),m=e=>{r[e].disabled||p(t=>t.map((t,n)=>n===e?!t:t))};return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`,"--sw-c":o},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`sw-list`,children:r.map((e,t)=>{let n=e.icon?i[e.icon]:null,r=f[t];return(0,l.jsxs)(`div`,{className:`sw-row ${e.disabled?`is-disabled`:``}`,children:[n&&(0,l.jsx)(`span`,{className:`sw-rowic ${r?`on`:``}`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`sw-meta`,children:[(0,l.jsx)(`span`,{className:`sw-label`,children:e.label}),e.description&&(0,l.jsx)(`span`,{className:`sw-desc faint`,children:e.description})]}),(0,l.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":r,disabled:e.disabled,className:`sw-track ${r?`on`:``}`,onClick:()=>m(t),"aria-label":e.label,children:(0,l.jsx)(`span`,{className:`sw-thumb`})})]},t)})}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(s)})]})}function E({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,items:r,mode:o=`multi`,hint:s,color:c=`var(--presence)`,footer:u,delay:f}){let p=i[t]||i.edit,[m,h]=(0,d.useState)(()=>{if(o===`single`){let e=r.findIndex(e=>e.on),t=e>=0?e:0;return r.map((e,n)=>n===t)}return r.map(e=>!!e.on)}),g=e=>{h(o===`single`?r.map((t,n)=>n===e):t=>t.map((t,n)=>n===e?!t:t))},_=r.filter((e,t)=>m[t]).map(e=>e.title||e.label||``).filter(Boolean);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`,"--tg-c":c},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`tg-group`,role:o===`single`?`radiogroup`:`group`,children:r.map((e,t)=>{let n=e.icon?i[e.icon]:null,r=m[t];return(0,l.jsxs)(`button`,{type:`button`,role:o===`single`?`radio`:`button`,"aria-checked":o===`single`?r:void 0,"aria-pressed":o===`multi`?r:void 0,title:e.title||e.label,className:`tg-btn ${r?`on`:``}`,onClick:()=>g(t),children:[n&&(0,l.jsx)(n,{className:`ic`}),e.label&&(0,l.jsx)(`span`,{className:`tg-label`,children:e.label})]},t)})}),(0,l.jsx)(`div`,{className:`tg-hint dim`,children:_.length?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`span`,{className:`faint`,children:`Active:`}),` `,(0,l.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:_.join(` · `)})]}):s||`Nothing selected.`}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function D({title:e,icon:t=`lock`,iconColor:n=`var(--presence)`,prompt:r=`Enter the 6-digit code we sent you.`,length:o=6,code:s,resendLabel:c=`Didn't get it? Resend code`,color:u=`var(--presence)`,footer:f,delay:p}){let m=i[t]||i.lock,h=Math.max(2,Math.min(8,Math.floor(o)||6)),[g,_]=(0,d.useState)(Array(h).fill(``)),[v,y]=(0,d.useState)(-1),[b,x]=(0,d.useState)(!1),S=(0,d.useRef)([]),C=(0,d.useRef)(void 0);(0,d.useEffect)(()=>()=>window.clearTimeout(C.current),[]);let w=g.join(``),T=w.length===h&&g.every(e=>e!==``),E=T&&(s==null||w===s),D=T&&s!=null&&w!==s,O=e=>{let t=S.current[e];t&&(t.focus(),t.select())},k=()=>{_(Array(h).fill(``)),x(!0),O(0),window.clearTimeout(C.current),C.current=window.setTimeout(()=>x(!1),2200)},A=(e,t)=>{_(n=>{let r=[...n];return r[e]=t,r})},j=(e,t)=>{let n=t.replace(/\D/g,``);if(!n){A(e,``);return}let r=n.split(``);_(t=>{let n=[...t],i=e;for(let e of r){if(i>=h)break;n[i]=e,i++}return n});let i=Math.min(h-1,e+r.length);O(i)},M=(e,t)=>{t.key===`Backspace`?(g[e]?A(e,``):e>0&&(O(e-1),A(e-1,``)),t.preventDefault()):t.key===`ArrowLeft`&&e>0?O(e-1):t.key===`ArrowRight`&&e<h-1&&O(e+1)},N=(e,t)=>{t.preventDefault();let n=t.clipboardData.getData(`text`).replace(/\D/g,``).slice(0,h-e);n&&(_(t=>{let r=[...t];return n.split(``).forEach((t,n)=>{e+n<h&&(r[e+n]=t)}),r}),O(Math.min(h-1,e+n.length)))},P=E?`var(--insight)`:D?`var(--danger)`:u;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`,"--otp-c":P},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`div`,{className:`otp-prompt dim`,children:r}),(0,l.jsx)(`div`,{className:`otp-boxes ${E?`verified`:``} ${D?`errored`:``}`,children:g.map((e,t)=>(0,l.jsx)(`input`,{ref:e=>{S.current[t]=e},className:`otp-box ${e?`filled`:``} ${v===t?`is-focus`:``}`,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:1,value:e,"aria-label":`Digit ${t+1}`,onChange:e=>j(t,e.target.value),onKeyDown:e=>M(t,e),onPaste:e=>N(t,e),onFocus:()=>y(t),onBlur:()=>y(-1)},t))}),(0,l.jsx)(`div`,{className:`otp-status`,children:E?(0,l.jsxs)(`span`,{className:`otp-msg ok`,children:[(0,l.jsx)(i.shield,{className:`ic`}),` Code verified`]}):D?(0,l.jsxs)(`span`,{className:`otp-msg err`,children:[(0,l.jsx)(i.alert,{className:`ic`}),` Incorrect code — try again`]}):b?(0,l.jsxs)(`span`,{className:`otp-msg ok`,children:[(0,l.jsx)(i.check,{className:`ic`}),` New code sent`]}):(0,l.jsxs)(`button`,{type:`button`,className:`otp-resend`,onClick:k,children:[(0,l.jsx)(i.undo,{className:`ic`}),` `,c]})}),f&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}var O={high:`var(--danger)`,medium:`var(--warning)`,low:`var(--text-muted)`};function k({title:e,icon:t=`check`,iconColor:n=`var(--presence)`,subtitle:r,items:o,color:s=`var(--presence)`,footer:c,delay:u}){let f=i[t]||i.check,[p,m]=(0,d.useState)(()=>o.map(e=>!!e.done)),h=o.length,g=p.filter(Boolean).length,_=h>0&&g===h,v=h?Math.round(g/h*100):0,y=e=>m(t=>t.map((t,n)=>n===e?!t:t));return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`,"--ac-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`div`,{className:`ac-sub faint`,children:r}),(0,l.jsxs)(`div`,{className:`ac-progress`,children:[(0,l.jsx)(`div`,{className:`ac-track`,children:(0,l.jsx)(`div`,{className:`ac-fill`,style:{width:v+`%`}})}),(0,l.jsx)(`span`,{className:`ac-count tab-num ${_?`done`:``}`,children:_?`All done`:`${g}/${h}`})]}),(0,l.jsx)(`div`,{className:`ac-list`,children:o.map((e,t)=>{let n=p[t],r=e.priority?O[e.priority]:void 0;return(0,l.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":n,className:`ac-row ${n?`done`:``}`,onClick:()=>y(t),children:[(0,l.jsx)(`span`,{className:`ac-box ${n?`on`:``}`,children:n&&(0,l.jsx)(i.check,{className:`ac-tick`})}),(0,l.jsxs)(`span`,{className:`ac-meta`,children:[(0,l.jsxs)(`span`,{className:`ac-line`,children:[(0,l.jsx)(`span`,{className:`ac-label`,children:e.label}),r&&(0,l.jsx)(`span`,{className:`ac-pri`,style:{"--pri":r},children:e.priority})]}),e.detail&&(0,l.jsx)(`span`,{className:`ac-detail faint`,children:e.detail})]}),e.meta&&(0,l.jsx)(`span`,{className:`ac-tag tab-num`,children:e.meta})]},t)})}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(c)})]})}function A({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,aircraft:r,sections:o,footer:s,delay:c}){let u=i[t]||i.shield,[f,p]=(0,d.useState)(()=>o.map(e=>e.items.map(e=>!!e.checked))),m=(e,t)=>p(n=>n.map((n,r)=>r===e?n.map((e,n)=>n===t?!e:e):n)),h=o.reduce((e,t)=>e+t.items.length,0),g=f.reduce((e,t)=>e+t.filter(Boolean).length,0),_=h>0&&g===h,v=h?Math.round(g/h*100):0,y=o.some((e,t)=>e.items.some((e,n)=>e.critical&&!f[t]?.[n])),b=0;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`div`,{className:`pf-aircraft faint`,children:r}),h>0&&(0,l.jsxs)(`div`,{className:`pf-progress`,children:[(0,l.jsx)(`div`,{className:`pf-track`,children:(0,l.jsx)(`div`,{className:`pf-fill ${y?`has-critical`:``}`,style:{width:v+`%`}})}),(0,l.jsx)(`span`,{className:`pf-count tab-num ${_?`done`:``}`,children:_?`Cleared`:`${g}/${h}`})]}),h===0?(0,l.jsx)(`div`,{className:`pf-empty faint`,children:`No checklist items yet.`}):(0,l.jsx)(`div`,{className:`pf-sections`,children:o.map((e,t)=>{if(e.items.length===0)return null;let n=f[t]?.filter(Boolean).length??0;return(0,l.jsxs)(`div`,{className:`pf-section`,children:[(0,l.jsxs)(`div`,{className:`pf-section-head`,children:[(0,l.jsx)(`span`,{className:`pf-section-name`,children:e.name}),(0,l.jsxs)(`span`,{className:`pf-section-count tab-num`,children:[n,`/`,e.items.length]})]}),(0,l.jsx)(`div`,{className:`pf-list`,children:e.items.map((e,n)=>{let r=f[t]?.[n]??!1,a=b++;return(0,l.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":r,className:`pf-row m-stagger-item m-fade-rise ${r?`done`:``}`,style:{"--i":a},onClick:()=>m(t,n),children:[(0,l.jsx)(`span`,{className:`pf-box ${r?`on`:``} ${e.critical&&!r?`warn`:``}`,children:r&&(0,l.jsx)(i.check,{className:`pf-tick`})}),(0,l.jsx)(`span`,{className:`pf-meta`,children:(0,l.jsxs)(`span`,{className:`pf-line`,children:[(0,l.jsx)(`span`,{className:`pf-label`,children:e.label}),e.critical&&(0,l.jsxs)(`span`,{className:`pf-critical-tag`,children:[(0,l.jsx)(i.alert,{className:`ic`}),` Critical`]})]})})]},n)})})]},t)})}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(s)})]})}var j=[`Will`,`POA`,`Healthcare Proxy`,`Beneficiary designations`,`Digital assets`],M={done:{label:`Done`,icon:`check`,c:`var(--insight)`},"needs-update":{label:`Needs update`,icon:`refresh`,c:`var(--warning)`},missing:{label:`Missing`,icon:`alert`,c:`var(--danger)`}},N={label:`Unknown`,icon:`clock`,c:`var(--text-muted)`};function P(e){let t=new Map,n=[];for(let e of j)t.set(e.toLowerCase(),{name:e,items:[]});for(let r of e){let e=typeof r?.category==`string`?r.category.trim():``,i=e?e.toLowerCase():`other`,a=t.get(i);a||(a={name:e||`Other`,items:[]},t.set(i,a)),n.includes(i)||n.push(i),a.items.push({status:typeof r?.status==`string`?r.status:void 0,lastReviewed:typeof r?.lastReviewed==`string`?r.lastReviewed:void 0})}let r=j.map(e=>e.toLowerCase()),i=n.filter(e=>!r.includes(e));return[...r,...i].map(e=>t.get(e)).filter(e=>e.items.length>0)}function F({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,documents:r,color:o=`var(--presence)`,footer:s,delay:c}){let u=i[t]||i.shield,d=Array.isArray(r)?r:[],f=P(d),p=d.length,m=d.filter(e=>e?.status===`done`).length,h=p>0&&m===p,g=p>0?Math.round(m/p*100):0,_=0;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`,"--ep-c":o},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),p>0&&(0,l.jsxs)(`div`,{className:`ep-progress`,children:[(0,l.jsx)(`div`,{className:`ep-track`,children:(0,l.jsx)(`div`,{className:`ep-fill`,style:{width:g+`%`}})}),(0,l.jsx)(`span`,{className:`ep-count tab-num ${h?`done`:``}`,children:h?`All current`:`${m}/${p}`})]}),p===0?(0,l.jsx)(`div`,{className:`ep-empty faint`,children:`No estate documents listed yet.`}):(0,l.jsx)(`div`,{className:`ep-groups`,children:f.map((e,t)=>{let n=e.items.filter(e=>e.status===`done`).length;return(0,l.jsxs)(`div`,{className:`ep-group`,children:[(0,l.jsxs)(`div`,{className:`ep-group-head`,children:[(0,l.jsx)(`span`,{className:`ep-group-name`,children:e.name}),(0,l.jsxs)(`span`,{className:`ep-group-count tab-num`,children:[n,`/`,e.items.length]})]}),(0,l.jsx)(`div`,{className:`ep-list`,children:e.items.map((e,t)=>{let n=(e.status?M[e.status]:void 0)??N,r=i[n.icon]||i.check,a=_++;return(0,l.jsxs)(`div`,{className:`ep-row m-stagger-item m-fade-rise`,style:{"--i":a},children:[(0,l.jsxs)(`span`,{className:`ep-status`,style:{"--ep-status":n.c},children:[(0,l.jsx)(r,{className:`ic`}),` `,n.label]}),e.lastReviewed&&(0,l.jsxs)(`span`,{className:`ep-reviewed faint`,children:[`Reviewed `,e.lastReviewed]})]},t)})})]},t)})}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(s)})]})}var I={done:{label:`Ready`,icon:`check`,c:`var(--insight)`},pending:{label:`Pending`,icon:`clock`,c:`var(--warning)`},missing:{label:`Missing`,icon:`alert`,c:`var(--danger)`}},L={label:`Unknown`,icon:`clock`,c:`var(--text-muted)`};function R(e){return e.required!==!1}function z(e){return typeof e.name==`string`&&e.name.trim()?e.name.trim():`Untitled document`}function B(e){return typeof e.status==`string`?e.status:void 0}function V({name:e,items:t,accent:n,startIndex:r}){if(t.length===0)return null;let a=t.filter(e=>B(e)===`done`).length,o=t.length>0?a/t.length*100:0;return(0,l.jsxs)(`div`,{className:`vc-group ${n?`is-required`:`is-optional`}`,children:[(0,l.jsxs)(`div`,{className:`vc-group-head`,children:[(0,l.jsx)(`span`,{className:`vc-group-name`,children:e}),(0,l.jsxs)(`span`,{className:`vc-group-count tab-num`,children:[a,`/`,t.length]})]}),(0,l.jsx)(`div`,{className:`vc-group-bar`,children:(0,l.jsx)(`span`,{className:`vc-group-bar-fill`,style:{width:o+`%`}})}),(0,l.jsx)(`ul`,{className:`vc-items`,children:t.map((e,t)=>{let n=B(e),a=(n?I[n]:void 0)??L,o=i[a.icon]||i.check;return(0,l.jsxs)(`li`,{className:`vc-item m-stagger-item m-fade-rise`,style:{"--i":r+t},children:[(0,l.jsx)(`span`,{className:`vc-name`,children:z(e)}),(0,l.jsxs)(`span`,{className:`vc-status`,style:{"--vc-status":a.c},children:[(0,l.jsx)(o,{className:`ic`}),` `,a.label]})]},t)})})]})}function H({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,caseType:r,documents:o,color:s=`var(--presence)`,footer:c,delay:u}){let d=i[t]||i.globe,f=Array.isArray(o)?o:[],p=f.length,m=f.filter(e=>B(e)===`done`).length,h=p>0?m/p*100:0,g=f.filter(e=>R(e)),_=f.filter(e=>!R(e));return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`,"--vc-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),p>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`vc-overall`,children:[r&&(0,l.jsx)(`span`,{className:`vc-case`,children:r}),(0,l.jsxs)(`span`,{className:`vc-overall-count`,children:[m,` / `,p,` ready`]})]}),(0,l.jsx)(`div`,{className:`vc-bar`,role:`progressbar`,"aria-valuenow":Math.round(h),children:(0,l.jsx)(`span`,{className:`vc-bar-fill`,style:{width:h+`%`}})})]}),p===0?(0,l.jsx)(`div`,{className:`vc-empty faint`,children:`No documents listed yet.`}):(0,l.jsxs)(`div`,{className:`vc-groups`,children:[(0,l.jsx)(V,{name:`Required`,items:g,accent:!0,startIndex:0}),(0,l.jsx)(V,{name:`Optional`,items:_,accent:!1,startIndex:g.length})]}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var U=e({formsRegistry:()=>W}),W={blanks:s(u),buttonbar:s(p),textfield:s(h),textarea:s(g),select:s(v),combobox:s(b),checkboxgroup:s(S),radiogroup:s(C),switchset:s(T),togglegroup:s(E),otp:s(D),actionchecklist:s(k),preflightchecklist:s(A),estateplanchecklist:s(F),visachecklist:s(H)};export{U as n,W as t};
1
+ import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./react-BZJXY1be.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{it as r}from"./index-zIa6h_8b.js";import{n as i}from"./icons-gLFQTv74.js";import{t as a}from"./richText-BkxJhl9N.js";import{t as o}from"./lib-B7OE1ZQQ.js";import{t as s}from"./registry-types-D3q_LrlV.js";import{t as c}from"./useTimeout-Cm4yzted.js";var l=n();function u({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,intro:r,slots:s,footer:c,delay:u}){let d=i[t]||i.edit;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`p`,{className:`blanks-intro`,children:r}),(0,l.jsx)(`div`,{className:`blanks-grid`,children:s.map(e=>(0,l.jsx)(o,{blank:e},e.key))}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(c)})]})}var d=t(),f={primary:`Primary`,secondary:`Secondary`,ghost:`Ghost`,outline:`Outline`,destructive:`Destructive`,icon:``,loading:`Loading`};function p({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,buttons:r,hint:o=`Try pressing any button.`,color:s=`var(--presence)`,footer:u,delay:p}){let m=i[t]||i.layers,[h,g]=(0,d.useState)(null),[_,v]=(0,d.useState)(null);c(()=>v(null),_===null?null:1400);let y=(e,t)=>{e.disabled||(g(e.label||f[e.variant]||e.variant),e.variant===`loading`&&v(t))};return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`,"--bb-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`bb-gallery`,children:r.map((e,t)=>{let n=e.icon?i[e.icon]:null,r=e.variant===`loading`&&_===t,a=`bb-btn bb-${e.variant}`+(e.disabled?` is-disabled`:``)+(r?` is-busy`:``);if(e.variant===`icon`){let n=e.icon&&i[e.icon]||i.spark;return(0,l.jsx)(`button`,{type:`button`,className:a,disabled:e.disabled,"aria-label":e.label||`icon button`,onClick:()=>y(e,t),children:(0,l.jsx)(n,{className:`ic`})},t)}return(0,l.jsxs)(`button`,{type:`button`,className:a,disabled:e.disabled,onClick:()=>y(e,t),children:[r?(0,l.jsx)(`span`,{className:`bb-spin`,"aria-hidden":!0}):n&&(0,l.jsx)(n,{className:`ic`}),(0,l.jsx)(`span`,{children:r?`Working…`:e.label||f[e.variant]})]},t)})}),(0,l.jsx)(`div`,{className:`bb-hint dim`,children:h?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.check,{className:`ic`,style:{color:s}}),(0,l.jsxs)(`span`,{children:[`Pressed `,(0,l.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:h})]})]}):o}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function m({f:e,accent:t}){let n=(0,d.useId)(),[r,a]=(0,d.useState)(e.value??``),[o,s]=(0,d.useState)(!1),[c,u]=(0,d.useState)(!1),f=e.icon?i[e.icon]:null,p=e.state??`default`,m=p===`error`?`var(--danger)`:p===`success`?`var(--insight)`:t,h=e.password&&!c?`password`:`text`;return(0,l.jsxs)(`div`,{className:`tf-field tf-${p}`,style:{"--tf-c":m},children:[(0,l.jsxs)(`div`,{className:`tf-labelrow`,children:[(0,l.jsx)(`label`,{className:`tf-label`,htmlFor:n,children:e.label}),e.optional&&(0,l.jsx)(`span`,{className:`tf-optional faint`,children:`Optional`})]}),(0,l.jsxs)(`div`,{className:`tf-input ${o?`is-focus`:``}`,children:[f&&(0,l.jsx)(f,{className:`ic tf-lead`}),(0,l.jsx)(`input`,{id:n,className:`tf-control`,type:h,value:r,placeholder:e.placeholder,onChange:e=>a(e.target.value),onFocus:()=>s(!0),onBlur:()=>s(!1)}),e.password?(0,l.jsx)(`button`,{type:`button`,className:`tf-eye`,onClick:()=>u(e=>!e),"aria-label":c?`Hide`:`Show`,children:c?(0,l.jsx)(i.eyeOff,{className:`ic`}):(0,l.jsx)(i.eye,{className:`ic`})}):p===`success`?(0,l.jsx)(i.check,{className:`ic tf-trail tf-ok`}):p===`error`?(0,l.jsx)(i.alert,{className:`ic tf-trail tf-err`}):null]}),e.helper&&(0,l.jsxs)(`div`,{className:`tf-helper`,children:[p===`error`&&(0,l.jsx)(i.alert,{className:`ic`}),p===`success`&&(0,l.jsx)(i.check,{className:`ic`}),e.helper]})]})}function h({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,fields:r,color:o=`var(--presence)`,footer:s,delay:c}){let u=i[t]||i.edit;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`tf-stack`,children:r.map((e,t)=>(0,l.jsx)(m,{f:e,accent:o},t))}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(s)})]})}function g({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,label:r=`Message`,placeholder:o=`Write something…`,value:s=``,max:c=280,minRows:u=3,color:f=`var(--presence)`,footer:p,delay:m}){let h=i[t]||i.edit,g=(0,d.useId)(),_=c>0?c:1,[v,y]=(0,d.useState)(s.slice(0,_)),[b,x]=(0,d.useState)(!1),S=v.length,C=S/_,w=S>=_?`var(--danger)`:C>.85?`var(--warning)`:`var(--text-muted)`;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(m||0)+`ms`,"--ta-c":f},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(h,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`label`,{className:`tf-label`,htmlFor:g,style:{display:`block`,marginBottom:7},children:r}),(0,l.jsxs)(`div`,{className:`ta-wrap ${b?`is-focus`:``}`,children:[(0,l.jsx)(`textarea`,{id:g,className:`ta-control`,value:v,placeholder:o,rows:u,maxLength:_,onChange:e=>y(e.target.value),onFocus:()=>x(!0),onBlur:()=>x(!1),onInput:e=>{let t=e.currentTarget;t.style.height=`auto`,t.style.height=Math.max(t.scrollHeight,0)+`px`}}),(0,l.jsxs)(`div`,{className:`ta-foot`,children:[(0,l.jsx)(`div`,{className:`ta-meter`,"aria-hidden":!0,children:(0,l.jsx)(`span`,{className:`ta-meter-fill`,style:{width:Math.min(100,C*100)+`%`,background:w}})}),(0,l.jsxs)(`span`,{className:`ta-count tab-num`,style:{color:w},children:[S.toLocaleString(),` / `,_.toLocaleString()]})]})]}),p&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(p)})]})}var _=r();function v({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,label:r,placeholder:o=`Select an option…`,options:s,selected:c,color:u=`var(--presence)`,footer:f,delay:p}){let m=i[t]||i.layers,[h,g]=(0,d.useState)(c??null),[v,b]=(0,d.useState)(!1),[x,S]=(0,d.useState)(c??0),C=(0,d.useRef)(null),w=(0,d.useRef)(null),[T,E]=(0,d.useState)(null),D=(0,d.useCallback)(()=>{let e=C.current?.getBoundingClientRect();e&&E({top:e.bottom+6,left:e.left,width:e.width})},[]);(0,d.useEffect)(()=>{if(!v)return;D();let e=()=>D();window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e);let t=e=>{let t=e.target;!C.current?.contains(t)&&!w.current?.contains(t)&&b(!1)},n=e=>{e.key===`Escape`?b(!1):e.key===`ArrowDown`?(e.preventDefault(),S(e=>y(s,e,1))):e.key===`ArrowUp`?(e.preventDefault(),S(e=>y(s,e,-1))):e.key===`Enter`&&(e.preventDefault(),s[x]?.disabled||(g(x),b(!1)))};return document.addEventListener(`mousedown`,t),document.addEventListener(`keydown`,n),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e),document.removeEventListener(`mousedown`,t),document.removeEventListener(`keydown`,n)}},[v,x,s,D]);let O=h==null?null:s[h],k=O?.icon?i[O.icon]:null;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`,"--se-c":u},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`label`,{className:`tf-label`,style:{display:`block`,marginBottom:7},children:r}),(0,l.jsxs)(`div`,{className:`se-root`,children:[(0,l.jsxs)(`button`,{type:`button`,ref:C,className:`se-trigger ${v?`is-open`:``} ${O?`has-val`:``}`,onClick:()=>{b(e=>!e),S(h??0)},"aria-haspopup":`listbox`,"aria-expanded":v,children:[k&&(0,l.jsx)(k,{className:`ic se-lead`}),(0,l.jsx)(`span`,{className:`se-value`,children:O?O.label:o}),(0,l.jsx)(i.chevR,{className:`ic se-chev`})]}),v&&T&&(0,_.createPortal)((0,l.jsx)(`div`,{className:`se-menu se-menu--portal`,role:`listbox`,ref:w,style:{position:`fixed`,top:T.top,left:T.left,right:`auto`,width:T.width},children:s.map((e,t)=>{let n=e.icon?i[e.icon]:null;return(0,l.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":h===t,disabled:e.disabled,className:`se-opt ${x===t?`hi`:``} ${h===t?`on`:``}`,onMouseEnter:()=>S(t),onClick:()=>{e.disabled||(g(t),b(!1))},children:[n&&(0,l.jsx)(n,{className:`ic se-opt-ic`}),(0,l.jsxs)(`span`,{className:`se-opt-meta`,children:[(0,l.jsx)(`span`,{className:`se-opt-label`,children:e.label}),e.caption&&(0,l.jsx)(`span`,{className:`se-opt-cap faint`,children:e.caption})]}),h===t&&(0,l.jsx)(i.check,{className:`ic se-check`})]},t)})}),document.body)]}),f&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(f)})]})}function y(e,t,n){let r=e.length,i=t;for(let t=0;t<r;t++)if(i=(i+n+r)%r,!e[i]?.disabled)return i;return t}function b({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,label:r,placeholder:o=`Search…`,items:s,selected:c,noun:u=`results`,color:f=`var(--presence)`,footer:p,delay:m}){let h=i[t]||i.edit,g=(0,d.useId)(),[v,y]=(0,d.useState)(c??null),[b,S]=(0,d.useState)(``),[C,w]=(0,d.useState)(!1),[T,E]=(0,d.useState)(0),D=(0,d.useRef)(null),O=(0,d.useRef)(null),[k,A]=(0,d.useState)(null),j=(0,d.useCallback)(()=>{let e=D.current?.getBoundingClientRect();e&&A({top:e.bottom+6,left:e.left,width:e.width})},[]),M=(0,d.useMemo)(()=>{let e=b.trim().toLowerCase();return s.map((e,t)=>({it:e,idx:t})).filter(({it:t})=>!e||t.label.toLowerCase().includes(e)||(t.meta||``).toLowerCase().includes(e))},[s,b]);(0,d.useEffect)(()=>{E(0)},[b]),(0,d.useEffect)(()=>{if(!C)return;j();let e=()=>j();window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e);let t=e=>{let t=e.target;!D.current?.contains(t)&&!O.current?.contains(t)&&w(!1)};return document.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e),document.removeEventListener(`mousedown`,t)}},[C,j]);let N=e=>{y(e),w(!1),S(``)},P=e=>{e.key===`ArrowDown`?(e.preventDefault(),w(!0),E(e=>Math.min(M.length-1,e+1))):e.key===`ArrowUp`?(e.preventDefault(),E(e=>Math.max(0,e-1))):e.key===`Enter`?(e.preventDefault(),C&&M[T]&&N(M[T].idx)):e.key===`Escape`&&w(!1)},F=v==null?null:s[v],I=F?.icon?i[F.icon]:null;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(m||0)+`ms`,"--cb-c":f},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(h,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`label`,{className:`tf-label`,style:{display:`block`,marginBottom:7},children:r}),(0,l.jsxs)(`div`,{className:`cb-root`,children:[(0,l.jsxs)(`div`,{className:`cb-input ${C?`is-open`:``}`,ref:D,children:[(0,l.jsx)(i.eye,{className:`ic cb-search`}),!C&&F&&I&&(0,l.jsx)(I,{className:`ic cb-curic`}),(0,l.jsx)(`input`,{className:`cb-control`,"aria-label":r||e||o,role:`combobox`,"aria-expanded":C,"aria-controls":g,"aria-autocomplete":`list`,value:C?b:F?F.label:b,placeholder:F&&!C?``:o,onChange:e=>{S(e.target.value),w(!0)},onFocus:()=>w(!0),onKeyDown:P}),(F||b)&&(0,l.jsx)(`button`,{type:`button`,className:`cb-clear`,"aria-label":`Clear`,onClick:()=>{y(null),S(``),w(!0)},children:(0,l.jsx)(i.x,{className:`ic`})})]}),C&&k&&(0,_.createPortal)((0,l.jsxs)(`div`,{className:`cb-menu cb-menu--portal`,role:`listbox`,id:g,ref:O,style:{position:`fixed`,top:k.top,left:k.left,right:`auto`,width:k.width},children:[M.length===0?(0,l.jsxs)(`div`,{className:`cb-empty faint`,children:[`No `,u,` match “`,b,`”.`]}):M.map(({it:e,idx:t},n)=>{let r=e.icon?i[e.icon]:null;return(0,l.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":v===t,className:`cb-opt ${T===n?`hi`:``} ${v===t?`on`:``}`,onMouseEnter:()=>E(n),onClick:()=>N(t),children:[r?(0,l.jsx)(r,{className:`ic cb-opt-ic`}):(0,l.jsx)(`span`,{className:`cb-opt-dot`}),(0,l.jsxs)(`span`,{className:`cb-opt-meta`,children:[(0,l.jsx)(`span`,{className:`cb-opt-label`,children:x(e.label,b)}),e.meta&&(0,l.jsx)(`span`,{className:`cb-opt-cap faint`,children:e.meta})]}),v===t&&(0,l.jsx)(i.check,{className:`ic cb-check`})]},t)}),(0,l.jsxs)(`div`,{className:`cb-foot faint`,children:[M.length,` `,u]})]}),document.body)]}),p&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(p)})]})}function x(e,t){let n=t.trim();if(!n)return e;let r=e.toLowerCase().indexOf(n.toLowerCase());return r<0?e:(0,l.jsxs)(l.Fragment,{children:[e.slice(0,r),(0,l.jsx)(`mark`,{className:`cb-mark`,children:e.slice(r,r+n.length)}),e.slice(r+n.length)]})}function S({title:e,icon:t=`check`,iconColor:n=`var(--presence)`,allLabel:r=`Select all`,items:o,color:s=`var(--presence)`,footer:c,delay:u}){let f=i[t]||i.check,[p,m]=(0,d.useState)(o.map(e=>!!e.checked)),h=o.map((e,t)=>e.disabled?null:t).filter(e=>e!=null),g=h.filter(e=>p[e]).length,_=h.length>0&&g===h.length,v=g>0&&!_,y=e=>{o[e].disabled||m(t=>t.map((t,n)=>n===e?!t:t))};return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`,"--cg-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`button`,{type:`button`,className:`cg-all`,onClick:()=>{let e=!_;m(t=>t.map((t,n)=>o[n].disabled?t:e))},"aria-checked":v?`mixed`:_,role:`checkbox`,children:[(0,l.jsx)(`span`,{className:`cg-box ${_?`on`:``} ${v?`mixed`:``}`,children:_?(0,l.jsx)(i.check,{className:`cg-tick`}):v?(0,l.jsx)(`span`,{className:`cg-dash`}):null}),(0,l.jsx)(`span`,{className:`cg-all-label`,children:r}),(0,l.jsxs)(`span`,{className:`cg-count tab-num`,children:[g,`/`,h.length]})]}),(0,l.jsx)(`div`,{className:`cg-sep`}),(0,l.jsx)(`div`,{className:`cg-list`,children:o.map((e,t)=>(0,l.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":!!p[t],disabled:e.disabled,className:`cg-row ${p[t]?`on`:``} ${e.disabled?`is-disabled`:``}`,onClick:()=>y(t),children:[(0,l.jsx)(`span`,{className:`cg-box ${p[t]?`on`:``}`,children:p[t]&&(0,l.jsx)(i.check,{className:`cg-tick`})}),(0,l.jsxs)(`span`,{className:`cg-meta`,children:[(0,l.jsx)(`span`,{className:`cg-label`,children:e.label}),e.caption&&(0,l.jsx)(`span`,{className:`cg-cap faint`,children:e.caption})]})]},t))}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(c)})]})}function C({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,layout:r=`card`,options:o,selected:s=0,color:c=`var(--presence)`,footer:u,delay:f}){let p=i[t]||i.layers,m=o.findIndex(e=>!e.disabled),h=o[s]&&!o[s].disabled?s:Math.max(0,m),[g,_]=(0,d.useState)(h),v=(e,t)=>{e.key===`ArrowDown`||e.key===`ArrowRight`?(e.preventDefault(),_(w(o,t,1))):(e.key===`ArrowUp`||e.key===`ArrowLeft`)&&(e.preventDefault(),_(w(o,t,-1)))};return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`,"--rg-c":c},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`rg-list rg-${r}`,role:`radiogroup`,children:o.map((e,t)=>{let n=e.icon?i[e.icon]:null,r=g===t;return(0,l.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,disabled:e.disabled,tabIndex:r?0:-1,className:`rg-opt ${r?`on`:``} ${e.disabled?`is-disabled`:``}`,onClick:()=>!e.disabled&&_(t),onKeyDown:e=>v(e,t),children:[(0,l.jsx)(`span`,{className:`rg-radio`,children:(0,l.jsx)(`span`,{className:`rg-dot`})}),n&&(0,l.jsx)(`span`,{className:`rg-icon`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`rg-meta`,children:[(0,l.jsx)(`span`,{className:`rg-label`,children:e.label}),e.caption&&(0,l.jsx)(`span`,{className:`rg-cap faint`,children:e.caption})]}),e.value&&(0,l.jsx)(`span`,{className:`rg-value tab-num`,children:e.value})]},t)})}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(u)})]})}function w(e,t,n){let r=e.length,i=t;for(let t=0;t<r;t++)if(i=(i+n+r)%r,!e[i]?.disabled)return i;return t}function T({title:e,icon:t=`bell`,iconColor:n=`var(--presence)`,items:r,color:o=`var(--presence)`,footer:s,delay:c}){let u=i[t]||i.bell,[f,p]=(0,d.useState)(r.map(e=>!!e.on)),m=e=>{r[e].disabled||p(t=>t.map((t,n)=>n===e?!t:t))};return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`,"--sw-c":o},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`sw-list`,children:r.map((e,t)=>{let n=e.icon?i[e.icon]:null,r=f[t];return(0,l.jsxs)(`div`,{className:`sw-row ${e.disabled?`is-disabled`:``}`,children:[n&&(0,l.jsx)(`span`,{className:`sw-rowic ${r?`on`:``}`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`sw-meta`,children:[(0,l.jsx)(`span`,{className:`sw-label`,children:e.label}),e.description&&(0,l.jsx)(`span`,{className:`sw-desc faint`,children:e.description})]}),(0,l.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":r,disabled:e.disabled,className:`sw-track ${r?`on`:``}`,onClick:()=>m(t),"aria-label":e.label,children:(0,l.jsx)(`span`,{className:`sw-thumb`})})]},t)})}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(s)})]})}function E({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,items:r,mode:o=`multi`,hint:s,color:c=`var(--presence)`,footer:u,delay:f}){let p=i[t]||i.edit,[m,h]=(0,d.useState)(()=>{if(o===`single`){let e=r.findIndex(e=>e.on),t=e>=0?e:0;return r.map((e,n)=>n===t)}return r.map(e=>!!e.on)}),g=e=>{h(o===`single`?r.map((t,n)=>n===e):t=>t.map((t,n)=>n===e?!t:t))},_=r.filter((e,t)=>m[t]).map(e=>e.title||e.label||``).filter(Boolean);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`,"--tg-c":c},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`tg-group`,role:o===`single`?`radiogroup`:`group`,children:r.map((e,t)=>{let n=e.icon?i[e.icon]:null,r=m[t];return(0,l.jsxs)(`button`,{type:`button`,role:o===`single`?`radio`:`button`,"aria-checked":o===`single`?r:void 0,"aria-pressed":o===`multi`?r:void 0,title:e.title||e.label,className:`tg-btn ${r?`on`:``}`,onClick:()=>g(t),children:[n&&(0,l.jsx)(n,{className:`ic`}),e.label&&(0,l.jsx)(`span`,{className:`tg-label`,children:e.label})]},t)})}),(0,l.jsx)(`div`,{className:`tg-hint dim`,children:_.length?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`span`,{className:`faint`,children:`Active:`}),` `,(0,l.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:_.join(` · `)})]}):s||`Nothing selected.`}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function D({title:e,icon:t=`lock`,iconColor:n=`var(--presence)`,prompt:r=`Enter the 6-digit code we sent you.`,length:o=6,code:s,resendLabel:c=`Didn't get it? Resend code`,color:u=`var(--presence)`,footer:f,delay:p}){let m=i[t]||i.lock,h=Math.max(2,Math.min(8,Math.floor(o)||6)),[g,_]=(0,d.useState)(Array(h).fill(``)),[v,y]=(0,d.useState)(-1),[b,x]=(0,d.useState)(!1),S=(0,d.useRef)([]),C=(0,d.useRef)(void 0);(0,d.useEffect)(()=>()=>window.clearTimeout(C.current),[]);let w=g.join(``),T=w.length===h&&g.every(e=>e!==``),E=T&&(s==null||w===s),D=T&&s!=null&&w!==s,O=e=>{let t=S.current[e];t&&(t.focus(),t.select())},k=()=>{_(Array(h).fill(``)),x(!0),O(0),window.clearTimeout(C.current),C.current=window.setTimeout(()=>x(!1),2200)},A=(e,t)=>{_(n=>{let r=[...n];return r[e]=t,r})},j=(e,t)=>{let n=t.replace(/\D/g,``);if(!n){A(e,``);return}let r=n.split(``);_(t=>{let n=[...t],i=e;for(let e of r){if(i>=h)break;n[i]=e,i++}return n});let i=Math.min(h-1,e+r.length);O(i)},M=(e,t)=>{t.key===`Backspace`?(g[e]?A(e,``):e>0&&(O(e-1),A(e-1,``)),t.preventDefault()):t.key===`ArrowLeft`&&e>0?O(e-1):t.key===`ArrowRight`&&e<h-1&&O(e+1)},N=(e,t)=>{t.preventDefault();let n=t.clipboardData.getData(`text`).replace(/\D/g,``).slice(0,h-e);n&&(_(t=>{let r=[...t];return n.split(``).forEach((t,n)=>{e+n<h&&(r[e+n]=t)}),r}),O(Math.min(h-1,e+n.length)))},P=E?`var(--insight)`:D?`var(--danger)`:u;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`,"--otp-c":P},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`div`,{className:`otp-prompt dim`,children:r}),(0,l.jsx)(`div`,{className:`otp-boxes ${E?`verified`:``} ${D?`errored`:``}`,children:g.map((e,t)=>(0,l.jsx)(`input`,{ref:e=>{S.current[t]=e},className:`otp-box ${e?`filled`:``} ${v===t?`is-focus`:``}`,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:1,value:e,"aria-label":`Digit ${t+1}`,onChange:e=>j(t,e.target.value),onKeyDown:e=>M(t,e),onPaste:e=>N(t,e),onFocus:()=>y(t),onBlur:()=>y(-1)},t))}),(0,l.jsx)(`div`,{className:`otp-status`,children:E?(0,l.jsxs)(`span`,{className:`otp-msg ok`,children:[(0,l.jsx)(i.shield,{className:`ic`}),` Code verified`]}):D?(0,l.jsxs)(`span`,{className:`otp-msg err`,children:[(0,l.jsx)(i.alert,{className:`ic`}),` Incorrect code — try again`]}):b?(0,l.jsxs)(`span`,{className:`otp-msg ok`,children:[(0,l.jsx)(i.check,{className:`ic`}),` New code sent`]}):(0,l.jsxs)(`button`,{type:`button`,className:`otp-resend`,onClick:k,children:[(0,l.jsx)(i.undo,{className:`ic`}),` `,c]})}),f&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}var O={high:`var(--danger)`,medium:`var(--warning)`,low:`var(--text-muted)`};function k({title:e,icon:t=`check`,iconColor:n=`var(--presence)`,subtitle:r,items:o,color:s=`var(--presence)`,footer:c,delay:u}){let f=i[t]||i.check,[p,m]=(0,d.useState)(()=>o.map(e=>!!e.done)),h=o.length,g=p.filter(Boolean).length,_=h>0&&g===h,v=h?Math.round(g/h*100):0,y=e=>m(t=>t.map((t,n)=>n===e?!t:t));return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`,"--ac-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`div`,{className:`ac-sub faint`,children:r}),(0,l.jsxs)(`div`,{className:`ac-progress`,children:[(0,l.jsx)(`div`,{className:`ac-track`,children:(0,l.jsx)(`div`,{className:`ac-fill`,style:{width:v+`%`}})}),(0,l.jsx)(`span`,{className:`ac-count tab-num ${_?`done`:``}`,children:_?`All done`:`${g}/${h}`})]}),(0,l.jsx)(`div`,{className:`ac-list`,children:o.map((e,t)=>{let n=p[t],r=e.priority?O[e.priority]:void 0;return(0,l.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":n,className:`ac-row ${n?`done`:``}`,onClick:()=>y(t),children:[(0,l.jsx)(`span`,{className:`ac-box ${n?`on`:``}`,children:n&&(0,l.jsx)(i.check,{className:`ac-tick`})}),(0,l.jsxs)(`span`,{className:`ac-meta`,children:[(0,l.jsxs)(`span`,{className:`ac-line`,children:[(0,l.jsx)(`span`,{className:`ac-label`,children:e.label}),r&&(0,l.jsx)(`span`,{className:`ac-pri`,style:{"--pri":r},children:e.priority})]}),e.detail&&(0,l.jsx)(`span`,{className:`ac-detail faint`,children:e.detail})]}),e.meta&&(0,l.jsx)(`span`,{className:`ac-tag tab-num`,children:e.meta})]},t)})}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(c)})]})}function A({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,aircraft:r,sections:o,footer:s,delay:c}){let u=i[t]||i.shield,[f,p]=(0,d.useState)(()=>o.map(e=>e.items.map(e=>!!e.checked))),m=(e,t)=>p(n=>n.map((n,r)=>r===e?n.map((e,n)=>n===t?!e:e):n)),h=o.reduce((e,t)=>e+t.items.length,0),g=f.reduce((e,t)=>e+t.filter(Boolean).length,0),_=h>0&&g===h,v=h?Math.round(g/h*100):0,y=o.some((e,t)=>e.items.some((e,n)=>e.critical&&!f[t]?.[n])),b=0;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`div`,{className:`pf-aircraft faint`,children:r}),h>0&&(0,l.jsxs)(`div`,{className:`pf-progress`,children:[(0,l.jsx)(`div`,{className:`pf-track`,children:(0,l.jsx)(`div`,{className:`pf-fill ${y?`has-critical`:``}`,style:{width:v+`%`}})}),(0,l.jsx)(`span`,{className:`pf-count tab-num ${_?`done`:``}`,children:_?`Cleared`:`${g}/${h}`})]}),h===0?(0,l.jsx)(`div`,{className:`pf-empty faint`,children:`No checklist items yet.`}):(0,l.jsx)(`div`,{className:`pf-sections`,children:o.map((e,t)=>{if(e.items.length===0)return null;let n=f[t]?.filter(Boolean).length??0;return(0,l.jsxs)(`div`,{className:`pf-section`,children:[(0,l.jsxs)(`div`,{className:`pf-section-head`,children:[(0,l.jsx)(`span`,{className:`pf-section-name`,children:e.name}),(0,l.jsxs)(`span`,{className:`pf-section-count tab-num`,children:[n,`/`,e.items.length]})]}),(0,l.jsx)(`div`,{className:`pf-list`,children:e.items.map((e,n)=>{let r=f[t]?.[n]??!1,a=b++;return(0,l.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":r,className:`pf-row m-stagger-item m-fade-rise ${r?`done`:``}`,style:{"--i":a},onClick:()=>m(t,n),children:[(0,l.jsx)(`span`,{className:`pf-box ${r?`on`:``} ${e.critical&&!r?`warn`:``}`,children:r&&(0,l.jsx)(i.check,{className:`pf-tick`})}),(0,l.jsx)(`span`,{className:`pf-meta`,children:(0,l.jsxs)(`span`,{className:`pf-line`,children:[(0,l.jsx)(`span`,{className:`pf-label`,children:e.label}),e.critical&&(0,l.jsxs)(`span`,{className:`pf-critical-tag`,children:[(0,l.jsx)(i.alert,{className:`ic`}),` Critical`]})]})})]},n)})})]},t)})}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(s)})]})}var j=[`Will`,`POA`,`Healthcare Proxy`,`Beneficiary designations`,`Digital assets`],M={done:{label:`Done`,icon:`check`,c:`var(--insight)`},"needs-update":{label:`Needs update`,icon:`refresh`,c:`var(--warning)`},missing:{label:`Missing`,icon:`alert`,c:`var(--danger)`}},N={label:`Unknown`,icon:`clock`,c:`var(--text-muted)`};function P(e){let t=new Map,n=[];for(let e of j)t.set(e.toLowerCase(),{name:e,items:[]});for(let r of e){let e=typeof r?.category==`string`?r.category.trim():``,i=e?e.toLowerCase():`other`,a=t.get(i);a||(a={name:e||`Other`,items:[]},t.set(i,a)),n.includes(i)||n.push(i),a.items.push({status:typeof r?.status==`string`?r.status:void 0,lastReviewed:typeof r?.lastReviewed==`string`?r.lastReviewed:void 0})}let r=j.map(e=>e.toLowerCase()),i=n.filter(e=>!r.includes(e));return[...r,...i].map(e=>t.get(e)).filter(e=>e.items.length>0)}function F({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,documents:r,color:o=`var(--presence)`,footer:s,delay:c}){let u=i[t]||i.shield,d=Array.isArray(r)?r:[],f=P(d),p=d.length,m=d.filter(e=>e?.status===`done`).length,h=p>0&&m===p,g=p>0?Math.round(m/p*100):0,_=0;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`,"--ep-c":o},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),p>0&&(0,l.jsxs)(`div`,{className:`ep-progress`,children:[(0,l.jsx)(`div`,{className:`ep-track`,children:(0,l.jsx)(`div`,{className:`ep-fill`,style:{width:g+`%`}})}),(0,l.jsx)(`span`,{className:`ep-count tab-num ${h?`done`:``}`,children:h?`All current`:`${m}/${p}`})]}),p===0?(0,l.jsx)(`div`,{className:`ep-empty faint`,children:`No estate documents listed yet.`}):(0,l.jsx)(`div`,{className:`ep-groups`,children:f.map((e,t)=>{let n=e.items.filter(e=>e.status===`done`).length;return(0,l.jsxs)(`div`,{className:`ep-group`,children:[(0,l.jsxs)(`div`,{className:`ep-group-head`,children:[(0,l.jsx)(`span`,{className:`ep-group-name`,children:e.name}),(0,l.jsxs)(`span`,{className:`ep-group-count tab-num`,children:[n,`/`,e.items.length]})]}),(0,l.jsx)(`div`,{className:`ep-list`,children:e.items.map((e,t)=>{let n=(e.status?M[e.status]:void 0)??N,r=i[n.icon]||i.check,a=_++;return(0,l.jsxs)(`div`,{className:`ep-row m-stagger-item m-fade-rise`,style:{"--i":a},children:[(0,l.jsxs)(`span`,{className:`ep-status`,style:{"--ep-status":n.c},children:[(0,l.jsx)(r,{className:`ic`}),` `,n.label]}),e.lastReviewed&&(0,l.jsxs)(`span`,{className:`ep-reviewed faint`,children:[`Reviewed `,e.lastReviewed]})]},t)})})]},t)})}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:14},dangerouslySetInnerHTML:a(s)})]})}var I={done:{label:`Ready`,icon:`check`,c:`var(--insight)`},pending:{label:`Pending`,icon:`clock`,c:`var(--warning)`},missing:{label:`Missing`,icon:`alert`,c:`var(--danger)`}},L={label:`Unknown`,icon:`clock`,c:`var(--text-muted)`};function R(e){return e.required!==!1}function z(e){return typeof e.name==`string`&&e.name.trim()?e.name.trim():`Untitled document`}function B(e){return typeof e.status==`string`?e.status:void 0}function V({name:e,items:t,accent:n,startIndex:r}){if(t.length===0)return null;let a=t.filter(e=>B(e)===`done`).length,o=t.length>0?a/t.length*100:0;return(0,l.jsxs)(`div`,{className:`vc-group ${n?`is-required`:`is-optional`}`,children:[(0,l.jsxs)(`div`,{className:`vc-group-head`,children:[(0,l.jsx)(`span`,{className:`vc-group-name`,children:e}),(0,l.jsxs)(`span`,{className:`vc-group-count tab-num`,children:[a,`/`,t.length]})]}),(0,l.jsx)(`div`,{className:`vc-group-bar`,children:(0,l.jsx)(`span`,{className:`vc-group-bar-fill`,style:{width:o+`%`}})}),(0,l.jsx)(`ul`,{className:`vc-items`,children:t.map((e,t)=>{let n=B(e),a=(n?I[n]:void 0)??L,o=i[a.icon]||i.check;return(0,l.jsxs)(`li`,{className:`vc-item m-stagger-item m-fade-rise`,style:{"--i":r+t},children:[(0,l.jsx)(`span`,{className:`vc-name`,children:z(e)}),(0,l.jsxs)(`span`,{className:`vc-status`,style:{"--vc-status":a.c},children:[(0,l.jsx)(o,{className:`ic`}),` `,a.label]})]},t)})})]})}function H({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,caseType:r,documents:o,color:s=`var(--presence)`,footer:c,delay:u}){let d=i[t]||i.globe,f=Array.isArray(o)?o:[],p=f.length,m=f.filter(e=>B(e)===`done`).length,h=p>0?m/p*100:0,g=f.filter(e=>R(e)),_=f.filter(e=>!R(e));return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`,"--vc-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),p>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`vc-overall`,children:[r&&(0,l.jsx)(`span`,{className:`vc-case`,children:r}),(0,l.jsxs)(`span`,{className:`vc-overall-count`,children:[m,` / `,p,` ready`]})]}),(0,l.jsx)(`div`,{className:`vc-bar`,role:`progressbar`,"aria-valuenow":Math.round(h),children:(0,l.jsx)(`span`,{className:`vc-bar-fill`,style:{width:h+`%`}})})]}),p===0?(0,l.jsx)(`div`,{className:`vc-empty faint`,children:`No documents listed yet.`}):(0,l.jsxs)(`div`,{className:`vc-groups`,children:[(0,l.jsx)(V,{name:`Required`,items:g,accent:!0,startIndex:0}),(0,l.jsx)(V,{name:`Optional`,items:_,accent:!1,startIndex:g.length})]}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var U=e({formsRegistry:()=>W}),W={blanks:s(u),buttonbar:s(p),textfield:s(h),textarea:s(g),select:s(v),combobox:s(b),checkboxgroup:s(S),radiogroup:s(C),switchset:s(T),togglegroup:s(E),otp:s(D),actionchecklist:s(k),preflightchecklist:s(A),estateplanchecklist:s(F),visachecklist:s(H)};export{U as n,W as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./react-BZJXY1be.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{n as r}from"./icons-gLFQTv74.js";import{t as i}from"./useFocusTrap-DBtkeyRy.js";import{t as a}from"./richText-BkxJhl9N.js";import{t as o}from"./registry-types-D3q_LrlV.js";import{t as s}from"./portal-Dogggsub.js";var c=t(),l=n();function u({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:o=`Open dialog`,triggerIcon:u=`external`,description:d=`A centered modal dialog with a focus ring, backdrop, and Escape&#8209;to&#8209;close.`,heading:f=`Publish this version?`,body:p=`Publishing makes <strong>Revision 12</strong> the live version everyone sees. You can roll back to any earlier revision at any time.`,confirm:m=`Publish`,cancel:h=`Cancel`,color:g=`var(--presence)`,delay:_}){let v=r[t]||r.layers,y=r[u]||r.external,[b,x]=(0,c.useState)(!1),[S,C]=(0,c.useState)(!1),w=(0,c.useRef)(null);return i(w,{active:b}),(0,c.useEffect)(()=>{if(!b)return;let e=e=>{e.key===`Escape`&&x(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(_||0)+`ms`,"--ov-c":g},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>x(!0),children:[(0,l.jsx)(y,{className:`ic`}),` `,o]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(S?`Published — <strong>Revision 12</strong> is now live.`:d)})]}),b&&(0,l.jsx)(s,{accent:g,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>x(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),x(!1))}}),(0,l.jsxs)(`div`,{className:`ov-dialog`,ref:w,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":f,children:[(0,l.jsxs)(`div`,{className:`ov-dialog-head`,children:[(0,l.jsx)(`div`,{className:`ov-dialog-title`,children:f}),(0,l.jsx)(`button`,{type:`button`,className:`ov-x`,"aria-label":`Close`,onClick:()=>x(!1),children:(0,l.jsx)(r.x,{className:`ic`})})]}),(0,l.jsx)(`div`,{className:`ov-dialog-body`,dangerouslySetInnerHTML:a(p)}),(0,l.jsxs)(`div`,{className:`ov-dialog-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>x(!1),children:h}),(0,l.jsx)(`button`,{type:`button`,className:`ov-btn solid`,onClick:()=>{C(!0),x(!1)},children:m})]})]})]})})]})}function d({title:e,icon:t=`alert`,iconColor:n=`var(--danger)`,trigger:i=`Delete project`,triggerIcon:o=`x`,description:u=`A destructive&#8209;action confirm with a warning badge, Cancel, and Confirm.`,heading:d=`Delete “Q3 Forecast”?`,body:f=`This permanently removes the project and all <strong>34 documents</strong> inside it. This action cannot be undone.`,alertIcon:p=`alert`,confirm:m=`Delete forever`,cancel:h=`Cancel`,color:g=`var(--danger)`,delay:_}){let v=r[t]||r.alert,y=r[o]||r.x,b=r[p]||r.alert,[x,S]=(0,c.useState)(!1),[C,w]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{if(!x)return;let e=e=>e.key===`Escape`&&S(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[x]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(_||0)+`ms`,"--ov-c":g},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger danger`+(C?` is-done`:``),onClick:()=>!C&&S(!0),children:[C?(0,l.jsx)(r.check,{className:`ic`}):(0,l.jsx)(y,{className:`ic`}),` `,C?`Deleted`:i]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(C?`Project deleted. <strong>34 documents</strong> removed.`:u)})]}),x&&(0,l.jsx)(s,{accent:g,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>S(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),S(!1))}}),(0,l.jsxs)(`div`,{className:`ov-dialog ov-alert`,role:`alertdialog`,"aria-modal":`true`,"aria-label":d,children:[(0,l.jsx)(`div`,{className:`ov-alert-badge`,children:(0,l.jsx)(b,{className:`ic`})}),(0,l.jsx)(`div`,{className:`ov-dialog-title ov-alert-title`,children:d}),(0,l.jsx)(`div`,{className:`ov-dialog-body ov-alert-body`,dangerouslySetInnerHTML:a(f)}),(0,l.jsxs)(`div`,{className:`ov-dialog-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>S(!1),children:h}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid danger`,onClick:()=>{w(!0),S(!1)},children:[(0,l.jsx)(r.x,{className:`ic`}),` `,m]})]})]})]})})]})}var f=[{label:`Status`,value:`In review`,icon:`clock`},{label:`Owner`,value:`Maya Chen`,icon:`mail`},{label:`Pages`,value:`24`,icon:`doc`},{label:`Last edited`,value:`2h ago`,icon:`edit`},{label:`Visibility`,value:`Team`,icon:`eye`},{label:`Sources`,value:`8 linked`,icon:`link`},{label:`Confidence`,value:`Strong`,icon:`shield`}];function p({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:o=`View details`,triggerIcon:u=`external`,description:d=`A right&#8209;side drawer slides in with a header, scrollable body, and footer.`,heading:p=`Q3 Forecast.pdf`,subhead:m=`Document properties`,rows:h=f,confirm:g=`Open document`,cancel:_=`Close`,color:v=`var(--presence)`,delay:y}){let b=r[t]||r.layers,x=r[u]||r.external,[S,C]=(0,c.useState)(!1),w=(0,c.useRef)(null);return i(w,{active:S}),(0,c.useEffect)(()=>{if(!S)return;let e=e=>{e.key===`Escape`&&C(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[S]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(y||0)+`ms`,"--ov-c":v},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(b,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>C(!0),children:[(0,l.jsx)(x,{className:`ic`}),` `,o]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(d)})]}),S&&(0,l.jsx)(s,{accent:v,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>C(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),C(!1))}}),(0,l.jsxs)(`div`,{className:`ov-drawer`,ref:w,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":p,children:[(0,l.jsxs)(`div`,{className:`ov-drawer-head`,children:[(0,l.jsxs)(`div`,{className:`ov-drawer-titles`,children:[(0,l.jsx)(`div`,{className:`ov-drawer-sub`,children:m}),(0,l.jsx)(`div`,{className:`ov-drawer-title`,children:p})]}),(0,l.jsx)(`button`,{type:`button`,className:`ov-x`,"aria-label":`Close`,onClick:()=>C(!1),children:(0,l.jsx)(r.x,{className:`ic`})})]}),(0,l.jsx)(`div`,{className:`ov-drawer-body`,children:h.map(e=>{let t=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{className:`ov-drawer-row`,children:[(0,l.jsxs)(`span`,{className:`ov-drawer-row-l`,children:[t&&(0,l.jsx)(t,{className:`ic`}),` `,e.label]}),(0,l.jsx)(`span`,{className:`ov-drawer-row-v`,children:e.value})]},e.label)})}),(0,l.jsxs)(`div`,{className:`ov-drawer-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>C(!1),children:_}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid`,onClick:()=>C(!1),children:[(0,l.jsx)(r.external,{className:`ic`}),` `,g]})]})]})]})})]})}var m=[{label:`Copy link`,icon:`link`,meta:`Anyone with the link`},{label:`Share to team`,icon:`share`,meta:`12 members`,selected:!0},{label:`Email a copy`,icon:`mail`},{label:`Export as PDF`,icon:`export`}];function h({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,trigger:i=`Share`,triggerIcon:o=`share`,description:u=`A bottom sheet slides up with a grabber handle — mobile&#8209;style.`,heading:d=`Share this report`,subhead:f=`Choose how you want to send it`,options:p=m,color:h=`var(--presence)`,delay:g}){let _=r[t]||r.share,v=r[o]||r.share,[y,b]=(0,c.useState)(!1),x=Math.max(0,p.findIndex(e=>e.selected)),[S,C]=(0,c.useState)(x===-1?0:x);return(0,c.useEffect)(()=>{if(!y)return;let e=e=>e.key===`Escape`&&b(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[y]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(_,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>b(!0),children:[(0,l.jsx)(v,{className:`ic`}),` `,i]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(u)})]}),y&&(0,l.jsx)(s,{accent:h,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>b(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b(!1))}}),(0,l.jsxs)(`div`,{className:`ov-sheet`,role:`dialog`,"aria-modal":`true`,"aria-label":d,children:[(0,l.jsx)(`div`,{className:`ov-sheet-grab`}),(0,l.jsxs)(`div`,{className:`ov-sheet-head`,children:[(0,l.jsx)(`div`,{className:`ov-sheet-title`,children:d}),(0,l.jsx)(`div`,{className:`ov-sheet-sub`,children:f})]}),(0,l.jsx)(`div`,{className:`ov-sheet-list`,children:p.map((e,t)=>{let n=e.icon?r[e.icon]:r.chevR;return(0,l.jsxs)(`button`,{type:`button`,className:`ov-sheet-opt`+(S===t?` on`:``),onClick:()=>C(t),children:[(0,l.jsx)(`span`,{className:`ov-sheet-opt-ic`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`ov-sheet-opt-meta`,children:[(0,l.jsx)(`span`,{className:`ov-sheet-opt-label`,children:e.label}),e.meta&&(0,l.jsx)(`span`,{className:`ov-sheet-opt-sub`,children:e.meta})]}),(0,l.jsx)(`span`,{className:`ov-sheet-radio`,children:S===t&&(0,l.jsx)(r.check,{className:`ic`})})]},e.label)})}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid ov-sheet-cta`,onClick:()=>b(!1),children:[(0,l.jsx)(r.send,{className:`ic`}),` Continue`]})]})]})})]})}function g({title:e,icon:t=`bell`,iconColor:n=`var(--presence)`,trigger:i=`Notifications`,triggerIcon:o=`bell`,description:s=`An anchored panel opens beside the trigger with a pointer arrow.`,heading:u=`What's new`,body:d=`3 sources finished syncing and <strong>2 new findings</strong> are ready to review in your workspace.`,stat:f=`+2`,statLabel:p=`new findings`,action:m=`Review now`,color:h=`var(--presence)`,delay:g}){let _=r[t]||r.bell,v=r[o]||r.bell,[y,b]=(0,c.useState)(!1),x=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!y)return;let e=e=>e.key===`Escape`&&b(!1),t=e=>{x.current&&!x.current.contains(e.target)&&b(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[y]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(_,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-anchor`,ref:x,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`+(y?` active`:``),"aria-expanded":y,onClick:()=>b(e=>!e),children:[(0,l.jsx)(v,{className:`ic`}),` `,i,(0,l.jsx)(`span`,{className:`ov-trigger-badge`,children:f})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)}),y&&(0,l.jsxs)(`div`,{className:`ov-pop`,role:`dialog`,"aria-label":u,children:[(0,l.jsx)(`div`,{className:`ov-pop-arrow`}),(0,l.jsx)(`div`,{className:`ov-pop-head`,children:u}),(0,l.jsxs)(`div`,{className:`ov-pop-stat`,children:[(0,l.jsx)(`span`,{className:`ov-pop-stat-val tab-num`,children:f}),(0,l.jsx)(`span`,{className:`ov-pop-stat-label`,children:p})]}),(0,l.jsx)(`div`,{className:`ov-pop-body`,dangerouslySetInnerHTML:a(d)}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-pop-action`,onClick:()=>b(!1),children:[m,` `,(0,l.jsx)(r.chevR,{className:`ic`})]})]})]})]})}var _=[{label:`Reports`,value:`47`},{label:`Sources`,value:`312`},{label:`Followers`,value:`1.2k`}];function v({title:e,icon:t=`chat`,iconColor:n=`var(--presence)`,mention:i=`@maya.chen`,lead:o=`Reviewed and approved by `,name:s=`Maya Chen`,handle:u=`@maya.chen`,bio:d=`Lead research analyst. Covers macro &amp; market intelligence for the strategy team.`,avatar:f=`MC`,stats:p=_,action:m=`Follow`,color:h=`var(--presence)`,delay:g}){let v=r[t]||r.chat,[y,b]=(0,c.useState)(!1),[x,S]=(0,c.useState)(!1),C=(0,c.useRef)(null),w=()=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>b(!0),320)},T=()=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>b(!1),140)};return(0,c.useEffect)(()=>()=>{C.current&&clearTimeout(C.current)},[]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`p`,{className:`ov-hc-lead`,children:[(0,l.jsx)(`span`,{dangerouslySetInnerHTML:a(o)}),(0,l.jsxs)(`span`,{className:`ov-hc-anchor`,onMouseEnter:w,onMouseLeave:T,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-mention`+(y?` active`:``),onClick:()=>b(e=>!e),children:i}),y&&(0,l.jsxs)(`span`,{className:`ov-hc-card`,role:`dialog`,"aria-label":s,onMouseEnter:w,onMouseLeave:T,children:[(0,l.jsxs)(`span`,{className:`ov-hc-top`,children:[(0,l.jsx)(`span`,{className:`ov-hc-avatar`,children:f}),(0,l.jsxs)(`span`,{className:`ov-hc-names`,children:[(0,l.jsx)(`span`,{className:`ov-hc-name`,children:s}),(0,l.jsx)(`span`,{className:`ov-hc-handle`,children:u})]}),(0,l.jsx)(`button`,{type:`button`,className:`ov-hc-follow`+(x?` on`:``),onClick:()=>S(e=>!e),children:x?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.check,{className:`ic`}),` Following`]}):m})]}),(0,l.jsx)(`span`,{className:`ov-hc-bio`,dangerouslySetInnerHTML:a(d)}),(0,l.jsx)(`span`,{className:`ov-hc-stats`,children:p.map(e=>(0,l.jsxs)(`span`,{className:`ov-hc-stat`,children:[(0,l.jsx)(`span`,{className:`ov-hc-stat-val tab-num`,children:e.value}),(0,l.jsx)(`span`,{className:`ov-hc-stat-label`,children:e.label})]},e.label))})]})]}),(0,l.jsx)(`span`,{children:` after a full source audit.`})]}),(0,l.jsx)(`p`,{className:`ov-desc ov-hc-hint`,children:`Hover the mention to preview the profile card.`})]})}var y=[{label:`Share`,icon:`share`,tip:`Share with your team`,placement:`top`},{label:`Export`,icon:`export`,tip:`Download as PDF or CSV`,placement:`bottom`},{label:`Sources`,icon:`link`,tip:`8 verified sources linked`,placement:`left`},{label:`Lock`,icon:`lock`,tip:`Restrict editing to owners`,placement:`right`}];function b({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,prompt:i=`Hover any control to see a placed tooltip.`,targets:o=y,color:s=`var(--presence)`,delay:u}){let d=r[t]||r.spark,[f,p]=(0,c.useState)(null);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`,"--ov-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`p`,{className:`ov-desc ov-tip-prompt`,dangerouslySetInnerHTML:a(i)}),(0,l.jsx)(`div`,{className:`ov-tip-grid`,children:o.map((e,t)=>{let n=e.icon?r[e.icon]:r.spark,i=e.placement||`top`;return(0,l.jsxs)(`div`,{className:`ov-tip-cell`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-tip-target`+(f===t?` on`:``),onMouseEnter:()=>p(t),onMouseLeave:()=>p(e=>e===t?null:e),onFocus:()=>p(t),onBlur:()=>p(e=>e===t?null:e),children:[(0,l.jsx)(n,{className:`ic`}),(0,l.jsx)(`span`,{children:e.label})]}),f===t&&(0,l.jsxs)(`span`,{className:`ov-tip-bubble place-`+i,role:`tooltip`,children:[e.tip,(0,l.jsx)(`span`,{className:`ov-tip-arrow`})]})]},e.label)})})]})}var x=[{label:`Edit report`,icon:`edit`,shortcut:`⌘E`},{label:`Duplicate`,icon:`layers`,shortcut:`⌘D`},{label:`Add to favorites`,icon:`spark`},{label:`Share`,icon:`share`,shortcut:`⌘⇧S`,separator:!0},{label:`Export PDF`,icon:`export`},{label:`Delete`,icon:`x`,danger:!0,separator:!0}];function S({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:i=`Options`,triggerIcon:o=`plus`,description:s=`A dropdown menu with icons, shortcut hints, separators, and a destructive item.`,menuLabel:u=`Q3 Forecast.pdf`,items:d=x,color:f=`var(--presence)`,delay:p}){let m=r[t]||r.layers,h=r[o]||r.plus,[g,_]=(0,c.useState)(!1),[v,y]=(0,c.useState)(null),b=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!g)return;let e=e=>e.key===`Escape`&&_(!1),t=e=>{b.current&&!b.current.contains(e.target)&&_(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[g]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`,"--ov-c":f},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-anchor`,ref:b,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`+(g?` active`:``),"aria-haspopup":`menu`,"aria-expanded":g,onClick:()=>_(e=>!e),children:[(0,l.jsx)(h,{className:`ic`}),` `,i,(0,l.jsx)(r.chevR,{className:`ic ov-trigger-caret`+(g?` up`:``)})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)}),g&&(0,l.jsxs)(`div`,{className:`ov-menu`,role:`menu`,children:[u&&(0,l.jsx)(`div`,{className:`ov-menu-label`,children:u}),d.map((e,t)=>{let n=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{children:[e.separator&&(0,l.jsx)(`div`,{className:`ov-menu-sep`}),(0,l.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`ov-menu-item`+(e.danger?` danger`:``)+(v===t?` on`:``),onMouseEnter:()=>y(t),onClick:()=>_(!1),children:[n&&(0,l.jsx)(n,{className:`ic ov-menu-ic`}),(0,l.jsx)(`span`,{className:`ov-menu-text`,children:e.label}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut})]})]},e.label)})]})]})]})}var C=196,w=[{label:`Open`,icon:`external`,shortcut:`↵`},{label:`Rename`,icon:`edit`,shortcut:`F2`},{label:`Copy link`,icon:`link`,shortcut:`⌘C`},{label:`Download`,icon:`export`,separator:!0},{label:`Move to trash`,icon:`x`,danger:!0,separator:!0}];function T({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,target:i=`Right-click this file`,targetIcon:o=`doc`,description:s=`Right&#8209;click (or click) the target to open a context menu at the pointer.`,items:u=w,color:d=`var(--presence)`,delay:f}){let p=r[t]||r.table,m=r[o]||r.doc,[h,g]=(0,c.useState)(null),[_,v]=(0,c.useState)(null),y=(0,c.useRef)(null),b=e=>{e.preventDefault();let t=y.current?.getBoundingClientRect(),n=t?Math.min(e.clientX-t.left,t.width-C):12,r=t?e.clientY-t.top:12;g({x:Math.max(8,n),y:Math.max(8,r)})};return(0,c.useEffect)(()=>{if(!h)return;let e=e=>e.key===`Escape`&&g(null),t=e=>{let t=y.current?.querySelector(`.ov-ctx`);t&&!t.contains(e.target)&&g(null)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[h]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`,"--ov-c":d},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-ctx-host`,ref:y,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-ctx-zone`+(h?` active`:``),onContextMenu:b,onClick:b,children:[(0,l.jsx)(m,{className:`ic ov-ctx-zone-ic`}),(0,l.jsx)(`span`,{children:i})]}),h&&(0,l.jsx)(`div`,{className:`ov-ctx`,role:`menu`,style:{left:h.x,top:h.y,maxWidth:C},children:u.map((e,t)=>{let n=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{children:[e.separator&&(0,l.jsx)(`div`,{className:`ov-menu-sep`}),(0,l.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`ov-menu-item`+(e.danger?` danger`:``)+(_===t?` on`:``),onMouseEnter:()=>v(t),onClick:()=>g(null),children:[n&&(0,l.jsx)(n,{className:`ic ov-menu-ic`}),(0,l.jsx)(`span`,{className:`ov-menu-text`,style:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.label}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut})]})]},e.label)})})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)})]})}var E=[{label:`Actions`,commands:[{label:`New report`,icon:`plus`,shortcut:`⌘N`,hint:`Start a blank canvas`},{label:`Import sources`,icon:`upload`,shortcut:`⌘I`},{label:`Share workspace`,icon:`share`}]},{label:`Navigate`,commands:[{label:`Go to dashboard`,icon:`chart`,shortcut:`G D`},{label:`Open documents`,icon:`doc`,shortcut:`G O`},{label:`Search sources`,icon:`globe`}]},{label:`Preferences`,commands:[{label:`Toggle theme`,icon:`moon`,shortcut:`⌘\\`},{label:`Notification settings`,icon:`bell`}]}];function D({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,trigger:o=`Search commands`,triggerIcon:u=`spark`,description:d=`A ⌘K command palette — search, ↑/↓ to highlight, Enter to run.`,placeholder:f=`Type a command or search…`,groups:p=E,color:m=`var(--presence)`,delay:h}){let g=r[t]||r.spark,_=r[u]||r.spark,[v,y]=(0,c.useState)(!1),[b,x]=(0,c.useState)(``),[S,C]=(0,c.useState)(0),w=(0,c.useRef)(null),T=(0,c.useRef)(null);i(T,{active:v});let D=(0,c.useMemo)(()=>p.flatMap(e=>e.commands.map(t=>({...t,group:e.label}))),[p]),O=(0,c.useMemo)(()=>{let e=b.trim().toLowerCase();return e?D.filter(t=>t.label.toLowerCase().includes(e)||(t.hint||``).toLowerCase().includes(e)):D},[D,b]),k=(0,c.useMemo)(()=>{let e=new Map;for(let t of O)e.has(t.group)||e.set(t.group,[]),e.get(t.group).push(t);return Array.from(e.entries())},[O]);(0,c.useEffect)(()=>{if(v){C(0);let e=setTimeout(()=>w.current?.focus(),30);return()=>clearTimeout(e)}},[v]),(0,c.useEffect)(()=>C(0),[b]),(0,c.useEffect)(()=>{if(!v)return;let e=e=>{e.key===`Escape`?y(!1):e.key===`ArrowDown`?(e.preventDefault(),C(e=>Math.max(0,Math.min(O.length-1,e+1)))):e.key===`ArrowUp`?(e.preventDefault(),C(e=>Math.max(0,e-1))):e.key===`Enter`&&(e.preventDefault(),y(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v,O.length]);let A=-1;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h||0)+`ms`,"--ov-c":m},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger ov-ck-trigger`,onClick:()=>y(!0),children:[(0,l.jsx)(_,{className:`ic`}),` `,o,(0,l.jsx)(`kbd`,{className:`ov-kbd ov-ck-kbd`,children:`⌘K`})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(d)})]}),v&&(0,l.jsx)(s,{accent:m,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>y(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),y(!1))}}),(0,l.jsxs)(`div`,{className:`ov-ck`,ref:T,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,children:[(0,l.jsxs)(`div`,{className:`ov-ck-search`,children:[(0,l.jsx)(r.globe,{className:`ic ov-ck-search-ic`}),(0,l.jsx)(`input`,{ref:w,className:`ov-ck-input`,placeholder:f,value:b,onChange:e=>x(e.target.value),spellCheck:!1}),(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`esc`})]}),(0,l.jsxs)(`div`,{className:`ov-ck-list`,children:[k.length===0&&(0,l.jsxs)(`div`,{className:`ov-ck-empty`,children:[`No commands match “`,(0,l.jsx)(`strong`,{children:b}),`”`]}),k.map(([e,t])=>(0,l.jsxs)(`div`,{className:`ov-ck-group`,children:[(0,l.jsx)(`div`,{className:`ov-ck-group-label`,children:e}),t.map(e=>{A+=1;let t=A,n=e.icon?r[e.icon]:r.chevR;return(0,l.jsxs)(`button`,{type:`button`,className:`ov-ck-item`+(S===t?` on`:``),onMouseEnter:()=>C(t),onClick:()=>y(!1),children:[(0,l.jsx)(`span`,{className:`ov-ck-item-ic`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`ov-ck-item-meta`,children:[(0,l.jsx)(`span`,{className:`ov-ck-item-label`,children:e.label}),e.hint&&(0,l.jsx)(`span`,{className:`ov-ck-item-hint`,children:e.hint})]}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut}),(0,l.jsx)(r.chevR,{className:`ic ov-ck-item-go`})]},e.label)})]},e))]}),(0,l.jsxs)(`div`,{className:`ov-ck-foot`,children:[(0,l.jsxs)(`span`,{className:`ov-ck-foot-hint`,children:[(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↑`}),(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↓`}),` navigate`]}),(0,l.jsxs)(`span`,{className:`ov-ck-foot-hint`,children:[(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↵`}),` select`]}),(0,l.jsxs)(`span`,{className:`ov-ck-foot-count`,children:[O.length,` commands`]})]})]})]})})]})}var O=e({overlaysRegistry:()=>k}),k={modal:o(u),confirmdialog:o(d),drawer:o(p),sheet:o(h),popover:o(g),hovercard:o(v),tooltip:o(b),menu:o(S),contextmenu:o(T),commandk:o(D)};export{O as n,k as t};
1
+ import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./react-BZJXY1be.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{n as r}from"./icons-gLFQTv74.js";import{t as i}from"./useFocusTrap-DBtkeyRy.js";import{t as a}from"./richText-BkxJhl9N.js";import{t as o}from"./registry-types-D3q_LrlV.js";import{t as s}from"./portal-k_BMgWND.js";var c=t(),l=n();function u({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:o=`Open dialog`,triggerIcon:u=`external`,description:d=`A centered modal dialog with a focus ring, backdrop, and Escape&#8209;to&#8209;close.`,heading:f=`Publish this version?`,body:p=`Publishing makes <strong>Revision 12</strong> the live version everyone sees. You can roll back to any earlier revision at any time.`,confirm:m=`Publish`,cancel:h=`Cancel`,color:g=`var(--presence)`,delay:_}){let v=r[t]||r.layers,y=r[u]||r.external,[b,x]=(0,c.useState)(!1),[S,C]=(0,c.useState)(!1),w=(0,c.useRef)(null);return i(w,{active:b}),(0,c.useEffect)(()=>{if(!b)return;let e=e=>{e.key===`Escape`&&x(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(_||0)+`ms`,"--ov-c":g},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>x(!0),children:[(0,l.jsx)(y,{className:`ic`}),` `,o]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(S?`Published — <strong>Revision 12</strong> is now live.`:d)})]}),b&&(0,l.jsx)(s,{accent:g,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>x(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),x(!1))}}),(0,l.jsxs)(`div`,{className:`ov-dialog`,ref:w,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":f,children:[(0,l.jsxs)(`div`,{className:`ov-dialog-head`,children:[(0,l.jsx)(`div`,{className:`ov-dialog-title`,children:f}),(0,l.jsx)(`button`,{type:`button`,className:`ov-x`,"aria-label":`Close`,onClick:()=>x(!1),children:(0,l.jsx)(r.x,{className:`ic`})})]}),(0,l.jsx)(`div`,{className:`ov-dialog-body`,dangerouslySetInnerHTML:a(p)}),(0,l.jsxs)(`div`,{className:`ov-dialog-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>x(!1),children:h}),(0,l.jsx)(`button`,{type:`button`,className:`ov-btn solid`,onClick:()=>{C(!0),x(!1)},children:m})]})]})]})})]})}function d({title:e,icon:t=`alert`,iconColor:n=`var(--danger)`,trigger:i=`Delete project`,triggerIcon:o=`x`,description:u=`A destructive&#8209;action confirm with a warning badge, Cancel, and Confirm.`,heading:d=`Delete “Q3 Forecast”?`,body:f=`This permanently removes the project and all <strong>34 documents</strong> inside it. This action cannot be undone.`,alertIcon:p=`alert`,confirm:m=`Delete forever`,cancel:h=`Cancel`,color:g=`var(--danger)`,delay:_}){let v=r[t]||r.alert,y=r[o]||r.x,b=r[p]||r.alert,[x,S]=(0,c.useState)(!1),[C,w]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{if(!x)return;let e=e=>e.key===`Escape`&&S(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[x]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(_||0)+`ms`,"--ov-c":g},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger danger`+(C?` is-done`:``),onClick:()=>!C&&S(!0),children:[C?(0,l.jsx)(r.check,{className:`ic`}):(0,l.jsx)(y,{className:`ic`}),` `,C?`Deleted`:i]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(C?`Project deleted. <strong>34 documents</strong> removed.`:u)})]}),x&&(0,l.jsx)(s,{accent:g,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>S(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),S(!1))}}),(0,l.jsxs)(`div`,{className:`ov-dialog ov-alert`,role:`alertdialog`,"aria-modal":`true`,"aria-label":d,children:[(0,l.jsx)(`div`,{className:`ov-alert-badge`,children:(0,l.jsx)(b,{className:`ic`})}),(0,l.jsx)(`div`,{className:`ov-dialog-title ov-alert-title`,children:d}),(0,l.jsx)(`div`,{className:`ov-dialog-body ov-alert-body`,dangerouslySetInnerHTML:a(f)}),(0,l.jsxs)(`div`,{className:`ov-dialog-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>S(!1),children:h}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid danger`,onClick:()=>{w(!0),S(!1)},children:[(0,l.jsx)(r.x,{className:`ic`}),` `,m]})]})]})]})})]})}var f=[{label:`Status`,value:`In review`,icon:`clock`},{label:`Owner`,value:`Maya Chen`,icon:`mail`},{label:`Pages`,value:`24`,icon:`doc`},{label:`Last edited`,value:`2h ago`,icon:`edit`},{label:`Visibility`,value:`Team`,icon:`eye`},{label:`Sources`,value:`8 linked`,icon:`link`},{label:`Confidence`,value:`Strong`,icon:`shield`}];function p({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:o=`View details`,triggerIcon:u=`external`,description:d=`A right&#8209;side drawer slides in with a header, scrollable body, and footer.`,heading:p=`Q3 Forecast.pdf`,subhead:m=`Document properties`,rows:h=f,confirm:g=`Open document`,cancel:_=`Close`,color:v=`var(--presence)`,delay:y}){let b=r[t]||r.layers,x=r[u]||r.external,[S,C]=(0,c.useState)(!1),w=(0,c.useRef)(null);return i(w,{active:S}),(0,c.useEffect)(()=>{if(!S)return;let e=e=>{e.key===`Escape`&&C(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[S]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(y||0)+`ms`,"--ov-c":v},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(b,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>C(!0),children:[(0,l.jsx)(x,{className:`ic`}),` `,o]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(d)})]}),S&&(0,l.jsx)(s,{accent:v,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>C(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),C(!1))}}),(0,l.jsxs)(`div`,{className:`ov-drawer`,ref:w,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":p,children:[(0,l.jsxs)(`div`,{className:`ov-drawer-head`,children:[(0,l.jsxs)(`div`,{className:`ov-drawer-titles`,children:[(0,l.jsx)(`div`,{className:`ov-drawer-sub`,children:m}),(0,l.jsx)(`div`,{className:`ov-drawer-title`,children:p})]}),(0,l.jsx)(`button`,{type:`button`,className:`ov-x`,"aria-label":`Close`,onClick:()=>C(!1),children:(0,l.jsx)(r.x,{className:`ic`})})]}),(0,l.jsx)(`div`,{className:`ov-drawer-body`,children:h.map(e=>{let t=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{className:`ov-drawer-row`,children:[(0,l.jsxs)(`span`,{className:`ov-drawer-row-l`,children:[t&&(0,l.jsx)(t,{className:`ic`}),` `,e.label]}),(0,l.jsx)(`span`,{className:`ov-drawer-row-v`,children:e.value})]},e.label)})}),(0,l.jsxs)(`div`,{className:`ov-drawer-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>C(!1),children:_}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid`,onClick:()=>C(!1),children:[(0,l.jsx)(r.external,{className:`ic`}),` `,g]})]})]})]})})]})}var m=[{label:`Copy link`,icon:`link`,meta:`Anyone with the link`},{label:`Share to team`,icon:`share`,meta:`12 members`,selected:!0},{label:`Email a copy`,icon:`mail`},{label:`Export as PDF`,icon:`export`}];function h({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,trigger:i=`Share`,triggerIcon:o=`share`,description:u=`A bottom sheet slides up with a grabber handle — mobile&#8209;style.`,heading:d=`Share this report`,subhead:f=`Choose how you want to send it`,options:p=m,color:h=`var(--presence)`,delay:g}){let _=r[t]||r.share,v=r[o]||r.share,[y,b]=(0,c.useState)(!1),x=Math.max(0,p.findIndex(e=>e.selected)),[S,C]=(0,c.useState)(x===-1?0:x);return(0,c.useEffect)(()=>{if(!y)return;let e=e=>e.key===`Escape`&&b(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[y]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(_,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>b(!0),children:[(0,l.jsx)(v,{className:`ic`}),` `,i]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(u)})]}),y&&(0,l.jsx)(s,{accent:h,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>b(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b(!1))}}),(0,l.jsxs)(`div`,{className:`ov-sheet`,role:`dialog`,"aria-modal":`true`,"aria-label":d,children:[(0,l.jsx)(`div`,{className:`ov-sheet-grab`}),(0,l.jsxs)(`div`,{className:`ov-sheet-head`,children:[(0,l.jsx)(`div`,{className:`ov-sheet-title`,children:d}),(0,l.jsx)(`div`,{className:`ov-sheet-sub`,children:f})]}),(0,l.jsx)(`div`,{className:`ov-sheet-list`,children:p.map((e,t)=>{let n=e.icon?r[e.icon]:r.chevR;return(0,l.jsxs)(`button`,{type:`button`,className:`ov-sheet-opt`+(S===t?` on`:``),onClick:()=>C(t),children:[(0,l.jsx)(`span`,{className:`ov-sheet-opt-ic`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`ov-sheet-opt-meta`,children:[(0,l.jsx)(`span`,{className:`ov-sheet-opt-label`,children:e.label}),e.meta&&(0,l.jsx)(`span`,{className:`ov-sheet-opt-sub`,children:e.meta})]}),(0,l.jsx)(`span`,{className:`ov-sheet-radio`,children:S===t&&(0,l.jsx)(r.check,{className:`ic`})})]},e.label)})}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid ov-sheet-cta`,onClick:()=>b(!1),children:[(0,l.jsx)(r.send,{className:`ic`}),` Continue`]})]})]})})]})}function g({title:e,icon:t=`bell`,iconColor:n=`var(--presence)`,trigger:i=`Notifications`,triggerIcon:o=`bell`,description:s=`An anchored panel opens beside the trigger with a pointer arrow.`,heading:u=`What's new`,body:d=`3 sources finished syncing and <strong>2 new findings</strong> are ready to review in your workspace.`,stat:f=`+2`,statLabel:p=`new findings`,action:m=`Review now`,color:h=`var(--presence)`,delay:g}){let _=r[t]||r.bell,v=r[o]||r.bell,[y,b]=(0,c.useState)(!1),x=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!y)return;let e=e=>e.key===`Escape`&&b(!1),t=e=>{x.current&&!x.current.contains(e.target)&&b(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[y]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(_,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-anchor`,ref:x,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`+(y?` active`:``),"aria-expanded":y,onClick:()=>b(e=>!e),children:[(0,l.jsx)(v,{className:`ic`}),` `,i,(0,l.jsx)(`span`,{className:`ov-trigger-badge`,children:f})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)}),y&&(0,l.jsxs)(`div`,{className:`ov-pop`,role:`dialog`,"aria-label":u,children:[(0,l.jsx)(`div`,{className:`ov-pop-arrow`}),(0,l.jsx)(`div`,{className:`ov-pop-head`,children:u}),(0,l.jsxs)(`div`,{className:`ov-pop-stat`,children:[(0,l.jsx)(`span`,{className:`ov-pop-stat-val tab-num`,children:f}),(0,l.jsx)(`span`,{className:`ov-pop-stat-label`,children:p})]}),(0,l.jsx)(`div`,{className:`ov-pop-body`,dangerouslySetInnerHTML:a(d)}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-pop-action`,onClick:()=>b(!1),children:[m,` `,(0,l.jsx)(r.chevR,{className:`ic`})]})]})]})]})}var _=[{label:`Reports`,value:`47`},{label:`Sources`,value:`312`},{label:`Followers`,value:`1.2k`}];function v({title:e,icon:t=`chat`,iconColor:n=`var(--presence)`,mention:i=`@maya.chen`,lead:o=`Reviewed and approved by `,name:s=`Maya Chen`,handle:u=`@maya.chen`,bio:d=`Lead research analyst. Covers macro &amp; market intelligence for the strategy team.`,avatar:f=`MC`,stats:p=_,action:m=`Follow`,color:h=`var(--presence)`,delay:g}){let v=r[t]||r.chat,[y,b]=(0,c.useState)(!1),[x,S]=(0,c.useState)(!1),C=(0,c.useRef)(null),w=()=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>b(!0),320)},T=()=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>b(!1),140)};return(0,c.useEffect)(()=>()=>{C.current&&clearTimeout(C.current)},[]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`p`,{className:`ov-hc-lead`,children:[(0,l.jsx)(`span`,{dangerouslySetInnerHTML:a(o)}),(0,l.jsxs)(`span`,{className:`ov-hc-anchor`,onMouseEnter:w,onMouseLeave:T,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-mention`+(y?` active`:``),onClick:()=>b(e=>!e),children:i}),y&&(0,l.jsxs)(`span`,{className:`ov-hc-card`,role:`dialog`,"aria-label":s,onMouseEnter:w,onMouseLeave:T,children:[(0,l.jsxs)(`span`,{className:`ov-hc-top`,children:[(0,l.jsx)(`span`,{className:`ov-hc-avatar`,children:f}),(0,l.jsxs)(`span`,{className:`ov-hc-names`,children:[(0,l.jsx)(`span`,{className:`ov-hc-name`,children:s}),(0,l.jsx)(`span`,{className:`ov-hc-handle`,children:u})]}),(0,l.jsx)(`button`,{type:`button`,className:`ov-hc-follow`+(x?` on`:``),onClick:()=>S(e=>!e),children:x?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.check,{className:`ic`}),` Following`]}):m})]}),(0,l.jsx)(`span`,{className:`ov-hc-bio`,dangerouslySetInnerHTML:a(d)}),(0,l.jsx)(`span`,{className:`ov-hc-stats`,children:p.map(e=>(0,l.jsxs)(`span`,{className:`ov-hc-stat`,children:[(0,l.jsx)(`span`,{className:`ov-hc-stat-val tab-num`,children:e.value}),(0,l.jsx)(`span`,{className:`ov-hc-stat-label`,children:e.label})]},e.label))})]})]}),(0,l.jsx)(`span`,{children:` after a full source audit.`})]}),(0,l.jsx)(`p`,{className:`ov-desc ov-hc-hint`,children:`Hover the mention to preview the profile card.`})]})}var y=[{label:`Share`,icon:`share`,tip:`Share with your team`,placement:`top`},{label:`Export`,icon:`export`,tip:`Download as PDF or CSV`,placement:`bottom`},{label:`Sources`,icon:`link`,tip:`8 verified sources linked`,placement:`left`},{label:`Lock`,icon:`lock`,tip:`Restrict editing to owners`,placement:`right`}];function b({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,prompt:i=`Hover any control to see a placed tooltip.`,targets:o=y,color:s=`var(--presence)`,delay:u}){let d=r[t]||r.spark,[f,p]=(0,c.useState)(null);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`,"--ov-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`p`,{className:`ov-desc ov-tip-prompt`,dangerouslySetInnerHTML:a(i)}),(0,l.jsx)(`div`,{className:`ov-tip-grid`,children:o.map((e,t)=>{let n=e.icon?r[e.icon]:r.spark,i=e.placement||`top`;return(0,l.jsxs)(`div`,{className:`ov-tip-cell`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-tip-target`+(f===t?` on`:``),onMouseEnter:()=>p(t),onMouseLeave:()=>p(e=>e===t?null:e),onFocus:()=>p(t),onBlur:()=>p(e=>e===t?null:e),children:[(0,l.jsx)(n,{className:`ic`}),(0,l.jsx)(`span`,{children:e.label})]}),f===t&&(0,l.jsxs)(`span`,{className:`ov-tip-bubble place-`+i,role:`tooltip`,children:[e.tip,(0,l.jsx)(`span`,{className:`ov-tip-arrow`})]})]},e.label)})})]})}var x=[{label:`Edit report`,icon:`edit`,shortcut:`⌘E`},{label:`Duplicate`,icon:`layers`,shortcut:`⌘D`},{label:`Add to favorites`,icon:`spark`},{label:`Share`,icon:`share`,shortcut:`⌘⇧S`,separator:!0},{label:`Export PDF`,icon:`export`},{label:`Delete`,icon:`x`,danger:!0,separator:!0}];function S({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:i=`Options`,triggerIcon:o=`plus`,description:s=`A dropdown menu with icons, shortcut hints, separators, and a destructive item.`,menuLabel:u=`Q3 Forecast.pdf`,items:d=x,color:f=`var(--presence)`,delay:p}){let m=r[t]||r.layers,h=r[o]||r.plus,[g,_]=(0,c.useState)(!1),[v,y]=(0,c.useState)(null),b=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!g)return;let e=e=>e.key===`Escape`&&_(!1),t=e=>{b.current&&!b.current.contains(e.target)&&_(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[g]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`,"--ov-c":f},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-anchor`,ref:b,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`+(g?` active`:``),"aria-haspopup":`menu`,"aria-expanded":g,onClick:()=>_(e=>!e),children:[(0,l.jsx)(h,{className:`ic`}),` `,i,(0,l.jsx)(r.chevR,{className:`ic ov-trigger-caret`+(g?` up`:``)})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)}),g&&(0,l.jsxs)(`div`,{className:`ov-menu`,role:`menu`,children:[u&&(0,l.jsx)(`div`,{className:`ov-menu-label`,children:u}),d.map((e,t)=>{let n=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{children:[e.separator&&(0,l.jsx)(`div`,{className:`ov-menu-sep`}),(0,l.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`ov-menu-item`+(e.danger?` danger`:``)+(v===t?` on`:``),onMouseEnter:()=>y(t),onClick:()=>_(!1),children:[n&&(0,l.jsx)(n,{className:`ic ov-menu-ic`}),(0,l.jsx)(`span`,{className:`ov-menu-text`,children:e.label}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut})]})]},e.label)})]})]})]})}var C=196,w=[{label:`Open`,icon:`external`,shortcut:`↵`},{label:`Rename`,icon:`edit`,shortcut:`F2`},{label:`Copy link`,icon:`link`,shortcut:`⌘C`},{label:`Download`,icon:`export`,separator:!0},{label:`Move to trash`,icon:`x`,danger:!0,separator:!0}];function T({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,target:i=`Right-click this file`,targetIcon:o=`doc`,description:s=`Right&#8209;click (or click) the target to open a context menu at the pointer.`,items:u=w,color:d=`var(--presence)`,delay:f}){let p=r[t]||r.table,m=r[o]||r.doc,[h,g]=(0,c.useState)(null),[_,v]=(0,c.useState)(null),y=(0,c.useRef)(null),b=e=>{e.preventDefault();let t=y.current?.getBoundingClientRect(),n=t?Math.min(e.clientX-t.left,t.width-C):12,r=t?e.clientY-t.top:12;g({x:Math.max(8,n),y:Math.max(8,r)})};return(0,c.useEffect)(()=>{if(!h)return;let e=e=>e.key===`Escape`&&g(null),t=e=>{let t=y.current?.querySelector(`.ov-ctx`);t&&!t.contains(e.target)&&g(null)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[h]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`,"--ov-c":d},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-ctx-host`,ref:y,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-ctx-zone`+(h?` active`:``),onContextMenu:b,onClick:b,children:[(0,l.jsx)(m,{className:`ic ov-ctx-zone-ic`}),(0,l.jsx)(`span`,{children:i})]}),h&&(0,l.jsx)(`div`,{className:`ov-ctx`,role:`menu`,style:{left:h.x,top:h.y,maxWidth:C},children:u.map((e,t)=>{let n=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{children:[e.separator&&(0,l.jsx)(`div`,{className:`ov-menu-sep`}),(0,l.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`ov-menu-item`+(e.danger?` danger`:``)+(_===t?` on`:``),onMouseEnter:()=>v(t),onClick:()=>g(null),children:[n&&(0,l.jsx)(n,{className:`ic ov-menu-ic`}),(0,l.jsx)(`span`,{className:`ov-menu-text`,style:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.label}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut})]})]},e.label)})})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)})]})}var E=[{label:`Actions`,commands:[{label:`New report`,icon:`plus`,shortcut:`⌘N`,hint:`Start a blank canvas`},{label:`Import sources`,icon:`upload`,shortcut:`⌘I`},{label:`Share workspace`,icon:`share`}]},{label:`Navigate`,commands:[{label:`Go to dashboard`,icon:`chart`,shortcut:`G D`},{label:`Open documents`,icon:`doc`,shortcut:`G O`},{label:`Search sources`,icon:`globe`}]},{label:`Preferences`,commands:[{label:`Toggle theme`,icon:`moon`,shortcut:`⌘\\`},{label:`Notification settings`,icon:`bell`}]}];function D({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,trigger:o=`Search commands`,triggerIcon:u=`spark`,description:d=`A ⌘K command palette — search, ↑/↓ to highlight, Enter to run.`,placeholder:f=`Type a command or search…`,groups:p=E,color:m=`var(--presence)`,delay:h}){let g=r[t]||r.spark,_=r[u]||r.spark,[v,y]=(0,c.useState)(!1),[b,x]=(0,c.useState)(``),[S,C]=(0,c.useState)(0),w=(0,c.useRef)(null),T=(0,c.useRef)(null);i(T,{active:v});let D=(0,c.useMemo)(()=>p.flatMap(e=>e.commands.map(t=>({...t,group:e.label}))),[p]),O=(0,c.useMemo)(()=>{let e=b.trim().toLowerCase();return e?D.filter(t=>t.label.toLowerCase().includes(e)||(t.hint||``).toLowerCase().includes(e)):D},[D,b]),k=(0,c.useMemo)(()=>{let e=new Map;for(let t of O)e.has(t.group)||e.set(t.group,[]),e.get(t.group).push(t);return Array.from(e.entries())},[O]);(0,c.useEffect)(()=>{if(v){C(0);let e=setTimeout(()=>w.current?.focus(),30);return()=>clearTimeout(e)}},[v]),(0,c.useEffect)(()=>C(0),[b]),(0,c.useEffect)(()=>{if(!v)return;let e=e=>{e.key===`Escape`?y(!1):e.key===`ArrowDown`?(e.preventDefault(),C(e=>Math.max(0,Math.min(O.length-1,e+1)))):e.key===`ArrowUp`?(e.preventDefault(),C(e=>Math.max(0,e-1))):e.key===`Enter`&&(e.preventDefault(),y(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v,O.length]);let A=-1;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h||0)+`ms`,"--ov-c":m},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger ov-ck-trigger`,onClick:()=>y(!0),children:[(0,l.jsx)(_,{className:`ic`}),` `,o,(0,l.jsx)(`kbd`,{className:`ov-kbd ov-ck-kbd`,children:`⌘K`})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(d)})]}),v&&(0,l.jsx)(s,{accent:m,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>y(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),y(!1))}}),(0,l.jsxs)(`div`,{className:`ov-ck`,ref:T,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,children:[(0,l.jsxs)(`div`,{className:`ov-ck-search`,children:[(0,l.jsx)(r.globe,{className:`ic ov-ck-search-ic`}),(0,l.jsx)(`input`,{ref:w,className:`ov-ck-input`,placeholder:f,value:b,onChange:e=>x(e.target.value),spellCheck:!1}),(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`esc`})]}),(0,l.jsxs)(`div`,{className:`ov-ck-list`,children:[k.length===0&&(0,l.jsxs)(`div`,{className:`ov-ck-empty`,children:[`No commands match “`,(0,l.jsx)(`strong`,{children:b}),`”`]}),k.map(([e,t])=>(0,l.jsxs)(`div`,{className:`ov-ck-group`,children:[(0,l.jsx)(`div`,{className:`ov-ck-group-label`,children:e}),t.map(e=>{A+=1;let t=A,n=e.icon?r[e.icon]:r.chevR;return(0,l.jsxs)(`button`,{type:`button`,className:`ov-ck-item`+(S===t?` on`:``),onMouseEnter:()=>C(t),onClick:()=>y(!1),children:[(0,l.jsx)(`span`,{className:`ov-ck-item-ic`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`ov-ck-item-meta`,children:[(0,l.jsx)(`span`,{className:`ov-ck-item-label`,children:e.label}),e.hint&&(0,l.jsx)(`span`,{className:`ov-ck-item-hint`,children:e.hint})]}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut}),(0,l.jsx)(r.chevR,{className:`ic ov-ck-item-go`})]},e.label)})]},e))]}),(0,l.jsxs)(`div`,{className:`ov-ck-foot`,children:[(0,l.jsxs)(`span`,{className:`ov-ck-foot-hint`,children:[(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↑`}),(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↓`}),` navigate`]}),(0,l.jsxs)(`span`,{className:`ov-ck-foot-hint`,children:[(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↵`}),` select`]}),(0,l.jsxs)(`span`,{className:`ov-ck-foot-count`,children:[O.length,` commands`]})]})]})]})})]})}var O=e({overlaysRegistry:()=>k}),k={modal:o(u),confirmdialog:o(d),drawer:o(p),sheet:o(h),popover:o(g),hovercard:o(v),tooltip:o(b),menu:o(S),contextmenu:o(T),commandk:o(D)};export{O as n,k as t};