@openchambery/web 1.19.7-beta.12 → 1.19.7-beta.14

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 (120) hide show
  1. package/dist/assets/{AgentAvatar-1RIRuaF8.js → AgentAvatar-BsU82CEP.js} +1 -1
  2. package/dist/assets/AssistantView-CKNR7FFf.js +2 -0
  3. package/dist/assets/{DiagramView-Jgb1oON6.js → DiagramView-Db1VvSIR.js} +1 -1
  4. package/dist/assets/Icon-4My8YZwt.js +1 -0
  5. package/dist/assets/{MarkdownRendererImpl-B7qGsJwS.js → MarkdownRendererImpl-NBG7O4aX.js} +1 -1
  6. package/dist/assets/{MarkstreamRendererImpl-D4-cJ29h.js → MarkstreamRendererImpl-Bs829ng-.js} +1 -1
  7. package/dist/assets/MobileDetailNavigation-CooM1BN7.js +1 -0
  8. package/dist/assets/{MobileShareBridge-CoV5RUGN.js → MobileShareBridge-CcG4lLaD.js} +3 -3
  9. package/dist/assets/MobileSurface-c_7RkYa2.js +2 -0
  10. package/dist/assets/{MultiRunWindow-zZTq3TR9.js → MultiRunWindow-Ds8nyikm.js} +1 -1
  11. package/dist/assets/{OnboardingScreen-dIL93btR.js → OnboardingScreen-BNEtPmvw.js} +1 -1
  12. package/dist/assets/SettingsView-Dac1dDOs.js +25 -0
  13. package/dist/assets/{SettingsWindow-VvBe4VUS.js → SettingsWindow-CHnMwzd6.js} +1 -1
  14. package/dist/assets/{TerminalView-DzuuW2xC.js → TerminalView-DfGueSOI.js} +1 -1
  15. package/dist/assets/{ToolOutputDialog-B-KWdQ6n.js → ToolOutputDialog-BrR9iqiW.js} +1 -1
  16. package/dist/assets/{appThemeRegistry-BwefILsK.js → appThemeRegistry-BEG7NRFm.js} +2 -2
  17. package/dist/assets/{clipboard-Bu0lpyX1.js → clipboard-BXxLshVq.js} +1 -1
  18. package/dist/assets/context-menu-Dpjla5p4.js +1 -0
  19. package/dist/assets/{dialog-CqZoOFxV.js → dialog-BkhHBTd4.js} +1 -1
  20. package/dist/assets/dropdown-menu.styles-Bzo6L3FH.js +1 -0
  21. package/dist/assets/{es-C8Sqjsia.js → es-BHqnSjoZ.js} +1 -1
  22. package/dist/assets/{fr-p-Zwm_j2.js → fr-BfrlJY9i.js} +1 -1
  23. package/dist/assets/{gitApi-qsia0bp_.js → gitApi-Br5EdS29.js} +3 -3
  24. package/dist/assets/insertionBoundaries-ncyYkgWy.js +4 -0
  25. package/dist/assets/{ja-B6REu1qP.js → ja-DP-7qt-x.js} +1 -1
  26. package/dist/assets/{ko-CJBNH9IZ.js → ko-E2B5vGQP.js} +1 -1
  27. package/dist/assets/main-DX_9iX64.js +169 -0
  28. package/dist/assets/{main-BDc3SZDh.js → main-Dl-XWJxN.js} +2 -2
  29. package/dist/assets/miniChat-Cho-Pywx.js +2 -0
  30. package/dist/assets/mobile-1_JD1EGE.js +2 -0
  31. package/dist/assets/multirun-ByFn3xhO.js +4 -0
  32. package/dist/assets/{pl-B2cBI_7K.js → pl-r8X5gRM5.js} +1 -1
  33. package/dist/assets/projectMeta-BHw8kRhQ.js +3 -0
  34. package/dist/assets/{pt-BR-CrCc9hmt.js → pt-BR-DcpdXCf5.js} +1 -1
  35. package/dist/assets/renderElectronMiniChatApp-CvIxnUQY.js +2 -0
  36. package/dist/assets/renderMobileApp-DscicBzZ.js +28 -0
  37. package/dist/assets/{runtimeConfig-DlXnolgR.js → runtimeConfig-Dkt3p8CZ.js} +1 -1
  38. package/dist/assets/runtimeEndpointReset-hBFsO83_.js +147 -0
  39. package/dist/assets/sessionChangeSummary-CX2MJIkc.js +1 -0
  40. package/dist/assets/sessionLookup-jCEot_fX.js +1 -0
  41. package/dist/assets/{sortable-tabs-strip-BXlIzqa7.js → sortable-tabs-strip-C5gGnikj.js} +1 -1
  42. package/dist/assets/src-KcdsQIuP.css +2 -0
  43. package/dist/assets/{store-CL3WP48T.js → store-BDFdnk6l.js} +2 -2
  44. package/dist/assets/textarea-CIO34TZz.js +1 -0
  45. package/dist/assets/{uk-C8YKAz0x.js → uk-Di0vl9V-.js} +1 -1
  46. package/dist/assets/{ChatContainer-BQ_CvZWh.js → useAppFontEffects-kJR0NlNH.js} +44 -39
  47. package/dist/assets/useDesktopWindowControlsLayout-BmbOASBQ.js +1 -0
  48. package/dist/assets/useEffectiveDirectory-DOToiRZd.js +1 -0
  49. package/dist/assets/useMobileNavigationStore-CEmn-d1X.js +412 -0
  50. package/dist/assets/useSessionAutoCleanup-DcmXMo-p.js +1 -0
  51. package/dist/assets/{useWorkerHighlightedLines-qT7eGzAd.js → useWorkerHighlightedLines-r5Ww4sY7.js} +1 -1
  52. package/dist/assets/{zh-CN-CCYwUnmB.js → zh-CN-coFCfeQE.js} +1 -1
  53. package/dist/assets/{zh-TW-D8Y6py08.js → zh-TW-oDRZ1-yb.js} +1 -1
  54. package/dist/index.html +3 -3
  55. package/dist/mini-chat.html +3 -3
  56. package/dist/mobile.html +3 -3
  57. package/package.json +2 -1
  58. package/server/index.js +2 -0
  59. package/server/lib/assistant-delivery-parts.js +3 -1
  60. package/server/lib/assistant-delivery-parts.test.js +11 -0
  61. package/server/lib/assistants/DOCUMENTATION.md +76 -3
  62. package/server/lib/assistants/assign.js +225 -0
  63. package/server/lib/assistants/assign.test.js +118 -0
  64. package/server/lib/assistants/bubbles.js +45 -0
  65. package/server/lib/assistants/bubbles.test.js +36 -0
  66. package/server/lib/assistants/cards.js +148 -0
  67. package/server/lib/assistants/cards.test.js +116 -0
  68. package/server/lib/assistants/contact-store.js +284 -0
  69. package/server/lib/assistants/contact-store.test.js +131 -0
  70. package/server/lib/assistants/contact-tools.js +761 -0
  71. package/server/lib/assistants/contact-tools.test.js +328 -0
  72. package/server/lib/assistants/contracts.js +20 -1
  73. package/server/lib/assistants/harness.js +551 -0
  74. package/server/lib/assistants/harness.test.js +607 -0
  75. package/server/lib/assistants/routes.js +44 -4
  76. package/server/lib/assistants/service.js +930 -17
  77. package/server/lib/assistants/service.test.js +1163 -45
  78. package/server/lib/llm/DOCUMENTATION.md +84 -0
  79. package/server/lib/llm/catalog.js +100 -0
  80. package/server/lib/llm/catalog.test.js +78 -0
  81. package/server/lib/llm/completions.js +151 -0
  82. package/server/lib/llm/completions.test.js +127 -0
  83. package/server/lib/llm/generate.js +570 -0
  84. package/server/lib/llm/generate.test.js +459 -0
  85. package/server/lib/llm/routes.js +47 -0
  86. package/server/lib/llm/temp-directory.js +37 -0
  87. package/server/lib/notifications/runtime.js +52 -0
  88. package/server/lib/notifications/runtime.test.js +39 -0
  89. package/server/lib/opencode/feature-routes-runtime.js +30 -0
  90. package/server/lib/opencode/feature-routes-runtime.test.js +20 -0
  91. package/server/lib/session-goal/DOCUMENTATION.md +8 -1
  92. package/server/lib/session-goal/runtime.js +20 -0
  93. package/server/lib/session-index/DOCUMENTATION.md +3 -1
  94. package/server/lib/session-index/service.js +10 -4
  95. package/server/lib/session-index/service.test.js +37 -0
  96. package/server/lib/session-title/runtime.js +1 -0
  97. package/server/lib/session-title/runtime.test.js +11 -0
  98. package/dist/assets/AssistantView-Dx6wJM_u.js +0 -1
  99. package/dist/assets/ContextPanel-CxyhC4np.js +0 -285
  100. package/dist/assets/Icon-Dyq9096D.js +0 -1
  101. package/dist/assets/MobileDetailNavigation-9CswAmDc.js +0 -1
  102. package/dist/assets/MobileSurface-BwaumJL3.js +0 -2
  103. package/dist/assets/SettingsView-W52Kp-63.js +0 -25
  104. package/dist/assets/insertionBoundaries-DMtWPk5T.js +0 -4
  105. package/dist/assets/main-D9gYAzkv.js +0 -29
  106. package/dist/assets/miniChat-B13loXHC.js +0 -2
  107. package/dist/assets/mobile-D51q7Id5.js +0 -2
  108. package/dist/assets/multirun-CeQOw-Ca.js +0 -4
  109. package/dist/assets/projectMeta-CpYdE3md.js +0 -3
  110. package/dist/assets/radio-CZyg9Qec.js +0 -1
  111. package/dist/assets/renderElectronMiniChatApp-Bkny4J22.js +0 -2
  112. package/dist/assets/renderMobileApp-oSwsZo38.js +0 -28
  113. package/dist/assets/runtimeEndpointReset-C4xC55MA.js +0 -4
  114. package/dist/assets/shikiHighlight-DAZFwEYg.js +0 -1
  115. package/dist/assets/src-DZt1nWf5.css +0 -2
  116. package/dist/assets/useAppFontEffects-aH8s8UNV.js +0 -7
  117. package/dist/assets/useDesktopWindowControlsLayout-DKq0CNXR.js +0 -1
  118. package/dist/assets/useEffectiveDirectory-Cx-a5Dx7.js +0 -1
  119. package/dist/assets/useMobileNavigationStore-ZrH3A3tf.js +0 -412
  120. package/dist/assets/useSessionAutoCleanup-CA8LmofT.js +0 -1
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{nt as t,rt as n}from"./vendor-base-ui-CnHfUmDN.js";import{t as r}from"./utils-B0mQXN9L.js";var i=e(n(),1),a={add:`<path d="M5 12h14" /> <path d="M12 5v14" />`,"add-circle":`<circle cx="12" cy="12" r="10" /> <path d="M8 12h8" /> <path d="M12 8v8" />`,"ai-agent":`<path d="M12 8V4H8" /> <rect width="16" height="12" x="4" y="8" rx="2" /> <path d="M2 14h2" /> <path d="M20 14h2" /> <path d="M15 13v2" /> <path d="M9 13v2" />`,"ai-agent-fill":`<path d="M12 8V4H8" fill="currentColor"/> <rect width="16" height="12" x="4" y="8" rx="2" /> <path d="M2 14h2" fill="currentColor"/> <path d="M20 14h2" fill="currentColor"/> <path d="M15 13v2" fill="currentColor"/> <path d="M9 13v2" fill="currentColor"/>`,"ai-generate-2":`<path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72" /> <path d="m14 7 3 3" /> <path d="M5 6v4" /> <path d="M19 14v4" /> <path d="M10 2v2" /> <path d="M7 8H3" /> <path d="M21 16h-4" /> <path d="M11 3H9" />`,alert:`<circle cx="12" cy="12" r="10" /> <line x1="12" x2="12" y1="8" y2="12" /> <line x1="12" x2="12.01" y1="16" y2="16" />`,"align-justify":`<path d="M3 5h18" /> <path d="M3 12h18" /> <path d="M3 19h18" />`,apple:`<path d="M12 6.528V3a1 1 0 0 1 1-1h0" /> <path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21" />`,"apps-2-ai":`<rect width="7" height="7" x="3" y="3" rx="1" /> <rect width="7" height="7" x="14" y="3" rx="1" /> <rect width="7" height="7" x="14" y="14" rx="1" /> <rect width="7" height="7" x="3" y="14" rx="1" />`,archive:`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" /> <path d="M10 12h4" />`,"archive-stack":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" /> <path d="M10 12h4" />`,"arrow-down":`<path d="M12 5v14" /> <path d="m19 12-7 7-7-7" />`,"arrow-down-s":`<path d="m6 9 6 6 6-6" />`,"arrow-go-back":`<path d="M9 14 4 9l5-5" /><path d="M4 9h10.5a5.5 5.5 0 0 1 0 11H12" />`,"arrow-go-forward":`<path d="m15 14 5-5-5-5" /> <path d="M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" />`,"arrow-left":`<path d="m12 19-7-7 7-7" /> <path d="M19 12H5" />`,"arrow-left-long":`<path d="m12 19-7-7 7-7" /> <path d="M19 12H5" />`,"arrow-left-right":`<path d="M8 7H3v5" /><path d="m3 7 7 7" /><path d="M16 17h5v-5" /><path d="m21 17-7-7" />`,"arrow-left-s":`<path d="m15 18-6-6 6-6" />`,"arrow-right":`<path d="M5 12h14" /> <path d="m12 5 7 7-7 7" />`,"arrow-right-s":`<path d="m9 18 6-6-6-6" />`,"arrow-up":`<path d="m5 12 7-7 7 7" /> <path d="M12 19V5" />`,"arrow-up-double":`<path d="m17 11-5-5-5 5" /> <path d="m17 18-5-5-5 5" />`,"arrow-up-s":`<path d="m18 15-6-6-6 6" />`,"attachment-2":`<path d="m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" />`,"bar-chart-2":`<path d="M3 3v16a2 2 0 0 0 2 2h16" /> <path d="M18 17V9" /> <path d="M13 17V5" /> <path d="M8 17v-3" />`,"bar-chart-box":`<path d="M3 3v16a2 2 0 0 0 2 2h16" /> <path d="M18 17V9" /> <path d="M13 17V5" /> <path d="M8 17v-3" />`,book:`<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" />`,"book-open":`<path d="M12 7v14" /> <path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z" />`,booklet:`<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" />`,brain:`<path d="M12 18V5" /> <path d="M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" /> <path d="M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" /> <path d="M17.997 5.125a4 4 0 0 1 2.526 5.77" /> <path d="M18 18a4 4 0 0 0 2-7.464" /> <path d="M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" /> <path d="M6 18a4 4 0 0 1-2-7.464" /> <path d="M6.003 5.125a4 4 0 0 0-2.526 5.77" />`,"brain-ai-3":`<path d="M12 18V5" /> <path d="M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" /> <path d="M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" /> <path d="M17.997 5.125a4 4 0 0 1 2.526 5.77" /> <path d="M18 18a4 4 0 0 0 2-7.464" /> <path d="M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" /> <path d="M6 18a4 4 0 0 1-2-7.464" /> <path d="M6.003 5.125a4 4 0 0 0-2.526 5.77" />`,briefcase:`<path d="M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16" /> <rect width="20" height="14" x="2" y="6" rx="2" />`,bug:`<path d="M12 20v-9" /> <path d="M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z" /> <path d="M14.12 3.88 16 2" /> <path d="M21 21a4 4 0 0 0-3.81-4" /> <path d="M21 5a4 4 0 0 1-3.55 3.97" /> <path d="M22 13h-4" /> <path d="M3 21a4 4 0 0 1 3.81-4" /> <path d="M3 5a4 4 0 0 0 3.55 3.97" /> <path d="M6 13H2" /> <path d="m8 2 1.88 1.88" /> <path d="M9 7.13V6a3 3 0 1 1 6 0v1.13" />`,calendar:`<path d="M8 2v4" /> <path d="M16 2v4" /> <rect width="18" height="18" x="3" y="4" rx="2" /> <path d="M3 10h18" />`,"calendar-schedule":`<path d="M16 14v2.2l1.6 1" /> <path d="M16 2v4" /> <path d="M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5" /> <path d="M3 10h5" /> <path d="M8 2v4" /> <circle cx="16" cy="16" r="6" />`,camera:`<path d="M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z" /> <circle cx="12" cy="13" r="3" />`,"chat-1":`<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />`,"chat-3":`<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />`,"chat-4":`<path d="M12 3a9 9 0 0 1 7.45 14.05L21 21l-4.05-1.55A9 9 0 1 1 12 3Z" />`,"chat-ai-3":`<path d="M12 6V2H8" /> <path d="M15 11v2" /> <path d="M2 12h2" /> <path d="M20 12h2" /> <path d="M20 16a2 2 0 0 1-2 2H8.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 4 20.286V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z" /> <path d="M9 11v2" />`,"chat-history":`<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" /> <path d="M12 7v5l4 2" />`,"chat-new":`<path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /> <path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" />`,"chat-thread":`<path d="M10.5 7C11.3 4.9 13.1 3.5 15.25 3.5c3.45 0 6.25 2.45 6.25 5.5 0 1.13-.38 2.18-1.03 3.06l.58 2.14-2.3-.75c-.4.18-.8.32-1.2.43" /><path d="M8.5 8.25c-3.6 0-6.5 2.55-6.5 5.75 0 1.21.42 2.33 1.13 3.25l-.63 2.27 2.48-.8c1.04.56 2.24.88 3.52.88 3.6 0 6.5-2.55 6.5-5.75S12.1 8.25 8.5 8.25Z" />`,check:`<path d="M20 6 9 17l-5-5" />`,checkbox:`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="m9 12 2 2 4-4" />`,"checkbox-blank":`<rect width="18" height="18" x="3" y="3" rx="2" />`,"checkbox-blank-circle-fill":`<circle cx="12" cy="12" r="10" fill="currentColor"/>`,"checkbox-circle":`<circle cx="12" cy="12" r="10" /> <path d="m9 12 2 2 4-4" />`,"checkbox-multiple":`<path d="m12 15 2 2 4-4" /> <rect width="14" height="14" x="8" y="8" rx="2" ry="2" /> <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />`,clipboard:`<rect width="8" height="4" x="8" y="2" rx="1" ry="1" /> <path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" />`,close:`<path d="M18 6 6 18" /> <path d="m6 6 12 12" />`,"close-circle":`<circle cx="12" cy="12" r="10" /> <path d="m15 9-6 6" /> <path d="m9 9 6 6" />`,cloud:`<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" />`,"cloud-off":`<path d="M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057" /> <path d="M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78" /> <path d="m2 2 20 20" />`,code:`<path d="m16 18 6-6-6-6" /> <path d="m8 6-6 6 6 6" />`,"code-ai":`<path d="m16 18 6-6-6-6" /> <path d="m8 6-6 6 6 6" />`,"code-box":`<path d="m18 16 4-4-4-4" /> <path d="m6 8-4 4 4 4" /> <path d="m14.5 4-5 16" />`,"code-sslash":`<path d="m16 18 6-6-6-6" /> <path d="m8 6-6 6 6 6" />`,command:`<path d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3" />`,"compass-3":`<circle cx="12" cy="12" r="10" /> <path d="m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" />`,computer:`<rect width="20" height="14" x="2" y="3" rx="2" /> <line x1="8" x2="16" y1="21" y2="21" /> <line x1="12" x2="12" y1="17" y2="21" />`,"contract-up-down":`<path d="m7 20 5-5 5 5" /> <path d="m7 4 5 5 5-5" />`,"corner-down-left":`<path d="M20 4v7a4 4 0 0 1-4 4H4" /> <path d="m9 10-5 5 5 5" />`,cursor:`<path d="M12.586 12.586 19 19" /> <path d="M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z" />`,"database-2":`<ellipse cx="12" cy="5" rx="9" ry="3" /> <path d="M3 5V19A9 3 0 0 0 21 19V5" /> <path d="M3 12A9 3 0 0 0 21 12" />`,"delete-bin":`<path d="M10 11v6" /> <path d="M14 11v6" /> <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /> <path d="M3 6h18" /> <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />`,"discord-fill":`<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" fill="currentColor"/>`,"donut-chart":`<path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" /> <path d="M21.21 15.89A10 10 0 1 1 8 2.83" />`,"donut-chart-fill":`<path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" fill="currentColor"/> <path d="M21.21 15.89A10 10 0 1 1 8 2.83" fill="currentColor"/>`,download:`<path d="M12 15V3" /> <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /> <path d="m7 10 5 5 5-5" />`,"download-cloud":`<path d="M12 13v8l-4-4" /> <path d="m12 21 4-4" /> <path d="M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284" />`,"drag-move-2":`<circle cx="9" cy="12" r="1" /> <circle cx="9" cy="5" r="1" /> <circle cx="9" cy="19" r="1" /> <circle cx="15" cy="12" r="1" /> <circle cx="15" cy="5" r="1" /> <circle cx="15" cy="19" r="1" />`,draggable:`<circle cx="9" cy="12" r="1" /> <circle cx="9" cy="5" r="1" /> <circle cx="9" cy="19" r="1" /> <circle cx="15" cy="12" r="1" /> <circle cx="15" cy="5" r="1" /> <circle cx="15" cy="19" r="1" />`,earth:`<circle cx="12" cy="12" r="10" /> <path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /> <path d="M2 12h20" />`,edit:`<path d="M15 5.5 18.5 9" /><path d="M4.5 19.5 5.75 14.75 15.25 5.25a2.1 2.1 0 0 1 3 0l.5.5a2.1 2.1 0 0 1 0 3L9.25 18.25Z" />`,"edit-2":`<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" />`,"emotion-happy":`<circle cx="12" cy="12" r="10" /> <path d="M8 14s1.5 2 4 2 4-2 4-2" /> <line x1="9" x2="9.01" y1="9" y2="9" /> <line x1="15" x2="15.01" y1="9" y2="9" />`,"equalizer-2":`<path d="M10 5H3" /> <path d="M12 19H3" /> <path d="M14 3v4" /> <path d="M16 17v4" /> <path d="M21 12h-9" /> <path d="M21 19h-5" /> <path d="M21 5h-7" /> <path d="M8 10v4" /> <path d="M8 12H3" />`,"error-warning":`<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /> <path d="M12 9v4" /> <path d="M12 17h.01" />`,"expand-up-down":`<path d="m7 15 5 5 5-5" /> <path d="m7 9 5-5 5 5" />`,"external-link":`<path d="M15 3h6v6" /> <path d="M10 14 21 3" /> <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />`,eye:`<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" /> <circle cx="12" cy="12" r="3" />`,"eye-off":`<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" /> <path d="M14.084 14.158a3 3 0 0 1-4.242-4.242" /> <path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" /> <path d="m2 2 20 20" />`,file:`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" />`,"file-add":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M9 15h6" /> <path d="M12 18v-6" />`,"file-check":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="m9 15 2 2 4-4" />`,"file-check-fill":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" fill="currentColor"/> <path d="M14 2v5a1 1 0 0 0 1 1h5" fill="currentColor"/> <path d="m9 15 2 2 4-4" fill="currentColor"/>`,"file-code":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 12.5 8 15l2 2.5" /> <path d="m14 12.5 2 2.5-2 2.5" />`,"file-copy":`<rect width="14" height="14" x="8" y="8" rx="3.5" ry="3.5" /><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />`,"file-copy-2":`<path d="M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8" /> <path d="M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z" /> <path d="M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1" />`,"file-download":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M12 18v-6" /> <path d="m9 15 3 3 3-3" />`,"file-edit":`<path d="M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z" />`,"file-image":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <circle cx="10" cy="12" r="2" /> <path d="m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22" />`,"file-list-2":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 9H8" /> <path d="M16 13H8" /> <path d="M16 17H8" />`,"file-music":`<path d="M11.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v10.35" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M8 20v-7l3 1.474" /> <circle cx="6" cy="20" r="2" />`,"file-pdf":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 9H8" /> <path d="M16 13H8" /> <path d="M16 17H8" />`,"file-search":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <circle cx="11.5" cy="14.5" r="2.5" /> <path d="M13.3 16.3 15 18" />`,"file-text":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 9H8" /> <path d="M16 13H8" /> <path d="M16 17H8" />`,"file-transfer":`<path d="M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M2 15h10" /> <path d="m9 18 3-3-3-3" />`,"file-video":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z" />`,flashlight:`<path d="M12 13v1" /> <path d="M17 2a1 1 0 0 1 1 1v4a3 3 0 0 1-.6 1.8l-.6.8A4 4 0 0 0 16 12v8a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2v-8a4 4 0 0 0-.8-2.4l-.6-.8A3 3 0 0 1 6 7V3a1 1 0 0 1 1-1z" /> <path d="M6 6h12" />`,flask:`<path d="M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2" /> <path d="M6.453 15h11.094" /> <path d="M8.5 2h7" />`,"fold-vertical":`<path d="M12 22v-6" /> <path d="M12 8V2" /> <path d="M4 12H2" /> <path d="M10 12H8" /> <path d="M16 12h-2" /> <path d="M22 12h-2" /> <path d="m15 19-3-3-3 3" /> <path d="m15 5-3 3-3-3" />`,folder:`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-3":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-3-fill":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-6":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-add":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" /><path d="M12 11v6" /><path d="M9 14h6" />`,"folder-open":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-open-fill":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-received":`<path d="M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1" /> <path d="M2 13h10" /> <path d="m9 16 3-3-3-3" />`,folders:`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,fullscreen:`<path d="M8 3H5a2 2 0 0 0-2 2v3" /> <path d="M21 8V5a2 2 0 0 0-2-2h-3" /> <path d="M3 16v3a2 2 0 0 0 2 2h3" /> <path d="M16 21h3a2 2 0 0 0 2-2v-3" />`,"fullscreen-exit":`<path d="M8 3v3a2 2 0 0 1-2 2H3" /> <path d="M21 8h-3a2 2 0 0 1-2-2V3" /> <path d="M3 16h3a2 2 0 0 1 2 2v3" /> <path d="M16 21v-3a2 2 0 0 1 2-2h3" />`,gamepad:`<line x1="6" x2="10" y1="11" y2="11" /> <line x1="8" x2="8" y1="9" y2="13" /> <line x1="15" x2="15.01" y1="12" y2="12" /> <line x1="18" x2="18.01" y1="10" y2="10" /> <path d="M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z" />`,"git-branch":`<circle cx="18" cy="6" r="2.6" /><circle cx="6" cy="18" r="2.6" /><path d="M6 15.4V3" /><path d="M18 8.6c0 4.6-3.4 7.4-9.4 8" />`,"git-close-pull-request":`<circle cx="6" cy="6" r="3" /> <path d="M6 9v12" /> <path d="m21 3-6 6" /> <path d="m21 9-6-6" /> <path d="M18 11.5V15" /> <circle cx="18" cy="18" r="3" />`,"git-commit":`<circle cx="12" cy="12" r="3" /> <line x1="3" x2="9" y1="12" y2="12" /> <line x1="15" x2="21" y1="12" y2="12" />`,"git-merge":`<circle cx="18" cy="18" r="3" /> <circle cx="6" cy="6" r="3" /> <path d="M6 21V9a9 9 0 0 0 9 9" />`,"git-pr-draft":`<circle cx="18" cy="18" r="3" /> <circle cx="6" cy="6" r="3" /> <path d="M18 6V5" /> <path d="M18 11v-1" /> <line x1="6" x2="6" y1="9" y2="21" />`,"git-pull-request":`<circle cx="18" cy="18" r="3" /> <circle cx="6" cy="6" r="3" /> <path d="M13 6h3a2 2 0 0 1 2 2v7" /> <line x1="6" x2="6" y1="9" y2="21" />`,"git-repository":`<path d="M18 19a5 5 0 0 1-5-5v8" /> <path d="M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5" /> <circle cx="13" cy="12" r="2" /> <circle cx="20" cy="19" r="2" />`,github:`<path d="M5.88401 18.6533C5.58404 18.4526 5.32587 18.1975 5.0239 17.8369C4.91473 17.7065 4.47283 17.1524 4.55811 17.2583C4.09533 16.6833 3.80296 16.417 3.50156 16.3089C2.9817 16.1225 2.7114 15.5499 2.89784 15.0301C3.08428 14.5102 3.65685 14.2399 4.17672 14.4263C4.92936 14.6963 5.43847 15.1611 6.12425 16.0143C6.03025 15.8974 6.46364 16.441 6.55731 16.5529C6.74784 16.7804 6.88732 16.9182 6.99629 16.9911C7.20118 17.1283 7.58451 17.1874 8.14709 17.1311C8.17065 16.7489 8.24136 16.3783 8.34919 16.0358C5.38097 15.3104 3.70116 13.3952 3.70116 9.63971C3.70116 8.40085 4.0704 7.28393 4.75917 6.3478C4.5415 5.45392 4.57433 4.37284 5.06092 3.15636C5.1725 2.87739 5.40361 2.66338 5.69031 2.57352C5.77242 2.54973 5.81791 2.53915 5.89878 2.52673C6.70167 2.40343 7.83573 2.69705 9.31449 3.62336C10.181 3.41879 11.0885 3.315 12.0012 3.315C12.9129 3.315 13.8196 3.4186 14.6854 3.62277C16.1619 2.69 17.2986 2.39649 18.1072 2.52651C18.1919 2.54013 18.2645 2.55783 18.3249 2.57766C18.6059 2.66991 18.8316 2.88179 18.9414 3.15636C19.4279 4.37256 19.4608 5.45344 19.2433 6.3472C19.9342 7.28337 20.3012 8.39208 20.3012 9.63971C20.3012 13.3968 18.627 15.3048 15.6588 16.032C15.7837 16.447 15.8496 16.9105 15.8496 17.4121C15.8496 18.0765 15.8471 18.711 15.8424 19.4225C15.8412 19.6127 15.8397 19.8159 15.8375 20.1281C16.2129 20.2109 16.5229 20.5077 16.6031 20.9089C16.7114 21.4504 16.3602 21.9773 15.8186 22.0856C14.6794 22.3134 13.8353 21.5538 13.8353 20.5611C13.8353 20.4708 13.836 20.3417 13.8375 20.1145C13.8398 19.8015 13.8412 19.599 13.8425 19.4094C13.8471 18.7019 13.8496 18.0716 13.8496 17.4121C13.8496 16.7148 13.6664 16.2602 13.4237 16.051C12.7627 15.4812 13.0977 14.3973 13.965 14.2999C16.9314 13.9666 18.3012 12.8177 18.3012 9.63971C18.3012 8.68508 17.9893 7.89571 17.3881 7.23559C17.1301 6.95233 17.0567 6.54659 17.199 6.19087C17.3647 5.77663 17.4354 5.23384 17.2941 4.57702L17.2847 4.57968C16.7928 4.71886 16.1744 5.0198 15.4261 5.5285C15.182 5.69438 14.8772 5.74401 14.5932 5.66413C13.7729 5.43343 12.8913 5.315 12.0012 5.315C11.111 5.315 10.2294 5.43343 9.40916 5.66413C9.12662 5.74359 8.82344 5.69492 8.57997 5.53101C7.8274 5.02439 7.2056 4.72379 6.71079 4.58376C6.56735 5.23696 6.63814 5.77782 6.80336 6.19087C6.94565 6.54659 6.87219 6.95233 6.61423 7.23559C6.01715 7.8912 5.70116 8.69376 5.70116 9.63971C5.70116 12.8116 7.07225 13.9683 10.023 14.2999C10.8883 14.3971 11.2246 15.4769 10.5675 16.0482C10.3751 16.2156 10.1384 16.7802 10.1384 17.4121V20.5611C10.1384 21.5474 9.30356 22.2869 8.17878 22.09C7.63476 21.9948 7.27093 21.4766 7.36613 20.9326C7.43827 20.5204 7.75331 20.2116 8.13841 20.1276V19.1381C7.22829 19.1994 6.47656 19.0498 5.88401 18.6533Z" fill="currentColor"/>`,"github-fill":`<path d="M12.001 2C6.47598 2 2.00098 6.475 2.00098 12C2.00098 16.425 4.86348 20.1625 8.83848 21.4875C9.33848 21.575 9.52598 21.275 9.52598 21.0125C9.52598 20.775 9.51348 19.9875 9.51348 19.15C7.00098 19.6125 6.35098 18.5375 6.15098 17.975C6.03848 17.6875 5.55098 16.8 5.12598 16.5625C4.77598 16.375 4.27598 15.9125 5.11348 15.9C5.90098 15.8875 6.46348 16.625 6.65098 16.925C7.55098 18.4375 8.98848 18.0125 9.56348 17.75C9.65098 17.1 9.91348 16.6625 10.201 16.4125C7.97598 16.1625 5.65098 15.3 5.65098 11.475C5.65098 10.3875 6.03848 9.4875 6.67598 8.7875C6.57598 8.5375 6.22598 7.5125 6.77598 6.1375C6.77598 6.1375 7.61348 5.875 9.52598 7.1625C10.326 6.9375 11.176 6.825 12.026 6.825C12.876 6.825 13.726 6.9375 14.526 7.1625C16.4385 5.8625 17.276 6.1375 17.276 6.1375C17.826 7.5125 17.476 8.5375 17.376 8.7875C18.0135 9.4875 18.401 10.375 18.401 11.475C18.401 15.3125 16.0635 16.1625 13.8385 16.4125C14.201 16.725 14.5135 17.325 14.5135 18.2625C14.5135 19.6 14.501 20.675 14.501 21.0125C14.501 21.275 14.6885 21.5875 15.1885 21.4875C19.259 20.1133 21.9999 16.2963 22.001 12C22.001 6.475 17.526 2 12.001 2Z" fill="currentColor"/>`,global:`<circle cx="12" cy="12" r="10" /> <path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /> <path d="M2 12h20" />`,"graduation-cap":`<path d="M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z" /> <path d="M22 10v6" /> <path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5" />`,hammer:`<path d="m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" /> <path d="m18 15 4-4" /> <path d="m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5" />`,heart:`<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5" />`,history:`<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" /> <path d="M12 7v5l4 2" />`,home:`<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" /> <path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />`,hourglass:`<path d="M8 3.5h8c.8 0 1.5.7 1.5 1.5 0 2.6-1.8 4.5-3.8 5.9-.4.3-.7.6-.7 1.1s.3.8.7 1.1c2 1.4 3.8 3.3 3.8 5.9 0 .8-.7 1.5-1.5 1.5H8c-.8 0-1.5-.7-1.5-1.5 0-2.6 1.8-4.5 3.8-5.9.4-.3.7-.6.7-1.1s-.3-.8-.7-1.1C8.3 9.5 6.5 7.6 6.5 5c0-.8.7-1.5 1.5-1.5z" />`,"hourglass-fill":`<path d="M5 22h14" fill="currentColor"/> <path d="M5 2h14" fill="currentColor"/> <path d="M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22" fill="currentColor"/> <path d="M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2" fill="currentColor"/>`,"image-download":`<path d="M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21" /> <path d="m14 19 3 3v-5.5" /> <path d="m17 22 3-3" /> <circle cx="9" cy="9" r="2" />`,"inbox-archive":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" /> <path d="M10 12h4" />`,"inbox-unarchive":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h2" /> <path d="M20 8v11a2 2 0 0 1-2 2h-2" /> <path d="m9 15 3-3 3 3" /> <path d="M12 12v9" />`,"inbox-unarchive-fill":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h2" fill="currentColor"/> <path d="M20 8v11a2 2 0 0 1-2 2h-2" fill="currentColor"/> <path d="m9 15 3-3 3 3" fill="currentColor"/> <path d="M12 12v9" fill="currentColor"/>`,information:`<circle cx="12" cy="12" r="10" /> <path d="M12 16v-4" /> <path d="M12 8h.01" />`,key:`<path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4" /> <path d="m21 2-9.6 9.6" /> <circle cx="7.5" cy="15.5" r="5.5" />`,"layout-column":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M12 3v18" />`,"layout-left":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M9 3v18" />`,"layout-left-rounded":`<rect width="18" height="18" x="3" y="3" rx="4" /><path d="M9.5 3v18" />`,"layout-right":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M15 3v18" />`,leaf:`<path d="M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z" /> <path d="M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12" />`,lightbulb:`<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" /> <path d="M9 18h6" /> <path d="M10 22h4" />`,"link-unlink-m":`<path d="m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71" /> <path d="m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71" /> <line x1="8" x2="8" y1="2" y2="5" /> <line x1="2" x2="5" y1="8" y2="8" /> <line x1="16" x2="16" y1="19" y2="22" /> <line x1="19" x2="22" y1="16" y2="16" />`,"list-check-2":`<path d="M13 5h8" /> <path d="M13 12h8" /> <path d="M13 19h8" /> <path d="m3 17 2 2 4-4" /> <path d="m3 7 2 2 4-4" />`,"list-check-3":`<path d="M13 5h8" /> <path d="M13 12h8" /> <path d="M13 19h8" /> <path d="m3 17 2 2 4-4" /> <rect x="3" y="4" width="6" height="6" rx="1" />`,"list-unordered":`<path d="M3 5h.01" /> <path d="M3 12h.01" /> <path d="M3 19h.01" /> <path d="M8 5h13" /> <path d="M8 12h13" /> <path d="M8 19h13" />`,loader:`<path d="M12 2v4" /> <path d="m16.2 7.8 2.9-2.9" /> <path d="M18 12h4" /> <path d="m16.2 16.2 2.9 2.9" /> <path d="M12 18v4" /> <path d="m4.9 19.1 2.9-2.9" /> <path d="M2 12h4" /> <path d="m4.9 4.9 2.9 2.9" />`,"loader-4":`<path d="M21 12a9 9 0 1 1-6.219-8.56" />`,lock:`<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /> <path d="M7 11V7a5 5 0 0 1 10 0v4" />`,"lock-2":`<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /> <path d="M7 11V7a5 5 0 0 1 10 0v4" />`,"lock-unlock":`<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /> <path d="M7 11V7a5 5 0 0 1 9.9-1" />`,"loop-right-ai":`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /> <path d="M21 3v5h-5" /> <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /> <path d="M8 16H3v5" />`,macbook:`<path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z" /> <path d="M20.054 15.987H3.946" />`,"menu-2":`<path d="M4 5h16" /> <path d="M4 12h16" /> <path d="M4 19h16" />`,"menu-fold-2":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M9 3v18" /> <path d="m16 15-3-3 3-3" />`,"menu-search":`<path d="m21 21-4.34-4.34" /> <circle cx="11" cy="11" r="8" />`,mic:`<path d="M12 19v3" /> <path d="M19 10v2a7 7 0 0 1-14 0v-2" /> <rect x="9" y="2" width="6" height="13" rx="3" />`,more:`<circle cx="12" cy="12" r="1" /> <circle cx="19" cy="12" r="1" /> <circle cx="5" cy="12" r="1" />`,"more-2":`<circle cx="12" cy="12" r="1" /> <circle cx="19" cy="12" r="1" /> <circle cx="5" cy="12" r="1" />`,"more-2-fill":`<circle cx="12" cy="12" r="1" fill="currentColor"/> <circle cx="19" cy="12" r="1" fill="currentColor"/> <circle cx="5" cy="12" r="1" fill="currentColor"/>`,music:`<path d="M9 18V5l12-2v13" /> <circle cx="6" cy="18" r="3" /> <circle cx="18" cy="16" r="3" />`,"node-tree":`<rect x="16" y="16" width="6" height="6" rx="1" /> <rect x="2" y="16" width="6" height="6" rx="1" /> <rect x="9" y="2" width="6" height="6" rx="1" /> <path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3" /> <path d="M12 12V8" />`,"notification-3":`<path d="M10.268 21a2 2 0 0 0 3.464 0" /> <path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" />`,palette:`<path d="M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z" /> <circle cx="13.5" cy="6.5" r=".5" fill="currentColor" /> <circle cx="17.5" cy="10.5" r=".5" fill="currentColor" /> <circle cx="6.5" cy="12.5" r=".5" fill="currentColor" /> <circle cx="8.5" cy="7.5" r=".5" fill="currentColor" />`,pause:`<path d="M6 5H8V19H6V5ZM16 5H18V19H16V5Z" fill="currentColor"/>`,pencil:`<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /> <path d="m15 5 4 4" />`,"pencil-ai":`<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" /> <path d="M20 2v4" /> <path d="M22 4h-4" /> <circle cx="4" cy="20" r="2" />`,"pencil-ai-2":`<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" /> <path d="M20 2v4" /> <path d="M22 4h-4" /> <circle cx="4" cy="20" r="2" />`,"picture-in-picture-2":`<path d="M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4" /> <rect width="10" height="7" x="12" y="13" rx="2" />`,"pie-chart":`<path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" /> <path d="M21.21 15.89A10 10 0 1 1 8 2.83" />`,play:`<path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" />`,"play-list-add":`<path d="M16 5H3" /> <path d="M11 12H3" /> <path d="M16 19H3" /> <path d="M18 9v6" /> <path d="M21 12h-6" />`,plug:`<path d="M12 22v-5" /> <path d="M15 8V2" /> <path d="M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z" /> <path d="M9 8V2" />`,"plug-2":`<path d="M12 22v-5" /> <path d="M15 8V2" /> <path d="M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z" /> <path d="M9 8V2" />`,pulse:`<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" />`,pushpin:`<path d="M12 17v5" /> <path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" />`,"pushpin-2":`<path d="M12 17v5" /> <path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" />`,"pushpin-2-fill":`<path d="M22.3126 10.1753L20.8984 11.5895L20.1913 10.8824L15.9486 15.125L15.2415 18.6606L13.8273 20.0748L9.58466 15.8321L4.63492 20.7819L3.2207 19.3677L8.17045 14.4179L3.92781 10.1753L5.34202 8.76107L8.87756 8.05396L13.1202 3.81132L12.4131 3.10422L13.8273 1.69L22.3126 10.1753Z" fill="currentColor" />`,question:`<circle cx="12" cy="12" r="10" /> <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /> <path d="M12 17h.01" />`,"record-circle":`<circle cx="12" cy="12" r="10" /> <circle cx="12" cy="12" r="1" />`,refresh:`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /> <path d="M21 3v5h-5" /> <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /> <path d="M8 16H3v5" />`,restart:`<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" />`,robot:`<path d="M12 8V4H8" /> <rect width="16" height="12" x="4" y="8" rx="2" /> <path d="M2 14h2" /> <path d="M20 14h2" /> <path d="M15 13v2" /> <path d="M9 13v2" />`,"robot-2":`<path d="M12 8V4H8" /> <rect width="16" height="12" x="4" y="8" rx="2" /> <path d="M2 14h2" /> <path d="M20 14h2" /> <path d="M15 13v2" /> <path d="M9 13v2" />`,rocket:`<path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" /> <path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09" /> <path d="M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z" /> <path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05" />`,"save-3":`<path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" /> <path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" /> <path d="M7 3v4a1 1 0 0 0 1 1h7" />`,"scales-3":`<path d="M12 3v18" /> <path d="m19 8 3 8a5 5 0 0 1-6 0zV7" /> <path d="M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1" /> <path d="m5 8 3 8a5 5 0 0 1-6 0zV7" /> <path d="M7 21h10" />`,"scan-2":`<path d="M3 7V5a2 2 0 0 1 2-2h2" /> <path d="M17 3h2a2 2 0 0 1 2 2v2" /> <path d="M21 17v2a2 2 0 0 1-2 2h-2" /> <path d="M7 21H5a2 2 0 0 1-2-2v-2" />`,scissors:`<circle cx="6" cy="6" r="3" /> <path d="M8.12 8.12 12 12" /> <path d="M20 4 8.12 15.88" /> <circle cx="6" cy="18" r="3" /> <path d="M14.8 14.8 20 20" />`,search:`<path d="m21 21-4.34-4.34" /> <circle cx="11" cy="11" r="8" />`,"search-eye":`<path d="M3 7V5a2 2 0 0 1 2-2h2" /> <path d="M17 3h2a2 2 0 0 1 2 2v2" /> <path d="M21 17v2a2 2 0 0 1-2 2h-2" /> <path d="M7 21H5a2 2 0 0 1-2-2v-2" /> <circle cx="12" cy="12" r="3" /> <path d="m16 16-1.9-1.9" />`,"send-plane":`<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" /> <path d="m21.854 2.147-10.94 10.939" />`,"send-plane-2":`<path d="M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z" /> <path d="M6 12h16" />`,server:`<rect width="20" height="8" x="2" y="2" rx="2" ry="2" /> <rect width="20" height="8" x="2" y="14" rx="2" ry="2" /> <line x1="6" x2="6.01" y1="6" y2="6" /> <line x1="6" x2="6.01" y1="18" y2="18" />`,"settings-3":`<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" /> <circle cx="12" cy="12" r="3" />`,"share-2":`<path d="M12 2v13" /> <path d="m16 6-4-4-4 4" /> <path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" />`,shield:`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />`,"shield-check":`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /> <path d="m9 12 2 2 4-4" />`,"shield-keyhole":`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />`,"shield-user":`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /> <path d="M6.376 18.91a6 6 0 0 1 11.249.003" /> <circle cx="12" cy="11" r="4" />`,shuffle:`<path d="m18 14 4 4-4 4" /> <path d="m18 2 4 4-4 4" /> <path d="M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22" /> <path d="M2 6h1.972a4 4 0 0 1 3.6 2.2" /> <path d="M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45" />`,"slash-commands-2":`<path d="M12 19h8" /> <path d="m4 17 6-6-6-6" />`,smartphone:`<rect width="14" height="20" x="5" y="2" rx="2" ry="2" /> <path d="M12 18h.01" />`,sparkling:`<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" /> <path d="M20 2v4" /> <path d="M22 4h-4" /> <circle cx="4" cy="20" r="2" />`,"split-cells-horizontal":`<path d="M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3" /> <path d="M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3" /> <line x1="12" x2="12" y1="4" y2="20" />`,stack:`<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z" /> <path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12" /> <path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17" />`,star:`<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" />`,"star-fill":`<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" fill="currentColor"/>`,"sticky-note":`<path d="M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z" /> <path d="M15 3v5a1 1 0 0 0 1 1h5" />`,stop:`<rect width="18" height="18" x="3" y="3" rx="2" />`,"stop-circle":`<circle cx="12" cy="12" r="9" /><rect x="9.25" y="9.25" width="5.5" height="5.5" rx="1.25" />`,subtract:`<path d="M5 12h14" />`,survey:`<rect width="8" height="4" x="8" y="2" rx="1" ry="1" /> <path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /> <path d="M12 11h4" /> <path d="M12 16h4" /> <path d="M8 11h.01" /> <path d="M8 16h.01" />`,target:`<circle cx="12" cy="12" r="10" /> <circle cx="12" cy="12" r="6" /> <circle cx="12" cy="12" r="2" />`,task:`<path d="M21.801 10A10 10 0 1 1 17 3.335" /> <path d="m9 11 3 3L22 4" />`,terminal:`<path d="M12 19h8" /> <path d="m4 17 6-6-6-6" />`,"terminal-box":`<path d="M12 19h8" /> <path d="m4 17 6-6-6-6" />`,"terminal-window":`<path d="m7 11 2-2-2-2" /> <path d="M11 13h4" /> <rect width="18" height="18" x="3" y="3" rx="2" ry="2" />`,text:`<path d="M12 4v16" /> <path d="M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" /> <path d="M9 20h6" />`,"text-wrap":`<path d="m16 16-3 3 3 3" /> <path d="M3 12h14.5a1 1 0 0 1 0 7H13" /> <path d="M3 19h6" /> <path d="M3 5h18" />`,time:`<circle cx="12" cy="12" r="9" /><path d="M12 7v5.25l3.25 1.75" />`,timer:`<line x1="10" x2="14" y1="2" y2="2" /> <line x1="12" x2="15" y1="14" y2="11" /> <circle cx="12" cy="14" r="8" />`,tools:`<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" />`,"twitter-xfill":`<path d="M17.6874 3.0625L12.6907 8.77425L8.37045 3.0625H2.11328L9.58961 12.8387L2.50378 20.9375H5.53795L11.0068 14.6886L15.7863 20.9375H21.8885L14.095 10.6342L20.7198 3.0625H17.6874ZM16.6232 19.1225L5.65436 4.78217H7.45745L18.3034 19.1225H16.6232Z" fill="currentColor"/>`,unpin:`<path d="M12 17v5" /> <path d="M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" /> <path d="m2 2 20 20" /> <path d="M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" />`,user:`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /> <circle cx="12" cy="7" r="4" />`,"user-3":`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /> <circle cx="12" cy="7" r="4" />`,"video-chat":`<path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" /> <rect x="2" y="6" width="14" height="12" rx="2" />`,"volume-up":`<path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z" /> <path d="M16 9a5 5 0 0 1 0 6" /> <path d="M19.364 18.364a9 9 0 0 0 0-12.728" />`,window:`<rect x="2" y="4" width="20" height="16" rx="2" /> <path d="M10 4v4" /> <path d="M2 8h20" /> <path d="M6 4v4" />`},o=t(),s=`openchamber-icon-sprite-v2`,c=1.5,l=(()=>{let e=2166136261;for(let[t,n]of Object.entries(a)){let r=`${t}:${n};`;for(let t=0;t<r.length;t+=1)e=Math.imul(e^r.charCodeAt(t),16777619)}return(e>>>0).toString(36)})(),u=!1,d=new Set,f=null;function p(e){if(u&&d.has(e)&&f===l||typeof document>`u`)return;let t=document.body;if(!t)return;let n=document.getElementById(s);if(n){let t=new Set(Array.from(n.querySelectorAll(`symbol[id^="oc-"]`),e=>e.id.slice(3)));if(!n.innerHTML.includes(`--oc-icon-stroke`)||n.dataset.spriteSignature!==l||!t.has(e))n.remove();else{u=!0,d=t,f=l;return}}let r=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);r.id=s,r.setAttribute(`aria-hidden`,`true`),r.dataset.spriteSignature=l,r.style.display=`none`,r.innerHTML=Object.entries(a).map(([e,t])=>`<symbol id="oc-${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--oc-icon-stroke, ${c})" stroke-linecap="round" stroke-linejoin="round">${t}</symbol>`).join(``),t.insertBefore(r,t.firstChild),u=!0,d=new Set(Object.keys(a)),f=l}var m=i.memo(({name:e,className:t,weight:n=`regular`,style:i,...a})=>{typeof document<`u`&&p(e);let s=n===`medium`?2:c;return(0,o.jsx)(`svg`,{className:r(`oc-icon`,t),viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,stroke:`currentColor`,strokeWidth:s,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{"--oc-icon-stroke":s,...i},...a,children:(0,o.jsx)(`use`,{href:`#oc-${e}`})})});m.displayName=`Icon`;export{m as n,a as r,c as t};
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{E as t,w as n}from"./useUIStore-CqqO11ZI.js";import{kn as r,u as i}from"./persistence-CSZp1CNB.js";import{nt as a,rt as o}from"./vendor-base-ui-CnHfUmDN.js";import{n as s}from"./vendor-react-DLPElpoQ.js";import{s as c,t as l}from"./vendor-tanstack-react-query-D7pys_c9.js";import{Mo as u,No as d}from"./useMobileNavigationStore-ZrH3A3tf.js";import{t as f}from"./utils-B0mQXN9L.js";import{n as p}from"./Icon-Dyq9096D.js";import{t as m}from"./button-Or0daT9o.js";var h=e(o(),1),g=s(),_=class extends Error{code;status;resource;constructor(e,t,n){super(e),this.code=e,this.status=t,this.resource=n}},v=class extends _{operation;constructor(e,t,n){super(e,t,`share_operation`),this.operation=n}},y=(e,t=200)=>{throw new _(`invalid_${e}_response`,t,e)},b=(e,t)=>e&&typeof e==`object`&&!Array.isArray(e)?e:y(t),x=(e,t)=>typeof e==`string`?e:y(t),S=(e,t)=>e===null||typeof e==`string`?e:y(t),C=(e,t)=>typeof e==`number`&&Number.isFinite(e)?e:y(t),w=(e,t)=>e===null?null:C(e,t),T=(e,t)=>typeof e==`boolean`?e:y(t),E=(e,t,n)=>t.includes(e)?e:y(n),D=e=>{let t=b(e,`capability`);return{supported:T(t.supported,`capability`),enabled:T(t.enabled,`capability`),revision:C(t.revision,`capability`),serverInstanceID:S(t.serverInstanceID,`capability`)}},O=e=>{let t=b(e,`assistant`),n=Array.isArray(t.historySessionIDs)?t.historySessionIDs.map(e=>x(e,`assistant`)):[],r=t.historySessionCount===void 0?n.length:C(t.historySessionCount,`assistant`);return!Number.isSafeInteger(r)||r<n.length?y(`assistant`):{id:x(t.id,`assistant`),revision:C(t.revision,`assistant`),enabled:T(t.enabled,`assistant`),name:x(t.name,`assistant`),defaultPrompt:x(t.defaultPrompt,`assistant`),workspacePath:S(t.workspacePath,`assistant`),effectiveWorkspacePath:x(t.effectiveWorkspacePath,`assistant`),managedWorkspacePath:S(t.managedWorkspacePath??null,`assistant`),providerID:x(t.providerID,`assistant`),modelID:x(t.modelID,`assistant`),agent:S(t.agent,`assistant`),variant:S(t.variant??null,`assistant`),mode:E(t.mode,[`continuous`,`stateless`],`assistant`),sessionID:S(t.sessionID,`assistant`),sessionGeneration:C(t.sessionGeneration,`assistant`),historySessionIDs:n,historySessionCount:r,createdAt:w(t.createdAt,`assistant`),updatedAt:C(t.updatedAt,`assistant`),tombstoneAt:w(t.tombstoneAt,`assistant`)}},k=e=>{let t=b(e,`snapshot`);return{revision:C(t.revision,`snapshot`),enabled:T(t.enabled,`snapshot`),assistants:Array.isArray(t.assistants)?t.assistants.map(O):y(`snapshot`)}},A=e=>{let t=b(e,`binding`);return{sessionID:S(t.sessionID,`binding`),directory:x(t.directory,`binding`),sessionGeneration:C(t.sessionGeneration,`binding`)}},j=e=>{let t=b(e,`compact`);return t.summarized===!0?{binding:A(t.binding),summarized:!0}:y(`compact`)},M=e=>{let t=b(e,`message_admission`);return t.admitted===!0?{binding:A(t.binding),messageID:x(t.messageID,`message_admission`),admitted:!0}:y(`message_admission`)},N=e=>{let t=b(e,`share_operation`);return{operationID:x(t.operationID,`share_operation`),assistantID:x(t.assistantID,`share_operation`),sessionID:S(t.sessionID,`share_operation`),messageID:S(t.messageID,`share_operation`),state:E(t.state,[`submitting`,`running`,`completed`,`failed`,`unresolved`],`share_operation`),phase:x(t.phase,`share_operation`),attempt:C(t.attempt,`share_operation`),leaseExpiresAt:w(t.leaseExpiresAt,`share_operation`),errorCode:S(t.errorCode,`share_operation`)}},P=e=>{let t=b(e,`assistant_history`),n=S(t.nextCursor,`assistant_history`),r=T(t.complete,`assistant_history`);return!r&&!n||r&&n||!Array.isArray(t.entries)?y(`assistant_history`):{entries:t.entries.map(e=>{let t=b(e,`assistant_history_entry`),n=x(t.sessionID,`assistant_history_entry`),r=b(t.info,`assistant_history_info`),i=b(r.time,`assistant_history_info`);if(x(r.id,`assistant_history_info`),x(r.sessionID,`assistant_history_info`)!==n||(E(r.role,[`user`,`assistant`,`system`,`tool`],`assistant_history_info`),C(i.created,`assistant_history_info`),!Array.isArray(t.parts)))return y(`assistant_history_entry`);let a=t.parts.map(e=>{let t=b(e,`assistant_history_part`);return x(t.id,`assistant_history_part`),x(t.sessionID,`assistant_history_part`)!==n||x(t.messageID,`assistant_history_part`)!==r.id?y(`assistant_history_part`):(x(t.type,`assistant_history_part`),t)});return{sessionID:n,directory:S(t.directory,`assistant_history_entry`),info:r,parts:a}}),nextCursor:n,complete:r}},F=30,I={snapshot:(e=t())=>[e,`assistants`,`snapshot`],capability:(e=t())=>[e,`assistants`,`capability`],history:(e,r,i,a=t(),o=n())=>[a,o,`assistants`,`history`,e,r,i]},L=(e,t,n)=>{if(!e||!t)return;let r=t.queryKey;if(r[0]===n.transport&&r[1]===n.runtimeGeneration&&r[2]===`assistants`&&r[3]===`history`&&r[4]===n.assistantID)return e},R=async(e,t={})=>{let n=await r(e,t),i=await n.json().catch(()=>null);if(!n.ok)throw new _(i&&typeof i==`object`&&`error`in i&&typeof i.error==`string`?i.error:`request_failed`,n.status);return i},z=(e,t)=>({method:e,headers:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)}),B=(e,r)=>{if(t()!==e||n()!==r)throw new _(`runtime_stale`,409)},V=(e,t,r)=>{i.setQueryData(I.snapshot(r),n=>n&&{...n,assistants:n.assistants.map(n=>n.id!==e||n.sessionGeneration>t.sessionGeneration?n:{...n,sessionID:t.sessionID,sessionGeneration:t.sessionGeneration,effectiveWorkspacePath:t.directory})}),i.invalidateQueries({queryKey:I.snapshot(r)}),i.invalidateQueries({queryKey:[r,n(),`assistants`,`history`,e]})},H=(e,t)=>{i.setQueryData(I.snapshot(t),t=>t&&{...t,assistants:t.assistants.some(t=>t.id===e.id)?t.assistants.map(t=>t.id===e.id?e:t):[...t.assistants,e]}),i.invalidateQueries({queryKey:I.snapshot(t)})},U=(e=t())=>({queryKey:I.snapshot(e),queryFn:async({signal:e})=>k(await R(`/api/openchamber/assistants/snapshot`,{signal:e})),retry:2}),W=()=>{let e=(0,g.c)(5),n,r,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=t(),n=c,r=U(a),e[0]=n,e[1]=r,e[2]=a):(n=e[0],r=e[1],a=e[2]);let o=n(r),s,l;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>d(e=>{if(t()!==a)return;if(e.type===`event-stream-ready`){i.invalidateQueries({queryKey:I.snapshot(a),exact:!0});return}if(e.type!==`assistants-changed`)return;let n=i.getQueryData(I.snapshot(a));(!n||e.revision>n.revision)&&i.invalidateQueries({queryKey:I.snapshot(a),exact:!0})}),l=[a],e[3]=s,e[4]=l):(s=e[3],l=e[4]),h.useEffect(s,l),o},G=(e,r,i,a=t(),o=n())=>({queryKey:I.history(e,r,i,a,o),queryFn:async({signal:t,pageParam:n})=>{B(a,o),await u(),B(a,o);let r=new URLSearchParams({limit:String(F)});n&&r.set(`before`,n);let i=P(await R(`/api/openchamber/assistants/${encodeURIComponent(e)}/messages?${r}`,{signal:t}));return B(a,o),i},initialPageParam:null,getNextPageParam:K,placeholderData:(t,n)=>L(t,n,{assistantID:e,transport:a,runtimeGeneration:o}),retry:2}),K=e=>e.complete?void 0:e.nextCursor??void 0,q=(e,t,n)=>{let r=(0,g.c)(7),i=n===void 0||n,a=t.sessionID??``,o;r[0]!==e||r[1]!==t.sessionGeneration||r[2]!==a?(o=G(e,a,t.sessionGeneration),r[0]=e,r[1]=t.sessionGeneration,r[2]=a,r[3]=o):o=r[3];let s=i&&!!(e&&t.sessionID),c;return r[4]!==o||r[5]!==s?(c={...o,enabled:s},r[4]=o,r[5]=s,r[6]=c):c=r[6],l(c)},J=async e=>k(await R(`/api/openchamber/assistants/snapshot`,{signal:e})),Y=(e=t())=>({queryKey:I.capability(e),queryFn:()=>Q(),retry:!1}),X=()=>{let e=(0,g.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=Y(),e[0]=t):t=e[0],c(t)},Z=(e=i,n=t())=>e.getQueryData(I.snapshot(n)),ee=(e=i,n=t())=>e.fetchQuery(U(n)),te=async(e=i)=>{let r=t(),a=n();await e.invalidateQueries({queryKey:I.snapshot(r),exact:!0}),B(r,a);let o=await e.fetchQuery(U(r));return B(r,a),o},ne=async e=>{let r=t(),i=n();await u(),B(r,i);let a=A(await R(`/api/openchamber/assistants/${encodeURIComponent(e)}/session/ensure`,z(`POST`)));return B(r,i),V(e,a,r),a},re=async e=>{let r=t(),i=n(),a=A(await R(`/api/openchamber/assistants/${encodeURIComponent(e)}/session/new`,z(`POST`)));return B(r,i),V(e,a,r),a},ie=async(e,r)=>{let i=t(),a=n(),o=j(await R(`/api/openchamber/assistants/${encodeURIComponent(e)}/session/compact`,z(`POST`,{sessionID:r.sessionID,sessionGeneration:r.sessionGeneration})));return B(i,a),V(e,o.binding,i),o},ae=async(e,r)=>{let i=t(),a=n();await R(`/api/openchamber/assistants/${encodeURIComponent(e)}/session/abort`,z(`POST`,{sessionID:r.sessionID,sessionGeneration:r.sessionGeneration})),B(i,a)},oe=async(e,r,i,a,o=`composer`)=>{let s=t(),c=n(),l=M(await R(`/api/openchamber/assistants/${encodeURIComponent(e)}/messages`,z(`POST`,{sessionID:r.sessionID,sessionGeneration:r.sessionGeneration,messageID:i,parts:a,source:o})));return B(s,c),V(e,l.binding,s),l},se=async(e,r,i,a,o)=>{let s=t(),c=n(),l=N(await R(`/api/openchamber/assistants/${encodeURIComponent(e)}/share`,z(`POST`,{operationID:r,payload:{messageID:i,parts:a,source:o}})));return B(s,c),l},ce=async(e,r=t(),i=n())=>{B(r,i);let a=N(await R(`/api/openchamber/assistants/share-operations/${encodeURIComponent(e)}`));return B(r,i),a},le=async(e,r=t(),i=n())=>{let a=e;for(let e=0;e<60&&(a.state===`running`||a.state===`submitting`);e+=1)B(r,i),await new Promise(e=>setTimeout(e,750)),a=await ce(a.operationID,r,i);if(B(r,i),a.state===`completed`)return a;throw a.state===`failed`?new v(a.errorCode??`share_failed`,400,a):new v(`share_unresolved`,408,a)},ue=async(e,n)=>{await R(`/api/openchamber/assistants/settings`,z(`PUT`,{enabled:e,expectedRevision:n}));let r=t();await Promise.all([i.invalidateQueries({queryKey:I.snapshot(r),exact:!0}),i.invalidateQueries({queryKey:I.capability(r),exact:!0})])},de=async e=>{let n=t(),r=O(await R(`/api/openchamber/assistants`,z(`POST`,e)));return H(r,n),r},fe=async(e,r)=>{let i=t(),a=n(),o=O(await R(`/api/openchamber/assistants/${encodeURIComponent(e.id)}`,z(`PATCH`,{...r,expectedRevision:e.revision})));return B(i,a),H(o,i),o},pe=async e=>{await R(`/api/openchamber/assistants/${encodeURIComponent(e.id)}`,z(`DELETE`,{expectedRevision:e.revision})),await i.invalidateQueries({queryKey:I.snapshot(t())})},Q=async()=>D(await R(`/api/openchamber/assistants/capability`)),$=a();function me(e){let t=(0,g.c)(32),{title:n,subtitle:r,backAriaLabel:i,onBack:a,backDisabled:o,actions:s,trailing:c,sticky:l,overlay:u,elevated:d}=e,h=o!==void 0&&o,_;t[0]===s?_=t[1]:(_=s===void 0?[]:s,t[0]=s,t[1]=_);let v=_,y=l!==void 0&&l,b=u!==void 0&&u,x=d!==void 0&&d,S=!!c||v.length>0,C=x||v.some(ge),w=y&&`oc-mobile-detail-navigation-sticky`,T=b&&`absolute inset-x-0 top-0`,E=C?`z-[60]`:b?`z-30`:void 0,D;t[2]!==w||t[3]!==T||t[4]!==E?(D=f(`oc-mobile-detail-navigation relative shrink-0 pt-[max(0.25rem,var(--oc-safe-area-top,0px))]`,w,T,E),t[2]=w,t[3]=T,t[4]=E,t[5]=D):D=t[5];let O=S&&v.length+ +!!c>1?`grid-cols-[2.75rem_minmax(0,1fr)_auto]`:`grid-cols-[2.75rem_minmax(0,1fr)_2.75rem]`,k;t[6]===O?k=t[7]:(k=f(`oc-mobile-detail-navigation-content grid items-center gap-1 px-4`,O),t[6]=O,t[7]=k);let A;t[8]!==i||t[9]!==h||t[10]!==a?(A=a?(0,$.jsx)(m,{type:`button`,variant:`mobileGlass`,size:`mobileIcon`,className:`justify-self-start`,onClick:a,disabled:h,"aria-label":i,children:(0,$.jsx)(p,{name:`arrow-left-s`,className:`size-5`})}):(0,$.jsx)(`span`,{"aria-hidden":`true`}),t[8]=i,t[9]=h,t[10]=a,t[11]=A):A=t[11];let j;t[12]===n?j=t[13]:(j=(0,$.jsx)(`div`,{className:`oc-mobile-detail-title w-full truncate typography-ui-label font-medium text-foreground`,children:n}),t[12]=n,t[13]=j);let M;t[14]===r?M=t[15]:(M=r?(0,$.jsx)(`div`,{className:`oc-mobile-detail-subtitle w-full truncate text-muted-foreground`,"aria-live":`polite`,children:r}):null,t[14]=r,t[15]=M);let N;t[16]!==j||t[17]!==M?(N=(0,$.jsxs)(`div`,{className:`flex w-full max-w-72 min-w-0 flex-col items-center justify-center justify-self-center px-1`,children:[j,M]}),t[16]=j,t[17]=M,t[18]=N):N=t[18];let P;t[19]===v?P=t[20]:(P=v.map(he),t[19]=v,t[20]=P);let F;t[21]!==P||t[22]!==c?(F=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center justify-end gap-2`,children:[c,P]}),t[21]=P,t[22]=c,t[23]=F):F=t[23];let I;t[24]!==k||t[25]!==A||t[26]!==N||t[27]!==F?(I=(0,$.jsxs)(`div`,{className:k,children:[A,N,F]}),t[24]=k,t[25]=A,t[26]=N,t[27]=F,t[28]=I):I=t[28];let L;return t[29]!==D||t[30]!==I?(L=(0,$.jsx)(`header`,{className:D,children:I}),t[29]=D,t[30]=I,t[31]=L):L=t[31],L}function he(e,t){return(0,$.jsx)(m,{type:`button`,variant:`mobileGlass`,size:`mobileIcon`,className:f(e.elevated&&`relative z-[60]`),onClick:e.onClick,disabled:e.disabled,"aria-label":e.ariaLabel,"aria-expanded":e.pressed,title:e.title,children:(0,$.jsx)(p,{name:e.icon,className:`size-5`})},`${e.icon}:${t}`)}function ge(e){return e.elevated}export{v as S,X as _,pe as a,le as b,Q as c,re as d,Z as f,fe as g,ue as h,de as i,J as l,se as m,ae as n,ne as o,oe as p,ie as r,ee as s,me as t,te as u,q as v,_ as x,W as y};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-capacitor-app-PzT84wSx.js","assets/rolldown-runtime-C0FnF6B9.js","assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{A as t,E as n,O as r,t as i,y as a}from"./useUIStore-CqqO11ZI.js";import{$t as o,It as s,Lt as c,Xt as l,Yt as u,Zt as d,d as f,dn as p,en as m,et as h,kn as g,nn as _,p as v,r as y,s as b,tn as x,u as S,xn as C}from"./persistence-CSZp1CNB.js";import{a as w,i as T,r as E}from"./vendor-zustand-B4dlGEM2.js";import{nt as D,rt as O}from"./vendor-base-ui-CnHfUmDN.js";import{Ct as k,Nt as A,n as j,t as M}from"./platform-CenlWqxu.js";import{o as N}from"./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js";import{n as P}from"./vendor-react-DLPElpoQ.js";import{s as F}from"./vendor-tanstack-react-query-D7pys_c9.js";import{t as I}from"./types-BuiqMmh_.js";import{n as L}from"./vendor-reactuses-core-DDoDDyM9.js";import{n as R,r as z,t as B}from"./clipboard-Bu0lpyX1.js";import{$r as ee,Fa as te,Fn as V,Hn as H,Ln as ne,Rn as re,Vn as ie,bo as U,fr as ae,hn as oe,hr as W,l as se,zn as ce}from"./useMobileNavigationStore-ZrH3A3tf.js";import{n as le,o as ue,t as de}from"./dialog-CqZoOFxV.js";import{r as fe,t as G}from"./utils-B0mQXN9L.js";import{n as K}from"./Icon-Dyq9096D.js";import{n as pe,t as q}from"./button-Or0daT9o.js";import{L as me,_ as he,b as ge,c as _e,n as ve,s as ye,u as be}from"./gitApi-qsia0bp_.js";import{A as xe,S as Se,a as Ce,et as J,g as we,h as Te,l as Ee,n as De,o as Oe,r as ke,t as Ae,v as je,x as Me}from"./projectMeta-CpYdE3md.js";import{t as Ne}from"./input-BUsGnzwe.js";import{i as Pe,n as Fe,t as Ie}from"./tooltip-BSrJYYYc.js";import{A as Le,H as Re,L as ze,M as Be,N as Ve,P as He,d as Ue,f as We,j as Ge,k as Ke,l as qe,o as Je,r as Ye}from"./useSessionAutoCleanup-CA8LmofT.js";import{n as Xe}from"./useThemeSystem-DMzWVJaW.js";import{_ as Ze,d as Qe,l as $e,p as et,u as tt,v as nt,w as rt}from"./radio-CZyg9Qec.js";import{i as it,n as at}from"./OverlayScrollbar-BZB21Yp_.js";import{i as ot}from"./appThemeRegistry-BwefILsK.js";import{a as st}from"./url-CE_gAfNa.js";import{n as ct,r as lt,t as ut}from"./collapsible-C-kzSGkq.js";import{i as dt,n as ft,r as pt,t as mt}from"./projectActions-CWvNGKfA.js";var ht=[{id:`claude`,name:`Claude`},{id:`codex`,name:`Codex`},{id:`cursor`,name:`Cursor`},{id:`github-copilot`,name:`GitHub Copilot`},{id:`google`,name:`Google`},{id:`kimi-for-coding`,name:`Kimi for Coding`},{id:`nano-gpt`,name:`NanoGPT`},{id:`openrouter`,name:`OpenRouter`},{id:`zai-coding-plan`,name:`z.ai`},{id:`zhipuai-coding-plan`,name:`Zhipu AI Coding Plan`},{id:`minimax-cn-coding-plan`,name:`MiniMax Coding Plan (minimaxi.com)`},{id:`minimax-coding-plan`,name:`MiniMax Coding Plan (minimax.io)`},{id:`ollama-cloud`,name:`Ollama Cloud`},{id:`wafer`,name:`Wafer.ai`},{id:`opencode-go`,name:`OpenCode Go`},{id:`xai`,name:`Grok`}],Y=P(),X=D();function gt(e){let t=(0,Y.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`path`,{d:`M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z`}),r=(0,X.jsx)(`path`,{d:`M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,stroke:`currentColor`,strokeWidth:`0.5`,fillRule:`evenodd`,viewBox:`-0.5 -0.5 25 25`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}var Z=e=>{if(typeof e!=`string`)return null;let t=e.trim();if(!t)return null;let n=t.replace(/\\/g,`/`);return n.length>1?n.replace(/\/+$/,``):n},_t=()=>{let e=U.getState().getActiveProject?.();return Z(e?.path)??Z(A.getDirectory())},vt=(e,t=n())=>f.mcp.configs(e,t),yt=(e,t=n())=>f.mcp.status(e,t),bt=e=>e?A.getScopedApiClient(e):A.getApiClient(),xt=(e=_t(),t=n())=>{let r=Z(e);return{queryKey:vt(r,t),queryFn:async({signal:e})=>{let t=r?`?directory=${encodeURIComponent(r)}`:``,n=await g(`/api/config/mcp${t}`,{headers:r?{"x-opencode-directory":r}:void 0,signal:e});if(!n.ok)throw Error(`Failed to load MCP configs`);let i=await n.json();if(!Array.isArray(i))throw Error(`Invalid MCP configs response`);return i},staleTime:5e3,retry:2}},St=(e,t=n())=>{let r=Z(e);return{queryKey:yt(r,t),queryFn:async()=>(await bt(r).mcp.status({},{throwOnError:!0})).data,staleTime:2e3,retry:1}},Ct=(e,t)=>{let n=(0,Y.c)(9),r;n[0]===t?r=n[1]:(r=t===void 0?{}:t,n[0]=t,n[1]=r);let i=r,a=U(kt),o,s;if(n[2]!==a||n[3]!==e){let t=e===void 0?Z(a)??Z(A.getDirectory()):Z(e);s=F,o=xt(t),n[2]=a,n[3]=e,n[4]=o,n[5]=s}else o=n[4],s=n[5];let c;return n[6]!==i.enabled||n[7]!==o?(c={...o,enabled:i.enabled},n[6]=i.enabled,n[7]=o,n[8]=c):c=n[8],s(c)},wt=(e,t)=>{let n=(0,Y.c)(7),r;n[0]===t?r=n[1]:(r=t===void 0?{}:t,n[0]=t,n[1]=r);let i=r,a=k(At),o=e===void 0?a:e,s;n[2]===o?s=n[3]:(s=St(Z(o)),n[2]=o,n[3]=s);let c;return n[4]!==i.enabled||n[5]!==s?(c={...s,enabled:i.enabled},n[4]=i.enabled,n[5]=s,n[6]=c):c=n[6],F(c)},Tt=(e=S,t=_t(),r=n())=>e.getQueryData(vt(Z(t),r))??[],Et=(e=S,t,r=n())=>e.getQueryData(yt(Z(t),r))??{},Dt=async(e,t,r)=>{let i=Z(t);return n()===r?e.fetchQuery({...xt(i,r),staleTime:0}):Tt(e,i,r)},Ot=async(e,t,r)=>{let i=Z(t);return n()===r?e.fetchQuery({...St(i,r),staleTime:0}):Et(e,i,r)};function kt(e){return e.getActiveProject?.()?.path??null}function At(e){return e.currentDirectory}var jt={},Mt=(e,t=n())=>JSON.stringify([t,Z(e)]),Nt=(e,t,n)=>{if(!e[t]?.[n])return e;let r={...e[t]};return delete r[n],{...e,[t]:r}},Pt=e=>{let t=Z(e);return t?A.getScopedApiClient(t):A.getApiClient()},Ft=e=>Z(e===void 0?k.getState().currentDirectory:e),It=w()(E((e,t)=>({diagnosticsByDirectory:{},getDiagnosticForDirectory:e=>{let n=Mt(Ft(e));return t().diagnosticsByDirectory[n]??jt},clearDiagnostic:(t,n,r)=>{let i=Mt(Ft(n),r);e(e=>({diagnosticsByDirectory:Nt(e.diagnosticsByDirectory,i,t)}))},connect:async(t,r)=>{let i=Ft(r),a=n(),o=Mt(i,a),s=Pt(i);try{await s.mcp.connect({name:t},{throwOnError:!0})}catch(n){let r=n instanceof Error?n.message:`Connection failed`;throw e(e=>({diagnosticsByDirectory:{...e.diagnosticsByDirectory,[o]:{...e.diagnosticsByDirectory[o]??{},[t]:{status:`failed`,error:r}}}})),n}await Ot(S,i,a),e(e=>({diagnosticsByDirectory:Nt(e.diagnosticsByDirectory,o,t)}))},disconnect:async(t,r)=>{let i=Ft(r),a=n(),o=Mt(i,a);await Pt(i).mcp.disconnect({name:t},{throwOnError:!0}),await Ot(S,i,a),e(e=>({diagnosticsByDirectory:Nt(e.diagnosticsByDirectory,o,t)}))},startAuth:async(e,t)=>{let n=(await Pt(Ft(t)).mcp.auth.start({name:e},{throwOnError:!0})).data?.authorizationUrl;if(!n)throw Error(`Authorization URL was not returned`);return n},completeAuth:async(t,r,i)=>{let a=Ft(i),o=n(),s=Mt(a,o);await Pt(a).mcp.auth.callback({name:t,code:r},{throwOnError:!0}),await Ot(S,a,o),e(e=>({diagnosticsByDirectory:Nt(e.diagnosticsByDirectory,s,t)}))},clearAuth:async(t,r)=>{let i=Ft(r),a=n(),o=Mt(i,a);await Pt(i).mcp.auth.remove({name:t},{throwOnError:!0}),await Ot(S,i,a),e(e=>({diagnosticsByDirectory:Nt(e.diagnosticsByDirectory,o,t)}))},testConnection:async(t,r)=>{let i=Ft(r),a=n(),o=Mt(i,a),s=Pt(i),c=Et(S,i,a)[t]?.status===`connected`,l,u;try{await s.mcp.connect({name:t},{throwOnError:!0})}catch(n){l=n instanceof Error?n.message:`Connection failed`,e(e=>({diagnosticsByDirectory:{...e.diagnosticsByDirectory,[o]:{...e.diagnosticsByDirectory[o]??{},[t]:{status:`failed`,error:l??`Connection failed`}}}}))}let d=(await Ot(S,i,a))[t],f=d;if(!c&&d?.status===`connected`){try{await s.mcp.disconnect({name:t},{throwOnError:!0})}catch(e){u=`Connection test succeeded, but cleanup disconnect failed: ${e instanceof Error?e.message:`Disconnect failed`}`}await Ot(S,i,a)}return l||e(e=>({diagnosticsByDirectory:Nt(e.diagnosticsByDirectory,o,t)})),{status:f??Et(S,i,a)[t],error:l,warning:u}}}))),Q=e(O(),1),Lt=e=>typeof e==`string`&&e.trim().length>0?e.trim():null,Rt=()=>Lt(`1.19.7-beta.12`),zt=(e,t)=>Lt(t)||Lt(e),Bt=(e,t)=>{let n=Lt(e);return n?typeof t!=`number`||!Number.isFinite(t)?n:`${n} (${t})`:null},Vt=async()=>{let e=Rt();if(!j())return e;try{let{App:t}=await N(async()=>{let{App:e}=await import(`./vendor-capacitor-app-PzT84wSx.js`).then(e=>e.t);return{App:e}},__vite__mapDeps([0,1,2]));return zt((await t.getInfo()).version,e)}catch{return e}},Ht=async()=>{if(!j())return null;try{let{App:e}=await N(async()=>{let{App:e}=await import(`./vendor-capacitor-app-PzT84wSx.js`).then(e=>e.t);return{App:e}},__vite__mapDeps([0,1,2])),t=await e.getInfo(),n=typeof t.build==`string`?t.build.trim():``;if(n.length===0)return null;let r=Number.parseInt(n,10);return Number.isFinite(r)?r:null}catch{return null}},Ut=`https://openchamber.xiaobe.top/v1/update/check`,Wt=`https://openchamber-update.vercel.app/v1/update/check`,Gt=`https://github.com/yee94/openchamber/releases/latest`,Kt=`https://github.com/yee94/openchamber/releases`,qt=`https://testflight.apple.com/join/ZCENBHtm`,Jt=1e4;function Yt(e){let t=String(e||``).replace(/^v/,``).split(`+`)[0]??``,n=t.indexOf(`-`);return{parts:(n>=0?t.slice(0,n):t).split(`.`).map(e=>{let t=Number.parseInt(e||`0`,10);return Number.isFinite(t)?t:0}),prerelease:n>=0}}function Xt(e,t){let n=Yt(e),r=Yt(t),i=Math.max(n.parts.length,r.parts.length);for(let e=0;e<i;e+=1){let t=(n.parts[e]||0)-(r.parts[e]||0);if(t!==0)return t}return n.prerelease===r.prerelease?0:n.prerelease?-1:1}function Zt(){return[Ut,Wt]}function Qt(e,t,n=Date.now){let r=e-n();return r<=0||t<=0?null:Math.max(1,Math.ceil(r/t))}function $t(e){return{appType:`mobile-capacitor`,deviceClass:e.deviceClass||`mobile`,platform:e.platform===`ios`||e.platform===`android`?e.platform:`android`,arch:e.arch||`unknown`,channel:`stable`,currentVersion:e.currentVersion,instanceMode:`remote`,reportUsage:e.reportUsage===!0}}async function en(e,t,n,r){try{if(j())try{let{CapacitorHttp:r}=await N(async()=>{let{CapacitorHttp:e}=await import(`./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js`).then(e=>e.i);return{CapacitorHttp:e}},__vite__mapDeps([2,1])),i=Object.fromEntries(new Headers(t.headers).entries()),a;if(typeof t.body==`string`)try{a=JSON.parse(t.body)}catch{a=t.body}let o=await Promise.race([r.request({url:e,method:t.method||`GET`,headers:i,data:a,connectTimeout:n,readTimeout:n}),new Promise(e=>{window.setTimeout(()=>e(null),n)})]);return o?{ok:o.status>=200&&o.status<300,status:o.status,url:typeof o.url==`string`?o.url:e,json:async()=>{if(typeof o.data==`string`)try{return JSON.parse(o.data)}catch{return o.data}return o.data}}:null}catch{}let i=await r(e,{...t,signal:AbortSignal.timeout(n)});return{ok:i.ok,status:i.status,url:i.url,json:()=>i.json()}}catch{return null}}function tn(e,t){return e===`ios`?qt:`${Kt}/download/v${t}/app-release.apk`}function nn(e,t,n){if(typeof e.latestVersion!=`string`||e.latestVersion.trim().length===0)return null;let r=e.latestVersion.trim(),i=Xt(r,t);if(i<0)return null;let a=typeof e.releaseNotesUrl==`string`&&e.releaseNotesUrl.trim().length>0?e.releaseNotesUrl.trim():`${Kt}/tag/v${r}`,o=typeof e.downloadUrl==`string`&&e.downloadUrl.trim().length>0?e.downloadUrl.trim():typeof e.download?.url==`string`&&e.download.url.trim().length>0?e.download.url.trim():tn(n,r);return{available:!!e.updateAvailable&&i>0,version:r,currentVersion:t,body:typeof e.releaseNotes==`string`?e.releaseNotes:void 0,releaseUrl:a,downloadUrl:o,nextSuggestedCheckInSec:typeof e.nextSuggestedCheckInSec==`number`&&Number.isFinite(e.nextSuggestedCheckInSec)?e.nextSuggestedCheckInSec:void 0}}async function rn(e,t,n,r){let i=await en(e,{method:`POST`,headers:{Accept:`application/json`,"Content-Type":`application/json`},body:JSON.stringify($t(t))},n,r);if(!i?.ok)return null;let a;try{a=await i.json()}catch{return null}return nn(a,t.currentVersion,t.platform)}async function an(e,t,n,r){let i=await en(Gt,{method:`GET`,headers:{Accept:`text/html`},redirect:`follow`},n,r);if(!i?.ok)return null;let a=typeof i.url==`string`&&i.url.length>0?i.url:Gt,o=null;try{o=new URL(a).pathname.match(/\/releases\/tag\/v(\d+\.\d+\.\d+(?:-[\w.]+)?)/)}catch{return null}if(!o?.[1])return null;let s=o[1],c=Xt(s,e),l=`${Kt}/tag/v${s}`;return{available:c>0,version:s,currentVersion:e,releaseUrl:l,downloadUrl:tn(t,s)}}async function on(e){let t=e.currentVersion?.trim()||`unknown`;if(t===`unknown`)return{available:!1,currentVersion:t,error:`Unable to check for mobile updates`};let n=e.fetchImpl??fetch,r=e.now??Date.now,i=Zt(),a=r()+Jt;for(let[t,o]of i.entries()){let s=Qt(a,i.length-t+1,r);if(s===null)break;let c=await rn(o,e,s,n);if(c)return c}let o=Qt(a,1,r);if(o!==null){let r=await an(t,e.platform,o,n);if(r)return r}return{available:!1,currentVersion:t,error:`Unable to check for mobile updates`}}function sn(){if(typeof window>`u`)return`unknown`;try{let{deviceType:e}=at();return e}catch{return`unknown`}}function cn(){let e=typeof window<`u`?window.__VSCODE_CONFIG__?.arch?.toLowerCase?.():void 0;if(e===`arm64`||e===`aarch64`)return`arm64`;if(e===`x64`||e===`amd64`||e===`x86_64`)return`x64`;let t=(typeof navigator<`u`?navigator.userAgentData:void 0)?.architecture?.toLowerCase?.();if(t===`arm`||t===`arm64`||t===`aarch64`)return`arm64`;if(t===`x86`||t===`x64`||t===`amd64`)return`x64`;let n=typeof navigator<`u`?navigator.userAgent.toLowerCase():``;return n.includes(`aarch64`)||n.includes(`arm64`)||n.includes(`armv`)?`arm64`:n.includes(`x86_64`)||n.includes(`x64`)||n.includes(`amd64`)||n.includes(`win64`)?`x64`:`unknown`}function ln(){let e=M();if(e===`android`||e===`ios`)return e;if(typeof navigator>`u`)return`web`;let t=(navigator.platform||``).toLowerCase();return t.includes(`mac`)?`macos`:t.includes(`win`)?`windows`:t.includes(`linux`)?`linux`:`web`}function un(e){let t=i.getState().reportUsage,n=new URLSearchParams({reportUsage:t?`true`:`false`});return n.set(`deviceClass`,sn()),n.set(`arch`,cn()),n.set(`platform`,ln()),e===`desktop`?(n.set(`appType`,`desktop-electron`),n.set(`instanceMode`,u()?`local`:`remote`),n):e===`vscode`?(n.set(`appType`,`vscode`),n.set(`instanceMode`,`local`),n):e===`mobile`?(n.set(`appType`,`mobile-capacitor`),n.set(`instanceMode`,`remote`),n):(n.set(`appType`,`web`),n.set(`instanceMode`,`unknown`),n)}async function dn(e,t){let n=t??`unknown`;try{let r=un(e),i=typeof window<`u`?window.__VSCODE_CONFIG__?.extensionVersion:void 0;t?r.set(`currentVersion`,t):e===`vscode`&&i&&r.set(`currentVersion`,i);let a=await g(`/api/openchamber/update-check?${r.toString()}`,{method:`GET`,headers:{Accept:`application/json`}}),o=null;try{o=await a.json()}catch{o=null}if(!a.ok)return{available:!1,currentVersion:n,error:typeof o?.error==`string`&&o.error.trim().length>0?o.error.trim():`Server responded with ${a.status}`};if(!o)return{available:!1,currentVersion:n,error:`Update check returned an invalid response`};let s=typeof o.error==`string`&&o.error.trim().length>0?o.error.trim():void 0;return{available:o.available===!0,version:typeof o.version==`string`?o.version:void 0,currentVersion:typeof o.currentVersion==`string`?o.currentVersion:n,body:typeof o.body==`string`?o.body:void 0,releaseUrl:typeof o.releaseUrl==`string`?o.releaseUrl:void 0,downloadUrl:typeof o.downloadUrl==`string`?o.downloadUrl:void 0,nextSuggestedCheckInSec:typeof o.nextSuggestedCheckInSec==`number`&&Number.isFinite(o.nextSuggestedCheckInSec)?o.nextSuggestedCheckInSec:void 0,packageManager:typeof o.packageManager==`string`?o.packageManager:void 0,updateCommand:typeof o.updateCommand==`string`?o.updateCommand:void 0,error:s}}catch(e){return console.warn(`Failed to check for updates:`,e),{available:!1,currentVersion:n,error:e instanceof Error?e.message:`Failed to check for updates`}}}function fn(){return j()?`mobile`:d()?`desktop`:o()?`vscode`:m()?`web`:null}var pn={checking:!1,available:!1,downloading:!1,downloaded:!1,info:null,progress:null,error:null,runtimeType:null,lastChecked:null,nextCheckInSec:null,otaDecision:null,otaPhase:`idle`,otaDownloadSkipped:!1,lastOtaChannelOverride:null};function mn(e,t){let n=e.isChannelRollback===!0?{isChannelRollback:!0}:{};return e.primaryAction===`apply_ota`&&e.ota.bundle?e.ota.bundle.releaseVersion===t?{available:!1,otaPhase:`idle`,info:{available:!1,currentVersion:t,nextSuggestedCheckInSec:e.nextCheckInSec,...n}}:{available:!0,otaPhase:`available`,info:{available:!0,version:e.ota.bundle.releaseVersion,currentVersion:t,downloadUrl:e.ota.bundle.url,nextSuggestedCheckInSec:e.nextCheckInSec,inAppApply:!0,...e.releaseNotes?{body:e.releaseNotes}:{},...n}}:e.primaryAction===`install_native_required`?{available:e.native.state===`required`||e.native.state===`available`,otaPhase:`idle`,info:{available:e.native.state===`required`||e.native.state===`available`,version:e.native.version,currentVersion:t,downloadUrl:e.native.installUrl,nextSuggestedCheckInSec:e.nextCheckInSec,manualUpdate:!0,...e.releaseNotes?{body:e.releaseNotes}:{},...n}}:{available:!1,otaPhase:`idle`,info:{available:!1,currentVersion:t,nextSuggestedCheckInSec:e.nextCheckInSec,...n}}}var hn=w()((e,t)=>({...pn,checkForUpdates:async()=>{let n=fn();if(!n)return null;e({checking:!0,error:null,runtimeType:n});try{let r=null,a=null;if(n===`desktop`){let t=await s(),n=t?.downloaded===!0;return e({checking:!1,available:t?.available??!1,downloaded:n,...n?{downloading:!1,progress:null}:{},info:t,error:null,lastChecked:Date.now(),nextCheckInSec:null}),a}if(n===`web`)r=await dn(`web`),a=r?.nextSuggestedCheckInSec??null;else if(n===`vscode`)a=(await dn(`vscode`))?.nextSuggestedCheckInSec??null;else if(n===`mobile`){let n=await Vt()??`unknown`,o=j()?C()?.mobileUpdates:void 0,s=i.getState().otaChannelOverride;if(o)try{let r=t().lastOtaChannelOverride!==s;e(r?{otaDecision:null,otaPhase:`checking`,downloaded:!1,otaDownloadSkipped:!1,progress:null,available:!1,info:null}:{otaPhase:`checking`});let i=await o.checkForOtaUpdate(s===`beta`||s===`stable`?{channelOverride:s}:void 0),a=mn(i,n),c=(r?void 0:t().otaDecision?.ota.bundle?.bundleId)!==i.ota.bundle?.bundleId,l=!r&&t().downloaded&&!c;return e({checking:!1,available:a.available,info:a.info,error:a.info.error??null,lastChecked:Date.now(),nextCheckInSec:i.nextCheckInSec,otaDecision:i,otaPhase:l?`pending_restart`:a.otaPhase,lastOtaChannelOverride:s,...c||r?{downloaded:!1,otaDownloadSkipped:!1,progress:null}:{}}),i.nextCheckInSec}catch(t){if(!(t instanceof I)){let r=t instanceof Error?t.message:`Mobile OTA check failed`;return e({checking:!1,available:!1,info:{available:!1,currentVersion:n},error:r,lastChecked:Date.now(),otaDecision:null,otaPhase:`error`,lastOtaChannelOverride:s}),null}}return r=await on({currentVersion:n,platform:ln()===`ios`?`ios`:`android`,deviceClass:sn(),arch:cn(),reportUsage:i.getState().reportUsage}),a=r?.nextSuggestedCheckInSec??null,e({checking:!1,available:r?.available??!1,info:r,error:r?.error??null,lastChecked:Date.now(),nextCheckInSec:a,otaDecision:null,otaPhase:`idle`}),a}return e({checking:!1,available:n===`vscode`?!1:r?.available??!1,info:n===`vscode`?null:r,error:n===`vscode`?null:r?.error??null,lastChecked:Date.now(),nextCheckInSec:a}),a}catch(t){return e({checking:!1,error:t instanceof Error?t.message:`Failed to check for updates`}),null}},downloadUpdate:async()=>{let{available:n,runtimeType:r,otaDecision:i,downloading:a,downloaded:o}=t();if(r===`mobile`&&i?.primaryAction===`apply_ota`&&i.ota.bundle){if(a||o)return;let t=C()?.mobileUpdates;if(!t){e({error:`Mobile OTA updates are unavailable in this runtime`,otaPhase:`error`});return}e({downloading:!0,error:null,progress:null,otaPhase:`downloading`,otaDownloadSkipped:!1});try{let{skipped:n}=await t.downloadOtaUpdate(i.ota.bundle);await t.queueOtaUpdateForNextLaunch(),e({downloading:!1,downloaded:!0,progress:null,otaPhase:`pending_restart`,otaDownloadSkipped:n})}catch(t){e({downloading:!1,error:t instanceof Error?t.message:`Failed to download update`,otaPhase:`error`})}return}if(!(r!==`desktop`||!n)){e({downloading:!0,error:null,progress:null});try{let n=await s();if(!n?.available)throw Error(`Update detected, but desktop package is not ready yet. Retry in a moment.`);if(e(e=>({info:e.info?{...e.info,...n,body:e.info.body||n.body,available:e.info.available}:n})),n.downloaded||t().downloaded){e({downloading:!1,downloaded:!0,progress:null});return}if(n.downloading&&e({downloading:!0,progress:n.progress??{downloaded:0}}),!await c(t=>{e({progress:t})}))throw Error(`Failed to download update`);e({downloading:!1,downloaded:!0,progress:null})}catch(t){e({downloading:!1,error:t instanceof Error?t.message:`Failed to download update`})}}},subscribeDesktopUpdateEvents:async()=>{if(!d())return()=>{};let n=[],r=await x(n=>{let r=n.event,i=n.data??null;if(r===`Started`){if(!t().downloading)return;e({error:null,progress:{downloaded:0,total:typeof i?.contentLength==`number`?i.contentLength:void 0}});return}if(r===`Progress`){if(!t().downloading)return;e({progress:{downloaded:typeof i?.downloaded==`number`?i.downloaded:0,total:typeof i?.total==`number`?i.total:void 0}});return}r===`Finished`&&e({downloading:!1,downloaded:!0,progress:null})});r&&n.push(r);let i=await _(t=>{t.downloaded&&e({downloading:!1,downloaded:!0,available:!0,progress:null})});return i&&n.push(i),async()=>{for(let e of n)try{let t=e();t instanceof Promise&&await t}catch{}}},restartToUpdate:async()=>{let{downloaded:n,runtimeType:r,otaDecision:i}=t();if(r===`mobile`&&i?.primaryAction===`apply_ota`){if(!n)return;let t=C()?.mobileUpdates;if(!t){e({error:`Mobile OTA updates are unavailable in this runtime`,otaPhase:`error`});return}try{await t.applyOtaUpdateNow()}catch(t){e({error:t instanceof Error?t.message:`Failed to restart`,otaPhase:`error`})}return}if(!(r!==`desktop`||!n))try{if(!await p())throw Error(`Failed to restart`)}catch(t){e({error:t instanceof Error?t.message:`Failed to restart`})}},setOtaPhase:(t,n=null)=>{e({otaPhase:t,...n===void 0?{}:{error:n}})},setOtaDownloadPercent:n=>{if(!Number.isFinite(n)||n<0||n>100)return;let r=t();if(!r.downloading)return;let i=Math.round(n);if((r.progress?.total?Math.round(r.progress.downloaded/r.progress.total*100):null)===i)return;let a=r.otaDecision?.ota.bundle?.size;if(typeof a==`number`&&Number.isFinite(a)&&a>0){e({progress:{downloaded:Math.round(a*n/100),total:a}});return}e({progress:{downloaded:n,total:100}})},setOtaDownloadFailed:t=>{e({downloading:!1,downloaded:!1,error:t??`Failed to download update`,otaPhase:`error`})},dismiss:()=>{let n=t();(n.runtimeType!==`mobile`||n.otaPhase!==`pending_restart`)&&e({available:!1,downloaded:!1,info:null,otaDecision:null,otaPhase:`idle`,otaDownloadSkipped:!1})},reset:()=>{e(pn)}})),gn=`https://github.com/yee94/openchamber/releases`;function _n(e){let t=new Date(`${e}T00:00:00`);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(z(),{year:`numeric`,month:`short`,day:`numeric`}).format(t)}function vn(e){return e.replace(/^## \[[^\]]+\] - \d{4}-\d{2}-\d{2}\s*\n?/,``).trim()}function yn(e){return e.replace(/(^|[^a-zA-Z0-9])@([a-zA-Z0-9-]+)/g,`$1[@$2](https://github.com/$2)`)}function bn(e,t){let n=e.split(`.`).map(e=>Number.parseInt(e,10)),r=t.split(`.`).map(e=>Number.parseInt(e,10));for(let e=0;e<3;e+=1){let t=Number.isFinite(n[e])?n[e]:0,i=Number.isFinite(r[e])?r[e]:0;if(t!==i)return i-t}return 0}function xn(e){let t=/^## \[(\d+\.\d+\.\d+)\] - (\d{4}-\d{2}-\d{2})\s*$/gm,n=[],r;for(;(r=t.exec(e))!==null;)n.push({version:r[1]??``,date:r[2]??``,start:r.index});return n.length===0?[]:n.map((t,r)=>{let i=n[r+1]?.start??e.length,a=e.slice(t.start,i).trim();return{version:t.version,date:t.date,start:t.start,end:i,raw:a}})}var Sn=2e3,Cn=6e5;async function wn(){try{let e=await g(`/api/openchamber/update-install`,{method:`POST`,headers:{"Content-Type":`application/json`}});return e.ok?{success:!0,autoRestart:(await e.json().catch(()=>({}))).autoRestart!==!1}:{success:!1,error:(await e.json().catch(()=>({}))).error||`Server error: ${e.status}`}}catch(e){return{success:!1,error:e instanceof Error?e.message:void 0}}}async function Tn(){try{return(await g(`/health`,{method:`GET`,headers:{Accept:`application/json`}})).ok}catch{return!1}}async function En(e,t=Math.ceil(Cn/Sn),n=Sn){for(let r=0;r<t;r++){try{let t=await g(`/api/openchamber/update-check`,{method:`GET`,headers:{Accept:`application/json`}});if(t.ok){let n=await t.json().catch(()=>null);if(n&&n.available===!1||n&&typeof n.currentVersion==`string`&&typeof e==`string`&&n.currentVersion!==e)return!0}else if((t.status===401||t.status===403)&&await Tn())return!0}catch{}await new Promise(e=>setTimeout(e,n))}return!1}var Dn=({open:e,onOpenChange:t,info:n,downloading:r,downloaded:i,progress:a,error:o,onDownload:s,onRestart:c,runtimeType:l=`desktop`})=>{let{t:u}=R(),[d,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(`idle`),[h,g]=(0,Q.useState)(null),_=hn(e=>e.otaDownloadSkipped),v=n?.releaseUrl||(n?.version?`${gn}/tag/v${n.version}`:gn),y=n?.downloadUrl,b=a?.total?Math.round(a.downloaded/a.total*100):0,x=l===`web`,S=l===`mobile`,C=S&&n?.manualUpdate===!0&&!!y,w=S&&n?.inAppApply===!0,T=l===`desktop`&&n?.manualUpdate===!0,E=n?.updateCommand||`openchamber update`,D=L(e=>{!e&&w&&i&&hn.getState().dismiss(),t(e)}),O=L(()=>{hn.getState().dismiss(),t(!1)});(0,Q.useEffect)(()=>{e||(m(`idle`),g(null))},[e]);let k=async()=>{(await B(E)).ok&&(f(!0),setTimeout(()=>f(!1),2e3))},A=(0,Q.useCallback)(async e=>{await st(e)},[]),j=(0,Q.useCallback)(async()=>{m(`updating`),g(null);let e=await wn();if(!e.success){m(`error`),g(e.error||u(`updateDialog.error.updateFailed`));return}e.autoRestart&&(m(`restarting`),await new Promise(e=>setTimeout(e,2e3))),m(`reconnecting`),await En(n?.currentVersion)?window.location.reload():(m(`error`),g(u(`updateDialog.error.takingLonger`)))},[n?.currentVersion,u]),M=(0,Q.useCallback)(()=>{y&&A(y)},[A,y]),N=p!==`idle`&&p!==`error`,P=(0,Q.useMemo)(()=>{if(!n?.body)return null;let e=n.body.trim();if(!e)return null;let t=xn(e);if(t.length===0)return{kind:`raw`,title:u(`updateDialog.changelog.title`),content:yn(e)};let r=[...t].sort((e,t)=>bn(e.version,t.version));return{kind:`sections`,title:u(`updateDialog.changelog.title`),sections:r.map(t=>({version:t.version,dateLabel:_n(t.date),content:yn(vn(t.raw)||e)}))}},[n?.body,u]);return(0,X.jsx)(de,{open:e,onOpenChange:N?void 0:D,children:(0,X.jsxs)(le,{className:`max-w-4xl gap-0 p-4 sm:p-5 bg-background border-[var(--interactive-border)]`,showCloseButton:!0,children:[(0,X.jsxs)(`div`,{className:`mb-3 pr-8 sm:mb-4`,children:[(0,X.jsxs)(ue,{className:`flex items-center gap-2`,children:[(0,X.jsx)(K,{name:`download-cloud`,className:`h-5 w-5 text-[var(--primary-base)]`}),(0,X.jsx)(`span`,{className:`font-semibold text-foreground`,children:u(p===`restarting`||p===`reconnecting`?`updateDialog.header.updating`:`updateDialog.header.updateAvailable`)})]}),(n?.currentVersion||n?.version)&&(0,X.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-1.5 pl-7 font-mono text-[11px] leading-4 tracking-[-0.01em] tabular-nums sm:text-xs`,children:[n?.currentVersion&&(0,X.jsx)(`span`,{className:`text-muted-foreground/75`,children:n.currentVersion}),n?.currentVersion&&n?.version&&(0,X.jsx)(`span`,{className:`text-muted-foreground/40`,children:`→`}),n?.version&&(0,X.jsx)(`span`,{className:`font-medium text-[var(--primary-base)]`,children:n.version})]})]}),(0,X.jsxs)(`div`,{className:`space-y-3 sm:space-y-4`,children:[x&&N&&(0,X.jsxs)(`div`,{className:`rounded-lg bg-[var(--surface-elevated)]/30 p-5 border border-[var(--surface-subtle)]`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,X.jsx)(K,{name:`loader`,className:`h-5 w-5 animate-spin text-[var(--primary-base)]`}),(0,X.jsxs)(`div`,{className:`typography-ui-label text-foreground`,children:[p===`updating`&&u(`updateDialog.status.installingUpdate`),p===`restarting`&&u(`updateDialog.status.serverRestarting`),p===`reconnecting`&&u(`updateDialog.status.waitingForServer`)]})]}),(0,X.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:u(`updateDialog.status.autoReloadHint`)})]}),P&&!N&&(0,X.jsxs)(`section`,{className:`overflow-hidden rounded-xl border border-[var(--surface-subtle)] bg-[var(--surface-elevated)]/20`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-[var(--surface-subtle)] px-3.5 py-2.5 sm:px-4 sm:py-3`,children:[(0,X.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-[var(--primary-base)]`,"aria-hidden":`true`}),(0,X.jsx)(`h3`,{className:`typography-ui-caption font-medium text-muted-foreground`,children:P.title})]}),(0,X.jsx)(xe,{className:`max-h-[min(42dvh,22rem)] p-0 sm:max-h-[400px]`,fillContainer:!1,children:P.kind===`raw`?(0,X.jsx)(`div`,{className:`break-words p-3.5 text-[13px] leading-[1.65] text-foreground sm:p-4 sm:text-sm [&_.markdown-content]:leading-[1.65] [&_a]:!text-[var(--primary-base)] [&_a]:!no-underline [&_a:hover]:!underline`,onClickCapture:e=>{let t=e.target.closest(`a`);t&&t.href&&(e.preventDefault(),e.stopPropagation(),A(t.href))},children:(0,X.jsx)(ot,{content:P.content,disableLinkSafety:!0,enableFileReferences:!1})}):(0,X.jsx)(`div`,{className:`divide-y divide-[var(--surface-subtle)]`,children:P.sections.map(e=>(0,X.jsxs)(`div`,{className:`p-3.5 sm:p-4`,children:[(0,X.jsxs)(`div`,{className:`mb-2.5 flex flex-wrap items-center gap-x-2 gap-y-1 sm:mb-3`,children:[(0,X.jsxs)(`span`,{className:`rounded-md bg-[var(--primary-base)]/10 px-1.5 py-0.5 font-mono text-[11px] font-medium leading-4 text-[var(--primary-base)] tabular-nums sm:text-xs`,children:[`v`,e.version]}),(0,X.jsx)(`span`,{className:`text-[11px] leading-4 text-muted-foreground/75 sm:text-xs`,children:e.dateLabel})]}),(0,X.jsx)(`div`,{className:`break-words text-[13px] leading-[1.65] text-foreground sm:text-sm [&_.markdown-content]:leading-[1.65] [&_a]:!text-[var(--primary-base)] [&_a]:!no-underline [&_a:hover]:!underline`,onClickCapture:e=>{let t=e.target.closest(`a`);t&&t.href&&(e.preventDefault(),e.stopPropagation(),A(t.href))},children:(0,X.jsx)(ot,{content:e.content,disableLinkSafety:!0,enableFileReferences:!1})})]},e.version))})})]}),x&&p===`error`&&(0,X.jsxs)(`div`,{className:`space-y-2 mt-4`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 typography-meta text-muted-foreground`,children:[(0,X.jsx)(K,{name:`terminal`,className:`h-4 w-4`}),(0,X.jsx)(`span`,{children:u(`updateDialog.fallback.updateViaTerminal`)})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2 p-1 pl-3 bg-[var(--surface-elevated)]/50 rounded-md border border-[var(--surface-subtle)]`,children:[(0,X.jsx)(`code`,{className:`flex-1 font-mono text-sm text-foreground overflow-x-auto whitespace-nowrap`,children:E}),(0,X.jsx)(`button`,{onClick:k,className:G(`flex items-center justify-center p-2 rounded`,`text-muted-foreground hover:text-foreground hover:bg-[var(--interactive-hover)]`,`transition-colors`,d&&`text-[var(--status-success)]`),title:u(d?`updateDialog.actions.copied`:`updateDialog.actions.copyCommand`),children:d?(0,X.jsx)(K,{name:`check`,className:`h-4 w-4`}):(0,X.jsx)(K,{name:`clipboard`,className:`h-4 w-4`})})]})]}),!x&&(!S||w)&&r&&(0,X.jsxs)(`div`,{className:`mt-3 space-y-2 rounded-lg border border-[var(--surface-subtle)] bg-[var(--surface-elevated)]/20 px-3.5 py-3 sm:mt-4 sm:px-4`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,X.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground sm:text-[13px]`,children:u(`updateDialog.status.downloadingPayload`)}),(0,X.jsxs)(`span`,{className:`shrink-0 font-mono text-[11px] leading-4 text-foreground tabular-nums sm:text-xs`,children:[b,`%`]})]}),(0,X.jsx)(`div`,{className:`h-1 overflow-hidden rounded-full bg-[var(--surface-subtle)] sm:h-1.5`,children:(0,X.jsx)(`div`,{className:`h-full rounded-full bg-[var(--primary-base)] transition-all duration-300`,style:{width:`${b}%`}})})]}),(o||h)&&(0,X.jsx)(`div`,{className:`p-3 mt-4 bg-[var(--status-error-background)] border border-[var(--status-error-border)] rounded-lg`,children:(0,X.jsx)(`p`,{className:`text-sm text-[var(--status-error)]`,children:o||h})})]}),w&&i&&_&&(0,X.jsxs)(`div`,{className:`mt-4 flex items-center gap-2 rounded-lg border border-[var(--status-success-border)] bg-[var(--status-success-background)] px-3 py-2.5 text-sm text-[var(--status-success)]`,children:[(0,X.jsx)(K,{name:`check`,className:`h-4 w-4 shrink-0`}),(0,X.jsx)(`span`,{children:u(`updateDialog.status.otaBundleReused`)})]}),(0,X.jsxs)(`div`,{className:`mt-4 flex items-center justify-between gap-4`,children:[!S||C?(0,X.jsxs)(`a`,{href:S?y:v,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 typography-ui-label text-muted-foreground hover:text-foreground transition-colors shrink-0`,children:[(0,X.jsx)(K,{name:`external-link`,className:`h-4 w-4`}),`GitHub`]}):(0,X.jsx)(`span`,{}),(0,X.jsxs)(`div`,{className:`flex-1 flex justify-end`,children:[!x&&(!S||w)&&!T&&!i&&!r&&(0,X.jsxs)(q,{onClick:s,size:`default`,children:[(0,X.jsx)(K,{name:`download`,className:`h-4 w-4`}),u(w?`updateDialog.actions.applyOtaNow`:`updateDialog.actions.downloadUpdate`)]}),!x&&!S&&T&&!i&&!r&&(0,X.jsxs)(q,{onClick:()=>void A(v),size:`default`,children:[(0,X.jsx)(K,{name:`external-link`,className:`h-4 w-4`}),u(`updateDialog.actions.openMobileUpdate`)]}),!x&&(!S||w)&&r&&(0,X.jsxs)(q,{disabled:!0,size:`default`,children:[(0,X.jsx)(K,{name:`loader`,className:`h-4 w-4 animate-spin`}),u(`updateDialog.status.downloading`)]}),!x&&(!S||w)&&i&&(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[w&&(0,X.jsx)(q,{onClick:O,variant:`ghost`,size:`default`,children:u(`updateDialog.actions.later`)}),(0,X.jsxs)(q,{onClick:c,size:`default`,children:[(0,X.jsx)(K,{name:`restart`,className:`h-4 w-4`}),u(`updateDialog.actions.restartToUpdate`)]})]}),S&&!w&&C&&(0,X.jsxs)(q,{onClick:M,size:`default`,children:[(0,X.jsx)(K,{name:`external-link`,className:`h-4 w-4`}),u(`updateDialog.actions.openMobileUpdate`)]}),x&&!N&&(0,X.jsxs)(q,{onClick:j,size:`default`,children:[(0,X.jsx)(K,{name:`download`,className:`h-4 w-4`}),u(`updateDialog.actions.updateNow`)]}),x&&N&&(0,X.jsxs)(q,{disabled:!0,size:`default`,children:[(0,X.jsx)(K,{name:`loader`,className:`h-4 w-4 animate-spin`}),u(`updateDialog.status.updating`)]})]})]})]})})};function On(e){let t=(0,Y.c)(20),{label:n,children:r,description:i,itemId:a,ariaLabel:o,className:s,cardClassName:c,cardId:l}=e,u=typeof n==`string`&&/^[\p{Script=Latin}\p{Number}\p{Punctuation}\p{Separator}]+$/u.test(n)?`latin`:void 0,d;t[0]===s?d=t[1]:(d=G(`oc-settings-group`,s),t[0]=s,t[1]=d);let f;t[2]!==n||t[3]!==u?(f=n?(0,X.jsx)(`div`,{className:`oc-settings-group-label`,"data-settings-label-script":u,children:n}):null,t[2]=n,t[3]=u,t[4]=f):f=t[4];let p;t[5]===c?p=t[6]:(p=G(`oc-settings-group-card`,c),t[5]=c,t[6]=p);let m;t[7]!==l||t[8]!==r||t[9]!==a||t[10]!==p?(m=(0,X.jsx)(`div`,{id:l,"data-settings-item":a,className:p,children:r}),t[7]=l,t[8]=r,t[9]=a,t[10]=p,t[11]=m):m=t[11];let h;t[12]===i?h=t[13]:(h=i?(0,X.jsx)(`p`,{className:`oc-settings-group-description text-muted-foreground`,children:i}):null,t[12]=i,t[13]=h);let g;return t[14]!==o||t[15]!==d||t[16]!==f||t[17]!==m||t[18]!==h?(g=(0,X.jsxs)(`section`,{className:d,"aria-label":o,children:[f,m,h]}),t[14]=o,t[15]=d,t[16]=f,t[17]=m,t[18]=h,t[19]=g):g=t[19],g}function kn(e){let t=(0,Y.c)(20),n,r,i,a,o,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8]):({label:s,description:a,descriptionPlacement:l,ariaLabel:n,groupClassName:o,cardClassName:r,children:i,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l);let u=l===void 0?`inside`:l,d=u===`outside`?a:void 0,f=u===`inside`?a:void 0,p;t[9]!==i||t[10]!==s||t[11]!==c||t[12]!==f?(p=(0,X.jsx)(An,{label:s,description:f,...c,children:i}),t[9]=i,t[10]=s,t[11]=c,t[12]=f,t[13]=p):p=t[13];let m;return t[14]!==n||t[15]!==r||t[16]!==o||t[17]!==d||t[18]!==p?(m=(0,X.jsx)(On,{ariaLabel:n,className:o,cardClassName:r,description:d,children:p}),t[14]=n,t[15]=r,t[16]=o,t[17]=d,t[18]=p,t[19]=m):m=t[19],m}function An(e){let t=(0,Y.c)(22),{label:n,children:r,description:i,itemId:a,className:o,copyClassName:s,controlClassName:c}=e,l;t[0]===o?l=t[1]:(l=G(`oc-settings-group-row oc-settings-split-row`,o),t[0]=o,t[1]=l);let u;t[2]===s?u=t[3]:(u=G(`oc-settings-split-row-copy`,s),t[2]=s,t[3]=u);let d;t[4]===n?d=t[5]:(d=n?(0,X.jsx)(`div`,{className:`typography-ui-label text-foreground`,children:n}):null,t[4]=n,t[5]=d);let f;t[6]===i?f=t[7]:(f=i?(0,X.jsx)(`span`,{className:`typography-meta text-muted-foreground`,children:i}):null,t[6]=i,t[7]=f);let p;t[8]!==u||t[9]!==d||t[10]!==f?(p=(0,X.jsxs)(`div`,{className:u,children:[d,f]}),t[8]=u,t[9]=d,t[10]=f,t[11]=p):p=t[11];let m;t[12]===c?m=t[13]:(m=G(`oc-settings-split-row-control`,c),t[12]=c,t[13]=m);let h;t[14]!==r||t[15]!==m?(h=(0,X.jsx)(`div`,{"data-settings-value":``,className:m,children:r}),t[14]=r,t[15]=m,t[16]=h):h=t[16];let g;return t[17]!==a||t[18]!==l||t[19]!==p||t[20]!==h?(g=(0,X.jsxs)(`div`,{"data-settings-item":a,className:l,children:[p,h]}),t[17]=a,t[18]=l,t[19]=p,t[20]=h,t[21]=g):g=t[21],g}function jn(e){let t=(0,Y.c)(32),{checked:n,onChange:r,label:i,ariaLabel:a,description:o,itemId:s,disabled:c,className:l}=e,u=c!==void 0&&c,d;t[0]!==n||t[1]!==u||t[2]!==r?(d=()=>{u||r(!n)},t[0]=n,t[1]=u,t[2]=r,t[3]=d):d=t[3];let f=d,p=Mn,m=u?`cursor-not-allowed`:`cursor-pointer`,h;t[4]!==l||t[5]!==m?(h=G(`oc-settings-group-row oc-settings-split-row group`,m,l),t[4]=l,t[5]=m,t[6]=h):h=t[6];let g=u?-1:0,_=u||void 0,v,y;t[7]===f?(v=t[8],y=t[9]):(v=e=>{p(e.target)||f()},y=e=>{p(e.target)||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),f())},t[7]=f,t[8]=v,t[9]=y);let b;t[10]===i?b=t[11]:(b=(0,X.jsx)(`span`,{className:`typography-ui-label text-foreground`,children:i}),t[10]=i,t[11]=b);let x;t[12]===o?x=t[13]:(x=o?(0,X.jsx)(`span`,{className:`typography-meta text-muted-foreground`,children:o}):null,t[12]=o,t[13]=x);let S;t[14]!==x||t[15]!==b?(S=(0,X.jsxs)(`div`,{className:`oc-settings-split-row-copy`,children:[b,x]}),t[14]=x,t[15]=b,t[16]=S):S=t[16];let C;t[17]!==a||t[18]!==n||t[19]!==u||t[20]!==r?(C=(0,X.jsx)(`div`,{"data-settings-value":``,className:`oc-settings-split-row-control`,children:(0,X.jsx)(J,{checked:n,onChange:r,disabled:u,ariaLabel:a})}),t[17]=a,t[18]=n,t[19]=u,t[20]=r,t[21]=C):C=t[21];let w;return t[22]!==n||t[23]!==s||t[24]!==S||t[25]!==C||t[26]!==h||t[27]!==g||t[28]!==_||t[29]!==v||t[30]!==y?(w=(0,X.jsxs)(`div`,{"data-settings-item":s,className:h,role:`button`,tabIndex:g,"aria-pressed":n,"aria-disabled":_,onClick:v,onKeyDown:y,children:[S,C]}),t[22]=n,t[23]=s,t[24]=S,t[25]=C,t[26]=h,t[27]=g,t[28]=_,t[29]=v,t[30]=y,t[31]=w):w=t[31],w}function Mn(e){return e instanceof HTMLElement&&e.closest(`button, a, input, select, textarea`)!==null}function Nn(e,t,n){return Math.min(n,Math.max(t,e))}function Pn(e){if(!Number.isFinite(e))return 0;let t=String(e);if(t.includes(`e-`)){let[,e]=t.split(`e-`);return Number(e)||0}let n=t.split(`.`);return n.length===2?n[1].length:0}function Fn(e,t){let n=Pn(t);return n<=0?e:Number(e.toFixed(n))}var In=Q.forwardRef(({value:e,onValueChange:t,min:n=-1/0,max:r=1/0,step:i=1,className:a,containerClassName:o,onBlur:s,disabled:c,fallbackValue:l,onClear:u,emptyLabel:d=`—`,...f},p)=>{let{t:m}=R(),[h,g]=Q.useState(()=>e===void 0?``:String(e)),{isMobile:_}=it(),v=Q.useRef(!1),y=Q.useRef(null),b=Q.useCallback(()=>{if(typeof document>`u`||typeof window>`u`)return;y.current?.();let e=e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation?.(),y.current?.()},t=window.setTimeout(()=>{y.current?.()},700);y.current=()=>{window.clearTimeout(t),document.removeEventListener(`click`,e,!0),y.current=null},document.addEventListener(`click`,e,!0)},[]);Q.useEffect(()=>()=>{y.current?.()},[]),Q.useEffect(()=>{g(e===void 0?``:String(e))},[e]);let x=Q.useMemo(()=>e===void 0?l===void 0?Number.isFinite(n)?n:0:l:e,[l,n,e]),S=Q.useRef(x);Q.useEffect(()=>{S.current=x},[x]);let C=Q.useCallback(e=>{let a=Fn(Nn(e,n,r),i);S.current=a,t(a)},[r,n,t,i]),w=Q.useCallback(e=>{let t=e.target.value;if(g(t),t.trim()===``){u?.();return}let n=Number(t);Number.isFinite(n)&&C(n)},[C,u]),T=Q.useCallback(t=>{if(h.trim()===``){u||g(e===void 0?``:String(e)),s?.(t);return}let a=Number(h);if(!Number.isFinite(a))g(e===void 0?``:String(e));else{let t=Fn(Nn(a,n,r),i);t===e?S.current=t:C(a),g(String(t))}s?.(t)},[C,h,r,n,s,u,i,e]),E=!!(c||x>=r),D=!!(c||x<=n),O=()=>{D||C(S.current-i)},k=()=>{E||C(S.current+i)},A=e=>t=>{t.preventDefault(),t.stopPropagation(),v.current=!0,b(),e()},j=e=>t=>{if(v.current){v.current=!1,t.preventDefault(),t.stopPropagation();return}e()};return _?(0,X.jsxs)(`div`,{"data-slot":`number-input`,className:G(`flex h-9 shrink-0 items-stretch overflow-x-hidden overflow-y-hidden rounded-lg border border-border bg-transparent select-none overscroll-contain`,`[-webkit-user-select:none] [-webkit-touch-callout:none]`,`disabled:pointer-events-none disabled:opacity-50`,o),children:[(0,X.jsx)(`button`,{type:`button`,"aria-label":m(`numberInput.actions.decreaseAria`),disabled:D,onTouchStart:A(O),onClick:j(O),className:G(`grid h-full min-h-0 w-9 place-items-center overflow-x-hidden overflow-y-hidden border-r border-border p-0 leading-none touch-none`,`text-muted-foreground`,`disabled:pointer-events-none disabled:opacity-50`,!D&&`active:bg-interactive-hover`),children:(0,X.jsx)(K,{name:`subtract`,className:`block h-4 w-4`})}),(0,X.jsx)(`div`,{"data-slot":`number-input-value`,className:G(`flex h-full min-w-0 w-14 items-center justify-center bg-transparent px-1.5`,`text-center text-[16px] leading-none text-foreground [font-variant-numeric:tabular-nums]`,a),"aria-live":`polite`,children:e===void 0?d:h}),(0,X.jsx)(`button`,{type:`button`,"aria-label":m(`numberInput.actions.increaseAria`),disabled:E,onTouchStart:A(k),onClick:j(k),className:G(`grid h-full min-h-0 w-9 place-items-center overflow-x-hidden overflow-y-hidden border-l border-border p-0 leading-none touch-none`,`text-muted-foreground`,`disabled:pointer-events-none disabled:opacity-50`,!E&&`active:bg-interactive-hover`),children:(0,X.jsx)(K,{name:`add`,className:`block h-4 w-4`})})]}):(0,X.jsxs)(`div`,{"data-slot":`number-input`,className:G(`flex h-7 shrink-0 items-stretch overflow-x-hidden overflow-y-hidden rounded-lg border border-border bg-transparent`,`disabled:pointer-events-none disabled:opacity-50`,o),children:[(0,X.jsx)(`button`,{type:`button`,"aria-label":m(`numberInput.actions.decreaseAria`),disabled:D,onClick:()=>C(S.current-i),className:G(`flex h-full w-7 items-center justify-center overflow-x-hidden overflow-y-hidden border-r border-border p-0 leading-none touch-manipulation`,`text-muted-foreground hover:bg-interactive-hover hover:text-foreground`,`disabled:pointer-events-none disabled:opacity-50`),children:(0,X.jsx)(K,{name:`subtract`,className:`block h-3.5 w-3.5`})}),(0,X.jsx)(`input`,{...f,"data-slot":`number-input-value`,ref:p,type:`text`,inputMode:f.inputMode??`numeric`,value:h,onChange:w,onBlur:T,disabled:c,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,className:G(`h-full min-w-0 w-14 bg-transparent px-1.5 text-center typography-ui-label leading-none text-foreground [font-variant-numeric:tabular-nums]`,`placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground`,`appearance-none outline-none [appearance:textfield] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,`disabled:pointer-events-none disabled:cursor-not-allowed`,a)}),(0,X.jsx)(`button`,{type:`button`,"aria-label":m(`numberInput.actions.increaseAria`),disabled:E,onClick:()=>C(S.current+i),className:G(`flex h-full w-7 items-center justify-center overflow-x-hidden overflow-y-hidden border-l border-border p-0 leading-none touch-manipulation`,`text-muted-foreground hover:bg-interactive-hover hover:text-foreground`,`disabled:pointer-events-none disabled:opacity-50`),children:(0,X.jsx)(K,{name:`add`,className:`block h-3.5 w-3.5`})})]})});In.displayName=`NumberInput`;var Ln=`/mcp/oauth/callback`,Rn=e=>{if(typeof window>`u`)return null;try{let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=t.length%4==0?``:`=`.repeat(4-t.length%4),r=window.atob(t+n),i=Uint8Array.from(r,e=>e.charCodeAt(0));return new TextDecoder().decode(i)}catch{return null}},zn=e=>{let t=Vn(e.get(`state`));if(t)return t;let n=e.get(`server`);if(typeof n!=`string`||!n.trim())return null;let r=e.get(`directory`);return{name:n.trim(),directory:typeof r==`string`&&r.trim()?r.trim():null}},Bn=e=>{let t=e.get(`state`);return typeof t==`string`&&t.trim()||null},Vn=e=>{if(typeof e!=`string`||!e.trim())return null;let t=Rn(e.trim());if(!t)return null;try{let e=JSON.parse(t);return e?.v!==1||typeof e.n!=`string`||!e.n.trim()?null:{name:e.n.trim(),directory:typeof e.d==`string`&&e.d.trim()?e.d.trim():null}}catch{return null}},Hn=w()(E(T((e,t)=>({selectedProfileId:null,defaultGitIdentityId:null,profiles:[],globalIdentity:null,discoveredCredentials:[],isLoading:!1,setSelectedProfile:t=>{e({selectedProfileId:t})},loadProfiles:async()=>{e({isLoading:!0});let n=t().profiles;try{return e({profiles:await he(),isLoading:!1}),!0}catch(t){return console.error(`Failed to load git identity profiles:`,t),e({profiles:n,isLoading:!1}),!1}},loadGlobalIdentity:async()=>{try{let t=await ge();return t&&t.userName&&t.userEmail?e({globalIdentity:{id:`global`,name:`Global Identity`,userName:t.userName,userEmail:t.userEmail,authType:t.sshCommand?`ssh`:void 0,sshKey:t.sshCommand?t.sshCommand.replace(`ssh -i `,``):null,color:`info`,icon:`house`}}):e({globalIdentity:null}),!0}catch(t){return console.error(`Failed to load global git identity:`,t),e({globalIdentity:null}),!1}},loadDiscoveredCredentials:async()=>{try{return e({discoveredCredentials:await be()}),!0}catch(t){return console.error(`Failed to discover git credentials:`,t),e({discoveredCredentials:[]}),!1}},loadDefaultGitIdentityId:async()=>{let t=e=>{if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null};try{let n=null;if(n===null){let e=C()?.settings;if(e)try{n=t(((await e.load())?.settings||{}).defaultGitIdentityId)}catch{}}if(n===null)try{let e=await g(`/api/config/settings`,{method:`GET`,headers:{Accept:`application/json`}});e.ok&&(n=t((await e.json().catch(()=>null))?.defaultGitIdentityId))}catch{}return e({defaultGitIdentityId:n}),!0}catch(e){return console.error(`Failed to load default git identity setting:`,e),!1}},setDefaultGitIdentityId:async t=>{try{let n=typeof t==`string`?t.trim():``,r=n.length>0?n:``;return await y({defaultGitIdentityId:r}),e({defaultGitIdentityId:r.length>0?r:null}),!0}catch(e){return console.error(`Failed to save default git identity setting:`,e),!1}},createProfile:async e=>{try{let n={...e,id:e.id||`profile-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,color:e.color||`keyword`,icon:e.icon||`branch`};return await ye(n),await t().loadProfiles(),!0}catch(e){return console.error(`Failed to create git identity profile:`,e),!1}},updateProfile:async(e,n)=>{try{let r=t().profiles.find(t=>t.id===e);if(!r)throw Error(`Profile not found`);let i={...r,...n};return await me(e,i),await t().loadProfiles(),!0}catch(e){return console.error(`Failed to update git identity profile:`,e),!1}},deleteProfile:async n=>{try{return await _e(n),t().selectedProfileId===n&&e({selectedProfileId:null}),await t().loadProfiles(),!0}catch(e){return console.error(`Failed to delete git identity profile:`,e),!1}},getProfileById:e=>{let{profiles:n,globalIdentity:r}=t();return e===`global`?r||void 0:n.find(t=>t.id===e)},getUnimportedCredentials:()=>{let{profiles:e,discoveredCredentials:n}=t();return n.filter(t=>!e.some(e=>e.authType===`token`&&e.host===t.host))}}),{name:`git-identities-store`,storage:a(),partialize:e=>({selectedProfileId:e.selectedProfileId})}),{name:`git-identities-store`}));typeof window<`u`&&(window.__zustand_git_identities_store__=Hn);var Un=`w-full max-w-[30rem]`,Wn=e=>{let t=(0,Y.c)(23),{title:n,description:r,settingsItem:i,titleAccessory:a,headerAction:o,children:s,className:c,contentClassName:l}=e,u;t[0]===n?u=t[1]:(u=(0,X.jsx)(`span`,{className:`truncate`,children:n}),t[0]=n,t[1]=u);let d;t[2]!==u||t[3]!==a?(d=(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[u,a]}),t[2]=u,t[3]=a,t[4]=d):d=t[4];let f;t[5]===o?f=t[6]:(f=o?(0,X.jsx)(`div`,{className:`shrink-0`,children:o}):null,t[5]=o,t[6]=f);let p;t[7]!==d||t[8]!==f?(p=(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[d,f]}),t[7]=d,t[8]=f,t[9]=p):p=t[9];let m;t[10]===l?m=t[11]:(m=G(`oc-settings-group-row`,l),t[10]=l,t[11]=m);let h;t[12]!==s||t[13]!==m?(h=(0,X.jsx)(`div`,{className:m,children:s}),t[12]=s,t[13]=m,t[14]=h):h=t[14];let g;t[15]!==r||t[16]!==p||t[17]!==h?(g=(0,X.jsx)(On,{className:`oc-settings-detail-group`,label:p,description:r,children:h}),t[15]=r,t[16]=p,t[17]=h,t[18]=g):g=t[18];let _;return t[19]!==c||t[20]!==i||t[21]!==g?(_=(0,X.jsx)(`div`,{"data-settings-item":i,className:c,children:g}),t[19]=c,t[20]=i,t[21]=g,t[22]=_):_=t[22],_},Gn=450,Kn=({projectRef:e=null})=>{let{t}=R(),{isMobile:n,isTablet:r}=it(),i=n||r,a=U(e=>e.getActiveProject()),o=e?.path??a?.path??null,s=se(e=>e.getWorktreeMetadata),c=oe(),l=k(e=>e.homeDirectory),[u,d]=Q.useState([]),[f,p]=Q.useState(!1),[m,h]=Q.useState(!1),[g,_]=Q.useState(null),[v,y]=Q.useState(null),[b,x]=Q.useState([]),[S,C]=Q.useState(!1),w=Q.useRef(!1),T=Q.useMemo(()=>e?.id&&e?.path?{id:e.id,path:e.path}:!a?.id||!o?null:{id:a.id,path:o},[a?.id,o,e?.id,e?.path]),E=Q.useCallback(async()=>{if(!(!T||v===!1))try{let e=await Ee(T);x(e)}catch{}},[T,v]);Q.useEffect(()=>{if(!o)return;let e=!1;return y(null),(async()=>{try{let t=await ve(o);if(e)return;y(t)}catch{}})(),()=>{e=!0}},[o]),Q.useEffect(()=>{if(!T){x([]),C(!1);return}if(v===!1){x([]),C(!1);return}let e=!1;return C(!0),x([]),(async()=>{try{let t=await Ee(T);if(e)return;x(t)}catch{}finally{e||C(!1)}})(),()=>{e=!0}},[T,v]),Q.useEffect(()=>{if(!T)return;let e=!1;return h(!0),(async()=>{try{let[t,n]=await Promise.all([ne(T),re(T)]);if(!e){let e=t.length>0?t:[``];d(e),_(JSON.stringify(e)),p(n)}}catch{e||(d([``]),_(JSON.stringify([``])),p(!1))}finally{e||h(!1)}})(),()=>{e=!0}},[T]);let D=Q.useCallback(async e=>{if(!T)return!1;let n=e.filter(e=>e.trim().length>0);try{return await ie(T,n)?(_(JSON.stringify(e)),!0):(W.error(t(`settings.openchamber.worktrees.setup.toast.saveFailed`)),!1)}catch{return W.error(t(`settings.openchamber.worktrees.setup.toast.saveFailed`)),!1}},[T,t]),O=Q.useMemo(()=>g!==null&&g!==JSON.stringify(u),[g,u]);Q.useEffect(()=>{if(!O||m||w.current)return;let e=window.setTimeout(()=>{w.current||(w.current=!0,(async()=>{try{await D(u)}finally{w.current=!1}})())},Gn);return()=>{window.clearTimeout(e)}},[O,m,D,u]);let A=Q.useCallback((e,t)=>{d(n=>{let r=[...n];return r[e]=t,r})},[]),j=Q.useCallback(()=>{d(e=>[...e,``])},[]),M=Q.useCallback(e=>{d(t=>{let n=t.filter((t,n)=>n!==e);return n.length>0?n:[``]})},[]),N=Q.useCallback(()=>{!O||w.current||(w.current=!0,(async()=>{try{await D(u)}finally{w.current=!1}})())},[O,D,u]),P=Q.useCallback(e=>{p(e),T&&H(T,e)},[T]),F=Q.useCallback(e=>{let t=e=>e.replace(/\\/g,`/`).replace(/\/+$/,``),n=t(e.path),r=c.filter(e=>{let r=s(e.id);if(r?.path&&t(r.path)===n)return!0;let i=e.directory;return!!(i&&t(i)===n)}),i=new Set(r.map(e=>e.id)),a=[...ae.getState().activeSessions,...ae.getState().archivedSessions],o=e=>{let t=a.filter(t=>{let n=t.parentID;return n&&e.has(n)});if(t.length===0)return[];let n=new Set(t.map(e=>e.id));return[...t,...o(n)]},l=o(i),u=new Set,d=[...r,...l].filter(e=>!u.has(e.id)&&(u.add(e.id),!0));ee.requestDelete({sessions:d,mode:`worktree`,worktree:e})},[c,s]),I=Q.useMemo(()=>c.map(e=>e.id).join(`,`),[c]);Q.useEffect(()=>{v&&o&&E()},[I,v,o,E]);let L=(0,X.jsxs)(Ie,{children:[(0,X.jsx)(Pe,{asChild:!0,children:(0,X.jsx)(K,{name:`information`,className:`h-3.5 w-3.5 text-muted-foreground/60 cursor-help`})}),(0,X.jsxs)(Fe,{sideOffset:8,className:`max-w-xs`,children:[t(`settings.openchamber.worktrees.setup.tooltipPrefix`),` `,(0,X.jsx)(`code`,{className:`font-mono text-xs bg-sidebar-accent/50 px-1 rounded`,children:`$ROOT_PROJECT_PATH`}),` `,t(`settings.openchamber.worktrees.setup.tooltipSuffix`)]})]}),z=(0,X.jsxs)(Ie,{children:[(0,X.jsx)(Pe,{asChild:!0,children:(0,X.jsx)(K,{name:`information`,className:`h-3.5 w-3.5 text-muted-foreground/60 cursor-help`})}),(0,X.jsx)(Fe,{sideOffset:8,className:`max-w-xs`,children:t(`settings.openchamber.worktrees.list.tooltip`)})]});return o?v===!1?(0,X.jsx)(Wn,{title:t(`settings.projects.page.section.worktree`),settingsItem:`projects.worktree`,children:(0,X.jsx)(`p`,{className:`typography-meta text-muted-foreground`,children:t(`settings.openchamber.worktrees.state.gitOnly`)})}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Wn,{title:t(`settings.projects.page.section.worktree`),settingsItem:`projects.worktree`,titleAccessory:L,children:m?(0,X.jsx)(`p`,{className:`typography-meta text-muted-foreground`,children:t(`settings.openchamber.worktrees.setup.loading`)}):(0,X.jsxs)(`div`,{className:G(`flex flex-col gap-2`,Un),children:[u.map((e,n)=>(0,X.jsxs)(`div`,{className:`oc-settings-group-row flex w-full items-center gap-2`,children:[(0,X.jsx)(Ne,{value:e,onChange:e=>A(n,e.target.value),onBlur:N,placeholder:t(`settings.openchamber.worktrees.setup.commandPlaceholder`),className:`min-w-0 flex-1 font-mono text-xs`}),(0,X.jsx)(`button`,{type:`button`,onClick:()=>M(n),className:`flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50`,"aria-label":t(`settings.openchamber.worktrees.setup.removeCommandAria`),children:(0,X.jsx)(K,{name:`close`,className:`h-4 w-4`})})]},n)),(0,X.jsxs)(q,{type:`button`,variant:`ghost`,size:`xs`,className:`!font-normal`,onClick:j,children:[(0,X.jsx)(K,{name:`add`,className:`h-3.5 w-3.5`}),t(`settings.openchamber.worktrees.setup.addCommand`)]}),(0,X.jsxs)(`label`,{"data-settings-item":`projects.worktree.setup.wait`,className:`flex cursor-pointer items-center gap-2 py-1`,children:[(0,X.jsx)(J,{checked:f,onChange:P,ariaLabel:t(`settings.openchamber.worktrees.setup.waitForCommandsAria`)}),(0,X.jsx)(`span`,{className:G(`typography-ui-label font-normal`,f?`text-foreground`:`text-foreground/60`),children:t(`settings.openchamber.worktrees.setup.waitForCommands`)})]})]})}),(0,X.jsx)(Wn,{title:t(`settings.openchamber.worktrees.list.title`),titleAccessory:z,children:S?(0,X.jsx)(`p`,{className:`typography-meta text-muted-foreground`,children:t(`settings.openchamber.worktrees.list.loading`)}):b.length===0?(0,X.jsx)(`p`,{className:`typography-meta text-muted-foreground/70`,children:t(`settings.openchamber.worktrees.list.empty`)}):(0,X.jsx)(`div`,{className:G(`space-y-1`,Un),children:b.map(e=>(0,X.jsxs)(`div`,{className:`group flex w-full items-center gap-2 py-1.5`,children:[(0,X.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,X.jsx)(`p`,{className:`typography-meta min-w-0 truncate text-foreground`,children:e.label||e.branch||t(`settings.openchamber.worktrees.list.detachedHead`)}),(0,X.jsx)(`span`,{className:`typography-micro flex-shrink-0 self-center rounded bg-sidebar-accent/40 px-1.5 py-[1px] leading-none text-muted-foreground/60`,children:`OpenCode`})]}),(0,X.jsx)(`p`,{className:`typography-micro truncate text-muted-foreground/60`,children:fe(e.path,l)})]}),(0,X.jsx)(`button`,{type:`button`,onClick:()=>F(e),className:G(`flex h-7 w-7 shrink-0 items-center justify-center rounded text-muted-foreground/50 transition-opacity hover:bg-destructive/10 hover:text-destructive focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50`,i?`opacity-100`:`opacity-0 group-hover:opacity-100`),"aria-label":t(`settings.openchamber.worktrees.list.deleteWorktreeAria`,{name:e.branch||e.label||e.path}),children:(0,X.jsx)(K,{name:`delete-bin`,className:`h-4 w-4`})})]},e.path))})})]}):(0,X.jsx)(Wn,{title:t(`settings.projects.page.section.worktree`),settingsItem:`projects.worktree`,children:(0,X.jsx)(`p`,{className:`typography-meta text-muted-foreground`,children:t(`settings.openchamber.worktrees.state.selectProject`)})})},qn=(e,t)=>t.updatedAtMs-e.updatedAtMs,Jn=w((e,t)=>({instances:[],statusesById:{},importCandidates:[],isLoading:!1,isSaving:!1,isImportsLoading:!1,initialized:!1,listenerReady:!1,error:null,load:async()=>{if(!t().isLoading){e({isLoading:!0,error:null});try{let[n,r]=await Promise.all([Ve(),ze()]),i={};for(let e of r.sort(qn))i[e.id]=e;t().listenerReady||await Re(t=>{e(e=>({statusesById:{...e.statusesById,[t.id]:t}}))}),e({instances:n.instances,statusesById:i,isLoading:!1,initialized:!0,listenerReady:!0})}catch(t){e({isLoading:!1,error:t instanceof Error?t.message:String(t)})}}},loadImports:async()=>{if(!t().isImportsLoading){e({isImportsLoading:!0,error:null});try{e({importCandidates:await Be(),isImportsLoading:!1})}catch(t){e({isImportsLoading:!1,error:t instanceof Error?t.message:String(t)})}}},refreshStatuses:async()=>{try{let t=await ze(),n={};for(let e of t.sort(qn))n[e.id]=e;e({statusesById:n})}catch(t){e({error:t instanceof Error?t.message:String(t)})}},setInstances:async n=>{e({isSaving:!0,error:null});try{await He({instances:n}),e({instances:n,isSaving:!1}),await t().refreshStatuses()}catch(t){throw e({isSaving:!1,error:t instanceof Error?t.message:String(t)}),t}},upsertInstance:async e=>{let n=t().instances,r=n.some(t=>t.id===e.id)?n.map(t=>t.id===e.id?e:t):[e,...n];await t().setInstances(r)},createFromCommand:async(e,n,r)=>{let i=Ke(e,n);r&&r.trim()&&(i.nickname=r.trim()),await t().upsertInstance(i)},removeInstance:async n=>{await Ge(n).catch(()=>void 0);let r=t().instances.filter(e=>e.id!==n);await t().setInstances(r),e(e=>{let t={...e.statusesById};return delete t[n],{statusesById:t}})},connect:async n=>{e({error:null});try{await Le(n),await t().refreshStatuses()}catch(t){throw e({error:t instanceof Error?t.message:String(t)}),t}},disconnect:async n=>{e({error:null});try{await Ge(n),await t().refreshStatuses()}catch(t){throw e({error:t instanceof Error?t.message:String(t)}),t}},retry:async e=>{await t().connect(e)},getStatus:e=>t().statusesById[e]||null,clearError:()=>e({error:null})})),Yn=450,Xn=()=>h(),Zn=()=>({id:Xn(),name:``,command:``,icon:`play`}),Qn=({projectRef:e})=>{let{t}=R(),n=Q.useMemo(()=>l(),[]),r=Jn(e=>e.instances),i=Jn(e=>e.load),[a,o]=Q.useState([]),[s,c]=Q.useState(!1),[u,d]=Q.useState(null),[f,p]=Q.useState({}),m=Q.useRef(!1),h=Q.useRef(null);Q.useEffect(()=>{n&&i().catch(()=>void 0)},[n,i]),Q.useEffect(()=>{let t=!1;return c(!0),(async()=>{try{let n=await V(e);if(t)return;o(n.actions),d(JSON.stringify({actions:n.actions}))}catch{if(t)return;o([]),d(JSON.stringify({actions:[]}))}finally{t||c(!1)}})(),()=>{t=!0}},[e]);let g=Q.useMemo(()=>n?dt(r):[],[r,n]),_=Q.useMemo(()=>a.some(e=>e.name.trim().length===0||e.command.trim().length===0)?t(`settings.projects.actions.validation.fillNameAndCommand`):null,[a,t]),v=Q.useMemo(()=>u!==null&&u!==JSON.stringify({actions:a}),[a,u]),y=Q.useCallback(async n=>await ce(e,{actions:n,primaryActionId:null})?(d(JSON.stringify({actions:n})),typeof window<`u`&&window.dispatchEvent(new CustomEvent(mt,{detail:{projectId:e.id}})),!0):(W.error(t(`settings.projects.actions.toast.saveFailed`)),!1),[e,t]);Q.useEffect(()=>{if(!v||s||_||m.current)return;let e=window.setTimeout(()=>{m.current||(m.current=!0,(async()=>{try{await y(a)}finally{m.current=!1}})())},Yn);return()=>{window.clearTimeout(e)}},[a,v,s,y,_]),Q.useEffect(()=>{if(!v||!_||s){_||(h.current=null);return}let e=window.setTimeout(()=>{h.current!==_&&(h.current=_,W.error(_))},1e3);return()=>{window.clearTimeout(e)}},[v,s,_]);let b=Q.useCallback(()=>{let e=Zn();o(t=>[...t,e]),p(t=>({...t,[e.id]:!0}))},[]),x=Q.useCallback(e=>{o(t=>t.filter(t=>t.id!==e)),p(t=>{let n={...t};return delete n[e],n})},[]),S=Q.useCallback((e,t)=>{o(n=>n.map(n=>n.id===e?t(n):n))},[]);return(0,X.jsxs)(Wn,{title:t(`settings.projects.actions.title`),description:t(`settings.projects.actions.description`),settingsItem:`projects.actions`,headerAction:(0,X.jsxs)(q,{type:`button`,variant:`outline`,size:`xs`,className:`!font-normal`,onClick:b,children:[(0,X.jsx)(K,{name:`add`,className:`h-3.5 w-3.5`}),t(`settings.projects.actions.actions.add`)]}),contentClassName:`space-y-0`,children:[s?(0,X.jsx)(`p`,{className:`typography-meta text-muted-foreground`,children:t(`settings.projects.actions.state.loading`)}):a.length===0?(0,X.jsx)(`p`,{className:`typography-meta text-muted-foreground`,children:t(`settings.projects.actions.state.empty`)}):(0,X.jsx)(`div`,{className:G(`space-y-0`,Un),children:a.map(e=>{let r=e.icon||`play`,i=pt[r]||`play`,a=f[e.id]??!1,o=e.name.trim()||t(`settings.projects.actions.state.untitled`);return(0,X.jsxs)(ut,{open:a,onOpenChange:t=>{p(n=>({...n,[e.id]:t}))},className:`py-1.5`,children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,X.jsxs)(lt,{className:`group flex-1 justify-start gap-2 rounded-md px-0 pr-1 py-1 hover:bg-[var(--interactive-hover)] focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)]`,children:[a?(0,X.jsx)(K,{name:`arrow-down-s`,className:`h-4 w-4 text-muted-foreground`}):(0,X.jsx)(K,{name:`arrow-right-s`,className:`h-4 w-4 text-muted-foreground`}),(0,X.jsx)(K,{name:i,className:`mt-0.5 h-4 w-4 shrink-0 text-muted-foreground`}),(0,X.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,X.jsx)(`span`,{className:`typography-ui-label text-foreground truncate`,children:o})})]}),(0,X.jsx)(q,{type:`button`,variant:`ghost`,size:`xs`,className:`!font-normal h-7 w-7 px-0 text-muted-foreground hover:text-[var(--status-error)]`,onClick:()=>x(e.id),children:(0,X.jsx)(K,{name:`delete-bin`,className:`h-3.5 w-3.5`})})]}),(0,X.jsx)(ct,{className:`pt-1.5`,children:(0,X.jsxs)(`div`,{className:`space-y-2 pb-4 pl-3 pr-1`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 py-1`,children:[(0,X.jsxs)(Ze,{children:[(0,X.jsx)(rt,{asChild:!0,children:(0,X.jsx)(`button`,{type:`button`,className:`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-[var(--interactive-border)] text-foreground hover:bg-[var(--interactive-hover)]`,"aria-label":t(`settings.projects.actions.field.selectIconAria`),children:(0,X.jsx)(K,{name:i,className:`h-4 w-4`})})}),(0,X.jsx)(nt,{align:`start`,className:`w-56 p-2`,children:(0,X.jsx)(`div`,{className:`grid grid-cols-6 gap-1`,children:ft.map(n=>{let r=n.Icon,i=(e.icon||`play`)===n.key;return(0,X.jsx)(`button`,{type:`button`,onClick:()=>S(e.id,e=>({...e,icon:n.key})),className:G(`inline-flex h-8 w-8 items-center justify-center rounded-md border border-transparent text-foreground hover:bg-[var(--interactive-hover)]`,i&&`border-[var(--primary-base)] bg-[var(--primary-base)]/10 text-[var(--primary-base)]`),"aria-label":t(`settings.projects.actions.field.iconAria`,{icon:n.label}),children:(0,X.jsx)(K,{name:r,className:`h-4 w-4`})},n.key)})})})]}),(0,X.jsx)(Ne,{value:e.name,onChange:t=>S(e.id,e=>({...e,name:t.target.value})),placeholder:t(`settings.projects.actions.field.actionNamePlaceholder`),className:`h-7 flex-1 min-w-0`})]}),(0,X.jsxs)(`div`,{className:`py-1`,children:[(0,X.jsx)(`p`,{className:`typography-meta mb-0.5 text-muted-foreground`,children:t(`settings.projects.actions.field.command`)}),(0,X.jsx)(Oe,{embedded:!0,value:e.command,onChange:t=>S(e.id,e=>({...e,command:t.target.value})),placeholder:t(`settings.projects.actions.field.commandPlaceholder`),className:`min-h-[88px] w-full font-mono text-xs`})]}),(0,X.jsxs)(`div`,{className:`py-1`,children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,X.jsx)(`span`,{className:`typography-ui-label text-foreground`,children:t(`settings.projects.actions.field.autoOpenUrl`)}),(0,X.jsxs)(`div`,{className:`group flex cursor-pointer items-center gap-2`,role:`button`,tabIndex:0,"aria-pressed":e.autoOpenUrl===!0,onClick:()=>S(e.id,e=>({...e,...e.autoOpenUrl===!0?{autoOpenUrl:void 0}:{autoOpenUrl:!0}})),onKeyDown:t=>{(t.key===` `||t.key===`Enter`)&&(t.preventDefault(),S(e.id,e=>({...e,...e.autoOpenUrl===!0?{autoOpenUrl:void 0}:{autoOpenUrl:!0}})))},children:[(0,X.jsx)(J,{checked:e.autoOpenUrl===!0,onChange:t=>S(e.id,e=>({...e,...t?{autoOpenUrl:!0}:{autoOpenUrl:void 0}})),ariaLabel:t(`settings.projects.actions.field.autoOpenUrlForAria`,{title:o})}),(0,X.jsx)(`span`,{className:`typography-ui-label font-normal text-foreground/80`,children:t(`settings.projects.actions.field.autoOpenUrlDescription`)})]})]}),e.autoOpenUrl===!0?(0,X.jsxs)(`div`,{className:`mt-1`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(Ne,{value:e.openUrl||``,onChange:t=>S(e.id,e=>({...e,openUrl:t.target.value})),placeholder:t(`settings.projects.actions.field.overrideUrlPlaceholder`),className:`h-7 w-full max-w-[24rem]`}),(0,X.jsxs)(Ie,{children:[(0,X.jsx)(Pe,{asChild:!0,children:(0,X.jsx)(K,{name:`information`,className:`h-3.5 w-3.5 shrink-0 text-muted-foreground/60 cursor-help`})}),(0,X.jsx)(Fe,{sideOffset:8,className:`max-w-xs`,children:t(`settings.projects.actions.field.overrideUrlTooltip`)})]})]}),n?(0,X.jsxs)(`div`,{className:`mt-2`,children:[(0,X.jsx)(`p`,{className:`typography-meta mb-0.5 text-muted-foreground`,children:t(`settings.projects.actions.field.desktopSshForward`)}),g.length>0?(0,X.jsxs)(Te,{value:e.desktopOpenSshForward&&g.some(t=>t.id===e.desktopOpenSshForward)?e.desktopOpenSshForward:`__none__`,onValueChange:t=>{S(e.id,e=>({...e,...t===`__none__`?{desktopOpenSshForward:void 0}:{desktopOpenSshForward:t}}))},children:[(0,X.jsx)(Me,{className:`h-7 w-full`,children:(0,X.jsx)(Se,{placeholder:t(`settings.projects.actions.field.useOutputManualUrl`)})}),(0,X.jsxs)(we,{children:[(0,X.jsx)(je,{value:`__none__`,children:t(`settings.projects.actions.field.useOutputManualUrl`)}),g.map(e=>(0,X.jsx)(je,{value:e.id,children:e.label},e.id))]})]}):(0,X.jsx)(`p`,{className:`typography-meta text-muted-foreground`,children:t(`settings.projects.actions.state.noDesktopSshForwards`)})]}):null]}):null]})]})})]},e.id)})}),_&&a.length>0?(0,X.jsx)(`p`,{className:`typography-meta text-[var(--status-warning)]`,children:_}):null]})},$n=e=>{let t=(0,Y.c)(123),{form:n}=e,{t:r}=R(),{currentTheme:i}=Xe(),{name:a,setName:o,icon:s,setIcon:c,color:l,setColor:u,iconBackground:d,setIconBackground:f,parsedDefaultModel:p,handleDefaultModelChange:m,isUploadingIcon:h,isRemovingCustomIcon:g,isDiscoveringIcon:_,pendingRemoveImageIcon:v,setPendingRemoveImageIcon:y,pendingUploadIconPreviewUrl:b,setPreviewImageFailed:x,hasPendingUploadImageIcon:S,hasCustomIcon:C,effectiveHasImageIcon:w,hasRemovableImageIcon:T,showImagePreview:E,fileInputRef:D,handleUploadIcon:O,handleRemoveImageIcon:k,handleDiscoverIcon:A,currentIconImage:j,project:M}=n;if(!M)return null;let N=l?De[l]??null:null,P;t[0]===r?P=t[1]:(P=r(`settings.projects.page.field.projectName`),t[0]=r,t[1]=P);let F;t[2]===o?F=t[3]:(F=e=>o(e.target.value),t[2]=o,t[3]=F);let I;t[4]===r?I=t[5]:(I=r(`settings.projects.page.field.projectNamePlaceholder`),t[4]=r,t[5]=I);let L;t[6]!==a||t[7]!==F||t[8]!==I?(L=(0,X.jsx)(Ne,{value:a,onChange:F,placeholder:I}),t[6]=a,t[7]=F,t[8]=I,t[9]=L):L=t[9];let z;t[10]!==P||t[11]!==L?(z=(0,X.jsx)(kn,{label:P,itemId:`projects.name`,children:L}),t[10]=P,t[11]=L,t[12]=z):z=t[12];let B;t[13]===r?B=t[14]:(B=r(`settings.projects.page.field.defaultModel`),t[13]=r,t[14]=B);let ee;t[15]===r?ee=t[16]:(ee=r(`settings.projects.page.field.defaultModelDescription`),t[15]=r,t[16]=ee);let te;t[17]!==m||t[18]!==p.modelId||t[19]!==p.providerId?(te=(0,X.jsx)(et,{providerId:p.providerId,modelId:p.modelId,onChange:m,className:`oc-settings-inline-value`}),t[17]=m,t[18]=p.modelId,t[19]=p.providerId,t[20]=te):te=t[20];let V;t[21]!==B||t[22]!==ee||t[23]!==te?(V=(0,X.jsx)(kn,{label:B,description:ee,descriptionPlacement:`outside`,itemId:`projects.default-model`,children:te}),t[21]=B,t[22]=ee,t[23]=te,t[24]=V):V=t[24];let H;t[25]===r?H=t[26]:(H=r(`settings.projects.page.field.accentColor`),t[25]=r,t[26]=H);let ne;t[27]===u?ne=t[28]:(ne=()=>u(null),t[27]=u,t[28]=ne);let re=l===null?`border-2 border-foreground bg-[var(--primary-base)]/10`:`border-border/40 hover:border-border hover:bg-[var(--surface-muted)]`,ie;t[29]===re?ie=t[30]:(ie=G(`h-7 w-7 rounded-md border transition-colors flex items-center justify-center`,re),t[29]=re,t[30]=ie);let U;t[31]===r?U=t[32]:(U=r(`settings.projects.page.field.none`),t[31]=r,t[32]=U);let ae;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,X.jsx)(K,{name:`close`,className:`h-4 w-4 text-muted-foreground`}),t[33]=ae):ae=t[33];let oe;t[34]!==ne||t[35]!==ie||t[36]!==U?(oe=(0,X.jsx)(`button`,{type:`button`,onClick:ne,className:ie,title:U,children:ae}),t[34]=ne,t[35]=ie,t[36]=U,t[37]=oe):oe=t[37];let W;t[38]!==l||t[39]!==u?(W=Ae.map(e=>(0,X.jsx)(`button`,{type:`button`,onClick:()=>u(e.key),className:G(`h-7 w-7 rounded-md border transition-colors`,l===e.key?`border-2 border-foreground ring-1 ring-[var(--primary-base)]/40`:`border-transparent hover:border-border/70`),style:{backgroundColor:e.cssVar},title:e.label},e.key)),t[38]=l,t[39]=u,t[40]=W):W=t[40];let se;t[41]!==oe||t[42]!==W?(se=(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[oe,W]}),t[41]=oe,t[42]=W,t[43]=se):se=t[43];let ce;t[44]!==H||t[45]!==se?(ce=(0,X.jsx)(kn,{label:H,itemId:`projects.accent-color`,children:se}),t[44]=H,t[45]=se,t[46]=ce):ce=t[46];let le;t[47]===r?le=t[48]:(le=r(`settings.projects.page.field.projectIcon`),t[47]=r,t[48]=le);let ue;t[49]===O?ue=t[50]:(ue=e=>{let t=e.target.files?.[0]??null;O(t),e.currentTarget.value=``},t[49]=O,t[50]=ue);let de;t[51]!==D||t[52]!==ue?(de=(0,X.jsx)(`input`,{ref:D,type:`file`,accept:`image/png,image/jpeg,image/svg+xml,.png,.jpg,.jpeg,.svg`,className:`hidden`,onChange:ue}),t[51]=D,t[52]=ue,t[53]=de):de=t[53];let fe;t[54]===c?fe=t[55]:(fe=()=>c(null),t[54]=c,t[55]=fe);let pe=s===null?`border-2 border-foreground bg-[var(--primary-base)]/10`:`border-border/40 hover:border-border hover:bg-[var(--surface-muted)]`,me;t[56]===pe?me=t[57]:(me=G(`h-7 w-7 rounded-md border transition-colors flex items-center justify-center`,pe),t[56]=pe,t[57]=me);let he;t[58]===r?he=t[59]:(he=r(`settings.projects.page.field.none`),t[58]=r,t[59]=he);let ge;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,X.jsx)(K,{name:`close`,className:`h-4 w-4 text-muted-foreground`}),t[60]=ge):ge=t[60];let _e;t[61]!==fe||t[62]!==me||t[63]!==he?(_e=(0,X.jsx)(`button`,{type:`button`,onClick:fe,className:me,title:he,children:ge}),t[61]=fe,t[62]=me,t[63]=he,t[64]=_e):_e=t[64];let ve;t[65]!==N||t[66]!==s||t[67]!==c?(ve=ke.map(e=>{let t=e.Icon;return(0,X.jsx)(`button`,{type:`button`,onClick:()=>c(e.key),className:G(`h-7 w-7 rounded-md border transition-colors flex items-center justify-center`,s===e.key?`border-2 border-foreground bg-[var(--primary-base)]/10`:`border-transparent hover:border-border hover:bg-[var(--surface-muted)]`),title:e.label,children:(0,X.jsx)(K,{name:t,className:`w-4 h-4`,style:N&&s===e.key?{color:N}:void 0})},e.key)}),t[65]=N,t[66]=s,t[67]=c,t[68]=ve):ve=t[68];let ye;t[69]!==_e||t[70]!==ve?(ye=(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[_e,ve]}),t[69]=_e,t[70]=ve,t[71]=ye):ye=t[71];let be;t[72]!==j||t[73]!==i||t[74]!==w||t[75]!==S||t[76]!==d||t[77]!==b||t[78]!==M||t[79]!==x||t[80]!==E||t[81]!==r?(be=w&&E&&(0,X.jsxs)(`div`,{className:`flex items-center gap-2 pt-1`,children:[(0,X.jsx)(`span`,{className:`typography-meta text-muted-foreground`,children:r(`settings.projects.page.field.preview`)}),(0,X.jsx)(`span`,{className:`inline-flex h-7 w-7 items-center justify-center rounded-md border border-border/60 bg-[var(--surface-elevated)] p-1`,children:(0,X.jsx)(`span`,{className:`inline-flex h-4 w-4 items-center justify-center overflow-hidden rounded-[2px]`,style:d?{backgroundColor:d}:void 0,children:S&&b?(0,X.jsx)(`img`,{src:b,alt:``,className:`h-full w-full object-contain`,draggable:!1,onError:()=>x(!0)}):(0,X.jsx)(Ce,{project:{...M,iconImage:j??M.iconImage},options:{themeVariant:i.metadata.variant,iconColor:i.colors.surface.foreground},className:`h-full w-full object-contain`,onError:()=>x(!0)})})})]}),t[72]=j,t[73]=i,t[74]=w,t[75]=S,t[76]=d,t[77]=b,t[78]=M,t[79]=x,t[80]=E,t[81]=r,t[82]=be):be=t[82];let xe;t[83]!==w||t[84]!==d||t[85]!==f||t[86]!==r?(xe=w&&(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[(0,X.jsx)(`input`,{type:`color`,value:d??`#000000`,onChange:e=>f(e.target.value),className:`h-7 w-9 cursor-pointer rounded border border-border bg-transparent p-1`,"aria-label":r(`settings.projects.page.field.projectIconBackgroundAria`)}),(0,X.jsx)(Ne,{value:d??``,onChange:e=>f(e.target.value),placeholder:`#000000`,className:`h-7 w-[8rem]`}),(0,X.jsx)(q,{type:`button`,size:`xs`,variant:`outline`,onClick:()=>f(null),className:`h-7 w-7 p-0`,"aria-label":r(`settings.projects.page.field.clearIconBackgroundAria`),title:r(`settings.projects.page.field.clearBackground`),disabled:!d,children:(0,X.jsx)(K,{name:`close`,className:`h-3.5 w-3.5`})})]}),t[83]=w,t[84]=d,t[85]=f,t[86]=r,t[87]=xe):xe=t[87];let Se;t[88]!==D||t[89]!==A||t[90]!==C||t[91]!==_||t[92]!==h||t[93]!==r?(Se=!C&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(q,{size:`xs`,className:`h-6 !font-normal`,onClick:()=>D.current?.click(),disabled:h,children:r(h?`settings.projects.page.actions.uploading`:`settings.projects.page.actions.uploadIcon`)}),(0,X.jsx)(q,{size:`xs`,className:`h-6 !font-normal`,variant:`outline`,onClick:()=>void A(),disabled:_,children:r(_?`settings.projects.page.actions.discovering`:`settings.projects.page.actions.discoverFavicon`)})]}),t[88]=D,t[89]=A,t[90]=C,t[91]=_,t[92]=h,t[93]=r,t[94]=Se):Se=t[94];let J;t[95]!==k||t[96]!==T||t[97]!==g||t[98]!==r?(J=T&&(0,X.jsx)(q,{size:`xs`,className:`!font-normal`,variant:`outline`,onClick:()=>void k(),disabled:g,children:r(g?`settings.projects.page.actions.removing`:`settings.projects.page.actions.removeProjectIcon`)}),t[95]=k,t[96]=T,t[97]=g,t[98]=r,t[99]=J):J=t[99];let we;t[100]!==g||t[101]!==v||t[102]!==y||t[103]!==r?(we=v&&(0,X.jsx)(q,{size:`xs`,className:`!font-normal`,variant:`outline`,onClick:()=>y(!1),disabled:g,children:r(`settings.projects.page.actions.undoRemove`)}),t[100]=g,t[101]=v,t[102]=y,t[103]=r,t[104]=we):we=t[104];let Te;t[105]!==Se||t[106]!==J||t[107]!==we?(Te=(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[Se,J,we]}),t[105]=Se,t[106]=J,t[107]=we,t[108]=Te):Te=t[108];let Ee;t[109]!==de||t[110]!==ye||t[111]!==be||t[112]!==xe||t[113]!==Te?(Ee=(0,X.jsxs)(`div`,{className:`flex w-full flex-col items-end gap-2`,children:[de,ye,be,xe,Te]}),t[109]=de,t[110]=ye,t[111]=be,t[112]=xe,t[113]=Te,t[114]=Ee):Ee=t[114];let Oe;t[115]!==le||t[116]!==Ee?(Oe=(0,X.jsx)(kn,{label:le,itemId:`projects.icon`,children:Ee}),t[115]=le,t[116]=Ee,t[117]=Oe):Oe=t[117];let je;return t[118]!==ce||t[119]!==Oe||t[120]!==z||t[121]!==V?(je=(0,X.jsxs)(`div`,{className:`oc-settings-section-stack`,children:[z,V,ce,Oe]}),t[118]=ce,t[119]=Oe,t[120]=z,t[121]=V,t[122]=je):je=t[122],je},er=/^#(?:[\da-fA-F]{3}|[\da-fA-F]{6})$/,tr=e=>{if(!e)return null;let t=e.trim();return t&&er.test(t)?t.toLowerCase():null},nr=e=>{let{t}=R(),n=U(e=>e.uploadProjectIcon),r=U(e=>e.removeProjectIcon),i=U(e=>e.discoverProjectIcon),a=U(t=>e?t.projects.find(t=>t.id===e.id)?.iconImage??null:null),[o,s]=Q.useState(``),[c,l]=Q.useState(null),[u,d]=Q.useState(null),[f,p]=Q.useState(null),[m,h]=Q.useState(void 0),[g,_]=Q.useState(!1),[v,y]=Q.useState(!1),[b,x]=Q.useState(!1),[S,C]=Q.useState(!1),[w,T]=Q.useState(null),[E,D]=Q.useState(null),[O,k]=Q.useState(!1),A=Q.useRef(null),j=Q.useCallback(()=>{T(null),D(e=>(e&&URL.revokeObjectURL(e),null))},[]),M=e?.id??null;Q.useEffect(()=>{if(!e){s(``),l(null),d(null),p(null),h(void 0);return}s(e.label??``),l(e.icon??null),d(e.color??null),p(e.iconBackground??null),h(e.defaultModel),C(!1),j(),k(!1)},[e,j]),Q.useEffect(()=>()=>{j()},[j]);let N=Q.useMemo(()=>te(m)??{providerId:``,modelId:``},[m]),P=!!e?.iconImage,F=!!(w&&E),I=e?.iconImage?.source===`custom`,L=P&&!S||F,z=L,B=!!(e&&P&&!S),ee=!O&&(F||B),V=!!e&&(o.trim()!==(e?.label??``).trim()||c!==(e?.icon??null)||u!==(e?.color??null)||f!==(e?.iconBackground??null)||(m??void 0)!==(e?.defaultModel??void 0)||S||!!w),H=Q.useCallback((e,t)=>{h(e&&t?`${e}/${t}`:void 0)},[]),ne=Q.useCallback(t=>{!e||!t||g||(C(!1),k(!1),T(t),D(e=>(e&&URL.revokeObjectURL(e),URL.createObjectURL(t))))},[g,e]),re=Q.useCallback(()=>{!e||!z||v||(F&&j(),C(!!P),k(!1))},[j,F,z,P,v,e]),ie=Q.useCallback(async()=>{if(!(!e||b)){j(),C(!1),k(!1),x(!0);try{let n=await i(e.id);if(!n.ok){W.error(n.error||t(`settings.projects.page.toast.discoverIconFailed`));return}if(n.skipped){W.success(t(`settings.projects.page.toast.customIconAlreadySet`));return}W.success(t(`settings.projects.page.toast.iconDiscovered`))}finally{x(!1)}}},[j,i,b,e,t]),ae=Q.useCallback(async i=>{let a=i?.silent===!0;if(!e)return null;let s=o.trim();if(!s)return null;if(w){_(!0);let r=await n(e.id,w);if(_(!1),!r.ok)return W.error(r.error||t(`settings.projects.page.toast.uploadIconFailed`)),null;a||W.success(t(`settings.projects.page.toast.iconUpdated`)),j(),C(!1)}let l=S&&!!e.iconImage;if(l){y(!0);let n=await r(e.id);if(y(!1),!n.ok)return W.error(n.error||t(`settings.projects.page.toast.removeIconFailed`)),null;a||W.success(t(`settings.projects.page.toast.iconRemoved`)),C(!1),p(null)}return{label:s,icon:c,color:u,iconBackground:tr(l?null:f),defaultModel:m??null}},[j,u,m,c,f,o,S,w,e,r,t,n]);return Q.useEffect(()=>{k(!1)},[M,a?.updatedAt]),{name:o,setName:s,icon:c,setIcon:l,color:u,setColor:d,iconBackground:f,setIconBackground:p,defaultModel:m,parsedDefaultModel:N,handleDefaultModelChange:H,isUploadingIcon:g,isRemovingCustomIcon:v,isDiscoveringIcon:b,pendingRemoveImageIcon:S,setPendingRemoveImageIcon:C,pendingUploadIconFile:w,pendingUploadIconPreviewUrl:E,previewImageFailed:O,setPreviewImageFailed:k,hasStoredImageIcon:P,hasPendingUploadImageIcon:F,hasCustomIcon:I,effectiveHasImageIcon:L,hasRemovableImageIcon:z,showStoredImagePreview:B,showImagePreview:ee,fileInputRef:A,clearPendingUploadIcon:j,handleUploadIcon:ne,handleRemoveImageIcon:re,handleDiscoverIcon:ie,hasChanges:V,prepareSaveData:ae,currentIconImage:a,project:e}},rr=450,ir=(e,t)=>{let{t:n}=R(),{hasChanges:r,name:i,icon:a,color:o,iconBackground:s,defaultModel:c,pendingRemoveImageIcon:l,pendingUploadIconFile:u,isUploadingIcon:d,isRemovingCustomIcon:f,prepareSaveData:p}=e,m=Q.useRef(!1);Q.useEffect(()=>{if(!r||!i.trim()||d||f||m.current)return;let e=window.setTimeout(()=>{m.current||(m.current=!0,(async()=>{try{let e=await p({silent:!0});if(e)try{await t(e)}catch{W.error(n(`settings.projects.page.toast.saveFailed`))}}finally{m.current=!1}})())},rr);return()=>{window.clearTimeout(e)}},[o,c,r,a,s,f,d,i,t,l,u,p,n])},ar=e=>{let t=(0,Y.c)(25),{project:n,onIdentitySave:r}=e,{t:i}=R(),a=nr(n),o;bb0:{if(!n){o=null;break bb0}let e;t[0]!==n.id||t[1]!==n.path?(e={id:n.id,path:n.path},t[0]=n.id,t[1]=n.path,t[2]=e):e=t[2],o=e}let s=o,c;if(t[3]===r?c=t[4]:(c=async e=>{await r(e)},t[3]=r,t[4]=c),ir(a,c),!n||!s)return null;let l;t[5]!==n.path||t[6]!==i?(l=n.path.split(/[\\/]/).filter(Boolean).at(-1)??i(`settings.projects.page.title.default`),t[5]=n.path,t[6]=i,t[7]=l):l=t[7];let u=l,d;t[8]===u?d=t[9]:(d=(0,X.jsx)(`h2`,{className:`typography-ui-header font-semibold text-foreground truncate`,children:u}),t[8]=u,t[9]=d);let f;t[10]===n.path?f=t[11]:(f=(0,X.jsx)(`p`,{className:`typography-meta text-muted-foreground truncate`,title:n.path,children:n.path}),t[10]=n.path,t[11]=f);let p;t[12]!==d||t[13]!==f?(p=(0,X.jsxs)(`div`,{className:`px-1`,children:[d,f]}),t[12]=d,t[13]=f,t[14]=p):p=t[14];let m;t[15]===a?m=t[16]:(m=(0,X.jsx)($n,{form:a}),t[15]=a,t[16]=m);let h,g;t[17]===s?(h=t[18],g=t[19]):(h=(0,X.jsx)(Qn,{projectRef:s}),g=(0,X.jsx)(Kn,{projectRef:s}),t[17]=s,t[18]=h,t[19]=g);let _;return t[20]!==p||t[21]!==m||t[22]!==h||t[23]!==g?(_=(0,X.jsxs)(`div`,{className:`oc-settings-section-stack`,children:[p,m,h,g]}),t[20]=p,t[21]=m,t[22]=h,t[23]=g,t[24]=_):_=t[24],_};function or(e){let t=e.indexOf(`/`);if(t!==-1){let n=e.substring(0,t);if(n===`gemini`||n===`antigravity`)return e.substring(t+1)}return e}var sr={google:[{id:`gemini-auth`,label:`Gemini`,matcher:e=>e.startsWith(`gemini/`),order:1},{id:`antigravity-auth`,label:`Antigravity`,matcher:e=>e.startsWith(`antigravity/`),order:2}]};function cr(e,t){let n=sr[t]??[];for(let t of n)if(t.matcher(e))return t;return null}function lr(e){return sr[e]??[]}function ur(e){return[...e].sort((e,t)=>e.order-t.order)}function dr(e,t){let n=new Map;for(let r of Object.keys(e)){let e=cr(r,t)?.id??null;n.has(e)||n.set(e,[]),n.get(e).push(r)}return n}function fr(e,t,n){let r=new Map;for(let i of e){let e=cr(t(i),n)?.id??null;r.has(e)||r.set(e,[]),r.get(e).push(i)}return r}function pr(e,t){return t.filter(e=>{let t=e.toLowerCase(),n=t.includes(`/`)?t.split(`/`)[1]:t;return!!(n.startsWith(`gemini-3-`)||n.startsWith(`claude-`))})}var mr=6e4,hr=0,gr=0,_r=new Map,vr=e=>{let t=ht.map(e=>e.id),n=typeof e?.usageAutoRefresh==`boolean`&&e.usageAutoRefresh,r=typeof e?.usageRefreshIntervalMs==`number`&&Number.isFinite(e.usageRefreshIntervalMs)?Math.max(3e4,Math.min(3e5,Math.round(e.usageRefreshIntervalMs))):mr,i=e?.usageDisplayMode===`remaining`?`remaining`:`usage`,a=typeof e?.usageShowPredValues==`boolean`&&e.usageShowPredValues,o=Array.isArray(e?.usageDropdownProviders)?e?.usageDropdownProviders:null,s=o?o.filter(e=>typeof e==`string`&&t.includes(e)):t,c={},l=e?.usageSelectedModels;if(l&&typeof l==`object`)for(let[e,t]of Object.entries(l))Array.isArray(t)&&(c[e]=t.filter(e=>typeof e==`string`));let u={},d=e?.usageExpandedFamilies;if(d&&typeof d==`object`)for(let[e,t]of Object.entries(d))Array.isArray(t)&&(u[e]=t.filter(e=>typeof e==`string`));return{autoRefresh:n,refreshIntervalMs:r,displayMode:i,showPredValues:a,dropdownProviderIds:s,selectedModels:c,expandedFamilies:u}},yr=async()=>{let e=C()?.settings;if(e)try{let t=(await e.load())?.settings;return vr(t??null)}catch{}if(!o()){let e=await g(`/api/config/settings`,{method:`GET`,headers:{Accept:`application/json`}});if(e.ok)return vr(await e.json().catch(()=>null))}return{autoRefresh:!1,refreshIntervalMs:mr,displayMode:`usage`,showPredValues:!1,dropdownProviderIds:ht.map(e=>e.id),selectedModels:{},expandedFamilies:{}}},br=async(e,t)=>{let n=gr;_r.set(e,(_r.get(e)??0)+1),t(t=>({isFetchingProvider:{...t.isFetchingProvider,[e]:!0}}));try{let r=await S.fetchQuery({queryKey:f.quota(e),queryFn:({signal:t})=>b(e,t),staleTime:0,retry:!1});return n===gr?(t(t=>{let n=t.results.filter(t=>t.providerId!==e);return n.push(r),{results:n}}),{providerId:e,result:r}):{providerId:e,stale:!0}}catch(t){return n===gr?{providerId:e,error:t instanceof Error?t.message:`Failed to fetch quota`}:{providerId:e,stale:!0}}finally{if(n===gr){let n=(_r.get(e)??1)-1;n>0?_r.set(e,n):_r.delete(e),t(t=>({isFetchingProvider:{...t.isFetchingProvider,[e]:n>0}}))}}},xr=()=>{gr+=1,hr+=1,_r.clear(),Sr.setState({results:[],isLoading:!1,isFetchingProvider:{},lastUpdated:null,error:null})},Sr=w()(E((e,t)=>({results:[],selectedProviderId:null,isLoading:!1,isFetchingProvider:{},lastUpdated:null,error:null,autoRefresh:!1,refreshIntervalMs:mr,displayMode:`usage`,showPredValues:!1,dropdownProviderIds:ht.map(e=>e.id),selectedModels:{},expandedFamilies:{},loadSettings:async()=>{try{e(await yr())}catch(e){console.warn(`Failed to load usage settings:`,e)}},fetchAllQuotas:async()=>{let t=++hr;e({isLoading:!0,error:null});let n=ht.map(e=>e.id),r=await Promise.all(n.map(t=>br(t,e)));if(t===hr){let t=r.find(e=>`error`in e);e({isLoading:!1,...r.some(e=>`result`in e)?{lastUpdated:Date.now()}:{},error:t?.error??null})}},fetchProviderQuota:async t=>{let n=await br(t,e);`stale`in n||e({error:`error`in n?n.error:null})},setSelectedProvider:t=>e({selectedProviderId:t}),setAutoRefresh:t=>e({autoRefresh:t}),setRefreshInterval:t=>{e({refreshIntervalMs:Math.max(3e4,Math.min(3e5,Math.round(t)))})},setDisplayMode:t=>e({displayMode:t}),setShowPredValues:t=>e({showPredValues:t}),setDropdownProviderIds:t=>e({dropdownProviderIds:t}),setSelectedModels:(t,n)=>{e(e=>({selectedModels:{...e.selectedModels,[t]:n}}))},toggleModelSelected:(t,n)=>{e(e=>{let r=e.selectedModels[t]??[],i=r.includes(n)?r.filter(e=>e!==n):[...r,n];return{selectedModels:{...e.selectedModels,[t]:i}}})},setExpandedFamilies:(n,r)=>{e(e=>({expandedFamilies:{...e.expandedFamilies,[n]:r}})),y({usageExpandedFamilies:t().expandedFamilies})},toggleFamilyExpanded:(n,r)=>{e(e=>{let t=e.expandedFamilies[n]??[],i=t.includes(r)?t.filter(e=>e!==r):[...t,r];return{expandedFamilies:{...e.expandedFamilies,[n]:i}}}),y({usageExpandedFamilies:t().expandedFamilies})},applyDefaultSelections:(n,r)=>{if((t().selectedModels[n]?.length??0)>0)return;let i=pr(n,r);i.length!==0&&(e(e=>({selectedModels:{...e.selectedModels,[n]:i}})),y({usageSelectedModels:t().selectedModels}))}}),{name:`quota-store`})),Cr=()=>{let e=(0,Y.c)(5),t=Sr(wr),n=Sr(Tr),r=Sr(Er),i,a;e[0]!==t||e[1]!==r||e[2]!==n?(i=()=>{if(!t)return;let e=window.setInterval(()=>{r()},n);return()=>window.clearInterval(e)},a=[t,n,r],e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a):(i=e[3],a=e[4]),Q.useEffect(i,a)};function wr(e){return e.autoRefresh}function Tr(e){return e.refreshIntervalMs}function Er(e){return e.fetchAllQuotas}var Dr=e=>{let t=(0,Y.c)(20),{percent:n,tonePercent:r,className:i,expectedMarkerPercent:a}=e,o;t[0]===n?o=t[1]:(o=Je(n)??0,t[0]=n,t[1]=o);let s=o,c=r??n,l;t[2]===c?l=t[3]:(l=We(c),t[2]=c,t[3]=l);let u=l,d=a==null?null:Math.max(0,Math.min(100,a)),f;t[4]===u?f=t[5]:(f=u===`critical`?{backgroundColor:`var(--status-error)`}:u===`warn`?{backgroundColor:`var(--status-warning)`}:{backgroundColor:`var(--status-success)`},t[4]=u,t[5]=f);let p=f,m;t[6]===i?m=t[7]:(m=G(`relative h-2.5 rounded-full bg-[var(--interactive-border)] overflow-hidden`,i),t[6]=i,t[7]=m);let h=`${s}%`,g;t[8]!==p||t[9]!==h?(g={...p,width:h},t[8]=p,t[9]=h,t[10]=g):g=t[10];let _;t[11]!==s||t[12]!==g?(_=(0,X.jsx)(`div`,{className:`h-full transition-all duration-300`,style:g,role:`progressbar`,"aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100}),t[11]=s,t[12]=g,t[13]=_):_=t[13];let v;t[14]===d?v=t[15]:(v=d!=null&&d>0&&d<100&&(0,X.jsx)(`div`,{className:`absolute top-0 h-full w-0.5 bg-foreground`,style:{left:`${d}%`},title:`Expected usage if spread evenly: ${Math.round(d)}% of quota`,"aria-hidden":`true`}),t[14]=d,t[15]=v);let y;return t[16]!==m||t[17]!==_||t[18]!==v?(y=(0,X.jsxs)(`div`,{className:m,children:[_,v]}),t[16]=m,t[17]=_,t[18]=v,t[19]=y):y=t[19],y},Or=e=>{let t=(0,Y.c)(67),{paceInfo:n,className:r,compact:i}=e,a=i!==void 0&&i,{t:o}=R(),s;t[0]===n.status?s=t[1]:(s=Ue(n.status),t[0]=n.status,t[1]=s);let c=s,l;bb0:{switch(n.status){case`on-track`:{let e;t[2]===o?e=t[3]:(e=o(`settings.usage.pace.status.onTrack`),t[2]=o,t[3]=e),l=e;break bb0}case`slightly-fast`:{let e;t[4]===o?e=t[5]:(e=o(`settings.usage.pace.status.slightlyFast`),t[4]=o,t[5]=e),l=e;break bb0}case`too-fast`:{let e;t[6]===o?e=t[7]:(e=o(`settings.usage.pace.status.tooFast`),t[6]=o,t[7]=e),l=e;break bb0}case`exhausted`:{let e;t[8]===o?e=t[9]:(e=o(`settings.usage.pace.status.usedUp`),t[8]=o,t[9]=e),l=e;break bb0}}l=void 0}let u=l,d;t[10]!==n.predictText||t[11]!==o?(d=o(`settings.usage.pace.predictionTooltip`,{prediction:n.predictText}),t[10]=n.predictText,t[11]=o,t[12]=d):d=t[12];let f=d;if(a){let e;t[13]===r?e=t[14]:(e=G(`flex items-center gap-1.5`,r),t[13]=r,t[14]=e);let i;t[15]===c?i=t[16]:(i={backgroundColor:c},t[15]=c,t[16]=i);let a;t[17]!==u||t[18]!==i?(a=(0,X.jsx)(`div`,{className:`h-2 w-2 rounded-full flex-shrink-0`,style:i,title:u}),t[17]=u,t[18]=i,t[19]=a):a=t[19];let s;t[20]===c?s=t[21]:(s={color:c},t[20]=c,t[21]=s);let l=n.isExhausted?void 0:f,d;t[22]!==n.isExhausted||t[23]!==n.predictText||t[24]!==n.remainingSeconds||t[25]!==o?(d=n.isExhausted?(0,X.jsx)(X.Fragment,{children:o(`settings.usage.pace.wait`,{duration:qe(n.remainingSeconds)})}):(0,X.jsx)(X.Fragment,{children:o(`settings.usage.pace.prediction`,{prediction:n.predictText})}),t[22]=n.isExhausted,t[23]=n.predictText,t[24]=n.remainingSeconds,t[25]=o,t[26]=d):d=t[26];let p;t[27]!==d||t[28]!==s||t[29]!==l?(p=(0,X.jsx)(`span`,{className:`typography-micro tabular-nums`,style:s,title:l,children:d}),t[27]=d,t[28]=s,t[29]=l,t[30]=p):p=t[30];let m;return t[31]!==p||t[32]!==e||t[33]!==a?(m=(0,X.jsxs)(`div`,{className:e,children:[a,p]}),t[31]=p,t[32]=e,t[33]=a,t[34]=m):m=t[34],m}let p;t[35]===r?p=t[36]:(p=G(`flex items-center justify-between gap-2`,r),t[35]=r,t[36]=p);let m;t[37]!==n.isExhausted||t[38]!==n.paceRateText||t[39]!==o?(m=!n.isExhausted&&(0,X.jsx)(`span`,{className:`typography-micro text-muted-foreground`,children:o(`settings.usage.pace.rate`,{rate:n.paceRateText})}),t[37]=n.isExhausted,t[38]=n.paceRateText,t[39]=o,t[40]=m):m=t[40];let h;t[41]===m?h=t[42]:(h=(0,X.jsx)(`div`,{className:`flex items-center gap-1.5`,children:m}),t[41]=m,t[42]=h);let g;t[43]===c?g=t[44]:(g={color:c},t[43]=c,t[44]=g);let _;t[45]!==n.isExhausted||t[46]!==n.predictText||t[47]!==n.remainingSeconds||t[48]!==f||t[49]!==u||t[50]!==o?(_=n.isExhausted?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`font-medium`,children:u}),(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:o(`settings.usage.pace.waitSeparator`)}),(0,X.jsx)(`span`,{className:`font-medium`,children:qe(n.remainingSeconds)})]}):(0,X.jsxs)(`span`,{title:f,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:o(`settings.usage.pace.predictionLabel`)}),(0,X.jsx)(`span`,{className:`font-medium`,children:n.predictText})]}),t[45]=n.isExhausted,t[46]=n.predictText,t[47]=n.remainingSeconds,t[48]=f,t[49]=u,t[50]=o,t[51]=_):_=t[51];let v;t[52]!==g||t[53]!==_?(v=(0,X.jsx)(`span`,{className:`typography-micro tabular-nums`,style:g,children:_}),t[52]=g,t[53]=_,t[54]=v):v=t[54];let y;t[55]===c?y=t[56]:(y={backgroundColor:c},t[55]=c,t[56]=y);let b;t[57]!==u||t[58]!==y?(b=(0,X.jsx)(`div`,{className:`h-2 w-2 rounded-full flex-shrink-0`,style:y,title:u}),t[57]=u,t[58]=y,t[59]=b):b=t[59];let x;t[60]!==v||t[61]!==b?(x=(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[v,b]}),t[60]=v,t[61]=b,t[62]=x):x=t[62];let S;return t[63]!==x||t[64]!==p||t[65]!==h?(S=(0,X.jsxs)(`div`,{className:p,children:[h,x]}),t[63]=x,t[64]=p,t[65]=h,t[66]=S):S=t[66],S},kr=e=>e instanceof Error&&e.name===`CancelledError`,Ar=w(()=>({setStatus:e=>Qe(S,e),refreshStatus:async(e,t)=>{let r=n();t?.force&&await S.cancelQueries({queryKey:f.github.auth(r),exact:!0});try{return await tt(S,e,r)}catch(e){if(kr(e))return $e(S,r);throw e}}})),jr={displayMode:`browser`,installed:!1,browserTab:!0},Mr=new Set,Nr=jr,Pr=!1,Fr,Ir=()=>{let e=Ye();return{displayMode:e,installed:e!==`browser`,browserTab:e===`browser`}},Lr=()=>(!Pr&&typeof window<`u`&&(Nr=Ir(),Pr=!0),Nr),$=()=>{let e=Ir();Pr=!0,e.displayMode!==Nr.displayMode&&(Nr=e,Mr.forEach(e=>e()))},Rr=()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=[window.matchMedia(`(display-mode: standalone)`),window.matchMedia(`(display-mode: minimal-ui)`),window.matchMedia(`(display-mode: fullscreen)`),window.matchMedia(`(display-mode: window-controls-overlay)`)];for(let t of e)typeof t.addEventListener==`function`?t.addEventListener(`change`,$):typeof t.addListener==`function`&&t.addListener($);return window.addEventListener(`appinstalled`,$),window.addEventListener(`focus`,$),()=>{for(let t of e)typeof t.removeEventListener==`function`?t.removeEventListener(`change`,$):typeof t.removeListener==`function`&&t.removeListener($);window.removeEventListener(`appinstalled`,$),window.removeEventListener(`focus`,$)}},zr=e=>(Mr.add(e),Fr??=Rr(),$(),()=>{Mr.delete(e),Mr.size===0&&(Fr?.(),Fr=void 0)}),Br=()=>Q.useSyncExternalStore(zr,Lr,Vr);function Vr(){return jr}var Hr=`OPEN CHAMBER`,Ur=w()(T(e=>({sidebarBrandName:Hr,setSidebarBrandName:t=>{let n=t.slice(0,64);e(e=>e.sidebarBrandName===n?e:{sidebarBrandName:n})}}),{name:`sidebar-brand-store`,storage:v(),version:2,migrate:(e,t)=>{if(!e||typeof e!=`object`)return e;let n=e;return t<1&&n.sidebarBrandName===`YEE CODE`&&(n.sidebarBrandName=Hr),t<2&&n.sidebarBrandName===`Open Chamber`&&(n.sidebarBrandName=Hr),n}}));typeof window<`u`&&t(e=>{r(e)&&Ur.persist.rehydrate()});var Wr=[`connection`,`personalization`,`workspace`,`opencode`,`content`,`system`],Gr=[`instances`,`appearance`,`chat`,`notifications`,`sessions`,`summary-ai`,`shortcuts`,`projects`,`git`,`remote-instances`,`providers`,`agents`,`assistants`,`behavior`,`commands`,`mcp`,`plugins`,`global-config`,`magic-prompts`,`snippets`,`skills.installed`,`skills.catalog`,`usage`,`voice`,`about`],Kr=[`instances`,`appearance`,`chat`,`notifications`,`sessions`,`summary-ai`,`projects`,`git`,`providers`,`agents`,`assistants`,`behavior`,`commands`,`mcp`,`plugins`,`magic-prompts`,`snippets`,`skills.installed`,`usage`,`voice`,`about`],qr=[{slug:`home`,title:`Settings`,group:`personalization`,kind:`single`,description:`Search and jump to common pages.`,keywords:[`search`,`settings`]},{slug:`projects`,title:`Projects`,group:`workspace`,kind:`split`,keywords:[`project`,`projects`,`worktree`,`worktrees`,`repo`,`repository`,`directory`]},{slug:`instances`,title:`Switch instance`,group:`connection`,kind:`single`,keywords:[`instance`,`instances`,`server`,`connection`,`switch`],isAvailable:e=>e.isMobile},{slug:`remote-instances`,title:`Remote Instances`,group:`workspace`,kind:`single`,keywords:[`ssh`,`remote`,`instances`,`forwarding`,`connection`],isAvailable:e=>!e.isVSCode},{slug:`providers`,title:`Providers`,group:`opencode`,kind:`split`,keywords:[`provider`,`providers`,`models`,`model`,`api key`,`api keys`,`openai`,`anthropic`,`ollama`,`credentials`]},{slug:`usage`,title:`Usage`,group:`system`,kind:`split`,keywords:[`quota`,`billing`,`tokens`,`usage`,`limits`]},{slug:`agents`,title:`Agents`,group:`opencode`,kind:`split`,keywords:[`agent`,`agents`,`prompts`,`tools`,`permissions`]},{slug:`assistants`,title:`Assistants`,group:`opencode`,kind:`split`,keywords:[`assistant`,`assistants`,`sharing`]},{slug:`behavior`,title:`Behavior`,group:`opencode`,kind:`single`,keywords:[`behavior`,`agents.md`,`system prompt`,`global rules`,`instructions`,`override`]},{slug:`commands`,title:`Commands`,group:`opencode`,kind:`split`,keywords:[`command`,`commands`,`slash`,`macros`,`automation`]},{slug:`mcp`,title:`MCP`,group:`opencode`,kind:`split`,keywords:[`mcp`,`model context protocol`,`servers`,`tools`,`remote`,`stdio`]},{slug:`plugins`,title:`Plugins`,group:`opencode`,kind:`split`,keywords:[`plugin`,`plugins`,`extensions`,`addons`,`npm`,`opencode-wakatime`]},{slug:`global-config`,title:`Global Configuration`,group:`opencode`,kind:`single`,keywords:[`global`,`configuration`,`opencode.json`,`opencode.jsonc`,`oh-my-opencode`,`oh-my-openagent`]},{slug:`skills.installed`,title:`Skills`,group:`content`,kind:`split`,keywords:[`skill`,`skills`,`instructions`,`install`,`catalog`]},{slug:`skills.catalog`,title:`Skills Catalog`,group:`content`,kind:`single`,keywords:[`install`,`catalog`,`external`,`repository`,`skills catalog`]},{slug:`git`,title:`Git`,group:`workspace`,kind:`single`,keywords:[`git`,`github`,`identity`,`identities`,`ssh`,`profiles`,`credentials`,`keys`,`commit`,`gitmoji`,`oauth`,`prs`,`issues`],isAvailable:e=>!e.isVSCode},{slug:`appearance`,title:`Appearance`,group:`personalization`,kind:`single`,keywords:[`theme`,`font`,`spacing`,`padding`,`corner radius`,`radius`,`input bar`,`keyboard`,`viewport`,`mobile`,`terminal`,`pwa`,`install name`,`app shortcuts`]},{slug:`chat`,title:`Chat`,group:`personalization`,kind:`single`,keywords:[`tools`,`diff`,`reasoning`,`dotfiles`,`draft`,`queue`,`output`,`copy`,`image`,`split messages`,`message actions`]},{slug:`shortcuts`,title:`Shortcuts`,group:`personalization`,kind:`single`,keywords:[`keyboard`,`hotkeys`,`shortcuts`,`bindings`],isAvailable:e=>!e.isVSCode},{slug:`sessions`,title:`Sessions`,group:`personalization`,kind:`single`,keywords:[`defaults`,`default agent`,`default model`,`retention`,`memory`,`limits`,`zen`]},{slug:`summary-ai`,title:`Summary AI`,group:`personalization`,kind:`single`,keywords:[`summary`,`commit`,`session title`,`prompt`,`provider`,`custom api`,`base url`,`api token`]},{slug:`magic-prompts`,title:`Magic Prompts`,group:`content`,kind:`split`,keywords:[`prompts`,`templates`,`git`,`github`,`review`,`commit`,`pull request`],isAvailable:e=>!e.isVSCode},{slug:`snippets`,title:`Snippets`,group:`content`,kind:`split`,keywords:[`prompt`,`templates`,`multi-run`,`strategy`,`approach`]},{slug:`notifications`,title:`Notifications`,group:`personalization`,kind:`single`,keywords:[`alerts`,`native`,`summary`,`summarization`]},{slug:`voice`,title:`Voice`,group:`system`,kind:`single`,keywords:[`tts`,`speech`,`voice`],isAvailable:e=>!e.isVSCode},{slug:`about`,title:`About`,group:`system`,kind:`single`,keywords:[`about`,`version`,`updates`,`release`,`changelog`],isAvailable:e=>e.isMobile}];function Jr(e){let t=new Map(Gr.map((e,t)=>[e,t])),n=new Map;for(let t of e){let e=n.get(t.group)??[];e.push(t),n.set(t.group,e)}return Wr.flatMap(e=>{let r=n.get(e);return r?.length?[{group:e,pages:r.sort((e,n)=>(t.get(e.slug)??999)-(t.get(n.slug)??999))}]:[]})}var Yr={sessions:`sessions`,agents:`agents`,commands:`commands`,mcp:`mcp`,skills:`skills.installed`,providers:`providers`,usage:`usage`,"git-identities":`git`,settings:`home`};function Xr(e){let t=e.trim().toLowerCase();return qr.find(e=>e.slug===t)??null}function Zr(e){let t=(e??``).trim().toLowerCase();if(!t)return`home`;let n=Yr[t];if(n)return n;let r=Xr(t);return r?r.slug:`home`}var Qr=48;function $r({title:e,eyebrow:t,trailing:n,className:r}){let i=(0,Q.useRef)(null),a=(0,Q.useRef)(null),o=(0,Q.useRef)(null),s=(0,Q.useRef)(null),c=(0,Q.useRef)(null),l=L(()=>{s.current=null;let e=i.current,t=a.current;if(!e||!t)return;let n=Math.min(1,Math.max(0,t.scrollTop/Qr)),r=o.current?.matches?Number(n>=.5):n;c.current!==null&&Math.abs(c.current-r)<.001||(c.current=r,e.style.setProperty(`--oc-mobile-title-collapse`,r.toFixed(4)))}),u=L(()=>{s.current===null&&(s.current=window.requestAnimationFrame(l))});return(0,Q.useEffect)(()=>{let e=i.current;if(!e)return;let t=e.closest(`.oc-mobile-settings-root-surface, [role="tabpanel"]`);if(!t)return;let n=window.matchMedia(`(prefers-reduced-motion: reduce)`);return a.current=t,o.current=n,c.current=null,t.addEventListener(`scroll`,u,{passive:!0}),n.addEventListener(`change`,u),l(),()=>{t.removeEventListener(`scroll`,u),n.removeEventListener(`change`,u),s.current!==null&&window.cancelAnimationFrame(s.current),s.current=null,a.current=null,o.current=null,c.current=null}},[]),(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`header`,{ref:i,className:G(`oc-mobile-collapsing-header flex shrink-0 items-start gap-4`,r),children:(0,X.jsxs)(`div`,{className:`oc-mobile-collapsing-header-inner`,children:[(0,X.jsxs)(`div`,{className:`oc-mobile-collapsing-header-title-block min-w-0 flex-1`,children:[t?(0,X.jsx)(`p`,{className:`oc-mobile-collapsing-header-eyebrow truncate typography-micro font-medium text-muted-foreground`,children:t}):null,(0,X.jsx)(`h1`,{className:`oc-mobile-root-page-title truncate font-semibold text-foreground`,children:e})]}),n?(0,X.jsx)(`div`,{className:`oc-mobile-collapsing-header-trailing flex min-h-10 shrink-0 items-center gap-3.5`,children:n}):null]})}),(0,X.jsx)(`div`,{className:`oc-mobile-collapsing-header-spacer`,"aria-hidden":`true`})]})}function ei(e){let t=(0,Y.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({asChild:i,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i!==void 0&&i?pe:`div`,o;t[4]===n?o=t[5]:(o=G(`oc-mobile-floating-surface`,n),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==r||t[8]!==o?(s=(0,X.jsx)(a,{className:o,...r}),t[6]=a,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function ti(e){let t=(0,Y.c)(20),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({as:o,children:n,className:r,variant:s,surfaceProps:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=o===void 0?`div`:o,l=s===void 0?`actions`:s,u;t[7]===r?u=t[8]:(u=G(`oc-mobile-floating-bottom-bar-frame`,r),t[7]=r,t[8]=u);let d=l===`navigation`?`oc-mobile-floating-bottom-bar-navigation`:`oc-mobile-floating-bottom-bar-actions`,f;t[9]===d?f=t[10]:(f=G(`oc-mobile-floating-bottom-bar`,d),t[9]=d,t[10]=f);let p;t[11]!==n||t[12]!==a||t[13]!==f?(p=(0,X.jsx)(ei,{...a,className:f,children:n}),t[11]=n,t[12]=a,t[13]=f,t[14]=p):p=t[14];let m;return t[15]!==c||t[16]!==i||t[17]!==u||t[18]!==p?(m=(0,X.jsx)(c,{className:u,...i,children:p}),t[15]=c,t[16]=i,t[17]=u,t[18]=p,t[19]=m):m=t[19],m}function ni(e){let t=(0,Y.c)(17),{title:n,children:r,surface:i,scrollsWithPage:a,showHeader:o,trailing:s,className:c,surfaceClassName:l,surfaceAriaLabel:u}=e,d=i===void 0||i,f=a!==void 0&&a,p=o===void 0||o,m=f&&`oc-mobile-tab-page-flow`,h=!p&&`gap-0`,g;t[0]!==c||t[1]!==m||t[2]!==h?(g=G(`oc-mobile-tab-page`,m,h,c),t[0]=c,t[1]=m,t[2]=h,t[3]=g):g=t[3];let _;t[4]!==p||t[5]!==n||t[6]!==s?(_=p?(0,X.jsx)($r,{title:n,trailing:s}):null,t[4]=p,t[5]=n,t[6]=s,t[7]=_):_=t[7];let v;t[8]!==r||t[9]!==d||t[10]!==u||t[11]!==l?(v=d?(0,X.jsx)(ei,{className:G(`oc-mobile-tab-page-surface`,l),"aria-label":u,children:r}):(0,X.jsx)(`div`,{className:G(`oc-mobile-tab-page-content`,l),"aria-label":u,children:r}),t[8]=r,t[9]=d,t[10]=u,t[11]=l,t[12]=v):v=t[12];let y;return t[13]!==g||t[14]!==_||t[15]!==v?(y=(0,X.jsxs)(`div`,{className:g,children:[_,v]}),t[13]=g,t[14]=_,t[15]=v,t[16]=y):y=t[16],y}function ri(e){let t=(0,Y.c)(12),{label:n,children:r,className:i,cardClassName:a,ariaLabel:o}=e,s;t[0]!==a||t[1]!==i?(s=G(`oc-mobile-labeled-surface-group`,a,i),t[0]=a,t[1]=i,t[2]=s):s=t[2];let c;t[3]===n?c=t[4]:(c=(0,X.jsx)(`div`,{className:`oc-mobile-labeled-surface-group-label`,children:n}),t[3]=n,t[4]=c);let l;t[5]===r?l=t[6]:(l=r?(0,X.jsx)(`div`,{className:`oc-mobile-labeled-surface-group-content`,children:r}):null,t[5]=r,t[6]=l);let u;return t[7]!==o||t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,X.jsxs)(`section`,{className:s,"aria-label":o,children:[c,l]}),t[7]=o,t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}export{In as A,It as B,ur as C,Ln as D,Hn as E,Dn as F,_t as G,Et as H,hn as I,gt as J,Ct as K,Bt as L,On as M,An as N,zn as O,jn as P,Ht as R,fr as S,Jn as T,Dt as U,Tt as V,Ot as W,ht as Y,Cr as _,$r as a,or as b,Xr as c,Ur as d,Br as f,xr as g,Dr as h,ni as i,kn as j,Bn as k,Jr as l,Or as m,ei as n,Kr as o,Ar as p,wt as q,ri as r,qr as s,ti as t,Zr as u,Sr as v,ar as w,dr as x,lr as y,Vt as z};