dorkos 0.110.0 → 0.111.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 (173) hide show
  1. package/dist/bin/cli.js +57 -17
  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-C4kqKgU6.js → AboutPage-BKzqcz_A.js} +1 -1
  5. package/dist/client/assets/{ActivityErrorState-DiSxgHLa.js → ActivityErrorState-BXOZg9ve.js} +1 -1
  6. package/dist/client/assets/{ActivityPage-BQneQ83b.js → ActivityPage-CFN2MEAV.js} +1 -1
  7. package/dist/client/assets/{ActivityRow-BEKcGUIZ.js → ActivityRow-CujXx04u.js} +1 -1
  8. package/dist/client/assets/{AdapterIcon-CyEZ9jER.js → AdapterIcon-BdM7K69W.js} +1 -1
  9. package/dist/client/assets/{AdapterSetupWizard-DpnW23lt.js → AdapterSetupWizard-3Bt9HEWF.js} +1 -1
  10. package/dist/client/assets/{AgentRequestCard-DosR0AYu.js → AgentRequestCard-CAaBGC0L.js} +1 -1
  11. package/dist/client/assets/{AppearancePage-DIeNtC-G.js → AppearancePage-BEe-Gssu.js} +1 -1
  12. package/dist/client/assets/{AttentionSignalRow-B0nSHLwZ.js → AttentionSignalRow-Cp0AJs73.js} +1 -1
  13. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-BXMeIZyY.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-CN1iW2cB.js} +1 -1
  14. package/dist/client/assets/{BlintzCanvas-D-7b_-SG.js → BlintzCanvas-B7qs2dxW.js} +1 -1
  15. package/dist/client/assets/{CanvasCsvContent-iBvH55TS.js → CanvasCsvContent-DiB5zXOC.js} +1 -1
  16. package/dist/client/assets/{CanvasFileContent-C4LA1NRl.js → CanvasFileContent-CDNfnWMW.js} +2 -2
  17. package/dist/client/assets/{CanvasModel3dContent-BqLPKItZ.js → CanvasModel3dContent-C7EINmuq.js} +2 -2
  18. package/dist/client/assets/{CodeMirrorDiff-BfF4jWmG.js → CodeMirrorDiff-BJhflpbC.js} +1 -1
  19. package/dist/client/assets/{CodeMirrorEditor-gShkyo4u.js → CodeMirrorEditor-SkdXRKSN.js} +1 -1
  20. package/dist/client/assets/{CommitmentList-Bz1qfyAm.js → CommitmentList-DsEn6iK1.js} +1 -1
  21. package/dist/client/assets/{CommitmentsPage-BFnrzM5F.js → CommitmentsPage-W5h0GjRr.js} +1 -1
  22. package/dist/client/assets/{ConnectionAccessLists-C5dmaUUD.js → ConnectionAccessLists-DVFqelmV.js} +1 -1
  23. package/dist/client/assets/{ConnectionsPage-BX_hUzvu.js → ConnectionsPage-CZhSh2mO.js} +1 -1
  24. package/dist/client/assets/{ConventionPage-DHtiOJYZ.js → ConventionPage-DcDBP-vR.js} +1 -1
  25. package/dist/client/assets/{ExtensionPageRoute-DluAWT6h.js → ExtensionPageRoute-mKN8Jqyx.js} +1 -1
  26. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-IBBeJf7u.js → FloatingTanStackRouterDevtools-CqogiFob-CGXG-x9g.js} +1 -1
  27. package/dist/client/assets/HandlePage-Bun58ePo.js +1 -0
  28. package/dist/client/assets/{HeartbeatPage-DcispKV9.js → HeartbeatPage-DFf7Udem.js} +1 -1
  29. package/dist/client/assets/{LexicalField-CvW19ipK.js → LexicalField-vJ284m2H.js} +1 -1
  30. package/dist/client/assets/{ManagesPage-Dru8_kTd.js → ManagesPage-mDuaA2JT.js} +1 -1
  31. package/dist/client/assets/{Marketplace-UEST-d72.js → Marketplace-BoiupH2Z.js} +1 -1
  32. package/dist/client/assets/{MarketplaceSourcesView-2XwWS0fF.js → MarketplaceSourcesView-krw9hUyu.js} +1 -1
  33. package/dist/client/assets/{McpAppFrame-DcPNmy1o.js → McpAppFrame-DmHduNgp.js} +1 -1
  34. package/dist/client/assets/{McpSigninBody-YXQtYFSW.js → McpSigninBody-DoY09n4J.js} +1 -1
  35. package/dist/client/assets/{Model3dViewer-D9HznL8w.js → Model3dViewer-BZEdR7-9.js} +1 -1
  36. package/dist/client/assets/NamePage-CXyClUPJ.js +1 -0
  37. package/dist/client/assets/{NewDirectMessageMenu-DNd6s2qQ.js → NewDirectMessageMenu-BjqYwnXW.js} +1 -1
  38. package/dist/client/assets/{NotificationsPage-Dg7_d0Fo.js → NotificationsPage-CybW1eIb.js} +1 -1
  39. package/dist/client/assets/{OpenMeshSwitch-Dw8ylRP7.js → OpenMeshSwitch-DrmjsCDY.js} +1 -1
  40. package/dist/client/assets/{OperatorIdentityForm-DtA4qIAR.js → OperatorIdentityForm-byU2FeSU.js} +1 -1
  41. package/dist/client/assets/{PermissionsPage-ZEO9Crz4.js → PermissionsPage-CP3kbqyJ.js} +1 -1
  42. package/dist/client/assets/{PersonalityPopover-Cv26YoDX.js → PersonalityPopover-BLsjgaum.js} +1 -1
  43. package/dist/client/assets/PhotoPage-hn5b42qN.js +1 -0
  44. package/dist/client/assets/{PreviewRefusedNotice-CLOum_3D.js → PreviewRefusedNotice-fTN8MJ1h.js} +1 -1
  45. package/dist/client/assets/{PromptSuggestionChips-BMFNtxGR.js → PromptSuggestionChips-BZOaY5Tx.js} +1 -1
  46. package/dist/client/assets/{ReportsToPopover-CR7Exvh7.js → ReportsToPopover-B6JvfRt3.js} +1 -1
  47. package/dist/client/assets/{RoomSurface-Bq7667r4.js → RoomSurface-BM0QO_av.js} +3 -3
  48. package/dist/client/assets/{RoomsPage-DGOvUZFv.js → RoomsPage-B-NOCLXC.js} +1 -1
  49. package/dist/client/assets/{RunsOnPopover-CpS43xkI.js → RunsOnPopover-D1jQQatj.js} +1 -1
  50. package/dist/client/assets/{RuntimeSetupDialog-Bh0jopL-.js → RuntimeSetupDialog-ufwCvCJB.js} +1 -1
  51. package/dist/client/assets/{SessionsPage-Zfpi_q-8.js → SessionsPage-CBE1KHYg.js} +1 -1
  52. package/dist/client/assets/{SkillsPage-cjkbMED1.js → SkillsPage-CPTFjEUe.js} +1 -1
  53. package/dist/client/assets/{TasksPage-HQqmMSc-.js → TasksPage-BRUqs3v5.js} +1 -1
  54. package/dist/client/assets/{ToolsPage-Bo2_xjXO.js → ToolsPage-C25kL822.js} +1 -1
  55. package/dist/client/assets/{TopologyGraph-Is22VGxs.js → TopologyGraph-of6Cp5Kj.js} +1 -1
  56. package/dist/client/assets/{TourHost-DxBh58jt.js → TourHost-zwSilkjm.js} +1 -1
  57. package/dist/client/assets/{UnlinkDialog-B70UThXm.js → UnlinkDialog-BgwHAqdW.js} +1 -1
  58. package/dist/client/assets/{WidgetErrorCard-l8cP9oJc.js → WidgetErrorCard-BQwrR6PJ.js} +6 -6
  59. package/dist/client/assets/{_shell-pedi36wq.js → _shell-bcx2y7VT.js} +1 -1
  60. package/dist/client/assets/{_shell._home-9g2nykRD.js → _shell._home-BkP0NafS.js} +1 -1
  61. package/dist/client/assets/{_shell._home.activity-M0V2vwFy.js → _shell._home.activity-BO_2ciGK.js} +1 -1
  62. package/dist/client/assets/{_shell._home.index-8qVMuOhT.js → _shell._home.index-B-OFwU9u.js} +1 -1
  63. package/dist/client/assets/{_shell._home.tasks-fGzbxCP4.js → _shell._home.tasks-jAQczH7j.js} +1 -1
  64. package/dist/client/assets/{_shell._home.workspaces-BSeaYQDz.js → _shell._home.workspaces-B34Uk1SP.js} +1 -1
  65. package/dist/client/assets/{_shell.channels-DwyPOJGL.js → _shell.channels-CGzsxvXD.js} +1 -1
  66. package/dist/client/assets/_shell.connections-BNbeBrxQ.js +1 -0
  67. package/dist/client/assets/{_shell.feedback-requests-BPwtAQNY.js → _shell.feedback-requests-B71l48KB.js} +1 -1
  68. package/dist/client/assets/_shell.marketplace-3YAsNaRk.js +1 -0
  69. package/dist/client/assets/_shell.marketplace_.sources-cI3nNBXr.js +1 -0
  70. package/dist/client/assets/_shell.session-ybAc0bwn.js +66 -0
  71. package/dist/client/assets/{_shell.team-DKZ4y6kn.js → _shell.team-BE_60YS4.js} +3 -3
  72. package/dist/client/assets/_shell.x._extensionId-jiyP599c.js +1 -0
  73. package/dist/client/assets/_shell.x._extensionId_._-jiyP599c.js +1 -0
  74. package/dist/client/assets/{agent-browser-CSBlgMiw.js → agent-browser-Cs8abkZs.js} +1 -1
  75. package/dist/client/assets/{banner-D26eekSD.js → banner-CU2Nh3Kv.js} +1 -1
  76. package/dist/client/assets/{card-CTGm0Blo.js → card-BTgwskmX.js} +1 -1
  77. package/dist/client/assets/{file-B6neiwXF.js → file-DlQX-hKl.js} +1 -1
  78. package/dist/client/assets/{file-exclamation-point-B-iziRzy.js → file-exclamation-point-Dg2iCyPM.js} +1 -1
  79. package/dist/client/assets/{find-latest-widget-fence-Dw4BJ_cR.js → find-latest-widget-fence-BGiexm6r.js} +1 -1
  80. package/dist/client/assets/{git-branch-D9jctpSd.js → git-branch-Dq_w3Iyx.js} +1 -1
  81. package/dist/client/assets/{heart-cgLUdSV5.js → heart-Bp14wOx6.js} +1 -1
  82. package/dist/client/assets/{highlighted-body-KPVGNVTW-CEOricmN.js → highlighted-body-KPVGNVTW-kD1HK_wk.js} +1 -1
  83. package/dist/client/assets/{index-DcqBUr0N.js → index--3UwFg2s.js} +1 -1
  84. package/dist/client/assets/{index-CVzwL_3n.js → index-5OyUurJr.js} +1 -1
  85. package/dist/client/assets/{index-CUu6WsiU.js → index-B0OZehWe.js} +1 -1
  86. package/dist/client/assets/{index-BWnfydnq.js → index-B2JJZXsq.js} +1 -1
  87. package/dist/client/assets/{index-ZNJbhnlq.js → index-B6_ikFYj.js} +1 -1
  88. package/dist/client/assets/{index-1flHw44u.js → index-B8R78Nnj.js} +2 -2
  89. package/dist/client/assets/{index-bHlg-Jp8.js → index-BA-nPsLw.js} +1 -1
  90. package/dist/client/assets/{index-jD4A_p4E.js → index-BAjUSKoJ.js} +1 -1
  91. package/dist/client/assets/{index-CiIZQZuK.js → index-BHsZlKfx.js} +1 -1
  92. package/dist/client/assets/{index-BO2LMWbR.js → index-BeBmUxo_.js} +1 -1
  93. package/dist/client/assets/index-BpDY3eoD.js +1 -0
  94. package/dist/client/assets/{index-CqHifKay.js → index-BxUoa3yn.js} +1 -1
  95. package/dist/client/assets/{index-CLuxURdA.js → index-BxrZwUJp.js} +1 -1
  96. package/dist/client/assets/{index-vkTtWH-G.js → index-C-DN0Vg_.js} +1 -1
  97. package/dist/client/assets/{index-ClIP6HHR.js → index-C99173Ze.js} +1 -1
  98. package/dist/client/assets/{index-DKjP63zN.js → index-CAhJGlSW.js} +1 -1
  99. package/dist/client/assets/{index-CeCuaX5y.js → index-CDWsIVX7.js} +1 -1
  100. package/dist/client/assets/{index-tf4Y0hYZ.js → index-CKCMjqcu.js} +1 -1
  101. package/dist/client/assets/{index-K2hqr6x6.js → index-C_uYJzKi.js} +3 -3
  102. package/dist/client/assets/{index-CupP-VJi.js → index-Cc280M3V.js} +1 -1
  103. package/dist/client/assets/{index-D4em25Xt.js → index-CcV9S7cO.js} +1 -1
  104. package/dist/client/assets/{index-Bkfi8Myj.js → index-DHUToGjI.js} +1 -1
  105. package/dist/client/assets/{index-LP8S5WuT.js → index-DKQDBIWq.js} +1 -1
  106. package/dist/client/assets/{index-BfgOj4sK.js → index-DKlxz3u7.js} +1 -1
  107. package/dist/client/assets/{index-CBQqdBKL.js → index-DNglWRBB.js} +1 -1
  108. package/dist/client/assets/{index-CbDB1su1.js → index-DO6a5Hey.js} +1 -1
  109. package/dist/client/assets/{index-DQDCxGNh.js → index-DS-thlE8.js} +1 -1
  110. package/dist/client/assets/{index-CsjcT6BA.js → index-DSPs6GF4.js} +1 -1
  111. package/dist/client/assets/{index-DMmU6ZLq.js → index-DW6zqLoM.js} +1 -1
  112. package/dist/client/assets/{index-_nhqr_iZ.js → index-Dm53S0up.js} +1 -1
  113. package/dist/client/assets/{index-DckajKF2.js → index-DnmtTIUB.js} +1 -1
  114. package/dist/client/assets/{index-BZKMWkth.js → index-Dr-0P6rd.js} +239 -234
  115. package/dist/client/assets/{index-CGLE5zMG.js → index-F7Lcwnfm.js} +1 -1
  116. package/dist/client/assets/{index-B38pxhxw.js → index-LszRbEbX.js} +1 -1
  117. package/dist/client/assets/{index-lKqCjbqn.js → index-PxSRtDpP.js} +1 -1
  118. package/dist/client/assets/{index-BkYvXnXR.js → index-aDNEGBTK.js} +1 -1
  119. package/dist/client/assets/{index-C3tcDwG6.js → index-gu2JYnOq.js} +1 -1
  120. package/dist/client/assets/{index-BfDqp5Sv.js → index-kHXlTLUx.js} +7 -7
  121. package/dist/client/assets/{index-CSQHKTvU.js → index-knGXyHhh.js} +1 -1
  122. package/dist/client/assets/{kickoff-D-oHin9P.js → kickoff-Btbza7bw.js} +1 -1
  123. package/dist/client/assets/{layers-BpMm7sp6.js → layers-B0oCOfxz.js} +1 -1
  124. package/dist/client/assets/{lightbulb-CxP8HLlU.js → lightbulb-D80IzMqz.js} +1 -1
  125. package/dist/client/assets/{markdown-content-plNIomQc.js → markdown-content-aNzh-54y.js} +1 -1
  126. package/dist/client/assets/{mention-pill-B9c_KFvY.js → mention-pill-BxMK0xuY.js} +1 -1
  127. package/dist/client/assets/{message-square-off-8wAP6cRG.js → message-square-off-D-CJXmTq.js} +1 -1
  128. package/dist/client/assets/{owner-notice-CopwUeso.js → owner-notice-BkrTEMDm.js} +1 -1
  129. package/dist/client/assets/{package-B7amjGSw.js → package-CoTlAnXZ.js} +1 -1
  130. package/dist/client/assets/{page-container-DMx2f-Ca.js → page-container-CPxW5T9E.js} +1 -1
  131. package/dist/client/assets/{paperclip-CA9pcNn6.js → paperclip-Cj1P85mz.js} +1 -1
  132. package/dist/client/assets/{radio-B4GY45ie.js → radio-DICkTr_p.js} +1 -1
  133. package/dist/client/assets/{room-files-source-91oNy8mM.js → room-files-source-BywWQPBN.js} +1 -1
  134. package/dist/client/assets/{rotate-ccw-clock-C-ftj_rU.js → rotate-ccw-clock-cx5RyP4l.js} +1 -1
  135. package/dist/client/assets/{rotate-cw-TrlUqVdq.js → rotate-cw-DrGRGSwy.js} +1 -1
  136. package/dist/client/assets/{scroll-area-DKse0rZa.js → scroll-area-XlDz8u4m.js} +1 -1
  137. package/dist/client/assets/{search-x-DvMuhABO.js → search-x-LIKnWE64.js} +1 -1
  138. package/dist/client/assets/{shield-x-ZcQ8NB0Z.js → shield-x-DioB6qH_.js} +1 -1
  139. package/dist/client/assets/{soul-file-B_MwZHvh.js → soul-file-C7YgkNET.js} +1 -1
  140. package/dist/client/assets/{table-BJDpTBxJ.js → table-P4N5xQn2.js} +1 -1
  141. package/dist/client/assets/{use-connector-management-BZ-sfu8O.js → use-connector-management-pgVHbXoO.js} +1 -1
  142. package/dist/client/assets/{use-delete-binding-XWrr4lIB.js → use-delete-binding-DxEiOjjh.js} +1 -1
  143. package/dist/client/assets/{use-dev-links-daERqZ4e.js → use-dev-links-BImQrE6g.js} +1 -1
  144. package/dist/client/assets/{use-external-adapter-catalog-DE5zmChu.js → use-external-adapter-catalog-D8KHMSZU.js} +1 -1
  145. package/dist/client/assets/{use-full-activity-feed-DkDB2i0G.js → use-full-activity-feed-2o7GNAMe.js} +1 -1
  146. package/dist/client/assets/use-is-below-desktop-DBet5zg_.js +1 -0
  147. package/dist/client/assets/{use-jump-back-in-Dm-2B4la.js → use-jump-back-in-D9tBJ4v5.js} +1 -1
  148. package/dist/client/assets/{use-mesh-topology-DXFAk9hJ.js → use-mesh-topology-DBeqzUoy.js} +1 -1
  149. package/dist/client/assets/use-pending-read-DmrlNHS0.js +1 -0
  150. package/dist/client/assets/{use-personality-commit-CgQm9Y7m.js → use-personality-commit-Gfoi__sT.js} +1 -1
  151. package/dist/client/assets/{use-promo-activation-CZMwcIvl.js → use-promo-activation-Bv1gnqKq.js} +1 -1
  152. package/dist/client/assets/{use-pulse-freshness-CKzRoyfz.js → use-pulse-freshness-SFRdnugS.js} +1 -1
  153. package/dist/client/assets/{use-room-follow-claim-TvE0bgPq.js → use-room-follow-claim-Cf20JiJ_.js} +1 -1
  154. package/dist/client/assets/{use-roving-tab-list-DlrB639e.js → use-roving-tab-list-3Pb7ps4E.js} +1 -1
  155. package/dist/client/assets/{use-session-canvas-8hTR83y8.js → use-session-canvas-BaXuEhw8.js} +4 -4
  156. package/dist/client/assets/{use-session-diagnostics-DAd4CfKM.js → use-session-diagnostics-7xxJ6zQQ.js} +1 -1
  157. package/dist/client/assets/{use-unclaimed-chats-DKLFamqB.js → use-unclaimed-chats-D4k-EK_f.js} +1 -1
  158. package/dist/client/index.html +1 -1
  159. package/dist/server/index.js +865 -216
  160. package/dist/server/index.js.map +2 -2
  161. package/package.json +3 -3
  162. package/dist/client/assets/HandlePage-CjinTYw3.js +0 -1
  163. package/dist/client/assets/NamePage-D5q8YN0G.js +0 -1
  164. package/dist/client/assets/PhotoPage-BYtfMHJD.js +0 -1
  165. package/dist/client/assets/_shell.connections-DQ8AztAx.js +0 -6
  166. package/dist/client/assets/_shell.marketplace-CiM3PSqV.js +0 -1
  167. package/dist/client/assets/_shell.marketplace_.sources-C5u-WJmL.js +0 -1
  168. package/dist/client/assets/_shell.session-DYCz4inz.js +0 -66
  169. package/dist/client/assets/_shell.x._extensionId-C1fzIfH4.js +0 -1
  170. package/dist/client/assets/_shell.x._extensionId_._-C1fzIfH4.js +0 -1
  171. package/dist/client/assets/index-AYHwV9IU.js +0 -1
  172. package/dist/client/assets/use-is-below-desktop-B-Dt4c9S.js +0 -1
  173. package/dist/client/assets/use-pending-read-CH_0XPYp.js +0 -1
@@ -1 +1 @@
1
- import{r as d,hB as b,j as L,B as ve,Z as Ue,hC as Ce,dJ as Ze,e8 as Xe,dt as U,l as Q,hD as Qe,ae as Je,af as et,aj as tt,hE as me,ag as nt,hF as rt,eN as ot,g1 as it,b8 as st,aS as at,dw as lt,bV as ct,eT as ut,aN as ge}from"./index-BZKMWkth.js";import{D as z}from"./dorkbot-templates-8Yu9POWJ.js";import{u as ft}from"./use-external-adapter-catalog-DE5zmChu.js";var dt={attributes:!0,characterData:!0,subtree:!0,childList:!0};function ht(e,t,n=dt){d.useEffect(()=>{if(e.current){const r=new MutationObserver(t);return r.observe(e.current,n),()=>{r.disconnect()}}},[t,n])}var Le=(function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(o,s){return o[0]===n?(r=s,!0):!1}),r}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),o=this.__entries__[r];return o&&o[1]},t.prototype.set=function(n,r){var o=e(this.__entries__,n);~o?this.__entries__[o][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,o=e(r,n);~o&&r.splice(o,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var o=0,s=this.__entries__;o<s.length;o++){var i=s[o];n.call(r,i[1],i[0])}},t})()})(),ue=typeof window<"u"&&typeof document<"u"&&window.document===document,te=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),pt=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(te):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),vt=2;function mt(e,t){var n=!1,r=!1,o=0;function s(){n&&(n=!1,e()),r&&a()}function i(){pt(s)}function a(){var c=Date.now();if(n){if(c-o<vt)return;r=!0}else n=!0,r=!1,setTimeout(i,t);o=c}return a}var gt=20,bt=["top","right","bottom","left","width","height","size","weight"],yt=typeof MutationObserver<"u",wt=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=mt(this.refresh.bind(this),gt)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!ue||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),yt?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!ue||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,o=bt.some(function(s){return!!~r.indexOf(s)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),Me=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e}),B=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||te}),Te=ie(0,0,0,0);function ne(e){return parseFloat(e)||0}function be(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,o){var s=e["border-"+o+"-width"];return r+ne(s)},0)}function _t(e){for(var t=["top","right","bottom","left"],n={},r=0,o=t;r<o.length;r++){var s=o[r],i=e["padding-"+s];n[s]=ne(i)}return n}function Et(e){var t=e.getBBox();return ie(0,0,t.width,t.height)}function Ot(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Te;var r=B(e).getComputedStyle(e),o=_t(r),s=o.left+o.right,i=o.top+o.bottom,a=ne(r.width),c=ne(r.height);if(r.boxSizing==="border-box"&&(Math.round(a+s)!==t&&(a-=be(r,"left","right")+s),Math.round(c+i)!==n&&(c-=be(r,"top","bottom")+i)),!Rt(e)){var u=Math.round(a+s)-t,l=Math.round(c+i)-n;Math.abs(u)!==1&&(a-=u),Math.abs(l)!==1&&(c-=l)}return ie(o.left,o.top,a,c)}var xt=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof B(e).SVGGraphicsElement}:function(e){return e instanceof B(e).SVGElement&&typeof e.getBBox=="function"}})();function Rt(e){return e===B(e).document.documentElement}function St(e){return ue?xt(e)?Et(e):Ot(e):Te}function kt(e){var t=e.x,n=e.y,r=e.width,o=e.height,s=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,i=Object.create(s.prototype);return Me(i,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),i}function ie(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Ct=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ie(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=St(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),Lt=(function(){function e(t,n){var r=kt(n);Me(this,{target:t,contentRect:r})}return e})(),Mt=(function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new Le,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof B(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new Ct(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof B(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new Lt(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),Ae=typeof WeakMap<"u"?new WeakMap:new Le,Ie=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=wt.getInstance(),r=new Mt(t,n,this);Ae.set(this,r)}return e})();["observe","unobserve","disconnect"].forEach(function(e){Ie.prototype[e]=function(){var t;return(t=Ae.get(this))[e].apply(t,arguments)}});var Tt=(function(){return typeof te.ResizeObserver<"u"?te.ResizeObserver:Ie})(),At=({mutationObservables:e,resizeObservables:t,refresh:n})=>{const[r,o]=d.useState(0),s=d.useRef(document.documentElement||document.body);function i(c){const u=Array.from(c);for(const l of u)if(e){if(!l.attributes)continue;e.find(v=>l.matches(v))&&n(!0)}}function a(c){const u=Array.from(c);for(const l of u)if(t){if(!l.attributes)continue;t.find(v=>l.matches(v))&&o(r+1)}}return ht(s,c=>{for(const u of c)u.addedNodes.length!==0&&(i(u.addedNodes),a(u.addedNodes)),u.removedNodes.length!==0&&(i(u.removedNodes),a(u.removedNodes))},{childList:!0,subtree:!0}),d.useEffect(()=>{if(!t)return;const c=new Tt(()=>{n()});for(const u of t){const l=document.querySelector(u);l&&c.observe(l)}return()=>{c.disconnect()}},[t,r]),null},It=At;function ee(e){let t=Pe;return e&&(t=e.getBoundingClientRect()),t}function Pt(e,t){const[n,r]=d.useState(Pe),o=d.useCallback(()=>{e!=null&&e.current&&r(ee(e==null?void 0:e.current))},[e==null?void 0:e.current]);return d.useEffect(()=>(o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)),[e==null?void 0:e.current,t]),n}var Pe={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0};function Dt(e,t){return new Promise(n=>{if(!(e instanceof Element))throw new TypeError("Argument 1 must be an Element");let r=0,o=null;const s=Object.assign({behavior:"smooth"},t);e.scrollIntoView(s),requestAnimationFrame(i);function i(){const a=e==null?void 0:e.getBoundingClientRect().top;if(a===o){if(r++>2)return n(null)}else r=0,o=a;requestAnimationFrame(i)}})}function J(e){return e<0?0:e}function Nt(e){return typeof e=="object"&&e!==null?{thresholdX:e.x||0,thresholdY:e.y||0}:{thresholdX:e||0,thresholdY:e||0}}function se(){const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0),t=Math.max(document.documentElement.clientHeight,window.innerHeight||0);return{w:e,h:t}}function Ht({top:e,right:t,bottom:n,left:r,threshold:o}){const{w:s,h:i}=se(),{thresholdX:a,thresholdY:c}=Nt(o);return e<0&&n-e>i?!0:e>=0+c&&r>=0+a&&n<=i-c&&t<=s-a}var ye=(e,t)=>e>t,we=(e,t)=>e>t;function jt(e,t=[]){const n=(r,o)=>t.includes(r)?1:t.includes(o)?-1:0;return Object.keys(e).map(r=>({position:r,value:e[r]})).sort((r,o)=>o.value-r.value).sort((r,o)=>n(r.position,o.position)).filter(r=>r.value>0).map(r=>r.position)}var ce=10;function fe(e=ce){return Array.isArray(e)?e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[1],e[0],e[1],e[0]]:e.length===3?[e[0],e[1],e[2],e[1]]:e.length>3?[e[0],e[1],e[2],e[3]]:[ce,ce]:[e,e,e,e]}var $t={maskWrapper:()=>({opacity:.7,left:0,top:0,position:"fixed",zIndex:99999,pointerEvents:"none",color:"#000"}),svgWrapper:({windowWidth:e,windowHeight:t,wpt:n,wpl:r})=>({width:e,height:t,left:Number(r),top:Number(n),position:"fixed"}),maskArea:({x:e,y:t,width:n,height:r})=>({x:e,y:t,width:n,height:r,fill:"black",rx:0}),maskRect:({windowWidth:e,windowHeight:t,maskID:n})=>({x:0,y:0,width:e,height:t,fill:"currentColor",mask:`url(#${n})`}),clickArea:({windowWidth:e,windowHeight:t,clipID:n})=>({x:0,y:0,width:e,height:t,fill:"currentcolor",pointerEvents:"auto",clipPath:`url(#${n})`}),highlightedArea:({x:e,y:t,width:n,height:r})=>({x:e,y:t,width:n,height:r,pointerEvents:"auto",fill:"transparent",display:"none"})};function zt(e){return(t,n)=>{const r=$t[t](n),o=e[t];return o?o(r,n):r}}var Ft=({padding:e=10,wrapperPadding:t=0,onClick:n,onClickHighlighted:r,styles:o={},sizes:s,className:i,highlightedAreaClassName:a,maskId:c,clipId:u})=>{const l=c||_e("mask__"),f=u||_e("clip__"),v=zt(o),[g,_,O,y]=fe(e),[p,E,x,k]=fe(t),{w:h,h:T}=se(),M=J((s==null?void 0:s.width)+y+_),C=J((s==null?void 0:s.height)+g+O),w=J((s==null?void 0:s.top)-g-p),R=J((s==null?void 0:s.left)-y-k),A=h-k-E,S=T-p-x,j=v("maskArea",{x:R,y:w,width:M,height:C}),$=v("highlightedArea",{x:R,y:w,width:M,height:C});return b.createElement("div",{style:v("maskWrapper",{}),onClick:n,className:i},b.createElement("svg",{width:A,height:S,xmlns:"http://www.w3.org/2000/svg",style:v("svgWrapper",{windowWidth:A,windowHeight:S,wpt:p,wpl:k})},b.createElement("defs",null,b.createElement("mask",{id:l},b.createElement("rect",{x:0,y:0,width:A,height:S,fill:"white"}),b.createElement("rect",{style:j,rx:j.rx?1:void 0})),b.createElement("clipPath",{id:f},b.createElement("polygon",{points:`0 0, 0 ${S}, ${R} ${S}, ${R} ${w}, ${R+M} ${w}, ${R+M} ${w+C}, ${R} ${w+C}, ${R} ${S}, ${A} ${S}, ${A} 0`}))),b.createElement("rect",{style:v("maskRect",{windowWidth:A,windowHeight:S,maskID:l})}),b.createElement("rect",{style:v("clickArea",{windowWidth:A,windowHeight:S,top:w,left:R,width:M,height:C,clipID:f})}),b.createElement("rect",{style:$,className:a,onClick:r,rx:$.rx?1:void 0})))},Vt=Ft;function _e(e){return e+Math.random().toString(36).substring(2,16)}var Wt=Object.defineProperty,re=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Ee=(e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oe=(e,t)=>{for(var n in t||(t={}))De.call(t,n)&&Ee(e,n,t[n]);if(re)for(var n of re(t))Ne.call(t,n)&&Ee(e,n,t[n]);return e},Bt=(e,t)=>{var n={};for(var r in e)De.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&re)for(var r of re(e))t.indexOf(r)<0&&Ne.call(e,r)&&(n[r]=e[r]);return n},qt={popover:()=>({position:"fixed",maxWidth:353,backgroundColor:"#fff",padding:"24px 30px",boxShadow:"0 0.5em 3em rgba(0, 0, 0, 0.3)",color:"inherit",zIndex:1e5,transition:"transform 0.3s",top:0,left:0})};function Gt(e){return(t,n)=>{const r=qt[t](n),o=e[t];return o?o(r,n):r}}var Kt=e=>{var t=e,{children:n,position:r="bottom",padding:o=10,styles:s={},sizes:i,refresher:a}=t,c=Bt(t,["children","position","padding","styles","sizes","refresher"]);const u=d.useRef(null),l=d.useRef(""),f=d.useRef(""),v=d.useRef(""),{w:g,h:_}=se(),O=Gt(s),y=Pt(u,a),{width:p,height:E}=y,[x,k,h,T]=fe(o),M=(i==null?void 0:i.left)-T,C=(i==null?void 0:i.top)-x,w=(i==null?void 0:i.right)+k,R=(i==null?void 0:i.bottom)+h,A=r&&typeof r=="function"?r({width:p,height:E,windowWidth:g,windowHeight:_,top:C,left:M,right:w,bottom:R,x:i.x,y:i.y},y):r,S={left:M,right:g-w,top:C,bottom:_-R},j=(I,D,N)=>{switch(I){case"top":return S.top>E+h;case"right":return D?!1:S.right>p+T;case"bottom":return N?!1:S.bottom>E+x;case"left":return S.left>p+k;default:return!1}},$=(I,D,N)=>{const m=jt(S,N?["right","left"]:D?["top","bottom"]:[]);for(let H=0;H<m.length;H++)if(j(m[H],D,N))return l.current=m[H],I[m[H]];return l.current="center",I.center},G=(I=>{if(Array.isArray(I)){const V=ye(I[0],g),le=we(I[1],_);return l.current="custom",[V?g/2-p/2:I[0],le?_/2-E/2:I[1]]}const D=ye(M+p,g),N=we(R+E,_),m=D?Math.min(M,g-p):Math.max(M,0),H=N?E>S.bottom?Math.max(R-E,0):Math.max(C,0):C;N&&E>S.bottom?f.current="bottom":f.current="top",D?v.current="left":v.current="right";const K={top:[m-T,C-E-h],right:[w+T,H-x],bottom:[m-T,R+x],left:[M-p-k,H-x],center:[g/2-p/2,_/2-E/2]};return I==="center"||j(I,D,N)&&!D&&!N?(l.current=I,K[I]):$(K,D,N)})(A);return b.createElement("div",Oe({className:"reactour__popover",style:Oe({transform:`translate(${Math.round(G[0])}px, ${Math.round(G[1])}px)`},O("popover",{position:l.current,verticalAlign:f.current,horizontalAlign:v.current,helperRect:y,targetRect:i})),ref:u},c),n)},Yt=Kt,Ut=Object.defineProperty,Zt=Object.defineProperties,Xt=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,xe=(e,t,n)=>t in e?Ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))He.call(t,n)&&xe(e,n,t[n]);if(oe)for(var n of oe(t))je.call(t,n)&&xe(e,n,t[n]);return e},he=(e,t)=>Zt(e,Xt(t)),Z=(e,t)=>{var n={};for(var r in e)He.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&oe)for(var r of oe(e))t.indexOf(r)<0&&je.call(e,r)&&(n[r]=e[r]);return n},Qt={bottom:0,height:0,left:0,right:0,top:0,width:0,windowWidth:0,windowHeight:0,x:0,y:0};function Jt(e,t={block:"center",behavior:"smooth",inViewThreshold:0}){const[n,r]=d.useState(!1),[o,s]=d.useState(!1),[i,a]=d.useState(!1),[c,u]=d.useState(null),[l,f]=d.useState(Qt),v=(e==null?void 0:e.selector)instanceof Element?e==null?void 0:e.selector:document.querySelector(e==null?void 0:e.selector),g=d.useCallback(()=>{const O=Re(v,e==null?void 0:e.highlightedSelectors,e==null?void 0:e.bypassElem),{hasHighligtedElems:y}=O,p=Z(O,["hasHighligtedElems"]);Object.entries(l).some(([E,x])=>p[E]!==x)&&f(p)},[v,e==null?void 0:e.highlightedSelectors,l]);d.useEffect(()=>(g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)),[v,e==null?void 0:e.highlightedSelectors,c]),d.useEffect(()=>{!Ht(he(P({},l),{threshold:t.inViewThreshold}))&&v&&(r(!0),Dt(v,t).then(()=>{o||u(Date.now())}).finally(()=>{r(!1)}))},[l]);const _=d.useCallback(()=>{s(!0);const O=Re(v,e==null?void 0:e.highlightedSelectors,e==null?void 0:e.bypassElem),{hasHighligtedElems:y}=O,p=Z(O,["hasHighligtedElems"]);a(y),f(p),s(!1)},[v,e==null?void 0:e.highlightedSelectors,l]);return{sizes:l,transition:n,target:v,observableRefresher:_,isHighlightingObserved:i}}function Re(e,t=[],n=!0){let r=!1;const{w:o,h:s}=se();if(!t)return he(P({},ee(e)),{windowWidth:o,windowHeight:s,hasHighligtedElems:!1});let i=ee(e),a={bottom:0,height:0,left:o,right:0,top:s,width:0};for(const u of t){const l=document.querySelector(u);if(!l||l.style.display==="none"||l.style.visibility==="hidden")continue;const f=ee(l);r=!0,n||!e?(f.top<a.top&&(a.top=f.top),f.right>a.right&&(a.right=f.right),f.bottom>a.bottom&&(a.bottom=f.bottom),f.left<a.left&&(a.left=f.left),a.width=a.right-a.left,a.height=a.bottom-a.top):(f.top<i.top&&(i.top=f.top),f.right>i.right&&(i.right=f.right),f.bottom>i.bottom&&(i.bottom=f.bottom),f.left<i.left&&(i.left=f.left),i.width=i.right-i.left,i.height=i.bottom-i.top)}const c=n||!e?a.width>0&&a.height>0:!1;return{left:(c?a:i).left,top:(c?a:i).top,right:(c?a:i).right,bottom:(c?a:i).bottom,width:(c?a:i).width,height:(c?a:i).height,windowWidth:o,windowHeight:s,hasHighligtedElems:r,x:i.x,y:i.y}}var en=({disableKeyboardNavigation:e,setCurrentStep:t,currentStep:n,setIsOpen:r,stepsLength:o,disable:s,rtl:i,clickProps:a,keyboardHandler:c})=>{function u(l){if(l.stopPropagation(),e===!0||s)return;let f,v,g;e&&(f=e.includes("esc"),v=e.includes("right"),g=e.includes("left"));function _(){t(Math.min(n+1,o-1))}function O(){t(Math.max(n-1,0))}c&&typeof c=="function"?c(l,a,{isEscDisabled:f,isRightDisabled:v,isLeftDisabled:g}):(l.keyCode===27&&!f&&(l.preventDefault(),r(!1)),l.keyCode===39&&!v&&(l.preventDefault(),i?O():_()),l.keyCode===37&&!g&&(l.preventDefault(),i?_():O()))}return d.useEffect(()=>(window.addEventListener("keydown",u,!1),()=>{window.removeEventListener("keydown",u)}),[s,t,n]),null},tn=en,nn={badge:()=>({position:"absolute",fontFamily:"monospace",background:"var(--reactour-accent,#007aff)",height:"1.875em",lineHeight:2,paddingLeft:"0.8125em",paddingRight:"0.8125em",fontSize:"1em",borderRadius:"1.625em",color:"white",textAlign:"center",boxShadow:"0 0.25em 0.5em rgba(0, 0, 0, 0.3)",top:"-0.8125em",left:"-0.8125em"}),controls:()=>({display:"flex",marginTop:24,alignItems:"center",justifyContent:"space-between"}),navigation:()=>({counterReset:"dot",display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"}),button:({disabled:e})=>({display:"block",padding:0,border:0,background:"none",cursor:e?"not-allowed":"pointer"}),arrow:({disabled:e})=>({color:e?"#caccce":"#646464",width:16,height:12,flex:"0 0 16px"}),dot:({current:e,disabled:t,showNumber:n})=>({counterIncrement:"dot",width:8,height:8,border:e?"0":"1px solid #caccce",borderRadius:"100%",padding:0,display:"block",margin:4,transition:"opacity 0.3s, transform 0.3s",cursor:t?"not-allowed":"pointer",transform:`scale(${e?1.25:1})`,color:e?"var(--reactour-accent, #007aff)":"#caccce",background:e?"var(--reactour-accent, #007aff)":"none"}),close:({disabled:e})=>({position:"absolute",top:22,right:22,width:9,height:9,"--rt-close-btn":e?"#caccce":"#5e5e5e","--rt-close-btn-disabled":e?"#caccce":"#000"}),svg:()=>({display:"block"})};function ae(e){return(t,n)=>{const r=nn[t](n),o=e[t];return o?o(r,n):r}}var rn=({styles:e={},children:t})=>{const n=ae(e);return b.createElement("span",{style:n("badge",{})},t)},on=rn,sn=e=>{var t=e,{styles:n={},onClick:r,disabled:o}=t,s=Z(t,["styles","onClick","disabled"]);const i=ae(n);return b.createElement("button",P({className:"reactour__close-button",style:P(P({},i("button",{})),i("close",{disabled:o})),onClick:r},s),b.createElement("svg",{viewBox:"0 0 9.1 9.1","aria-hidden":!0,role:"presentation",style:P({},i("svg",{}))},b.createElement("path",{fill:"currentColor",d:"M5.9 4.5l2.8-2.8c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L4.5 3.1 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4l2.8 2.8L.3 7.4c-.4.4-.4 1 0 1.4.2.2.4.3.7.3s.5-.1.7-.3L4.5 6l2.8 2.8c.3.2.5.3.8.3s.5-.1.7-.3c.4-.4.4-1 0-1.4L5.9 4.5z"})))},an=sn,ln=({content:e,setCurrentStep:t,transition:n,isHighlightingObserved:r,currentStep:o,setIsOpen:s})=>typeof e=="function"?e({setCurrentStep:t,transition:n,isHighlightingObserved:r,currentStep:o,setIsOpen:s}):e,cn=ln,un=({styles:e={},steps:t,setCurrentStep:n,currentStep:r,setIsOpen:o,nextButton:s,prevButton:i,disableDots:a,hideDots:c,hideButtons:u,disableAll:l,rtl:f,Arrow:v=$e})=>{const g=t.length,_=ae(e),O=({onClick:y,kind:p="next",children:E,hideArrow:x})=>{function k(){l||(y&&typeof y=="function"?y():n(p==="next"?Math.min(r+1,g-1):Math.max(r-1,0)))}return b.createElement("button",{style:_("button",{kind:p,disabled:l||(p==="next"?g-1===r:r===0)}),onClick:k,"aria-label":`Go to ${p} step`},x?null:b.createElement(v,{styles:e,inverted:f?p==="prev":p==="next",disabled:l||(p==="next"?g-1===r:r===0)}),E)};return b.createElement("div",{style:_("controls",{}),dir:f?"rtl":"ltr"},u?null:i&&typeof i=="function"?i({Button:O,setCurrentStep:n,currentStep:r,stepsLength:g,setIsOpen:o,steps:t}):b.createElement(O,{kind:"prev"}),c?null:b.createElement("div",{style:_("navigation",{})},Array.from({length:g},(y,p)=>p).map(y=>{var p;return b.createElement("button",{style:_("dot",{current:y===r,disabled:a||l}),onClick:()=>{!a&&!l&&n(y)},key:`navigation_dot_${y}`,"aria-label":((p=t[y])==null?void 0:p.navDotAriaLabel)||`Go to step ${y+1}`})})),u?null:s&&typeof s=="function"?s({Button:O,setCurrentStep:n,currentStep:r,stepsLength:g,setIsOpen:o,steps:t}):b.createElement(O,null))},fn=un,$e=({styles:e={},inverted:t=!1,disabled:n})=>{const r=ae(e);return b.createElement("svg",{viewBox:"0 0 18.4 14.4",style:r("arrow",{inverted:t,disabled:n})},b.createElement("path",{d:t?"M17 7.2H1M10.8 1L17 7.2l-6.2 6.2":"M1.4 7.2h16M7.6 1L1.4 7.2l6.2 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeMiterlimit:"10"}))},dn={Badge:on,Close:an,Content:cn,Navigation:fn,Arrow:$e},hn=e=>P(P({},dn),e),pn=({styles:e,components:t={},badgeContent:n,accessibilityOptions:r,disabledActions:o,onClickClose:s,steps:i,setCurrentStep:a,currentStep:c,transition:u,isHighlightingObserved:l,setIsOpen:f,nextButton:v,prevButton:g,disableDotsNavigation:_,rtl:O,showPrevNextButtons:y=!0,showCloseButton:p=!0,showNavigation:E=!0,showBadge:x=!0,showDots:k=!0,meta:h,setMeta:T,setSteps:M})=>{const C=i[c],{Badge:w,Close:R,Content:A,Navigation:S,Arrow:j}=hn(t),$=n&&typeof n=="function"?n({currentStep:c,totalSteps:i.length,transition:u}):c+1;function q(){o||(s&&typeof s=="function"?s({setCurrentStep:a,setIsOpen:f,currentStep:c,steps:i,meta:h,setMeta:T,setSteps:M}):f(!1))}return b.createElement(b.Fragment,null,x?b.createElement(w,{styles:e},$):null,p?b.createElement(R,{styles:e,"aria-label":r==null?void 0:r.closeButtonAriaLabel,disabled:o,onClick:q}):null,b.createElement(A,{content:C==null?void 0:C.content,setCurrentStep:a,currentStep:c,transition:u,isHighlightingObserved:l,setIsOpen:f}),E?b.createElement(S,{setCurrentStep:a,currentStep:c,setIsOpen:f,steps:i,styles:e,"aria-hidden":!(r!=null&&r.showNavigationScreenReaders),nextButton:v,prevButton:g,disableDots:_,hideButtons:!y,hideDots:!k,disableAll:o,rtl:O,Arrow:j}):null)},vn=pn,mn=e=>{var t=e,{currentStep:n,setCurrentStep:r,setIsOpen:o,steps:s=[],setSteps:i,styles:a={},scrollSmooth:c,afterOpen:u,beforeClose:l,padding:f=10,position:v,onClickMask:g,onClickHighlighted:_,keyboardHandler:O,className:y="reactour__popover",maskClassName:p="reactour__mask",highlightedMaskClassName:E,clipId:x,maskId:k,disableInteraction:h,disableKeyboardNavigation:T,inViewThreshold:M,disabledActions:C,setDisabledActions:w,disableWhenSelectorFalsy:R,rtl:A,accessibilityOptions:S={closeButtonAriaLabel:"Close Tour",showNavigationScreenReaders:!0},ContentComponent:j,Wrapper:$,meta:q,setMeta:G,onTransition:I=()=>"center"}=t,D=Z(t,["currentStep","setCurrentStep","setIsOpen","steps","setSteps","styles","scrollSmooth","afterOpen","beforeClose","padding","position","onClickMask","onClickHighlighted","keyboardHandler","className","maskClassName","highlightedMaskClassName","clipId","maskId","disableInteraction","disableKeyboardNavigation","inViewThreshold","disabledActions","setDisabledActions","disableWhenSelectorFalsy","rtl","accessibilityOptions","ContentComponent","Wrapper","meta","setMeta","onTransition"]),N;const m=s[n],H=P(P({},a),m==null?void 0:m.styles),{sizes:K,transition:V,observableRefresher:le,isHighlightingObserved:pe,target:W}=Jt(m,{block:"center",behavior:c?"smooth":"auto",inViewThreshold:M});d.useEffect(()=>(u&&typeof u=="function"&&u(W),()=>{l&&typeof l=="function"&&l(W)}),[]);const{maskPadding:Ve,popoverPadding:We,wrapperPadding:Be}=bn((N=m==null?void 0:m.padding)!=null?N:f),X={setCurrentStep:r,setIsOpen:o,currentStep:n,setSteps:i,steps:s,setMeta:G,meta:q};function qe(){C||(g&&typeof g=="function"?g(X):o(!1))}const Ge=typeof(m==null?void 0:m.stepInteraction)=="boolean"?!(m!=null&&m.stepInteraction):h?typeof h=="boolean"?h:h(X):!1;d.useEffect(()=>(m!=null&&m.action&&typeof(m==null?void 0:m.action)=="function"&&(m==null||m.action(W)),(m==null?void 0:m.disableActions)!==void 0&&w(m==null?void 0:m.disableActions),()=>{m!=null&&m.actionAfter&&typeof(m==null?void 0:m.actionAfter)=="function"&&(m==null||m.actionAfter(W))}),[m]);const Ke=V?I:m!=null&&m.position?m==null?void 0:m.position:v,Ye=$||b.Fragment;return m?b.createElement(Ye,null,b.createElement(It,{mutationObservables:m==null?void 0:m.mutationObservables,resizeObservables:m==null?void 0:m.resizeObservables,refresh:le}),b.createElement(tn,{setCurrentStep:r,currentStep:n,setIsOpen:o,stepsLength:s.length,disableKeyboardNavigation:T,disable:C,rtl:A,clickProps:X,keyboardHandler:O}),(!R||W)&&b.createElement(Vt,{sizes:V?yn:K,onClick:qe,styles:P({highlightedArea:Y=>he(P({},Y),{display:Ge?"block":"none"})},H),padding:V?0:Ve,highlightedAreaClassName:E,className:p,onClickHighlighted:Y=>{Y.preventDefault(),Y.stopPropagation(),_&&_(Y,X)},wrapperPadding:Be,clipId:x,maskId:k}),(!R||W)&&b.createElement(Yt,{sizes:K,styles:H,position:Ke,padding:We,"aria-labelledby":S==null?void 0:S.ariaLabelledBy,className:y,refresher:n},j?b.createElement(j,P({styles:H,setCurrentStep:r,currentStep:n,setIsOpen:o,steps:s,accessibilityOptions:S,disabledActions:C,transition:V,isHighlightingObserved:pe,rtl:A},D)):b.createElement(vn,P({styles:H,setCurrentStep:r,currentStep:n,setIsOpen:o,steps:s,setSteps:i,accessibilityOptions:S,disabledActions:C,transition:V,isHighlightingObserved:pe,rtl:A,meta:q,setMeta:G},D)))):null},gn=mn;function bn(e){return typeof e=="object"&&e!==null?{maskPadding:e.mask,popoverPadding:e.popover,wrapperPadding:e.wrapper}:{maskPadding:e,popoverPadding:e,wrapperPadding:0}}var yn={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0},wn={isOpen:!1,setIsOpen:()=>!1,currentStep:0,setCurrentStep:()=>0,steps:[],setSteps:()=>[],setMeta:()=>"",disabledActions:!1,setDisabledActions:()=>!1,components:{}},_n=b.createContext(wn),En=e=>{var t=e,{children:n,defaultOpen:r=!1,startAt:o=0,steps:s,setCurrentStep:i,currentStep:a}=t,c=Z(t,["children","defaultOpen","startAt","steps","setCurrentStep","currentStep"]);const[u,l]=d.useState(r),[f,v]=d.useState(o),[g,_]=d.useState(s),[O,y]=d.useState(""),[p,E]=d.useState(!1),x=P({isOpen:u,setIsOpen:l,currentStep:a||f,setCurrentStep:i&&typeof i=="function"?i:v,steps:g,setSteps:_,disabledActions:p,setDisabledActions:E,meta:O,setMeta:y},c);return b.createElement(_n.Provider,{value:x},n,u?b.createElement(gn,P({},x)):null)};const On={default:"#1A1A1A",white:"#FFFFFF",orange:"#CE2021",current:"currentColor"};function Se({variant:e="default",size:t=40,className:n,style:r}){const o=On[e],s=t*(799/2325);return L.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:s,viewBox:"0 0 2325 799",fill:"none",className:n,style:r,"aria-hidden":"true",children:[L.jsx("rect",{x:"50",y:"50",width:"2225",height:"699",stroke:o,strokeWidth:"100"}),L.jsx("path",{d:"M492.333 199.627L599.833 295.627L600 295.776V491.707L492.207 599.5H199.5V199.5H492.19L492.333 199.627ZM334 347.5V448.5H435V347.5H334Z",fill:o}),L.jsx("path",{d:"M1108.5 497.715L1108.34 497.862L1001.34 599.362L1001.2 599.5H699V296.283L699.158 296.135L802.158 199.635L802.303 199.5H1108.5V497.715ZM855 347.5V448.5H956V347.5H855Z",fill:o}),L.jsx("path",{d:"M1616.94 200.24L1510.07 395.005L1616.94 598.768L1617.64 600.103L1616.28 599.451L1409 500.056L1208.22 599.448L1207.5 599.806V199.5H1617.34L1616.94 200.24ZM1332 337.5V439.207L1433.71 337.5H1332Z",fill:o}),L.jsx("path",{d:"M1716.5 599V200L1841 291.5L2125 200L2017.5 400L2125 599L1841 501L1716.5 599Z",fill:o,stroke:o})]})}function xn({caption:e,chipLabel:t,isLast:n,onAdvance:r,onEnd:o}){const s=t??(n?"Got it":"Next");return L.jsxs("div",{className:Ue("flex max-w-[min(20rem,calc(100vw-2rem))] flex-col gap-3 rounded-lg border","bg-popover text-popover-foreground shadow-floating p-4"),children:[L.jsxs("div",{className:"flex items-start gap-3",children:[L.jsxs("span",{className:"mt-0.5 shrink-0",children:[L.jsx(Se,{size:28,className:"dark:hidden"}),L.jsx(Se,{variant:"white",size:28,className:"hidden dark:block"})]}),L.jsx("p",{className:"text-sm leading-relaxed",children:e})]}),L.jsxs("div",{className:"flex items-center justify-end gap-2",children:[L.jsx(ve,{variant:"ghost",size:"sm",onClick:o,children:"Done"}),L.jsx(ve,{variant:"default",size:"sm",onClick:r,children:s})]})]})}const Rn=4e3,Sn=100;function kn(e){const[t,n]=d.useState({element:null,status:"resolving",anchor:e}),[r,o]=d.useState(e);return e!==r&&(o(e),n({element:null,status:"resolving",anchor:e})),d.useEffect(()=>{if(e===null)return;const s=Ce(e);let i=null,a=!1;const c=Date.now()+Rn,u=()=>{const f=document.querySelector(s);return f?(f!==i&&(f.scrollIntoView({block:"center",inline:"center"}),i=f,a=!0,n({element:f,status:"found",anchor:e})),!1):a?!1:Date.now()>=c?(n({element:null,status:"timeout",anchor:e}),!0):!1},l=setInterval(()=>{u()&&clearInterval(l)},Sn);return()=>clearInterval(l)},[e]),t}const Cn=".reactour__popover",Ln=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function ke(e){return Array.from(e.querySelectorAll(Ln))}function Mn(e,t){d.useEffect(()=>{var o;if(!e)return;const n=document.querySelector(Cn);if(!n)return;(o=ke(n)[0])==null||o.focus();const r=s=>{if(s.key!=="Tab")return;const i=ke(n);if(i.length===0)return;const a=i[0],c=i[i.length-1],u=document.activeElement;n.contains(u)?s.shiftKey&&u===a?(s.preventDefault(),c.focus()):!s.shiftKey&&u===c&&(s.preventDefault(),a.focus()):(s.preventDefault(),a.focus())};return document.addEventListener("keydown",r,!0),()=>document.removeEventListener("keydown",r,!0)},[e,t])}const ze="(prefers-reduced-motion: reduce)";function Tn(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(ze).matches}function An(){const[e,t]=d.useState(Tn);return d.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const n=window.matchMedia(ze),r=o=>t(o.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}const In="dork-tour-mask--reduced-motion",Pn={mask:8,popover:10},Dn="x 280ms ease, y 280ms ease, width 280ms ease, height 280ms ease";function Nn({steps:e,activeIndex:t,onAdvance:n,onEnd:r}){const o=e[t],s=t>=e.length-1,i=Ze(),a=An(),c=kn((o==null?void 0:o.anchor)??null),[u,l]=d.useState(null);c.status==="found"&&c.element!==null&&c.anchor===(o==null?void 0:o.anchor)&&u!==t?l(t):!o&&u!==null&&l(null);const f=u!==null,v=u!==null?e[u]:void 0,g=d.useCallback(()=>{s?r():n()},[s,r,n]),_=d.useRef(g);d.useEffect(()=>{_.current=g},[g]),d.useEffect(()=>{c.status==="timeout"&&_.current()},[c.status]);const O=d.useRef(n),y=d.useRef(r);d.useEffect(()=>{O.current=n,y.current=r},[n,r]);const p=d.useRef(!1);d.useEffect(()=>{p.current=u===t},[u,t]);const[E,x]=d.useState(!1);d.useEffect(()=>{if(f&&!E){const w=requestAnimationFrame(()=>x(!0));return()=>cancelAnimationFrame(w)}},[f,E]),d.useEffect(()=>{if(!f)return;const w=document.getElementById("root");if(w)return w.inert=!0,()=>{w.inert=!1}},[f]),Mn(f,u??-1);const k=d.useMemo(()=>w=>{const R={...w,backgroundColor:"transparent",padding:0,boxShadow:"none",maxWidth:"none",color:"inherit"};return i?{...R,position:"fixed",top:"auto",left:0,right:0,bottom:0,transform:"none",display:"flex",justifyContent:"center",padding:"0 1rem 1rem"}:R},[i]),h=d.useCallback(w=>E?{...w,transition:Dn}:w,[E]),T=d.useMemo(()=>({popover:k,maskArea:h}),[k,h]),M=d.useMemo(()=>e.map((w,R)=>{const A=R===e.length-1;return{selector:Ce(w.anchor),stepInteraction:!1,content:L.jsx(xn,{caption:w.caption,chipLabel:w.chipLabel,isLast:A,onAdvance:()=>A?y.current():O.current(),onEnd:()=>y.current()})}}),[e]),C=d.useMemo(()=>e.map(w=>w.anchor).join("|"),[e]);return o?Xe.createPortal(L.jsxs(L.Fragment,{children:[L.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:f?(v==null?void 0:v.caption)??"":""}),f&&L.jsx(En,{steps:M,currentStep:u??0,defaultOpen:!0,showNavigation:!1,showPrevNextButtons:!1,showCloseButton:!1,showBadge:!1,showDots:!1,disableInteraction:!0,padding:Pn,styles:T,maskClassName:a?In:void 0,onClickMask:()=>r(),keyboardHandler:w=>{w.key==="Escape"?(w.preventDefault(),y.current()):w.key==="ArrowRight"&&p.current&&_.current()},children:L.jsx("span",{className:"hidden","aria-hidden":!0})},C)]}),document.body):null}const de={general:{id:"general",deepLink:{kind:"route",...Q.home()},steps:[{anchor:U.homeComposer,caption:z.general.composer,chipLabel:"Next"},{anchor:U.homeTabs,caption:z.general.homeTabs,chipLabel:"Got it"}]},tasks:{id:"tasks",occasion:"tasks",offerLine:z.offers.tasks,deepLink:{kind:"route",...Q.tasks()},steps:[{anchor:U.tasksList,caption:z.tasks.tasksList,chipLabel:"Got it"}]},relay:{id:"relay",occasion:"relay",offerLine:z.offers.relay,deepLink:{kind:"route",...Q.connections()},steps:[{anchor:U.relayIntegrations,caption:z.relay.relayIntegrations,chipLabel:"Got it"}]},mesh:{id:"mesh",occasion:"mesh",offerLine:z.offers.mesh,deepLink:{kind:"route",...Q.team()},steps:[{anchor:U.teamRoster,caption:z.mesh.teamRoster,chipLabel:"Got it"}]}},F=Qe()(e=>({runningTourId:null,activeIndex:0,pendingOfferId:null,startTour:t=>e({runningTourId:t,activeIndex:0,pendingOfferId:null}),advanceStep:()=>e(t=>({activeIndex:t.activeIndex+1})),endTour:()=>e({runningTourId:null,activeIndex:0}),setPendingOffer:t=>e({pendingOfferId:t}),clearPendingOffer:()=>e({pendingOfferId:null})}));function Fe(){var x,k;const e=Je(),t=et(),{data:n}=tt({queryKey:me.current(),queryFn:()=>e.getConfig(),staleTime:rt}),r=((x=n==null?void 0:n.tours)==null?void 0:x.seen)??[],o=((k=n==null?void 0:n.tours)==null?void 0:k.declined)??[],s=F(h=>h.runningTourId),i=F(h=>h.activeIndex),a=F(h=>h.pendingOfferId),c=F(h=>h.startTour),u=F(h=>h.advanceStep),l=F(h=>h.endTour),f=F(h=>h.setPendingOffer),v=F(h=>h.clearPendingOffer),g=nt({mutationFn:h=>e.updateConfig({tours:h}),onSuccess:()=>t.invalidateQueries({queryKey:me.all}),meta:{errorLabel:"Couldn’t save your tour progress"}});function _(h){r.includes(h)||g.mutate({seen:[...r,h]})}function O(h){o.includes(h)||g.mutate({declined:[...o,h]})}function y(h){return r.includes(h)||o.includes(h)}function p(h){_(h),c(h)}function E(h){O(h),v()}return{seen:r,declined:o,isSuppressed:y,runningDefinition:s?de[s]:null,activeIndex:i,pendingOffer:a?de[a]:null,pendingOfferId:a,runTour:c,acceptOffer:p,declineOffer:E,setPendingOffer:f,advanceStep:u,endTour:l}}const Hn=1,jn=1,$n=2;function zn(){const{isSuppressed:e,setPendingOffer:t,pendingOfferId:n,runningDefinition:r}=Fe(),o=ot(y=>Object.values(y.statuses).some(p=>p.lifecycle==="streaming")),s=it(),i=st(),{data:a}=at(i),{data:c}=ft(s),{data:u}=lt(),l=a==null?void 0:a.length,f=s&&c?c.reduce((y,p)=>y+p.instances.length,0):void 0,v=u==null?void 0:u.agents.length,g=d.useRef(void 0),_=d.useRef(void 0),O=d.useRef(void 0);d.useEffect(()=>{const y=(E,x,k,h,T)=>{if(x===void 0)return T;const M=h.current;return M===void 0||!(M<k&&x>=k)?(h.current=x,T):o||T||(h.current=x,e(E))?T:(t(E),!0)};let p=n!==null||r!==null;p=y("tasks",l,Hn,g,p),p=y("relay",f,jn,_,p),y("mesh",v,$n,O,p)},[l,f,v,o,n,r,e,t])}function Bn(){zn();const{runningDefinition:e,activeIndex:t,advanceStep:n,endTour:r,runTour:o}=Fe(),s=ct(),i=ut({select:l=>l.location.pathname}),a=ge(l=>l.requestedTour),c=ge(l=>l.clearRequestedTour),u=(e==null?void 0:e.id)??null;return d.useEffect(()=>{if(a!==null){if(!(a in de)){c();return}if(u===a){c();return}o(a)}},[a,u,o,c]),d.useEffect(()=>{if(!e)return;const{to:l}=e.deepLink;i!==l&&s({to:l})},[e,i,s]),e?L.jsx(Nn,{steps:e.steps,activeIndex:t,onAdvance:n,onEnd:r}):null}export{Se as D,de as T,Bn as a,zn as b,Fe as u};
1
+ import{r as d,hB as b,j as L,B as ve,Z as Ue,hC as Ce,dJ as Ze,e8 as Xe,dt as U,l as Q,hD as Qe,ae as Je,af as et,aj as tt,hE as me,ag as nt,hF as rt,eN as ot,g1 as it,b8 as st,aS as at,dw as lt,bV as ct,eT as ut,aN as ge}from"./index-Dr-0P6rd.js";import{D as z}from"./dorkbot-templates-8Yu9POWJ.js";import{u as ft}from"./use-external-adapter-catalog-D8KHMSZU.js";var dt={attributes:!0,characterData:!0,subtree:!0,childList:!0};function ht(e,t,n=dt){d.useEffect(()=>{if(e.current){const r=new MutationObserver(t);return r.observe(e.current,n),()=>{r.disconnect()}}},[t,n])}var Le=(function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(o,s){return o[0]===n?(r=s,!0):!1}),r}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),o=this.__entries__[r];return o&&o[1]},t.prototype.set=function(n,r){var o=e(this.__entries__,n);~o?this.__entries__[o][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,o=e(r,n);~o&&r.splice(o,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var o=0,s=this.__entries__;o<s.length;o++){var i=s[o];n.call(r,i[1],i[0])}},t})()})(),ue=typeof window<"u"&&typeof document<"u"&&window.document===document,te=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),pt=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(te):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),vt=2;function mt(e,t){var n=!1,r=!1,o=0;function s(){n&&(n=!1,e()),r&&a()}function i(){pt(s)}function a(){var c=Date.now();if(n){if(c-o<vt)return;r=!0}else n=!0,r=!1,setTimeout(i,t);o=c}return a}var gt=20,bt=["top","right","bottom","left","width","height","size","weight"],yt=typeof MutationObserver<"u",wt=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=mt(this.refresh.bind(this),gt)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!ue||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),yt?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!ue||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,o=bt.some(function(s){return!!~r.indexOf(s)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),Me=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e}),B=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||te}),Te=ie(0,0,0,0);function ne(e){return parseFloat(e)||0}function be(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,o){var s=e["border-"+o+"-width"];return r+ne(s)},0)}function _t(e){for(var t=["top","right","bottom","left"],n={},r=0,o=t;r<o.length;r++){var s=o[r],i=e["padding-"+s];n[s]=ne(i)}return n}function Et(e){var t=e.getBBox();return ie(0,0,t.width,t.height)}function Ot(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Te;var r=B(e).getComputedStyle(e),o=_t(r),s=o.left+o.right,i=o.top+o.bottom,a=ne(r.width),c=ne(r.height);if(r.boxSizing==="border-box"&&(Math.round(a+s)!==t&&(a-=be(r,"left","right")+s),Math.round(c+i)!==n&&(c-=be(r,"top","bottom")+i)),!Rt(e)){var u=Math.round(a+s)-t,l=Math.round(c+i)-n;Math.abs(u)!==1&&(a-=u),Math.abs(l)!==1&&(c-=l)}return ie(o.left,o.top,a,c)}var xt=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof B(e).SVGGraphicsElement}:function(e){return e instanceof B(e).SVGElement&&typeof e.getBBox=="function"}})();function Rt(e){return e===B(e).document.documentElement}function St(e){return ue?xt(e)?Et(e):Ot(e):Te}function kt(e){var t=e.x,n=e.y,r=e.width,o=e.height,s=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,i=Object.create(s.prototype);return Me(i,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),i}function ie(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Ct=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ie(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=St(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),Lt=(function(){function e(t,n){var r=kt(n);Me(this,{target:t,contentRect:r})}return e})(),Mt=(function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new Le,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof B(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new Ct(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof B(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new Lt(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),Ae=typeof WeakMap<"u"?new WeakMap:new Le,Ie=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=wt.getInstance(),r=new Mt(t,n,this);Ae.set(this,r)}return e})();["observe","unobserve","disconnect"].forEach(function(e){Ie.prototype[e]=function(){var t;return(t=Ae.get(this))[e].apply(t,arguments)}});var Tt=(function(){return typeof te.ResizeObserver<"u"?te.ResizeObserver:Ie})(),At=({mutationObservables:e,resizeObservables:t,refresh:n})=>{const[r,o]=d.useState(0),s=d.useRef(document.documentElement||document.body);function i(c){const u=Array.from(c);for(const l of u)if(e){if(!l.attributes)continue;e.find(v=>l.matches(v))&&n(!0)}}function a(c){const u=Array.from(c);for(const l of u)if(t){if(!l.attributes)continue;t.find(v=>l.matches(v))&&o(r+1)}}return ht(s,c=>{for(const u of c)u.addedNodes.length!==0&&(i(u.addedNodes),a(u.addedNodes)),u.removedNodes.length!==0&&(i(u.removedNodes),a(u.removedNodes))},{childList:!0,subtree:!0}),d.useEffect(()=>{if(!t)return;const c=new Tt(()=>{n()});for(const u of t){const l=document.querySelector(u);l&&c.observe(l)}return()=>{c.disconnect()}},[t,r]),null},It=At;function ee(e){let t=Pe;return e&&(t=e.getBoundingClientRect()),t}function Pt(e,t){const[n,r]=d.useState(Pe),o=d.useCallback(()=>{e!=null&&e.current&&r(ee(e==null?void 0:e.current))},[e==null?void 0:e.current]);return d.useEffect(()=>(o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)),[e==null?void 0:e.current,t]),n}var Pe={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0};function Dt(e,t){return new Promise(n=>{if(!(e instanceof Element))throw new TypeError("Argument 1 must be an Element");let r=0,o=null;const s=Object.assign({behavior:"smooth"},t);e.scrollIntoView(s),requestAnimationFrame(i);function i(){const a=e==null?void 0:e.getBoundingClientRect().top;if(a===o){if(r++>2)return n(null)}else r=0,o=a;requestAnimationFrame(i)}})}function J(e){return e<0?0:e}function Nt(e){return typeof e=="object"&&e!==null?{thresholdX:e.x||0,thresholdY:e.y||0}:{thresholdX:e||0,thresholdY:e||0}}function se(){const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0),t=Math.max(document.documentElement.clientHeight,window.innerHeight||0);return{w:e,h:t}}function Ht({top:e,right:t,bottom:n,left:r,threshold:o}){const{w:s,h:i}=se(),{thresholdX:a,thresholdY:c}=Nt(o);return e<0&&n-e>i?!0:e>=0+c&&r>=0+a&&n<=i-c&&t<=s-a}var ye=(e,t)=>e>t,we=(e,t)=>e>t;function jt(e,t=[]){const n=(r,o)=>t.includes(r)?1:t.includes(o)?-1:0;return Object.keys(e).map(r=>({position:r,value:e[r]})).sort((r,o)=>o.value-r.value).sort((r,o)=>n(r.position,o.position)).filter(r=>r.value>0).map(r=>r.position)}var ce=10;function fe(e=ce){return Array.isArray(e)?e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[1],e[0],e[1],e[0]]:e.length===3?[e[0],e[1],e[2],e[1]]:e.length>3?[e[0],e[1],e[2],e[3]]:[ce,ce]:[e,e,e,e]}var $t={maskWrapper:()=>({opacity:.7,left:0,top:0,position:"fixed",zIndex:99999,pointerEvents:"none",color:"#000"}),svgWrapper:({windowWidth:e,windowHeight:t,wpt:n,wpl:r})=>({width:e,height:t,left:Number(r),top:Number(n),position:"fixed"}),maskArea:({x:e,y:t,width:n,height:r})=>({x:e,y:t,width:n,height:r,fill:"black",rx:0}),maskRect:({windowWidth:e,windowHeight:t,maskID:n})=>({x:0,y:0,width:e,height:t,fill:"currentColor",mask:`url(#${n})`}),clickArea:({windowWidth:e,windowHeight:t,clipID:n})=>({x:0,y:0,width:e,height:t,fill:"currentcolor",pointerEvents:"auto",clipPath:`url(#${n})`}),highlightedArea:({x:e,y:t,width:n,height:r})=>({x:e,y:t,width:n,height:r,pointerEvents:"auto",fill:"transparent",display:"none"})};function zt(e){return(t,n)=>{const r=$t[t](n),o=e[t];return o?o(r,n):r}}var Ft=({padding:e=10,wrapperPadding:t=0,onClick:n,onClickHighlighted:r,styles:o={},sizes:s,className:i,highlightedAreaClassName:a,maskId:c,clipId:u})=>{const l=c||_e("mask__"),f=u||_e("clip__"),v=zt(o),[g,_,O,y]=fe(e),[p,E,x,k]=fe(t),{w:h,h:T}=se(),M=J((s==null?void 0:s.width)+y+_),C=J((s==null?void 0:s.height)+g+O),w=J((s==null?void 0:s.top)-g-p),R=J((s==null?void 0:s.left)-y-k),A=h-k-E,S=T-p-x,j=v("maskArea",{x:R,y:w,width:M,height:C}),$=v("highlightedArea",{x:R,y:w,width:M,height:C});return b.createElement("div",{style:v("maskWrapper",{}),onClick:n,className:i},b.createElement("svg",{width:A,height:S,xmlns:"http://www.w3.org/2000/svg",style:v("svgWrapper",{windowWidth:A,windowHeight:S,wpt:p,wpl:k})},b.createElement("defs",null,b.createElement("mask",{id:l},b.createElement("rect",{x:0,y:0,width:A,height:S,fill:"white"}),b.createElement("rect",{style:j,rx:j.rx?1:void 0})),b.createElement("clipPath",{id:f},b.createElement("polygon",{points:`0 0, 0 ${S}, ${R} ${S}, ${R} ${w}, ${R+M} ${w}, ${R+M} ${w+C}, ${R} ${w+C}, ${R} ${S}, ${A} ${S}, ${A} 0`}))),b.createElement("rect",{style:v("maskRect",{windowWidth:A,windowHeight:S,maskID:l})}),b.createElement("rect",{style:v("clickArea",{windowWidth:A,windowHeight:S,top:w,left:R,width:M,height:C,clipID:f})}),b.createElement("rect",{style:$,className:a,onClick:r,rx:$.rx?1:void 0})))},Vt=Ft;function _e(e){return e+Math.random().toString(36).substring(2,16)}var Wt=Object.defineProperty,re=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Ee=(e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oe=(e,t)=>{for(var n in t||(t={}))De.call(t,n)&&Ee(e,n,t[n]);if(re)for(var n of re(t))Ne.call(t,n)&&Ee(e,n,t[n]);return e},Bt=(e,t)=>{var n={};for(var r in e)De.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&re)for(var r of re(e))t.indexOf(r)<0&&Ne.call(e,r)&&(n[r]=e[r]);return n},qt={popover:()=>({position:"fixed",maxWidth:353,backgroundColor:"#fff",padding:"24px 30px",boxShadow:"0 0.5em 3em rgba(0, 0, 0, 0.3)",color:"inherit",zIndex:1e5,transition:"transform 0.3s",top:0,left:0})};function Gt(e){return(t,n)=>{const r=qt[t](n),o=e[t];return o?o(r,n):r}}var Kt=e=>{var t=e,{children:n,position:r="bottom",padding:o=10,styles:s={},sizes:i,refresher:a}=t,c=Bt(t,["children","position","padding","styles","sizes","refresher"]);const u=d.useRef(null),l=d.useRef(""),f=d.useRef(""),v=d.useRef(""),{w:g,h:_}=se(),O=Gt(s),y=Pt(u,a),{width:p,height:E}=y,[x,k,h,T]=fe(o),M=(i==null?void 0:i.left)-T,C=(i==null?void 0:i.top)-x,w=(i==null?void 0:i.right)+k,R=(i==null?void 0:i.bottom)+h,A=r&&typeof r=="function"?r({width:p,height:E,windowWidth:g,windowHeight:_,top:C,left:M,right:w,bottom:R,x:i.x,y:i.y},y):r,S={left:M,right:g-w,top:C,bottom:_-R},j=(I,D,N)=>{switch(I){case"top":return S.top>E+h;case"right":return D?!1:S.right>p+T;case"bottom":return N?!1:S.bottom>E+x;case"left":return S.left>p+k;default:return!1}},$=(I,D,N)=>{const m=jt(S,N?["right","left"]:D?["top","bottom"]:[]);for(let H=0;H<m.length;H++)if(j(m[H],D,N))return l.current=m[H],I[m[H]];return l.current="center",I.center},G=(I=>{if(Array.isArray(I)){const V=ye(I[0],g),le=we(I[1],_);return l.current="custom",[V?g/2-p/2:I[0],le?_/2-E/2:I[1]]}const D=ye(M+p,g),N=we(R+E,_),m=D?Math.min(M,g-p):Math.max(M,0),H=N?E>S.bottom?Math.max(R-E,0):Math.max(C,0):C;N&&E>S.bottom?f.current="bottom":f.current="top",D?v.current="left":v.current="right";const K={top:[m-T,C-E-h],right:[w+T,H-x],bottom:[m-T,R+x],left:[M-p-k,H-x],center:[g/2-p/2,_/2-E/2]};return I==="center"||j(I,D,N)&&!D&&!N?(l.current=I,K[I]):$(K,D,N)})(A);return b.createElement("div",Oe({className:"reactour__popover",style:Oe({transform:`translate(${Math.round(G[0])}px, ${Math.round(G[1])}px)`},O("popover",{position:l.current,verticalAlign:f.current,horizontalAlign:v.current,helperRect:y,targetRect:i})),ref:u},c),n)},Yt=Kt,Ut=Object.defineProperty,Zt=Object.defineProperties,Xt=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,xe=(e,t,n)=>t in e?Ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))He.call(t,n)&&xe(e,n,t[n]);if(oe)for(var n of oe(t))je.call(t,n)&&xe(e,n,t[n]);return e},he=(e,t)=>Zt(e,Xt(t)),Z=(e,t)=>{var n={};for(var r in e)He.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&oe)for(var r of oe(e))t.indexOf(r)<0&&je.call(e,r)&&(n[r]=e[r]);return n},Qt={bottom:0,height:0,left:0,right:0,top:0,width:0,windowWidth:0,windowHeight:0,x:0,y:0};function Jt(e,t={block:"center",behavior:"smooth",inViewThreshold:0}){const[n,r]=d.useState(!1),[o,s]=d.useState(!1),[i,a]=d.useState(!1),[c,u]=d.useState(null),[l,f]=d.useState(Qt),v=(e==null?void 0:e.selector)instanceof Element?e==null?void 0:e.selector:document.querySelector(e==null?void 0:e.selector),g=d.useCallback(()=>{const O=Re(v,e==null?void 0:e.highlightedSelectors,e==null?void 0:e.bypassElem),{hasHighligtedElems:y}=O,p=Z(O,["hasHighligtedElems"]);Object.entries(l).some(([E,x])=>p[E]!==x)&&f(p)},[v,e==null?void 0:e.highlightedSelectors,l]);d.useEffect(()=>(g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)),[v,e==null?void 0:e.highlightedSelectors,c]),d.useEffect(()=>{!Ht(he(P({},l),{threshold:t.inViewThreshold}))&&v&&(r(!0),Dt(v,t).then(()=>{o||u(Date.now())}).finally(()=>{r(!1)}))},[l]);const _=d.useCallback(()=>{s(!0);const O=Re(v,e==null?void 0:e.highlightedSelectors,e==null?void 0:e.bypassElem),{hasHighligtedElems:y}=O,p=Z(O,["hasHighligtedElems"]);a(y),f(p),s(!1)},[v,e==null?void 0:e.highlightedSelectors,l]);return{sizes:l,transition:n,target:v,observableRefresher:_,isHighlightingObserved:i}}function Re(e,t=[],n=!0){let r=!1;const{w:o,h:s}=se();if(!t)return he(P({},ee(e)),{windowWidth:o,windowHeight:s,hasHighligtedElems:!1});let i=ee(e),a={bottom:0,height:0,left:o,right:0,top:s,width:0};for(const u of t){const l=document.querySelector(u);if(!l||l.style.display==="none"||l.style.visibility==="hidden")continue;const f=ee(l);r=!0,n||!e?(f.top<a.top&&(a.top=f.top),f.right>a.right&&(a.right=f.right),f.bottom>a.bottom&&(a.bottom=f.bottom),f.left<a.left&&(a.left=f.left),a.width=a.right-a.left,a.height=a.bottom-a.top):(f.top<i.top&&(i.top=f.top),f.right>i.right&&(i.right=f.right),f.bottom>i.bottom&&(i.bottom=f.bottom),f.left<i.left&&(i.left=f.left),i.width=i.right-i.left,i.height=i.bottom-i.top)}const c=n||!e?a.width>0&&a.height>0:!1;return{left:(c?a:i).left,top:(c?a:i).top,right:(c?a:i).right,bottom:(c?a:i).bottom,width:(c?a:i).width,height:(c?a:i).height,windowWidth:o,windowHeight:s,hasHighligtedElems:r,x:i.x,y:i.y}}var en=({disableKeyboardNavigation:e,setCurrentStep:t,currentStep:n,setIsOpen:r,stepsLength:o,disable:s,rtl:i,clickProps:a,keyboardHandler:c})=>{function u(l){if(l.stopPropagation(),e===!0||s)return;let f,v,g;e&&(f=e.includes("esc"),v=e.includes("right"),g=e.includes("left"));function _(){t(Math.min(n+1,o-1))}function O(){t(Math.max(n-1,0))}c&&typeof c=="function"?c(l,a,{isEscDisabled:f,isRightDisabled:v,isLeftDisabled:g}):(l.keyCode===27&&!f&&(l.preventDefault(),r(!1)),l.keyCode===39&&!v&&(l.preventDefault(),i?O():_()),l.keyCode===37&&!g&&(l.preventDefault(),i?_():O()))}return d.useEffect(()=>(window.addEventListener("keydown",u,!1),()=>{window.removeEventListener("keydown",u)}),[s,t,n]),null},tn=en,nn={badge:()=>({position:"absolute",fontFamily:"monospace",background:"var(--reactour-accent,#007aff)",height:"1.875em",lineHeight:2,paddingLeft:"0.8125em",paddingRight:"0.8125em",fontSize:"1em",borderRadius:"1.625em",color:"white",textAlign:"center",boxShadow:"0 0.25em 0.5em rgba(0, 0, 0, 0.3)",top:"-0.8125em",left:"-0.8125em"}),controls:()=>({display:"flex",marginTop:24,alignItems:"center",justifyContent:"space-between"}),navigation:()=>({counterReset:"dot",display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"}),button:({disabled:e})=>({display:"block",padding:0,border:0,background:"none",cursor:e?"not-allowed":"pointer"}),arrow:({disabled:e})=>({color:e?"#caccce":"#646464",width:16,height:12,flex:"0 0 16px"}),dot:({current:e,disabled:t,showNumber:n})=>({counterIncrement:"dot",width:8,height:8,border:e?"0":"1px solid #caccce",borderRadius:"100%",padding:0,display:"block",margin:4,transition:"opacity 0.3s, transform 0.3s",cursor:t?"not-allowed":"pointer",transform:`scale(${e?1.25:1})`,color:e?"var(--reactour-accent, #007aff)":"#caccce",background:e?"var(--reactour-accent, #007aff)":"none"}),close:({disabled:e})=>({position:"absolute",top:22,right:22,width:9,height:9,"--rt-close-btn":e?"#caccce":"#5e5e5e","--rt-close-btn-disabled":e?"#caccce":"#000"}),svg:()=>({display:"block"})};function ae(e){return(t,n)=>{const r=nn[t](n),o=e[t];return o?o(r,n):r}}var rn=({styles:e={},children:t})=>{const n=ae(e);return b.createElement("span",{style:n("badge",{})},t)},on=rn,sn=e=>{var t=e,{styles:n={},onClick:r,disabled:o}=t,s=Z(t,["styles","onClick","disabled"]);const i=ae(n);return b.createElement("button",P({className:"reactour__close-button",style:P(P({},i("button",{})),i("close",{disabled:o})),onClick:r},s),b.createElement("svg",{viewBox:"0 0 9.1 9.1","aria-hidden":!0,role:"presentation",style:P({},i("svg",{}))},b.createElement("path",{fill:"currentColor",d:"M5.9 4.5l2.8-2.8c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L4.5 3.1 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4l2.8 2.8L.3 7.4c-.4.4-.4 1 0 1.4.2.2.4.3.7.3s.5-.1.7-.3L4.5 6l2.8 2.8c.3.2.5.3.8.3s.5-.1.7-.3c.4-.4.4-1 0-1.4L5.9 4.5z"})))},an=sn,ln=({content:e,setCurrentStep:t,transition:n,isHighlightingObserved:r,currentStep:o,setIsOpen:s})=>typeof e=="function"?e({setCurrentStep:t,transition:n,isHighlightingObserved:r,currentStep:o,setIsOpen:s}):e,cn=ln,un=({styles:e={},steps:t,setCurrentStep:n,currentStep:r,setIsOpen:o,nextButton:s,prevButton:i,disableDots:a,hideDots:c,hideButtons:u,disableAll:l,rtl:f,Arrow:v=$e})=>{const g=t.length,_=ae(e),O=({onClick:y,kind:p="next",children:E,hideArrow:x})=>{function k(){l||(y&&typeof y=="function"?y():n(p==="next"?Math.min(r+1,g-1):Math.max(r-1,0)))}return b.createElement("button",{style:_("button",{kind:p,disabled:l||(p==="next"?g-1===r:r===0)}),onClick:k,"aria-label":`Go to ${p} step`},x?null:b.createElement(v,{styles:e,inverted:f?p==="prev":p==="next",disabled:l||(p==="next"?g-1===r:r===0)}),E)};return b.createElement("div",{style:_("controls",{}),dir:f?"rtl":"ltr"},u?null:i&&typeof i=="function"?i({Button:O,setCurrentStep:n,currentStep:r,stepsLength:g,setIsOpen:o,steps:t}):b.createElement(O,{kind:"prev"}),c?null:b.createElement("div",{style:_("navigation",{})},Array.from({length:g},(y,p)=>p).map(y=>{var p;return b.createElement("button",{style:_("dot",{current:y===r,disabled:a||l}),onClick:()=>{!a&&!l&&n(y)},key:`navigation_dot_${y}`,"aria-label":((p=t[y])==null?void 0:p.navDotAriaLabel)||`Go to step ${y+1}`})})),u?null:s&&typeof s=="function"?s({Button:O,setCurrentStep:n,currentStep:r,stepsLength:g,setIsOpen:o,steps:t}):b.createElement(O,null))},fn=un,$e=({styles:e={},inverted:t=!1,disabled:n})=>{const r=ae(e);return b.createElement("svg",{viewBox:"0 0 18.4 14.4",style:r("arrow",{inverted:t,disabled:n})},b.createElement("path",{d:t?"M17 7.2H1M10.8 1L17 7.2l-6.2 6.2":"M1.4 7.2h16M7.6 1L1.4 7.2l6.2 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeMiterlimit:"10"}))},dn={Badge:on,Close:an,Content:cn,Navigation:fn,Arrow:$e},hn=e=>P(P({},dn),e),pn=({styles:e,components:t={},badgeContent:n,accessibilityOptions:r,disabledActions:o,onClickClose:s,steps:i,setCurrentStep:a,currentStep:c,transition:u,isHighlightingObserved:l,setIsOpen:f,nextButton:v,prevButton:g,disableDotsNavigation:_,rtl:O,showPrevNextButtons:y=!0,showCloseButton:p=!0,showNavigation:E=!0,showBadge:x=!0,showDots:k=!0,meta:h,setMeta:T,setSteps:M})=>{const C=i[c],{Badge:w,Close:R,Content:A,Navigation:S,Arrow:j}=hn(t),$=n&&typeof n=="function"?n({currentStep:c,totalSteps:i.length,transition:u}):c+1;function q(){o||(s&&typeof s=="function"?s({setCurrentStep:a,setIsOpen:f,currentStep:c,steps:i,meta:h,setMeta:T,setSteps:M}):f(!1))}return b.createElement(b.Fragment,null,x?b.createElement(w,{styles:e},$):null,p?b.createElement(R,{styles:e,"aria-label":r==null?void 0:r.closeButtonAriaLabel,disabled:o,onClick:q}):null,b.createElement(A,{content:C==null?void 0:C.content,setCurrentStep:a,currentStep:c,transition:u,isHighlightingObserved:l,setIsOpen:f}),E?b.createElement(S,{setCurrentStep:a,currentStep:c,setIsOpen:f,steps:i,styles:e,"aria-hidden":!(r!=null&&r.showNavigationScreenReaders),nextButton:v,prevButton:g,disableDots:_,hideButtons:!y,hideDots:!k,disableAll:o,rtl:O,Arrow:j}):null)},vn=pn,mn=e=>{var t=e,{currentStep:n,setCurrentStep:r,setIsOpen:o,steps:s=[],setSteps:i,styles:a={},scrollSmooth:c,afterOpen:u,beforeClose:l,padding:f=10,position:v,onClickMask:g,onClickHighlighted:_,keyboardHandler:O,className:y="reactour__popover",maskClassName:p="reactour__mask",highlightedMaskClassName:E,clipId:x,maskId:k,disableInteraction:h,disableKeyboardNavigation:T,inViewThreshold:M,disabledActions:C,setDisabledActions:w,disableWhenSelectorFalsy:R,rtl:A,accessibilityOptions:S={closeButtonAriaLabel:"Close Tour",showNavigationScreenReaders:!0},ContentComponent:j,Wrapper:$,meta:q,setMeta:G,onTransition:I=()=>"center"}=t,D=Z(t,["currentStep","setCurrentStep","setIsOpen","steps","setSteps","styles","scrollSmooth","afterOpen","beforeClose","padding","position","onClickMask","onClickHighlighted","keyboardHandler","className","maskClassName","highlightedMaskClassName","clipId","maskId","disableInteraction","disableKeyboardNavigation","inViewThreshold","disabledActions","setDisabledActions","disableWhenSelectorFalsy","rtl","accessibilityOptions","ContentComponent","Wrapper","meta","setMeta","onTransition"]),N;const m=s[n],H=P(P({},a),m==null?void 0:m.styles),{sizes:K,transition:V,observableRefresher:le,isHighlightingObserved:pe,target:W}=Jt(m,{block:"center",behavior:c?"smooth":"auto",inViewThreshold:M});d.useEffect(()=>(u&&typeof u=="function"&&u(W),()=>{l&&typeof l=="function"&&l(W)}),[]);const{maskPadding:Ve,popoverPadding:We,wrapperPadding:Be}=bn((N=m==null?void 0:m.padding)!=null?N:f),X={setCurrentStep:r,setIsOpen:o,currentStep:n,setSteps:i,steps:s,setMeta:G,meta:q};function qe(){C||(g&&typeof g=="function"?g(X):o(!1))}const Ge=typeof(m==null?void 0:m.stepInteraction)=="boolean"?!(m!=null&&m.stepInteraction):h?typeof h=="boolean"?h:h(X):!1;d.useEffect(()=>(m!=null&&m.action&&typeof(m==null?void 0:m.action)=="function"&&(m==null||m.action(W)),(m==null?void 0:m.disableActions)!==void 0&&w(m==null?void 0:m.disableActions),()=>{m!=null&&m.actionAfter&&typeof(m==null?void 0:m.actionAfter)=="function"&&(m==null||m.actionAfter(W))}),[m]);const Ke=V?I:m!=null&&m.position?m==null?void 0:m.position:v,Ye=$||b.Fragment;return m?b.createElement(Ye,null,b.createElement(It,{mutationObservables:m==null?void 0:m.mutationObservables,resizeObservables:m==null?void 0:m.resizeObservables,refresh:le}),b.createElement(tn,{setCurrentStep:r,currentStep:n,setIsOpen:o,stepsLength:s.length,disableKeyboardNavigation:T,disable:C,rtl:A,clickProps:X,keyboardHandler:O}),(!R||W)&&b.createElement(Vt,{sizes:V?yn:K,onClick:qe,styles:P({highlightedArea:Y=>he(P({},Y),{display:Ge?"block":"none"})},H),padding:V?0:Ve,highlightedAreaClassName:E,className:p,onClickHighlighted:Y=>{Y.preventDefault(),Y.stopPropagation(),_&&_(Y,X)},wrapperPadding:Be,clipId:x,maskId:k}),(!R||W)&&b.createElement(Yt,{sizes:K,styles:H,position:Ke,padding:We,"aria-labelledby":S==null?void 0:S.ariaLabelledBy,className:y,refresher:n},j?b.createElement(j,P({styles:H,setCurrentStep:r,currentStep:n,setIsOpen:o,steps:s,accessibilityOptions:S,disabledActions:C,transition:V,isHighlightingObserved:pe,rtl:A},D)):b.createElement(vn,P({styles:H,setCurrentStep:r,currentStep:n,setIsOpen:o,steps:s,setSteps:i,accessibilityOptions:S,disabledActions:C,transition:V,isHighlightingObserved:pe,rtl:A,meta:q,setMeta:G},D)))):null},gn=mn;function bn(e){return typeof e=="object"&&e!==null?{maskPadding:e.mask,popoverPadding:e.popover,wrapperPadding:e.wrapper}:{maskPadding:e,popoverPadding:e,wrapperPadding:0}}var yn={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0},wn={isOpen:!1,setIsOpen:()=>!1,currentStep:0,setCurrentStep:()=>0,steps:[],setSteps:()=>[],setMeta:()=>"",disabledActions:!1,setDisabledActions:()=>!1,components:{}},_n=b.createContext(wn),En=e=>{var t=e,{children:n,defaultOpen:r=!1,startAt:o=0,steps:s,setCurrentStep:i,currentStep:a}=t,c=Z(t,["children","defaultOpen","startAt","steps","setCurrentStep","currentStep"]);const[u,l]=d.useState(r),[f,v]=d.useState(o),[g,_]=d.useState(s),[O,y]=d.useState(""),[p,E]=d.useState(!1),x=P({isOpen:u,setIsOpen:l,currentStep:a||f,setCurrentStep:i&&typeof i=="function"?i:v,steps:g,setSteps:_,disabledActions:p,setDisabledActions:E,meta:O,setMeta:y},c);return b.createElement(_n.Provider,{value:x},n,u?b.createElement(gn,P({},x)):null)};const On={default:"#1A1A1A",white:"#FFFFFF",orange:"#CE2021",current:"currentColor"};function Se({variant:e="default",size:t=40,className:n,style:r}){const o=On[e],s=t*(799/2325);return L.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:s,viewBox:"0 0 2325 799",fill:"none",className:n,style:r,"aria-hidden":"true",children:[L.jsx("rect",{x:"50",y:"50",width:"2225",height:"699",stroke:o,strokeWidth:"100"}),L.jsx("path",{d:"M492.333 199.627L599.833 295.627L600 295.776V491.707L492.207 599.5H199.5V199.5H492.19L492.333 199.627ZM334 347.5V448.5H435V347.5H334Z",fill:o}),L.jsx("path",{d:"M1108.5 497.715L1108.34 497.862L1001.34 599.362L1001.2 599.5H699V296.283L699.158 296.135L802.158 199.635L802.303 199.5H1108.5V497.715ZM855 347.5V448.5H956V347.5H855Z",fill:o}),L.jsx("path",{d:"M1616.94 200.24L1510.07 395.005L1616.94 598.768L1617.64 600.103L1616.28 599.451L1409 500.056L1208.22 599.448L1207.5 599.806V199.5H1617.34L1616.94 200.24ZM1332 337.5V439.207L1433.71 337.5H1332Z",fill:o}),L.jsx("path",{d:"M1716.5 599V200L1841 291.5L2125 200L2017.5 400L2125 599L1841 501L1716.5 599Z",fill:o,stroke:o})]})}function xn({caption:e,chipLabel:t,isLast:n,onAdvance:r,onEnd:o}){const s=t??(n?"Got it":"Next");return L.jsxs("div",{className:Ue("flex max-w-[min(20rem,calc(100vw-2rem))] flex-col gap-3 rounded-lg border","bg-popover text-popover-foreground shadow-floating p-4"),children:[L.jsxs("div",{className:"flex items-start gap-3",children:[L.jsxs("span",{className:"mt-0.5 shrink-0",children:[L.jsx(Se,{size:28,className:"dark:hidden"}),L.jsx(Se,{variant:"white",size:28,className:"hidden dark:block"})]}),L.jsx("p",{className:"text-sm leading-relaxed",children:e})]}),L.jsxs("div",{className:"flex items-center justify-end gap-2",children:[L.jsx(ve,{variant:"ghost",size:"sm",onClick:o,children:"Done"}),L.jsx(ve,{variant:"default",size:"sm",onClick:r,children:s})]})]})}const Rn=4e3,Sn=100;function kn(e){const[t,n]=d.useState({element:null,status:"resolving",anchor:e}),[r,o]=d.useState(e);return e!==r&&(o(e),n({element:null,status:"resolving",anchor:e})),d.useEffect(()=>{if(e===null)return;const s=Ce(e);let i=null,a=!1;const c=Date.now()+Rn,u=()=>{const f=document.querySelector(s);return f?(f!==i&&(f.scrollIntoView({block:"center",inline:"center"}),i=f,a=!0,n({element:f,status:"found",anchor:e})),!1):a?!1:Date.now()>=c?(n({element:null,status:"timeout",anchor:e}),!0):!1},l=setInterval(()=>{u()&&clearInterval(l)},Sn);return()=>clearInterval(l)},[e]),t}const Cn=".reactour__popover",Ln=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function ke(e){return Array.from(e.querySelectorAll(Ln))}function Mn(e,t){d.useEffect(()=>{var o;if(!e)return;const n=document.querySelector(Cn);if(!n)return;(o=ke(n)[0])==null||o.focus();const r=s=>{if(s.key!=="Tab")return;const i=ke(n);if(i.length===0)return;const a=i[0],c=i[i.length-1],u=document.activeElement;n.contains(u)?s.shiftKey&&u===a?(s.preventDefault(),c.focus()):!s.shiftKey&&u===c&&(s.preventDefault(),a.focus()):(s.preventDefault(),a.focus())};return document.addEventListener("keydown",r,!0),()=>document.removeEventListener("keydown",r,!0)},[e,t])}const ze="(prefers-reduced-motion: reduce)";function Tn(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(ze).matches}function An(){const[e,t]=d.useState(Tn);return d.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const n=window.matchMedia(ze),r=o=>t(o.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}const In="dork-tour-mask--reduced-motion",Pn={mask:8,popover:10},Dn="x 280ms ease, y 280ms ease, width 280ms ease, height 280ms ease";function Nn({steps:e,activeIndex:t,onAdvance:n,onEnd:r}){const o=e[t],s=t>=e.length-1,i=Ze(),a=An(),c=kn((o==null?void 0:o.anchor)??null),[u,l]=d.useState(null);c.status==="found"&&c.element!==null&&c.anchor===(o==null?void 0:o.anchor)&&u!==t?l(t):!o&&u!==null&&l(null);const f=u!==null,v=u!==null?e[u]:void 0,g=d.useCallback(()=>{s?r():n()},[s,r,n]),_=d.useRef(g);d.useEffect(()=>{_.current=g},[g]),d.useEffect(()=>{c.status==="timeout"&&_.current()},[c.status]);const O=d.useRef(n),y=d.useRef(r);d.useEffect(()=>{O.current=n,y.current=r},[n,r]);const p=d.useRef(!1);d.useEffect(()=>{p.current=u===t},[u,t]);const[E,x]=d.useState(!1);d.useEffect(()=>{if(f&&!E){const w=requestAnimationFrame(()=>x(!0));return()=>cancelAnimationFrame(w)}},[f,E]),d.useEffect(()=>{if(!f)return;const w=document.getElementById("root");if(w)return w.inert=!0,()=>{w.inert=!1}},[f]),Mn(f,u??-1);const k=d.useMemo(()=>w=>{const R={...w,backgroundColor:"transparent",padding:0,boxShadow:"none",maxWidth:"none",color:"inherit"};return i?{...R,position:"fixed",top:"auto",left:0,right:0,bottom:0,transform:"none",display:"flex",justifyContent:"center",padding:"0 1rem 1rem"}:R},[i]),h=d.useCallback(w=>E?{...w,transition:Dn}:w,[E]),T=d.useMemo(()=>({popover:k,maskArea:h}),[k,h]),M=d.useMemo(()=>e.map((w,R)=>{const A=R===e.length-1;return{selector:Ce(w.anchor),stepInteraction:!1,content:L.jsx(xn,{caption:w.caption,chipLabel:w.chipLabel,isLast:A,onAdvance:()=>A?y.current():O.current(),onEnd:()=>y.current()})}}),[e]),C=d.useMemo(()=>e.map(w=>w.anchor).join("|"),[e]);return o?Xe.createPortal(L.jsxs(L.Fragment,{children:[L.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:f?(v==null?void 0:v.caption)??"":""}),f&&L.jsx(En,{steps:M,currentStep:u??0,defaultOpen:!0,showNavigation:!1,showPrevNextButtons:!1,showCloseButton:!1,showBadge:!1,showDots:!1,disableInteraction:!0,padding:Pn,styles:T,maskClassName:a?In:void 0,onClickMask:()=>r(),keyboardHandler:w=>{w.key==="Escape"?(w.preventDefault(),y.current()):w.key==="ArrowRight"&&p.current&&_.current()},children:L.jsx("span",{className:"hidden","aria-hidden":!0})},C)]}),document.body):null}const de={general:{id:"general",deepLink:{kind:"route",...Q.home()},steps:[{anchor:U.homeComposer,caption:z.general.composer,chipLabel:"Next"},{anchor:U.homeTabs,caption:z.general.homeTabs,chipLabel:"Got it"}]},tasks:{id:"tasks",occasion:"tasks",offerLine:z.offers.tasks,deepLink:{kind:"route",...Q.tasks()},steps:[{anchor:U.tasksList,caption:z.tasks.tasksList,chipLabel:"Got it"}]},relay:{id:"relay",occasion:"relay",offerLine:z.offers.relay,deepLink:{kind:"route",...Q.connections()},steps:[{anchor:U.relayIntegrations,caption:z.relay.relayIntegrations,chipLabel:"Got it"}]},mesh:{id:"mesh",occasion:"mesh",offerLine:z.offers.mesh,deepLink:{kind:"route",...Q.team()},steps:[{anchor:U.teamRoster,caption:z.mesh.teamRoster,chipLabel:"Got it"}]}},F=Qe()(e=>({runningTourId:null,activeIndex:0,pendingOfferId:null,startTour:t=>e({runningTourId:t,activeIndex:0,pendingOfferId:null}),advanceStep:()=>e(t=>({activeIndex:t.activeIndex+1})),endTour:()=>e({runningTourId:null,activeIndex:0}),setPendingOffer:t=>e({pendingOfferId:t}),clearPendingOffer:()=>e({pendingOfferId:null})}));function Fe(){var x,k;const e=Je(),t=et(),{data:n}=tt({queryKey:me.current(),queryFn:()=>e.getConfig(),staleTime:rt}),r=((x=n==null?void 0:n.tours)==null?void 0:x.seen)??[],o=((k=n==null?void 0:n.tours)==null?void 0:k.declined)??[],s=F(h=>h.runningTourId),i=F(h=>h.activeIndex),a=F(h=>h.pendingOfferId),c=F(h=>h.startTour),u=F(h=>h.advanceStep),l=F(h=>h.endTour),f=F(h=>h.setPendingOffer),v=F(h=>h.clearPendingOffer),g=nt({mutationFn:h=>e.updateConfig({tours:h}),onSuccess:()=>t.invalidateQueries({queryKey:me.all}),meta:{errorLabel:"Couldn’t save your tour progress"}});function _(h){r.includes(h)||g.mutate({seen:[...r,h]})}function O(h){o.includes(h)||g.mutate({declined:[...o,h]})}function y(h){return r.includes(h)||o.includes(h)}function p(h){_(h),c(h)}function E(h){O(h),v()}return{seen:r,declined:o,isSuppressed:y,runningDefinition:s?de[s]:null,activeIndex:i,pendingOffer:a?de[a]:null,pendingOfferId:a,runTour:c,acceptOffer:p,declineOffer:E,setPendingOffer:f,advanceStep:u,endTour:l}}const Hn=1,jn=1,$n=2;function zn(){const{isSuppressed:e,setPendingOffer:t,pendingOfferId:n,runningDefinition:r}=Fe(),o=ot(y=>Object.values(y.statuses).some(p=>p.lifecycle==="streaming")),s=it(),i=st(),{data:a}=at(i),{data:c}=ft(s),{data:u}=lt(),l=a==null?void 0:a.length,f=s&&c?c.reduce((y,p)=>y+p.instances.length,0):void 0,v=u==null?void 0:u.agents.length,g=d.useRef(void 0),_=d.useRef(void 0),O=d.useRef(void 0);d.useEffect(()=>{const y=(E,x,k,h,T)=>{if(x===void 0)return T;const M=h.current;return M===void 0||!(M<k&&x>=k)?(h.current=x,T):o||T||(h.current=x,e(E))?T:(t(E),!0)};let p=n!==null||r!==null;p=y("tasks",l,Hn,g,p),p=y("relay",f,jn,_,p),y("mesh",v,$n,O,p)},[l,f,v,o,n,r,e,t])}function Bn(){zn();const{runningDefinition:e,activeIndex:t,advanceStep:n,endTour:r,runTour:o}=Fe(),s=ct(),i=ut({select:l=>l.location.pathname}),a=ge(l=>l.requestedTour),c=ge(l=>l.clearRequestedTour),u=(e==null?void 0:e.id)??null;return d.useEffect(()=>{if(a!==null){if(!(a in de)){c();return}if(u===a){c();return}o(a)}},[a,u,o,c]),d.useEffect(()=>{if(!e)return;const{to:l}=e.deepLink;i!==l&&s({to:l})},[e,i,s]),e?L.jsx(Nn,{steps:e.steps,activeIndex:t,onAdvance:n,onEnd:r}):null}export{Se as D,de as T,Bn as a,zn as b,Fe as u};
@@ -1 +1 @@
1
- import{ae as u,cT as h,ag as p,cU as k,j as r,cV as D,cW as j,cX as x,cY as L,cZ as R,c_ as P,B as f,cQ as l}from"./index-BZKMWkth.js";import{u as m}from"./use-dev-links-daERqZ4e.js";function y(){const e=u();return p({mutationFn:t=>e.previewDevLink(t),meta:{suppressErrorToast:!0}})}function A(){const e=u(),t=m(),o=h(n=>n.forget);return p({mutationFn:n=>e.linkDevLink(n),meta:{suppressErrorToast:!0},onSuccess:n=>{n.status==="linked"&&(o(n.link),t())}})}function $(){const e=u(),t=m(),o=h(n=>n.forget);return p({mutationFn:({name:n,...s})=>e.unlinkDevLink(n,s),meta:{suppressErrorToast:!0},onSuccess:(n,s)=>{o(s),t()}})}const g=/^(\S+) didn't build:/;function w(e){const t=e.length===1?g.exec(e[0]):null;return t?`Couldn’t reload: ${t[1]} has a build error.`:"Couldn’t reload your last edit."}function T(e,t,o){if(e.state!=="active")return{kind:e.state};const n=o==null?void 0:o.lastReloadAt,s=t!==void 0&&(o===void 0||t.at>=o.linkedAt)?t:void 0,i=s!==void 0&&(n===void 0||s.at>=n);if(i&&s.errors&&s.errors.length>0)return{kind:"reload-failed",at:s.at,headline:w(s.errors),details:s.errors};const c=i?s.at:n;return c?{kind:"reloaded",at:c}:{kind:"watching"}}function C(e,t){const o=Math.max(0,Math.floor((t-new Date(e).getTime())/1e3));if(o<2)return"Reloaded just now";if(o<60)return`Reloaded ${o}s ago`;const n=Math.floor(o/60);if(n<60)return`Reloaded ${n}m ago`;const s=Math.floor(n/60);return s<24?`Reloaded ${s}h ago`:`Reloaded ${new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}`}function v(e){return e.agentPath?{scope:"project",projectPath:e.agentPath}:{scope:"global"}}function F(e,t){var s;const{scope:o}=v(t),n=(s=t.devLink)==null?void 0:s.path;return e==null?void 0:e.find(i=>i.name===t.name&&i.scope===o&&i.path===n)}function N(e,t){return t?{name:t.name,scope:t.scope,...t.projectPath!==void 0&&{projectPath:t.projectPath}}:{name:e.name,...v(e)}}function I(e,t){return t.restored==="installed"?{title:`${e} runs from the installed copy.`}:t.parkedLeftAt?{title:`${e} unlinked. Its installed copy couldn’t come back.`,description:`It’s still set aside at ${t.parkedLeftAt}.`}:t.leftInPlace?{title:`${e} unlinked.`,description:"Something else was in its place. It was left as it is."}:{title:`${e} removed.`}}function U({target:e,onClose:t,onUnlinked:o}){const n=$(),s=e?k(e.name):"",i=(e==null?void 0:e.then)==="install";async function c(){if(e)try{const a=await n.mutateAsync({name:e.name,scope:e.scope,...e.projectPath!==void 0&&{projectPath:e.projectPath}});if(i&&a.restored==="removed"&&!a.parkedLeftAt)l.success(`${s} unlinked.`,{description:a.leftInPlace?"Something else was in its place. It was left as it is.":"It’s not installed until you finish the install."});else{const d=I(s,a);l.success(d.title,d.description?{description:d.description}:void 0)}o==null||o(e,a),t()}catch(a){l.error(`Couldn’t unlink ${s}`,{description:a instanceof Error?a.message:void 0})}}return r.jsx(D,{open:e!==null,onOpenChange:a=>!a&&t(),children:r.jsx(j,{className:"!min-h-0 sm:max-w-md",children:e&&r.jsxs(r.Fragment,{children:[r.jsxs(x,{className:"text-left",children:[r.jsx(L,{className:"text-left",children:i?`Install the published ${s}?`:`Unlink ${s}?`}),r.jsx(R,{className:"text-left",children:i?`${s} is unlinked first. Your folder is not touched.`:e.parked?"Your installed copy comes back.":`${s} is removed. Your folder is not touched.`})]}),r.jsxs(P,{children:[r.jsx(f,{variant:"ghost",onClick:t,disabled:n.isPending,children:"Cancel"}),r.jsx(f,{onClick:()=>void c(),disabled:n.isPending,children:n.isPending?"Unlinking…":i?"Unlink and install":"Unlink"})]})]})})})}export{U,N as a,T as b,C as c,v as d,A as e,F as f,y as u};
1
+ import{ae as u,cT as h,ag as p,cU as k,j as r,cV as D,cW as j,cX as x,cY as L,cZ as R,c_ as P,B as f,cQ as l}from"./index-Dr-0P6rd.js";import{u as m}from"./use-dev-links-BImQrE6g.js";function y(){const e=u();return p({mutationFn:t=>e.previewDevLink(t),meta:{suppressErrorToast:!0}})}function A(){const e=u(),t=m(),o=h(n=>n.forget);return p({mutationFn:n=>e.linkDevLink(n),meta:{suppressErrorToast:!0},onSuccess:n=>{n.status==="linked"&&(o(n.link),t())}})}function $(){const e=u(),t=m(),o=h(n=>n.forget);return p({mutationFn:({name:n,...s})=>e.unlinkDevLink(n,s),meta:{suppressErrorToast:!0},onSuccess:(n,s)=>{o(s),t()}})}const g=/^(\S+) didn't build:/;function w(e){const t=e.length===1?g.exec(e[0]):null;return t?`Couldn’t reload: ${t[1]} has a build error.`:"Couldn’t reload your last edit."}function T(e,t,o){if(e.state!=="active")return{kind:e.state};const n=o==null?void 0:o.lastReloadAt,s=t!==void 0&&(o===void 0||t.at>=o.linkedAt)?t:void 0,i=s!==void 0&&(n===void 0||s.at>=n);if(i&&s.errors&&s.errors.length>0)return{kind:"reload-failed",at:s.at,headline:w(s.errors),details:s.errors};const c=i?s.at:n;return c?{kind:"reloaded",at:c}:{kind:"watching"}}function C(e,t){const o=Math.max(0,Math.floor((t-new Date(e).getTime())/1e3));if(o<2)return"Reloaded just now";if(o<60)return`Reloaded ${o}s ago`;const n=Math.floor(o/60);if(n<60)return`Reloaded ${n}m ago`;const s=Math.floor(n/60);return s<24?`Reloaded ${s}h ago`:`Reloaded ${new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}`}function v(e){return e.agentPath?{scope:"project",projectPath:e.agentPath}:{scope:"global"}}function F(e,t){var s;const{scope:o}=v(t),n=(s=t.devLink)==null?void 0:s.path;return e==null?void 0:e.find(i=>i.name===t.name&&i.scope===o&&i.path===n)}function N(e,t){return t?{name:t.name,scope:t.scope,...t.projectPath!==void 0&&{projectPath:t.projectPath}}:{name:e.name,...v(e)}}function I(e,t){return t.restored==="installed"?{title:`${e} runs from the installed copy.`}:t.parkedLeftAt?{title:`${e} unlinked. Its installed copy couldn’t come back.`,description:`It’s still set aside at ${t.parkedLeftAt}.`}:t.leftInPlace?{title:`${e} unlinked.`,description:"Something else was in its place. It was left as it is."}:{title:`${e} removed.`}}function U({target:e,onClose:t,onUnlinked:o}){const n=$(),s=e?k(e.name):"",i=(e==null?void 0:e.then)==="install";async function c(){if(e)try{const a=await n.mutateAsync({name:e.name,scope:e.scope,...e.projectPath!==void 0&&{projectPath:e.projectPath}});if(i&&a.restored==="removed"&&!a.parkedLeftAt)l.success(`${s} unlinked.`,{description:a.leftInPlace?"Something else was in its place. It was left as it is.":"It’s not installed until you finish the install."});else{const d=I(s,a);l.success(d.title,d.description?{description:d.description}:void 0)}o==null||o(e,a),t()}catch(a){l.error(`Couldn’t unlink ${s}`,{description:a instanceof Error?a.message:void 0})}}return r.jsx(D,{open:e!==null,onOpenChange:a=>!a&&t(),children:r.jsx(j,{className:"!min-h-0 sm:max-w-md",children:e&&r.jsxs(r.Fragment,{children:[r.jsxs(x,{className:"text-left",children:[r.jsx(L,{className:"text-left",children:i?`Install the published ${s}?`:`Unlink ${s}?`}),r.jsx(R,{className:"text-left",children:i?`${s} is unlinked first. Your folder is not touched.`:e.parked?"Your installed copy comes back.":`${s} is removed. Your folder is not touched.`})]}),r.jsxs(P,{children:[r.jsx(f,{variant:"ghost",onClick:t,disabled:n.isPending,children:"Cancel"}),r.jsx(f,{onClick:()=>void c(),disabled:n.isPending,children:n.isPending?"Unlinking…":i?"Unlink and install":"Unlink"})]})]})})})}export{U,N as a,T as b,C as c,v as d,A as e,F as f,y as u};