@jingyi0605/codingns 0.6.1 → 0.6.5

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 (162) hide show
  1. package/bin/codingns.mjs +225 -0
  2. package/dist/public/assets/AdaptiveButlerPage-CfsUVZKl.js +3 -0
  3. package/dist/public/assets/{App-Dsf3ooXU.js → App-B9HcTkMT.js} +3 -3
  4. package/dist/public/assets/{BootstrapPage-CE0m1qSR.js → BootstrapPage-BgLdZEKQ.js} +1 -1
  5. package/dist/public/assets/ConversationPage-Cj8go7L0.js +4 -0
  6. package/dist/public/assets/{DesktopDetachPreviewPage-Dxarr_Wf.js → DesktopDetachPreviewPage-YCBnyC58.js} +1 -1
  7. package/dist/public/assets/{DesktopWindowPage-VytPwJ4c.js → DesktopWindowPage-CrvndE23.js} +1 -1
  8. package/dist/public/assets/{FileContextPanel-DwFzLsOp.js → FileContextPanel-CdC7GGw5.js} +1 -1
  9. package/dist/public/assets/{GitSidebar-CH6WqTrM.js → GitSidebar-z2SBinQh.js} +1 -1
  10. package/dist/public/assets/{MobileCreateSessionSheet-DcxKM00P.js → MobileCreateSessionSheet-Cb2HM-y3.js} +1 -1
  11. package/dist/public/assets/{MobileTopHeaderFrame-C5rIKQT6.js → MobileTopHeaderFrame-etF2HKlm.js} +1 -1
  12. package/dist/public/assets/{MobileWorkspaceSwitcherHeader-CfUnHgv_.js → MobileWorkspaceSwitcherHeader-CuGJ31kb.js} +1 -1
  13. package/dist/public/assets/{RelayConnectEntryPage-CgMvVZwa.js → RelayConnectEntryPage-BB6DbGtP.js} +1 -1
  14. package/dist/public/assets/{ServerSettingsModal-CFul__z1.js → ServerSettingsModal-Bl1sacZg.js} +1 -1
  15. package/dist/public/assets/{SessionIndexPage-B-tRhBXC.js → SessionIndexPage-NbF9gJnp.js} +1 -1
  16. package/dist/public/assets/SettingsPage-DGsmQpLv.js +1 -0
  17. package/dist/public/assets/{TerminalManagerPanel-BbORd-ee.js → TerminalManagerPanel-BOm8Hi_v.js} +1 -1
  18. package/dist/public/assets/{TerminalPage-DWHv6mlu.js → TerminalPage-B5JNFU6w.js} +19 -19
  19. package/dist/public/assets/{TerminalRuntimeFallbackModal-B29YxbQe.js → TerminalRuntimeFallbackModal-CM3LRKOJ.js} +1 -1
  20. package/dist/public/assets/{ToolFilesPage-Dx9cv9hu.js → ToolFilesPage-GSqKQsj_.js} +1 -1
  21. package/dist/public/assets/{ToolGitPage-D7H3vAia.js → ToolGitPage-BVFWMMQp.js} +1 -1
  22. package/dist/public/assets/{ToolProcessesPage-PqQWxsy-.js → ToolProcessesPage-DZ456fYz.js} +1 -1
  23. package/dist/public/assets/{ToolsHomePage-CX05Pe_4.js → ToolsHomePage-DsJp0y8A.js} +1 -1
  24. package/dist/public/assets/{WorkbenchLandingPage-CchkAC75.js → WorkbenchLandingPage-DyPei0e-.js} +1 -1
  25. package/dist/public/assets/WorkbenchLayout-DlbgBT3n.js +4 -0
  26. package/dist/public/assets/WorkbenchModal-LNfB69qx.js +1 -0
  27. package/dist/public/assets/WorkbenchShellRoute-BsxumYx5.js +1 -0
  28. package/dist/public/assets/{WorkbenchShellRoute-RGZpA0_J.css → WorkbenchShellRoute-DhQo_0vu.css} +1 -1
  29. package/dist/public/assets/{WorkspaceDebugDetailPage-Deqy2_pO.js → WorkspaceDebugDetailPage-CaXj5zVI.js} +1 -1
  30. package/dist/public/assets/{WorkspaceDetailPage-Cvf-ZdlB.js → WorkspaceDetailPage-DOexuuaw.js} +1 -1
  31. package/dist/public/assets/{WorkspaceHomePage-Dsyvqyk1.js → WorkspaceHomePage-DkCHNjKD.js} +1 -1
  32. package/dist/public/assets/{client-runtime-manager-DROQJ9v3.js → client-runtime-manager-6OoYHXGd.js} +1 -1
  33. package/dist/public/assets/{file-tree-icon-Bp3Ntt7u.js → file-tree-icon-9pt1OStn.js} +1 -1
  34. package/dist/public/assets/index-BwlbvwaA.css +1 -0
  35. package/dist/public/assets/index-DSw-TkQL.js +42 -0
  36. package/dist/public/assets/{login-direct-candidate-resolver-DotM530R.js → login-direct-candidate-resolver-CLlYtBRq.js} +1 -1
  37. package/dist/public/assets/model-switch-api-C-l8-E1S.js +1 -0
  38. package/dist/public/assets/{preferences-service-BG6GKG29.js → preferences-service-BCcfYP_d.js} +1 -1
  39. package/dist/public/assets/{relay-entry-pmr-c42O.js → relay-entry-BmLkMKuq.js} +1 -1
  40. package/dist/public/assets/session-runtime-machine-DgtvREca.js +21 -0
  41. package/dist/public/assets/{terminal-runtime-meta-8_uRZf7h.js → terminal-runtime-meta-0h-75uRy.js} +1 -1
  42. package/dist/public/assets/{useRegisteredDebugTemplates-DWX7LXQu.js → useRegisteredDebugTemplates-rBVmAqh3.js} +1 -1
  43. package/dist/public/index.html +2 -2
  44. package/dist/server/modules/assistant-capability/assistant-capability-service.d.ts +4 -1
  45. package/dist/server/modules/assistant-capability/assistant-capability-service.js +12 -1
  46. package/dist/server/modules/assistant-capability/assistant-capability-service.js.map +1 -1
  47. package/dist/server/modules/butler/butler-control-session-service.d.ts +4 -1
  48. package/dist/server/modules/butler/butler-control-session-service.js +17 -1
  49. package/dist/server/modules/butler/butler-control-session-service.js.map +1 -1
  50. package/dist/server/modules/butler/butler-profile-service.d.ts +3 -1
  51. package/dist/server/modules/butler/butler-profile-service.js +16 -4
  52. package/dist/server/modules/butler/butler-profile-service.js.map +1 -1
  53. package/dist/server/modules/opencli/opencli-bridge-skill-service.d.ts +12 -0
  54. package/dist/server/modules/opencli/opencli-bridge-skill-service.js +124 -0
  55. package/dist/server/modules/opencli/opencli-bridge-skill-service.js.map +1 -0
  56. package/dist/server/modules/opencli/opencli-catalog-service.d.ts +50 -0
  57. package/dist/server/modules/opencli/opencli-catalog-service.js +345 -0
  58. package/dist/server/modules/opencli/opencli-catalog-service.js.map +1 -0
  59. package/dist/server/modules/opencli/opencli-controller.d.ts +13 -0
  60. package/dist/server/modules/opencli/opencli-controller.js +30 -0
  61. package/dist/server/modules/opencli/opencli-controller.js.map +1 -0
  62. package/dist/server/modules/opencli/opencli-health-service.d.ts +28 -0
  63. package/dist/server/modules/opencli/opencli-health-service.js +106 -0
  64. package/dist/server/modules/opencli/opencli-health-service.js.map +1 -0
  65. package/dist/server/modules/opencli/opencli-install-discovery.d.ts +23 -0
  66. package/dist/server/modules/opencli/opencli-install-discovery.js +130 -0
  67. package/dist/server/modules/opencli/opencli-install-discovery.js.map +1 -0
  68. package/dist/server/modules/opencli/opencli-management-service.d.ts +59 -0
  69. package/dist/server/modules/opencli/opencli-management-service.js +152 -0
  70. package/dist/server/modules/opencli/opencli-management-service.js.map +1 -0
  71. package/dist/server/modules/opencli/opencli-runtime-builder.d.ts +11 -0
  72. package/dist/server/modules/opencli/opencli-runtime-builder.js +214 -0
  73. package/dist/server/modules/opencli/opencli-runtime-builder.js.map +1 -0
  74. package/dist/server/modules/opencli/opencli-runtime-layout.d.ts +3 -0
  75. package/dist/server/modules/opencli/opencli-runtime-layout.js +11 -0
  76. package/dist/server/modules/opencli/opencli-runtime-layout.js.map +1 -0
  77. package/dist/server/modules/opencli/opencli-runtime-profile-service.d.ts +29 -0
  78. package/dist/server/modules/opencli/opencli-runtime-profile-service.js +104 -0
  79. package/dist/server/modules/opencli/opencli-runtime-profile-service.js.map +1 -0
  80. package/dist/server/modules/opencli/opencli-runtime-resolver.d.ts +29 -0
  81. package/dist/server/modules/opencli/opencli-runtime-resolver.js +110 -0
  82. package/dist/server/modules/opencli/opencli-runtime-resolver.js.map +1 -0
  83. package/dist/server/modules/opencli/opencli-session-prompt-service.d.ts +11 -0
  84. package/dist/server/modules/opencli/opencli-session-prompt-service.js +66 -0
  85. package/dist/server/modules/opencli/opencli-session-prompt-service.js.map +1 -0
  86. package/dist/server/modules/provider/provider-catalog-service.d.ts +46 -0
  87. package/dist/server/modules/provider/provider-catalog-service.js +249 -0
  88. package/dist/server/modules/provider/provider-catalog-service.js.map +1 -0
  89. package/dist/server/modules/provider/provider-controller.d.ts +15 -2
  90. package/dist/server/modules/provider/provider-controller.js +44 -6
  91. package/dist/server/modules/provider/provider-controller.js.map +1 -1
  92. package/dist/server/modules/provider/provider-disabled.d.ts +8 -0
  93. package/dist/server/modules/provider/provider-disabled.js +45 -0
  94. package/dist/server/modules/provider/provider-disabled.js.map +1 -0
  95. package/dist/server/modules/provider/provider-discovery-helper-client.d.ts +1 -0
  96. package/dist/server/modules/provider/provider-discovery-helper-client.js.map +1 -1
  97. package/dist/server/modules/provider/provider-discovery-helper-process.js +3 -3
  98. package/dist/server/modules/provider/provider-discovery-helper-process.js.map +1 -1
  99. package/dist/server/modules/provider/provider-discovery-runtime.d.ts +1 -1
  100. package/dist/server/modules/provider/provider-discovery-runtime.js +12 -8
  101. package/dist/server/modules/provider/provider-discovery-runtime.js.map +1 -1
  102. package/dist/server/modules/sessions/claude-compatible-provider-registry.d.ts +16 -0
  103. package/dist/server/modules/sessions/claude-compatible-provider-registry.js +91 -0
  104. package/dist/server/modules/sessions/claude-compatible-provider-registry.js.map +1 -0
  105. package/dist/server/modules/sessions/session-history-service.d.ts +7 -1
  106. package/dist/server/modules/sessions/session-history-service.js +49 -16
  107. package/dist/server/modules/sessions/session-history-service.js.map +1 -1
  108. package/dist/server/modules/sessions/session-live-runtime-router-service.js +9 -4
  109. package/dist/server/modules/sessions/session-live-runtime-router-service.js.map +1 -1
  110. package/dist/server/modules/sessions/session-live-runtime-service.d.ts +8 -4
  111. package/dist/server/modules/sessions/session-live-runtime-service.js +100 -87
  112. package/dist/server/modules/sessions/session-live-runtime-service.js.map +1 -1
  113. package/dist/server/modules/sessions/session-permission-request-service.d.ts +5 -2
  114. package/dist/server/modules/sessions/session-permission-request-service.js +26 -27
  115. package/dist/server/modules/sessions/session-permission-request-service.js.map +1 -1
  116. package/dist/server/modules/sessions/session-provider-config-service.d.ts +17 -1
  117. package/dist/server/modules/sessions/session-provider-config-service.js +121 -17
  118. package/dist/server/modules/sessions/session-provider-config-service.js.map +1 -1
  119. package/dist/server/modules/skills/skill-manager-service.d.ts +5 -0
  120. package/dist/server/modules/skills/skill-manager-service.js +26 -0
  121. package/dist/server/modules/skills/skill-manager-service.js.map +1 -1
  122. package/dist/server/modules/tasks/task-helper-process-handlers.d.ts +1 -0
  123. package/dist/server/modules/tasks/task-helper-process-handlers.js +1 -1
  124. package/dist/server/modules/tasks/task-helper-process-handlers.js.map +1 -1
  125. package/dist/server/routes/opencli.d.ts +3 -0
  126. package/dist/server/routes/opencli.js +7 -0
  127. package/dist/server/routes/opencli.js.map +1 -0
  128. package/dist/server/routes/providers.js +4 -2
  129. package/dist/server/routes/providers.js.map +1 -1
  130. package/dist/server/server/create-server.d.ts +8 -0
  131. package/dist/server/server/create-server.js +44 -11
  132. package/dist/server/server/create-server.js.map +1 -1
  133. package/dist/server/storage/repositories/opencli-catalog-entry-repository.d.ts +9 -0
  134. package/dist/server/storage/repositories/opencli-catalog-entry-repository.js +85 -0
  135. package/dist/server/storage/repositories/opencli-catalog-entry-repository.js.map +1 -0
  136. package/dist/server/storage/repositories/opencli-provider-repository.d.ts +8 -0
  137. package/dist/server/storage/repositories/opencli-provider-repository.js +88 -0
  138. package/dist/server/storage/repositories/opencli-provider-repository.js.map +1 -0
  139. package/dist/server/storage/repositories/opencli-runtime-profile-repository.d.ts +11 -0
  140. package/dist/server/storage/repositories/opencli-runtime-profile-repository.js +127 -0
  141. package/dist/server/storage/repositories/opencli-runtime-profile-repository.js.map +1 -0
  142. package/dist/server/storage/repositories/provider-control-repository.d.ts +9 -0
  143. package/dist/server/storage/repositories/provider-control-repository.js +51 -0
  144. package/dist/server/storage/repositories/provider-control-repository.js.map +1 -0
  145. package/dist/server/storage/sqlite/client.js +53 -0
  146. package/dist/server/storage/sqlite/client.js.map +1 -1
  147. package/dist/server/storage/sqlite/schema.sql +66 -0
  148. package/dist/server/types/domain.d.ts +50 -0
  149. package/node_modules/@codingns/session-sync-core/dist/runtime/legna-runtime.d.ts +5 -0
  150. package/node_modules/@codingns/session-sync-core/dist/runtime/legna-runtime.js +1 -1
  151. package/node_modules/@codingns/session-sync-core/dist/runtime/legna-runtime.js.map +1 -1
  152. package/package.json +1 -1
  153. package/dist/public/assets/AdaptiveButlerPage-Dw72U3hG.js +0 -3
  154. package/dist/public/assets/ConversationPage-8wOY7SX-.js +0 -4
  155. package/dist/public/assets/SettingsPage-C9LGxSQZ.js +0 -1
  156. package/dist/public/assets/WorkbenchLayout-pOZvEqp7.js +0 -3
  157. package/dist/public/assets/WorkbenchModal-ColqvV6a.js +0 -1
  158. package/dist/public/assets/WorkbenchShellRoute-C0_h4lP6.js +0 -1
  159. package/dist/public/assets/index-B84Po2NA.css +0 -1
  160. package/dist/public/assets/index-C-0oeG_5.js +0 -42
  161. package/dist/public/assets/model-switch-api-Bh9nYslz.js +0 -1
  162. package/dist/public/assets/session-runtime-machine-YN84QBlr.js +0 -21
@@ -1 +1 @@
1
- import{b as c,j as e,t as s}from"./index-C-0oeG_5.js";import{j as $,u as q,b as R,f as z,k as H,r as _,a as L,D as J,h as T,d as y,e as A,l as K,m as Q,c as U,g as X,i as Y}from"./useRegisteredDebugTemplates-DWX7LXQu.js";import{u as Z,t as ee,s as se}from"./WorkbenchLayout-pOZvEqp7.js";import{c as C}from"./model-switch-api-Bh9nYslz.js";import{g as I,r as ae}from"./terminal-runtime-meta-8_uRZf7h.js";import{c as le,u as te,f as ne}from"./App-Dsf3ooXU.js";import"./window-BVUB8gMK.js";import"./event-DvH9tcej.js";import"./WorkbenchModal-ColqvV6a.js";import"./relay-entry-pmr-c42O.js";function be(){var S;const{workspaceId:u=""}=le(),j=te(),{showToast:d}=ne(),{navigationGroups:E,selectWorkspace:f}=Z(),r=((S=E.find(a=>a.workspace.id===u))==null?void 0:S.workspace)??null,[h,m]=c.useState(null),[N,o]=c.useState(null),[n,k]=c.useState(null),w=c.useRef(null);c.useEffect(()=>{u&&f(u)},[f,u]);const P=c.useMemo(()=>r?{id:r.id,path:r.path,name:r.name}:null,[r]),l=$(P),b=q(P),g=c.useMemo(()=>n??R(l.templates,l.runtimeStatuses),[n,l.runtimeStatuses,l.templates]),M=c.useMemo(()=>(n==null?void 0:n.items.some(a=>{var t;return(t=a.planItem)==null?void 0:t.missingRequirements.includes("service_discovery")}))??!1,[n]),O=c.useMemo(()=>new Map(l.runtimeStatuses.map(a=>[a.templateId,a])),[l.runtimeStatuses]);if(c.useEffect(()=>{!n||!w.current||typeof w.current.scrollIntoView=="function"&&w.current.scrollIntoView({behavior:"smooth",block:"start"})},[n]),!r)return e.jsx("main",{className:"workbench-page conversation-page-shell debug-readiness-page-shell",children:e.jsxs("div",{className:"workbench-empty-guide surface-card",children:[e.jsx("h1",{children:s("shell.workspaceDetailMissingTitle")}),e.jsx("p",{children:s("shell.workspaceDetailMissingBody")})]})});return e.jsx("main",{className:"workbench-page conversation-page-shell debug-readiness-page-shell",children:e.jsxs("div",{className:"debug-readiness-page",children:[e.jsxs("section",{className:"debug-readiness-hero surface-card",children:[e.jsx("div",{className:"debug-readiness-hero-header",children:e.jsxs("div",{className:"debug-readiness-hero-copy",children:[e.jsx("h2",{children:s("shell.workspaceDetailDebugPageTitle")}),e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugPageDescription")})]})}),e.jsxs("div",{className:"debug-readiness-hero-toolbar",children:[e.jsxs("div",{className:"workbench-modal-actions",children:[e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>j(ee(r.id)),children:s("shell.goBack")}),e.jsx("button",{type:"button",className:"secondary-button",disabled:h!==null,onClick:()=>{B()},children:h==="sync"?s("shell.workspaceDetailRegisteredDebugActionSyncingTemplates"):s("shell.workspaceDetailRegisteredDebugActionSyncTemplates")}),e.jsx("button",{type:"button",className:"secondary-button",disabled:h!==null,onClick:()=>{F()},children:h==="plan"?s("shell.workspaceDetailDebugActionPlanning"):s("shell.workspaceDetailDebugActionPlan")}),e.jsx("button",{type:"button",className:"primary-button",disabled:h!==null,onClick:()=>{W()},children:h==="run"?s("shell.workspaceDetailRegisteredDebugActionRunningRegistered"):s("shell.workspaceDetailRegisteredDebugActionRunRegistered")}),e.jsx("button",{type:"button",className:"secondary-button",disabled:h!==null,onClick:()=>{V()},children:h==="refresh"?s("shell.workspaceDetailDebugActionRefreshing"):s("shell.workspaceDetailDebugActionRefresh")})]}),N?e.jsx("p",{className:"workbench-manage-status status-text","data-tone":"error",children:N}):null]}),e.jsxs("div",{className:"debug-readiness-summary-grid debug-readiness-summary-grid-hero",children:[e.jsxs("article",{className:"debug-readiness-summary-card","data-tone":_(g,l.templates.length),children:[e.jsx("span",{children:s("shell.workspaceDetailDebugOverallStatusLabel")}),e.jsx("strong",{children:z(g,l.templates.length)}),e.jsx("small",{children:H(g,l.templates.length)})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRegisteredCountLabel")}),e.jsx("strong",{children:l.templates.length})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryConfiguredPortLabel")}),e.jsx("strong",{children:l.templates.filter(a=>a.port!==null).length}),e.jsx("small",{children:s("shell.workspaceDetailRegisteredDebugRuntimeScopeNote")})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRunnableCountLabel")}),e.jsx("strong",{children:g.runnableCount})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryOrchestratedCountLabel")}),e.jsx("strong",{children:g.orchestratedCount})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryBlockedCountLabel")}),e.jsx("strong",{children:g.blockedCount})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryLastRefreshLabel")}),e.jsx("strong",{children:L(l.lastRefreshedAt)}),e.jsx("small",{children:r.path})]})]})]}),e.jsx(J,{workspace:{id:r.id,path:r.path,name:r.name},state:b,variant:"page"}),n?e.jsxs("section",{ref:w,className:"debug-readiness-section surface-card",children:[e.jsxs("div",{className:"debug-readiness-section-header",children:[e.jsxs("div",{children:[e.jsx("h3",{children:s("shell.workspaceDetailDebugLaunchPlanTitle")}),e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanDescription")})]}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>k(null),children:s("shell.workspaceDetailDebugLaunchPlanDismissAction")})]}),e.jsxs("div",{className:"workbench-manage-kv-list",children:[e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanGeneratedAtLabel")}),e.jsx("span",{children:L(n.generatedAt)})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailDebugLaunchPlanAutoStartLabel")}),e.jsx("span",{children:n.autoStartAllowed?s("shell.workspaceDetailDebugLaunchPlanAutoStartAllowed"):s("shell.workspaceDetailDebugLaunchPlanAutoStartBlocked")})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanRunnableLabel")}),e.jsx("span",{children:n.runnableCount})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanOrchestratedLabel")}),e.jsx("span",{children:n.orchestratedCount})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanBlockedLabel")}),e.jsx("span",{children:n.blockedCount})]})]}),e.jsx("p",{className:"workbench-manage-hint",children:s("shell.workspaceDetailRegisteredDebugLaunchPlanNote")}),M?e.jsx("p",{className:"workbench-manage-hint",children:s("shell.workspaceDetailRegisteredDebugLaunchPlanServiceDiscoveryHelp")}):null,n.items.length>0?e.jsx("div",{className:"debug-readiness-runtime-list",children:n.items.map(a=>e.jsxs("article",{className:"debug-readiness-runtime-item",children:[e.jsxs("div",{className:"debug-readiness-runtime-item-header",children:[e.jsx("strong",{children:a.template.name}),e.jsx("span",{children:T(a.template)})]}),e.jsxs("div",{className:"debug-readiness-runtime-item-grid",children:[e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePathLabel")}),e.jsx("strong",{title:a.template.cwd,children:y(a.template.cwd,r.path)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePortLabel")}),e.jsx("strong",{children:A(a.assignedPort)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemRuntimeLabel")}),e.jsx("strong",{children:I(a.template.runtimeType)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemActionLabel")}),e.jsx("strong",{children:K(a.decision)})]})]}),e.jsxs("p",{className:"workbench-manage-hint",children:[s("shell.workspaceDetailRegisteredDebugPlanItemReasonLabel"),": ",a.reason]})]},a.template.id))}):e.jsx("p",{className:"workbench-section-empty",children:s("shell.workspaceDetailRegisteredDebugTemplatesEmpty")})]}):null,e.jsxs("section",{className:"debug-readiness-section surface-card",children:[e.jsxs("div",{className:"debug-readiness-section-header",children:[e.jsxs("div",{children:[e.jsx("h3",{children:s("shell.workspaceDetailRegisteredDebugTemplatesTitle")}),e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugTemplatesDescription")})]}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>j(se(r.id)),children:s("shell.workspaceDetailRegisteredDebugOpenProcessManagerAction")})]}),l.loading&&l.templates.length===0?e.jsx("p",{className:"workbench-section-empty",children:s("common.loading")}):null,l.error&&l.templates.length===0?e.jsx("p",{className:"workbench-manage-status status-text","data-tone":"error",children:l.error}):null,!l.loading&&l.templates.length===0?e.jsx("p",{className:"workbench-section-empty",children:s("shell.workspaceDetailRegisteredDebugTemplatesEmpty")}):null,l.templates.length>0?e.jsx("div",{className:"debug-readiness-service-grid",children:l.templates.map(a=>{const t=O.get(a.id)??null,p=Q(a,t);return e.jsxs("article",{className:"debug-readiness-service-card",children:[e.jsxs("div",{className:"debug-readiness-service-card-header",children:[e.jsxs("div",{children:[e.jsx("strong",{children:a.name}),e.jsx("p",{title:a.cwd,children:y(a.cwd,r.path)})]}),e.jsx("span",{className:"debug-readiness-chip","data-tone":p,children:U(a,t)})]}),e.jsxs("div",{className:"debug-readiness-service-card-grid",children:[e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePathLabel")}),e.jsx("strong",{title:a.cwd,children:y(a.cwd,r.path)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePortLabel")}),e.jsx("strong",{children:A(a.port)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplateRuntimeTypeLabel")}),e.jsx("strong",{children:I(a.runtimeType)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugRuntimeProcessLabel")}),e.jsx("strong",{children:X(t)})]})]}),e.jsxs("div",{className:"debug-readiness-service-card-list",children:[e.jsxs("p",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemCommandLabel")}),e.jsx("strong",{children:T(a)})]}),e.jsxs("p",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemReasonLabel")}),e.jsx("strong",{children:Y(a,t)})]})]})]},a.id)})}):null]})]})});async function B(){m("sync"),o(null);try{await l.refreshAll(),k(null),d({title:s("shell.workspaceDetailRegisteredDebugActionSyncTemplatesSuccess"),tone:"success"})}catch(a){const t=x(a,s("shell.workspaceDetailRegisteredDebugActionSyncTemplatesFailed"));o(t),d({title:t,tone:"error"})}finally{m(null)}}async function F(){m("plan"),o(null);try{if(!b.targetId)throw new Error(s("shell.workspaceDetailDebugActionTargetMissing"));const a=await C(b.targetId),t=R(l.templates,l.runtimeStatuses,a);k(t),d({title:s("shell.workspaceDetailDebugActionPlanSuccess"),tone:"info"})}catch(a){const t=x(a,s("shell.workspaceDetailDebugActionPlanFailed"));o(t),d({title:t,tone:"error"})}finally{m(null)}}async function W(){var a,t;m("run"),o(null);try{const p=n??(b.targetId?R(l.templates,l.runtimeStatuses,await C(b.targetId)):R(l.templates,l.runtimeStatuses));k(p);const D=p.items.filter(i=>i.decision!=="blocked");if(D.length===0){const i=s("shell.workspaceDetailRegisteredDebugActionRunRegisteredSkipped");o(i),d({title:i,tone:"info"});return}const v=[];for(const i of D)try{await ae(i.template.id,{runtimeType:i.template.runtimeType??void 0,argsOverride:(a=i.planItem)==null?void 0:a.args,envPatch:(t=i.planItem)==null?void 0:t.envPatch,portOverride:i.assignedPort})}catch(G){v.push(`${i.template.name}: ${x(G,s("shell.workspaceDetailRegisteredDebugActionRunRegisteredFailed"))}`)}if(await l.refreshRuntime(),v.length>0)throw new Error(v.join(";"));d({title:s("shell.workspaceDetailRegisteredDebugActionRunRegisteredSuccess"),tone:"success"})}catch(p){const D=x(p,s("shell.workspaceDetailRegisteredDebugActionRunRegisteredFailed"));o(D),d({title:D,tone:"error"})}finally{m(null)}}async function V(){m("refresh"),o(null);try{await l.refreshRuntime(),d({title:s("shell.workspaceDetailDebugActionRefreshSuccess"),tone:"success"})}catch(a){const t=x(a,s("shell.workspaceDetailRegisteredDebugActionRefreshFailed"));o(t),d({title:t,tone:"error"})}finally{m(null)}}}function x(u,j){return u instanceof Error&&u.message.trim()?u.message:j}export{be as WorkspaceDebugDetailPage};
1
+ import{b as c,j as e,t as s}from"./index-DSw-TkQL.js";import{j as $,u as q,b as R,f as z,k as H,r as _,a as L,D as J,h as T,d as y,e as A,l as K,m as Q,c as U,g as X,i as Y}from"./useRegisteredDebugTemplates-rBVmAqh3.js";import{u as Z,t as ee,s as se}from"./WorkbenchLayout-DlbgBT3n.js";import{c as C}from"./model-switch-api-C-l8-E1S.js";import{g as I,r as ae}from"./terminal-runtime-meta-0h-75uRy.js";import{c as le,u as te,f as ne}from"./App-B9HcTkMT.js";import"./window-BVUB8gMK.js";import"./event-DvH9tcej.js";import"./WorkbenchModal-LNfB69qx.js";import"./relay-entry-BmLkMKuq.js";function be(){var S;const{workspaceId:u=""}=le(),j=te(),{showToast:d}=ne(),{navigationGroups:E,selectWorkspace:f}=Z(),r=((S=E.find(a=>a.workspace.id===u))==null?void 0:S.workspace)??null,[h,m]=c.useState(null),[N,o]=c.useState(null),[n,k]=c.useState(null),w=c.useRef(null);c.useEffect(()=>{u&&f(u)},[f,u]);const P=c.useMemo(()=>r?{id:r.id,path:r.path,name:r.name}:null,[r]),l=$(P),b=q(P),g=c.useMemo(()=>n??R(l.templates,l.runtimeStatuses),[n,l.runtimeStatuses,l.templates]),M=c.useMemo(()=>(n==null?void 0:n.items.some(a=>{var t;return(t=a.planItem)==null?void 0:t.missingRequirements.includes("service_discovery")}))??!1,[n]),O=c.useMemo(()=>new Map(l.runtimeStatuses.map(a=>[a.templateId,a])),[l.runtimeStatuses]);if(c.useEffect(()=>{!n||!w.current||typeof w.current.scrollIntoView=="function"&&w.current.scrollIntoView({behavior:"smooth",block:"start"})},[n]),!r)return e.jsx("main",{className:"workbench-page conversation-page-shell debug-readiness-page-shell",children:e.jsxs("div",{className:"workbench-empty-guide surface-card",children:[e.jsx("h1",{children:s("shell.workspaceDetailMissingTitle")}),e.jsx("p",{children:s("shell.workspaceDetailMissingBody")})]})});return e.jsx("main",{className:"workbench-page conversation-page-shell debug-readiness-page-shell",children:e.jsxs("div",{className:"debug-readiness-page",children:[e.jsxs("section",{className:"debug-readiness-hero surface-card",children:[e.jsx("div",{className:"debug-readiness-hero-header",children:e.jsxs("div",{className:"debug-readiness-hero-copy",children:[e.jsx("h2",{children:s("shell.workspaceDetailDebugPageTitle")}),e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugPageDescription")})]})}),e.jsxs("div",{className:"debug-readiness-hero-toolbar",children:[e.jsxs("div",{className:"workbench-modal-actions",children:[e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>j(ee(r.id)),children:s("shell.goBack")}),e.jsx("button",{type:"button",className:"secondary-button",disabled:h!==null,onClick:()=>{B()},children:h==="sync"?s("shell.workspaceDetailRegisteredDebugActionSyncingTemplates"):s("shell.workspaceDetailRegisteredDebugActionSyncTemplates")}),e.jsx("button",{type:"button",className:"secondary-button",disabled:h!==null,onClick:()=>{F()},children:h==="plan"?s("shell.workspaceDetailDebugActionPlanning"):s("shell.workspaceDetailDebugActionPlan")}),e.jsx("button",{type:"button",className:"primary-button",disabled:h!==null,onClick:()=>{W()},children:h==="run"?s("shell.workspaceDetailRegisteredDebugActionRunningRegistered"):s("shell.workspaceDetailRegisteredDebugActionRunRegistered")}),e.jsx("button",{type:"button",className:"secondary-button",disabled:h!==null,onClick:()=>{V()},children:h==="refresh"?s("shell.workspaceDetailDebugActionRefreshing"):s("shell.workspaceDetailDebugActionRefresh")})]}),N?e.jsx("p",{className:"workbench-manage-status status-text","data-tone":"error",children:N}):null]}),e.jsxs("div",{className:"debug-readiness-summary-grid debug-readiness-summary-grid-hero",children:[e.jsxs("article",{className:"debug-readiness-summary-card","data-tone":_(g,l.templates.length),children:[e.jsx("span",{children:s("shell.workspaceDetailDebugOverallStatusLabel")}),e.jsx("strong",{children:z(g,l.templates.length)}),e.jsx("small",{children:H(g,l.templates.length)})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRegisteredCountLabel")}),e.jsx("strong",{children:l.templates.length})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryConfiguredPortLabel")}),e.jsx("strong",{children:l.templates.filter(a=>a.port!==null).length}),e.jsx("small",{children:s("shell.workspaceDetailRegisteredDebugRuntimeScopeNote")})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRunnableCountLabel")}),e.jsx("strong",{children:g.runnableCount})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryOrchestratedCountLabel")}),e.jsx("strong",{children:g.orchestratedCount})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryBlockedCountLabel")}),e.jsx("strong",{children:g.blockedCount})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryLastRefreshLabel")}),e.jsx("strong",{children:L(l.lastRefreshedAt)}),e.jsx("small",{children:r.path})]})]})]}),e.jsx(J,{workspace:{id:r.id,path:r.path,name:r.name},state:b,variant:"page"}),n?e.jsxs("section",{ref:w,className:"debug-readiness-section surface-card",children:[e.jsxs("div",{className:"debug-readiness-section-header",children:[e.jsxs("div",{children:[e.jsx("h3",{children:s("shell.workspaceDetailDebugLaunchPlanTitle")}),e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanDescription")})]}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>k(null),children:s("shell.workspaceDetailDebugLaunchPlanDismissAction")})]}),e.jsxs("div",{className:"workbench-manage-kv-list",children:[e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanGeneratedAtLabel")}),e.jsx("span",{children:L(n.generatedAt)})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailDebugLaunchPlanAutoStartLabel")}),e.jsx("span",{children:n.autoStartAllowed?s("shell.workspaceDetailDebugLaunchPlanAutoStartAllowed"):s("shell.workspaceDetailDebugLaunchPlanAutoStartBlocked")})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanRunnableLabel")}),e.jsx("span",{children:n.runnableCount})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanOrchestratedLabel")}),e.jsx("span",{children:n.orchestratedCount})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanBlockedLabel")}),e.jsx("span",{children:n.blockedCount})]})]}),e.jsx("p",{className:"workbench-manage-hint",children:s("shell.workspaceDetailRegisteredDebugLaunchPlanNote")}),M?e.jsx("p",{className:"workbench-manage-hint",children:s("shell.workspaceDetailRegisteredDebugLaunchPlanServiceDiscoveryHelp")}):null,n.items.length>0?e.jsx("div",{className:"debug-readiness-runtime-list",children:n.items.map(a=>e.jsxs("article",{className:"debug-readiness-runtime-item",children:[e.jsxs("div",{className:"debug-readiness-runtime-item-header",children:[e.jsx("strong",{children:a.template.name}),e.jsx("span",{children:T(a.template)})]}),e.jsxs("div",{className:"debug-readiness-runtime-item-grid",children:[e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePathLabel")}),e.jsx("strong",{title:a.template.cwd,children:y(a.template.cwd,r.path)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePortLabel")}),e.jsx("strong",{children:A(a.assignedPort)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemRuntimeLabel")}),e.jsx("strong",{children:I(a.template.runtimeType)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemActionLabel")}),e.jsx("strong",{children:K(a.decision)})]})]}),e.jsxs("p",{className:"workbench-manage-hint",children:[s("shell.workspaceDetailRegisteredDebugPlanItemReasonLabel"),": ",a.reason]})]},a.template.id))}):e.jsx("p",{className:"workbench-section-empty",children:s("shell.workspaceDetailRegisteredDebugTemplatesEmpty")})]}):null,e.jsxs("section",{className:"debug-readiness-section surface-card",children:[e.jsxs("div",{className:"debug-readiness-section-header",children:[e.jsxs("div",{children:[e.jsx("h3",{children:s("shell.workspaceDetailRegisteredDebugTemplatesTitle")}),e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugTemplatesDescription")})]}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>j(se(r.id)),children:s("shell.workspaceDetailRegisteredDebugOpenProcessManagerAction")})]}),l.loading&&l.templates.length===0?e.jsx("p",{className:"workbench-section-empty",children:s("common.loading")}):null,l.error&&l.templates.length===0?e.jsx("p",{className:"workbench-manage-status status-text","data-tone":"error",children:l.error}):null,!l.loading&&l.templates.length===0?e.jsx("p",{className:"workbench-section-empty",children:s("shell.workspaceDetailRegisteredDebugTemplatesEmpty")}):null,l.templates.length>0?e.jsx("div",{className:"debug-readiness-service-grid",children:l.templates.map(a=>{const t=O.get(a.id)??null,p=Q(a,t);return e.jsxs("article",{className:"debug-readiness-service-card",children:[e.jsxs("div",{className:"debug-readiness-service-card-header",children:[e.jsxs("div",{children:[e.jsx("strong",{children:a.name}),e.jsx("p",{title:a.cwd,children:y(a.cwd,r.path)})]}),e.jsx("span",{className:"debug-readiness-chip","data-tone":p,children:U(a,t)})]}),e.jsxs("div",{className:"debug-readiness-service-card-grid",children:[e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePathLabel")}),e.jsx("strong",{title:a.cwd,children:y(a.cwd,r.path)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePortLabel")}),e.jsx("strong",{children:A(a.port)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplateRuntimeTypeLabel")}),e.jsx("strong",{children:I(a.runtimeType)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugRuntimeProcessLabel")}),e.jsx("strong",{children:X(t)})]})]}),e.jsxs("div",{className:"debug-readiness-service-card-list",children:[e.jsxs("p",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemCommandLabel")}),e.jsx("strong",{children:T(a)})]}),e.jsxs("p",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemReasonLabel")}),e.jsx("strong",{children:Y(a,t)})]})]})]},a.id)})}):null]})]})});async function B(){m("sync"),o(null);try{await l.refreshAll(),k(null),d({title:s("shell.workspaceDetailRegisteredDebugActionSyncTemplatesSuccess"),tone:"success"})}catch(a){const t=x(a,s("shell.workspaceDetailRegisteredDebugActionSyncTemplatesFailed"));o(t),d({title:t,tone:"error"})}finally{m(null)}}async function F(){m("plan"),o(null);try{if(!b.targetId)throw new Error(s("shell.workspaceDetailDebugActionTargetMissing"));const a=await C(b.targetId),t=R(l.templates,l.runtimeStatuses,a);k(t),d({title:s("shell.workspaceDetailDebugActionPlanSuccess"),tone:"info"})}catch(a){const t=x(a,s("shell.workspaceDetailDebugActionPlanFailed"));o(t),d({title:t,tone:"error"})}finally{m(null)}}async function W(){var a,t;m("run"),o(null);try{const p=n??(b.targetId?R(l.templates,l.runtimeStatuses,await C(b.targetId)):R(l.templates,l.runtimeStatuses));k(p);const D=p.items.filter(i=>i.decision!=="blocked");if(D.length===0){const i=s("shell.workspaceDetailRegisteredDebugActionRunRegisteredSkipped");o(i),d({title:i,tone:"info"});return}const v=[];for(const i of D)try{await ae(i.template.id,{runtimeType:i.template.runtimeType??void 0,argsOverride:(a=i.planItem)==null?void 0:a.args,envPatch:(t=i.planItem)==null?void 0:t.envPatch,portOverride:i.assignedPort})}catch(G){v.push(`${i.template.name}: ${x(G,s("shell.workspaceDetailRegisteredDebugActionRunRegisteredFailed"))}`)}if(await l.refreshRuntime(),v.length>0)throw new Error(v.join(";"));d({title:s("shell.workspaceDetailRegisteredDebugActionRunRegisteredSuccess"),tone:"success"})}catch(p){const D=x(p,s("shell.workspaceDetailRegisteredDebugActionRunRegisteredFailed"));o(D),d({title:D,tone:"error"})}finally{m(null)}}async function V(){m("refresh"),o(null);try{await l.refreshRuntime(),d({title:s("shell.workspaceDetailDebugActionRefreshSuccess"),tone:"success"})}catch(a){const t=x(a,s("shell.workspaceDetailRegisteredDebugActionRefreshFailed"));o(t),d({title:t,tone:"error"})}finally{m(null)}}}function x(u,j){return u instanceof Error&&u.message.trim()?u.message:j}export{be as WorkspaceDebugDetailPage};
@@ -1 +1 @@
1
- import{b as d,j as e,t as s}from"./index-C-0oeG_5.js";import{u as J,b as N,v as Q,x as U,y as Y,o as ee,t as se,z as ae,s as L,A as le,C as ie,c as oe,g as O}from"./WorkbenchLayout-pOZvEqp7.js";import{a as F,r as ne}from"./model-switch-api-Bh9nYslz.js";import{b as te,f as re,a as ce,c as de,d as me,e as he,g as ue,h as pe,i as be,u as je,j as ge,D as xe}from"./useRegisteredDebugTemplates-DWX7LXQu.js";import{g as ke}from"./terminal-runtime-meta-8_uRZf7h.js";import{f as fe,a as ve,M as we}from"./MobileWorkspaceSwitcherHeader-CfUnHgv_.js";import{M as Ne}from"./MobileCreateSessionSheet-DcxKM00P.js";import{c as Ce,u as ye,f as Re}from"./App-Dsf3ooXU.js";import"./window-BVUB8gMK.js";import"./event-DvH9tcej.js";import"./WorkbenchModal-ColqvV6a.js";import"./relay-entry-pmr-c42O.js";import"./MobileTopHeaderFrame-C5rIKQT6.js";function De({workspaceId:a,workspacePath:o,state:t,onOpenProcessManager:b}){const u=d.useMemo(()=>te(t.templates,t.runtimeStatuses),[t.runtimeStatuses,t.templates]),k=d.useMemo(()=>new Map(t.runtimeStatuses.map(c=>[c.templateId,c])),[t.runtimeStatuses]);return e.jsxs("section",{className:"mobile-feature-panel surface-card mobile-workspace-composition-panel",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.workspaceDetailRegisteredDebugTemplatesTitle")})}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>b(a),children:s("shell.workspaceDetailRegisteredDebugOpenProcessManagerAction")})]}),e.jsx("p",{className:"mobile-workspace-composition-note",children:s("shell.workspaceDetailRegisteredDebugTemplatesDescription")}),e.jsxs("div",{className:"mobile-detail-grid mobile-workspace-detail-grid",children:[e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailDebugOverallStatusLabel")}),e.jsx("strong",{children:re(u,t.templates.length)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRegisteredCountLabel")}),e.jsx("strong",{children:t.templates.length})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRunnableCountLabel")}),e.jsx("strong",{children:u.runnableCount})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryOrchestratedCountLabel")}),e.jsx("strong",{children:u.orchestratedCount})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryBlockedCountLabel")}),e.jsx("strong",{children:u.blockedCount})]}),e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryLastRefreshLabel")}),e.jsx("strong",{children:ce(t.lastRefreshedAt)})]})]}),t.loading&&t.templates.length===0?e.jsx("p",{children:s("common.loading")}):null,t.error&&t.templates.length===0?e.jsx("p",{className:"status-text","data-tone":"error",children:t.error}):null,!t.loading&&t.templates.length===0?e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugTemplatesEmpty")}):null,t.templates.length>0?e.jsx("div",{className:"mobile-feature-stack",children:t.templates.map(c=>{const m=k.get(c.id)??null;return e.jsxs("article",{className:"surface-card mobile-session-row",children:[e.jsxs("div",{className:"mobile-session-row-primary mobile-session-row-primary-static",children:[e.jsx("span",{className:"mobile-session-row-title",children:c.name}),e.jsx("span",{className:"mobile-session-row-provider",children:de(c,m)})]}),e.jsxs("div",{className:"mobile-detail-grid mobile-workspace-detail-grid",children:[e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePathLabel")}),e.jsx("strong",{title:c.cwd,children:me(c.cwd,o)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePortLabel")}),e.jsx("strong",{children:he(c.port)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplateRuntimeTypeLabel")}),e.jsx("strong",{children:ke(c.runtimeType)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugRuntimeProcessLabel")}),e.jsx("strong",{children:ue(m)})]}),e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemCommandLabel")}),e.jsx("strong",{children:pe(c)})]}),e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemReasonLabel")}),e.jsx("strong",{children:be(c,m)})]})]})]},c.id)})}):null]})}function We(a){return a.isArchived!==!0&&!O(a)}function Me(a){return a.isArchived===!0&&!O(a)}const C=60*1e3,y=10;function ze(){var E;const{workspaceId:a=""}=Ce(),o=ye(),{showToast:t}=Re(),{navigationGroups:b,currentWorkspaceId:u,favoriteSessionIds:k,workspaceManagementStateById:c,selectWorkspace:m,subscribeGitSnapshot:R,requestGitRefresh:D,subscribeWorkspaceManagementSnapshot:W,requestWorkspaceManagementRefresh:M,toggleFavoriteSession:_,archiveSession:G,unarchiveSession:V,startDraftSession:H}=J(),[S,T]=d.useState(!1),[Z,f]=d.useState(!1),[A,P]=d.useState(y),v=fe(b),h=ve(b,a),i=(h==null?void 0:h.workspace)??null,p=v.find(l=>l.workspace.id===(i==null?void 0:i.id))??(i?{workspace:i,label:i.name,subtitle:i.path}:null),w=d.useMemo(()=>[...(h==null?void 0:h.sessions)??[]].filter(We),[h]),g=d.useMemo(()=>[...(h==null?void 0:h.sessions)??[]].filter(Me),[h]);d.useEffect(()=>{a&&m(a)},[m,a]),d.useEffect(()=>{if(!a)return;const l=N(Ae(a),C),r=N(B(a),C);R(a,{knownRevision:(l==null?void 0:l.revision)??null}),W(a,{knownRevision:(r==null?void 0:r.revision)??null}),l||D(a),r||M(a)},[D,M,R,W,a]),d.useEffect(()=>{P(y)},[a]);const n=d.useMemo(()=>{if(!a)return{loading:!1,error:null,hasMeaningfulSummary:!1,summary:null};const l=N(B(a),C),r=c[a]??null,j=(r==null?void 0:r.detail)??(i?Pe(i,l):l??null);return{loading:(r==null?void 0:r.loading)??!1,error:(r==null?void 0:r.error)??null,hasMeaningfulSummary:Ie(j),summary:j}},[i,a,c]),x=d.useMemo(()=>n.summary?Q(n.summary.codeComposition.items,s("shell.manageWorkspaceCodeCompositionOther")):[],[n.summary]),K=d.useMemo(()=>x.length>0?U(x):void 0,[x]),I=d.useMemo(()=>g.slice(0,A),[g,A]),q=je(i?{id:i.id,path:i.path,name:i.name}:null),$=ge(i?{id:i.id,path:i.path,name:i.name}:null);async function z(){if(!(!i||!(typeof window>"u"||window.confirm(s("shell.manageWorkspaceRemoveConfirmTarget",{name:i.name}))))){T(!0);try{await ne(i.id),t({title:s("shell.manageWorkspaceRemoveSuccess"),tone:"success"}),o("/workspaces",{replace:!0})}catch(r){t({title:r instanceof Error?r.message:s("shell.manageWorkspaceRemoveFailed"),tone:"error"})}finally{T(!1)}}}function X(l,r){f(!1),H(l,r)}return i?e.jsxs("main",{className:"mobile-feature-page mobile-page-scroll-root mobile-page-with-top-header mobile-workspace-detail-page",children:[e.jsx(we,{currentWorkspace:p?{id:p.workspace.id,name:p.label,path:p.subtitle}:null,workspaces:b.map(l=>l.workspace),workspaceOptions:v,heading:s("shell.workspaceDetailTitle"),triggerLabel:(p==null?void 0:p.label)??i.name,onSelectWorkspace:l=>{m(l),o(se(l))},content:e.jsxs("div",{className:"mobile-workspace-detail-header-actions",children:[e.jsx("button",{type:"button",className:"primary-button",onClick:()=>f(!0),children:s("shell.createSession")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(Y(i.id))},children:s("shell.filesEntry")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(ee(i.id))},children:s("shell.terminalsEntry")})]})}),e.jsxs("div",{className:"mobile-page-top-body mobile-workspace-detail-body",children:[e.jsxs("section",{className:"mobile-feature-panel surface-card mobile-workspace-detail-summary-panel",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.workspaceDetailSummaryTitle")})}),u!==i.id?e.jsx("button",{type:"button",className:"secondary-button mobile-workspace-detail-switch-button",onClick:()=>m(i.id),children:s("shell.switchWorkspace")}):null]}),n.loading&&n.summary===null?e.jsx("p",{children:s("common.loading")}):null,n.error?e.jsx("p",{className:"status-text","data-tone":"error",children:n.error}):null,n.summary?e.jsxs("div",{className:"mobile-detail-grid mobile-workspace-detail-grid",children:[e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.manageWorkspacePathLabel")}),e.jsx("strong",{title:n.summary.path,children:n.summary.path})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.manageWorkspaceCurrentBranch")}),e.jsx("strong",{title:n.summary.git.currentBranch??s("common.unknown"),children:n.summary.git.currentBranch??s("common.unknown")})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.manageWorkspaceGitCommitCount")}),e.jsx("strong",{children:n.hasMeaningfulSummary?n.summary.git.commitCount??0:"—"})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.manageWorkspaceCodeCompositionFiles")}),e.jsx("strong",{children:n.hasMeaningfulSummary?n.summary.codeComposition.scannedFileCount:"—"})]})]}):null,e.jsxs("div",{className:"mobile-feature-inline-actions mobile-workspace-detail-summary-actions",children:[e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(ae(i.id))},children:s("shell.gitEntry")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(L(i.id))},children:s("shell.terminalManagerEntry")}),e.jsx("button",{type:"button",className:"secondary-button workbench-danger-button",disabled:S,onClick:()=>{z()},children:S?s("shell.manageWorkspaceRemoving"):s("shell.manageWorkspaceRemoveAction")})]})]}),e.jsx(xe,{workspace:i?{id:i.id,path:i.path,name:i.name}:null,state:q,variant:"mobile"}),i?e.jsx(De,{workspaceId:i.id,workspacePath:i.path,state:$,onOpenProcessManager:l=>{m(l),o(L(l))}}):null,e.jsxs("section",{className:"mobile-feature-panel surface-card mobile-workspace-composition-panel",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.manageWorkspaceCodeCompositionLabel")})}),n.summary?e.jsx("span",{className:"mobile-feature-counter",children:n.summary.codeComposition.scannedFileCount}):null]}),n.loading&&n.summary===null?e.jsx("p",{children:s("common.loading")}):null,n.summary?x.length>0?e.jsxs("div",{className:"workbench-manage-type-chart",children:[e.jsxs("div",{className:"workbench-manage-type-chart-ring",style:K,"aria-hidden":"true",children:[e.jsx("strong",{className:"workbench-manage-type-chart-total",children:n.summary.codeComposition.scannedFileCount}),e.jsx("span",{className:"workbench-manage-type-chart-caption",children:s("shell.manageWorkspaceCodeCompositionFiles")})]}),e.jsx("div",{className:"workbench-manage-type-list",children:x.map(l=>e.jsxs("div",{className:"workbench-manage-type-item",children:[e.jsxs("span",{className:"workbench-manage-type-meta",children:[e.jsx("span",{className:"workbench-manage-type-swatch",style:{backgroundColor:l.color},"aria-hidden":"true"}),e.jsx("span",{className:"workbench-manage-type-name",children:l.type})]}),e.jsxs("span",{children:[l.count," · ",le(l)]})]},l.key))})]}):e.jsx("p",{children:n.summary.codeComposition.error??s("shell.manageWorkspaceNoCodeComposition")}):null,(E=n.summary)!=null&&E.codeComposition.truncated?e.jsx("p",{className:"mobile-workspace-composition-note",children:s("shell.manageWorkspaceCodeTruncated",{count:n.summary.codeComposition.scannedFileCount})}):null]}),e.jsxs("section",{className:"mobile-feature-section",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.recentSessionsSectionTitle")})}),e.jsx("span",{className:"mobile-feature-counter",children:w.length})]}),e.jsx("div",{className:"mobile-feature-stack",children:w.length===0?e.jsx("article",{className:"mobile-feature-empty surface-card",children:e.jsx("p",{children:s("shell.emptyWorkspaceSessions")})}):w.map(l=>{const r=ie(l.title,s("common.unknown")),j=k.includes(l.sessionId);return e.jsxs("article",{className:"mobile-session-row surface-card",children:[e.jsxs("button",{type:"button",className:"mobile-session-row-primary",onClick:()=>o(oe(i.id,l.sessionId)),children:[e.jsx("span",{className:"mobile-session-row-title",title:r.fullTitle,children:r.displayTitle}),e.jsx("span",{className:"mobile-session-row-provider",children:F(l.provider)})]}),e.jsxs("div",{className:"mobile-session-row-actions",children:[e.jsx("span",{className:"mobile-feature-badge mobile-session-row-count",children:l.messageCount}),e.jsx("button",{type:"button",className:"mobile-session-row-action","aria-label":j?s("shell.unfavoriteAction"):s("shell.favoriteAction"),title:j?s("shell.unfavoriteAction"):s("shell.favoriteAction"),onClick:()=>{_(l.sessionId)},children:e.jsx(Se,{active:j})}),e.jsx("button",{type:"button",className:"mobile-session-row-action","aria-label":s("shell.archiveAction"),title:s("shell.archiveAction"),onClick:()=>{G(l.sessionId)},children:e.jsx(Te,{})})]})]},l.sessionId)})})]}),g.length>0?e.jsxs("section",{className:"mobile-feature-section",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.archiveModalTitle")})}),e.jsx("span",{className:"mobile-feature-counter",children:g.length})]}),e.jsx("div",{className:"mobile-feature-stack",children:I.map(l=>e.jsxs("article",{className:"mobile-session-row surface-card",children:[e.jsxs("div",{className:"mobile-session-row-primary mobile-session-row-primary-static",children:[e.jsx("span",{className:"mobile-session-row-title",title:l.title,children:l.title}),e.jsx("span",{className:"mobile-session-row-provider",children:F(l.provider)})]}),e.jsx("div",{className:"mobile-session-row-actions",children:e.jsx("button",{type:"button",className:"secondary-button mobile-session-row-restore",onClick:()=>{V(l.sessionId)},children:s("shell.unarchiveAction")})})]},l.sessionId))}),I.length<g.length?e.jsx("button",{type:"button",className:"secondary-button mobile-workspace-detail-expand-button",onClick:()=>{P(l=>l+y)},children:s("shell.archiveExpandMore")}):null]}):null]}),e.jsx(Ne,{open:Z,workspaces:b.map(l=>l.workspace),workspaceOptions:v,initialWorkspaceId:u??i.id,onClose:()=>f(!1),onSelect:X})]}):e.jsx("main",{className:"mobile-feature-page mobile-page-scroll-root",children:e.jsxs("article",{className:"mobile-feature-empty surface-card",children:[e.jsx("h1",{children:s("shell.workspaceDetailMissingTitle")}),e.jsx("p",{children:s("shell.workspaceDetailMissingBody")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>o("/workspaces"),children:s("shell.mobileWorkspacesEntry")})]})})}function Se({active:a}){return e.jsx("svg",{viewBox:"0 0 24 24",fill:a?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.8",children:e.jsx("path",{d:"m12 3.6 2.6 5.2 5.7.8-4.1 4 1 5.7L12 16.5 6.8 19.3l1-5.7-4.1-4 5.7-.8Z"})})}function Te(){return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[e.jsx("path",{d:"M4 7.5h16"}),e.jsx("path",{d:"M6.4 7.5h11.2l-.9 10.2a2 2 0 0 1-2 1.8H9.3a2 2 0 0 1-2-1.8Z"}),e.jsx("path",{d:"M8 4.5h8a1.5 1.5 0 0 1 1.5 1.5v1.5h-11V6A1.5 1.5 0 0 1 8 4.5Z"}),e.jsx("path",{d:"M10 11.5h4"})]})}function B(a){return`workspace-management.summary.${a}`}function Ae(a){return`git-sidebar.snapshot.${a}`}function Pe(a,o){const t=(o==null?void 0:o.git.repoRoot)??a.repoRoot??null;return{workspaceId:a.id,name:a.name,path:a.path,git:{isRepository:(o==null?void 0:o.git.isRepository)??!!t,repoRoot:t,currentBranch:(o==null?void 0:o.git.currentBranch)??null,commitCount:(o==null?void 0:o.git.commitCount)??null,remotes:(o==null?void 0:o.git.remotes)??[],error:(o==null?void 0:o.git.error)??null},codeComposition:(o==null?void 0:o.codeComposition)??{scannedFileCount:0,truncated:!1,items:[],error:null}}}function Ie(a){return a?a.git.isRepository||a.git.repoRoot!==null||a.git.currentBranch!==null||a.git.commitCount!==null||a.git.remotes.length>0||a.codeComposition.scannedFileCount>0||a.codeComposition.items.length>0||a.codeComposition.error!==null:!1}export{ze as WorkspaceDetailPage};
1
+ import{b as d,j as e,t as s}from"./index-DSw-TkQL.js";import{u as J,b as N,v as Q,x as U,y as Y,o as ee,t as se,z as ae,s as L,A as le,C as ie,c as oe,g as O}from"./WorkbenchLayout-DlbgBT3n.js";import{a as F,r as ne}from"./model-switch-api-C-l8-E1S.js";import{b as te,f as re,a as ce,c as de,d as me,e as he,g as ue,h as pe,i as be,u as je,j as ge,D as xe}from"./useRegisteredDebugTemplates-rBVmAqh3.js";import{g as ke}from"./terminal-runtime-meta-0h-75uRy.js";import{f as fe,a as ve,M as we}from"./MobileWorkspaceSwitcherHeader-CuGJ31kb.js";import{M as Ne}from"./MobileCreateSessionSheet-Cb2HM-y3.js";import{c as Ce,u as ye,f as Re}from"./App-B9HcTkMT.js";import"./window-BVUB8gMK.js";import"./event-DvH9tcej.js";import"./WorkbenchModal-LNfB69qx.js";import"./relay-entry-BmLkMKuq.js";import"./MobileTopHeaderFrame-etF2HKlm.js";function De({workspaceId:a,workspacePath:o,state:t,onOpenProcessManager:b}){const u=d.useMemo(()=>te(t.templates,t.runtimeStatuses),[t.runtimeStatuses,t.templates]),k=d.useMemo(()=>new Map(t.runtimeStatuses.map(c=>[c.templateId,c])),[t.runtimeStatuses]);return e.jsxs("section",{className:"mobile-feature-panel surface-card mobile-workspace-composition-panel",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.workspaceDetailRegisteredDebugTemplatesTitle")})}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>b(a),children:s("shell.workspaceDetailRegisteredDebugOpenProcessManagerAction")})]}),e.jsx("p",{className:"mobile-workspace-composition-note",children:s("shell.workspaceDetailRegisteredDebugTemplatesDescription")}),e.jsxs("div",{className:"mobile-detail-grid mobile-workspace-detail-grid",children:[e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailDebugOverallStatusLabel")}),e.jsx("strong",{children:re(u,t.templates.length)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRegisteredCountLabel")}),e.jsx("strong",{children:t.templates.length})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRunnableCountLabel")}),e.jsx("strong",{children:u.runnableCount})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryOrchestratedCountLabel")}),e.jsx("strong",{children:u.orchestratedCount})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryBlockedCountLabel")}),e.jsx("strong",{children:u.blockedCount})]}),e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryLastRefreshLabel")}),e.jsx("strong",{children:ce(t.lastRefreshedAt)})]})]}),t.loading&&t.templates.length===0?e.jsx("p",{children:s("common.loading")}):null,t.error&&t.templates.length===0?e.jsx("p",{className:"status-text","data-tone":"error",children:t.error}):null,!t.loading&&t.templates.length===0?e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugTemplatesEmpty")}):null,t.templates.length>0?e.jsx("div",{className:"mobile-feature-stack",children:t.templates.map(c=>{const m=k.get(c.id)??null;return e.jsxs("article",{className:"surface-card mobile-session-row",children:[e.jsxs("div",{className:"mobile-session-row-primary mobile-session-row-primary-static",children:[e.jsx("span",{className:"mobile-session-row-title",children:c.name}),e.jsx("span",{className:"mobile-session-row-provider",children:de(c,m)})]}),e.jsxs("div",{className:"mobile-detail-grid mobile-workspace-detail-grid",children:[e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePathLabel")}),e.jsx("strong",{title:c.cwd,children:me(c.cwd,o)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePortLabel")}),e.jsx("strong",{children:he(c.port)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplateRuntimeTypeLabel")}),e.jsx("strong",{children:ke(c.runtimeType)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugRuntimeProcessLabel")}),e.jsx("strong",{children:ue(m)})]}),e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemCommandLabel")}),e.jsx("strong",{children:pe(c)})]}),e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemReasonLabel")}),e.jsx("strong",{children:be(c,m)})]})]})]},c.id)})}):null]})}function We(a){return a.isArchived!==!0&&!O(a)}function Me(a){return a.isArchived===!0&&!O(a)}const C=60*1e3,y=10;function ze(){var E;const{workspaceId:a=""}=Ce(),o=ye(),{showToast:t}=Re(),{navigationGroups:b,currentWorkspaceId:u,favoriteSessionIds:k,workspaceManagementStateById:c,selectWorkspace:m,subscribeGitSnapshot:R,requestGitRefresh:D,subscribeWorkspaceManagementSnapshot:W,requestWorkspaceManagementRefresh:M,toggleFavoriteSession:_,archiveSession:G,unarchiveSession:V,startDraftSession:H}=J(),[S,T]=d.useState(!1),[Z,f]=d.useState(!1),[A,P]=d.useState(y),v=fe(b),h=ve(b,a),i=(h==null?void 0:h.workspace)??null,p=v.find(l=>l.workspace.id===(i==null?void 0:i.id))??(i?{workspace:i,label:i.name,subtitle:i.path}:null),w=d.useMemo(()=>[...(h==null?void 0:h.sessions)??[]].filter(We),[h]),g=d.useMemo(()=>[...(h==null?void 0:h.sessions)??[]].filter(Me),[h]);d.useEffect(()=>{a&&m(a)},[m,a]),d.useEffect(()=>{if(!a)return;const l=N(Ae(a),C),r=N(B(a),C);R(a,{knownRevision:(l==null?void 0:l.revision)??null}),W(a,{knownRevision:(r==null?void 0:r.revision)??null}),l||D(a),r||M(a)},[D,M,R,W,a]),d.useEffect(()=>{P(y)},[a]);const n=d.useMemo(()=>{if(!a)return{loading:!1,error:null,hasMeaningfulSummary:!1,summary:null};const l=N(B(a),C),r=c[a]??null,j=(r==null?void 0:r.detail)??(i?Pe(i,l):l??null);return{loading:(r==null?void 0:r.loading)??!1,error:(r==null?void 0:r.error)??null,hasMeaningfulSummary:Ie(j),summary:j}},[i,a,c]),x=d.useMemo(()=>n.summary?Q(n.summary.codeComposition.items,s("shell.manageWorkspaceCodeCompositionOther")):[],[n.summary]),K=d.useMemo(()=>x.length>0?U(x):void 0,[x]),I=d.useMemo(()=>g.slice(0,A),[g,A]),q=je(i?{id:i.id,path:i.path,name:i.name}:null),$=ge(i?{id:i.id,path:i.path,name:i.name}:null);async function z(){if(!(!i||!(typeof window>"u"||window.confirm(s("shell.manageWorkspaceRemoveConfirmTarget",{name:i.name}))))){T(!0);try{await ne(i.id),t({title:s("shell.manageWorkspaceRemoveSuccess"),tone:"success"}),o("/workspaces",{replace:!0})}catch(r){t({title:r instanceof Error?r.message:s("shell.manageWorkspaceRemoveFailed"),tone:"error"})}finally{T(!1)}}}function X(l,r){f(!1),H(l,r)}return i?e.jsxs("main",{className:"mobile-feature-page mobile-page-scroll-root mobile-page-with-top-header mobile-workspace-detail-page",children:[e.jsx(we,{currentWorkspace:p?{id:p.workspace.id,name:p.label,path:p.subtitle}:null,workspaces:b.map(l=>l.workspace),workspaceOptions:v,heading:s("shell.workspaceDetailTitle"),triggerLabel:(p==null?void 0:p.label)??i.name,onSelectWorkspace:l=>{m(l),o(se(l))},content:e.jsxs("div",{className:"mobile-workspace-detail-header-actions",children:[e.jsx("button",{type:"button",className:"primary-button",onClick:()=>f(!0),children:s("shell.createSession")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(Y(i.id))},children:s("shell.filesEntry")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(ee(i.id))},children:s("shell.terminalsEntry")})]})}),e.jsxs("div",{className:"mobile-page-top-body mobile-workspace-detail-body",children:[e.jsxs("section",{className:"mobile-feature-panel surface-card mobile-workspace-detail-summary-panel",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.workspaceDetailSummaryTitle")})}),u!==i.id?e.jsx("button",{type:"button",className:"secondary-button mobile-workspace-detail-switch-button",onClick:()=>m(i.id),children:s("shell.switchWorkspace")}):null]}),n.loading&&n.summary===null?e.jsx("p",{children:s("common.loading")}):null,n.error?e.jsx("p",{className:"status-text","data-tone":"error",children:n.error}):null,n.summary?e.jsxs("div",{className:"mobile-detail-grid mobile-workspace-detail-grid",children:[e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.manageWorkspacePathLabel")}),e.jsx("strong",{title:n.summary.path,children:n.summary.path})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.manageWorkspaceCurrentBranch")}),e.jsx("strong",{title:n.summary.git.currentBranch??s("common.unknown"),children:n.summary.git.currentBranch??s("common.unknown")})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.manageWorkspaceGitCommitCount")}),e.jsx("strong",{children:n.hasMeaningfulSummary?n.summary.git.commitCount??0:"—"})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.manageWorkspaceCodeCompositionFiles")}),e.jsx("strong",{children:n.hasMeaningfulSummary?n.summary.codeComposition.scannedFileCount:"—"})]})]}):null,e.jsxs("div",{className:"mobile-feature-inline-actions mobile-workspace-detail-summary-actions",children:[e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(ae(i.id))},children:s("shell.gitEntry")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(L(i.id))},children:s("shell.terminalManagerEntry")}),e.jsx("button",{type:"button",className:"secondary-button workbench-danger-button",disabled:S,onClick:()=>{z()},children:S?s("shell.manageWorkspaceRemoving"):s("shell.manageWorkspaceRemoveAction")})]})]}),e.jsx(xe,{workspace:i?{id:i.id,path:i.path,name:i.name}:null,state:q,variant:"mobile"}),i?e.jsx(De,{workspaceId:i.id,workspacePath:i.path,state:$,onOpenProcessManager:l=>{m(l),o(L(l))}}):null,e.jsxs("section",{className:"mobile-feature-panel surface-card mobile-workspace-composition-panel",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.manageWorkspaceCodeCompositionLabel")})}),n.summary?e.jsx("span",{className:"mobile-feature-counter",children:n.summary.codeComposition.scannedFileCount}):null]}),n.loading&&n.summary===null?e.jsx("p",{children:s("common.loading")}):null,n.summary?x.length>0?e.jsxs("div",{className:"workbench-manage-type-chart",children:[e.jsxs("div",{className:"workbench-manage-type-chart-ring",style:K,"aria-hidden":"true",children:[e.jsx("strong",{className:"workbench-manage-type-chart-total",children:n.summary.codeComposition.scannedFileCount}),e.jsx("span",{className:"workbench-manage-type-chart-caption",children:s("shell.manageWorkspaceCodeCompositionFiles")})]}),e.jsx("div",{className:"workbench-manage-type-list",children:x.map(l=>e.jsxs("div",{className:"workbench-manage-type-item",children:[e.jsxs("span",{className:"workbench-manage-type-meta",children:[e.jsx("span",{className:"workbench-manage-type-swatch",style:{backgroundColor:l.color},"aria-hidden":"true"}),e.jsx("span",{className:"workbench-manage-type-name",children:l.type})]}),e.jsxs("span",{children:[l.count," · ",le(l)]})]},l.key))})]}):e.jsx("p",{children:n.summary.codeComposition.error??s("shell.manageWorkspaceNoCodeComposition")}):null,(E=n.summary)!=null&&E.codeComposition.truncated?e.jsx("p",{className:"mobile-workspace-composition-note",children:s("shell.manageWorkspaceCodeTruncated",{count:n.summary.codeComposition.scannedFileCount})}):null]}),e.jsxs("section",{className:"mobile-feature-section",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.recentSessionsSectionTitle")})}),e.jsx("span",{className:"mobile-feature-counter",children:w.length})]}),e.jsx("div",{className:"mobile-feature-stack",children:w.length===0?e.jsx("article",{className:"mobile-feature-empty surface-card",children:e.jsx("p",{children:s("shell.emptyWorkspaceSessions")})}):w.map(l=>{const r=ie(l.title,s("common.unknown")),j=k.includes(l.sessionId);return e.jsxs("article",{className:"mobile-session-row surface-card",children:[e.jsxs("button",{type:"button",className:"mobile-session-row-primary",onClick:()=>o(oe(i.id,l.sessionId)),children:[e.jsx("span",{className:"mobile-session-row-title",title:r.fullTitle,children:r.displayTitle}),e.jsx("span",{className:"mobile-session-row-provider",children:F(l.provider)})]}),e.jsxs("div",{className:"mobile-session-row-actions",children:[e.jsx("span",{className:"mobile-feature-badge mobile-session-row-count",children:l.messageCount}),e.jsx("button",{type:"button",className:"mobile-session-row-action","aria-label":j?s("shell.unfavoriteAction"):s("shell.favoriteAction"),title:j?s("shell.unfavoriteAction"):s("shell.favoriteAction"),onClick:()=>{_(l.sessionId)},children:e.jsx(Se,{active:j})}),e.jsx("button",{type:"button",className:"mobile-session-row-action","aria-label":s("shell.archiveAction"),title:s("shell.archiveAction"),onClick:()=>{G(l.sessionId)},children:e.jsx(Te,{})})]})]},l.sessionId)})})]}),g.length>0?e.jsxs("section",{className:"mobile-feature-section",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.archiveModalTitle")})}),e.jsx("span",{className:"mobile-feature-counter",children:g.length})]}),e.jsx("div",{className:"mobile-feature-stack",children:I.map(l=>e.jsxs("article",{className:"mobile-session-row surface-card",children:[e.jsxs("div",{className:"mobile-session-row-primary mobile-session-row-primary-static",children:[e.jsx("span",{className:"mobile-session-row-title",title:l.title,children:l.title}),e.jsx("span",{className:"mobile-session-row-provider",children:F(l.provider)})]}),e.jsx("div",{className:"mobile-session-row-actions",children:e.jsx("button",{type:"button",className:"secondary-button mobile-session-row-restore",onClick:()=>{V(l.sessionId)},children:s("shell.unarchiveAction")})})]},l.sessionId))}),I.length<g.length?e.jsx("button",{type:"button",className:"secondary-button mobile-workspace-detail-expand-button",onClick:()=>{P(l=>l+y)},children:s("shell.archiveExpandMore")}):null]}):null]}),e.jsx(Ne,{open:Z,workspaces:b.map(l=>l.workspace),workspaceOptions:v,initialWorkspaceId:u??i.id,onClose:()=>f(!1),onSelect:X})]}):e.jsx("main",{className:"mobile-feature-page mobile-page-scroll-root",children:e.jsxs("article",{className:"mobile-feature-empty surface-card",children:[e.jsx("h1",{children:s("shell.workspaceDetailMissingTitle")}),e.jsx("p",{children:s("shell.workspaceDetailMissingBody")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>o("/workspaces"),children:s("shell.mobileWorkspacesEntry")})]})})}function Se({active:a}){return e.jsx("svg",{viewBox:"0 0 24 24",fill:a?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.8",children:e.jsx("path",{d:"m12 3.6 2.6 5.2 5.7.8-4.1 4 1 5.7L12 16.5 6.8 19.3l1-5.7-4.1-4 5.7-.8Z"})})}function Te(){return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[e.jsx("path",{d:"M4 7.5h16"}),e.jsx("path",{d:"M6.4 7.5h11.2l-.9 10.2a2 2 0 0 1-2 1.8H9.3a2 2 0 0 1-2-1.8Z"}),e.jsx("path",{d:"M8 4.5h8a1.5 1.5 0 0 1 1.5 1.5v1.5h-11V6A1.5 1.5 0 0 1 8 4.5Z"}),e.jsx("path",{d:"M10 11.5h4"})]})}function B(a){return`workspace-management.summary.${a}`}function Ae(a){return`git-sidebar.snapshot.${a}`}function Pe(a,o){const t=(o==null?void 0:o.git.repoRoot)??a.repoRoot??null;return{workspaceId:a.id,name:a.name,path:a.path,git:{isRepository:(o==null?void 0:o.git.isRepository)??!!t,repoRoot:t,currentBranch:(o==null?void 0:o.git.currentBranch)??null,commitCount:(o==null?void 0:o.git.commitCount)??null,remotes:(o==null?void 0:o.git.remotes)??[],error:(o==null?void 0:o.git.error)??null},codeComposition:(o==null?void 0:o.codeComposition)??{scannedFileCount:0,truncated:!1,items:[],error:null}}}function Ie(a){return a?a.git.isRepository||a.git.repoRoot!==null||a.git.currentBranch!==null||a.git.commitCount!==null||a.git.remotes.length>0||a.codeComposition.scannedFileCount>0||a.codeComposition.items.length>0||a.codeComposition.error!==null:!1}export{ze as WorkspaceDetailPage};
@@ -1 +1 @@
1
- import{b as r,j as e,t}from"./index-C-0oeG_5.js";import{u as Be,i as re,b as y,w as ie,B as oe,c as ne,d as Fe,e as Oe,f as qe,g as Ue,h as De,j as Ve,l as Ke,k as Ge,n as We,o as Qe,p as Xe,q as $e,s as ze,t as H}from"./WorkbenchLayout-pOZvEqp7.js";import{s as Je}from"./butler-records-events-DgWCG364.js";import{a as se}from"./model-switch-api-Bh9nYslz.js";import{f as Ye,a as te,M as Ze}from"./MobileWorkspaceSwitcherHeader-CfUnHgv_.js";import{u as ei,f as ii}from"./App-Dsf3ooXU.js";import{M as oi}from"./MobileCreateSessionSheet-DcxKM00P.js";import{W as ni}from"./WorkbenchModal-ColqvV6a.js";import"./window-BVUB8gMK.js";import"./event-DvH9tcej.js";import"./relay-entry-pmr-c42O.js";import"./MobileTopHeaderFrame-C5rIKQT6.js";function si(n){return n.status==="active"}function ti(n){return n.status==="queued"||n.status==="running"}function ai(n,m){return n.filter(si).length+m.filter(ti).length}function li(n){const m=r.useMemo(()=>n.notifications.filter(a=>n.showArchivedNotifications||!n.archivedNotificationIds.has(a.id)),[n.archivedNotificationIds,n.notifications,n.showArchivedNotifications]);return e.jsx(ni,{open:n.open,title:t("shell.globalNotificationsPanelTitle"),description:t("shell.globalNotificationsPanelDescription"),className:"workbench-notification-modal-card mobile-notification-modal-card",onClose:n.onClose,children:e.jsxs("div",{className:"workbench-notification-pane mobile-notification-pane",role:"tabpanel","aria-label":t("shell.globalNotificationsAction"),children:[e.jsx("div",{className:"workbench-notification-toolbar",children:e.jsxs("label",{className:"workbench-notification-filter",children:[e.jsx("input",{type:"checkbox",checked:n.showArchivedNotifications,onChange:a=>n.onToggleShowArchivedNotifications(a.target.checked)}),e.jsx("span",{children:t("shell.globalNotificationsShowArchived")})]})}),m.length>0?e.jsx("div",{className:"workbench-notification-list",children:m.map(a=>{const u=n.archivedNotificationIds.has(a.id);return e.jsxs("article",{className:"workbench-notification-item","data-archived":u,children:[e.jsxs("button",{type:"button",className:"workbench-notification-item-content",onClick:()=>{n.onSelectNotification(a)},children:[e.jsx("span",{className:"workbench-notification-item-kind",children:ci(a.kind)}),e.jsx("strong",{children:a.title}),e.jsx("p",{children:a.body})]}),e.jsxs("div",{className:"workbench-notification-item-side",children:[e.jsx("time",{children:ri(a.createdAt)}),e.jsx("button",{type:"button",className:"secondary-button workbench-notification-item-action-button",onClick:()=>{if(u){n.onUnarchiveNotification(a.id);return}n.onArchiveNotification(a.id)},children:u?t("shell.globalNotificationsRemoveArchiveAction"):t("shell.globalNotificationsArchiveAction")})]})]},a.id)})}):e.jsx("p",{className:"workbench-notification-empty",children:t("shell.globalNotificationsEmpty")})]})})}function ci(n){switch(n){case"follow_up_waiting_user":return t("shell.globalNotificationKindWaitingUser");case"follow_up_completed":return t("shell.globalNotificationKindFollowUpCompleted");case"follow_up_failed":return t("shell.globalNotificationKindFollowUpFailed");case"verification_failed":return t("shell.globalNotificationKindVerificationFailed");default:return t("shell.globalNotificationsPanelTitle")}}function ri(n){const m=new Date(n);return Number.isNaN(m.getTime())?n:new Intl.DateTimeFormat(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(m)}function di(n){return n.isArchived!==!0&&!Ue(n)}function mi(n){return n.activityState==="idle"&&re(n)===!1}function ae(n){return n==="creating"||n==="running"}function le(n){return n.lastEventAt??n.lastMessageAt??n.updatedAt??n.createdAt}function ce(n){return n?new Date(n).toLocaleString(void 0,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}):t("common.unknown")}function x(n){return n!==null&&n>0}const A=60*1e3,ui=15e3;function Si(){var ee;const n=ei(),{showToast:m}=ii(),a=Be(),{navigationGroups:u,currentWorkspaceId:O,refreshNavigation:q,selectWorkspace:p,startDraftSession:de,subscribeGitSnapshot:U,requestGitRefresh:D,addGitSnapshotListener:V,subscribeTerminalManagerSnapshot:K,requestTerminalManagerRefresh:G,addTerminalManagerSnapshotListener:W}=a,me=a.globalNotifications??[],ue=new Set(a.archivedNotificationIds??[]),he=a.showArchivedNotifications??!1,Q=a.unreadNotificationCount??0,pe=a.setShowArchivedNotifications??(()=>{}),be=a.archiveNotification??(()=>{}),fe=a.unarchiveNotification??(()=>{}),[X,b]=r.useState(null),[we,R]=r.useState(!1),[ke,$]=r.useState(!1),[ge,M]=r.useState(!1),[d,g]=r.useState({gitLoading:!1,terminalLoading:!1,branch:null,activeTerminalCount:null,changedFileCount:null,quickLaunchRunning:null}),[f,C]=r.useState({loading:!0,activeTaskCount:0,pendingInboxCount:0}),E=Ye(u),j=te(u,O)??te(u,((ee=u[0])==null?void 0:ee.workspace.id)??null),i=(j==null?void 0:j.workspace)??null,I=E.find(o=>o.workspace.id===(i==null?void 0:i.id))??(i?{workspace:i,label:i.name,subtitle:i.path}:null),S=[...(j==null?void 0:j.sessions)??[]].filter(di),P=S.filter(re),z=S.filter(mi),ve=S.filter(o=>o.isFavorite===!0),J=P.slice(0,6),Y=ve.slice(0,6),Ne=d.quickLaunchRunning===null?"…":d.quickLaunchRunning?t("shell.workspaceHomeQuickLaunchRunning"):t("shell.workspaceHomeQuickLaunchStopped");r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){g({gitLoading:!1,terminalLoading:!1,branch:null,activeTerminalCount:null,changedFileCount:null,quickLaunchRunning:null});return}const s=y(B(o),A);g(c=>{var l,v,w;return{...c,gitLoading:s===null,branch:((l=s==null?void 0:s.status)==null?void 0:l.snapshot.enabled)===!1?null:((v=s==null?void 0:s.status)==null?void 0:v.snapshot.branch)??null,changedFileCount:((w=s==null?void 0:s.status)==null?void 0:w.changes.length)??null}})},[i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(o)return V(s=>{s.workspaceId===o&&(ie(B(o),s),g(c=>{var l,v,w,T;return{...c,gitLoading:!1,branch:((l=s.status)==null?void 0:l.snapshot.enabled)===!1?null:((v=s.status)==null?void 0:v.snapshot.branch)??((w=s.branches)==null?void 0:w.currentBranch)??null,changedFileCount:((T=s.status)==null?void 0:T.changes.length)??null}}))})},[V,i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){g(c=>({...c,gitLoading:!1,branch:null,changedFileCount:null}));return}const s=y(F(o),A);g(c=>({...c,terminalLoading:s===null,activeTerminalCount:s?s.terminals.filter(l=>ae(l.status)).length:null,quickLaunchRunning:s?s.templateStatuses.some(l=>l.occupied):null}))},[i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){g(s=>({...s,terminalLoading:!1,activeTerminalCount:null,quickLaunchRunning:null}));return}return W(s=>{s.workspaceId===o&&(ie(F(o),{revision:s.revision??null,terminals:s.terminals,templates:s.templates,templateStatuses:s.templateStatuses}),g(c=>({...c,terminalLoading:!1,activeTerminalCount:s.terminals.filter(l=>ae(l.status)).length,quickLaunchRunning:s.templateStatuses.some(l=>l.occupied)})))})},[W,i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o)return;const s=y(B(o),A);U(o,{knownRevision:(s==null?void 0:s.revision)??null}),!s&&D(o)},[i==null?void 0:i.id,D,U]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o)return;const s=y(F(o),A);K(o,{knownRevision:(s==null?void 0:s.revision)??null}),!s&&G(o)},[i==null?void 0:i.id,G,K]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){C({loading:!1,activeTaskCount:0,pendingInboxCount:0});return}let s=!1;async function c(T){C(N=>({...N,loading:!0}));try{const N=await De();if(!N.initialized||!N.profile){s||C({loading:!1,activeTaskCount:0,pendingInboxCount:0});return}const[L,Ee,Pe]=await Promise.all([Ve(),Ke(),Ge({workspaceId:o})]);if(s)return;const _e=new Set(L.overview.projects.filter(h=>h.workspaceId===o).map(h=>h.id)),He=L.overview.verifications.filter(h=>h.projectId?_e.has(h.projectId):!1);C({loading:!1,activeTaskCount:ai(Ee.items.filter(h=>h.workspaceId===o),He),pendingInboxCount:Pe.items.filter(h=>h.status!=="closed").length})}catch(N){if(s)return;C(L=>({...L,loading:!1})),T&&m({title:t("shell.butlerLoadFailed"),description:N instanceof Error?N.message:void 0,tone:"error"})}}c(!0);const l=window.setInterval(()=>{c(!1)},ui),v=Je(()=>{c(!1)}),w=()=>{c(!1)};return window.addEventListener(oe,w),()=>{s=!0,window.clearInterval(l),v(),window.removeEventListener(oe,w)}},[i==null?void 0:i.id,m]);async function xe(o){await q(),p(o.id),b(null),n(H(o.id))}async function je(o){await q(),p(o.id),b(null),n(H(o.id))}function Ce(){i&&(p(i.id),n(Xe(i.id,"git")))}function Se(){i&&(p(i.id),n(Qe(i.id)))}function Ie(){i&&(p(i.id),n(ze(i.id)))}function Te(){i&&(p(i.id),n($e(i.id)))}function _(){i&&n(We(i.id))}function Z(){i&&R(!0)}function Le(o,s){R(!1),de(o,s)}function ye(){i&&(p(i.id),n(H(i.id)))}function Ae(o){p(o)}const Re=[{label:t("shell.workspaceHomeMetricActive"),value:P.length,accent:x(P.length),onClick:S.length>0?_:void 0},{label:t("shell.workspaceHomeMetricUnread"),value:Q,accent:x(Q),onClick:()=>M(!0)},{label:t("shell.workspaceHomeMetricTerminal"),value:d.terminalLoading?"…":d.activeTerminalCount??"—",accent:d.terminalLoading===!1&&x(d.activeTerminalCount),onClick:i?Se:void 0},{label:t("shell.workspaceHomeMetricChanges"),value:d.gitLoading?"…":d.changedFileCount??"—",accent:d.gitLoading===!1&&x(d.changedFileCount),onClick:i?Ce:void 0}],Me=[{label:t("shell.workspaceHomeWaitingInputLabel"),value:z.length,accent:x(z.length),onClick:S.length>0?_:void 0},{label:t("shell.workspaceHomeButlerLabel"),value:f.loading?"…":f.activeTaskCount,accent:f.loading===!1&&x(f.activeTaskCount),onClick:i?Te:void 0},{label:t("shell.workspaceHomeQuickLaunchStatusLabel"),value:Ne,accent:d.quickLaunchRunning===!0,onClick:i?Ie:void 0},{label:t("shell.butlerInboxAction"),value:f.loading?"…":f.pendingInboxCount,accent:f.loading===!1&&x(f.pendingInboxCount),onClick:i?()=>$(!0):void 0}];return e.jsxs("main",{className:"mobile-feature-page mobile-page-scroll-root mobile-page-with-top-header mobile-workspace-home-page",children:[e.jsx(Ze,{currentWorkspace:I?{id:I.workspace.id,name:I.label,path:I.subtitle}:null,workspaces:u.map(o=>o.workspace),workspaceOptions:E,onSelectWorkspace:Ae,sheetContent:o=>e.jsxs("div",{className:"mobile-workspace-home-group mobile-workspace-home-sheet-group",children:[e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-sheet-row",onClick:()=>{o(),b("import")},children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:t("shell.importWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]}),e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-sheet-row",onClick:()=>{o(),b("clone")},children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:t("shell.cloneWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]})]})}),i?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"mobile-page-top-body mobile-workspace-home-body",children:[e.jsx("section",{className:"mobile-workspace-home-section",children:e.jsx("div",{className:"mobile-workspace-home-metrics-card","aria-label":t("shell.workspaceHomeStatusSectionTitle"),children:e.jsx("div",{className:"mobile-workspace-home-toolbar-summary",children:Re.map(o=>o.onClick?e.jsxs("button",{type:"button",className:"mobile-workspace-home-toolbar-metric","data-accent":o.accent?"true":void 0,onClick:o.onClick,children:[e.jsx("strong",{className:"mobile-workspace-home-toolbar-metric-value",children:o.value}),e.jsx("span",{className:"mobile-workspace-home-toolbar-metric-label",children:o.label})]},o.label):e.jsxs("div",{className:"mobile-workspace-home-toolbar-metric","data-accent":o.accent?"true":void 0,role:"listitem",children:[e.jsx("strong",{className:"mobile-workspace-home-toolbar-metric-value",children:o.value}),e.jsx("span",{className:"mobile-workspace-home-toolbar-metric-label",children:o.label})]},o.label))})})}),e.jsx("section",{className:"mobile-workspace-home-section",children:e.jsxs("div",{className:"mobile-workspace-home-primary-actions",children:[e.jsx("button",{type:"button",className:"secondary-button",onClick:ye,children:t("shell.workspaceDetailTitle")}),e.jsx("button",{type:"button",className:"primary-button",onClick:Z,children:t("shell.createSession")})]})}),e.jsx("section",{className:"mobile-workspace-home-section",children:e.jsx("div",{className:"mobile-workspace-home-group",children:Me.map(o=>e.jsxs("button",{type:"button",className:"mobile-workspace-home-row","data-accent":o.accent?"true":void 0,onClick:o.onClick,children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:o.label}),e.jsxs("span",{className:"mobile-workspace-home-row-trailing",children:[e.jsx("strong",{children:o.value}),e.jsx(k,{})]})]},o.label))})}),e.jsxs("section",{className:"mobile-workspace-home-section",children:[e.jsxs("div",{className:"mobile-workspace-home-section-header",children:[e.jsx("p",{className:"mobile-workspace-home-section-title",children:t("shell.workspaceHomeActiveSessionsSectionTitle")}),i?e.jsx("button",{type:"button",className:"mobile-workspace-home-link-button",onClick:_,children:t("shell.workspaceHomeViewAllAction")}):null]}),e.jsx("div",{className:"mobile-workspace-home-group",children:J.length===0?e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-empty-row",onClick:Z,children:[e.jsxs("div",{className:"mobile-workspace-home-session-main",children:[e.jsx("span",{className:"mobile-workspace-home-session-title",children:t("shell.createSession")}),e.jsx("span",{className:"mobile-workspace-home-session-meta",children:i.name})]}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]}):J.map(o=>e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-session-row",onClick:()=>n(ne(i.id,o.sessionId)),children:[e.jsxs("div",{className:"mobile-workspace-home-session-main",children:[e.jsx("span",{className:"mobile-workspace-home-session-title",children:o.title||t("common.unknown")}),e.jsxs("span",{className:"mobile-workspace-home-session-meta",children:[se(o.provider,"full")," · ",ce(le(o))]})]}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]},o.sessionId))})]}),Y.length>0?e.jsxs("section",{className:"mobile-workspace-home-section",children:[e.jsx("div",{className:"mobile-workspace-home-section-header",children:e.jsx("p",{className:"mobile-workspace-home-section-title",children:t("shell.favoriteSectionTitle")})}),e.jsx("div",{className:"mobile-workspace-home-group",children:Y.map(o=>e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-session-row",onClick:()=>n(ne(i.id,o.sessionId)),children:[e.jsxs("div",{className:"mobile-workspace-home-session-main",children:[e.jsx("span",{className:"mobile-workspace-home-session-title",children:o.title||t("common.unknown")}),e.jsxs("span",{className:"mobile-workspace-home-session-meta",children:[se(o.provider,"full")," · ",ce(le(o))]})]}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]},o.sessionId))})]}):null]})}):e.jsx("div",{className:"mobile-page-top-body mobile-workspace-home-body",children:e.jsxs("section",{className:"mobile-workspace-home-section mobile-workspace-home-empty",children:[e.jsx("p",{className:"mobile-workspace-home-section-title",children:t("shell.workspaceHomeSwitcherTitle")}),e.jsxs("div",{className:"mobile-workspace-home-group",children:[e.jsxs("button",{type:"button",className:"mobile-workspace-home-row",onClick:()=>b("import"),children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:t("shell.importWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]}),e.jsxs("button",{type:"button",className:"mobile-workspace-home-row",onClick:()=>b("clone"),children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:t("shell.cloneWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]})]})]})}),e.jsx(Fe,{open:X==="import",onClose:()=>b(null),onImported:xe}),e.jsx(Oe,{open:X==="clone",onClose:()=>b(null),onCloned:je}),e.jsx(oi,{open:we,workspaces:u.map(o=>o.workspace),workspaceOptions:E,initialWorkspaceId:(i==null?void 0:i.id)??O??null,onClose:()=>R(!1),onSelect:Le}),e.jsx(qe,{open:ke,preferredWorkspaceId:(i==null?void 0:i.id)??null,compactComposer:!0,onClose:()=>$(!1)}),e.jsx(li,{open:ge,notifications:me,archivedNotificationIds:ue,showArchivedNotifications:he,onClose:()=>M(!1),onToggleShowArchivedNotifications:pe,onArchiveNotification:be,onUnarchiveNotification:fe,onSelectNotification:o=>{M(!1),o.routePath&&n(o.routePath)}})]})}function B(n){return`git-sidebar.snapshot.${n}`}function F(n){return`terminal-manager.snapshot.${n}`}function k(){return e.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:e.jsx("path",{d:"M6 3.5L10.5 8 6 12.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.6"})})}export{Si as WorkspaceHomePage};
1
+ import{b as r,j as e,t}from"./index-DSw-TkQL.js";import{u as Be,i as re,b as y,w as ie,B as oe,c as ne,d as Fe,e as Oe,f as qe,g as Ue,h as De,j as Ve,l as Ke,k as Ge,n as We,o as Qe,p as Xe,q as $e,s as ze,t as H}from"./WorkbenchLayout-DlbgBT3n.js";import{s as Je}from"./butler-records-events-DgWCG364.js";import{a as se}from"./model-switch-api-C-l8-E1S.js";import{f as Ye,a as te,M as Ze}from"./MobileWorkspaceSwitcherHeader-CuGJ31kb.js";import{u as ei,f as ii}from"./App-B9HcTkMT.js";import{M as oi}from"./MobileCreateSessionSheet-Cb2HM-y3.js";import{W as ni}from"./WorkbenchModal-LNfB69qx.js";import"./window-BVUB8gMK.js";import"./event-DvH9tcej.js";import"./relay-entry-BmLkMKuq.js";import"./MobileTopHeaderFrame-etF2HKlm.js";function si(n){return n.status==="active"}function ti(n){return n.status==="queued"||n.status==="running"}function ai(n,m){return n.filter(si).length+m.filter(ti).length}function li(n){const m=r.useMemo(()=>n.notifications.filter(a=>n.showArchivedNotifications||!n.archivedNotificationIds.has(a.id)),[n.archivedNotificationIds,n.notifications,n.showArchivedNotifications]);return e.jsx(ni,{open:n.open,title:t("shell.globalNotificationsPanelTitle"),description:t("shell.globalNotificationsPanelDescription"),className:"workbench-notification-modal-card mobile-notification-modal-card",onClose:n.onClose,children:e.jsxs("div",{className:"workbench-notification-pane mobile-notification-pane",role:"tabpanel","aria-label":t("shell.globalNotificationsAction"),children:[e.jsx("div",{className:"workbench-notification-toolbar",children:e.jsxs("label",{className:"workbench-notification-filter",children:[e.jsx("input",{type:"checkbox",checked:n.showArchivedNotifications,onChange:a=>n.onToggleShowArchivedNotifications(a.target.checked)}),e.jsx("span",{children:t("shell.globalNotificationsShowArchived")})]})}),m.length>0?e.jsx("div",{className:"workbench-notification-list",children:m.map(a=>{const u=n.archivedNotificationIds.has(a.id);return e.jsxs("article",{className:"workbench-notification-item","data-archived":u,children:[e.jsxs("button",{type:"button",className:"workbench-notification-item-content",onClick:()=>{n.onSelectNotification(a)},children:[e.jsx("span",{className:"workbench-notification-item-kind",children:ci(a.kind)}),e.jsx("strong",{children:a.title}),e.jsx("p",{children:a.body})]}),e.jsxs("div",{className:"workbench-notification-item-side",children:[e.jsx("time",{children:ri(a.createdAt)}),e.jsx("button",{type:"button",className:"secondary-button workbench-notification-item-action-button",onClick:()=>{if(u){n.onUnarchiveNotification(a.id);return}n.onArchiveNotification(a.id)},children:u?t("shell.globalNotificationsRemoveArchiveAction"):t("shell.globalNotificationsArchiveAction")})]})]},a.id)})}):e.jsx("p",{className:"workbench-notification-empty",children:t("shell.globalNotificationsEmpty")})]})})}function ci(n){switch(n){case"follow_up_waiting_user":return t("shell.globalNotificationKindWaitingUser");case"follow_up_completed":return t("shell.globalNotificationKindFollowUpCompleted");case"follow_up_failed":return t("shell.globalNotificationKindFollowUpFailed");case"verification_failed":return t("shell.globalNotificationKindVerificationFailed");default:return t("shell.globalNotificationsPanelTitle")}}function ri(n){const m=new Date(n);return Number.isNaN(m.getTime())?n:new Intl.DateTimeFormat(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(m)}function di(n){return n.isArchived!==!0&&!Ue(n)}function mi(n){return n.activityState==="idle"&&re(n)===!1}function ae(n){return n==="creating"||n==="running"}function le(n){return n.lastEventAt??n.lastMessageAt??n.updatedAt??n.createdAt}function ce(n){return n?new Date(n).toLocaleString(void 0,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}):t("common.unknown")}function x(n){return n!==null&&n>0}const A=60*1e3,ui=15e3;function Si(){var ee;const n=ei(),{showToast:m}=ii(),a=Be(),{navigationGroups:u,currentWorkspaceId:O,refreshNavigation:q,selectWorkspace:p,startDraftSession:de,subscribeGitSnapshot:U,requestGitRefresh:D,addGitSnapshotListener:V,subscribeTerminalManagerSnapshot:K,requestTerminalManagerRefresh:G,addTerminalManagerSnapshotListener:W}=a,me=a.globalNotifications??[],ue=new Set(a.archivedNotificationIds??[]),he=a.showArchivedNotifications??!1,Q=a.unreadNotificationCount??0,pe=a.setShowArchivedNotifications??(()=>{}),be=a.archiveNotification??(()=>{}),fe=a.unarchiveNotification??(()=>{}),[X,b]=r.useState(null),[we,R]=r.useState(!1),[ke,$]=r.useState(!1),[ge,M]=r.useState(!1),[d,g]=r.useState({gitLoading:!1,terminalLoading:!1,branch:null,activeTerminalCount:null,changedFileCount:null,quickLaunchRunning:null}),[f,C]=r.useState({loading:!0,activeTaskCount:0,pendingInboxCount:0}),E=Ye(u),j=te(u,O)??te(u,((ee=u[0])==null?void 0:ee.workspace.id)??null),i=(j==null?void 0:j.workspace)??null,I=E.find(o=>o.workspace.id===(i==null?void 0:i.id))??(i?{workspace:i,label:i.name,subtitle:i.path}:null),S=[...(j==null?void 0:j.sessions)??[]].filter(di),P=S.filter(re),z=S.filter(mi),ve=S.filter(o=>o.isFavorite===!0),J=P.slice(0,6),Y=ve.slice(0,6),Ne=d.quickLaunchRunning===null?"…":d.quickLaunchRunning?t("shell.workspaceHomeQuickLaunchRunning"):t("shell.workspaceHomeQuickLaunchStopped");r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){g({gitLoading:!1,terminalLoading:!1,branch:null,activeTerminalCount:null,changedFileCount:null,quickLaunchRunning:null});return}const s=y(B(o),A);g(c=>{var l,v,w;return{...c,gitLoading:s===null,branch:((l=s==null?void 0:s.status)==null?void 0:l.snapshot.enabled)===!1?null:((v=s==null?void 0:s.status)==null?void 0:v.snapshot.branch)??null,changedFileCount:((w=s==null?void 0:s.status)==null?void 0:w.changes.length)??null}})},[i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(o)return V(s=>{s.workspaceId===o&&(ie(B(o),s),g(c=>{var l,v,w,T;return{...c,gitLoading:!1,branch:((l=s.status)==null?void 0:l.snapshot.enabled)===!1?null:((v=s.status)==null?void 0:v.snapshot.branch)??((w=s.branches)==null?void 0:w.currentBranch)??null,changedFileCount:((T=s.status)==null?void 0:T.changes.length)??null}}))})},[V,i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){g(c=>({...c,gitLoading:!1,branch:null,changedFileCount:null}));return}const s=y(F(o),A);g(c=>({...c,terminalLoading:s===null,activeTerminalCount:s?s.terminals.filter(l=>ae(l.status)).length:null,quickLaunchRunning:s?s.templateStatuses.some(l=>l.occupied):null}))},[i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){g(s=>({...s,terminalLoading:!1,activeTerminalCount:null,quickLaunchRunning:null}));return}return W(s=>{s.workspaceId===o&&(ie(F(o),{revision:s.revision??null,terminals:s.terminals,templates:s.templates,templateStatuses:s.templateStatuses}),g(c=>({...c,terminalLoading:!1,activeTerminalCount:s.terminals.filter(l=>ae(l.status)).length,quickLaunchRunning:s.templateStatuses.some(l=>l.occupied)})))})},[W,i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o)return;const s=y(B(o),A);U(o,{knownRevision:(s==null?void 0:s.revision)??null}),!s&&D(o)},[i==null?void 0:i.id,D,U]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o)return;const s=y(F(o),A);K(o,{knownRevision:(s==null?void 0:s.revision)??null}),!s&&G(o)},[i==null?void 0:i.id,G,K]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){C({loading:!1,activeTaskCount:0,pendingInboxCount:0});return}let s=!1;async function c(T){C(N=>({...N,loading:!0}));try{const N=await De();if(!N.initialized||!N.profile){s||C({loading:!1,activeTaskCount:0,pendingInboxCount:0});return}const[L,Ee,Pe]=await Promise.all([Ve(),Ke(),Ge({workspaceId:o})]);if(s)return;const _e=new Set(L.overview.projects.filter(h=>h.workspaceId===o).map(h=>h.id)),He=L.overview.verifications.filter(h=>h.projectId?_e.has(h.projectId):!1);C({loading:!1,activeTaskCount:ai(Ee.items.filter(h=>h.workspaceId===o),He),pendingInboxCount:Pe.items.filter(h=>h.status!=="closed").length})}catch(N){if(s)return;C(L=>({...L,loading:!1})),T&&m({title:t("shell.butlerLoadFailed"),description:N instanceof Error?N.message:void 0,tone:"error"})}}c(!0);const l=window.setInterval(()=>{c(!1)},ui),v=Je(()=>{c(!1)}),w=()=>{c(!1)};return window.addEventListener(oe,w),()=>{s=!0,window.clearInterval(l),v(),window.removeEventListener(oe,w)}},[i==null?void 0:i.id,m]);async function xe(o){await q(),p(o.id),b(null),n(H(o.id))}async function je(o){await q(),p(o.id),b(null),n(H(o.id))}function Ce(){i&&(p(i.id),n(Xe(i.id,"git")))}function Se(){i&&(p(i.id),n(Qe(i.id)))}function Ie(){i&&(p(i.id),n(ze(i.id)))}function Te(){i&&(p(i.id),n($e(i.id)))}function _(){i&&n(We(i.id))}function Z(){i&&R(!0)}function Le(o,s){R(!1),de(o,s)}function ye(){i&&(p(i.id),n(H(i.id)))}function Ae(o){p(o)}const Re=[{label:t("shell.workspaceHomeMetricActive"),value:P.length,accent:x(P.length),onClick:S.length>0?_:void 0},{label:t("shell.workspaceHomeMetricUnread"),value:Q,accent:x(Q),onClick:()=>M(!0)},{label:t("shell.workspaceHomeMetricTerminal"),value:d.terminalLoading?"…":d.activeTerminalCount??"—",accent:d.terminalLoading===!1&&x(d.activeTerminalCount),onClick:i?Se:void 0},{label:t("shell.workspaceHomeMetricChanges"),value:d.gitLoading?"…":d.changedFileCount??"—",accent:d.gitLoading===!1&&x(d.changedFileCount),onClick:i?Ce:void 0}],Me=[{label:t("shell.workspaceHomeWaitingInputLabel"),value:z.length,accent:x(z.length),onClick:S.length>0?_:void 0},{label:t("shell.workspaceHomeButlerLabel"),value:f.loading?"…":f.activeTaskCount,accent:f.loading===!1&&x(f.activeTaskCount),onClick:i?Te:void 0},{label:t("shell.workspaceHomeQuickLaunchStatusLabel"),value:Ne,accent:d.quickLaunchRunning===!0,onClick:i?Ie:void 0},{label:t("shell.butlerInboxAction"),value:f.loading?"…":f.pendingInboxCount,accent:f.loading===!1&&x(f.pendingInboxCount),onClick:i?()=>$(!0):void 0}];return e.jsxs("main",{className:"mobile-feature-page mobile-page-scroll-root mobile-page-with-top-header mobile-workspace-home-page",children:[e.jsx(Ze,{currentWorkspace:I?{id:I.workspace.id,name:I.label,path:I.subtitle}:null,workspaces:u.map(o=>o.workspace),workspaceOptions:E,onSelectWorkspace:Ae,sheetContent:o=>e.jsxs("div",{className:"mobile-workspace-home-group mobile-workspace-home-sheet-group",children:[e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-sheet-row",onClick:()=>{o(),b("import")},children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:t("shell.importWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]}),e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-sheet-row",onClick:()=>{o(),b("clone")},children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:t("shell.cloneWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]})]})}),i?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"mobile-page-top-body mobile-workspace-home-body",children:[e.jsx("section",{className:"mobile-workspace-home-section",children:e.jsx("div",{className:"mobile-workspace-home-metrics-card","aria-label":t("shell.workspaceHomeStatusSectionTitle"),children:e.jsx("div",{className:"mobile-workspace-home-toolbar-summary",children:Re.map(o=>o.onClick?e.jsxs("button",{type:"button",className:"mobile-workspace-home-toolbar-metric","data-accent":o.accent?"true":void 0,onClick:o.onClick,children:[e.jsx("strong",{className:"mobile-workspace-home-toolbar-metric-value",children:o.value}),e.jsx("span",{className:"mobile-workspace-home-toolbar-metric-label",children:o.label})]},o.label):e.jsxs("div",{className:"mobile-workspace-home-toolbar-metric","data-accent":o.accent?"true":void 0,role:"listitem",children:[e.jsx("strong",{className:"mobile-workspace-home-toolbar-metric-value",children:o.value}),e.jsx("span",{className:"mobile-workspace-home-toolbar-metric-label",children:o.label})]},o.label))})})}),e.jsx("section",{className:"mobile-workspace-home-section",children:e.jsxs("div",{className:"mobile-workspace-home-primary-actions",children:[e.jsx("button",{type:"button",className:"secondary-button",onClick:ye,children:t("shell.workspaceDetailTitle")}),e.jsx("button",{type:"button",className:"primary-button",onClick:Z,children:t("shell.createSession")})]})}),e.jsx("section",{className:"mobile-workspace-home-section",children:e.jsx("div",{className:"mobile-workspace-home-group",children:Me.map(o=>e.jsxs("button",{type:"button",className:"mobile-workspace-home-row","data-accent":o.accent?"true":void 0,onClick:o.onClick,children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:o.label}),e.jsxs("span",{className:"mobile-workspace-home-row-trailing",children:[e.jsx("strong",{children:o.value}),e.jsx(k,{})]})]},o.label))})}),e.jsxs("section",{className:"mobile-workspace-home-section",children:[e.jsxs("div",{className:"mobile-workspace-home-section-header",children:[e.jsx("p",{className:"mobile-workspace-home-section-title",children:t("shell.workspaceHomeActiveSessionsSectionTitle")}),i?e.jsx("button",{type:"button",className:"mobile-workspace-home-link-button",onClick:_,children:t("shell.workspaceHomeViewAllAction")}):null]}),e.jsx("div",{className:"mobile-workspace-home-group",children:J.length===0?e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-empty-row",onClick:Z,children:[e.jsxs("div",{className:"mobile-workspace-home-session-main",children:[e.jsx("span",{className:"mobile-workspace-home-session-title",children:t("shell.createSession")}),e.jsx("span",{className:"mobile-workspace-home-session-meta",children:i.name})]}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]}):J.map(o=>e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-session-row",onClick:()=>n(ne(i.id,o.sessionId)),children:[e.jsxs("div",{className:"mobile-workspace-home-session-main",children:[e.jsx("span",{className:"mobile-workspace-home-session-title",children:o.title||t("common.unknown")}),e.jsxs("span",{className:"mobile-workspace-home-session-meta",children:[se(o.provider,"full")," · ",ce(le(o))]})]}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]},o.sessionId))})]}),Y.length>0?e.jsxs("section",{className:"mobile-workspace-home-section",children:[e.jsx("div",{className:"mobile-workspace-home-section-header",children:e.jsx("p",{className:"mobile-workspace-home-section-title",children:t("shell.favoriteSectionTitle")})}),e.jsx("div",{className:"mobile-workspace-home-group",children:Y.map(o=>e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-session-row",onClick:()=>n(ne(i.id,o.sessionId)),children:[e.jsxs("div",{className:"mobile-workspace-home-session-main",children:[e.jsx("span",{className:"mobile-workspace-home-session-title",children:o.title||t("common.unknown")}),e.jsxs("span",{className:"mobile-workspace-home-session-meta",children:[se(o.provider,"full")," · ",ce(le(o))]})]}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]},o.sessionId))})]}):null]})}):e.jsx("div",{className:"mobile-page-top-body mobile-workspace-home-body",children:e.jsxs("section",{className:"mobile-workspace-home-section mobile-workspace-home-empty",children:[e.jsx("p",{className:"mobile-workspace-home-section-title",children:t("shell.workspaceHomeSwitcherTitle")}),e.jsxs("div",{className:"mobile-workspace-home-group",children:[e.jsxs("button",{type:"button",className:"mobile-workspace-home-row",onClick:()=>b("import"),children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:t("shell.importWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]}),e.jsxs("button",{type:"button",className:"mobile-workspace-home-row",onClick:()=>b("clone"),children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:t("shell.cloneWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(k,{})})]})]})]})}),e.jsx(Fe,{open:X==="import",onClose:()=>b(null),onImported:xe}),e.jsx(Oe,{open:X==="clone",onClose:()=>b(null),onCloned:je}),e.jsx(oi,{open:we,workspaces:u.map(o=>o.workspace),workspaceOptions:E,initialWorkspaceId:(i==null?void 0:i.id)??O??null,onClose:()=>R(!1),onSelect:Le}),e.jsx(qe,{open:ke,preferredWorkspaceId:(i==null?void 0:i.id)??null,compactComposer:!0,onClose:()=>$(!1)}),e.jsx(li,{open:ge,notifications:me,archivedNotificationIds:ue,showArchivedNotifications:he,onClose:()=>M(!1),onToggleShowArchivedNotifications:pe,onArchiveNotification:be,onUnarchiveNotification:fe,onSelectNotification:o=>{M(!1),o.routePath&&n(o.routePath)}})]})}function B(n){return`git-sidebar.snapshot.${n}`}function F(n){return`terminal-manager.snapshot.${n}`}function k(){return e.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:e.jsx("path",{d:"M6 3.5L10.5 8 6 12.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.6"})})}export{Si as WorkspaceHomePage};
@@ -1 +1 @@
1
- import{e as d,C as a,h as u,i as c}from"./index-C-0oeG_5.js";async function l(){const t=d.getState().platform==="web"?"web":"desktop";return await a.request(`/api/client/runtime-config?platform=${encodeURIComponent(t)}`)}async function g(){const n=d.getState(),t=u(n);if(!t)return;const s=await l(),r=p(s.relayTunnel);if(m(t.relayTunnel??null,r))return;const e=new Date().toISOString();if(c(t)){d.updateRuntime({discoveredHosts:n.discoveredHosts.map(i=>i.id===t.id?{...i,relayTunnel:r,updatedAt:e}:i)});return}await d.update({hosts:n.hosts.map(i=>i.id===t.id?{...i,relayTunnel:r,updatedAt:e}:i)})}function p(n){return!n||n.provider!=="codingns_relay"||!n.controlBaseUrl||!n.tunnelDomain||!n.bindingId?null:{provider:n.provider,enabled:n.enabled,controlBaseUrl:n.controlBaseUrl,tunnelDomain:n.tunnelDomain.trim().toLowerCase(),bindingId:n.bindingId,hostFingerprint:n.hostFingerprint,candidateEndpoints:n.candidateEndpoints}}function m(n,t){if(n===t)return!0;if(!n||!t)return n===t;if(n.provider!==t.provider||n.enabled!==t.enabled||n.controlBaseUrl!==t.controlBaseUrl||n.tunnelDomain!==t.tunnelDomain||(n.bindingId??null)!==(t.bindingId??null)||(n.hostFingerprint??null)!==(t.hostFingerprint??null))return!1;const s=n.candidateEndpoints??[],r=t.candidateEndpoints??[];return s.length!==r.length?!1:s.every((e,i)=>{const o=r[i];return e.endpointId===(o==null?void 0:o.endpointId)&&e.kind===o.kind&&e.url===o.url&&e.priority===o.priority&&e.expiresAt===o.expiresAt&&e.source===o.source})}export{l as fetchAuthenticatedClientRuntimeConfig,g as syncActiveHostAuthenticatedRuntimeConfig};
1
+ import{e as d,C as a,h as u,i as c}from"./index-DSw-TkQL.js";async function l(){const t=d.getState().platform==="web"?"web":"desktop";return await a.request(`/api/client/runtime-config?platform=${encodeURIComponent(t)}`)}async function g(){const n=d.getState(),t=u(n);if(!t)return;const s=await l(),r=p(s.relayTunnel);if(m(t.relayTunnel??null,r))return;const e=new Date().toISOString();if(c(t)){d.updateRuntime({discoveredHosts:n.discoveredHosts.map(i=>i.id===t.id?{...i,relayTunnel:r,updatedAt:e}:i)});return}await d.update({hosts:n.hosts.map(i=>i.id===t.id?{...i,relayTunnel:r,updatedAt:e}:i)})}function p(n){return!n||n.provider!=="codingns_relay"||!n.controlBaseUrl||!n.tunnelDomain||!n.bindingId?null:{provider:n.provider,enabled:n.enabled,controlBaseUrl:n.controlBaseUrl,tunnelDomain:n.tunnelDomain.trim().toLowerCase(),bindingId:n.bindingId,hostFingerprint:n.hostFingerprint,candidateEndpoints:n.candidateEndpoints}}function m(n,t){if(n===t)return!0;if(!n||!t)return n===t;if(n.provider!==t.provider||n.enabled!==t.enabled||n.controlBaseUrl!==t.controlBaseUrl||n.tunnelDomain!==t.tunnelDomain||(n.bindingId??null)!==(t.bindingId??null)||(n.hostFingerprint??null)!==(t.hostFingerprint??null))return!1;const s=n.candidateEndpoints??[],r=t.candidateEndpoints??[];return s.length!==r.length?!1:s.every((e,i)=>{const o=r[i];return e.endpointId===(o==null?void 0:o.endpointId)&&e.kind===o.kind&&e.url===o.url&&e.priority===o.priority&&e.expiresAt===o.expiresAt&&e.source===o.source})}export{l as fetchAuthenticatedClientRuntimeConfig,g as syncActiveHostAuthenticatedRuntimeConfig};
@@ -1,4 +1,4 @@
1
- import{g as Sr,j as T,b as q,t as j,J as Fi,H as Ri,D as Ni,A as _i}from"./index-C-0oeG_5.js";import{D as Oi}from"./WorkbenchModal-ColqvV6a.js";import{f as ji,e as Bi}from"./App-Dsf3ooXU.js";import{bl as Mt,bm as Vi}from"./WorkbenchLayout-pOZvEqp7.js";function Ui(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$i={};function Mn(e,t){return($i.jsx?Wi:Hi).test(e)}const qi=/[ \t\n\f\r]/g;function Yi(e){return typeof e=="object"?e.type==="text"?Dn(e.value):!1:Dn(e)}function Dn(e){return e.replace(qi,"")===""}class rt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}rt.prototype.normal={};rt.prototype.property={};rt.prototype.space=void 0;function vr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new rt(n,r,t)}function Jt(e){return e.toLowerCase()}class ae{constructor(t,n){this.attribute=n,this.property=t}}ae.prototype.attribute="";ae.prototype.booleanish=!1;ae.prototype.boolean=!1;ae.prototype.commaOrSpaceSeparated=!1;ae.prototype.commaSeparated=!1;ae.prototype.defined=!1;ae.prototype.mustUseProperty=!1;ae.prototype.number=!1;ae.prototype.overloadedBoolean=!1;ae.prototype.property="";ae.prototype.spaceSeparated=!1;ae.prototype.space=void 0;let Xi=0;const _=Fe(),J=Fe(),Kt=Fe(),C=Fe(),G=Fe(),Ve=Fe(),ue=Fe();function Fe(){return 2**++Xi}const en=Object.freeze(Object.defineProperty({__proto__:null,boolean:_,booleanish:J,commaOrSpaceSeparated:ue,commaSeparated:Ve,number:C,overloadedBoolean:Kt,spaceSeparated:G},Symbol.toStringTag,{value:"Module"})),Dt=Object.keys(en);class hn extends ae{constructor(t,n,r,i){let o=-1;if(super(t,n),Fn(this,"space",i),typeof r=="number")for(;++o<Dt.length;){const l=Dt[o];Fn(this,Dt[o],(r&en[l])===en[l])}}}hn.prototype.defined=!0;function Fn(e,t,n){n&&(e[t]=n)}function He(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new hn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Jt(r)]=r,n[Jt(o.attribute)]=r}return new rt(t,n,e.space)}const Cr=He({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:J,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:G,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:C,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:G,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:J,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Er(e,t){return t in e?e[t]:t}function Ir(e,t){return Er(e,t.toLowerCase())}const Gi=He({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ve,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:_,allowPaymentRequest:_,allowUserMedia:_,alt:null,as:null,async:_,autoCapitalize:null,autoComplete:G,autoFocus:_,autoPlay:_,blocking:G,capture:null,charSet:null,checked:_,cite:null,className:G,cols:C,colSpan:null,content:null,contentEditable:J,controls:_,controlsList:G,coords:C|Ve,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_,defer:_,dir:null,dirName:null,disabled:_,download:Kt,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_,formTarget:null,headers:G,height:C,hidden:Kt,high:C,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:_,inputMode:null,integrity:null,is:null,isMap:_,itemId:null,itemProp:G,itemRef:G,itemScope:_,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:_,muted:_,name:null,nonce:null,noModule:_,noValidate:_,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:_,optimum:C,pattern:null,ping:G,placeholder:null,playsInline:_,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_,referrerPolicy:null,rel:G,required:_,reversed:_,rows:C,rowSpan:C,sandbox:G,scope:null,scoped:_,seamless:_,selected:_,shadowRootClonable:_,shadowRootDelegatesFocus:_,shadowRootMode:null,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:_,useMap:null,value:J,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_,declare:_,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:_,noHref:_,noShade:_,noWrap:_,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_,disableRemotePlayback:_,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:Ir}),Qi=He({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ue,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:G,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:_,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ve,g2:Ve,glyphName:Ve,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:ue,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:C,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ue,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ue,rev:ue,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ue,requiredFeatures:ue,requiredFonts:ue,requiredFormats:ue,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:ue,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ue,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ue,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Er}),Lr=He({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Tr=He({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ir}),Pr=He({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Zi={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Ji=/[A-Z]/g,Rn=/-[a-z]/g,Ki=/^data[-\w.:]+$/i;function el(e,t){const n=Jt(t);let r=t,i=ae;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ki.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Rn,nl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Rn.test(o)){let l=o.replace(Ji,tl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=hn}return new i(r,t)}function tl(e){return"-"+e.toLowerCase()}function nl(e){return e.charAt(1).toUpperCase()}const rl=vr([Cr,Gi,Lr,Tr,Pr],"html"),pn=vr([Cr,Qi,Lr,Tr,Pr],"svg");function il(e){return e.join(" ").trim()}var Oe={},Ft,Nn;function ll(){if(Nn)return Ft;Nn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
1
+ import{g as Sr,j as T,b as q,t as j,J as Fi,H as Ri,D as Ni,A as _i}from"./index-DSw-TkQL.js";import{D as Oi}from"./WorkbenchModal-LNfB69qx.js";import{f as ji,e as Bi}from"./App-B9HcTkMT.js";import{bp as Mt,bq as Vi}from"./WorkbenchLayout-DlbgBT3n.js";function Ui(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$i={};function Mn(e,t){return($i.jsx?Wi:Hi).test(e)}const qi=/[ \t\n\f\r]/g;function Yi(e){return typeof e=="object"?e.type==="text"?Dn(e.value):!1:Dn(e)}function Dn(e){return e.replace(qi,"")===""}class rt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}rt.prototype.normal={};rt.prototype.property={};rt.prototype.space=void 0;function vr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new rt(n,r,t)}function Jt(e){return e.toLowerCase()}class ae{constructor(t,n){this.attribute=n,this.property=t}}ae.prototype.attribute="";ae.prototype.booleanish=!1;ae.prototype.boolean=!1;ae.prototype.commaOrSpaceSeparated=!1;ae.prototype.commaSeparated=!1;ae.prototype.defined=!1;ae.prototype.mustUseProperty=!1;ae.prototype.number=!1;ae.prototype.overloadedBoolean=!1;ae.prototype.property="";ae.prototype.spaceSeparated=!1;ae.prototype.space=void 0;let Xi=0;const _=Fe(),J=Fe(),Kt=Fe(),C=Fe(),G=Fe(),Ve=Fe(),ue=Fe();function Fe(){return 2**++Xi}const en=Object.freeze(Object.defineProperty({__proto__:null,boolean:_,booleanish:J,commaOrSpaceSeparated:ue,commaSeparated:Ve,number:C,overloadedBoolean:Kt,spaceSeparated:G},Symbol.toStringTag,{value:"Module"})),Dt=Object.keys(en);class hn extends ae{constructor(t,n,r,i){let o=-1;if(super(t,n),Fn(this,"space",i),typeof r=="number")for(;++o<Dt.length;){const l=Dt[o];Fn(this,Dt[o],(r&en[l])===en[l])}}}hn.prototype.defined=!0;function Fn(e,t,n){n&&(e[t]=n)}function He(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new hn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Jt(r)]=r,n[Jt(o.attribute)]=r}return new rt(t,n,e.space)}const Cr=He({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:J,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:G,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:C,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:G,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:J,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Er(e,t){return t in e?e[t]:t}function Ir(e,t){return Er(e,t.toLowerCase())}const Gi=He({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ve,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:_,allowPaymentRequest:_,allowUserMedia:_,alt:null,as:null,async:_,autoCapitalize:null,autoComplete:G,autoFocus:_,autoPlay:_,blocking:G,capture:null,charSet:null,checked:_,cite:null,className:G,cols:C,colSpan:null,content:null,contentEditable:J,controls:_,controlsList:G,coords:C|Ve,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_,defer:_,dir:null,dirName:null,disabled:_,download:Kt,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_,formTarget:null,headers:G,height:C,hidden:Kt,high:C,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:_,inputMode:null,integrity:null,is:null,isMap:_,itemId:null,itemProp:G,itemRef:G,itemScope:_,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:_,muted:_,name:null,nonce:null,noModule:_,noValidate:_,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:_,optimum:C,pattern:null,ping:G,placeholder:null,playsInline:_,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_,referrerPolicy:null,rel:G,required:_,reversed:_,rows:C,rowSpan:C,sandbox:G,scope:null,scoped:_,seamless:_,selected:_,shadowRootClonable:_,shadowRootDelegatesFocus:_,shadowRootMode:null,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:_,useMap:null,value:J,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_,declare:_,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:_,noHref:_,noShade:_,noWrap:_,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_,disableRemotePlayback:_,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:Ir}),Qi=He({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ue,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:G,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:_,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ve,g2:Ve,glyphName:Ve,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:ue,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:C,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ue,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ue,rev:ue,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ue,requiredFeatures:ue,requiredFonts:ue,requiredFormats:ue,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:ue,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ue,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ue,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Er}),Lr=He({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Tr=He({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ir}),Pr=He({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Zi={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Ji=/[A-Z]/g,Rn=/-[a-z]/g,Ki=/^data[-\w.:]+$/i;function el(e,t){const n=Jt(t);let r=t,i=ae;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ki.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Rn,nl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Rn.test(o)){let l=o.replace(Ji,tl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=hn}return new i(r,t)}function tl(e){return"-"+e.toLowerCase()}function nl(e){return e.charAt(1).toUpperCase()}const rl=vr([Cr,Gi,Lr,Tr,Pr],"html"),pn=vr([Cr,Qi,Lr,Tr,Pr],"svg");function il(e){return e.join(" ").trim()}var Oe={},Ft,Nn;function ll(){if(Nn)return Ft;Nn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
2
2
  `,u="/",f="*",c="",p="comment",h="declaration";function g(S,x){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];x=x||{};var E=1,v=1;function R(z){var L=z.match(t);L&&(E+=L.length);var $=z.lastIndexOf(s);v=~$?z.length-$:v+z.length}function D(){var z={line:E,column:v};return function(L){return L.position=new w(z),O(),L}}function w(z){this.start=z,this.end={line:E,column:v},this.source=x.source}w.prototype.content=S;function N(z){var L=new Error(x.source+":"+E+":"+v+": "+z);if(L.reason=z,L.filename=x.source,L.line=E,L.column=v,L.source=S,!x.silent)throw L}function V(z){var L=z.exec(S);if(L){var $=L[0];return R($),S=S.slice($.length),L}}function O(){V(n)}function k(z){var L;for(z=z||[];L=P();)L!==!1&&z.push(L);return z}function P(){var z=D();if(!(u!=S.charAt(0)||f!=S.charAt(1))){for(var L=2;c!=S.charAt(L)&&(f!=S.charAt(L)||u!=S.charAt(L+1));)++L;if(L+=2,c===S.charAt(L-1))return N("End of comment missing");var $=S.slice(2,L-2);return v+=2,R($),S=S.slice(L),v+=2,z({type:p,comment:$})}}function A(){var z=D(),L=V(r);if(L){if(P(),!V(i))return N("property missing ':'");var $=V(o),Q=z({type:h,property:b(L[0].replace(e,c)),value:$?b($[0].replace(e,c)):c});return V(l),Q}}function U(){var z=[];k(z);for(var L;L=A();)L!==!1&&(z.push(L),k(z));return z}return O(),U()}function b(S){return S?S.replace(a,c):c}return Ft=g,Ft}var _n;function ol(){if(_n)return Oe;_n=1;var e=Oe&&Oe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.default=n;const t=e(ll());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return Oe}var Ye={},On;function al(){if(On)return Ye;On=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return Ye.camelCase=s,Ye}var Xe,jn;function sl(){if(jn)return Xe;jn=1;var e=Xe&&Xe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(ol()),n=al();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,s){a&&s&&(l[(0,n.camelCase)(a,o)]=s)}),l}return r.default=r,Xe=r,Xe}var ul=sl();const cl=Sr(ul),Ar=zr("end"),dn=zr("start");function zr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function fl(e){const t=dn(e),n=Ar(e);if(t&&n)return{start:t,end:n}}function Ze(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Bn(e.position):"start"in e||"end"in e?Bn(e):"line"in e||"column"in e?tn(e):""}function tn(e){return Vn(e&&e.line)+":"+Vn(e&&e.column)}function Bn(e){return tn(e&&e.start)+"-"+tn(e&&e.end)}function Vn(e){return e&&typeof e=="number"?e:1}class ie extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Ze(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ie.prototype.file="";ie.prototype.name="";ie.prototype.reason="";ie.prototype.message="";ie.prototype.stack="";ie.prototype.column=void 0;ie.prototype.line=void 0;ie.prototype.ancestors=void 0;ie.prototype.cause=void 0;ie.prototype.fatal=void 0;ie.prototype.place=void 0;ie.prototype.ruleId=void 0;ie.prototype.source=void 0;const mn={}.hasOwnProperty,hl=new Map,pl=/[A-Z]/g,dl=new Set(["table","tbody","thead","tfoot","tr"]),ml=new Set(["td","th"]),Mr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Cl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=vl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?pn:rl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Dr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Dr(e,t,n){if(t.type==="element")return xl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wl(e,t,n);if(t.type==="mdxjsEsm")return yl(e,t);if(t.type==="root")return bl(e,t,n);if(t.type==="text")return Sl(e,t)}function xl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=pn,e.schema=i),e.ancestors.push(t);const o=Rr(e,t.tagName,!1),l=El(e,t);let a=xn(e,t);return dl.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!Yi(s):!0})),Fr(e,l,o,t),gn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function kl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}tt(e,t.position)}function yl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tt(e,t.position)}function wl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=pn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Rr(e,t.name,!0),l=Il(e,t),a=xn(e,t);return Fr(e,l,o,t),gn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function bl(e,t,n){const r={};return gn(r,xn(e,t)),e.create(t,e.Fragment,r,n)}function Sl(e,t){return t.value}function Fr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vl(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function Cl(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),s=dn(r);return t(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function El(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&mn.call(t.properties,i)){const o=Ll(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&ml.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Il(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else tt(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else tt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function xn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:hl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=Dr(e,o,l);a!==void 0&&n.push(a)}return n}function Ll(e,t,n){const r=el(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ui(n):il(n)),r.property==="style"){let i=typeof n=="object"?n:Tl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Pl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Zi[r.property]||r.property:r.attribute,n]}}function Tl(e,t){try{return cl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ie("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Mr+"#cannot-parse-style-attribute",i}}function Rr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=Mn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=Mn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return mn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);tt(e)}function tt(e,t){const n=new ie("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Mr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Pl(e){const t={};let n;for(n in e)mn.call(e,n)&&(t[Al(n)]=e[n]);return t}function Al(e){let t=e.replace(pl,zl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function zl(e){return"-"+e.toLowerCase()}const Rt={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ml={};function kn(e,t){const n=Ml,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Nr(e,r,i)}function Nr(e,t,n){if(Dl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Un(e.children,t,n)}return Array.isArray(e)?Un(e,t,n):""}function Un(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Nr(e[i],t,n);return r.join("")}function Dl(e){return!!(e&&typeof e=="object")}const Hn=document.createElement("i");function yn(e){const t="&"+e+";";Hn.innerHTML=t;const n=Hn.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ce(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function fe(e,t){return e.length>0?(ce(e,e.length,0,t),e):t}const Wn={}.hasOwnProperty;function _r(e){const t={};let n=-1;for(;++n<e.length;)Fl(t,e[n]);return t}function Fl(e,t){let n;for(n in t){const i=(Wn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Wn.call(i,l)||(i[l]=[]);const a=o[l];Rl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Rl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ce(e,0,0,r)}function Or(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ge(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const le=Pe(/[A-Za-z]/),re=Pe(/[\dA-Za-z]/),Nl=Pe(/[#-'*+\--9=?A-Z^-~]/);function gt(e){return e!==null&&(e<32||e===127)}const nn=Pe(/\d/),_l=Pe(/[\dA-Fa-f]/),Ol=Pe(/[!-/:-@[-`{-~]/);function M(e){return e!==null&&e<-2}function X(e){return e!==null&&(e<0||e===32)}function B(e){return e===-2||e===-1||e===32}const wt=Pe(new RegExp("\\p{P}|\\p{S}","u")),De=Pe(/\s/);function Pe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function We(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&re(e.charCodeAt(n+1))&&re(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function W(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return B(s)?(e.enter(n),a(s)):t(s)}function a(s){return B(s)&&o++<i?(e.consume(s),a):(e.exit(n),t(s))}}const jl={tokenize:Bl};function Bl(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),W(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return M(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Vl={tokenize:Ul},$n={tokenize:Hl};function Ul(e){const t=this,n=[];let r=0,i,o,l;return a;function a(v){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,s,u)(v)}return u(v)}function s(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&E();const R=t.events.length;let D=R,w;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){w=t.events[D][1].end;break}x(r);let N=R;for(;N<t.events.length;)t.events[N][1].end={...w},N++;return ce(t.events,D+1,0,t.events.slice(R)),t.events.length=N,u(v)}return a(v)}function u(v){if(r===n.length){if(!i)return p(v);if(i.currentConstruct&&i.currentConstruct.concrete)return g(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($n,f,c)(v)}function f(v){return i&&E(),x(r),p(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,g(v)}function p(v){return t.containerState={},e.attempt($n,h,g)(v)}function h(v){return r++,n.push([t.currentConstruct,t.containerState]),p(v)}function g(v){if(v===null){i&&E(),x(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(v)}function b(v){if(v===null){S(e.exit("chunkFlow"),!0),x(0),e.consume(v);return}return M(v)?(e.consume(v),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),b)}function S(v,R){const D=t.sliceStream(v);if(R&&D.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(D),t.parser.lazy[v.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<l&&(!i.events[w][1].end||i.events[w][1].end.offset>l))return;const N=t.events.length;let V=N,O,k;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(O){k=t.events[V][1].end;break}O=!0}for(x(r),w=N;w<t.events.length;)t.events[w][1].end={...k},w++;ce(t.events,V+1,0,t.events.slice(N)),t.events.length=w}}function x(v){let R=n.length;for(;R-- >v;){const D=n[R];t.containerState=D[1],D[0].exit.call(t,e)}n.length=v}function E(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Hl(e,t,n){return W(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ue(e){if(e===null||X(e)||De(e))return 1;if(wt(e))return 2}function bt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const rn={name:"attention",resolveAll:Wl,tokenize:$l};function Wl(e,t){let n=-1,r,i,o,l,a,s,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};qn(c,-s),qn(p,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=fe(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=fe(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=fe(u,bt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=fe(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=fe(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ce(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $l(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ue(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=Ue(s),c=!f||f===2&&i||n.includes(s),p=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!p)),u._close=!!(o===42?p:p&&(f||!c)),t(s)}}function qn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ql={name:"autolink",tokenize:Yl};function Yl(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return le(h)?(e.consume(h),l):h===64?n(h):u(h)}function l(h){return h===43||h===45||h===46||re(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,s):(h===43||h===45||h===46||re(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function s(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||gt(h)?n(h):(e.consume(h),s)}function u(h){return h===64?(e.consume(h),f):Nl(h)?(e.consume(h),u):n(h)}function f(h){return re(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||re(h))&&r++<63){const g=h===45?p:c;return e.consume(h),g}return n(h)}}const it={partial:!0,tokenize:Xl};function Xl(e,t,n){return r;function r(o){return B(o)?W(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||M(o)?t(o):n(o)}}const jr={continuation:{tokenize:Ql},exit:Zl,name:"blockQuote",tokenize:Gl};function Gl(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return B(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Ql(e,t,n){const r=this;return i;function i(l){return B(l)?W(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(jr,t,n)(l)}}function Zl(e){e.exit("blockQuote")}const Br={name:"characterEscape",tokenize:Jl};function Jl(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Ol(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Vr={name:"characterReference",tokenize:Kl};function Kl(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=re,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=_l,f):(e.enter("characterReferenceValue"),o=7,l=nn,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===re&&!yn(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const Yn={partial:!0,tokenize:to},Xn={concrete:!0,name:"codeFenced",tokenize:eo};function eo(e,t,n){const r=this,i={partial:!0,tokenize:D};let o=0,l=0,a;return s;function s(w){return u(w)}function u(w){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===a?(l++,e.consume(w),f):l<3?n(w):(e.exit("codeFencedFenceSequence"),B(w)?W(e,c,"whitespace")(w):c(w))}function c(w){return w===null||M(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Yn,b,R)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||M(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):B(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),W(e,h,"whitespace")(w)):w===96&&w===a?n(w):(e.consume(w),p)}function h(w){return w===null||M(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===null||M(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===a?n(w):(e.consume(w),g)}function b(w){return e.attempt(i,R,S)(w)}function S(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),x}function x(w){return o>0&&B(w)?W(e,E,"linePrefix",o+1)(w):E(w)}function E(w){return w===null||M(w)?e.check(Yn,b,R)(w):(e.enter("codeFlowValue"),v(w))}function v(w){return w===null||M(w)?(e.exit("codeFlowValue"),E(w)):(e.consume(w),v)}function R(w){return e.exit("codeFenced"),t(w)}function D(w,N,V){let O=0;return k;function k(L){return w.enter("lineEnding"),w.consume(L),w.exit("lineEnding"),P}function P(L){return w.enter("codeFencedFence"),B(L)?W(w,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):A(L)}function A(L){return L===a?(w.enter("codeFencedFenceSequence"),U(L)):V(L)}function U(L){return L===a?(O++,w.consume(L),U):O>=l?(w.exit("codeFencedFenceSequence"),B(L)?W(w,z,"whitespace")(L):z(L)):V(L)}function z(L){return L===null||M(L)?(w.exit("codeFencedFence"),N(L)):V(L)}}}function to(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Nt={name:"codeIndented",tokenize:ro},no={partial:!0,tokenize:io};function ro(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),W(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):M(u)?e.attempt(no,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||M(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function io(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):W(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):M(l)?i(l):n(l)}}const lo={name:"codeText",previous:ao,resolve:oo,tokenize:so};function oo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ao(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function so(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):M(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||M(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class uo{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ge(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ge(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ge(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ge(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ge(this.left,n.reverse())}}}function Ge(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ur(e){const t={};let n=-1,r,i,o,l,a,s,u;const f=new uo(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,co(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return ce(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function co(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,p=-1,h=n,g=0,b=0;const S=[b];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(b=p+1,S.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):S.pop(),p=S.length;p--;){const x=a.slice(S[p],S[p+1]),E=o.pop();s.push([E,E+x.length-1]),e.splice(E,2,x)}for(s.reverse(),p=-1;++p<s.length;)u[g+s[p][0]]=g+s[p][1],g+=s[p][1]-s[p][0]-1;return u}const fo={resolve:po,tokenize:mo},ho={partial:!0,tokenize:go};function po(e){return Ur(e),e}function mo(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):M(a)?e.check(ho,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function go(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),W(e,o,"linePrefix")}function o(l){if(l===null||M(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Hr(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||gt(x)?n(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(a),p(x)):x===null||x===60||M(x)?n(x):(e.consume(x),x===92?g:h)}function g(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function b(x){return!f&&(x===null||x===41||X(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(x)):f<u&&x===40?(e.consume(x),f++,b):x===41?(e.consume(x),f--,b):x===null||x===32||x===40||gt(x)?n(x):(e.consume(x),x===92?S:b)}function S(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function Wr(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!s||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):M(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||M(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),s||(s=!B(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function $r(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,s):n(p)}function s(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===l?(e.exit(o),s(l)):p===null?n(p):M(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),W(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||M(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function Je(e,t){let n;return r;function r(i){return M(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):B(i)?W(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const xo={name:"definition",tokenize:yo},ko={partial:!0,tokenize:wo};function yo(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Wr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),s):n(h)}function s(h){return X(h)?Je(e,u)(h):u(h)}function u(h){return Hr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(ko,c,c)(h)}function c(h){return B(h)?W(e,p,"whitespace")(h):p(h)}function p(h){return h===null||M(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function wo(e,t,n){return r;function r(a){return X(a)?Je(e,i)(a):n(a)}function i(a){return $r(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return B(a)?W(e,l,"whitespace")(a):l(a)}function l(a){return a===null||M(a)?t(a):n(a)}}const bo={name:"hardBreakEscape",tokenize:So};function So(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return M(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const vo={name:"headingAtx",resolve:Co,tokenize:Eo};function Co(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ce(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Eo(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||X(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||M(f)?(e.exit("atxHeading"),t(f)):B(f)?W(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||X(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const Io=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gn=["pre","script","style","textarea"],Lo={concrete:!0,name:"htmlFlow",resolveTo:Ao,tokenize:zo},To={partial:!0,tokenize:Do},Po={partial:!0,tokenize:Mo};function Ao(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function zo(e,t,n){const r=this;let i,o,l,a,s;return u;function u(m){return f(m)}function f(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),p):m===47?(e.consume(m),o=!0,b):m===63?(e.consume(m),i=3,r.interrupt?t:d):le(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function p(m){return m===45?(e.consume(m),i=2,h):m===91?(e.consume(m),i=5,a=0,g):le(m)?(e.consume(m),i=4,r.interrupt?t:d):n(m)}function h(m){return m===45?(e.consume(m),r.interrupt?t:d):n(m)}function g(m){const ee="CDATA[";return m===ee.charCodeAt(a++)?(e.consume(m),a===ee.length?r.interrupt?t:A:g):n(m)}function b(m){return le(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function S(m){if(m===null||m===47||m===62||X(m)){const ee=m===47,de=l.toLowerCase();return!ee&&!o&&Gn.includes(de)?(i=1,r.interrupt?t(m):A(m)):Io.includes(l.toLowerCase())?(i=6,ee?(e.consume(m),x):r.interrupt?t(m):A(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(m):o?E(m):v(m))}return m===45||re(m)?(e.consume(m),l+=String.fromCharCode(m),S):n(m)}function x(m){return m===62?(e.consume(m),r.interrupt?t:A):n(m)}function E(m){return B(m)?(e.consume(m),E):k(m)}function v(m){return m===47?(e.consume(m),k):m===58||m===95||le(m)?(e.consume(m),R):B(m)?(e.consume(m),v):k(m)}function R(m){return m===45||m===46||m===58||m===95||re(m)?(e.consume(m),R):D(m)}function D(m){return m===61?(e.consume(m),w):B(m)?(e.consume(m),D):v(m)}function w(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),s=m,N):B(m)?(e.consume(m),w):V(m)}function N(m){return m===s?(e.consume(m),s=null,O):m===null||M(m)?n(m):(e.consume(m),N)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||X(m)?D(m):(e.consume(m),V)}function O(m){return m===47||m===62||B(m)?v(m):n(m)}function k(m){return m===62?(e.consume(m),P):n(m)}function P(m){return m===null||M(m)?A(m):B(m)?(e.consume(m),P):n(m)}function A(m){return m===45&&i===2?(e.consume(m),$):m===60&&i===1?(e.consume(m),Q):m===62&&i===4?(e.consume(m),te):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),he):M(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(To,pe,U)(m)):m===null||M(m)?(e.exit("htmlFlowData"),U(m)):(e.consume(m),A)}function U(m){return e.check(Po,z,pe)(m)}function z(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),L}function L(m){return m===null||M(m)?U(m):(e.enter("htmlFlowData"),A(m))}function $(m){return m===45?(e.consume(m),d):A(m)}function Q(m){return m===47?(e.consume(m),l="",ne):A(m)}function ne(m){if(m===62){const ee=l.toLowerCase();return Gn.includes(ee)?(e.consume(m),te):A(m)}return le(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),ne):A(m)}function he(m){return m===93?(e.consume(m),d):A(m)}function d(m){return m===62?(e.consume(m),te):m===45&&i===2?(e.consume(m),d):A(m)}function te(m){return m===null||M(m)?(e.exit("htmlFlowData"),pe(m)):(e.consume(m),te)}function pe(m){return e.exit("htmlFlow"),t(m)}}function Mo(e,t,n){const r=this;return i;function i(l){return M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Do(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(it,t,n)}}const Fo={name:"htmlText",tokenize:Ro};function Ro(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),D):d===63?(e.consume(d),v):le(d)?(e.consume(d),V):n(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,g):le(d)?(e.consume(d),E):n(d)}function f(d){return d===45?(e.consume(d),h):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),p):M(d)?(l=c,Q(d)):(e.consume(d),c)}function p(d){return d===45?(e.consume(d),h):c(d)}function h(d){return d===62?$(d):d===45?p(d):c(d)}function g(d){const te="CDATA[";return d===te.charCodeAt(o++)?(e.consume(d),o===te.length?b:g):n(d)}function b(d){return d===null?n(d):d===93?(e.consume(d),S):M(d)?(l=b,Q(d)):(e.consume(d),b)}function S(d){return d===93?(e.consume(d),x):b(d)}function x(d){return d===62?$(d):d===93?(e.consume(d),x):b(d)}function E(d){return d===null||d===62?$(d):M(d)?(l=E,Q(d)):(e.consume(d),E)}function v(d){return d===null?n(d):d===63?(e.consume(d),R):M(d)?(l=v,Q(d)):(e.consume(d),v)}function R(d){return d===62?$(d):v(d)}function D(d){return le(d)?(e.consume(d),w):n(d)}function w(d){return d===45||re(d)?(e.consume(d),w):N(d)}function N(d){return M(d)?(l=N,Q(d)):B(d)?(e.consume(d),N):$(d)}function V(d){return d===45||re(d)?(e.consume(d),V):d===47||d===62||X(d)?O(d):n(d)}function O(d){return d===47?(e.consume(d),$):d===58||d===95||le(d)?(e.consume(d),k):M(d)?(l=O,Q(d)):B(d)?(e.consume(d),O):$(d)}function k(d){return d===45||d===46||d===58||d===95||re(d)?(e.consume(d),k):P(d)}function P(d){return d===61?(e.consume(d),A):M(d)?(l=P,Q(d)):B(d)?(e.consume(d),P):O(d)}function A(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,U):M(d)?(l=A,Q(d)):B(d)?(e.consume(d),A):(e.consume(d),z)}function U(d){return d===i?(e.consume(d),i=void 0,L):d===null?n(d):M(d)?(l=U,Q(d)):(e.consume(d),U)}function z(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||X(d)?O(d):(e.consume(d),z)}function L(d){return d===47||d===62||X(d)?O(d):n(d)}function $(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function Q(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ne}function ne(d){return B(d)?W(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):he(d)}function he(d){return e.enter("htmlTextData"),l(d)}}const wn={name:"labelEnd",resolveAll:jo,resolveTo:Bo,tokenize:Vo},No={tokenize:Uo},_o={tokenize:Ho},Oo={tokenize:Wo};function jo(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ce(e,0,e.length,n),e}function Bo(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,t],["enter",u,t]],a=fe(a,e.slice(o+1,o+r+3)),a=fe(a,[["enter",f,t]]),a=fe(a,bt(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=fe(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=fe(a,e.slice(l+1)),a=fe(a,[["exit",s,t]]),ce(e,o,e.length,a),e}function Vo(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(ge(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),s):n(p)}function s(p){return p===40?e.attempt(No,f,l?f:c)(p):p===91?e.attempt(_o,f,l?u:c)(p):l?f(p):c(p)}function u(p){return e.attempt(Oo,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function Uo(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return X(c)?Je(e,o)(c):o(c)}function o(c){return c===41?f(c):Hr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return X(c)?Je(e,s)(c):f(c)}function a(c){return n(c)}function s(c){return c===34||c===39||c===40?$r(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return X(c)?Je(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function Ho(e,t,n){const r=this;return i;function i(a){return Wr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function Wo(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const $o={name:"labelStartImage",resolveAll:wn.resolveAll,tokenize:qo};function qo(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Yo={name:"labelStartLink",resolveAll:wn.resolveAll,tokenize:Xo};function Xo(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const _t={name:"lineEnding",tokenize:Go};function Go(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),W(e,t,"linePrefix")}}const dt={name:"thematicBreak",tokenize:Qo};function Qo(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||M(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),B(u)?W(e,a,"whitespace")(u):a(u))}}const oe={continuation:{tokenize:ea},exit:na,name:"list",tokenize:Ko},Zo={partial:!0,tokenize:ra},Jo={partial:!0,tokenize:ta};function Ko(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:nn(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(dt,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(h)}return n(h)}function s(h){return nn(h)&&++l<10?(e.consume(h),s):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(it,r.interrupt?n:f,e.attempt(Zo,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return B(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function ea(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(it,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,W(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!B(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Jo,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,W(e,e.attempt(oe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ta(e,t,n){const r=this;return W(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function na(e){e.exit(this.containerState.type)}function ra(e,t,n){const r=this;return W(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!B(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Qn={name:"setextUnderline",resolveTo:ia,tokenize:la};function ia(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function la(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),B(u)?W(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||M(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const oa={tokenize:aa};function aa(e){const t=this,n=e.attempt(it,r,e.attempt(this.parser.constructs.flowInitial,i,W(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fo,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sa={resolveAll:Yr()},ua=qr("string"),ca=qr("text");function qr(e){return{resolveAll:Yr(e==="text"?fa:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Yr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function fa(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const ha={42:oe,43:oe,45:oe,48:oe,49:oe,50:oe,51:oe,52:oe,53:oe,54:oe,55:oe,56:oe,57:oe,62:jr},pa={91:xo},da={[-2]:Nt,[-1]:Nt,32:Nt},ma={35:vo,42:dt,45:[Qn,dt],60:Lo,61:Qn,95:dt,96:Xn,126:Xn},ga={38:Vr,92:Br},xa={[-5]:_t,[-4]:_t,[-3]:_t,33:$o,38:Vr,42:rn,60:[ql,Fo],91:Yo,92:[bo,Br],93:wn,95:rn,96:lo},ka={null:[rn,sa]},ya={null:[42,95]},wa={null:[]},ba=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ya,contentInitial:pa,disable:wa,document:ha,flow:ma,flowInitial:da,insideSpan:ka,string:ga,text:xa},Symbol.toStringTag,{value:"Module"}));function Sa(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:N(D),check:N(w),consume:E,enter:v,exit:R,interrupt:N(w,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function c(P){return l=fe(l,P),S(),l[l.length-1]!==null?[]:(V(t,0),u.events=bt(o,u.events,u),u.events)}function p(P,A){return Ca(h(P),A)}function h(P){return va(l,P)}function g(){const{_bufferIndex:P,_index:A,line:U,column:z,offset:L}=r;return{_bufferIndex:P,_index:A,line:U,column:z,offset:L}}function b(P){i[P.line]=P.column,k()}function S(){let P;for(;r._index<l.length;){const A=l[r._index];if(typeof A=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<A.length;)x(A.charCodeAt(r._bufferIndex));else x(A)}}function x(P){f=f(P)}function E(P){M(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,k()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=P}function v(P,A){const U=A||{};return U.type=P,U.start=g(),u.events.push(["enter",U,u]),a.push(U),U}function R(P){const A=a.pop();return A.end=g(),u.events.push(["exit",A,u]),A}function D(P,A){V(P,A.from)}function w(P,A){A.restore()}function N(P,A){return U;function U(z,L,$){let Q,ne,he,d;return Array.isArray(z)?pe(z):"tokenize"in z?pe([z]):te(z);function te(K){return Ae;function Ae(xe){const Ce=xe!==null&&K[xe],Ee=xe!==null&&K.null,Ie=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return pe(Ie)(xe)}}function pe(K){return Q=K,ne=0,K.length===0?$:m(K[ne])}function m(K){return Ae;function Ae(xe){return d=O(),he=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?de():K.tokenize.call(A?Object.assign(Object.create(u),A):u,s,ee,de)(xe)}}function ee(K){return P(he,d),L}function de(K){return d.restore(),++ne<Q.length?m(Q[ne]):$}}}function V(P,A){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ce(u.events,A,u.events.length-A,P.resolve(u.events.slice(A),u)),P.resolveTo&&(u.events=P.resolveTo(u.events,u))}function O(){const P=g(),A=u.previous,U=u.currentConstruct,z=u.events.length,L=Array.from(a);return{from:z,restore:$};function $(){r=P,u.previous=A,u.currentConstruct=U,u.events.length=z,a=L,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function va(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ca(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
3
3
  `;break}case-3:{l=`\r
4
4
  `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Ea(e){const r={constructs:_r([ba,...(e||{}).extensions||[]]),content:i(jl),defined:[],document:i(Vl),flow:i(oa),lazy:{},string:i(ua),text:i(ca)};return r;function i(o){return l;function l(a){return Sa(r,o,a)}}}function Ia(e){for(;!Ur(e););return e}const Zn=/[\0\t\n\r]/g;function La(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Zn.lastIndex=c,u=Zn.exec(o),p=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(p),!u){t=o.slice(c);break}if(h===10&&c===p&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<p&&(s.push(o.slice(c,p)),e+=p-c),h){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const Ta=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Pa(e){return e.replace(Ta,Aa)}function Aa(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Or(n.slice(o?2:1),o?16:10)}return yn(n)||e}const Xr={}.hasOwnProperty;function za(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ma(n)(Ia(Ea(n).document().write(La()(e,t,!0))))}function Ma(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(at),autolinkProtocol:O,autolinkEmail:O,atxHeading:o(we),blockQuote:o(Ee),characterEscape:O,characterReference:O,codeFenced:o(Ie),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Ie,l),codeText:o(Lt,l),codeTextData:O,data:O,codeFlowValue:O,definition:o(Tt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Pt),hardBreakEscape:o(Le),hardBreakTrailing:o(Le),htmlFlow:o(ot,l),htmlFlowData:O,htmlText:o(ot,l),htmlTextData:O,image:o(At),label:l,link:o(at),listItem:o(zt),listItemValue:p,listOrdered:o(Re,c),listUnordered:o(Re),paragraph:o(st),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(we),strong:o(ut),thematicBreak:o(Ne)},exit:{atxHeading:s(),atxHeadingSequence:D,autolink:s(),autolinkEmail:Ce,autolinkProtocol:xe,blockQuote:s(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:K,characterReference:Ae,codeFenced:s(S),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:k,codeIndented:s(x),codeText:s(L),codeTextData:k,data:k,definition:s(),definitionDestinationString:R,definitionLabelString:E,definitionTitleString:v,emphasis:s(),hardBreakEscape:s(A),hardBreakTrailing:s(A),htmlFlow:s(U),htmlFlowData:k,htmlText:s(z),htmlTextData:k,image:s(Q),label:he,labelText:ne,lineEnding:P,link:s($),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:ee,resourceDestinationString:d,resourceTitleString:te,resource:pe,setextHeading:s(V),setextHeadingLineSequence:N,setextHeadingText:w,strong:s(),thematicBreak:s()}};Gr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(y){let I={type:"root",children:[]};const F={stack:[I],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},H=[];let Y=-1;for(;++Y<y.length;)if(y[Y][1].type==="listOrdered"||y[Y][1].type==="listUnordered")if(y[Y][0]==="enter")H.push(Y);else{const me=H.pop();Y=i(y,me,Y)}for(Y=-1;++Y<y.length;){const me=t[y[Y][0]];Xr.call(me,y[Y][1].type)&&me[y[Y][1].type].call(Object.assign({sliceSerialize:y[Y][2].sliceSerialize},F),y[Y][1])}if(F.tokenStack.length>0){const me=F.tokenStack[F.tokenStack.length-1];(me[1]||Jn).call(F,void 0,me[0])}for(I.position={start:Te(y.length>0?y[0][1].start:{line:1,column:1,offset:0}),end:Te(y.length>0?y[y.length-2][1].end:{line:1,column:1,offset:0})},Y=-1;++Y<t.transforms.length;)I=t.transforms[Y](I)||I;return I}function i(y,I,F){let H=I-1,Y=-1,me=!1,ze,be,$e,qe;for(;++H<=F;){const se=y[H];switch(se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{se[0]==="enter"?Y++:Y--,qe=void 0;break}case"lineEndingBlank":{se[0]==="enter"&&(ze&&!qe&&!Y&&!$e&&($e=H),qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qe=void 0}if(!Y&&se[0]==="enter"&&se[1].type==="listItemPrefix"||Y===-1&&se[0]==="exit"&&(se[1].type==="listUnordered"||se[1].type==="listOrdered")){if(ze){let _e=H;for(be=void 0;_e--;){const Se=y[_e];if(Se[1].type==="lineEnding"||Se[1].type==="lineEndingBlank"){if(Se[0]==="exit")continue;be&&(y[be][1].type="lineEndingBlank",me=!0),Se[1].type="lineEnding",be=_e}else if(!(Se[1].type==="linePrefix"||Se[1].type==="blockQuotePrefix"||Se[1].type==="blockQuotePrefixWhitespace"||Se[1].type==="blockQuoteMarker"||Se[1].type==="listItemIndent"))break}$e&&(!be||$e<be)&&(ze._spread=!0),ze.end=Object.assign({},be?y[be][1].start:se[1].end),y.splice(be||H,0,["exit",ze,se[2]]),H++,F++}if(se[1].type==="listItemPrefix"){const _e={type:"listItem",_spread:!1,start:Object.assign({},se[1].start),end:void 0};ze=_e,y.splice(H,0,["enter",_e,se[2]]),H++,F++,$e=void 0,qe=!0}}}return y[I][1]._spread=me,F}function o(y,I){return F;function F(H){a.call(this,y(H),H),I&&I.call(this,H)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(y,I,F){this.stack[this.stack.length-1].children.push(y),this.stack.push(y),this.tokenStack.push([I,F||void 0]),y.position={start:Te(I.start),end:void 0}}function s(y){return I;function I(F){y&&y.call(this,F),u.call(this,F)}}function u(y,I){const F=this.stack.pop(),H=this.tokenStack.pop();if(H)H[0].type!==y.type&&(I?I.call(this,y,H[0]):(H[1]||Jn).call(this,y,H[0]));else throw new Error("Cannot close `"+y.type+"` ("+Ze({start:y.start,end:y.end})+"): it’s not open");F.position.end=Te(y.end)}function f(){return kn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(y){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(y),10),this.data.expectingFirstListItemValue=void 0}}function h(){const y=this.resume(),I=this.stack[this.stack.length-1];I.lang=y}function g(){const y=this.resume(),I=this.stack[this.stack.length-1];I.meta=y}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y.replace(/(\r?\n|\r)$/g,"")}function E(y){const I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=ge(this.sliceSerialize(y)).toLowerCase()}function v(){const y=this.resume(),I=this.stack[this.stack.length-1];I.title=y}function R(){const y=this.resume(),I=this.stack[this.stack.length-1];I.url=y}function D(y){const I=this.stack[this.stack.length-1];if(!I.depth){const F=this.sliceSerialize(y).length;I.depth=F}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function N(y){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(y).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function O(y){const F=this.stack[this.stack.length-1].children;let H=F[F.length-1];(!H||H.type!=="text")&&(H=Z(),H.position={start:Te(y.start),end:void 0},F.push(H)),this.stack.push(H)}function k(y){const I=this.stack.pop();I.value+=this.sliceSerialize(y),I.position.end=Te(y.end)}function P(y){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=I.children[I.children.length-1];F.position.end=Te(y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(O.call(this,y),k.call(this,y))}function A(){this.data.atHardBreak=!0}function U(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y}function z(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y}function L(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y}function $(){const y=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";y.type+="Reference",y.referenceType=I,delete y.url,delete y.title}else delete y.identifier,delete y.label;this.data.referenceType=void 0}function Q(){const y=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";y.type+="Reference",y.referenceType=I,delete y.url,delete y.title}else delete y.identifier,delete y.label;this.data.referenceType=void 0}function ne(y){const I=this.sliceSerialize(y),F=this.stack[this.stack.length-2];F.label=Pa(I),F.identifier=ge(I).toLowerCase()}function he(){const y=this.stack[this.stack.length-1],I=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const H=y.children;F.children=H}else F.alt=I}function d(){const y=this.resume(),I=this.stack[this.stack.length-1];I.url=y}function te(){const y=this.resume(),I=this.stack[this.stack.length-1];I.title=y}function pe(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function ee(y){const I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=ge(this.sliceSerialize(y)).toLowerCase(),this.data.referenceType="full"}function de(y){this.data.characterReferenceType=y.type}function K(y){const I=this.sliceSerialize(y),F=this.data.characterReferenceType;let H;F?(H=Or(I,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):H=yn(I);const Y=this.stack[this.stack.length-1];Y.value+=H}function Ae(y){const I=this.stack.pop();I.position.end=Te(y.end)}function xe(y){k.call(this,y);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(y)}function Ce(y){k.call(this,y);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(y)}function Ee(){return{type:"blockquote",children:[]}}function Ie(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function Tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pt(){return{type:"emphasis",children:[]}}function we(){return{type:"heading",depth:0,children:[]}}function Le(){return{type:"break"}}function ot(){return{type:"html",value:""}}function At(){return{type:"image",title:null,url:"",alt:null}}function at(){return{type:"link",title:null,url:"",children:[]}}function Re(y){return{type:"list",ordered:y.type==="listOrdered",start:null,spread:y._spread,children:[]}}function zt(y){return{type:"listItem",spread:y._spread,checked:null,children:[]}}function st(){return{type:"paragraph",children:[]}}function ut(){return{type:"strong",children:[]}}function Z(){return{type:"text",value:""}}function Ne(){return{type:"thematicBreak"}}}function Te(e){return{line:e.line,column:e.column,offset:e.offset}}function Gr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Gr(e,r):Da(e,r)}}function Da(e,t){let n;for(n in t)if(Xr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Jn(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ze({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is still open")}function Fa(e){const t=this;t.parser=n;function n(r){return za(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ra(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Na(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`