@p4code/cli 0.8.3 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/dist/{AcpMcpStdioBridge-D_JnxPWS.mjs → AcpMcpStdioBridge-CD9BQr2l.mjs} +1 -1
  2. package/dist/{AcpMcpStdioBridge-DBONIB-w.mjs → AcpMcpStdioBridge-DHwGLtep.mjs} +61 -4
  3. package/dist/bin.mjs +2 -2
  4. package/dist/{binCli-DouSNynJ.mjs → binCli-D9Qk_k5i.mjs} +492 -292
  5. package/dist/client/.vite/manifest.json +2138 -2115
  6. package/dist/client/assets/{AnimatedHeight-DoG4b7y8.js → AnimatedHeight-DKdClmyw.js} +2 -2
  7. package/dist/client/assets/{AuthSurfaceShell-DbeJoeXz.js → AuthSurfaceShell-UJgufrYU.js} +2 -2
  8. package/dist/client/assets/{CSPContext-DkFc4cYo.js → CSPContext-CTpTfAqS.js} +2 -2
  9. package/dist/client/assets/ChatGptUsageButton-9B_WUPVm.js +2 -0
  10. package/dist/client/assets/{ChatMarkdown-CLD9Y6dg.js → ChatMarkdown-B9_nJM54.js} +12 -12
  11. package/dist/client/assets/CodexSetupSection.logic-YSEDjbLd.js +2 -0
  12. package/dist/client/assets/{ComboboxClear-ZQvkAjz8.js → ComboboxClear-TEL6MsPn.js} +2 -2
  13. package/dist/client/assets/{CommandBlock-c98wFxMU.js → CommandBlock-C6bCrWJ5.js} +2 -2
  14. package/dist/client/assets/{ComposerPromptEditor-CBuOXkT9.js → ComposerPromptEditor-BpT2majW.js} +11 -11
  15. package/dist/client/assets/{CompositeRoot-BMUI_bmJ.js → CompositeRoot-CZuZX6hs.js} +2 -2
  16. package/dist/client/assets/{ConnectionStatusDot-B69zfKRh.js → ConnectionStatusDot-BX6msmak.js} +2 -2
  17. package/dist/client/assets/{DevicePanel-1xw7KQ15.js → DevicePanel-DavxmX2w.js} +2 -2
  18. package/dist/client/assets/{DeviceSetup-DemgUuG-.js → DeviceSetup-CZX8TKF_.js} +2 -2
  19. package/dist/client/assets/{DialogTitle-BXot7RA0.js → DialogTitle-CLcXbJRs.js} +2 -2
  20. package/dist/client/assets/{DiffCommentAnnotation-vAZP7JBy.js → DiffCommentAnnotation-B21n3tGU.js} +2 -2
  21. package/dist/client/assets/{DiffFileTree-BhqF8nD5.js → DiffFileTree--L--vp02.js} +2 -2
  22. package/dist/client/assets/DiffPanel-T4lIPUlN.js +2 -0
  23. package/dist/client/assets/{DiffWorkerPoolProvider-D4VIo5Vu.js → DiffWorkerPoolProvider-Cxzr_uYq.js} +3 -3
  24. package/dist/client/assets/{EnvironmentMachineIcon-DPQkDtvr.js → EnvironmentMachineIcon-CGINHXnT.js} +2 -2
  25. package/dist/client/assets/{ExpandableText-EZ9C25tN.js → ExpandableText-D1ewr-yU.js} +2 -2
  26. package/dist/client/assets/{FieldControl-C4IsJLMZ.js → FieldControl-BVq7aDv3.js} +2 -2
  27. package/dist/client/assets/{FileDiff-H9QHqXa0.js → FileDiff-C0ZCBwBc.js} +2 -2
  28. package/dist/client/assets/{FilePreviewPanel-DGm_SU_e.js → FilePreviewPanel-CxOIUI0_.js} +4 -4
  29. package/dist/client/assets/{FoldedSettingsSection-BSYFyChk.js → FoldedSettingsSection-DmcJrCZO.js} +2 -2
  30. package/dist/client/assets/{FormContext-DiXpMuU8.js → FormContext-CObkgUvS.js} +2 -2
  31. package/dist/client/assets/{Icons-DA4msgfR.js → Icons-CSHLGz_M.js} +2 -2
  32. package/dist/client/assets/{KeybindingsSettings.logic-7EBA0xLE.js → KeybindingsSettings.logic-D9eYCeK5.js} +2 -2
  33. package/dist/client/assets/{NoProjectsHero-YjEc2OIw.js → NoProjectsHero-C0RwYoYq.js} +2 -2
  34. package/dist/client/assets/{PanelLayoutControls-BfRIRM0o.js → PanelLayoutControls-CcE6oZUh.js} +8 -8
  35. package/dist/client/assets/{PierreEntryIcon-BxxykifK.js → PierreEntryIcon-D0PlfaRc.js} +2 -2
  36. package/dist/client/assets/PreviewPanel-DgRCZ-80.js +2 -0
  37. package/dist/client/assets/ProjectDefaultsSettings-DOXJKuJ7.js +2 -0
  38. package/dist/client/assets/{ProjectFavicon-CiauSitF.js → ProjectFavicon-CFPeQQsG.js} +3 -3
  39. package/dist/client/assets/ProjectIconPickerDialog-B5iXalFo.js +2 -0
  40. package/dist/client/assets/{ProjectMonogram-Bqe3OyZR.js → ProjectMonogram-HCgoNxPJ.js} +2 -2
  41. package/dist/client/assets/{ProviderAuthTerminal-D_OC5vdS.js → ProviderAuthTerminal-rBb4SeQd.js} +2 -2
  42. package/dist/client/assets/{ProviderModelPicker-Bfpy_Rw1.js → ProviderModelPicker-CHfA6QfR.js} +2 -2
  43. package/dist/client/assets/{ProviderSettingsForm-BA6yGdRn.js → ProviderSettingsForm-cr5QEWx_.js} +2 -2
  44. package/dist/client/assets/{PullRequestCodeTab-BOM7mgfd.js → PullRequestCodeTab-CyJ0_1HE.js} +3 -3
  45. package/dist/client/assets/{ReadOnlySourcePreview-C3LnvSkA.js → ReadOnlySourcePreview-BvUk75g2.js} +2 -2
  46. package/dist/client/assets/{RenderErrorBoundary-C-EIIrrq.js → RenderErrorBoundary-h3g72sj0.js} +2 -2
  47. package/dist/client/assets/ScheduledTasksSettings-CpUearCU.js +4 -0
  48. package/dist/client/assets/{ScopedSwitch-DsEcG6rk.js → ScopedSwitch-D1QVfZHR.js} +2 -2
  49. package/dist/client/assets/{SecretInput-Be5Akw8x.js → SecretInput-SiHUbFCV.js} +2 -2
  50. package/dist/client/assets/SettingsPanels-B9t76y-c.js +39 -0
  51. package/dist/client/assets/{SettingsPanels.logic-CLB8Pu-U.js → SettingsPanels.logic-B3IqBMv7.js} +2 -2
  52. package/dist/client/assets/{SettingsScopeNotice-CVoWG1oN.js → SettingsScopeNotice-B_awMQPw.js} +2 -2
  53. package/dist/client/assets/{T3ConnectAccountPages-ClNzwIQw.js → T3ConnectAccountPages-DOpj673A.js} +2 -2
  54. package/dist/client/assets/{T3ConnectSidebarSignIn-BqM_Vqe1.js → T3ConnectSidebarSignIn-zrB8y6DQ.js} +2 -2
  55. package/dist/client/assets/{ThemeEditorPanel-vVmQV_Vv.js → ThemeEditorPanel-Cx7KulxB.js} +2 -2
  56. package/dist/client/assets/{ThreadTerminalDrawer-aLeVbe6g.js → ThreadTerminalDrawer-ChcqArNC.js} +4 -4
  57. package/dist/client/assets/{Virtualizer-DTOYU5Jp.js → Virtualizer-DWmIp9HB.js} +2 -2
  58. package/dist/client/assets/{WorkspaceBreadcrumb-C9OPPGJE.js → WorkspaceBreadcrumb-Dx7xMwQd.js} +2 -2
  59. package/dist/client/assets/{WorkspacePageContainer-DtXJ5ept.js → WorkspacePageContainer-sM_H3DH4.js} +2 -2
  60. package/dist/client/assets/{WorkspacePageHeader-5zzLFpEN.js → WorkspacePageHeader-C_J7FxVt.js} +2 -2
  61. package/dist/client/assets/_chat-Du_FC4wO.js +45 -0
  62. package/dist/client/assets/{_chat.index-BP1JWABB.js → _chat.index-DUyKTtkh.js} +2 -2
  63. package/dist/client/assets/{_chat.new-BX5LyFum.js → _chat.new-CMoB99iV.js} +3 -3
  64. package/dist/client/assets/{_chat.pull-requests-B6-Vck8B.js → _chat.pull-requests-BuTKumeN.js} +2 -2
  65. package/dist/client/assets/{abnfDiagram-VCTEODGH-BXvAfzAg.js → abnfDiagram-VCTEODGH-D2OflHz4.js} +2 -2
  66. package/dist/client/assets/{alert-B-or1ble.js → alert-8IFNkYPw.js} +2 -2
  67. package/dist/client/assets/architecture-7GRP2DOG-BMsijJGx.js +1 -0
  68. package/dist/client/assets/{architectureDiagram-5GKGNRK7-MEUA3QVe.js → architectureDiagram-5GKGNRK7-Cz7fFw7N.js} +2 -2
  69. package/dist/client/assets/archive-x-D3w6saMD.js +2 -0
  70. package/dist/client/assets/arrow-left-DjrJekQJ.js +1 -0
  71. package/dist/client/assets/arrow-right-DNQ3322O.js +1 -0
  72. package/dist/client/assets/arrow-up-down-DpVszLOH.js +1 -0
  73. package/dist/client/assets/assets-DJce0KBy.js +2 -0
  74. package/dist/client/assets/bell-ehBYv81q.js +1 -0
  75. package/dist/client/assets/{blockDiagram-I7D4REHJ-BOdLeYJh.js → blockDiagram-I7D4REHJ-BcqcXQ0x.js} +2 -2
  76. package/dist/client/assets/blocks-CF1Wdm4Y.js +1 -0
  77. package/dist/client/assets/bot-Dj9hYg2w.js +1 -0
  78. package/dist/client/assets/{browserHistoryStore-BJD0OPpb.js → browserHistoryStore-CuO1erOb.js} +2 -2
  79. package/dist/client/assets/{browserLinkTarget-CoogLhhO.js → browserLinkTarget-B5-9Pt65.js} +2 -2
  80. package/dist/client/assets/{c4Diagram-7LVT6UL2-COZrm1O8.js → c4Diagram-7LVT6UL2-DDiDhcli.js} +2 -2
  81. package/dist/client/assets/calendar-clock-BaXgPf_7.js +1 -0
  82. package/dist/client/assets/channel-pJ5lNF0h.js +2 -0
  83. package/dist/client/assets/chart-no-axes-column-BzuvLLND.js +1 -0
  84. package/dist/client/assets/{checkbox-CaZu1EKJ.js → checkbox-BUOikrm3.js} +2 -2
  85. package/dist/client/assets/{chunk-4HAMMTFA-Bs-Fo0v1.js → chunk-4HAMMTFA-_7K6yngz.js} +2 -2
  86. package/dist/client/assets/{chunk-75Z2AOVW-DpOWzc3R.js → chunk-75Z2AOVW-CUqo_4ua.js} +2 -2
  87. package/dist/client/assets/{chunk-DU6HZSFF-Bgpi4W6E.js → chunk-DU6HZSFF-C3RStRBi.js} +2 -2
  88. package/dist/client/assets/{chunk-F27PBJKO-CLxgnzXS.js → chunk-F27PBJKO-BOr5cbtz.js} +2 -2
  89. package/dist/client/assets/{chunk-GMAD6QVW-D98J5Pan.js → chunk-GMAD6QVW-qBcSdTWV.js} +2 -2
  90. package/dist/client/assets/{chunk-GVQU2GXP-VuCIOHGI.js → chunk-GVQU2GXP-D8rhGQK_.js} +2 -2
  91. package/dist/client/assets/{chunk-IMKFNOWR-DXIyBsaE.js → chunk-IMKFNOWR-BjTZFMrm.js} +2 -2
  92. package/dist/client/assets/{chunk-L3NEJ4N5-CrMlU3ZU.js → chunk-L3NEJ4N5-DnCelWBi.js} +2 -2
  93. package/dist/client/assets/{chunk-OSK3NFVY-V2__4gNB.js → chunk-OSK3NFVY-BEgD3sGZ.js} +2 -2
  94. package/dist/client/assets/{chunk-P2QGCYS3-BrPw6V5F.js → chunk-P2QGCYS3-DDmmXS6G.js} +2 -2
  95. package/dist/client/assets/{chunk-POPQ4Y6H-DBQ9Y51x.js → chunk-POPQ4Y6H-CefHvRtI.js} +2 -2
  96. package/dist/client/assets/{chunk-PWAF6VOD-BN6AAbfF.js → chunk-PWAF6VOD-BPIKFLCK.js} +2 -2
  97. package/dist/client/assets/{chunk-SHT3W25Y-Vay44dCU.js → chunk-SHT3W25Y-B_pDi6kv.js} +2 -2
  98. package/dist/client/assets/{chunk-SVP7TREG-CcGlNErV.js → chunk-SVP7TREG-BD15vJFs.js} +2 -2
  99. package/dist/client/assets/{chunk-TICWLB2K-Dk1P_xkD.js → chunk-TICWLB2K-B2yA6VhZ.js} +2 -2
  100. package/dist/client/assets/classDiagram-ZZMXUADV-D4Ed7oKu.js +2 -0
  101. package/dist/client/assets/classDiagram-v2-VYDZK3BY-D4Ed7oKu.js +2 -0
  102. package/dist/client/assets/{color-picker-gBclRe5T.js → color-picker-Dqvd0njw.js} +2 -2
  103. package/dist/client/assets/{combobox-C81z_216.js → combobox-BPRK10Il.js} +2 -2
  104. package/dist/client/assets/{command-DnJZPOmf.js → command-B-SWHWbd.js} +2 -2
  105. package/dist/client/assets/{connect-Am2IS-vZ.js → connect-D8LGiBSX.js} +2 -2
  106. package/dist/client/assets/{connect-agent-Cw1s7hYt.js → connect-agent-B3TvHBIV.js} +2 -2
  107. package/dist/client/assets/corner-left-up-8yNxlIpO.js +1 -0
  108. package/dist/client/assets/{cynefin-OW5HDTMX-0s30RxOq.js → cynefin-OW5HDTMX-D-j3kzkd.js} +1 -1
  109. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-Drd0Msog.js → cynefinDiagram-5FMLGOSQ-CVEhj0G_.js} +2 -2
  110. package/dist/client/assets/{dagre-GXQ25YYZ-BMfu7T0o.js → dagre-GXQ25YYZ-opF-kR2J.js} +2 -2
  111. package/dist/client/assets/device-DARKbqyG.js +2 -0
  112. package/dist/client/assets/{diagram-S7CK7UJ4-8egngY0E.js → diagram-S7CK7UJ4-Y1OUf_Uf.js} +2 -2
  113. package/dist/client/assets/{diagram-UQ7AKVKN-BALPQoDH.js → diagram-UQ7AKVKN-BMAkQiYU.js} +2 -2
  114. package/dist/client/assets/{diagram-VSXAHHWV-BjyJZVGC.js → diagram-VSXAHHWV-YWI6689v.js} +2 -2
  115. package/dist/client/assets/{diagram-VX7I27RA-B9f6eKkq.js → diagram-VX7I27RA-DVxQ1Tyn.js} +2 -2
  116. package/dist/client/assets/{diagram-Z3DM3KII-CRUj2d3v.js → diagram-Z3DM3KII-DzaunCE7.js} +2 -2
  117. package/dist/client/assets/{dialog-Bn1u_Xoc.js → dialog-ChNU2rSW.js} +2 -2
  118. package/dist/client/assets/{diffRendering-C26rfQBu.js → diffRendering-TJ6NEHef.js} +2 -2
  119. package/dist/client/assets/{discovery-list-Fg_u6w-x.js → discovery-list-2jVj88oX.js} +2 -2
  120. package/dist/client/assets/{dist-DtKaGeij.js → dist-Dc07DWZJ.js} +3 -3
  121. package/dist/client/assets/download-KOf4APex.js +1 -0
  122. package/dist/client/assets/{draft-input-D8eUYug0.js → draft-input-CAOyi5vd.js} +2 -2
  123. package/dist/client/assets/{duoViewer-CBoAg4hS.js → duoViewer-CkI16mDl.js} +2 -2
  124. package/dist/client/assets/dynamic-B6ssT_6R.js +3 -0
  125. package/dist/client/assets/earth-Gh21ySR9.js +1 -0
  126. package/dist/client/assets/{ebnfDiagram-PWID7BFC-BSbPiqg7.js → ebnfDiagram-PWID7BFC-CLu3StxL.js} +2 -2
  127. package/dist/client/assets/ellipsis-Dd1lpp1y.js +1 -0
  128. package/dist/client/assets/{embeddedScripts-Dsi0aZEx.js → embeddedScripts-C0cHj-rX.js} +2 -2
  129. package/dist/client/assets/{empty-C-gDaZ_z.js → empty-DJMr9MZU.js} +2 -2
  130. package/dist/client/assets/entities-HApogVCu.js +2 -0
  131. package/dist/client/assets/{erDiagram-RLTQ6QDP-sL_q0j_k.js → erDiagram-RLTQ6QDP-CMztaIAH.js} +2 -2
  132. package/dist/client/assets/eventmodeling-NTZA5JFV-D1FYr7Uj.js +1 -0
  133. package/dist/client/assets/eye-CQCt8uGE.js +1 -0
  134. package/dist/client/assets/file-search-BXNWZ1nV.js +1 -0
  135. package/dist/client/assets/{fileLinks-DubkPNVt.js → fileLinks-3CrgspkN.js} +2 -2
  136. package/dist/client/assets/{fileTreeExpansion-VtSAPhxL.js → fileTreeExpansion-CYkjiRdT.js} +2 -2
  137. package/dist/client/assets/flowDiagram-HODETNUW-leGOLc6K.js +1 -0
  138. package/dist/client/assets/folder-git-2-BIZ4K8z0.js +1 -0
  139. package/dist/client/assets/folder-open-BI7lMTSr.js +1 -0
  140. package/dist/client/assets/folder-plus-B91hg6qR.js +1 -0
  141. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-DCiKb0rQ.js → ganttDiagram-EL5Y4UJY-G_L0ijf2.js} +2 -2
  142. package/dist/client/assets/{getDiffFileInput-DU5zpXo3.js → getDiffFileInput-Kc1w64Y-.js} +2 -2
  143. package/dist/client/assets/git-branch-Yqn0BBlE.js +1 -0
  144. package/dist/client/assets/{gitGraph-4MIJSDKK-DfRe6ZT5.js → gitGraph-4MIJSDKK-BmuEuxsx.js} +1 -1
  145. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-Bt7diV1n.js → gitGraphDiagram-WWUBYQGX-C6A4msS5.js} +2 -2
  146. package/dist/client/assets/grip-vertical-DbE6Bv-r.js +1 -0
  147. package/dist/client/assets/{guideRunStore-CF9bByzk.js → guideRunStore-sdfoC8zb.js} +2 -2
  148. package/dist/client/assets/hard-drive--FvDwcA1.js +1 -0
  149. package/dist/client/assets/history-D-6p2svD.js +1 -0
  150. package/dist/client/assets/house-6Nj_TaKT.js +1 -0
  151. package/dist/client/assets/{htmlRender-vOqAdlJH.js → htmlRender-BPiW3VQi.js} +2 -2
  152. package/dist/client/assets/index-EKWtrZNr.js +3 -0
  153. package/dist/client/assets/{info-A6RAGUB7-0FtL6-Am.js → info-A6RAGUB7-CwFLPSUe.js} +1 -1
  154. package/dist/client/assets/{infoDiagram-27XIBGKW-BPLvtPCc.js → infoDiagram-27XIBGKW-bjIIr1Q4.js} +2 -2
  155. package/dist/client/assets/{input-group-CJ7ZOvDN.js → input-group-DM7QvN7X.js} +2 -2
  156. package/dist/client/assets/{input-Cd_0h7h_.js → input-w_nbMVAd.js} +2 -2
  157. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-DVcx0XTh.js → ishikawaDiagram-5VMMS53U-ymImqXAG.js} +2 -2
  158. package/dist/client/assets/{journeyDiagram-3NMN7TZE-w46bbjL2.js → journeyDiagram-3NMN7TZE-TJpDU0em.js} +2 -2
  159. package/dist/client/assets/{kanban-definition-UXKFOSKX-C41yE_yV.js → kanban-definition-UXKFOSKX-Bhm6s1x1.js} +2 -2
  160. package/dist/client/assets/{kbd-c17EHIx1.js → kbd-CTZhqOH9.js} +2 -2
  161. package/dist/client/assets/{keybindings-uYm_vnXl.js → keybindings-CJFu-Dyg.js} +2 -2
  162. package/dist/client/assets/keyboard-Bf3n2zS8.js +1 -0
  163. package/dist/client/assets/{lazyRouteComponent-CTVuEvaz.js → lazyRouteComponent-WxKijHdU.js} +2 -2
  164. package/dist/client/assets/{line-tu9XZ0qp.js → line-C24Qe7Rj.js} +2 -2
  165. package/dist/client/assets/link-BVjRZ3mh.js +1 -0
  166. package/dist/client/assets/{link-C4sEUNOK.js → link-DnBUR2mx.js} +2 -2
  167. package/dist/client/assets/{linkedPrompt-VYl90REW.js → linkedPrompt-CNv-bVSs.js} +2 -2
  168. package/dist/client/assets/list-DrTK4zhP.js +1 -0
  169. package/dist/client/assets/loader-Bc9xbkPa.js +2 -0
  170. package/dist/client/assets/main-D1oD2GPo.js +30 -0
  171. package/dist/client/assets/main-hjb9WdQ8.css +2 -0
  172. package/dist/client/assets/{mediaReference-BTVvzs2e.js → mediaReference-vtwfoFLK.js} +2 -2
  173. package/dist/client/assets/{mediaSource-DXHFWHMA.js → mediaSource-BDkqXaxs.js} +2 -2
  174. package/dist/client/assets/{mermaid-parser.core-DNd412Oc.js → mermaid-parser.core-D2hAGRv3.js} +4 -4
  175. package/dist/client/assets/{mermaid.core-CyE6QOQY.js → mermaid.core-DWtHy2iz.js} +5 -5
  176. package/dist/client/assets/message-circle-question-mark-D2JAzS9x.js +1 -0
  177. package/dist/client/assets/message-square-DNTOkKRN.js +1 -0
  178. package/dist/client/assets/message-square-dashed-NGYZLQqB.js +1 -0
  179. package/dist/client/assets/{mindmap-definition-YA3MSWOX-DH1uxdTm.js → mindmap-definition-YA3MSWOX-DCzTD1Gd.js} +2 -2
  180. package/dist/client/assets/mouse-pointer-2-CgUWLVBh.js +1 -0
  181. package/dist/client/assets/{number-field-CVtwAsLe.js → number-field-yRjM_PYx.js} +2 -2
  182. package/dist/client/assets/{observeResize-Csvw3hy4.js → observeResize-wFdsooQ8.js} +2 -2
  183. package/dist/client/assets/{onboarding-CJPrQc71.js → onboarding-Buk_SNIp.js} +2 -2
  184. package/dist/client/assets/openFileInPreview-CxrjOX7D.js +2 -0
  185. package/dist/client/assets/{p4ProjectFile-BWszgcDk.js → p4ProjectFile-DNlgD3LH.js} +2 -2
  186. package/dist/client/assets/{packet-AYTQ26CC-DflCOkCN.js → packet-AYTQ26CC-CSklBRjj.js} +1 -1
  187. package/dist/client/assets/{pair-Dd_e1jxq.js → pair-DYnW2Jz0.js} +2 -2
  188. package/dist/client/assets/palette-DCF6iKZY.js +1 -0
  189. package/dist/client/assets/panel-left-BObCZ482.js +1 -0
  190. package/dist/client/assets/panels-top-left-4ditdjHS.js +1 -0
  191. package/dist/client/assets/{pegDiagram-XKGWAZYB-Cnx9j2xX.js → pegDiagram-XKGWAZYB-Cgo_C_YQ.js} +2 -2
  192. package/dist/client/assets/{phoneViewer-B9EUVDD2.js → phoneViewer-CVOLU68D.js} +2 -2
  193. package/dist/client/assets/{pie-WAS4IAKB-CDwew7fN.js → pie-WAS4IAKB-y0cNnmhp.js} +1 -1
  194. package/dist/client/assets/{pieDiagram-E7YTZNPT-BxejSN6k.js → pieDiagram-E7YTZNPT-CR9uQOKX.js} +2 -2
  195. package/dist/client/assets/{pierre-icons-C839Otpo.js → pierre-icons-YFKnGmUq.js} +2 -2
  196. package/dist/client/assets/{popover-CKyetthu.js → popover-D-VzRDzk.js} +2 -2
  197. package/dist/client/assets/{preview-CjgXQQdj.js → preview-C7hqmFHN.js} +2 -2
  198. package/dist/client/assets/{preview-CEMnbqVB.js → preview-DT6Qi-Q0.js} +2 -2
  199. package/dist/client/assets/{previewMiniPlayerStore-B9Lqaaij.js → previewMiniPlayerStore-Dmvk7kfx.js} +2 -2
  200. package/dist/client/assets/primary-bBvWt8wp.js +2 -0
  201. package/dist/client/assets/primaryCloudLinkState-DDmxU43H.js +2 -0
  202. package/dist/client/assets/projectFilesQueryState-C9bparJ7.js +2 -0
  203. package/dist/client/assets/{projectScriptEditor-BAuP_HeU.js → projectScriptEditor-2klDgdXc.js} +2 -2
  204. package/dist/client/assets/providerSkills-Bd9FOodA.js +2 -0
  205. package/dist/client/assets/{pullRequestDetail.logic-DTxWqKoX.js → pullRequestDetail.logic-BHCv2eTg.js} +4 -4
  206. package/dist/client/assets/{pullRequestReviewStore-C5gaoGaz.js → pullRequestReviewStore-DNDBmRdQ.js} +2 -2
  207. package/dist/client/assets/pullRequests-NQiU1cvE.js +2 -0
  208. package/dist/client/assets/puzzle-DC6izfkI.js +1 -0
  209. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-Bj4FEpOg.js → quadrantDiagram-AXDQQJYC-B2RnhUBb.js} +2 -2
  210. package/dist/client/assets/queries-DrIiv9gC.js +2 -0
  211. package/dist/client/assets/query-B_BcLKlb.js +2 -0
  212. package/dist/client/assets/{radar-RG4KPBEZ-DEopr2Gv.js → radar-RG4KPBEZ-Dygcuho2.js} +1 -1
  213. package/dist/client/assets/{radio-group-fljQQ7Xp.js → radio-group-ESEwcJva.js} +2 -2
  214. package/dist/client/assets/{railroad-74A4TZTK-BSAOgUn6.js → railroad-74A4TZTK-CK7b6dqk.js} +1 -1
  215. package/dist/client/assets/railroad-abnf-HS5TGJTU-Bn3ASlRb.js +1 -0
  216. package/dist/client/assets/railroad-ebnf-LZEXJU2U-DpIqYG5o.js +1 -0
  217. package/dist/client/assets/railroad-peg-WCYAUIDC-9vGlAMJk.js +1 -0
  218. package/dist/client/assets/{railroadDiagram-O6MQD6OU-BSOJGJ6v.js → railroadDiagram-O6MQD6OU-DsiQNHoT.js} +2 -2
  219. package/dist/client/assets/{renderScheduler-v8LIpnE2.js → renderScheduler-DwOi4uKZ.js} +2 -2
  220. package/dist/client/assets/{requirementDiagram-BXWQKSXE-Bp5TqEho.js → requirementDiagram-BXWQKSXE-DUEtMGYN.js} +2 -2
  221. package/dist/client/assets/{rightPanelStore-DqMd0tFH.js → rightPanelStore-BWYBRVeP.js} +2 -2
  222. package/dist/client/assets/rotate-ccw-BSwk8mHM.js +1 -0
  223. package/dist/client/assets/rotate-cw-BsgLwrfv.js +1 -0
  224. package/dist/client/assets/runtime-CBB2It1x.js +6 -0
  225. package/dist/client/assets/runtime-Dydpcwo9.js +2 -0
  226. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-C7KUHrP7.js → sankeyDiagram-P5KCCOFB-Bnb7-uIo.js} +2 -2
  227. package/dist/client/assets/{scheduledTasksSettings.logic-C3Mbc4mh.js → scheduledTasksSettings.logic-CFyLLJ0-.js} +3 -3
  228. package/dist/client/assets/{scroll-area-LhpLVf8r.js → scroll-area-iMm_YXqJ.js} +2 -2
  229. package/dist/client/assets/select-cvR_zMkG.js +2 -0
  230. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-Bs9mfTLC.js → sequenceDiagram-WJ2MYXX4-BKHWFnq6.js} +2 -2
  231. package/dist/client/assets/server-FMafPUns.js +2 -0
  232. package/dist/client/assets/session-BI6WO3-p.js +2 -0
  233. package/dist/client/assets/{session-logic-DneZDyPZ.js → session-logic-DVvClfzW.js} +5 -5
  234. package/dist/client/assets/settings-2-BbyXH0uI.js +1 -0
  235. package/dist/client/assets/settings-DRKdVCbB.js +1 -0
  236. package/dist/client/assets/{settings-C8FiUQu0.js → settings-Dzr6EHna.js} +2 -2
  237. package/dist/client/assets/settings.appearance-Dcbf4cgV.js +2 -0
  238. package/dist/client/assets/settings.archived-BI9u9Y07.js +2 -0
  239. package/dist/client/assets/{settings.computer-use-B3Ujc2AS.js → settings.computer-use-CE8rpPYM.js} +2 -2
  240. package/dist/client/assets/settings.connections-BWLCI5Zi.js +2 -0
  241. package/dist/client/assets/settings.data-controls-CmJZj_HT.js +2 -0
  242. package/dist/client/assets/{settings.decisions-C5UE4drK.js → settings.decisions-Bm-M9k3t.js} +2 -2
  243. package/dist/client/assets/settings.diagnostics-ao6ZzXXw.js +2 -0
  244. package/dist/client/assets/settings.general-BoU897Dm.js +2 -0
  245. package/dist/client/assets/{settings.integrations-BCtpk2dY.js → settings.integrations-ChLDKsIY.js} +2 -2
  246. package/dist/client/assets/{settings.keybindings-DfFrYXxY.js → settings.keybindings-BSg3FHQZ.js} +2 -2
  247. package/dist/client/assets/{settings.open-source-licenses-CqRM1gRd.js → settings.open-source-licenses-B4sC68Ud.js} +2 -2
  248. package/dist/client/assets/settings.plugins-CGUFRhFY.js +5 -0
  249. package/dist/client/assets/{settings.projects-CT-l0EfX.js → settings.projects-V3nNBIzc.js} +4 -4
  250. package/dist/client/assets/settings.providers-D1BgocCC.js +3 -0
  251. package/dist/client/assets/settings.scheduled-tasks-C-I22teI.js +2 -0
  252. package/dist/client/assets/{settings.snap-shot-BMxV-ClC.js → settings.snap-shot-aum1tmsR.js} +2 -2
  253. package/dist/client/assets/settings.source-control-8YMYuva4.js +2 -0
  254. package/dist/client/assets/{settings.storage-DKm6BZ2r.js → settings.storage-e3yKBYeM.js} +2 -2
  255. package/dist/client/assets/settingsLayout-BUbXPq57.js +3 -0
  256. package/dist/client/assets/shield-check-CG2tOYd1.js +1 -0
  257. package/dist/client/assets/shield-question-mark-Mk3rAYhm.js +1 -0
  258. package/dist/client/assets/{sidebar-DI1ZJMkM.js → sidebar-CjtIIYSY.js} +2 -2
  259. package/dist/client/assets/{sidebarProjectGrouping-DXRKqrOP.js → sidebarProjectGrouping-BmTLes3y.js} +2 -2
  260. package/dist/client/assets/{skeleton-BlMPaSbD.js → skeleton-DzaiJbx8.js} +2 -2
  261. package/dist/client/assets/{sortable.esm-CnSn9HhJ.js → sortable.esm-Df_JB8i3.js} +2 -2
  262. package/dist/client/assets/{sourceControl-ogZI3Qhj.js → sourceControl-BfGzu06x.js} +2 -2
  263. package/dist/client/assets/{spinner-I_NrXl2i.js → spinner-RAU9Cg6j.js} +2 -2
  264. package/dist/client/assets/square-pen-BuwM-DT0.js +1 -0
  265. package/dist/client/assets/{standalone-page-C0mvdk0N.js → standalone-page-Bsaqnigq.js} +2 -2
  266. package/dist/client/assets/{stateDiagram-D77RDMKH-lcvbm4gc.js → stateDiagram-D77RDMKH-BhdX_IDZ.js} +2 -2
  267. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-Ba0Qofsh.js +2 -0
  268. package/dist/client/assets/{swimlanes-42K2YHIH-BftXRbCQ.js → swimlanes-42K2YHIH-T7QLMavY.js} +2 -2
  269. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-C9WqWw-N.js +9 -0
  270. package/dist/client/assets/{terminal-links-BWEpET__.js → terminal-links-B9s8s-tz.js} +2 -2
  271. package/dist/client/assets/{terminalSessions-CQOPPXfy.js → terminalSessions-BmqpP0Ss.js} +2 -2
  272. package/dist/client/assets/text-search-DyMq-QgY.js +1 -0
  273. package/dist/client/assets/{textarea-Bu723jDd.js → textarea-C9YeXMVc.js} +2 -2
  274. package/dist/client/assets/{themePalette-CAxv2FDZ.js → themePalette-C1oD3Oeg.js} +3 -3
  275. package/dist/client/assets/{threadSort-BoaTqeGH.js → threadSort-C4CtIL5v.js} +2 -2
  276. package/dist/client/assets/{timeline-definition-24CTP7MA-_aV_EuqE.js → timeline-definition-24CTP7MA-Dnja29q2.js} +2 -2
  277. package/dist/client/assets/toast-DEgXlTR7.js +2 -0
  278. package/dist/client/assets/{toggle-B5fidRv0.js → toggle-CNbzG8Ec.js} +2 -2
  279. package/dist/client/assets/{toggle-group-DCQTLIPb.js → toggle-group-DIqmqqKQ.js} +2 -2
  280. package/dist/client/assets/{tooltip-taOyJZax.js → tooltip-DyiHlEs0.js} +2 -2
  281. package/dist/client/assets/{treeView-Q6P3EWNA-ALGd5g_W.js → treeView-Q6P3EWNA-KHtw7wMC.js} +1 -1
  282. package/dist/client/assets/{treemap-WGGIJYW6-CGQrkzMs.js → treemap-WGGIJYW6-BZN3U17E.js} +1 -1
  283. package/dist/client/assets/{usage-DmGxFUdr.js → usage--nsoWaqi.js} +2 -2
  284. package/dist/client/assets/{usageAccess-CY-JtQnU.js → usageAccess-Dwz13Eun.js} +2 -2
  285. package/dist/client/assets/{usageFormat-Cs-UHzLq.js → usageFormat-Z0lz-RCF.js} +2 -2
  286. package/dist/client/assets/{usageShortcuts-CP952NDO.js → usageShortcuts-cwv5i-oF.js} +2 -2
  287. package/dist/client/assets/{use-atom-command-CQHjSXPR.js → use-atom-command-BVrZ0hTO.js} +2 -2
  288. package/dist/client/assets/{useAriaLabelledBy-4I5xhNlP.js → useAriaLabelledBy-z3tVAFR_.js} +2 -2
  289. package/dist/client/assets/{useHandleNewThread-Bzaf_PDE.js → useHandleNewThread-lAV5NpwQ.js} +2 -2
  290. package/dist/client/assets/{useLocation-QINZoaPz.js → useLocation-CxFbcar1.js} +2 -2
  291. package/dist/client/assets/useNavigate-CLQYZa7I.js +2 -0
  292. package/dist/client/assets/{useNavigateBack-CbbWf0z6.js → useNavigateBack-91jfuRCn.js} +2 -2
  293. package/dist/client/assets/{useParams-BTKEXLBT.js → useParams-nxAoxVO6.js} +2 -2
  294. package/dist/client/assets/{usePermissionStatus-Zbsv_90x.js → usePermissionStatus-CVCguZPP.js} +2 -2
  295. package/dist/client/assets/{usePullRequestActions-DGTJ6ne6.js → usePullRequestActions-Cp-f2-rS.js} +3 -3
  296. package/dist/client/assets/{useRegisterFieldControl-Cr87Snzk.js → useRegisterFieldControl-hMeYQdpT.js} +2 -2
  297. package/dist/client/assets/useScopedModelAvailability-1rkaoEPh.js +2 -0
  298. package/dist/client/assets/useSettings-BCUX_14n.js +3 -0
  299. package/dist/client/assets/{useT3ConnectAuthPrompt-BYqrzQIx.js → useT3ConnectAuthPrompt-B1AHMyDF.js} +2 -2
  300. package/dist/client/assets/{utils-DmfMX1v5.js → utils-Cbsb1ks0.js} +18 -18
  301. package/dist/client/assets/vcsRefInvalidation-DMlloB2h.js +2 -0
  302. package/dist/client/assets/{vennDiagram-4TSXK5OY-9Jx7JrgE.js → vennDiagram-4TSXK5OY-B4KHYxz_.js} +2 -2
  303. package/dist/client/assets/{wardley-WFR3VGLG-qG58RzFw.js → wardley-WFR3VGLG-EUhzOM0w.js} +1 -1
  304. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-8Ml3tzfR.js → wardleyDiagram-VM6X3IG4-25okiPRC.js} +2 -2
  305. package/dist/client/assets/{welcome-CPcQsM9H.js → welcome-pBX3QtZq.js} +2 -2
  306. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-C-u_0wo0.js → xychartDiagram-S5SC5T6Z-Dyo2i7yf.js} +2 -2
  307. package/dist/client/index.html +1 -1
  308. package/package.json +1 -1
  309. package/dist/client/assets/ChatGptUsageButton-D93cMeTp.js +0 -2
  310. package/dist/client/assets/CodexSetupSection.logic-DJw6xB7P.js +0 -2
  311. package/dist/client/assets/DiffPanel-Dqh76p3E.js +0 -2
  312. package/dist/client/assets/PreviewPanel-QkMfuC1J.js +0 -2
  313. package/dist/client/assets/ProjectDefaultsSettings-C6wxaRmJ.js +0 -2
  314. package/dist/client/assets/ProjectIconPickerDialog-GDqk2LEH.js +0 -2
  315. package/dist/client/assets/ScheduledTasksSettings-DFtwNfb8.js +0 -4
  316. package/dist/client/assets/SettingsPanels-CI-FknGh.js +0 -39
  317. package/dist/client/assets/_chat-BKcYL38S.js +0 -45
  318. package/dist/client/assets/architecture-7GRP2DOG-DqzmsB35.js +0 -1
  319. package/dist/client/assets/archive-x-BN7DYXYC.js +0 -2
  320. package/dist/client/assets/arrow-left-DI1Oo3nI.js +0 -1
  321. package/dist/client/assets/arrow-right-DRgAj8le.js +0 -1
  322. package/dist/client/assets/arrow-up-down-C6OEPUz7.js +0 -1
  323. package/dist/client/assets/assets-_CWIS9vb.js +0 -2
  324. package/dist/client/assets/bell-DW1iPWzH.js +0 -1
  325. package/dist/client/assets/blocks-DKOyf4K4.js +0 -1
  326. package/dist/client/assets/bot-DYcBiSui.js +0 -1
  327. package/dist/client/assets/calendar-clock-BqL7OneL.js +0 -1
  328. package/dist/client/assets/channel-DbsUczqI.js +0 -2
  329. package/dist/client/assets/chart-no-axes-column-CtQ7A5KE.js +0 -1
  330. package/dist/client/assets/classDiagram-ZZMXUADV-DotTjRcO.js +0 -2
  331. package/dist/client/assets/classDiagram-v2-VYDZK3BY-DotTjRcO.js +0 -2
  332. package/dist/client/assets/corner-left-up-BT-2gfvH.js +0 -1
  333. package/dist/client/assets/device-C_oIGJqy.js +0 -2
  334. package/dist/client/assets/download-DNjijPHR.js +0 -1
  335. package/dist/client/assets/dynamic-p5s8CQGu.js +0 -3
  336. package/dist/client/assets/earth-DGA4iwBJ.js +0 -1
  337. package/dist/client/assets/ellipsis-Cbd-Ac19.js +0 -1
  338. package/dist/client/assets/entities-82m-Smm-.js +0 -2
  339. package/dist/client/assets/eventmodeling-NTZA5JFV-OEIkdS25.js +0 -1
  340. package/dist/client/assets/eye-BUplLfz9.js +0 -1
  341. package/dist/client/assets/file-search-CcnLiCku.js +0 -1
  342. package/dist/client/assets/fileContextMenu-Dcs50sFI.js +0 -2
  343. package/dist/client/assets/flowDiagram-HODETNUW-BDZPeVYD.js +0 -1
  344. package/dist/client/assets/folder-git-2-5RczFn6m.js +0 -1
  345. package/dist/client/assets/folder-open-PwiT4lvQ.js +0 -1
  346. package/dist/client/assets/folder-plus--IokSBmG.js +0 -1
  347. package/dist/client/assets/git-branch-jf-x2c63.js +0 -1
  348. package/dist/client/assets/grip-vertical-OASdudbE.js +0 -1
  349. package/dist/client/assets/hard-drive-BxN5msOb.js +0 -1
  350. package/dist/client/assets/history-DdVU5lcf.js +0 -1
  351. package/dist/client/assets/house-mbks5FAa.js +0 -1
  352. package/dist/client/assets/index-1HGbj0-7.js +0 -3
  353. package/dist/client/assets/keyboard-DckDn_SM.js +0 -1
  354. package/dist/client/assets/link-Dw3ue0Rm.js +0 -1
  355. package/dist/client/assets/list-1rglB5Lq.js +0 -1
  356. package/dist/client/assets/loader-CRsWQXUs.js +0 -2
  357. package/dist/client/assets/main-BB3F4O6Y.js +0 -30
  358. package/dist/client/assets/main-CnVegMVf.css +0 -2
  359. package/dist/client/assets/message-circle-question-mark-CLPs5tYP.js +0 -1
  360. package/dist/client/assets/message-square-BInn4EwR.js +0 -1
  361. package/dist/client/assets/message-square-dashed-Dea7_sXv.js +0 -1
  362. package/dist/client/assets/mouse-pointer-2-BPl1Yb5N.js +0 -1
  363. package/dist/client/assets/openFileInPreview-C3O_ayUT.js +0 -2
  364. package/dist/client/assets/palette-DC6st-Ld.js +0 -1
  365. package/dist/client/assets/panel-left-BxNE-mqR.js +0 -1
  366. package/dist/client/assets/panels-top-left-CpwWAaSX.js +0 -1
  367. package/dist/client/assets/primary-uszZTzpR.js +0 -2
  368. package/dist/client/assets/primaryCloudLinkState-CWT2YTBZ.js +0 -2
  369. package/dist/client/assets/projectFilesQueryState-ELgLflk5.js +0 -2
  370. package/dist/client/assets/pullRequests-DjbQ49mZ.js +0 -2
  371. package/dist/client/assets/puzzle-foT3lPUZ.js +0 -1
  372. package/dist/client/assets/queries-Cq5C9N-K.js +0 -2
  373. package/dist/client/assets/query-DpwJQzeq.js +0 -2
  374. package/dist/client/assets/railroad-abnf-HS5TGJTU-C_4g8TOP.js +0 -1
  375. package/dist/client/assets/railroad-ebnf-LZEXJU2U-CHZB5YoP.js +0 -1
  376. package/dist/client/assets/railroad-peg-WCYAUIDC-B-PbMjlp.js +0 -1
  377. package/dist/client/assets/rotate-ccw-rssHZoOL.js +0 -1
  378. package/dist/client/assets/rotate-cw-D726GGah.js +0 -1
  379. package/dist/client/assets/runtime-BQJQC-Ny.js +0 -6
  380. package/dist/client/assets/runtime-C6FwphD-.js +0 -2
  381. package/dist/client/assets/select-B4VvMEs2.js +0 -2
  382. package/dist/client/assets/server-BD_Y5Gsn.js +0 -2
  383. package/dist/client/assets/session-DsbInyNV.js +0 -2
  384. package/dist/client/assets/settings-2-Qrnq-5XQ.js +0 -1
  385. package/dist/client/assets/settings-MUAsYy_j.js +0 -1
  386. package/dist/client/assets/settings.appearance-B5-X4oyX.js +0 -2
  387. package/dist/client/assets/settings.archived-DVUmF0nS.js +0 -2
  388. package/dist/client/assets/settings.connections-EQYBOa7e.js +0 -2
  389. package/dist/client/assets/settings.diagnostics-CBcOEqPM.js +0 -2
  390. package/dist/client/assets/settings.general-BOmr4mSV.js +0 -2
  391. package/dist/client/assets/settings.plugins-DC4js6dE.js +0 -5
  392. package/dist/client/assets/settings.providers-CJuBTAiR.js +0 -3
  393. package/dist/client/assets/settings.scheduled-tasks-CvLNaadX.js +0 -2
  394. package/dist/client/assets/settings.source-control-DJWucVsM.js +0 -2
  395. package/dist/client/assets/settingsLayout-jP1a50ek.js +0 -3
  396. package/dist/client/assets/shield-check-k2SY7zjx.js +0 -2
  397. package/dist/client/assets/shield-question-mark-kKJBH4Uj.js +0 -1
  398. package/dist/client/assets/square-pen-DilH8raK.js +0 -1
  399. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-DuLLhUia.js +0 -2
  400. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-BrHQKVnf.js +0 -9
  401. package/dist/client/assets/text-search-DpDcKspl.js +0 -1
  402. package/dist/client/assets/toast-CjelgyqV.js +0 -2
  403. package/dist/client/assets/useNavigate-4thj06GJ.js +0 -2
  404. package/dist/client/assets/useScopedModelAvailability-BEfh0WXx.js +0 -2
  405. package/dist/client/assets/useSettings-CLtJrOYI.js +0 -3
  406. package/dist/client/assets/vcsRefInvalidation-nP-qgsHs.js +0 -2
@@ -1,2 +1,2 @@
1
- import{Ml as e,Nb as t,gx as n}from"./utils-DmfMX1v5.js";import{F as r,L as i,R as a,z as o}from"./useSettings-CLtJrOYI.js";function s(e){return e!==`separate`}function c(e,t=`repository`){return e?t===`repository_path`?`repository_path`:`repository`:`separate`}var l=`t3code:last-enabled-project-grouping-mode`;function u(){try{return localStorage.getItem(l)===`repository_path`?`repository_path`:`repository`}catch{return`repository`}}function d(e){if(e!==`separate`)try{localStorage.setItem(l,e)}catch{}}function f(t){return!n(t.backgroundActivity,e.backgroundActivity)||t.backgroundActivityProfile!==e.backgroundActivityProfile||!n(t.automaticGitFetchInterval,e.automaticGitFetchInterval)||!n(t.providerHealthRefreshInterval,e.providerHealthRefreshInterval)}function p(t){return[...t.fontFamilySans!==e.fontFamilySans||t.fontSizeInterface!==e.fontSizeInterface?[`Interface font`]:[],...t.fontFamilyComposer!==e.fontFamilyComposer||t.fontSizePrompt!==e.fontSizePrompt?[`Prompt font`]:[],...t.fontFamilyCode!==e.fontFamilyCode||t.fontSizeCode!==e.fontSizeCode?[`Code font`]:[],...t.fontFamilyTerminal!==e.fontFamilyTerminal||t.fontSizeTerminal!==e.fontSizeTerminal?[`Terminal font`]:[]]}function m(e,t){return e._tag===t._tag?e._tag===`fill`||t._tag===`fill`?!0:e.width!==t.width||e.height!==t.height?!1:e._tag===`preset`&&t._tag===`preset`?e.presetId===t.presetId:!0:!1}function h(t){return[...m(t.browserDefaultViewport,e.browserDefaultViewport)?[]:[`Browser viewport`],...t.browserDefaultZoomFactor===e.browserDefaultZoomFactor?[]:[`Browser zoom`],...t.browserDefaultAppearance===e.browserDefaultAppearance?[]:[`Browser appearance`],...t.browserRecordingFrameRate===e.browserRecordingFrameRate?[]:[`Recording frame rate`],...t.browserRecordingShowKeyPresses?[`Recording key presses`]:[],...t.browserRecordingShowMousePresses?[`Recording mouse presses`]:[],...t.browserLinkTarget===e.browserLinkTarget?[]:[`Open links in`],...t.browserAutoShowFloatingPreview===e.browserAutoShowFloatingPreview?[]:[`Floating preview`]]}function g(e){let t=o(e),n=i({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}});return n.profile===`custom`?`advanced`:n.profile}function _(e,t){let n=a(e);return{schemaVersion:1,profile:`custom`,baseProfile:t,overrides:n.profile===`custom`?n.overrides:{}}}function v(e){return{providerInstances:{...e.settings.providerInstances,[e.instanceId]:e.instance},...e.textGenerationModelSelection===void 0?{}:{textGenerationModelSelection:e.textGenerationModelSelection}}}function y(e){return Math.round(t(e)/1e3)}function b(e,t=0){return e===null||!Number.isFinite(e)?t:Math.max(t,Math.round(e))}function x(e,t,n){let i={automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery,...n};for(let[e,t]of Object.entries(i))t===void 0&&delete i[e];return{backgroundActivity:{schemaVersion:1,profile:`custom`,baseProfile:r(e),overrides:i}}}export{h as a,s as c,u as d,d as f,y as i,b as l,_ as n,p as o,g as p,v as r,f as s,x as t,c as u};
2
- //# sourceMappingURL=SettingsPanels.logic-CLB8Pu-U.js.map
1
+ import{Fb as e,Ml as t,vx as n}from"./utils-Cbsb1ks0.js";import{F as r,L as i,R as a,z as o}from"./useSettings-BCUX_14n.js";function s(e){return e!==`separate`}function c(e,t=`repository`){return e?t===`repository_path`?`repository_path`:`repository`:`separate`}var l=`t3code:last-enabled-project-grouping-mode`;function u(){try{return localStorage.getItem(l)===`repository_path`?`repository_path`:`repository`}catch{return`repository`}}function d(e){if(e!==`separate`)try{localStorage.setItem(l,e)}catch{}}function f(e){return!n(e.backgroundActivity,t.backgroundActivity)||e.backgroundActivityProfile!==t.backgroundActivityProfile||!n(e.automaticGitFetchInterval,t.automaticGitFetchInterval)||!n(e.providerHealthRefreshInterval,t.providerHealthRefreshInterval)}function p(e){return[...e.fontFamilySans!==t.fontFamilySans||e.fontSizeInterface!==t.fontSizeInterface?[`Interface font`]:[],...e.fontFamilyComposer!==t.fontFamilyComposer||e.fontSizePrompt!==t.fontSizePrompt?[`Prompt font`]:[],...e.fontFamilyCode!==t.fontFamilyCode||e.fontSizeCode!==t.fontSizeCode?[`Code font`]:[],...e.fontFamilyTerminal!==t.fontFamilyTerminal||e.fontSizeTerminal!==t.fontSizeTerminal?[`Terminal font`]:[]]}function m(e,t){return e._tag===t._tag?e._tag===`fill`||t._tag===`fill`?!0:e.width!==t.width||e.height!==t.height?!1:e._tag===`preset`&&t._tag===`preset`?e.presetId===t.presetId:!0:!1}function h(e){return[...m(e.browserDefaultViewport,t.browserDefaultViewport)?[]:[`Browser viewport`],...e.browserDefaultZoomFactor===t.browserDefaultZoomFactor?[]:[`Browser zoom`],...e.browserDefaultAppearance===t.browserDefaultAppearance?[]:[`Browser appearance`],...e.browserRecordingFrameRate===t.browserRecordingFrameRate?[]:[`Recording frame rate`],...e.browserRecordingShowKeyPresses?[`Recording key presses`]:[],...e.browserRecordingShowMousePresses?[`Recording mouse presses`]:[],...e.browserLinkTarget===t.browserLinkTarget?[]:[`Open links in`],...e.browserAutoShowFloatingPreview===t.browserAutoShowFloatingPreview?[]:[`Floating preview`]]}function g(e){let t=o(e),n=i({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}});return n.profile===`custom`?`advanced`:n.profile}function _(e,t){let n=a(e);return{schemaVersion:1,profile:`custom`,baseProfile:t,overrides:n.profile===`custom`?n.overrides:{}}}function v(e){return{providerInstances:{...e.settings.providerInstances,[e.instanceId]:e.instance},...e.textGenerationModelSelection===void 0?{}:{textGenerationModelSelection:e.textGenerationModelSelection}}}function y(t){return Math.round(e(t)/1e3)}function b(e,t=0){return e===null||!Number.isFinite(e)?t:Math.max(t,Math.round(e))}function x(e,t,n){let i={automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery,...n};for(let[e,t]of Object.entries(i))t===void 0&&delete i[e];return{backgroundActivity:{schemaVersion:1,profile:`custom`,baseProfile:r(e),overrides:i}}}export{h as a,s as c,u as d,d as f,y as i,b as l,_ as n,p as o,g as p,v as r,f as s,x as t,c as u};
2
+ //# sourceMappingURL=SettingsPanels.logic-B3IqBMv7.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Ax as t,ha as n,sr as r}from"./utils-DmfMX1v5.js";import{t as i}from"./useNavigate-4thj06GJ.js";import{t as a}from"./useLocation-QINZoaPz.js";import{E as o}from"./useSettings-CLtJrOYI.js";import{n as s,r as c,t as l}from"./alert-B-or1ble.js";import{B as u,H as d,i as f}from"./settingsLayout-jP1a50ek.js";var p=t(),m=e(n(),1);function h(e){let t=(0,p.c)(42),{children:n,target:h,targetId:y,eligibleEnvironmentIds:b}=e,{selectScope:x,search:S}=u(),C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(C={from:`/settings`},t[0]=C):C=t[0];let w=i(C),T;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(T={select:v},t[1]=T):T=t[1];let E=a(T),{environments:D}=o(),O=d(),k,A,j,M,N,P,F,I;if(t[2]!==n||t[3]!==b||t[4]!==D||t[5]!==O||t[6]!==w||t[7]!==E||t[8]!==S||t[9]!==x||t[10]!==h||t[11]!==y){let e=h===`checkout`?O.filter(e=>!S.project||e.projectKey===S.project).flatMap(_):h===`project`?O.map(g):h===`environment`?D.filter(e=>b===void 0||b.includes(e.environmentId)).map(e=>({label:D.some(t=>t.environmentId!==e.environmentId&&t.label===e.label)?`${e.label} · ${e.displayUrl||e.environmentId}`:e.label,search:{machine:e.environmentId}})):[{label:`Open all environments`,search:{}}];M=f,j=l,I=`status`,A=c,t[20]===n?F=t[21]:(F=(0,m.jsx)(`p`,{children:n}),t[20]=n,t[21]=F),k=s,N=`flex-wrap`;let i;t[22]!==w||t[23]!==E||t[24]!==x||t[25]!==y?(i=e=>(0,m.jsx)(r,{size:`sm-multiline`,variant:`outline`,className:`max-w-full break-all text-left`,onClick:()=>{y?w({to:E,search:()=>e.search,hash:y}):x(e.search)},children:e.label},JSON.stringify(e.search)),t[22]=w,t[23]=E,t[24]=x,t[25]=y,t[26]=i):i=t[26],P=e.map(i),t[2]=n,t[3]=b,t[4]=D,t[5]=O,t[6]=w,t[7]=E,t[8]=S,t[9]=x,t[10]=h,t[11]=y,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N,t[17]=P,t[18]=F,t[19]=I}else k=t[12],A=t[13],j=t[14],M=t[15],N=t[16],P=t[17],F=t[18],I=t[19];let L;t[27]!==k||t[28]!==N||t[29]!==P?(L=(0,m.jsx)(k,{className:N,children:P}),t[27]=k,t[28]=N,t[29]=P,t[30]=L):L=t[30];let R;t[31]!==A||t[32]!==F||t[33]!==L?(R=(0,m.jsxs)(A,{children:[F,L]}),t[31]=A,t[32]=F,t[33]=L,t[34]=R):R=t[34];let z;t[35]!==j||t[36]!==I||t[37]!==R?(z=(0,m.jsx)(j,{role:I,children:R}),t[35]=j,t[36]=I,t[37]=R,t[38]=z):z=t[38];let B;return t[39]!==M||t[40]!==z?(B=(0,m.jsx)(M,{children:z}),t[39]=M,t[40]=z,t[41]=B):B=t[41],B}function g(e){return{label:e.displayName,search:{project:e.projectKey}}}function _(e){return e.memberProjects.map(t=>({label:`${e.displayName} · ${t.environmentLabel??`Environment`} · ${t.workspaceRoot}`,search:{project:e.projectKey,machine:t.environmentId,checkout:t.physicalProjectKey}}))}function v(e){return e.pathname}export{h as t};
2
- //# sourceMappingURL=SettingsScopeNotice-CVoWG1oN.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Mx as t,ha as n,sr as r}from"./utils-Cbsb1ks0.js";import{t as i}from"./useNavigate-CLQYZa7I.js";import{t as a}from"./useLocation-CxFbcar1.js";import{E as o}from"./useSettings-BCUX_14n.js";import{n as s,r as c,t as l}from"./alert-8IFNkYPw.js";import{B as u,H as d,i as f}from"./settingsLayout-BUbXPq57.js";var p=t(),m=e(n(),1);function h(e){let t=(0,p.c)(42),{children:n,target:h,targetId:y,eligibleEnvironmentIds:b}=e,{selectScope:x,search:S}=u(),C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(C={from:`/settings`},t[0]=C):C=t[0];let w=i(C),T;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(T={select:v},t[1]=T):T=t[1];let E=a(T),{environments:D}=o(),O=d(),k,A,j,M,N,P,F,I;if(t[2]!==n||t[3]!==b||t[4]!==D||t[5]!==O||t[6]!==w||t[7]!==E||t[8]!==S||t[9]!==x||t[10]!==h||t[11]!==y){let e=h===`checkout`?O.filter(e=>!S.project||e.projectKey===S.project).flatMap(_):h===`project`?O.map(g):h===`environment`?D.filter(e=>b===void 0||b.includes(e.environmentId)).map(e=>({label:D.some(t=>t.environmentId!==e.environmentId&&t.label===e.label)?`${e.label} · ${e.displayUrl||e.environmentId}`:e.label,search:{machine:e.environmentId}})):[{label:`Open all environments`,search:{}}];M=f,j=l,I=`status`,A=c,t[20]===n?F=t[21]:(F=(0,m.jsx)(`p`,{children:n}),t[20]=n,t[21]=F),k=s,N=`flex-wrap`;let i;t[22]!==w||t[23]!==E||t[24]!==x||t[25]!==y?(i=e=>(0,m.jsx)(r,{size:`sm-multiline`,variant:`outline`,className:`max-w-full break-all text-left`,onClick:()=>{y?w({to:E,search:()=>e.search,hash:y}):x(e.search)},children:e.label},JSON.stringify(e.search)),t[22]=w,t[23]=E,t[24]=x,t[25]=y,t[26]=i):i=t[26],P=e.map(i),t[2]=n,t[3]=b,t[4]=D,t[5]=O,t[6]=w,t[7]=E,t[8]=S,t[9]=x,t[10]=h,t[11]=y,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N,t[17]=P,t[18]=F,t[19]=I}else k=t[12],A=t[13],j=t[14],M=t[15],N=t[16],P=t[17],F=t[18],I=t[19];let L;t[27]!==k||t[28]!==N||t[29]!==P?(L=(0,m.jsx)(k,{className:N,children:P}),t[27]=k,t[28]=N,t[29]=P,t[30]=L):L=t[30];let R;t[31]!==A||t[32]!==F||t[33]!==L?(R=(0,m.jsxs)(A,{children:[F,L]}),t[31]=A,t[32]=F,t[33]=L,t[34]=R):R=t[34];let z;t[35]!==j||t[36]!==I||t[37]!==R?(z=(0,m.jsx)(j,{role:I,children:R}),t[35]=j,t[36]=I,t[37]=R,t[38]=z):z=t[38];let B;return t[39]!==M||t[40]!==z?(B=(0,m.jsx)(M,{children:z}),t[39]=M,t[40]=z,t[41]=B):B=t[41],B}function g(e){return{label:e.displayName,search:{project:e.projectKey}}}function _(e){return e.memberProjects.map(t=>({label:`${e.displayName} · ${t.environmentLabel??`Environment`} · ${t.workspaceRoot}`,search:{project:e.projectKey,machine:t.environmentId,checkout:t.physicalProjectKey}}))}function v(e){return e.pathname}export{h as t};
2
+ //# sourceMappingURL=SettingsScopeNotice-B_awMQPw.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Ax as n,Bb as r,Go as i,Ho as a,Ko as o,Ro as s,Wn as c,Yo as l,b_ as u,es as d,ha as f,ms as p,my as m,sr as h,t as g,ua as _}from"./utils-DmfMX1v5.js";import{t as v}from"./server-Le_hLOlf.js";import{t as y}from"./smartphone-zkhAIn1Q.js";import{D as b,F as x,L as S,O as C,U as w,d as T,f as E,h as D,m as O,pn as k,r as ee}from"./runtime-BQJQC-Ny.js";import{i as A}from"./toast-CjelgyqV.js";import{t as j}from"./use-atom-command-CQHjSXPR.js";import{t as M}from"./skeleton-BlMPaSbD.js";import{i as te,r as ne}from"./dist-DtKaGeij.js";import{a as N,i as P,o as F,r as I,t as L}from"./empty-C-gDaZ_z.js";import{Fa as re,Ia as ie,Pa as ae,qa as oe}from"./main-BB3F4O6Y.js";var R=e(_(),1),z=n(),B=e(t(),1),V=l(m(k,ee.contextEffect.pipe(u(e=>r(e,k))))),H=T(V),U=C(),W=x(V,{label:`web:managed-relay:deregister-environment`,scheduler:U,concurrency:{mode:`serial`,key:e=>e.accountId},execute:(e,t)=>E(t,e)}),G=o(p([])).pipe(i,d(`managed-relay:web:environments:null`)),K=o(p([])).pipe(i,d(`managed-relay:web:devices:null`));function se(){let e=(0,z.c)(14),t=a(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.environmentsAtom(t):G,e[0]=t,e[1]=n);let r=a(n),i;e[2]===r?i=e[3]:(i=D(r),e[2]=r,e[3]=i);let o=i,c,l;e[4]!==o.error||e[5]!==o.errorTraceId?(c=()=>{o.error&&console.error(`[t3-cloud] Relay environment listing failed`,{message:o.error,traceId:o.errorTraceId})},l=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=c,e[7]=l):(c=e[6],l=e[7]),(0,B.useEffect)(c,l);let u;e[8]===t?u=e[9]:(u=()=>{t&&H.refreshEnvironments(s,t)},e[8]=t,e[9]=u);let d=u,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}function q(){let e=(0,z.c)(14),t=a(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.devicesAtom(t):K,e[0]=t,e[1]=n);let r=a(n),i;e[2]===r?i=e[3]:(i=D(r),e[2]=r,e[3]=i);let o=i,c,l;e[4]!==o.error||e[5]!==o.errorTraceId?(c=()=>{o.error&&console.error(`[t3-cloud] Relay device listing failed`,{message:o.error,traceId:o.errorTraceId})},l=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=c,e[7]=l):(c=e[6],l=e[7]),(0,B.useEffect)(c,l);let u;e[8]===t?u=e[9]:(u=()=>{t&&H.refreshDevices(s,t)},e[8]=t,e[9]=u);let d=u,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}var ce=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}),le=[[`notifyOnApproval`,`approvals`],[`notifyOnInput`,`input requests`],[`notifyOnCompletion`,`completions`],[`notifyOnFailure`,`failures`]];function ue(e){return`${e.platform===`android`?`Android`:e.iosMajorVersion===null?`iOS`:`iOS ${e.iosMajorVersion}`}${e.appVersion?` · P4 Code ${e.appVersion}`:``}`}function de(e){if(!e.notifications.enabled)return`Push notifications are disabled on this device.`;let t=le.flatMap(([t,n])=>e.notifications[t]?[n]:[]);return t.length>0?`Alerts enabled for ${t.join(`, `)}.`:`Push notifications are enabled, but no alert types are selected.`}function fe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Update time unavailable`:`Updated ${ce.format(t)}`}var J=e(f(),1);function Y(e){let t=(0,z.c)(18),{action:n,children:r,className:i,description:a,title:o}=e,s;t[0]===i?s=t[1]:(s=g(`w-full min-w-0 text-foreground`,i),t[0]=i,t[1]=s);let c;t[2]===o?c=t[3]:(c=(0,J.jsx)(`h2`,{className:`text-base leading-6 font-semibold`,children:o}),t[2]=o,t[3]=c);let l;t[4]===a?l=t[5]:(l=a?(0,J.jsx)(`p`,{className:`mt-1 max-w-[34rem] text-xs leading-4.5 text-muted-foreground sm:min-h-9`,children:a}):null,t[4]=a,t[5]=l);let u;t[6]!==c||t[7]!==l?(u=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8];let d;t[9]===n?d=t[10]:(d=n?(0,J.jsx)(`div`,{className:`shrink-0`,children:n}):null,t[9]=n,t[10]=d);let f;t[11]!==u||t[12]!==d?(f=(0,J.jsxs)(`header`,{className:`flex flex-col gap-3 pb-4 sm:flex-row sm:items-center sm:justify-between sm:gap-4 sm:pr-8`,children:[u,d]}),t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;return t[14]!==r||t[15]!==s||t[16]!==f?(p=(0,J.jsxs)(`div`,{className:s,children:[f,r]}),t[14]=r,t[15]=s,t[16]=f,t[17]=p):p=t[17],p}function X(e){let t=(0,z.c)(7),{className:n,disabled:r,isPending:i,onClick:a}=e,o=r!==void 0&&r||i,s;t[0]===i?s=t[1]:(s=(0,J.jsx)(oe,{"aria-hidden":`true`,size:`sm`,refreshing:i}),t[0]=i,t[1]=s);let c;return t[2]!==n||t[3]!==a||t[4]!==o||t[5]!==s?(c=(0,J.jsxs)(h,{size:`sm`,variant:`outline`,className:n,disabled:o,onClick:a,children:[s,`Refresh`]}),t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=c):c=t[6],c}function Z(e){let t=(0,z.c)(12),{children:n,className:r,icon:i}=e,a;t[0]===r?a=t[1]:(a=g(`border-t py-4 first:border-t-0`,r),t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`flex size-8 shrink-0 items-center justify-center rounded-lg border bg-muted/32 text-muted-foreground`,children:i}),t[2]=i,t[3]=o);let s;t[4]===n?s=t[5]:(s=(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:n}),t[4]=n,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,J.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,J.jsx)(`li`,{className:a,children:c}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}var pe=[`primary`,`secondary`];function Q(e){let t=(0,z.c)(4),{enabled:n,label:r}=e,i=n?`success`:`outline`,a=n?`On`:`Off`,o;return t[0]!==r||t[1]!==i||t[2]!==a?(o=(0,J.jsxs)(c,{variant:i,children:[r,`: `,a]}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):o=t[3],o}function me(e){let t=(0,z.c)(32),{device:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(y,{className:`size-4`}),t[0]=r):r=t[0];let i;t[1]===n.label?i=t[2]:(i=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=i);let a;t[3]===n?a=t[4]:(a=ue(n),t[3]=n,t[4]=a);let o;t[5]===a?o=t[6]:(o=(0,J.jsx)(`p`,{className:`text-xs leading-4.5 text-muted-foreground`,children:a}),t[5]=a,t[6]=o);let s;t[7]!==i||t[8]!==o?(s=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[i,o]}),t[7]=i,t[8]=o,t[9]=s):s=t[9];let c;t[10]===n.updatedAt?c=t[11]:(c=fe(n.updatedAt),t[10]=n.updatedAt,t[11]=c);let l;t[12]===c?l=t[13]:(l=(0,J.jsx)(`p`,{className:`shrink-0 text-2xs leading-4 text-muted-foreground/75`,children:c}),t[12]=c,t[13]=l);let u;t[14]!==s||t[15]!==l?(u=(0,J.jsxs)(`div`,{className:`flex flex-col gap-0.5 sm:flex-row sm:items-start sm:justify-between sm:gap-3`,children:[s,l]}),t[14]=s,t[15]=l,t[16]=u):u=t[16];let d;t[17]===n.notifications.enabled?d=t[18]:(d=(0,J.jsx)(Q,{enabled:n.notifications.enabled,label:`Push notifications`}),t[17]=n.notifications.enabled,t[18]=d);let f;t[19]===n.liveActivities.enabled?f=t[20]:(f=(0,J.jsx)(Q,{enabled:n.liveActivities.enabled,label:`Live Activities`}),t[19]=n.liveActivities.enabled,t[20]=f);let p;t[21]!==f||t[22]!==d?(p=(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[d,f]}),t[21]=f,t[22]=d,t[23]=p):p=t[23];let m;t[24]===n?m=t[25]:(m=de(n),t[24]=n,t[25]=m);let h;t[26]===m?h=t[27]:(h=(0,J.jsx)(`p`,{className:`mt-1.5 text-xs leading-4.5 text-muted-foreground/80`,children:m}),t[26]=m,t[27]=h);let g;return t[28]!==p||t[29]!==h||t[30]!==u?(g=(0,J.jsxs)(Z,{icon:r,children:[u,p,h]}),t[28]=p,t[29]=h,t[30]=u,t[31]=g):g=t[31],g}function he(){let e=(0,z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`div`,{"aria-label":`Loading mobile clients`,className:`divide-y border-t`,role:`status`,children:pe.map(ge)}),e[0]=t):t=e[0],t}function ge(e){return(0,J.jsx)(`div`,{className:`py-4`,children:(0,J.jsxs)(`div`,{className:`flex gap-3`,children:[(0,J.jsx)(M,{shape:`card`,className:`size-8 shrink-0`}),(0,J.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,J.jsx)(M,{className:`h-3.5 w-36`}),(0,J.jsx)(M,{className:`h-3 w-28`}),(0,J.jsxs)(`div`,{className:`flex gap-2`,children:[(0,J.jsx)(M,{className:`h-4.5 w-28`}),(0,J.jsx)(M,{className:`h-4.5 w-24`})]})]})]})},e)}function _e(){let e=(0,z.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(y,{})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsxs)(L,{size:`compact`,children:[t,(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No mobile clients`}),(0,J.jsx)(I,{children:`Install P4 Code on your phone and sign in to P4 Connect to get push notifications and Live Activities.`})]})]}),e[1]=n):n=e[1],n}function ve(){let e=(0,z.c)(18),t=q(),n;e[0]===t.data?n=e[1]:(n=t.data??[],e[0]=t.data,e[1]=n);let r=n,i=!t.accountId||t.data===null&&!t.error,a=t.error!==null&&t.data===null,o;e[2]!==t.isPending||e[3]!==t.refresh?(o=(0,J.jsx)(X,{isPending:t.isPending,onClick:t.refresh}),e[2]=t.isPending,e[3]=t.refresh,e[4]=o):o=e[4];let s;e[5]!==t.error||e[6]!==t.refresh?(s=t.error?(0,J.jsxs)(`div`,{className:`mb-4 flex flex-col gap-3 border-t border-destructive/35 py-3 text-xs sm:flex-row sm:items-center sm:justify-between`,role:`alert`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load mobile clients`}),(0,J.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:t.error})]}),(0,J.jsx)(h,{size:`xs`,variant:`outline`,onClick:t.refresh,children:`Try again`})]}):null,e[5]=t.error,e[6]=t.refresh,e[7]=s):s=e[7];let c;e[8]!==r||e[9]!==a||e[10]!==i?(c=i?(0,J.jsx)(he,{}):a?null:r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(ye)}):(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsx)(_e,{})}),e[8]=r,e[9]=a,e[10]=i,e[11]=c):c=e[11];let l;e[12]!==s||e[13]!==c?(l=(0,J.jsxs)(`div`,{children:[s,c]}),e[12]=s,e[13]=c,e[14]=l):l=e[14];let u;return e[15]!==o||e[16]!==l?(u=(0,J.jsx)(Y,{title:`Mobile clients`,description:`Mobile devices that get notifications from your environments.`,action:o,children:l}),e[15]=o,e[16]=l,e[17]=u):u=e[17],u}function ye(e){return(0,J.jsx)(me,{device:e},e.deviceId)}var be=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`});function xe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Link date unavailable`:`Linked ${be.format(t)}`}function Se(e){return e.endpoint.providerKind===`cloudflare_tunnel`?`Managed tunnel`:`Activity publishing only`}function Ce(e){let t=(0,z.c)(46),{environment:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(v,{className:`size-4`}),t[0]=r):r=t[0];let i=e.confirmationOpen,a=e.onConfirmationChange,o;t[1]===n.label?o=t[2]:(o=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=o);let s;t[3]===n.linkedAt?s=t[4]:(s=xe(n.linkedAt),t[3]=n.linkedAt,t[4]=s);let c;t[5]===n?c=t[6]:(c=Se(n),t[5]=n,t[6]=c);let l;t[7]!==s||t[8]!==c?(l=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[s,` · `,c]}),t[7]=s,t[8]=c,t[9]=l):l=t[9];let u;t[10]!==o||t[11]!==l?(u=(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[o,l]}),t[10]=o,t[11]=l,t[12]=u):u=t[12];let d;t[13]===e.mutationPending?d=t[14]:(d=(0,J.jsx)(ie,{render:(0,J.jsx)(h,{size:`sm`,variant:`destructive-outline`,disabled:e.mutationPending,children:`Deregister`})}),t[13]=e.mutationPending,t[14]=d);let f;t[15]!==u||t[16]!==d?(f=(0,J.jsxs)(`div`,{className:`flex items-start gap-4`,children:[u,d]}),t[15]=u,t[16]=d,t[17]=f):f=t[17];let p=`Confirm deregistration of ${n.label}`,m;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,J.jsx)(`h4`,{className:`text-sm leading-4.5 font-semibold text-foreground`,children:`Deregister server`}),t[18]=m):m=t[18];let g;t[19]===n.label?g=t[20]:(g=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[`“`,n.label,`” will be removed from this account.`]}),t[19]=n.label,t[20]=g);let _;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,J.jsx)(`p`,{className:`mt-4 max-w-xl text-xs leading-4.5 text-muted-foreground`,children:`P4 Connect access will be revoked, any managed tunnel will be removed, and a host space will become available. Local connections on your devices are not changed.`}),t[21]=_):_=t[21];let y;t[22]===e?y=t[23]:(y=()=>e.onConfirmationChange(!1),t[22]=e,t[23]=y);let b;t[24]!==e.mutationPending||t[25]!==y?(b=(0,J.jsx)(h,{size:`sm`,variant:`ghost`,disabled:e.mutationPending,onClick:y,children:`Cancel`}),t[24]=e.mutationPending,t[25]=y,t[26]=b):b=t[26];let x;t[27]!==n||t[28]!==e?(x=()=>e.onDeregister(n),t[27]=n,t[28]=e,t[29]=x):x=t[29];let S=e.mutationPending?`Deregistering…`:`Deregister`,C;t[30]!==e.mutationPending||t[31]!==x||t[32]!==S?(C=(0,J.jsx)(h,{size:`sm`,variant:`destructive`,disabled:e.mutationPending,onClick:x,children:S}),t[30]=e.mutationPending,t[31]=x,t[32]=S,t[33]=C):C=t[33];let w;t[34]!==b||t[35]!==C?(w=(0,J.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[b,C]}),t[34]=b,t[35]=C,t[36]=w):w=t[36];let T;t[37]!==p||t[38]!==g||t[39]!==w?(T=(0,J.jsx)(re,{children:(0,J.jsx)(`div`,{className:`pt-3`,children:(0,J.jsxs)(`div`,{className:`rounded-lg border border-input bg-muted/32 px-5 py-4 shadow-xs/5`,role:`group`,"aria-label":p,children:[m,g,_,w]})})}),t[37]=p,t[38]=g,t[39]=w,t[40]=T):T=t[40];let E;return t[41]!==e.confirmationOpen||t[42]!==e.onConfirmationChange||t[43]!==T||t[44]!==f?(E=(0,J.jsx)(Z,{icon:r,children:(0,J.jsxs)(ae,{open:i,onOpenChange:a,children:[f,T]})}),t[41]=e.confirmationOpen,t[42]=e.onConfirmationChange,t[43]=T,t[44]=f,t[45]=E):E=t[45],E}function we(){let e=(0,z.c)(41),t=se(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},e[0]=n):n=e[0];let r=j(W,n),[i,a]=(0,B.useState)(null),[o,s]=(0,B.useState)(null),c=(0,B.useRef)(!1),l;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l={accountId:null,linkedAtById:new Map},e[1]=l):l=e[1];let[u,d]=(0,B.useState)(l),f;e[2]!==r||e[3]!==t?(f=async e=>{let n=t.accountId;if(!n||c.current)return;c.current=!0,a(e.environmentId);let i=await r({accountId:n,environmentId:e.environmentId});if(c.current=!1,a(null),i._tag===`Success`){s(null),d(t=>{let r=new Map(t.accountId===n?t.linkedAtById:[]);return r.set(e.environmentId,e.linkedAt),{accountId:n,linkedAtById:r}}),t.refresh(),A.add({type:`success`,title:`Server deregistered`,description:`P4 Connect access was revoked and a host space is now available.`});return}if(S(i))return;let o=w(i),l=o instanceof Error?o.message:`Could not deregister the server.`,u=b(o);console.error(`[t3-connect] Could not deregister environment`,{environmentId:e.environmentId,message:l,traceId:u,cause:o}),A.add({type:`error`,title:`Could not deregister server`,description:l,data:u?{secondaryActionProps:{children:`Copy trace ID`,onClick:()=>void navigator.clipboard?.writeText(u)}}:void 0})},e[2]=r,e[3]=t,e[4]=f):f=e[4];let p=f,m;e[5]!==t.accountId||e[6]!==u.accountId||e[7]!==u.linkedAtById?(m=u.accountId===t.accountId?u.linkedAtById:new Map,e[5]=t.accountId,e[6]=u.accountId,e[7]=u.linkedAtById,e[8]=m):m=e[8];let h=m,g,_,y,x,C,T;if(e[9]!==o||e[10]!==i||e[11]!==t.accountId||e[12]!==t.data||e[13]!==t.error||e[14]!==t.isPending||e[15]!==t.refresh||e[16]!==p||e[17]!==h){let n;e[24]===h?n=e[25]:(n=e=>h.get(e.environmentId)!==e.linkedAt,e[24]=h,e[25]=n);let r=(t.data??[]).filter(n),a=!t.accountId||t.data===null&&!t.error;g=Y,x=`P4 Connect`,C=`Environments registered to your account. Connections on this device are managed in Settings.`;let c=i!==null;e[26]!==t.isPending||e[27]!==t.refresh||e[28]!==c?(T=(0,J.jsx)(X,{disabled:c,isPending:t.isPending,onClick:t.refresh}),e[26]=t.isPending,e[27]=t.refresh,e[28]=c,e[29]=T):T=e[29],e[30]===t.error?_=e[31]:(_=t.error?(0,J.jsxs)(`div`,{className:`mb-4 border-t border-destructive/35 py-3 text-xs`,role:`alert`,children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load P4 Connect environments`}),(0,J.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:t.error})]}):null,e[30]=t.error,e[31]=_),y=a?(0,J.jsx)(`p`,{className:`border-t py-4 text-xs text-muted-foreground`,role:`status`,children:`Loading environments…`}):r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(e=>(0,J.jsx)(Ce,{environment:e,confirmationOpen:o===e.environmentId,mutationPending:i!==null,onConfirmationChange:t=>s(t?e.environmentId:null),onDeregister:e=>void p(e)},e.environmentId))}):t.error?null:(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsxs)(L,{size:`compact`,children:[(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(v,{})}),(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No P4 Connect environments`}),(0,J.jsx)(I,{children:`Link an environment from its local Settings to make it available through P4 Connect.`})]})]})}),e[9]=o,e[10]=i,e[11]=t.accountId,e[12]=t.data,e[13]=t.error,e[14]=t.isPending,e[15]=t.refresh,e[16]=p,e[17]=h,e[18]=g,e[19]=_,e[20]=y,e[21]=x,e[22]=C,e[23]=T}else g=e[18],_=e[19],y=e[20],x=e[21],C=e[22],T=e[23];let E;e[32]!==_||e[33]!==y?(E=(0,J.jsxs)(`div`,{children:[_,y]}),e[32]=_,e[33]=y,e[34]=E):E=e[34];let D;return e[35]!==g||e[36]!==x||e[37]!==C||e[38]!==T||e[39]!==E?(D=(0,J.jsx)(g,{title:x,description:C,action:T,children:E}),e[35]=g,e[36]=x,e[37]=C,e[38]=T,e[39]=E,e[40]=D):D=e[40],D}var $=[{label:`Mobile clients`,url:`mobile-clients`,icon:(0,J.jsx)(y,{className:`size-4`}),content:(0,J.jsx)(ve,{})},{label:`P4 Connect`,url:`t3-connect`,icon:(0,J.jsx)(v,{className:`size-4`}),content:(0,J.jsx)(we,{})}];function Te(){let e=(0,z.c)(8),t=te(),{isSignedIn:n}=ne(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},e[0]=r):r=e[0];let[i,a]=(0,B.useState)(r),o;e[1]===t?o=e[2]:(o=()=>{let e=(e,t)=>a(n=>({...n,[e]:t}));t.openUserProfile({__experimental_startPath:`/t3-connect`,customPages:$.map(t=>({label:t.label,url:t.url,mount:n=>e(`content:${t.url}`,n),unmount:()=>e(`content:${t.url}`,void 0),mountIcon:n=>e(`icon:${t.url}`,n),unmountIcon:()=>e(`icon:${t.url}`,void 0)}))})},e[1]=t,e[2]=o);let s=o,c;e[3]===i?c=e[4]:(c=$.flatMap(e=>{let t=i[`content:${e.url}`],n=i[`icon:${e.url}`];return[t?(0,R.createPortal)(e.content,t,`content:${e.url}`):null,n?(0,R.createPortal)(e.icon,n,`icon:${e.url}`):null]}),e[3]=i,e[4]=c);let l=c,u=n?s:null,d;return e[5]!==l||e[6]!==u?(d={open:u,portals:l},e[5]=l,e[6]=u,e[7]=d):d=e[7],d}export{Te as n,$ as t};
2
- //# sourceMappingURL=T3ConnectAccountPages-ClNzwIQw.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Go as n,Hb as r,Ho as i,Ko as a,Mx as o,Ro as s,S_ as c,Wn as l,Yo as u,es as d,gy as f,ha as p,ms as m,sr as h,t as g,ua as _}from"./utils-Cbsb1ks0.js";import{t as v}from"./server-Le_hLOlf.js";import{t as y}from"./smartphone-zkhAIn1Q.js";import{D as b,F as x,L as S,O as C,U as w,d as T,f as E,h as D,m as O,pn as k,r as ee}from"./runtime-CBB2It1x.js";import{i as A}from"./toast-DEgXlTR7.js";import{t as j}from"./use-atom-command-BVrZ0hTO.js";import{t as M}from"./skeleton-DzaiJbx8.js";import{i as te,r as ne}from"./dist-Dc07DWZJ.js";import{a as N,i as P,o as F,r as I,t as L}from"./empty-DJMr9MZU.js";import{Fa as re,Ia as ie,Pa as ae,qa as oe}from"./main-D1oD2GPo.js";var R=e(_(),1),z=o(),B=e(t(),1),V=u(f(k,ee.contextEffect.pipe(c(e=>r(e,k))))),H=T(V),U=C(),W=x(V,{label:`web:managed-relay:deregister-environment`,scheduler:U,concurrency:{mode:`serial`,key:e=>e.accountId},execute:(e,t)=>E(t,e)}),G=a(m([])).pipe(n,d(`managed-relay:web:environments:null`)),K=a(m([])).pipe(n,d(`managed-relay:web:devices:null`));function se(){let e=(0,z.c)(14),t=i(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.environmentsAtom(t):G,e[0]=t,e[1]=n);let r=i(n),a;e[2]===r?a=e[3]:(a=D(r),e[2]=r,e[3]=a);let o=a,c,l;e[4]!==o.error||e[5]!==o.errorTraceId?(c=()=>{o.error&&console.error(`[t3-cloud] Relay environment listing failed`,{message:o.error,traceId:o.errorTraceId})},l=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=c,e[7]=l):(c=e[6],l=e[7]),(0,B.useEffect)(c,l);let u;e[8]===t?u=e[9]:(u=()=>{t&&H.refreshEnvironments(s,t)},e[8]=t,e[9]=u);let d=u,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}function q(){let e=(0,z.c)(14),t=i(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.devicesAtom(t):K,e[0]=t,e[1]=n);let r=i(n),a;e[2]===r?a=e[3]:(a=D(r),e[2]=r,e[3]=a);let o=a,c,l;e[4]!==o.error||e[5]!==o.errorTraceId?(c=()=>{o.error&&console.error(`[t3-cloud] Relay device listing failed`,{message:o.error,traceId:o.errorTraceId})},l=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=c,e[7]=l):(c=e[6],l=e[7]),(0,B.useEffect)(c,l);let u;e[8]===t?u=e[9]:(u=()=>{t&&H.refreshDevices(s,t)},e[8]=t,e[9]=u);let d=u,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}var ce=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}),le=[[`notifyOnApproval`,`approvals`],[`notifyOnInput`,`input requests`],[`notifyOnCompletion`,`completions`],[`notifyOnFailure`,`failures`]];function ue(e){return`${e.platform===`android`?`Android`:e.iosMajorVersion===null?`iOS`:`iOS ${e.iosMajorVersion}`}${e.appVersion?` · P4 Code ${e.appVersion}`:``}`}function de(e){if(!e.notifications.enabled)return`Push notifications are disabled on this device.`;let t=le.flatMap(([t,n])=>e.notifications[t]?[n]:[]);return t.length>0?`Alerts enabled for ${t.join(`, `)}.`:`Push notifications are enabled, but no alert types are selected.`}function fe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Update time unavailable`:`Updated ${ce.format(t)}`}var J=e(p(),1);function Y(e){let t=(0,z.c)(18),{action:n,children:r,className:i,description:a,title:o}=e,s;t[0]===i?s=t[1]:(s=g(`w-full min-w-0 text-foreground`,i),t[0]=i,t[1]=s);let c;t[2]===o?c=t[3]:(c=(0,J.jsx)(`h2`,{className:`text-base leading-6 font-semibold`,children:o}),t[2]=o,t[3]=c);let l;t[4]===a?l=t[5]:(l=a?(0,J.jsx)(`p`,{className:`mt-1 max-w-[34rem] text-xs leading-4.5 text-muted-foreground sm:min-h-9`,children:a}):null,t[4]=a,t[5]=l);let u;t[6]!==c||t[7]!==l?(u=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8];let d;t[9]===n?d=t[10]:(d=n?(0,J.jsx)(`div`,{className:`shrink-0`,children:n}):null,t[9]=n,t[10]=d);let f;t[11]!==u||t[12]!==d?(f=(0,J.jsxs)(`header`,{className:`flex flex-col gap-3 pb-4 sm:flex-row sm:items-center sm:justify-between sm:gap-4 sm:pr-8`,children:[u,d]}),t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;return t[14]!==r||t[15]!==s||t[16]!==f?(p=(0,J.jsxs)(`div`,{className:s,children:[f,r]}),t[14]=r,t[15]=s,t[16]=f,t[17]=p):p=t[17],p}function X(e){let t=(0,z.c)(7),{className:n,disabled:r,isPending:i,onClick:a}=e,o=r!==void 0&&r||i,s;t[0]===i?s=t[1]:(s=(0,J.jsx)(oe,{"aria-hidden":`true`,size:`sm`,refreshing:i}),t[0]=i,t[1]=s);let c;return t[2]!==n||t[3]!==a||t[4]!==o||t[5]!==s?(c=(0,J.jsxs)(h,{size:`sm`,variant:`outline`,className:n,disabled:o,onClick:a,children:[s,`Refresh`]}),t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=c):c=t[6],c}function Z(e){let t=(0,z.c)(12),{children:n,className:r,icon:i}=e,a;t[0]===r?a=t[1]:(a=g(`border-t py-4 first:border-t-0`,r),t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`flex size-8 shrink-0 items-center justify-center rounded-lg border bg-muted/32 text-muted-foreground`,children:i}),t[2]=i,t[3]=o);let s;t[4]===n?s=t[5]:(s=(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:n}),t[4]=n,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,J.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,J.jsx)(`li`,{className:a,children:c}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}var pe=[`primary`,`secondary`];function Q(e){let t=(0,z.c)(4),{enabled:n,label:r}=e,i=n?`success`:`outline`,a=n?`On`:`Off`,o;return t[0]!==r||t[1]!==i||t[2]!==a?(o=(0,J.jsxs)(l,{variant:i,children:[r,`: `,a]}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):o=t[3],o}function me(e){let t=(0,z.c)(32),{device:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(y,{className:`size-4`}),t[0]=r):r=t[0];let i;t[1]===n.label?i=t[2]:(i=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=i);let a;t[3]===n?a=t[4]:(a=ue(n),t[3]=n,t[4]=a);let o;t[5]===a?o=t[6]:(o=(0,J.jsx)(`p`,{className:`text-xs leading-4.5 text-muted-foreground`,children:a}),t[5]=a,t[6]=o);let s;t[7]!==i||t[8]!==o?(s=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[i,o]}),t[7]=i,t[8]=o,t[9]=s):s=t[9];let c;t[10]===n.updatedAt?c=t[11]:(c=fe(n.updatedAt),t[10]=n.updatedAt,t[11]=c);let l;t[12]===c?l=t[13]:(l=(0,J.jsx)(`p`,{className:`shrink-0 text-2xs leading-4 text-muted-foreground/75`,children:c}),t[12]=c,t[13]=l);let u;t[14]!==s||t[15]!==l?(u=(0,J.jsxs)(`div`,{className:`flex flex-col gap-0.5 sm:flex-row sm:items-start sm:justify-between sm:gap-3`,children:[s,l]}),t[14]=s,t[15]=l,t[16]=u):u=t[16];let d;t[17]===n.notifications.enabled?d=t[18]:(d=(0,J.jsx)(Q,{enabled:n.notifications.enabled,label:`Push notifications`}),t[17]=n.notifications.enabled,t[18]=d);let f;t[19]===n.liveActivities.enabled?f=t[20]:(f=(0,J.jsx)(Q,{enabled:n.liveActivities.enabled,label:`Live Activities`}),t[19]=n.liveActivities.enabled,t[20]=f);let p;t[21]!==f||t[22]!==d?(p=(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[d,f]}),t[21]=f,t[22]=d,t[23]=p):p=t[23];let m;t[24]===n?m=t[25]:(m=de(n),t[24]=n,t[25]=m);let h;t[26]===m?h=t[27]:(h=(0,J.jsx)(`p`,{className:`mt-1.5 text-xs leading-4.5 text-muted-foreground/80`,children:m}),t[26]=m,t[27]=h);let g;return t[28]!==p||t[29]!==h||t[30]!==u?(g=(0,J.jsxs)(Z,{icon:r,children:[u,p,h]}),t[28]=p,t[29]=h,t[30]=u,t[31]=g):g=t[31],g}function he(){let e=(0,z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`div`,{"aria-label":`Loading mobile clients`,className:`divide-y border-t`,role:`status`,children:pe.map(ge)}),e[0]=t):t=e[0],t}function ge(e){return(0,J.jsx)(`div`,{className:`py-4`,children:(0,J.jsxs)(`div`,{className:`flex gap-3`,children:[(0,J.jsx)(M,{shape:`card`,className:`size-8 shrink-0`}),(0,J.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,J.jsx)(M,{className:`h-3.5 w-36`}),(0,J.jsx)(M,{className:`h-3 w-28`}),(0,J.jsxs)(`div`,{className:`flex gap-2`,children:[(0,J.jsx)(M,{className:`h-4.5 w-28`}),(0,J.jsx)(M,{className:`h-4.5 w-24`})]})]})]})},e)}function _e(){let e=(0,z.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(y,{})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsxs)(L,{size:`compact`,children:[t,(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No mobile clients`}),(0,J.jsx)(I,{children:`Install P4 Code on your phone and sign in to P4 Connect to get push notifications and Live Activities.`})]})]}),e[1]=n):n=e[1],n}function ve(){let e=(0,z.c)(18),t=q(),n;e[0]===t.data?n=e[1]:(n=t.data??[],e[0]=t.data,e[1]=n);let r=n,i=!t.accountId||t.data===null&&!t.error,a=t.error!==null&&t.data===null,o;e[2]!==t.isPending||e[3]!==t.refresh?(o=(0,J.jsx)(X,{isPending:t.isPending,onClick:t.refresh}),e[2]=t.isPending,e[3]=t.refresh,e[4]=o):o=e[4];let s;e[5]!==t.error||e[6]!==t.refresh?(s=t.error?(0,J.jsxs)(`div`,{className:`mb-4 flex flex-col gap-3 border-t border-destructive/35 py-3 text-xs sm:flex-row sm:items-center sm:justify-between`,role:`alert`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load mobile clients`}),(0,J.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:t.error})]}),(0,J.jsx)(h,{size:`xs`,variant:`outline`,onClick:t.refresh,children:`Try again`})]}):null,e[5]=t.error,e[6]=t.refresh,e[7]=s):s=e[7];let c;e[8]!==r||e[9]!==a||e[10]!==i?(c=i?(0,J.jsx)(he,{}):a?null:r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(ye)}):(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsx)(_e,{})}),e[8]=r,e[9]=a,e[10]=i,e[11]=c):c=e[11];let l;e[12]!==s||e[13]!==c?(l=(0,J.jsxs)(`div`,{children:[s,c]}),e[12]=s,e[13]=c,e[14]=l):l=e[14];let u;return e[15]!==o||e[16]!==l?(u=(0,J.jsx)(Y,{title:`Mobile clients`,description:`Mobile devices that get notifications from your environments.`,action:o,children:l}),e[15]=o,e[16]=l,e[17]=u):u=e[17],u}function ye(e){return(0,J.jsx)(me,{device:e},e.deviceId)}var be=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`});function xe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Link date unavailable`:`Linked ${be.format(t)}`}function Se(e){return e.endpoint.providerKind===`cloudflare_tunnel`?`Managed tunnel`:`Activity publishing only`}function Ce(e){let t=(0,z.c)(46),{environment:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(v,{className:`size-4`}),t[0]=r):r=t[0];let i=e.confirmationOpen,a=e.onConfirmationChange,o;t[1]===n.label?o=t[2]:(o=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=o);let s;t[3]===n.linkedAt?s=t[4]:(s=xe(n.linkedAt),t[3]=n.linkedAt,t[4]=s);let c;t[5]===n?c=t[6]:(c=Se(n),t[5]=n,t[6]=c);let l;t[7]!==s||t[8]!==c?(l=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[s,` · `,c]}),t[7]=s,t[8]=c,t[9]=l):l=t[9];let u;t[10]!==o||t[11]!==l?(u=(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[o,l]}),t[10]=o,t[11]=l,t[12]=u):u=t[12];let d;t[13]===e.mutationPending?d=t[14]:(d=(0,J.jsx)(ie,{render:(0,J.jsx)(h,{size:`sm`,variant:`destructive-outline`,disabled:e.mutationPending,children:`Deregister`})}),t[13]=e.mutationPending,t[14]=d);let f;t[15]!==u||t[16]!==d?(f=(0,J.jsxs)(`div`,{className:`flex items-start gap-4`,children:[u,d]}),t[15]=u,t[16]=d,t[17]=f):f=t[17];let p=`Confirm deregistration of ${n.label}`,m;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,J.jsx)(`h4`,{className:`text-sm leading-4.5 font-semibold text-foreground`,children:`Deregister server`}),t[18]=m):m=t[18];let g;t[19]===n.label?g=t[20]:(g=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[`“`,n.label,`” will be removed from this account.`]}),t[19]=n.label,t[20]=g);let _;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,J.jsx)(`p`,{className:`mt-4 max-w-xl text-xs leading-4.5 text-muted-foreground`,children:`P4 Connect access will be revoked, any managed tunnel will be removed, and a host space will become available. Local connections on your devices are not changed.`}),t[21]=_):_=t[21];let y;t[22]===e?y=t[23]:(y=()=>e.onConfirmationChange(!1),t[22]=e,t[23]=y);let b;t[24]!==e.mutationPending||t[25]!==y?(b=(0,J.jsx)(h,{size:`sm`,variant:`ghost`,disabled:e.mutationPending,onClick:y,children:`Cancel`}),t[24]=e.mutationPending,t[25]=y,t[26]=b):b=t[26];let x;t[27]!==n||t[28]!==e?(x=()=>e.onDeregister(n),t[27]=n,t[28]=e,t[29]=x):x=t[29];let S=e.mutationPending?`Deregistering…`:`Deregister`,C;t[30]!==e.mutationPending||t[31]!==x||t[32]!==S?(C=(0,J.jsx)(h,{size:`sm`,variant:`destructive`,disabled:e.mutationPending,onClick:x,children:S}),t[30]=e.mutationPending,t[31]=x,t[32]=S,t[33]=C):C=t[33];let w;t[34]!==b||t[35]!==C?(w=(0,J.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[b,C]}),t[34]=b,t[35]=C,t[36]=w):w=t[36];let T;t[37]!==p||t[38]!==g||t[39]!==w?(T=(0,J.jsx)(re,{children:(0,J.jsx)(`div`,{className:`pt-3`,children:(0,J.jsxs)(`div`,{className:`rounded-lg border border-input bg-muted/32 px-5 py-4 shadow-xs/5`,role:`group`,"aria-label":p,children:[m,g,_,w]})})}),t[37]=p,t[38]=g,t[39]=w,t[40]=T):T=t[40];let E;return t[41]!==e.confirmationOpen||t[42]!==e.onConfirmationChange||t[43]!==T||t[44]!==f?(E=(0,J.jsx)(Z,{icon:r,children:(0,J.jsxs)(ae,{open:i,onOpenChange:a,children:[f,T]})}),t[41]=e.confirmationOpen,t[42]=e.onConfirmationChange,t[43]=T,t[44]=f,t[45]=E):E=t[45],E}function we(){let e=(0,z.c)(41),t=se(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},e[0]=n):n=e[0];let r=j(W,n),[i,a]=(0,B.useState)(null),[o,s]=(0,B.useState)(null),c=(0,B.useRef)(!1),l;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l={accountId:null,linkedAtById:new Map},e[1]=l):l=e[1];let[u,d]=(0,B.useState)(l),f;e[2]!==r||e[3]!==t?(f=async e=>{let n=t.accountId;if(!n||c.current)return;c.current=!0,a(e.environmentId);let i=await r({accountId:n,environmentId:e.environmentId});if(c.current=!1,a(null),i._tag===`Success`){s(null),d(t=>{let r=new Map(t.accountId===n?t.linkedAtById:[]);return r.set(e.environmentId,e.linkedAt),{accountId:n,linkedAtById:r}}),t.refresh(),A.add({type:`success`,title:`Server deregistered`,description:`P4 Connect access was revoked and a host space is now available.`});return}if(S(i))return;let o=w(i),l=o instanceof Error?o.message:`Could not deregister the server.`,u=b(o);console.error(`[t3-connect] Could not deregister environment`,{environmentId:e.environmentId,message:l,traceId:u,cause:o}),A.add({type:`error`,title:`Could not deregister server`,description:l,data:u?{secondaryActionProps:{children:`Copy trace ID`,onClick:()=>void navigator.clipboard?.writeText(u)}}:void 0})},e[2]=r,e[3]=t,e[4]=f):f=e[4];let p=f,m;e[5]!==t.accountId||e[6]!==u.accountId||e[7]!==u.linkedAtById?(m=u.accountId===t.accountId?u.linkedAtById:new Map,e[5]=t.accountId,e[6]=u.accountId,e[7]=u.linkedAtById,e[8]=m):m=e[8];let h=m,g,_,y,x,C,T;if(e[9]!==o||e[10]!==i||e[11]!==t.accountId||e[12]!==t.data||e[13]!==t.error||e[14]!==t.isPending||e[15]!==t.refresh||e[16]!==p||e[17]!==h){let n;e[24]===h?n=e[25]:(n=e=>h.get(e.environmentId)!==e.linkedAt,e[24]=h,e[25]=n);let r=(t.data??[]).filter(n),a=!t.accountId||t.data===null&&!t.error;g=Y,x=`P4 Connect`,C=`Environments registered to your account. Connections on this device are managed in Settings.`;let c=i!==null;e[26]!==t.isPending||e[27]!==t.refresh||e[28]!==c?(T=(0,J.jsx)(X,{disabled:c,isPending:t.isPending,onClick:t.refresh}),e[26]=t.isPending,e[27]=t.refresh,e[28]=c,e[29]=T):T=e[29],e[30]===t.error?_=e[31]:(_=t.error?(0,J.jsxs)(`div`,{className:`mb-4 border-t border-destructive/35 py-3 text-xs`,role:`alert`,children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load P4 Connect environments`}),(0,J.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:t.error})]}):null,e[30]=t.error,e[31]=_),y=a?(0,J.jsx)(`p`,{className:`border-t py-4 text-xs text-muted-foreground`,role:`status`,children:`Loading environments…`}):r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(e=>(0,J.jsx)(Ce,{environment:e,confirmationOpen:o===e.environmentId,mutationPending:i!==null,onConfirmationChange:t=>s(t?e.environmentId:null),onDeregister:e=>void p(e)},e.environmentId))}):t.error?null:(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsxs)(L,{size:`compact`,children:[(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(v,{})}),(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No P4 Connect environments`}),(0,J.jsx)(I,{children:`Link an environment from its local Settings to make it available through P4 Connect.`})]})]})}),e[9]=o,e[10]=i,e[11]=t.accountId,e[12]=t.data,e[13]=t.error,e[14]=t.isPending,e[15]=t.refresh,e[16]=p,e[17]=h,e[18]=g,e[19]=_,e[20]=y,e[21]=x,e[22]=C,e[23]=T}else g=e[18],_=e[19],y=e[20],x=e[21],C=e[22],T=e[23];let E;e[32]!==_||e[33]!==y?(E=(0,J.jsxs)(`div`,{children:[_,y]}),e[32]=_,e[33]=y,e[34]=E):E=e[34];let D;return e[35]!==g||e[36]!==x||e[37]!==C||e[38]!==T||e[39]!==E?(D=(0,J.jsx)(g,{title:x,description:C,action:T,children:E}),e[35]=g,e[36]=x,e[37]=C,e[38]=T,e[39]=E,e[40]=D):D=e[40],D}var $=[{label:`Mobile clients`,url:`mobile-clients`,icon:(0,J.jsx)(y,{className:`size-4`}),content:(0,J.jsx)(ve,{})},{label:`P4 Connect`,url:`t3-connect`,icon:(0,J.jsx)(v,{className:`size-4`}),content:(0,J.jsx)(we,{})}];function Te(){let e=(0,z.c)(8),t=te(),{isSignedIn:n}=ne(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},e[0]=r):r=e[0];let[i,a]=(0,B.useState)(r),o;e[1]===t?o=e[2]:(o=()=>{let e=(e,t)=>a(n=>({...n,[e]:t}));t.openUserProfile({__experimental_startPath:`/t3-connect`,customPages:$.map(t=>({label:t.label,url:t.url,mount:n=>e(`content:${t.url}`,n),unmount:()=>e(`content:${t.url}`,void 0),mountIcon:n=>e(`icon:${t.url}`,n),unmountIcon:()=>e(`icon:${t.url}`,void 0)}))})},e[1]=t,e[2]=o);let s=o,c;e[3]===i?c=e[4]:(c=$.flatMap(e=>{let t=i[`content:${e.url}`],n=i[`icon:${e.url}`];return[t?(0,R.createPortal)(e.content,t,`content:${e.url}`):null,n?(0,R.createPortal)(e.icon,n,`icon:${e.url}`):null]}),e[3]=i,e[4]=c);let l=c,u=n?s:null,d;return e[5]!==l||e[6]!==u?(d={open:u,portals:l},e[5]=l,e[6]=u,e[7]=d):d=e[7],d}export{Te as n,$ as t};
2
+ //# sourceMappingURL=T3ConnectAccountPages-DOpj673A.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Ax as t,ha as n}from"./utils-DmfMX1v5.js";import{t as r}from"./log-in-BpPtfyCd.js";import{o as i}from"./runtime-BQJQC-Ny.js";import{n as a,r as o}from"./dist-DtKaGeij.js";import{c as s,l as c,s as l}from"./sidebar-DI1ZJMkM.js";import{t as u}from"./T3ConnectAccountPages-ClNzwIQw.js";import{t as d}from"./useT3ConnectAuthPrompt-BYqrzQIx.js";var f=t(),p=e(n(),1);function m(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(v,{}),e[0]=t):t=e[0],t}function h(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(g,{}),e[0]=t):t=e[0],t}function g(){let e=(0,f.c)(1),{isLoaded:t,isSignedIn:n}=o();if(!t||!n)return null;let r;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,p.jsx)(a,{appearance:{elements:{avatarBox:`size-7`,userButtonTrigger:`rounded-lg p-1 hover:bg-sidebar-row-hover`}},children:u.map(_)}),e[0]=r):r=e[0],r}function _(e){return(0,p.jsx)(a.UserProfilePage,{label:e.label,labelIcon:e.icon,url:e.url,children:e.content},e.url)}function v(){let e=(0,f.c)(7),{isLoaded:t,isSignedIn:n}=o(),{authPrompt:i,openAuthPrompt:a}=d();if(!t||n)return null;let u,m;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,p.jsx)(r,{}),m=(0,p.jsx)(`span`,{children:`Sign in to P4 Connect`}),e[0]=u,e[1]=m):(u=e[0],m=e[1]);let h;e[2]===a?h=e[3]:(h=(0,p.jsx)(l,{children:(0,p.jsx)(c,{children:(0,p.jsxs)(s,{onClick:a,children:[u,m]})})}),e[2]=a,e[3]=h);let g;return e[4]!==i||e[5]!==h?(g=(0,p.jsxs)(p.Fragment,{children:[h,i]}),e[4]=i,e[5]=h,e[6]=g):g=e[6],g}export{h as T3ConnectSidebarAvatar,m as T3ConnectSidebarSignIn};
2
- //# sourceMappingURL=T3ConnectSidebarSignIn-BqM_Vqe1.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Mx as t,ha as n}from"./utils-Cbsb1ks0.js";import{t as r}from"./log-in-BpPtfyCd.js";import{o as i}from"./runtime-CBB2It1x.js";import{n as a,r as o}from"./dist-Dc07DWZJ.js";import{c as s,l as c,s as l}from"./sidebar-CjtIIYSY.js";import{t as u}from"./T3ConnectAccountPages-DOpj673A.js";import{t as d}from"./useT3ConnectAuthPrompt-B1AHMyDF.js";var f=t(),p=e(n(),1);function m(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(v,{}),e[0]=t):t=e[0],t}function h(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(g,{}),e[0]=t):t=e[0],t}function g(){let e=(0,f.c)(1),{isLoaded:t,isSignedIn:n}=o();if(!t||!n)return null;let r;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,p.jsx)(a,{appearance:{elements:{avatarBox:`size-7`,userButtonTrigger:`rounded-lg p-1 hover:bg-sidebar-row-hover`}},children:u.map(_)}),e[0]=r):r=e[0],r}function _(e){return(0,p.jsx)(a.UserProfilePage,{label:e.label,labelIcon:e.icon,url:e.url,children:e.content},e.url)}function v(){let e=(0,f.c)(7),{isLoaded:t,isSignedIn:n}=o(),{authPrompt:i,openAuthPrompt:a}=d();if(!t||n)return null;let u,m;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,p.jsx)(r,{}),m=(0,p.jsx)(`span`,{children:`Sign in to P4 Connect`}),e[0]=u,e[1]=m):(u=e[0],m=e[1]);let h;e[2]===a?h=e[3]:(h=(0,p.jsx)(l,{children:(0,p.jsx)(c,{children:(0,p.jsxs)(s,{onClick:a,children:[u,m]})})}),e[2]=a,e[3]=h);let g;return e[4]!==i||e[5]!==h?(g=(0,p.jsxs)(p.Fragment,{children:[h,i]}),e[4]=i,e[5]=h,e[6]=g):g=e[6],g}export{h as T3ConnectSidebarAvatar,m as T3ConnectSidebarSignIn};
2
+ //# sourceMappingURL=T3ConnectSidebarSignIn-zrB8y6DQ.js.map
@@ -1,5 +1,5 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Ax as n,ha as r,sr as i,t as a}from"./utils-DmfMX1v5.js";import{t as o}from"./paintbrush-D1BKpWrm.js";import{t as s}from"./plus-Cr075-cy.js";import{t as c}from"./x-CSwbgjBe.js";import{a as l,c as u,n as d,t as f,u as p}from"./tooltip-taOyJZax.js";import{A as m,E as h,G as g,H as _,O as v,S as y,U as ee,W as b,_ as te,d as ne,et as x,g as S,m as C,s as w,u as T,y as E}from"./themePalette-CAxv2FDZ.js";import{n as D,t as O}from"./toggle-group-DCQTLIPb.js";import{t as re}from"./input-Cd_0h7h_.js";import{i as k,o as A,t as j}from"./popover-CKyetthu.js";import{i as M,n as N,r as P,t as F}from"./color-picker-gBclRe5T.js";import{La as I,go as L}from"./main-BB3F4O6Y.js";var R=p(),ie=n(),z=e(t(),1),B=e(r(),1);function V(e){return{canvas:`Background`,toolbar:`Toolbar background`,toolbarForeground:`Toolbar text`,toolbarBorder:`Toolbar border`,toolbarControl:`Toolbar control`,toolbarControlForeground:`Toolbar control text`,toolbarControlHover:`Toolbar control hover`,accent:`Accent color`,errorForeground:`Error text`,errorSurface:`Error background`,warningForeground:`Warning text`,warningSurface:`Warning background`,updateForeground:`Update text`,updateSurface:`Update background`}[e]||e.replace(/([A-Z])/g,` $1`).replace(/^./,e=>e.toUpperCase())}function H(e){let t=_(e)??``,n=t.length===9?t.slice(7):``;return n===`ff`?``:n}function ae(e){return(_(e)??`#000000`).slice(0,7)}function oe(e){let t=Number.parseInt(ae(e).slice(1),16);return[t>>16,t>>8&255,t&255]}function se(e){let t=e.trim().replace(/^rgb\(\s*/i,``).replace(/\s*\)$/,``).split(/[,\s]+/).filter(Boolean).map(Number);return t.length!==3||t.some(e=>!Number.isInteger(e)||e<0||e>255)?null:`#${t.map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function U(e){return oe(e).join(`, `)}function W({label:e,value:t,onChange:n}){let r=ae(t),i=H(t),[a,o]=(0,z.useState)(()=>P(r)),[s,c]=(0,z.useState)(r),[l,u]=(0,z.useState)(()=>U(r)),d=(0,z.useRef)(!1),f=M(a.h,a.s,a.v),p=U(f);(0,z.useEffect)(()=>{d.current||(c(r),u(U(r))),o(e=>M(e.h,e.s,e.v)===r?e:P(r))},[r]);let m=(0,z.useRef)(n);m.current=n;let h=(0,z.useRef)(null),g=(0,z.useRef)(null),_=(0,z.useCallback)(()=>{g.current!==null&&(cancelAnimationFrame(g.current),g.current=null);let e=h.current;h.current=null,e!==null&&m.current(e)},[]);(0,z.useEffect)(()=>()=>_(),[_]);let v=(0,z.useCallback)(e=>{h.current=e,g.current??=requestAnimationFrame(()=>{g.current=null;let e=h.current;h.current=null,e!==null&&m.current(e)})},[]),y=(0,z.useCallback)(e=>{o(e);let t=M(e.h,e.s,e.v);c(t),u(U(t)),v(t+i)},[i,v]),ee=e=>{if(c(e),!/^#[0-9a-f]{6}$/i.test(e))return;let t=P(e);o(t),u(U(e)),n(e.toLowerCase())},b=e=>{u(e);let t=se(e);t&&(o(P(t)),c(t),n(t+i))};return(0,B.jsxs)(`div`,{className:`w-72 bg-popover`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/70 px-4 py-3`,children:[(0,B.jsxs)(`div`,{className:`min-w-0`,children:[(0,B.jsx)(`p`,{className:`truncate text-xs font-semibold text-foreground`,children:e}),(0,B.jsx)(`p`,{className:`text-2xs text-muted-foreground`,children:`Choose a color`})]}),(0,B.jsx)(`span`,{className:`size-7 shrink-0 rounded-full shadow-sm`,style:{backgroundColor:f}})]}),(0,B.jsxs)(`div`,{className:`grid gap-3 px-3 pb-3 pt-3`,children:[(0,B.jsx)(N,{label:e,value:a,onChange:y,onInteractionEnd:_}),(0,B.jsx)(F,{label:`${e} hue`,value:a.h,onChange:e=>y({...a,h:e}),onInteractionEnd:_}),(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_1.2fr] gap-2`,children:[(0,B.jsxs)(`label`,{className:`grid min-w-0 gap-1`,children:[(0,B.jsx)(`span`,{className:`px-1 text-3xs font-semibold uppercase tracking-widest text-muted-foreground`,children:`HEX`}),(0,B.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 rounded-lg border border-input bg-background px-2 focus-within:border-ring`,children:[(0,B.jsx)(`span`,{className:`size-3.5 shrink-0 rounded-full`,style:{backgroundColor:f}}),(0,B.jsx)(`input`,{"aria-label":`${e} picker hex value`,className:`h-8 min-w-0 flex-1 bg-transparent font-mono text-xs text-foreground outline-none`,onBlur:()=>{d.current=!1,c(f),u(p)},onChange:e=>ee(e.currentTarget.value),onFocus:()=>{d.current=!0},spellCheck:!1,value:s})]})]}),(0,B.jsxs)(`label`,{className:`grid min-w-0 gap-1`,children:[(0,B.jsx)(`span`,{className:`px-1 text-3xs font-semibold uppercase tracking-widest text-muted-foreground`,children:`RGB`}),(0,B.jsx)(`span`,{className:`flex min-w-0 items-center rounded-lg border border-input bg-background px-2 focus-within:border-ring`,children:(0,B.jsx)(`input`,{"aria-label":`${e} picker RGB value`,className:`h-8 min-w-0 flex-1 bg-transparent font-mono text-xs text-foreground outline-none`,onBlur:()=>{d.current=!1,c(f),u(p)},onChange:e=>b(e.currentTarget.value),onFocus:()=>{d.current=!0},spellCheck:!1,value:l})})]})]})]})]})}function ce(e){let t=(0,ie.c)(13),{label:n,value:r,onChange:i,onInteract:a}=e,o=`Choose ${n} color`,s;t[0]===r?s=t[1]:(s=(0,B.jsx)(`span`,{className:`absolute inset-0 rounded-full shadow-sm`,style:{backgroundColor:r}}),t[0]=r,t[1]=s);let c;t[2]!==a||t[3]!==o||t[4]!==s?(c=(0,B.jsx)(A,{render:(0,B.jsx)(`button`,{"aria-label":o,className:`relative flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-full border border-foreground/30 transition-transform hover:scale-105 focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring`,onFocus:a,onPointerDown:a,type:`button`,children:s})}),t[2]=a,t[3]=o,t[4]=s,t[5]=c):c=t[5];let l;t[6]!==n||t[7]!==i||t[8]!==r?(l=(0,B.jsx)(k,{align:`end`,padding:`none`,"data-theme-editor-panel":``,side:`bottom`,sideOffset:10,children:(0,B.jsx)(W,{label:n,onChange:i,value:r})}),t[6]=n,t[7]=i,t[8]=r,t[9]=l):l=t[9];let u;return t[10]!==c||t[11]!==l?(u=(0,B.jsxs)(j,{children:[c,l]}),t[10]=c,t[11]=l,t[12]=u):u=t[12],u}var le=(0,z.memo)(function(e){let t=(0,ie.c)(58),{role:n,value:r,onChange:i,onSelect:o,onToggleSelected:s,selected:c,label:u}=e,p=c!==void 0&&c,m;t[0]!==u||t[1]!==n?(m=u??V(n),t[0]=u,t[1]=n,t[2]=m):m=t[2];let g=m,v;t[3]===r?v=t[4]:(v=h(r),t[3]=r,t[4]=v);let y=v,ee=y?r:`#000000`,b;t[5]===r?b=t[6]:(b=r.trim().toLowerCase().startsWith(`oklch(`)?_(r)??r:r,t[5]=r,t[6]=b);let te=b,ne=p&&`bg-accent/60 inset-ring inset-ring-ring`,x;t[7]===ne?x=t[8]:(x=a(`flex min-h-11 min-w-0 items-center gap-2 rounded-lg px-2 py-1.5 transition-[background-color,box-shadow]`,ne),t[7]=ne,t[8]=x);let S=`${p?`Hide`:`Show`} ${g} usage`,C;t[9]!==s||t[10]!==n?(C=()=>s?.(n),t[9]=s,t[10]=n,t[11]=C):C=t[11];let w;t[12]===g?w=t[13]:(w=(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:g}),t[12]=g,t[13]=w);let T;t[14]!==p||t[15]!==S||t[16]!==C||t[17]!==w?(T=(0,B.jsx)(l,{render:(0,B.jsx)(`button`,{"aria-label":S,"aria-pressed":p,className:`flex min-w-0 flex-1 cursor-pointer items-center rounded-md text-left text-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,onClick:C,type:`button`,children:w})}),t[14]=p,t[15]=S,t[16]=C,t[17]=w,t[18]=T):T=t[18];let E=`${p?`Hide`:`Show`} where ${g} is used`,D;t[19]===E?D=t[20]:(D=(0,B.jsx)(d,{side:`top`,children:E}),t[19]=E,t[20]=D);let O;t[21]!==T||t[22]!==D?(O=(0,B.jsxs)(f,{children:[T,D]}),t[21]=T,t[22]=D,t[23]=O):O=t[23];let k;t[24]!==i||t[25]!==n?(k=e=>i(n,e),t[24]=i,t[25]=n,t[26]=k):k=t[26];let A;t[27]!==o||t[28]!==n?(A=()=>o?.(n),t[27]=o,t[28]=n,t[29]=A):A=t[29];let j;t[30]!==g||t[31]!==ee||t[32]!==k||t[33]!==A?(j=(0,B.jsx)(ce,{label:g,onChange:k,onInteract:A,value:ee}),t[30]=g,t[31]=ee,t[32]=k,t[33]=A,t[34]=j):j=t[34];let M=!y,N=`${g} hex value`,P=`${n}-hex`,F;t[35]!==i||t[36]!==n?(F=e=>i(n,e.currentTarget.value),t[35]=i,t[36]=n,t[37]=F):F=t[37];let I,L;t[38]!==o||t[39]!==n?(I=()=>o?.(n),L=()=>o?.(n),t[38]=o,t[39]=n,t[40]=I,t[41]=L):(I=t[40],L=t[41]);let R;t[42]!==te||t[43]!==M||t[44]!==N||t[45]!==P||t[46]!==F||t[47]!==I||t[48]!==L?(R=(0,B.jsx)(re,{"aria-invalid":M,"aria-label":N,className:`w-28 shrink-0`,font:`mono`,id:P,nativeInput:!0,onChange:F,onFocus:I,onPointerDown:L,size:`compact`,value:te}),t[42]=te,t[43]=M,t[44]=N,t[45]=P,t[46]=F,t[47]=I,t[48]=L,t[49]=R):R=t[49];let z;t[50]!==j||t[51]!==R?(z=(0,B.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[j,R]}),t[50]=j,t[51]=R,t[52]=z):z=t[52];let H;return t[53]!==n||t[54]!==O||t[55]!==z||t[56]!==x?(H=(0,B.jsxs)(`div`,{className:x,"data-theme-color-role":n,children:[O,z]}),t[53]=n,t[54]=O,t[55]=z,t[56]=x,t[57]=H):H=t[57],H}),ue=[`background`,`border`,`foreground`],G=`data-theme-inspector-match`,K=`data-theme-token-probe`,q=`#01fea7`,J=`#fe01a7`,Y=`theme-inspector-spotlight`,de=`theme-inspector-spotlight-mask`,fe=`theme-inspector-spotlight-glow`,X=`theme-inspector-hover`,pe=`http://www.w3.org/2000/svg`,me={background:`canvas`,foreground:`text`,card:`surface`,"card-foreground":`text`,popover:`surfaceOverlay`,"popover-foreground":`text`,"surface-raised":`surfaceRaised`,primary:`messageAction`,"primary-foreground":`messageActionForeground`,secondary:`secondary`,"secondary-foreground":`secondaryForeground`,muted:`muted`,"muted-foreground":`mutedForeground`,placeholder:`placeholder`,"secondary-label":`secondaryLabel`,"icon-muted":`iconMuted`,accent:`accentSurface`,"accent-foreground":`accentSurfaceForeground`,destructive:`error`,"destructive-foreground":`errorForeground`,error:`error`,"error-foreground":`errorForeground`,"error-surface":`errorSurface`,warning:`warning`,"warning-foreground":`warningForeground`,"warning-surface":`warningSurface`,update:`update`,"update-foreground":`updateForeground`,"update-surface":`updateSurface`,message:`messageSurface`,"message-foreground":`messageForeground`,"message-action":`messageAction`,"message-action-foreground":`messageActionForeground`,"message-action-hover":`messageActionHover`,sidebar:`sidebar`,"sidebar-foreground":`sidebarForeground`,"sidebar-muted-foreground":`sidebarMutedForeground`,"sidebar-control-surface":`sidebarControlSurface`,"sidebar-row-hover":`sidebarRowHover`,"sidebar-row-active":`sidebarRowActive`,"sidebar-row-selected":`sidebarRowSelected`,"sidebar-border":`sidebarBorder`,border:`border`,input:`input`,ring:`focus`},he={background:[`bg-`],border:[`border-`,`outline-`,`ring-`],foreground:[`text-`,`caret-`,`fill-`,`stroke-`]};function Z(e){document.querySelectorAll(`[${e}]`).forEach(t=>t.removeAttribute(e))}function ge(){Z(G),document.getElementById(Y)?.remove()}function _e(){document.getElementById(X)?.remove()}function Q(e){return document.createElementNS(pe,e)}function ve(e){let t=e.getBoundingClientRect();if(t.width<=0||t.height<=0||t.right<0||t.bottom<0||t.left>window.innerWidth||t.top>window.innerHeight)return null;let n=t.left-5,r=t.top-5,i=Number.parseFloat(window.getComputedStyle(e).borderTopLeftRadius)||0;return{x:n,y:r,width:t.width+10,height:t.height+10,radius:Math.min(18,Math.max(7,i+5))}}function ye(e,t){let n=ve(e.element);if(!n){_e();return}let r=document.getElementById(X);if(!r){r=document.createElement(`div`),r.id=X,r.setAttribute(`aria-hidden`,`true`);let e=document.createElement(`span`);e.dataset.themeInspectorHoverLabel=``,r.append(e),document.body.append(r)}r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.width=`${n.width}px`,r.style.height=`${n.height}px`,r.style.borderRadius=`${n.radius}px`,r.dataset.placement=n.y<32?`below`:`above`;let i=r.querySelector(`[data-theme-inspector-hover-label]`);i&&(i.textContent=t)}function be(e){let t=new Map;for(let n of e){let e=ve(n);if(!e)continue;let r=[e.x,e.y,e.width,e.height].map(e=>Math.round(e)).join(`:`);t.set(r,e)}if(t.size===0){document.getElementById(Y)?.remove();return}let n=document.getElementById(Y);n||(n=Q(`svg`),n.id=Y,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`),document.body.append(n)),n.setAttribute(`viewBox`,`0 0 ${window.innerWidth} ${window.innerHeight}`);let r=Q(`defs`),i=Q(`mask`);i.id=de,i.setAttribute(`maskUnits`,`userSpaceOnUse`);let a=Q(`rect`);a.setAttribute(`width`,String(window.innerWidth)),a.setAttribute(`height`,String(window.innerHeight)),a.setAttribute(`fill`,`white`),i.append(a);let o=Q(`filter`);o.id=fe,o.setAttribute(`x`,`-50%`),o.setAttribute(`y`,`-50%`),o.setAttribute(`width`,`200%`),o.setAttribute(`height`,`200%`);let s=Q(`feGaussianBlur`);s.setAttribute(`stdDeviation`,`5`),s.setAttribute(`result`,`blur`);let c=Q(`feMerge`),l=Q(`feMergeNode`);l.setAttribute(`in`,`blur`);let u=Q(`feMergeNode`);u.setAttribute(`in`,`SourceGraphic`),c.append(l,u),o.append(s,c),r.append(i,o);let d=Q(`g`);for(let e of t.values()){let t=Q(`rect`);t.setAttribute(`x`,String(e.x)),t.setAttribute(`y`,String(e.y)),t.setAttribute(`width`,String(e.width)),t.setAttribute(`height`,String(e.height)),t.setAttribute(`rx`,String(e.radius)),t.setAttribute(`fill`,`black`),i.append(t);let n=t.cloneNode(!1);n.removeAttribute(`fill`),n.setAttribute(`class`,`theme-inspector-spotlight-glow`),n.setAttribute(`filter`,`url(#${fe})`),d.append(n)}let f=Q(`rect`);f.setAttribute(`class`,`theme-inspector-spotlight-dimmer`),f.setAttribute(`width`,String(window.innerWidth)),f.setAttribute(`height`,String(window.innerHeight)),f.setAttribute(`mask`,`url(#${de})`),n.replaceChildren(r,f,d)}function xe(){be([...document.querySelectorAll(`[${G}]`)])}function Se(e){return e.matches(`input, textarea, select, option`)?!0:Array.from(e.childNodes).some(e=>e.nodeType===Node.TEXT_NODE&&!!e.textContent?.trim())}function Ce(e,{forHitTest:t=!1}={}){let n=window.getComputedStyle(e);if(n.display===`none`||n.visibility===`hidden`||Number(n.opacity)===0)return null;let r=[];for(let[e,t,i]of[[n.borderTopColor,n.borderTopStyle,n.borderTopWidth],[n.borderRightColor,n.borderRightStyle,n.borderRightWidth],[n.borderBottomColor,n.borderBottomStyle,n.borderBottomWidth],[n.borderLeftColor,n.borderLeftStyle,n.borderLeftWidth]])t!==`none`&&Number.parseFloat(i)>0&&r.push(e);n.outlineStyle!==`none`&&Number.parseFloat(n.outlineWidth)>0&&r.push(n.outlineColor),n.borderImageSource!==`none`&&r.push(n.borderImageSource),n.boxShadow!==`none`&&r.push(n.boxShadow);let i=[];return(t||Se(e))&&i.push(n.color),e instanceof SVGElement&&i.push(n.fill,n.stroke),e.matches(`input, textarea`)&&i.push(n.caretColor),n.textDecorationLine!==`none`&&i.push(n.textDecorationColor),n.textShadow!==`none`&&i.push(n.textShadow),{background:[n.backgroundColor,n.backgroundImage].join(`
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Mx as n,ha as r,sr as i,t as a}from"./utils-Cbsb1ks0.js";import{t as o}from"./paintbrush-D1BKpWrm.js";import{t as s}from"./plus-Cr075-cy.js";import{t as c}from"./x-CSwbgjBe.js";import{a as l,c as u,n as d,t as f,u as p}from"./tooltip-DyiHlEs0.js";import{A as m,E as h,G as g,H as _,O as v,S as y,U as ee,W as b,_ as te,d as ne,et as x,g as S,m as C,s as w,u as T,y as E}from"./themePalette-C1oD3Oeg.js";import{n as D,t as O}from"./toggle-group-DIqmqqKQ.js";import{t as re}from"./input-w_nbMVAd.js";import{i as k,o as A,t as j}from"./popover-D-VzRDzk.js";import{i as M,n as N,r as P,t as F}from"./color-picker-Dqvd0njw.js";import{La as I,vo as L}from"./main-D1oD2GPo.js";var R=p(),ie=n(),z=e(t(),1),B=e(r(),1);function V(e){return{canvas:`Background`,toolbar:`Toolbar background`,toolbarForeground:`Toolbar text`,toolbarBorder:`Toolbar border`,toolbarControl:`Toolbar control`,toolbarControlForeground:`Toolbar control text`,toolbarControlHover:`Toolbar control hover`,accent:`Accent color`,errorForeground:`Error text`,errorSurface:`Error background`,warningForeground:`Warning text`,warningSurface:`Warning background`,updateForeground:`Update text`,updateSurface:`Update background`}[e]||e.replace(/([A-Z])/g,` $1`).replace(/^./,e=>e.toUpperCase())}function H(e){let t=_(e)??``,n=t.length===9?t.slice(7):``;return n===`ff`?``:n}function ae(e){return(_(e)??`#000000`).slice(0,7)}function oe(e){let t=Number.parseInt(ae(e).slice(1),16);return[t>>16,t>>8&255,t&255]}function se(e){let t=e.trim().replace(/^rgb\(\s*/i,``).replace(/\s*\)$/,``).split(/[,\s]+/).filter(Boolean).map(Number);return t.length!==3||t.some(e=>!Number.isInteger(e)||e<0||e>255)?null:`#${t.map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function U(e){return oe(e).join(`, `)}function W({label:e,value:t,onChange:n}){let r=ae(t),i=H(t),[a,o]=(0,z.useState)(()=>P(r)),[s,c]=(0,z.useState)(r),[l,u]=(0,z.useState)(()=>U(r)),d=(0,z.useRef)(!1),f=M(a.h,a.s,a.v),p=U(f);(0,z.useEffect)(()=>{d.current||(c(r),u(U(r))),o(e=>M(e.h,e.s,e.v)===r?e:P(r))},[r]);let m=(0,z.useRef)(n);m.current=n;let h=(0,z.useRef)(null),g=(0,z.useRef)(null),_=(0,z.useCallback)(()=>{g.current!==null&&(cancelAnimationFrame(g.current),g.current=null);let e=h.current;h.current=null,e!==null&&m.current(e)},[]);(0,z.useEffect)(()=>()=>_(),[_]);let v=(0,z.useCallback)(e=>{h.current=e,g.current??=requestAnimationFrame(()=>{g.current=null;let e=h.current;h.current=null,e!==null&&m.current(e)})},[]),y=(0,z.useCallback)(e=>{o(e);let t=M(e.h,e.s,e.v);c(t),u(U(t)),v(t+i)},[i,v]),ee=e=>{if(c(e),!/^#[0-9a-f]{6}$/i.test(e))return;let t=P(e);o(t),u(U(e)),n(e.toLowerCase())},b=e=>{u(e);let t=se(e);t&&(o(P(t)),c(t),n(t+i))};return(0,B.jsxs)(`div`,{className:`w-72 bg-popover`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/70 px-4 py-3`,children:[(0,B.jsxs)(`div`,{className:`min-w-0`,children:[(0,B.jsx)(`p`,{className:`truncate text-xs font-semibold text-foreground`,children:e}),(0,B.jsx)(`p`,{className:`text-2xs text-muted-foreground`,children:`Choose a color`})]}),(0,B.jsx)(`span`,{className:`size-7 shrink-0 rounded-full shadow-sm`,style:{backgroundColor:f}})]}),(0,B.jsxs)(`div`,{className:`grid gap-3 px-3 pb-3 pt-3`,children:[(0,B.jsx)(N,{label:e,value:a,onChange:y,onInteractionEnd:_}),(0,B.jsx)(F,{label:`${e} hue`,value:a.h,onChange:e=>y({...a,h:e}),onInteractionEnd:_}),(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_1.2fr] gap-2`,children:[(0,B.jsxs)(`label`,{className:`grid min-w-0 gap-1`,children:[(0,B.jsx)(`span`,{className:`px-1 text-3xs font-semibold uppercase tracking-widest text-muted-foreground`,children:`HEX`}),(0,B.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 rounded-lg border border-input bg-background px-2 focus-within:border-ring`,children:[(0,B.jsx)(`span`,{className:`size-3.5 shrink-0 rounded-full`,style:{backgroundColor:f}}),(0,B.jsx)(`input`,{"aria-label":`${e} picker hex value`,className:`h-8 min-w-0 flex-1 bg-transparent font-mono text-xs text-foreground outline-none`,onBlur:()=>{d.current=!1,c(f),u(p)},onChange:e=>ee(e.currentTarget.value),onFocus:()=>{d.current=!0},spellCheck:!1,value:s})]})]}),(0,B.jsxs)(`label`,{className:`grid min-w-0 gap-1`,children:[(0,B.jsx)(`span`,{className:`px-1 text-3xs font-semibold uppercase tracking-widest text-muted-foreground`,children:`RGB`}),(0,B.jsx)(`span`,{className:`flex min-w-0 items-center rounded-lg border border-input bg-background px-2 focus-within:border-ring`,children:(0,B.jsx)(`input`,{"aria-label":`${e} picker RGB value`,className:`h-8 min-w-0 flex-1 bg-transparent font-mono text-xs text-foreground outline-none`,onBlur:()=>{d.current=!1,c(f),u(p)},onChange:e=>b(e.currentTarget.value),onFocus:()=>{d.current=!0},spellCheck:!1,value:l})})]})]})]})]})}function ce(e){let t=(0,ie.c)(13),{label:n,value:r,onChange:i,onInteract:a}=e,o=`Choose ${n} color`,s;t[0]===r?s=t[1]:(s=(0,B.jsx)(`span`,{className:`absolute inset-0 rounded-full shadow-sm`,style:{backgroundColor:r}}),t[0]=r,t[1]=s);let c;t[2]!==a||t[3]!==o||t[4]!==s?(c=(0,B.jsx)(A,{render:(0,B.jsx)(`button`,{"aria-label":o,className:`relative flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-full border border-foreground/30 transition-transform hover:scale-105 focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring`,onFocus:a,onPointerDown:a,type:`button`,children:s})}),t[2]=a,t[3]=o,t[4]=s,t[5]=c):c=t[5];let l;t[6]!==n||t[7]!==i||t[8]!==r?(l=(0,B.jsx)(k,{align:`end`,padding:`none`,"data-theme-editor-panel":``,side:`bottom`,sideOffset:10,children:(0,B.jsx)(W,{label:n,onChange:i,value:r})}),t[6]=n,t[7]=i,t[8]=r,t[9]=l):l=t[9];let u;return t[10]!==c||t[11]!==l?(u=(0,B.jsxs)(j,{children:[c,l]}),t[10]=c,t[11]=l,t[12]=u):u=t[12],u}var le=(0,z.memo)(function(e){let t=(0,ie.c)(58),{role:n,value:r,onChange:i,onSelect:o,onToggleSelected:s,selected:c,label:u}=e,p=c!==void 0&&c,m;t[0]!==u||t[1]!==n?(m=u??V(n),t[0]=u,t[1]=n,t[2]=m):m=t[2];let g=m,v;t[3]===r?v=t[4]:(v=h(r),t[3]=r,t[4]=v);let y=v,ee=y?r:`#000000`,b;t[5]===r?b=t[6]:(b=r.trim().toLowerCase().startsWith(`oklch(`)?_(r)??r:r,t[5]=r,t[6]=b);let te=b,ne=p&&`bg-accent/60 inset-ring inset-ring-ring`,x;t[7]===ne?x=t[8]:(x=a(`flex min-h-11 min-w-0 items-center gap-2 rounded-lg px-2 py-1.5 transition-[background-color,box-shadow]`,ne),t[7]=ne,t[8]=x);let S=`${p?`Hide`:`Show`} ${g} usage`,C;t[9]!==s||t[10]!==n?(C=()=>s?.(n),t[9]=s,t[10]=n,t[11]=C):C=t[11];let w;t[12]===g?w=t[13]:(w=(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:g}),t[12]=g,t[13]=w);let T;t[14]!==p||t[15]!==S||t[16]!==C||t[17]!==w?(T=(0,B.jsx)(l,{render:(0,B.jsx)(`button`,{"aria-label":S,"aria-pressed":p,className:`flex min-w-0 flex-1 cursor-pointer items-center rounded-md text-left text-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,onClick:C,type:`button`,children:w})}),t[14]=p,t[15]=S,t[16]=C,t[17]=w,t[18]=T):T=t[18];let E=`${p?`Hide`:`Show`} where ${g} is used`,D;t[19]===E?D=t[20]:(D=(0,B.jsx)(d,{side:`top`,children:E}),t[19]=E,t[20]=D);let O;t[21]!==T||t[22]!==D?(O=(0,B.jsxs)(f,{children:[T,D]}),t[21]=T,t[22]=D,t[23]=O):O=t[23];let k;t[24]!==i||t[25]!==n?(k=e=>i(n,e),t[24]=i,t[25]=n,t[26]=k):k=t[26];let A;t[27]!==o||t[28]!==n?(A=()=>o?.(n),t[27]=o,t[28]=n,t[29]=A):A=t[29];let j;t[30]!==g||t[31]!==ee||t[32]!==k||t[33]!==A?(j=(0,B.jsx)(ce,{label:g,onChange:k,onInteract:A,value:ee}),t[30]=g,t[31]=ee,t[32]=k,t[33]=A,t[34]=j):j=t[34];let M=!y,N=`${g} hex value`,P=`${n}-hex`,F;t[35]!==i||t[36]!==n?(F=e=>i(n,e.currentTarget.value),t[35]=i,t[36]=n,t[37]=F):F=t[37];let I,L;t[38]!==o||t[39]!==n?(I=()=>o?.(n),L=()=>o?.(n),t[38]=o,t[39]=n,t[40]=I,t[41]=L):(I=t[40],L=t[41]);let R;t[42]!==te||t[43]!==M||t[44]!==N||t[45]!==P||t[46]!==F||t[47]!==I||t[48]!==L?(R=(0,B.jsx)(re,{"aria-invalid":M,"aria-label":N,className:`w-28 shrink-0`,font:`mono`,id:P,nativeInput:!0,onChange:F,onFocus:I,onPointerDown:L,size:`compact`,value:te}),t[42]=te,t[43]=M,t[44]=N,t[45]=P,t[46]=F,t[47]=I,t[48]=L,t[49]=R):R=t[49];let z;t[50]!==j||t[51]!==R?(z=(0,B.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[j,R]}),t[50]=j,t[51]=R,t[52]=z):z=t[52];let H;return t[53]!==n||t[54]!==O||t[55]!==z||t[56]!==x?(H=(0,B.jsxs)(`div`,{className:x,"data-theme-color-role":n,children:[O,z]}),t[53]=n,t[54]=O,t[55]=z,t[56]=x,t[57]=H):H=t[57],H}),ue=[`background`,`border`,`foreground`],G=`data-theme-inspector-match`,K=`data-theme-token-probe`,q=`#01fea7`,J=`#fe01a7`,Y=`theme-inspector-spotlight`,de=`theme-inspector-spotlight-mask`,fe=`theme-inspector-spotlight-glow`,X=`theme-inspector-hover`,pe=`http://www.w3.org/2000/svg`,me={background:`canvas`,foreground:`text`,card:`surface`,"card-foreground":`text`,popover:`surfaceOverlay`,"popover-foreground":`text`,"surface-raised":`surfaceRaised`,primary:`messageAction`,"primary-foreground":`messageActionForeground`,secondary:`secondary`,"secondary-foreground":`secondaryForeground`,muted:`muted`,"muted-foreground":`mutedForeground`,placeholder:`placeholder`,"secondary-label":`secondaryLabel`,"icon-muted":`iconMuted`,accent:`accentSurface`,"accent-foreground":`accentSurfaceForeground`,destructive:`error`,"destructive-foreground":`errorForeground`,error:`error`,"error-foreground":`errorForeground`,"error-surface":`errorSurface`,warning:`warning`,"warning-foreground":`warningForeground`,"warning-surface":`warningSurface`,update:`update`,"update-foreground":`updateForeground`,"update-surface":`updateSurface`,message:`messageSurface`,"message-foreground":`messageForeground`,"message-action":`messageAction`,"message-action-foreground":`messageActionForeground`,"message-action-hover":`messageActionHover`,sidebar:`sidebar`,"sidebar-foreground":`sidebarForeground`,"sidebar-muted-foreground":`sidebarMutedForeground`,"sidebar-control-surface":`sidebarControlSurface`,"sidebar-row-hover":`sidebarRowHover`,"sidebar-row-active":`sidebarRowActive`,"sidebar-row-selected":`sidebarRowSelected`,"sidebar-border":`sidebarBorder`,border:`border`,input:`input`,ring:`focus`},he={background:[`bg-`],border:[`border-`,`outline-`,`ring-`],foreground:[`text-`,`caret-`,`fill-`,`stroke-`]};function Z(e){document.querySelectorAll(`[${e}]`).forEach(t=>t.removeAttribute(e))}function ge(){Z(G),document.getElementById(Y)?.remove()}function _e(){document.getElementById(X)?.remove()}function Q(e){return document.createElementNS(pe,e)}function ve(e){let t=e.getBoundingClientRect();if(t.width<=0||t.height<=0||t.right<0||t.bottom<0||t.left>window.innerWidth||t.top>window.innerHeight)return null;let n=t.left-5,r=t.top-5,i=Number.parseFloat(window.getComputedStyle(e).borderTopLeftRadius)||0;return{x:n,y:r,width:t.width+10,height:t.height+10,radius:Math.min(18,Math.max(7,i+5))}}function ye(e,t){let n=ve(e.element);if(!n){_e();return}let r=document.getElementById(X);if(!r){r=document.createElement(`div`),r.id=X,r.setAttribute(`aria-hidden`,`true`);let e=document.createElement(`span`);e.dataset.themeInspectorHoverLabel=``,r.append(e),document.body.append(r)}r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.width=`${n.width}px`,r.style.height=`${n.height}px`,r.style.borderRadius=`${n.radius}px`,r.dataset.placement=n.y<32?`below`:`above`;let i=r.querySelector(`[data-theme-inspector-hover-label]`);i&&(i.textContent=t)}function be(e){let t=new Map;for(let n of e){let e=ve(n);if(!e)continue;let r=[e.x,e.y,e.width,e.height].map(e=>Math.round(e)).join(`:`);t.set(r,e)}if(t.size===0){document.getElementById(Y)?.remove();return}let n=document.getElementById(Y);n||(n=Q(`svg`),n.id=Y,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`),document.body.append(n)),n.setAttribute(`viewBox`,`0 0 ${window.innerWidth} ${window.innerHeight}`);let r=Q(`defs`),i=Q(`mask`);i.id=de,i.setAttribute(`maskUnits`,`userSpaceOnUse`);let a=Q(`rect`);a.setAttribute(`width`,String(window.innerWidth)),a.setAttribute(`height`,String(window.innerHeight)),a.setAttribute(`fill`,`white`),i.append(a);let o=Q(`filter`);o.id=fe,o.setAttribute(`x`,`-50%`),o.setAttribute(`y`,`-50%`),o.setAttribute(`width`,`200%`),o.setAttribute(`height`,`200%`);let s=Q(`feGaussianBlur`);s.setAttribute(`stdDeviation`,`5`),s.setAttribute(`result`,`blur`);let c=Q(`feMerge`),l=Q(`feMergeNode`);l.setAttribute(`in`,`blur`);let u=Q(`feMergeNode`);u.setAttribute(`in`,`SourceGraphic`),c.append(l,u),o.append(s,c),r.append(i,o);let d=Q(`g`);for(let e of t.values()){let t=Q(`rect`);t.setAttribute(`x`,String(e.x)),t.setAttribute(`y`,String(e.y)),t.setAttribute(`width`,String(e.width)),t.setAttribute(`height`,String(e.height)),t.setAttribute(`rx`,String(e.radius)),t.setAttribute(`fill`,`black`),i.append(t);let n=t.cloneNode(!1);n.removeAttribute(`fill`),n.setAttribute(`class`,`theme-inspector-spotlight-glow`),n.setAttribute(`filter`,`url(#${fe})`),d.append(n)}let f=Q(`rect`);f.setAttribute(`class`,`theme-inspector-spotlight-dimmer`),f.setAttribute(`width`,String(window.innerWidth)),f.setAttribute(`height`,String(window.innerHeight)),f.setAttribute(`mask`,`url(#${de})`),n.replaceChildren(r,f,d)}function xe(){be([...document.querySelectorAll(`[${G}]`)])}function Se(e){return e.matches(`input, textarea, select, option`)?!0:Array.from(e.childNodes).some(e=>e.nodeType===Node.TEXT_NODE&&!!e.textContent?.trim())}function Ce(e,{forHitTest:t=!1}={}){let n=window.getComputedStyle(e);if(n.display===`none`||n.visibility===`hidden`||Number(n.opacity)===0)return null;let r=[];for(let[e,t,i]of[[n.borderTopColor,n.borderTopStyle,n.borderTopWidth],[n.borderRightColor,n.borderRightStyle,n.borderRightWidth],[n.borderBottomColor,n.borderBottomStyle,n.borderBottomWidth],[n.borderLeftColor,n.borderLeftStyle,n.borderLeftWidth]])t!==`none`&&Number.parseFloat(i)>0&&r.push(e);n.outlineStyle!==`none`&&Number.parseFloat(n.outlineWidth)>0&&r.push(n.outlineColor),n.borderImageSource!==`none`&&r.push(n.borderImageSource),n.boxShadow!==`none`&&r.push(n.boxShadow);let i=[];return(t||Se(e))&&i.push(n.color),e instanceof SVGElement&&i.push(n.fill,n.stroke),e.matches(`input, textarea`)&&i.push(n.caretColor),n.textDecorationLine!==`none`&&i.push(n.textDecorationColor),n.textShadow!==`none`&&i.push(n.textShadow),{background:[n.backgroundColor,n.backgroundImage].join(`
2
2
  `),border:r.join(`
3
3
  `),foreground:i.join(`
4
4
  `)}}function we(e,t){return ue.filter(n=>e[n]!==t[n])}function Te(e){let t=document.documentElement,n=t.hasAttribute(K);n||t.setAttribute(K,``);try{return e()}finally{window.getComputedStyle(t).color,n||t.removeAttribute(K)}}function $(e){let t=document.documentElement,n=S(e),r=t.style.getPropertyValue(n),i=t.style.getPropertyPriority(n),a=r.trim().toLowerCase()===q?J:q;return t.style.setProperty(n,a,`important`),()=>{r?t.style.setProperty(n,r,i):t.style.removeProperty(n)}}function Ee(e){let t=e.map($);return()=>{for(let e of t.toReversed())e()}}function De(){return[document.body,...document.body.querySelectorAll(`*`)].filter(e=>!e.closest(`[data-theme-editor-panel]`)&&!e.closest(`#${Y}, #${X}`))}function Oe(e,t){if(e.includes(`:`))return null;for(let n of he[t])if(e.startsWith(n))return me[e.slice(n.length).split(`/`,1)[0]??``]??null;return null}function ke(e){for(let t of ue)for(let n of e.classList){let e=Oe(n,t);if(e)return e}return null}function Ae(e){let t=[],n=e;for(;n&&n!==document.documentElement;)n.closest(`[data-theme-editor-panel]`)||t.push(n),n=n.parentElement;return t}function je(e){if(e.closest(`[data-theme-editor-panel]`))return null;for(let t of Ae(e)){let e=ke(t);if(e)return{element:t,role:e}}return null}function Me(e){performance.now(),Z(G);let t=De(),n=performance.now(),r=Te(()=>{let n=new Map;for(let e of t){let t=Ce(e);t&&n.set(e,t)}let r=Ee(e),i=new Set;try{for(let[e,t]of n){let n=Ce(e);n&&we(t,n).length>0&&i.add(e)}}finally{r()}return i});performance.now()-n;let i=new Set;for(let e of r)i.add(e instanceof SVGElement?e.closest(`svg`)??e:e);for(let e of i)e.setAttribute(G,``);return be([...i]),i.size}function Ne(e){if(e.closest(`[data-theme-editor-panel]`))return null;let t=Ae(e),n=je(e);if(n)return n;let r=Te(()=>{let e=new Map,n=new Map;for(let n of t){let t=Ce(n,{forHitTest:!0});t&&e.set(n,t)}for(let t of x){let r=$(t);try{for(let[r,i]of e){let e=Ce(r,{forHitTest:!0});if(!e)continue;let a=n.get(r)??{};for(let n of we(i,e))a[n]??=t;n.set(r,a)}}finally{r()}}return n});for(let e of t){let t=r.get(e);if(t)for(let n of ue){let r=t[n];if(r)return{element:e,role:r}}}return null}var Pe=[`canvas`,`accent`],Fe=[{id:`foundation`,title:`Foundation`,families:[{id:`background`,label:`Background`,role:`canvas`,roles:[`canvas`,`chrome`,`toolbar`]},{id:`surface`,label:`Surface`,role:`surface`,roles:[`surface`]},{id:`raised-surface`,label:`Raised surface`,role:`surfaceRaised`,roles:[`surfaceRaised`]},{id:`overlay`,label:`Overlay`,role:`surfaceOverlay`,roles:[`surfaceOverlay`]},{id:`text`,label:`Text`,role:`text`,roles:[`text`,`toolbarForeground`,`toolbarControlForeground`]},{id:`muted-text`,label:`Muted text`,role:`mutedForeground`,roles:[`textMuted`,`mutedForeground`,`placeholder`,`secondaryLabel`,`iconMuted`,`sidebarMutedForeground`]},{id:`border`,label:`Border`,role:`border`,roles:[`border`,`toolbarBorder`,`sidebarBorder`]},{id:`input`,label:`Input`,role:`input`,roles:[`input`]}]},{id:`brand-content`,title:`Brand & content`,families:[{id:`subtle-surface`,label:`Subtle surface`,role:`secondary`,roles:[`secondary`,`secondaryForeground`,`muted`,`toolbarControl`]},{id:`highlight-surface`,label:`Highlight surface`,role:`accentSurface`,roles:[`accentSurface`,`accentSurfaceForeground`,`toolbarControlHover`]},{id:`accent`,label:`Accent`,role:`accent`,roles:[`accent`,`accentForeground`,`focus`,`update`,`updateForeground`,`updateSurface`,`terminalCursor`]},{id:`action`,label:`Action`,role:`messageAction`,roles:[`messageAction`,`messageActionForeground`,`messageActionHover`]},{id:`message-surface`,label:`Message surface`,role:`messageSurface`,roles:[`messageSurface`,`messageForeground`]},{id:`code-surface`,label:`Code surface`,role:`codeBackground`,roles:[`codeBackground`,`codeForeground`]}]},{id:`search`,title:`Search`,families:[{id:`search-matches`,label:`Search matches`,role:`searchMatchBackground`,roles:[`searchMatchBackground`,`searchMatchForeground`]},{id:`current-match`,label:`Current match`,role:`searchMatchActiveBackground`,roles:[`searchMatchActiveBackground`,`searchMatchActiveForeground`]}]},{id:`context`,title:`Context`,families:[{id:`sidebar-background`,label:`Sidebar background`,role:`sidebar`,roles:[`sidebar`,`sidebarForeground`]},{id:`sidebar-controls`,label:`Sidebar controls`,role:`sidebarControlSurface`,roles:[`sidebarControlSurface`]},{id:`sidebar-selection`,label:`Sidebar selection`,role:`sidebarRowSelected`,roles:[`sidebarRowHover`,`sidebarRowActive`,`sidebarRowSelected`]},{id:`terminal-background`,label:`Terminal background`,role:`terminalBackground`,roles:[`terminalBackground`,`terminalForeground`,`terminalSelection`,`terminalScrollbar`,`terminalScrollbarHover`]}]},{id:`status`,title:`Status`,families:[{id:`error`,label:`Error`,role:`error`,roles:[`error`,`errorForeground`,`errorSurface`]},{id:`warning`,label:`Warning`,role:`warning`,roles:[`warning`,`warningForeground`,`warningSurface`]}]}],Ie=Fe.flatMap(e=>e.families),Le=new Map(Ie.flatMap(e=>e.roles.map(t=>[t,e])));function Re(e){return Le.get(e)??null}function ze(e){return{...C(e)}}function Be(){return{light:ze(`light`),dark:ze(`dark`)}}function Ve(e){return h(e.trim())}function He(e,t){let n=C(e);return T(e,Ve(t.canvas)?t.canvas:n.canvas,Ve(t.accent)?t.accent:n.accent)}function Ue({open:e,onOpenChange:t,onSaved:n,editingTheme:r,initialAppearance:p,seedTheme:h,seedName:_,restoreTheme:S}){let C=r!==null,[T,k]=(0,z.useState)(``),[A,j]=(0,z.useState)(p),[M,N]=(0,z.useState)(!1),[P,F]=(0,z.useState)(()=>Be()),[ie,H]=(0,z.useState)({light:!1,dark:!1}),[ae,oe]=(0,z.useState)(!1),[se,U]=(0,z.useState)(null),[W,ce]=(0,z.useState)(!1),[ue,G]=(0,z.useState)(``),[K,q]=(0,z.useState)(!1),[J,Y]=(0,z.useState)(null),[de,fe]=(0,z.useState)(null),[X,pe]=(0,z.useState)(null),[me,he]=(0,z.useState)(null),Z=(0,z.useRef)(null),Q=(0,z.useRef)(null),ve=(0,z.useRef)(null);(0,z.useEffect)(()=>{if(!e)return;let t=()=>{let e,t;he(n=>n&&(e=Math.max(280,Math.min(n.width,window.innerWidth-16)),t=Math.max(220,Math.min(n.height,window.innerHeight-16)),{width:e,height:t})),pe(n=>{if(!n)return n;let r=$e(n.x,n.y,e),i=W?Z.current?.offsetHeight??0:t??Z.current?.offsetHeight??0,a=Math.max(8,window.innerHeight-i-8);return{x:r.x,y:Math.min(r.y,a)}})};return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[W,e]);let[be,Se]=(0,z.useState)(!1),Ce=(0,z.useRef)(!1);(0,z.useEffect)(()=>{if(e&&!Ce.current){let e=r??h??null,t=Be(),n=e?te(e,p)?p:e.appearance:p;if(e){t[e.appearance]={...e.colors};for(let n of[`light`,`dark`]){let r=e.variants?.[n];r&&(t[n]={...r})}}k(r?.label??_??``),j(n),N(e!==null&&e.managed!==!0),H({light:!1,dark:!1}),oe(e!==null&&e.managed!==!0),F(t),Y(null),fe(null),q(!1),U(null),Se(!0)}!e&&be&&Se(!1),Ce.current=e},[r,p,be,e,_,h]);let we=ee(T),Te=T.trim().toLowerCase(),$=Te===``?null:ne().find(e=>e.id!==r?.id&&(e.id===we||e.label.trim().toLowerCase()===Te))??null,Ee=$?E($):[],De=r?E(r):null,Oe=e=>De&&!De.includes(e)?`“${r?.label}” has no ${e} palette. Create a theme with the same name to add one.`:!C&&Ee.includes(e)?`“${$?.label}” already has a ${e} palette.`:null,ke=$?.id??null,Ae=Ee.join(`,`);(0,z.useEffect)(()=>{if(C||ke===null)return;let e=Ae.split(`,`).filter(Boolean);e.length===1&&j(t=>e.includes(t)?e[0]===`light`?`dark`:`light`:t)},[C,ke,Ae]),(0,z.useEffect)(()=>{e&&be&&w(P[A],A)},[A,P,be,e]),(0,z.useEffect)(()=>{if(e)return()=>{S()}},[e,S]);let Ie=(0,z.useCallback)((e,t)=>{F(n=>{let r={...n[A],[e]:t},i=!M&&Pe.includes(e)&&Ve(t);return{...n,[A]:M?g(A,n[A],e,t):i?He(A,r):r}}),!M&&Pe.includes(e)&&Ve(t)&&H(e=>({...e,[A]:!0})),M&&oe(!0)},[A,M]),Le=(0,z.useCallback)((e,t=!1)=>{let n=Re(e)?.role??e;Y(n),Pe.includes(n)||(N(!0),G(``)),t&&requestAnimationFrame(()=>{Z.current?.querySelector(`[data-theme-color-role="${n}"]`)?.scrollIntoView({behavior:`smooth`,block:`nearest`})})},[]),ze=(0,z.useCallback)(e=>{Y(t=>t===e?null:e)},[]),Ue=(0,z.useCallback)(()=>{Y(null),fe(null),q(!1)},[]),We=(J?M?Re(J)?.roles??[J]:Pe.includes(J)?x.filter(e=>P[A][e].trim().toLowerCase()===P[A][J].trim().toLowerCase()):[J]:[]).join(`,`);(0,z.useEffect)(()=>{if(ge(),!e||J===null){fe(null);return}if(K)return;let t=We.split(`,`),n=()=>fe(Me(t));n();let r=null,i=null,a=performance.now(),o=()=>{if(r!==null||i!==null)return;let e=Math.max(0,500-(performance.now()-a)),t=()=>{r=null,i=null,a=performance.now(),n()};e===0?r=requestAnimationFrame(t):i=setTimeout(t,e)},s=new MutationObserver(e=>{e.every(e=>e.target instanceof Element&&(e.target.closest(`#theme-inspector-spotlight`)||e.target.closest(`[data-theme-editor-panel]`)))||o()});s.observe(document.body,{childList:!0,subtree:!0});let c=null,l=()=>{c??=requestAnimationFrame(()=>{c=null,xe()})};return window.addEventListener(`resize`,l),window.addEventListener(`scroll`,l,!0),()=>{s.disconnect(),r!==null&&cancelAnimationFrame(r),i!==null&&clearTimeout(i),c!==null&&cancelAnimationFrame(c),window.removeEventListener(`resize`,l),window.removeEventListener(`scroll`,l,!0),ge()}},[K,e,We,J]),(0,z.useEffect)(()=>{if(!e||!K){_e();return}let t=!1,n=null,r=null,i=null,a=null,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{o(),n=null,r=null,_e()},c=e=>{r=e,ye(e,Re(e.role)?.label??V(e.role))},l=e=>{let t=e.target;if(!(t instanceof Element)||t.closest(`[data-theme-editor-panel]`)){s();return}o(),n=t,r=null;let a=je(t);if(a){c(a);return}_e(),i=window.setTimeout(()=>{if(i=null,n!==t||!t.isConnected)return;let e=Ne(t);e&&c(e)},140)},u=e=>{e.relatedTarget===null&&s()},d=e=>{let i=e.target;if(!(i instanceof Element)||i.closest(`[data-theme-editor-panel]`))return;e.preventDefault(),e.stopPropagation(),o();let a=n===i&&r?r:Ne(i);a&&(s(),Le(a.role,!0),t=!0)},f=e=>{let n=e.target;n instanceof Element&&!n.closest(`[data-theme-editor-panel]`)&&(e.preventDefault(),e.stopPropagation(),t&&q(!1),t=!1)},p=e=>{e.key===`Escape`&&(e.preventDefault(),s(),Ue())},m=()=>{r&&(a??=requestAnimationFrame(()=>{a=null,r&&ye(r,Re(r.role)?.label??V(r.role))}))},h=()=>s();return document.addEventListener(`pointerover`,l,!0),document.addEventListener(`pointerout`,u,!0),document.addEventListener(`pointerdown`,d,!0),document.addEventListener(`click`,f,!0),document.addEventListener(`keydown`,p,!0),window.addEventListener(`resize`,m),window.addEventListener(`scroll`,h,!0),()=>{document.removeEventListener(`pointerover`,l,!0),document.removeEventListener(`pointerout`,u,!0),document.removeEventListener(`pointerdown`,d,!0),document.removeEventListener(`click`,f,!0),document.removeEventListener(`keydown`,p,!0),window.removeEventListener(`resize`,m),window.removeEventListener(`scroll`,h,!0),o(),a!==null&&cancelAnimationFrame(a),_e()}},[Ue,K,e,Le]);let Ge=(0,z.useCallback)(e=>{if(N(e),e||(J&&!Pe.includes(J)&&Y(null),!ae))return;let t=r&&E(r).length>1?[`light`,`dark`]:[A];H(e=>{let n={...e};for(let e of t)n[e]=!0;return n}),F(e=>{let n={...e};for(let r of t)n[r]=He(r,e[r]);return n}),oe(!1)},[A,r,J,ae]),Ke=()=>{if(!T.trim()){U(`Name your theme first.`);return}try{let e=M?P:{light:ie.light?He(`light`,P.light):P.light,dark:ie.dark?He(`dark`,P.dark):P.dark},i,a=null,o=null;if(r&&$){let t=E(r),n=t.find(e=>Ee.includes(e));if(n){U(`“${$.label}” already has a ${n} palette. Pick another name.`);return}a=t[0]??null,i=b({...v({version:1,id:$.id,name:$.label,appearance:$.appearance,colors:$.colors,variants:{...$.variants,...Object.fromEntries(t.map(t=>[t,e[t]]))},...$.managed===!0&&!M?{managed:!0}:{}}),...$.collection?{collection:$.collection}:{}}),o=r;try{m(r.id)}catch(e){try{b($)}catch{}throw e}}else if(r){let t=r.appearance,n=t===`light`?`dark`:`light`;i=b({...v({version:1,id:r.id,name:T,appearance:t,colors:e[t],...E(r).length>1?{variants:{[n]:e[n]}}:{},...M?{}:{managed:!0}}),...r.collection?{collection:r.collection}:{}})}else if($){if(Ee.includes(A)){U(`“${$.label}” already has light and dark palettes. Pick another name.`);return}a=A,i=b({...v({version:1,id:$.id,name:$.label,appearance:$.appearance,colors:$.colors,variants:{...$.variants,[A]:e[A]},...$.managed===!0&&!M?{managed:!0}:{}}),...$.collection?{collection:$.collection}:{}})}else i=y(v({version:1,name:T,appearance:A,colors:e[A],...M?{}:{managed:!0}}));if(!n(i,{created:r===null&&a===null,...a?{mergedAppearance:a}:{}})){if(!r&&a===null)try{m(i.id)}catch{}else if($&&a!==null)try{b($),o&&y(o)}catch{}U(`Theme saved, but it could not be made active. Try again.`);return}t(!1)}catch(e){U(e instanceof Error?e.message:C?`Could not save the theme.`:`Could not create the theme.`)}},qe=()=>(0,B.jsxs)(`label`,{className:`grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)] items-center gap-3`,children:[(0,B.jsx)(`span`,{className:`text-sm font-medium`,children:`Theme name`}),(0,B.jsx)(re,{autoFocus:!0,size:`sm`,onChange:e=>{k(e.currentTarget.value),U(null)},placeholder:C?`Theme name`:`e.g. Aurora`,value:T})]}),Je=e=>{let t=Oe(e),n=(0,B.jsx)(O,{"aria-disabled":t!==null,value:e,children:e===`light`?`Light`:`Dark`});return t===null?n:(0,B.jsxs)(f,{children:[(0,B.jsx)(l,{render:n}),(0,B.jsx)(d,{children:t})]})},Ye=()=>(0,B.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)] items-center gap-3`,children:[(0,B.jsx)(`span`,{className:`text-sm font-medium`,children:`Appearance`}),(0,B.jsxs)(D,{"aria-label":`Theme appearance`,variant:`segmented`,value:[A],onValueChange:e=>{let t=e[0];(t===`light`||t===`dark`)&&Oe(t)===null&&j(t)},children:[Je(`light`),Je(`dark`)]})]}),Xe=()=>(0,B.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)] items-start gap-3`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h3`,{className:`text-sm font-medium`,children:`Colors`}),M?null:(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Two colors, rest derived`})]}),(0,B.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[M?(0,B.jsx)(re,{"aria-label":`Filter colors`,className:`min-w-0 flex-1`,onChange:e=>G(e.currentTarget.value),placeholder:`Filter colors`,size:`sm`,value:ue}):null,(0,B.jsxs)(`label`,{className:`ml-auto flex shrink-0 cursor-pointer items-center gap-2 pt-0.5 text-sm font-medium`,children:[(0,B.jsx)(`span`,{children:`Advanced`}),(0,B.jsx)(I,{"aria-label":`Use advanced theme colors`,checked:M,onCheckedChange:e=>Ge(!!e)})]})]})]}),Ze=(e,t=`grid gap-2 sm:grid-cols-2`)=>(0,B.jsx)(`div`,{className:t,children:e.map(e=>(0,B.jsx)(le,{label:e.label,onChange:Ie,onSelect:Le,onToggleSelected:ze,role:e.role,selected:J===e.role,value:P[A][e.role]},e.id))}),Qe=()=>{let e=ue.trim().toLowerCase(),t=Fe.map(t=>({...t,families:t.families.filter(t=>!e||[t.label,...t.roles.map(e=>V(e))].join(` `).toLowerCase().includes(e))})).filter(e=>e.families.length>0);return M?(0,B.jsxs)(`div`,{className:`space-y-5`,children:[t.map(e=>(0,B.jsxs)(`section`,{className:`space-y-2`,children:[(0,B.jsx)(`h4`,{className:`text-sm font-medium text-foreground`,children:e.title}),Ze(e.families,`grid gap-1`)]},e.id)),t.length===0?(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No matches.`}):null]}):(0,B.jsx)(`div`,{className:`grid gap-1`,children:Pe.map(e=>(0,B.jsx)(le,{onChange:Ie,onSelect:Le,onToggleSelected:ze,role:e,label:e===`canvas`?`Background`:`Accent`,selected:J===e,value:P[A][e]},e))})},$e=(e,t,n)=>{let r=Z.current,i=n??r?.offsetWidth??0;return{x:Math.min(Math.max(e,8),Math.max(8,window.innerWidth-i-8)),y:Math.min(Math.max(t,8),Math.max(8,window.innerHeight-48))}},et=e=>{if(e.target.closest(`button, input, a`))return;let t=Z.current?.getBoundingClientRect();t&&(Q.current={dx:e.clientX-t.x,dy:e.clientY-t.y},e.currentTarget.setPointerCapture(e.pointerId))},tt=e=>{let t=Q.current;t&&pe($e(e.clientX-t.dx,e.clientY-t.dy))},nt=()=>{Q.current=null},rt=e=>{let t=Z.current?.getBoundingClientRect();t&&(e.preventDefault(),X===null&&pe($e(t.x,t.y)),ve.current={pointerX:e.clientX,pointerY:e.clientY,left:t.x,top:t.y,width:t.width,height:t.height},e.currentTarget.setPointerCapture(e.pointerId))},it=e=>{let t=ve.current;if(!t)return;let n=Math.max(280,window.innerWidth-8-t.left),r=Math.max(220,window.innerHeight-8-t.top);he({width:Math.min(Math.max(t.width+e.clientX-t.pointerX,280),n),height:Math.min(Math.max(t.height+e.clientY-t.pointerY,220),r)})},at=()=>{ve.current=null};return(0,B.jsxs)(`div`,{"aria-label":C?`Edit theme`:`Create theme`,className:a(`dialog-glass fixed z-[110] flex max-h-[min(42rem,calc(100dvh-6rem))] w-[min(26rem,calc(100vw-2rem))] flex-col overflow-hidden rounded-xl border text-popover-foreground`,X===null&&`bottom-4 right-4`,W&&`max-h-none`),"data-theme-editor-panel":!0,ref:Z,role:`dialog`,style:{...X?{left:X.x,top:X.y}:{},...me?{width:me.width}:{},...me&&!W?{height:me.height,maxHeight:`calc(100dvh - 1rem)`}:{}},children:[(0,B.jsxs)(`div`,{className:`flex cursor-grab touch-none select-none items-center gap-1 border-b border-border/70 px-3 py-2 active:cursor-grabbing`,onPointerCancel:nt,onPointerDown:et,onPointerMove:tt,onPointerUp:nt,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-baseline gap-2`,children:[(0,B.jsx)(`h2`,{className:`shrink-0 truncate text-sm font-medium`,children:C?`Edit theme`:`Create theme`}),W?null:(0,B.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:K?`Select an element · Esc to cancel`:J?`${M?Re(J)?.label??V(J):V(J)} · ${de??0} ${de===1?`use`:`uses`}`:`Select a color below`})]}),(0,B.jsxs)(f,{children:[(0,B.jsx)(l,{render:(0,B.jsxs)(i,{"aria-label":K?`Cancel inspecting app colors`:`Inspect app colors`,"aria-pressed":K,size:`xs`,variant:K?`secondary`:`ghost`,onClick:()=>{if(K){Ue();return}q(!0)},children:[(0,B.jsx)(L,{}),K?`Cancel`:`Inspect`]})}),(0,B.jsx)(d,{"data-theme-editor-panel":``,children:K?`Cancel and clear the selection`:`Pick a color from the app`})]}),(0,B.jsx)(i,{"aria-label":W?`Expand the theme editor`:`Minimize the theme editor`,size:`icon-xs`,variant:`ghost`,onClick:()=>ce(!W),children:(0,B.jsx)(u,{icon:W?R.ChevronUp:R.ChevronDown})}),(0,B.jsx)(i,{"aria-label":`Close the theme editor`,size:`icon-xs`,variant:`ghost`,onClick:()=>t(!1),children:(0,B.jsx)(c,{})})]}),W?null:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-3 overflow-y-auto py-3 pl-3 pr-1.5`,children:[qe(),se?(0,B.jsx)(`p`,{"aria-live":`polite`,className:`text-sm text-destructive`,children:se}):null,Ye(),(0,B.jsxs)(`div`,{className:`space-y-3`,children:[Xe(),Qe()]})]}),(0,B.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t border-border/70 px-3 py-2`,children:[(0,B.jsx)(i,{size:`sm`,variant:`ghost`,onClick:()=>t(!1),children:`Cancel`}),(0,B.jsx)(i,{disabled:!T.trim(),size:`sm`,onClick:Ke,children:C?$?`Merge into “${$.label}”`:`Save changes`:$?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(s,{}),`Add ${A} palette`]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(o,{}),`Create theme`]})})]}),(0,B.jsx)(`div`,{"aria-hidden":!0,className:`absolute bottom-0 right-0 z-10 flex size-5 cursor-se-resize touch-none select-none items-end justify-end p-1 text-muted-foreground/70`,onPointerCancel:at,onPointerDown:rt,onPointerMove:it,onPointerUp:at,children:(0,B.jsx)(`svg`,{className:`size-2.5`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.2`,viewBox:`0 0 8 8`,children:(0,B.jsx)(`path`,{d:`M7 1 1 7M7 4.5 4.5 7`})})})]})]})}export{Ue as ThemeEditorPanel};
5
- //# sourceMappingURL=ThemeEditorPanel-vVmQV_Vv.js.map
5
+ //# sourceMappingURL=ThemeEditorPanel-Cx7KulxB.js.map