@rubytech/create-maxy-code 0.1.296 → 0.1.298

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 (238) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/models/dist/index.d.ts +7 -0
  3. package/payload/platform/lib/models/dist/index.d.ts.map +1 -1
  4. package/payload/platform/lib/models/dist/index.js +16 -1
  5. package/payload/platform/lib/models/dist/index.js.map +1 -1
  6. package/payload/platform/lib/models/src/index.ts +16 -0
  7. package/payload/platform/plugins/admin/.claude-plugin/plugin.json +5 -1
  8. package/payload/platform/plugins/admin/lib/mcp-spawn-tee/index.js +159 -0
  9. package/payload/platform/plugins/admin/lib/mcp-spawn-tee/package.json +3 -0
  10. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +4 -14
  11. package/payload/platform/plugins/aeo/.claude-plugin/plugin.json +5 -1
  12. package/payload/platform/plugins/aeo/lib/mcp-spawn-tee/index.js +159 -0
  13. package/payload/platform/plugins/aeo/lib/mcp-spawn-tee/package.json +3 -0
  14. package/payload/platform/plugins/browser/.claude-plugin/plugin.json +5 -1
  15. package/payload/platform/plugins/browser/lib/mcp-spawn-tee/index.js +159 -0
  16. package/payload/platform/plugins/browser/lib/mcp-spawn-tee/package.json +3 -0
  17. package/payload/platform/plugins/contacts/.claude-plugin/plugin.json +5 -1
  18. package/payload/platform/plugins/contacts/lib/mcp-spawn-tee/index.js +159 -0
  19. package/payload/platform/plugins/contacts/lib/mcp-spawn-tee/package.json +3 -0
  20. package/payload/platform/plugins/docs/references/admin-ui.md +1 -1
  21. package/payload/platform/plugins/docs/references/getting-started.md +1 -1
  22. package/payload/platform/plugins/docs/references/platform.md +1 -11
  23. package/payload/platform/plugins/email/.claude-plugin/plugin.json +6 -2
  24. package/payload/platform/plugins/email/PLUGIN.md +14 -2
  25. package/payload/platform/plugins/email/lib/mcp-spawn-tee/index.js +159 -0
  26. package/payload/platform/plugins/email/lib/mcp-spawn-tee/package.json +3 -0
  27. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft-edit.test.d.ts +2 -0
  28. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft-edit.test.d.ts.map +1 -0
  29. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft-edit.test.js +71 -0
  30. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft-edit.test.js.map +1 -0
  31. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft-send.test.d.ts +2 -0
  32. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft-send.test.d.ts.map +1 -0
  33. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft-send.test.js +95 -0
  34. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft-send.test.js.map +1 -0
  35. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft.test.d.ts +2 -0
  36. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft.test.d.ts.map +1 -0
  37. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft.test.js +129 -0
  38. package/payload/platform/plugins/email/mcp/dist/__tests__/email-draft.test.js.map +1 -0
  39. package/payload/platform/plugins/email/mcp/dist/__tests__/email-setup.test.js +58 -0
  40. package/payload/platform/plugins/email/mcp/dist/__tests__/email-setup.test.js.map +1 -1
  41. package/payload/platform/plugins/email/mcp/dist/__tests__/imap-drafts.test.d.ts +2 -0
  42. package/payload/platform/plugins/email/mcp/dist/__tests__/imap-drafts.test.d.ts.map +1 -0
  43. package/payload/platform/plugins/email/mcp/dist/__tests__/imap-drafts.test.js +165 -0
  44. package/payload/platform/plugins/email/mcp/dist/__tests__/imap-drafts.test.js.map +1 -0
  45. package/payload/platform/plugins/email/mcp/dist/__tests__/imap-probe.test.d.ts +2 -0
  46. package/payload/platform/plugins/email/mcp/dist/__tests__/imap-probe.test.d.ts.map +1 -0
  47. package/payload/platform/plugins/email/mcp/dist/__tests__/imap-probe.test.js +69 -0
  48. package/payload/platform/plugins/email/mcp/dist/__tests__/imap-probe.test.js.map +1 -0
  49. package/payload/platform/plugins/email/mcp/dist/__tests__/mail-options.test.d.ts +2 -0
  50. package/payload/platform/plugins/email/mcp/dist/__tests__/mail-options.test.d.ts.map +1 -0
  51. package/payload/platform/plugins/email/mcp/dist/__tests__/mail-options.test.js +46 -0
  52. package/payload/platform/plugins/email/mcp/dist/__tests__/mail-options.test.js.map +1 -0
  53. package/payload/platform/plugins/email/mcp/dist/__tests__/send-raw.test.d.ts +2 -0
  54. package/payload/platform/plugins/email/mcp/dist/__tests__/send-raw.test.d.ts.map +1 -0
  55. package/payload/platform/plugins/email/mcp/dist/__tests__/send-raw.test.js +38 -0
  56. package/payload/platform/plugins/email/mcp/dist/__tests__/send-raw.test.js.map +1 -0
  57. package/payload/platform/plugins/email/mcp/dist/__tests__/setup-probe.test.d.ts +2 -0
  58. package/payload/platform/plugins/email/mcp/dist/__tests__/setup-probe.test.d.ts.map +1 -0
  59. package/payload/platform/plugins/email/mcp/dist/__tests__/setup-probe.test.js +56 -0
  60. package/payload/platform/plugins/email/mcp/dist/__tests__/setup-probe.test.js.map +1 -0
  61. package/payload/platform/plugins/email/mcp/dist/__tests__/smtp-probe.test.d.ts +2 -0
  62. package/payload/platform/plugins/email/mcp/dist/__tests__/smtp-probe.test.d.ts.map +1 -0
  63. package/payload/platform/plugins/email/mcp/dist/__tests__/smtp-probe.test.js +46 -0
  64. package/payload/platform/plugins/email/mcp/dist/__tests__/smtp-probe.test.js.map +1 -0
  65. package/payload/platform/plugins/email/mcp/dist/index.js +118 -0
  66. package/payload/platform/plugins/email/mcp/dist/index.js.map +1 -1
  67. package/payload/platform/plugins/email/mcp/dist/lib/compose.d.ts +47 -0
  68. package/payload/platform/plugins/email/mcp/dist/lib/compose.d.ts.map +1 -0
  69. package/payload/platform/plugins/email/mcp/dist/lib/compose.js +75 -0
  70. package/payload/platform/plugins/email/mcp/dist/lib/compose.js.map +1 -0
  71. package/payload/platform/plugins/email/mcp/dist/lib/imap.d.ts +53 -3
  72. package/payload/platform/plugins/email/mcp/dist/lib/imap.d.ts.map +1 -1
  73. package/payload/platform/plugins/email/mcp/dist/lib/imap.js +179 -5
  74. package/payload/platform/plugins/email/mcp/dist/lib/imap.js.map +1 -1
  75. package/payload/platform/plugins/email/mcp/dist/lib/setup-probe.d.ts +42 -0
  76. package/payload/platform/plugins/email/mcp/dist/lib/setup-probe.d.ts.map +1 -0
  77. package/payload/platform/plugins/email/mcp/dist/lib/setup-probe.js +72 -0
  78. package/payload/platform/plugins/email/mcp/dist/lib/setup-probe.js.map +1 -0
  79. package/payload/platform/plugins/email/mcp/dist/lib/smtp.d.ts +34 -6
  80. package/payload/platform/plugins/email/mcp/dist/lib/smtp.d.ts.map +1 -1
  81. package/payload/platform/plugins/email/mcp/dist/lib/smtp.js +62 -20
  82. package/payload/platform/plugins/email/mcp/dist/lib/smtp.js.map +1 -1
  83. package/payload/platform/plugins/email/mcp/dist/scripts/send-transactional.js +1 -2
  84. package/payload/platform/plugins/email/mcp/dist/scripts/send-transactional.js.map +1 -1
  85. package/payload/platform/plugins/email/mcp/dist/tools/email-draft-edit.d.ts +9 -0
  86. package/payload/platform/plugins/email/mcp/dist/tools/email-draft-edit.d.ts.map +1 -0
  87. package/payload/platform/plugins/email/mcp/dist/tools/email-draft-edit.js +23 -0
  88. package/payload/platform/plugins/email/mcp/dist/tools/email-draft-edit.js.map +1 -0
  89. package/payload/platform/plugins/email/mcp/dist/tools/email-draft-send.d.ts +8 -0
  90. package/payload/platform/plugins/email/mcp/dist/tools/email-draft-send.d.ts.map +1 -0
  91. package/payload/platform/plugins/email/mcp/dist/tools/email-draft-send.js +52 -0
  92. package/payload/platform/plugins/email/mcp/dist/tools/email-draft-send.js.map +1 -0
  93. package/payload/platform/plugins/email/mcp/dist/tools/email-draft.d.ts +7 -0
  94. package/payload/platform/plugins/email/mcp/dist/tools/email-draft.d.ts.map +1 -0
  95. package/payload/platform/plugins/email/mcp/dist/tools/email-draft.js +17 -0
  96. package/payload/platform/plugins/email/mcp/dist/tools/email-draft.js.map +1 -0
  97. package/payload/platform/plugins/email/mcp/dist/tools/email-reply.d.ts.map +1 -1
  98. package/payload/platform/plugins/email/mcp/dist/tools/email-reply.js +1 -8
  99. package/payload/platform/plugins/email/mcp/dist/tools/email-reply.js.map +1 -1
  100. package/payload/platform/plugins/email/mcp/dist/tools/email-send.d.ts.map +1 -1
  101. package/payload/platform/plugins/email/mcp/dist/tools/email-send.js +2 -8
  102. package/payload/platform/plugins/email/mcp/dist/tools/email-send.js.map +1 -1
  103. package/payload/platform/plugins/email/mcp/dist/tools/email-setup.d.ts.map +1 -1
  104. package/payload/platform/plugins/email/mcp/dist/tools/email-setup.js +25 -3
  105. package/payload/platform/plugins/email/mcp/dist/tools/email-setup.js.map +1 -1
  106. package/payload/platform/plugins/email/references/email-reference.md +15 -0
  107. package/payload/platform/plugins/email/skills/email-composition/SKILL.md +26 -4
  108. package/payload/platform/plugins/memory/.claude-plugin/plugin.json +5 -1
  109. package/payload/platform/plugins/memory/lib/mcp-spawn-tee/index.js +159 -0
  110. package/payload/platform/plugins/memory/lib/mcp-spawn-tee/package.json +3 -0
  111. package/payload/platform/plugins/outlook/.claude-plugin/plugin.json +5 -1
  112. package/payload/platform/plugins/outlook/lib/mcp-spawn-tee/index.js +159 -0
  113. package/payload/platform/plugins/outlook/lib/mcp-spawn-tee/package.json +3 -0
  114. package/payload/platform/plugins/replicate/.claude-plugin/plugin.json +5 -1
  115. package/payload/platform/plugins/replicate/lib/mcp-spawn-tee/index.js +159 -0
  116. package/payload/platform/plugins/replicate/lib/mcp-spawn-tee/package.json +3 -0
  117. package/payload/platform/plugins/scheduling/.claude-plugin/plugin.json +5 -1
  118. package/payload/platform/plugins/scheduling/lib/mcp-spawn-tee/index.js +159 -0
  119. package/payload/platform/plugins/scheduling/lib/mcp-spawn-tee/package.json +3 -0
  120. package/payload/platform/plugins/telegram/.claude-plugin/plugin.json +5 -1
  121. package/payload/platform/plugins/telegram/lib/mcp-spawn-tee/index.js +159 -0
  122. package/payload/platform/plugins/telegram/lib/mcp-spawn-tee/package.json +3 -0
  123. package/payload/platform/plugins/url-get/.claude-plugin/plugin.json +5 -1
  124. package/payload/platform/plugins/url-get/lib/mcp-spawn-tee/index.js +159 -0
  125. package/payload/platform/plugins/url-get/lib/mcp-spawn-tee/package.json +3 -0
  126. package/payload/platform/plugins/whatsapp/.claude-plugin/plugin.json +5 -1
  127. package/payload/platform/plugins/whatsapp/lib/mcp-spawn-tee/index.js +159 -0
  128. package/payload/platform/plugins/whatsapp/lib/mcp-spawn-tee/package.json +3 -0
  129. package/payload/platform/plugins/work/.claude-plugin/plugin.json +5 -1
  130. package/payload/platform/plugins/work/lib/mcp-spawn-tee/index.js +159 -0
  131. package/payload/platform/plugins/work/lib/mcp-spawn-tee/package.json +3 -0
  132. package/payload/platform/plugins/workflows/.claude-plugin/plugin.json +5 -1
  133. package/payload/platform/plugins/workflows/lib/mcp-spawn-tee/index.js +159 -0
  134. package/payload/platform/plugins/workflows/lib/mcp-spawn-tee/package.json +3 -0
  135. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -1
  136. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +3 -0
  137. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
  138. package/payload/platform/services/claude-session-manager/dist/http-server.js +1 -1
  139. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  140. package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts +13 -0
  141. package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts.map +1 -1
  142. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js +71 -1
  143. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js.map +1 -1
  144. package/payload/platform/services/whatsapp-channel/dist/jsonl-watch.d.ts +10 -0
  145. package/payload/platform/services/whatsapp-channel/dist/jsonl-watch.d.ts.map +1 -0
  146. package/payload/platform/services/whatsapp-channel/dist/jsonl-watch.js +70 -0
  147. package/payload/platform/services/whatsapp-channel/dist/jsonl-watch.js.map +1 -0
  148. package/payload/platform/services/whatsapp-channel/dist/server.d.ts +6 -1
  149. package/payload/platform/services/whatsapp-channel/dist/server.d.ts.map +1 -1
  150. package/payload/platform/services/whatsapp-channel/dist/server.js +38 -1
  151. package/payload/platform/services/whatsapp-channel/dist/server.js.map +1 -1
  152. package/payload/platform/templates/specialists/agents/personal-assistant.md +1 -1
  153. package/payload/premium-plugins/writer-craft/.claude-plugin/plugin.json +5 -1
  154. package/payload/premium-plugins/writer-craft/lib/mcp-spawn-tee/index.js +159 -0
  155. package/payload/premium-plugins/writer-craft/lib/mcp-spawn-tee/package.json +3 -0
  156. package/payload/server/public/assets/AdminShell-BnhxfX97.js +1 -0
  157. package/payload/server/public/assets/{Checkbox-DTrIyIFP.js → Checkbox-CVPUf_7I.js} +1 -1
  158. package/payload/server/public/assets/{Transcript-C3aDVJ-n.js → Transcript-FYmq-mL1.js} +1 -1
  159. package/payload/server/public/assets/{admin-DVdyV-Q6.js → admin-CF8K3hqE.js} +1 -1
  160. package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-DR9W0q1P.js → architectureDiagram-Q4EWVU46-IVt2X8Dk.js} +1 -1
  161. package/payload/server/public/assets/audio-attachment-mime-DaInZ9sa.js +1 -0
  162. package/payload/server/public/assets/{blockDiagram-DXYQGD6D-C3uwaI7p.js → blockDiagram-DXYQGD6D-CQDngnsc.js} +1 -1
  163. package/payload/server/public/assets/browser-D_hZgtfv.js +1 -0
  164. package/payload/server/public/assets/{c4Diagram-AHTNJAMY-C8hmUDdd.js → c4Diagram-AHTNJAMY-BjV_YA-L.js} +1 -1
  165. package/payload/server/public/assets/channel-gFnUr8f4.js +1 -0
  166. package/payload/server/public/assets/chat-COcrNTJi.js +1 -0
  167. package/payload/server/public/assets/{chunk-336JU56O-BRCubMCb.js → chunk-336JU56O-B0yBhSVq.js} +2 -2
  168. package/payload/server/public/assets/{chunk-426QAEUC-BNINkVsL.js → chunk-426QAEUC-BCmWl6vi.js} +1 -1
  169. package/payload/server/public/assets/{chunk-4TB4RGXK-DSMj_AZh.js → chunk-4TB4RGXK-BImQYhPF.js} +1 -1
  170. package/payload/server/public/assets/{chunk-5FUZZQ4R-6DNGaUkf.js → chunk-5FUZZQ4R-DrDSHQZv.js} +1 -1
  171. package/payload/server/public/assets/{chunk-5PVQY5BW-DPhkkS4p.js → chunk-5PVQY5BW-CKX_LIok.js} +1 -1
  172. package/payload/server/public/assets/{chunk-EDXVE4YY-BjWSqn7_.js → chunk-EDXVE4YY-D1zHB217.js} +1 -1
  173. package/payload/server/public/assets/{chunk-ENJZ2VHE-BX1ZnU4A.js → chunk-ENJZ2VHE-SFpdtszU.js} +1 -1
  174. package/payload/server/public/assets/{chunk-ICPOFSXX-DvYSWH7x.js → chunk-ICPOFSXX-cYdq7RKF.js} +1 -1
  175. package/payload/server/public/assets/{chunk-OYMX7WX6-7_m3mEOK.js → chunk-OYMX7WX6-B7JLCext.js} +1 -1
  176. package/payload/server/public/assets/{chunk-U2HBQHQK-Bl1a895I.js → chunk-U2HBQHQK-DWCeFwem.js} +1 -1
  177. package/payload/server/public/assets/{chunk-X2U36JSP-WkSpBPYx.js → chunk-X2U36JSP-DGnHsoJ3.js} +1 -1
  178. package/payload/server/public/assets/{chunk-YZCP3GAM-DpWRmPUo.js → chunk-YZCP3GAM-sg4lGGJV.js} +1 -1
  179. package/payload/server/public/assets/{chunk-ZZ45TVLE-D9Dgmeso.js → chunk-ZZ45TVLE-DtUoGmKE.js} +1 -1
  180. package/payload/server/public/assets/classDiagram-6PBFFD2Q-C_wlfUTz.js +1 -0
  181. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-Ltv5s3OY.js +1 -0
  182. package/payload/server/public/assets/clone-D0XoXc_v.js +1 -0
  183. package/payload/server/public/assets/{dagre-PrVfCcSt.js → dagre-Dfj_jbTe.js} +1 -1
  184. package/payload/server/public/assets/{dagre-KV5264BT-DPq3dcLH.js → dagre-KV5264BT-Bd1VlhUJ.js} +1 -1
  185. package/payload/server/public/assets/data-DkbQI40a.js +1 -0
  186. package/payload/server/public/assets/{diagram-5BDNPKRD-DoszElKb.js → diagram-5BDNPKRD-Dqqyk8GE.js} +1 -1
  187. package/payload/server/public/assets/{diagram-G4DWMVQ6-BRuqosix.js → diagram-G4DWMVQ6-Xk3WKR_U.js} +1 -1
  188. package/payload/server/public/assets/{diagram-MMDJMWI5-CpigG1d_.js → diagram-MMDJMWI5-CAdGL9U7.js} +1 -1
  189. package/payload/server/public/assets/{diagram-TYMM5635-BS0eYiq9.js → diagram-TYMM5635-DY1iYQVY.js} +1 -1
  190. package/payload/server/public/assets/{erDiagram-SMLLAGMA-VEQyXCFl.js → erDiagram-SMLLAGMA-BJ5HYKeb.js} +1 -1
  191. package/payload/server/public/assets/{file-download-C3pBZjt9.js → file-download-BYJN3Kgm.js} +1 -1
  192. package/payload/server/public/assets/{flowDiagram-DWJPFMVM-2NYMfqHX.js → flowDiagram-DWJPFMVM-B-q6x5Q_.js} +1 -1
  193. package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-AAAa2sqE.js → ganttDiagram-T4ZO3ILL-DbjwY_bG.js} +1 -1
  194. package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-d8NUAIz5.js → gitGraphDiagram-UUTBAWPF-C3bLrOmb.js} +1 -1
  195. package/payload/server/public/assets/{graph-Bx9_2qbJ.js → graph-DmikPM4A.js} +2 -2
  196. package/payload/server/public/assets/{graph-labels-Cc1nU1_f.js → graph-labels-CtG6ckdG.js} +1 -1
  197. package/payload/server/public/assets/{graphlib-DUlqr2mr.js → graphlib-BlOjhixq.js} +1 -1
  198. package/payload/server/public/assets/{infoDiagram-42DDH7IO-D4dh4-0g.js → infoDiagram-42DDH7IO-BpaHbiXO.js} +1 -1
  199. package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-DPTmm2IE.js → ishikawaDiagram-UXIWVN3A-B_DzwK8l.js} +1 -1
  200. package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-B85vjqkE.js → journeyDiagram-VCZTEJTY-COzTF-qc.js} +1 -1
  201. package/payload/server/public/assets/{jsx-runtime-D3PZpOAF.css → jsx-runtime-BjFkEGXb.css} +1 -1
  202. package/payload/server/public/assets/{kanban-definition-6JOO6SKY-C2Lfb5Xh.js → kanban-definition-6JOO6SKY-C2cOIZU6.js} +1 -1
  203. package/payload/server/public/assets/{line-CODKFpwO.js → line-Bwa6aUYZ.js} +1 -1
  204. package/payload/server/public/assets/{mermaid-parser.core-DYdFZnXH.js → mermaid-parser.core-BFAF0BAk.js} +1 -1
  205. package/payload/server/public/assets/{mermaid.core-Bamjzahu.js → mermaid.core-CMOXmawT.js} +3 -3
  206. package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-CLK90bKJ.js → mindmap-definition-QFDTVHPH-bu0QLO17.js} +1 -1
  207. package/payload/server/public/assets/{pieDiagram-DEJITSTG-DEsnxhqP.js → pieDiagram-DEJITSTG-DQUe6W2Z.js} +1 -1
  208. package/payload/server/public/assets/{public-BFMu-jux.js → public-CSEIGhb4.js} +5 -5
  209. package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-uIP9V2jZ.js → quadrantDiagram-34T5L4WZ-ChhcwVRA.js} +1 -1
  210. package/payload/server/public/assets/{requirementDiagram-MS252O5E-CVS6t5tv.js → requirementDiagram-MS252O5E-DwQXqTA9.js} +1 -1
  211. package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-BIsmtyZA.js → sankeyDiagram-XADWPNL6-zYqdptBM.js} +1 -1
  212. package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-Cu8TfQiW.js → sequenceDiagram-FGHM5R23-x2g84gb4.js} +1 -1
  213. package/payload/server/public/assets/{stateDiagram-FHFEXIEX-ax4vYGft.js → stateDiagram-FHFEXIEX-CeUrqs2P.js} +1 -1
  214. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-B27DBP9X.js +1 -0
  215. package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-3l7ojkMA.js → timeline-definition-GMOUNBTQ-CL-c9XN5.js} +1 -1
  216. package/payload/server/public/assets/{useSelectionMode-C_EBRd2k.js → useSelectionMode-C1_ky4B6.js} +1 -1
  217. package/payload/server/public/assets/{vennDiagram-DHZGUBPP-C_sv0qMD.js → vennDiagram-DHZGUBPP-By2HBDYr.js} +1 -1
  218. package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-C7u4IHMB.js → wardleyDiagram-NUSXRM2D-iahvFvIS.js} +1 -1
  219. package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-A-uLXr1a.js → xychartDiagram-5P7HB3ND-33qqdRhI.js} +1 -1
  220. package/payload/server/public/browser.html +6 -6
  221. package/payload/server/public/chat.html +8 -8
  222. package/payload/server/public/data.html +5 -5
  223. package/payload/server/public/graph.html +8 -8
  224. package/payload/server/public/index.html +8 -8
  225. package/payload/server/public/public.html +6 -6
  226. package/payload/server/public/whatsapp-wallpaper.webp +0 -0
  227. package/payload/server/server.js +17 -9
  228. package/payload/server/public/assets/AdminShell-DDieHnzi.js +0 -1
  229. package/payload/server/public/assets/audio-attachment-mime-DGEfApkA.js +0 -1
  230. package/payload/server/public/assets/browser-DrJReVEG.js +0 -1
  231. package/payload/server/public/assets/channel-drVqp11B.js +0 -1
  232. package/payload/server/public/assets/chat-rJYaCD6C.js +0 -1
  233. package/payload/server/public/assets/classDiagram-6PBFFD2Q-Dplkw_pj.js +0 -1
  234. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-sJXv1Ihp.js +0 -1
  235. package/payload/server/public/assets/clone-Q_B6oO0c.js +0 -1
  236. package/payload/server/public/assets/data-CYyR2m_B.js +0 -1
  237. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-BRv1By5g.js +0 -1
  238. /package/payload/server/public/assets/{jsx-runtime-5auA0FEj.js → jsx-runtime-UQ0Z6nwN.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{o as e,t}from"./chunk-CWOGyPgy.js";import{a as n,i as r,n as i,r as a,t as o}from"./jsx-runtime-5auA0FEj.js";import{a as s,i as c,n as l,o as u,s as d}from"./file-download-C3pBZjt9.js";import{a as f,i as p,l as m,t as h}from"./AdminShell-DDieHnzi.js";import"./useSelectionMode-C_EBRd2k.js";import{a as g,i as _,n as v,r as y}from"./graph-labels-Cc1nU1_f.js";import{t as b}from"./Checkbox-DTrIyIFP.js";var x=a(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),S=a(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ee=a(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),C=a(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),te=a(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),w=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.vis=n.vis||{}))})(e,(function(e){function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i={exports:{}},a=function(e){return e&&e.Math===Math&&e},o=a(typeof globalThis==`object`&&globalThis)||a(typeof window==`object`&&window)||a(typeof self==`object`&&self)||a(typeof n==`object`&&n)||(function(){return this})()||n||Function(`return this`)(),s=function(e){try{return!!e()}catch{return!0}},c=!s(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),l=c,u=Function.prototype,d=u.apply,f=u.call,p=typeof Reflect==`object`&&Reflect.apply||(l?f.bind(d):function(){return f.apply(d,arguments)}),m=c,h=Function.prototype,g=h.call,_=m&&h.bind.bind(g,g),v=m?_:function(e){return function(){return g.apply(e,arguments)}},y=v,b=y({}.toString),x=y(``.slice),S=function(e){return x(b(e),8,-1)},ee=S,C=v,te=function(e){if(ee(e)===`Function`)return C(e)},w=typeof document==`object`&&document.all,ne={all:w,IS_HTMLDDA:w===void 0&&w!==void 0},re=ne,T=re.all,E=re.IS_HTMLDDA?function(e){return typeof e==`function`||e===T}:function(e){return typeof e==`function`},D={},O=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ie=c,ae=Function.prototype.call,k=ie?ae.bind(ae):function(){return ae.apply(ae,arguments)},oe={},se={}.propertyIsEnumerable,ce=Object.getOwnPropertyDescriptor;oe.f=ce&&!se.call({1:2},1)?function(e){var t=ce(this,e);return!!t&&t.enumerable}:se;var le=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},ue=v,de=s,fe=S,pe=Object,me=ue(``.split),he=de(function(){return!pe(`z`).propertyIsEnumerable(0)})?function(e){return fe(e)===`String`?me(e,``):pe(e)}:pe,ge=function(e){return e==null},_e=ge,ve=TypeError,ye=function(e){if(_e(e))throw new ve(`Can't call method on `+e);return e},be=he,xe=ye,Se=function(e){return be(xe(e))},Ce=E,we=ne,A=we.all,j=we.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:Ce(e)||e===A}:function(e){return typeof e==`object`?e!==null:Ce(e)},M={},Te=M,Ee=o,De=E,N=function(e){return De(e)?e:void 0},P=function(e,t){return arguments.length<2?N(Te[e])||N(Ee[e]):Te[e]&&Te[e][t]||Ee[e]&&Ee[e][t]},Oe=v({}.isPrototypeOf),F=typeof navigator<`u`&&String(navigator.userAgent)||``,ke=o,Ae=F,je=ke.process,Me=ke.Deno,Ne=je&&je.versions||Me&&Me.version,Pe=Ne&&Ne.v8,Fe,Ie;Pe&&(Fe=Pe.split(`.`),Ie=Fe[0]>0&&Fe[0]<4?1:+(Fe[0]+Fe[1])),!Ie&&Ae&&(Fe=Ae.match(/Edge\/(\d+)/),(!Fe||Fe[1]>=74)&&(Fe=Ae.match(/Chrome\/(\d+)/),Fe&&(Ie=+Fe[1])));var Le=Ie,Re=Le,ze=s,Be=o.String,Ve=!!Object.getOwnPropertySymbols&&!ze(function(){var e=Symbol(`symbol detection`);return!Be(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Re&&Re<41}),He=Ve&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Ue=P,We=E,Ge=Oe,Ke=He,qe=Object,Je=Ke?function(e){return typeof e==`symbol`}:function(e){var t=Ue(`Symbol`);return We(t)&&Ge(t.prototype,qe(e))},Ye=String,Xe=function(e){try{return Ye(e)}catch{return`Object`}},Ze=E,Qe=Xe,$e=TypeError,et=function(e){if(Ze(e))return e;throw new $e(Qe(e)+` is not a function`)},tt=et,nt=ge,rt=function(e,t){var n=e[t];return nt(n)?void 0:tt(n)},it=k,at=E,ot=j,st=TypeError,ct=function(e,t){var n,r;if(t===`string`&&at(n=e.toString)&&!ot(r=it(n,e))||at(n=e.valueOf)&&!ot(r=it(n,e))||t!==`string`&&at(n=e.toString)&&!ot(r=it(n,e)))return r;throw new st(`Can't convert object to primitive value`)},lt={exports:{}},ut=!0,dt=o,ft=Object.defineProperty,pt=function(e,t){try{ft(dt,e,{value:t,configurable:!0,writable:!0})}catch{dt[e]=t}return t},mt=o,ht=pt,gt=`__core-js_shared__`,_t=mt[gt]||ht(gt,{}),vt=_t;(lt.exports=function(e,t){return vt[e]||(vt[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.33.2`,mode:`pure`,copyright:`© 2014-2023 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE`,source:`https://github.com/zloirock/core-js`});var yt=lt.exports,bt=ye,xt=Object,St=function(e){return xt(bt(e))},Ct=v,wt=St,Tt=Ct({}.hasOwnProperty),Et=Object.hasOwn||function(e,t){return Tt(wt(e),t)},Dt=v,Ot=0,kt=Math.random(),At=Dt(1 .toString),jt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+At(++Ot+kt,36)},Mt=o,Nt=yt,Pt=Et,Ft=jt,It=Ve,Lt=He,Rt=Mt.Symbol,zt=Nt(`wks`),Bt=Lt?Rt.for||Rt:Rt&&Rt.withoutSetter||Ft,Vt=function(e){return Pt(zt,e)||(zt[e]=It&&Pt(Rt,e)?Rt[e]:Bt(`Symbol.`+e)),zt[e]},Ht=k,Ut=j,Wt=Je,Gt=rt,Kt=ct,qt=Vt,Jt=TypeError,Yt=qt(`toPrimitive`),Xt=function(e,t){if(!Ut(e)||Wt(e))return e;var n=Gt(e,Yt),r;if(n){if(t===void 0&&(t=`default`),r=Ht(n,e,t),!Ut(r)||Wt(r))return r;throw new Jt(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Kt(e,t)},Zt=Je,Qt=function(e){var t=Xt(e,`string`);return Zt(t)?t:t+``},$t=o,en=j,tn=$t.document,nn=en(tn)&&en(tn.createElement),rn=function(e){return nn?tn.createElement(e):{}},an=O,on=s,sn=rn,cn=!an&&!on(function(){return Object.defineProperty(sn(`div`),`a`,{get:function(){return 7}}).a!==7}),ln=O,un=k,dn=oe,fn=le,pn=Se,mn=Qt,hn=Et,gn=cn,_n=Object.getOwnPropertyDescriptor;D.f=ln?_n:function(e,t){if(e=pn(e),t=mn(t),gn)try{return _n(e,t)}catch{}if(hn(e,t))return fn(!un(dn.f,e,t),e[t])};var vn=s,yn=E,bn=/#|\.prototype\./,xn=function(e,t){var n=Cn[Sn(e)];return n===Tn?!0:n===wn?!1:yn(t)?vn(t):!!t},Sn=xn.normalize=function(e){return String(e).replace(bn,`.`).toLowerCase()},Cn=xn.data={},wn=xn.NATIVE=`N`,Tn=xn.POLYFILL=`P`,En=xn,Dn=te,On=et,kn=c,An=Dn(Dn.bind),jn=function(e,t){return On(e),t===void 0?e:kn?An(e,t):function(){return e.apply(t,arguments)}},Mn={},Nn=O&&s(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),Pn=j,Fn=String,In=TypeError,Ln=function(e){if(Pn(e))return e;throw new In(Fn(e)+` is not an object`)},Rn=O,zn=cn,Bn=Nn,Vn=Ln,Hn=Qt,Un=TypeError,Wn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Kn=`enumerable`,I=`configurable`,L=`writable`;Mn.f=Rn?Bn?function(e,t,n){if(Vn(e),t=Hn(t),Vn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&L in n&&!n[L]){var r=Gn(e,t);r&&r[L]&&(e[t]=n.value,n={configurable:I in n?n[I]:r[I],enumerable:Kn in n?n[Kn]:r[Kn],writable:!1})}return Wn(e,t,n)}:Wn:function(e,t,n){if(Vn(e),t=Hn(t),Vn(n),zn)try{return Wn(e,t,n)}catch{}if(`get`in n||`set`in n)throw new Un(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var qn=O,Jn=Mn,Yn=le,Xn=qn?function(e,t,n){return Jn.f(e,t,Yn(1,n))}:function(e,t,n){return e[t]=n,e},Zn=o,Qn=p,$n=te,er=E,tr=D.f,nr=En,rr=M,ir=jn,ar=Xn,or=Et,sr=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Qn(e,this,arguments)};return t.prototype=e.prototype,t},R=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?Zn:i?Zn[n]:(Zn[n]||{}).prototype,s=r?rr:rr[n]||ar(rr,n,{})[n],c=s.prototype,l,u,d,f,p,m,h,g,_;for(f in t)l=nr(r?f:n+(i?`.`:`#`)+f,e.forced),u=!l&&o&&or(o,f),m=s[f],u&&(e.dontCallGetSet?(_=tr(o,f),h=_&&_.value):h=o[f]),p=u&&h?h:t[f],!(u&&typeof m==typeof p)&&(g=e.bind&&u?ir(p,Zn):e.wrap&&u?sr(p):a&&er(p)?$n(p):p,(e.sham||p&&p.sham||m&&m.sham)&&ar(g,`sham`,!0),ar(s,f,g),a&&(d=n+`Prototype`,or(rr,d)||ar(rr,d,{}),ar(rr[d],f,p),e.real&&c&&(l||!c[f])&&ar(c,f,p)))},cr=R,lr=O,ur=Mn.f;cr({target:`Object`,stat:!0,forced:Object.defineProperty!==ur,sham:!lr},{defineProperty:ur});var dr=M.Object,fr=i.exports=function(e,t,n){return dr.defineProperty(e,t,n)};dr.defineProperty.sham&&(fr.sham=!0);var pr=i.exports,mr=pr,hr=r(mr),gr=S,_r=Array.isArray||function(e){return gr(e)===`Array`},vr=Math.ceil,yr=Math.floor,br=Math.trunc||function(e){var t=+e;return(t>0?yr:vr)(t)},xr=function(e){var t=+e;return t!==t||t===0?0:br(t)},Sr=xr,Cr=Math.min,wr=function(e){return e>0?Cr(Sr(e),9007199254740991):0},Tr=function(e){return wr(e.length)},Er=TypeError,Dr=9007199254740991,Or=function(e){if(e>Dr)throw Er(`Maximum allowed index exceeded`);return e},kr=Qt,Ar=Mn,jr=le,Mr=function(e,t,n){var r=kr(t);r in e?Ar.f(e,r,jr(0,n)):e[r]=n},Nr=Vt(`toStringTag`),Pr={};Pr[Nr]=`z`;var Fr=String(Pr)===`[object z]`,Ir=Fr,Lr=E,Rr=S,zr=Vt(`toStringTag`),Br=Object,Vr=Rr(function(){return arguments}())===`Arguments`,Hr=function(e,t){try{return e[t]}catch{}},Ur=Ir?Rr:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=Hr(t=Br(e),zr))==`string`?n:Vr?Rr(t):(r=Rr(t))===`Object`&&Lr(t.callee)?`Arguments`:r},Wr=v,Gr=E,Kr=_t,qr=Wr(Function.toString);Gr(Kr.inspectSource)||(Kr.inspectSource=function(e){return qr(e)});var Jr=Kr.inspectSource,Yr=v,Xr=s,Zr=E,Qr=Ur,$r=P,z=Jr,ei=function(){},ti=[],ni=$r(`Reflect`,`construct`),ri=/^\s*(?:class|function)\b/,ii=Yr(ri.exec),ai=!ri.test(ei),oi=function(e){if(!Zr(e))return!1;try{return ni(ei,ti,e),!0}catch{return!1}},si=function(e){if(!Zr(e))return!1;switch(Qr(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return ai||!!ii(ri,z(e))}catch{return!0}};si.sham=!0;var ci=!ni||Xr(function(){var e;return oi(oi.call)||!oi(Object)||!oi(function(){e=!0})||e})?si:oi,li=_r,ui=ci,di=j,fi=Vt(`species`),pi=Array,mi=function(e){var t;return li(e)&&(t=e.constructor,ui(t)&&(t===pi||li(t.prototype))?t=void 0:di(t)&&(t=t[fi],t===null&&(t=void 0))),t===void 0?pi:t},hi=function(e,t){return new(mi(e))(t===0?0:t)},gi=s,_i=Vt,vi=Le,yi=_i(`species`),bi=function(e){return vi>=51||!gi(function(){var t=[],n=t.constructor={};return n[yi]=function(){return{foo:1}},t[e](Boolean).foo!==1})},xi=R,Si=s,Ci=_r,wi=j,Ti=St,Ei=Tr,Di=Or,Oi=Mr,ki=hi,Ai=bi,ji=Vt,Mi=Le,Ni=ji(`isConcatSpreadable`),Pi=Mi>=51||!Si(function(){var e=[];return e[Ni]=!1,e.concat()[0]!==e}),Fi=function(e){if(!wi(e))return!1;var t=e[Ni];return t===void 0?Ci(e):!!t};xi({target:`Array`,proto:!0,arity:1,forced:!Pi||!Ai(`concat`)},{concat:function(e){var t=Ti(this),n=ki(t,0),r=0,i,a,o,s,c;for(i=-1,o=arguments.length;i<o;i++)if(c=i===-1?t:arguments[i],Fi(c))for(s=Ei(c),Di(r+s),a=0;a<s;a++,r++)a in c&&Oi(n,r,c[a]);else Di(r+1),Oi(n,r++,c);return n.length=r,n}});var Ii=Ur,Li=String,Ri=function(e){if(Ii(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return Li(e)},zi={},Bi=xr,Vi=Math.max,Hi=Math.min,Ui=function(e,t){var n=Bi(e);return n<0?Vi(n+t,0):Hi(n,t)},Wi=Se,Gi=Ui,Ki=Tr,qi=function(e){return function(t,n,r){var i=Wi(t),a=Ki(i),o=Gi(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Ji={includes:qi(!0),indexOf:qi(!1)},Yi={},Xi=v,Zi=Et,Qi=Se,$i=Ji.indexOf,ea=Yi,ta=Xi([].push),na=function(e,t){var n=Qi(e),r=0,i=[],a;for(a in n)!Zi(ea,a)&&Zi(n,a)&&ta(i,a);for(;t.length>r;)Zi(n,a=t[r++])&&(~$i(i,a)||ta(i,a));return i},ra=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],ia=na,aa=ra,oa=Object.keys||function(e){return ia(e,aa)},sa=O,ca=Nn,la=Mn,ua=Ln,da=Se,fa=oa;zi.f=sa&&!ca?Object.defineProperties:function(e,t){ua(e);for(var n=da(t),r=fa(t),i=r.length,a=0,o;i>a;)la.f(e,o=r[a++],n[o]);return e};var pa=P(`document`,`documentElement`),ma=yt,ha=jt,ga=ma(`keys`),_a=function(e){return ga[e]||(ga[e]=ha(e))},va=Ln,ya=zi,ba=ra,xa=Yi,Sa=pa,Ca=rn,wa=_a,Ta=`>`,Ea=`<`,Da=`prototype`,Oa=`script`,ka=wa(`IE_PROTO`),Aa=function(){},ja=function(e){return Ea+Oa+Ta+e+Ea+`/`+Oa+Ta},Ma=function(e){e.write(ja(``)),e.close();var t=e.parentWindow.Object;return e=null,t},Na=function(){var e=Ca(`iframe`),t=`java`+Oa+`:`,n;return e.style.display=`none`,Sa.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(ja(`document.F=Object`)),n.close(),n.F},Pa,Fa=function(){try{Pa=new ActiveXObject(`htmlfile`)}catch{}Fa=typeof document<`u`?document.domain&&Pa?Ma(Pa):Na():Ma(Pa);for(var e=ba.length;e--;)delete Fa[Da][ba[e]];return Fa()};xa[ka]=!0;var Ia=Object.create||function(e,t){var n;return e===null?n=Fa():(Aa[Da]=va(e),n=new Aa,Aa[Da]=null,n[ka]=e),t===void 0?n:ya.f(n,t)},La={},Ra=na,za=ra.concat(`length`,`prototype`);La.f=Object.getOwnPropertyNames||function(e){return Ra(e,za)};var Ba={},Va=Ui,Ha=Tr,Ua=Mr,Wa=Array,Ga=Math.max,Ka=function(e,t,n){for(var r=Ha(e),i=Va(t,r),a=Va(n===void 0?r:n,r),o=Wa(Ga(a-i,0)),s=0;i<a;i++,s++)Ua(o,s,e[i]);return o.length=s,o},qa=S,Ja=Se,Ya=La.f,Xa=Ka,Za=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Qa=function(e){try{return Ya(e)}catch{return Xa(Za)}};Ba.f=function(e){return Za&&qa(e)===`Window`?Qa(e):Ya(Ja(e))};var $a={};$a.f=Object.getOwnPropertySymbols;var eo=Xn,to=function(e,t,n,r){return r&&r.enumerable?e[t]=n:eo(e,t,n),e},no=Mn,ro=function(e,t,n){return no.f(e,t,n)},io={};io.f=Vt;var ao=M,oo=Et,so=io,co=Mn.f,lo=function(e){var t=ao.Symbol||={};oo(t,e)||co(t,e,{value:so.f(e)})},uo=k,fo=P,po=Vt,mo=to,ho=function(){var e=fo(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=po(`toPrimitive`);t&&!t[r]&&mo(t,r,function(e){return uo(n,this)},{arity:1})},go=Fr,_o=Ur,vo=go?{}.toString:function(){return`[object `+_o(this)+`]`},yo=Fr,bo=Mn.f,xo=Xn,So=Et,Co=vo,wo=Vt(`toStringTag`),To=function(e,t,n,r){if(e){var i=n?e:e.prototype;So(i,wo)||bo(i,wo,{configurable:!0,value:t}),r&&!yo&&xo(i,`toString`,Co)}},Eo=o,Do=E,Oo=Eo.WeakMap,ko=Do(Oo)&&/native code/.test(String(Oo)),Ao=o,jo=j,Mo=Xn,No=Et,Po=_t,Fo=_a,Io=Yi,Lo=`Object already initialized`,Ro=Ao.TypeError,zo=Ao.WeakMap,Bo,Vo,Ho,Uo=function(e){return Ho(e)?Vo(e):Bo(e,{})},Wo=function(e){return function(t){var n;if(!jo(t)||(n=Vo(t)).type!==e)throw new Ro(`Incompatible receiver, `+e+` required`);return n}};if(ko||Po.state){var Go=Po.state||=new zo;Go.get=Go.get,Go.has=Go.has,Go.set=Go.set,Bo=function(e,t){if(Go.has(e))throw new Ro(Lo);return t.facade=e,Go.set(e,t),t},Vo=function(e){return Go.get(e)||{}},Ho=function(e){return Go.has(e)}}else{var Ko=Fo(`state`);Io[Ko]=!0,Bo=function(e,t){if(No(e,Ko))throw new Ro(Lo);return t.facade=e,Mo(e,Ko,t),t},Vo=function(e){return No(e,Ko)?e[Ko]:{}},Ho=function(e){return No(e,Ko)}}var qo={set:Bo,get:Vo,has:Ho,enforce:Uo,getterFor:Wo},Jo=jn,Yo=v,Xo=he,Zo=St,Qo=Tr,$o=hi,es=Yo([].push),ts=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f=Zo(c),p=Xo(f),m=Jo(l,u),h=Qo(p),g=0,_=d||$o,v=t?_(c,h):n||o?_(c,0):void 0,y,b;h>g;g++)if((s||g in p)&&(y=p[g],b=m(y,g,f),e))if(t)v[g]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return g;case 2:es(v,y)}else switch(e){case 4:return!1;case 7:es(v,y)}return a?-1:r||i?i:v}},ns={forEach:ts(0),map:ts(1),filter:ts(2),some:ts(3),every:ts(4),find:ts(5),findIndex:ts(6),filterReject:ts(7)},rs=R,is=o,as=k,os=v,ss=O,cs=Ve,ls=s,us=Et,ds=Oe,fs=Ln,ps=Se,ms=Qt,hs=Ri,gs=le,_s=Ia,vs=oa,ys=La,bs=Ba,xs=$a,Ss=D,Cs=Mn,ws=zi,Ts=oe,Es=to,Ds=ro,Os=yt,ks=_a,As=Yi,js=jt,Ms=Vt,Ns=io,Ps=lo,Fs=ho,Is=To,Ls=qo,Rs=ns.forEach,zs=ks(`hidden`),Bs=`Symbol`,Vs=`prototype`,Hs=Ls.set,Us=Ls.getterFor(Bs),Ws=Object[Vs],Gs=is.Symbol,Ks=Gs&&Gs[Vs],qs=is.RangeError,Js=is.TypeError,Ys=is.QObject,Xs=Ss.f,Zs=Cs.f,Qs=bs.f,$s=Ts.f,ec=os([].push),tc=Os(`symbols`),nc=Os(`op-symbols`),rc=Os(`wks`),ic=!Ys||!Ys[Vs]||!Ys[Vs].findChild,ac=function(e,t,n){var r=Xs(Ws,t);r&&delete Ws[t],Zs(e,t,n),r&&e!==Ws&&Zs(Ws,t,r)},oc=ss&&ls(function(){return _s(Zs({},`a`,{get:function(){return Zs(this,`a`,{value:7}).a}})).a!==7})?ac:Zs,sc=function(e,t){var n=tc[e]=_s(Ks);return Hs(n,{type:Bs,tag:e,description:t}),ss||(n.description=t),n},cc=function(e,t,n){e===Ws&&cc(nc,t,n),fs(e);var r=ms(t);return fs(n),us(tc,r)?(n.enumerable?(us(e,zs)&&e[zs][r]&&(e[zs][r]=!1),n=_s(n,{enumerable:gs(0,!1)})):(us(e,zs)||Zs(e,zs,gs(1,{})),e[zs][r]=!0),oc(e,r,n)):Zs(e,r,n)},lc=function(e,t){fs(e);var n=ps(t);return Rs(vs(n).concat(mc(n)),function(t){(!ss||as(dc,n,t))&&cc(e,t,n[t])}),e},uc=function(e,t){return t===void 0?_s(e):lc(_s(e),t)},dc=function(e){var t=ms(e),n=as($s,this,t);return this===Ws&&us(tc,t)&&!us(nc,t)?!1:n||!us(this,t)||!us(tc,t)||us(this,zs)&&this[zs][t]?n:!0},fc=function(e,t){var n=ps(e),r=ms(t);if(!(n===Ws&&us(tc,r)&&!us(nc,r))){var i=Xs(n,r);return i&&us(tc,r)&&!(us(n,zs)&&n[zs][r])&&(i.enumerable=!0),i}},pc=function(e){var t=Qs(ps(e)),n=[];return Rs(t,function(e){!us(tc,e)&&!us(As,e)&&ec(n,e)}),n},mc=function(e){var t=e===Ws,n=Qs(t?nc:ps(e)),r=[];return Rs(n,function(e){us(tc,e)&&(!t||us(Ws,e))&&ec(r,tc[e])}),r};cs||(Gs=function(){if(ds(Ks,this))throw new Js(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:hs(arguments[0]),t=js(e),n=function(e){var r=this===void 0?is:this;r===Ws&&as(n,nc,e),us(r,zs)&&us(r[zs],t)&&(r[zs][t]=!1);var i=gs(1,e);try{oc(r,t,i)}catch(e){if(!(e instanceof qs))throw e;ac(r,t,i)}};return ss&&ic&&oc(Ws,t,{configurable:!0,set:n}),sc(t,e)},Ks=Gs[Vs],Es(Ks,`toString`,function(){return Us(this).tag}),Es(Gs,`withoutSetter`,function(e){return sc(js(e),e)}),Ts.f=dc,Cs.f=cc,ws.f=lc,Ss.f=fc,ys.f=bs.f=pc,xs.f=mc,Ns.f=function(e){return sc(Ms(e),e)},ss&&Ds(Ks,`description`,{configurable:!0,get:function(){return Us(this).description}})),rs({global:!0,constructor:!0,wrap:!0,forced:!cs,sham:!cs},{Symbol:Gs}),Rs(vs(rc),function(e){Ps(e)}),rs({target:Bs,stat:!0,forced:!cs},{useSetter:function(){ic=!0},useSimple:function(){ic=!1}}),rs({target:`Object`,stat:!0,forced:!cs,sham:!ss},{create:uc,defineProperty:cc,defineProperties:lc,getOwnPropertyDescriptor:fc}),rs({target:`Object`,stat:!0,forced:!cs},{getOwnPropertyNames:pc}),Fs(),Is(Gs,Bs),As[zs]=!0;var hc=Ve&&!!Symbol.for&&!!Symbol.keyFor,gc=R,_c=P,vc=Et,yc=Ri,bc=yt,xc=hc,Sc=bc(`string-to-symbol-registry`),B=bc(`symbol-to-string-registry`);gc({target:`Symbol`,stat:!0,forced:!xc},{for:function(e){var t=yc(e);if(vc(Sc,t))return Sc[t];var n=_c(`Symbol`)(t);return Sc[t]=n,B[n]=t,n}});var Cc=R,wc=Et,Tc=Je,Ec=Xe,Dc=yt,Oc=hc,kc=Dc(`symbol-to-string-registry`);Cc({target:`Symbol`,stat:!0,forced:!Oc},{keyFor:function(e){if(!Tc(e))throw TypeError(Ec(e)+` is not a symbol`);if(wc(kc,e))return kc[e]}});var Ac=v([].slice),jc=v,Mc=_r,Nc=E,Pc=S,Fc=Ri,Ic=jc([].push),Lc=function(e){if(Nc(e))return e;if(Mc(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?Ic(n,i):(typeof i==`number`||Pc(i)===`Number`||Pc(i)===`String`)&&Ic(n,Fc(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(Mc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Rc=R,zc=P,Bc=p,Vc=k,Hc=v,Uc=s,Wc=E,Gc=Je,Kc=Ac,qc=Lc,Jc=Ve,Yc=String,Xc=zc(`JSON`,`stringify`),Zc=Hc(/./.exec),Qc=Hc(``.charAt),$c=Hc(``.charCodeAt),el=Hc(``.replace),tl=Hc(1 .toString),nl=/[\uD800-\uDFFF]/g,rl=/^[\uD800-\uDBFF]$/,il=/^[\uDC00-\uDFFF]$/,al=!Jc||Uc(function(){var e=zc(`Symbol`)(`stringify detection`);return Xc([e])!==`[null]`||Xc({a:e})!==`{}`||Xc(Object(e))!==`{}`}),ol=Uc(function(){return Xc(`\udf06\ud834`)!==`"\\udf06\\ud834"`||Xc(`\udead`)!==`"\\udead"`}),sl=function(e,t){var n=Kc(arguments),r=qc(t);if(!(!Wc(r)&&(e===void 0||Gc(e))))return n[1]=function(e,t){if(Wc(r)&&(t=Vc(r,this,Yc(e),t)),!Gc(t))return t},Bc(Xc,null,n)},cl=function(e,t,n){var r=Qc(n,t-1),i=Qc(n,t+1);return Zc(rl,e)&&!Zc(il,i)||Zc(il,e)&&!Zc(rl,r)?`\\u`+tl($c(e,0),16):e};Xc&&Rc({target:`JSON`,stat:!0,arity:3,forced:al||ol},{stringify:function(e,t,n){var r=Kc(arguments),i=Bc(al?sl:Xc,null,r);return ol&&typeof i==`string`?el(i,nl,cl):i}});var ll=R,ul=Ve,dl=s,fl=$a,pl=St;ll({target:`Object`,stat:!0,forced:!ul||dl(function(){fl.f(1)})},{getOwnPropertySymbols:function(e){var t=fl.f;return t?t(pl(e)):[]}}),lo(`asyncIterator`),lo(`hasInstance`),lo(`isConcatSpreadable`),lo(`iterator`),lo(`match`),lo(`matchAll`),lo(`replace`),lo(`search`),lo(`species`),lo(`split`);var ml=lo,hl=ho;ml(`toPrimitive`),hl();var gl=P,_l=lo,vl=To;_l(`toStringTag`),vl(gl(`Symbol`),`Symbol`),lo(`unscopables`),To(o.JSON,`JSON`,!0);var yl=M.Symbol,bl={},xl=O,Sl=Et,Cl=Function.prototype,wl=xl&&Object.getOwnPropertyDescriptor,Tl=Sl(Cl,`name`),El={EXISTS:Tl,PROPER:Tl&&(function(){}).name===`something`,CONFIGURABLE:Tl&&(!xl||xl&&wl(Cl,`name`).configurable)},Dl=!s(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Ol=Et,kl=E,Al=St,jl=_a,Ml=Dl,Nl=jl(`IE_PROTO`),Pl=Object,Fl=Pl.prototype,Il=Ml?Pl.getPrototypeOf:function(e){var t=Al(e);if(Ol(t,Nl))return t[Nl];var n=t.constructor;return kl(n)&&t instanceof n?n.prototype:t instanceof Pl?Fl:null},Ll=s,Rl=E,zl=j,Bl=Ia,Vl=Il,Hl=to,Ul=Vt(`iterator`),Wl=!1,Gl,Kl,ql;[].keys&&(ql=[].keys(),`next`in ql?(Kl=Vl(Vl(ql)),Kl!==Object.prototype&&(Gl=Kl)):Wl=!0),Gl=!zl(Gl)||Ll(function(){var e={};return Gl[Ul].call(e)!==e})?{}:Bl(Gl),Rl(Gl[Ul])||Hl(Gl,Ul,function(){return this});var Jl={IteratorPrototype:Gl,BUGGY_SAFARI_ITERATORS:Wl},Yl=Jl.IteratorPrototype,Xl=Ia,Zl=le,Ql=To,$l=bl,eu=function(){return this},tu=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=Xl(Yl,{next:Zl(+!r,n)}),Ql(e,i,!1,!0),$l[i]=eu,e},nu=v,ru=et,iu=function(e,t,n){try{return nu(ru(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},au=E,ou=String,su=TypeError,cu=function(e){if(typeof e==`object`||au(e))return e;throw new su(`Can't set `+ou(e)+` as a prototype`)},lu=iu,uu=Ln,du=cu,fu=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},n;try{n=lu(Object.prototype,`__proto__`,`set`),n(t,[]),e=t instanceof Array}catch{}return function(t,r){return uu(t),du(r),e?n(t,r):t.__proto__=r,t}}():void 0),pu=R,mu=k,hu=El,gu=tu,_u=Il,vu=To,yu=to,bu=Vt,xu=bl,Su=Jl,Cu=hu.PROPER;hu.CONFIGURABLE,Su.IteratorPrototype;var wu=Su.BUGGY_SAFARI_ITERATORS,Tu=bu(`iterator`),Eu=`keys`,Du=`values`,Ou=`entries`,ku=function(){return this},Au=function(e,t,n,r,i,a,o){gu(n,t,r);var s=function(e){if(e===i&&f)return f;if(!wu&&e&&e in u)return u[e];switch(e){case Eu:return function(){return new n(this,e)};case Du:return function(){return new n(this,e)};case Ou:return function(){return new n(this,e)}}return function(){return new n(this)}},c=t+` Iterator`,l=!1,u=e.prototype,d=u[Tu]||u[`@@iterator`]||i&&u[i],f=!wu&&d||s(i),p=t===`Array`&&u.entries||d,m,h,g;if(p&&(m=_u(p.call(new e)),m!==Object.prototype&&m.next&&(vu(m,c,!0,!0),xu[c]=ku)),Cu&&i===Du&&d&&d.name!==Du&&(l=!0,f=function(){return mu(d,this)}),i)if(h={values:s(Du),keys:a?f:s(Eu),entries:s(Ou)},o)for(g in h)(wu||l||!(g in u))&&yu(u,g,h[g]);else pu({target:t,proto:!0,forced:wu||l},h);return o&&u[Tu]!==f&&yu(u,Tu,f,{name:i}),xu[t]=f,h},ju=function(e,t){return{value:e,done:t}},Mu=Se,Nu=bl,Pu=qo;Mn.f;var Fu=Au,Iu=ju,Lu=`Array Iterator`,Ru=Pu.set,zu=Pu.getterFor(Lu);Fu(Array,`Array`,function(e,t){Ru(this,{type:Lu,target:Mu(e),index:0,kind:t})},function(){var e=zu(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Iu(void 0,!0);switch(e.kind){case`keys`:return Iu(n,!1);case`values`:return Iu(t[n],!1)}return Iu([n,t[n]],!1)},`values`),Nu.Arguments=Nu.Array;var Bu={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Vu=o,Hu=Ur,Uu=Xn,Wu=bl,Gu=Vt(`toStringTag`);for(var Ku in Bu){var qu=Vu[Ku],Ju=qu&&qu.prototype;Ju&&Hu(Ju)!==Gu&&Uu(Ju,Gu,Ku),Wu[Ku]=Wu.Array}var Yu=yl,Xu=Vt,Zu=Mn.f,Qu=Xu(`metadata`),$u=Function.prototype;$u[Qu]===void 0&&Zu($u,Qu,{value:null}),lo(`asyncDispose`),lo(`dispose`),lo(`metadata`);var ed=Yu,td=P,nd=v,rd=td(`Symbol`),id=rd.keyFor,ad=nd(rd.prototype.valueOf),od=rd.isRegisteredSymbol||function(e){try{return id(ad(e))!==void 0}catch{return!1}};R({target:`Symbol`,stat:!0},{isRegisteredSymbol:od});for(var sd=yt,cd=P,ld=v,ud=Je,dd=Vt,fd=cd(`Symbol`),pd=fd.isWellKnownSymbol,md=cd(`Object`,`getOwnPropertyNames`),hd=ld(fd.prototype.valueOf),gd=sd(`wks`),_d=0,vd=md(fd),yd=vd.length;_d<yd;_d++)try{var bd=vd[_d];ud(fd[bd])&&dd(bd)}catch{}var xd=function(e){if(pd&&pd(e))return!0;try{for(var t=hd(e),n=0,r=md(gd),i=r.length;n<i;n++)if(gd[r[n]]==t)return!0}catch{}return!1};R({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:xd}),lo(`matcher`),lo(`observable`),R({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:od}),R({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:xd}),lo(`metadataKey`),lo(`patternMatch`),lo(`replaceAll`);var Sd=ed,Cd=r(Sd),wd=v,Td=xr,Ed=Ri,Dd=ye,Od=wd(``.charAt),kd=wd(``.charCodeAt),Ad=wd(``.slice),jd=function(e){return function(t,n){var r=Ed(Dd(t)),i=Td(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=kd(r,i),o<55296||o>56319||i+1===a||(s=kd(r,i+1))<56320||s>57343?e?Od(r,i):o:e?Ad(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Md={codeAt:jd(!1),charAt:jd(!0)}.charAt,Nd=Ri,Pd=qo,Fd=Au,Id=ju,Ld=`String Iterator`,Rd=Pd.set,zd=Pd.getterFor(Ld);Fd(String,`String`,function(e){Rd(this,{type:Ld,string:Nd(e),index:0})},function(){var e=zd(this),t=e.string,n=e.index,r;return n>=t.length?Id(void 0,!0):(r=Md(t,n),e.index+=r.length,Id(r,!1))});var Bd=io.f(`iterator`),Vd=Bd,Hd=r(Vd);function Ud(e){"@babel/helpers - typeof";return Ud=typeof Cd==`function`&&typeof Hd==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Cd==`function`&&e.constructor===Cd&&e!==Cd.prototype?`symbol`:typeof e},Ud(e)}var Wd=r(io.f(`toPrimitive`));function Gd(e,t){if(Ud(e)!==`object`||e===null)return e;var n=e[Wd];if(n!==void 0){var r=n.call(e,t||`default`);if(Ud(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Kd(e){var t=Gd(e,`string`);return Ud(t)===`symbol`?t:String(t)}function qd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),hr(e,Kd(r.key),r)}}function Jd(e,t,n){return t&&qd(e.prototype,t),n&&qd(e,n),hr(e,`prototype`,{writable:!1}),e}function Yd(e,t,n){return t=Kd(t),t in e?hr(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xd=v,Zd=et,Qd=j,$d=Et,ef=Ac,tf=c,nf=Function,rf=Xd([].concat),af=Xd([].join),of={},sf=function(e,t,n){if(!$d(of,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;of[t]=nf(`C,a`,`return new C(`+af(r,`,`)+`)`)}return of[t](e,n)},cf=tf?nf.bind:function(e){var t=Zd(this),n=t.prototype,r=ef(arguments,1),i=function(){var n=rf(r,ef(arguments));return this instanceof i?sf(t,n.length,n):t.apply(e,n)};return Qd(n)&&(i.prototype=n),i},lf=R,uf=cf;lf({target:`Function`,proto:!0,forced:Function.bind!==uf},{bind:uf});var df=o,ff=M,pf=function(e,t){var n=ff[e+`Prototype`],r=n&&n[t];if(r)return r;var i=df[e],a=i&&i.prototype;return a&&a[t]},mf=pf(`Function`,`bind`),hf=Oe,gf=mf,_f=Function.prototype,vf=function(e){var t=e.bind;return e===_f||hf(_f,e)&&t===_f.bind?gf:t},yf=r(vf),bf=et,xf=St,Sf=he,Cf=Tr,wf=TypeError,Tf=function(e){return function(t,n,r,i){bf(n);var a=xf(t),o=Sf(a),s=Cf(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new wf(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},Ef={left:Tf(!1),right:Tf(!0)},V=s,Df=function(e,t){var n=[][e];return!!n&&V(function(){n.call(null,t||function(){return 1},1)})},Of=S(o.process)===`process`,kf=R,Af=Ef.left,jf=Df,Mf=Le;kf({target:`Array`,proto:!0,forced:!Of&&Mf>79&&Mf<83||!jf(`reduce`)},{reduce:function(e){var t=arguments.length;return Af(this,e,t,t>1?arguments[1]:void 0)}});var Nf=pf(`Array`,`reduce`),Pf=Oe,Ff=Nf,If=Array.prototype,Lf=r(function(e){var t=e.reduce;return e===If||Pf(If,e)&&t===If.reduce?Ff:t}),Rf=R,zf=ns.filter;Rf({target:`Array`,proto:!0,forced:!bi(`filter`)},{filter:function(e){return zf(this,e,arguments.length>1?arguments[1]:void 0)}});var Bf=pf(`Array`,`filter`),Vf=Oe,Hf=Bf,Uf=Array.prototype,Wf=r(function(e){var t=e.filter;return e===Uf||Vf(Uf,e)&&t===Uf.filter?Hf:t}),Gf=R,Kf=ns.map;Gf({target:`Array`,proto:!0,forced:!bi(`map`)},{map:function(e){return Kf(this,e,arguments.length>1?arguments[1]:void 0)}});var qf=pf(`Array`,`map`),Jf=Oe,Yf=qf,Xf=Array.prototype,Zf=r(function(e){var t=e.map;return e===Xf||Jf(Xf,e)&&t===Xf.map?Yf:t}),Qf=_r,$f=Tr,ep=Or,tp=jn,np=function(e,t,n,r,i,a,o,s){for(var c=i,l=0,u=o?tp(o,s):!1,d,f;l<r;)l in n&&(d=u?u(n[l],l,t):n[l],a>0&&Qf(d)?(f=$f(d),c=np(e,t,d,f,c,a-1)-1):(ep(c+1),e[c]=d),c++),l++;return c},rp=np,ip=R,ap=rp,op=et,sp=St,cp=Tr,lp=hi;ip({target:`Array`,proto:!0},{flatMap:function(e){var t=sp(this),n=cp(t),r;return op(e),r=lp(t,0),r.length=ap(r,t,t,n,0,1,e,arguments.length>1?arguments[1]:void 0),r}});var up=pf(`Array`,`flatMap`),dp=Oe,fp=up,pp=Array.prototype,mp=r(function(e){var t=e.flatMap;return e===pp||dp(pp,e)&&t===pp.flatMap?fp:t});function hp(e){return new _p(e)}var gp=function(){function e(n,r,i){var a,o,s;t(this,e),Yd(this,`_listeners`,{add:yf(a=this._add).call(a,this),remove:yf(o=this._remove).call(o,this),update:yf(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Jd(e,[{key:`all`,value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:`start`,value:function(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}},{key:`stop`,value:function(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}},{key:`_transformItems`,value:function(e){var t;return Lf(t=this._transformers).call(t,function(e,t){return t(e)},e)}},{key:`_add`,value:function(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:`_update`,value:function(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:`_remove`,value:function(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),_p=function(){function e(n){t(this,e),Yd(this,`_transformers`,[]),this._source=n}return Jd(e,[{key:`filter`,value:function(e){return this._transformers.push(function(t){return Wf(t).call(t,e)}),this}},{key:`map`,value:function(e){return this._transformers.push(function(t){return Zf(t).call(t,e)}),this}},{key:`flatMap`,value:function(e){return this._transformers.push(function(t){return mp(t).call(t,e)}),this}},{key:`to`,value:function(e){return new gp(this._source,this._transformers,e)}}]),e}(),vp=k,yp=Ln,bp=rt,xp=function(e,t,n){var r,i;yp(e);try{if(r=bp(e,`return`),!r){if(t===`throw`)throw n;return n}r=vp(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return yp(r),n},Sp=Ln,Cp=xp,wp=function(e,t,n,r){try{return r?t(Sp(n)[0],n[1]):t(n)}catch(t){Cp(e,`throw`,t)}},Tp=Vt,Ep=bl,Dp=Tp(`iterator`),Op=Array.prototype,kp=function(e){return e!==void 0&&(Ep.Array===e||Op[Dp]===e)},Ap=Ur,jp=rt,Mp=ge,Np=bl,Pp=Vt(`iterator`),Fp=function(e){if(!Mp(e))return jp(e,Pp)||jp(e,`@@iterator`)||Np[Ap(e)]},Ip=k,Lp=et,Rp=Ln,zp=Xe,Bp=Fp,Vp=TypeError,Hp=function(e,t){var n=arguments.length<2?Bp(e):t;if(Lp(n))return Rp(Ip(n,e));throw new Vp(zp(e)+` is not iterable`)},Up=jn,Wp=k,Gp=St,Kp=wp,qp=kp,Jp=ci,Yp=Tr,Xp=Mr,Zp=Hp,Qp=Fp,$p=Array,em=function(e){var t=Gp(e),n=Jp(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Up(i,r>2?arguments[2]:void 0));var o=Qp(t),s=0,c,l,u,d,f,p;if(o&&!(this===$p&&qp(o)))for(d=Zp(t,o),f=d.next,l=n?new this:[];!(u=Wp(f,d)).done;s++)p=a?Kp(d,i,[u.value,s],!0):u.value,Xp(l,s,p);else for(c=Yp(t),l=n?new this(c):$p(c);c>s;s++)p=a?i(t[s],s):t[s],Xp(l,s,p);return l.length=s,l},tm=Vt(`iterator`),nm=!1;try{var rm=0,im={next:function(){return{done:!!rm++}},return:function(){nm=!0}};im[tm]=function(){return this},Array.from(im,function(){throw 2})}catch{}var am=function(e,t){try{if(!t&&!nm)return!1}catch{return!1}var n=!1;try{var r={};r[tm]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},om=R,sm=em;om({target:`Array`,stat:!0,forced:!am(function(e){Array.from(e)})},{from:sm});var cm=M.Array.from,lm=r(cm),um=Fp,dm=r(um),fm=r(um);R({target:`Array`,stat:!0},{isArray:_r});var pm=M.Array.isArray,mm=r(pm);function hm(e){if(mm(e))return e}var gm=O,_m=_r,vm=TypeError,ym=Object.getOwnPropertyDescriptor,bm=gm&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(_m(e)&&!ym(e,`length`).writable)throw new vm(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},xm=R,Sm=St,Cm=Tr,wm=bm,Tm=Or;xm({target:`Array`,proto:!0,arity:1,forced:s(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=Sm(this),n=Cm(t),r=arguments.length;Tm(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return wm(t,n),n}});var Em=pf(`Array`,`push`),Dm=Oe,Om=Em,km=Array.prototype,Am=function(e){var t=e.push;return e===km||Dm(km,e)&&t===km.push?Om:t},jm=r(Am);function Mm(e,t){var n=e==null?null:Cd!==void 0&&dm(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(jm(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var Nm=R,Pm=_r,Fm=ci,Im=j,Lm=Ui,Rm=Tr,zm=Se,Bm=Mr,Vm=Vt,Hm=bi,Um=Ac,Wm=Hm(`slice`),Gm=Vm(`species`),Km=Array,qm=Math.max;Nm({target:`Array`,proto:!0,forced:!Wm},{slice:function(e,t){var n=zm(this),r=Rm(n),i=Lm(e,r),a=Lm(t===void 0?r:t,r),o,s,c;if(Pm(n)&&(o=n.constructor,Fm(o)&&(o===Km||Pm(o.prototype))?o=void 0:Im(o)&&(o=o[Gm],o===null&&(o=void 0)),o===Km||o===void 0))return Um(n,i,a);for(s=new(o===void 0?Km:o)(qm(a-i,0)),c=0;i<a;i++,c++)i in n&&Bm(s,c,n[i]);return s.length=c,s}});var Jm=pf(`Array`,`slice`),Ym=Oe,Xm=Jm,Zm=Array.prototype,Qm=function(e){var t=e.slice;return e===Zm||Ym(Zm,e)&&t===Zm.slice?Xm:t},$m=Qm,eh=r($m),th=r(cm);function nh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rh(e,t){var n;if(e){if(typeof e==`string`)return nh(e,t);var r=eh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return th(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nh(e,t)}}function ih(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{o as e,t}from"./chunk-CWOGyPgy.js";import{a as n,i as r,n as i,r as a,t as o}from"./jsx-runtime-UQ0Z6nwN.js";import{a as s,i as c,n as l,o as u,s as d}from"./file-download-BYJN3Kgm.js";import{a as f,i as p,t as m,u as h}from"./AdminShell-BnhxfX97.js";import"./useSelectionMode-C1_ky4B6.js";import{a as g,i as _,n as v,r as y}from"./graph-labels-CtG6ckdG.js";import{t as b}from"./Checkbox-CVPUf_7I.js";var x=a(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),S=a(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ee=a(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),C=a(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),te=a(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),w=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.vis=n.vis||{}))})(e,(function(e){function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i={exports:{}},a=function(e){return e&&e.Math===Math&&e},o=a(typeof globalThis==`object`&&globalThis)||a(typeof window==`object`&&window)||a(typeof self==`object`&&self)||a(typeof n==`object`&&n)||(function(){return this})()||n||Function(`return this`)(),s=function(e){try{return!!e()}catch{return!0}},c=!s(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),l=c,u=Function.prototype,d=u.apply,f=u.call,p=typeof Reflect==`object`&&Reflect.apply||(l?f.bind(d):function(){return f.apply(d,arguments)}),m=c,h=Function.prototype,g=h.call,_=m&&h.bind.bind(g,g),v=m?_:function(e){return function(){return g.apply(e,arguments)}},y=v,b=y({}.toString),x=y(``.slice),S=function(e){return x(b(e),8,-1)},ee=S,C=v,te=function(e){if(ee(e)===`Function`)return C(e)},w=typeof document==`object`&&document.all,ne={all:w,IS_HTMLDDA:w===void 0&&w!==void 0},re=ne,T=re.all,E=re.IS_HTMLDDA?function(e){return typeof e==`function`||e===T}:function(e){return typeof e==`function`},D={},O=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ie=c,ae=Function.prototype.call,k=ie?ae.bind(ae):function(){return ae.apply(ae,arguments)},oe={},se={}.propertyIsEnumerable,ce=Object.getOwnPropertyDescriptor;oe.f=ce&&!se.call({1:2},1)?function(e){var t=ce(this,e);return!!t&&t.enumerable}:se;var le=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},ue=v,de=s,fe=S,pe=Object,me=ue(``.split),he=de(function(){return!pe(`z`).propertyIsEnumerable(0)})?function(e){return fe(e)===`String`?me(e,``):pe(e)}:pe,ge=function(e){return e==null},_e=ge,ve=TypeError,ye=function(e){if(_e(e))throw new ve(`Can't call method on `+e);return e},be=he,xe=ye,Se=function(e){return be(xe(e))},Ce=E,we=ne,A=we.all,j=we.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:Ce(e)||e===A}:function(e){return typeof e==`object`?e!==null:Ce(e)},M={},Te=M,Ee=o,De=E,N=function(e){return De(e)?e:void 0},P=function(e,t){return arguments.length<2?N(Te[e])||N(Ee[e]):Te[e]&&Te[e][t]||Ee[e]&&Ee[e][t]},Oe=v({}.isPrototypeOf),F=typeof navigator<`u`&&String(navigator.userAgent)||``,ke=o,Ae=F,je=ke.process,Me=ke.Deno,Ne=je&&je.versions||Me&&Me.version,Pe=Ne&&Ne.v8,Fe,Ie;Pe&&(Fe=Pe.split(`.`),Ie=Fe[0]>0&&Fe[0]<4?1:+(Fe[0]+Fe[1])),!Ie&&Ae&&(Fe=Ae.match(/Edge\/(\d+)/),(!Fe||Fe[1]>=74)&&(Fe=Ae.match(/Chrome\/(\d+)/),Fe&&(Ie=+Fe[1])));var Le=Ie,Re=Le,ze=s,Be=o.String,Ve=!!Object.getOwnPropertySymbols&&!ze(function(){var e=Symbol(`symbol detection`);return!Be(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Re&&Re<41}),He=Ve&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Ue=P,We=E,Ge=Oe,Ke=He,qe=Object,Je=Ke?function(e){return typeof e==`symbol`}:function(e){var t=Ue(`Symbol`);return We(t)&&Ge(t.prototype,qe(e))},Ye=String,Xe=function(e){try{return Ye(e)}catch{return`Object`}},Ze=E,Qe=Xe,$e=TypeError,et=function(e){if(Ze(e))return e;throw new $e(Qe(e)+` is not a function`)},tt=et,nt=ge,rt=function(e,t){var n=e[t];return nt(n)?void 0:tt(n)},it=k,at=E,ot=j,st=TypeError,ct=function(e,t){var n,r;if(t===`string`&&at(n=e.toString)&&!ot(r=it(n,e))||at(n=e.valueOf)&&!ot(r=it(n,e))||t!==`string`&&at(n=e.toString)&&!ot(r=it(n,e)))return r;throw new st(`Can't convert object to primitive value`)},lt={exports:{}},ut=!0,dt=o,ft=Object.defineProperty,pt=function(e,t){try{ft(dt,e,{value:t,configurable:!0,writable:!0})}catch{dt[e]=t}return t},mt=o,ht=pt,gt=`__core-js_shared__`,_t=mt[gt]||ht(gt,{}),vt=_t;(lt.exports=function(e,t){return vt[e]||(vt[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.33.2`,mode:`pure`,copyright:`© 2014-2023 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE`,source:`https://github.com/zloirock/core-js`});var yt=lt.exports,bt=ye,xt=Object,St=function(e){return xt(bt(e))},Ct=v,wt=St,Tt=Ct({}.hasOwnProperty),Et=Object.hasOwn||function(e,t){return Tt(wt(e),t)},Dt=v,Ot=0,kt=Math.random(),At=Dt(1 .toString),jt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+At(++Ot+kt,36)},Mt=o,Nt=yt,Pt=Et,Ft=jt,It=Ve,Lt=He,Rt=Mt.Symbol,zt=Nt(`wks`),Bt=Lt?Rt.for||Rt:Rt&&Rt.withoutSetter||Ft,Vt=function(e){return Pt(zt,e)||(zt[e]=It&&Pt(Rt,e)?Rt[e]:Bt(`Symbol.`+e)),zt[e]},Ht=k,Ut=j,Wt=Je,Gt=rt,Kt=ct,qt=Vt,Jt=TypeError,Yt=qt(`toPrimitive`),Xt=function(e,t){if(!Ut(e)||Wt(e))return e;var n=Gt(e,Yt),r;if(n){if(t===void 0&&(t=`default`),r=Ht(n,e,t),!Ut(r)||Wt(r))return r;throw new Jt(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Kt(e,t)},Zt=Je,Qt=function(e){var t=Xt(e,`string`);return Zt(t)?t:t+``},$t=o,en=j,tn=$t.document,nn=en(tn)&&en(tn.createElement),rn=function(e){return nn?tn.createElement(e):{}},an=O,on=s,sn=rn,cn=!an&&!on(function(){return Object.defineProperty(sn(`div`),`a`,{get:function(){return 7}}).a!==7}),ln=O,un=k,dn=oe,fn=le,pn=Se,mn=Qt,hn=Et,gn=cn,_n=Object.getOwnPropertyDescriptor;D.f=ln?_n:function(e,t){if(e=pn(e),t=mn(t),gn)try{return _n(e,t)}catch{}if(hn(e,t))return fn(!un(dn.f,e,t),e[t])};var vn=s,yn=E,bn=/#|\.prototype\./,xn=function(e,t){var n=Cn[Sn(e)];return n===Tn?!0:n===wn?!1:yn(t)?vn(t):!!t},Sn=xn.normalize=function(e){return String(e).replace(bn,`.`).toLowerCase()},Cn=xn.data={},wn=xn.NATIVE=`N`,Tn=xn.POLYFILL=`P`,En=xn,Dn=te,On=et,kn=c,An=Dn(Dn.bind),jn=function(e,t){return On(e),t===void 0?e:kn?An(e,t):function(){return e.apply(t,arguments)}},Mn={},Nn=O&&s(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),Pn=j,Fn=String,In=TypeError,Ln=function(e){if(Pn(e))return e;throw new In(Fn(e)+` is not an object`)},Rn=O,zn=cn,Bn=Nn,Vn=Ln,Hn=Qt,Un=TypeError,Wn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Kn=`enumerable`,I=`configurable`,L=`writable`;Mn.f=Rn?Bn?function(e,t,n){if(Vn(e),t=Hn(t),Vn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&L in n&&!n[L]){var r=Gn(e,t);r&&r[L]&&(e[t]=n.value,n={configurable:I in n?n[I]:r[I],enumerable:Kn in n?n[Kn]:r[Kn],writable:!1})}return Wn(e,t,n)}:Wn:function(e,t,n){if(Vn(e),t=Hn(t),Vn(n),zn)try{return Wn(e,t,n)}catch{}if(`get`in n||`set`in n)throw new Un(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var qn=O,Jn=Mn,Yn=le,Xn=qn?function(e,t,n){return Jn.f(e,t,Yn(1,n))}:function(e,t,n){return e[t]=n,e},Zn=o,Qn=p,$n=te,er=E,tr=D.f,nr=En,rr=M,ir=jn,ar=Xn,or=Et,sr=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Qn(e,this,arguments)};return t.prototype=e.prototype,t},R=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?Zn:i?Zn[n]:(Zn[n]||{}).prototype,s=r?rr:rr[n]||ar(rr,n,{})[n],c=s.prototype,l,u,d,f,p,m,h,g,_;for(f in t)l=nr(r?f:n+(i?`.`:`#`)+f,e.forced),u=!l&&o&&or(o,f),m=s[f],u&&(e.dontCallGetSet?(_=tr(o,f),h=_&&_.value):h=o[f]),p=u&&h?h:t[f],!(u&&typeof m==typeof p)&&(g=e.bind&&u?ir(p,Zn):e.wrap&&u?sr(p):a&&er(p)?$n(p):p,(e.sham||p&&p.sham||m&&m.sham)&&ar(g,`sham`,!0),ar(s,f,g),a&&(d=n+`Prototype`,or(rr,d)||ar(rr,d,{}),ar(rr[d],f,p),e.real&&c&&(l||!c[f])&&ar(c,f,p)))},cr=R,lr=O,ur=Mn.f;cr({target:`Object`,stat:!0,forced:Object.defineProperty!==ur,sham:!lr},{defineProperty:ur});var dr=M.Object,fr=i.exports=function(e,t,n){return dr.defineProperty(e,t,n)};dr.defineProperty.sham&&(fr.sham=!0);var pr=i.exports,mr=pr,hr=r(mr),gr=S,_r=Array.isArray||function(e){return gr(e)===`Array`},vr=Math.ceil,yr=Math.floor,br=Math.trunc||function(e){var t=+e;return(t>0?yr:vr)(t)},xr=function(e){var t=+e;return t!==t||t===0?0:br(t)},Sr=xr,Cr=Math.min,wr=function(e){return e>0?Cr(Sr(e),9007199254740991):0},Tr=function(e){return wr(e.length)},Er=TypeError,Dr=9007199254740991,Or=function(e){if(e>Dr)throw Er(`Maximum allowed index exceeded`);return e},kr=Qt,Ar=Mn,jr=le,Mr=function(e,t,n){var r=kr(t);r in e?Ar.f(e,r,jr(0,n)):e[r]=n},Nr=Vt(`toStringTag`),Pr={};Pr[Nr]=`z`;var Fr=String(Pr)===`[object z]`,Ir=Fr,Lr=E,Rr=S,zr=Vt(`toStringTag`),Br=Object,Vr=Rr(function(){return arguments}())===`Arguments`,Hr=function(e,t){try{return e[t]}catch{}},Ur=Ir?Rr:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=Hr(t=Br(e),zr))==`string`?n:Vr?Rr(t):(r=Rr(t))===`Object`&&Lr(t.callee)?`Arguments`:r},Wr=v,Gr=E,Kr=_t,qr=Wr(Function.toString);Gr(Kr.inspectSource)||(Kr.inspectSource=function(e){return qr(e)});var Jr=Kr.inspectSource,Yr=v,Xr=s,Zr=E,Qr=Ur,$r=P,z=Jr,ei=function(){},ti=[],ni=$r(`Reflect`,`construct`),ri=/^\s*(?:class|function)\b/,ii=Yr(ri.exec),ai=!ri.test(ei),oi=function(e){if(!Zr(e))return!1;try{return ni(ei,ti,e),!0}catch{return!1}},si=function(e){if(!Zr(e))return!1;switch(Qr(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return ai||!!ii(ri,z(e))}catch{return!0}};si.sham=!0;var ci=!ni||Xr(function(){var e;return oi(oi.call)||!oi(Object)||!oi(function(){e=!0})||e})?si:oi,li=_r,ui=ci,di=j,fi=Vt(`species`),pi=Array,mi=function(e){var t;return li(e)&&(t=e.constructor,ui(t)&&(t===pi||li(t.prototype))?t=void 0:di(t)&&(t=t[fi],t===null&&(t=void 0))),t===void 0?pi:t},hi=function(e,t){return new(mi(e))(t===0?0:t)},gi=s,_i=Vt,vi=Le,yi=_i(`species`),bi=function(e){return vi>=51||!gi(function(){var t=[],n=t.constructor={};return n[yi]=function(){return{foo:1}},t[e](Boolean).foo!==1})},xi=R,Si=s,Ci=_r,wi=j,Ti=St,Ei=Tr,Di=Or,Oi=Mr,ki=hi,Ai=bi,ji=Vt,Mi=Le,Ni=ji(`isConcatSpreadable`),Pi=Mi>=51||!Si(function(){var e=[];return e[Ni]=!1,e.concat()[0]!==e}),Fi=function(e){if(!wi(e))return!1;var t=e[Ni];return t===void 0?Ci(e):!!t};xi({target:`Array`,proto:!0,arity:1,forced:!Pi||!Ai(`concat`)},{concat:function(e){var t=Ti(this),n=ki(t,0),r=0,i,a,o,s,c;for(i=-1,o=arguments.length;i<o;i++)if(c=i===-1?t:arguments[i],Fi(c))for(s=Ei(c),Di(r+s),a=0;a<s;a++,r++)a in c&&Oi(n,r,c[a]);else Di(r+1),Oi(n,r++,c);return n.length=r,n}});var Ii=Ur,Li=String,Ri=function(e){if(Ii(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return Li(e)},zi={},Bi=xr,Vi=Math.max,Hi=Math.min,Ui=function(e,t){var n=Bi(e);return n<0?Vi(n+t,0):Hi(n,t)},Wi=Se,Gi=Ui,Ki=Tr,qi=function(e){return function(t,n,r){var i=Wi(t),a=Ki(i),o=Gi(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Ji={includes:qi(!0),indexOf:qi(!1)},Yi={},Xi=v,Zi=Et,Qi=Se,$i=Ji.indexOf,ea=Yi,ta=Xi([].push),na=function(e,t){var n=Qi(e),r=0,i=[],a;for(a in n)!Zi(ea,a)&&Zi(n,a)&&ta(i,a);for(;t.length>r;)Zi(n,a=t[r++])&&(~$i(i,a)||ta(i,a));return i},ra=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],ia=na,aa=ra,oa=Object.keys||function(e){return ia(e,aa)},sa=O,ca=Nn,la=Mn,ua=Ln,da=Se,fa=oa;zi.f=sa&&!ca?Object.defineProperties:function(e,t){ua(e);for(var n=da(t),r=fa(t),i=r.length,a=0,o;i>a;)la.f(e,o=r[a++],n[o]);return e};var pa=P(`document`,`documentElement`),ma=yt,ha=jt,ga=ma(`keys`),_a=function(e){return ga[e]||(ga[e]=ha(e))},va=Ln,ya=zi,ba=ra,xa=Yi,Sa=pa,Ca=rn,wa=_a,Ta=`>`,Ea=`<`,Da=`prototype`,Oa=`script`,ka=wa(`IE_PROTO`),Aa=function(){},ja=function(e){return Ea+Oa+Ta+e+Ea+`/`+Oa+Ta},Ma=function(e){e.write(ja(``)),e.close();var t=e.parentWindow.Object;return e=null,t},Na=function(){var e=Ca(`iframe`),t=`java`+Oa+`:`,n;return e.style.display=`none`,Sa.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(ja(`document.F=Object`)),n.close(),n.F},Pa,Fa=function(){try{Pa=new ActiveXObject(`htmlfile`)}catch{}Fa=typeof document<`u`?document.domain&&Pa?Ma(Pa):Na():Ma(Pa);for(var e=ba.length;e--;)delete Fa[Da][ba[e]];return Fa()};xa[ka]=!0;var Ia=Object.create||function(e,t){var n;return e===null?n=Fa():(Aa[Da]=va(e),n=new Aa,Aa[Da]=null,n[ka]=e),t===void 0?n:ya.f(n,t)},La={},Ra=na,za=ra.concat(`length`,`prototype`);La.f=Object.getOwnPropertyNames||function(e){return Ra(e,za)};var Ba={},Va=Ui,Ha=Tr,Ua=Mr,Wa=Array,Ga=Math.max,Ka=function(e,t,n){for(var r=Ha(e),i=Va(t,r),a=Va(n===void 0?r:n,r),o=Wa(Ga(a-i,0)),s=0;i<a;i++,s++)Ua(o,s,e[i]);return o.length=s,o},qa=S,Ja=Se,Ya=La.f,Xa=Ka,Za=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Qa=function(e){try{return Ya(e)}catch{return Xa(Za)}};Ba.f=function(e){return Za&&qa(e)===`Window`?Qa(e):Ya(Ja(e))};var $a={};$a.f=Object.getOwnPropertySymbols;var eo=Xn,to=function(e,t,n,r){return r&&r.enumerable?e[t]=n:eo(e,t,n),e},no=Mn,ro=function(e,t,n){return no.f(e,t,n)},io={};io.f=Vt;var ao=M,oo=Et,so=io,co=Mn.f,lo=function(e){var t=ao.Symbol||={};oo(t,e)||co(t,e,{value:so.f(e)})},uo=k,fo=P,po=Vt,mo=to,ho=function(){var e=fo(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=po(`toPrimitive`);t&&!t[r]&&mo(t,r,function(e){return uo(n,this)},{arity:1})},go=Fr,_o=Ur,vo=go?{}.toString:function(){return`[object `+_o(this)+`]`},yo=Fr,bo=Mn.f,xo=Xn,So=Et,Co=vo,wo=Vt(`toStringTag`),To=function(e,t,n,r){if(e){var i=n?e:e.prototype;So(i,wo)||bo(i,wo,{configurable:!0,value:t}),r&&!yo&&xo(i,`toString`,Co)}},Eo=o,Do=E,Oo=Eo.WeakMap,ko=Do(Oo)&&/native code/.test(String(Oo)),Ao=o,jo=j,Mo=Xn,No=Et,Po=_t,Fo=_a,Io=Yi,Lo=`Object already initialized`,Ro=Ao.TypeError,zo=Ao.WeakMap,Bo,Vo,Ho,Uo=function(e){return Ho(e)?Vo(e):Bo(e,{})},Wo=function(e){return function(t){var n;if(!jo(t)||(n=Vo(t)).type!==e)throw new Ro(`Incompatible receiver, `+e+` required`);return n}};if(ko||Po.state){var Go=Po.state||=new zo;Go.get=Go.get,Go.has=Go.has,Go.set=Go.set,Bo=function(e,t){if(Go.has(e))throw new Ro(Lo);return t.facade=e,Go.set(e,t),t},Vo=function(e){return Go.get(e)||{}},Ho=function(e){return Go.has(e)}}else{var Ko=Fo(`state`);Io[Ko]=!0,Bo=function(e,t){if(No(e,Ko))throw new Ro(Lo);return t.facade=e,Mo(e,Ko,t),t},Vo=function(e){return No(e,Ko)?e[Ko]:{}},Ho=function(e){return No(e,Ko)}}var qo={set:Bo,get:Vo,has:Ho,enforce:Uo,getterFor:Wo},Jo=jn,Yo=v,Xo=he,Zo=St,Qo=Tr,$o=hi,es=Yo([].push),ts=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f=Zo(c),p=Xo(f),m=Jo(l,u),h=Qo(p),g=0,_=d||$o,v=t?_(c,h):n||o?_(c,0):void 0,y,b;h>g;g++)if((s||g in p)&&(y=p[g],b=m(y,g,f),e))if(t)v[g]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return g;case 2:es(v,y)}else switch(e){case 4:return!1;case 7:es(v,y)}return a?-1:r||i?i:v}},ns={forEach:ts(0),map:ts(1),filter:ts(2),some:ts(3),every:ts(4),find:ts(5),findIndex:ts(6),filterReject:ts(7)},rs=R,is=o,as=k,os=v,ss=O,cs=Ve,ls=s,us=Et,ds=Oe,fs=Ln,ps=Se,ms=Qt,hs=Ri,gs=le,_s=Ia,vs=oa,ys=La,bs=Ba,xs=$a,Ss=D,Cs=Mn,ws=zi,Ts=oe,Es=to,Ds=ro,Os=yt,ks=_a,As=Yi,js=jt,Ms=Vt,Ns=io,Ps=lo,Fs=ho,Is=To,Ls=qo,Rs=ns.forEach,zs=ks(`hidden`),Bs=`Symbol`,Vs=`prototype`,Hs=Ls.set,Us=Ls.getterFor(Bs),Ws=Object[Vs],Gs=is.Symbol,Ks=Gs&&Gs[Vs],qs=is.RangeError,Js=is.TypeError,Ys=is.QObject,Xs=Ss.f,Zs=Cs.f,Qs=bs.f,$s=Ts.f,ec=os([].push),tc=Os(`symbols`),nc=Os(`op-symbols`),rc=Os(`wks`),ic=!Ys||!Ys[Vs]||!Ys[Vs].findChild,ac=function(e,t,n){var r=Xs(Ws,t);r&&delete Ws[t],Zs(e,t,n),r&&e!==Ws&&Zs(Ws,t,r)},oc=ss&&ls(function(){return _s(Zs({},`a`,{get:function(){return Zs(this,`a`,{value:7}).a}})).a!==7})?ac:Zs,sc=function(e,t){var n=tc[e]=_s(Ks);return Hs(n,{type:Bs,tag:e,description:t}),ss||(n.description=t),n},cc=function(e,t,n){e===Ws&&cc(nc,t,n),fs(e);var r=ms(t);return fs(n),us(tc,r)?(n.enumerable?(us(e,zs)&&e[zs][r]&&(e[zs][r]=!1),n=_s(n,{enumerable:gs(0,!1)})):(us(e,zs)||Zs(e,zs,gs(1,{})),e[zs][r]=!0),oc(e,r,n)):Zs(e,r,n)},lc=function(e,t){fs(e);var n=ps(t);return Rs(vs(n).concat(mc(n)),function(t){(!ss||as(dc,n,t))&&cc(e,t,n[t])}),e},uc=function(e,t){return t===void 0?_s(e):lc(_s(e),t)},dc=function(e){var t=ms(e),n=as($s,this,t);return this===Ws&&us(tc,t)&&!us(nc,t)?!1:n||!us(this,t)||!us(tc,t)||us(this,zs)&&this[zs][t]?n:!0},fc=function(e,t){var n=ps(e),r=ms(t);if(!(n===Ws&&us(tc,r)&&!us(nc,r))){var i=Xs(n,r);return i&&us(tc,r)&&!(us(n,zs)&&n[zs][r])&&(i.enumerable=!0),i}},pc=function(e){var t=Qs(ps(e)),n=[];return Rs(t,function(e){!us(tc,e)&&!us(As,e)&&ec(n,e)}),n},mc=function(e){var t=e===Ws,n=Qs(t?nc:ps(e)),r=[];return Rs(n,function(e){us(tc,e)&&(!t||us(Ws,e))&&ec(r,tc[e])}),r};cs||(Gs=function(){if(ds(Ks,this))throw new Js(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:hs(arguments[0]),t=js(e),n=function(e){var r=this===void 0?is:this;r===Ws&&as(n,nc,e),us(r,zs)&&us(r[zs],t)&&(r[zs][t]=!1);var i=gs(1,e);try{oc(r,t,i)}catch(e){if(!(e instanceof qs))throw e;ac(r,t,i)}};return ss&&ic&&oc(Ws,t,{configurable:!0,set:n}),sc(t,e)},Ks=Gs[Vs],Es(Ks,`toString`,function(){return Us(this).tag}),Es(Gs,`withoutSetter`,function(e){return sc(js(e),e)}),Ts.f=dc,Cs.f=cc,ws.f=lc,Ss.f=fc,ys.f=bs.f=pc,xs.f=mc,Ns.f=function(e){return sc(Ms(e),e)},ss&&Ds(Ks,`description`,{configurable:!0,get:function(){return Us(this).description}})),rs({global:!0,constructor:!0,wrap:!0,forced:!cs,sham:!cs},{Symbol:Gs}),Rs(vs(rc),function(e){Ps(e)}),rs({target:Bs,stat:!0,forced:!cs},{useSetter:function(){ic=!0},useSimple:function(){ic=!1}}),rs({target:`Object`,stat:!0,forced:!cs,sham:!ss},{create:uc,defineProperty:cc,defineProperties:lc,getOwnPropertyDescriptor:fc}),rs({target:`Object`,stat:!0,forced:!cs},{getOwnPropertyNames:pc}),Fs(),Is(Gs,Bs),As[zs]=!0;var hc=Ve&&!!Symbol.for&&!!Symbol.keyFor,gc=R,_c=P,vc=Et,yc=Ri,bc=yt,xc=hc,Sc=bc(`string-to-symbol-registry`),B=bc(`symbol-to-string-registry`);gc({target:`Symbol`,stat:!0,forced:!xc},{for:function(e){var t=yc(e);if(vc(Sc,t))return Sc[t];var n=_c(`Symbol`)(t);return Sc[t]=n,B[n]=t,n}});var Cc=R,wc=Et,Tc=Je,Ec=Xe,Dc=yt,Oc=hc,kc=Dc(`symbol-to-string-registry`);Cc({target:`Symbol`,stat:!0,forced:!Oc},{keyFor:function(e){if(!Tc(e))throw TypeError(Ec(e)+` is not a symbol`);if(wc(kc,e))return kc[e]}});var Ac=v([].slice),jc=v,Mc=_r,Nc=E,Pc=S,Fc=Ri,Ic=jc([].push),Lc=function(e){if(Nc(e))return e;if(Mc(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?Ic(n,i):(typeof i==`number`||Pc(i)===`Number`||Pc(i)===`String`)&&Ic(n,Fc(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(Mc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Rc=R,zc=P,Bc=p,Vc=k,Hc=v,Uc=s,Wc=E,Gc=Je,Kc=Ac,qc=Lc,Jc=Ve,Yc=String,Xc=zc(`JSON`,`stringify`),Zc=Hc(/./.exec),Qc=Hc(``.charAt),$c=Hc(``.charCodeAt),el=Hc(``.replace),tl=Hc(1 .toString),nl=/[\uD800-\uDFFF]/g,rl=/^[\uD800-\uDBFF]$/,il=/^[\uDC00-\uDFFF]$/,al=!Jc||Uc(function(){var e=zc(`Symbol`)(`stringify detection`);return Xc([e])!==`[null]`||Xc({a:e})!==`{}`||Xc(Object(e))!==`{}`}),ol=Uc(function(){return Xc(`\udf06\ud834`)!==`"\\udf06\\ud834"`||Xc(`\udead`)!==`"\\udead"`}),sl=function(e,t){var n=Kc(arguments),r=qc(t);if(!(!Wc(r)&&(e===void 0||Gc(e))))return n[1]=function(e,t){if(Wc(r)&&(t=Vc(r,this,Yc(e),t)),!Gc(t))return t},Bc(Xc,null,n)},cl=function(e,t,n){var r=Qc(n,t-1),i=Qc(n,t+1);return Zc(rl,e)&&!Zc(il,i)||Zc(il,e)&&!Zc(rl,r)?`\\u`+tl($c(e,0),16):e};Xc&&Rc({target:`JSON`,stat:!0,arity:3,forced:al||ol},{stringify:function(e,t,n){var r=Kc(arguments),i=Bc(al?sl:Xc,null,r);return ol&&typeof i==`string`?el(i,nl,cl):i}});var ll=R,ul=Ve,dl=s,fl=$a,pl=St;ll({target:`Object`,stat:!0,forced:!ul||dl(function(){fl.f(1)})},{getOwnPropertySymbols:function(e){var t=fl.f;return t?t(pl(e)):[]}}),lo(`asyncIterator`),lo(`hasInstance`),lo(`isConcatSpreadable`),lo(`iterator`),lo(`match`),lo(`matchAll`),lo(`replace`),lo(`search`),lo(`species`),lo(`split`);var ml=lo,hl=ho;ml(`toPrimitive`),hl();var gl=P,_l=lo,vl=To;_l(`toStringTag`),vl(gl(`Symbol`),`Symbol`),lo(`unscopables`),To(o.JSON,`JSON`,!0);var yl=M.Symbol,bl={},xl=O,Sl=Et,Cl=Function.prototype,wl=xl&&Object.getOwnPropertyDescriptor,Tl=Sl(Cl,`name`),El={EXISTS:Tl,PROPER:Tl&&(function(){}).name===`something`,CONFIGURABLE:Tl&&(!xl||xl&&wl(Cl,`name`).configurable)},Dl=!s(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Ol=Et,kl=E,Al=St,jl=_a,Ml=Dl,Nl=jl(`IE_PROTO`),Pl=Object,Fl=Pl.prototype,Il=Ml?Pl.getPrototypeOf:function(e){var t=Al(e);if(Ol(t,Nl))return t[Nl];var n=t.constructor;return kl(n)&&t instanceof n?n.prototype:t instanceof Pl?Fl:null},Ll=s,Rl=E,zl=j,Bl=Ia,Vl=Il,Hl=to,Ul=Vt(`iterator`),Wl=!1,Gl,Kl,ql;[].keys&&(ql=[].keys(),`next`in ql?(Kl=Vl(Vl(ql)),Kl!==Object.prototype&&(Gl=Kl)):Wl=!0),Gl=!zl(Gl)||Ll(function(){var e={};return Gl[Ul].call(e)!==e})?{}:Bl(Gl),Rl(Gl[Ul])||Hl(Gl,Ul,function(){return this});var Jl={IteratorPrototype:Gl,BUGGY_SAFARI_ITERATORS:Wl},Yl=Jl.IteratorPrototype,Xl=Ia,Zl=le,Ql=To,$l=bl,eu=function(){return this},tu=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=Xl(Yl,{next:Zl(+!r,n)}),Ql(e,i,!1,!0),$l[i]=eu,e},nu=v,ru=et,iu=function(e,t,n){try{return nu(ru(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},au=E,ou=String,su=TypeError,cu=function(e){if(typeof e==`object`||au(e))return e;throw new su(`Can't set `+ou(e)+` as a prototype`)},lu=iu,uu=Ln,du=cu,fu=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},n;try{n=lu(Object.prototype,`__proto__`,`set`),n(t,[]),e=t instanceof Array}catch{}return function(t,r){return uu(t),du(r),e?n(t,r):t.__proto__=r,t}}():void 0),pu=R,mu=k,hu=El,gu=tu,_u=Il,vu=To,yu=to,bu=Vt,xu=bl,Su=Jl,Cu=hu.PROPER;hu.CONFIGURABLE,Su.IteratorPrototype;var wu=Su.BUGGY_SAFARI_ITERATORS,Tu=bu(`iterator`),Eu=`keys`,Du=`values`,Ou=`entries`,ku=function(){return this},Au=function(e,t,n,r,i,a,o){gu(n,t,r);var s=function(e){if(e===i&&f)return f;if(!wu&&e&&e in u)return u[e];switch(e){case Eu:return function(){return new n(this,e)};case Du:return function(){return new n(this,e)};case Ou:return function(){return new n(this,e)}}return function(){return new n(this)}},c=t+` Iterator`,l=!1,u=e.prototype,d=u[Tu]||u[`@@iterator`]||i&&u[i],f=!wu&&d||s(i),p=t===`Array`&&u.entries||d,m,h,g;if(p&&(m=_u(p.call(new e)),m!==Object.prototype&&m.next&&(vu(m,c,!0,!0),xu[c]=ku)),Cu&&i===Du&&d&&d.name!==Du&&(l=!0,f=function(){return mu(d,this)}),i)if(h={values:s(Du),keys:a?f:s(Eu),entries:s(Ou)},o)for(g in h)(wu||l||!(g in u))&&yu(u,g,h[g]);else pu({target:t,proto:!0,forced:wu||l},h);return o&&u[Tu]!==f&&yu(u,Tu,f,{name:i}),xu[t]=f,h},ju=function(e,t){return{value:e,done:t}},Mu=Se,Nu=bl,Pu=qo;Mn.f;var Fu=Au,Iu=ju,Lu=`Array Iterator`,Ru=Pu.set,zu=Pu.getterFor(Lu);Fu(Array,`Array`,function(e,t){Ru(this,{type:Lu,target:Mu(e),index:0,kind:t})},function(){var e=zu(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Iu(void 0,!0);switch(e.kind){case`keys`:return Iu(n,!1);case`values`:return Iu(t[n],!1)}return Iu([n,t[n]],!1)},`values`),Nu.Arguments=Nu.Array;var Bu={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Vu=o,Hu=Ur,Uu=Xn,Wu=bl,Gu=Vt(`toStringTag`);for(var Ku in Bu){var qu=Vu[Ku],Ju=qu&&qu.prototype;Ju&&Hu(Ju)!==Gu&&Uu(Ju,Gu,Ku),Wu[Ku]=Wu.Array}var Yu=yl,Xu=Vt,Zu=Mn.f,Qu=Xu(`metadata`),$u=Function.prototype;$u[Qu]===void 0&&Zu($u,Qu,{value:null}),lo(`asyncDispose`),lo(`dispose`),lo(`metadata`);var ed=Yu,td=P,nd=v,rd=td(`Symbol`),id=rd.keyFor,ad=nd(rd.prototype.valueOf),od=rd.isRegisteredSymbol||function(e){try{return id(ad(e))!==void 0}catch{return!1}};R({target:`Symbol`,stat:!0},{isRegisteredSymbol:od});for(var sd=yt,cd=P,ld=v,ud=Je,dd=Vt,fd=cd(`Symbol`),pd=fd.isWellKnownSymbol,md=cd(`Object`,`getOwnPropertyNames`),hd=ld(fd.prototype.valueOf),gd=sd(`wks`),_d=0,vd=md(fd),yd=vd.length;_d<yd;_d++)try{var bd=vd[_d];ud(fd[bd])&&dd(bd)}catch{}var xd=function(e){if(pd&&pd(e))return!0;try{for(var t=hd(e),n=0,r=md(gd),i=r.length;n<i;n++)if(gd[r[n]]==t)return!0}catch{}return!1};R({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:xd}),lo(`matcher`),lo(`observable`),R({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:od}),R({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:xd}),lo(`metadataKey`),lo(`patternMatch`),lo(`replaceAll`);var Sd=ed,Cd=r(Sd),wd=v,Td=xr,Ed=Ri,Dd=ye,Od=wd(``.charAt),kd=wd(``.charCodeAt),Ad=wd(``.slice),jd=function(e){return function(t,n){var r=Ed(Dd(t)),i=Td(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=kd(r,i),o<55296||o>56319||i+1===a||(s=kd(r,i+1))<56320||s>57343?e?Od(r,i):o:e?Ad(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Md={codeAt:jd(!1),charAt:jd(!0)}.charAt,Nd=Ri,Pd=qo,Fd=Au,Id=ju,Ld=`String Iterator`,Rd=Pd.set,zd=Pd.getterFor(Ld);Fd(String,`String`,function(e){Rd(this,{type:Ld,string:Nd(e),index:0})},function(){var e=zd(this),t=e.string,n=e.index,r;return n>=t.length?Id(void 0,!0):(r=Md(t,n),e.index+=r.length,Id(r,!1))});var Bd=io.f(`iterator`),Vd=Bd,Hd=r(Vd);function Ud(e){"@babel/helpers - typeof";return Ud=typeof Cd==`function`&&typeof Hd==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Cd==`function`&&e.constructor===Cd&&e!==Cd.prototype?`symbol`:typeof e},Ud(e)}var Wd=r(io.f(`toPrimitive`));function Gd(e,t){if(Ud(e)!==`object`||e===null)return e;var n=e[Wd];if(n!==void 0){var r=n.call(e,t||`default`);if(Ud(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Kd(e){var t=Gd(e,`string`);return Ud(t)===`symbol`?t:String(t)}function qd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),hr(e,Kd(r.key),r)}}function Jd(e,t,n){return t&&qd(e.prototype,t),n&&qd(e,n),hr(e,`prototype`,{writable:!1}),e}function Yd(e,t,n){return t=Kd(t),t in e?hr(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xd=v,Zd=et,Qd=j,$d=Et,ef=Ac,tf=c,nf=Function,rf=Xd([].concat),af=Xd([].join),of={},sf=function(e,t,n){if(!$d(of,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;of[t]=nf(`C,a`,`return new C(`+af(r,`,`)+`)`)}return of[t](e,n)},cf=tf?nf.bind:function(e){var t=Zd(this),n=t.prototype,r=ef(arguments,1),i=function(){var n=rf(r,ef(arguments));return this instanceof i?sf(t,n.length,n):t.apply(e,n)};return Qd(n)&&(i.prototype=n),i},lf=R,uf=cf;lf({target:`Function`,proto:!0,forced:Function.bind!==uf},{bind:uf});var df=o,ff=M,pf=function(e,t){var n=ff[e+`Prototype`],r=n&&n[t];if(r)return r;var i=df[e],a=i&&i.prototype;return a&&a[t]},mf=pf(`Function`,`bind`),hf=Oe,gf=mf,_f=Function.prototype,vf=function(e){var t=e.bind;return e===_f||hf(_f,e)&&t===_f.bind?gf:t},yf=r(vf),bf=et,xf=St,Sf=he,Cf=Tr,wf=TypeError,Tf=function(e){return function(t,n,r,i){bf(n);var a=xf(t),o=Sf(a),s=Cf(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new wf(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},Ef={left:Tf(!1),right:Tf(!0)},V=s,Df=function(e,t){var n=[][e];return!!n&&V(function(){n.call(null,t||function(){return 1},1)})},Of=S(o.process)===`process`,kf=R,Af=Ef.left,jf=Df,Mf=Le;kf({target:`Array`,proto:!0,forced:!Of&&Mf>79&&Mf<83||!jf(`reduce`)},{reduce:function(e){var t=arguments.length;return Af(this,e,t,t>1?arguments[1]:void 0)}});var Nf=pf(`Array`,`reduce`),Pf=Oe,Ff=Nf,If=Array.prototype,Lf=r(function(e){var t=e.reduce;return e===If||Pf(If,e)&&t===If.reduce?Ff:t}),Rf=R,zf=ns.filter;Rf({target:`Array`,proto:!0,forced:!bi(`filter`)},{filter:function(e){return zf(this,e,arguments.length>1?arguments[1]:void 0)}});var Bf=pf(`Array`,`filter`),Vf=Oe,Hf=Bf,Uf=Array.prototype,Wf=r(function(e){var t=e.filter;return e===Uf||Vf(Uf,e)&&t===Uf.filter?Hf:t}),Gf=R,Kf=ns.map;Gf({target:`Array`,proto:!0,forced:!bi(`map`)},{map:function(e){return Kf(this,e,arguments.length>1?arguments[1]:void 0)}});var qf=pf(`Array`,`map`),Jf=Oe,Yf=qf,Xf=Array.prototype,Zf=r(function(e){var t=e.map;return e===Xf||Jf(Xf,e)&&t===Xf.map?Yf:t}),Qf=_r,$f=Tr,ep=Or,tp=jn,np=function(e,t,n,r,i,a,o,s){for(var c=i,l=0,u=o?tp(o,s):!1,d,f;l<r;)l in n&&(d=u?u(n[l],l,t):n[l],a>0&&Qf(d)?(f=$f(d),c=np(e,t,d,f,c,a-1)-1):(ep(c+1),e[c]=d),c++),l++;return c},rp=np,ip=R,ap=rp,op=et,sp=St,cp=Tr,lp=hi;ip({target:`Array`,proto:!0},{flatMap:function(e){var t=sp(this),n=cp(t),r;return op(e),r=lp(t,0),r.length=ap(r,t,t,n,0,1,e,arguments.length>1?arguments[1]:void 0),r}});var up=pf(`Array`,`flatMap`),dp=Oe,fp=up,pp=Array.prototype,mp=r(function(e){var t=e.flatMap;return e===pp||dp(pp,e)&&t===pp.flatMap?fp:t});function hp(e){return new _p(e)}var gp=function(){function e(n,r,i){var a,o,s;t(this,e),Yd(this,`_listeners`,{add:yf(a=this._add).call(a,this),remove:yf(o=this._remove).call(o,this),update:yf(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Jd(e,[{key:`all`,value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:`start`,value:function(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}},{key:`stop`,value:function(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}},{key:`_transformItems`,value:function(e){var t;return Lf(t=this._transformers).call(t,function(e,t){return t(e)},e)}},{key:`_add`,value:function(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:`_update`,value:function(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:`_remove`,value:function(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),_p=function(){function e(n){t(this,e),Yd(this,`_transformers`,[]),this._source=n}return Jd(e,[{key:`filter`,value:function(e){return this._transformers.push(function(t){return Wf(t).call(t,e)}),this}},{key:`map`,value:function(e){return this._transformers.push(function(t){return Zf(t).call(t,e)}),this}},{key:`flatMap`,value:function(e){return this._transformers.push(function(t){return mp(t).call(t,e)}),this}},{key:`to`,value:function(e){return new gp(this._source,this._transformers,e)}}]),e}(),vp=k,yp=Ln,bp=rt,xp=function(e,t,n){var r,i;yp(e);try{if(r=bp(e,`return`),!r){if(t===`throw`)throw n;return n}r=vp(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return yp(r),n},Sp=Ln,Cp=xp,wp=function(e,t,n,r){try{return r?t(Sp(n)[0],n[1]):t(n)}catch(t){Cp(e,`throw`,t)}},Tp=Vt,Ep=bl,Dp=Tp(`iterator`),Op=Array.prototype,kp=function(e){return e!==void 0&&(Ep.Array===e||Op[Dp]===e)},Ap=Ur,jp=rt,Mp=ge,Np=bl,Pp=Vt(`iterator`),Fp=function(e){if(!Mp(e))return jp(e,Pp)||jp(e,`@@iterator`)||Np[Ap(e)]},Ip=k,Lp=et,Rp=Ln,zp=Xe,Bp=Fp,Vp=TypeError,Hp=function(e,t){var n=arguments.length<2?Bp(e):t;if(Lp(n))return Rp(Ip(n,e));throw new Vp(zp(e)+` is not iterable`)},Up=jn,Wp=k,Gp=St,Kp=wp,qp=kp,Jp=ci,Yp=Tr,Xp=Mr,Zp=Hp,Qp=Fp,$p=Array,em=function(e){var t=Gp(e),n=Jp(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Up(i,r>2?arguments[2]:void 0));var o=Qp(t),s=0,c,l,u,d,f,p;if(o&&!(this===$p&&qp(o)))for(d=Zp(t,o),f=d.next,l=n?new this:[];!(u=Wp(f,d)).done;s++)p=a?Kp(d,i,[u.value,s],!0):u.value,Xp(l,s,p);else for(c=Yp(t),l=n?new this(c):$p(c);c>s;s++)p=a?i(t[s],s):t[s],Xp(l,s,p);return l.length=s,l},tm=Vt(`iterator`),nm=!1;try{var rm=0,im={next:function(){return{done:!!rm++}},return:function(){nm=!0}};im[tm]=function(){return this},Array.from(im,function(){throw 2})}catch{}var am=function(e,t){try{if(!t&&!nm)return!1}catch{return!1}var n=!1;try{var r={};r[tm]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},om=R,sm=em;om({target:`Array`,stat:!0,forced:!am(function(e){Array.from(e)})},{from:sm});var cm=M.Array.from,lm=r(cm),um=Fp,dm=r(um),fm=r(um);R({target:`Array`,stat:!0},{isArray:_r});var pm=M.Array.isArray,mm=r(pm);function hm(e){if(mm(e))return e}var gm=O,_m=_r,vm=TypeError,ym=Object.getOwnPropertyDescriptor,bm=gm&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(_m(e)&&!ym(e,`length`).writable)throw new vm(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},xm=R,Sm=St,Cm=Tr,wm=bm,Tm=Or;xm({target:`Array`,proto:!0,arity:1,forced:s(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=Sm(this),n=Cm(t),r=arguments.length;Tm(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return wm(t,n),n}});var Em=pf(`Array`,`push`),Dm=Oe,Om=Em,km=Array.prototype,Am=function(e){var t=e.push;return e===km||Dm(km,e)&&t===km.push?Om:t},jm=r(Am);function Mm(e,t){var n=e==null?null:Cd!==void 0&&dm(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(jm(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var Nm=R,Pm=_r,Fm=ci,Im=j,Lm=Ui,Rm=Tr,zm=Se,Bm=Mr,Vm=Vt,Hm=bi,Um=Ac,Wm=Hm(`slice`),Gm=Vm(`species`),Km=Array,qm=Math.max;Nm({target:`Array`,proto:!0,forced:!Wm},{slice:function(e,t){var n=zm(this),r=Rm(n),i=Lm(e,r),a=Lm(t===void 0?r:t,r),o,s,c;if(Pm(n)&&(o=n.constructor,Fm(o)&&(o===Km||Pm(o.prototype))?o=void 0:Im(o)&&(o=o[Gm],o===null&&(o=void 0)),o===Km||o===void 0))return Um(n,i,a);for(s=new(o===void 0?Km:o)(qm(a-i,0)),c=0;i<a;i++,c++)i in n&&Bm(s,c,n[i]);return s.length=c,s}});var Jm=pf(`Array`,`slice`),Ym=Oe,Xm=Jm,Zm=Array.prototype,Qm=function(e){var t=e.slice;return e===Zm||Ym(Zm,e)&&t===Zm.slice?Xm:t},$m=Qm,eh=r($m),th=r(cm);function nh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rh(e,t){var n;if(e){if(typeof e==`string`)return nh(e,t);var r=eh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return th(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nh(e,t)}}function ih(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ah(e,t){return hm(e)||Mm(e,t)||rh(e,t)||ih()}function oh(e){if(mm(e))return nh(e)}function sh(e){if(Cd!==void 0&&dm(e)!=null||e[`@@iterator`]!=null)return th(e)}function ch(){throw TypeError(`Invalid attempt to spread non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lh(e){return oh(e)||sh(e)||rh(e)||ch()}var uh=r(Yu),dh=pf(`Array`,`concat`),fh=Oe,ph=dh,mh=Array.prototype,hh=r(function(e){var t=e.concat;return e===mh||fh(mh,e)&&t===mh.concat?ph:t}),gh=r(Qm),_h=P,vh=v,yh=La,bh=$a,xh=Ln,Sh=vh([].concat),Ch=_h(`Reflect`,`ownKeys`)||function(e){var t=yh.f(xh(e)),n=bh.f;return n?Sh(t,n(e)):t};R({target:`Reflect`,stat:!0},{ownKeys:Ch});var wh=M.Reflect.ownKeys,Th=r(wh),Eh=r(pm),Dh=R,Oh=St,kh=oa;Dh({target:`Object`,stat:!0,forced:s(function(){kh(1)})},{keys:function(e){return kh(Oh(e))}});var Ah=M.Object.keys,jh=r(Ah),Mh=ns.forEach,Nh=Df(`forEach`)?[].forEach:function(e){return Mh(this,e,arguments.length>1?arguments[1]:void 0)},Ph=R,Fh=Nh;Ph({target:`Array`,proto:!0,forced:[].forEach!==Fh},{forEach:Fh});var Ih=pf(`Array`,`forEach`),Lh=Ur,H=Et,Rh=Oe,zh=Ih,Bh=Array.prototype,Vh={DOMTokenList:!0,NodeList:!0},Hh=function(e){var t=e.forEach;return e===Bh||Rh(Bh,e)&&t===Bh.forEach||H(Vh,Lh(e))?zh:t},Uh=r(Hh),Wh=R,Gh=v,Kh=_r,qh=Gh([].reverse),Jh=[1,2];Wh({target:`Array`,proto:!0,forced:String(Jh)===String(Jh.reverse())},{reverse:function(){return Kh(this)&&(this.length=this.length),qh(this)}});var Yh=pf(`Array`,`reverse`),Xh=Oe,Zh=Yh,Qh=Array.prototype,$h=function(e){var t=e.reverse;return e===Qh||Xh(Qh,e)&&t===Qh.reverse?Zh:t},eg=r($h),tg=Xe,ng=TypeError,rg=function(e,t){if(!delete e[t])throw new ng(`Cannot delete property `+tg(t)+` of `+tg(e))},ig=R,ag=St,og=Ui,sg=xr,cg=Tr,lg=bm,ug=Or,dg=hi,fg=Mr,pg=rg,mg=bi(`splice`),hg=Math.max,gg=Math.min;ig({target:`Array`,proto:!0,forced:!mg},{splice:function(e,t){var n=ag(this),r=cg(n),i=og(e,r),a=arguments.length,o,s,c,l,u,d;for(a===0?o=s=0:a===1?(o=0,s=r-i):(o=a-2,s=gg(hg(sg(t),0),r-i)),ug(r+o-s),c=dg(n,s),l=0;l<s;l++)u=i+l,u in n&&fg(c,l,n[u]);if(c.length=s,o<s){for(l=i;l<r-s;l++)u=l+s,d=l+o,u in n?n[d]=n[u]:pg(n,d);for(l=r;l>r-s+o;l--)pg(n,l-1)}else if(o>s)for(l=r-s;l>i;l--)u=l+s-1,d=l+o-1,u in n?n[d]=n[u]:pg(n,d);for(l=0;l<o;l++)n[l+i]=arguments[l+2];return lg(n,r-s+o),c}});var _g=pf(`Array`,`splice`),vg=Oe,yg=_g,bg=Array.prototype,xg=r(function(e){var t=e.splice;return e===bg||vg(bg,e)&&t===bg.splice?yg:t}),Sg=O,Cg=v,wg=k,Tg=s,Eg=oa,Dg=$a,Og=oe,kg=St,Ag=he,jg=Object.assign,Mg=Object.defineProperty,Ng=Cg([].concat),Pg=!jg||Tg(function(){if(Sg&&jg({b:1},jg(Mg({},`a`,{enumerable:!0,get:function(){Mg(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach(function(e){t[e]=e}),jg({},e)[n]!==7||Eg(jg({},t)).join(``)!==r})?function(e,t){for(var n=kg(e),r=arguments.length,i=1,a=Dg.f,o=Og.f;r>i;)for(var s=Ag(arguments[i++]),c=a?Ng(Eg(s),a(s)):Eg(s),l=c.length,u=0,d;l>u;)d=c[u++],(!Sg||wg(o,s,d))&&(n[d]=s[d]);return n}:jg,Fg=R,Ig=Pg;Fg({target:`Object`,stat:!0,arity:2,forced:Object.assign!==Ig},{assign:Ig});var Lg=M.Object.assign,Rg=r(Lg),zg=R,Bg=s,Vg=St,Hg=Il,Ug=Dl;zg({target:`Object`,stat:!0,forced:Bg(function(){Hg(1)}),sham:!Ug},{getPrototypeOf:function(e){return Hg(Vg(e))}});var Wg=M.Object.getPrototypeOf;R({target:`Object`,stat:!0,sham:!O},{create:Ia});var Gg=M.Object,Kg=function(e,t){return Gg.create(e,t)},qg=r(Kg),Jg=M,Yg=p;Jg.JSON||={stringify:JSON.stringify};var Xg=r(function(e,t,n){return Yg(Jg.JSON.stringify,null,arguments)}),Zg=typeof Bun==`function`&&Bun&&typeof Bun.version==`string`,Qg=TypeError,$g=function(e,t){if(e<t)throw new Qg(`Not enough arguments`);return e},e_=o,t_=p,n_=E,r_=Zg,i_=F,a_=Ac,o_=$g,s_=e_.Function,c_=/MSIE .\./.test(i_)||r_&&(function(){var e=e_.Bun.version.split(`.`);return e.length<3||e[0]===`0`&&(e[1]<3||e[1]===`3`&&e[2]===`0`)})(),l_=function(e,t){var n=t?2:1;return c_?function(r,i){var a=o_(arguments.length,1)>n,o=n_(r)?r:s_(r),s=a?a_(arguments,n):[],c=a?function(){t_(o,this,s)}:o;return t?e(c,i):e(c)}:e},u_=R,d_=o,f_=l_(d_.setInterval,!0);u_({global:!0,bind:!0,forced:d_.setInterval!==f_},{setInterval:f_});var p_=R,m_=o,h_=l_(m_.setTimeout,!0);p_({global:!0,bind:!0,forced:m_.setTimeout!==h_},{setTimeout:h_});var g_=M.setTimeout,__=r(g_),v_={exports:{}};(function(e){function t(e){if(e)return n(e);this._callbacks=new Map}function n(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}t.prototype.on=function(e,t){let n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(e===void 0&&t===void 0)return this._callbacks.clear(),this;if(t===void 0)return this._callbacks.delete(e),this;let n=this._callbacks.get(e);if(n){for(let[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}n.length===0?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){let n=this._callbacks.get(e);if(n){let e=[...n];for(let n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(let e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t})(v_);var y_=v_.exports,b_=r(y_);function x_(){return x_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x_.apply(this,arguments)}function S_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function C_(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var w_=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},T_=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],E_=typeof document>`u`?{style:{}}:document.createElement(`div`),D_=`function`,O_=Math.round,k_=Math.abs,A_=Date.now;function j_(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<T_.length;){if(n=T_[a],r=n?n+i:t,r in e)return r;a++}}var M_=typeof window>`u`?{}:window,N_=j_(E_.style,`touchAction`),P_=N_!==void 0;function F_(){if(!P_)return!1;var e={},t=M_.CSS&&M_.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=t?M_.CSS.supports(`touch-action`,n):!0}),e}var I_=`compute`,L_=`auto`,R_=`manipulation`,z_=`none`,B_=`pan-x`,V_=`pan-y`,H_=F_(),U_=/mobile|tablet|ip(ad|hone|od)|android/i,W_=`ontouchstart`in M_,G_=j_(M_,`PointerEvent`)!==void 0,K_=W_&&U_.test(navigator.userAgent),q_=`touch`,J_=`pen`,Y_=`mouse`,X_=`kinect`,Z_=25,Q_=1,$_=2,ev=4,tv=8,nv=1,rv=2,iv=4,av=8,ov=16,sv=rv|iv,cv=av|ov,lv=sv|cv,uv=[`x`,`y`],dv=[`clientX`,`clientY`];function fv(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function pv(e,t){return typeof e===D_?e.apply(t&&t[0]||void 0,t):e}function mv(e,t){return e.indexOf(t)>-1}function hv(e){if(mv(e,z_))return z_;var t=mv(e,B_),n=mv(e,V_);return t&&n?z_:t||n?t?B_:V_:mv(e,R_)?R_:L_}var gv=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===I_&&(e=this.compute()),P_&&this.manager.element.style&&H_[e]&&(this.manager.element.style[N_]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return fv(this.manager.recognizers,function(t){pv(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),hv(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=mv(r,z_)&&!H_[z_],a=mv(r,V_)&&!H_[V_],o=mv(r,B_)&&!H_[B_];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&sv||o&&n&cv))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function _v(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function vv(e){var t=e.length;if(t===1)return{x:O_(e[0].clientX),y:O_(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:O_(n/t),y:O_(r/t)}}function yv(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:O_(e.pointers[n].clientX),clientY:O_(e.pointers[n].clientY)},n++;return{timeStamp:A_(),pointers:t,center:vv(t),deltaX:e.deltaX,deltaY:e.deltaY}}function bv(e,t,n){n||=uv;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function xv(e,t,n){n||=uv;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function Sv(e,t){return e===t?nv:k_(e)>=k_(t)?e<0?rv:iv:t<0?av:ov}function Cv(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===Q_||a.eventType===ev)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function wv(e,t,n){return{x:t/e||0,y:n/e||0}}function Tv(e,t){return bv(t[0],t[1],dv)/bv(e[0],e[1],dv)}function Ev(e,t){return xv(t[1],t[0],dv)+xv(e[1],e[0],dv)}function Dv(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==tv&&(r>Z_||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=wv(r,c,l);a=u.x,o=u.y,i=k_(u.x)>k_(u.y)?u.x:u.y,s=Sv(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function Ov(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=yv(t),i>1&&!n.firstMultiple?n.firstMultiple=yv(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=vv(r);t.timeStamp=A_(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=xv(s,c),t.distance=bv(s,c),Cv(n,t),t.offsetDirection=Sv(t.deltaX,t.deltaY);var l=wv(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=k_(l.x)>k_(l.y)?l.x:l.y,t.scale=o?Tv(o.pointers,r):1,t.rotation=o?Ev(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,Dv(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;_v(f,u)&&(u=f),t.target=u}function kv(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&Q_&&r-i===0,o=t&(ev|tv)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,Ov(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function Av(e){return e.trim().split(/\s+/g)}function jv(e,t,n){fv(Av(t),function(t){e.addEventListener(t,n,!1)})}function U(e,t,n){fv(Av(t),function(t){e.removeEventListener(t,n,!1)})}function Mv(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Nv=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){pv(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&jv(this.element,this.evEl,this.domHandler),this.evTarget&&jv(this.target,this.evTarget,this.domHandler),this.evWin&&jv(Mv(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&U(this.element,this.evEl,this.domHandler),this.evTarget&&U(this.target,this.evTarget,this.domHandler),this.evWin&&U(Mv(this.element),this.evWin,this.domHandler)},e}();function Pv(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var Fv={pointerdown:Q_,pointermove:$_,pointerup:ev,pointercancel:tv,pointerout:tv},Iv={2:q_,3:J_,4:Y_,5:X_},Lv=`pointerdown`,Rv=`pointermove pointerup pointercancel`;M_.MSPointerEvent&&!M_.PointerEvent&&(Lv=`MSPointerDown`,Rv=`MSPointerMove MSPointerUp MSPointerCancel`);var zv=function(e){S_(t,e);function t(){var n,r=t.prototype;return r.evEl=Lv,r.evWin=Rv,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=Fv[e.type.toLowerCase().replace(`ms`,``)],i=Iv[e.pointerType]||e.pointerType,a=i===q_,o=Pv(t,e.pointerId,`pointerId`);r&Q_&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(ev|tv)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(Nv);function Bv(e){return Array.prototype.slice.call(e,0)}function Vv(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];Pv(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var Hv={touchstart:Q_,touchmove:$_,touchend:ev,touchcancel:tv},Uv=`touchstart touchmove touchend touchcancel`,Wv=function(e){S_(t,e);function t(){var n;return t.prototype.evTarget=Uv,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=Hv[e.type],n=Gv.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:q_,srcEvent:e})},t}(Nv);function Gv(e,t){var n=Bv(e.touches),r=this.targetIds;if(t&(Q_|$_)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=Bv(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return _v(e.target,c)}),t===Q_)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(ev|tv)&&delete r[o[i].identifier],i++;if(s.length)return[Vv(a.concat(s),`identifier`,!0),s]}var Kv={mousedown:Q_,mousemove:$_,mouseup:ev},qv=`mousedown`,Jv=`mousemove mouseup`,Yv=function(e){S_(t,e);function t(){var n,r=t.prototype;return r.evEl=qv,r.evWin=Jv,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=Kv[e.type];t&Q_&&e.button===0&&(this.pressed=!0),t&$_&&e.which!==1&&(t=ev),this.pressed&&(t&ev&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Y_,srcEvent:e}))},t}(Nv),Xv=2500,Zv=25;function Qv(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},Xv)}}function $v(e,t){e&Q_?(this.primaryTouch=t.changedPointers[0].identifier,Qv.call(this,t)):e&(ev|tv)&&Qv.call(this,t)}function ey(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=Zv&&o<=Zv)return!0}return!1}var ty=function(){return function(e){S_(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===q_,a=n.pointerType===Y_;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)$v.call(C_(C_(r)),t,n);else if(a&&ey.call(C_(C_(r)),n))return;r.callback(e,t,n)}},r.touch=new Wv(r.manager,r.handler),r.mouse=new Yv(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Nv)}();function ny(e){var t;return t=e.options.inputClass||(G_?zv:K_?Wv:W_?ty:Yv),new t(e,kv)}function ry(e,t,n){return Array.isArray(e)?(fv(e,n[t],n),!0):!1}var iy=1,ay=2,oy=4,sy=8,cy=sy,ly=16,uy=32,dy=1;function fy(){return dy++}function W(e,t){var n=t.manager;return n?n.get(e):e}function G(e){return e&ly?`cancel`:e&sy?`end`:e&oy?`move`:e&ay?`start`:``}var py=function(){function e(e){e===void 0&&(e={}),this.options=x_({enable:!0},e),this.id=fy(),this.manager=null,this.state=iy,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return w_(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(ry(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=W(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return ry(e,`dropRecognizeWith`,this)?this:(e=W(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(ry(e,`requireFailure`,this))return this;var t=this.requireFail;return e=W(e,this),Pv(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(ry(e,`dropRequireFailure`,this))return this;e=W(e,this);var t=Pv(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<sy&&r(t.options.event+G(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=sy&&r(t.options.event+G(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=uy},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(uy|iy)))return!1;e++}return!0},t.recognize=function(e){var t=w_({},e);if(!pv(this.options.enable,[this,t])){this.reset(),this.state=uy;return}this.state&(cy|ly|uy)&&(this.state=iy),this.state=this.process(t),this.state&(ay|oy|sy|ly)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),my=function(e){S_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,x_({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[R_]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&Q_&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==ev)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<n.interval:!0,s=!this.pCenter||bv(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=cy,t.tryEmit()},n.interval),ay):cy}return uy},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=uy},this.options.interval),uy},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===cy&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(py),hy=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(ay|oy),i=this.attrTest(e);return r&&(n&tv||!i)?t|ly:r||i?n&ev?t|sy:t&ay?t|oy:ay:uy},t}(py);function gy(e){return e===ov?`down`:e===av?`up`:e===rv?`left`:e===iv?`right`:``}var _y=function(e){S_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,x_({event:`pan`,threshold:10,pointers:1,direction:lv},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&sv&&t.push(V_),e&cv&&t.push(B_),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&sv?(i=a===0?nv:a<0?rv:iv,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?nv:o<0?av:ov,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return hy.prototype.attrTest.call(this,e)&&(this.state&ay||!(this.state&ay)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=gy(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(hy),vy=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({event:`swipe`,threshold:10,velocity:.3,direction:sv|cv,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return _y.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(sv|cv)?r=t.overallVelocity:n&sv?r=t.overallVelocityX:n&cv&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&k_(r)>this.options.velocity&&t.eventType&ev},n.emit=function(e){var t=gy(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(hy),yy=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[z_]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ay)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(hy),by=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[z_]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ay)},t}(hy),xy=function(e){S_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,x_({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[L_]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(ev|tv)&&!a)this.reset();else if(e.eventType&Q_)this.reset(),this._timer=setTimeout(function(){t.state=cy,t.tryEmit()},n.time);else if(e.eventType&ev)return cy;return uy},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===cy&&(e&&e.eventType&ev?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=A_(),this.manager.emit(this.options.event,this._input)))},t}(py),Sy={domEvents:!1,touchAction:I_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},Cy=[[by,{enable:!1}],[yy,{enable:!1},[`rotate`]],[vy,{direction:sv}],[_y,{direction:sv},[`swipe`]],[my],[my,{event:`doubletap`,taps:2},[`tap`]],[xy]],wy=1,Ty=2;function Ey(e,t){var n=e.element;if(n.style){var r;fv(e.options.cssProps,function(i,a){r=j_(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function Dy(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var Oy=function(){function e(e,t){var n=this;this.options=w_({},Sy,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=ny(this),this.touchAction=new gv(this,this.options.touchAction),Ey(this,!0),fv(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return w_(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?Ty:wy},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&cy)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==Ty&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(ay|oy|sy)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof py)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(ry(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(ry(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Pv(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return fv(Av(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return fv(Av(e),function(e){t?n[e]&&n[e].splice(Pv(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&Dy(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&Ey(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),ky={touchstart:Q_,touchmove:$_,touchend:ev,touchcancel:tv},Ay=`touchstart`,jy=`touchstart touchmove touchend touchcancel`,My=function(e){S_(t,e);function t(){var n,r=t.prototype;return r.evTarget=Ay,r.evWin=jy,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=ky[e.type];if(t===Q_&&(this.started=!0),this.started){var n=Ny.call(this,e,t);t&(ev|tv)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:q_,srcEvent:e})}},t}(Nv);function Ny(e,t){var n=Bv(e.touches),r=Bv(e.changedTouches);return t&(ev|tv)&&(n=Vv(n.concat(r),`identifier`,!0)),[n,r]}function Py(e,t,n){var r=`DEPRECATED METHOD: `+t+`
4
4
  `+n+` AT
@@ -48,4 +48,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
48
48
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function tE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nE(e){var t=function(){if(typeof Reflect>`u`||!cv||cv.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(cv(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Hv(e);if(t){var i=Hv(this).constructor;n=cv(r,arguments,i)}else n=r.apply(this,arguments);return zv(this,n)}}var rE=function(e){Rv(r,e);var n=nE(r);function r(e,i){var a;return t(this,r),Zu(U(a=n.call(this)),`_queue`,null),e&&!rm(e)&&(i=e,e=[]),a._options=i||{},a._data=new Cw,a.length=0,a._idProp=a._options.fieldId||`id`,e&&e.length&&a.add(e),a.setOptions(i),a}return Xu(r,[{key:`idProp`,get:function(){return this._idProp}},{key:`setOptions`,value:function(e){e&&e.queue!==void 0&&(!1===e.queue?this._queue&&=(this._queue.destroy(),null):(this._queue||=GT.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}},{key:`add`,value:function(e,t){var n,r=this,i=[];if(rm(e)){var a=Kd(e).call(e,(function(e){return e[r._idProp]}));if(kw(a).call(a,(function(e){return r._data.has(e)})))throw Error(`A duplicate id was found in the parameter array.`);for(var o=0,s=e.length;o<s;o++)n=this._addItem(e[o]),i.push(n)}else{if(!e||typeof e!=`object`)throw Error(`Unknown dataType`);n=this._addItem(e),i.push(n)}return i.length&&this._trigger(`add`,{items:i},t),i}},{key:`update`,value:function(e,t){var n=this,r=[],i=[],a=[],o=[],s=this._idProp,c=function(e){var t=e[s];if(t!=null&&n._data.has(t)){var c=e,l=ch({},n._data.get(t)),u=n._updateItem(c);i.push(u),o.push(c),a.push(l)}else{var d=n._addItem(e);r.push(d)}};if(rm(e))for(var l=0,u=e.length;l<u;l++)e[l]&&typeof e[l]==`object`?c(e[l]):console.warn(`Ignoring input item, which is not an object at index `+l);else{if(!e||typeof e!=`object`)throw Error(`Unknown dataType`);c(e)}if(r.length&&this._trigger(`add`,{items:r},t),i.length){var d={items:i,oldData:a,data:o};this._trigger(`update`,d,t)}return Jp(r).call(r,i)}},{key:`updateOnly`,value:function(e,t){var n,r=this;rm(e)||(e=[e]);var i=Kd(n=Kd(e).call(e,(function(e){var t=r._data.get(e[r._idProp]);if(t==null)throw Error(`Updating non-existent items is not allowed.`);return{oldData:t,update:e}}))).call(n,(function(e){var t=e.oldData,n=e.update,i=t[r._idProp],a=function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return R_.apply(void 0,Jp(t=[{},e]).call(t,r))}(t,n);return r._data.set(i,a),{id:i,oldData:t,updatedData:a}}));if(i.length){var a={items:Kd(i).call(i,(function(e){return e.id})),oldData:Kd(i).call(i,(function(e){return e.oldData})),data:Kd(i).call(i,(function(e){return e.updatedData}))};return this._trigger(`update`,a,t),a.items}return[]}},{key:`get`,value:function(e,t){var n=void 0,r=void 0,i=void 0;WT(e)?(n=e,i=t):rm(e)?(r=e,i=t):i=e;var a=i&&i.returnType===`Object`?`Object`:`Array`,o=i&&Bd(i),s=[],c=void 0,l=void 0,u=void 0;if(n!=null)(c=this._data.get(n))&&o&&!o(c)&&(c=void 0);else if(r!=null)for(var d=0,f=r.length;d<f;d++)(c=this._data.get(r[d]))==null||o&&!o(c)||s.push(c);else for(var p,m=0,h=(l=Hp(Lw(p=this._data).call(p))).length;m<h;m++)u=l[m],(c=this._data.get(u))==null||o&&!o(c)||s.push(c);if(i&&i.order&&n==null&&this._sort(s,i.order),i&&i.fields){var g=i.fields;if(n!=null&&c!=null)c=this._filterFields(c,g);else for(var _=0,v=s.length;_<v;_++)s[_]=this._filterFields(s[_],g)}if(a==`Object`){for(var y={},b=0,x=s.length;b<x;b++){var S=s[b];y[S[this._idProp]]=S}return y}return n==null?s:c??null}},{key:`getIds`,value:function(e){var t=this._data,n=e&&Bd(e),r=e&&e.order,i=Hp(Lw(t).call(t)),a=[];if(n)if(r){for(var o=[],s=0,c=i.length;s<c;s++){var l=i[s],u=this._data.get(l);u!=null&&n(u)&&o.push(u)}this._sort(o,r);for(var d=0,f=o.length;d<f;d++)a.push(o[d][this._idProp])}else for(var p=0,m=i.length;p<m;p++){var h=i[p],g=this._data.get(h);g!=null&&n(g)&&a.push(g[this._idProp])}else if(r){for(var _=[],v=0,y=i.length;v<y;v++){var b=i[v];_.push(t.get(b))}this._sort(_,r);for(var x=0,S=_.length;x<S;x++)a.push(_[x][this._idProp])}else for(var ee=0,C=i.length;ee<C;ee++){var te=i[ee],w=t.get(te);w!=null&&a.push(w[this._idProp])}return a}},{key:`getDataSet`,value:function(){return this}},{key:`forEach`,value:function(e,t){var n=t&&Bd(t),r=this._data,i=Hp(Lw(r).call(r));if(t&&t.order)for(var a=this.get(t),o=0,s=a.length;o<s;o++){var c=a[o];e(c,c[this._idProp])}else for(var l=0,u=i.length;l<u;l++){var d=i[l],f=this._data.get(d);f==null||n&&!n(f)||e(f,d)}}},{key:`map`,value:function(e,t){for(var n=t&&Bd(t),r=[],i=this._data,a=Hp(Lw(i).call(i)),o=0,s=a.length;o<s;o++){var c=a[o],l=this._data.get(c);l==null||n&&!n(l)||r.push(e(l,c))}return t&&t.order&&this._sort(r,t.order),r}},{key:`_filterFields`,value:function(e,t){var n;return e&&Pd(n=rm(t)?t:om(t)).call(n,(function(t,n){return t[n]=e[n],t}),{})}},{key:`_sort`,value:function(e,t){if(typeof t==`string`){var n=t;bT(e).call(e,(function(e,t){var r=e[n],i=t[n];return r>i?1:r<i?-1:0}))}else{if(typeof t!=`function`)throw TypeError(`Order must be a function or a string`);bT(e).call(e,t)}}},{key:`remove`,value:function(e,t){for(var n=[],r=[],i=rm(e)?e:[e],a=0,o=i.length;a<o;a++){var s=this._remove(i[a]);if(s){var c=s[this._idProp];c!=null&&(n.push(c),r.push(s))}}return n.length&&this._trigger(`remove`,{items:n,oldData:r},t),n}},{key:`_remove`,value:function(e){var t;if(WT(e)?t=e:e&&typeof e==`object`&&(t=e[this._idProp]),t!=null&&this._data.has(t)){var n=this._data.get(t)||null;return this._data.delete(t),--this.length,n}return null}},{key:`clear`,value:function(e){for(var t,n=Hp(Lw(t=this._data).call(t)),r=[],i=0,a=n.length;i<a;i++)r.push(this._data.get(n[i]));return this._data.clear(),this.length=0,this._trigger(`remove`,{items:n,oldData:r},e),n}},{key:`max`,value:function(e){var t,n,r=null,i=null,a=eE(OT(t=this._data).call(t));try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o[e];typeof s==`number`&&(i==null||s>i)&&(r=o,i=s)}}catch(e){a.e(e)}finally{a.f()}return r||null}},{key:`min`,value:function(e){var t,n,r=null,i=null,a=eE(OT(t=this._data).call(t));try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o[e];typeof s==`number`&&(i==null||s<i)&&(r=o,i=s)}}catch(e){a.e(e)}finally{a.f()}return r||null}},{key:`distinct`,value:function(e){for(var t=this._data,n=Hp(Lw(t).call(t)),r=[],i=0,a=0,o=n.length;a<o;a++){for(var s=n[a],c=t.get(s)[e],l=!1,u=0;u<i;u++)if(r[u]==c){l=!0;break}l||c===void 0||(r[i]=c,i++)}return r}},{key:`_addItem`,value:function(e){var t=function(e,t){return e[t]??(e[t]=UT()),e}(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw Error(`Cannot add item: item with id `+n+` already exists`);return this._data.set(n,t),++this.length,n}},{key:`_updateItem`,value:function(e){var t=e[this._idProp];if(t==null)throw Error(`Cannot update item: item has no id (item: `+vh(e)+`)`);var n=this._data.get(t);if(!n)throw Error(`Cannot update item: no item with id `+t+` found`);return this._data.set(t,$T($T({},n),e)),t}},{key:`stream`,value:function(e){if(e){var t=this._data;return new ZT({[kT]:()=>vC.mark((function n(){var r,i,a,o;return vC.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=eE(e),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=11;break}if(a=i.value,(o=t.get(a))==null){n.next=9;break}return n.next=9,[a,o];case 9:n.next=3;break;case 11:n.next=16;break;case 13:n.prev=13,n.t0=n.catch(1),r.e(n.t0);case 16:return n.prev=16,r.f(),n.finish(16);case 19:case`end`:return n.stop()}}),n,null,[[1,13,16,19]])}))()})}var n;return new ZT({[kT]:vd(n=LT(this._data)).call(n,this._data)})}}]),r}(KT);function iE(e,t){var n=Up!==void 0&&$f(e)||e[`@@iterator`];if(!n){if(rm(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return aE(e,t);var r=Yp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Xf(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aE(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
49
49
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function aE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oE(e){var t=function(){if(typeof Reflect>`u`||!cv||cv.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(cv(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Hv(e);if(t){var i=Hv(this).constructor;n=cv(r,arguments,i)}else n=r.apply(this,arguments);return zv(this,n)}}var sE=function(e){Rv(r,e);var n=oE(r);function r(e,i){var a,o;return t(this,r),Zu(U(o=n.call(this)),`length`,0),Zu(U(o),`_ids`,new qT),o._options=i||{},o._listener=vd(a=o._onEvent).call(a,U(o)),o.setData(e),o}return Xu(r,[{key:`idProp`,get:function(){return this.getDataSet().idProp}},{key:`setData`,value:function(e){if(this._data){this._data.off&&this._data.off(`*`,this._listener);var t=this._data.getIds({filter:Bd(this._options)}),n=this._data.get(t);this._ids.clear(),this.length=0,this._trigger(`remove`,{items:t,oldData:n})}if(e!=null){this._data=e;for(var r=this._data.getIds({filter:Bd(this._options)}),i=0,a=r.length;i<a;i++){var o=r[i];this._ids.add(o)}this.length=r.length,this._trigger(`add`,{items:r})}else this._data=new rE;this._data.on&&this._data.on(`*`,this._listener)}},{key:`refresh`,value:function(){for(var e=this._data.getIds({filter:Bd(this._options)}),t=Hp(this._ids),n={},r=[],i=[],a=[],o=0,s=e.length;o<s;o++){var c=e[o];n[c]=!0,this._ids.has(c)||(r.push(c),this._ids.add(c))}for(var l=0,u=t.length;l<u;l++){var d=t[l],f=this._data.get(d);f==null?console.error(`If you see this, report it please.`):n[d]||(i.push(d),a.push(f),this._ids.delete(d))}this.length+=r.length-i.length,r.length&&this._trigger(`add`,{items:r}),i.length&&this._trigger(`remove`,{items:i,oldData:a})}},{key:`get`,value:function(e,t){if(this._data==null)return null;var n,r=null;WT(e)||rm(e)?(r=e,n=t):n=e;var i=ch({},this._options,n),a=Bd(this._options),o=n&&Bd(n);return a&&o&&(i.filter=function(e){return a(e)&&o(e)}),r==null?this._data.get(i):this._data.get(r,i)}},{key:`getIds`,value:function(e){if(this._data.length){var t,n=Bd(this._options),r=e==null?null:Bd(e);return t=r?n?function(e){return n(e)&&r(e)}:r:n,this._data.getIds({filter:t,order:e&&e.order})}return[]}},{key:`forEach`,value:function(e,t){if(this._data){var n,r,i=Bd(this._options),a=t&&Bd(t);r=a?i?function(e){return i(e)&&a(e)}:a:i,_m(n=this._data).call(n,e,{filter:r,order:t&&t.order})}}},{key:`map`,value:function(e,t){if(this._data){var n,r,i=Bd(this._options),a=t&&Bd(t);return r=a?i?function(e){return i(e)&&a(e)}:a:i,Kd(n=this._data).call(n,e,{filter:r,order:t&&t.order})}return[]}},{key:`getDataSet`,value:function(){return this._data.getDataSet()}},{key:`stream`,value:function(e){var t;return this._data.stream(e||{[kT]:vd(t=Lw(this._ids)).call(t,this._ids)})}},{key:`dispose`,value:function(){var e;(e=this._data)!=null&&e.off&&this._data.off(`*`,this._listener);var t,n=`This data view has already been disposed of.`,i={get:function(){throw Error(n)},set:function(){throw Error(n)},configurable:!1},a=iE(nm(r.prototype));try{for(a.s();!(t=a.n()).done;){var o=t.value;jv(this,o,i)}}catch(e){a.e(e)}finally{a.f()}}},{key:`_onEvent`,value:function(e,t,n){if(t&&t.items&&this._data){var r=t.items,i=[],a=[],o=[],s=[],c=[],l=[];switch(e){case`add`:for(var u=0,d=r.length;u<d;u++){var f=r[u];this.get(f)&&(this._ids.add(f),i.push(f))}break;case`update`:for(var p=0,m=r.length;p<m;p++){var h=r[p];this.get(h)?this._ids.has(h)?(a.push(h),c.push(t.data[p]),s.push(t.oldData[p])):(this._ids.add(h),i.push(h)):this._ids.has(h)&&(this._ids.delete(h),o.push(h),l.push(t.oldData[p]))}break;case`remove`:for(var g=0,_=r.length;g<_;g++){var v=r[g];this._ids.has(v)&&(this._ids.delete(v),o.push(v),l.push(t.oldData[g]))}}this.length+=i.length-o.length,i.length&&this._trigger(`add`,{items:i},n),a.length&&this._trigger(`update`,{items:a,oldData:s,data:c},n),o.length&&this._trigger(`remove`,{items:o,oldData:l},n)}}}]),r}(KT);function cE(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof _m(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Kd(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}e.DELETE=L_,e.DataSet=rE,e.DataStream=ZT,e.DataView=sE,e.Queue=GT,e.createNewDataPipeFrom=function(e){return new uf(e)},e.isDataSetLike=cE,e.isDataViewLike=function(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof _m(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Kd(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&cE(e,t.getDataSet())}}))}))(),T=ne(),E=r(),D=e(n(),1);function O(e){let t=new URLSearchParams(e),n=t.get(`nodeId`);if(n)return{kind:`focus`,nodeId:n,nodeLabel:t.get(`label`)};let r=t.get(`label`);return r?{kind:`labels`,labels:[r]}:null}function ie(e,t){return e.length<10?[...e,t]:[e[0],...e.slice(e.length-8),t]}function ae(e){return e.length<=1?e:e.slice(0,-1)}function k(e){return[e]}function oe(e){let t=e[e.length-1];return t.kind===`filter`?`f:${[...t.selectedLabels].sort().join(`,`)}:${t.includeTrashed?1:0}:${t.includeAgentActions?1:0}`:`n:${t.rootElementId}`}function se(e){let t=e[0];if(t.kind!==`filter`)throw Error(`view-stack invariant: root must be filter view`);return t}var ce=`admin-sessions`;function le(){if(typeof window>`u`)return null;if(typeof BroadcastChannel>`u`)return console.warn(`[admin-sessions/broadcast] unsupported — manual refresh only`),null;try{return new BroadcastChannel(ce)}catch(e){return console.warn(`[admin-sessions/broadcast] ctor failed: ${e instanceof Error?e.message:String(e)} — manual refresh only`),null}}function ue(e){let t=le();if(t)try{let n={type:`mutated`,reason:e};t.postMessage(n)}catch(e){console.warn(`[admin-sessions/broadcast] postMessage failed: ${e instanceof Error?e.message:String(e)}`)}finally{try{t.close()}catch{}}}function de(e){return e.trashed===!0?`skip-trashed`:`pivot`}function fe(e,t,n,r){let i=[],a=[];for(let o of e){let e=t.get(o.nodeId);if(!e)continue;a.push(o.nodeId);let{colour:s}=n(e.labels),c=e.trashed?`${s}40`:s;i.push({id:o.nodeId,borderWidth:3,color:{background:c,border:r}})}return{updates:i,inWindow:a}}function pe(e,t){let n=t.length>0?new Set(t):null,r=new Map,i=new Set,a=[];for(let t of e)n&&!t.labels.some(e=>n.has(e))||r.set(t.nodeId,{id:t.nodeId,labels:t.labels,properties:t.properties});for(let t of e)if(r.has(t.nodeId))for(let e of t.related){if(n&&!e.labels.some(e=>n.has(e)))continue;r.has(e.nodeId)||r.set(e.nodeId,{id:e.nodeId,labels:e.labels,properties:e.properties});let[o,s]=e.direction===`outgoing`?[t.nodeId,e.nodeId]:[e.nodeId,t.nodeId],c=`${o}|${s}|${e.relationship}`;i.has(c)||(i.add(c),a.push({id:c,from:o,to:s,type:e.relationship}))}return{nodes:[...r.values()],edges:a}}var me=2e3;function he(e){let t=typeof e==`number`?e:Number(e);return!Number.isFinite(t)||t<=0?100:Math.min(Math.max(Math.floor(t),1),me)}function ge(e,t,n,r){let i=encodeURIComponent(t.join(`,`));return`/api/admin/graph-search?q=${encodeURIComponent(e)}&labels=${i}&limit=${n}${r?`&threshold=0`:``}`}var _e=y(),ve=new Set([`Conversation`,`AdminConversation`,`PublicConversation`]),ye=/^(\d{4}-\d{2}-\d{2})T/,be=24;function xe(e){let t=e.match(ye);return t?t[1]:null}function Se(e,t){if(e.length===0)return``;let n=e.split(/\s+/).filter(e=>e.length>0);if(n.length===0)return``;if(n.length===1){let e=n[0];return e.length<=be?e:e.slice(0,be-1)+`…`}let r=[],i=0;for(;r.length<t&&i<n.length;){let e=``;for(;i<n.length;){let t=e.length===0?n[i]:`${e} ${n[i]}`;if(t.length<=be)e=t,i++;else break}e.length===0&&(e=n[i].slice(0,be-1)+`…`,i++),r.push(e)}if(i<n.length&&r.length>0){let e=n.slice(i).join(` `),t=r.length-1;r[t]=(r[t].length===0?e:`${r[t]} ${e}`).slice(0,be-1)+`…`}return r.join(`
50
50
  `)}function Ce(e){return Se(e,2)}function we(e,t){let n=e.labels[0];if(!n||!ve.has(n)||t<.7)return(0,_e.pickShortLabel)(e);let r=Ce((0,_e.pickDisplayName)(e));if(t<1.3)return r;let i=e.properties,a=typeof i.createdAt==`string`?i.createdAt:``,o=typeof i.messageCount==`number`?i.messageCount:null;if(a.length===0||o===null)return r;let s=xe(a);return s===null?r:`${r}\n${s} · ${o} msgs`}var A=new Set([`Person`,`Organization`,`Concept`]),j=80;function M(e,t){let n=(0,_e.pickDisplayName)(e);if(t<1.3)return Se(n,3);let r=n.length<=24?n:n.slice(0,23)+`…`,i=e.properties.compiledTruth;if(typeof i!=`string`||i.length===0)return Se((0,_e.pickDisplayName)(e),3);let a=Se(i.length>j?i.slice(0,j-1)+`…`:i,2);return a.length===0?r:`${r}\n${a}`}function Te(e,t){if(t<.7)return(0,_e.pickShortLabel)(e);let n=e.labels[0];return n&&ve.has(n)?we(e,t):n&&A.has(n)?M(e,t):Se((0,_e.pickDisplayName)(e),3)}function Ee(e){let t=e.properties,n=typeof t.createdAt==`string`?t.createdAt:``,r=typeof t.updatedAt==`string`?t.updatedAt:``,i=e.labels.join(` · `);return[(0,_e.pickDisplayName)(e),i,`id: ${e.id}`,n?`createdAt: ${n}`:``,r?`updatedAt: ${r}`:``].filter(e=>e.length>0).join(`
51
- `)}var De={solver:`barnesHut`,barnesHut:{gravitationalConstant:-2e3,centralGravity:.4,springLength:170,springConstant:.04},stabilization:{iterations:200}},N=220,P=3;function Oe(e){if(!(e.nodes.length<=5))return{physics:De,nodePositions:new Map};let t=new Map,n=(P-1)*N/2,r=(Math.ceil(e.nodes.length/P)-1)*N/2;for(let i=0;i<e.nodes.length;i++){let a=i%P,o=Math.floor(i/P);t.set(e.nodes[i].id,{x:a*N-n,y:o*N-r})}return{physics:!1,nodePositions:t}}var F=o();function ke(e){return e<.7?`compact`:e<1.3?`wrapped`:`detailed`}var Ae=150,je=`#FBBF24`;function Me(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var Ne=`maxy-graph-search-limit-v1`,Pe=250,Fe=1200;function Ie(){let[e,t]=(0,D.useState)(null),[n,r]=(0,D.useState)(!1),[i,a]=(0,D.useState)(void 0),[o,s]=(0,D.useState)(null),[c,u]=(0,D.useState)(void 0),[f,g]=(0,D.useState)(null),[_,v]=(0,D.useState)(null),y=(0,D.useMemo)(()=>typeof window>`u`?null:O(window.location.search),[]),b=(0,D.useMemo)(()=>y?.kind===`focus`?{nodeId:y.nodeId,nodeLabel:y.nodeLabel}:null,[y]),x=(0,D.useMemo)(()=>y?.kind===`labels`?y.labels:null,[y]);(0,D.useEffect)(()=>{b&&He(`deep-link`,{nodeId:b.nodeId.length>16?b.nodeId.slice(0,16)+`…`:b.nodeId,label:b.nodeLabel??``})},[b]),(0,D.useEffect)(()=>{!x||x.length===0||He(`label-seed`,{label:x[0]})},[x]),(0,D.useEffect)(()=>{let e=!1,n=null;try{n=sessionStorage.getItem(`maxy-admin-session-key`)}catch{}if(!n){t(null),r(!0);return}return fetch(`/api/admin/session?session_key=${encodeURIComponent(n)}`).then(async i=>{if(!e){if(i.status===401){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`;return}if(i.ok)try{let e=await i.json();typeof e.businessName==`string`&&a(e.businessName),e.sessionId!==void 0&&s(e.sessionId??null),v(e.role??null),u(e.userName===void 0?null:e.userName),g(e.avatar??null)}catch{}t(n),r(!0)}}).catch(()=>{e||(t(n),r(!0))}),()=>{e=!0}},[]);let S=(0,D.useCallback)(()=>{try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},[]),[ee,C]=(0,D.useState)(!1),te=(0,D.useCallback)(async()=>{C(!0);try{let e=await m();if(e){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`}return e}finally{C(!1)}},[]);return n?e?(0,F.jsx)(l,{cacheKey:e,surface:`graph`,onSessionExpired:({code:e,path:t})=>{console.warn(`[admin-auth] outcome=session-expired-redirect code=${e} path=${t} surface=graph`);try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},children:(0,F.jsx)(h,{cacheKey:e,businessName:i,sessionId:o,onLogout:S,onDisconnect:te,disconnecting:ee,userName:c,userAvatar:f,role:_,children:(0,F.jsxs)(`div`,{className:`data-page graph-page`,children:[(0,F.jsx)(`header`,{className:`data-header`,children:(0,F.jsxs)(`h1`,{className:`data-title`,children:[(0,F.jsx)(p,{size:18}),` Graph`]})}),(0,F.jsx)(`main`,{className:`graph-main`,children:(0,F.jsx)(Le,{cacheKey:e,initialFocus:b,initialLabels:x})})]})})}):(0,F.jsxs)(`div`,{className:`data-page`,children:[(0,F.jsx)(`header`,{className:`data-header`,children:(0,F.jsxs)(`h1`,{className:`data-title`,children:[(0,F.jsx)(p,{size:18}),` Graph`]})}),(0,F.jsxs)(`div`,{className:`data-empty`,children:[(0,F.jsx)(`p`,{children:`You are not signed in.`}),(0,F.jsxs)(`p`,{children:[`Open the `,(0,F.jsx)(`a`,{href:`/`,className:`data-link`,children:`main admin page`}),` and log in, then return here.`]})]})]}):(0,F.jsx)(`div`,{className:`data-page`,children:(0,F.jsxs)(`div`,{className:`data-loading`,children:[(0,F.jsx)(d,{size:18,className:`spin`}),` Loading…`]})})}function Le({cacheKey:e,initialFocus:t=null,initialLabels:n=null}){let{adminFetch:r,cacheKey:a,sessionRefetchNonce:o}=c({initialCacheKey:e,surface:`graph`}),l=(0,D.useRef)(null),p=(0,D.useRef)(null),m=(0,D.useRef)(null),h=(0,D.useRef)(null),y=(0,D.useRef)(new Map),C=(0,D.useRef)([]),w=(0,D.useRef)(null),ne=(0,D.useRef)(null),E=(0,D.useRef)(null),O=(0,D.useRef)([]),ce=(0,D.useRef)(null),le=(0,D.useRef)(null),me=(0,D.useRef)(null),_e=(0,D.useRef)(null),[ve,ye]=(0,D.useState)([{kind:`filter`,selectedLabels:[],includeTrashed:!1,includeAgentActions:!1}]);(0,D.useEffect)(()=>{t?.nodeId&&ye(e=>{let n=e[e.length-1];return n.kind===`neighbourhood`&&n.rootElementId===t.nodeId?e:[e[0],{kind:`neighbourhood`,rootElementId:t.nodeId,rootLabel:t.nodeLabel}]})},[t?.nodeId,t?.nodeLabel]);let be=n&&n.length>0?[...n].sort().join(`,`):null;(0,D.useEffect)(()=>{be&&(Dt.current=!0,ye([{kind:`filter`,selectedLabels:be.split(`,`),includeTrashed:!1,includeAgentActions:!1}]))},[be]);let[xe,Se]=(0,D.useState)(!1),[Ce,we]=(0,D.useState)(null),[A,j]=(0,D.useState)(null),[M,De]=(0,D.useState)(0),[N,P]=(0,D.useState)(null),[Ie,Le]=(0,D.useState)(!1),[Ue,We]=(0,D.useState)(!1),[Ge,Ke]=(0,D.useState)(null),[qe,Je]=(0,D.useState)(``),[Ye,Xe]=(0,D.useState)(``),[Ze,Qe]=(0,D.useState)(null),[$e,et]=(0,D.useState)(null),[tt,nt]=(0,D.useState)(()=>{if(typeof window>`u`)return 100;let e=window.localStorage.getItem(Ne);return e?he(e):100}),[rt,it]=(0,D.useState)(tt),[at,ot]=(0,D.useState)(`hybrid`),[st,ct]=(0,D.useState)(0),[lt,ut]=(0,D.useState)(!1),[dt,ft]=(0,D.useState)(0),[pt,mt]=(0,D.useState)(0),[ht,gt]=(0,D.useState)([]),[_t,vt]=(0,D.useState)({labels:[],includeTrashed:!1}),[yt,bt]=(0,D.useState)(!1),[xt,St]=(0,D.useState)([]),[Ct,wt]=(0,D.useState)([]),[Tt,Et]=(0,D.useState)(!1),Dt=(0,D.useRef)(!1),Ot=(0,D.useRef)(null),kt=(0,D.useMemo)(()=>{let e=new Set;for(let t of y.current.values()){let n=(0,v.pickDisplayLabel)(t.labels);n&&e.add(n)}return[...e].sort()},[M]);(0,D.useEffect)(()=>{let e=!1,t=r(`/api/admin/graph-labels-in-graph`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-labels-in-graph`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}return{labels:[]}}),n=r(`/api/admin/graph-default-view`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-default-view`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}return{labels:[],includeTrashed:!1}});return Promise.all([t,n]).then(([t,n])=>{if(!e&&(gt(t.labels),vt(n),!Dt.current)){Dt.current=!0;let e=new Set(t.labels.map(e=>e.label)),r=n.labels.filter(t=>e.has(t));(r.length>0||n.includeTrashed)&&ye(e=>[{kind:`filter`,selectedLabels:r,includeTrashed:n.includeTrashed,includeAgentActions:!1},...e.slice(1)])}}),()=>{e=!0}},[a,o,r]);let At=ve[0].kind===`filter`?ve[0].includeAgentActions:!1;(0,D.useEffect)(()=>{if(!Dt.current)return;let e=!1;return r(`/api/admin/graph-labels-in-graph?includeAgentActions=${At?`1`:`0`}`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).then(t=>{e||gt(t.labels)}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-labels-in-graph-refetch`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}),()=>{e=!0}},[a,o,At,pt,r]),(0,D.useEffect)(()=>{if(!yt)return;let e=e=>{Ot.current&&(Ot.current.contains(e.target)||bt(!1))},t=e=>{e.key===`Escape`&&bt(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[yt]);let jt=(0,D.useCallback)(()=>{if(m.current)try{m.current.clear()}catch{}if(h.current)try{h.current.clear()}catch{}},[]),Mt=(0,D.useCallback)((e,t)=>{Ke(null),r(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e,by:`graph-drag-trash`})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);P(null);try{p.current?.unselectAll()}catch{}ye(e=>[se(e)]),ft(e=>e+1),ue(`graph-trash`)}).catch(n=>{let r=n instanceof Error?n.message:String(n);Ke(`Failed to delete: ${r}`),We(!0),window.setTimeout(()=>We(!1),Fe);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-drag-delete`,elementId:e,label:t,msg:r}),keepalive:!0}).catch(()=>{})}catch{}})},[r]),Nt=(0,D.useCallback)(e=>{Ke(null);let t=e.length;Promise.allSettled(e.map(e=>r(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e,by:`graph-drag-trash`})}).then(async t=>{let n=await t.json().catch(()=>({error:`HTTP ${t.status}`}));if(!t.ok)throw Error(n.error??`HTTP ${t.status}`);return e}))).then(e=>{let n=e.filter(e=>e.status===`rejected`);P(null);try{p.current?.unselectAll()}catch{}if(ye(e=>[se(e)]),ft(e=>e+1),ue(`graph-trash`),n.length>0){let e=t-n.length;Ke(e===0?`Failed to delete ${t} node${t===1?``:`s`}.`:`Deleted ${e} of ${t}; ${n.length} failed.`),We(!0),window.setTimeout(()=>We(!1),Fe);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-drag-delete-batch`,total:t,failed:n.length}),keepalive:!0}).catch(()=>{})}catch{}}})},[r]),Pt=ve[ve.length-1],Ft=(0,D.useMemo)(()=>oe(ve),[ve]),It=(0,D.useRef)(Ft);(0,D.useEffect)(()=>{It.current=Ft},[Ft]);let Lt=(0,D.useRef)(ve);(0,D.useEffect)(()=>{Lt.current=ve},[ve]),(0,D.useEffect)(()=>{if(Pt.kind===`filter`&&Pt.selectedLabels.length===0){w.current?.abort(),w.current=null,Se(!1),we(null),j(null),De(0),y.current=new Map,jt();return}if(Ye){w.current?.abort(),w.current=null;return}let e=window.setTimeout(()=>{w.current?.abort();let e=new AbortController;w.current=e,Se(!0),we(null),j(null),r(ze(Pt,{includeAgentActions:se(ve).includeAgentActions,search:null,channel:xt,messageSublabel:Ct}),{signal:e.signal}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(e.status===413)throw new Be(t);if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(t=>{e.signal.aborted||(y.current=new Map(t.nodes.map(e=>[e.id,e])),De(t.nodes.length),Rt(t.nodes,t.edges))}).catch(t=>{if(!e.signal.aborted){if(t instanceof Be){j(t.body),De(0),y.current=new Map,jt();return}we(t instanceof Error?t.message:String(t))}}).finally(()=>{e.signal.aborted||Se(!1)})},Pe);return()=>{window.clearTimeout(e)}},[a,Ft,dt,o,Ye,rt,xt,Ct]),(0,D.useEffect)(()=>()=>{w.current?.abort(),p.current?.destroy(),p.current=null,_e.current!==null&&(clearTimeout(_e.current),_e.current=null)},[]);let Rt=(0,D.useCallback)((e,t)=>{if(!l.current)return;C.current=t;let n=new Set([`Message`,`UserMessage`,`AssistantMessage`]),r=e=>e.labels.some(e=>n.has(e)),i=new Map,a=e.filter(r);if(a.length>0){let e=new Set(a.map(e=>e.id)),n=new Map,r=new Set;for(let i of t)i.type===`NEXT`&&e.has(i.from)&&e.has(i.to)&&(n.set(i.from,i.to),r.add(i.to));let o=[],s=new Set;for(let e of a){if(r.has(e.id))continue;let t=e.id;for(;t&&!s.has(t);)s.add(t),o.push(t),t=n.get(t)}for(let e of a)s.has(e.id)||(o.push(e.id),s.add(e.id));let c=l.current?.clientWidth??1200,u=Math.max(c-160,300),d=Math.max(Math.floor(u/150),2);o.forEach((e,t)=>{let n=t%d,r=Math.floor(t/d);i.set(e,{x:n*150,y:r*90})})}let o=e.map(e=>{let t=e.labels[0]??`Unknown`,n=(0,v.resolveNodeColour)(e.labels);n.displayLabel;let r=n.colour;n.driftCandidates;let a=i.get(e.id),o=a?{x:a.x,y:a.y,physics:!1}:{};return e.trashed?{id:e.id,label:Te(e,1),title:Ee(e),color:{background:`${r}40`,border:r},borderWidth:2,shapeProperties:{borderDashes:[6,4]},group:t,...o}:{id:e.id,label:Te(e,1),title:Ee(e),color:r,group:t,...o}}),s=new Set(o.map(e=>e.id)),c=t.filter(e=>e.type!==`PART_OF`||s.has(e.from)&&s.has(e.to)).map(e=>({id:e.id,from:e.from,to:e.to,label:e.type})),u=Oe({nodes:e,edges:t});m.current=new re.DataSet(u.nodePositions.size>0?o.map(e=>{if(e.x!==void 0||e.y!==void 0)return e;let t=u.nodePositions.get(e.id);return t?{...e,x:t.x,y:t.y,physics:!1}:e}):o),h.current=new re.DataSet(c);let d={autoResize:!0,layout:{improvedLayout:!1,randomSeed:Me(It.current)},physics:u.physics===!1?!1:{solver:u.physics.solver,barnesHut:u.physics.barnesHut,stabilization:u.physics.stabilization},nodes:{shape:`dot`,size:18,font:{color:`#1F2937`,size:12,face:`DM Sans, sans-serif`},scaling:{label:{enabled:!0,min:12,max:30,drawThreshold:0}},borderWidth:0,chosen:{node:e=>{e.size=20,e.borderWidth=3,e.borderColor=`#0F172A`,e.shadow=!0,e.shadowColor=`rgba(15, 23, 42, 0.55)`,e.shadowSize=8,e.shadowX=0,e.shadowY=0},label:e=>{e.size=14}}},edges:{arrows:{to:{enabled:!0,scaleFactor:.4}},color:{color:`#CBD5E1`,highlight:`#475569`},font:{color:`#64748B`,size:9,face:`DM Sans, sans-serif`,align:`middle`,strokeWidth:0},smooth:{enabled:!0,type:`continuous`,roundness:.4},width:1,chosen:{edge:!0,label:!1}},interaction:{hover:!0,tooltipDelay:150,multiselect:!0}};try{p.current?.destroy(),_e.current!==null&&(clearTimeout(_e.current),_e.current=null),me.current=null;let e=new T.Network(l.current,{nodes:m.current,edges:h.current},d);p.current=e,e.on(`zoom`,()=>{_e.current!==null&&clearTimeout(_e.current),_e.current=setTimeout(()=>{_e.current=null;let e=p.current,t=m.current;if(!e||!t)return;let n;try{n=e.getScale()}catch{return}let r=ke(n);if(r===me.current)return;me.current=r;let i=[];for(let e of y.current.values()){if(!e.labels[0])continue;let{colour:t}=(0,v.resolveNodeColour)(e.labels),r=e.trashed?{background:`${t}40`,border:t}:t;i.push({id:e.id,label:Te(e,n),color:r})}i.length>0&&t.update(i),console.error(`[graph-page] zoom-tier scale=${n.toFixed(3)} tier=${r} nodes=${i.length}`)},Ae)}),e.on(`click`,e=>{let t=e.nodes[0];if(!t)return;let n=y.current.get(t);if(!n)return;if(de(n)===`skip-trashed`){P(n);return}let r=Lt.current[Lt.current.length-1];if(r.kind===`neighbourhood`&&r.rootElementId===t){P(e=>e?.id===t?null:n);return}P(null);let i={kind:`neighbourhood`,rootElementId:t,rootLabel:n.labels[0]??null};ye(e=>{let n=ie(e,i),r=n.length-1;return n.length>e.length&&He(`nav-push`,{depth:r,kind:i.kind,rootElementId:t}),n.length===10&&e.length===10&&He(`view-stack-cap-hit`,{depth:10,rootElementId:t}),n})}),e.on(`deselectNode`,()=>{P(null)});let t=e=>{let t=l.current,n=ne.current;if(!t||!n)return!1;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=r.left+e.x,o=r.top+e.y;return a>=i.left&&a<=i.right&&o>=i.top&&o<=i.bottom},n=l.current?.parentElement??null;e.on(`dragStart`,e=>{if(e.nodes.length===0){E.current=null,O.current=[];return}O.current=[...e.nodes],E.current=e.nodes[0],n?.classList.add(`graph-dragging`)}),e.on(`dragging`,e=>{if(O.current.length===0)return;let n=t(e.pointer.DOM);Le(e=>e===n?e:n)}),e.on(`dragEnd`,e=>{let r=O.current;if(O.current=[],E.current=null,Le(!1),n?.classList.remove(`graph-dragging`),r.length!==0&&t(e.pointer.DOM))if(r.length===1){let e=y.current.get(r[0])?.labels[0]??`Unknown`;Mt(r[0],e)}else Nt(r)})}catch(e){let t=e instanceof Error?e.message:String(e);we(`Visualisation failed to load: ${t}`);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-render`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}},[]);(0,D.useEffect)(()=>{let e=l.current;if(!e)return;let t=t=>{let n=le.current,r=ce.current,i=e.parentElement;if(!n||!r||!i)return;let a=i.getBoundingClientRect(),o=Math.min(n.clientX,t.clientX)-a.left,s=Math.min(n.clientY,t.clientY)-a.top,c=Math.max(n.clientX,t.clientX)-a.left,l=Math.max(n.clientY,t.clientY)-a.top;r.style.left=`${o}px`,r.style.top=`${s}px`,r.style.width=`${c-o}px`,r.style.height=`${l-s}px`},n=r=>{document.removeEventListener(`mousemove`,t,!0),document.removeEventListener(`mouseup`,n,!0);let i=le.current;le.current=null;let a=ce.current;a&&(a.style.display=`none`);let o=p.current;if(!i||!o)return;let s=e.getBoundingClientRect(),c=i.clientX-s.left,l=i.clientY-s.top,u=r.clientX-s.left,d=r.clientY-s.top,f=Math.min(c,u),m=Math.min(l,d),h=Math.max(c,u),g=Math.max(l,d);if(h-f<3&&g-m<3)return;let _=o.getPositions(),v=[];for(let[e,t]of Object.entries(_)){let n=o.canvasToDOM(t);n.x>=f&&n.x<=h&&n.y>=m&&n.y<=g&&v.push(e)}try{o.selectNodes(v,!1)}catch{}},r=r=>{if(!r.shiftKey||r.button!==0)return;let i=p.current,a=e.parentElement;if(!i||!a)return;let o=e.getBoundingClientRect(),s={x:r.clientX-o.left,y:r.clientY-o.top};if(i.getNodeAt(s))return;r.preventDefault(),r.stopImmediatePropagation(),le.current={clientX:r.clientX,clientY:r.clientY};let c=ce.current,l=a.getBoundingClientRect();c&&(c.style.display=`block`,c.style.left=`${r.clientX-l.left}px`,c.style.top=`${r.clientY-l.top}px`,c.style.width=`0px`,c.style.height=`0px`),document.addEventListener(`mousemove`,t,!0),document.addEventListener(`mouseup`,n,!0)};return e.addEventListener(`mousedown`,r,!0),()=>{e.removeEventListener(`mousedown`,r,!0),document.removeEventListener(`mousemove`,t,!0),document.removeEventListener(`mouseup`,n,!0)}},[]),(0,D.useEffect)(()=>{let e=qe.trim();if(!e){Xe(``),Qe(null),et(null),ot(`hybrid`),ct(0),ut(!1),p.current?.unselectAll();return}ut(!1);let t=setTimeout(()=>Xe(e),300);return()=>clearTimeout(t)},[qe]),(0,D.useEffect)(()=>{let e=setTimeout(()=>{let e=he(tt);it(e);try{window.localStorage.setItem(Ne,String(e))}catch{}},200);return()=>clearTimeout(e)},[tt]);let zt=(0,D.useCallback)(e=>{let t=p.current,n=m.current;if(!t||!n)return;let{updates:r,inWindow:i}=fe(e,y.current,v.resolveNodeColour,je);r.length>0&&(n.update(r),t.fit({nodes:i,animation:{duration:400,easingFunction:`easeInOutQuad`}}))},[]),Bt=se(ve);(0,D.useEffect)(()=>{if(!Ye)return;let e=!1;return et(null),r(ge(Ye,Bt.selectedLabels,rt,lt)).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(t=>{if(e)return;Qe(t.results);let n=t.mode===`bm25`?`bm25`:`hybrid`;if(ot(n),ct(typeof t.suppressed==`number`?t.suppressed:0),n===`bm25`)try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-page`,msg:`[graph-page] search-result-degraded mode=bm25 query="${Ye}"`}),keepalive:!0}).catch(()=>{})}catch{}let{nodes:r,edges:i}=pe(t.results,Bt.selectedLabels);y.current=new Map(r.map(e=>[e.id,e])),De(r.length),j(null),Rt(r,i),zt(t.results),console.info(`[graph-page] search-applied view=${Pt.kind} q="${Ye}" labels=${Bt.selectedLabels.join(`|`)} hits=${r.length}`)}).catch(t=>{e||et(t instanceof Error?t.message:String(t))}),()=>{e=!0}},[Ye,rt,a,o,r,zt,Pt.kind,Bt.selectedLabels,Rt,lt]);let Vt=(0,D.useCallback)(e=>{ye(t=>{let n=se(t),r=new Set(n.selectedLabels);return r.has(e)?r.delete(e):r.add(e),k({kind:`filter`,selectedLabels:[...r].sort(),includeTrashed:n.includeTrashed,includeAgentActions:n.includeAgentActions})})},[]),Ht=(0,D.useCallback)(()=>{ye(e=>{let t=se(e);return k({...t,includeTrashed:!t.includeTrashed})})},[]),Ut=(0,D.useCallback)(()=>{ye(e=>{let t=se(e);return k({...t,includeAgentActions:!t.includeAgentActions})})},[]),Wt=(0,D.useCallback)(()=>{Je(``),Xe(``),Qe(null),et(null),ot(`hybrid`),ct(0),ut(!1);try{p.current?.unselectAll()}catch{}},[]),Gt=(0,D.useCallback)(()=>{ye(()=>k({kind:`filter`,selectedLabels:[],includeTrashed:!1,includeAgentActions:!1}))},[]),Kt=(0,D.useCallback)(()=>{P(null);try{p.current?.unselectAll()}catch{}ye(e=>{let t=ae(e);return t!==e&&He(`nav-pop`,{depth:t.length-1}),t})},[]),qt=(0,D.useCallback)(()=>{P(null);try{p.current?.unselectAll()}catch{}ye(e=>e.length<=1?e:(He(`nav-home`,{depth:0,popped:e.length-1}),[se(e)]))},[]),Jt=(0,D.useCallback)(()=>{let e=se(ve),t={labels:[...e.selectedLabels].sort(),includeTrashed:e.includeTrashed};Et(!0),r(`/api/admin/graph-default-view`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}).then(async e=>{if(!e.ok){let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));throw Error(t.error??`HTTP ${e.status}`)}vt(t)}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-default-view-save`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}).finally(()=>Et(!1))},[r,ve]),Yt=(0,D.useCallback)(()=>{P(null);try{p.current?.unselectAll()}catch{}ft(e=>e+1),ue(`graph-restore`)},[]),Xt=(0,D.useCallback)(()=>{P(null);try{p.current?.unselectAll()}catch{}ye(e=>[se(e)]),ft(e=>e+1),ue(`graph-trash`)},[]),Zt=(0,D.useCallback)(()=>{ft(e=>e+1),mt(e=>e+1)},[]),Qt=Pt.kind===`neighbourhood`,$t=se(ve),en=$t.selectedLabels,tn=$t.includeTrashed,nn=$t.includeAgentActions,rn=xt.join(`,`),an=Ct.join(`,`),on=en.includes(`AdminConversation`)||en.includes(`PublicConversation`);(0,D.useEffect)(()=>{on&&console.info(`[graph-filter] subfacet-render channel=[${rn}] sublabel=[${an}]`)},[rn,an,on]);let sn=(0,D.useMemo)(()=>{if(tn!==_t.includeTrashed||en.length!==_t.labels.length)return!0;for(let e=0;e<en.length;e++)if(en[e]!==_t.labels[e])return!0;return!1},[tn,en,_t]);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`graph-toolbar`,children:[ve.length>1&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`button`,{type:`button`,className:`graph-home-to-filter graph-home-desktop`,onClick:qt,title:`Clear breadcrumb — return to filter root`,children:[(0,F.jsx)(g,{size:12}),` Home`]}),(0,F.jsx)(`button`,{type:`button`,className:`graph-home-to-filter graph-home-mobile`,onClick:qt,"aria-label":`Home`,title:`Clear breadcrumb — return to filter root`,children:(0,F.jsx)(g,{size:14})}),(0,F.jsx)(`button`,{type:`button`,className:`graph-back-to-filter graph-back-desktop`,onClick:Kt,children:`← Back`}),(0,F.jsx)(`button`,{type:`button`,className:`graph-back-to-filter graph-back-mobile`,onClick:Kt,"aria-label":`Back`,children:(0,F.jsx)(x,{size:16})})]}),(0,F.jsxs)(`div`,{className:`data-search-input graph-search-input`,children:[(0,F.jsx)(_,{size:14}),(0,F.jsx)(`input`,{type:`text`,placeholder:`Search nodes…`,value:qe,onChange:e=>Je(e.target.value),autoComplete:`off`,spellCheck:!1}),Ye&&!Ze&&!$e&&(0,F.jsx)(d,{size:14,className:`spin`}),qe.length>0&&(0,F.jsx)(`button`,{type:`button`,className:`graph-search-clear`,onClick:Wt,"aria-label":`Clear search`,title:`Clear search`,children:(0,F.jsx)(s,{size:14})})]}),Ye&&(0,F.jsxs)(`div`,{className:`graph-search-limit`,title:`Show top ${tt} matches (1-2000)`,children:[(0,F.jsx)(`label`,{htmlFor:`graph-search-limit-input`,className:`graph-search-limit-label`,children:`Top`}),(0,F.jsx)(`button`,{type:`button`,className:`graph-search-limit-step`,onClick:()=>nt(he(tt-1)),disabled:tt<=1,"aria-label":`Decrement search limit`,title:`Decrement`,children:(0,F.jsx)(ee,{size:12})}),(0,F.jsx)(`input`,{id:`graph-search-limit-input`,type:`number`,min:1,max:2e3,step:1,value:tt,onChange:e=>nt(he(e.target.value)),className:`graph-search-limit-number`,"aria-label":`Maximum search results to render`}),(0,F.jsx)(`button`,{type:`button`,className:`graph-search-limit-step`,onClick:()=>nt(he(tt+1)),disabled:tt>=2e3,"aria-label":`Increment search limit`,title:`Increment`,children:(0,F.jsx)(f,{size:12})}),(0,F.jsx)(`input`,{id:`graph-search-limit-slider`,type:`range`,min:1,max:2e3,step:1,value:tt,onChange:e=>nt(he(e.target.value)),"aria-label":`Maximum search results to render (drag for ballpark)`})]}),(0,F.jsx)(`button`,{type:`button`,className:`graph-refresh-button`,onClick:Zt,disabled:xe,"aria-label":`Refresh graph`,title:`Refresh graph`,children:(0,F.jsx)(u,{size:14,className:xe?`spin`:void 0})}),!Qt&&(0,F.jsxs)(`div`,{className:`graph-filter-wrap`,ref:Ot,children:[(0,F.jsxs)(`button`,{type:`button`,className:`graph-filter-toggle${yt?` is-open`:``}${en.length>0||tn||nn?` has-selection`:``}`,onClick:()=>bt(e=>!e),"aria-haspopup":`true`,"aria-expanded":yt,"aria-label":`Filter node types`,children:[(0,F.jsx)(te,{size:14}),(0,F.jsx)(`span`,{children:`Filter`}),en.length>0&&(0,F.jsx)(`span`,{className:`graph-filter-count`,children:en.length})]}),yt&&(0,F.jsxs)(`div`,{className:`graph-filter-popover`,role:`dialog`,"aria-label":`Node type filter`,children:[(0,F.jsxs)(`div`,{className:`graph-filter-popover-header`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`graph-toggle-trashed${tn?` active`:``}`,onClick:Ht,"aria-pressed":tn,title:`Show trashed nodes — restored with Restore button on each node`,children:[(0,F.jsx)(S,{size:14}),` Show trashed`]}),(en.length>0||tn||nn)&&(0,F.jsx)(`button`,{type:`button`,className:`graph-filter-clear`,onClick:Gt,"aria-label":`Clear filter selection`,title:`Clear filter selection`,children:(0,F.jsx)(s,{size:14})})]}),(0,F.jsx)(`div`,{className:`graph-toggle-agent-actions`,title:`Hide ToolCall, StepResult, WorkflowStep, WorkflowRun — agent-execution telemetry. Flip on for audit/debug.`,children:(0,F.jsx)(b,{checked:nn,onChange:Ut,label:`Include agent actions`})}),ht.length===0&&(0,F.jsx)(`p`,{className:`graph-filter-popover-empty`,children:`No node types in your graph yet.`}),(0,F.jsx)(`div`,{className:`graph-filter-rows`,role:`group`,"aria-label":`Node type filter`,children:ht.map(({label:e,nodeCount:t})=>{let n=en.includes(e),r=(0,v.colourForLabel)(e);return(0,F.jsxs)(`button`,{type:`button`,className:`graph-filter-row${n?` active`:``}`,onClick:()=>Vt(e),"aria-pressed":n,children:[(0,F.jsx)(`span`,{className:`graph-filter-row-swatch`,style:{backgroundColor:r}}),(0,F.jsx)(`span`,{className:`graph-filter-row-label`,children:e}),(0,F.jsx)(`span`,{className:`graph-filter-row-count`,children:t})]},e)})}),(en.includes(`AdminConversation`)||en.includes(`PublicConversation`))&&(0,F.jsxs)(`div`,{className:`graph-filter-subfacets`,children:[(0,F.jsxs)(`div`,{className:`graph-filter-subfacet-group`,role:`group`,"aria-label":`Conversation channel`,children:[(0,F.jsx)(`span`,{className:`graph-filter-subfacet-label`,children:`Channel`}),[`webchat`,`whatsapp`].map(e=>{let t=xt.includes(e);return(0,F.jsx)(`button`,{type:`button`,className:`graph-filter-subfacet-chip${t?` active`:``}`,onClick:()=>{St(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},"aria-pressed":t,children:e===`webchat`?`Web`:`WhatsApp`},e)})]}),(0,F.jsxs)(`div`,{className:`graph-filter-subfacet-group`,role:`group`,"aria-label":`Message sublabel`,children:[(0,F.jsx)(`span`,{className:`graph-filter-subfacet-label`,children:`Message`}),[`UserMessage`,`AssistantMessage`,`WhatsAppMessage`].map(e=>{let t=Ct.includes(e);return(0,F.jsx)(`button`,{type:`button`,className:`graph-filter-subfacet-chip${t?` active`:``}`,onClick:()=>{wt(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},"aria-pressed":t,children:e===`UserMessage`?`User`:e===`AssistantMessage`?`Assistant`:`WhatsApp`},e)})]})]}),(0,F.jsx)(`div`,{className:`graph-filter-popover-footer`,children:(0,F.jsx)(`button`,{type:`button`,className:`graph-filter-set-default`,onClick:Jt,disabled:!sn||Tt,children:Tt?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(d,{size:12,className:`spin`}),` Saving…`]}):`Set default view`})})]})]}),(0,F.jsx)(`div`,{className:`graph-meta`,children:M>0&&(0,F.jsxs)(`span`,{className:`graph-meta-count`,children:[M,` node`,M===1?``:`s`]})})]}),ve.length>1&&(0,F.jsx)(Ve,{viewStack:ve}),Ye&&at===`bm25`&&!$e&&(0,F.jsx)(`div`,{className:`graph-error-banner graph-search-degraded`,role:`status`,children:`Vector ranking unavailable — showing keyword-only results.`}),$e&&(0,F.jsxs)(`div`,{className:`data-error graph-error-banner`,children:[`Search unavailable: `,$e]}),Ye&&st>0&&!lt&&!$e&&(0,F.jsxs)(`button`,{type:`button`,className:`graph-search-suppressed`,onClick:()=>ut(!0),children:[st,` low-confidence match`,st===1?``:`es`,` hidden — show all`]}),Ye&&lt&&!$e&&(0,F.jsx)(`button`,{type:`button`,className:`graph-search-suppressed`,onClick:()=>ut(!1),children:`Showing all matches — hide low-confidence`}),Ze&&Ze.length===0&&!$e&&(0,F.jsx)(`div`,{className:`graph-search-status`,children:`No matches in your graph.`}),(0,F.jsxs)(`div`,{className:`graph-canvas-wrap`,children:[xe&&(0,F.jsxs)(`div`,{className:`graph-canvas-overlay`,children:[(0,F.jsx)(d,{size:20,className:`spin`}),` Loading your graph…`]}),Ce&&!xe&&(0,F.jsxs)(`div`,{className:`graph-canvas-overlay graph-canvas-error`,children:[(0,F.jsx)(`p`,{children:Ce}),(0,F.jsx)(`button`,{type:`button`,className:`data-btn`,onClick:()=>{we(null),ft(e=>e+1)},children:`Retry`})]}),A&&!xe&&(0,F.jsxs)(`div`,{className:`graph-canvas-overlay graph-canvas-error`,children:[(0,F.jsxs)(`p`,{children:[`Refine your filter — `,(0,F.jsx)(`strong`,{children:A.matched}),` matches exceed the 2000 cap.`]}),(0,F.jsx)(`p`,{className:`graph-canvas-hint`,children:`Pick a more specific label combination, or narrow your brand's data.`})]}),!xe&&!Ce&&!A&&M===0&&!Qt&&en.length===0&&(0,F.jsxs)(`div`,{className:`graph-canvas-overlay`,children:[(0,F.jsx)(te,{size:20}),(0,F.jsx)(`p`,{children:`Open Filter to pick a node type and see what's in your graph.`})]}),!xe&&!Ce&&!A&&M===0&&!Qt&&en.length>0&&(0,F.jsx)(`div`,{className:`graph-canvas-overlay`,children:(0,F.jsxs)(`p`,{children:[`No `,en.join(`, `),` nodes in your graph yet.`]})}),(0,F.jsx)(`div`,{ref:l,className:`graph-canvas`}),(0,F.jsx)(`div`,{ref:ce,className:`graph-marquee`,"aria-hidden":`true`}),M>0&&(0,F.jsx)(`div`,{ref:ne,className:`graph-trash-drop-zone${Ie?` is-hover`:``}${Ue?` is-error`:``}`,"aria-hidden":`true`,children:(0,F.jsx)(i,{size:18})}),Ge&&(0,F.jsxs)(`div`,{className:`graph-drag-error-banner`,role:`alert`,children:[(0,F.jsx)(`span`,{children:Ge}),(0,F.jsx)(`button`,{type:`button`,className:`graph-drag-error-dismiss`,onClick:()=>Ke(null),"aria-label":`Dismiss`,children:(0,F.jsx)(s,{size:14})})]})]}),N&&(0,F.jsx)(Re,{node:N,edges:C.current,nodesById:y.current,adminFetch:r,onClose:()=>{P(null);try{p.current?.unselectAll()}catch{}},onRestored:Yt,onTrashed:Xt}),M>0&&kt.length>0&&(0,F.jsx)(`div`,{className:`graph-legend`,children:kt.map(e=>(0,F.jsxs)(`div`,{className:`graph-legend-item`,children:[(0,F.jsx)(`span`,{className:`graph-legend-swatch`,style:{backgroundColor:(0,v.colourForLabel)(e)}}),(0,F.jsx)(`span`,{children:e})]},e))})]})}function Re({node:e,edges:t,nodesById:n,adminFetch:r,onClose:a,onRestored:o,onTrashed:c}){let l=Object.entries(e.properties).filter(([,e])=>e!=null),u=t.filter(t=>t.from===e.id||t.to===e.id),[f,p]=(0,D.useState)(!1),[m,h]=(0,D.useState)(null),[g,_]=(0,D.useState)(!1),[v,y]=(0,D.useState)(null);(0,D.useEffect)(()=>{p(!1),h(null),_(!1),y(null)},[e.id]);let b=(0,D.useCallback)(()=>{p(!0),h(null),r(`/api/admin/graph-restore`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e.id})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);o()}).catch(e=>{h(e instanceof Error?e.message:String(e)),p(!1)})},[e.id,o,r]),x=(0,D.useCallback)(()=>{_(!0),y(null),r(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e.id,by:`graph-side-panel-trash`})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);c()}).catch(e=>{y(e instanceof Error?e.message:String(e)),_(!1)})},[e.id,c,r]);return(0,F.jsxs)(`aside`,{className:`graph-side-panel${e.trashed?` graph-side-panel-trashed`:``}`,children:[(0,F.jsxs)(`header`,{className:`graph-side-header`,children:[(0,F.jsx)(`div`,{children:(()=>{if(e.labels.some(e=>ve.has(e))){let t=(0,_e.pickDisplayName)(e),n=e.properties.createdAt,r=typeof n==`string`?n:``,i=r?(0,_e.formatRunTimestamp)(r):null,a=e.labels.join(` · `)+(e.trashed?` · Trashed`:``)+` · ${e.id}`;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`h2`,{className:`graph-side-name`,title:t,children:t}),i&&(0,F.jsx)(`div`,{className:`graph-side-created`,children:i}),(0,F.jsx)(`div`,{className:`graph-side-meta`,children:a})]})}return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`graph-side-labels`,children:[e.labels.join(` · `),e.trashed?` · Trashed`:``]}),(0,F.jsx)(`div`,{className:`graph-side-id`,children:e.id})]})})()}),(0,F.jsx)(`button`,{type:`button`,className:`graph-side-close`,onClick:a,"aria-label":`Close`,children:(0,F.jsx)(s,{size:14})})]}),e.trashed&&(0,F.jsxs)(`dl`,{className:`graph-side-props graph-side-trash-meta`,children:[(0,F.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,F.jsx)(`dt`,{children:`trashedAt`}),(0,F.jsx)(`dd`,{children:We(e.properties.trashedAt)})]}),(0,F.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,F.jsx)(`dt`,{children:`trashedBy`}),(0,F.jsx)(`dd`,{children:We(e.properties.trashedBy)})]})]}),(0,F.jsxs)(`dl`,{className:`graph-side-props`,children:[l.length===0&&(0,F.jsx)(`div`,{className:`graph-side-empty`,children:`No properties.`}),l.map(([e,t])=>(0,F.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,F.jsx)(`dt`,{children:e}),(0,F.jsx)(`dd`,{children:We(t)})]},e))]}),u.length>0&&(0,F.jsxs)(`section`,{className:`graph-side-edges`,children:[(0,F.jsxs)(`h3`,{className:`graph-side-edges-heading`,children:[`Connections (`,u.length,`)`]}),u.map(t=>{let r=t.from===e.id,i=r?t.to:t.from,a=n.get(i),o=a?(0,_e.pickShortLabel)(a):i,s=r?`→`:`←`,c=Object.entries(t.properties??{}).filter(([,e])=>e!=null&&e!==``);return(0,F.jsxs)(`div`,{className:`graph-side-edge`,children:[(0,F.jsxs)(`div`,{className:`graph-side-edge-header`,children:[(0,F.jsx)(`span`,{className:`graph-side-edge-type`,children:t.type}),(0,F.jsx)(`span`,{className:`graph-side-edge-arrow`,children:s}),(0,F.jsx)(`span`,{className:`graph-side-edge-other`,title:o,children:o})]}),c.length>0&&(0,F.jsx)(`dl`,{className:`graph-side-edge-props`,children:c.map(([e,t])=>(0,F.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,F.jsx)(`dt`,{children:e}),(0,F.jsx)(`dd`,{children:We(t)})]},e))})]},t.id)})]}),e.trashed&&(0,F.jsxs)(`footer`,{className:`graph-side-footer`,children:[!f&&!m&&(0,F.jsxs)(`button`,{type:`button`,className:`graph-side-restore`,onClick:b,children:[(0,F.jsx)(C,{size:14}),` Restore`]}),f&&(0,F.jsx)(`div`,{className:`graph-delete-confirm`,children:(0,F.jsxs)(`p`,{children:[(0,F.jsx)(d,{size:14,className:`spin`}),` Restoring…`]})}),m&&(0,F.jsxs)(`div`,{className:`graph-delete-confirm graph-delete-confirm-error`,children:[(0,F.jsxs)(`p`,{children:[`Restore failed: `,m]}),(0,F.jsxs)(`div`,{className:`graph-delete-confirm-buttons`,children:[(0,F.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-cancel`,onClick:()=>{h(null)},children:`Close`}),(0,F.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-do`,onClick:b,children:`Retry`})]})]})]}),!e.trashed&&(0,F.jsxs)(`footer`,{className:`graph-side-footer`,children:[!g&&!v&&(0,F.jsxs)(`button`,{type:`button`,className:`graph-side-trash`,onClick:x,children:[(0,F.jsx)(i,{size:14}),` Trash`]}),g&&(0,F.jsx)(`div`,{className:`graph-delete-confirm`,children:(0,F.jsxs)(`p`,{children:[(0,F.jsx)(d,{size:14,className:`spin`}),` Trashing…`]})}),v&&(0,F.jsxs)(`div`,{className:`graph-delete-confirm graph-delete-confirm-error`,children:[(0,F.jsxs)(`p`,{children:[`Trash failed: `,v]}),(0,F.jsxs)(`div`,{className:`graph-delete-confirm-buttons`,children:[(0,F.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-cancel`,onClick:()=>{y(null)},children:`Close`}),(0,F.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-do`,onClick:x,children:`Retry`})]})]})]})]})}function ze(e,t){let n=`/api/admin/graph-subgraph`,r=t.includeAgentActions?`&includeAgentActions=1`:``;if(e.kind===`neighbourhood`){let i=t.search&&t.search.q?`&q=${encodeURIComponent(t.search.q)}&limit=${t.search.limit}`:``;return`${n}?mode=neighbourhood&elementId=${encodeURIComponent(e.rootElementId)}${r}${i}`}return`${n}?mode=default&labels=${encodeURIComponent(e.selectedLabels.join(`,`))}${e.includeTrashed?`&includeTrashed=1`:``}${r}${t.channel&&t.channel.length>0?`&channel=${encodeURIComponent(t.channel.join(`,`))}`:``}${t.messageSublabel&&t.messageSublabel.length>0?`&messageSublabel=${encodeURIComponent(t.messageSublabel.join(`,`))}`:``}`}var Be=class extends Error{body;constructor(e){super(e.error),this.body=e}};function Ve({viewStack:e}){let t=e.map(e=>e.kind===`filter`?`Filter`:e.rootLabel??`Node`);return(0,F.jsx)(`div`,{className:`graph-breadcrumb`,role:`navigation`,"aria-label":`Graph navigation breadcrumb`,children:t.map((e,n)=>(0,F.jsxs)(`span`,{className:`graph-breadcrumb-item`,children:[n>0&&(0,F.jsx)(`span`,{className:`graph-breadcrumb-separator`,"aria-hidden":`true`,children:`›`}),(0,F.jsx)(`span`,{className:`graph-breadcrumb-label${n===t.length-1?` is-current`:``}`,children:e})]},n))})}function He(e,t){let n=`[graph-page] ${e} ${Object.entries(t).map(([e,t])=>`${e}=${String(t)}`).join(` `)}`;try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-nav`,msg:n}),keepalive:!0}).catch(()=>{})}catch{}}function Ue(e){let t=t=>{let n=e[t];if(n&&typeof n==`object`&&`low`in n){let e=n.low;return typeof e==`number`?e:null}return null},n=t(`year`),r=t(`month`),i=t(`day`);if(n===null||r===null||i===null)return null;let a=`${String(n).padStart(4,`0`)}-${String(r).padStart(2,`0`)}-${String(i).padStart(2,`0`)}`;if(!(`hour`in e))return a;let o=t(`hour`),s=t(`minute`),c=t(`second`);return o===null||s===null||c===null?a:`${a} ${String(o).padStart(2,`0`)}:${String(s).padStart(2,`0`)}:${String(c).padStart(2,`0`)}`}function We(e){if(e==null)return``;if(Array.isArray(e))return e.length>8?`[${e.length} items]`:e.map(String).join(`, `);if(typeof e==`object`){if(`year`in e&&`month`in e&&`day`in e&&typeof e.year==`object`){let t=Ue(e);if(t)return t}return JSON.stringify(e)}return String(e)}(0,E.createRoot)(document.getElementById(`root`)).render((0,F.jsx)(Ie,{}));
51
+ `)}var De={solver:`barnesHut`,barnesHut:{gravitationalConstant:-2e3,centralGravity:.4,springLength:170,springConstant:.04},stabilization:{iterations:200}},N=220,P=3;function Oe(e){if(!(e.nodes.length<=5))return{physics:De,nodePositions:new Map};let t=new Map,n=(P-1)*N/2,r=(Math.ceil(e.nodes.length/P)-1)*N/2;for(let i=0;i<e.nodes.length;i++){let a=i%P,o=Math.floor(i/P);t.set(e.nodes[i].id,{x:a*N-n,y:o*N-r})}return{physics:!1,nodePositions:t}}var F=o();function ke(e){return e<.7?`compact`:e<1.3?`wrapped`:`detailed`}var Ae=150,je=`#FBBF24`;function Me(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var Ne=`maxy-graph-search-limit-v1`,Pe=250,Fe=1200;function Ie(){let[e,t]=(0,D.useState)(null),[n,r]=(0,D.useState)(!1),[i,a]=(0,D.useState)(void 0),[o,s]=(0,D.useState)(null),[c,u]=(0,D.useState)(void 0),[f,g]=(0,D.useState)(null),[_,v]=(0,D.useState)(null),y=(0,D.useMemo)(()=>typeof window>`u`?null:O(window.location.search),[]),b=(0,D.useMemo)(()=>y?.kind===`focus`?{nodeId:y.nodeId,nodeLabel:y.nodeLabel}:null,[y]),x=(0,D.useMemo)(()=>y?.kind===`labels`?y.labels:null,[y]);(0,D.useEffect)(()=>{b&&He(`deep-link`,{nodeId:b.nodeId.length>16?b.nodeId.slice(0,16)+`…`:b.nodeId,label:b.nodeLabel??``})},[b]),(0,D.useEffect)(()=>{!x||x.length===0||He(`label-seed`,{label:x[0]})},[x]),(0,D.useEffect)(()=>{let e=!1,n=null;try{n=sessionStorage.getItem(`maxy-admin-session-key`)}catch{}if(!n){t(null),r(!0);return}return fetch(`/api/admin/session?session_key=${encodeURIComponent(n)}`).then(async i=>{if(!e){if(i.status===401){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`;return}if(i.ok)try{let e=await i.json();typeof e.businessName==`string`&&a(e.businessName),e.sessionId!==void 0&&s(e.sessionId??null),v(e.role??null),u(e.userName===void 0?null:e.userName),g(e.avatar??null)}catch{}t(n),r(!0)}}).catch(()=>{e||(t(n),r(!0))}),()=>{e=!0}},[]);let S=(0,D.useCallback)(()=>{try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},[]),[ee,C]=(0,D.useState)(!1),te=(0,D.useCallback)(async()=>{C(!0);try{let e=await h();if(e){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`}return e}finally{C(!1)}},[]);return n?e?(0,F.jsx)(l,{cacheKey:e,surface:`graph`,onSessionExpired:({code:e,path:t})=>{console.warn(`[admin-auth] outcome=session-expired-redirect code=${e} path=${t} surface=graph`);try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},children:(0,F.jsx)(m,{cacheKey:e,businessName:i,sessionId:o,onLogout:S,onDisconnect:te,disconnecting:ee,userName:c,userAvatar:f,role:_,children:(0,F.jsxs)(`div`,{className:`data-page graph-page`,children:[(0,F.jsx)(`header`,{className:`data-header`,children:(0,F.jsxs)(`h1`,{className:`data-title`,children:[(0,F.jsx)(p,{size:18}),` Graph`]})}),(0,F.jsx)(`main`,{className:`graph-main`,children:(0,F.jsx)(Le,{cacheKey:e,initialFocus:b,initialLabels:x})})]})})}):(0,F.jsxs)(`div`,{className:`data-page`,children:[(0,F.jsx)(`header`,{className:`data-header`,children:(0,F.jsxs)(`h1`,{className:`data-title`,children:[(0,F.jsx)(p,{size:18}),` Graph`]})}),(0,F.jsxs)(`div`,{className:`data-empty`,children:[(0,F.jsx)(`p`,{children:`You are not signed in.`}),(0,F.jsxs)(`p`,{children:[`Open the `,(0,F.jsx)(`a`,{href:`/`,className:`data-link`,children:`main admin page`}),` and log in, then return here.`]})]})]}):(0,F.jsx)(`div`,{className:`data-page`,children:(0,F.jsxs)(`div`,{className:`data-loading`,children:[(0,F.jsx)(d,{size:18,className:`spin`}),` Loading…`]})})}function Le({cacheKey:e,initialFocus:t=null,initialLabels:n=null}){let{adminFetch:r,cacheKey:a,sessionRefetchNonce:o}=c({initialCacheKey:e,surface:`graph`}),l=(0,D.useRef)(null),p=(0,D.useRef)(null),m=(0,D.useRef)(null),h=(0,D.useRef)(null),y=(0,D.useRef)(new Map),C=(0,D.useRef)([]),w=(0,D.useRef)(null),ne=(0,D.useRef)(null),E=(0,D.useRef)(null),O=(0,D.useRef)([]),ce=(0,D.useRef)(null),le=(0,D.useRef)(null),me=(0,D.useRef)(null),_e=(0,D.useRef)(null),[ve,ye]=(0,D.useState)([{kind:`filter`,selectedLabels:[],includeTrashed:!1,includeAgentActions:!1}]);(0,D.useEffect)(()=>{t?.nodeId&&ye(e=>{let n=e[e.length-1];return n.kind===`neighbourhood`&&n.rootElementId===t.nodeId?e:[e[0],{kind:`neighbourhood`,rootElementId:t.nodeId,rootLabel:t.nodeLabel}]})},[t?.nodeId,t?.nodeLabel]);let be=n&&n.length>0?[...n].sort().join(`,`):null;(0,D.useEffect)(()=>{be&&(Dt.current=!0,ye([{kind:`filter`,selectedLabels:be.split(`,`),includeTrashed:!1,includeAgentActions:!1}]))},[be]);let[xe,Se]=(0,D.useState)(!1),[Ce,we]=(0,D.useState)(null),[A,j]=(0,D.useState)(null),[M,De]=(0,D.useState)(0),[N,P]=(0,D.useState)(null),[Ie,Le]=(0,D.useState)(!1),[Ue,We]=(0,D.useState)(!1),[Ge,Ke]=(0,D.useState)(null),[qe,Je]=(0,D.useState)(``),[Ye,Xe]=(0,D.useState)(``),[Ze,Qe]=(0,D.useState)(null),[$e,et]=(0,D.useState)(null),[tt,nt]=(0,D.useState)(()=>{if(typeof window>`u`)return 100;let e=window.localStorage.getItem(Ne);return e?he(e):100}),[rt,it]=(0,D.useState)(tt),[at,ot]=(0,D.useState)(`hybrid`),[st,ct]=(0,D.useState)(0),[lt,ut]=(0,D.useState)(!1),[dt,ft]=(0,D.useState)(0),[pt,mt]=(0,D.useState)(0),[ht,gt]=(0,D.useState)([]),[_t,vt]=(0,D.useState)({labels:[],includeTrashed:!1}),[yt,bt]=(0,D.useState)(!1),[xt,St]=(0,D.useState)([]),[Ct,wt]=(0,D.useState)([]),[Tt,Et]=(0,D.useState)(!1),Dt=(0,D.useRef)(!1),Ot=(0,D.useRef)(null),kt=(0,D.useMemo)(()=>{let e=new Set;for(let t of y.current.values()){let n=(0,v.pickDisplayLabel)(t.labels);n&&e.add(n)}return[...e].sort()},[M]);(0,D.useEffect)(()=>{let e=!1,t=r(`/api/admin/graph-labels-in-graph`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-labels-in-graph`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}return{labels:[]}}),n=r(`/api/admin/graph-default-view`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-default-view`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}return{labels:[],includeTrashed:!1}});return Promise.all([t,n]).then(([t,n])=>{if(!e&&(gt(t.labels),vt(n),!Dt.current)){Dt.current=!0;let e=new Set(t.labels.map(e=>e.label)),r=n.labels.filter(t=>e.has(t));(r.length>0||n.includeTrashed)&&ye(e=>[{kind:`filter`,selectedLabels:r,includeTrashed:n.includeTrashed,includeAgentActions:!1},...e.slice(1)])}}),()=>{e=!0}},[a,o,r]);let At=ve[0].kind===`filter`?ve[0].includeAgentActions:!1;(0,D.useEffect)(()=>{if(!Dt.current)return;let e=!1;return r(`/api/admin/graph-labels-in-graph?includeAgentActions=${At?`1`:`0`}`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).then(t=>{e||gt(t.labels)}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-labels-in-graph-refetch`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}),()=>{e=!0}},[a,o,At,pt,r]),(0,D.useEffect)(()=>{if(!yt)return;let e=e=>{Ot.current&&(Ot.current.contains(e.target)||bt(!1))},t=e=>{e.key===`Escape`&&bt(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[yt]);let jt=(0,D.useCallback)(()=>{if(m.current)try{m.current.clear()}catch{}if(h.current)try{h.current.clear()}catch{}},[]),Mt=(0,D.useCallback)((e,t)=>{Ke(null),r(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e,by:`graph-drag-trash`})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);P(null);try{p.current?.unselectAll()}catch{}ye(e=>[se(e)]),ft(e=>e+1),ue(`graph-trash`)}).catch(n=>{let r=n instanceof Error?n.message:String(n);Ke(`Failed to delete: ${r}`),We(!0),window.setTimeout(()=>We(!1),Fe);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-drag-delete`,elementId:e,label:t,msg:r}),keepalive:!0}).catch(()=>{})}catch{}})},[r]),Nt=(0,D.useCallback)(e=>{Ke(null);let t=e.length;Promise.allSettled(e.map(e=>r(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e,by:`graph-drag-trash`})}).then(async t=>{let n=await t.json().catch(()=>({error:`HTTP ${t.status}`}));if(!t.ok)throw Error(n.error??`HTTP ${t.status}`);return e}))).then(e=>{let n=e.filter(e=>e.status===`rejected`);P(null);try{p.current?.unselectAll()}catch{}if(ye(e=>[se(e)]),ft(e=>e+1),ue(`graph-trash`),n.length>0){let e=t-n.length;Ke(e===0?`Failed to delete ${t} node${t===1?``:`s`}.`:`Deleted ${e} of ${t}; ${n.length} failed.`),We(!0),window.setTimeout(()=>We(!1),Fe);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-drag-delete-batch`,total:t,failed:n.length}),keepalive:!0}).catch(()=>{})}catch{}}})},[r]),Pt=ve[ve.length-1],Ft=(0,D.useMemo)(()=>oe(ve),[ve]),It=(0,D.useRef)(Ft);(0,D.useEffect)(()=>{It.current=Ft},[Ft]);let Lt=(0,D.useRef)(ve);(0,D.useEffect)(()=>{Lt.current=ve},[ve]),(0,D.useEffect)(()=>{if(Pt.kind===`filter`&&Pt.selectedLabels.length===0){w.current?.abort(),w.current=null,Se(!1),we(null),j(null),De(0),y.current=new Map,jt();return}if(Ye){w.current?.abort(),w.current=null;return}let e=window.setTimeout(()=>{w.current?.abort();let e=new AbortController;w.current=e,Se(!0),we(null),j(null),r(ze(Pt,{includeAgentActions:se(ve).includeAgentActions,search:null,channel:xt,messageSublabel:Ct}),{signal:e.signal}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(e.status===413)throw new Be(t);if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(t=>{e.signal.aborted||(y.current=new Map(t.nodes.map(e=>[e.id,e])),De(t.nodes.length),Rt(t.nodes,t.edges))}).catch(t=>{if(!e.signal.aborted){if(t instanceof Be){j(t.body),De(0),y.current=new Map,jt();return}we(t instanceof Error?t.message:String(t))}}).finally(()=>{e.signal.aborted||Se(!1)})},Pe);return()=>{window.clearTimeout(e)}},[a,Ft,dt,o,Ye,rt,xt,Ct]),(0,D.useEffect)(()=>()=>{w.current?.abort(),p.current?.destroy(),p.current=null,_e.current!==null&&(clearTimeout(_e.current),_e.current=null)},[]);let Rt=(0,D.useCallback)((e,t)=>{if(!l.current)return;C.current=t;let n=new Set([`Message`,`UserMessage`,`AssistantMessage`]),r=e=>e.labels.some(e=>n.has(e)),i=new Map,a=e.filter(r);if(a.length>0){let e=new Set(a.map(e=>e.id)),n=new Map,r=new Set;for(let i of t)i.type===`NEXT`&&e.has(i.from)&&e.has(i.to)&&(n.set(i.from,i.to),r.add(i.to));let o=[],s=new Set;for(let e of a){if(r.has(e.id))continue;let t=e.id;for(;t&&!s.has(t);)s.add(t),o.push(t),t=n.get(t)}for(let e of a)s.has(e.id)||(o.push(e.id),s.add(e.id));let c=l.current?.clientWidth??1200,u=Math.max(c-160,300),d=Math.max(Math.floor(u/150),2);o.forEach((e,t)=>{let n=t%d,r=Math.floor(t/d);i.set(e,{x:n*150,y:r*90})})}let o=e.map(e=>{let t=e.labels[0]??`Unknown`,n=(0,v.resolveNodeColour)(e.labels);n.displayLabel;let r=n.colour;n.driftCandidates;let a=i.get(e.id),o=a?{x:a.x,y:a.y,physics:!1}:{};return e.trashed?{id:e.id,label:Te(e,1),title:Ee(e),color:{background:`${r}40`,border:r},borderWidth:2,shapeProperties:{borderDashes:[6,4]},group:t,...o}:{id:e.id,label:Te(e,1),title:Ee(e),color:r,group:t,...o}}),s=new Set(o.map(e=>e.id)),c=t.filter(e=>e.type!==`PART_OF`||s.has(e.from)&&s.has(e.to)).map(e=>({id:e.id,from:e.from,to:e.to,label:e.type})),u=Oe({nodes:e,edges:t});m.current=new re.DataSet(u.nodePositions.size>0?o.map(e=>{if(e.x!==void 0||e.y!==void 0)return e;let t=u.nodePositions.get(e.id);return t?{...e,x:t.x,y:t.y,physics:!1}:e}):o),h.current=new re.DataSet(c);let d={autoResize:!0,layout:{improvedLayout:!1,randomSeed:Me(It.current)},physics:u.physics===!1?!1:{solver:u.physics.solver,barnesHut:u.physics.barnesHut,stabilization:u.physics.stabilization},nodes:{shape:`dot`,size:18,font:{color:`#1F2937`,size:12,face:`DM Sans, sans-serif`},scaling:{label:{enabled:!0,min:12,max:30,drawThreshold:0}},borderWidth:0,chosen:{node:e=>{e.size=20,e.borderWidth=3,e.borderColor=`#0F172A`,e.shadow=!0,e.shadowColor=`rgba(15, 23, 42, 0.55)`,e.shadowSize=8,e.shadowX=0,e.shadowY=0},label:e=>{e.size=14}}},edges:{arrows:{to:{enabled:!0,scaleFactor:.4}},color:{color:`#CBD5E1`,highlight:`#475569`},font:{color:`#64748B`,size:9,face:`DM Sans, sans-serif`,align:`middle`,strokeWidth:0},smooth:{enabled:!0,type:`continuous`,roundness:.4},width:1,chosen:{edge:!0,label:!1}},interaction:{hover:!0,tooltipDelay:150,multiselect:!0}};try{p.current?.destroy(),_e.current!==null&&(clearTimeout(_e.current),_e.current=null),me.current=null;let e=new T.Network(l.current,{nodes:m.current,edges:h.current},d);p.current=e,e.on(`zoom`,()=>{_e.current!==null&&clearTimeout(_e.current),_e.current=setTimeout(()=>{_e.current=null;let e=p.current,t=m.current;if(!e||!t)return;let n;try{n=e.getScale()}catch{return}let r=ke(n);if(r===me.current)return;me.current=r;let i=[];for(let e of y.current.values()){if(!e.labels[0])continue;let{colour:t}=(0,v.resolveNodeColour)(e.labels),r=e.trashed?{background:`${t}40`,border:t}:t;i.push({id:e.id,label:Te(e,n),color:r})}i.length>0&&t.update(i),console.error(`[graph-page] zoom-tier scale=${n.toFixed(3)} tier=${r} nodes=${i.length}`)},Ae)}),e.on(`click`,e=>{let t=e.nodes[0];if(!t)return;let n=y.current.get(t);if(!n)return;if(de(n)===`skip-trashed`){P(n);return}let r=Lt.current[Lt.current.length-1];if(r.kind===`neighbourhood`&&r.rootElementId===t){P(e=>e?.id===t?null:n);return}P(null);let i={kind:`neighbourhood`,rootElementId:t,rootLabel:n.labels[0]??null};ye(e=>{let n=ie(e,i),r=n.length-1;return n.length>e.length&&He(`nav-push`,{depth:r,kind:i.kind,rootElementId:t}),n.length===10&&e.length===10&&He(`view-stack-cap-hit`,{depth:10,rootElementId:t}),n})}),e.on(`deselectNode`,()=>{P(null)});let t=e=>{let t=l.current,n=ne.current;if(!t||!n)return!1;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=r.left+e.x,o=r.top+e.y;return a>=i.left&&a<=i.right&&o>=i.top&&o<=i.bottom},n=l.current?.parentElement??null;e.on(`dragStart`,e=>{if(e.nodes.length===0){E.current=null,O.current=[];return}O.current=[...e.nodes],E.current=e.nodes[0],n?.classList.add(`graph-dragging`)}),e.on(`dragging`,e=>{if(O.current.length===0)return;let n=t(e.pointer.DOM);Le(e=>e===n?e:n)}),e.on(`dragEnd`,e=>{let r=O.current;if(O.current=[],E.current=null,Le(!1),n?.classList.remove(`graph-dragging`),r.length!==0&&t(e.pointer.DOM))if(r.length===1){let e=y.current.get(r[0])?.labels[0]??`Unknown`;Mt(r[0],e)}else Nt(r)})}catch(e){let t=e instanceof Error?e.message:String(e);we(`Visualisation failed to load: ${t}`);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-render`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}},[]);(0,D.useEffect)(()=>{let e=l.current;if(!e)return;let t=t=>{let n=le.current,r=ce.current,i=e.parentElement;if(!n||!r||!i)return;let a=i.getBoundingClientRect(),o=Math.min(n.clientX,t.clientX)-a.left,s=Math.min(n.clientY,t.clientY)-a.top,c=Math.max(n.clientX,t.clientX)-a.left,l=Math.max(n.clientY,t.clientY)-a.top;r.style.left=`${o}px`,r.style.top=`${s}px`,r.style.width=`${c-o}px`,r.style.height=`${l-s}px`},n=r=>{document.removeEventListener(`mousemove`,t,!0),document.removeEventListener(`mouseup`,n,!0);let i=le.current;le.current=null;let a=ce.current;a&&(a.style.display=`none`);let o=p.current;if(!i||!o)return;let s=e.getBoundingClientRect(),c=i.clientX-s.left,l=i.clientY-s.top,u=r.clientX-s.left,d=r.clientY-s.top,f=Math.min(c,u),m=Math.min(l,d),h=Math.max(c,u),g=Math.max(l,d);if(h-f<3&&g-m<3)return;let _=o.getPositions(),v=[];for(let[e,t]of Object.entries(_)){let n=o.canvasToDOM(t);n.x>=f&&n.x<=h&&n.y>=m&&n.y<=g&&v.push(e)}try{o.selectNodes(v,!1)}catch{}},r=r=>{if(!r.shiftKey||r.button!==0)return;let i=p.current,a=e.parentElement;if(!i||!a)return;let o=e.getBoundingClientRect(),s={x:r.clientX-o.left,y:r.clientY-o.top};if(i.getNodeAt(s))return;r.preventDefault(),r.stopImmediatePropagation(),le.current={clientX:r.clientX,clientY:r.clientY};let c=ce.current,l=a.getBoundingClientRect();c&&(c.style.display=`block`,c.style.left=`${r.clientX-l.left}px`,c.style.top=`${r.clientY-l.top}px`,c.style.width=`0px`,c.style.height=`0px`),document.addEventListener(`mousemove`,t,!0),document.addEventListener(`mouseup`,n,!0)};return e.addEventListener(`mousedown`,r,!0),()=>{e.removeEventListener(`mousedown`,r,!0),document.removeEventListener(`mousemove`,t,!0),document.removeEventListener(`mouseup`,n,!0)}},[]),(0,D.useEffect)(()=>{let e=qe.trim();if(!e){Xe(``),Qe(null),et(null),ot(`hybrid`),ct(0),ut(!1),p.current?.unselectAll();return}ut(!1);let t=setTimeout(()=>Xe(e),300);return()=>clearTimeout(t)},[qe]),(0,D.useEffect)(()=>{let e=setTimeout(()=>{let e=he(tt);it(e);try{window.localStorage.setItem(Ne,String(e))}catch{}},200);return()=>clearTimeout(e)},[tt]);let zt=(0,D.useCallback)(e=>{let t=p.current,n=m.current;if(!t||!n)return;let{updates:r,inWindow:i}=fe(e,y.current,v.resolveNodeColour,je);r.length>0&&(n.update(r),t.fit({nodes:i,animation:{duration:400,easingFunction:`easeInOutQuad`}}))},[]),Bt=se(ve);(0,D.useEffect)(()=>{if(!Ye)return;let e=!1;return et(null),r(ge(Ye,Bt.selectedLabels,rt,lt)).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(t=>{if(e)return;Qe(t.results);let n=t.mode===`bm25`?`bm25`:`hybrid`;if(ot(n),ct(typeof t.suppressed==`number`?t.suppressed:0),n===`bm25`)try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-page`,msg:`[graph-page] search-result-degraded mode=bm25 query="${Ye}"`}),keepalive:!0}).catch(()=>{})}catch{}let{nodes:r,edges:i}=pe(t.results,Bt.selectedLabels);y.current=new Map(r.map(e=>[e.id,e])),De(r.length),j(null),Rt(r,i),zt(t.results),console.info(`[graph-page] search-applied view=${Pt.kind} q="${Ye}" labels=${Bt.selectedLabels.join(`|`)} hits=${r.length}`)}).catch(t=>{e||et(t instanceof Error?t.message:String(t))}),()=>{e=!0}},[Ye,rt,a,o,r,zt,Pt.kind,Bt.selectedLabels,Rt,lt]);let Vt=(0,D.useCallback)(e=>{ye(t=>{let n=se(t),r=new Set(n.selectedLabels);return r.has(e)?r.delete(e):r.add(e),k({kind:`filter`,selectedLabels:[...r].sort(),includeTrashed:n.includeTrashed,includeAgentActions:n.includeAgentActions})})},[]),Ht=(0,D.useCallback)(()=>{ye(e=>{let t=se(e);return k({...t,includeTrashed:!t.includeTrashed})})},[]),Ut=(0,D.useCallback)(()=>{ye(e=>{let t=se(e);return k({...t,includeAgentActions:!t.includeAgentActions})})},[]),Wt=(0,D.useCallback)(()=>{Je(``),Xe(``),Qe(null),et(null),ot(`hybrid`),ct(0),ut(!1);try{p.current?.unselectAll()}catch{}},[]),Gt=(0,D.useCallback)(()=>{ye(()=>k({kind:`filter`,selectedLabels:[],includeTrashed:!1,includeAgentActions:!1}))},[]),Kt=(0,D.useCallback)(()=>{P(null);try{p.current?.unselectAll()}catch{}ye(e=>{let t=ae(e);return t!==e&&He(`nav-pop`,{depth:t.length-1}),t})},[]),qt=(0,D.useCallback)(()=>{P(null);try{p.current?.unselectAll()}catch{}ye(e=>e.length<=1?e:(He(`nav-home`,{depth:0,popped:e.length-1}),[se(e)]))},[]),Jt=(0,D.useCallback)(()=>{let e=se(ve),t={labels:[...e.selectedLabels].sort(),includeTrashed:e.includeTrashed};Et(!0),r(`/api/admin/graph-default-view`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}).then(async e=>{if(!e.ok){let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));throw Error(t.error??`HTTP ${e.status}`)}vt(t)}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-default-view-save`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}).finally(()=>Et(!1))},[r,ve]),Yt=(0,D.useCallback)(()=>{P(null);try{p.current?.unselectAll()}catch{}ft(e=>e+1),ue(`graph-restore`)},[]),Xt=(0,D.useCallback)(()=>{P(null);try{p.current?.unselectAll()}catch{}ye(e=>[se(e)]),ft(e=>e+1),ue(`graph-trash`)},[]),Zt=(0,D.useCallback)(()=>{ft(e=>e+1),mt(e=>e+1)},[]),Qt=Pt.kind===`neighbourhood`,$t=se(ve),en=$t.selectedLabels,tn=$t.includeTrashed,nn=$t.includeAgentActions,rn=xt.join(`,`),an=Ct.join(`,`),on=en.includes(`AdminConversation`)||en.includes(`PublicConversation`);(0,D.useEffect)(()=>{on&&console.info(`[graph-filter] subfacet-render channel=[${rn}] sublabel=[${an}]`)},[rn,an,on]);let sn=(0,D.useMemo)(()=>{if(tn!==_t.includeTrashed||en.length!==_t.labels.length)return!0;for(let e=0;e<en.length;e++)if(en[e]!==_t.labels[e])return!0;return!1},[tn,en,_t]);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`graph-toolbar`,children:[ve.length>1&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`button`,{type:`button`,className:`graph-home-to-filter graph-home-desktop`,onClick:qt,title:`Clear breadcrumb — return to filter root`,children:[(0,F.jsx)(g,{size:12}),` Home`]}),(0,F.jsx)(`button`,{type:`button`,className:`graph-home-to-filter graph-home-mobile`,onClick:qt,"aria-label":`Home`,title:`Clear breadcrumb — return to filter root`,children:(0,F.jsx)(g,{size:14})}),(0,F.jsx)(`button`,{type:`button`,className:`graph-back-to-filter graph-back-desktop`,onClick:Kt,children:`← Back`}),(0,F.jsx)(`button`,{type:`button`,className:`graph-back-to-filter graph-back-mobile`,onClick:Kt,"aria-label":`Back`,children:(0,F.jsx)(x,{size:16})})]}),(0,F.jsxs)(`div`,{className:`data-search-input graph-search-input`,children:[(0,F.jsx)(_,{size:14}),(0,F.jsx)(`input`,{type:`text`,placeholder:`Search nodes…`,value:qe,onChange:e=>Je(e.target.value),autoComplete:`off`,spellCheck:!1}),Ye&&!Ze&&!$e&&(0,F.jsx)(d,{size:14,className:`spin`}),qe.length>0&&(0,F.jsx)(`button`,{type:`button`,className:`graph-search-clear`,onClick:Wt,"aria-label":`Clear search`,title:`Clear search`,children:(0,F.jsx)(s,{size:14})})]}),Ye&&(0,F.jsxs)(`div`,{className:`graph-search-limit`,title:`Show top ${tt} matches (1-2000)`,children:[(0,F.jsx)(`label`,{htmlFor:`graph-search-limit-input`,className:`graph-search-limit-label`,children:`Top`}),(0,F.jsx)(`button`,{type:`button`,className:`graph-search-limit-step`,onClick:()=>nt(he(tt-1)),disabled:tt<=1,"aria-label":`Decrement search limit`,title:`Decrement`,children:(0,F.jsx)(ee,{size:12})}),(0,F.jsx)(`input`,{id:`graph-search-limit-input`,type:`number`,min:1,max:2e3,step:1,value:tt,onChange:e=>nt(he(e.target.value)),className:`graph-search-limit-number`,"aria-label":`Maximum search results to render`}),(0,F.jsx)(`button`,{type:`button`,className:`graph-search-limit-step`,onClick:()=>nt(he(tt+1)),disabled:tt>=2e3,"aria-label":`Increment search limit`,title:`Increment`,children:(0,F.jsx)(f,{size:12})}),(0,F.jsx)(`input`,{id:`graph-search-limit-slider`,type:`range`,min:1,max:2e3,step:1,value:tt,onChange:e=>nt(he(e.target.value)),"aria-label":`Maximum search results to render (drag for ballpark)`})]}),(0,F.jsx)(`button`,{type:`button`,className:`graph-refresh-button`,onClick:Zt,disabled:xe,"aria-label":`Refresh graph`,title:`Refresh graph`,children:(0,F.jsx)(u,{size:14,className:xe?`spin`:void 0})}),!Qt&&(0,F.jsxs)(`div`,{className:`graph-filter-wrap`,ref:Ot,children:[(0,F.jsxs)(`button`,{type:`button`,className:`graph-filter-toggle${yt?` is-open`:``}${en.length>0||tn||nn?` has-selection`:``}`,onClick:()=>bt(e=>!e),"aria-haspopup":`true`,"aria-expanded":yt,"aria-label":`Filter node types`,children:[(0,F.jsx)(te,{size:14}),(0,F.jsx)(`span`,{children:`Filter`}),en.length>0&&(0,F.jsx)(`span`,{className:`graph-filter-count`,children:en.length})]}),yt&&(0,F.jsxs)(`div`,{className:`graph-filter-popover`,role:`dialog`,"aria-label":`Node type filter`,children:[(0,F.jsxs)(`div`,{className:`graph-filter-popover-header`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`graph-toggle-trashed${tn?` active`:``}`,onClick:Ht,"aria-pressed":tn,title:`Show trashed nodes — restored with Restore button on each node`,children:[(0,F.jsx)(S,{size:14}),` Show trashed`]}),(en.length>0||tn||nn)&&(0,F.jsx)(`button`,{type:`button`,className:`graph-filter-clear`,onClick:Gt,"aria-label":`Clear filter selection`,title:`Clear filter selection`,children:(0,F.jsx)(s,{size:14})})]}),(0,F.jsx)(`div`,{className:`graph-toggle-agent-actions`,title:`Hide ToolCall, StepResult, WorkflowStep, WorkflowRun — agent-execution telemetry. Flip on for audit/debug.`,children:(0,F.jsx)(b,{checked:nn,onChange:Ut,label:`Include agent actions`})}),ht.length===0&&(0,F.jsx)(`p`,{className:`graph-filter-popover-empty`,children:`No node types in your graph yet.`}),(0,F.jsx)(`div`,{className:`graph-filter-rows`,role:`group`,"aria-label":`Node type filter`,children:ht.map(({label:e,nodeCount:t})=>{let n=en.includes(e),r=(0,v.colourForLabel)(e);return(0,F.jsxs)(`button`,{type:`button`,className:`graph-filter-row${n?` active`:``}`,onClick:()=>Vt(e),"aria-pressed":n,children:[(0,F.jsx)(`span`,{className:`graph-filter-row-swatch`,style:{backgroundColor:r}}),(0,F.jsx)(`span`,{className:`graph-filter-row-label`,children:e}),(0,F.jsx)(`span`,{className:`graph-filter-row-count`,children:t})]},e)})}),(en.includes(`AdminConversation`)||en.includes(`PublicConversation`))&&(0,F.jsxs)(`div`,{className:`graph-filter-subfacets`,children:[(0,F.jsxs)(`div`,{className:`graph-filter-subfacet-group`,role:`group`,"aria-label":`Conversation channel`,children:[(0,F.jsx)(`span`,{className:`graph-filter-subfacet-label`,children:`Channel`}),[`webchat`,`whatsapp`].map(e=>{let t=xt.includes(e);return(0,F.jsx)(`button`,{type:`button`,className:`graph-filter-subfacet-chip${t?` active`:``}`,onClick:()=>{St(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},"aria-pressed":t,children:e===`webchat`?`Web`:`WhatsApp`},e)})]}),(0,F.jsxs)(`div`,{className:`graph-filter-subfacet-group`,role:`group`,"aria-label":`Message sublabel`,children:[(0,F.jsx)(`span`,{className:`graph-filter-subfacet-label`,children:`Message`}),[`UserMessage`,`AssistantMessage`,`WhatsAppMessage`].map(e=>{let t=Ct.includes(e);return(0,F.jsx)(`button`,{type:`button`,className:`graph-filter-subfacet-chip${t?` active`:``}`,onClick:()=>{wt(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},"aria-pressed":t,children:e===`UserMessage`?`User`:e===`AssistantMessage`?`Assistant`:`WhatsApp`},e)})]})]}),(0,F.jsx)(`div`,{className:`graph-filter-popover-footer`,children:(0,F.jsx)(`button`,{type:`button`,className:`graph-filter-set-default`,onClick:Jt,disabled:!sn||Tt,children:Tt?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(d,{size:12,className:`spin`}),` Saving…`]}):`Set default view`})})]})]}),(0,F.jsx)(`div`,{className:`graph-meta`,children:M>0&&(0,F.jsxs)(`span`,{className:`graph-meta-count`,children:[M,` node`,M===1?``:`s`]})})]}),ve.length>1&&(0,F.jsx)(Ve,{viewStack:ve}),Ye&&at===`bm25`&&!$e&&(0,F.jsx)(`div`,{className:`graph-error-banner graph-search-degraded`,role:`status`,children:`Vector ranking unavailable — showing keyword-only results.`}),$e&&(0,F.jsxs)(`div`,{className:`data-error graph-error-banner`,children:[`Search unavailable: `,$e]}),Ye&&st>0&&!lt&&!$e&&(0,F.jsxs)(`button`,{type:`button`,className:`graph-search-suppressed`,onClick:()=>ut(!0),children:[st,` low-confidence match`,st===1?``:`es`,` hidden — show all`]}),Ye&&lt&&!$e&&(0,F.jsx)(`button`,{type:`button`,className:`graph-search-suppressed`,onClick:()=>ut(!1),children:`Showing all matches — hide low-confidence`}),Ze&&Ze.length===0&&!$e&&(0,F.jsx)(`div`,{className:`graph-search-status`,children:`No matches in your graph.`}),(0,F.jsxs)(`div`,{className:`graph-canvas-wrap`,children:[xe&&(0,F.jsxs)(`div`,{className:`graph-canvas-overlay`,children:[(0,F.jsx)(d,{size:20,className:`spin`}),` Loading your graph…`]}),Ce&&!xe&&(0,F.jsxs)(`div`,{className:`graph-canvas-overlay graph-canvas-error`,children:[(0,F.jsx)(`p`,{children:Ce}),(0,F.jsx)(`button`,{type:`button`,className:`data-btn`,onClick:()=>{we(null),ft(e=>e+1)},children:`Retry`})]}),A&&!xe&&(0,F.jsxs)(`div`,{className:`graph-canvas-overlay graph-canvas-error`,children:[(0,F.jsxs)(`p`,{children:[`Refine your filter — `,(0,F.jsx)(`strong`,{children:A.matched}),` matches exceed the 2000 cap.`]}),(0,F.jsx)(`p`,{className:`graph-canvas-hint`,children:`Pick a more specific label combination, or narrow your brand's data.`})]}),!xe&&!Ce&&!A&&M===0&&!Qt&&en.length===0&&(0,F.jsxs)(`div`,{className:`graph-canvas-overlay`,children:[(0,F.jsx)(te,{size:20}),(0,F.jsx)(`p`,{children:`Open Filter to pick a node type and see what's in your graph.`})]}),!xe&&!Ce&&!A&&M===0&&!Qt&&en.length>0&&(0,F.jsx)(`div`,{className:`graph-canvas-overlay`,children:(0,F.jsxs)(`p`,{children:[`No `,en.join(`, `),` nodes in your graph yet.`]})}),(0,F.jsx)(`div`,{ref:l,className:`graph-canvas`}),(0,F.jsx)(`div`,{ref:ce,className:`graph-marquee`,"aria-hidden":`true`}),M>0&&(0,F.jsx)(`div`,{ref:ne,className:`graph-trash-drop-zone${Ie?` is-hover`:``}${Ue?` is-error`:``}`,"aria-hidden":`true`,children:(0,F.jsx)(i,{size:18})}),Ge&&(0,F.jsxs)(`div`,{className:`graph-drag-error-banner`,role:`alert`,children:[(0,F.jsx)(`span`,{children:Ge}),(0,F.jsx)(`button`,{type:`button`,className:`graph-drag-error-dismiss`,onClick:()=>Ke(null),"aria-label":`Dismiss`,children:(0,F.jsx)(s,{size:14})})]})]}),N&&(0,F.jsx)(Re,{node:N,edges:C.current,nodesById:y.current,adminFetch:r,onClose:()=>{P(null);try{p.current?.unselectAll()}catch{}},onRestored:Yt,onTrashed:Xt}),M>0&&kt.length>0&&(0,F.jsx)(`div`,{className:`graph-legend`,children:kt.map(e=>(0,F.jsxs)(`div`,{className:`graph-legend-item`,children:[(0,F.jsx)(`span`,{className:`graph-legend-swatch`,style:{backgroundColor:(0,v.colourForLabel)(e)}}),(0,F.jsx)(`span`,{children:e})]},e))})]})}function Re({node:e,edges:t,nodesById:n,adminFetch:r,onClose:a,onRestored:o,onTrashed:c}){let l=Object.entries(e.properties).filter(([,e])=>e!=null),u=t.filter(t=>t.from===e.id||t.to===e.id),[f,p]=(0,D.useState)(!1),[m,h]=(0,D.useState)(null),[g,_]=(0,D.useState)(!1),[v,y]=(0,D.useState)(null);(0,D.useEffect)(()=>{p(!1),h(null),_(!1),y(null)},[e.id]);let b=(0,D.useCallback)(()=>{p(!0),h(null),r(`/api/admin/graph-restore`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e.id})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);o()}).catch(e=>{h(e instanceof Error?e.message:String(e)),p(!1)})},[e.id,o,r]),x=(0,D.useCallback)(()=>{_(!0),y(null),r(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e.id,by:`graph-side-panel-trash`})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);c()}).catch(e=>{y(e instanceof Error?e.message:String(e)),_(!1)})},[e.id,c,r]);return(0,F.jsxs)(`aside`,{className:`graph-side-panel${e.trashed?` graph-side-panel-trashed`:``}`,children:[(0,F.jsxs)(`header`,{className:`graph-side-header`,children:[(0,F.jsx)(`div`,{children:(()=>{if(e.labels.some(e=>ve.has(e))){let t=(0,_e.pickDisplayName)(e),n=e.properties.createdAt,r=typeof n==`string`?n:``,i=r?(0,_e.formatRunTimestamp)(r):null,a=e.labels.join(` · `)+(e.trashed?` · Trashed`:``)+` · ${e.id}`;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`h2`,{className:`graph-side-name`,title:t,children:t}),i&&(0,F.jsx)(`div`,{className:`graph-side-created`,children:i}),(0,F.jsx)(`div`,{className:`graph-side-meta`,children:a})]})}return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`graph-side-labels`,children:[e.labels.join(` · `),e.trashed?` · Trashed`:``]}),(0,F.jsx)(`div`,{className:`graph-side-id`,children:e.id})]})})()}),(0,F.jsx)(`button`,{type:`button`,className:`graph-side-close`,onClick:a,"aria-label":`Close`,children:(0,F.jsx)(s,{size:14})})]}),e.trashed&&(0,F.jsxs)(`dl`,{className:`graph-side-props graph-side-trash-meta`,children:[(0,F.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,F.jsx)(`dt`,{children:`trashedAt`}),(0,F.jsx)(`dd`,{children:We(e.properties.trashedAt)})]}),(0,F.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,F.jsx)(`dt`,{children:`trashedBy`}),(0,F.jsx)(`dd`,{children:We(e.properties.trashedBy)})]})]}),(0,F.jsxs)(`dl`,{className:`graph-side-props`,children:[l.length===0&&(0,F.jsx)(`div`,{className:`graph-side-empty`,children:`No properties.`}),l.map(([e,t])=>(0,F.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,F.jsx)(`dt`,{children:e}),(0,F.jsx)(`dd`,{children:We(t)})]},e))]}),u.length>0&&(0,F.jsxs)(`section`,{className:`graph-side-edges`,children:[(0,F.jsxs)(`h3`,{className:`graph-side-edges-heading`,children:[`Connections (`,u.length,`)`]}),u.map(t=>{let r=t.from===e.id,i=r?t.to:t.from,a=n.get(i),o=a?(0,_e.pickShortLabel)(a):i,s=r?`→`:`←`,c=Object.entries(t.properties??{}).filter(([,e])=>e!=null&&e!==``);return(0,F.jsxs)(`div`,{className:`graph-side-edge`,children:[(0,F.jsxs)(`div`,{className:`graph-side-edge-header`,children:[(0,F.jsx)(`span`,{className:`graph-side-edge-type`,children:t.type}),(0,F.jsx)(`span`,{className:`graph-side-edge-arrow`,children:s}),(0,F.jsx)(`span`,{className:`graph-side-edge-other`,title:o,children:o})]}),c.length>0&&(0,F.jsx)(`dl`,{className:`graph-side-edge-props`,children:c.map(([e,t])=>(0,F.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,F.jsx)(`dt`,{children:e}),(0,F.jsx)(`dd`,{children:We(t)})]},e))})]},t.id)})]}),e.trashed&&(0,F.jsxs)(`footer`,{className:`graph-side-footer`,children:[!f&&!m&&(0,F.jsxs)(`button`,{type:`button`,className:`graph-side-restore`,onClick:b,children:[(0,F.jsx)(C,{size:14}),` Restore`]}),f&&(0,F.jsx)(`div`,{className:`graph-delete-confirm`,children:(0,F.jsxs)(`p`,{children:[(0,F.jsx)(d,{size:14,className:`spin`}),` Restoring…`]})}),m&&(0,F.jsxs)(`div`,{className:`graph-delete-confirm graph-delete-confirm-error`,children:[(0,F.jsxs)(`p`,{children:[`Restore failed: `,m]}),(0,F.jsxs)(`div`,{className:`graph-delete-confirm-buttons`,children:[(0,F.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-cancel`,onClick:()=>{h(null)},children:`Close`}),(0,F.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-do`,onClick:b,children:`Retry`})]})]})]}),!e.trashed&&(0,F.jsxs)(`footer`,{className:`graph-side-footer`,children:[!g&&!v&&(0,F.jsxs)(`button`,{type:`button`,className:`graph-side-trash`,onClick:x,children:[(0,F.jsx)(i,{size:14}),` Trash`]}),g&&(0,F.jsx)(`div`,{className:`graph-delete-confirm`,children:(0,F.jsxs)(`p`,{children:[(0,F.jsx)(d,{size:14,className:`spin`}),` Trashing…`]})}),v&&(0,F.jsxs)(`div`,{className:`graph-delete-confirm graph-delete-confirm-error`,children:[(0,F.jsxs)(`p`,{children:[`Trash failed: `,v]}),(0,F.jsxs)(`div`,{className:`graph-delete-confirm-buttons`,children:[(0,F.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-cancel`,onClick:()=>{y(null)},children:`Close`}),(0,F.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-do`,onClick:x,children:`Retry`})]})]})]})]})}function ze(e,t){let n=`/api/admin/graph-subgraph`,r=t.includeAgentActions?`&includeAgentActions=1`:``;if(e.kind===`neighbourhood`){let i=t.search&&t.search.q?`&q=${encodeURIComponent(t.search.q)}&limit=${t.search.limit}`:``;return`${n}?mode=neighbourhood&elementId=${encodeURIComponent(e.rootElementId)}${r}${i}`}return`${n}?mode=default&labels=${encodeURIComponent(e.selectedLabels.join(`,`))}${e.includeTrashed?`&includeTrashed=1`:``}${r}${t.channel&&t.channel.length>0?`&channel=${encodeURIComponent(t.channel.join(`,`))}`:``}${t.messageSublabel&&t.messageSublabel.length>0?`&messageSublabel=${encodeURIComponent(t.messageSublabel.join(`,`))}`:``}`}var Be=class extends Error{body;constructor(e){super(e.error),this.body=e}};function Ve({viewStack:e}){let t=e.map(e=>e.kind===`filter`?`Filter`:e.rootLabel??`Node`);return(0,F.jsx)(`div`,{className:`graph-breadcrumb`,role:`navigation`,"aria-label":`Graph navigation breadcrumb`,children:t.map((e,n)=>(0,F.jsxs)(`span`,{className:`graph-breadcrumb-item`,children:[n>0&&(0,F.jsx)(`span`,{className:`graph-breadcrumb-separator`,"aria-hidden":`true`,children:`›`}),(0,F.jsx)(`span`,{className:`graph-breadcrumb-label${n===t.length-1?` is-current`:``}`,children:e})]},n))})}function He(e,t){let n=`[graph-page] ${e} ${Object.entries(t).map(([e,t])=>`${e}=${String(t)}`).join(` `)}`;try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-nav`,msg:n}),keepalive:!0}).catch(()=>{})}catch{}}function Ue(e){let t=t=>{let n=e[t];if(n&&typeof n==`object`&&`low`in n){let e=n.low;return typeof e==`number`?e:null}return null},n=t(`year`),r=t(`month`),i=t(`day`);if(n===null||r===null||i===null)return null;let a=`${String(n).padStart(4,`0`)}-${String(r).padStart(2,`0`)}-${String(i).padStart(2,`0`)}`;if(!(`hour`in e))return a;let o=t(`hour`),s=t(`minute`),c=t(`second`);return o===null||s===null||c===null?a:`${a} ${String(o).padStart(2,`0`)}:${String(s).padStart(2,`0`)}:${String(c).padStart(2,`0`)}`}function We(e){if(e==null)return``;if(Array.isArray(e))return e.length>8?`[${e.length} items]`:e.map(String).join(`, `);if(typeof e==`object`){if(`year`in e&&`month`in e&&`day`in e&&typeof e.year==`object`){let t=Ue(e);if(t)return t}return JSON.stringify(e)}return String(e)}(0,E.createRoot)(document.getElementById(`root`)).render((0,F.jsx)(Ie,{}));
@@ -1 +1 @@
1
- import{t as e}from"./chunk-CWOGyPgy.js";import{r as t}from"./jsx-runtime-5auA0FEj.js";var n=t(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),r=t(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),i=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ALL_GRAPH_LABELS=e.FALLBACK_LABEL_COLOUR=e.GRAPH_LABEL_COLOURS=void 0,e.pickDisplayLabel=t,e.colourForLabel=n,e.resolveNodeColour=r,e.formatRunTimestamp=o,e.formatMessageTimestamp=s,e.pickShortLabel=c,e.pickDisplayName=l,e.GRAPH_LABEL_COLOURS={LocalBusiness:`#4F6B8A`,Service:`#6B85A0`,PriceSpecification:`#8AA0B8`,OpeningHoursSpecification:`#A8BACE`,Listing:`#3F5670`,Property:`#5C7A99`,Viewing:`#D4A574`,Offer:`#B08850`,Job:`#8C3B2E`,QuoteDocument:`#A65A4A`,InboundInvoice:`#6B2A20`,SubContractor:`#BF7E6E`,SubInvoice:`#52201A`,WhatsAppGroup:`#D4A096`,Organization:`#8A6B47`,Person:`#B86E4A`,UserProfile:`#D08960`,Preference:`#DFA67A`,AdminUser:`#8C5230`,AccessGrant:`#66381F`,KnowledgeDocument:`#6E8A5A`,ConversationArchive:`#4F6B3E`,Section:`#8AA876`,Chunk:`#A6C194`,DigitalDocument:`#5A7548`,CreativeWork:`#B5C9A2`,Question:`#C7D6B5`,FAQPage:`#95B385`,DefinedTerm:`#76906A`,Review:`#3F5A2E`,ImageObject:`#A0BB8C`,Conversation:`#6B5A85`,AdminConversation:`#4F4070`,PublicConversation:`#8A75A8`,Message:`#6B7280`,UserMessage:`#DFA67A`,AssistantMessage:`#C9A876`,ToolCall:`#B5ABCB`,Task:`#B0617A`,Project:`#8E4A60`,Event:`#C68095`,Workflow:`#3A6F77`,WorkflowStep:`#5A8E96`,WorkflowRun:`#7AAAB2`,StepResult:`#9CC4CB`,Email:`#6F7F4A`,EmailAccount:`#91A063`,Agent:`#B8893D`},e.FALLBACK_LABEL_COLOUR=`#94A3B8`,e.ALL_GRAPH_LABELS=Object.freeze(Object.keys(e.GRAPH_LABEL_COLOURS));function t(t){for(let n=1;n<t.length;n++)if(Object.prototype.hasOwnProperty.call(e.GRAPH_LABEL_COLOURS,t[n]))return t[n];return t[0]??null}function n(t){return e.GRAPH_LABEL_COLOURS[t]??e.FALLBACK_LABEL_COLOUR}function r(r){let i=t(r),a=i?n(i):e.FALLBACK_LABEL_COLOUR,o=0;for(let t=1;t<r.length;t++)Object.prototype.hasOwnProperty.call(e.GRAPH_LABEL_COLOURS,r[t])&&o++;return{displayLabel:i,colour:a,driftCandidates:o}}var i=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})/,a=/^\d{4}-\d{2}-\d{2}T(\d{2}:\d{2}:\d{2})/;function o(e){let t=e.match(i);return t?`${t[1]} ${t[2]}`:null}function s(e){let t=e.match(a);return t?t[1]:null}function c(e){let t=e.properties,n=e.labels[0];if(n===`ToolCall`){let e=t.toolName;if(typeof e==`string`&&e.length>0)return e.length>24?e.slice(0,24)+`…`:e}else if(n===`WorkflowRun`){let e=t.startedAt;if(typeof e==`string`&&e.length>0){let t=o(e);if(t)return t}}else if(n===`WorkflowStep`){let e=t.label;if(typeof e==`string`&&e.length>0)return e.length>24?e.slice(0,24)+`…`:e}else if(n===`Person`){let e=[typeof t.givenName==`string`?t.givenName:``,typeof t.familyName==`string`?t.familyName:``].filter(e=>e.length>0).join(` `);if(e.length>0)return e.length>24?e.slice(0,24)+`…`:e}else if(n===`Agent`){let e=typeof t.displayName==`string`?t.displayName:``,n=typeof t.slug==`string`?t.slug:``,r=e.length>0?e:n;if(r.length>0)return r.length>24?r.slice(0,24)+`…`:r}else if(n===`Message`){let e=typeof t.role==`string`?t.role:``,n=e===`user`?`user`:e===`assistant`?`asst`:e===`system`?`sys`:e===`tool`?`tool`:null,r=typeof t.createdAt==`string`?t.createdAt:``;if(n&&r){let e=s(r);if(e)return`${n} ${e}`}}for(let e of[`name`,`title`,`summary`,`givenName`,`subject`,`text`]){let n=t[e];if(typeof n==`string`&&n.length>0)return n.length>24?n.slice(0,24)+`…`:n}if(n===`Conversation`){let e=typeof t.sessionId==`string`?t.sessionId:null;if(e)return`Conv ${e.slice(0,8)}`}return n??`…`}function l(e){let t=e.properties,n=e.labels[0];if(n===`ToolCall`){let e=t.toolName;if(typeof e==`string`&&e.length>0)return e}else if(n===`WorkflowRun`){let e=t.startedAt;if(typeof e==`string`&&e.length>0){let t=o(e);if(t)return t}}else if(n===`WorkflowStep`){let e=t.label;if(typeof e==`string`&&e.length>0)return e}else if(n===`Person`){let e=[typeof t.givenName==`string`?t.givenName:``,typeof t.familyName==`string`?t.familyName:``].filter(e=>e.length>0).join(` `);if(e.length>0)return e}else if(n===`Agent`){let e=typeof t.displayName==`string`?t.displayName:``,n=typeof t.slug==`string`?t.slug:``,r=e.length>0?e:n;if(r.length>0)return r}for(let e of[`name`,`title`,`summary`,`givenName`,`subject`,`text`]){let n=t[e];if(typeof n==`string`&&n.length>0)return n}if(n===`Conversation`){let e=typeof t.sessionId==`string`?t.sessionId:null;if(e)return`Conv ${e.slice(0,8)}`}return n??`…`}})),a=i();Object.freeze(new Set([`Chunk`,`GraphPreference`]));var o=Object.freeze(new Set(`LocalBusiness.Service.PriceSpecification.OpeningHoursSpecification.Organization.Person.UserProfile.Preference.AdminUser.AccessGrant.KnowledgeDocument.DigitalDocument.CreativeWork.Question.FAQPage.DefinedTerm.Review.ImageObject.Listing.Property.Viewing.Offer.Job.QuoteDocument.InboundInvoice.SubContractor.SubInvoice.WhatsAppGroup.AdminConversation.PublicConversation.Task.Project.Event.Workflow.Email.EmailAccount.Agent`.split(`.`)));Object.freeze(new Set([`ToolCall`,`StepResult`,`WorkflowStep`,`WorkflowRun`])),Object.freeze(new Set([`HAS_TOOL_CALL`,`RUN_OF`,`HAS_STEP`,`HAS_RESULT`]));export{n as a,r as i,a as n,i as r,o as t};
1
+ import{t as e}from"./chunk-CWOGyPgy.js";import{r as t}from"./jsx-runtime-UQ0Z6nwN.js";var n=t(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),r=t(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),i=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ALL_GRAPH_LABELS=e.FALLBACK_LABEL_COLOUR=e.GRAPH_LABEL_COLOURS=void 0,e.pickDisplayLabel=t,e.colourForLabel=n,e.resolveNodeColour=r,e.formatRunTimestamp=o,e.formatMessageTimestamp=s,e.pickShortLabel=c,e.pickDisplayName=l,e.GRAPH_LABEL_COLOURS={LocalBusiness:`#4F6B8A`,Service:`#6B85A0`,PriceSpecification:`#8AA0B8`,OpeningHoursSpecification:`#A8BACE`,Listing:`#3F5670`,Property:`#5C7A99`,Viewing:`#D4A574`,Offer:`#B08850`,Job:`#8C3B2E`,QuoteDocument:`#A65A4A`,InboundInvoice:`#6B2A20`,SubContractor:`#BF7E6E`,SubInvoice:`#52201A`,WhatsAppGroup:`#D4A096`,Organization:`#8A6B47`,Person:`#B86E4A`,UserProfile:`#D08960`,Preference:`#DFA67A`,AdminUser:`#8C5230`,AccessGrant:`#66381F`,KnowledgeDocument:`#6E8A5A`,ConversationArchive:`#4F6B3E`,Section:`#8AA876`,Chunk:`#A6C194`,DigitalDocument:`#5A7548`,CreativeWork:`#B5C9A2`,Question:`#C7D6B5`,FAQPage:`#95B385`,DefinedTerm:`#76906A`,Review:`#3F5A2E`,ImageObject:`#A0BB8C`,Conversation:`#6B5A85`,AdminConversation:`#4F4070`,PublicConversation:`#8A75A8`,Message:`#6B7280`,UserMessage:`#DFA67A`,AssistantMessage:`#C9A876`,ToolCall:`#B5ABCB`,Task:`#B0617A`,Project:`#8E4A60`,Event:`#C68095`,Workflow:`#3A6F77`,WorkflowStep:`#5A8E96`,WorkflowRun:`#7AAAB2`,StepResult:`#9CC4CB`,Email:`#6F7F4A`,EmailAccount:`#91A063`,Agent:`#B8893D`},e.FALLBACK_LABEL_COLOUR=`#94A3B8`,e.ALL_GRAPH_LABELS=Object.freeze(Object.keys(e.GRAPH_LABEL_COLOURS));function t(t){for(let n=1;n<t.length;n++)if(Object.prototype.hasOwnProperty.call(e.GRAPH_LABEL_COLOURS,t[n]))return t[n];return t[0]??null}function n(t){return e.GRAPH_LABEL_COLOURS[t]??e.FALLBACK_LABEL_COLOUR}function r(r){let i=t(r),a=i?n(i):e.FALLBACK_LABEL_COLOUR,o=0;for(let t=1;t<r.length;t++)Object.prototype.hasOwnProperty.call(e.GRAPH_LABEL_COLOURS,r[t])&&o++;return{displayLabel:i,colour:a,driftCandidates:o}}var i=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})/,a=/^\d{4}-\d{2}-\d{2}T(\d{2}:\d{2}:\d{2})/;function o(e){let t=e.match(i);return t?`${t[1]} ${t[2]}`:null}function s(e){let t=e.match(a);return t?t[1]:null}function c(e){let t=e.properties,n=e.labels[0];if(n===`ToolCall`){let e=t.toolName;if(typeof e==`string`&&e.length>0)return e.length>24?e.slice(0,24)+`…`:e}else if(n===`WorkflowRun`){let e=t.startedAt;if(typeof e==`string`&&e.length>0){let t=o(e);if(t)return t}}else if(n===`WorkflowStep`){let e=t.label;if(typeof e==`string`&&e.length>0)return e.length>24?e.slice(0,24)+`…`:e}else if(n===`Person`){let e=[typeof t.givenName==`string`?t.givenName:``,typeof t.familyName==`string`?t.familyName:``].filter(e=>e.length>0).join(` `);if(e.length>0)return e.length>24?e.slice(0,24)+`…`:e}else if(n===`Agent`){let e=typeof t.displayName==`string`?t.displayName:``,n=typeof t.slug==`string`?t.slug:``,r=e.length>0?e:n;if(r.length>0)return r.length>24?r.slice(0,24)+`…`:r}else if(n===`Message`){let e=typeof t.role==`string`?t.role:``,n=e===`user`?`user`:e===`assistant`?`asst`:e===`system`?`sys`:e===`tool`?`tool`:null,r=typeof t.createdAt==`string`?t.createdAt:``;if(n&&r){let e=s(r);if(e)return`${n} ${e}`}}for(let e of[`name`,`title`,`summary`,`givenName`,`subject`,`text`]){let n=t[e];if(typeof n==`string`&&n.length>0)return n.length>24?n.slice(0,24)+`…`:n}if(n===`Conversation`){let e=typeof t.sessionId==`string`?t.sessionId:null;if(e)return`Conv ${e.slice(0,8)}`}return n??`…`}function l(e){let t=e.properties,n=e.labels[0];if(n===`ToolCall`){let e=t.toolName;if(typeof e==`string`&&e.length>0)return e}else if(n===`WorkflowRun`){let e=t.startedAt;if(typeof e==`string`&&e.length>0){let t=o(e);if(t)return t}}else if(n===`WorkflowStep`){let e=t.label;if(typeof e==`string`&&e.length>0)return e}else if(n===`Person`){let e=[typeof t.givenName==`string`?t.givenName:``,typeof t.familyName==`string`?t.familyName:``].filter(e=>e.length>0).join(` `);if(e.length>0)return e}else if(n===`Agent`){let e=typeof t.displayName==`string`?t.displayName:``,n=typeof t.slug==`string`?t.slug:``,r=e.length>0?e:n;if(r.length>0)return r}for(let e of[`name`,`title`,`summary`,`givenName`,`subject`,`text`]){let n=t[e];if(typeof n==`string`&&n.length>0)return n}if(n===`Conversation`){let e=typeof t.sessionId==`string`?t.sessionId:null;if(e)return`Conv ${e.slice(0,8)}`}return n??`…`}})),a=i();Object.freeze(new Set([`Chunk`,`GraphPreference`]));var o=Object.freeze(new Set(`LocalBusiness.Service.PriceSpecification.OpeningHoursSpecification.Organization.Person.UserProfile.Preference.AdminUser.AccessGrant.KnowledgeDocument.DigitalDocument.CreativeWork.Question.FAQPage.DefinedTerm.Review.ImageObject.Listing.Property.Viewing.Offer.Job.QuoteDocument.InboundInvoice.SubContractor.SubInvoice.WhatsAppGroup.AdminConversation.PublicConversation.Task.Project.Event.Workflow.Email.EmailAccount.Agent`.split(`.`)));Object.freeze(new Set([`ToolCall`,`StepResult`,`WorkflowStep`,`WorkflowRun`])),Object.freeze(new Set([`HAS_TOOL_CALL`,`RUN_OF`,`HAS_STEP`,`HAS_RESULT`]));export{n as a,r as i,a as n,i as r,o as t};
@@ -1 +1 @@
1
- import{C as e,E as t,S as n,T as r,a as i,b as a,c as o,i as s,n as c,s as l,t as u,w as d,x as f}from"./reduce-B0wq8DtH.js";import{C as p,E as m,g as ee,h,l as g,p as te,u as _,v,w as ne}from"./_baseFor-BV-TyLWt.js";import{n as y,t as b}from"./isEmpty-Bn-Se8yT.js";import{A as re,C as x,D as S,E as ie,M as ae,O as oe,T as se,j as C,k as ce,w,x as T,y as le}from"./chunk-5PVQY5BW-DPhkkS4p.js";function ue(e,t){return e&&w(t,f(t),e)}function de(e,t){return e&&w(t,x(t),e)}function fe(e,t){return w(e,n(e),t)}var E=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,n(e)),e=oe(e);return t}:e;function pe(e,t){return w(e,E(e),t)}function me(e){return d(e,x,E)}var he=Object.prototype.hasOwnProperty;function ge(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&he.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function _e(e,t){var n=t?C(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var D=/\w*$/;function O(e){var t=new e.constructor(e.source,D.exec(e));return t.lastIndex=e.lastIndex,t}var k=m?m.prototype:void 0,A=k?k.valueOf:void 0;function j(e){return A?Object(A.call(e)):{}}var M=`[object Boolean]`,N=`[object Date]`,P=`[object Map]`,F=`[object Number]`,I=`[object RegExp]`,ve=`[object Set]`,ye=`[object String]`,be=`[object Symbol]`,xe=`[object ArrayBuffer]`,Se=`[object DataView]`,Ce=`[object Float32Array]`,we=`[object Float64Array]`,Te=`[object Int8Array]`,Ee=`[object Int16Array]`,De=`[object Int32Array]`,Oe=`[object Uint8Array]`,ke=`[object Uint8ClampedArray]`,Ae=`[object Uint16Array]`,je=`[object Uint32Array]`;function Me(e,t,n){var r=e.constructor;switch(t){case xe:return C(e);case M:case N:return new r(+e);case Se:return _e(e,n);case Ce:case we:case Te:case Ee:case De:case Oe:case ke:case Ae:case je:return re(e,n);case P:return new r;case F:case ye:return new r(e);case I:return O(e);case ve:return new r;case be:return j(e)}}var Ne=`[object Map]`;function Pe(e){return h(e)&&y(e)==Ne}var L=g&&g.isMap,Fe=L?_(L):Pe,Ie=`[object Set]`;function Le(e){return h(e)&&y(e)==Ie}var R=g&&g.isSet,Re=R?_(R):Le,ze=1,Be=2,Ve=4,z=`[object Arguments]`,He=`[object Array]`,Ue=`[object Boolean]`,We=`[object Date]`,Ge=`[object Error]`,B=`[object Function]`,Ke=`[object GeneratorFunction]`,qe=`[object Map]`,Je=`[object Number]`,V=`[object Object]`,Ye=`[object RegExp]`,Xe=`[object Set]`,Ze=`[object String]`,Qe=`[object Symbol]`,$e=`[object WeakMap]`,et=`[object ArrayBuffer]`,tt=`[object DataView]`,nt=`[object Float32Array]`,rt=`[object Float64Array]`,it=`[object Int8Array]`,at=`[object Int16Array]`,ot=`[object Int32Array]`,st=`[object Uint8Array]`,ct=`[object Uint8ClampedArray]`,lt=`[object Uint16Array]`,ut=`[object Uint32Array]`,H={};H[z]=H[He]=H[et]=H[tt]=H[Ue]=H[We]=H[nt]=H[rt]=H[it]=H[at]=H[ot]=H[qe]=H[Je]=H[V]=H[Ye]=H[Xe]=H[Ze]=H[Qe]=H[st]=H[ct]=H[lt]=H[ut]=!0,H[Ge]=H[B]=H[$e]=!1;function U(e,t,n,r,i,o){var c,l=t&ze,u=t&Be,d=t&Ve;if(n&&(c=i?n(e,r,i,o):n(e)),c!==void 0)return c;if(!ne(e))return e;var p=ee(e);if(p){if(c=ge(e),!l)return ce(e,c)}else{var m=y(e),h=m==B||m==Ke;if(te(e))return ae(e,l);if(m==V||m==z||h&&!i){if(c=u||h?{}:S(e),!l)return u?pe(e,de(c,e)):fe(e,ue(c,e))}else{if(!H[m])return i?e:{};c=Me(e,m,l)}}o||=new v;var g=o.get(e);if(g)return g;o.set(e,c),Re(e)?e.forEach(function(r){c.add(U(r,t,n,r,e,o))}):Fe(e)&&e.forEach(function(r,i){c.set(i,U(r,t,n,i,e,o))});var _=p?void 0:(d?u?me:a:u?x:f)(e);return s(_||e,function(r,i){_&&(i=r,r=e[i]),se(c,i,U(r,t,n,i,e,o))}),c}function W(e,n){return t(n,function(t){return e[t]})}function G(e){return e==null?[]:W(e,f(e))}function K(e){return e===void 0}var dt=le(function(e){return i(l(e,1,ie,!0))}),ft=`\0`,q=`\0`,J=``,Y=class{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,`directed`)?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=T(void 0),this._defaultEdgeLabelFn=T(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[q]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return p(e)||(e=T(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return f(this._nodes)}sources(){var e=this;return o(this.nodes(),function(t){return b(e._in[t])})}sinks(){var e=this;return o(this.nodes(),function(t){return b(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return c(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=q,this._children[e]={},this._children[q][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],c(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),c(f(this._in[e]),t),delete this._in[e],delete this._preds[e],c(f(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(K(t))t=q;else{t+=``;for(var n=t;!K(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==q)return t}}children(e){if(K(e)&&(e=q),this._isCompound){var t=this._children[e];if(t)return f(t)}else if(e===q)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return f(t)}successors(e){var t=this._sucs[e];if(t)return f(t)}neighbors(e){var t=this.predecessors(e);if(t)return dt(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;c(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),c(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&c(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(e){return p(e)||(e=T(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return G(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return u(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,K(n)||(n=``+n);var o=Q(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!K(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=pt(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,X(this._preds[t],e),X(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?$(this._isDirected,arguments[0]):Q(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?$(this._isDirected,arguments[0]):Q(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?$(this._isDirected,arguments[0]):Q(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],Z(this._preds[t],e),Z(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=G(n);return t?o(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=G(n);return t?o(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};Y.prototype._nodeCount=0,Y.prototype._edgeCount=0;function X(e,t){e[t]?e[t]++:e[t]=1}function Z(e,t){--e[t]||delete e[t]}function Q(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+J+a+J+(K(r)?ft:r)}function pt(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function $(e,t){return Q(e,t.v,t.w,t.name)}export{U as i,K as n,G as r,Y as t};
1
+ import{C as e,E as t,S as n,T as r,a as i,b as a,c as o,i as s,n as c,s as l,t as u,w as d,x as f}from"./reduce-B0wq8DtH.js";import{C as p,E as m,g as ee,h,l as g,p as te,u as _,v,w as ne}from"./_baseFor-BV-TyLWt.js";import{n as y,t as b}from"./isEmpty-Bn-Se8yT.js";import{A as re,C as x,D as S,E as ie,M as ae,O as oe,T as se,j as C,k as ce,w,x as T,y as le}from"./chunk-5PVQY5BW-CKX_LIok.js";function ue(e,t){return e&&w(t,f(t),e)}function de(e,t){return e&&w(t,x(t),e)}function fe(e,t){return w(e,n(e),t)}var E=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,n(e)),e=oe(e);return t}:e;function pe(e,t){return w(e,E(e),t)}function me(e){return d(e,x,E)}var he=Object.prototype.hasOwnProperty;function ge(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&he.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function _e(e,t){var n=t?C(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var D=/\w*$/;function O(e){var t=new e.constructor(e.source,D.exec(e));return t.lastIndex=e.lastIndex,t}var k=m?m.prototype:void 0,A=k?k.valueOf:void 0;function j(e){return A?Object(A.call(e)):{}}var M=`[object Boolean]`,N=`[object Date]`,P=`[object Map]`,F=`[object Number]`,I=`[object RegExp]`,ve=`[object Set]`,ye=`[object String]`,be=`[object Symbol]`,xe=`[object ArrayBuffer]`,Se=`[object DataView]`,Ce=`[object Float32Array]`,we=`[object Float64Array]`,Te=`[object Int8Array]`,Ee=`[object Int16Array]`,De=`[object Int32Array]`,Oe=`[object Uint8Array]`,ke=`[object Uint8ClampedArray]`,Ae=`[object Uint16Array]`,je=`[object Uint32Array]`;function Me(e,t,n){var r=e.constructor;switch(t){case xe:return C(e);case M:case N:return new r(+e);case Se:return _e(e,n);case Ce:case we:case Te:case Ee:case De:case Oe:case ke:case Ae:case je:return re(e,n);case P:return new r;case F:case ye:return new r(e);case I:return O(e);case ve:return new r;case be:return j(e)}}var Ne=`[object Map]`;function Pe(e){return h(e)&&y(e)==Ne}var L=g&&g.isMap,Fe=L?_(L):Pe,Ie=`[object Set]`;function Le(e){return h(e)&&y(e)==Ie}var R=g&&g.isSet,Re=R?_(R):Le,ze=1,Be=2,Ve=4,z=`[object Arguments]`,He=`[object Array]`,Ue=`[object Boolean]`,We=`[object Date]`,Ge=`[object Error]`,B=`[object Function]`,Ke=`[object GeneratorFunction]`,qe=`[object Map]`,Je=`[object Number]`,V=`[object Object]`,Ye=`[object RegExp]`,Xe=`[object Set]`,Ze=`[object String]`,Qe=`[object Symbol]`,$e=`[object WeakMap]`,et=`[object ArrayBuffer]`,tt=`[object DataView]`,nt=`[object Float32Array]`,rt=`[object Float64Array]`,it=`[object Int8Array]`,at=`[object Int16Array]`,ot=`[object Int32Array]`,st=`[object Uint8Array]`,ct=`[object Uint8ClampedArray]`,lt=`[object Uint16Array]`,ut=`[object Uint32Array]`,H={};H[z]=H[He]=H[et]=H[tt]=H[Ue]=H[We]=H[nt]=H[rt]=H[it]=H[at]=H[ot]=H[qe]=H[Je]=H[V]=H[Ye]=H[Xe]=H[Ze]=H[Qe]=H[st]=H[ct]=H[lt]=H[ut]=!0,H[Ge]=H[B]=H[$e]=!1;function U(e,t,n,r,i,o){var c,l=t&ze,u=t&Be,d=t&Ve;if(n&&(c=i?n(e,r,i,o):n(e)),c!==void 0)return c;if(!ne(e))return e;var p=ee(e);if(p){if(c=ge(e),!l)return ce(e,c)}else{var m=y(e),h=m==B||m==Ke;if(te(e))return ae(e,l);if(m==V||m==z||h&&!i){if(c=u||h?{}:S(e),!l)return u?pe(e,de(c,e)):fe(e,ue(c,e))}else{if(!H[m])return i?e:{};c=Me(e,m,l)}}o||=new v;var g=o.get(e);if(g)return g;o.set(e,c),Re(e)?e.forEach(function(r){c.add(U(r,t,n,r,e,o))}):Fe(e)&&e.forEach(function(r,i){c.set(i,U(r,t,n,i,e,o))});var _=p?void 0:(d?u?me:a:u?x:f)(e);return s(_||e,function(r,i){_&&(i=r,r=e[i]),se(c,i,U(r,t,n,i,e,o))}),c}function W(e,n){return t(n,function(t){return e[t]})}function G(e){return e==null?[]:W(e,f(e))}function K(e){return e===void 0}var dt=le(function(e){return i(l(e,1,ie,!0))}),ft=`\0`,q=`\0`,J=``,Y=class{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,`directed`)?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=T(void 0),this._defaultEdgeLabelFn=T(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[q]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return p(e)||(e=T(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return f(this._nodes)}sources(){var e=this;return o(this.nodes(),function(t){return b(e._in[t])})}sinks(){var e=this;return o(this.nodes(),function(t){return b(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return c(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=q,this._children[e]={},this._children[q][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],c(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),c(f(this._in[e]),t),delete this._in[e],delete this._preds[e],c(f(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(K(t))t=q;else{t+=``;for(var n=t;!K(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==q)return t}}children(e){if(K(e)&&(e=q),this._isCompound){var t=this._children[e];if(t)return f(t)}else if(e===q)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return f(t)}successors(e){var t=this._sucs[e];if(t)return f(t)}neighbors(e){var t=this.predecessors(e);if(t)return dt(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;c(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),c(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&c(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(e){return p(e)||(e=T(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return G(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return u(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,K(n)||(n=``+n);var o=Q(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!K(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=pt(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,X(this._preds[t],e),X(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?$(this._isDirected,arguments[0]):Q(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?$(this._isDirected,arguments[0]):Q(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?$(this._isDirected,arguments[0]):Q(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],Z(this._preds[t],e),Z(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=G(n);return t?o(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=G(n);return t?o(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};Y.prototype._nodeCount=0,Y.prototype._edgeCount=0;function X(e,t){e[t]?e[t]++:e[t]=1}function Z(e,t){--e[t]||delete e[t]}function Q(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+J+a+J+(K(r)?ft:r)}function pt(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function $(e,t){return Q(e,t.v,t.w,t.name)}export{U as i,K as n,G as r,Y as t};
@@ -1,2 +1,2 @@
1
- import"./chunk-K5T4RW27-CTZnA5fq.js";import"./chunk-7N4EOEYR-BDpzHOmv.js";import"./chunk-67CJDMHE-Ca9KwdQm.js";import"./chunk-KGLVRYIC-CeuKp7uR.js";import"./chunk-FOC6F5B3-565zaYb3.js";import"./chunk-AA7GKIK3-DXo9fZho.js";import"./chunk-2KRD3SAO-BYqpHDvA.js";import"./chunk-ORNJ4GCN-DcZUCmgM.js";import"./chunk-LIHQZDEY-DXkzlh3_.js";import"./chunk-CIAEETIT-NufEId2j.js";import{g as e,h as t}from"./src-CozP7LCe.js";import{c as n}from"./chunk-ICPOFSXX-DvYSWH7x.js";import{t as r}from"./chunk-426QAEUC-BNINkVsL.js";import{t as i}from"./mermaid-parser.core-DYdFZnXH.js";var a={parse:t(async t=>{let n=await i(`info`,t);e.debug(n)},`parse`)},o={version:`11.14.0`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((t,i,a)=>{e.debug(`rendering info diagram
1
+ import"./chunk-K5T4RW27-CTZnA5fq.js";import"./chunk-7N4EOEYR-BDpzHOmv.js";import"./chunk-67CJDMHE-Ca9KwdQm.js";import"./chunk-KGLVRYIC-CeuKp7uR.js";import"./chunk-FOC6F5B3-565zaYb3.js";import"./chunk-AA7GKIK3-DXo9fZho.js";import"./chunk-2KRD3SAO-BYqpHDvA.js";import"./chunk-ORNJ4GCN-DcZUCmgM.js";import"./chunk-LIHQZDEY-DXkzlh3_.js";import"./chunk-CIAEETIT-NufEId2j.js";import{g as e,h as t}from"./src-CozP7LCe.js";import{c as n}from"./chunk-ICPOFSXX-cYdq7RKF.js";import{t as r}from"./chunk-426QAEUC-BCmWl6vi.js";import{t as i}from"./mermaid-parser.core-BFAF0BAk.js";var a={parse:t(async t=>{let n=await i(`info`,t);e.debug(n)},`parse`)},o={version:`11.14.0`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((t,i,a)=>{e.debug(`rendering info diagram
2
2
  `+t);let o=r(i);n(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram};
@@ -1,4 +1,4 @@
1
- import{h as e}from"./src-CozP7LCe.js";import{B as t,C as n,V as r,W as i,_ as a,a as o,b as s,c,s as l,v as u}from"./chunk-ICPOFSXX-DvYSWH7x.js";import"./dist-Pgmncqde.js";import{f as d}from"./chunk-5PVQY5BW-DPhkkS4p.js";import{t as f}from"./chunk-426QAEUC-BNINkVsL.js";import{t as p}from"./rough.esm-VLpapkIG.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{h as e}from"./src-CozP7LCe.js";import{B as t,C as n,V as r,W as i,_ as a,a as o,b as s,c,s as l,v as u}from"./chunk-ICPOFSXX-cYdq7RKF.js";import"./dist-Pgmncqde.js";import{f as d}from"./chunk-5PVQY5BW-CKX_LIok.js";import{t as f}from"./chunk-426QAEUC-BCmWl6vi.js";import{t as p}from"./rough.esm-VLpapkIG.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`