@scalar/agent-chat 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/LICENSE +21 -0
  2. package/dist/App.vue.d.ts +3 -2
  3. package/dist/App.vue.d.ts.map +1 -1
  4. package/dist/App.vue.js +32 -0
  5. package/dist/App.vue2.js +4 -0
  6. package/dist/Chat.vue.d.ts.map +1 -1
  7. package/dist/Chat.vue.js +23 -0
  8. package/dist/Chat.vue2.js +4 -0
  9. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  10. package/dist/api.d.ts +50 -0
  11. package/dist/api.d.ts.map +1 -0
  12. package/dist/api.js +68 -0
  13. package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
  14. package/dist/components/ApprovalSection.vue.js +7 -0
  15. package/dist/components/ApprovalSection.vue2.js +42 -0
  16. package/dist/components/AuthenticationProvided.vue.d.ts +3 -0
  17. package/dist/components/AuthenticationProvided.vue.d.ts.map +1 -0
  18. package/dist/components/AuthenticationProvided.vue.js +13 -0
  19. package/dist/components/AuthenticationRequired.vue.d.ts +3 -0
  20. package/dist/components/AuthenticationRequired.vue.d.ts.map +1 -0
  21. package/dist/components/AuthenticationRequired.vue.js +13 -0
  22. package/dist/components/AutosendPaused.vue.d.ts.map +1 -1
  23. package/dist/components/AutosendPaused.vue.js +13 -0
  24. package/dist/components/ContextItem.vue.d.ts.map +1 -1
  25. package/dist/components/ContextItem.vue.js +7 -0
  26. package/dist/components/ContextItem.vue2.js +19 -0
  27. package/dist/components/ErrorMessage.vue.d.ts +2 -1
  28. package/dist/components/ErrorMessage.vue.d.ts.map +1 -1
  29. package/dist/components/ErrorMessage.vue.js +7 -0
  30. package/dist/components/ErrorMessage.vue2.js +22 -0
  31. package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts.map +1 -1
  32. package/dist/components/LoadingMiniOpenAPIDoc.vue.js +14 -0
  33. package/dist/components/LoadingOpenAPISpecsSummary.vue.d.ts.map +1 -1
  34. package/dist/components/LoadingOpenAPISpecsSummary.vue.js +14 -0
  35. package/dist/components/Logo.vue.d.ts.map +1 -1
  36. package/dist/components/Logo.vue.js +23 -0
  37. package/dist/components/PaymentSection.vue.d.ts.map +1 -1
  38. package/dist/components/PaymentSection.vue.js +7 -0
  39. package/dist/components/PaymentSection.vue2.js +34 -0
  40. package/dist/components/RequestApproved.vue.d.ts.map +1 -1
  41. package/dist/components/RequestApproved.vue.js +13 -0
  42. package/dist/components/RequestFailed.vue.d.ts.map +1 -1
  43. package/dist/components/RequestFailed.vue.js +24 -0
  44. package/dist/components/RequestPreview.vue.d.ts +1 -1
  45. package/dist/components/RequestPreview.vue.d.ts.map +1 -1
  46. package/dist/components/RequestPreview.vue.js +7 -0
  47. package/dist/components/RequestPreview.vue2.js +123 -0
  48. package/dist/components/RequestRejected.vue.d.ts.map +1 -1
  49. package/dist/components/RequestRejected.vue.js +22 -0
  50. package/dist/components/RequestSuccess.vue.d.ts.map +1 -1
  51. package/dist/components/RequestSuccess.vue.js +13 -0
  52. package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
  53. package/dist/components/ResponseBody/ResponseBody.vue.d.ts.map +1 -1
  54. package/dist/components/ResponseBody/ResponseBody.vue.js +41 -0
  55. package/dist/components/ResponseBody/ResponseBody.vue2.js +4 -0
  56. package/dist/components/ResponseBody/ResponseBodyInfo.vue.d.ts.map +1 -1
  57. package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +14 -0
  58. package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
  59. package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts.map +1 -1
  60. package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +7 -0
  61. package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +65 -0
  62. package/dist/components/ResponseBody/ResponseBodyRaw.vue.d.ts.map +1 -1
  63. package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +20 -0
  64. package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +4 -0
  65. package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts +2 -2
  66. package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts.map +1 -1
  67. package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +26 -0
  68. package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +4 -0
  69. package/dist/components/ResponseBody/helpers/media-types.js +130 -0
  70. package/dist/components/ResponseBody/helpers/process-response-body.d.ts +1 -1
  71. package/dist/components/ResponseBody/helpers/process-response-body.d.ts.map +1 -1
  72. package/dist/components/ResponseBody/helpers/process-response-body.js +33 -0
  73. package/dist/components/SearchPopover.vue.d.ts +2 -2
  74. package/dist/components/SearchPopover.vue.d.ts.map +1 -1
  75. package/dist/components/SearchPopover.vue.js +7 -0
  76. package/dist/components/SearchPopover.vue2.js +67 -0
  77. package/dist/components/SendingRequest.vue.d.ts.map +1 -1
  78. package/dist/components/SendingRequest.vue.js +24 -0
  79. package/dist/components/Suggestion.vue.d.ts.map +1 -1
  80. package/dist/components/TestRequestButton.vue.d.ts.map +1 -1
  81. package/dist/components/{Endpoint.vue.d.ts → UploadSection.vue.d.ts} +3 -5
  82. package/dist/components/UploadSection.vue.d.ts.map +1 -0
  83. package/dist/components/UploadSection.vue.js +7 -0
  84. package/dist/components/UploadSection.vue2.js +62 -0
  85. package/dist/entities/prompt/constants.d.ts +2 -0
  86. package/dist/entities/prompt/constants.d.ts.map +1 -0
  87. package/dist/entities/prompt/constants.js +4 -0
  88. package/dist/entities/registry/document.d.ts +21 -0
  89. package/dist/entities/registry/document.d.ts.map +1 -0
  90. package/dist/entities/registry/document.js +12 -0
  91. package/dist/entities/tools/ask-for-authentication.d.ts +7 -0
  92. package/dist/entities/tools/ask-for-authentication.d.ts.map +1 -0
  93. package/dist/entities/tools/ask-for-authentication.js +8 -0
  94. package/dist/entities/tools/constants.d.ts +2 -0
  95. package/dist/entities/tools/constants.d.ts.map +1 -0
  96. package/dist/entities/tools/constants.js +4 -0
  97. package/dist/entities/tools/execute-request.d.ts +42 -0
  98. package/dist/entities/tools/execute-request.d.ts.map +1 -0
  99. package/dist/entities/tools/execute-request.js +11 -0
  100. package/dist/entities/tools/get-mini-openapi-spec.d.ts +12 -0
  101. package/dist/entities/tools/get-mini-openapi-spec.d.ts.map +1 -0
  102. package/dist/entities/tools/get-mini-openapi-spec.js +8 -0
  103. package/dist/entities/tools/get-openapi-spec-summary.d.ts +10 -0
  104. package/dist/entities/tools/get-openapi-spec-summary.d.ts.map +1 -0
  105. package/dist/entities/tools/get-openapi-spec-summary.js +4 -0
  106. package/dist/helpers.d.ts +20 -12
  107. package/dist/helpers.d.ts.map +1 -1
  108. package/dist/helpers.js +115 -0
  109. package/dist/hooks/{useChatApprovals.d.ts → use-chat-approvals.d.ts} +1 -1
  110. package/dist/hooks/use-chat-approvals.d.ts.map +1 -0
  111. package/dist/hooks/use-chat-approvals.js +21 -0
  112. package/dist/hooks/use-chat-error.d.ts +14 -0
  113. package/dist/hooks/use-chat-error.d.ts.map +1 -0
  114. package/dist/hooks/use-chat-error.js +23 -0
  115. package/dist/hooks/use-chat-pending-client-tool-parts.d.ts +19 -0
  116. package/dist/hooks/use-chat-pending-client-tool-parts.d.ts.map +1 -0
  117. package/dist/hooks/use-chat-pending-client-tool-parts.js +12 -0
  118. package/dist/hooks/{useChatScroll.d.ts → use-chat-scroll.d.ts} +1 -1
  119. package/dist/hooks/use-chat-scroll.d.ts.map +1 -0
  120. package/dist/hooks/use-chat-scroll.js +16 -0
  121. package/dist/hooks/{useSearch.d.ts → use-search.d.ts} +11 -11
  122. package/dist/hooks/use-search.d.ts.map +1 -0
  123. package/dist/hooks/use-search.js +25 -0
  124. package/dist/hooks/use-term-and-conditions.d.ts +6 -0
  125. package/dist/hooks/use-term-and-conditions.d.ts.map +1 -0
  126. package/dist/hooks/use-term-and-conditions.js +16 -0
  127. package/dist/hooks/use-upload-tmp-document.d.ts +19 -0
  128. package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -0
  129. package/dist/hooks/use-upload-tmp-document.js +64 -0
  130. package/dist/index.d.ts +2 -1
  131. package/dist/index.d.ts.map +1 -1
  132. package/dist/index.js +2 -1
  133. package/dist/package.json +35 -23
  134. package/dist/registry/add-documents-to-store.d.ts +6 -6
  135. package/dist/registry/add-documents-to-store.d.ts.map +1 -1
  136. package/dist/registry/add-documents-to-store.js +39 -0
  137. package/dist/registry/create-document-name.d.ts +2 -0
  138. package/dist/registry/create-document-name.d.ts.map +1 -0
  139. package/dist/registry/create-document-name.js +6 -0
  140. package/dist/state/state.d.ts +20 -8
  141. package/dist/state/state.d.ts.map +1 -1
  142. package/dist/state/state.js +110 -0
  143. package/dist/style.css +1 -1
  144. package/dist/types.d.ts +2 -0
  145. package/dist/types.d.ts.map +1 -0
  146. package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
  147. package/dist/views/Chat/Chat.vue.js +7 -0
  148. package/dist/views/Chat/Chat.vue2.js +77 -0
  149. package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts +10 -0
  150. package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -0
  151. package/dist/views/Chat/Messages/AskForAuthentication.vue.js +7 -0
  152. package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +89 -0
  153. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
  154. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
  155. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +7 -0
  156. package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +23 -0
  157. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +2 -2
  158. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts.map +1 -1
  159. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +7 -0
  160. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +56 -0
  161. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
  162. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts.map +1 -1
  163. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +26 -0
  164. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +4 -0
  165. package/dist/views/Chat/Messages/Text.vue.d.ts.map +1 -1
  166. package/dist/views/Chat/Messages/Text.vue.js +16 -0
  167. package/dist/views/Chat/Messages/Text.vue2.js +4 -0
  168. package/dist/views/Layout.vue.d.ts.map +1 -1
  169. package/dist/views/Layout.vue.js +7 -0
  170. package/dist/views/Layout.vue2.js +23 -0
  171. package/dist/views/PromptForm.vue.d.ts.map +1 -1
  172. package/dist/views/PromptForm.vue.js +7 -0
  173. package/dist/views/PromptForm.vue2.js +212 -0
  174. package/dist/views/Settings/Auth.vue.d.ts.map +1 -1
  175. package/dist/views/Settings/Auth.vue.js +67 -0
  176. package/dist/views/Settings/Auth.vue2.js +4 -0
  177. package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
  178. package/dist/views/Settings/DocSettings.vue.js +7 -0
  179. package/dist/views/Settings/DocSettings.vue2.js +43 -0
  180. package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
  181. package/dist/views/Settings/Settings.vue.js +8 -0
  182. package/dist/views/Settings/Settings.vue2.js +67 -0
  183. package/dist/views/Start.vue.d.ts.map +1 -1
  184. package/dist/views/Start.vue.js +7 -0
  185. package/dist/views/Start.vue2.js +41 -0
  186. package/package.json +53 -7
  187. package/dist/Tooltip-Cm82QgNj.js +0 -575
  188. package/dist/__vite-optional-peer-dep_stream-markdown_markstream-vue_false-sdjmOmXd.js +0 -5
  189. package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +0 -5
  190. package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +0 -5
  191. package/dist/_basePickBy-hHD8tMGb.js +0 -151
  192. package/dist/_baseUniq-DTF1wuF6.js +0 -614
  193. package/dist/arc-Dw2RQerU.js +0 -83
  194. package/dist/architecture-U656AL7Q-B00Z9eXr.js +0 -36
  195. package/dist/architectureDiagram-VXUJARFQ-BtOffFaM.js +0 -4662
  196. package/dist/blockDiagram-VD42YOAC-BUqFMMQe.js +0 -2261
  197. package/dist/c4Diagram-YG6GDRKO-NrM1YcpG.js +0 -1579
  198. package/dist/channel-105myCGU.js +0 -5
  199. package/dist/chunk-4BX2VUAB-TAxJli7C.js +0 -8
  200. package/dist/chunk-55IACEB6-VXFJ4bz5.js +0 -8
  201. package/dist/chunk-B4BG7PRW-CZDQpfj5.js +0 -1375
  202. package/dist/chunk-DI55MBZ5-D3l7TA-E.js +0 -1370
  203. package/dist/chunk-FMBD7UC4-BMXFm8I3.js +0 -19
  204. package/dist/chunk-QN33PNHL-BOUpbpWp.js +0 -19
  205. package/dist/chunk-QZHKN3VN-C-TEEx05.js +0 -15
  206. package/dist/chunk-TZMSLE5B-BUiROKNR.js +0 -64
  207. package/dist/classDiagram-2ON5EDUG-HQET4ybK.js +0 -16
  208. package/dist/classDiagram-v2-WZHVMYZB-HQET4ybK.js +0 -16
  209. package/dist/clone-CIIO71O9.js +0 -8
  210. package/dist/components/Endpoint.vue.d.ts.map +0 -1
  211. package/dist/cose-bilkent-S5V4N54A-CMsF4n-5.js +0 -2609
  212. package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
  213. package/dist/dagre-6UL2VRFP-DqzdQ6Qg.js +0 -444
  214. package/dist/defaultLocale-BEa-49Qz.js +0 -171
  215. package/dist/diagram-PSM6KHXK-1xyGntw2.js +0 -531
  216. package/dist/diagram-QEK2KX5R-DdZdlAm1.js +0 -217
  217. package/dist/diagram-S2PKOQOG-C80Eo2jp.js +0 -142
  218. package/dist/erDiagram-Q2GNP2WA-DFVRrMXT.js +0 -841
  219. package/dist/flowDiagram-NV44I4VS-D9QK_qqB.js +0 -1620
  220. package/dist/ganttDiagram-LVOFAZNH-Bo1NTkeQ.js +0 -2506
  221. package/dist/gitGraph-F6HP7TQM-C5hdgcgO.js +0 -27
  222. package/dist/gitGraphDiagram-NY62KEGX-BZqnqZh6.js +0 -699
  223. package/dist/graph-Dth4IhEK.js +0 -247
  224. package/dist/hooks/useChatApprovals.d.ts.map +0 -1
  225. package/dist/hooks/useChatOperationBlocks.d.ts +0 -3
  226. package/dist/hooks/useChatOperationBlocks.d.ts.map +0 -1
  227. package/dist/hooks/useChatScroll.d.ts.map +0 -1
  228. package/dist/hooks/useSearch.d.ts.map +0 -1
  229. package/dist/index-BOvT43H8.js +0 -111780
  230. package/dist/index2-B36B-gt0.js +0 -69
  231. package/dist/index3-CtIyYUnG.js +0 -70
  232. package/dist/index4-Dzz91Ao2.js +0 -537
  233. package/dist/index5-Bmz0gMSP.js +0 -590
  234. package/dist/index6-DMB3qTSV.js +0 -196
  235. package/dist/info-NVLQJR56-azt5obk5.js +0 -27
  236. package/dist/infoDiagram-ER5ION4S-DD4Jtctm.js +0 -24
  237. package/dist/infographic_markstream-vue_false-BfsmcXxk.js +0 -5
  238. package/dist/init-DjUOC4st.js +0 -16
  239. package/dist/journeyDiagram-XKPGCS4Q-CXL6UO0r.js +0 -834
  240. package/dist/kanban-definition-3W4ZIXB7-B57do5Wg.js +0 -719
  241. package/dist/katex-SsTUIUTC.js +0 -11688
  242. package/dist/layout-7TCY8eA2.js +0 -1332
  243. package/dist/linear-DSm5i91N.js +0 -625
  244. package/dist/mermaid-parser.core-CUQWpAMM.js +0 -12746
  245. package/dist/mermaid.core-QjuzH7xx.js +0 -14164
  246. package/dist/mhchem-XHl7cef5.js +0 -2306
  247. package/dist/mindmap-definition-VGOIOE7T-DAQyGNAM.js +0 -784
  248. package/dist/ordinal-DfAQgscy.js +0 -61
  249. package/dist/packet-BFZMPI3H-CixuxAEA.js +0 -27
  250. package/dist/pie-7BOR55EZ-D3cgnzR1.js +0 -32
  251. package/dist/pieDiagram-ADFJNKIX-BqxgYwrL.js +0 -161
  252. package/dist/quadrantDiagram-AYHSOK5B-CQ4v-9Hh.js +0 -1022
  253. package/dist/radar-NHE76QYJ-DhV0Od_M.js +0 -27
  254. package/dist/requirementDiagram-UZGBJVZJ-ncWNAgFi.js +0 -850
  255. package/dist/safeRaf-I3a3-dyJ.js +0 -10
  256. package/dist/sankeyDiagram-TZEHDZUN-yCR2_cH5.js +0 -810
  257. package/dist/sequenceDiagram-WL72ISMW-DZ7wqFyd.js +0 -2511
  258. package/dist/stateDiagram-FKZM4ZOC-Dra68Tzi.js +0 -263
  259. package/dist/stateDiagram-v2-4FDKWEC3-CARbPECD.js +0 -16
  260. package/dist/timeline-definition-IT6M3QCI-DEbG9QIM.js +0 -795
  261. package/dist/treemap-KMMF4GRG-CQbPsyWe.js +0 -81
  262. package/dist/xychartDiagram-PRI3JC2R-C94Pu8hL.js +0 -1340
@@ -1,196 +0,0 @@
1
- import { defineComponent as c2, ref as m, computed as _, watch as O, nextTick as j, onMounted as d2, onBeforeUnmount as h2, createElementBlock as c, openBlock as s, normalizeClass as a, createCommentVNode as k, withDirectives as v2, createBlock as g2, renderSlot as G, createElementVNode as o, unref as i, toDisplayString as z, normalizeStyle as q, vShow as w2, Teleport as m2, createVNode as p2, Transition as x2, withCtx as y2, withModifiers as C2 } from "vue";
2
- import { J as f2, n as k2, Y as l2, a as b2 } from "./index-BOvT43H8.js";
3
- var R = ($, Q, r) => new Promise((l, b) => {
4
- var v = (y) => {
5
- try {
6
- w(r.next(y));
7
- } catch (p) {
8
- b(p);
9
- }
10
- }, g = (y) => {
11
- try {
12
- w(r.throw(y));
13
- } catch (p) {
14
- b(p);
15
- }
16
- }, w = (y) => y.done ? l(y.value) : Promise.resolve(y.value).then(v, g);
17
- w((r = r.apply($, Q)).next());
18
- });
19
- const a2 = () => import("./infographic_markstream-vue_false-BfsmcXxk.js");
20
- let U = null, M2 = a2;
21
- const B2 = { key: 0 }, D2 = { key: 1, class: "flex items-center gap-x-2 overflow-hidden" }, F2 = ["src"], T2 = { key: 2 }, j2 = { class: "flex items-center gap-x-1" }, $2 = { class: "flex items-center gap-x-1" }, E2 = { key: 4 }, z2 = { key: 5, class: "flex items-center gap-x-1" }, L2 = ["aria-pressed"], Z2 = { key: 0, xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, H2 = { key: 1, xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, I2 = ["disabled"], P2 = ["disabled"], S2 = { key: 0, xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "0.75rem", height: "0.75rem", viewBox: "0 0 24 24" }, V2 = { key: 1, xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "0.75rem", height: "0.75rem", viewBox: "0 0 24 24" }, Y2 = { key: 1, class: "relative" }, X2 = { key: 0, class: "absolute top-2 right-2 z-10 rounded-lg" }, _2 = { class: "flex items-center gap-2 backdrop-blur rounded-lg" }, O2 = { class: "markstream-vue" }, R2 = { class: "absolute top-6 right-6 z-50 flex items-center gap-2" }, A = /* @__PURE__ */ f2(/* @__PURE__ */ c2({ __name: "InfographicBlockNode", props: { node: {}, maxHeight: { default: "500px" }, loading: { type: Boolean, default: !0 }, isDark: { type: Boolean }, showHeader: { type: Boolean, default: !0 }, showModeToggle: { type: Boolean, default: !0 }, showCopyButton: { type: Boolean, default: !0 }, showCollapseButton: { type: Boolean, default: !0 }, showExportButton: { type: Boolean, default: !0 }, showFullscreenButton: { type: Boolean, default: !0 }, showZoomControls: { type: Boolean, default: !0 } }, emits: ["copy", "export", "openModal"], setup($, { emit: Q }) {
22
- const r = $, { t: l } = k2(), b = m(!1), v = m(!1), g = m(), w = m(!1), y = m("360px"), p = m(!1), M = m(), L = m(null), f = m(1), B = m(0), D = m(0), F = m(!1), Z = m({ x: 0, y: 0 }), H = _(() => r.node.code);
23
- function K(t) {
24
- return !t || t.disabled;
25
- }
26
- function h(t, e, n = "top") {
27
- if (K(t.currentTarget)) return;
28
- const u = t, x = u?.clientX != null && u?.clientY != null ? { x: u.clientX, y: u.clientY } : void 0;
29
- l2(t.currentTarget, e, n, !1, x, r.isDark);
30
- }
31
- function d() {
32
- b2();
33
- }
34
- function W(t) {
35
- if (K(t.currentTarget)) return;
36
- const e = b.value ? l("common.copied") || "Copied" : l("common.copy") || "Copy", n = t, u = n?.clientX != null && n?.clientY != null ? { x: n.clientX, y: n.clientY } : void 0;
37
- l2(t.currentTarget, e, "top", !1, u, r.isDark);
38
- }
39
- function i2() {
40
- return R(this, null, function* () {
41
- try {
42
- const t = H.value;
43
- typeof navigator < "u" && navigator.clipboard && typeof navigator.clipboard.writeText == "function" && (yield navigator.clipboard.writeText(t)), b.value = !0, setTimeout(() => {
44
- b.value = !1;
45
- }, 1e3);
46
- } catch (t) {
47
- console.error("Failed to copy:", t);
48
- }
49
- });
50
- }
51
- function e2(t) {
52
- w.value = t === "source";
53
- }
54
- function s2() {
55
- var t;
56
- const e = (t = g.value) == null ? void 0 : t.querySelector("svg");
57
- e ? (function(n) {
58
- R(this, null, function* () {
59
- try {
60
- const u = new XMLSerializer().serializeToString(n), x = new Blob([u], { type: "image/svg+xml;charset=utf-8" }), X = URL.createObjectURL(x);
61
- if (typeof document < "u") {
62
- const E = document.createElement("a");
63
- E.href = X, E.download = `infographic-${Date.now()}.svg`;
64
- try {
65
- document.body.appendChild(E), E.click(), document.body.removeChild(E);
66
- } catch {
67
- }
68
- URL.revokeObjectURL(X);
69
- }
70
- } catch (u) {
71
- console.error("Failed to export SVG:", u);
72
- }
73
- });
74
- })(e) : console.error("SVG element not found");
75
- }
76
- function N(t) {
77
- t.key === "Escape" && p.value && J();
78
- }
79
- function J() {
80
- if (p.value = !1, M.value && (M.value.innerHTML = ""), L.value = null, typeof document < "u") try {
81
- document.body.style.overflow = "";
82
- } catch {
83
- }
84
- if (typeof window < "u") try {
85
- window.removeEventListener("keydown", N);
86
- } catch {
87
- }
88
- }
89
- function u2() {
90
- (function() {
91
- if (p.value = !0, typeof document < "u") try {
92
- document.body.style.overflow = "hidden";
93
- } catch {
94
- }
95
- if (typeof window < "u") try {
96
- window.addEventListener("keydown", N);
97
- } catch {
98
- }
99
- j(() => {
100
- if (g.value && M.value) {
101
- M.value.innerHTML = "";
102
- const t = document.createElement("div");
103
- t.style.transition = "transform 0.1s ease", t.style.transformOrigin = "center center", t.style.width = "100%", t.style.height = "100%", t.style.display = "flex", t.style.alignItems = "center", t.style.justifyContent = "center";
104
- const e = g.value.cloneNode(!0);
105
- e.classList.add("fullscreen"), e.style.height = "auto", t.appendChild(e), M.value.appendChild(t), L.value = t, t.style.transform = `translate(${B.value}px, ${D.value}px) scale(${f.value})`;
106
- }
107
- });
108
- })();
109
- }
110
- function t2() {
111
- f.value < 3 && (f.value += 0.1);
112
- }
113
- function o2() {
114
- f.value > 0.5 && (f.value -= 0.1);
115
- }
116
- function n2() {
117
- f.value = 1, B.value = 0, D.value = 0;
118
- }
119
- function I(t) {
120
- F.value = !0, t instanceof MouseEvent ? Z.value = { x: t.clientX - B.value, y: t.clientY - D.value } : Z.value = { x: t.touches[0].clientX - B.value, y: t.touches[0].clientY - D.value };
121
- }
122
- function P(t) {
123
- if (!F.value) return;
124
- let e, n;
125
- t instanceof MouseEvent ? (e = t.clientX, n = t.clientY) : (e = t.touches[0].clientX, n = t.touches[0].clientY), B.value = e - Z.value.x, D.value = n - Z.value.y;
126
- }
127
- function T() {
128
- F.value = !1;
129
- }
130
- let C = null;
131
- function S() {
132
- return R(this, null, function* () {
133
- var t;
134
- if (g.value) try {
135
- const e = yield (function() {
136
- return R(this, null, function* () {
137
- if (U) return U;
138
- const n = M2;
139
- if (!n) return null;
140
- let u;
141
- try {
142
- u = yield n();
143
- } catch (X) {
144
- throw n === a2 ? new Error('Optional dependency "@antv/infographic" is not installed. Please install it to enable infographic diagrams.') : X;
145
- }
146
- if (!u) return null;
147
- const x = u && u.default ? u.default : u;
148
- return U = typeof x == "function" && x.prototype && x.prototype.render ? x : u.Infographic ? u.Infographic : x && x.Infographic ? x.Infographic : x, U;
149
- });
150
- })();
151
- if (!e) return void console.warn("Infographic library failed to load.");
152
- C && ((t = C.destroy) == null || t.call(C), C = null), g.value.innerHTML = "", C = new e({ container: g.value, width: "100%", height: "100%" }), C.render(H.value), j(() => {
153
- if (g.value) {
154
- const n = g.value.scrollHeight;
155
- n > 0 && (y.value = `${Math.min(n, 800)}px`);
156
- }
157
- });
158
- } catch (e) {
159
- console.error("Failed to render infographic:", e), g.value && (g.value.innerHTML = `<div class="text-red-500 p-4">Failed to render infographic: ${e instanceof Error ? e.message : "Unknown error"}</div>`);
160
- }
161
- });
162
- }
163
- O(() => H.value, () => {
164
- w.value || v.value || j(() => {
165
- S();
166
- });
167
- }), O(() => w.value, (t) => {
168
- t || v.value || j(() => {
169
- S();
170
- });
171
- }), O(() => v.value, (t) => {
172
- t || w.value || j(() => {
173
- S();
174
- });
175
- }), d2(() => {
176
- w.value || v.value || j(() => {
177
- S();
178
- });
179
- }), h2(() => {
180
- var t;
181
- if (C && ((t = C.destroy) == null || t.call(C), C = null), typeof window < "u") try {
182
- window.removeEventListener("keydown", N);
183
- } catch {
184
- }
185
- });
186
- const V = _(() => r.isDark ? "infographic-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200" : "infographic-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700"), Y = _(() => w.value || v.value), r2 = _(() => ({ transform: `translate(${B.value}px, ${D.value}px) scale(${f.value})` }));
187
- return O(r2, (t) => {
188
- p.value && L.value && (L.value.style.transform = t.transform);
189
- }), (t, e) => (s(), c("div", { class: a(["my-4 rounded-lg border overflow-hidden shadow-sm", [r.isDark ? "border-gray-700/30" : "border-gray-200", { "is-rendering": r.loading }]]) }, [r.showHeader ? (s(), c("div", { key: 0, class: a(["infographic-block-header flex justify-between items-center px-4 py-2.5 border-b", r.isDark ? "bg-gray-800 border-gray-700/30" : "bg-gray-50 border-gray-200"]) }, [t.$slots["header-left"] ? (s(), c("div", B2, [G(t.$slots, "header-left", {}, void 0, !0)])) : (s(), c("div", D2, [o("img", { src: i("data:image/svg+xml,%3csvg%20width='15.52'%20height='16'%20viewBox='0%200%20291%20300'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20d='M140.904%20239.376C128.83%20239.683%20119.675%20239.299%20115.448%20243.843C110.902%20248.07%20111.288%20257.227%20110.979%20269.302C111.118%20274.675%20111.118%20279.478%20111.472%20283.52C111.662%20285.638%20111.95%20287.547%20112.406%20289.224C112.411%20289.243%20112.416%20289.259%20112.422%20289.28C112.462%20289.419%20112.496%20289.558%20112.539%20289.691C113.168%20291.787%20114.088%20293.491%20115.446%20294.758C116.662%20296.064%20118.283%20296.963%20120.264%20297.59C120.36%20297.614%20120.464%20297.646%20120.555%20297.675C120.56%20297.68%20120.56%20297.68%20120.566%20297.68C120.848%20297.768%20121.142%20297.846%20121.443%20297.923C121.454%20297.923%20121.464%20297.928%20121.478%20297.934C122.875%20298.272%20124.424%20298.507%20126.11%20298.678C126.326%20298.696%20126.542%20298.718%20126.763%20298.739C130.79%20299.086%20135.558%20299.088%20140.904%20299.222C152.974%20298.912%20162.128%20299.302%20166.36%20294.758C170.904%20290.526%20170.515%20281.371%20170.824%20269.302C170.515%20257.227%20170.907%20248.07%20166.36%20243.843C162.131%20239.299%20152.974%20239.683%20140.904%20239.376Z'%20fill='%23FF6376'%3e%3c/path%3e%3cpath%20d='M21.2155%20128.398C12.6555%20128.616%206.16484%20128.339%203.16751%20131.56C-0.0538222%20134.56%200.218178%20141.054%20-0.000488281%20149.608C0.218178%20158.168%20-0.0538222%20164.659%203.16751%20167.656C6.16484%20170.878%2012.6555%20170.606%2021.2155%20170.824C25.0262%20170.726%2028.4288%20170.726%2031.2955%20170.475C32.7968%20170.342%2034.1488%20170.136%2035.3382%20169.814C35.3542%20169.811%2035.3648%20169.806%2035.3782%20169.803C35.4768%20169.774%2035.5755%20169.747%2035.6688%20169.718C37.1568%20169.272%2038.3648%20168.622%2039.2635%20167.656C40.1915%20166.795%2040.8262%20165.646%2041.2715%20164.243C41.2875%20164.174%2041.3115%20164.102%2041.3328%20164.035C41.3328%20164.035%2041.3355%20164.032%2041.3355%20164.027C41.3968%20163.827%2041.4529%20163.622%2041.5062%20163.406C41.5062%20163.398%2041.5115%20163.392%2041.5142%20163.382C41.7542%20162.392%2041.9222%20161.294%2042.0422%20160.096C42.0555%20159.944%2042.0715%20159.792%2042.0848%20159.635C42.3328%20156.779%2042.3328%20153.398%2042.4262%20149.608C42.2075%20141.054%2042.4848%20134.56%2039.2635%20131.56C36.2635%20128.339%2029.7728%20128.616%2021.2155%20128.398Z'%20fill='%23FFCCCC'%3e%3c/path%3e%3cpath%20d='M81.0595%20184.171C70.8568%20184.433%2063.1208%20184.102%2059.5475%20187.942C55.7075%20191.518%2056.0328%20199.254%2055.7742%20209.454C56.0328%20219.657%2055.7075%20227.393%2059.5475%20230.963C63.1208%20234.803%2070.8568%20234.478%2081.0595%20234.739C85.6008%20234.622%2089.6595%20234.622%2093.0728%20234.323C94.8648%20234.163%2096.4755%20233.921%2097.8942%20233.534C97.9102%20233.529%2097.9235%20233.526%2097.9422%20233.521C98.0568%20233.486%2098.1742%20233.457%2098.2888%20233.422C100.06%20232.889%20101.5%20232.113%20102.569%20230.963C103.676%20229.937%20104.433%20228.566%20104.964%20226.894C104.985%20226.811%20105.012%20226.726%20105.036%20226.646C105.041%20226.643%20105.041%20226.643%20105.041%20226.638C105.116%20226.401%20105.18%20226.153%20105.244%20225.897C105.244%20225.889%20105.249%20225.881%20105.254%20225.867C105.54%20224.689%20105.74%20223.379%20105.881%20221.953C105.9%20221.771%20105.916%20221.59%20105.934%20221.403C106.228%20218.001%20106.228%20213.969%20106.342%20209.454C106.081%20199.254%20106.412%20191.518%20102.572%20187.942C98.9955%20184.102%2091.2568%20184.433%2081.0595%20184.171Z'%20fill='%23FF939F'%3e%3c/path%3e%3cpath%20d='M260.591%20151.87C215.652%20151.87%20203.02%20164.523%20203.02%20209.462H198.476C198.476%20164.523%20185.836%20151.881%20140.895%20151.881V147.337C185.836%20147.337%20198.487%20134.705%20198.487%2089.7659H203.02C203.02%20134.705%20215.652%20147.337%20260.591%20147.337V151.87ZM286.052%20124.158C281.82%20119.614%20272.66%20120.001%20260.591%20119.689C248.521%20119.385%20239.361%20119.771%20235.129%20115.227C230.585%20110.995%20230.983%20101.846%20230.671%2089.7659C230.513%2083.7312%20230.535%2078.4272%20230.023%2074.1019C229.513%2069.7659%20228.481%2066.4219%20226.209%2064.3046C221.967%2059.7606%20212.817%2060.1472%20200.748%2059.8459C188.681%2060.1472%20179.519%2059.7606%20175.287%2064.3046C170.753%2068.5366%20171.129%2077.6966%20170.828%2089.7659C170.516%20101.835%20170.9%20110.995%20166.356%20115.227C162.124%20119.771%20152.985%20119.374%20140.905%20119.689C138.873%20119.739%20136.924%20119.771%20135.071%20119.811C119.313%20118.697%20106.337%20112.318%20106.337%2089.7659C106.212%2084.6699%20106.233%2080.1792%20105.807%2076.5206C105.367%2072.8726%20104.492%2070.0379%20102.575%2068.2566C99.0013%2064.4112%2091.2573%2064.7446%2081.0653%2064.4832C70.86%2064.7446%2063.1186%2064.4112%2059.5533%2068.2566C55.708%2071.8299%2056.0306%2079.5632%2055.7693%2089.7659C56.0306%2099.9686%2055.708%20107.702%2059.5533%20111.278C63.1186%20115.113%2070.86%20114.79%2081.0653%20115.049C103.617%20115.049%20109.996%20128.035%20111.1%20143.803C111.068%20145.659%20111.028%20147.587%20110.975%20149.619C111.121%20154.987%20111.121%20159.79%20111.476%20163.835C111.663%20165.95%20111.945%20167.857%20112.404%20169.534C112.412%20169.555%20112.412%20169.566%20112.423%20169.598C112.465%20169.734%20112.497%20169.867%20112.537%20170.003C113.164%20172.099%20114.092%20173.809%20115.447%20175.07C116.665%20176.371%20118.281%20177.278%20120.271%20177.905C120.364%20177.934%20120.46%20177.955%20120.564%20177.987C120.855%20178.081%20121.145%20178.153%20121.439%20178.238C121.46%20178.238%20121.471%20178.238%20121.479%20178.249C122.876%20178.582%20124.42%20178.822%20126.108%20178.987C126.327%20179.009%20126.545%20179.03%20126.764%20179.051C130.788%20179.395%20135.559%20179.395%20140.905%20179.529C152.975%20179.843%20162.124%20179.457%20166.356%20184.001C170.9%20188.233%20170.516%20197.371%20170.828%20209.451C171.129%20221.529%20170.743%20230.681%20175.287%20234.91C179.519%20239.454%20188.681%20239.07%20200.748%20239.371C206.127%20239.235%20210.921%20239.235%20214.975%20238.881C217.079%20238.694%20218.985%20238.403%20220.676%20237.955C220.695%20237.945%20220.705%20237.934%20220.727%20237.934C220.873%20237.891%20220.999%20237.859%20221.135%20237.819C223.228%20237.193%20224.937%20236.265%20226.209%20234.91C227.511%20233.691%20228.409%20232.065%20229.044%20230.097C229.065%20230.003%20229.095%20229.899%20229.127%20229.803V229.793C229.22%20229.513%20229.295%20229.222%20229.367%20228.918C229.367%20228.897%20229.377%20228.897%20229.377%20228.878C229.721%20227.481%20229.951%20225.937%20230.127%20224.249C230.137%20224.03%20230.169%20223.811%20230.191%20223.593C230.535%20219.571%20230.535%20214.798%20230.671%20209.451C230.972%20197.371%20230.585%20188.233%20235.129%20184.001C239.361%20179.457%20248.511%20179.843%20260.591%20179.529C272.66%20179.227%20281.82%20179.614%20286.052%20175.07C290.596%20170.838%20290.209%20161.689%20290.511%20149.619C290.209%20137.539%20290.596%20128.379%20286.052%20124.158Z'%20fill='%23FF356A'%3e%3c/path%3e%3cpath%20d='M112.405%2049.848C112.411%2049.8694%20112.416%2049.8827%20112.421%2049.904C112.461%2050.0427%20112.499%2050.1814%20112.539%2050.3147C113.171%2052.4134%20114.088%2054.1147%20115.448%2055.384C116.661%2056.6907%20118.283%2057.5894%20120.264%2058.2134C120.36%2058.24%20120.464%2058.2694%20120.555%2058.3014C120.56%2058.3067%20120.56%2058.3067%20120.565%2058.3067C120.848%2058.3947%20121.141%2058.4694%20121.443%2058.5467C121.453%2058.5467%20121.464%2058.552%20121.48%2058.5574C122.875%2058.896%20124.424%2059.1334%20126.112%2059.3014C126.325%2059.3227%20126.541%2059.3414%20126.763%2059.3627C130.789%2059.712%20135.56%2059.712%20140.904%2059.8454C152.973%2059.5387%20162.128%2059.928%20166.36%2055.384C170.907%2051.152%20170.515%2041.9947%20170.824%2029.9254C170.517%2017.8507%20170.907%208.69602%20166.363%204.46935C162.131%20-0.0746511%20152.973%200.309349%20140.904%201.52588e-05C128.829%200.309349%20119.675%20-0.0746511%20115.448%204.46935C110.904%208.69602%20111.288%2017.8507%20110.979%2029.9254C111.117%2035.3014%20111.117%2040.1014%20111.472%2044.144C111.661%2046.2614%20111.949%2048.1707%20112.405%2049.848Z'%20fill='%23FF6376'%3e%3c/path%3e%3c/g%3e%3c/svg%3e"), class: "w-4 h-4 my-0", alt: "Infographic" }, null, 8, F2), o("span", { class: a(["text-sm font-medium font-mono truncate", r.isDark ? "text-gray-400" : "text-gray-600"]) }, "Infographic", 2)])), t.$slots["header-center"] ? (s(), c("div", T2, [G(t.$slots, "header-center", {}, void 0, !0)])) : r.showModeToggle ? (s(), c("div", { key: 3, class: a(["flex items-center gap-x-1 rounded-md p-0.5", r.isDark ? "bg-gray-700" : "bg-gray-100"]) }, [o("button", { class: a(["px-2.5 py-1 text-xs rounded transition-colors", [w.value ? r.isDark ? "text-gray-400 hover:text-gray-200" : "text-gray-500 hover:text-gray-700" : r.isDark ? "bg-gray-600 text-gray-200 shadow-sm" : "bg-white text-gray-700 shadow-sm"]]), onClick: e[0] || (e[0] = () => e2("preview")), onMouseenter: e[1] || (e[1] = (n) => h(n, i(l)("common.preview") || "Preview")), onFocus: e[2] || (e[2] = (n) => h(n, i(l)("common.preview") || "Preview")), onMouseleave: d, onBlur: d }, [o("div", j2, [e[21] || (e[21] = o("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [o("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [o("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0" }), o("circle", { cx: "12", cy: "12", r: "3" })])], -1)), o("span", null, z(i(l)("common.preview") || "Preview"), 1)])], 34), o("button", { class: a(["px-2.5 py-1 text-xs rounded transition-colors", [w.value ? r.isDark ? "bg-gray-600 text-gray-200 shadow-sm" : "bg-white text-gray-700 shadow-sm" : r.isDark ? "text-gray-400 hover:text-gray-200" : "text-gray-500 hover:text-gray-700"]]), onClick: e[3] || (e[3] = () => e2("source")), onMouseenter: e[4] || (e[4] = (n) => h(n, i(l)("common.source") || "Source")), onFocus: e[5] || (e[5] = (n) => h(n, i(l)("common.source") || "Source")), onMouseleave: d, onBlur: d }, [o("div", $2, [e[22] || (e[22] = o("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [o("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "m16 18l6-6l-6-6M8 6l-6 6l6 6" })], -1)), o("span", null, z(i(l)("common.source") || "Source"), 1)])], 34)], 2)) : k("", !0), t.$slots["header-right"] ? (s(), c("div", E2, [G(t.$slots, "header-right", {}, void 0, !0)])) : (s(), c("div", z2, [r.showCollapseButton ? (s(), c("button", { key: 0, class: a(V.value), "aria-pressed": v.value, onClick: e[6] || (e[6] = (n) => v.value = !v.value), onMouseenter: e[7] || (e[7] = (n) => h(n, v.value ? i(l)("common.expand") || "Expand" : i(l)("common.collapse") || "Collapse")), onFocus: e[8] || (e[8] = (n) => h(n, v.value ? i(l)("common.expand") || "Expand" : i(l)("common.collapse") || "Collapse")), onMouseleave: d, onBlur: d }, [(s(), c("svg", { style: q({ rotate: v.value ? "0deg" : "90deg" }), xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [...e[23] || (e[23] = [o("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "m9 18l6-6l-6-6" }, null, -1)])], 4))], 42, L2)) : k("", !0), r.showCopyButton ? (s(), c("button", { key: 1, class: a(V.value), onClick: i2, onMouseenter: e[9] || (e[9] = (n) => W(n)), onFocus: e[10] || (e[10] = (n) => W(n)), onMouseleave: d, onBlur: d }, [b.value ? (s(), c("svg", H2, [...e[25] || (e[25] = [o("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M20 6L9 17l-5-5" }, null, -1)])])) : (s(), c("svg", Z2, [...e[24] || (e[24] = [o("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [o("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }), o("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })], -1)])]))], 34)) : k("", !0), r.showExportButton ? (s(), c("button", { key: 2, class: a(`${V.value} ${Y.value ? "opacity-50 cursor-not-allowed" : ""}`), disabled: Y.value, onClick: s2, onMouseenter: e[11] || (e[11] = (n) => h(n, i(l)("common.export") || "Export")), onFocus: e[12] || (e[12] = (n) => h(n, i(l)("common.export") || "Export")), onMouseleave: d, onBlur: d }, [...e[26] || (e[26] = [o("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [o("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [o("path", { d: "M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), o("path", { d: "m7 10l5 5l5-5" })])], -1)])], 42, I2)) : k("", !0), r.showFullscreenButton ? (s(), c("button", { key: 3, class: a(`${V.value} ${Y.value ? "opacity-50 cursor-not-allowed" : ""}`), disabled: Y.value, onClick: u2, onMouseenter: e[13] || (e[13] = (n) => h(n, p.value ? i(l)("common.minimize") || "Minimize" : i(l)("common.open") || "Open")), onFocus: e[14] || (e[14] = (n) => h(n, p.value ? i(l)("common.minimize") || "Minimize" : i(l)("common.open") || "Open")), onMouseleave: d, onBlur: d }, [p.value ? (s(), c("svg", V2, [...e[28] || (e[28] = [o("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6" }, null, -1)])])) : (s(), c("svg", S2, [...e[27] || (e[27] = [o("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6" }, null, -1)])]))], 42, P2)) : k("", !0)]))], 2)) : k("", !0), v2(o("div", null, [w.value ? (s(), c("div", { key: 0, class: a(["p-4", r.isDark ? "bg-gray-900" : "bg-gray-50"]) }, [o("pre", { class: a(["text-sm font-mono whitespace-pre-wrap", r.isDark ? "text-gray-300" : "text-gray-700"]) }, z(H.value), 3)], 2)) : (s(), c("div", Y2, [r.showZoomControls ? (s(), c("div", X2, [o("div", _2, [o("button", { class: a(["p-2 text-xs rounded transition-colors", [r.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: t2, onMouseenter: e[15] || (e[15] = (n) => h(n, i(l)("common.zoomIn") || "Zoom in")), onFocus: e[16] || (e[16] = (n) => h(n, i(l)("common.zoomIn") || "Zoom in")), onMouseleave: d, onBlur: d }, [...e[29] || (e[29] = [o("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [o("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [o("circle", { cx: "11", cy: "11", r: "8" }), o("path", { d: "m21 21l-4.35-4.35M11 8v6m-3-3h6" })])], -1)])], 34), o("button", { class: a(["p-2 text-xs rounded transition-colors", [r.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: o2, onMouseenter: e[17] || (e[17] = (n) => h(n, i(l)("common.zoomOut") || "Zoom out")), onFocus: e[18] || (e[18] = (n) => h(n, i(l)("common.zoomOut") || "Zoom out")), onMouseleave: d, onBlur: d }, [...e[30] || (e[30] = [o("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [o("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [o("circle", { cx: "11", cy: "11", r: "8" }), o("path", { d: "m21 21l-4.35-4.35M8 11h6" })])], -1)])], 34), o("button", { class: a(["p-2 text-xs rounded transition-colors", [r.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: n2, onMouseenter: e[19] || (e[19] = (n) => h(n, i(l)("common.resetZoom") || "Reset zoom")), onFocus: e[20] || (e[20] = (n) => h(n, i(l)("common.resetZoom") || "Reset zoom")), onMouseleave: d, onBlur: d }, z(Math.round(100 * f.value)) + "% ", 35)])])) : k("", !0), o("div", { class: a(["min-h-[360px] relative transition-all duration-100 overflow-hidden block", r.isDark ? "bg-gray-900" : "bg-gray-50"]), style: q({ height: y.value }), onMousedown: I, onMousemove: P, onMouseup: T, onMouseleave: T, onTouchstartPassive: I, onTouchmovePassive: P, onTouchendPassive: T }, [o("div", { class: a(["absolute inset-0 cursor-grab", { "cursor-grabbing": F.value }]), style: q(r2.value) }, [o("div", { ref_key: "infographicContainer", ref: g, class: "w-full text-center flex items-center justify-center min-h-full" }, null, 512)], 6)], 38)]))], 512), [[w2, !v.value]]), (s(), g2(m2, { to: "body" }, [o("div", O2, [p2(x2, { name: "infographic-dialog", appear: "" }, { default: y2(() => [p.value ? (s(), c("div", { key: 0, class: "fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4", onClick: C2(J, ["self"]) }, [o("div", { class: a(["dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden", r.isDark ? "bg-gray-900" : "bg-white"]) }, [o("div", R2, [o("button", { class: a(["p-2 text-xs rounded transition-colors", [r.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: t2 }, [...e[31] || (e[31] = [o("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [o("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [o("circle", { cx: "11", cy: "11", r: "8" }), o("path", { d: "m21 21l-4.35-4.35M11 8v6m-3-3h6" })])], -1)])], 2), o("button", { class: a(["p-2 text-xs rounded transition-colors", [r.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: o2 }, [...e[32] || (e[32] = [o("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [o("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [o("circle", { cx: "11", cy: "11", r: "8" }), o("path", { d: "m21 21l-4.35-4.35M8 11h6" })])], -1)])], 2), o("button", { class: a(["p-2 text-xs rounded transition-colors", [r.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: n2 }, z(Math.round(100 * f.value)) + "% ", 3), o("button", { class: a(["inline-flex items-center justify-center p-2 rounded transition-colors", [r.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: J }, [...e[33] || (e[33] = [o("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [o("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M18 6L6 18M6 6l12 12" })], -1)])], 2)]), o("div", { ref_key: "modalContent", ref: M, class: a(["w-full h-full flex items-center justify-center p-4 overflow-hidden", { "cursor-grab": !F.value, "cursor-grabbing": F.value }]), onMousedown: I, onMousemove: P, onMouseup: T, onMouseleave: T, onTouchstartPassive: I, onTouchmovePassive: P, onTouchendPassive: T }, null, 34)], 2)])) : k("", !0)]), _: 1 })])]))], 2));
190
- } }), [["__scopeId", "data-v-811a9bef"]]);
191
- A.install = ($) => {
192
- $.component(A.__name, A);
193
- };
194
- export {
195
- A as default
196
- };
@@ -1,27 +0,0 @@
1
- import { E as s, i as n, M as i, c as u, _ as r, I as d, a as c, C as l, A as f } from "./mermaid-parser.core-CUQWpAMM.js";
2
- var e, m = (e = class extends f {
3
- constructor() {
4
- super(["info", "showInfo"]);
5
- }
6
- }, r(e, "InfoTokenBuilder"), e), I = {
7
- parser: {
8
- TokenBuilder: /* @__PURE__ */ r(() => new m(), "TokenBuilder"),
9
- ValueConverter: /* @__PURE__ */ r(() => new l(), "ValueConverter")
10
- }
11
- };
12
- function v(t = s) {
13
- const o = n(
14
- u(t),
15
- i
16
- ), a = n(
17
- c({ shared: o }),
18
- d,
19
- I
20
- );
21
- return o.ServiceRegistry.register(a), { shared: o, Info: a };
22
- }
23
- r(v, "createInfoServices");
24
- export {
25
- I as InfoModule,
26
- v as createInfoServices
27
- };
@@ -1,24 +0,0 @@
1
- import { _ as e, l as s, H as o, e as i, I as g } from "./mermaid.core-QjuzH7xx.js";
2
- import { p } from "./mermaid-parser.core-CUQWpAMM.js";
3
- var v = {
4
- parse: /* @__PURE__ */ e(async (r) => {
5
- const a = await p("info", r);
6
- s.debug(a);
7
- }, "parse")
8
- }, d = {
9
- version: g.version + ""
10
- }, c = /* @__PURE__ */ e(() => d.version, "getVersion"), m = {
11
- getVersion: c
12
- }, l = /* @__PURE__ */ e((r, a, n) => {
13
- s.debug(`rendering info diagram
14
- ` + r);
15
- const t = o(a);
16
- i(t, 100, 400, !0), t.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${n}`);
17
- }, "draw"), f = { draw: l }, b = {
18
- parser: v,
19
- db: m,
20
- renderer: f
21
- };
22
- export {
23
- b as diagram
24
- };
@@ -1,5 +0,0 @@
1
- const r = {};
2
- throw new Error('Could not resolve "@antv/infographic" imported by "markstream-vue".');
3
- export {
4
- r as default
5
- };
@@ -1,16 +0,0 @@
1
- function t(e, a) {
2
- switch (arguments.length) {
3
- case 0:
4
- break;
5
- case 1:
6
- this.range(e);
7
- break;
8
- default:
9
- this.range(a).domain(e);
10
- break;
11
- }
12
- return this;
13
- }
14
- export {
15
- t as i
16
- };