@xopcai/xopc 0.0.149 → 0.0.150

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 (2873) hide show
  1. package/README.md +10 -0
  2. package/README.zh-CN.md +10 -0
  3. package/dist/browser-ext/manifest.json +1 -1
  4. package/dist/extensions/dashscope/src/image-generation-provider.js +0 -2
  5. package/dist/extensions/demo-memory/src/index.js +0 -2
  6. package/dist/extensions/fal/src/image-generation-provider.js +0 -2
  7. package/dist/extensions/feishu/src/actions/message-action-handler.js +0 -2
  8. package/dist/extensions/feishu/src/adapters/cli-login.js +0 -2
  9. package/dist/extensions/feishu/src/adapters/gateway-setup.js +0 -2
  10. package/dist/extensions/feishu/src/adapters/onboard-cli.js +0 -2
  11. package/dist/extensions/feishu/src/auth/app-registration.js +0 -2
  12. package/dist/extensions/feishu/src/auth/pairing.js +0 -2
  13. package/dist/extensions/feishu/src/auth/paths.js +0 -2
  14. package/dist/extensions/feishu/src/directory/directory-adapter.js +0 -2
  15. package/dist/extensions/feishu/src/format.js +0 -2
  16. package/dist/extensions/feishu/src/index.js +0 -2
  17. package/dist/extensions/feishu/src/outbound/actions.js +0 -2
  18. package/dist/extensions/feishu/src/outbound/media-load.js +0 -2
  19. package/dist/extensions/feishu/src/outbound/outbound-adapter.js +0 -2
  20. package/dist/extensions/feishu/src/pairing/feishu-pairing-prompt.js +0 -2
  21. package/dist/extensions/feishu/src/pairing-config-resolver.js +0 -2
  22. package/dist/extensions/feishu/src/plugin.js +0 -2
  23. package/dist/extensions/feishu/src/schema/config-schema.js +0 -2
  24. package/dist/extensions/feishu/src/state/accounts.js +0 -2
  25. package/dist/extensions/feishu/src/state/message-bindings.js +0 -2
  26. package/dist/extensions/feishu/src/state/thread-bindings.js +0 -2
  27. package/dist/extensions/feishu/src/status/doctor.js +0 -2
  28. package/dist/extensions/feishu/src/status/status-adapter.js +0 -2
  29. package/dist/extensions/feishu/src/streaming/streaming-adapter.js +0 -2
  30. package/dist/extensions/feishu/src/subagent-hooks.js +0 -2
  31. package/dist/extensions/feishu/src/tools/docx/docx-batch-insert.js +0 -2
  32. package/dist/extensions/feishu/src/tools/docx/docx-color-text.d.ts +6 -3386
  33. package/dist/extensions/feishu/src/tools/docx/docx-color-text.js +0 -2
  34. package/dist/extensions/feishu/src/tools/docx/docx-table-ops.d.ts +16 -16927
  35. package/dist/extensions/feishu/src/tools/docx/docx-table-ops.js +0 -2
  36. package/dist/extensions/feishu/src/tools/tools.js +0 -2
  37. package/dist/extensions/feishu/src/transport/client/client.js +2 -4
  38. package/dist/extensions/feishu/src/transport/client/lark-sdk-logger.js +0 -2
  39. package/dist/extensions/feishu/src/transport/client/lark-sdk.d.ts +3 -0
  40. package/dist/extensions/feishu/src/transport/client/lark-sdk.js +14 -0
  41. package/dist/extensions/feishu/src/transport/reliability/dedupe.js +0 -2
  42. package/dist/extensions/feishu/src/transport/reliability/inbound-pipeline.js +0 -2
  43. package/dist/extensions/feishu/src/transport/socket-mode/monitor.js +0 -2
  44. package/dist/extensions/feishu/src/transport/socket-mode/retry.js +0 -2
  45. package/dist/extensions/feishu/src/transport/text/mentions.js +0 -2
  46. package/dist/extensions/feishu/src/transport/webhook/monitor.js +3 -5
  47. package/dist/extensions/feishu/src/ui/config-surface.js +0 -2
  48. package/dist/extensions/feishu/src/workflow-progress.js +0 -2
  49. package/dist/extensions/google/src/image-generation-provider.js +0 -2
  50. package/dist/extensions/minimax/src/image-generation-provider.js +0 -2
  51. package/dist/extensions/openai/src/image-generation-provider.js +0 -2
  52. package/dist/extensions/telegram/src/access-control.js +0 -2
  53. package/dist/extensions/telegram/src/account-manager.js +0 -2
  54. package/dist/extensions/telegram/src/actions/message-actions.js +0 -2
  55. package/dist/extensions/telegram/src/adapters/command-adapter.js +0 -2
  56. package/dist/extensions/telegram/src/adapters/config-adapter.js +0 -2
  57. package/dist/extensions/telegram/src/adapters/debounce-keys.js +0 -2
  58. package/dist/extensions/telegram/src/adapters/gateway-adapter.js +0 -2
  59. package/dist/extensions/telegram/src/adapters/gateway-setup.js +0 -2
  60. package/dist/extensions/telegram/src/adapters/inbound-access.js +0 -2
  61. package/dist/extensions/telegram/src/adapters/index.js +0 -2
  62. package/dist/extensions/telegram/src/adapters/onboard-cli.js +0 -2
  63. package/dist/extensions/telegram/src/adapters/outbound-adapter.js +0 -2
  64. package/dist/extensions/telegram/src/adapters/security-adapter.js +0 -2
  65. package/dist/extensions/telegram/src/adapters/setup-wizard.js +0 -2
  66. package/dist/extensions/telegram/src/adapters/status-adapter.js +0 -2
  67. package/dist/extensions/telegram/src/adapters/streaming-adapter.js +0 -2
  68. package/dist/extensions/telegram/src/api-root.js +0 -2
  69. package/dist/extensions/telegram/src/approval-delivery.js +0 -2
  70. package/dist/extensions/telegram/src/approval-store.js +0 -2
  71. package/dist/extensions/telegram/src/caption.js +0 -2
  72. package/dist/extensions/telegram/src/command-handler.js +0 -2
  73. package/dist/extensions/telegram/src/config-schema.js +0 -2
  74. package/dist/extensions/telegram/src/conversation-id.js +0 -2
  75. package/dist/extensions/telegram/src/dedupe.js +0 -2
  76. package/dist/extensions/telegram/src/delivery-chat-id.js +0 -2
  77. package/dist/extensions/telegram/src/doctor.js +0 -2
  78. package/dist/extensions/telegram/src/draft-stream-lifecycle.js +0 -2
  79. package/dist/extensions/telegram/src/draft-stream-loop.js +0 -2
  80. package/dist/extensions/telegram/src/draft-stream.js +0 -2
  81. package/dist/extensions/telegram/src/errors.js +0 -2
  82. package/dist/extensions/telegram/src/exec-approval-handler.js +0 -2
  83. package/dist/extensions/telegram/src/exec-approvals.js +0 -2
  84. package/dist/extensions/telegram/src/focus-handler.js +0 -2
  85. package/dist/extensions/telegram/src/format.js +0 -2
  86. package/dist/extensions/telegram/src/group-config-resolver.js +0 -2
  87. package/dist/extensions/telegram/src/inbound-coalescer.js +0 -2
  88. package/dist/extensions/telegram/src/inbound-processor.js +0 -2
  89. package/dist/extensions/telegram/src/index.js +0 -2
  90. package/dist/extensions/telegram/src/inline-keyboards.js +0 -2
  91. package/dist/extensions/telegram/src/network-errors.js +0 -2
  92. package/dist/extensions/telegram/src/outbound-sender.js +0 -2
  93. package/dist/extensions/telegram/src/pairing-config-resolver.js +0 -2
  94. package/dist/extensions/telegram/src/plugin-defaults.js +0 -2
  95. package/dist/extensions/telegram/src/plugin.js +0 -2
  96. package/dist/extensions/telegram/src/polling-session.js +0 -2
  97. package/dist/extensions/telegram/src/proxy-fetch.js +0 -2
  98. package/dist/extensions/telegram/src/reactions.js +0 -2
  99. package/dist/extensions/telegram/src/reply-params.js +0 -2
  100. package/dist/extensions/telegram/src/routing-integration.js +0 -2
  101. package/dist/extensions/telegram/src/send-options.js +0 -2
  102. package/dist/extensions/telegram/src/sent-cache.js +0 -2
  103. package/dist/extensions/telegram/src/startup-errors.js +0 -2
  104. package/dist/extensions/telegram/src/telegram-actions.js +0 -2
  105. package/dist/extensions/telegram/src/telegram-draft-errors.js +0 -2
  106. package/dist/extensions/telegram/src/thread-bindings.js +0 -2
  107. package/dist/extensions/telegram/src/timeout-abort.js +0 -2
  108. package/dist/extensions/telegram/src/token-resolver.js +0 -2
  109. package/dist/extensions/telegram/src/update-offset-store.js +0 -2
  110. package/dist/extensions/telegram/src/workflow-progress.js +0 -2
  111. package/dist/extensions/telegram/xopc.extension.json +1 -1
  112. package/dist/extensions/weixin/src/adapters/onboard-cli.js +0 -2
  113. package/dist/extensions/weixin/src/api/api.js +0 -2
  114. package/dist/extensions/weixin/src/api/config-cache.js +0 -2
  115. package/dist/extensions/weixin/src/api/session-guard.js +0 -2
  116. package/dist/extensions/weixin/src/api/types.js +0 -2
  117. package/dist/extensions/weixin/src/auth/accounts.js +0 -2
  118. package/dist/extensions/weixin/src/auth/login-qr.js +0 -2
  119. package/dist/extensions/weixin/src/auth/pairing.js +0 -2
  120. package/dist/extensions/weixin/src/auth/weixin-account-id.js +0 -2
  121. package/dist/extensions/weixin/src/cdn/aes-ecb.js +0 -2
  122. package/dist/extensions/weixin/src/cdn/cdn-upload.js +0 -2
  123. package/dist/extensions/weixin/src/cdn/cdn-url.js +0 -2
  124. package/dist/extensions/weixin/src/cdn/pic-decrypt.js +0 -2
  125. package/dist/extensions/weixin/src/cdn/upload.js +0 -2
  126. package/dist/extensions/weixin/src/cli/gateway-qr-login.js +0 -2
  127. package/dist/extensions/weixin/src/cli/qr-login.js +0 -2
  128. package/dist/extensions/weixin/src/config-schema.js +0 -2
  129. package/dist/extensions/weixin/src/config-surface.js +0 -2
  130. package/dist/extensions/weixin/src/delivery-to.js +0 -2
  131. package/dist/extensions/weixin/src/index.js +0 -2
  132. package/dist/extensions/weixin/src/media/data-url.js +0 -2
  133. package/dist/extensions/weixin/src/media/media-download.js +0 -2
  134. package/dist/extensions/weixin/src/media/mime.js +0 -2
  135. package/dist/extensions/weixin/src/media/silk-transcode.js +0 -2
  136. package/dist/extensions/weixin/src/messaging/context-token-init.js +0 -2
  137. package/dist/extensions/weixin/src/messaging/debug-mode.js +0 -2
  138. package/dist/extensions/weixin/src/messaging/error-notice.js +0 -2
  139. package/dist/extensions/weixin/src/messaging/inbound.js +0 -2
  140. package/dist/extensions/weixin/src/messaging/markdown-filter.js +0 -2
  141. package/dist/extensions/weixin/src/messaging/process-message.js +0 -2
  142. package/dist/extensions/weixin/src/messaging/send-media.js +0 -2
  143. package/dist/extensions/weixin/src/messaging/send.js +0 -2
  144. package/dist/extensions/weixin/src/messaging/slash-commands.js +0 -2
  145. package/dist/extensions/weixin/src/messaging/typing-ticket-store.js +0 -2
  146. package/dist/extensions/weixin/src/monitor/monitor.js +0 -2
  147. package/dist/extensions/weixin/src/outbound-send.js +0 -2
  148. package/dist/extensions/weixin/src/pairing-config-resolver.js +0 -2
  149. package/dist/extensions/weixin/src/plugin.js +0 -2
  150. package/dist/extensions/weixin/src/routing-integration.js +0 -2
  151. package/dist/extensions/weixin/src/storage/state-dir.js +0 -2
  152. package/dist/extensions/weixin/src/storage/sync-buf.js +0 -2
  153. package/dist/extensions/weixin/src/util/logger.js +0 -2
  154. package/dist/extensions/weixin/src/util/random.js +0 -2
  155. package/dist/extensions/weixin/src/util/redact.js +0 -2
  156. package/dist/extensions/weixin/src/workflow-progress.js +0 -2
  157. package/dist/gateway/static/root/assets/{activity-store-B4s0ipx2.js → activity-store-B3YP7y9d.js} +1 -1
  158. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BSccACje.js → agent-avatar-dicebear-BaP05tRU.js} +1 -1
  159. package/dist/gateway/static/root/assets/{agents-DZDOcgz5.js → agents-QArUBYV7.js} +1 -1
  160. package/dist/gateway/static/root/assets/{api-BMdUsNCV.js → api-BirUfJgj.js} +1 -1
  161. package/dist/gateway/static/root/assets/{app-management-settings-panel-DrLGhYkI.js → app-management-settings-panel-D5Cg_a6I.js} +1 -1
  162. package/dist/gateway/static/root/assets/{appearance-settings-BNasnY9D.js → appearance-settings-BBsAkJ56.js} +1 -1
  163. package/dist/gateway/static/root/assets/{apps-page-Cmr-Hvm9.js → apps-page-D1uAUndU.js} +1 -1
  164. package/dist/gateway/static/root/assets/{archive-plugin-BQ17IK9x.js → archive-plugin-D3OmrvFx.js} +1 -1
  165. package/dist/gateway/static/root/assets/{attachment-load-HXvgWHXu.js → attachment-load-Cgkm_5mb.js} +1 -1
  166. package/dist/gateway/static/root/assets/{automation-suggestion-card-CjIWpsch.js → automation-suggestion-card-CHvxSz-t.js} +1 -1
  167. package/dist/gateway/static/root/assets/{automations-page-TWgUAI8t.js → automations-page-BWQk03Vu.js} +1 -1
  168. package/dist/gateway/static/root/assets/{binary-plugins-DifWJzNZ.js → binary-plugins-dJR5UuzL.js} +1 -1
  169. package/dist/gateway/static/root/assets/{block-editor-DtRzIkPU.js → block-editor-v4_7o92L.js} +2 -2
  170. package/dist/gateway/static/root/assets/{browser-settings-page-DBsFItW_.js → browser-settings-page-SruFGuBP.js} +1 -1
  171. package/dist/gateway/static/root/assets/{capability-presets-api-DazKjWW1.js → capability-presets-api-BcTjPLiD.js} +1 -1
  172. package/dist/gateway/static/root/assets/{capability-presets-settings-panel-Cvrw4fD1.js → capability-presets-settings-panel-CddBf58y.js} +1 -1
  173. package/dist/gateway/static/root/assets/{channel-recipient-api-Bea6if_6.js → channel-recipient-api-BbDlMRm5.js} +1 -1
  174. package/dist/gateway/static/root/assets/{channels-settings-BBkzrBYy.js → channels-settings-WI5tQ5tn.js} +1 -1
  175. package/dist/gateway/static/root/assets/channels-status-swr-Dt2EROlf.js +1 -0
  176. package/dist/gateway/static/root/assets/{connector-logo-BjbYbJjQ.js → connector-logo-BNthqff-.js} +1 -1
  177. package/dist/gateway/static/root/assets/{connectors-page-DLsZCAw7.js → connectors-page-DavHJ6rR.js} +1 -1
  178. package/dist/gateway/static/root/assets/desktop-pet-CVajXkdj.js +1 -0
  179. package/dist/gateway/static/root/assets/desktop-pet-settings-SHI66eIi.js +1 -0
  180. package/dist/gateway/static/root/assets/{directory-picker-path-field-C8zZNUzC.js → directory-picker-path-field-BdWd7m-p.js} +1 -1
  181. package/dist/gateway/static/root/assets/{dreaming-settings-gJSw7Adk.js → dreaming-settings-CXDhu3Me.js} +1 -1
  182. package/dist/gateway/static/root/assets/{extension-debug-page-DFE5ADJ0.js → extension-debug-page-CLJTGozU.js} +1 -1
  183. package/dist/gateway/static/root/assets/{extension-page-CfR-aW8G.js → extension-page-ClxpGfzA.js} +1 -1
  184. package/dist/gateway/static/root/assets/{extension-settings-page-CFIEbs2L.js → extension-settings-page-CDA3ZJ8k.js} +1 -1
  185. package/dist/gateway/static/root/assets/{gateway-config-api-B6M_ra8U.js → gateway-config-api-DpXL78pS.js} +1 -1
  186. package/dist/gateway/static/root/assets/{gateway-settings-BrxzyVW2.js → gateway-settings-Co-mXFP_.js} +1 -1
  187. package/dist/gateway/static/root/assets/{gateway-startup-retry-DNA3OOzV.js → gateway-startup-retry-D0SU7dte.js} +1 -1
  188. package/dist/gateway/static/root/assets/{goal-create-dialog-DRVRLc5Z.js → goal-create-dialog-BO6G--Ec.js} +1 -1
  189. package/dist/gateway/static/root/assets/{goal-detail-page-8F7NElzP.js → goal-detail-page-DK8eog4h.js} +1 -1
  190. package/dist/gateway/static/root/assets/{goals-config-api-D88opgcs.js → goals-config-api-r71aDqix.js} +1 -1
  191. package/dist/gateway/static/root/assets/{goals-page-BaoLiV8G.js → goals-page-AcROW97U.js} +2 -2
  192. package/dist/gateway/static/root/assets/{goals-settings-D07UL8Jo.js → goals-settings-CZOLhkTH.js} +1 -1
  193. package/dist/gateway/static/root/assets/{heartbeat-settings-YCSNOcXC.js → heartbeat-settings-F9S1gIFo.js} +1 -1
  194. package/dist/gateway/static/root/assets/index-C46C7Xee.css +1 -0
  195. package/dist/gateway/static/root/assets/{index-CH7XN6KY.js → index-IPmCli0N.js} +41 -41
  196. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BHnh5OoY.js → keyboard-shortcuts-settings-B3CUVfZ8.js} +1 -1
  197. package/dist/gateway/static/root/assets/{local-app-workbench-page-Boe8n4zH.js → local-app-workbench-page-HVq6NUvQ.js} +1 -1
  198. package/dist/gateway/static/root/assets/{local-apps-page-CKvtLzsF.js → local-apps-page-n7YJfRkU.js} +1 -1
  199. package/dist/gateway/static/root/assets/{locale-store-BneNAR8R.js → locale-store-BvcHGPHU.js} +1 -1
  200. package/dist/gateway/static/root/assets/{logs-page-Cb4Uptct.js → logs-page-Dgko6r04.js} +1 -1
  201. package/dist/gateway/static/root/assets/{markdown-split-BVSFG99p.js → markdown-split-1mnXr-JA.js} +1 -1
  202. package/dist/gateway/static/root/assets/{media-plugins-DdOjIVk3.js → media-plugins-D2bcxXrT.js} +1 -1
  203. package/dist/gateway/static/root/assets/{messages-t1yPaVCt.js → messages-BH7paqYt.js} +2 -2
  204. package/dist/gateway/static/root/assets/{models-hub-panel-CNiUKZUV.js → models-hub-panel-DD0cEfmR.js} +1 -1
  205. package/dist/gateway/static/root/assets/{notes-page-ZbLR3awn.js → notes-page-Wjc2utlj.js} +1 -1
  206. package/dist/gateway/static/root/assets/{notes-workbench-C9__VkD6.js → notes-workbench-BkA2yg9K.js} +2 -2
  207. package/dist/gateway/static/root/assets/{page-tabs-DMlQERNg.js → page-tabs-vdljrKuG.js} +1 -1
  208. package/dist/gateway/static/root/assets/{preview-open-alternatives-CbiJRPxK.js → preview-open-alternatives-BHki0l-E.js} +1 -1
  209. package/dist/gateway/static/root/assets/{project-detail-page-CZhuB5kO.js → project-detail-page-CXwVNLgg.js} +1 -1
  210. package/dist/gateway/static/root/assets/{projects-page-BOq4WVdR.js → projects-page-DlfvNcLh.js} +1 -1
  211. package/dist/gateway/static/root/assets/{remote-access-hub-BxGq0ebQ.js → remote-access-hub-BQyEX2Ui.js} +1 -1
  212. package/dist/gateway/static/root/assets/{save-bar-controls-BZTj3hxl.js → save-bar-controls-Vy4EmvEh.js} +1 -1
  213. package/dist/gateway/static/root/assets/{schedule-field-CxYDObjT.js → schedule-field-CVcwC7k_.js} +1 -1
  214. package/dist/gateway/static/root/assets/{schema-form-CBbXgpKQ.js → schema-form-DhMA1vkR.js} +1 -1
  215. package/dist/gateway/static/root/assets/{sessions-page-B6gSU_Au.js → sessions-page-CqQEW8oT.js} +1 -1
  216. package/dist/gateway/static/root/assets/settings-advanced-gate-M8fleFSc.js +1 -0
  217. package/dist/gateway/static/root/assets/{settings-collapsible-section-BySKZ8rp.js → settings-collapsible-section-C0xcL0vB.js} +1 -1
  218. package/dist/gateway/static/root/assets/{settings-form-section-CjINay6t.js → settings-form-section-Cgj4iVpx.js} +1 -1
  219. package/dist/gateway/static/root/assets/{settings-loading-skeleton-vitElc-n.js → settings-loading-skeleton-CC_NmD69.js} +1 -1
  220. package/dist/gateway/static/root/assets/{settings-page-BNrVwuL7.js → settings-page-B7_JZ2rM.js} +1 -1
  221. package/dist/gateway/static/root/assets/{settings-page-layout-HdlQOOqp.js → settings-page-layout-CKuQT4SG.js} +1 -1
  222. package/dist/gateway/static/root/assets/{setup-status-panel-BJeA4mmk.js → setup-status-panel-DvR8Y5YN.js} +1 -1
  223. package/dist/gateway/static/root/assets/{share-preview-page-DC-eQONB.js → share-preview-page-BmVw-6SJ.js} +1 -1
  224. package/dist/gateway/static/root/assets/{shares-settings-DB2KYA2_.js → shares-settings-C0JYYhGx.js} +1 -1
  225. package/dist/gateway/static/root/assets/skill-reload-api-DBFBczqN.js +1 -0
  226. package/dist/gateway/static/root/assets/{skills-page-Pm0fNe_p.js → skills-page-KAI9qBDD.js} +1 -1
  227. package/dist/gateway/static/root/assets/{system-settings-panel-CVa90q2f.js → system-settings-panel-D6d8VAk8.js} +1 -1
  228. package/dist/gateway/static/root/assets/{theme-store-D1cOpgsy.js → theme-store-EbMQ3TYi.js} +1 -1
  229. package/dist/gateway/static/root/assets/{typed-models-lib-DIKF9vpz.js → typed-models-lib-D63hJX-S.js} +1 -1
  230. package/dist/gateway/static/root/assets/{use-channel-catalog-DnvpI0Ys.js → use-channel-catalog-D-I-qki9.js} +1 -1
  231. package/dist/gateway/static/root/assets/{user-context-page-DnLqQyRG.js → user-context-page-Cuft-EbR.js} +1 -1
  232. package/dist/gateway/static/root/assets/{user-profile-fields-editor-y8gTmkPX.js → user-profile-fields-editor-CPaoS8Zl.js} +1 -1
  233. package/dist/gateway/static/root/assets/{user-profile-settings-panel-C3pvqe28.js → user-profile-settings-panel-Bs13qcx1.js} +1 -1
  234. package/dist/gateway/static/root/assets/{utils-BK2vwu_3.js → utils-3mnkFvPw.js} +1 -1
  235. package/dist/gateway/static/root/assets/{voice-api-key-field-BiFIIWC4.js → voice-api-key-field-C716UEi9.js} +1 -1
  236. package/dist/gateway/static/root/assets/{work-discovery-page-D2-_bC0J.js → work-discovery-page-CFSkHa0v.js} +1 -1
  237. package/dist/gateway/static/root/assets/{work-item-detail-page-B0FPG4eJ.js → work-item-detail-page-DaapBdoZ.js} +1 -1
  238. package/dist/gateway/static/root/assets/{work-page-BDeVxts_.js → work-page-DMtX92vs.js} +1 -1
  239. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BPzS67fU.js → workflow-run-setup-panel-B9FnZNWZ.js} +1 -1
  240. package/dist/gateway/static/root/assets/{workflows-page-xPhmrRLs.js → workflows-page-BgvE0_Iv.js} +1 -1
  241. package/dist/gateway/static/root/favicon.svg +1 -187
  242. package/dist/gateway/static/root/index.html +7 -7
  243. package/dist/gateway/static/root/logo-dark.svg +1 -185
  244. package/dist/gateway/static/root/logo.svg +1 -185
  245. package/dist/package.js +1 -3
  246. package/dist/src/activity/context.js +0 -2
  247. package/dist/src/activity/emitter.js +0 -2
  248. package/dist/src/activity/service.js +0 -2
  249. package/dist/src/agent/agent-manager.js +0 -2
  250. package/dist/src/agent/agent-scope.js +0 -2
  251. package/dist/src/agent/background-review/coordinator.js +0 -2
  252. package/dist/src/agent/background-review/prompts.js +0 -2
  253. package/dist/src/agent/background-review/run-background-review.js +0 -2
  254. package/dist/src/agent/background-review/settings.js +0 -2
  255. package/dist/src/agent/bootstrap/bootstrap-cache.js +0 -2
  256. package/dist/src/agent/bootstrap/bootstrap-context.js +0 -2
  257. package/dist/src/agent/bootstrap/bootstrap-files.js +0 -2
  258. package/dist/src/agent/bootstrap/filter-bootstrap-files.js +0 -2
  259. package/dist/src/agent/bootstrap/load-bootstrap-files.js +0 -2
  260. package/dist/src/agent/bootstrap/project-agents-context.js +0 -2
  261. package/dist/src/agent/capabilities/definitions.js +0 -2
  262. package/dist/src/agent/capabilities/registry.js +0 -2
  263. package/dist/src/agent/child-agent-factory.js +0 -2
  264. package/dist/src/agent/client-error-format.js +0 -2
  265. package/dist/src/agent/code-intelligence/binary.js +0 -2
  266. package/dist/src/agent/code-intelligence/runtime.js +0 -2
  267. package/dist/src/agent/code-intelligence/tools.js +0 -2
  268. package/dist/src/agent/coding/turn-diff-tracker.js +0 -2
  269. package/dist/src/agent/context/expand-at-file-mentions.js +0 -2
  270. package/dist/src/agent/context/project-context.js +0 -2
  271. package/dist/src/agent/context/workspace-seed.js +0 -2
  272. package/dist/src/agent/context/workspace-state.js +0 -2
  273. package/dist/src/agent/context/workspace.js +0 -2
  274. package/dist/src/agent/embedded/run-for-session.js +0 -2
  275. package/dist/src/agent/embedded/run-turn.js +0 -2
  276. package/dist/src/agent/embedded/runs.js +0 -2
  277. package/dist/src/agent/embedded/session-manager-init.js +0 -2
  278. package/dist/src/agent/embedded/session-runner.js +0 -2
  279. package/dist/src/agent/embedded/session-tool-result-guard.js +0 -2
  280. package/dist/src/agent/embedded/sqlite-hydrating-session-manager.js +0 -2
  281. package/dist/src/agent/embedded/subscribe-session.js +0 -2
  282. package/dist/src/agent/embedded/system-prompt-override.js +0 -2
  283. package/dist/src/agent/embedded/tool-result-context-guard.js +0 -2
  284. package/dist/src/agent/embedded/tool-result-truncation.js +0 -2
  285. package/dist/src/agent/embedded/xopc-auth-storage.js +0 -2
  286. package/dist/src/agent/embedded/xopc-stream-bridge.js +0 -2
  287. package/dist/src/agent/embedded/xopc-tools-bridge.js +0 -2
  288. package/dist/src/agent/failover-error.js +0 -2
  289. package/dist/src/agent/fallback/candidates.js +0 -2
  290. package/dist/src/agent/fallback/reason.js +0 -2
  291. package/dist/src/agent/feedback/feedback-coordinator.js +0 -2
  292. package/dist/src/agent/goals/checklist-judge.js +0 -2
  293. package/dist/src/agent/goals/checklist-types.js +0 -2
  294. package/dist/src/agent/goals/evaluate-turn.js +0 -2
  295. package/dist/src/agent/goals/goal-locale.js +0 -2
  296. package/dist/src/agent/goals/judge.js +0 -2
  297. package/dist/src/agent/goals/persistent-goal-service.js +0 -2
  298. package/dist/src/agent/goals/post-turn.js +0 -2
  299. package/dist/src/agent/goals/state.js +0 -2
  300. package/dist/src/agent/image/generation/bundled-registry.js +0 -2
  301. package/dist/src/agent/image/generation/bundled.js +0 -2
  302. package/dist/src/agent/image/generation/image-assets.js +0 -2
  303. package/dist/src/agent/image/generation/model-ref.js +0 -2
  304. package/dist/src/agent/image/generation/normalization.js +0 -2
  305. package/dist/src/agent/image/generation/openai-compatible-image-provider.js +0 -2
  306. package/dist/src/agent/image/generation/provider-registry.js +0 -2
  307. package/dist/src/agent/image/generation/runtime.js +0 -2
  308. package/dist/src/agent/image/image-helpers.js +0 -2
  309. package/dist/src/agent/image/image-model-fallback.js +0 -2
  310. package/dist/src/agent/image/inbound-image-handling.js +0 -2
  311. package/dist/src/agent/image/load-image-media.js +0 -2
  312. package/dist/src/agent/image/tool-model-config.js +0 -2
  313. package/dist/src/agent/image/understanding/pi-ai-provider.js +0 -2
  314. package/dist/src/agent/image/understanding/provider-registry.js +0 -2
  315. package/dist/src/agent/image/understanding/runtime.js +0 -2
  316. package/dist/src/agent/image/vision-detection.js +0 -2
  317. package/dist/src/agent/inbound/attachment-pipeline.js +0 -2
  318. package/dist/src/agent/inbound/inbound-loop.js +0 -2
  319. package/dist/src/agent/inbound/turn-dispatcher.js +0 -2
  320. package/dist/src/agent/ipc/bus.js +0 -2
  321. package/dist/src/agent/ipc/inbox.js +0 -2
  322. package/dist/src/agent/ipc/socket.js +0 -2
  323. package/dist/src/agent/ipc/types.js +0 -2
  324. package/dist/src/agent/lifecycle/handlers/compaction.js +0 -2
  325. package/dist/src/agent/lifecycle/hook-handler.js +0 -2
  326. package/dist/src/agent/lifecycle/manager.js +0 -2
  327. package/dist/src/agent/lifecycle/progress.js +0 -2
  328. package/dist/src/agent/lifecycle/timeout-wrapper.js +0 -2
  329. package/dist/src/agent/lifecycle/typing.js +0 -2
  330. package/dist/src/agent/mcp/bundle-mcp-config.js +0 -2
  331. package/dist/src/agent/mcp/bundle-mcp-materialize.js +0 -2
  332. package/dist/src/agent/mcp/bundle-mcp-names.js +0 -2
  333. package/dist/src/agent/mcp/bundle-mcp-policy.js +0 -2
  334. package/dist/src/agent/mcp/bundle-mcp-runtime.js +0 -2
  335. package/dist/src/agent/mcp/embedded-mcp.js +0 -2
  336. package/dist/src/agent/mcp/mcp-config-shared.js +0 -2
  337. package/dist/src/agent/mcp/mcp-http.js +0 -2
  338. package/dist/src/agent/mcp/mcp-stdio-transport.js +0 -2
  339. package/dist/src/agent/mcp/mcp-stdio.js +0 -2
  340. package/dist/src/agent/mcp/mcp-tool-meta.js +0 -2
  341. package/dist/src/agent/mcp/mcp-transport-config.js +0 -2
  342. package/dist/src/agent/mcp/mcp-transport.js +0 -2
  343. package/dist/src/agent/mcp/resolve-embedded-mcp-tools.js +0 -2
  344. package/dist/src/agent/media-generation/model-ref.js +0 -2
  345. package/dist/src/agent/media-generation/normalization.types.js +0 -2
  346. package/dist/src/agent/media-generation/runtime-shared.js +0 -2
  347. package/dist/src/agent/memory/agent-message-access.js +0 -2
  348. package/dist/src/agent/memory/builtin-memory-store.js +0 -2
  349. package/dist/src/agent/memory/builtin-provider.js +0 -2
  350. package/dist/src/agent/memory/compaction.js +0 -2
  351. package/dist/src/agent/memory/context/planner.js +0 -2
  352. package/dist/src/agent/memory/context-fence.js +0 -2
  353. package/dist/src/agent/memory/create-memory-manager.js +0 -2
  354. package/dist/src/agent/memory/dreaming/config.js +0 -2
  355. package/dist/src/agent/memory/dreaming/constants.js +0 -2
  356. package/dist/src/agent/memory/dreaming/deep-promotion.js +0 -2
  357. package/dist/src/agent/memory/dreaming/events.js +0 -2
  358. package/dist/src/agent/memory/dreaming/last-run.js +0 -2
  359. package/dist/src/agent/memory/dreaming/light-sweep.js +0 -2
  360. package/dist/src/agent/memory/dreaming/preview.js +0 -2
  361. package/dist/src/agent/memory/dreaming/promotion-lifecycle.js +0 -2
  362. package/dist/src/agent/memory/dreaming/rem-patterns.js +0 -2
  363. package/dist/src/agent/memory/dreaming/scope.js +0 -2
  364. package/dist/src/agent/memory/dreaming/short-term-store.js +0 -2
  365. package/dist/src/agent/memory/dreaming/utils.js +0 -2
  366. package/dist/src/agent/memory/lifecycle.js +0 -2
  367. package/dist/src/agent/memory/manager.js +0 -2
  368. package/dist/src/agent/memory/memory-config.js +0 -2
  369. package/dist/src/agent/memory/message-sanitizer.js +0 -2
  370. package/dist/src/agent/memory/plugin-discovery.js +0 -2
  371. package/dist/src/agent/memory/sensitivity.js +0 -2
  372. package/dist/src/agent/memory/source-origin.js +0 -2
  373. package/dist/src/agent/memory/stub-memory-provider.js +0 -2
  374. package/dist/src/agent/memory/summary-generator.js +0 -2
  375. package/dist/src/agent/memory/understanding/correction.js +0 -2
  376. package/dist/src/agent/memory/understanding/quality.js +0 -2
  377. package/dist/src/agent/memory/understanding/service.js +0 -2
  378. package/dist/src/agent/memory/user-context-coordinator.js +0 -2
  379. package/dist/src/agent/memory/user-message-text.js +0 -2
  380. package/dist/src/agent/memory/window.js +0 -2
  381. package/dist/src/agent/messaging/command-handler.js +0 -2
  382. package/dist/src/agent/messaging/message-router.js +0 -2
  383. package/dist/src/agent/messaging/outbound-coordinator.js +0 -2
  384. package/dist/src/agent/messaging/stream-manager.js +0 -2
  385. package/dist/src/agent/middleware/context.js +0 -2
  386. package/dist/src/agent/middleware/self-verify.js +0 -2
  387. package/dist/src/agent/models/manager.js +0 -2
  388. package/dist/src/agent/models/request-limiter.js +0 -2
  389. package/dist/src/agent/models/selection.js +0 -2
  390. package/dist/src/agent/orchestration/agent-event-handler.js +0 -2
  391. package/dist/src/agent/orchestration/agent-orchestrator.js +0 -2
  392. package/dist/src/agent/orchestration/llm-turn-retry.js +0 -2
  393. package/dist/src/agent/orchestration/loop-guard.js +0 -2
  394. package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +0 -2
  395. package/dist/src/agent/prompt/cache-boundary.js +0 -2
  396. package/dist/src/agent/prompt/memory/index.js +0 -2
  397. package/dist/src/agent/prompt/safety.js +0 -2
  398. package/dist/src/agent/prompt/sanitize-for-prompt.js +0 -2
  399. package/dist/src/agent/prompt/sections/behavior.js +0 -2
  400. package/dist/src/agent/prompt/sections/memory-skills.js +0 -2
  401. package/dist/src/agent/prompt/sections/messaging-runtime.js +0 -2
  402. package/dist/src/agent/prompt/sections/project-context.js +0 -2
  403. package/dist/src/agent/prompt/sections/tooling.js +0 -2
  404. package/dist/src/agent/prompt/sections/workspace-runtime.js +0 -2
  405. package/dist/src/agent/prompt/service-prompt-builder.js +0 -2
  406. package/dist/src/agent/prompt/subagent-context.js +0 -2
  407. package/dist/src/agent/prompt/system-prompt-params.js +0 -2
  408. package/dist/src/agent/prompt/system-prompt.js +0 -2
  409. package/dist/src/agent/prompt/system-reminder.js +0 -2
  410. package/dist/src/agent/reply/apply-turn-user-enrichment.js +0 -2
  411. package/dist/src/agent/reply/post-compaction-context.js +0 -2
  412. package/dist/src/agent/reply/startup-context.js +0 -2
  413. package/dist/src/agent/reply/workspace-boundary-read.js +0 -2
  414. package/dist/src/agent/sandbox/command-validator.js +0 -2
  415. package/dist/src/agent/sandbox/exec-policy.js +0 -2
  416. package/dist/src/agent/sandbox/path-policy.js +0 -2
  417. package/dist/src/agent/sandbox/sanitize-env-vars.js +0 -2
  418. package/dist/src/agent/sandbox/types.js +0 -2
  419. package/dist/src/agent/service/async-queue.js +0 -2
  420. package/dist/src/agent/service/btw-query.js +0 -2
  421. package/dist/src/agent/service/build-direct-message-content.js +0 -2
  422. package/dist/src/agent/service/direct-turn-helpers.js +0 -2
  423. package/dist/src/agent/service/parse-outbound-session-key.js +0 -2
  424. package/dist/src/agent/service/process-direct-one-shot.js +0 -2
  425. package/dist/src/agent/service/process-direct-streaming.js +0 -2
  426. package/dist/src/agent/service/session-context-report.js +0 -2
  427. package/dist/src/agent/service/webchat-tts.js +0 -2
  428. package/dist/src/agent/service-inbound-utils.js +0 -2
  429. package/dist/src/agent/service.js +0 -2
  430. package/dist/src/agent/session/session-config-service.js +0 -2
  431. package/dist/src/agent/session/session-context.js +0 -2
  432. package/dist/src/agent/session/session-hydrator.js +0 -2
  433. package/dist/src/agent/session/session-inspector.js +0 -2
  434. package/dist/src/agent/session/session-lifecycle.js +0 -2
  435. package/dist/src/agent/session/session-state-bag.js +0 -2
  436. package/dist/src/agent/session/tracker.js +0 -2
  437. package/dist/src/agent/skills/config.js +0 -2
  438. package/dist/src/agent/skills/filesystem-watcher.js +0 -2
  439. package/dist/src/agent/skills/format-skills-prompt.js +0 -2
  440. package/dist/src/agent/skills/hub-hash.js +0 -2
  441. package/dist/src/agent/skills/hub-lock.js +0 -2
  442. package/dist/src/agent/skills/hub-pull.js +0 -2
  443. package/dist/src/agent/skills/index.js +0 -2
  444. package/dist/src/agent/skills/install-target.js +0 -2
  445. package/dist/src/agent/skills/installer.js +0 -2
  446. package/dist/src/agent/skills/managed-store.js +0 -2
  447. package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js +0 -2
  448. package/dist/src/agent/skills/marketplace/adapters/skillhub/adapter.js +0 -2
  449. package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +0 -2
  450. package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +0 -2
  451. package/dist/src/agent/skills/marketplace/marketplace-category-order.js +0 -2
  452. package/dist/src/agent/skills/marketplace/registry.js +0 -2
  453. package/dist/src/agent/skills/marketplace/resolve-adapter.js +0 -2
  454. package/dist/src/agent/skills/parse-skill-metadata.js +0 -2
  455. package/dist/src/agent/skills/required-env-vars.js +0 -2
  456. package/dist/src/agent/skills/scanner.js +0 -2
  457. package/dist/src/agent/skills/skill-manage-ops.js +0 -2
  458. package/dist/src/agent/skills/skill-manager.js +0 -2
  459. package/dist/src/agent/skills/skill-markdown-preview-from-raw.js +0 -2
  460. package/dist/src/agent/skills/skill-tool-gating.js +0 -2
  461. package/dist/src/agent/skills/skill-view-path.js +0 -2
  462. package/dist/src/agent/skills/skills-marketplace.js +0 -2
  463. package/dist/src/agent/skills/test-framework.js +0 -2
  464. package/dist/src/agent/skills/watcher.js +0 -2
  465. package/dist/src/agent/skills/workspace-skills-dir.js +0 -2
  466. package/dist/src/agent/source-context/injector.js +0 -2
  467. package/dist/src/agent/source-context/types.js +0 -2
  468. package/dist/src/agent/starter-agents.js +0 -2
  469. package/dist/src/agent/streaming/reasoning-visibility-sse.js +0 -2
  470. package/dist/src/agent/tool-manuals/browser.js +0 -2
  471. package/dist/src/agent/tool-manuals/index.js +0 -2
  472. package/dist/src/agent/tool-manuals/xopc-use.js +0 -2
  473. package/dist/src/agent/tools/apply-patch.js +0 -2
  474. package/dist/src/agent/tools/automation-tool.js +0 -2
  475. package/dist/src/agent/tools/browser/tool/browser-use-tool.js +0 -2
  476. package/dist/src/agent/tools/browser/tool/schemas.js +0 -2
  477. package/dist/src/agent/tools/chain-tracker.js +0 -2
  478. package/dist/src/agent/tools/clarify-tool.js +0 -2
  479. package/dist/src/agent/tools/cli-clarify.js +0 -2
  480. package/dist/src/agent/tools/communication.js +0 -2
  481. package/dist/src/agent/tools/composio-tool.js +0 -2
  482. package/dist/src/agent/tools/concurrency.js +0 -2
  483. package/dist/src/agent/tools/create-share-tool.js +0 -2
  484. package/dist/src/agent/tools/curated-memory-tool.js +0 -2
  485. package/dist/src/agent/tools/delegate-tool.js +0 -2
  486. package/dist/src/agent/tools/desktop-pet-tool.d.ts +12 -0
  487. package/dist/src/agent/tools/desktop-pet-tool.js +28 -2
  488. package/dist/src/agent/tools/dreaming-tool.js +0 -2
  489. package/dist/src/agent/tools/edit-diff.js +0 -2
  490. package/dist/src/agent/tools/error-pattern-matcher.js +0 -2
  491. package/dist/src/agent/tools/error-tracker.js +0 -2
  492. package/dist/src/agent/tools/exec-command.js +0 -2
  493. package/dist/src/agent/tools/execute-code-tool.js +0 -2
  494. package/dist/src/agent/tools/executor.js +0 -2
  495. package/dist/src/agent/tools/factory.js +0 -2
  496. package/dist/src/agent/tools/find.js +0 -2
  497. package/dist/src/agent/tools/goal-evidence-recorder.js +0 -2
  498. package/dist/src/agent/tools/goal-tool.js +0 -2
  499. package/dist/src/agent/tools/grep.js +0 -2
  500. package/dist/src/agent/tools/image-generate-tool.js +0 -2
  501. package/dist/src/agent/tools/image-tool.js +0 -2
  502. package/dist/src/agent/tools/list-dir.js +0 -2
  503. package/dist/src/agent/tools/media-read-tool.js +0 -2
  504. package/dist/src/agent/tools/memory-tool.js +0 -2
  505. package/dist/src/agent/tools/metadata.js +0 -2
  506. package/dist/src/agent/tools/read.js +0 -2
  507. package/dist/src/agent/tools/search/http.js +0 -2
  508. package/dist/src/agent/tools/search/providers/bing-api.js +0 -2
  509. package/dist/src/agent/tools/search/providers/bing-html.js +0 -2
  510. package/dist/src/agent/tools/search/providers/brave.js +0 -2
  511. package/dist/src/agent/tools/search/providers/duckduckgo-html.js +0 -2
  512. package/dist/src/agent/tools/search/providers/searxng.js +0 -2
  513. package/dist/src/agent/tools/search/providers/tavily.js +0 -2
  514. package/dist/src/agent/tools/search/region.js +0 -2
  515. package/dist/src/agent/tools/search/registry.js +0 -2
  516. package/dist/src/agent/tools/search/resolve-config.js +0 -2
  517. package/dist/src/agent/tools/send-media.js +0 -2
  518. package/dist/src/agent/tools/session-search-tool.js +0 -2
  519. package/dist/src/agent/tools/session-status-tool.js +0 -2
  520. package/dist/src/agent/tools/skill-install-tool.js +0 -2
  521. package/dist/src/agent/tools/skill-manage-tool.js +0 -2
  522. package/dist/src/agent/tools/skills-tools.js +0 -2
  523. package/dist/src/agent/tools/structured-output.js +0 -2
  524. package/dist/src/agent/tools/todo-tool.js +0 -2
  525. package/dist/src/agent/tools/tool-manual-tool.js +0 -2
  526. package/dist/src/agent/tools/tool-paths.js +0 -2
  527. package/dist/src/agent/tools/truncate.js +0 -2
  528. package/dist/src/agent/tools/tts-tool.js +0 -2
  529. package/dist/src/agent/tools/update-plan-tool.js +0 -2
  530. package/dist/src/agent/tools/url-safety.js +0 -2
  531. package/dist/src/agent/tools/usage-analyzer.js +0 -2
  532. package/dist/src/agent/tools/web-extract.js +0 -2
  533. package/dist/src/agent/tools/web.js +4 -4
  534. package/dist/src/agent/tools/workflow-tool.js +0 -2
  535. package/dist/src/agent/tools/write.js +0 -2
  536. package/dist/src/agent/tools/xopc-use-tool.js +0 -2
  537. package/dist/src/agent/transcript/google-api.js +0 -2
  538. package/dist/src/agent/transcript/model-selection.js +0 -2
  539. package/dist/src/agent/transcript/provider-capabilities.js +0 -2
  540. package/dist/src/agent/transcript/session-transcript-repair.js +0 -2
  541. package/dist/src/agent/transcript/strip-tool-messages.js +0 -2
  542. package/dist/src/agent/transcript/thinking-types.js +0 -2
  543. package/dist/src/agent/transcript/thinking.js +0 -2
  544. package/dist/src/agent/transcript/tool-call-id.js +0 -2
  545. package/dist/src/agent/transcript/transcript-hygiene.js +0 -2
  546. package/dist/src/agent/transcript/transcript-policy.js +0 -2
  547. package/dist/src/agent/workflow/agent-progress.js +0 -2
  548. package/dist/src/agent/workflow/builtins/index.js +0 -2
  549. package/dist/src/agent/workflow/catalog.js +0 -2
  550. package/dist/src/agent/workflow/progress-broker.js +0 -2
  551. package/dist/src/agent/workflow/snapshot-empty.js +0 -2
  552. package/dist/src/agent/workflow/snapshot.js +0 -2
  553. package/dist/src/agent/workflow/step-labels.js +0 -2
  554. package/dist/src/agent/workflow/structured-output-tool.js +0 -2
  555. package/dist/src/agent/workflow/subagent-runner.js +0 -2
  556. package/dist/src/agent/workflow/workflow-child-tools.js +0 -2
  557. package/dist/src/agent/workspace-runtime/registry.js +0 -2
  558. package/dist/src/agent-manifest/index.js +0 -2
  559. package/dist/src/agent-manifest/preset-chain.js +0 -2
  560. package/dist/src/agent-manifest/prompt.js +0 -2
  561. package/dist/src/agent-manifest/resolver.js +0 -2
  562. package/dist/src/agent-manifest/schema.js +0 -2
  563. package/dist/src/agent-manifest/validator.js +0 -2
  564. package/dist/src/agent-runtime/boundary-guard.js +0 -2
  565. package/dist/src/agent-runtime/memory-runtime.js +0 -2
  566. package/dist/src/agent-runtime/model-router.js +0 -2
  567. package/dist/src/agent-runtime/run-trace.js +0 -2
  568. package/dist/src/agent-runtime/runtime-profile.js +0 -2
  569. package/dist/src/agent-runtime/tool-registry.js +0 -2
  570. package/dist/src/agent-runtime/workflow-runtime.js +0 -2
  571. package/dist/src/ai-assist/text-assist.js +0 -2
  572. package/dist/src/auth/credentials.js +0 -2
  573. package/dist/src/auth/index.js +0 -2
  574. package/dist/src/auth/oauth/anthropic.js +0 -2
  575. package/dist/src/auth/oauth/github-copilot.js +0 -2
  576. package/dist/src/auth/oauth/google-oauth/google-antigravity.js +0 -2
  577. package/dist/src/auth/oauth/google-oauth/google-gemini-cli.js +0 -2
  578. package/dist/src/auth/oauth/google-oauth/oauth-page.js +0 -2
  579. package/dist/src/auth/oauth/google-oauth/pkce.js +0 -2
  580. package/dist/src/auth/oauth/kimi-coding.js +0 -2
  581. package/dist/src/auth/oauth/minimax-cn.js +0 -2
  582. package/dist/src/auth/oauth/minimax.js +0 -2
  583. package/dist/src/auth/oauth/openai-codex.js +0 -2
  584. package/dist/src/auth/oauth/pkce.js +0 -2
  585. package/dist/src/auth/profiles/oauth.js +0 -2
  586. package/dist/src/auth/profiles/order.js +0 -2
  587. package/dist/src/auth/profiles/profiles.js +0 -2
  588. package/dist/src/auth/profiles/store.js +0 -2
  589. package/dist/src/auth/sync-provider-auth.js +0 -2
  590. package/dist/src/automations/api/routes.js +0 -2
  591. package/dist/src/automations/domain/schedule.js +0 -2
  592. package/dist/src/automations/domain/validation.js +0 -2
  593. package/dist/src/automations/draft/automation-draft-prompt.js +0 -2
  594. package/dist/src/automations/draft/automation-draft-service.js +0 -2
  595. package/dist/src/automations/draft/automation-draft-validator.js +0 -2
  596. package/dist/src/automations/product-events.js +0 -2
  597. package/dist/src/automations/service/action-executor.js +0 -2
  598. package/dist/src/automations/service/automation-service.js +0 -2
  599. package/dist/src/automations/storage/automation-repository.js +0 -2
  600. package/dist/src/automations/storage/automation-run-repository.js +0 -2
  601. package/dist/src/browser/actions/extension-registry-bridge.js +0 -2
  602. package/dist/src/browser/actions/registry.js +0 -2
  603. package/dist/src/browser/backend-from-config.js +0 -2
  604. package/dist/src/browser/browser-command-timeout.js +0 -2
  605. package/dist/src/browser/cache-dir-policy.js +0 -2
  606. package/dist/src/browser/cdp-local-launcher.js +0 -2
  607. package/dist/src/browser/cdp-supervisor.js +0 -2
  608. package/dist/src/browser/free-port.js +0 -2
  609. package/dist/src/browser/humanize.js +0 -2
  610. package/dist/src/browser/install-lock.js +0 -2
  611. package/dist/src/browser/manager.js +0 -2
  612. package/dist/src/browser/pipeline/output.js +0 -2
  613. package/dist/src/browser/pipeline/runner.js +0 -2
  614. package/dist/src/browser/pipeline/schema.js +0 -2
  615. package/dist/src/browser/pipeline/source.js +0 -2
  616. package/dist/src/browser/pipeline/template.js +0 -2
  617. package/dist/src/browser/providers/browser-ext-install.js +0 -2
  618. package/dist/src/browser/providers/browser-use.js +0 -2
  619. package/dist/src/browser/providers/browserbase.js +0 -2
  620. package/dist/src/browser/providers/cloakbrowser.js +0 -2
  621. package/dist/src/browser/providers/extension-ws-acquire.js +0 -2
  622. package/dist/src/browser/providers/extension.js +0 -2
  623. package/dist/src/browser/providers/playwright-doctor.js +13 -4
  624. package/dist/src/browser/providers/playwright-install.js +0 -2
  625. package/dist/src/browser/readiness.js +0 -2
  626. package/dist/src/browser/schemas.js +0 -2
  627. package/dist/src/browser/session-lifecycle.js +0 -2
  628. package/dist/src/browser/snapshot-helpers.js +0 -2
  629. package/dist/src/browser/stealth.js +0 -2
  630. package/dist/src/browser/url-policy.js +0 -2
  631. package/dist/src/capabilities/store-connector.js +0 -2
  632. package/dist/src/channels/attachments/attachment-classifiers.js +0 -2
  633. package/dist/src/channels/attachments/inbound-persist.js +0 -2
  634. package/dist/src/channels/attachments/inbound-types.js +0 -2
  635. package/dist/src/channels/attachments/outbound-tts-persist.js +0 -2
  636. package/dist/src/channels/attachments/voice-stt-webchat.js +0 -2
  637. package/dist/src/channels/catalog/channel-catalog-service.js +0 -2
  638. package/dist/src/channels/config-helpers.js +0 -2
  639. package/dist/src/channels/envelope-timestamp.js +0 -2
  640. package/dist/src/channels/exec-approval-runtime.js +0 -2
  641. package/dist/src/channels/health-monitor.js +0 -2
  642. package/dist/src/channels/heartbeat-scheduler.js +0 -2
  643. package/dist/src/channels/internal-outbound.js +0 -2
  644. package/dist/src/channels/lifecycle-supervisor.js +0 -2
  645. package/dist/src/channels/manager.js +0 -2
  646. package/dist/src/channels/media.js +0 -2
  647. package/dist/src/channels/outbound/deliver.js +0 -2
  648. package/dist/src/channels/outbound/normalize.js +0 -2
  649. package/dist/src/channels/outbound/persist-store.js +0 -2
  650. package/dist/src/channels/outbound/queue.js +0 -2
  651. package/dist/src/channels/outbound-sender.js +0 -2
  652. package/dist/src/channels/pairing/allow-from-file.js +0 -2
  653. package/dist/src/channels/pairing/approve-cli.js +0 -2
  654. package/dist/src/channels/pairing/pairing-challenge.js +0 -2
  655. package/dist/src/channels/pairing/pairing-constants.js +0 -2
  656. package/dist/src/channels/pairing/pairing-events.js +0 -2
  657. package/dist/src/channels/pairing/pairing-messages.js +0 -2
  658. package/dist/src/channels/pairing/pairing-service.js +0 -2
  659. package/dist/src/channels/pairing/pairing-store-adapter.js +0 -2
  660. package/dist/src/channels/pairing/pairing-store.js +0 -2
  661. package/dist/src/channels/pairing/paths.js +0 -2
  662. package/dist/src/channels/pairing/preseed-allow-from.js +0 -2
  663. package/dist/src/channels/pipeline.js +0 -2
  664. package/dist/src/channels/plugin-registry.js +0 -2
  665. package/dist/src/channels/plugins/registry.js +0 -2
  666. package/dist/src/channels/restart-policy.js +0 -2
  667. package/dist/src/channels/security-helpers.js +0 -2
  668. package/dist/src/channels/security.js +0 -2
  669. package/dist/src/channels/setup-wizard-discovery.js +0 -2
  670. package/dist/src/chat-commands/agent-edit.js +0 -2
  671. package/dist/src/chat-commands/builtins/config.js +0 -2
  672. package/dist/src/chat-commands/builtins/context.js +0 -2
  673. package/dist/src/chat-commands/builtins/goal.js +0 -2
  674. package/dist/src/chat-commands/builtins/model.js +0 -2
  675. package/dist/src/chat-commands/builtins/review.js +0 -2
  676. package/dist/src/chat-commands/builtins/session.js +0 -2
  677. package/dist/src/chat-commands/builtins/skill.js +0 -2
  678. package/dist/src/chat-commands/builtins/subgoal.js +0 -2
  679. package/dist/src/chat-commands/builtins/system.js +0 -2
  680. package/dist/src/chat-commands/builtins/thinking.js +0 -2
  681. package/dist/src/chat-commands/builtins/tts.js +0 -2
  682. package/dist/src/chat-commands/builtins/workflow.js +0 -2
  683. package/dist/src/chat-commands/command-parse.js +0 -2
  684. package/dist/src/chat-commands/config-paths.js +0 -2
  685. package/dist/src/chat-commands/config-value.js +0 -2
  686. package/dist/src/chat-commands/context.js +0 -2
  687. package/dist/src/chat-commands/format-output.js +0 -2
  688. package/dist/src/chat-commands/index.js +0 -2
  689. package/dist/src/chat-commands/processor.js +0 -2
  690. package/dist/src/chat-commands/registry.js +0 -2
  691. package/dist/src/chat-commands/session-key.js +0 -2
  692. package/dist/src/cli/argv-invocation.js +0 -2
  693. package/dist/src/cli/argv.js +0 -2
  694. package/dist/src/cli/bin.js +0 -2
  695. package/dist/src/cli/cli-log-level-preset.js +0 -2
  696. package/dist/src/cli/command-catalog.js +0 -2
  697. package/dist/src/cli/command-loaders.js +0 -2
  698. package/dist/src/cli/command-manifest.js +0 -2
  699. package/dist/src/cli/command-path-matches.js +0 -2
  700. package/dist/src/cli/command-path-policy.js +0 -2
  701. package/dist/src/cli/command-startup-policy.js +0 -2
  702. package/dist/src/cli/commands/agent/interactive.js +0 -2
  703. package/dist/src/cli/commands/agent/sessions.js +0 -2
  704. package/dist/src/cli/commands/agent/stream-renderer.js +0 -2
  705. package/dist/src/cli/commands/agent.js +0 -2
  706. package/dist/src/cli/commands/agents.js +0 -2
  707. package/dist/src/cli/commands/auth.js +0 -2
  708. package/dist/src/cli/commands/browser-cli-helpers.js +0 -2
  709. package/dist/src/cli/commands/browser.js +0 -2
  710. package/dist/src/cli/commands/channels.js +0 -2
  711. package/dist/src/cli/commands/config.js +0 -2
  712. package/dist/src/cli/commands/connectors.js +0 -2
  713. package/dist/src/cli/commands/doctor/checks/channel-config.js +0 -2
  714. package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js +0 -2
  715. package/dist/src/cli/commands/doctor/checks/channel-plugins.js +0 -2
  716. package/dist/src/cli/commands/doctor/checks/config-health.js +0 -2
  717. package/dist/src/cli/commands/doctor/checks/database-schema.js +0 -2
  718. package/dist/src/cli/commands/doctor/checks/gateway-health.js +0 -2
  719. package/dist/src/cli/commands/doctor/checks/gateway-service.js +0 -2
  720. package/dist/src/cli/commands/doctor/checks/migrations.js +0 -2
  721. package/dist/src/cli/commands/doctor/checks/node-version.js +0 -2
  722. package/dist/src/cli/commands/doctor/checks/provider-auth.js +0 -2
  723. package/dist/src/cli/commands/doctor/checks/security-audit.js +0 -2
  724. package/dist/src/cli/commands/doctor/checks/session-integrity.js +0 -2
  725. package/dist/src/cli/commands/doctor/checks/state-integrity.js +0 -2
  726. package/dist/src/cli/commands/doctor/checks/version-check.js +0 -2
  727. package/dist/src/cli/commands/doctor/checks/workspace-status.js +0 -2
  728. package/dist/src/cli/commands/doctor/flow.js +0 -2
  729. package/dist/src/cli/commands/doctor/format.js +0 -2
  730. package/dist/src/cli/commands/doctor/index.js +0 -2
  731. package/dist/src/cli/commands/extension-create.js +0 -2
  732. package/dist/src/cli/commands/extension-dev.js +0 -2
  733. package/dist/src/cli/commands/extension-marketplace.js +0 -2
  734. package/dist/src/cli/commands/extension-pack.js +0 -2
  735. package/dist/src/cli/commands/extension.js +0 -2
  736. package/dist/src/cli/commands/gateway/call.js +0 -2
  737. package/dist/src/cli/commands/gateway/health.js +0 -2
  738. package/dist/src/cli/commands/gateway/lifecycle-core.js +0 -2
  739. package/dist/src/cli/commands/gateway/lifecycle.js +0 -2
  740. package/dist/src/cli/commands/gateway/logs.js +0 -2
  741. package/dist/src/cli/commands/gateway/probe.js +0 -2
  742. package/dist/src/cli/commands/gateway/restart-health.js +0 -2
  743. package/dist/src/cli/commands/gateway/restart.js +0 -2
  744. package/dist/src/cli/commands/gateway/run-foreground.js +0 -2
  745. package/dist/src/cli/commands/gateway/service.js +0 -2
  746. package/dist/src/cli/commands/gateway/shared.js +0 -2
  747. package/dist/src/cli/commands/gateway/status.js +0 -2
  748. package/dist/src/cli/commands/gateway/stop.js +0 -2
  749. package/dist/src/cli/commands/gateway/subcommands.js +0 -2
  750. package/dist/src/cli/commands/gateway/token.js +0 -2
  751. package/dist/src/cli/commands/gateway-ssh-tunnel.js +0 -2
  752. package/dist/src/cli/commands/gateway.js +0 -2
  753. package/dist/src/cli/commands/goal.js +0 -2
  754. package/dist/src/cli/commands/image.js +0 -2
  755. package/dist/src/cli/commands/init.js +0 -2
  756. package/dist/src/cli/commands/logs.js +0 -2
  757. package/dist/src/cli/commands/models.js +0 -2
  758. package/dist/src/cli/commands/onboard/channels/index.js +0 -2
  759. package/dist/src/cli/commands/onboard/channels/onboard-to-configurator.js +0 -2
  760. package/dist/src/cli/commands/onboard/channels/registry.js +0 -2
  761. package/dist/src/cli/commands/onboard/channels/wizard-to-configurator.js +0 -2
  762. package/dist/src/cli/commands/onboard/gateway.js +0 -2
  763. package/dist/src/cli/commands/onboard/model.js +0 -2
  764. package/dist/src/cli/commands/onboard.js +0 -2
  765. package/dist/src/cli/commands/profile.js +0 -2
  766. package/dist/src/cli/commands/project.js +0 -2
  767. package/dist/src/cli/commands/providers.js +0 -2
  768. package/dist/src/cli/commands/resume.js +0 -2
  769. package/dist/src/cli/commands/search.js +0 -2
  770. package/dist/src/cli/commands/session/actions.js +0 -2
  771. package/dist/src/cli/commands/session/utils.js +0 -2
  772. package/dist/src/cli/commands/session.js +0 -2
  773. package/dist/src/cli/commands/setup-shared/output.js +0 -2
  774. package/dist/src/cli/commands/setup-shared/prompts.js +0 -2
  775. package/dist/src/cli/commands/setup-shared/runner.js +0 -2
  776. package/dist/src/cli/commands/setup-shared/types.js +0 -2
  777. package/dist/src/cli/commands/setup.js +0 -2
  778. package/dist/src/cli/commands/skills-test.js +0 -2
  779. package/dist/src/cli/commands/skills.js +0 -2
  780. package/dist/src/cli/commands/tailscale.js +0 -2
  781. package/dist/src/cli/commands/tui-runner.js +0 -2
  782. package/dist/src/cli/commands/tui.js +0 -2
  783. package/dist/src/cli/commands/tunnel.js +0 -2
  784. package/dist/src/cli/commands/update.js +0 -2
  785. package/dist/src/cli/commands/voice.js +0 -2
  786. package/dist/src/cli/context.js +0 -2
  787. package/dist/src/cli/extension-cli-register.js +0 -2
  788. package/dist/src/cli/gateway-run-argv.js +0 -2
  789. package/dist/src/cli/gateway-run-fast-path.js +0 -2
  790. package/dist/src/cli/index.js +0 -2
  791. package/dist/src/cli/registry.js +0 -2
  792. package/dist/src/cli/templates.js +0 -2
  793. package/dist/src/cli/utils/colors.js +0 -2
  794. package/dist/src/cli/utils/gateway-client-options.js +0 -2
  795. package/dist/src/cli/utils/gateway-client.js +0 -2
  796. package/dist/src/cli/utils/init-workspace-core.js +0 -2
  797. package/dist/src/cli/utils/init-workspace.js +0 -2
  798. package/dist/src/cli/utils/oauth-login.js +0 -2
  799. package/dist/src/cli/utils/oauth-providers.js +0 -2
  800. package/dist/src/cli/utils/session.js +0 -2
  801. package/dist/src/commands/agents.config.js +0 -2
  802. package/dist/src/config/agent-profile.js +0 -2
  803. package/dist/src/config/agent-typed-models.js +0 -2
  804. package/dist/src/config/commands.flags.js +0 -2
  805. package/dist/src/config/default-model.js +0 -2
  806. package/dist/src/config/diff.js +0 -2
  807. package/dist/src/config/gateway-bind.js +0 -2
  808. package/dist/src/config/index.js +0 -2
  809. package/dist/src/config/loader.js +0 -2
  810. package/dist/src/config/mcp-config-normalize.js +0 -2
  811. package/dist/src/config/model-input.js +0 -2
  812. package/dist/src/config/models-json.js +0 -2
  813. package/dist/src/config/paths-state.js +0 -2
  814. package/dist/src/config/paths.js +0 -2
  815. package/dist/src/config/profile.js +0 -2
  816. package/dist/src/config/public-url.js +0 -2
  817. package/dist/src/config/reload.js +0 -2
  818. package/dist/src/config/resolve-config-value.js +0 -2
  819. package/dist/src/config/rules.js +0 -2
  820. package/dist/src/config/runtime-overrides.js +0 -2
  821. package/dist/src/config/schema.js +0 -2
  822. package/dist/src/config/validate-channel-configs.js +0 -2
  823. package/dist/src/config/voice.js +0 -2
  824. package/dist/src/config/web-patch.js +0 -2
  825. package/dist/src/config/workspace-defaults.js +0 -2
  826. package/dist/src/config/workspace-dirs.js +0 -2
  827. package/dist/src/config/workspace-path-helpers.js +0 -2
  828. package/dist/src/config/workspace-path.js +0 -2
  829. package/dist/src/connectors/approval.js +0 -2
  830. package/dist/src/connectors/auth-provider-registry.js +0 -2
  831. package/dist/src/connectors/builtin-catalog.js +0 -2
  832. package/dist/src/connectors/catalog.js +0 -2
  833. package/dist/src/connectors/composio-catalog.js +0 -2
  834. package/dist/src/connectors/composio-logo.js +0 -2
  835. package/dist/src/connectors/composio-sessions.js +9 -5
  836. package/dist/src/connectors/composio-triggers.js +0 -2
  837. package/dist/src/connectors/composio.js +0 -2
  838. package/dist/src/connectors/connector-memory-sync.js +0 -2
  839. package/dist/src/connectors/health.js +0 -2
  840. package/dist/src/connectors/install.js +0 -2
  841. package/dist/src/connectors/instances.js +0 -2
  842. package/dist/src/connectors/integration-strategy.js +0 -2
  843. package/dist/src/connectors/lifecycle.js +0 -2
  844. package/dist/src/connectors/materialize.js +0 -2
  845. package/dist/src/connectors/policy.js +0 -2
  846. package/dist/src/connectors/providers.js +0 -2
  847. package/dist/src/connectors/registries/modelscope.js +0 -2
  848. package/dist/src/connectors/registries/official-mcp.js +0 -2
  849. package/dist/src/connectors/registries/search.js +0 -2
  850. package/dist/src/connectors/registries/smithery.js +0 -2
  851. package/dist/src/connectors/runtime-adapter-registry.js +0 -2
  852. package/dist/src/connectors/secret-store.js +0 -2
  853. package/dist/src/connectors/setup-secrets.js +0 -2
  854. package/dist/src/connectors/supervisor.js +0 -2
  855. package/dist/src/connectors/usage.js +0 -2
  856. package/dist/src/connectors/workflow-preflight.js +0 -2
  857. package/dist/src/daemon/constants.js +0 -2
  858. package/dist/src/daemon/install-plan.js +0 -2
  859. package/dist/src/daemon/launchd.js +0 -2
  860. package/dist/src/daemon/schtasks.js +0 -2
  861. package/dist/src/daemon/service-audit.js +0 -2
  862. package/dist/src/daemon/service.js +0 -2
  863. package/dist/src/daemon/systemd.js +0 -2
  864. package/dist/src/document-understanding/extract.js +0 -2
  865. package/dist/src/errors/index.js +0 -2
  866. package/dist/src/extensions/activation-context.js +0 -2
  867. package/dist/src/extensions/activation-planner.js +0 -2
  868. package/dist/src/extensions/api.js +0 -2
  869. package/dist/src/extensions/bundle-mcp.js +0 -2
  870. package/dist/src/extensions/bundled-extension-activation.js +0 -2
  871. package/dist/src/extensions/diagnostics.js +0 -2
  872. package/dist/src/extensions/discover-extensions.js +0 -2
  873. package/dist/src/extensions/engine-check.js +0 -2
  874. package/dist/src/extensions/extension-metadata-snapshot.js +0 -2
  875. package/dist/src/extensions/extension-registry-impl.js +0 -2
  876. package/dist/src/extensions/health.js +0 -2
  877. package/dist/src/extensions/hooks.js +0 -2
  878. package/dist/src/extensions/index.js +0 -2
  879. package/dist/src/extensions/install-transaction.js +0 -2
  880. package/dist/src/extensions/install.js +0 -2
  881. package/dist/src/extensions/loader.js +0 -2
  882. package/dist/src/extensions/lockfile.js +0 -2
  883. package/dist/src/extensions/manifest-registry.js +0 -2
  884. package/dist/src/extensions/marketplace.js +0 -2
  885. package/dist/src/extensions/media-provider-contracts.js +0 -2
  886. package/dist/src/extensions/normalize-manifest.js +0 -2
  887. package/dist/src/extensions/onboard-helpers.js +0 -2
  888. package/dist/src/extensions/package-contract.js +0 -2
  889. package/dist/src/extensions/sdk/channel-entry.js +0 -2
  890. package/dist/src/extensions/sdk/channel-helpers.js +0 -2
  891. package/dist/src/extensions/sdk/index.js +0 -2
  892. package/dist/src/extensions/sdk/lazy.js +0 -2
  893. package/dist/src/extensions/sdk/testing.js +0 -2
  894. package/dist/src/extensions/security.js +0 -2
  895. package/dist/src/extensions/slots.js +0 -2
  896. package/dist/src/extensions/speech-provider-contracts.js +0 -2
  897. package/dist/src/extensions/store-zip-limits.js +0 -2
  898. package/dist/src/extensions/typed-event-bus.js +0 -2
  899. package/dist/src/extensions/types/hooks.js +0 -2
  900. package/dist/src/extensions/types/providers.js +0 -2
  901. package/dist/src/extensions/update.js +0 -2
  902. package/dist/src/extensions/when-context.js +0 -2
  903. package/dist/src/extensions/when-expression.js +0 -2
  904. package/dist/src/gateway/agent-builtin-tools.js +0 -2
  905. package/dist/src/gateway/agent-run-relay.js +0 -2
  906. package/dist/src/gateway/agents-admin.js +0 -2
  907. package/dist/src/gateway/auth.js +0 -2
  908. package/dist/src/gateway/capability-presets-admin.js +0 -2
  909. package/dist/src/gateway/chat-limits.js +0 -2
  910. package/dist/src/gateway/chat-stream/mapper.js +28 -14
  911. package/dist/src/gateway/chat-stream/pet-feedback.d.ts +13 -0
  912. package/dist/src/gateway/chat-stream/pet-feedback.js +45 -0
  913. package/dist/src/gateway/chat-stream/protocol.d.ts +26 -0
  914. package/dist/src/gateway/clarify-bridge.js +3 -3
  915. package/dist/src/gateway/clarify-runtime.js +0 -2
  916. package/dist/src/gateway/client-ip.js +0 -2
  917. package/dist/src/gateway/config-tools-web.js +0 -2
  918. package/dist/src/gateway/credential.js +0 -2
  919. package/dist/src/gateway/discovery/mdns.js +0 -2
  920. package/dist/src/gateway/dreaming-automation-reconciler.js +0 -2
  921. package/dist/src/gateway/ensure-network-cors.js +0 -2
  922. package/dist/src/gateway/file-path-classifier.js +0 -2
  923. package/dist/src/gateway/file-reference-registry.js +0 -2
  924. package/dist/src/gateway/global-defaults-admin.js +0 -2
  925. package/dist/src/gateway/heartbeat/service.js +0 -2
  926. package/dist/src/gateway/hono/app.js +0 -2
  927. package/dist/src/gateway/hono/lib/agent-model.js +0 -2
  928. package/dist/src/gateway/hono/lib/config-payload.js +0 -2
  929. package/dist/src/gateway/hono/lib/extension-assets.js +0 -2
  930. package/dist/src/gateway/hono/lib/extension-store.js +0 -2
  931. package/dist/src/gateway/hono/lib/mask-secret-length.js +0 -2
  932. package/dist/src/gateway/hono/lib/route-logger.js +0 -2
  933. package/dist/src/gateway/hono/lib/safe-providers-config.js +0 -2
  934. package/dist/src/gateway/hono/lib/safe-voice-config.js +0 -2
  935. package/dist/src/gateway/hono/lib/startup-unavailable.js +0 -2
  936. package/dist/src/gateway/hono/lib/static-ui.js +0 -2
  937. package/dist/src/gateway/hono/middleware/auth.js +0 -2
  938. package/dist/src/gateway/hono/middleware/log-context.js +0 -2
  939. package/dist/src/gateway/hono/middleware/logger.js +0 -2
  940. package/dist/src/gateway/hono/middleware/route-errors.js +0 -2
  941. package/dist/src/gateway/hono/middleware/scopes.js +0 -2
  942. package/dist/src/gateway/hono/middleware/strict-rate-limit.js +0 -2
  943. package/dist/src/gateway/hono/oauth-async.js +0 -2
  944. package/dist/src/gateway/hono/oauth.js +0 -2
  945. package/dist/src/gateway/hono/routes/activity.js +0 -2
  946. package/dist/src/gateway/hono/routes/agent-stream.js +0 -2
  947. package/dist/src/gateway/hono/routes/agents.js +0 -2
  948. package/dist/src/gateway/hono/routes/ai-assist.js +0 -2
  949. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +0 -2
  950. package/dist/src/gateway/hono/routes/browser-install.js +0 -2
  951. package/dist/src/gateway/hono/routes/browser.js +0 -2
  952. package/dist/src/gateway/hono/routes/capabilities.js +0 -2
  953. package/dist/src/gateway/hono/routes/capability-presets.js +0 -2
  954. package/dist/src/gateway/hono/routes/channels.js +0 -2
  955. package/dist/src/gateway/hono/routes/commands-skills.js +0 -2
  956. package/dist/src/gateway/hono/routes/config-patch/agents.js +0 -2
  957. package/dist/src/gateway/hono/routes/config-patch/channels.js +0 -2
  958. package/dist/src/gateway/hono/routes/config-patch/gateway.js +0 -2
  959. package/dist/src/gateway/hono/routes/config-patch/misc.js +0 -2
  960. package/dist/src/gateway/hono/routes/config-patch/result.js +0 -2
  961. package/dist/src/gateway/hono/routes/config.js +0 -2
  962. package/dist/src/gateway/hono/routes/connectors.js +0 -2
  963. package/dist/src/gateway/hono/routes/doctor.js +0 -2
  964. package/dist/src/gateway/hono/routes/dreaming.js +0 -2
  965. package/dist/src/gateway/hono/routes/exposure.js +0 -2
  966. package/dist/src/gateway/hono/routes/extension-gateway.js +0 -2
  967. package/dist/src/gateway/hono/routes/global-defaults.js +0 -2
  968. package/dist/src/gateway/hono/routes/goals.js +0 -2
  969. package/dist/src/gateway/hono/routes/home.js +0 -2
  970. package/dist/src/gateway/hono/routes/host-fs.js +0 -2
  971. package/dist/src/gateway/hono/routes/index.js +0 -2
  972. package/dist/src/gateway/hono/routes/lazy-bundles.js +0 -2
  973. package/dist/src/gateway/hono/routes/lazy-fallback.js +0 -2
  974. package/dist/src/gateway/hono/routes/local-apps.js +0 -2
  975. package/dist/src/gateway/hono/routes/logs.js +0 -2
  976. package/dist/src/gateway/hono/routes/mcp.js +0 -2
  977. package/dist/src/gateway/hono/routes/media.js +0 -2
  978. package/dist/src/gateway/hono/routes/memory.js +0 -2
  979. package/dist/src/gateway/hono/routes/migrations.js +0 -2
  980. package/dist/src/gateway/hono/routes/mobile.js +0 -2
  981. package/dist/src/gateway/hono/routes/models.js +0 -2
  982. package/dist/src/gateway/hono/routes/notes.js +3 -3
  983. package/dist/src/gateway/hono/routes/projects.js +0 -2
  984. package/dist/src/gateway/hono/routes/public-gateway.js +0 -2
  985. package/dist/src/gateway/hono/routes/search.js +0 -2
  986. package/dist/src/gateway/hono/routes/sessions.js +0 -2
  987. package/dist/src/gateway/hono/routes/shares.js +0 -2
  988. package/dist/src/gateway/hono/routes/site-shares.js +0 -2
  989. package/dist/src/gateway/hono/routes/status.js +0 -2
  990. package/dist/src/gateway/hono/routes/tui.js +0 -2
  991. package/dist/src/gateway/hono/routes/tunnel.js +0 -2
  992. package/dist/src/gateway/hono/routes/update.js +0 -2
  993. package/dist/src/gateway/hono/routes/voice.js +0 -2
  994. package/dist/src/gateway/hono/routes/work-discovery.js +0 -2
  995. package/dist/src/gateway/hono/routes/workflows.js +0 -2
  996. package/dist/src/gateway/hono/routes/workspace.js +0 -2
  997. package/dist/src/gateway/hono/routes/you.js +0 -2
  998. package/dist/src/gateway/hono/sse-json.js +0 -2
  999. package/dist/src/gateway/hono/sse.js +0 -2
  1000. package/dist/src/gateway/host.js +0 -2
  1001. package/dist/src/gateway/image-capabilities.js +0 -2
  1002. package/dist/src/gateway/listen.js +0 -2
  1003. package/dist/src/gateway/lock.js +0 -2
  1004. package/dist/src/gateway/ports.js +0 -2
  1005. package/dist/src/gateway/protocol.js +0 -2
  1006. package/dist/src/gateway/public-url.js +0 -2
  1007. package/dist/src/gateway/rate-limit/auth-policy.js +0 -2
  1008. package/dist/src/gateway/rate-limit/buckets.js +0 -2
  1009. package/dist/src/gateway/rate-limit/env-flags.js +0 -2
  1010. package/dist/src/gateway/resolve-channel-connect-defer.js +0 -2
  1011. package/dist/src/gateway/resolve-webchat-session-key.js +0 -2
  1012. package/dist/src/gateway/respawn.js +0 -2
  1013. package/dist/src/gateway/run-loop.js +0 -2
  1014. package/dist/src/gateway/runtime-config.js +0 -2
  1015. package/dist/src/gateway/security/audit.js +0 -2
  1016. package/dist/src/gateway/security/csp.js +0 -2
  1017. package/dist/src/gateway/security/dangerous-tools.js +0 -2
  1018. package/dist/src/gateway/security/external-content.js +0 -2
  1019. package/dist/src/gateway/security/known-weak-secrets.js +0 -2
  1020. package/dist/src/gateway/security/loopback.js +0 -2
  1021. package/dist/src/gateway/security/operator-scopes.js +0 -2
  1022. package/dist/src/gateway/security/origin-check.js +0 -2
  1023. package/dist/src/gateway/security/preauth-connection-budget.js +0 -2
  1024. package/dist/src/gateway/security/secret-equal.js +0 -2
  1025. package/dist/src/gateway/server-tailscale.js +0 -2
  1026. package/dist/src/gateway/server.js +0 -2
  1027. package/dist/src/gateway/service/agent-runner.js +0 -2
  1028. package/dist/src/gateway/service/config-coordinator.js +0 -2
  1029. package/dist/src/gateway/service/marketplace-service.js +0 -2
  1030. package/dist/src/gateway/service/run-gateway-agent.js +0 -2
  1031. package/dist/src/gateway/service/session-chat-ids.js +0 -2
  1032. package/dist/src/gateway/service/sessions-api.js +0 -2
  1033. package/dist/src/gateway/service/sse-hub.js +0 -2
  1034. package/dist/src/gateway/service.js +0 -2
  1035. package/dist/src/gateway/session-reset-service.js +0 -2
  1036. package/dist/src/gateway/startup-readiness.js +0 -2
  1037. package/dist/src/gateway/startup-trace.js +0 -2
  1038. package/dist/src/gateway/tailscale-auth.js +0 -2
  1039. package/dist/src/gateway/tailscale-lifecycle.js +0 -2
  1040. package/dist/src/gateway/tls-server.js +0 -2
  1041. package/dist/src/gateway/trusted-proxy.js +0 -2
  1042. package/dist/src/gateway/user-turn-input.js +0 -2
  1043. package/dist/src/gateway/workspace-editor-path.js +0 -2
  1044. package/dist/src/gateway/workspace-file-search.js +0 -2
  1045. package/dist/src/gateway/workspace-fs-file-list.js +0 -2
  1046. package/dist/src/gateway/workspace-heartbeat-path.js +0 -2
  1047. package/dist/src/gateway/workspace-ripgrep.js +0 -2
  1048. package/dist/src/gateway/ws-security.js +0 -2
  1049. package/dist/src/generated/bundled-image-generation-providers.js +0 -2
  1050. package/dist/src/goals/goal-contract-draft.js +0 -2
  1051. package/dist/src/goals/goal-evidence-review.js +0 -2
  1052. package/dist/src/goals/goal-notifications.js +0 -2
  1053. package/dist/src/goals/goal-queue-store.js +0 -2
  1054. package/dist/src/goals/goal-runner.js +0 -2
  1055. package/dist/src/goals/goal-service.js +0 -2
  1056. package/dist/src/goals/goal-store.js +0 -2
  1057. package/dist/src/goals/goal-workflow-judge.js +0 -2
  1058. package/dist/src/heartbeat/active-hours.js +0 -2
  1059. package/dist/src/heartbeat/content-check.js +0 -2
  1060. package/dist/src/heartbeat/event-prompt.js +0 -2
  1061. package/dist/src/heartbeat/tokens.js +0 -2
  1062. package/dist/src/heartbeat/wake.js +0 -2
  1063. package/dist/src/i18n/format.js +0 -2
  1064. package/dist/src/i18n/goals-bundle.js +0 -2
  1065. package/dist/src/i18n/locale.js +0 -2
  1066. package/dist/src/i18n/locales/goals.en.js +0 -2
  1067. package/dist/src/i18n/locales/goals.zh.js +0 -2
  1068. package/dist/src/i18n/locales/share-tool.en.js +0 -2
  1069. package/dist/src/i18n/locales/share-tool.zh.js +0 -2
  1070. package/dist/src/i18n/share-tool-bundle.js +0 -2
  1071. package/dist/src/index.js +0 -2
  1072. package/dist/src/infra/brew.js +0 -2
  1073. package/dist/src/infra/bus/queue.js +0 -2
  1074. package/dist/src/infra/debounce.js +0 -2
  1075. package/dist/src/infra/exec.js +0 -2
  1076. package/dist/src/infra/gateway-process-argv.js +0 -2
  1077. package/dist/src/infra/gateway-processes.js +0 -2
  1078. package/dist/src/infra/host-env-security-policy.js +0 -2
  1079. package/dist/src/infra/host-env-security.js +0 -2
  1080. package/dist/src/infra/http-proxy-env.js +0 -2
  1081. package/dist/src/infra/is-main.js +0 -2
  1082. package/dist/src/infra/json-utf8-bytes.js +0 -2
  1083. package/dist/src/infra/node-sqlite.js +0 -2
  1084. package/dist/src/infra/package-json.js +0 -2
  1085. package/dist/src/infra/package-update-steps.js +0 -2
  1086. package/dist/src/infra/path-env.js +0 -2
  1087. package/dist/src/infra/path-prepend.js +0 -2
  1088. package/dist/src/infra/ports.js +0 -2
  1089. package/dist/src/infra/rate-limit/failure-limiter.js +0 -2
  1090. package/dist/src/infra/rate-limit/keyed-store.js +0 -2
  1091. package/dist/src/infra/rate-limit/rate-limiter.js +0 -2
  1092. package/dist/src/infra/restart.js +0 -2
  1093. package/dist/src/infra/retry.js +0 -2
  1094. package/dist/src/infra/run-command.js +0 -2
  1095. package/dist/src/infra/sqlite-errors.js +0 -2
  1096. package/dist/src/infra/ssh-tunnel.js +0 -2
  1097. package/dist/src/infra/stable-node-path.js +0 -2
  1098. package/dist/src/infra/tailscale.js +0 -2
  1099. package/dist/src/infra/undici-fetch.js +0 -2
  1100. package/dist/src/infra/unhandled-rejections.js +0 -2
  1101. package/dist/src/infra/update-channels.js +0 -2
  1102. package/dist/src/infra/update-check.js +0 -2
  1103. package/dist/src/infra/update-global.js +0 -2
  1104. package/dist/src/infra/update-lock.js +0 -2
  1105. package/dist/src/infra/update-log.js +0 -2
  1106. package/dist/src/infra/update-restart.js +0 -2
  1107. package/dist/src/infra/update-runner.js +0 -2
  1108. package/dist/src/infra/update-startup.js +0 -2
  1109. package/dist/src/infra/warning-filter.js +0 -2
  1110. package/dist/src/infra/write-file-atomic.js +0 -2
  1111. package/dist/src/knowledge/connected-knowledge-pipeline.js +0 -2
  1112. package/dist/src/knowledge/coordinator.js +0 -2
  1113. package/dist/src/knowledge/ingestion-service.js +0 -2
  1114. package/dist/src/local-apps/acceptance.js +0 -2
  1115. package/dist/src/local-apps/preview-runtime-bridge.js +0 -2
  1116. package/dist/src/local-apps/runtime-entry.js +0 -2
  1117. package/dist/src/local-apps/scaffold.js +0 -2
  1118. package/dist/src/local-apps/service.js +0 -2
  1119. package/dist/src/local-apps/store.js +0 -2
  1120. package/dist/src/markdown/chunk.js +0 -2
  1121. package/dist/src/markdown/code-spans.js +0 -2
  1122. package/dist/src/markdown/fences.js +0 -2
  1123. package/dist/src/markdown/frontmatter.js +0 -2
  1124. package/dist/src/markdown/ir.js +0 -2
  1125. package/dist/src/markdown/render.js +0 -2
  1126. package/dist/src/markdown/tables.js +0 -2
  1127. package/dist/src/mcp/channel-bridge.js +0 -2
  1128. package/dist/src/mcp/channel-server.js +0 -2
  1129. package/dist/src/mcp/channel-shared.js +0 -2
  1130. package/dist/src/mcp/channel-tools.js +0 -2
  1131. package/dist/src/mcp/gateway-http-client.js +0 -2
  1132. package/dist/src/media/media-reference.js +0 -2
  1133. package/dist/src/media/paths.js +0 -2
  1134. package/dist/src/media/session-references.js +0 -2
  1135. package/dist/src/media/store.js +0 -2
  1136. package/dist/src/media/uri.js +0 -2
  1137. package/dist/src/media-shared/http/api-key-rotation.js +0 -2
  1138. package/dist/src/media-shared/http/deadline.js +0 -2
  1139. package/dist/src/media-shared/http/private-network.js +0 -2
  1140. package/dist/src/media-shared/http/provider-http-errors.js +0 -2
  1141. package/dist/src/media-shared/http/provider-http.js +0 -2
  1142. package/dist/src/media-shared/http/resolve-provider-http-request-config.js +0 -2
  1143. package/dist/src/media-shared/http/ssrf-guard.js +0 -2
  1144. package/dist/src/media-shared/http/test-helpers/mock-server.js +0 -2
  1145. package/dist/src/media-understanding/audio-transcription-runner.js +0 -2
  1146. package/dist/src/media-understanding/openai-compatible-audio.js +0 -2
  1147. package/dist/src/media-understanding/registry.js +0 -2
  1148. package/dist/src/media-understanding/resolve-entries.js +0 -2
  1149. package/dist/src/media-understanding/runner.js +0 -2
  1150. package/dist/src/migrations/config/default-capability-preset.js +0 -2
  1151. package/dist/src/migrations/registry.js +0 -2
  1152. package/dist/src/migrations/runner.js +0 -2
  1153. package/dist/src/mobile/notification-service.js +0 -2
  1154. package/dist/src/mobile/notification-store.js +0 -2
  1155. package/dist/src/mobile/notification-types.js +0 -2
  1156. package/dist/src/notes/agent-context.js +0 -2
  1157. package/dist/src/notes/attachment-ref.js +0 -2
  1158. package/dist/src/notes/note-attachment-sync.js +0 -2
  1159. package/dist/src/notes/note-index-meta.js +0 -2
  1160. package/dist/src/notes/note-markdown.js +0 -2
  1161. package/dist/src/notes/paths.js +0 -2
  1162. package/dist/src/notes/service.d.ts +3 -1
  1163. package/dist/src/notes/service.js +19 -5
  1164. package/dist/src/notes/store.js +0 -2
  1165. package/dist/src/package-version.js +0 -2
  1166. package/dist/src/pets/factory.d.ts +13 -0
  1167. package/dist/src/pets/factory.js +23 -2
  1168. package/dist/src/pets/manifest.js +0 -2
  1169. package/dist/src/pets/validator.js +0 -2
  1170. package/dist/src/process/kill-tree.js +0 -2
  1171. package/dist/src/project-trust/trust-store.js +0 -2
  1172. package/dist/src/projects/automation-bind.js +0 -2
  1173. package/dist/src/projects/goal-bind.js +0 -2
  1174. package/dist/src/projects/memory-bind.js +0 -2
  1175. package/dist/src/projects/project-agent-suggestion.js +0 -2
  1176. package/dist/src/projects/project-agent.js +0 -2
  1177. package/dist/src/projects/project-kind.js +0 -2
  1178. package/dist/src/projects/project-loop.js +0 -2
  1179. package/dist/src/projects/project-service.js +0 -2
  1180. package/dist/src/projects/project-store.js +0 -2
  1181. package/dist/src/projects/session-bind.js +0 -2
  1182. package/dist/src/projects/workflow-bind.js +0 -2
  1183. package/dist/src/projects/workspace-project.js +0 -2
  1184. package/dist/src/projects/workspace.js +0 -2
  1185. package/dist/src/providers/auth-runtime/auth-profile-store.js +0 -2
  1186. package/dist/src/providers/auth-runtime/is-configured.js +0 -2
  1187. package/dist/src/providers/auth-runtime/oauth.js +0 -2
  1188. package/dist/src/providers/auth-runtime/resolve-api-key.js +0 -2
  1189. package/dist/src/providers/auth-runtime/resolve-auth.js +0 -2
  1190. package/dist/src/providers/constants.js +0 -2
  1191. package/dist/src/providers/domestic-presets.js +0 -2
  1192. package/dist/src/providers/env-keys.js +0 -2
  1193. package/dist/src/providers/extension-stream-bridge.js +0 -2
  1194. package/dist/src/providers/index.js +0 -2
  1195. package/dist/src/providers/model-call.js +0 -2
  1196. package/dist/src/providers/model-discovery.js +0 -2
  1197. package/dist/src/providers/model-registry.js +0 -2
  1198. package/dist/src/providers/model-supplements.js +0 -2
  1199. package/dist/src/providers/plugin-registry.js +0 -2
  1200. package/dist/src/providers/presentation.js +0 -2
  1201. package/dist/src/remote-access/exposure-guards.js +0 -2
  1202. package/dist/src/remote-access/exposure-manager.js +0 -2
  1203. package/dist/src/review/review-git.js +0 -2
  1204. package/dist/src/review/review-types.js +0 -2
  1205. package/dist/src/routing/account-id.js +0 -2
  1206. package/dist/src/routing/agent-session-key.js +0 -2
  1207. package/dist/src/routing/bindings.js +0 -2
  1208. package/dist/src/routing/index.js +0 -2
  1209. package/dist/src/routing/resolve-route.js +0 -2
  1210. package/dist/src/routing/resolve-tui-session-key.js +0 -2
  1211. package/dist/src/routing/session-key-utils.js +0 -2
  1212. package/dist/src/routing/session-key.js +0 -2
  1213. package/dist/src/session/abort-cutoff.js +0 -2
  1214. package/dist/src/session/chat-export.js +0 -2
  1215. package/dist/src/session/client-history.js +0 -2
  1216. package/dist/src/session/compaction-checkpoints.js +0 -2
  1217. package/dist/src/session/config-store.js +0 -2
  1218. package/dist/src/session/init-session-turn.js +0 -2
  1219. package/dist/src/session/lifecycle-timestamps.js +0 -2
  1220. package/dist/src/session/load-jsonl-entries.js +0 -2
  1221. package/dist/src/session/manager.js +0 -2
  1222. package/dist/src/session/patch-metadata.js +0 -2
  1223. package/dist/src/session/reset-policy.js +0 -2
  1224. package/dist/src/session/reset-triggers.js +0 -2
  1225. package/dist/src/session/reset-type.js +0 -2
  1226. package/dist/src/session/resolve-session.js +0 -2
  1227. package/dist/src/session/session-context-for-llm.js +0 -2
  1228. package/dist/src/session/session-id.js +0 -2
  1229. package/dist/src/session/session-title.js +0 -2
  1230. package/dist/src/session/session-workspace.js +0 -2
  1231. package/dist/src/session/store.js +0 -2
  1232. package/dist/src/session/stored-rows-to-file-entries.js +0 -2
  1233. package/dist/src/session/thinking-resolve.js +0 -2
  1234. package/dist/src/session/transcript-events.js +0 -2
  1235. package/dist/src/session/transcript-format.js +0 -2
  1236. package/dist/src/session/transcript-outline.js +0 -2
  1237. package/dist/src/session/transcript-stats.js +0 -2
  1238. package/dist/src/session/types.js +0 -2
  1239. package/dist/src/session/user-round-delete.js +0 -2
  1240. package/dist/src/share/share-audit.js +0 -2
  1241. package/dist/src/share/share-auto.js +0 -2
  1242. package/dist/src/share/share-config.js +0 -2
  1243. package/dist/src/share/share-landing.js +0 -2
  1244. package/dist/src/share/share-rate-limit.js +0 -2
  1245. package/dist/src/share/share-store.js +0 -2
  1246. package/dist/src/share/share-thumbnail.js +0 -2
  1247. package/dist/src/share/share-types.js +0 -2
  1248. package/dist/src/share/share-url.js +0 -2
  1249. package/dist/src/share/share-zip.js +0 -2
  1250. package/dist/src/share/site-proxy.js +0 -2
  1251. package/dist/src/share/site-share-config.js +0 -2
  1252. package/dist/src/share/site-share-router.js +0 -2
  1253. package/dist/src/share/site-share-store.js +0 -2
  1254. package/dist/src/share/site-share-types.js +0 -2
  1255. package/dist/src/share/site-static-serve.js +0 -2
  1256. package/dist/src/storage/sqlite/activity-repository.js +0 -2
  1257. package/dist/src/storage/sqlite/config-repository.js +0 -2
  1258. package/dist/src/storage/sqlite/connection.js +0 -2
  1259. package/dist/src/storage/sqlite/connector-repository.js +0 -2
  1260. package/dist/src/storage/sqlite/fts.js +0 -2
  1261. package/dist/src/storage/sqlite/knowledge-repository.js +0 -2
  1262. package/dist/src/storage/sqlite/memory-index-repository.js +0 -2
  1263. package/dist/src/storage/sqlite/memory-records-repository.js +0 -2
  1264. package/dist/src/storage/sqlite/memory-reference-consent-repository.js +0 -2
  1265. package/dist/src/storage/sqlite/migrations/discover.js +0 -2
  1266. package/dist/src/storage/sqlite/migrations/errors.js +0 -2
  1267. package/dist/src/storage/sqlite/migrations/runner.js +0 -2
  1268. package/dist/src/storage/sqlite/note-agent-context-repository.js +0 -2
  1269. package/dist/src/storage/sqlite/notes-repository.js +0 -2
  1270. package/dist/src/storage/sqlite/paths.js +0 -2
  1271. package/dist/src/storage/sqlite/row-mappers.js +0 -2
  1272. package/dist/src/storage/sqlite/schema-version.js +0 -2
  1273. package/dist/src/storage/sqlite/schema.js +0 -2
  1274. package/dist/src/storage/sqlite/session-metadata.js +0 -2
  1275. package/dist/src/storage/sqlite/session-repository.js +0 -2
  1276. package/dist/src/storage/sqlite/transaction.js +0 -2
  1277. package/dist/src/storage/sqlite/transcript-repository.js +0 -2
  1278. package/dist/src/storage/sqlite/user-profile-setup-repository.js +0 -2
  1279. package/dist/src/storage/sqlite/user-trust-repository.js +0 -2
  1280. package/dist/src/tui/backends/embedded-backend.js +0 -2
  1281. package/dist/src/tui/backends/gateway-sse-backend.js +0 -2
  1282. package/dist/src/tui/chat-history.js +0 -2
  1283. package/dist/src/tui/clipboard-image.js +0 -2
  1284. package/dist/src/tui/clipboard-text.js +0 -2
  1285. package/dist/src/tui/components/assistant-message.js +0 -2
  1286. package/dist/src/tui/components/bash-execution.js +0 -2
  1287. package/dist/src/tui/components/bash-summary.js +0 -2
  1288. package/dist/src/tui/components/branch-message-summary.js +0 -2
  1289. package/dist/src/tui/components/branch-summary.js +0 -2
  1290. package/dist/src/tui/components/chat-log.js +0 -2
  1291. package/dist/src/tui/components/compaction-summary.js +0 -2
  1292. package/dist/src/tui/components/custom-editor.js +0 -2
  1293. package/dist/src/tui/components/custom-message.js +0 -2
  1294. package/dist/src/tui/components/dynamic-border.js +0 -2
  1295. package/dist/src/tui/components/extension-dialog.js +0 -2
  1296. package/dist/src/tui/components/fuzzy-filter.js +0 -2
  1297. package/dist/src/tui/components/scoped-models-selector.js +0 -2
  1298. package/dist/src/tui/components/searchable-select-list.js +0 -2
  1299. package/dist/src/tui/components/session-selector.js +0 -2
  1300. package/dist/src/tui/components/settings-selector.js +0 -2
  1301. package/dist/src/tui/components/thinking-selector.js +0 -2
  1302. package/dist/src/tui/components/tool-execution.js +0 -2
  1303. package/dist/src/tui/components/tui-bottom-bar.js +0 -2
  1304. package/dist/src/tui/components/tui-header.js +0 -2
  1305. package/dist/src/tui/components/user-message.js +0 -2
  1306. package/dist/src/tui/components/visual-truncate.js +0 -2
  1307. package/dist/src/tui/extension-host/autocomplete.js +0 -2
  1308. package/dist/src/tui/extension-host/host.js +0 -2
  1309. package/dist/src/tui/extension-host/load-extensions.js +0 -2
  1310. package/dist/src/tui/extension-host/runtime-context.js +0 -2
  1311. package/dist/src/tui/extension-host/runtime.js +0 -2
  1312. package/dist/src/tui/extension-host/surface.js +0 -2
  1313. package/dist/src/tui/extension-host/tool-renderers.js +0 -2
  1314. package/dist/src/tui/format-tui-hotkeys.js +0 -2
  1315. package/dist/src/tui/sse-consumer.js +0 -2
  1316. package/dist/src/tui/theme/dark.js +0 -2
  1317. package/dist/src/tui/theme/light.js +0 -2
  1318. package/dist/src/tui/theme-manager.js +0 -2
  1319. package/dist/src/tui/theme.js +0 -2
  1320. package/dist/src/tui/tool-summary.js +0 -2
  1321. package/dist/src/tui/tui-agent-events.js +0 -2
  1322. package/dist/src/tui/tui-command-formatters.js +0 -2
  1323. package/dist/src/tui/tui-commands.js +0 -2
  1324. package/dist/src/tui/tui-context-usage.js +0 -2
  1325. package/dist/src/tui/tui-extension-user-message.js +0 -2
  1326. package/dist/src/tui/tui-fd-path.js +0 -2
  1327. package/dist/src/tui/tui-file-autocomplete.js +0 -2
  1328. package/dist/src/tui/tui-follow-up-queue.js +0 -2
  1329. package/dist/src/tui/tui-git-branch.js +0 -2
  1330. package/dist/src/tui/tui-keybindings-file.js +0 -2
  1331. package/dist/src/tui/tui-lifecycle.js +0 -2
  1332. package/dist/src/tui/tui-local-shell.js +0 -2
  1333. package/dist/src/tui/tui-model-picker.js +0 -2
  1334. package/dist/src/tui/tui-oauth-login.js +0 -2
  1335. package/dist/src/tui/tui-overlays.js +0 -2
  1336. package/dist/src/tui/tui-picker-overlay.js +0 -2
  1337. package/dist/src/tui/tui-run-state.js +0 -2
  1338. package/dist/src/tui/tui-run-status-format.js +0 -2
  1339. package/dist/src/tui/tui-runtime-hints.js +0 -2
  1340. package/dist/src/tui/tui-scoped-models.js +0 -2
  1341. package/dist/src/tui/tui-session-actions.js +0 -2
  1342. package/dist/src/tui/tui-session-format.js +0 -2
  1343. package/dist/src/tui/tui-session-snapshot.js +0 -2
  1344. package/dist/src/tui/tui-session-stats.js +0 -2
  1345. package/dist/src/tui/tui-settings.js +0 -2
  1346. package/dist/src/tui/tui-skills-autocomplete.js +0 -2
  1347. package/dist/src/tui/tui-startup-resources.js +0 -2
  1348. package/dist/src/tui/tui-startup-text.js +0 -2
  1349. package/dist/src/tui/tui-stdio-filter.js +0 -2
  1350. package/dist/src/tui/tui-submit.js +0 -2
  1351. package/dist/src/tui/tui-suspend.js +0 -2
  1352. package/dist/src/tui/tui-timeline-picker.js +0 -2
  1353. package/dist/src/tui/tui-timeline.js +0 -2
  1354. package/dist/src/tui/tui-tool-diff.js +0 -2
  1355. package/dist/src/tui/tui-tool-result.js +0 -2
  1356. package/dist/src/tui/tui-transcript-tree-picker.js +0 -2
  1357. package/dist/src/tui/tui-transcript-tree.js +0 -2
  1358. package/dist/src/tui/tui-types.js +0 -2
  1359. package/dist/src/tui/tui-workflow-slash.js +0 -2
  1360. package/dist/src/tui/tui.js +0 -2
  1361. package/dist/src/tui/xopc-tui-keybindings.js +0 -2
  1362. package/dist/src/tunnel/broker-client.js +0 -2
  1363. package/dist/src/tunnel/consent.js +0 -2
  1364. package/dist/src/tunnel/enable-lan-pairing.js +0 -2
  1365. package/dist/src/tunnel/env.js +0 -2
  1366. package/dist/src/tunnel/frp-subdomain-host.js +0 -2
  1367. package/dist/src/tunnel/frpc-binary.js +0 -2
  1368. package/dist/src/tunnel/frpc-config.js +0 -2
  1369. package/dist/src/tunnel/frpc-extract.js +0 -2
  1370. package/dist/src/tunnel/frpc-process.js +0 -2
  1371. package/dist/src/tunnel/gateway-lifecycle.js +0 -2
  1372. package/dist/src/tunnel/pair-context.js +0 -2
  1373. package/dist/src/tunnel/pair-url.js +0 -2
  1374. package/dist/src/tunnel/pairing-rate-limit.js +0 -2
  1375. package/dist/src/tunnel/pairing.js +0 -2
  1376. package/dist/src/tunnel/tunnel-audit.js +0 -2
  1377. package/dist/src/tunnel/tunnel-config.js +0 -2
  1378. package/dist/src/tunnel/tunnel-persist.js +0 -2
  1379. package/dist/src/tunnel/tunnel-qr.js +0 -2
  1380. package/dist/src/tunnel/tunnel-rate-limit.js +0 -2
  1381. package/dist/src/tunnel/tunnel-service.js +0 -2
  1382. package/dist/src/tunnel/tunnel-state.js +0 -2
  1383. package/dist/src/tunnel/well-known.js +0 -2
  1384. package/dist/src/user-context/config.js +0 -2
  1385. package/dist/src/user-context/import.js +0 -2
  1386. package/dist/src/user-context/owner.js +0 -2
  1387. package/dist/src/user-context/profile.js +0 -2
  1388. package/dist/src/user-context/projection.js +0 -2
  1389. package/dist/src/user-context/runtime.js +0 -2
  1390. package/dist/src/user-context/source-recommendations.js +0 -2
  1391. package/dist/src/user-context/trust-policy.js +0 -2
  1392. package/dist/src/utils/global-singleton.js +0 -2
  1393. package/dist/src/utils/helpers.js +0 -2
  1394. package/dist/src/utils/index.js +0 -2
  1395. package/dist/src/utils/is-record.js +0 -2
  1396. package/dist/src/utils/logger/audit.js +0 -2
  1397. package/dist/src/utils/logger/config.js +0 -2
  1398. package/dist/src/utils/logger/context.js +0 -2
  1399. package/dist/src/utils/logger/exporters.js +0 -2
  1400. package/dist/src/utils/logger/index.js +0 -2
  1401. package/dist/src/utils/logger/log-store.js +0 -2
  1402. package/dist/src/utils/logger/log-stream.js +0 -2
  1403. package/dist/src/utils/logger/pino-record.js +0 -2
  1404. package/dist/src/utils/logger/redact.js +0 -2
  1405. package/dist/src/utils/logger/rotation.js +0 -2
  1406. package/dist/src/utils/logger/shutdown.js +0 -2
  1407. package/dist/src/utils/logger/stats.js +0 -2
  1408. package/dist/src/utils/logger/streams.js +0 -2
  1409. package/dist/src/utils/logger/types.js +0 -2
  1410. package/dist/src/utils/logger.js +0 -2
  1411. package/dist/src/utils/redact-sensitive-url.js +0 -2
  1412. package/dist/src/utils/sanitize-log.js +0 -2
  1413. package/dist/src/utils/string-coerce.js +0 -2
  1414. package/dist/src/voice/language-profile.js +0 -2
  1415. package/dist/src/voice/local/model-files.js +0 -2
  1416. package/dist/src/voice/local/model-manager.js +0 -2
  1417. package/dist/src/voice/local/models.js +0 -2
  1418. package/dist/src/voice/local/runtime-client.js +0 -2
  1419. package/dist/src/voice/local/runtime-dispatcher.js +0 -2
  1420. package/dist/src/voice/local/runtime-worker.js +12 -4
  1421. package/dist/src/voice/local/wav.js +0 -2
  1422. package/dist/src/voice/metadata/builtin.js +0 -2
  1423. package/dist/src/voice/metadata/registry.js +0 -2
  1424. package/dist/src/voice/stt/availability.js +0 -2
  1425. package/dist/src/voice/stt/config-slice.js +0 -2
  1426. package/dist/src/voice/stt/factory.js +0 -2
  1427. package/dist/src/voice/stt/index.js +0 -2
  1428. package/dist/src/voice/stt/list-providers.js +0 -2
  1429. package/dist/src/voice/stt/mention.js +0 -2
  1430. package/dist/src/voice/stt/preflight.js +0 -2
  1431. package/dist/src/voice/stt/providers/alibaba-transcription.js +0 -2
  1432. package/dist/src/voice/stt/providers/local-transcription.js +0 -2
  1433. package/dist/src/voice/stt/providers/openai-transcription.js +0 -2
  1434. package/dist/src/voice/stt/transcribe-core.js +0 -2
  1435. package/dist/src/voice/stt/types.js +0 -2
  1436. package/dist/src/voice/tts/audio.js +0 -2
  1437. package/dist/src/voice/tts/config-slice.js +0 -2
  1438. package/dist/src/voice/tts/directives.js +0 -2
  1439. package/dist/src/voice/tts/factory.js +0 -2
  1440. package/dist/src/voice/tts/list-providers.js +0 -2
  1441. package/dist/src/voice/tts/merge-config.js +0 -2
  1442. package/dist/src/voice/tts/openai-compatible-speech.js +0 -2
  1443. package/dist/src/voice/tts/payload.js +0 -2
  1444. package/dist/src/voice/tts/preprocess.js +0 -2
  1445. package/dist/src/voice/tts/providers/alibaba-speech.js +0 -2
  1446. package/dist/src/voice/tts/providers/edge-speech.js +0 -2
  1447. package/dist/src/voice/tts/providers/minimax-speech.js +0 -2
  1448. package/dist/src/voice/tts/providers/openai-speech.js +0 -2
  1449. package/dist/src/voice/tts/sentence-boundary.js +0 -2
  1450. package/dist/src/voice/tts/service.js +0 -2
  1451. package/dist/src/voice/tts/speak-core.js +0 -2
  1452. package/dist/src/voice/tts/speech-registry.js +0 -2
  1453. package/dist/src/voice/tts/status-tracker.js +0 -2
  1454. package/dist/src/voice/tts/summarize.js +0 -2
  1455. package/dist/src/voice/tts/types.js +0 -2
  1456. package/dist/src/work-discovery/analyzer.js +0 -2
  1457. package/dist/src/work-discovery/probe.js +0 -2
  1458. package/dist/src/work-discovery/repository.js +0 -2
  1459. package/dist/src/work-discovery/service.js +0 -2
  1460. package/dist/src/work-items/agent-context.js +0 -2
  1461. package/dist/src/work-items/work-item-service.js +0 -2
  1462. package/dist/src/work-items/work-item-store.js +0 -2
  1463. package/dist/src/work-items/work-item-workflow-judge.js +0 -2
  1464. package/dist/src/workflows/authoring/workflow-draft-store.js +0 -2
  1465. package/dist/src/workflows/domain/definition-utils.js +0 -2
  1466. package/dist/src/workflows/domain/run.js +0 -2
  1467. package/dist/src/workflows/domain/schema-validation.js +0 -2
  1468. package/dist/src/workflows/domain/validation.js +0 -2
  1469. package/dist/src/workflows/draft/workflow-draft-prompt.js +0 -2
  1470. package/dist/src/workflows/draft/workflow-draft-service.js +0 -2
  1471. package/dist/src/workflows/draft/workflow-draft-validator.js +0 -2
  1472. package/dist/src/workflows/engine/projector.js +0 -2
  1473. package/dist/src/workflows/engine/workflow-engine.js +0 -2
  1474. package/dist/src/workflows/registry/catalog-workflow-definition-registry.js +0 -2
  1475. package/dist/src/workflows/runtime/graph-workflow-runtime.js +0 -2
  1476. package/dist/src/workflows/service/run-view-to-snapshot.js +0 -2
  1477. package/dist/src/workflows/service/workflow-run-service.js +1 -3
  1478. package/dist/src/workflows/service/workflow-session-bridge.js +0 -2
  1479. package/dist/src/workflows/service/workflow-session-key.js +0 -2
  1480. package/dist/src/workflows/store/event-store.js +0 -2
  1481. package/dist/src/workflows/store/paths.js +0 -2
  1482. package/dist/src/workflows/store/run-index-store.js +0 -2
  1483. package/dist/src/workflows/store/run-store.js +0 -2
  1484. package/package.json +41 -11
  1485. package/skills/creative/hatch-pet/SKILL.md +1 -0
  1486. package/dist/extensions/dashscope/src/image-generation-provider.js.map +0 -1
  1487. package/dist/extensions/demo-memory/src/index.js.map +0 -1
  1488. package/dist/extensions/fal/src/image-generation-provider.js.map +0 -1
  1489. package/dist/extensions/feishu/src/actions/message-action-handler.js.map +0 -1
  1490. package/dist/extensions/feishu/src/adapters/cli-login.js.map +0 -1
  1491. package/dist/extensions/feishu/src/adapters/gateway-setup.js.map +0 -1
  1492. package/dist/extensions/feishu/src/adapters/onboard-cli.js.map +0 -1
  1493. package/dist/extensions/feishu/src/auth/app-registration.js.map +0 -1
  1494. package/dist/extensions/feishu/src/auth/pairing.js.map +0 -1
  1495. package/dist/extensions/feishu/src/auth/paths.js.map +0 -1
  1496. package/dist/extensions/feishu/src/directory/directory-adapter.js.map +0 -1
  1497. package/dist/extensions/feishu/src/format.js.map +0 -1
  1498. package/dist/extensions/feishu/src/index.js.map +0 -1
  1499. package/dist/extensions/feishu/src/outbound/actions.js.map +0 -1
  1500. package/dist/extensions/feishu/src/outbound/media-load.js.map +0 -1
  1501. package/dist/extensions/feishu/src/outbound/outbound-adapter.js.map +0 -1
  1502. package/dist/extensions/feishu/src/pairing/feishu-pairing-prompt.js.map +0 -1
  1503. package/dist/extensions/feishu/src/pairing-config-resolver.js.map +0 -1
  1504. package/dist/extensions/feishu/src/plugin.js.map +0 -1
  1505. package/dist/extensions/feishu/src/schema/config-schema.js.map +0 -1
  1506. package/dist/extensions/feishu/src/state/accounts.js.map +0 -1
  1507. package/dist/extensions/feishu/src/state/message-bindings.js.map +0 -1
  1508. package/dist/extensions/feishu/src/state/thread-bindings.js.map +0 -1
  1509. package/dist/extensions/feishu/src/status/doctor.js.map +0 -1
  1510. package/dist/extensions/feishu/src/status/status-adapter.js.map +0 -1
  1511. package/dist/extensions/feishu/src/streaming/streaming-adapter.js.map +0 -1
  1512. package/dist/extensions/feishu/src/subagent-hooks.js.map +0 -1
  1513. package/dist/extensions/feishu/src/tools/docx/docx-batch-insert.js.map +0 -1
  1514. package/dist/extensions/feishu/src/tools/docx/docx-color-text.js.map +0 -1
  1515. package/dist/extensions/feishu/src/tools/docx/docx-table-ops.js.map +0 -1
  1516. package/dist/extensions/feishu/src/tools/tools.js.map +0 -1
  1517. package/dist/extensions/feishu/src/transport/client/client.js.map +0 -1
  1518. package/dist/extensions/feishu/src/transport/client/lark-sdk-logger.js.map +0 -1
  1519. package/dist/extensions/feishu/src/transport/reliability/dedupe.js.map +0 -1
  1520. package/dist/extensions/feishu/src/transport/reliability/inbound-pipeline.js.map +0 -1
  1521. package/dist/extensions/feishu/src/transport/socket-mode/monitor.js.map +0 -1
  1522. package/dist/extensions/feishu/src/transport/socket-mode/retry.js.map +0 -1
  1523. package/dist/extensions/feishu/src/transport/text/mentions.js.map +0 -1
  1524. package/dist/extensions/feishu/src/transport/webhook/monitor.js.map +0 -1
  1525. package/dist/extensions/feishu/src/ui/config-surface.js.map +0 -1
  1526. package/dist/extensions/feishu/src/workflow-progress.js.map +0 -1
  1527. package/dist/extensions/google/src/image-generation-provider.js.map +0 -1
  1528. package/dist/extensions/minimax/src/image-generation-provider.js.map +0 -1
  1529. package/dist/extensions/openai/src/image-generation-provider.js.map +0 -1
  1530. package/dist/extensions/telegram/src/access-control.js.map +0 -1
  1531. package/dist/extensions/telegram/src/account-manager.js.map +0 -1
  1532. package/dist/extensions/telegram/src/actions/message-actions.js.map +0 -1
  1533. package/dist/extensions/telegram/src/adapters/command-adapter.js.map +0 -1
  1534. package/dist/extensions/telegram/src/adapters/config-adapter.js.map +0 -1
  1535. package/dist/extensions/telegram/src/adapters/debounce-keys.js.map +0 -1
  1536. package/dist/extensions/telegram/src/adapters/gateway-adapter.js.map +0 -1
  1537. package/dist/extensions/telegram/src/adapters/gateway-setup.js.map +0 -1
  1538. package/dist/extensions/telegram/src/adapters/inbound-access.js.map +0 -1
  1539. package/dist/extensions/telegram/src/adapters/index.js.map +0 -1
  1540. package/dist/extensions/telegram/src/adapters/onboard-cli.js.map +0 -1
  1541. package/dist/extensions/telegram/src/adapters/outbound-adapter.js.map +0 -1
  1542. package/dist/extensions/telegram/src/adapters/security-adapter.js.map +0 -1
  1543. package/dist/extensions/telegram/src/adapters/setup-wizard.js.map +0 -1
  1544. package/dist/extensions/telegram/src/adapters/status-adapter.js.map +0 -1
  1545. package/dist/extensions/telegram/src/adapters/streaming-adapter.js.map +0 -1
  1546. package/dist/extensions/telegram/src/api-root.js.map +0 -1
  1547. package/dist/extensions/telegram/src/approval-delivery.js.map +0 -1
  1548. package/dist/extensions/telegram/src/approval-store.js.map +0 -1
  1549. package/dist/extensions/telegram/src/caption.js.map +0 -1
  1550. package/dist/extensions/telegram/src/command-handler.js.map +0 -1
  1551. package/dist/extensions/telegram/src/config-schema.js.map +0 -1
  1552. package/dist/extensions/telegram/src/conversation-id.js.map +0 -1
  1553. package/dist/extensions/telegram/src/dedupe.js.map +0 -1
  1554. package/dist/extensions/telegram/src/delivery-chat-id.js.map +0 -1
  1555. package/dist/extensions/telegram/src/doctor.js.map +0 -1
  1556. package/dist/extensions/telegram/src/draft-stream-lifecycle.js.map +0 -1
  1557. package/dist/extensions/telegram/src/draft-stream-loop.js.map +0 -1
  1558. package/dist/extensions/telegram/src/draft-stream.js.map +0 -1
  1559. package/dist/extensions/telegram/src/errors.js.map +0 -1
  1560. package/dist/extensions/telegram/src/exec-approval-handler.js.map +0 -1
  1561. package/dist/extensions/telegram/src/exec-approvals.js.map +0 -1
  1562. package/dist/extensions/telegram/src/focus-handler.js.map +0 -1
  1563. package/dist/extensions/telegram/src/format.js.map +0 -1
  1564. package/dist/extensions/telegram/src/group-config-resolver.js.map +0 -1
  1565. package/dist/extensions/telegram/src/inbound-coalescer.js.map +0 -1
  1566. package/dist/extensions/telegram/src/inbound-processor.js.map +0 -1
  1567. package/dist/extensions/telegram/src/index.js.map +0 -1
  1568. package/dist/extensions/telegram/src/inline-keyboards.js.map +0 -1
  1569. package/dist/extensions/telegram/src/network-errors.js.map +0 -1
  1570. package/dist/extensions/telegram/src/outbound-sender.js.map +0 -1
  1571. package/dist/extensions/telegram/src/pairing-config-resolver.js.map +0 -1
  1572. package/dist/extensions/telegram/src/plugin-defaults.js.map +0 -1
  1573. package/dist/extensions/telegram/src/plugin.js.map +0 -1
  1574. package/dist/extensions/telegram/src/polling-session.js.map +0 -1
  1575. package/dist/extensions/telegram/src/proxy-fetch.js.map +0 -1
  1576. package/dist/extensions/telegram/src/reactions.js.map +0 -1
  1577. package/dist/extensions/telegram/src/reply-params.js.map +0 -1
  1578. package/dist/extensions/telegram/src/routing-integration.js.map +0 -1
  1579. package/dist/extensions/telegram/src/send-options.js.map +0 -1
  1580. package/dist/extensions/telegram/src/sent-cache.js.map +0 -1
  1581. package/dist/extensions/telegram/src/startup-errors.js.map +0 -1
  1582. package/dist/extensions/telegram/src/telegram-actions.js.map +0 -1
  1583. package/dist/extensions/telegram/src/telegram-draft-errors.js.map +0 -1
  1584. package/dist/extensions/telegram/src/thread-bindings.js.map +0 -1
  1585. package/dist/extensions/telegram/src/timeout-abort.js.map +0 -1
  1586. package/dist/extensions/telegram/src/token-resolver.js.map +0 -1
  1587. package/dist/extensions/telegram/src/update-offset-store.js.map +0 -1
  1588. package/dist/extensions/telegram/src/workflow-progress.js.map +0 -1
  1589. package/dist/extensions/weixin/src/adapters/onboard-cli.js.map +0 -1
  1590. package/dist/extensions/weixin/src/api/api.js.map +0 -1
  1591. package/dist/extensions/weixin/src/api/config-cache.js.map +0 -1
  1592. package/dist/extensions/weixin/src/api/session-guard.js.map +0 -1
  1593. package/dist/extensions/weixin/src/api/types.js.map +0 -1
  1594. package/dist/extensions/weixin/src/auth/accounts.js.map +0 -1
  1595. package/dist/extensions/weixin/src/auth/login-qr.js.map +0 -1
  1596. package/dist/extensions/weixin/src/auth/pairing.js.map +0 -1
  1597. package/dist/extensions/weixin/src/auth/weixin-account-id.js.map +0 -1
  1598. package/dist/extensions/weixin/src/cdn/aes-ecb.js.map +0 -1
  1599. package/dist/extensions/weixin/src/cdn/cdn-upload.js.map +0 -1
  1600. package/dist/extensions/weixin/src/cdn/cdn-url.js.map +0 -1
  1601. package/dist/extensions/weixin/src/cdn/pic-decrypt.js.map +0 -1
  1602. package/dist/extensions/weixin/src/cdn/upload.js.map +0 -1
  1603. package/dist/extensions/weixin/src/cli/gateway-qr-login.js.map +0 -1
  1604. package/dist/extensions/weixin/src/cli/qr-login.js.map +0 -1
  1605. package/dist/extensions/weixin/src/config-schema.js.map +0 -1
  1606. package/dist/extensions/weixin/src/config-surface.js.map +0 -1
  1607. package/dist/extensions/weixin/src/delivery-to.js.map +0 -1
  1608. package/dist/extensions/weixin/src/index.js.map +0 -1
  1609. package/dist/extensions/weixin/src/media/data-url.js.map +0 -1
  1610. package/dist/extensions/weixin/src/media/media-download.js.map +0 -1
  1611. package/dist/extensions/weixin/src/media/mime.js.map +0 -1
  1612. package/dist/extensions/weixin/src/media/silk-transcode.js.map +0 -1
  1613. package/dist/extensions/weixin/src/messaging/context-token-init.js.map +0 -1
  1614. package/dist/extensions/weixin/src/messaging/debug-mode.js.map +0 -1
  1615. package/dist/extensions/weixin/src/messaging/error-notice.js.map +0 -1
  1616. package/dist/extensions/weixin/src/messaging/inbound.js.map +0 -1
  1617. package/dist/extensions/weixin/src/messaging/markdown-filter.js.map +0 -1
  1618. package/dist/extensions/weixin/src/messaging/process-message.js.map +0 -1
  1619. package/dist/extensions/weixin/src/messaging/send-media.js.map +0 -1
  1620. package/dist/extensions/weixin/src/messaging/send.js.map +0 -1
  1621. package/dist/extensions/weixin/src/messaging/slash-commands.js.map +0 -1
  1622. package/dist/extensions/weixin/src/messaging/typing-ticket-store.js.map +0 -1
  1623. package/dist/extensions/weixin/src/monitor/monitor.js.map +0 -1
  1624. package/dist/extensions/weixin/src/outbound-send.js.map +0 -1
  1625. package/dist/extensions/weixin/src/pairing-config-resolver.js.map +0 -1
  1626. package/dist/extensions/weixin/src/plugin.js.map +0 -1
  1627. package/dist/extensions/weixin/src/routing-integration.js.map +0 -1
  1628. package/dist/extensions/weixin/src/storage/state-dir.js.map +0 -1
  1629. package/dist/extensions/weixin/src/storage/sync-buf.js.map +0 -1
  1630. package/dist/extensions/weixin/src/util/logger.js.map +0 -1
  1631. package/dist/extensions/weixin/src/util/random.js.map +0 -1
  1632. package/dist/extensions/weixin/src/util/redact.js.map +0 -1
  1633. package/dist/extensions/weixin/src/workflow-progress.js.map +0 -1
  1634. package/dist/gateway/static/root/assets/channels-status-swr-CuU6ez3y.js +0 -1
  1635. package/dist/gateway/static/root/assets/desktop-pet-C6V-PHwi.js +0 -1
  1636. package/dist/gateway/static/root/assets/desktop-pet-settings-5Fcz47XQ.js +0 -1
  1637. package/dist/gateway/static/root/assets/index-Dfnl9tp_.css +0 -1
  1638. package/dist/gateway/static/root/assets/settings-advanced-gate-DwuBL834.js +0 -1
  1639. package/dist/gateway/static/root/assets/skill-reload-api-DQtZiejw.js +0 -1
  1640. package/dist/gateway/static/root/favicon-icon.svg +0 -187
  1641. package/dist/package.js.map +0 -1
  1642. package/dist/src/activity/context.js.map +0 -1
  1643. package/dist/src/activity/emitter.js.map +0 -1
  1644. package/dist/src/activity/service.js.map +0 -1
  1645. package/dist/src/agent/agent-manager.js.map +0 -1
  1646. package/dist/src/agent/agent-scope.js.map +0 -1
  1647. package/dist/src/agent/background-review/coordinator.js.map +0 -1
  1648. package/dist/src/agent/background-review/prompts.js.map +0 -1
  1649. package/dist/src/agent/background-review/run-background-review.js.map +0 -1
  1650. package/dist/src/agent/background-review/settings.js.map +0 -1
  1651. package/dist/src/agent/bootstrap/bootstrap-cache.js.map +0 -1
  1652. package/dist/src/agent/bootstrap/bootstrap-context.js.map +0 -1
  1653. package/dist/src/agent/bootstrap/bootstrap-files.js.map +0 -1
  1654. package/dist/src/agent/bootstrap/filter-bootstrap-files.js.map +0 -1
  1655. package/dist/src/agent/bootstrap/load-bootstrap-files.js.map +0 -1
  1656. package/dist/src/agent/bootstrap/project-agents-context.js.map +0 -1
  1657. package/dist/src/agent/capabilities/definitions.js.map +0 -1
  1658. package/dist/src/agent/capabilities/registry.js.map +0 -1
  1659. package/dist/src/agent/child-agent-factory.js.map +0 -1
  1660. package/dist/src/agent/client-error-format.js.map +0 -1
  1661. package/dist/src/agent/code-intelligence/binary.js.map +0 -1
  1662. package/dist/src/agent/code-intelligence/runtime.js.map +0 -1
  1663. package/dist/src/agent/code-intelligence/tools.js.map +0 -1
  1664. package/dist/src/agent/coding/turn-diff-tracker.js.map +0 -1
  1665. package/dist/src/agent/context/expand-at-file-mentions.js.map +0 -1
  1666. package/dist/src/agent/context/project-context.js.map +0 -1
  1667. package/dist/src/agent/context/workspace-seed.js.map +0 -1
  1668. package/dist/src/agent/context/workspace-state.js.map +0 -1
  1669. package/dist/src/agent/context/workspace.js.map +0 -1
  1670. package/dist/src/agent/embedded/run-for-session.js.map +0 -1
  1671. package/dist/src/agent/embedded/run-turn.js.map +0 -1
  1672. package/dist/src/agent/embedded/runs.js.map +0 -1
  1673. package/dist/src/agent/embedded/session-manager-init.js.map +0 -1
  1674. package/dist/src/agent/embedded/session-runner.js.map +0 -1
  1675. package/dist/src/agent/embedded/session-tool-result-guard.js.map +0 -1
  1676. package/dist/src/agent/embedded/sqlite-hydrating-session-manager.js.map +0 -1
  1677. package/dist/src/agent/embedded/subscribe-session.js.map +0 -1
  1678. package/dist/src/agent/embedded/system-prompt-override.js.map +0 -1
  1679. package/dist/src/agent/embedded/tool-result-context-guard.js.map +0 -1
  1680. package/dist/src/agent/embedded/tool-result-truncation.js.map +0 -1
  1681. package/dist/src/agent/embedded/xopc-auth-storage.js.map +0 -1
  1682. package/dist/src/agent/embedded/xopc-stream-bridge.js.map +0 -1
  1683. package/dist/src/agent/embedded/xopc-tools-bridge.js.map +0 -1
  1684. package/dist/src/agent/failover-error.js.map +0 -1
  1685. package/dist/src/agent/fallback/candidates.js.map +0 -1
  1686. package/dist/src/agent/fallback/reason.js.map +0 -1
  1687. package/dist/src/agent/feedback/feedback-coordinator.js.map +0 -1
  1688. package/dist/src/agent/goals/checklist-judge.js.map +0 -1
  1689. package/dist/src/agent/goals/checklist-types.js.map +0 -1
  1690. package/dist/src/agent/goals/evaluate-turn.js.map +0 -1
  1691. package/dist/src/agent/goals/goal-locale.js.map +0 -1
  1692. package/dist/src/agent/goals/judge.js.map +0 -1
  1693. package/dist/src/agent/goals/persistent-goal-service.js.map +0 -1
  1694. package/dist/src/agent/goals/post-turn.js.map +0 -1
  1695. package/dist/src/agent/goals/state.js.map +0 -1
  1696. package/dist/src/agent/image/generation/bundled-registry.js.map +0 -1
  1697. package/dist/src/agent/image/generation/bundled.js.map +0 -1
  1698. package/dist/src/agent/image/generation/image-assets.js.map +0 -1
  1699. package/dist/src/agent/image/generation/model-ref.js.map +0 -1
  1700. package/dist/src/agent/image/generation/normalization.js.map +0 -1
  1701. package/dist/src/agent/image/generation/openai-compatible-image-provider.js.map +0 -1
  1702. package/dist/src/agent/image/generation/provider-registry.js.map +0 -1
  1703. package/dist/src/agent/image/generation/runtime.js.map +0 -1
  1704. package/dist/src/agent/image/image-helpers.js.map +0 -1
  1705. package/dist/src/agent/image/image-model-fallback.js.map +0 -1
  1706. package/dist/src/agent/image/inbound-image-handling.js.map +0 -1
  1707. package/dist/src/agent/image/load-image-media.js.map +0 -1
  1708. package/dist/src/agent/image/tool-model-config.js.map +0 -1
  1709. package/dist/src/agent/image/understanding/pi-ai-provider.js.map +0 -1
  1710. package/dist/src/agent/image/understanding/provider-registry.js.map +0 -1
  1711. package/dist/src/agent/image/understanding/runtime.js.map +0 -1
  1712. package/dist/src/agent/image/vision-detection.js.map +0 -1
  1713. package/dist/src/agent/inbound/attachment-pipeline.js.map +0 -1
  1714. package/dist/src/agent/inbound/inbound-loop.js.map +0 -1
  1715. package/dist/src/agent/inbound/turn-dispatcher.js.map +0 -1
  1716. package/dist/src/agent/ipc/bus.js.map +0 -1
  1717. package/dist/src/agent/ipc/inbox.js.map +0 -1
  1718. package/dist/src/agent/ipc/socket.js.map +0 -1
  1719. package/dist/src/agent/ipc/types.js.map +0 -1
  1720. package/dist/src/agent/lifecycle/handlers/compaction.js.map +0 -1
  1721. package/dist/src/agent/lifecycle/hook-handler.js.map +0 -1
  1722. package/dist/src/agent/lifecycle/manager.js.map +0 -1
  1723. package/dist/src/agent/lifecycle/progress.js.map +0 -1
  1724. package/dist/src/agent/lifecycle/timeout-wrapper.js.map +0 -1
  1725. package/dist/src/agent/lifecycle/typing.js.map +0 -1
  1726. package/dist/src/agent/mcp/bundle-mcp-config.js.map +0 -1
  1727. package/dist/src/agent/mcp/bundle-mcp-materialize.js.map +0 -1
  1728. package/dist/src/agent/mcp/bundle-mcp-names.js.map +0 -1
  1729. package/dist/src/agent/mcp/bundle-mcp-policy.js.map +0 -1
  1730. package/dist/src/agent/mcp/bundle-mcp-runtime.js.map +0 -1
  1731. package/dist/src/agent/mcp/embedded-mcp.js.map +0 -1
  1732. package/dist/src/agent/mcp/mcp-config-shared.js.map +0 -1
  1733. package/dist/src/agent/mcp/mcp-http.js.map +0 -1
  1734. package/dist/src/agent/mcp/mcp-stdio-transport.js.map +0 -1
  1735. package/dist/src/agent/mcp/mcp-stdio.js.map +0 -1
  1736. package/dist/src/agent/mcp/mcp-tool-meta.js.map +0 -1
  1737. package/dist/src/agent/mcp/mcp-transport-config.js.map +0 -1
  1738. package/dist/src/agent/mcp/mcp-transport.js.map +0 -1
  1739. package/dist/src/agent/mcp/resolve-embedded-mcp-tools.js.map +0 -1
  1740. package/dist/src/agent/media-generation/model-ref.js.map +0 -1
  1741. package/dist/src/agent/media-generation/normalization.types.js.map +0 -1
  1742. package/dist/src/agent/media-generation/runtime-shared.js.map +0 -1
  1743. package/dist/src/agent/memory/agent-message-access.js.map +0 -1
  1744. package/dist/src/agent/memory/builtin-memory-store.js.map +0 -1
  1745. package/dist/src/agent/memory/builtin-provider.js.map +0 -1
  1746. package/dist/src/agent/memory/compaction.js.map +0 -1
  1747. package/dist/src/agent/memory/context/planner.js.map +0 -1
  1748. package/dist/src/agent/memory/context-fence.js.map +0 -1
  1749. package/dist/src/agent/memory/create-memory-manager.js.map +0 -1
  1750. package/dist/src/agent/memory/dreaming/config.js.map +0 -1
  1751. package/dist/src/agent/memory/dreaming/constants.js.map +0 -1
  1752. package/dist/src/agent/memory/dreaming/deep-promotion.js.map +0 -1
  1753. package/dist/src/agent/memory/dreaming/events.js.map +0 -1
  1754. package/dist/src/agent/memory/dreaming/last-run.js.map +0 -1
  1755. package/dist/src/agent/memory/dreaming/light-sweep.js.map +0 -1
  1756. package/dist/src/agent/memory/dreaming/preview.js.map +0 -1
  1757. package/dist/src/agent/memory/dreaming/promotion-lifecycle.js.map +0 -1
  1758. package/dist/src/agent/memory/dreaming/rem-patterns.js.map +0 -1
  1759. package/dist/src/agent/memory/dreaming/scope.js.map +0 -1
  1760. package/dist/src/agent/memory/dreaming/short-term-store.js.map +0 -1
  1761. package/dist/src/agent/memory/dreaming/utils.js.map +0 -1
  1762. package/dist/src/agent/memory/lifecycle.js.map +0 -1
  1763. package/dist/src/agent/memory/manager.js.map +0 -1
  1764. package/dist/src/agent/memory/memory-config.js.map +0 -1
  1765. package/dist/src/agent/memory/message-sanitizer.js.map +0 -1
  1766. package/dist/src/agent/memory/plugin-discovery.js.map +0 -1
  1767. package/dist/src/agent/memory/sensitivity.js.map +0 -1
  1768. package/dist/src/agent/memory/source-origin.js.map +0 -1
  1769. package/dist/src/agent/memory/stub-memory-provider.js.map +0 -1
  1770. package/dist/src/agent/memory/summary-generator.js.map +0 -1
  1771. package/dist/src/agent/memory/understanding/correction.js.map +0 -1
  1772. package/dist/src/agent/memory/understanding/quality.js.map +0 -1
  1773. package/dist/src/agent/memory/understanding/service.js.map +0 -1
  1774. package/dist/src/agent/memory/user-context-coordinator.js.map +0 -1
  1775. package/dist/src/agent/memory/user-message-text.js.map +0 -1
  1776. package/dist/src/agent/memory/window.js.map +0 -1
  1777. package/dist/src/agent/messaging/command-handler.js.map +0 -1
  1778. package/dist/src/agent/messaging/message-router.js.map +0 -1
  1779. package/dist/src/agent/messaging/outbound-coordinator.js.map +0 -1
  1780. package/dist/src/agent/messaging/stream-manager.js.map +0 -1
  1781. package/dist/src/agent/middleware/context.js.map +0 -1
  1782. package/dist/src/agent/middleware/self-verify.js.map +0 -1
  1783. package/dist/src/agent/models/manager.js.map +0 -1
  1784. package/dist/src/agent/models/request-limiter.js.map +0 -1
  1785. package/dist/src/agent/models/selection.js.map +0 -1
  1786. package/dist/src/agent/orchestration/agent-event-handler.js.map +0 -1
  1787. package/dist/src/agent/orchestration/agent-orchestrator.js.map +0 -1
  1788. package/dist/src/agent/orchestration/llm-turn-retry.js.map +0 -1
  1789. package/dist/src/agent/orchestration/loop-guard.js.map +0 -1
  1790. package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js.map +0 -1
  1791. package/dist/src/agent/prompt/cache-boundary.js.map +0 -1
  1792. package/dist/src/agent/prompt/memory/index.js.map +0 -1
  1793. package/dist/src/agent/prompt/safety.js.map +0 -1
  1794. package/dist/src/agent/prompt/sanitize-for-prompt.js.map +0 -1
  1795. package/dist/src/agent/prompt/sections/behavior.js.map +0 -1
  1796. package/dist/src/agent/prompt/sections/memory-skills.js.map +0 -1
  1797. package/dist/src/agent/prompt/sections/messaging-runtime.js.map +0 -1
  1798. package/dist/src/agent/prompt/sections/project-context.js.map +0 -1
  1799. package/dist/src/agent/prompt/sections/tooling.js.map +0 -1
  1800. package/dist/src/agent/prompt/sections/workspace-runtime.js.map +0 -1
  1801. package/dist/src/agent/prompt/service-prompt-builder.js.map +0 -1
  1802. package/dist/src/agent/prompt/subagent-context.js.map +0 -1
  1803. package/dist/src/agent/prompt/system-prompt-params.js.map +0 -1
  1804. package/dist/src/agent/prompt/system-prompt.js.map +0 -1
  1805. package/dist/src/agent/prompt/system-reminder.js.map +0 -1
  1806. package/dist/src/agent/reply/apply-turn-user-enrichment.js.map +0 -1
  1807. package/dist/src/agent/reply/post-compaction-context.js.map +0 -1
  1808. package/dist/src/agent/reply/startup-context.js.map +0 -1
  1809. package/dist/src/agent/reply/workspace-boundary-read.js.map +0 -1
  1810. package/dist/src/agent/sandbox/command-validator.js.map +0 -1
  1811. package/dist/src/agent/sandbox/exec-policy.js.map +0 -1
  1812. package/dist/src/agent/sandbox/path-policy.js.map +0 -1
  1813. package/dist/src/agent/sandbox/sanitize-env-vars.js.map +0 -1
  1814. package/dist/src/agent/sandbox/types.js.map +0 -1
  1815. package/dist/src/agent/service/async-queue.js.map +0 -1
  1816. package/dist/src/agent/service/btw-query.js.map +0 -1
  1817. package/dist/src/agent/service/build-direct-message-content.js.map +0 -1
  1818. package/dist/src/agent/service/direct-turn-helpers.js.map +0 -1
  1819. package/dist/src/agent/service/parse-outbound-session-key.js.map +0 -1
  1820. package/dist/src/agent/service/process-direct-one-shot.js.map +0 -1
  1821. package/dist/src/agent/service/process-direct-streaming.js.map +0 -1
  1822. package/dist/src/agent/service/session-context-report.js.map +0 -1
  1823. package/dist/src/agent/service/webchat-tts.js.map +0 -1
  1824. package/dist/src/agent/service-inbound-utils.js.map +0 -1
  1825. package/dist/src/agent/service.js.map +0 -1
  1826. package/dist/src/agent/session/session-config-service.js.map +0 -1
  1827. package/dist/src/agent/session/session-context.js.map +0 -1
  1828. package/dist/src/agent/session/session-hydrator.js.map +0 -1
  1829. package/dist/src/agent/session/session-inspector.js.map +0 -1
  1830. package/dist/src/agent/session/session-lifecycle.js.map +0 -1
  1831. package/dist/src/agent/session/session-state-bag.js.map +0 -1
  1832. package/dist/src/agent/session/tracker.js.map +0 -1
  1833. package/dist/src/agent/skills/config.js.map +0 -1
  1834. package/dist/src/agent/skills/filesystem-watcher.js.map +0 -1
  1835. package/dist/src/agent/skills/format-skills-prompt.js.map +0 -1
  1836. package/dist/src/agent/skills/hub-hash.js.map +0 -1
  1837. package/dist/src/agent/skills/hub-lock.js.map +0 -1
  1838. package/dist/src/agent/skills/hub-pull.js.map +0 -1
  1839. package/dist/src/agent/skills/index.js.map +0 -1
  1840. package/dist/src/agent/skills/install-target.js.map +0 -1
  1841. package/dist/src/agent/skills/installer.js.map +0 -1
  1842. package/dist/src/agent/skills/managed-store.js.map +0 -1
  1843. package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js.map +0 -1
  1844. package/dist/src/agent/skills/marketplace/adapters/skillhub/adapter.js.map +0 -1
  1845. package/dist/src/agent/skills/marketplace/adapters/store/adapter.js.map +0 -1
  1846. package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js.map +0 -1
  1847. package/dist/src/agent/skills/marketplace/marketplace-category-order.js.map +0 -1
  1848. package/dist/src/agent/skills/marketplace/registry.js.map +0 -1
  1849. package/dist/src/agent/skills/marketplace/resolve-adapter.js.map +0 -1
  1850. package/dist/src/agent/skills/parse-skill-metadata.js.map +0 -1
  1851. package/dist/src/agent/skills/required-env-vars.js.map +0 -1
  1852. package/dist/src/agent/skills/scanner.js.map +0 -1
  1853. package/dist/src/agent/skills/skill-manage-ops.js.map +0 -1
  1854. package/dist/src/agent/skills/skill-manager.js.map +0 -1
  1855. package/dist/src/agent/skills/skill-markdown-preview-from-raw.js.map +0 -1
  1856. package/dist/src/agent/skills/skill-tool-gating.js.map +0 -1
  1857. package/dist/src/agent/skills/skill-view-path.js.map +0 -1
  1858. package/dist/src/agent/skills/skills-marketplace.js.map +0 -1
  1859. package/dist/src/agent/skills/test-framework.js.map +0 -1
  1860. package/dist/src/agent/skills/watcher.js.map +0 -1
  1861. package/dist/src/agent/skills/workspace-skills-dir.js.map +0 -1
  1862. package/dist/src/agent/source-context/injector.js.map +0 -1
  1863. package/dist/src/agent/source-context/types.js.map +0 -1
  1864. package/dist/src/agent/starter-agents.js.map +0 -1
  1865. package/dist/src/agent/streaming/reasoning-visibility-sse.js.map +0 -1
  1866. package/dist/src/agent/tool-manuals/browser.js.map +0 -1
  1867. package/dist/src/agent/tool-manuals/index.js.map +0 -1
  1868. package/dist/src/agent/tool-manuals/xopc-use.js.map +0 -1
  1869. package/dist/src/agent/tools/apply-patch.js.map +0 -1
  1870. package/dist/src/agent/tools/automation-tool.js.map +0 -1
  1871. package/dist/src/agent/tools/browser/tool/browser-use-tool.js.map +0 -1
  1872. package/dist/src/agent/tools/browser/tool/schemas.js.map +0 -1
  1873. package/dist/src/agent/tools/chain-tracker.js.map +0 -1
  1874. package/dist/src/agent/tools/clarify-tool.js.map +0 -1
  1875. package/dist/src/agent/tools/cli-clarify.js.map +0 -1
  1876. package/dist/src/agent/tools/communication.js.map +0 -1
  1877. package/dist/src/agent/tools/composio-tool.js.map +0 -1
  1878. package/dist/src/agent/tools/concurrency.js.map +0 -1
  1879. package/dist/src/agent/tools/create-share-tool.js.map +0 -1
  1880. package/dist/src/agent/tools/curated-memory-tool.js.map +0 -1
  1881. package/dist/src/agent/tools/delegate-tool.js.map +0 -1
  1882. package/dist/src/agent/tools/desktop-pet-tool.js.map +0 -1
  1883. package/dist/src/agent/tools/dreaming-tool.js.map +0 -1
  1884. package/dist/src/agent/tools/edit-diff.js.map +0 -1
  1885. package/dist/src/agent/tools/error-pattern-matcher.js.map +0 -1
  1886. package/dist/src/agent/tools/error-tracker.js.map +0 -1
  1887. package/dist/src/agent/tools/exec-command.js.map +0 -1
  1888. package/dist/src/agent/tools/execute-code-tool.js.map +0 -1
  1889. package/dist/src/agent/tools/executor.js.map +0 -1
  1890. package/dist/src/agent/tools/factory.js.map +0 -1
  1891. package/dist/src/agent/tools/find.js.map +0 -1
  1892. package/dist/src/agent/tools/goal-evidence-recorder.js.map +0 -1
  1893. package/dist/src/agent/tools/goal-tool.js.map +0 -1
  1894. package/dist/src/agent/tools/grep.js.map +0 -1
  1895. package/dist/src/agent/tools/image-generate-tool.js.map +0 -1
  1896. package/dist/src/agent/tools/image-tool.js.map +0 -1
  1897. package/dist/src/agent/tools/list-dir.js.map +0 -1
  1898. package/dist/src/agent/tools/media-read-tool.js.map +0 -1
  1899. package/dist/src/agent/tools/memory-tool.js.map +0 -1
  1900. package/dist/src/agent/tools/metadata.js.map +0 -1
  1901. package/dist/src/agent/tools/read.js.map +0 -1
  1902. package/dist/src/agent/tools/search/http.js.map +0 -1
  1903. package/dist/src/agent/tools/search/providers/bing-api.js.map +0 -1
  1904. package/dist/src/agent/tools/search/providers/bing-html.js.map +0 -1
  1905. package/dist/src/agent/tools/search/providers/brave.js.map +0 -1
  1906. package/dist/src/agent/tools/search/providers/duckduckgo-html.js.map +0 -1
  1907. package/dist/src/agent/tools/search/providers/searxng.js.map +0 -1
  1908. package/dist/src/agent/tools/search/providers/tavily.js.map +0 -1
  1909. package/dist/src/agent/tools/search/region.js.map +0 -1
  1910. package/dist/src/agent/tools/search/registry.js.map +0 -1
  1911. package/dist/src/agent/tools/search/resolve-config.js.map +0 -1
  1912. package/dist/src/agent/tools/send-media.js.map +0 -1
  1913. package/dist/src/agent/tools/session-search-tool.js.map +0 -1
  1914. package/dist/src/agent/tools/session-status-tool.js.map +0 -1
  1915. package/dist/src/agent/tools/skill-install-tool.js.map +0 -1
  1916. package/dist/src/agent/tools/skill-manage-tool.js.map +0 -1
  1917. package/dist/src/agent/tools/skills-tools.js.map +0 -1
  1918. package/dist/src/agent/tools/structured-output.js.map +0 -1
  1919. package/dist/src/agent/tools/todo-tool.js.map +0 -1
  1920. package/dist/src/agent/tools/tool-manual-tool.js.map +0 -1
  1921. package/dist/src/agent/tools/tool-paths.js.map +0 -1
  1922. package/dist/src/agent/tools/truncate.js.map +0 -1
  1923. package/dist/src/agent/tools/tts-tool.js.map +0 -1
  1924. package/dist/src/agent/tools/update-plan-tool.js.map +0 -1
  1925. package/dist/src/agent/tools/url-safety.js.map +0 -1
  1926. package/dist/src/agent/tools/usage-analyzer.js.map +0 -1
  1927. package/dist/src/agent/tools/web-extract.js.map +0 -1
  1928. package/dist/src/agent/tools/web.js.map +0 -1
  1929. package/dist/src/agent/tools/workflow-tool.js.map +0 -1
  1930. package/dist/src/agent/tools/write.js.map +0 -1
  1931. package/dist/src/agent/tools/xopc-use-tool.js.map +0 -1
  1932. package/dist/src/agent/transcript/google-api.js.map +0 -1
  1933. package/dist/src/agent/transcript/model-selection.js.map +0 -1
  1934. package/dist/src/agent/transcript/provider-capabilities.js.map +0 -1
  1935. package/dist/src/agent/transcript/session-transcript-repair.js.map +0 -1
  1936. package/dist/src/agent/transcript/strip-tool-messages.js.map +0 -1
  1937. package/dist/src/agent/transcript/thinking-types.js.map +0 -1
  1938. package/dist/src/agent/transcript/thinking.js.map +0 -1
  1939. package/dist/src/agent/transcript/tool-call-id.js.map +0 -1
  1940. package/dist/src/agent/transcript/transcript-hygiene.js.map +0 -1
  1941. package/dist/src/agent/transcript/transcript-policy.js.map +0 -1
  1942. package/dist/src/agent/workflow/agent-progress.js.map +0 -1
  1943. package/dist/src/agent/workflow/builtins/index.js.map +0 -1
  1944. package/dist/src/agent/workflow/catalog.js.map +0 -1
  1945. package/dist/src/agent/workflow/progress-broker.js.map +0 -1
  1946. package/dist/src/agent/workflow/snapshot-empty.js.map +0 -1
  1947. package/dist/src/agent/workflow/snapshot.js.map +0 -1
  1948. package/dist/src/agent/workflow/step-labels.js.map +0 -1
  1949. package/dist/src/agent/workflow/structured-output-tool.js.map +0 -1
  1950. package/dist/src/agent/workflow/subagent-runner.js.map +0 -1
  1951. package/dist/src/agent/workflow/workflow-child-tools.js.map +0 -1
  1952. package/dist/src/agent/workspace-runtime/registry.js.map +0 -1
  1953. package/dist/src/agent-manifest/index.js.map +0 -1
  1954. package/dist/src/agent-manifest/preset-chain.js.map +0 -1
  1955. package/dist/src/agent-manifest/prompt.js.map +0 -1
  1956. package/dist/src/agent-manifest/resolver.js.map +0 -1
  1957. package/dist/src/agent-manifest/schema.js.map +0 -1
  1958. package/dist/src/agent-manifest/validator.js.map +0 -1
  1959. package/dist/src/agent-runtime/boundary-guard.js.map +0 -1
  1960. package/dist/src/agent-runtime/memory-runtime.js.map +0 -1
  1961. package/dist/src/agent-runtime/model-router.js.map +0 -1
  1962. package/dist/src/agent-runtime/run-trace.js.map +0 -1
  1963. package/dist/src/agent-runtime/runtime-profile.js.map +0 -1
  1964. package/dist/src/agent-runtime/tool-registry.js.map +0 -1
  1965. package/dist/src/agent-runtime/workflow-runtime.js.map +0 -1
  1966. package/dist/src/ai-assist/text-assist.js.map +0 -1
  1967. package/dist/src/auth/credentials.js.map +0 -1
  1968. package/dist/src/auth/index.js.map +0 -1
  1969. package/dist/src/auth/oauth/anthropic.js.map +0 -1
  1970. package/dist/src/auth/oauth/github-copilot.js.map +0 -1
  1971. package/dist/src/auth/oauth/google-oauth/google-antigravity.js.map +0 -1
  1972. package/dist/src/auth/oauth/google-oauth/google-gemini-cli.js.map +0 -1
  1973. package/dist/src/auth/oauth/google-oauth/oauth-page.js.map +0 -1
  1974. package/dist/src/auth/oauth/google-oauth/pkce.js.map +0 -1
  1975. package/dist/src/auth/oauth/kimi-coding.js.map +0 -1
  1976. package/dist/src/auth/oauth/minimax-cn.js.map +0 -1
  1977. package/dist/src/auth/oauth/minimax.js.map +0 -1
  1978. package/dist/src/auth/oauth/openai-codex.js.map +0 -1
  1979. package/dist/src/auth/oauth/pkce.js.map +0 -1
  1980. package/dist/src/auth/profiles/oauth.js.map +0 -1
  1981. package/dist/src/auth/profiles/order.js.map +0 -1
  1982. package/dist/src/auth/profiles/profiles.js.map +0 -1
  1983. package/dist/src/auth/profiles/store.js.map +0 -1
  1984. package/dist/src/auth/sync-provider-auth.js.map +0 -1
  1985. package/dist/src/automations/api/routes.js.map +0 -1
  1986. package/dist/src/automations/domain/schedule.js.map +0 -1
  1987. package/dist/src/automations/domain/validation.js.map +0 -1
  1988. package/dist/src/automations/draft/automation-draft-prompt.js.map +0 -1
  1989. package/dist/src/automations/draft/automation-draft-service.js.map +0 -1
  1990. package/dist/src/automations/draft/automation-draft-validator.js.map +0 -1
  1991. package/dist/src/automations/product-events.js.map +0 -1
  1992. package/dist/src/automations/service/action-executor.js.map +0 -1
  1993. package/dist/src/automations/service/automation-service.js.map +0 -1
  1994. package/dist/src/automations/storage/automation-repository.js.map +0 -1
  1995. package/dist/src/automations/storage/automation-run-repository.js.map +0 -1
  1996. package/dist/src/browser/actions/extension-registry-bridge.js.map +0 -1
  1997. package/dist/src/browser/actions/registry.js.map +0 -1
  1998. package/dist/src/browser/backend-from-config.js.map +0 -1
  1999. package/dist/src/browser/browser-command-timeout.js.map +0 -1
  2000. package/dist/src/browser/cache-dir-policy.js.map +0 -1
  2001. package/dist/src/browser/cdp-local-launcher.js.map +0 -1
  2002. package/dist/src/browser/cdp-supervisor.js.map +0 -1
  2003. package/dist/src/browser/free-port.js.map +0 -1
  2004. package/dist/src/browser/humanize.js.map +0 -1
  2005. package/dist/src/browser/install-lock.js.map +0 -1
  2006. package/dist/src/browser/manager.js.map +0 -1
  2007. package/dist/src/browser/pipeline/output.js.map +0 -1
  2008. package/dist/src/browser/pipeline/runner.js.map +0 -1
  2009. package/dist/src/browser/pipeline/schema.js.map +0 -1
  2010. package/dist/src/browser/pipeline/source.js.map +0 -1
  2011. package/dist/src/browser/pipeline/template.js.map +0 -1
  2012. package/dist/src/browser/providers/browser-ext-install.js.map +0 -1
  2013. package/dist/src/browser/providers/browser-use.js.map +0 -1
  2014. package/dist/src/browser/providers/browserbase.js.map +0 -1
  2015. package/dist/src/browser/providers/cloakbrowser.js.map +0 -1
  2016. package/dist/src/browser/providers/extension-ws-acquire.js.map +0 -1
  2017. package/dist/src/browser/providers/extension.js.map +0 -1
  2018. package/dist/src/browser/providers/playwright-doctor.js.map +0 -1
  2019. package/dist/src/browser/providers/playwright-install.js.map +0 -1
  2020. package/dist/src/browser/readiness.js.map +0 -1
  2021. package/dist/src/browser/schemas.js.map +0 -1
  2022. package/dist/src/browser/session-lifecycle.js.map +0 -1
  2023. package/dist/src/browser/snapshot-helpers.js.map +0 -1
  2024. package/dist/src/browser/stealth.js.map +0 -1
  2025. package/dist/src/browser/url-policy.js.map +0 -1
  2026. package/dist/src/capabilities/store-connector.js.map +0 -1
  2027. package/dist/src/channels/attachments/attachment-classifiers.js.map +0 -1
  2028. package/dist/src/channels/attachments/inbound-persist.js.map +0 -1
  2029. package/dist/src/channels/attachments/inbound-types.js.map +0 -1
  2030. package/dist/src/channels/attachments/outbound-tts-persist.js.map +0 -1
  2031. package/dist/src/channels/attachments/voice-stt-webchat.js.map +0 -1
  2032. package/dist/src/channels/catalog/channel-catalog-service.js.map +0 -1
  2033. package/dist/src/channels/config-helpers.js.map +0 -1
  2034. package/dist/src/channels/envelope-timestamp.js.map +0 -1
  2035. package/dist/src/channels/exec-approval-runtime.js.map +0 -1
  2036. package/dist/src/channels/health-monitor.js.map +0 -1
  2037. package/dist/src/channels/heartbeat-scheduler.js.map +0 -1
  2038. package/dist/src/channels/internal-outbound.js.map +0 -1
  2039. package/dist/src/channels/lifecycle-supervisor.js.map +0 -1
  2040. package/dist/src/channels/manager.js.map +0 -1
  2041. package/dist/src/channels/media.js.map +0 -1
  2042. package/dist/src/channels/outbound/deliver.js.map +0 -1
  2043. package/dist/src/channels/outbound/normalize.js.map +0 -1
  2044. package/dist/src/channels/outbound/persist-store.js.map +0 -1
  2045. package/dist/src/channels/outbound/queue.js.map +0 -1
  2046. package/dist/src/channels/outbound-sender.js.map +0 -1
  2047. package/dist/src/channels/pairing/allow-from-file.js.map +0 -1
  2048. package/dist/src/channels/pairing/approve-cli.js.map +0 -1
  2049. package/dist/src/channels/pairing/pairing-challenge.js.map +0 -1
  2050. package/dist/src/channels/pairing/pairing-constants.js.map +0 -1
  2051. package/dist/src/channels/pairing/pairing-events.js.map +0 -1
  2052. package/dist/src/channels/pairing/pairing-messages.js.map +0 -1
  2053. package/dist/src/channels/pairing/pairing-service.js.map +0 -1
  2054. package/dist/src/channels/pairing/pairing-store-adapter.js.map +0 -1
  2055. package/dist/src/channels/pairing/pairing-store.js.map +0 -1
  2056. package/dist/src/channels/pairing/paths.js.map +0 -1
  2057. package/dist/src/channels/pairing/preseed-allow-from.js.map +0 -1
  2058. package/dist/src/channels/pipeline.js.map +0 -1
  2059. package/dist/src/channels/plugin-registry.js.map +0 -1
  2060. package/dist/src/channels/plugins/registry.js.map +0 -1
  2061. package/dist/src/channels/restart-policy.js.map +0 -1
  2062. package/dist/src/channels/security-helpers.js.map +0 -1
  2063. package/dist/src/channels/security.js.map +0 -1
  2064. package/dist/src/channels/setup-wizard-discovery.js.map +0 -1
  2065. package/dist/src/chat-commands/agent-edit.js.map +0 -1
  2066. package/dist/src/chat-commands/builtins/config.js.map +0 -1
  2067. package/dist/src/chat-commands/builtins/context.js.map +0 -1
  2068. package/dist/src/chat-commands/builtins/goal.js.map +0 -1
  2069. package/dist/src/chat-commands/builtins/model.js.map +0 -1
  2070. package/dist/src/chat-commands/builtins/review.js.map +0 -1
  2071. package/dist/src/chat-commands/builtins/session.js.map +0 -1
  2072. package/dist/src/chat-commands/builtins/skill.js.map +0 -1
  2073. package/dist/src/chat-commands/builtins/subgoal.js.map +0 -1
  2074. package/dist/src/chat-commands/builtins/system.js.map +0 -1
  2075. package/dist/src/chat-commands/builtins/thinking.js.map +0 -1
  2076. package/dist/src/chat-commands/builtins/tts.js.map +0 -1
  2077. package/dist/src/chat-commands/builtins/workflow.js.map +0 -1
  2078. package/dist/src/chat-commands/command-parse.js.map +0 -1
  2079. package/dist/src/chat-commands/config-paths.js.map +0 -1
  2080. package/dist/src/chat-commands/config-value.js.map +0 -1
  2081. package/dist/src/chat-commands/context.js.map +0 -1
  2082. package/dist/src/chat-commands/format-output.js.map +0 -1
  2083. package/dist/src/chat-commands/index.js.map +0 -1
  2084. package/dist/src/chat-commands/processor.js.map +0 -1
  2085. package/dist/src/chat-commands/registry.js.map +0 -1
  2086. package/dist/src/chat-commands/session-key.js.map +0 -1
  2087. package/dist/src/cli/argv-invocation.js.map +0 -1
  2088. package/dist/src/cli/argv.js.map +0 -1
  2089. package/dist/src/cli/bin.js.map +0 -1
  2090. package/dist/src/cli/cli-log-level-preset.js.map +0 -1
  2091. package/dist/src/cli/command-catalog.js.map +0 -1
  2092. package/dist/src/cli/command-loaders.js.map +0 -1
  2093. package/dist/src/cli/command-manifest.js.map +0 -1
  2094. package/dist/src/cli/command-path-matches.js.map +0 -1
  2095. package/dist/src/cli/command-path-policy.js.map +0 -1
  2096. package/dist/src/cli/command-startup-policy.js.map +0 -1
  2097. package/dist/src/cli/commands/agent/interactive.js.map +0 -1
  2098. package/dist/src/cli/commands/agent/sessions.js.map +0 -1
  2099. package/dist/src/cli/commands/agent/stream-renderer.js.map +0 -1
  2100. package/dist/src/cli/commands/agent.js.map +0 -1
  2101. package/dist/src/cli/commands/agents.js.map +0 -1
  2102. package/dist/src/cli/commands/auth.js.map +0 -1
  2103. package/dist/src/cli/commands/browser-cli-helpers.js.map +0 -1
  2104. package/dist/src/cli/commands/browser.js.map +0 -1
  2105. package/dist/src/cli/commands/channels.js.map +0 -1
  2106. package/dist/src/cli/commands/config.js.map +0 -1
  2107. package/dist/src/cli/commands/connectors.js.map +0 -1
  2108. package/dist/src/cli/commands/doctor/checks/channel-config.js.map +0 -1
  2109. package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js.map +0 -1
  2110. package/dist/src/cli/commands/doctor/checks/channel-plugins.js.map +0 -1
  2111. package/dist/src/cli/commands/doctor/checks/config-health.js.map +0 -1
  2112. package/dist/src/cli/commands/doctor/checks/database-schema.js.map +0 -1
  2113. package/dist/src/cli/commands/doctor/checks/gateway-health.js.map +0 -1
  2114. package/dist/src/cli/commands/doctor/checks/gateway-service.js.map +0 -1
  2115. package/dist/src/cli/commands/doctor/checks/migrations.js.map +0 -1
  2116. package/dist/src/cli/commands/doctor/checks/node-version.js.map +0 -1
  2117. package/dist/src/cli/commands/doctor/checks/provider-auth.js.map +0 -1
  2118. package/dist/src/cli/commands/doctor/checks/security-audit.js.map +0 -1
  2119. package/dist/src/cli/commands/doctor/checks/session-integrity.js.map +0 -1
  2120. package/dist/src/cli/commands/doctor/checks/state-integrity.js.map +0 -1
  2121. package/dist/src/cli/commands/doctor/checks/version-check.js.map +0 -1
  2122. package/dist/src/cli/commands/doctor/checks/workspace-status.js.map +0 -1
  2123. package/dist/src/cli/commands/doctor/flow.js.map +0 -1
  2124. package/dist/src/cli/commands/doctor/format.js.map +0 -1
  2125. package/dist/src/cli/commands/doctor/index.js.map +0 -1
  2126. package/dist/src/cli/commands/extension-create.js.map +0 -1
  2127. package/dist/src/cli/commands/extension-dev.js.map +0 -1
  2128. package/dist/src/cli/commands/extension-marketplace.js.map +0 -1
  2129. package/dist/src/cli/commands/extension-pack.js.map +0 -1
  2130. package/dist/src/cli/commands/extension.js.map +0 -1
  2131. package/dist/src/cli/commands/gateway/call.js.map +0 -1
  2132. package/dist/src/cli/commands/gateway/health.js.map +0 -1
  2133. package/dist/src/cli/commands/gateway/lifecycle-core.js.map +0 -1
  2134. package/dist/src/cli/commands/gateway/lifecycle.js.map +0 -1
  2135. package/dist/src/cli/commands/gateway/logs.js.map +0 -1
  2136. package/dist/src/cli/commands/gateway/probe.js.map +0 -1
  2137. package/dist/src/cli/commands/gateway/restart-health.js.map +0 -1
  2138. package/dist/src/cli/commands/gateway/restart.js.map +0 -1
  2139. package/dist/src/cli/commands/gateway/run-foreground.js.map +0 -1
  2140. package/dist/src/cli/commands/gateway/service.js.map +0 -1
  2141. package/dist/src/cli/commands/gateway/shared.js.map +0 -1
  2142. package/dist/src/cli/commands/gateway/status.js.map +0 -1
  2143. package/dist/src/cli/commands/gateway/stop.js.map +0 -1
  2144. package/dist/src/cli/commands/gateway/subcommands.js.map +0 -1
  2145. package/dist/src/cli/commands/gateway/token.js.map +0 -1
  2146. package/dist/src/cli/commands/gateway-ssh-tunnel.js.map +0 -1
  2147. package/dist/src/cli/commands/gateway.js.map +0 -1
  2148. package/dist/src/cli/commands/goal.js.map +0 -1
  2149. package/dist/src/cli/commands/image.js.map +0 -1
  2150. package/dist/src/cli/commands/init.js.map +0 -1
  2151. package/dist/src/cli/commands/logs.js.map +0 -1
  2152. package/dist/src/cli/commands/models.js.map +0 -1
  2153. package/dist/src/cli/commands/onboard/channels/index.js.map +0 -1
  2154. package/dist/src/cli/commands/onboard/channels/onboard-to-configurator.js.map +0 -1
  2155. package/dist/src/cli/commands/onboard/channels/registry.js.map +0 -1
  2156. package/dist/src/cli/commands/onboard/channels/wizard-to-configurator.js.map +0 -1
  2157. package/dist/src/cli/commands/onboard/gateway.js.map +0 -1
  2158. package/dist/src/cli/commands/onboard/model.js.map +0 -1
  2159. package/dist/src/cli/commands/onboard.js.map +0 -1
  2160. package/dist/src/cli/commands/profile.js.map +0 -1
  2161. package/dist/src/cli/commands/project.js.map +0 -1
  2162. package/dist/src/cli/commands/providers.js.map +0 -1
  2163. package/dist/src/cli/commands/resume.js.map +0 -1
  2164. package/dist/src/cli/commands/search.js.map +0 -1
  2165. package/dist/src/cli/commands/session/actions.js.map +0 -1
  2166. package/dist/src/cli/commands/session/utils.js.map +0 -1
  2167. package/dist/src/cli/commands/session.js.map +0 -1
  2168. package/dist/src/cli/commands/setup-shared/output.js.map +0 -1
  2169. package/dist/src/cli/commands/setup-shared/prompts.js.map +0 -1
  2170. package/dist/src/cli/commands/setup-shared/runner.js.map +0 -1
  2171. package/dist/src/cli/commands/setup-shared/types.js.map +0 -1
  2172. package/dist/src/cli/commands/setup.js.map +0 -1
  2173. package/dist/src/cli/commands/skills-test.js.map +0 -1
  2174. package/dist/src/cli/commands/skills.js.map +0 -1
  2175. package/dist/src/cli/commands/tailscale.js.map +0 -1
  2176. package/dist/src/cli/commands/tui-runner.js.map +0 -1
  2177. package/dist/src/cli/commands/tui.js.map +0 -1
  2178. package/dist/src/cli/commands/tunnel.js.map +0 -1
  2179. package/dist/src/cli/commands/update.js.map +0 -1
  2180. package/dist/src/cli/commands/voice.js.map +0 -1
  2181. package/dist/src/cli/context.js.map +0 -1
  2182. package/dist/src/cli/extension-cli-register.js.map +0 -1
  2183. package/dist/src/cli/gateway-run-argv.js.map +0 -1
  2184. package/dist/src/cli/gateway-run-fast-path.js.map +0 -1
  2185. package/dist/src/cli/index.js.map +0 -1
  2186. package/dist/src/cli/registry.js.map +0 -1
  2187. package/dist/src/cli/templates.js.map +0 -1
  2188. package/dist/src/cli/utils/colors.js.map +0 -1
  2189. package/dist/src/cli/utils/gateway-client-options.js.map +0 -1
  2190. package/dist/src/cli/utils/gateway-client.js.map +0 -1
  2191. package/dist/src/cli/utils/init-workspace-core.js.map +0 -1
  2192. package/dist/src/cli/utils/init-workspace.js.map +0 -1
  2193. package/dist/src/cli/utils/oauth-login.js.map +0 -1
  2194. package/dist/src/cli/utils/oauth-providers.js.map +0 -1
  2195. package/dist/src/cli/utils/session.js.map +0 -1
  2196. package/dist/src/commands/agents.config.js.map +0 -1
  2197. package/dist/src/config/agent-profile.js.map +0 -1
  2198. package/dist/src/config/agent-typed-models.js.map +0 -1
  2199. package/dist/src/config/commands.flags.js.map +0 -1
  2200. package/dist/src/config/default-model.js.map +0 -1
  2201. package/dist/src/config/diff.js.map +0 -1
  2202. package/dist/src/config/gateway-bind.js.map +0 -1
  2203. package/dist/src/config/index.js.map +0 -1
  2204. package/dist/src/config/loader.js.map +0 -1
  2205. package/dist/src/config/mcp-config-normalize.js.map +0 -1
  2206. package/dist/src/config/model-input.js.map +0 -1
  2207. package/dist/src/config/models-json.js.map +0 -1
  2208. package/dist/src/config/paths-state.js.map +0 -1
  2209. package/dist/src/config/paths.js.map +0 -1
  2210. package/dist/src/config/profile.js.map +0 -1
  2211. package/dist/src/config/public-url.js.map +0 -1
  2212. package/dist/src/config/reload.js.map +0 -1
  2213. package/dist/src/config/resolve-config-value.js.map +0 -1
  2214. package/dist/src/config/rules.js.map +0 -1
  2215. package/dist/src/config/runtime-overrides.js.map +0 -1
  2216. package/dist/src/config/schema.js.map +0 -1
  2217. package/dist/src/config/validate-channel-configs.js.map +0 -1
  2218. package/dist/src/config/voice.js.map +0 -1
  2219. package/dist/src/config/web-patch.js.map +0 -1
  2220. package/dist/src/config/workspace-defaults.js.map +0 -1
  2221. package/dist/src/config/workspace-dirs.js.map +0 -1
  2222. package/dist/src/config/workspace-path-helpers.js.map +0 -1
  2223. package/dist/src/config/workspace-path.js.map +0 -1
  2224. package/dist/src/connectors/approval.js.map +0 -1
  2225. package/dist/src/connectors/auth-provider-registry.js.map +0 -1
  2226. package/dist/src/connectors/builtin-catalog.js.map +0 -1
  2227. package/dist/src/connectors/catalog.js.map +0 -1
  2228. package/dist/src/connectors/composio-catalog.js.map +0 -1
  2229. package/dist/src/connectors/composio-logo.js.map +0 -1
  2230. package/dist/src/connectors/composio-sessions.js.map +0 -1
  2231. package/dist/src/connectors/composio-triggers.js.map +0 -1
  2232. package/dist/src/connectors/composio.js.map +0 -1
  2233. package/dist/src/connectors/connector-memory-sync.js.map +0 -1
  2234. package/dist/src/connectors/health.js.map +0 -1
  2235. package/dist/src/connectors/install.js.map +0 -1
  2236. package/dist/src/connectors/instances.js.map +0 -1
  2237. package/dist/src/connectors/integration-strategy.js.map +0 -1
  2238. package/dist/src/connectors/lifecycle.js.map +0 -1
  2239. package/dist/src/connectors/materialize.js.map +0 -1
  2240. package/dist/src/connectors/policy.js.map +0 -1
  2241. package/dist/src/connectors/providers.js.map +0 -1
  2242. package/dist/src/connectors/registries/modelscope.js.map +0 -1
  2243. package/dist/src/connectors/registries/official-mcp.js.map +0 -1
  2244. package/dist/src/connectors/registries/search.js.map +0 -1
  2245. package/dist/src/connectors/registries/smithery.js.map +0 -1
  2246. package/dist/src/connectors/runtime-adapter-registry.js.map +0 -1
  2247. package/dist/src/connectors/secret-store.js.map +0 -1
  2248. package/dist/src/connectors/setup-secrets.js.map +0 -1
  2249. package/dist/src/connectors/supervisor.js.map +0 -1
  2250. package/dist/src/connectors/usage.js.map +0 -1
  2251. package/dist/src/connectors/workflow-preflight.js.map +0 -1
  2252. package/dist/src/daemon/constants.js.map +0 -1
  2253. package/dist/src/daemon/install-plan.js.map +0 -1
  2254. package/dist/src/daemon/launchd.js.map +0 -1
  2255. package/dist/src/daemon/schtasks.js.map +0 -1
  2256. package/dist/src/daemon/service-audit.js.map +0 -1
  2257. package/dist/src/daemon/service.js.map +0 -1
  2258. package/dist/src/daemon/systemd.js.map +0 -1
  2259. package/dist/src/document-understanding/extract.js.map +0 -1
  2260. package/dist/src/errors/index.js.map +0 -1
  2261. package/dist/src/extensions/activation-context.js.map +0 -1
  2262. package/dist/src/extensions/activation-planner.js.map +0 -1
  2263. package/dist/src/extensions/api.js.map +0 -1
  2264. package/dist/src/extensions/bundle-mcp.js.map +0 -1
  2265. package/dist/src/extensions/bundled-extension-activation.js.map +0 -1
  2266. package/dist/src/extensions/diagnostics.js.map +0 -1
  2267. package/dist/src/extensions/discover-extensions.js.map +0 -1
  2268. package/dist/src/extensions/engine-check.js.map +0 -1
  2269. package/dist/src/extensions/extension-metadata-snapshot.js.map +0 -1
  2270. package/dist/src/extensions/extension-registry-impl.js.map +0 -1
  2271. package/dist/src/extensions/health.js.map +0 -1
  2272. package/dist/src/extensions/hooks.js.map +0 -1
  2273. package/dist/src/extensions/index.js.map +0 -1
  2274. package/dist/src/extensions/install-transaction.js.map +0 -1
  2275. package/dist/src/extensions/install.js.map +0 -1
  2276. package/dist/src/extensions/loader.js.map +0 -1
  2277. package/dist/src/extensions/lockfile.js.map +0 -1
  2278. package/dist/src/extensions/manifest-registry.js.map +0 -1
  2279. package/dist/src/extensions/marketplace.js.map +0 -1
  2280. package/dist/src/extensions/media-provider-contracts.js.map +0 -1
  2281. package/dist/src/extensions/normalize-manifest.js.map +0 -1
  2282. package/dist/src/extensions/onboard-helpers.js.map +0 -1
  2283. package/dist/src/extensions/package-contract.js.map +0 -1
  2284. package/dist/src/extensions/sdk/channel-entry.js.map +0 -1
  2285. package/dist/src/extensions/sdk/channel-helpers.js.map +0 -1
  2286. package/dist/src/extensions/sdk/index.js.map +0 -1
  2287. package/dist/src/extensions/sdk/lazy.js.map +0 -1
  2288. package/dist/src/extensions/sdk/testing.js.map +0 -1
  2289. package/dist/src/extensions/security.js.map +0 -1
  2290. package/dist/src/extensions/slots.js.map +0 -1
  2291. package/dist/src/extensions/speech-provider-contracts.js.map +0 -1
  2292. package/dist/src/extensions/store-zip-limits.js.map +0 -1
  2293. package/dist/src/extensions/typed-event-bus.js.map +0 -1
  2294. package/dist/src/extensions/types/hooks.js.map +0 -1
  2295. package/dist/src/extensions/types/providers.js.map +0 -1
  2296. package/dist/src/extensions/update.js.map +0 -1
  2297. package/dist/src/extensions/when-context.js.map +0 -1
  2298. package/dist/src/extensions/when-expression.js.map +0 -1
  2299. package/dist/src/gateway/agent-builtin-tools.js.map +0 -1
  2300. package/dist/src/gateway/agent-run-relay.js.map +0 -1
  2301. package/dist/src/gateway/agents-admin.js.map +0 -1
  2302. package/dist/src/gateway/auth.js.map +0 -1
  2303. package/dist/src/gateway/capability-presets-admin.js.map +0 -1
  2304. package/dist/src/gateway/chat-limits.js.map +0 -1
  2305. package/dist/src/gateway/chat-stream/mapper.js.map +0 -1
  2306. package/dist/src/gateway/clarify-bridge.js.map +0 -1
  2307. package/dist/src/gateway/clarify-runtime.js.map +0 -1
  2308. package/dist/src/gateway/client-ip.js.map +0 -1
  2309. package/dist/src/gateway/config-tools-web.js.map +0 -1
  2310. package/dist/src/gateway/credential.js.map +0 -1
  2311. package/dist/src/gateway/discovery/mdns.js.map +0 -1
  2312. package/dist/src/gateway/dreaming-automation-reconciler.js.map +0 -1
  2313. package/dist/src/gateway/ensure-network-cors.js.map +0 -1
  2314. package/dist/src/gateway/file-path-classifier.js.map +0 -1
  2315. package/dist/src/gateway/file-reference-registry.js.map +0 -1
  2316. package/dist/src/gateway/global-defaults-admin.js.map +0 -1
  2317. package/dist/src/gateway/heartbeat/service.js.map +0 -1
  2318. package/dist/src/gateway/hono/app.js.map +0 -1
  2319. package/dist/src/gateway/hono/lib/agent-model.js.map +0 -1
  2320. package/dist/src/gateway/hono/lib/config-payload.js.map +0 -1
  2321. package/dist/src/gateway/hono/lib/extension-assets.js.map +0 -1
  2322. package/dist/src/gateway/hono/lib/extension-store.js.map +0 -1
  2323. package/dist/src/gateway/hono/lib/mask-secret-length.js.map +0 -1
  2324. package/dist/src/gateway/hono/lib/route-logger.js.map +0 -1
  2325. package/dist/src/gateway/hono/lib/safe-providers-config.js.map +0 -1
  2326. package/dist/src/gateway/hono/lib/safe-voice-config.js.map +0 -1
  2327. package/dist/src/gateway/hono/lib/startup-unavailable.js.map +0 -1
  2328. package/dist/src/gateway/hono/lib/static-ui.js.map +0 -1
  2329. package/dist/src/gateway/hono/middleware/auth.js.map +0 -1
  2330. package/dist/src/gateway/hono/middleware/log-context.js.map +0 -1
  2331. package/dist/src/gateway/hono/middleware/logger.js.map +0 -1
  2332. package/dist/src/gateway/hono/middleware/route-errors.js.map +0 -1
  2333. package/dist/src/gateway/hono/middleware/scopes.js.map +0 -1
  2334. package/dist/src/gateway/hono/middleware/strict-rate-limit.js.map +0 -1
  2335. package/dist/src/gateway/hono/oauth-async.js.map +0 -1
  2336. package/dist/src/gateway/hono/oauth.js.map +0 -1
  2337. package/dist/src/gateway/hono/routes/activity.js.map +0 -1
  2338. package/dist/src/gateway/hono/routes/agent-stream.js.map +0 -1
  2339. package/dist/src/gateway/hono/routes/agents.js.map +0 -1
  2340. package/dist/src/gateway/hono/routes/ai-assist.js.map +0 -1
  2341. package/dist/src/gateway/hono/routes/auth-registry-extensions.js.map +0 -1
  2342. package/dist/src/gateway/hono/routes/browser-install.js.map +0 -1
  2343. package/dist/src/gateway/hono/routes/browser.js.map +0 -1
  2344. package/dist/src/gateway/hono/routes/capabilities.js.map +0 -1
  2345. package/dist/src/gateway/hono/routes/capability-presets.js.map +0 -1
  2346. package/dist/src/gateway/hono/routes/channels.js.map +0 -1
  2347. package/dist/src/gateway/hono/routes/commands-skills.js.map +0 -1
  2348. package/dist/src/gateway/hono/routes/config-patch/agents.js.map +0 -1
  2349. package/dist/src/gateway/hono/routes/config-patch/channels.js.map +0 -1
  2350. package/dist/src/gateway/hono/routes/config-patch/gateway.js.map +0 -1
  2351. package/dist/src/gateway/hono/routes/config-patch/misc.js.map +0 -1
  2352. package/dist/src/gateway/hono/routes/config-patch/result.js.map +0 -1
  2353. package/dist/src/gateway/hono/routes/config.js.map +0 -1
  2354. package/dist/src/gateway/hono/routes/connectors.js.map +0 -1
  2355. package/dist/src/gateway/hono/routes/doctor.js.map +0 -1
  2356. package/dist/src/gateway/hono/routes/dreaming.js.map +0 -1
  2357. package/dist/src/gateway/hono/routes/exposure.js.map +0 -1
  2358. package/dist/src/gateway/hono/routes/extension-gateway.js.map +0 -1
  2359. package/dist/src/gateway/hono/routes/global-defaults.js.map +0 -1
  2360. package/dist/src/gateway/hono/routes/goals.js.map +0 -1
  2361. package/dist/src/gateway/hono/routes/home.js.map +0 -1
  2362. package/dist/src/gateway/hono/routes/host-fs.js.map +0 -1
  2363. package/dist/src/gateway/hono/routes/index.js.map +0 -1
  2364. package/dist/src/gateway/hono/routes/lazy-bundles.js.map +0 -1
  2365. package/dist/src/gateway/hono/routes/lazy-fallback.js.map +0 -1
  2366. package/dist/src/gateway/hono/routes/local-apps.js.map +0 -1
  2367. package/dist/src/gateway/hono/routes/logs.js.map +0 -1
  2368. package/dist/src/gateway/hono/routes/mcp.js.map +0 -1
  2369. package/dist/src/gateway/hono/routes/media.js.map +0 -1
  2370. package/dist/src/gateway/hono/routes/memory.js.map +0 -1
  2371. package/dist/src/gateway/hono/routes/migrations.js.map +0 -1
  2372. package/dist/src/gateway/hono/routes/mobile.js.map +0 -1
  2373. package/dist/src/gateway/hono/routes/models.js.map +0 -1
  2374. package/dist/src/gateway/hono/routes/notes.js.map +0 -1
  2375. package/dist/src/gateway/hono/routes/projects.js.map +0 -1
  2376. package/dist/src/gateway/hono/routes/public-gateway.js.map +0 -1
  2377. package/dist/src/gateway/hono/routes/search.js.map +0 -1
  2378. package/dist/src/gateway/hono/routes/sessions.js.map +0 -1
  2379. package/dist/src/gateway/hono/routes/shares.js.map +0 -1
  2380. package/dist/src/gateway/hono/routes/site-shares.js.map +0 -1
  2381. package/dist/src/gateway/hono/routes/status.js.map +0 -1
  2382. package/dist/src/gateway/hono/routes/tui.js.map +0 -1
  2383. package/dist/src/gateway/hono/routes/tunnel.js.map +0 -1
  2384. package/dist/src/gateway/hono/routes/update.js.map +0 -1
  2385. package/dist/src/gateway/hono/routes/voice.js.map +0 -1
  2386. package/dist/src/gateway/hono/routes/work-discovery.js.map +0 -1
  2387. package/dist/src/gateway/hono/routes/workflows.js.map +0 -1
  2388. package/dist/src/gateway/hono/routes/workspace.js.map +0 -1
  2389. package/dist/src/gateway/hono/routes/you.js.map +0 -1
  2390. package/dist/src/gateway/hono/sse-json.js.map +0 -1
  2391. package/dist/src/gateway/hono/sse.js.map +0 -1
  2392. package/dist/src/gateway/host.js.map +0 -1
  2393. package/dist/src/gateway/image-capabilities.js.map +0 -1
  2394. package/dist/src/gateway/listen.js.map +0 -1
  2395. package/dist/src/gateway/lock.js.map +0 -1
  2396. package/dist/src/gateway/ports.js.map +0 -1
  2397. package/dist/src/gateway/protocol.js.map +0 -1
  2398. package/dist/src/gateway/public-url.js.map +0 -1
  2399. package/dist/src/gateway/rate-limit/auth-policy.js.map +0 -1
  2400. package/dist/src/gateway/rate-limit/buckets.js.map +0 -1
  2401. package/dist/src/gateway/rate-limit/env-flags.js.map +0 -1
  2402. package/dist/src/gateway/resolve-channel-connect-defer.js.map +0 -1
  2403. package/dist/src/gateway/resolve-webchat-session-key.js.map +0 -1
  2404. package/dist/src/gateway/respawn.js.map +0 -1
  2405. package/dist/src/gateway/run-loop.js.map +0 -1
  2406. package/dist/src/gateway/runtime-config.js.map +0 -1
  2407. package/dist/src/gateway/security/audit.js.map +0 -1
  2408. package/dist/src/gateway/security/csp.js.map +0 -1
  2409. package/dist/src/gateway/security/dangerous-tools.js.map +0 -1
  2410. package/dist/src/gateway/security/external-content.js.map +0 -1
  2411. package/dist/src/gateway/security/known-weak-secrets.js.map +0 -1
  2412. package/dist/src/gateway/security/loopback.js.map +0 -1
  2413. package/dist/src/gateway/security/operator-scopes.js.map +0 -1
  2414. package/dist/src/gateway/security/origin-check.js.map +0 -1
  2415. package/dist/src/gateway/security/preauth-connection-budget.js.map +0 -1
  2416. package/dist/src/gateway/security/secret-equal.js.map +0 -1
  2417. package/dist/src/gateway/server-tailscale.js.map +0 -1
  2418. package/dist/src/gateway/server.js.map +0 -1
  2419. package/dist/src/gateway/service/agent-runner.js.map +0 -1
  2420. package/dist/src/gateway/service/config-coordinator.js.map +0 -1
  2421. package/dist/src/gateway/service/marketplace-service.js.map +0 -1
  2422. package/dist/src/gateway/service/run-gateway-agent.js.map +0 -1
  2423. package/dist/src/gateway/service/session-chat-ids.js.map +0 -1
  2424. package/dist/src/gateway/service/sessions-api.js.map +0 -1
  2425. package/dist/src/gateway/service/sse-hub.js.map +0 -1
  2426. package/dist/src/gateway/service.js.map +0 -1
  2427. package/dist/src/gateway/session-reset-service.js.map +0 -1
  2428. package/dist/src/gateway/startup-readiness.js.map +0 -1
  2429. package/dist/src/gateway/startup-trace.js.map +0 -1
  2430. package/dist/src/gateway/tailscale-auth.js.map +0 -1
  2431. package/dist/src/gateway/tailscale-lifecycle.js.map +0 -1
  2432. package/dist/src/gateway/tls-server.js.map +0 -1
  2433. package/dist/src/gateway/trusted-proxy.js.map +0 -1
  2434. package/dist/src/gateway/user-turn-input.js.map +0 -1
  2435. package/dist/src/gateway/workspace-editor-path.js.map +0 -1
  2436. package/dist/src/gateway/workspace-file-search.js.map +0 -1
  2437. package/dist/src/gateway/workspace-fs-file-list.js.map +0 -1
  2438. package/dist/src/gateway/workspace-heartbeat-path.js.map +0 -1
  2439. package/dist/src/gateway/workspace-ripgrep.js.map +0 -1
  2440. package/dist/src/gateway/ws-security.js.map +0 -1
  2441. package/dist/src/generated/bundled-image-generation-providers.js.map +0 -1
  2442. package/dist/src/goals/goal-contract-draft.js.map +0 -1
  2443. package/dist/src/goals/goal-evidence-review.js.map +0 -1
  2444. package/dist/src/goals/goal-notifications.js.map +0 -1
  2445. package/dist/src/goals/goal-queue-store.js.map +0 -1
  2446. package/dist/src/goals/goal-runner.js.map +0 -1
  2447. package/dist/src/goals/goal-service.js.map +0 -1
  2448. package/dist/src/goals/goal-store.js.map +0 -1
  2449. package/dist/src/goals/goal-workflow-judge.js.map +0 -1
  2450. package/dist/src/heartbeat/active-hours.js.map +0 -1
  2451. package/dist/src/heartbeat/content-check.js.map +0 -1
  2452. package/dist/src/heartbeat/event-prompt.js.map +0 -1
  2453. package/dist/src/heartbeat/tokens.js.map +0 -1
  2454. package/dist/src/heartbeat/wake.js.map +0 -1
  2455. package/dist/src/i18n/format.js.map +0 -1
  2456. package/dist/src/i18n/goals-bundle.js.map +0 -1
  2457. package/dist/src/i18n/locale.js.map +0 -1
  2458. package/dist/src/i18n/locales/goals.en.js.map +0 -1
  2459. package/dist/src/i18n/locales/goals.zh.js.map +0 -1
  2460. package/dist/src/i18n/locales/share-tool.en.js.map +0 -1
  2461. package/dist/src/i18n/locales/share-tool.zh.js.map +0 -1
  2462. package/dist/src/i18n/share-tool-bundle.js.map +0 -1
  2463. package/dist/src/index.js.map +0 -1
  2464. package/dist/src/infra/brew.js.map +0 -1
  2465. package/dist/src/infra/bus/queue.js.map +0 -1
  2466. package/dist/src/infra/debounce.js.map +0 -1
  2467. package/dist/src/infra/exec.js.map +0 -1
  2468. package/dist/src/infra/gateway-process-argv.js.map +0 -1
  2469. package/dist/src/infra/gateway-processes.js.map +0 -1
  2470. package/dist/src/infra/host-env-security-policy.js.map +0 -1
  2471. package/dist/src/infra/host-env-security.js.map +0 -1
  2472. package/dist/src/infra/http-proxy-env.js.map +0 -1
  2473. package/dist/src/infra/is-main.js.map +0 -1
  2474. package/dist/src/infra/json-utf8-bytes.js.map +0 -1
  2475. package/dist/src/infra/node-sqlite.js.map +0 -1
  2476. package/dist/src/infra/package-json.js.map +0 -1
  2477. package/dist/src/infra/package-update-steps.js.map +0 -1
  2478. package/dist/src/infra/path-env.js.map +0 -1
  2479. package/dist/src/infra/path-prepend.js.map +0 -1
  2480. package/dist/src/infra/ports.js.map +0 -1
  2481. package/dist/src/infra/rate-limit/failure-limiter.js.map +0 -1
  2482. package/dist/src/infra/rate-limit/keyed-store.js.map +0 -1
  2483. package/dist/src/infra/rate-limit/rate-limiter.js.map +0 -1
  2484. package/dist/src/infra/restart.js.map +0 -1
  2485. package/dist/src/infra/retry.js.map +0 -1
  2486. package/dist/src/infra/run-command.js.map +0 -1
  2487. package/dist/src/infra/sqlite-errors.js.map +0 -1
  2488. package/dist/src/infra/ssh-tunnel.js.map +0 -1
  2489. package/dist/src/infra/stable-node-path.js.map +0 -1
  2490. package/dist/src/infra/tailscale.js.map +0 -1
  2491. package/dist/src/infra/undici-fetch.js.map +0 -1
  2492. package/dist/src/infra/unhandled-rejections.js.map +0 -1
  2493. package/dist/src/infra/update-channels.js.map +0 -1
  2494. package/dist/src/infra/update-check.js.map +0 -1
  2495. package/dist/src/infra/update-global.js.map +0 -1
  2496. package/dist/src/infra/update-lock.js.map +0 -1
  2497. package/dist/src/infra/update-log.js.map +0 -1
  2498. package/dist/src/infra/update-restart.js.map +0 -1
  2499. package/dist/src/infra/update-runner.js.map +0 -1
  2500. package/dist/src/infra/update-startup.js.map +0 -1
  2501. package/dist/src/infra/warning-filter.js.map +0 -1
  2502. package/dist/src/infra/write-file-atomic.js.map +0 -1
  2503. package/dist/src/knowledge/connected-knowledge-pipeline.js.map +0 -1
  2504. package/dist/src/knowledge/coordinator.js.map +0 -1
  2505. package/dist/src/knowledge/ingestion-service.js.map +0 -1
  2506. package/dist/src/local-apps/acceptance.js.map +0 -1
  2507. package/dist/src/local-apps/preview-runtime-bridge.js.map +0 -1
  2508. package/dist/src/local-apps/runtime-entry.js.map +0 -1
  2509. package/dist/src/local-apps/scaffold.js.map +0 -1
  2510. package/dist/src/local-apps/service.js.map +0 -1
  2511. package/dist/src/local-apps/store.js.map +0 -1
  2512. package/dist/src/markdown/chunk.js.map +0 -1
  2513. package/dist/src/markdown/code-spans.js.map +0 -1
  2514. package/dist/src/markdown/fences.js.map +0 -1
  2515. package/dist/src/markdown/frontmatter.js.map +0 -1
  2516. package/dist/src/markdown/ir.js.map +0 -1
  2517. package/dist/src/markdown/render.js.map +0 -1
  2518. package/dist/src/markdown/tables.js.map +0 -1
  2519. package/dist/src/mcp/channel-bridge.js.map +0 -1
  2520. package/dist/src/mcp/channel-server.js.map +0 -1
  2521. package/dist/src/mcp/channel-shared.js.map +0 -1
  2522. package/dist/src/mcp/channel-tools.js.map +0 -1
  2523. package/dist/src/mcp/gateway-http-client.js.map +0 -1
  2524. package/dist/src/media/media-reference.js.map +0 -1
  2525. package/dist/src/media/paths.js.map +0 -1
  2526. package/dist/src/media/session-references.js.map +0 -1
  2527. package/dist/src/media/store.js.map +0 -1
  2528. package/dist/src/media/uri.js.map +0 -1
  2529. package/dist/src/media-shared/http/api-key-rotation.js.map +0 -1
  2530. package/dist/src/media-shared/http/deadline.js.map +0 -1
  2531. package/dist/src/media-shared/http/private-network.js.map +0 -1
  2532. package/dist/src/media-shared/http/provider-http-errors.js.map +0 -1
  2533. package/dist/src/media-shared/http/provider-http.js.map +0 -1
  2534. package/dist/src/media-shared/http/resolve-provider-http-request-config.js.map +0 -1
  2535. package/dist/src/media-shared/http/ssrf-guard.js.map +0 -1
  2536. package/dist/src/media-shared/http/test-helpers/mock-server.js.map +0 -1
  2537. package/dist/src/media-understanding/audio-transcription-runner.js.map +0 -1
  2538. package/dist/src/media-understanding/openai-compatible-audio.js.map +0 -1
  2539. package/dist/src/media-understanding/registry.js.map +0 -1
  2540. package/dist/src/media-understanding/resolve-entries.js.map +0 -1
  2541. package/dist/src/media-understanding/runner.js.map +0 -1
  2542. package/dist/src/migrations/config/default-capability-preset.js.map +0 -1
  2543. package/dist/src/migrations/registry.js.map +0 -1
  2544. package/dist/src/migrations/runner.js.map +0 -1
  2545. package/dist/src/mobile/notification-service.js.map +0 -1
  2546. package/dist/src/mobile/notification-store.js.map +0 -1
  2547. package/dist/src/mobile/notification-types.js.map +0 -1
  2548. package/dist/src/notes/agent-context.js.map +0 -1
  2549. package/dist/src/notes/attachment-ref.js.map +0 -1
  2550. package/dist/src/notes/note-attachment-sync.js.map +0 -1
  2551. package/dist/src/notes/note-index-meta.js.map +0 -1
  2552. package/dist/src/notes/note-markdown.js.map +0 -1
  2553. package/dist/src/notes/paths.js.map +0 -1
  2554. package/dist/src/notes/service.js.map +0 -1
  2555. package/dist/src/notes/store.js.map +0 -1
  2556. package/dist/src/package-version.js.map +0 -1
  2557. package/dist/src/pets/factory.js.map +0 -1
  2558. package/dist/src/pets/manifest.js.map +0 -1
  2559. package/dist/src/pets/validator.js.map +0 -1
  2560. package/dist/src/process/kill-tree.js.map +0 -1
  2561. package/dist/src/project-trust/trust-store.js.map +0 -1
  2562. package/dist/src/projects/automation-bind.js.map +0 -1
  2563. package/dist/src/projects/goal-bind.js.map +0 -1
  2564. package/dist/src/projects/memory-bind.js.map +0 -1
  2565. package/dist/src/projects/project-agent-suggestion.js.map +0 -1
  2566. package/dist/src/projects/project-agent.js.map +0 -1
  2567. package/dist/src/projects/project-kind.js.map +0 -1
  2568. package/dist/src/projects/project-loop.js.map +0 -1
  2569. package/dist/src/projects/project-service.js.map +0 -1
  2570. package/dist/src/projects/project-store.js.map +0 -1
  2571. package/dist/src/projects/session-bind.js.map +0 -1
  2572. package/dist/src/projects/workflow-bind.js.map +0 -1
  2573. package/dist/src/projects/workspace-project.js.map +0 -1
  2574. package/dist/src/projects/workspace.js.map +0 -1
  2575. package/dist/src/providers/auth-runtime/auth-profile-store.js.map +0 -1
  2576. package/dist/src/providers/auth-runtime/is-configured.js.map +0 -1
  2577. package/dist/src/providers/auth-runtime/oauth.js.map +0 -1
  2578. package/dist/src/providers/auth-runtime/resolve-api-key.js.map +0 -1
  2579. package/dist/src/providers/auth-runtime/resolve-auth.js.map +0 -1
  2580. package/dist/src/providers/constants.js.map +0 -1
  2581. package/dist/src/providers/domestic-presets.js.map +0 -1
  2582. package/dist/src/providers/env-keys.js.map +0 -1
  2583. package/dist/src/providers/extension-stream-bridge.js.map +0 -1
  2584. package/dist/src/providers/index.js.map +0 -1
  2585. package/dist/src/providers/model-call.js.map +0 -1
  2586. package/dist/src/providers/model-discovery.js.map +0 -1
  2587. package/dist/src/providers/model-registry.js.map +0 -1
  2588. package/dist/src/providers/model-supplements.js.map +0 -1
  2589. package/dist/src/providers/plugin-registry.js.map +0 -1
  2590. package/dist/src/providers/presentation.js.map +0 -1
  2591. package/dist/src/remote-access/exposure-guards.js.map +0 -1
  2592. package/dist/src/remote-access/exposure-manager.js.map +0 -1
  2593. package/dist/src/review/review-git.js.map +0 -1
  2594. package/dist/src/review/review-types.js.map +0 -1
  2595. package/dist/src/routing/account-id.js.map +0 -1
  2596. package/dist/src/routing/agent-session-key.js.map +0 -1
  2597. package/dist/src/routing/bindings.js.map +0 -1
  2598. package/dist/src/routing/index.js.map +0 -1
  2599. package/dist/src/routing/resolve-route.js.map +0 -1
  2600. package/dist/src/routing/resolve-tui-session-key.js.map +0 -1
  2601. package/dist/src/routing/session-key-utils.js.map +0 -1
  2602. package/dist/src/routing/session-key.js.map +0 -1
  2603. package/dist/src/session/abort-cutoff.js.map +0 -1
  2604. package/dist/src/session/chat-export.js.map +0 -1
  2605. package/dist/src/session/client-history.js.map +0 -1
  2606. package/dist/src/session/compaction-checkpoints.js.map +0 -1
  2607. package/dist/src/session/config-store.js.map +0 -1
  2608. package/dist/src/session/init-session-turn.js.map +0 -1
  2609. package/dist/src/session/lifecycle-timestamps.js.map +0 -1
  2610. package/dist/src/session/load-jsonl-entries.js.map +0 -1
  2611. package/dist/src/session/manager.js.map +0 -1
  2612. package/dist/src/session/patch-metadata.js.map +0 -1
  2613. package/dist/src/session/reset-policy.js.map +0 -1
  2614. package/dist/src/session/reset-triggers.js.map +0 -1
  2615. package/dist/src/session/reset-type.js.map +0 -1
  2616. package/dist/src/session/resolve-session.js.map +0 -1
  2617. package/dist/src/session/session-context-for-llm.js.map +0 -1
  2618. package/dist/src/session/session-id.js.map +0 -1
  2619. package/dist/src/session/session-title.js.map +0 -1
  2620. package/dist/src/session/session-workspace.js.map +0 -1
  2621. package/dist/src/session/store.js.map +0 -1
  2622. package/dist/src/session/stored-rows-to-file-entries.js.map +0 -1
  2623. package/dist/src/session/thinking-resolve.js.map +0 -1
  2624. package/dist/src/session/transcript-events.js.map +0 -1
  2625. package/dist/src/session/transcript-format.js.map +0 -1
  2626. package/dist/src/session/transcript-outline.js.map +0 -1
  2627. package/dist/src/session/transcript-stats.js.map +0 -1
  2628. package/dist/src/session/types.js.map +0 -1
  2629. package/dist/src/session/user-round-delete.js.map +0 -1
  2630. package/dist/src/share/share-audit.js.map +0 -1
  2631. package/dist/src/share/share-auto.js.map +0 -1
  2632. package/dist/src/share/share-config.js.map +0 -1
  2633. package/dist/src/share/share-landing.js.map +0 -1
  2634. package/dist/src/share/share-rate-limit.js.map +0 -1
  2635. package/dist/src/share/share-store.js.map +0 -1
  2636. package/dist/src/share/share-thumbnail.js.map +0 -1
  2637. package/dist/src/share/share-types.js.map +0 -1
  2638. package/dist/src/share/share-url.js.map +0 -1
  2639. package/dist/src/share/share-zip.js.map +0 -1
  2640. package/dist/src/share/site-proxy.js.map +0 -1
  2641. package/dist/src/share/site-share-config.js.map +0 -1
  2642. package/dist/src/share/site-share-router.js.map +0 -1
  2643. package/dist/src/share/site-share-store.js.map +0 -1
  2644. package/dist/src/share/site-share-types.js.map +0 -1
  2645. package/dist/src/share/site-static-serve.js.map +0 -1
  2646. package/dist/src/storage/sqlite/activity-repository.js.map +0 -1
  2647. package/dist/src/storage/sqlite/config-repository.js.map +0 -1
  2648. package/dist/src/storage/sqlite/connection.js.map +0 -1
  2649. package/dist/src/storage/sqlite/connector-repository.js.map +0 -1
  2650. package/dist/src/storage/sqlite/fts.js.map +0 -1
  2651. package/dist/src/storage/sqlite/knowledge-repository.js.map +0 -1
  2652. package/dist/src/storage/sqlite/memory-index-repository.js.map +0 -1
  2653. package/dist/src/storage/sqlite/memory-records-repository.js.map +0 -1
  2654. package/dist/src/storage/sqlite/memory-reference-consent-repository.js.map +0 -1
  2655. package/dist/src/storage/sqlite/migrations/discover.js.map +0 -1
  2656. package/dist/src/storage/sqlite/migrations/errors.js.map +0 -1
  2657. package/dist/src/storage/sqlite/migrations/runner.js.map +0 -1
  2658. package/dist/src/storage/sqlite/note-agent-context-repository.js.map +0 -1
  2659. package/dist/src/storage/sqlite/notes-repository.js.map +0 -1
  2660. package/dist/src/storage/sqlite/paths.js.map +0 -1
  2661. package/dist/src/storage/sqlite/row-mappers.js.map +0 -1
  2662. package/dist/src/storage/sqlite/schema-version.js.map +0 -1
  2663. package/dist/src/storage/sqlite/schema.js.map +0 -1
  2664. package/dist/src/storage/sqlite/session-metadata.js.map +0 -1
  2665. package/dist/src/storage/sqlite/session-repository.js.map +0 -1
  2666. package/dist/src/storage/sqlite/transaction.js.map +0 -1
  2667. package/dist/src/storage/sqlite/transcript-repository.js.map +0 -1
  2668. package/dist/src/storage/sqlite/user-profile-setup-repository.js.map +0 -1
  2669. package/dist/src/storage/sqlite/user-trust-repository.js.map +0 -1
  2670. package/dist/src/tui/backends/embedded-backend.js.map +0 -1
  2671. package/dist/src/tui/backends/gateway-sse-backend.js.map +0 -1
  2672. package/dist/src/tui/chat-history.js.map +0 -1
  2673. package/dist/src/tui/clipboard-image.js.map +0 -1
  2674. package/dist/src/tui/clipboard-text.js.map +0 -1
  2675. package/dist/src/tui/components/assistant-message.js.map +0 -1
  2676. package/dist/src/tui/components/bash-execution.js.map +0 -1
  2677. package/dist/src/tui/components/bash-summary.js.map +0 -1
  2678. package/dist/src/tui/components/branch-message-summary.js.map +0 -1
  2679. package/dist/src/tui/components/branch-summary.js.map +0 -1
  2680. package/dist/src/tui/components/chat-log.js.map +0 -1
  2681. package/dist/src/tui/components/compaction-summary.js.map +0 -1
  2682. package/dist/src/tui/components/custom-editor.js.map +0 -1
  2683. package/dist/src/tui/components/custom-message.js.map +0 -1
  2684. package/dist/src/tui/components/dynamic-border.js.map +0 -1
  2685. package/dist/src/tui/components/extension-dialog.js.map +0 -1
  2686. package/dist/src/tui/components/fuzzy-filter.js.map +0 -1
  2687. package/dist/src/tui/components/scoped-models-selector.js.map +0 -1
  2688. package/dist/src/tui/components/searchable-select-list.js.map +0 -1
  2689. package/dist/src/tui/components/session-selector.js.map +0 -1
  2690. package/dist/src/tui/components/settings-selector.js.map +0 -1
  2691. package/dist/src/tui/components/thinking-selector.js.map +0 -1
  2692. package/dist/src/tui/components/tool-execution.js.map +0 -1
  2693. package/dist/src/tui/components/tui-bottom-bar.js.map +0 -1
  2694. package/dist/src/tui/components/tui-header.js.map +0 -1
  2695. package/dist/src/tui/components/user-message.js.map +0 -1
  2696. package/dist/src/tui/components/visual-truncate.js.map +0 -1
  2697. package/dist/src/tui/extension-host/autocomplete.js.map +0 -1
  2698. package/dist/src/tui/extension-host/host.js.map +0 -1
  2699. package/dist/src/tui/extension-host/load-extensions.js.map +0 -1
  2700. package/dist/src/tui/extension-host/runtime-context.js.map +0 -1
  2701. package/dist/src/tui/extension-host/runtime.js.map +0 -1
  2702. package/dist/src/tui/extension-host/surface.js.map +0 -1
  2703. package/dist/src/tui/extension-host/tool-renderers.js.map +0 -1
  2704. package/dist/src/tui/format-tui-hotkeys.js.map +0 -1
  2705. package/dist/src/tui/sse-consumer.js.map +0 -1
  2706. package/dist/src/tui/theme/dark.js.map +0 -1
  2707. package/dist/src/tui/theme/light.js.map +0 -1
  2708. package/dist/src/tui/theme-manager.js.map +0 -1
  2709. package/dist/src/tui/theme.js.map +0 -1
  2710. package/dist/src/tui/tool-summary.js.map +0 -1
  2711. package/dist/src/tui/tui-agent-events.js.map +0 -1
  2712. package/dist/src/tui/tui-command-formatters.js.map +0 -1
  2713. package/dist/src/tui/tui-commands.js.map +0 -1
  2714. package/dist/src/tui/tui-context-usage.js.map +0 -1
  2715. package/dist/src/tui/tui-extension-user-message.js.map +0 -1
  2716. package/dist/src/tui/tui-fd-path.js.map +0 -1
  2717. package/dist/src/tui/tui-file-autocomplete.js.map +0 -1
  2718. package/dist/src/tui/tui-follow-up-queue.js.map +0 -1
  2719. package/dist/src/tui/tui-git-branch.js.map +0 -1
  2720. package/dist/src/tui/tui-keybindings-file.js.map +0 -1
  2721. package/dist/src/tui/tui-lifecycle.js.map +0 -1
  2722. package/dist/src/tui/tui-local-shell.js.map +0 -1
  2723. package/dist/src/tui/tui-model-picker.js.map +0 -1
  2724. package/dist/src/tui/tui-oauth-login.js.map +0 -1
  2725. package/dist/src/tui/tui-overlays.js.map +0 -1
  2726. package/dist/src/tui/tui-picker-overlay.js.map +0 -1
  2727. package/dist/src/tui/tui-run-state.js.map +0 -1
  2728. package/dist/src/tui/tui-run-status-format.js.map +0 -1
  2729. package/dist/src/tui/tui-runtime-hints.js.map +0 -1
  2730. package/dist/src/tui/tui-scoped-models.js.map +0 -1
  2731. package/dist/src/tui/tui-session-actions.js.map +0 -1
  2732. package/dist/src/tui/tui-session-format.js.map +0 -1
  2733. package/dist/src/tui/tui-session-snapshot.js.map +0 -1
  2734. package/dist/src/tui/tui-session-stats.js.map +0 -1
  2735. package/dist/src/tui/tui-settings.js.map +0 -1
  2736. package/dist/src/tui/tui-skills-autocomplete.js.map +0 -1
  2737. package/dist/src/tui/tui-startup-resources.js.map +0 -1
  2738. package/dist/src/tui/tui-startup-text.js.map +0 -1
  2739. package/dist/src/tui/tui-stdio-filter.js.map +0 -1
  2740. package/dist/src/tui/tui-submit.js.map +0 -1
  2741. package/dist/src/tui/tui-suspend.js.map +0 -1
  2742. package/dist/src/tui/tui-timeline-picker.js.map +0 -1
  2743. package/dist/src/tui/tui-timeline.js.map +0 -1
  2744. package/dist/src/tui/tui-tool-diff.js.map +0 -1
  2745. package/dist/src/tui/tui-tool-result.js.map +0 -1
  2746. package/dist/src/tui/tui-transcript-tree-picker.js.map +0 -1
  2747. package/dist/src/tui/tui-transcript-tree.js.map +0 -1
  2748. package/dist/src/tui/tui-types.js.map +0 -1
  2749. package/dist/src/tui/tui-workflow-slash.js.map +0 -1
  2750. package/dist/src/tui/tui.js.map +0 -1
  2751. package/dist/src/tui/xopc-tui-keybindings.js.map +0 -1
  2752. package/dist/src/tunnel/broker-client.js.map +0 -1
  2753. package/dist/src/tunnel/consent.js.map +0 -1
  2754. package/dist/src/tunnel/enable-lan-pairing.js.map +0 -1
  2755. package/dist/src/tunnel/env.js.map +0 -1
  2756. package/dist/src/tunnel/frp-subdomain-host.js.map +0 -1
  2757. package/dist/src/tunnel/frpc-binary.js.map +0 -1
  2758. package/dist/src/tunnel/frpc-config.js.map +0 -1
  2759. package/dist/src/tunnel/frpc-extract.js.map +0 -1
  2760. package/dist/src/tunnel/frpc-process.js.map +0 -1
  2761. package/dist/src/tunnel/gateway-lifecycle.js.map +0 -1
  2762. package/dist/src/tunnel/pair-context.js.map +0 -1
  2763. package/dist/src/tunnel/pair-url.js.map +0 -1
  2764. package/dist/src/tunnel/pairing-rate-limit.js.map +0 -1
  2765. package/dist/src/tunnel/pairing.js.map +0 -1
  2766. package/dist/src/tunnel/tunnel-audit.js.map +0 -1
  2767. package/dist/src/tunnel/tunnel-config.js.map +0 -1
  2768. package/dist/src/tunnel/tunnel-persist.js.map +0 -1
  2769. package/dist/src/tunnel/tunnel-qr.js.map +0 -1
  2770. package/dist/src/tunnel/tunnel-rate-limit.js.map +0 -1
  2771. package/dist/src/tunnel/tunnel-service.js.map +0 -1
  2772. package/dist/src/tunnel/tunnel-state.js.map +0 -1
  2773. package/dist/src/tunnel/well-known.js.map +0 -1
  2774. package/dist/src/user-context/config.js.map +0 -1
  2775. package/dist/src/user-context/import.js.map +0 -1
  2776. package/dist/src/user-context/owner.js.map +0 -1
  2777. package/dist/src/user-context/profile.js.map +0 -1
  2778. package/dist/src/user-context/projection.js.map +0 -1
  2779. package/dist/src/user-context/runtime.js.map +0 -1
  2780. package/dist/src/user-context/source-recommendations.js.map +0 -1
  2781. package/dist/src/user-context/trust-policy.js.map +0 -1
  2782. package/dist/src/utils/global-singleton.js.map +0 -1
  2783. package/dist/src/utils/helpers.js.map +0 -1
  2784. package/dist/src/utils/index.js.map +0 -1
  2785. package/dist/src/utils/is-record.js.map +0 -1
  2786. package/dist/src/utils/logger/audit.js.map +0 -1
  2787. package/dist/src/utils/logger/config.js.map +0 -1
  2788. package/dist/src/utils/logger/context.js.map +0 -1
  2789. package/dist/src/utils/logger/exporters.js.map +0 -1
  2790. package/dist/src/utils/logger/index.js.map +0 -1
  2791. package/dist/src/utils/logger/log-store.js.map +0 -1
  2792. package/dist/src/utils/logger/log-stream.js.map +0 -1
  2793. package/dist/src/utils/logger/pino-record.js.map +0 -1
  2794. package/dist/src/utils/logger/redact.js.map +0 -1
  2795. package/dist/src/utils/logger/rotation.js.map +0 -1
  2796. package/dist/src/utils/logger/shutdown.js.map +0 -1
  2797. package/dist/src/utils/logger/stats.js.map +0 -1
  2798. package/dist/src/utils/logger/streams.js.map +0 -1
  2799. package/dist/src/utils/logger/types.js.map +0 -1
  2800. package/dist/src/utils/logger.js.map +0 -1
  2801. package/dist/src/utils/redact-sensitive-url.js.map +0 -1
  2802. package/dist/src/utils/sanitize-log.js.map +0 -1
  2803. package/dist/src/utils/string-coerce.js.map +0 -1
  2804. package/dist/src/voice/language-profile.js.map +0 -1
  2805. package/dist/src/voice/local/model-files.js.map +0 -1
  2806. package/dist/src/voice/local/model-manager.js.map +0 -1
  2807. package/dist/src/voice/local/models.js.map +0 -1
  2808. package/dist/src/voice/local/runtime-client.js.map +0 -1
  2809. package/dist/src/voice/local/runtime-dispatcher.js.map +0 -1
  2810. package/dist/src/voice/local/runtime-worker.js.map +0 -1
  2811. package/dist/src/voice/local/wav.js.map +0 -1
  2812. package/dist/src/voice/metadata/builtin.js.map +0 -1
  2813. package/dist/src/voice/metadata/registry.js.map +0 -1
  2814. package/dist/src/voice/stt/availability.js.map +0 -1
  2815. package/dist/src/voice/stt/config-slice.js.map +0 -1
  2816. package/dist/src/voice/stt/factory.js.map +0 -1
  2817. package/dist/src/voice/stt/index.js.map +0 -1
  2818. package/dist/src/voice/stt/list-providers.js.map +0 -1
  2819. package/dist/src/voice/stt/mention.js.map +0 -1
  2820. package/dist/src/voice/stt/preflight.js.map +0 -1
  2821. package/dist/src/voice/stt/providers/alibaba-transcription.js.map +0 -1
  2822. package/dist/src/voice/stt/providers/local-transcription.js.map +0 -1
  2823. package/dist/src/voice/stt/providers/openai-transcription.js.map +0 -1
  2824. package/dist/src/voice/stt/transcribe-core.js.map +0 -1
  2825. package/dist/src/voice/stt/types.js.map +0 -1
  2826. package/dist/src/voice/tts/audio.js.map +0 -1
  2827. package/dist/src/voice/tts/config-slice.js.map +0 -1
  2828. package/dist/src/voice/tts/directives.js.map +0 -1
  2829. package/dist/src/voice/tts/factory.js.map +0 -1
  2830. package/dist/src/voice/tts/list-providers.js.map +0 -1
  2831. package/dist/src/voice/tts/merge-config.js.map +0 -1
  2832. package/dist/src/voice/tts/openai-compatible-speech.js.map +0 -1
  2833. package/dist/src/voice/tts/payload.js.map +0 -1
  2834. package/dist/src/voice/tts/preprocess.js.map +0 -1
  2835. package/dist/src/voice/tts/providers/alibaba-speech.js.map +0 -1
  2836. package/dist/src/voice/tts/providers/edge-speech.js.map +0 -1
  2837. package/dist/src/voice/tts/providers/minimax-speech.js.map +0 -1
  2838. package/dist/src/voice/tts/providers/openai-speech.js.map +0 -1
  2839. package/dist/src/voice/tts/sentence-boundary.js.map +0 -1
  2840. package/dist/src/voice/tts/service.js.map +0 -1
  2841. package/dist/src/voice/tts/speak-core.js.map +0 -1
  2842. package/dist/src/voice/tts/speech-registry.js.map +0 -1
  2843. package/dist/src/voice/tts/status-tracker.js.map +0 -1
  2844. package/dist/src/voice/tts/summarize.js.map +0 -1
  2845. package/dist/src/voice/tts/types.js.map +0 -1
  2846. package/dist/src/work-discovery/analyzer.js.map +0 -1
  2847. package/dist/src/work-discovery/probe.js.map +0 -1
  2848. package/dist/src/work-discovery/repository.js.map +0 -1
  2849. package/dist/src/work-discovery/service.js.map +0 -1
  2850. package/dist/src/work-items/agent-context.js.map +0 -1
  2851. package/dist/src/work-items/work-item-service.js.map +0 -1
  2852. package/dist/src/work-items/work-item-store.js.map +0 -1
  2853. package/dist/src/work-items/work-item-workflow-judge.js.map +0 -1
  2854. package/dist/src/workflows/authoring/workflow-draft-store.js.map +0 -1
  2855. package/dist/src/workflows/domain/definition-utils.js.map +0 -1
  2856. package/dist/src/workflows/domain/run.js.map +0 -1
  2857. package/dist/src/workflows/domain/schema-validation.js.map +0 -1
  2858. package/dist/src/workflows/domain/validation.js.map +0 -1
  2859. package/dist/src/workflows/draft/workflow-draft-prompt.js.map +0 -1
  2860. package/dist/src/workflows/draft/workflow-draft-service.js.map +0 -1
  2861. package/dist/src/workflows/draft/workflow-draft-validator.js.map +0 -1
  2862. package/dist/src/workflows/engine/projector.js.map +0 -1
  2863. package/dist/src/workflows/engine/workflow-engine.js.map +0 -1
  2864. package/dist/src/workflows/registry/catalog-workflow-definition-registry.js.map +0 -1
  2865. package/dist/src/workflows/runtime/graph-workflow-runtime.js.map +0 -1
  2866. package/dist/src/workflows/service/run-view-to-snapshot.js.map +0 -1
  2867. package/dist/src/workflows/service/workflow-run-service.js.map +0 -1
  2868. package/dist/src/workflows/service/workflow-session-bridge.js.map +0 -1
  2869. package/dist/src/workflows/service/workflow-session-key.js.map +0 -1
  2870. package/dist/src/workflows/store/event-store.js.map +0 -1
  2871. package/dist/src/workflows/store/paths.js.map +0 -1
  2872. package/dist/src/workflows/store/run-index-store.js.map +0 -1
  2873. package/dist/src/workflows/store/run-store.js.map +0 -1
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./chunk-QUQL4437-DXsxWP7r.js";import{t as a}from"./cn-BQ_8x0bT.js";import{t as o}from"./messages-t1yPaVCt.js";import{n as s}from"./locale-store-BneNAR8R.js";import{Aa as c,Ao as l,Fo as u,Ga as d,Io as f,Ja as p,Mo as m,No as h,Po as g,Ua as _,Wa as v,ao as y,bc as b,hc as x,hs as S,hu as C,ja as w,jo as T,ko as E,oc as D,tc as O,yc as k,yl as A,yu as j}from"./index-CH7XN6KY.js";var M=n(),N=e(t(),1),P=r();function F(e,t){if(e==null)return t;let n=new Date(e);return Number.isNaN(n.getTime())?t:new Intl.DateTimeFormat(void 0,{dateStyle:`medium`}).format(n)}function I(e){return[...e].sort((e,t)=>{let n=Number(!!t.pinnedAt)-Number(!!e.pinnedAt);return n===0?new Date(t.lastActiveAt??t.updatedAt).getTime()-new Date(e.lastActiveAt??e.updatedAt).getTime():n})}function L(){let e=(0,M.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,P.jsx)(`div`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-3`,"aria-busy":!0,children:Array.from({length:6},R)}),e[0]=t):t=e[0],t}function R(e,t){return(0,P.jsx)(y,{className:`h-40 rounded-xl`},t)}function z(e){let t=(0,M.c)(59),{project:n,busy:r,onTogglePin:a,onToggleArchive:c}=e,l=s(B),u,d,f,p,m,h,g,_;if(t[0]!==l||t[1]!==n.brief||t[2]!==n.description||t[3]!==n.id||t[4]!==n.lastActiveAt||t[5]!==n.name||t[6]!==n.status||t[7]!==n.updatedAt||t[8]!==n.workspaceRoot){let e=o(l).projectsPage;u=e.management,g=`flex h-full flex-col rounded-xl border border-edge-subtle bg-surface-base p-4`;let r;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,P.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg bg-accent-soft text-accent`,children:(0,P.jsx)(A,{className:`size-4`,"aria-hidden":!0})}),t[17]=r):r=t[17];let a;t[18]===n.name?a=t[19]:(a=(0,P.jsx)(`h2`,{className:`truncate text-sm font-semibold text-fg`,children:n.name}),t[18]=n.name,t[19]=a);let s=(0,P.jsxs)(`div`,{className:`min-w-0`,children:[a,(0,P.jsx)(`p`,{className:`mt-0.5 text-xs text-fg-subtle`,children:e.statuses[n.status]})]}),c;t[20]===s?c=t[21]:(c=(0,P.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[r,s]}),t[20]=s,t[21]=c);let v;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,P.jsx)(C,{className:`mt-2 size-4 shrink-0 text-fg-subtle transition-transform group-hover:translate-x-0.5`,"aria-hidden":!0}),t[22]=v):v=t[22];let y;t[23]===c?y=t[24]:(y=(0,P.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[c,v]}),t[23]=c,t[24]=y),_=(0,P.jsxs)(i,{to:`/projects/${encodeURIComponent(n.id)}`,className:`group flex min-w-0 flex-1 flex-col rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[y,(0,P.jsx)(`p`,{className:`mt-3 line-clamp-2 min-h-10 text-xs leading-5 text-fg-muted`,children:n.description||n.brief||e.noDescription})]}),h=`mt-3 flex shrink-0 items-end justify-between gap-3 border-t border-edge-subtle pt-3`,p=`min-w-0 text-[11px] text-fg-subtle`,m=(0,P.jsx)(`p`,{className:`truncate`,children:n.workspaceRoot||e.agentDefault}),d=`mt-1`,f=F(n.lastActiveAt??n.updatedAt,e.never),t[0]=l,t[1]=n.brief,t[2]=n.description,t[3]=n.id,t[4]=n.lastActiveAt,t[5]=n.name,t[6]=n.status,t[7]=n.updatedAt,t[8]=n.workspaceRoot,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h,t[15]=g,t[16]=_}else u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14],g=t[15],_=t[16];let v;t[25]!==d||t[26]!==f?(v=(0,P.jsx)(`p`,{className:d,children:f}),t[25]=d,t[26]=f,t[27]=v):v=t[27];let y;t[28]!==p||t[29]!==m||t[30]!==v?(y=(0,P.jsxs)(`div`,{className:p,children:[m,v]}),t[28]=p,t[29]=m,t[30]=v,t[31]=y):y=t[31];let x=n.pinnedAt?u.unpin:u.pin,w=n.pinnedAt?u.unpin:u.pin,T;t[32]===n.pinnedAt?T=t[33]:(T=n.pinnedAt?(0,P.jsx)(k,{className:`size-4`,"aria-hidden":!0}):(0,P.jsx)(b,{className:`size-4`,"aria-hidden":!0}),t[32]=n.pinnedAt,t[33]=T);let E;t[34]!==r||t[35]!==a||t[36]!==x||t[37]!==w||t[38]!==T?(E=(0,P.jsx)(S,{type:`button`,variant:`ghost`,className:`size-8 p-0`,disabled:r,onClick:a,"aria-label":x,title:w,children:T}),t[34]=r,t[35]=a,t[36]=x,t[37]=w,t[38]=T,t[39]=E):E=t[39];let O=n.status===`archived`?u.restore:u.archive,N=n.status===`archived`?u.restore:u.archive,I;t[40]===n.status?I=t[41]:(I=n.status===`archived`?(0,P.jsx)(D,{className:`size-4`,"aria-hidden":!0}):(0,P.jsx)(j,{className:`size-4`,"aria-hidden":!0}),t[40]=n.status,t[41]=I);let L;t[42]!==r||t[43]!==c||t[44]!==O||t[45]!==N||t[46]!==I?(L=(0,P.jsx)(S,{type:`button`,variant:`ghost`,className:`size-8 p-0`,disabled:r,onClick:c,"aria-label":O,title:N,children:I}),t[42]=r,t[43]=c,t[44]=O,t[45]=N,t[46]=I,t[47]=L):L=t[47];let R;t[48]!==E||t[49]!==L?(R=(0,P.jsxs)(`div`,{className:`flex shrink-0 gap-1`,children:[E,L]}),t[48]=E,t[49]=L,t[50]=R):R=t[50];let z;t[51]!==R||t[52]!==h||t[53]!==y?(z=(0,P.jsxs)(`div`,{className:h,children:[y,R]}),t[51]=R,t[52]=h,t[53]=y,t[54]=z):z=t[54];let V;return t[55]!==z||t[56]!==g||t[57]!==_?(V=(0,P.jsxs)(`article`,{className:g,children:[_,z]}),t[55]=z,t[56]=g,t[57]=_,t[58]=V):V=t[58],V}function B(e){return e.language}function V(){let e=o(s(e=>e.language)).projectsPage,t=e.management,n=f(e=>e.setPageHeader),r=f(e=>e.clearPageHeader),[i,y]=(0,N.useState)([]),[b,C]=(0,N.useState)(!0),[D,k]=(0,N.useState)(null),[j,M]=(0,N.useState)(``),[F,R]=(0,N.useState)(`active`),[B,V]=(0,N.useState)(null),[ee,H]=(0,N.useState)(!1),[U,W]=(0,N.useState)(null),[G,K]=(0,N.useState)(!1),[q,J]=(0,N.useState)(``),[Y,X]=(0,N.useState)(``),[Z,Q]=(0,N.useState)(``),$=(0,N.useCallback)(async()=>{C(!0),k(null);try{y(I((await _({limit:100,sortBy:`updatedAt`,sortOrder:`desc`})).items))}catch(e){k(e instanceof Error?e.message:String(e))}finally{C(!1)}},[]);(0,N.useEffect)(()=>{$()},[$]);let te=(0,N.useMemo)(()=>{let e=j.trim().toLocaleLowerCase();return i.filter(e=>F===`all`||e.status===F).filter(t=>!e||[t.name,t.description,t.brief,t.workspaceRoot].filter(Boolean).some(t=>t.toLocaleLowerCase().includes(e)))},[F,i,j]),ne=(0,N.useMemo)(()=>(0,P.jsxs)(S,{type:`button`,variant:`primary`,className:`h-9 rounded-lg`,onClick:()=>H(!0),children:[(0,P.jsx)(x,{className:`size-4`,"aria-hidden":!0}),e.create]}),[e.create]);(0,N.useLayoutEffect)(()=>(n({startExtra:null,main:(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:t.title}),(0,P.jsx)(`p`,{className:`truncate text-xs text-fg-muted`,children:t.subtitle})]}),end:ne}),()=>r()),[r,ne,t.subtitle,t.title,n]);let re=(0,N.useCallback)(async e=>{e.preventDefault();let t=q.trim();if(!(!t||G)){K(!0),W(null);try{let e=await w({name:t,...Y.trim()?{description:Y.trim()}:{},...Z.trim()?{workspaceRoot:Z.trim()}:{}});y(t=>[e,...t.filter(t=>t.id!==e.id)]),J(``),X(``),Q(``),H(!1),window.dispatchEvent(new CustomEvent(`project-updated`,{detail:{id:e.id}}))}catch(e){W(e instanceof Error?e.message:String(e))}finally{K(!1)}}},[G,Y,q,Z]),ie=(0,N.useCallback)(async(e,t)=>{V(e.id),k(null);try{let n;n=t===`pin`?e.pinnedAt?await p(e.id):await v(e.id):e.status===`archived`?await d(e.id):await c(e.id),y(e=>e.map(e=>e.id===n.id?n:e)),window.dispatchEvent(new CustomEvent(`project-updated`,{detail:{id:e.id}}))}catch(e){k(e instanceof Error?e.message:String(e))}finally{V(null)}},[]),ae=[{id:`active`,label:e.statuses.active},{id:`paused`,label:e.statuses.paused},{id:`archived`,label:e.statuses.archived},{id:`all`,label:e.all}];return(0,P.jsxs)(`main`,{className:`flex w-full flex-1 flex-col gap-5 px-3 py-6 sm:px-5 xl:px-6`,children:[(0,P.jsx)(E,{open:ee,onOpenChange:e=>{H(e),e||W(null)},children:(0,P.jsxs)(g,{children:[(0,P.jsx)(h,{className:`fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,P.jsxs)(T,{className:`fixed left-1/2 top-1/2 z-[90] flex h-[min(34rem,calc(100vh-2rem))] w-[min(38rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-panel shadow-float focus:outline-none`,children:[(0,P.jsxs)(`div`,{className:`shrink-0 border-b border-edge px-5 py-4`,children:[(0,P.jsx)(u,{className:`text-base font-semibold text-fg`,children:e.createTitle}),(0,P.jsx)(m,{className:`mt-1 text-sm text-fg-muted`,children:e.createDescription})]}),(0,P.jsxs)(`form`,{onSubmit:re,className:`flex min-h-0 flex-1 flex-col`,children:[(0,P.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-y-auto px-5 py-4`,children:[(0,P.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium text-fg`,children:[e.projectName,(0,P.jsx)(`input`,{className:`h-10 rounded-lg border border-edge bg-surface-base px-3 font-normal outline-none focus:border-accent focus:ring-2 focus:ring-accent/20`,value:q,onChange:e=>J(e.target.value),autoFocus:!0,maxLength:160})]}),(0,P.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium text-fg`,children:[t.descriptionLabel,(0,P.jsx)(`textarea`,{className:`min-h-28 resize-none rounded-lg border border-edge bg-surface-base px-3 py-2 font-normal leading-6 outline-none focus:border-accent focus:ring-2 focus:ring-accent/20`,value:Y,onChange:e=>X(e.target.value),maxLength:2e3,placeholder:t.descriptionPlaceholder})]}),(0,P.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium text-fg`,children:[e.workspaceRoot,(0,P.jsx)(`input`,{className:`h-10 rounded-lg border border-edge bg-surface-base px-3 font-mono text-xs font-normal outline-none focus:border-accent focus:ring-2 focus:ring-accent/20`,value:Z,onChange:e=>Q(e.target.value),placeholder:e.workspacePlaceholder})]}),U?(0,P.jsx)(`p`,{className:`rounded-lg bg-danger-soft px-3 py-2 text-xs text-danger`,role:`alert`,children:U}):null]}),(0,P.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-edge px-5 py-4`,children:[(0,P.jsx)(l,{asChild:!0,children:(0,P.jsx)(S,{type:`button`,variant:`ghost`,children:e.cancel})}),(0,P.jsx)(S,{type:`submit`,variant:`primary`,disabled:G||!q.trim(),children:G?e.workHome.creating:e.create})]})]})]})]})}),(0,P.jsxs)(`section`,{className:`flex flex-col gap-3 rounded-xl border border-edge-subtle bg-surface-base p-4 sm:flex-row sm:items-center sm:justify-between`,children:[(0,P.jsx)(`div`,{className:`flex flex-wrap gap-1`,"aria-label":t.filterLabel,children:ae.map(e=>(0,P.jsx)(`button`,{type:`button`,className:a(`rounded-lg px-3 py-1.5 text-xs font-medium transition-colors`,F===e.id?`bg-accent-soft text-accent-fg`:`text-fg-muted hover:bg-surface-hover hover:text-fg`),onClick:()=>R(e.id),children:e.label},e.id))}),(0,P.jsxs)(`label`,{className:`relative block min-w-0 sm:w-64`,children:[(0,P.jsx)(O,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,P.jsx)(`input`,{className:`h-9 w-full rounded-lg border border-edge bg-surface-panel pl-9 pr-3 text-sm text-fg outline-none placeholder:text-fg-muted focus:border-accent`,value:j,onChange:e=>M(e.target.value),placeholder:e.searchPlaceholder,"aria-label":e.searchPlaceholder})]})]}),D?(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-xl border border-danger/25 bg-danger-soft px-4 py-3 text-sm text-danger`,role:`alert`,children:[(0,P.jsx)(`span`,{children:D}),(0,P.jsx)(S,{type:`button`,variant:`ghost`,className:`h-8 px-2`,onClick:()=>void $(),children:e.workHome.retry})]}):null,b?(0,P.jsx)(L,{}):te.length?(0,P.jsx)(`section`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-3`,children:te.map(e=>(0,P.jsx)(z,{project:e,busy:B===e.id,onTogglePin:()=>void ie(e,`pin`),onToggleArchive:()=>void ie(e,`archive`)},e.id))}):(0,P.jsxs)(`section`,{className:`rounded-xl border border-dashed border-edge p-10 text-center`,children:[(0,P.jsx)(A,{className:`mx-auto size-7 text-fg-subtle`,"aria-hidden":!0}),(0,P.jsx)(`h2`,{className:`mt-3 text-sm font-semibold text-fg`,children:t.emptyTitle}),(0,P.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t.emptyHint})]})]})}export{V as ProjectsPage};
1
+ import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./chunk-QUQL4437-DXsxWP7r.js";import{t as a}from"./cn-BQ_8x0bT.js";import{t as o}from"./messages-BH7paqYt.js";import{n as s}from"./locale-store-BvcHGPHU.js";import{Aa as c,Ao as l,Fo as u,Ga as d,Io as f,Ja as p,Mo as m,No as h,Po as g,Ua as _,Wa as v,ao as y,bc as b,hc as x,hs as S,hu as C,ja as w,jo as T,ko as E,oc as D,tc as O,yc as k,yl as A,yu as j}from"./index-IPmCli0N.js";var M=n(),N=e(t(),1),P=r();function F(e,t){if(e==null)return t;let n=new Date(e);return Number.isNaN(n.getTime())?t:new Intl.DateTimeFormat(void 0,{dateStyle:`medium`}).format(n)}function I(e){return[...e].sort((e,t)=>{let n=Number(!!t.pinnedAt)-Number(!!e.pinnedAt);return n===0?new Date(t.lastActiveAt??t.updatedAt).getTime()-new Date(e.lastActiveAt??e.updatedAt).getTime():n})}function L(){let e=(0,M.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,P.jsx)(`div`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-3`,"aria-busy":!0,children:Array.from({length:6},R)}),e[0]=t):t=e[0],t}function R(e,t){return(0,P.jsx)(y,{className:`h-40 rounded-xl`},t)}function z(e){let t=(0,M.c)(59),{project:n,busy:r,onTogglePin:a,onToggleArchive:c}=e,l=s(B),u,d,f,p,m,h,g,_;if(t[0]!==l||t[1]!==n.brief||t[2]!==n.description||t[3]!==n.id||t[4]!==n.lastActiveAt||t[5]!==n.name||t[6]!==n.status||t[7]!==n.updatedAt||t[8]!==n.workspaceRoot){let e=o(l).projectsPage;u=e.management,g=`flex h-full flex-col rounded-xl border border-edge-subtle bg-surface-base p-4`;let r;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,P.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg bg-accent-soft text-accent`,children:(0,P.jsx)(A,{className:`size-4`,"aria-hidden":!0})}),t[17]=r):r=t[17];let a;t[18]===n.name?a=t[19]:(a=(0,P.jsx)(`h2`,{className:`truncate text-sm font-semibold text-fg`,children:n.name}),t[18]=n.name,t[19]=a);let s=(0,P.jsxs)(`div`,{className:`min-w-0`,children:[a,(0,P.jsx)(`p`,{className:`mt-0.5 text-xs text-fg-subtle`,children:e.statuses[n.status]})]}),c;t[20]===s?c=t[21]:(c=(0,P.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[r,s]}),t[20]=s,t[21]=c);let v;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,P.jsx)(C,{className:`mt-2 size-4 shrink-0 text-fg-subtle transition-transform group-hover:translate-x-0.5`,"aria-hidden":!0}),t[22]=v):v=t[22];let y;t[23]===c?y=t[24]:(y=(0,P.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[c,v]}),t[23]=c,t[24]=y),_=(0,P.jsxs)(i,{to:`/projects/${encodeURIComponent(n.id)}`,className:`group flex min-w-0 flex-1 flex-col rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[y,(0,P.jsx)(`p`,{className:`mt-3 line-clamp-2 min-h-10 text-xs leading-5 text-fg-muted`,children:n.description||n.brief||e.noDescription})]}),h=`mt-3 flex shrink-0 items-end justify-between gap-3 border-t border-edge-subtle pt-3`,p=`min-w-0 text-[11px] text-fg-subtle`,m=(0,P.jsx)(`p`,{className:`truncate`,children:n.workspaceRoot||e.agentDefault}),d=`mt-1`,f=F(n.lastActiveAt??n.updatedAt,e.never),t[0]=l,t[1]=n.brief,t[2]=n.description,t[3]=n.id,t[4]=n.lastActiveAt,t[5]=n.name,t[6]=n.status,t[7]=n.updatedAt,t[8]=n.workspaceRoot,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h,t[15]=g,t[16]=_}else u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14],g=t[15],_=t[16];let v;t[25]!==d||t[26]!==f?(v=(0,P.jsx)(`p`,{className:d,children:f}),t[25]=d,t[26]=f,t[27]=v):v=t[27];let y;t[28]!==p||t[29]!==m||t[30]!==v?(y=(0,P.jsxs)(`div`,{className:p,children:[m,v]}),t[28]=p,t[29]=m,t[30]=v,t[31]=y):y=t[31];let x=n.pinnedAt?u.unpin:u.pin,w=n.pinnedAt?u.unpin:u.pin,T;t[32]===n.pinnedAt?T=t[33]:(T=n.pinnedAt?(0,P.jsx)(k,{className:`size-4`,"aria-hidden":!0}):(0,P.jsx)(b,{className:`size-4`,"aria-hidden":!0}),t[32]=n.pinnedAt,t[33]=T);let E;t[34]!==r||t[35]!==a||t[36]!==x||t[37]!==w||t[38]!==T?(E=(0,P.jsx)(S,{type:`button`,variant:`ghost`,className:`size-8 p-0`,disabled:r,onClick:a,"aria-label":x,title:w,children:T}),t[34]=r,t[35]=a,t[36]=x,t[37]=w,t[38]=T,t[39]=E):E=t[39];let O=n.status===`archived`?u.restore:u.archive,N=n.status===`archived`?u.restore:u.archive,I;t[40]===n.status?I=t[41]:(I=n.status===`archived`?(0,P.jsx)(D,{className:`size-4`,"aria-hidden":!0}):(0,P.jsx)(j,{className:`size-4`,"aria-hidden":!0}),t[40]=n.status,t[41]=I);let L;t[42]!==r||t[43]!==c||t[44]!==O||t[45]!==N||t[46]!==I?(L=(0,P.jsx)(S,{type:`button`,variant:`ghost`,className:`size-8 p-0`,disabled:r,onClick:c,"aria-label":O,title:N,children:I}),t[42]=r,t[43]=c,t[44]=O,t[45]=N,t[46]=I,t[47]=L):L=t[47];let R;t[48]!==E||t[49]!==L?(R=(0,P.jsxs)(`div`,{className:`flex shrink-0 gap-1`,children:[E,L]}),t[48]=E,t[49]=L,t[50]=R):R=t[50];let z;t[51]!==R||t[52]!==h||t[53]!==y?(z=(0,P.jsxs)(`div`,{className:h,children:[y,R]}),t[51]=R,t[52]=h,t[53]=y,t[54]=z):z=t[54];let V;return t[55]!==z||t[56]!==g||t[57]!==_?(V=(0,P.jsxs)(`article`,{className:g,children:[_,z]}),t[55]=z,t[56]=g,t[57]=_,t[58]=V):V=t[58],V}function B(e){return e.language}function V(){let e=o(s(e=>e.language)).projectsPage,t=e.management,n=f(e=>e.setPageHeader),r=f(e=>e.clearPageHeader),[i,y]=(0,N.useState)([]),[b,C]=(0,N.useState)(!0),[D,k]=(0,N.useState)(null),[j,M]=(0,N.useState)(``),[F,R]=(0,N.useState)(`active`),[B,V]=(0,N.useState)(null),[ee,H]=(0,N.useState)(!1),[U,W]=(0,N.useState)(null),[G,K]=(0,N.useState)(!1),[q,J]=(0,N.useState)(``),[Y,X]=(0,N.useState)(``),[Z,Q]=(0,N.useState)(``),$=(0,N.useCallback)(async()=>{C(!0),k(null);try{y(I((await _({limit:100,sortBy:`updatedAt`,sortOrder:`desc`})).items))}catch(e){k(e instanceof Error?e.message:String(e))}finally{C(!1)}},[]);(0,N.useEffect)(()=>{$()},[$]);let te=(0,N.useMemo)(()=>{let e=j.trim().toLocaleLowerCase();return i.filter(e=>F===`all`||e.status===F).filter(t=>!e||[t.name,t.description,t.brief,t.workspaceRoot].filter(Boolean).some(t=>t.toLocaleLowerCase().includes(e)))},[F,i,j]),ne=(0,N.useMemo)(()=>(0,P.jsxs)(S,{type:`button`,variant:`primary`,className:`h-9 rounded-lg`,onClick:()=>H(!0),children:[(0,P.jsx)(x,{className:`size-4`,"aria-hidden":!0}),e.create]}),[e.create]);(0,N.useLayoutEffect)(()=>(n({startExtra:null,main:(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:t.title}),(0,P.jsx)(`p`,{className:`truncate text-xs text-fg-muted`,children:t.subtitle})]}),end:ne}),()=>r()),[r,ne,t.subtitle,t.title,n]);let re=(0,N.useCallback)(async e=>{e.preventDefault();let t=q.trim();if(!(!t||G)){K(!0),W(null);try{let e=await w({name:t,...Y.trim()?{description:Y.trim()}:{},...Z.trim()?{workspaceRoot:Z.trim()}:{}});y(t=>[e,...t.filter(t=>t.id!==e.id)]),J(``),X(``),Q(``),H(!1),window.dispatchEvent(new CustomEvent(`project-updated`,{detail:{id:e.id}}))}catch(e){W(e instanceof Error?e.message:String(e))}finally{K(!1)}}},[G,Y,q,Z]),ie=(0,N.useCallback)(async(e,t)=>{V(e.id),k(null);try{let n;n=t===`pin`?e.pinnedAt?await p(e.id):await v(e.id):e.status===`archived`?await d(e.id):await c(e.id),y(e=>e.map(e=>e.id===n.id?n:e)),window.dispatchEvent(new CustomEvent(`project-updated`,{detail:{id:e.id}}))}catch(e){k(e instanceof Error?e.message:String(e))}finally{V(null)}},[]),ae=[{id:`active`,label:e.statuses.active},{id:`paused`,label:e.statuses.paused},{id:`archived`,label:e.statuses.archived},{id:`all`,label:e.all}];return(0,P.jsxs)(`main`,{className:`flex w-full flex-1 flex-col gap-5 px-3 py-6 sm:px-5 xl:px-6`,children:[(0,P.jsx)(E,{open:ee,onOpenChange:e=>{H(e),e||W(null)},children:(0,P.jsxs)(g,{children:[(0,P.jsx)(h,{className:`fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,P.jsxs)(T,{className:`fixed left-1/2 top-1/2 z-[90] flex h-[min(34rem,calc(100vh-2rem))] w-[min(38rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-panel shadow-float focus:outline-none`,children:[(0,P.jsxs)(`div`,{className:`shrink-0 border-b border-edge px-5 py-4`,children:[(0,P.jsx)(u,{className:`text-base font-semibold text-fg`,children:e.createTitle}),(0,P.jsx)(m,{className:`mt-1 text-sm text-fg-muted`,children:e.createDescription})]}),(0,P.jsxs)(`form`,{onSubmit:re,className:`flex min-h-0 flex-1 flex-col`,children:[(0,P.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-y-auto px-5 py-4`,children:[(0,P.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium text-fg`,children:[e.projectName,(0,P.jsx)(`input`,{className:`h-10 rounded-lg border border-edge bg-surface-base px-3 font-normal outline-none focus:border-accent focus:ring-2 focus:ring-accent/20`,value:q,onChange:e=>J(e.target.value),autoFocus:!0,maxLength:160})]}),(0,P.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium text-fg`,children:[t.descriptionLabel,(0,P.jsx)(`textarea`,{className:`min-h-28 resize-none rounded-lg border border-edge bg-surface-base px-3 py-2 font-normal leading-6 outline-none focus:border-accent focus:ring-2 focus:ring-accent/20`,value:Y,onChange:e=>X(e.target.value),maxLength:2e3,placeholder:t.descriptionPlaceholder})]}),(0,P.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium text-fg`,children:[e.workspaceRoot,(0,P.jsx)(`input`,{className:`h-10 rounded-lg border border-edge bg-surface-base px-3 font-mono text-xs font-normal outline-none focus:border-accent focus:ring-2 focus:ring-accent/20`,value:Z,onChange:e=>Q(e.target.value),placeholder:e.workspacePlaceholder})]}),U?(0,P.jsx)(`p`,{className:`rounded-lg bg-danger-soft px-3 py-2 text-xs text-danger`,role:`alert`,children:U}):null]}),(0,P.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-edge px-5 py-4`,children:[(0,P.jsx)(l,{asChild:!0,children:(0,P.jsx)(S,{type:`button`,variant:`ghost`,children:e.cancel})}),(0,P.jsx)(S,{type:`submit`,variant:`primary`,disabled:G||!q.trim(),children:G?e.workHome.creating:e.create})]})]})]})]})}),(0,P.jsxs)(`section`,{className:`flex flex-col gap-3 rounded-xl border border-edge-subtle bg-surface-base p-4 sm:flex-row sm:items-center sm:justify-between`,children:[(0,P.jsx)(`div`,{className:`flex flex-wrap gap-1`,"aria-label":t.filterLabel,children:ae.map(e=>(0,P.jsx)(`button`,{type:`button`,className:a(`rounded-lg px-3 py-1.5 text-xs font-medium transition-colors`,F===e.id?`bg-accent-soft text-accent-fg`:`text-fg-muted hover:bg-surface-hover hover:text-fg`),onClick:()=>R(e.id),children:e.label},e.id))}),(0,P.jsxs)(`label`,{className:`relative block min-w-0 sm:w-64`,children:[(0,P.jsx)(O,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,P.jsx)(`input`,{className:`h-9 w-full rounded-lg border border-edge bg-surface-panel pl-9 pr-3 text-sm text-fg outline-none placeholder:text-fg-muted focus:border-accent`,value:j,onChange:e=>M(e.target.value),placeholder:e.searchPlaceholder,"aria-label":e.searchPlaceholder})]})]}),D?(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-xl border border-danger/25 bg-danger-soft px-4 py-3 text-sm text-danger`,role:`alert`,children:[(0,P.jsx)(`span`,{children:D}),(0,P.jsx)(S,{type:`button`,variant:`ghost`,className:`h-8 px-2`,onClick:()=>void $(),children:e.workHome.retry})]}):null,b?(0,P.jsx)(L,{}):te.length?(0,P.jsx)(`section`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-3`,children:te.map(e=>(0,P.jsx)(z,{project:e,busy:B===e.id,onTogglePin:()=>void ie(e,`pin`),onToggleArchive:()=>void ie(e,`archive`)},e.id))}):(0,P.jsxs)(`section`,{className:`rounded-xl border border-dashed border-edge p-10 text-center`,children:[(0,P.jsx)(A,{className:`mx-auto size-7 text-fg-subtle`,"aria-hidden":!0}),(0,P.jsx)(`h2`,{className:`mt-3 text-sm font-semibold text-fg`,children:t.emptyTitle}),(0,P.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t.emptyHint})]})]})}export{V as ProjectsPage};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{d as i,t as a}from"./chunk-QUQL4437-DXsxWP7r.js";import{t as o}from"./cn-BQ_8x0bT.js";import{t as s}from"./check-BODqo66o.js";import{t as c}from"./copy-to-clipboard-HOJ79TWv.js";import{t as l}from"./messages-t1yPaVCt.js";import{d as u,f as d,i as f,n as p,o as m,p as h,r as g}from"./locale-store-BneNAR8R.js";import{a as _,i as v}from"./vendor-swr-BIWyz7Rc.js";import{$l as y,$s as b,As as x,Fo as S,Ho as C,Js as w,Ks as T,Mo as E,No as D,Oc as O,Ol as k,Oo as A,Pl as j,Po as M,Ps as N,Ul as P,Un as F,Xo as I,Yo as L,_i as R,ao as z,cc as B,ci as V,di as H,el as ee,fi as U,gi as te,hi as ne,hs as W,io as G,jo as K,ko as q,kt as re,li as J,mi as Y,ms as X,os as ie,pc as ae,pi as oe,pl as se,ro as ce,si as le,tr as ue,ui as de,vi as fe,yi as pe,zc as me,zi as he}from"./index-CH7XN6KY.js";import{n as ge,r as _e,t as ve}from"./settings-page-layout-HdlQOOqp.js";import{t as ye}from"./settings-collapsible-section-BySKZ8rp.js";import{n as be,r as xe,t as Se}from"./settings-form-section-CjINay6t.js";import{t as Ce}from"./browser-BLJWD7WI.js";import{t as we}from"./page-tabs-DMlQERNg.js";var Z=n(),Q=e(t(),1);function Te(e,t){let{mutate:n}=_(),[r,i]=(0,Q.useState)(!1),[a,o]=(0,Q.useState)(null),[s,c]=(0,Q.useState)(!1),l=(0,Q.useCallback)(async()=>{await Promise.all([n(`tunnel-pair-context`),n(`tunnel-pair`),n(`tunnel-status`),ce()])},[n]);return{busy:r,error:a,confirmOpen:s,setConfirmOpen:c,runEnableLanPairing:(0,Q.useCallback)(async()=>{if(!(!e||r)){i(!0),o(null);try{let n=await H();if(!n.ok)throw Error(`Failed to enable LAN pairing`);if(n.requiresRestart){let t=await le();if(!t.ok)throw Error(t.message??`Gateway restart failed`);if(!await V(e))throw Error(`Gateway did not come back online in time`)}let r=n.requiresRestart?await J():n.context;if(!r?.pairingReady)throw Error(`LAN pairing is still not ready after restart`);return await l(),t?.(r),c(!1),r}catch(e){return o(e instanceof Error?e.message:`Enable LAN pairing failed`),null}finally{i(!1)}}},[r,e,t,l]),clearError:()=>o(null)}}var $=r();function Ee(){return o(`w-full rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg`,`placeholder:text-fg-subtle`,X,`dark:border-edge`)}function De(e){let t=(0,Z.c)(122),{pairQr:n,gatewayToken:r,streamlined:i,lanOnly:s,onRefreshQr:c}=e,u=i===void 0?!1:i,d=s===void 0?!1:s,f=p(Ae),m;t[0]===f?m=t[1]:(m=l(f),t[0]=f,t[1]=m);let h=m,g=h.tunnelSettings,_=d?h.remoteAccess.lan:null,v;t[2]!==h.clipboard.copyFailed||t[3]!==g.pairCopied||t[4]!==g.pairCopyLink?(v={copy:g.pairCopyLink,copied:g.pairCopied,copyFailed:h.clipboard.copyFailed},t[2]=h.clipboard.copyFailed,t[3]=g.pairCopied,t[4]=g.pairCopyLink,t[5]=v):v=t[5];let y=v,{tunnelActive:b,tunnelStatus:x,tunnelQr:S,pairContext:C,pairBaseUrl:w,setPairBaseUrl:E,applySuggestedPairUrl:D,applyCandidateUrl:O,resetPairBaseFromContext:k,baseOk:A,localhostWarn:j,pairingBlocked:M,deepLink:N,qrPayload:P,qrDataUrl:F,qrGenFailed:I,encoding:L}=n,R;t[6]===k?R=t[7]:(R=e=>{k(e.recommended.url)},t[6]=k,t[7]=R);let z=Te(r,R),V,H,ee,U,te;if(t[8]!==O||t[9]!==D||t[10]!==A||t[11]!==z||t[12]!==r||t[13]!==_||t[14]!==d||t[15]!==j||t[16]!==c||t[17]!==w||t[18]!==C?.candidates||t[19]!==C?.recommended||t[20]!==M||t[21]!==E||t[22]!==u||t[23]!==g.pairBaseUrlHint||t[24]!==g.pairBaseUrlLabel||t[25]!==g.pairBaseUrlPlaceholder||t[26]!==g.pairBlockedLoopbackBody||t[27]!==g.pairBlockedNextSteps||t[28]!==g.pairBlockedTitle||t[29]!==g.pairCandidatesTitle||t[30]!==g.pairEnableLanButton||t[31]!==g.pairEnableLanEnabling||t[32]!==g.pairEnableLanSecurityAuditLink||t[33]!==g.pairInvalidBaseUrl||t[34]!==g.pairLocalhostWarning||t[35]!==g.pairSelectCandidateHint||t[36]!==g.pairSelectCandidateTitle||t[37]!==g.pairSubtitle||t[38]!==g.pairSuggestedLanLabel||t[39]!==g.pairTitle||t[40]!==g.pairTunnelActive||t[41]!==g.pairTunnelLanUrl||t[42]!==g.pairTunnelPublicUrl||t[43]!==g.pairUseSuggestedUrl||t[44]!==g.pairWaitingForTunnel||t[45]!==g.refreshQr||t[46]!==b||t[47]!==S||t[48]!==x?.publicUrl){te=Symbol.for(`react.early_return_sentinel`);bb0:{let e=C?.candidates.filter(ke)??[],n=d?(e.find(Oe)?.url??e[0]?.url??``).trim():C?.recommended.url?.trim()??``,i=(d||!b)&&e.length>1,s=function(t){if(e.length===0)return null;let n=t===`amber`?`text-amber-950 dark:text-amber-100`:`text-fg`,r=t===`amber`?`text-amber-950/80 dark:text-amber-200/90`:`text-fg-muted`;return(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:o(`text-xs font-medium`,r),children:i?g.pairSelectCandidateTitle:g.pairCandidatesTitle}),(0,$.jsx)(`ul`,{className:`mt-1 space-y-1`,children:e.map(e=>(0,$.jsx)(`li`,{children:(0,$.jsxs)(`button`,{type:`button`,className:o(`w-full rounded-md border px-2 py-1.5 text-left font-mono text-[11px] transition-colors`,t===`amber`?`border-amber-300/70 hover:bg-amber-100/80 dark:border-amber-800 dark:hover:bg-amber-950/50`:`border-edge hover:bg-surface-panel`,w.trim()===e.url&&`border-accent bg-accent/5`,n),onClick:()=>O(e.url),children:[e.label?`${e.label}: `:``,e.url]})},e.url))}),i?(0,$.jsx)(`p`,{className:o(`mt-1 text-[11px] leading-relaxed`,r),children:g.pairSelectCandidateHint}):null]})};if(V=u&&!d,V&&!b){let e;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(T,{className:`size-4 text-accent`,strokeWidth:1.75}),t[54]=e):e=t[54];let n;t[55]===g.pairTitle?n=t[56]:(n=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[e,g.pairTitle]}),t[55]=g.pairTitle,t[56]=n);let r;t[57]===g.pairWaitingForTunnel?r=t[58]:(r=(0,$.jsx)(`p`,{className:`mt-2 text-sm text-fg-muted`,children:g.pairWaitingForTunnel}),t[57]=g.pairWaitingForTunnel,t[58]=r);let i;t[59]!==n||t[60]!==r?(i=(0,$.jsxs)(Se,{children:[n,r]}),t[59]=n,t[60]=r,t[61]=i):i=t[61],te=i;break bb0}let l=_?.pairTitle??g.pairTitle,f=d?_?.pairSubtitle??g.pairSubtitle:b?g.pairTunnelActive:g.pairSubtitle,p=!!(c&&(d||u&&b)),m=V?`mb-2`:`mb-3`,h;t[62]===m?h=t[63]:(h=o(`flex flex-wrap items-start justify-between gap-2`,m),t[62]=m,t[63]=h);let v;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(T,{className:`size-4 text-accent`,strokeWidth:1.75}),t[64]=v):v=t[64];let y;t[65]===l?y=t[66]:(y=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[v,l]}),t[65]=l,t[66]=y);let k;t[67]!==V||t[68]!==f||t[69]!==g.pairSubtitle?(k=V?(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:g.pairSubtitle}):(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:f}),t[67]=V,t[68]=f,t[69]=g.pairSubtitle,t[70]=k):k=t[70];let N;t[71]!==y||t[72]!==k?(N=(0,$.jsxs)(`div`,{children:[y,k]}),t[71]=y,t[72]=k,t[73]=N):N=t[73];let P;t[74]!==c||t[75]!==p||t[76]!==g.refreshQr?(P=p?(0,$.jsxs)(W,{type:`button`,variant:`ghost`,className:`shrink-0`,onClick:()=>void c(),children:[(0,$.jsx)(B,{className:`size-4`}),g.refreshQr]}):null,t[74]=c,t[75]=p,t[76]=g.refreshQr,t[77]=P):P=t[77],t[78]!==h||t[79]!==N||t[80]!==P?(H=(0,$.jsxs)(`div`,{className:h,children:[N,P]}),t[78]=h,t[79]=N,t[80]=P,t[81]=H):H=t[81],ee=M?(0,$.jsxs)(`div`,{className:`mb-3 space-y-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-3 dark:border-amber-900/50 dark:bg-amber-950/30`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-sm font-medium text-amber-950 dark:text-amber-100`,children:g.pairBlockedTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-amber-900 dark:text-amber-200`,children:g.pairBlockedLoopbackBody})]}),n?(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-amber-950/80 dark:text-amber-200/90`,children:g.pairSuggestedLanLabel}),(0,$.jsx)(`div`,{className:`mt-0.5 break-all font-mono text-xs text-amber-950 dark:text-amber-100`,children:n})]}),(0,$.jsx)(W,{type:`button`,variant:`secondary`,className:`w-full sm:w-auto`,onClick:D,children:g.pairUseSuggestedUrl})]}):null,e.length>0?s(`amber`):null,(0,$.jsx)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:(0,$.jsxs)(W,{type:`button`,className:`w-full sm:w-auto`,disabled:z.busy||!r,onClick:()=>z.setConfirmOpen(!0),children:[z.busy?(0,$.jsx)(me,{className:`size-3.5 animate-spin`}):null,z.busy?g.pairEnableLanEnabling:g.pairEnableLanButton]})}),z.error?(0,$.jsx)(`p`,{className:`text-xs text-red-800 dark:text-red-200`,children:z.error}):null,(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-amber-900 dark:text-amber-200`,children:d?_?.pairBlockedNextSteps??g.pairBlockedNextSteps:g.pairBlockedNextSteps}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(a,{to:`/settings/gateway`,className:`inline-block text-xs font-medium text-accent hover:underline`,children:g.pairEnableLanSecurityAuditLink}),d&&_?.pairPublicTabLink?(0,$.jsx)(a,{to:`/settings/remote-access?tab=public`,className:`inline-block text-xs font-medium text-accent hover:underline`,children:_.pairPublicTabLink}):null]})]}):null,U=b&&!d?V?null:(0,$.jsxs)(`div`,{className:`mb-3 space-y-2 rounded-lg bg-surface-panel/80 px-3 py-3 shadow-surface`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:g.pairTunnelPublicUrl}),(0,$.jsx)(`div`,{className:`mt-0.5 break-all font-mono text-xs text-fg`,children:x?.publicUrl})]}),S?.lanUrl?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:g.pairTunnelLanUrl}),(0,$.jsx)(`div`,{className:`mt-0.5 break-all font-mono text-xs text-fg`,children:S.lanUrl})]}):null]}):(0,$.jsxs)(`div`,{className:`mb-3 space-y-1.5`,children:[(0,$.jsx)(`label`,{className:`text-sm font-medium text-fg`,htmlFor:`tunnel-mobile-pair-base`,children:g.pairBaseUrlLabel}),(0,$.jsx)(`input`,{id:`tunnel-mobile-pair-base`,className:o(Ee(),`font-mono text-xs`),type:`text`,autoComplete:`off`,spellCheck:!1,placeholder:n||g.pairBaseUrlPlaceholder,value:w,onChange:e=>E(e.target.value)}),(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:g.pairBaseUrlHint}),!A&&w.trim()?(0,$.jsx)(`p`,{className:`text-xs text-amber-800 dark:text-amber-200`,children:g.pairInvalidBaseUrl}):null,j?(0,$.jsx)(`p`,{className:`rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-950 dark:border-amber-800 dark:bg-amber-950/40 dark:text-amber-100`,children:g.pairLocalhostWarning}):null,i?s(`neutral`):null]})}t[8]=O,t[9]=D,t[10]=A,t[11]=z,t[12]=r,t[13]=_,t[14]=d,t[15]=j,t[16]=c,t[17]=w,t[18]=C?.candidates,t[19]=C?.recommended,t[20]=M,t[21]=E,t[22]=u,t[23]=g.pairBaseUrlHint,t[24]=g.pairBaseUrlLabel,t[25]=g.pairBaseUrlPlaceholder,t[26]=g.pairBlockedLoopbackBody,t[27]=g.pairBlockedNextSteps,t[28]=g.pairBlockedTitle,t[29]=g.pairCandidatesTitle,t[30]=g.pairEnableLanButton,t[31]=g.pairEnableLanEnabling,t[32]=g.pairEnableLanSecurityAuditLink,t[33]=g.pairInvalidBaseUrl,t[34]=g.pairLocalhostWarning,t[35]=g.pairSelectCandidateHint,t[36]=g.pairSelectCandidateTitle,t[37]=g.pairSubtitle,t[38]=g.pairSuggestedLanLabel,t[39]=g.pairTitle,t[40]=g.pairTunnelActive,t[41]=g.pairTunnelLanUrl,t[42]=g.pairTunnelPublicUrl,t[43]=g.pairUseSuggestedUrl,t[44]=g.pairWaitingForTunnel,t[45]=g.refreshQr,t[46]=b,t[47]=S,t[48]=x?.publicUrl,t[49]=V,t[50]=H,t[51]=ee,t[52]=U,t[53]=te}else V=t[49],H=t[50],ee=t[51],U=t[52],te=t[53];if(te!==Symbol.for(`react.early_return_sentinel`))return te;let ne;t[82]===g.pairSecurityNote?ne=t[83]:(ne=(0,$.jsx)(`p`,{className:`mb-3 text-xs text-fg-subtle`,children:g.pairSecurityNote}),t[82]=g.pairSecurityNote,t[83]=ne);let G;t[84]!==y||t[85]!==N||t[86]!==L||t[87]!==M||t[88]!==F||t[89]!==I||t[90]!==g.pairEncoding||t[91]!==g.pairImageError||t[92]!==g.pairQrDisabled?(G=N?(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-3 sm:items-start`,children:[F&&!I?(0,$.jsx)(`img`,{src:F,alt:``,className:`size-56 rounded-lg border border-edge-subtle bg-white object-contain p-3 dark:border-edge`}):null,L?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:g.pairEncoding}):null,I?(0,$.jsx)(`p`,{className:`text-center text-sm text-fg-muted sm:text-left`,children:g.pairImageError}):null,(0,$.jsx)(he,{text:N,labels:y})]}):M?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:g.pairQrDisabled}):null,t[84]=y,t[85]=N,t[86]=L,t[87]=M,t[88]=F,t[89]=I,t[90]=g.pairEncoding,t[91]=g.pairImageError,t[92]=g.pairQrDisabled,t[93]=G):G=t[93];let K;t[94]!==V||t[95]!==P||t[96]!==g.deeplinkTitle?(K=P&&!V?(0,$.jsxs)(`details`,{className:`mt-3 rounded-lg bg-surface-panel/80 px-3 py-2 shadow-surface`,children:[(0,$.jsx)(`summary`,{className:`cursor-pointer text-xs font-medium text-fg-muted`,children:g.deeplinkTitle}),(0,$.jsx)(`p`,{className:`mt-2 break-all font-mono text-[10px] leading-relaxed text-fg-subtle`,children:P})]}):null,t[94]=V,t[95]=P,t[96]=g.deeplinkTitle,t[97]=K):K=t[97];let q;t[98]!==V||t[99]!==g.pairMobileProbeHint||t[100]!==g.pairSchemeHint?(q=V?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`p`,{className:`mt-3 break-all font-mono text-[10px] leading-relaxed text-fg-subtle`,children:g.pairSchemeHint}),(0,$.jsx)(`p`,{className:`mt-1 text-[10px] leading-relaxed text-fg-subtle`,children:g.pairMobileProbeHint})]}),t[98]=V,t[99]=g.pairMobileProbeHint,t[100]=g.pairSchemeHint,t[101]=q):q=t[101];let re,J;t[102]===z?(re=t[103],J=t[104]):(re=()=>void z.runEnableLanPairing(),J=()=>{z.busy||z.setConfirmOpen(!1)},t[102]=z,t[103]=re,t[104]=J);let Y;t[105]!==z.confirmOpen||t[106]!==g.consentCancel||t[107]!==g.pairEnableLanButton||t[108]!==g.pairEnableLanConfirmBody||t[109]!==g.pairEnableLanConfirmTitle||t[110]!==re||t[111]!==J?(Y=(0,$.jsx)(ue,{open:z.confirmOpen,title:g.pairEnableLanConfirmTitle,description:g.pairEnableLanConfirmBody,confirmLabel:g.pairEnableLanButton,cancelLabel:g.consentCancel,onConfirm:re,onCancel:J}),t[105]=z.confirmOpen,t[106]=g.consentCancel,t[107]=g.pairEnableLanButton,t[108]=g.pairEnableLanConfirmBody,t[109]=g.pairEnableLanConfirmTitle,t[110]=re,t[111]=J,t[112]=Y):Y=t[112];let X;return t[113]!==ne||t[114]!==G||t[115]!==K||t[116]!==q||t[117]!==Y||t[118]!==H||t[119]!==ee||t[120]!==U?(X=(0,$.jsx)(Se,{children:(0,$.jsxs)($.Fragment,{children:[H,ee,U,ne,G,K,q,Y]})}),t[113]=ne,t[114]=G,t[115]=K,t[116]=q,t[117]=Y,t[118]=H,t[119]=ee,t[120]=U,t[121]=X):X=t[121],X}function Oe(e){return e.reachable}function ke(e){return e.kind===`lan`}function Ae(e){return e.language}function je(e){let t=(0,Z.c)(40),{open:n,title:r,intro:i,bullets:a,checkboxLabel:s,confirmLabel:c,cancelLabel:l,onConfirm:u,onCancel:d}=e,[f,p]=(0,Q.useState)(!1),m;t[0]===d?m=t[1]:(m=e=>{e||(p(!1),d())},t[0]=d,t[1]=m);let h;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(D,{className:o(`xopc-dialog-overlay fixed inset-0 bg-scrim backdrop-blur-[1px]`,I)}),t[2]=h):h=t[2];let g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=o(`fixed left-1/2 top-1/2 max-h-[min(90vh,40rem)] w-[min(100%-2rem,32rem)] -translate-x-1/2 -translate-y-1/2`,`overflow-y-auto rounded-2xl border border-edge bg-surface-panel p-6 shadow-popover outline-none dark:border-edge`,L),t[3]=g):g=t[3];let _;t[4]===r?_=t[5]:(_=(0,$.jsx)(S,{className:`text-base font-semibold text-fg`,children:r}),t[4]=r,t[5]=_);let v;t[6]===i?v=t[7]:(v=(0,$.jsx)(E,{className:`mt-2 text-sm text-fg-muted`,children:i}),t[6]=i,t[7]=v);let y;t[8]===a?y=t[9]:(y=a.map(Me),t[8]=a,t[9]=y);let b;t[10]===y?b=t[11]:(b=(0,$.jsx)(`ul`,{className:`mt-4 list-disc space-y-2 pl-5 text-sm text-fg-muted`,children:y}),t[10]=y,t[11]=b);let x;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>p(e.target.checked),t[12]=x):x=t[12];let C;t[13]===f?C=t[14]:(C=(0,$.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 size-4 shrink-0 rounded border-edge accent-accent`,checked:f,onChange:x}),t[13]=f,t[14]=C);let w;t[15]===s?w=t[16]:(w=(0,$.jsx)(`span`,{children:s}),t[15]=s,t[16]=w);let T;t[17]!==w||t[18]!==C?(T=(0,$.jsxs)(`label`,{className:`mt-5 flex cursor-pointer items-start gap-3 text-sm text-fg`,children:[C,w]}),t[17]=w,t[18]=C,t[19]=T):T=t[19];let O;t[20]!==l||t[21]!==d?(O=(0,$.jsx)(W,{type:`button`,variant:`secondary`,onClick:d,children:l}),t[20]=l,t[21]=d,t[22]=O):O=t[22];let k=!f,A;t[23]!==c||t[24]!==u||t[25]!==k?(A=(0,$.jsx)(W,{type:`button`,disabled:k,onClick:u,children:c}),t[23]=c,t[24]=u,t[25]=k,t[26]=A):A=t[26];let j;t[27]!==O||t[28]!==A?(j=(0,$.jsxs)(`div`,{className:`mt-6 flex justify-end gap-2`,children:[O,A]}),t[27]=O,t[28]=A,t[29]=j):j=t[29];let N;t[30]!==T||t[31]!==j||t[32]!==_||t[33]!==v||t[34]!==b?(N=(0,$.jsxs)(M,{children:[h,(0,$.jsxs)(K,{className:g,onOpenAutoFocus:Ne,children:[_,v,b,T,j]})]}),t[30]=T,t[31]=j,t[32]=_,t[33]=v,t[34]=b,t[35]=N):N=t[35];let P;return t[36]!==n||t[37]!==m||t[38]!==N?(P=(0,$.jsx)(q,{open:n,onOpenChange:m,children:N}),t[36]=n,t[37]=m,t[38]=N,t[39]=P):P=t[39],P}function Me(e){return(0,$.jsx)(`li`,{children:e},e)}function Ne(e){return e.preventDefault()}function Pe(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var Fe=[`preparing_frpc`,`registering`,`starting_frpc`];function Ie(e){return e?e===`reconnecting_frpc`?Fe.indexOf(`starting_frpc`):Fe.indexOf(e):-1}function Le(e,t){if(t.state===`connected`)return`done`;let n=t.startProgress?.phase,r=Fe.indexOf(e),i=Ie(n);return i<0?t.state===`connecting`||t.state===`reconnecting`?`active`:`pending`:r<i?`done`:r===i?`active`:`pending`}function Re(e,t,n){let r=n.startProgress;return Le(t,n)===`active`?t===`preparing_frpc`&&n.frpcDownload?n.frpcDownload.phase===`extracting`?e.frpcExtracting:n.frpcDownload.percent==null?e.frpcDownloading:e.frpcDownloadingPercent.replace(`{{percent}}`,String(n.frpcDownload.percent)):t===`registering`&&r?.publicUrl?e.stepRegisterDetail:t===`starting_frpc`?r?.phase===`reconnecting_frpc`?e.stepReconnectDetail:e.stepFrpcDetail:null:null}function ze(e,t){switch(t){case`preparing_frpc`:return e.stepPrepareFrpc;case`registering`:return e.stepRegister;case`starting_frpc`:return e.stepFrpcLogin}}function Be(e){if(!e)return null;let t=Math.max(0,Math.floor((Date.now()-new Date(e).getTime())/1e3));return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function Ve(e){let t=(0,Z.c)(31),{status:n,t:r}=e,[,i]=(0,Q.useState)(0),a;t[0]!==i||t[1]!==n.state?(a=()=>{if(n.state!==`connecting`&&n.state!==`reconnecting`)return;let e=window.setInterval(()=>i(He),1e3);return()=>window.clearInterval(e)},t[0]=i,t[1]=n.state,t[2]=a):a=t[2];let c=n.startProgress?.startedAt,l;if(t[3]!==n.state||t[4]!==c?(l=[n.state,c],t[3]=n.state,t[4]=c,t[5]=l):l=t[5],(0,Q.useEffect)(a,l),!(n.state===`connecting`||n.state===`reconnecting`||n.state===`connected`&&n.startProgress))return null;let u,d,f,p,m;if(t[6]!==n||t[7]!==r){let e=Be(n.startProgress?.startedAt);u=!!n.publicUrl&&n.state!==`connected`&&n.startProgress?.phase!==`registering`,d=`mt-3 space-y-3 rounded-lg bg-surface-panel/80 px-3 py-3 shadow-surface`;let i;t[13]===r.startProgressTitle?i=t[14]:(i=(0,$.jsx)(`p`,{className:`text-xs font-medium text-fg`,children:r.startProgressTitle}),t[13]=r.startProgressTitle,t[14]=i);let a;t[15]===r.startProgressHint?a=t[16]:(a=(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:r.startProgressHint}),t[15]=r.startProgressHint,t[16]=a),t[17]!==i||t[18]!==a?(f=(0,$.jsxs)(`div`,{children:[i,a]}),t[17]=i,t[18]=a,t[19]=f):f=t[19];let c=Fe.map(e=>{let t=Le(e,n),i=Re(r,e,n);return(0,$.jsxs)(`li`,{className:`flex gap-2 text-xs`,children:[(0,$.jsx)(`span`,{className:`mt-0.5 shrink-0 text-fg-subtle`,"aria-hidden":!0,children:t===`done`?(0,$.jsx)(s,{className:`size-3.5 text-emerald-600 dark:text-emerald-400`}):t===`active`?(0,$.jsx)(me,{className:`size-3.5 animate-spin text-accent`}):(0,$.jsx)(P,{className:`size-3.5`})}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:o(`font-medium`,t===`active`?`text-fg`:t===`done`?`text-fg-muted`:`text-fg-subtle`),children:ze(r,e)}),i?(0,$.jsx)(`div`,{className:`mt-0.5 text-fg-muted`,children:i}):null,e===`preparing_frpc`&&t===`active`&&n.frpcDownload&&n.frpcDownload.phase===`downloading`?(0,$.jsxs)(`div`,{className:`mt-2 space-y-1`,children:[(0,$.jsx)(`div`,{className:`h-1.5 w-full overflow-hidden rounded-full bg-surface-panel`,children:(0,$.jsx)(`div`,{className:o(`h-full rounded-full bg-accent transition-[width] duration-300`,n.frpcDownload.percent==null&&`w-1/3 animate-pulse`),style:n.frpcDownload.percent==null?void 0:{width:`${n.frpcDownload.percent}%`}})}),n.frpcDownload.bytesReceived!=null&&n.frpcDownload.totalBytes?(0,$.jsxs)(`p`,{className:`text-fg-subtle`,children:[Pe(n.frpcDownload.bytesReceived),` /`,` `,Pe(n.frpcDownload.totalBytes)]}):null]}):null,e===`preparing_frpc`&&t===`active`&&n.frpcDownload?.url?(0,$.jsxs)(`p`,{className:`mt-2 text-fg-subtle`,children:[(0,$.jsxs)(`span`,{className:`font-sans`,children:[r.frpcDownloadingUrlLabel,`: `]}),(0,$.jsx)(`a`,{href:n.frpcDownload.url,target:`_blank`,rel:`noopener noreferrer`,className:`break-all font-mono text-[11px] text-accent hover:underline`,children:n.frpcDownload.url})]}):null]})]},e)});t[20]===c?p=t[21]:(p=(0,$.jsx)(`ol`,{className:`space-y-2`,children:c}),t[20]=c,t[21]=p),m=e&&n.startProgress?(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:r.startProgressElapsed.replace(`{{elapsed}}`,e)}):null,t[6]=n,t[7]=r,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m}else u=t[8],d=t[9],f=t[10],p=t[11],m=t[12];let h;t[22]!==u||t[23]!==r.publicUrlPendingNotice?(h=u?(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:r.publicUrlPendingNotice}):null,t[22]=u,t[23]=r.publicUrlPendingNotice,t[24]=h):h=t[24];let g;return t[25]!==d||t[26]!==f||t[27]!==p||t[28]!==m||t[29]!==h?(g=(0,$.jsxs)(`div`,{className:d,children:[f,p,m,h]}),t[25]=d,t[26]=f,t[27]=p,t[28]=m,t[29]=h,t[30]=g):g=t[30],g}function He(e){return e+1}function Ue(e,t){return t.state===`connected`?e.statusConnected:t.state===`error`?e.statusError:t.startProgress?.phase===`reconnecting_frpc`?e.statusReconnecting:t.startProgress?.phase===`starting_frpc`?e.statusStartingFrpc:t.startProgress?.phase===`registering`?e.statusRegistering:t.startProgress?.phase===`preparing_frpc`||t.frpcDownload?e.statusPreparingFrpc:t.state===`connecting`||t.state===`reconnecting`?e.statusConnecting:e.statusOff}function We(e){return e.state===`connected`?`connected`:e.state===`error`?`error`:e.state===`connecting`||e.state===`reconnecting`||e.startProgress||e.frpcDownload?`progress`:`off`}function Ge(e){switch(e){case`connected`:return`bg-emerald-500/15 text-emerald-700 dark:text-emerald-400`;case`progress`:return`bg-amber-500/15 text-amber-700 dark:text-amber-400`;case`error`:return`bg-red-500/15 text-red-700 dark:text-red-400`;default:return`bg-surface-hover text-fg-muted`}}function Ke(e){if(!e)return`—`;let t=Date.now()-new Date(e).getTime();if(t<0)return`—`;let n=Math.floor(t/6e4);return n<60?`${n}m`:`${Math.floor(n/60)}h ${n%60}m`}function qe(e){let t=(0,Z.c)(61),{t:n,status:r,isLoading:i,statusErr:a,starting:s,stopping:c,showConsentExpired:l,copyLabels:u,startDisabled:d,startDisabledReason:f,stepLabel:p,onStart:m,onStop:h}=e,g=d===void 0?!1:d,_,v,y,b,S,C,w;t[0]!==r||t[1]!==s?(w=We(r),_=r.enabled||s,v=s||r.state===`connecting`||r.state===`reconnecting`||!!r.startProgress||!!r.frpcDownload,t[9]===Symbol.for(`react.memo_cache_sentinel`)?(C=o(xe(),`space-y-4`),t[9]=C):C=t[9],S=`flex flex-wrap items-start justify-between gap-3`,b=`flex items-center gap-2`,y=o(`inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium`,Ge(w)),t[0]=r,t[1]=s,t[2]=_,t[3]=v,t[4]=y,t[5]=b,t[6]=S,t[7]=C,t[8]=w):(_=t[2],v=t[3],y=t[4],b=t[5],S=t[6],C=t[7],w=t[8]);let T=w===`connected`&&`bg-emerald-500`,E=w===`progress`&&`bg-amber-500 animate-pulse`,D=w===`error`&&`bg-red-500`,O=w===`off`&&`bg-fg-subtle`,k;t[10]!==T||t[11]!==E||t[12]!==D||t[13]!==O?(k=o(`size-1.5 rounded-full`,T,E,D,O),t[10]=T,t[11]=E,t[12]=D,t[13]=O,t[14]=k):k=t[14];let A;t[15]===k?A=t[16]:(A=(0,$.jsx)(`span`,{className:k,"aria-hidden":!0}),t[15]=k,t[16]=A);let j;t[17]!==i||t[18]!==r||t[19]!==n?(j=i&&!r.enabled?(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block h-3 w-16 animate-pulse rounded-full bg-surface-hover/70 motion-reduce:animate-none`}):Ue(n,r),t[17]=i,t[18]=r,t[19]=n,t[20]=j):j=t[20];let M;t[21]!==A||t[22]!==j||t[23]!==y?(M=(0,$.jsxs)(`span`,{className:y,children:[A,j]}),t[21]=A,t[22]=j,t[23]=y,t[24]=M):M=t[24];let N;t[25]!==r.connectedSince||t[26]!==r.state||t[27]!==n.uptime?(N=r.connectedSince&&r.state===`connected`?(0,$.jsxs)(`span`,{className:`text-xs text-fg-subtle`,children:[n.uptime,` `,Ke(r.connectedSince)]}):null,t[25]=r.connectedSince,t[26]=r.state,t[27]=n.uptime,t[28]=N):N=t[28];let P;t[29]!==M||t[30]!==N||t[31]!==b?(P=(0,$.jsxs)(`div`,{className:b,children:[M,N]}),t[29]=M,t[30]=N,t[31]=b,t[32]=P):P=t[32];let F;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(se,{className:`size-4 text-fg-subtle`,strokeWidth:1.75,"aria-hidden":!0}),t[33]=F):F=t[33];let I;t[34]!==P||t[35]!==S?(I=(0,$.jsxs)(`div`,{className:S,children:[P,F]}),t[34]=P,t[35]=S,t[36]=I):I=t[36];let L;t[37]===a?L=t[38]:(L=a?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:a instanceof Error?a.message:String(a)}):null,t[37]=a,t[38]=L);let R;t[39]!==l||t[40]!==n.consentExpiredBanner?(R=l?(0,$.jsx)(`p`,{className:`rounded-lg border border-amber-500/25 bg-amber-500/5 px-3 py-2 text-xs text-fg-muted`,children:n.consentExpiredBanner}):null,t[39]=l,t[40]=n.consentExpiredBanner,t[41]=R):R=t[41];let z;t[42]!==_||t[43]!==u||t[44]!==m||t[45]!==h||t[46]!==v||t[47]!==r||t[48]!==g||t[49]!==f||t[50]!==s||t[51]!==p||t[52]!==c||t[53]!==n?(z=_?(0,$.jsxs)(`div`,{className:`space-y-4`,children:[r.publicUrl?(0,$.jsx)(`div`,{className:`rounded-xl bg-surface-panel/80 px-3 py-3 shadow-surface`,children:(0,$.jsx)(he,{label:n.publicUrlLabel,text:r.publicUrl,labels:u})}):null,v?(0,$.jsx)(Ve,{status:r,t:n}):null,r.lastError&&r.state===`error`?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:r.lastError}):null,(0,$.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:r.enabled?(0,$.jsxs)(W,{type:`button`,variant:`secondary`,disabled:c,onClick:h,children:[c?(0,$.jsx)(me,{className:`size-4 animate-spin`}):null,n.stop]}):(0,$.jsxs)(W,{type:`button`,disabled:s,onClick:m,children:[s?(0,$.jsx)(me,{className:`size-4 animate-spin`}):(0,$.jsx)(ae,{className:`size-4`}),n.start]})})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[p?(0,$.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-fg-subtle`,children:p}):null,(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:n.emptyStateTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-fg-muted`,children:n.emptyStateBody})]}),(0,$.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-amber-500/25 bg-amber-500/5 px-3 py-2.5 text-xs text-fg-muted`,children:[(0,$.jsx)(x,{className:`mt-0.5 size-4 shrink-0 text-amber-600 dark:text-amber-400`}),(0,$.jsx)(`p`,{children:n.riskBannerBody})]}),g&&f?(0,$.jsx)(`p`,{className:`text-sm text-amber-800 dark:text-amber-200`,children:f}):null,(0,$.jsxs)(W,{type:`button`,disabled:s||g,onClick:m,className:`w-full sm:w-auto`,children:[s?(0,$.jsx)(me,{className:`size-4 animate-spin`}):(0,$.jsx)(ae,{className:`size-4`}),n.start]})]}),t[42]=_,t[43]=u,t[44]=m,t[45]=h,t[46]=v,t[47]=r,t[48]=g,t[49]=f,t[50]=s,t[51]=p,t[52]=c,t[53]=n,t[54]=z):z=t[54];let B;return t[55]!==I||t[56]!==L||t[57]!==R||t[58]!==z||t[59]!==C?(B=(0,$.jsxs)(`section`,{className:C,children:[I,L,R,z]}),t[55]=I,t[56]=L,t[57]=R,t[58]=z,t[59]=C,t[60]=B):B=t[60],B}var Je=`https://console.xopc.ai/keys/tunnel`,Ye={reconfiguring:!1};function Xe(e){let t=(0,Z.c)(84),{t:n,brokerSecretFromEnv:r,brokerSecretMissing:i,brokerSecretConfiguredInConfig:a,brokerSecretMaskedValue:c,brokerSecretDraft:l,savingBrokerSecret:u,brokerSecretNotice:d,copyFailedLabel:f,onDraftChange:p,onSave:m,onClear:h,sectionRef:g}=e,_=(0,Q.useId)(),v=i&&!r,y=!v,[b,x]=(0,Q.useReducer)(re,Ye),{reconfiguring:S}=b,C;t[0]!==a||t[1]!==l||t[2]!==r||t[3]!==S?(C=a&&!r&&!S&&!l.trim(),t[0]=a,t[1]=l,t[2]=r,t[3]=S,t[4]=C):C=t[4];let w=C,T;t[5]!==n.copied||t[6]!==n.copyKey||t[7]!==n.hideKey||t[8]!==n.showKey?(T={show:n.showKey,hide:n.hideKey,copy:n.copyKey,copied:n.copied},t[5]=n.copied,t[6]=n.copyKey,t[7]=n.hideKey,t[8]=n.showKey,t[9]=T):T=t[9];let E=T,D;t[10]===l?D=t[11]:(D=l.trim().length>0&&!F(l.trim()),t[10]=l,t[11]=D);let O=D,A;t[12]===p?A=t[13]:(A=()=>{x({type:`patch`,patch:{reconfiguring:!1}}),p(``)},t[12]=p,t[13]=A);let j=A,M=v&&`ring-1 ring-amber-500/30`,N;t[14]===M?N=t[15]:(N=o(M),t[14]=M,t[15]=N);let P=y?`bg-emerald-500/10 text-emerald-600 dark:text-emerald-400`:v?`bg-amber-500/10 text-amber-700 dark:text-amber-400`:`bg-surface-hover text-fg-muted`,I;t[16]===P?I=t[17]:(I=o(`flex size-9 shrink-0 items-center justify-center rounded-lg`,P),t[16]=P,t[17]=I);let L;t[18]===y?L=t[19]:(L=y?(0,$.jsx)(s,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}):(0,$.jsx)(ee,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0}),t[18]=y,t[19]=L);let R;t[20]!==I||t[21]!==L?(R=(0,$.jsx)(`span`,{className:I,children:L}),t[20]=I,t[21]=L,t[22]=R):R=t[22];let z=y?n.brokerSecretReadyTitle:n.brokerSecretStepTitle,B;t[23]===z?B=t[24]:(B=(0,$.jsx)(`p`,{className:`text-sm font-semibold text-fg`,children:z}),t[23]=z,t[24]=B);let V=y?n.brokerSecretReadyHint:n.brokerSecretHint,H;t[25]===V?H=t[26]:(H=(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-fg-muted`,children:V}),t[25]=V,t[26]=H);let U;t[27]!==v||t[28]!==n.brokerSecretMissingHint?(U=v?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-amber-800 dark:text-amber-200`,children:n.brokerSecretMissingHint}):null,t[27]=v,t[28]=n.brokerSecretMissingHint,t[29]=U):U=t[29];let te;t[30]!==B||t[31]!==H||t[32]!==U?(te=(0,$.jsxs)(`div`,{children:[B,H,U]}),t[30]=B,t[31]=H,t[32]=U,t[33]=te):te=t[33];let ne;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,$.jsx)(k,{className:`size-3`,"aria-hidden":!0}),t[34]=ne):ne=t[34];let G;t[35]===n.brokerSecretConsoleLink?G=t[36]:(G=(0,$.jsxs)(`a`,{href:Je,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex w-fit items-center gap-1 text-xs font-medium text-accent-fg hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[n.brokerSecretConsoleLink,ne]}),t[35]=n.brokerSecretConsoleLink,t[36]=G);let K;t[37]!==r||t[38]!==n.brokerSecretEnvHint?(K=r?(0,$.jsx)(`p`,{className:`rounded-lg bg-surface-panel/80 px-3 py-2 text-xs text-fg-muted shadow-surface`,children:n.brokerSecretEnvHint}):null,t[37]=r,t[38]=n.brokerSecretEnvHint,t[39]=K):K=t[39];let q;t[40]!==a||t[41]!==l||t[42]!==r||t[43]!==c||t[44]!==O||t[45]!==j||t[46]!==f||t[47]!==_||t[48]!==v||t[49]!==h||t[50]!==p||t[51]!==m||t[52]!==S||t[53]!==u||t[54]!==E||t[55]!==w||t[56]!==n.brokerSecretCancelReconfigure||t[57]!==n.brokerSecretClear||t[58]!==n.brokerSecretMaskedHelp||t[59]!==n.brokerSecretNotInConfigFile||t[60]!==n.brokerSecretPlaceholder||t[61]!==n.brokerSecretReconfigure||t[62]!==n.brokerSecretRevealFailed||t[63]!==n.brokerSecretSave||t[64]!==n.brokerSecretSaveAndContinue||t[65]!==n.brokerSecretTitle?(q=w?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`label`,{className:`sr-only`,htmlFor:_,children:n.brokerSecretTitle}),(0,$.jsx)(ie,{id:_,value:c,labels:E,reveal:Ze,loadFailedLabel:f||n.brokerSecretRevealFailed,maskedHelp:n.brokerSecretMaskedHelp,notInConfigFile:n.brokerSecretNotInConfigFile,readOnly:!0}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsx)(W,{type:`button`,variant:`secondary`,disabled:u,onClick:()=>{x({type:`patch`,patch:{reconfiguring:!0}})},children:n.brokerSecretReconfigure}),(0,$.jsx)(W,{type:`button`,variant:`ghost`,disabled:u,onClick:h,children:n.brokerSecretClear})]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`label`,{className:`sr-only`,htmlFor:_,children:n.brokerSecretTitle}),(0,$.jsx)(ie,{id:_,value:l,onChange:p,placeholder:n.brokerSecretPlaceholder,labels:E,disabled:u}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsxs)(W,{type:`button`,disabled:u||!O,onClick:m,children:[u?(0,$.jsx)(me,{className:`size-4 animate-spin`}):null,v?n.brokerSecretSaveAndContinue:n.brokerSecretSave]}),a||r?(0,$.jsx)(W,{type:`button`,variant:`ghost`,disabled:u,onClick:h,children:n.brokerSecretClear}):null,S?(0,$.jsx)(W,{type:`button`,variant:`ghost`,disabled:u,onClick:j,children:n.brokerSecretCancelReconfigure}):null]})]}),t[40]=a,t[41]=l,t[42]=r,t[43]=c,t[44]=O,t[45]=j,t[46]=f,t[47]=_,t[48]=v,t[49]=h,t[50]=p,t[51]=m,t[52]=S,t[53]=u,t[54]=E,t[55]=w,t[56]=n.brokerSecretCancelReconfigure,t[57]=n.brokerSecretClear,t[58]=n.brokerSecretMaskedHelp,t[59]=n.brokerSecretNotInConfigFile,t[60]=n.brokerSecretPlaceholder,t[61]=n.brokerSecretReconfigure,t[62]=n.brokerSecretRevealFailed,t[63]=n.brokerSecretSave,t[64]=n.brokerSecretSaveAndContinue,t[65]=n.brokerSecretTitle,t[66]=q):q=t[66];let J;t[67]===d?J=t[68]:(J=d?(0,$.jsx)(`p`,{className:`text-xs text-emerald-700 dark:text-emerald-400`,children:d}):null,t[67]=d,t[68]=J);let Y;t[69]!==te||t[70]!==G||t[71]!==K||t[72]!==q||t[73]!==J?(Y=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-3`,children:[te,G,K,q,J]}),t[69]=te,t[70]=G,t[71]=K,t[72]=q,t[73]=J,t[74]=Y):Y=t[74];let X;t[75]!==R||t[76]!==Y?(X=(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[R,Y]}),t[75]=R,t[76]=Y,t[77]=X):X=t[77];let ae;t[78]!==X||t[79]!==N?(ae=(0,$.jsx)(Se,{className:N,children:X}),t[78]=X,t[79]=N,t[80]=ae):ae=t[80];let oe;return t[81]!==g||t[82]!==ae?(oe=(0,$.jsx)(`div`,{ref:g,id:`tunnel-broker-secret-setup`,children:ae}),t[81]=g,t[82]=ae,t[83]=oe):oe=t[83],oe}function Ze(){return R().then(Qe)}function Qe(e){return e.registrationSecret??null}function $e(e){let t=(0,Z.c)(10),{language:n,label:r,section:i,className:a}=e,s;t[0]!==n||t[1]!==i?(s=C(n,i),t[0]=n,t[1]=i,t[2]=s):s=t[2];let c;t[3]===a?c=t[4]:(c=o(`inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40`,a),t[3]=a,t[4]=c);let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(k,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[5]=l):l=t[5];let u;return t[6]!==r||t[7]!==s||t[8]!==c?(u=(0,$.jsxs)(`a`,{href:s,target:`_blank`,rel:`noreferrer`,className:c,children:[r,l]}),t[6]=r,t[7]=s,t[8]=c,t[9]=u):u=t[9],u}var et=e(Ce(),1),tt={width:216,margin:2,errorCorrectionLevel:`M`,color:{dark:`#000000ff`,light:`#ffffffff`}};async function nt(e){return et.toDataURL(e,tt)}function rt(e){let t=e?.candidates??[],n=t.find(e=>e.kind===`lan`&&e.reachable),r=t.find(e=>e.kind===`lan`);return(n??r)?.url?.trim()??``}function it(e,t){let n=t.trim();return!n||!e?!1:e.candidates.some(e=>e.kind===`tunnel`&&e.url.trim()===n)}function at(e,t){return e?t?rt(e)||e.recommended.url?.trim()||``:e.recommended.url?.trim()||``:``}function ot(e,t){let n=t?.preferLan===!0,r=!!e,{mutate:i}=_(),a=(0,Q.useRef)(!1),{data:o}=v(r?`tunnel-status`:null,Y,{refreshInterval:6e4}),{data:s,mutate:c}=v(r?`tunnel-pair-context`:null,U,{refreshInterval:6e4});(0,Q.useEffect)(()=>{let e=()=>{i(`tunnel-status`),i(`tunnel-qr`),i(`tunnel-pair`),i(`tunnel-pair-context`)};return window.addEventListener(`tunnel-status`,e),()=>window.removeEventListener(`tunnel-status`,e)},[i]);let l=o?.state===`connected`&&!!o.publicUrl?.trim(),u=l&&!n,{data:f,mutate:p}=v(u&&r?`tunnel-qr`:null,oe,{refreshInterval:4*6e4}),{data:m,mutate:g}=v(!u&&r&&s?.pairingReady?`tunnel-pair`:null,de,{refreshInterval:4*6e4}),[y,b]=(0,Q.useState)(``),[x,S]=(0,Q.useState)(``),[C,w]=(0,Q.useState)({pairContext:void 0,preferLan:n});if(!a.current&&(s!==C.pairContext||n!==C.preferLan)){w({pairContext:s,preferLan:n});let e=at(s,n);y!==e&&b(e)}let T=(0,Q.useCallback)(e=>{a.current=!0,b(e)},[]),E=(0,Q.useCallback)(()=>{let e=at(s,n);e&&(a.current=!0,b(e))},[s,n]),D=(0,Q.useCallback)(e=>{let t=e.trim();t&&(a.current=!0,b(t))},[]),O=(0,Q.useCallback)(e=>{a.current=!1,b(e?.trim()||at(s,n))},[s,n]),k=y.trim(),j=(0,Q.useMemo)(()=>{try{let e=new URL(k);return e.protocol===`http:`||e.protocol===`https:`}catch{return!1}},[k]),M=j&&h(k),N=!u&&!!(s&&!s.pairingReady&&s.blockReason===`GATEWAY_LOOPBACK_ONLY`),P=!u&&j&&!M&&!!m?.pairingSecret&&(s?.pairingReady===!0||!N),F=(0,Q.useMemo)(()=>{let e=rt(s);return n?e||(k&&!it(s,k)?k:``):k},[s,n,k]),I=(0,Q.useMemo)(()=>{if(!e)return``;if(x.trim())return x.trim();if(u&&f?.qrPayload?.trim())return f.qrPayload.trim();if(!P||!m?.pairingSecret)return``;let t=s?.candidates.find(e=>e.kind===`tunnel`&&e.reachable),r=s?.candidates.find(e=>e.kind===`lan`&&e.reachable),i=n?F:t?.url??k;return i?d({baseUrl:i,pairingSecret:m.pairingSecret,lanUrl:n?null:t&&r?r.url:null}):``},[e,F,m?.pairingSecret,P,x,n,k,u,f?.qrPayload,s?.candidates]),L=A(()=>nt(I),[I],{enabled:!!I,initial:null,errorData:null}),R=I?L.data:null,z=!!(I&&L.error!==null&&!L.loading);return{tunnelActive:l,tunnelStatus:o,tunnelQr:f,pairContext:s,pairBaseUrl:y,setPairBaseUrl:T,applySuggestedPairUrl:E,applyCandidateUrl:D,baseOk:j,localhostWarn:M,pairingBlocked:N,deepLink:I,qrPayload:I,qrDataUrl:R,qrGenFailed:z,encoding:!!(I&&!R&&!z),refreshQr:(0,Q.useCallback)(async e=>{if(e?.trim()){S(e.trim()),p({qrPayload:e.trim(),publicUrl:o?.publicUrl??``,lanUrl:f?.lanUrl??null},!1);return}S(``),await c(),u?await p():s?.pairingReady&&await g()},[g,c,p,s?.pairingReady,f?.lanUrl,o?.publicUrl,u]),resetPairBaseFromContext:O}}var st={actionError:null,starting:!1,stopping:!1,savingAutoStart:!1,consentOpen:!1,autoStartConfirmOpen:!1,releaseConfirmOpen:!1,releasing:!1,brokerSecretDraft:``,savingBrokerSecret:!1,brokerSecretNotice:null};function ct({embedded:e=!1}){let t=p(e=>e.language),n=l(t).tunnelSettings,r=m(e=>e.token),i=!!r,[a,s]=(0,Q.useReducer)(re,st),{actionError:c,starting:u,stopping:d,savingAutoStart:f,consentOpen:h,autoStartConfirmOpen:g,releaseConfirmOpen:_,releasing:y,brokerSecretDraft:b,savingBrokerSecret:x,brokerSecretNotice:S}=a,C=(0,Q.useRef)(null),w=ot(r??``),{data:T}=G(i),{data:E,error:D,isLoading:O,mutate:k}=v(i?`tunnel-status`:null,Y,{refreshInterval:e=>u?1e3:e?.frpcDownload||e?.state===`connecting`||e?.state===`reconnecting`?2e3:6e4}),A=(0,Q.useMemo)(()=>{let e=T?.payload?.config;if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e.tunnel;if(t&&typeof t==`object`&&!Array.isArray(t)&&t.autoStart===!0)return!0}return E?.config?.autoStart===!0},[T,E?.config?.autoStart]),j=(0,Q.useMemo)(()=>{let e=T?.payload?.config;if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e.tunnel;if(t&&typeof t==`object`&&!Array.isArray(t)){let e=t.registrationSecret;if(typeof e==`string`)return e}}return``},[T]),M=F(j),N=E?.registrationSecret?.source===`env`,P=E?.registrationSecret?.source===`missing`,I=E?.registrationSecret?.configured===!0;(0,Q.useEffect)(()=>{let e=()=>{k()};return window.addEventListener(`tunnel-status`,e),()=>window.removeEventListener(`tunnel-status`,e)},[k]);let L=(0,Q.useMemo)(()=>[n.consentBullet1,n.consentBullet2,n.consentBullet3],[n.consentBullet1,n.consentBullet2,n.consentBullet3]),R=(0,Q.useCallback)(async()=>{s({type:`patch`,patch:{actionError:null}}),s({type:`patch`,patch:{starting:!0}});try{let e=await fe();await k(),ce(),await w.refreshQr(e.qrPayload)}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{starting:!1}})}},[k,w.refreshQr]),z=(0,Q.useCallback)(()=>{if(!I){s({type:`patch`,patch:{actionError:n.brokerSecretRequiredBeforeStart}}),C.current?.scrollIntoView({behavior:`smooth`,block:`start`});return}if(E?.consentRequired){s({type:`patch`,patch:{consentOpen:!0}});return}R()},[I,E?.consentRequired,R,n.brokerSecretRequiredBeforeStart]),B=(0,Q.useCallback)(async()=>{s({type:`patch`,patch:{consentOpen:!1}}),s({type:`patch`,patch:{actionError:null}});try{await te(),await Promise.all([k(),R()])}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}},[k,R]),V=(0,Q.useCallback)(async()=>{s({type:`patch`,patch:{actionError:null}}),s({type:`patch`,patch:{stopping:!0}});try{await pe(),await Promise.all([w.refreshQr(),k()]),ce()}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{stopping:!1}})}},[k,w.refreshQr]),H=(0,Q.useCallback)(async e=>{s({type:`patch`,patch:{savingAutoStart:!0}}),s({type:`patch`,patch:{actionError:null}});try{await ne({autoStart:e}),ce()}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{savingAutoStart:!1}})}},[]),ee=(0,Q.useCallback)(()=>{if(A){H(!1);return}if(E?.consentRequired){s({type:`patch`,patch:{actionError:n.consentExpiredBanner}});return}if(!E?.canAutoStart){s({type:`patch`,patch:{actionError:n.autoStartHint}});return}s({type:`patch`,patch:{autoStartConfirmOpen:!0}})},[H,E?.canAutoStart,E?.consentRequired,n,A]),U=(0,Q.useCallback)(async()=>{let e=b.trim();if(e){s({type:`patch`,patch:{savingBrokerSecret:!0,actionError:null,brokerSecretNotice:null}});try{await ne({registrationSecret:e}),s({type:`patch`,patch:{brokerSecretDraft:``,brokerSecretNotice:n.brokerSecretSaved}}),ce(),await k(),s({type:`patch`,patch:{actionError:null}})}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{savingBrokerSecret:!1}})}}},[b,k,n.brokerSecretSaved]),K=(0,Q.useCallback)(async()=>{s({type:`patch`,patch:{savingBrokerSecret:!0,actionError:null,brokerSecretNotice:null}});try{await ne({registrationSecret:null}),s({type:`patch`,patch:{brokerSecretDraft:``,brokerSecretNotice:n.brokerSecretCleared}}),ce(),await k()}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{savingBrokerSecret:!1}})}},[k,n.brokerSecretCleared]),q=(0,Q.useCallback)(async()=>{s({type:`patch`,patch:{releaseConfirmOpen:!1,actionError:null,releasing:!0}});try{await pe({release:!0}),await Promise.all([w.refreshQr(),k()]),ce()}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{releasing:!1}})}},[k,w.refreshQr]),J=(0,Q.useMemo)(()=>({copy:n.copyUrl,copied:n.copied,copyFailed:l(t).clipboard.copyFailed}),[t,n.copyUrl,n.copied]);if(!i)return(0,$.jsx)(`div`,{className:e?void 0:`w-full px-3 py-8 sm:px-5 xl:px-6`,children:(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:n.needToken})});let X=E??{enabled:!1,state:`disconnected`,subdomain:null,publicUrl:null,connectedSince:null,frpcPid:null,lastHeartbeatAt:null,lastError:null,consentRequired:!0,config:{autoStart:A,brokerUrl:`https://frp.xopc.ai/api`}},ie=E?.consentRequired&&(X.enabled||A||E?.consent?.acceptedAt),ae=(0,$.jsx)(Xe,{t:n,brokerSecretFromEnv:N,brokerSecretMissing:P,brokerSecretConfiguredInConfig:M,brokerSecretMaskedValue:M?j:``,brokerSecretDraft:b,savingBrokerSecret:x,brokerSecretNotice:S,copyFailedLabel:l(t).clipboard.copyFailed,onDraftChange:e=>s({type:`patch`,patch:{brokerSecretDraft:e}}),onSave:()=>void U(),onClear:()=>void K(),sectionRef:C}),oe=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(je,{open:h,title:n.consentTitle,intro:n.consentIntro,bullets:L,checkboxLabel:n.consentCheckbox,confirmLabel:ie?n.consentReconfirm:n.consentConfirm,cancelLabel:n.consentCancel,onConfirm:()=>void B(),onCancel:()=>s({type:`patch`,patch:{consentOpen:!1}})},h?`consent-open`:`consent-closed`),(0,$.jsx)(ue,{open:g,title:n.autoStartConfirmTitle,description:n.autoStartConfirmBody,confirmLabel:n.autoStartConfirmLabel,cancelLabel:n.consentCancel,onConfirm:()=>{s({type:`patch`,patch:{autoStartConfirmOpen:!1}}),H(!0)},onCancel:()=>s({type:`patch`,patch:{autoStartConfirmOpen:!1}})}),(0,$.jsx)(ue,{open:_,title:n.releaseConfirmTitle,description:n.releaseConfirmBody,confirmLabel:n.releaseConfirmLabel,cancelLabel:n.consentCancel,destructive:!0,onConfirm:()=>void q(),onCancel:()=>s({type:`patch`,patch:{releaseConfirmOpen:!1}})})]});return e?(0,$.jsxs)(`div`,{className:`flex w-full flex-col gap-4`,children:[c?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:c}):null,ae,(0,$.jsx)(qe,{t:n,status:X,isLoading:O,statusErr:D,starting:u,stopping:d,showConsentExpired:!!ie,copyLabels:J,startDisabled:!I,startDisabledReason:I?void 0:n.brokerSecretRequiredBeforeStart,stepLabel:n.flowStepStart,onStart:z,onStop:()=>void V()}),(0,$.jsx)(De,{pairQr:w,gatewayToken:r??``,streamlined:!0,onRefreshQr:()=>void w.refreshQr()}),(0,$.jsxs)(ye,{showLabel:n.showOptions,hideLabel:n.hideOptions,children:[(0,$.jsxs)(`label`,{className:o(`flex items-center gap-3 text-sm text-fg`,!A&&!E?.canAutoStart?`cursor-not-allowed opacity-60`:`cursor-pointer`),children:[(0,$.jsx)(`input`,{type:`checkbox`,className:`size-4 rounded border-edge accent-accent`,checked:A,disabled:f||!A&&!E?.canAutoStart,onChange:ee}),n.autoStart]}),!E?.canAutoStart&&!A?(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:n.autoStartHint}):null,X.subdomain||X.publicUrl?(0,$.jsxs)(`div`,{className:`space-y-2 border-t border-edge-subtle pt-4`,children:[(0,$.jsxs)(W,{type:`button`,variant:`secondary`,disabled:y||d,className:`border-danger/40 text-danger hover:bg-danger/10`,onClick:()=>s({type:`patch`,patch:{releaseConfirmOpen:!0}}),children:[y?(0,$.jsx)(me,{className:`size-4 animate-spin`}):null,n.release]}),(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:n.releaseHint})]}):null]}),(0,$.jsx)(ye,{showLabel:n.showAdvanced,hideLabel:n.hideAdvanced,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-edge-subtle pt-4 text-xs text-fg-subtle`,children:[(0,$.jsxs)(`p`,{className:`flex items-start gap-2`,children:[(0,$.jsx)(se,{className:`mt-0.5 size-4 shrink-0 text-accent`}),(0,$.jsx)(`span`,{children:n.brokerNote})]}),(0,$.jsx)($e,{language:t,label:n.brokerDocsLink,section:`public-tunnel`,className:`text-xs`})]})}),oe]}):(0,$.jsxs)(`div`,{className:e?`flex w-full flex-col gap-6`:`flex w-full flex-col gap-6 px-3 py-8 sm:px-5 xl:px-6`,children:[e?null:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{className:`text-lg font-semibold text-fg`,children:n.title}),(0,$.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:n.subtitle})]}),c?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:c}):null,ae,(0,$.jsx)(qe,{t:n,status:X,isLoading:O,statusErr:D,starting:u,stopping:d,showConsentExpired:!!ie,copyLabels:J,startDisabled:!I,startDisabledReason:I?void 0:n.brokerSecretRequiredBeforeStart,onStart:z,onStop:()=>void V()}),(0,$.jsx)(De,{pairQr:w,gatewayToken:r??``}),X.subdomain||X.publicUrl?(0,$.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,$.jsxs)(W,{type:`button`,variant:`secondary`,disabled:y||d,className:`border-danger/40 text-danger hover:bg-danger/10`,onClick:()=>s({type:`patch`,patch:{releaseConfirmOpen:!0}}),children:[y?(0,$.jsx)(me,{className:`size-4 animate-spin`}):null,n.release]})}):null,X.subdomain||X.publicUrl?(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:n.releaseHint}):null,(0,$.jsxs)(Se,{children:[(0,$.jsx)(`h2`,{className:`mb-3 text-sm font-semibold text-fg`,children:n.optionsTitle}),(0,$.jsxs)(`label`,{className:o(`flex items-center gap-3 text-sm text-fg`,!A&&!E?.canAutoStart?`cursor-not-allowed opacity-60`:`cursor-pointer`),children:[(0,$.jsx)(`input`,{type:`checkbox`,className:`size-4 rounded border-edge accent-accent`,checked:A,disabled:f||!A&&!E?.canAutoStart,onChange:ee}),n.autoStart]}),!E?.canAutoStart&&!A?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-fg-subtle`,children:n.autoStartHint}):null]}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg bg-surface-panel/80 px-3 py-2 text-xs text-fg-subtle shadow-surface`,children:[(0,$.jsxs)(`p`,{className:`flex items-start gap-2`,children:[(0,$.jsx)(se,{className:`mt-0.5 size-4 shrink-0 text-accent`}),(0,$.jsx)(`span`,{children:n.brokerNote})]}),(0,$.jsx)($e,{language:t,label:n.brokerDocsLink,section:`public-tunnel`,className:`text-xs`})]}),oe]})}async function lt(){let e=await g(`/api/exposure/status`);if(!e.ok)throw Error(`Failed to load exposure status (${e.status})`);return await e.json()}async function ut(e=`serve`){let t=await g(`/api/exposure/tailscale/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({mode:e})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`Start failed (${t.status})`)}return await t.json()}async function dt(){let e=await g(`/api/exposure/tailscale/stop`,{method:`POST`});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error??`Stop failed (${e.status})`)}return await e.json()}var ft=`https://tailscale.com/download`;function pt(e){let t=(0,Z.c)(2),{label:n}=e,r;return t[0]===n?r=t[1]:(r=(0,$.jsx)(`a`,{href:ft,target:`_blank`,rel:`noreferrer`,className:`font-medium text-accent hover:underline`,children:n}),t[0]=n,t[1]=r),r}function mt({embedded:e=!1}){let t=p(e=>e.language),n=l(t).remoteAccess.tailscale,r=(0,Q.useMemo)(()=>({copy:n.copyUrl,copied:n.copied,copyFailed:l(t).clipboard.copyFailed}),[t,n.copyUrl,n.copied]),i=!!m(e=>e.token),[a,o]=(0,Q.useState)(!1),[s,c]=(0,Q.useState)(null),{data:u,mutate:d,isLoading:f}=v(i?`exposure-status`:null,lt,{refreshInterval:3e4}),h=u?.tailscale.hostname,g=u?.tailscale.active===!0,_=u?.tailscale.cliAvailable!==!1,y=h?`https://${h}/`:null,b=(0,Q.useCallback)(async()=>{o(!0),c(null);try{await ut(`serve`),await d()}catch(e){c(e instanceof Error?e.message:String(e))}finally{o(!1)}},[d]),x=(0,Q.useCallback)(async()=>{o(!0),c(null);try{await dt(),await d()}catch(e){c(e instanceof Error?e.message:String(e))}finally{o(!1)}},[d]);if(!i)return null;let S=(0,$.jsxs)(`div`,{className:e?`space-y-4`:`mt-4 space-y-3`,children:[e?(0,$.jsxs)(`ol`,{className:`space-y-3 text-sm text-fg-muted`,children:[(0,$.jsxs)(`li`,{className:`flex gap-2`,children:[(0,$.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center rounded-full bg-surface-hover text-xs font-semibold text-fg`,children:`1`}),(0,$.jsxs)(`span`,{children:[n.stepInstallBefore,(0,$.jsx)(pt,{label:n.stepInstallLink}),n.stepInstallAfter]})]}),(0,$.jsxs)(`li`,{className:`flex gap-2`,children:[(0,$.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center rounded-full bg-surface-hover text-xs font-semibold text-fg`,children:`2`}),(0,$.jsx)(`span`,{children:n.stepEnable})]}),(0,$.jsxs)(`li`,{className:`flex gap-2`,children:[(0,$.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center rounded-full bg-surface-hover text-xs font-semibold text-fg`,children:`3`}),(0,$.jsx)(`span`,{children:n.stepCopy})]})]}):null,e&&u?.tailscale.cliAvailable===!1?(0,$.jsxs)(`p`,{className:`rounded-lg border border-amber-500/25 bg-amber-500/5 px-3 py-2 text-sm text-fg-muted`,children:[n.cliMissingIntro,` `,(0,$.jsx)(pt,{label:n.cliMissingDownloadLink}),n.cliMissingSuffix]}):null,f&&!u?(0,$.jsxs)(`div`,{className:`grid gap-3`,"aria-busy":`true`,children:[(0,$.jsx)(z,{className:`h-20 rounded-lg`}),(0,$.jsx)(z,{className:`h-20 rounded-lg`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(Se,{children:[(0,$.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:n.statusLabel}),(0,$.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:g?n.statusActive:n.statusOff}),y?(0,$.jsx)(`div`,{className:`mt-3`,children:(0,$.jsx)(he,{text:y,labels:r})}):null,s?(0,$.jsx)(`p`,{className:`mt-2 text-sm text-red-600 dark:text-red-400`,children:s}):null,(0,$.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:g?(0,$.jsxs)(W,{type:`button`,variant:`secondary`,disabled:a,onClick:()=>void x(),children:[a?(0,$.jsx)(me,{className:`mr-1 h-4 w-4 animate-spin`}):null,n.disableServe]}):(0,$.jsxs)(W,{type:`button`,disabled:a||!_,onClick:()=>void b(),children:[a?(0,$.jsx)(me,{className:`mr-1 h-4 w-4 animate-spin`}):(0,$.jsx)(ae,{className:`mr-1 h-4 w-4`}),n.enableServe]})})]}),(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:n.hint}),(0,$.jsx)($e,{language:t,label:n.docsLink,section:`tailscale-serve`,className:`mt-2`})]})]});return e?S:(0,$.jsxs)(Se,{children:[(0,$.jsx)(be,{icon:se,title:n.title,subtitle:n.subtitle}),S]})}function ht(){let e=(0,Z.c)(26),t=p(_t),n=m(gt),r;e[0]===t?r=e[1]:(r=l(t),e[0]=t,e[1]=r);let i=r.remoteAccess.lan,o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o={preferLan:!0},e[2]=o):o=e[2];let s=ot(n??``,o),c;e[3]!==i.subtitle||e[4]!==i.title?(c=(0,$.jsx)(be,{icon:b,title:i.title,subtitle:i.subtitle}),e[3]=i.subtitle,e[4]=i.title,e[5]=c):c=e[5];let u;e[6]===i.body?u=e[7]:(u=(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:i.body}),e[6]=i.body,e[7]=u);let d;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(k,{className:`size-3.5`,"aria-hidden":!0}),e[8]=d):d=e[8];let f;e[9]===i.link?f=e[10]:(f=(0,$.jsxs)(a,{to:`/settings/gateway`,className:`inline-flex items-center gap-1.5 text-sm font-medium text-accent hover:underline`,children:[i.link,d]}),e[9]=i.link,e[10]=f);let h;e[11]!==u||e[12]!==f?(h=(0,$.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[u,f]}),e[11]=u,e[12]=f,e[13]=h):h=e[13];let g;e[14]!==c||e[15]!==h?(g=(0,$.jsxs)(Se,{children:[c,h]}),e[14]=c,e[15]=h,e[16]=g):g=e[16];let _=n??``,v;e[17]===s?v=e[18]:(v=()=>void s.refreshQr(),e[17]=s,e[18]=v);let y;e[19]!==s||e[20]!==_||e[21]!==v?(y=(0,$.jsx)(De,{pairQr:s,gatewayToken:_,lanOnly:!0,onRefreshQr:v}),e[19]=s,e[20]=_,e[21]=v,e[22]=y):y=e[22];let x;return e[23]!==y||e[24]!==g?(x=(0,$.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[g,y]}),e[23]=y,e[24]=g,e[25]=x):x=e[25],x}function gt(e){return e.token}function _t(e){return e.language}function vt(e){let t=(0,Z.c)(30),{embedded:n}=e,r=n===void 0?!1:n,i=p(yt),a;t[0]===i?a=t[1]:(a=l(i),t[0]=i,t[1]=a);let o=a.remoteAccess.ssh,[s,u]=(0,Q.useState)(!1),d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=async()=>{await c(`xopc gateway ssh-tunnel --target user@your-host --local-port 18790 --remote-port 18790`)&&(u(!0),setTimeout(()=>u(!1),2e3))},t[2]=d):d=t[2];let f=d,m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(`pre`,{className:`overflow-x-auto rounded-lg border border-edge bg-surface px-3 py-2 text-xs text-fg-muted`,children:`xopc gateway ssh-tunnel --target user@your-host --local-port 18790 --remote-port 18790`}),t[3]=m):m=t[3];let h,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>void f(),g=(0,$.jsx)(j,{className:`mr-1 h-4 w-4`}),t[4]=h,t[5]=g):(h=t[4],g=t[5]);let _=s?o.copied:o.copy,v;t[6]===_?v=t[7]:(v=(0,$.jsx)(`div`,{className:`mt-2`,children:(0,$.jsxs)(W,{type:`button`,variant:`ghost`,onClick:h,children:[g,_]})}),t[6]=_,t[7]=v);let y;t[8]!==r||t[9]!==o.hint?(y=r?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-fg-subtle`,children:o.hint}):null,t[8]=r,t[9]=o.hint,t[10]=y):y=t[10];let b;t[11]!==v||t[12]!==y?(b=(0,$.jsxs)($.Fragment,{children:[m,v,y]}),t[11]=v,t[12]=y,t[13]=b):b=t[13];let x=b;if(r){let e;t[14]!==o.subtitle||t[15]!==o.title?(e=(0,$.jsx)(be,{icon:N,title:o.title,subtitle:o.subtitle}),t[14]=o.subtitle,t[15]=o.title,t[16]=e):e=t[16];let n;t[17]===x?n=t[18]:(n=(0,$.jsx)(`div`,{className:`mt-4 space-y-2`,children:x}),t[17]=x,t[18]=n);let r;return t[19]!==e||t[20]!==n?(r=(0,$.jsxs)(Se,{children:[e,n]}),t[19]=e,t[20]=n,t[21]=r):r=t[21],r}let S;t[22]!==o.subtitle||t[23]!==o.title?(S=(0,$.jsx)(be,{icon:N,title:o.title,subtitle:o.subtitle}),t[22]=o.subtitle,t[23]=o.title,t[24]=S):S=t[24];let C;t[25]===x?C=t[26]:(C=(0,$.jsx)(`div`,{className:`mt-4`,children:x}),t[25]=x,t[26]=C);let w;return t[27]!==S||t[28]!==C?(w=(0,$.jsxs)(Se,{children:[S,C]}),t[27]=S,t[28]=C,t[29]=w):w=t[29],w}function yt(e){return e.language}function bt(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(vt,{embedded:!0}),e[0]=t):t=e[0],t}function xt(e){switch(e){case`active`:return`bg-emerald-500/15 text-emerald-700 dark:text-emerald-400`;case`connecting`:return`bg-amber-500/15 text-amber-700 dark:text-amber-400`;default:return`bg-surface-hover text-fg-muted`}}function St(e){let t=(0,Z.c)(5),{label:n,kind:r}=e,i;t[0]===r?i=t[1]:(i=o(`rounded-full px-2 py-0.5 text-[11px] font-medium`,xt(r)),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,$.jsx)(`span`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function Ct(e){let t=(0,Z.c)(32),{onOpenTab:n}=e,r=p(Et),i;t[0]===r?i=t[1]:(i=l(r),t[0]=r,t[1]=i);let a=i.remoteAccess.guide,s=!!m(Tt),c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c={refreshInterval:3e4},t[2]=c):c=t[2];let{data:u}=v(s?`exposure-status`:null,lt,c),d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d={refreshInterval:15e3},t[3]=d):d=t[3];let{data:f}=v(s?`tunnel-status`:null,Y,d),h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h={refreshInterval:6e4},t[4]=h):h=t[4];let{data:g}=v(s?`tunnel-pair-context`:null,U,h);if(!s)return null;let _=u?.tailscale.active===!0,y=f?.state,x=f?.enabled&&y===`connected`,S=f?.enabled&&(y===`connecting`||y===`reconnecting`||!!f?.startProgress||!!f?.frpcDownload),C=(g?.candidates??[]).some(wt),T=_?`active`:`off`,E=_?a.statusActive:a.statusOff,D;t[5]!==a.tailscaleCardTitle||t[6]!==T||t[7]!==E?(D={tab:`tailscale`,icon:se,title:a.tailscaleCardTitle,kind:T,statusLabel:E},t[5]=a.tailscaleCardTitle,t[6]=T,t[7]=E,t[8]=D):D=t[8];let k=x?`active`:S?`connecting`:`off`,A=x?a.statusActive:S?a.statusConnecting:a.statusOff,j;t[9]!==a.publicCardTitle||t[10]!==k||t[11]!==A?(j={tab:`public`,icon:O,title:a.publicCardTitle,kind:k,statusLabel:A},t[9]=a.publicCardTitle,t[10]=k,t[11]=A,t[12]=j):j=t[12];let M=C?`active`:`off`,P=C?a.statusActive:a.statusOff,F;t[13]!==a.reverseProxyCardTitle||t[14]!==M||t[15]!==P?(F={tab:`reverse-proxy`,icon:w,title:a.reverseProxyCardTitle,kind:M,statusLabel:P},t[13]=a.reverseProxyCardTitle,t[14]=M,t[15]=P,t[16]=F):F=t[16];let I;t[17]!==a.sshCardStatus||t[18]!==a.sshCardTitle?(I={tab:`ssh`,icon:N,title:a.sshCardTitle,kind:`off`,statusLabel:a.sshCardStatus},t[17]=a.sshCardStatus,t[18]=a.sshCardTitle,t[19]=I):I=t[19];let L;t[20]!==a.lanCardStatus||t[21]!==a.lanCardTitle?(L={tab:`lan`,icon:b,title:a.lanCardTitle,kind:`off`,statusLabel:a.lanCardStatus},t[20]=a.lanCardStatus,t[21]=a.lanCardTitle,t[22]=L):L=t[22];let R;t[23]!==j||t[24]!==F||t[25]!==I||t[26]!==L||t[27]!==D?(R=[D,j,F,I,L],t[23]=j,t[24]=F,t[25]=I,t[26]=L,t[27]=D,t[28]=R):R=t[28];let z=R,B;return t[29]!==z||t[30]!==n?(B=(0,$.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5`,children:z.map(e=>{let t=e.icon;return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>n(e.tab),className:o(`flex items-start gap-3 rounded-xl bg-surface-base px-3 py-2.5 text-left shadow-surface transition-colors`,`hover:bg-surface-hover/50`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`),children:[(0,$.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-surface-hover/90 text-fg-muted`,children:(0,$.jsx)(t,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0})}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`span`,{className:`block truncate text-sm font-medium text-fg`,children:e.title}),(0,$.jsx)(St,{label:e.statusLabel,kind:e.kind})]})]},`${e.tab}-${e.title}`)})}),t[29]=z,t[30]=n,t[31]=B):B=t[31],B}function wt(e){return e.kind===`reverse-proxy`}function Tt(e){return e.token}function Et(e){return e.language}function Dt(e){let t=(0,Z.c)(26),{title:n,description:r,recommended:i,icon:a,onOpen:s,openLabel:c,recommendedLabel:l}=e,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=o(`group flex w-full flex-col rounded-2xl bg-surface-base px-4 py-4 text-left transition-colors`,`hover:bg-surface-hover/40`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`),t[0]=u):u=t[0];let d;t[1]===a?d=t[2]:(d=(0,$.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-hover/90 text-fg-muted`,children:(0,$.jsx)(a,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0})}),t[1]=a,t[2]=d);let f;t[3]===n?f=t[4]:(f=(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:n}),t[3]=n,t[4]=f);let p;t[5]!==i||t[6]!==l?(p=i&&l?(0,$.jsx)(`span`,{className:`rounded-full bg-accent-soft px-2 py-0.5 text-[11px] font-medium text-accent-fg`,children:l}):null,t[5]=i,t[6]=l,t[7]=p):p=t[7];let m;t[8]!==f||t[9]!==p?(m=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[f,p]}),t[8]=f,t[9]=p,t[10]=m):m=t[10];let h;t[11]===r?h=t[12]:(h=(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-fg-muted`,children:r}),t[11]=r,t[12]=h);let g;t[13]!==m||t[14]!==h?(g=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[m,h]}),t[13]=m,t[14]=h,t[15]=g):g=t[15];let _;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(y,{className:`mt-0.5 size-4 shrink-0 text-fg-subtle transition-transform group-hover:translate-x-0.5`,"aria-hidden":!0}),t[16]=_):_=t[16];let v;t[17]!==d||t[18]!==g?(v=(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[d,g,_]}),t[17]=d,t[18]=g,t[19]=v):v=t[19];let b;t[20]===c?b=t[21]:(b=(0,$.jsx)(`span`,{className:`mt-3 text-xs font-medium text-accent`,children:c}),t[20]=c,t[21]=b);let x;return t[22]!==s||t[23]!==b||t[24]!==v?(x=(0,$.jsxs)(`button`,{type:`button`,onClick:s,className:u,children:[v,b]}),t[22]=s,t[23]=b,t[24]=v,t[25]=x):x=t[25],x}function Ot(e){let t=(0,Z.c)(83),{onOpenTab:n}=e,r=p(jt),i;t[0]===r?i=t[1]:(i=l(r),t[0]=r,t[1]=i);let a=i.remoteAccess,o=a.guide,s=!!m(At),c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c={refreshInterval:3e4},t[2]=c):c=t[2];let{data:u}=v(s?`exposure-status`:null,lt,c),d;t[3]===u?.conflicts?d=t[4]:(d=u?.conflicts??[],t[3]=u?.conflicts,t[4]=d);let f=d;if(!s){let e;return t[5]===o.needToken?e=t[6]:(e=(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:o.needToken}),t[5]=o.needToken,t[6]=e),e}let h;t[7]===n?h=t[8]:(h=(0,$.jsx)(Ct,{onOpenTab:n}),t[7]=n,t[8]=h);let g;t[9]!==f||t[10]!==o.conflictsHint||t[11]!==o.conflictsTitle?(g=f.length>0?(0,$.jsxs)(`div`,{className:`rounded-xl border border-amber-500/30 bg-amber-500/5 px-4 py-3 text-sm text-fg-muted`,children:[(0,$.jsx)(`p`,{className:`font-medium text-fg`,children:o.conflictsTitle}),(0,$.jsx)(`p`,{className:`mt-1`,children:o.conflictsHint}),(0,$.jsx)(`ul`,{className:`mt-2 list-inside list-disc text-xs`,children:f.map(kt)})]}):null,t[9]=f,t[10]=o.conflictsHint,t[11]=o.conflictsTitle,t[12]=g):g=t[12];let _;t[13]===o.pickMethod?_=t[14]:(_=(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:o.pickMethod}),t[13]=o.pickMethod,t[14]=_);let y;t[15]===n?y=t[16]:(y=()=>n(`tailscale`),t[15]=n,t[16]=y);let x;t[17]!==o.configure||t[18]!==o.recommended||t[19]!==o.tailscaleCardDesc||t[20]!==o.tailscaleCardTitle||t[21]!==y?(x=(0,$.jsx)(Dt,{icon:se,title:o.tailscaleCardTitle,description:o.tailscaleCardDesc,recommended:!0,recommendedLabel:o.recommended,openLabel:o.configure,onOpen:y}),t[17]=o.configure,t[18]=o.recommended,t[19]=o.tailscaleCardDesc,t[20]=o.tailscaleCardTitle,t[21]=y,t[22]=x):x=t[22];let S;t[23]===n?S=t[24]:(S=()=>n(`public`),t[23]=n,t[24]=S);let C;t[25]!==o.configure||t[26]!==o.publicCardDesc||t[27]!==o.publicCardTitle||t[28]!==S?(C=(0,$.jsx)(Dt,{icon:O,title:o.publicCardTitle,description:o.publicCardDesc,openLabel:o.configure,onOpen:S}),t[25]=o.configure,t[26]=o.publicCardDesc,t[27]=o.publicCardTitle,t[28]=S,t[29]=C):C=t[29];let T;t[30]===n?T=t[31]:(T=()=>n(`reverse-proxy`),t[30]=n,t[31]=T);let E;t[32]!==o.configure||t[33]!==o.reverseProxyCardDesc||t[34]!==o.reverseProxyCardTitle||t[35]!==T?(E=(0,$.jsx)(Dt,{icon:w,title:o.reverseProxyCardTitle,description:o.reverseProxyCardDesc,openLabel:o.configure,onOpen:T}),t[32]=o.configure,t[33]=o.reverseProxyCardDesc,t[34]=o.reverseProxyCardTitle,t[35]=T,t[36]=E):E=t[36];let D;t[37]===n?D=t[38]:(D=()=>n(`ssh`),t[37]=n,t[38]=D);let k;t[39]!==o.configure||t[40]!==o.sshCardDesc||t[41]!==o.sshCardTitle||t[42]!==D?(k=(0,$.jsx)(Dt,{icon:N,title:o.sshCardTitle,description:o.sshCardDesc,openLabel:o.configure,onOpen:D}),t[39]=o.configure,t[40]=o.sshCardDesc,t[41]=o.sshCardTitle,t[42]=D,t[43]=k):k=t[43];let A;t[44]===n?A=t[45]:(A=()=>n(`lan`),t[44]=n,t[45]=A);let j;t[46]!==o.configure||t[47]!==o.lanCardDesc||t[48]!==o.lanCardTitle||t[49]!==A?(j=(0,$.jsx)(Dt,{icon:b,title:o.lanCardTitle,description:o.lanCardDesc,openLabel:o.configure,onOpen:A}),t[46]=o.configure,t[47]=o.lanCardDesc,t[48]=o.lanCardTitle,t[49]=A,t[50]=j):j=t[50];let M;t[51]!==C||t[52]!==E||t[53]!==k||t[54]!==j||t[55]!==x?(M=(0,$.jsxs)(`div`,{className:`mt-3 grid gap-3 lg:grid-cols-2`,children:[x,C,E,k,j]}),t[51]=C,t[52]=E,t[53]=k,t[54]=j,t[55]=x,t[56]=M):M=t[56];let P;t[57]!==M||t[58]!==_?(P=(0,$.jsxs)(`div`,{children:[_,M]}),t[57]=M,t[58]=_,t[59]=P):P=t[59];let F;t[60]===o.oneAtATimeHint?F=t[61]:(F=(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-fg-subtle`,children:o.oneAtATimeHint}),t[60]=o.oneAtATimeHint,t[61]=F);let I;t[62]===a.advanced.proxyTitle?I=t[63]:(I=(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:a.advanced.proxyTitle}),t[62]=a.advanced.proxyTitle,t[63]=I);let L;t[64]===a.advanced.proxyBody?L=t[65]:(L=(0,$.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:a.advanced.proxyBody}),t[64]=a.advanced.proxyBody,t[65]=L);let R;t[66]!==r||t[67]!==a.advanced.proxyDocs?(R=(0,$.jsx)($e,{language:r,label:a.advanced.proxyDocs,section:`advanced`,className:`mt-2`}),t[66]=r,t[67]=a.advanced.proxyDocs,t[68]=R):R=t[68];let z;t[69]!==I||t[70]!==L||t[71]!==R?(z=(0,$.jsxs)(`div`,{className:`rounded-xl bg-surface-base px-4 py-3`,children:[I,L,R]}),t[69]=I,t[70]=L,t[71]=R,t[72]=z):z=t[72];let B;t[73]!==o.docsLink||t[74]!==r?(B=(0,$.jsx)($e,{language:r,label:o.docsLink}),t[73]=o.docsLink,t[74]=r,t[75]=B):B=t[75];let V;return t[76]!==P||t[77]!==F||t[78]!==z||t[79]!==B||t[80]!==h||t[81]!==g?(V=(0,$.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[h,g,P,F,z,B]}),t[76]=P,t[77]=F,t[78]=z,t[79]=B,t[80]=h,t[81]=g,t[82]=V):V=t[82],V}function kt(e){return(0,$.jsx)(`li`,{children:e.message},e.code)}function At(e){return e.token}function jt(e){return e.language}async function Mt(e){let t=await g(u(`/api/tunnel/pair/probe-public`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e})});if(!t.ok&&t.status!==400)throw Error(`Probe failed (${t.status})`);return await t.json()}async function Nt(e){await f(u(`/api/config`),{method:`PATCH`,body:JSON.stringify({gateway:{publicUrl:e??null}})})}function Pt(e){let t=e.split(`.`).map(e=>Number.parseInt(e,10));if(t.length!==4||t.some(e=>!Number.isFinite(e)))return!1;let[n,r]=t;return n===10||n===127||n===169&&r===254||n===172&&r>=16&&r<=31||n===192&&r===168||n===100&&r>=64&&r<=127}function Ft(){return(0,Q.useMemo)(()=>{if(typeof window>`u`)return null;let{protocol:e,hostname:t,origin:n}=window.location;if(e!==`https:`&&e!==`http:`)return null;let r=t.toLowerCase();return!r||r===`localhost`||r===`127.0.0.1`||r===`::1`||r===`[::1]`||r.endsWith(`.local`)||r.endsWith(`.localhost`)||Pt(r)?null:n.toLowerCase().replace(/\/+$/,``)},[])}function It(){return o(`w-full rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg`,`placeholder:text-fg-subtle`,X,`dark:border-edge`)}function Lt(e){return(e?.candidates.find(e=>e.kind===`reverse-proxy`))?.url?.trim()||null}function Rt(e){return(e?.candidates.find(e=>e.kind===`lan`&&e.reachable))?.url?.trim()||null}function zt(){let e=p(e=>e.language),t=l(e).remoteAccess.reverseProxy,n=!!m(e=>e.token),r=Ft(),{mutate:i}=_(),{data:a,mutate:s}=v(n?`tunnel-pair-context`:null,U,{refreshInterval:6e4}),c=Lt(a),[u,f]=(0,Q.useState)(``),[h,g]=(0,Q.useState)({busy:!1,result:null}),[y,b]=(0,Q.useState)({busy:!1,error:null});(0,Q.useEffect)(()=>{u||(c?f(c):r&&f(r))},[c,r,u]);let x=(0,Q.useMemo)(()=>u.trim()||(c??r??``),[c,r,u]),S=!c&&!!r&&x===r,C=Rt(a),{data:w,mutate:T}=v(n&&x?[`reverse-proxy-pair`,x]:null,()=>de(),{refreshInterval:4*6e4,revalidateOnFocus:!1}),E=(0,Q.useMemo)(()=>!x||!w?.pairingSecret?``:d({baseUrl:x,pairingSecret:w.pairingSecret,lanUrl:C}),[x,C,w?.pairingSecret]),D=A(()=>nt(E),[E],{enabled:!!E,initial:null,errorData:null}),O=(0,Q.useCallback)(async()=>{let e=u.trim()||x;if(e){g({busy:!0,result:null});try{g({busy:!1,result:await Mt(e)})}catch(e){g({busy:!1,result:{ok:!1,code:`NETWORK_ERROR`,message:e instanceof Error?e.message:String(e)}})}}},[u,x]),k=(0,Q.useCallback)(async()=>{let e=x.trim();if(e){b({busy:!0,error:null});try{await Nt(e),await s(),await i(`tunnel-pair-context`),b({busy:!1,error:null})}catch(e){b({busy:!1,error:e instanceof Error?e.message:String(e)})}}},[x,i,s]),j=(0,Q.useCallback)(async()=>{b({busy:!0,error:null});try{await Nt(null),await s(),await i(`tunnel-pair-context`),f(``),g({busy:!1,result:null}),b({busy:!1,error:null})}catch(e){b({busy:!1,error:e instanceof Error?e.message:String(e)})}},[i,s]),M=(0,Q.useCallback)(async()=>{await T()},[T]);return n?(0,$.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,$.jsxs)(Se,{children:[(0,$.jsx)(be,{icon:se,title:t.title,subtitle:t.subtitle}),(0,$.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,$.jsx)(`label`,{className:`text-sm font-medium text-fg`,htmlFor:`reverse-proxy-url`,children:t.urlLabel}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-stretch`,children:[(0,$.jsx)(`input`,{id:`reverse-proxy-url`,className:o(It(),`font-mono text-xs sm:flex-1 sm:min-w-0 sm:w-auto`),type:`text`,autoComplete:`off`,spellCheck:!1,placeholder:t.urlPlaceholder,value:u,onChange:e=>{f(e.target.value),g({busy:!1,result:null})}}),(0,$.jsxs)(W,{type:`button`,variant:`secondary`,className:`shrink-0 whitespace-nowrap`,onClick:()=>void O(),disabled:h.busy||!u.trim(),children:[h.busy?(0,$.jsx)(me,{className:`size-3.5 animate-spin`}):null,h.busy?t.probing:t.probeButton]})]}),(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:t.urlHint}),S&&r?(0,$.jsxs)(`div`,{className:`rounded-lg border border-accent/40 bg-accent-soft/50 px-3 py-2 text-xs leading-relaxed text-accent-fg`,children:[(0,$.jsx)(`div`,{className:`font-medium`,children:t.autoDetectedTitle}),(0,$.jsx)(`div`,{className:`mt-1 break-all font-mono text-[11px]`,children:r}),(0,$.jsx)(`p`,{className:`mt-1`,children:t.autoDetectedHint})]}):null,h.result?(0,$.jsx)(Bt,{result:h.result,labels:t.probeStatus}):null,(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[x&&c!==x?(0,$.jsxs)(W,{type:`button`,onClick:()=>void k(),disabled:y.busy,children:[y.busy?(0,$.jsx)(me,{className:`size-3.5 animate-spin`}):null,y.busy?t.saving:t.saveAsDefault]}):null,c?(0,$.jsx)(W,{type:`button`,variant:`ghost`,onClick:()=>void j(),disabled:y.busy,children:t.clear}):null]}),y.error?(0,$.jsx)(`p`,{className:`text-xs text-red-800 dark:text-red-200`,children:y.error}):null,(0,$.jsx)(`div`,{className:`rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-xs leading-relaxed text-amber-950 dark:border-amber-800/60 dark:bg-amber-950/30 dark:text-amber-100`,children:t.certWarning})]})]}),(0,$.jsxs)(Se,{children:[(0,$.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-start justify-between gap-2`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:t.qrTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:t.qrSubtitle})]}),E?(0,$.jsxs)(W,{type:`button`,variant:`ghost`,className:`shrink-0`,onClick:()=>void M(),children:[(0,$.jsx)(B,{className:`size-4`}),t.refreshQr]}):null]}),x?w?.pairingSecret?(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-3 sm:items-start`,children:[(0,$.jsxs)(`div`,{className:`break-all font-mono text-[11px] text-fg-muted`,children:[(0,$.jsx)(`span`,{className:`font-medium text-fg`,children:`baseUrl:`}),` `,x,C?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`br`,{}),(0,$.jsx)(`span`,{className:`font-medium text-fg`,children:`lanUrl:`}),` `,C]}):null]}),D.data?(0,$.jsx)(`img`,{src:D.data,alt:``,className:`size-56 rounded-lg border border-edge-subtle bg-white object-contain p-3 dark:border-edge`}):D.loading?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.encoding}):null,(0,$.jsx)(he,{text:E,labels:{copy:t.copyLink,copied:t.copied,copyFailed:l(e).clipboard.copyFailed}})]}):(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.mintingSecret}):(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noUrlYet})]})]}):null}function Bt(e){let t=(0,Z.c)(18),{result:n,labels:r}=e;if(n.ok){let e;t[0]===r.ok?e=t[1]:(e=(0,$.jsx)(`span`,{className:`font-medium`,children:r.ok}),t[0]=r.ok,t[1]=e);let i;t[2]===n.latencyMs?i=t[3]:(i=(0,$.jsxs)(`span`,{className:`font-mono`,children:[n.latencyMs,`ms`]}),t[2]=n.latencyMs,t[3]=i);let a;t[4]!==r.mobileReady||t[5]!==n.mobilePairing?(a=n.mobilePairing?(0,$.jsxs)($.Fragment,{children:[` · `,(0,$.jsx)(`span`,{children:r.mobileReady})]}):null,t[4]=r.mobileReady,t[5]=n.mobilePairing,t[6]=a):a=t[6];let o;return t[7]!==e||t[8]!==i||t[9]!==a?(o=(0,$.jsxs)(`div`,{className:`rounded-lg border border-emerald-200 bg-emerald-50 px-3 py-2 text-xs text-emerald-900 dark:border-emerald-800/60 dark:bg-emerald-950/30 dark:text-emerald-100`,children:[e,` · `,i,a]}),t[7]=e,t[8]=i,t[9]=a,t[10]=o):o=t[10],o}let i=r[`code_${n.code}`]??r.codeUnknown,a;t[11]===i?a=t[12]:(a=(0,$.jsx)(`span`,{className:`font-medium`,children:i}),t[11]=i,t[12]=a);let o;t[13]===n.message?o=t[14]:(o=n.message?(0,$.jsxs)($.Fragment,{children:[` — `,(0,$.jsx)(`span`,{className:`font-mono break-all`,children:n.message})]}):null,t[13]=n.message,t[14]=o);let s;return t[15]!==a||t[16]!==o?(s=(0,$.jsxs)(`div`,{className:`rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-900 dark:border-red-800/60 dark:bg-red-950/30 dark:text-red-100`,children:[a,o]}),t[15]=a,t[16]=o,t[17]=s):s=t[17],s}var Vt=[`guide`,`tailscale`,`public`,`reverse-proxy`,`ssh`,`lan`];function Ht(e){return e&&Vt.includes(e)?e:`guide`}function Ut(e,t){return e.tabs[t]}function Wt(e,t){return e.tabIntro[t]}function Gt(e){switch(e){case`tailscale`:return`tailscale-serve`;case`public`:return`public-tunnel`;case`reverse-proxy`:return`reverse-proxy`;case`ssh`:return`ssh-tunnel`;case`lan`:return`lan`;default:return}}function Kt(e){let t=(0,Z.c)(7),{tab:n,onOpenTab:r}=e;switch(n){case`guide`:{let e;return t[0]===r?e=t[1]:(e=(0,$.jsx)(Ot,{onOpenTab:r}),t[0]=r,t[1]=e),e}case`tailscale`:{let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(mt,{embedded:!0}),t[2]=e):e=t[2],e}case`public`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(ct,{embedded:!0}),t[3]=e):e=t[3],e}case`reverse-proxy`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(zt,{}),t[4]=e):e=t[4],e}case`ssh`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(bt,{}),t[5]=e):e=t[5],e}case`lan`:{let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(ht,{}),t[6]=e):e=t[6],e}}}function qt(){let e=(0,Z.c)(2),t=p(Yt),n=l(t).remoteAccess,r=!!m(Jt),[a,o]=i(),s=Ht(a.get(`tab`)),c;e[0]===o?c=e[1]:(c=e=>{o(t=>{let n=new URLSearchParams(t);return e===`guide`?n.delete(`tab`):n.set(`tab`,e),n},{replace:!0})},e[0]=o,e[1]=c);let u=c,d=Wt(n,s),f=Vt.map(e=>({id:e,label:Ut(n,e)}));return(0,$.jsxs)(ve,{children:[(0,$.jsx)(ge,{title:n.pageTitle,subtitle:n.pageSubtitle,meta:(0,$.jsx)($e,{language:t,label:n.docsLink,section:Gt(s),className:`mt-1`})}),r?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(we,{items:f,activeTab:s,onChange:u,ariaLabel:n.tabsAria,tabIdPrefix:`remote-access-tab`,panelIdPrefix:`remote-access-panel`}),(0,$.jsx)(_e,{id:s,activeTab:s,tabIdPrefix:`remote-access-tab`,panelIdPrefix:`remote-access-panel`,title:Ut(n,s),hint:s===`public`?void 0:d,children:(0,$.jsx)(Kt,{tab:s,onOpenTab:u})})]}):(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:n.guide.needToken})]})}function Jt(e){return e.token}function Yt(e){return e.language}export{qt as RemoteAccessHub};
1
+ import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{d as i,t as a}from"./chunk-QUQL4437-DXsxWP7r.js";import{t as o}from"./cn-BQ_8x0bT.js";import{t as s}from"./check-BODqo66o.js";import{t as c}from"./copy-to-clipboard-HOJ79TWv.js";import{t as l}from"./messages-BH7paqYt.js";import{d as u,f as d,i as f,n as p,o as m,p as h,r as g}from"./locale-store-BvcHGPHU.js";import{a as _,i as v}from"./vendor-swr-BIWyz7Rc.js";import{$l as y,$s as b,As as x,Fo as S,Ho as C,Js as w,Ks as T,Mo as E,No as D,Oc as O,Ol as k,Oo as A,Pl as j,Po as M,Ps as N,Ul as P,Un as F,Xo as I,Yo as L,_i as R,ao as z,cc as B,ci as V,di as H,el as ee,fi as U,gi as te,hi as ne,hs as W,io as G,jo as K,ko as q,kt as re,li as J,mi as Y,ms as X,os as ie,pc as ae,pi as oe,pl as se,ro as ce,si as le,tr as ue,ui as de,vi as fe,yi as pe,zc as me,zi as he}from"./index-IPmCli0N.js";import{n as ge,r as _e,t as ve}from"./settings-page-layout-CKuQT4SG.js";import{t as ye}from"./settings-collapsible-section-C0xcL0vB.js";import{n as be,r as xe,t as Se}from"./settings-form-section-Cgj4iVpx.js";import{t as Ce}from"./browser-BLJWD7WI.js";import{t as we}from"./page-tabs-vdljrKuG.js";var Z=n(),Q=e(t(),1);function Te(e,t){let{mutate:n}=_(),[r,i]=(0,Q.useState)(!1),[a,o]=(0,Q.useState)(null),[s,c]=(0,Q.useState)(!1),l=(0,Q.useCallback)(async()=>{await Promise.all([n(`tunnel-pair-context`),n(`tunnel-pair`),n(`tunnel-status`),ce()])},[n]);return{busy:r,error:a,confirmOpen:s,setConfirmOpen:c,runEnableLanPairing:(0,Q.useCallback)(async()=>{if(!(!e||r)){i(!0),o(null);try{let n=await H();if(!n.ok)throw Error(`Failed to enable LAN pairing`);if(n.requiresRestart){let t=await le();if(!t.ok)throw Error(t.message??`Gateway restart failed`);if(!await V(e))throw Error(`Gateway did not come back online in time`)}let r=n.requiresRestart?await J():n.context;if(!r?.pairingReady)throw Error(`LAN pairing is still not ready after restart`);return await l(),t?.(r),c(!1),r}catch(e){return o(e instanceof Error?e.message:`Enable LAN pairing failed`),null}finally{i(!1)}}},[r,e,t,l]),clearError:()=>o(null)}}var $=r();function Ee(){return o(`w-full rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg`,`placeholder:text-fg-subtle`,X,`dark:border-edge`)}function De(e){let t=(0,Z.c)(122),{pairQr:n,gatewayToken:r,streamlined:i,lanOnly:s,onRefreshQr:c}=e,u=i===void 0?!1:i,d=s===void 0?!1:s,f=p(Ae),m;t[0]===f?m=t[1]:(m=l(f),t[0]=f,t[1]=m);let h=m,g=h.tunnelSettings,_=d?h.remoteAccess.lan:null,v;t[2]!==h.clipboard.copyFailed||t[3]!==g.pairCopied||t[4]!==g.pairCopyLink?(v={copy:g.pairCopyLink,copied:g.pairCopied,copyFailed:h.clipboard.copyFailed},t[2]=h.clipboard.copyFailed,t[3]=g.pairCopied,t[4]=g.pairCopyLink,t[5]=v):v=t[5];let y=v,{tunnelActive:b,tunnelStatus:x,tunnelQr:S,pairContext:C,pairBaseUrl:w,setPairBaseUrl:E,applySuggestedPairUrl:D,applyCandidateUrl:O,resetPairBaseFromContext:k,baseOk:A,localhostWarn:j,pairingBlocked:M,deepLink:N,qrPayload:P,qrDataUrl:F,qrGenFailed:I,encoding:L}=n,R;t[6]===k?R=t[7]:(R=e=>{k(e.recommended.url)},t[6]=k,t[7]=R);let z=Te(r,R),V,H,ee,U,te;if(t[8]!==O||t[9]!==D||t[10]!==A||t[11]!==z||t[12]!==r||t[13]!==_||t[14]!==d||t[15]!==j||t[16]!==c||t[17]!==w||t[18]!==C?.candidates||t[19]!==C?.recommended||t[20]!==M||t[21]!==E||t[22]!==u||t[23]!==g.pairBaseUrlHint||t[24]!==g.pairBaseUrlLabel||t[25]!==g.pairBaseUrlPlaceholder||t[26]!==g.pairBlockedLoopbackBody||t[27]!==g.pairBlockedNextSteps||t[28]!==g.pairBlockedTitle||t[29]!==g.pairCandidatesTitle||t[30]!==g.pairEnableLanButton||t[31]!==g.pairEnableLanEnabling||t[32]!==g.pairEnableLanSecurityAuditLink||t[33]!==g.pairInvalidBaseUrl||t[34]!==g.pairLocalhostWarning||t[35]!==g.pairSelectCandidateHint||t[36]!==g.pairSelectCandidateTitle||t[37]!==g.pairSubtitle||t[38]!==g.pairSuggestedLanLabel||t[39]!==g.pairTitle||t[40]!==g.pairTunnelActive||t[41]!==g.pairTunnelLanUrl||t[42]!==g.pairTunnelPublicUrl||t[43]!==g.pairUseSuggestedUrl||t[44]!==g.pairWaitingForTunnel||t[45]!==g.refreshQr||t[46]!==b||t[47]!==S||t[48]!==x?.publicUrl){te=Symbol.for(`react.early_return_sentinel`);bb0:{let e=C?.candidates.filter(ke)??[],n=d?(e.find(Oe)?.url??e[0]?.url??``).trim():C?.recommended.url?.trim()??``,i=(d||!b)&&e.length>1,s=function(t){if(e.length===0)return null;let n=t===`amber`?`text-amber-950 dark:text-amber-100`:`text-fg`,r=t===`amber`?`text-amber-950/80 dark:text-amber-200/90`:`text-fg-muted`;return(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:o(`text-xs font-medium`,r),children:i?g.pairSelectCandidateTitle:g.pairCandidatesTitle}),(0,$.jsx)(`ul`,{className:`mt-1 space-y-1`,children:e.map(e=>(0,$.jsx)(`li`,{children:(0,$.jsxs)(`button`,{type:`button`,className:o(`w-full rounded-md border px-2 py-1.5 text-left font-mono text-[11px] transition-colors`,t===`amber`?`border-amber-300/70 hover:bg-amber-100/80 dark:border-amber-800 dark:hover:bg-amber-950/50`:`border-edge hover:bg-surface-panel`,w.trim()===e.url&&`border-accent bg-accent/5`,n),onClick:()=>O(e.url),children:[e.label?`${e.label}: `:``,e.url]})},e.url))}),i?(0,$.jsx)(`p`,{className:o(`mt-1 text-[11px] leading-relaxed`,r),children:g.pairSelectCandidateHint}):null]})};if(V=u&&!d,V&&!b){let e;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(T,{className:`size-4 text-accent`,strokeWidth:1.75}),t[54]=e):e=t[54];let n;t[55]===g.pairTitle?n=t[56]:(n=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[e,g.pairTitle]}),t[55]=g.pairTitle,t[56]=n);let r;t[57]===g.pairWaitingForTunnel?r=t[58]:(r=(0,$.jsx)(`p`,{className:`mt-2 text-sm text-fg-muted`,children:g.pairWaitingForTunnel}),t[57]=g.pairWaitingForTunnel,t[58]=r);let i;t[59]!==n||t[60]!==r?(i=(0,$.jsxs)(Se,{children:[n,r]}),t[59]=n,t[60]=r,t[61]=i):i=t[61],te=i;break bb0}let l=_?.pairTitle??g.pairTitle,f=d?_?.pairSubtitle??g.pairSubtitle:b?g.pairTunnelActive:g.pairSubtitle,p=!!(c&&(d||u&&b)),m=V?`mb-2`:`mb-3`,h;t[62]===m?h=t[63]:(h=o(`flex flex-wrap items-start justify-between gap-2`,m),t[62]=m,t[63]=h);let v;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(T,{className:`size-4 text-accent`,strokeWidth:1.75}),t[64]=v):v=t[64];let y;t[65]===l?y=t[66]:(y=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[v,l]}),t[65]=l,t[66]=y);let k;t[67]!==V||t[68]!==f||t[69]!==g.pairSubtitle?(k=V?(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:g.pairSubtitle}):(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:f}),t[67]=V,t[68]=f,t[69]=g.pairSubtitle,t[70]=k):k=t[70];let N;t[71]!==y||t[72]!==k?(N=(0,$.jsxs)(`div`,{children:[y,k]}),t[71]=y,t[72]=k,t[73]=N):N=t[73];let P;t[74]!==c||t[75]!==p||t[76]!==g.refreshQr?(P=p?(0,$.jsxs)(W,{type:`button`,variant:`ghost`,className:`shrink-0`,onClick:()=>void c(),children:[(0,$.jsx)(B,{className:`size-4`}),g.refreshQr]}):null,t[74]=c,t[75]=p,t[76]=g.refreshQr,t[77]=P):P=t[77],t[78]!==h||t[79]!==N||t[80]!==P?(H=(0,$.jsxs)(`div`,{className:h,children:[N,P]}),t[78]=h,t[79]=N,t[80]=P,t[81]=H):H=t[81],ee=M?(0,$.jsxs)(`div`,{className:`mb-3 space-y-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-3 dark:border-amber-900/50 dark:bg-amber-950/30`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-sm font-medium text-amber-950 dark:text-amber-100`,children:g.pairBlockedTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-amber-900 dark:text-amber-200`,children:g.pairBlockedLoopbackBody})]}),n?(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-amber-950/80 dark:text-amber-200/90`,children:g.pairSuggestedLanLabel}),(0,$.jsx)(`div`,{className:`mt-0.5 break-all font-mono text-xs text-amber-950 dark:text-amber-100`,children:n})]}),(0,$.jsx)(W,{type:`button`,variant:`secondary`,className:`w-full sm:w-auto`,onClick:D,children:g.pairUseSuggestedUrl})]}):null,e.length>0?s(`amber`):null,(0,$.jsx)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:(0,$.jsxs)(W,{type:`button`,className:`w-full sm:w-auto`,disabled:z.busy||!r,onClick:()=>z.setConfirmOpen(!0),children:[z.busy?(0,$.jsx)(me,{className:`size-3.5 animate-spin`}):null,z.busy?g.pairEnableLanEnabling:g.pairEnableLanButton]})}),z.error?(0,$.jsx)(`p`,{className:`text-xs text-red-800 dark:text-red-200`,children:z.error}):null,(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-amber-900 dark:text-amber-200`,children:d?_?.pairBlockedNextSteps??g.pairBlockedNextSteps:g.pairBlockedNextSteps}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(a,{to:`/settings/gateway`,className:`inline-block text-xs font-medium text-accent hover:underline`,children:g.pairEnableLanSecurityAuditLink}),d&&_?.pairPublicTabLink?(0,$.jsx)(a,{to:`/settings/remote-access?tab=public`,className:`inline-block text-xs font-medium text-accent hover:underline`,children:_.pairPublicTabLink}):null]})]}):null,U=b&&!d?V?null:(0,$.jsxs)(`div`,{className:`mb-3 space-y-2 rounded-lg bg-surface-panel/80 px-3 py-3 shadow-surface`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:g.pairTunnelPublicUrl}),(0,$.jsx)(`div`,{className:`mt-0.5 break-all font-mono text-xs text-fg`,children:x?.publicUrl})]}),S?.lanUrl?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:g.pairTunnelLanUrl}),(0,$.jsx)(`div`,{className:`mt-0.5 break-all font-mono text-xs text-fg`,children:S.lanUrl})]}):null]}):(0,$.jsxs)(`div`,{className:`mb-3 space-y-1.5`,children:[(0,$.jsx)(`label`,{className:`text-sm font-medium text-fg`,htmlFor:`tunnel-mobile-pair-base`,children:g.pairBaseUrlLabel}),(0,$.jsx)(`input`,{id:`tunnel-mobile-pair-base`,className:o(Ee(),`font-mono text-xs`),type:`text`,autoComplete:`off`,spellCheck:!1,placeholder:n||g.pairBaseUrlPlaceholder,value:w,onChange:e=>E(e.target.value)}),(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:g.pairBaseUrlHint}),!A&&w.trim()?(0,$.jsx)(`p`,{className:`text-xs text-amber-800 dark:text-amber-200`,children:g.pairInvalidBaseUrl}):null,j?(0,$.jsx)(`p`,{className:`rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-950 dark:border-amber-800 dark:bg-amber-950/40 dark:text-amber-100`,children:g.pairLocalhostWarning}):null,i?s(`neutral`):null]})}t[8]=O,t[9]=D,t[10]=A,t[11]=z,t[12]=r,t[13]=_,t[14]=d,t[15]=j,t[16]=c,t[17]=w,t[18]=C?.candidates,t[19]=C?.recommended,t[20]=M,t[21]=E,t[22]=u,t[23]=g.pairBaseUrlHint,t[24]=g.pairBaseUrlLabel,t[25]=g.pairBaseUrlPlaceholder,t[26]=g.pairBlockedLoopbackBody,t[27]=g.pairBlockedNextSteps,t[28]=g.pairBlockedTitle,t[29]=g.pairCandidatesTitle,t[30]=g.pairEnableLanButton,t[31]=g.pairEnableLanEnabling,t[32]=g.pairEnableLanSecurityAuditLink,t[33]=g.pairInvalidBaseUrl,t[34]=g.pairLocalhostWarning,t[35]=g.pairSelectCandidateHint,t[36]=g.pairSelectCandidateTitle,t[37]=g.pairSubtitle,t[38]=g.pairSuggestedLanLabel,t[39]=g.pairTitle,t[40]=g.pairTunnelActive,t[41]=g.pairTunnelLanUrl,t[42]=g.pairTunnelPublicUrl,t[43]=g.pairUseSuggestedUrl,t[44]=g.pairWaitingForTunnel,t[45]=g.refreshQr,t[46]=b,t[47]=S,t[48]=x?.publicUrl,t[49]=V,t[50]=H,t[51]=ee,t[52]=U,t[53]=te}else V=t[49],H=t[50],ee=t[51],U=t[52],te=t[53];if(te!==Symbol.for(`react.early_return_sentinel`))return te;let ne;t[82]===g.pairSecurityNote?ne=t[83]:(ne=(0,$.jsx)(`p`,{className:`mb-3 text-xs text-fg-subtle`,children:g.pairSecurityNote}),t[82]=g.pairSecurityNote,t[83]=ne);let G;t[84]!==y||t[85]!==N||t[86]!==L||t[87]!==M||t[88]!==F||t[89]!==I||t[90]!==g.pairEncoding||t[91]!==g.pairImageError||t[92]!==g.pairQrDisabled?(G=N?(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-3 sm:items-start`,children:[F&&!I?(0,$.jsx)(`img`,{src:F,alt:``,className:`size-56 rounded-lg border border-edge-subtle bg-white object-contain p-3 dark:border-edge`}):null,L?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:g.pairEncoding}):null,I?(0,$.jsx)(`p`,{className:`text-center text-sm text-fg-muted sm:text-left`,children:g.pairImageError}):null,(0,$.jsx)(he,{text:N,labels:y})]}):M?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:g.pairQrDisabled}):null,t[84]=y,t[85]=N,t[86]=L,t[87]=M,t[88]=F,t[89]=I,t[90]=g.pairEncoding,t[91]=g.pairImageError,t[92]=g.pairQrDisabled,t[93]=G):G=t[93];let K;t[94]!==V||t[95]!==P||t[96]!==g.deeplinkTitle?(K=P&&!V?(0,$.jsxs)(`details`,{className:`mt-3 rounded-lg bg-surface-panel/80 px-3 py-2 shadow-surface`,children:[(0,$.jsx)(`summary`,{className:`cursor-pointer text-xs font-medium text-fg-muted`,children:g.deeplinkTitle}),(0,$.jsx)(`p`,{className:`mt-2 break-all font-mono text-[10px] leading-relaxed text-fg-subtle`,children:P})]}):null,t[94]=V,t[95]=P,t[96]=g.deeplinkTitle,t[97]=K):K=t[97];let q;t[98]!==V||t[99]!==g.pairMobileProbeHint||t[100]!==g.pairSchemeHint?(q=V?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`p`,{className:`mt-3 break-all font-mono text-[10px] leading-relaxed text-fg-subtle`,children:g.pairSchemeHint}),(0,$.jsx)(`p`,{className:`mt-1 text-[10px] leading-relaxed text-fg-subtle`,children:g.pairMobileProbeHint})]}),t[98]=V,t[99]=g.pairMobileProbeHint,t[100]=g.pairSchemeHint,t[101]=q):q=t[101];let re,J;t[102]===z?(re=t[103],J=t[104]):(re=()=>void z.runEnableLanPairing(),J=()=>{z.busy||z.setConfirmOpen(!1)},t[102]=z,t[103]=re,t[104]=J);let Y;t[105]!==z.confirmOpen||t[106]!==g.consentCancel||t[107]!==g.pairEnableLanButton||t[108]!==g.pairEnableLanConfirmBody||t[109]!==g.pairEnableLanConfirmTitle||t[110]!==re||t[111]!==J?(Y=(0,$.jsx)(ue,{open:z.confirmOpen,title:g.pairEnableLanConfirmTitle,description:g.pairEnableLanConfirmBody,confirmLabel:g.pairEnableLanButton,cancelLabel:g.consentCancel,onConfirm:re,onCancel:J}),t[105]=z.confirmOpen,t[106]=g.consentCancel,t[107]=g.pairEnableLanButton,t[108]=g.pairEnableLanConfirmBody,t[109]=g.pairEnableLanConfirmTitle,t[110]=re,t[111]=J,t[112]=Y):Y=t[112];let X;return t[113]!==ne||t[114]!==G||t[115]!==K||t[116]!==q||t[117]!==Y||t[118]!==H||t[119]!==ee||t[120]!==U?(X=(0,$.jsx)(Se,{children:(0,$.jsxs)($.Fragment,{children:[H,ee,U,ne,G,K,q,Y]})}),t[113]=ne,t[114]=G,t[115]=K,t[116]=q,t[117]=Y,t[118]=H,t[119]=ee,t[120]=U,t[121]=X):X=t[121],X}function Oe(e){return e.reachable}function ke(e){return e.kind===`lan`}function Ae(e){return e.language}function je(e){let t=(0,Z.c)(40),{open:n,title:r,intro:i,bullets:a,checkboxLabel:s,confirmLabel:c,cancelLabel:l,onConfirm:u,onCancel:d}=e,[f,p]=(0,Q.useState)(!1),m;t[0]===d?m=t[1]:(m=e=>{e||(p(!1),d())},t[0]=d,t[1]=m);let h;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(D,{className:o(`xopc-dialog-overlay fixed inset-0 bg-scrim backdrop-blur-[1px]`,I)}),t[2]=h):h=t[2];let g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=o(`fixed left-1/2 top-1/2 max-h-[min(90vh,40rem)] w-[min(100%-2rem,32rem)] -translate-x-1/2 -translate-y-1/2`,`overflow-y-auto rounded-2xl border border-edge bg-surface-panel p-6 shadow-popover outline-none dark:border-edge`,L),t[3]=g):g=t[3];let _;t[4]===r?_=t[5]:(_=(0,$.jsx)(S,{className:`text-base font-semibold text-fg`,children:r}),t[4]=r,t[5]=_);let v;t[6]===i?v=t[7]:(v=(0,$.jsx)(E,{className:`mt-2 text-sm text-fg-muted`,children:i}),t[6]=i,t[7]=v);let y;t[8]===a?y=t[9]:(y=a.map(Me),t[8]=a,t[9]=y);let b;t[10]===y?b=t[11]:(b=(0,$.jsx)(`ul`,{className:`mt-4 list-disc space-y-2 pl-5 text-sm text-fg-muted`,children:y}),t[10]=y,t[11]=b);let x;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>p(e.target.checked),t[12]=x):x=t[12];let C;t[13]===f?C=t[14]:(C=(0,$.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 size-4 shrink-0 rounded border-edge accent-accent`,checked:f,onChange:x}),t[13]=f,t[14]=C);let w;t[15]===s?w=t[16]:(w=(0,$.jsx)(`span`,{children:s}),t[15]=s,t[16]=w);let T;t[17]!==w||t[18]!==C?(T=(0,$.jsxs)(`label`,{className:`mt-5 flex cursor-pointer items-start gap-3 text-sm text-fg`,children:[C,w]}),t[17]=w,t[18]=C,t[19]=T):T=t[19];let O;t[20]!==l||t[21]!==d?(O=(0,$.jsx)(W,{type:`button`,variant:`secondary`,onClick:d,children:l}),t[20]=l,t[21]=d,t[22]=O):O=t[22];let k=!f,A;t[23]!==c||t[24]!==u||t[25]!==k?(A=(0,$.jsx)(W,{type:`button`,disabled:k,onClick:u,children:c}),t[23]=c,t[24]=u,t[25]=k,t[26]=A):A=t[26];let j;t[27]!==O||t[28]!==A?(j=(0,$.jsxs)(`div`,{className:`mt-6 flex justify-end gap-2`,children:[O,A]}),t[27]=O,t[28]=A,t[29]=j):j=t[29];let N;t[30]!==T||t[31]!==j||t[32]!==_||t[33]!==v||t[34]!==b?(N=(0,$.jsxs)(M,{children:[h,(0,$.jsxs)(K,{className:g,onOpenAutoFocus:Ne,children:[_,v,b,T,j]})]}),t[30]=T,t[31]=j,t[32]=_,t[33]=v,t[34]=b,t[35]=N):N=t[35];let P;return t[36]!==n||t[37]!==m||t[38]!==N?(P=(0,$.jsx)(q,{open:n,onOpenChange:m,children:N}),t[36]=n,t[37]=m,t[38]=N,t[39]=P):P=t[39],P}function Me(e){return(0,$.jsx)(`li`,{children:e},e)}function Ne(e){return e.preventDefault()}function Pe(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var Fe=[`preparing_frpc`,`registering`,`starting_frpc`];function Ie(e){return e?e===`reconnecting_frpc`?Fe.indexOf(`starting_frpc`):Fe.indexOf(e):-1}function Le(e,t){if(t.state===`connected`)return`done`;let n=t.startProgress?.phase,r=Fe.indexOf(e),i=Ie(n);return i<0?t.state===`connecting`||t.state===`reconnecting`?`active`:`pending`:r<i?`done`:r===i?`active`:`pending`}function Re(e,t,n){let r=n.startProgress;return Le(t,n)===`active`?t===`preparing_frpc`&&n.frpcDownload?n.frpcDownload.phase===`extracting`?e.frpcExtracting:n.frpcDownload.percent==null?e.frpcDownloading:e.frpcDownloadingPercent.replace(`{{percent}}`,String(n.frpcDownload.percent)):t===`registering`&&r?.publicUrl?e.stepRegisterDetail:t===`starting_frpc`?r?.phase===`reconnecting_frpc`?e.stepReconnectDetail:e.stepFrpcDetail:null:null}function ze(e,t){switch(t){case`preparing_frpc`:return e.stepPrepareFrpc;case`registering`:return e.stepRegister;case`starting_frpc`:return e.stepFrpcLogin}}function Be(e){if(!e)return null;let t=Math.max(0,Math.floor((Date.now()-new Date(e).getTime())/1e3));return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function Ve(e){let t=(0,Z.c)(31),{status:n,t:r}=e,[,i]=(0,Q.useState)(0),a;t[0]!==i||t[1]!==n.state?(a=()=>{if(n.state!==`connecting`&&n.state!==`reconnecting`)return;let e=window.setInterval(()=>i(He),1e3);return()=>window.clearInterval(e)},t[0]=i,t[1]=n.state,t[2]=a):a=t[2];let c=n.startProgress?.startedAt,l;if(t[3]!==n.state||t[4]!==c?(l=[n.state,c],t[3]=n.state,t[4]=c,t[5]=l):l=t[5],(0,Q.useEffect)(a,l),!(n.state===`connecting`||n.state===`reconnecting`||n.state===`connected`&&n.startProgress))return null;let u,d,f,p,m;if(t[6]!==n||t[7]!==r){let e=Be(n.startProgress?.startedAt);u=!!n.publicUrl&&n.state!==`connected`&&n.startProgress?.phase!==`registering`,d=`mt-3 space-y-3 rounded-lg bg-surface-panel/80 px-3 py-3 shadow-surface`;let i;t[13]===r.startProgressTitle?i=t[14]:(i=(0,$.jsx)(`p`,{className:`text-xs font-medium text-fg`,children:r.startProgressTitle}),t[13]=r.startProgressTitle,t[14]=i);let a;t[15]===r.startProgressHint?a=t[16]:(a=(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:r.startProgressHint}),t[15]=r.startProgressHint,t[16]=a),t[17]!==i||t[18]!==a?(f=(0,$.jsxs)(`div`,{children:[i,a]}),t[17]=i,t[18]=a,t[19]=f):f=t[19];let c=Fe.map(e=>{let t=Le(e,n),i=Re(r,e,n);return(0,$.jsxs)(`li`,{className:`flex gap-2 text-xs`,children:[(0,$.jsx)(`span`,{className:`mt-0.5 shrink-0 text-fg-subtle`,"aria-hidden":!0,children:t===`done`?(0,$.jsx)(s,{className:`size-3.5 text-emerald-600 dark:text-emerald-400`}):t===`active`?(0,$.jsx)(me,{className:`size-3.5 animate-spin text-accent`}):(0,$.jsx)(P,{className:`size-3.5`})}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:o(`font-medium`,t===`active`?`text-fg`:t===`done`?`text-fg-muted`:`text-fg-subtle`),children:ze(r,e)}),i?(0,$.jsx)(`div`,{className:`mt-0.5 text-fg-muted`,children:i}):null,e===`preparing_frpc`&&t===`active`&&n.frpcDownload&&n.frpcDownload.phase===`downloading`?(0,$.jsxs)(`div`,{className:`mt-2 space-y-1`,children:[(0,$.jsx)(`div`,{className:`h-1.5 w-full overflow-hidden rounded-full bg-surface-panel`,children:(0,$.jsx)(`div`,{className:o(`h-full rounded-full bg-accent transition-[width] duration-300`,n.frpcDownload.percent==null&&`w-1/3 animate-pulse`),style:n.frpcDownload.percent==null?void 0:{width:`${n.frpcDownload.percent}%`}})}),n.frpcDownload.bytesReceived!=null&&n.frpcDownload.totalBytes?(0,$.jsxs)(`p`,{className:`text-fg-subtle`,children:[Pe(n.frpcDownload.bytesReceived),` /`,` `,Pe(n.frpcDownload.totalBytes)]}):null]}):null,e===`preparing_frpc`&&t===`active`&&n.frpcDownload?.url?(0,$.jsxs)(`p`,{className:`mt-2 text-fg-subtle`,children:[(0,$.jsxs)(`span`,{className:`font-sans`,children:[r.frpcDownloadingUrlLabel,`: `]}),(0,$.jsx)(`a`,{href:n.frpcDownload.url,target:`_blank`,rel:`noopener noreferrer`,className:`break-all font-mono text-[11px] text-accent hover:underline`,children:n.frpcDownload.url})]}):null]})]},e)});t[20]===c?p=t[21]:(p=(0,$.jsx)(`ol`,{className:`space-y-2`,children:c}),t[20]=c,t[21]=p),m=e&&n.startProgress?(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:r.startProgressElapsed.replace(`{{elapsed}}`,e)}):null,t[6]=n,t[7]=r,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m}else u=t[8],d=t[9],f=t[10],p=t[11],m=t[12];let h;t[22]!==u||t[23]!==r.publicUrlPendingNotice?(h=u?(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:r.publicUrlPendingNotice}):null,t[22]=u,t[23]=r.publicUrlPendingNotice,t[24]=h):h=t[24];let g;return t[25]!==d||t[26]!==f||t[27]!==p||t[28]!==m||t[29]!==h?(g=(0,$.jsxs)(`div`,{className:d,children:[f,p,m,h]}),t[25]=d,t[26]=f,t[27]=p,t[28]=m,t[29]=h,t[30]=g):g=t[30],g}function He(e){return e+1}function Ue(e,t){return t.state===`connected`?e.statusConnected:t.state===`error`?e.statusError:t.startProgress?.phase===`reconnecting_frpc`?e.statusReconnecting:t.startProgress?.phase===`starting_frpc`?e.statusStartingFrpc:t.startProgress?.phase===`registering`?e.statusRegistering:t.startProgress?.phase===`preparing_frpc`||t.frpcDownload?e.statusPreparingFrpc:t.state===`connecting`||t.state===`reconnecting`?e.statusConnecting:e.statusOff}function We(e){return e.state===`connected`?`connected`:e.state===`error`?`error`:e.state===`connecting`||e.state===`reconnecting`||e.startProgress||e.frpcDownload?`progress`:`off`}function Ge(e){switch(e){case`connected`:return`bg-emerald-500/15 text-emerald-700 dark:text-emerald-400`;case`progress`:return`bg-amber-500/15 text-amber-700 dark:text-amber-400`;case`error`:return`bg-red-500/15 text-red-700 dark:text-red-400`;default:return`bg-surface-hover text-fg-muted`}}function Ke(e){if(!e)return`—`;let t=Date.now()-new Date(e).getTime();if(t<0)return`—`;let n=Math.floor(t/6e4);return n<60?`${n}m`:`${Math.floor(n/60)}h ${n%60}m`}function qe(e){let t=(0,Z.c)(61),{t:n,status:r,isLoading:i,statusErr:a,starting:s,stopping:c,showConsentExpired:l,copyLabels:u,startDisabled:d,startDisabledReason:f,stepLabel:p,onStart:m,onStop:h}=e,g=d===void 0?!1:d,_,v,y,b,S,C,w;t[0]!==r||t[1]!==s?(w=We(r),_=r.enabled||s,v=s||r.state===`connecting`||r.state===`reconnecting`||!!r.startProgress||!!r.frpcDownload,t[9]===Symbol.for(`react.memo_cache_sentinel`)?(C=o(xe(),`space-y-4`),t[9]=C):C=t[9],S=`flex flex-wrap items-start justify-between gap-3`,b=`flex items-center gap-2`,y=o(`inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium`,Ge(w)),t[0]=r,t[1]=s,t[2]=_,t[3]=v,t[4]=y,t[5]=b,t[6]=S,t[7]=C,t[8]=w):(_=t[2],v=t[3],y=t[4],b=t[5],S=t[6],C=t[7],w=t[8]);let T=w===`connected`&&`bg-emerald-500`,E=w===`progress`&&`bg-amber-500 animate-pulse`,D=w===`error`&&`bg-red-500`,O=w===`off`&&`bg-fg-subtle`,k;t[10]!==T||t[11]!==E||t[12]!==D||t[13]!==O?(k=o(`size-1.5 rounded-full`,T,E,D,O),t[10]=T,t[11]=E,t[12]=D,t[13]=O,t[14]=k):k=t[14];let A;t[15]===k?A=t[16]:(A=(0,$.jsx)(`span`,{className:k,"aria-hidden":!0}),t[15]=k,t[16]=A);let j;t[17]!==i||t[18]!==r||t[19]!==n?(j=i&&!r.enabled?(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block h-3 w-16 animate-pulse rounded-full bg-surface-hover/70 motion-reduce:animate-none`}):Ue(n,r),t[17]=i,t[18]=r,t[19]=n,t[20]=j):j=t[20];let M;t[21]!==A||t[22]!==j||t[23]!==y?(M=(0,$.jsxs)(`span`,{className:y,children:[A,j]}),t[21]=A,t[22]=j,t[23]=y,t[24]=M):M=t[24];let N;t[25]!==r.connectedSince||t[26]!==r.state||t[27]!==n.uptime?(N=r.connectedSince&&r.state===`connected`?(0,$.jsxs)(`span`,{className:`text-xs text-fg-subtle`,children:[n.uptime,` `,Ke(r.connectedSince)]}):null,t[25]=r.connectedSince,t[26]=r.state,t[27]=n.uptime,t[28]=N):N=t[28];let P;t[29]!==M||t[30]!==N||t[31]!==b?(P=(0,$.jsxs)(`div`,{className:b,children:[M,N]}),t[29]=M,t[30]=N,t[31]=b,t[32]=P):P=t[32];let F;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(se,{className:`size-4 text-fg-subtle`,strokeWidth:1.75,"aria-hidden":!0}),t[33]=F):F=t[33];let I;t[34]!==P||t[35]!==S?(I=(0,$.jsxs)(`div`,{className:S,children:[P,F]}),t[34]=P,t[35]=S,t[36]=I):I=t[36];let L;t[37]===a?L=t[38]:(L=a?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:a instanceof Error?a.message:String(a)}):null,t[37]=a,t[38]=L);let R;t[39]!==l||t[40]!==n.consentExpiredBanner?(R=l?(0,$.jsx)(`p`,{className:`rounded-lg border border-amber-500/25 bg-amber-500/5 px-3 py-2 text-xs text-fg-muted`,children:n.consentExpiredBanner}):null,t[39]=l,t[40]=n.consentExpiredBanner,t[41]=R):R=t[41];let z;t[42]!==_||t[43]!==u||t[44]!==m||t[45]!==h||t[46]!==v||t[47]!==r||t[48]!==g||t[49]!==f||t[50]!==s||t[51]!==p||t[52]!==c||t[53]!==n?(z=_?(0,$.jsxs)(`div`,{className:`space-y-4`,children:[r.publicUrl?(0,$.jsx)(`div`,{className:`rounded-xl bg-surface-panel/80 px-3 py-3 shadow-surface`,children:(0,$.jsx)(he,{label:n.publicUrlLabel,text:r.publicUrl,labels:u})}):null,v?(0,$.jsx)(Ve,{status:r,t:n}):null,r.lastError&&r.state===`error`?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:r.lastError}):null,(0,$.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:r.enabled?(0,$.jsxs)(W,{type:`button`,variant:`secondary`,disabled:c,onClick:h,children:[c?(0,$.jsx)(me,{className:`size-4 animate-spin`}):null,n.stop]}):(0,$.jsxs)(W,{type:`button`,disabled:s,onClick:m,children:[s?(0,$.jsx)(me,{className:`size-4 animate-spin`}):(0,$.jsx)(ae,{className:`size-4`}),n.start]})})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[p?(0,$.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-fg-subtle`,children:p}):null,(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:n.emptyStateTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-fg-muted`,children:n.emptyStateBody})]}),(0,$.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-amber-500/25 bg-amber-500/5 px-3 py-2.5 text-xs text-fg-muted`,children:[(0,$.jsx)(x,{className:`mt-0.5 size-4 shrink-0 text-amber-600 dark:text-amber-400`}),(0,$.jsx)(`p`,{children:n.riskBannerBody})]}),g&&f?(0,$.jsx)(`p`,{className:`text-sm text-amber-800 dark:text-amber-200`,children:f}):null,(0,$.jsxs)(W,{type:`button`,disabled:s||g,onClick:m,className:`w-full sm:w-auto`,children:[s?(0,$.jsx)(me,{className:`size-4 animate-spin`}):(0,$.jsx)(ae,{className:`size-4`}),n.start]})]}),t[42]=_,t[43]=u,t[44]=m,t[45]=h,t[46]=v,t[47]=r,t[48]=g,t[49]=f,t[50]=s,t[51]=p,t[52]=c,t[53]=n,t[54]=z):z=t[54];let B;return t[55]!==I||t[56]!==L||t[57]!==R||t[58]!==z||t[59]!==C?(B=(0,$.jsxs)(`section`,{className:C,children:[I,L,R,z]}),t[55]=I,t[56]=L,t[57]=R,t[58]=z,t[59]=C,t[60]=B):B=t[60],B}var Je=`https://console.xopc.ai/keys/tunnel`,Ye={reconfiguring:!1};function Xe(e){let t=(0,Z.c)(84),{t:n,brokerSecretFromEnv:r,brokerSecretMissing:i,brokerSecretConfiguredInConfig:a,brokerSecretMaskedValue:c,brokerSecretDraft:l,savingBrokerSecret:u,brokerSecretNotice:d,copyFailedLabel:f,onDraftChange:p,onSave:m,onClear:h,sectionRef:g}=e,_=(0,Q.useId)(),v=i&&!r,y=!v,[b,x]=(0,Q.useReducer)(re,Ye),{reconfiguring:S}=b,C;t[0]!==a||t[1]!==l||t[2]!==r||t[3]!==S?(C=a&&!r&&!S&&!l.trim(),t[0]=a,t[1]=l,t[2]=r,t[3]=S,t[4]=C):C=t[4];let w=C,T;t[5]!==n.copied||t[6]!==n.copyKey||t[7]!==n.hideKey||t[8]!==n.showKey?(T={show:n.showKey,hide:n.hideKey,copy:n.copyKey,copied:n.copied},t[5]=n.copied,t[6]=n.copyKey,t[7]=n.hideKey,t[8]=n.showKey,t[9]=T):T=t[9];let E=T,D;t[10]===l?D=t[11]:(D=l.trim().length>0&&!F(l.trim()),t[10]=l,t[11]=D);let O=D,A;t[12]===p?A=t[13]:(A=()=>{x({type:`patch`,patch:{reconfiguring:!1}}),p(``)},t[12]=p,t[13]=A);let j=A,M=v&&`ring-1 ring-amber-500/30`,N;t[14]===M?N=t[15]:(N=o(M),t[14]=M,t[15]=N);let P=y?`bg-emerald-500/10 text-emerald-600 dark:text-emerald-400`:v?`bg-amber-500/10 text-amber-700 dark:text-amber-400`:`bg-surface-hover text-fg-muted`,I;t[16]===P?I=t[17]:(I=o(`flex size-9 shrink-0 items-center justify-center rounded-lg`,P),t[16]=P,t[17]=I);let L;t[18]===y?L=t[19]:(L=y?(0,$.jsx)(s,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}):(0,$.jsx)(ee,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0}),t[18]=y,t[19]=L);let R;t[20]!==I||t[21]!==L?(R=(0,$.jsx)(`span`,{className:I,children:L}),t[20]=I,t[21]=L,t[22]=R):R=t[22];let z=y?n.brokerSecretReadyTitle:n.brokerSecretStepTitle,B;t[23]===z?B=t[24]:(B=(0,$.jsx)(`p`,{className:`text-sm font-semibold text-fg`,children:z}),t[23]=z,t[24]=B);let V=y?n.brokerSecretReadyHint:n.brokerSecretHint,H;t[25]===V?H=t[26]:(H=(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-fg-muted`,children:V}),t[25]=V,t[26]=H);let U;t[27]!==v||t[28]!==n.brokerSecretMissingHint?(U=v?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-amber-800 dark:text-amber-200`,children:n.brokerSecretMissingHint}):null,t[27]=v,t[28]=n.brokerSecretMissingHint,t[29]=U):U=t[29];let te;t[30]!==B||t[31]!==H||t[32]!==U?(te=(0,$.jsxs)(`div`,{children:[B,H,U]}),t[30]=B,t[31]=H,t[32]=U,t[33]=te):te=t[33];let ne;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,$.jsx)(k,{className:`size-3`,"aria-hidden":!0}),t[34]=ne):ne=t[34];let G;t[35]===n.brokerSecretConsoleLink?G=t[36]:(G=(0,$.jsxs)(`a`,{href:Je,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex w-fit items-center gap-1 text-xs font-medium text-accent-fg hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[n.brokerSecretConsoleLink,ne]}),t[35]=n.brokerSecretConsoleLink,t[36]=G);let K;t[37]!==r||t[38]!==n.brokerSecretEnvHint?(K=r?(0,$.jsx)(`p`,{className:`rounded-lg bg-surface-panel/80 px-3 py-2 text-xs text-fg-muted shadow-surface`,children:n.brokerSecretEnvHint}):null,t[37]=r,t[38]=n.brokerSecretEnvHint,t[39]=K):K=t[39];let q;t[40]!==a||t[41]!==l||t[42]!==r||t[43]!==c||t[44]!==O||t[45]!==j||t[46]!==f||t[47]!==_||t[48]!==v||t[49]!==h||t[50]!==p||t[51]!==m||t[52]!==S||t[53]!==u||t[54]!==E||t[55]!==w||t[56]!==n.brokerSecretCancelReconfigure||t[57]!==n.brokerSecretClear||t[58]!==n.brokerSecretMaskedHelp||t[59]!==n.brokerSecretNotInConfigFile||t[60]!==n.brokerSecretPlaceholder||t[61]!==n.brokerSecretReconfigure||t[62]!==n.brokerSecretRevealFailed||t[63]!==n.brokerSecretSave||t[64]!==n.brokerSecretSaveAndContinue||t[65]!==n.brokerSecretTitle?(q=w?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`label`,{className:`sr-only`,htmlFor:_,children:n.brokerSecretTitle}),(0,$.jsx)(ie,{id:_,value:c,labels:E,reveal:Ze,loadFailedLabel:f||n.brokerSecretRevealFailed,maskedHelp:n.brokerSecretMaskedHelp,notInConfigFile:n.brokerSecretNotInConfigFile,readOnly:!0}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsx)(W,{type:`button`,variant:`secondary`,disabled:u,onClick:()=>{x({type:`patch`,patch:{reconfiguring:!0}})},children:n.brokerSecretReconfigure}),(0,$.jsx)(W,{type:`button`,variant:`ghost`,disabled:u,onClick:h,children:n.brokerSecretClear})]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`label`,{className:`sr-only`,htmlFor:_,children:n.brokerSecretTitle}),(0,$.jsx)(ie,{id:_,value:l,onChange:p,placeholder:n.brokerSecretPlaceholder,labels:E,disabled:u}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsxs)(W,{type:`button`,disabled:u||!O,onClick:m,children:[u?(0,$.jsx)(me,{className:`size-4 animate-spin`}):null,v?n.brokerSecretSaveAndContinue:n.brokerSecretSave]}),a||r?(0,$.jsx)(W,{type:`button`,variant:`ghost`,disabled:u,onClick:h,children:n.brokerSecretClear}):null,S?(0,$.jsx)(W,{type:`button`,variant:`ghost`,disabled:u,onClick:j,children:n.brokerSecretCancelReconfigure}):null]})]}),t[40]=a,t[41]=l,t[42]=r,t[43]=c,t[44]=O,t[45]=j,t[46]=f,t[47]=_,t[48]=v,t[49]=h,t[50]=p,t[51]=m,t[52]=S,t[53]=u,t[54]=E,t[55]=w,t[56]=n.brokerSecretCancelReconfigure,t[57]=n.brokerSecretClear,t[58]=n.brokerSecretMaskedHelp,t[59]=n.brokerSecretNotInConfigFile,t[60]=n.brokerSecretPlaceholder,t[61]=n.brokerSecretReconfigure,t[62]=n.brokerSecretRevealFailed,t[63]=n.brokerSecretSave,t[64]=n.brokerSecretSaveAndContinue,t[65]=n.brokerSecretTitle,t[66]=q):q=t[66];let J;t[67]===d?J=t[68]:(J=d?(0,$.jsx)(`p`,{className:`text-xs text-emerald-700 dark:text-emerald-400`,children:d}):null,t[67]=d,t[68]=J);let Y;t[69]!==te||t[70]!==G||t[71]!==K||t[72]!==q||t[73]!==J?(Y=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-3`,children:[te,G,K,q,J]}),t[69]=te,t[70]=G,t[71]=K,t[72]=q,t[73]=J,t[74]=Y):Y=t[74];let X;t[75]!==R||t[76]!==Y?(X=(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[R,Y]}),t[75]=R,t[76]=Y,t[77]=X):X=t[77];let ae;t[78]!==X||t[79]!==N?(ae=(0,$.jsx)(Se,{className:N,children:X}),t[78]=X,t[79]=N,t[80]=ae):ae=t[80];let oe;return t[81]!==g||t[82]!==ae?(oe=(0,$.jsx)(`div`,{ref:g,id:`tunnel-broker-secret-setup`,children:ae}),t[81]=g,t[82]=ae,t[83]=oe):oe=t[83],oe}function Ze(){return R().then(Qe)}function Qe(e){return e.registrationSecret??null}function $e(e){let t=(0,Z.c)(10),{language:n,label:r,section:i,className:a}=e,s;t[0]!==n||t[1]!==i?(s=C(n,i),t[0]=n,t[1]=i,t[2]=s):s=t[2];let c;t[3]===a?c=t[4]:(c=o(`inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40`,a),t[3]=a,t[4]=c);let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(k,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[5]=l):l=t[5];let u;return t[6]!==r||t[7]!==s||t[8]!==c?(u=(0,$.jsxs)(`a`,{href:s,target:`_blank`,rel:`noreferrer`,className:c,children:[r,l]}),t[6]=r,t[7]=s,t[8]=c,t[9]=u):u=t[9],u}var et=e(Ce(),1),tt={width:216,margin:2,errorCorrectionLevel:`M`,color:{dark:`#000000ff`,light:`#ffffffff`}};async function nt(e){return et.toDataURL(e,tt)}function rt(e){let t=e?.candidates??[],n=t.find(e=>e.kind===`lan`&&e.reachable),r=t.find(e=>e.kind===`lan`);return(n??r)?.url?.trim()??``}function it(e,t){let n=t.trim();return!n||!e?!1:e.candidates.some(e=>e.kind===`tunnel`&&e.url.trim()===n)}function at(e,t){return e?t?rt(e)||e.recommended.url?.trim()||``:e.recommended.url?.trim()||``:``}function ot(e,t){let n=t?.preferLan===!0,r=!!e,{mutate:i}=_(),a=(0,Q.useRef)(!1),{data:o}=v(r?`tunnel-status`:null,Y,{refreshInterval:6e4}),{data:s,mutate:c}=v(r?`tunnel-pair-context`:null,U,{refreshInterval:6e4});(0,Q.useEffect)(()=>{let e=()=>{i(`tunnel-status`),i(`tunnel-qr`),i(`tunnel-pair`),i(`tunnel-pair-context`)};return window.addEventListener(`tunnel-status`,e),()=>window.removeEventListener(`tunnel-status`,e)},[i]);let l=o?.state===`connected`&&!!o.publicUrl?.trim(),u=l&&!n,{data:f,mutate:p}=v(u&&r?`tunnel-qr`:null,oe,{refreshInterval:4*6e4}),{data:m,mutate:g}=v(!u&&r&&s?.pairingReady?`tunnel-pair`:null,de,{refreshInterval:4*6e4}),[y,b]=(0,Q.useState)(``),[x,S]=(0,Q.useState)(``),[C,w]=(0,Q.useState)({pairContext:void 0,preferLan:n});if(!a.current&&(s!==C.pairContext||n!==C.preferLan)){w({pairContext:s,preferLan:n});let e=at(s,n);y!==e&&b(e)}let T=(0,Q.useCallback)(e=>{a.current=!0,b(e)},[]),E=(0,Q.useCallback)(()=>{let e=at(s,n);e&&(a.current=!0,b(e))},[s,n]),D=(0,Q.useCallback)(e=>{let t=e.trim();t&&(a.current=!0,b(t))},[]),O=(0,Q.useCallback)(e=>{a.current=!1,b(e?.trim()||at(s,n))},[s,n]),k=y.trim(),j=(0,Q.useMemo)(()=>{try{let e=new URL(k);return e.protocol===`http:`||e.protocol===`https:`}catch{return!1}},[k]),M=j&&h(k),N=!u&&!!(s&&!s.pairingReady&&s.blockReason===`GATEWAY_LOOPBACK_ONLY`),P=!u&&j&&!M&&!!m?.pairingSecret&&(s?.pairingReady===!0||!N),F=(0,Q.useMemo)(()=>{let e=rt(s);return n?e||(k&&!it(s,k)?k:``):k},[s,n,k]),I=(0,Q.useMemo)(()=>{if(!e)return``;if(x.trim())return x.trim();if(u&&f?.qrPayload?.trim())return f.qrPayload.trim();if(!P||!m?.pairingSecret)return``;let t=s?.candidates.find(e=>e.kind===`tunnel`&&e.reachable),r=s?.candidates.find(e=>e.kind===`lan`&&e.reachable),i=n?F:t?.url??k;return i?d({baseUrl:i,pairingSecret:m.pairingSecret,lanUrl:n?null:t&&r?r.url:null}):``},[e,F,m?.pairingSecret,P,x,n,k,u,f?.qrPayload,s?.candidates]),L=A(()=>nt(I),[I],{enabled:!!I,initial:null,errorData:null}),R=I?L.data:null,z=!!(I&&L.error!==null&&!L.loading);return{tunnelActive:l,tunnelStatus:o,tunnelQr:f,pairContext:s,pairBaseUrl:y,setPairBaseUrl:T,applySuggestedPairUrl:E,applyCandidateUrl:D,baseOk:j,localhostWarn:M,pairingBlocked:N,deepLink:I,qrPayload:I,qrDataUrl:R,qrGenFailed:z,encoding:!!(I&&!R&&!z),refreshQr:(0,Q.useCallback)(async e=>{if(e?.trim()){S(e.trim()),p({qrPayload:e.trim(),publicUrl:o?.publicUrl??``,lanUrl:f?.lanUrl??null},!1);return}S(``),await c(),u?await p():s?.pairingReady&&await g()},[g,c,p,s?.pairingReady,f?.lanUrl,o?.publicUrl,u]),resetPairBaseFromContext:O}}var st={actionError:null,starting:!1,stopping:!1,savingAutoStart:!1,consentOpen:!1,autoStartConfirmOpen:!1,releaseConfirmOpen:!1,releasing:!1,brokerSecretDraft:``,savingBrokerSecret:!1,brokerSecretNotice:null};function ct({embedded:e=!1}){let t=p(e=>e.language),n=l(t).tunnelSettings,r=m(e=>e.token),i=!!r,[a,s]=(0,Q.useReducer)(re,st),{actionError:c,starting:u,stopping:d,savingAutoStart:f,consentOpen:h,autoStartConfirmOpen:g,releaseConfirmOpen:_,releasing:y,brokerSecretDraft:b,savingBrokerSecret:x,brokerSecretNotice:S}=a,C=(0,Q.useRef)(null),w=ot(r??``),{data:T}=G(i),{data:E,error:D,isLoading:O,mutate:k}=v(i?`tunnel-status`:null,Y,{refreshInterval:e=>u?1e3:e?.frpcDownload||e?.state===`connecting`||e?.state===`reconnecting`?2e3:6e4}),A=(0,Q.useMemo)(()=>{let e=T?.payload?.config;if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e.tunnel;if(t&&typeof t==`object`&&!Array.isArray(t)&&t.autoStart===!0)return!0}return E?.config?.autoStart===!0},[T,E?.config?.autoStart]),j=(0,Q.useMemo)(()=>{let e=T?.payload?.config;if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e.tunnel;if(t&&typeof t==`object`&&!Array.isArray(t)){let e=t.registrationSecret;if(typeof e==`string`)return e}}return``},[T]),M=F(j),N=E?.registrationSecret?.source===`env`,P=E?.registrationSecret?.source===`missing`,I=E?.registrationSecret?.configured===!0;(0,Q.useEffect)(()=>{let e=()=>{k()};return window.addEventListener(`tunnel-status`,e),()=>window.removeEventListener(`tunnel-status`,e)},[k]);let L=(0,Q.useMemo)(()=>[n.consentBullet1,n.consentBullet2,n.consentBullet3],[n.consentBullet1,n.consentBullet2,n.consentBullet3]),R=(0,Q.useCallback)(async()=>{s({type:`patch`,patch:{actionError:null}}),s({type:`patch`,patch:{starting:!0}});try{let e=await fe();await k(),ce(),await w.refreshQr(e.qrPayload)}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{starting:!1}})}},[k,w.refreshQr]),z=(0,Q.useCallback)(()=>{if(!I){s({type:`patch`,patch:{actionError:n.brokerSecretRequiredBeforeStart}}),C.current?.scrollIntoView({behavior:`smooth`,block:`start`});return}if(E?.consentRequired){s({type:`patch`,patch:{consentOpen:!0}});return}R()},[I,E?.consentRequired,R,n.brokerSecretRequiredBeforeStart]),B=(0,Q.useCallback)(async()=>{s({type:`patch`,patch:{consentOpen:!1}}),s({type:`patch`,patch:{actionError:null}});try{await te(),await Promise.all([k(),R()])}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}},[k,R]),V=(0,Q.useCallback)(async()=>{s({type:`patch`,patch:{actionError:null}}),s({type:`patch`,patch:{stopping:!0}});try{await pe(),await Promise.all([w.refreshQr(),k()]),ce()}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{stopping:!1}})}},[k,w.refreshQr]),H=(0,Q.useCallback)(async e=>{s({type:`patch`,patch:{savingAutoStart:!0}}),s({type:`patch`,patch:{actionError:null}});try{await ne({autoStart:e}),ce()}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{savingAutoStart:!1}})}},[]),ee=(0,Q.useCallback)(()=>{if(A){H(!1);return}if(E?.consentRequired){s({type:`patch`,patch:{actionError:n.consentExpiredBanner}});return}if(!E?.canAutoStart){s({type:`patch`,patch:{actionError:n.autoStartHint}});return}s({type:`patch`,patch:{autoStartConfirmOpen:!0}})},[H,E?.canAutoStart,E?.consentRequired,n,A]),U=(0,Q.useCallback)(async()=>{let e=b.trim();if(e){s({type:`patch`,patch:{savingBrokerSecret:!0,actionError:null,brokerSecretNotice:null}});try{await ne({registrationSecret:e}),s({type:`patch`,patch:{brokerSecretDraft:``,brokerSecretNotice:n.brokerSecretSaved}}),ce(),await k(),s({type:`patch`,patch:{actionError:null}})}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{savingBrokerSecret:!1}})}}},[b,k,n.brokerSecretSaved]),K=(0,Q.useCallback)(async()=>{s({type:`patch`,patch:{savingBrokerSecret:!0,actionError:null,brokerSecretNotice:null}});try{await ne({registrationSecret:null}),s({type:`patch`,patch:{brokerSecretDraft:``,brokerSecretNotice:n.brokerSecretCleared}}),ce(),await k()}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{savingBrokerSecret:!1}})}},[k,n.brokerSecretCleared]),q=(0,Q.useCallback)(async()=>{s({type:`patch`,patch:{releaseConfirmOpen:!1,actionError:null,releasing:!0}});try{await pe({release:!0}),await Promise.all([w.refreshQr(),k()]),ce()}catch(e){s({type:`patch`,patch:{actionError:e instanceof Error?e.message:String(e)}})}finally{s({type:`patch`,patch:{releasing:!1}})}},[k,w.refreshQr]),J=(0,Q.useMemo)(()=>({copy:n.copyUrl,copied:n.copied,copyFailed:l(t).clipboard.copyFailed}),[t,n.copyUrl,n.copied]);if(!i)return(0,$.jsx)(`div`,{className:e?void 0:`w-full px-3 py-8 sm:px-5 xl:px-6`,children:(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:n.needToken})});let X=E??{enabled:!1,state:`disconnected`,subdomain:null,publicUrl:null,connectedSince:null,frpcPid:null,lastHeartbeatAt:null,lastError:null,consentRequired:!0,config:{autoStart:A,brokerUrl:`https://frp.xopc.ai/api`}},ie=E?.consentRequired&&(X.enabled||A||E?.consent?.acceptedAt),ae=(0,$.jsx)(Xe,{t:n,brokerSecretFromEnv:N,brokerSecretMissing:P,brokerSecretConfiguredInConfig:M,brokerSecretMaskedValue:M?j:``,brokerSecretDraft:b,savingBrokerSecret:x,brokerSecretNotice:S,copyFailedLabel:l(t).clipboard.copyFailed,onDraftChange:e=>s({type:`patch`,patch:{brokerSecretDraft:e}}),onSave:()=>void U(),onClear:()=>void K(),sectionRef:C}),oe=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(je,{open:h,title:n.consentTitle,intro:n.consentIntro,bullets:L,checkboxLabel:n.consentCheckbox,confirmLabel:ie?n.consentReconfirm:n.consentConfirm,cancelLabel:n.consentCancel,onConfirm:()=>void B(),onCancel:()=>s({type:`patch`,patch:{consentOpen:!1}})},h?`consent-open`:`consent-closed`),(0,$.jsx)(ue,{open:g,title:n.autoStartConfirmTitle,description:n.autoStartConfirmBody,confirmLabel:n.autoStartConfirmLabel,cancelLabel:n.consentCancel,onConfirm:()=>{s({type:`patch`,patch:{autoStartConfirmOpen:!1}}),H(!0)},onCancel:()=>s({type:`patch`,patch:{autoStartConfirmOpen:!1}})}),(0,$.jsx)(ue,{open:_,title:n.releaseConfirmTitle,description:n.releaseConfirmBody,confirmLabel:n.releaseConfirmLabel,cancelLabel:n.consentCancel,destructive:!0,onConfirm:()=>void q(),onCancel:()=>s({type:`patch`,patch:{releaseConfirmOpen:!1}})})]});return e?(0,$.jsxs)(`div`,{className:`flex w-full flex-col gap-4`,children:[c?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:c}):null,ae,(0,$.jsx)(qe,{t:n,status:X,isLoading:O,statusErr:D,starting:u,stopping:d,showConsentExpired:!!ie,copyLabels:J,startDisabled:!I,startDisabledReason:I?void 0:n.brokerSecretRequiredBeforeStart,stepLabel:n.flowStepStart,onStart:z,onStop:()=>void V()}),(0,$.jsx)(De,{pairQr:w,gatewayToken:r??``,streamlined:!0,onRefreshQr:()=>void w.refreshQr()}),(0,$.jsxs)(ye,{showLabel:n.showOptions,hideLabel:n.hideOptions,children:[(0,$.jsxs)(`label`,{className:o(`flex items-center gap-3 text-sm text-fg`,!A&&!E?.canAutoStart?`cursor-not-allowed opacity-60`:`cursor-pointer`),children:[(0,$.jsx)(`input`,{type:`checkbox`,className:`size-4 rounded border-edge accent-accent`,checked:A,disabled:f||!A&&!E?.canAutoStart,onChange:ee}),n.autoStart]}),!E?.canAutoStart&&!A?(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:n.autoStartHint}):null,X.subdomain||X.publicUrl?(0,$.jsxs)(`div`,{className:`space-y-2 border-t border-edge-subtle pt-4`,children:[(0,$.jsxs)(W,{type:`button`,variant:`secondary`,disabled:y||d,className:`border-danger/40 text-danger hover:bg-danger/10`,onClick:()=>s({type:`patch`,patch:{releaseConfirmOpen:!0}}),children:[y?(0,$.jsx)(me,{className:`size-4 animate-spin`}):null,n.release]}),(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:n.releaseHint})]}):null]}),(0,$.jsx)(ye,{showLabel:n.showAdvanced,hideLabel:n.hideAdvanced,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-edge-subtle pt-4 text-xs text-fg-subtle`,children:[(0,$.jsxs)(`p`,{className:`flex items-start gap-2`,children:[(0,$.jsx)(se,{className:`mt-0.5 size-4 shrink-0 text-accent`}),(0,$.jsx)(`span`,{children:n.brokerNote})]}),(0,$.jsx)($e,{language:t,label:n.brokerDocsLink,section:`public-tunnel`,className:`text-xs`})]})}),oe]}):(0,$.jsxs)(`div`,{className:e?`flex w-full flex-col gap-6`:`flex w-full flex-col gap-6 px-3 py-8 sm:px-5 xl:px-6`,children:[e?null:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{className:`text-lg font-semibold text-fg`,children:n.title}),(0,$.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:n.subtitle})]}),c?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:c}):null,ae,(0,$.jsx)(qe,{t:n,status:X,isLoading:O,statusErr:D,starting:u,stopping:d,showConsentExpired:!!ie,copyLabels:J,startDisabled:!I,startDisabledReason:I?void 0:n.brokerSecretRequiredBeforeStart,onStart:z,onStop:()=>void V()}),(0,$.jsx)(De,{pairQr:w,gatewayToken:r??``}),X.subdomain||X.publicUrl?(0,$.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,$.jsxs)(W,{type:`button`,variant:`secondary`,disabled:y||d,className:`border-danger/40 text-danger hover:bg-danger/10`,onClick:()=>s({type:`patch`,patch:{releaseConfirmOpen:!0}}),children:[y?(0,$.jsx)(me,{className:`size-4 animate-spin`}):null,n.release]})}):null,X.subdomain||X.publicUrl?(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:n.releaseHint}):null,(0,$.jsxs)(Se,{children:[(0,$.jsx)(`h2`,{className:`mb-3 text-sm font-semibold text-fg`,children:n.optionsTitle}),(0,$.jsxs)(`label`,{className:o(`flex items-center gap-3 text-sm text-fg`,!A&&!E?.canAutoStart?`cursor-not-allowed opacity-60`:`cursor-pointer`),children:[(0,$.jsx)(`input`,{type:`checkbox`,className:`size-4 rounded border-edge accent-accent`,checked:A,disabled:f||!A&&!E?.canAutoStart,onChange:ee}),n.autoStart]}),!E?.canAutoStart&&!A?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-fg-subtle`,children:n.autoStartHint}):null]}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg bg-surface-panel/80 px-3 py-2 text-xs text-fg-subtle shadow-surface`,children:[(0,$.jsxs)(`p`,{className:`flex items-start gap-2`,children:[(0,$.jsx)(se,{className:`mt-0.5 size-4 shrink-0 text-accent`}),(0,$.jsx)(`span`,{children:n.brokerNote})]}),(0,$.jsx)($e,{language:t,label:n.brokerDocsLink,section:`public-tunnel`,className:`text-xs`})]}),oe]})}async function lt(){let e=await g(`/api/exposure/status`);if(!e.ok)throw Error(`Failed to load exposure status (${e.status})`);return await e.json()}async function ut(e=`serve`){let t=await g(`/api/exposure/tailscale/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({mode:e})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`Start failed (${t.status})`)}return await t.json()}async function dt(){let e=await g(`/api/exposure/tailscale/stop`,{method:`POST`});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error??`Stop failed (${e.status})`)}return await e.json()}var ft=`https://tailscale.com/download`;function pt(e){let t=(0,Z.c)(2),{label:n}=e,r;return t[0]===n?r=t[1]:(r=(0,$.jsx)(`a`,{href:ft,target:`_blank`,rel:`noreferrer`,className:`font-medium text-accent hover:underline`,children:n}),t[0]=n,t[1]=r),r}function mt({embedded:e=!1}){let t=p(e=>e.language),n=l(t).remoteAccess.tailscale,r=(0,Q.useMemo)(()=>({copy:n.copyUrl,copied:n.copied,copyFailed:l(t).clipboard.copyFailed}),[t,n.copyUrl,n.copied]),i=!!m(e=>e.token),[a,o]=(0,Q.useState)(!1),[s,c]=(0,Q.useState)(null),{data:u,mutate:d,isLoading:f}=v(i?`exposure-status`:null,lt,{refreshInterval:3e4}),h=u?.tailscale.hostname,g=u?.tailscale.active===!0,_=u?.tailscale.cliAvailable!==!1,y=h?`https://${h}/`:null,b=(0,Q.useCallback)(async()=>{o(!0),c(null);try{await ut(`serve`),await d()}catch(e){c(e instanceof Error?e.message:String(e))}finally{o(!1)}},[d]),x=(0,Q.useCallback)(async()=>{o(!0),c(null);try{await dt(),await d()}catch(e){c(e instanceof Error?e.message:String(e))}finally{o(!1)}},[d]);if(!i)return null;let S=(0,$.jsxs)(`div`,{className:e?`space-y-4`:`mt-4 space-y-3`,children:[e?(0,$.jsxs)(`ol`,{className:`space-y-3 text-sm text-fg-muted`,children:[(0,$.jsxs)(`li`,{className:`flex gap-2`,children:[(0,$.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center rounded-full bg-surface-hover text-xs font-semibold text-fg`,children:`1`}),(0,$.jsxs)(`span`,{children:[n.stepInstallBefore,(0,$.jsx)(pt,{label:n.stepInstallLink}),n.stepInstallAfter]})]}),(0,$.jsxs)(`li`,{className:`flex gap-2`,children:[(0,$.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center rounded-full bg-surface-hover text-xs font-semibold text-fg`,children:`2`}),(0,$.jsx)(`span`,{children:n.stepEnable})]}),(0,$.jsxs)(`li`,{className:`flex gap-2`,children:[(0,$.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center rounded-full bg-surface-hover text-xs font-semibold text-fg`,children:`3`}),(0,$.jsx)(`span`,{children:n.stepCopy})]})]}):null,e&&u?.tailscale.cliAvailable===!1?(0,$.jsxs)(`p`,{className:`rounded-lg border border-amber-500/25 bg-amber-500/5 px-3 py-2 text-sm text-fg-muted`,children:[n.cliMissingIntro,` `,(0,$.jsx)(pt,{label:n.cliMissingDownloadLink}),n.cliMissingSuffix]}):null,f&&!u?(0,$.jsxs)(`div`,{className:`grid gap-3`,"aria-busy":`true`,children:[(0,$.jsx)(z,{className:`h-20 rounded-lg`}),(0,$.jsx)(z,{className:`h-20 rounded-lg`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(Se,{children:[(0,$.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:n.statusLabel}),(0,$.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:g?n.statusActive:n.statusOff}),y?(0,$.jsx)(`div`,{className:`mt-3`,children:(0,$.jsx)(he,{text:y,labels:r})}):null,s?(0,$.jsx)(`p`,{className:`mt-2 text-sm text-red-600 dark:text-red-400`,children:s}):null,(0,$.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:g?(0,$.jsxs)(W,{type:`button`,variant:`secondary`,disabled:a,onClick:()=>void x(),children:[a?(0,$.jsx)(me,{className:`mr-1 h-4 w-4 animate-spin`}):null,n.disableServe]}):(0,$.jsxs)(W,{type:`button`,disabled:a||!_,onClick:()=>void b(),children:[a?(0,$.jsx)(me,{className:`mr-1 h-4 w-4 animate-spin`}):(0,$.jsx)(ae,{className:`mr-1 h-4 w-4`}),n.enableServe]})})]}),(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:n.hint}),(0,$.jsx)($e,{language:t,label:n.docsLink,section:`tailscale-serve`,className:`mt-2`})]})]});return e?S:(0,$.jsxs)(Se,{children:[(0,$.jsx)(be,{icon:se,title:n.title,subtitle:n.subtitle}),S]})}function ht(){let e=(0,Z.c)(26),t=p(_t),n=m(gt),r;e[0]===t?r=e[1]:(r=l(t),e[0]=t,e[1]=r);let i=r.remoteAccess.lan,o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o={preferLan:!0},e[2]=o):o=e[2];let s=ot(n??``,o),c;e[3]!==i.subtitle||e[4]!==i.title?(c=(0,$.jsx)(be,{icon:b,title:i.title,subtitle:i.subtitle}),e[3]=i.subtitle,e[4]=i.title,e[5]=c):c=e[5];let u;e[6]===i.body?u=e[7]:(u=(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:i.body}),e[6]=i.body,e[7]=u);let d;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(k,{className:`size-3.5`,"aria-hidden":!0}),e[8]=d):d=e[8];let f;e[9]===i.link?f=e[10]:(f=(0,$.jsxs)(a,{to:`/settings/gateway`,className:`inline-flex items-center gap-1.5 text-sm font-medium text-accent hover:underline`,children:[i.link,d]}),e[9]=i.link,e[10]=f);let h;e[11]!==u||e[12]!==f?(h=(0,$.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[u,f]}),e[11]=u,e[12]=f,e[13]=h):h=e[13];let g;e[14]!==c||e[15]!==h?(g=(0,$.jsxs)(Se,{children:[c,h]}),e[14]=c,e[15]=h,e[16]=g):g=e[16];let _=n??``,v;e[17]===s?v=e[18]:(v=()=>void s.refreshQr(),e[17]=s,e[18]=v);let y;e[19]!==s||e[20]!==_||e[21]!==v?(y=(0,$.jsx)(De,{pairQr:s,gatewayToken:_,lanOnly:!0,onRefreshQr:v}),e[19]=s,e[20]=_,e[21]=v,e[22]=y):y=e[22];let x;return e[23]!==y||e[24]!==g?(x=(0,$.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[g,y]}),e[23]=y,e[24]=g,e[25]=x):x=e[25],x}function gt(e){return e.token}function _t(e){return e.language}function vt(e){let t=(0,Z.c)(30),{embedded:n}=e,r=n===void 0?!1:n,i=p(yt),a;t[0]===i?a=t[1]:(a=l(i),t[0]=i,t[1]=a);let o=a.remoteAccess.ssh,[s,u]=(0,Q.useState)(!1),d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=async()=>{await c(`xopc gateway ssh-tunnel --target user@your-host --local-port 18790 --remote-port 18790`)&&(u(!0),setTimeout(()=>u(!1),2e3))},t[2]=d):d=t[2];let f=d,m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(`pre`,{className:`overflow-x-auto rounded-lg border border-edge bg-surface px-3 py-2 text-xs text-fg-muted`,children:`xopc gateway ssh-tunnel --target user@your-host --local-port 18790 --remote-port 18790`}),t[3]=m):m=t[3];let h,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>void f(),g=(0,$.jsx)(j,{className:`mr-1 h-4 w-4`}),t[4]=h,t[5]=g):(h=t[4],g=t[5]);let _=s?o.copied:o.copy,v;t[6]===_?v=t[7]:(v=(0,$.jsx)(`div`,{className:`mt-2`,children:(0,$.jsxs)(W,{type:`button`,variant:`ghost`,onClick:h,children:[g,_]})}),t[6]=_,t[7]=v);let y;t[8]!==r||t[9]!==o.hint?(y=r?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-fg-subtle`,children:o.hint}):null,t[8]=r,t[9]=o.hint,t[10]=y):y=t[10];let b;t[11]!==v||t[12]!==y?(b=(0,$.jsxs)($.Fragment,{children:[m,v,y]}),t[11]=v,t[12]=y,t[13]=b):b=t[13];let x=b;if(r){let e;t[14]!==o.subtitle||t[15]!==o.title?(e=(0,$.jsx)(be,{icon:N,title:o.title,subtitle:o.subtitle}),t[14]=o.subtitle,t[15]=o.title,t[16]=e):e=t[16];let n;t[17]===x?n=t[18]:(n=(0,$.jsx)(`div`,{className:`mt-4 space-y-2`,children:x}),t[17]=x,t[18]=n);let r;return t[19]!==e||t[20]!==n?(r=(0,$.jsxs)(Se,{children:[e,n]}),t[19]=e,t[20]=n,t[21]=r):r=t[21],r}let S;t[22]!==o.subtitle||t[23]!==o.title?(S=(0,$.jsx)(be,{icon:N,title:o.title,subtitle:o.subtitle}),t[22]=o.subtitle,t[23]=o.title,t[24]=S):S=t[24];let C;t[25]===x?C=t[26]:(C=(0,$.jsx)(`div`,{className:`mt-4`,children:x}),t[25]=x,t[26]=C);let w;return t[27]!==S||t[28]!==C?(w=(0,$.jsxs)(Se,{children:[S,C]}),t[27]=S,t[28]=C,t[29]=w):w=t[29],w}function yt(e){return e.language}function bt(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(vt,{embedded:!0}),e[0]=t):t=e[0],t}function xt(e){switch(e){case`active`:return`bg-emerald-500/15 text-emerald-700 dark:text-emerald-400`;case`connecting`:return`bg-amber-500/15 text-amber-700 dark:text-amber-400`;default:return`bg-surface-hover text-fg-muted`}}function St(e){let t=(0,Z.c)(5),{label:n,kind:r}=e,i;t[0]===r?i=t[1]:(i=o(`rounded-full px-2 py-0.5 text-[11px] font-medium`,xt(r)),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,$.jsx)(`span`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function Ct(e){let t=(0,Z.c)(32),{onOpenTab:n}=e,r=p(Et),i;t[0]===r?i=t[1]:(i=l(r),t[0]=r,t[1]=i);let a=i.remoteAccess.guide,s=!!m(Tt),c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c={refreshInterval:3e4},t[2]=c):c=t[2];let{data:u}=v(s?`exposure-status`:null,lt,c),d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d={refreshInterval:15e3},t[3]=d):d=t[3];let{data:f}=v(s?`tunnel-status`:null,Y,d),h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h={refreshInterval:6e4},t[4]=h):h=t[4];let{data:g}=v(s?`tunnel-pair-context`:null,U,h);if(!s)return null;let _=u?.tailscale.active===!0,y=f?.state,x=f?.enabled&&y===`connected`,S=f?.enabled&&(y===`connecting`||y===`reconnecting`||!!f?.startProgress||!!f?.frpcDownload),C=(g?.candidates??[]).some(wt),T=_?`active`:`off`,E=_?a.statusActive:a.statusOff,D;t[5]!==a.tailscaleCardTitle||t[6]!==T||t[7]!==E?(D={tab:`tailscale`,icon:se,title:a.tailscaleCardTitle,kind:T,statusLabel:E},t[5]=a.tailscaleCardTitle,t[6]=T,t[7]=E,t[8]=D):D=t[8];let k=x?`active`:S?`connecting`:`off`,A=x?a.statusActive:S?a.statusConnecting:a.statusOff,j;t[9]!==a.publicCardTitle||t[10]!==k||t[11]!==A?(j={tab:`public`,icon:O,title:a.publicCardTitle,kind:k,statusLabel:A},t[9]=a.publicCardTitle,t[10]=k,t[11]=A,t[12]=j):j=t[12];let M=C?`active`:`off`,P=C?a.statusActive:a.statusOff,F;t[13]!==a.reverseProxyCardTitle||t[14]!==M||t[15]!==P?(F={tab:`reverse-proxy`,icon:w,title:a.reverseProxyCardTitle,kind:M,statusLabel:P},t[13]=a.reverseProxyCardTitle,t[14]=M,t[15]=P,t[16]=F):F=t[16];let I;t[17]!==a.sshCardStatus||t[18]!==a.sshCardTitle?(I={tab:`ssh`,icon:N,title:a.sshCardTitle,kind:`off`,statusLabel:a.sshCardStatus},t[17]=a.sshCardStatus,t[18]=a.sshCardTitle,t[19]=I):I=t[19];let L;t[20]!==a.lanCardStatus||t[21]!==a.lanCardTitle?(L={tab:`lan`,icon:b,title:a.lanCardTitle,kind:`off`,statusLabel:a.lanCardStatus},t[20]=a.lanCardStatus,t[21]=a.lanCardTitle,t[22]=L):L=t[22];let R;t[23]!==j||t[24]!==F||t[25]!==I||t[26]!==L||t[27]!==D?(R=[D,j,F,I,L],t[23]=j,t[24]=F,t[25]=I,t[26]=L,t[27]=D,t[28]=R):R=t[28];let z=R,B;return t[29]!==z||t[30]!==n?(B=(0,$.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5`,children:z.map(e=>{let t=e.icon;return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>n(e.tab),className:o(`flex items-start gap-3 rounded-xl bg-surface-base px-3 py-2.5 text-left shadow-surface transition-colors`,`hover:bg-surface-hover/50`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`),children:[(0,$.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-surface-hover/90 text-fg-muted`,children:(0,$.jsx)(t,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0})}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`span`,{className:`block truncate text-sm font-medium text-fg`,children:e.title}),(0,$.jsx)(St,{label:e.statusLabel,kind:e.kind})]})]},`${e.tab}-${e.title}`)})}),t[29]=z,t[30]=n,t[31]=B):B=t[31],B}function wt(e){return e.kind===`reverse-proxy`}function Tt(e){return e.token}function Et(e){return e.language}function Dt(e){let t=(0,Z.c)(26),{title:n,description:r,recommended:i,icon:a,onOpen:s,openLabel:c,recommendedLabel:l}=e,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=o(`group flex w-full flex-col rounded-2xl bg-surface-base px-4 py-4 text-left transition-colors`,`hover:bg-surface-hover/40`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`),t[0]=u):u=t[0];let d;t[1]===a?d=t[2]:(d=(0,$.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-hover/90 text-fg-muted`,children:(0,$.jsx)(a,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0})}),t[1]=a,t[2]=d);let f;t[3]===n?f=t[4]:(f=(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:n}),t[3]=n,t[4]=f);let p;t[5]!==i||t[6]!==l?(p=i&&l?(0,$.jsx)(`span`,{className:`rounded-full bg-accent-soft px-2 py-0.5 text-[11px] font-medium text-accent-fg`,children:l}):null,t[5]=i,t[6]=l,t[7]=p):p=t[7];let m;t[8]!==f||t[9]!==p?(m=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[f,p]}),t[8]=f,t[9]=p,t[10]=m):m=t[10];let h;t[11]===r?h=t[12]:(h=(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-fg-muted`,children:r}),t[11]=r,t[12]=h);let g;t[13]!==m||t[14]!==h?(g=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[m,h]}),t[13]=m,t[14]=h,t[15]=g):g=t[15];let _;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(y,{className:`mt-0.5 size-4 shrink-0 text-fg-subtle transition-transform group-hover:translate-x-0.5`,"aria-hidden":!0}),t[16]=_):_=t[16];let v;t[17]!==d||t[18]!==g?(v=(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[d,g,_]}),t[17]=d,t[18]=g,t[19]=v):v=t[19];let b;t[20]===c?b=t[21]:(b=(0,$.jsx)(`span`,{className:`mt-3 text-xs font-medium text-accent`,children:c}),t[20]=c,t[21]=b);let x;return t[22]!==s||t[23]!==b||t[24]!==v?(x=(0,$.jsxs)(`button`,{type:`button`,onClick:s,className:u,children:[v,b]}),t[22]=s,t[23]=b,t[24]=v,t[25]=x):x=t[25],x}function Ot(e){let t=(0,Z.c)(83),{onOpenTab:n}=e,r=p(jt),i;t[0]===r?i=t[1]:(i=l(r),t[0]=r,t[1]=i);let a=i.remoteAccess,o=a.guide,s=!!m(At),c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c={refreshInterval:3e4},t[2]=c):c=t[2];let{data:u}=v(s?`exposure-status`:null,lt,c),d;t[3]===u?.conflicts?d=t[4]:(d=u?.conflicts??[],t[3]=u?.conflicts,t[4]=d);let f=d;if(!s){let e;return t[5]===o.needToken?e=t[6]:(e=(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:o.needToken}),t[5]=o.needToken,t[6]=e),e}let h;t[7]===n?h=t[8]:(h=(0,$.jsx)(Ct,{onOpenTab:n}),t[7]=n,t[8]=h);let g;t[9]!==f||t[10]!==o.conflictsHint||t[11]!==o.conflictsTitle?(g=f.length>0?(0,$.jsxs)(`div`,{className:`rounded-xl border border-amber-500/30 bg-amber-500/5 px-4 py-3 text-sm text-fg-muted`,children:[(0,$.jsx)(`p`,{className:`font-medium text-fg`,children:o.conflictsTitle}),(0,$.jsx)(`p`,{className:`mt-1`,children:o.conflictsHint}),(0,$.jsx)(`ul`,{className:`mt-2 list-inside list-disc text-xs`,children:f.map(kt)})]}):null,t[9]=f,t[10]=o.conflictsHint,t[11]=o.conflictsTitle,t[12]=g):g=t[12];let _;t[13]===o.pickMethod?_=t[14]:(_=(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:o.pickMethod}),t[13]=o.pickMethod,t[14]=_);let y;t[15]===n?y=t[16]:(y=()=>n(`tailscale`),t[15]=n,t[16]=y);let x;t[17]!==o.configure||t[18]!==o.recommended||t[19]!==o.tailscaleCardDesc||t[20]!==o.tailscaleCardTitle||t[21]!==y?(x=(0,$.jsx)(Dt,{icon:se,title:o.tailscaleCardTitle,description:o.tailscaleCardDesc,recommended:!0,recommendedLabel:o.recommended,openLabel:o.configure,onOpen:y}),t[17]=o.configure,t[18]=o.recommended,t[19]=o.tailscaleCardDesc,t[20]=o.tailscaleCardTitle,t[21]=y,t[22]=x):x=t[22];let S;t[23]===n?S=t[24]:(S=()=>n(`public`),t[23]=n,t[24]=S);let C;t[25]!==o.configure||t[26]!==o.publicCardDesc||t[27]!==o.publicCardTitle||t[28]!==S?(C=(0,$.jsx)(Dt,{icon:O,title:o.publicCardTitle,description:o.publicCardDesc,openLabel:o.configure,onOpen:S}),t[25]=o.configure,t[26]=o.publicCardDesc,t[27]=o.publicCardTitle,t[28]=S,t[29]=C):C=t[29];let T;t[30]===n?T=t[31]:(T=()=>n(`reverse-proxy`),t[30]=n,t[31]=T);let E;t[32]!==o.configure||t[33]!==o.reverseProxyCardDesc||t[34]!==o.reverseProxyCardTitle||t[35]!==T?(E=(0,$.jsx)(Dt,{icon:w,title:o.reverseProxyCardTitle,description:o.reverseProxyCardDesc,openLabel:o.configure,onOpen:T}),t[32]=o.configure,t[33]=o.reverseProxyCardDesc,t[34]=o.reverseProxyCardTitle,t[35]=T,t[36]=E):E=t[36];let D;t[37]===n?D=t[38]:(D=()=>n(`ssh`),t[37]=n,t[38]=D);let k;t[39]!==o.configure||t[40]!==o.sshCardDesc||t[41]!==o.sshCardTitle||t[42]!==D?(k=(0,$.jsx)(Dt,{icon:N,title:o.sshCardTitle,description:o.sshCardDesc,openLabel:o.configure,onOpen:D}),t[39]=o.configure,t[40]=o.sshCardDesc,t[41]=o.sshCardTitle,t[42]=D,t[43]=k):k=t[43];let A;t[44]===n?A=t[45]:(A=()=>n(`lan`),t[44]=n,t[45]=A);let j;t[46]!==o.configure||t[47]!==o.lanCardDesc||t[48]!==o.lanCardTitle||t[49]!==A?(j=(0,$.jsx)(Dt,{icon:b,title:o.lanCardTitle,description:o.lanCardDesc,openLabel:o.configure,onOpen:A}),t[46]=o.configure,t[47]=o.lanCardDesc,t[48]=o.lanCardTitle,t[49]=A,t[50]=j):j=t[50];let M;t[51]!==C||t[52]!==E||t[53]!==k||t[54]!==j||t[55]!==x?(M=(0,$.jsxs)(`div`,{className:`mt-3 grid gap-3 lg:grid-cols-2`,children:[x,C,E,k,j]}),t[51]=C,t[52]=E,t[53]=k,t[54]=j,t[55]=x,t[56]=M):M=t[56];let P;t[57]!==M||t[58]!==_?(P=(0,$.jsxs)(`div`,{children:[_,M]}),t[57]=M,t[58]=_,t[59]=P):P=t[59];let F;t[60]===o.oneAtATimeHint?F=t[61]:(F=(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-fg-subtle`,children:o.oneAtATimeHint}),t[60]=o.oneAtATimeHint,t[61]=F);let I;t[62]===a.advanced.proxyTitle?I=t[63]:(I=(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:a.advanced.proxyTitle}),t[62]=a.advanced.proxyTitle,t[63]=I);let L;t[64]===a.advanced.proxyBody?L=t[65]:(L=(0,$.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:a.advanced.proxyBody}),t[64]=a.advanced.proxyBody,t[65]=L);let R;t[66]!==r||t[67]!==a.advanced.proxyDocs?(R=(0,$.jsx)($e,{language:r,label:a.advanced.proxyDocs,section:`advanced`,className:`mt-2`}),t[66]=r,t[67]=a.advanced.proxyDocs,t[68]=R):R=t[68];let z;t[69]!==I||t[70]!==L||t[71]!==R?(z=(0,$.jsxs)(`div`,{className:`rounded-xl bg-surface-base px-4 py-3`,children:[I,L,R]}),t[69]=I,t[70]=L,t[71]=R,t[72]=z):z=t[72];let B;t[73]!==o.docsLink||t[74]!==r?(B=(0,$.jsx)($e,{language:r,label:o.docsLink}),t[73]=o.docsLink,t[74]=r,t[75]=B):B=t[75];let V;return t[76]!==P||t[77]!==F||t[78]!==z||t[79]!==B||t[80]!==h||t[81]!==g?(V=(0,$.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[h,g,P,F,z,B]}),t[76]=P,t[77]=F,t[78]=z,t[79]=B,t[80]=h,t[81]=g,t[82]=V):V=t[82],V}function kt(e){return(0,$.jsx)(`li`,{children:e.message},e.code)}function At(e){return e.token}function jt(e){return e.language}async function Mt(e){let t=await g(u(`/api/tunnel/pair/probe-public`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e})});if(!t.ok&&t.status!==400)throw Error(`Probe failed (${t.status})`);return await t.json()}async function Nt(e){await f(u(`/api/config`),{method:`PATCH`,body:JSON.stringify({gateway:{publicUrl:e??null}})})}function Pt(e){let t=e.split(`.`).map(e=>Number.parseInt(e,10));if(t.length!==4||t.some(e=>!Number.isFinite(e)))return!1;let[n,r]=t;return n===10||n===127||n===169&&r===254||n===172&&r>=16&&r<=31||n===192&&r===168||n===100&&r>=64&&r<=127}function Ft(){return(0,Q.useMemo)(()=>{if(typeof window>`u`)return null;let{protocol:e,hostname:t,origin:n}=window.location;if(e!==`https:`&&e!==`http:`)return null;let r=t.toLowerCase();return!r||r===`localhost`||r===`127.0.0.1`||r===`::1`||r===`[::1]`||r.endsWith(`.local`)||r.endsWith(`.localhost`)||Pt(r)?null:n.toLowerCase().replace(/\/+$/,``)},[])}function It(){return o(`w-full rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg`,`placeholder:text-fg-subtle`,X,`dark:border-edge`)}function Lt(e){return(e?.candidates.find(e=>e.kind===`reverse-proxy`))?.url?.trim()||null}function Rt(e){return(e?.candidates.find(e=>e.kind===`lan`&&e.reachable))?.url?.trim()||null}function zt(){let e=p(e=>e.language),t=l(e).remoteAccess.reverseProxy,n=!!m(e=>e.token),r=Ft(),{mutate:i}=_(),{data:a,mutate:s}=v(n?`tunnel-pair-context`:null,U,{refreshInterval:6e4}),c=Lt(a),[u,f]=(0,Q.useState)(``),[h,g]=(0,Q.useState)({busy:!1,result:null}),[y,b]=(0,Q.useState)({busy:!1,error:null});(0,Q.useEffect)(()=>{u||(c?f(c):r&&f(r))},[c,r,u]);let x=(0,Q.useMemo)(()=>u.trim()||(c??r??``),[c,r,u]),S=!c&&!!r&&x===r,C=Rt(a),{data:w,mutate:T}=v(n&&x?[`reverse-proxy-pair`,x]:null,()=>de(),{refreshInterval:4*6e4,revalidateOnFocus:!1}),E=(0,Q.useMemo)(()=>!x||!w?.pairingSecret?``:d({baseUrl:x,pairingSecret:w.pairingSecret,lanUrl:C}),[x,C,w?.pairingSecret]),D=A(()=>nt(E),[E],{enabled:!!E,initial:null,errorData:null}),O=(0,Q.useCallback)(async()=>{let e=u.trim()||x;if(e){g({busy:!0,result:null});try{g({busy:!1,result:await Mt(e)})}catch(e){g({busy:!1,result:{ok:!1,code:`NETWORK_ERROR`,message:e instanceof Error?e.message:String(e)}})}}},[u,x]),k=(0,Q.useCallback)(async()=>{let e=x.trim();if(e){b({busy:!0,error:null});try{await Nt(e),await s(),await i(`tunnel-pair-context`),b({busy:!1,error:null})}catch(e){b({busy:!1,error:e instanceof Error?e.message:String(e)})}}},[x,i,s]),j=(0,Q.useCallback)(async()=>{b({busy:!0,error:null});try{await Nt(null),await s(),await i(`tunnel-pair-context`),f(``),g({busy:!1,result:null}),b({busy:!1,error:null})}catch(e){b({busy:!1,error:e instanceof Error?e.message:String(e)})}},[i,s]),M=(0,Q.useCallback)(async()=>{await T()},[T]);return n?(0,$.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,$.jsxs)(Se,{children:[(0,$.jsx)(be,{icon:se,title:t.title,subtitle:t.subtitle}),(0,$.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,$.jsx)(`label`,{className:`text-sm font-medium text-fg`,htmlFor:`reverse-proxy-url`,children:t.urlLabel}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-stretch`,children:[(0,$.jsx)(`input`,{id:`reverse-proxy-url`,className:o(It(),`font-mono text-xs sm:flex-1 sm:min-w-0 sm:w-auto`),type:`text`,autoComplete:`off`,spellCheck:!1,placeholder:t.urlPlaceholder,value:u,onChange:e=>{f(e.target.value),g({busy:!1,result:null})}}),(0,$.jsxs)(W,{type:`button`,variant:`secondary`,className:`shrink-0 whitespace-nowrap`,onClick:()=>void O(),disabled:h.busy||!u.trim(),children:[h.busy?(0,$.jsx)(me,{className:`size-3.5 animate-spin`}):null,h.busy?t.probing:t.probeButton]})]}),(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:t.urlHint}),S&&r?(0,$.jsxs)(`div`,{className:`rounded-lg border border-accent/40 bg-accent-soft/50 px-3 py-2 text-xs leading-relaxed text-accent-fg`,children:[(0,$.jsx)(`div`,{className:`font-medium`,children:t.autoDetectedTitle}),(0,$.jsx)(`div`,{className:`mt-1 break-all font-mono text-[11px]`,children:r}),(0,$.jsx)(`p`,{className:`mt-1`,children:t.autoDetectedHint})]}):null,h.result?(0,$.jsx)(Bt,{result:h.result,labels:t.probeStatus}):null,(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[x&&c!==x?(0,$.jsxs)(W,{type:`button`,onClick:()=>void k(),disabled:y.busy,children:[y.busy?(0,$.jsx)(me,{className:`size-3.5 animate-spin`}):null,y.busy?t.saving:t.saveAsDefault]}):null,c?(0,$.jsx)(W,{type:`button`,variant:`ghost`,onClick:()=>void j(),disabled:y.busy,children:t.clear}):null]}),y.error?(0,$.jsx)(`p`,{className:`text-xs text-red-800 dark:text-red-200`,children:y.error}):null,(0,$.jsx)(`div`,{className:`rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-xs leading-relaxed text-amber-950 dark:border-amber-800/60 dark:bg-amber-950/30 dark:text-amber-100`,children:t.certWarning})]})]}),(0,$.jsxs)(Se,{children:[(0,$.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-start justify-between gap-2`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:t.qrTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:t.qrSubtitle})]}),E?(0,$.jsxs)(W,{type:`button`,variant:`ghost`,className:`shrink-0`,onClick:()=>void M(),children:[(0,$.jsx)(B,{className:`size-4`}),t.refreshQr]}):null]}),x?w?.pairingSecret?(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-3 sm:items-start`,children:[(0,$.jsxs)(`div`,{className:`break-all font-mono text-[11px] text-fg-muted`,children:[(0,$.jsx)(`span`,{className:`font-medium text-fg`,children:`baseUrl:`}),` `,x,C?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`br`,{}),(0,$.jsx)(`span`,{className:`font-medium text-fg`,children:`lanUrl:`}),` `,C]}):null]}),D.data?(0,$.jsx)(`img`,{src:D.data,alt:``,className:`size-56 rounded-lg border border-edge-subtle bg-white object-contain p-3 dark:border-edge`}):D.loading?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.encoding}):null,(0,$.jsx)(he,{text:E,labels:{copy:t.copyLink,copied:t.copied,copyFailed:l(e).clipboard.copyFailed}})]}):(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.mintingSecret}):(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noUrlYet})]})]}):null}function Bt(e){let t=(0,Z.c)(18),{result:n,labels:r}=e;if(n.ok){let e;t[0]===r.ok?e=t[1]:(e=(0,$.jsx)(`span`,{className:`font-medium`,children:r.ok}),t[0]=r.ok,t[1]=e);let i;t[2]===n.latencyMs?i=t[3]:(i=(0,$.jsxs)(`span`,{className:`font-mono`,children:[n.latencyMs,`ms`]}),t[2]=n.latencyMs,t[3]=i);let a;t[4]!==r.mobileReady||t[5]!==n.mobilePairing?(a=n.mobilePairing?(0,$.jsxs)($.Fragment,{children:[` · `,(0,$.jsx)(`span`,{children:r.mobileReady})]}):null,t[4]=r.mobileReady,t[5]=n.mobilePairing,t[6]=a):a=t[6];let o;return t[7]!==e||t[8]!==i||t[9]!==a?(o=(0,$.jsxs)(`div`,{className:`rounded-lg border border-emerald-200 bg-emerald-50 px-3 py-2 text-xs text-emerald-900 dark:border-emerald-800/60 dark:bg-emerald-950/30 dark:text-emerald-100`,children:[e,` · `,i,a]}),t[7]=e,t[8]=i,t[9]=a,t[10]=o):o=t[10],o}let i=r[`code_${n.code}`]??r.codeUnknown,a;t[11]===i?a=t[12]:(a=(0,$.jsx)(`span`,{className:`font-medium`,children:i}),t[11]=i,t[12]=a);let o;t[13]===n.message?o=t[14]:(o=n.message?(0,$.jsxs)($.Fragment,{children:[` — `,(0,$.jsx)(`span`,{className:`font-mono break-all`,children:n.message})]}):null,t[13]=n.message,t[14]=o);let s;return t[15]!==a||t[16]!==o?(s=(0,$.jsxs)(`div`,{className:`rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-900 dark:border-red-800/60 dark:bg-red-950/30 dark:text-red-100`,children:[a,o]}),t[15]=a,t[16]=o,t[17]=s):s=t[17],s}var Vt=[`guide`,`tailscale`,`public`,`reverse-proxy`,`ssh`,`lan`];function Ht(e){return e&&Vt.includes(e)?e:`guide`}function Ut(e,t){return e.tabs[t]}function Wt(e,t){return e.tabIntro[t]}function Gt(e){switch(e){case`tailscale`:return`tailscale-serve`;case`public`:return`public-tunnel`;case`reverse-proxy`:return`reverse-proxy`;case`ssh`:return`ssh-tunnel`;case`lan`:return`lan`;default:return}}function Kt(e){let t=(0,Z.c)(7),{tab:n,onOpenTab:r}=e;switch(n){case`guide`:{let e;return t[0]===r?e=t[1]:(e=(0,$.jsx)(Ot,{onOpenTab:r}),t[0]=r,t[1]=e),e}case`tailscale`:{let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(mt,{embedded:!0}),t[2]=e):e=t[2],e}case`public`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(ct,{embedded:!0}),t[3]=e):e=t[3],e}case`reverse-proxy`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(zt,{}),t[4]=e):e=t[4],e}case`ssh`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(bt,{}),t[5]=e):e=t[5],e}case`lan`:{let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(ht,{}),t[6]=e):e=t[6],e}}}function qt(){let e=(0,Z.c)(2),t=p(Yt),n=l(t).remoteAccess,r=!!m(Jt),[a,o]=i(),s=Ht(a.get(`tab`)),c;e[0]===o?c=e[1]:(c=e=>{o(t=>{let n=new URLSearchParams(t);return e===`guide`?n.delete(`tab`):n.set(`tab`,e),n},{replace:!0})},e[0]=o,e[1]=c);let u=c,d=Wt(n,s),f=Vt.map(e=>({id:e,label:Ut(n,e)}));return(0,$.jsxs)(ve,{children:[(0,$.jsx)(ge,{title:n.pageTitle,subtitle:n.pageSubtitle,meta:(0,$.jsx)($e,{language:t,label:n.docsLink,section:Gt(s),className:`mt-1`})}),r?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(we,{items:f,activeTab:s,onChange:u,ariaLabel:n.tabsAria,tabIdPrefix:`remote-access-tab`,panelIdPrefix:`remote-access-panel`}),(0,$.jsx)(_e,{id:s,activeTab:s,tabIdPrefix:`remote-access-tab`,panelIdPrefix:`remote-access-panel`,title:Ut(n,s),hint:s===`public`?void 0:d,children:(0,$.jsx)(Kt,{tab:s,onOpenTab:u})})]}):(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:n.guide.needToken})]})}function Jt(e){return e.token}function Yt(e){return e.language}export{qt as RemoteAccessHub};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./cn-BQ_8x0bT.js";import{t as a}from"./messages-t1yPaVCt.js";import{n as o,u as s}from"./locale-store-BneNAR8R.js";import{hs as c,zc as l}from"./index-CH7XN6KY.js";var u=e(t(),1);function d(e,t){let n=!1,r=0,i=t;for(let t of e.values())t.dirty&&(n=!0,r+=1),t.saving&&(i=!0);return{anyDirty:n,dirtyCount:r,anySaving:i}}var f=s((e,t)=>({sections:new Map,saveAllInFlight:!1,anyDirty:!1,dirtyCount:0,anySaving:!1,registerSection:t=>{e(e=>{let n=new Map(e.sections);return n.set(t.id,t),{sections:n,...d(n,e.saveAllInFlight)}})},unregisterSection:t=>{e(e=>{if(!e.sections.has(t))return e;let n=new Map(e.sections);return n.delete(t),{sections:n,...d(n,e.saveAllInFlight)}})},saveAll:async()=>{let n=Array.from(t().sections.values()).filter(e=>e.dirty);if(n.length===0)return{ok:!0,saved:0,failures:[]};e(e=>({saveAllInFlight:!0,...d(e.sections,!0)}));let r=[],i=0;try{let e=await Promise.all(n.map(async e=>{try{let t=await e.save();return{id:e.id,result:t}}catch(t){return{id:e.id,result:{ok:!1,error:t instanceof Error?t.message:String(t)}}}}));for(let{id:t,result:n}of e)n.ok?i+=1:r.push({id:t,error:n.error??`Save failed`})}finally{e(e=>({saveAllInFlight:!1,...d(e.sections,!1)}))}return{ok:r.length===0,saved:i,failures:r}},discardAll:()=>{for(let e of t().sections.values())e.dirty&&e.discard()}}));function p({id:e,dirty:t,saving:n,save:r,discard:i}){let a=(0,u.useRef)(r),o=(0,u.useRef)(i);a.current=r,o.current=i;let s=f(e=>e.registerSection),c=f(e=>e.unregisterSection);(0,u.useEffect)(()=>(s({id:e,dirty:t,saving:n,save:async()=>{try{return await a.current(),{ok:!0}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}},discard:()=>o.current()}),()=>c(e)),[e,t,n,s,c])}var m=n(),h=r();function g(){let e=(0,m.c)(26),t=a(o(S)).modelsHub.saveBar,n=f(x),r=f(b),s=f(y),d=f(v),p=f(_),g;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=[],e[0]=g):g=e[0];let[C,w]=(0,u.useState)(g),[T,E]=(0,u.useState)(!1);if(!n&&C.length===0&&!T)return null;let D;e[1]===d?D=e[2]:(D=async()=>{w([]),E(!1);let e=await d();e.ok&&e.saved>0?(E(!0),window.setTimeout(()=>E(!1),2500)):e.ok||w(e.failures)},e[1]=d,e[2]=D);let O=D,k;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(k=i(`sticky top-0 z-10 -mx-4 flex flex-col gap-2 border-b border-edge-subtle bg-surface-base/85 px-4 py-2 backdrop-blur`,`sm:flex-row sm:items-center sm:justify-between`),e[3]=k):k=e[3];let A=C.length>0?(0,h.jsx)(`span`,{className:`text-xs text-red-600 dark:text-red-400`,role:`alert`,children:t.failuresSummary.replace(`{{count}}`,String(C.length))}):null,j=!n||r,M;e[4]===p?M=e[5]:(M=()=>p(),e[4]=p,e[5]=M);let N;e[6]!==t.discardAll||e[7]!==j||e[8]!==M?(N=(0,h.jsx)(c,{type:`button`,variant:`secondary`,className:`px-2.5 py-1.5 text-xs`,disabled:j,onClick:M,children:t.discardAll}),e[6]=t.discardAll,e[7]=j,e[8]=M,e[9]=N):N=e[9];let P=!n||r,F;e[10]===O?F=e[11]:(F=()=>void O(),e[10]=O,e[11]=F);let I;e[12]===r?I=e[13]:(I=r?(0,h.jsx)(l,{className:`size-3.5 animate-spin`,"aria-hidden":!0}):null,e[12]=r,e[13]=I);let L=r?`ml-1.5`:void 0,R;e[14]!==t.saveAll||e[15]!==L?(R=(0,h.jsx)(`span`,{className:L,children:t.saveAll}),e[14]=t.saveAll,e[15]=L,e[16]=R):R=e[16];let z;e[17]!==I||e[18]!==R||e[19]!==P||e[20]!==F?(z=(0,h.jsxs)(c,{type:`button`,variant:`primary`,className:`px-2.5 py-1.5 text-xs`,disabled:P,onClick:F,children:[I,R]}),e[17]=I,e[18]=R,e[19]=P,e[20]=F,e[21]=z):z=e[21];let B;return e[22]!==z||e[23]!==A||e[24]!==N?(B=(0,h.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:[A,N,z]}),e[22]=z,e[23]=A,e[24]=N,e[25]=B):B=e[25],(0,h.jsxs)(`div`,{className:k,role:`region`,"aria-label":t.title,children:[(0,h.jsx)(`p`,{className:`text-xs text-fg-muted`,children:n?t.dirtySummary.replace(`{{count}}`,String(s)):T?t.savedSummary:t.cleanSummary}),B]})}function _(e){return e.discardAll}function v(e){return e.saveAll}function y(e){return e.dirtyCount}function b(e){return e.anySaving}function x(e){return e.anyDirty}function S(e){return e.language}export{p as n,g as t};
1
+ import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./cn-BQ_8x0bT.js";import{t as a}from"./messages-BH7paqYt.js";import{n as o,u as s}from"./locale-store-BvcHGPHU.js";import{hs as c,zc as l}from"./index-IPmCli0N.js";var u=e(t(),1);function d(e,t){let n=!1,r=0,i=t;for(let t of e.values())t.dirty&&(n=!0,r+=1),t.saving&&(i=!0);return{anyDirty:n,dirtyCount:r,anySaving:i}}var f=s((e,t)=>({sections:new Map,saveAllInFlight:!1,anyDirty:!1,dirtyCount:0,anySaving:!1,registerSection:t=>{e(e=>{let n=new Map(e.sections);return n.set(t.id,t),{sections:n,...d(n,e.saveAllInFlight)}})},unregisterSection:t=>{e(e=>{if(!e.sections.has(t))return e;let n=new Map(e.sections);return n.delete(t),{sections:n,...d(n,e.saveAllInFlight)}})},saveAll:async()=>{let n=Array.from(t().sections.values()).filter(e=>e.dirty);if(n.length===0)return{ok:!0,saved:0,failures:[]};e(e=>({saveAllInFlight:!0,...d(e.sections,!0)}));let r=[],i=0;try{let e=await Promise.all(n.map(async e=>{try{let t=await e.save();return{id:e.id,result:t}}catch(t){return{id:e.id,result:{ok:!1,error:t instanceof Error?t.message:String(t)}}}}));for(let{id:t,result:n}of e)n.ok?i+=1:r.push({id:t,error:n.error??`Save failed`})}finally{e(e=>({saveAllInFlight:!1,...d(e.sections,!1)}))}return{ok:r.length===0,saved:i,failures:r}},discardAll:()=>{for(let e of t().sections.values())e.dirty&&e.discard()}}));function p({id:e,dirty:t,saving:n,save:r,discard:i}){let a=(0,u.useRef)(r),o=(0,u.useRef)(i);a.current=r,o.current=i;let s=f(e=>e.registerSection),c=f(e=>e.unregisterSection);(0,u.useEffect)(()=>(s({id:e,dirty:t,saving:n,save:async()=>{try{return await a.current(),{ok:!0}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}},discard:()=>o.current()}),()=>c(e)),[e,t,n,s,c])}var m=n(),h=r();function g(){let e=(0,m.c)(26),t=a(o(S)).modelsHub.saveBar,n=f(x),r=f(b),s=f(y),d=f(v),p=f(_),g;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=[],e[0]=g):g=e[0];let[C,w]=(0,u.useState)(g),[T,E]=(0,u.useState)(!1);if(!n&&C.length===0&&!T)return null;let D;e[1]===d?D=e[2]:(D=async()=>{w([]),E(!1);let e=await d();e.ok&&e.saved>0?(E(!0),window.setTimeout(()=>E(!1),2500)):e.ok||w(e.failures)},e[1]=d,e[2]=D);let O=D,k;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(k=i(`sticky top-0 z-10 -mx-4 flex flex-col gap-2 border-b border-edge-subtle bg-surface-base/85 px-4 py-2 backdrop-blur`,`sm:flex-row sm:items-center sm:justify-between`),e[3]=k):k=e[3];let A=C.length>0?(0,h.jsx)(`span`,{className:`text-xs text-red-600 dark:text-red-400`,role:`alert`,children:t.failuresSummary.replace(`{{count}}`,String(C.length))}):null,j=!n||r,M;e[4]===p?M=e[5]:(M=()=>p(),e[4]=p,e[5]=M);let N;e[6]!==t.discardAll||e[7]!==j||e[8]!==M?(N=(0,h.jsx)(c,{type:`button`,variant:`secondary`,className:`px-2.5 py-1.5 text-xs`,disabled:j,onClick:M,children:t.discardAll}),e[6]=t.discardAll,e[7]=j,e[8]=M,e[9]=N):N=e[9];let P=!n||r,F;e[10]===O?F=e[11]:(F=()=>void O(),e[10]=O,e[11]=F);let I;e[12]===r?I=e[13]:(I=r?(0,h.jsx)(l,{className:`size-3.5 animate-spin`,"aria-hidden":!0}):null,e[12]=r,e[13]=I);let L=r?`ml-1.5`:void 0,R;e[14]!==t.saveAll||e[15]!==L?(R=(0,h.jsx)(`span`,{className:L,children:t.saveAll}),e[14]=t.saveAll,e[15]=L,e[16]=R):R=e[16];let z;e[17]!==I||e[18]!==R||e[19]!==P||e[20]!==F?(z=(0,h.jsxs)(c,{type:`button`,variant:`primary`,className:`px-2.5 py-1.5 text-xs`,disabled:P,onClick:F,children:[I,R]}),e[17]=I,e[18]=R,e[19]=P,e[20]=F,e[21]=z):z=e[21];let B;return e[22]!==z||e[23]!==A||e[24]!==N?(B=(0,h.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:[A,N,z]}),e[22]=z,e[23]=A,e[24]=N,e[25]=B):B=e[25],(0,h.jsxs)(`div`,{className:k,role:`region`,"aria-label":t.title,children:[(0,h.jsx)(`p`,{className:`text-xs text-fg-muted`,children:n?t.dirtySummary.replace(`{{count}}`,String(s)):T?t.savedSummary:t.cleanSummary}),B]})}function _(e){return e.discardAll}function v(e){return e.saveAll}function y(e){return e.dirtyCount}function b(e){return e.anySaving}function x(e){return e.anyDirty}function S(e){return e.language}export{p as n,g as t};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./cn-BQ_8x0bT.js";import{Go as a,ds as o,hs as s,ps as c,qo as l}from"./index-CH7XN6KY.js";import{n as u,t as d}from"./cron-expression-B3B1eqnr.js";var f=n(),p=e(t(),1),m=r(),h=Array.from({length:60},(e,t)=>t),g=i(c,`min-w-0 shrink text-xs sm:min-w-[7rem] sm:max-w-[11rem]`),_=i(`h-9 min-w-[6.5rem] shrink-0 rounded-lg border border-edge-subtle bg-surface-panel px-2 py-1.5 text-sm text-fg`,o,`dark:bg-surface-panel`),v=i(`h-9 min-w-[9.5rem] shrink-0 rounded-lg border border-edge-subtle bg-surface-panel px-2 py-1.5 text-sm text-fg`,o),y=i(`h-9 w-14 shrink-0 rounded-lg border border-edge-subtle bg-surface-panel px-2 py-1.5 text-center text-sm tabular-nums text-fg`,o),b=i(`min-h-[2.5rem] w-full rounded-lg border border-edge-subtle bg-surface-base px-3 py-2 font-mono text-xs text-fg`,o);function x(e){return{...e,intervalMinutesDraft:null,intervalHoursDraft:null}}function S(e){let{intervalMinutesDraft:t,intervalHoursDraft:n,...r}=e;return r}function C(e,t){switch(t.type){case`reset`:return x(t.state);case`replace`:return t.state}}function w({value:e,onChange:t,labels:n,disabled:r,showHeading:o=!0}){let s=(0,p.useMemo)(()=>u(e),[e]),[c,f]=(0,p.useReducer)(C,s,x),w=(0,p.useRef)(e);w.current!==e&&(w.current=e,f({type:`reset`,state:s}));let T=(0,p.useCallback)(e=>{let n={...c,...e};f({type:`replace`,state:n});let r=S(n),i=S(c);Object.keys(r).some(e=>r[e]!==i[e])&&t(d(r))},[t,c]),{mode:E,intervalKind:D,onceDate:O,intervalMinutes:k,intervalHours:A,minute:j,hour:M,weekDays:N,dayOfMonth:P,rawCron:F,intervalMinutesDraft:I,intervalHoursDraft:L}=c,R=`${String(M).padStart(2,`0`)}:${String(j).padStart(2,`0`)}`,z=e=>{let t=e.target.value;if(!t)return;let[n,r]=t.split(`:`).map(e=>parseInt(e,10));Number.isNaN(n)||Number.isNaN(r)||T({minute:r,hour:n})},B=(0,m.jsxs)(`div`,{className:`flex min-w-0 flex-nowrap items-center gap-2 overflow-x-auto pb-0.5`,children:[(0,m.jsxs)(a,{className:g,disabled:r,value:E,onChange:e=>{let t=e.target.value;T({mode:t})},"aria-label":n.scheduleTimeLabel,children:[(0,m.jsx)(l,{value:`no_repeat`,children:n.modeNoRepeat}),(0,m.jsx)(l,{value:`interval`,children:n.modeInterval}),(0,m.jsx)(l,{value:`hourly`,children:n.modeHourly}),(0,m.jsx)(l,{value:`daily`,children:n.modeDaily}),(0,m.jsx)(l,{value:`weekly`,children:n.modeWeekly}),(0,m.jsx)(l,{value:`monthly`,children:n.modeMonthly}),(0,m.jsx)(l,{value:`custom`,children:n.modeCustom})]}),E===`no_repeat`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`input`,{type:`date`,disabled:r,className:v,value:O,onChange:e=>{T({onceDate:e.target.value})},"aria-label":n.modeNoRepeat}),(0,m.jsx)(`input`,{type:`time`,step:60,disabled:r,className:_,value:R,onChange:z,"aria-label":n.scheduleTimeLabel})]}),E===`interval`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(a,{className:i(g,`w-auto min-w-[5rem]`),disabled:r,value:D,onChange:e=>{let t=e.target.value;T({intervalKind:t,intervalMinutesDraft:null,intervalHoursDraft:null})},"aria-label":n.modeInterval,children:[(0,m.jsx)(l,{value:`minutes`,children:n.intervalKindMinutes}),(0,m.jsx)(l,{value:`hours`,children:n.intervalKindHours})]}),D===`minutes`?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`input`,{type:`number`,min:1,max:59,disabled:r,className:y,value:I??String(k),onChange:e=>{let t=e.target.value,n=parseInt(t,10),r={intervalMinutesDraft:t};Number.isFinite(n)&&n>=1&&n<=59&&(r.intervalMinutes=n),T(r)},onBlur:()=>{if(I===null)return;let e=parseInt(I,10);T({intervalMinutes:!Number.isFinite(e)||e<1?5:Math.min(59,Math.max(1,Math.round(e))),intervalMinutesDraft:null})},"aria-label":n.intervalMinutes}),(0,m.jsx)(`span`,{className:`shrink-0 text-sm text-fg-muted`,children:n.minuteUnit})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`input`,{type:`number`,min:1,max:23,disabled:r,className:y,value:L??String(A),onChange:e=>{let t=e.target.value,n=parseInt(t,10),r={intervalHoursDraft:t};Number.isFinite(n)&&n>=1&&n<=23&&(r.intervalHours=n),T(r)},onBlur:()=>{if(L===null)return;let e=parseInt(L,10);T({intervalHours:!Number.isFinite(e)||e<1?2:Math.min(23,Math.max(1,Math.round(e))),intervalHoursDraft:null})},"aria-label":n.intervalHours}),(0,m.jsx)(`span`,{className:`shrink-0 text-sm text-fg-muted`,children:n.hourUnit}),(0,m.jsx)(a,{className:i(g,`w-auto min-w-[4rem]`),disabled:r,value:j,onChange:e=>{T({minute:parseInt(e.target.value,10)})},"aria-label":n.minuteAtHour,children:h.map(e=>(0,m.jsx)(l,{value:e,children:String(e).padStart(2,`0`)},e))}),(0,m.jsx)(`span`,{className:`shrink-0 text-sm text-fg-muted`,children:n.minuteUnit})]})]}),E===`daily`&&(0,m.jsx)(`input`,{type:`time`,step:60,disabled:r,className:_,value:R,onChange:z,"aria-label":n.scheduleTimeLabel}),E===`weekly`&&(0,m.jsx)(`input`,{type:`time`,step:60,disabled:r,className:_,value:R,onChange:z,"aria-label":n.scheduleTimeLabel}),E===`monthly`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a,{className:i(g,`w-auto min-w-[4.5rem]`),disabled:r,value:P,onChange:e=>{T({dayOfMonth:parseInt(e.target.value,10)})},"aria-label":n.dayOfMonth,children:Array.from({length:31},(e,t)=>t+1).map(e=>(0,m.jsx)(l,{value:e,children:e},e))}),(0,m.jsx)(`input`,{type:`time`,step:60,disabled:r,className:_,value:R,onChange:z,"aria-label":n.scheduleTimeLabel})]}),E===`hourly`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a,{className:i(g,`w-auto min-w-[4rem]`),disabled:r,value:j,onChange:e=>{T({minute:parseInt(e.target.value,10)})},"aria-label":n.minuteAtHour,children:h.map(e=>(0,m.jsx)(l,{value:e,children:String(e).padStart(2,`0`)},e))}),(0,m.jsx)(`span`,{className:`shrink-0 text-sm text-fg-muted`,children:n.minuteUnit})]})]}),V=E===`weekly`?(0,m.jsx)(`div`,{className:`flex flex-wrap gap-1.5 pt-1`,role:`group`,"aria-label":n.modeWeekly,children:n.weekdays.map((e,t)=>{let n=N[t];return(0,m.jsx)(`button`,{type:`button`,disabled:r,className:i(`flex size-9 select-none items-center justify-center rounded-full border text-xs font-medium transition-colors`,n?`border-fg bg-fg text-surface-panel`:`border-edge-subtle bg-surface-panel text-fg hover:border-edge`),"aria-pressed":n,onClick:()=>{let e=[...N];e[t]=!e[t],T({weekDays:e})},children:e},e)})}):null,H=E===`custom`?(0,m.jsxs)(`div`,{className:`pt-1`,children:[(0,m.jsx)(`textarea`,{disabled:r,className:b,rows:2,spellCheck:!1,value:F,placeholder:`*/5 * * * *`,onChange:e=>{T({rawCron:e.target.value})},"aria-label":n.modeCustom}),(0,m.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:n.customCronHint})]}):null;return(0,m.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o?(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:n.scheduleTimeLabel}):null,B,V,H]})}var T=[3e4,6e4,3e5,6e5,9e5,18e5,36e5,72e5],E=new Set(T),D=i(`h-9 min-w-0 flex-1 rounded-lg border border-edge-subtle bg-surface-panel px-2.5 py-1.5 text-sm tabular-nums text-fg`,o),O=i(c,`h-9 max-w-[11rem] shrink-0 text-xs sm:max-w-[12rem]`);function k(e,t){switch(e){case 3e4:return t.every30s;case 6e4:return t.every1min;case 3e5:return t.every5min;case 6e5:return t.every10min;case 9e5:return t.every15min;case 18e5:return t.every30min;case 36e5:return t.every1h;case 72e5:return t.every2h;default:return String(e)}}function A({valueMs:e,onChangeMs:t,labels:n,disabled:r,presets:i=T,minSeconds:o=1}){let s=(0,p.useMemo)(()=>new Set(i),[i]),c=(0,p.useMemo)(()=>s.has(e)?String(e):``,[s,e]),[u,d]=(0,p.useState)(null),f=(0,p.useRef)(e);f.current!==e&&(f.current=e,d(null));let h=Math.max(o,Math.round(e/1e3)),g=u===null?String(h):u;return(0,m.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:n.secondsLabel}),(0,m.jsxs)(`div`,{className:`flex gap-2`,children:[(0,m.jsx)(`input`,{type:`number`,min:o,step:1,disabled:r,className:D,value:g,onChange:e=>{let n=e.target.value;d(n);let r=parseInt(n,10);Number.isFinite(r)&&r>=o&&t(r*1e3)},onBlur:()=>{if(u===null)return;let e=parseInt(u,10);t(!Number.isFinite(e)||e<o?o*1e3:e*1e3),d(null)}}),(0,m.jsxs)(a,{className:O,disabled:r,value:c,onChange:e=>{let n=e.target.value;n&&(t(parseInt(n,10)),d(null))},children:[(0,m.jsx)(l,{value:``,children:n.presets.custom}),i.map(e=>(0,m.jsx)(l,{value:String(e),children:k(e,n.presets)},e))]})]})]})}var j=i(`mt-1 w-full rounded-lg border border-edge-subtle bg-surface-panel px-2.5 py-1.5 text-sm text-fg`,o),M=()=>({start:`09:00`,end:`22:00`,timezone:``});function N(e){let t=(0,f.c)(55),{value:n,onChange:r,labels:i,disabled:a}=e;if(!n){let e;t[0]===r?e=t[1]:(e=()=>r(M()),t[0]=r,t[1]=e);let n;return t[2]!==a||t[3]!==i.add||t[4]!==e?(n=(0,m.jsx)(s,{type:`button`,variant:`secondary`,className:`text-sm`,disabled:a,onClick:e,children:i.add}),t[2]=a,t[3]=i.add,t[4]=e,t[5]=n):n=t[5],n}let o;t[6]===i.start?o=t[7]:(o=(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:i.start}),t[6]=i.start,t[7]=o);let c;t[8]!==r||t[9]!==n?(c=e=>r({...n,start:e.target.value}),t[8]=r,t[9]=n,t[10]=c):c=t[10];let l;t[11]!==a||t[12]!==c||t[13]!==n.start?(l=(0,m.jsx)(`input`,{type:`time`,step:60,disabled:a,className:j,value:n.start,onChange:c}),t[11]=a,t[12]=c,t[13]=n.start,t[14]=l):l=t[14];let u;t[15]!==o||t[16]!==l?(u=(0,m.jsxs)(`label`,{className:`block min-w-0`,children:[o,l]}),t[15]=o,t[16]=l,t[17]=u):u=t[17];let d;t[18]===i.end?d=t[19]:(d=(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:i.end}),t[18]=i.end,t[19]=d);let p;t[20]!==r||t[21]!==n?(p=e=>r({...n,end:e.target.value}),t[20]=r,t[21]=n,t[22]=p):p=t[22];let h;t[23]!==a||t[24]!==p||t[25]!==n.end?(h=(0,m.jsx)(`input`,{type:`time`,step:60,disabled:a,className:j,value:n.end,onChange:p}),t[23]=a,t[24]=p,t[25]=n.end,t[26]=h):h=t[26];let g;t[27]!==d||t[28]!==h?(g=(0,m.jsxs)(`label`,{className:`block min-w-0`,children:[d,h]}),t[27]=d,t[28]=h,t[29]=g):g=t[29];let _;t[30]===i.timezone?_=t[31]:(_=(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:i.timezone}),t[30]=i.timezone,t[31]=_);let v;t[32]!==r||t[33]!==n?(v=e=>r({...n,timezone:e.target.value}),t[32]=r,t[33]=n,t[34]=v):v=t[34];let y;t[35]!==a||t[36]!==v||t[37]!==n.timezone?(y=(0,m.jsx)(`input`,{type:`text`,disabled:a,className:j,value:n.timezone,onChange:v,placeholder:`Asia/Shanghai`,autoComplete:`off`}),t[35]=a,t[36]=v,t[37]=n.timezone,t[38]=y):y=t[38];let b;t[39]!==y||t[40]!==_?(b=(0,m.jsxs)(`label`,{className:`block min-w-0`,children:[_,y]}),t[39]=y,t[40]=_,t[41]=b):b=t[41];let x;t[42]!==b||t[43]!==u||t[44]!==g?(x=(0,m.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-3`,children:[u,g,b]}),t[42]=b,t[43]=u,t[44]=g,t[45]=x):x=t[45];let S;t[46]===r?S=t[47]:(S=()=>r(null),t[46]=r,t[47]=S);let C;t[48]!==a||t[49]!==i.clear||t[50]!==S?(C=(0,m.jsx)(s,{type:`button`,variant:`secondary`,className:`text-xs`,disabled:a,onClick:S,children:i.clear}),t[48]=a,t[49]=i.clear,t[50]=S,t[51]=C):C=t[51];let w;return t[52]!==x||t[53]!==C?(w=(0,m.jsxs)(`div`,{className:`space-y-2`,children:[x,C]}),t[52]=x,t[53]=C,t[54]=w):w=t[54],w}function P(e){let t=(0,f.c)(34),{disabled:n,label:r,hint:a,className:o}=e,s;t[0]===o?s=t[1]:(s=i(`flex flex-col gap-2`,o),t[0]=o,t[1]=s);let c;t[2]===r?c=t[3]:(c=r?(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:r}):null,t[2]=r,t[3]=c);let l;t[4]!==n||t[5]!==r||t[6]!==e.kind||t[7]!==e.labels||t[8]!==e.onChange||t[9]!==e.value?(l=e.kind===`cron`?(0,m.jsx)(w,{value:e.value,onChange:e.onChange,labels:e.labels,disabled:n,showHeading:!r}):null,t[4]=n,t[5]=r,t[6]=e.kind,t[7]=e.labels,t[8]=e.onChange,t[9]=e.value,t[10]=l):l=t[10];let u;t[11]!==n||t[12]!==e.kind||t[13]!==e.labels||t[14]!==e.minSeconds||t[15]!==e.onChangeMs||t[16]!==e.presets||t[17]!==e.valueMs?(u=e.kind===`interval`?(0,m.jsx)(A,{valueMs:e.valueMs,onChangeMs:e.onChangeMs,labels:e.labels,disabled:n,presets:e.presets??T,minSeconds:e.minSeconds}):null,t[11]=n,t[12]=e.kind,t[13]=e.labels,t[14]=e.minSeconds,t[15]=e.onChangeMs,t[16]=e.presets,t[17]=e.valueMs,t[18]=u):u=t[18];let d;t[19]!==n||t[20]!==e.kind||t[21]!==e.labels||t[22]!==e.onChange||t[23]!==e.value?(d=e.kind===`active-hours`?(0,m.jsx)(N,{value:e.value,onChange:e.onChange,labels:e.labels,disabled:n}):null,t[19]=n,t[20]=e.kind,t[21]=e.labels,t[22]=e.onChange,t[23]=e.value,t[24]=d):d=t[24];let p;t[25]===a?p=t[26]:(p=a?(0,m.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:a}):null,t[25]=a,t[26]=p);let h;return t[27]!==s||t[28]!==c||t[29]!==l||t[30]!==u||t[31]!==d||t[32]!==p?(h=(0,m.jsxs)(`div`,{className:s,children:[c,l,u,d,p]}),t[27]=s,t[28]=c,t[29]=l,t[30]=u,t[31]=d,t[32]=p,t[33]=h):h=t[33],h}export{E as n,P as t};
1
+ import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./cn-BQ_8x0bT.js";import{Go as a,ds as o,hs as s,ps as c,qo as l}from"./index-IPmCli0N.js";import{n as u,t as d}from"./cron-expression-B3B1eqnr.js";var f=n(),p=e(t(),1),m=r(),h=Array.from({length:60},(e,t)=>t),g=i(c,`min-w-0 shrink text-xs sm:min-w-[7rem] sm:max-w-[11rem]`),_=i(`h-9 min-w-[6.5rem] shrink-0 rounded-lg border border-edge-subtle bg-surface-panel px-2 py-1.5 text-sm text-fg`,o,`dark:bg-surface-panel`),v=i(`h-9 min-w-[9.5rem] shrink-0 rounded-lg border border-edge-subtle bg-surface-panel px-2 py-1.5 text-sm text-fg`,o),y=i(`h-9 w-14 shrink-0 rounded-lg border border-edge-subtle bg-surface-panel px-2 py-1.5 text-center text-sm tabular-nums text-fg`,o),b=i(`min-h-[2.5rem] w-full rounded-lg border border-edge-subtle bg-surface-base px-3 py-2 font-mono text-xs text-fg`,o);function x(e){return{...e,intervalMinutesDraft:null,intervalHoursDraft:null}}function S(e){let{intervalMinutesDraft:t,intervalHoursDraft:n,...r}=e;return r}function C(e,t){switch(t.type){case`reset`:return x(t.state);case`replace`:return t.state}}function w({value:e,onChange:t,labels:n,disabled:r,showHeading:o=!0}){let s=(0,p.useMemo)(()=>u(e),[e]),[c,f]=(0,p.useReducer)(C,s,x),w=(0,p.useRef)(e);w.current!==e&&(w.current=e,f({type:`reset`,state:s}));let T=(0,p.useCallback)(e=>{let n={...c,...e};f({type:`replace`,state:n});let r=S(n),i=S(c);Object.keys(r).some(e=>r[e]!==i[e])&&t(d(r))},[t,c]),{mode:E,intervalKind:D,onceDate:O,intervalMinutes:k,intervalHours:A,minute:j,hour:M,weekDays:N,dayOfMonth:P,rawCron:F,intervalMinutesDraft:I,intervalHoursDraft:L}=c,R=`${String(M).padStart(2,`0`)}:${String(j).padStart(2,`0`)}`,z=e=>{let t=e.target.value;if(!t)return;let[n,r]=t.split(`:`).map(e=>parseInt(e,10));Number.isNaN(n)||Number.isNaN(r)||T({minute:r,hour:n})},B=(0,m.jsxs)(`div`,{className:`flex min-w-0 flex-nowrap items-center gap-2 overflow-x-auto pb-0.5`,children:[(0,m.jsxs)(a,{className:g,disabled:r,value:E,onChange:e=>{let t=e.target.value;T({mode:t})},"aria-label":n.scheduleTimeLabel,children:[(0,m.jsx)(l,{value:`no_repeat`,children:n.modeNoRepeat}),(0,m.jsx)(l,{value:`interval`,children:n.modeInterval}),(0,m.jsx)(l,{value:`hourly`,children:n.modeHourly}),(0,m.jsx)(l,{value:`daily`,children:n.modeDaily}),(0,m.jsx)(l,{value:`weekly`,children:n.modeWeekly}),(0,m.jsx)(l,{value:`monthly`,children:n.modeMonthly}),(0,m.jsx)(l,{value:`custom`,children:n.modeCustom})]}),E===`no_repeat`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`input`,{type:`date`,disabled:r,className:v,value:O,onChange:e=>{T({onceDate:e.target.value})},"aria-label":n.modeNoRepeat}),(0,m.jsx)(`input`,{type:`time`,step:60,disabled:r,className:_,value:R,onChange:z,"aria-label":n.scheduleTimeLabel})]}),E===`interval`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(a,{className:i(g,`w-auto min-w-[5rem]`),disabled:r,value:D,onChange:e=>{let t=e.target.value;T({intervalKind:t,intervalMinutesDraft:null,intervalHoursDraft:null})},"aria-label":n.modeInterval,children:[(0,m.jsx)(l,{value:`minutes`,children:n.intervalKindMinutes}),(0,m.jsx)(l,{value:`hours`,children:n.intervalKindHours})]}),D===`minutes`?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`input`,{type:`number`,min:1,max:59,disabled:r,className:y,value:I??String(k),onChange:e=>{let t=e.target.value,n=parseInt(t,10),r={intervalMinutesDraft:t};Number.isFinite(n)&&n>=1&&n<=59&&(r.intervalMinutes=n),T(r)},onBlur:()=>{if(I===null)return;let e=parseInt(I,10);T({intervalMinutes:!Number.isFinite(e)||e<1?5:Math.min(59,Math.max(1,Math.round(e))),intervalMinutesDraft:null})},"aria-label":n.intervalMinutes}),(0,m.jsx)(`span`,{className:`shrink-0 text-sm text-fg-muted`,children:n.minuteUnit})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`input`,{type:`number`,min:1,max:23,disabled:r,className:y,value:L??String(A),onChange:e=>{let t=e.target.value,n=parseInt(t,10),r={intervalHoursDraft:t};Number.isFinite(n)&&n>=1&&n<=23&&(r.intervalHours=n),T(r)},onBlur:()=>{if(L===null)return;let e=parseInt(L,10);T({intervalHours:!Number.isFinite(e)||e<1?2:Math.min(23,Math.max(1,Math.round(e))),intervalHoursDraft:null})},"aria-label":n.intervalHours}),(0,m.jsx)(`span`,{className:`shrink-0 text-sm text-fg-muted`,children:n.hourUnit}),(0,m.jsx)(a,{className:i(g,`w-auto min-w-[4rem]`),disabled:r,value:j,onChange:e=>{T({minute:parseInt(e.target.value,10)})},"aria-label":n.minuteAtHour,children:h.map(e=>(0,m.jsx)(l,{value:e,children:String(e).padStart(2,`0`)},e))}),(0,m.jsx)(`span`,{className:`shrink-0 text-sm text-fg-muted`,children:n.minuteUnit})]})]}),E===`daily`&&(0,m.jsx)(`input`,{type:`time`,step:60,disabled:r,className:_,value:R,onChange:z,"aria-label":n.scheduleTimeLabel}),E===`weekly`&&(0,m.jsx)(`input`,{type:`time`,step:60,disabled:r,className:_,value:R,onChange:z,"aria-label":n.scheduleTimeLabel}),E===`monthly`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a,{className:i(g,`w-auto min-w-[4.5rem]`),disabled:r,value:P,onChange:e=>{T({dayOfMonth:parseInt(e.target.value,10)})},"aria-label":n.dayOfMonth,children:Array.from({length:31},(e,t)=>t+1).map(e=>(0,m.jsx)(l,{value:e,children:e},e))}),(0,m.jsx)(`input`,{type:`time`,step:60,disabled:r,className:_,value:R,onChange:z,"aria-label":n.scheduleTimeLabel})]}),E===`hourly`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a,{className:i(g,`w-auto min-w-[4rem]`),disabled:r,value:j,onChange:e=>{T({minute:parseInt(e.target.value,10)})},"aria-label":n.minuteAtHour,children:h.map(e=>(0,m.jsx)(l,{value:e,children:String(e).padStart(2,`0`)},e))}),(0,m.jsx)(`span`,{className:`shrink-0 text-sm text-fg-muted`,children:n.minuteUnit})]})]}),V=E===`weekly`?(0,m.jsx)(`div`,{className:`flex flex-wrap gap-1.5 pt-1`,role:`group`,"aria-label":n.modeWeekly,children:n.weekdays.map((e,t)=>{let n=N[t];return(0,m.jsx)(`button`,{type:`button`,disabled:r,className:i(`flex size-9 select-none items-center justify-center rounded-full border text-xs font-medium transition-colors`,n?`border-fg bg-fg text-surface-panel`:`border-edge-subtle bg-surface-panel text-fg hover:border-edge`),"aria-pressed":n,onClick:()=>{let e=[...N];e[t]=!e[t],T({weekDays:e})},children:e},e)})}):null,H=E===`custom`?(0,m.jsxs)(`div`,{className:`pt-1`,children:[(0,m.jsx)(`textarea`,{disabled:r,className:b,rows:2,spellCheck:!1,value:F,placeholder:`*/5 * * * *`,onChange:e=>{T({rawCron:e.target.value})},"aria-label":n.modeCustom}),(0,m.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:n.customCronHint})]}):null;return(0,m.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o?(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:n.scheduleTimeLabel}):null,B,V,H]})}var T=[3e4,6e4,3e5,6e5,9e5,18e5,36e5,72e5],E=new Set(T),D=i(`h-9 min-w-0 flex-1 rounded-lg border border-edge-subtle bg-surface-panel px-2.5 py-1.5 text-sm tabular-nums text-fg`,o),O=i(c,`h-9 max-w-[11rem] shrink-0 text-xs sm:max-w-[12rem]`);function k(e,t){switch(e){case 3e4:return t.every30s;case 6e4:return t.every1min;case 3e5:return t.every5min;case 6e5:return t.every10min;case 9e5:return t.every15min;case 18e5:return t.every30min;case 36e5:return t.every1h;case 72e5:return t.every2h;default:return String(e)}}function A({valueMs:e,onChangeMs:t,labels:n,disabled:r,presets:i=T,minSeconds:o=1}){let s=(0,p.useMemo)(()=>new Set(i),[i]),c=(0,p.useMemo)(()=>s.has(e)?String(e):``,[s,e]),[u,d]=(0,p.useState)(null),f=(0,p.useRef)(e);f.current!==e&&(f.current=e,d(null));let h=Math.max(o,Math.round(e/1e3)),g=u===null?String(h):u;return(0,m.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:n.secondsLabel}),(0,m.jsxs)(`div`,{className:`flex gap-2`,children:[(0,m.jsx)(`input`,{type:`number`,min:o,step:1,disabled:r,className:D,value:g,onChange:e=>{let n=e.target.value;d(n);let r=parseInt(n,10);Number.isFinite(r)&&r>=o&&t(r*1e3)},onBlur:()=>{if(u===null)return;let e=parseInt(u,10);t(!Number.isFinite(e)||e<o?o*1e3:e*1e3),d(null)}}),(0,m.jsxs)(a,{className:O,disabled:r,value:c,onChange:e=>{let n=e.target.value;n&&(t(parseInt(n,10)),d(null))},children:[(0,m.jsx)(l,{value:``,children:n.presets.custom}),i.map(e=>(0,m.jsx)(l,{value:String(e),children:k(e,n.presets)},e))]})]})]})}var j=i(`mt-1 w-full rounded-lg border border-edge-subtle bg-surface-panel px-2.5 py-1.5 text-sm text-fg`,o),M=()=>({start:`09:00`,end:`22:00`,timezone:``});function N(e){let t=(0,f.c)(55),{value:n,onChange:r,labels:i,disabled:a}=e;if(!n){let e;t[0]===r?e=t[1]:(e=()=>r(M()),t[0]=r,t[1]=e);let n;return t[2]!==a||t[3]!==i.add||t[4]!==e?(n=(0,m.jsx)(s,{type:`button`,variant:`secondary`,className:`text-sm`,disabled:a,onClick:e,children:i.add}),t[2]=a,t[3]=i.add,t[4]=e,t[5]=n):n=t[5],n}let o;t[6]===i.start?o=t[7]:(o=(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:i.start}),t[6]=i.start,t[7]=o);let c;t[8]!==r||t[9]!==n?(c=e=>r({...n,start:e.target.value}),t[8]=r,t[9]=n,t[10]=c):c=t[10];let l;t[11]!==a||t[12]!==c||t[13]!==n.start?(l=(0,m.jsx)(`input`,{type:`time`,step:60,disabled:a,className:j,value:n.start,onChange:c}),t[11]=a,t[12]=c,t[13]=n.start,t[14]=l):l=t[14];let u;t[15]!==o||t[16]!==l?(u=(0,m.jsxs)(`label`,{className:`block min-w-0`,children:[o,l]}),t[15]=o,t[16]=l,t[17]=u):u=t[17];let d;t[18]===i.end?d=t[19]:(d=(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:i.end}),t[18]=i.end,t[19]=d);let p;t[20]!==r||t[21]!==n?(p=e=>r({...n,end:e.target.value}),t[20]=r,t[21]=n,t[22]=p):p=t[22];let h;t[23]!==a||t[24]!==p||t[25]!==n.end?(h=(0,m.jsx)(`input`,{type:`time`,step:60,disabled:a,className:j,value:n.end,onChange:p}),t[23]=a,t[24]=p,t[25]=n.end,t[26]=h):h=t[26];let g;t[27]!==d||t[28]!==h?(g=(0,m.jsxs)(`label`,{className:`block min-w-0`,children:[d,h]}),t[27]=d,t[28]=h,t[29]=g):g=t[29];let _;t[30]===i.timezone?_=t[31]:(_=(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:i.timezone}),t[30]=i.timezone,t[31]=_);let v;t[32]!==r||t[33]!==n?(v=e=>r({...n,timezone:e.target.value}),t[32]=r,t[33]=n,t[34]=v):v=t[34];let y;t[35]!==a||t[36]!==v||t[37]!==n.timezone?(y=(0,m.jsx)(`input`,{type:`text`,disabled:a,className:j,value:n.timezone,onChange:v,placeholder:`Asia/Shanghai`,autoComplete:`off`}),t[35]=a,t[36]=v,t[37]=n.timezone,t[38]=y):y=t[38];let b;t[39]!==y||t[40]!==_?(b=(0,m.jsxs)(`label`,{className:`block min-w-0`,children:[_,y]}),t[39]=y,t[40]=_,t[41]=b):b=t[41];let x;t[42]!==b||t[43]!==u||t[44]!==g?(x=(0,m.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-3`,children:[u,g,b]}),t[42]=b,t[43]=u,t[44]=g,t[45]=x):x=t[45];let S;t[46]===r?S=t[47]:(S=()=>r(null),t[46]=r,t[47]=S);let C;t[48]!==a||t[49]!==i.clear||t[50]!==S?(C=(0,m.jsx)(s,{type:`button`,variant:`secondary`,className:`text-xs`,disabled:a,onClick:S,children:i.clear}),t[48]=a,t[49]=i.clear,t[50]=S,t[51]=C):C=t[51];let w;return t[52]!==x||t[53]!==C?(w=(0,m.jsxs)(`div`,{className:`space-y-2`,children:[x,C]}),t[52]=x,t[53]=C,t[54]=w):w=t[54],w}function P(e){let t=(0,f.c)(34),{disabled:n,label:r,hint:a,className:o}=e,s;t[0]===o?s=t[1]:(s=i(`flex flex-col gap-2`,o),t[0]=o,t[1]=s);let c;t[2]===r?c=t[3]:(c=r?(0,m.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:r}):null,t[2]=r,t[3]=c);let l;t[4]!==n||t[5]!==r||t[6]!==e.kind||t[7]!==e.labels||t[8]!==e.onChange||t[9]!==e.value?(l=e.kind===`cron`?(0,m.jsx)(w,{value:e.value,onChange:e.onChange,labels:e.labels,disabled:n,showHeading:!r}):null,t[4]=n,t[5]=r,t[6]=e.kind,t[7]=e.labels,t[8]=e.onChange,t[9]=e.value,t[10]=l):l=t[10];let u;t[11]!==n||t[12]!==e.kind||t[13]!==e.labels||t[14]!==e.minSeconds||t[15]!==e.onChangeMs||t[16]!==e.presets||t[17]!==e.valueMs?(u=e.kind===`interval`?(0,m.jsx)(A,{valueMs:e.valueMs,onChangeMs:e.onChangeMs,labels:e.labels,disabled:n,presets:e.presets??T,minSeconds:e.minSeconds}):null,t[11]=n,t[12]=e.kind,t[13]=e.labels,t[14]=e.minSeconds,t[15]=e.onChangeMs,t[16]=e.presets,t[17]=e.valueMs,t[18]=u):u=t[18];let d;t[19]!==n||t[20]!==e.kind||t[21]!==e.labels||t[22]!==e.onChange||t[23]!==e.value?(d=e.kind===`active-hours`?(0,m.jsx)(N,{value:e.value,onChange:e.onChange,labels:e.labels,disabled:n}):null,t[19]=n,t[20]=e.kind,t[21]=e.labels,t[22]=e.onChange,t[23]=e.value,t[24]=d):d=t[24];let p;t[25]===a?p=t[26]:(p=a?(0,m.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:a}):null,t[25]=a,t[26]=p);let h;return t[27]!==s||t[28]!==c||t[29]!==l||t[30]!==u||t[31]!==d||t[32]!==p?(h=(0,m.jsxs)(`div`,{className:s,children:[c,l,u,d,p]}),t[27]=s,t[28]=c,t[29]=l,t[30]=u,t[31]=d,t[32]=p,t[33]=h):h=t[33],h}export{E as n,P as t};
@@ -1 +1 @@
1
- import"./rolldown-runtime-aKtaBQYM.js";import{a as e,n as t,t as n}from"./vendor-react-BOUWij0V.js";import{t as r}from"./cn-BQ_8x0bT.js";import{Go as i,os as a,qo as o,rs as s}from"./index-CH7XN6KY.js";var c=t();e();var l=n();function u(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function d(e){let t=e[`x-order`];return typeof t==`number`&&!Number.isNaN(t)?t:999}function f(e){let t=e[`x-group`];return typeof t==`string`&&t.length>0?t:``}function p(e){return e[`x-hidden`]===!0}function m(e){let t=e.properties;if(!u(t))return[];let n=[];for(let[e,r]of Object.entries(t))u(r)&&(p(r)||n.push({key:e,sub:r,order:d(r),group:f(r),hidden:!1}));return n.sort((e,t)=>e.order-t.order||e.key.localeCompare(t.key)),n}function h(e){let t=new Map;for(let n of e){let e=n.group;t.has(e)||t.set(e,[]),t.get(e).push(n)}return t}function g(e){let t=(0,c.c)(38),{name:n,s:r,value:o,onChange:u,disabled:d}=e,f=typeof r.description==`string`?r.description:void 0,p=(typeof r[`x-placeholder`]==`string`?r[`x-placeholder`]:null)||f,m=r.format;if(Array.isArray(r.enum)&&r.enum.every(v)){let e;t[0]===f?e=t[1]:(e=f?(0,l.jsx)(`label`,{className:`text-xs text-fg-muted`,children:f}):null,t[0]=f,t[1]=e);let a;t[2]===u?a=t[3]:(a=e=>u(e.target.value),t[2]=u,t[3]=a);let s;t[4]===r.enum?s=t[5]:(s=r.enum.map(_),t[4]=r.enum,t[5]=s);let c;t[6]!==d||t[7]!==n||t[8]!==a||t[9]!==s||t[10]!==o?(c=(0,l.jsx)(i,{name:n,className:`ui-input h-9 rounded-md border border-edge bg-surface-base px-2 text-sm text-fg`,value:o,disabled:d,onChange:a,children:s}),t[6]=d,t[7]=n,t[8]=a,t[9]=s,t[10]=o,t[11]=c):c=t[11];let p;return t[12]!==e||t[13]!==c?(p=(0,l.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e,c]}),t[12]=e,t[13]=c,t[14]=p):p=t[14],p}if(m===`password`){let e;t[15]===f?e=t[16]:(e=f?(0,l.jsx)(`label`,{className:`text-xs text-fg-muted`,children:f}):null,t[15]=f,t[16]=e);let n;t[17]!==d||t[18]!==u||t[19]!==p||t[20]!==o?(n=(0,l.jsx)(a,{value:o,onChange:u,placeholder:p,labels:s,disabled:d,inputClassName:`ui-input h-9 rounded-md border border-edge bg-surface-base px-2.5 text-sm text-fg placeholder:text-fg-muted/70`}),t[17]=d,t[18]=u,t[19]=p,t[20]=o,t[21]=n):n=t[21];let r;return t[22]!==e||t[23]!==n?(r=(0,l.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e,n]}),t[22]=e,t[23]=n,t[24]=r):r=t[24],r}let h;t[25]===f?h=t[26]:(h=f?(0,l.jsx)(`label`,{className:`text-xs text-fg-muted`,children:f}):null,t[25]=f,t[26]=h);let g;t[27]===u?g=t[28]:(g=e=>u(e.target.value),t[27]=u,t[28]=g);let y;t[29]!==d||t[30]!==n||t[31]!==p||t[32]!==g||t[33]!==o?(y=(0,l.jsx)(`input`,{name:n,type:`text`,className:`ui-input h-9 rounded-md border border-edge bg-surface-base px-2.5 text-sm text-fg placeholder:text-fg-muted/70`,value:o,placeholder:p,disabled:d,onChange:g}),t[29]=d,t[30]=n,t[31]=p,t[32]=g,t[33]=o,t[34]=y):y=t[34];let b;return t[35]!==h||t[36]!==y?(b=(0,l.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[h,y]}),t[35]=h,t[36]=y,t[37]=b):b=t[37],b}function _(e){return(0,l.jsx)(o,{value:e,children:e},e)}function v(e){return typeof e==`string`}function y(e){let t=(0,c.c)(11),{s:n,value:r,onChange:i,disabled:a}=e,o=typeof n.description==`string`?n.description:void 0,s;t[0]===o?s=t[1]:(s=o?(0,l.jsx)(`label`,{className:`text-xs text-fg-muted`,children:o}):null,t[0]=o,t[1]=s);let u=Number.isFinite(r)?r:0,d;t[2]===i?d=t[3]:(d=e=>i(Number(e.target.value)),t[2]=i,t[3]=d);let f;t[4]!==a||t[5]!==u||t[6]!==d?(f=(0,l.jsx)(`input`,{type:`number`,className:`ui-input h-9 rounded-md border border-edge bg-surface-base px-2.5 text-sm text-fg`,value:u,disabled:a,onChange:d}),t[4]=a,t[5]=u,t[6]=d,t[7]=f):f=t[7];let p;return t[8]!==s||t[9]!==f?(p=(0,l.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[s,f]}),t[8]=s,t[9]=f,t[10]=p):p=t[10],p}function b(e){let t=(0,c.c)(11),{s:n,value:r,onChange:i,disabled:a,labels:o}=e,s=(typeof n.description==`string`?n.description:void 0)??(typeof n.title==`string`&&n.title.length>0?n.title:o?.defaultBooleanLabel??`Enable`),u;t[0]===i?u=t[1]:(u=e=>i(e.target.checked),t[0]=i,t[1]=u);let d;t[2]!==a||t[3]!==u||t[4]!==r?(d=(0,l.jsx)(`input`,{type:`checkbox`,className:`size-4 rounded border border-edge`,checked:r,disabled:a,onChange:u}),t[2]=a,t[3]=u,t[4]=r,t[5]=d):d=t[5];let f;t[6]===s?f=t[7]:(f=(0,l.jsx)(`span`,{children:s}),t[6]=s,t[7]=f);let p;return t[8]!==d||t[9]!==f?(p=(0,l.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-fg`,children:[d,f]}),t[8]=d,t[9]=f,t[10]=p):p=t[10],p}function x(e){let t=(0,c.c)(27),{s:n,value:r,onChange:i,disabled:a,labels:o}=e,s=typeof n.description==`string`?n.description:void 0,d=n.items,f=u(d)?d.type:void 0;if(!(f===`string`||Array.isArray(f)&&f.includes(`string`))){let e=o?.unsupportedArrayType??`Unsupported array type`,n;return t[0]===e?n=t[1]:(n=(0,l.jsx)(`p`,{className:`text-xs text-fg-muted`,children:e}),t[0]=e,t[1]=n),n}let p,m,h,g,_;if(t[2]!==s||t[3]!==a||t[4]!==i||t[5]!==r){let e=r.map(String);p=t=>{let n=t.trim();!n||e.includes(n)||i([...e,n])},g=`flex flex-col gap-1.5`,t[11]===s?_=t[12]:(_=s?(0,l.jsx)(`label`,{className:`text-xs text-fg-muted`,children:s}):null,t[11]=s,t[12]=_),m=`flex flex-wrap gap-1`,h=e.map(t=>(0,l.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border border-edge bg-surface-panel px-2 py-0.5 text-sm`,children:[t,(0,l.jsx)(`button`,{type:`button`,className:`text-fg-muted hover:text-fg`,disabled:a,onClick:()=>i(e.filter(e=>e!==t)),children:`×`})]},t)),t[2]=s,t[3]=a,t[4]=i,t[5]=r,t[6]=p,t[7]=m,t[8]=h,t[9]=g,t[10]=_}else p=t[6],m=t[7],h=t[8],g=t[9],_=t[10];let v;t[13]!==m||t[14]!==h?(v=(0,l.jsx)(`div`,{className:m,children:h}),t[13]=m,t[14]=h,t[15]=v):v=t[15];let y=o?.arrayAddPlaceholder??`Add and press Enter`,b;t[16]===p?b=t[17]:(b=e=>{e.key===`Enter`&&(e.preventDefault(),p(e.target.value),e.target.value=``)},t[16]=p,t[17]=b);let x;t[18]!==a||t[19]!==y||t[20]!==b?(x=(0,l.jsx)(`input`,{className:`ui-input h-9 rounded-md border border-edge bg-surface-base px-2.5 text-sm`,disabled:a,placeholder:y,onKeyDown:b}),t[18]=a,t[19]=y,t[20]=b,t[21]=x):x=t[21];let S;return t[22]!==g||t[23]!==_||t[24]!==v||t[25]!==x?(S=(0,l.jsxs)(`div`,{className:g,children:[_,v,x]}),t[22]=g,t[23]=_,t[24]=v,t[25]=x,t[26]=S):S=t[26],S}function S(e){let t=(0,c.c)(66),{k:n,sub:r,value:i,onValue:a,disabled:o,labels:s}=e,d=r.type,f=(typeof r.title==`string`&&r.title.length>0?r.title:null)??n;if(d===`boolean`){let e;t[0]===f?e=t[1]:(e=(0,l.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:f}),t[0]=f,t[1]=e);let n=i===!0,c;t[2]===a?c=t[3]:(c=e=>a(e),t[2]=a,t[3]=c);let u;t[4]!==o||t[5]!==s||t[6]!==r||t[7]!==n||t[8]!==c?(u=(0,l.jsx)(b,{s:r,value:n,disabled:o,onChange:c,labels:s}),t[4]=o,t[5]=s,t[6]=r,t[7]=n,t[8]=c,t[9]=u):u=t[9];let d;return t[10]!==e||t[11]!==u?(d=(0,l.jsxs)(`div`,{className:`space-y-1.5`,children:[e,u]}),t[10]=e,t[11]=u,t[12]=d):d=t[12],d}if(d===`number`||d===`integer`){let e;t[13]===f?e=t[14]:(e=(0,l.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:f}),t[13]=f,t[14]=e);let n=typeof i==`number`?i:0,s;t[15]!==o||t[16]!==a||t[17]!==r||t[18]!==n?(s=(0,l.jsx)(y,{s:r,value:n,disabled:o,onChange:a}),t[15]=o,t[16]=a,t[17]=r,t[18]=n,t[19]=s):s=t[19];let c;return t[20]!==e||t[21]!==s?(c=(0,l.jsxs)(`div`,{className:`space-y-1.5`,children:[e,s]}),t[20]=e,t[21]=s,t[22]=c):c=t[22],c}if(d===`string`){let e;t[23]===f?e=t[24]:(e=(0,l.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:f}),t[23]=f,t[24]=e);let s=typeof i==`string`?i:``,c;t[25]!==o||t[26]!==n||t[27]!==a||t[28]!==r||t[29]!==s?(c=(0,l.jsx)(g,{name:n,s:r,value:s,disabled:o,onChange:a}),t[25]=o,t[26]=n,t[27]=a,t[28]=r,t[29]=s,t[30]=c):c=t[30];let u;return t[31]!==e||t[32]!==c?(u=(0,l.jsxs)(`div`,{className:`space-y-1.5`,children:[e,c]}),t[31]=e,t[32]=c,t[33]=u):u=t[33],u}if(d===`array`){let e=r.items,n=u(e)?e.type:void 0;if(n===`string`||Array.isArray(n)&&n.includes(`string`)){let e;t[34]===f?e=t[35]:(e=(0,l.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:f}),t[34]=f,t[35]=e);let n;t[36]===i?n=t[37]:(n=Array.isArray(i)&&i.every(C)?i.map(String):[],t[36]=i,t[37]=n);let c;t[38]!==o||t[39]!==s||t[40]!==a||t[41]!==r||t[42]!==n?(c=(0,l.jsx)(x,{s:r,value:n,disabled:o,onChange:a,labels:s}),t[38]=o,t[39]=s,t[40]=a,t[41]=r,t[42]=n,t[43]=c):c=t[43];let u;return t[44]!==e||t[45]!==c?(u=(0,l.jsxs)(`div`,{className:`space-y-1.5`,children:[e,c]}),t[44]=e,t[45]=c,t[46]=u):u=t[46],u}}if(d===`object`){let e;t[47]===i?e=t[48]:(e=u(i)?i:{},t[47]=i,t[48]=e);let n=e,c;t[49]===f?c=t[50]:(c=(0,l.jsx)(`summary`,{className:`cursor-pointer select-none px-3 py-2 text-sm font-medium text-fg group-open:rounded-b-none`,children:f}),t[49]=f,t[50]=c);let d;t[51]!==o||t[52]!==s||t[53]!==n||t[54]!==a||t[55]!==r?(d=(0,l.jsx)(`div`,{className:`border-t border-edge p-3`,children:(0,l.jsx)(w,{schema:r,values:n,onChange:a,disabled:o,labels:s})}),t[51]=o,t[52]=s,t[53]=n,t[54]=a,t[55]=r,t[56]=d):d=t[56];let p;return t[57]!==c||t[58]!==d?(p=(0,l.jsxs)(`details`,{className:`group rounded-lg border border-edge bg-surface-panel/40 open:bg-surface-base`,open:!0,children:[c,d]}),t[57]=c,t[58]=d,t[59]=p):p=t[59],p}let p;t[60]!==s||t[61]!==d||t[62]!==f?(p=s?.unsupportedFieldType?.(f,typeof d==`string`?d:void 0)??`${f}: unsupported field type${typeof d==`string`?` (${d})`:``}`,t[60]=s,t[61]=d,t[62]=f,t[63]=p):p=t[63];let m;return t[64]===p?m=t[65]:(m=(0,l.jsx)(`p`,{className:`text-xs text-fg-muted`,children:p}),t[64]=p,t[65]=m),m}function C(e){return typeof e==`string`||typeof e==`number`}function w(e){let t=(0,c.c)(28),{schema:n,values:i,onChange:a,disabled:o,className:s,labels:d}=e,f=o===void 0?!1:o,p;bb0:{if(n.type!==`object`){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[0]=e):e=t[0],p=e;break bb0}let e;t[1]===n?e=t[2]:(e=m(n),t[1]=n,t[2]=e),p=e}let g=p,_;bb1:{if(g.length===0){let e;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=new Map,t[3]=e):e=t[3],_=e;break bb1}let e;t[4]===g?e=t[5]:(e=h(g),t[4]=g,t[5]=e),_=e}let v=_,y;t[6]!==a||t[7]!==i?(y=(e,t)=>{a({...i,[e]:t})},t[6]=a,t[7]=i,t[8]=y):y=t[8];let b=y;if(n.type!==`object`||!u(n.properties)||g.length===0)return null;let x,C;if(t[9]!==s||t[10]!==f||t[11]!==v||t[12]!==d||t[13]!==b||t[14]!==i){let e=Array.from(v.keys()).sort(T);t[17]===s?x=t[18]:(x=r(`flex flex-col gap-4`,s),t[17]=s,t[18]=x);let n;t[19]!==f||t[20]!==v||t[21]!==d||t[22]!==b||t[23]!==i?(n=e=>{let t=(v.get(e)??[]).map(e=>(0,l.jsx)(S,{k:e.key,sub:e.sub,value:i[e.key],onValue:t=>b(e.key,t),disabled:f,labels:d},e.key));return e===``?(0,l.jsx)(`div`,{children:t},`default`):(0,l.jsxs)(`details`,{className:`group rounded-lg border border-edge bg-surface-panel/40 open:bg-surface-base`,open:!0,children:[(0,l.jsx)(`summary`,{className:`cursor-pointer select-none px-3 py-2 text-sm font-medium text-fg group-open:rounded-b-none`,children:e}),(0,l.jsx)(`div`,{className:`space-y-4 border-t border-edge p-3`,children:t})]},e)},t[19]=f,t[20]=v,t[21]=d,t[22]=b,t[23]=i,t[24]=n):n=t[24],C=e.map(n),t[9]=s,t[10]=f,t[11]=v,t[12]=d,t[13]=b,t[14]=i,t[15]=x,t[16]=C}else x=t[15],C=t[16];let w;return t[25]!==x||t[26]!==C?(w=(0,l.jsx)(`div`,{className:x,children:C}),t[25]=x,t[26]=C,t[27]=w):w=t[27],w}function T(e,t){return e===``?-1:t===``?1:e.localeCompare(t)}export{w as t};
1
+ import"./rolldown-runtime-aKtaBQYM.js";import{a as e,n as t,t as n}from"./vendor-react-BOUWij0V.js";import{t as r}from"./cn-BQ_8x0bT.js";import{Go as i,os as a,qo as o,rs as s}from"./index-IPmCli0N.js";var c=t();e();var l=n();function u(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function d(e){let t=e[`x-order`];return typeof t==`number`&&!Number.isNaN(t)?t:999}function f(e){let t=e[`x-group`];return typeof t==`string`&&t.length>0?t:``}function p(e){return e[`x-hidden`]===!0}function m(e){let t=e.properties;if(!u(t))return[];let n=[];for(let[e,r]of Object.entries(t))u(r)&&(p(r)||n.push({key:e,sub:r,order:d(r),group:f(r),hidden:!1}));return n.sort((e,t)=>e.order-t.order||e.key.localeCompare(t.key)),n}function h(e){let t=new Map;for(let n of e){let e=n.group;t.has(e)||t.set(e,[]),t.get(e).push(n)}return t}function g(e){let t=(0,c.c)(38),{name:n,s:r,value:o,onChange:u,disabled:d}=e,f=typeof r.description==`string`?r.description:void 0,p=(typeof r[`x-placeholder`]==`string`?r[`x-placeholder`]:null)||f,m=r.format;if(Array.isArray(r.enum)&&r.enum.every(v)){let e;t[0]===f?e=t[1]:(e=f?(0,l.jsx)(`label`,{className:`text-xs text-fg-muted`,children:f}):null,t[0]=f,t[1]=e);let a;t[2]===u?a=t[3]:(a=e=>u(e.target.value),t[2]=u,t[3]=a);let s;t[4]===r.enum?s=t[5]:(s=r.enum.map(_),t[4]=r.enum,t[5]=s);let c;t[6]!==d||t[7]!==n||t[8]!==a||t[9]!==s||t[10]!==o?(c=(0,l.jsx)(i,{name:n,className:`ui-input h-9 rounded-md border border-edge bg-surface-base px-2 text-sm text-fg`,value:o,disabled:d,onChange:a,children:s}),t[6]=d,t[7]=n,t[8]=a,t[9]=s,t[10]=o,t[11]=c):c=t[11];let p;return t[12]!==e||t[13]!==c?(p=(0,l.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e,c]}),t[12]=e,t[13]=c,t[14]=p):p=t[14],p}if(m===`password`){let e;t[15]===f?e=t[16]:(e=f?(0,l.jsx)(`label`,{className:`text-xs text-fg-muted`,children:f}):null,t[15]=f,t[16]=e);let n;t[17]!==d||t[18]!==u||t[19]!==p||t[20]!==o?(n=(0,l.jsx)(a,{value:o,onChange:u,placeholder:p,labels:s,disabled:d,inputClassName:`ui-input h-9 rounded-md border border-edge bg-surface-base px-2.5 text-sm text-fg placeholder:text-fg-muted/70`}),t[17]=d,t[18]=u,t[19]=p,t[20]=o,t[21]=n):n=t[21];let r;return t[22]!==e||t[23]!==n?(r=(0,l.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e,n]}),t[22]=e,t[23]=n,t[24]=r):r=t[24],r}let h;t[25]===f?h=t[26]:(h=f?(0,l.jsx)(`label`,{className:`text-xs text-fg-muted`,children:f}):null,t[25]=f,t[26]=h);let g;t[27]===u?g=t[28]:(g=e=>u(e.target.value),t[27]=u,t[28]=g);let y;t[29]!==d||t[30]!==n||t[31]!==p||t[32]!==g||t[33]!==o?(y=(0,l.jsx)(`input`,{name:n,type:`text`,className:`ui-input h-9 rounded-md border border-edge bg-surface-base px-2.5 text-sm text-fg placeholder:text-fg-muted/70`,value:o,placeholder:p,disabled:d,onChange:g}),t[29]=d,t[30]=n,t[31]=p,t[32]=g,t[33]=o,t[34]=y):y=t[34];let b;return t[35]!==h||t[36]!==y?(b=(0,l.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[h,y]}),t[35]=h,t[36]=y,t[37]=b):b=t[37],b}function _(e){return(0,l.jsx)(o,{value:e,children:e},e)}function v(e){return typeof e==`string`}function y(e){let t=(0,c.c)(11),{s:n,value:r,onChange:i,disabled:a}=e,o=typeof n.description==`string`?n.description:void 0,s;t[0]===o?s=t[1]:(s=o?(0,l.jsx)(`label`,{className:`text-xs text-fg-muted`,children:o}):null,t[0]=o,t[1]=s);let u=Number.isFinite(r)?r:0,d;t[2]===i?d=t[3]:(d=e=>i(Number(e.target.value)),t[2]=i,t[3]=d);let f;t[4]!==a||t[5]!==u||t[6]!==d?(f=(0,l.jsx)(`input`,{type:`number`,className:`ui-input h-9 rounded-md border border-edge bg-surface-base px-2.5 text-sm text-fg`,value:u,disabled:a,onChange:d}),t[4]=a,t[5]=u,t[6]=d,t[7]=f):f=t[7];let p;return t[8]!==s||t[9]!==f?(p=(0,l.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[s,f]}),t[8]=s,t[9]=f,t[10]=p):p=t[10],p}function b(e){let t=(0,c.c)(11),{s:n,value:r,onChange:i,disabled:a,labels:o}=e,s=(typeof n.description==`string`?n.description:void 0)??(typeof n.title==`string`&&n.title.length>0?n.title:o?.defaultBooleanLabel??`Enable`),u;t[0]===i?u=t[1]:(u=e=>i(e.target.checked),t[0]=i,t[1]=u);let d;t[2]!==a||t[3]!==u||t[4]!==r?(d=(0,l.jsx)(`input`,{type:`checkbox`,className:`size-4 rounded border border-edge`,checked:r,disabled:a,onChange:u}),t[2]=a,t[3]=u,t[4]=r,t[5]=d):d=t[5];let f;t[6]===s?f=t[7]:(f=(0,l.jsx)(`span`,{children:s}),t[6]=s,t[7]=f);let p;return t[8]!==d||t[9]!==f?(p=(0,l.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-fg`,children:[d,f]}),t[8]=d,t[9]=f,t[10]=p):p=t[10],p}function x(e){let t=(0,c.c)(27),{s:n,value:r,onChange:i,disabled:a,labels:o}=e,s=typeof n.description==`string`?n.description:void 0,d=n.items,f=u(d)?d.type:void 0;if(!(f===`string`||Array.isArray(f)&&f.includes(`string`))){let e=o?.unsupportedArrayType??`Unsupported array type`,n;return t[0]===e?n=t[1]:(n=(0,l.jsx)(`p`,{className:`text-xs text-fg-muted`,children:e}),t[0]=e,t[1]=n),n}let p,m,h,g,_;if(t[2]!==s||t[3]!==a||t[4]!==i||t[5]!==r){let e=r.map(String);p=t=>{let n=t.trim();!n||e.includes(n)||i([...e,n])},g=`flex flex-col gap-1.5`,t[11]===s?_=t[12]:(_=s?(0,l.jsx)(`label`,{className:`text-xs text-fg-muted`,children:s}):null,t[11]=s,t[12]=_),m=`flex flex-wrap gap-1`,h=e.map(t=>(0,l.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border border-edge bg-surface-panel px-2 py-0.5 text-sm`,children:[t,(0,l.jsx)(`button`,{type:`button`,className:`text-fg-muted hover:text-fg`,disabled:a,onClick:()=>i(e.filter(e=>e!==t)),children:`×`})]},t)),t[2]=s,t[3]=a,t[4]=i,t[5]=r,t[6]=p,t[7]=m,t[8]=h,t[9]=g,t[10]=_}else p=t[6],m=t[7],h=t[8],g=t[9],_=t[10];let v;t[13]!==m||t[14]!==h?(v=(0,l.jsx)(`div`,{className:m,children:h}),t[13]=m,t[14]=h,t[15]=v):v=t[15];let y=o?.arrayAddPlaceholder??`Add and press Enter`,b;t[16]===p?b=t[17]:(b=e=>{e.key===`Enter`&&(e.preventDefault(),p(e.target.value),e.target.value=``)},t[16]=p,t[17]=b);let x;t[18]!==a||t[19]!==y||t[20]!==b?(x=(0,l.jsx)(`input`,{className:`ui-input h-9 rounded-md border border-edge bg-surface-base px-2.5 text-sm`,disabled:a,placeholder:y,onKeyDown:b}),t[18]=a,t[19]=y,t[20]=b,t[21]=x):x=t[21];let S;return t[22]!==g||t[23]!==_||t[24]!==v||t[25]!==x?(S=(0,l.jsxs)(`div`,{className:g,children:[_,v,x]}),t[22]=g,t[23]=_,t[24]=v,t[25]=x,t[26]=S):S=t[26],S}function S(e){let t=(0,c.c)(66),{k:n,sub:r,value:i,onValue:a,disabled:o,labels:s}=e,d=r.type,f=(typeof r.title==`string`&&r.title.length>0?r.title:null)??n;if(d===`boolean`){let e;t[0]===f?e=t[1]:(e=(0,l.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:f}),t[0]=f,t[1]=e);let n=i===!0,c;t[2]===a?c=t[3]:(c=e=>a(e),t[2]=a,t[3]=c);let u;t[4]!==o||t[5]!==s||t[6]!==r||t[7]!==n||t[8]!==c?(u=(0,l.jsx)(b,{s:r,value:n,disabled:o,onChange:c,labels:s}),t[4]=o,t[5]=s,t[6]=r,t[7]=n,t[8]=c,t[9]=u):u=t[9];let d;return t[10]!==e||t[11]!==u?(d=(0,l.jsxs)(`div`,{className:`space-y-1.5`,children:[e,u]}),t[10]=e,t[11]=u,t[12]=d):d=t[12],d}if(d===`number`||d===`integer`){let e;t[13]===f?e=t[14]:(e=(0,l.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:f}),t[13]=f,t[14]=e);let n=typeof i==`number`?i:0,s;t[15]!==o||t[16]!==a||t[17]!==r||t[18]!==n?(s=(0,l.jsx)(y,{s:r,value:n,disabled:o,onChange:a}),t[15]=o,t[16]=a,t[17]=r,t[18]=n,t[19]=s):s=t[19];let c;return t[20]!==e||t[21]!==s?(c=(0,l.jsxs)(`div`,{className:`space-y-1.5`,children:[e,s]}),t[20]=e,t[21]=s,t[22]=c):c=t[22],c}if(d===`string`){let e;t[23]===f?e=t[24]:(e=(0,l.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:f}),t[23]=f,t[24]=e);let s=typeof i==`string`?i:``,c;t[25]!==o||t[26]!==n||t[27]!==a||t[28]!==r||t[29]!==s?(c=(0,l.jsx)(g,{name:n,s:r,value:s,disabled:o,onChange:a}),t[25]=o,t[26]=n,t[27]=a,t[28]=r,t[29]=s,t[30]=c):c=t[30];let u;return t[31]!==e||t[32]!==c?(u=(0,l.jsxs)(`div`,{className:`space-y-1.5`,children:[e,c]}),t[31]=e,t[32]=c,t[33]=u):u=t[33],u}if(d===`array`){let e=r.items,n=u(e)?e.type:void 0;if(n===`string`||Array.isArray(n)&&n.includes(`string`)){let e;t[34]===f?e=t[35]:(e=(0,l.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:f}),t[34]=f,t[35]=e);let n;t[36]===i?n=t[37]:(n=Array.isArray(i)&&i.every(C)?i.map(String):[],t[36]=i,t[37]=n);let c;t[38]!==o||t[39]!==s||t[40]!==a||t[41]!==r||t[42]!==n?(c=(0,l.jsx)(x,{s:r,value:n,disabled:o,onChange:a,labels:s}),t[38]=o,t[39]=s,t[40]=a,t[41]=r,t[42]=n,t[43]=c):c=t[43];let u;return t[44]!==e||t[45]!==c?(u=(0,l.jsxs)(`div`,{className:`space-y-1.5`,children:[e,c]}),t[44]=e,t[45]=c,t[46]=u):u=t[46],u}}if(d===`object`){let e;t[47]===i?e=t[48]:(e=u(i)?i:{},t[47]=i,t[48]=e);let n=e,c;t[49]===f?c=t[50]:(c=(0,l.jsx)(`summary`,{className:`cursor-pointer select-none px-3 py-2 text-sm font-medium text-fg group-open:rounded-b-none`,children:f}),t[49]=f,t[50]=c);let d;t[51]!==o||t[52]!==s||t[53]!==n||t[54]!==a||t[55]!==r?(d=(0,l.jsx)(`div`,{className:`border-t border-edge p-3`,children:(0,l.jsx)(w,{schema:r,values:n,onChange:a,disabled:o,labels:s})}),t[51]=o,t[52]=s,t[53]=n,t[54]=a,t[55]=r,t[56]=d):d=t[56];let p;return t[57]!==c||t[58]!==d?(p=(0,l.jsxs)(`details`,{className:`group rounded-lg border border-edge bg-surface-panel/40 open:bg-surface-base`,open:!0,children:[c,d]}),t[57]=c,t[58]=d,t[59]=p):p=t[59],p}let p;t[60]!==s||t[61]!==d||t[62]!==f?(p=s?.unsupportedFieldType?.(f,typeof d==`string`?d:void 0)??`${f}: unsupported field type${typeof d==`string`?` (${d})`:``}`,t[60]=s,t[61]=d,t[62]=f,t[63]=p):p=t[63];let m;return t[64]===p?m=t[65]:(m=(0,l.jsx)(`p`,{className:`text-xs text-fg-muted`,children:p}),t[64]=p,t[65]=m),m}function C(e){return typeof e==`string`||typeof e==`number`}function w(e){let t=(0,c.c)(28),{schema:n,values:i,onChange:a,disabled:o,className:s,labels:d}=e,f=o===void 0?!1:o,p;bb0:{if(n.type!==`object`){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[0]=e):e=t[0],p=e;break bb0}let e;t[1]===n?e=t[2]:(e=m(n),t[1]=n,t[2]=e),p=e}let g=p,_;bb1:{if(g.length===0){let e;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=new Map,t[3]=e):e=t[3],_=e;break bb1}let e;t[4]===g?e=t[5]:(e=h(g),t[4]=g,t[5]=e),_=e}let v=_,y;t[6]!==a||t[7]!==i?(y=(e,t)=>{a({...i,[e]:t})},t[6]=a,t[7]=i,t[8]=y):y=t[8];let b=y;if(n.type!==`object`||!u(n.properties)||g.length===0)return null;let x,C;if(t[9]!==s||t[10]!==f||t[11]!==v||t[12]!==d||t[13]!==b||t[14]!==i){let e=Array.from(v.keys()).sort(T);t[17]===s?x=t[18]:(x=r(`flex flex-col gap-4`,s),t[17]=s,t[18]=x);let n;t[19]!==f||t[20]!==v||t[21]!==d||t[22]!==b||t[23]!==i?(n=e=>{let t=(v.get(e)??[]).map(e=>(0,l.jsx)(S,{k:e.key,sub:e.sub,value:i[e.key],onValue:t=>b(e.key,t),disabled:f,labels:d},e.key));return e===``?(0,l.jsx)(`div`,{children:t},`default`):(0,l.jsxs)(`details`,{className:`group rounded-lg border border-edge bg-surface-panel/40 open:bg-surface-base`,open:!0,children:[(0,l.jsx)(`summary`,{className:`cursor-pointer select-none px-3 py-2 text-sm font-medium text-fg group-open:rounded-b-none`,children:e}),(0,l.jsx)(`div`,{className:`space-y-4 border-t border-edge p-3`,children:t})]},e)},t[19]=f,t[20]=v,t[21]=d,t[22]=b,t[23]=i,t[24]=n):n=t[24],C=e.map(n),t[9]=s,t[10]=f,t[11]=v,t[12]=d,t[13]=b,t[14]=i,t[15]=x,t[16]=C}else x=t[15],C=t[16];let w;return t[25]!==x||t[26]!==C?(w=(0,l.jsx)(`div`,{className:x,children:C}),t[25]=x,t[26]=C,t[27]=w):w=t[27],w}function T(e,t){return e===``?-1:t===``?1:e.localeCompare(t)}export{w as t};