@luzmo/analytics-components-kit 1.0.3-beta.14 → 1.0.3-beta.16

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 (1008) hide show
  1. package/components/ai-chat/ai-chat.d.ts +8 -2
  2. package/components/ai-chat/empty-state/ai-chat-empty-state.d.ts +2 -2
  3. package/components/ai-chat/index.cjs +1 -1
  4. package/components/ai-chat/index.js +2 -2
  5. package/components/ai-chat/session/ai-chat-session.d.ts +7 -1
  6. package/components/ai-chat/stream/chunk-extractors.d.ts +8 -0
  7. package/components/ai-chat/stream/index.d.ts +1 -1
  8. package/components/ai-chat-CbylT7eX.js +3685 -0
  9. package/components/ai-chat-Cv3EikMv.cjs +245 -0
  10. package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +2 -2
  11. package/components/ai-interaction-textarea/index.cjs +1 -1
  12. package/components/ai-interaction-textarea/index.js +2 -2
  13. package/components/ai-interaction-textarea-CPfJqTB0.cjs +68 -0
  14. package/components/ai-interaction-textarea-DkBglh6Q.js +299 -0
  15. package/components/area-chart-options.config-4OY_kXkB.js +146 -0
  16. package/components/area-chart-options.config-Cf1VrUNv.cjs +20 -0
  17. package/components/area-chart-positioning.config-CAPrtEZW.js +55 -0
  18. package/components/area-chart-positioning.config-CfC43YUW.cjs +20 -0
  19. package/components/area-chart-slots.config--pd_dBTn.js +55 -0
  20. package/components/area-chart-slots.config-BOhwdLnr.cjs +20 -0
  21. package/components/bar-chart-options.config-BF7Q15FL.cjs +20 -0
  22. package/components/bar-chart-options.config-C3puwFpi.js +220 -0
  23. package/components/bar-chart-positioning.config-C1MLYyl9.js +59 -0
  24. package/components/bar-chart-positioning.config-vJOALpQP.cjs +20 -0
  25. package/components/bar-chart-slots.config-DMWjAd5a.cjs +20 -0
  26. package/components/bar-chart-slots.config-Dr7v4xxd.js +50 -0
  27. package/components/base-B_wdCOxV.js +249 -0
  28. package/components/base-kQ6cjcIZ.cjs +20 -0
  29. package/components/base-store-DHC2m2Os.cjs +20 -0
  30. package/components/base-store-DmDe0dTU.js +160 -0
  31. package/components/box-plot-options.config-B486nCds.js +296 -0
  32. package/components/box-plot-options.config-BkD5CYGz.cjs +20 -0
  33. package/components/box-plot-positioning.config-CA27sCpO.js +48 -0
  34. package/components/box-plot-positioning.config-DVNeh9kg.cjs +20 -0
  35. package/components/box-plot-slots.config-5B_pTjPJ.cjs +20 -0
  36. package/components/box-plot-slots.config-Bdb7pkky.js +40 -0
  37. package/components/bubble-chart-options.config-4f9FUNhc.cjs +20 -0
  38. package/components/bubble-chart-options.config-BymUqNR5.js +115 -0
  39. package/components/bubble-chart-positioning.config-Dg92VJnB.cjs +20 -0
  40. package/components/bubble-chart-positioning.config-OlbBZU4m.js +55 -0
  41. package/components/bubble-chart-slots.config-B4tsJDuz.js +47 -0
  42. package/components/bubble-chart-slots.config-VHKuntJk.cjs +20 -0
  43. package/components/bullet-chart-options.config-BtyRdRk2.js +75 -0
  44. package/components/bullet-chart-options.config-DDygYBiy.cjs +20 -0
  45. package/components/bullet-chart-positioning.config-BwqxpSSL.cjs +20 -0
  46. package/components/bullet-chart-positioning.config-Y18yvzoc.js +56 -0
  47. package/components/bullet-chart-slots.config-CZfTgKZ4.cjs +20 -0
  48. package/components/bullet-chart-slots.config-ccCSNJ5q.js +46 -0
  49. package/components/choropleth-map-options.config-5W6nNlL7.cjs +20 -0
  50. package/components/choropleth-map-options.config-CqCciAvW.js +348 -0
  51. package/components/choropleth-map-positioning.config-Dmzy3fMc.js +55 -0
  52. package/components/choropleth-map-positioning.config-y-bYMoxr.cjs +20 -0
  53. package/components/choropleth-map-slots.config-CZKWF1qV.cjs +20 -0
  54. package/components/choropleth-map-slots.config-X2YYrSXc.js +53 -0
  55. package/components/circle-pack-chart-options.config-CD8MWMTw.cjs +20 -0
  56. package/components/circle-pack-chart-options.config-D9C-ltHA.js +54 -0
  57. package/components/circle-pack-chart-positioning.config-YDdY2cc2.js +48 -0
  58. package/components/circle-pack-chart-positioning.config-wKIQDFe8.cjs +20 -0
  59. package/components/circle-pack-chart-slots.config-BIO1dZsK.js +38 -0
  60. package/components/circle-pack-chart-slots.config-GL7T5_o4.cjs +20 -0
  61. package/components/circular-gauge-options.config-D9gcbX57.cjs +20 -0
  62. package/components/circular-gauge-options.config-De6SlTLT.js +188 -0
  63. package/components/circular-gauge-positioning.config-C41euPS9.js +48 -0
  64. package/components/circular-gauge-positioning.config-CKNanoFX.cjs +20 -0
  65. package/components/circular-gauge-slots.config-DUHabt3G.cjs +20 -0
  66. package/components/circular-gauge-slots.config-Dv_7fAD_.js +39 -0
  67. package/components/color-BWnYpOu7.js +3812 -0
  68. package/components/color-range-utils-CwwtLDX_.js +63 -0
  69. package/components/column-chart-options.config-5Dbg3FmH.js +219 -0
  70. package/components/column-chart-options.config-CiIw23Yo.cjs +20 -0
  71. package/components/column-chart-positioning.config-BdyuErF8.js +55 -0
  72. package/components/column-chart-positioning.config-Enx15Dqh.cjs +20 -0
  73. package/components/column-chart-slots.config-CM5aytbj.cjs +20 -0
  74. package/components/column-chart-slots.config-eHvTwZLX.js +50 -0
  75. package/components/combination-chart-options.config-BzmLGCal.js +87 -0
  76. package/components/combination-chart-options.config-DaTYSfnr.cjs +20 -0
  77. package/components/combination-chart-positioning.config-BQRn0EfF.js +48 -0
  78. package/components/combination-chart-positioning.config-CqlKA__j.cjs +20 -0
  79. package/components/combination-chart-slots.config-BwUOXFCR.cjs +20 -0
  80. package/components/combination-chart-slots.config-CG40JjE3.js +43 -0
  81. package/components/conditional-number-options.config-BPzCxo2q.cjs +20 -0
  82. package/components/conditional-number-options.config-CVgV7s7f.js +205 -0
  83. package/components/conditional-number-positioning.config-BBivi4ps.js +48 -0
  84. package/components/conditional-number-positioning.config-CR45rPru.cjs +20 -0
  85. package/components/conditional-number-slots.config-B7maHIaG.cjs +20 -0
  86. package/components/conditional-number-slots.config-o22l-qLv.js +39 -0
  87. package/components/data-broker-Bdv5V8Yp.js +1680 -0
  88. package/components/data-broker-DWEXs6-2.cjs +20 -0
  89. package/components/data-field/data-field.d.ts +2 -2
  90. package/components/data-field/index.cjs +1 -1
  91. package/components/data-field/index.js +2 -2
  92. package/components/data-field-CAGprHjS.cjs +54 -0
  93. package/components/data-field-CLfUWgK9.js +121 -0
  94. package/components/data-field-level/data-field-level.d.ts +2 -2
  95. package/components/data-field-level/index.cjs +1 -1
  96. package/components/data-field-level/index.js +2 -2
  97. package/components/data-field-level-7qi9K__S.cjs +55 -0
  98. package/components/data-field-level-CfJ0dmxo.js +247 -0
  99. package/components/data-field-panel/data-field-panel.d.ts +2 -2
  100. package/components/data-field-panel/index.cjs +1 -1
  101. package/components/data-field-panel/index.js +2 -2
  102. package/components/data-field-panel-DUc8y4WA.cjs +87 -0
  103. package/components/data-field-panel-N7mukLj6.js +385 -0
  104. package/components/data-fields-select/data-fields-select.d.ts +6 -1
  105. package/components/data-fields-select/index.cjs +1 -1
  106. package/components/data-fields-select/index.js +2 -2
  107. package/components/data-fields-select-B1pwPYt6.js +262 -0
  108. package/components/data-fields-select-qCWuzckJ.cjs +41 -0
  109. package/components/dataset-icon/dataset-icon.d.ts +2 -2
  110. package/components/dataset-icon/index.js +2 -2
  111. package/components/dataset-icon-CWT5Ju8w.js +125 -0
  112. package/components/dataset-selector-list/dataset-selector-list.d.ts +2 -2
  113. package/components/dataset-selector-list/index.cjs +1 -1
  114. package/components/dataset-selector-list/index.js +2 -2
  115. package/components/dataset-selector-list-BPBZ04Lf.cjs +75 -0
  116. package/components/dataset-selector-list-DmajZuNC.js +313 -0
  117. package/components/dataset-selector-row/dataset-selector-row.d.ts +2 -2
  118. package/components/dataset-selector-row/index.cjs +1 -1
  119. package/components/dataset-selector-row/index.js +2 -2
  120. package/components/dataset-selector-row-SJzYIpO6.js +273 -0
  121. package/components/dataset-selector-row-qxfmcxpm.cjs +79 -0
  122. package/components/date-comparison-filter-options.config-4yHPEJSU.cjs +20 -0
  123. package/components/date-comparison-filter-options.config-BJg_WqL4.js +126 -0
  124. package/components/date-comparison-filter-slots.config-BIK5aZ6P.js +33 -0
  125. package/components/date-comparison-filter-slots.config-oABOLs3D.cjs +20 -0
  126. package/components/date-filter-options.config-AFAngO_i.cjs +20 -0
  127. package/components/date-filter-options.config-N6eGgPGL.js +118 -0
  128. package/components/date-filter-slots.config-CJJ4P0v6.js +37 -0
  129. package/components/date-filter-slots.config-Cuzz0RjE.cjs +20 -0
  130. package/components/de-BHQ-FfU0.js +465 -0
  131. package/components/de-DnADyZVQ.cjs +20 -0
  132. package/components/decorate-DyMgX_Uh.js +28 -0
  133. package/components/default-acceptable-data-field-types-fPsz64ka.cjs +20 -0
  134. package/components/display-settings/display-settings.d.ts +1 -1
  135. package/components/display-settings/index.cjs +1 -1
  136. package/components/display-settings/index.js +2 -2
  137. package/components/display-settings-CkkjJjem.js +272 -0
  138. package/components/display-settings-DnzOjr-1.cjs +120 -0
  139. package/components/display-settings-binning/display-settings-binning.d.ts +1 -1
  140. package/components/display-settings-binning/index.cjs +1 -1
  141. package/components/display-settings-binning/index.js +2 -2
  142. package/components/display-settings-binning-BohjN2qK.js +110 -0
  143. package/components/display-settings-binning-C7-gByrp.cjs +56 -0
  144. package/components/display-settings-datetime/display-settings-datetime.d.ts +1 -1
  145. package/components/display-settings-datetime/index.cjs +1 -1
  146. package/components/display-settings-datetime/index.js +2 -2
  147. package/components/display-settings-datetime-7pUcku_h.js +413 -0
  148. package/components/display-settings-datetime-DL0Qcz8Y.cjs +217 -0
  149. package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +1 -1
  150. package/components/display-settings-grand-totals/index.cjs +1 -1
  151. package/components/display-settings-grand-totals/index.js +2 -2
  152. package/components/display-settings-grand-totals-CV5guBhH.js +89 -0
  153. package/components/display-settings-grand-totals-DHQSZqMI.cjs +44 -0
  154. package/components/display-settings-numeric/display-settings-numeric.d.ts +1 -1
  155. package/components/display-settings-numeric/index.cjs +1 -1
  156. package/components/display-settings-numeric/index.js +2 -2
  157. package/components/display-settings-numeric--5zk8_7K.cjs +190 -0
  158. package/components/display-settings-numeric-D2LjMepO.js +479 -0
  159. package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +1 -1
  160. package/components/display-settings-period-over-period/index.cjs +1 -1
  161. package/components/display-settings-period-over-period/index.js +2 -2
  162. package/components/display-settings-period-over-period-BE22oHvV.cjs +229 -0
  163. package/components/display-settings-period-over-period-sqZU6Zj_.js +433 -0
  164. package/components/donut-chart-options.config-C66yOoed.js +207 -0
  165. package/components/donut-chart-options.config-D8Bvo6Cc.cjs +20 -0
  166. package/components/donut-chart-positioning.config-B9sm4yFV.cjs +20 -0
  167. package/components/donut-chart-positioning.config-DtaPAgXE.js +48 -0
  168. package/components/donut-chart-slots.config-2XbT9Uu8.js +39 -0
  169. package/components/donut-chart-slots.config-Bi08z-XB.cjs +20 -0
  170. package/components/dropdown-filter-options.config-BRzYD0KE.cjs +20 -0
  171. package/components/dropdown-filter-options.config-Cm_wK0mn.js +153 -0
  172. package/components/dropdown-filter-slots.config-CR-Ko6q_.cjs +20 -0
  173. package/components/dropdown-filter-slots.config-CnESCGuw.js +38 -0
  174. package/components/en-GB-uxY5qmIM.cjs +20 -0
  175. package/components/en-US-q_Ruzags.cjs +20 -0
  176. package/components/en-q_Ruzags.cjs +20 -0
  177. package/components/es-B4xWcOeJ.cjs +20 -0
  178. package/components/es-CkCov6l7.js +465 -0
  179. package/components/evolution-number-options.config-07Jd0oUL.js +228 -0
  180. package/components/evolution-number-options.config-CkqNYgWn.cjs +20 -0
  181. package/components/evolution-number-positioning.config-DVXhBZYj.cjs +20 -0
  182. package/components/evolution-number-positioning.config-v8_6kB1H.js +48 -0
  183. package/components/evolution-number-slots.config-BKdD3cKw.js +37 -0
  184. package/components/evolution-number-slots.config-CikuQYgm.cjs +20 -0
  185. package/components/filter-expression-picker/filter-expression-picker.d.ts +1 -1
  186. package/components/filter-expression-picker/index.cjs +1 -1
  187. package/components/filter-expression-picker/index.js +2 -2
  188. package/components/filter-expression-picker-CF4Otpll.cjs +38 -0
  189. package/components/filter-expression-picker-DCrCAIhg.js +425 -0
  190. package/components/filter-item/filter-item.d.ts +1 -1
  191. package/components/filter-item/index.cjs +1 -1
  192. package/components/filter-item/index.js +2 -2
  193. package/components/filter-item-CKg3oQlZ.cjs +58 -0
  194. package/components/filter-item-DtdK1jvx.js +242 -0
  195. package/components/filter-parameter-picker/filter-parameter-picker.d.ts +1 -1
  196. package/components/filter-parameter-picker/index.js +2 -2
  197. package/components/filter-value-picker/filter-value-picker.d.ts +1 -1
  198. package/components/filter-value-picker/index.cjs +1 -1
  199. package/components/filter-value-picker/index.js +2 -2
  200. package/components/filter-value-picker-B5fHoLAG.cjs +60 -0
  201. package/components/filter-value-picker-datetime/filter-value-picker-datetime.d.ts +1 -1
  202. package/components/filter-value-picker-datetime/index.cjs +1 -1
  203. package/components/filter-value-picker-datetime/index.js +2 -2
  204. package/components/filter-value-picker-datetime-CFCV2jkK.js +139 -0
  205. package/components/filter-value-picker-datetime-D20WnWar.cjs +42 -0
  206. package/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.d.ts +1 -1
  207. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  208. package/components/filter-value-picker-hierarchy/index.js +2 -2
  209. package/components/filter-value-picker-hierarchy-CSM0RPvX.cjs +47 -0
  210. package/components/filter-value-picker-hierarchy-DEbN7h5L.js +232 -0
  211. package/components/filter-value-picker-numeric/filter-value-picker-numeric.d.ts +1 -1
  212. package/components/filter-value-picker-numeric/index.cjs +1 -1
  213. package/components/filter-value-picker-numeric/index.js +2 -2
  214. package/components/filter-value-picker-numeric-BYspQRSi.js +219 -0
  215. package/components/filter-value-picker-numeric-BtZaQvkr.cjs +48 -0
  216. package/components/filter-value-picker-tyoO5ISM.js +151 -0
  217. package/components/filters/filters.d.ts +1 -1
  218. package/components/filters/index.cjs +1 -1
  219. package/components/filters/index.js +2 -2
  220. package/components/filters-C8fHs4_m.js +400 -0
  221. package/components/filters-sR8GxUGw.cjs +150 -0
  222. package/components/formatter-BeXmurVe.cjs +20 -0
  223. package/components/formula/formula.d.ts +2 -2
  224. package/components/formula/index.cjs +1 -1
  225. package/components/formula/index.js +2 -2
  226. package/components/formula-BPHH_GKB.cjs +45 -0
  227. package/components/formula-DYdcMG-v.js +138 -0
  228. package/components/formula-codemirror/formula-codemirror.d.ts +2 -2
  229. package/components/formula-codemirror/pills/formula-aggregation/formula-aggregation.d.ts +2 -2
  230. package/components/formula-codemirror/pills/formula-empty-argument-pill/formula-empty-argument-pill.d.ts +3 -2
  231. package/components/formula-codemirror/pills/formula-include-exclude-panel.d.ts +1 -1
  232. package/components/formula-codemirror-CFgPlkN8.cjs +215 -0
  233. package/components/formula-codemirror-CQonNhmd.js +12018 -0
  234. package/components/formula-display-store-BGzj13Cs.js +1086 -0
  235. package/components/formula-display-store-DFAvw21p.cjs +20 -0
  236. package/components/formula-draggable-field/formula-draggable-field.d.ts +2 -2
  237. package/components/formula-editor/formula-aggregations-list.d.ts +1 -1
  238. package/components/formula-editor/formula-datasets-list.d.ts +1 -1
  239. package/components/formula-editor/formula-description.d.ts +1 -1
  240. package/components/formula-editor/formula-editor.d.ts +2 -2
  241. package/components/formula-editor/formula-functions-list.d.ts +1 -1
  242. package/components/formula-editor/index.cjs +1 -1
  243. package/components/formula-editor/index.js +4 -4
  244. package/components/formula-editor-CtCvJkyS.cjs +218 -0
  245. package/components/formula-editor-KXxQlh2n.js +666 -0
  246. package/components/formula-field/formula-field.d.ts +2 -2
  247. package/components/formula-field/index.cjs +1 -1
  248. package/components/formula-field/index.js +2 -2
  249. package/components/formula-field-OcD4TWAn.js +40 -0
  250. package/components/formula-field-aiqX7nRp.cjs +20 -0
  251. package/components/formula-input-base-CGe2ABn6.cjs +49 -0
  252. package/components/formula-input-base-CQPGmISj.js +236 -0
  253. package/components/fr-BOivrXqX.cjs +20 -0
  254. package/components/fr-BSFpJ50_.js +465 -0
  255. package/components/funnel-chart-options.config-BVmrhzna.cjs +20 -0
  256. package/components/funnel-chart-options.config-PV1Hlu91.js +187 -0
  257. package/components/funnel-chart-positioning.config-BT-YoTgv.js +48 -0
  258. package/components/funnel-chart-positioning.config-C5Z3JkuS.cjs +20 -0
  259. package/components/funnel-chart-slots.config-B8zC6Q6_.cjs +20 -0
  260. package/components/funnel-chart-slots.config-_9HUPvTb.js +43 -0
  261. package/components/get-css-variable-CBXsAxR6.cjs +20 -0
  262. package/components/get-css-variable-DYnldi15.js +63 -0
  263. package/components/get-dataset-name-BGCvfcdY.js +27 -0
  264. package/components/get-dataset-name-EkeeFzI3.cjs +20 -0
  265. package/components/groupings-CrE-yp0S.js +52 -0
  266. package/components/groupings-dIFi0bJY.cjs +20 -0
  267. package/components/heat-map-options.config-CQY6t9AL.js +224 -0
  268. package/components/heat-map-options.config-xPdOcXDk.cjs +20 -0
  269. package/components/heat-map-positioning.config-BpFis567.js +48 -0
  270. package/components/heat-map-positioning.config-HPftgmdz.cjs +20 -0
  271. package/components/heat-map-slots.config-B4AswVSo.js +37 -0
  272. package/components/heat-map-slots.config-Wp_oS8JQ.cjs +20 -0
  273. package/components/heat-table-options.config-DPbTFoRn.cjs +20 -0
  274. package/components/heat-table-options.config-IlVPk4Q4.js +372 -0
  275. package/components/heat-table-positioning.config-Canc3aEE.js +55 -0
  276. package/components/heat-table-positioning.config-wkrm8Fbk.cjs +20 -0
  277. package/components/heat-table-slots.config-BN7rtHZG.cjs +20 -0
  278. package/components/heat-table-slots.config-CB509zU4.js +49 -0
  279. package/components/hexbin-map-options.config-CSFSqpMU.cjs +20 -0
  280. package/components/hexbin-map-options.config-vzw6ovva.js +276 -0
  281. package/components/hexbin-map-positioning.config-CBv6Lij5.js +48 -0
  282. package/components/hexbin-map-positioning.config-D0hAchxV.cjs +20 -0
  283. package/components/hexbin-map-slots.config-Dyse0pui.js +37 -0
  284. package/components/hexbin-map-slots.config-mx5zUTrA.cjs +20 -0
  285. package/components/icon-element-DpN-9yaN.cjs +20 -0
  286. package/components/icon-element-_jY440X2.js +85 -0
  287. package/components/image-options.config-Cmrsd8Yu.js +153 -0
  288. package/components/image-options.config-DZ5q1D63.cjs +20 -0
  289. package/components/image-slots.config-CVj-DM07.js +24 -0
  290. package/components/image-slots.config-ODQBVz5H.cjs +20 -0
  291. package/components/index.cjs +1 -1
  292. package/components/index.js +56 -56
  293. package/components/item-grid/helpers/grid-item-popover.d.ts +1 -1
  294. package/components/item-grid/helpers/grid-rendering.d.ts +2 -2
  295. package/components/item-grid/index.cjs +1 -1
  296. package/components/item-grid/index.js +2 -2
  297. package/components/item-grid/item-grid-item-actions-menu.d.ts +1 -1
  298. package/components/item-grid/item-grid.d.ts +1 -1
  299. package/components/item-grid/types.d.ts +1 -1
  300. package/components/item-grid-BXZXJV3g.cjs +339 -0
  301. package/components/item-grid-uWM-Unjx.js +8814 -0
  302. package/components/item-option/index.cjs +1 -1
  303. package/components/item-option/index.js +2 -2
  304. package/components/item-option/item-option.d.ts +1 -1
  305. package/components/item-option-CEwjJc1p.cjs +252 -0
  306. package/components/item-option-action-button-group/index.cjs +1 -1
  307. package/components/item-option-action-button-group/index.js +2 -2
  308. package/components/item-option-action-button-group/item-option-action-button-group.d.ts +2 -2
  309. package/components/item-option-action-button-group-BOxQFfBF.js +118 -0
  310. package/components/item-option-action-button-group-DXCVJqpt.cjs +53 -0
  311. package/components/item-option-base/item-option-base.d.ts +1 -1
  312. package/components/item-option-base-DKieCS-Y.cjs +56 -0
  313. package/components/item-option-base-Dr5-WxZ9.js +123 -0
  314. package/components/item-option-color-palette-picker/index.cjs +1 -1
  315. package/components/item-option-color-palette-picker/index.js +2 -2
  316. package/components/item-option-color-palette-picker/item-option-color-palette-picker.d.ts +2 -2
  317. package/components/item-option-color-palette-picker-7vSSpj5o.cjs +40 -0
  318. package/components/item-option-color-palette-picker-D_mABGWh.js +2041 -0
  319. package/components/item-option-color-picker/index.cjs +1 -1
  320. package/components/item-option-color-picker/index.js +2 -2
  321. package/components/item-option-color-picker/item-option-color-picker.d.ts +1 -1
  322. package/components/item-option-color-picker-COLBYeRy.js +87 -0
  323. package/components/item-option-color-picker-DMyNeD2e.cjs +34 -0
  324. package/components/item-option-color-range/index.cjs +1 -1
  325. package/components/item-option-color-range/index.js +2 -2
  326. package/components/item-option-color-range/item-option-color-range.d.ts +2 -2
  327. package/components/item-option-color-range-BFr0B6Vf.cjs +98 -0
  328. package/components/item-option-color-range-CueVlyT2.js +220 -0
  329. package/components/item-option-multi-language-field/index.cjs +1 -1
  330. package/components/item-option-multi-language-field/index.js +2 -2
  331. package/components/item-option-multi-language-field/item-option-multi-language-field.d.ts +1 -1
  332. package/components/item-option-multi-language-field-CMuQwrwQ.js +82 -0
  333. package/components/item-option-multi-language-field-q7txF5xA.cjs +33 -0
  334. package/components/item-option-number-field/index.cjs +1 -1
  335. package/components/item-option-number-field/index.js +2 -2
  336. package/components/item-option-number-field/item-option-number-field.d.ts +1 -1
  337. package/components/item-option-number-field-BODNSx66.js +102 -0
  338. package/components/item-option-number-field-DWeJWUxY.cjs +38 -0
  339. package/components/item-option-panel/index.cjs +1 -1
  340. package/components/item-option-panel/index.js +2 -2
  341. package/components/item-option-panel/item-option-panel.d.ts +2 -2
  342. package/components/item-option-panel-CxOfVI0z.js +183 -0
  343. package/components/item-option-panel-D0dxyUfE.cjs +67 -0
  344. package/components/item-option-picker/index.cjs +1 -1
  345. package/components/item-option-picker/index.js +2 -2
  346. package/components/item-option-picker/item-option-picker.d.ts +2 -2
  347. package/components/item-option-picker-BsP_0XyD.cjs +37 -0
  348. package/components/item-option-picker-CyX7qqrb.js +77 -0
  349. package/components/item-option-position-picker/index.cjs +1 -1
  350. package/components/item-option-position-picker/index.js +2 -2
  351. package/components/item-option-position-picker/item-option-position-picker.d.ts +1 -1
  352. package/components/item-option-position-picker-CcmBYyqF.cjs +32 -0
  353. package/components/item-option-position-picker-LOg6P4Gl.js +117 -0
  354. package/components/item-option-positions-number-field/index.cjs +1 -1
  355. package/components/item-option-positions-number-field/index.js +2 -2
  356. package/components/item-option-positions-number-field/item-option-positions-number-field.d.ts +1 -1
  357. package/components/item-option-positions-number-field-BCbWb1R6.js +164 -0
  358. package/components/item-option-positions-number-field-o3Qckgwd.cjs +49 -0
  359. package/components/item-option-radio-button-group/index.cjs +1 -1
  360. package/components/item-option-radio-button-group/index.js +2 -2
  361. package/components/item-option-radio-button-group/item-option-radio-button-group.d.ts +2 -2
  362. package/components/item-option-radio-button-group-CDebmEn3.js +74 -0
  363. package/components/item-option-radio-button-group-CjLhWTEJ.cjs +37 -0
  364. package/components/item-option-slider/index.cjs +1 -1
  365. package/components/item-option-slider/index.js +2 -2
  366. package/components/item-option-slider/item-option-slider.d.ts +1 -1
  367. package/components/item-option-slider-C9ZJZcdg.js +81 -0
  368. package/components/item-option-slider-CHbkJHLK.cjs +33 -0
  369. package/components/item-option-switch/index.cjs +1 -1
  370. package/components/item-option-switch/index.js +2 -2
  371. package/components/item-option-switch/item-option-switch.d.ts +1 -1
  372. package/components/item-option-switch-BVMOOWya.js +69 -0
  373. package/components/item-option-switch-FRAZWozp.cjs +30 -0
  374. package/components/item-option-text-field/index.cjs +1 -1
  375. package/components/item-option-text-field/index.js +2 -2
  376. package/components/item-option-text-field/item-option-text-field.d.ts +1 -1
  377. package/components/item-option-text-field-DkYqHfdJ.cjs +33 -0
  378. package/components/item-option-text-field-e6NLDlSq.js +80 -0
  379. package/components/item-option-uyAsPcfE.js +919 -0
  380. package/components/item-options-configs.cjs +1 -1
  381. package/components/item-options-configs.js +45 -45
  382. package/components/item-slot-drop/index.cjs +1 -1
  383. package/components/item-slot-drop/index.js +2 -2
  384. package/components/item-slot-drop/item-slot-drop.d.ts +2 -2
  385. package/components/item-slot-drop-BUCjEfJf.cjs +91 -0
  386. package/components/item-slot-drop-CoReI68M.js +324 -0
  387. package/components/item-slot-drop-panel/index.cjs +1 -1
  388. package/components/item-slot-drop-panel/index.js +2 -2
  389. package/components/item-slot-drop-panel/item-slot-drop-panel.d.ts +2 -2
  390. package/components/item-slot-drop-panel-CEI1q060.js +355 -0
  391. package/components/item-slot-drop-panel-DqekQtOr.cjs +57 -0
  392. package/components/item-slot-picker/index.cjs +1 -1
  393. package/components/item-slot-picker/index.js +2 -2
  394. package/components/item-slot-picker/item-slot-picker.d.ts +2 -2
  395. package/components/item-slot-picker-CvbXFh6Z.cjs +158 -0
  396. package/components/item-slot-picker-dy5hVID5.js +474 -0
  397. package/components/item-slot-picker-panel/index.cjs +1 -1
  398. package/components/item-slot-picker-panel/index.js +2 -2
  399. package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +2 -2
  400. package/components/item-slot-picker-panel-BUyp6Hbg.cjs +81 -0
  401. package/components/item-slot-picker-panel-CG0NyMDX.js +448 -0
  402. package/components/item-slots-configs.cjs +1 -1
  403. package/components/item-slots-configs.js +45 -45
  404. package/components/line-chart-options.config-1TpSJqeb.js +168 -0
  405. package/components/line-chart-options.config-BkK829A2.cjs +20 -0
  406. package/components/line-chart-positioning.config-61uNfPZs.js +55 -0
  407. package/components/line-chart-positioning.config-BNtGFWUK.cjs +20 -0
  408. package/components/line-chart-slots.config-CcCpwWzZ.js +55 -0
  409. package/components/line-chart-slots.config-vv66fcoE.cjs +20 -0
  410. package/components/load-data-fields-for-datasets-BNnr8x3m.js +42 -0
  411. package/components/load-data-fields-for-datasets-CW4Voiex.cjs +20 -0
  412. package/components/localized-mixin-CiBWThrZ.cjs +20 -0
  413. package/components/localized-mixin-EpweDrTk.js +45 -0
  414. package/components/marker-map-options.config-BfPFVxpD.cjs +20 -0
  415. package/components/marker-map-options.config-DTaax79J.js +117 -0
  416. package/components/marker-map-positioning.config-Bi5WCVgJ.js +48 -0
  417. package/components/marker-map-positioning.config-C2cL7uZJ.cjs +20 -0
  418. package/components/marker-map-slots.config-BOWmS_IZ.js +37 -0
  419. package/components/marker-map-slots.config-DigZk7lN.cjs +20 -0
  420. package/components/nl-DS4Y_g8B.cjs +20 -0
  421. package/components/nl-D_MleIlk.js +465 -0
  422. package/components/ohlc-chart-options.config-BsBVP-Io.cjs +20 -0
  423. package/components/ohlc-chart-options.config-Dfes8ROC.js +65 -0
  424. package/components/ohlc-chart-positioning.config-DFx99k9A.js +78 -0
  425. package/components/ohlc-chart-positioning.config-IAOfu4ue.cjs +20 -0
  426. package/components/ohlc-chart-slots.config-D3fzoQJH.cjs +20 -0
  427. package/components/ohlc-chart-slots.config-JRztPEXL.js +68 -0
  428. package/components/parallel-coordinates-plot-options.config--6iJkURT.cjs +20 -0
  429. package/components/parallel-coordinates-plot-options.config-NSk_HC0H.js +42 -0
  430. package/components/parallel-coordinates-plot-positioning.config-Bf0Leksw.cjs +20 -0
  431. package/components/parallel-coordinates-plot-positioning.config-C9TqUuGC.js +48 -0
  432. package/components/parallel-coordinates-plot-slots.config-pmbO5DnL.js +46 -0
  433. package/components/parallel-coordinates-plot-slots.config-s_tLqGA-.cjs +20 -0
  434. package/components/pivot-table-options.config-B3wYlzEq.js +245 -0
  435. package/components/pivot-table-options.config-CKGnnXa_.cjs +20 -0
  436. package/components/pivot-table-positioning.config-CPXqqtcR.js +55 -0
  437. package/components/pivot-table-positioning.config-D1R3VO88.cjs +20 -0
  438. package/components/pivot-table-slots.config-DaLfGOP9.js +55 -0
  439. package/components/pivot-table-slots.config-KlYXL90k.cjs +20 -0
  440. package/components/pragmatic-element-adapter-D0LRKx5U.js +1253 -0
  441. package/components/pragmatic-element-adapter-DdyH32ix.cjs +24 -0
  442. package/components/pyramid-chart-options.config-8QtjhcJC.cjs +20 -0
  443. package/components/pyramid-chart-options.config-DIyiyqGM.js +240 -0
  444. package/components/pyramid-chart-positioning.config-BfXdJS8g.cjs +20 -0
  445. package/components/pyramid-chart-positioning.config-JAUQpA0B.js +55 -0
  446. package/components/pyramid-chart-slots.config-CreUpxI2.cjs +20 -0
  447. package/components/pyramid-chart-slots.config-DtnUlw5y.js +50 -0
  448. package/components/radar-chart-options.config-DvW36_zk.cjs +20 -0
  449. package/components/radar-chart-options.config-UVOzUnVT.js +130 -0
  450. package/components/radar-chart-positioning.config-Bixdrod2.cjs +20 -0
  451. package/components/radar-chart-positioning.config-CdJSazt4.js +55 -0
  452. package/components/radar-chart-slots.config-B3oIp-8w.cjs +20 -0
  453. package/components/radar-chart-slots.config-CkLoeAV7.js +53 -0
  454. package/components/regular-table-options.config-B0WNqEjR.cjs +20 -0
  455. package/components/regular-table-options.config-CBvnxTdd.js +148 -0
  456. package/components/regular-table-slots.config-Cc6hL7iu.js +35 -0
  457. package/components/regular-table-slots.config-UwzWj6gg.cjs +20 -0
  458. package/components/route-map-options.config-CYNKz_Xm.cjs +20 -0
  459. package/components/route-map-options.config-DZrlGa5o.js +326 -0
  460. package/components/route-map-positioning.config-7aca5Iex.cjs +20 -0
  461. package/components/route-map-positioning.config-Bk_BndTS.js +66 -0
  462. package/components/route-map-slots.config-CQxB8gKC.js +59 -0
  463. package/components/route-map-slots.config-DfYT65BF.cjs +20 -0
  464. package/components/sankey-diagram-options.config-D49IZ1y3.cjs +20 -0
  465. package/components/sankey-diagram-options.config-s_QRVr1r.js +126 -0
  466. package/components/sankey-diagram-positioning.config-Bvus3RDi.cjs +20 -0
  467. package/components/sankey-diagram-positioning.config-DPgQELIu.js +66 -0
  468. package/components/sankey-diagram-slots.config-C9tIfWHU.js +61 -0
  469. package/components/sankey-diagram-slots.config-D-_u4w36.cjs +20 -0
  470. package/components/scatter-plot-options.config-BETVLevv.cjs +20 -0
  471. package/components/scatter-plot-options.config-DI4hlqi5.js +302 -0
  472. package/components/scatter-plot-positioning.config-D-ifHW9P.js +77 -0
  473. package/components/scatter-plot-positioning.config-DBDCDDad.cjs +20 -0
  474. package/components/scatter-plot-slots.config-CUURijrN.js +74 -0
  475. package/components/scatter-plot-slots.config-CrG6wQtV.cjs +20 -0
  476. package/components/search-filter-options.config-B-dGVPhS.cjs +20 -0
  477. package/components/search-filter-options.config-CPzfgUWV.js +103 -0
  478. package/components/search-filter-slots.config-DD119qkk.js +39 -0
  479. package/components/search-filter-slots.config-DP06ulJA.cjs +20 -0
  480. package/components/set-locale-DTFOOSog.cjs +20 -0
  481. package/components/set-locale-UK0ghkg9.js +43 -0
  482. package/components/slicer-filter-options.config-7OXpRWtw.cjs +20 -0
  483. package/components/slicer-filter-options.config-F2CZ8ckV.js +226 -0
  484. package/components/slicer-filter-positioning.config-0uGZ8EgN.js +48 -0
  485. package/components/slicer-filter-positioning.config-Bx2_7jxp.cjs +20 -0
  486. package/components/slicer-filter-slots.config-CHKpdJvF.cjs +20 -0
  487. package/components/slicer-filter-slots.config-D-BhCuA9.js +44 -0
  488. package/components/slider-filter-options.config-CRdbX1IJ.cjs +20 -0
  489. package/components/slider-filter-options.config-DO0HHK2l.js +72 -0
  490. package/components/slider-filter-slots.config-9R298H0t.cjs +20 -0
  491. package/components/slider-filter-slots.config-CGQG6JqK.js +43 -0
  492. package/components/slot-menu/index.cjs +1 -1
  493. package/components/slot-menu/index.js +2 -2
  494. package/components/slot-menu/slot-menu.d.ts +1 -1
  495. package/components/slot-menu-Cw5HJ_bk.js +404 -0
  496. package/components/slot-menu-DkyDLDSd.cjs +64 -0
  497. package/components/slot-menu-list/index.cjs +1 -1
  498. package/components/slot-menu-list/index.js +2 -2
  499. package/components/slot-menu-list/slot-menu-list.d.ts +1 -1
  500. package/components/slot-menu-list-BZllvntQ.cjs +38 -0
  501. package/components/slot-menu-list-CTJ-owp1.js +326 -0
  502. package/components/slots-config-BuHluMEl.js +77 -0
  503. package/components/slots-config-DVH0lz6t.cjs +20 -0
  504. package/components/speedometer-chart-options.config-BsIu28S3.cjs +20 -0
  505. package/components/speedometer-chart-options.config-jK_yQjy2.js +246 -0
  506. package/components/speedometer-chart-positioning.config-CNOKIw7e.cjs +20 -0
  507. package/components/speedometer-chart-positioning.config-FzFxMi0X.js +48 -0
  508. package/components/speedometer-chart-slots.config-CjkHAHNX.js +39 -0
  509. package/components/speedometer-chart-slots.config-S_hQm2MV.cjs +20 -0
  510. package/components/spike-map-options.config-aaiZyME6.cjs +20 -0
  511. package/components/spike-map-options.config-cj07bETE.js +413 -0
  512. package/components/spike-map-positioning.config-B4NYfmEw.js +55 -0
  513. package/components/spike-map-positioning.config-Bcdt8670.cjs +20 -0
  514. package/components/spike-map-slots.config-cKfaD6dQ.cjs +20 -0
  515. package/components/spike-map-slots.config-yMkdy-0w.js +47 -0
  516. package/components/strip-plot-options.config-DmAxeY2S.js +53 -0
  517. package/components/strip-plot-options.config-TB3rkoj2.cjs +20 -0
  518. package/components/strip-plot-positioning.config-BjcqWJoD.cjs +20 -0
  519. package/components/strip-plot-positioning.config-n9OIxpa_.js +48 -0
  520. package/components/strip-plot-slots.config-C07nIM5s.js +38 -0
  521. package/components/strip-plot-slots.config-DNYlrK_c.cjs +20 -0
  522. package/components/sunburst-chart-options.config-CLyQG-8x.js +160 -0
  523. package/components/sunburst-chart-options.config-Ckk_kY_s.cjs +20 -0
  524. package/components/sunburst-chart-positioning.config-BIpSCpSi.cjs +20 -0
  525. package/components/sunburst-chart-positioning.config-CcGOcwOK.js +48 -0
  526. package/components/sunburst-chart-slots.config-BU9ma0xm.js +38 -0
  527. package/components/sunburst-chart-slots.config-DkUUt5RF.cjs +20 -0
  528. package/components/symbol-map-options.config-56eoWz4w.cjs +20 -0
  529. package/components/symbol-map-options.config-I_gykFhh.js +157 -0
  530. package/components/symbol-map-positioning.config-DPv89eCY.cjs +20 -0
  531. package/components/symbol-map-positioning.config-H3n2ngaa.js +55 -0
  532. package/components/symbol-map-slots.config-CQJgV5bh.js +53 -0
  533. package/components/symbol-map-slots.config-DwNf547A.cjs +20 -0
  534. package/components/text-options.config-BwBCG2yo.cjs +20 -0
  535. package/components/text-options.config-DUMx63Ol.js +67 -0
  536. package/components/text-slots.config-CPghLc8b.cjs +20 -0
  537. package/components/text-slots.config-YmmXsb-0.js +24 -0
  538. package/components/treemap-chart-options.config-CAWPa5jK.js +184 -0
  539. package/components/treemap-chart-options.config-r6biULUj.cjs +20 -0
  540. package/components/treemap-chart-positioning.config-Dzp4TodY.js +55 -0
  541. package/components/treemap-chart-positioning.config-W2sl4gZ0.cjs +20 -0
  542. package/components/treemap-chart-slots.config-CS3ot6ZJ.cjs +20 -0
  543. package/components/treemap-chart-slots.config-QEVbKZyS.js +47 -0
  544. package/components/utils/base.cjs +1 -1
  545. package/components/utils/base.js +2 -2
  546. package/components/utils/store.cjs +1 -1
  547. package/components/utils/store.js +2 -2
  548. package/components/utils-3XO8ba12.cjs +20 -0
  549. package/components/utils-B6EE0gvH.js +313 -0
  550. package/components/utils.cjs +1 -1
  551. package/components/utils.js +3 -3
  552. package/components/v4-DIjJgmR0.js +49 -0
  553. package/components/venn-diagram-options.config-BamlR1qo.cjs +20 -0
  554. package/components/venn-diagram-options.config-KKD89q3q.js +24 -0
  555. package/components/venn-diagram-positioning.config-BLSj3JqA.js +55 -0
  556. package/components/venn-diagram-positioning.config-Bv3pFJIU.cjs +20 -0
  557. package/components/venn-diagram-slots.config-DYTmU8v2.cjs +20 -0
  558. package/components/venn-diagram-slots.config-DsIqVOI2.js +47 -0
  559. package/components/video-options.config-BhBpkaLJ.cjs +20 -0
  560. package/components/video-options.config-D2SEyNrP.js +127 -0
  561. package/components/video-slots.config-B680gLmP.js +24 -0
  562. package/components/video-slots.config-DMut7o7r.cjs +20 -0
  563. package/components/viz-item-menu/index.cjs +1 -1
  564. package/components/viz-item-menu/index.js +2 -2
  565. package/components/viz-item-menu/viz-item-menu.d.ts +2 -2
  566. package/components/viz-item-menu-CiEJJddu.js +170 -0
  567. package/components/viz-item-menu-Dry8xpRA.cjs +55 -0
  568. package/components/wordcloud-chart-options.config-DLN2RAEK.js +90 -0
  569. package/components/wordcloud-chart-options.config-DgH4JgN2.cjs +20 -0
  570. package/components/wordcloud-chart-positioning.config-DVPWXJXb.js +55 -0
  571. package/components/wordcloud-chart-positioning.config-ZTO2VLdY.cjs +20 -0
  572. package/components/wordcloud-chart-slots.config-V29v2Fhr.cjs +20 -0
  573. package/components/wordcloud-chart-slots.config-mFvqkiQE.js +45 -0
  574. package/custom-elements.json +47 -2
  575. package/package.json +2 -2
  576. package/react/utils/base/base.d.ts +1 -1
  577. package/react/utils/base/focusable.d.ts +1 -1
  578. package/react/utils/base/localized-mixin.d.ts +1 -1
  579. package/react/utils/base/sized-mixin.d.ts +1 -1
  580. package/react/utils/drag/pragmatic-element-adapter.d.ts +2 -0
  581. package/react/utils/drag/tests/pragmatic-element-adapter.first-import.test.d.ts +1 -0
  582. package/react/utils/drag/tests/pragmatic-element-adapter.test.d.ts +1 -0
  583. package/react/utils/formula/base/formula-base.d.ts +1 -1
  584. package/react/utils/formula/base/formula-input-base.d.ts +1 -1
  585. package/react/utils/formula/codemirror/actions.d.ts +13 -1
  586. package/react/utils/formula/codemirror/tests/actions.test.d.ts +1 -0
  587. package/react/utils/formula/render-explanation-tooltip.d.ts +1 -1
  588. package/react/utils/formula/store/formula-display-store.d.ts +9 -0
  589. package/react/utils/store/index.d.ts +5 -5
  590. package/react/utils/store/store-registry.d.ts +1 -1
  591. package/storybook/inject-global-vars.d.ts +1 -0
  592. package/types/ai-chat.types.d.ts +1 -0
  593. package/utils/base/base.d.ts +1 -1
  594. package/utils/base/focusable.d.ts +1 -1
  595. package/utils/base/localized-mixin.d.ts +1 -1
  596. package/utils/base/sized-mixin.d.ts +1 -1
  597. package/utils/drag/pragmatic-element-adapter.d.ts +2 -0
  598. package/utils/drag/tests/pragmatic-element-adapter.first-import.test.d.ts +1 -0
  599. package/utils/drag/tests/pragmatic-element-adapter.test.d.ts +1 -0
  600. package/utils/formula/base/formula-base.d.ts +1 -1
  601. package/utils/formula/base/formula-input-base.d.ts +1 -1
  602. package/utils/formula/codemirror/actions.d.ts +13 -1
  603. package/utils/formula/codemirror/tests/actions.test.d.ts +1 -0
  604. package/utils/formula/render-explanation-tooltip.d.ts +1 -1
  605. package/utils/formula/store/formula-display-store.d.ts +9 -0
  606. package/utils/store/index.d.ts +5 -5
  607. package/utils/store/store-registry.d.ts +1 -1
  608. package/components/adapter-BKowFrlw.cjs +0 -24
  609. package/components/adapter-uhkTBvxc.js +0 -1244
  610. package/components/ai-chat-B0pW6kHf.js +0 -3670
  611. package/components/ai-chat-BMsg63kL.cjs +0 -245
  612. package/components/ai-interaction-textarea-BdwiRaLH.cjs +0 -68
  613. package/components/ai-interaction-textarea-BrIlb9n1.js +0 -299
  614. package/components/area-chart-options.config-B_Kpww4P.js +0 -146
  615. package/components/area-chart-options.config-CJYI-zcZ.cjs +0 -20
  616. package/components/area-chart-positioning.config-Clvr_Aan.cjs +0 -20
  617. package/components/area-chart-positioning.config-CuPvdTc_.js +0 -55
  618. package/components/area-chart-slots.config-B56LJaky.cjs +0 -20
  619. package/components/area-chart-slots.config-D5Yy2L64.js +0 -55
  620. package/components/bar-chart-options.config-CZG7R2xR.js +0 -220
  621. package/components/bar-chart-options.config-D2a-U6kG.cjs +0 -20
  622. package/components/bar-chart-positioning.config-CqOU-wdj.js +0 -59
  623. package/components/bar-chart-positioning.config-Crwcy-yr.cjs +0 -20
  624. package/components/bar-chart-slots.config-CkOVmYcA.cjs +0 -20
  625. package/components/bar-chart-slots.config-DuJKoT7z.js +0 -50
  626. package/components/base-BwKUauGs.js +0 -249
  627. package/components/base-ZuhO2UZd.cjs +0 -20
  628. package/components/base-store-D0jbv0bE.js +0 -160
  629. package/components/base-store-ab2wBsBE.cjs +0 -20
  630. package/components/box-plot-options.config-DG4Rj5ue.js +0 -296
  631. package/components/box-plot-options.config-Di28EvZb.cjs +0 -20
  632. package/components/box-plot-positioning.config-Buxfxl5u.cjs +0 -20
  633. package/components/box-plot-positioning.config-CJi0zuFg.js +0 -48
  634. package/components/box-plot-slots.config-D6Q1vjez.js +0 -40
  635. package/components/box-plot-slots.config-DL-tTTn9.cjs +0 -20
  636. package/components/bubble-chart-options.config-CnpBrIo6.cjs +0 -20
  637. package/components/bubble-chart-options.config-DBD8wGaM.js +0 -115
  638. package/components/bubble-chart-positioning.config-3iE4D0XL.js +0 -55
  639. package/components/bubble-chart-positioning.config-DpR9mwIF.cjs +0 -20
  640. package/components/bubble-chart-slots.config-CHVjdEV-.js +0 -47
  641. package/components/bubble-chart-slots.config-smlOOwcK.cjs +0 -20
  642. package/components/bullet-chart-options.config-6nATAuC3.cjs +0 -20
  643. package/components/bullet-chart-options.config-Db2RSAw0.js +0 -75
  644. package/components/bullet-chart-positioning.config-4dG5YGWS.cjs +0 -20
  645. package/components/bullet-chart-positioning.config-O7IS72VB.js +0 -56
  646. package/components/bullet-chart-slots.config-BaTbWYvU.cjs +0 -20
  647. package/components/bullet-chart-slots.config-DI6jnYez.js +0 -46
  648. package/components/choropleth-map-options.config-CO4ouBHp.js +0 -348
  649. package/components/choropleth-map-options.config-CmtZtBAC.cjs +0 -20
  650. package/components/choropleth-map-positioning.config-BvKjYfiU.cjs +0 -20
  651. package/components/choropleth-map-positioning.config-Dlqf-3-f.js +0 -55
  652. package/components/choropleth-map-slots.config-C0xhs-tv.js +0 -53
  653. package/components/choropleth-map-slots.config-ClMcW8wV.cjs +0 -20
  654. package/components/circle-pack-chart-options.config-BA_G1sQ8.cjs +0 -20
  655. package/components/circle-pack-chart-options.config-w-zFKkVJ.js +0 -54
  656. package/components/circle-pack-chart-positioning.config-B6_Onx6i.cjs +0 -20
  657. package/components/circle-pack-chart-positioning.config-DNpMU7Z-.js +0 -48
  658. package/components/circle-pack-chart-slots.config-D9R0_7fs.js +0 -38
  659. package/components/circle-pack-chart-slots.config-IH2KV7z1.cjs +0 -20
  660. package/components/circular-gauge-options.config-BtP-YDIr.cjs +0 -20
  661. package/components/circular-gauge-options.config-E3qVXm97.js +0 -188
  662. package/components/circular-gauge-positioning.config-CX0pSRGc.cjs +0 -20
  663. package/components/circular-gauge-positioning.config-DMHwidbv.js +0 -48
  664. package/components/circular-gauge-slots.config-B6ajddW-.cjs +0 -20
  665. package/components/circular-gauge-slots.config-B_tmOIkT.js +0 -39
  666. package/components/color-CXw2IfjN.js +0 -3812
  667. package/components/color-range-utils-u4ziqRRA.js +0 -63
  668. package/components/column-chart-options.config-D_Ttu1dl.js +0 -219
  669. package/components/column-chart-options.config-eJ1Cexxe.cjs +0 -20
  670. package/components/column-chart-positioning.config-5K8NNZ1J.cjs +0 -20
  671. package/components/column-chart-positioning.config-CWqxK8FS.js +0 -55
  672. package/components/column-chart-slots.config-BY6y_rvE.cjs +0 -20
  673. package/components/column-chart-slots.config-D5RWHFCh.js +0 -50
  674. package/components/combination-chart-options.config-C3kZ2fpK.cjs +0 -20
  675. package/components/combination-chart-options.config-vd2fpx3A.js +0 -87
  676. package/components/combination-chart-positioning.config-6Jw9GWdP.js +0 -48
  677. package/components/combination-chart-positioning.config-BRU6ecRd.cjs +0 -20
  678. package/components/combination-chart-slots.config-Ciza_y3a.cjs +0 -20
  679. package/components/combination-chart-slots.config-ClLsPTGA.js +0 -43
  680. package/components/conditional-number-options.config-CadHLi0m.cjs +0 -20
  681. package/components/conditional-number-options.config-CfvfFh2O.js +0 -205
  682. package/components/conditional-number-positioning.config-BnuBruTt.cjs +0 -20
  683. package/components/conditional-number-positioning.config-BpWa0OTR.js +0 -48
  684. package/components/conditional-number-slots.config-Bq-f8m3m.js +0 -39
  685. package/components/conditional-number-slots.config-CWX6OuUa.cjs +0 -20
  686. package/components/data-broker-BH5WDG0j.cjs +0 -20
  687. package/components/data-broker-CVDImE1j.js +0 -1674
  688. package/components/data-field-TXDuIrVY.js +0 -121
  689. package/components/data-field-hLReNkXW.cjs +0 -54
  690. package/components/data-field-level-BsmyaMeC.cjs +0 -55
  691. package/components/data-field-level-HHH9hMmb.js +0 -246
  692. package/components/data-field-panel-DxbDbMKy.cjs +0 -87
  693. package/components/data-field-panel-DyNtkiMX.js +0 -385
  694. package/components/data-fields-select-CPAUibFD.js +0 -263
  695. package/components/data-fields-select-tOKVkjkh.cjs +0 -41
  696. package/components/dataset-icon-BXEgg_8O.js +0 -125
  697. package/components/dataset-selector-list-B3pSpE_Y.js +0 -313
  698. package/components/dataset-selector-list-MO9cYlwk.cjs +0 -75
  699. package/components/dataset-selector-row-BIuDsjRv.cjs +0 -79
  700. package/components/dataset-selector-row-Dve-Xb5j.js +0 -273
  701. package/components/date-comparison-filter-options.config--clPxHFt.cjs +0 -20
  702. package/components/date-comparison-filter-options.config-DQy6LWo_.js +0 -126
  703. package/components/date-comparison-filter-slots.config-CktrdkA7.js +0 -33
  704. package/components/date-comparison-filter-slots.config-KO9B0lfS.cjs +0 -20
  705. package/components/date-filter-options.config-BdNFe-Ds.cjs +0 -20
  706. package/components/date-filter-options.config-DvMJ6WSe.js +0 -118
  707. package/components/date-filter-slots.config-B_Oa8lH4.js +0 -37
  708. package/components/date-filter-slots.config-BrQoD-EF.cjs +0 -20
  709. package/components/de-CFeKdBZ_.cjs +0 -20
  710. package/components/de-bxx-Ya_Y.js +0 -464
  711. package/components/decorate-CaYbmmmm.js +0 -28
  712. package/components/default-acceptable-data-field-types-rfTLQio7.cjs +0 -20
  713. package/components/display-settings-BtLYNbeD.js +0 -272
  714. package/components/display-settings-DNwcbq4m.cjs +0 -120
  715. package/components/display-settings-binning-6PvcJnfm.js +0 -110
  716. package/components/display-settings-binning-UqBDqKHg.cjs +0 -56
  717. package/components/display-settings-datetime-BHjfhUcN.cjs +0 -217
  718. package/components/display-settings-datetime-D7VTKM4O.js +0 -413
  719. package/components/display-settings-grand-totals-Bg1bAe4Y.cjs +0 -44
  720. package/components/display-settings-grand-totals-N8z2xbbZ.js +0 -89
  721. package/components/display-settings-numeric-BtXC1gPj.js +0 -479
  722. package/components/display-settings-numeric-D5hQU-sd.cjs +0 -190
  723. package/components/display-settings-period-over-period-CSLfTV7e.js +0 -433
  724. package/components/display-settings-period-over-period-DzSsF1nw.cjs +0 -229
  725. package/components/donut-chart-options.config-C2E9YnqT.js +0 -207
  726. package/components/donut-chart-options.config-K-HkE7sL.cjs +0 -20
  727. package/components/donut-chart-positioning.config-BSb68HFR.cjs +0 -20
  728. package/components/donut-chart-positioning.config-Dx3jt1n_.js +0 -48
  729. package/components/donut-chart-slots.config-B_wEHJUU.js +0 -39
  730. package/components/donut-chart-slots.config-RxPnpO6M.cjs +0 -20
  731. package/components/dropdown-filter-options.config-B-Vvy0Nq.cjs +0 -20
  732. package/components/dropdown-filter-options.config-TdCD9uPT.js +0 -153
  733. package/components/dropdown-filter-slots.config-BBZChIHC.cjs +0 -20
  734. package/components/dropdown-filter-slots.config-D2g89-3k.js +0 -38
  735. package/components/en-B34alchz.cjs +0 -20
  736. package/components/en-GB-B3xz84vF.cjs +0 -20
  737. package/components/en-US-B34alchz.cjs +0 -20
  738. package/components/es-DelFOUQS.js +0 -464
  739. package/components/es-fAEaQEhg.cjs +0 -20
  740. package/components/evolution-number-options.config-Bt1FZqqQ.cjs +0 -20
  741. package/components/evolution-number-options.config-CiKzbVIu.js +0 -228
  742. package/components/evolution-number-positioning.config-BA8aL9iJ.js +0 -48
  743. package/components/evolution-number-positioning.config-DQbhwiGv.cjs +0 -20
  744. package/components/evolution-number-slots.config-CYxdcD-x.cjs +0 -20
  745. package/components/evolution-number-slots.config-DfsGuiu7.js +0 -37
  746. package/components/filter-expression-picker-BlzebHtT.js +0 -425
  747. package/components/filter-expression-picker-Co7iUnwo.cjs +0 -38
  748. package/components/filter-item-BIa9Y1TU.js +0 -242
  749. package/components/filter-item-DiuMzccR.cjs +0 -58
  750. package/components/filter-value-picker-BdsGUgBl.cjs +0 -60
  751. package/components/filter-value-picker-DV4IRVag.js +0 -151
  752. package/components/filter-value-picker-datetime-DvV2PR3B.cjs +0 -42
  753. package/components/filter-value-picker-datetime-_EDhhzr_.js +0 -139
  754. package/components/filter-value-picker-hierarchy-CgYAWQ-g.js +0 -232
  755. package/components/filter-value-picker-hierarchy-CqZXOE2D.cjs +0 -47
  756. package/components/filter-value-picker-numeric-C4VF0Kot.js +0 -219
  757. package/components/filter-value-picker-numeric-t24bCjgg.cjs +0 -48
  758. package/components/filters-C10dtogk.cjs +0 -150
  759. package/components/filters-DJ9eq7Xq.js +0 -400
  760. package/components/formatter-8m-wrIM-.cjs +0 -20
  761. package/components/formula-BgvJ0GQ4.js +0 -138
  762. package/components/formula-DHQae3tc.cjs +0 -45
  763. package/components/formula-codemirror-BZTsmrYL.cjs +0 -214
  764. package/components/formula-codemirror-iySUHkZq.js +0 -11969
  765. package/components/formula-display-store-CTXbAK2f.cjs +0 -20
  766. package/components/formula-display-store-CcBMayNE.js +0 -1086
  767. package/components/formula-editor-L1af23DU.cjs +0 -218
  768. package/components/formula-editor-YtSlmUwM.js +0 -664
  769. package/components/formula-field-CpKC6bbr.cjs +0 -20
  770. package/components/formula-field-DdZ4ll8e.js +0 -40
  771. package/components/formula-input-base-B18f5b5l.js +0 -240
  772. package/components/formula-input-base-BlHhsmsp.cjs +0 -49
  773. package/components/fr-5jK3qviC.cjs +0 -20
  774. package/components/fr-DjXcKdWm.js +0 -464
  775. package/components/funnel-chart-options.config-BAIgb6x9.cjs +0 -20
  776. package/components/funnel-chart-options.config-Bj0ziWXc.js +0 -187
  777. package/components/funnel-chart-positioning.config-DtUWAc7T.js +0 -48
  778. package/components/funnel-chart-positioning.config-w2JdWOJK.cjs +0 -20
  779. package/components/funnel-chart-slots.config-CSI5mdma.cjs +0 -20
  780. package/components/funnel-chart-slots.config-DJ6qZQsu.js +0 -43
  781. package/components/get-css-variable-DZl6AFiB.js +0 -63
  782. package/components/get-css-variable-f6ZYOxm7.cjs +0 -20
  783. package/components/get-dataset-name-CZU5eeyo.cjs +0 -20
  784. package/components/get-dataset-name-gEWlDRD5.js +0 -27
  785. package/components/groupings-Txqk_wHs.js +0 -52
  786. package/components/groupings-n-soRcZA.cjs +0 -20
  787. package/components/heat-map-options.config-BBhV91tE.js +0 -224
  788. package/components/heat-map-options.config-Ct-93RVQ.cjs +0 -20
  789. package/components/heat-map-positioning.config-BCsBYI1C.cjs +0 -20
  790. package/components/heat-map-positioning.config-DIQNlbm1.js +0 -48
  791. package/components/heat-map-slots.config-CHViaLrX.js +0 -37
  792. package/components/heat-map-slots.config-D0mwjImu.cjs +0 -20
  793. package/components/heat-table-options.config-7IS5wa9l.cjs +0 -20
  794. package/components/heat-table-options.config-BWPdiZpT.js +0 -372
  795. package/components/heat-table-positioning.config-B6OntYKu.js +0 -55
  796. package/components/heat-table-positioning.config-DKMu_7fQ.cjs +0 -20
  797. package/components/heat-table-slots.config-CH6Q9203.cjs +0 -20
  798. package/components/heat-table-slots.config-r7zJ0gne.js +0 -49
  799. package/components/hexbin-map-options.config-BFX7W2GB.js +0 -276
  800. package/components/hexbin-map-options.config-CUAv6zuD.cjs +0 -20
  801. package/components/hexbin-map-positioning.config-BtxDUhio.cjs +0 -20
  802. package/components/hexbin-map-positioning.config-D9jHfncD.js +0 -48
  803. package/components/hexbin-map-slots.config-B1I0HYI_.js +0 -37
  804. package/components/hexbin-map-slots.config-BdkQVzI7.cjs +0 -20
  805. package/components/icon-element-2Qrd4w7o.cjs +0 -20
  806. package/components/icon-element-DYQjN0TG.js +0 -69
  807. package/components/image-options.config-DXqA7sAa.cjs +0 -20
  808. package/components/image-options.config-rz1AE25q.js +0 -153
  809. package/components/image-slots.config-DoY0rzAB.js +0 -24
  810. package/components/image-slots.config-DprzKxj3.cjs +0 -20
  811. package/components/item-grid-Hcahqw8V.cjs +0 -320
  812. package/components/item-grid-bjpi9sSB.js +0 -8190
  813. package/components/item-option-B7cG4nHM.js +0 -969
  814. package/components/item-option-CiMdtMdo.cjs +0 -252
  815. package/components/item-option-action-button-group-BtS9Ho3y.cjs +0 -53
  816. package/components/item-option-action-button-group-CvT79MQj.js +0 -118
  817. package/components/item-option-base-CWK-MoDz.js +0 -123
  818. package/components/item-option-base-vrkMCFHF.cjs +0 -56
  819. package/components/item-option-color-palette-picker-BlhO3Kri.cjs +0 -40
  820. package/components/item-option-color-palette-picker-CbtgwN1J.js +0 -2041
  821. package/components/item-option-color-picker-C-D1vohW.cjs +0 -34
  822. package/components/item-option-color-picker-CccU9Lry.js +0 -87
  823. package/components/item-option-color-range-CbKK4m6t.cjs +0 -98
  824. package/components/item-option-color-range-DwP4zb0q.js +0 -220
  825. package/components/item-option-multi-language-field-C71-iMVr.js +0 -82
  826. package/components/item-option-multi-language-field-CfPtLuVH.cjs +0 -33
  827. package/components/item-option-number-field-0XRgAD5B.cjs +0 -38
  828. package/components/item-option-number-field-CP8SMZMR.js +0 -102
  829. package/components/item-option-panel-BwYSwYSj.js +0 -183
  830. package/components/item-option-panel-JQ26EogB.cjs +0 -67
  831. package/components/item-option-picker-BJsgcTnE.cjs +0 -37
  832. package/components/item-option-picker-DIWqO_S7.js +0 -77
  833. package/components/item-option-position-picker-BdT0UnEB.cjs +0 -32
  834. package/components/item-option-position-picker-DidnyN7_.js +0 -117
  835. package/components/item-option-positions-number-field-B3ZRQ-GZ.js +0 -164
  836. package/components/item-option-positions-number-field-DPMVuUMn.cjs +0 -49
  837. package/components/item-option-radio-button-group-BpAYKUcc.js +0 -74
  838. package/components/item-option-radio-button-group-D_tAaLOQ.cjs +0 -37
  839. package/components/item-option-slider-CQI88p3O.js +0 -81
  840. package/components/item-option-slider-DQx3yabJ.cjs +0 -33
  841. package/components/item-option-switch-BZ9JDF_Q.cjs +0 -30
  842. package/components/item-option-switch-CZ00Bd-L.js +0 -69
  843. package/components/item-option-text-field-BbxPFuHZ.cjs +0 -33
  844. package/components/item-option-text-field-C8VTaY4N.js +0 -80
  845. package/components/item-slot-drop-BhCP8AHW.cjs +0 -91
  846. package/components/item-slot-drop-C3R8PW1h.js +0 -324
  847. package/components/item-slot-drop-panel-DF5odPJm.cjs +0 -57
  848. package/components/item-slot-drop-panel-jKBmZxM0.js +0 -355
  849. package/components/item-slot-picker-CPz4v6dj.js +0 -474
  850. package/components/item-slot-picker-DQJ-lnZM.cjs +0 -158
  851. package/components/item-slot-picker-panel-CML1pMrC.js +0 -448
  852. package/components/item-slot-picker-panel-sdxrlk9Z.cjs +0 -81
  853. package/components/line-chart-options.config-Ca6kHY7o.js +0 -168
  854. package/components/line-chart-options.config-DKQ1k4lg.cjs +0 -20
  855. package/components/line-chart-positioning.config-CIj2s14W.cjs +0 -20
  856. package/components/line-chart-positioning.config-DyWkf5Op.js +0 -55
  857. package/components/line-chart-slots.config-BvCDJoDq.js +0 -55
  858. package/components/line-chart-slots.config-Cjp4btvG.cjs +0 -20
  859. package/components/load-data-fields-for-datasets-BVGaku2J.cjs +0 -20
  860. package/components/load-data-fields-for-datasets-DeXLqWt4.js +0 -42
  861. package/components/localized-mixin-BOaeCN9a.js +0 -45
  862. package/components/localized-mixin-BPOcHne5.cjs +0 -20
  863. package/components/marker-map-options.config-CnNEwDgO.js +0 -117
  864. package/components/marker-map-options.config-DBPPcGN4.cjs +0 -20
  865. package/components/marker-map-positioning.config-BlaqR84i.js +0 -48
  866. package/components/marker-map-positioning.config-DyPBnrcf.cjs +0 -20
  867. package/components/marker-map-slots.config-B7nHqX9l.js +0 -37
  868. package/components/marker-map-slots.config-BOQ8AwRv.cjs +0 -20
  869. package/components/nl-CnJ7GWFR.js +0 -464
  870. package/components/nl-DWGcdw3F.cjs +0 -20
  871. package/components/ohlc-chart-options.config-D9h-VLdq.cjs +0 -20
  872. package/components/ohlc-chart-options.config-DHp9okh1.js +0 -65
  873. package/components/ohlc-chart-positioning.config-C1Ib-YRX.js +0 -78
  874. package/components/ohlc-chart-positioning.config-nhYy7sdP.cjs +0 -20
  875. package/components/ohlc-chart-slots.config-BuGrqWZO.js +0 -68
  876. package/components/ohlc-chart-slots.config-CUBUexI-.cjs +0 -20
  877. package/components/parallel-coordinates-plot-options.config-Cd4-eVOM.js +0 -42
  878. package/components/parallel-coordinates-plot-options.config-ovgY0A7j.cjs +0 -20
  879. package/components/parallel-coordinates-plot-positioning.config-B7iWes6n.cjs +0 -20
  880. package/components/parallel-coordinates-plot-positioning.config-DzkH_hSg.js +0 -48
  881. package/components/parallel-coordinates-plot-slots.config-BXZ-NmbH.cjs +0 -20
  882. package/components/parallel-coordinates-plot-slots.config-Cg6Bf_7v.js +0 -46
  883. package/components/pivot-table-options.config-BxKo1DCU.cjs +0 -20
  884. package/components/pivot-table-options.config-DzjA1c1d.js +0 -245
  885. package/components/pivot-table-positioning.config-BAeF1Wr5.cjs +0 -20
  886. package/components/pivot-table-positioning.config-QmdQVsVL.js +0 -55
  887. package/components/pivot-table-slots.config-DNkWahjt.js +0 -55
  888. package/components/pivot-table-slots.config-VxbOGtmB.cjs +0 -20
  889. package/components/pyramid-chart-options.config-B-lK7so6.js +0 -240
  890. package/components/pyramid-chart-options.config-lioHQSoq.cjs +0 -20
  891. package/components/pyramid-chart-positioning.config-Cwme_V9D.cjs +0 -20
  892. package/components/pyramid-chart-positioning.config-n6MctfWS.js +0 -55
  893. package/components/pyramid-chart-slots.config-CN_Q2YsP.cjs +0 -20
  894. package/components/pyramid-chart-slots.config-Cc4uHAA7.js +0 -50
  895. package/components/radar-chart-options.config-5pUTkc2q.js +0 -130
  896. package/components/radar-chart-options.config-DhnoFEzo.cjs +0 -20
  897. package/components/radar-chart-positioning.config-CK4dsAUh.js +0 -55
  898. package/components/radar-chart-positioning.config-DKMjOOy9.cjs +0 -20
  899. package/components/radar-chart-slots.config-15nYsk9b.js +0 -53
  900. package/components/radar-chart-slots.config-BISYnTom.cjs +0 -20
  901. package/components/regular-table-options.config-Bk6CBPgj.cjs +0 -20
  902. package/components/regular-table-options.config-rpofl157.js +0 -148
  903. package/components/regular-table-slots.config-BU6Ff96U.cjs +0 -20
  904. package/components/regular-table-slots.config-Bd3lFCir.js +0 -35
  905. package/components/route-map-options.config-CAi93e7I.cjs +0 -20
  906. package/components/route-map-options.config-D51lA0jk.js +0 -326
  907. package/components/route-map-positioning.config-CwXaSsNt.js +0 -66
  908. package/components/route-map-positioning.config-VnefcNLZ.cjs +0 -20
  909. package/components/route-map-slots.config-C2grgzNN.js +0 -59
  910. package/components/route-map-slots.config-Dznp0DT3.cjs +0 -20
  911. package/components/sankey-diagram-options.config-Bn9fmYgp.js +0 -126
  912. package/components/sankey-diagram-options.config-D7ZrZV0g.cjs +0 -20
  913. package/components/sankey-diagram-positioning.config-C8r1HXKi.cjs +0 -20
  914. package/components/sankey-diagram-positioning.config-M7BTpPC-.js +0 -66
  915. package/components/sankey-diagram-slots.config-D2KTJ8Oc.js +0 -61
  916. package/components/sankey-diagram-slots.config-TKCUvHOD.cjs +0 -20
  917. package/components/scatter-plot-options.config-DXqKb34r.cjs +0 -20
  918. package/components/scatter-plot-options.config-EP012piY.js +0 -302
  919. package/components/scatter-plot-positioning.config-CGlwev2w.cjs +0 -20
  920. package/components/scatter-plot-positioning.config-TW95PU_c.js +0 -77
  921. package/components/scatter-plot-slots.config-CPsk9FUg.cjs +0 -20
  922. package/components/scatter-plot-slots.config-DEhD9SG5.js +0 -74
  923. package/components/search-filter-options.config-C1fHQAFh.js +0 -103
  924. package/components/search-filter-options.config-DojMfRR_.cjs +0 -20
  925. package/components/search-filter-slots.config-AhwsTdYC.cjs +0 -20
  926. package/components/search-filter-slots.config-DmHZICqg.js +0 -39
  927. package/components/set-locale-C67nRXJu.cjs +0 -20
  928. package/components/set-locale-DA368j-c.js +0 -43
  929. package/components/slicer-filter-options.config-B2hLQJrk.js +0 -226
  930. package/components/slicer-filter-options.config-BhLn4U1W.cjs +0 -20
  931. package/components/slicer-filter-positioning.config-B3HV3P5V.cjs +0 -20
  932. package/components/slicer-filter-positioning.config-SW3t4sXb.js +0 -48
  933. package/components/slicer-filter-slots.config-CzhdAIIr.js +0 -44
  934. package/components/slicer-filter-slots.config-zV15NWWS.cjs +0 -20
  935. package/components/slider-filter-options.config-B8am9mmE.cjs +0 -20
  936. package/components/slider-filter-options.config-CfkVE6rN.js +0 -72
  937. package/components/slider-filter-slots.config-D9Hra0zE.cjs +0 -20
  938. package/components/slider-filter-slots.config-Dz3If02y.js +0 -43
  939. package/components/slot-menu-BX_79i8j.cjs +0 -64
  940. package/components/slot-menu-D5ZpNhRn.js +0 -400
  941. package/components/slot-menu-list--vSUiSqX.js +0 -325
  942. package/components/slot-menu-list-Fs6XHhqt.cjs +0 -38
  943. package/components/slots-config-K2g0-7Uj.js +0 -77
  944. package/components/slots-config-YdyClHLc.cjs +0 -20
  945. package/components/speedometer-chart-options.config-B_Tf2tVD.js +0 -246
  946. package/components/speedometer-chart-options.config-DEW_D9w1.cjs +0 -20
  947. package/components/speedometer-chart-positioning.config-CTgIInxK.cjs +0 -20
  948. package/components/speedometer-chart-positioning.config-Cf7VkFvv.js +0 -48
  949. package/components/speedometer-chart-slots.config-1BqQZ2vP.cjs +0 -20
  950. package/components/speedometer-chart-slots.config-CofgaLuF.js +0 -39
  951. package/components/spike-map-options.config-LPAyKMHe.cjs +0 -20
  952. package/components/spike-map-options.config-ZjIYwDiU.js +0 -413
  953. package/components/spike-map-positioning.config-BDWoRvI1.cjs +0 -20
  954. package/components/spike-map-positioning.config-tMMqD_L6.js +0 -55
  955. package/components/spike-map-slots.config-B7OehIoc.cjs +0 -20
  956. package/components/spike-map-slots.config-DGyGo3Xz.js +0 -47
  957. package/components/strip-plot-options.config-DEDTQZJZ.js +0 -53
  958. package/components/strip-plot-options.config-vBd38UQs.cjs +0 -20
  959. package/components/strip-plot-positioning.config-CflwBF0n.cjs +0 -20
  960. package/components/strip-plot-positioning.config-cyY2RoOQ.js +0 -48
  961. package/components/strip-plot-slots.config-CAU0z3q4.cjs +0 -20
  962. package/components/strip-plot-slots.config-DChE-zkv.js +0 -38
  963. package/components/sunburst-chart-options.config-CUFOuT2J.cjs +0 -20
  964. package/components/sunburst-chart-options.config-CV2e-xgJ.js +0 -160
  965. package/components/sunburst-chart-positioning.config-BrkN0iSP.cjs +0 -20
  966. package/components/sunburst-chart-positioning.config-CXqQ3rZw.js +0 -48
  967. package/components/sunburst-chart-slots.config-BCNUNkd9.cjs +0 -20
  968. package/components/sunburst-chart-slots.config-BX9597vW.js +0 -38
  969. package/components/symbol-map-options.config-CR07hvK0.cjs +0 -20
  970. package/components/symbol-map-options.config-DLD-geyT.js +0 -157
  971. package/components/symbol-map-positioning.config-B4yTOZ45.cjs +0 -20
  972. package/components/symbol-map-positioning.config-BhZjksQ9.js +0 -55
  973. package/components/symbol-map-slots.config-CEjSrzR2.js +0 -53
  974. package/components/symbol-map-slots.config-Dz_tor5P.cjs +0 -20
  975. package/components/text-options.config-DNTShSV3.js +0 -67
  976. package/components/text-options.config-JI2D64hs.cjs +0 -20
  977. package/components/text-slots.config-0A6csMfd.cjs +0 -20
  978. package/components/text-slots.config-BJiU8E1x.js +0 -24
  979. package/components/treemap-chart-options.config-BrTLnBOI.js +0 -184
  980. package/components/treemap-chart-options.config-p21eSXKG.cjs +0 -20
  981. package/components/treemap-chart-positioning.config-BTOpuIyU.js +0 -55
  982. package/components/treemap-chart-positioning.config-Cbu39jHd.cjs +0 -20
  983. package/components/treemap-chart-slots.config-BJqqnUEF.cjs +0 -20
  984. package/components/treemap-chart-slots.config-CQO0FSsI.js +0 -47
  985. package/components/utils-Ab_wibuA.cjs +0 -20
  986. package/components/utils-CO7Bx0Nw.js +0 -313
  987. package/components/v4-BK7K-jy_.js +0 -49
  988. package/components/validate-CJkVJaL1.cjs +0 -20
  989. package/components/validate-J3P0rm_n.js +0 -28
  990. package/components/venn-diagram-options.config-CdeK65gy.js +0 -24
  991. package/components/venn-diagram-options.config-EmRhf40r.cjs +0 -20
  992. package/components/venn-diagram-positioning.config-G91Md8yt.cjs +0 -20
  993. package/components/venn-diagram-positioning.config-xddK9cxF.js +0 -55
  994. package/components/venn-diagram-slots.config-DMcOPrkK.js +0 -47
  995. package/components/venn-diagram-slots.config-MpkJTf5q.cjs +0 -20
  996. package/components/video-options.config-D5mS3aJI.js +0 -127
  997. package/components/video-options.config-Dh_lU4c1.cjs +0 -20
  998. package/components/video-slots.config-Bmh6mcUv.cjs +0 -20
  999. package/components/video-slots.config-D3OXZQ07.js +0 -24
  1000. package/components/viz-item-menu-B2pAY_Jv.cjs +0 -55
  1001. package/components/viz-item-menu-D09pw6dZ.js +0 -170
  1002. package/components/wordcloud-chart-options.config-IOrRDdoY.js +0 -90
  1003. package/components/wordcloud-chart-options.config-mx2CbmrI.cjs +0 -20
  1004. package/components/wordcloud-chart-positioning.config-DAYAximq.cjs +0 -20
  1005. package/components/wordcloud-chart-positioning.config-DjUW_gBa.js +0 -55
  1006. package/components/wordcloud-chart-slots.config-BF_R9ykk.js +0 -45
  1007. package/components/wordcloud-chart-slots.config-C303nwAz.cjs +0 -20
  1008. /package/components/{chunk-mLOUI7ql.cjs → rolldown-runtime-mLOUI7ql.cjs} +0 -0
@@ -0,0 +1,3685 @@
1
+ /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
+ *
3
+ * Copyright © 2026 Luzmo
4
+ * All rights reserved.
5
+ * Luzmo web components (“Luzmo Web Components”)
6
+ * must be used according to the Luzmo Terms of Service.
7
+ * This license allows users with a current active Luzmo account
8
+ * to use the Luzmo Web Components. This license terminates
9
+ * automatically if a user no longer has an active Luzmo account.
10
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ * SOFTWARE.
19
+ * */
20
+ import { i as e } from "./base-B_wdCOxV.js";
21
+ import { t } from "./decorate-DyMgX_Uh.js";
22
+ import "./ai-interaction-textarea-DkBglh6Q.js";
23
+ import { msg as n } from "@lit/localize/lit-localize";
24
+ import { luzmoEllipsisVertical as r, luzmoIcon as i, luzmoSpin as a } from "@luzmo/icons";
25
+ import "@luzmo/lucero/chat-message";
26
+ import "@luzmo/lucero/overlay";
27
+ import "@luzmo/lucero/popover";
28
+ import "@luzmo/lucero/progress-steps";
29
+ import { html as o, nothing as s, unsafeCSS as c } from "lit";
30
+ import { property as l, state as u } from "lit/decorators.js";
31
+ import { unsafeHTML as d } from "lit/directives/unsafe-html.js";
32
+ import "@luzmo/lucero/action-button";
33
+ //#region node_modules/dompurify/dist/purify.es.mjs
34
+ function ee(e, t) {
35
+ (t == null || t > e.length) && (t = e.length);
36
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
37
+ return r;
38
+ }
39
+ function te(e) {
40
+ if (Array.isArray(e)) return e;
41
+ }
42
+ function ne(e, t) {
43
+ var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
44
+ if (n != null) {
45
+ var r, i, a, o, s = [], c = !0, l = !1;
46
+ try {
47
+ if (a = (n = n.call(e)).next, t !== 0) for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
48
+ } catch (e) {
49
+ l = !0, i = e;
50
+ } finally {
51
+ try {
52
+ if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
53
+ } finally {
54
+ if (l) throw i;
55
+ }
56
+ }
57
+ return s;
58
+ }
59
+ }
60
+ function re() {
61
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
62
+ }
63
+ function ie(e, t) {
64
+ return te(e) || ne(e, t) || ae(e, t) || re();
65
+ }
66
+ function ae(e, t) {
67
+ if (e) {
68
+ if (typeof e == "string") return ee(e, t);
69
+ var n = {}.toString.call(e).slice(8, -1);
70
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? ee(e, t) : void 0;
71
+ }
72
+ }
73
+ var oe = Object.entries, se = Object.setPrototypeOf, f = Object.isFrozen, p = Object.getPrototypeOf, m = Object.getOwnPropertyDescriptor, h = Object.freeze, g = Object.seal, ce = Object.create, _ = typeof Reflect < "u" && Reflect, le = _.apply, ue = _.construct;
74
+ h ||= function(e) {
75
+ return e;
76
+ }, g ||= function(e) {
77
+ return e;
78
+ }, le ||= function(e, t) {
79
+ var n = [...arguments].slice(2);
80
+ return e.apply(t, n);
81
+ }, ue ||= function(e) {
82
+ return new e(...[...arguments].slice(1));
83
+ };
84
+ var de = x(Array.prototype.forEach), fe = x(Array.prototype.lastIndexOf), pe = x(Array.prototype.pop), me = x(Array.prototype.push), he = x(Array.prototype.splice), ge = Array.isArray, _e = x(String.prototype.toLowerCase), ve = x(String.prototype.toString), ye = x(String.prototype.match), be = x(String.prototype.replace), xe = x(String.prototype.indexOf), Se = x(String.prototype.trim), Ce = x(Number.prototype.toString), we = x(Boolean.prototype.toString), v = typeof BigInt > "u" ? null : x(BigInt.prototype.toString), Te = typeof Symbol > "u" ? null : x(Symbol.prototype.toString), y = x(Object.prototype.hasOwnProperty), Ee = x(Object.prototype.toString), b = x(RegExp.prototype.test), De = Oe(TypeError);
85
+ function x(e) {
86
+ return function(t) {
87
+ t instanceof RegExp && (t.lastIndex = 0);
88
+ var n = [...arguments].slice(1);
89
+ return le(e, t, n);
90
+ };
91
+ }
92
+ function Oe(e) {
93
+ return function() {
94
+ return ue(e, [...arguments]);
95
+ };
96
+ }
97
+ function S(e, t) {
98
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _e;
99
+ if (se && se(e, null), !ge(t)) return e;
100
+ let r = t.length;
101
+ for (; r--;) {
102
+ let i = t[r];
103
+ if (typeof i == "string") {
104
+ let e = n(i);
105
+ e !== i && (f(t) || (t[r] = e), i = e);
106
+ }
107
+ e[i] = !0;
108
+ }
109
+ return e;
110
+ }
111
+ function ke(e) {
112
+ for (let t = 0; t < e.length; t++) y(e, t) || (e[t] = null);
113
+ return e;
114
+ }
115
+ function C(e) {
116
+ let t = ce(null);
117
+ for (let r of oe(e)) {
118
+ var n = ie(r, 2);
119
+ let i = n[0], a = n[1];
120
+ y(e, i) && (ge(a) ? t[i] = ke(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = C(a) : t[i] = a);
121
+ }
122
+ return t;
123
+ }
124
+ function Ae(e) {
125
+ switch (typeof e) {
126
+ case "string": return e;
127
+ case "number": return Ce(e);
128
+ case "boolean": return we(e);
129
+ case "bigint": return v ? v(e) : "0";
130
+ case "symbol": return Te ? Te(e) : "Symbol()";
131
+ case "undefined": return Ee(e);
132
+ case "function":
133
+ case "object": {
134
+ if (e === null) return Ee(e);
135
+ let t = e, n = w(t, "toString");
136
+ if (typeof n == "function") {
137
+ let e = n(t);
138
+ return typeof e == "string" ? e : Ee(e);
139
+ }
140
+ return Ee(e);
141
+ }
142
+ default: return Ee(e);
143
+ }
144
+ }
145
+ function w(e, t) {
146
+ for (; e !== null;) {
147
+ let n = m(e, t);
148
+ if (n) {
149
+ if (n.get) return x(n.get);
150
+ if (typeof n.value == "function") return x(n.value);
151
+ }
152
+ e = p(e);
153
+ }
154
+ function n() {
155
+ return null;
156
+ }
157
+ return n;
158
+ }
159
+ function je(e) {
160
+ try {
161
+ return b(e, ""), !0;
162
+ } catch {
163
+ return !1;
164
+ }
165
+ }
166
+ var Me = h(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Ne = h(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Pe = h([
167
+ "feBlend",
168
+ "feColorMatrix",
169
+ "feComponentTransfer",
170
+ "feComposite",
171
+ "feConvolveMatrix",
172
+ "feDiffuseLighting",
173
+ "feDisplacementMap",
174
+ "feDistantLight",
175
+ "feDropShadow",
176
+ "feFlood",
177
+ "feFuncA",
178
+ "feFuncB",
179
+ "feFuncG",
180
+ "feFuncR",
181
+ "feGaussianBlur",
182
+ "feImage",
183
+ "feMerge",
184
+ "feMergeNode",
185
+ "feMorphology",
186
+ "feOffset",
187
+ "fePointLight",
188
+ "feSpecularLighting",
189
+ "feSpotLight",
190
+ "feTile",
191
+ "feTurbulence"
192
+ ]), Fe = h([
193
+ "animate",
194
+ "color-profile",
195
+ "cursor",
196
+ "discard",
197
+ "font-face",
198
+ "font-face-format",
199
+ "font-face-name",
200
+ "font-face-src",
201
+ "font-face-uri",
202
+ "foreignobject",
203
+ "hatch",
204
+ "hatchpath",
205
+ "mesh",
206
+ "meshgradient",
207
+ "meshpatch",
208
+ "meshrow",
209
+ "missing-glyph",
210
+ "script",
211
+ "set",
212
+ "solidcolor",
213
+ "unknown",
214
+ "use"
215
+ ]), Ie = h(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Le = h([
216
+ "maction",
217
+ "maligngroup",
218
+ "malignmark",
219
+ "mlongdiv",
220
+ "mscarries",
221
+ "mscarry",
222
+ "msgroup",
223
+ "mstack",
224
+ "msline",
225
+ "msrow",
226
+ "semantics",
227
+ "annotation",
228
+ "annotation-xml",
229
+ "mprescripts",
230
+ "none"
231
+ ]), Re = h(["#text"]), ze = h(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Be = h(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ve = h(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), He = h([
232
+ "xlink:href",
233
+ "xml:id",
234
+ "xlink:title",
235
+ "xml:space",
236
+ "xmlns:xlink"
237
+ ]), Ue = g(/{{[\w\W]*|^[\w\W]*}}/g), We = g(/<%[\w\W]*|^[\w\W]*%>/g), Ge = g(/\${[\w\W]*/g), Ke = g(/^data-[\-\w.\u00B7-\uFFFF]+$/), qe = g(/^aria-[\-\w]+$/), Je = g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ye = g(/^(?:\w+script|data):/i), Xe = g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ze = g(/^html$/i), Qe = g(/^[a-z][.\w]*(-[.\w]+)+$/i), $e = g(/<[/\w!]/g), et = g(/<[/\w]/g), tt = g(/<\/no(script|embed|frames)/i), nt = g(/\/>/i), T = {
238
+ element: 1,
239
+ attribute: 2,
240
+ text: 3,
241
+ cdataSection: 4,
242
+ entityReference: 5,
243
+ entityNode: 6,
244
+ processingInstruction: 7,
245
+ comment: 8,
246
+ document: 9,
247
+ documentType: 10,
248
+ documentFragment: 11,
249
+ notation: 12
250
+ }, rt = function() {
251
+ return typeof window > "u" ? null : window;
252
+ }, it = function(e, t) {
253
+ if (typeof e != "object" || typeof e.createPolicy != "function") return null;
254
+ let n = null, r = "data-tt-policy-suffix";
255
+ t && t.hasAttribute(r) && (n = t.getAttribute(r));
256
+ let i = "dompurify" + (n ? "#" + n : "");
257
+ try {
258
+ return e.createPolicy(i, {
259
+ createHTML(e) {
260
+ return e;
261
+ },
262
+ createScriptURL(e) {
263
+ return e;
264
+ }
265
+ });
266
+ } catch {
267
+ return console.warn("TrustedTypes policy " + i + " could not be created."), null;
268
+ }
269
+ }, at = function() {
270
+ return {
271
+ afterSanitizeAttributes: [],
272
+ afterSanitizeElements: [],
273
+ afterSanitizeShadowDOM: [],
274
+ beforeSanitizeAttributes: [],
275
+ beforeSanitizeElements: [],
276
+ beforeSanitizeShadowDOM: [],
277
+ uponSanitizeAttribute: [],
278
+ uponSanitizeElement: [],
279
+ uponSanitizeShadowNode: []
280
+ };
281
+ }, E = function(e, t, n, r) {
282
+ return y(e, t) && ge(e[t]) ? S(r.base ? C(r.base) : {}, e[t], r.transform) : n;
283
+ };
284
+ function ot() {
285
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : rt(), t = (e) => ot(e);
286
+ if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== T.document || !e.Element) return t.isSupported = !1, t;
287
+ let n = e.document, r = n, i = r.currentScript;
288
+ e.DocumentFragment;
289
+ let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
290
+ e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
291
+ let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, ee = w(d, "cloneNode"), te = w(d, "remove"), ne = w(d, "nextSibling"), re = w(d, "childNodes"), ie = w(d, "parentNode"), ae = w(d, "shadowRoot"), se = w(d, "attributes"), f = o && o.prototype ? w(o.prototype, "nodeType") : null, p = o && o.prototype ? w(o.prototype, "nodeName") : null;
292
+ if (typeof a == "function") {
293
+ let e = n.createElement("template");
294
+ e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
295
+ }
296
+ let m, _ = "", le, ue = !1, Ce = 0, we = function() {
297
+ if (Ce > 0) throw De("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
298
+ }, v = function(e) {
299
+ we(), Ce++;
300
+ try {
301
+ return m.createHTML(e);
302
+ } finally {
303
+ Ce--;
304
+ }
305
+ }, Te = function(e) {
306
+ we(), Ce++;
307
+ try {
308
+ return m.createScriptURL(e);
309
+ } finally {
310
+ Ce--;
311
+ }
312
+ }, Ee = function() {
313
+ return ue ||= (le = it(u, i), !0), le;
314
+ }, x = n, Oe = x.implementation, ke = x.createNodeIterator, st = x.createDocumentFragment, ct = x.getElementsByTagName, D = r.importNode, O = at();
315
+ t.isSupported = typeof oe == "function" && typeof ie == "function" && Oe && Oe.createHTMLDocument !== void 0;
316
+ let k = Ue, lt = We, A = Ge, ut = Ke, j = qe, dt = Ye, ft = Xe, pt = Qe, mt = Je, M = null, ht = S({}, [
317
+ ...Me,
318
+ ...Ne,
319
+ ...Pe,
320
+ ...Ie,
321
+ ...Re
322
+ ]), N = null, gt = S({}, [
323
+ ...ze,
324
+ ...Be,
325
+ ...Ve,
326
+ ...He
327
+ ]), P = Object.seal(ce(null, {
328
+ tagNameCheck: {
329
+ writable: !0,
330
+ configurable: !1,
331
+ enumerable: !0,
332
+ value: null
333
+ },
334
+ attributeNameCheck: {
335
+ writable: !0,
336
+ configurable: !1,
337
+ enumerable: !0,
338
+ value: null
339
+ },
340
+ allowCustomizedBuiltInElements: {
341
+ writable: !0,
342
+ configurable: !1,
343
+ enumerable: !0,
344
+ value: !1
345
+ }
346
+ })), _t = null, vt = null, F = Object.seal(ce(null, {
347
+ tagCheck: {
348
+ writable: !0,
349
+ configurable: !1,
350
+ enumerable: !0,
351
+ value: null
352
+ },
353
+ attributeCheck: {
354
+ writable: !0,
355
+ configurable: !1,
356
+ enumerable: !0,
357
+ value: null
358
+ }
359
+ })), yt = !0, bt = !0, xt = !1, St = !0, I = !1, Ct = !0, L = !1, wt = !1, Tt = null, Et = null, Dt = !1, Ot = !1, kt = !1, At = !1, R = !0, jt = !1, Mt = "user-content-", Nt = !0, Pt = !1, Ft = {}, z = null, It = S({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Lt = null, Rt = S({}, [
360
+ "audio",
361
+ "video",
362
+ "img",
363
+ "source",
364
+ "image",
365
+ "track"
366
+ ]), zt = null, Bt = S({}, [
367
+ "alt",
368
+ "class",
369
+ "for",
370
+ "id",
371
+ "label",
372
+ "name",
373
+ "pattern",
374
+ "placeholder",
375
+ "role",
376
+ "summary",
377
+ "title",
378
+ "value",
379
+ "style",
380
+ "xmlns"
381
+ ]), Vt = "http://www.w3.org/1998/Math/MathML", Ht = "http://www.w3.org/2000/svg", B = "http://www.w3.org/1999/xhtml", Ut = B, Wt = !1, Gt = null, Kt = S({}, [
382
+ Vt,
383
+ Ht,
384
+ B
385
+ ], ve), qt = h([
386
+ "mi",
387
+ "mo",
388
+ "mn",
389
+ "ms",
390
+ "mtext"
391
+ ]), Jt = S({}, qt), Yt = h(["annotation-xml"]), Xt = S({}, Yt), Zt = S({}, [
392
+ "title",
393
+ "style",
394
+ "font",
395
+ "a",
396
+ "script"
397
+ ]), Qt = null, $t = ["application/xhtml+xml", "text/html"], V = null, H = null, en = n.createElement("form"), tn = function(e) {
398
+ return e instanceof RegExp || e instanceof Function;
399
+ }, nn = function() {
400
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
401
+ if (H && H === e) return;
402
+ (!e || typeof e != "object") && (e = {}), e = C(e), Qt = $t.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, V = Qt === "application/xhtml+xml" ? ve : _e, M = E(e, "ALLOWED_TAGS", ht, { transform: V }), N = E(e, "ALLOWED_ATTR", gt, { transform: V }), Gt = E(e, "ALLOWED_NAMESPACES", Kt, { transform: ve }), zt = E(e, "ADD_URI_SAFE_ATTR", Bt, {
403
+ transform: V,
404
+ base: Bt
405
+ }), Lt = E(e, "ADD_DATA_URI_TAGS", Rt, {
406
+ transform: V,
407
+ base: Rt
408
+ }), z = E(e, "FORBID_CONTENTS", It, { transform: V }), _t = E(e, "FORBID_TAGS", C({}), { transform: V }), vt = E(e, "FORBID_ATTR", C({}), { transform: V }), Ft = y(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? C(e.USE_PROFILES) : e.USE_PROFILES : !1, yt = e.ALLOW_ARIA_ATTR !== !1, bt = e.ALLOW_DATA_ATTR !== !1, xt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, St = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, I = e.SAFE_FOR_TEMPLATES || !1, Ct = e.SAFE_FOR_XML !== !1, L = e.WHOLE_DOCUMENT || !1, Ot = e.RETURN_DOM || !1, kt = e.RETURN_DOM_FRAGMENT || !1, At = e.RETURN_TRUSTED_TYPE || !1, Dt = e.FORCE_BODY || !1, R = e.SANITIZE_DOM !== !1, jt = e.SANITIZE_NAMED_PROPS || !1, Nt = e.KEEP_CONTENT !== !1, Pt = e.IN_PLACE || !1, mt = je(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Je, Ut = typeof e.NAMESPACE == "string" ? e.NAMESPACE : B, Jt = y(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? C(e.MATHML_TEXT_INTEGRATION_POINTS) : S({}, qt), Xt = y(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? C(e.HTML_INTEGRATION_POINTS) : S({}, Yt);
409
+ let t = y(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? C(e.CUSTOM_ELEMENT_HANDLING) : ce(null);
410
+ if (P = ce(null), y(t, "tagNameCheck") && tn(t.tagNameCheck) && (P.tagNameCheck = t.tagNameCheck), y(t, "attributeNameCheck") && tn(t.attributeNameCheck) && (P.attributeNameCheck = t.attributeNameCheck), y(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (P.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), g(P), I && (bt = !1), kt && (Ot = !0), Ft && (M = S({}, Re), N = ce(null), Ft.html === !0 && (S(M, Me), S(N, ze)), Ft.svg === !0 && (S(M, Ne), S(N, Be), S(N, He)), Ft.svgFilters === !0 && (S(M, Pe), S(N, Be), S(N, He)), Ft.mathMl === !0 && (S(M, Ie), S(N, Ve), S(N, He))), F.tagCheck = null, F.attributeCheck = null, y(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? F.tagCheck = e.ADD_TAGS : ge(e.ADD_TAGS) && (M === ht && (M = C(M)), S(M, e.ADD_TAGS, V))), y(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? F.attributeCheck = e.ADD_ATTR : ge(e.ADD_ATTR) && (N === gt && (N = C(N)), S(N, e.ADD_ATTR, V))), y(e, "ADD_URI_SAFE_ATTR") && ge(e.ADD_URI_SAFE_ATTR) && S(zt, e.ADD_URI_SAFE_ATTR, V), y(e, "FORBID_CONTENTS") && ge(e.FORBID_CONTENTS) && (z === It && (z = C(z)), S(z, e.FORBID_CONTENTS, V)), y(e, "ADD_FORBID_CONTENTS") && ge(e.ADD_FORBID_CONTENTS) && (z === It && (z = C(z)), S(z, e.ADD_FORBID_CONTENTS, V)), Nt && (M["#text"] = !0), L && S(M, [
411
+ "html",
412
+ "head",
413
+ "body"
414
+ ]), M.table && (S(M, ["tbody"]), delete _t.tbody), e.TRUSTED_TYPES_POLICY) {
415
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw De("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
416
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw De("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
417
+ let t = m;
418
+ m = e.TRUSTED_TYPES_POLICY;
419
+ try {
420
+ _ = v("");
421
+ } catch (e) {
422
+ throw m = t, e;
423
+ }
424
+ } else e.TRUSTED_TYPES_POLICY === null ? (m = void 0, _ = "") : (m === void 0 && (m = Ee()), m && typeof _ == "string" && (_ = v("")));
425
+ h && h(e), H = e;
426
+ }, rn = S({}, [
427
+ ...Ne,
428
+ ...Pe,
429
+ ...Fe
430
+ ]), an = S({}, [...Ie, ...Le]), on = function(e, t, n) {
431
+ return t.namespaceURI === B ? e === "svg" : t.namespaceURI === Vt ? e === "svg" && (n === "annotation-xml" || Jt[n]) : !!rn[e];
432
+ }, sn = function(e, t, n) {
433
+ return t.namespaceURI === B ? e === "math" : t.namespaceURI === Ht ? e === "math" && Xt[n] : !!an[e];
434
+ }, U = function(e, t, n) {
435
+ return t.namespaceURI === Ht && !Xt[n] || t.namespaceURI === Vt && !Jt[n] ? !1 : !an[e] && (Zt[e] || !rn[e]);
436
+ }, cn = function(e) {
437
+ let t = ie(e);
438
+ (!t || !t.tagName) && (t = {
439
+ namespaceURI: Ut,
440
+ tagName: "template"
441
+ });
442
+ let n = _e(e.tagName), r = _e(t.tagName);
443
+ return Gt[e.namespaceURI] ? e.namespaceURI === Ht ? on(n, t, r) : e.namespaceURI === Vt ? sn(n, t, r) : e.namespaceURI === B ? U(n, t, r) : !!(Qt === "application/xhtml+xml" && Gt[e.namespaceURI]) : !1;
444
+ }, W = function(e) {
445
+ me(t.removed, { element: e });
446
+ try {
447
+ ie(e).removeChild(e);
448
+ } catch {
449
+ if (te(e), !ie(e)) throw De("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
450
+ }
451
+ }, G = function(e) {
452
+ let t = re(e);
453
+ if (t) {
454
+ let e = [];
455
+ de(t, (t) => {
456
+ me(e, t);
457
+ }), de(e, (e) => {
458
+ try {
459
+ te(e);
460
+ } catch {}
461
+ });
462
+ }
463
+ let n = se(e);
464
+ if (n) for (let t = n.length - 1; t >= 0; --t) {
465
+ let r = n[t], i = r && r.name;
466
+ if (typeof i == "string") try {
467
+ e.removeAttribute(i);
468
+ } catch {}
469
+ }
470
+ }, K = function(e, n) {
471
+ try {
472
+ me(t.removed, {
473
+ attribute: n.getAttributeNode(e),
474
+ from: n
475
+ });
476
+ } catch {
477
+ me(t.removed, {
478
+ attribute: null,
479
+ from: n
480
+ });
481
+ }
482
+ if (n.removeAttribute(e), e === "is") if (Ot || kt) try {
483
+ W(n);
484
+ } catch {}
485
+ else try {
486
+ n.setAttribute(e, "");
487
+ } catch {}
488
+ }, ln = function(e) {
489
+ let t = se(e);
490
+ if (t) for (let n = t.length - 1; n >= 0; --n) {
491
+ let r = t[n], i = r && r.name;
492
+ if (!(typeof i != "string" || N[V(i)])) try {
493
+ e.removeAttribute(i);
494
+ } catch {}
495
+ }
496
+ }, un = function(e) {
497
+ let t = [e];
498
+ for (; t.length > 0;) {
499
+ let e = t.pop();
500
+ (f ? f(e) : e.nodeType) === T.element && ln(e);
501
+ let n = re(e);
502
+ if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
503
+ }
504
+ }, dn = function(e) {
505
+ let t = null, r = null;
506
+ if (Dt) e = "<remove></remove>" + e;
507
+ else {
508
+ let t = ye(e, /^[\r\n\t ]+/);
509
+ r = t && t[0];
510
+ }
511
+ Qt === "application/xhtml+xml" && Ut === B && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
512
+ let i = m ? v(e) : e;
513
+ if (Ut === B) try {
514
+ t = new l().parseFromString(i, Qt);
515
+ } catch {}
516
+ if (!t || !t.documentElement) {
517
+ t = Oe.createDocument(Ut, "template", null);
518
+ try {
519
+ t.documentElement.innerHTML = Wt ? _ : i;
520
+ } catch {}
521
+ }
522
+ let a = t.body || t.documentElement;
523
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Ut === B ? ct.call(t, L ? "html" : "body")[0] : L ? t.documentElement : a;
524
+ }, fn = function(e) {
525
+ return ke.call(e.ownerDocument || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
526
+ }, pn = function(e) {
527
+ return e = be(e, k, " "), e = be(e, lt, " "), e = be(e, A, " "), e;
528
+ }, q = function(e) {
529
+ e.normalize();
530
+ let t = ke.call(e.ownerDocument || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
531
+ for (; n;) n.data = pn(n.data), n = t.nextNode();
532
+ let r = e.querySelectorAll?.call(e, "template");
533
+ r && de(r, (e) => {
534
+ Y(e.content) && q(e.content);
535
+ });
536
+ }, J = function(e) {
537
+ let t = p ? p(e) : null;
538
+ return typeof t != "string" || V(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== se(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== f(e) || e.childNodes !== re(e);
539
+ }, Y = function(e) {
540
+ if (!f || typeof e != "object" || !e) return !1;
541
+ try {
542
+ return f(e) === T.documentFragment;
543
+ } catch {
544
+ return !1;
545
+ }
546
+ }, X = function(e) {
547
+ if (!f || typeof e != "object" || !e) return !1;
548
+ try {
549
+ return typeof f(e) == "number";
550
+ } catch {
551
+ return !1;
552
+ }
553
+ };
554
+ function Z(e, n, r) {
555
+ e.length !== 0 && de(e, (e) => {
556
+ e.call(t, n, r, H);
557
+ });
558
+ }
559
+ let mn = function(e, t) {
560
+ return !!(Ct && e.hasChildNodes() && !X(e.firstElementChild) && b($e, e.textContent) && b($e, e.innerHTML) || Ct && e.namespaceURI === B && t === "style" && X(e.firstElementChild) || e.nodeType === T.processingInstruction || Ct && e.nodeType === T.comment && b(et, e.data));
561
+ }, Q = function(e, t) {
562
+ if (!_t[t] && vn(t) && (P.tagNameCheck instanceof RegExp && b(P.tagNameCheck, t) || P.tagNameCheck instanceof Function && P.tagNameCheck(t))) return !1;
563
+ if (Nt && !z[t]) {
564
+ let t = ie(e), n = re(e);
565
+ if (n && t) {
566
+ let r = n.length;
567
+ for (let i = r - 1; i >= 0; --i) {
568
+ let r = Pt ? n[i] : ee(n[i], !0);
569
+ t.insertBefore(r, ne(e));
570
+ }
571
+ }
572
+ }
573
+ return W(e), !0;
574
+ }, hn = function(e) {
575
+ if (Z(O.beforeSanitizeElements, e, null), J(e)) return W(e), !0;
576
+ let n = V(p ? p(e) : e.nodeName);
577
+ if (Z(O.uponSanitizeElement, e, {
578
+ tagName: n,
579
+ allowedTags: M
580
+ }), mn(e, n)) return W(e), !0;
581
+ if (_t[n] || !(F.tagCheck instanceof Function && F.tagCheck(n)) && !M[n]) return Q(e, n);
582
+ if ((f ? f(e) : e.nodeType) === T.element && !cn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && b(tt, e.innerHTML)) return W(e), !0;
583
+ if (I && e.nodeType === T.text) {
584
+ let n = pn(e.textContent);
585
+ e.textContent !== n && (me(t.removed, { element: e.cloneNode() }), e.textContent = n);
586
+ }
587
+ return Z(O.afterSanitizeElements, e, null), !1;
588
+ }, gn = function(e, t, r) {
589
+ if (vt[t] || R && (t === "id" || t === "name") && (r in n || r in en)) return !1;
590
+ let i = N[t] || F.attributeCheck instanceof Function && F.attributeCheck(t, e);
591
+ if (!(bt && b(ut, t)) && !(yt && b(j, t))) {
592
+ if (!i) {
593
+ if (!(vn(e) && (P.tagNameCheck instanceof RegExp && b(P.tagNameCheck, e) || P.tagNameCheck instanceof Function && P.tagNameCheck(e)) && (P.attributeNameCheck instanceof RegExp && b(P.attributeNameCheck, t) || P.attributeNameCheck instanceof Function && P.attributeNameCheck(t, e)) || t === "is" && P.allowCustomizedBuiltInElements && (P.tagNameCheck instanceof RegExp && b(P.tagNameCheck, r) || P.tagNameCheck instanceof Function && P.tagNameCheck(r)))) return !1;
594
+ } else if (!zt[t] && !b(mt, be(r, ft, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && xe(r, "data:") === 0 && Lt[e]) && !(xt && !b(dt, be(r, ft, ""))) && r) return !1;
595
+ }
596
+ return !0;
597
+ }, _n = S({}, [
598
+ "annotation-xml",
599
+ "color-profile",
600
+ "font-face",
601
+ "font-face-format",
602
+ "font-face-name",
603
+ "font-face-src",
604
+ "font-face-uri",
605
+ "missing-glyph"
606
+ ]), vn = function(e) {
607
+ return !_n[_e(e)] && b(pt, e);
608
+ }, yn = function(e, t, n, r) {
609
+ if (m && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
610
+ case "TrustedHTML": return v(r);
611
+ case "TrustedScriptURL": return Te(r);
612
+ }
613
+ return r;
614
+ }, bn = function(e, n, r, i) {
615
+ try {
616
+ r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), J(e) ? W(e) : pe(t.removed);
617
+ } catch {
618
+ K(n, e);
619
+ }
620
+ }, xn = function(e) {
621
+ Z(O.beforeSanitizeAttributes, e, null);
622
+ let t = e.attributes;
623
+ if (!t || J(e)) return;
624
+ let n = {
625
+ attrName: "",
626
+ attrValue: "",
627
+ keepAttr: !0,
628
+ allowedAttributes: N,
629
+ forceKeepAttr: void 0
630
+ }, r = t.length, i = V(e.nodeName);
631
+ for (; r--;) {
632
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = V(o), u = c, d = o === "value" ? u : Se(u);
633
+ if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, Z(O.uponSanitizeAttribute, e, n), d = n.attrValue, jt && (l === "id" || l === "name") && xe(d, Mt) !== 0 && (K(o, e), d = Mt + d), Ct && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
634
+ K(o, e);
635
+ continue;
636
+ }
637
+ if (l === "attributename" && ye(d, "href")) {
638
+ K(o, e);
639
+ continue;
640
+ }
641
+ if (!n.forceKeepAttr) {
642
+ if (!n.keepAttr) {
643
+ K(o, e);
644
+ continue;
645
+ }
646
+ if (!St && b(nt, d)) {
647
+ K(o, e);
648
+ continue;
649
+ }
650
+ if (I && (d = pn(d)), !gn(i, l, d)) {
651
+ K(o, e);
652
+ continue;
653
+ }
654
+ d = yn(i, l, s, d), d !== u && bn(e, o, s, d);
655
+ }
656
+ }
657
+ Z(O.afterSanitizeAttributes, e, null);
658
+ }, Sn = function(e) {
659
+ let t = null, n = fn(e);
660
+ for (Z(O.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (Z(O.uponSanitizeShadowNode, t, null), hn(t), xn(t), Y(t.content) && Sn(t.content), (f ? f(t) : t.nodeType) === T.element) {
661
+ let e = ae(t);
662
+ Y(e) && (Cn(e), Sn(e));
663
+ }
664
+ Z(O.afterSanitizeShadowDOM, e, null);
665
+ }, Cn = function(e) {
666
+ let t = [{
667
+ node: e,
668
+ shadow: null
669
+ }];
670
+ for (; t.length > 0;) {
671
+ let e = t.pop();
672
+ if (e.shadow) {
673
+ Sn(e.shadow);
674
+ continue;
675
+ }
676
+ let n = e.node, r = (f ? f(n) : n.nodeType) === T.element, i = re(n);
677
+ if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
678
+ node: i[e],
679
+ shadow: null
680
+ });
681
+ if (r) {
682
+ let e = p ? p(n) : null;
683
+ if (typeof e == "string" && V(e) === "template") {
684
+ let e = n.content;
685
+ Y(e) && t.push({
686
+ node: e,
687
+ shadow: null
688
+ });
689
+ }
690
+ }
691
+ if (r) {
692
+ let e = ae(n);
693
+ Y(e) && t.push({
694
+ node: null,
695
+ shadow: e
696
+ }, {
697
+ node: e,
698
+ shadow: null
699
+ });
700
+ }
701
+ }
702
+ };
703
+ return t.sanitize = function(e) {
704
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
705
+ if (Wt = !e, Wt && (e = "<!-->"), typeof e != "string" && !X(e) && (e = Ae(e), typeof e != "string")) throw De("dirty is not a string, aborting");
706
+ if (!t.isSupported) return e;
707
+ wt ? (M = Tt, N = Et) : nn(n), (O.uponSanitizeElement.length > 0 || O.uponSanitizeAttribute.length > 0) && (M = C(M)), O.uponSanitizeAttribute.length > 0 && (N = C(N)), t.removed = [];
708
+ let c = Pt && typeof e != "string" && X(e);
709
+ if (c) {
710
+ let t = p ? p(e) : e.nodeName;
711
+ if (typeof t == "string") {
712
+ let e = V(t);
713
+ if (!M[e] || _t[e]) throw De("root node is forbidden and cannot be sanitized in-place");
714
+ }
715
+ if (J(e)) throw De("root node is clobbered and cannot be sanitized in-place");
716
+ try {
717
+ Cn(e);
718
+ } catch (t) {
719
+ throw G(e), t;
720
+ }
721
+ } else if (X(e)) i = dn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === T.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Cn(a);
722
+ else {
723
+ if (!Ot && !I && !L && e.indexOf("<") === -1) return m && At ? v(e) : e;
724
+ if (i = dn(e), !i) return Ot ? null : At ? _ : "";
725
+ }
726
+ i && Dt && W(i.firstChild);
727
+ let l = fn(c ? e : i);
728
+ try {
729
+ for (; o = l.nextNode();) hn(o), xn(o), Y(o.content) && Sn(o.content);
730
+ } catch (t) {
731
+ throw c && G(e), t;
732
+ }
733
+ if (c) return de(t.removed, (e) => {
734
+ e.element && un(e.element);
735
+ }), I && q(e), e;
736
+ if (Ot) {
737
+ if (I && q(i), kt) for (s = st.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
738
+ else s = i;
739
+ return (N.shadowroot || N.shadowrootmode) && (s = D.call(r, s, !0)), s;
740
+ }
741
+ let u = L ? i.outerHTML : i.innerHTML;
742
+ return L && M["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && b(Ze, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), I && (u = pn(u)), m && At ? v(u) : u;
743
+ }, t.setConfig = function() {
744
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
745
+ nn(e), wt = !0, Tt = M, Et = N;
746
+ }, t.clearConfig = function() {
747
+ H = null, wt = !1, Tt = null, Et = null, m = le, _ = "";
748
+ }, t.isValidAttribute = function(e, t, n) {
749
+ H || nn({});
750
+ let r = V(e), i = V(t);
751
+ return gn(r, i, n);
752
+ }, t.addHook = function(e, t) {
753
+ typeof t == "function" && y(O, e) && me(O[e], t);
754
+ }, t.removeHook = function(e, t) {
755
+ if (y(O, e)) {
756
+ if (t !== void 0) {
757
+ let n = fe(O[e], t);
758
+ return n === -1 ? void 0 : he(O[e], n, 1)[0];
759
+ }
760
+ return pe(O[e]);
761
+ }
762
+ }, t.removeHooks = function(e) {
763
+ y(O, e) && (O[e] = []);
764
+ }, t.removeAllHooks = function() {
765
+ O = at();
766
+ }, t;
767
+ }
768
+ var st = ot();
769
+ //#endregion
770
+ //#region node_modules/marked/lib/marked.esm.js
771
+ function ct() {
772
+ return {
773
+ async: !1,
774
+ breaks: !1,
775
+ extensions: null,
776
+ gfm: !0,
777
+ hooks: null,
778
+ pedantic: !1,
779
+ renderer: null,
780
+ silent: !1,
781
+ tokenizer: null,
782
+ walkTokens: null
783
+ };
784
+ }
785
+ var D = ct();
786
+ function O(e) {
787
+ D = e;
788
+ }
789
+ var k = { exec: () => null };
790
+ function lt(e) {
791
+ let t = [];
792
+ return (n) => {
793
+ let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
794
+ return i || (i = e(r), t[r] = i), i;
795
+ };
796
+ }
797
+ function A(e, t = "") {
798
+ let n = typeof e == "string" ? e : e.source, r = {
799
+ replace: (e, t) => {
800
+ let i = typeof t == "string" ? t : t.source;
801
+ return i = i.replace(j.caret, "$1"), n = n.replace(e, i), r;
802
+ },
803
+ getRegex: () => new RegExp(n, t)
804
+ };
805
+ return r;
806
+ }
807
+ var ut = ((e = "") => {
808
+ try {
809
+ return !!RegExp("(?<=1)(?<!1)" + e);
810
+ } catch {
811
+ return !1;
812
+ }
813
+ })(), j = {
814
+ codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
815
+ outputLinkReplace: /\\([\[\]])/g,
816
+ indentCodeCompensation: /^(\s+)(?:```)/,
817
+ beginningSpace: /^\s+/,
818
+ endingHash: /#$/,
819
+ startingSpaceChar: /^ /,
820
+ endingSpaceChar: / $/,
821
+ nonSpaceChar: /[^ ]/,
822
+ newLineCharGlobal: /\n/g,
823
+ tabCharGlobal: /\t/g,
824
+ multipleSpaceGlobal: /\s+/g,
825
+ blankLine: /^[ \t]*$/,
826
+ doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
827
+ blockquoteStart: /^ {0,3}>/,
828
+ blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
829
+ blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
830
+ listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
831
+ listIsTask: /^\[[ xX]\] +\S/,
832
+ listReplaceTask: /^\[[ xX]\] +/,
833
+ listTaskCheckbox: /\[[ xX]\]/,
834
+ anyLine: /\n.*\n/,
835
+ hrefBrackets: /^<(.*)>$/,
836
+ tableDelimiter: /[:|]/,
837
+ tableAlignChars: /^\||\| *$/g,
838
+ tableRowBlankLine: /\n[ \t]*$/,
839
+ tableAlignRight: /^ *-+: *$/,
840
+ tableAlignCenter: /^ *:-+: *$/,
841
+ tableAlignLeft: /^ *:-+ *$/,
842
+ startATag: /^<a /i,
843
+ endATag: /^<\/a>/i,
844
+ startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
845
+ endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
846
+ startAngleBracket: /^</,
847
+ endAngleBracket: />$/,
848
+ pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
849
+ unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
850
+ escapeTest: /[&<>"']/,
851
+ escapeReplace: /[&<>"']/g,
852
+ escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
853
+ escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
854
+ caret: /(^|[^\[])\^/g,
855
+ percentDecode: /%25/g,
856
+ findPipe: /\|/g,
857
+ splitPipe: / \|/,
858
+ slashPipe: /\\\|/g,
859
+ carriageReturn: /\r\n|\r/g,
860
+ spaceLine: /^ +$/gm,
861
+ notSpaceStart: /^\S*/,
862
+ endingNewline: /\n$/,
863
+ listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
864
+ nextBulletRegex: lt((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
865
+ hrRegex: lt((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
866
+ fencesBeginRegex: lt((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
867
+ headingBeginRegex: lt((e) => RegExp(`^ {0,${e}}#`)),
868
+ htmlBeginRegex: lt((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
869
+ blockquoteBeginRegex: lt((e) => RegExp(`^ {0,${e}}>`))
870
+ }, dt = /^(?:[ \t]*(?:\n|$))+/, ft = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, pt = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, mt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, M = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ht = / {0,3}(?:[*+-]|\d{1,9}[.)])/, N = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, gt = A(N).replace(/bull/g, ht).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), P = A(N).replace(/bull/g, ht).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), _t = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, vt = /^[^\n]+/, F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, yt = A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), bt = A(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, ht).getRegex(), xt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", St = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, I = A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", St).replace("tag", xt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ct = A(_t).replace("hr", mt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", xt).getRegex(), L = {
871
+ blockquote: A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ct).getRegex(),
872
+ code: ft,
873
+ def: yt,
874
+ fences: pt,
875
+ heading: M,
876
+ hr: mt,
877
+ html: I,
878
+ lheading: gt,
879
+ list: bt,
880
+ newline: dt,
881
+ paragraph: Ct,
882
+ table: k,
883
+ text: vt
884
+ }, wt = A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", mt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", xt).getRegex(), Tt = {
885
+ ...L,
886
+ lheading: P,
887
+ table: wt,
888
+ paragraph: A(_t).replace("hr", mt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", wt).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", xt).getRegex()
889
+ }, Et = {
890
+ ...L,
891
+ html: A("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", St).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
892
+ def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
893
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
894
+ fences: k,
895
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
896
+ paragraph: A(_t).replace("hr", mt).replace("heading", " *#{1,6} *[^\n]").replace("lheading", gt).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
897
+ }, Dt = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ot = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, kt = /^( {2,}|\\)\n(?!\s*$)/, At = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, R = /[\p{P}\p{S}]/u, jt = /[\s\p{P}\p{S}]/u, Mt = /[^\s\p{P}\p{S}]/u, Nt = A(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, jt).getRegex(), Pt = /(?!~)[\p{P}\p{S}]/u, Ft = /(?!~)[\s\p{P}\p{S}]/u, z = /(?:[^\s\p{P}\p{S}]|~)/u, It = A(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ut ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Lt = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rt = A(Lt, "u").replace(/punct/g, R).getRegex(), zt = A(Lt, "u").replace(/punct/g, Pt).getRegex(), Bt = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Vt = A(Bt, "gu").replace(/notPunctSpace/g, Mt).replace(/punctSpace/g, jt).replace(/punct/g, R).getRegex(), Ht = A(Bt, "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, Ft).replace(/punct/g, Pt).getRegex(), B = A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Mt).replace(/punctSpace/g, jt).replace(/punct/g, R).getRegex(), Ut = A(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, R).getRegex(), Wt = A("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Mt).replace(/punctSpace/g, jt).replace(/punct/g, R).getRegex(), Gt = A(/\\(punct)/, "gu").replace(/punct/g, R).getRegex(), Kt = A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), qt = A(St).replace("(?:-->|$)", "-->").getRegex(), Jt = A("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", qt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Yt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Xt = A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Yt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Zt = A(/^!?\[(label)\]\[(ref)\]/).replace("label", Yt).replace("ref", F).getRegex(), Qt = A(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex(), $t = A("reflink|nolink(?!\\()", "g").replace("reflink", Zt).replace("nolink", Qt).getRegex(), V = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, H = {
898
+ _backpedal: k,
899
+ anyPunctuation: Gt,
900
+ autolink: Kt,
901
+ blockSkip: It,
902
+ br: kt,
903
+ code: Ot,
904
+ del: k,
905
+ delLDelim: k,
906
+ delRDelim: k,
907
+ emStrongLDelim: Rt,
908
+ emStrongRDelimAst: Vt,
909
+ emStrongRDelimUnd: B,
910
+ escape: Dt,
911
+ link: Xt,
912
+ nolink: Qt,
913
+ punctuation: Nt,
914
+ reflink: Zt,
915
+ reflinkSearch: $t,
916
+ tag: Jt,
917
+ text: At,
918
+ url: k
919
+ }, en = {
920
+ ...H,
921
+ link: A(/^!?\[(label)\]\((.*?)\)/).replace("label", Yt).getRegex(),
922
+ reflink: A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Yt).getRegex()
923
+ }, tn = {
924
+ ...H,
925
+ emStrongRDelimAst: Ht,
926
+ emStrongLDelim: zt,
927
+ delLDelim: Ut,
928
+ delRDelim: Wt,
929
+ url: A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", V).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
930
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
931
+ del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
932
+ text: A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", V).getRegex()
933
+ }, nn = {
934
+ ...tn,
935
+ br: A(kt).replace("{2,}", "*").getRegex(),
936
+ text: A(tn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
937
+ }, rn = {
938
+ normal: L,
939
+ gfm: Tt,
940
+ pedantic: Et
941
+ }, an = {
942
+ normal: H,
943
+ gfm: tn,
944
+ breaks: nn,
945
+ pedantic: en
946
+ }, on = {
947
+ "&": "&amp;",
948
+ "<": "&lt;",
949
+ ">": "&gt;",
950
+ "\"": "&quot;",
951
+ "'": "&#39;"
952
+ }, sn = (e) => on[e];
953
+ function U(e, t) {
954
+ if (t) {
955
+ if (j.escapeTest.test(e)) return e.replace(j.escapeReplace, sn);
956
+ } else if (j.escapeTestNoEncode.test(e)) return e.replace(j.escapeReplaceNoEncode, sn);
957
+ return e;
958
+ }
959
+ function cn(e) {
960
+ try {
961
+ e = encodeURI(e).replace(j.percentDecode, "%");
962
+ } catch {
963
+ return null;
964
+ }
965
+ return e;
966
+ }
967
+ function W(e, t) {
968
+ let n = e.replace(j.findPipe, (e, t, n) => {
969
+ let r = !1, i = t;
970
+ for (; --i >= 0 && n[i] === "\\";) r = !r;
971
+ return r ? "|" : " |";
972
+ }).split(j.splitPipe), r = 0;
973
+ if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
974
+ else for (; n.length < t;) n.push("");
975
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(j.slashPipe, "|");
976
+ return n;
977
+ }
978
+ function G(e, t, n) {
979
+ let r = e.length;
980
+ if (r === 0) return "";
981
+ let i = 0;
982
+ for (; i < r;) {
983
+ let a = e.charAt(r - i - 1);
984
+ if (a === t && !n) i++;
985
+ else if (a !== t && n) i++;
986
+ else break;
987
+ }
988
+ return e.slice(0, r - i);
989
+ }
990
+ function K(e) {
991
+ let t = e.split("\n"), n = t.length - 1;
992
+ for (; n >= 0 && j.blankLine.test(t[n]);) n--;
993
+ return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
994
+ }
995
+ function ln(e, t) {
996
+ if (e.indexOf(t[1]) === -1) return -1;
997
+ let n = 0;
998
+ for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
999
+ else if (e[r] === t[0]) n++;
1000
+ else if (e[r] === t[1] && (n--, n < 0)) return r;
1001
+ return n > 0 ? -2 : -1;
1002
+ }
1003
+ function un(e, t = 0) {
1004
+ let n = t, r = "";
1005
+ for (let t of e) if (t === " ") {
1006
+ let e = 4 - n % 4;
1007
+ r += " ".repeat(e), n += e;
1008
+ } else r += t, n++;
1009
+ return r;
1010
+ }
1011
+ function dn(e, t, n, r, i) {
1012
+ let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
1013
+ r.state.inLink = !0;
1014
+ let c = {
1015
+ type: e[0].charAt(0) === "!" ? "image" : "link",
1016
+ raw: n,
1017
+ href: a,
1018
+ title: o,
1019
+ text: s,
1020
+ tokens: r.inlineTokens(s)
1021
+ };
1022
+ return r.state.inLink = !1, c;
1023
+ }
1024
+ function fn(e, t, n) {
1025
+ let r = e.match(n.other.indentCodeCompensation);
1026
+ if (r === null) return t;
1027
+ let i = r[1];
1028
+ return t.split("\n").map((e) => {
1029
+ let t = e.match(n.other.beginningSpace);
1030
+ if (t === null) return e;
1031
+ let [r] = t;
1032
+ return r.length >= i.length ? e.slice(i.length) : e;
1033
+ }).join("\n");
1034
+ }
1035
+ var pn = class {
1036
+ options;
1037
+ rules;
1038
+ lexer;
1039
+ constructor(e) {
1040
+ this.options = e || D;
1041
+ }
1042
+ space(e) {
1043
+ let t = this.rules.block.newline.exec(e);
1044
+ if (t && t[0].length > 0) return {
1045
+ type: "space",
1046
+ raw: t[0]
1047
+ };
1048
+ }
1049
+ code(e) {
1050
+ let t = this.rules.block.code.exec(e);
1051
+ if (t) {
1052
+ let e = this.options.pedantic ? t[0] : K(t[0]);
1053
+ return {
1054
+ type: "code",
1055
+ raw: e,
1056
+ codeBlockStyle: "indented",
1057
+ text: e.replace(this.rules.other.codeRemoveIndent, "")
1058
+ };
1059
+ }
1060
+ }
1061
+ fences(e) {
1062
+ let t = this.rules.block.fences.exec(e);
1063
+ if (t) {
1064
+ let e = t[0], n = fn(e, t[3] || "", this.rules);
1065
+ return {
1066
+ type: "code",
1067
+ raw: e,
1068
+ lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
1069
+ text: n
1070
+ };
1071
+ }
1072
+ }
1073
+ heading(e) {
1074
+ let t = this.rules.block.heading.exec(e);
1075
+ if (t) {
1076
+ let e = t[2].trim();
1077
+ if (this.rules.other.endingHash.test(e)) {
1078
+ let t = G(e, "#");
1079
+ (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
1080
+ }
1081
+ return {
1082
+ type: "heading",
1083
+ raw: G(t[0], "\n"),
1084
+ depth: t[1].length,
1085
+ text: e,
1086
+ tokens: this.lexer.inline(e)
1087
+ };
1088
+ }
1089
+ }
1090
+ hr(e) {
1091
+ let t = this.rules.block.hr.exec(e);
1092
+ if (t) return {
1093
+ type: "hr",
1094
+ raw: G(t[0], "\n")
1095
+ };
1096
+ }
1097
+ blockquote(e) {
1098
+ let t = this.rules.block.blockquote.exec(e);
1099
+ if (t) {
1100
+ let e = G(t[0], "\n").split("\n"), n = "", r = "", i = [];
1101
+ for (; e.length > 0;) {
1102
+ let t = !1, a = [], o;
1103
+ for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
1104
+ else if (!t) a.push(e[o]);
1105
+ else break;
1106
+ e = e.slice(o);
1107
+ let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
1108
+ n = n ? `${n}
1109
+ ${s}` : s, r = r ? `${r}
1110
+ ${c}` : c;
1111
+ let l = this.lexer.state.top;
1112
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
1113
+ let u = i.at(-1);
1114
+ if (u?.type === "code") break;
1115
+ if (u?.type === "blockquote") {
1116
+ let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
1117
+ i[i.length - 1] = o, n = n.substring(0, n.length - t.raw.length) + o.raw, r = r.substring(0, r.length - t.text.length) + o.text;
1118
+ break;
1119
+ } else if (u?.type === "list") {
1120
+ let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
1121
+ i[i.length - 1] = o, n = n.substring(0, n.length - u.raw.length) + o.raw, r = r.substring(0, r.length - t.raw.length) + o.raw, e = a.substring(i.at(-1).raw.length).split("\n");
1122
+ continue;
1123
+ }
1124
+ }
1125
+ return {
1126
+ type: "blockquote",
1127
+ raw: n,
1128
+ tokens: i,
1129
+ text: r
1130
+ };
1131
+ }
1132
+ }
1133
+ list(e) {
1134
+ let t = this.rules.block.list.exec(e);
1135
+ if (t) {
1136
+ let n = t[1].trim(), r = n.length > 1, i = {
1137
+ type: "list",
1138
+ raw: "",
1139
+ ordered: r,
1140
+ start: r ? +n.slice(0, -1) : "",
1141
+ loose: !1,
1142
+ items: []
1143
+ };
1144
+ n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
1145
+ let a = this.rules.other.listItemRegex(n), o = !1;
1146
+ for (; e;) {
1147
+ let n = !1, r = "", s = "";
1148
+ if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
1149
+ r = t[0], e = e.substring(r.length);
1150
+ let c = un(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
1151
+ if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = c.search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
1152
+ let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d), ee = this.rules.other.blockquoteBeginRegex(d);
1153
+ for (; e;) {
1154
+ let te = e.split("\n", 1)[0], ne;
1155
+ if (l = te, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), ne = l) : ne = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || ee.test(l) || t.test(l) || n.test(l)) break;
1156
+ if (ne.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + ne.slice(d);
1157
+ else {
1158
+ if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
1159
+ s += "\n" + l;
1160
+ }
1161
+ u = !l.trim(), r += te + "\n", e = e.substring(te.length + 1), c = ne.slice(d);
1162
+ }
1163
+ }
1164
+ i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
1165
+ type: "list_item",
1166
+ raw: r,
1167
+ task: !!this.options.gfm && this.rules.other.listIsTask.test(s),
1168
+ loose: !1,
1169
+ text: s,
1170
+ tokens: []
1171
+ }), i.raw += r;
1172
+ }
1173
+ let s = i.items.at(-1);
1174
+ if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
1175
+ else return;
1176
+ i.raw = i.raw.trimEnd();
1177
+ for (let e of i.items) {
1178
+ this.lexer.state.top = !1, e.tokens = this.lexer.blockTokens(e.text, []);
1179
+ let t = e.tokens[0];
1180
+ if (e.task && (t?.type === "text" || t?.type === "paragraph")) {
1181
+ e.text = e.text.replace(this.rules.other.listReplaceTask, ""), t.raw = t.raw.replace(this.rules.other.listReplaceTask, ""), t.text = t.text.replace(this.rules.other.listReplaceTask, "");
1182
+ for (let e = this.lexer.inlineQueue.length - 1; e >= 0; e--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)) {
1183
+ this.lexer.inlineQueue[e].src = this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask, "");
1184
+ break;
1185
+ }
1186
+ let n = this.rules.other.listTaskCheckbox.exec(e.raw);
1187
+ if (n) {
1188
+ let t = {
1189
+ type: "checkbox",
1190
+ raw: n[0] + " ",
1191
+ checked: n[0] !== "[ ]"
1192
+ };
1193
+ e.checked = t.checked, i.loose ? e.tokens[0] && ["paragraph", "text"].includes(e.tokens[0].type) && "tokens" in e.tokens[0] && e.tokens[0].tokens ? (e.tokens[0].raw = t.raw + e.tokens[0].raw, e.tokens[0].text = t.raw + e.tokens[0].text, e.tokens[0].tokens.unshift(t)) : e.tokens.unshift({
1194
+ type: "paragraph",
1195
+ raw: t.raw,
1196
+ text: t.raw,
1197
+ tokens: [t]
1198
+ }) : e.tokens.unshift(t);
1199
+ }
1200
+ } else e.task &&= !1;
1201
+ if (!i.loose) {
1202
+ let t = e.tokens.filter((e) => e.type === "space");
1203
+ i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
1204
+ }
1205
+ }
1206
+ if (i.loose) for (let e of i.items) {
1207
+ e.loose = !0;
1208
+ for (let t of e.tokens) t.type === "text" && (t.type = "paragraph");
1209
+ }
1210
+ return i;
1211
+ }
1212
+ }
1213
+ html(e) {
1214
+ let t = this.rules.block.html.exec(e);
1215
+ if (t) {
1216
+ let e = K(t[0]);
1217
+ return {
1218
+ type: "html",
1219
+ block: !0,
1220
+ raw: e,
1221
+ pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
1222
+ text: e
1223
+ };
1224
+ }
1225
+ }
1226
+ def(e) {
1227
+ let t = this.rules.block.def.exec(e);
1228
+ if (t) {
1229
+ let e = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
1230
+ return {
1231
+ type: "def",
1232
+ tag: e,
1233
+ raw: G(t[0], "\n"),
1234
+ href: n,
1235
+ title: r
1236
+ };
1237
+ }
1238
+ }
1239
+ table(e) {
1240
+ let t = this.rules.block.table.exec(e);
1241
+ if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1242
+ let n = W(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
1243
+ type: "table",
1244
+ raw: G(t[0], "\n"),
1245
+ header: [],
1246
+ align: [],
1247
+ rows: []
1248
+ };
1249
+ if (n.length === r.length) {
1250
+ for (let e of r) this.rules.other.tableAlignRight.test(e) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(e) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(e) ? a.align.push("left") : a.align.push(null);
1251
+ for (let e = 0; e < n.length; e++) a.header.push({
1252
+ text: n[e],
1253
+ tokens: this.lexer.inline(n[e]),
1254
+ header: !0,
1255
+ align: a.align[e]
1256
+ });
1257
+ for (let e of i) a.rows.push(W(e, a.header.length).map((e, t) => ({
1258
+ text: e,
1259
+ tokens: this.lexer.inline(e),
1260
+ header: !1,
1261
+ align: a.align[t]
1262
+ })));
1263
+ return a;
1264
+ }
1265
+ }
1266
+ lheading(e) {
1267
+ let t = this.rules.block.lheading.exec(e);
1268
+ if (t) {
1269
+ let e = t[1].trim();
1270
+ return {
1271
+ type: "heading",
1272
+ raw: G(t[0], "\n"),
1273
+ depth: t[2].charAt(0) === "=" ? 1 : 2,
1274
+ text: e,
1275
+ tokens: this.lexer.inline(e)
1276
+ };
1277
+ }
1278
+ }
1279
+ paragraph(e) {
1280
+ let t = this.rules.block.paragraph.exec(e);
1281
+ if (t) {
1282
+ let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
1283
+ return {
1284
+ type: "paragraph",
1285
+ raw: t[0],
1286
+ text: e,
1287
+ tokens: this.lexer.inline(e)
1288
+ };
1289
+ }
1290
+ }
1291
+ text(e) {
1292
+ let t = this.rules.block.text.exec(e);
1293
+ if (t) return {
1294
+ type: "text",
1295
+ raw: t[0],
1296
+ text: t[0],
1297
+ tokens: this.lexer.inline(t[0])
1298
+ };
1299
+ }
1300
+ escape(e) {
1301
+ let t = this.rules.inline.escape.exec(e);
1302
+ if (t) return {
1303
+ type: "escape",
1304
+ raw: t[0],
1305
+ text: t[1]
1306
+ };
1307
+ }
1308
+ tag(e) {
1309
+ let t = this.rules.inline.tag.exec(e);
1310
+ if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = !1), {
1311
+ type: "html",
1312
+ raw: t[0],
1313
+ inLink: this.lexer.state.inLink,
1314
+ inRawBlock: this.lexer.state.inRawBlock,
1315
+ block: !1,
1316
+ text: t[0]
1317
+ };
1318
+ }
1319
+ link(e) {
1320
+ let t = this.rules.inline.link.exec(e);
1321
+ if (t) {
1322
+ let e = t[2].trim();
1323
+ if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
1324
+ if (!this.rules.other.endAngleBracket.test(e)) return;
1325
+ let t = G(e.slice(0, -1), "\\");
1326
+ if ((e.length - t.length) % 2 == 0) return;
1327
+ } else {
1328
+ let e = ln(t[2], "()");
1329
+ if (e === -2) return;
1330
+ if (e > -1) {
1331
+ let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
1332
+ t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
1333
+ }
1334
+ }
1335
+ let n = t[2], r = "";
1336
+ if (this.options.pedantic) {
1337
+ let e = this.rules.other.pedanticHrefTitle.exec(n);
1338
+ e && (n = e[1], r = e[3]);
1339
+ } else r = t[3] ? t[3].slice(1, -1) : "";
1340
+ return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), dn(t, {
1341
+ href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
1342
+ title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
1343
+ }, t[0], this.lexer, this.rules);
1344
+ }
1345
+ }
1346
+ reflink(e, t) {
1347
+ let n;
1348
+ if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1349
+ let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
1350
+ if (!e) {
1351
+ let e = n[0].charAt(0);
1352
+ return {
1353
+ type: "text",
1354
+ raw: e,
1355
+ text: e
1356
+ };
1357
+ }
1358
+ return dn(n, e, n[0], this.lexer, this.rules);
1359
+ }
1360
+ }
1361
+ emStrong(e, t, n = "") {
1362
+ let r = this.rules.inline.emStrongLDelim.exec(e);
1363
+ if (!(!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(r[1] || r[3]) || !n || this.rules.inline.punctuation.exec(n))) {
1364
+ let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1365
+ for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) !== null;) {
1366
+ if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
1367
+ if (a = [...i].length, r[3] || r[4]) {
1368
+ o += a;
1369
+ continue;
1370
+ } else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
1371
+ s += a;
1372
+ continue;
1373
+ }
1374
+ if (o -= a, o > 0) continue;
1375
+ a = Math.min(a, a + o + s);
1376
+ let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
1377
+ if (Math.min(n, a) % 2) {
1378
+ let e = c.slice(1, -1);
1379
+ return {
1380
+ type: "em",
1381
+ raw: c,
1382
+ text: e,
1383
+ tokens: this.lexer.inlineTokens(e)
1384
+ };
1385
+ }
1386
+ let l = c.slice(2, -2);
1387
+ return {
1388
+ type: "strong",
1389
+ raw: c,
1390
+ text: l,
1391
+ tokens: this.lexer.inlineTokens(l)
1392
+ };
1393
+ }
1394
+ }
1395
+ }
1396
+ codespan(e) {
1397
+ let t = this.rules.inline.code.exec(e);
1398
+ if (t) {
1399
+ let e = t[2].replace(this.rules.other.newLineCharGlobal, " "), n = this.rules.other.nonSpaceChar.test(e), r = this.rules.other.startingSpaceChar.test(e) && this.rules.other.endingSpaceChar.test(e);
1400
+ return n && r && (e = e.substring(1, e.length - 1)), {
1401
+ type: "codespan",
1402
+ raw: t[0],
1403
+ text: e
1404
+ };
1405
+ }
1406
+ }
1407
+ br(e) {
1408
+ let t = this.rules.inline.br.exec(e);
1409
+ if (t) return {
1410
+ type: "br",
1411
+ raw: t[0]
1412
+ };
1413
+ }
1414
+ del(e, t, n = "") {
1415
+ let r = this.rules.inline.delLDelim.exec(e);
1416
+ if (r && (!r[1] || !n || this.rules.inline.punctuation.exec(n))) {
1417
+ let n = [...r[0]].length - 1, i, a, o = n, s = this.rules.inline.delRDelim;
1418
+ for (s.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = s.exec(t)) !== null;) {
1419
+ if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i || (a = [...i].length, a !== n)) continue;
1420
+ if (r[3] || r[4]) {
1421
+ o += a;
1422
+ continue;
1423
+ }
1424
+ if (o -= a, o > 0) continue;
1425
+ a = Math.min(a, a + o);
1426
+ let t = [...r[0]][0].length, s = e.slice(0, n + r.index + t + a), c = s.slice(n, -n);
1427
+ return {
1428
+ type: "del",
1429
+ raw: s,
1430
+ text: c,
1431
+ tokens: this.lexer.inlineTokens(c)
1432
+ };
1433
+ }
1434
+ }
1435
+ }
1436
+ autolink(e) {
1437
+ let t = this.rules.inline.autolink.exec(e);
1438
+ if (t) {
1439
+ let e, n;
1440
+ return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
1441
+ type: "link",
1442
+ raw: t[0],
1443
+ text: e,
1444
+ href: n,
1445
+ tokens: [{
1446
+ type: "text",
1447
+ raw: e,
1448
+ text: e
1449
+ }]
1450
+ };
1451
+ }
1452
+ }
1453
+ url(e) {
1454
+ let t;
1455
+ if (t = this.rules.inline.url.exec(e)) {
1456
+ let e, n;
1457
+ if (t[2] === "@") e = t[0], n = "mailto:" + e;
1458
+ else {
1459
+ let r;
1460
+ do
1461
+ r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
1462
+ while (r !== t[0]);
1463
+ e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
1464
+ }
1465
+ return {
1466
+ type: "link",
1467
+ raw: t[0],
1468
+ text: e,
1469
+ href: n,
1470
+ tokens: [{
1471
+ type: "text",
1472
+ raw: e,
1473
+ text: e
1474
+ }]
1475
+ };
1476
+ }
1477
+ }
1478
+ inlineText(e) {
1479
+ let t = this.rules.inline.text.exec(e);
1480
+ if (t) {
1481
+ let e = this.lexer.state.inRawBlock;
1482
+ return {
1483
+ type: "text",
1484
+ raw: t[0],
1485
+ text: t[0],
1486
+ escaped: e
1487
+ };
1488
+ }
1489
+ }
1490
+ }, q = class e {
1491
+ tokens;
1492
+ options;
1493
+ state;
1494
+ inlineQueue;
1495
+ tokenizer;
1496
+ constructor(e) {
1497
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || D, this.options.tokenizer = this.options.tokenizer || new pn(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1498
+ inLink: !1,
1499
+ inRawBlock: !1,
1500
+ top: !0
1501
+ };
1502
+ let t = {
1503
+ other: j,
1504
+ block: rn.normal,
1505
+ inline: an.normal
1506
+ };
1507
+ this.options.pedantic ? (t.block = rn.pedantic, t.inline = an.pedantic) : this.options.gfm && (t.block = rn.gfm, this.options.breaks ? t.inline = an.breaks : t.inline = an.gfm), this.tokenizer.rules = t;
1508
+ }
1509
+ static get rules() {
1510
+ return {
1511
+ block: rn,
1512
+ inline: an
1513
+ };
1514
+ }
1515
+ static lex(t, n) {
1516
+ return new e(n).lex(t);
1517
+ }
1518
+ static lexInline(t, n) {
1519
+ return new e(n).inlineTokens(t);
1520
+ }
1521
+ lex(e) {
1522
+ e = e.replace(j.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
1523
+ for (let e = 0; e < this.inlineQueue.length; e++) {
1524
+ let t = this.inlineQueue[e];
1525
+ this.inlineTokens(t.src, t.tokens);
1526
+ }
1527
+ return this.inlineQueue = [], this.tokens;
1528
+ }
1529
+ blockTokens(e, t = [], n = !1) {
1530
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(j.tabCharGlobal, " ").replace(j.spaceLine, ""));
1531
+ let r = Infinity;
1532
+ for (; e;) {
1533
+ if (e.length < r) r = e.length;
1534
+ else {
1535
+ this.infiniteLoopError(e.charCodeAt(0));
1536
+ break;
1537
+ }
1538
+ let i;
1539
+ if (this.options.extensions?.block?.some((n) => (i = n.call({ lexer: this }, e, t)) ? (e = e.substring(i.raw.length), t.push(i), !0) : !1)) continue;
1540
+ if (i = this.tokenizer.space(e)) {
1541
+ e = e.substring(i.raw.length);
1542
+ let n = t.at(-1);
1543
+ i.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(i);
1544
+ continue;
1545
+ }
1546
+ if (i = this.tokenizer.code(e)) {
1547
+ e = e.substring(i.raw.length);
1548
+ let n = t.at(-1);
1549
+ n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.text, this.inlineQueue.at(-1).src = n.text) : t.push(i);
1550
+ continue;
1551
+ }
1552
+ if (i = this.tokenizer.fences(e)) {
1553
+ e = e.substring(i.raw.length), t.push(i);
1554
+ continue;
1555
+ }
1556
+ if (i = this.tokenizer.heading(e)) {
1557
+ e = e.substring(i.raw.length), t.push(i);
1558
+ continue;
1559
+ }
1560
+ if (i = this.tokenizer.hr(e)) {
1561
+ e = e.substring(i.raw.length), t.push(i);
1562
+ continue;
1563
+ }
1564
+ if (i = this.tokenizer.blockquote(e)) {
1565
+ e = e.substring(i.raw.length), t.push(i);
1566
+ continue;
1567
+ }
1568
+ if (i = this.tokenizer.list(e)) {
1569
+ e = e.substring(i.raw.length), t.push(i);
1570
+ continue;
1571
+ }
1572
+ if (i = this.tokenizer.html(e)) {
1573
+ e = e.substring(i.raw.length), t.push(i);
1574
+ continue;
1575
+ }
1576
+ if (i = this.tokenizer.def(e)) {
1577
+ e = e.substring(i.raw.length);
1578
+ let n = t.at(-1);
1579
+ n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.raw, this.inlineQueue.at(-1).src = n.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = {
1580
+ href: i.href,
1581
+ title: i.title
1582
+ }, t.push(i));
1583
+ continue;
1584
+ }
1585
+ if (i = this.tokenizer.table(e)) {
1586
+ e = e.substring(i.raw.length), t.push(i);
1587
+ continue;
1588
+ }
1589
+ if (i = this.tokenizer.lheading(e)) {
1590
+ e = e.substring(i.raw.length), t.push(i);
1591
+ continue;
1592
+ }
1593
+ let a = e;
1594
+ if (this.options.extensions?.startBlock) {
1595
+ let t = Infinity, n = e.slice(1), r;
1596
+ this.options.extensions.startBlock.forEach((e) => {
1597
+ r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1598
+ }), t < Infinity && t >= 0 && (a = e.substring(0, t + 1));
1599
+ }
1600
+ if (this.state.top && (i = this.tokenizer.paragraph(a))) {
1601
+ let r = t.at(-1);
1602
+ n && r?.type === "paragraph" ? (r.raw += (r.raw.endsWith("\n") ? "" : "\n") + i.raw, r.text += "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = r.text) : t.push(i), n = a.length !== e.length, e = e.substring(i.raw.length);
1603
+ continue;
1604
+ }
1605
+ if (i = this.tokenizer.text(e)) {
1606
+ e = e.substring(i.raw.length);
1607
+ let n = t.at(-1);
1608
+ n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = n.text) : t.push(i);
1609
+ continue;
1610
+ }
1611
+ if (e) {
1612
+ this.infiniteLoopError(e.charCodeAt(0));
1613
+ break;
1614
+ }
1615
+ }
1616
+ return this.state.top = !0, t;
1617
+ }
1618
+ inline(e, t = []) {
1619
+ return this.inlineQueue.push({
1620
+ src: e,
1621
+ tokens: t
1622
+ }), t;
1623
+ }
1624
+ inlineTokens(e, t = []) {
1625
+ this.tokenizer.lexer = this;
1626
+ let n = e, r = null;
1627
+ if (this.tokens.links) {
1628
+ let e = Object.keys(this.tokens.links);
1629
+ if (e.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) !== null;) e.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
1630
+ }
1631
+ for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1632
+ let i;
1633
+ for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) !== null;) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
1634
+ n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
1635
+ let a = !1, o = "", s = Infinity;
1636
+ for (; e;) {
1637
+ if (e.length < s) s = e.length;
1638
+ else {
1639
+ this.infiniteLoopError(e.charCodeAt(0));
1640
+ break;
1641
+ }
1642
+ a || (o = ""), a = !1;
1643
+ let r;
1644
+ if (this.options.extensions?.inline?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
1645
+ if (r = this.tokenizer.escape(e)) {
1646
+ e = e.substring(r.raw.length), t.push(r);
1647
+ continue;
1648
+ }
1649
+ if (r = this.tokenizer.tag(e)) {
1650
+ e = e.substring(r.raw.length), t.push(r);
1651
+ continue;
1652
+ }
1653
+ if (r = this.tokenizer.link(e)) {
1654
+ e = e.substring(r.raw.length), t.push(r);
1655
+ continue;
1656
+ }
1657
+ if (r = this.tokenizer.reflink(e, this.tokens.links)) {
1658
+ e = e.substring(r.raw.length);
1659
+ let n = t.at(-1);
1660
+ r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1661
+ continue;
1662
+ }
1663
+ if (r = this.tokenizer.emStrong(e, n, o)) {
1664
+ e = e.substring(r.raw.length), t.push(r);
1665
+ continue;
1666
+ }
1667
+ if (r = this.tokenizer.codespan(e)) {
1668
+ e = e.substring(r.raw.length), t.push(r);
1669
+ continue;
1670
+ }
1671
+ if (r = this.tokenizer.br(e)) {
1672
+ e = e.substring(r.raw.length), t.push(r);
1673
+ continue;
1674
+ }
1675
+ if (r = this.tokenizer.del(e, n, o)) {
1676
+ e = e.substring(r.raw.length), t.push(r);
1677
+ continue;
1678
+ }
1679
+ if (r = this.tokenizer.autolink(e)) {
1680
+ e = e.substring(r.raw.length), t.push(r);
1681
+ continue;
1682
+ }
1683
+ if (!this.state.inLink && (r = this.tokenizer.url(e))) {
1684
+ e = e.substring(r.raw.length), t.push(r);
1685
+ continue;
1686
+ }
1687
+ let i = e;
1688
+ if (this.options.extensions?.startInline) {
1689
+ let t = Infinity, n = e.slice(1), r;
1690
+ this.options.extensions.startInline.forEach((e) => {
1691
+ r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1692
+ }), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
1693
+ }
1694
+ if (r = this.tokenizer.inlineText(i)) {
1695
+ e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (o = r.raw.slice(-1)), a = !0;
1696
+ let n = t.at(-1);
1697
+ n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1698
+ continue;
1699
+ }
1700
+ if (e) {
1701
+ this.infiniteLoopError(e.charCodeAt(0));
1702
+ break;
1703
+ }
1704
+ }
1705
+ return t;
1706
+ }
1707
+ infiniteLoopError(e) {
1708
+ let t = "Infinite loop on byte: " + e;
1709
+ if (this.options.silent) console.error(t);
1710
+ else throw Error(t);
1711
+ }
1712
+ }, J = class {
1713
+ options;
1714
+ parser;
1715
+ constructor(e) {
1716
+ this.options = e || D;
1717
+ }
1718
+ space(e) {
1719
+ return "";
1720
+ }
1721
+ code({ text: e, lang: t, escaped: n }) {
1722
+ let r = (t || "").match(j.notSpaceStart)?.[0], i = e.replace(j.endingNewline, "") + "\n";
1723
+ return r ? "<pre><code class=\"language-" + U(r) + "\">" + (n ? i : U(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : U(i, !0)) + "</code></pre>\n";
1724
+ }
1725
+ blockquote({ tokens: e }) {
1726
+ return `<blockquote>
1727
+ ${this.parser.parse(e)}</blockquote>
1728
+ `;
1729
+ }
1730
+ html({ text: e }) {
1731
+ return e;
1732
+ }
1733
+ def(e) {
1734
+ return "";
1735
+ }
1736
+ heading({ tokens: e, depth: t }) {
1737
+ return `<h${t}>${this.parser.parseInline(e)}</h${t}>
1738
+ `;
1739
+ }
1740
+ hr(e) {
1741
+ return "<hr>\n";
1742
+ }
1743
+ list(e) {
1744
+ let t = e.ordered, n = e.start, r = "";
1745
+ for (let t = 0; t < e.items.length; t++) {
1746
+ let n = e.items[t];
1747
+ r += this.listitem(n);
1748
+ }
1749
+ let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
1750
+ return "<" + i + a + ">\n" + r + "</" + i + ">\n";
1751
+ }
1752
+ listitem(e) {
1753
+ return `<li>${this.parser.parse(e.tokens)}</li>
1754
+ `;
1755
+ }
1756
+ checkbox({ checked: e }) {
1757
+ return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
1758
+ }
1759
+ paragraph({ tokens: e }) {
1760
+ return `<p>${this.parser.parseInline(e)}</p>
1761
+ `;
1762
+ }
1763
+ table(e) {
1764
+ let t = "", n = "";
1765
+ for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
1766
+ t += this.tablerow({ text: n });
1767
+ let r = "";
1768
+ for (let t = 0; t < e.rows.length; t++) {
1769
+ let i = e.rows[t];
1770
+ n = "";
1771
+ for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
1772
+ r += this.tablerow({ text: n });
1773
+ }
1774
+ return r &&= `<tbody>${r}</tbody>`, "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
1775
+ }
1776
+ tablerow({ text: e }) {
1777
+ return `<tr>
1778
+ ${e}</tr>
1779
+ `;
1780
+ }
1781
+ tablecell(e) {
1782
+ let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1783
+ return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1784
+ `;
1785
+ }
1786
+ strong({ tokens: e }) {
1787
+ return `<strong>${this.parser.parseInline(e)}</strong>`;
1788
+ }
1789
+ em({ tokens: e }) {
1790
+ return `<em>${this.parser.parseInline(e)}</em>`;
1791
+ }
1792
+ codespan({ text: e }) {
1793
+ return `<code>${U(e, !0)}</code>`;
1794
+ }
1795
+ br(e) {
1796
+ return "<br>";
1797
+ }
1798
+ del({ tokens: e }) {
1799
+ return `<del>${this.parser.parseInline(e)}</del>`;
1800
+ }
1801
+ link({ href: e, title: t, tokens: n }) {
1802
+ let r = this.parser.parseInline(n), i = cn(e);
1803
+ if (i === null) return r;
1804
+ e = i;
1805
+ let a = "<a href=\"" + e + "\"";
1806
+ return t && (a += " title=\"" + U(t) + "\""), a += ">" + r + "</a>", a;
1807
+ }
1808
+ image({ href: e, title: t, text: n, tokens: r }) {
1809
+ r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1810
+ let i = cn(e);
1811
+ if (i === null) return U(n);
1812
+ e = i;
1813
+ let a = `<img src="${e}" alt="${U(n)}"`;
1814
+ return t && (a += ` title="${U(t)}"`), a += ">", a;
1815
+ }
1816
+ text(e) {
1817
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : U(e.text);
1818
+ }
1819
+ }, Y = class {
1820
+ strong({ text: e }) {
1821
+ return e;
1822
+ }
1823
+ em({ text: e }) {
1824
+ return e;
1825
+ }
1826
+ codespan({ text: e }) {
1827
+ return e;
1828
+ }
1829
+ del({ text: e }) {
1830
+ return e;
1831
+ }
1832
+ html({ text: e }) {
1833
+ return e;
1834
+ }
1835
+ text({ text: e }) {
1836
+ return e;
1837
+ }
1838
+ link({ text: e }) {
1839
+ return "" + e;
1840
+ }
1841
+ image({ text: e }) {
1842
+ return "" + e;
1843
+ }
1844
+ br() {
1845
+ return "";
1846
+ }
1847
+ checkbox({ raw: e }) {
1848
+ return e;
1849
+ }
1850
+ }, X = class e {
1851
+ options;
1852
+ renderer;
1853
+ textRenderer;
1854
+ constructor(e) {
1855
+ this.options = e || D, this.options.renderer = this.options.renderer || new J(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Y();
1856
+ }
1857
+ static parse(t, n) {
1858
+ return new e(n).parse(t);
1859
+ }
1860
+ static parseInline(t, n) {
1861
+ return new e(n).parseInline(t);
1862
+ }
1863
+ parse(e) {
1864
+ this.renderer.parser = this;
1865
+ let t = "";
1866
+ for (let n = 0; n < e.length; n++) {
1867
+ let r = e[n];
1868
+ if (this.options.extensions?.renderers?.[r.type]) {
1869
+ let e = r, n = this.options.extensions.renderers[e.type].call({ parser: this }, e);
1870
+ if (n !== !1 || ![
1871
+ "space",
1872
+ "hr",
1873
+ "heading",
1874
+ "code",
1875
+ "table",
1876
+ "blockquote",
1877
+ "list",
1878
+ "html",
1879
+ "def",
1880
+ "paragraph",
1881
+ "text"
1882
+ ].includes(e.type)) {
1883
+ t += n || "";
1884
+ continue;
1885
+ }
1886
+ }
1887
+ let i = r;
1888
+ switch (i.type) {
1889
+ case "space":
1890
+ t += this.renderer.space(i);
1891
+ break;
1892
+ case "hr":
1893
+ t += this.renderer.hr(i);
1894
+ break;
1895
+ case "heading":
1896
+ t += this.renderer.heading(i);
1897
+ break;
1898
+ case "code":
1899
+ t += this.renderer.code(i);
1900
+ break;
1901
+ case "table":
1902
+ t += this.renderer.table(i);
1903
+ break;
1904
+ case "blockquote":
1905
+ t += this.renderer.blockquote(i);
1906
+ break;
1907
+ case "list":
1908
+ t += this.renderer.list(i);
1909
+ break;
1910
+ case "checkbox":
1911
+ t += this.renderer.checkbox(i);
1912
+ break;
1913
+ case "html":
1914
+ t += this.renderer.html(i);
1915
+ break;
1916
+ case "def":
1917
+ t += this.renderer.def(i);
1918
+ break;
1919
+ case "paragraph":
1920
+ t += this.renderer.paragraph(i);
1921
+ break;
1922
+ case "text":
1923
+ t += this.renderer.text(i);
1924
+ break;
1925
+ default: {
1926
+ let e = "Token with \"" + i.type + "\" type was not found.";
1927
+ if (this.options.silent) return console.error(e), "";
1928
+ throw Error(e);
1929
+ }
1930
+ }
1931
+ }
1932
+ return t;
1933
+ }
1934
+ parseInline(e, t = this.renderer) {
1935
+ this.renderer.parser = this;
1936
+ let n = "";
1937
+ for (let r = 0; r < e.length; r++) {
1938
+ let i = e[r];
1939
+ if (this.options.extensions?.renderers?.[i.type]) {
1940
+ let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1941
+ if (e !== !1 || ![
1942
+ "escape",
1943
+ "html",
1944
+ "link",
1945
+ "image",
1946
+ "strong",
1947
+ "em",
1948
+ "codespan",
1949
+ "br",
1950
+ "del",
1951
+ "text"
1952
+ ].includes(i.type)) {
1953
+ n += e || "";
1954
+ continue;
1955
+ }
1956
+ }
1957
+ let a = i;
1958
+ switch (a.type) {
1959
+ case "escape":
1960
+ n += t.text(a);
1961
+ break;
1962
+ case "html":
1963
+ n += t.html(a);
1964
+ break;
1965
+ case "link":
1966
+ n += t.link(a);
1967
+ break;
1968
+ case "image":
1969
+ n += t.image(a);
1970
+ break;
1971
+ case "checkbox":
1972
+ n += t.checkbox(a);
1973
+ break;
1974
+ case "strong":
1975
+ n += t.strong(a);
1976
+ break;
1977
+ case "em":
1978
+ n += t.em(a);
1979
+ break;
1980
+ case "codespan":
1981
+ n += t.codespan(a);
1982
+ break;
1983
+ case "br":
1984
+ n += t.br(a);
1985
+ break;
1986
+ case "del":
1987
+ n += t.del(a);
1988
+ break;
1989
+ case "text":
1990
+ n += t.text(a);
1991
+ break;
1992
+ default: {
1993
+ let e = "Token with \"" + a.type + "\" type was not found.";
1994
+ if (this.options.silent) return console.error(e), "";
1995
+ throw Error(e);
1996
+ }
1997
+ }
1998
+ }
1999
+ return n;
2000
+ }
2001
+ }, Z = class {
2002
+ options;
2003
+ block;
2004
+ constructor(e) {
2005
+ this.options = e || D;
2006
+ }
2007
+ static passThroughHooks = /* @__PURE__ */ new Set([
2008
+ "preprocess",
2009
+ "postprocess",
2010
+ "processAllTokens",
2011
+ "emStrongMask"
2012
+ ]);
2013
+ static passThroughHooksRespectAsync = /* @__PURE__ */ new Set([
2014
+ "preprocess",
2015
+ "postprocess",
2016
+ "processAllTokens"
2017
+ ]);
2018
+ preprocess(e) {
2019
+ return e;
2020
+ }
2021
+ postprocess(e) {
2022
+ return e;
2023
+ }
2024
+ processAllTokens(e) {
2025
+ return e;
2026
+ }
2027
+ emStrongMask(e) {
2028
+ return e;
2029
+ }
2030
+ provideLexer(e = this.block) {
2031
+ return e ? q.lex : q.lexInline;
2032
+ }
2033
+ provideParser(e = this.block) {
2034
+ return e ? X.parse : X.parseInline;
2035
+ }
2036
+ }, mn = new class {
2037
+ defaults = ct();
2038
+ options = this.setOptions;
2039
+ parse = this.parseMarkdown(!0);
2040
+ parseInline = this.parseMarkdown(!1);
2041
+ Parser = X;
2042
+ Renderer = J;
2043
+ TextRenderer = Y;
2044
+ Lexer = q;
2045
+ Tokenizer = pn;
2046
+ Hooks = Z;
2047
+ constructor(...e) {
2048
+ this.use(...e);
2049
+ }
2050
+ walkTokens(e, t) {
2051
+ let n = [];
2052
+ for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
2053
+ case "table": {
2054
+ let e = r;
2055
+ for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
2056
+ for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
2057
+ break;
2058
+ }
2059
+ case "list": {
2060
+ let e = r;
2061
+ n = n.concat(this.walkTokens(e.items, t));
2062
+ break;
2063
+ }
2064
+ default: {
2065
+ let e = r;
2066
+ this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
2067
+ let i = e[r].flat(Infinity);
2068
+ n = n.concat(this.walkTokens(i, t));
2069
+ }) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
2070
+ }
2071
+ }
2072
+ return n;
2073
+ }
2074
+ use(...e) {
2075
+ let t = this.defaults.extensions || {
2076
+ renderers: {},
2077
+ childTokens: {}
2078
+ };
2079
+ return e.forEach((e) => {
2080
+ let n = { ...e };
2081
+ if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
2082
+ if (!e.name) throw Error("extension name required");
2083
+ if ("renderer" in e) {
2084
+ let n = t.renderers[e.name];
2085
+ n ? t.renderers[e.name] = function(...t) {
2086
+ let r = e.renderer.apply(this, t);
2087
+ return r === !1 && (r = n.apply(this, t)), r;
2088
+ } : t.renderers[e.name] = e.renderer;
2089
+ }
2090
+ if ("tokenizer" in e) {
2091
+ if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
2092
+ let n = t[e.level];
2093
+ n ? n.unshift(e.tokenizer) : t[e.level] = [e.tokenizer], e.start && (e.level === "block" ? t.startBlock ? t.startBlock.push(e.start) : t.startBlock = [e.start] : e.level === "inline" && (t.startInline ? t.startInline.push(e.start) : t.startInline = [e.start]));
2094
+ }
2095
+ "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2096
+ }), n.extensions = t), e.renderer) {
2097
+ let t = this.defaults.renderer || new J(this.defaults);
2098
+ for (let n in e.renderer) {
2099
+ if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2100
+ if (["options", "parser"].includes(n)) continue;
2101
+ let r = n, i = e.renderer[r], a = t[r];
2102
+ t[r] = (...e) => {
2103
+ let n = i.apply(t, e);
2104
+ return n === !1 && (n = a.apply(t, e)), n || "";
2105
+ };
2106
+ }
2107
+ n.renderer = t;
2108
+ }
2109
+ if (e.tokenizer) {
2110
+ let t = this.defaults.tokenizer || new pn(this.defaults);
2111
+ for (let n in e.tokenizer) {
2112
+ if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2113
+ if ([
2114
+ "options",
2115
+ "rules",
2116
+ "lexer"
2117
+ ].includes(n)) continue;
2118
+ let r = n, i = e.tokenizer[r], a = t[r];
2119
+ t[r] = (...e) => {
2120
+ let n = i.apply(t, e);
2121
+ return n === !1 && (n = a.apply(t, e)), n;
2122
+ };
2123
+ }
2124
+ n.tokenizer = t;
2125
+ }
2126
+ if (e.hooks) {
2127
+ let t = this.defaults.hooks || new Z();
2128
+ for (let n in e.hooks) {
2129
+ if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2130
+ if (["options", "block"].includes(n)) continue;
2131
+ let r = n, i = e.hooks[r], a = t[r];
2132
+ Z.passThroughHooks.has(n) ? t[r] = (e) => {
2133
+ if (this.defaults.async && Z.passThroughHooksRespectAsync.has(n)) return (async () => {
2134
+ let n = await i.call(t, e);
2135
+ return a.call(t, n);
2136
+ })();
2137
+ let r = i.call(t, e);
2138
+ return a.call(t, r);
2139
+ } : t[r] = (...e) => {
2140
+ if (this.defaults.async) return (async () => {
2141
+ let n = await i.apply(t, e);
2142
+ return n === !1 && (n = await a.apply(t, e)), n;
2143
+ })();
2144
+ let n = i.apply(t, e);
2145
+ return n === !1 && (n = a.apply(t, e)), n;
2146
+ };
2147
+ }
2148
+ n.hooks = t;
2149
+ }
2150
+ if (e.walkTokens) {
2151
+ let t = this.defaults.walkTokens, r = e.walkTokens;
2152
+ n.walkTokens = function(e) {
2153
+ let n = [];
2154
+ return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
2155
+ };
2156
+ }
2157
+ this.defaults = {
2158
+ ...this.defaults,
2159
+ ...n
2160
+ };
2161
+ }), this;
2162
+ }
2163
+ setOptions(e) {
2164
+ return this.defaults = {
2165
+ ...this.defaults,
2166
+ ...e
2167
+ }, this;
2168
+ }
2169
+ lexer(e, t) {
2170
+ return q.lex(e, t ?? this.defaults);
2171
+ }
2172
+ parser(e, t) {
2173
+ return X.parse(e, t ?? this.defaults);
2174
+ }
2175
+ parseMarkdown(e) {
2176
+ return (t, n) => {
2177
+ let r = { ...n }, i = {
2178
+ ...this.defaults,
2179
+ ...r
2180
+ }, a = this.onError(!!i.silent, !!i.async);
2181
+ if (this.defaults.async === !0 && r.async === !1) return a(/* @__PURE__ */ Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
2182
+ if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
2183
+ if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
2184
+ if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
2185
+ let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
2186
+ i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
2187
+ let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(a, i);
2188
+ return i.hooks ? await i.hooks.postprocess(o) : o;
2189
+ })().catch(a);
2190
+ try {
2191
+ i.hooks && (t = i.hooks.preprocess(t));
2192
+ let n = (i.hooks ? i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(t, i);
2193
+ i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
2194
+ let r = (i.hooks ? i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(n, i);
2195
+ return i.hooks && (r = i.hooks.postprocess(r)), r;
2196
+ } catch (e) {
2197
+ return a(e);
2198
+ }
2199
+ };
2200
+ }
2201
+ onError(e, t) {
2202
+ return (n) => {
2203
+ if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
2204
+ let e = "<p>An error occurred:</p><pre>" + U(n.message + "", !0) + "</pre>";
2205
+ return t ? Promise.resolve(e) : e;
2206
+ }
2207
+ if (t) return Promise.reject(n);
2208
+ throw n;
2209
+ };
2210
+ }
2211
+ }();
2212
+ function Q(e, t) {
2213
+ return mn.parse(e, t);
2214
+ }
2215
+ Q.options = Q.setOptions = function(e) {
2216
+ return mn.setOptions(e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2217
+ }, Q.getDefaults = ct, Q.defaults = D, Q.use = function(...e) {
2218
+ return mn.use(...e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2219
+ }, Q.walkTokens = function(e, t) {
2220
+ return mn.walkTokens(e, t);
2221
+ }, Q.parseInline = mn.parseInline, Q.Parser = X, Q.parser = X.parse, Q.Renderer = J, Q.TextRenderer = Y, Q.Lexer = q, Q.lexer = q.lex, Q.Tokenizer = pn, Q.Hooks = Z, Q.parse = Q, Q.options, Q.setOptions, Q.use, Q.walkTokens, Q.parseInline, X.parse, q.lex;
2222
+ //#endregion
2223
+ //#region src/components/ai-chat/empty-state/ai-chat-empty-state.module.scss?inline
2224
+ var hn = ":host{box-sizing:border-box;width:100%;min-height:0;padding-block:var(--luzmo-ai-chat-empty-state-padding-block,var(--ai-chat-empty-state-padding-block));padding-inline:var(--luzmo-ai-chat-empty-state-padding-inline,var(--ai-chat-empty-state-padding-inline));flex:1;justify-content:center;align-items:center;display:flex}.empty-state{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-header-actions-gap,var(--ai-chat-empty-state-header-actions-gap));width:100%;max-width:var(--luzmo-ai-chat-empty-state-max-width,var(--ai-chat-empty-state-max-width));text-align:center;flex-direction:column;display:flex}.header{flex-direction:column;align-items:center;width:100%;display:flex}.actions{align-items:center;gap:var(--luzmo-ai-chat-empty-state-actions-gap,var(--ai-chat-empty-state-actions-gap));flex-direction:column;width:100%;display:flex}.title{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-title-font-size,var(--ai-chat-empty-state-title-font-size));font-weight:var(--luzmo-ai-chat-empty-state-title-font-weight,var(--ai-chat-empty-state-title-font-weight));line-height:var(--luzmo-ai-chat-empty-state-title-line-height,var(--ai-chat-empty-state-title-line-height));color:var(--luzmo-ai-chat-empty-state-title-color,var(--ai-chat-empty-state-title-color));text-wrap:balance;margin:0}.subtitle{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-subtitle-font-size,var(--ai-chat-empty-state-subtitle-font-size));font-weight:var(--luzmo-ai-chat-empty-state-subtitle-font-weight,var(--ai-chat-empty-state-subtitle-font-weight));line-height:var(--luzmo-ai-chat-empty-state-subtitle-line-height,var(--ai-chat-empty-state-subtitle-line-height));color:var(--luzmo-ai-chat-empty-state-subtitle-color,var(--ai-chat-empty-state-subtitle-color));margin:0}.suggestions{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-suggestions-gap,var(--ai-chat-empty-state-suggestions-gap));flex-wrap:wrap;width:100%;display:flex}luzmo-action-button{max-width:100%}:host{--ai-chat-empty-state-header-actions-gap:1.5rem;--ai-chat-empty-state-actions-gap:var(--luzmo-spacing-4);--ai-chat-empty-state-suggestions-gap:var(--luzmo-spacing-3);--ai-chat-empty-state-max-width:22.5rem;--ai-chat-empty-state-padding-block:2rem;--ai-chat-empty-state-padding-inline:var(--luzmo-spacing-5);--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-l);--ai-chat-empty-state-title-font-weight:var(--luzmo-font-weight-strong,600);--ai-chat-empty-state-title-line-height:1.4;--ai-chat-empty-state-title-color:var(--luzmo-font-color);--ai-chat-empty-state-subtitle-font-size:var(--luzmo-font-size-s);--ai-chat-empty-state-subtitle-font-weight:var(--luzmo-font-weight);--ai-chat-empty-state-subtitle-line-height:var(--luzmo-line-height);--ai-chat-empty-state-subtitle-color:var(--luzmo-font-color-dimmed,var(--luzmo-font-color-extra-dimmed))}", gn = class extends e {
2225
+ constructor(...e) {
2226
+ super(...e), this.title = n("What can I help you with?", { desc: "Title for the AI chat empty state" }), this.subtitle = "", this.suggestions = [], this.disabled = !1;
2227
+ }
2228
+ static {
2229
+ this.styles = c(hn);
2230
+ }
2231
+ static {
2232
+ this.tagName = "luzmo-ai-chat-empty-state";
2233
+ }
2234
+ _handleSuggestionActivate(e) {
2235
+ if (this.disabled) return;
2236
+ let t = e.prompt ?? e.label;
2237
+ this.dispatchEvent(new CustomEvent("luzmo-suggestion-selected", {
2238
+ detail: {
2239
+ label: e.label,
2240
+ prompt: t,
2241
+ selectedDatasets: e.selectedDatasets
2242
+ },
2243
+ bubbles: !0,
2244
+ composed: !0
2245
+ }));
2246
+ }
2247
+ render() {
2248
+ let e = this.suggestions.length > 0;
2249
+ return o`
2250
+ <section class="empty-state" aria-labelledby="ai-chat-empty-state-title">
2251
+ <header class="header">
2252
+ <h2 id="ai-chat-empty-state-title" class="title">${this.title}</h2>
2253
+ </header>
2254
+
2255
+ ${e ? o`
2256
+ <div class="actions">
2257
+ ${this.subtitle ? o`<p class="subtitle">${this.subtitle}</p>` : s}
2258
+ <div
2259
+ class="suggestions"
2260
+ role="group"
2261
+ aria-label=${n("Prompt suggestions", { desc: "Accessible label for the AI chat empty state suggestion list" })}
2262
+ >
2263
+ ${this.suggestions.map((e) => o`
2264
+ <luzmo-action-button
2265
+ variant="accent"
2266
+ size="s"
2267
+ ?disabled=${this.disabled}
2268
+ @click=${() => this._handleSuggestionActivate(e)}
2269
+ >
2270
+ ${e.label}
2271
+ </luzmo-action-button>
2272
+ `)}
2273
+ </div>
2274
+ </div>
2275
+ ` : s}
2276
+ </section>
2277
+ `;
2278
+ }
2279
+ };
2280
+ //#endregion
2281
+ //#region src/components/ai-chat/empty-state/index.ts
2282
+ t([l({ type: String })], gn.prototype, "title", void 0), t([l({ type: String })], gn.prototype, "subtitle", void 0), t([l({ type: Array })], gn.prototype, "suggestions", void 0), t([l({
2283
+ type: Boolean,
2284
+ reflect: !0
2285
+ })], gn.prototype, "disabled", void 0), customElements.get("luzmo-ai-chat-empty-state") || customElements.define("luzmo-ai-chat-empty-state", gn);
2286
+ //#endregion
2287
+ //#region src/components/ai-chat/ai-chat-request.ts
2288
+ function _n(e, t) {
2289
+ return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+|\/+$/g, "")}/aiprompt`;
2290
+ }
2291
+ function vn(e) {
2292
+ return e.type === "placeholder" ? null : {
2293
+ ...e,
2294
+ version: e.version || "",
2295
+ title: e.title || e.options?.title,
2296
+ filters: e.filterGroups || [],
2297
+ aichartId: e.aichartId || ""
2298
+ };
2299
+ }
2300
+ function yn(e, t) {
2301
+ return [{
2302
+ type: "text",
2303
+ text: e
2304
+ }, ...t.map((e) => ({
2305
+ type: "dataset",
2306
+ id: e
2307
+ }))];
2308
+ }
2309
+ function bn(e, t, n) {
2310
+ return {
2311
+ agent: e,
2312
+ task: t,
2313
+ stream: n.stream ?? !0,
2314
+ response_mode: "mixed",
2315
+ ...n.conversationId ? { conversation_id: n.conversationId } : {},
2316
+ ...n.localeId ? { locale_id: n.localeId } : {}
2317
+ };
2318
+ }
2319
+ function xn(e) {
2320
+ let t = yn(e.prompt, e.datasetIds), n = e.chart ? vn(e.chart) : null;
2321
+ return n && t.push({
2322
+ type: "item",
2323
+ value: n
2324
+ }), {
2325
+ ...bn("item", e.task ?? "generate", e),
2326
+ input: t
2327
+ };
2328
+ }
2329
+ function Sn(e) {
2330
+ let t = yn(e.prompt, e.datasetIds);
2331
+ return e.dashboard && t.push({
2332
+ type: "dashboard",
2333
+ value: e.dashboard,
2334
+ ...e.currentScreenMode ? { current_screen_mode: e.currentScreenMode } : {}
2335
+ }), {
2336
+ ...bn("dashboard", "generate", e),
2337
+ timezone_id: e.timezoneId ?? "UTC",
2338
+ input: t
2339
+ };
2340
+ }
2341
+ function Cn(e) {
2342
+ return {
2343
+ ...bn("analyst", "generate", e),
2344
+ input: yn(e.prompt, e.datasetIds)
2345
+ };
2346
+ }
2347
+ function wn(e, t) {
2348
+ switch (e) {
2349
+ case "dashboard": return Sn(t);
2350
+ case "analyst": return Cn(t);
2351
+ default: return xn(t);
2352
+ }
2353
+ }
2354
+ function Tn(e, t) {
2355
+ let { authKey: n, authToken: r, apiVersion: i = "0.1.0" } = t;
2356
+ return {
2357
+ key: n,
2358
+ token: r,
2359
+ action: "create",
2360
+ version: i,
2361
+ properties: wn(e, t)
2362
+ };
2363
+ }
2364
+ function En(e, t, n, r = "0.1.0", i = null) {
2365
+ return {
2366
+ key: t,
2367
+ token: n,
2368
+ action: "delete",
2369
+ version: r,
2370
+ properties: {
2371
+ agent: "item",
2372
+ restore_to_message_id: e,
2373
+ ...i ? { conversation_id: i } : {}
2374
+ }
2375
+ };
2376
+ }
2377
+ //#endregion
2378
+ //#region src/components/ai-chat/stream/transport.ts
2379
+ async function Dn(e) {
2380
+ let t = await fetch(e.url, {
2381
+ method: "POST",
2382
+ headers: { "Content-Type": "application/json" },
2383
+ mode: "cors",
2384
+ body: JSON.stringify(e.body),
2385
+ signal: e.signal
2386
+ });
2387
+ if (!t.ok) {
2388
+ let e = await t.json().catch(() => null);
2389
+ throw Error(e?.message || `API request failed with status ${t.status}`);
2390
+ }
2391
+ if (!t.body) throw Error("Response body is not readable");
2392
+ return {
2393
+ body: t.body,
2394
+ conversationId: t.headers.get("x-conversation-id")
2395
+ };
2396
+ }
2397
+ function On(e) {
2398
+ let t = e.trim();
2399
+ if (!t || t.startsWith(":") || t.startsWith("event:") || t.startsWith("id:")) return null;
2400
+ let n = t;
2401
+ return n.startsWith("data:") && (n = n.slice(5).trimStart()), !n || n === "[DONE]" ? null : JSON.parse(n);
2402
+ }
2403
+ function kn(e, t) {
2404
+ try {
2405
+ let n = On(e);
2406
+ n && t(n);
2407
+ } catch {
2408
+ console.error("Failed to parse stream line");
2409
+ }
2410
+ }
2411
+ async function An(e, t) {
2412
+ let n = e.getReader(), r = new TextDecoder(), i = "";
2413
+ try {
2414
+ for (;;) {
2415
+ let { done: e, value: a } = await n.read();
2416
+ if (e) break;
2417
+ i += r.decode(a, { stream: !0 });
2418
+ let o = i.split(/\r?\n/);
2419
+ i = o.pop() ?? "";
2420
+ for (let e of o) kn(e, t);
2421
+ }
2422
+ i += r.decode();
2423
+ let e = i.trim();
2424
+ e && kn(e, t);
2425
+ } finally {
2426
+ n.releaseLock();
2427
+ }
2428
+ }
2429
+ //#endregion
2430
+ //#region src/components/ai-chat/stream/progress.ts
2431
+ function jn() {
2432
+ return {
2433
+ id: "root",
2434
+ step: "root",
2435
+ status: "pending",
2436
+ children: [{
2437
+ id: "client-init",
2438
+ step: "iqInit",
2439
+ status: "inProgress",
2440
+ description: n("Thinking", { desc: "Label shown in the AI chat progress tree while the assistant starts processing a prompt" })
2441
+ }]
2442
+ };
2443
+ }
2444
+ function Mn(e) {
2445
+ let t = e.progress;
2446
+ return typeof t != "object" || !t ? !1 : "id" in t && "step" in t && "status" in t;
2447
+ }
2448
+ //#endregion
2449
+ //#region src/components/ai-chat/stream/chunk-extractors.ts
2450
+ function Nn(e) {
2451
+ if (!e || typeof e != "object") return "";
2452
+ let t = e.assistant_message;
2453
+ if (!t || typeof t != "object") return "";
2454
+ if (typeof t.message == "string") return t.message;
2455
+ if (typeof t.text == "string") return t.text;
2456
+ if (typeof t.summary == "string") return t.summary;
2457
+ let n = t.content;
2458
+ return typeof n == "string" ? n : n && typeof n == "object" && typeof n.text == "string" ? n.text : "";
2459
+ }
2460
+ function Pn(e) {
2461
+ return e.type === "text_delta" && typeof e.delta == "string" ? e.delta : typeof e.text_delta == "string" ? e.text_delta : typeof e.chunk == "string" ? e.chunk : typeof e.message == "string" ? e.message : typeof e.summary == "string" ? e.summary : "";
2462
+ }
2463
+ function Fn(e) {
2464
+ return Nn(e.result);
2465
+ }
2466
+ function In(e) {
2467
+ return !!e.done || e.type === "finish" || e.type === "done" || "question" in e;
2468
+ }
2469
+ function Ln(e, t) {
2470
+ let n = typeof e.conversation_id == "string" && e.conversation_id || typeof e.conversationId == "string" && e.conversationId;
2471
+ n && t.callbacks.onConversationIdChange(n);
2472
+ }
2473
+ function Rn(e) {
2474
+ for (let t of e) if (t && typeof t == "object" && t.type === "item") {
2475
+ let e = t.value;
2476
+ if (e && typeof e == "object") return e;
2477
+ }
2478
+ return null;
2479
+ }
2480
+ function zn(e) {
2481
+ let t = e.chart ?? e.generatedChart;
2482
+ if (t && typeof t == "object") return t;
2483
+ let n = e.aiMessageAssets ?? e.ai_message_assets;
2484
+ if (Array.isArray(n)) {
2485
+ let e = Rn(n);
2486
+ if (e) return e;
2487
+ }
2488
+ let r = e.result;
2489
+ if (r && typeof r == "object") {
2490
+ let e = r.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2491
+ if (Array.isArray(t)) return Rn(t);
2492
+ }
2493
+ return null;
2494
+ }
2495
+ function Bn(e) {
2496
+ for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2497
+ let e = t.value;
2498
+ if (e && typeof e == "object" && Array.isArray(e.views)) return e;
2499
+ }
2500
+ return null;
2501
+ }
2502
+ function Vn(e) {
2503
+ for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2504
+ let e = t.name;
2505
+ if (e && typeof e == "object") return e;
2506
+ }
2507
+ }
2508
+ function Hn(...e) {
2509
+ return e.find(Array.isArray);
2510
+ }
2511
+ function Un(e) {
2512
+ if (e.views && Array.isArray(e.views)) return e;
2513
+ let t = e.aiMessageAssets ?? e.ai_message_assets;
2514
+ if (Array.isArray(t)) return Bn(t);
2515
+ let n = e.result;
2516
+ if (n && typeof n == "object") {
2517
+ let e = n.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2518
+ if (Array.isArray(t)) return Bn(t);
2519
+ }
2520
+ return null;
2521
+ }
2522
+ function Wn(e) {
2523
+ let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r = Hn(t, n?.aiMessageAssets ?? n?.ai_message_assets);
2524
+ return r ? Vn(r) : void 0;
2525
+ }
2526
+ //#endregion
2527
+ //#region src/components/ai-chat/stream/stream-processor.ts
2528
+ var Gn = /* @__PURE__ */ new Set([
2529
+ "conversation-id",
2530
+ "conversation_id",
2531
+ "keepalive",
2532
+ "ping",
2533
+ "finish",
2534
+ "done"
2535
+ ]);
2536
+ function Kn(e, t, n) {
2537
+ return {
2538
+ agent: n.agent,
2539
+ conversationId: t.callbacks.getConversationId(),
2540
+ ...typeof e.messageId == "string" ? { messageId: e.messageId } : {},
2541
+ raw: e
2542
+ };
2543
+ }
2544
+ function qn(e, t, n, r, i) {
2545
+ let a = {
2546
+ ...Kn(n, e, t),
2547
+ recognized: !0,
2548
+ type: r,
2549
+ data: i
2550
+ };
2551
+ e.callbacks.onStep(a);
2552
+ }
2553
+ function Jn(e, t, n, r, i) {
2554
+ let a = {
2555
+ ...Kn(n, e, t),
2556
+ recognized: !1,
2557
+ type: r,
2558
+ data: i
2559
+ };
2560
+ e.callbacks.onStep(a);
2561
+ }
2562
+ function Yn(e) {
2563
+ e.state.progressCollapsed || (e.state.progressCollapsed = !0, e.callbacks.onProgressCollapsed(!0));
2564
+ }
2565
+ function Xn(e, t) {
2566
+ Yn(e), e.aiMessage.message = (e.aiMessage.message || "") + t, e.callbacks.onMessageUpdate(e.aiMessage);
2567
+ }
2568
+ function Zn(e) {
2569
+ if (!e) return null;
2570
+ let t = e.descriptionMetadata?.decision;
2571
+ if (t === "create" || t === "edit" || t === "question") return t;
2572
+ for (let t of e.children ?? []) {
2573
+ let e = Zn(t);
2574
+ if (e) return e;
2575
+ }
2576
+ return null;
2577
+ }
2578
+ function Qn(e, t, n) {
2579
+ if (!Mn(e)) return !1;
2580
+ let r = e.progress;
2581
+ if (t.callbacks.onProgress(r), qn(t, n, e, "progress", r), t.state.decision === null) {
2582
+ let i = Zn(r);
2583
+ i && (t.state.decision = i, qn(t, n, e, "decision", { decision: i }));
2584
+ }
2585
+ return !0;
2586
+ }
2587
+ function $n(e) {
2588
+ return !!e.error || e.type === "error" || typeof e.error_text == "string";
2589
+ }
2590
+ function er(e) {
2591
+ return typeof e.error_text == "string" && e.error_text ? e.error_text : typeof e.error == "string" && e.error ? e.error : n("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" });
2592
+ }
2593
+ function tr(e, t, n) {
2594
+ if (!$n(e)) return !1;
2595
+ let r = er(e);
2596
+ return t.aiMessage.message = r, t.aiMessage.isError = !0, t.callbacks.onMessageUpdate(t.aiMessage), Sr(e, t, n, e.error ?? r), !0;
2597
+ }
2598
+ function nr(e) {
2599
+ return typeof e.question == "string" && e.question ? e.question : typeof e.text == "string" && e.text ? e.text : "";
2600
+ }
2601
+ function rr(e, t, n) {
2602
+ if (e.type !== "interrupt") return !1;
2603
+ let r = nr(e);
2604
+ return r && (t.state.interruptQuestion = r, Xn(t, r), qn(t, n, e, "interrupt", { question: r })), Sr(e, t, n), !0;
2605
+ }
2606
+ function ir(e) {
2607
+ return typeof e.asset_id == "string" ? e.asset_id : typeof e.asset_type == "string" ? e.asset_type : "default";
2608
+ }
2609
+ function ar(e) {
2610
+ return typeof e.asset_type == "string" ? e.asset_type : "";
2611
+ }
2612
+ function or(e) {
2613
+ return {
2614
+ assetType: ar(e),
2615
+ snapshot: {}
2616
+ };
2617
+ }
2618
+ function sr(e, t) {
2619
+ return {
2620
+ ...e,
2621
+ ...t
2622
+ };
2623
+ }
2624
+ function cr(e) {
2625
+ let t = e.asset_delta ?? e.delta;
2626
+ return t && typeof t == "object" ? t : null;
2627
+ }
2628
+ function lr(e, t) {
2629
+ t.state.assets[ir(e)] = or(e);
2630
+ }
2631
+ function ur(e, t) {
2632
+ let n = ir(e), r = t.state.assets[n] ?? or(e), i = cr(e);
2633
+ i && (r.snapshot = sr(r.snapshot, i)), t.state.assets[n] = r;
2634
+ }
2635
+ function dr(e, t) {
2636
+ let n = e.asset ?? e.value ?? e.asset_delta ?? e.delta;
2637
+ return n && typeof n == "object" ? sr(t?.snapshot ?? {}, n) : t?.snapshot ?? {};
2638
+ }
2639
+ function fr(e, t, n) {
2640
+ let r = ir(e), i = t.state.assets[r], a = i?.assetType || ar(e), o = dr(e, i);
2641
+ delete t.state.assets[r], hr(a, o, e, t, n);
2642
+ }
2643
+ function pr(e, t, n) {
2644
+ switch (e.type) {
2645
+ case "asset_start": return lr(e, t), !0;
2646
+ case "asset_delta": return ur(e, t), !0;
2647
+ case "asset_end": return fr(e, t, n), !0;
2648
+ default: return !1;
2649
+ }
2650
+ }
2651
+ function mr(e, t, n, r) {
2652
+ n.state.chartSnapshot = e, n.aiMessage.hasChart = !0, typeof t.messageId == "string" && (n.aiMessage.apiMessageId = t.messageId), n.callbacks.onMessageUpdate(n.aiMessage), qn(n, r, t, "chart", e);
2653
+ }
2654
+ function hr(e, t, n, r, i) {
2655
+ switch (e) {
2656
+ case "dashboard-title": {
2657
+ let e = t.name;
2658
+ e && typeof e == "object" && (r.state.dashboardName = e, qn(r, i, n, "dashboard-title", { name: e }));
2659
+ return;
2660
+ }
2661
+ case "dashboard-layout":
2662
+ qn(r, i, n, "dashboard-layout", t);
2663
+ return;
2664
+ case "dashboard-item":
2665
+ qn(r, i, n, "dashboard-item", {
2666
+ slot: Number(t.slot),
2667
+ chart: t.chart ?? t
2668
+ });
2669
+ return;
2670
+ case "dashboard":
2671
+ r.state.dashboardSnapshot = t;
2672
+ return;
2673
+ default: gr(e, t, n, r, i);
2674
+ }
2675
+ }
2676
+ function gr(e, t, n, r, i) {
2677
+ if (i.chartAssetType && e === i.chartAssetType) {
2678
+ mr(t, n, r, i);
2679
+ return;
2680
+ }
2681
+ if (i.dashboardAssetType && e === i.dashboardAssetType) {
2682
+ r.state.dashboardSnapshot = t;
2683
+ return;
2684
+ }
2685
+ Jn(r, i, n, e || "asset", t);
2686
+ }
2687
+ function _r(e, t, n) {
2688
+ let r = !1;
2689
+ if (n.dashboardAssetType) {
2690
+ let n = Un(e);
2691
+ if (n) {
2692
+ t.state.dashboardSnapshot = n;
2693
+ let i = Wn(e);
2694
+ i && (t.state.dashboardName = i), r = !0;
2695
+ }
2696
+ }
2697
+ if (n.chartAssetType && !t.state.chartSnapshot) {
2698
+ let i = zn(e);
2699
+ i && (mr(i, e, t, n), r = !0);
2700
+ }
2701
+ return r;
2702
+ }
2703
+ function vr(e, t, n) {
2704
+ return {
2705
+ ...e,
2706
+ generatedChart: t,
2707
+ conversationId: n.callbacks.getConversationId()
2708
+ };
2709
+ }
2710
+ function yr(e, t, n) {
2711
+ for (let r of Object.keys(t.state.assets)) {
2712
+ let i = t.state.assets[r];
2713
+ delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot) && hr(i.assetType, i.snapshot, e, t, n);
2714
+ }
2715
+ }
2716
+ function br(e, t) {
2717
+ let n = Fn(e);
2718
+ !n || t.aiMessage.message === n || (t.aiMessage.message = n, t.callbacks.onMessageUpdate(t.aiMessage));
2719
+ }
2720
+ function xr(e, t, n) {
2721
+ let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ? Un(e) : null), i = t.state.chartSnapshot ?? (n.chartAssetType ? zn(e) : null);
2722
+ return {
2723
+ agent: n.agent,
2724
+ conversationId: t.callbacks.getConversationId(),
2725
+ message: t.aiMessage,
2726
+ ...r ? { dashboard: r } : {},
2727
+ ...i ? { chart: vr(e, i, t) } : {},
2728
+ ...t.state.dashboardName ? { name: t.state.dashboardName } : {},
2729
+ raw: e
2730
+ };
2731
+ }
2732
+ function Sr(e, t, n, r) {
2733
+ if (!t.state.completed) {
2734
+ if (t.state.completed = !0, yr(e, t, n), Yn(t), r !== void 0) {
2735
+ t.callbacks.onComplete({
2736
+ agent: n.agent,
2737
+ conversationId: t.callbacks.getConversationId(),
2738
+ message: t.aiMessage,
2739
+ error: r,
2740
+ raw: e
2741
+ });
2742
+ return;
2743
+ }
2744
+ br(e, t), t.callbacks.onComplete(xr(e, t, n));
2745
+ }
2746
+ }
2747
+ function Cr(e) {
2748
+ return typeof e.type == "string" && e.type ? e.type : typeof e.asset_type == "string" && e.asset_type ? e.asset_type : "";
2749
+ }
2750
+ function wr(e, t, n) {
2751
+ let r = Pn(e);
2752
+ return r ? (t.state.accumulatedText += r, Xn(t, r), qn(t, n, e, "text", {
2753
+ delta: r,
2754
+ text: t.state.accumulatedText
2755
+ }), !0) : !1;
2756
+ }
2757
+ function Tr(e, t, n, r, i) {
2758
+ if (r || i) return;
2759
+ let a = Cr(e);
2760
+ a && !Gn.has(a) && Jn(t, n, e, a, e);
2761
+ }
2762
+ function Er(e, t, n) {
2763
+ if (Ln(e, t), Qn(e, t, n) || tr(e, t, n) || rr(e, t, n) || pr(e, t, n)) return;
2764
+ let r = wr(e, t, n), i = _r(e, t, n), a = r || i, o = In(e);
2765
+ Tr(e, t, n, a, o), o && Sr(e, t, n);
2766
+ }
2767
+ //#endregion
2768
+ //#region src/components/ai-chat/stream/registry.ts
2769
+ function Dr(e) {
2770
+ switch (e) {
2771
+ case "dashboard": return {
2772
+ agent: e,
2773
+ dashboardAssetType: "dashboard"
2774
+ };
2775
+ case "item": return {
2776
+ agent: e,
2777
+ chartAssetType: "item"
2778
+ };
2779
+ default: return { agent: e };
2780
+ }
2781
+ }
2782
+ function Or(e) {
2783
+ let t = Dr(e);
2784
+ return (e, n) => Er(e, n, t);
2785
+ }
2786
+ function kr() {
2787
+ return {
2788
+ progressCollapsed: !1,
2789
+ accumulatedText: "",
2790
+ decision: null,
2791
+ assets: {},
2792
+ dashboardSnapshot: null,
2793
+ dashboardName: void 0,
2794
+ chartSnapshot: null,
2795
+ interruptQuestion: null,
2796
+ completed: !1
2797
+ };
2798
+ }
2799
+ //#endregion
2800
+ //#region src/components/ai-chat/session/ai-chat-session.ts
2801
+ function Ar() {
2802
+ return `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
2803
+ }
2804
+ var jr = class {
2805
+ constructor(e, t = {}) {
2806
+ this._uiBridgeCallbacks = {}, this._subscribers = /* @__PURE__ */ new Set(), this._state = {
2807
+ messages: [],
2808
+ selectedDatasets: [],
2809
+ isGenerating: !1,
2810
+ progress: null,
2811
+ progressCollapsed: !1,
2812
+ conversationId: null,
2813
+ inflightMessage: null
2814
+ }, this._abortController = null, this._inflightMessage = null, this._receivedProgress = !1, this._config = {
2815
+ apiUrl: "https://api.luzmo.com",
2816
+ apiVersion: "0.1.0",
2817
+ stream: !0,
2818
+ ...e
2819
+ }, this._hostCallbacks = t, this._state = {
2820
+ ...this._state,
2821
+ messages: e.messages ? [...e.messages] : [],
2822
+ selectedDatasets: e.selectedDatasets ? [...e.selectedDatasets] : [],
2823
+ conversationId: e.conversationId ?? null,
2824
+ isGenerating: e.isGenerating ?? !1,
2825
+ progress: e.progress ?? null,
2826
+ progressCollapsed: e.progressCollapsed ?? !1
2827
+ };
2828
+ }
2829
+ get state() {
2830
+ return this._state;
2831
+ }
2832
+ get isGenerating() {
2833
+ return this._state.isGenerating;
2834
+ }
2835
+ subscribe(e) {
2836
+ return this._subscribers.add(e), e(this._state), () => {
2837
+ this._subscribers.delete(e);
2838
+ };
2839
+ }
2840
+ setUiBridge(e) {
2841
+ this._uiBridgeCallbacks = e;
2842
+ }
2843
+ updateConfig(e) {
2844
+ this._config = {
2845
+ ...this._config,
2846
+ ...e
2847
+ };
2848
+ let t = {};
2849
+ if ("conversationId" in e) {
2850
+ let n = e.conversationId ?? null;
2851
+ n !== this._state.conversationId && (t.conversationId = n);
2852
+ }
2853
+ if ("selectedDatasets" in e && e.selectedDatasets) {
2854
+ let n = [...e.selectedDatasets];
2855
+ this._areSelectedDatasetsEqual(n, this._state.selectedDatasets) || (t.selectedDatasets = n);
2856
+ }
2857
+ if ("messages" in e && e.messages) {
2858
+ let n = [...e.messages];
2859
+ this._areChatMessagesEqual(n, this._state.messages) || (t.messages = n);
2860
+ }
2861
+ "isGenerating" in e && e.isGenerating !== this._state.isGenerating && (t.isGenerating = e.isGenerating), "progress" in e && (t.progress = e.progress ?? null), "progressCollapsed" in e && e.progressCollapsed !== this._state.progressCollapsed && (t.progressCollapsed = e.progressCollapsed), Object.keys(t).length > 0 && this._patchState(t);
2862
+ }
2863
+ setSelectedDatasets(e) {
2864
+ this._patchState({ selectedDatasets: [...e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets);
2865
+ }
2866
+ addDataset(e) {
2867
+ this._state.selectedDatasets.some((t) => t.id === e.id) || (this._patchState({ selectedDatasets: [...this._state.selectedDatasets, e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2868
+ }
2869
+ removeDataset(e) {
2870
+ let t = this._state.selectedDatasets.filter((t) => t.id !== e);
2871
+ t.length !== this._state.selectedDatasets.length && (this._patchState({ selectedDatasets: t }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2872
+ }
2873
+ isDatasetRequirementMet() {
2874
+ return !this._config.requireDataset || this._state.selectedDatasets.length > 0;
2875
+ }
2876
+ getAiPromptUrl() {
2877
+ return _n(this._config.apiUrl ?? "https://api.luzmo.com", this._config.apiVersion ?? "0.1.0");
2878
+ }
2879
+ buildRequestBody(e, t) {
2880
+ return Tn(this._config.agent, {
2881
+ prompt: e,
2882
+ datasetIds: t,
2883
+ authKey: this._config.authKey,
2884
+ authToken: this._config.authToken,
2885
+ conversationId: this._state.conversationId,
2886
+ chart: this._config.chart ?? null,
2887
+ dashboard: this._config.dashboard ?? null,
2888
+ currentScreenMode: this._config.currentScreenMode,
2889
+ localeId: this._config.localeId,
2890
+ timezoneId: this._config.timezoneId,
2891
+ task: this._config.task,
2892
+ modelPreference: this._config.modelPreference,
2893
+ apiVersion: this._config.apiVersion,
2894
+ stream: this._config.stream
2895
+ });
2896
+ }
2897
+ buildPromptSubmittedDetail(e, t, n, r) {
2898
+ return {
2899
+ prompt: e,
2900
+ selectedDatasets: t,
2901
+ datasetIds: n,
2902
+ agent: this._config.agent,
2903
+ request: this.buildRequestBody(e, n),
2904
+ url: this.getAiPromptUrl(),
2905
+ ...r ? { signal: r } : {}
2906
+ };
2907
+ }
2908
+ async submit(e) {
2909
+ let t = e.datasetIds ?? this._state.selectedDatasets.map((e) => e.id);
2910
+ if (!this.isDatasetRequirementMet()) return;
2911
+ this._abortInflight();
2912
+ let n = {
2913
+ id: e.aiMessageId ?? Ar(),
2914
+ type: "ai",
2915
+ message: ""
2916
+ }, r = [...this._state.messages];
2917
+ if (!e.skipUserMessage) {
2918
+ let t = {
2919
+ id: Ar(),
2920
+ type: "user",
2921
+ message: e.prompt
2922
+ };
2923
+ r = [...r, t], this._emit("onMessageSent", t, [...this._state.selectedDatasets]);
2924
+ }
2925
+ r = [...r, n], this._inflightMessage = n, this._receivedProgress = !1;
2926
+ let i = new AbortController();
2927
+ this._abortController = i, this._patchState({
2928
+ messages: r,
2929
+ isGenerating: !0,
2930
+ progress: jn(),
2931
+ progressCollapsed: !1,
2932
+ inflightMessage: n
2933
+ });
2934
+ let a = t, o = [...this._state.selectedDatasets];
2935
+ if (this._hasCallback("onPromptSubmitted")) {
2936
+ let t = this.buildPromptSubmittedDetail(e.prompt, o, a, i.signal);
2937
+ try {
2938
+ await this._invokeCallback("onPromptSubmitted", t);
2939
+ } catch (e) {
2940
+ e.name === "AbortError" ? this.abort() : (this._handleSubmitError(e, n), this._finalizeInflightMessage()), this._patchState({ isGenerating: !1 });
2941
+ }
2942
+ return;
2943
+ }
2944
+ let s = this.buildRequestBody(e.prompt, t), c = Or(this._config.agent), l = {
2945
+ aiMessage: n,
2946
+ callbacks: this._createStreamCallbacks(),
2947
+ state: kr()
2948
+ }, u = this._config.fetchStreaming ?? Dn, d = !1;
2949
+ try {
2950
+ let { body: e, conversationId: t } = await u({
2951
+ url: this.getAiPromptUrl(),
2952
+ body: s,
2953
+ signal: i.signal
2954
+ });
2955
+ t && this._setConversationId(t), await An(e, (e) => c(e, l)), d = !0;
2956
+ } catch (e) {
2957
+ e.name !== "AbortError" && (this._handleSubmitError(e, n), d = !0);
2958
+ } finally {
2959
+ this._abortController === i && (d ? this._finalizeInflightMessage() : this._discardInflightMessage(), this._patchState({ isGenerating: !1 }), this._abortController = null);
2960
+ }
2961
+ }
2962
+ async restore(e) {
2963
+ if (this._config.agent !== "item") return {};
2964
+ let t = En(e.restoreToMessageId, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
2965
+ if (this._patchState({
2966
+ isGenerating: !0,
2967
+ progress: null,
2968
+ progressCollapsed: !1
2969
+ }), this._hasCallback("onRestoreRequested")) {
2970
+ let n = {
2971
+ apiMessageId: e.restoreToMessageId,
2972
+ messageIndex: e.messageIndex,
2973
+ request: t,
2974
+ url: this.getAiPromptUrl()
2975
+ };
2976
+ try {
2977
+ await this._invokeCallback("onRestoreRequested", n);
2978
+ } finally {
2979
+ this._patchState({ isGenerating: !1 });
2980
+ }
2981
+ return {};
2982
+ }
2983
+ try {
2984
+ let n = await fetch(this.getAiPromptUrl(), {
2985
+ method: "POST",
2986
+ headers: { "Content-Type": "application/json" },
2987
+ mode: "cors",
2988
+ body: JSON.stringify(t)
2989
+ });
2990
+ if (!n.ok) {
2991
+ let e = await n.json().catch(() => null);
2992
+ throw Error(e?.message || `API request failed with status ${n.status}`);
2993
+ }
2994
+ let r = await n.json().catch(() => null), i = r?.generatedChart ?? (r ? zn(r) : null), a = {
2995
+ ...typeof r?.message == "string" ? { message: r.message } : {},
2996
+ ...i ? { chart: {
2997
+ ...r,
2998
+ generatedChart: i
2999
+ } } : {}
3000
+ }, o = e.messageIndex >= 0 && e.messageIndex < this._state.messages.length ? this._state.messages.slice(0, e.messageIndex + 1) : this._state.messages;
3001
+ if (a.message && o[e.messageIndex]?.type === "ai" && (o[e.messageIndex] = {
3002
+ ...o[e.messageIndex],
3003
+ message: a.message
3004
+ }), this._patchState({ messages: [...o] }), a.chart || a.message) {
3005
+ let t = o[e.messageIndex], n = t?.type === "ai" ? t : {
3006
+ id: Ar(),
3007
+ type: "ai",
3008
+ message: a.message ?? ""
3009
+ };
3010
+ this._emit("onComplete", {
3011
+ agent: this._config.agent,
3012
+ conversationId: this._state.conversationId,
3013
+ message: n,
3014
+ ...a.chart ? { chart: a.chart } : {},
3015
+ ...r ? { raw: r } : {}
3016
+ });
3017
+ }
3018
+ return a;
3019
+ } finally {
3020
+ this._patchState({ isGenerating: !1 });
3021
+ }
3022
+ }
3023
+ buildRestoreRequest(e) {
3024
+ return En(e, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
3025
+ }
3026
+ abort(e = {}) {
3027
+ this._abortController?.abort(), this._abortController = null, e.notify && this._inflightMessage ? this._markInflightCancelled(e.cancelledMessage) : this._discardInflightMessage(), this._patchState({
3028
+ isGenerating: !1,
3029
+ progress: null,
3030
+ progressCollapsed: !1
3031
+ }), e.notify && this._emit("onPromptStopped");
3032
+ }
3033
+ _abortInflight() {
3034
+ this._abortController?.abort(), this._abortController = null, this._discardInflightMessage();
3035
+ }
3036
+ _createStreamCallbacks() {
3037
+ return {
3038
+ onConversationIdChange: (e) => this._setConversationId(e),
3039
+ onProgress: (e) => {
3040
+ this._receivedProgress = !0, this._patchState({ progress: e });
3041
+ },
3042
+ onProgressCollapsed: (e) => {
3043
+ this._patchState({ progressCollapsed: e });
3044
+ },
3045
+ onMessageUpdate: (e) => {
3046
+ this._inflightMessage = e, this._upsertMessage(e), this._patchState({ inflightMessage: { ...e } });
3047
+ },
3048
+ getConversationId: () => this._state.conversationId,
3049
+ onStep: (e) => {
3050
+ this._emit("onStep", e);
3051
+ },
3052
+ onComplete: (e) => {
3053
+ this._emit("onComplete", e);
3054
+ }
3055
+ };
3056
+ }
3057
+ _setConversationId(e) {
3058
+ this._config = {
3059
+ ...this._config,
3060
+ conversationId: e
3061
+ }, this._patchState({ conversationId: e }), this._emit("onConversationIdChange", e);
3062
+ }
3063
+ _upsertMessage(e) {
3064
+ let t = this._state.messages.findIndex((t) => t.id === e.id);
3065
+ if (t === -1) {
3066
+ this._patchState({ messages: [...this._state.messages, { ...e }] });
3067
+ return;
3068
+ }
3069
+ let n = this._state.messages.map((n, r) => r === t ? { ...e } : n);
3070
+ this._patchState({ messages: n });
3071
+ }
3072
+ _finalizeInflightMessage() {
3073
+ this._inflightMessage && (this._state.progress && this._receivedProgress && (this._inflightMessage.progress = structuredClone(this._state.progress), this._upsertMessage(this._inflightMessage)), this._inflightMessage = null, this._receivedProgress = !1, this._patchState({
3074
+ progress: null,
3075
+ progressCollapsed: !1,
3076
+ inflightMessage: null
3077
+ }));
3078
+ }
3079
+ _removeInflightFromMessages() {
3080
+ this._inflightMessage && this._patchState({ messages: this._state.messages.filter((e) => e.id !== this._inflightMessage.id) });
3081
+ }
3082
+ _markInflightCancelled(e) {
3083
+ this._inflightMessage && (this._inflightMessage.message = e ?? n("Response cancelled.", { desc: "Placeholder shown in ai chat where the assistant reply would appear when the user stops an in-flight response" }), this._inflightMessage.isCancelled = !0, this._inflightMessage.hasChart = !1, delete this._inflightMessage.progress, this._upsertMessage(this._inflightMessage), this._inflightMessage = null, this._receivedProgress = !1, this._patchState({ inflightMessage: null }));
3084
+ }
3085
+ _discardInflightMessage() {
3086
+ let e = !!(this._inflightMessage || this._state.inflightMessage);
3087
+ this._removeInflightFromMessages(), this._inflightMessage = null, this._receivedProgress = !1, e && this._patchState({ inflightMessage: null });
3088
+ }
3089
+ _handleSubmitError(e, t) {
3090
+ t.message = n("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" }), t.isError = !0, delete t.progress, this._inflightMessage = t, this._upsertMessage(t), this._patchState({
3091
+ inflightMessage: { ...t },
3092
+ progress: null,
3093
+ progressCollapsed: !1
3094
+ }), this._emit("onComplete", {
3095
+ agent: this._config.agent,
3096
+ conversationId: this._state.conversationId,
3097
+ message: t,
3098
+ error: e
3099
+ });
3100
+ }
3101
+ _hasCallback(e) {
3102
+ return typeof this._hostCallbacks[e] == "function" || typeof this._uiBridgeCallbacks[e] == "function";
3103
+ }
3104
+ _emit(e, ...t) {
3105
+ this._invokeCallback(e, ...t);
3106
+ }
3107
+ async _invokeCallback(e, ...t) {
3108
+ let n = this._hostCallbacks[e], r = this._uiBridgeCallbacks[e];
3109
+ typeof n == "function" && await n(...t), typeof r == "function" && await r(...t);
3110
+ }
3111
+ _patchState(e) {
3112
+ this._state = {
3113
+ ...this._state,
3114
+ ...e
3115
+ }, this._emit("onStateChange", this._state);
3116
+ for (let e of this._subscribers) e(this._state);
3117
+ }
3118
+ _areSelectedDatasetsEqual(e, t) {
3119
+ return e.length === t.length && e.every((e, n) => e.id === t[n]?.id);
3120
+ }
3121
+ _areChatMessagesEqual(e, t) {
3122
+ return e.length === t.length && e.every((e, n) => {
3123
+ let r = t[n];
3124
+ return e.id === r?.id && e.apiMessageId === r?.apiMessageId && e.type === r?.type && e.message === r?.message && e.isError === r?.isError && e.isCancelled === r?.isCancelled && e.hasChart === r?.hasChart && JSON.stringify(e.progress ?? null) === JSON.stringify(r?.progress ?? null);
3125
+ });
3126
+ }
3127
+ };
3128
+ function Mr(e, t) {
3129
+ return new jr(e, t);
3130
+ }
3131
+ //#endregion
3132
+ //#region src/components/ai-chat/session/ai-chat-session-controller.ts
3133
+ var Nr = class {
3134
+ constructor(e) {
3135
+ this.options = e, this._session = null, this._ownsSession = !1, this._seededFromProps = !1, this._unsubscribe = null;
3136
+ }
3137
+ get current() {
3138
+ return this._session;
3139
+ }
3140
+ get state() {
3141
+ if (this._session) return this._session.state;
3142
+ let e = this.options.getSeed();
3143
+ return {
3144
+ messages: e.messages,
3145
+ selectedDatasets: e.selectedDatasets,
3146
+ isGenerating: !1,
3147
+ progress: null,
3148
+ progressCollapsed: !1,
3149
+ conversationId: e.conversationId,
3150
+ inflightMessage: null
3151
+ };
3152
+ }
3153
+ get ownsCurrentSession() {
3154
+ return this._ownsSession;
3155
+ }
3156
+ setSession(e) {
3157
+ if (!e) {
3158
+ this._clearSession();
3159
+ return;
3160
+ }
3161
+ this._ownsSession && this._session !== e && this._session?.abort(), this._ownsSession = !1, this._session = e, e.updateConfig(this.options.getConfig()), this._wire(e);
3162
+ }
3163
+ syncProperties(e) {
3164
+ if (!e.has("chatSession")) {
3165
+ if (this._createSessionIfMissing(), this._session) {
3166
+ let t = this.options.getConfig();
3167
+ Object.keys(t).some((t) => e.has(t)) && this._session.updateConfig(t);
3168
+ }
3169
+ (e.has("messages") || e.has("selectedDatasets")) && this._seedFromPropsOnce();
3170
+ }
3171
+ }
3172
+ requireSession() {
3173
+ return this._createSessionIfMissing(), this._session.updateConfig(this.options.getConfig()), this._session;
3174
+ }
3175
+ connect() {
3176
+ this._session && this._wire(this._session);
3177
+ }
3178
+ teardown() {
3179
+ this._unwire(), this._ownsSession &&= (this._session?.abort(), this._session = null, !1), this._seededFromProps = !1;
3180
+ }
3181
+ _createSessionIfMissing() {
3182
+ if (this._session) return;
3183
+ let e = this.options.getSeed();
3184
+ this._session = Mr({
3185
+ ...this.options.getConfig(),
3186
+ messages: e.messages.length > 0 ? [...e.messages] : void 0,
3187
+ selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
3188
+ }), this._ownsSession = !0, this._seededFromProps = e.messages.length > 0 || e.selectedDatasets.length > 0, this._wire(this._session);
3189
+ }
3190
+ _clearSession() {
3191
+ this._unwire(), this._ownsSession && this._session?.abort(), this._session = null, this._ownsSession = !1;
3192
+ }
3193
+ _seedFromPropsOnce() {
3194
+ if (!this._ownsSession || this._seededFromProps) return;
3195
+ let e = this.requireSession(), t = this.options.getSeed(), n = {};
3196
+ e.state.messages.length === 0 && t.messages.length > 0 && (n.messages = [...t.messages]), e.state.selectedDatasets.length === 0 && t.selectedDatasets.length > 0 && (n.selectedDatasets = [...t.selectedDatasets]), Object.keys(n).length > 0 && (e.updateConfig(n), this._seededFromProps = !0);
3197
+ }
3198
+ _wire(e) {
3199
+ this._unwire(), e.setUiBridge(this.options.createDomBridge()), this._unsubscribe = e.subscribe(() => {
3200
+ this.options.onRenderNeeded();
3201
+ });
3202
+ }
3203
+ _unwire() {
3204
+ this._unsubscribe?.(), this._unsubscribe = null;
3205
+ }
3206
+ }, Pr = ":host{box-sizing:border-box;flex-direction:column;width:100%;height:100%;display:flex}:host .chat-container{background:var(--luzmo-ai-chat-background,var(--ai-chat-background));border-radius:var(--luzmo-ai-chat-border-radius,var(--ai-chat-border-radius));width:100%;height:100%;min-height:0;padding:var(--luzmo-ai-chat-padding,var(--ai-chat-padding));gap:var(--luzmo-ai-chat-gap,var(--ai-chat-gap));border:var(--luzmo-ai-chat-border,var(--ai-chat-border));box-shadow:var(--luzmo-ai-chat-box-shadow,var(--ai-chat-box-shadow));box-sizing:border-box;flex-direction:column;flex:1;display:flex;overflow:hidden}:host .chat-messages-container{gap:var(--luzmo-ai-chat-gap,var(--ai-chat-gap));flex-direction:column;flex:1;min-height:0;display:flex;overflow:auto}:host .chat-messages-container luzmo-ai-chat-empty-state{flex:1;min-height:0}:host .chat-messages-container::-webkit-scrollbar{width:var(--luzmo-ai-chat-scrollbar-width,var(--ai-chat-scrollbar-width))}:host .chat-messages-container::-webkit-scrollbar-track{background:var(--luzmo-ai-chat-scrollbar-track-background,var(--ai-chat-scrollbar-track-background));border-radius:var(--luzmo-ai-chat-scrollbar-track-border-radius,var(--ai-chat-scrollbar-track-border-radius))}:host .chat-messages-container::-webkit-scrollbar-thumb{background:var(--luzmo-ai-chat-scrollbar-thumb-background,var(--ai-chat-scrollbar-thumb-background));border-radius:var(--luzmo-ai-chat-scrollbar-thumb-border-radius,var(--ai-chat-scrollbar-thumb-border-radius))}:host .chat-messages-container::-webkit-scrollbar-thumb:hover{background:var(--luzmo-ai-chat-scrollbar-thumb-hover-background,var(--ai-chat-scrollbar-thumb-hover-background))}:host .chat-messages-container{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-ai-chat-scrollbar-thumb-background,var(--ai-chat-scrollbar-thumb-background)) var(--luzmo-ai-chat-scrollbar-track-background,var(--ai-chat-scrollbar-track-background))}:host luzmo-chat-message{--luzmo-primary:rgba(var(--luzmo-primary-rgb), .08);--chat-message-primary-text-color:var(--luzmo-font-color);--chat-message-primary-border-color:transparent}:host luzmo-chat-message.error{color:var(--luzmo-ai-chat-error-message-color,var(--ai-chat-error-message-color))}:host luzmo-chat-message.cancelled{color:var(--luzmo-ai-chat-cancelled-message-color,var(--ai-chat-cancelled-message-color));font-style:italic}:host .markdown-content{line-height:var(--luzmo-ai-chat-markdown-line-height,var(--ai-chat-markdown-line-height))}:host .markdown-content>:first-child{margin-top:0}:host .markdown-content>:last-child{margin-bottom:0}:host .markdown-content p,:host .markdown-content ul,:host .markdown-content ol,:host .markdown-content blockquote,:host .markdown-content pre,:host .markdown-content table{margin:0 0 var(--luzmo-ai-chat-markdown-spacing,var(--ai-chat-markdown-spacing))}:host .markdown-content h1,:host .markdown-content h2,:host .markdown-content h3,:host .markdown-content h4,:host .markdown-content h5,:host .markdown-content h6{margin:var(--luzmo-ai-chat-markdown-heading-spacing,var(--ai-chat-markdown-heading-spacing)) 0 var(--luzmo-ai-chat-markdown-spacing,var(--ai-chat-markdown-spacing));font-weight:var(--luzmo-ai-chat-markdown-heading-font-weight,var(--ai-chat-markdown-heading-font-weight))}:host .markdown-content ul,:host .markdown-content ol{padding-inline-start:var(--luzmo-ai-chat-markdown-list-indent,var(--ai-chat-markdown-list-indent))}:host .markdown-content a{color:var(--luzmo-ai-chat-markdown-link-color,var(--ai-chat-markdown-link-color))}:host .markdown-content code{font-family:var(--luzmo-ai-chat-markdown-code-font-family,var(--ai-chat-markdown-code-font-family));font-size:var(--luzmo-ai-chat-markdown-code-font-size,var(--ai-chat-markdown-code-font-size));background:var(--luzmo-ai-chat-markdown-code-background,var(--ai-chat-markdown-code-background));border-radius:var(--luzmo-ai-chat-markdown-code-border-radius,var(--ai-chat-markdown-code-border-radius));padding:.1em .3em}:host .markdown-content pre{background:var(--luzmo-ai-chat-markdown-code-background,var(--ai-chat-markdown-code-background));border-radius:var(--luzmo-ai-chat-markdown-code-border-radius,var(--ai-chat-markdown-code-border-radius));padding:.75em 1em;overflow-x:auto}:host .markdown-content pre code{background:0 0;padding:0}:host .markdown-content blockquote{border-inline-start:.1875rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));padding-inline-start:.75rem}:host .markdown-content hr{border:0;border-top:.0625rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));margin:var(--luzmo-ai-chat-markdown-heading-spacing,var(--ai-chat-markdown-heading-spacing)) 0}:host .markdown-content table{border-collapse:collapse;width:100%}:host .markdown-content th,:host .markdown-content td{border:.0625rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));text-align:start;padding:.375rem .625rem}:host .markdown-content th{background:var(--luzmo-ai-chat-markdown-table-header-background,var(--ai-chat-markdown-table-header-background));font-weight:600}:host .assistant-message-wrapper{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}:host .assistant-message-wrapper luzmo-chat-message{width:fit-content;display:contents}:host .assistant-context-menu-trigger{width:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));height:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));border:.0625rem solid var(--luzmo-ai-chat-context-menu-trigger-border-color,var(--ai-chat-context-menu-trigger-border-color));border-radius:var(--luzmo-ai-chat-context-menu-trigger-border-radius,var(--ai-chat-context-menu-trigger-border-radius));background:var(--luzmo-ai-chat-context-menu-trigger-background,var(--ai-chat-context-menu-trigger-background));color:var(--luzmo-ai-chat-context-menu-trigger-color,var(--ai-chat-context-menu-trigger-color));cursor:pointer;justify-content:center;align-items:center;padding:0;font-size:.875rem;line-height:1;transition:all .15s;display:inline-flex}:host .assistant-context-menu-trigger:hover{background:var(--luzmo-ai-chat-context-menu-trigger-hover-background,var(--ai-chat-context-menu-trigger-hover-background));border-color:var(--luzmo-ai-chat-context-menu-trigger-hover-border-color,var(--ai-chat-context-menu-trigger-hover-border-color));color:var(--luzmo-ai-chat-context-menu-trigger-hover-color,var(--ai-chat-context-menu-trigger-hover-color))}:host .assistant-context-menu-trigger:disabled{cursor:not-allowed;opacity:.6}:host .assistant-context-menu-trigger:disabled:hover{background:var(--luzmo-ai-chat-context-menu-trigger-background,var(--ai-chat-context-menu-trigger-background));border-color:var(--luzmo-ai-chat-context-menu-trigger-border-color,var(--ai-chat-context-menu-trigger-border-color));color:var(--luzmo-ai-chat-context-menu-trigger-color,var(--ai-chat-context-menu-trigger-color))}:host .assistant-context-menu-item{width:100%;color:var(--luzmo-font-color);text-align:start;cursor:pointer;font-family:var(--luzmo-ai-chat-context-menu-item-font-family,var(--ai-chat-context-menu-item-font-family));background:0 0;border:0;padding:.5rem .75rem}:host .assistant-context-menu-item:hover{background:var(--luzmo-ai-chat-context-menu-item-hover-background,var(--ai-chat-context-menu-item-hover-background))}:host .assistant-context-menu-item:disabled{opacity:.4;cursor:not-allowed}:host .assistant-context-menu-item:disabled:hover{background:0 0}:host luzmo-ai-interaction-textarea{flex-grow:0;flex-shrink:0}:host luzmo-progress-steps{padding:0 .25rem}:host .loading-message{color:var(--luzmo-font-color);align-items:center;gap:.5rem;display:flex}:host .loading-message svg{color:var(--luzmo-ai-chat-loading-message-color,var(--ai-chat-loading-message-color));font-size:var(--luzmo-ai-chat-loading-message-icon-font-size,var(--ai-chat-loading-message-icon-font-size,1rem));justify-content:center;align-items:center;display:flex}:host .loading-message svg.spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){:host .assistant-context-menu-trigger{transition:none}:host .loading-message svg.spin{animation:none}}:host{--ai-chat-background:var(--luzmo-background-color);--ai-chat-border-radius:0;--ai-chat-padding:0;--ai-chat-gap:1rem;--ai-chat-border:none;--ai-chat-box-shadow:none;--ai-chat-loading-message-color:var(--luzmo-primary);--ai-chat-loading-message-icon-font-size:1rem;--ai-chat-error-message-color:var(--luzmo-danger,#dc3545);--ai-chat-cancelled-message-color:var(--luzmo-font-color-dimmed,var(--luzmo-font-color-extra-dimmed));--ai-chat-scrollbar-width:var(--luzmo-scrollbar-size);--ai-chat-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--ai-chat-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--ai-chat-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--ai-chat-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--ai-chat-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background);--ai-chat-context-menu-trigger-size:1.5rem;--ai-chat-context-menu-trigger-border-color:var(--luzmo-border-color);--ai-chat-context-menu-trigger-border-radius:.375rem;--ai-chat-context-menu-trigger-background:var(--luzmo-background-color,transparent);--ai-chat-context-menu-trigger-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-trigger-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-trigger-hover-border-color:var(--luzmo-border-color-hover,var(--luzmo-border-color));--ai-chat-context-menu-trigger-hover-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-item-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-item-font-family:var(--luzmo-font-family);--ai-chat-markdown-line-height:1.5;--ai-chat-markdown-spacing:var(--luzmo-spacing-3);--ai-chat-markdown-heading-spacing:var(--luzmo-spacing-4);--ai-chat-markdown-heading-font-weight:var(--luzmo-font-weight-bold);--ai-chat-markdown-list-indent:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--ai-chat-markdown-link-color:var(--luzmo-primary);--ai-chat-markdown-code-font-family:var(--luzmo-font-family-mono,ui-monospace, monospace);--ai-chat-markdown-code-font-size:.875em;--ai-chat-markdown-code-background:var(--luzmo-background-color-highlight);--ai-chat-markdown-code-border-radius:var(--luzmo-border-radius-s);--ai-chat-markdown-border-color:var(--luzmo-border-color);--ai-chat-markdown-table-header-background:var(--luzmo-background-color-highlight)}", $ = class extends e {
3207
+ constructor(...e) {
3208
+ super(...e), this.messages = [], this.selectedDatasets = [], this.placeholder = "Describe your change", this.disabled = !1, this.stoppable = !1, this.showAssistantContextMenu = !1, this.authKey = "", this.authToken = "", this.apiUrl = "https://api.luzmo.com", this.appServer = "https://app.luzmo.com", this.flagOpendata = !1, this.hideDatasetButton = !1, this.hideDatasetIcons = !1, this.disableDatasetModification = !1, this.hideSelectedDatasets = !1, this.disableColumnMentions = !1, this.requireDataset = !1, this.agent = "item", this.task = "generate", this.modelPreference = "performance", this.chatSession = null, this.conversationId = null, this.chart = null, this.dashboard = null, this.timezoneId = "UTC", this.apiVersion = "0.1.0", this.stream = !0, this.loadingMessage = null, this.cancelledMessage = null, this.initialPrompt = null, this.emptyStateTitle = "", this.emptyStateSubtitle = "", this.emptyStateSuggestions = [], this._textareaValue = "", this._lastProcessedInitialPrompt = null, this._session = new Nr({
3209
+ getConfig: () => this._buildSessionConfig(),
3210
+ getSeed: () => ({
3211
+ messages: this.messages,
3212
+ selectedDatasets: this.selectedDatasets,
3213
+ conversationId: this.conversationId
3214
+ }),
3215
+ createDomBridge: () => this._createDomBridgeCallbacks(),
3216
+ onRenderNeeded: () => {
3217
+ this.requestUpdate(), this.updateComplete.then(() => this._scrollToBottom());
3218
+ }
3219
+ });
3220
+ }
3221
+ static {
3222
+ this.styles = c(Pr);
3223
+ }
3224
+ static {
3225
+ this.tagName = "luzmo-ai-chat";
3226
+ }
3227
+ get session() {
3228
+ return this._session.current;
3229
+ }
3230
+ _getRenderState() {
3231
+ return this._session.state;
3232
+ }
3233
+ _createDomBridgeCallbacks() {
3234
+ return {
3235
+ onMessageSent: (e, t) => {
3236
+ this.dispatchEvent(new CustomEvent("luzmo-message-sent", {
3237
+ detail: {
3238
+ message: e,
3239
+ selectedDatasets: t
3240
+ },
3241
+ bubbles: !0,
3242
+ composed: !0
3243
+ }));
3244
+ },
3245
+ onDatasetsChanged: (e) => {
3246
+ this.dispatchEvent(new CustomEvent("luzmo-datasets-changed", {
3247
+ detail: { selectedDatasets: e },
3248
+ bubbles: !0,
3249
+ composed: !0
3250
+ }));
3251
+ },
3252
+ onConversationIdChange: (e) => this._emitConversationIdChanged(e),
3253
+ onStep: (e) => {
3254
+ this.dispatchEvent(new CustomEvent("luzmo-step", {
3255
+ detail: e,
3256
+ bubbles: !0,
3257
+ composed: !0
3258
+ }));
3259
+ },
3260
+ onComplete: (e) => {
3261
+ this.dispatchEvent(new CustomEvent("luzmo-complete", {
3262
+ detail: e,
3263
+ bubbles: !0,
3264
+ composed: !0
3265
+ }));
3266
+ },
3267
+ onPromptStopped: () => {
3268
+ this.dispatchEvent(new CustomEvent("luzmo-stop", {
3269
+ bubbles: !0,
3270
+ composed: !0
3271
+ }));
3272
+ }
3273
+ };
3274
+ }
3275
+ _buildSessionConfig() {
3276
+ return {
3277
+ agent: this.agent,
3278
+ authKey: this.authKey,
3279
+ authToken: this.authToken,
3280
+ apiUrl: this.apiUrl,
3281
+ apiVersion: this.apiVersion,
3282
+ stream: this.stream,
3283
+ conversationId: this.conversationId,
3284
+ chart: this.chart,
3285
+ dashboard: this.dashboard,
3286
+ currentScreenMode: this.currentScreenMode,
3287
+ localeId: this.localeId,
3288
+ timezoneId: this.timezoneId,
3289
+ task: this.task,
3290
+ modelPreference: this.modelPreference,
3291
+ requireDataset: this.requireDataset
3292
+ };
3293
+ }
3294
+ _emitConversationIdChanged(e) {
3295
+ this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
3296
+ detail: { conversationId: e },
3297
+ bubbles: !0,
3298
+ composed: !0
3299
+ }));
3300
+ }
3301
+ async _restoreViaSession(e, t) {
3302
+ await this._session.requireSession().restore({
3303
+ restoreToMessageId: e,
3304
+ messageIndex: t
3305
+ });
3306
+ }
3307
+ async _handleRestoreState(e, t) {
3308
+ if (e.apiMessageId && this.agent === "item") try {
3309
+ await this._restoreViaSession(e.apiMessageId, t);
3310
+ } catch (e) {
3311
+ console.error("AI restore error:", e);
3312
+ }
3313
+ }
3314
+ _handleDatasetSelected(e) {
3315
+ this._session.requireSession().addDataset(e.detail);
3316
+ }
3317
+ _handleDatasetRemoved(e) {
3318
+ this._session.requireSession().removeDataset(e.detail.id);
3319
+ }
3320
+ async _submitViaSession(e, t = {}) {
3321
+ let n = this._session.requireSession();
3322
+ if (n.isDatasetRequirementMet()) {
3323
+ this._textareaValue = "";
3324
+ try {
3325
+ await n.submit({
3326
+ prompt: e,
3327
+ ...t
3328
+ });
3329
+ } catch (e) {
3330
+ e.name !== "AbortError" && console.error("AI prompt session error:", e);
3331
+ }
3332
+ }
3333
+ }
3334
+ async _handlePromptSubmitted(e) {
3335
+ await this._submitViaSession(e.detail.prompt);
3336
+ }
3337
+ _handlePromptStopped() {
3338
+ let e = this._session.current;
3339
+ if (this._textareaValue = "", e) {
3340
+ e.abort({
3341
+ notify: !0,
3342
+ cancelledMessage: this.cancelledMessage ?? void 0
3343
+ });
3344
+ return;
3345
+ }
3346
+ this.dispatchEvent(new CustomEvent("luzmo-stop", {
3347
+ bubbles: !0,
3348
+ composed: !0
3349
+ }));
3350
+ }
3351
+ async _handleEmptyStateSuggestionSelected(e) {
3352
+ let { prompt: t, selectedDatasets: n } = e.detail, r = this._session.requireSession();
3353
+ n?.length && r.setSelectedDatasets(n), await this._submitViaSession(t);
3354
+ }
3355
+ async _processInitialPrompt() {
3356
+ !this.initialPrompt || this.initialPrompt === this._lastProcessedInitialPrompt || this._session.requireSession().isDatasetRequirementMet() && (this._lastProcessedInitialPrompt = this.initialPrompt, await this._submitViaSession(this.initialPrompt, { skipUserMessage: !0 }));
3357
+ }
3358
+ connectedCallback() {
3359
+ super.connectedCallback(), this._session.connect();
3360
+ }
3361
+ disconnectedCallback() {
3362
+ super.disconnectedCallback(), this._session.teardown();
3363
+ }
3364
+ _scrollToBottom() {
3365
+ let e = this.shadowRoot?.querySelector(".chat-messages-container");
3366
+ e && requestAnimationFrame(() => {
3367
+ requestAnimationFrame(() => {
3368
+ e.scrollTop = e.scrollHeight;
3369
+ });
3370
+ });
3371
+ }
3372
+ updated(e) {
3373
+ super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange();
3374
+ }
3375
+ _syncSession(e) {
3376
+ if (e.has("chatSession")) {
3377
+ this._session.setSession(this.chatSession);
3378
+ return;
3379
+ }
3380
+ this._session.syncProperties(e);
3381
+ }
3382
+ _handleInitialPromptChange() {
3383
+ this.initialPrompt && this.initialPrompt !== this._lastProcessedInitialPrompt ? this._processInitialPrompt() : this.initialPrompt || (this._lastProcessedInitialPrompt = null);
3384
+ }
3385
+ _renderMarkdown(e) {
3386
+ let t = String(Q.parse(e, { async: !1 }));
3387
+ return st.sanitize(t, {
3388
+ ALLOWED_TAGS: /* @__PURE__ */ "p.br.strong.em.b.i.u.s.code.pre.blockquote.hr.ul.ol.li.h1.h2.h3.h4.h5.h6.table.thead.tbody.tr.th.td.a".split("."),
3389
+ ALLOWED_ATTR: [
3390
+ "href",
3391
+ "title",
3392
+ "target",
3393
+ "rel"
3394
+ ],
3395
+ ALLOW_DATA_ATTR: !1,
3396
+ FORBID_TAGS: [
3397
+ "script",
3398
+ "style",
3399
+ "iframe",
3400
+ "object",
3401
+ "embed",
3402
+ "link",
3403
+ "form",
3404
+ "input",
3405
+ "button"
3406
+ ],
3407
+ FORBID_ATTR: [
3408
+ "onerror",
3409
+ "onload",
3410
+ "onclick",
3411
+ "onmouseover",
3412
+ "onfocus",
3413
+ "onblur"
3414
+ ]
3415
+ });
3416
+ }
3417
+ _renderProgress() {
3418
+ let { progress: e, progressCollapsed: t } = this._getRenderState();
3419
+ return e?.children?.length ? o`
3420
+ <luzmo-progress-steps
3421
+ .progress=${e}
3422
+ ?collapsed=${t}
3423
+ size="s"
3424
+ ></luzmo-progress-steps>
3425
+ ` : s;
3426
+ }
3427
+ _isLastAiMessageWithProgress(e, t) {
3428
+ for (let n = t.length - 1; n >= 0; n--) if (t[n].type === "ai" && t[n].progress?.children?.length) return t[n].id === e.id;
3429
+ return !1;
3430
+ }
3431
+ _renderRestoreMenu(e, t, a, c = !1) {
3432
+ if (!(this.agent === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== a)) return s;
3433
+ let l = `context-menu-trigger-${e.apiMessageId}`;
3434
+ return o`
3435
+ <div class="assistant-context-menu">
3436
+ <button
3437
+ id=${l}
3438
+ class="assistant-context-menu-trigger"
3439
+ type="button"
3440
+ aria-label=${n("Open restore menu", { desc: "Accessible label for the ai chat restore menu trigger" })}
3441
+ aria-haspopup="menu"
3442
+ ?disabled=${c}
3443
+ >
3444
+ ${i(r)}
3445
+ </button>
3446
+ <luzmo-overlay
3447
+ trigger="${l}@click"
3448
+ placement="bottom-end"
3449
+ >
3450
+ <luzmo-popover>
3451
+ <button
3452
+ class="assistant-context-menu-item"
3453
+ type="button"
3454
+ ?disabled=${c}
3455
+ @click=${() => this._handleRestoreState(e, t)}
3456
+ >
3457
+ ${n("Restore state", { desc: "Context menu action that restores the chart to this message state" })}
3458
+ </button>
3459
+ </luzmo-popover>
3460
+ </luzmo-overlay>
3461
+ </div>
3462
+ `;
3463
+ }
3464
+ _renderMessages() {
3465
+ let { messages: e, inflightMessage: t, isGenerating: n } = this._getRenderState(), r = t !== null, i = [...e].reverse().find((e) => e.type === "ai")?.id, a = e.filter((e) => !t || e.id !== t.id);
3466
+ return a.map((t) => {
3467
+ let c = !!t.progress?.children?.length, l = c && this._isLastAiMessageWithProgress(t, a), u = c && (r || n || !l), ee = c ? o`
3468
+ <luzmo-progress-steps
3469
+ .progress=${t.progress}
3470
+ ?condensed=${u}
3471
+ collapsed
3472
+ no-animate
3473
+ size="s"
3474
+ ></luzmo-progress-steps>
3475
+ ` : s;
3476
+ if (t.type === "user") return o`
3477
+ <luzmo-chat-message
3478
+ avatar-placement="bottom"
3479
+ position="right"
3480
+ variant="primary"
3481
+ size="s"
3482
+ >
3483
+ ${t.message}
3484
+ </luzmo-chat-message>
3485
+ `;
3486
+ let te = e.indexOf(t), ne = t.isError ? "error" : t.isCancelled ? "cancelled" : "", re = t.isCancelled ? t.message : o`<div class="markdown-content">${d(this._renderMarkdown(t.message))}</div>`;
3487
+ return o`
3488
+ ${ee}
3489
+ <div class="assistant-message-wrapper">
3490
+ <luzmo-chat-message
3491
+ class=${ne}
3492
+ role=${t.isError ? "alert" : s}
3493
+ avatar-placement="bottom"
3494
+ position="left"
3495
+ quiet
3496
+ size="s"
3497
+ >
3498
+ ${re}
3499
+ </luzmo-chat-message>
3500
+
3501
+ ${this._renderRestoreMenu(t, te, i, r)}
3502
+ </div>
3503
+ `;
3504
+ });
3505
+ }
3506
+ _renderStreamingResponse() {
3507
+ let { inflightMessage: e } = this._getRenderState();
3508
+ return e?.message ? o`
3509
+ <luzmo-chat-message
3510
+ avatar-placement="bottom"
3511
+ position="left"
3512
+ quiet
3513
+ size="s"
3514
+ >
3515
+ <div class="markdown-content">${d(this._renderMarkdown(e.message))}</div>
3516
+ </luzmo-chat-message>
3517
+ ` : s;
3518
+ }
3519
+ _renderLoadingMessage() {
3520
+ let { isGenerating: e, progress: t, inflightMessage: r } = this._getRenderState();
3521
+ if (!e || t?.children?.length || r?.message) return s;
3522
+ let c = this.agent === "dashboard" ? !this.dashboard : this.chart?.type === "placeholder", l = this.agent === "dashboard" ? c ? n("Creating dashboard...", { desc: "Label for ai chat creating dashboard message" }) : n("Updating dashboard...", { desc: "Label for ai chat updating dashboard message" }) : c ? n("Creating item...", { desc: "Label for ai chat creating item message" }) : n("Updating item...", { desc: "Label for ai chat updating item message" });
3523
+ return o`
3524
+ <luzmo-chat-message
3525
+ avatar-placement="bottom"
3526
+ position="left"
3527
+ quiet
3528
+ size="s"
3529
+ >
3530
+ <div class="loading-message" role="status" aria-live="polite">
3531
+ <span class="icon-lg">${i(a, { className: "spin" })}</span>
3532
+ <span class="loading-message-text">${this.loadingMessage || l}</span>
3533
+ </div>
3534
+ </luzmo-chat-message>
3535
+ `;
3536
+ }
3537
+ _renderEmptyState() {
3538
+ if (this._getRenderState().messages.length > 0) return s;
3539
+ let e = n("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
3540
+ return o`
3541
+ <luzmo-ai-chat-empty-state
3542
+ .title=${this.emptyStateTitle || e}
3543
+ .subtitle=${t ? this.emptyStateSubtitle : ""}
3544
+ .suggestions=${this.emptyStateSuggestions}
3545
+ ?disabled=${this.disabled || this._getRenderState().isGenerating}
3546
+ @luzmo-suggestion-selected=${this._handleEmptyStateSuggestionSelected}
3547
+ ></luzmo-ai-chat-empty-state>
3548
+ `;
3549
+ }
3550
+ render() {
3551
+ let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
3552
+ return o`
3553
+ <div class="chat-container" role="region" aria-label=${n("AI Chat", { desc: "Accessible label for AI chat region" })}>
3554
+ <div class="chat-messages-container" role="log" aria-live="polite">
3555
+ ${this._renderEmptyState()}
3556
+ ${this._renderMessages()}
3557
+ ${this._renderProgress()}
3558
+ ${this._renderStreamingResponse()}
3559
+ ${this._renderLoadingMessage()}
3560
+ </div>
3561
+
3562
+ <luzmo-ai-interaction-textarea
3563
+ role="group"
3564
+ aria-label=${n("AI prompt input", { desc: "Accessible label for the ai chat prompt input area" })}
3565
+ .value=${this._textareaValue}
3566
+ .selectedDatasets=${e}
3567
+ .placeholder=${this.placeholder}
3568
+ ?disabled=${this.disabled}
3569
+ ?is-generating=${t}
3570
+ ?stoppable=${this.stoppable}
3571
+ ?hide-dataset-button=${this.hideDatasetButton}
3572
+ ?hide-dataset-icons=${this.hideDatasetIcons}
3573
+ ?disable-dataset-modification=${this.disableDatasetModification}
3574
+ ?hide-selected-datasets=${this.hideSelectedDatasets}
3575
+ ?disable-column-mentions=${this.disableColumnMentions}
3576
+ ?require-dataset=${this.requireDataset}
3577
+ auth-key=${this.authKey}
3578
+ auth-token=${this.authToken}
3579
+ api-url=${this.apiUrl}
3580
+ app-server=${this.appServer}
3581
+ ?flag-opendata=${this.flagOpendata}
3582
+ @prompt-submitted=${this._handlePromptSubmitted}
3583
+ @prompt-stopped=${this._handlePromptStopped}
3584
+ @dataset-selected=${this._handleDatasetSelected}
3585
+ @dataset-removed=${this._handleDatasetRemoved}
3586
+ ></luzmo-ai-interaction-textarea>
3587
+ </div>
3588
+ `;
3589
+ }
3590
+ };
3591
+ t([l({ type: Array })], $.prototype, "messages", void 0), t([l({
3592
+ type: Array,
3593
+ attribute: "selected-datasets"
3594
+ })], $.prototype, "selectedDatasets", void 0), t([l({ type: String })], $.prototype, "placeholder", void 0), t([l({
3595
+ type: Boolean,
3596
+ reflect: !0
3597
+ })], $.prototype, "disabled", void 0), t([l({
3598
+ type: Boolean,
3599
+ reflect: !0
3600
+ })], $.prototype, "stoppable", void 0), t([l({
3601
+ type: Boolean,
3602
+ attribute: "show-assistant-context-menu"
3603
+ })], $.prototype, "showAssistantContextMenu", void 0), t([l({
3604
+ type: String,
3605
+ attribute: "auth-key"
3606
+ })], $.prototype, "authKey", void 0), t([l({
3607
+ type: String,
3608
+ attribute: "auth-token"
3609
+ })], $.prototype, "authToken", void 0), t([l({
3610
+ type: String,
3611
+ attribute: "api-url"
3612
+ })], $.prototype, "apiUrl", void 0), t([l({
3613
+ type: String,
3614
+ attribute: "app-server"
3615
+ })], $.prototype, "appServer", void 0), t([l({
3616
+ type: Boolean,
3617
+ attribute: "flag-opendata"
3618
+ })], $.prototype, "flagOpendata", void 0), t([l({
3619
+ type: Boolean,
3620
+ attribute: "hide-dataset-button"
3621
+ })], $.prototype, "hideDatasetButton", void 0), t([l({
3622
+ type: Boolean,
3623
+ attribute: "hide-dataset-icons"
3624
+ })], $.prototype, "hideDatasetIcons", void 0), t([l({
3625
+ type: Boolean,
3626
+ attribute: "disable-dataset-modification"
3627
+ })], $.prototype, "disableDatasetModification", void 0), t([l({
3628
+ type: Boolean,
3629
+ attribute: "hide-selected-datasets"
3630
+ })], $.prototype, "hideSelectedDatasets", void 0), t([l({
3631
+ type: Boolean,
3632
+ attribute: "disable-column-mentions"
3633
+ })], $.prototype, "disableColumnMentions", void 0), t([l({
3634
+ type: Boolean,
3635
+ attribute: "require-dataset"
3636
+ })], $.prototype, "requireDataset", void 0), t([l({ type: String })], $.prototype, "agent", void 0), t([l({ type: String })], $.prototype, "task", void 0), t([l({
3637
+ type: String,
3638
+ attribute: "model-preference"
3639
+ })], $.prototype, "modelPreference", void 0), t([l({ attribute: !1 })], $.prototype, "chatSession", void 0), t([l({
3640
+ type: String,
3641
+ attribute: "conversation-id"
3642
+ })], $.prototype, "conversationId", void 0), t([l({
3643
+ type: Object,
3644
+ attribute: "chart"
3645
+ })], $.prototype, "chart", void 0), t([l({ type: Object })], $.prototype, "dashboard", void 0), t([l({
3646
+ type: String,
3647
+ attribute: "current-screen-mode"
3648
+ })], $.prototype, "currentScreenMode", void 0), t([l({
3649
+ type: String,
3650
+ attribute: "locale-id"
3651
+ })], $.prototype, "localeId", void 0), t([l({
3652
+ type: String,
3653
+ attribute: "timezone-id"
3654
+ })], $.prototype, "timezoneId", void 0), t([l({
3655
+ type: String,
3656
+ attribute: "api-version"
3657
+ })], $.prototype, "apiVersion", void 0), t([l({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], $.prototype, "stream", void 0), t([l({
3658
+ type: String,
3659
+ attribute: "loading-message"
3660
+ })], $.prototype, "loadingMessage", void 0), t([l({
3661
+ type: String,
3662
+ attribute: "cancelled-message"
3663
+ })], $.prototype, "cancelledMessage", void 0), t([l({
3664
+ type: String,
3665
+ attribute: "initial-prompt"
3666
+ })], $.prototype, "initialPrompt", void 0), t([l({
3667
+ type: String,
3668
+ attribute: "empty-state-title"
3669
+ })], $.prototype, "emptyStateTitle", void 0), t([l({
3670
+ type: String,
3671
+ attribute: "empty-state-subtitle"
3672
+ })], $.prototype, "emptyStateSubtitle", void 0), t([l({
3673
+ type: Array,
3674
+ attribute: !1
3675
+ })], $.prototype, "emptyStateSuggestions", void 0), t([u()], $.prototype, "_textareaValue", void 0);
3676
+ //#endregion
3677
+ //#region src/components/ai-chat/ai-chat-events.ts
3678
+ function Fr(e) {
3679
+ return e.recognized === !0;
3680
+ }
3681
+ //#endregion
3682
+ //#region src/components/ai-chat/index.ts
3683
+ customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", $);
3684
+ //#endregion
3685
+ export { vn as C, xn as S, gn as T, En as _, Mr as a, Cn as b, Dr as c, Un as d, jn as f, An as g, On as h, jr as i, Er as l, Dn as m, $ as n, kr as o, Mn as p, Nr as r, Or as s, Fr as t, zn as u, wn as v, _n as w, Sn as x, Tn as y };