dorkos 0.117.0 → 0.118.0

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 (273) hide show
  1. package/dist/bin/cli.js +1266 -938
  2. package/dist/browser/native/package-manifest.json +1 -1
  3. package/dist/browser/source-manifest.json +1 -1
  4. package/dist/client/assets/{AboutPage-H-acF3Uh.js → AboutPage-BOS59p1y.js} +1 -1
  5. package/dist/client/assets/{ActivityErrorState-DHDeFsXG.js → ActivityErrorState-DOmV85tr.js} +1 -1
  6. package/dist/client/assets/{ActivityPage-xyMrmAY2.js → ActivityPage-DbsBpb6N.js} +1 -1
  7. package/dist/client/assets/ActivityRow-B1ZeL7Jb.js +1 -0
  8. package/dist/client/assets/AdapterIcon-XPLZ-NAi.js +1 -0
  9. package/dist/client/assets/AdapterSetupWizard-DfNJz5SD.js +2 -0
  10. package/dist/client/assets/{AgentOptionRow-BgPnj-jY.js → AgentOptionRow-C15RQsub.js} +1 -1
  11. package/dist/client/assets/{AgentPicker-3POlE_TY.js → AgentPicker-CydNJYi_.js} +1 -1
  12. package/dist/client/assets/{AgentRequestCard-CL5bwXYH.js → AgentRequestCard-BBSbluBs.js} +3 -3
  13. package/dist/client/assets/{AppearancePage-D3z40f_b.js → AppearancePage-8ALtWGZZ.js} +1 -1
  14. package/dist/client/assets/{ApplyToOverridesDialog-GafmL5mr.js → ApplyToOverridesDialog-Cv3KEf7T.js} +1 -1
  15. package/dist/client/assets/{AttentionSignalRow-4ZSIhmin.js → AttentionSignalRow-c-u1cE1l.js} +1 -1
  16. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-CD8bGnb5.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-Re2CfOlC.js} +3 -3
  17. package/dist/client/assets/BindingDialog-8xnsM47D.js +1 -0
  18. package/dist/client/assets/{BlintzCanvas-B-PoJThg.js → BlintzCanvas-DUDSNxlM.js} +1 -1
  19. package/dist/client/assets/{CanvasCsvContent-CgiQWBJA.js → CanvasCsvContent-D697P3sa.js} +6 -6
  20. package/dist/client/assets/CanvasFileContent-BJ39nHuR.js +2 -0
  21. package/dist/client/assets/{CanvasModel3dContent-BXCQRGHN.js → CanvasModel3dContent-TaunlbT2.js} +2 -2
  22. package/dist/client/assets/{ChatAppsOff-C60EWHju.js → ChatAppsOff-CFEmPGm1.js} +1 -1
  23. package/dist/client/assets/{CodeMirrorDiff-B5dKqE-I.js → CodeMirrorDiff-B7VUevZG.js} +1 -1
  24. package/dist/client/assets/{CodeMirrorEditor-BzB4Bznz.js → CodeMirrorEditor-BX1bJlnT.js} +1 -1
  25. package/dist/client/assets/CommitmentList-CDocwl5K.js +1 -0
  26. package/dist/client/assets/{CommitmentsPage-ChzV2lIP.js → CommitmentsPage-Cr_MvU96.js} +1 -1
  27. package/dist/client/assets/{ComputerResourceView-mF8l9rkm.js → ComputerResourceView-CJMUZPDy.js} +1 -1
  28. package/dist/client/assets/{ComputerViewer-CKR_ZSO1.js → ComputerViewer-BA-9lBBN.js} +1 -1
  29. package/dist/client/assets/ConnectionAccessLists-BLLpxhn3.js +1 -0
  30. package/dist/client/assets/{ConnectionsPage-6PEoOCSe.js → ConnectionsPage-BWVfAPd1.js} +2 -2
  31. package/dist/client/assets/ConventionPage-EK3WUWVa.js +11 -0
  32. package/dist/client/assets/{ExtensionPageRoute-Bv2i-Pqm.js → ExtensionPageRoute-C9hsJNX2.js} +2 -2
  33. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-C5S-Mncm.js → FloatingTanStackRouterDevtools-CqogiFob-BeyAgBfh.js} +1 -1
  34. package/dist/client/assets/HandlePage-CfeEzfDk.js +1 -0
  35. package/dist/client/assets/HeartbeatPage-DfbNenFv.js +1 -0
  36. package/dist/client/assets/{KeyEntry-IgIIE1HE.js → KeyEntry-CEbe5Xvn.js} +2 -2
  37. package/dist/client/assets/{LexicalField-B3neANKd.js → LexicalField-DC_6Z-Ye.js} +1 -1
  38. package/dist/client/assets/{ManagesPage-gDDvLXjS.js → ManagesPage-CYnGvNM2.js} +1 -1
  39. package/dist/client/assets/{Marketplace-DAe-slPr.js → Marketplace-CWiiq8of.js} +1 -1
  40. package/dist/client/assets/{MarketplaceSourcesView-jhoKlyGb.js → MarketplaceSourcesView-DF3cHMR0.js} +1 -1
  41. package/dist/client/assets/{McpAppFrame-BQxyYB23.js → McpAppFrame-D5Muf5Sf.js} +2 -2
  42. package/dist/client/assets/{McpSigninBody-DNB9IVJs.js → McpSigninBody-CLZFoQgC.js} +1 -1
  43. package/dist/client/assets/{Model3dViewer-CZYCij-x.js → Model3dViewer-C9ODHy5I.js} +1 -1
  44. package/dist/client/assets/NamePage-B4YrH-ug.js +1 -0
  45. package/dist/client/assets/NewDirectMessageMenu-Co9Uv5t5.js +1 -0
  46. package/dist/client/assets/{NotificationsPage-BZIME3p9.js → NotificationsPage-ldulSpVu.js} +1 -1
  47. package/dist/client/assets/{OpenMeshSwitch-C1E_5NM2.js → OpenMeshSwitch-BfEvR7s7.js} +2 -2
  48. package/dist/client/assets/{OperatorIdentityForm-BV0aT5IX.js → OperatorIdentityForm-ZM_zDnjM.js} +1 -1
  49. package/dist/client/assets/{PermissionHistory-Btciwm3c.js → PermissionHistory-liL_pJDR.js} +1 -1
  50. package/dist/client/assets/{PermissionsPage-CdLK-g0S.js → PermissionsPage-DFMjDQby.js} +1 -1
  51. package/dist/client/assets/{PersonalityPopover-D7hczXpC.js → PersonalityPopover-CITFG0_N.js} +1 -1
  52. package/dist/client/assets/PhotoPage-DYDJPBfu.js +1 -0
  53. package/dist/client/assets/{PresetPicker-Cw2jlFQM.js → PresetPicker-CpYu7nb6.js} +2 -2
  54. package/dist/client/assets/{PreviewRefusedNotice-CcoKHPsy.js → PreviewRefusedNotice-CF3bzfSe.js} +1 -1
  55. package/dist/client/assets/{ProfileFields-xAsiq8Mz.js → ProfileFields-D4p6bhIa.js} +1 -1
  56. package/dist/client/assets/{ProfilePanelContainer-DM8F3Evu.js → ProfilePanelContainer-XCuCnd1t.js} +1 -1
  57. package/dist/client/assets/{ProfileRolePicker-CJYZpLNj.js → ProfileRolePicker-qRf3DSdk.js} +1 -1
  58. package/dist/client/assets/{PromptSuggestionChips-CHWGhlr1.js → PromptSuggestionChips-CUwLk83h.js} +1 -1
  59. package/dist/client/assets/{ReportsToPopover-D781EUfA.js → ReportsToPopover-Cu-Cnzij.js} +1 -1
  60. package/dist/client/assets/{RoomSurface-CT_OGVWw.js → RoomSurface-CsAifwp2.js} +7 -7
  61. package/dist/client/assets/{RoomsPage-DcoGt4-A.js → RoomsPage-DZYMR2in.js} +1 -1
  62. package/dist/client/assets/{RunsOnPopover-6PnPqbut.js → RunsOnPopover-CTBEMstG.js} +1 -1
  63. package/dist/client/assets/RuntimeConnectFlow-DY4sjRgN.js +1 -0
  64. package/dist/client/assets/RuntimeSetupDialog-DJu_-eNa.js +1 -0
  65. package/dist/client/assets/{SessionsPage-Cnai5quH.js → SessionsPage-thndqcpY.js} +1 -1
  66. package/dist/client/assets/{SettingsDialog-DUWvCqf_.js → SettingsDialog-CKmcLF66.js} +3 -3
  67. package/dist/client/assets/SkillsPage-CmXyAw3J.js +1 -0
  68. package/dist/client/assets/{TaskDialogWrapper-CepIueBg.js → TaskDialogWrapper-Boxr_hgF.js} +1 -1
  69. package/dist/client/assets/{TasksEmptyState-CCPObBmm.js → TasksEmptyState-CQf1YroK.js} +2 -2
  70. package/dist/client/assets/{TasksPage-CqoHRhDG.js → TasksPage-DGNXrDAk.js} +1 -1
  71. package/dist/client/assets/{TeamComputerEntry-mHbMrj9_.js → TeamComputerEntry-CIfFRo6-.js} +1 -1
  72. package/dist/client/assets/ToolsPage-BKZkSarf.js +2 -0
  73. package/dist/client/assets/{TopologyGraph-Br4qaSXn.js → TopologyGraph-og2tlLj7.js} +1 -1
  74. package/dist/client/assets/{TourHost-BNT2J0zS.js → TourHost-DzEG8bZP.js} +1 -1
  75. package/dist/client/assets/{UnlinkDialog-CPtwQ55a.js → UnlinkDialog-BTYC_Sit.js} +1 -1
  76. package/dist/client/assets/{WidgetErrorCard-BeQ2x8Ar.js → WidgetErrorCard-CT4sl_T6.js} +8 -8
  77. package/dist/client/assets/_shell-BDlkTSin.js +90 -0
  78. package/dist/client/assets/{_shell._home-DzhKFHpd.js → _shell._home-CP7HQ7Cs.js} +1 -1
  79. package/dist/client/assets/_shell._home.activity-DGXa_ouh.js +1 -0
  80. package/dist/client/assets/_shell._home.index-D5kOfqnL.js +3 -0
  81. package/dist/client/assets/_shell._home.tasks-BSMD-atB.js +1 -0
  82. package/dist/client/assets/_shell._home.workspaces-Cdsw2-jI.js +1 -0
  83. package/dist/client/assets/_shell.channels-B4VQ7tiZ.js +10 -0
  84. package/dist/client/assets/_shell.connections-sF5vS-Lm.js +1 -0
  85. package/dist/client/assets/{_shell.feedback-requests-dFRmIBE1.js → _shell.feedback-requests-hu21WXyA.js} +2 -2
  86. package/dist/client/assets/_shell.marketplace-B-T-ALMv.js +1 -0
  87. package/dist/client/assets/_shell.marketplace_.sources-Chu-9-Vi.js +1 -0
  88. package/dist/client/assets/{_shell.session-DnREJ52s.js → _shell.session-Bz6wvDBp.js} +3 -3
  89. package/dist/client/assets/{_shell.team-B1hbq8aH.js → _shell.team-raG7wRwF.js} +4 -4
  90. package/dist/client/assets/_shell.x._extensionId-DSqMu6Ey.js +1 -0
  91. package/dist/client/assets/_shell.x._extensionId_._-DSqMu6Ey.js +1 -0
  92. package/dist/client/assets/{access-copy-BLfnVgF5.js → access-copy-CcG3wpsK.js} +1 -1
  93. package/dist/client/assets/{banner-Cqt8YzUW.js → banner-nt7EFLr6.js} +2 -2
  94. package/dist/client/assets/card-B_zeSZiU.js +1 -0
  95. package/dist/client/assets/{command-C9CeOcFB.js → command-CDfYcQI6.js} +1 -1
  96. package/dist/client/assets/{cpu-D0mdP6ki.js → cpu-D861493C.js} +1 -1
  97. package/dist/client/assets/empty-state-CQ1oXLFa.js +1 -0
  98. package/dist/client/assets/{execution-config-AW7ORH0Y.js → execution-config-on8kVvnW.js} +1 -1
  99. package/dist/client/assets/{file-D3iv2i0G.js → file-Bwo21EVR.js} +1 -1
  100. package/dist/client/assets/{file-exclamation-point-zZf2-mqw.js → file-exclamation-point-BedYLbs2.js} +1 -1
  101. package/dist/client/assets/{file-text-CwK7EV60.js → file-text-BTj3WyHS.js} +1 -1
  102. package/dist/client/assets/{find-latest-widget-fence-DW1zqXSL.js → find-latest-widget-fence-B8fM5rIs.js} +3 -3
  103. package/dist/client/assets/form-lSBktWDn.js +1 -0
  104. package/dist/client/assets/{format-cron-BtOOA5e7.js → format-cron-W7G0In8e.js} +1 -1
  105. package/dist/client/assets/{git-branch-DPgttvPa.js → git-branch-CKlZ81Bg.js} +1 -1
  106. package/dist/client/assets/{heart-BwQb2EFQ.js → heart-BSVjeGLA.js} +1 -1
  107. package/dist/client/assets/{highlighted-body-KPVGNVTW-GGvkvk_S.js → highlighted-body-KPVGNVTW-Ct8vmPkj.js} +1 -1
  108. package/dist/client/assets/index-09EqfhW0.js +1 -0
  109. package/dist/client/assets/{index-C7BvPaXV.js → index-6pYWHTBx.js} +1 -1
  110. package/dist/client/assets/{index-ukv5t1cK.js → index-7Fd_Eeda.js} +1 -1
  111. package/dist/client/assets/{index-CkluSB9W.js → index-B-C_A3lP.js} +2 -2
  112. package/dist/client/assets/index-BDCqg2iM.css +1 -0
  113. package/dist/client/assets/index-BHt5KOZA.js +1 -0
  114. package/dist/client/assets/{index-2MwCJp-O.js → index-BVedye9r.js} +1 -1
  115. package/dist/client/assets/{index-C1zEos_1.js → index-BdrbKBym.js} +1 -1
  116. package/dist/client/assets/index-BjTJ6p2k.js +1 -0
  117. package/dist/client/assets/{index-DUvx8VEa.js → index-C0TknRcB.js} +1 -1
  118. package/dist/client/assets/index-C8-dwIPp.js +1018 -0
  119. package/dist/client/assets/{index-BCwnroTw.js → index-C96eZrOR.js} +1 -1
  120. package/dist/client/assets/index-CAv_6Po4.js +1 -0
  121. package/dist/client/assets/index-CCWSicoJ.js +1 -0
  122. package/dist/client/assets/{index-DvpWMPrj.js → index-CF73kwtO.js} +36 -36
  123. package/dist/client/assets/{index-DxU-VkDj.js → index-CNnnXzI4.js} +1 -1
  124. package/dist/client/assets/{index-Dk05g-u9.js → index-CQrM6oF9.js} +1 -1
  125. package/dist/client/assets/{index-6TyLF_Kz.js → index-CaKe9EaL.js} +1 -1
  126. package/dist/client/assets/{index-obbYyK_q.js → index-CeZ13dpH.js} +1 -1
  127. package/dist/client/assets/{index-DylucJZe.js → index-CeeHkxIC.js} +1 -1
  128. package/dist/client/assets/index-ClELcMX1.js +1 -0
  129. package/dist/client/assets/{index-B-032E-J.js → index-CrEyJcPM.js} +3 -3
  130. package/dist/client/assets/{index-CmELWXLL.js → index-D7kjWnlR.js} +1 -1
  131. package/dist/client/assets/{index-8XbUBB9y.js → index-DEOzZEcu.js} +3 -3
  132. package/dist/client/assets/{index-2kcIgMts.js → index-DOuj--Yi.js} +1 -1
  133. package/dist/client/assets/{index-DsRVcCEI.js → index-DQJM5kjJ.js} +1 -1
  134. package/dist/client/assets/{index-D09-6MJl.js → index-DShrfGYE.js} +1 -1
  135. package/dist/client/assets/{index-BSGR71VY.js → index-DURo45pu.js} +1 -1
  136. package/dist/client/assets/{index-mPmWFWvR.js → index-DeNVXdMl.js} +1 -1
  137. package/dist/client/assets/{index-CYRBybyy.js → index-DgRqCuFH.js} +1 -1
  138. package/dist/client/assets/{index-BzHf9H2D.js → index-Dh8D-3Sb.js} +1 -1
  139. package/dist/client/assets/{index-5jiMMwFO.js → index-DjI5vH_U.js} +1 -1
  140. package/dist/client/assets/{index-BBKtLMOE.js → index-Dq4bx2np.js} +1 -1
  141. package/dist/client/assets/{index-BtUom5gL.js → index-GINKfP45.js} +1 -1
  142. package/dist/client/assets/{index-DhWcN0iH.js → index-KaSZDcGa.js} +1 -1
  143. package/dist/client/assets/{index-Xmzz0kKG.js → index-RFknyjho.js} +1 -1
  144. package/dist/client/assets/{index-BYRhWLhr.js → index-SdTS2P3x.js} +1 -1
  145. package/dist/client/assets/{index-aRrsIRtW.js → index-UNxDevG6.js} +1 -1
  146. package/dist/client/assets/{index-D_bIHF5l.js → index-V_EcsvR4.js} +1 -1
  147. package/dist/client/assets/{index--IvDgnWz.js → index-bvqpTKLz.js} +1 -1
  148. package/dist/client/assets/{index-Bw9sMeWJ.js → index-gbNK9zj5.js} +3 -3
  149. package/dist/client/assets/{index-aqnG9V3q.js → index-sfSRuIXm.js} +6 -6
  150. package/dist/client/assets/{inline-code-BDPvCbUE.js → inline-code-Beal0546.js} +1 -1
  151. package/dist/client/assets/{layers-C0fTjhD3.js → layers-DUfQMkMa.js} +1 -1
  152. package/dist/client/assets/{lightbulb-CauvTp1H.js → lightbulb-DTSn-mNB.js} +2 -2
  153. package/dist/client/assets/{link-2-BFWagtwF.js → link-2-CHr2s4m2.js} +2 -2
  154. package/dist/client/assets/{list-runtime-types-DWuilOeW.js → list-runtime-types-CwEp9Lg4.js} +1 -1
  155. package/dist/client/assets/{markdown-content-irJMN3oI.js → markdown-content-GoymYcRL.js} +1 -1
  156. package/dist/client/assets/mention-pill-XE9mX9G8.js +1 -0
  157. package/dist/client/assets/{message-square-off-CEgJ9mPa.js → message-square-off-DUkKSITA.js} +1 -1
  158. package/dist/client/assets/more-details-3dDtVYc6.js +1 -0
  159. package/dist/client/assets/{owner-notice-D0r6ZH_Y.js → owner-notice-BKmuWRki.js} +1 -1
  160. package/dist/client/assets/{package-DzrvXxqm.js → package-DM7e-GVa.js} +1 -1
  161. package/dist/client/assets/page-container-nGewlFnj.js +1 -0
  162. package/dist/client/assets/{paperclip-C_2eggQt.js → paperclip-BgXlvBBI.js} +1 -1
  163. package/dist/client/assets/{path-input-ExHSfE6J.js → path-input-RzOiTE45.js} +1 -1
  164. package/dist/client/assets/primer-trigger-B60oEVY7.js +3 -0
  165. package/dist/client/assets/{profile-errors-C-4JXW0u.js → profile-errors-CFZN0y6a.js} +1 -1
  166. package/dist/client/assets/{progress--zm5Rh4c.js → progress-Cvnh4Qcr.js} +1 -1
  167. package/dist/client/assets/{query-error-state-CPMymRkX.js → query-error-state-CfJfYpa3.js} +1 -1
  168. package/dist/client/assets/{radio-oT4bYZ-T.js → radio-BOcAjXVO.js} +1 -1
  169. package/dist/client/assets/registry-B9wsS5De.js +1 -0
  170. package/dist/client/assets/{relay-trace-schemas-CfXA97kO.js → relay-trace-schemas-Cvb7RGjg.js} +2 -2
  171. package/dist/client/assets/{room-files-source-BgBqLMLB.js → room-files-source-B-ZJA_NM.js} +2 -2
  172. package/dist/client/assets/{rotate-ccw-clock-CrElPm6O.js → rotate-ccw-clock-vRQP4hWE.js} +1 -1
  173. package/dist/client/assets/{rotate-cw-CdW7VTvV.js → rotate-cw-DD2nOAQ-.js} +2 -2
  174. package/dist/client/assets/{scroll-area-BqDwmAjQ.js → scroll-area-DTvv8_DS.js} +1 -1
  175. package/dist/client/assets/search-x-Ig8nk-DU.js +6 -0
  176. package/dist/client/assets/{shield-check-B7JJvCBE.js → shield-check-DjnWx7aT.js} +1 -1
  177. package/dist/client/assets/{shield-x-DvFRtrsO.js → shield-x-BrtccpM7.js} +1 -1
  178. package/dist/client/assets/{soul-file-BDthDhZW.js → soul-file-C5mMIP4v.js} +1 -1
  179. package/dist/client/assets/{table-CK_OyzSy.js → table-Rll_Jxd8.js} +1 -1
  180. package/dist/client/assets/{terminal-CqyyqODz.js → terminal-Bjss9oke.js} +1 -1
  181. package/dist/client/assets/{trust-posture-JGG7FWhE.js → trust-posture-Dmk2WlZv.js} +1 -1
  182. package/dist/client/assets/{unplug-D2Avzz6s.js → unplug-BHYMc4ND.js} +1 -1
  183. package/dist/client/assets/{unverified-catalog-notice-BgsW86t7.js → unverified-catalog-notice-BmIVQhjE.js} +1 -1
  184. package/dist/client/assets/{use-adapter-catalog-NFvlYTrH.js → use-adapter-catalog-RzlxX2Wa.js} +1 -1
  185. package/dist/client/assets/{use-bindings-Ofq1UjvW.js → use-bindings-Ds_MAC67.js} +1 -1
  186. package/dist/client/assets/{use-composer-prefs-Cr3bdM7x.js → use-composer-prefs-ckA_eZQS.js} +1 -1
  187. package/dist/client/assets/{use-connector-management-Dz2D5qIt.js → use-connector-management-oEqok0QG.js} +1 -1
  188. package/dist/client/assets/{use-deep-link-scroll-wwMMFsmG.js → use-deep-link-scroll-Clu9Sz2-.js} +1 -1
  189. package/dist/client/assets/use-delete-binding-B_zHPcy8.js +1 -0
  190. package/dist/client/assets/{use-dev-links-Buq6rA0h.js → use-dev-links-BO7-IHe9.js} +1 -1
  191. package/dist/client/assets/{use-external-adapter-catalog-DXgiQHcR.js → use-external-adapter-catalog-7lRWtn7J.js} +1 -1
  192. package/dist/client/assets/{use-full-activity-feed-FN5AfUr-.js → use-full-activity-feed-DrcMJL9m.js} +1 -1
  193. package/dist/client/assets/use-is-below-desktop-BhzXZsbH.js +1 -0
  194. package/dist/client/assets/{use-jump-back-in-CF-nu5zW.js → use-jump-back-in-Dav0ttfs.js} +3 -3
  195. package/dist/client/assets/use-local-browser-CtltDlof.js +1 -0
  196. package/dist/client/assets/{use-mesh-topology-BdnC6sCG.js → use-mesh-topology-CiS9XQsg.js} +1 -1
  197. package/dist/client/assets/{use-mounted-ref-B5J2da-A.js → use-mounted-ref-DuK0vm9N.js} +1 -1
  198. package/dist/client/assets/{use-notification-prefs-B1iYUOEO.js → use-notification-prefs-Chf4UNbq.js} +1 -1
  199. package/dist/client/assets/{use-panel-tab-placements-J6Ed141H.js → use-panel-tab-placements-C5y831aL.js} +1 -1
  200. package/dist/client/assets/use-pending-read-i6TB4gGQ.js +1 -0
  201. package/dist/client/assets/use-personality-commit-KKJ2ve1V.js +1 -0
  202. package/dist/client/assets/{use-promo-activation-CZfM_gjU.js → use-promo-activation-D45fuXdT.js} +3 -3
  203. package/dist/client/assets/{use-promo-dismissals-DlSguZS3.js → use-promo-dismissals-8-hGry_v.js} +1 -1
  204. package/dist/client/assets/{use-pulse-freshness-Bxf5sc_M.js → use-pulse-freshness-CWudgqNc.js} +1 -1
  205. package/dist/client/assets/{use-relay-config-BwMES9xB.js → use-relay-config-8mXfegbP.js} +1 -1
  206. package/dist/client/assets/{use-room-follow-claim-lzWFVGRY.js → use-room-follow-claim-DgEWUsoP.js} +1 -1
  207. package/dist/client/assets/{use-roving-tab-list-0RaD5Yyr.js → use-roving-tab-list-CXy0Hv5J.js} +1 -1
  208. package/dist/client/assets/use-session-canvas-CUvHGgMf.js +64 -0
  209. package/dist/client/assets/{use-session-diagnostics-gBgn5q2r.js → use-session-diagnostics-LKiXub1H.js} +3 -3
  210. package/dist/client/assets/{use-unclaimed-chats-DOqEolFt.js → use-unclaimed-chats-Cr812OTh.js} +1 -1
  211. package/dist/client/assets/use-update-config-Bad4g6mB.js +1 -0
  212. package/dist/client/assets/useMutationState-BnXJ-0A_.js +1 -0
  213. package/dist/client/index.html +2 -2
  214. package/dist/drizzle/20261015190907_bored_skreet.sql +30 -0
  215. package/dist/drizzle/20261016144104_remote_command_hub_kinds.sql +21 -0
  216. package/dist/drizzle/meta/20261015190907_snapshot.json +14012 -0
  217. package/dist/drizzle/meta/20261016144104_snapshot.json +14012 -0
  218. package/dist/drizzle/meta/_journal.json +14 -0
  219. package/dist/server/index.js +130465 -126661
  220. package/dist/server/index.js.map +2 -2
  221. package/package.json +4 -4
  222. package/dist/client/assets/ActivityRow-CXLwJ28E.js +0 -1
  223. package/dist/client/assets/AdapterIcon-DsMXg2AE.js +0 -1
  224. package/dist/client/assets/AdapterSetupWizard-CuKhSucd.js +0 -2
  225. package/dist/client/assets/BindingDialog-DUqmAWDb.js +0 -1
  226. package/dist/client/assets/CanvasFileContent-D5egw6o3.js +0 -2
  227. package/dist/client/assets/CommitmentList-EjCcpBJ1.js +0 -1
  228. package/dist/client/assets/ConnectionAccessLists-BkFNTeLh.js +0 -1
  229. package/dist/client/assets/ConventionPage-Cc1bx5BQ.js +0 -11
  230. package/dist/client/assets/HandlePage-B0l9YTdO.js +0 -1
  231. package/dist/client/assets/HeartbeatPage-COV5M0c_.js +0 -1
  232. package/dist/client/assets/NamePage-BaS8zqwG.js +0 -1
  233. package/dist/client/assets/NewDirectMessageMenu-Dvmoevnh.js +0 -1
  234. package/dist/client/assets/PhotoPage-Copz-uyh.js +0 -1
  235. package/dist/client/assets/RuntimeConnectFlow-COnfwsEa.js +0 -1
  236. package/dist/client/assets/RuntimeSetupDialog-cfZVbgJJ.js +0 -1
  237. package/dist/client/assets/SkillsPage-BVt3zxB-.js +0 -1
  238. package/dist/client/assets/ToolsPage-IYUQ8OGL.js +0 -2
  239. package/dist/client/assets/_shell-TKho4VPJ.js +0 -90
  240. package/dist/client/assets/_shell._home.activity-DyrGuSto.js +0 -1
  241. package/dist/client/assets/_shell._home.index-jWJ7womG.js +0 -3
  242. package/dist/client/assets/_shell._home.tasks-tOBxVLcL.js +0 -1
  243. package/dist/client/assets/_shell._home.workspaces-B0ovWo_a.js +0 -1
  244. package/dist/client/assets/_shell.channels-Cs-s7a-W.js +0 -10
  245. package/dist/client/assets/_shell.connections-BXVkOfW_.js +0 -1
  246. package/dist/client/assets/_shell.marketplace-CuTHl0Cy.js +0 -1
  247. package/dist/client/assets/_shell.marketplace_.sources-UWbdjpMd.js +0 -1
  248. package/dist/client/assets/_shell.x._extensionId-DdiN22Ga.js +0 -1
  249. package/dist/client/assets/_shell.x._extensionId_._-DdiN22Ga.js +0 -1
  250. package/dist/client/assets/agent-browser-BkFCE19g.js +0 -1
  251. package/dist/client/assets/card-BaRHWQF1.js +0 -1
  252. package/dist/client/assets/empty-state-C0Xjezko.js +0 -1
  253. package/dist/client/assets/form-CwnBnnFI.js +0 -1
  254. package/dist/client/assets/index-CMaIfS_G.js +0 -1018
  255. package/dist/client/assets/index-CTxREsg3.js +0 -1
  256. package/dist/client/assets/index-D5QS-i8I.css +0 -1
  257. package/dist/client/assets/index-DLE5hltn.js +0 -1
  258. package/dist/client/assets/index-DaWx8Mly.js +0 -1
  259. package/dist/client/assets/index-GvMV_K0T.js +0 -1
  260. package/dist/client/assets/index-lbAGzLtf.js +0 -1
  261. package/dist/client/assets/mention-pill-C0AzfrQH.js +0 -1
  262. package/dist/client/assets/more-details-CwkthrCT.js +0 -1
  263. package/dist/client/assets/page-container-CH8mJ_Yk.js +0 -1
  264. package/dist/client/assets/primer-trigger-CgHlhMZL.js +0 -3
  265. package/dist/client/assets/registry-DLUlxXR7.js +0 -1
  266. package/dist/client/assets/search-x-DqLtufOG.js +0 -6
  267. package/dist/client/assets/use-delete-binding-j0PZzvHt.js +0 -1
  268. package/dist/client/assets/use-is-below-desktop-BudV2uCQ.js +0 -1
  269. package/dist/client/assets/use-pending-read-BNKrtv93.js +0 -1
  270. package/dist/client/assets/use-personality-commit-CWBNZX4E.js +0 -1
  271. package/dist/client/assets/use-session-canvas-CAxswuAf.js +0 -64
  272. package/dist/client/assets/use-update-config-9fndji1c.js +0 -1
  273. package/dist/client/assets/useMutationState-CtolUzjw.js +0 -1
@@ -1 +1 @@
1
- import{j as e,cU as F,cV as U,Q as b,W as f,bF as v,cW as W,cX as $,cY as B,R as G,r as u,cZ as E,B as D,X as V,c_ as q,b as J,e as K,t as X,g as Y}from"./index-CMaIfS_G.js";import{u as Z,P as Q}from"./use-personality-commit-CWBNZX4E.js";import"./dorkbot-templates-8Yu9POWJ.js";import"./sound-D3r8dGFH.js";import"./soul-file-BDthDhZW.js";const H={hidden:{},visible:{transition:{staggerChildren:.04}}},_={hidden:{opacity:0,scale:.5},visible:{opacity:1,scale:1,transition:{type:"spring",stiffness:500,damping:25}}};function I(){return e.jsx(f.span,{className:"pointer-events-none absolute inset-0 flex items-center justify-center",initial:{scale:0,opacity:1},animate:{scale:1,opacity:0},transition:{duration:.6,ease:[.34,1.56,.64,1]},"aria-hidden":!0,children:e.jsx(G,{className:"size-4 text-white drop-shadow-md",strokeWidth:3})})}function O({celebratory:s,className:t,children:a}){return s?e.jsx(f.div,{className:t,variants:H,initial:"hidden",animate:"visible",children:a}):e.jsx("div",{className:t,children:a})}function A({celebratory:s,children:t}){return s?e.jsx(f.div,{variants:_,children:t}):t}const ee=e.jsx("span",{className:"text-3xs leading-none font-bold",children:"A"}),te="ring-muted-foreground/50 ring-dashed ring-2 ring-offset-2",se="Select default color";function ae({value:s,autoColor:t,onSelect:a,onHoverChange:i,justSelectedKey:o,celebratory:n=!1,autoIcon:r=ee,autoActiveRing:c=te,autoLabel:d=se}){const x=s!=null;return e.jsxs(O,{celebratory:n,className:"flex flex-wrap items-center gap-2",children:[e.jsx(A,{celebratory:n,children:e.jsx(T,{active:!x,activeRing:c,color:t,label:d,tooltip:"Unique, derived from agent name",onClick:()=>a(null),onHoverChange:i,justSelected:o==="auto",celebratory:n,children:r})}),e.jsx("div",{className:"bg-border mx-0.5 h-5 w-px"}),F.map(l=>e.jsx(A,{celebratory:n,children:e.jsx(T,{active:s===l.hex,activeRing:"ring-foreground ring-2 ring-offset-2",color:l.hex,label:`Select ${l.name}`,tooltip:l.name,onClick:()=>a(l.hex),onHoverChange:i,justSelected:o===l.hex,celebratory:n})},l.hex))]})}function T({active:s,activeRing:t,color:a,label:i,tooltip:o,tooltipSide:n="bottom",onClick:r,onHoverChange:c,justSelected:d,celebratory:x,children:l}){const h=e.jsxs("button",{type:"button",onClick:r,onMouseEnter:()=>c==null?void 0:c(a),onMouseLeave:()=>c==null?void 0:c(null),className:b("group/swatch relative size-8 rounded-full transition-[scale,box-shadow] duration-150",s?t:"hover:scale-110"),style:{backgroundColor:a},"aria-label":i,children:[l&&e.jsx("span",{className:"bg-background/80 text-foreground absolute inset-0 flex items-center justify-center rounded-full",children:l}),x&&e.jsx("span",{className:"absolute inset-[-4px] -z-10 rounded-full opacity-0 blur-md transition-opacity duration-200 group-hover/swatch:opacity-50",style:{backgroundColor:a},"aria-hidden":!0}),e.jsx(v,{children:d&&e.jsx(I,{})})]});return x?e.jsxs(W,{children:[e.jsx($,{asChild:!0,children:h}),e.jsx(B,{side:n,className:"text-3xs",children:o})]}):h}function ne({value:s,autoEmoji:t,hasOverride:a,onSelect:i,justSelectedKey:o,celebratory:n=!1}){return e.jsx(O,{celebratory:n,className:"grid grid-cols-6 gap-1.5",children:U.map(r=>{const c=r===s,d=r===t&&!a,x=b("relative flex size-9 items-center justify-center rounded-md text-lg transition-colors duration-150",c?b(d?"bg-accent ring-muted-foreground/50 ring-1":"bg-accent ring-foreground ring-1",d&&!n&&"ring-dashed"):"hover:bg-accent/50 active:scale-90");return e.jsx(ie,{celebratory:n,onClick:()=>i(r),className:x,ariaLabel:`Select icon ${r}`,justSelected:o===`emoji-${r}`,children:r},r)})})}function ie({celebratory:s,onClick:t,className:a,ariaLabel:i,justSelected:o,children:n}){const r=e.jsx(v,{children:o&&e.jsx(I,{})});return s?e.jsxs(f.button,{type:"button",onClick:t,className:a,"aria-label":i,variants:_,whileHover:{scale:1.25},whileTap:{scale:.85},transition:{type:"spring",stiffness:500,damping:20},children:[n,r]}):e.jsxs("button",{type:"button",onClick:t,className:a,"aria-label":i,children:[n,r]})}const re=e.jsx(q,{className:"size-3"}),oe="ring-muted-foreground/50 ring-2 ring-offset-2",ce="Select unique auto-generated color",C="dorkos:avatar-first-customization",le={hidden:{},visible:{transition:{staggerChildren:.04}}},w={hidden:{opacity:0,y:4},visible:{opacity:1,y:0,transition:{duration:.2,ease:"easeOut"}}};function ue(){const[s]=u.useState(()=>Array.from({length:14},(a,i)=>{const o=Math.PI*2*i/14,n=28+Math.random()*20,r=360*i/14;return{x:Math.cos(o)*n,y:Math.sin(o)*n,size:3+Math.random()*3,hue:r,delay:i*.02}}));return e.jsx("div",{className:"pointer-events-none absolute inset-0 z-50 overflow-visible","aria-hidden":!0,children:s.map((t,a)=>e.jsx(f.span,{className:"absolute top-1/2 left-1/2 rounded-full",style:{width:t.size,height:t.size,background:`hsl(${t.hue}, 80%, 70%)`,boxShadow:`0 0 6px hsl(${t.hue}, 80%, 70%)`},initial:{x:"-50%",y:"-50%",scale:0,opacity:1},animate:{x:t.x,y:t.y,scale:1,opacity:0},transition:{duration:.6,ease:"easeOut",delay:t.delay}},a))})}function de({agent:s,onUpdate:t,onPreviewColor:a,title:i,onClose:o}){const n=u.useMemo(()=>E(s.id),[s.id]),r=n.color,c=n.icon,d=s.icon??c,x=s.color!=null,l=s.icon!=null,h=x||l,[y,S]=u.useState(null),p=u.useRef(null),[R,k]=u.useState(!1),N=u.useRef(!1);u.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const g=u.useCallback(()=>{if(!N.current){try{if(localStorage.getItem(C))return;localStorage.setItem(C,"true")}catch{return}N.current=!0,k(!0),setTimeout(()=>k(!1),800)}},[]),j=u.useCallback(m=>{p.current&&clearTimeout(p.current),S(m),p.current=setTimeout(()=>S(null),600)},[]),z=u.useCallback(()=>{t({color:null,icon:null})},[t]),P=u.useCallback(m=>{t({color:m}),a(null),j(m??"auto"),g()},[t,a,j,g]),L=u.useCallback(m=>{t({icon:m===c?null:m}),j(`emoji-${m}`),g()},[t,c,j,g]),M=u.useCallback(m=>{a(m)},[a]);return e.jsxs("div",{className:"flex flex-1 flex-col overflow-auto","data-testid":"avatar-picker-panel",children:[(i||o||h)&&e.jsxs("div",{className:b("flex items-center justify-between px-4 py-2",(i||o)&&"border-b"),children:[i&&e.jsx("span",{className:"text-xs font-semibold",children:i}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx(v,{children:h&&e.jsx(f.button,{type:"button",onClick:z,className:"text-muted-foreground hover:text-foreground text-3xs transition-colors",initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:"Reset to defaults"})}),o&&e.jsx(D,{variant:"ghost",size:"icon-md",className:"size-6",onClick:o,"aria-label":"Close appearance picker",children:e.jsx(V,{className:"size-3.5"})})]})]}),e.jsxs(f.div,{className:"space-y-5 p-4",variants:le,initial:"hidden",animate:"visible",children:[e.jsxs(f.div,{variants:w,children:[e.jsx("div",{className:"text-muted-foreground text-3xs mb-2 font-medium tracking-wider uppercase",children:"Color"}),e.jsx(ae,{value:s.color,autoColor:r,onSelect:P,onHoverChange:M,justSelectedKey:y,celebratory:!0,autoIcon:re,autoActiveRing:oe,autoLabel:ce})]}),e.jsxs(f.div,{variants:w,children:[e.jsx("div",{className:"text-muted-foreground text-3xs mb-2 font-medium tracking-wider uppercase",children:"Icon"}),e.jsx(ne,{value:d,autoEmoji:c,hasOverride:l,onSelect:L,justSelectedKey:y,celebratory:!0})]})]}),e.jsx(v,{children:R&&e.jsx(ue,{})})]})}function xe({children:s}){return e.jsx("h3",{className:"text-muted-foreground text-3xs font-medium tracking-wider uppercase",children:s})}function be({member:s}){const{agent:t,isPending:a,update:i}=J(s),o=Z(t,i),[n,r]=u.useState(null);if(a)return e.jsx(K,{className:"h-64 w-full"});if(!t)return e.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read this agent’s appearance."});const c=X(s),d=E(t.id),x=n??t.color??d.color,l=t.icon??d.icon;return e.jsxs("div",{className:"flex flex-col gap-5","data-slot":"profile-appearance",children:[e.jsx("div",{className:"flex justify-center pt-1",children:e.jsx(Y,{size:"lg",kind:c.kind,color:x,emoji:l,fallback:c.fallback,origin:c.origin})}),e.jsx(de,{agent:t,onUpdate:i,onPreviewColor:r}),e.jsxs("div",{className:"space-y-2 border-t pt-4",children:[e.jsx(xe,{children:"Personality"}),e.jsx(Q,{traits:o.traits,onTraitsChange:o.onTraitsChange,compact:!0})]})]})}export{be as AppearancePage};
1
+ import{j as e,cL as F,cM as G,G as b,O as f,bw as v,cN as U,cO as $,cP as B,J as D,r as u,cQ as E,B as W,X as V,cR as J,b as q,e as K,t as Q,g as X}from"./index-C8-dwIPp.js";import{u as Y,P as Z}from"./use-personality-commit-KKJ2ve1V.js";import"./dorkbot-templates-8Yu9POWJ.js";import"./sound-D3r8dGFH.js";import"./soul-file-C5mMIP4v.js";const H={hidden:{},visible:{transition:{staggerChildren:.04}}},O={hidden:{opacity:0,scale:.5},visible:{opacity:1,scale:1,transition:{type:"spring",stiffness:500,damping:25}}};function I(){return e.jsx(f.span,{className:"pointer-events-none absolute inset-0 flex items-center justify-center",initial:{scale:0,opacity:1},animate:{scale:1,opacity:0},transition:{duration:.6,ease:[.34,1.56,.64,1]},"aria-hidden":!0,children:e.jsx(D,{className:"size-4 text-white drop-shadow-md",strokeWidth:3})})}function _({celebratory:s,className:t,children:a}){return s?e.jsx(f.div,{className:t,variants:H,initial:"hidden",animate:"visible",children:a}):e.jsx("div",{className:t,children:a})}function A({celebratory:s,children:t}){return s?e.jsx(f.div,{variants:O,children:t}):t}const ee=e.jsx("span",{className:"text-3xs leading-none font-bold",children:"A"}),te="ring-muted-foreground/50 ring-dashed ring-2 ring-offset-2",se="Select default color";function ae({value:s,autoColor:t,onSelect:a,onHoverChange:i,justSelectedKey:o,celebratory:n=!1,autoIcon:r=ee,autoActiveRing:c=te,autoLabel:d=se}){const x=s!=null;return e.jsxs(_,{celebratory:n,className:"flex flex-wrap items-center gap-2",children:[e.jsx(A,{celebratory:n,children:e.jsx(T,{active:!x,activeRing:c,color:t,label:d,tooltip:"Unique, derived from agent name",onClick:()=>a(null),onHoverChange:i,justSelected:o==="auto",celebratory:n,children:r})}),e.jsx("div",{className:"bg-border mx-0.5 h-5 w-px"}),F.map(l=>e.jsx(A,{celebratory:n,children:e.jsx(T,{active:s===l.hex,activeRing:"ring-foreground ring-2 ring-offset-2",color:l.hex,label:`Select ${l.name}`,tooltip:l.name,onClick:()=>a(l.hex),onHoverChange:i,justSelected:o===l.hex,celebratory:n})},l.hex))]})}function T({active:s,activeRing:t,color:a,label:i,tooltip:o,tooltipSide:n="bottom",onClick:r,onHoverChange:c,justSelected:d,celebratory:x,children:l}){const h=e.jsxs("button",{type:"button",onClick:r,onMouseEnter:()=>c==null?void 0:c(a),onMouseLeave:()=>c==null?void 0:c(null),className:b("group/swatch relative size-8 rounded-full transition-[scale,box-shadow] duration-150",s?t:"hover:scale-110"),style:{backgroundColor:a},"aria-label":i,children:[l&&e.jsx("span",{className:"bg-background/80 text-foreground absolute inset-0 flex items-center justify-center rounded-full",children:l}),x&&e.jsx("span",{className:"absolute inset-[-4px] -z-10 rounded-full opacity-0 blur-md transition-opacity duration-200 group-hover/swatch:opacity-50",style:{backgroundColor:a},"aria-hidden":!0}),e.jsx(v,{children:d&&e.jsx(I,{})})]});return x?e.jsxs(U,{children:[e.jsx($,{asChild:!0,children:h}),e.jsx(B,{side:n,className:"text-3xs",children:o})]}):h}function ne({value:s,autoEmoji:t,hasOverride:a,onSelect:i,justSelectedKey:o,celebratory:n=!1}){return e.jsx(_,{celebratory:n,className:"grid grid-cols-6 gap-1.5",children:G.map(r=>{const c=r===s,d=r===t&&!a,x=b("relative flex size-9 items-center justify-center rounded-md text-lg transition-colors duration-150",c?b(d?"bg-accent ring-muted-foreground/50 ring-1":"bg-accent ring-foreground ring-1",d&&!n&&"ring-dashed"):"hover:bg-accent/50 active:scale-90");return e.jsx(ie,{celebratory:n,onClick:()=>i(r),className:x,ariaLabel:`Select icon ${r}`,justSelected:o===`emoji-${r}`,children:r},r)})})}function ie({celebratory:s,onClick:t,className:a,ariaLabel:i,justSelected:o,children:n}){const r=e.jsx(v,{children:o&&e.jsx(I,{})});return s?e.jsxs(f.button,{type:"button",onClick:t,className:a,"aria-label":i,variants:O,whileHover:{scale:1.25},whileTap:{scale:.85},transition:{type:"spring",stiffness:500,damping:20},children:[n,r]}):e.jsxs("button",{type:"button",onClick:t,className:a,"aria-label":i,children:[n,r]})}const re=e.jsx(J,{className:"size-3"}),oe="ring-muted-foreground/50 ring-2 ring-offset-2",ce="Select unique auto-generated color",C="dorkos:avatar-first-customization",le={hidden:{},visible:{transition:{staggerChildren:.04}}},w={hidden:{opacity:0,y:4},visible:{opacity:1,y:0,transition:{duration:.2,ease:"easeOut"}}};function ue(){const[s]=u.useState(()=>Array.from({length:14},(a,i)=>{const o=Math.PI*2*i/14,n=28+Math.random()*20,r=360*i/14;return{x:Math.cos(o)*n,y:Math.sin(o)*n,size:3+Math.random()*3,hue:r,delay:i*.02}}));return e.jsx("div",{className:"pointer-events-none absolute inset-0 z-50 overflow-visible","aria-hidden":!0,children:s.map((t,a)=>e.jsx(f.span,{className:"absolute top-1/2 left-1/2 rounded-full",style:{width:t.size,height:t.size,background:`hsl(${t.hue}, 80%, 70%)`,boxShadow:`0 0 6px hsl(${t.hue}, 80%, 70%)`},initial:{x:"-50%",y:"-50%",scale:0,opacity:1},animate:{x:t.x,y:t.y,scale:1,opacity:0},transition:{duration:.6,ease:"easeOut",delay:t.delay}},a))})}function de({agent:s,onUpdate:t,onPreviewColor:a,title:i,onClose:o}){const n=u.useMemo(()=>E(s.id),[s.id]),r=n.color,c=n.icon,d=s.icon??c,x=s.color!=null,l=s.icon!=null,h=x||l,[y,S]=u.useState(null),p=u.useRef(null),[R,k]=u.useState(!1),N=u.useRef(!1);u.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const g=u.useCallback(()=>{if(!N.current){try{if(localStorage.getItem(C))return;localStorage.setItem(C,"true")}catch{return}N.current=!0,k(!0),setTimeout(()=>k(!1),800)}},[]),j=u.useCallback(m=>{p.current&&clearTimeout(p.current),S(m),p.current=setTimeout(()=>S(null),600)},[]),z=u.useCallback(()=>{t({color:null,icon:null})},[t]),P=u.useCallback(m=>{t({color:m}),a(null),j(m??"auto"),g()},[t,a,j,g]),L=u.useCallback(m=>{t({icon:m===c?null:m}),j(`emoji-${m}`),g()},[t,c,j,g]),M=u.useCallback(m=>{a(m)},[a]);return e.jsxs("div",{className:"flex flex-1 flex-col overflow-auto","data-testid":"avatar-picker-panel",children:[(i||o||h)&&e.jsxs("div",{className:b("flex items-center justify-between px-4 py-2",(i||o)&&"border-b"),children:[i&&e.jsx("span",{className:"text-xs font-semibold",children:i}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx(v,{children:h&&e.jsx(f.button,{type:"button",onClick:z,className:"text-muted-foreground hover:text-foreground text-3xs transition-colors",initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:"Reset to defaults"})}),o&&e.jsx(W,{variant:"ghost",size:"icon-md",className:"size-6",onClick:o,"aria-label":"Close appearance picker",children:e.jsx(V,{className:"size-3.5"})})]})]}),e.jsxs(f.div,{className:"space-y-5 p-4",variants:le,initial:"hidden",animate:"visible",children:[e.jsxs(f.div,{variants:w,children:[e.jsx("div",{className:"text-muted-foreground text-3xs mb-2 font-medium tracking-wider uppercase",children:"Color"}),e.jsx(ae,{value:s.color,autoColor:r,onSelect:P,onHoverChange:M,justSelectedKey:y,celebratory:!0,autoIcon:re,autoActiveRing:oe,autoLabel:ce})]}),e.jsxs(f.div,{variants:w,children:[e.jsx("div",{className:"text-muted-foreground text-3xs mb-2 font-medium tracking-wider uppercase",children:"Icon"}),e.jsx(ne,{value:d,autoEmoji:c,hasOverride:l,onSelect:L,justSelectedKey:y,celebratory:!0})]})]}),e.jsx(v,{children:R&&e.jsx(ue,{})})]})}function xe({children:s}){return e.jsx("h3",{className:"text-muted-foreground text-3xs font-medium tracking-wider uppercase",children:s})}function be({member:s}){const{agent:t,isPending:a,update:i}=q(s),o=Y(t,i),[n,r]=u.useState(null);if(a)return e.jsx(K,{className:"h-64 w-full"});if(!t)return e.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read this agent’s appearance."});const c=Q(s),d=E(t.id),x=n??t.color??d.color,l=t.icon??d.icon;return e.jsxs("div",{className:"flex flex-col gap-5","data-slot":"profile-appearance",children:[e.jsx("div",{className:"flex justify-center pt-1",children:e.jsx(X,{size:"lg",kind:c.kind,color:x,emoji:l,fallback:c.fallback,origin:c.origin})}),e.jsx(de,{agent:t,onUpdate:i,onPreviewColor:r}),e.jsxs("div",{className:"space-y-2 border-t pt-4",children:[e.jsx(xe,{children:"Personality"}),e.jsx(Z,{traits:o.traits,onTraitsChange:o.onTraitsChange,compact:!0})]})]})}export{be as AppearancePage};
@@ -1 +1 @@
1
- import{g6 as k,a8 as A,a9 as C,g7 as x,aa as j,ab as T,aA as R,g8 as D,j as n,bG as I,bH as N,Q as P,bI as E,bK as L,r as B,cG as q,cH as K,cJ as _,cK as F,cL as O,dD as M,g9 as Q,e3 as W,dj as z,B as p}from"./index-CMaIfS_G.js";function X(e,s){const a=new Set(e.filesAndCommands.followingAgentIds);if(s.kind==="files")return a.size;const t=e.exceptions.filter(o=>o.action===void 0),r=new Set;if(s.kind==="preset"){const o=new Map;for(const c of t){const l=o.get(c.agentId)??new Set;l.add(c.area),o.set(c.agentId,l)}for(const[c,l]of o)l.size>=k.length&&!a.has(c)&&r.add(c)}else{for(const o of t)o.area===s.area&&r.add(o.agentId);if(s.kind==="action")for(const o of e.exceptions)o.action===s.action&&r.add(o.agentId)}return Math.max(0,e.agentCount-r.size)}function Y(e){return`affects ${e} ${e===1?"agent":"agents"}`}function V(){const e=A();return C({queryKey:x.overview(),queryFn:()=>e.getPermissions()})}function Z(e){const s=A(),a=j();return T({mutationFn:async t=>{if(t.kind==="preset"){if(e.kind!=="default")throw new Error("A preset is chosen for everyone.");return s.setPermissionPreset({preset:t.preset,surface:t.surface,...t.applyToAgents?{applyToAgents:t.applyToAgents}:{}})}const r={...t.areas?{areas:t.areas}:{},...t.actions?{actions:t.actions}:{},surface:t.surface};return e.kind==="agent"?s.patchAgentPermissions(e.agentId,{...r,...t.filesAndCommands!==void 0?{filesAndCommands:t.filesAndCommands}:{}}):s.patchPermissionDefaults({...r,...t.applyToAgents?{applyToAgents:t.applyToAgents}:{}})},onSettled:()=>{a.invalidateQueries({queryKey:x.all}),a.invalidateQueries({queryKey:["mesh","agents"]}),a.invalidateQueries({queryKey:R.all})}})}const h={blocked:"Blocked",ask:"Ask",allowed:"Allowed"},v={careful:"Careful",balanced:"Balanced",full:"Full power",trusted:"Trusted"},ee={careful:"Agents ask before they change anything, and can’t reach outside DorkOS.",balanced:"Agents run their rooms and ask before anything wider.",full:"Agents do everyday work alone and ask before installs or settings changes.",trusted:"Agents work on their own, and everything they do is recorded."};function se(e,s){switch(e){case"default-area":case"default-action":return"Changed from your preset";case"preset":return`From ${v[s??"trusted"]}`;case"floor":return"Never Allowed";case"always-asks":return"Always asks, so you see the change first";default:return""}}const te="Blocked stops agents that follow the rules. It isn’t a sandbox.";function ne(e){switch(e){case"agent":return"Set for this agent";case"runtime":return"Set in Settings → Runtimes";case"default":return"The setting everyone has";case"runtime-own":return"Not set, so each AI tool uses its own default"}}function w(e){return`the default (${v[e??"trusted"]})`}function ae(e){const s=h[e.state],a=e.agentName??"this agent";switch(e.source){case"inactive":return"Blocked, because this agent’s access was turned off.";case"floor":return`${s}. This area is locked, so it’s never Allowed.`;case"always-asks":return e.fromExtension?`${s}. Extension tools that can delete things always ask.`:`${s}. It always shows you the change first, so it’s never Allowed.`}if(e.destructiveAsk)return"Ask. Actions that run someone else’s code ask unless set one by one.";switch(e.source){case"agent-area":return`${s}, set for ${a}.`;case"agent-action":return`${s}, set for this one action on ${a}.`;case"default-area":return`${s} for everyone, changed from ${w(e.preset)}.`;case"default-action":return`${s} for everyone, set for this one action.`;case"preset":return`${s}, from ${w(e.preset)}.`}}function re(e,s,a){const t=e?D(e):null;switch(s){case"agent":return`${t}, set for ${a??"this agent"}.`;case"runtime":return`${t}, set in Settings → Runtimes.`;case"default":return`${t}, the setting everyone has.`;case"runtime-own":return"Not set, so each AI tool uses its own default."}}const H={settings:" in Settings","agent-page":" on the agent’s page","control-center":" in the Control Center","request-card":" from a request card","first-run":" during setup","agent-request":" from an agent's request",api:" through the API",cli:" from the command line",upgrade:"",undo:" with Undo","file-edit":""};function U(e){return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function G(e){if(!e)return null;const s=`on ${U(e.occurredAt)}`,a=H[e.surface];switch(e.attribution){case"signed-in":return`Changed by ${e.actorLabel.charAt(0).toLowerCase()+e.actorLabel.slice(1)} ${s}${a}.`;case"local-trust":return`Changed ${s}${a}. With login off, who is unknown.`;case"agent-request-approved":return`Changed ${s}: ${e.actorLabel}.`;case"agent":return`Changed by ${e.actorLabel} ${s}.`;case"upgrade":return`Set by an upgrade ${s}.`;case"outside":return`Changed outside DorkOS ${s}, in the agent’s settings file.`}}function oe({question:e,sentence:s,lastChange:a,className:t}){const r=G(a);return n.jsxs(I,{children:[n.jsx(N,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":e,className:P("text-muted-foreground hover:text-foreground focus-visible:ring-ring inline rounded-sm py-2 text-xs underline decoration-dotted underline-offset-2 transition-colors focus-visible:ring-2 focus-visible:outline-none md:py-0",t),children:"Why?"})}),n.jsxs(E,{className:"w-72 space-y-1.5",align:"start",children:[n.jsx(L,{className:"text-sm font-medium",children:e}),n.jsx("p",{className:"text-sm","data-testid":"permission-why-source",children:s}),r?n.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"permission-why-change",children:r}):null]})]})}function ie({open:e,onCancel:s,subject:a,title:t,next:r,agents:o,affectedCount:c,onKeep:l,onUpdate:b,pending:m=!1}){const[u,f]=B.useState(new Set),S=r in h?h[r]:r,y=o.length,$=(i,g)=>{const d=new Set(u);g?d.add(i):d.delete(i),f(d)};return n.jsx(q,{open:e,onOpenChange:i=>{i||(f(new Set),s())},children:n.jsxs(K,{className:"!min-h-0 sm:max-w-md",children:[n.jsxs(_,{children:[n.jsx(F,{children:t??`Set ${a} to ${S} for everyone?`}),n.jsxs(O,{children:[y===1?"1 agent is":`${y} agents are`," set differently. Pick any that should follow."]})]}),n.jsxs(M,{className:"space-y-3",children:[n.jsx("ul",{className:"space-y-2","aria-label":"Agents set differently",children:o.map(i=>{const g=`apply-${i.agentId}`;return n.jsxs("li",{className:"flex items-center gap-2",children:[n.jsx(Q,{id:g,checked:u.has(i.agentId),onCheckedChange:d=>$(i.agentId,d===!0)}),n.jsxs(W,{htmlFor:g,className:"text-sm font-normal",children:[i.agentName,": ",i.detail]})]},i.agentId)})}),n.jsxs("p",{className:"text-muted-foreground text-sm",children:["This affects ",c," ",c===1?"agent":"agents"," now."]})]}),n.jsxs(z,{className:"gap-2",children:[n.jsx(p,{variant:"outline",onClick:()=>{f(new Set),l()},disabled:m,children:"Keep their settings"}),n.jsx(p,{onClick:()=>{const i=[...u];f(new Set),b(i)},disabled:m||u.size===0,children:"Update selected"})]})]})})}export{ie as A,te as B,oe as P,h as S,Z as a,re as b,X as c,Y as d,v as e,ne as f,se as g,ee as h,G as l,ae as s,V as u};
1
+ import{g4 as k,a1 as x,a2 as C,g5 as A,a3 as j,a4 as T,at as R,g6 as N,j as n,bx as D,by as I,G as P,bz as E,bB as B,r as L,cx as q,cy as _,cA as F,cB as K,cC as O,du as W,g7 as M,dW as z,da as Q,B as p}from"./index-C8-dwIPp.js";function Y(e,s){const a=new Set(e.filesAndCommands.followingAgentIds);if(s.kind==="files")return a.size;const t=e.exceptions.filter(o=>o.action===void 0),r=new Set;if(s.kind==="preset"){const o=new Map;for(const c of t){const l=o.get(c.agentId)??new Set;l.add(c.area),o.set(c.agentId,l)}for(const[c,l]of o)l.size>=k.length&&!a.has(c)&&r.add(c)}else{for(const o of t)o.area===s.area&&r.add(o.agentId);if(s.kind==="action")for(const o of e.exceptions)o.action===s.action&&r.add(o.agentId)}return Math.max(0,e.agentCount-r.size)}function J(e){return`affects ${e} ${e===1?"agent":"agents"}`}function V(){const e=x();return C({queryKey:A.overview(),queryFn:()=>e.getPermissions()})}function Z(e){const s=x(),a=j();return T({mutationFn:async t=>{if(t.kind==="preset"){if(e.kind!=="default")throw new Error("A preset is chosen for everyone.");return s.setPermissionPreset({preset:t.preset,surface:t.surface,...t.applyToAgents?{applyToAgents:t.applyToAgents}:{}})}const r={...t.areas?{areas:t.areas}:{},...t.actions?{actions:t.actions}:{},surface:t.surface};return e.kind==="agent"?s.patchAgentPermissions(e.agentId,{...r,...t.filesAndCommands!==void 0?{filesAndCommands:t.filesAndCommands}:{}}):s.patchPermissionDefaults({...r,...t.applyToAgents?{applyToAgents:t.applyToAgents}:{}})},onSettled:()=>{a.invalidateQueries({queryKey:A.all}),a.invalidateQueries({queryKey:["mesh","agents"]}),a.invalidateQueries({queryKey:R.all})}})}const h={blocked:"Blocked",ask:"Ask",allowed:"Allowed"},v={careful:"Careful",balanced:"Balanced",full:"Full power",trusted:"Trusted"},ee={careful:"Agents ask before they change anything, and can’t reach outside DorkOS.",balanced:"Agents run their rooms and ask before anything wider.",full:"Agents do everyday work alone and ask before installs or settings changes.",trusted:"Agents work on their own, and everything they do is recorded."};function se(e,s){switch(e){case"default-area":case"default-action":return"Changed from your preset";case"preset":return`From ${v[s??"trusted"]}`;case"floor":return"Never Allowed";case"always-asks":return"Always asks, so you see the change first";default:return""}}const te="Blocked stops agents that follow the rules. It isn’t a sandbox.";function ne(e){switch(e){case"agent":return"Set for this agent";case"runtime":return"Set in Settings → Runtimes";case"default":return"The setting everyone has";case"runtime-own":return"Not set, so each AI tool uses its own default"}}function w(e){return`the default (${v[e??"trusted"]})`}function ae(e){const s=h[e.state],a=e.agentName??"this agent";switch(e.source){case"inactive":return"Blocked, because this agent’s access was turned off.";case"floor":return`${s}. This area is locked, so it’s never Allowed.`;case"always-asks":return e.fromExtension?`${s}. Extension tools that can delete things always ask.`:`${s}. It always shows you the change first, so it’s never Allowed.`}if(e.destructiveAsk)return"Ask. Actions that run someone else’s code ask unless set one by one.";switch(e.source){case"agent-area":return`${s}, set for ${a}.`;case"agent-action":return`${s}, set for this one action on ${a}.`;case"default-area":return`${s} for everyone, changed from ${w(e.preset)}.`;case"default-action":return`${s} for everyone, set for this one action.`;case"preset":return`${s}, from ${w(e.preset)}.`}}function re(e,s,a){const t=e?N(e):null;switch(s){case"agent":return`${t}, set for ${a??"this agent"}.`;case"runtime":return`${t}, set in Settings → Runtimes.`;case"default":return`${t}, the setting everyone has.`;case"runtime-own":return"Not set, so each AI tool uses its own default."}}const U={settings:" in Settings","agent-page":" on the agent’s page","control-center":" in the Control Center","request-card":" from a request card","first-run":" during setup","agent-request":" from an agent's request",api:" through the API",cli:" from the command line",upgrade:"",undo:" with Undo","file-edit":""};function H(e){return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function G(e){if(!e)return null;const s=`on ${H(e.occurredAt)}`,a=U[e.surface];switch(e.attribution){case"signed-in":return`Changed by ${e.actorLabel.charAt(0).toLowerCase()+e.actorLabel.slice(1)} ${s}${a}.`;case"local-trust":return`Changed ${s}${a}. With login off, who is unknown.`;case"agent-request-approved":return`Changed ${s}: ${e.actorLabel}.`;case"agent":return`Changed by ${e.actorLabel} ${s}.`;case"upgrade":return`Set by an upgrade ${s}.`;case"outside":return`Changed outside DorkOS ${s}, in the agent’s settings file.`}}function oe({question:e,sentence:s,lastChange:a,className:t}){const r=G(a);return n.jsxs(D,{children:[n.jsx(I,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":e,className:P("text-muted-foreground hover:text-foreground focus-visible:ring-ring inline rounded-sm py-2 text-xs underline decoration-dotted underline-offset-2 transition-colors focus-visible:ring-2 focus-visible:outline-none md:py-0",t),children:"Why?"})}),n.jsxs(E,{className:"w-72 space-y-1.5",align:"start",children:[n.jsx(B,{className:"text-sm font-medium",children:e}),n.jsx("p",{className:"text-sm","data-testid":"permission-why-source",children:s}),r?n.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"permission-why-change",children:r}):null]})]})}function ie({open:e,onCancel:s,subject:a,title:t,next:r,agents:o,affectedCount:c,onKeep:l,onUpdate:b,pending:m=!1}){const[u,f]=L.useState(new Set),S=r in h?h[r]:r,y=o.length,$=(i,g)=>{const d=new Set(u);g?d.add(i):d.delete(i),f(d)};return n.jsx(q,{open:e,onOpenChange:i=>{i||(f(new Set),s())},children:n.jsxs(_,{className:"!min-h-0 sm:max-w-md",children:[n.jsxs(F,{children:[n.jsx(K,{children:t??`Set ${a} to ${S} for everyone?`}),n.jsxs(O,{children:[y===1?"1 agent is":`${y} agents are`," set differently. Pick any that should follow."]})]}),n.jsxs(W,{className:"space-y-3",children:[n.jsx("ul",{className:"space-y-2","aria-label":"Agents set differently",children:o.map(i=>{const g=`apply-${i.agentId}`;return n.jsxs("li",{className:"flex items-center gap-2",children:[n.jsx(M,{id:g,checked:u.has(i.agentId),onCheckedChange:d=>$(i.agentId,d===!0)}),n.jsxs(z,{htmlFor:g,className:"text-sm font-normal",children:[i.agentName,": ",i.detail]})]},i.agentId)})}),n.jsxs("p",{className:"text-muted-foreground text-sm",children:["This affects ",c," ",c===1?"agent":"agents"," now."]})]}),n.jsxs(Q,{className:"gap-2",children:[n.jsx(p,{variant:"outline",onClick:()=>{f(new Set),l()},disabled:m,children:"Keep their settings"}),n.jsx(p,{onClick:()=>{const i=[...u];f(new Set),b(i)},disabled:m||u.size===0,children:"Update selected"})]})]})})}export{ie as A,te as B,oe as P,h as S,Z as a,re as b,Y as c,J as d,v as e,ne as f,se as g,ee as h,G as l,ae as s,V as u};
@@ -1 +1 @@
1
- import{aD as r,aE as n,j as e,W as i,a7 as o,B as d}from"./index-CMaIfS_G.js";const c={initial:{opacity:0,y:8},animate:{opacity:1,y:0}};function l({signal:t}){const a=r(),s=n(t.since);return e.jsxs(i.div,{variants:c,"data-slot":"attention-signal-row",className:"hover:bg-accent/50 flex min-w-0 items-center gap-2.5 rounded-md px-2 py-1 transition-colors",children:[e.jsx("span",{className:"bg-status-error size-1.5 shrink-0 rounded-full","aria-hidden":!0}),e.jsx(o,{className:"text-status-error/70 size-3.5 shrink-0","aria-hidden":!0}),e.jsxs("span",{className:"text-foreground/90 min-w-0 flex-1 truncate text-xs",children:[t.primary,t.secondary!==void 0&&e.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.secondary]})]}),e.jsx("span",{className:"text-muted-foreground shrink-0 text-xs tabular-nums",children:s}),e.jsx(d,{variant:"ghost",size:"sm",className:"relative h-6 shrink-0 px-2 text-xs after:absolute after:-inset-3 md:after:hidden","aria-label":`Open ${t.primary}`,onClick:()=>void a.navigate({href:t.deepLink}),children:"Open →"})]})}export{l as A};
1
+ import{aw as r,ax as n,j as e,O as i,a0 as o,B as d}from"./index-C8-dwIPp.js";const c={initial:{opacity:0,y:8},animate:{opacity:1,y:0}};function l({signal:t}){const a=r(),s=n(t.since);return e.jsxs(i.div,{variants:c,"data-slot":"attention-signal-row",className:"hover:bg-accent/50 flex min-w-0 items-center gap-2.5 rounded-md px-2 py-1 transition-colors",children:[e.jsx("span",{className:"bg-status-error size-1.5 shrink-0 rounded-full","aria-hidden":!0}),e.jsx(o,{className:"text-status-error/70 size-3.5 shrink-0","aria-hidden":!0}),e.jsxs("span",{className:"text-foreground/90 min-w-0 flex-1 truncate text-xs",children:[t.primary,t.secondary!==void 0&&e.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.secondary]})]}),e.jsx("span",{className:"text-muted-foreground shrink-0 text-xs tabular-nums",children:s}),e.jsx(d,{variant:"ghost",size:"sm",className:"relative h-6 shrink-0 px-2 text-xs after:absolute after:-inset-3 md:after:hidden","aria-label":`Open ${t.primary}`,onClick:()=>void a.navigate({href:t.deepLink}),children:"Open →"})]})}export{l as A};
@@ -1,4 +1,4 @@
1
- import{u as _t,c as Z,a as Te,b as U,s as ht,m as Je,i as g,k as Ft,e as w,f as s,d as S,l as O,M as He,j as le,F as zt,S as Et,n as pt,t as E,o as It,p as mt,q as Bt,r as $t,v as Ke}from"./index-CkluSB9W.js";import{cO as Dt,cP as be,a$ as V,cQ as st,cR as Tt,cS as At,cT as Rt}from"./index-CMaIfS_G.js";let Mt={data:""},Pt=r=>{if(typeof window=="object"){let e=(r?r.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return e.nonce=window.__nonce__,e.parentNode||(r||document.head).appendChild(e),e.firstChild}return r||Mt},Ot=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Lt=/\/\*[^]*?\*\/| +/g,lt=/\n+/g,ae=(r,e)=>{let i="",t="",c="";for(let a in r){let l=r[a];a[0]=="@"?a[1]=="i"?i=a+" "+l+";":t+=a[1]=="f"?ae(l,a):a+"{"+ae(l,a[1]=="k"?"":e)+"}":typeof l=="object"?t+=ae(l,e?e.replace(/([^,])+/g,v=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,v):v?v+" "+u:u)):a):l!=null&&(a=a[1]=="-"?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),c+=ae.p?ae.p(a,l):a+":"+l+";")}return i+(e&&c?e+"{"+c+"}":c)+t},ne={},bt=r=>{if(typeof r=="object"){let e="";for(let i in r)e+=i+bt(r[i]);return e}return r},jt=(r,e,i,t,c)=>{let a=bt(r),l=ne[a]||(ne[a]=(u=>{let o=0,n=11;for(;o<u.length;)n=101*n+u.charCodeAt(o++)>>>0;return"go"+n})(a));if(!ne[l]){let u=a!==r?r:(o=>{let n,k,m=[{}];for(;n=Ot.exec(o.replace(Lt,""));)n[4]?m.shift():n[3]?(k=n[3].replace(lt," ").trim(),m.unshift(m[0][k]=m[0][k]||{})):m[0][n[1]]=n[2].replace(lt," ").trim();return m[0]})(r);ne[l]=ae(c?{["@keyframes "+l]:u}:u,i?"":"."+l)}let v=i&&ne.g;return i&&(ne.g=ne[l]),((u,o,n,k)=>{k?o.data=o.data.replace(k,u):o.data.indexOf(u)===-1&&(o.data=n?u+o.data:o.data+u)})(ne[l],e,t,v),l},Ht=(r,e,i)=>r.reduce((t,c,a)=>{let l=e[a];if(l&&l.call){let v=l(i),u=v&&v.props&&v.props.className||/^go/.test(v)&&v;l=u?"."+u:v&&typeof v=="object"?v.props?"":ae(v,""):v===!1?"":v}return t+c+(l??"")},"");function ue(r){let e=this||{},i=r.call?r(e.p):r;return jt(i.unshift?i.raw?Ht(i,[].slice.call(arguments,1),e.p):i.reduce((t,c)=>Object.assign(t,c&&c.call?c(e.p):c),{}):i,Pt(e.target),e.g,e.o,e.k)}ue.bind({g:1});ue.bind({k:1});var D={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000000",white:"#ffffff",neutral:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},darkGray:{50:"#525c7a",100:"#49536e",200:"#414962",300:"#394056",400:"#313749",500:"#292e3d",600:"#212530",700:"#191c24",800:"#111318",900:"#0b0d10"},gray:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},blue:{25:"#F5FAFF",50:"#EFF8FF",100:"#D1E9FF",200:"#B2DDFF",300:"#84CAFF",400:"#53B1FD",500:"#2E90FA",600:"#1570EF",700:"#175CD3",800:"#1849A9",900:"#194185"},green:{25:"#F6FEF9",50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},yellow:{25:"#FFFCF5",50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E"},purple:{25:"#FAFAFF",50:"#F4F3FF",100:"#EBE9FE",200:"#D9D6FE",300:"#BDB4FE",400:"#9B8AFB",500:"#7A5AF8",600:"#6938EF",700:"#5925DC",800:"#4A1FB8",900:"#3E1C96"},teal:{25:"#F6FEFC",50:"#F0FDF9",100:"#CCFBEF",200:"#99F6E0",300:"#5FE9D0",400:"#2ED3B7",500:"#15B79E",600:"#0E9384",700:"#107569",800:"#125D56",900:"#134E48"},pink:{25:"#fdf2f8",50:"#fce7f3",100:"#fbcfe8",200:"#f9a8d4",300:"#f472b6",400:"#ec4899",500:"#db2777",600:"#be185d",700:"#9d174d",800:"#831843",900:"#500724"},cyan:{25:"#ecfeff",50:"#cffafe",100:"#a5f3fc",200:"#67e8f9",300:"#22d3ee",400:"#06b6d4",500:"#0891b2",600:"#0e7490",700:"#155e75",800:"#164e63",900:"#083344"}},alpha:{90:"e5",70:"b3",20:"33"},font:{size:{"2xs":"calc(var(--tsrd-font-size) * 0.625)",xs:"calc(var(--tsrd-font-size) * 0.75)",sm:"calc(var(--tsrd-font-size) * 0.875)",md:"var(--tsrd-font-size)"},lineHeight:{xs:"calc(var(--tsrd-font-size) * 1)",sm:"calc(var(--tsrd-font-size) * 1.25)"},weight:{normal:"400",medium:"500",semibold:"600",bold:"700"},fontFamily:{sans:"ui-sans-serif, Inter, system-ui, sans-serif, sans-serif",mono:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"}},border:{radius:{xs:"calc(var(--tsrd-font-size) * 0.125)",sm:"calc(var(--tsrd-font-size) * 0.25)",md:"calc(var(--tsrd-font-size) * 0.375)",full:"9999px"}},size:{0:"0px",.5:"calc(var(--tsrd-font-size) * 0.125)",1:"calc(var(--tsrd-font-size) * 0.25)",1.5:"calc(var(--tsrd-font-size) * 0.375)",2:"calc(var(--tsrd-font-size) * 0.5)",2.5:"calc(var(--tsrd-font-size) * 0.625)",3:"calc(var(--tsrd-font-size) * 0.75)",3.5:"calc(var(--tsrd-font-size) * 0.875)",4:"calc(var(--tsrd-font-size) * 1)",5:"calc(var(--tsrd-font-size) * 1.25)",8:"calc(var(--tsrd-font-size) * 2)"}},Gt=r=>{const{colors:e,font:i,size:t,alpha:c,border:a}=D,{fontFamily:l,lineHeight:v,size:u}=i,o=r?ue.bind({target:r}):ue;return{devtoolsPanelContainer:o`
1
+ import{u as _t,c as Q,a as Te,b as U,s as ht,m as Je,i as g,k as Ft,e as w,f as s,d as S,l as L,M as He,j as le,F as zt,S as Et,n as pt,t as E,o as It,p as mt,q as Bt,r as $t,v as Ke}from"./index-B-C_A3lP.js";import{cF as Dt,cG as be,aU as V,cH as st,cI as Tt,cJ as At,cK as Rt}from"./index-C8-dwIPp.js";let Mt={data:""},Pt=r=>{if(typeof window=="object"){let e=(r?r.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return e.nonce=window.__nonce__,e.parentNode||(r||document.head).appendChild(e),e.firstChild}return r||Mt},Lt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Ot=/\/\*[^]*?\*\/| +/g,lt=/\n+/g,ae=(r,e)=>{let i="",t="",c="";for(let a in r){let l=r[a];a[0]=="@"?a[1]=="i"?i=a+" "+l+";":t+=a[1]=="f"?ae(l,a):a+"{"+ae(l,a[1]=="k"?"":e)+"}":typeof l=="object"?t+=ae(l,e?e.replace(/([^,])+/g,v=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,v):v?v+" "+u:u)):a):l!=null&&(a=a[1]=="-"?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),c+=ae.p?ae.p(a,l):a+":"+l+";")}return i+(e&&c?e+"{"+c+"}":c)+t},ne={},bt=r=>{if(typeof r=="object"){let e="";for(let i in r)e+=i+bt(r[i]);return e}return r},jt=(r,e,i,t,c)=>{let a=bt(r),l=ne[a]||(ne[a]=(u=>{let o=0,n=11;for(;o<u.length;)n=101*n+u.charCodeAt(o++)>>>0;return"go"+n})(a));if(!ne[l]){let u=a!==r?r:(o=>{let n,k,m=[{}];for(;n=Lt.exec(o.replace(Ot,""));)n[4]?m.shift():n[3]?(k=n[3].replace(lt," ").trim(),m.unshift(m[0][k]=m[0][k]||{})):m[0][n[1]]=n[2].replace(lt," ").trim();return m[0]})(r);ne[l]=ae(c?{["@keyframes "+l]:u}:u,i?"":"."+l)}let v=i&&ne.g;return i&&(ne.g=ne[l]),((u,o,n,k)=>{k?o.data=o.data.replace(k,u):o.data.indexOf(u)===-1&&(o.data=n?u+o.data:o.data+u)})(ne[l],e,t,v),l},Ht=(r,e,i)=>r.reduce((t,c,a)=>{let l=e[a];if(l&&l.call){let v=l(i),u=v&&v.props&&v.props.className||/^go/.test(v)&&v;l=u?"."+u:v&&typeof v=="object"?v.props?"":ae(v,""):v===!1?"":v}return t+c+(l??"")},"");function ue(r){let e=this||{},i=r.call?r(e.p):r;return jt(i.unshift?i.raw?Ht(i,[].slice.call(arguments,1),e.p):i.reduce((t,c)=>Object.assign(t,c&&c.call?c(e.p):c),{}):i,Pt(e.target),e.g,e.o,e.k)}ue.bind({g:1});ue.bind({k:1});var D={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000000",white:"#ffffff",neutral:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},darkGray:{50:"#525c7a",100:"#49536e",200:"#414962",300:"#394056",400:"#313749",500:"#292e3d",600:"#212530",700:"#191c24",800:"#111318",900:"#0b0d10"},gray:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},blue:{25:"#F5FAFF",50:"#EFF8FF",100:"#D1E9FF",200:"#B2DDFF",300:"#84CAFF",400:"#53B1FD",500:"#2E90FA",600:"#1570EF",700:"#175CD3",800:"#1849A9",900:"#194185"},green:{25:"#F6FEF9",50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},yellow:{25:"#FFFCF5",50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E"},purple:{25:"#FAFAFF",50:"#F4F3FF",100:"#EBE9FE",200:"#D9D6FE",300:"#BDB4FE",400:"#9B8AFB",500:"#7A5AF8",600:"#6938EF",700:"#5925DC",800:"#4A1FB8",900:"#3E1C96"},teal:{25:"#F6FEFC",50:"#F0FDF9",100:"#CCFBEF",200:"#99F6E0",300:"#5FE9D0",400:"#2ED3B7",500:"#15B79E",600:"#0E9384",700:"#107569",800:"#125D56",900:"#134E48"},pink:{25:"#fdf2f8",50:"#fce7f3",100:"#fbcfe8",200:"#f9a8d4",300:"#f472b6",400:"#ec4899",500:"#db2777",600:"#be185d",700:"#9d174d",800:"#831843",900:"#500724"},cyan:{25:"#ecfeff",50:"#cffafe",100:"#a5f3fc",200:"#67e8f9",300:"#22d3ee",400:"#06b6d4",500:"#0891b2",600:"#0e7490",700:"#155e75",800:"#164e63",900:"#083344"}},alpha:{90:"e5",70:"b3",20:"33"},font:{size:{"2xs":"calc(var(--tsrd-font-size) * 0.625)",xs:"calc(var(--tsrd-font-size) * 0.75)",sm:"calc(var(--tsrd-font-size) * 0.875)",md:"var(--tsrd-font-size)"},lineHeight:{xs:"calc(var(--tsrd-font-size) * 1)",sm:"calc(var(--tsrd-font-size) * 1.25)"},weight:{normal:"400",medium:"500",semibold:"600",bold:"700"},fontFamily:{sans:"ui-sans-serif, Inter, system-ui, sans-serif, sans-serif",mono:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"}},border:{radius:{xs:"calc(var(--tsrd-font-size) * 0.125)",sm:"calc(var(--tsrd-font-size) * 0.25)",md:"calc(var(--tsrd-font-size) * 0.375)",full:"9999px"}},size:{0:"0px",.5:"calc(var(--tsrd-font-size) * 0.125)",1:"calc(var(--tsrd-font-size) * 0.25)",1.5:"calc(var(--tsrd-font-size) * 0.375)",2:"calc(var(--tsrd-font-size) * 0.5)",2.5:"calc(var(--tsrd-font-size) * 0.625)",3:"calc(var(--tsrd-font-size) * 0.75)",3.5:"calc(var(--tsrd-font-size) * 0.875)",4:"calc(var(--tsrd-font-size) * 1)",5:"calc(var(--tsrd-font-size) * 1.25)",8:"calc(var(--tsrd-font-size) * 2)"}},Gt=r=>{const{colors:e,font:i,size:t,alpha:c,border:a}=D,{fontFamily:l,lineHeight:v,size:u}=i,o=r?ue.bind({target:r}):ue;return{devtoolsPanelContainer:o`
2
2
  direction: ltr;
3
3
  position: fixed;
4
4
  bottom: 0;
@@ -425,7 +425,7 @@ import{u as _t,c as Z,a as Te,b as U,s as ht,m as Je,i as g,k as Ft,e as w,f as
425
425
  &:hover {
426
426
  color: ${e.blue[300]};
427
427
  }
428
- `}};function xe(){const[r]=Z(Gt(pt($t)));return r}var Nt=r=>{try{const e=localStorage.getItem(r);return typeof e=="string"?JSON.parse(e):void 0}catch{return}};function dt(r,e){const[i,t]=Z();return Te(()=>{const a=Nt(r);t(typeof a>"u"||a===null?typeof e=="function"?e():e:a)}),[i,a=>{t(l=>{let v=a;typeof a=="function"&&(v=a(l));try{localStorage.setItem(r,JSON.stringify(v))}catch{}return v})}]}var Vt=typeof window>"u";function Ue(r){return r.isFetching&&r.status==="success"?r.isFetching==="beforeLoad"?"purple":"blue":{pending:"yellow",success:"green",error:"red",notFound:"purple"}[r.status]}function Ut(r,e){const i=r.find(t=>t.routeId===e.id);return i?Ue(i):"gray"}function zr(){const[r,e]=Z(!1);return(Vt?Te:w)(()=>{e(!0)}),r}var Jt=Symbol.for("tanstack.rsc.stream"),ct=Symbol.for("tanstack.rsc.renderable"),Ae=Symbol.for("tanstack.rsc.slotUsages");function Kt(r){let e=r.length;for(;e>0&&r[e-1]===void 0;)e--;return e===0||e===r.length?r:r.slice(0,e)}var Ye=r=>(typeof r=="object"||typeof r=="function")&&r!==null&&Jt in r,yt=r=>{if(!Ye(r))return null;const e=r;return ct in e&&e[ct]===!0?"renderableValue":"compositeSource"},xt=r=>{if(!Ye(r))return[];const e=r,i=[];if(Ae in e){const t=e[Ae];if(Array.isArray(t))for(const c of t){const a=c==null?void 0:c.slot;typeof a=="string"&&!i.includes(a)&&i.push(a)}}return i},Yt=r=>{if(!Ye(r))return[];const e=r;if(!(Ae in e))return[];const i=e[Ae];return Array.isArray(i)?i.filter(t=>t&&typeof t=="object"&&typeof t.slot=="string"&&(t.args===void 0||Array.isArray(t.args))):[]},qt=r=>{const e=Yt(r),i={};for(const t of e){const c=Kt(t.args??[]),a=i[t.slot]??(i[t.slot]={count:0,invocations:[]});a.count++,a.invocations.push(c)}return i},Ge=r=>{if(r==="React element")return"React element";const e=yt(r);if(e==="compositeSource"){const c=xt(r);return c.length>0?`RSC composite source (${c.length} ${c.length===1?"slot":"slots"})`:"RSC composite source"}if(e==="renderableValue")return"RSC renderable value";const i=Object.getOwnPropertyNames(Object(r)),t=typeof r=="bigint"?`${r.toString()}n`:r;try{return JSON.stringify(t,i)}catch{return"unable to stringify"}};function Wt(r,e=[i=>i]){return r.map((i,t)=>[i,t]).sort(([i,t],[c,a])=>{for(const l of e){const v=l(i),u=l(c);if(typeof v>"u"){if(typeof u>"u")continue;return 1}if(v!==u)return v>u?1:-1}return t-a}).map(([i])=>i)}var Qt=E('<span><svg xmlns=http://www.w3.org/2000/svg width=12 height=12 fill=none viewBox="0 0 24 24"><path stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 18l6-6-6-6">'),ze=E("<div>"),Zt=E("<button><span>:</span><span>"),Xt=E("<div><span>slots</span><div>"),ut=E("<span>:"),ft=E("<span>"),er=E("<button><span> "),tr=E("<div><div><button> [<!> ... <!>]"),rr=E("<button><span></span> 🔄 "),Ne=({expanded:r,style:e={}})=>{const i=Ct();return(()=>{var t=Qt(),c=t.firstChild;return w(a=>{var l=i().expander,v=V(i().expanderIcon(r));return l!==a.e&&s(t,a.e=l),v!==a.t&&le(c,"class",a.t=v),a},{e:void 0,t:void 0}),t})()};function nr(r,e){if(e<1)return[];let i=0;const t=[];for(;i<r.length;)t.push(r.slice(i,i+e)),i=i+e;return t}function ir(r){return Symbol.iterator in r}function or(r){if(!r||typeof r!="object")return!1;const e=Object.getPrototypeOf(r);return e===Object.prototype||e===null}function se({value:r,defaultExpanded:e,pageSize:i=100,filterSubEntries:t,...c}){const[a,l]=Z(!!e),v=()=>l(L=>!L),u=U(()=>typeof r()),o=U(()=>{let L=[];const Q=f=>{const y=e===!0?{[f.label]:!0}:e==null?void 0:e[f.label];return{...f,value:()=>f.value,defaultExpanded:y}};if(Array.isArray(r())&&r().length===2&&r()[0]==="React element"&&or(r()[1])){const f=r();L=[Q({label:"0",value:f[0]}),...Object.entries(f[1]).map(([y,j])=>Q({label:y,value:j}))]}else Array.isArray(r())?L=r().map((f,y)=>Q({label:y.toString(),value:f})):r()!==null&&typeof r()=="object"&&ir(r())&&typeof r()[Symbol.iterator]=="function"?L=Array.from(r(),(f,y)=>Q({label:y.toString(),value:f})):typeof r()=="object"&&r()!==null&&(L=Object.entries(r()).map(([f,y])=>Q({label:f,value:y})));return t?t(L):L}),n=U(()=>nr(o(),i)),[k,m]=Z([]),[A,N]=Z(void 0),p=Ct(),R=()=>{N(r()())},K=L=>S(se,Je({value:r,filterSubEntries:t},c,L)),W=U(()=>yt(r())),Ce=U(()=>xt(r())),Re=U(()=>qt(r())),Me=U(()=>W()==="compositeSource"&&Ce().length>0);return(()=>{var L=ze();return g(L,(()=>{var Q=O(()=>W()!==null);return()=>Q()?O(()=>!!Me())()?[(()=>{var f=Zt(),y=f.firstChild,j=y.firstChild,b=y.nextSibling;return f.$$click=()=>v(),g(f,S(Ne,{get expanded(){return a()??!1}}),y),g(y,()=>c.label,j),g(b,()=>Ge(r())),w(H=>{var M=p().expandButton,X=p().compositeComponent;return M!==H.e&&s(f,H.e=M),X!==H.t&&s(b,H.t=X),H},{e:void 0,t:void 0}),f})(),O(()=>O(()=>!!(a()??!1))()?(()=>{var f=Xt(),y=f.firstChild,j=y.nextSibling;return g(j,()=>Ce().map(b=>{const H=Re()[b];return H?S(se,{label:`${b}:`,value:()=>H.invocations.map(M=>M.length===1?M[0]:M)}):null})),w(b=>{var H=p().rscMetaRow,M=p().rscMetaLabel,X=p().subEntries;return H!==b.e&&s(f,b.e=H),M!==b.t&&s(y,b.t=M),X!==b.a&&s(j,b.a=X),b},{e:void 0,t:void 0,a:void 0}),f})():null)]:[(()=>{var f=ut(),y=f.firstChild;return g(f,()=>c.label,y),f})()," ",(()=>{var f=ft();return g(f,()=>Ge(r())),w(()=>s(f,W()==="compositeSource"?p().compositeComponent:p().renderableComponent)),f})()]:O(()=>!!n().length)()?[(()=>{var f=er(),y=f.firstChild,j=y.firstChild;return f.$$click=()=>v(),g(f,S(Ne,{get expanded(){return a()??!1}}),y),g(f,()=>c.label,y),g(y,()=>String(u).toLowerCase()==="iterable"?"(Iterable) ":"",j),g(y,()=>o().length,j),g(y,()=>o().length>1?"items":"item",null),w(b=>{var H=p().expandButton,M=p().info;return H!==b.e&&s(f,b.e=H),M!==b.t&&s(y,b.t=M),b},{e:void 0,t:void 0}),f})(),O(()=>O(()=>!!(a()??!1))()?O(()=>n().length===1)()?(()=>{var f=ze();return g(f,()=>o().map((y,j)=>K(y))),w(()=>s(f,p().subEntries)),f})():(()=>{var f=ze();return g(f,()=>n().map((y,j)=>(()=>{var b=tr(),H=b.firstChild,M=H.firstChild,X=M.firstChild,fe=X.nextSibling,we=fe.nextSibling.nextSibling;return we.nextSibling,M.$$click=()=>m(Y=>Y.includes(j)?Y.filter(C=>C!==j):[...Y,j]),g(M,S(Ne,{get expanded(){return k().includes(j)}}),X),g(M,j*i,fe),g(M,j*i+i-1,we),g(H,(()=>{var Y=O(()=>!!k().includes(j));return()=>Y()?(()=>{var C=ze();return g(C,()=>y.map(P=>K(P))),w(()=>s(C,p().subEntries)),C})():null})(),null),w(Y=>{var C=p().entry,P=V(p().labelButton,"labelButton");return C!==Y.e&&s(H,Y.e=C),P!==Y.t&&s(M,Y.t=P),Y},{e:void 0,t:void 0}),b})())),w(()=>s(f,p().subEntries)),f})():null)]:O(()=>u()==="function")()?S(se,{get label(){return(()=>{var f=rr(),y=f.firstChild;return f.$$click=R,g(y,()=>c.label),w(()=>s(f,p().refreshValueBtn)),f})()},value:A,defaultExpanded:{}}):[(()=>{var f=ut(),y=f.firstChild;return g(f,()=>c.label,y),f})()," ",(()=>{var f=ft();return g(f,()=>Ge(r())),w(()=>s(f,p().value)),f})()]})()),w(()=>s(L,p().entry)),L})()}var ar=r=>{const{colors:e,font:i,size:t,border:c}=D,{fontFamily:a,lineHeight:l,size:v}=i,u=r?ue.bind({target:r}):ue;return{entry:u`
428
+ `}};function xe(){const[r]=Q(Gt(pt($t)));return r}var Nt=r=>{try{const e=localStorage.getItem(r);return typeof e=="string"?JSON.parse(e):void 0}catch{return}};function dt(r,e){const[i,t]=Q();return Te(()=>{const a=Nt(r);t(typeof a>"u"||a===null?typeof e=="function"?e():e:a)}),[i,a=>{t(l=>{let v=a;typeof a=="function"&&(v=a(l));try{localStorage.setItem(r,JSON.stringify(v))}catch{}return v})}]}var Vt=typeof window>"u";function Ue(r){return r.isFetching&&r.status==="success"?r.isFetching==="beforeLoad"?"purple":"blue":{pending:"yellow",success:"green",error:"red",notFound:"purple"}[r.status]}function Ut(r,e){const i=r.find(t=>t.routeId===e.id);return i?Ue(i):"gray"}function zr(){const[r,e]=Q(!1);return(Vt?Te:w)(()=>{e(!0)}),r}var Jt=Symbol.for("tanstack.rsc.stream"),ct=Symbol.for("tanstack.rsc.renderable"),Ae=Symbol.for("tanstack.rsc.slotUsages");function Kt(r){let e=r.length;for(;e>0&&r[e-1]===void 0;)e--;return e===0||e===r.length?r:r.slice(0,e)}var Ye=r=>(typeof r=="object"||typeof r=="function")&&r!==null&&Jt in r,yt=r=>{if(!Ye(r))return null;const e=r;return ct in e&&e[ct]===!0?"renderableValue":"compositeSource"},xt=r=>{if(!Ye(r))return[];const e=r,i=[];if(Ae in e){const t=e[Ae];if(Array.isArray(t))for(const c of t){const a=c==null?void 0:c.slot;typeof a=="string"&&!i.includes(a)&&i.push(a)}}return i},Yt=r=>{if(!Ye(r))return[];const e=r;if(!(Ae in e))return[];const i=e[Ae];return Array.isArray(i)?i.filter(t=>t&&typeof t=="object"&&typeof t.slot=="string"&&(t.args===void 0||Array.isArray(t.args))):[]},qt=r=>{const e=Yt(r),i={};for(const t of e){const c=Kt(t.args??[]),a=i[t.slot]??(i[t.slot]={count:0,invocations:[]});a.count++,a.invocations.push(c)}return i},Ge=r=>{if(r==="React element")return"React element";const e=yt(r);if(e==="compositeSource"){const c=xt(r);return c.length>0?`RSC composite source (${c.length} ${c.length===1?"slot":"slots"})`:"RSC composite source"}if(e==="renderableValue")return"RSC renderable value";const i=Object.getOwnPropertyNames(Object(r)),t=typeof r=="bigint"?`${r.toString()}n`:r;try{return JSON.stringify(t,i)}catch{return"unable to stringify"}};function Wt(r,e=[i=>i]){return r.map((i,t)=>[i,t]).sort(([i,t],[c,a])=>{for(const l of e){const v=l(i),u=l(c);if(typeof v>"u"){if(typeof u>"u")continue;return 1}if(v!==u)return v>u?1:-1}return t-a}).map(([i])=>i)}var Zt=E('<span><svg xmlns=http://www.w3.org/2000/svg width=12 height=12 fill=none viewBox="0 0 24 24"><path stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 18l6-6-6-6">'),ze=E("<div>"),Qt=E("<button><span>:</span><span>"),Xt=E("<div><span>slots</span><div>"),ut=E("<span>:"),ft=E("<span>"),er=E("<button><span> "),tr=E("<div><div><button> [<!> ... <!>]"),rr=E("<button><span></span> 🔄 "),Ne=({expanded:r,style:e={}})=>{const i=Ct();return(()=>{var t=Zt(),c=t.firstChild;return w(a=>{var l=i().expander,v=V(i().expanderIcon(r));return l!==a.e&&s(t,a.e=l),v!==a.t&&le(c,"class",a.t=v),a},{e:void 0,t:void 0}),t})()};function nr(r,e){if(e<1)return[];let i=0;const t=[];for(;i<r.length;)t.push(r.slice(i,i+e)),i=i+e;return t}function ir(r){return Symbol.iterator in r}function or(r){if(!r||typeof r!="object")return!1;const e=Object.getPrototypeOf(r);return e===Object.prototype||e===null}function se({value:r,defaultExpanded:e,pageSize:i=100,filterSubEntries:t,...c}){const[a,l]=Q(!!e),v=()=>l(O=>!O),u=U(()=>typeof r()),o=U(()=>{let O=[];const Z=f=>{const y=e===!0?{[f.label]:!0}:e==null?void 0:e[f.label];return{...f,value:()=>f.value,defaultExpanded:y}};if(Array.isArray(r())&&r().length===2&&r()[0]==="React element"&&or(r()[1])){const f=r();O=[Z({label:"0",value:f[0]}),...Object.entries(f[1]).map(([y,j])=>Z({label:y,value:j}))]}else Array.isArray(r())?O=r().map((f,y)=>Z({label:y.toString(),value:f})):r()!==null&&typeof r()=="object"&&ir(r())&&typeof r()[Symbol.iterator]=="function"?O=Array.from(r(),(f,y)=>Z({label:y.toString(),value:f})):typeof r()=="object"&&r()!==null&&(O=Object.entries(r()).map(([f,y])=>Z({label:f,value:y})));return t?t(O):O}),n=U(()=>nr(o(),i)),[k,m]=Q([]),[A,N]=Q(void 0),p=Ct(),R=()=>{N(r()())},K=O=>S(se,Je({value:r,filterSubEntries:t},c,O)),W=U(()=>yt(r())),Ce=U(()=>xt(r())),Re=U(()=>qt(r())),Me=U(()=>W()==="compositeSource"&&Ce().length>0);return(()=>{var O=ze();return g(O,(()=>{var Z=L(()=>W()!==null);return()=>Z()?L(()=>!!Me())()?[(()=>{var f=Qt(),y=f.firstChild,j=y.firstChild,b=y.nextSibling;return f.$$click=()=>v(),g(f,S(Ne,{get expanded(){return a()??!1}}),y),g(y,()=>c.label,j),g(b,()=>Ge(r())),w(H=>{var M=p().expandButton,X=p().compositeComponent;return M!==H.e&&s(f,H.e=M),X!==H.t&&s(b,H.t=X),H},{e:void 0,t:void 0}),f})(),L(()=>L(()=>!!(a()??!1))()?(()=>{var f=Xt(),y=f.firstChild,j=y.nextSibling;return g(j,()=>Ce().map(b=>{const H=Re()[b];return H?S(se,{label:`${b}:`,value:()=>H.invocations.map(M=>M.length===1?M[0]:M)}):null})),w(b=>{var H=p().rscMetaRow,M=p().rscMetaLabel,X=p().subEntries;return H!==b.e&&s(f,b.e=H),M!==b.t&&s(y,b.t=M),X!==b.a&&s(j,b.a=X),b},{e:void 0,t:void 0,a:void 0}),f})():null)]:[(()=>{var f=ut(),y=f.firstChild;return g(f,()=>c.label,y),f})()," ",(()=>{var f=ft();return g(f,()=>Ge(r())),w(()=>s(f,W()==="compositeSource"?p().compositeComponent:p().renderableComponent)),f})()]:L(()=>!!n().length)()?[(()=>{var f=er(),y=f.firstChild,j=y.firstChild;return f.$$click=()=>v(),g(f,S(Ne,{get expanded(){return a()??!1}}),y),g(f,()=>c.label,y),g(y,()=>String(u).toLowerCase()==="iterable"?"(Iterable) ":"",j),g(y,()=>o().length,j),g(y,()=>o().length>1?"items":"item",null),w(b=>{var H=p().expandButton,M=p().info;return H!==b.e&&s(f,b.e=H),M!==b.t&&s(y,b.t=M),b},{e:void 0,t:void 0}),f})(),L(()=>L(()=>!!(a()??!1))()?L(()=>n().length===1)()?(()=>{var f=ze();return g(f,()=>o().map((y,j)=>K(y))),w(()=>s(f,p().subEntries)),f})():(()=>{var f=ze();return g(f,()=>n().map((y,j)=>(()=>{var b=tr(),H=b.firstChild,M=H.firstChild,X=M.firstChild,fe=X.nextSibling,we=fe.nextSibling.nextSibling;return we.nextSibling,M.$$click=()=>m(Y=>Y.includes(j)?Y.filter(C=>C!==j):[...Y,j]),g(M,S(Ne,{get expanded(){return k().includes(j)}}),X),g(M,j*i,fe),g(M,j*i+i-1,we),g(H,(()=>{var Y=L(()=>!!k().includes(j));return()=>Y()?(()=>{var C=ze();return g(C,()=>y.map(P=>K(P))),w(()=>s(C,p().subEntries)),C})():null})(),null),w(Y=>{var C=p().entry,P=V(p().labelButton,"labelButton");return C!==Y.e&&s(H,Y.e=C),P!==Y.t&&s(M,Y.t=P),Y},{e:void 0,t:void 0}),b})())),w(()=>s(f,p().subEntries)),f})():null)]:L(()=>u()==="function")()?S(se,{get label(){return(()=>{var f=rr(),y=f.firstChild;return f.$$click=R,g(y,()=>c.label),w(()=>s(f,p().refreshValueBtn)),f})()},value:A,defaultExpanded:{}}):[(()=>{var f=ut(),y=f.firstChild;return g(f,()=>c.label,y),f})()," ",(()=>{var f=ft();return g(f,()=>Ge(r())),w(()=>s(f,p().value)),f})()]})()),w(()=>s(O,p().entry)),O})()}var ar=r=>{const{colors:e,font:i,size:t,border:c}=D,{fontFamily:a,lineHeight:l,size:v}=i,u=r?ue.bind({target:r}):ue;return{entry:u`
429
429
  font-family: ${a.mono};
430
430
  font-size: ${v.xs};
431
431
  line-height: ${l.sm};
@@ -536,4 +536,4 @@ import{u as _t,c as Z,a as Te,b as U,s as ht,m as Je,i as g,k as Ft,e as w,f as
536
536
  padding: 0;
537
537
  font-family: ${a.mono};
538
538
  font-size: ${v.xs};
539
- `}};function Ct(){const[r]=Z(ar(pt($t)));return r}Ke(["click"]);var sr=E("<div><div></div><div>/</div><div></div><div>/</div><div>");function Ve(r){const e=["s","min","h","d"],i=[r/1e3,r/6e4,r/36e5,r/864e5];let t=0;for(let c=1;c<i.length&&!(i[c]<1);c++)t=c;return new Intl.NumberFormat(navigator.language,{compactDisplay:"short",notation:"compact",maximumFractionDigits:0}).format(i[t])+e[t]}function Ee({match:r,router:e}){const i=xe();if(!r)return null;const t=e().routesById[r.routeId];if(!t.options.loader)return null;const c=Date.now()-r.updatedAt,a=t.options.staleTime??e().options.defaultStaleTime??0,l=t.options.gcTime??e().options.defaultGcTime??3e5;return(()=>{var v=sr(),u=v.firstChild,o=u.nextSibling.nextSibling,n=o.nextSibling.nextSibling;return g(u,()=>Ve(c)),g(o,()=>Ve(a)),g(n,()=>Ve(l)),w(()=>s(v,V(i().ageTicker(c>a)))),v})()}var lr=E("<button type=button>➔");function Ie({to:r,params:e,search:i,router:t}){const c=xe();return(()=>{var a=lr();return a.$$click=l=>{l.stopPropagation(),t().navigate({to:r,params:e,search:i})},le(a,"title",`Navigate to ${r}`),w(()=>s(a,c().navigateButton)),a})()}Ke(["click"]);var dr=E("<button><div>TANSTACK</div><div>TanStack Router v1"),cr=E("<div style=display:flex;align-items:center;width:100%><div style=flex-grow:1;min-width:0>"),ur=E("<code> "),ye=E("<code>"),fr=E("<div><div role=button><div>"),Be=E("<div>"),gr=E("<div><ul>"),vr=E('<div><button><svg xmlns=http://www.w3.org/2000/svg width=10 height=6 fill=none viewBox="0 0 10 6"><path stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=1.667 d="M1 1l4 4 4-4"></path></svg></button><div><div></div><div><div></div></div></div><div><div><div><span>Pathname</span></div><div><code></code></div><div><div><button type=button>Routes</button><button type=button>Matches</button><button type=button>History</button></div><div><div>age / staleTime / gcTime</div></div></div><div>'),hr=E("<div><span>masked"),gt=E("<div role=button><div>"),pr=E("<li><div>"),mr=E("<li>This panel displays the most recent 15 navigations."),$r=E("<div><div><div>Cached Matches</div><div>age / staleTime / gcTime</div></div><div>"),br=E("<div><div>Match Details</div><div><div><div><div></div></div><div><div>ID:</div><div><code></code></div></div><div><div>State:</div><div></div></div><div><div>Last Updated:</div><div></div></div></div></div><div>Explorer</div><div>"),yr=E("<div>Loader Data"),xr=E("<div><div><span>Search Params</span></div><div>"),Cr=E("<span style=margin-left:0.5rem>"),wr=E('<button type=button aria-label="Copy value to clipboard"style=cursor:pointer>'),vt=15;function kr(r){const{className:e,...i}=r,t=xe();return(()=>{var c=dr(),a=c.firstChild,l=a.nextSibling;return ht(c,Je(i,{get class(){return V(t().logo,e?e():"")}}),!1,!0),w(v=>{var u=t().tanstackLogo,o=t().routerLogo;return u!==v.e&&s(a,v.e=u),o!==v.t&&s(l,v.t=o),v},{e:void 0,t:void 0}),c})()}function De(r){return(()=>{var e=cr(),i=e.firstChild;return g(e,()=>r.left,i),g(i,()=>r.children),g(e,()=>r.right,null),w(()=>s(e,r.class)),e})()}function wt({routerState:r,pendingMatches:e,router:i,route:t,isRoot:c,activeId:a,setActiveId:l}){const v=xe(),u=U(()=>e().length?e():r().matches),o=U(()=>r().matches.find(m=>m.routeId===t.id)),n=U(()=>{var m,A;try{if((m=o())!=null&&m.params){const N=(A=o())==null?void 0:A.params,p=t.path||st(t.id);if(p.startsWith("$")){const R=p.slice(1);if(N[R])return`(${N[R]})`}}return""}catch{return""}}),k=U(()=>{if(c||!t.path)return;const m=Object.assign({},...u().map(p=>p.params)),A=Tt(t),N=A?At(t.fullPath,A,m,i().pathParamsDecoder):t.fullPath;return A&&Rt(A,m)?void 0:N});return(()=>{var m=fr(),A=m.firstChild,N=A.firstChild;return A.$$click=()=>{o()&&l(a()===t.id?"":t.id)},g(A,S(De,{get class(){return V(v().routesRow(!!o()))},get left(){return S(It,{get when(){return k()},children:p=>S(Ie,{get to(){return p()},router:i})})},get right(){return S(Ee,{get match(){return o()},router:i})},get children(){return[(()=>{var p=ur(),R=p.firstChild;return g(p,()=>c?be:t.path||st(t.id),R),w(()=>s(p,v().code)),p})(),(()=>{var p=ye();return g(p,n),w(()=>s(p,v().routeParamInfo)),p})()]}}),null),g(m,(()=>{var p=O(()=>{var R;return!!((R=t.children)!=null&&R.length)});return()=>p()?(()=>{var R=Be();return g(R,()=>[...t.children].sort((K,W)=>K.rank-W.rank).map(K=>S(wt,{routerState:r,pendingMatches:e,router:i,route:K,activeId:a,setActiveId:l}))),w(()=>s(R,v().nestedRouteRow(!!c))),R})():null})(),null),w(p=>{var R=`Open match details for ${t.id}`,K=V(v().routesRowContainer(t.id===a(),!!o())),W=V(v().matchIndicator(Ut(u(),t)));return R!==p.e&&le(A,"aria-label",p.e=R),K!==p.t&&s(A,p.t=K),W!==p.a&&s(N,p.a=W),p},{e:void 0,t:void 0,a:void 0}),m})()}var Er=function({...e}){const{isOpen:i=!0,setIsOpen:t,handleDragStart:c,router:a,routerState:l,shadowDOMTarget:v,...u}=e,{onCloseClick:o}=_t(),n=xe(),{className:k,style:m,...A}=u,[N,p]=dt("tanstackRouterDevtoolsActiveTab","routes"),[R,K]=dt("tanstackRouterDevtoolsActiveRouteId",""),[W,Ce]=Z([]),[Re,Me]=Z(!1),L=()=>{const C=l().matches;return C.some(P=>P.status==="pending")?C:[]};let Q=a()._cache,f=[...Q.values()];const[y,j]=Z(f);Te(()=>{const C=()=>{const ee=a()._cache;let q=ee.size!==f.length;if(!q){let ie=0;for(const de of ee.values())if(de!==f[ie++]){q=!0;break}}(ee!==Q||q)&&(Q=ee,f=[...ee.values()],j(f))};C();const P=setInterval(C,500);mt(()=>clearInterval(P))}),Te(()=>{const C=l().matches,P=C[C.length-1];if(!P)return;const ee=Bt(()=>W()),q=ee[0],ie=q&&q.pathname===P.pathname&&JSON.stringify(q.search??{})===JSON.stringify(P.search??{});(!q||!ie)&&(ee.length>=vt&&Me(!0),Ce(de=>{const ge=[P,...de];return ge.splice(vt),ge}))});const b=U(()=>[...L(),...l().matches,...y()].find(C=>C.routeId===R()||C.id===R())),H=U(()=>Dt(l().location.search)),M=U(()=>({...a(),state:l()})),X=U(()=>Object.fromEntries(Wt(Object.keys(M()),["state","routesById","routesByPath","options","manifest"].map(C=>P=>P!==C)).map(C=>[C,M()[C]]).filter(C=>typeof C[1]!="function"&&!["stores","basepath","subscribers","_scroll","tempLocationKey","latestLocation","routeTree","history"].includes(C[0])))),fe=U(()=>{var C;return(C=b())==null?void 0:C.loaderData}),we=U(()=>b()),Y=U(()=>l().location.search);return(()=>{var C=vr(),P=C.firstChild,ee=P.firstChild,q=P.nextSibling,ie=q.firstChild,de=ie.nextSibling,ge=de.firstChild,Pe=q.nextSibling,qe=Pe.firstChild,ke=qe.firstChild;ke.firstChild;var Se=ke.nextSibling,kt=Se.firstChild,Oe=Se.nextSibling,Le=Oe.firstChild,_e=Le.firstChild,Fe=_e.nextSibling,je=Fe.nextSibling,St=Le.nextSibling,We=Oe.nextSibling;return ht(C,Je({get class(){return V(n().devtoolsPanel,"TanStackRouterDevtoolsPanel",k?k():"")},get style(){return m?m():""}},A),!1,!0),g(C,c?(()=>{var d=Be();return Ft(d,"mousedown",c,!0),w(()=>s(d,n().dragHandle)),d})():null,P),P.$$click=d=>{t&&t(!1),o(d)},g(ie,S(kr,{"aria-hidden":!0,onClick:d=>{t&&t(!1),o(d)}})),g(ge,S(se,{label:"Router",value:X,defaultExpanded:{state:{},context:{},options:{}},filterSubEntries:d=>d.filter($=>typeof $.value()!="function")})),g(ke,(()=>{var d=O(()=>!!l().location.maskedLocation);return()=>d()?(()=>{var $=hr(),F=$.firstChild;return w(I=>{var _=n().maskedBadgeContainer,h=n().maskedBadge;return _!==I.e&&s($,I.e=_),h!==I.t&&s(F,I.t=h),I},{e:void 0,t:void 0}),$})():null})(),null),g(kt,()=>l().location.pathname),g(Se,(()=>{var d=O(()=>!!l().location.maskedLocation);return()=>d()?(()=>{var $=ye();return g($,()=>{var F;return(F=l().location.maskedLocation)==null?void 0:F.pathname}),w(()=>s($,n().maskedLocation)),$})():null})(),null),_e.$$click=()=>{p("routes")},Fe.$$click=()=>{p("matches")},je.$$click=()=>{p("history")},g(We,S(Et,{get children(){return[S(He,{get when(){return N()==="routes"},get children(){return S(wt,{routerState:l,pendingMatches:L,router:a,get route(){return a().routeTree},isRoot:!0,activeId:R,setActiveId:K})}}),S(He,{get when(){return N()==="matches"},get children(){var d=Be();return g(d,()=>(L().length?L():l().matches).map(($,F)=>(()=>{var I=gt(),_=I.firstChild;return I.$$click=()=>K(R()===$.id?"":$.id),g(I,S(De,{get left(){return S(Ie,{get to(){return $.pathname},get params(){return $.params},get search(){return $.search},router:a})},get right(){return S(Ee,{match:$,router:a})},get children(){var h=ye();return g(h,()=>`${$.routeId===be?be:$.pathname}`),w(()=>s(h,n().matchID)),h}}),null),w(h=>{var z=`Open match details for ${$.id}`,G=V(n().matchRow($===b())),T=V(n().matchIndicator(Ue($)));return z!==h.e&&le(I,"aria-label",h.e=z),G!==h.t&&s(I,h.t=G),T!==h.a&&s(_,h.a=T),h},{e:void 0,t:void 0,a:void 0}),I})())),d}}),S(He,{get when(){return N()==="history"},get children(){var d=gr(),$=d.firstChild;return g($,S(zt,{get each(){return W()},children:(F,I)=>(()=>{var _=pr(),h=_.firstChild;return g(_,S(De,{get left(){return S(Ie,{get to(){return F.pathname},get params(){return F.params},get search(){return F.search},router:a})},get right(){return S(Ee,{match:F,router:a})},get children(){var z=ye();return g(z,()=>`${F.routeId===be?be:F.pathname}`),w(()=>s(z,n().matchID)),z}}),null),w(z=>{var G=V(n().matchRow(F===b())),T=V(n().matchIndicator(I()===0?"green":"gray"));return G!==z.e&&s(_,z.e=G),T!==z.t&&s(h,z.t=T),z},{e:void 0,t:void 0}),_})()}),null),g($,(()=>{var F=O(()=>!!Re());return()=>F()?(()=>{var I=mr();return w(()=>s(I,n().historyOverflowContainer)),I})():null})(),null),d}})]}})),g(Pe,(()=>{var d=O(()=>!!y().length);return()=>d()?(()=>{var $=$r(),F=$.firstChild,I=F.firstChild.nextSibling,_=F.nextSibling;return g(_,()=>y().map(h=>(()=>{var z=gt(),G=z.firstChild;return z.$$click=()=>K(R()===h.id?"":h.id),g(z,S(De,{get left(){return S(Ie,{get to(){return h.pathname},get params(){return h.params},get search(){return h.search},router:a})},get right(){return S(Ee,{match:h,router:a})},get children(){var T=ye();return g(T,()=>`${h.id}`),w(()=>s(T,n().matchID)),T}}),null),w(T=>{var oe=`Open match details for ${h.id}`,te=V(n().matchRow(h===b())),re=V(n().matchIndicator(Ue(h)));return oe!==T.e&&le(z,"aria-label",T.e=oe),te!==T.t&&s(z,T.t=te),re!==T.a&&s(G,T.a=re),T},{e:void 0,t:void 0,a:void 0}),z})())),w(h=>{var z=n().cachedMatchesContainer,G=n().detailsHeader,T=n().detailsHeaderInfo;return z!==h.e&&s($,h.e=z),G!==h.t&&s(F,h.t=G),T!==h.a&&s(I,h.a=T),h},{e:void 0,t:void 0,a:void 0}),$})():null})(),null),g(C,(()=>{var d=O(()=>{var $;return!!(b()&&(($=b())!=null&&$.status))});return()=>d()?(()=>{var $=br(),F=$.firstChild,I=F.nextSibling,_=I.firstChild,h=_.firstChild,z=h.firstChild,G=h.nextSibling,T=G.firstChild.nextSibling,oe=T.firstChild,te=G.nextSibling,re=te.firstChild.nextSibling,ve=te.nextSibling,he=ve.firstChild.nextSibling,ce=I.nextSibling,pe=ce.nextSibling;return g(z,(()=>{var x=O(()=>{var B,J;return!!(((B=b())==null?void 0:B.status)==="success"&&((J=b())!=null&&J.isFetching))});return()=>{var B;return x()?"fetching":(B=b())==null?void 0:B.status}})()),g(oe,()=>{var x;return(x=b())==null?void 0:x.id}),g(re,(()=>{var x=O(()=>!!L().find(B=>{var J;return B.id===((J=b())==null?void 0:J.id)}));return()=>x()?"Pending":l().matches.find(B=>{var J;return B.id===((J=b())==null?void 0:J.id)})?"Active":"Cached"})()),g(he,(()=>{var x=O(()=>{var B;return!!((B=b())!=null&&B.updatedAt)});return()=>{var B;return x()?new Date((B=b())==null?void 0:B.updatedAt).toLocaleTimeString():"N/A"}})()),g($,(()=>{var x=O(()=>!!fe());return()=>x()?[(()=>{var B=yr();return w(()=>s(B,n().detailsHeader)),B})(),(()=>{var B=Be();return g(B,S(se,{label:"loaderData",value:fe,defaultExpanded:{}})),w(()=>s(B,n().detailsContent)),B})()]:null})(),ce),g(pe,S(se,{label:"Match",value:we,defaultExpanded:{}})),w(x=>{var ot,at;var B=n().thirdContainer,J=n().detailsHeader,me=n().matchDetails,$e=n().matchStatus((ot=b())==null?void 0:ot.status,(at=b())==null?void 0:at.isFetching),Qe=n().matchDetailsInfoLabel,Ze=n().matchDetailsInfo,Xe=n().matchDetailsInfoLabel,et=n().matchDetailsInfo,tt=n().matchDetailsInfoLabel,rt=n().matchDetailsInfo,nt=n().detailsHeader,it=n().detailsContent;return B!==x.e&&s($,x.e=B),J!==x.t&&s(F,x.t=J),me!==x.a&&s(_,x.a=me),$e!==x.o&&s(h,x.o=$e),Qe!==x.i&&s(G,x.i=Qe),Ze!==x.n&&s(T,x.n=Ze),Xe!==x.s&&s(te,x.s=Xe),et!==x.h&&s(re,x.h=et),tt!==x.r&&s(ve,x.r=tt),rt!==x.d&&s(he,x.d=rt),nt!==x.l&&s(ce,x.l=nt),it!==x.u&&s(pe,x.u=it),x},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0}),$})():null})(),null),g(C,(()=>{var d=O(()=>!!H());return()=>d()?(()=>{var $=xr(),F=$.firstChild;F.firstChild;var I=F.nextSibling;return g(F,typeof navigator<"u"?(()=>{var _=Cr();return g(_,S(Sr,{getValue:()=>{const h=l().location.search;return JSON.stringify(h)}})),_})():null,null),g(I,S(se,{value:Y,get defaultExpanded(){return Object.keys(l().location.search).reduce((_,h)=>(_[h]={},_),{})}})),w(_=>{var h=n().fourthContainer,z=n().detailsHeader,G=n().detailsContent;return h!==_.e&&s($,_.e=h),z!==_.t&&s(F,_.t=z),G!==_.a&&s(I,_.a=G),_},{e:void 0,t:void 0,a:void 0}),$})():null})(),null),w(d=>{var $=n().panelCloseBtn,F=n().panelCloseBtnIcon,I=n().firstContainer,_=n().row,h=n().routerExplorerContainer,z=n().routerExplorer,G=n().secondContainer,T=n().matchesContainer,oe=n().detailsHeader,te=n().detailsContent,re=n().detailsHeader,ve=n().routeMatchesToggle,he=N()==="routes",ce=V(n().routeMatchesToggleBtn(N()==="routes",!0)),pe=N()==="matches",x=V(n().routeMatchesToggleBtn(N()==="matches",!0)),B=N()==="history",J=V(n().routeMatchesToggleBtn(N()==="history",!1)),me=n().detailsHeaderInfo,$e=V(n().routesContainer);return $!==d.e&&s(P,d.e=$),F!==d.t&&le(ee,"class",d.t=F),I!==d.a&&s(q,d.a=I),_!==d.o&&s(ie,d.o=_),h!==d.i&&s(de,d.i=h),z!==d.n&&s(ge,d.n=z),G!==d.s&&s(Pe,d.s=G),T!==d.h&&s(qe,d.h=T),oe!==d.r&&s(ke,d.r=oe),te!==d.d&&s(Se,d.d=te),re!==d.l&&s(Oe,d.l=re),ve!==d.u&&s(Le,d.u=ve),he!==d.c&&(_e.disabled=d.c=he),ce!==d.w&&s(_e,d.w=ce),pe!==d.m&&(Fe.disabled=d.m=pe),x!==d.f&&s(Fe,d.f=x),B!==d.y&&(je.disabled=d.y=B),J!==d.g&&s(je,d.g=J),me!==d.p&&s(St,d.p=me),$e!==d.b&&s(We,d.b=$e),d},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0}),C})()};function Sr({getValue:r}){const[e,i]=Z(!1);let t=null;const c=async()=>{var a;if(typeof navigator>"u"||!((a=navigator.clipboard)!=null&&a.writeText)){console.warn("TanStack Router Devtools: Clipboard API unavailable");return}try{const l=r();await navigator.clipboard.writeText(l),i(!0),t&&clearTimeout(t),t=setTimeout(()=>i(!1),2500)}catch(l){console.error("TanStack Router Devtools: Failed to copy",l)}};return mt(()=>{t&&clearTimeout(t)}),(()=>{var a=wr();return a.$$click=c,g(a,()=>e()?"✅":"📋"),w(()=>le(a,"title",e()?"Copied!":"Copy")),a})()}Ke(["click","mousedown"]);export{Er as BaseTanStackRouterDevtoolsPanel,Er as default,dt as n,xe as r,zr as t};
539
+ `}};function Ct(){const[r]=Q(ar(pt($t)));return r}Ke(["click"]);var sr=E("<div><div></div><div>/</div><div></div><div>/</div><div>");function Ve(r){const e=["s","min","h","d"],i=[r/1e3,r/6e4,r/36e5,r/864e5];let t=0;for(let c=1;c<i.length&&!(i[c]<1);c++)t=c;return new Intl.NumberFormat(navigator.language,{compactDisplay:"short",notation:"compact",maximumFractionDigits:0}).format(i[t])+e[t]}function Ee({match:r,router:e}){const i=xe();if(!r)return null;const t=e().routesById[r.routeId];if(!t.options.loader)return null;const c=Date.now()-r.updatedAt,a=t.options.staleTime??e().options.defaultStaleTime??0,l=t.options.gcTime??e().options.defaultGcTime??3e5;return(()=>{var v=sr(),u=v.firstChild,o=u.nextSibling.nextSibling,n=o.nextSibling.nextSibling;return g(u,()=>Ve(c)),g(o,()=>Ve(a)),g(n,()=>Ve(l)),w(()=>s(v,V(i().ageTicker(c>a)))),v})()}var lr=E("<button type=button>➔");function Ie({to:r,params:e,search:i,router:t}){const c=xe();return(()=>{var a=lr();return a.$$click=l=>{l.stopPropagation(),t().navigate({to:r,params:e,search:i})},le(a,"title",`Navigate to ${r}`),w(()=>s(a,c().navigateButton)),a})()}Ke(["click"]);var dr=E("<button><div>TANSTACK</div><div>TanStack Router v1"),cr=E("<div style=display:flex;align-items:center;width:100%><div style=flex-grow:1;min-width:0>"),ur=E("<code> "),ye=E("<code>"),fr=E("<div><div role=button><div>"),Be=E("<div>"),gr=E("<div><ul>"),vr=E('<div><button><svg xmlns=http://www.w3.org/2000/svg width=10 height=6 fill=none viewBox="0 0 10 6"><path stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=1.667 d="M1 1l4 4 4-4"></path></svg></button><div><div></div><div><div></div></div></div><div><div><div><span>Pathname</span></div><div><code></code></div><div><div><button type=button>Routes</button><button type=button>Matches</button><button type=button>History</button></div><div><div>age / staleTime / gcTime</div></div></div><div>'),hr=E("<div><span>masked"),gt=E("<div role=button><div>"),pr=E("<li><div>"),mr=E("<li>This panel displays the most recent 15 navigations."),$r=E("<div><div><div>Cached Matches</div><div>age / staleTime / gcTime</div></div><div>"),br=E("<div><div>Match Details</div><div><div><div><div></div></div><div><div>ID:</div><div><code></code></div></div><div><div>State:</div><div></div></div><div><div>Last Updated:</div><div></div></div></div></div><div>Explorer</div><div>"),yr=E("<div>Loader Data"),xr=E("<div><div><span>Search Params</span></div><div>"),Cr=E("<span style=margin-left:0.5rem>"),wr=E('<button type=button aria-label="Copy value to clipboard"style=cursor:pointer>'),vt=15;function kr(r){const{className:e,...i}=r,t=xe();return(()=>{var c=dr(),a=c.firstChild,l=a.nextSibling;return ht(c,Je(i,{get class(){return V(t().logo,e?e():"")}}),!1,!0),w(v=>{var u=t().tanstackLogo,o=t().routerLogo;return u!==v.e&&s(a,v.e=u),o!==v.t&&s(l,v.t=o),v},{e:void 0,t:void 0}),c})()}function De(r){return(()=>{var e=cr(),i=e.firstChild;return g(e,()=>r.left,i),g(i,()=>r.children),g(e,()=>r.right,null),w(()=>s(e,r.class)),e})()}function wt({routerState:r,pendingMatches:e,router:i,route:t,isRoot:c,activeId:a,setActiveId:l}){const v=xe(),u=U(()=>e().length?e():r().matches),o=U(()=>r().matches.find(m=>m.routeId===t.id)),n=U(()=>{var m,A;try{if((m=o())!=null&&m.params){const N=(A=o())==null?void 0:A.params,p=t.path||st(t.id);if(p.startsWith("$")){const R=p.slice(1);if(N[R])return`(${N[R]})`}}return""}catch{return""}}),k=U(()=>{if(c||!t.path)return;const m=Object.assign({},...u().map(p=>p.params)),A=Tt(t),N=A?At(t.fullPath,A,m,i().pathParamsDecoder):t.fullPath;return A&&Rt(A,m)?void 0:N});return(()=>{var m=fr(),A=m.firstChild,N=A.firstChild;return A.$$click=()=>{o()&&l(a()===t.id?"":t.id)},g(A,S(De,{get class(){return V(v().routesRow(!!o()))},get left(){return S(It,{get when(){return k()},children:p=>S(Ie,{get to(){return p()},router:i})})},get right(){return S(Ee,{get match(){return o()},router:i})},get children(){return[(()=>{var p=ur(),R=p.firstChild;return g(p,()=>c?be:t.path||st(t.id),R),w(()=>s(p,v().code)),p})(),(()=>{var p=ye();return g(p,n),w(()=>s(p,v().routeParamInfo)),p})()]}}),null),g(m,(()=>{var p=L(()=>{var R;return!!((R=t.children)!=null&&R.length)});return()=>p()?(()=>{var R=Be();return g(R,()=>[...t.children].sort((K,W)=>K.rank-W.rank).map(K=>S(wt,{routerState:r,pendingMatches:e,router:i,route:K,activeId:a,setActiveId:l}))),w(()=>s(R,v().nestedRouteRow(!!c))),R})():null})(),null),w(p=>{var R=`Open match details for ${t.id}`,K=V(v().routesRowContainer(t.id===a(),!!o())),W=V(v().matchIndicator(Ut(u(),t)));return R!==p.e&&le(A,"aria-label",p.e=R),K!==p.t&&s(A,p.t=K),W!==p.a&&s(N,p.a=W),p},{e:void 0,t:void 0,a:void 0}),m})()}var Er=function({...e}){const{isOpen:i=!0,setIsOpen:t,handleDragStart:c,router:a,routerState:l,shadowDOMTarget:v,...u}=e,{onCloseClick:o}=_t(),n=xe(),{className:k,style:m,...A}=u,[N,p]=dt("tanstackRouterDevtoolsActiveTab","routes"),[R,K]=dt("tanstackRouterDevtoolsActiveRouteId",""),[W,Ce]=Q([]),[Re,Me]=Q(!1),O=()=>{const C=l().matches;return C.some(P=>P.status==="pending")?C:[]};let Z=a()._cache,f=[...Z.values()];const[y,j]=Q(f);Te(()=>{const C=()=>{const ee=a()._cache;let q=ee.size!==f.length;if(!q){let ie=0;for(const de of ee.values())if(de!==f[ie++]){q=!0;break}}(ee!==Z||q)&&(Z=ee,f=[...ee.values()],j(f))};C();const P=setInterval(C,500);mt(()=>clearInterval(P))}),Te(()=>{const C=l().matches,P=C[C.length-1];if(!P)return;const ee=Bt(()=>W()),q=ee[0],ie=q&&q.pathname===P.pathname&&JSON.stringify(q.search??{})===JSON.stringify(P.search??{});(!q||!ie)&&(ee.length>=vt&&Me(!0),Ce(de=>{const ge=[P,...de];return ge.splice(vt),ge}))});const b=U(()=>[...O(),...l().matches,...y()].find(C=>C.routeId===R()||C.id===R())),H=U(()=>Dt(l().location.search)),M=U(()=>({...a(),state:l()})),X=U(()=>Object.fromEntries(Wt(Object.keys(M()),["state","routesById","routesByPath","options","manifest"].map(C=>P=>P!==C)).map(C=>[C,M()[C]]).filter(C=>typeof C[1]!="function"&&!["stores","basepath","subscribers","_scroll","tempLocationKey","latestLocation","routeTree","history"].includes(C[0])))),fe=U(()=>{var C;return(C=b())==null?void 0:C.loaderData}),we=U(()=>b()),Y=U(()=>l().location.search);return(()=>{var C=vr(),P=C.firstChild,ee=P.firstChild,q=P.nextSibling,ie=q.firstChild,de=ie.nextSibling,ge=de.firstChild,Pe=q.nextSibling,qe=Pe.firstChild,ke=qe.firstChild;ke.firstChild;var Se=ke.nextSibling,kt=Se.firstChild,Le=Se.nextSibling,Oe=Le.firstChild,_e=Oe.firstChild,Fe=_e.nextSibling,je=Fe.nextSibling,St=Oe.nextSibling,We=Le.nextSibling;return ht(C,Je({get class(){return V(n().devtoolsPanel,"TanStackRouterDevtoolsPanel",k?k():"")},get style(){return m?m():""}},A),!1,!0),g(C,c?(()=>{var d=Be();return Ft(d,"mousedown",c,!0),w(()=>s(d,n().dragHandle)),d})():null,P),P.$$click=d=>{t&&t(!1),o(d)},g(ie,S(kr,{"aria-hidden":!0,onClick:d=>{t&&t(!1),o(d)}})),g(ge,S(se,{label:"Router",value:X,defaultExpanded:{state:{},context:{},options:{}},filterSubEntries:d=>d.filter($=>typeof $.value()!="function")})),g(ke,(()=>{var d=L(()=>!!l().location.maskedLocation);return()=>d()?(()=>{var $=hr(),F=$.firstChild;return w(I=>{var _=n().maskedBadgeContainer,h=n().maskedBadge;return _!==I.e&&s($,I.e=_),h!==I.t&&s(F,I.t=h),I},{e:void 0,t:void 0}),$})():null})(),null),g(kt,()=>l().location.pathname),g(Se,(()=>{var d=L(()=>!!l().location.maskedLocation);return()=>d()?(()=>{var $=ye();return g($,()=>{var F;return(F=l().location.maskedLocation)==null?void 0:F.pathname}),w(()=>s($,n().maskedLocation)),$})():null})(),null),_e.$$click=()=>{p("routes")},Fe.$$click=()=>{p("matches")},je.$$click=()=>{p("history")},g(We,S(Et,{get children(){return[S(He,{get when(){return N()==="routes"},get children(){return S(wt,{routerState:l,pendingMatches:O,router:a,get route(){return a().routeTree},isRoot:!0,activeId:R,setActiveId:K})}}),S(He,{get when(){return N()==="matches"},get children(){var d=Be();return g(d,()=>(O().length?O():l().matches).map(($,F)=>(()=>{var I=gt(),_=I.firstChild;return I.$$click=()=>K(R()===$.id?"":$.id),g(I,S(De,{get left(){return S(Ie,{get to(){return $.pathname},get params(){return $.params},get search(){return $.search},router:a})},get right(){return S(Ee,{match:$,router:a})},get children(){var h=ye();return g(h,()=>`${$.routeId===be?be:$.pathname}`),w(()=>s(h,n().matchID)),h}}),null),w(h=>{var z=`Open match details for ${$.id}`,G=V(n().matchRow($===b())),T=V(n().matchIndicator(Ue($)));return z!==h.e&&le(I,"aria-label",h.e=z),G!==h.t&&s(I,h.t=G),T!==h.a&&s(_,h.a=T),h},{e:void 0,t:void 0,a:void 0}),I})())),d}}),S(He,{get when(){return N()==="history"},get children(){var d=gr(),$=d.firstChild;return g($,S(zt,{get each(){return W()},children:(F,I)=>(()=>{var _=pr(),h=_.firstChild;return g(_,S(De,{get left(){return S(Ie,{get to(){return F.pathname},get params(){return F.params},get search(){return F.search},router:a})},get right(){return S(Ee,{match:F,router:a})},get children(){var z=ye();return g(z,()=>`${F.routeId===be?be:F.pathname}`),w(()=>s(z,n().matchID)),z}}),null),w(z=>{var G=V(n().matchRow(F===b())),T=V(n().matchIndicator(I()===0?"green":"gray"));return G!==z.e&&s(_,z.e=G),T!==z.t&&s(h,z.t=T),z},{e:void 0,t:void 0}),_})()}),null),g($,(()=>{var F=L(()=>!!Re());return()=>F()?(()=>{var I=mr();return w(()=>s(I,n().historyOverflowContainer)),I})():null})(),null),d}})]}})),g(Pe,(()=>{var d=L(()=>!!y().length);return()=>d()?(()=>{var $=$r(),F=$.firstChild,I=F.firstChild.nextSibling,_=F.nextSibling;return g(_,()=>y().map(h=>(()=>{var z=gt(),G=z.firstChild;return z.$$click=()=>K(R()===h.id?"":h.id),g(z,S(De,{get left(){return S(Ie,{get to(){return h.pathname},get params(){return h.params},get search(){return h.search},router:a})},get right(){return S(Ee,{match:h,router:a})},get children(){var T=ye();return g(T,()=>`${h.id}`),w(()=>s(T,n().matchID)),T}}),null),w(T=>{var oe=`Open match details for ${h.id}`,te=V(n().matchRow(h===b())),re=V(n().matchIndicator(Ue(h)));return oe!==T.e&&le(z,"aria-label",T.e=oe),te!==T.t&&s(z,T.t=te),re!==T.a&&s(G,T.a=re),T},{e:void 0,t:void 0,a:void 0}),z})())),w(h=>{var z=n().cachedMatchesContainer,G=n().detailsHeader,T=n().detailsHeaderInfo;return z!==h.e&&s($,h.e=z),G!==h.t&&s(F,h.t=G),T!==h.a&&s(I,h.a=T),h},{e:void 0,t:void 0,a:void 0}),$})():null})(),null),g(C,(()=>{var d=L(()=>{var $;return!!(b()&&(($=b())!=null&&$.status))});return()=>d()?(()=>{var $=br(),F=$.firstChild,I=F.nextSibling,_=I.firstChild,h=_.firstChild,z=h.firstChild,G=h.nextSibling,T=G.firstChild.nextSibling,oe=T.firstChild,te=G.nextSibling,re=te.firstChild.nextSibling,ve=te.nextSibling,he=ve.firstChild.nextSibling,ce=I.nextSibling,pe=ce.nextSibling;return g(z,(()=>{var x=L(()=>{var B,J;return!!(((B=b())==null?void 0:B.status)==="success"&&((J=b())!=null&&J.isFetching))});return()=>{var B;return x()?"fetching":(B=b())==null?void 0:B.status}})()),g(oe,()=>{var x;return(x=b())==null?void 0:x.id}),g(re,(()=>{var x=L(()=>!!O().find(B=>{var J;return B.id===((J=b())==null?void 0:J.id)}));return()=>x()?"Pending":l().matches.find(B=>{var J;return B.id===((J=b())==null?void 0:J.id)})?"Active":"Cached"})()),g(he,(()=>{var x=L(()=>{var B;return!!((B=b())!=null&&B.updatedAt)});return()=>{var B;return x()?new Date((B=b())==null?void 0:B.updatedAt).toLocaleTimeString():"N/A"}})()),g($,(()=>{var x=L(()=>!!fe());return()=>x()?[(()=>{var B=yr();return w(()=>s(B,n().detailsHeader)),B})(),(()=>{var B=Be();return g(B,S(se,{label:"loaderData",value:fe,defaultExpanded:{}})),w(()=>s(B,n().detailsContent)),B})()]:null})(),ce),g(pe,S(se,{label:"Match",value:we,defaultExpanded:{}})),w(x=>{var ot,at;var B=n().thirdContainer,J=n().detailsHeader,me=n().matchDetails,$e=n().matchStatus((ot=b())==null?void 0:ot.status,(at=b())==null?void 0:at.isFetching),Ze=n().matchDetailsInfoLabel,Qe=n().matchDetailsInfo,Xe=n().matchDetailsInfoLabel,et=n().matchDetailsInfo,tt=n().matchDetailsInfoLabel,rt=n().matchDetailsInfo,nt=n().detailsHeader,it=n().detailsContent;return B!==x.e&&s($,x.e=B),J!==x.t&&s(F,x.t=J),me!==x.a&&s(_,x.a=me),$e!==x.o&&s(h,x.o=$e),Ze!==x.i&&s(G,x.i=Ze),Qe!==x.n&&s(T,x.n=Qe),Xe!==x.s&&s(te,x.s=Xe),et!==x.h&&s(re,x.h=et),tt!==x.r&&s(ve,x.r=tt),rt!==x.d&&s(he,x.d=rt),nt!==x.l&&s(ce,x.l=nt),it!==x.u&&s(pe,x.u=it),x},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0}),$})():null})(),null),g(C,(()=>{var d=L(()=>!!H());return()=>d()?(()=>{var $=xr(),F=$.firstChild;F.firstChild;var I=F.nextSibling;return g(F,typeof navigator<"u"?(()=>{var _=Cr();return g(_,S(Sr,{getValue:()=>{const h=l().location.search;return JSON.stringify(h)}})),_})():null,null),g(I,S(se,{value:Y,get defaultExpanded(){return Object.keys(l().location.search).reduce((_,h)=>(_[h]={},_),{})}})),w(_=>{var h=n().fourthContainer,z=n().detailsHeader,G=n().detailsContent;return h!==_.e&&s($,_.e=h),z!==_.t&&s(F,_.t=z),G!==_.a&&s(I,_.a=G),_},{e:void 0,t:void 0,a:void 0}),$})():null})(),null),w(d=>{var $=n().panelCloseBtn,F=n().panelCloseBtnIcon,I=n().firstContainer,_=n().row,h=n().routerExplorerContainer,z=n().routerExplorer,G=n().secondContainer,T=n().matchesContainer,oe=n().detailsHeader,te=n().detailsContent,re=n().detailsHeader,ve=n().routeMatchesToggle,he=N()==="routes",ce=V(n().routeMatchesToggleBtn(N()==="routes",!0)),pe=N()==="matches",x=V(n().routeMatchesToggleBtn(N()==="matches",!0)),B=N()==="history",J=V(n().routeMatchesToggleBtn(N()==="history",!1)),me=n().detailsHeaderInfo,$e=V(n().routesContainer);return $!==d.e&&s(P,d.e=$),F!==d.t&&le(ee,"class",d.t=F),I!==d.a&&s(q,d.a=I),_!==d.o&&s(ie,d.o=_),h!==d.i&&s(de,d.i=h),z!==d.n&&s(ge,d.n=z),G!==d.s&&s(Pe,d.s=G),T!==d.h&&s(qe,d.h=T),oe!==d.r&&s(ke,d.r=oe),te!==d.d&&s(Se,d.d=te),re!==d.l&&s(Le,d.l=re),ve!==d.u&&s(Oe,d.u=ve),he!==d.c&&(_e.disabled=d.c=he),ce!==d.w&&s(_e,d.w=ce),pe!==d.m&&(Fe.disabled=d.m=pe),x!==d.f&&s(Fe,d.f=x),B!==d.y&&(je.disabled=d.y=B),J!==d.g&&s(je,d.g=J),me!==d.p&&s(St,d.p=me),$e!==d.b&&s(We,d.b=$e),d},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0}),C})()};function Sr({getValue:r}){const[e,i]=Q(!1);let t=null;const c=async()=>{var a;if(typeof navigator>"u"||!((a=navigator.clipboard)!=null&&a.writeText)){console.warn("TanStack Router Devtools: Clipboard API unavailable");return}try{const l=r();await navigator.clipboard.writeText(l),i(!0),t&&clearTimeout(t),t=setTimeout(()=>i(!1),2500)}catch(l){console.error("TanStack Router Devtools: Failed to copy",l)}};return mt(()=>{t&&clearTimeout(t)}),(()=>{var a=wr();return a.$$click=c,g(a,()=>e()?"✅":"📋"),w(()=>le(a,"title",e()?"Copied!":"Copy")),a})()}Ke(["click","mousedown"]);export{Er as BaseTanStackRouterDevtoolsPanel,Er as default,dt as n,xe as r,zr as t};
@@ -0,0 +1 @@
1
+ import{gx as v,gy as fe,g6 as be,gz as Ce,j as e,fX as ee,fY as ne,fZ as te,f_ as se,gA as Ne,f$ as ae,gB as ie,g0 as re,g1 as ce,g2 as oe,a1 as de,a3 as Ie,a4 as Te,a2 as Ae,y as le,gC as Se,r as A,gD as he,dW as g,dP as S,dQ as k,dR as R,dS as F,dT as b,gE as ke,gF as Re,$ as E,_ as pe,ar as Fe,gG as Oe,gH as we,cu as Me,cx as De,cy as Ee,cA as Be,cB as $e,cC as _e,ak as Le,I as Pe,gI as J,B,da as ze,gJ as He,em as qe,gK as Ge,x as Ye}from"./index-C8-dwIPp.js";import{B as Ke}from"./use-bindings-Ds_MAC67.js";import{u as Qe}from"./form-lSBktWDn.js";import{u as We}from"./use-adapter-catalog-RzlxX2Wa.js";import{I as Ue,t as Ve}from"./trust-posture-Dmk2WlZv.js";function X(n){return`Turn on ${be(n.stop)}`}function Je(n){return!v(n)||fe(n)?null:"This stop never pauses to ask. It acts without checking with you."}function Xe({descriptor:n,consequence:i,onCancel:o,onConfirm:h}){const d=Ce(n??void 0),y=n?Je(n):null;return e.jsx(ee,{open:n!==null,onOpenChange:C=>!C&&o(),children:e.jsxs(ne,{children:[e.jsxs(te,{children:[e.jsxs(se,{className:"flex items-center gap-2",children:[e.jsx(Ne,{descriptor:n??void 0,className:`size-4 ${d}`}),n&&X(n)]}),e.jsxs(ae,{children:[n==null?void 0:n.promise,y&&" ",y&&e.jsx("span",{className:"text-foreground mt-2 block","data-testid":"consent-asks-note",children:y})]})]}),e.jsx("div",{className:"text-muted-foreground space-y-2 text-sm",children:i}),n&&e.jsx(ie,{mode:n.id,descriptor:n}),e.jsxs(re,{children:[e.jsx(ce,{children:"Cancel"}),e.jsx(oe,{onClick:h,children:n&&X(n)})]})]})})}function ln(n={}){const i=de(),o=Ie();return Te({mutationFn:h=>i.createBinding(h),onSuccess:()=>{o.invalidateQueries({queryKey:[...Ke]})},meta:n.suppressErrorToast?{suppressErrorToast:!0}:{errorLabel:n.errorLabel??"Couldn’t add that connection"}})}function Ze(n){const i=de();return Ae({queryKey:["relay","observed-chats",n],queryFn:()=>i.getObservedChats(n),enabled:!!n,staleTime:3e4})}const Z=[{value:"per-chat",label:"One shared chat per group or channel",description:"Everyone there shares one chat with the agent."},{value:"per-user",label:"One chat per person",description:"Each person gets their own chat, even in a group."},{value:"stateless",label:"A fresh start every message",description:"Nothing carries over from the message before."}],G="claude-code";function ve({strategy:n,onStrategyChange:i,permissionMode:o,onPermissionModeChange:h,canInitiate:d,onCanInitiateChange:y,canReply:C,onCanReplyChange:O,canReceive:w,onCanReceiveChange:M,notifyOnTaskComplete:$,onNotifyOnTaskCompleteChange:_,notifyBootstrapHint:p,bridged:L,open:P,onOpenChange:z,hasChanges:H}){const u=Z.find(l=>l.value===n),j=le(G),c=(j==null?void 0:j.permissionModes.values)??[],r=c.find(l=>l.id===o),D=(r==null?void 0:r.label)??Se(o),[f,I]=A.useState(null);function q(l){const N=c.find(T=>T.id===l);if(N&&v(N)){I(N);return}h(l)}return e.jsxs(e.Fragment,{children:[e.jsxs(he,{open:P,onOpenChange:z,trigger:"Advanced",badge:H?e.jsx(pe,{variant:"secondary",children:"Modified"}):void 0,children:[L?e.jsxs("div",{className:"space-y-1.5 px-4 py-3",children:[e.jsx(g,{children:"How the agent remembers"}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Kept in the channel this chat is linked to."})]}):e.jsxs("div",{className:"space-y-1.5 px-4 py-3",children:[e.jsx(g,{htmlFor:"binding-session-strategy",children:"How the agent remembers"}),e.jsxs(S,{value:n,onValueChange:l=>i(l),children:[e.jsx(k,{id:"binding-session-strategy",className:"w-full",children:e.jsx(R,{})}),e.jsx(F,{children:Z.map(l=>e.jsx(b,{value:l.value,children:l.label},l.value))})]}),u&&e.jsx("p",{className:"text-muted-foreground text-xs",children:u.description})]}),e.jsxs("div",{className:"space-y-2 px-4 py-3",children:[e.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:"Permissions"}),c.length===0?e.jsxs("p",{"data-testid":"trust-dial-unavailable",className:"text-muted-foreground px-1 text-xs leading-relaxed",children:["Set to “",D,"”. No other levels to choose yet. Saving keeps it."]}):e.jsxs(e.Fragment,{children:[e.jsx(ke,{mode:o,descriptors:c,onChangeMode:q,strandsWorkingMode:!0,strandedNote:e.jsxs(e.Fragment,{children:["Set to “",D,"”. Saving keeps it, or pick a stop."]})}),e.jsx(ie,{mode:o,...r?{descriptor:r}:{},className:"px-1"})]})]}),e.jsxs("div",{className:"space-y-2.5 px-4 py-3",children:[e.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:"Message direction"}),e.jsxs("div",{className:"flex cursor-pointer items-center justify-between gap-3",children:[e.jsxs(g,{htmlFor:"perm-initiate",className:"flex cursor-pointer items-center gap-1.5 text-xs font-normal",children:[e.jsx(Re,{className:"text-muted-foreground size-3"}),"Agent can message first"]}),e.jsx(E,{id:"perm-initiate",checked:d,onCheckedChange:y,"aria-label":"Agent can message first"})]}),e.jsxs("div",{className:"flex cursor-pointer items-center justify-between gap-3",children:[e.jsx(g,{htmlFor:"perm-reply",className:"cursor-pointer text-xs font-normal",children:"Agent can reply to messages"}),e.jsx(E,{id:"perm-reply",checked:C,onCheckedChange:O,"aria-label":"Agent can reply to messages"})]}),e.jsxs("div",{className:"flex cursor-pointer items-center justify-between gap-3",children:[e.jsx(g,{htmlFor:"perm-receive",className:"cursor-pointer text-xs font-normal",children:"Agent receives new messages"}),e.jsx(E,{id:"perm-receive",checked:w,onCheckedChange:M,"aria-label":"Agent receives new messages"})]})]}),e.jsxs("div",{className:"space-y-2.5 px-4 py-3",children:[e.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:"Notifications"}),e.jsxs("div",{className:"flex cursor-pointer items-center justify-between gap-3",children:[e.jsx(g,{htmlFor:"notify-task-complete",className:"cursor-pointer text-xs font-normal",children:"Message me when scheduled tasks finish"}),e.jsx(E,{id:"notify-task-complete",checked:$,onCheckedChange:_,"aria-label":"Message me when scheduled tasks finish"})]}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"When off, you still hear about runs that didn’t finish."}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Needs “Agent can message first”."}),p&&e.jsx("p",{className:"text-muted-foreground text-xs",children:"Message your bot once to start. Bots can’t write first."})]})]}),e.jsx(Xe,{descriptor:f,consequence:e.jsxs(e.Fragment,{children:["Anyone who can message this connection can make the agent act, with no one asked."," ",e.jsxs(Ue,{label:"About asking in the chat",title:"At a stop that asks",children:[e.jsx("p",{children:"Where your connection can show buttons, the agent waits for Approve or Deny."}),e.jsx("p",{children:"Only people on the approver list can answer."}),e.jsx("p",{children:"An ask nobody answers is refused after 10 minutes, and the agent carries on."})]})]}),onCancel:()=>I(null),onConfirm:()=>{f&&h(f.id),I(null)}})]})}const m="__any__",en={"per-chat":"One shared chat per group or channel","per-user":"One chat for each person",stateless:"No memory between messages"},me=[{value:"dm",label:"Direct message"},{value:"group",label:"Group"},{value:"channel",label:"Broadcast channel"},{value:"thread",label:"Thread"}];function ge(n){var i;return((i=me.find(o=>o.value===n))==null?void 0:i.label)??n}function nn({sessionStrategy:n,chatDisplayName:i,channelType:o}){const h=en[n];return i?`${h} in ${i}`:o?`${h} · ${ge(o)}`:h}function hn(n){return{adapterId:n.adapterId,agentId:n.agentId,sessionStrategy:n.sessionStrategy,label:n.label,permissionMode:n.permissionMode,chatId:n.chatId,channelType:n.channelType,canInitiate:n.canInitiate,canReply:n.canReply,canReceive:n.canReceive,notifyOnTaskComplete:n.notifyOnTaskComplete}}function pn(n){return{sessionStrategy:n.sessionStrategy,label:n.label,permissionMode:n.permissionMode,chatId:n.chatId??null,channelType:n.channelType??null,canInitiate:n.canInitiate,canReply:n.canReply,canReceive:n.canReceive,notifyOnTaskComplete:n.notifyOnTaskComplete}}function tn(n){return!!(n!=null&&n.canInitiate||(n==null?void 0:n.canReply)===!1||(n==null?void 0:n.canReceive)===!1||(n==null?void 0:n.notifyOnTaskComplete)===!1||(n==null?void 0:n.permissionMode)!==void 0&&n.permissionMode!=="acceptEdits"||n!=null&&n.sessionStrategy&&n.sessionStrategy!=="per-chat")}function sn(n,i){return{adapterId:(n==null?void 0:n.adapterId)??"",agentId:(n==null?void 0:n.agentId)??"",strategy:(n==null?void 0:n.sessionStrategy)??"per-chat",label:(n==null?void 0:n.label)??"",chatId:(n==null?void 0:n.chatId)??m,channelType:(n==null?void 0:n.channelType)??m,permissionMode:(n==null?void 0:n.permissionMode)??(i==null?void 0:i.defaultPermissionMode)??"acceptEdits",canInitiate:(n==null?void 0:n.canInitiate)??(i==null?void 0:i.defaultCanInitiate)??!1,canReply:(n==null?void 0:n.canReply)??!0,canReceive:(n==null?void 0:n.canReceive)??!0,notifyOnTaskComplete:(n==null?void 0:n.notifyOnTaskComplete)??!0}}function mn({open:n,onOpenChange:i,onConfirm:o,mode:h,initialValues:d,adapterName:y,agentName:C,onDelete:O,bindingId:w,isPending:M,bridged:$,bridgeSlot:_}){const p=h==="edit",[L,P]=A.useState(()=>!!(d!=null&&d.chatId||d!=null&&d.channelType)),[z,H]=A.useState(()=>tn(d)),{data:u}=Fe(),j=le(G),[c]=A.useState(()=>{var t;return sn(d,p?void 0:{defaultPermissionMode:Oe(we(u==null?void 0:u.executionDefaults,G),(j==null?void 0:j.permissionModes.values)??[]),defaultCanInitiate:u!=null&&Ve((t=u.permissions)==null?void 0:t.preset)==="trusted"})}),r=Qe({defaultValues:c,onSubmit:async({value:t})=>{await o({adapterId:t.adapterId,agentId:t.agentId,sessionStrategy:t.strategy,label:t.label,permissionMode:t.permissionMode,chatId:t.chatId===m?void 0:t.chatId,channelType:t.channelType===m?void 0:t.channelType,canInitiate:t.canInitiate,canReply:t.canReply,canReceive:t.canReceive,notifyOnTaskComplete:t.notifyOnTaskComplete}),p||r.reset()}}),{data:D=[]}=We(),{data:f}=Me(),[I,q]=A.useState(()=>(d==null?void 0:d.adapterId)??""),{data:l=[]}=Ze(I||void 0),N=D.flatMap(t=>t.instances.filter(x=>x.enabled).map(x=>({id:x.id,label:x.label?`${x.label} (${t.manifest.displayName})`:`${x.id} (${t.manifest.displayName})`}))),T=(f==null?void 0:f.agents)??[];function xe(){r.setFieldValue("chatId",m),r.setFieldValue("channelType",m)}return e.jsx(De,{open:n,onOpenChange:i,children:e.jsxs(Ee,{className:"max-h-[85vh] max-w-md gap-0 p-0",children:[e.jsxs(Be,{className:"border-b px-4 py-3",children:[e.jsx($e,{children:p?"Edit connection":"Add connection"}),e.jsx(_e,{className:"sr-only",children:p?"Edit this connection’s settings":"Connect this agent to a chat"})]}),e.jsx(r.Subscribe,{selector:t=>({values:t.values,isSubmitting:t.isSubmitting}),children:({values:t,isSubmitting:x})=>{var V;const Y=p||!!t.adapterId&&!!t.agentId,ue=!p||t.adapterId!==c.adapterId||t.agentId!==c.agentId||t.strategy!==c.strategy||t.label!==c.label||t.chatId!==c.chatId||t.channelType!==c.channelType||t.permissionMode!==c.permissionMode||t.canInitiate!==c.canInitiate||t.canReply!==c.canReply||t.canReceive!==c.canReceive||t.notifyOnTaskComplete!==c.notifyOnTaskComplete,K=p?C:(V=T.find(s=>s.id===t.agentId))==null?void 0:V.name,Q=Y&&K?`${nn({sessionStrategy:t.strategy,chatDisplayName:t.chatId!==m?`#${t.chatId}`:void 0,channelType:t.channelType!==m?t.channelType:void 0})}. Routed to ${K}.`:null,W=t.chatId!==m||t.channelType!==m,ye=t.strategy!=="per-chat"||t.permissionMode!=="acceptEdits"||t.canInitiate||!t.canReply||!t.canReceive||!t.notifyOnTaskComplete,je=!Y||!ue||!!M||x,U=!!M||x;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-5 overflow-y-auto px-4 py-5",children:[p?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Connection:"," ",e.jsx("span",{className:"text-foreground font-medium",children:y})," →"," ",e.jsx("span",{className:"text-foreground font-medium",children:C})]}),_]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(g,{htmlFor:"binding-adapter",children:"Source"}),N.length===0?e.jsx("p",{className:"text-muted-foreground border-input rounded-md border px-3 py-2 text-sm opacity-50",children:"Nothing set up yet"}):e.jsx(r.AppField,{name:"adapterId",children:s=>e.jsxs(S,{value:s.state.value,onValueChange:a=>{s.handleChange(a),q(a)},children:[e.jsx(k,{id:"binding-adapter",className:"w-full",children:e.jsx(R,{placeholder:"Pick a source"})}),e.jsx(F,{children:N.map(a=>e.jsx(b,{value:a.id,children:a.label},a.id))})]})})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(g,{htmlFor:"binding-agent",children:"Agent"}),T.length===0?e.jsx("p",{className:"text-muted-foreground border-input rounded-md border px-3 py-2 text-sm opacity-50",children:"No agents yet"}):e.jsx(r.AppField,{name:"agentId",children:s=>e.jsxs(S,{value:s.state.value,onValueChange:s.handleChange,children:[e.jsx(k,{id:"binding-agent",className:"w-full",children:e.jsx(R,{placeholder:"Select an agent"})}),e.jsx(F,{children:T.map(a=>e.jsx(b,{value:a.id,children:Le(a)},a.id))})]})})]})]}),e.jsx(r.AppField,{name:"label",children:s=>e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(g,{htmlFor:"binding-label",children:"Label (optional)"}),e.jsx(Pe,{id:"binding-label",placeholder:"e.g., Customer support bot",value:s.state.value,onBlur:s.handleBlur,onChange:a=>s.handleChange(a.target.value)}),e.jsx(J,{children:"A name to tell this connection apart"})]})}),e.jsxs(he,{open:L,onOpenChange:P,trigger:"Chat filter",badge:W?e.jsx(pe,{variant:"secondary",children:"Active"}):void 0,children:[e.jsx(r.AppField,{name:"chatId",children:s=>e.jsxs("div",{className:"space-y-1.5 px-4 py-3",children:[e.jsx(g,{htmlFor:"binding-chat-id",children:"Chat ID"}),e.jsxs(S,{value:s.state.value,onValueChange:s.handleChange,children:[e.jsx(k,{id:"binding-chat-id",className:"w-full",children:e.jsx(R,{placeholder:"Any chat"})}),e.jsxs(F,{children:[e.jsx(b,{value:m,children:"Any chat"}),l.map(a=>e.jsxs(b,{value:a.chatId,children:[e.jsx("span",{children:a.displayName??a.chatId}),(a.channelType||a.messageCount>0)&&e.jsx("span",{className:"text-muted-foreground ml-2 text-xs",children:[a.channelType?ge(a.channelType):null,`${a.messageCount} messages`].filter(Boolean).join(" · ")})]},a.chatId))]})]}),e.jsx(J,{children:"Only take messages from this chat"})]})}),e.jsx(r.AppField,{name:"channelType",children:s=>e.jsxs("div",{className:"space-y-1.5 px-4 py-3",children:[e.jsx(g,{htmlFor:"binding-channel-type",children:"Chat type"}),e.jsxs(S,{value:s.state.value,onValueChange:s.handleChange,children:[e.jsx(k,{id:"binding-channel-type",className:"w-full",children:e.jsx(R,{placeholder:"Any type"})}),e.jsxs(F,{children:[e.jsx(b,{value:m,children:"Any type"}),me.map(a=>e.jsx(b,{value:a.value,children:a.label},a.value))]})]})]})}),W&&e.jsx("div",{className:"px-4 py-3",children:e.jsx(B,{variant:"ghost",size:"sm",onClick:xe,children:"Clear filters"})})]}),e.jsx(ve,{strategy:t.strategy,onStrategyChange:s=>r.setFieldValue("strategy",s),permissionMode:t.permissionMode,onPermissionModeChange:s=>r.setFieldValue("permissionMode",s),canInitiate:t.canInitiate,onCanInitiateChange:s=>r.setFieldValue("canInitiate",s),canReply:t.canReply,onCanReplyChange:s=>r.setFieldValue("canReply",s),canReceive:t.canReceive,onCanReceiveChange:s=>r.setFieldValue("canReceive",s),notifyOnTaskComplete:t.notifyOnTaskComplete,onNotifyOnTaskCompleteChange:s=>r.setFieldValue("notifyOnTaskComplete",s),notifyBootstrapHint:l.length===0,bridged:$,open:z,onOpenChange:H,hasChanges:ye}),Q&&e.jsx("p",{className:"text-muted-foreground bg-muted/50 rounded-md px-3 py-2 text-xs italic",children:Q})]}),e.jsxs(ze,{className:"border-t px-4 py-3",children:[p&&O&&w&&e.jsxs(ee,{children:[e.jsx(He,{asChild:!0,children:e.jsxs(B,{variant:"ghost",size:"sm",className:"mr-auto text-red-600 hover:bg-red-50 hover:text-red-700 dark:hover:bg-red-950",children:[e.jsx(qe,{className:"mr-1.5 size-3.5"}),"Remove"]})}),e.jsxs(ne,{children:[e.jsxs(te,{children:[e.jsx(se,{children:"Remove this connection?"}),e.jsx(ae,{children:"This agent stops getting messages from it."})]}),e.jsxs(re,{children:[e.jsx(ce,{children:"Cancel"}),e.jsx(oe,{onClick:()=>O(w),className:Ge({variant:"destructive"}),children:"Remove connection"})]})]})]}),e.jsx(B,{variant:"ghost",size:"sm",onClick:()=>i(!1),children:"Cancel"}),e.jsxs(B,{size:"sm",onClick:()=>r.handleSubmit(),disabled:je,children:[U&&e.jsx(Ye,{size:"xs",className:"mr-1.5"}),U?"Saving…":p?"Save changes":"Add connection"]})]})]})}})]})})}export{mn as B,ln as a,nn as b,hn as c,ge as d,pn as t,Ze as u};
@@ -1,4 +1,4 @@
1
- var qy=Object.defineProperty;var Em=r=>{throw TypeError(r)};var _y=(r,e,t)=>e in r?qy(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var we=(r,e,t)=>_y(r,typeof e!="symbol"?e+"":e,t),Du=(r,e,t)=>e.has(r)||Em("Cannot "+t);var C=(r,e,t)=>(Du(r,e,"read from private field"),t?t.call(r):e.get(r)),P=(r,e,t)=>e.has(r)?Em("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),I=(r,e,t,n)=>(Du(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),mi=(r,e,t)=>(Du(r,e,"access private method"),t);import{oE as Dm,oF as $y,oG as jy,oH as Rd,oI as Vy,oJ as Wy,oK as Uy,r as B,hV as z4,e7 as Fl,oL as Od,oM as Id,oN as no,oO as Rm,oP as Ky,oQ as Gy,oR as qr,oS as Kh,oT as Xi,eq as Jy,oU as g0,oV as wr,oW as Yy,oX as Xy,oY as Om,oZ as Ys,o_ as Zy,o$ as y0,j as L,b1 as Qy,Q as e7}from"./index-CMaIfS_G.js";import{aw as t7,ax as r7,ab as n7,ac as i7,ad as o7,ae as s7,af as a7,ag as L4,ah as l7,q as q0,ai as c7,aj as B4,ar as u7,ak as d7,al as h7,am as f7,an as p7,ao as m7,ap as g7,aq as y7,Z as Gh,a4 as v7,a5 as P4,a6 as b7,a7 as w7,a8 as x7,a9 as k7,aa as S7,E as na,as as C7,t as nt,at as M7,n as T7,C as Im}from"./index-Bw9sMeWJ.js";const A7={}.hasOwnProperty;function F4(r,e){let t=-1,n;if(e.extensions)for(;++t<e.extensions.length;)F4(r,e.extensions[t]);for(n in e)if(A7.call(e,n))switch(n){case"extensions":break;case"unsafe":{zm(r[n],e[n]);break}case"join":{zm(r[n],e[n]);break}case"handlers":{N7(r[n],e[n]);break}default:r.options[n]=e[n]}return r}function zm(r,e){e&&r.push(...e)}function N7(r,e){e&&Object.assign(r,e)}const E7=[D7];function D7(r,e,t,n){if(e.type==="code"&&Dm(e,n)&&(r.type==="list"||r.type===e.type&&Dm(r,n)))return!1;if("spread"in t&&typeof t.spread=="boolean")return r.type==="paragraph"&&(r.type===e.type||e.type==="definition"||e.type==="heading"&&$y(e,n))?void 0:t.spread?1:0}const gi=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],R7=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
1
+ var qy=Object.defineProperty;var Em=r=>{throw TypeError(r)};var _y=(r,e,t)=>e in r?qy(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var we=(r,e,t)=>_y(r,typeof e!="symbol"?e+"":e,t),Du=(r,e,t)=>e.has(r)||Em("Cannot "+t);var C=(r,e,t)=>(Du(r,e,"read from private field"),t?t.call(r):e.get(r)),P=(r,e,t)=>e.has(r)?Em("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),I=(r,e,t,n)=>(Du(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),mi=(r,e,t)=>(Du(r,e,"access private method"),t);import{oI as Dm,oJ as $y,oK as jy,oL as Rd,oM as Vy,oN as Wy,oO as Uy,r as B,hX as z4,d_ as Fl,oP as Od,oQ as Id,oR as no,oS as Rm,oT as Ky,oU as Gy,oV as qr,oW as Kh,oX as Xi,eh as Jy,oY as g0,oZ as wr,o_ as Yy,o$ as Xy,p0 as Om,p1 as Ys,p2 as Zy,p3 as y0,j as L,gn as Qy,G as e7}from"./index-C8-dwIPp.js";import{aw as t7,ax as r7,ab as n7,ac as i7,ad as o7,ae as s7,af as a7,ag as L4,ah as l7,q as q0,ai as c7,aj as B4,ar as u7,ak as d7,al as h7,am as f7,an as p7,ao as m7,ap as g7,aq as y7,Z as Gh,a4 as v7,a5 as P4,a6 as b7,a7 as w7,a8 as x7,a9 as k7,aa as S7,E as na,as as C7,t as nt,at as M7,n as T7,C as Im}from"./index-gbNK9zj5.js";const A7={}.hasOwnProperty;function F4(r,e){let t=-1,n;if(e.extensions)for(;++t<e.extensions.length;)F4(r,e.extensions[t]);for(n in e)if(A7.call(e,n))switch(n){case"extensions":break;case"unsafe":{zm(r[n],e[n]);break}case"join":{zm(r[n],e[n]);break}case"handlers":{N7(r[n],e[n]);break}default:r.options[n]=e[n]}return r}function zm(r,e){e&&r.push(...e)}function N7(r,e){e&&Object.assign(r,e)}const E7=[D7];function D7(r,e,t,n){if(e.type==="code"&&Dm(e,n)&&(r.type==="list"||r.type===e.type&&Dm(r,n)))return!1;if("spread"in t&&typeof t.spread=="boolean")return r.type==="paragraph"&&(r.type===e.type||e.type==="definition"||e.type==="heading"&&$y(e,n))?void 0:t.spread?1:0}const gi=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],R7=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
2
2
  `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:gi},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
3
3
  ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:gi},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
4
4
  *])`},{character:"*",inConstruct:"phrasing",notInConstruct:gi},{atBreak:!0,character:"+",after:`(?:[ \r
@@ -1,15 +1,15 @@
1
- import{eq as Ee,a8 as xe,b0 as Re,r as ve,a9 as Se,j,Q as Ce}from"./index-CMaIfS_G.js";import{u as Oe}from"./index-obbYyK_q.js";import{r as Te}from"./use-session-canvas-CAxswuAf.js";import"./rotate-cw-CdW7VTvV.js";import"./WidgetErrorCard-BeQ2x8Ar.js";import"./card-BaRHWQF1.js";import"./progress--zm5Rh4c.js";import"./markdown-content-irJMN3oI.js";import"./table-CK_OyzSy.js";import"./terminal-CqyyqODz.js";import"./package-DzrvXxqm.js";import"./heart-BwQb2EFQ.js";import"./git-branch-DPgttvPa.js";import"./file-text-CwK7EV60.js";import"./file-D3iv2i0G.js";import"./McpAppFrame-BQxyYB23.js";import"./more-details-CwkthrCT.js";var he={exports:{}};/* @license
1
+ import{eh as Ee,a1 as xe,aV as Re,r as ve,a2 as Se,j,G as Ce}from"./index-C8-dwIPp.js";import{u as Oe}from"./index-CeZ13dpH.js";import{r as Te}from"./use-session-canvas-CUvHGgMf.js";import"./rotate-cw-DD2nOAQ-.js";import"./WidgetErrorCard-CT4sl_T6.js";import"./card-B_zeSZiU.js";import"./progress-Cvnh4Qcr.js";import"./markdown-content-GoymYcRL.js";import"./table-Rll_Jxd8.js";import"./terminal-Bjss9oke.js";import"./package-DM7e-GVa.js";import"./heart-BSVjeGLA.js";import"./git-branch-CKlZ81Bg.js";import"./file-text-BTj3WyHS.js";import"./file-Bwo21EVR.js";import"./McpAppFrame-D5Muf5Sf.js";import"./more-details-3dDtVYc6.js";var he={exports:{}};/* @license
2
2
  Papa Parse
3
3
  v5.7.0
4
4
  https://github.com/mholt/PapaParse
5
5
  License: MIT
6
- */var Ie=he.exports,ke;function Ae(){return ke||(ke=1,(function(H,X){((J,m)=>{H.exports=m()})(Ie,function J(){var m=typeof self<"u"?self:typeof window<"u"?window:m!==void 0?m:{},C=!m.document&&!!m.postMessage,N=m.IS_PAPA_WORKER||!1,G={},Y=0,o={};function P(t){return t.charCodeAt(0)===65279?t.slice(1):t}function z(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var r=de(e);r.chunkSize=parseInt(r.chunkSize),e.step||e.chunk||(r.chunkSize=null),this._handle=new pe(r),(this._handle.streamer=this)._config=r}).call(this,t),this.parseChunk=function(e,r){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<s){let g=this._config.newline;g||(i=this._config.quoteChar||'"',g=this._handle.guessLineEndings(e,i)),e=[...e.split(g).slice(s)].join(g)}this.isFirstChunk&&E(this._config.beforeFirstChunk)&&(i=this._config.beforeFirstChunk(e))!==void 0&&(e=i),this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e,i=(this._partialLine="",this._handle.parse(s,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=i.meta.cursor,s=(this._finished||(this._partialLine=s.substring(e-this._baseIndex),this._baseIndex=e),i&&i.data&&(this._rowCount+=i.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),N)m.postMessage({results:i,workerId:o.WORKER_ID,finished:s});else if(E(this._config.chunk)&&!r){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=i=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!s||!E(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||i&&i.meta.paused||this._nextChunk(),i}this._halted=!0},this._sendError=function(e){E(this._config.error)?this._config.error(e):N&&this._config.error&&m.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function re(t){var e;(t=t||{}).chunkSize||(t.chunkSize=o.RemoteChunkSize),z.call(this,t),this._nextChunk=C?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(r){this._input=r,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),C||(e.onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)),e.ontimeout=$(this._chunkTimeout,this),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!C),this._config.downloadTimeout&&!C&&(e.timeout=this._config.downloadTimeout),this._config.downloadRequestHeaders){var r,s=this._config.downloadRequestHeaders;for(r in s)e.setRequestHeader(r,s[r])}var i;this._config.chunkSize&&(i=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+i));try{e.send(this._config.downloadRequestBody)}catch(g){this._chunkError(g.message)}C&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=(r=>(r=r.getResponseHeader("Content-Range"))!==null?parseInt(r.substring(r.lastIndexOf("/")+1)):-1)(e),this.parseChunk(e.responseText)))},this._chunkError=function(r){r=e.statusText||r,this._sendError(new Error(r))},this._chunkTimeout=function(){this._chunkError("Request timed out after "+this._config.downloadTimeout+"ms")}}function oe(t){(t=t||{}).chunkSize||(t.chunkSize=o.LocalChunkSize),z.call(this,t);var e,r,s=typeof FileReader<"u";this.stream=function(i){this._input=i,r=i.slice||i.webkitSlice||i.mozSlice,s?((e=new FileReader).onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var i=this._input,g=(this._config.chunkSize&&(g=Math.min(this._start+this._config.chunkSize,this._input.size),i=r.call(i,this._start,g)),e.readAsText(i,this._config.encoding));s||this._chunkLoaded({target:{result:g}})},this._chunkLoaded=function(i){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(i.target.result)},this._chunkError=function(){this._sendError(e.error)}}function ie(t){var e;z.call(this,t=t||{}),this.stream=function(r){return e=r,this._nextChunk()},this._nextChunk=function(){var r,s;if(!this._finished)return r=this._config.chunkSize,e=r?(s=e.substring(0,r),e.substring(r)):(s=e,""),this._finished=!e,this.parseChunk(s)}}function ue(t){z.call(this,t=t||{});var e=[],r=!0,s=!1;this.pause=function(){z.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){z.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(i){this._input=i,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):r=!0},this._streamData=$(function(i){try{e.push(typeof i=="string"?i:i.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(g){this._streamError(g)}},this),this._streamError=$(function(i){this._streamCleanUp(),this._sendError(i)},this),this._streamEnd=$(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=$(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function pe(t){var e,r,s,i,g=Math.pow(2,53),I=-g,U=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Q=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,w=this,A=0,u=0,D=!1,l=!1,d=[],n={data:[],errors:[],meta:{}};function F(p){return t.skipEmptyLines==="greedy"?p.join("").trim()==="":p.length===1&&p[0].length===0}function k(){if(n&&s&&(M("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),s=!1),t.skipEmptyLines&&(n.data=n.data.filter(function(a){return!F(a)})),x()){let a=function(R){d.push(R)};if(n)if(Array.isArray(n.data[0])){for(var p=0;x()&&p<n.data.length;p++)n.data[p].forEach(a);n.data.splice(0,1)}else n.data.forEach(a)}function f(a,R){for(var O=t.header?{}:[],_=0;_<a.length;_++){var y=_,c=a[_],c=((q,h)=>(v=>(t.dynamicTypingFunction&&t.dynamicTyping[v]===void 0&&(t.dynamicTyping[v]=t.dynamicTypingFunction(v)),(t.dynamicTyping[v]||t.dynamicTyping)===!0))(q)?h==="true"||h==="TRUE"||h!=="false"&&h!=="FALSE"&&((v=>{if(U.test(v)&&(v=parseFloat(v),I<v&&v<g))return 1})(h)?parseFloat(h):Q.test(h)?new Date(h):h===""?null:h):h)(y=t.header?_>=d.length?"__parsed_extra":d[_]:y,c=t.transform?t.transform(c,y):c);y==="__parsed_extra"?(O[y]=O[y]||[],O[y].push(c)):O[y]=c}return t.header&&(_>d.length?M("FieldMismatch","TooManyFields","Too many fields: expected "+d.length+" fields but parsed "+_,u+R):_<d.length&&M("FieldMismatch","TooFewFields","Too few fields: expected "+d.length+" fields but parsed "+_,u+R)),O}var b;n&&(t.header||t.dynamicTyping||t.transform)&&(b=1,!n.data.length||Array.isArray(n.data[0])?(n.data=n.data.map(f),b=n.data.length):n.data=f(n.data,0),t.header&&n.meta&&(n.meta.fields=d),u+=b)}function x(){return t.header&&d.length===0}function M(p,f,b,a){p={type:p,code:f,message:b},a!==void 0&&(p.row=a),n.errors.push(p)}E(t.step)&&(i=t.step,t.step=function(p){n=p,x()?k():(k(),n.data.length!==0&&(A+=p.data.length,t.preview&&A>t.preview?r.abort():(n.data=n.data[0],i(n,w))))}),this.parse=function(p,f,b){var a=t.quoteChar||'"',a=(t.newline||(t.newline=this.guessLineEndings(p,a)),s=!1,t.delimiter?E(t.delimiter)&&(t.delimiter=t.delimiter(p),n.meta.delimiter=t.delimiter):((a=((R,O,_,y,c)=>{var q,h,v,Z;c=c||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var ee=0;ee<c.length;ee++){for(var B,se=c[ee],T=0,K=0,S=0,L=(v=void 0,new le({comments:y,delimiter:se,newline:O,preview:10}).parse(R)),V=0;V<L.data.length;V++)_&&F(L.data[V])?S++:(B=L.data[V].length,K+=B,v===void 0?v=B:0<B&&(T+=Math.abs(B-v),v=B));0<L.data.length&&(K/=L.data.length-S),1.99<K&&(h===void 0||T<h||T===h&&Z<K)&&(h=T,q=se,Z=K)}return{successful:!!(t.delimiter=q),bestDelimiter:q}})(p,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=a.bestDelimiter:(s=!0,t.delimiter=o.DefaultDelimiter),n.meta.delimiter=t.delimiter),de(t));return a.header=x(),t.preview&&t.header&&a.preview++,e=p,r=new le(a),n=r.parse(e,f,b),k(),D?{meta:{paused:!0}}:n||{meta:{paused:!1}}},this.paused=function(){return D},this.pause=function(){D=!0,r.abort(),e=E(t.chunk)?"":e.substring(r.getCharIndex())},this.resume=function(){w.streamer._halted?(D=!1,w.streamer.parseChunk(e,!0)):setTimeout(w.resume,3)},this.aborted=function(){return l},this.abort=function(){l=!0,r.abort(),n.meta.aborted=!0,E(t.complete)&&t.complete(n),e=""},this.guessLineEndings=function(R,a){R=R.substring(0,1048576);var a=new RegExp(ne(a)+"([^]*?)"+ne(a),"gm"),b=(R=R.replace(a,"")).split("\r"),a=R.split(`
6
+ */var Ie=he.exports,ke;function Ae(){return ke||(ke=1,(function(H,X){((G,m)=>{H.exports=m()})(Ie,function G(){var m=typeof self<"u"?self:typeof window<"u"?window:m!==void 0?m:{},C=!m.document&&!!m.postMessage,N=m.IS_PAPA_WORKER||!1,J={},Y=0,o={};function P(t){return t.charCodeAt(0)===65279?t.slice(1):t}function z(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var r=de(e);r.chunkSize=parseInt(r.chunkSize),e.step||e.chunk||(r.chunkSize=null),this._handle=new pe(r),(this._handle.streamer=this)._config=r}).call(this,t),this.parseChunk=function(e,r){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<s){let g=this._config.newline;g||(i=this._config.quoteChar||'"',g=this._handle.guessLineEndings(e,i)),e=[...e.split(g).slice(s)].join(g)}this.isFirstChunk&&E(this._config.beforeFirstChunk)&&(i=this._config.beforeFirstChunk(e))!==void 0&&(e=i),this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e,i=(this._partialLine="",this._handle.parse(s,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=i.meta.cursor,s=(this._finished||(this._partialLine=s.substring(e-this._baseIndex),this._baseIndex=e),i&&i.data&&(this._rowCount+=i.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),N)m.postMessage({results:i,workerId:o.WORKER_ID,finished:s});else if(E(this._config.chunk)&&!r){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=i=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!s||!E(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||i&&i.meta.paused||this._nextChunk(),i}this._halted=!0},this._sendError=function(e){E(this._config.error)?this._config.error(e):N&&this._config.error&&m.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function re(t){var e;(t=t||{}).chunkSize||(t.chunkSize=o.RemoteChunkSize),z.call(this,t),this._nextChunk=C?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(r){this._input=r,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),C||(e.onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)),e.ontimeout=$(this._chunkTimeout,this),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!C),this._config.downloadTimeout&&!C&&(e.timeout=this._config.downloadTimeout),this._config.downloadRequestHeaders){var r,s=this._config.downloadRequestHeaders;for(r in s)e.setRequestHeader(r,s[r])}var i;this._config.chunkSize&&(i=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+i));try{e.send(this._config.downloadRequestBody)}catch(g){this._chunkError(g.message)}C&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=(r=>(r=r.getResponseHeader("Content-Range"))!==null?parseInt(r.substring(r.lastIndexOf("/")+1)):-1)(e),this.parseChunk(e.responseText)))},this._chunkError=function(r){r=e.statusText||r,this._sendError(new Error(r))},this._chunkTimeout=function(){this._chunkError("Request timed out after "+this._config.downloadTimeout+"ms")}}function oe(t){(t=t||{}).chunkSize||(t.chunkSize=o.LocalChunkSize),z.call(this,t);var e,r,s=typeof FileReader<"u";this.stream=function(i){this._input=i,r=i.slice||i.webkitSlice||i.mozSlice,s?((e=new FileReader).onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var i=this._input,g=(this._config.chunkSize&&(g=Math.min(this._start+this._config.chunkSize,this._input.size),i=r.call(i,this._start,g)),e.readAsText(i,this._config.encoding));s||this._chunkLoaded({target:{result:g}})},this._chunkLoaded=function(i){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(i.target.result)},this._chunkError=function(){this._sendError(e.error)}}function ie(t){var e;z.call(this,t=t||{}),this.stream=function(r){return e=r,this._nextChunk()},this._nextChunk=function(){var r,s;if(!this._finished)return r=this._config.chunkSize,e=r?(s=e.substring(0,r),e.substring(r)):(s=e,""),this._finished=!e,this.parseChunk(s)}}function ue(t){z.call(this,t=t||{});var e=[],r=!0,s=!1;this.pause=function(){z.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){z.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(i){this._input=i,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):r=!0},this._streamData=$(function(i){try{e.push(typeof i=="string"?i:i.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(g){this._streamError(g)}},this),this._streamError=$(function(i){this._streamCleanUp(),this._sendError(i)},this),this._streamEnd=$(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=$(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function pe(t){var e,r,s,i,g=Math.pow(2,53),I=-g,U=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,V=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,w=this,A=0,u=0,D=!1,l=!1,d=[],n={data:[],errors:[],meta:{}};function F(p){return t.skipEmptyLines==="greedy"?p.join("").trim()==="":p.length===1&&p[0].length===0}function k(){if(n&&s&&(M("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),s=!1),t.skipEmptyLines&&(n.data=n.data.filter(function(a){return!F(a)})),x()){let a=function(R){d.push(R)};if(n)if(Array.isArray(n.data[0])){for(var p=0;x()&&p<n.data.length;p++)n.data[p].forEach(a);n.data.splice(0,1)}else n.data.forEach(a)}function f(a,R){for(var O=t.header?{}:[],_=0;_<a.length;_++){var y=_,c=a[_],c=((q,h)=>(v=>(t.dynamicTypingFunction&&t.dynamicTyping[v]===void 0&&(t.dynamicTyping[v]=t.dynamicTypingFunction(v)),(t.dynamicTyping[v]||t.dynamicTyping)===!0))(q)?h==="true"||h==="TRUE"||h!=="false"&&h!=="FALSE"&&((v=>{if(U.test(v)&&(v=parseFloat(v),I<v&&v<g))return 1})(h)?parseFloat(h):V.test(h)?new Date(h):h===""?null:h):h)(y=t.header?_>=d.length?"__parsed_extra":d[_]:y,c=t.transform?t.transform(c,y):c);y==="__parsed_extra"?(O[y]=O[y]||[],O[y].push(c)):O[y]=c}return t.header&&(_>d.length?M("FieldMismatch","TooManyFields","Too many fields: expected "+d.length+" fields but parsed "+_,u+R):_<d.length&&M("FieldMismatch","TooFewFields","Too few fields: expected "+d.length+" fields but parsed "+_,u+R)),O}var b;n&&(t.header||t.dynamicTyping||t.transform)&&(b=1,!n.data.length||Array.isArray(n.data[0])?(n.data=n.data.map(f),b=n.data.length):n.data=f(n.data,0),t.header&&n.meta&&(n.meta.fields=d),u+=b)}function x(){return t.header&&d.length===0}function M(p,f,b,a){p={type:p,code:f,message:b},a!==void 0&&(p.row=a),n.errors.push(p)}E(t.step)&&(i=t.step,t.step=function(p){n=p,x()?k():(k(),n.data.length!==0&&(A+=p.data.length,t.preview&&A>t.preview?r.abort():(n.data=n.data[0],i(n,w))))}),this.parse=function(p,f,b){var a=t.quoteChar||'"',a=(t.newline||(t.newline=this.guessLineEndings(p,a)),s=!1,t.delimiter?E(t.delimiter)&&(t.delimiter=t.delimiter(p),n.meta.delimiter=t.delimiter):((a=((R,O,_,y,c)=>{var q,h,v,Z;c=c||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var ee=0;ee<c.length;ee++){for(var B,se=c[ee],T=0,K=0,S=0,L=(v=void 0,new le({comments:y,delimiter:se,newline:O,preview:10}).parse(R)),Q=0;Q<L.data.length;Q++)_&&F(L.data[Q])?S++:(B=L.data[Q].length,K+=B,v===void 0?v=B:0<B&&(T+=Math.abs(B-v),v=B));0<L.data.length&&(K/=L.data.length-S),1.99<K&&(h===void 0||T<h||T===h&&Z<K)&&(h=T,q=se,Z=K)}return{successful:!!(t.delimiter=q),bestDelimiter:q}})(p,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=a.bestDelimiter:(s=!0,t.delimiter=o.DefaultDelimiter),n.meta.delimiter=t.delimiter),de(t));return a.header=x(),t.preview&&t.header&&a.preview++,e=p,r=new le(a),n=r.parse(e,f,b),k(),D?{meta:{paused:!0}}:n||{meta:{paused:!1}}},this.paused=function(){return D},this.pause=function(){D=!0,r.abort(),e=E(t.chunk)?"":e.substring(r.getCharIndex())},this.resume=function(){w.streamer._halted?(D=!1,w.streamer.parseChunk(e,!0)):setTimeout(w.resume,3)},this.aborted=function(){return l},this.abort=function(){l=!0,r.abort(),n.meta.aborted=!0,E(t.complete)&&t.complete(n),e=""},this.guessLineEndings=function(R,a){R=R.substring(0,1048576);var a=new RegExp(ne(a)+"([^]*?)"+ne(a),"gm"),b=(R=R.replace(a,"")).split("\r"),a=R.split(`
7
7
  `),R=1<a.length&&a[0].length<b[0].length;if(b.length===1||R)return`
8
8
  `;for(var O=0,_=0;_<b.length;_++)b[_][0]===`
9
9
  `&&O++;return O>=b.length/2?`\r
10
- `:"\r"}}function ne(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function le(t){var e=(t=t||{}).delimiter,r=t.newline,s=t.comments,i=t.step,g=t.preview,I=t.fastMode,U=null,Q=!1,w=t.quoteChar==null?'"':t.quoteChar,A=w;if(t.escapeChar!==void 0&&(A=t.escapeChar),(typeof e!="string"||-1<o.BAD_DELIMITERS.indexOf(e))&&(e=","),s===e)throw new Error("Comment character same as delimiter");s===!0?s="#":(typeof s!="string"||-1<o.BAD_DELIMITERS.indexOf(s))&&(s=!1),r!==`
10
+ `:"\r"}}function ne(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function le(t){var e=(t=t||{}).delimiter,r=t.newline,s=t.comments,i=t.step,g=t.preview,I=t.fastMode,U=null,V=!1,w=t.quoteChar==null?'"':t.quoteChar,A=w;if(t.escapeChar!==void 0&&(A=t.escapeChar),(typeof e!="string"||-1<o.BAD_DELIMITERS.indexOf(e))&&(e=","),s===e)throw new Error("Comment character same as delimiter");s===!0?s="#":(typeof s!="string"||-1<o.BAD_DELIMITERS.indexOf(s))&&(s=!1),r!==`
11
11
  `&&r!=="\r"&&r!==`\r
12
12
  `&&(r=`
13
- `);var u=0,D=!1;this.parse=function(l,d,n){if(typeof l!="string")throw new Error("Input must be a string");var F=l.length,k=e.length,x=r.length,M=s.length,p=E(i),f=[],b=[],a=[],R=u=0;if(!l)return T();if(I||I!==!1&&l.indexOf(w)===-1){for(var O=l.split(r),_=0;_<O.length;_++){if(a=O[_],u+=a.length,_!==O.length-1)u+=r.length;else if(n)return T();if(!s||a.substring(0,M)!==s){if(p){if(f=[],Z(a.split(e)),K(),D)return T()}else Z(a.split(e));if(g&&g<=_)return f=f.slice(0,g),T(!0)}}return T()}for(var y=l.indexOf(e,u),c=l.indexOf(r,u),q=new RegExp(ne(A)+ne(w),"g"),h=l.indexOf(w,u);;)if(l[u]===w)for(h=u,u++;;){if((h=l.indexOf(w,h+1))===-1)return n||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:f.length,index:u}),B();if(h===F-1)return B(l.substring(u,h).replace(q,w));if(w===A&&l[h+1]===A)h++;else if(w===A||h===0||l[h-1]!==A){y!==-1&&y<h+1&&(y=l.indexOf(e,h+1));var v=ee((c=c!==-1&&c<h+1?l.indexOf(r,h+1):c)===-1?y:Math.min(y,c));if(l.substr(h+1+v,k)===e){a.push(l.substring(u,h).replace(q,w)),l[u=h+1+v+k]!==w&&(h=l.indexOf(w,u)),y=l.indexOf(e,u),c=l.indexOf(r,u);break}if(v=ee(c),l.substring(h+1+v,h+1+v+x)===r){if(a.push(l.substring(u,h).replace(q,w)),se(h+1+v+x),y=l.indexOf(e,u),h=l.indexOf(w,u),p&&(K(),D))return T();if(g&&f.length>=g)return T(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:f.length,index:u}),h++}}else if(s&&a.length===0&&l.substring(u,u+M)===s){if(c===-1)return T();u=c+x,c=l.indexOf(r,u),y=l.indexOf(e,u)}else if(y!==-1&&(y<c||c===-1))a.push(l.substring(u,y)),u=y+k,y=l.indexOf(e,u);else{if(c===-1)break;if(a.push(l.substring(u,c)),se(c+x),p&&(K(),D))return T();if(g&&f.length>=g)return T(!0)}return B();function Z(S){f.push(S),R=u}function ee(S){var L=0;return L=S!==-1&&(S=l.substring(h+1,S))&&S.trim()===""?S.length:L}function B(S){return n||(S===void 0&&(S=l.substring(u)),a.push(S),u=F,Z(a),p&&K()),T()}function se(S){u=S,Z(a),a=[],c=l.indexOf(r,u)}function T(S){if(t.header&&!d&&f.length&&!Q){var L=f[0],V=Object.create(null),fe=new Set(L);let me=!1;for(let te=0;te<L.length;te++){let W=P(L[te]);if(V[W=E(t.transformHeader)?t.transformHeader(W,te):W]){let ae,ye=V[W];for(;ae=W+"_"+ye,ye++,fe.has(ae););fe.add(ae),L[te]=ae,V[W]++,me=!0,(U=U===null?{}:U)[ae]=W}else V[W]=1,L[te]=W;fe.add(W)}me&&console.warn("Duplicate headers found and renamed."),Q=!0}return{data:f,errors:b,meta:{delimiter:e,linebreak:r,aborted:D,truncated:!!S,cursor:R+(d||0),renamedHeaders:U}}}function K(){i(T()),f=[],b=[]}},this.abort=function(){D=!0},this.getCharIndex=function(){return u}}function be(t){var e=t.data,r=G[e.workerId],s=!1;if(e.error)r.userError(e.error,e.file);else if(e.results&&e.results.data){var i={abort:function(){s=!0,ge(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_e,resume:_e};if(E(r.userStep)){for(var g=0;g<e.results.data.length&&(r.userStep({data:e.results.data[g],errors:e.results.errors,meta:e.results.meta},i),!s);g++);delete e.results}else E(r.userChunk)&&(r.userChunk(e.results,i,e.file),delete e.results)}e.finished&&!s&&ge(e.workerId,e.results)}function ge(t,e){var r=G[t];E(r.userComplete)&&r.userComplete(e),r.terminate(),delete G[t]}function _e(){throw new Error("Not implemented.")}function de(t){if(typeof t!="object"||t===null)return t;var e,r=Array.isArray(t)?[]:{};for(e in t)r[e]=de(t[e]);return r}function $(t,e){return function(){t.apply(e,arguments)}}function E(t){return typeof t=="function"}return o.parse=function(t,e){var r=(e=e||{}).dynamicTyping||!1;if(E(r)&&(e.dynamicTypingFunction=r,r={}),e.dynamicTyping=r,e.transform=!!E(e.transform)&&e.transform,e.downloadTimeout!==void 0){var r=parseInt(e.downloadTimeout);if(isNaN(r))throw new Error("Config downloadTimeout value ("+e.downloadTimeout+") not parsable by parseInt(val).");e.downloadTimeout=r}if(!e.worker||!o.WORKERS_SUPPORTED)return r=null,o.NODE_STREAM_INPUT,typeof t=="string"?(t=P(t),r=new(e.download?re:ie)(e)):t.readable===!0&&E(t.read)&&E(t.on)?r=new ue(e):(m.File&&t instanceof File||t instanceof Object)&&(r=new oe(e)),r.stream(t);(r=(()=>{var s;return!!o.WORKERS_SUPPORTED&&(s=(()=>{var i=m.URL||m.webkitURL||null,g=J.toString();return o.BLOB_URL||(o.BLOB_URL=i.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",g,")();"],{type:"text/javascript"})))})(),(s=new m.Worker(s)).onmessage=be,s.id=Y++,G[s.id]=s)})()).userStep=e.step,r.userChunk=e.chunk,r.userComplete=e.complete,r.userError=e.error,e.step=E(e.step),e.chunk=E(e.chunk),e.complete=E(e.complete),e.error=E(e.error),delete e.worker,r.postMessage({input:t,config:e,workerId:r.id})},o.unparse=function(t,e){var r=!1,s=!0,i=",",g=`\r
14
- `,I='"',U=I+I,Q=!1,w=null,A=!1,u=((()=>{if(typeof e=="object"){if(typeof e.delimiter!="string"||o.BAD_DELIMITERS.filter(function(d){return e.delimiter.indexOf(d)!==-1}).length||(i=e.delimiter),typeof e.quotes!="boolean"&&typeof e.quotes!="function"&&!Array.isArray(e.quotes)||(r=e.quotes),typeof e.skipEmptyLines!="boolean"&&typeof e.skipEmptyLines!="string"||(Q=e.skipEmptyLines),typeof e.newline=="string"&&(g=e.newline),typeof e.quoteChar=="string"&&(I=e.quoteChar,U=I+I),typeof e.header=="boolean"&&(s=e.header),Array.isArray(e.columns)){if(e.columns.length===0)throw new Error("Option columns is empty");w=e.columns}e.escapeChar!==void 0&&(U=e.escapeChar+I),e.escapeFormulae instanceof RegExp?A=e.escapeFormulae:typeof e.escapeFormulae=="boolean"&&e.escapeFormulae&&(A=/^[=+\-@\t\r].*$/)}})(),new RegExp(ne(I),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return D(null,t,Q);if(typeof t[0]=="object")return D(w||Object.keys(t[0]),t,Q)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||w),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),D(t.fields||[],t.data||[],Q);throw new Error("Unable to serialize unrecognized input");function D(d,n,F){var k="",x=(typeof d=="string"&&(d=JSON.parse(d)),typeof n=="string"&&(n=JSON.parse(n)),Array.isArray(d)&&0<d.length),M=!Array.isArray(n[0]);if(x&&s){for(var p=0;p<d.length;p++)0<p&&(k+=i),k+=l(d[p],p);0<n.length&&(k+=g)}for(var f=0;f<n.length;f++){var b=(x?d:n[f]).length,a=!1,R=x?Object.keys(n[f]).length===0:n[f].length===0;if(F&&!x&&(a=F==="greedy"?n[f].join("").trim()==="":n[f].length===1&&n[f][0].length===0),F==="greedy"&&x){for(var O=[],_=0;_<b;_++){var y=M?d[_]:_;O.push(n[f][y])}a=O.join("").trim()===""}if(!a){for(var c=0;c<b;c++){0<c&&!R&&(k+=i);var q=x&&M?d[c]:c;k+=l(n[f][q],c)}f<n.length-1&&(!F||0<b&&!R)&&(k+=g)}}return k}function l(d,n){var F,k,x;return d==null?"":d.constructor===Date?isNaN(d.getTime())?"":d.toISOString():(x=!1,A&&typeof d=="string"&&A.test(d)&&(d="'"+d,x=!0),k=(F=d.toString()).replace(u,U),(x=x||r===!0||typeof r=="function"&&r(d,n)||Array.isArray(r)&&r[n]||((M,p)=>{for(var f=0;f<p.length;f++)if(-1<M.indexOf(p[f]))return!0;return!1})(k,o.BAD_DELIMITERS)||-1<k.indexOf(i)||-1<F.indexOf(I)||k.charAt(0)===" "||k.charAt(k.length-1)===" ")?I+k+I:k)}},o.RECORD_SEP="",o.UNIT_SEP="",o.BYTE_ORDER_MARK="\uFEFF",o.BAD_DELIMITERS=["\r",`
15
- `,'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!C&&!!m.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=le,o.ParserHandle=pe,o.NetworkStreamer=re,o.FileStreamer=oe,o.StringStreamer=ie,o.ReadableStreamStreamer=ue,N&&(m.onmessage=function(t){t=t.data,o.WORKER_ID===void 0&&t&&(o.WORKER_ID=t.workerId),typeof t.input=="string"?m.postMessage({workerId:o.WORKER_ID,results:o.parse(t.input,t.config),finished:!0}):(m.File&&t.input instanceof File||t.input instanceof Object)&&(t=o.parse(t.input,t.config))&&m.postMessage({workerId:o.WORKER_ID,results:t,finished:!0})}),(re.prototype=Object.create(z.prototype)).constructor=re,(oe.prototype=Object.create(z.prototype)).constructor=oe,(ie.prototype=Object.create(ie.prototype)).constructor=ie,(ue.prototype=Object.create(z.prototype)).constructor=ue,o})})(he)),he.exports}var De=Ae();const Le=Ee(De),we=32;function Ze({content:H}){const X=xe(),J=Re(P=>P.selectedCwd),m=ve.useMemo(()=>Te(H.src,P=>X.mediaUrl(J??"",P)),[H.src,X,J]),{data:C,error:N,isLoading:G}=Se({queryKey:["canvas-csv",m.url],enabled:m.url!==null,queryFn:async()=>{const P=await fetch(m.url);if(!P.ok)throw new Error(`Failed to load CSV (${P.status})`);const z=await P.text();return Le.parse(z.trim(),{skipEmptyLines:!0}).data},staleTime:6e4,retry:!1});if(m.url===null)return j.jsx(ce,{children:"This CSV source can’t be displayed here."});if(G)return j.jsx(ce,{children:"Loading CSV…"});if(N||!C||C.length===0)return j.jsx(ce,{children:"This CSV couldn’t be loaded."});const[Y,...o]=C;return j.jsx(je,{header:Y,rows:o})}function je({header:H,rows:X}){const J=ve.useRef(null),m=Oe({count:X.length,getScrollElement:()=>J.current,estimateSize:()=>we,overscan:12});return j.jsx("div",{ref:J,className:"h-full overflow-auto",children:j.jsxs("table",{className:"w-full border-collapse text-sm",children:[j.jsx("thead",{className:"bg-muted sticky top-0 z-10",children:j.jsx("tr",{children:H.map((C,N)=>j.jsx("th",{className:"text-muted-foreground border-b px-3 py-1.5 text-left font-medium whitespace-nowrap",children:C},N))})}),j.jsx("tbody",{style:{height:m.getTotalSize(),position:"relative"},children:m.getVirtualItems().map(C=>{const N=X[C.index];return j.jsx("tr",{className:Ce("absolute flex w-full",C.index%2===1&&"bg-muted/30"),style:{transform:`translateY(${C.start}px)`,height:we},children:H.map((G,Y)=>j.jsx("td",{className:"flex-1 truncate border-b px-3 py-1.5 whitespace-nowrap",title:N[Y]??"",children:N[Y]??""},Y))},C.key)})})]})})}function ce({children:H}){return j.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:j.jsx("p",{children:H})})}export{Ze as CanvasCsvContent};
13
+ `);var u=0,D=!1;this.parse=function(l,d,n){if(typeof l!="string")throw new Error("Input must be a string");var F=l.length,k=e.length,x=r.length,M=s.length,p=E(i),f=[],b=[],a=[],R=u=0;if(!l)return T();if(I||I!==!1&&l.indexOf(w)===-1){for(var O=l.split(r),_=0;_<O.length;_++){if(a=O[_],u+=a.length,_!==O.length-1)u+=r.length;else if(n)return T();if(!s||a.substring(0,M)!==s){if(p){if(f=[],Z(a.split(e)),K(),D)return T()}else Z(a.split(e));if(g&&g<=_)return f=f.slice(0,g),T(!0)}}return T()}for(var y=l.indexOf(e,u),c=l.indexOf(r,u),q=new RegExp(ne(A)+ne(w),"g"),h=l.indexOf(w,u);;)if(l[u]===w)for(h=u,u++;;){if((h=l.indexOf(w,h+1))===-1)return n||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:f.length,index:u}),B();if(h===F-1)return B(l.substring(u,h).replace(q,w));if(w===A&&l[h+1]===A)h++;else if(w===A||h===0||l[h-1]!==A){y!==-1&&y<h+1&&(y=l.indexOf(e,h+1));var v=ee((c=c!==-1&&c<h+1?l.indexOf(r,h+1):c)===-1?y:Math.min(y,c));if(l.substr(h+1+v,k)===e){a.push(l.substring(u,h).replace(q,w)),l[u=h+1+v+k]!==w&&(h=l.indexOf(w,u)),y=l.indexOf(e,u),c=l.indexOf(r,u);break}if(v=ee(c),l.substring(h+1+v,h+1+v+x)===r){if(a.push(l.substring(u,h).replace(q,w)),se(h+1+v+x),y=l.indexOf(e,u),h=l.indexOf(w,u),p&&(K(),D))return T();if(g&&f.length>=g)return T(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:f.length,index:u}),h++}}else if(s&&a.length===0&&l.substring(u,u+M)===s){if(c===-1)return T();u=c+x,c=l.indexOf(r,u),y=l.indexOf(e,u)}else if(y!==-1&&(y<c||c===-1))a.push(l.substring(u,y)),u=y+k,y=l.indexOf(e,u);else{if(c===-1)break;if(a.push(l.substring(u,c)),se(c+x),p&&(K(),D))return T();if(g&&f.length>=g)return T(!0)}return B();function Z(S){f.push(S),R=u}function ee(S){var L=0;return L=S!==-1&&(S=l.substring(h+1,S))&&S.trim()===""?S.length:L}function B(S){return n||(S===void 0&&(S=l.substring(u)),a.push(S),u=F,Z(a),p&&K()),T()}function se(S){u=S,Z(a),a=[],c=l.indexOf(r,u)}function T(S){if(t.header&&!d&&f.length&&!V){var L=f[0],Q=Object.create(null),fe=new Set(L);let me=!1;for(let te=0;te<L.length;te++){let W=P(L[te]);if(Q[W=E(t.transformHeader)?t.transformHeader(W,te):W]){let ae,ye=Q[W];for(;ae=W+"_"+ye,ye++,fe.has(ae););fe.add(ae),L[te]=ae,Q[W]++,me=!0,(U=U===null?{}:U)[ae]=W}else Q[W]=1,L[te]=W;fe.add(W)}me&&console.warn("Duplicate headers found and renamed."),V=!0}return{data:f,errors:b,meta:{delimiter:e,linebreak:r,aborted:D,truncated:!!S,cursor:R+(d||0),renamedHeaders:U}}}function K(){i(T()),f=[],b=[]}},this.abort=function(){D=!0},this.getCharIndex=function(){return u}}function be(t){var e=t.data,r=J[e.workerId],s=!1;if(e.error)r.userError(e.error,e.file);else if(e.results&&e.results.data){var i={abort:function(){s=!0,ge(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_e,resume:_e};if(E(r.userStep)){for(var g=0;g<e.results.data.length&&(r.userStep({data:e.results.data[g],errors:e.results.errors,meta:e.results.meta},i),!s);g++);delete e.results}else E(r.userChunk)&&(r.userChunk(e.results,i,e.file),delete e.results)}e.finished&&!s&&ge(e.workerId,e.results)}function ge(t,e){var r=J[t];E(r.userComplete)&&r.userComplete(e),r.terminate(),delete J[t]}function _e(){throw new Error("Not implemented.")}function de(t){if(typeof t!="object"||t===null)return t;var e,r=Array.isArray(t)?[]:{};for(e in t)r[e]=de(t[e]);return r}function $(t,e){return function(){t.apply(e,arguments)}}function E(t){return typeof t=="function"}return o.parse=function(t,e){var r=(e=e||{}).dynamicTyping||!1;if(E(r)&&(e.dynamicTypingFunction=r,r={}),e.dynamicTyping=r,e.transform=!!E(e.transform)&&e.transform,e.downloadTimeout!==void 0){var r=parseInt(e.downloadTimeout);if(isNaN(r))throw new Error("Config downloadTimeout value ("+e.downloadTimeout+") not parsable by parseInt(val).");e.downloadTimeout=r}if(!e.worker||!o.WORKERS_SUPPORTED)return r=null,o.NODE_STREAM_INPUT,typeof t=="string"?(t=P(t),r=new(e.download?re:ie)(e)):t.readable===!0&&E(t.read)&&E(t.on)?r=new ue(e):(m.File&&t instanceof File||t instanceof Object)&&(r=new oe(e)),r.stream(t);(r=(()=>{var s;return!!o.WORKERS_SUPPORTED&&(s=(()=>{var i=m.URL||m.webkitURL||null,g=G.toString();return o.BLOB_URL||(o.BLOB_URL=i.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",g,")();"],{type:"text/javascript"})))})(),(s=new m.Worker(s)).onmessage=be,s.id=Y++,J[s.id]=s)})()).userStep=e.step,r.userChunk=e.chunk,r.userComplete=e.complete,r.userError=e.error,e.step=E(e.step),e.chunk=E(e.chunk),e.complete=E(e.complete),e.error=E(e.error),delete e.worker,r.postMessage({input:t,config:e,workerId:r.id})},o.unparse=function(t,e){var r=!1,s=!0,i=",",g=`\r
14
+ `,I='"',U=I+I,V=!1,w=null,A=!1,u=((()=>{if(typeof e=="object"){if(typeof e.delimiter!="string"||o.BAD_DELIMITERS.filter(function(d){return e.delimiter.indexOf(d)!==-1}).length||(i=e.delimiter),typeof e.quotes!="boolean"&&typeof e.quotes!="function"&&!Array.isArray(e.quotes)||(r=e.quotes),typeof e.skipEmptyLines!="boolean"&&typeof e.skipEmptyLines!="string"||(V=e.skipEmptyLines),typeof e.newline=="string"&&(g=e.newline),typeof e.quoteChar=="string"&&(I=e.quoteChar,U=I+I),typeof e.header=="boolean"&&(s=e.header),Array.isArray(e.columns)){if(e.columns.length===0)throw new Error("Option columns is empty");w=e.columns}e.escapeChar!==void 0&&(U=e.escapeChar+I),e.escapeFormulae instanceof RegExp?A=e.escapeFormulae:typeof e.escapeFormulae=="boolean"&&e.escapeFormulae&&(A=/^[=+\-@\t\r].*$/)}})(),new RegExp(ne(I),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return D(null,t,V);if(typeof t[0]=="object")return D(w||Object.keys(t[0]),t,V)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||w),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),D(t.fields||[],t.data||[],V);throw new Error("Unable to serialize unrecognized input");function D(d,n,F){var k="",x=(typeof d=="string"&&(d=JSON.parse(d)),typeof n=="string"&&(n=JSON.parse(n)),Array.isArray(d)&&0<d.length),M=!Array.isArray(n[0]);if(x&&s){for(var p=0;p<d.length;p++)0<p&&(k+=i),k+=l(d[p],p);0<n.length&&(k+=g)}for(var f=0;f<n.length;f++){var b=(x?d:n[f]).length,a=!1,R=x?Object.keys(n[f]).length===0:n[f].length===0;if(F&&!x&&(a=F==="greedy"?n[f].join("").trim()==="":n[f].length===1&&n[f][0].length===0),F==="greedy"&&x){for(var O=[],_=0;_<b;_++){var y=M?d[_]:_;O.push(n[f][y])}a=O.join("").trim()===""}if(!a){for(var c=0;c<b;c++){0<c&&!R&&(k+=i);var q=x&&M?d[c]:c;k+=l(n[f][q],c)}f<n.length-1&&(!F||0<b&&!R)&&(k+=g)}}return k}function l(d,n){var F,k,x;return d==null?"":d.constructor===Date?isNaN(d.getTime())?"":d.toISOString():(x=!1,A&&typeof d=="string"&&A.test(d)&&(d="'"+d,x=!0),k=(F=d.toString()).replace(u,U),(x=x||r===!0||typeof r=="function"&&r(d,n)||Array.isArray(r)&&r[n]||((M,p)=>{for(var f=0;f<p.length;f++)if(-1<M.indexOf(p[f]))return!0;return!1})(k,o.BAD_DELIMITERS)||-1<k.indexOf(i)||-1<F.indexOf(I)||k.charAt(0)===" "||k.charAt(k.length-1)===" ")?I+k+I:k)}},o.RECORD_SEP="",o.UNIT_SEP="",o.BYTE_ORDER_MARK="\uFEFF",o.BAD_DELIMITERS=["\r",`
15
+ `,'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!C&&!!m.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=le,o.ParserHandle=pe,o.NetworkStreamer=re,o.FileStreamer=oe,o.StringStreamer=ie,o.ReadableStreamStreamer=ue,N&&(m.onmessage=function(t){t=t.data,o.WORKER_ID===void 0&&t&&(o.WORKER_ID=t.workerId),typeof t.input=="string"?m.postMessage({workerId:o.WORKER_ID,results:o.parse(t.input,t.config),finished:!0}):(m.File&&t.input instanceof File||t.input instanceof Object)&&(t=o.parse(t.input,t.config))&&m.postMessage({workerId:o.WORKER_ID,results:t,finished:!0})}),(re.prototype=Object.create(z.prototype)).constructor=re,(oe.prototype=Object.create(z.prototype)).constructor=oe,(ie.prototype=Object.create(ie.prototype)).constructor=ie,(ue.prototype=Object.create(z.prototype)).constructor=ue,o})})(he)),he.exports}var De=Ae();const Le=Ee(De),we=32;function Ze({content:H}){const X=xe(),G=Re(P=>P.selectedCwd),m=ve.useMemo(()=>Te(H.src,P=>X.mediaUrl(G??"",P)),[H.src,X,G]),{data:C,error:N,isLoading:J}=Se({queryKey:["canvas-csv",m.url],enabled:m.url!==null,queryFn:async()=>{const P=await fetch(m.url);if(!P.ok)throw new Error(`Failed to load CSV (${P.status})`);const z=await P.text();return Le.parse(z.trim(),{skipEmptyLines:!0}).data},staleTime:6e4,retry:!1});if(m.url===null)return j.jsx(ce,{children:"This CSV source can’t be displayed here."});if(J)return j.jsx(ce,{children:"Loading CSV…"});if(N||!C||C.length===0)return j.jsx(ce,{children:"This CSV couldn’t be loaded."});const[Y,...o]=C;return j.jsx(je,{header:Y,rows:o})}function je({header:H,rows:X}){const G=ve.useRef(null),m=Oe({count:X.length,getScrollElement:()=>G.current,estimateSize:()=>we,overscan:12});return j.jsx("div",{ref:G,className:"h-full overflow-auto",children:j.jsxs("table",{className:"w-full border-collapse text-sm",children:[j.jsx("thead",{className:"bg-muted sticky top-0 z-10",children:j.jsx("tr",{children:H.map((C,N)=>j.jsx("th",{className:"text-muted-foreground border-b px-3 py-1.5 text-left font-medium whitespace-nowrap",children:C},N))})}),j.jsx("tbody",{style:{height:m.getTotalSize(),position:"relative"},children:m.getVirtualItems().map(C=>{const N=X[C.index];return j.jsx("tr",{className:Ce("absolute flex w-full",C.index%2===1&&"bg-muted/30"),style:{transform:`translateY(${C.start}px)`,height:we},children:H.map((J,Y)=>j.jsx("td",{className:"flex-1 truncate border-b px-3 py-1.5 whitespace-nowrap",title:N[Y]??"",children:N[Y]??""},Y))},C.key)})})]})})}function ce({children:H}){return j.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:j.jsx("p",{children:H})})}export{Ze as CanvasCsvContent};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-BX1bJlnT.js","assets/index-C8-dwIPp.js","assets/index-BDCqg2iM.css","assets/index-CQrM6oF9.js","assets/index-gbNK9zj5.js","assets/BlintzCanvas-DUDSNxlM.js","assets/BlintzCanvas-GgiCXV7C.css"])))=>i.map(i=>d[i]);
2
+ import{r as n,aV as D,gl as re,j as t,B as S,a3 as ne,G as se,J as ae,gb as ie,gm as ce,aW as $,a1 as ue,gn as oe,a2 as le}from"./index-C8-dwIPp.js";import{u as de,a as fe}from"./use-session-canvas-CUvHGgMf.js";import{R as he}from"./rotate-cw-DD2nOAQ-.js";import"./WidgetErrorCard-CT4sl_T6.js";import"./card-B_zeSZiU.js";import"./progress-Cvnh4Qcr.js";import"./markdown-content-GoymYcRL.js";import"./table-Rll_Jxd8.js";import"./terminal-Bjss9oke.js";import"./package-DM7e-GVa.js";import"./heart-BSVjeGLA.js";import"./git-branch-CKlZ81Bg.js";import"./file-text-BTj3WyHS.js";import"./file-Bwo21EVR.js";import"./McpAppFrame-D5Muf5Sf.js";import"./more-details-3dDtVYc6.js";function O(e,i){return["canvas-file",e,i]}function ve({documentId:e,sourcePath:i,binding:j,save:o,draftRef:x,revisionRef:r,finishAttemptRef:C,timerRef:g,finalSaveRef:b,invalidateConfirmedFile:d}){const m=n.useRef({binding:j,save:o,invalidateConfirmedFile:d}),F=n.useRef(null),l=n.useRef(null);return n.useLayoutEffect(()=>{m.current={binding:j,save:o,invalidateConfirmedFile:d}}),n.useLayoutEffect(()=>{const k=D.getState().openDocuments.find(f=>f.id===e);if(!k||typeof k.openedAt!="number")return;const w=re(e,k.openedAt,i,{required:()=>!!m.current.binding,current:()=>{const f=l.current;return!!f&&f.revision===r.current&&f.attempt===C.current&&f.binding===m.current.binding&&f.save===m.current.save&&f.binding.current()},invalidateConfirmedFile:()=>m.current.invalidateConfirmedFile(),prepare:async()=>{var a;l.current=null;const{binding:f,save:_}=m.current;if(!(f!=null&&f.current()))return!1;g.current&&(clearTimeout(g.current),g.current=null);const N=x.current,y=r.current,u=++C.current,s=await _(N);return s.status!=="changed"&&s.status!=="no_op"||s.confirmed.content!==N||r.current!==y||C.current!==u||m.current.binding!==f||m.current.save!==_||!f.current()?!1:((a=b.current)==null||a.cancel(),b.current=null,l.current={revision:y,attempt:u,binding:f,save:_},!0)}});return F.current=w,()=>w.retire()},[e,i,x,r,C,g,b]),F}function pe(e,i,j){var u;const o=n.useRef(e),x=n.useRef(null),r=n.useRef(null),[C,g]=n.useState({identity:e.identity,phase:"pending",busy:!1});n.useLayoutEffect(()=>{o.current=e},[e]);const b=n.useCallback((s,a)=>{x.current===s&&o.current.identity===s&&o.current.current()&&g(h=>({identity:s,...a,historical:a.historical??(h.identity===s?h.historical:void 0)}))},[]),d=n.useCallback(s=>{x.current!==s||o.current.identity!==s||g(a=>a.identity===s?{...a,phase:"unavailable",busy:!1}:{identity:s,phase:"unavailable",busy:!1})},[]),m=e.identity,F=e.supported;n.useLayoutEffect(()=>{const s=o.current;r.current=null,x.current=m;let a=!1;return F&&i==="ready"&&s.discover().then(h=>{a||(h.status==="observed"?b(m,{phase:"ready",discovery:h.value,busy:!1}):h.status!=="idle"?b(m,{phase:"unavailable",busy:!1}):d(m))}),()=>{a=!0,r.current=null,x.current===m&&(x.current=null)}},[m,F,i,j,b,d]);const l=C.identity===e.identity?C:void 0,k=n.useCallback(async()=>{const s=o.current,a=s.identity;if(x.current!==a||!s.current())return;r.current=null,g(c=>({identity:a,phase:"pending",busy:!0,historical:c.identity===a?c.historical:void 0}));const h=await s.discover(!0);h.status==="observed"?b(a,{phase:"ready",discovery:h.value,busy:!1}):h.status!=="idle"?b(a,{phase:"unavailable",busy:!1}):d(a)},[b,d]),w=n.useCallback(async s=>{const a=o.current,h=a.identity;if(x.current!==h||!a.current())return;r.current=null,g(p=>({identity:h,phase:"pending",busy:!0,discovery:p.identity===h?p.discovery:void 0,historical:p.identity===h?p.historical:void 0}));const c=await a.recover(s);c.status==="observed"?b(h,{phase:"ready",discovery:c.value.discovery,historical:c.value.result.entry,busy:!1}):c.status!=="idle"?b(h,{phase:c.status==="local_uncertain"?"local_uncertain":"unavailable",busy:!1}):d(h)},[b,d]),f=n.useCallback(async()=>{const s=o.current,a=s.identity;if(x.current!==a||!s.current())return{status:"idle"};const h={};r.current=h,g(p=>p.identity===a?{...p,phase:"pending",busy:!0}:p);const c=await s.inspectCurrent();return r.current!==h?{status:"idle"}:(r.current=null,c.status==="idle"&&d(a),x.current===a&&o.current.identity===a&&s.current()&&c.status!=="idle"&&g(p=>p.identity===a?{...p,phase:c.status==="observed"?"ready":c.status==="local_uncertain"?"local_uncertain":"unavailable",busy:!1}:p),c)},[d]),_=e.supported&&i==="ready",N=i==="pending"?"pending":(l==null?void 0:l.phase)??"pending",y=_&&(N!=="ready"||((u=l==null?void 0:l.discovery)==null?void 0:u.admission)==="blocked");return{supported:_,phase:N,editBlocked:y,busy:(l==null?void 0:l.busy)??N==="pending",discovery:l==null?void 0:l.discovery,historical:l==null?void 0:l.historical,refresh:k,recover:w,inspectCurrent:f}}function me({recovery:e,editing:i,loadCurrent:j}){var o,x;return e.supported?t.jsxs("section",{"aria-label":"Previous file saves",className:"mx-2 mt-2 rounded border p-2 text-sm",children:[e.phase==="pending"&&t.jsx("p",{role:"status",children:"Checking previous saves…"}),e.phase==="unavailable"&&t.jsx("p",{role:"alert",children:"Previous save evidence is unavailable. New saves stay blocked until it can be checked."}),e.phase==="local_uncertain"&&t.jsx("p",{role:"alert",children:"Use Retry original save. Checking previous saves won’t confirm this save."}),((o=e.discovery)==null?void 0:o.admission)==="blocked"&&t.jsx("p",{role:"alert",children:"An unresolved original save blocks this file. This list may not include the blocking operation."}),e.discovery&&t.jsxs(t.Fragment,{children:[!e.discovery.entries.length&&t.jsx("p",{children:"No matching recent saves."}),e.discovery.hasMore&&t.jsx("p",{children:"Only the latest 25 matching saves are shown. Older evidence is omitted."}),t.jsx("ul",{children:e.discovery.entries.map(r=>t.jsxs("li",{children:[t.jsxs("span",{children:[r.eventId,":"," ",r.state==="receipt"?"Historical save recorded":r.state==="review"?"Original save needs review":r.state==="no_op"?"Original save made no change":"Original save failed before replacement"]}),r.state==="review"&&(r.reason==="prepared_without_replacement"?t.jsx("p",{children:"This save needs manual review. These controls won’t write the file."}):t.jsxs(t.Fragment,{children:[t.jsx("p",{children:"The original saved replacement must be proven before its receipt can be settled."}),t.jsx(S,{type:"button",size:"sm",variant:"ghost",disabled:e.busy||i,onClick:()=>void e.recover(r.eventId),children:"Recover original receipt"})]}))]},r.eventId))})]}),((x=e.historical)==null?void 0:x.state)==="receipt"&&t.jsxs("div",{role:"status",children:[t.jsx("p",{children:"Previous save confirmed. Your current draft may differ."}),t.jsx("p",{children:e.historical.currentFileMatch==="different"?"The current file differs from that historical save.":e.historical.currentFileMatch==="same_saved_replacement"?"The saved replacement matched when checked; current bytes still require a fresh load.":"The current file was not checked."})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(S,{type:"button",size:"sm",variant:"ghost",disabled:e.busy||i,onClick:()=>void e.refresh(),children:"Check previous saves"}),t.jsx(S,{type:"button",size:"sm",variant:"ghost",disabled:i||e.editBlocked||e.busy,onClick:j,children:"Load current file"})]}),t.jsx("p",{children:"These controls don’t resend drafts or confirm agent delivery. Use Load current file."})]}):null}const ye=n.lazy(()=>$(()=>import("./CodeMirrorEditor-BX1bJlnT.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.CodeMirrorEditor}))),xe=n.lazy(()=>$(()=>import("./BlintzCanvas-DUDSNxlM.js"),__vite__mapDeps([5,1,2,4,6])).then(e=>({default:e.BlintzCanvas}))),be=500;function ge(e,i){return i==="markdown"||/\.(md|markdown|mdx)$/i.test(e)}function je(e){switch(e){case"saving":return"Saving…";case"saved":return"Saved";case"error":return"Couldn’t save";case"uncertain":return"Save not confirmed";default:return null}}function G({content:e,documentId:i,cwd:j,loaded:o,theme:x,isEditing:r,onEditingChange:C,setDocumentEditing:g,observedBinding:b,fileSaveObservation:d="unavailable",recoveryBinding:m}){const F=e.readOnly!==!0,l=ge(e.sourcePath,e.language),k=ne(),[w,f]=n.useState(o),[_,N]=n.useState(),y=n.useRef(b);n.useLayoutEffect(()=>{y.current=b},[b]);const u=de({documentId:i,sourcePath:e.sourcePath,cwd:j,loadedContent:o,documentSaveBinding:_,documentRecoveryBinding:m}),s=pe(u.recovery,d,m),a=n.useRef(!1),h=n.useRef(r);n.useLayoutEffect(()=>(a.current=!0,h.current=r,()=>{a.current=!1}),[r]);const c=n.useRef(null),p=n.useRef(w),L=n.useRef(0),B=n.useRef(0),E=n.useRef(u.save),I=n.useRef(u.prepareFinalSave),Q=n.useRef(u.waitForCloseDrain),z=n.useRef(null),U=n.useRef(C),H=ve({documentId:i,sourcePath:e.sourcePath,binding:_,save:u.save,draftRef:p,revisionRef:L,finishAttemptRef:B,timerRef:c,finalSaveRef:z,invalidateConfirmedFile:()=>{k.invalidateQueries({queryKey:O(j,e.sourcePath)}).catch(()=>{})}});n.useEffect(()=>{p.current=w,E.current=u.save,I.current=u.prepareFinalSave,Q.current=u.waitForCloseDrain,U.current=C});const K=n.useCallback(v=>{var R;L.current+=1,p.current=v,f(v),(R=z.current)==null||R.cancel(),z.current=I.current(v),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,E.current(p.current)},be)},[]),J=()=>{var P;if(s.editBlocked||d==="pending"||d==="ready"&&!((P=y.current)!=null&&P.current()))return;const v=y.current,R=v&&Object.freeze({...v.incarnation});N(v!=null&&v.current()&&R?{incarnation:R,current:()=>{const T=y.current;return!!T&&ce(R,T.incarnation)&&T.current()}}:void 0),L.current+=1,p.current=o,f(o),C(!0),g(i,!0)},W=async()=>{c.current&&(clearTimeout(c.current),c.current=null);const v=p.current,R=L.current,P=++B.current,T=await E.current(v);if(T.status!=="changed"&&T.status!=="no_op"||L.current!==R||B.current!==P||T.confirmed.content!==v)return;const A=T.confirmed;A.content===p.current&&k.setQueryData(O(j,e.sourcePath),M=>M&&{...M,content:A.content,hash:A.hash}),C(!1),g(i,!1)},X=()=>{k.invalidateQueries({queryKey:O(j,e.sourcePath)})};n.useEffect(()=>{var v;r||(c.current&&clearTimeout(c.current),c.current=null,(v=z.current)==null||v.cancel(),z.current=null)},[r]),n.useEffect(()=>{const v=H.current;return()=>{var T;c.current&&(clearTimeout(c.current),c.current=null);const R=(T=z.current)==null?void 0:T.flush(),P=p.current;v==null||v.settleRetirement(Promise.resolve(R).then(()=>Q.current(P))),z.current=null,g(i,!1),U.current(!1)}},[i,g,H]);const Z=async()=>{if(r||!a.current||s.editBlocked)return;const v=L.current,R=await s.inspectCurrent();R.status!=="observed"||!a.current||h.current||L.current!==v||!u.recovery.current()||k.setQueryData(O(j,e.sourcePath),P=>P&&{...P,...R.value})},ee=()=>{const v=u.adoptDisk();v!=null&&f(v)},te=()=>{u.overwrite(p.current)},V=u.status==="saved"?u.confirmedContent!==w?"Unsaved changes":u.documentReceipt?"Save recorded":"Saved to file":je(u.status),Y=r?w:o;return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsxs("div",{className:"sticky top-0 z-10 flex h-0 items-start justify-end gap-2 pr-2",children:[F&&V&&t.jsx("span",{className:se("mt-3 text-xs",u.status==="error"?"text-destructive":"text-muted-foreground"),"aria-live":"polite",children:V}),!r&&d==="pending"&&t.jsx("span",{role:"status",children:"Checking document…"}),!r&&t.jsx(S,{type:"button",variant:"ghost",size:"icon-md",className:"text-muted-foreground hover:text-foreground mt-2",onClick:X,"aria-label":"Refresh from disk",children:t.jsx(he,{className:"size-4"})}),F&&t.jsx(S,{type:"button",variant:"ghost",size:"icon-md",className:"text-muted-foreground hover:text-foreground mt-2",onClick:r?()=>void W():J,"aria-label":r?"Finish editing":"Edit file",disabled:!r&&(d==="pending"||s.editBlocked),"data-document-save-observation":d,children:r?t.jsx(ae,{className:"size-4"}):t.jsx(ie,{className:"size-4"})})]}),t.jsx(me,{recovery:s,editing:r,loadCurrent:()=>void Z()}),u.status==="uncertain"&&t.jsxs("div",{role:"status",className:"mx-2 mt-2 flex items-center gap-2 text-sm",children:[t.jsx("span",{children:"Save not confirmed. Retry the original save before saving another draft."}),t.jsx(S,{type:"button",variant:"ghost",size:"sm",onClick:()=>void u.retryUnconfirmed(),children:"Retry original save"})]}),u.status==="conflict"&&t.jsxs("div",{className:"bg-destructive/10 text-destructive mx-2 mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md px-3 py-2 text-sm",children:[t.jsx("span",{className:"flex-1",children:"This file changed on disk since you opened it."}),t.jsx(S,{type:"button",variant:"ghost",size:"sm",className:"h-7",onClick:ee,children:"Reload"}),t.jsx(S,{type:"button",variant:"destructive",size:"sm",className:"h-7",onClick:te,children:"Overwrite"})]}),t.jsx("div",{className:"min-h-0 flex-1",children:t.jsx(n.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading editor…"}),children:l?t.jsx("div",{className:"px-2 pb-6",children:t.jsx(xe,{value:Y,editable:r,onChange:r?K:void 0})}):t.jsx(ye,{value:Y,editable:r,filename:e.sourcePath,languageHint:e.language,theme:x,onChange:r?K:void 0})})})]})}function Ce(e){const{fileSaveBinding:i,fileSaveObservation:j}=fe(e.documentId);return t.jsx(G,{...e,observedBinding:i,recoveryBinding:i,fileSaveObservation:j})}function Re(e){switch(e==null?void 0:e.code){case"NOT_FOUND":return"This file doesn’t exist.";case"NOT_A_FILE":return"This path is a directory, not a file.";case"TOO_LARGE":return"This file is too large to open here.";case"BINARY_FILE":return"This file isn’t text, so the editor can’t show it.";default:return"This file couldn’t be loaded."}}function qe({content:e,documentId:i}){const j=ue(),o=D(y=>y.selectedCwd),x=D(y=>y.setDocumentEditing),r=D(y=>{var u;return((u=y.openDocuments.find(s=>s.id===i))==null?void 0:u.editing)??!1}),C=oe(),g=D(y=>y.canvasSessionId),b=D(y=>y.roomCanvasLiveRoomId),{data:d,error:m,isLoading:F}=le({queryKey:O(o,e.sourcePath),enabled:o!==null,queryFn:()=>j.readFileContent(o,e.sourcePath),staleTime:3e4,retry:!1}),[l,k]=n.useState(null),w=y=>{k(y&&d?{pinnedHash:d.hash}:null)};if(o===null)return t.jsx(q,{children:"Open a chat to view files."});if(F)return t.jsx(q,{children:"Loading file…"});if(m||!d)return t.jsx(q,{children:Re(m)});const f=l!==null&&r,_=(f?l==null?void 0:l.pinnedHash:null)??d.hash,N=g&&!b?Ce:G;return t.jsx(N,{content:e,documentId:i,cwd:o,loaded:d.content,theme:C,isEditing:f,onEditingChange:w,setDocumentEditing:x},`${e.sourcePath}:${_}`)}function q({children:e}){return t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:e})})}export{qe as CanvasFileContent};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Model3dViewer-CZYCij-x.js","assets/index-CMaIfS_G.js","assets/index-D5QS-i8I.css"])))=>i.map(i=>d[i]);
2
- import{a8 as m,b0 as n,r as o,j as t,b3 as u}from"./index-CMaIfS_G.js";import{r as d}from"./use-session-canvas-CAxswuAf.js";import"./rotate-cw-CdW7VTvV.js";import"./WidgetErrorCard-BeQ2x8Ar.js";import"./card-BaRHWQF1.js";import"./progress--zm5Rh4c.js";import"./markdown-content-irJMN3oI.js";import"./table-CK_OyzSy.js";import"./terminal-CqyyqODz.js";import"./package-DzrvXxqm.js";import"./heart-BwQb2EFQ.js";import"./git-branch-DPgttvPa.js";import"./file-text-CwK7EV60.js";import"./file-D3iv2i0G.js";import"./McpAppFrame-BQxyYB23.js";import"./more-details-CwkthrCT.js";const p=o.lazy(()=>u(()=>import("./Model3dViewer-CZYCij-x.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.Model3dViewer})));function f(e){var s;const r=(s=e.split(".").pop())==null?void 0:s.toLowerCase();return r==="glb"||r==="gltf"?"gltf":r==="stl"?"stl":r==="obj"?"obj":r==="3mf"?"3mf":r==="ply"?"ply":r==="fbx"?"fbx":r==="dae"?"dae":null}function T({content:e}){const r=m(),s=n(l=>l.selectedCwd),i=o.useMemo(()=>d(e.src,l=>r.mediaUrl(s??"",l)),[e.src,r,s]),a=o.useMemo(()=>f(e.src),[e.src]);return i.url===null||a===null?t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:"This 3D model can’t be displayed here."})}):t.jsx("div",{className:"bg-muted/40 h-full w-full",children:t.jsx(o.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading 3D viewer…"}),children:t.jsx(p,{url:i.url,format:a,label:e.title??"Canvas 3D model"})})})}export{T as CanvasModel3dContent,f as formatOf};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Model3dViewer-C9ODHy5I.js","assets/index-C8-dwIPp.js","assets/index-BDCqg2iM.css"])))=>i.map(i=>d[i]);
2
+ import{a1 as m,aV as n,r as o,j as t,aW as u}from"./index-C8-dwIPp.js";import{r as d}from"./use-session-canvas-CUvHGgMf.js";import"./rotate-cw-DD2nOAQ-.js";import"./WidgetErrorCard-CT4sl_T6.js";import"./card-B_zeSZiU.js";import"./progress-Cvnh4Qcr.js";import"./markdown-content-GoymYcRL.js";import"./table-Rll_Jxd8.js";import"./terminal-Bjss9oke.js";import"./package-DM7e-GVa.js";import"./heart-BSVjeGLA.js";import"./git-branch-CKlZ81Bg.js";import"./file-text-BTj3WyHS.js";import"./file-Bwo21EVR.js";import"./McpAppFrame-D5Muf5Sf.js";import"./more-details-3dDtVYc6.js";const p=o.lazy(()=>u(()=>import("./Model3dViewer-C9ODHy5I.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.Model3dViewer})));function f(e){var s;const r=(s=e.split(".").pop())==null?void 0:s.toLowerCase();return r==="glb"||r==="gltf"?"gltf":r==="stl"?"stl":r==="obj"?"obj":r==="3mf"?"3mf":r==="ply"?"ply":r==="fbx"?"fbx":r==="dae"?"dae":null}function N({content:e}){const r=m(),s=n(l=>l.selectedCwd),i=o.useMemo(()=>d(e.src,l=>r.mediaUrl(s??"",l)),[e.src,r,s]),a=o.useMemo(()=>f(e.src),[e.src]);return i.url===null||a===null?t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:"This 3D model can’t be displayed here."})}):t.jsx("div",{className:"bg-muted/40 h-full w-full",children:t.jsx(o.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading 3D viewer…"}),children:t.jsx(p,{url:i.url,format:a,label:e.title??"Canvas 3D model"})})})}export{N as CanvasModel3dContent,f as formatOf};
@@ -1,4 +1,4 @@
1
- import{a2 as m,a8 as x,b0 as k,r as v,j as t,B as d,Q as p,ae as y}from"./index-CMaIfS_G.js";import{u as R}from"./use-update-config-9fndji1c.js";import{I as S}from"./inline-code-BDPvCbUE.js";/**
1
+ import{W as m,a1 as x,aV as k,r as v,j as t,B as d,G as p,a7 as y}from"./index-C8-dwIPp.js";import{u as R}from"./use-update-config-Bad4g6mB.js";import{I as S}from"./inline-code-Beal0546.js";/**
2
2
  * @license lucide-react v1.48.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.