hermes-web-ui 0.6.40 → 0.6.41

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 (287) hide show
  1. package/dist/client/assets/js/{AppSidebar-CaSVcbCW.js → AppSidebar-CNkSiv3l.js} +1 -1
  2. package/dist/client/assets/js/{ChannelsView-hdAXa1hf.js → ChannelsView-6rEo6RBl.js} +1 -1
  3. package/dist/client/assets/js/{ChatPanel-C6sX6idm.js → ChatPanel-ANAZWluc.js} +3 -3
  4. package/dist/client/assets/js/{ChatView-B68k_-D9.js → ChatView-DFcPsmRF.js} +1 -1
  5. package/dist/client/assets/js/{CodingAgentsView-CsIjwbXR.js → CodingAgentsView-CpIY0SHT.js} +1 -1
  6. package/dist/client/assets/js/{DefaultCredentialPrompt-BRhb4DOa.js → DefaultCredentialPrompt-DmNeotSW.js} +1 -1
  7. package/dist/client/assets/js/{DesktopBrowserPanel-BlBfS64w.js → DesktopBrowserPanel-CWjTU-3y.js} +1 -1
  8. package/dist/client/assets/js/{DesktopBrowserView-JukL0QuS.js → DesktopBrowserView-D9Qb3fIV.js} +1 -1
  9. package/dist/client/assets/js/{DesktopPetView-DWq4EiRU.js → DesktopPetView-B7REtC57.js} +1 -1
  10. package/dist/client/assets/js/{DesktopTitleBar-DphP4oa6.js → DesktopTitleBar-Dej_16hB.js} +1 -1
  11. package/dist/client/assets/js/{DevicesView-BFtrfqJs.js → DevicesView--d4HCkch.js} +1 -1
  12. package/dist/client/assets/js/{DocxFilePreview-CmVJ9Jxx.js → DocxFilePreview-BQz6WC7r.js} +2 -2
  13. package/dist/client/assets/js/{FileEditor-CdkNYp7b.js → FileEditor-BBegs-5i.js} +2 -2
  14. package/dist/client/assets/js/{FilePreview-CJrVRPRs.js → FilePreview-B7WqYvZs.js} +2 -2
  15. package/dist/client/assets/js/{FileRenameModal-mghyEXU4.js → FileRenameModal-82RkAZkd.js} +1 -1
  16. package/dist/client/assets/js/{FilesPanel-B9cKB5lX.js → FilesPanel-BHcg6CpC.js} +2 -2
  17. package/dist/client/assets/js/{FilesView-iKZu70E9.js → FilesView-Dl15WTar.js} +2 -2
  18. package/dist/client/assets/js/{GlobalAgentView-JZsss0gx.js → GlobalAgentView-dxEX611f.js} +1 -1
  19. package/dist/client/assets/js/{GlobalPendingActions-BRQIt5vl.js → GlobalPendingActions-CeK96C3G.js} +1 -1
  20. package/dist/client/assets/js/{GroupChatLinkView-CNrV8lnT.js → GroupChatLinkView-CJhI9DVE.js} +1 -1
  21. package/dist/client/assets/js/{GroupChatPanel-WK4zBasl.js → GroupChatPanel-CLa3s08V.js} +3 -3
  22. package/dist/client/assets/js/{GroupChatView-BlMUD1MW.js → GroupChatView-CUwvu-6F.js} +1 -1
  23. package/dist/client/assets/js/{HistoryMessageList-D8zoQ1Zs.js → HistoryMessageList-BdD8GJYM.js} +1 -1
  24. package/dist/client/assets/js/{HistoryView-Bpr8N2lC.js → HistoryView-Ro92tP5R.js} +1 -1
  25. package/dist/client/assets/js/{HtmlFilePreview-Bj3_-hMo.js → HtmlFilePreview-xYn7YtmC.js} +1 -1
  26. package/dist/client/assets/js/{JobsView-CZK26gTw.js → JobsView-BaNA1Yaa.js} +2 -2
  27. package/dist/client/assets/js/{JourneyView-BPUsLj4o.js → JourneyView-Bw-05mCF.js} +1 -1
  28. package/dist/client/assets/js/{KanbanView-B7d-2_z9.js → KanbanView-BYC32l2Q.js} +1 -1
  29. package/dist/client/assets/js/{LoginView-BpYyv831.js → LoginView-KrpCkwOr.js} +1 -1
  30. package/dist/client/assets/js/{LogsView-CabFHk0v.js → LogsView-Dgm4v5sN.js} +1 -1
  31. package/dist/client/assets/js/{MarkdownRenderer-CVtmHZwc.js → MarkdownRenderer-BIPowjr-.js} +3 -3
  32. package/dist/client/assets/js/{McpManagerView-C-ou8vf3.js → McpManagerView-DTtkUIvq.js} +1 -1
  33. package/dist/client/assets/js/{MemoryView-QGFW4iZo.js → MemoryView-BnL7xzux.js} +2 -2
  34. package/dist/client/assets/js/{MessageList-DZR-TFjD.js → MessageList-5tytzhb0.js} +3 -3
  35. package/dist/client/assets/js/{ModelsView-DiWdSWOW.js → ModelsView-ComCz0Ce.js} +1 -1
  36. package/dist/client/assets/js/{OutlinePanel-Dlr5svMY.js → OutlinePanel-CF_XPCRn.js} +1 -1
  37. package/dist/client/assets/js/{PageSidebarFooter-Bic1fUmG.js → PageSidebarFooter-dvLzcTIm.js} +1 -1
  38. package/dist/client/assets/js/{PdfFilePreview-Dkpan1ay.js → PdfFilePreview-COOAoJ4V.js} +2 -2
  39. package/dist/client/assets/js/{PerformanceView-LrZaED_Z.js → PerformanceView-D6dKifJh.js} +1 -1
  40. package/dist/client/assets/js/{PetdexView-Bv8RioGL.js → PetdexView-CmvzDYwf.js} +1 -1
  41. package/dist/client/assets/js/{PluginsView-CbtdIGlq.js → PluginsView-zJV9FE9c.js} +1 -1
  42. package/dist/client/assets/js/{PptxFilePreview-5if_GbU6.js → PptxFilePreview-dC4JxV6j.js} +2 -2
  43. package/dist/client/assets/js/{ProfileAvatar-DI9ciJxS.js → ProfileAvatar-C8xoALCI.js} +1 -1
  44. package/dist/client/assets/js/{ProfilesView-C-FSiKMU.js → ProfilesView-CxVxJRN_.js} +1 -1
  45. package/dist/client/assets/js/{ProviderConfigurationPrompt-BUoWC41Y.js → ProviderConfigurationPrompt-zwk1UwoP.js} +1 -1
  46. package/dist/client/assets/js/{SessionSearchModal-CEKvSihp.js → SessionSearchModal-DhwGsV-i.js} +1 -1
  47. package/dist/client/assets/js/{SettingRow-CSfiJmxx.js → SettingRow-DHqhLX3M.js} +1 -1
  48. package/dist/client/assets/js/{SettingsCircuitBadge-DHIEFyTR.js → SettingsCircuitBadge-CnWSfQZd.js} +1 -1
  49. package/dist/client/assets/js/{SettingsView-DbNJroV3.js → SettingsView-Cbroga25.js} +1 -1
  50. package/dist/client/assets/js/{SharedGroupChatView-CTYjqWcO.js → SharedGroupChatView-DXfqtQ33.js} +1 -1
  51. package/dist/client/assets/js/{SkillsUsageView-BqZ3GtfT.js → SkillsUsageView-C34i3lOQ.js} +1 -1
  52. package/dist/client/assets/js/{SkillsView-Bhla7821.js → SkillsView-DRG_1esx.js} +2 -2
  53. package/dist/client/assets/js/{SpreadsheetFilePreview-CGK8HDAx.js → SpreadsheetFilePreview-DRw4kIx5.js} +1 -1
  54. package/dist/client/assets/js/{TerminalPanel-CtBTLOwq.js → TerminalPanel-Da1nL9P8.js} +1 -1
  55. package/dist/client/assets/js/{TerminalView-BID7fupB.js → TerminalView-B6z-VaGq.js} +1 -1
  56. package/dist/client/assets/js/{ThemeView-Cx3ucIus.js → ThemeView-CAaJ9MH-.js} +1 -1
  57. package/dist/client/assets/js/{UsageView-ByGCsw7o.js → UsageView-B_hLsp0k.js} +1 -1
  58. package/dist/client/assets/js/{VersionPreviewView-DiAK1ind.js → VersionPreviewView-DKXL6anl.js} +1 -1
  59. package/dist/client/assets/js/{WebPet-CdIqrnp1.js → WebPet-BUvrfjpq.js} +1 -1
  60. package/dist/client/assets/js/{WorkflowView-DmBOhSuq.js → WorkflowView-r46Ap9FY.js} +1 -1
  61. package/dist/client/assets/js/{WorkspaceDiffPreview-dHIGp-9F.js → WorkspaceDiffPreview-EwZAE18F.js} +2 -2
  62. package/dist/client/assets/js/{abap-Dj8IFKiF.js → abap-C7gkFu-A.js} +1 -1
  63. package/dist/client/assets/js/{aiden0z-pptx-renderer.es-6vi5-jAN.js → aiden0z-pptx-renderer.es-DOpVaH_k.js} +1 -1
  64. package/dist/client/assets/js/{apex-C3INPUEt.js → apex-DZOtRowu.js} +1 -1
  65. package/dist/client/assets/js/{ar-Gk9y3ZfO.js → ar-8iThLSJQ.js} +1 -1
  66. package/dist/client/assets/js/architecture-7EHR7CIX-BrfhYGuP.js +1 -0
  67. package/dist/client/assets/js/{architectureDiagram-3BPJPVTR-DLZYeivB.js → architectureDiagram-3BPJPVTR-DEsTTzKd.js} +1 -1
  68. package/dist/client/assets/js/{auth-D1ZFqv22.js → auth-B52zm2Ir.js} +1 -1
  69. package/dist/client/assets/js/{azcli-UBzLhJq5.js → azcli-KxuicZQh.js} +1 -1
  70. package/dist/client/assets/js/{bat-P3O4jldt.js → bat-DfFP4HF-.js} +1 -1
  71. package/dist/client/assets/js/{bicep-DdQR9RxE.js → bicep-Co4bntVh.js} +1 -1
  72. package/dist/client/assets/js/{blockDiagram-GPEHLZMM-UWFo8sm5.js → blockDiagram-GPEHLZMM-NsxYeUKd.js} +1 -1
  73. package/dist/client/assets/js/{c4Diagram-AAUBKEIU-jgyj0wOb.js → c4Diagram-AAUBKEIU-D68asSzm.js} +1 -1
  74. package/dist/client/assets/js/{cameligo-Bb4ubW_C.js → cameligo-Xi0l_9Wr.js} +1 -1
  75. package/dist/client/assets/js/{chat-DdHii4Qz.js → chat-fUZW3YFa.js} +1 -1
  76. package/dist/client/assets/js/{chat-input-height-CSPwB9it.js → chat-input-height-lvFawuv9.js} +1 -1
  77. package/dist/client/assets/js/{chat-timestamp-DGQ8fmtT.js → chat-timestamp-4wWFcZWv.js} +1 -1
  78. package/dist/client/assets/js/{chunk-2J33WTMH-Br9OWF5a.js → chunk-2J33WTMH-CEU5sLIh.js} +1 -1
  79. package/dist/client/assets/js/{chunk-3OPIFGDE-Cb40LuI4.js → chunk-3OPIFGDE-DEhbKkCl.js} +1 -1
  80. package/dist/client/assets/js/{chunk-4BX2VUAB-jYtdiafd.js → chunk-4BX2VUAB-OIZUstuy.js} +1 -1
  81. package/dist/client/assets/js/{chunk-55IACEB6-CBtymeHY.js → chunk-55IACEB6-DQHKZCBG.js} +1 -1
  82. package/dist/client/assets/js/{chunk-5ZQYHXKU-yj9xqmex.js → chunk-5ZQYHXKU-BU3pQVVl.js} +1 -1
  83. package/dist/client/assets/js/{chunk-727SXJPM-er_5tB5X.js → chunk-727SXJPM-jj97gdnP.js} +1 -1
  84. package/dist/client/assets/js/{chunk-AQP2D5EJ-C4mDD6xK.js → chunk-AQP2D5EJ-jv-oWlkb.js} +1 -1
  85. package/dist/client/assets/js/{chunk-BSJP7CBP-QZesZe57.js → chunk-BSJP7CBP-DkKsepNF.js} +1 -1
  86. package/dist/client/assets/js/{chunk-CSCIHK7Q-5LH118bT.js → chunk-CSCIHK7Q-CLgoBoCF.js} +3 -3
  87. package/dist/client/assets/js/{chunk-FMBD7UC4-CQho6QZ5.js → chunk-FMBD7UC4-Bx1bCKUR.js} +1 -1
  88. package/dist/client/assets/js/{chunk-KSCS5N6A-DONM1Omv.js → chunk-KSCS5N6A-CZHZ6pBd.js} +1 -1
  89. package/dist/client/assets/js/{chunk-L5ZTLDWV-FN_zFWkp.js → chunk-L5ZTLDWV-dz9D3kOb.js} +1 -1
  90. package/dist/client/assets/js/{chunk-LZXEDZCA-CEEUVvpS.js → chunk-LZXEDZCA-CQiSQehC.js} +2 -2
  91. package/dist/client/assets/js/{chunk-ND2GUHAM-DWckpxQD.js → chunk-ND2GUHAM-mWODKb8v.js} +1 -1
  92. package/dist/client/assets/js/{chunk-NZK2D7GU-0mKZmkuV.js → chunk-NZK2D7GU-ivCkjCOR.js} +1 -1
  93. package/dist/client/assets/js/{chunk-O5CBEL6O-DIDAOkT_.js → chunk-O5CBEL6O-BRUisK47.js} +1 -1
  94. package/dist/client/assets/js/{chunk-QZHKN3VN-D3c-TMz-.js → chunk-QZHKN3VN-BHjgTrzY.js} +1 -1
  95. package/dist/client/assets/js/{chunk-WU5MYG2G-BZvSpwm4.js → chunk-WU5MYG2G-CNW1rcpL.js} +1 -1
  96. package/dist/client/assets/js/{chunk-XPW4576I-xdyJtk-s.js → chunk-XPW4576I-DP3dJbOu.js} +1 -1
  97. package/dist/client/assets/js/classDiagram-4FO5ZUOK-BVBBe3DQ.js +1 -0
  98. package/dist/client/assets/js/classDiagram-v2-Q7XG4LA2-DJUe3i9Y.js +1 -0
  99. package/dist/client/assets/js/{clipboard-DQ_A8ns-.js → clipboard-DHZFaAvO.js} +1 -1
  100. package/dist/client/assets/js/{clipboard-files-bDrcGKPe.js → clipboard-files-CBDy-02Y.js} +1 -1
  101. package/dist/client/assets/js/{clojure-ku7aCU1_.js → clojure-DuyGwS8X.js} +1 -1
  102. package/dist/client/assets/js/{coding-agents-DfHyBvky.js → coding-agents-BNTHD6kd.js} +1 -1
  103. package/dist/client/assets/js/{codingAgentProviders-BM18FAW9.js → codingAgentProviders-DM_ouxbL.js} +1 -1
  104. package/dist/client/assets/js/{coffee-DnRIdJlY.js → coffee-C5p7vzpa.js} +1 -1
  105. package/dist/client/assets/js/{completion-notification-XxjbntI8.js → completion-notification-CzdnhuX3.js} +1 -1
  106. package/dist/client/assets/js/{cose-bilkent-S5V4N54A-w891sIF1.js → cose-bilkent-S5V4N54A-De_ZdqY0.js} +1 -1
  107. package/dist/client/assets/js/{cpp-CN8i6ISX.js → cpp-II5hDbTe.js} +1 -1
  108. package/dist/client/assets/js/{csharp-B-fxig7O.js → csharp-D0POzSpv.js} +1 -1
  109. package/dist/client/assets/js/{csp-Bar9LGt4.js → csp-CwtuRkR3.js} +1 -1
  110. package/dist/client/assets/js/{css-DFtC5xZN.js → css-Dc2fJIqQ.js} +1 -1
  111. package/dist/client/assets/js/{cssMode-DH5XKKL2.js → cssMode-CC6jRvHF.js} +1 -1
  112. package/dist/client/assets/js/{cypher-BkJexWsv.js → cypher-DBcQoWDH.js} +1 -1
  113. package/dist/client/assets/js/{cytoscape.esm-BDsvr8Aq.js → cytoscape.esm-C9FMRqxM.js} +1 -1
  114. package/dist/client/assets/js/{dagre-BM42HDAG-BuT885pa.js → dagre-BM42HDAG-CvJIC410.js} +1 -1
  115. package/dist/client/assets/js/{dagre-BVUDh8Sh.js → dagre-BtgEsAtK.js} +1 -1
  116. package/dist/client/assets/js/{dart-B7W8hAtN.js → dart-Jf_Hmp2o.js} +1 -1
  117. package/dist/client/assets/js/{de-LDpd8WHJ.js → de-7hLSwCEx.js} +1 -1
  118. package/dist/client/assets/js/{defineProperty-DdPu4ZVv.js → defineProperty-DHkErCmG.js} +1 -1
  119. package/dist/client/assets/js/{desktop-browser-xrRFPNUg.js → desktop-browser-C6AhY0uu.js} +1 -1
  120. package/dist/client/assets/js/{diagram-2AECGRRQ-B1sSf-09.js → diagram-2AECGRRQ-CvPeU5Lm.js} +1 -1
  121. package/dist/client/assets/js/{diagram-5GNKFQAL-BffX22pf.js → diagram-5GNKFQAL-CBniYlkH.js} +1 -1
  122. package/dist/client/assets/js/{diagram-KO2AKTUF-D8QvpUpn.js → diagram-KO2AKTUF-C_yFaVRj.js} +1 -1
  123. package/dist/client/assets/js/{diagram-LMA3HP47-DkG7p3lQ.js → diagram-LMA3HP47-BzM1IxNe.js} +1 -1
  124. package/dist/client/assets/js/{diagram-OG6HWLK6-RjvNNvXM.js → diagram-OG6HWLK6-yvmf_3ax.js} +1 -1
  125. package/dist/client/assets/js/{dist-Bk0VKtV3.js → dist-BHzBn3v7.js} +1 -1
  126. package/dist/client/assets/js/{dockerfile-C4m7j8sy.js → dockerfile-J3d6ZPDJ.js} +1 -1
  127. package/dist/client/assets/js/{docx-preview-BpTW-GN7.js → docx-preview-Rqt8wMjQ.js} +1 -1
  128. package/dist/client/assets/js/{download-CX8EG48r.js → download-xhRMWMda.js} +1 -1
  129. package/dist/client/assets/js/{ecl-EHV358Ls.js → ecl-XnlT0p97.js} +1 -1
  130. package/dist/client/assets/js/{editor.api2-CnHBqh_d.js → editor.api2-ChO5nUQb.js} +1 -1
  131. package/dist/client/assets/js/{elixir-DLfp2Dwn.js → elixir-BEJbxH-B.js} +1 -1
  132. package/dist/client/assets/js/{en-D6VVFwFU.js → en-D2WSXgkM.js} +1 -1
  133. package/dist/client/assets/js/{erDiagram-TEJ5UH35-CLlLC6xx.js → erDiagram-TEJ5UH35-DZysD9r9.js} +1 -1
  134. package/dist/client/assets/js/{es-BIMLuyVP.js → es-B7Mq1P0U.js} +1 -1
  135. package/dist/client/assets/js/{esm-C8D4M0Yn.js → esm-DnZPPtmx.js} +1 -1
  136. package/dist/client/assets/js/eventmodeling-FCH6USID-vlE3-g2j.js +1 -0
  137. package/dist/client/assets/js/{file-preview-BvgwVZXh.js → file-preview-C417aixJ.js} +1 -1
  138. package/dist/client/assets/js/{files-CJkCqsUx.js → files-DjI-npgn.js} +1 -1
  139. package/dist/client/assets/js/{flow9-CtBaUnAi.js → flow9-j5XT_8TQ.js} +1 -1
  140. package/dist/client/assets/js/{flowDiagram-I6XJVG4X-VTRTPnqD.js → flowDiagram-I6XJVG4X-Dt5ZtyHz.js} +1 -1
  141. package/dist/client/assets/js/{fr-C2lf0cY2.js → fr-DvClrDOw.js} +1 -1
  142. package/dist/client/assets/js/{freemarker2-XLeMvhl_.js → freemarker2-BzCf_0SN.js} +1 -1
  143. package/dist/client/assets/js/{fsharp-Db0uaBQv.js → fsharp-ClU_Sdjr.js} +1 -1
  144. package/dist/client/assets/js/{ganttDiagram-6RSMTGT7-CdKcIZ8_.js → ganttDiagram-6RSMTGT7-Bca3rPWi.js} +1 -1
  145. package/dist/client/assets/js/gitGraph-WXDBUCRP-Cyd4P6XH.js +1 -0
  146. package/dist/client/assets/js/{gitGraphDiagram-PVQCEYII-Bcuyw6fo.js → gitGraphDiagram-PVQCEYII-Co29qnTg.js} +1 -1
  147. package/dist/client/assets/js/{go-DwaTlB-B.js → go-D3iUyCM0.js} +1 -1
  148. package/dist/client/assets/js/{graphlib-vAI4Pw7R.js → graphlib-Bln6qd-Z.js} +1 -1
  149. package/dist/client/assets/js/{graphql-Cf2XhNJR.js → graphql-z8koqyyL.js} +1 -1
  150. package/dist/client/assets/js/{group-agent-avatar-CPehpiK0.js → group-agent-avatar-CwqtaKGw.js} +1 -1
  151. package/dist/client/assets/js/{group-chat-CY62vc77.js → group-chat-Buz8HP-N.js} +1 -1
  152. package/dist/client/assets/js/{group-chat-xkdjC2Jt.js → group-chat-CgFAwCtr.js} +1 -1
  153. package/dist/client/assets/js/{group-chat-agent-link-DdSNKasF.js → group-chat-agent-link-N5IFeN_j.js} +1 -1
  154. package/dist/client/assets/js/{handlebars-CNEKu_p8.js → handlebars-C_JvhUYs.js} +1 -1
  155. package/dist/client/assets/js/{hcl-6UZbq6h2.js → hcl-X7TzviIX.js} +1 -1
  156. package/dist/client/assets/js/{highlight-DwtBT6t1.js → highlight-C4yUBxwQ.js} +1 -1
  157. package/dist/client/assets/js/{html-DfSIHhKA.js → html-B-rCQB0N.js} +1 -1
  158. package/dist/client/assets/js/{htmlMode-iGw9-O-W.js → htmlMode-CAeEf_yf.js} +1 -1
  159. package/dist/client/assets/js/{index-DnjQJzX4.js → index-DN4SafrP.js} +5 -5
  160. package/dist/client/assets/js/info-J43DQDTF-B9tkQ2Sb.js +1 -0
  161. package/dist/client/assets/js/{infoDiagram-5YYISTIA-85450Zam.js → infoDiagram-5YYISTIA-BWQGayms.js} +1 -1
  162. package/dist/client/assets/js/{ini-8em8V_Af.js → ini-LTHHN4J-.js} +1 -1
  163. package/dist/client/assets/js/{ishikawaDiagram-YF4QCWOH-BZ4az7UA.js → ishikawaDiagram-YF4QCWOH-Dhuplz_z.js} +1 -1
  164. package/dist/client/assets/js/{ja-C1bBXgr_.js → ja-D7BeX2_D.js} +1 -1
  165. package/dist/client/assets/js/{java-CP1MdIkO.js → java-BRFX-ya0.js} +1 -1
  166. package/dist/client/assets/js/{javascript-Cr8_LHYa.js → javascript-ZXiVmjXn.js} +1 -1
  167. package/dist/client/assets/js/{journeyDiagram-JHISSGLW-DGMB8Tgc.js → journeyDiagram-JHISSGLW-CJeatAU9.js} +1 -1
  168. package/dist/client/assets/js/{jsonMode-HCZ-1lFH.js → jsonMode-C6FcMe0o.js} +1 -1
  169. package/dist/client/assets/js/{jszip.min-BkR6b8DY.js → jszip.min-skZCUzWf.js} +1 -1
  170. package/dist/client/assets/js/{julia-DMTMxa5q.js → julia-Bph8N3CL.js} +1 -1
  171. package/dist/client/assets/js/{kanban-definition-UN3LZRKU-F5cH_RpB.js → kanban-definition-UN3LZRKU-tvWuOdSr.js} +1 -1
  172. package/dist/client/assets/js/{katex-CYbEJAbZ.js → katex-hSGJNERm.js} +1 -1
  173. package/dist/client/assets/js/{ko-qgOeHd8L.js → ko-BsVa-If_.js} +1 -1
  174. package/dist/client/assets/js/{kotlin-Blzus47W.js → kotlin-_c4-tPQp.js} +1 -1
  175. package/dist/client/assets/js/{less-DWCHpDyf.js → less-5oVo4jfQ.js} +1 -1
  176. package/dist/client/assets/js/{lexon-YXdlYGbJ.js → lexon-DE4YtGwF.js} +1 -1
  177. package/dist/client/assets/js/{liquid-DSQgvRwe.js → liquid-BGfieGMG.js} +1 -1
  178. package/dist/client/assets/js/{lspLanguageFeatures-0Hx2Vnc-.js → lspLanguageFeatures-DU_1H2uW.js} +1 -1
  179. package/dist/client/assets/js/{lua-Cyv3mTkg.js → lua-7WJSZJqD.js} +1 -1
  180. package/dist/client/assets/js/{m3-CPY3Ym7_.js → m3-gZlfoR19.js} +1 -1
  181. package/dist/client/assets/js/{markdown-DaPQ1nuG.js → markdown-BYF71orA.js} +1 -1
  182. package/dist/client/assets/js/{mdx-BqA6Xr9V.js → mdx-CunEIV3g.js} +1 -1
  183. package/dist/client/assets/js/{mermaid-parser.core-D4HRUOce.js → mermaid-parser.core-DU_SX15F.js} +3 -3
  184. package/dist/client/assets/js/{mermaid.core-w6kHmgOG.js → mermaid.core-8vsbhG5J.js} +3 -3
  185. package/dist/client/assets/js/{message-scroll-position-C5yRCyBU.js → message-scroll-position-C9_YO3pX.js} +2 -2
  186. package/dist/client/assets/js/{mindmap-definition-RKZ34NQL-CnzhnJ7Z.js → mindmap-definition-RKZ34NQL-HPtlKqL1.js} +1 -1
  187. package/dist/client/assets/js/{mips-BfqBfLvN.js → mips-DXkvw9aZ.js} +1 -1
  188. package/dist/client/assets/js/{models-wrytxWnf.js → models-BILDy2sV.js} +1 -1
  189. package/dist/client/assets/js/{monaco.contribution-Bc-DesyO.js → monaco.contribution-DDqeHGl3.js} +2 -2
  190. package/dist/client/assets/js/{msdax-DgMip49g.js → msdax-BbHEBDvP.js} +1 -1
  191. package/dist/client/assets/js/{mysql-DPUvF1g2.js → mysql-7I1rlwh7.js} +1 -1
  192. package/dist/client/assets/js/{objective-c-BQ3llrPW.js → objective-c-Dk03REAv.js} +1 -1
  193. package/dist/client/assets/js/packet-YPE3B663-DlTFK3Wo.js +1 -0
  194. package/dist/client/assets/js/{pascal-bFWHV7MZ.js → pascal-BCfNkzYY.js} +1 -1
  195. package/dist/client/assets/js/{pascaligo-C8Qza2pK.js → pascaligo-D-DslS98.js} +1 -1
  196. package/dist/client/assets/js/{pdf-Cb7x495t.js → pdf-B_OYWxSy.js} +1 -1
  197. package/dist/client/assets/js/{pdf.worker.min-DDUKJ6cJ.js → pdf.worker.min--q2RLEHa.js} +1 -1
  198. package/dist/client/assets/js/{perl-x25gw0_p.js → perl-MUnuTclx.js} +1 -1
  199. package/dist/client/assets/js/{pets-BfRsvl7D.js → pets-D74G2jqA.js} +1 -1
  200. package/dist/client/assets/js/{pgsql-DAUcGeRq.js → pgsql-BxCBktNe.js} +1 -1
  201. package/dist/client/assets/js/{php-nri1eqb2.js → php-zp9UgH03.js} +1 -1
  202. package/dist/client/assets/js/pie-LRSECV5Y-BtnBGhFZ.js +1 -0
  203. package/dist/client/assets/js/{pieDiagram-4H26LBE5-4LODdtT_.js → pieDiagram-4H26LBE5-CG8_pcHr.js} +1 -1
  204. package/dist/client/assets/js/{pla-CHi5LWNL.js → pla-DGCtmYZC.js} +1 -1
  205. package/dist/client/assets/js/{postiats-Bk7jD0AA.js → postiats-DHSW8gnY.js} +1 -1
  206. package/dist/client/assets/js/{powerquery-UTqJ0Vs7.js → powerquery-BGsPEmJe.js} +1 -1
  207. package/dist/client/assets/js/{powershell-CuPY3Rqk.js → powershell-BItlb0hE.js} +1 -1
  208. package/dist/client/assets/js/{profiles-D-vlI-Ec.js → profiles-BK5JKD7h.js} +1 -1
  209. package/dist/client/assets/js/{protobuf-Be4AIz9j.js → protobuf-BIhm6JYx.js} +1 -1
  210. package/dist/client/assets/js/{pt-D7_udWb3.js → pt-BSORCDMm.js} +1 -1
  211. package/dist/client/assets/js/{pug-CZFx15Ey.js → pug-BtnM7KZj.js} +1 -1
  212. package/dist/client/assets/js/{python-BgRg6Ez6.js → python-DxzTx1Q_.js} +1 -1
  213. package/dist/client/assets/js/{qsharp-BiBiLhRS.js → qsharp-B_8MSfaB.js} +1 -1
  214. package/dist/client/assets/js/{quadrantDiagram-W4KKPZXB-g_q9-dXx.js → quadrantDiagram-W4KKPZXB-CsbkMYuV.js} +1 -1
  215. package/dist/client/assets/js/{r-DM7NVSbZ.js → r-kvKC59jk.js} +1 -1
  216. package/dist/client/assets/js/radar-GUYGQ44K-BTKMKX4G.js +1 -0
  217. package/dist/client/assets/js/{razor-CiWy0jCW.js → razor-BwZ0MkaL.js} +1 -1
  218. package/dist/client/assets/js/{redis-BR2LPmFL.js → redis-5j1U_i85.js} +1 -1
  219. package/dist/client/assets/js/{redshift-B0sdAV16.js → redshift-CX1dFLA1.js} +1 -1
  220. package/dist/client/assets/js/{requirementDiagram-4Y6WPE33-EedCclad.js → requirementDiagram-4Y6WPE33-CKC7CQCX.js} +1 -1
  221. package/dist/client/assets/js/{restructuredtext-kQOBLN1M.js → restructuredtext-MV0-Naya.js} +1 -1
  222. package/dist/client/assets/js/{rough.esm-Dyx_2DON.js → rough.esm-CV1rL6PC.js} +1 -1
  223. package/dist/client/assets/js/{ru-CVQQmreT.js → ru-JsH6TKyg.js} +1 -1
  224. package/dist/client/assets/js/{ruby-CbdJXy6J.js → ruby-Bhyejf9X.js} +1 -1
  225. package/dist/client/assets/js/{rust-DZanYksk.js → rust-CR8d_FC1.js} +1 -1
  226. package/dist/client/assets/js/{sankeyDiagram-5OEKKPKP-DFC0nzsd.js → sankeyDiagram-5OEKKPKP-CKlqlvAe.js} +1 -1
  227. package/dist/client/assets/js/{sb-C5-WiqDZ.js → sb-hLW2EM2L.js} +1 -1
  228. package/dist/client/assets/js/{scala-Bk7i9nV-.js → scala-DVUhALEZ.js} +1 -1
  229. package/dist/client/assets/js/{scheme-CaZSWmJ2.js → scheme-BS6yNanr.js} +1 -1
  230. package/dist/client/assets/js/{scss-ByOYuc7K.js → scss-BfoRsElt.js} +1 -1
  231. package/dist/client/assets/js/{sequenceDiagram-3UESZ5HK-hWjPfqXt.js → sequenceDiagram-3UESZ5HK-CTimhD6H.js} +1 -1
  232. package/dist/client/assets/js/{session-browser-prefs-Br8OYA4_.js → session-browser-prefs-BT1woDux.js} +1 -1
  233. package/dist/client/assets/js/{sessions-iGK9S6zk.js → sessions-IkLKgnN6.js} +1 -1
  234. package/dist/client/assets/js/{settings-pbanANH0.js → settings-roYY6G3W.js} +1 -1
  235. package/dist/client/assets/js/{shell-Di0TEySc.js → shell-BO_Lyczz.js} +1 -1
  236. package/dist/client/assets/js/{skills-DC-UPcXj.js → skills-a5LPwmiT.js} +1 -1
  237. package/dist/client/assets/js/{solidity-BNTjAuuA.js → solidity-D3T2Ki4l.js} +1 -1
  238. package/dist/client/assets/js/{sophia-LY__8Yob.js → sophia-iJmIEvi8.js} +1 -1
  239. package/dist/client/assets/js/{sparql-CWnLfgGS.js → sparql-C2HCEExr.js} +1 -1
  240. package/dist/client/assets/js/{sql-B0ypQ9lR.js → sql-DM6_3GBc.js} +1 -1
  241. package/dist/client/assets/js/{src-BihFroE7.js → src-DD_TpJde.js} +1 -1
  242. package/dist/client/assets/js/{st-CqVFKTbZ.js → st-DSb39Fm5.js} +1 -1
  243. package/dist/client/assets/js/{stateDiagram-AJRCARHV-B7wEnYVe.js → stateDiagram-AJRCARHV-DwBGmBj6.js} +1 -1
  244. package/dist/client/assets/js/stateDiagram-v2-BHNVJYJU-5bNcwBne.js +1 -0
  245. package/dist/client/assets/js/{style-DDAg_jVj.js → style-B5xXhBlp.js} +1 -1
  246. package/dist/client/assets/js/{swift-B4ZZmDxc.js → swift-DrZYSZK3.js} +1 -1
  247. package/dist/client/assets/js/{systemverilog-zLt-O1mT.js → systemverilog-BAWNCaf6.js} +1 -1
  248. package/dist/client/assets/js/{tcl-DCSZmA-l.js → tcl-DY15ex6v.js} +1 -1
  249. package/dist/client/assets/js/{timeline-definition-PNZ67QCA-BN_LfleE.js → timeline-definition-PNZ67QCA-B8xuIu6g.js} +1 -1
  250. package/dist/client/assets/js/treeView-BLDUP644-DvZPUnGM.js +1 -0
  251. package/dist/client/assets/js/treemap-LRROVOQU-Bis1djYh.js +1 -0
  252. package/dist/client/assets/js/{tsMode-BjUcuHrq.js → tsMode-BE8JCSCE.js} +1 -1
  253. package/dist/client/assets/js/{ttsHelpers-BLunFYsq.js → ttsHelpers-BLNiQExI.js} +1 -1
  254. package/dist/client/assets/js/{twig-CuJlVpUG.js → twig-BpHF_18K.js} +1 -1
  255. package/dist/client/assets/js/{typescript-De40YVFt.js → typescript-FQ3z9hVG.js} +1 -1
  256. package/dist/client/assets/js/{typespec-8QcsIc3c.js → typespec-BKvcn6aE.js} +1 -1
  257. package/dist/client/assets/js/{useSttSettings-B1-KXN44.js → useSttSettings-DHX06G8A.js} +1 -1
  258. package/dist/client/assets/js/{vb-DEGTdhxf.js → vb-B74ucE43.js} +1 -1
  259. package/dist/client/assets/js/{vennDiagram-CIIHVFJN-hL8ax7wF.js → vennDiagram-CIIHVFJN-DtEu04QR.js} +1 -1
  260. package/dist/client/assets/js/wardley-L42UT6IY-CD4dIN63.js +1 -0
  261. package/dist/client/assets/js/{wardleyDiagram-YWT4CUSO-BIR-RA6Y.js → wardleyDiagram-YWT4CUSO-DdNKCPsp.js} +1 -1
  262. package/dist/client/assets/js/{wgsl-CmbiucmY.js → wgsl-DEf5Vdqv.js} +1 -1
  263. package/dist/client/assets/js/{workers-BgWBq4qY.js → workers-BbaiLVxx.js} +1 -1
  264. package/dist/client/assets/js/{workflow-socket-DZ9Ceffc.js → workflow-socket-DH402vxO.js} +1 -1
  265. package/dist/client/assets/js/{xml-SZLdwDmk.js → xml-zjE51I7v.js} +1 -1
  266. package/dist/client/assets/js/{xterm-D6CotCNH.js → xterm-Djy4rCx0.js} +1 -1
  267. package/dist/client/assets/js/{xychartDiagram-2RQKCTM6-DHa486uP.js → xychartDiagram-2RQKCTM6-CKqN7g7r.js} +1 -1
  268. package/dist/client/assets/js/{yaml-CgQpCgM5.js → yaml-DabeGoTc.js} +1 -1
  269. package/dist/client/assets/js/{zh-BDlMioZr.js → zh-CI4-L3JY.js} +1 -1
  270. package/dist/client/assets/js/{zh-TW-DTbLWR1A.js → zh-TW-wYlj-uOZ.js} +1 -1
  271. package/dist/client/index.html +1 -1
  272. package/dist/server/index.js +3 -3
  273. package/dist/server/openapi.json +1 -1
  274. package/package.json +9 -1
  275. package/dist/client/assets/js/architecture-7EHR7CIX-Cl4Qi40R.js +0 -1
  276. package/dist/client/assets/js/classDiagram-4FO5ZUOK-DC0BcY8x.js +0 -1
  277. package/dist/client/assets/js/classDiagram-v2-Q7XG4LA2-BfDDH_fm.js +0 -1
  278. package/dist/client/assets/js/eventmodeling-FCH6USID-Bgzwnvkn.js +0 -1
  279. package/dist/client/assets/js/gitGraph-WXDBUCRP-CwFrpI3e.js +0 -1
  280. package/dist/client/assets/js/info-J43DQDTF-wMwkmIWM.js +0 -1
  281. package/dist/client/assets/js/packet-YPE3B663-DYmKXJOE.js +0 -1
  282. package/dist/client/assets/js/pie-LRSECV5Y-Dx0hbcjV.js +0 -1
  283. package/dist/client/assets/js/radar-GUYGQ44K-D-t-QJhi.js +0 -1
  284. package/dist/client/assets/js/stateDiagram-v2-BHNVJYJU-CoMhBVvo.js +0 -1
  285. package/dist/client/assets/js/treeView-BLDUP644-CMJGhbWk.js +0 -1
  286. package/dist/client/assets/js/treemap-LRROVOQU-_j4KoVDh.js +0 -1
  287. package/dist/client/assets/js/wardley-L42UT6IY-BeOvmJoM.js +0 -1
@@ -1 +1 @@
1
- import{$i as Qe,Bi as Xt,Di as bt,Fi as Ae,Gi as Me,Hi as de,Ii as vi,Ji as nl,Mi as Bn,Nr as il,Pi as un,Pr as ll,Qi as Vn,Ri as Zt,Sa as ft,Si as rl,Ti as mi,Ui as Et,Vi as ol,Wi as mn,Zi as Q,_a as Ce,_i as He,ai as sl,ba as al,bi as $e,ca as Dn,da as Kt,ea as ul,fa as Bt,ga as Pn,gi as N,ha as U,ki as cl,mi as pn,n as pi,na as dl,oa as fl,oi as vl,pa as gi,qi as Vt,si as Ge,t as hi,ua as he,vi as mt,wa as ye,xa as Qt,ya as Dt,yi as Ne,zi as ml}from"./index-DnjQJzX4.js";import{S as pl,T as gl}from"./sessions-iGK9S6zk.js";var hl,pr=ye((()=>{vl(),Ge(),gl(),hl=sl("hermes-tool-panel",()=>{const e=he(null);let t=0;async function n(c,m=""){const g=++t;if(e.value={file:c,workspace:m,patch:"",loading:!c.binary,unavailable:!1,editable:!0},!c.binary)try{const v=await pl(c.session_id,c.change_id,c.id);if(g!==t||e.value?.file.id!==c.id)return;e.value.patch=v?.patch||"",e.value.unavailable=!v?.patch,e.value.loading=!1}catch{if(g!==t||e.value?.file.id!==c.id)return;e.value.patch="",e.value.unavailable=!0,e.value.loading=!1}}function i(c,m,g=""){t+=1,e.value={file:c,workspace:g,patch:m||"",loading:!1,unavailable:!c.binary&&!m,editable:!1}}function o(){t+=1,e.value=null}return{workspaceDiff:e,openWorkspaceDiff:n,openInlineWorkspaceDiff:i,closeWorkspaceDiff:o}})}));function yl(){try{return localStorage.getItem(gn)!=="false"}catch{return!0}}function yi(e){en.value=e;try{localStorage.setItem(gn,String(e))}catch{}}function bl(){yi(!en.value)}function gr(){return{toolTraceVisible:en,setToolTraceVisible:yi,toggleToolTraceVisible:bl}}var gn,en,hr=ye((()=>{Ge(),gn="hermes_show_tool_calls",en=he(yl())}));function _l(e){return e==null?"null":typeof e=="function"?"a function":`'${e}'`}function kt(e,t,n){if(!n)return t;const i=typeof n=="function"?n(e,t):e?.[n];if(i==null)throw new Error(`Key is ${i} on item (keyField is ${_l(n)})`);return i}function hn(e,t,n){if(typeof n=="function"&&t==null)throw new Error("index is required when using a function keyField");return kt(e,t??0,n)}var yn=ye((()=>{}));function bn(e,t,n){return kt(e,t,n)}function pt(e,t){return e.map((n,i)=>bn(n,i,t))}function wl(e,t,n){const i=[],o=[];for(let c=0;c<e.length;c++){const m=e[c],g=bn(m,c,t),v=n(m,c,g);i.push(g),o.push(typeof v=="number"&&v>0?v:null)}return{keys:i,sizes:o}}function zl(e,t,n){if(!e||e.keys.length!==t.length||e.sizes.length!==t.length)return!1;for(let i=0;i<t.length;i++)if(e.keys[i]!==bn(t[i],i,n))return!1;return!0}function cn(e,t,n){if(!zl(e,t,n))return{};const i={};for(let o=0;o<e.keys.length;o++){const c=e.sizes[o];typeof c=="number"&&c>0&&(i[e.keys[o]]=c)}return i}function bi(e,t){if(!e.length||t.length<=e.length)return 0;const n=e[0],i=t.indexOf(n);if(i<=0||i+e.length<t.length&&e.length>t.length-i)return 0;for(let o=0;o<e.length;o++)if(t[i+o]!==e[o])return 0;return i}function On(e,t,n,i,o,c=0){const m=o??"start";if(m==="nearest"){const g=n+i,v=e+t;return e>=n&&v<=g?null:e<n?e+c:v-i+c}return m==="end"?e+t-i+c:m==="center"?e+(t-i)/2+c:e+c}function Pt(e){return e.flowMode&&e.direction==="vertical"&&!e.gridItems?"flow":e.disableTransform?"position":"transform"}function _n(e,t){const n=t.direction==="vertical",i=t.mode??"transform",o={visibility:e.nr.used?"visible":"hidden",pointerEvents:e.nr.used?void 0:"none"};if(i==="flow"?o.display=e.nr.used?void 0:"none":(o.position="absolute",o.top="0px",o.left="0px",o.display=void 0),i==="position"?(o[n?"top":"left"]=`${e.position}px`,o[n?"left":"top"]=`${e.offset}px`,o.transform="none",o.willChange="unset"):i==="transform"&&(o.transform=n?`translateY(${e.position}px) translateX(${e.offset}px)`:`translateX(${e.position}px) translateY(${e.offset}px)`,o.willChange="transform"),t.gridItems&&t.itemSize!=null){const c=t.itemSecondarySize||t.itemSize;o.width=`${n?c:t.itemSize}px`,o.height=`${n?t.itemSize:c}px`}return o}function wn(e){return N(()=>U(e))}function Sl(e,t,n,i,o){const c=wn(e);return{el:N(()=>{const m=c.value.el;return U(t??m)}),before:N(()=>{const m=c.value.before;return U(n??m)}),after:N(()=>{const m=c.value.after;return U(i??m)}),scrollParent:N(()=>{const m=c.value.scrollParent;return U(m)}),callbacks:{onResize:()=>{var m;return(m=o?.onResize??c.value.onResize)==null?void 0:m()},onVisible:()=>{var m;return(m=o?.onVisible??c.value.onVisible)==null?void 0:m()},onHidden:()=>{var m;return(m=o?.onHidden??c.value.onHidden)==null?void 0:m()},onUpdate:(m,g,v,h)=>{var _;return(_=o?.onUpdate??c.value.onUpdate)==null?void 0:_(m,g,v,h)}}}}function _i(e){return typeof window<"u"&&e===window}function Tt(e,t,n){return t!=="horizontal"||!n||_i(n)||getComputedStyle(n).direction!=="rtl"?e:Ii==="negative"?-e:e}function Il(e,t,n){return Tt(e,t,n)}function sn(e,t,n,i){const o=Il(n,t,e),c=!!(i!=null&&i.smooth);if(_i(e)){t==="vertical"?e.scrollTo({top:o,behavior:c?"smooth":"auto"}):e.scrollTo({left:o,behavior:c?"smooth":"auto"});return}if(typeof e.scrollTo=="function"){e.scrollTo(t==="vertical"?{top:o,behavior:c?"smooth":"auto"}:{left:o,behavior:c?"smooth":"auto"});return}t==="vertical"?e.scrollTop=o:e.scrollLeft=o}function xl(e,t,n,i){if(n){if(i&&i!==window){const o=i;return t==="vertical"?o.clientHeight:o.clientWidth}return t==="vertical"?window.innerHeight:window.innerWidth}return t==="vertical"?e.clientHeight:e.clientWidth}function wi(e,t){return e.parentNode===null?t:wi(e.parentNode,[...t,e])}function an(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function Tl(e){return an(e,"overflow")+an(e,"overflow-y")+an(e,"overflow-x")}function kl(e){return xi.test(Tl(e))}function Ml(e){if(!(e instanceof HTMLElement||e instanceof SVGElement))return;if(e.parentNode===null)return document.scrollingElement||document.documentElement;const t=wi(e.parentNode,[]);for(let n=0;n<t.length;n+=1)if(t[n]instanceof Element&&kl(t[n]))return t[n];return document.scrollingElement||document.documentElement}function Rl(e,t){if(t)return t;if(!e)return;const n=Ml(e);if(n)return typeof window<"u"&&window.document&&(n===window.document.documentElement||n===window.document.body)?window:n}function Fl(){return Gt}function ot(e){return typeof e=="number"?e:null}function Cl(e,t,n,i,o){return typeof n=="number"?n:typeof n=="function"?n(e,t)||i||void 0:i||e?.[o??"size"]||void 0}function $l(e,t,n,i,o,c){return typeof n=="function"?n(e,t)||i||Number(o)||0:i||e?.[c??"size"]||Number(o)||0}function El(e){for(let t=0;t<e.length;t++)e[t]}function Bl(e,t){return e&&typeof e=="object"?e[t]:void 0}function Yt(e,t){return e.map(n=>Bl(n,t))}function Vl(e,t,n,i){if(e.length!==n.length||t.length!==i.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==n[o]||t[o]!==i[o])return!1;return!0}function Dl(e){const t=e;t._vs_styleStamp++}function Hn(e){const t=e;t._vs_visibilityStamp++,t._vs_styleStamp++}function Pl(e,t,n,i){if(n){for(const o of n)i(o);return}for(let o=e;o<t;o++)i(o)}function zi(e,t,n,i,o,c){const m=wn(e),g=Sl(m,t,n,i,o),v=N(()=>{const l=U(V().items);return El(l),l}),h=he([]),_=he(0),y=he(0),T=he(0),F=he(!1);let M=0,D=0,q=0,G=0,ie=!1,X=null;const ze=new Map,S=new Map;let L=!1,C=0,W=0,be=!1,Se=null,Y=null,p=null,P=0,le=null,ce=null,nt=[],Ve=[],De=null,j=null,Re=null,Z=!1,me=!1,it=!1;const Le=new Set,Je=he({}),ct=[],_t={accumulator:0};function V(){return m.value}function We(){return c?.pageMode??V().pageMode}const H=N(()=>U(V().enabled??!0)),st=N(()=>Rl(g.el.value,g.scrollParent.value)),Ue=N(()=>{const l=v.value;return l.length>0&&typeof l[0]!="object"}),qe=N(()=>{const l=V();if(ot(l.itemSize)===null){const r=v.value,u=Array.from({length:r.length});_t.accumulator=0,u[-1]=_t;const f=l.minItemSize,z=Je.value,B=Ue.value;let A=1e4,J=0,te;for(let se=0,fe=r.length;se<fe;se++){const ne=B?se:kt(r[se],se,l.keyField);te=$l(r[se],se,l.itemSize,z[ne],f,l.sizeField),te<A&&(A=te),J+=te;const O=ct[se]??(ct[se]={accumulator:0,size:void 0});O.accumulator=J,O.size=te,u[se]=O}return ct.length=r.length,P=A,u}return ki}),d=N(()=>h.value.filter(l=>(l._vs_visibilityStamp,l.nr.used)).sort((l,r)=>l.nr.index-r.nr.index)),x=N(()=>{const l=V(),r=Ue.value?null:l.keyField;return wl(v.value,r,(u,f,z)=>Cl(u,f,l.itemSize,Je.value[z],l.sizeField))});function b(l=V()){return l.direction??"vertical"}function E(l=V()){const r=b(l);let u=l.flowMode??!1;return u&&r!=="vertical"&&(me||(console.warn("[vue-recycle-scroller] flowMode only supports vertical lists. Falling back to standard positioning."),me=!0),u=!1),u&&l.gridItems&&(it||(console.warn("[vue-recycle-scroller] flowMode does not support gridItems. Falling back to standard positioning."),it=!0),u=!1),Pt({direction:r,disableTransform:l.disableTransform??!1,flowMode:u,gridItems:l.gridItems})}function $(){h.value.sort((l,r)=>l.nr.used!==r.nr.used?l.nr.used?-1:1:l.nr.used&&r.nr.used?l.nr.index-r.nr.index:l.nr.id-r.nr.id)}function re(l){const r=V();return Je.value=cn(l,v.value,Ue.value?null:r.keyField),Object.keys(Je.value).length>0}function Pe(l){let r=S.get(l);return r||(r=[],S.set(l,r)),r}function Ee(l,r,u,f,z){const B=Kt({item:u,position:0,offset:0,nr:fl({id:Ti++,index:r,used:!0,key:f,type:z}),_vs_styleStamp:0,_vs_visibilityStamp:0});return l.push(B),B}function je(l){const r=Pe(l);if(r&&r.length){const u=r.pop();return u.nr.used=!0,Hn(u),u}}function Xe(l,r){const u=h.value,f=u.indexOf(l);if(f===-1)return;const z=Math.max(0,Math.min(r,u.length-1));f!==z&&(u.splice(f,1),u.splice(z,0,l))}function s(l){Xe(l,h.value.length-1)}function a(){const l=h.value;let r=0;for(;r<l.length&&!l[r].nr.used;)r++;let u=0;for(let f=r;f<l.length&&l[f].nr.used;f++)u++;return{activeStart:r,activeCount:u,headInsertCount:0}}function w(l,r,u){let f=null;r<M?(f=u.activeStart+u.headInsertCount,u.headInsertCount++,u.activeCount++):r>=D&&(f=u.activeStart+u.activeCount,u.activeCount++),f!=null&&Xe(l,f)}function I(l,r=!1){const u=l.nr.type;Pe(u).push(l),l.nr.used=!1,l.position=V().hiddenPosition??-999999,Hn(l),ze.delete(l.nr.key),r&&s(l)}function R(){ze.clear(),S.clear();for(let l=0,r=h.value.length;l<r;l++){const u=h.value[l];u&&I(u)}}function k(l){let r=-1;return r=requestAnimationFrame(()=>{Le.delete(r),l()}),Le.add(r),r}function ee(){for(const l of Le)cancelAnimationFrame(l);Le.clear()}function Be(){Se&&(clearTimeout(Se),Se=null),Y&&(clearTimeout(Y),Y=null),p&&(clearTimeout(p),p=null),j&&(clearTimeout(j),j=null),Re&&(clearTimeout(Re),Re=null)}function _e(){var l,r;H.value&&((r=(l=g.callbacks).onResize)==null||r.call(l),F.value&&Ie(!1))}function Ze(){if(!H.value)return;De&&!Z&&zt();const l=V();if(!L){if(L=!0,Se)return;const r=()=>k(()=>{L=!1;const{continuous:u}=Ie(!1,!0);u||(Y&&clearTimeout(Y),Y=setTimeout(Ze,l.updateInterval+100))});r(),l.updateInterval&&(Se=setTimeout(()=>{Se=null,L&&r()},l.updateInterval))}}function Oe(l,r){var u,f,z,B;H.value&&F.value&&(l||r.boundingClientRect.width!==0||r.boundingClientRect.height!==0?((f=(u=g.callbacks).onVisible)==null||f.call(u),k(()=>{Ie(!1)})):(B=(z=g.callbacks).onHidden)==null||B.call(z))}function lt(){return st.value??window}function xe(){const l=g.before.value;return l?b(V())==="vertical"?l.scrollHeight:l.scrollWidth:0}function wt(){const l=g.el.value;if(!l)return{start:0,end:0};const r=b(V()),u=r==="vertical";let f;if(We()){const z=l.getBoundingClientRect(),B=u?z.height:z.width,A=st.value,J=!A||A===window,te=J?0:A.getBoundingClientRect().top,se=J?0:A.getBoundingClientRect().left,fe=J?window.innerHeight:A.clientHeight,ne=J?window.innerWidth:A.clientWidth;let O=u?-(z.top-te):-(z.left-se),ve=u?fe:ne;O<0&&(ve+=O,O=0),O+ve>B&&(ve=B-O),f={start:O,end:O+ve}}else u?f={start:l.scrollTop,end:l.scrollTop+l.clientHeight}:f={start:Tt(l.scrollLeft,r,l),end:Tt(l.scrollLeft,r,l)+l.clientWidth};return f}function Wi(){const l=g.el.value;if(!l)return{start:0,end:0};if(b(V())==="vertical"){const r=Tt(l.scrollLeft,"horizontal",l);return{start:r,end:r+l.clientWidth}}return{start:l.scrollTop,end:l.scrollTop+l.clientHeight}}function Ui(l,r,u,f){var z,B,A,J;const te=xe(),se=l.start-f-te,fe=l.end+f-te;return M>0&&se<=(((z=u[M-1])==null?void 0:z.accumulator)??0)||M<r-1&&se>(((B=u[M])==null?void 0:B.accumulator)??Number.POSITIVE_INFINITY)||D>1&&fe<=(((A=u[D-2])==null?void 0:A.accumulator)??0)||D<r&&fe>(((J=u[D-1])==null?void 0:J.accumulator)??Number.POSITIVE_INFINITY)}function Ot(l){const r=V(),u=ot(r.itemSize);if(u!==null)return u;const f=qe.value[l];return f?.size||Number(r.minItemSize)||0}function qi(l){const r=V();return _n(l,{direction:b(r),mode:E(r),itemSize:ot(r.itemSize),gridItems:r.gridItems,itemSecondarySize:r.itemSecondarySize})}function at(l){var r;const u=V(),f=u.gridItems||1,z=ot(u.itemSize);return l<=0?0:z!==null?Math.floor(l/f)*z:((r=qe.value[l-1])==null?void 0:r.accumulator)||0}function Sn(l){const r=V(),u=v.value.length,f=r.gridItems||1,z=ot(r.itemSize);if(!u)return 0;if(z!==null){const te=Math.floor(l/z)*f;return Math.min(Math.max(te,0),u-1)}let B=0,A=u-1,J=0;for(;B<=A;){const te=Math.floor((B+A)/2);at(te)<=l?(J=te,B=te+1):A=te-1}return J}function zt(){j&&(clearTimeout(j),j=null),De=null}function ji(){j&&clearTimeout(j),j=setTimeout(()=>{De=null,j=null},150)}function Yi(l,r){if(!l.length){zt();return}const u=Math.max(wt().start-xe(),0),f=Math.min(Sn(u),l.length-1),z=l[f],B=r?kt(z,f,r):f,A=xe()+at(f);De={key:B,offset:wt().start-A}}function In(l){if(!De)return!1;const r=V(),u=pt(l??v.value,Ue.value?null:r.keyField).indexOf(De.key);if(u===-1)return zt(),!1;const f=xe()+at(u)+De.offset,z=wt().start;return Math.abs(f-z)<.5?!1:(Z=!0,Ht(f),k(()=>{Z=!1}),!0)}function Rt(){if(St(),!H.value)return;const l=We()?lt():g.el.value;l&&(le=l,le.addEventListener("scroll",Ze,Fl()?{passive:!0}:!1),We()&&l===window&&(ce=l,ce.addEventListener("resize",_e)))}function St(){le&&(le.removeEventListener("scroll",Ze),le=null),ce&&(ce.removeEventListener("resize",_e),ce=null)}function Ki(l,r,u,f,z,B){const A=Math.ceil(l/r)*u,J=Math.max(0,Math.floor(z.start/u)),te=Math.min(Math.ceil(z.end/u),Math.ceil(l/r)),se=Math.max(0,Math.floor(B.start/f)),fe=Math.min(Math.ceil(B.end/f),r),ne=[];for(let et=J;et<te;et++){const It=et*r;for(let Ft=se;Ft<fe;Ft++){const Ct=It+Ft;if(Ct>=l)break;ne.push(Ct)}}const O=ne[0]??0,ve=ne.at(-1)??-1;return{renderedIndices:ne,startIndex:O,endIndex:ve+1,visibleStartIndex:O,visibleEndIndex:ve,totalSize:A}}function Qi(){const l=V(),r=ot(l.itemSize);if(!l.gridItems||r==null)return!1;const u=g.el.value;if(!u)return!1;const f=l.itemSecondarySize||r,z=b(l)==="vertical"?u.clientWidth:u.clientHeight;return f*l.gridItems>z}function xn(l,r,u,f){if(Math.abs(l-r)!==1||r<0||r>=u)return l;const z=l>r?at(r)+Ot(r):at(r);return Math.abs(z-f)<=dn?r:l}function Tn(l,r,u,f,z){if(Math.abs(l-r)!==1)return l;const B=z?r-1:r;if(B<0||B>=u)return l;const A=l>r?at(B)+Ot(B):at(B);return Math.abs(A-f)<=dn?r:l}function Gi(l,r,u){const f={...l,visibleStartIndex:xn(l.visibleStartIndex,q,r,u.rawViewportStart),visibleEndIndex:Tn(l.visibleEndIndex,G,r,u.rawViewportEnd,!1),startIndex:xn(l.startIndex,M,r,u.renderStart),endIndex:Tn(l.endIndex,D,r,u.renderEnd,!0)};f.startIndex>f.visibleStartIndex&&(f.startIndex=f.visibleStartIndex);const z=Math.min(r,f.visibleEndIndex+1);return f.endIndex<z&&(f.endIndex=z),f.endIndex<f.startIndex&&(f.endIndex=f.startIndex),f}function Ie(l,r=!1){var u,f,z,B,A,J,te,se,fe;if(!H.value)return{continuous:!0};const ne=V(),O=ot(ne.itemSize),ve=ne.gridItems||1,et=ne.itemSecondarySize||O||0,It=P,Ft=ne.typeField,Ct=Ue.value?null:ne.keyField,Nt=v.value,oe=Nt.length,Ye=qe.value,Mn=ze,Lt=h.value;let tn=null,nn=null,pe,ae,tt,Te,Fe;const el=O!==null||oe===0||Ye[oe-1]!=null;if(!oe||!el)!oe||!X?pe=ae=Te=Fe=tt=0:(pe=Math.min(X.startIndex,oe),ae=Math.min(X.endIndex,oe),Te=Math.min(X.visibleStartIndex,oe),Fe=Math.min(X.visibleEndIndex,oe),tt=((u=Ye[oe-1])==null?void 0:u.accumulator)??X.totalSizeValue);else if(be)pe=Te=0,ae=Fe=Math.min(ne.prerender,Nt.length),tt=0;else{const ue=wt(),ke=Wi(),ut=C,Ut=W,ge={...ue},xt={...ke};if(r){let we=ue.start-ut;we<0&&(we=-we);let yt=ke.start-Ut;yt<0&&(yt=-yt);const qt=O===null&&Ui(ue,oe,Ye,ne.buffer);if(!(O===null&&(we>=It||qt)||O!==null&&we>=O)&&!(ve>1&&O!=null&&yt>=et))return{continuous:!0}}C=ue.start,W=ke.start;const dt=ne.buffer;ge.start-=dt,ge.end+=dt,xt.start-=dt,xt.end+=dt;let rt=0;const Cn=g.before.value;Cn&&(rt=Cn.scrollHeight,ge.start-=rt);const $n=g.after.value;if($n){const we=$n.scrollHeight;ge.end+=we}const tl=E(ne)==="flow"&&O===null&&!r&&ie&&Math.abs(ue.start-ut)<=fn&&Math.abs(ke.start-Ut)<=fn;if(O===null){let we,yt=0,qt=oe-1,Ke=~~(oe/2),En;do En=Ke,we=((f=Ye[Ke])==null?void 0:f.accumulator)??0,we<ge.start?yt=Ke:Ke<oe-1&&(((z=Ye[Ke+1])==null?void 0:z.accumulator)??Number.POSITIVE_INFINITY)>ge.start&&(qt=Ke),Ke=~~((yt+qt)/2);while(Ke!==En);for(Ke<0&&(Ke=0),pe=Ke,tt=((B=Ye[oe-1])==null?void 0:B.accumulator)??0,ae=Ke;ae<oe&&(((A=Ye[ae])==null?void 0:A.accumulator)??0)<ge.end;ae++);for(ae===-1?ae=Nt.length-1:(ae++,ae>oe&&(ae=oe)),Te=pe;Te<oe&&rt+(((J=Ye[Te])==null?void 0:J.accumulator)??Number.POSITIVE_INFINITY)<ge.start;Te++);for(Fe=Te;Fe<oe&&rt+(((te=Ye[Fe])==null?void 0:te.accumulator)??0)<ge.end;Fe++);if(tl){const jt=Gi({startIndex:pe,endIndex:ae,visibleStartIndex:Te,visibleEndIndex:Fe},oe,{rawViewportStart:ue.start-rt,rawViewportEnd:ue.end-rt,renderStart:ue.start-dt-rt,renderEnd:ue.end+dt-rt});pe=jt.startIndex,ae=jt.endIndex,Te=jt.visibleStartIndex,Fe=jt.visibleEndIndex}X={startIndex:pe,endIndex:ae,visibleStartIndex:Te,visibleEndIndex:Fe,totalSizeValue:tt}}else if(ve>1){const we=Ki(oe,ve,O,et,ge,xt);tn=we.renderedIndices,nn=new Set(tn),pe=we.startIndex,ae=we.endIndex,Te=we.visibleStartIndex,Fe=we.visibleEndIndex,tt=we.totalSize}else{pe=~~(ge.start/O*ve);const we=pe%ve;pe-=we,ae=Math.ceil(ge.end/O*ve),Te=Math.max(0,Math.floor((ge.start-rt)/O*ve)),Fe=Math.floor((ge.end-rt)/O*ve),pe<0&&(pe=0),ae>oe&&(ae=oe),Te<0&&(Te=0),Fe>oe&&(Fe=oe),tt=Math.ceil(oe/ve)*O}}ae-pe>Si.itemsLimit&&Ji(),_.value=tt,y.value=0,T.value=E(ne)==="flow"?tt:0;let K;const ln=pe<=D&&ae>=M,Rn=E(ne)==="flow",rn=Rn&&ln&&!l;let on=null;if(!ln||l)R();else{const ue=ke=>{const ut=Lt[ke];ut&&(K=ut,K.nr.used&&((nn?nn.has(K.nr.index):K.nr.index>=pe&&K.nr.index<ae)||I(K,rn)))};if(rn){for(let ke=Lt.length-1;ke>=0;ke--)ue(ke);on=a()}else for(let ke=0,ut=Lt.length;ke<ut;ke++)ue(ke)}let ht,Wt,$t=null,Fn=0;return Pl(pe,ae,tn,ue=>{var ke;const ut=Ye[ue]&&Ye[ue].size,Ut=O||ut||P||1;ht=Nt[ue];const ge=Ct?kt(ht,ue,Ct):ue;K=Mn.get(ge);let xt=!1;if(K)K.item!==ht&&(K.item=ht),K.nr.used||console.warn(`Expected existing view's used flag to be true, got ${K.nr.used}`);else{if(Wt=ht[Ft],K=je(Wt),K){const dt=K.nr.index!==ue||K.nr.key!==ge;K.item=ht,K.nr.index=ue,K.nr.key=ge,K.nr.type!==Wt&&console.warn("Reused view's type does not match pool's type"),dt&&Dl(K)}else K=Ee(Lt,ue,ht,ge,Wt);Mn.set(ge,K),xt=!0}O===null?(K.position=((ke=Ye[ue-1])==null?void 0:ke.accumulator)||0,K.offset=0):(K.position=Math.floor(ue/ve)*O,K.offset=ue%ve*et),on&&xt&&w(K,ue,on),$t??($t=K.position),Fn+=Ut}),Rn?($t==null?(y.value=0,T.value=tt):(y.value=$t,T.value=Math.max(0,tt-$t-Fn)),rn||$()):(y.value=0,T.value=0),M=pe,D=ae,q=Te,G=Fe,ie=!0,ne.emitUpdate&&((fe=(se=g.callbacks).onUpdate)==null||fe.call(se,pe,ae,Te,Fe)),E(ne)!=="flow"&&(p&&clearTimeout(p),p=setTimeout(kn,ne.updateInterval+300)),{continuous:ln}}function Ji(){throw Re=setTimeout(()=>{Re=null,console.warn("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",g.el.value),console.warn("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")}function Xi(){if(Qi())return!1;const l=h.value.filter(({nr:r})=>r.used);for(let r=1;r<l.length;r++)if(l[r].nr.index!==l[r-1].nr.index+1)return!0;return!1}function kn(){if(H.value){if(E()==="flow"){$();return}h.value.sort((l,r)=>l.nr.index-r.nr.index),Xi()&&(Ie(!1),p&&clearTimeout(p))}}function Zi(l,r){if(!H.value)return;const u=V(),f=b(u),z=g.el.value;if(!z)return;const B=Math.max(0,Math.min(l,v.value.length-1)),A=wt().start,J=xl(z,f,u.pageMode,st.value),te=On(at(B),Ot(B),A,J,r?.align,r?.offset??0);if(te==null)return;Ht(te,r);const se=ot(u.itemSize);if(u.gridItems&&se!=null){const fe=g.el.value;if(!fe)return;const ne=u.gridItems,O=u.itemSecondarySize||se,ve=B%ne*O,et=f==="vertical"?"horizontal":"vertical",It=On(ve,O,et==="horizontal"?Tt(fe.scrollLeft,"horizontal",fe):fe.scrollTop,et==="horizontal"?fe.clientWidth:fe.clientHeight,r?.align,r?.offset??0);It!=null&&sn(fe,et,It,r)}}function Ht(l,r){if(!H.value)return;const u=b(V()),f=g.el.value;if(f)if(We()){const z=st.value??window,B=u==="vertical"?"top":"left",A=z===window,J=A?document.scrollingElement||document.documentElement:z,te=J.getBoundingClientRect(),se=f.getBoundingClientRect(),fe=A?u==="vertical"?window.scrollY:window.scrollX:Tt(u==="vertical"?J.scrollTop:J.scrollLeft,u,J),ne=se[B]-te[B];sn(A?window:J,u,l+fe+ne,r)}else sn(f,u,l,r)}const gt=V(),At=v.value;return nt=pt(At,At.length>0&&typeof At[0]!="object"?null:gt.keyField),Ve=Yt(At,gt.typeField),gt.cache&&re(gt.cache),H.value&&gt.prerender&&(be=!0,Ie(!1)),gt.gridItems&&ot(gt.itemSize)==null&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems"),Xt(()=>{H.value&&(Rt(),Ae(()=>{be=!1,Ie(!0),F.value=!0}))}),vi(()=>{if(!H.value)return;const l=C;typeof l=="number"&&Ae(()=>{Ht(l)})}),Zt(()=>{Be(),ee(),St()}),Q(H,l=>{l?(Rt(),Ae(()=>{Ie(!0),F.value=!0})):(St(),Be(),ee(),F.value=!1)}),Q(()=>V().cache,l=>{H.value&&(re(l),Ie(!0))}),Q(()=>U(V().items).slice(),(l,r)=>{if(!H.value)return;const u=V(),f=Ue.value?null:u.keyField,z=pt(l,f),B=Yt(l,u.typeField),A=nt,J=!Vl(z,B,A,Ve);u.shift&&bi(A,z)>0?Yi(r??[],f):zt(),nt=z,Ve=B,In(l),Ie(J)}),Q(()=>V().keyField,()=>{if(!H.value)return;const l=V(),r=Ue.value?null:l.keyField;nt=pt(v.value,r),Ve=Yt(v.value,l.typeField),zt(),Ie(!0)}),Q(()=>V().typeField,()=>{if(!H.value)return;const l=V();Ve=Yt(v.value,l.typeField),zt(),Ie(!0)}),Q(We,()=>{H.value&&(St(),Rt(),Ie(!1))}),Q(g.el,()=>{H.value&&(St(),Rt(),Ie(!1))}),Q(st,()=>{!H.value||!We()||(St(),Rt(),Ie(!1))}),Q(qe,()=>{H.value&&(In()&&ji(),Ie(!1))}),Q(()=>V().gridItems,()=>{H.value&&Ie(!0)}),Q(()=>V().itemSecondarySize,()=>{H.value&&Ie(!0)}),{pool:h,visiblePool:d,totalSize:_,startSpacerSize:y,endSpacerSize:T,ready:F,sizes:qe,simpleArray:Ue,scrollToItem:Zi,scrollToPosition:Ht,getScroll:wt,findItemIndex:Sn,getItemOffset:at,getItemSize:Ot,getViewStyle:qi,cacheSnapshot:x,restoreCache:re,updateVisibleItems:Ie,handleResize:_e,handleVisibilityChange:Oe,sortViews:kn}}var Si,Ii,xi,Gt,Ti,ki,dn,fn,Mi=ye((()=>{if(Ge(),yn(),Si={itemsLimit:1e3},Ii=(()=>{if(typeof document>"u")return"negative";const e=document.createElement("div"),t=document.createElement("div");e.style.width="4px",e.style.height="1px",e.style.overflow="auto",e.style.direction="rtl",t.style.width="8px",t.style.height="1px",e.appendChild(t),document.body.appendChild(e),e.scrollLeft=-1;const n=e.scrollLeft<0;return document.body.removeChild(e),n?"negative":"default"})(),xi=/auto|scroll/,Gt=!1,typeof window<"u"){Gt=!1;try{const e=Object.defineProperty({},"passive",{get(){Gt=!0}});window.addEventListener("test",null,e)}catch{}}Ti=0,ki=[],dn=8,fn=1}));function An(e){e==null||vn||(vn=!0,console.warn(Fi))}function Ri(e,t,n,i){let o=null,c=null,m=null,g=!1,v=null;const h=[],_=n.resizeObserver?()=>{}:n.onVscrollUpdate(q),y=N(()=>{const p=U(e);if(n.vscrollData.simpleArray){if(p.index==null)throw new Error("index is required when using simple-array mode with dynamic item measurement");return p.index}return hn(p.item,p.index,n.vscrollData.keyField)}),T=N(()=>n.vscrollData.sizes[y.value]||0),F=N(()=>U(e).active&&n.vscrollData.active);function M(){F.value?c!==y.value&&(c=y.value,o=null,m=null,ze(y.value)):o=y.value}function D(){U(e).watchData&&!n.resizeObserver?v=Q(()=>U(e).item,()=>{G()},{deep:!0}):v&&(v(),v=null)}function q({force:p}){!F.value&&p&&(m=y.value),(o===y.value||p||!T.value)&&M()}function G(){M()}function ie(p){n.undefinedMap[p]&&n.undefinedSizeCount.value--,n.undefinedMap[p]=void 0}function X(p,P){if(n.vscrollData.sizes[p]){ie(p);return}if(P){n.undefinedMap[p]||n.undefinedSizeCount.value++,n.undefinedMap[p]=!0;return}n.undefinedMap[p]&&(n.undefinedSizeCount.value--,n.undefinedMap[p]=!1)}function ze(p){n.measureQueue.schedule(p,{read(){if(y.value!==p)return null;const P=U(t);return P?{width:P.offsetWidth,height:P.offsetHeight}:null},write(P){const{width:le,height:ce}=P;S(le,ce)},done(){c=null}})}function S(p,P){const le=~~(n.direction.value==="vertical"?P:p);le&&T.value!==le&&L(le)}function L(p){var P,le;ie(y.value),n.vscrollData.sizes[y.value]=p,U(e).emitResize&&((le=(P=U(i))==null?void 0:P.onResize)==null||le.call(P,y.value))}function C(){if(!n.resizeObserver||g)return;const p=U(t);p&&(n.resizeObserver.observe(p),p.$_vs_id=y.value,p.$_vs_onResize=be,g=!0)}function W(){if(!n.resizeObserver||!g)return;const p=U(t);p&&(n.resizeObserver.unobserve(p),p.$_vs_onResize=void 0,g=!1)}function be(p,P,le){y.value===p&&S(P,le)}An(U(e).sizeDependencies),h.push(Q(()=>U(e).watchData,()=>{D()})),h.push(Q(()=>U(e).sizeDependencies,p=>{An(p),n.resizeObserver||G()},{deep:!0})),h.push(Q(y,(p,P)=>{const le=U(t);le&&(le.$_vs_id=p),ie(P),X(p,F.value);const ce=n.vscrollData.sizes[p];if(!ce){o=p,G();return}ie(p),g&&(n.vscrollData.sizes[p]=ce)})),h.push(Q(F,p=>{X(y.value,p),n.resizeObserver?p?C():W():p&&m===y.value&&M()})),D();function Se(){F.value&&(M(),C())}function Y(){n.measureQueue.cancel(y.value),_(),W(),ie(y.value);const p=U(t);p&&(p.$_vs_id=void 0,p.$_vs_onResize=void 0),v&&(v(),v=null);for(const P of h)P();h.length=0}return{id:y,size:T,finalActive:F,updateSize:M,mount:Se,unmount:Y}}var Fi,vn,Ci=ye((()=>{Ge(),yn(),Fi="[vue-virtual-scroller] `sizeDependencies` is deprecated and will be removed in the next major release. Dynamic item sizing uses ResizeObserver in modern browsers.",vn=!1}));function Ol(){const e=new Map;return{on(t,n){let i=e.get(t);i||(i=new Set,e.set(t,i)),i.add(n)},off(t,n){const i=e.get(t);i&&(i.delete(n),i.size||e.delete(t))},emit(t,n){const i=e.get(t);if(i!=null&&i.size)for(const o of[...i])o(n)},clear(){e.clear()}}}function Hl(e={}){const t=e.queueFlush??(_=>Ae(_)),n=e.overflowQueueFlush??t,i=Math.max(1,e.maxTasksPerFlush??Number.POSITIVE_INFINITY);let o=!1;const c=new Map;function m(){o||!c.size||(o=!0,t(g))}function g(){if(o=!1,!c.size)return;const _=[];for(const[T,F]of c)if(_.push(F),c.delete(T),_.length>=i)break;const y=_.map(T=>({task:T,value:T.read()}));for(const T of y)T.value!=null&&T.task.write(T.value),T.task.done();c.size&&(n(g),o=!0)}function v(_,y){c.set(_,y),m()}function h(_){c.delete(_)}return{schedule:v,cancel:h}}function Al(e){for(let t=0;t<e.length;t++)e[t]}function $i(e){return e.item}function Mt(e,t){return t.get(e)||e}function Nl(e){const t={};return Object.defineProperties(t,{item:{enumerable:!0,get:()=>e.item.item},itemWithSize:{enumerable:!0,get:()=>e.item},size:{enumerable:!0,get:()=>e.item.size},position:{enumerable:!0,get:()=>e.position},offset:{enumerable:!0,get:()=>e.offset},id:{enumerable:!0,get:()=>e.nr.id},index:{enumerable:!0,get:()=>e.nr.index},used:{enumerable:!0,get:()=>e.nr.used},key:{enumerable:!0,get:()=>e.nr.key},type:{enumerable:!0,get:()=>e.nr.type}}),t}function Ll(e){return e._vs_styleStamp??0}function Wl(e){return e._vs_visibilityStamp??0}function Nn(e){const t={};for(const n of zn)t[n]=e.style[n];return t}function Ei(e,t){for(const n of zn)e.style[n]=t[n]??""}function vt(e,t,n){e.style[t]!==n&&(e.style[t]=n)}function Ln(e,t,n,i,o,c,m){if(!("view"in t)){Ei(e,c);return}const g=e.tagName==="TR",v=Pt(o?{direction:n,flowMode:!0}:{direction:n,disableTransform:i||g}),h=_n(Mt(t.view,m),{direction:n,mode:v});vt(e,"position",String(h.position??"")),vt(e,"top",String(h.top??"")),vt(e,"left",String(h.left??"")),vt(e,"transform",v==="flow"||g?"":String(h.transform??"")),vt(e,"willChange",String(h.willChange??"")),vt(e,"visibility",String(h.visibility??"")),vt(e,"pointerEvents",String(h.pointerEvents??"")),vt(e,"display",String(h.display??""))}function Wn(e,t){return"view"in e&&!t}function Un(e,t,n,i,o,c){if("view"in e){const m=Mt(e.view,c);return{active:m.nr.used&&o,id:$i(m).id}}return{active:t.active&&o,id:Yl(t.item,n,i,t.index)}}function Ul(e,t,n,i){if(!("view"in e))return{direction:t,flowMode:n,legacy:!0};if(n)return{direction:t,flowMode:n,legacy:!1,visibilityStamp:Wl(Mt(e.view,i))};const o=Mt(e.view,i);return{active:o.nr.used,direction:t,flowMode:n,legacy:!1,styleStamp:Ll(o),position:Wn(e,n)?o.position:null,offset:Wn(e,n)?o.offset:null}}function qn(e,t){if("view"in e){const n=Mt(e.view,t);return{item:$i(n).item,active:n.nr.used,index:n.nr.index,watchData:e.watchData??!1,emitResize:e.emitResize??!1,sizeDependencies:e.sizeDependencies??null,onResize:e.onResize}}return{watchData:!1,emitResize:!1,sizeDependencies:null,...e}}function ql(e,t){e.item!==t.item&&(e.item=t.item),e.active!==t.active&&(e.active=t.active),e.index!==t.index&&(e.index=t.index),e.watchData!==t.watchData&&(e.watchData=t.watchData),e.sizeDependencies!==t.sizeDependencies&&(e.sizeDependencies=t.sizeDependencies),e.emitResize!==t.emitResize&&(e.emitResize=t.emitResize),e.onResize!==t.onResize&&(e.onResize=t.onResize)}function jl(e,t){e.onResize!==t.onResize&&(e.onResize=t.onResize)}function Yl(e,t,n,i){return n?i??null:hn(e,i,t)}function Kl(e){const t=wn(e);let n=0,i={};const o=Ol();let c=!1,m,g=!1,v=[],h=null,_=null,y=null;const T=new Set,F=[],M=Dn({active:!0,sizes:{},keyField:S().keyField,simpleArray:!1}),D=N(()=>{const s=U(S().items);return Al(s),s}),q=N(()=>S().direction??"vertical"),G=N(()=>U(S().el)),ie=N(()=>U(S().before)),X=N(()=>U(S().after)),ze=new Map;function S(){return t.value}const L=N(()=>U(S().enabled??!0));function C(s){let a=-1;return a=requestAnimationFrame(()=>{T.delete(a),s()}),T.add(a),a}function W(){for(const s of T)cancelAnimationFrame(s);T.clear()}const be=Hl({maxTasksPerFlush:6,overflowQueueFlush(s){C(s)}});typeof ResizeObserver<"u"&&(m=new ResizeObserver(s=>{C(()=>{if(Array.isArray(s)){for(const a of s)if(a.target&&a.target.$_vs_onResize){let w,I;if(a.borderBoxSize){const R=a.borderBoxSize[0];w=R.inlineSize,I=R.blockSize}else w=a.contentRect.width,I=a.contentRect.height;a.target.$_vs_onResize(a.target.$_vs_id,w,I)}}})}));const Se={vscrollData:M,resizeObserver:m,measureQueue:be,direction:q,undefinedMap:i,undefinedSizeCount:{get value(){return n},set value(s){n=s}},onVscrollUpdate(s){const a=w=>{s(w)};return o.on("vscroll:update",a),()=>o.off("vscroll:update",a)}};Et("vscrollData",M),Et("vscrollParent",{get $_undefinedSizes(){return n},set $_undefinedSizes(s){n=s},get $_undefinedMap(){return i},set $_undefinedMap(s){i=s},$_events:o,direction:q}),Et("vscrollResizeObserver",m),Et("vscrollMeasurementContext",Se),Et("vscrollAnchorRegistry",{delete(s){ze.delete(s)},set(s,a){ze.set(s,a)}});const Y=N(()=>{const s=D.value;return s.length>0&&typeof s[0]!="object"}),p=Bt(0),P=Bt(F);Vn(()=>{if(!L.value)return;const s=_||!G.value?null:le(G.value.scrollTop,F),a=S().keyField,w=Y.value,I=M.sizes,R=D.value,k=R.length;let ee=F.length!==k,Be=F.length!==k;for(let _e=0;_e<k;_e++){const Ze=R[_e],Oe=w?_e:kt(Ze,_e,a);let lt=I[Oe];typeof lt>"u"&&!i[Oe]&&(lt=0);let xe=F[_e];if(!xe){xe=Kt({item:Ze,id:Oe,size:lt}),F[_e]=xe,ee=!0,Be=!0;continue}xe.item!==Ze&&(xe.item=Ze,ee=!0,Be=!0),xe.id!==Oe&&(xe.id=Oe,ee=!0,Be=!0),xe.size!==lt&&(xe.size=lt,ee=!0)}F.length!==k&&(F.length=k,ee=!0,Be=!0),ee&&(h=s,p.value++,Be?P.value=F.slice():Pn(P))});function le(s,a){if(!a.length)return null;const w=S().minItemSize;let I=0,R=0,k=a[0].id;for(const ee of a){const Be=ee.size||w,_e=I+Be;if(R=I,k=ee.id,s<_e)return{key:ee.id,offset:s-I};I=_e}return{key:k,offset:Math.max(0,s-R)}}const ce=S();v=pt(D.value,Y.value?null:ce.keyField),ce.cache&&(M.sizes=cn(ce.cache,D.value,Y.value?null:ce.keyField));function nt(){var s,a;(a=(s=S()).onHidden)==null||a.call(s)}function Ve(s,a,w,I){var R,k;(k=(R=S()).onUpdate)==null||k.call(R,s,a,w,I)}const De=Dn({get enabled(){return L.value},get items(){return P.value},get keyField(){return"id"},get direction(){return q.value},get itemSize(){return null},get gridItems(){},get itemSecondarySize(){},get minItemSize(){return S().minItemSize},get sizeField(){return"size"},get typeField(){return"type"},get buffer(){return S().buffer??200},get pageMode(){return S().pageMode??!1},get shift(){return!1},get cache(){return S().cache},get prerender(){return S().prerender??0},get emitUpdate(){return S().emitUpdate??!1},get disableTransform(){return S().disableTransform??!1},get flowMode(){return S().flowMode??!1},get hiddenPosition(){return S().hiddenPosition},get updateInterval(){return S().updateInterval??0},get el(){return G.value},get before(){return ie.value},get after(){return X.value},get scrollParent(){return S().scrollParent},get onResize(){return j},get onVisible(){return Re},get onHidden(){return nt},get onUpdate(){return Ve}});function j(){var s,a;$(),(a=(s=S()).onResize)==null||a.call(s)}function Re(){var s,a;o.emit("vscroll:update",{force:!1}),(a=(s=S()).onVisible)==null||a.call(s)}const Z=zi(De),me=new WeakMap,it=new WeakMap,Le=Bt([]);function Je(s){const a=S();return _n(Mt(s,me),{direction:q.value,mode:Pt({direction:q.value,disableTransform:a.disableTransform??!1,flowMode:a.flowMode??!1})})}function ct(s){let a=it.get(s);return a||(a=Nl(s),it.set(s,a),me.set(a,s)),a}Vn(()=>{const s=Z.pool.value,a=s.length,w=Le.value;let I=w.length!==a;for(let R=0;R<a;R++){const k=ct(s[R]);w[R]!==k&&(w[R]=k,I=!0)}w.length!==a&&(w.length=a,I=!0),I&&Pn(Le)});const _t=N(()=>Z.visiblePool.value.map(ct)),V=new WeakMap;function We(){y!=null&&(cancelAnimationFrame(y),T.delete(y),y=null)}function H(){We(),_=null}function st(){_==null||y!=null||(y=C(()=>{y=null,x()}))}function Ue(){const s=G.value;if(!s)return null;const a=s.getBoundingClientRect();let w=null;for(const[I,R]of ze.entries()){if(!R.active||getComputedStyle(I).visibility==="hidden")continue;const k=I.getBoundingClientRect();if(k.bottom<=a.top||k.top>=a.bottom)continue;const ee=Math.max(k.top,a.top)-a.top;(!w||ee<w.score)&&(w={key:R.id,offset:k.top-a.top,score:ee})}return w}function qe(s){const a=G.value;if(!a){H();return}const w=a.scrollTop,I=Math.min(Z.findItemIndex(w),s.length-1),R=s[I];if(R==null){H();return}const k=Ue();_={logicalKey:R,logicalOffset:w-Z.getItemOffset(I),pendingKeys:new Set,stableFrames:0,visualKey:k?.key??null,visualOffset:k?.offset??0}}function d(s){const a=G.value;return!a||Math.abs(a.scrollTop-s)<.5?!1:(g=!0,a.scrollTop=s,Z.updateVisibleItems(!0),a.dispatchEvent(new Event("scroll")),C(()=>{g=!1}),!0)}function x(){const s=_,a=G.value;if(!s||!a)return;const w=P.value.findIndex(k=>k.id===s.logicalKey);if(w===-1){H();return}let I=!1;if(I=d(Z.getItemOffset(w)+s.logicalOffset)||I,!I&&s.visualKey!=null)for(const[k,ee]of ze.entries()){if(!ee.active||ee.id!==s.visualKey||getComputedStyle(k).visibility==="hidden")continue;const Be=k.getBoundingClientRect().top-a.getBoundingClientRect().top-s.visualOffset;I=d(a.scrollTop+Be)||I;break}let R=!0;for(const k of s.pendingKeys)if(!(typeof M.sizes[k]=="number"&&M.sizes[k]>0)){R=!1;break}if(!I&&R){if(s.stableFrames++,s.stableFrames>=2){H();return}}else s.stableFrames=0;st()}function b(s,a,w,I){const R=dl(),k=Bt(a),ee=Kt({...w}),Be=Kt({onResize:w.onResize}),_e=Bt(s),Ze=R.run(()=>(Q(()=>Un(k.value,ee,S().keyField,M.simpleArray,M.active,me),()=>{const Oe=_e.value;if(Oe){const lt=Un(k.value,ee,S().keyField,M.simpleArray,M.active,me),xe=lt.id;xe!=null&&ze.set(Oe,{active:lt.active,id:xe})}},{immediate:!0}),Q(()=>Ul(k.value,q.value,S().flowMode??!1,me),()=>{const Oe=_e.value;Oe&&Ln(Oe,k.value,q.value,S().disableTransform??!1,S().flowMode??!1,I,me)},{immediate:!0}),Ri(ee,_e,Se,Be)));Ze.mount(),V.set(s,{binding:k,scope:R,options:ee,callbacks:Be,el:_e,controller:Ze,restoreStyles:I})}const E={mounted(s,a){if(!L.value)return;const w=Nn(s);b(s,a.value,qn(a.value,me),w)},updated(s,a){if(!L.value)return;const w=V.get(s),I=qn(a.value,me);if(!w){const k=Nn(s);b(s,a.value,I,k);return}const R=w.binding.value!==a.value;R&&(w.binding.value=a.value),ql(w.options,I),jl(w.callbacks,I),w.el.value!==s&&(w.el.value=s),R&&Ln(s,a.value,q.value,S().disableTransform??!1,S().flowMode??!1,w.restoreStyles,me)},unmounted(s){const a=V.get(s);a&&(a.controller.unmount(),a.scope.stop(),Ei(s,a.restoreStyles),ze.delete(s),V.delete(s))}};function $(s=!1){L.value&&((s||Y.value)&&(M.sizes={}),o.emit("vscroll:update",{force:!0}))}function re(s,a){Z.scrollToItem(s,a)}function Pe(s){const a=S();return M.sizes=cn(s,D.value,Y.value?null:a.keyField),Z.restoreCache(s)}function Ee(s,a){const w=S(),I=a??D.value.indexOf(s),R=Y.value?I:hn(s,I>=0?I:a,w.keyField);return M.sizes[R]||0}function je(){if(!L.value)return;const s=G.value;s&&(c||(c=!0,Ae(()=>{s.scrollTop=s.scrollHeight+5e3;const a=()=>{s.scrollTop=s.scrollHeight+5e3,C(()=>{s.scrollTop=s.scrollHeight+5e3,n===0?c=!1:C(a)})};C(a)})))}function Xe(){_&&!g&&H()}return Q(()=>D.value.slice(),(s,a)=>{if(!L.value)return;const w=S(),I=Y.value?null:w.keyField,R=pt(s,I);if(w.shift){const k=a?pt(a,I):v,ee=bi(k,R);ee>0?(qe(k),_&&(_.pendingKeys=new Set(R.slice(0,ee)),_.stableFrames=0,Ae(()=>{_&&x()}))):H()}else H();v=R,$()},{flush:"sync"}),Q(()=>S().cache,s=>{L.value&&s&&Pe(s)}),Q(()=>S().keyField,s=>{L.value&&(M.keyField=s,v=pt(D.value,Y.value?null:s),H(),$(!0))},{flush:"sync"}),Q(Y,s=>{M.simpleArray=s},{immediate:!0}),Q(()=>S().direction,()=>{L.value&&(H(),$(!0))}),Q(G,(s,a)=>{a?.removeEventListener("scroll",Xe),L.value&&s?.addEventListener("scroll",Xe)},{immediate:!0}),Q(L,s=>{const a=G.value;s?(a?.addEventListener("scroll",Xe),$()):(a?.removeEventListener("scroll",Xe),We(),W(),H())}),Q(p,()=>{if(!L.value)return;const s=G.value;if(!s)return;if(_){x();return}const a=h;if(h=null,!a)return;const w=P.value.findIndex(R=>R.id===a.key);if(w===-1)return;const I=Z.getItemOffset(w)+a.offset;I-s.scrollTop!==0&&(s.scrollTop=I)},{flush:"post"}),vi(()=>{M.active=!0}),ml(()=>{M.active=!1}),ol(()=>{var s;We(),W(),(s=G.value)==null||s.removeEventListener("scroll",Xe),o.clear()}),{vscrollData:M,itemsWithSize:P,resizeObserver:m,measurementContext:Se,vDynamicScrollerItem:E,...Z,pool:Le,visiblePool:_t,simpleArray:Y,forceUpdate:$,scrollToItem:re,restoreCache:Pe,getItemSize:Ee,getViewStyle:Je,scrollToBottom:je,onScrollerResize:j,onScrollerVisible:Re}}var zn,Ql=ye((()=>{Ge(),Mi(),yn(),Ci(),zn=["position","top","left","transform","willChange","visibility","pointerEvents","display"]}));function Gl(e){return typeof e=="function"?{callback:e,observer:null,intersection:void 0,visible:null}:{callback:e.callback,observer:null,intersection:e.intersection,visible:null}}function jn(e,t){Bi(e);const n=Gl(t.value);if(Jt.set(e,n),typeof IntersectionObserver>"u"){const i=e.getBoundingClientRect();n.visible=!0,n.callback(!0,{boundingClientRect:i});return}n.observer=new IntersectionObserver(i=>{const o=i[0],c=!!(o!=null&&o.isIntersecting);n.visible!==null&&n.visible===c||(n.visible=c,n.callback(c,o))},n.intersection),n.observer.observe(e)}function Bi(e){const t=Jt.get(e);t!=null&&t.observer&&(t.observer.disconnect(),t.observer=null)}var Jt,Vi,Di,Yn,Kn,Pi,Jl=ye((()=>{Ge(),Jt=new WeakMap,Vi={mounted(e,t){jn(e,t)},updated(e,t){t.value!==t.oldValue&&jn(e,t)},unmounted(e){Bi(e),Jt.delete(e)}},Di=bt({__name:"ItemView",props:{view:{},itemTag:{}},setup(e){const t=e;return(n,i)=>(de(),mt(Vt(t.itemTag),{class:"vue-recycle-scroller__item-view"},{default:Qe(()=>[Me(n.$slots,"default",{item:t.view.item,index:t.view.nr.index,active:t.view.nr.used})]),_:3}))}}),Yn=bt({__name:"ResizeObserver",emits:["notify"],setup(e,{emit:t}){const n=t,i=he();let o=null,c=null;function m(){n("notify")}return Xt(()=>{var g;const v=(g=i.value)==null?void 0:g.parentElement;if(v){if(typeof ResizeObserver<"u"){o=new ResizeObserver(()=>{m()}),o.observe(v);return}c=()=>m(),window.addEventListener("resize",c)}}),Zt(()=>{o&&(o.disconnect(),o=null),c&&(window.removeEventListener("resize",c),c=null)}),(g,v)=>(de(),$e("div",{ref_key:"el",ref:i,class:"vue-recycle-scroller__resize-observer","aria-hidden":"true"},null,512))}}),Kn=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},Pi=Kn(Yn,[["__scopeId","data-v-08cc04ab"]])})),Oi,Xl=ye((()=>{Ge(),Mi(),Jl(),Oi=bt({__name:"RecycleScroller",props:{items:{},keyField:{default:"id"},direction:{default:"vertical"},listTag:{default:"div"},itemTag:{default:"div"},itemSize:{default:null},gridItems:{default:void 0},itemSecondarySize:{default:void 0},minItemSize:{default:null},sizeField:{default:"size"},typeField:{default:"type"},buffer:{default:200},pageMode:{type:Boolean,default:!1},scrollParent:{default:void 0},shift:{type:Boolean,default:!1},cache:{default:void 0},prerender:{default:0},emitUpdate:{type:Boolean,default:!1},disableTransform:{type:Boolean,default:!1},flowMode:{type:Boolean,default:!1},hiddenPosition:{default:void 0},updateInterval:{default:0},skipHover:{type:Boolean,default:!1},enabled:{type:Boolean,default:!0},listClass:{default:""},itemClass:{default:""}},emits:["resize","visible","hidden","update","scrollStart","scrollEnd"],setup(e,{expose:t,emit:n}){const i=e,o=n,c=Vi,m=he(),g=he(),v=he(),h=he(null),_=gi(i,"items"),{pool:y,visiblePool:T,totalSize:F,startSpacerSize:M,endSpacerSize:D,ready:q,scrollToItem:G,scrollToPosition:ie,getScroll:X,findItemIndex:ze,getItemOffset:S,getItemSize:L,getViewStyle:C,cacheSnapshot:W,restoreCache:be,updateVisibleItems:Se,handleResize:Y,handleVisibilityChange:p}=zi(N(()=>({items:_,el:m,before:g,after:v,keyField:i.keyField,direction:i.direction,itemSize:i.itemSize,gridItems:i.gridItems,itemSecondarySize:i.itemSecondarySize,minItemSize:i.minItemSize,sizeField:i.sizeField,typeField:i.typeField,buffer:i.buffer,pageMode:i.pageMode,scrollParent:i.scrollParent,shift:i.shift,cache:i.cache,prerender:i.prerender,emitUpdate:i.emitUpdate,disableTransform:i.disableTransform,flowMode:i.flowMode,hiddenPosition:i.hiddenPosition,updateInterval:i.updateInterval,enabled:i.enabled,onResize:()=>o("resize"),onVisible:()=>o("visible"),onHidden:()=>o("hidden"),onUpdate:(j,Re,Z,me)=>{o("update",j,Re,Z,me),Z<=0&&o("scrollStart"),me>=i.items.length-1&&o("scrollEnd")}}))),P=N(()=>Pt({direction:i.direction,disableTransform:i.disableTransform,flowMode:i.flowMode,gridItems:i.gridItems})==="flow"),le=N(()=>({height:`${M.value}px`})),ce=N(()=>({height:`${D.value}px`}));function nt(j){h.value=j}function Ve(){h.value=null}const De=N(()=>{const j={[i.direction==="vertical"?"minHeight":"minWidth"]:`${F.value}px`},Re=ot(i.itemSize);if(i.gridItems&&Re!=null){const Z=(i.itemSecondarySize||Re)*i.gridItems;j[i.direction==="vertical"?"minWidth":"minHeight"]=`${Z}px`}return j});return t({el:m,visiblePool:T,startSpacerSize:M,endSpacerSize:D,scrollToItem:G,scrollToPosition:ie,getScroll:X,findItemIndex:ze,getItemOffset:S,getItemSize:L,cacheSnapshot:W,restoreCache:be,updateVisibleItems:Se}),(j,Re)=>ul((de(),$e("div",{ref_key:"el",ref:m,class:Dt(["vue-recycle-scroller",{"grid-mode":i.gridItems,"flow-mode":P.value,ready:Ce(q),"page-mode":i.pageMode,[`direction-${i.direction}`]:!0}])},[j.$slots.before?(de(),$e("div",{key:0,ref_key:"before",ref:g,class:"vue-recycle-scroller__slot"},[Me(j.$slots,"before")],512)):Ne("",!0),(de(),mt(Vt(i.listTag),{style:Qt(De.value),class:Dt(["vue-recycle-scroller__item-wrapper",i.listClass])},{default:Qe(()=>[P.value&&Ce(M)>0?(de(),mt(Vt(i.itemTag),{key:0,"aria-hidden":"true",class:"vue-recycle-scroller__item-spacer",style:Qt(le.value)},null,8,["style"])):Ne("",!0),(de(!0),$e(pn,null,mn(Ce(y),Z=>(de(),mt(Di,un({key:Z.nr.id,view:Z,"item-tag":i.itemTag,style:Ce(q)?Ce(C)(Z):null,class:["vue-recycle-scroller__item-view",[i.itemClass,{hover:!i.skipHover&&h.value===Z.nr.key}]]},nl(i.skipHover?{}:{mouseenter:()=>{nt(Z.nr.key)},mouseleave:()=>{Ve()}})),{default:Qe(me=>[Me(j.$slots,"default",un({ref_for:!0},me))]),_:2},1040,["view","item-tag","style","class"]))),128)),P.value&&Ce(D)>0?(de(),mt(Vt(i.itemTag),{key:1,"aria-hidden":"true",class:"vue-recycle-scroller__item-spacer",style:Qt(ce.value)},null,8,["style"])):Ne("",!0),i.items.length===0?Me(j.$slots,"empty",{key:2}):Ne("",!0)]),_:3},8,["style","class"])),j.$slots.after?(de(),$e("div",{key:1,ref_key:"after",ref:v,class:"vue-recycle-scroller__slot"},[Me(j.$slots,"after")],512)):Ne("",!0),mi(Pi,{onNotify:Ce(Y)},null,8,["onNotify"])],2)),[[Ce(c),Ce(p)]])}})})),Hi,Zl=ye((()=>{Ge(),Ql(),Xl(),Hi=bt({inheritAttrs:!1,__name:"DynamicScroller",props:{items:{},keyField:{default:"id"},direction:{default:"vertical"},listTag:{default:"div"},itemTag:{default:"div"},minItemSize:{},shift:{type:Boolean,default:!1},cache:{default:void 0},disableTransform:{type:Boolean,default:!1},flowMode:{type:Boolean,default:!1},hiddenPosition:{default:void 0},enabled:{type:Boolean,default:!0},pageMode:{type:Boolean,default:!1},scrollParent:{default:void 0}},emits:["resize","visible"],setup(e,{expose:t,emit:n}){const i=e,o=n,c=he(),m=gi(i,"items"),g=N(()=>{var C;const W=(C=c.value)==null?void 0:C.el;return W&&typeof W=="object"&&"value"in W?W.value:W}),{itemsWithSize:v,forceUpdate:h,startSpacerSize:_,endSpacerSize:y,scrollToItem:T,scrollToPosition:F,findItemIndex:M,getItemOffset:D,getItemSize:q,cacheSnapshot:G,restoreCache:ie,scrollToBottom:X,onScrollerResize:ze,onScrollerVisible:S}=Kl(N(()=>({items:m,keyField:i.keyField,direction:i.direction,minItemSize:i.minItemSize,shift:i.shift,cache:i.cache,flowMode:i.flowMode,hiddenPosition:i.hiddenPosition,enabled:i.enabled,pageMode:i.pageMode,scrollParent:i.scrollParent,el:g.value,onResize:()=>o("resize"),onVisible:()=>o("visible")})));function L(C,W,be){return{item:C.item,index:W,active:be,itemWithSize:C}}return t({startSpacerSize:_,endSpacerSize:y,scrollToItem:T,scrollToPosition:F,findItemIndex:M,getItemOffset:D,scrollToBottom:X,getItemSize:q,cacheSnapshot:G,restoreCache:ie,forceUpdate:h}),(C,W)=>(de(),mt(Oi,un({ref_key:"scroller",ref:c,items:Ce(v),"min-item-size":i.minItemSize,direction:i.direction,cache:i.cache,"disable-transform":i.disableTransform,"flow-mode":i.flowMode,"hidden-position":i.hiddenPosition,enabled:i.enabled,"page-mode":i.pageMode,"scroll-parent":i.scrollParent,"key-field":"id","list-tag":i.listTag,"item-tag":i.itemTag},C.$attrs,{onResize:Ce(ze),onVisible:Ce(S)}),rl({default:Qe(({item:be,index:Se,active:Y})=>[Me(C.$slots,"default",al(cl(L(be,Se,Y))))]),empty:Qe(()=>[Me(C.$slots,"empty")]),_:2},[C.$slots.before?{name:"before",fn:Qe(()=>[Me(C.$slots,"before")]),key:"0"}:void 0,C.$slots.after?{name:"after",fn:Qe(()=>[Me(C.$slots,"after")]),key:"1"}:void 0]),1040,["items","min-item-size","direction","cache","disable-transform","flow-mode","hidden-position","enabled","page-mode","scroll-parent","list-tag","item-tag","onResize","onVisible"]))}})}));function er(e,t,n){const i=Bn("vscrollMeasurementContext"),o=Bn("vscrollAnchorRegistry",null),c=N(()=>{const T=U(e).el;return U(t??T)}),m={onResize:T=>{var F;return(F=n?.onResize??U(e).onResize)==null?void 0:F(T)}},g=N(()=>U(U(e).enabled??!0)),v=Ri(e,c,i,m);let h=!1;function _(){h||(v.mount(),h=!0)}function y(){h&&(v.unmount(),h=!1)}return Xt(()=>{g.value&&_()}),Q(g,T=>{if(T)_();else{const F=c.value;o&&F&&o.delete(F),y()}}),o&&Q([v.id,v.finalActive,c,g],([T,F,M,D],[q,G,ie])=>{ie&&ie!==M&&o.delete(ie),D&&M&&o.set(M,{active:F,id:T})},{immediate:!0}),Zt(()=>{const T=c.value;o&&T&&o.delete(T),y()}),{id:v.id,size:v.size,finalActive:v.finalActive,updateSize:v.updateSize}}var tr=ye((()=>{Ge(),Ci()})),Ai,nr=ye((()=>{Ge(),tr(),Ai=bt({__name:"DynamicScrollerItem",props:{item:{},watchData:{type:Boolean,default:!1},active:{type:Boolean},index:{default:void 0},sizeDependencies:{default:null},emitResize:{type:Boolean,default:!1},enabled:{type:Boolean,default:!0},tag:{default:"div"}},emits:["resize"],setup(e,{emit:t}){const n=e,i=t,o=he();return er(n,o,{onResize:c=>i("resize",c)}),(c,m)=>(de(),mt(Vt(n.tag),{ref_key:"el",ref:o},{default:Qe(()=>[Me(c.$slots,"default")]),_:3},512))}})})),ir=ye((()=>{Zl(),nr()})),lr=ye((()=>{})),Qn,Gn,Ni,Jn=ye((()=>{Ge(),ir(),lr(),Qn=["data-virtual-index","data-message-id"],Gn={key:2,class:"virtual-message-list-empty"},Ni=bt({__name:"VirtualMessageList",props:{messages:{},virtualized:{type:Boolean,default:!0},estimatedItemHeight:{default:180},overscan:{default:8},rowGap:{default:16},padding:{default:"20px"},topThreshold:{default:120}},emits:["scroll","topReach"],setup(e,{expose:t,emit:n}){const i=e,o=n,c=he(null),m=he(null),g=he(null),v=he(0),h=he(0);let _=0,y=null,T=0,F=0,M=0,D=!1,q=null,G=0,ie=null,X=null;const ze=N(()=>i.messages.map(L)),S=N(()=>Math.max(i.estimatedItemHeight,i.estimatedItemHeight*i.overscan));function L(d){return String(d.id)}function C(){return c.value?.querySelector(".virtual-message-list")??null}function W(){const d=C();d&&(v.value=d.scrollTop,h.value=d.clientHeight)}function be(d=120){M=Date.now()+d}function Se(){return Date.now()<M}function Y(){_=0,y!=null&&(cancelAnimationFrame(y),y=null),T=0,F=0}function p(){const d=v.value;W(),v.value-d<-1?(D=!0,Y()):Se()||(ce(32)&&(D=!1),(D||!ce(96))&&Y()),o("scroll"),v.value<=i.topThreshold&&o("topReach")}function P(d){d.deltaY<-1&&(D=!0,Y())}function le(){W(),(!D||Date.now()<_||ce(64))&&j(2),ie&&Le(ie.token,4)}function ce(d=200){const x=C();return x?x.scrollHeight-x.scrollTop-x.clientHeight<d:!0}function nt(d=200){return!D&&ce(d)}function Ve(d={}){const x=typeof d=="number"?d:d.frames??2,b=typeof d=="number"?400:d.keepAliveMs??400;D=!1,_=Date.now()+b,Ae(()=>{j(x)})}function De(){const d=C();return be(),i.virtualized&&g.value?.scrollToBottom(),d?(d.scrollTop=Math.max(0,d.scrollHeight-d.clientHeight),W(),!0):!1}function j(d=1){if(T=Math.max(T,d),y!=null)return;const x=()=>{if(De()?(F=0,T-=1):F+=1,T<=0){y=null,T=0,F=0;return}if(F>30){y=null,T=0,F=0;return}y=requestAnimationFrame(x)};y=requestAnimationFrame(x)}function Re(d,x){const b=C();if(!b)return null;const E=document.getElementById(x);if(E instanceof HTMLElement&&b.contains(E))return E;const $=document.getElementById(`message-${d}`);return $ instanceof HTMLElement&&b.contains($)?$:null}function Z(d,x){const b=C();if(!b)return;const E=b.getBoundingClientRect(),$=d.getBoundingClientRect(),re=x==="center"?$.top+$.height/2-(E.top+E.height/2):$.top-E.top-24;Math.abs(re)>1&&(be(),b.scrollTop=Math.max(0,b.scrollTop+re)),W()}function me(d){return C()?.querySelector(`.virtual-row[data-virtual-index="${d}"]`)??null}function it(d,x){if(be(),i.virtualized){g.value?.scrollToItem(d,x),W();return}const b=C(),E=me(d);if(!b||!E){W();return}const $=E.getBoundingClientRect(),re=b.getBoundingClientRect(),Pe=x?.align??"start",Ee=x?.offset??0,je=Pe==="center"?$.top+$.height/2-(re.top+re.height/2):$.top-re.top+Ee;b.scrollTop=Math.max(0,b.scrollTop+je),W()}function Le(d,x=1){q!=null&&cancelAnimationFrame(q);const b=E=>{const $=ie;if(!$||$.token!==d){q=null;return}const re=Re($.messageId,$.anchorId);if(re?Z(re,$.align):it($.index,{align:$.align,offset:$.align==="start"?-24:0}),E<=1){q=null,ie=null;return}q=requestAnimationFrame(()=>b(E-1))};q=requestAnimationFrame(()=>b(x))}function Je(){G+=1,ie=null,q!=null&&(cancelAnimationFrame(q),q=null)}function ct(d){const x=i.messages.findIndex(E=>String(E.id)===d);if(x<0)return;Je();const b=G;ie={token:b,index:x,messageId:d,anchorId:`message-${d}`,align:"center"},Ae(()=>{it(x,{align:"center"}),Le(b,8)})}function _t(d,x){const b=i.messages.findIndex($=>String($.id)===d);if(b<0)return;Je();const E=G;ie={token:E,index:b,messageId:d,anchorId:x,align:"start"},Ae(()=>{it(b,{align:"start",offset:-24}),Le(E,10)})}function V(){const d=C();return d?{scrollTop:d.scrollTop,scrollHeight:d.scrollHeight}:null}function We(d){d&&Ae(()=>{const x=C();if(!x)return;const b=Math.max(0,x.scrollHeight-d.scrollHeight+d.scrollTop);be(),i.virtualized&&g.value?.scrollToPosition(b),x.scrollTop=b,W()})}function H(d){const x=d.getBoundingClientRect(),b=x.bottom||x.top+d.clientHeight;let E=null;for(const $ of d.querySelectorAll(".virtual-row[data-virtual-index]")){const re=$.getBoundingClientRect();if(re.bottom<=x.top||re.top>=b)continue;const Pe=Number($.dataset.virtualIndex),Ee=Number.isInteger(Pe)?i.messages[Pe]:null,je=$.dataset.messageId||(Ee?L(Ee):"");je&&(!E||re.top<E.top)&&(E={messageId:je,offset:re.top-x.top,top:re.top})}return E?{messageId:E.messageId,offset:E.offset}:null}function st(){const d=C();if(!d)return null;const x=H(d);return{anchorMessageId:x?.messageId||null,anchorOffset:x?.offset||0,scrollTop:d.scrollTop,scrollHeight:d.scrollHeight,clientHeight:d.clientHeight,wasNearBottom:ce(64)}}function Ue(d,x=4){if(!d)return!1;X!=null&&(cancelAnimationFrame(X),X=null);const b=d.anchorMessageId,E=b?i.messages.findIndex(re=>L(re)===b):-1;if(!b||E<0)return Ve(),!1;Y(),Je(),D=!d.wasNearBottom;const $=Number.isFinite(d.anchorOffset)?d.anchorOffset:0;return Ae(()=>{let re=x;const Pe=()=>{const Ee=C();if(!Ee){X=null;return}const je=i.messages.findIndex(s=>L(s)===b);if(je<0){X=null,Ve();return}const Xe=me(je);if(Xe){const s=Ee.getBoundingClientRect(),a=Xe.getBoundingClientRect(),w=Math.max(0,Ee.scrollHeight-Ee.clientHeight),I=a.top-s.top-$,R=Math.min(w,Math.max(0,Ee.scrollTop+I));be(),i.virtualized&&g.value?.scrollToPosition(R),Ee.scrollTop=R,W()}else it(je,{align:"start",offset:-$});if(re-=1,re<=0){X=null;return}X=requestAnimationFrame(Pe)};X=requestAnimationFrame(Pe)}),!0}let qe=null;return Xt(()=>{Ae(()=>{W();const d=C();if(d&&typeof ResizeObserver<"u"){qe=new ResizeObserver(le),qe.observe(d);const x=m.value??d.querySelector(".vue-recycle-scroller__item-wrapper");x&&qe.observe(x)}})}),Zt(()=>{Y(),q!=null&&cancelAnimationFrame(q),X!=null&&cancelAnimationFrame(X),qe?.disconnect()}),Q(ze,()=>{Je(),Ae(W)}),t({isNearBottom:ce,shouldAutoFollowBottom:nt,scrollToBottom:Ve,scrollToMessage:ct,scrollToAnchor:_t,captureScrollPosition:V,restoreScrollPosition:We,captureViewportPosition:st,restoreViewportPosition:Ue}),(d,x)=>(de(),$e("div",{ref_key:"hostRef",ref:c,class:"virtual-message-list-host",style:Qt({"--virtual-row-gap":`${e.rowGap}px`,"--virtual-list-padding":e.padding})},[e.virtualized?(de(),mt(Ce(Hi),{key:0,ref_key:"scrollerRef",ref:g,class:"virtual-message-list",items:e.messages,"key-field":"id","min-item-size":e.estimatedItemHeight,buffer:S.value,"flow-mode":!0,prerender:e.overscan,onScrollPassive:p,onWheelPassive:P,onResize:le,onVisible:W},{before:Qe(()=>[e.messages.length>0?Me(d.$slots,"before",{key:0},void 0,!0):Ne("",!0)]),default:Qe(({item:b,index:E,active:$})=>[mi(Ce(Ai),{item:b,index:E,active:$,class:"virtual-row","data-virtual-index":E,"data-message-id":L(b)},{default:Qe(()=>[$?Me(d.$slots,"item",{key:0,message:b},void 0,!0):Ne("",!0)]),_:2},1032,["item","index","active","data-virtual-index","data-message-id"])]),after:Qe(()=>[e.messages.length>0?Me(d.$slots,"after",{key:0},void 0,!0):Ne("",!0)]),_:3},8,["items","min-item-size","buffer","prerender"])):(de(),$e("div",{key:1,class:"virtual-message-list",onScrollPassive:p,onWheelPassive:P},[He("div",{ref_key:"contentRef",ref:m,class:"virtual-message-list-content"},[e.messages.length>0?Me(d.$slots,"before",{key:0},void 0,!0):Ne("",!0),(de(!0),$e(pn,null,mn(e.messages,(b,E)=>(de(),$e("div",{key:L(b),class:"virtual-row","data-virtual-index":E,"data-message-id":L(b)},[Me(d.$slots,"item",{message:b},void 0,!0)],8,Qn))),128)),e.messages.length>0?Me(d.$slots,"after",{key:1},void 0,!0):Ne("",!0)],512)],32)),e.messages.length===0&&d.$slots.empty?(de(),$e("div",Gn,[Me(d.$slots,"empty",{},void 0,!0)])):Ne("",!0)],4))}})})),rr=ye((()=>{})),or,yr=ye((()=>{Jn(),Jn(),rr(),pi(),or=hi(Ni,[["__scopeId","data-v-963e6375"]])})),Xn,Zn,ei,ti,ni,ii,li,ri,oi,si,ai,ui,ci,di,Li,fi=ye((()=>{Ge(),il(),Xn={class:"tool-change-card"},Zn=["aria-expanded"],ei={class:"tool-change-card-title"},ti={key:0,class:"tool-change-card-file-count"},ni={class:"tool-change-card-stats"},ii={class:"additions"},li={class:"deletions"},ri={key:0,class:"tool-change-files"},oi=["onClick"],si={class:"tool-change-file-main"},ai=["title"],ui={class:"tool-change-file-stats"},ci={class:"additions"},di={class:"deletions"},Li=bt({__name:"ToolChangeCard",props:{files:{},filesChanged:{default:0},additions:{default:0},deletions:{default:0},expanded:{type:Boolean,default:!1},selectedFileId:{default:null},title:{default:""}},emits:["toggle","select"],setup(e,{emit:t}){const n=e,i=t,{t:o}=ll();function c(v){return v.split(/[\\/]/).filter(Boolean).pop()||v}function m(v){const h=c(v),_=h.lastIndexOf(".");if(_>=0)return h.slice(_+1).toLowerCase();const y=h.toLowerCase();return y==="dockerfile"?"docker":y==="makefile"?"make":"file"}function g(v){const h=m(v);return["js","ts","jsx","tsx"].includes(h)?"script":["py","rb","php"].includes(h)?"dynamic":["java","kt","scala"].includes(h)?"jvm":["rs","go","c","cc","cpp","h","hpp"].includes(h)?"systems":["html","vue"].includes(h)?"markup":["css","scss","sass","less"].includes(h)?"style":["json","yaml","yml","toml","xml"].includes(h)?"data":["md","mdx","txt"].includes(h)?"doc":["sh","bash","zsh","fish","docker","make"].includes(h)?"shell":"default"}return(v,h)=>(de(),$e("div",Xn,[He("button",{class:"tool-change-card-header",type:"button","aria-expanded":n.expanded,onClick:h[0]||(h[0]=_=>i("toggle"))},[(de(),$e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:Dt(["tool-change-chevron",{rotated:n.expanded}])},[...h[1]||(h[1]=[He("polyline",{points:"9 18 15 12 9 6"},null,-1)])],2)),He("span",ei,ft(n.title||Ce(o)("chat.changedFiles",{files:n.filesChanged||n.files.length})),1),n.title?(de(),$e("span",ti,ft(Ce(o)("chat.changedFiles",{files:n.filesChanged||n.files.length})),1)):Ne("",!0),He("span",ni,[He("span",ii,"+"+ft(n.additions),1),He("span",li,"-"+ft(n.deletions),1)])],8,Zn),n.expanded?(de(),$e("div",ri,[(de(!0),$e(pn,null,mn(n.files,_=>(de(),$e("button",{key:_.id,class:Dt(["tool-change-file-row",{selected:n.selectedFileId===_.id}]),type:"button",onClick:y=>i("select",_)},[He("span",si,[He("span",{class:Dt(["tool-change-file-badge",g(_.path)])},ft(m(_.path)),3),He("span",{class:"tool-change-file-name",title:_.path},ft(c(_.path)),9,ai)]),He("span",ui,[He("span",ci,"+"+ft(_.additions),1),He("span",di,"-"+ft(_.deletions),1)])],10,oi))),128))])):Ne("",!0)]))}})})),sr=ye((()=>{})),ar,br=ye((()=>{fi(),fi(),sr(),pi(),ar=hi(Li,[["__scopeId","data-v-d7444617"]])}));function ur(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function _r(e,t={}){const n=e instanceof Date?e:new Date(e);if(Number.isNaN(n.getTime()))return"";const i=t.now||new Date,o=t.locale,c={hour:"2-digit",minute:"2-digit"};if(ur(n,i))return n.toLocaleTimeString(o,c);const m=n.getFullYear()===i.getFullYear()?{month:"2-digit",day:"2-digit",...c}:{year:"numeric",month:"2-digit",day:"2-digit",...c};return n.toLocaleString(o,m)}var wr=ye((()=>{}));export{or as a,gr as c,br as i,pr as l,wr as n,yr as o,ar as r,hr as s,_r as t,hl as u};
1
+ import{$i as Qe,Bi as Xt,Di as bt,Fi as Ae,Gi as Me,Hi as de,Ii as vi,Ji as nl,Mi as Bn,Nr as il,Pi as un,Pr as ll,Qi as Vn,Ri as Zt,Sa as ft,Si as rl,Ti as mi,Ui as Et,Vi as ol,Wi as mn,Zi as Q,_a as Ce,_i as He,ai as sl,ba as al,bi as $e,ca as Dn,da as Kt,ea as ul,fa as Bt,ga as Pn,gi as N,ha as U,ki as cl,mi as pn,n as pi,na as dl,oa as fl,oi as vl,pa as gi,qi as Vt,si as Ge,t as hi,ua as he,vi as mt,wa as ye,xa as Qt,ya as Dt,yi as Ne,zi as ml}from"./index-DN4SafrP.js";import{S as pl,T as gl}from"./sessions-IkLKgnN6.js";var hl,pr=ye((()=>{vl(),Ge(),gl(),hl=sl("hermes-tool-panel",()=>{const e=he(null);let t=0;async function n(c,m=""){const g=++t;if(e.value={file:c,workspace:m,patch:"",loading:!c.binary,unavailable:!1,editable:!0},!c.binary)try{const v=await pl(c.session_id,c.change_id,c.id);if(g!==t||e.value?.file.id!==c.id)return;e.value.patch=v?.patch||"",e.value.unavailable=!v?.patch,e.value.loading=!1}catch{if(g!==t||e.value?.file.id!==c.id)return;e.value.patch="",e.value.unavailable=!0,e.value.loading=!1}}function i(c,m,g=""){t+=1,e.value={file:c,workspace:g,patch:m||"",loading:!1,unavailable:!c.binary&&!m,editable:!1}}function o(){t+=1,e.value=null}return{workspaceDiff:e,openWorkspaceDiff:n,openInlineWorkspaceDiff:i,closeWorkspaceDiff:o}})}));function yl(){try{return localStorage.getItem(gn)!=="false"}catch{return!0}}function yi(e){en.value=e;try{localStorage.setItem(gn,String(e))}catch{}}function bl(){yi(!en.value)}function gr(){return{toolTraceVisible:en,setToolTraceVisible:yi,toggleToolTraceVisible:bl}}var gn,en,hr=ye((()=>{Ge(),gn="hermes_show_tool_calls",en=he(yl())}));function _l(e){return e==null?"null":typeof e=="function"?"a function":`'${e}'`}function kt(e,t,n){if(!n)return t;const i=typeof n=="function"?n(e,t):e?.[n];if(i==null)throw new Error(`Key is ${i} on item (keyField is ${_l(n)})`);return i}function hn(e,t,n){if(typeof n=="function"&&t==null)throw new Error("index is required when using a function keyField");return kt(e,t??0,n)}var yn=ye((()=>{}));function bn(e,t,n){return kt(e,t,n)}function pt(e,t){return e.map((n,i)=>bn(n,i,t))}function wl(e,t,n){const i=[],o=[];for(let c=0;c<e.length;c++){const m=e[c],g=bn(m,c,t),v=n(m,c,g);i.push(g),o.push(typeof v=="number"&&v>0?v:null)}return{keys:i,sizes:o}}function zl(e,t,n){if(!e||e.keys.length!==t.length||e.sizes.length!==t.length)return!1;for(let i=0;i<t.length;i++)if(e.keys[i]!==bn(t[i],i,n))return!1;return!0}function cn(e,t,n){if(!zl(e,t,n))return{};const i={};for(let o=0;o<e.keys.length;o++){const c=e.sizes[o];typeof c=="number"&&c>0&&(i[e.keys[o]]=c)}return i}function bi(e,t){if(!e.length||t.length<=e.length)return 0;const n=e[0],i=t.indexOf(n);if(i<=0||i+e.length<t.length&&e.length>t.length-i)return 0;for(let o=0;o<e.length;o++)if(t[i+o]!==e[o])return 0;return i}function On(e,t,n,i,o,c=0){const m=o??"start";if(m==="nearest"){const g=n+i,v=e+t;return e>=n&&v<=g?null:e<n?e+c:v-i+c}return m==="end"?e+t-i+c:m==="center"?e+(t-i)/2+c:e+c}function Pt(e){return e.flowMode&&e.direction==="vertical"&&!e.gridItems?"flow":e.disableTransform?"position":"transform"}function _n(e,t){const n=t.direction==="vertical",i=t.mode??"transform",o={visibility:e.nr.used?"visible":"hidden",pointerEvents:e.nr.used?void 0:"none"};if(i==="flow"?o.display=e.nr.used?void 0:"none":(o.position="absolute",o.top="0px",o.left="0px",o.display=void 0),i==="position"?(o[n?"top":"left"]=`${e.position}px`,o[n?"left":"top"]=`${e.offset}px`,o.transform="none",o.willChange="unset"):i==="transform"&&(o.transform=n?`translateY(${e.position}px) translateX(${e.offset}px)`:`translateX(${e.position}px) translateY(${e.offset}px)`,o.willChange="transform"),t.gridItems&&t.itemSize!=null){const c=t.itemSecondarySize||t.itemSize;o.width=`${n?c:t.itemSize}px`,o.height=`${n?t.itemSize:c}px`}return o}function wn(e){return N(()=>U(e))}function Sl(e,t,n,i,o){const c=wn(e);return{el:N(()=>{const m=c.value.el;return U(t??m)}),before:N(()=>{const m=c.value.before;return U(n??m)}),after:N(()=>{const m=c.value.after;return U(i??m)}),scrollParent:N(()=>{const m=c.value.scrollParent;return U(m)}),callbacks:{onResize:()=>{var m;return(m=o?.onResize??c.value.onResize)==null?void 0:m()},onVisible:()=>{var m;return(m=o?.onVisible??c.value.onVisible)==null?void 0:m()},onHidden:()=>{var m;return(m=o?.onHidden??c.value.onHidden)==null?void 0:m()},onUpdate:(m,g,v,h)=>{var _;return(_=o?.onUpdate??c.value.onUpdate)==null?void 0:_(m,g,v,h)}}}}function _i(e){return typeof window<"u"&&e===window}function Tt(e,t,n){return t!=="horizontal"||!n||_i(n)||getComputedStyle(n).direction!=="rtl"?e:Ii==="negative"?-e:e}function Il(e,t,n){return Tt(e,t,n)}function sn(e,t,n,i){const o=Il(n,t,e),c=!!(i!=null&&i.smooth);if(_i(e)){t==="vertical"?e.scrollTo({top:o,behavior:c?"smooth":"auto"}):e.scrollTo({left:o,behavior:c?"smooth":"auto"});return}if(typeof e.scrollTo=="function"){e.scrollTo(t==="vertical"?{top:o,behavior:c?"smooth":"auto"}:{left:o,behavior:c?"smooth":"auto"});return}t==="vertical"?e.scrollTop=o:e.scrollLeft=o}function xl(e,t,n,i){if(n){if(i&&i!==window){const o=i;return t==="vertical"?o.clientHeight:o.clientWidth}return t==="vertical"?window.innerHeight:window.innerWidth}return t==="vertical"?e.clientHeight:e.clientWidth}function wi(e,t){return e.parentNode===null?t:wi(e.parentNode,[...t,e])}function an(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function Tl(e){return an(e,"overflow")+an(e,"overflow-y")+an(e,"overflow-x")}function kl(e){return xi.test(Tl(e))}function Ml(e){if(!(e instanceof HTMLElement||e instanceof SVGElement))return;if(e.parentNode===null)return document.scrollingElement||document.documentElement;const t=wi(e.parentNode,[]);for(let n=0;n<t.length;n+=1)if(t[n]instanceof Element&&kl(t[n]))return t[n];return document.scrollingElement||document.documentElement}function Rl(e,t){if(t)return t;if(!e)return;const n=Ml(e);if(n)return typeof window<"u"&&window.document&&(n===window.document.documentElement||n===window.document.body)?window:n}function Fl(){return Gt}function ot(e){return typeof e=="number"?e:null}function Cl(e,t,n,i,o){return typeof n=="number"?n:typeof n=="function"?n(e,t)||i||void 0:i||e?.[o??"size"]||void 0}function $l(e,t,n,i,o,c){return typeof n=="function"?n(e,t)||i||Number(o)||0:i||e?.[c??"size"]||Number(o)||0}function El(e){for(let t=0;t<e.length;t++)e[t]}function Bl(e,t){return e&&typeof e=="object"?e[t]:void 0}function Yt(e,t){return e.map(n=>Bl(n,t))}function Vl(e,t,n,i){if(e.length!==n.length||t.length!==i.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==n[o]||t[o]!==i[o])return!1;return!0}function Dl(e){const t=e;t._vs_styleStamp++}function Hn(e){const t=e;t._vs_visibilityStamp++,t._vs_styleStamp++}function Pl(e,t,n,i){if(n){for(const o of n)i(o);return}for(let o=e;o<t;o++)i(o)}function zi(e,t,n,i,o,c){const m=wn(e),g=Sl(m,t,n,i,o),v=N(()=>{const l=U(V().items);return El(l),l}),h=he([]),_=he(0),y=he(0),T=he(0),F=he(!1);let M=0,D=0,q=0,G=0,ie=!1,X=null;const ze=new Map,S=new Map;let L=!1,C=0,W=0,be=!1,Se=null,Y=null,p=null,P=0,le=null,ce=null,nt=[],Ve=[],De=null,j=null,Re=null,Z=!1,me=!1,it=!1;const Le=new Set,Je=he({}),ct=[],_t={accumulator:0};function V(){return m.value}function We(){return c?.pageMode??V().pageMode}const H=N(()=>U(V().enabled??!0)),st=N(()=>Rl(g.el.value,g.scrollParent.value)),Ue=N(()=>{const l=v.value;return l.length>0&&typeof l[0]!="object"}),qe=N(()=>{const l=V();if(ot(l.itemSize)===null){const r=v.value,u=Array.from({length:r.length});_t.accumulator=0,u[-1]=_t;const f=l.minItemSize,z=Je.value,B=Ue.value;let A=1e4,J=0,te;for(let se=0,fe=r.length;se<fe;se++){const ne=B?se:kt(r[se],se,l.keyField);te=$l(r[se],se,l.itemSize,z[ne],f,l.sizeField),te<A&&(A=te),J+=te;const O=ct[se]??(ct[se]={accumulator:0,size:void 0});O.accumulator=J,O.size=te,u[se]=O}return ct.length=r.length,P=A,u}return ki}),d=N(()=>h.value.filter(l=>(l._vs_visibilityStamp,l.nr.used)).sort((l,r)=>l.nr.index-r.nr.index)),x=N(()=>{const l=V(),r=Ue.value?null:l.keyField;return wl(v.value,r,(u,f,z)=>Cl(u,f,l.itemSize,Je.value[z],l.sizeField))});function b(l=V()){return l.direction??"vertical"}function E(l=V()){const r=b(l);let u=l.flowMode??!1;return u&&r!=="vertical"&&(me||(console.warn("[vue-recycle-scroller] flowMode only supports vertical lists. Falling back to standard positioning."),me=!0),u=!1),u&&l.gridItems&&(it||(console.warn("[vue-recycle-scroller] flowMode does not support gridItems. Falling back to standard positioning."),it=!0),u=!1),Pt({direction:r,disableTransform:l.disableTransform??!1,flowMode:u,gridItems:l.gridItems})}function $(){h.value.sort((l,r)=>l.nr.used!==r.nr.used?l.nr.used?-1:1:l.nr.used&&r.nr.used?l.nr.index-r.nr.index:l.nr.id-r.nr.id)}function re(l){const r=V();return Je.value=cn(l,v.value,Ue.value?null:r.keyField),Object.keys(Je.value).length>0}function Pe(l){let r=S.get(l);return r||(r=[],S.set(l,r)),r}function Ee(l,r,u,f,z){const B=Kt({item:u,position:0,offset:0,nr:fl({id:Ti++,index:r,used:!0,key:f,type:z}),_vs_styleStamp:0,_vs_visibilityStamp:0});return l.push(B),B}function je(l){const r=Pe(l);if(r&&r.length){const u=r.pop();return u.nr.used=!0,Hn(u),u}}function Xe(l,r){const u=h.value,f=u.indexOf(l);if(f===-1)return;const z=Math.max(0,Math.min(r,u.length-1));f!==z&&(u.splice(f,1),u.splice(z,0,l))}function s(l){Xe(l,h.value.length-1)}function a(){const l=h.value;let r=0;for(;r<l.length&&!l[r].nr.used;)r++;let u=0;for(let f=r;f<l.length&&l[f].nr.used;f++)u++;return{activeStart:r,activeCount:u,headInsertCount:0}}function w(l,r,u){let f=null;r<M?(f=u.activeStart+u.headInsertCount,u.headInsertCount++,u.activeCount++):r>=D&&(f=u.activeStart+u.activeCount,u.activeCount++),f!=null&&Xe(l,f)}function I(l,r=!1){const u=l.nr.type;Pe(u).push(l),l.nr.used=!1,l.position=V().hiddenPosition??-999999,Hn(l),ze.delete(l.nr.key),r&&s(l)}function R(){ze.clear(),S.clear();for(let l=0,r=h.value.length;l<r;l++){const u=h.value[l];u&&I(u)}}function k(l){let r=-1;return r=requestAnimationFrame(()=>{Le.delete(r),l()}),Le.add(r),r}function ee(){for(const l of Le)cancelAnimationFrame(l);Le.clear()}function Be(){Se&&(clearTimeout(Se),Se=null),Y&&(clearTimeout(Y),Y=null),p&&(clearTimeout(p),p=null),j&&(clearTimeout(j),j=null),Re&&(clearTimeout(Re),Re=null)}function _e(){var l,r;H.value&&((r=(l=g.callbacks).onResize)==null||r.call(l),F.value&&Ie(!1))}function Ze(){if(!H.value)return;De&&!Z&&zt();const l=V();if(!L){if(L=!0,Se)return;const r=()=>k(()=>{L=!1;const{continuous:u}=Ie(!1,!0);u||(Y&&clearTimeout(Y),Y=setTimeout(Ze,l.updateInterval+100))});r(),l.updateInterval&&(Se=setTimeout(()=>{Se=null,L&&r()},l.updateInterval))}}function Oe(l,r){var u,f,z,B;H.value&&F.value&&(l||r.boundingClientRect.width!==0||r.boundingClientRect.height!==0?((f=(u=g.callbacks).onVisible)==null||f.call(u),k(()=>{Ie(!1)})):(B=(z=g.callbacks).onHidden)==null||B.call(z))}function lt(){return st.value??window}function xe(){const l=g.before.value;return l?b(V())==="vertical"?l.scrollHeight:l.scrollWidth:0}function wt(){const l=g.el.value;if(!l)return{start:0,end:0};const r=b(V()),u=r==="vertical";let f;if(We()){const z=l.getBoundingClientRect(),B=u?z.height:z.width,A=st.value,J=!A||A===window,te=J?0:A.getBoundingClientRect().top,se=J?0:A.getBoundingClientRect().left,fe=J?window.innerHeight:A.clientHeight,ne=J?window.innerWidth:A.clientWidth;let O=u?-(z.top-te):-(z.left-se),ve=u?fe:ne;O<0&&(ve+=O,O=0),O+ve>B&&(ve=B-O),f={start:O,end:O+ve}}else u?f={start:l.scrollTop,end:l.scrollTop+l.clientHeight}:f={start:Tt(l.scrollLeft,r,l),end:Tt(l.scrollLeft,r,l)+l.clientWidth};return f}function Wi(){const l=g.el.value;if(!l)return{start:0,end:0};if(b(V())==="vertical"){const r=Tt(l.scrollLeft,"horizontal",l);return{start:r,end:r+l.clientWidth}}return{start:l.scrollTop,end:l.scrollTop+l.clientHeight}}function Ui(l,r,u,f){var z,B,A,J;const te=xe(),se=l.start-f-te,fe=l.end+f-te;return M>0&&se<=(((z=u[M-1])==null?void 0:z.accumulator)??0)||M<r-1&&se>(((B=u[M])==null?void 0:B.accumulator)??Number.POSITIVE_INFINITY)||D>1&&fe<=(((A=u[D-2])==null?void 0:A.accumulator)??0)||D<r&&fe>(((J=u[D-1])==null?void 0:J.accumulator)??Number.POSITIVE_INFINITY)}function Ot(l){const r=V(),u=ot(r.itemSize);if(u!==null)return u;const f=qe.value[l];return f?.size||Number(r.minItemSize)||0}function qi(l){const r=V();return _n(l,{direction:b(r),mode:E(r),itemSize:ot(r.itemSize),gridItems:r.gridItems,itemSecondarySize:r.itemSecondarySize})}function at(l){var r;const u=V(),f=u.gridItems||1,z=ot(u.itemSize);return l<=0?0:z!==null?Math.floor(l/f)*z:((r=qe.value[l-1])==null?void 0:r.accumulator)||0}function Sn(l){const r=V(),u=v.value.length,f=r.gridItems||1,z=ot(r.itemSize);if(!u)return 0;if(z!==null){const te=Math.floor(l/z)*f;return Math.min(Math.max(te,0),u-1)}let B=0,A=u-1,J=0;for(;B<=A;){const te=Math.floor((B+A)/2);at(te)<=l?(J=te,B=te+1):A=te-1}return J}function zt(){j&&(clearTimeout(j),j=null),De=null}function ji(){j&&clearTimeout(j),j=setTimeout(()=>{De=null,j=null},150)}function Yi(l,r){if(!l.length){zt();return}const u=Math.max(wt().start-xe(),0),f=Math.min(Sn(u),l.length-1),z=l[f],B=r?kt(z,f,r):f,A=xe()+at(f);De={key:B,offset:wt().start-A}}function In(l){if(!De)return!1;const r=V(),u=pt(l??v.value,Ue.value?null:r.keyField).indexOf(De.key);if(u===-1)return zt(),!1;const f=xe()+at(u)+De.offset,z=wt().start;return Math.abs(f-z)<.5?!1:(Z=!0,Ht(f),k(()=>{Z=!1}),!0)}function Rt(){if(St(),!H.value)return;const l=We()?lt():g.el.value;l&&(le=l,le.addEventListener("scroll",Ze,Fl()?{passive:!0}:!1),We()&&l===window&&(ce=l,ce.addEventListener("resize",_e)))}function St(){le&&(le.removeEventListener("scroll",Ze),le=null),ce&&(ce.removeEventListener("resize",_e),ce=null)}function Ki(l,r,u,f,z,B){const A=Math.ceil(l/r)*u,J=Math.max(0,Math.floor(z.start/u)),te=Math.min(Math.ceil(z.end/u),Math.ceil(l/r)),se=Math.max(0,Math.floor(B.start/f)),fe=Math.min(Math.ceil(B.end/f),r),ne=[];for(let et=J;et<te;et++){const It=et*r;for(let Ft=se;Ft<fe;Ft++){const Ct=It+Ft;if(Ct>=l)break;ne.push(Ct)}}const O=ne[0]??0,ve=ne.at(-1)??-1;return{renderedIndices:ne,startIndex:O,endIndex:ve+1,visibleStartIndex:O,visibleEndIndex:ve,totalSize:A}}function Qi(){const l=V(),r=ot(l.itemSize);if(!l.gridItems||r==null)return!1;const u=g.el.value;if(!u)return!1;const f=l.itemSecondarySize||r,z=b(l)==="vertical"?u.clientWidth:u.clientHeight;return f*l.gridItems>z}function xn(l,r,u,f){if(Math.abs(l-r)!==1||r<0||r>=u)return l;const z=l>r?at(r)+Ot(r):at(r);return Math.abs(z-f)<=dn?r:l}function Tn(l,r,u,f,z){if(Math.abs(l-r)!==1)return l;const B=z?r-1:r;if(B<0||B>=u)return l;const A=l>r?at(B)+Ot(B):at(B);return Math.abs(A-f)<=dn?r:l}function Gi(l,r,u){const f={...l,visibleStartIndex:xn(l.visibleStartIndex,q,r,u.rawViewportStart),visibleEndIndex:Tn(l.visibleEndIndex,G,r,u.rawViewportEnd,!1),startIndex:xn(l.startIndex,M,r,u.renderStart),endIndex:Tn(l.endIndex,D,r,u.renderEnd,!0)};f.startIndex>f.visibleStartIndex&&(f.startIndex=f.visibleStartIndex);const z=Math.min(r,f.visibleEndIndex+1);return f.endIndex<z&&(f.endIndex=z),f.endIndex<f.startIndex&&(f.endIndex=f.startIndex),f}function Ie(l,r=!1){var u,f,z,B,A,J,te,se,fe;if(!H.value)return{continuous:!0};const ne=V(),O=ot(ne.itemSize),ve=ne.gridItems||1,et=ne.itemSecondarySize||O||0,It=P,Ft=ne.typeField,Ct=Ue.value?null:ne.keyField,Nt=v.value,oe=Nt.length,Ye=qe.value,Mn=ze,Lt=h.value;let tn=null,nn=null,pe,ae,tt,Te,Fe;const el=O!==null||oe===0||Ye[oe-1]!=null;if(!oe||!el)!oe||!X?pe=ae=Te=Fe=tt=0:(pe=Math.min(X.startIndex,oe),ae=Math.min(X.endIndex,oe),Te=Math.min(X.visibleStartIndex,oe),Fe=Math.min(X.visibleEndIndex,oe),tt=((u=Ye[oe-1])==null?void 0:u.accumulator)??X.totalSizeValue);else if(be)pe=Te=0,ae=Fe=Math.min(ne.prerender,Nt.length),tt=0;else{const ue=wt(),ke=Wi(),ut=C,Ut=W,ge={...ue},xt={...ke};if(r){let we=ue.start-ut;we<0&&(we=-we);let yt=ke.start-Ut;yt<0&&(yt=-yt);const qt=O===null&&Ui(ue,oe,Ye,ne.buffer);if(!(O===null&&(we>=It||qt)||O!==null&&we>=O)&&!(ve>1&&O!=null&&yt>=et))return{continuous:!0}}C=ue.start,W=ke.start;const dt=ne.buffer;ge.start-=dt,ge.end+=dt,xt.start-=dt,xt.end+=dt;let rt=0;const Cn=g.before.value;Cn&&(rt=Cn.scrollHeight,ge.start-=rt);const $n=g.after.value;if($n){const we=$n.scrollHeight;ge.end+=we}const tl=E(ne)==="flow"&&O===null&&!r&&ie&&Math.abs(ue.start-ut)<=fn&&Math.abs(ke.start-Ut)<=fn;if(O===null){let we,yt=0,qt=oe-1,Ke=~~(oe/2),En;do En=Ke,we=((f=Ye[Ke])==null?void 0:f.accumulator)??0,we<ge.start?yt=Ke:Ke<oe-1&&(((z=Ye[Ke+1])==null?void 0:z.accumulator)??Number.POSITIVE_INFINITY)>ge.start&&(qt=Ke),Ke=~~((yt+qt)/2);while(Ke!==En);for(Ke<0&&(Ke=0),pe=Ke,tt=((B=Ye[oe-1])==null?void 0:B.accumulator)??0,ae=Ke;ae<oe&&(((A=Ye[ae])==null?void 0:A.accumulator)??0)<ge.end;ae++);for(ae===-1?ae=Nt.length-1:(ae++,ae>oe&&(ae=oe)),Te=pe;Te<oe&&rt+(((J=Ye[Te])==null?void 0:J.accumulator)??Number.POSITIVE_INFINITY)<ge.start;Te++);for(Fe=Te;Fe<oe&&rt+(((te=Ye[Fe])==null?void 0:te.accumulator)??0)<ge.end;Fe++);if(tl){const jt=Gi({startIndex:pe,endIndex:ae,visibleStartIndex:Te,visibleEndIndex:Fe},oe,{rawViewportStart:ue.start-rt,rawViewportEnd:ue.end-rt,renderStart:ue.start-dt-rt,renderEnd:ue.end+dt-rt});pe=jt.startIndex,ae=jt.endIndex,Te=jt.visibleStartIndex,Fe=jt.visibleEndIndex}X={startIndex:pe,endIndex:ae,visibleStartIndex:Te,visibleEndIndex:Fe,totalSizeValue:tt}}else if(ve>1){const we=Ki(oe,ve,O,et,ge,xt);tn=we.renderedIndices,nn=new Set(tn),pe=we.startIndex,ae=we.endIndex,Te=we.visibleStartIndex,Fe=we.visibleEndIndex,tt=we.totalSize}else{pe=~~(ge.start/O*ve);const we=pe%ve;pe-=we,ae=Math.ceil(ge.end/O*ve),Te=Math.max(0,Math.floor((ge.start-rt)/O*ve)),Fe=Math.floor((ge.end-rt)/O*ve),pe<0&&(pe=0),ae>oe&&(ae=oe),Te<0&&(Te=0),Fe>oe&&(Fe=oe),tt=Math.ceil(oe/ve)*O}}ae-pe>Si.itemsLimit&&Ji(),_.value=tt,y.value=0,T.value=E(ne)==="flow"?tt:0;let K;const ln=pe<=D&&ae>=M,Rn=E(ne)==="flow",rn=Rn&&ln&&!l;let on=null;if(!ln||l)R();else{const ue=ke=>{const ut=Lt[ke];ut&&(K=ut,K.nr.used&&((nn?nn.has(K.nr.index):K.nr.index>=pe&&K.nr.index<ae)||I(K,rn)))};if(rn){for(let ke=Lt.length-1;ke>=0;ke--)ue(ke);on=a()}else for(let ke=0,ut=Lt.length;ke<ut;ke++)ue(ke)}let ht,Wt,$t=null,Fn=0;return Pl(pe,ae,tn,ue=>{var ke;const ut=Ye[ue]&&Ye[ue].size,Ut=O||ut||P||1;ht=Nt[ue];const ge=Ct?kt(ht,ue,Ct):ue;K=Mn.get(ge);let xt=!1;if(K)K.item!==ht&&(K.item=ht),K.nr.used||console.warn(`Expected existing view's used flag to be true, got ${K.nr.used}`);else{if(Wt=ht[Ft],K=je(Wt),K){const dt=K.nr.index!==ue||K.nr.key!==ge;K.item=ht,K.nr.index=ue,K.nr.key=ge,K.nr.type!==Wt&&console.warn("Reused view's type does not match pool's type"),dt&&Dl(K)}else K=Ee(Lt,ue,ht,ge,Wt);Mn.set(ge,K),xt=!0}O===null?(K.position=((ke=Ye[ue-1])==null?void 0:ke.accumulator)||0,K.offset=0):(K.position=Math.floor(ue/ve)*O,K.offset=ue%ve*et),on&&xt&&w(K,ue,on),$t??($t=K.position),Fn+=Ut}),Rn?($t==null?(y.value=0,T.value=tt):(y.value=$t,T.value=Math.max(0,tt-$t-Fn)),rn||$()):(y.value=0,T.value=0),M=pe,D=ae,q=Te,G=Fe,ie=!0,ne.emitUpdate&&((fe=(se=g.callbacks).onUpdate)==null||fe.call(se,pe,ae,Te,Fe)),E(ne)!=="flow"&&(p&&clearTimeout(p),p=setTimeout(kn,ne.updateInterval+300)),{continuous:ln}}function Ji(){throw Re=setTimeout(()=>{Re=null,console.warn("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",g.el.value),console.warn("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")}function Xi(){if(Qi())return!1;const l=h.value.filter(({nr:r})=>r.used);for(let r=1;r<l.length;r++)if(l[r].nr.index!==l[r-1].nr.index+1)return!0;return!1}function kn(){if(H.value){if(E()==="flow"){$();return}h.value.sort((l,r)=>l.nr.index-r.nr.index),Xi()&&(Ie(!1),p&&clearTimeout(p))}}function Zi(l,r){if(!H.value)return;const u=V(),f=b(u),z=g.el.value;if(!z)return;const B=Math.max(0,Math.min(l,v.value.length-1)),A=wt().start,J=xl(z,f,u.pageMode,st.value),te=On(at(B),Ot(B),A,J,r?.align,r?.offset??0);if(te==null)return;Ht(te,r);const se=ot(u.itemSize);if(u.gridItems&&se!=null){const fe=g.el.value;if(!fe)return;const ne=u.gridItems,O=u.itemSecondarySize||se,ve=B%ne*O,et=f==="vertical"?"horizontal":"vertical",It=On(ve,O,et==="horizontal"?Tt(fe.scrollLeft,"horizontal",fe):fe.scrollTop,et==="horizontal"?fe.clientWidth:fe.clientHeight,r?.align,r?.offset??0);It!=null&&sn(fe,et,It,r)}}function Ht(l,r){if(!H.value)return;const u=b(V()),f=g.el.value;if(f)if(We()){const z=st.value??window,B=u==="vertical"?"top":"left",A=z===window,J=A?document.scrollingElement||document.documentElement:z,te=J.getBoundingClientRect(),se=f.getBoundingClientRect(),fe=A?u==="vertical"?window.scrollY:window.scrollX:Tt(u==="vertical"?J.scrollTop:J.scrollLeft,u,J),ne=se[B]-te[B];sn(A?window:J,u,l+fe+ne,r)}else sn(f,u,l,r)}const gt=V(),At=v.value;return nt=pt(At,At.length>0&&typeof At[0]!="object"?null:gt.keyField),Ve=Yt(At,gt.typeField),gt.cache&&re(gt.cache),H.value&&gt.prerender&&(be=!0,Ie(!1)),gt.gridItems&&ot(gt.itemSize)==null&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems"),Xt(()=>{H.value&&(Rt(),Ae(()=>{be=!1,Ie(!0),F.value=!0}))}),vi(()=>{if(!H.value)return;const l=C;typeof l=="number"&&Ae(()=>{Ht(l)})}),Zt(()=>{Be(),ee(),St()}),Q(H,l=>{l?(Rt(),Ae(()=>{Ie(!0),F.value=!0})):(St(),Be(),ee(),F.value=!1)}),Q(()=>V().cache,l=>{H.value&&(re(l),Ie(!0))}),Q(()=>U(V().items).slice(),(l,r)=>{if(!H.value)return;const u=V(),f=Ue.value?null:u.keyField,z=pt(l,f),B=Yt(l,u.typeField),A=nt,J=!Vl(z,B,A,Ve);u.shift&&bi(A,z)>0?Yi(r??[],f):zt(),nt=z,Ve=B,In(l),Ie(J)}),Q(()=>V().keyField,()=>{if(!H.value)return;const l=V(),r=Ue.value?null:l.keyField;nt=pt(v.value,r),Ve=Yt(v.value,l.typeField),zt(),Ie(!0)}),Q(()=>V().typeField,()=>{if(!H.value)return;const l=V();Ve=Yt(v.value,l.typeField),zt(),Ie(!0)}),Q(We,()=>{H.value&&(St(),Rt(),Ie(!1))}),Q(g.el,()=>{H.value&&(St(),Rt(),Ie(!1))}),Q(st,()=>{!H.value||!We()||(St(),Rt(),Ie(!1))}),Q(qe,()=>{H.value&&(In()&&ji(),Ie(!1))}),Q(()=>V().gridItems,()=>{H.value&&Ie(!0)}),Q(()=>V().itemSecondarySize,()=>{H.value&&Ie(!0)}),{pool:h,visiblePool:d,totalSize:_,startSpacerSize:y,endSpacerSize:T,ready:F,sizes:qe,simpleArray:Ue,scrollToItem:Zi,scrollToPosition:Ht,getScroll:wt,findItemIndex:Sn,getItemOffset:at,getItemSize:Ot,getViewStyle:qi,cacheSnapshot:x,restoreCache:re,updateVisibleItems:Ie,handleResize:_e,handleVisibilityChange:Oe,sortViews:kn}}var Si,Ii,xi,Gt,Ti,ki,dn,fn,Mi=ye((()=>{if(Ge(),yn(),Si={itemsLimit:1e3},Ii=(()=>{if(typeof document>"u")return"negative";const e=document.createElement("div"),t=document.createElement("div");e.style.width="4px",e.style.height="1px",e.style.overflow="auto",e.style.direction="rtl",t.style.width="8px",t.style.height="1px",e.appendChild(t),document.body.appendChild(e),e.scrollLeft=-1;const n=e.scrollLeft<0;return document.body.removeChild(e),n?"negative":"default"})(),xi=/auto|scroll/,Gt=!1,typeof window<"u"){Gt=!1;try{const e=Object.defineProperty({},"passive",{get(){Gt=!0}});window.addEventListener("test",null,e)}catch{}}Ti=0,ki=[],dn=8,fn=1}));function An(e){e==null||vn||(vn=!0,console.warn(Fi))}function Ri(e,t,n,i){let o=null,c=null,m=null,g=!1,v=null;const h=[],_=n.resizeObserver?()=>{}:n.onVscrollUpdate(q),y=N(()=>{const p=U(e);if(n.vscrollData.simpleArray){if(p.index==null)throw new Error("index is required when using simple-array mode with dynamic item measurement");return p.index}return hn(p.item,p.index,n.vscrollData.keyField)}),T=N(()=>n.vscrollData.sizes[y.value]||0),F=N(()=>U(e).active&&n.vscrollData.active);function M(){F.value?c!==y.value&&(c=y.value,o=null,m=null,ze(y.value)):o=y.value}function D(){U(e).watchData&&!n.resizeObserver?v=Q(()=>U(e).item,()=>{G()},{deep:!0}):v&&(v(),v=null)}function q({force:p}){!F.value&&p&&(m=y.value),(o===y.value||p||!T.value)&&M()}function G(){M()}function ie(p){n.undefinedMap[p]&&n.undefinedSizeCount.value--,n.undefinedMap[p]=void 0}function X(p,P){if(n.vscrollData.sizes[p]){ie(p);return}if(P){n.undefinedMap[p]||n.undefinedSizeCount.value++,n.undefinedMap[p]=!0;return}n.undefinedMap[p]&&(n.undefinedSizeCount.value--,n.undefinedMap[p]=!1)}function ze(p){n.measureQueue.schedule(p,{read(){if(y.value!==p)return null;const P=U(t);return P?{width:P.offsetWidth,height:P.offsetHeight}:null},write(P){const{width:le,height:ce}=P;S(le,ce)},done(){c=null}})}function S(p,P){const le=~~(n.direction.value==="vertical"?P:p);le&&T.value!==le&&L(le)}function L(p){var P,le;ie(y.value),n.vscrollData.sizes[y.value]=p,U(e).emitResize&&((le=(P=U(i))==null?void 0:P.onResize)==null||le.call(P,y.value))}function C(){if(!n.resizeObserver||g)return;const p=U(t);p&&(n.resizeObserver.observe(p),p.$_vs_id=y.value,p.$_vs_onResize=be,g=!0)}function W(){if(!n.resizeObserver||!g)return;const p=U(t);p&&(n.resizeObserver.unobserve(p),p.$_vs_onResize=void 0,g=!1)}function be(p,P,le){y.value===p&&S(P,le)}An(U(e).sizeDependencies),h.push(Q(()=>U(e).watchData,()=>{D()})),h.push(Q(()=>U(e).sizeDependencies,p=>{An(p),n.resizeObserver||G()},{deep:!0})),h.push(Q(y,(p,P)=>{const le=U(t);le&&(le.$_vs_id=p),ie(P),X(p,F.value);const ce=n.vscrollData.sizes[p];if(!ce){o=p,G();return}ie(p),g&&(n.vscrollData.sizes[p]=ce)})),h.push(Q(F,p=>{X(y.value,p),n.resizeObserver?p?C():W():p&&m===y.value&&M()})),D();function Se(){F.value&&(M(),C())}function Y(){n.measureQueue.cancel(y.value),_(),W(),ie(y.value);const p=U(t);p&&(p.$_vs_id=void 0,p.$_vs_onResize=void 0),v&&(v(),v=null);for(const P of h)P();h.length=0}return{id:y,size:T,finalActive:F,updateSize:M,mount:Se,unmount:Y}}var Fi,vn,Ci=ye((()=>{Ge(),yn(),Fi="[vue-virtual-scroller] `sizeDependencies` is deprecated and will be removed in the next major release. Dynamic item sizing uses ResizeObserver in modern browsers.",vn=!1}));function Ol(){const e=new Map;return{on(t,n){let i=e.get(t);i||(i=new Set,e.set(t,i)),i.add(n)},off(t,n){const i=e.get(t);i&&(i.delete(n),i.size||e.delete(t))},emit(t,n){const i=e.get(t);if(i!=null&&i.size)for(const o of[...i])o(n)},clear(){e.clear()}}}function Hl(e={}){const t=e.queueFlush??(_=>Ae(_)),n=e.overflowQueueFlush??t,i=Math.max(1,e.maxTasksPerFlush??Number.POSITIVE_INFINITY);let o=!1;const c=new Map;function m(){o||!c.size||(o=!0,t(g))}function g(){if(o=!1,!c.size)return;const _=[];for(const[T,F]of c)if(_.push(F),c.delete(T),_.length>=i)break;const y=_.map(T=>({task:T,value:T.read()}));for(const T of y)T.value!=null&&T.task.write(T.value),T.task.done();c.size&&(n(g),o=!0)}function v(_,y){c.set(_,y),m()}function h(_){c.delete(_)}return{schedule:v,cancel:h}}function Al(e){for(let t=0;t<e.length;t++)e[t]}function $i(e){return e.item}function Mt(e,t){return t.get(e)||e}function Nl(e){const t={};return Object.defineProperties(t,{item:{enumerable:!0,get:()=>e.item.item},itemWithSize:{enumerable:!0,get:()=>e.item},size:{enumerable:!0,get:()=>e.item.size},position:{enumerable:!0,get:()=>e.position},offset:{enumerable:!0,get:()=>e.offset},id:{enumerable:!0,get:()=>e.nr.id},index:{enumerable:!0,get:()=>e.nr.index},used:{enumerable:!0,get:()=>e.nr.used},key:{enumerable:!0,get:()=>e.nr.key},type:{enumerable:!0,get:()=>e.nr.type}}),t}function Ll(e){return e._vs_styleStamp??0}function Wl(e){return e._vs_visibilityStamp??0}function Nn(e){const t={};for(const n of zn)t[n]=e.style[n];return t}function Ei(e,t){for(const n of zn)e.style[n]=t[n]??""}function vt(e,t,n){e.style[t]!==n&&(e.style[t]=n)}function Ln(e,t,n,i,o,c,m){if(!("view"in t)){Ei(e,c);return}const g=e.tagName==="TR",v=Pt(o?{direction:n,flowMode:!0}:{direction:n,disableTransform:i||g}),h=_n(Mt(t.view,m),{direction:n,mode:v});vt(e,"position",String(h.position??"")),vt(e,"top",String(h.top??"")),vt(e,"left",String(h.left??"")),vt(e,"transform",v==="flow"||g?"":String(h.transform??"")),vt(e,"willChange",String(h.willChange??"")),vt(e,"visibility",String(h.visibility??"")),vt(e,"pointerEvents",String(h.pointerEvents??"")),vt(e,"display",String(h.display??""))}function Wn(e,t){return"view"in e&&!t}function Un(e,t,n,i,o,c){if("view"in e){const m=Mt(e.view,c);return{active:m.nr.used&&o,id:$i(m).id}}return{active:t.active&&o,id:Yl(t.item,n,i,t.index)}}function Ul(e,t,n,i){if(!("view"in e))return{direction:t,flowMode:n,legacy:!0};if(n)return{direction:t,flowMode:n,legacy:!1,visibilityStamp:Wl(Mt(e.view,i))};const o=Mt(e.view,i);return{active:o.nr.used,direction:t,flowMode:n,legacy:!1,styleStamp:Ll(o),position:Wn(e,n)?o.position:null,offset:Wn(e,n)?o.offset:null}}function qn(e,t){if("view"in e){const n=Mt(e.view,t);return{item:$i(n).item,active:n.nr.used,index:n.nr.index,watchData:e.watchData??!1,emitResize:e.emitResize??!1,sizeDependencies:e.sizeDependencies??null,onResize:e.onResize}}return{watchData:!1,emitResize:!1,sizeDependencies:null,...e}}function ql(e,t){e.item!==t.item&&(e.item=t.item),e.active!==t.active&&(e.active=t.active),e.index!==t.index&&(e.index=t.index),e.watchData!==t.watchData&&(e.watchData=t.watchData),e.sizeDependencies!==t.sizeDependencies&&(e.sizeDependencies=t.sizeDependencies),e.emitResize!==t.emitResize&&(e.emitResize=t.emitResize),e.onResize!==t.onResize&&(e.onResize=t.onResize)}function jl(e,t){e.onResize!==t.onResize&&(e.onResize=t.onResize)}function Yl(e,t,n,i){return n?i??null:hn(e,i,t)}function Kl(e){const t=wn(e);let n=0,i={};const o=Ol();let c=!1,m,g=!1,v=[],h=null,_=null,y=null;const T=new Set,F=[],M=Dn({active:!0,sizes:{},keyField:S().keyField,simpleArray:!1}),D=N(()=>{const s=U(S().items);return Al(s),s}),q=N(()=>S().direction??"vertical"),G=N(()=>U(S().el)),ie=N(()=>U(S().before)),X=N(()=>U(S().after)),ze=new Map;function S(){return t.value}const L=N(()=>U(S().enabled??!0));function C(s){let a=-1;return a=requestAnimationFrame(()=>{T.delete(a),s()}),T.add(a),a}function W(){for(const s of T)cancelAnimationFrame(s);T.clear()}const be=Hl({maxTasksPerFlush:6,overflowQueueFlush(s){C(s)}});typeof ResizeObserver<"u"&&(m=new ResizeObserver(s=>{C(()=>{if(Array.isArray(s)){for(const a of s)if(a.target&&a.target.$_vs_onResize){let w,I;if(a.borderBoxSize){const R=a.borderBoxSize[0];w=R.inlineSize,I=R.blockSize}else w=a.contentRect.width,I=a.contentRect.height;a.target.$_vs_onResize(a.target.$_vs_id,w,I)}}})}));const Se={vscrollData:M,resizeObserver:m,measureQueue:be,direction:q,undefinedMap:i,undefinedSizeCount:{get value(){return n},set value(s){n=s}},onVscrollUpdate(s){const a=w=>{s(w)};return o.on("vscroll:update",a),()=>o.off("vscroll:update",a)}};Et("vscrollData",M),Et("vscrollParent",{get $_undefinedSizes(){return n},set $_undefinedSizes(s){n=s},get $_undefinedMap(){return i},set $_undefinedMap(s){i=s},$_events:o,direction:q}),Et("vscrollResizeObserver",m),Et("vscrollMeasurementContext",Se),Et("vscrollAnchorRegistry",{delete(s){ze.delete(s)},set(s,a){ze.set(s,a)}});const Y=N(()=>{const s=D.value;return s.length>0&&typeof s[0]!="object"}),p=Bt(0),P=Bt(F);Vn(()=>{if(!L.value)return;const s=_||!G.value?null:le(G.value.scrollTop,F),a=S().keyField,w=Y.value,I=M.sizes,R=D.value,k=R.length;let ee=F.length!==k,Be=F.length!==k;for(let _e=0;_e<k;_e++){const Ze=R[_e],Oe=w?_e:kt(Ze,_e,a);let lt=I[Oe];typeof lt>"u"&&!i[Oe]&&(lt=0);let xe=F[_e];if(!xe){xe=Kt({item:Ze,id:Oe,size:lt}),F[_e]=xe,ee=!0,Be=!0;continue}xe.item!==Ze&&(xe.item=Ze,ee=!0,Be=!0),xe.id!==Oe&&(xe.id=Oe,ee=!0,Be=!0),xe.size!==lt&&(xe.size=lt,ee=!0)}F.length!==k&&(F.length=k,ee=!0,Be=!0),ee&&(h=s,p.value++,Be?P.value=F.slice():Pn(P))});function le(s,a){if(!a.length)return null;const w=S().minItemSize;let I=0,R=0,k=a[0].id;for(const ee of a){const Be=ee.size||w,_e=I+Be;if(R=I,k=ee.id,s<_e)return{key:ee.id,offset:s-I};I=_e}return{key:k,offset:Math.max(0,s-R)}}const ce=S();v=pt(D.value,Y.value?null:ce.keyField),ce.cache&&(M.sizes=cn(ce.cache,D.value,Y.value?null:ce.keyField));function nt(){var s,a;(a=(s=S()).onHidden)==null||a.call(s)}function Ve(s,a,w,I){var R,k;(k=(R=S()).onUpdate)==null||k.call(R,s,a,w,I)}const De=Dn({get enabled(){return L.value},get items(){return P.value},get keyField(){return"id"},get direction(){return q.value},get itemSize(){return null},get gridItems(){},get itemSecondarySize(){},get minItemSize(){return S().minItemSize},get sizeField(){return"size"},get typeField(){return"type"},get buffer(){return S().buffer??200},get pageMode(){return S().pageMode??!1},get shift(){return!1},get cache(){return S().cache},get prerender(){return S().prerender??0},get emitUpdate(){return S().emitUpdate??!1},get disableTransform(){return S().disableTransform??!1},get flowMode(){return S().flowMode??!1},get hiddenPosition(){return S().hiddenPosition},get updateInterval(){return S().updateInterval??0},get el(){return G.value},get before(){return ie.value},get after(){return X.value},get scrollParent(){return S().scrollParent},get onResize(){return j},get onVisible(){return Re},get onHidden(){return nt},get onUpdate(){return Ve}});function j(){var s,a;$(),(a=(s=S()).onResize)==null||a.call(s)}function Re(){var s,a;o.emit("vscroll:update",{force:!1}),(a=(s=S()).onVisible)==null||a.call(s)}const Z=zi(De),me=new WeakMap,it=new WeakMap,Le=Bt([]);function Je(s){const a=S();return _n(Mt(s,me),{direction:q.value,mode:Pt({direction:q.value,disableTransform:a.disableTransform??!1,flowMode:a.flowMode??!1})})}function ct(s){let a=it.get(s);return a||(a=Nl(s),it.set(s,a),me.set(a,s)),a}Vn(()=>{const s=Z.pool.value,a=s.length,w=Le.value;let I=w.length!==a;for(let R=0;R<a;R++){const k=ct(s[R]);w[R]!==k&&(w[R]=k,I=!0)}w.length!==a&&(w.length=a,I=!0),I&&Pn(Le)});const _t=N(()=>Z.visiblePool.value.map(ct)),V=new WeakMap;function We(){y!=null&&(cancelAnimationFrame(y),T.delete(y),y=null)}function H(){We(),_=null}function st(){_==null||y!=null||(y=C(()=>{y=null,x()}))}function Ue(){const s=G.value;if(!s)return null;const a=s.getBoundingClientRect();let w=null;for(const[I,R]of ze.entries()){if(!R.active||getComputedStyle(I).visibility==="hidden")continue;const k=I.getBoundingClientRect();if(k.bottom<=a.top||k.top>=a.bottom)continue;const ee=Math.max(k.top,a.top)-a.top;(!w||ee<w.score)&&(w={key:R.id,offset:k.top-a.top,score:ee})}return w}function qe(s){const a=G.value;if(!a){H();return}const w=a.scrollTop,I=Math.min(Z.findItemIndex(w),s.length-1),R=s[I];if(R==null){H();return}const k=Ue();_={logicalKey:R,logicalOffset:w-Z.getItemOffset(I),pendingKeys:new Set,stableFrames:0,visualKey:k?.key??null,visualOffset:k?.offset??0}}function d(s){const a=G.value;return!a||Math.abs(a.scrollTop-s)<.5?!1:(g=!0,a.scrollTop=s,Z.updateVisibleItems(!0),a.dispatchEvent(new Event("scroll")),C(()=>{g=!1}),!0)}function x(){const s=_,a=G.value;if(!s||!a)return;const w=P.value.findIndex(k=>k.id===s.logicalKey);if(w===-1){H();return}let I=!1;if(I=d(Z.getItemOffset(w)+s.logicalOffset)||I,!I&&s.visualKey!=null)for(const[k,ee]of ze.entries()){if(!ee.active||ee.id!==s.visualKey||getComputedStyle(k).visibility==="hidden")continue;const Be=k.getBoundingClientRect().top-a.getBoundingClientRect().top-s.visualOffset;I=d(a.scrollTop+Be)||I;break}let R=!0;for(const k of s.pendingKeys)if(!(typeof M.sizes[k]=="number"&&M.sizes[k]>0)){R=!1;break}if(!I&&R){if(s.stableFrames++,s.stableFrames>=2){H();return}}else s.stableFrames=0;st()}function b(s,a,w,I){const R=dl(),k=Bt(a),ee=Kt({...w}),Be=Kt({onResize:w.onResize}),_e=Bt(s),Ze=R.run(()=>(Q(()=>Un(k.value,ee,S().keyField,M.simpleArray,M.active,me),()=>{const Oe=_e.value;if(Oe){const lt=Un(k.value,ee,S().keyField,M.simpleArray,M.active,me),xe=lt.id;xe!=null&&ze.set(Oe,{active:lt.active,id:xe})}},{immediate:!0}),Q(()=>Ul(k.value,q.value,S().flowMode??!1,me),()=>{const Oe=_e.value;Oe&&Ln(Oe,k.value,q.value,S().disableTransform??!1,S().flowMode??!1,I,me)},{immediate:!0}),Ri(ee,_e,Se,Be)));Ze.mount(),V.set(s,{binding:k,scope:R,options:ee,callbacks:Be,el:_e,controller:Ze,restoreStyles:I})}const E={mounted(s,a){if(!L.value)return;const w=Nn(s);b(s,a.value,qn(a.value,me),w)},updated(s,a){if(!L.value)return;const w=V.get(s),I=qn(a.value,me);if(!w){const k=Nn(s);b(s,a.value,I,k);return}const R=w.binding.value!==a.value;R&&(w.binding.value=a.value),ql(w.options,I),jl(w.callbacks,I),w.el.value!==s&&(w.el.value=s),R&&Ln(s,a.value,q.value,S().disableTransform??!1,S().flowMode??!1,w.restoreStyles,me)},unmounted(s){const a=V.get(s);a&&(a.controller.unmount(),a.scope.stop(),Ei(s,a.restoreStyles),ze.delete(s),V.delete(s))}};function $(s=!1){L.value&&((s||Y.value)&&(M.sizes={}),o.emit("vscroll:update",{force:!0}))}function re(s,a){Z.scrollToItem(s,a)}function Pe(s){const a=S();return M.sizes=cn(s,D.value,Y.value?null:a.keyField),Z.restoreCache(s)}function Ee(s,a){const w=S(),I=a??D.value.indexOf(s),R=Y.value?I:hn(s,I>=0?I:a,w.keyField);return M.sizes[R]||0}function je(){if(!L.value)return;const s=G.value;s&&(c||(c=!0,Ae(()=>{s.scrollTop=s.scrollHeight+5e3;const a=()=>{s.scrollTop=s.scrollHeight+5e3,C(()=>{s.scrollTop=s.scrollHeight+5e3,n===0?c=!1:C(a)})};C(a)})))}function Xe(){_&&!g&&H()}return Q(()=>D.value.slice(),(s,a)=>{if(!L.value)return;const w=S(),I=Y.value?null:w.keyField,R=pt(s,I);if(w.shift){const k=a?pt(a,I):v,ee=bi(k,R);ee>0?(qe(k),_&&(_.pendingKeys=new Set(R.slice(0,ee)),_.stableFrames=0,Ae(()=>{_&&x()}))):H()}else H();v=R,$()},{flush:"sync"}),Q(()=>S().cache,s=>{L.value&&s&&Pe(s)}),Q(()=>S().keyField,s=>{L.value&&(M.keyField=s,v=pt(D.value,Y.value?null:s),H(),$(!0))},{flush:"sync"}),Q(Y,s=>{M.simpleArray=s},{immediate:!0}),Q(()=>S().direction,()=>{L.value&&(H(),$(!0))}),Q(G,(s,a)=>{a?.removeEventListener("scroll",Xe),L.value&&s?.addEventListener("scroll",Xe)},{immediate:!0}),Q(L,s=>{const a=G.value;s?(a?.addEventListener("scroll",Xe),$()):(a?.removeEventListener("scroll",Xe),We(),W(),H())}),Q(p,()=>{if(!L.value)return;const s=G.value;if(!s)return;if(_){x();return}const a=h;if(h=null,!a)return;const w=P.value.findIndex(R=>R.id===a.key);if(w===-1)return;const I=Z.getItemOffset(w)+a.offset;I-s.scrollTop!==0&&(s.scrollTop=I)},{flush:"post"}),vi(()=>{M.active=!0}),ml(()=>{M.active=!1}),ol(()=>{var s;We(),W(),(s=G.value)==null||s.removeEventListener("scroll",Xe),o.clear()}),{vscrollData:M,itemsWithSize:P,resizeObserver:m,measurementContext:Se,vDynamicScrollerItem:E,...Z,pool:Le,visiblePool:_t,simpleArray:Y,forceUpdate:$,scrollToItem:re,restoreCache:Pe,getItemSize:Ee,getViewStyle:Je,scrollToBottom:je,onScrollerResize:j,onScrollerVisible:Re}}var zn,Ql=ye((()=>{Ge(),Mi(),yn(),Ci(),zn=["position","top","left","transform","willChange","visibility","pointerEvents","display"]}));function Gl(e){return typeof e=="function"?{callback:e,observer:null,intersection:void 0,visible:null}:{callback:e.callback,observer:null,intersection:e.intersection,visible:null}}function jn(e,t){Bi(e);const n=Gl(t.value);if(Jt.set(e,n),typeof IntersectionObserver>"u"){const i=e.getBoundingClientRect();n.visible=!0,n.callback(!0,{boundingClientRect:i});return}n.observer=new IntersectionObserver(i=>{const o=i[0],c=!!(o!=null&&o.isIntersecting);n.visible!==null&&n.visible===c||(n.visible=c,n.callback(c,o))},n.intersection),n.observer.observe(e)}function Bi(e){const t=Jt.get(e);t!=null&&t.observer&&(t.observer.disconnect(),t.observer=null)}var Jt,Vi,Di,Yn,Kn,Pi,Jl=ye((()=>{Ge(),Jt=new WeakMap,Vi={mounted(e,t){jn(e,t)},updated(e,t){t.value!==t.oldValue&&jn(e,t)},unmounted(e){Bi(e),Jt.delete(e)}},Di=bt({__name:"ItemView",props:{view:{},itemTag:{}},setup(e){const t=e;return(n,i)=>(de(),mt(Vt(t.itemTag),{class:"vue-recycle-scroller__item-view"},{default:Qe(()=>[Me(n.$slots,"default",{item:t.view.item,index:t.view.nr.index,active:t.view.nr.used})]),_:3}))}}),Yn=bt({__name:"ResizeObserver",emits:["notify"],setup(e,{emit:t}){const n=t,i=he();let o=null,c=null;function m(){n("notify")}return Xt(()=>{var g;const v=(g=i.value)==null?void 0:g.parentElement;if(v){if(typeof ResizeObserver<"u"){o=new ResizeObserver(()=>{m()}),o.observe(v);return}c=()=>m(),window.addEventListener("resize",c)}}),Zt(()=>{o&&(o.disconnect(),o=null),c&&(window.removeEventListener("resize",c),c=null)}),(g,v)=>(de(),$e("div",{ref_key:"el",ref:i,class:"vue-recycle-scroller__resize-observer","aria-hidden":"true"},null,512))}}),Kn=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},Pi=Kn(Yn,[["__scopeId","data-v-08cc04ab"]])})),Oi,Xl=ye((()=>{Ge(),Mi(),Jl(),Oi=bt({__name:"RecycleScroller",props:{items:{},keyField:{default:"id"},direction:{default:"vertical"},listTag:{default:"div"},itemTag:{default:"div"},itemSize:{default:null},gridItems:{default:void 0},itemSecondarySize:{default:void 0},minItemSize:{default:null},sizeField:{default:"size"},typeField:{default:"type"},buffer:{default:200},pageMode:{type:Boolean,default:!1},scrollParent:{default:void 0},shift:{type:Boolean,default:!1},cache:{default:void 0},prerender:{default:0},emitUpdate:{type:Boolean,default:!1},disableTransform:{type:Boolean,default:!1},flowMode:{type:Boolean,default:!1},hiddenPosition:{default:void 0},updateInterval:{default:0},skipHover:{type:Boolean,default:!1},enabled:{type:Boolean,default:!0},listClass:{default:""},itemClass:{default:""}},emits:["resize","visible","hidden","update","scrollStart","scrollEnd"],setup(e,{expose:t,emit:n}){const i=e,o=n,c=Vi,m=he(),g=he(),v=he(),h=he(null),_=gi(i,"items"),{pool:y,visiblePool:T,totalSize:F,startSpacerSize:M,endSpacerSize:D,ready:q,scrollToItem:G,scrollToPosition:ie,getScroll:X,findItemIndex:ze,getItemOffset:S,getItemSize:L,getViewStyle:C,cacheSnapshot:W,restoreCache:be,updateVisibleItems:Se,handleResize:Y,handleVisibilityChange:p}=zi(N(()=>({items:_,el:m,before:g,after:v,keyField:i.keyField,direction:i.direction,itemSize:i.itemSize,gridItems:i.gridItems,itemSecondarySize:i.itemSecondarySize,minItemSize:i.minItemSize,sizeField:i.sizeField,typeField:i.typeField,buffer:i.buffer,pageMode:i.pageMode,scrollParent:i.scrollParent,shift:i.shift,cache:i.cache,prerender:i.prerender,emitUpdate:i.emitUpdate,disableTransform:i.disableTransform,flowMode:i.flowMode,hiddenPosition:i.hiddenPosition,updateInterval:i.updateInterval,enabled:i.enabled,onResize:()=>o("resize"),onVisible:()=>o("visible"),onHidden:()=>o("hidden"),onUpdate:(j,Re,Z,me)=>{o("update",j,Re,Z,me),Z<=0&&o("scrollStart"),me>=i.items.length-1&&o("scrollEnd")}}))),P=N(()=>Pt({direction:i.direction,disableTransform:i.disableTransform,flowMode:i.flowMode,gridItems:i.gridItems})==="flow"),le=N(()=>({height:`${M.value}px`})),ce=N(()=>({height:`${D.value}px`}));function nt(j){h.value=j}function Ve(){h.value=null}const De=N(()=>{const j={[i.direction==="vertical"?"minHeight":"minWidth"]:`${F.value}px`},Re=ot(i.itemSize);if(i.gridItems&&Re!=null){const Z=(i.itemSecondarySize||Re)*i.gridItems;j[i.direction==="vertical"?"minWidth":"minHeight"]=`${Z}px`}return j});return t({el:m,visiblePool:T,startSpacerSize:M,endSpacerSize:D,scrollToItem:G,scrollToPosition:ie,getScroll:X,findItemIndex:ze,getItemOffset:S,getItemSize:L,cacheSnapshot:W,restoreCache:be,updateVisibleItems:Se}),(j,Re)=>ul((de(),$e("div",{ref_key:"el",ref:m,class:Dt(["vue-recycle-scroller",{"grid-mode":i.gridItems,"flow-mode":P.value,ready:Ce(q),"page-mode":i.pageMode,[`direction-${i.direction}`]:!0}])},[j.$slots.before?(de(),$e("div",{key:0,ref_key:"before",ref:g,class:"vue-recycle-scroller__slot"},[Me(j.$slots,"before")],512)):Ne("",!0),(de(),mt(Vt(i.listTag),{style:Qt(De.value),class:Dt(["vue-recycle-scroller__item-wrapper",i.listClass])},{default:Qe(()=>[P.value&&Ce(M)>0?(de(),mt(Vt(i.itemTag),{key:0,"aria-hidden":"true",class:"vue-recycle-scroller__item-spacer",style:Qt(le.value)},null,8,["style"])):Ne("",!0),(de(!0),$e(pn,null,mn(Ce(y),Z=>(de(),mt(Di,un({key:Z.nr.id,view:Z,"item-tag":i.itemTag,style:Ce(q)?Ce(C)(Z):null,class:["vue-recycle-scroller__item-view",[i.itemClass,{hover:!i.skipHover&&h.value===Z.nr.key}]]},nl(i.skipHover?{}:{mouseenter:()=>{nt(Z.nr.key)},mouseleave:()=>{Ve()}})),{default:Qe(me=>[Me(j.$slots,"default",un({ref_for:!0},me))]),_:2},1040,["view","item-tag","style","class"]))),128)),P.value&&Ce(D)>0?(de(),mt(Vt(i.itemTag),{key:1,"aria-hidden":"true",class:"vue-recycle-scroller__item-spacer",style:Qt(ce.value)},null,8,["style"])):Ne("",!0),i.items.length===0?Me(j.$slots,"empty",{key:2}):Ne("",!0)]),_:3},8,["style","class"])),j.$slots.after?(de(),$e("div",{key:1,ref_key:"after",ref:v,class:"vue-recycle-scroller__slot"},[Me(j.$slots,"after")],512)):Ne("",!0),mi(Pi,{onNotify:Ce(Y)},null,8,["onNotify"])],2)),[[Ce(c),Ce(p)]])}})})),Hi,Zl=ye((()=>{Ge(),Ql(),Xl(),Hi=bt({inheritAttrs:!1,__name:"DynamicScroller",props:{items:{},keyField:{default:"id"},direction:{default:"vertical"},listTag:{default:"div"},itemTag:{default:"div"},minItemSize:{},shift:{type:Boolean,default:!1},cache:{default:void 0},disableTransform:{type:Boolean,default:!1},flowMode:{type:Boolean,default:!1},hiddenPosition:{default:void 0},enabled:{type:Boolean,default:!0},pageMode:{type:Boolean,default:!1},scrollParent:{default:void 0}},emits:["resize","visible"],setup(e,{expose:t,emit:n}){const i=e,o=n,c=he(),m=gi(i,"items"),g=N(()=>{var C;const W=(C=c.value)==null?void 0:C.el;return W&&typeof W=="object"&&"value"in W?W.value:W}),{itemsWithSize:v,forceUpdate:h,startSpacerSize:_,endSpacerSize:y,scrollToItem:T,scrollToPosition:F,findItemIndex:M,getItemOffset:D,getItemSize:q,cacheSnapshot:G,restoreCache:ie,scrollToBottom:X,onScrollerResize:ze,onScrollerVisible:S}=Kl(N(()=>({items:m,keyField:i.keyField,direction:i.direction,minItemSize:i.minItemSize,shift:i.shift,cache:i.cache,flowMode:i.flowMode,hiddenPosition:i.hiddenPosition,enabled:i.enabled,pageMode:i.pageMode,scrollParent:i.scrollParent,el:g.value,onResize:()=>o("resize"),onVisible:()=>o("visible")})));function L(C,W,be){return{item:C.item,index:W,active:be,itemWithSize:C}}return t({startSpacerSize:_,endSpacerSize:y,scrollToItem:T,scrollToPosition:F,findItemIndex:M,getItemOffset:D,scrollToBottom:X,getItemSize:q,cacheSnapshot:G,restoreCache:ie,forceUpdate:h}),(C,W)=>(de(),mt(Oi,un({ref_key:"scroller",ref:c,items:Ce(v),"min-item-size":i.minItemSize,direction:i.direction,cache:i.cache,"disable-transform":i.disableTransform,"flow-mode":i.flowMode,"hidden-position":i.hiddenPosition,enabled:i.enabled,"page-mode":i.pageMode,"scroll-parent":i.scrollParent,"key-field":"id","list-tag":i.listTag,"item-tag":i.itemTag},C.$attrs,{onResize:Ce(ze),onVisible:Ce(S)}),rl({default:Qe(({item:be,index:Se,active:Y})=>[Me(C.$slots,"default",al(cl(L(be,Se,Y))))]),empty:Qe(()=>[Me(C.$slots,"empty")]),_:2},[C.$slots.before?{name:"before",fn:Qe(()=>[Me(C.$slots,"before")]),key:"0"}:void 0,C.$slots.after?{name:"after",fn:Qe(()=>[Me(C.$slots,"after")]),key:"1"}:void 0]),1040,["items","min-item-size","direction","cache","disable-transform","flow-mode","hidden-position","enabled","page-mode","scroll-parent","list-tag","item-tag","onResize","onVisible"]))}})}));function er(e,t,n){const i=Bn("vscrollMeasurementContext"),o=Bn("vscrollAnchorRegistry",null),c=N(()=>{const T=U(e).el;return U(t??T)}),m={onResize:T=>{var F;return(F=n?.onResize??U(e).onResize)==null?void 0:F(T)}},g=N(()=>U(U(e).enabled??!0)),v=Ri(e,c,i,m);let h=!1;function _(){h||(v.mount(),h=!0)}function y(){h&&(v.unmount(),h=!1)}return Xt(()=>{g.value&&_()}),Q(g,T=>{if(T)_();else{const F=c.value;o&&F&&o.delete(F),y()}}),o&&Q([v.id,v.finalActive,c,g],([T,F,M,D],[q,G,ie])=>{ie&&ie!==M&&o.delete(ie),D&&M&&o.set(M,{active:F,id:T})},{immediate:!0}),Zt(()=>{const T=c.value;o&&T&&o.delete(T),y()}),{id:v.id,size:v.size,finalActive:v.finalActive,updateSize:v.updateSize}}var tr=ye((()=>{Ge(),Ci()})),Ai,nr=ye((()=>{Ge(),tr(),Ai=bt({__name:"DynamicScrollerItem",props:{item:{},watchData:{type:Boolean,default:!1},active:{type:Boolean},index:{default:void 0},sizeDependencies:{default:null},emitResize:{type:Boolean,default:!1},enabled:{type:Boolean,default:!0},tag:{default:"div"}},emits:["resize"],setup(e,{emit:t}){const n=e,i=t,o=he();return er(n,o,{onResize:c=>i("resize",c)}),(c,m)=>(de(),mt(Vt(n.tag),{ref_key:"el",ref:o},{default:Qe(()=>[Me(c.$slots,"default")]),_:3},512))}})})),ir=ye((()=>{Zl(),nr()})),lr=ye((()=>{})),Qn,Gn,Ni,Jn=ye((()=>{Ge(),ir(),lr(),Qn=["data-virtual-index","data-message-id"],Gn={key:2,class:"virtual-message-list-empty"},Ni=bt({__name:"VirtualMessageList",props:{messages:{},virtualized:{type:Boolean,default:!0},estimatedItemHeight:{default:180},overscan:{default:8},rowGap:{default:16},padding:{default:"20px"},topThreshold:{default:120}},emits:["scroll","topReach"],setup(e,{expose:t,emit:n}){const i=e,o=n,c=he(null),m=he(null),g=he(null),v=he(0),h=he(0);let _=0,y=null,T=0,F=0,M=0,D=!1,q=null,G=0,ie=null,X=null;const ze=N(()=>i.messages.map(L)),S=N(()=>Math.max(i.estimatedItemHeight,i.estimatedItemHeight*i.overscan));function L(d){return String(d.id)}function C(){return c.value?.querySelector(".virtual-message-list")??null}function W(){const d=C();d&&(v.value=d.scrollTop,h.value=d.clientHeight)}function be(d=120){M=Date.now()+d}function Se(){return Date.now()<M}function Y(){_=0,y!=null&&(cancelAnimationFrame(y),y=null),T=0,F=0}function p(){const d=v.value;W(),v.value-d<-1?(D=!0,Y()):Se()||(ce(32)&&(D=!1),(D||!ce(96))&&Y()),o("scroll"),v.value<=i.topThreshold&&o("topReach")}function P(d){d.deltaY<-1&&(D=!0,Y())}function le(){W(),(!D||Date.now()<_||ce(64))&&j(2),ie&&Le(ie.token,4)}function ce(d=200){const x=C();return x?x.scrollHeight-x.scrollTop-x.clientHeight<d:!0}function nt(d=200){return!D&&ce(d)}function Ve(d={}){const x=typeof d=="number"?d:d.frames??2,b=typeof d=="number"?400:d.keepAliveMs??400;D=!1,_=Date.now()+b,Ae(()=>{j(x)})}function De(){const d=C();return be(),i.virtualized&&g.value?.scrollToBottom(),d?(d.scrollTop=Math.max(0,d.scrollHeight-d.clientHeight),W(),!0):!1}function j(d=1){if(T=Math.max(T,d),y!=null)return;const x=()=>{if(De()?(F=0,T-=1):F+=1,T<=0){y=null,T=0,F=0;return}if(F>30){y=null,T=0,F=0;return}y=requestAnimationFrame(x)};y=requestAnimationFrame(x)}function Re(d,x){const b=C();if(!b)return null;const E=document.getElementById(x);if(E instanceof HTMLElement&&b.contains(E))return E;const $=document.getElementById(`message-${d}`);return $ instanceof HTMLElement&&b.contains($)?$:null}function Z(d,x){const b=C();if(!b)return;const E=b.getBoundingClientRect(),$=d.getBoundingClientRect(),re=x==="center"?$.top+$.height/2-(E.top+E.height/2):$.top-E.top-24;Math.abs(re)>1&&(be(),b.scrollTop=Math.max(0,b.scrollTop+re)),W()}function me(d){return C()?.querySelector(`.virtual-row[data-virtual-index="${d}"]`)??null}function it(d,x){if(be(),i.virtualized){g.value?.scrollToItem(d,x),W();return}const b=C(),E=me(d);if(!b||!E){W();return}const $=E.getBoundingClientRect(),re=b.getBoundingClientRect(),Pe=x?.align??"start",Ee=x?.offset??0,je=Pe==="center"?$.top+$.height/2-(re.top+re.height/2):$.top-re.top+Ee;b.scrollTop=Math.max(0,b.scrollTop+je),W()}function Le(d,x=1){q!=null&&cancelAnimationFrame(q);const b=E=>{const $=ie;if(!$||$.token!==d){q=null;return}const re=Re($.messageId,$.anchorId);if(re?Z(re,$.align):it($.index,{align:$.align,offset:$.align==="start"?-24:0}),E<=1){q=null,ie=null;return}q=requestAnimationFrame(()=>b(E-1))};q=requestAnimationFrame(()=>b(x))}function Je(){G+=1,ie=null,q!=null&&(cancelAnimationFrame(q),q=null)}function ct(d){const x=i.messages.findIndex(E=>String(E.id)===d);if(x<0)return;Je();const b=G;ie={token:b,index:x,messageId:d,anchorId:`message-${d}`,align:"center"},Ae(()=>{it(x,{align:"center"}),Le(b,8)})}function _t(d,x){const b=i.messages.findIndex($=>String($.id)===d);if(b<0)return;Je();const E=G;ie={token:E,index:b,messageId:d,anchorId:x,align:"start"},Ae(()=>{it(b,{align:"start",offset:-24}),Le(E,10)})}function V(){const d=C();return d?{scrollTop:d.scrollTop,scrollHeight:d.scrollHeight}:null}function We(d){d&&Ae(()=>{const x=C();if(!x)return;const b=Math.max(0,x.scrollHeight-d.scrollHeight+d.scrollTop);be(),i.virtualized&&g.value?.scrollToPosition(b),x.scrollTop=b,W()})}function H(d){const x=d.getBoundingClientRect(),b=x.bottom||x.top+d.clientHeight;let E=null;for(const $ of d.querySelectorAll(".virtual-row[data-virtual-index]")){const re=$.getBoundingClientRect();if(re.bottom<=x.top||re.top>=b)continue;const Pe=Number($.dataset.virtualIndex),Ee=Number.isInteger(Pe)?i.messages[Pe]:null,je=$.dataset.messageId||(Ee?L(Ee):"");je&&(!E||re.top<E.top)&&(E={messageId:je,offset:re.top-x.top,top:re.top})}return E?{messageId:E.messageId,offset:E.offset}:null}function st(){const d=C();if(!d)return null;const x=H(d);return{anchorMessageId:x?.messageId||null,anchorOffset:x?.offset||0,scrollTop:d.scrollTop,scrollHeight:d.scrollHeight,clientHeight:d.clientHeight,wasNearBottom:ce(64)}}function Ue(d,x=4){if(!d)return!1;X!=null&&(cancelAnimationFrame(X),X=null);const b=d.anchorMessageId,E=b?i.messages.findIndex(re=>L(re)===b):-1;if(!b||E<0)return Ve(),!1;Y(),Je(),D=!d.wasNearBottom;const $=Number.isFinite(d.anchorOffset)?d.anchorOffset:0;return Ae(()=>{let re=x;const Pe=()=>{const Ee=C();if(!Ee){X=null;return}const je=i.messages.findIndex(s=>L(s)===b);if(je<0){X=null,Ve();return}const Xe=me(je);if(Xe){const s=Ee.getBoundingClientRect(),a=Xe.getBoundingClientRect(),w=Math.max(0,Ee.scrollHeight-Ee.clientHeight),I=a.top-s.top-$,R=Math.min(w,Math.max(0,Ee.scrollTop+I));be(),i.virtualized&&g.value?.scrollToPosition(R),Ee.scrollTop=R,W()}else it(je,{align:"start",offset:-$});if(re-=1,re<=0){X=null;return}X=requestAnimationFrame(Pe)};X=requestAnimationFrame(Pe)}),!0}let qe=null;return Xt(()=>{Ae(()=>{W();const d=C();if(d&&typeof ResizeObserver<"u"){qe=new ResizeObserver(le),qe.observe(d);const x=m.value??d.querySelector(".vue-recycle-scroller__item-wrapper");x&&qe.observe(x)}})}),Zt(()=>{Y(),q!=null&&cancelAnimationFrame(q),X!=null&&cancelAnimationFrame(X),qe?.disconnect()}),Q(ze,()=>{Je(),Ae(W)}),t({isNearBottom:ce,shouldAutoFollowBottom:nt,scrollToBottom:Ve,scrollToMessage:ct,scrollToAnchor:_t,captureScrollPosition:V,restoreScrollPosition:We,captureViewportPosition:st,restoreViewportPosition:Ue}),(d,x)=>(de(),$e("div",{ref_key:"hostRef",ref:c,class:"virtual-message-list-host",style:Qt({"--virtual-row-gap":`${e.rowGap}px`,"--virtual-list-padding":e.padding})},[e.virtualized?(de(),mt(Ce(Hi),{key:0,ref_key:"scrollerRef",ref:g,class:"virtual-message-list",items:e.messages,"key-field":"id","min-item-size":e.estimatedItemHeight,buffer:S.value,"flow-mode":!0,prerender:e.overscan,onScrollPassive:p,onWheelPassive:P,onResize:le,onVisible:W},{before:Qe(()=>[e.messages.length>0?Me(d.$slots,"before",{key:0},void 0,!0):Ne("",!0)]),default:Qe(({item:b,index:E,active:$})=>[mi(Ce(Ai),{item:b,index:E,active:$,class:"virtual-row","data-virtual-index":E,"data-message-id":L(b)},{default:Qe(()=>[$?Me(d.$slots,"item",{key:0,message:b},void 0,!0):Ne("",!0)]),_:2},1032,["item","index","active","data-virtual-index","data-message-id"])]),after:Qe(()=>[e.messages.length>0?Me(d.$slots,"after",{key:0},void 0,!0):Ne("",!0)]),_:3},8,["items","min-item-size","buffer","prerender"])):(de(),$e("div",{key:1,class:"virtual-message-list",onScrollPassive:p,onWheelPassive:P},[He("div",{ref_key:"contentRef",ref:m,class:"virtual-message-list-content"},[e.messages.length>0?Me(d.$slots,"before",{key:0},void 0,!0):Ne("",!0),(de(!0),$e(pn,null,mn(e.messages,(b,E)=>(de(),$e("div",{key:L(b),class:"virtual-row","data-virtual-index":E,"data-message-id":L(b)},[Me(d.$slots,"item",{message:b},void 0,!0)],8,Qn))),128)),e.messages.length>0?Me(d.$slots,"after",{key:1},void 0,!0):Ne("",!0)],512)],32)),e.messages.length===0&&d.$slots.empty?(de(),$e("div",Gn,[Me(d.$slots,"empty",{},void 0,!0)])):Ne("",!0)],4))}})})),rr=ye((()=>{})),or,yr=ye((()=>{Jn(),Jn(),rr(),pi(),or=hi(Ni,[["__scopeId","data-v-963e6375"]])})),Xn,Zn,ei,ti,ni,ii,li,ri,oi,si,ai,ui,ci,di,Li,fi=ye((()=>{Ge(),il(),Xn={class:"tool-change-card"},Zn=["aria-expanded"],ei={class:"tool-change-card-title"},ti={key:0,class:"tool-change-card-file-count"},ni={class:"tool-change-card-stats"},ii={class:"additions"},li={class:"deletions"},ri={key:0,class:"tool-change-files"},oi=["onClick"],si={class:"tool-change-file-main"},ai=["title"],ui={class:"tool-change-file-stats"},ci={class:"additions"},di={class:"deletions"},Li=bt({__name:"ToolChangeCard",props:{files:{},filesChanged:{default:0},additions:{default:0},deletions:{default:0},expanded:{type:Boolean,default:!1},selectedFileId:{default:null},title:{default:""}},emits:["toggle","select"],setup(e,{emit:t}){const n=e,i=t,{t:o}=ll();function c(v){return v.split(/[\\/]/).filter(Boolean).pop()||v}function m(v){const h=c(v),_=h.lastIndexOf(".");if(_>=0)return h.slice(_+1).toLowerCase();const y=h.toLowerCase();return y==="dockerfile"?"docker":y==="makefile"?"make":"file"}function g(v){const h=m(v);return["js","ts","jsx","tsx"].includes(h)?"script":["py","rb","php"].includes(h)?"dynamic":["java","kt","scala"].includes(h)?"jvm":["rs","go","c","cc","cpp","h","hpp"].includes(h)?"systems":["html","vue"].includes(h)?"markup":["css","scss","sass","less"].includes(h)?"style":["json","yaml","yml","toml","xml"].includes(h)?"data":["md","mdx","txt"].includes(h)?"doc":["sh","bash","zsh","fish","docker","make"].includes(h)?"shell":"default"}return(v,h)=>(de(),$e("div",Xn,[He("button",{class:"tool-change-card-header",type:"button","aria-expanded":n.expanded,onClick:h[0]||(h[0]=_=>i("toggle"))},[(de(),$e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:Dt(["tool-change-chevron",{rotated:n.expanded}])},[...h[1]||(h[1]=[He("polyline",{points:"9 18 15 12 9 6"},null,-1)])],2)),He("span",ei,ft(n.title||Ce(o)("chat.changedFiles",{files:n.filesChanged||n.files.length})),1),n.title?(de(),$e("span",ti,ft(Ce(o)("chat.changedFiles",{files:n.filesChanged||n.files.length})),1)):Ne("",!0),He("span",ni,[He("span",ii,"+"+ft(n.additions),1),He("span",li,"-"+ft(n.deletions),1)])],8,Zn),n.expanded?(de(),$e("div",ri,[(de(!0),$e(pn,null,mn(n.files,_=>(de(),$e("button",{key:_.id,class:Dt(["tool-change-file-row",{selected:n.selectedFileId===_.id}]),type:"button",onClick:y=>i("select",_)},[He("span",si,[He("span",{class:Dt(["tool-change-file-badge",g(_.path)])},ft(m(_.path)),3),He("span",{class:"tool-change-file-name",title:_.path},ft(c(_.path)),9,ai)]),He("span",ui,[He("span",ci,"+"+ft(_.additions),1),He("span",di,"-"+ft(_.deletions),1)])],10,oi))),128))])):Ne("",!0)]))}})})),sr=ye((()=>{})),ar,br=ye((()=>{fi(),fi(),sr(),pi(),ar=hi(Li,[["__scopeId","data-v-d7444617"]])}));function ur(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function _r(e,t={}){const n=e instanceof Date?e:new Date(e);if(Number.isNaN(n.getTime()))return"";const i=t.now||new Date,o=t.locale,c={hour:"2-digit",minute:"2-digit"};if(ur(n,i))return n.toLocaleTimeString(o,c);const m=n.getFullYear()===i.getFullYear()?{month:"2-digit",day:"2-digit",...c}:{year:"numeric",month:"2-digit",day:"2-digit",...c};return n.toLocaleString(o,m)}var wr=ye((()=>{}));export{or as a,gr as c,br as i,pr as l,wr as n,yr as o,ar as r,hr as s,_r as t,hl as u};
@@ -1 +1 @@
1
- import{wa as x}from"./index-DnjQJzX4.js";import{Bt as n,Ht as m,Vt as _}from"./src-BihFroE7.js";import{c as B,j as V}from"./chunk-CSCIHK7Q-5LH118bT.js";var d,s,c,f=x((()=>{V(),_(),d=n((t,i,e,r)=>{t.attr("class",e);const{width:o,height:a,x:u,y:w}=s(t,i);B(t,a,o,r);const h=c(u,w,o,a,i);t.attr("viewBox",h),m.debug(`viewBox configured: ${h} with padding: ${i}`)},"setupViewPortForSVG"),s=n((t,i)=>{const e=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:e.width+i*2,height:e.height+i*2,x:e.x,y:e.y}},"calculateDimensionsWithPadding"),c=n((t,i,e,r,o)=>`${t-o} ${i-o} ${e} ${r}`,"createViewBox")}));export{d as n,f as t};
1
+ import{wa as x}from"./index-DN4SafrP.js";import{Bt as n,Ht as m,Vt as _}from"./src-DD_TpJde.js";import{c as B,j as V}from"./chunk-CSCIHK7Q-CLgoBoCF.js";var d,s,c,f=x((()=>{V(),_(),d=n((t,i,e,r)=>{t.attr("class",e);const{width:o,height:a,x:u,y:w}=s(t,i);B(t,a,o,r);const h=c(u,w,o,a,i);t.attr("viewBox",h),m.debug(`viewBox configured: ${h} with padding: ${i}`)},"setupViewPortForSVG"),s=n((t,i)=>{const e=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:e.width+i*2,height:e.height+i*2,x:e.x,y:e.y}},"calculateDimensionsWithPadding"),c=n((t,i,e,r,o)=>`${t-o} ${i-o} ${e} ${r}`,"createViewBox")}));export{d as n,f as t};
@@ -1,4 +1,4 @@
1
- import{wa as ja}from"./index-DnjQJzX4.js";import{Bt as $,Ht as F,Vt as Ga,jt as U,t as Fa}from"./src-BihFroE7.js";import{A as qa,B as is,N as ls,T as et,V as Pa,b as Bt,g as bt,j as Va,x as J}from"./chunk-CSCIHK7Q-5LH118bT.js";import{a as Rt,d as za,r as Ht,u as K}from"./chunk-5ZQYHXKU-yj9xqmex.js";import{i as Za,n as yt,r as It}from"./chunk-O5CBEL6O-DIDAOkT_.js";import{n as rs,r as Ja,t as Qa}from"./chunk-L5ZTLDWV-FN_zFWkp.js";import{a as E,i as Ua,n as Ka,o as I,t as Lt}from"./chunk-NZK2D7GU-0mKZmkuV.js";import{n as te,t as H}from"./rough.esm-Dyx_2DON.js";function j(u){const t=u.map((g,h)=>`${h===0?"M":"L"}${g.x},${g.y}`);return t.push("Z"),t.join(" ")}function pt(u,t,g,h,r,l){const f=[],n=g-u,e=h-t,s=n/l,a=2*Math.PI/s,o=t+e/2;for(let c=0;c<=50;c++){const y=u+c/50*n,p=o+r*Math.sin(a*(y-u));f.push({x:y,y:p})}return f}function Nt(u,t,g,h,r,l){const f=[],i=r*Math.PI/180,n=(l*Math.PI/180-i)/(h-1);for(let e=0;e<h;e++){const s=i+e*n,a=u+g*Math.cos(s),o=t+g*Math.sin(s);f.push({x:-a,y:-o})}return f}function _t(u){const t=Array.from(u.childNodes).filter(n=>n.tagName==="path"),g=document.createElementNS("http://www.w3.org/2000/svg","path"),h=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");g.setAttribute("d",h);const r=t.find(n=>n.getAttribute("fill")!=="none"),l=t.find(n=>n.getAttribute("stroke")!=="none"),f=$((n,e)=>n?.getAttribute(e)??void 0,"getAttr");if(r){const n={fill:f(r,"fill"),"fill-opacity":f(r,"fill-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&g.setAttribute(e,s)})}if(l){const n={stroke:f(l,"stroke"),"stroke-width":f(l,"stroke-width")??"1","stroke-opacity":f(l,"stroke-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&g.setAttribute(e,s)})}const i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(g),i}function ns(u,t){return u.intersect(t)}function cs(u,t,g,h){var r=u.x,l=u.y,f=r-h.x,i=l-h.y,n=Math.sqrt(t*t*i*i+g*g*f*f),e=Math.abs(t*g*f/n);h.x<r&&(e=-e);var s=Math.abs(t*g*i/n);return h.y<l&&(s=-s),{x:r+e,y:l+s}}function os(u,t,g){return Gt(u,t,t,g)}function hs(u,t,g,h){{const r=t.y-u.y,l=u.x-t.x,f=t.x*u.y-u.x*t.y,i=r*g.x+l*g.y+f,n=r*h.x+l*h.y+f,e=1e-6;if(i!==0&&n!==0&&Xt(i,n))return;const s=h.y-g.y,a=g.x-h.x,o=h.x*g.y-g.x*h.y,c=s*u.x+a*u.y+o,y=s*t.x+a*t.y+o;if(Math.abs(c)<e&&Math.abs(y)<e&&Xt(c,y))return;const p=r*a-s*l;if(p===0)return;const d=Math.abs(p/2);let w=l*o-a*f;const m=w<0?(w-d)/p:(w+d)/p;return w=s*f-r*o,{x:m,y:w<0?(w-d)/p:(w+d)/p}}}function Xt(u,t){return u*t>0}function gs(u,t,g){let h=u.x,r=u.y,l=[],f=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(s){f=Math.min(f,s.x),i=Math.min(i,s.y)}):(f=Math.min(f,t.x),i=Math.min(i,t.y));let n=h-u.width/2-f,e=r-u.height/2-i;for(let s=0;s<t.length;s++){let a=t[s],o=t[s<t.length-1?s+1:0],c=Na(u,g,{x:n+a.x,y:e+a.y},{x:n+o.x,y:e+o.y});c&&l.push(c)}return l.length?(l.length>1&&l.sort(function(s,a){let o=s.x-g.x,c=s.y-g.y,y=Math.sqrt(o*o+c*c),p=a.x-g.x,d=a.y-g.y,w=Math.sqrt(p*p+d*d);return y<w?-1:y===w?0:1}),l[0]):u}function fs(u,t){const{labelStyles:g}=E(t);t.labelStyle=g;const h=_(t);let r=h;h||(r="anchor");const l=u.insert("g").attr("class",r).attr("id",t.domId||t.id),f=1,{cssStyles:i}=t,n=H.svg(l),e=I(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);const s=n.circle(0,0,f*2,e),a=l.insert(()=>s,":first-child");return a.attr("class","anchor").attr("style",K(i)),L(t,a),t.intersect=function(o){return F.info("Circle intersect",t,f,o),N.circle(t,f,o)},l}function Yt(u,t,g,h,r,l,f){const n=(u+g)/2,e=(t+h)/2,s=Math.atan2(h-t,g-u),a=(g-u)/2,o=(h-t)/2,c=a/r,y=o/l,p=Math.sqrt(c**2+y**2);if(p>1)throw new Error("The given radii are too small to create an arc between the points.");const d=Math.sqrt(1-p**2),w=n+d*l*Math.sin(s)*(f?-1:1),m=e-d*r*Math.cos(s)*(f?-1:1),x=Math.atan2((t-m)/l,(u-w)/r);let S=Math.atan2((h-m)/l,(g-w)/r)-x;f&&S<0&&(S+=2*Math.PI),!f&&S>0&&(S-=2*Math.PI);const b=[];for(let P=0;P<20;P++){const k=x+P/19*S,v=w+r*Math.cos(k),B=m+l*Math.sin(k);b.push({x:v,y:B})}return b}function Da(u,t,g){const[h,r]=[t,g].sort((l,f)=>f-l);return r*(1-Math.sqrt(1-(u/h/2)**2))}async function ys(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?16:r,f=t.look==="neo"?12:r,i=$(v=>v+f,"calcTotalHeight"),n=$(v=>{const B=v/2;return[B/(2.5+v/50),B]},"calcEllipseRadius"),{shapeSvg:e,bbox:s}=await Y(u,t,_(t)),a=i(t?.height?t?.height:s.height),[o,c]=n(a),y=Da(a,o,c),p=(t?.width?t?.width:s.width)+l*2+y-y,d=a,{cssStyles:w}=t,m=[{x:p/2,y:-d/2},{x:-p/2,y:-d/2},...Yt(-p/2,-d/2,-p/2,d/2,o,c,!1),{x:p/2,y:d/2},...Yt(p/2,d/2,p/2,-d/2,o,c,!0)],x=H.svg(e),S=I(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const b=j(m),P=x.path(b,S),k=e.insert(()=>P,":first-child");return k.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",w),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),k.attr("transform",`translate(${o/2}, 0)`),L(t,k),t.intersect=function(v){return N.polygon(t,m,v)},e}function ot(u,t,g,h){return u.insert("polygon",":first-child").attr("points",h.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+g/2+")")}async function ps(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?28:r,f=t.look==="neo"?24:r,{shapeSvg:i,bbox:n}=await Y(u,t,_(t)),e=(t?.width??n.width)+(t.look==="neo"?l*2:l+Pt),s=(t?.height??n.height)+(t.look==="neo"?f*2:f),a=0,o=e,c=-s,y=0,p=[{x:a+Pt,y:c},{x:o,y:c},{x:o,y},{x:a,y},{x:a,y:c+Pt},{x:a+Pt,y:c}];let d;const{cssStyles:w}=t;if(t.look==="handDrawn"){const m=H.svg(i),x=I(t,{}),S=j(p),b=m.path(S,x);d=i.insert(()=>b,":first-child").attr("transform",`translate(${-e/2}, ${s/2})`),w&&d.attr("style",w)}else d=ot(i,e,s,p);return h&&d.attr("style",h),L(t,d),t.intersect=function(m){return N.polygon(t,p,m)},i}function us(u,t){const{nodeStyles:g}=E(t);t.label="";const h=u.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),{cssStyles:r}=t,l=Math.max(28,t.width??0),f=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],i=H.svg(h),n=I(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");const e=j(f),s=i.path(e,n),a=h.insert(()=>s,":first-child");return r&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",r),g&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",g),t.width=28,t.height=28,t.intersect=function(o){return N.polygon(t,f,o)},h}async function Ot(u,t,g){const{labelStyles:h,nodeStyles:r}=E(t);t.labelStyle=h;const{shapeSvg:l,bbox:f,halfPadding:i}=await Y(u,t,_(t)),n=16,e=g?.padding??i,s=t.look==="neo"?f.width/2+n*2:f.width/2+e;let a;const{cssStyles:o}=t;if(t.look==="handDrawn"){const c=H.svg(l),y=I(t,{}),p=c.circle(0,0,s*2,y);a=l.insert(()=>p,":first-child"),a.attr("class","basic label-container").attr("style",K(o))}else a=l.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",s).attr("cx",0).attr("cy",0);return L(t,a),t.calcIntersect=function(c,y){const p=c.width/2;return N.circle(c,p,y)},t.intersect=function(c){return F.info("Circle intersect",t,s,c),N.circle(t,s,c)},l}function Ba(u){const t=Math.cos(Math.PI/4),g=Math.sin(Math.PI/4),h=u*2,r={x:h/2*t,y:h/2*g},l={x:-(h/2)*t,y:h/2*g},f={x:-(h/2)*t,y:-(h/2)*g},i={x:h/2*t,y:-(h/2)*g};return`M ${l.x},${l.y} L ${i.x},${i.y}
1
+ import{wa as ja}from"./index-DN4SafrP.js";import{Bt as $,Ht as F,Vt as Ga,jt as U,t as Fa}from"./src-DD_TpJde.js";import{A as qa,B as is,N as ls,T as et,V as Pa,b as Bt,g as bt,j as Va,x as J}from"./chunk-CSCIHK7Q-CLgoBoCF.js";import{a as Rt,d as za,r as Ht,u as K}from"./chunk-5ZQYHXKU-BU3pQVVl.js";import{i as Za,n as yt,r as It}from"./chunk-O5CBEL6O-BRUisK47.js";import{n as rs,r as Ja,t as Qa}from"./chunk-L5ZTLDWV-dz9D3kOb.js";import{a as E,i as Ua,n as Ka,o as I,t as Lt}from"./chunk-NZK2D7GU-ivCkjCOR.js";import{n as te,t as H}from"./rough.esm-CV1rL6PC.js";function j(u){const t=u.map((g,h)=>`${h===0?"M":"L"}${g.x},${g.y}`);return t.push("Z"),t.join(" ")}function pt(u,t,g,h,r,l){const f=[],n=g-u,e=h-t,s=n/l,a=2*Math.PI/s,o=t+e/2;for(let c=0;c<=50;c++){const y=u+c/50*n,p=o+r*Math.sin(a*(y-u));f.push({x:y,y:p})}return f}function Nt(u,t,g,h,r,l){const f=[],i=r*Math.PI/180,n=(l*Math.PI/180-i)/(h-1);for(let e=0;e<h;e++){const s=i+e*n,a=u+g*Math.cos(s),o=t+g*Math.sin(s);f.push({x:-a,y:-o})}return f}function _t(u){const t=Array.from(u.childNodes).filter(n=>n.tagName==="path"),g=document.createElementNS("http://www.w3.org/2000/svg","path"),h=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");g.setAttribute("d",h);const r=t.find(n=>n.getAttribute("fill")!=="none"),l=t.find(n=>n.getAttribute("stroke")!=="none"),f=$((n,e)=>n?.getAttribute(e)??void 0,"getAttr");if(r){const n={fill:f(r,"fill"),"fill-opacity":f(r,"fill-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&g.setAttribute(e,s)})}if(l){const n={stroke:f(l,"stroke"),"stroke-width":f(l,"stroke-width")??"1","stroke-opacity":f(l,"stroke-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&g.setAttribute(e,s)})}const i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(g),i}function ns(u,t){return u.intersect(t)}function cs(u,t,g,h){var r=u.x,l=u.y,f=r-h.x,i=l-h.y,n=Math.sqrt(t*t*i*i+g*g*f*f),e=Math.abs(t*g*f/n);h.x<r&&(e=-e);var s=Math.abs(t*g*i/n);return h.y<l&&(s=-s),{x:r+e,y:l+s}}function os(u,t,g){return Gt(u,t,t,g)}function hs(u,t,g,h){{const r=t.y-u.y,l=u.x-t.x,f=t.x*u.y-u.x*t.y,i=r*g.x+l*g.y+f,n=r*h.x+l*h.y+f,e=1e-6;if(i!==0&&n!==0&&Xt(i,n))return;const s=h.y-g.y,a=g.x-h.x,o=h.x*g.y-g.x*h.y,c=s*u.x+a*u.y+o,y=s*t.x+a*t.y+o;if(Math.abs(c)<e&&Math.abs(y)<e&&Xt(c,y))return;const p=r*a-s*l;if(p===0)return;const d=Math.abs(p/2);let w=l*o-a*f;const m=w<0?(w-d)/p:(w+d)/p;return w=s*f-r*o,{x:m,y:w<0?(w-d)/p:(w+d)/p}}}function Xt(u,t){return u*t>0}function gs(u,t,g){let h=u.x,r=u.y,l=[],f=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(s){f=Math.min(f,s.x),i=Math.min(i,s.y)}):(f=Math.min(f,t.x),i=Math.min(i,t.y));let n=h-u.width/2-f,e=r-u.height/2-i;for(let s=0;s<t.length;s++){let a=t[s],o=t[s<t.length-1?s+1:0],c=Na(u,g,{x:n+a.x,y:e+a.y},{x:n+o.x,y:e+o.y});c&&l.push(c)}return l.length?(l.length>1&&l.sort(function(s,a){let o=s.x-g.x,c=s.y-g.y,y=Math.sqrt(o*o+c*c),p=a.x-g.x,d=a.y-g.y,w=Math.sqrt(p*p+d*d);return y<w?-1:y===w?0:1}),l[0]):u}function fs(u,t){const{labelStyles:g}=E(t);t.labelStyle=g;const h=_(t);let r=h;h||(r="anchor");const l=u.insert("g").attr("class",r).attr("id",t.domId||t.id),f=1,{cssStyles:i}=t,n=H.svg(l),e=I(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);const s=n.circle(0,0,f*2,e),a=l.insert(()=>s,":first-child");return a.attr("class","anchor").attr("style",K(i)),L(t,a),t.intersect=function(o){return F.info("Circle intersect",t,f,o),N.circle(t,f,o)},l}function Yt(u,t,g,h,r,l,f){const n=(u+g)/2,e=(t+h)/2,s=Math.atan2(h-t,g-u),a=(g-u)/2,o=(h-t)/2,c=a/r,y=o/l,p=Math.sqrt(c**2+y**2);if(p>1)throw new Error("The given radii are too small to create an arc between the points.");const d=Math.sqrt(1-p**2),w=n+d*l*Math.sin(s)*(f?-1:1),m=e-d*r*Math.cos(s)*(f?-1:1),x=Math.atan2((t-m)/l,(u-w)/r);let S=Math.atan2((h-m)/l,(g-w)/r)-x;f&&S<0&&(S+=2*Math.PI),!f&&S>0&&(S-=2*Math.PI);const b=[];for(let P=0;P<20;P++){const k=x+P/19*S,v=w+r*Math.cos(k),B=m+l*Math.sin(k);b.push({x:v,y:B})}return b}function Da(u,t,g){const[h,r]=[t,g].sort((l,f)=>f-l);return r*(1-Math.sqrt(1-(u/h/2)**2))}async function ys(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?16:r,f=t.look==="neo"?12:r,i=$(v=>v+f,"calcTotalHeight"),n=$(v=>{const B=v/2;return[B/(2.5+v/50),B]},"calcEllipseRadius"),{shapeSvg:e,bbox:s}=await Y(u,t,_(t)),a=i(t?.height?t?.height:s.height),[o,c]=n(a),y=Da(a,o,c),p=(t?.width?t?.width:s.width)+l*2+y-y,d=a,{cssStyles:w}=t,m=[{x:p/2,y:-d/2},{x:-p/2,y:-d/2},...Yt(-p/2,-d/2,-p/2,d/2,o,c,!1),{x:p/2,y:d/2},...Yt(p/2,d/2,p/2,-d/2,o,c,!0)],x=H.svg(e),S=I(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const b=j(m),P=x.path(b,S),k=e.insert(()=>P,":first-child");return k.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",w),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),k.attr("transform",`translate(${o/2}, 0)`),L(t,k),t.intersect=function(v){return N.polygon(t,m,v)},e}function ot(u,t,g,h){return u.insert("polygon",":first-child").attr("points",h.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+g/2+")")}async function ps(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?28:r,f=t.look==="neo"?24:r,{shapeSvg:i,bbox:n}=await Y(u,t,_(t)),e=(t?.width??n.width)+(t.look==="neo"?l*2:l+Pt),s=(t?.height??n.height)+(t.look==="neo"?f*2:f),a=0,o=e,c=-s,y=0,p=[{x:a+Pt,y:c},{x:o,y:c},{x:o,y},{x:a,y},{x:a,y:c+Pt},{x:a+Pt,y:c}];let d;const{cssStyles:w}=t;if(t.look==="handDrawn"){const m=H.svg(i),x=I(t,{}),S=j(p),b=m.path(S,x);d=i.insert(()=>b,":first-child").attr("transform",`translate(${-e/2}, ${s/2})`),w&&d.attr("style",w)}else d=ot(i,e,s,p);return h&&d.attr("style",h),L(t,d),t.intersect=function(m){return N.polygon(t,p,m)},i}function us(u,t){const{nodeStyles:g}=E(t);t.label="";const h=u.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),{cssStyles:r}=t,l=Math.max(28,t.width??0),f=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],i=H.svg(h),n=I(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");const e=j(f),s=i.path(e,n),a=h.insert(()=>s,":first-child");return r&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",r),g&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",g),t.width=28,t.height=28,t.intersect=function(o){return N.polygon(t,f,o)},h}async function Ot(u,t,g){const{labelStyles:h,nodeStyles:r}=E(t);t.labelStyle=h;const{shapeSvg:l,bbox:f,halfPadding:i}=await Y(u,t,_(t)),n=16,e=g?.padding??i,s=t.look==="neo"?f.width/2+n*2:f.width/2+e;let a;const{cssStyles:o}=t;if(t.look==="handDrawn"){const c=H.svg(l),y=I(t,{}),p=c.circle(0,0,s*2,y);a=l.insert(()=>p,":first-child"),a.attr("class","basic label-container").attr("style",K(o))}else a=l.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",s).attr("cx",0).attr("cy",0);return L(t,a),t.calcIntersect=function(c,y){const p=c.width/2;return N.circle(c,p,y)},t.intersect=function(c){return F.info("Circle intersect",t,s,c),N.circle(t,s,c)},l}function Ba(u){const t=Math.cos(Math.PI/4),g=Math.sin(Math.PI/4),h=u*2,r={x:h/2*t,y:h/2*g},l={x:-(h/2)*t,y:h/2*g},f={x:-(h/2)*t,y:-(h/2)*g},i={x:h/2*t,y:-(h/2)*g};return`M ${l.x},${l.y} L ${i.x},${i.y}
2
2
  M ${r.x},${r.y} L ${f.x},${f.y}`}function ds(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g,t.label="";const r=u.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),l=Math.max(30,t?.width??0),{cssStyles:f}=t,i=H.svg(r),n=I(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");const e=i.circle(0,0,l*2,n),s=Ba(l),a=i.path(s,n),o=r.insert(()=>e,":first-child");return o.insert(()=>a),o.attr("class","outer-path"),f&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",f),h&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",h),L(t,o),t.intersect=function(c){return F.info("crossedCircle intersect",t,{radius:l,point:c}),N.circle(t,l,c)},r}function rt(u,t,g,h=100,r=0,l=180){const f=[],i=r*Math.PI/180,n=(l*Math.PI/180-i)/(h-1);for(let e=0;e<h;e++){const s=i+e*n,a=u+g*Math.cos(s),o=t+g*Math.sin(s);f.push({x:-a,y:-o})}return f}async function ws(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const{shapeSvg:r,bbox:l,label:f}=await Y(u,t,_(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=l.width+i,s=l.height+n,a=Math.max(5,s*.1),{cssStyles:o}=t,c=[...rt(e/2,-s/2,a,30,-90,0),{x:-e/2-a,y:a},...rt(e/2+a*2,-a,a,20,-180,-270),...rt(e/2+a*2,a,a,20,-90,-180),{x:-e/2-a,y:-s/2},...rt(e/2,s/2,a,20,0,90)],y=[{x:e/2,y:-s/2-a},{x:-e/2,y:-s/2-a},...rt(e/2,-s/2,a,20,-90,0),{x:-e/2-a,y:-a},...rt(e/2+e*.1,-a,a,20,-180,-270),...rt(e/2+e*.1,a,a,20,-90,-180),{x:-e/2-a,y:s/2},...rt(e/2,s/2,a,20,0,90),{x:-e/2,y:s/2+a},{x:e/2,y:s/2+a}],p=H.svg(r),d=I(t,{fill:"none"});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const w=j(c).replace("Z",""),m=p.path(w,d),x=j(y),S=p.path(x,{...d}),b=r.insert("g",":first-child");return b.insert(()=>S,":first-child").attr("stroke-opacity",0),b.insert(()=>m,":first-child"),b.attr("class","text"),o&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",o),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),b.attr("transform",`translate(${a}, 0)`),f.attr("transform",`translate(${-e/2+a-(l.x-(l.left??0))},${-s/2+(t.padding??0)/2-(l.y-(l.top??0))})`),L(t,b),t.intersect=function(P){return N.polygon(t,y,P)},r}function nt(u,t,g,h=100,r=0,l=180){const f=[],i=r*Math.PI/180,n=(l*Math.PI/180-i)/(h-1);for(let e=0;e<h;e++){const s=i+e*n,a=u+g*Math.cos(s),o=t+g*Math.sin(s);f.push({x:a,y:o})}return f}async function ms(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const{shapeSvg:r,bbox:l,label:f}=await Y(u,t,_(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=l.width+(t.look==="neo"?i*2:i),s=l.height+(t.look==="neo"?n*2:n),a=Math.max(5,s*.1),{cssStyles:o}=t,c=[...nt(e/2,-s/2,a,20,-90,0),{x:e/2+a,y:-a},...nt(e/2+a*2,-a,a,20,-180,-270),...nt(e/2+a*2,a,a,20,-90,-180),{x:e/2+a,y:s/2},...nt(e/2,s/2,a,20,0,90)],y=[{x:-e/2,y:-s/2-a},{x:e/2,y:-s/2-a},...nt(e/2,-s/2,a,20,-90,0),{x:e/2+a,y:-a},...nt(e/2+a*2,-a,a,20,-180,-270),...nt(e/2+a*2,a,a,20,-90,-180),{x:e/2+a,y:s/2},...nt(e/2,s/2,a,20,0,90),{x:e/2,y:s/2+a},{x:-e/2,y:s/2+a}],p=H.svg(r),d=I(t,{fill:"none"});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const w=j(c).replace("Z",""),m=p.path(w,d),x=j(y),S=p.path(x,{...d}),b=r.insert("g",":first-child");return b.insert(()=>S,":first-child").attr("stroke-opacity",0),b.insert(()=>m,":first-child"),b.attr("class","text"),o&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",o),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),b.attr("transform",`translate(${-a}, 0)`),f.attr("transform",`translate(${-e/2+(t.padding??0)/2-(l.x-(l.left??0))},${-s/2+(t.padding??0)/2-(l.y-(l.top??0))})`),L(t,b),t.intersect=function(P){return N.polygon(t,y,P)},r}function Q(u,t,g,h=100,r=0,l=180){const f=[],i=r*Math.PI/180,n=(l*Math.PI/180-i)/(h-1);for(let e=0;e<h;e++){const s=i+e*n,a=u+g*Math.cos(s),o=t+g*Math.sin(s);f.push({x:-a,y:-o})}return f}async function xs(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const{shapeSvg:r,bbox:l,label:f}=await Y(u,t,_(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=l.width+(t.look==="neo"?i*2:i),s=l.height+(t.look==="neo"?n*2:n),a=Math.max(5,s*.1),{cssStyles:o}=t,c=[...Q(e/2,-s/2,a,30,-90,0),{x:-e/2-a,y:a},...Q(e/2+a*2,-a,a,20,-180,-270),...Q(e/2+a*2,a,a,20,-90,-180),{x:-e/2-a,y:-s/2},...Q(e/2,s/2,a,20,0,90)],y=[...Q(-e/2+a+a/2,-s/2,a,20,-90,-180),{x:e/2-a/2,y:a},...Q(-e/2-a/2,-a,a,20,0,90),...Q(-e/2-a/2,a,a,20,-90,0),{x:e/2-a/2,y:-a},...Q(-e/2+a+a/2,s/2,a,30,-180,-270)],p=[{x:e/2,y:-s/2-a},{x:-e/2,y:-s/2-a},...Q(e/2,-s/2,a,20,-90,0),{x:-e/2-a,y:-a},...Q(e/2+a*2,-a,a,20,-180,-270),...Q(e/2+a*2,a,a,20,-90,-180),{x:-e/2-a,y:s/2},...Q(e/2,s/2,a,20,0,90),{x:-e/2,y:s/2+a},{x:e/2-a-a/2,y:s/2+a},...Q(-e/2+a+a/2,-s/2,a,20,-90,-180),{x:e/2-a/2,y:a},...Q(-e/2-a/2,-a,a,20,0,90),...Q(-e/2-a/2,a,a,20,-90,0),{x:e/2-a/2,y:-a},...Q(-e/2+a+a/2,s/2,a,30,-180,-270)],d=H.svg(r),w=I(t,{fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const m=j(c).replace("Z",""),x=d.path(m,w),S=j(y).replace("Z",""),b=d.path(S,w),P=j(p),k=d.path(P,{...w}),v=r.insert("g",":first-child");return v.insert(()=>k,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.insert(()=>b,":first-child"),v.attr("class","text"),o&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",o),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),v.attr("transform",`translate(${a-a/4}, 0)`),f.attr("transform",`translate(${-e/2+(t.padding??0)/2-(l.x-(l.left??0))},${-s/2+(t.padding??0)/2-(l.y-(l.top??0))})`),L(t,v),t.intersect=function(B){return N.polygon(t,p,B)},r}async function bs(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?16:r,f=t.look==="neo"?12:r,i=20,n=5,{shapeSvg:e,bbox:s}=await Y(u,t,_(t)),a=Math.max(i,(s.width+l*2)*1.25,t?.width??0),o=Math.max(n,s.height+f*2,t?.height??0),c=o/2,{cssStyles:y}=t,p=H.svg(e),d=I(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const w=a,m=o,x=w-c,S=m/4,b=[{x,y:0},{x:S,y:0},{x:0,y:m/2},{x:S,y:m},{x,y:m},...Nt(-x,-m/2,c,50,270,90)],P=j(b),k=p.path(P,d),v=e.insert(()=>k,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",y),h&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",h),v.attr("transform",`translate(${-a/2}, ${-o/2})`),L(t,v),t.intersect=function(B){return N.polygon(t,b,B)},e}async function Ss(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?24:r,f=t.look==="neo"?24:r;if(t.width||t.height){const d=t.width??0;t.width=(t.width??0)-f,t.width<qt&&(t.width=qt);const w=d/2/(2.5+d/50);t.height=(t.height??0)-l-w*3,t.height<Ft&&(t.height=Ft)}const{shapeSvg:i,bbox:n,label:e}=await Y(u,t,_(t)),s=(t.width?t.width:n.width)+f,a=s/2,o=a/(2.5+s/50),c=(t.height?t.height:n.height)+l+o;let y;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=H.svg(i),w=Aa(0,0,s,c,a,o),m=Ra(0,o,s,c,a,o),x=I(t,{}),S=d.path(w,x),b=d.path(m,I(t,{fill:"none"}));y=i.insert(()=>b,":first-child"),y=i.insert(()=>S,":first-child"),y.attr("class","basic label-container"),p&&y.attr("style",p)}else{const d=Ca(0,0,s,c,a,o);y=i.insert("path",":first-child").attr("d",d).attr("class","basic label-container outer-path").attr("style",K(p)).attr("style",h)}return y.attr("label-offset-y",o),y.attr("transform",`translate(${-s/2}, ${-(c/2+o)})`),L(t,y),e.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(d){const w=N.rect(t,d),m=w.x-(t.x??0);if(a!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(w.y-(t.y??0))>(t.height??0)/2-o)){let x=o*o*(1-m*m/(a*a));x>0&&(x=Math.sqrt(x)),x=o-x,d.y-(t.y??0)>0&&(x=-x),w.y+=x}return w},i}async function St(u,t,g){const{labelStyles:h,nodeStyles:r}=E(t);t.labelStyle=h;const{shapeSvg:l,bbox:f}=await Y(u,t,_(t)),i=Math.max(f.width+g.labelPaddingX*2,t?.width||0),n=Math.max(f.height+g.labelPaddingY*2,t?.height||0),e=-i/2,s=-n/2;let a,{rx:o,ry:c}=t;const{cssStyles:y}=t;if(g?.rx&&g.ry&&(o=g.rx,c=g.ry),t.look==="handDrawn"){const p=H.svg(l),d=I(t,{}),w=o||c?p.path(ct(e,s,i,n,o||0),d):p.rectangle(e,s,i,n,d);a=l.insert(()=>w,":first-child"),a.attr("class","basic label-container").attr("style",K(y))}else a=l.insert("rect",":first-child"),a.attr("class","basic label-container").attr("style",r).attr("rx",K(o)).attr("ry",K(c)).attr("x",e).attr("y",s).attr("width",i).attr("height",n);return L(t,a),t.calcIntersect=function(p,d){return N.rect(p,d)},t.intersect=function(p){return N.rect(t,p)},l}async function $s(u,t){const{cssClasses:g,labelPaddingX:h,labelPaddingY:r,padding:l,width:f,height:i}=t,n=await St(u,t,{rx:0,ry:0,classes:g??"",labelPaddingX:h??(l??0)*2,labelPaddingY:r??l??0});if(t.look==="handDrawn"){const o=H.svg(n),c=I(t,{}),y=n.select(".basic.label-container > path:nth-child(2)"),p=y.node();if(!p)return n;let d=null;if(p instanceof SVGGraphicsElement)d=p.getBBox();else return n;return n.insert(()=>o.line(d.x,d.y,d.x+d.width,d.y,c),".basic.label-container g.label"),n.insert(()=>o.line(d.x,d.y+d.height,d.x+d.width,d.y+d.height,c),".basic.label-container g.label"),y.remove(),n}const e=n.select(".basic.label-container"),s=(Number(e.attr("width"))||f)??0,a=(Number(e.attr("height"))||i)??0;return s>0&&a>0&&e.attr("stroke-dasharray",`${s} ${a}`),n}async function ks(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?16:t.padding??0,{shapeSvg:f,bbox:i,label:n}=await Y(u,t,_(t)),e=i.width+r,s=i.height+l,a=s*.2,o=-e/2,c=-s/2-a/2,{cssStyles:y}=t,p=H.svg(f),d=I(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const w=[{x:o,y:c+a},{x:-o,y:c+a},{x:-o,y:-c},{x:o,y:-c},{x:o,y:c},{x:-o,y:c},{x:-o,y:c+a}],m=p.polygon(w.map(S=>[S.x,S.y]),d),x=f.insert(()=>m,":first-child");return x.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",y),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),n.attr("transform",`translate(${o+(t.padding??0)/2-(i.x-(i.left??0))}, ${c+a+(t.padding??0)/2-(i.y-(i.top??0))})`),L(t,x),t.intersect=function(S){return N.rect(t,S)},f}async function vs(u,t){const{labelStyles:g,nodeStyles:h}=E(t),r=t.look==="neo"?12:5;t.labelStyle=g;const l=t.padding??0,f=t.look==="neo"?16:l,{shapeSvg:i,bbox:n}=await Y(u,t,_(t)),e=(t?.width?t?.width/2:n.width/2)+(f??0),s=e-r;let a;const{cssStyles:o}=t;if(t.look==="handDrawn"){const c=H.svg(i),y=I(t,{roughness:.2,strokeWidth:2.5}),p=I(t,{roughness:.2,strokeWidth:1.5}),d=c.circle(0,0,e*2,y),w=c.circle(0,0,s*2,p);a=i.insert("g",":first-child"),a.attr("class",K(t.cssClasses)).attr("style",K(o)),a.node()?.appendChild(d),a.node()?.appendChild(w)}else{a=i.insert("g",":first-child");const c=a.insert("circle",":first-child"),y=a.insert("circle");a.attr("class","basic label-container").attr("style",h),c.attr("class","outer-circle").attr("style",h).attr("r",e).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",h).attr("r",s).attr("cx",0).attr("cy",0)}return L(t,a),t.intersect=function(c){return F.info("DoubleCircle intersect",t,e,c),N.circle(t,e,c)},i}function Ps(u,t,{config:{themeVariables:g}}){const{labelStyles:h,nodeStyles:r}=E(t);t.label="",t.labelStyle=h;const l=u.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),f=7,{cssStyles:i}=t,n=H.svg(l),{nodeBorder:e}=g,s=I(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(s.roughness=0);const a=n.circle(0,0,f*2,s),o=l.insert(()=>a,":first-child");return o.selectAll("path").attr("style",`fill: ${e} !important;`),i&&i.length>0&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",i),r&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",r),L(t,o),t.intersect=function(c){return F.info("filledCircle intersect",t,{radius:f,point:c}),N.circle(t,f,c)},l}async function Ds(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?r*2:r;(t.width||t.height)&&(t.height=t?.height??0,t.height<Vt&&(t.height=Vt),t.width=(t?.width??0)-l-l/2,t.width<zt&&(t.width=zt));const{shapeSvg:f,bbox:i,label:n}=await Y(u,t,_(t)),e=(t?.width?t?.width:i.width)+(l??0),s=t?.height?t?.height:e+i.height,a=s,o=[{x:0,y:-s},{x:a,y:-s},{x:a/2,y:0}],{cssStyles:c}=t,y=H.svg(f),p=I(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=j(o),w=y.path(d,p),m=f.insert(()=>w,":first-child").attr("transform",`translate(${-s/2}, ${s/2})`).attr("class","outer-path");return c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),h&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",h),t.width=e,t.height=s,L(t,m),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-s/2+(t.padding??0)/2+(i.y-(i.top??0))})`),t.intersect=function(x){return F.info("Triangle intersect",t,o,x),N.polygon(t,o,x)},f}function Bs(u,t,{dir:g,config:{state:h,themeVariables:r}}){const{nodeStyles:l}=E(t);t.label="";const f=u.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),{cssStyles:i}=t;let n=Math.max(70,t?.width??0),e=Math.max(10,t?.height??0);g==="LR"&&(n=Math.max(10,t?.width??0),e=Math.max(70,t?.height??0));const s=-1*n/2,a=-1*e/2,o=H.svg(f),c=I(t,{stroke:r.lineColor,fill:r.lineColor});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const y=o.rectangle(s,a,n,e,c),p=f.insert(()=>y,":first-child");i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),l&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",l),L(t,p);const d=h?.padding??0;return t.width&&t.height&&(t.width+=d/2||0,t.height+=d/2||0),t.intersect=function(w){return N.rect(t,w)},f}async function Ms(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=15,l=10,f=t.look==="neo"?16:t.padding??0,i=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-i*2,t.height<l&&(t.height=l),t.width=(t?.width??0)-f*2,t.width<r&&(t.width=r));const{shapeSvg:n,bbox:e}=await Y(u,t,_(t)),s=(t?.width?t?.width:Math.max(r,e.width))+f*2,a=(t?.height?t?.height:Math.max(l,e.height))+i*2,o=a/2,{cssStyles:c}=t,y=H.svg(n),p=I(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=[{x:-s/2,y:-a/2},{x:s/2-o,y:-a/2},...Nt(-s/2+o,0,o,50,90,270),{x:s/2-o,y:a/2},{x:-s/2,y:a/2}],w=j(d),m=y.path(w,p),x=n.insert(()=>m,":first-child");return x.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",c),h&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",h),L(t,x),t.intersect=function(S){return F.info("Pill intersect",t,{radius:o,point:S}),N.polygon(t,d,S)},n}async function Ns(u,t){const{labelStyles:g,nodeStyles:h}=E(t),r=t.look==="neo"?3.5:4;t.labelStyle=g;const l=t.padding??0,f=70,i=32,n=t.look==="neo"?f:l,e=t.look==="neo"?i:l;if(t.width||t.height){const m=(t.height??0)/r;t.width=(t?.width??0)-2*m-e,t.height=(t.height??0)-n}const{shapeSvg:s,bbox:a}=await Y(u,t,_(t)),o=(t?.height?t?.height:a.height)+n,c=o/r,y=(t?.width?t?.width:a.width)+2*c+e,p=[{x:c,y:0},{x:y-c,y:0},{x:y,y:-o/2},{x:y-c,y:-o},{x:c,y:-o},{x:0,y:-o/2}];let d;const{cssStyles:w}=t;if(t.look==="handDrawn"){const m=H.svg(s),x=I(t,{}),S=Ha(0,0,y,o,c),b=m.path(S,x);d=s.insert(()=>b,":first-child").attr("transform",`translate(${-y/2}, ${o/2})`),w&&d.attr("style",w)}else d=ot(s,y,o,p);return h&&d.attr("style",h),t.width=y,t.height=o,L(t,d),t.intersect=function(m){return N.polygon(t,p,m)},s}async function Cs(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.label="",t.labelStyle=g;const{shapeSvg:r}=await Y(u,t,_(t)),l=Math.max(30,t?.width??0),f=Math.max(30,t?.height??0),{cssStyles:i}=t,n=H.svg(r),e=I(t,{});t.look!=="handDrawn"&&(e.roughness=0,e.fillStyle="solid");const s=[{x:0,y:0},{x:l,y:0},{x:0,y:f},{x:l,y:f}],a=j(s),o=n.path(a,e),c=r.insert(()=>o,":first-child");return c.attr("class","basic label-container outer-path"),i&&t.look!=="handDrawn"&&c.selectChildren("path").attr("style",i),h&&t.look!=="handDrawn"&&c.selectChildren("path").attr("style",h),c.attr("transform",`translate(${-l/2}, ${-f/2})`),L(t,c),t.intersect=function(y){return F.info("Pill intersect",t,{points:s}),N.polygon(t,s,y)},r}async function As(u,t,{config:{themeVariables:g,flowchart:h}}){const{labelStyles:r}=E(t);t.labelStyle=r;const l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);const{shapeSvg:e,bbox:s,label:a}=await Y(u,t,"icon-shape default"),o=t.pos==="t",c=i,y=i,{nodeBorder:p}=g,{stylesMap:d}=Lt(t),w=-y/2,m=-c/2,x=t.label?8:0,S=H.svg(e),b=I(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const P=S.rectangle(w,m,y,c,b),k=Math.max(y,s.width),v=c+s.height+x,B=S.rectangle(-k/2,-v/2,k,v,{...b,fill:"transparent",stroke:"none"}),A=e.insert(()=>P,":first-child"),W=e.insert(()=>B);if(t.icon){const X=e.append("g");X.html(`<g>${await It(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);const C=X.node().getBBox(),M=C.width,D=C.height,T=C.x,R=C.y;X.attr("transform",`translate(${-M/2-T},${o?s.height/2+x/2-D/2-R:-s.height/2-x/2-D/2-R})`),X.attr("style",`color: ${d.get("stroke")??p};`)}return a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${o?-v/2:v/2-s.height})`),A.attr("transform",`translate(0,${o?s.height/2+x/2:-s.height/2-x/2})`),L(t,W),t.intersect=function(X){if(F.info("iconSquare intersect",t,X),!t.label)return N.rect(t,X);const C=t.x??0,M=t.y??0,D=t.height??0;let T=[];return o?T=[{x:C-s.width/2,y:M-D/2},{x:C+s.width/2,y:M-D/2},{x:C+s.width/2,y:M-D/2+s.height+x},{x:C+y/2,y:M-D/2+s.height+x},{x:C+y/2,y:M+D/2},{x:C-y/2,y:M+D/2},{x:C-y/2,y:M-D/2+s.height+x},{x:C-s.width/2,y:M-D/2+s.height+x}]:T=[{x:C-y/2,y:M-D/2},{x:C+y/2,y:M-D/2},{x:C+y/2,y:M-D/2+c},{x:C+s.width/2,y:M-D/2+c},{x:C+s.width/2/2,y:M+D/2},{x:C-s.width/2,y:M+D/2},{x:C-s.width/2,y:M-D/2+c},{x:C-y/2,y:M-D/2+c}],N.polygon(t,T,X)},e}async function Rs(u,t,{config:{themeVariables:g,flowchart:h}}){const{labelStyles:r}=E(t);t.labelStyle=r;const l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);const{shapeSvg:e,bbox:s,label:a}=await Y(u,t,"icon-shape default"),o=20,c=t.label?8:0,y=t.pos==="t",{nodeBorder:p,mainBkg:d}=g,{stylesMap:w}=Lt(t),m=H.svg(e),x=I(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid"),x.stroke=w.get("fill")??d;const S=e.append("g");t.icon&&S.html(`<g>${await It(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);const b=S.node().getBBox(),P=b.width,k=b.height,v=b.x,B=b.y,A=Math.max(P,k)*Math.SQRT2+o*2,W=m.circle(0,0,A,x),X=Math.max(A,s.width),C=A+s.height+c,M=m.rectangle(-X/2,-C/2,X,C,{...x,fill:"transparent",stroke:"none"}),D=e.insert(()=>W,":first-child"),T=e.insert(()=>M);return S.attr("transform",`translate(${-P/2-v},${y?s.height/2+c/2-k/2-B:-s.height/2-c/2-k/2-B})`),S.attr("style",`color: ${w.get("stroke")??p};`),a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${y?-C/2:C/2-s.height})`),D.attr("transform",`translate(0,${y?s.height/2+c/2:-s.height/2-c/2})`),L(t,T),t.intersect=function(R){return F.info("iconSquare intersect",t,R),N.rect(t,R)},e}async function Hs(u,t,{config:{themeVariables:g,flowchart:h}}){const{labelStyles:r}=E(t);t.labelStyle=r;const l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);const{shapeSvg:e,bbox:s,halfPadding:a,label:o}=await Y(u,t,"icon-shape default"),c=t.pos==="t",y=i+a*2,p=i+a*2,{nodeBorder:d,mainBkg:w}=g,{stylesMap:m}=Lt(t),x=-p/2,S=-y/2,b=t.label?8:0,P=H.svg(e),k=I(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid"),k.stroke=m.get("fill")??w;const v=P.path(ct(x,S,p,y,5),k),B=Math.max(p,s.width),A=y+s.height+b,W=P.rectangle(-B/2,-A/2,B,A,{...k,fill:"transparent",stroke:"none"}),X=e.insert(()=>v,":first-child").attr("class","icon-shape2"),C=e.insert(()=>W);if(t.icon){const M=e.append("g");M.html(`<g>${await It(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);const D=M.node().getBBox(),T=D.width,R=D.height,q=D.x,z=D.y;M.attr("transform",`translate(${-T/2-q},${c?s.height/2+b/2-R/2-z:-s.height/2-b/2-R/2-z})`),M.attr("style",`color: ${m.get("stroke")??d};`)}return o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-A/2:A/2-s.height})`),X.attr("transform",`translate(0,${c?s.height/2+b/2:-s.height/2-b/2})`),L(t,C),t.intersect=function(M){if(F.info("iconSquare intersect",t,M),!t.label)return N.rect(t,M);const D=t.x??0,T=t.y??0,R=t.height??0;let q=[];return c?q=[{x:D-s.width/2,y:T-R/2},{x:D+s.width/2,y:T-R/2},{x:D+s.width/2,y:T-R/2+s.height+b},{x:D+p/2,y:T-R/2+s.height+b},{x:D+p/2,y:T+R/2},{x:D-p/2,y:T+R/2},{x:D-p/2,y:T-R/2+s.height+b},{x:D-s.width/2,y:T-R/2+s.height+b}]:q=[{x:D-p/2,y:T-R/2},{x:D+p/2,y:T-R/2},{x:D+p/2,y:T-R/2+y},{x:D+s.width/2,y:T-R/2+y},{x:D+s.width/2/2,y:T+R/2},{x:D-s.width/2,y:T+R/2},{x:D-s.width/2,y:T-R/2+y},{x:D-p/2,y:T-R/2+y}],N.polygon(t,q,M)},e}async function Is(u,t,{config:{themeVariables:g,flowchart:h}}){const{labelStyles:r}=E(t);t.labelStyle=r;const l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);const{shapeSvg:e,bbox:s,halfPadding:a,label:o}=await Y(u,t,"icon-shape default"),c=t.pos==="t",y=i+a*2,p=i+a*2,{nodeBorder:d,mainBkg:w}=g,{stylesMap:m}=Lt(t),x=-p/2,S=-y/2,b=t.label?8:0,P=H.svg(e),k=I(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid"),k.stroke=m.get("fill")??w;const v=P.path(ct(x,S,p,y,.1),k),B=Math.max(p,s.width),A=y+s.height+b,W=P.rectangle(-B/2,-A/2,B,A,{...k,fill:"transparent",stroke:"none"}),X=e.insert(()=>v,":first-child"),C=e.insert(()=>W);if(t.icon){const M=e.append("g");M.html(`<g>${await It(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);const D=M.node().getBBox(),T=D.width,R=D.height,q=D.x,z=D.y;M.attr("transform",`translate(${-T/2-q},${c?s.height/2+b/2-R/2-z:-s.height/2-b/2-R/2-z})`),M.attr("style",`color: ${m.get("stroke")??d};`)}return o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-A/2:A/2-s.height})`),X.attr("transform",`translate(0,${c?s.height/2+b/2:-s.height/2-b/2})`),L(t,C),t.intersect=function(M){if(F.info("iconSquare intersect",t,M),!t.label)return N.rect(t,M);const D=t.x??0,T=t.y??0,R=t.height??0;let q=[];return c?q=[{x:D-s.width/2,y:T-R/2},{x:D+s.width/2,y:T-R/2},{x:D+s.width/2,y:T-R/2+s.height+b},{x:D+p/2,y:T-R/2+s.height+b},{x:D+p/2,y:T+R/2},{x:D-p/2,y:T+R/2},{x:D-p/2,y:T-R/2+s.height+b},{x:D-s.width/2,y:T-R/2+s.height+b}]:q=[{x:D-p/2,y:T-R/2},{x:D+p/2,y:T-R/2},{x:D+p/2,y:T-R/2+y},{x:D+s.width/2,y:T-R/2+y},{x:D+s.width/2/2,y:T+R/2},{x:D-s.width/2,y:T+R/2},{x:D-s.width/2,y:T-R/2+y},{x:D-p/2,y:T-R/2+y}],N.polygon(t,q,M)},e}async function Ls(u,t,{config:{flowchart:g}}){const h=new Image;h.src=t?.img??"",await h.decode();const r=Number(h.naturalWidth.toString().replace("px","")),l=Number(h.naturalHeight.toString().replace("px",""));t.imageAspectRatio=r/l;const{labelStyles:f}=E(t);t.labelStyle=f;const i=g?.wrappingWidth;t.defaultWidth=g?.wrappingWidth;const n=Math.max(t.label?i??0:0,t?.assetWidth??r),e=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:n,s=t.constraint==="on"?e/t.imageAspectRatio:t?.assetHeight??l;t.width=Math.max(e,i??0);const{shapeSvg:a,bbox:o,label:c}=await Y(u,t,"image-shape default"),y=t.pos==="t",p=-e/2,d=-s/2,w=t.label?8:0,m=H.svg(a),x=I(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=m.rectangle(p,d,e,s,x),b=Math.max(e,o.width),P=s+o.height+w,k=m.rectangle(-b/2,-P/2,b,P,{...x,fill:"none",stroke:"none"}),v=a.insert(()=>S,":first-child"),B=a.insert(()=>k);if(t.img){const A=a.append("image");A.attr("href",t.img),A.attr("width",e),A.attr("height",s),A.attr("preserveAspectRatio","none"),A.attr("transform",`translate(${-e/2},${y?P/2-s:-P/2})`)}return c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${y?-s/2-o.height/2-w/2:s/2-o.height/2+w/2})`),v.attr("transform",`translate(0,${y?o.height/2+w/2:-o.height/2-w/2})`),L(t,B),t.intersect=function(A){if(F.info("iconSquare intersect",t,A),!t.label)return N.rect(t,A);const W=t.x??0,X=t.y??0,C=t.height??0;let M=[];return y?M=[{x:W-o.width/2,y:X-C/2},{x:W+o.width/2,y:X-C/2},{x:W+o.width/2,y:X-C/2+o.height+w},{x:W+e/2,y:X-C/2+o.height+w},{x:W+e/2,y:X+C/2},{x:W-e/2,y:X+C/2},{x:W-e/2,y:X-C/2+o.height+w},{x:W-o.width/2,y:X-C/2+o.height+w}]:M=[{x:W-e/2,y:X-C/2},{x:W+e/2,y:X-C/2},{x:W+e/2,y:X-C/2+s},{x:W+o.width/2,y:X-C/2+s},{x:W+o.width/2/2,y:X+C/2},{x:W-o.width/2,y:X+C/2},{x:W-o.width/2,y:X-C/2+s},{x:W-e/2,y:X-C/2+s}],N.polygon(t,M,A)},a}async function Es(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=r,f=t.look==="neo"?r*2:r,{shapeSvg:i,bbox:n}=await Y(u,t,_(t)),e=Math.max(n.width+(f??0)*2,t?.width??0),s=Math.max(n.height+(l??0)*2,t?.height??0),a=[{x:0,y:0},{x:e,y:0},{x:e+3*s/6,y:-s},{x:-3*s/6,y:-s}];let o;const{cssStyles:c}=t;if(t.look==="handDrawn"){const y=H.svg(i),p=I(t,{}),d=j(a),w=y.path(d,p);o=i.insert(()=>w,":first-child").attr("transform",`translate(${-e/2}, ${s/2})`),c&&o.attr("style",c)}else o=ot(i,e,s,a);return h&&o.attr("style",h),t.width=e,t.height=s,L(t,o),t.intersect=function(y){return N.polygon(t,a,y)},i}async function Ts(u,t){const{shapeSvg:g,bbox:h,label:r}=await Y(u,t,"label"),l=g.insert("rect",":first-child");return l.attr("width",.1).attr("height",.1),g.attr("class","label edgeLabel"),r.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),L(t,l),t.intersect=function(f){return N.rect(t,f)},g}async function Ws(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=r,f=t.look==="neo"?r*2:r,{shapeSvg:i,bbox:n}=await Y(u,t,_(t)),e=(t?.height??n.height)+l,s=(t?.width??n.width)+f,a=[{x:0,y:0},{x:s+3*e/6,y:0},{x:s,y:-e},{x:-(3*e)/6,y:-e}];let o;const{cssStyles:c}=t;if(t.look==="handDrawn"){const y=H.svg(i),p=I(t,{}),d=j(a),w=y.path(d,p);o=i.insert(()=>w,":first-child").attr("transform",`translate(${-s/2}, ${e/2})`),c&&o.attr("style",c)}else o=ot(i,s,e,a);return h&&o.attr("style",h),t.width=s,t.height=e,L(t,o),t.intersect=function(y){return N.polygon(t,a,y)},i}async function _s(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=r,f=t.look==="neo"?r*2:r,{shapeSvg:i,bbox:n}=await Y(u,t,_(t)),e=(t?.height??n.height)+l,s=(t?.width??n.width)+f,a=[{x:-3*e/6,y:0},{x:s,y:0},{x:s+3*e/6,y:-e},{x:0,y:-e}];let o;const{cssStyles:c}=t;if(t.look==="handDrawn"){const y=H.svg(i),p=I(t,{}),d=j(a),w=y.path(d,p);o=i.insert(()=>w,":first-child").attr("transform",`translate(${-s/2}, ${e/2})`),c&&o.attr("style",c)}else o=ot(i,s,e,a);return h&&o.attr("style",h),t.width=s,t.height=e,L(t,o),t.intersect=function(y){return N.polygon(t,a,y)},i}function Xs(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.label="",t.labelStyle=g;const r=u.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,f=Math.max(35,t?.width??0),i=Math.max(35,t?.height??0),n=7,e=[{x:f,y:0},{x:0,y:i+n/2},{x:f-2*n,y:i+n/2},{x:0,y:2*i},{x:f,y:i-n/2},{x:2*n,y:i-n/2}],s=H.svg(r),a=I(t,{});t.look!=="handDrawn"&&(a.roughness=0,a.fillStyle="solid");const o=j(e),c=s.path(o,a),y=r.insert(()=>c,":first-child");return y.attr("class","outer-path"),l&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",l),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),y.attr("transform",`translate(-${f/2},${-i})`),L(t,y),t.intersect=function(p){return F.info("lightningBolt intersect",t,p),N.polygon(t,e,p)},r}async function Ys(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?16:r,f=t.look==="neo"?24:r;if(t.width||t.height){const w=t.width??0;t.width=(t.width??0)-l,t.width<Jt&&(t.width=Jt);const m=w/2/(2.5+w/50);t.height=(t.height??0)-f-m*3,t.height<Zt&&(t.height=Zt)}const{shapeSvg:i,bbox:n,label:e}=await Y(u,t,_(t)),s=(t?.width?t?.width:n.width)+l*2,a=s/2,o=a/(2.5+s/50),c=(t?.height?t?.height:n.height)+o+f*2,y=c*.1;let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const w=H.svg(i),m=La(0,0,s,c,a,o,y),x=Ea(0,o,s,c,a,o),S=I(t,{}),b=w.path(m,S),P=w.path(x,S);i.insert(()=>P,":first-child").attr("class","line"),p=i.insert(()=>b,":first-child"),p.attr("class","basic label-container"),d&&p.attr("style",d)}else{const w=Ia(0,0,s,c,a,o,y);p=i.insert("path",":first-child").attr("d",w).attr("class","basic label-container outer-path").attr("style",K(d)).attr("style",h)}return p.attr("label-offset-y",o),p.attr("transform",`translate(${-s/2}, ${-(c/2+o)})`),L(t,p),e.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+o-(n.y-(n.top??0))})`),t.intersect=function(w){const m=N.rect(t,w),x=m.x-(t.x??0);if(a!=0&&(Math.abs(x)<(t.width??0)/2||Math.abs(x)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-o)){let S=o*o*(1-x*x/(a*a));S>0&&(S=Math.sqrt(S)),S=o-S,w.y-(t.y??0)>0&&(S=-S),m.y+=S}return m},i}async function Os(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?16:r,f=t.look==="neo"?12:r;(t.width||t.height)&&(t.width=(t.width??0)*10/11-l*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-f*2,t.height<10&&(t.height=10));const{shapeSvg:i,bbox:n,label:e}=await Y(u,t,_(t)),s=(t?.width?t?.width:n.width)+(l??0)*2,a=(t?.height?t?.height:n.height)+(f??0)*2,o=t.look==="neo"?a/4:a/8,c=a+o,{cssStyles:y}=t,p=H.svg(i),d=I(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const w=[{x:-s/2-s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:c/2},...pt(-s/2-s/2*.1,c/2,s/2+s/2*.1,c/2,o,.8),{x:s/2+s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:-c/2},{x:-s/2,y:-c/2},{x:-s/2,y:c/2*1.1},{x:-s/2,y:-c/2}],m=p.polygon(w.map(S=>[S.x,S.y]),d),x=i.insert(()=>m,":first-child");return x.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",y),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),x.attr("transform",`translate(0,${-o/2})`),e.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(n.x-(n.left??0))},${-a/2+(t.padding??0)-o/2-(n.y-(n.top??0))})`),L(t,x),t.intersect=function(S){return N.polygon(t,w,S)},i}async function js(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?16:r,f=t.look==="neo"?12:r,i=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-l*2-2*i,10),t.height=Math.max((t?.height??0)-f*2-2*i,10));const{shapeSvg:n,bbox:e,label:s}=await Y(u,t,_(t)),a=(t?.width?t?.width:e.width)+l*2+2*i,o=(t?.height?t?.height:e.height)+f*2+2*i,c=a-2*i,y=o-2*i,p=-c/2,d=-y/2,{cssStyles:w}=t,m=H.svg(n),x=I(t,{}),S=[{x:p-i,y:d+i},{x:p-i,y:d+y+i},{x:p+c-i,y:d+y+i},{x:p+c-i,y:d+y},{x:p+c,y:d+y},{x:p+c,y:d+y-i},{x:p+c+i,y:d+y-i},{x:p+c+i,y:d-i},{x:p+i,y:d-i},{x:p+i,y:d},{x:p,y:d},{x:p,y:d+i}],b=[{x:p,y:d+i},{x:p+c-i,y:d+i},{x:p+c-i,y:d+y},{x:p+c,y:d+y},{x:p+c,y:d},{x:p,y:d}];t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const P=j(S);let k=m.path(P,x);const v=j(b);let B=m.path(v,x);t.look!=="handDrawn"&&(k=_t(k),B=_t(B));const A=n.insert("g",":first-child");return A.insert(()=>k),A.insert(()=>B),A.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",w),h&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",h),s.attr("transform",`translate(${-(e.width/2)-i-(e.x-(e.left??0))}, ${-(e.height/2)+i-(e.y-(e.top??0))})`),L(t,A),t.intersect=function(W){return N.polygon(t,S,W)},n}async function Gs(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const{shapeSvg:r,bbox:l,label:f}=await Y(u,t,_(t)),i=t.padding??0,n=t.look==="neo"?16:i,e=t.look==="neo"?12:i;let s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-n*2,t.height=(t?.height??0)-e*3);const a=Math.max(l.width,t?.width??0)+n*2,o=Math.max(l.height,t?.height??0)+e*3,c=t.look==="neo"?o/4:o/8,y=o+(s?c/2:-c/2),p=-a/2,d=-y/2,w=10,{cssStyles:m}=t,x=pt(p-w,d+y+w,p+a-w,d+y+w,c,.8),S=x?.[x.length-1],b=[{x:p-w,y:d+w},{x:p-w,y:d+y+w},...x,{x:p+a-w,y:S.y-w},{x:p+a,y:S.y-w},{x:p+a,y:S.y-2*w},{x:p+a+w,y:S.y-2*w},{x:p+a+w,y:d-w},{x:p+w,y:d-w},{x:p+w,y:d},{x:p,y:d},{x:p,y:d+w}],P=[{x:p,y:d+w},{x:p+a-w,y:d+w},{x:p+a-w,y:S.y-w},{x:p+a,y:S.y-w},{x:p+a,y:d},{x:p,y:d}],k=H.svg(r),v=I(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=j(b),A=k.path(B,v),W=j(P),X=k.path(W,v),C=r.insert(()=>A,":first-child");return C.insert(()=>X),C.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",m),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),C.attr("transform",`translate(0,${-c/2})`),f.attr("transform",`translate(${-(l.width/2)-w-(l.x-(l.left??0))}, ${-(l.height/2)+w-c/2-(l.y-(l.top??0))})`),L(t,C),t.intersect=function(M){return N.polygon(t,b,M)},r}async function Fs(u,t,{config:{themeVariables:g}}){const{labelStyles:h,nodeStyles:r}=E(t);t.labelStyle=h,t.useHtmlLabels||et(Bt())||(t.centerLabel=!0);const{shapeSvg:l,bbox:f,label:i}=await Y(u,t,_(t)),n=Math.max(f.width+(t.padding??0)*2,t?.width??0),e=Math.max(f.height+(t.padding??0)*2,t?.height??0),s=-n/2,a=-e/2,{cssStyles:o}=t,c=H.svg(l),y=I(t,{fill:g.noteBkgColor,stroke:g.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const p=c.rectangle(s,a,n,e,y),d=l.insert(()=>p,":first-child");return d.attr("class","basic label-container outer-path"),i.attr("class","label noteLabel"),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),i.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))}, ${-(f.height/2)-(f.y-(f.top??0))})`),L(t,d),t.intersect=function(w){return N.rect(t,w)},l}async function qs(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const{shapeSvg:r,bbox:l}=await Y(u,t,_(t)),f=l.width+(t.padding??0)+(l.height+(t.padding??0)),i=.5,n=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}];let e;const{cssStyles:s}=t;if(t.look==="handDrawn"){const a=H.svg(r),o=I(t,{}),c=Ta(0,0,f),y=a.path(c,o);e=r.insert(()=>y,":first-child").attr("transform",`translate(${-f/2+i}, ${f/2})`),s&&e.attr("style",s)}else e=ot(r,f,f,n),e.attr("transform",`translate(${-f/2+i}, ${f/2})`);return h&&e.attr("style",h),L(t,e),t.calcIntersect=function(a,o){const c=a.width,y=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}],p=N.polygon(a,y,o);return{x:p.x-.5,y:p.y-.5}},t.intersect=function(a){return this.calcIntersect(t,a)},r}async function Vs(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?21:r??0,f=t.look==="neo"?12:r??0,{shapeSvg:i,bbox:n,label:e}=await Y(u,t,_(t)),s=(t?.width??n.width)+(t.look==="neo"?l*2:l),a=(t?.height??n.height)+(t.look==="neo"?f*2:f),o=-s/2,c=-a/2,y=c/2,p=[{x:o+y,y:c},{x:o,y:0},{x:o+y,y:-c},{x:-o,y:-c},{x:-o,y:c}],{cssStyles:d}=t,w=H.svg(i),m=I(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=j(p),S=w.path(x,m),b=i.insert(()=>S,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),b.attr("transform",`translate(${-y/2},0)`),e.attr("transform",`translate(${-y/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),L(t,b),t.intersect=function(P){return N.polygon(t,p,P)},i}async function zs(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;let r;t.cssClasses?r="node "+t.cssClasses:r="node default";const l=u.insert("g").attr("class",r).attr("id",t.domId||t.id),f=l.insert("g"),i=l.insert("g").attr("class","label").attr("style",h),n=t.description,e=t.label,s=await Mt(i,e,t.labelStyle,!0,!0);let a={width:0,height:0};if(et(J())){const v=s.children[0],B=U(s);a=v.getBoundingClientRect(),B.attr("width",a.width),B.attr("height",a.height)}F.info("Text 2",n);const o=n||[],c=s.getBBox(),y=await Mt(i,Array.isArray(o)?o.join("<br/>"):o,t.labelStyle,!0,!0),p=y.children[0],d=U(y);a=p.getBoundingClientRect(),d.attr("width",a.width),d.attr("height",a.height);const w=(t.padding||0)/2;U(y).attr("transform","translate( "+(a.width>c.width?0:(c.width-a.width)/2)+", "+(c.height+w+5)+")"),U(s).attr("transform","translate( "+(a.width<c.width?0:-(c.width-a.width)/2)+", 0)"),a=i.node().getBBox(),i.attr("transform","translate("+-a.width/2+", "+(-a.height/2-w+3)+")");const m=a.width+(t.padding||0),x=a.height+(t.padding||0),S=-a.width/2-w,b=-a.height/2-w;let P,k;if(t.look==="handDrawn"){const v=H.svg(l),B=I(t,{}),A=v.path(ct(S,b,m,x,t.rx||0),B),W=v.line(-a.width/2-w,-a.height/2-w+c.height+w,a.width/2+w,-a.height/2-w+c.height+w,B);k=l.insert(()=>(F.debug("Rough node insert CXC",A),W),":first-child"),P=l.insert(()=>(F.debug("Rough node insert CXC",A),A),":first-child")}else P=f.insert("rect",":first-child"),k=f.insert("line"),P.attr("class","outer title-state").attr("style",h).attr("x",-a.width/2-w).attr("y",-a.height/2-w).attr("width",a.width+(t.padding||0)).attr("height",a.height+(t.padding||0)),k.attr("class","divider").attr("x1",-a.width/2-w).attr("x2",a.width/2+w).attr("y1",-a.height/2-w+c.height+w).attr("y2",-a.height/2-w+c.height+w);return L(t,P),t.intersect=function(v){return N.rect(t,v)},l}async function Zs(u,t,{config:{themeVariables:g}}){const h=g?.radius??5;return St(u,t,{rx:h,ry:h,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}async function Js(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0,{shapeSvg:f,bbox:i,label:n}=await Y(u,t,_(t)),e=(t?.width??i.width)+r*2+(t.look==="neo"?ft:ft*2),s=(t?.height??i.height)+l*2,a=e-ft,o=s,c=ft-e/2,y=-s/2,{cssStyles:p}=t,d=H.svg(f),w=I(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const m=[{x:c,y},{x:c+a,y},{x:c+a,y:y+o},{x:c-ft,y:y+o},{x:c-ft,y},{x:c,y},{x:c,y:y+o}],x=d.polygon(m.map(b=>[b.x,b.y]),w),S=f.insert(()=>x,":first-child");return S.attr("class","basic label-container outer-path").attr("style",K(p)),h&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),p&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),n.attr("transform",`translate(${ft/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),L(t,S),t.intersect=function(b){return N.rect(t,b)},f}async function Qs(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?16:r,f=t.look==="neo"?12:r;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-l*2,10),t.height=Math.max((t?.height??0)/1.5-f*2,10));const{shapeSvg:i,bbox:n,label:e}=await Y(u,t,_(t)),s=(t?.width?t?.width:n.width)+l*2,a=((t?.height?t?.height:n.height)+f*2)*1.5,o=s,c=a/1.5,y=-o/2,p=-c/2,{cssStyles:d}=t,w=H.svg(i),m=I(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:y,y:p},{x:y,y:p+c},{x:y+o,y:p+c},{x:y+o,y:p-c/2}],S=j(x),b=w.path(S,m),P=i.insert(()=>b,":first-child");return P.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&P.selectChildren("path").attr("style",d),h&&t.look!=="handDrawn"&&P.selectChildren("path").attr("style",h),P.attr("transform",`translate(0, ${c/4})`),e.attr("transform",`translate(${-o/2+(t.padding??0)-(n.x-(n.left??0))}, ${-c/4+(t.padding??0)-(n.y-(n.top??0))})`),L(t,P),t.intersect=function(k){return N.polygon(t,x,k)},i}async function Us(u,t){const g=t.padding??0,h=t.look==="neo"?16:g*2,r=t.look==="neo"?12:g;return St(u,t,{rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??h,labelPaddingY:r})}async function Ks(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?20:r,f=t.look==="neo"?12:r,{shapeSvg:i,bbox:n}=await Y(u,t,_(t)),e=n.height+(t.look==="neo"?f*2:f),s=n.width+e/4+(t.look==="neo"?l*2:l),a=e/2,{cssStyles:o}=t,c=H.svg(i),y=I(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const p=[{x:-s/2+a,y:-e/2},{x:s/2-a,y:-e/2},...Nt(-s/2+a,0,a,50,90,270),{x:s/2-a,y:e/2},...Nt(s/2-a,0,a,50,270,450)],d=j(p),w=c.path(d,y),m=i.insert(()=>w,":first-child");return m.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",o),h&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",h),L(t,m),t.intersect=function(x){return N.polygon(t,p,x)},i}async function ta(u,t){return St(u,t,{rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"})}function sa(u,t,{config:{themeVariables:g}}){const{labelStyles:h,nodeStyles:r}=E(t);t.labelStyle=h;const{cssStyles:l}=t,{lineColor:f,stateBorder:i,nodeBorder:n,nodeShadow:e}=g;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=u.insert("g").attr("class","node default").attr("id",t.domId??t.id),a=H.svg(s),o=I(t,{});t.look!=="handDrawn"&&(o.roughness=0,o.fillStyle="solid");const c=a.circle(0,0,t.width,{...o,stroke:f,strokeWidth:2}),y=i??n,p=(t.width??0)*5/14,d=a.circle(0,0,p,{...o,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),w=s.insert(()=>c,":first-child");if(w.insert(()=>d),t.look!=="handDrawn"&&w.attr("class","outer-path"),l&&w.selectAll("path").attr("style",l),r&&w.selectAll("path").attr("style",r),t.width<25&&e&&t.look!=="handDrawn"){const m=u.node()?.ownerSVGElement?.id??"",x=m?`${m}-drop-shadow-small`:"drop-shadow-small";w.attr("style",`filter:url(#${x})`)}return L(t,w),t.intersect=function(m){return N.circle(t,(t.width??0)/2,m)},s}function aa(u,t,{config:{themeVariables:g}}){const{lineColor:h,nodeShadow:r}=g;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const l=u.insert("g").attr("class","node default").attr("id",t.domId||t.id);let f;if(t.look==="handDrawn"){const i=H.svg(l).circle(0,0,t.width,Ua(h));f=l.insert(()=>i),f.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else f=l.insert("circle",":first-child"),f.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&r&&t.look!=="handDrawn"){const i=u.node()?.ownerSVGElement?.id??"",n=i?`${i}-drop-shadow-small`:"drop-shadow-small";f.attr("style",`filter:url(#${n})`)}return L(t,f),t.intersect=function(i){return N.circle(t,(t.width??7)/2,i)},l}async function ea(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t?.padding??8,l=t.look==="neo"?28:r,f=t.look==="neo"?12:r,{shapeSvg:i,bbox:n}=await Y(u,t,_(t)),e=(t?.width??n.width)+2*wt+l,s=(t?.height??n.height)+f,a=e-2*wt,o=s,c=-e/2,y=-s/2,p=[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}];if(t.look==="handDrawn"){const d=H.svg(i),w=I(t,{}),m=d.rectangle(c,y,a+16,o,w),x=d.line(c+wt,y,c+wt,y+o,w),S=d.line(c+wt+a,y,c+wt+a,y+o,w);i.insert(()=>x,":first-child"),i.insert(()=>S,":first-child");const b=i.insert(()=>m,":first-child"),{cssStyles:P}=t;b.attr("class","basic label-container").attr("style",K(P)),L(t,b)}else{const d=ot(i,a,o,p);h&&d.attr("style",h),L(t,d)}return t.intersect=function(d){return N.polygon(t,p,d)},i}async function ia(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?16:r,f=t.look==="neo"?12:r;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-f*2,10),t.width=Math.max((t?.width??0)-l*2-At*(t.height+f*2),10));const{shapeSvg:i,bbox:n}=await Y(u,t,_(t)),e=(t?.height?t?.height:n.height)+f*2,s=At*e,a=At*e,o=(t?.width?t?.width:n.width)+l*2+s-s,c=e,y=-o/2,p=-c/2,{cssStyles:d}=t,w=H.svg(i),m=I(t,{}),x=[{x:y-s/2,y:p},{x:y+o+s/2,y:p},{x:y+o+s/2,y:p+c},{x:y-s/2,y:p+c}],S=[{x:y+o-s/2,y:p+c},{x:y+o+s/2,y:p+c},{x:y+o+s/2,y:p+c-a}];t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=j(x),P=w.path(b,m),k=j(S),v=w.path(k,{...m,fillStyle:"solid"}),B=i.insert(()=>v,":first-child");return B.insert(()=>P,":first-child"),B.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),h&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",h),L(t,B),t.intersect=function(A){return N.polygon(t,x,A)},i}async function la(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const{shapeSvg:r,bbox:l,label:f}=await Y(u,t,_(t)),i=Math.max(l.width+(t.padding??0)*2,t?.width??0),n=Math.max(l.height+(t.padding??0)*2,t?.height??0),e=n/8,s=.2*i,a=.2*n,o=n+e,{cssStyles:c}=t,y=H.svg(r),p=I(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=[{x:-i/2-i/2*.1,y:o/2},...pt(-i/2-i/2*.1,o/2,i/2+i/2*.1,o/2,e,.8),{x:i/2+i/2*.1,y:-o/2},{x:-i/2-i/2*.1,y:-o/2}],w=-i/2+i/2*.1,m=-o/2-a*.4,x=[{x:w+i-s,y:(m+n)*1.3},{x:w+i,y:m+n-a},{x:w+i,y:(m+n)*.9},...pt(w+i,(m+n)*1.25,w+i-s,(m+n)*1.3,-n*.02,.5)],S=j(d),b=y.path(S,p),P=j(x),k=y.path(P,{...p,fillStyle:"solid"}),v=r.insert(()=>k,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",c),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),v.attr("transform",`translate(0,${-e/2})`),f.attr("transform",`translate(${-i/2+(t.padding??0)-(l.x-(l.left??0))},${-n/2+(t.padding??0)-e/2-(l.y-(l.top??0))})`),L(t,v),t.intersect=function(B){return N.polygon(t,d,B)},r}async function ra(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const{shapeSvg:r,bbox:l}=await Y(u,t,_(t)),f=Math.max(l.width+(t.padding??0),t?.width||0),i=Math.max(l.height+(t.padding??0),t?.height||0),n=-f/2,e=-i/2,s=r.insert("rect",":first-child");return s.attr("class","text").attr("style",h).attr("rx",0).attr("ry",0).attr("x",n).attr("y",e).attr("width",f).attr("height",i),L(t,s),t.intersect=function(a){return N.rect(t,a)},r}async function na(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?12:r/2;if(t.width||t.height){const p=t.height??0;t.height=(t.height??0)-l,t.height<Qt&&(t.height=Qt);const d=p/2/(2.5+p/50);t.width=(t.width??0)-l-d*3,t.width<Ut&&(t.width=Ut)}const{shapeSvg:f,bbox:i,label:n}=await Y(u,t,_(t)),e=(t.height?t.height:i.height)+l,s=e/2,a=s/(2.5+e/50),o=(t.width?t.width:i.width)+a+l,{cssStyles:c}=t;let y;if(t.look==="handDrawn"){const p=H.svg(f),d=_a(0,0,o,e,a,s),w=Xa(0,0,o,e,a,s),m=p.path(d,I(t,{})),x=p.path(w,I(t,{fill:"none"}));y=f.insert(()=>x,":first-child"),y=f.insert(()=>m,":first-child"),y.attr("class","basic label-container"),c&&y.attr("style",c)}else{const p=Wa(0,0,o,e,a,s);y=f.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",K(c)).attr("style",h),y.attr("class","basic label-container outer-path"),c&&y.selectAll("path").attr("style",c),h&&y.selectAll("path").attr("style",h)}return y.attr("label-offset-x",a),y.attr("transform",`translate(${-o/2}, ${e/2} )`),n.attr("transform",`translate(${-(i.width/2)-a-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),L(t,y),t.intersect=function(p){const d=N.rect(t,p),w=d.y-(t.y??0);if(s!=0&&(Math.abs(w)<(t.height??0)/2||Math.abs(w)==(t.height??0)/2&&Math.abs(d.x-(t.x??0))>(t.width??0)/2-a)){let m=a*a*(1-w*w/(s*s));m!=0&&(m=Math.sqrt(Math.abs(m))),m=a-m,p.x-(t.x??0)>0&&(m=-m),d.x+=m}return d},f}async function ca(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=(t.look==="neo",r),f=t.look==="neo"?r*2:r,{shapeSvg:i,bbox:n}=await Y(u,t,_(t)),e=(t?.height??n.height)+l,s=(t?.width??n.width)+f,a=[{x:-3*e/6,y:0},{x:s+3*e/6,y:0},{x:s,y:-e},{x:0,y:-e}];let o;const{cssStyles:c}=t;if(t.look==="handDrawn"){const y=H.svg(i),p=I(t,{}),d=j(a),w=y.path(d,p);o=i.insert(()=>w,":first-child").attr("transform",`translate(${-s/2}, ${e/2})`),c&&o.attr("style",c)}else o=ot(i,s,e,a);return h&&o.attr("style",h),t.width=s,t.height=e,L(t,o),t.intersect=function(y){return N.polygon(t,a,y)},i}async function oa(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?16:r,f=t.look==="neo"?12:r,i=15,n=5;(t.width||t.height)&&(t.height=(t.height??0)-f*2,t.height<n&&(t.height=n),t.width=(t.width??0)-l*2,t.width<i&&(t.width=i));const{shapeSvg:e,bbox:s}=await Y(u,t,_(t)),a=(t?.width?t?.width:s.width)+l*2,o=(t?.height?t?.height:s.height)+f*2,{cssStyles:c}=t,y=H.svg(e),p=I(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=[{x:-a/2*.8,y:-o/2},{x:a/2*.8,y:-o/2},{x:a/2,y:-o/2*.6},{x:a/2,y:o/2},{x:-a/2,y:o/2},{x:-a/2,y:-o/2*.6}],w=j(d),m=y.path(w,p),x=e.insert(()=>m,":first-child");return x.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",c),h&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",h),L(t,x),t.intersect=function(S){return N.polygon(t,d,S)},e}async function ha(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?r*2:r;(t.width||t.height)&&(t.width=((t?.width??0)-l)/2,t.width<ts&&(t.width=ts),t.height=t?.height??0,t.height<Kt&&(t.height=Kt));const{shapeSvg:f,bbox:i,label:n}=await Y(u,t,_(t)),e=bt(J().flowchart?.htmlLabels),s=(t?.width?t?.width:i.width)+l,a=t?.height?t?.height:s+i.height,o=a,c=[{x:0,y:0},{x:o,y:0},{x:o/2,y:-a}],{cssStyles:y}=t,p=H.svg(f),d=I(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const w=j(c),m=p.path(w,d),x=f.insert(()=>m,":first-child").attr("transform",`translate(${-a/2}, ${a/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",y),h&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",h),t.width=s,t.height=a,L(t,x),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${a/2-(i.height+(t.padding??0)/(e?2:1)-(i.y-(i.top??0)))})`),t.intersect=function(S){return F.info("Triangle intersect",t,c,S),N.polygon(t,c,S)},f}async function ga(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?16:r,f=t.look==="neo"?12:r;let i=!0;(t.width||t.height)&&(i=!1,t.width=(t?.width??0)-l*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-f*2,t.height<10&&(t.height=10));const{shapeSvg:n,bbox:e,label:s}=await Y(u,t,_(t)),a=(t?.width?t?.width:e.width)+(l??0)*2,o=(t?.height?t?.height:e.height)+(f??0)*2,c=t.look==="neo"?o/4:o/8,y=o+(i?c:-c),{cssStyles:p}=t,d=14-a,w=d>0?d/2:0,m=H.svg(n),x=I(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=[{x:-a/2-w,y:y/2},...pt(-a/2-w,y/2,a/2+w,y/2,c,.8),{x:a/2+w,y:-y/2},{x:-a/2-w,y:-y/2}],b=j(S),P=m.path(b,x),k=n.insert(()=>P,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),k.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))},${-o/2+(t.padding??0)-c-(e.y-(e.top??0))})`),L(t,k),t.intersect=function(v){return N.polygon(t,S,v)},n}async function fa(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.padding??0,l=t.look==="neo"?16:r,f=t.look==="neo"?20:r;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-f-S*(20/9)),t.width=t.width-l*2}const{shapeSvg:i,bbox:n}=await Y(u,t,_(t)),e=(t?.width?t?.width:n.width)+l*2,s=(t?.height?t?.height:n.height)+f,a=s/8,o=s+a*2,{cssStyles:c}=t,y=H.svg(i),p=I(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=[{x:-e/2,y:o/2},...pt(-e/2,o/2,e/2,o/2,a,1),{x:e/2,y:-o/2},...pt(e/2,-o/2,-e/2,-o/2,a,-1)],w=j(d),m=y.path(w,p),x=i.insert(()=>m,":first-child");return x.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",c),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),L(t,x),t.intersect=function(S){return N.polygon(t,d,S)},i}async function ya(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-r*2-V,10),t.height=Math.max((t?.height??0)-l*2-V,10));const{shapeSvg:f,bbox:i,label:n}=await Y(u,t,_(t)),e=(t?.width?t?.width:i.width)+r*2+V,s=(t?.height?t?.height:i.height)+l*2+V,a=e-V,o=s-V,c=-a/2,y=-o/2,{cssStyles:p}=t,d=H.svg(f),w=I(t,{}),m=[{x:c-V,y:y-V},{x:c-V,y:y+o},{x:c+a,y:y+o},{x:c+a,y:y-V}],x=`M${c-V},${y-V} L${c+a},${y-V} L${c+a},${y+o} L${c-V},${y+o} L${c-V},${y-V}
3
3
  M${c-V},${y} L${c+a},${y}
4
4
  M${c},${y-V} L${c},${y+o}`;t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=d.path(x,w),b=f.insert(()=>S,":first-child");return b.attr("transform",`translate(${V/2}, ${V/2})`),b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),n.attr("transform",`translate(${-(i.width/2)+V/2-(i.x-(i.left??0))}, ${-(i.height/2)+V/2-(i.y-(i.top??0))})`),L(t,b),t.intersect=function(P){return N.polygon(t,m,P)},f}async function jt(u,t){const g=t;g.alias&&(t.label=g.alias);const{theme:h,themeVariables:r}=Bt(),{rowEven:l,rowOdd:f,nodeBorder:i,borderColorArray:n}=r;if(t.look==="handDrawn"){const{themeVariables:O}=Bt(),{background:G}=O;await jt(u,{...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${G}`]})}const e=Bt();t.useHtmlLabels=e.htmlLabels;let s=e.er?.diagramPadding??10,a=e.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:c,nodeStyles:y}=E(t);if(g.attributes.length===0&&t.label){const O={rx:0,ry:0,labelPaddingX:s,labelPaddingY:s*1.5,classes:""};Ht(t.label,e)+O.labelPaddingX*2<e.er.minEntityWidth&&(t.width=e.er.minEntityWidth);const G=await St(u,t,O);if(h!=null&&ss.has(h)){const tt=g.colorIndex??0;G.attr("data-color-id",`color-${tt%n.length}`)}if(!bt(e.htmlLabels)){const tt=G.select("text"),st=tt.node()?.getBBox();tt.attr("transform",`translate(${-st.width/2}, 0)`)}return G}e.htmlLabels||(s*=1.25,a*=1.25);let p=_(t);p||(p="node default");const d=u.insert("g").attr("class",p).attr("id",t.domId||t.id),w=await mt(d,t.label??"",e,0,0,["name"],c);w.height+=a;let m=0;const x=[],S=[];let b=0,P=0,k=0,v=0,B=!0,A=!0;for(const O of g.attributes){const G=await mt(d,O.type,e,0,m,["attribute-type"],c);b=Math.max(b,G.width+s);const tt=await mt(d,O.name,e,0,m,["attribute-name"],c);P=Math.max(P,tt.width+s);const st=await mt(d,O.keys.join(),e,0,m,["attribute-keys"],c);k=Math.max(k,st.width+s);const kt=await mt(d,O.comment,e,0,m,["attribute-comment"],c);v=Math.max(v,kt.width+s);const gt=Math.max(G.height,tt.height,st.height,kt.height)+a;S.push({yOffset:m,rowHeight:gt}),m+=gt}let W=4;k<=s&&(B=!1,k=0,W--),v<=s&&(A=!1,v=0,W--);const X=d.node().getBBox();if(w.width+s*2-(b+P+k+v)>0){const O=w.width+s*2-(b+P+k+v);b+=O/W,P+=O/W,k>0&&(k+=O/W),v>0&&(v+=O/W)}const C=b+P+k+v,M=H.svg(d),D=I(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let T=0;S.length>0&&(T=S.reduce((O,G)=>O+(G?.rowHeight??0),0));const R=Math.max(X.width+s*2,t?.width||0,C),q=Math.max((T??0)+w.height,t?.height||0),z=-R/2,Z=-q/2;if(d.selectAll("g:not(:first-child)").each((O,G,tt)=>{const st=U(tt[G]),kt=st.attr("transform");let gt=0,es=0;if(kt){const Et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(kt);Et&&(gt=parseFloat(Et[1]),es=parseFloat(Et[2]),st.attr("class").includes("attribute-name")?gt+=b:st.attr("class").includes("attribute-keys")?gt+=b+P:st.attr("class").includes("attribute-comment")&&(gt+=b+P+k))}st.attr("transform",`translate(${z+s/2+gt}, ${es+Z+w.height+a/2})`)}),d.select(".name").attr("transform","translate("+-w.width/2+", "+(Z+a/2)+")"),h!=null&&ss.has(h)){const O=g.colorIndex??0;d.attr("data-color-id",`color-${O%n.length}`)}const $t=M.rectangle(z,Z,R,q,D),ht=d.insert(()=>$t,":first-child").attr("class","outer-path").attr("style",o.join(""));x.push(0);for(const[O,G]of S.entries()){const tt=(O+1)%2===0&&G.yOffset!==0,st=M.rectangle(z,w.height+Z+G?.yOffset,R,G?.rowHeight,{...D,fill:tt?l:f,stroke:i});d.insert(()=>st,"g.label").attr("style",o.join("")).attr("class",`row-rect-${tt?"even":"odd"}`)}const ut=1e-4;let at=xt(z,w.height+Z,R+z,w.height+Z,ut),lt=M.polygon(at.map(O=>[O.x,O.y]),D);if(d.insert(()=>lt).attr("class","divider"),at=xt(b+z,w.height+Z,b+z,q+Z,ut),lt=M.polygon(at.map(O=>[O.x,O.y]),D),d.insert(()=>lt).attr("class","divider"),B){const O=b+P+z;at=xt(O,w.height+Z,O,q+Z,ut),lt=M.polygon(at.map(G=>[G.x,G.y]),D),d.insert(()=>lt).attr("class","divider")}if(A){const O=b+P+k+z;at=xt(O,w.height+Z,O,q+Z,ut),lt=M.polygon(at.map(G=>[G.x,G.y]),D),d.insert(()=>lt).attr("class","divider")}for(const O of x){const G=w.height+Z+O;at=xt(z,G,R+z,G,ut),lt=M.polygon(at.map(tt=>[tt.x,tt.y]),D),d.insert(()=>lt).attr("class","divider")}if(L(t,ht),y&&t.look!=="handDrawn")if(h!=null&&Ya.has(h))d.selectAll("path").attr("style",y);else{const O=y.split(";")?.filter(G=>G.includes("stroke"))?.map(G=>`${G}`).join("; ");d.selectAll("path").attr("style",O??""),d.selectAll(".row-rect-even path").attr("style",y)}return t.intersect=function(O){return N.rect(t,O)},d}async function mt(u,t,g,h=0,r=0,l=[],f=""){const i=u.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${h}, ${r})`).attr("style",f);t!==ls(t)&&(t=ls(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const n=i.node().appendChild(await yt(i,t,{width:Ht(t,g)+100,style:f,useHtmlLabels:g.htmlLabels},g));if(t.includes("&lt;")||t.includes("&gt;")){let s=n.children[0];for(s.textContent=s.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");s.childNodes[0];)s=s.childNodes[0],s.textContent=s.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let e=n.getBBox();if(bt(g.htmlLabels)){const s=n.children[0];s.style.textAlign="start";const a=U(n);e=s.getBoundingClientRect(),a.attr("width",e.width),a.attr("height",e.height)}return e}function xt(u,t,g,h,r){return u===g?[{x:u-r/2,y:t},{x:u+r/2,y:t},{x:g+r/2,y:h},{x:g-r/2,y:h}]:[{x:u,y:t-r/2},{x:u,y:t+r/2},{x:g,y:h+r/2},{x:g,y:h-r/2}]}async function Ma(u,t,g,h,r=g.class.padding??12){const l=h?0:3,f=u.insert("g").attr("class",_(t)).attr("id",t.domId||t.id);let i=null,n=null,e=null,s=null,a=0,o=0,c=0;if(i=f.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const m=t.annotations[0];await vt(i,{text:`«${m}»`},0),a=i.node().getBBox().height}n=f.insert("g").attr("class","label-group text"),await vt(n,t,0,["font-weight: bolder"]);const y=n.node().getBBox();o=y.height,e=f.insert("g").attr("class","members-group text");let p=0;for(const m of t.members){const x=await vt(e,m,p,[m.parseClassifier()]);p+=x+l}c=e.node().getBBox().height,c<=0&&(c=r/2),s=f.insert("g").attr("class","methods-group text");let d=0;for(const m of t.methods){const x=await vt(s,m,d,[m.parseClassifier()]);d+=x+l}let w=f.node().getBBox();if(i!==null){const m=i.node().getBBox();i.attr("transform",`translate(${-m.width/2})`)}return n.attr("transform",`translate(${-y.width/2}, ${a})`),w=f.node().getBBox(),e.attr("transform",`translate(0, ${a+o+r*2})`),w=f.node().getBBox(),s.attr("transform",`translate(0, ${a+o+(c?c+r*4:r*2)})`),w=f.node().getBBox(),{shapeSvg:f,bbox:w}}async function vt(u,t,g,h=[]){const r=u.insert("g").attr("class","label").attr("style",h.join("; ")),l=Bt();let f="useHtmlLabels"in t?t.useHtmlLabels:bt(l.htmlLabels)??!0,i="";"text"in t?i=t.text:i=t.label,!f&&i.startsWith("\\")&&(i=i.substring(1)),qa(i)&&(f=!0);const n=await yt(r,Pa(Rt(i)),{width:Ht(i,l)+50,classes:"markdown-node-label",useHtmlLabels:f},l);let e,s=1;if(f){const a=n.children[0],o=U(n);s=a.innerHTML.split("<br>").length,a.innerHTML.includes("</math>")&&(s+=a.innerHTML.split("<mrow>").length-1);const c=a.getElementsByTagName("img");if(c){const y=i.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...c].map(p=>new Promise(d=>{function w(){if(p.style.display="flex",p.style.flexDirection="column",y){const m=l.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,x=parseInt(m,10)*5+"px";p.style.minWidth=x,p.style.maxWidth=x}else p.style.width="100%";d(p)}$(w,"setupImage"),setTimeout(()=>{p.complete&&w()}),p.addEventListener("error",w),p.addEventListener("load",w)})))}e=a.getBoundingClientRect(),o.attr("width",e.width),o.attr("height",e.height)}else{h.includes("font-weight: bolder")&&U(n).selectAll("tspan").attr("font-weight",""),s=n.children.length;const a=n.children[0];(n.textContent===""||n.textContent.includes("&gt"))&&(a.textContent=i[0]+i.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),i[1]===" "&&(a.textContent=a.textContent[0]+" "+a.textContent.substring(1))),a.textContent==="undefined"&&(a.textContent=""),e=n.getBBox()}return r.attr("transform","translate(0,"+(-e.height/(2*s)+g)+")"),e.height}async function pa(u,t){const g=J(),{themeVariables:h}=g,{useGradient:r}=h,l=g.class.padding??12,f=l,i=t.useHtmlLabels??bt(g.htmlLabels)??!0,n=t;n.annotations=n.annotations??[],n.members=n.members??[],n.methods=n.methods??[];const{shapeSvg:e,bbox:s}=await Ma(u,t,g,i,f),{labelStyles:a,nodeStyles:o}=E(t);t.labelStyle=a,t.cssStyles=n.styles||"";const c=n.styles?.join(";")||o||"";t.cssStyles||(t.cssStyles=c.replaceAll("!important","").split(";"));const y=n.members.length===0&&n.methods.length===0&&!g.class?.hideEmptyMembersBox,p=H.svg(e),d=I(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const w=Math.max(t.width??0,s.width);let m=Math.max(t.height??0,s.height);const x=(t.height??0)>s.height;n.members.length===0&&n.methods.length===0?m+=f:n.members.length>0&&n.methods.length===0&&(m+=f*2);const S=-w/2,b=-m/2;let P=y?l*2:n.members.length===0&&n.methods.length===0?-l:0;x&&(P=l*2);const k=p.rectangle(S-l,b-l-(y?l:n.members.length===0&&n.methods.length===0?-l/2:0),w+2*l,m+2*l+P,d),v=e.insert(()=>k,":first-child");v.attr("class","basic label-container outer-path");const B=v.node().getBBox(),A=e.select(".annotation-group").node().getBBox().height-(y?l/2:0)||0,W=e.select(".label-group").node().getBBox().height-(y?l/2:0)||0,X=e.select(".members-group").node().getBBox().height-(y?l/2:0)||0,C=(A+W+b+l-(b-l-(y?l:n.members.length===0&&n.methods.length===0?-l/2:0)))/2;if(e.selectAll(".text").each((M,D,T)=>{const R=U(T[D]),q=R.attr("transform");let z=0;if(q){const ht=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);ht&&(z=parseFloat(ht[2]))}let Z=z+b+l-(y?l:n.members.length===0&&n.methods.length===0?-l/2:0);if(R.attr("class").includes("methods-group")){const ht=Math.max(X,f/2);x?Z=Math.max(C,A+W+ht+b+f*2+l)+f*2:Z=A+W+ht+b+f*4+l}n.members.length===0&&n.methods.length===0&&g.class?.hideEmptyMembersBox&&(n.annotations.length>0?Z=z-f:Z=z),i||(Z-=4);let $t=S;(R.attr("class").includes("label-group")||R.attr("class").includes("annotation-group"))&&($t=-R.node()?.getBBox().width/2||0,e.selectAll("text").each(function(ht,ut,at){window.getComputedStyle(at[ut]).textAnchor==="middle"&&($t=0)})),R.attr("transform",`translate(${$t}, ${Z})`)}),n.members.length>0||n.methods.length>0||y){const M=A+W+b+l,D=p.line(B.x,M,B.x+B.width,M+.001,d);e.insert(()=>D).attr("class",`divider${t.look==="neo"&&!r?" neo-line":""}`).attr("style",c)}if(y||n.members.length>0||n.methods.length>0){const M=A+W+X+b+f*2+l,D=p.line(B.x,x?Math.max(C,M):M,B.x+B.width,(x?Math.max(C,M):M)+.001,d);e.insert(()=>D).attr("class",`divider${t.look==="neo"&&!r?" neo-line":""}`).attr("style",c)}if(n.look!=="handDrawn"&&e.selectAll("path").attr("style",c),v.select(":nth-child(2)").attr("style",c),e.selectAll(".divider").select("path").attr("style",c),t.labelStyle?e.selectAll("span").attr("style",t.labelStyle):e.selectAll("span").attr("style",c),!i){const M=RegExp(/color\s*:\s*([^;]*)/),D=M.exec(c);if(D){const T=D[0].replace("color","fill");e.selectAll("tspan").attr("style",T)}else if(a){const T=M.exec(a);if(T){const R=T[0].replace("color","fill");e.selectAll("tspan").attr("style",R)}}}return L(t,v),t.intersect=function(M){return N.rect(t,M)},e}async function ua(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const r=t,l=t,f=20,i=20,n="verifyMethod"in t,e=_(t),{themeVariables:s}=J(),{borderColorArray:a,requirementEdgeLabelBackground:o}=s,c=u.insert("g").attr("class",e).attr("id",t.domId??t.id);let y;n?y=await it(c,`&lt;&lt;${r.type}&gt;&gt;`,0,t.labelStyle):y=await it(c,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let p=y;const d=await it(c,r.name,p,t.labelStyle+"; font-weight: bold;");if(p+=d+i,n){const B=await it(c,`${r.requirementId?`ID: ${r.requirementId}`:""}`,p,t.labelStyle);p+=B;const A=await it(c,`${r.text?`Text: ${r.text}`:""}`,p,t.labelStyle);p+=A;const W=await it(c,`${r.risk?`Risk: ${r.risk}`:""}`,p,t.labelStyle);p+=W,await it(c,`${r.verifyMethod?`Verification: ${r.verifyMethod}`:""}`,p,t.labelStyle)}else{const B=await it(c,`${l.type?`Type: ${l.type}`:""}`,p,t.labelStyle);p+=B,await it(c,`${l.docRef?`Doc Ref: ${l.docRef}`:""}`,p,t.labelStyle)}const w=(c.node()?.getBBox().width??200)+f,m=(c.node()?.getBBox().height??200)+f,x=-w/2,S=-m/2,b=H.svg(c),P=I(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");const k=b.rectangle(x,S,w,m,P),v=c.insert(()=>k,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",h),a?.length){const B=t.colorIndex??0;c.attr("data-color-id",`color-${B%a.length}`)}if(c.selectAll(".label").each((B,A,W)=>{const X=U(W[A]),C=X.attr("transform");let M=0,D=0;if(C){const q=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(C);q&&(M=parseFloat(q[1]),D=parseFloat(q[2]))}const T=D-m/2;let R=x+f/2;(A===0||A===1)&&(R=M),X.attr("transform",`translate(${R}, ${T+f})`)}),p>y+d+i){const B=S+y+d+i;let A;if(t.look==="neo"){const X=[[x,B],[x+w,B],[x+w,B+.001],[x,B+.001]];A=b.polygon(X,P)}else A=b.line(x,B,x+w,B,P);c.insert(()=>A).attr("class","divider")}return L(t,v),t.intersect=function(B){return N.rect(t,B)},h&&t.look!=="handDrawn"&&(o||a?.length)&&c.selectAll("path").attr("style",h),c}async function it(u,t,g,h=""){if(t==="")return 0;const r=u.insert("g").attr("class","label").attr("style",h),l=J(),f=l.htmlLabels??!0,i=await yt(r,Pa(Rt(t)),{width:Ht(t,l)+50,classes:"markdown-node-label",useHtmlLabels:f,style:h},l);let n;if(f){const e=i.children[0],s=U(i);n=e.getBoundingClientRect(),s.attr("width",n.width),s.attr("height",n.height)}else{const e=i.children[0];for(const s of e.children)h&&s.setAttribute("style",h);n=i.getBBox(),n.height+=6}return r.attr("transform",`translate(${-n.width/2},${-n.height/2+g})`),n.height}async function da(u,t,{config:g}){const{labelStyles:h,nodeStyles:r}=E(t);t.labelStyle=h||"";const l=10,f=t.width;t.width=(t.width??200)-10;const{shapeSvg:i,bbox:n,label:e}=await Y(u,t,_(t)),s=t.padding||10;let a="",o;"ticket"in t&&t.ticket&&g?.kanban?.ticketBaseUrl&&(a=g?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),o=i.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",a).attr("target","_blank"));const c={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,p;o?{label:y,bbox:p}=await Ct(o,"ticket"in t&&t.ticket||"",c):{label:y,bbox:p}=await Ct(i,"ticket"in t&&t.ticket||"",c);const{label:d,bbox:w}=await Ct(i,"assigned"in t&&t.assigned||"",c);t.width=f;const m=10,x=t?.width||0,S=Math.max(p.height,w.height)/2,b=Math.max(n.height+m*2,t?.height||0)+S,P=-x/2,k=-b/2;e.attr("transform","translate("+(s-x/2)+", "+(-S-n.height/2)+")"),y.attr("transform","translate("+(s-x/2)+", "+(-S+n.height/2)+")"),d.attr("transform","translate("+(s+x/2-w.width-2*l)+", "+(-S+n.height/2)+")");let v;const{rx:B,ry:A}=t,{cssStyles:W}=t;if(t.look==="handDrawn"){const X=H.svg(i),C=I(t,{}),M=B||A?X.path(ct(P,k,x,b,B||0),C):X.rectangle(P,k,x,b,C);v=i.insert(()=>M,":first-child"),v.attr("class","basic label-container").attr("style",W||null)}else{v=i.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",r).attr("rx",B??5).attr("ry",A??5).attr("x",P).attr("y",k).attr("width",x).attr("height",b);const X="priority"in t&&t.priority;if(X){const C=i.append("line"),M=P+2,D=k+Math.floor((B??0)/2),T=k+b-Math.floor((B??0)/2);C.attr("x1",M).attr("y1",D).attr("x2",M).attr("y2",T).attr("stroke-width","4").attr("stroke",Oa(X))}}return L(t,v),t.height=b,t.intersect=function(X){return N.rect(t,X)},i}async function wa(u,t){const{labelStyles:g,nodeStyles:h}=E(t);t.labelStyle=g;const{shapeSvg:r,bbox:l,halfPadding:f,label:i}=await Y(u,t,_(t)),n=l.width+10*f,e=l.height+8*f,s=.15*n,{cssStyles:a}=t,o=l.width+20,c=l.height+20,y=Math.max(n,o),p=Math.max(e,c);i.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`);let d;const w=`M0 0
@@ -1 +1 @@
1
- import{wa as t}from"./index-DnjQJzX4.js";import{Bt as e,Vt as o}from"./src-BihFroE7.js";function n(i,c){i.accDescr&&c.setAccDescription?.(i.accDescr),i.accTitle&&c.setAccTitle?.(i.accTitle),i.title&&c.setDiagramTitle?.(i.title)}var r=t((()=>{o(),e(n,"populateCommonDb")}));export{n,r as t};
1
+ import{wa as t}from"./index-DN4SafrP.js";import{Bt as e,Vt as o}from"./src-DD_TpJde.js";function n(i,c){i.accDescr&&c.setAccDescription?.(i.accDescr),i.accTitle&&c.setAccTitle?.(i.accTitle),i.title&&c.setDiagramTitle?.(i.title)}var r=t((()=>{o(),e(n,"populateCommonDb")}));export{n,r as t};
@@ -1 +1 @@
1
- import{wa as s}from"./index-DnjQJzX4.js";import{Bt as i,Vt as o,jt as t,t as m}from"./src-BihFroE7.js";var r,l=s((()=>{o(),m(),r=i((a,e)=>{let n;return e==="sandbox"&&(n=t("#i"+a)),(e==="sandbox"?t(n.nodes()[0].contentDocument.body):t("body")).select(`[id="${a}"]`)},"getDiagramElement")}));export{l as n,r as t};
1
+ import{wa as s}from"./index-DN4SafrP.js";import{Bt as i,Vt as o,jt as t,t as m}from"./src-DD_TpJde.js";var r,l=s((()=>{o(),m(),r=i((a,e)=>{let n;return e==="sandbox"&&(n=t("#i"+a)),(e==="sandbox"?t(n.nodes()[0].contentDocument.body):t("body")).select(`[id="${a}"]`)},"getDiagramElement")}));export{l as n,r as t};