@xopcai/xopc 0.0.348 → 0.0.350

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 (175) hide show
  1. package/dist/browser-ext/manifest.json +1 -1
  2. package/dist/extensions/telegram/xopc.extension.json +1 -1
  3. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-B48Ub-fy.js → agent-avatar-dicebear-GAs9LrbD.js} +1 -1
  4. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-q6mFje6y.js +1 -0
  5. package/dist/gateway/static/root/assets/{agent-plugin-dialog-B8D_L023.js → agent-plugin-dialog-vR-3YU8w.js} +1 -1
  6. package/dist/gateway/static/root/assets/agents-DZXa_QVc.js +70 -0
  7. package/dist/gateway/static/root/assets/{agents-admin-api-DZsBZ9R6.js → agents-admin-api-yUALtmym.js} +1 -1
  8. package/dist/gateway/static/root/assets/{app-management-settings-panel-D4huEKxu.js → app-management-settings-panel-5GU28Q-V.js} +1 -1
  9. package/dist/gateway/static/root/assets/{appearance-settings-lbeb_mOb.js → appearance-settings-uxEo59iJ.js} +1 -1
  10. package/dist/gateway/static/root/assets/apps-page-06LrJSYf.js +1 -0
  11. package/dist/gateway/static/root/assets/{archive-plugin-DvPF9mbR.js → archive-plugin-B4z8_4sq.js} +1 -1
  12. package/dist/gateway/static/root/assets/{automations-page-CM6ANOfj.js → automations-page-Cap0FMSp.js} +1 -1
  13. package/dist/gateway/static/root/assets/automations-workspace-DEsdkcup.js +7 -0
  14. package/dist/gateway/static/root/assets/{binary-plugins-DYxZ2L01.js → binary-plugins-PKMXJixJ.js} +1 -1
  15. package/dist/gateway/static/root/assets/{block-editor-DPsS76ci.js → block-editor-Dv83e7vb.js} +29 -29
  16. package/dist/gateway/static/root/assets/{browser-automation-inputs-BgK2Ma4E.js → browser-automation-inputs-B0TlAcoB.js} +1 -1
  17. package/dist/gateway/static/root/assets/browser-automations-page-C1mBYS2x.js +3 -0
  18. package/dist/gateway/static/root/assets/browser-settings-page-Co2D8mug.js +3 -0
  19. package/dist/gateway/static/root/assets/{capabilities-C2vyJC-B.js → capabilities-e-fO70DK.js} +1 -1
  20. package/dist/gateway/static/root/assets/{capabilities-page-Cfk_8vgn.js → capabilities-page-nIIqZJuL.js} +2 -2
  21. package/dist/gateway/static/root/assets/capabilities-settings-panel-BrXWQIs7.js +8 -0
  22. package/dist/gateway/static/root/assets/{capability-header-actions-BR4YfU1r.js → capability-header-actions-C6d_GsqD.js} +1 -1
  23. package/dist/gateway/static/root/assets/channels-EUbBfvHY.js +1 -0
  24. package/dist/gateway/static/root/assets/{chat-terminal-dock-DVL0pNfw.js → chat-terminal-dock-CZTrJ5Do.js} +2 -2
  25. package/dist/gateway/static/root/assets/{computer-settings-page-B6bMn9_o.js → computer-settings-page-CWBZwtYT.js} +1 -1
  26. package/dist/gateway/static/root/assets/{connector-service-page-DTf0AE08.js → connector-service-page-B5pF87fY.js} +1 -1
  27. package/dist/gateway/static/root/assets/connectors-page-9ztbuGCI.js +2 -0
  28. package/dist/gateway/static/root/assets/{date-picker-BvUz7Jmo.js → date-picker-xb5w8iAa.js} +1 -1
  29. package/dist/gateway/static/root/assets/{dependency-picker-BS9PH0_F.js → dependency-picker-D7B6s4d4.js} +1 -1
  30. package/dist/gateway/static/root/assets/{desktop-pet-CdD76KQc.js → desktop-pet-Bt5JatKm.js} +1 -1
  31. package/dist/gateway/static/root/assets/{desktop-pet-settings-DV8cAkA-.js → desktop-pet-settings-BdgUJk-e.js} +1 -1
  32. package/dist/gateway/static/root/assets/device-pairing-wizard-DQ7LNTKz.js +1 -0
  33. package/dist/gateway/static/root/assets/{directory-picker-path-field-6GF0kAvg.js → directory-picker-path-field-_PcWmfRH.js} +1 -1
  34. package/dist/gateway/static/root/assets/{extension-debug-page-DUkakgyK.js → extension-debug-page-BhXwxHMP.js} +1 -1
  35. package/dist/gateway/static/root/assets/{extension-page-BP4yNpNV.js → extension-page-CIXPBzGU.js} +1 -1
  36. package/dist/gateway/static/root/assets/{extension-settings-page-IknmkkwV.js → extension-settings-page-DE4UUMD-.js} +1 -1
  37. package/dist/gateway/static/root/assets/{gateway-config-swr-COCA8geG.js → gateway-config-swr-CmjHbMj7.js} +1 -1
  38. package/dist/gateway/static/root/assets/{gateway-realtime-Blcloycq.js → gateway-realtime-DzyR6LYb.js} +1 -1
  39. package/dist/gateway/static/root/assets/gateway-realtime-store-KyhksZSM.js +1 -0
  40. package/dist/gateway/static/root/assets/gateway-settings-CI2oGZEg.js +1 -0
  41. package/dist/gateway/static/root/assets/{gateway-startup-retry-CradGmBo.js → gateway-startup-retry-CbOUnKv5.js} +1 -1
  42. package/dist/gateway/static/root/assets/home-page-DfJvuWC-.js +1 -0
  43. package/dist/gateway/static/root/assets/{image-generation-api-CCe_-wBX.js → image-generation-api-BmLpVntI.js} +1 -1
  44. package/dist/gateway/static/root/assets/{imports-page-M8CMzgwX.js → imports-page-DRG-aahH.js} +1 -1
  45. package/dist/gateway/static/root/assets/index-CPi50n0l.css +1 -0
  46. package/dist/gateway/static/root/assets/index-Z6i4GDcT.js +106 -0
  47. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CTExu4KJ.js → keyboard-shortcuts-settings-CSwc_Olv.js} +1 -1
  48. package/dist/gateway/static/root/assets/{local-app-workbench-page-DIkqWLTJ.js → local-app-workbench-page-DsSCCThS.js} +1 -1
  49. package/dist/gateway/static/root/assets/{local-apps-page-Cev794Mq.js → local-apps-page-C4psaPz5.js} +1 -1
  50. package/dist/gateway/static/root/assets/{local-session-drafts-CIcrQnQp.js → local-session-drafts-CxXjQ5Du.js} +1 -1
  51. package/dist/gateway/static/root/assets/{locale-store-K7mHrs6W.js → locale-store-WMaCMm3_.js} +1 -1
  52. package/dist/gateway/static/root/assets/{logs-page-Dj7n8b3d.js → logs-page-kx7ama7K.js} +2 -2
  53. package/dist/gateway/static/root/assets/management-settings-BqcrFVsF.js +1 -0
  54. package/dist/gateway/static/root/assets/{markdown-view-BNVvybMV.js → markdown-view-Oe4rXk1N.js} +1 -1
  55. package/dist/gateway/static/root/assets/{media-plugins-B6fa5xON.js → media-plugins-BCMV9heb.js} +1 -1
  56. package/dist/gateway/static/root/assets/messages-sXePe3LQ.js +3 -0
  57. package/dist/gateway/static/root/assets/note-detail-panel-Bvjc5JNM.js +5 -0
  58. package/dist/gateway/static/root/assets/notes-page-Dak5PuTq.js +8 -0
  59. package/dist/gateway/static/root/assets/{page-context-capture-button-2DW_Izyo.js → page-context-capture-button-BYQnvTni.js} +1 -1
  60. package/dist/gateway/static/root/assets/{page-tabs-Cjglz5aP.js → page-tabs--d3GEnvY.js} +1 -1
  61. package/dist/gateway/static/root/assets/{preview-open-alternatives-2lyQ_MmL.js → preview-open-alternatives-ByuWaDEv.js} +1 -1
  62. package/dist/gateway/static/root/assets/{product-open-page-BKAv2MFW.js → product-open-page-CMvjGjTz.js} +1 -1
  63. package/dist/gateway/static/root/assets/project-detail-page-m8ybJpJ_.js +1 -0
  64. package/dist/gateway/static/root/assets/projects-page-i00ns68r.js +1 -0
  65. package/dist/gateway/static/root/assets/{registry-api-DKxVZeHC.js → registry-api-DEePN1Rc.js} +1 -1
  66. package/dist/gateway/static/root/assets/remote-access-hub-CY4kQa1Z.js +1 -0
  67. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-iAbOoncf.js → runtime-tools-settings-panel-D-gA6BW9.js} +2 -2
  68. package/dist/gateway/static/root/assets/{scenes-page-BN6zUrwp.js → scenes-page--sExi9Fz.js} +2 -2
  69. package/dist/gateway/static/root/assets/{schema-form-DI21ybo-.js → schema-form-B8Zns_Se.js} +1 -1
  70. package/dist/gateway/static/root/assets/{session-api-DoE_8MbN.js → session-api-Bv-hCMKS.js} +1 -1
  71. package/dist/gateway/static/root/assets/{session-manager-B6_KNduD.js → session-manager-BcDptzCN.js} +1 -1
  72. package/dist/gateway/static/root/assets/sessions-page-BzW33zp4.js +1 -0
  73. package/dist/gateway/static/root/assets/settings-advanced-gate-CVnn1f7J.js +1 -0
  74. package/dist/gateway/static/root/assets/{settings-form-section-B_r52FLh.js → settings-form-section-Lpep8yx-.js} +1 -1
  75. package/dist/gateway/static/root/assets/{settings-page-BNT9fll3.js → settings-page-Cl_KOVsG.js} +1 -1
  76. package/dist/gateway/static/root/assets/setup-status-panel-mWQaql5h.js +1 -0
  77. package/dist/gateway/static/root/assets/{share-preview-page-ByxaJBO7.js → share-preview-page-ZZ6qg3xL.js} +1 -1
  78. package/dist/gateway/static/root/assets/shares-settings-DhQRwYYL.js +1 -0
  79. package/dist/gateway/static/root/assets/{skill-api-D3Qzxo6w.js → skill-api-DC3EXeUS.js} +1 -1
  80. package/dist/gateway/static/root/assets/skill-reload-api-C-Dn5hSx.js +1 -0
  81. package/dist/gateway/static/root/assets/skills-page-ThkBmKew.js +2 -0
  82. package/dist/gateway/static/root/assets/{system-settings-panel-DPasmTr-.js → system-settings-panel-C93mkvML.js} +1 -1
  83. package/dist/gateway/static/root/assets/task-detail-page-DWqYIP_j.js +1 -0
  84. package/dist/gateway/static/root/assets/{tunnel-api-DshPpr1H.js → tunnel-api-DI4NcRc8.js} +1 -1
  85. package/dist/gateway/static/root/assets/{usage-page-YXuop6gX.js → usage-page-C--1ibDb.js} +1 -1
  86. package/dist/gateway/static/root/assets/{use-autosave-CyQzBYru.js → use-autosave-83u3Kf_7.js} +1 -1
  87. package/dist/gateway/static/root/assets/user-model-page-DasK0_MY.js +2 -0
  88. package/dist/gateway/static/root/assets/{voice-api-key-field-DUv7pxEZ.js → voice-api-key-field-D4SxKV47.js} +1 -1
  89. package/dist/gateway/static/root/assets/{voice-config-api-C9HKTnnD.js → voice-config-api-DbjjZkIg.js} +1 -1
  90. package/dist/gateway/static/root/assets/{work-discovery-overlay-DWbprlt4.js → work-discovery-overlay-RSWjSoEp.js} +1 -1
  91. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BofmD9MZ.js → workflow-run-setup-panel-BINT9Shl.js} +2 -2
  92. package/dist/gateway/static/root/assets/workflows-page-Bj3K-lxR.js +6 -0
  93. package/dist/gateway/static/root/index.html +15 -15
  94. package/dist/package.js +1 -1
  95. package/dist/src/agent/agent-manager.js +4 -4
  96. package/dist/src/agent/background-review/run-background-review.js +1 -1
  97. package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
  98. package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
  99. package/dist/src/agent/image/tool-model-config.js +1 -1
  100. package/dist/src/agent/service.js +2 -2
  101. package/dist/src/agent/tools/xopc-use-tool.js +2 -2
  102. package/dist/src/agent-catalog/capabilities.js +2 -2
  103. package/dist/src/auth/credentials.js +1 -1
  104. package/dist/src/auth/oauth-provider-lock.js +1 -1
  105. package/dist/src/auth/sync-provider-auth.js +1 -1
  106. package/dist/src/automations/capabilities/drafts.js +1 -1
  107. package/dist/src/bootstrap/application-state.js +1 -1
  108. package/dist/src/capabilities/runtime/dispatcher.js +1 -1
  109. package/dist/src/capabilities/runtime/product.js +1 -1
  110. package/dist/src/chat-commands/agent-edit.js +1 -1
  111. package/dist/src/chat-commands/builtins/config.js +1 -1
  112. package/dist/src/cli/commands/agent.js +1 -1
  113. package/dist/src/cli/commands/agents.js +1 -1
  114. package/dist/src/cli/commands/models.js +1 -1
  115. package/dist/src/cli/commands/onboard/model.js +2 -2
  116. package/dist/src/cli/utils/init-workspace-core.js +1 -1
  117. package/dist/src/config/index.js +4 -4
  118. package/dist/src/config/loader.js +2 -2
  119. package/dist/src/config/models-json.js +1 -1
  120. package/dist/src/config/schema.js +1 -1
  121. package/dist/src/extensions/agent-plugins/validation.js +1 -1
  122. package/dist/src/gateway/agents-admin.js +2 -2
  123. package/dist/src/gateway/file-path-classifier.js +1 -1
  124. package/dist/src/gateway/hono/lib/config-payload.js +1 -1
  125. package/dist/src/gateway/hono/routes/ai-assist.js +1 -1
  126. package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
  127. package/dist/src/gateway/hono/routes/models.js +1 -1
  128. package/dist/src/gateway/hono/routes/notes.js +2 -2
  129. package/dist/src/gateway/hono/routes/projects.js +2 -2
  130. package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
  131. package/dist/src/gateway/hono/routes/tasks.js +1 -1
  132. package/dist/src/gateway/image-generation-setup.js +2 -2
  133. package/dist/src/gateway/lock.js +1 -1
  134. package/dist/src/gateway/service.js +2 -2
  135. package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
  136. package/dist/src/local-apps/service.js +1 -1
  137. package/dist/src/providers/model-catalog-persistence.js +1 -1
  138. package/dist/src/tasks/capabilities/read.js +2 -2
  139. package/dist/src/tui/backends/embedded-backend.js +3 -3
  140. package/dist/src/tui/tui-commands.js +1 -1
  141. package/dist/src/tui/tui-startup-resources.js +1 -1
  142. package/dist/src/tui/tui.js +1 -1
  143. package/dist/src/voice/realtime/persona-context.js +1 -1
  144. package/package.json +1 -1
  145. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DrNeejJd.js +0 -1
  146. package/dist/gateway/static/root/assets/agents-DRU5Cc7r.js +0 -70
  147. package/dist/gateway/static/root/assets/apps-page-B-UzNCWD.js +0 -1
  148. package/dist/gateway/static/root/assets/automations-workspace-7wnqz-B1.js +0 -7
  149. package/dist/gateway/static/root/assets/browser-automations-page-CT20Kt5U.js +0 -3
  150. package/dist/gateway/static/root/assets/browser-settings-page-CB39uOH-.js +0 -3
  151. package/dist/gateway/static/root/assets/capabilities-settings-panel-Boiv7dpU.js +0 -8
  152. package/dist/gateway/static/root/assets/channels-BAu_NG0v.js +0 -1
  153. package/dist/gateway/static/root/assets/connectors-page-BrBTuiQu.js +0 -2
  154. package/dist/gateway/static/root/assets/device-pairing-wizard-4wD8Pb-g.js +0 -1
  155. package/dist/gateway/static/root/assets/gateway-realtime-store-B87bp5kF.js +0 -1
  156. package/dist/gateway/static/root/assets/gateway-settings-bpaxXMOz.js +0 -1
  157. package/dist/gateway/static/root/assets/home-page-ZqLG2X-z.js +0 -1
  158. package/dist/gateway/static/root/assets/index-0fDWYKsQ.js +0 -106
  159. package/dist/gateway/static/root/assets/index-s6fKtM4y.css +0 -1
  160. package/dist/gateway/static/root/assets/management-settings-CfgGWl3l.js +0 -1
  161. package/dist/gateway/static/root/assets/messages-CY3XVeek.js +0 -3
  162. package/dist/gateway/static/root/assets/note-detail-panel-DWd8h1MC.js +0 -5
  163. package/dist/gateway/static/root/assets/notes-page-C6x2cjau.js +0 -8
  164. package/dist/gateway/static/root/assets/project-detail-page-Bz_1bF6c.js +0 -1
  165. package/dist/gateway/static/root/assets/projects-page-DW7FI96H.js +0 -1
  166. package/dist/gateway/static/root/assets/remote-access-hub-zL2Mi5oM.js +0 -1
  167. package/dist/gateway/static/root/assets/sessions-page-CjfA7rah.js +0 -1
  168. package/dist/gateway/static/root/assets/settings-advanced-gate-DqCD-vFm.js +0 -1
  169. package/dist/gateway/static/root/assets/setup-status-panel-QAG-Gj3Y.js +0 -1
  170. package/dist/gateway/static/root/assets/shares-settings-B-H0tqRz.js +0 -1
  171. package/dist/gateway/static/root/assets/skill-reload-api-DtZy-0cc.js +0 -1
  172. package/dist/gateway/static/root/assets/skills-page-gCSDewRg.js +0 -2
  173. package/dist/gateway/static/root/assets/task-detail-page-4zD1dJY8.js +0 -1
  174. package/dist/gateway/static/root/assets/user-model-page-BLCVHuv3.js +0 -2
  175. package/dist/gateway/static/root/assets/workflows-page-Ce28ZKPq.js +0 -6
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{g as i}from"./chunk-KS7C4IRE-BMYIfy9x.js";import{t as a}from"./popover-select-0p9PIHRy.js";import{t as o}from"./plus-Q2yW6OE7.js";import{t as s}from"./search-DA7gz22f.js";import{t as c}from"./x-B_N4OPjy.js";import{t as l}from"./messages-CY3XVeek.js";import{t as u}from"./cn-JdwAhgNB.js";import{i as d,n as ee,r as f}from"./locale-store-K7mHrs6W.js";import{a as p,n as m,o as h,r as g,s as _,t as v}from"./dist-BGTk37IG.js";import{i as y}from"./vendor-swr-BIWyz7Rc.js";import{t as b}from"./button-CS04eWY9.js";import{i as x,o as S}from"./settings-shell-dialog-layer-BU3UuiJr.js";import{Bu as C,Ic as te,Nc as w,Ta as T,Vu as E,_l as D,ld as O,wa as k,za as ne,zl as A}from"./index-0fDWYKsQ.js";import{t as j}from"./page-tabs-Cjglz5aP.js";import{n as M,r as N,t as P}from"./settings-page-layout-X1x-2Cp9.js";import{t as F}from"./device-pairing-wizard-4wD8Pb-g.js";import{n as I}from"./settings-loading-skeleton-CAmWMaOT.js";var L=e(t(),1),R=n(),z=720*60*60*1e3;function B(e){let t=[e.access,e.principal].filter(e=>e!==null);return t.length>0&&t.every(e=>e.revokedAt!==void 0)}function V(e){return B(e)?`revoked`:e.endpoints.length>0?`online`:`offline`}function re(e){return new Set(e.endpoints.flatMap(e=>e.tools.map(({descriptor:e})=>e.name))).size}function ie(e,t=Date.now()){return V(e)===`offline`?(e.lastSeenAt??e.createdAt)<t-z:!1}function ae(e,t,n=Date.now()){let r=t.query.trim().toLocaleLowerCase();return e.filter(e=>{let i=V(e),a=t.status===`all`||(t.status===`active`?i!==`revoked`:t.status===`stale`?ie(e,n):i===t.status),o=!t.platform||e.platform===t.platform,s=!r||[e.displayName,e.id,e.kind,e.platform].some(e=>e.toLocaleLowerCase().includes(r));return a&&o&&s})}function oe(e){return e.length>8?e.slice(-8):e}var H=r();function se(e){let t=(0,R.c)(59),{device:n,busy:r,onClose:i,onRevoke:a}=e,o=ee(U),s;t[0]===o?s=t[1]:(s=l(o),t[0]=o,t[1]=s);let d=s.endpointToolsSettings,f=o===`zh`?`zh-CN`:`en`,y;t[2]===f?y=t[3]:(y=new Intl.DateTimeFormat(f,{dateStyle:`medium`,timeStyle:`short`}),t[2]=f,t[3]=y);let C=y,w;t[4]===n?w=t[5]:(w=n?V(n):`offline`,t[4]=n,t[5]=w);let T=w,E=n!==null,D;t[6]===i?D=t[7]:(D=e=>!e&&i(),t[6]=i,t[7]=D);let O;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,H.jsx)(p,{className:u(`xopc-dialog-overlay fixed inset-0 bg-scrim`,S)}),t[8]=O):O=t[8];let k;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(k=u(`xopc-drawer-right fixed right-0 top-0 flex size-full max-w-lg flex-col border-l border-edge bg-surface-overlay shadow-popover outline-none`,x),t[9]=k):k=t[9];let ne=n?.displayName??d.deviceDetails,A;t[10]===ne?A=t[11]:(A=(0,H.jsx)(_,{className:`truncate text-base font-semibold text-fg`,children:ne}),t[10]=ne,t[11]=A);let j;t[12]===n?j=t[13]:(j=n?(0,H.jsxs)(`p`,{className:`mt-0.5 text-xs text-fg-muted`,children:[n.kind,` · `,n.platform,` · `,oe(n.id)]}):null,t[12]=n,t[13]=j);let M;t[14]!==A||t[15]!==j?(M=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[A,j]}),t[14]=A,t[15]=j,t[16]=M):M=t[16];let N;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,H.jsx)(c,{className:`size-5`,"aria-hidden":!0}),t[17]=N):N=t[17];let P;t[18]===d.close?P=t[19]:(P=(0,H.jsx)(m,{asChild:!0,children:(0,H.jsx)(b,{variant:`ghost`,className:`size-9 shrink-0 p-0`,"aria-label":d.close,children:N})}),t[18]=d.close,t[19]=P);let F;t[20]!==M||t[21]!==P?(F=(0,H.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-3 border-b border-edge px-4 py-3`,children:[M,P]}),t[20]=M,t[21]=P,t[22]=F):F=t[22];let I;t[23]!==d.accessActive||t[24]!==d.accessRevoked||t[25]!==d.accessTitle||t[26]!==d.createdAt||t[27]!==d.endpointCount||t[28]!==d.endpointsTitle||t[29]!==d.identityId||t[30]!==d.identityTitle||t[31]!==d.lastSeen||t[32]!==d.never||t[33]!==d.noAccessIdentity||t[34]!==d.noOnlineEndpoints||t[35]!==d.noPermissions||t[36]!==d.permissions||t[37]!==d.status||t[38]!==d.statusLabel||t[39]!==d.toolCount||t[40]!==n||t[41]!==C||t[42]!==T?(I=n?(0,H.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-5 overflow-y-auto p-4`,children:[(0,H.jsxs)(`dl`,{className:`grid grid-cols-2 gap-3 rounded-xl bg-surface-hover/40 p-4`,children:[(0,H.jsx)(W,{label:d.statusLabel,value:d.status[T]}),(0,H.jsx)(W,{label:d.lastSeen,value:n.lastSeenAt?C.format(n.lastSeenAt):d.never}),(0,H.jsx)(W,{label:d.endpointCount,value:String(n.endpoints.length)}),(0,H.jsx)(W,{label:d.toolCount,value:String(re(n))})]}),(0,H.jsxs)(`section`,{children:[(0,H.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:d.accessTitle}),(0,H.jsx)(`div`,{className:`mt-2 rounded-xl border border-edge-subtle bg-surface-base p-3 text-xs text-fg-muted`,children:n.access?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{children:n.access.revokedAt?d.accessRevoked:d.accessActive}),(0,H.jsxs)(`p`,{className:`mt-1 break-words`,children:[d.permissions,`: `,n.access.scopes.join(`, `)||d.noPermissions]})]}):(0,H.jsx)(`p`,{children:d.noAccessIdentity})})]}),(0,H.jsxs)(`section`,{children:[(0,H.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:d.endpointsTitle}),(0,H.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[n.endpoints.length===0?(0,H.jsx)(`p`,{className:`text-sm text-fg-muted`,children:d.noOnlineEndpoints}):null,n.endpoints.map(e=>(0,H.jsxs)(`article`,{className:`rounded-xl border border-edge-subtle bg-surface-base p-3`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,H.jsx)(`p`,{className:`min-w-0 break-all text-xs font-medium text-fg`,children:e.endpointId}),(0,H.jsxs)(`span`,{className:`text-xs text-fg-muted`,children:[d.status[e.availability],` · v`,e.appVersion]})]}),(0,H.jsx)(`div`,{className:`mt-3 space-y-2`,children:e.tools.map(e=>{let{descriptor:t}=e;return(0,H.jsxs)(`div`,{className:`rounded-lg bg-surface-hover/50 px-3 py-2`,children:[(0,H.jsx)(`p`,{className:`break-all text-xs font-medium text-fg`,children:t.name}),(0,H.jsx)(`p`,{className:`mt-0.5 break-words text-xs text-fg-subtle`,children:t.requiredPermissions.join(`, `)||d.noPermissions})]},t.name)})})]},e.connectionId))]})]}),(0,H.jsxs)(`section`,{children:[(0,H.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:d.identityTitle}),(0,H.jsxs)(`dl`,{className:`mt-2 rounded-xl border border-edge-subtle bg-surface-base p-3 text-xs`,children:[(0,H.jsx)(W,{label:d.identityId,value:n.id,breakAll:!0}),(0,H.jsx)(`div`,{className:`mt-3`,children:(0,H.jsx)(W,{label:d.createdAt,value:C.format(n.createdAt)})})]})]})]}):null,t[23]=d.accessActive,t[24]=d.accessRevoked,t[25]=d.accessTitle,t[26]=d.createdAt,t[27]=d.endpointCount,t[28]=d.endpointsTitle,t[29]=d.identityId,t[30]=d.identityTitle,t[31]=d.lastSeen,t[32]=d.never,t[33]=d.noAccessIdentity,t[34]=d.noOnlineEndpoints,t[35]=d.noPermissions,t[36]=d.permissions,t[37]=d.status,t[38]=d.statusLabel,t[39]=d.toolCount,t[40]=n,t[41]=C,t[42]=T,t[43]=I):I=t[43];let L;t[44]!==r||t[45]!==d.removeDevice||t[46]!==d.revoking||t[47]!==n||t[48]!==a||t[49]!==T?(L=n&&T!==`revoked`?(0,H.jsx)(`div`,{className:`shrink-0 border-t border-edge px-4 py-3`,children:(0,H.jsxs)(b,{variant:`secondary`,className:`w-full text-danger`,disabled:r,onClick:()=>a(n),children:[(0,H.jsx)(te,{className:`size-4`,"aria-hidden":!0}),r?d.revoking:d.removeDevice]})}):null,t[44]=r,t[45]=d.removeDevice,t[46]=d.revoking,t[47]=n,t[48]=a,t[49]=T,t[50]=L):L=t[50];let z;t[51]!==F||t[52]!==I||t[53]!==L?(z=(0,H.jsxs)(h,{children:[O,(0,H.jsxs)(g,{className:k,"aria-describedby":void 0,children:[F,I,L]})]}),t[51]=F,t[52]=I,t[53]=L,t[54]=z):z=t[54];let B;return t[55]!==z||t[56]!==E||t[57]!==D?(B=(0,H.jsx)(v,{open:E,onOpenChange:D,children:z}),t[55]=z,t[56]=E,t[57]=D,t[58]=B):B=t[58],B}function U(e){return e.language}function W(e){let t=(0,R.c)(10),{label:n,value:r,breakAll:i}=e,a=i===void 0?!1:i,o;t[0]===n?o=t[1]:(o=(0,H.jsx)(`dt`,{className:`text-xs text-fg-subtle`,children:n}),t[0]=n,t[1]=o);let s=a&&`break-all font-mono text-xs`,c;t[2]===s?c=t[3]:(c=u(`mt-1 text-sm text-fg`,s),t[2]=s,t[3]=c);let l;t[4]!==c||t[5]!==r?(l=(0,H.jsx)(`dd`,{className:c,children:r}),t[4]=c,t[5]=r,t[6]=l):l=t[6];let d;return t[7]!==o||t[8]!==l?(d=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[o,l]}),t[7]=o,t[8]=l,t[9]=d):d=t[9],d}function ce(e){let t=(0,R.c)(19),{onPaired:n}=e,[r,a]=i(),s=ee(le),c;t[0]===s?c=t[1]:(c=l(s),t[0]=s,t[1]=c);let u=c.endpointToolsSettings.deviceAccess,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d={open:!1},t[2]=d):d=t[2];let[f,p]=(0,L.useState)(d),m,h;t[3]!==r||t[4]!==a?(m=()=>{let e=r.get(`startDevicePairing`);e!==`mobile`&&e!==`browser`||(p({open:!0,target:e}),a(G,{replace:!0}))},h=[r,a],t[3]=r,t[4]=a,t[5]=m,t[6]=h):(m=t[5],h=t[6]),(0,L.useEffect)(m,h);let g,_;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>p({open:!0}),_=(0,H.jsx)(o,{className:`size-4`,"aria-hidden":!0}),t[7]=g,t[8]=_):(g=t[7],_=t[8]);let v;t[9]===u.addDevice?v=t[10]:(v=(0,H.jsxs)(b,{variant:`primary`,onClick:g,children:[_,u.addDevice]}),t[9]=u.addDevice,t[10]=v);let y;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>p(t=>({...t,open:e})),t[11]=y):y=t[11];let x;t[12]!==f.open||t[13]!==f.target||t[14]!==n?(x=(0,H.jsx)(F,{open:f.open,onOpenChange:y,onPaired:n,targetKind:f.target}),t[12]=f.open,t[13]=f.target,t[14]=n,t[15]=x):x=t[15];let S;return t[16]!==v||t[17]!==x?(S=(0,H.jsxs)(H.Fragment,{children:[v,x]}),t[16]=v,t[17]=x,t[18]=S):S=t[18],S}function G(e){let t=new URLSearchParams(e);return t.delete(`startDevicePairing`),t}function le(e){return e.language}async function ue(e){let t=await e.json().catch(()=>null);if(!e.ok||t?.payload===void 0)throw Error(t?.error?.message??`Endpoint management request failed: ${e.status}`);return t.payload}function de(){return f(`/api/endpoint-tools/devices`)}function fe(e){let t=new URLSearchParams({page:String(e.page),pageSize:String(e.pageSize)});return e.query.trim()&&t.set(`query`,e.query.trim()),e.principalId&&t.set(`principalId`,e.principalId),e.status&&t.set(`status`,e.status),e.effect&&t.set(`effect`,e.effect),f(`/api/endpoint-tools/invocations?${t}`)}async function pe(){return ue(await d(de()))}async function me(e){let t=Array.from({length:Math.ceil(e.length/100)},(t,n)=>e.slice(n*100,(n+1)*100));await Promise.all(t.map(async e=>{await ue(await d(f(`/api/endpoint-tools/devices/revoke`),{method:`POST`,body:JSON.stringify({ids:e})}))}))}async function he(e){return ue(await d(fe(e)))}var ge=5e3,K=20,_e=20;function ve(e){return e===`online`||e===`succeeded`?`bg-success-soft text-success`:e===`running`?`bg-accent-soft text-accent-fg`:e===`failed`||e===`revoked`?`bg-danger-soft text-danger`:`bg-surface-hover text-fg-muted`}function ye(e){let t=(0,R.c)(5),{status:n,label:r}=e,i;t[0]===n?i=t[1]:(i=u(`rounded-full px-2 py-0.5 text-xs font-medium`,ve(n)),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,H.jsx)(`span`,{className:i,children:r}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function be(){let e=ee(e=>e.language),t=l(e).endpointToolsSettings,[n,r]=i(),o=n.get(`view`)===`activity`?`activity`:`devices`,[c,d]=(0,L.useState)(null),[f,p]=(0,L.useState)([]),[m,h]=(0,L.useState)(!1),[g,_]=(0,L.useState)(!1),[v,x]=(0,L.useState)(``),[S,F]=(0,L.useState)(`active`),[R,z]=(0,L.useState)(``),[B,U]=(0,L.useState)(1),[W,G]=(0,L.useState)(()=>new Set),[le,ue]=(0,L.useState)(``),[ve]=ne(le,250),[be,xe]=(0,L.useState)(``),[Se,Ce]=(0,L.useState)(``),[we,Te]=(0,L.useState)(``),[Ee,q]=(0,L.useState)(1),De={page:Ee,pageSize:_e,query:ve,principalId:be,status:Se,effect:we},J=y(de(),pe,{refreshInterval:ge}),Y=y(o===`activity`?fe(De):null,()=>he(De),{refreshInterval:ge,keepPreviousData:!0}),Oe=(0,L.useMemo)(()=>new Intl.DateTimeFormat(e===`zh`?`zh-CN`:`en`,{dateStyle:`medium`,timeStyle:`short`}),[e]);if(J.isLoading&&!J.data)return(0,H.jsx)(N,{children:(0,H.jsx)(I,{sections:2})});let X=J.data??[],ke=Y.data?.items??[],Ae=X.filter(e=>V(e)===`online`).length,je=X.filter(e=>V(e)!==`revoked`).length,Me=X.filter(e=>ie(e)).length,Ne=[...new Set(X.map(e=>e.platform))].toSorted(),Z=ae(X,{query:v,status:S,platform:R}),Pe=Math.max(1,Math.ceil(Z.length/K)),Q=Math.min(B,Pe),Fe=Z.slice((Q-1)*K,Q*K),$=Fe.reduce((e,t)=>(V(t)!==`revoked`&&e.push(t.id),e),[]),Ie=$.length>0&&$.every(e=>W.has(e)),Le=e=>{r(t=>{let n=new URLSearchParams(t);return e===`devices`?n.delete(`view`):n.set(`view`,e),n},{replace:!0})},Re=async()=>{await Promise.all([J.mutate(),o===`activity`?Y.mutate():Promise.resolve()])},ze=async()=>{if(!(f.length===0||m)){h(!0),_(!1);try{await me(f.map(e=>e.id)),p([]),G(new Set),await J.mutate()}catch{_(!0)}finally{h(!1)}}},Be=e=>{e(),U(1),G(new Set)};return(0,H.jsxs)(N,{children:[(0,H.jsx)(M,{title:t.title,subtitle:t.subtitle,actions:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(k,{className:`size-9 shrink-0 p-0`,label:t.refresh,onClick:Re}),(0,H.jsx)(ce,{onPaired:()=>void J.mutate()})]})}),J.error||Y.error?(0,H.jsx)(`div`,{className:`rounded-xl bg-danger-soft px-4 py-3 text-sm text-danger`,children:t.loadError}):null,(0,H.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[{label:t.activeDevices,value:je,filter:`active`},{label:t.onlineDevices,value:Ae,filter:`online`},{label:t.staleDevices,value:Me,filter:`stale`}].map(({label:e,value:t,filter:n})=>(0,H.jsxs)(`button`,{type:`button`,className:u(`touch-target rounded-xl px-4 py-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,S===n?`bg-surface-active`:`bg-surface-hover/20 hover:bg-surface-hover/50`),"aria-pressed":S===n,onClick:()=>{Be(()=>F(n)),Le(`devices`)},children:[(0,H.jsx)(`span`,{className:`text-xs text-fg-muted`,children:e}),(0,H.jsx)(`span`,{className:`mt-1 block text-2xl font-semibold text-fg`,children:t})]},n))}),(0,H.jsx)(j,{items:[{id:`devices`,label:t.devicesTab,icon:D,count:je},{id:`activity`,label:t.activityTab,icon:O,count:Y.data?.total}],activeTab:o,onChange:Le,ariaLabel:t.viewsAria,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`}),(0,H.jsxs)(P,{id:`devices`,activeTab:o,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`,title:t.devicesTitle,hint:t.devicesHint,children:[(0,H.jsxs)(`div`,{className:`mb-4 grid gap-2 sm:grid-cols-[minmax(0,1fr)_11rem_11rem]`,children:[(0,H.jsxs)(`label`,{className:`relative block`,children:[(0,H.jsx)(`span`,{className:`sr-only`,children:t.searchDevices}),(0,H.jsx)(s,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,H.jsx)(`input`,{type:`search`,"aria-label":t.searchDevices,value:v,placeholder:t.searchDevices,className:`h-10 w-full rounded-lg border border-edge bg-surface-inset pl-9 pr-3 text-base text-fg placeholder:text-fg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:text-sm`,onChange:e=>Be(()=>x(e.target.value))})]}),(0,H.jsx)(a,{value:S,options:[{value:`active`,label:t.filterActive},{value:`online`,label:t.status.online},{value:`offline`,label:t.status.offline},{value:`stale`,label:t.filterStale},{value:`revoked`,label:t.status.revoked},{value:`all`,label:t.filterAll}],placeholder:t.statusLabel,allowEmpty:!1,ariaLabel:t.statusLabel,onChange:e=>Be(()=>F(e))}),(0,H.jsx)(a,{value:R,options:Ne.map(e=>({value:e,label:e})),placeholder:t.allPlatforms,emptyLabel:t.allPlatforms,ariaLabel:t.platformLabel,onChange:e=>Be(()=>z(e))})]}),W.size>0?(0,H.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-3 rounded-xl bg-accent-soft px-3 py-2`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium text-accent-fg`,children:t.selectedCount.replace(`{{count}}`,String(W.size))}),(0,H.jsxs)(b,{variant:`secondary`,className:`text-danger`,onClick:()=>{_(!1),p(X.filter(e=>W.has(e.id)))},children:[(0,H.jsx)(te,{className:`size-4`,"aria-hidden":!0}),t.removeSelected]})]}):null,X.length===0?(0,H.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noDevices}):Z.length===0?(0,H.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noMatchingDevices}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`flex min-h-10 items-center gap-3 border-b border-edge-subtle px-1`,children:(0,H.jsxs)(`label`,{className:u(`touch-target flex items-center gap-2 text-xs text-fg-muted`,$.length>0?`cursor-pointer`:`cursor-not-allowed opacity-50`),children:[(0,H.jsx)(`input`,{type:`checkbox`,"aria-label":t.selectPage,checked:Ie,disabled:$.length===0,className:`size-4 accent-accent`,onChange:e=>{G(t=>{let n=new Set(t);for(let t of $)e.target.checked?n.add(t):n.delete(t);return n})}}),t.selectPage]})}),(0,H.jsx)(`ul`,{className:`divide-y divide-edge-subtle`,children:Fe.map(e=>{let n=V(e),r=e.kind===`mobile`?w:A;return(0,H.jsxs)(`li`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(`label`,{className:u(`touch-target flex size-10 shrink-0 items-center justify-center`,n===`revoked`?`cursor-not-allowed opacity-40`:`cursor-pointer`),children:(0,H.jsx)(`input`,{type:`checkbox`,checked:W.has(e.id),disabled:n===`revoked`,"aria-label":t.selectDevice.replace(`{{name}}`,e.displayName),className:`size-4 accent-accent`,onChange:t=>{G(n=>{let r=new Set(n);return t.target.checked?r.add(e.id):r.delete(e.id),r})}})}),(0,H.jsxs)(`button`,{type:`button`,className:`touch-target flex min-w-0 flex-1 items-center gap-3 py-3 text-left hover:bg-surface-hover/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>d(e),children:[(0,H.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-inset text-fg-muted`,children:(0,H.jsx)(r,{className:`size-4`,"aria-hidden":!0})}),(0,H.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`truncate text-sm font-medium text-fg`,children:e.displayName}),(0,H.jsx)(ye,{status:n,label:t.status[n]})]}),(0,H.jsxs)(`span`,{className:`mt-1 block text-xs text-fg-muted`,children:[e.platform,` · `,oe(e.id),` · `,t.lastSeen,`: `,e.lastSeenAt?Oe.format(e.lastSeenAt):t.never]})]}),(0,H.jsx)(`span`,{className:`hidden shrink-0 text-right text-xs text-fg-muted sm:block`,children:t.endpointSummary.replace(`{{endpoints}}`,String(e.endpoints.length)).replace(`{{tools}}`,String(re(e)))}),(0,H.jsx)(C,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":!0})]})]},e.id)})}),(0,H.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 border-t border-edge-subtle pt-3`,children:[(0,H.jsx)(`p`,{className:`text-xs text-fg-muted`,children:t.paginationSummary.replace(`{{from}}`,String((Q-1)*K+1)).replace(`{{to}}`,String(Math.min(Q*K,Z.length))).replace(`{{total}}`,String(Z.length))}),(0,H.jsxs)(`div`,{className:`flex gap-2`,children:[(0,H.jsx)(b,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.previousPage,disabled:Q<=1,onClick:()=>U(e=>Math.max(1,e-1)),children:(0,H.jsx)(E,{className:`size-4`,"aria-hidden":!0})}),(0,H.jsx)(b,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.nextPage,disabled:Q>=Pe,onClick:()=>U(e=>Math.min(Pe,e+1)),children:(0,H.jsx)(C,{className:`size-4`,"aria-hidden":!0})})]})]})]})]}),(0,H.jsxs)(P,{id:`activity`,activeTab:o,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`,title:t.callsTitle,hint:t.callsHint,children:[(0,H.jsxs)(`div`,{className:`mb-4 grid gap-2 sm:grid-cols-2 lg:grid-cols-4`,children:[(0,H.jsxs)(`label`,{className:`relative block sm:col-span-2 lg:col-span-1`,children:[(0,H.jsx)(`span`,{className:`sr-only`,children:t.searchActivity}),(0,H.jsx)(s,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,H.jsx)(`input`,{type:`search`,"aria-label":t.searchActivity,value:le,placeholder:t.searchActivity,className:`h-10 w-full rounded-lg border border-edge bg-surface-inset pl-9 pr-3 text-base text-fg placeholder:text-fg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:text-sm`,onChange:e=>{ue(e.target.value),q(1)}})]}),(0,H.jsx)(a,{value:be,options:X.map(e=>({value:e.id,label:`${e.displayName} · ${oe(e.id)}`})),placeholder:t.allDevices,emptyLabel:t.allDevices,ariaLabel:t.deviceLabel,onChange:e=>{xe(e),q(1)}}),(0,H.jsx)(a,{value:Se,options:[{value:`running`,label:t.status.running},{value:`succeeded`,label:t.status.succeeded},{value:`failed`,label:t.status.failed}],placeholder:t.allStatuses,emptyLabel:t.allStatuses,ariaLabel:t.statusLabel,onChange:e=>{Ce(e),q(1)}}),(0,H.jsx)(a,{value:we,options:[{value:`read`,label:t.effects.read},{value:`write`,label:t.effects.write},{value:`destructive`,label:t.effects.destructive}],placeholder:t.allEffects,emptyLabel:t.allEffects,ariaLabel:t.effectLabel,onChange:e=>{Te(e),q(1)}})]}),Y.isLoading&&!Y.data?(0,H.jsx)(I,{sections:1}):null,ke.length===0&&!Y.isLoading?(0,H.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noMatchingCalls}):null,(0,H.jsx)(`div`,{className:`space-y-2`,children:ke.map(e=>(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 rounded-lg bg-surface-base/55 px-3 py-2.5`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`p`,{className:`break-all text-sm font-medium text-fg`,children:e.toolName}),(0,H.jsxs)(`p`,{className:`mt-0.5 text-xs text-fg-muted`,children:[Oe.format(e.startedAt),` · `,t.effects[e.effect],` · `,e.endpointId]}),e.errorMessage?(0,H.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:e.errorMessage}):null]}),(0,H.jsx)(ye,{status:e.status,label:t.status[e.status]})]},e.id))}),Y.data&&Y.data.total>0?(0,H.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 border-t border-edge-subtle pt-3`,children:[(0,H.jsx)(`p`,{className:`text-xs text-fg-muted`,children:t.paginationSummary.replace(`{{from}}`,String((Y.data.page-1)*Y.data.pageSize+1)).replace(`{{to}}`,String(Math.min(Y.data.page*Y.data.pageSize,Y.data.total))).replace(`{{total}}`,String(Y.data.total))}),(0,H.jsxs)(`div`,{className:`flex gap-2`,children:[(0,H.jsx)(b,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.previousPage,disabled:Y.data.page<=1,onClick:()=>q(e=>Math.max(1,e-1)),children:(0,H.jsx)(E,{className:`size-4`,"aria-hidden":!0})}),(0,H.jsx)(b,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.nextPage,disabled:Y.data.page>=Y.data.totalPages,onClick:()=>q(e=>Math.min(Y.data.totalPages,e+1)),children:(0,H.jsx)(C,{className:`size-4`,"aria-hidden":!0})})]})]}):null]}),(0,H.jsx)(se,{device:c,busy:m,onClose:()=>d(null),onRevoke:e=>{d(null),_(!1),p([e])}}),(0,H.jsx)(T,{open:f.length>0,title:f.length>1?t.removeManyTitle:t.removeTitle,description:`${f.length>1?t.removeManyDescription.replace(`{{count}}`,String(f.length)):t.removeDescription.replace(`{{name}}`,f[0]?.displayName??``)}${g?`\n\n${t.revokeError}`:``}`,confirmLabel:m?t.revoking:t.removeDevice,cancelLabel:t.cancel,destructive:!0,onConfirm:()=>void ze(),onCancel:()=>{m||p([])}})]})}export{be as EndpointToolsManagementSettings};