@mavea/mavea 1.0.10 → 1.0.12

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 (147) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/README.md +33 -164
  3. package/dist/.vite/manifest.json +585 -585
  4. package/dist/assets/{AppCommandPalette-BrvbfsdK.js → AppCommandPalette-DzUPm-Qa.js} +1 -1
  5. package/dist/assets/{BlockEmpty-L6Ii29YE.js → BlockEmpty-Dp9IPo4S.js} +1 -1
  6. package/dist/assets/{BriefingPlayer-CtB3h9TJ.js → BriefingPlayer-CTab7H0c.js} +1 -1
  7. package/dist/assets/{CanvasSkeleton-CqvzF0Ix.js → CanvasSkeleton-BCq4yAAN.js} +2 -2
  8. package/dist/assets/{CheckLogRail-Dr0S3LeI.js → CheckLogRail-DbGJtneK.js} +1 -1
  9. package/dist/assets/{CodeOutput-BGCRjlET.js → CodeOutput-DjsCJAel.js} +1 -1
  10. package/dist/assets/{CommandPalette-D2kV4Mdl.js → CommandPalette-Cq9mDWiI.js} +1 -1
  11. package/dist/assets/{CourseLessonReader-ItmH7ccs.js → CourseLessonReader-Dz8IhHEw.js} +2 -2
  12. package/dist/assets/{CourseRail-B8Ot8hW9.js → CourseRail-DjK_L3eD.js} +1 -1
  13. package/dist/assets/{CoursesApp-DSu2zswg.js → CoursesApp-Dv4yt63y.js} +2 -2
  14. package/dist/assets/{CrossExamPanel-xOgmL2kl.js → CrossExamPanel-DJCn13Aa.js} +1 -1
  15. package/dist/assets/{DashPresent-C8Yk9AOu.js → DashPresent-pfOEJGzV.js} +1 -1
  16. package/dist/assets/{DashboardDetail-BK3ozdBm.js → DashboardDetail-BSZ3CgcK.js} +2 -2
  17. package/dist/assets/DashboardLoopRuntime-DfnDIGFz.js +1 -0
  18. package/dist/assets/{DashboardOverview-Bhiwt3py.js → DashboardOverview-DpJ2BDNu.js} +1 -1
  19. package/dist/assets/{DashboardSettings-ConUIT2l.js → DashboardSettings-C1rC3iTs.js} +1 -1
  20. package/dist/assets/{DashboardsApp-CAxFYHsK.js → DashboardsApp-DeBWrYDk.js} +2 -2
  21. package/dist/assets/{DeepZoomApp-B1uh9Yyg.js → DeepZoomApp-B91oHx2Y.js} +1 -1
  22. package/dist/assets/{DelegatePanel-CDOU8DfD.js → DelegatePanel-bFmfn9-D.js} +1 -1
  23. package/dist/assets/{DemoGallery-D1YRuz0S.js → DemoGallery-fYIVdHQV.js} +1 -1
  24. package/dist/assets/{DropSelect-DZGCKxxw.js → DropSelect-DbxAWKQn.js} +1 -1
  25. package/dist/assets/{ExportModal-DhM80yeB.js → ExportModal-HczU1Zg1.js} +2 -2
  26. package/dist/assets/{ExtractionPreview-CEVvwL6Z.js → ExtractionPreview-BfjJci-N.js} +1 -1
  27. package/dist/assets/{FlagshipCTA-CYkF5LO_.js → FlagshipCTA-CTb5P2Ix.js} +1 -1
  28. package/dist/assets/{FlagshipCommandPalette-gbdvHS2L.js → FlagshipCommandPalette-DLkDmsF-.js} +1 -1
  29. package/dist/assets/{FlagshipShowcase-BB4BJP3V.js → FlagshipShowcase-CrFSCHHX.js} +1 -1
  30. package/dist/assets/{FlashcardsApp-kGal2QE_.js → FlashcardsApp-CV777TGC.js} +1 -1
  31. package/dist/assets/{ForecastPanel-gs5apRKg.js → ForecastPanel-BfAngk8l.js} +1 -1
  32. package/dist/assets/{GalleryApp-DPdu4q7k.js → GalleryApp-DLssAAhN.js} +1 -1
  33. package/dist/assets/{HonestByDesign-CKnSiPcq.js → HonestByDesign-B0o03QVw.js} +1 -1
  34. package/dist/assets/{HowItWorks-DWp-ASxN.js → HowItWorks-DfUsQ2xD.js} +1 -1
  35. package/dist/assets/{LegalApp-D17oe1-B.js → LegalApp-CnFE80Ja.js} +1 -1
  36. package/dist/assets/{LegalMarkdownDocument-B-0LA_X_.js → LegalMarkdownDocument-BidNcrNj.js} +1 -1
  37. package/dist/assets/{LegalPageShell-CY2O507f.js → LegalPageShell-CFktFKTK.js} +1 -1
  38. package/dist/assets/{LeverPanel-CiRg_mFN.js → LeverPanel-DgfX7mTL.js} +1 -1
  39. package/dist/assets/{Library-DhMHA6Q_.js → Library-CAnmN5YL.js} +1 -1
  40. package/dist/assets/{LibraryOverlay-C3ECZIkZ.js → LibraryOverlay-D7Gg_GIv.js} +1 -1
  41. package/dist/assets/{LiveApp-D2QFBykD.css → LiveApp-COz1ZZp9.css} +1 -1
  42. package/dist/assets/{LiveApp-CPPQzp34.js → LiveApp-DmU3RMfZ.js} +4 -4
  43. package/dist/assets/{LiveSettings-Bk-_UwJ6.js → LiveSettings-5UCN5UWM.js} +3 -3
  44. package/dist/assets/{MindMapViewerDrawer-C25mTggg.js → MindMapViewerDrawer-DoXy6hCD.js} +1 -1
  45. package/dist/assets/{MindShape-BxkLfo53.js → MindShape-BJCnqyTi.js} +1 -1
  46. package/dist/assets/{PinToDashboard-D7IJhkHd.js → PinToDashboard-Dq77a2iP.js} +1 -1
  47. package/dist/assets/{PlanReview-Cr5XQnuN.js → PlanReview-DvxM1675.js} +1 -1
  48. package/dist/assets/{Presence-DKuWuuqK.js → Presence-LNSqCz8N.js} +1 -1
  49. package/dist/assets/{PresentationDeck-Cd0r3n1O.js → PresentationDeck-8kT0cMtk.js} +1 -1
  50. package/dist/assets/{PrismApp-DcKFHKlU.js → PrismApp-Jf4pIAkh.js} +2 -2
  51. package/dist/assets/{PrismAskController-PncuR6Km.js → PrismAskController-QXSoZBNb.js} +1 -1
  52. package/dist/assets/{PrismBriefingPlayer-DPVF0uAk.js → PrismBriefingPlayer-edFfwMNP.js} +2 -2
  53. package/dist/assets/{PrismOverlay-COemfAxM.js → PrismOverlay-CYItOpax.js} +4 -4
  54. package/dist/assets/{PrivacyApp-C8D6D4ug.js → PrivacyApp-Dqz_BgOS.js} +1 -1
  55. package/dist/assets/{Recap-BiNtOx5h.js → Recap-Ba2qZ2lX.js} +1 -1
  56. package/dist/assets/{ReelJelly-DlUpsGvm.js → ReelJelly-9SCjNeHq.js} +1 -1
  57. package/dist/assets/{RehearsalPanel-BzjZl2d1.js → RehearsalPanel-CtYKPl6O.js} +1 -1
  58. package/dist/assets/{ReplayCard-EEL3-N3E.js → ReplayCard-MSWq-Mxr.js} +2 -2
  59. package/dist/assets/{ReplayOverlay-D30116VF.js → ReplayOverlay-ChDrwMLh.js} +1 -1
  60. package/dist/assets/{RewindOverlay-C4W4TlTA.js → RewindOverlay-CM9d5xhh.js} +1 -1
  61. package/dist/assets/{RippleApp-Bp3koJmT.js → RippleApp-B7G_jg05.js} +2 -2
  62. package/dist/assets/{RippleAskController-fvq109Pn.js → RippleAskController-CJjt7VG8.js} +1 -1
  63. package/dist/assets/{RippleOverlay-BDc4eEW2.js → RippleOverlay-Cfu3ZVL1.js} +2 -2
  64. package/dist/assets/{SeeDontRead-D-Cpq9BU.js → SeeDontRead-DHhwv6RU.js} +1 -1
  65. package/dist/assets/{ShareModal-jNmCfrjC.js → ShareModal-d_o2hebL.js} +1 -1
  66. package/dist/assets/{ShipCascade-Dy1JkWLT.js → ShipCascade-B6kVuilv.js} +1 -1
  67. package/dist/assets/{ShipCourse-wmdSNt0D.js → ShipCourse-CerQYrsy.js} +1 -1
  68. package/dist/assets/{ShipHotspots-BJESX960.js → ShipHotspots-DOmWYgHH.js} +1 -1
  69. package/dist/assets/{ShipIncident-DZ7YVj3U.js → ShipIncident-D0lvmytD.js} +1 -1
  70. package/dist/assets/{ShipMigration-Cw2fI6TU.js → ShipMigration-D70LbiJk.js} +1 -1
  71. package/dist/assets/{ShipOnboarding-v3pjB9Dd.js → ShipOnboarding-B_0dp9a-.js} +1 -1
  72. package/dist/assets/{ShipRead-D8nzUWiX.js → ShipRead-Cp2s7bSL.js} +1 -1
  73. package/dist/assets/{ShipRollout-CEIWoYzI.js → ShipRollout-Bw9pvbSM.js} +1 -1
  74. package/dist/assets/{ShipSuggestions-DcKMr0By.js → ShipSuggestions-eHLjOJL5.js} +1 -1
  75. package/dist/assets/{ShipWorkspace-Ck-C4iW9.js → ShipWorkspace-DwdoBSix.js} +1 -1
  76. package/dist/assets/{SignatureLoop-bo7wU13q.js → SignatureLoop-Bl43npTM.js} +1 -1
  77. package/dist/assets/{SynthesisApp-2uQFqWDb.js → SynthesisApp-BkOWv_pc.js} +2 -2
  78. package/dist/assets/{SynthesisOverlay-_lC1TNb0.js → SynthesisOverlay-CHlVL7sT.js} +1 -1
  79. package/dist/assets/{TermsApp-BVBZzP88.js → TermsApp-PakIMrh0.js} +1 -1
  80. package/dist/assets/{TopicCanvas-B1WcxoEs.js → TopicCanvas-wmAsICUd.js} +2 -2
  81. package/dist/assets/{TourPrism-BfJXC1SR.js → TourPrism-VQqowXpY.js} +1 -1
  82. package/dist/assets/{TrackerTile-Bp2KIlOe.js → TrackerTile-C1mU8Zxj.js} +2 -2
  83. package/dist/assets/{TwoSurfaces-BH7wc_Ep.js → TwoSurfaces-SNT4AVzV.js} +1 -1
  84. package/dist/assets/{UnderstoodPanel-BNsNgsry.js → UnderstoodPanel-BkwhDLhW.js} +1 -1
  85. package/dist/assets/{WhyMachineOverlay-DtuKQK6a.js → WhyMachineOverlay-DgYhqU53.js} +1 -1
  86. package/dist/assets/{WowFeatures-AtKR62OJ.js → WowFeatures-Cky9THxT.js} +1 -1
  87. package/dist/assets/{ZoomDeck-Cjxd13Gj.js → ZoomDeck-BXwcRCO_.js} +1 -1
  88. package/dist/assets/{alternateFinishes-0zAldUWA.js → alternateFinishes-Cn5LyQ0-.js} +1 -1
  89. package/dist/assets/{annotationAuto-LzJWWed8.js → annotationAuto-L2AxlJ2F.js} +1 -1
  90. package/dist/assets/{annotationReel-_G28azfX.js → annotationReel-DdHNp2IH.js} +1 -1
  91. package/dist/assets/{backup-BEABatjO.js → backup-Cw4GBHBV.js} +1 -1
  92. package/dist/assets/canvas-BwR8ltlj.js +1 -0
  93. package/dist/assets/{catalog-DPzc-MaH.js → catalog-2srqP2Jf.js} +1 -1
  94. package/dist/assets/{dashboardEvents-CCCsM3Bq.js → dashboardEvents-S4Y2aOP_.js} +1 -1
  95. package/dist/assets/{dist-PCzrhF4p.js → dist-BJbBdhc0.js} +1 -1
  96. package/dist/assets/{fit-B4AIV3jM.js → fit-C3MkNFdn.js} +1 -1
  97. package/dist/assets/{generateLive-B4vyL_X9.js → generateLive-Ci8kqPD9.js} +1 -1
  98. package/dist/assets/{index-DiPGFGsJ.js → index-DWHIOldG.js} +3 -3
  99. package/dist/assets/{jspdf.es.min-CuE7vq_-.js → jspdf.es.min-CfZM9xhl.js} +1 -1
  100. package/dist/assets/{kokoro-BAiRCDY0.js → kokoro-Da60jB7C.js} +1 -1
  101. package/dist/assets/{lib-CQDCalVC.js → lib-C9jT-CD8.js} +1 -1
  102. package/dist/assets/{liveSchema-Df33WFbg.js → liveSchema-Dw4t_k7M.js} +1 -1
  103. package/dist/assets/{motion-S_ZJkP9s.js → motion-QSGW_vc_.js} +1 -1
  104. package/dist/assets/{notes-CRP7J2eu.js → notes-D21K92Wx.js} +1 -1
  105. package/dist/assets/{pdf-C80f-ORI.js → pdf-BP_vXBKO.js} +1 -1
  106. package/dist/assets/{perfProbe-CBJQvhlT.js → perfProbe-DFw7brPU.js} +1 -1
  107. package/dist/assets/{pin-Le0tONqk.js → pin-BzDcIYD4.js} +1 -1
  108. package/dist/assets/{portal-4ZN6jo0N.js → portal-n6TW0FuE.js} +1 -1
  109. package/dist/assets/{pptxgen.es-DCKUqU8v.js → pptxgen.es-GleD8us4.js} +1 -1
  110. package/dist/assets/{prewarm-CTFQ2mCg.js → prewarm-CehIIttc.js} +1 -1
  111. package/dist/assets/{quietHours-CzNHI0JD.js → quietHours-Brg4oaDf.js} +1 -1
  112. package/dist/assets/{registry-CQzRD746.js → registry-BE1QBNKm.js} +1 -1
  113. package/dist/assets/{registry-BsYURZ0N.js → registry-BPpjU0S5.js} +1 -1
  114. package/dist/assets/{registry-CmrE7O4v.js → registry-BYn3Bcie.js} +1 -1
  115. package/dist/assets/{registry-jZYQkNJ2.js → registry-BvEfWbB0.js} +1 -1
  116. package/dist/assets/{registry-BqcHHCvG.js → registry-CFU0k7VB.js} +1 -1
  117. package/dist/assets/{registry-BftXZ9vp.js → registry-CG5W7Xs6.js} +1 -1
  118. package/dist/assets/{registry-BXafX9C8.js → registry-CePhqBU6.js} +2 -2
  119. package/dist/assets/{registry-D6rlO36K.js → registry-ChG5tFfx.js} +2 -2
  120. package/dist/assets/{registry-DOWgQUqz.js → registry-CoCl26Tl.js} +1 -1
  121. package/dist/assets/{registry-CgrywLei.js → registry-Cpr0zSyk.js} +1 -1
  122. package/dist/assets/{registry-DygrqpKl.js → registry-CrpEXqNF.js} +1 -1
  123. package/dist/assets/{registry-DOt6RM72.js → registry-D86iln18.js} +1 -1
  124. package/dist/assets/{registry-CGZNwEdk.js → registry-DgIia4dY.js} +1 -1
  125. package/dist/assets/{registry-BeStN3Pr.js → registry-HB-VAc6H.js} +1 -1
  126. package/dist/assets/{registry-ejl3mwuM.js → registry-NNLA0NQi.js} +1 -1
  127. package/dist/assets/{registry-Bl7cQtEK.js → registry-VKh9QiDf.js} +1 -1
  128. package/dist/assets/{registry-DYzIwDFU.js → registry-VS55xdsN.js} +1 -1
  129. package/dist/assets/{registry-CS2QCeW9.js → registry-_mqmf4_W.js} +1 -1
  130. package/dist/assets/{registry-2H41hRIB.js → registry-eQ4cE0zj.js} +1 -1
  131. package/dist/assets/{registry-Cm59DqEh.js → registry-h3m1zDGt.js} +1 -1
  132. package/dist/assets/{registry-Dmrednfo.js → registry-ia68k5sK.js} +1 -1
  133. package/dist/assets/{registry-HN-JpqFb.js → registry-mmGDT0wn.js} +1 -1
  134. package/dist/assets/{registry-B2ntaO2N.js → registry-vPwth4BB.js} +1 -1
  135. package/dist/assets/{relate-C5sGCY-w.js → relate-DDWak0Tv.js} +1 -1
  136. package/dist/assets/{shikiHighlight-CifX0fpk.js → shikiHighlight-SWupBCFg.js} +1 -1
  137. package/dist/assets/{useDashboardLoop-Bj1otKTo.js → useDashboardLoop-BSBGTrE2.js} +3 -3
  138. package/dist/assets/{useLiveConfig-CbMkeKrN.js → useLiveConfig-Cc4IKgOd.js} +1 -1
  139. package/dist/assets/{useSpatialCanvas-CgmEY3Ri.js → useSpatialCanvas-D3nfHkST.js} +1 -1
  140. package/dist/assets/{useSpotlightWalk-aimD20cU.js → useSpotlightWalk-gVilFhpa.js} +1 -1
  141. package/dist/assets/{useSrsCards-DItrX8z6.js → useSrsCards-BhFfq4vc.js} +1 -1
  142. package/dist/assets/{useStudy-DyBiirxE.js → useStudy-DRNarubG.js} +1 -1
  143. package/dist/assets/{useZoomGesture-iiPgDTx_.js → useZoomGesture-BdeFOm7j.js} +1 -1
  144. package/dist/index.html +1 -1
  145. package/package.json +1 -1
  146. package/dist/assets/DashboardLoopRuntime-elAVdpQj.js +0 -1
  147. package/dist/assets/canvas-zLlyd97t.js +0 -1
@@ -1 +1 @@
1
- import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{ht as r}from"./index-DiPGFGsJ.js";import{n as i}from"./icons-CHVz6kv_.js";import{t as a}from"./richText-BkxJhl9N.js";import{r as o}from"./format-DlZTyeMy.js";import{a as s,r as c}from"./scale-Bcgfo6Hp.js";import"./lib-CQDCalVC.js";import{t as l}from"./registry-types-DMuK0vJ6.js";var u=t(),d=n();function f({title:e,icon:t=`sparkle`,iconColor:n=`var(--presence)`,steps:r,conclusion:o,footer:s,delay:c}){let l=i[t]||i.sparkle,[f,p]=(0,u.useState)(0);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-cot`,children:r.map((e,t)=>{let n=f===t;return(0,d.jsxs)(`div`,{className:`ai-cot-step`+(n?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-cot-head`,onClick:()=>p(n?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-cot-dot`,children:(0,d.jsx)(`span`,{children:t+1})}),(0,d.jsxs)(`span`,{className:`ai-cot-body`,children:[(0,d.jsxs)(`span`,{className:`ai-cot-label`,children:[e.label,e.tag&&(0,d.jsx)(`span`,{className:`ai-tag`,style:{"--c":e.tagColor||`var(--presence)`},children:e.tag})]}),(0,d.jsx)(`span`,{className:`ai-cot-summary`,children:e.summary})]}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(n?` is-open`:``)})]}),n&&e.detail&&(0,d.jsx)(`div`,{className:`ai-cot-detail`,dangerouslySetInnerHTML:a(e.detail)})]},t)})}),o&&(0,d.jsxs)(`div`,{className:`ai-cot-conclusion`,children:[(0,d.jsx)(i.check,{className:`ic`}),(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(o)})]}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var p={ok:{c:`var(--insight)`,label:`OK`},error:{c:`var(--danger)`,label:`ERR`},pending:{c:`var(--warning)`,label:`RUNNING`}};function m({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,calls:r,footer:o,delay:s}){let c=i[t]||i.layers,[l,f]=(0,u.useState)(0);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-tc`,children:r.map((e,t)=>{let r=l===t,a=p[e.status||`ok`]||p.ok;return(0,d.jsxs)(`div`,{className:`ai-tc-call`+(r?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-tc-head`,onClick:()=>f(r?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-tc-conn`,"aria-hidden":!0}),(0,d.jsx)(`span`,{className:`ai-tc-verb mono`,style:{color:n},children:e.verb||`call`}),(0,d.jsx)(`span`,{className:`ai-tc-name mono`,children:e.name}),(0,d.jsx)(`span`,{className:`ai-tc-spacer`}),typeof e.ms==`number`&&(0,d.jsxs)(`span`,{className:`ai-tc-ms tab-num`,children:[e.ms,`ms`]}),(0,d.jsx)(`span`,{className:`ai-tc-status`,style:{"--c":a.c},children:a.label}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(r?` is-open`:``)})]}),r&&(0,d.jsxs)(`div`,{className:`ai-tc-detail`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane-label`,children:[(0,d.jsx)(i.arrowUp,{className:`ic`}),` Request`]}),(0,d.jsx)(`pre`,{className:`ai-tc-code mono`,children:e.request})]}),(0,d.jsxs)(`div`,{className:`ai-tc-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane-label`,children:[(0,d.jsx)(i.arrowDown,{className:`ic`,style:{color:a.c}}),` Response`]}),(0,d.jsx)(`pre`,{className:`ai-tc-code mono`,children:e.response})]})]})]},t)})}),o&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function h({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,nodes:r,footer:o,delay:s}){let c=i[t]||i.share,[l,f]=(0,u.useState)(!1);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(c,{className:`ic`,style:{color:n}}),` `,e,(0,d.jsxs)(`button`,{className:`ai-at-toggle`+(l?` is-on`:``),onClick:()=>f(e=>!e),children:[(0,d.jsx)(i.layers,{className:`ic`}),` `,l?`Explored`:`Chosen path`]})]}),(0,d.jsx)(`div`,{className:`ai-at`,children:r.map((e,t)=>{let n=l?e.branches:e.branches.filter(e=>e.chosen);return(0,d.jsxs)(`div`,{className:`ai-at-node`,children:[(0,d.jsxs)(`div`,{className:`ai-at-step`,children:[(0,d.jsx)(`span`,{className:`ai-at-rail`,"aria-hidden":!0}),(0,d.jsx)(`span`,{className:`ai-at-stepnum tab-num`,children:t+1}),(0,d.jsxs)(`div`,{className:`ai-at-decision`,children:[(0,d.jsx)(`div`,{className:`ai-at-step-label`,children:e.step}),(0,d.jsx)(`div`,{className:`ai-at-step-q`,children:e.decision})]})]}),(0,d.jsx)(`div`,{className:`ai-at-branches`,children:n.map((e,t)=>{let n=e.chosen?e.color||`var(--insight)`:`var(--text-muted)`;return(0,d.jsxs)(`div`,{className:`ai-at-branch`+(e.chosen?` is-chosen`:` is-alt`),style:{"--c":n},children:[(0,d.jsx)(`span`,{className:`ai-at-branch-mark`,children:e.chosen?(0,d.jsx)(i.check,{className:`ic`}):(0,d.jsx)(i.x,{className:`ic`})}),(0,d.jsx)(`span`,{className:`ai-at-branch-label`,children:e.label}),e.note&&(0,d.jsx)(`span`,{className:`ai-at-branch-note`,children:e.note}),typeof e.score==`number`&&(0,d.jsx)(`span`,{className:`ai-at-branch-score tab-num`,children:Math.round(e.score*100)})]},t)})})]},t)})}),o&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function g({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,prompt:r,outputs:o,footer:s,delay:c}){let l=i[t]||i.layers,[f,p]=(0,u.useState)(new Set),[m,h]=(0,u.useState)(!0),g=e=>p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):o.length-n.size>1&&n.add(e),n}),_=o.filter((e,t)=>!f.has(t));return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e,(0,d.jsxs)(`button`,{className:`ai-at-toggle`+(m?` is-on`:``),onClick:()=>h(e=>!e),children:[(0,d.jsx)(i.eye,{className:`ic`}),` Diff`]})]}),r&&(0,d.jsxs)(`div`,{className:`ai-mc-prompt`,children:[(0,d.jsx)(`span`,{className:`ai-mc-prompt-tag`,children:`PROMPT`}),` `,r]}),(0,d.jsx)(`div`,{className:`ai-mc-tabs`,children:o.map((e,t)=>{let n=!f.has(t),r=e.color||`var(--presence)`;return(0,d.jsxs)(`button`,{className:`ai-mc-tab`+(n?` is-on`:``),style:{"--c":r},onClick:()=>g(t),children:[(0,d.jsx)(`span`,{className:`ai-mc-dot`}),e.model,e.best&&(0,d.jsx)(i.check,{className:`ai-mc-best`})]},t)})}),(0,d.jsx)(`div`,{className:`ai-mc-grid`+(m?``:` no-diff`),style:{"--cols":String(_.length)},children:o.map((e,t)=>f.has(t)?null:(0,d.jsxs)(`div`,{className:`ai-mc-col`+(e.best?` is-best`:``),style:{"--c":e.color||`var(--presence)`},children:[(0,d.jsxs)(`div`,{className:`ai-mc-col-head`,children:[(0,d.jsx)(`span`,{className:`ai-mc-dot`}),(0,d.jsx)(`span`,{className:`ai-mc-model`,children:e.model}),e.badge&&(0,d.jsx)(`span`,{className:`ai-mc-badge`,children:e.badge})]}),(0,d.jsx)(`div`,{className:`ai-mc-text`,dangerouslySetInnerHTML:a(e.text)}),e.meta&&e.meta.length>0&&(0,d.jsx)(`div`,{className:`ai-mc-meta`,children:e.meta.map((e,t)=>(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:e.k}),` `,(0,d.jsx)(`span`,{className:`tab-num`,children:e.v})]},t))})]},t))}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function _(e){return e>=.85?`var(--insight)`:e>=.6?`var(--presence)`:e>=.4?`var(--warning)`:`var(--danger)`}function v({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,prefix:r,tokens:o,footer:s,delay:c}){let l=i[t]||i.spark,[f,p]=(0,u.useState)(null),m=f==null?null:o[f];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-ts-stream`,children:[r&&(0,d.jsx)(`span`,{className:`ai-ts-prefix`,children:r}),o.map((e,t)=>{let n=_(e.p);return(0,d.jsx)(`span`,{className:`ai-ts-tok`+(f===t?` is-on`:``),style:{"--c":n,"--a":String(.1+e.p*.32)},onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),children:e.text},t)})]}),(0,d.jsx)(`div`,{className:`ai-ts-readout`,children:m?(0,d.jsxs)(`div`,{className:`ai-ts-pop`,children:[(0,d.jsxs)(`div`,{className:`ai-ts-pop-head`,children:[(0,d.jsx)(`span`,{className:`ai-ts-pop-tok mono`,children:m.text.trim()||`␣`}),(0,d.jsxs)(`span`,{className:`ai-ts-pop-p tab-num`,style:{color:_(m.p)},children:[(m.p*100).toFixed(1),`%`]})]}),(0,d.jsx)(`div`,{className:`ai-ts-bar`,children:(0,d.jsx)(`span`,{style:{width:`${m.p*100}%`,background:_(m.p)}})}),m.alts&&m.alts.length>0&&(0,d.jsxs)(`div`,{className:`ai-ts-alts`,children:[(0,d.jsx)(`span`,{className:`faint`,children:`alternatives`}),m.alts.map((e,t)=>(0,d.jsxs)(`span`,{className:`ai-ts-alt`,children:[(0,d.jsx)(`span`,{className:`mono`,children:e.t.trim()||`␣`}),(0,d.jsxs)(`span`,{className:`tab-num faint`,children:[(e.p*100).toFixed(0),`%`]})]},t))]})]}):(0,d.jsxs)(`span`,{className:`faint`,children:[(0,d.jsx)(i.eye,{className:`ic`,style:{verticalAlign:`-2px`,width:14,height:14}}),` `,`Hover a token to see its probability and top alternatives`]})}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function y(e){return e>=.8?`var(--insight)`:e>=.6?`var(--presence)`:e>=.4?`var(--warning)`:`var(--text-muted)`}function b({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,query:r,chunks:o,footer:s,delay:c}){let l=i[t]||i.layers,f=o.map((e,t)=>({c:e,i:t})).sort((e,t)=>t.c.score-e.c.score),[p,m]=(0,u.useState)(f.length?f[0].i:-1);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,d.jsxs)(`div`,{className:`ai-rt-query`,children:[(0,d.jsx)(i.spark,{className:`ic`,style:{color:n}}),` `,(0,d.jsx)(`span`,{children:r})]}),(0,d.jsx)(`div`,{className:`ai-rt`,children:f.map(({c:e,i:t},n)=>{let r=p===t,o=y(e.score);return(0,d.jsxs)(`div`,{className:`ai-rt-chunk`+(r?` is-open`:``),style:{"--c":o},children:[(0,d.jsxs)(`button`,{className:`ai-rt-head`,onClick:()=>m(r?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-rt-rank tab-num`,children:n+1}),(0,d.jsxs)(`span`,{className:`ai-rt-body`,children:[(0,d.jsxs)(`span`,{className:`ai-rt-source`,children:[(0,d.jsx)(i.doc,{className:`ic`}),` `,e.source,e.used&&(0,d.jsx)(`span`,{className:`ai-rt-used`,children:`used`}),e.tag&&(0,d.jsx)(`span`,{className:`ai-tag`,style:{"--c":e.tagColor||`var(--presence)`},children:e.tag})]}),(0,d.jsx)(`span`,{className:`ai-rt-snippet`,children:e.snippet})]}),(0,d.jsxs)(`span`,{className:`ai-rt-score`,children:[(0,d.jsx)(`span`,{className:`ai-rt-meter`,children:(0,d.jsx)(`span`,{style:{width:`${e.score*100}%`,background:o}})}),(0,d.jsx)(`span`,{className:`tab-num`,style:{color:o},children:e.score.toFixed(2)})]}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(r?` is-open`:``)})]}),r&&e.body&&(0,d.jsx)(`div`,{className:`ai-rt-detail`,dangerouslySetInnerHTML:a(e.body)})]},t)})}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function x({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,beforeLabel:r=`Before`,afterLabel:o=`After`,before:s,after:c,diff:l,footer:f,delay:p}){let m=i[t]||i.edit,[h,g]=(0,u.useState)(`diff`),_=l.filter(e=>e.t===`add`).length,v=l.filter(e=>e.t===`del`).length;return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-wc-seg`,children:[(0,d.jsx)(`button`,{className:`ai-wc-seg-btn`+(h===`before`?` is-on`:``),onClick:()=>g(`before`),children:r}),(0,d.jsx)(`button`,{className:`ai-wc-seg-btn`+(h===`after`?` is-on`:``),onClick:()=>g(`after`),children:o}),(0,d.jsxs)(`button`,{className:`ai-wc-seg-btn`+(h===`diff`?` is-on`:``),onClick:()=>g(`diff`),children:[`Diff`,` `,(0,d.jsxs)(`span`,{className:`ai-wc-count`,children:[(0,d.jsxs)(`span`,{className:`ai-wc-add`,children:[`+`,_]}),` `,(0,d.jsxs)(`span`,{className:`ai-wc-del`,children:[`−`,v]})]})]})]}),h===`before`&&(0,d.jsx)(`div`,{className:`ai-wc-prose ai-wc-old`,dangerouslySetInnerHTML:a(s)}),h===`after`&&(0,d.jsx)(`div`,{className:`ai-wc-prose ai-wc-new`,dangerouslySetInnerHTML:a(c)}),h===`diff`&&(0,d.jsx)(`div`,{className:`ai-wc-diff`,children:l.map((e,t)=>(0,d.jsxs)(`div`,{className:`ai-wc-line `+(e.t||`ctx`),children:[(0,d.jsx)(`span`,{className:`ai-wc-gutter`,children:e.t===`add`?`+`:e.t===`del`?`−`:``}),(0,d.jsx)(`span`,{className:`ai-wc-content`,dangerouslySetInnerHTML:a(e.c)})]},t))}),f&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}function S({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,query:r,classifier:o=`router`,choices:s,footer:c,delay:l}){let f=i[t]||i.share,[p,m]=(0,u.useState)(Math.max(0,s.findIndex(e=>e.taken))),h=s[p];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-ro`,children:[(0,d.jsxs)(`div`,{className:`ai-ro-source`,children:[r&&(0,d.jsx)(`div`,{className:`ai-ro-query`,children:r}),(0,d.jsxs)(`div`,{className:`ai-ro-classifier`,children:[(0,d.jsx)(i.sparkle,{className:`ic`,style:{color:n}}),` `,o]})]}),(0,d.jsx)(`svg`,{role:`img`,"aria-label":e,className:`ai-ro-wires`,viewBox:`0 0 40 100`,preserveAspectRatio:`none`,"aria-hidden":!0,children:s.map((e,t)=>{let n=(t+.5)/s.length*100,r=e.taken;return(0,d.jsx)(`path`,{d:`M0 50 C 20 50, 20 ${n}, 40 ${n}`,fill:`none`,stroke:r?e.color||`var(--insight)`:`var(--grid-strong)`,strokeWidth:r?2.4:1.4,strokeDasharray:r?`0`:`3 3`},t)})}),(0,d.jsx)(`div`,{className:`ai-ro-choices`,children:s.map((e,t)=>{let n=e.color||(e.taken?`var(--insight)`:`var(--text-muted)`);return(0,d.jsxs)(`button`,{className:`ai-ro-choice`+(e.taken?` is-taken`:``)+(p===t?` is-sel`:``),style:{"--c":n},onClick:()=>m(t),children:[(0,d.jsxs)(`span`,{className:`ai-ro-choice-top`,children:[(0,d.jsx)(`span`,{className:`ai-ro-choice-label`,children:e.label}),e.taken&&(0,d.jsx)(`span`,{className:`ai-ro-taken`,children:(0,d.jsx)(i.check,{className:`ic`})})]}),e.sub&&(0,d.jsx)(`span`,{className:`ai-ro-choice-sub`,children:e.sub}),typeof e.score==`number`&&(0,d.jsx)(`span`,{className:`ai-ro-choice-meter`,children:(0,d.jsx)(`span`,{style:{width:`${e.score*100}%`,background:n}})})]},t)})})]}),h&&h.reason&&(0,d.jsxs)(`div`,{className:`ai-ro-reason`,style:{"--c":h.color||(h.taken?`var(--insight)`:`var(--presence)`)},children:[(0,d.jsx)(i.quote,{className:`ic`}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`strong`,{children:h.label}),` —`,` `,(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(h.reason)})]})]}),c&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var C=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--danger)`];function w({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,clusters:r,points:o,footer:s,delay:c}){let l=i[t]||i.globe,[f,p]=(0,u.useState)(null),[m,h]=(0,u.useState)(null),g=e=>r[e]?.color||C[e%C.length],_=e=>14+e*512,v=e=>14+(1-e)*272,y=f==null?null:o[f];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-em-legend`,children:r.map((e,t)=>(0,d.jsxs)(`button`,{className:`ai-em-leg`+(m===t?` is-on`:``)+(m!=null&&m!==t?` muted`:``),onClick:()=>h(m===t?null:t),children:[(0,d.jsx)(`span`,{className:`ai-em-swatch`,style:{background:g(t)}}),e.name]},t))}),(0,d.jsx)(`div`,{className:`ai-em-wrap`,children:(0,d.jsxs)(`svg`,{role:`img`,"aria-label":e,viewBox:`0 0 540 300`,width:`100%`,className:`ai-em-svg`,style:{display:`block`},children:[[.25,.5,.75].map(e=>(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:_(e),y1:14,x2:_(e),y2:286,stroke:`var(--grid-line)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:14,y1:v(e),x2:526,y2:v(e),stroke:`var(--grid-line)`,strokeWidth:`1`})]},e)),o.map((e,t)=>{let n=g(e.cluster),r=m!=null&&m!==e.cluster,a=f===t;return e.query?(0,d.jsxs)(`g`,{onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),style:{cursor:`pointer`},children:[(0,d.jsx)(`circle`,{cx:_(e.x),cy:v(e.y),r:a?11:9,fill:`none`,stroke:`var(--presence)`,strokeWidth:`2`,opacity:r?.3:1}),(0,d.jsx)(i.spark,{x:_(e.x)-6,y:v(e.y)-6,width:`12`,height:`12`,style:{color:`var(--presence)`,opacity:r?.3:1}})]},t):(0,d.jsx)(`circle`,{cx:_(e.x),cy:v(e.y),r:a?7:4.5,fill:n,opacity:r?.18:a?1:.82,stroke:a?`var(--text-primary)`:`transparent`,strokeWidth:a?1.5:0,onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),style:{cursor:`pointer`,transition:`r var(--m-fast) var(--ease-out)`}},t)})]})}),(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:y?(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`ai-em-swatch`,style:{background:g(y.cluster),display:`inline-block`,verticalAlign:`middle`,marginRight:6}}),(0,d.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:y.label}),(0,d.jsxs)(`span`,{className:`faint`,children:[` `,`· `,r[y.cluster]?.name||`cluster ${y.cluster}`]})]}):s?(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(s)}):(0,d.jsx)(`span`,{className:`faint`,children:`Hover a point for its label · click a legend chip to isolate a cluster`})})]})}function T({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,bins:r,color:o=`var(--presence)`,ece:s,footer:c,delay:l}){let f=i[t]||i.chart,p=[...r].sort((e,t)=>e.predicted-t.predicted),[m,h]=(0,u.useState)(null),g=e=>42+e*236,_=e=>278-e*236,v=Math.max(1,...p.map(e=>e.count)),y=p.map((e,t)=>`${t?`L`:`M`} ${g(e.predicted)} ${_(e.actual)}`).join(` `),b=m==null?null:p[m];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e,s&&(0,d.jsxs)(`span`,{className:`ai-cal-ece tab-num`,children:[`ECE `,s]})]}),(0,d.jsx)(`div`,{className:`ai-cal-wrap`,children:(0,d.jsxs)(`svg`,{role:`img`,"aria-label":e,viewBox:`0 0 320 320`,width:`100%`,className:`ai-cal-svg`,style:{display:`block`},children:[p.map((e,t)=>{let n=236/p.length,r=e.count/v*236*.5;return(0,d.jsx)(`rect`,{x:g(e.predicted)-n*.32,y:278-r,width:n*.64,height:r,fill:`var(--track)`,rx:2,opacity:m===t?.9:.55},`c`+t)}),(0,d.jsx)(`line`,{x1:42,y1:278,x2:278,y2:278,stroke:`var(--grid-strong)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:42,y1:42,x2:42,y2:278,stroke:`var(--grid-strong)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:g(0),y1:_(0),x2:g(1),y2:_(1),stroke:`var(--hover-line)`,strokeWidth:`1.4`,strokeDasharray:`5 5`}),(0,d.jsx)(`path`,{d:y,fill:`none`,stroke:o,strokeWidth:`2.4`,strokeLinejoin:`round`,strokeLinecap:`round`}),p.map((e,t)=>{let n=m===t;return(0,d.jsxs)(`g`,{onMouseEnter:()=>h(t),onMouseLeave:()=>h(null),style:{cursor:`pointer`},children:[(0,d.jsx)(`circle`,{cx:g(e.predicted),cy:_(e.actual),r:14,fill:`transparent`}),n&&(0,d.jsx)(`line`,{x1:g(e.predicted),y1:_(e.predicted),x2:g(e.predicted),y2:_(e.actual),stroke:`var(--warning)`,strokeWidth:`1.4`,strokeDasharray:`2 2`}),(0,d.jsx)(`circle`,{cx:g(e.predicted),cy:_(e.actual),r:n?6:4,fill:o,stroke:`var(--surface-1, var(--bg))`,strokeWidth:`1.5`,style:{transition:`r var(--m-fast)`}})]},`p`+t)}),(0,d.jsx)(`text`,{x:320/2,y:314,textAnchor:`middle`,fontSize:`11`,fill:`var(--text-muted)`,children:`predicted probability`}),(0,d.jsx)(`text`,{x:0,y:0,transform:`translate(14, ${320/2}) rotate(-90)`,textAnchor:`middle`,fontSize:`11`,fill:`var(--text-muted)`,children:`observed accuracy`})]})}),(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:8},children:b?(0,d.jsxs)(`span`,{className:`ai-cal-readout`,children:[(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`predicted`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,children:[(b.predicted*100).toFixed(0),`%`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`actual`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,style:{color:o},children:[(b.actual*100).toFixed(0),`%`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`gap`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,style:{color:`var(--warning)`},children:[((b.actual-b.predicted)*100).toFixed(0),`pt`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`n`}),` `,(0,d.jsx)(`span`,{className:`tab-num`,children:b.count})]})]}):c?(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(c)}):(0,d.jsx)(`span`,{className:`faint`,children:`Dashed diagonal = perfect calibration · hover a bin for predicted vs actual`})})]})}var E={GET:`var(--presence)`,POST:`var(--insight)`,PUT:`var(--warning)`,PATCH:`var(--warning)`,DELETE:`var(--danger)`};function D(e){return typeof e==`number`?e>=500?`var(--danger)`:e>=400?`var(--warning)`:e>=300?`var(--presence)`:e>=200?`var(--insight)`:`var(--text-muted)`:`var(--text-muted)`}function O({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,exchanges:r,caption:s,footer:c,delay:l}){let f=i[t]||i.globe,[p,m]=(0,u.useState)(r.findIndex(e=>e.reqBody||e.respPreview));return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-hx`,children:r.map((e,t)=>{let n=D(e.status),r=E[e.method]||`var(--text-secondary)`,a=!!(e.reqBody||e.respPreview),s=p===t;return(0,d.jsxs)(`div`,{className:`ai-hx-row`+(s?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-hx-head`,onClick:()=>a&&m(s?-1:t),...a?{}:{"aria-disabled":!0,tabIndex:-1},children:[(0,d.jsx)(`span`,{className:`ai-hx-method mono`,style:{"--c":r},children:e.method}),(0,d.jsx)(`span`,{className:`ai-hx-url mono`,children:e.url}),(0,d.jsx)(`span`,{className:`ai-hx-spacer`}),typeof e.durationMs==`number`&&(0,d.jsx)(`span`,{className:`ai-hx-ms tab-num`,children:o(e.durationMs,{unit:`ms`,decimals:0})}),typeof e.status==`number`&&(0,d.jsxs)(`span`,{className:`ai-hx-status tab-num`,style:{"--c":n},title:e.statusText,children:[e.status,e.statusText&&(0,d.jsxs)(`span`,{className:`ai-hx-status-text`,children:[` `,e.statusText]})]}),a&&(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(s?` is-open`:``)})]}),e.note&&(0,d.jsxs)(`div`,{className:`ai-hx-note`,style:{"--c":n},children:[(0,d.jsx)(i.alert,{className:`ic`}),` `,(0,d.jsx)(`span`,{children:e.note})]}),a&&s&&(0,d.jsxs)(`div`,{className:`ai-hx-detail`,children:[e.reqBody&&(0,d.jsxs)(`div`,{className:`ai-hx-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-hx-pane-label`,children:[(0,d.jsx)(i.arrowUp,{className:`ic`}),` Request`]}),(0,d.jsx)(`pre`,{className:`ai-hx-code mono`,children:e.reqBody})]}),e.respPreview&&(0,d.jsxs)(`div`,{className:`ai-hx-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-hx-pane-label`,children:[(0,d.jsx)(i.arrowDown,{className:`ic`,style:{color:n}}),` Response`]}),(0,d.jsx)(`pre`,{className:`ai-hx-code mono`,children:e.respPreview})]})]})]},t)})}),s&&(0,d.jsx)(`div`,{className:`ai-hx-caption`,children:s}),c&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var k=r(),A=320,j={l:44,r:16,t:16,b:36},M=A-j.l-j.r;function N(e,t,n,r,i,a){let o=[...t??[],...n??[]].filter(Number.isFinite);if(!o.length)return null;let l=Math.max(...o)*1.08||1,u=s(0,l,c(l-0,4)).filter(e=>e<=l),d=r-j.t-j.b,f=e.length,p=(e,t)=>j.l+(t>1?e/(t-1)*M:M/2),m=e=>j.t+d-(e-0)/(l-0)*d,h=e=>e.map((e,t)=>`${t===0?`M`:`L`}${p(t,f).toFixed(1)},${m(e).toFixed(1)}`).join(` `),g=t?h(t):``,_=n?h(n):``,v=``;if(a&&t&&n){let e=Math.min(t.length,n.length),r=[],i=[];for(let a=0;a<e;a++)n[a]>t[a]&&(r.push(`${p(a,f).toFixed(1)},${m(n[a]).toFixed(1)}`),i.push(`${p(a,f).toFixed(1)},${m(t[a]).toFixed(1)}`));r.length>=2&&(v=`M${r.join(` L`)} L${[...i].reverse().join(` L`)} Z`)}let y=i!==null&&i>=0&&i<f?p(i,f):null;return{yMin:0,yMax:l,yTickVals:u,PH:d,toX:e=>p(e,f),toY:m,trainPath:g,valPath:_,overfitPath:v,bestX:y}}function P(e){let t=(0,k.c)(42),{model:n,epochs:r,label:i,offsetY:a}=e,{yTickVals:o,PH:s,toX:c,toY:l,trainPath:u,valPath:f,overfitPath:p,bestX:m}=n,h=r.length,g=`translate(0,${a})`,_;if(t[0]!==l||t[1]!==o){let e;t[3]===l?e=t[4]:(e=e=>(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:j.l,y1:l(e),x2:j.l+M,y2:l(e),stroke:`var(--grid-line)`,strokeWidth:.8}),(0,d.jsx)(`text`,{x:j.l-5,y:l(e)+4,textAnchor:`end`,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:e<1?e.toFixed(2):e.toFixed(1)})]},e),t[3]=l,t[4]=e),_=o.map(e),t[0]=l,t[1]=o,t[2]=_}else _=t[2];let v=j.t+s,y;t[5]===v?y=t[6]:(y=(0,d.jsx)(`line`,{x1:j.l,y1:j.t,x2:j.l,y2:v,stroke:`var(--grid-strong)`,strokeWidth:1}),t[5]=v,t[6]=y);let b=j.t+s,x=j.t+s,S;t[7]!==b||t[8]!==x?(S=(0,d.jsx)(`line`,{x1:j.l,y1:b,x2:j.l+M,y2:x,stroke:`var(--grid-strong)`,strokeWidth:1}),t[7]=b,t[8]=x,t[9]=S):S=t[9];let C;t[10]===p?C=t[11]:(C=p&&(0,d.jsx)(`path`,{d:p,fill:`var(--danger)`,fillOpacity:.1}),t[10]=p,t[11]=C);let w;t[12]!==s||t[13]!==m?(w=m!==null&&(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:m,y1:j.t,x2:m,y2:j.t+s,stroke:`var(--warning)`,strokeWidth:1.5,strokeDasharray:`4 3`}),(0,d.jsx)(`text`,{x:m>A-50?m-3:m+3,y:j.t+10,textAnchor:m>A-50?`end`:`start`,fontSize:8,fill:`var(--warning)`,fontFamily:`inherit`,fontWeight:`600`,children:`Best`})]}),t[12]=s,t[13]=m,t[14]=w):w=t[14];let T;t[15]===u?T=t[16]:(T=u&&(0,d.jsx)(`path`,{d:u,fill:`none`,stroke:`var(--insight)`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`}),t[15]=u,t[16]=T);let E;t[17]===f?E=t[18]:(E=f&&(0,d.jsx)(`path`,{d:f,fill:`none`,stroke:`var(--presence)`,strokeWidth:2,strokeDasharray:`5 3`,strokeLinecap:`round`,strokeLinejoin:`round`}),t[17]=f,t[18]=E);let D;if(t[19]!==s||t[20]!==r||t[21]!==h||t[22]!==c){let e;t[24]!==s||t[25]!==h||t[26]!==c?(e=(e,t)=>t%Math.max(1,Math.ceil(h/6))!==0&&t!==h-1?null:(0,d.jsx)(`text`,{x:c(t),y:j.t+s+14,textAnchor:`middle`,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:e},e),t[24]=s,t[25]=h,t[26]=c,t[27]=e):e=t[27],D=r.map(e),t[19]=s,t[20]=r,t[21]=h,t[22]=c,t[23]=D}else D=t[23];let O;t[28]===i?O=t[29]:(O=(0,d.jsx)(`text`,{x:j.l+4,y:j.t+12,fontSize:9,fontWeight:`600`,fill:`var(--text-secondary)`,fontFamily:`inherit`,children:i}),t[28]=i,t[29]=O);let N;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,d.jsxs)(`g`,{transform:`translate(${A-j.r-72},${j.t+2})`,children:[(0,d.jsx)(`line`,{x1:0,y1:5,x2:14,y2:5,stroke:`var(--insight)`,strokeWidth:2}),(0,d.jsx)(`text`,{x:17,y:9,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:`Train`}),(0,d.jsx)(`line`,{x1:0,y1:16,x2:14,y2:16,stroke:`var(--presence)`,strokeWidth:2,strokeDasharray:`4 2`}),(0,d.jsx)(`text`,{x:17,y:20,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:`Val`})]}),t[30]=N):N=t[30];let P;return t[31]!==g||t[32]!==T||t[33]!==E||t[34]!==D||t[35]!==O||t[36]!==_||t[37]!==y||t[38]!==S||t[39]!==C||t[40]!==w?(P=(0,d.jsxs)(`g`,{transform:g,children:[_,y,S,C,w,T,E,D,O,N]}),t[31]=g,t[32]=T,t[33]=E,t[34]=D,t[35]=O,t[36]=_,t[37]=y,t[38]=S,t[39]=C,t[40]=w,t[41]=P):P=t[41],P}function F({title:e=`Training Curves`,icon:t=`sparkle`,iconColor:n=`var(--presence)`,epochs:r,trainLoss:o,valLoss:s,trainAcc:c,valAcc:l,bestEpoch:f,lossLabel:p=`Loss`,accLabel:m=`Accuracy`,footer:h,delay:g}){let _=i[t]??i.sparkle,v=o!==void 0||s!==void 0,y=c!==void 0||l!==void 0,b=+!!v+ +!!y,x=b>1?180:220,S=b*x,C=(0,u.useMemo)(()=>{if(f===void 0)return null;let e=r.indexOf(f);return e>=0?e:null},[f,r]),w=(0,u.useMemo)(()=>v?N(r,o,s,x,C,!0):null,[r,o,s,x,C,v]),T=(0,u.useMemo)(()=>y?N(r,c,l,x,C,!1):null,[r,c,l,x,C,y]);return!r.length||b===0?null:(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(_,{className:`ic`,style:{color:n}}),e]}),(0,d.jsxs)(`svg`,{viewBox:`0 0 ${A} ${S}`,width:`100%`,role:`img`,"aria-label":e,style:{display:`block`,overflow:`visible`},children:[w&&(0,d.jsx)(P,{model:w,epochs:r,label:p,offsetY:0}),T&&(0,d.jsx)(P,{model:T,epochs:r,label:m,offsetY:w?x:0})]}),h&&(0,d.jsx)(`div`,{className:`insight-summary`,dangerouslySetInnerHTML:a(h)})]})}var I=e({aiRegistry:()=>L}),L={reasoning:l(f),toolcalls:l(m),agenttrace:l(h),modelcompare:l(g),tokenstream:l(v),retrieval:l(b),whatchanged:l(x),routing:l(S),embedmap:l(w),calibration:l(T),httpexchange:l(O),trainingcurve:l(F)};export{I as n,L as t};
1
+ import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{ht as r}from"./index-DWHIOldG.js";import{n as i}from"./icons-CHVz6kv_.js";import{t as a}from"./richText-BkxJhl9N.js";import{r as o}from"./format-DlZTyeMy.js";import{a as s,r as c}from"./scale-Bcgfo6Hp.js";import"./lib-C9jT-CD8.js";import{t as l}from"./registry-types-DMuK0vJ6.js";var u=t(),d=n();function f({title:e,icon:t=`sparkle`,iconColor:n=`var(--presence)`,steps:r,conclusion:o,footer:s,delay:c}){let l=i[t]||i.sparkle,[f,p]=(0,u.useState)(0);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-cot`,children:r.map((e,t)=>{let n=f===t;return(0,d.jsxs)(`div`,{className:`ai-cot-step`+(n?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-cot-head`,onClick:()=>p(n?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-cot-dot`,children:(0,d.jsx)(`span`,{children:t+1})}),(0,d.jsxs)(`span`,{className:`ai-cot-body`,children:[(0,d.jsxs)(`span`,{className:`ai-cot-label`,children:[e.label,e.tag&&(0,d.jsx)(`span`,{className:`ai-tag`,style:{"--c":e.tagColor||`var(--presence)`},children:e.tag})]}),(0,d.jsx)(`span`,{className:`ai-cot-summary`,children:e.summary})]}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(n?` is-open`:``)})]}),n&&e.detail&&(0,d.jsx)(`div`,{className:`ai-cot-detail`,dangerouslySetInnerHTML:a(e.detail)})]},t)})}),o&&(0,d.jsxs)(`div`,{className:`ai-cot-conclusion`,children:[(0,d.jsx)(i.check,{className:`ic`}),(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(o)})]}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var p={ok:{c:`var(--insight)`,label:`OK`},error:{c:`var(--danger)`,label:`ERR`},pending:{c:`var(--warning)`,label:`RUNNING`}};function m({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,calls:r,footer:o,delay:s}){let c=i[t]||i.layers,[l,f]=(0,u.useState)(0);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-tc`,children:r.map((e,t)=>{let r=l===t,a=p[e.status||`ok`]||p.ok;return(0,d.jsxs)(`div`,{className:`ai-tc-call`+(r?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-tc-head`,onClick:()=>f(r?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-tc-conn`,"aria-hidden":!0}),(0,d.jsx)(`span`,{className:`ai-tc-verb mono`,style:{color:n},children:e.verb||`call`}),(0,d.jsx)(`span`,{className:`ai-tc-name mono`,children:e.name}),(0,d.jsx)(`span`,{className:`ai-tc-spacer`}),typeof e.ms==`number`&&(0,d.jsxs)(`span`,{className:`ai-tc-ms tab-num`,children:[e.ms,`ms`]}),(0,d.jsx)(`span`,{className:`ai-tc-status`,style:{"--c":a.c},children:a.label}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(r?` is-open`:``)})]}),r&&(0,d.jsxs)(`div`,{className:`ai-tc-detail`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane-label`,children:[(0,d.jsx)(i.arrowUp,{className:`ic`}),` Request`]}),(0,d.jsx)(`pre`,{className:`ai-tc-code mono`,children:e.request})]}),(0,d.jsxs)(`div`,{className:`ai-tc-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane-label`,children:[(0,d.jsx)(i.arrowDown,{className:`ic`,style:{color:a.c}}),` Response`]}),(0,d.jsx)(`pre`,{className:`ai-tc-code mono`,children:e.response})]})]})]},t)})}),o&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function h({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,nodes:r,footer:o,delay:s}){let c=i[t]||i.share,[l,f]=(0,u.useState)(!1);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(c,{className:`ic`,style:{color:n}}),` `,e,(0,d.jsxs)(`button`,{className:`ai-at-toggle`+(l?` is-on`:``),onClick:()=>f(e=>!e),children:[(0,d.jsx)(i.layers,{className:`ic`}),` `,l?`Explored`:`Chosen path`]})]}),(0,d.jsx)(`div`,{className:`ai-at`,children:r.map((e,t)=>{let n=l?e.branches:e.branches.filter(e=>e.chosen);return(0,d.jsxs)(`div`,{className:`ai-at-node`,children:[(0,d.jsxs)(`div`,{className:`ai-at-step`,children:[(0,d.jsx)(`span`,{className:`ai-at-rail`,"aria-hidden":!0}),(0,d.jsx)(`span`,{className:`ai-at-stepnum tab-num`,children:t+1}),(0,d.jsxs)(`div`,{className:`ai-at-decision`,children:[(0,d.jsx)(`div`,{className:`ai-at-step-label`,children:e.step}),(0,d.jsx)(`div`,{className:`ai-at-step-q`,children:e.decision})]})]}),(0,d.jsx)(`div`,{className:`ai-at-branches`,children:n.map((e,t)=>{let n=e.chosen?e.color||`var(--insight)`:`var(--text-muted)`;return(0,d.jsxs)(`div`,{className:`ai-at-branch`+(e.chosen?` is-chosen`:` is-alt`),style:{"--c":n},children:[(0,d.jsx)(`span`,{className:`ai-at-branch-mark`,children:e.chosen?(0,d.jsx)(i.check,{className:`ic`}):(0,d.jsx)(i.x,{className:`ic`})}),(0,d.jsx)(`span`,{className:`ai-at-branch-label`,children:e.label}),e.note&&(0,d.jsx)(`span`,{className:`ai-at-branch-note`,children:e.note}),typeof e.score==`number`&&(0,d.jsx)(`span`,{className:`ai-at-branch-score tab-num`,children:Math.round(e.score*100)})]},t)})})]},t)})}),o&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function g({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,prompt:r,outputs:o,footer:s,delay:c}){let l=i[t]||i.layers,[f,p]=(0,u.useState)(new Set),[m,h]=(0,u.useState)(!0),g=e=>p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):o.length-n.size>1&&n.add(e),n}),_=o.filter((e,t)=>!f.has(t));return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e,(0,d.jsxs)(`button`,{className:`ai-at-toggle`+(m?` is-on`:``),onClick:()=>h(e=>!e),children:[(0,d.jsx)(i.eye,{className:`ic`}),` Diff`]})]}),r&&(0,d.jsxs)(`div`,{className:`ai-mc-prompt`,children:[(0,d.jsx)(`span`,{className:`ai-mc-prompt-tag`,children:`PROMPT`}),` `,r]}),(0,d.jsx)(`div`,{className:`ai-mc-tabs`,children:o.map((e,t)=>{let n=!f.has(t),r=e.color||`var(--presence)`;return(0,d.jsxs)(`button`,{className:`ai-mc-tab`+(n?` is-on`:``),style:{"--c":r},onClick:()=>g(t),children:[(0,d.jsx)(`span`,{className:`ai-mc-dot`}),e.model,e.best&&(0,d.jsx)(i.check,{className:`ai-mc-best`})]},t)})}),(0,d.jsx)(`div`,{className:`ai-mc-grid`+(m?``:` no-diff`),style:{"--cols":String(_.length)},children:o.map((e,t)=>f.has(t)?null:(0,d.jsxs)(`div`,{className:`ai-mc-col`+(e.best?` is-best`:``),style:{"--c":e.color||`var(--presence)`},children:[(0,d.jsxs)(`div`,{className:`ai-mc-col-head`,children:[(0,d.jsx)(`span`,{className:`ai-mc-dot`}),(0,d.jsx)(`span`,{className:`ai-mc-model`,children:e.model}),e.badge&&(0,d.jsx)(`span`,{className:`ai-mc-badge`,children:e.badge})]}),(0,d.jsx)(`div`,{className:`ai-mc-text`,dangerouslySetInnerHTML:a(e.text)}),e.meta&&e.meta.length>0&&(0,d.jsx)(`div`,{className:`ai-mc-meta`,children:e.meta.map((e,t)=>(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:e.k}),` `,(0,d.jsx)(`span`,{className:`tab-num`,children:e.v})]},t))})]},t))}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function _(e){return e>=.85?`var(--insight)`:e>=.6?`var(--presence)`:e>=.4?`var(--warning)`:`var(--danger)`}function v({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,prefix:r,tokens:o,footer:s,delay:c}){let l=i[t]||i.spark,[f,p]=(0,u.useState)(null),m=f==null?null:o[f];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-ts-stream`,children:[r&&(0,d.jsx)(`span`,{className:`ai-ts-prefix`,children:r}),o.map((e,t)=>{let n=_(e.p);return(0,d.jsx)(`span`,{className:`ai-ts-tok`+(f===t?` is-on`:``),style:{"--c":n,"--a":String(.1+e.p*.32)},onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),children:e.text},t)})]}),(0,d.jsx)(`div`,{className:`ai-ts-readout`,children:m?(0,d.jsxs)(`div`,{className:`ai-ts-pop`,children:[(0,d.jsxs)(`div`,{className:`ai-ts-pop-head`,children:[(0,d.jsx)(`span`,{className:`ai-ts-pop-tok mono`,children:m.text.trim()||`␣`}),(0,d.jsxs)(`span`,{className:`ai-ts-pop-p tab-num`,style:{color:_(m.p)},children:[(m.p*100).toFixed(1),`%`]})]}),(0,d.jsx)(`div`,{className:`ai-ts-bar`,children:(0,d.jsx)(`span`,{style:{width:`${m.p*100}%`,background:_(m.p)}})}),m.alts&&m.alts.length>0&&(0,d.jsxs)(`div`,{className:`ai-ts-alts`,children:[(0,d.jsx)(`span`,{className:`faint`,children:`alternatives`}),m.alts.map((e,t)=>(0,d.jsxs)(`span`,{className:`ai-ts-alt`,children:[(0,d.jsx)(`span`,{className:`mono`,children:e.t.trim()||`␣`}),(0,d.jsxs)(`span`,{className:`tab-num faint`,children:[(e.p*100).toFixed(0),`%`]})]},t))]})]}):(0,d.jsxs)(`span`,{className:`faint`,children:[(0,d.jsx)(i.eye,{className:`ic`,style:{verticalAlign:`-2px`,width:14,height:14}}),` `,`Hover a token to see its probability and top alternatives`]})}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function y(e){return e>=.8?`var(--insight)`:e>=.6?`var(--presence)`:e>=.4?`var(--warning)`:`var(--text-muted)`}function b({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,query:r,chunks:o,footer:s,delay:c}){let l=i[t]||i.layers,f=o.map((e,t)=>({c:e,i:t})).sort((e,t)=>t.c.score-e.c.score),[p,m]=(0,u.useState)(f.length?f[0].i:-1);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,d.jsxs)(`div`,{className:`ai-rt-query`,children:[(0,d.jsx)(i.spark,{className:`ic`,style:{color:n}}),` `,(0,d.jsx)(`span`,{children:r})]}),(0,d.jsx)(`div`,{className:`ai-rt`,children:f.map(({c:e,i:t},n)=>{let r=p===t,o=y(e.score);return(0,d.jsxs)(`div`,{className:`ai-rt-chunk`+(r?` is-open`:``),style:{"--c":o},children:[(0,d.jsxs)(`button`,{className:`ai-rt-head`,onClick:()=>m(r?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-rt-rank tab-num`,children:n+1}),(0,d.jsxs)(`span`,{className:`ai-rt-body`,children:[(0,d.jsxs)(`span`,{className:`ai-rt-source`,children:[(0,d.jsx)(i.doc,{className:`ic`}),` `,e.source,e.used&&(0,d.jsx)(`span`,{className:`ai-rt-used`,children:`used`}),e.tag&&(0,d.jsx)(`span`,{className:`ai-tag`,style:{"--c":e.tagColor||`var(--presence)`},children:e.tag})]}),(0,d.jsx)(`span`,{className:`ai-rt-snippet`,children:e.snippet})]}),(0,d.jsxs)(`span`,{className:`ai-rt-score`,children:[(0,d.jsx)(`span`,{className:`ai-rt-meter`,children:(0,d.jsx)(`span`,{style:{width:`${e.score*100}%`,background:o}})}),(0,d.jsx)(`span`,{className:`tab-num`,style:{color:o},children:e.score.toFixed(2)})]}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(r?` is-open`:``)})]}),r&&e.body&&(0,d.jsx)(`div`,{className:`ai-rt-detail`,dangerouslySetInnerHTML:a(e.body)})]},t)})}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function x({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,beforeLabel:r=`Before`,afterLabel:o=`After`,before:s,after:c,diff:l,footer:f,delay:p}){let m=i[t]||i.edit,[h,g]=(0,u.useState)(`diff`),_=l.filter(e=>e.t===`add`).length,v=l.filter(e=>e.t===`del`).length;return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-wc-seg`,children:[(0,d.jsx)(`button`,{className:`ai-wc-seg-btn`+(h===`before`?` is-on`:``),onClick:()=>g(`before`),children:r}),(0,d.jsx)(`button`,{className:`ai-wc-seg-btn`+(h===`after`?` is-on`:``),onClick:()=>g(`after`),children:o}),(0,d.jsxs)(`button`,{className:`ai-wc-seg-btn`+(h===`diff`?` is-on`:``),onClick:()=>g(`diff`),children:[`Diff`,` `,(0,d.jsxs)(`span`,{className:`ai-wc-count`,children:[(0,d.jsxs)(`span`,{className:`ai-wc-add`,children:[`+`,_]}),` `,(0,d.jsxs)(`span`,{className:`ai-wc-del`,children:[`−`,v]})]})]})]}),h===`before`&&(0,d.jsx)(`div`,{className:`ai-wc-prose ai-wc-old`,dangerouslySetInnerHTML:a(s)}),h===`after`&&(0,d.jsx)(`div`,{className:`ai-wc-prose ai-wc-new`,dangerouslySetInnerHTML:a(c)}),h===`diff`&&(0,d.jsx)(`div`,{className:`ai-wc-diff`,children:l.map((e,t)=>(0,d.jsxs)(`div`,{className:`ai-wc-line `+(e.t||`ctx`),children:[(0,d.jsx)(`span`,{className:`ai-wc-gutter`,children:e.t===`add`?`+`:e.t===`del`?`−`:``}),(0,d.jsx)(`span`,{className:`ai-wc-content`,dangerouslySetInnerHTML:a(e.c)})]},t))}),f&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}function S({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,query:r,classifier:o=`router`,choices:s,footer:c,delay:l}){let f=i[t]||i.share,[p,m]=(0,u.useState)(Math.max(0,s.findIndex(e=>e.taken))),h=s[p];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-ro`,children:[(0,d.jsxs)(`div`,{className:`ai-ro-source`,children:[r&&(0,d.jsx)(`div`,{className:`ai-ro-query`,children:r}),(0,d.jsxs)(`div`,{className:`ai-ro-classifier`,children:[(0,d.jsx)(i.sparkle,{className:`ic`,style:{color:n}}),` `,o]})]}),(0,d.jsx)(`svg`,{role:`img`,"aria-label":e,className:`ai-ro-wires`,viewBox:`0 0 40 100`,preserveAspectRatio:`none`,"aria-hidden":!0,children:s.map((e,t)=>{let n=(t+.5)/s.length*100,r=e.taken;return(0,d.jsx)(`path`,{d:`M0 50 C 20 50, 20 ${n}, 40 ${n}`,fill:`none`,stroke:r?e.color||`var(--insight)`:`var(--grid-strong)`,strokeWidth:r?2.4:1.4,strokeDasharray:r?`0`:`3 3`},t)})}),(0,d.jsx)(`div`,{className:`ai-ro-choices`,children:s.map((e,t)=>{let n=e.color||(e.taken?`var(--insight)`:`var(--text-muted)`);return(0,d.jsxs)(`button`,{className:`ai-ro-choice`+(e.taken?` is-taken`:``)+(p===t?` is-sel`:``),style:{"--c":n},onClick:()=>m(t),children:[(0,d.jsxs)(`span`,{className:`ai-ro-choice-top`,children:[(0,d.jsx)(`span`,{className:`ai-ro-choice-label`,children:e.label}),e.taken&&(0,d.jsx)(`span`,{className:`ai-ro-taken`,children:(0,d.jsx)(i.check,{className:`ic`})})]}),e.sub&&(0,d.jsx)(`span`,{className:`ai-ro-choice-sub`,children:e.sub}),typeof e.score==`number`&&(0,d.jsx)(`span`,{className:`ai-ro-choice-meter`,children:(0,d.jsx)(`span`,{style:{width:`${e.score*100}%`,background:n}})})]},t)})})]}),h&&h.reason&&(0,d.jsxs)(`div`,{className:`ai-ro-reason`,style:{"--c":h.color||(h.taken?`var(--insight)`:`var(--presence)`)},children:[(0,d.jsx)(i.quote,{className:`ic`}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`strong`,{children:h.label}),` —`,` `,(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(h.reason)})]})]}),c&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var C=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--danger)`];function w({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,clusters:r,points:o,footer:s,delay:c}){let l=i[t]||i.globe,[f,p]=(0,u.useState)(null),[m,h]=(0,u.useState)(null),g=e=>r[e]?.color||C[e%C.length],_=e=>14+e*512,v=e=>14+(1-e)*272,y=f==null?null:o[f];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-em-legend`,children:r.map((e,t)=>(0,d.jsxs)(`button`,{className:`ai-em-leg`+(m===t?` is-on`:``)+(m!=null&&m!==t?` muted`:``),onClick:()=>h(m===t?null:t),children:[(0,d.jsx)(`span`,{className:`ai-em-swatch`,style:{background:g(t)}}),e.name]},t))}),(0,d.jsx)(`div`,{className:`ai-em-wrap`,children:(0,d.jsxs)(`svg`,{role:`img`,"aria-label":e,viewBox:`0 0 540 300`,width:`100%`,className:`ai-em-svg`,style:{display:`block`},children:[[.25,.5,.75].map(e=>(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:_(e),y1:14,x2:_(e),y2:286,stroke:`var(--grid-line)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:14,y1:v(e),x2:526,y2:v(e),stroke:`var(--grid-line)`,strokeWidth:`1`})]},e)),o.map((e,t)=>{let n=g(e.cluster),r=m!=null&&m!==e.cluster,a=f===t;return e.query?(0,d.jsxs)(`g`,{onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),style:{cursor:`pointer`},children:[(0,d.jsx)(`circle`,{cx:_(e.x),cy:v(e.y),r:a?11:9,fill:`none`,stroke:`var(--presence)`,strokeWidth:`2`,opacity:r?.3:1}),(0,d.jsx)(i.spark,{x:_(e.x)-6,y:v(e.y)-6,width:`12`,height:`12`,style:{color:`var(--presence)`,opacity:r?.3:1}})]},t):(0,d.jsx)(`circle`,{cx:_(e.x),cy:v(e.y),r:a?7:4.5,fill:n,opacity:r?.18:a?1:.82,stroke:a?`var(--text-primary)`:`transparent`,strokeWidth:a?1.5:0,onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),style:{cursor:`pointer`,transition:`r var(--m-fast) var(--ease-out)`}},t)})]})}),(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:y?(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`ai-em-swatch`,style:{background:g(y.cluster),display:`inline-block`,verticalAlign:`middle`,marginRight:6}}),(0,d.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:y.label}),(0,d.jsxs)(`span`,{className:`faint`,children:[` `,`· `,r[y.cluster]?.name||`cluster ${y.cluster}`]})]}):s?(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(s)}):(0,d.jsx)(`span`,{className:`faint`,children:`Hover a point for its label · click a legend chip to isolate a cluster`})})]})}function T({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,bins:r,color:o=`var(--presence)`,ece:s,footer:c,delay:l}){let f=i[t]||i.chart,p=[...r].sort((e,t)=>e.predicted-t.predicted),[m,h]=(0,u.useState)(null),g=e=>42+e*236,_=e=>278-e*236,v=Math.max(1,...p.map(e=>e.count)),y=p.map((e,t)=>`${t?`L`:`M`} ${g(e.predicted)} ${_(e.actual)}`).join(` `),b=m==null?null:p[m];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e,s&&(0,d.jsxs)(`span`,{className:`ai-cal-ece tab-num`,children:[`ECE `,s]})]}),(0,d.jsx)(`div`,{className:`ai-cal-wrap`,children:(0,d.jsxs)(`svg`,{role:`img`,"aria-label":e,viewBox:`0 0 320 320`,width:`100%`,className:`ai-cal-svg`,style:{display:`block`},children:[p.map((e,t)=>{let n=236/p.length,r=e.count/v*236*.5;return(0,d.jsx)(`rect`,{x:g(e.predicted)-n*.32,y:278-r,width:n*.64,height:r,fill:`var(--track)`,rx:2,opacity:m===t?.9:.55},`c`+t)}),(0,d.jsx)(`line`,{x1:42,y1:278,x2:278,y2:278,stroke:`var(--grid-strong)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:42,y1:42,x2:42,y2:278,stroke:`var(--grid-strong)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:g(0),y1:_(0),x2:g(1),y2:_(1),stroke:`var(--hover-line)`,strokeWidth:`1.4`,strokeDasharray:`5 5`}),(0,d.jsx)(`path`,{d:y,fill:`none`,stroke:o,strokeWidth:`2.4`,strokeLinejoin:`round`,strokeLinecap:`round`}),p.map((e,t)=>{let n=m===t;return(0,d.jsxs)(`g`,{onMouseEnter:()=>h(t),onMouseLeave:()=>h(null),style:{cursor:`pointer`},children:[(0,d.jsx)(`circle`,{cx:g(e.predicted),cy:_(e.actual),r:14,fill:`transparent`}),n&&(0,d.jsx)(`line`,{x1:g(e.predicted),y1:_(e.predicted),x2:g(e.predicted),y2:_(e.actual),stroke:`var(--warning)`,strokeWidth:`1.4`,strokeDasharray:`2 2`}),(0,d.jsx)(`circle`,{cx:g(e.predicted),cy:_(e.actual),r:n?6:4,fill:o,stroke:`var(--surface-1, var(--bg))`,strokeWidth:`1.5`,style:{transition:`r var(--m-fast)`}})]},`p`+t)}),(0,d.jsx)(`text`,{x:320/2,y:314,textAnchor:`middle`,fontSize:`11`,fill:`var(--text-muted)`,children:`predicted probability`}),(0,d.jsx)(`text`,{x:0,y:0,transform:`translate(14, ${320/2}) rotate(-90)`,textAnchor:`middle`,fontSize:`11`,fill:`var(--text-muted)`,children:`observed accuracy`})]})}),(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:8},children:b?(0,d.jsxs)(`span`,{className:`ai-cal-readout`,children:[(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`predicted`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,children:[(b.predicted*100).toFixed(0),`%`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`actual`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,style:{color:o},children:[(b.actual*100).toFixed(0),`%`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`gap`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,style:{color:`var(--warning)`},children:[((b.actual-b.predicted)*100).toFixed(0),`pt`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`n`}),` `,(0,d.jsx)(`span`,{className:`tab-num`,children:b.count})]})]}):c?(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(c)}):(0,d.jsx)(`span`,{className:`faint`,children:`Dashed diagonal = perfect calibration · hover a bin for predicted vs actual`})})]})}var E={GET:`var(--presence)`,POST:`var(--insight)`,PUT:`var(--warning)`,PATCH:`var(--warning)`,DELETE:`var(--danger)`};function D(e){return typeof e==`number`?e>=500?`var(--danger)`:e>=400?`var(--warning)`:e>=300?`var(--presence)`:e>=200?`var(--insight)`:`var(--text-muted)`:`var(--text-muted)`}function O({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,exchanges:r,caption:s,footer:c,delay:l}){let f=i[t]||i.globe,[p,m]=(0,u.useState)(r.findIndex(e=>e.reqBody||e.respPreview));return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-hx`,children:r.map((e,t)=>{let n=D(e.status),r=E[e.method]||`var(--text-secondary)`,a=!!(e.reqBody||e.respPreview),s=p===t;return(0,d.jsxs)(`div`,{className:`ai-hx-row`+(s?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-hx-head`,onClick:()=>a&&m(s?-1:t),...a?{}:{"aria-disabled":!0,tabIndex:-1},children:[(0,d.jsx)(`span`,{className:`ai-hx-method mono`,style:{"--c":r},children:e.method}),(0,d.jsx)(`span`,{className:`ai-hx-url mono`,children:e.url}),(0,d.jsx)(`span`,{className:`ai-hx-spacer`}),typeof e.durationMs==`number`&&(0,d.jsx)(`span`,{className:`ai-hx-ms tab-num`,children:o(e.durationMs,{unit:`ms`,decimals:0})}),typeof e.status==`number`&&(0,d.jsxs)(`span`,{className:`ai-hx-status tab-num`,style:{"--c":n},title:e.statusText,children:[e.status,e.statusText&&(0,d.jsxs)(`span`,{className:`ai-hx-status-text`,children:[` `,e.statusText]})]}),a&&(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(s?` is-open`:``)})]}),e.note&&(0,d.jsxs)(`div`,{className:`ai-hx-note`,style:{"--c":n},children:[(0,d.jsx)(i.alert,{className:`ic`}),` `,(0,d.jsx)(`span`,{children:e.note})]}),a&&s&&(0,d.jsxs)(`div`,{className:`ai-hx-detail`,children:[e.reqBody&&(0,d.jsxs)(`div`,{className:`ai-hx-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-hx-pane-label`,children:[(0,d.jsx)(i.arrowUp,{className:`ic`}),` Request`]}),(0,d.jsx)(`pre`,{className:`ai-hx-code mono`,children:e.reqBody})]}),e.respPreview&&(0,d.jsxs)(`div`,{className:`ai-hx-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-hx-pane-label`,children:[(0,d.jsx)(i.arrowDown,{className:`ic`,style:{color:n}}),` Response`]}),(0,d.jsx)(`pre`,{className:`ai-hx-code mono`,children:e.respPreview})]})]})]},t)})}),s&&(0,d.jsx)(`div`,{className:`ai-hx-caption`,children:s}),c&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var k=r(),A=320,j={l:44,r:16,t:16,b:36},M=A-j.l-j.r;function N(e,t,n,r,i,a){let o=[...t??[],...n??[]].filter(Number.isFinite);if(!o.length)return null;let l=Math.max(...o)*1.08||1,u=s(0,l,c(l-0,4)).filter(e=>e<=l),d=r-j.t-j.b,f=e.length,p=(e,t)=>j.l+(t>1?e/(t-1)*M:M/2),m=e=>j.t+d-(e-0)/(l-0)*d,h=e=>e.map((e,t)=>`${t===0?`M`:`L`}${p(t,f).toFixed(1)},${m(e).toFixed(1)}`).join(` `),g=t?h(t):``,_=n?h(n):``,v=``;if(a&&t&&n){let e=Math.min(t.length,n.length),r=[],i=[];for(let a=0;a<e;a++)n[a]>t[a]&&(r.push(`${p(a,f).toFixed(1)},${m(n[a]).toFixed(1)}`),i.push(`${p(a,f).toFixed(1)},${m(t[a]).toFixed(1)}`));r.length>=2&&(v=`M${r.join(` L`)} L${[...i].reverse().join(` L`)} Z`)}let y=i!==null&&i>=0&&i<f?p(i,f):null;return{yMin:0,yMax:l,yTickVals:u,PH:d,toX:e=>p(e,f),toY:m,trainPath:g,valPath:_,overfitPath:v,bestX:y}}function P(e){let t=(0,k.c)(42),{model:n,epochs:r,label:i,offsetY:a}=e,{yTickVals:o,PH:s,toX:c,toY:l,trainPath:u,valPath:f,overfitPath:p,bestX:m}=n,h=r.length,g=`translate(0,${a})`,_;if(t[0]!==l||t[1]!==o){let e;t[3]===l?e=t[4]:(e=e=>(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:j.l,y1:l(e),x2:j.l+M,y2:l(e),stroke:`var(--grid-line)`,strokeWidth:.8}),(0,d.jsx)(`text`,{x:j.l-5,y:l(e)+4,textAnchor:`end`,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:e<1?e.toFixed(2):e.toFixed(1)})]},e),t[3]=l,t[4]=e),_=o.map(e),t[0]=l,t[1]=o,t[2]=_}else _=t[2];let v=j.t+s,y;t[5]===v?y=t[6]:(y=(0,d.jsx)(`line`,{x1:j.l,y1:j.t,x2:j.l,y2:v,stroke:`var(--grid-strong)`,strokeWidth:1}),t[5]=v,t[6]=y);let b=j.t+s,x=j.t+s,S;t[7]!==b||t[8]!==x?(S=(0,d.jsx)(`line`,{x1:j.l,y1:b,x2:j.l+M,y2:x,stroke:`var(--grid-strong)`,strokeWidth:1}),t[7]=b,t[8]=x,t[9]=S):S=t[9];let C;t[10]===p?C=t[11]:(C=p&&(0,d.jsx)(`path`,{d:p,fill:`var(--danger)`,fillOpacity:.1}),t[10]=p,t[11]=C);let w;t[12]!==s||t[13]!==m?(w=m!==null&&(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:m,y1:j.t,x2:m,y2:j.t+s,stroke:`var(--warning)`,strokeWidth:1.5,strokeDasharray:`4 3`}),(0,d.jsx)(`text`,{x:m>A-50?m-3:m+3,y:j.t+10,textAnchor:m>A-50?`end`:`start`,fontSize:8,fill:`var(--warning)`,fontFamily:`inherit`,fontWeight:`600`,children:`Best`})]}),t[12]=s,t[13]=m,t[14]=w):w=t[14];let T;t[15]===u?T=t[16]:(T=u&&(0,d.jsx)(`path`,{d:u,fill:`none`,stroke:`var(--insight)`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`}),t[15]=u,t[16]=T);let E;t[17]===f?E=t[18]:(E=f&&(0,d.jsx)(`path`,{d:f,fill:`none`,stroke:`var(--presence)`,strokeWidth:2,strokeDasharray:`5 3`,strokeLinecap:`round`,strokeLinejoin:`round`}),t[17]=f,t[18]=E);let D;if(t[19]!==s||t[20]!==r||t[21]!==h||t[22]!==c){let e;t[24]!==s||t[25]!==h||t[26]!==c?(e=(e,t)=>t%Math.max(1,Math.ceil(h/6))!==0&&t!==h-1?null:(0,d.jsx)(`text`,{x:c(t),y:j.t+s+14,textAnchor:`middle`,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:e},e),t[24]=s,t[25]=h,t[26]=c,t[27]=e):e=t[27],D=r.map(e),t[19]=s,t[20]=r,t[21]=h,t[22]=c,t[23]=D}else D=t[23];let O;t[28]===i?O=t[29]:(O=(0,d.jsx)(`text`,{x:j.l+4,y:j.t+12,fontSize:9,fontWeight:`600`,fill:`var(--text-secondary)`,fontFamily:`inherit`,children:i}),t[28]=i,t[29]=O);let N;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,d.jsxs)(`g`,{transform:`translate(${A-j.r-72},${j.t+2})`,children:[(0,d.jsx)(`line`,{x1:0,y1:5,x2:14,y2:5,stroke:`var(--insight)`,strokeWidth:2}),(0,d.jsx)(`text`,{x:17,y:9,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:`Train`}),(0,d.jsx)(`line`,{x1:0,y1:16,x2:14,y2:16,stroke:`var(--presence)`,strokeWidth:2,strokeDasharray:`4 2`}),(0,d.jsx)(`text`,{x:17,y:20,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:`Val`})]}),t[30]=N):N=t[30];let P;return t[31]!==g||t[32]!==T||t[33]!==E||t[34]!==D||t[35]!==O||t[36]!==_||t[37]!==y||t[38]!==S||t[39]!==C||t[40]!==w?(P=(0,d.jsxs)(`g`,{transform:g,children:[_,y,S,C,w,T,E,D,O,N]}),t[31]=g,t[32]=T,t[33]=E,t[34]=D,t[35]=O,t[36]=_,t[37]=y,t[38]=S,t[39]=C,t[40]=w,t[41]=P):P=t[41],P}function F({title:e=`Training Curves`,icon:t=`sparkle`,iconColor:n=`var(--presence)`,epochs:r,trainLoss:o,valLoss:s,trainAcc:c,valAcc:l,bestEpoch:f,lossLabel:p=`Loss`,accLabel:m=`Accuracy`,footer:h,delay:g}){let _=i[t]??i.sparkle,v=o!==void 0||s!==void 0,y=c!==void 0||l!==void 0,b=+!!v+ +!!y,x=b>1?180:220,S=b*x,C=(0,u.useMemo)(()=>{if(f===void 0)return null;let e=r.indexOf(f);return e>=0?e:null},[f,r]),w=(0,u.useMemo)(()=>v?N(r,o,s,x,C,!0):null,[r,o,s,x,C,v]),T=(0,u.useMemo)(()=>y?N(r,c,l,x,C,!1):null,[r,c,l,x,C,y]);return!r.length||b===0?null:(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(_,{className:`ic`,style:{color:n}}),e]}),(0,d.jsxs)(`svg`,{viewBox:`0 0 ${A} ${S}`,width:`100%`,role:`img`,"aria-label":e,style:{display:`block`,overflow:`visible`},children:[w&&(0,d.jsx)(P,{model:w,epochs:r,label:p,offsetY:0}),T&&(0,d.jsx)(P,{model:T,epochs:r,label:m,offsetY:w?x:0})]}),h&&(0,d.jsx)(`div`,{className:`insight-summary`,dangerouslySetInnerHTML:a(h)})]})}var I=e({aiRegistry:()=>L}),L={reasoning:l(f),toolcalls:l(m),agenttrace:l(h),modelcompare:l(g),tokenstream:l(v),retrieval:l(b),whatchanged:l(x),routing:l(S),embedmap:l(w),calibration:l(T),httpexchange:l(O),trainingcurve:l(F)};export{I as n,L as t};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{ht as r}from"./index-DiPGFGsJ.js";import{n as i}from"./icons-CHVz6kv_.js";import{t as a}from"./richText-BkxJhl9N.js";import{t as o}from"./registry-types-DMuK0vJ6.js";import{t as s}from"./useSpotlightWalk-aimD20cU.js";var c=t(),l=n();function u({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,caption:r,segments:o,footer:s,delay:u}){let d=i[t]||i.layers,f=o.reduce((e,t)=>e+t.value,0)||1,p=o.reduce((e,t)=>e+(t.done?t.value:0),0),m=Math.round(p/f*100),h=o.findIndex(e=>!e.done),g=Math.max(0,o.length-1),[_,v]=(0,c.useState)(h===-1?g:h),y=h===-1?g:h,b=o[_],x=b?Math.round(b.value/f*100):0;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]}),(0,l.jsxs)(`div`,{className:`pb-head`,children:[(0,l.jsx)(`span`,{className:`pb-caption tab-num`,children:r||`${m}% complete`}),(0,l.jsxs)(`span`,{className:`pb-frac faint tab-num`,children:[m,(0,l.jsx)(`span`,{className:`pb-frac-d`,children:`%`})]})]}),(0,l.jsx)(`div`,{className:`pb-track`,onMouseLeave:()=>v(h===-1?g:h),children:o.map((e,t)=>{let n=e.color||`var(--presence)`,r=e.value/f*100,a=_===t;return(0,l.jsxs)(`div`,{className:`pb-seg ${e.done?`done`:`pending`} ${a?`on`:``}`,style:{width:r+`%`,"--seg-c":n},onMouseEnter:()=>v(t),children:[(0,l.jsx)(`span`,{className:`pb-seg-fill`,"data-mark":t===y?`circle`:void 0}),e.done&&(0,l.jsx)(i.check,{className:`ic pb-seg-check`})]},t)})}),(0,l.jsx)(`div`,{className:`pb-legend`,children:o.map((e,t)=>(0,l.jsxs)(`button`,{type:`button`,className:`pb-chip ${_===t?`on`:``}`,onMouseEnter:()=>v(t),onFocus:()=>v(t),children:[(0,l.jsx)(`span`,{className:`pb-dot`,style:{background:e.color||`var(--presence)`}}),e.label]},t))}),b&&(0,l.jsxs)(`div`,{className:`pb-detail`,style:{"--seg-c":b.color||`var(--presence)`},children:[(0,l.jsx)(`span`,{className:`pb-detail-label`,children:b.label}),(0,l.jsxs)(`span`,{className:`pb-detail-pct tab-num`,children:[x,`%`]}),b.detail&&(0,l.jsx)(`span`,{className:`pb-detail-sub faint`,children:b.detail})]}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function d({title:e,icon:t=`chevR`,iconColor:n=`var(--presence)`,orientation:r=`horizontal`,steps:o,color:u=`var(--presence)`,footer:d,delay:f,spotlight:p=!1}){let m=i[t]||i.chevR,[h,g]=(0,c.useState)((()=>{let e=o.findIndex(e=>e.state===`active`);if(e!==-1)return e;let t=o.findIndex(e=>e.state!==`done`);return t===-1?0:t})());s(p,o.length,g);let _=e=>e===h?`active`:e<h?`done`:o[e].state===`locked`?`locked`:`pending`,v=o[h];return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`step-rail ${r}`,style:{"--step-c":u},children:o.map((e,t)=>{let n=_(t),r=n===`locked`,a=e.icon?i[e.icon]:null;return(0,l.jsxs)(`button`,{type:`button`,className:`step-node ${n}`,disabled:r,onClick:()=>!r&&g(t),style:{cursor:r?`not-allowed`:`pointer`},children:[(0,l.jsx)(`span`,{className:`step-dot`,"data-mark":t===h?`circle`:void 0,children:n===`done`?(0,l.jsx)(i.check,{className:`ic`}):r?(0,l.jsx)(i.lock,{className:`ic`}):a?(0,l.jsx)(a,{className:`ic`}):(0,l.jsx)(`span`,{className:`step-idx tab-num`,children:t+1})}),(0,l.jsxs)(`span`,{className:`step-meta`,children:[(0,l.jsx)(`span`,{className:`step-label`,children:e.label}),e.sub&&(0,l.jsx)(`span`,{className:`step-sub faint`,children:e.sub})]})]},t)})}),v?.detail&&(0,l.jsx)(`div`,{className:`step-detail`,dangerouslySetInnerHTML:a(v.detail)},h),d&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}var f={done:{c:`var(--insight)`,label:`Done`},progress:{c:`var(--presence)`,label:`In progress`},pending:{c:`var(--text-muted)`,label:`Pending`},failed:{c:`var(--danger)`,label:`Failed`}},p=[`done`,`progress`,`pending`,`failed`];function m({title:e,icon:t=`clock`,iconColor:n=`var(--presence)`,events:r,footer:o,delay:s}){let u=i[t]||i.clock,[d,m]=(0,c.useState)(`all`),h=p.reduce((e,t)=>(e[t]=r.filter(e=>e.status===t).length,e),{}),g=p.filter(e=>h[e]>0),_=r.filter(e=>d===`all`||e.status===d),v=(()=>{for(let e of[`progress`,`failed`,`done`,`pending`]){let t=_.findIndex(t=>t.status===e);if(t!==-1)return t}return 0})();return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`stl-chips`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`stl-chip ${d===`all`?`on`:``}`,onClick:()=>m(`all`),children:[`All `,(0,l.jsx)(`span`,{className:`stl-chip-n tab-num`,children:r.length})]}),g.map(e=>(0,l.jsxs)(`button`,{type:`button`,className:`stl-chip ${d===e?`on`:``}`,style:{"--chip-c":f[e].c},onClick:()=>m(t=>t===e?`all`:e),children:[(0,l.jsx)(`span`,{className:`stl-chip-dot`,style:{background:f[e].c}}),f[e].label,` `,(0,l.jsx)(`span`,{className:`stl-chip-n tab-num`,children:h[e]})]},e))]}),(0,l.jsxs)(`div`,{className:`stl-list`,children:[_.map((e,t)=>{let n=f[e.status]??f.pending;return(0,l.jsxs)(`div`,{className:`stl-row`,style:{"--ev-c":n.c},children:[(0,l.jsx)(`span`,{className:`stl-rail`,children:(0,l.jsxs)(`span`,{className:`stl-node ${e.status}`,"data-mark":t===v?`circle`:void 0,children:[e.status===`done`&&(0,l.jsx)(i.check,{className:`ic`}),e.status===`failed`&&(0,l.jsx)(i.x,{className:`ic`}),e.status===`progress`&&(0,l.jsx)(`span`,{className:`stl-pulse`})]})}),(0,l.jsxs)(`span`,{className:`stl-body`,children:[(0,l.jsxs)(`span`,{className:`stl-top`,children:[(0,l.jsx)(`span`,{className:`stl-label`,children:e.label}),(0,l.jsx)(`span`,{className:`stl-time faint tab-num`,children:e.time})]}),e.detail&&(0,l.jsx)(`span`,{className:`stl-detail faint`,children:e.detail})]})]},t)}),_.length===0&&(0,l.jsxs)(`div`,{className:`stl-empty faint`,children:[`No `,d,` events.`]})]}),o&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var h={ok:{c:`var(--insight)`,label:`Operational`},warn:{c:`var(--warning)`,label:`Degraded`},down:{c:`var(--danger)`,label:`Outage`}};function g({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,cols:r=4,cells:o,footer:s,delay:u}){let d=i[t]||i.shield,[f,p]=(0,c.useState)(null),m=o.filter(e=>e.level===`ok`).length,g=m===o.length,_=Math.round(m/(o.length||1)*100),v=o.some(e=>e.level===`down`)?`down`:o.some(e=>e.level===`warn`)?`warn`:`ok`,y=(()=>{for(let e of[`down`,`warn`]){let t=o.findIndex(t=>t.level===e);if(t!==-1)return t}return 0})(),b=f==null?null:o[f];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]}),(0,l.jsxs)(`div`,{className:`hg-banner`,style:{"--hg-c":h[v].c},children:[(0,l.jsx)(`span`,{className:`hg-banner-dot`}),(0,l.jsx)(`span`,{className:`hg-banner-text`,children:g?`All systems operational`:`${m}/${o.length} operational`}),(0,l.jsxs)(`span`,{className:`hg-banner-pct tab-num faint`,children:[_,`%`]})]}),(0,l.jsx)(`div`,{className:`hg-grid`,style:{"--hg-cols":r},onMouseLeave:()=>p(null),children:o.map((e,t)=>(0,l.jsxs)(`button`,{type:`button`,className:`hg-cell ${e.level} ${f===t?`on`:``}`,style:{"--cell-c":h[e.level].c},onMouseEnter:()=>p(t),onFocus:()=>p(t),"data-mark":t===y?`circle`:void 0,children:[(0,l.jsx)(`span`,{className:`hg-cell-glow`}),(0,l.jsx)(`span`,{className:`hg-cell-label`,children:e.label}),e.value&&(0,l.jsx)(`span`,{className:`hg-cell-val tab-num`,children:e.value})]},t))}),(0,l.jsx)(`div`,{className:`hg-detail`,"data-open":b!=null,style:{"--hg-c":b?h[b.level].c:`var(--presence)`},children:b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`span`,{className:`hg-detail-top`,children:[(0,l.jsx)(`span`,{className:`hg-detail-name`,children:b.label}),(0,l.jsx)(`span`,{className:`hg-detail-state`,children:h[b.level].label})]}),(0,l.jsx)(`span`,{className:`hg-detail-sub faint`,children:b.detail||`${b.label} — ${b.value||h[b.level].label}`})]})}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var _=r();function v(e){let t=(0,_.c)(27),{kind:n,c:r}=e,i;t[0]===r?i=t[1]:(i={fill:`none`,stroke:r,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`},t[0]=r,t[1]=i);let a=i;if(n===`search`){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,l.jsx)(`circle`,{cx:`46`,cy:`46`,r:`22`,stroke:`var(--line-strong)`,fill:`var(--surface-glass)`,strokeWidth:`1.6`}),t[2]=e):e=t[2];let n;t[3]===a?n=t[4]:(n=(0,l.jsx)(`path`,{d:`M62 62 78 78`,...a}),t[3]=a,t[4]=n);let i;t[5]===r?i=t[6]:(i=(0,l.jsx)(`path`,{d:`M40 46h12M46 40v12`,stroke:r,strokeWidth:`1.6`,strokeLinecap:`round`}),t[5]=r,t[6]=i);let o;return t[7]!==n||t[8]!==i?(o=(0,l.jsxs)(l.Fragment,{children:[e,n,i]}),t[7]=n,t[8]=i,t[9]=o):o=t[9],o}if(n===`inbox`){let e;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,l.jsx)(`rect`,{x:`22`,y:`26`,width:`56`,height:`44`,rx:`6`,stroke:`var(--line-strong)`,fill:`var(--surface-glass)`,strokeWidth:`1.6`}),t[10]=e):e=t[10];let n;t[11]===a?n=t[12]:(n=(0,l.jsx)(`path`,{d:`M22 52h16l4 8h16l4-8h16`,...a,fill:`color-mix(in oklab, var(--presence) 12%, transparent)`}),t[11]=a,t[12]=n);let i;t[13]===r?i=t[14]:(i=(0,l.jsx)(`path`,{d:`M34 38h32M34 45h22`,stroke:r,strokeWidth:`1.6`,strokeLinecap:`round`}),t[13]=r,t[14]=i);let o;return t[15]!==n||t[16]!==i?(o=(0,l.jsxs)(l.Fragment,{children:[e,n,i]}),t[15]=n,t[16]=i,t[17]=o):o=t[17],o}if(n===`spark`){let e;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,l.jsx)(`circle`,{cx:`50`,cy:`48`,r:`26`,stroke:`var(--line-strong)`,fill:`var(--surface-glass)`,strokeWidth:`1.6`}),t[18]=e):e=t[18];let n;return t[19]===r?n=t[20]:(n=(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(`path`,{d:`M50 34l4 12 12 4-12 4-4 12-4-12-12-4 12-4 4-12Z`,fill:`color-mix(in oklab, var(--presence) 16%, transparent)`,stroke:r,strokeWidth:`1.5`,strokeLinejoin:`round`})]}),t[19]=r,t[20]=n),n}let o;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(`path`,{d:`M50 22 76 36v28L50 78 24 64V36L50 22Z`,stroke:`var(--line-strong)`,fill:`var(--surface-glass)`,strokeWidth:`1.6`,strokeLinejoin:`round`}),t[21]=o):o=t[21];let s;t[22]===a?s=t[23]:(s=(0,l.jsx)(`path`,{d:`M24 36 50 50 76 36M50 50v28`,...a}),t[22]=a,t[23]=s);let c;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(`path`,{d:`M37 29 63 43`,stroke:`var(--line-strong)`,strokeWidth:`1.4`,strokeDasharray:`3 4`}),t[24]=c):c=t[24];let u;return t[25]===s?u=t[26]:(u=(0,l.jsxs)(l.Fragment,{children:[o,s,c]}),t[25]=s,t[26]=u),u}function y({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,art:r=`box`,headline:o,copy:s,action:u,actionIcon:d=`plus`,secondary:f,color:p=`var(--presence)`,footer:m,delay:h}){let g=i[t]||i.layers,_=i[d]||i.plus,[y,b]=(0,c.useState)(!1);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h||0)+`ms`,"--es-c":p},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`es-body`,children:[(0,l.jsx)(`div`,{className:`es-art`,"aria-hidden":!0,children:(0,l.jsx)(`svg`,{viewBox:`0 0 100 100`,className:`es-svg`,"aria-hidden":`true`,children:(0,l.jsx)(v,{kind:r,c:p})})}),(0,l.jsx)(`div`,{className:`es-headline`,children:o}),s&&(0,l.jsx)(`div`,{className:`es-copy`,dangerouslySetInnerHTML:a(s)}),(0,l.jsxs)(`div`,{className:`es-actions`,children:[u&&(0,l.jsxs)(`button`,{type:`button`,className:`es-btn ${y?`done`:``}`,onClick:()=>b(e=>!e),children:[y?(0,l.jsx)(i.check,{className:`ic`}):(0,l.jsx)(_,{className:`ic`}),y?`Added`:u]}),f&&(0,l.jsx)(`button`,{type:`button`,className:`mini-btn`,children:f})]})]}),m&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(m)})]})}function b({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,variant:r=`list`,rows:o=4,loadedLabel:s=`Preview loaded`,footer:u,delay:d}){let f=i[t]||i.layers,[p,m]=(0,c.useState)(!1),h=Math.max(1,Math.min(8,o));return(0,l.jsxs)(`div`,{className:`card reveal sk-card ${p?`loaded`:`loading`}`,style:{"--delay":(d||0)+`ms`},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:`sk-toggle`,onClick:()=>m(e=>!e),children:[p?(0,l.jsx)(i.undo,{className:`ic`}):(0,l.jsx)(i.play,{className:`ic`}),p?`Reload`:`Load`]})]}),(0,l.jsxs)(`div`,{className:`sk-stage`,children:[r===`chart`&&(0,l.jsxs)(`div`,{className:`sk-chart`,children:[(0,l.jsx)(`div`,{className:`sk-bars`,children:Array.from({length:7}).map((e,t)=>(0,l.jsx)(`span`,{className:`sk-bar`,style:{"--h":30+t*37%60+`%`}},t))}),(0,l.jsx)(`div`,{className:`sk-line sk-w40`})]}),r===`profile`&&(0,l.jsxs)(`div`,{className:`sk-profile`,children:[(0,l.jsx)(`span`,{className:`sk-avatar`}),(0,l.jsxs)(`div`,{className:`sk-stack`,children:[(0,l.jsx)(`span`,{className:`sk-line sk-w60`}),(0,l.jsx)(`span`,{className:`sk-line sk-w40`})]})]}),r===`media`&&(0,l.jsxs)(`div`,{className:`sk-media`,children:[(0,l.jsx)(`span`,{className:`sk-thumb`}),(0,l.jsx)(`span`,{className:`sk-thumb`}),(0,l.jsx)(`span`,{className:`sk-thumb`})]}),(r===`list`||r===`profile`||r===`media`)&&Array.from({length:h}).map((e,t)=>(0,l.jsxs)(`div`,{className:`sk-row`,children:[(0,l.jsx)(`span`,{className:`sk-chip`}),(0,l.jsxs)(`div`,{className:`sk-stack`,children:[(0,l.jsx)(`span`,{className:`sk-line sk-w80`}),(0,l.jsx)(`span`,{className:`sk-line sk-w50`})]}),(0,l.jsx)(`span`,{className:`sk-pill`})]},t))]}),p&&(0,l.jsx)(`div`,{className:`sk-loaded-note dim`,children:s}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function x({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,prompt:r,min:o,max:s,step:u=1,value:d,prefix:f=``,suffix:p=``,marks:m,outputLabel:h,outputFactor:g,outputPrefix:_=``,outputSuffix:v=``,color:y=`var(--presence)`,footer:b,delay:x}){let S=i[t]||i.edit,C=s-o||1,w=d??Math.round((o+s)/2),[T,E]=(0,c.useState)(Math.min(s,Math.max(o,w))),[D,O]=(0,c.useState)(!1),k=(0,c.useRef)(null),A=(T-o)/C*100,j=e=>{let t=k.current;if(!t)return T;let n=t.getBoundingClientRect(),r=o+Math.min(1,Math.max(0,(e-n.left)/n.width))*C,i=Math.round(r/u)*u;return Math.min(s,Math.max(o,i))},M=e=>{e.currentTarget.setPointerCapture(e.pointerId),O(!0),E(j(e.clientX))},N=e=>{D&&E(j(e.clientX))},P=e=>{O(!1);try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},F=e=>{(e.key===`ArrowRight`||e.key===`ArrowUp`)&&E(e=>Math.min(s,e+u)),(e.key===`ArrowLeft`||e.key===`ArrowDown`)&&E(e=>Math.max(o,e-u))},I=e=>Number.isInteger(u)?e.toLocaleString():e.toFixed(1),L=g==null?null:T*g;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(x||0)+`ms`,"--sl-c":y},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(S,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`div`,{className:`sl-prompt dim`,children:r}),(0,l.jsx)(`div`,{className:`sl-readout`,children:(0,l.jsxs)(`span`,{className:`sl-value tab-num`,"data-mark":`underline`,style:{color:y},children:[f,I(T),p]})}),(0,l.jsxs)(`div`,{className:`sl-track ${D?`drag`:``}`,ref:k,"data-interactive":!0,onPointerDown:M,onPointerMove:N,onPointerUp:P,role:`slider`,"aria-valuenow":T,"aria-valuemin":o,"aria-valuemax":s,tabIndex:0,onKeyDown:F,children:[(0,l.jsx)(`span`,{className:`sl-fill`,style:{width:A+`%`}}),(0,l.jsx)(`span`,{className:`sl-handle`,style:{left:A+`%`},children:(0,l.jsx)(`span`,{className:`sl-handle-dot`})})]}),m&&m.length>0&&(0,l.jsx)(`div`,{className:`sl-marks`,children:m.map((e,t)=>(0,l.jsxs)(`button`,{type:`button`,className:`sl-mark ${T===e.at?`on`:``}`,style:{left:(e.at-o)/C*100+`%`},onClick:()=>E(Math.min(s,Math.max(o,e.at))),children:[(0,l.jsx)(`span`,{className:`sl-mark-tick`}),(0,l.jsx)(`span`,{className:`sl-mark-label faint`,children:e.label})]},t))}),L!=null&&(0,l.jsxs)(`div`,{className:`sl-output`,children:[(0,l.jsx)(`span`,{className:`sl-output-label faint`,children:h||`Result`}),(0,l.jsxs)(`span`,{className:`sl-output-val tab-num`,style:{color:y},children:[_,Math.round(L).toLocaleString(),v]})]}),b&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(b)})]})}function S({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,options:r,selected:o=0,color:s=`var(--presence)`,footer:u,delay:d}){let f=i[t]||i.layers,[p,m]=(0,c.useState)(Math.min(r.length-1,Math.max(0,o))),h=r[p],g=r.length;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`,"--sg-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`sg-control`,role:`radiogroup`,style:{"--sg-n":g},children:[(0,l.jsx)(`span`,{className:`sg-thumb`,style:{width:`calc((100% - 6px) / ${g})`,left:`calc(3px + (100% - 6px) / ${g} * ${p})`}}),r.map((e,t)=>{let n=e.icon?i[e.icon]:null;return(0,l.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":p===t,className:`sg-opt ${p===t?`on`:``}`,onClick:()=>m(t),children:[n&&(0,l.jsx)(n,{className:`ic sg-opt-ic`}),e.label]},t)})]}),(0,l.jsxs)(`div`,{className:`sg-preview`,children:[h?.value&&(0,l.jsx)(`div`,{className:`sg-value tab-num`,"data-mark":`underline`,style:{color:s},children:h.value}),h?.caption&&(0,l.jsx)(`div`,{className:`sg-caption dim`,dangerouslySetInnerHTML:a(h.caption)})]},p),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function C({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,min:r,max:o,step:s=1,low:u,high:d,prefix:f=``,suffix:p=``,unitLabel:m=`results`,items:h,color:g=`var(--presence)`,footer:_,delay:v}){let y=i[t]||i.table,b=o-r||1,[x,S]=(0,c.useState)(u??r+Math.round(b*.15)),[C,w]=(0,c.useState)(d??o-Math.round(b*.1)),[T,E]=(0,c.useState)(null),D=(0,c.useRef)(null),O=(x-r)/b*100,k=(C-r)/b*100,A=e=>{let t=D.current;if(!t)return x;let n=t.getBoundingClientRect(),i=Math.min(1,Math.max(0,(e-n.left)/n.width));return Math.round((r+i*b)/s)*s},j=e=>t=>{t.stopPropagation(),t.currentTarget.setPointerCapture(t.pointerId),E(e)},M=e=>{if(!T)return;let t=A(e.clientX);T===`lo`?S(Math.min(t,C-s,o)):w(Math.max(t,x+s,r))},N=e=>{E(null);try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},P=e=>f+e.toLocaleString()+p,F=h.filter(e=>e.value>=x&&e.value<=C),I=F.slice(0,6);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(v||0)+`ms`,"--rf-c":g},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(y,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`rf-head`,children:[(0,l.jsx)(`span`,{className:`rf-bound tab-num`,children:P(x)}),(0,l.jsxs)(`span`,{className:`rf-count`,children:[(0,l.jsx)(`strong`,{className:`tab-num`,"data-mark":`underline`,style:{color:g},children:F.length}),` `,m]}),(0,l.jsx)(`span`,{className:`rf-bound tab-num`,children:P(C)})]}),(0,l.jsxs)(`div`,{className:`rf-track`,ref:D,children:[(0,l.jsx)(`span`,{className:`rf-sel`,style:{left:O+`%`,width:k-O+`%`}}),(0,l.jsx)(`button`,{type:`button`,className:`rf-handle ${T===`lo`?`drag`:``}`,style:{left:O+`%`},onPointerDown:j(`lo`),onPointerMove:M,onPointerUp:N,"aria-label":`Minimum`}),(0,l.jsx)(`button`,{type:`button`,className:`rf-handle ${T===`hi`?`drag`:``}`,style:{left:k+`%`},onPointerDown:j(`hi`),onPointerMove:M,onPointerUp:N,"aria-label":`Maximum`})]}),(0,l.jsxs)(`div`,{className:`rf-list`,children:[I.map((e,t)=>(0,l.jsxs)(`div`,{className:`rf-item`,children:[(0,l.jsx)(`span`,{className:`rf-item-bar`,children:(0,l.jsx)(`span`,{className:`rf-item-fill`,style:{width:(e.value-r)/b*100+`%`}})}),(0,l.jsx)(`span`,{className:`rf-item-label`,children:e.label}),e.meta&&(0,l.jsx)(`span`,{className:`rf-item-meta faint`,children:e.meta}),(0,l.jsx)(`span`,{className:`rf-item-val tab-num`,children:e.display||P(e.value)})]},t)),F.length>I.length&&(0,l.jsxs)(`div`,{className:`rf-more faint`,children:[`+`,F.length-I.length,` more in range`]}),F.length===0&&(0,l.jsx)(`div`,{className:`rf-more faint`,children:`No items in this range — widen it.`})]}),_&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(_)})]})}var w=[``,`Poor`,`Fair`,`Good`,`Great`,`Excellent`];function T(e){let t=(0,_.c)(4),{shape:n,fill:r}=e;if(n===`heart`){let e=r?`currentColor`:`none`,n;return t[0]===e?n=t[1]:(n=(0,l.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`ri-glyph`,"aria-hidden":`true`,children:(0,l.jsx)(`path`,{d:`M12 20.5 4.2 12.8a4.6 4.6 0 0 1 6.5-6.5l1.3 1.3 1.3-1.3a4.6 4.6 0 0 1 6.5 6.5L12 20.5Z`,fill:e,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinejoin:`round`})}),t[0]=e,t[1]=n),n}let i=r?`currentColor`:`none`,a;return t[2]===i?a=t[3]:(a=(0,l.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`ri-glyph`,children:(0,l.jsx)(`path`,{d:`m12 3 2.6 5.6 6 .7-4.4 4.1 1.2 6L12 16.9 6.6 19.5l1.2-6L3.4 9.3l6-.7L12 3Z`,fill:i,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`})}),t[2]=i,t[3]=a),a}function E({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,shape:r=`star`,max:o=5,value:s,caption:u,facets:d,color:f=`var(--warning)`,footer:p,delay:m}){let h=i[t]||i.spark,g=Math.max(1,Math.min(10,o)),_=s??Math.max(1,Math.round(o*.8)),[v,y]=(0,c.useState)(Math.min(o,Math.max(0,_))),[b,x]=(0,c.useState)(null),S=b??v;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(m||0)+`ms`,"--ri-c":f},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(h,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ri-main`,children:[(0,l.jsx)(`div`,{className:`ri-glyphs`,onMouseLeave:()=>x(null),style:{color:f},children:Array.from({length:g}).map((e,t)=>{let n=t+1,i=n<=S;return(0,l.jsx)(`button`,{type:`button`,className:`ri-btn ${i?`on`:``} ${b!=null&&n<=b?`preview`:``}`,onMouseEnter:()=>x(n),onFocus:()=>x(n),onClick:()=>y(n),"aria-label":`${n} of ${o}`,children:(0,l.jsx)(T,{shape:r,fill:i})},t)})}),(0,l.jsxs)(`div`,{className:`ri-meta`,children:[(0,l.jsx)(`span`,{className:`ri-val tab-num`,"data-mark":`underline`,style:{color:f},children:S.toFixed(1)}),(0,l.jsx)(`span`,{className:`ri-word dim`,children:b!=null&&b<=5?w[b]||`${b}`:u||w[Math.min(5,Math.round(v))]||``})]})]}),d&&d.length>0&&(0,l.jsx)(`div`,{className:`ri-facets`,children:d.map((e,t)=>(0,l.jsxs)(`div`,{className:`ri-facet`,children:[(0,l.jsx)(`span`,{className:`ri-facet-label`,children:e.label}),(0,l.jsx)(`span`,{className:`ri-facet-track`,children:(0,l.jsx)(`span`,{className:`ri-facet-fill`,style:{width:e.value/(o||1)*100+`%`}})}),(0,l.jsx)(`span`,{className:`ri-facet-val tab-num faint`,children:e.value.toFixed(1)})]},t))}),p&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(p)})]})}var D={pass:{c:`var(--insight)`,label:`Pass`,icon:`check`},warn:{c:`var(--warning)`,label:`Warn`,icon:`alert`},fail:{c:`var(--danger)`,label:`Fail`,icon:`x`}},O=[`fail`,`warn`,`pass`];function k({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,checks:r,score:o,footer:s,delay:c}){let u=i[t]||i.shield,d=r??[],f=O.reduce((e,t)=>(e[t]=d.filter(e=>e.status===t).length,e),{fail:0,warn:0,pass:0}),p=f.fail>0?`fail`:f.warn>0?`warn`:`pass`,m=d.length>0&&f.pass===d.length?`All checks pass`:`${f.pass}/${d.length} checks pass`,h=(()=>{for(let e of[`fail`,`warn`]){let t=d.findIndex(t=>t.status===e);if(t!==-1)return t}return 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]}),(0,l.jsxs)(`div`,{className:`a11-banner`,style:{"--a11-c":D[p].c},children:[(0,l.jsx)(`span`,{className:`a11-banner-dot`}),(0,l.jsx)(`span`,{className:`a11-banner-text`,children:m}),o&&(0,l.jsx)(`span`,{className:`a11-score tab-num`,children:o})]}),d.length>0&&(0,l.jsx)(`div`,{className:`a11-tally`,children:O.filter(e=>f[e]>0).map(e=>(0,l.jsxs)(`span`,{className:`a11-tally-pill`,style:{"--a11-c":D[e].c},children:[(0,l.jsx)(`span`,{className:`a11-tally-dot`}),(0,l.jsx)(`span`,{className:`a11-tally-n tab-num`,children:f[e]}),(0,l.jsx)(`span`,{className:`a11-tally-label`,children:D[e].label})]},e))}),(0,l.jsxs)(`ul`,{className:`a11-list`,children:[d.map((e,t)=>{let n=D[e.status]??D.warn,r=i[n.icon]||i.alert;return(0,l.jsxs)(`li`,{className:`a11-row`,style:{"--a11-c":n.c},children:[(0,l.jsx)(`span`,{className:`a11-badge ${e.status}`,"data-mark":t===h?`circle`:void 0,children:(0,l.jsx)(r,{className:`ic a11-badge-ic`,style:{width:13,height:13}})}),(0,l.jsxs)(`span`,{className:`a11-body`,children:[(0,l.jsxs)(`span`,{className:`a11-top`,children:[(0,l.jsx)(`span`,{className:`a11-label`,children:e.label}),(0,l.jsx)(`span`,{className:`a11-state`,children:n.label})]}),e.note&&(0,l.jsx)(`span`,{className:`a11-note faint`,children:e.note})]})]},t)}),d.length===0&&(0,l.jsx)(`li`,{className:`a11-empty faint`,children:`No checks to report.`})]}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var A=[{score:0,mouth:`M8.5 14.5q3.5 3 7 0`,brow:0,tint:`var(--insight)`},{score:2,mouth:`M8.5 14.8q3.5 1.8 7 0`,brow:0,tint:`var(--insight)`},{score:4,mouth:`M8.5 15q3.5 0 7 0`,brow:.4,tint:`var(--presence)`},{score:6,mouth:`M8.5 15.6q3.5 -1.4 7 0`,brow:1,tint:`var(--warning)`},{score:8,mouth:`M8.5 16.2q3.5 -2.6 7 0`,brow:1.6,tint:`var(--warning)`},{score:10,mouth:`M8.5 16.8q3.5 -3.4 7 0`,brow:2.2,tint:`var(--danger)`}],j=[`No pain`,`Mild`,`Moderate`,`Moderate`,`Severe`,`Worst pain`];function M(e){return e<=0||e<=3?`var(--insight)`:e<=5?`var(--presence)`:e<=7?`var(--warning)`:`var(--danger)`}function N(e){let t=(0,_.c)(11),{mouth:n,brow:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,l.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10.2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`}),t[0]=i):i=t[0];let a=9.4+r,o;t[1]===a?o=t[2]:(o=(0,l.jsx)(`circle`,{cx:`8.6`,cy:a,r:`1.15`,fill:`currentColor`}),t[1]=a,t[2]=o);let s=9.4+r,c;t[3]===s?c=t[4]:(c=(0,l.jsx)(`circle`,{cx:`15.4`,cy:s,r:`1.15`,fill:`currentColor`}),t[3]=s,t[4]=c);let u;t[5]===n?u=t[6]:(u=(0,l.jsx)(`path`,{d:n,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`}),t[5]=n,t[6]=u);let d;return t[7]!==o||t[8]!==c||t[9]!==u?(d=(0,l.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`ps-face-svg`,"aria-hidden":`true`,children:[i,o,c,u]}),t[7]=o,t[8]=c,t[9]=u,t[10]=d):d=t[10],d}function P({title:e,icon:t=`sparkle`,iconColor:n=`var(--presence)`,value:r,kind:o=`faces`,anchors:s,caption:c,footer:u,delay:d}){let f=i[t]||i.sparkle,p=Math.min(10,Math.max(0,r)),m=M(p),h=Math.min(A.length-1,Math.max(0,Math.round(p/2))),g=c||(s&&s.length?s[Math.min(s.length-1,Math.round(p/10*(s.length-1)))]:j[h]),_=s?.[0]??`No pain`,v=s?.[s.length-1]??`Worst pain`;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`,"--ps-c":m},children:[e&&(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ps-readout`,children:[(0,l.jsxs)(`span`,{className:`ps-num tab-num`,"data-mark":`underline`,children:[p,(0,l.jsx)(`span`,{className:`ps-num-d`,children:`/10`})]}),(0,l.jsx)(`span`,{className:`ps-word`,children:g})]}),o===`vas`?(0,l.jsxs)(`div`,{className:`ps-vas`,children:[(0,l.jsxs)(`div`,{className:`ps-vas-track`,children:[(0,l.jsx)(`span`,{className:`ps-vas-fill`,style:{width:p/10*100+`%`}}),(0,l.jsx)(`span`,{className:`ps-vas-marker`,style:{left:p/10*100+`%`},children:(0,l.jsx)(`span`,{className:`ps-vas-flag tab-num`,children:p})})]}),(0,l.jsxs)(`div`,{className:`ps-vas-anchors`,children:[(0,l.jsx)(`span`,{className:`ps-anchor-lo`,children:_}),(0,l.jsx)(`span`,{className:`ps-anchor-hi`,children:v})]}),(0,l.jsx)(`div`,{className:`ps-vas-ticks`,"aria-hidden":`true`,children:Array.from({length:11}).map((e,t)=>(0,l.jsx)(`span`,{className:`ps-tick ${t===Math.round(p)?`on`:``}`,children:t},t))})]}):(0,l.jsx)(`div`,{className:`ps-faces`,children:A.map((e,t)=>{let n=t===h;return(0,l.jsxs)(`div`,{className:`ps-face ${n?`on`:``}`,style:{"--face-c":e.tint},"data-mark":n?`circle`:void 0,children:[(0,l.jsx)(N,{mouth:e.mouth,brow:e.brow}),(0,l.jsx)(`span`,{className:`ps-face-n tab-num`,children:e.score})]},e.score)})}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var F=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],I=13,L=2*Math.PI*I;function ee(e){let t=(0,_.c)(3),{pct:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,l.jsx)(`circle`,{className:`ht-ring-track`,cx:`16`,cy:`16`,r:I,fill:`none`,strokeWidth:`4`}),t[0]=r):r=t[0];let i=L*(1-n),a;return t[1]===i?a=t[2]:(a=(0,l.jsxs)(`svg`,{viewBox:`0 0 32 32`,className:`ht-ring`,"aria-hidden":`true`,children:[r,(0,l.jsx)(`circle`,{className:`ht-ring-fill`,cx:`16`,cy:`16`,r:I,fill:`none`,strokeWidth:`4`,strokeLinecap:`round`,strokeDasharray:L,strokeDashoffset:i,transform:`rotate(-90 16 16)`})]}),t[1]=i,t[2]=a),a}function te({title:e,icon:t=`check`,iconColor:n=`var(--presence)`,days:r=F,habits:o,caption:s,footer:c,delay:u}){let d=i[t]||i.check,f=Math.max(1,Math.min(10,r.length)),p=r.slice(0,f),m=o.map(e=>{let t=Array.from({length:f},(t,n)=>e.done[n]===!0),n=t.filter(Boolean).length;return{name:e.name,cells:t,kept:n,pct:f?n/f:0}}),h=m.length*f,g=m.reduce((e,t)=>e+t.kept,0),_=h?Math.round(g/h*100):0,v=m.length?m.reduce((e,t,n)=>t.pct<m[e].pct?n:e,0):-1;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[e&&(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ht-summary`,children:[(0,l.jsxs)(`span`,{className:`ht-summary-pct tab-num`,"data-mark":`underline`,children:[_,`%`]}),(0,l.jsx)(`span`,{className:`ht-summary-text`,children:s||`${g} of ${h} checks this week`})]}),(0,l.jsx)(`div`,{className:`ht-scroll`,children:(0,l.jsxs)(`div`,{className:`ht-grid`,style:{"--ht-cols":f},children:[(0,l.jsx)(`span`,{className:`ht-corner`,"aria-hidden":`true`}),p.map((e,t)=>(0,l.jsx)(`span`,{className:`ht-day`,children:e},t)),m.map((e,t)=>(0,l.jsxs)(`div`,{className:`ht-row`,style:{display:`contents`},children:[(0,l.jsxs)(`span`,{className:`ht-habit`,"data-mark":t===v?`circle`:void 0,children:[(0,l.jsxs)(`span`,{className:`ht-habit-ring`,children:[(0,l.jsx)(ee,{pct:e.pct}),(0,l.jsx)(`span`,{className:`ht-habit-pct tab-num`,children:Math.round(e.pct*100)})]}),(0,l.jsx)(`span`,{className:`ht-habit-name`,children:e.name})]}),e.cells.map((t,n)=>(0,l.jsx)(`span`,{className:`ht-cell ${t?`done`:``}`,title:`${e.name} · ${p[n]}`,children:t?(0,l.jsx)(i.check,{className:`ht-check`}):(0,l.jsx)(`span`,{className:`ht-empty`})},n))]},t))]})}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}function R(e){let t=0;for(let n=e.length-1;n>=0&&e[n];n--)t++;return t}function ne(e){let t=0,n=0;for(let r of e)n=r?n+1:0,n>t&&(t=n);return t}function re({title:e,icon:t=`spark`,iconColor:n=`var(--warning)`,habit:r,days:o,current:s,best:c,caption:u,footer:d,delay:f}){let p=i[t]||i.spark,m=o.map(e=>e.done===!0),h=s==null?R(m):Math.max(0,s),g=c==null?Math.max(h,ne(m)):Math.max(h,c),_=m.filter(Boolean).length,v=R(m),y=m.length-v,b=o.slice(Math.max(0,o.length-35)),x=o.length-b.length;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[e&&(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`sg-counters`,children:[(0,l.jsxs)(`div`,{className:`sg-counter sg-counter-cur`,children:[(0,l.jsx)(`span`,{className:`sg-counter-n tab-num`,"data-mark":`underline`,children:h}),(0,l.jsx)(`span`,{className:`sg-counter-flame`,"aria-hidden":`true`,children:(0,l.jsx)(i.spark,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`sg-counter-label`,children:[`day streak`,r?` · ${r}`:``]})]}),(0,l.jsxs)(`div`,{className:`sg-counter sg-counter-best`,children:[(0,l.jsx)(`span`,{className:`sg-counter-n tab-num`,children:g}),(0,l.jsx)(`span`,{className:`sg-counter-label`,children:`best ever`})]})]}),(0,l.jsx)(`div`,{className:`sg-grid`,"aria-hidden":`true`,children:b.map((e,t)=>{let n=t+x,r=e.done&&n>=y;return(0,l.jsx)(`span`,{className:`sg-dot ${e.done?`done`:`miss`} ${r?`chain`:``}`,title:e.date?`${e.date}${e.done?` · kept`:` · missed`}`:void 0},t)})}),(0,l.jsxs)(`div`,{className:`sg-foot`,children:[(0,l.jsx)(`span`,{className:`sg-chain-note`,children:h>0?u||`Don’t break the chain — ${h} and counting`:u||`A fresh chain starts with one day`}),(0,l.jsxs)(`span`,{className:`sg-kept tab-num faint`,children:[_,`/`,o.length,` days`]})]}),d&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}var z={routine:{c:`var(--text-muted)`,label:`Routine`},soon:{c:`var(--warning)`,label:`Soon`},critical:{c:`var(--danger)`,label:`Critical`}},B=[`critical`,`soon`,`routine`],ie={filing:`Filing`,motion:`Motion`,hearing:`Hearing`,order:`Order`,deadline:`Deadline`};function ae(e){return ie[e]||(e?e.charAt(0).toUpperCase()+e.slice(1):`Event`)}function V(e){return e.urgency&&z[e.urgency]?e.urgency:`routine`}function oe(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?Math.ceil((t-Date.now())/864e5):null}function se({title:e,icon:t=`proof`,iconColor:n=`var(--presence)`,events:r,footer:o,delay:s}){let u=i[t]||i.proof,d=Array.isArray(r)?r:[],[f,p]=(0,c.useState)(`all`),m=B.reduce((e,t)=>(e[t]=d.filter(e=>V(e)===t).length,e),{critical:0,soon:0,routine:0}),h=B.filter(e=>m[e]>0),g=d.filter(e=>f===`all`||V(e)===f),_=(()=>{for(let e of B){let t=g.findIndex(t=>V(t)===e);if(t!==-1)return t}return 0})();return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),h.length>0&&(0,l.jsxs)(`div`,{className:`lt-chips`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`lt-chip ${f===`all`?`on`:``}`,onClick:()=>p(`all`),children:[`All `,(0,l.jsx)(`span`,{className:`lt-chip-n tab-num`,children:d.length})]}),h.map(e=>(0,l.jsxs)(`button`,{type:`button`,className:`lt-chip ${f===e?`on`:``}`,style:{"--chip-c":z[e].c},onClick:()=>p(t=>t===e?`all`:e),children:[(0,l.jsx)(`span`,{className:`lt-chip-dot`,style:{background:z[e].c}}),z[e].label,` `,(0,l.jsx)(`span`,{className:`lt-chip-n tab-num`,children:m[e]})]},e))]}),(0,l.jsxs)(`div`,{className:`lt-list`,children:[g.map((e,t)=>{let n=V(e),r=z[n],i=n===`critical`?oe(e.date):null,a=[e.court,e.party].filter(Boolean).join(` · `);return(0,l.jsxs)(`div`,{className:`lt-row m-stagger-item m-fade-rise`,style:{"--i":t,"--ev-c":r.c},children:[(0,l.jsx)(`span`,{className:`lt-rail`,children:(0,l.jsx)(`span`,{className:`lt-node`,"data-mark":t===_?`circle`:void 0,"aria-hidden":`true`})}),(0,l.jsxs)(`span`,{className:`lt-body`,children:[(0,l.jsxs)(`span`,{className:`lt-top`,children:[(0,l.jsx)(`span`,{className:`lt-kind`,children:ae(e.kind)}),e.date&&(0,l.jsx)(`span`,{className:`lt-date faint tab-num`,children:e.date})]}),a&&(0,l.jsx)(`span`,{className:`lt-meta faint`,children:a}),e.detail&&(0,l.jsx)(`span`,{className:`lt-detail faint`,children:e.detail}),i!=null&&(0,l.jsx)(`span`,{className:`lt-countdown ${i<0?`overdue`:``}`,children:i<0?`${Math.abs(i)}d overdue`:i===0?`due today`:`${i}d left`})]})]},t)}),g.length===0&&(0,l.jsxs)(`div`,{className:`lt-empty faint`,children:[`No `,f===`all`?``:z[f].label.toLowerCase()+` `,`events.`]})]}),o&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var H={done:{c:`var(--insight)`,label:`Passed`},current:{c:`var(--presence)`,label:`In progress`},pending:{c:`var(--text-muted)`,label:`Pending`},failed:{c:`var(--danger)`,label:`Failed`}};function U(e){return e===`done`||e===`current`||e===`pending`||e===`failed`?e:`pending`}function ce(e){return!e||typeof e.yea!=`number`||typeof e.nay!=`number`||!Number.isFinite(e.yea)||!Number.isFinite(e.nay)?null:{yea:e.yea,nay:e.nay}}function le({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,bill:r,stages:o,footer:s,delay:c}){let u=i[t]||i.chart,d=Array.isArray(o)?o:[],f=d.findIndex(e=>U(e.status)===`failed`),p=d.findIndex(e=>U(e.status)===`current`),m=d.length>0&&d.every(e=>U(e.status)===`done`),h=(()=>{if(f!==-1)return{text:`Failed at ${d[f]?.name||`this stage`}`,c:H.failed.c};if(p!==-1)return{text:`Currently at ${d[p]?.name||`this stage`}`,c:H.current.c};if(m){let e=d[d.length-1]?.name;return{text:e?`Signed — ${e}`:`Signed into law`,c:H.done.c}}return d.length===0?{text:`No stages recorded`,c:`var(--text-muted)`}:{text:`Not yet introduced`,c:`var(--text-muted)`}})(),g=f===-1?p===-1?(()=>{for(let e=d.length-1;e>=0;e--)if(U(d[e].status)===`done`)return e;return 0})():p:f;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:`bt-bill faint`,children:r}),(0,l.jsxs)(`div`,{className:`bt-banner`,style:{"--bt-c":h.c},children:[(0,l.jsx)(`span`,{className:`bt-banner-dot`}),(0,l.jsx)(`span`,{className:`bt-banner-text`,children:h.text})]}),(0,l.jsxs)(`div`,{className:`bt-rail`,children:[d.map((e,t)=>{let n=U(e.status),r=H[n],a=f!==-1&&t>f,o=ce(e.voteTally),s=o?o.yea+o.nay:0,c=s>0&&o?o.yea/s*100:0;return(0,l.jsxs)(`div`,{className:`bt-unit m-stagger-item m-fade-rise`,style:{"--i":t},children:[t>0&&(0,l.jsx)(`span`,{className:`bt-connector ${f===t-1?`dead`:``}`,children:f===t-1&&(0,l.jsx)(i.x,{className:`bt-dead-ic`,"aria-hidden":`true`})}),(0,l.jsxs)(`div`,{className:`bt-stage ${n} ${a?`moot`:``}`,style:{"--st-c":r.c},"data-mark":t===g?`circle`:void 0,children:[(0,l.jsxs)(`span`,{className:`bt-node`,children:[n===`done`&&(0,l.jsx)(i.check,{className:`ic`}),n===`failed`&&(0,l.jsx)(i.x,{className:`ic`}),n===`current`&&(0,l.jsx)(`span`,{className:`bt-pulse`})]}),(0,l.jsx)(`span`,{className:`bt-name`,children:e.name}),o&&(0,l.jsxs)(`span`,{className:`bt-vote`,children:[(0,l.jsxs)(`span`,{className:`bt-vote-n tab-num`,children:[o.yea,`–`,o.nay]}),(0,l.jsx)(`span`,{className:`bt-vote-bar`,children:(0,l.jsx)(`span`,{className:`bt-vote-fill`,style:{width:c+`%`}})})]})]})]},t)}),d.length===0&&(0,l.jsx)(`div`,{className:`bt-empty faint`,children:`No stages to show.`})]}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var W={1:{c:`var(--danger)`,label:`Resuscitation`},2:{c:`var(--warning)`,label:`Emergent`},3:{c:`var(--presence)`,label:`Urgent`},4:{c:`var(--insight-soft)`,label:`Less urgent`},5:{c:`var(--text-muted)`,label:`Non-urgent`}};function ue(e){let t=typeof e==`number`?e:typeof e==`string`?parseFloat(e):NaN;return Number.isFinite(t)?Math.min(5,Math.max(1,Math.round(t))):3}function de(e){return typeof e==`string`?e:typeof e==`number`&&Number.isFinite(e)?String(e):``}function fe({title:e,icon:t=`alert`,iconColor:n=`var(--presence)`,patients:r,footer:o,delay:s}){let c=i[t]||i.alert,u=(Array.isArray(r)?r:[]).map((e,t)=>({p:e,i:t,lvl:ue(e.esiLevel)})).sort((e,t)=>e.lvl-t.lvl||e.i-t.i),d=u.length?u[0].lvl:null,f=u.filter(e=>e.lvl<=2).length,p=u.length===0?`No patients waiting`:`${u.length} patient${u.length===1?``:`s`} waiting`+(f>0?` · ${f} at ESI 1–2`:``);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`tb-banner`,style:{"--tb-c":d?W[d].c:`var(--text-muted)`},children:[(0,l.jsx)(`span`,{className:`tb-banner-dot`}),(0,l.jsx)(`span`,{className:`tb-banner-text`,children:p})]}),(0,l.jsxs)(`div`,{className:`tb-list`,children:[u.map(({p:e,i:t,lvl:n},r)=>{let i=W[n],a=Array.isArray(e.vitals)?e.vitals:[];return(0,l.jsxs)(`div`,{className:`tb-row m-stagger-item m-fade-rise`,style:{"--i":r,"--esi-c":i.c},children:[(0,l.jsx)(`span`,{className:`tb-badge`,"data-mark":r===0?`circle`:void 0,children:(0,l.jsx)(`span`,{className:`tb-badge-n tab-num`,children:n})}),(0,l.jsxs)(`span`,{className:`tb-body`,children:[(0,l.jsxs)(`span`,{className:`tb-top`,children:[(0,l.jsx)(`span`,{className:`tb-complaint`,children:e.chiefComplaint}),e.waitTime&&(0,l.jsx)(`span`,{className:`tb-wait faint tab-num`,children:e.waitTime})]}),(0,l.jsx)(`span`,{className:`tb-esi-label`,children:i.label}),a.length>0&&(0,l.jsx)(`span`,{className:`tb-vitals`,children:a.map((e,t)=>{let n=de(e.value);return(0,l.jsxs)(`span`,{className:`tb-vital ${e.abnormal?`abn`:``}`,children:[e.label,n&&`: ${n}`]},t)})})]})]},t)}),u.length===0&&(0,l.jsx)(`div`,{className:`tb-empty faint`,children:`Board is empty.`})]}),o&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var G={ok:`var(--insight)`,mild:`var(--insight-soft)`,moderate:`var(--warning)`,severe:`var(--danger)`};function pe(e){return typeof e==`string`&&e in G?G[e]:G.moderate}function K(e){let t=typeof e==`number`?e:typeof e==`string`?parseFloat(e):NaN;return Number.isFinite(t)?Math.min(3,Math.max(0,Math.round(t))):0}function me(e){if(!e||!Array.isArray(e.range)||e.range.length!==2)return null;let[t,n]=e.range;return!Number.isFinite(t)||!Number.isFinite(n)||n<t?null:{label:e.label||``,lo:t,hi:n,c:pe(e.tone)}}function he({title:e,icon:t=`chat`,iconColor:n=`var(--presence)`,instrument:r,items:o,total:s,maxTotal:c,bands:u,footer:d,delay:f}){let p=i[t]||i.chat,m=Array.isArray(o)?o:[],h=Array.isArray(u)?u:[],g=m.reduce((e,t)=>e+K(t.score),0),_=Number.isFinite(s)?s:g,v=Number.isFinite(c)&&c>0?c:Math.max(m.length*3,1),y=h.map(me).filter(e=>e!==null).sort((e,t)=>e.lo-t.lo),b=y.find(e=>_>=e.lo&&_<=e.hi)??null,x=Math.min(100,Math.max(0,_/v*100));return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e,r&&(0,l.jsx)(`span`,{className:`mhs-instrument`,children:r})]}),(0,l.jsxs)(`div`,{className:`mhs-rows`,children:[m.map((e,t)=>{let n=K(e.score);return(0,l.jsxs)(`div`,{className:`mhs-row m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,l.jsx)(`span`,{className:`mhs-prompt`,children:e.prompt}),(0,l.jsx)(`span`,{className:`mhs-dots`,"aria-hidden":`true`,children:[0,1,2,3].map(e=>(0,l.jsx)(`span`,{className:`mhs-dot ${e<=n?`on`:``}`},e))}),(0,l.jsx)(`span`,{className:`mhs-score tab-num`,children:n}),e.anchor&&(0,l.jsx)(`span`,{className:`mhs-anchor faint`,children:e.anchor})]},t)}),m.length===0&&(0,l.jsx)(`div`,{className:`mhs-empty faint`,children:`No items scored.`})]}),(0,l.jsxs)(`div`,{className:`mhs-total`,children:[(0,l.jsx)(`span`,{className:`mhs-total-val tab-num`,"data-mark":`underline`,children:_}),(0,l.jsxs)(`span`,{className:`mhs-total-max faint`,children:[`/ `,v]}),b&&(0,l.jsx)(`span`,{className:`mhs-total-band`,style:{color:b.c},children:b.label})]}),y.length>0&&(0,l.jsxs)(`div`,{className:`mhs-bar`,children:[(0,l.jsxs)(`div`,{className:`mhs-bar-track`,children:[y.map((e,t)=>{let n=Math.min(v,Math.max(0,e.lo)),r=Math.min(v,Math.max(0,e.hi)),i=Math.max(0,r-n);return(0,l.jsx)(`span`,{className:`mhs-bar-seg ${b===e?`on`:``}`,style:{left:n/v*100+`%`,width:i/v*100+`%`,"--seg-c":e.c},title:e.label},t)}),(0,l.jsx)(`span`,{className:`mhs-bar-marker`,style:{left:x+`%`}})]}),(0,l.jsx)(`div`,{className:`mhs-bar-labels`,children:y.map((e,t)=>(0,l.jsx)(`span`,{className:`mhs-bar-label faint`,style:{color:e.c},children:e.label},t))})]}),d&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}var q={critical:{c:`var(--danger)`,label:`Critical`,letter:`C`},major:{c:`var(--warning)`,label:`Major`,letter:`M`},minor:{c:`var(--text-muted)`,label:`Minor`,letter:`m`}},J=[`critical`,`major`,`minor`];function Y(e){return e===`critical`||e===`major`||e===`minor`?e:`major`}function ge({title:e,icon:t=`eye`,iconColor:n=`var(--presence)`,taskSuccessRate:r,avgTimeOnTask:o,issues:s,footer:c,delay:u}){let d=i[t]||i.eye,f=Array.isArray(s)?s:[],p=J.reduce((e,t)=>(e[t]=f.filter(e=>Y(e.severity)===t).length,e),{critical:0,major:0,minor:0}),m=p.critical>0?`critical`:p.major>0?`major`:`minor`,h=f.length===0?`No usability issues found`:`${f.length} issue${f.length===1?``:`s`} found`+(p.critical>0?`, ${p.critical} critical`:``),g=Number.isFinite(r)?Math.round(Math.min(100,Math.max(0,r))):null,_=(()=>{for(let e of[`critical`,`major`]){let t=f.findIndex(t=>Y(t.severity)===e);if(t!==-1)return t}return 0})();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]}),(g!=null||o)&&(0,l.jsxs)(`div`,{className:`uf-stats`,children:[g!=null&&(0,l.jsxs)(`span`,{className:`uf-stat`,children:[(0,l.jsxs)(`span`,{className:`uf-stat-val tab-num`,children:[g,`%`]}),(0,l.jsx)(`span`,{className:`uf-stat-label faint`,children:`task success`})]}),o&&(0,l.jsxs)(`span`,{className:`uf-stat`,children:[(0,l.jsx)(`span`,{className:`uf-stat-val tab-num`,children:o}),(0,l.jsx)(`span`,{className:`uf-stat-label faint`,children:`avg time on task`})]})]}),(0,l.jsxs)(`div`,{className:`uf-banner`,style:{"--uf-c":q[m].c},children:[(0,l.jsx)(`span`,{className:`uf-banner-dot`}),(0,l.jsx)(`span`,{className:`uf-banner-text`,children:h})]}),f.length>0&&(0,l.jsx)(`div`,{className:`uf-tally`,children:J.filter(e=>p[e]>0).map(e=>(0,l.jsxs)(`span`,{className:`uf-tally-pill`,style:{"--uf-c":q[e].c},children:[(0,l.jsx)(`span`,{className:`uf-tally-dot`}),(0,l.jsx)(`span`,{className:`uf-tally-n tab-num`,children:p[e]}),(0,l.jsx)(`span`,{className:`uf-tally-label`,children:q[e].label})]},e))}),(0,l.jsxs)(`ul`,{className:`uf-list`,children:[f.map((e,t)=>{let n=q[Y(e.severity)],r=Number.isFinite(e.affectedUsers)?Math.max(0,e.affectedUsers):null;return(0,l.jsxs)(`li`,{className:`uf-row m-stagger-item m-fade-rise`,style:{"--i":t,"--uf-c":n.c},children:[(0,l.jsx)(`span`,{className:`uf-badge`,"data-mark":t===_?`circle`:void 0,children:n.letter}),(0,l.jsxs)(`span`,{className:`uf-body`,children:[(0,l.jsxs)(`span`,{className:`uf-top`,children:[(0,l.jsx)(`span`,{className:`uf-label`,children:e.label}),(0,l.jsx)(`span`,{className:`uf-state`,children:n.label})]}),(r!=null||e.note)&&(0,l.jsxs)(`span`,{className:`uf-note faint`,children:[r!=null&&(0,l.jsxs)(`span`,{className:`uf-affected tab-num`,children:[r,` user`,r===1?``:`s`]}),r!=null&&e.note?` · `:``,e.note]})]})]},t)}),f.length===0&&(0,l.jsx)(`li`,{className:`uf-empty faint`,children:`No issues to report.`})]}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var X={open:{c:`var(--text-muted)`,label:`Open`},held:{c:`var(--warning)`,label:`Held`},booked:{c:`var(--presence)`,label:`Booked`},"checked-in":{c:`var(--insight)`,label:`Checked in`}},Z=[`checked-in`,`booked`,`held`,`open`];function Q(e){return e===`open`||e===`held`||e===`booked`||e===`checked-in`?e:`open`}function _e({title:e,icon:t=`bell`,iconColor:n=`var(--presence)`,cols:r=4,cells:o,footer:s,delay:u}){let d=i[t]||i.bell,f=Array.isArray(o)?o:[],[p,m]=(0,c.useState)(null),h=Z.reduce((e,t)=>(e[t]=f.filter(e=>Q(e.level)===t).length,e),{"checked-in":0,booked:0,held:0,open:0}),g=f.length-h.open,_=Math.round(g/(f.length||1)*100),v=Z.find(e=>h[e]>0)??`open`,y=(()=>{for(let e of Z){if(e===`open`)break;let t=f.findIndex(t=>Q(t.level)===e);if(t!==-1)return t}return 0})(),b=p==null?null:f[p];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]}),(0,l.jsxs)(`div`,{className:`rbd-banner`,style:{"--rbd-c":X[v].c},children:[(0,l.jsx)(`span`,{className:`rbd-banner-dot`}),(0,l.jsx)(`span`,{className:`rbd-banner-text`,children:f.length===0?`No rooms to show`:`${g}/${f.length} rooms committed`}),f.length>0&&(0,l.jsxs)(`span`,{className:`rbd-banner-pct tab-num faint`,children:[_,`%`]})]}),f.length>0&&(0,l.jsx)(`div`,{className:`rbd-legend`,children:Z.filter(e=>h[e]>0).map(e=>(0,l.jsxs)(`span`,{className:`rbd-legend-pill`,style:{"--rbd-c":X[e].c},children:[(0,l.jsx)(`span`,{className:`rbd-legend-dot`}),(0,l.jsx)(`span`,{className:`rbd-legend-n tab-num`,children:h[e]}),(0,l.jsx)(`span`,{className:`rbd-legend-label`,children:X[e].label})]},e))}),(0,l.jsx)(`div`,{className:`rbd-grid`,style:{"--rbd-cols":Math.max(1,r)},onMouseLeave:()=>m(null),children:f.map((e,t)=>{let n=Q(e.level),r=X[n];return(0,l.jsxs)(`button`,{type:`button`,className:`rbd-cell ${n} ${p===t?`on`:``} m-stagger-item m-scale-in`,style:{"--i":t,"--cell-c":r.c},onMouseEnter:()=>m(t),onFocus:()=>m(t),"data-mark":t===y?`circle`:void 0,children:[(0,l.jsx)(`span`,{className:`rbd-cell-glow`}),(0,l.jsx)(`span`,{className:`rbd-cell-label`,children:e.label}),e.value&&(0,l.jsx)(`span`,{className:`rbd-cell-val`,children:e.value})]},t)})}),(0,l.jsx)(`div`,{className:`rbd-detail`,"data-open":b!=null,style:{"--rbd-c":b?X[Q(b.level)].c:`var(--presence)`},children:b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`span`,{className:`rbd-detail-top`,children:[(0,l.jsx)(`span`,{className:`rbd-detail-name`,children:b.label}),(0,l.jsx)(`span`,{className:`rbd-detail-state`,children:X[Q(b.level)].label})]}),(0,l.jsx)(`span`,{className:`rbd-detail-sub faint`,children:b.detail||`${b.label} — ${b.value||X[Q(b.level)].label}`})]})}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var ve={done:{c:`var(--insight)`,label:`Done`},current:{c:`var(--presence)`,label:`In progress`},pending:{c:`var(--text-muted)`,label:`Pending`},failed:{c:`var(--danger)`,label:`Denied`}},ye=[`current`,`failed`,`done`,`pending`];function $(e){return e===`done`||e===`current`||e===`pending`||e===`failed`?e:`pending`}function be(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?Math.ceil((t-Date.now())/864e5):null}function xe({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,visaCategory:r,stages:o,priorityDate:s,rfeDeadline:c,footer:u,delay:d}){let f=i[t]||i.globe,p=Array.isArray(o)?o:[],m=(()=>{for(let e of ye){let t=p.findIndex(t=>$(t.status)===e);if(t!==-1)return t}return 0})(),h=be(c),g=h==null?`var(--presence)`:h<0?`var(--danger)`:h<=30?`var(--warning)`:`var(--insight)`,_=h==null?null:h<0?`${Math.abs(h)}d overdue`:h===0?`due today`:`${h}d left`;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(r||s)&&(0,l.jsxs)(`div`,{className:`imc-sub`,children:[r&&(0,l.jsx)(`span`,{className:`imc-visa`,children:r}),s&&(0,l.jsxs)(`span`,{className:`imc-priority faint`,children:[`Priority date `,(0,l.jsx)(`span`,{className:`tab-num`,children:s})]})]}),(0,l.jsxs)(`div`,{className:`imc-list`,children:[p.map((e,t)=>{let n=$(e.status),r=ve[n];return(0,l.jsxs)(`div`,{className:`imc-row m-stagger-item m-fade-rise`,style:{"--i":t,"--ev-c":r.c},children:[(0,l.jsx)(`span`,{className:`imc-rail`,children:(0,l.jsxs)(`span`,{className:`imc-node ${n}`,"data-mark":t===m?`circle`:void 0,children:[n===`done`&&(0,l.jsx)(i.check,{className:`ic`}),n===`failed`&&(0,l.jsx)(i.x,{className:`ic`}),n===`current`&&(0,l.jsx)(`span`,{className:`imc-pulse`})]})}),(0,l.jsxs)(`span`,{className:`imc-body`,children:[(0,l.jsxs)(`span`,{className:`imc-top`,children:[(0,l.jsx)(`span`,{className:`imc-label`,children:e.name}),e.date&&(0,l.jsx)(`span`,{className:`imc-date faint tab-num`,children:e.date})]}),(0,l.jsx)(`span`,{className:`imc-state`,children:r.label})]})]},t)}),p.length===0&&(0,l.jsx)(`div`,{className:`imc-empty faint`,children:`No stages recorded.`})]}),c&&(0,l.jsxs)(`div`,{className:`imc-rfe`,style:{"--rfe-c":g},children:[(0,l.jsx)(`span`,{className:`imc-rfe-dot`}),(0,l.jsxs)(`span`,{className:`imc-rfe-text`,children:[`RFE response due `,(0,l.jsx)(`span`,{className:`tab-num`,children:c})]}),_&&(0,l.jsx)(`span`,{className:`imc-rfe-countdown`,children:_})]}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var Se=e({statusRegistry:()=>Ce}),Ce={progressbar:o(u),stepindicator:(e,t)=>(0,l.jsx)(d,{...e,delay:t.delay,spotlight:t.spotlight}),statustimeline:o(m),healthgrid:o(g),emptystate:o(y),skeleton:o(b),sliderinput:o(x),segmented:o(S),rangefilter:o(C),ratinginput:o(E),a11yaudit:o(k),painscale:o(P),habittracker:o(te),streakgrid:o(re),litigationtimeline:o(se),billtracker:o(le),triageboard:o(fe),mentalhealthscreen:o(he),usabilityfindings:o(ge),roomblockdashboard:o(_e),immigrationcase:o(xe)};export{Ce as n,Se as t};
1
+ import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{ht as r}from"./index-DWHIOldG.js";import{n as i}from"./icons-CHVz6kv_.js";import{t as a}from"./richText-BkxJhl9N.js";import{t as o}from"./registry-types-DMuK0vJ6.js";import{t as s}from"./useSpotlightWalk-gVilFhpa.js";var c=t(),l=n();function u({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,caption:r,segments:o,footer:s,delay:u}){let d=i[t]||i.layers,f=o.reduce((e,t)=>e+t.value,0)||1,p=o.reduce((e,t)=>e+(t.done?t.value:0),0),m=Math.round(p/f*100),h=o.findIndex(e=>!e.done),g=Math.max(0,o.length-1),[_,v]=(0,c.useState)(h===-1?g:h),y=h===-1?g:h,b=o[_],x=b?Math.round(b.value/f*100):0;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]}),(0,l.jsxs)(`div`,{className:`pb-head`,children:[(0,l.jsx)(`span`,{className:`pb-caption tab-num`,children:r||`${m}% complete`}),(0,l.jsxs)(`span`,{className:`pb-frac faint tab-num`,children:[m,(0,l.jsx)(`span`,{className:`pb-frac-d`,children:`%`})]})]}),(0,l.jsx)(`div`,{className:`pb-track`,onMouseLeave:()=>v(h===-1?g:h),children:o.map((e,t)=>{let n=e.color||`var(--presence)`,r=e.value/f*100,a=_===t;return(0,l.jsxs)(`div`,{className:`pb-seg ${e.done?`done`:`pending`} ${a?`on`:``}`,style:{width:r+`%`,"--seg-c":n},onMouseEnter:()=>v(t),children:[(0,l.jsx)(`span`,{className:`pb-seg-fill`,"data-mark":t===y?`circle`:void 0}),e.done&&(0,l.jsx)(i.check,{className:`ic pb-seg-check`})]},t)})}),(0,l.jsx)(`div`,{className:`pb-legend`,children:o.map((e,t)=>(0,l.jsxs)(`button`,{type:`button`,className:`pb-chip ${_===t?`on`:``}`,onMouseEnter:()=>v(t),onFocus:()=>v(t),children:[(0,l.jsx)(`span`,{className:`pb-dot`,style:{background:e.color||`var(--presence)`}}),e.label]},t))}),b&&(0,l.jsxs)(`div`,{className:`pb-detail`,style:{"--seg-c":b.color||`var(--presence)`},children:[(0,l.jsx)(`span`,{className:`pb-detail-label`,children:b.label}),(0,l.jsxs)(`span`,{className:`pb-detail-pct tab-num`,children:[x,`%`]}),b.detail&&(0,l.jsx)(`span`,{className:`pb-detail-sub faint`,children:b.detail})]}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function d({title:e,icon:t=`chevR`,iconColor:n=`var(--presence)`,orientation:r=`horizontal`,steps:o,color:u=`var(--presence)`,footer:d,delay:f,spotlight:p=!1}){let m=i[t]||i.chevR,[h,g]=(0,c.useState)((()=>{let e=o.findIndex(e=>e.state===`active`);if(e!==-1)return e;let t=o.findIndex(e=>e.state!==`done`);return t===-1?0:t})());s(p,o.length,g);let _=e=>e===h?`active`:e<h?`done`:o[e].state===`locked`?`locked`:`pending`,v=o[h];return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`div`,{className:`step-rail ${r}`,style:{"--step-c":u},children:o.map((e,t)=>{let n=_(t),r=n===`locked`,a=e.icon?i[e.icon]:null;return(0,l.jsxs)(`button`,{type:`button`,className:`step-node ${n}`,disabled:r,onClick:()=>!r&&g(t),style:{cursor:r?`not-allowed`:`pointer`},children:[(0,l.jsx)(`span`,{className:`step-dot`,"data-mark":t===h?`circle`:void 0,children:n===`done`?(0,l.jsx)(i.check,{className:`ic`}):r?(0,l.jsx)(i.lock,{className:`ic`}):a?(0,l.jsx)(a,{className:`ic`}):(0,l.jsx)(`span`,{className:`step-idx tab-num`,children:t+1})}),(0,l.jsxs)(`span`,{className:`step-meta`,children:[(0,l.jsx)(`span`,{className:`step-label`,children:e.label}),e.sub&&(0,l.jsx)(`span`,{className:`step-sub faint`,children:e.sub})]})]},t)})}),v?.detail&&(0,l.jsx)(`div`,{className:`step-detail`,dangerouslySetInnerHTML:a(v.detail)},h),d&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}var f={done:{c:`var(--insight)`,label:`Done`},progress:{c:`var(--presence)`,label:`In progress`},pending:{c:`var(--text-muted)`,label:`Pending`},failed:{c:`var(--danger)`,label:`Failed`}},p=[`done`,`progress`,`pending`,`failed`];function m({title:e,icon:t=`clock`,iconColor:n=`var(--presence)`,events:r,footer:o,delay:s}){let u=i[t]||i.clock,[d,m]=(0,c.useState)(`all`),h=p.reduce((e,t)=>(e[t]=r.filter(e=>e.status===t).length,e),{}),g=p.filter(e=>h[e]>0),_=r.filter(e=>d===`all`||e.status===d),v=(()=>{for(let e of[`progress`,`failed`,`done`,`pending`]){let t=_.findIndex(t=>t.status===e);if(t!==-1)return t}return 0})();return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`stl-chips`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`stl-chip ${d===`all`?`on`:``}`,onClick:()=>m(`all`),children:[`All `,(0,l.jsx)(`span`,{className:`stl-chip-n tab-num`,children:r.length})]}),g.map(e=>(0,l.jsxs)(`button`,{type:`button`,className:`stl-chip ${d===e?`on`:``}`,style:{"--chip-c":f[e].c},onClick:()=>m(t=>t===e?`all`:e),children:[(0,l.jsx)(`span`,{className:`stl-chip-dot`,style:{background:f[e].c}}),f[e].label,` `,(0,l.jsx)(`span`,{className:`stl-chip-n tab-num`,children:h[e]})]},e))]}),(0,l.jsxs)(`div`,{className:`stl-list`,children:[_.map((e,t)=>{let n=f[e.status]??f.pending;return(0,l.jsxs)(`div`,{className:`stl-row`,style:{"--ev-c":n.c},children:[(0,l.jsx)(`span`,{className:`stl-rail`,children:(0,l.jsxs)(`span`,{className:`stl-node ${e.status}`,"data-mark":t===v?`circle`:void 0,children:[e.status===`done`&&(0,l.jsx)(i.check,{className:`ic`}),e.status===`failed`&&(0,l.jsx)(i.x,{className:`ic`}),e.status===`progress`&&(0,l.jsx)(`span`,{className:`stl-pulse`})]})}),(0,l.jsxs)(`span`,{className:`stl-body`,children:[(0,l.jsxs)(`span`,{className:`stl-top`,children:[(0,l.jsx)(`span`,{className:`stl-label`,children:e.label}),(0,l.jsx)(`span`,{className:`stl-time faint tab-num`,children:e.time})]}),e.detail&&(0,l.jsx)(`span`,{className:`stl-detail faint`,children:e.detail})]})]},t)}),_.length===0&&(0,l.jsxs)(`div`,{className:`stl-empty faint`,children:[`No `,d,` events.`]})]}),o&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var h={ok:{c:`var(--insight)`,label:`Operational`},warn:{c:`var(--warning)`,label:`Degraded`},down:{c:`var(--danger)`,label:`Outage`}};function g({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,cols:r=4,cells:o,footer:s,delay:u}){let d=i[t]||i.shield,[f,p]=(0,c.useState)(null),m=o.filter(e=>e.level===`ok`).length,g=m===o.length,_=Math.round(m/(o.length||1)*100),v=o.some(e=>e.level===`down`)?`down`:o.some(e=>e.level===`warn`)?`warn`:`ok`,y=(()=>{for(let e of[`down`,`warn`]){let t=o.findIndex(t=>t.level===e);if(t!==-1)return t}return 0})(),b=f==null?null:o[f];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]}),(0,l.jsxs)(`div`,{className:`hg-banner`,style:{"--hg-c":h[v].c},children:[(0,l.jsx)(`span`,{className:`hg-banner-dot`}),(0,l.jsx)(`span`,{className:`hg-banner-text`,children:g?`All systems operational`:`${m}/${o.length} operational`}),(0,l.jsxs)(`span`,{className:`hg-banner-pct tab-num faint`,children:[_,`%`]})]}),(0,l.jsx)(`div`,{className:`hg-grid`,style:{"--hg-cols":r},onMouseLeave:()=>p(null),children:o.map((e,t)=>(0,l.jsxs)(`button`,{type:`button`,className:`hg-cell ${e.level} ${f===t?`on`:``}`,style:{"--cell-c":h[e.level].c},onMouseEnter:()=>p(t),onFocus:()=>p(t),"data-mark":t===y?`circle`:void 0,children:[(0,l.jsx)(`span`,{className:`hg-cell-glow`}),(0,l.jsx)(`span`,{className:`hg-cell-label`,children:e.label}),e.value&&(0,l.jsx)(`span`,{className:`hg-cell-val tab-num`,children:e.value})]},t))}),(0,l.jsx)(`div`,{className:`hg-detail`,"data-open":b!=null,style:{"--hg-c":b?h[b.level].c:`var(--presence)`},children:b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`span`,{className:`hg-detail-top`,children:[(0,l.jsx)(`span`,{className:`hg-detail-name`,children:b.label}),(0,l.jsx)(`span`,{className:`hg-detail-state`,children:h[b.level].label})]}),(0,l.jsx)(`span`,{className:`hg-detail-sub faint`,children:b.detail||`${b.label} — ${b.value||h[b.level].label}`})]})}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var _=r();function v(e){let t=(0,_.c)(27),{kind:n,c:r}=e,i;t[0]===r?i=t[1]:(i={fill:`none`,stroke:r,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`},t[0]=r,t[1]=i);let a=i;if(n===`search`){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,l.jsx)(`circle`,{cx:`46`,cy:`46`,r:`22`,stroke:`var(--line-strong)`,fill:`var(--surface-glass)`,strokeWidth:`1.6`}),t[2]=e):e=t[2];let n;t[3]===a?n=t[4]:(n=(0,l.jsx)(`path`,{d:`M62 62 78 78`,...a}),t[3]=a,t[4]=n);let i;t[5]===r?i=t[6]:(i=(0,l.jsx)(`path`,{d:`M40 46h12M46 40v12`,stroke:r,strokeWidth:`1.6`,strokeLinecap:`round`}),t[5]=r,t[6]=i);let o;return t[7]!==n||t[8]!==i?(o=(0,l.jsxs)(l.Fragment,{children:[e,n,i]}),t[7]=n,t[8]=i,t[9]=o):o=t[9],o}if(n===`inbox`){let e;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,l.jsx)(`rect`,{x:`22`,y:`26`,width:`56`,height:`44`,rx:`6`,stroke:`var(--line-strong)`,fill:`var(--surface-glass)`,strokeWidth:`1.6`}),t[10]=e):e=t[10];let n;t[11]===a?n=t[12]:(n=(0,l.jsx)(`path`,{d:`M22 52h16l4 8h16l4-8h16`,...a,fill:`color-mix(in oklab, var(--presence) 12%, transparent)`}),t[11]=a,t[12]=n);let i;t[13]===r?i=t[14]:(i=(0,l.jsx)(`path`,{d:`M34 38h32M34 45h22`,stroke:r,strokeWidth:`1.6`,strokeLinecap:`round`}),t[13]=r,t[14]=i);let o;return t[15]!==n||t[16]!==i?(o=(0,l.jsxs)(l.Fragment,{children:[e,n,i]}),t[15]=n,t[16]=i,t[17]=o):o=t[17],o}if(n===`spark`){let e;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,l.jsx)(`circle`,{cx:`50`,cy:`48`,r:`26`,stroke:`var(--line-strong)`,fill:`var(--surface-glass)`,strokeWidth:`1.6`}),t[18]=e):e=t[18];let n;return t[19]===r?n=t[20]:(n=(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(`path`,{d:`M50 34l4 12 12 4-12 4-4 12-4-12-12-4 12-4 4-12Z`,fill:`color-mix(in oklab, var(--presence) 16%, transparent)`,stroke:r,strokeWidth:`1.5`,strokeLinejoin:`round`})]}),t[19]=r,t[20]=n),n}let o;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(`path`,{d:`M50 22 76 36v28L50 78 24 64V36L50 22Z`,stroke:`var(--line-strong)`,fill:`var(--surface-glass)`,strokeWidth:`1.6`,strokeLinejoin:`round`}),t[21]=o):o=t[21];let s;t[22]===a?s=t[23]:(s=(0,l.jsx)(`path`,{d:`M24 36 50 50 76 36M50 50v28`,...a}),t[22]=a,t[23]=s);let c;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(`path`,{d:`M37 29 63 43`,stroke:`var(--line-strong)`,strokeWidth:`1.4`,strokeDasharray:`3 4`}),t[24]=c):c=t[24];let u;return t[25]===s?u=t[26]:(u=(0,l.jsxs)(l.Fragment,{children:[o,s,c]}),t[25]=s,t[26]=u),u}function y({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,art:r=`box`,headline:o,copy:s,action:u,actionIcon:d=`plus`,secondary:f,color:p=`var(--presence)`,footer:m,delay:h}){let g=i[t]||i.layers,_=i[d]||i.plus,[y,b]=(0,c.useState)(!1);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h||0)+`ms`,"--es-c":p},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`es-body`,children:[(0,l.jsx)(`div`,{className:`es-art`,"aria-hidden":!0,children:(0,l.jsx)(`svg`,{viewBox:`0 0 100 100`,className:`es-svg`,"aria-hidden":`true`,children:(0,l.jsx)(v,{kind:r,c:p})})}),(0,l.jsx)(`div`,{className:`es-headline`,children:o}),s&&(0,l.jsx)(`div`,{className:`es-copy`,dangerouslySetInnerHTML:a(s)}),(0,l.jsxs)(`div`,{className:`es-actions`,children:[u&&(0,l.jsxs)(`button`,{type:`button`,className:`es-btn ${y?`done`:``}`,onClick:()=>b(e=>!e),children:[y?(0,l.jsx)(i.check,{className:`ic`}):(0,l.jsx)(_,{className:`ic`}),y?`Added`:u]}),f&&(0,l.jsx)(`button`,{type:`button`,className:`mini-btn`,children:f})]})]}),m&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(m)})]})}function b({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,variant:r=`list`,rows:o=4,loadedLabel:s=`Preview loaded`,footer:u,delay:d}){let f=i[t]||i.layers,[p,m]=(0,c.useState)(!1),h=Math.max(1,Math.min(8,o));return(0,l.jsxs)(`div`,{className:`card reveal sk-card ${p?`loaded`:`loading`}`,style:{"--delay":(d||0)+`ms`},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:`sk-toggle`,onClick:()=>m(e=>!e),children:[p?(0,l.jsx)(i.undo,{className:`ic`}):(0,l.jsx)(i.play,{className:`ic`}),p?`Reload`:`Load`]})]}),(0,l.jsxs)(`div`,{className:`sk-stage`,children:[r===`chart`&&(0,l.jsxs)(`div`,{className:`sk-chart`,children:[(0,l.jsx)(`div`,{className:`sk-bars`,children:Array.from({length:7}).map((e,t)=>(0,l.jsx)(`span`,{className:`sk-bar`,style:{"--h":30+t*37%60+`%`}},t))}),(0,l.jsx)(`div`,{className:`sk-line sk-w40`})]}),r===`profile`&&(0,l.jsxs)(`div`,{className:`sk-profile`,children:[(0,l.jsx)(`span`,{className:`sk-avatar`}),(0,l.jsxs)(`div`,{className:`sk-stack`,children:[(0,l.jsx)(`span`,{className:`sk-line sk-w60`}),(0,l.jsx)(`span`,{className:`sk-line sk-w40`})]})]}),r===`media`&&(0,l.jsxs)(`div`,{className:`sk-media`,children:[(0,l.jsx)(`span`,{className:`sk-thumb`}),(0,l.jsx)(`span`,{className:`sk-thumb`}),(0,l.jsx)(`span`,{className:`sk-thumb`})]}),(r===`list`||r===`profile`||r===`media`)&&Array.from({length:h}).map((e,t)=>(0,l.jsxs)(`div`,{className:`sk-row`,children:[(0,l.jsx)(`span`,{className:`sk-chip`}),(0,l.jsxs)(`div`,{className:`sk-stack`,children:[(0,l.jsx)(`span`,{className:`sk-line sk-w80`}),(0,l.jsx)(`span`,{className:`sk-line sk-w50`})]}),(0,l.jsx)(`span`,{className:`sk-pill`})]},t))]}),p&&(0,l.jsx)(`div`,{className:`sk-loaded-note dim`,children:s}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function x({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,prompt:r,min:o,max:s,step:u=1,value:d,prefix:f=``,suffix:p=``,marks:m,outputLabel:h,outputFactor:g,outputPrefix:_=``,outputSuffix:v=``,color:y=`var(--presence)`,footer:b,delay:x}){let S=i[t]||i.edit,C=s-o||1,w=d??Math.round((o+s)/2),[T,E]=(0,c.useState)(Math.min(s,Math.max(o,w))),[D,O]=(0,c.useState)(!1),k=(0,c.useRef)(null),A=(T-o)/C*100,j=e=>{let t=k.current;if(!t)return T;let n=t.getBoundingClientRect(),r=o+Math.min(1,Math.max(0,(e-n.left)/n.width))*C,i=Math.round(r/u)*u;return Math.min(s,Math.max(o,i))},M=e=>{e.currentTarget.setPointerCapture(e.pointerId),O(!0),E(j(e.clientX))},N=e=>{D&&E(j(e.clientX))},P=e=>{O(!1);try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},F=e=>{(e.key===`ArrowRight`||e.key===`ArrowUp`)&&E(e=>Math.min(s,e+u)),(e.key===`ArrowLeft`||e.key===`ArrowDown`)&&E(e=>Math.max(o,e-u))},I=e=>Number.isInteger(u)?e.toLocaleString():e.toFixed(1),L=g==null?null:T*g;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(x||0)+`ms`,"--sl-c":y},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(S,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,l.jsx)(`div`,{className:`sl-prompt dim`,children:r}),(0,l.jsx)(`div`,{className:`sl-readout`,children:(0,l.jsxs)(`span`,{className:`sl-value tab-num`,"data-mark":`underline`,style:{color:y},children:[f,I(T),p]})}),(0,l.jsxs)(`div`,{className:`sl-track ${D?`drag`:``}`,ref:k,"data-interactive":!0,onPointerDown:M,onPointerMove:N,onPointerUp:P,role:`slider`,"aria-valuenow":T,"aria-valuemin":o,"aria-valuemax":s,tabIndex:0,onKeyDown:F,children:[(0,l.jsx)(`span`,{className:`sl-fill`,style:{width:A+`%`}}),(0,l.jsx)(`span`,{className:`sl-handle`,style:{left:A+`%`},children:(0,l.jsx)(`span`,{className:`sl-handle-dot`})})]}),m&&m.length>0&&(0,l.jsx)(`div`,{className:`sl-marks`,children:m.map((e,t)=>(0,l.jsxs)(`button`,{type:`button`,className:`sl-mark ${T===e.at?`on`:``}`,style:{left:(e.at-o)/C*100+`%`},onClick:()=>E(Math.min(s,Math.max(o,e.at))),children:[(0,l.jsx)(`span`,{className:`sl-mark-tick`}),(0,l.jsx)(`span`,{className:`sl-mark-label faint`,children:e.label})]},t))}),L!=null&&(0,l.jsxs)(`div`,{className:`sl-output`,children:[(0,l.jsx)(`span`,{className:`sl-output-label faint`,children:h||`Result`}),(0,l.jsxs)(`span`,{className:`sl-output-val tab-num`,style:{color:y},children:[_,Math.round(L).toLocaleString(),v]})]}),b&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(b)})]})}function S({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,options:r,selected:o=0,color:s=`var(--presence)`,footer:u,delay:d}){let f=i[t]||i.layers,[p,m]=(0,c.useState)(Math.min(r.length-1,Math.max(0,o))),h=r[p],g=r.length;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`,"--sg-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`sg-control`,role:`radiogroup`,style:{"--sg-n":g},children:[(0,l.jsx)(`span`,{className:`sg-thumb`,style:{width:`calc((100% - 6px) / ${g})`,left:`calc(3px + (100% - 6px) / ${g} * ${p})`}}),r.map((e,t)=>{let n=e.icon?i[e.icon]:null;return(0,l.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":p===t,className:`sg-opt ${p===t?`on`:``}`,onClick:()=>m(t),children:[n&&(0,l.jsx)(n,{className:`ic sg-opt-ic`}),e.label]},t)})]}),(0,l.jsxs)(`div`,{className:`sg-preview`,children:[h?.value&&(0,l.jsx)(`div`,{className:`sg-value tab-num`,"data-mark":`underline`,style:{color:s},children:h.value}),h?.caption&&(0,l.jsx)(`div`,{className:`sg-caption dim`,dangerouslySetInnerHTML:a(h.caption)})]},p),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function C({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,min:r,max:o,step:s=1,low:u,high:d,prefix:f=``,suffix:p=``,unitLabel:m=`results`,items:h,color:g=`var(--presence)`,footer:_,delay:v}){let y=i[t]||i.table,b=o-r||1,[x,S]=(0,c.useState)(u??r+Math.round(b*.15)),[C,w]=(0,c.useState)(d??o-Math.round(b*.1)),[T,E]=(0,c.useState)(null),D=(0,c.useRef)(null),O=(x-r)/b*100,k=(C-r)/b*100,A=e=>{let t=D.current;if(!t)return x;let n=t.getBoundingClientRect(),i=Math.min(1,Math.max(0,(e-n.left)/n.width));return Math.round((r+i*b)/s)*s},j=e=>t=>{t.stopPropagation(),t.currentTarget.setPointerCapture(t.pointerId),E(e)},M=e=>{if(!T)return;let t=A(e.clientX);T===`lo`?S(Math.min(t,C-s,o)):w(Math.max(t,x+s,r))},N=e=>{E(null);try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},P=e=>f+e.toLocaleString()+p,F=h.filter(e=>e.value>=x&&e.value<=C),I=F.slice(0,6);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(v||0)+`ms`,"--rf-c":g},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(y,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`rf-head`,children:[(0,l.jsx)(`span`,{className:`rf-bound tab-num`,children:P(x)}),(0,l.jsxs)(`span`,{className:`rf-count`,children:[(0,l.jsx)(`strong`,{className:`tab-num`,"data-mark":`underline`,style:{color:g},children:F.length}),` `,m]}),(0,l.jsx)(`span`,{className:`rf-bound tab-num`,children:P(C)})]}),(0,l.jsxs)(`div`,{className:`rf-track`,ref:D,children:[(0,l.jsx)(`span`,{className:`rf-sel`,style:{left:O+`%`,width:k-O+`%`}}),(0,l.jsx)(`button`,{type:`button`,className:`rf-handle ${T===`lo`?`drag`:``}`,style:{left:O+`%`},onPointerDown:j(`lo`),onPointerMove:M,onPointerUp:N,"aria-label":`Minimum`}),(0,l.jsx)(`button`,{type:`button`,className:`rf-handle ${T===`hi`?`drag`:``}`,style:{left:k+`%`},onPointerDown:j(`hi`),onPointerMove:M,onPointerUp:N,"aria-label":`Maximum`})]}),(0,l.jsxs)(`div`,{className:`rf-list`,children:[I.map((e,t)=>(0,l.jsxs)(`div`,{className:`rf-item`,children:[(0,l.jsx)(`span`,{className:`rf-item-bar`,children:(0,l.jsx)(`span`,{className:`rf-item-fill`,style:{width:(e.value-r)/b*100+`%`}})}),(0,l.jsx)(`span`,{className:`rf-item-label`,children:e.label}),e.meta&&(0,l.jsx)(`span`,{className:`rf-item-meta faint`,children:e.meta}),(0,l.jsx)(`span`,{className:`rf-item-val tab-num`,children:e.display||P(e.value)})]},t)),F.length>I.length&&(0,l.jsxs)(`div`,{className:`rf-more faint`,children:[`+`,F.length-I.length,` more in range`]}),F.length===0&&(0,l.jsx)(`div`,{className:`rf-more faint`,children:`No items in this range — widen it.`})]}),_&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(_)})]})}var w=[``,`Poor`,`Fair`,`Good`,`Great`,`Excellent`];function T(e){let t=(0,_.c)(4),{shape:n,fill:r}=e;if(n===`heart`){let e=r?`currentColor`:`none`,n;return t[0]===e?n=t[1]:(n=(0,l.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`ri-glyph`,"aria-hidden":`true`,children:(0,l.jsx)(`path`,{d:`M12 20.5 4.2 12.8a4.6 4.6 0 0 1 6.5-6.5l1.3 1.3 1.3-1.3a4.6 4.6 0 0 1 6.5 6.5L12 20.5Z`,fill:e,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinejoin:`round`})}),t[0]=e,t[1]=n),n}let i=r?`currentColor`:`none`,a;return t[2]===i?a=t[3]:(a=(0,l.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`ri-glyph`,children:(0,l.jsx)(`path`,{d:`m12 3 2.6 5.6 6 .7-4.4 4.1 1.2 6L12 16.9 6.6 19.5l1.2-6L3.4 9.3l6-.7L12 3Z`,fill:i,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`})}),t[2]=i,t[3]=a),a}function E({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,shape:r=`star`,max:o=5,value:s,caption:u,facets:d,color:f=`var(--warning)`,footer:p,delay:m}){let h=i[t]||i.spark,g=Math.max(1,Math.min(10,o)),_=s??Math.max(1,Math.round(o*.8)),[v,y]=(0,c.useState)(Math.min(o,Math.max(0,_))),[b,x]=(0,c.useState)(null),S=b??v;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(m||0)+`ms`,"--ri-c":f},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(h,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ri-main`,children:[(0,l.jsx)(`div`,{className:`ri-glyphs`,onMouseLeave:()=>x(null),style:{color:f},children:Array.from({length:g}).map((e,t)=>{let n=t+1,i=n<=S;return(0,l.jsx)(`button`,{type:`button`,className:`ri-btn ${i?`on`:``} ${b!=null&&n<=b?`preview`:``}`,onMouseEnter:()=>x(n),onFocus:()=>x(n),onClick:()=>y(n),"aria-label":`${n} of ${o}`,children:(0,l.jsx)(T,{shape:r,fill:i})},t)})}),(0,l.jsxs)(`div`,{className:`ri-meta`,children:[(0,l.jsx)(`span`,{className:`ri-val tab-num`,"data-mark":`underline`,style:{color:f},children:S.toFixed(1)}),(0,l.jsx)(`span`,{className:`ri-word dim`,children:b!=null&&b<=5?w[b]||`${b}`:u||w[Math.min(5,Math.round(v))]||``})]})]}),d&&d.length>0&&(0,l.jsx)(`div`,{className:`ri-facets`,children:d.map((e,t)=>(0,l.jsxs)(`div`,{className:`ri-facet`,children:[(0,l.jsx)(`span`,{className:`ri-facet-label`,children:e.label}),(0,l.jsx)(`span`,{className:`ri-facet-track`,children:(0,l.jsx)(`span`,{className:`ri-facet-fill`,style:{width:e.value/(o||1)*100+`%`}})}),(0,l.jsx)(`span`,{className:`ri-facet-val tab-num faint`,children:e.value.toFixed(1)})]},t))}),p&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(p)})]})}var D={pass:{c:`var(--insight)`,label:`Pass`,icon:`check`},warn:{c:`var(--warning)`,label:`Warn`,icon:`alert`},fail:{c:`var(--danger)`,label:`Fail`,icon:`x`}},O=[`fail`,`warn`,`pass`];function k({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,checks:r,score:o,footer:s,delay:c}){let u=i[t]||i.shield,d=r??[],f=O.reduce((e,t)=>(e[t]=d.filter(e=>e.status===t).length,e),{fail:0,warn:0,pass:0}),p=f.fail>0?`fail`:f.warn>0?`warn`:`pass`,m=d.length>0&&f.pass===d.length?`All checks pass`:`${f.pass}/${d.length} checks pass`,h=(()=>{for(let e of[`fail`,`warn`]){let t=d.findIndex(t=>t.status===e);if(t!==-1)return t}return 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]}),(0,l.jsxs)(`div`,{className:`a11-banner`,style:{"--a11-c":D[p].c},children:[(0,l.jsx)(`span`,{className:`a11-banner-dot`}),(0,l.jsx)(`span`,{className:`a11-banner-text`,children:m}),o&&(0,l.jsx)(`span`,{className:`a11-score tab-num`,children:o})]}),d.length>0&&(0,l.jsx)(`div`,{className:`a11-tally`,children:O.filter(e=>f[e]>0).map(e=>(0,l.jsxs)(`span`,{className:`a11-tally-pill`,style:{"--a11-c":D[e].c},children:[(0,l.jsx)(`span`,{className:`a11-tally-dot`}),(0,l.jsx)(`span`,{className:`a11-tally-n tab-num`,children:f[e]}),(0,l.jsx)(`span`,{className:`a11-tally-label`,children:D[e].label})]},e))}),(0,l.jsxs)(`ul`,{className:`a11-list`,children:[d.map((e,t)=>{let n=D[e.status]??D.warn,r=i[n.icon]||i.alert;return(0,l.jsxs)(`li`,{className:`a11-row`,style:{"--a11-c":n.c},children:[(0,l.jsx)(`span`,{className:`a11-badge ${e.status}`,"data-mark":t===h?`circle`:void 0,children:(0,l.jsx)(r,{className:`ic a11-badge-ic`,style:{width:13,height:13}})}),(0,l.jsxs)(`span`,{className:`a11-body`,children:[(0,l.jsxs)(`span`,{className:`a11-top`,children:[(0,l.jsx)(`span`,{className:`a11-label`,children:e.label}),(0,l.jsx)(`span`,{className:`a11-state`,children:n.label})]}),e.note&&(0,l.jsx)(`span`,{className:`a11-note faint`,children:e.note})]})]},t)}),d.length===0&&(0,l.jsx)(`li`,{className:`a11-empty faint`,children:`No checks to report.`})]}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var A=[{score:0,mouth:`M8.5 14.5q3.5 3 7 0`,brow:0,tint:`var(--insight)`},{score:2,mouth:`M8.5 14.8q3.5 1.8 7 0`,brow:0,tint:`var(--insight)`},{score:4,mouth:`M8.5 15q3.5 0 7 0`,brow:.4,tint:`var(--presence)`},{score:6,mouth:`M8.5 15.6q3.5 -1.4 7 0`,brow:1,tint:`var(--warning)`},{score:8,mouth:`M8.5 16.2q3.5 -2.6 7 0`,brow:1.6,tint:`var(--warning)`},{score:10,mouth:`M8.5 16.8q3.5 -3.4 7 0`,brow:2.2,tint:`var(--danger)`}],j=[`No pain`,`Mild`,`Moderate`,`Moderate`,`Severe`,`Worst pain`];function M(e){return e<=0||e<=3?`var(--insight)`:e<=5?`var(--presence)`:e<=7?`var(--warning)`:`var(--danger)`}function N(e){let t=(0,_.c)(11),{mouth:n,brow:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,l.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10.2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`}),t[0]=i):i=t[0];let a=9.4+r,o;t[1]===a?o=t[2]:(o=(0,l.jsx)(`circle`,{cx:`8.6`,cy:a,r:`1.15`,fill:`currentColor`}),t[1]=a,t[2]=o);let s=9.4+r,c;t[3]===s?c=t[4]:(c=(0,l.jsx)(`circle`,{cx:`15.4`,cy:s,r:`1.15`,fill:`currentColor`}),t[3]=s,t[4]=c);let u;t[5]===n?u=t[6]:(u=(0,l.jsx)(`path`,{d:n,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`}),t[5]=n,t[6]=u);let d;return t[7]!==o||t[8]!==c||t[9]!==u?(d=(0,l.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`ps-face-svg`,"aria-hidden":`true`,children:[i,o,c,u]}),t[7]=o,t[8]=c,t[9]=u,t[10]=d):d=t[10],d}function P({title:e,icon:t=`sparkle`,iconColor:n=`var(--presence)`,value:r,kind:o=`faces`,anchors:s,caption:c,footer:u,delay:d}){let f=i[t]||i.sparkle,p=Math.min(10,Math.max(0,r)),m=M(p),h=Math.min(A.length-1,Math.max(0,Math.round(p/2))),g=c||(s&&s.length?s[Math.min(s.length-1,Math.round(p/10*(s.length-1)))]:j[h]),_=s?.[0]??`No pain`,v=s?.[s.length-1]??`Worst pain`;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`,"--ps-c":m},children:[e&&(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ps-readout`,children:[(0,l.jsxs)(`span`,{className:`ps-num tab-num`,"data-mark":`underline`,children:[p,(0,l.jsx)(`span`,{className:`ps-num-d`,children:`/10`})]}),(0,l.jsx)(`span`,{className:`ps-word`,children:g})]}),o===`vas`?(0,l.jsxs)(`div`,{className:`ps-vas`,children:[(0,l.jsxs)(`div`,{className:`ps-vas-track`,children:[(0,l.jsx)(`span`,{className:`ps-vas-fill`,style:{width:p/10*100+`%`}}),(0,l.jsx)(`span`,{className:`ps-vas-marker`,style:{left:p/10*100+`%`},children:(0,l.jsx)(`span`,{className:`ps-vas-flag tab-num`,children:p})})]}),(0,l.jsxs)(`div`,{className:`ps-vas-anchors`,children:[(0,l.jsx)(`span`,{className:`ps-anchor-lo`,children:_}),(0,l.jsx)(`span`,{className:`ps-anchor-hi`,children:v})]}),(0,l.jsx)(`div`,{className:`ps-vas-ticks`,"aria-hidden":`true`,children:Array.from({length:11}).map((e,t)=>(0,l.jsx)(`span`,{className:`ps-tick ${t===Math.round(p)?`on`:``}`,children:t},t))})]}):(0,l.jsx)(`div`,{className:`ps-faces`,children:A.map((e,t)=>{let n=t===h;return(0,l.jsxs)(`div`,{className:`ps-face ${n?`on`:``}`,style:{"--face-c":e.tint},"data-mark":n?`circle`:void 0,children:[(0,l.jsx)(N,{mouth:e.mouth,brow:e.brow}),(0,l.jsx)(`span`,{className:`ps-face-n tab-num`,children:e.score})]},e.score)})}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var F=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],I=13,L=2*Math.PI*I;function ee(e){let t=(0,_.c)(3),{pct:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,l.jsx)(`circle`,{className:`ht-ring-track`,cx:`16`,cy:`16`,r:I,fill:`none`,strokeWidth:`4`}),t[0]=r):r=t[0];let i=L*(1-n),a;return t[1]===i?a=t[2]:(a=(0,l.jsxs)(`svg`,{viewBox:`0 0 32 32`,className:`ht-ring`,"aria-hidden":`true`,children:[r,(0,l.jsx)(`circle`,{className:`ht-ring-fill`,cx:`16`,cy:`16`,r:I,fill:`none`,strokeWidth:`4`,strokeLinecap:`round`,strokeDasharray:L,strokeDashoffset:i,transform:`rotate(-90 16 16)`})]}),t[1]=i,t[2]=a),a}function te({title:e,icon:t=`check`,iconColor:n=`var(--presence)`,days:r=F,habits:o,caption:s,footer:c,delay:u}){let d=i[t]||i.check,f=Math.max(1,Math.min(10,r.length)),p=r.slice(0,f),m=o.map(e=>{let t=Array.from({length:f},(t,n)=>e.done[n]===!0),n=t.filter(Boolean).length;return{name:e.name,cells:t,kept:n,pct:f?n/f:0}}),h=m.length*f,g=m.reduce((e,t)=>e+t.kept,0),_=h?Math.round(g/h*100):0,v=m.length?m.reduce((e,t,n)=>t.pct<m[e].pct?n:e,0):-1;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[e&&(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ht-summary`,children:[(0,l.jsxs)(`span`,{className:`ht-summary-pct tab-num`,"data-mark":`underline`,children:[_,`%`]}),(0,l.jsx)(`span`,{className:`ht-summary-text`,children:s||`${g} of ${h} checks this week`})]}),(0,l.jsx)(`div`,{className:`ht-scroll`,children:(0,l.jsxs)(`div`,{className:`ht-grid`,style:{"--ht-cols":f},children:[(0,l.jsx)(`span`,{className:`ht-corner`,"aria-hidden":`true`}),p.map((e,t)=>(0,l.jsx)(`span`,{className:`ht-day`,children:e},t)),m.map((e,t)=>(0,l.jsxs)(`div`,{className:`ht-row`,style:{display:`contents`},children:[(0,l.jsxs)(`span`,{className:`ht-habit`,"data-mark":t===v?`circle`:void 0,children:[(0,l.jsxs)(`span`,{className:`ht-habit-ring`,children:[(0,l.jsx)(ee,{pct:e.pct}),(0,l.jsx)(`span`,{className:`ht-habit-pct tab-num`,children:Math.round(e.pct*100)})]}),(0,l.jsx)(`span`,{className:`ht-habit-name`,children:e.name})]}),e.cells.map((t,n)=>(0,l.jsx)(`span`,{className:`ht-cell ${t?`done`:``}`,title:`${e.name} · ${p[n]}`,children:t?(0,l.jsx)(i.check,{className:`ht-check`}):(0,l.jsx)(`span`,{className:`ht-empty`})},n))]},t))]})}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}function R(e){let t=0;for(let n=e.length-1;n>=0&&e[n];n--)t++;return t}function ne(e){let t=0,n=0;for(let r of e)n=r?n+1:0,n>t&&(t=n);return t}function re({title:e,icon:t=`spark`,iconColor:n=`var(--warning)`,habit:r,days:o,current:s,best:c,caption:u,footer:d,delay:f}){let p=i[t]||i.spark,m=o.map(e=>e.done===!0),h=s==null?R(m):Math.max(0,s),g=c==null?Math.max(h,ne(m)):Math.max(h,c),_=m.filter(Boolean).length,v=R(m),y=m.length-v,b=o.slice(Math.max(0,o.length-35)),x=o.length-b.length;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[e&&(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`sg-counters`,children:[(0,l.jsxs)(`div`,{className:`sg-counter sg-counter-cur`,children:[(0,l.jsx)(`span`,{className:`sg-counter-n tab-num`,"data-mark":`underline`,children:h}),(0,l.jsx)(`span`,{className:`sg-counter-flame`,"aria-hidden":`true`,children:(0,l.jsx)(i.spark,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`sg-counter-label`,children:[`day streak`,r?` · ${r}`:``]})]}),(0,l.jsxs)(`div`,{className:`sg-counter sg-counter-best`,children:[(0,l.jsx)(`span`,{className:`sg-counter-n tab-num`,children:g}),(0,l.jsx)(`span`,{className:`sg-counter-label`,children:`best ever`})]})]}),(0,l.jsx)(`div`,{className:`sg-grid`,"aria-hidden":`true`,children:b.map((e,t)=>{let n=t+x,r=e.done&&n>=y;return(0,l.jsx)(`span`,{className:`sg-dot ${e.done?`done`:`miss`} ${r?`chain`:``}`,title:e.date?`${e.date}${e.done?` · kept`:` · missed`}`:void 0},t)})}),(0,l.jsxs)(`div`,{className:`sg-foot`,children:[(0,l.jsx)(`span`,{className:`sg-chain-note`,children:h>0?u||`Don’t break the chain — ${h} and counting`:u||`A fresh chain starts with one day`}),(0,l.jsxs)(`span`,{className:`sg-kept tab-num faint`,children:[_,`/`,o.length,` days`]})]}),d&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}var z={routine:{c:`var(--text-muted)`,label:`Routine`},soon:{c:`var(--warning)`,label:`Soon`},critical:{c:`var(--danger)`,label:`Critical`}},B=[`critical`,`soon`,`routine`],ie={filing:`Filing`,motion:`Motion`,hearing:`Hearing`,order:`Order`,deadline:`Deadline`};function ae(e){return ie[e]||(e?e.charAt(0).toUpperCase()+e.slice(1):`Event`)}function V(e){return e.urgency&&z[e.urgency]?e.urgency:`routine`}function oe(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?Math.ceil((t-Date.now())/864e5):null}function se({title:e,icon:t=`proof`,iconColor:n=`var(--presence)`,events:r,footer:o,delay:s}){let u=i[t]||i.proof,d=Array.isArray(r)?r:[],[f,p]=(0,c.useState)(`all`),m=B.reduce((e,t)=>(e[t]=d.filter(e=>V(e)===t).length,e),{critical:0,soon:0,routine:0}),h=B.filter(e=>m[e]>0),g=d.filter(e=>f===`all`||V(e)===f),_=(()=>{for(let e of B){let t=g.findIndex(t=>V(t)===e);if(t!==-1)return t}return 0})();return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),h.length>0&&(0,l.jsxs)(`div`,{className:`lt-chips`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`lt-chip ${f===`all`?`on`:``}`,onClick:()=>p(`all`),children:[`All `,(0,l.jsx)(`span`,{className:`lt-chip-n tab-num`,children:d.length})]}),h.map(e=>(0,l.jsxs)(`button`,{type:`button`,className:`lt-chip ${f===e?`on`:``}`,style:{"--chip-c":z[e].c},onClick:()=>p(t=>t===e?`all`:e),children:[(0,l.jsx)(`span`,{className:`lt-chip-dot`,style:{background:z[e].c}}),z[e].label,` `,(0,l.jsx)(`span`,{className:`lt-chip-n tab-num`,children:m[e]})]},e))]}),(0,l.jsxs)(`div`,{className:`lt-list`,children:[g.map((e,t)=>{let n=V(e),r=z[n],i=n===`critical`?oe(e.date):null,a=[e.court,e.party].filter(Boolean).join(` · `);return(0,l.jsxs)(`div`,{className:`lt-row m-stagger-item m-fade-rise`,style:{"--i":t,"--ev-c":r.c},children:[(0,l.jsx)(`span`,{className:`lt-rail`,children:(0,l.jsx)(`span`,{className:`lt-node`,"data-mark":t===_?`circle`:void 0,"aria-hidden":`true`})}),(0,l.jsxs)(`span`,{className:`lt-body`,children:[(0,l.jsxs)(`span`,{className:`lt-top`,children:[(0,l.jsx)(`span`,{className:`lt-kind`,children:ae(e.kind)}),e.date&&(0,l.jsx)(`span`,{className:`lt-date faint tab-num`,children:e.date})]}),a&&(0,l.jsx)(`span`,{className:`lt-meta faint`,children:a}),e.detail&&(0,l.jsx)(`span`,{className:`lt-detail faint`,children:e.detail}),i!=null&&(0,l.jsx)(`span`,{className:`lt-countdown ${i<0?`overdue`:``}`,children:i<0?`${Math.abs(i)}d overdue`:i===0?`due today`:`${i}d left`})]})]},t)}),g.length===0&&(0,l.jsxs)(`div`,{className:`lt-empty faint`,children:[`No `,f===`all`?``:z[f].label.toLowerCase()+` `,`events.`]})]}),o&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var H={done:{c:`var(--insight)`,label:`Passed`},current:{c:`var(--presence)`,label:`In progress`},pending:{c:`var(--text-muted)`,label:`Pending`},failed:{c:`var(--danger)`,label:`Failed`}};function U(e){return e===`done`||e===`current`||e===`pending`||e===`failed`?e:`pending`}function ce(e){return!e||typeof e.yea!=`number`||typeof e.nay!=`number`||!Number.isFinite(e.yea)||!Number.isFinite(e.nay)?null:{yea:e.yea,nay:e.nay}}function le({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,bill:r,stages:o,footer:s,delay:c}){let u=i[t]||i.chart,d=Array.isArray(o)?o:[],f=d.findIndex(e=>U(e.status)===`failed`),p=d.findIndex(e=>U(e.status)===`current`),m=d.length>0&&d.every(e=>U(e.status)===`done`),h=(()=>{if(f!==-1)return{text:`Failed at ${d[f]?.name||`this stage`}`,c:H.failed.c};if(p!==-1)return{text:`Currently at ${d[p]?.name||`this stage`}`,c:H.current.c};if(m){let e=d[d.length-1]?.name;return{text:e?`Signed — ${e}`:`Signed into law`,c:H.done.c}}return d.length===0?{text:`No stages recorded`,c:`var(--text-muted)`}:{text:`Not yet introduced`,c:`var(--text-muted)`}})(),g=f===-1?p===-1?(()=>{for(let e=d.length-1;e>=0;e--)if(U(d[e].status)===`done`)return e;return 0})():p:f;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:`bt-bill faint`,children:r}),(0,l.jsxs)(`div`,{className:`bt-banner`,style:{"--bt-c":h.c},children:[(0,l.jsx)(`span`,{className:`bt-banner-dot`}),(0,l.jsx)(`span`,{className:`bt-banner-text`,children:h.text})]}),(0,l.jsxs)(`div`,{className:`bt-rail`,children:[d.map((e,t)=>{let n=U(e.status),r=H[n],a=f!==-1&&t>f,o=ce(e.voteTally),s=o?o.yea+o.nay:0,c=s>0&&o?o.yea/s*100:0;return(0,l.jsxs)(`div`,{className:`bt-unit m-stagger-item m-fade-rise`,style:{"--i":t},children:[t>0&&(0,l.jsx)(`span`,{className:`bt-connector ${f===t-1?`dead`:``}`,children:f===t-1&&(0,l.jsx)(i.x,{className:`bt-dead-ic`,"aria-hidden":`true`})}),(0,l.jsxs)(`div`,{className:`bt-stage ${n} ${a?`moot`:``}`,style:{"--st-c":r.c},"data-mark":t===g?`circle`:void 0,children:[(0,l.jsxs)(`span`,{className:`bt-node`,children:[n===`done`&&(0,l.jsx)(i.check,{className:`ic`}),n===`failed`&&(0,l.jsx)(i.x,{className:`ic`}),n===`current`&&(0,l.jsx)(`span`,{className:`bt-pulse`})]}),(0,l.jsx)(`span`,{className:`bt-name`,children:e.name}),o&&(0,l.jsxs)(`span`,{className:`bt-vote`,children:[(0,l.jsxs)(`span`,{className:`bt-vote-n tab-num`,children:[o.yea,`–`,o.nay]}),(0,l.jsx)(`span`,{className:`bt-vote-bar`,children:(0,l.jsx)(`span`,{className:`bt-vote-fill`,style:{width:c+`%`}})})]})]})]},t)}),d.length===0&&(0,l.jsx)(`div`,{className:`bt-empty faint`,children:`No stages to show.`})]}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var W={1:{c:`var(--danger)`,label:`Resuscitation`},2:{c:`var(--warning)`,label:`Emergent`},3:{c:`var(--presence)`,label:`Urgent`},4:{c:`var(--insight-soft)`,label:`Less urgent`},5:{c:`var(--text-muted)`,label:`Non-urgent`}};function ue(e){let t=typeof e==`number`?e:typeof e==`string`?parseFloat(e):NaN;return Number.isFinite(t)?Math.min(5,Math.max(1,Math.round(t))):3}function de(e){return typeof e==`string`?e:typeof e==`number`&&Number.isFinite(e)?String(e):``}function fe({title:e,icon:t=`alert`,iconColor:n=`var(--presence)`,patients:r,footer:o,delay:s}){let c=i[t]||i.alert,u=(Array.isArray(r)?r:[]).map((e,t)=>({p:e,i:t,lvl:ue(e.esiLevel)})).sort((e,t)=>e.lvl-t.lvl||e.i-t.i),d=u.length?u[0].lvl:null,f=u.filter(e=>e.lvl<=2).length,p=u.length===0?`No patients waiting`:`${u.length} patient${u.length===1?``:`s`} waiting`+(f>0?` · ${f} at ESI 1–2`:``);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`tb-banner`,style:{"--tb-c":d?W[d].c:`var(--text-muted)`},children:[(0,l.jsx)(`span`,{className:`tb-banner-dot`}),(0,l.jsx)(`span`,{className:`tb-banner-text`,children:p})]}),(0,l.jsxs)(`div`,{className:`tb-list`,children:[u.map(({p:e,i:t,lvl:n},r)=>{let i=W[n],a=Array.isArray(e.vitals)?e.vitals:[];return(0,l.jsxs)(`div`,{className:`tb-row m-stagger-item m-fade-rise`,style:{"--i":r,"--esi-c":i.c},children:[(0,l.jsx)(`span`,{className:`tb-badge`,"data-mark":r===0?`circle`:void 0,children:(0,l.jsx)(`span`,{className:`tb-badge-n tab-num`,children:n})}),(0,l.jsxs)(`span`,{className:`tb-body`,children:[(0,l.jsxs)(`span`,{className:`tb-top`,children:[(0,l.jsx)(`span`,{className:`tb-complaint`,children:e.chiefComplaint}),e.waitTime&&(0,l.jsx)(`span`,{className:`tb-wait faint tab-num`,children:e.waitTime})]}),(0,l.jsx)(`span`,{className:`tb-esi-label`,children:i.label}),a.length>0&&(0,l.jsx)(`span`,{className:`tb-vitals`,children:a.map((e,t)=>{let n=de(e.value);return(0,l.jsxs)(`span`,{className:`tb-vital ${e.abnormal?`abn`:``}`,children:[e.label,n&&`: ${n}`]},t)})})]})]},t)}),u.length===0&&(0,l.jsx)(`div`,{className:`tb-empty faint`,children:`Board is empty.`})]}),o&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var G={ok:`var(--insight)`,mild:`var(--insight-soft)`,moderate:`var(--warning)`,severe:`var(--danger)`};function pe(e){return typeof e==`string`&&e in G?G[e]:G.moderate}function K(e){let t=typeof e==`number`?e:typeof e==`string`?parseFloat(e):NaN;return Number.isFinite(t)?Math.min(3,Math.max(0,Math.round(t))):0}function me(e){if(!e||!Array.isArray(e.range)||e.range.length!==2)return null;let[t,n]=e.range;return!Number.isFinite(t)||!Number.isFinite(n)||n<t?null:{label:e.label||``,lo:t,hi:n,c:pe(e.tone)}}function he({title:e,icon:t=`chat`,iconColor:n=`var(--presence)`,instrument:r,items:o,total:s,maxTotal:c,bands:u,footer:d,delay:f}){let p=i[t]||i.chat,m=Array.isArray(o)?o:[],h=Array.isArray(u)?u:[],g=m.reduce((e,t)=>e+K(t.score),0),_=Number.isFinite(s)?s:g,v=Number.isFinite(c)&&c>0?c:Math.max(m.length*3,1),y=h.map(me).filter(e=>e!==null).sort((e,t)=>e.lo-t.lo),b=y.find(e=>_>=e.lo&&_<=e.hi)??null,x=Math.min(100,Math.max(0,_/v*100));return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e,r&&(0,l.jsx)(`span`,{className:`mhs-instrument`,children:r})]}),(0,l.jsxs)(`div`,{className:`mhs-rows`,children:[m.map((e,t)=>{let n=K(e.score);return(0,l.jsxs)(`div`,{className:`mhs-row m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,l.jsx)(`span`,{className:`mhs-prompt`,children:e.prompt}),(0,l.jsx)(`span`,{className:`mhs-dots`,"aria-hidden":`true`,children:[0,1,2,3].map(e=>(0,l.jsx)(`span`,{className:`mhs-dot ${e<=n?`on`:``}`},e))}),(0,l.jsx)(`span`,{className:`mhs-score tab-num`,children:n}),e.anchor&&(0,l.jsx)(`span`,{className:`mhs-anchor faint`,children:e.anchor})]},t)}),m.length===0&&(0,l.jsx)(`div`,{className:`mhs-empty faint`,children:`No items scored.`})]}),(0,l.jsxs)(`div`,{className:`mhs-total`,children:[(0,l.jsx)(`span`,{className:`mhs-total-val tab-num`,"data-mark":`underline`,children:_}),(0,l.jsxs)(`span`,{className:`mhs-total-max faint`,children:[`/ `,v]}),b&&(0,l.jsx)(`span`,{className:`mhs-total-band`,style:{color:b.c},children:b.label})]}),y.length>0&&(0,l.jsxs)(`div`,{className:`mhs-bar`,children:[(0,l.jsxs)(`div`,{className:`mhs-bar-track`,children:[y.map((e,t)=>{let n=Math.min(v,Math.max(0,e.lo)),r=Math.min(v,Math.max(0,e.hi)),i=Math.max(0,r-n);return(0,l.jsx)(`span`,{className:`mhs-bar-seg ${b===e?`on`:``}`,style:{left:n/v*100+`%`,width:i/v*100+`%`,"--seg-c":e.c},title:e.label},t)}),(0,l.jsx)(`span`,{className:`mhs-bar-marker`,style:{left:x+`%`}})]}),(0,l.jsx)(`div`,{className:`mhs-bar-labels`,children:y.map((e,t)=>(0,l.jsx)(`span`,{className:`mhs-bar-label faint`,style:{color:e.c},children:e.label},t))})]}),d&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}var q={critical:{c:`var(--danger)`,label:`Critical`,letter:`C`},major:{c:`var(--warning)`,label:`Major`,letter:`M`},minor:{c:`var(--text-muted)`,label:`Minor`,letter:`m`}},J=[`critical`,`major`,`minor`];function Y(e){return e===`critical`||e===`major`||e===`minor`?e:`major`}function ge({title:e,icon:t=`eye`,iconColor:n=`var(--presence)`,taskSuccessRate:r,avgTimeOnTask:o,issues:s,footer:c,delay:u}){let d=i[t]||i.eye,f=Array.isArray(s)?s:[],p=J.reduce((e,t)=>(e[t]=f.filter(e=>Y(e.severity)===t).length,e),{critical:0,major:0,minor:0}),m=p.critical>0?`critical`:p.major>0?`major`:`minor`,h=f.length===0?`No usability issues found`:`${f.length} issue${f.length===1?``:`s`} found`+(p.critical>0?`, ${p.critical} critical`:``),g=Number.isFinite(r)?Math.round(Math.min(100,Math.max(0,r))):null,_=(()=>{for(let e of[`critical`,`major`]){let t=f.findIndex(t=>Y(t.severity)===e);if(t!==-1)return t}return 0})();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]}),(g!=null||o)&&(0,l.jsxs)(`div`,{className:`uf-stats`,children:[g!=null&&(0,l.jsxs)(`span`,{className:`uf-stat`,children:[(0,l.jsxs)(`span`,{className:`uf-stat-val tab-num`,children:[g,`%`]}),(0,l.jsx)(`span`,{className:`uf-stat-label faint`,children:`task success`})]}),o&&(0,l.jsxs)(`span`,{className:`uf-stat`,children:[(0,l.jsx)(`span`,{className:`uf-stat-val tab-num`,children:o}),(0,l.jsx)(`span`,{className:`uf-stat-label faint`,children:`avg time on task`})]})]}),(0,l.jsxs)(`div`,{className:`uf-banner`,style:{"--uf-c":q[m].c},children:[(0,l.jsx)(`span`,{className:`uf-banner-dot`}),(0,l.jsx)(`span`,{className:`uf-banner-text`,children:h})]}),f.length>0&&(0,l.jsx)(`div`,{className:`uf-tally`,children:J.filter(e=>p[e]>0).map(e=>(0,l.jsxs)(`span`,{className:`uf-tally-pill`,style:{"--uf-c":q[e].c},children:[(0,l.jsx)(`span`,{className:`uf-tally-dot`}),(0,l.jsx)(`span`,{className:`uf-tally-n tab-num`,children:p[e]}),(0,l.jsx)(`span`,{className:`uf-tally-label`,children:q[e].label})]},e))}),(0,l.jsxs)(`ul`,{className:`uf-list`,children:[f.map((e,t)=>{let n=q[Y(e.severity)],r=Number.isFinite(e.affectedUsers)?Math.max(0,e.affectedUsers):null;return(0,l.jsxs)(`li`,{className:`uf-row m-stagger-item m-fade-rise`,style:{"--i":t,"--uf-c":n.c},children:[(0,l.jsx)(`span`,{className:`uf-badge`,"data-mark":t===_?`circle`:void 0,children:n.letter}),(0,l.jsxs)(`span`,{className:`uf-body`,children:[(0,l.jsxs)(`span`,{className:`uf-top`,children:[(0,l.jsx)(`span`,{className:`uf-label`,children:e.label}),(0,l.jsx)(`span`,{className:`uf-state`,children:n.label})]}),(r!=null||e.note)&&(0,l.jsxs)(`span`,{className:`uf-note faint`,children:[r!=null&&(0,l.jsxs)(`span`,{className:`uf-affected tab-num`,children:[r,` user`,r===1?``:`s`]}),r!=null&&e.note?` · `:``,e.note]})]})]},t)}),f.length===0&&(0,l.jsx)(`li`,{className:`uf-empty faint`,children:`No issues to report.`})]}),c&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var X={open:{c:`var(--text-muted)`,label:`Open`},held:{c:`var(--warning)`,label:`Held`},booked:{c:`var(--presence)`,label:`Booked`},"checked-in":{c:`var(--insight)`,label:`Checked in`}},Z=[`checked-in`,`booked`,`held`,`open`];function Q(e){return e===`open`||e===`held`||e===`booked`||e===`checked-in`?e:`open`}function _e({title:e,icon:t=`bell`,iconColor:n=`var(--presence)`,cols:r=4,cells:o,footer:s,delay:u}){let d=i[t]||i.bell,f=Array.isArray(o)?o:[],[p,m]=(0,c.useState)(null),h=Z.reduce((e,t)=>(e[t]=f.filter(e=>Q(e.level)===t).length,e),{"checked-in":0,booked:0,held:0,open:0}),g=f.length-h.open,_=Math.round(g/(f.length||1)*100),v=Z.find(e=>h[e]>0)??`open`,y=(()=>{for(let e of Z){if(e===`open`)break;let t=f.findIndex(t=>Q(t.level)===e);if(t!==-1)return t}return 0})(),b=p==null?null:f[p];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]}),(0,l.jsxs)(`div`,{className:`rbd-banner`,style:{"--rbd-c":X[v].c},children:[(0,l.jsx)(`span`,{className:`rbd-banner-dot`}),(0,l.jsx)(`span`,{className:`rbd-banner-text`,children:f.length===0?`No rooms to show`:`${g}/${f.length} rooms committed`}),f.length>0&&(0,l.jsxs)(`span`,{className:`rbd-banner-pct tab-num faint`,children:[_,`%`]})]}),f.length>0&&(0,l.jsx)(`div`,{className:`rbd-legend`,children:Z.filter(e=>h[e]>0).map(e=>(0,l.jsxs)(`span`,{className:`rbd-legend-pill`,style:{"--rbd-c":X[e].c},children:[(0,l.jsx)(`span`,{className:`rbd-legend-dot`}),(0,l.jsx)(`span`,{className:`rbd-legend-n tab-num`,children:h[e]}),(0,l.jsx)(`span`,{className:`rbd-legend-label`,children:X[e].label})]},e))}),(0,l.jsx)(`div`,{className:`rbd-grid`,style:{"--rbd-cols":Math.max(1,r)},onMouseLeave:()=>m(null),children:f.map((e,t)=>{let n=Q(e.level),r=X[n];return(0,l.jsxs)(`button`,{type:`button`,className:`rbd-cell ${n} ${p===t?`on`:``} m-stagger-item m-scale-in`,style:{"--i":t,"--cell-c":r.c},onMouseEnter:()=>m(t),onFocus:()=>m(t),"data-mark":t===y?`circle`:void 0,children:[(0,l.jsx)(`span`,{className:`rbd-cell-glow`}),(0,l.jsx)(`span`,{className:`rbd-cell-label`,children:e.label}),e.value&&(0,l.jsx)(`span`,{className:`rbd-cell-val`,children:e.value})]},t)})}),(0,l.jsx)(`div`,{className:`rbd-detail`,"data-open":b!=null,style:{"--rbd-c":b?X[Q(b.level)].c:`var(--presence)`},children:b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`span`,{className:`rbd-detail-top`,children:[(0,l.jsx)(`span`,{className:`rbd-detail-name`,children:b.label}),(0,l.jsx)(`span`,{className:`rbd-detail-state`,children:X[Q(b.level)].label})]}),(0,l.jsx)(`span`,{className:`rbd-detail-sub faint`,children:b.detail||`${b.label} — ${b.value||X[Q(b.level)].label}`})]})}),s&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var ve={done:{c:`var(--insight)`,label:`Done`},current:{c:`var(--presence)`,label:`In progress`},pending:{c:`var(--text-muted)`,label:`Pending`},failed:{c:`var(--danger)`,label:`Denied`}},ye=[`current`,`failed`,`done`,`pending`];function $(e){return e===`done`||e===`current`||e===`pending`||e===`failed`?e:`pending`}function be(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?Math.ceil((t-Date.now())/864e5):null}function xe({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,visaCategory:r,stages:o,priorityDate:s,rfeDeadline:c,footer:u,delay:d}){let f=i[t]||i.globe,p=Array.isArray(o)?o:[],m=(()=>{for(let e of ye){let t=p.findIndex(t=>$(t.status)===e);if(t!==-1)return t}return 0})(),h=be(c),g=h==null?`var(--presence)`:h<0?`var(--danger)`:h<=30?`var(--warning)`:`var(--insight)`,_=h==null?null:h<0?`${Math.abs(h)}d overdue`:h===0?`due today`:`${h}d left`;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(r||s)&&(0,l.jsxs)(`div`,{className:`imc-sub`,children:[r&&(0,l.jsx)(`span`,{className:`imc-visa`,children:r}),s&&(0,l.jsxs)(`span`,{className:`imc-priority faint`,children:[`Priority date `,(0,l.jsx)(`span`,{className:`tab-num`,children:s})]})]}),(0,l.jsxs)(`div`,{className:`imc-list`,children:[p.map((e,t)=>{let n=$(e.status),r=ve[n];return(0,l.jsxs)(`div`,{className:`imc-row m-stagger-item m-fade-rise`,style:{"--i":t,"--ev-c":r.c},children:[(0,l.jsx)(`span`,{className:`imc-rail`,children:(0,l.jsxs)(`span`,{className:`imc-node ${n}`,"data-mark":t===m?`circle`:void 0,children:[n===`done`&&(0,l.jsx)(i.check,{className:`ic`}),n===`failed`&&(0,l.jsx)(i.x,{className:`ic`}),n===`current`&&(0,l.jsx)(`span`,{className:`imc-pulse`})]})}),(0,l.jsxs)(`span`,{className:`imc-body`,children:[(0,l.jsxs)(`span`,{className:`imc-top`,children:[(0,l.jsx)(`span`,{className:`imc-label`,children:e.name}),e.date&&(0,l.jsx)(`span`,{className:`imc-date faint tab-num`,children:e.date})]}),(0,l.jsx)(`span`,{className:`imc-state`,children:r.label})]})]},t)}),p.length===0&&(0,l.jsx)(`div`,{className:`imc-empty faint`,children:`No stages recorded.`})]}),c&&(0,l.jsxs)(`div`,{className:`imc-rfe`,style:{"--rfe-c":g},children:[(0,l.jsx)(`span`,{className:`imc-rfe-dot`}),(0,l.jsxs)(`span`,{className:`imc-rfe-text`,children:[`RFE response due `,(0,l.jsx)(`span`,{className:`tab-num`,children:c})]}),_&&(0,l.jsx)(`span`,{className:`imc-rfe-countdown`,children:_})]}),u&&(0,l.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var Se=e({statusRegistry:()=>Ce}),Ce={progressbar:o(u),stepindicator:(e,t)=>(0,l.jsx)(d,{...e,delay:t.delay,spotlight:t.spotlight}),statustimeline:o(m),healthgrid:o(g),emptystate:o(y),skeleton:o(b),sliderinput:o(x),segmented:o(S),rangefilter:o(C),ratinginput:o(E),a11yaudit:o(k),painscale:o(P),habittracker:o(te),streakgrid:o(re),litigationtimeline:o(se),billtracker:o(le),triageboard:o(fe),mentalhealthscreen:o(he),usabilityfindings:o(ge),roomblockdashboard:o(_e),immigrationcase:o(xe)};export{Ce as n,Se as t};