@luzmo/analytics-components-kit 1.0.4-beta.3 → 1.0.4

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 (712) hide show
  1. package/README.md +11 -5
  2. package/components/{area-chart-options.config-BjdRY1sr.js → area-chart-options.config-CxJWxcD9.js} +1 -1
  3. package/components/{area-chart-positioning.config-PZ-MmeDb.cjs → area-chart-positioning.config-CE8lOCfT.cjs} +1 -1
  4. package/components/{area-chart-positioning.config-hLhrDJ3v.js → area-chart-positioning.config-CQW5h7Eg.js} +1 -1
  5. package/components/{area-chart-slots.config-BpvvqFy_.js → area-chart-slots.config-C22ZF9l0.js} +1 -1
  6. package/components/{bar-chart-options.config-DxNHV39Y.js → bar-chart-options.config-BAatAyhW.js} +1 -1
  7. package/components/{bar-chart-positioning.config-DI8tOMbI.cjs → bar-chart-positioning.config-DFI1wzOQ.cjs} +1 -1
  8. package/components/{bar-chart-positioning.config-C6wWTn1o.js → bar-chart-positioning.config-DaH_x_VU.js} +1 -1
  9. package/components/{bar-chart-slots.config-CfIirCOX.js → bar-chart-slots.config-BbgFihbK.js} +1 -1
  10. package/components/base-CYiGlWug.cjs +20 -0
  11. package/components/{base-DYkpEuMf.js → base-p2I4mVSW.js} +2 -3
  12. package/components/{box-plot-options.config-CXey4hvi.js → box-plot-options.config-BuX2wNhp.js} +1 -1
  13. package/components/{box-plot-positioning.config-D_qhNWth.cjs → box-plot-positioning.config-FOyav5Zq.cjs} +1 -1
  14. package/components/{box-plot-positioning.config-XG-WcIlA.js → box-plot-positioning.config-K2tQGMig.js} +1 -1
  15. package/components/{box-plot-slots.config-DclNulnH.js → box-plot-slots.config-OeublT6p.js} +1 -1
  16. package/components/{bubble-chart-options.config-CeaOv4eF.js → bubble-chart-options.config-C_XQOHgH.js} +1 -1
  17. package/components/{bubble-chart-positioning.config-CHYBh_Nb.cjs → bubble-chart-positioning.config-B6DXfqa4.cjs} +1 -1
  18. package/components/{bubble-chart-positioning.config-o_r-GWQG.js → bubble-chart-positioning.config-D2fwO2JM.js} +1 -1
  19. package/components/{bubble-chart-slots.config-D7vQta7G.js → bubble-chart-slots.config-Bdy20Xqs.js} +1 -1
  20. package/components/{bullet-chart-options.config-CLn7sV4W.js → bullet-chart-options.config-h5BFyszP.js} +1 -1
  21. package/components/{bullet-chart-positioning.config-DE5oy4M6.js → bullet-chart-positioning.config-DOAG2wFN.js} +1 -1
  22. package/components/{bullet-chart-positioning.config-BF8PflF6.cjs → bullet-chart-positioning.config-DZqzqZSQ.cjs} +1 -1
  23. package/components/{bullet-chart-slots.config-IX7zJWc7.js → bullet-chart-slots.config-Cqj3i1qo.js} +1 -1
  24. package/components/{choropleth-map-options.config-DzTlJSO3.js → choropleth-map-options.config-YCo77O3q.js} +1 -1
  25. package/components/{choropleth-map-positioning.config-DT1WWljP.cjs → choropleth-map-positioning.config-C3jO3j8R.cjs} +1 -1
  26. package/components/{choropleth-map-positioning.config-Cf8bEIns.js → choropleth-map-positioning.config-Jw6fAFM1.js} +1 -1
  27. package/components/{choropleth-map-slots.config-y0y9rf6i.js → choropleth-map-slots.config-D4vxtdtH.js} +1 -1
  28. package/components/{circle-pack-chart-options.config-DoLPbnPq.js → circle-pack-chart-options.config-C0cEtjgC.js} +1 -1
  29. package/components/{circle-pack-chart-positioning.config-Dy-DZ_de.js → circle-pack-chart-positioning.config-Ckb-1sUG.js} +1 -1
  30. package/components/{circle-pack-chart-positioning.config-DDpnake6.cjs → circle-pack-chart-positioning.config-DJT6ivEy.cjs} +1 -1
  31. package/components/{circle-pack-chart-slots.config-X9WVAykN.js → circle-pack-chart-slots.config-Dks8K3uQ.js} +1 -1
  32. package/components/{circular-gauge-options.config-BPUFjqx8.js → circular-gauge-options.config-Cdnk-Sp0.js} +1 -1
  33. package/components/{circular-gauge-positioning.config-D2t_3T1J.cjs → circular-gauge-positioning.config-B8gL5Br9.cjs} +1 -1
  34. package/components/{circular-gauge-positioning.config-DljBe7e-.js → circular-gauge-positioning.config-BGlDGhYZ.js} +1 -1
  35. package/components/{circular-gauge-slots.config-NIEmIAIG.js → circular-gauge-slots.config-Wf4sHmk6.js} +1 -1
  36. package/components/{column-chart-options.config-DQts3cE4.js → column-chart-options.config-DoZLlIRM.js} +1 -1
  37. package/components/{column-chart-positioning.config-Bob00Qnq.js → column-chart-positioning.config-BJGWvFLD.js} +1 -1
  38. package/components/{column-chart-positioning.config-Uvvr5PxW.cjs → column-chart-positioning.config-LzBETWIy.cjs} +1 -1
  39. package/components/{column-chart-slots.config-CoFarLvo.js → column-chart-slots.config-BhVqSbKw.js} +1 -1
  40. package/components/{combination-chart-options.config-CjSV6Ic4.js → combination-chart-options.config-D7ZXfn61.js} +1 -1
  41. package/components/{combination-chart-positioning.config-BzbcDQ2O.cjs → combination-chart-positioning.config-DjmWx90S.cjs} +1 -1
  42. package/components/{combination-chart-positioning.config-DG2CM16I.js → combination-chart-positioning.config-DtneKdwK.js} +1 -1
  43. package/components/{combination-chart-slots.config-BGRHSwfr.js → combination-chart-slots.config-CK8YBgUl.js} +1 -1
  44. package/components/{conditional-number-options.config-CZFqw31c.js → conditional-number-options.config-BwSMI5Ax.js} +1 -1
  45. package/components/{conditional-number-positioning.config-DpORiYgh.cjs → conditional-number-positioning.config-C8bRdffQ.cjs} +1 -1
  46. package/components/{conditional-number-positioning.config-CT8PqxDT.js → conditional-number-positioning.config-Ccb2yjJU.js} +1 -1
  47. package/components/{conditional-number-slots.config-r_C8T2HH.js → conditional-number-slots.config-xSNaYD4u.js} +1 -1
  48. package/components/data-field/index.cjs +1 -1
  49. package/components/data-field/index.d.ts +0 -1
  50. package/components/data-field/index.js +1 -1
  51. package/components/data-field-iGBGWoGH.cjs +89 -0
  52. package/components/{data-field-level-zbu4U2m5.js → data-field-ll2oFVG2.js} +141 -47
  53. package/components/data-field-panel/index.cjs +1 -1
  54. package/components/data-field-panel/index.d.ts +0 -1
  55. package/components/data-field-panel/index.js +1 -1
  56. package/components/data-field-panel-NktuTUUp.cjs +87 -0
  57. package/components/{data-field-panel-Ob-hNZwz.js → data-field-panel-ntgCpQ_2.js} +4 -5
  58. package/components/{data-fields-select-CYQy6Ow-.js → data-fields-select-DJFkrrPs.js} +3 -4
  59. package/components/data-fields-select-DL1nFRg3.cjs +41 -0
  60. package/components/{date-comparison-filter-options.config-s16IGX_4.js → date-comparison-filter-options.config-DCCm5Adt.js} +1 -1
  61. package/components/{date-comparison-filter-slots.config-DQBKeCRX.js → date-comparison-filter-slots.config-s7FcuKia.js} +1 -1
  62. package/components/{date-filter-options.config-ChFEIjN3.js → date-filter-options.config-DBwcMXzp.js} +1 -1
  63. package/components/{date-filter-slots.config-DREsncpE.js → date-filter-slots.config-pbd3rG9z.js} +1 -1
  64. package/components/{de-D-xQoqdB.js → de-DqwsqE-U.js} +14 -9
  65. package/components/de-tUSOg_BJ.cjs +20 -0
  66. package/components/{display-settings-binning-GKaol6nW.cjs → display-settings-binning-CQKXGp11.cjs} +4 -4
  67. package/components/{display-settings-binning-MHns2Ns6.js → display-settings-binning-DGxEB9Fa.js} +21 -19
  68. package/components/display-settings-datetime-25LwuZM_.cjs +217 -0
  69. package/components/{display-settings-datetime-D5eBAfWQ.js → display-settings-datetime-CLx9sxA7.js} +81 -79
  70. package/components/display-settings-grand-totals-1tBdxbFY.cjs +44 -0
  71. package/components/{display-settings-grand-totals-CpulhtNX.js → display-settings-grand-totals-B0Px90rH.js} +20 -18
  72. package/components/display-settings-numeric-Bbx4qmpA.cjs +190 -0
  73. package/components/{display-settings-numeric-DnyXOV_x.js → display-settings-numeric-CdEgzO7W.js} +88 -86
  74. package/components/display-settings-period-over-period-4bJbXWB7.cjs +229 -0
  75. package/components/{display-settings-period-over-period-Do4qG7yY.js → display-settings-period-over-period-lo3myRfT.js} +91 -90
  76. package/components/{donut-chart-options.config-WNOpb2n9.js → donut-chart-options.config-Buas8fzJ.js} +1 -1
  77. package/components/{donut-chart-positioning.config-BLnTmwTZ.cjs → donut-chart-positioning.config-2cYbI6p-.cjs} +1 -1
  78. package/components/{donut-chart-positioning.config-Bl96um6F.js → donut-chart-positioning.config-Dh3XI5f4.js} +1 -1
  79. package/components/{donut-chart-slots.config-DEQ3Cw6c.js → donut-chart-slots.config-CZWRHxZe.js} +1 -1
  80. package/components/{dropdown-filter-options.config-DBNawOPR.js → dropdown-filter-options.config-gv1y1OkC.js} +1 -1
  81. package/components/{dropdown-filter-slots.config-DcStZGjV.js → dropdown-filter-slots.config-aP5hvp2K.js} +1 -1
  82. package/components/{en-GB-DzkdeUQh.js → en-GB-D7N1nMuy.js} +1 -1
  83. package/components/{en-GB-B3xz84vF.cjs → en-GB-DCZl8CPc.cjs} +1 -1
  84. package/components/{en-CcLhGxIh.js → en-OJGeTneC.js} +1 -1
  85. package/components/{en-US-CcLhGxIh.js → en-US-OJGeTneC.js} +1 -1
  86. package/components/{en-US-B34alchz.cjs → en-US-hPjCnvK0.cjs} +1 -1
  87. package/components/{en-B34alchz.cjs → en-hPjCnvK0.cjs} +1 -1
  88. package/components/{es-CLnBAiLu.js → es-C-5Yqnck.js} +14 -9
  89. package/components/es-Czecz2xB.cjs +20 -0
  90. package/components/{evolution-number-options.config-CrIM2GTn.js → evolution-number-options.config-B1IomzV1.js} +1 -1
  91. package/components/{evolution-number-positioning.config-DXNPD29G.js → evolution-number-positioning.config-BQQrOKbD.js} +1 -1
  92. package/components/{evolution-number-positioning.config-DSoC35zp.cjs → evolution-number-positioning.config-BX1lWtDL.cjs} +1 -1
  93. package/components/{evolution-number-slots.config-Bq_JlxgK.js → evolution-number-slots.config-eOQDWZyb.js} +1 -1
  94. package/components/filters/index.cjs +1 -1
  95. package/components/filters/index.js +1 -1
  96. package/components/filters-Bzx4DYm-.cjs +323 -0
  97. package/components/filters-DSod7vIq.js +1637 -0
  98. package/components/formula/index.cjs +1 -1
  99. package/components/formula/index.js +1 -1
  100. package/components/formula-DcCDYDt4.cjs +45 -0
  101. package/components/{formula-CeDEKB7D.js → formula-TyfDRy5X.js} +15 -16
  102. package/components/{formula-codemirror-MygWCu2u.js → formula-codemirror-B6ktT1Dm.js} +21 -23
  103. package/components/{formula-codemirror-CFMYytMd.cjs → formula-codemirror-Bewi7Xgc.cjs} +53 -53
  104. package/components/formula-display-store-DxjO7Q-n.cjs +20 -0
  105. package/components/{formula-display-store-BYa910x_.js → formula-display-store-ycPV0gru.js} +279 -246
  106. package/components/formula-editor/index.cjs +1 -1
  107. package/components/formula-editor/index.d.ts +0 -1
  108. package/components/formula-editor/index.js +3 -4
  109. package/components/formula-editor-DQp_XiX5.cjs +247 -0
  110. package/components/{formula-editor-DeYzzLDr.js → formula-editor-HkD4KWnN.js} +349 -144
  111. package/components/{fr-DIwbOnwC.js → fr-BvgQLvx5.js} +14 -9
  112. package/components/fr-CQyhQN6j.cjs +20 -0
  113. package/components/{funnel-chart-options.config-k0X4rkj-.js → funnel-chart-options.config-DAv3185m.js} +1 -1
  114. package/components/{funnel-chart-positioning.config-CWSM8nTo.js → funnel-chart-positioning.config-9blBdgB7.js} +1 -1
  115. package/components/{funnel-chart-positioning.config-BcsV1xp7.cjs → funnel-chart-positioning.config-iHk--8l3.cjs} +1 -1
  116. package/components/{funnel-chart-slots.config-DKhaZf_r.js → funnel-chart-slots.config-BsNj6Mbb.js} +1 -1
  117. package/components/{get-css-variable-rHTFFWYM.cjs → get-css-variable-B1BZoBcs.cjs} +1 -1
  118. package/components/{get-css-variable-Bpma6ZOo.js → get-css-variable-COcan5CX.js} +1 -1
  119. package/components/{heat-map-options.config-_xxAm6iG.js → heat-map-options.config-Ckw8voNV.js} +1 -1
  120. package/components/{heat-map-positioning.config-C0dkG5_9.cjs → heat-map-positioning.config-CqkTB8nU.cjs} +1 -1
  121. package/components/{heat-map-positioning.config-DQJP4mTG.js → heat-map-positioning.config-DgrZWNiT.js} +1 -1
  122. package/components/{heat-map-slots.config-BDfEGgq5.js → heat-map-slots.config-BFK5TF9k.js} +1 -1
  123. package/components/{heat-table-options.config-DxRbWqJ8.js → heat-table-options.config-PpOf4o94.js} +1 -1
  124. package/components/{heat-table-positioning.config-WUHNZPT-.js → heat-table-positioning.config-BqsqkftW.js} +1 -1
  125. package/components/{heat-table-positioning.config-BzSpf7ed.cjs → heat-table-positioning.config-Ca-WBNR-.cjs} +1 -1
  126. package/components/{heat-table-slots.config-CVh1TEJJ.js → heat-table-slots.config-3q2hG4nF.js} +1 -1
  127. package/components/{hexbin-map-options.config-CmAmK-jM.js → hexbin-map-options.config-D88DHYrl.js} +1 -1
  128. package/components/{hexbin-map-positioning.config-CJPhgdt2.js → hexbin-map-positioning.config-gkLfwTS6.js} +1 -1
  129. package/components/{marker-map-positioning.config-B-HitobG.cjs → hexbin-map-positioning.config-sUIrPJP4.cjs} +1 -1
  130. package/components/{hexbin-map-slots.config-rxPZ4kwL.js → hexbin-map-slots.config-BfbHCCUe.js} +1 -1
  131. package/components/{image-options.config-DJ2DEf7g.js → image-options.config-ByIPpr29.js} +1 -1
  132. package/components/{image-slots.config-bDNDmiWy.js → image-slots.config-B4MFjNWt.js} +1 -1
  133. package/components/index.cjs +749 -1
  134. package/components/index.js +5577 -64
  135. package/components/item-grid/index.cjs +1 -1
  136. package/components/item-grid/index.js +1 -1
  137. package/components/{item-grid-CO_cqGqJ.js → item-grid-B59uyBDP.js} +5 -6
  138. package/components/{item-grid-CRAoMdCq.cjs → item-grid-C6nEE4Uj.cjs} +22 -22
  139. package/components/item-option/index.cjs +1 -1
  140. package/components/item-option/index.js +1 -1
  141. package/components/item-option-C4c-e1QF.cjs +252 -0
  142. package/components/item-option-action-button-group/index.cjs +1 -1
  143. package/components/item-option-action-button-group/index.js +1 -1
  144. package/components/{item-option-action-button-group-VpgTKSIV.js → item-option-action-button-group-BEXRueVH.js} +3 -3
  145. package/components/item-option-action-button-group-BU1wvtEd.cjs +53 -0
  146. package/components/item-option-base-DATaPQ-m.cjs +56 -0
  147. package/components/{item-option-base-VV7gyznL.js → item-option-base-DqDKIqRP.js} +2 -2
  148. package/components/item-option-color-palette-picker/index.cjs +1 -1
  149. package/components/item-option-color-palette-picker/index.js +1 -1
  150. package/components/item-option-color-palette-picker-Cc2nTuxC.cjs +40 -0
  151. package/components/{item-option-color-palette-picker-CQgG_NPQ.js → item-option-color-palette-picker-dk5Nm1XB.js} +2 -2
  152. package/components/item-option-color-picker/index.cjs +1 -1
  153. package/components/item-option-color-picker/index.js +1 -1
  154. package/components/{item-option-color-picker-DeDwpICb.cjs → item-option-color-picker-Czr_ojzh.cjs} +2 -2
  155. package/components/{item-option-color-picker-BmQBTQzb.js → item-option-color-picker-oG-wrEZh.js} +2 -2
  156. package/components/item-option-color-range/index.cjs +1 -1
  157. package/components/item-option-color-range/index.js +1 -1
  158. package/components/item-option-color-range-CTnHZ72E.cjs +98 -0
  159. package/components/{item-option-color-range-D2kHXssY.js → item-option-color-range-RbnPnI3s.js} +3 -3
  160. package/components/item-option-multi-language-field/index.cjs +1 -1
  161. package/components/item-option-multi-language-field/index.js +1 -1
  162. package/components/{item-option-multi-language-field-Cc9ph205.cjs → item-option-multi-language-field-BpyuIPcO.cjs} +2 -2
  163. package/components/{item-option-multi-language-field-DbqcqhhN.js → item-option-multi-language-field-BqhBRIFH.js} +2 -2
  164. package/components/item-option-number-field/index.cjs +1 -1
  165. package/components/item-option-number-field/index.js +1 -1
  166. package/components/{item-option-number-field-BbCVJeXZ.js → item-option-number-field-BDPEAzdF.js} +2 -2
  167. package/components/{item-option-number-field-B6GFKuLN.cjs → item-option-number-field-CV2xpQrk.cjs} +2 -2
  168. package/components/item-option-panel/index.cjs +1 -1
  169. package/components/item-option-panel/index.js +1 -1
  170. package/components/{item-option-panel-6UFGCcnF.cjs → item-option-panel-CMrjUb2s.cjs} +2 -2
  171. package/components/{item-option-panel-CrNZ0xIF.js → item-option-panel-XhTxaBZp.js} +3 -3
  172. package/components/item-option-picker/index.cjs +1 -1
  173. package/components/item-option-picker/index.js +1 -1
  174. package/components/{item-option-picker-DJKTAG9w.cjs → item-option-picker-CvEfEy99.cjs} +2 -2
  175. package/components/{item-option-picker-YquXTQNY.js → item-option-picker-D_Od3am8.js} +2 -2
  176. package/components/item-option-position-picker/index.cjs +1 -1
  177. package/components/item-option-position-picker/index.js +1 -1
  178. package/components/{item-option-position-picker-DKvsF-VQ.js → item-option-position-picker-BKw29tj-.js} +2 -2
  179. package/components/item-option-position-picker-DBs4JlFi.cjs +32 -0
  180. package/components/item-option-positions-number-field/index.cjs +1 -1
  181. package/components/item-option-positions-number-field/index.js +1 -1
  182. package/components/item-option-positions-number-field-DIIEFHd4.cjs +49 -0
  183. package/components/{item-option-positions-number-field-Bxcbu_IR.js → item-option-positions-number-field-lrJdfydy.js} +2 -2
  184. package/components/item-option-radio-button-group/index.cjs +1 -1
  185. package/components/item-option-radio-button-group/index.js +1 -1
  186. package/components/{item-option-radio-button-group-Cw-xUSUS.js → item-option-radio-button-group-DTyHPaz_.js} +2 -2
  187. package/components/{item-option-radio-button-group-Bzh4RtSn.cjs → item-option-radio-button-group-DrjpL6YU.cjs} +2 -2
  188. package/components/item-option-slider/index.cjs +1 -1
  189. package/components/item-option-slider/index.js +1 -1
  190. package/components/{item-option-slider-DUqo3Fw0.cjs → item-option-slider-BwKBgW0y.cjs} +2 -2
  191. package/components/{item-option-slider-BwQnaxvO.js → item-option-slider-CIDoZhZl.js} +2 -2
  192. package/components/item-option-switch/index.cjs +1 -1
  193. package/components/item-option-switch/index.js +1 -1
  194. package/components/{item-option-switch-DBsakQjy.cjs → item-option-switch-CQtvbTfI.cjs} +2 -2
  195. package/components/{item-option-switch-IixoilYJ.js → item-option-switch-DxC1yjeN.js} +2 -2
  196. package/components/item-option-text-field/index.cjs +1 -1
  197. package/components/item-option-text-field/index.js +1 -1
  198. package/components/{item-option-text-field-CdWylobQ.js → item-option-text-field-CZtJ1yIj.js} +2 -2
  199. package/components/{item-option-text-field-B4V_sKnM.cjs → item-option-text-field-pLQzcE25.cjs} +2 -2
  200. package/components/{item-option-Bc6qXONK.js → item-option-zz-Rqh6o.js} +47 -47
  201. package/components/item-options-configs.js +45 -45
  202. package/components/item-slot-drop/index.cjs +1 -1
  203. package/components/item-slot-drop/index.d.ts +0 -2
  204. package/components/item-slot-drop/index.js +1 -1
  205. package/components/item-slot-drop/item-slot-drop.d.ts +1 -0
  206. package/components/{item-slot-drop-BmvMi3dI.js → item-slot-drop-SqYpfTGj.js} +67 -65
  207. package/components/item-slot-drop-UygcXM5D.cjs +91 -0
  208. package/components/item-slot-drop-panel/index.cjs +1 -1
  209. package/components/item-slot-drop-panel/index.js +1 -1
  210. package/components/item-slot-drop-panel-9T8BWejl.cjs +57 -0
  211. package/components/{item-slot-drop-panel-D5vaJidp.js → item-slot-drop-panel-DoWCzjqb.js} +40 -41
  212. package/components/item-slot-picker/index.cjs +1 -1
  213. package/components/item-slot-picker/index.js +1 -1
  214. package/components/item-slot-picker/item-slot-picker.d.ts +3 -0
  215. package/components/{item-slot-picker-BZV33YoP.js → item-slot-picker-CadZEvOA.js} +138 -112
  216. package/components/item-slot-picker-Rnb_wwCV.cjs +174 -0
  217. package/components/item-slot-picker-panel/index.cjs +1 -1
  218. package/components/item-slot-picker-panel/index.js +1 -1
  219. package/components/item-slot-picker-panel-2VJY6C0b.cjs +81 -0
  220. package/components/{item-slot-picker-panel-DyhRlAKN.js → item-slot-picker-panel-Bhr6d6Ya.js} +4 -5
  221. package/components/item-slots-configs.js +45 -45
  222. package/components/{line-chart-options.config-CfHRdG6O.js → line-chart-options.config-DMjvCs-4.js} +1 -1
  223. package/components/{line-chart-positioning.config-pSGQm1C1.cjs → line-chart-positioning.config-BIkHxiyg.cjs} +1 -1
  224. package/components/{line-chart-positioning.config-Cfcgse1N.js → line-chart-positioning.config-CdnYQBah.js} +1 -1
  225. package/components/{line-chart-slots.config-DKy4D4Yt.js → line-chart-slots.config-CrQEwa4W.js} +1 -1
  226. package/components/load-data-fields-for-datasets-CU75T9Az.js +86 -0
  227. package/components/load-data-fields-for-datasets-DkK1JsFd.cjs +20 -0
  228. package/components/{decorate-CaYbmmmm.js → localized-mixin-CBMYHOPv.js} +26 -2
  229. package/components/{ai-chat/index.cjs → localized-mixin-DAOiXh71.cjs} +1 -1
  230. package/components/{marker-map-options.config-C_aGdRQQ.js → marker-map-options.config-C52a3boH.js} +1 -1
  231. package/components/{marker-map-positioning.config-DTCPGbnG.js → marker-map-positioning.config-BSz4P-W9.js} +1 -1
  232. package/components/{hexbin-map-positioning.config-Cno9WIc9.cjs → marker-map-positioning.config-t66fioVz.cjs} +1 -1
  233. package/components/{marker-map-slots.config-BKRRAGwB.js → marker-map-slots.config-eJAxjIaQ.js} +1 -1
  234. package/components/nl-BwK5iXtO.cjs +20 -0
  235. package/components/{nl-C_g1Le3t.js → nl-D-Wa6DnD.js} +14 -9
  236. package/components/{ohlc-chart-options.config-Bd-vLN0I.js → ohlc-chart-options.config-38qB2VKc.js} +1 -1
  237. package/components/{ohlc-chart-positioning.config-NhpIR1T3.cjs → ohlc-chart-positioning.config-BGueS7CJ.cjs} +1 -1
  238. package/components/{ohlc-chart-positioning.config-D0kJJkXw.js → ohlc-chart-positioning.config-tQPPutWX.js} +1 -1
  239. package/components/{ohlc-chart-slots.config-DC8NCD0o.js → ohlc-chart-slots.config-SOs4oD-Q.js} +1 -1
  240. package/components/{parallel-coordinates-plot-options.config-BUo6XxfP.js → parallel-coordinates-plot-options.config-DfZ80jLX.js} +1 -1
  241. package/components/{parallel-coordinates-plot-positioning.config-Dzd0eaka.js → parallel-coordinates-plot-positioning.config-MkX-qYHX.js} +1 -1
  242. package/components/{parallel-coordinates-plot-positioning.config-DLF0U4lZ.cjs → parallel-coordinates-plot-positioning.config-NrJ2LNM8.cjs} +1 -1
  243. package/components/{parallel-coordinates-plot-slots.config-Dy-9mztD.js → parallel-coordinates-plot-slots.config-DgsHiCqT.js} +1 -1
  244. package/components/{formatter-Cq5dFCyU.js → period-over-period-condition.const-DLA60ptm.js} +235 -44
  245. package/components/period-over-period-condition.const-DystGY6B.cjs +20 -0
  246. package/components/{pivot-table-options.config-DrzB4qVX.js → pivot-table-options.config-5udtucDD.js} +1 -1
  247. package/components/{pivot-table-positioning.config-BvUjUkG3.cjs → pivot-table-positioning.config-DgJ5PPB9.cjs} +1 -1
  248. package/components/{pivot-table-positioning.config-PKXfqjiN.js → pivot-table-positioning.config-Dr_0v4TM.js} +1 -1
  249. package/components/{pivot-table-slots.config-OQe8tS40.js → pivot-table-slots.config-CRL6EW5R.js} +1 -1
  250. package/components/{pragmatic-element-adapter-CKhTZWGj.cjs → pragmatic-element-adapter-U3ppsQDe.cjs} +3 -3
  251. package/components/{pragmatic-element-adapter-BFUFSRw6.js → pragmatic-element-adapter-e5LbH_lv.js} +50 -50
  252. package/components/{pyramid-chart-options.config-Dux8839h.js → pyramid-chart-options.config-iP2MzTeb.js} +1 -1
  253. package/components/{pyramid-chart-positioning.config-48iZhPdi.cjs → pyramid-chart-positioning.config-BGRtXKWh.cjs} +1 -1
  254. package/components/{pyramid-chart-positioning.config-C8yiD0R3.js → pyramid-chart-positioning.config-DB0BI8vW.js} +1 -1
  255. package/components/{pyramid-chart-slots.config-DwlZaBAF.js → pyramid-chart-slots.config-DM3lYlDg.js} +1 -1
  256. package/components/{radar-chart-options.config-ColtKo6Z.js → radar-chart-options.config-aR5sQal-.js} +1 -1
  257. package/components/{radar-chart-positioning.config-L5Eu5W1I.js → radar-chart-positioning.config-D6UfRMMA.js} +1 -1
  258. package/components/{radar-chart-positioning.config-CpqhJjoz.cjs → radar-chart-positioning.config-DQiJ-Z1s.cjs} +1 -1
  259. package/components/{radar-chart-slots.config-BuHg4Zeg.js → radar-chart-slots.config-msW05r4n.js} +1 -1
  260. package/components/{regular-table-options.config-DopdB4eB.js → regular-table-options.config-kbARlJ1E.js} +1 -1
  261. package/components/{regular-table-slots.config--SVEN5Cu.js → regular-table-slots.config-DAwLOM5T.js} +1 -1
  262. package/components/{route-map-options.config-BCuJw5k3.js → route-map-options.config-DCBAfq09.js} +1 -1
  263. package/components/{route-map-positioning.config-DTwMkeiu.cjs → route-map-positioning.config-Cbic0Cbz.cjs} +1 -1
  264. package/components/{route-map-positioning.config-DVb_Jiws.js → route-map-positioning.config-D_ZoyhwX.js} +1 -1
  265. package/components/{route-map-slots.config-CmVIxDkx.js → route-map-slots.config-DNiRtoRC.js} +1 -1
  266. package/components/{sankey-diagram-options.config-BH3kpjFs.js → sankey-diagram-options.config-CKjVnYnF.js} +1 -1
  267. package/components/{sankey-diagram-positioning.config-Dk0siSAo.js → sankey-diagram-positioning.config-CQNdImz0.js} +1 -1
  268. package/components/{sankey-diagram-positioning.config-_kyrBnJ4.cjs → sankey-diagram-positioning.config-CZDPh7CR.cjs} +1 -1
  269. package/components/{sankey-diagram-slots.config-lbkF8DWJ.js → sankey-diagram-slots.config-CVD2P6RJ.js} +1 -1
  270. package/components/{scatter-plot-options.config-Dn6ILlJw.js → scatter-plot-options.config--AfAxaGf.js} +1 -1
  271. package/components/{scatter-plot-positioning.config-DaYstFV8.cjs → scatter-plot-positioning.config-BPEymo3a.cjs} +1 -1
  272. package/components/{scatter-plot-positioning.config-440yA7x5.js → scatter-plot-positioning.config-BTOiZ8cF.js} +1 -1
  273. package/components/{scatter-plot-slots.config-DEFWWj0_.js → scatter-plot-slots.config-D57rd66g.js} +1 -1
  274. package/components/{search-filter-options.config-DWKVxBc5.js → search-filter-options.config-DQwMOiXm.js} +1 -1
  275. package/components/{search-filter-slots.config-vyPYIXE7.js → search-filter-slots.config-DQybwP4H.js} +1 -1
  276. package/components/{set-locale-DKCZkJVL.cjs → set-locale-BCnD4yp_.cjs} +1 -1
  277. package/components/{set-locale-DB1FMgtK.js → set-locale-CamOWu7o.js} +4 -4
  278. package/components/{slicer-filter-options.config-C6HPrjIw.js → slicer-filter-options.config-DVE33GEz.js} +1 -1
  279. package/components/{slicer-filter-positioning.config-B6wPo539.js → slicer-filter-positioning.config-CC7uoU2D.js} +1 -1
  280. package/components/{slicer-filter-positioning.config-DdfTuXdV.cjs → slicer-filter-positioning.config-CQE4ocpD.cjs} +1 -1
  281. package/components/{slicer-filter-slots.config-BZWCSkX4.js → slicer-filter-slots.config-Bcz9RsdR.js} +1 -1
  282. package/components/{slider-filter-options.config-CvqHWJIX.js → slider-filter-options.config-BwaAvOvt.js} +1 -1
  283. package/components/{slider-filter-slots.config-BY9X2rlz.js → slider-filter-slots.config-Bc8Qk7fb.js} +1 -1
  284. package/components/slot-menu-BL772rj7.js +1048 -0
  285. package/components/slot-menu-CCbZ-krJ.cjs +215 -0
  286. package/components/{speedometer-chart-options.config-wX3KzciD.js → speedometer-chart-options.config-D4-8n5pn.js} +1 -1
  287. package/components/{speedometer-chart-positioning.config-rI2Jxymu.js → speedometer-chart-positioning.config-ChH-uAdS.js} +1 -1
  288. package/components/{speedometer-chart-positioning.config-BVYrl1_s.cjs → speedometer-chart-positioning.config-DpBVarun.cjs} +1 -1
  289. package/components/{speedometer-chart-slots.config-0Tv8EtKT.js → speedometer-chart-slots.config-B4zqf0f_.js} +1 -1
  290. package/components/{spike-map-options.config-DpgsB_L-.js → spike-map-options.config-CM46vw7B.js} +1 -1
  291. package/components/{spike-map-positioning.config-CiY2ju4c.js → spike-map-positioning.config-BnEQJ-rD.js} +1 -1
  292. package/components/{spike-map-positioning.config-2XZLrk9D.cjs → spike-map-positioning.config-DrSoa8Ol.cjs} +1 -1
  293. package/components/{spike-map-slots.config-C6e0NXiD.js → spike-map-slots.config-BeXzuzh0.js} +1 -1
  294. package/components/{strip-plot-options.config-BzhxzU-s.js → strip-plot-options.config-BlneYJOy.js} +1 -1
  295. package/components/{strip-plot-positioning.config-CFQPdgei.js → strip-plot-positioning.config-Be5Desz2.js} +1 -1
  296. package/components/{strip-plot-positioning.config-CkC8JUwR.cjs → strip-plot-positioning.config-DlkZ1i6m.cjs} +1 -1
  297. package/components/{strip-plot-slots.config-BjwAuVoh.js → strip-plot-slots.config-BGQIQtMK.js} +1 -1
  298. package/components/{sunburst-chart-options.config-Ba_H54ip.js → sunburst-chart-options.config-8xopRyBB.js} +1 -1
  299. package/components/{sunburst-chart-positioning.config-DVt84HYB.cjs → sunburst-chart-positioning.config-D4zzci9s.cjs} +1 -1
  300. package/components/{sunburst-chart-positioning.config-BHJf7n-T.js → sunburst-chart-positioning.config-RUEkAgKJ.js} +1 -1
  301. package/components/{sunburst-chart-slots.config-h114Cuzh.js → sunburst-chart-slots.config-BhKeTqTo.js} +1 -1
  302. package/components/{symbol-map-options.config-DeJyZILi.js → symbol-map-options.config-nJAvVQIh.js} +1 -1
  303. package/components/{symbol-map-positioning.config-DQK1q4GP.cjs → symbol-map-positioning.config-Dmgmyhv7.cjs} +1 -1
  304. package/components/{symbol-map-positioning.config-tZp8vwwl.js → symbol-map-positioning.config-JzgtULMk.js} +1 -1
  305. package/components/{symbol-map-slots.config-BmvI5_VE.js → symbol-map-slots.config-D9E-oBE4.js} +1 -1
  306. package/components/{text-options.config-BXuZMKTG.js → text-options.config-DCF3IVzO.js} +1 -1
  307. package/components/{text-slots.config-18Chz73A.js → text-slots.config-C60nJ0OX.js} +1 -1
  308. package/components/{treemap-chart-options.config-Be-LBEGy.js → treemap-chart-options.config-RFQTphEG.js} +1 -1
  309. package/components/{treemap-chart-positioning.config-CEYAh7Uc.js → treemap-chart-positioning.config-CSt_vVgw.js} +1 -1
  310. package/components/{treemap-chart-positioning.config-DQfHJ-ZS.cjs → treemap-chart-positioning.config-CqHJxz2j.cjs} +1 -1
  311. package/components/{treemap-chart-slots.config-e7ORieH-.js → treemap-chart-slots.config-CZRP7PZH.js} +1 -1
  312. package/components/utils/base.cjs +1 -1
  313. package/components/utils/base.js +2 -2
  314. package/components/utils/store.js +1 -1
  315. package/components/utils-DLTDAer5.js +239 -0
  316. package/components/utils-Ez3j4EOS.cjs +20 -0
  317. package/components/utils.cjs +1 -1
  318. package/components/utils.js +6 -9
  319. package/components/{venn-diagram-options.config-D3bEFsYa.js → venn-diagram-options.config-uCJ5dei5.js} +1 -1
  320. package/components/{venn-diagram-positioning.config-DQa6-GAn.cjs → venn-diagram-positioning.config-CzhNTma3.cjs} +1 -1
  321. package/components/{venn-diagram-positioning.config-2rUFGTJh.js → venn-diagram-positioning.config-DsPI8qfG.js} +1 -1
  322. package/components/{venn-diagram-slots.config-Dm-IC6JS.js → venn-diagram-slots.config-DOljH_uI.js} +1 -1
  323. package/components/{video-options.config-B5aOwGa4.js → video-options.config-DkLrX1gP.js} +1 -1
  324. package/components/{video-slots.config-D2MtpAGI.js → video-slots.config-CqMIkttE.js} +1 -1
  325. package/components/{wordcloud-chart-options.config-DntH4Hvg.js → wordcloud-chart-options.config-C2ZILp7a.js} +1 -1
  326. package/components/{wordcloud-chart-positioning.config-C3Zulr2Q.js → wordcloud-chart-positioning.config-BUE8e4fN.js} +1 -1
  327. package/components/{wordcloud-chart-positioning.config-DhoAsQP-.cjs → wordcloud-chart-positioning.config-moNJfL1M.cjs} +1 -1
  328. package/components/{wordcloud-chart-slots.config-CsFBBXDz.js → wordcloud-chart-slots.config-B8s8B47F.js} +1 -1
  329. package/custom-elements.json +5896 -15935
  330. package/index.d.ts +0 -24
  331. package/package.json +3 -128
  332. package/react/README.md +6 -31
  333. package/react/esm/index.d.ts +2 -27
  334. package/react/esm/index.js +2 -102
  335. package/react/esm/types.d.ts +0 -15
  336. package/react/index.ts +2 -102
  337. package/react/luzmo-stub.d.ts +0 -163
  338. package/react/types.ts +0 -12
  339. package/react/utils/slot-content/ad-hoc-slot-content.d.ts +7 -0
  340. package/react/utils/slot-content/render-calculation-label.d.ts +7 -0
  341. package/react/utils/slot-state/slot-store.d.ts +2 -2
  342. package/types/slot.types.d.ts +10 -1
  343. package/types.d.ts +0 -8
  344. package/utils/slot-content/ad-hoc-slot-content.d.ts +7 -0
  345. package/utils/slot-content/render-calculation-label.d.ts +7 -0
  346. package/utils/slot-state/slot-store.d.ts +2 -2
  347. package/components/ai-chat/ai-chat-events.d.ts +0 -123
  348. package/components/ai-chat/ai-chat-request.d.ts +0 -11
  349. package/components/ai-chat/ai-chat.d.ts +0 -279
  350. package/components/ai-chat/ai-prompt-types.d.ts +0 -94
  351. package/components/ai-chat/empty-state/ai-chat-empty-state.d.ts +0 -46
  352. package/components/ai-chat/empty-state/index.d.ts +0 -8
  353. package/components/ai-chat/empty-state/types.d.ts +0 -14
  354. package/components/ai-chat/index.d.ts +0 -20
  355. package/components/ai-chat/index.js +0 -28
  356. package/components/ai-chat/session/ai-chat-session-controller.d.ts +0 -51
  357. package/components/ai-chat/session/ai-chat-session-types.d.ts +0 -88
  358. package/components/ai-chat/session/ai-chat-session.d.ts +0 -91
  359. package/components/ai-chat/session/index.d.ts +0 -2
  360. package/components/ai-chat/stream/chunk-extractors.d.ts +0 -27
  361. package/components/ai-chat/stream/index.d.ts +0 -52
  362. package/components/ai-chat/stream/progress.d.ts +0 -3
  363. package/components/ai-chat/stream/registry.d.ts +0 -6
  364. package/components/ai-chat/stream/stream-processor.d.ts +0 -2
  365. package/components/ai-chat/stream/transport.d.ts +0 -26
  366. package/components/ai-chat/stream/types.d.ts +0 -55
  367. package/components/ai-chat-CXt4wCe0.js +0 -3715
  368. package/components/ai-chat-Dnf-C838.cjs +0 -258
  369. package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +0 -135
  370. package/components/ai-interaction-textarea/index.cjs +0 -20
  371. package/components/ai-interaction-textarea/index.d.ts +0 -8
  372. package/components/ai-interaction-textarea/index.js +0 -28
  373. package/components/ai-interaction-textarea/types.d.ts +0 -5
  374. package/components/ai-interaction-textarea-B_-aZ9mc.cjs +0 -68
  375. package/components/ai-interaction-textarea-DSrZkuh9.js +0 -299
  376. package/components/base-BCmPH4SF.cjs +0 -20
  377. package/components/convert-data-field-to-slot-content-BQkSy_8B.cjs +0 -20
  378. package/components/convert-data-field-to-slot-content-C6IIqU7G.js +0 -53
  379. package/components/convert-datasets-to-data-fields-B13rl1an.cjs +0 -20
  380. package/components/convert-datasets-to-data-fields-PmQzeVLG.js +0 -68
  381. package/components/data-field-CxUItUcs.cjs +0 -54
  382. package/components/data-field-RzkD37hR.js +0 -121
  383. package/components/data-field-level/data-field-level.d.ts +0 -40
  384. package/components/data-field-level/helpers/generate-preview.d.ts +0 -9
  385. package/components/data-field-level/index.cjs +0 -20
  386. package/components/data-field-level/index.d.ts +0 -8
  387. package/components/data-field-level/index.js +0 -28
  388. package/components/data-field-level-55bJkqFt.cjs +0 -55
  389. package/components/data-field-panel-C3O77CIF.cjs +0 -87
  390. package/components/data-fields-select/data-fields-select.d.ts +0 -127
  391. package/components/data-fields-select/index.cjs +0 -20
  392. package/components/data-fields-select/index.d.ts +0 -9
  393. package/components/data-fields-select/index.js +0 -28
  394. package/components/data-fields-select/types.d.ts +0 -4
  395. package/components/data-fields-select-D-nSjOep.cjs +0 -41
  396. package/components/dataset-icon/dataset-icon.d.ts +0 -45
  397. package/components/dataset-icon/index.cjs +0 -20
  398. package/components/dataset-icon/index.d.ts +0 -8
  399. package/components/dataset-icon/index.js +0 -28
  400. package/components/dataset-icon/types.d.ts +0 -11
  401. package/components/dataset-icon-BAV0S4sZ.cjs +0 -64
  402. package/components/dataset-icon-BXEgg_8O.js +0 -125
  403. package/components/dataset-selector-list/dataset-selector-list.d.ts +0 -102
  404. package/components/dataset-selector-list/index.cjs +0 -20
  405. package/components/dataset-selector-list/index.d.ts +0 -8
  406. package/components/dataset-selector-list/index.js +0 -28
  407. package/components/dataset-selector-list-BW5v_7_L.cjs +0 -75
  408. package/components/dataset-selector-list-DwfeaUGu.js +0 -313
  409. package/components/dataset-selector-row/dataset-selector-row.d.ts +0 -89
  410. package/components/dataset-selector-row/index.cjs +0 -20
  411. package/components/dataset-selector-row/index.d.ts +0 -8
  412. package/components/dataset-selector-row/index.js +0 -28
  413. package/components/dataset-selector-row-BU7YhT7l.cjs +0 -79
  414. package/components/dataset-selector-row-CLbx0joD.js +0 -273
  415. package/components/de-BY1wWZE8.cjs +0 -20
  416. package/components/decompose-numeric-format-DGJua3rU.cjs +0 -20
  417. package/components/decompose-numeric-format-DS0j2wa1.js +0 -36
  418. package/components/decorate-DCJt-2rt.cjs +0 -20
  419. package/components/display-settings/display-settings.d.ts +0 -98
  420. package/components/display-settings/index.cjs +0 -20
  421. package/components/display-settings/index.d.ts +0 -8
  422. package/components/display-settings/index.js +0 -28
  423. package/components/display-settings/types.d.ts +0 -9
  424. package/components/display-settings-COYLimuI.cjs +0 -120
  425. package/components/display-settings-ajA8j6kr.js +0 -272
  426. package/components/display-settings-binning/display-settings-binning.d.ts +0 -32
  427. package/components/display-settings-binning/index.cjs +0 -20
  428. package/components/display-settings-binning/index.d.ts +0 -8
  429. package/components/display-settings-binning/index.js +0 -28
  430. package/components/display-settings-datetime/display-settings-datetime.d.ts +0 -86
  431. package/components/display-settings-datetime/index.cjs +0 -20
  432. package/components/display-settings-datetime/index.d.ts +0 -8
  433. package/components/display-settings-datetime/index.js +0 -28
  434. package/components/display-settings-datetime-CLRXVpld.cjs +0 -217
  435. package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +0 -29
  436. package/components/display-settings-grand-totals/index.cjs +0 -20
  437. package/components/display-settings-grand-totals/index.d.ts +0 -8
  438. package/components/display-settings-grand-totals/index.js +0 -28
  439. package/components/display-settings-grand-totals-DltI_Z-x.cjs +0 -44
  440. package/components/display-settings-numeric/display-settings-numeric.d.ts +0 -82
  441. package/components/display-settings-numeric/helpers/constants.d.ts +0 -19
  442. package/components/display-settings-numeric/index.cjs +0 -20
  443. package/components/display-settings-numeric/index.d.ts +0 -8
  444. package/components/display-settings-numeric/index.js +0 -28
  445. package/components/display-settings-numeric-CurqaTi5.cjs +0 -190
  446. package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +0 -68
  447. package/components/display-settings-period-over-period/helpers/constants.d.ts +0 -44
  448. package/components/display-settings-period-over-period/index.cjs +0 -20
  449. package/components/display-settings-period-over-period/index.d.ts +0 -8
  450. package/components/display-settings-period-over-period/index.js +0 -28
  451. package/components/display-settings-period-over-period-DP2grX4n.cjs +0 -229
  452. package/components/es-BIaD4kOL.cjs +0 -20
  453. package/components/filter-expression-picker/filter-expression-picker.d.ts +0 -73
  454. package/components/filter-expression-picker/index.cjs +0 -20
  455. package/components/filter-expression-picker/index.d.ts +0 -7
  456. package/components/filter-expression-picker/index.js +0 -28
  457. package/components/filter-expression-picker-0eNf_L9I.cjs +0 -38
  458. package/components/filter-expression-picker-D_buTmzJ.js +0 -425
  459. package/components/filter-item/filter-item.d.ts +0 -84
  460. package/components/filter-item/index.cjs +0 -20
  461. package/components/filter-item/index.d.ts +0 -7
  462. package/components/filter-item/index.js +0 -28
  463. package/components/filter-item-DGnRmeaB.cjs +0 -58
  464. package/components/filter-item-VzEHDr04.js +0 -242
  465. package/components/filter-parameter-picker/filter-parameter-picker.d.ts +0 -25
  466. package/components/filter-parameter-picker/index.cjs +0 -22
  467. package/components/filter-parameter-picker/index.d.ts +0 -7
  468. package/components/filter-parameter-picker/index.js +0 -58
  469. package/components/filter-value-picker/filter-value-picker.d.ts +0 -65
  470. package/components/filter-value-picker/index.cjs +0 -20
  471. package/components/filter-value-picker/index.d.ts +0 -7
  472. package/components/filter-value-picker/index.js +0 -28
  473. package/components/filter-value-picker-C1lDTmKM.cjs +0 -60
  474. package/components/filter-value-picker-CIblY-PW.js +0 -151
  475. package/components/filter-value-picker-datetime/filter-value-picker-datetime.d.ts +0 -42
  476. package/components/filter-value-picker-datetime/index.cjs +0 -20
  477. package/components/filter-value-picker-datetime/index.d.ts +0 -7
  478. package/components/filter-value-picker-datetime/index.js +0 -28
  479. package/components/filter-value-picker-datetime-DQpEf_tv.js +0 -139
  480. package/components/filter-value-picker-datetime-dCo1_pma.cjs +0 -42
  481. package/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.d.ts +0 -81
  482. package/components/filter-value-picker-hierarchy/index.cjs +0 -20
  483. package/components/filter-value-picker-hierarchy/index.d.ts +0 -7
  484. package/components/filter-value-picker-hierarchy/index.js +0 -28
  485. package/components/filter-value-picker-hierarchy-DaZlasgM.cjs +0 -47
  486. package/components/filter-value-picker-hierarchy-DzHUrpyk.js +0 -232
  487. package/components/filter-value-picker-numeric/filter-value-picker-numeric.d.ts +0 -82
  488. package/components/filter-value-picker-numeric/index.cjs +0 -20
  489. package/components/filter-value-picker-numeric/index.d.ts +0 -7
  490. package/components/filter-value-picker-numeric/index.js +0 -28
  491. package/components/filter-value-picker-numeric-BU975w8c.js +0 -219
  492. package/components/filter-value-picker-numeric-D-dUSGAP.cjs +0 -48
  493. package/components/filters-BgTnxSKg.js +0 -400
  494. package/components/filters-Cx1S1-vx.cjs +0 -150
  495. package/components/formatter-8m-wrIM-.cjs +0 -20
  496. package/components/formula-D7E8UieE.cjs +0 -45
  497. package/components/formula-codemirror/formula-codemirror.d.ts +0 -79
  498. package/components/formula-codemirror/index.d.ts +0 -7
  499. package/components/formula-codemirror/pills/formula-aggregation/formula-aggregation.d.ts +0 -125
  500. package/components/formula-codemirror/pills/formula-aggregation/index.d.ts +0 -7
  501. package/components/formula-codemirror/pills/formula-empty-argument-pill/formula-empty-argument-pill.d.ts +0 -28
  502. package/components/formula-codemirror/pills/formula-empty-argument-pill/index.d.ts +0 -7
  503. package/components/formula-codemirror/pills/formula-include-exclude-panel.d.ts +0 -38
  504. package/components/formula-display-store-DjjsQ5mW.cjs +0 -20
  505. package/components/formula-draggable-field/formula-draggable-field.d.ts +0 -53
  506. package/components/formula-draggable-field/index.d.ts +0 -8
  507. package/components/formula-draggable-field/types.d.ts +0 -24
  508. package/components/formula-editor-4PoZ3BlC.cjs +0 -218
  509. package/components/formula-field/formula-field.d.ts +0 -20
  510. package/components/formula-field/index.cjs +0 -20
  511. package/components/formula-field/index.d.ts +0 -7
  512. package/components/formula-field/index.js +0 -28
  513. package/components/formula-field-DXdxspyY.js +0 -40
  514. package/components/formula-field-DkKXMIMg.cjs +0 -20
  515. package/components/formula-input-base-Bz_XVZcs.cjs +0 -49
  516. package/components/formula-input-base-Dok5ujvH.js +0 -236
  517. package/components/fr-CHG2Tcby.cjs +0 -20
  518. package/components/get-dataset-name-Dwuh7DWE.cjs +0 -20
  519. package/components/get-dataset-name-SfDNjsuR.js +0 -27
  520. package/components/groupings-BNrLlXIB.cjs +0 -20
  521. package/components/groupings-okwLJKoG.js +0 -52
  522. package/components/interactive-viz-item/helpers/chart-helpers.d.ts +0 -7
  523. package/components/interactive-viz-item/index.cjs +0 -20
  524. package/components/interactive-viz-item/index.d.ts +0 -10
  525. package/components/interactive-viz-item/index.js +0 -28
  526. package/components/interactive-viz-item/interactive-viz-item.d.ts +0 -96
  527. package/components/interactive-viz-item/types.d.ts +0 -117
  528. package/components/interactive-viz-item-63pap_oz.cjs +0 -247
  529. package/components/interactive-viz-item-QVji6wbp.js +0 -693
  530. package/components/item-menu/item-list/item-list.d.ts +0 -37
  531. package/components/item-option-action-button-group-jPUDKP3M.cjs +0 -53
  532. package/components/item-option-base/item-option-base.d.ts +0 -23
  533. package/components/item-option-base-Bk9L8Ie7.cjs +0 -56
  534. package/components/item-option-color-palette-picker-kch0Ep_5.cjs +0 -40
  535. package/components/item-option-color-range-Cj6sZ72F.cjs +0 -98
  536. package/components/item-option-iQM2pOGK.cjs +0 -252
  537. package/components/item-option-position-picker-Csc4Y6dN.cjs +0 -32
  538. package/components/item-option-positions-number-field-DBV6Yekk.cjs +0 -49
  539. package/components/item-slot-drop-D8KI2kny.cjs +0 -91
  540. package/components/item-slot-drop-panel-Crw-ktDj.cjs +0 -57
  541. package/components/item-slot-picker-BgQAviso.cjs +0 -158
  542. package/components/item-slot-picker-panel-C26kZ4zE.cjs +0 -81
  543. package/components/load-data-fields-for-datasets-BVGaku2J.cjs +0 -20
  544. package/components/load-data-fields-for-datasets-DeXLqWt4.js +0 -42
  545. package/components/localized-mixin-BYWQe1fg.js +0 -45
  546. package/components/localized-mixin-DrK3QZNa.cjs +0 -20
  547. package/components/nl-PxN5EqzT.cjs +0 -20
  548. package/components/period-over-period-condition.const-BZ7j5Z5t.js +0 -29
  549. package/components/period-over-period-condition.const-C1NZ9Bkp.cjs +0 -20
  550. package/components/slot-menu/index.cjs +0 -20
  551. package/components/slot-menu/index.d.ts +0 -10
  552. package/components/slot-menu/index.js +0 -28
  553. package/components/slot-menu/slot-menu.d.ts +0 -143
  554. package/components/slot-menu/types.d.ts +0 -24
  555. package/components/slot-menu-BBnibMJU.cjs +0 -64
  556. package/components/slot-menu-list/index.cjs +0 -20
  557. package/components/slot-menu-list/index.d.ts +0 -8
  558. package/components/slot-menu-list/index.js +0 -28
  559. package/components/slot-menu-list/slot-menu-list.d.ts +0 -42
  560. package/components/slot-menu-list-D193fsQX.cjs +0 -38
  561. package/components/slot-menu-list-gKDiWsHB.js +0 -325
  562. package/components/slot-menu-w7sla2N0.js +0 -400
  563. package/components/slots-config-DIBoffEb.js +0 -77
  564. package/components/slots-config-YdyClHLc.cjs +0 -20
  565. package/components/utils-CJf8VNzX.cjs +0 -20
  566. package/components/utils-Ci1YA9yB.js +0 -352
  567. package/components/viz-item-menu/index.cjs +0 -20
  568. package/components/viz-item-menu/index.d.ts +0 -8
  569. package/components/viz-item-menu/index.js +0 -28
  570. package/components/viz-item-menu/types.d.ts +0 -9
  571. package/components/viz-item-menu/viz-item-menu.d.ts +0 -75
  572. package/components/viz-item-menu-B4BJBNEq.js +0 -170
  573. package/components/viz-item-menu-DD8ndROu.cjs +0 -55
  574. package/react/components/ai-chat/empty-state/index.ts +0 -1
  575. package/react/components/ai-chat/empty-state/types.ts +0 -16
  576. package/react/components/ai-chat/stream/index.ts +0 -1
  577. package/react/components/ai-chat/stream/types.ts +0 -60
  578. package/react/components/ai-chat.component.ts +0 -42
  579. package/react/components/ai-interaction-textarea/index.ts +0 -1
  580. package/react/components/ai-interaction-textarea/types.ts +0 -6
  581. package/react/components/ai-interaction-textarea.component.ts +0 -30
  582. package/react/components/data-field-level.component.ts +0 -30
  583. package/react/components/data-fields-select/index.ts +0 -1
  584. package/react/components/data-fields-select/types.ts +0 -5
  585. package/react/components/data-fields-select.component.ts +0 -27
  586. package/react/components/dataset-icon/index.ts +0 -1
  587. package/react/components/dataset-icon/types.ts +0 -8
  588. package/react/components/dataset-icon.component.ts +0 -22
  589. package/react/components/dataset-selector-list.component.ts +0 -27
  590. package/react/components/dataset-selector-row.component.ts +0 -30
  591. package/react/components/display-settings/index.ts +0 -1
  592. package/react/components/display-settings/types.ts +0 -12
  593. package/react/components/display-settings-binning.component.ts +0 -27
  594. package/react/components/display-settings-datetime.component.ts +0 -27
  595. package/react/components/display-settings-grand-totals.component.ts +0 -27
  596. package/react/components/display-settings-numeric.component.ts +0 -27
  597. package/react/components/display-settings-period-over-period.component.ts +0 -27
  598. package/react/components/display-settings.component.ts +0 -33
  599. package/react/components/filter-expression-picker.component.ts +0 -27
  600. package/react/components/filter-item.component.ts +0 -27
  601. package/react/components/filter-parameter-picker.component.ts +0 -22
  602. package/react/components/filter-value-picker-datetime.component.ts +0 -27
  603. package/react/components/filter-value-picker-hierarchy.component.ts +0 -27
  604. package/react/components/filter-value-picker-numeric.component.ts +0 -27
  605. package/react/components/filter-value-picker.component.ts +0 -27
  606. package/react/components/formula-draggable-field/index.ts +0 -1
  607. package/react/components/formula-draggable-field/types.ts +0 -26
  608. package/react/components/formula-field.component.ts +0 -30
  609. package/react/components/interactive-viz-item/index.ts +0 -1
  610. package/react/components/interactive-viz-item/types.ts +0 -122
  611. package/react/components/interactive-viz-item.component.ts +0 -33
  612. package/react/components/slot-menu/index.ts +0 -1
  613. package/react/components/slot-menu/types.ts +0 -29
  614. package/react/components/slot-menu-list.component.ts +0 -27
  615. package/react/components/slot-menu.component.ts +0 -42
  616. package/react/components/viz-item-menu/index.ts +0 -1
  617. package/react/components/viz-item-menu/types.ts +0 -11
  618. package/react/components/viz-item-menu.component.ts +0 -33
  619. package/react/esm/components/ai-chat/empty-state/index.d.ts +0 -1
  620. package/react/esm/components/ai-chat/empty-state/index.js +0 -1
  621. package/react/esm/components/ai-chat/empty-state/types.d.ts +0 -14
  622. package/react/esm/components/ai-chat/stream/index.d.ts +0 -1
  623. package/react/esm/components/ai-chat/stream/index.js +0 -1
  624. package/react/esm/components/ai-chat/stream/types.d.ts +0 -55
  625. package/react/esm/components/ai-chat.component.d.ts +0 -22
  626. package/react/esm/components/ai-chat.component.js +0 -27
  627. package/react/esm/components/ai-interaction-textarea/index.d.ts +0 -1
  628. package/react/esm/components/ai-interaction-textarea/index.js +0 -1
  629. package/react/esm/components/ai-interaction-textarea/types.d.ts +0 -5
  630. package/react/esm/components/ai-interaction-textarea.component.d.ts +0 -14
  631. package/react/esm/components/ai-interaction-textarea.component.js +0 -19
  632. package/react/esm/components/data-field-level.component.d.ts +0 -14
  633. package/react/esm/components/data-field-level.component.js +0 -19
  634. package/react/esm/components/data-fields-select/index.d.ts +0 -1
  635. package/react/esm/components/data-fields-select/index.js +0 -1
  636. package/react/esm/components/data-fields-select/types.d.ts +0 -4
  637. package/react/esm/components/data-fields-select.component.d.ts +0 -12
  638. package/react/esm/components/data-fields-select.component.js +0 -17
  639. package/react/esm/components/dataset-icon/index.d.ts +0 -1
  640. package/react/esm/components/dataset-icon/index.js +0 -1
  641. package/react/esm/components/dataset-icon/types.d.ts +0 -11
  642. package/react/esm/components/dataset-icon/types.js +0 -1
  643. package/react/esm/components/dataset-icon.component.d.ts +0 -8
  644. package/react/esm/components/dataset-icon.component.js +0 -13
  645. package/react/esm/components/dataset-selector-list.component.d.ts +0 -12
  646. package/react/esm/components/dataset-selector-list.component.js +0 -17
  647. package/react/esm/components/dataset-selector-row.component.d.ts +0 -14
  648. package/react/esm/components/dataset-selector-row.component.js +0 -19
  649. package/react/esm/components/display-settings/index.d.ts +0 -1
  650. package/react/esm/components/display-settings/index.js +0 -1
  651. package/react/esm/components/display-settings/types.d.ts +0 -9
  652. package/react/esm/components/display-settings/types.js +0 -1
  653. package/react/esm/components/display-settings-binning.component.d.ts +0 -12
  654. package/react/esm/components/display-settings-binning.component.js +0 -17
  655. package/react/esm/components/display-settings-datetime.component.d.ts +0 -12
  656. package/react/esm/components/display-settings-datetime.component.js +0 -17
  657. package/react/esm/components/display-settings-grand-totals.component.d.ts +0 -12
  658. package/react/esm/components/display-settings-grand-totals.component.js +0 -17
  659. package/react/esm/components/display-settings-numeric.component.d.ts +0 -12
  660. package/react/esm/components/display-settings-numeric.component.js +0 -17
  661. package/react/esm/components/display-settings-period-over-period.component.d.ts +0 -12
  662. package/react/esm/components/display-settings-period-over-period.component.js +0 -17
  663. package/react/esm/components/display-settings.component.d.ts +0 -16
  664. package/react/esm/components/display-settings.component.js +0 -21
  665. package/react/esm/components/filter-expression-picker.component.d.ts +0 -12
  666. package/react/esm/components/filter-expression-picker.component.js +0 -17
  667. package/react/esm/components/filter-item.component.d.ts +0 -12
  668. package/react/esm/components/filter-item.component.js +0 -17
  669. package/react/esm/components/filter-parameter-picker.component.d.ts +0 -8
  670. package/react/esm/components/filter-parameter-picker.component.js +0 -13
  671. package/react/esm/components/filter-value-picker-datetime.component.d.ts +0 -12
  672. package/react/esm/components/filter-value-picker-datetime.component.js +0 -17
  673. package/react/esm/components/filter-value-picker-hierarchy.component.d.ts +0 -12
  674. package/react/esm/components/filter-value-picker-hierarchy.component.js +0 -17
  675. package/react/esm/components/filter-value-picker-numeric.component.d.ts +0 -12
  676. package/react/esm/components/filter-value-picker-numeric.component.js +0 -17
  677. package/react/esm/components/filter-value-picker.component.d.ts +0 -12
  678. package/react/esm/components/filter-value-picker.component.js +0 -17
  679. package/react/esm/components/formula-draggable-field/index.d.ts +0 -1
  680. package/react/esm/components/formula-draggable-field/index.js +0 -1
  681. package/react/esm/components/formula-draggable-field/types.d.ts +0 -24
  682. package/react/esm/components/formula-draggable-field/types.js +0 -1
  683. package/react/esm/components/formula-field.component.d.ts +0 -14
  684. package/react/esm/components/formula-field.component.js +0 -19
  685. package/react/esm/components/interactive-viz-item/index.d.ts +0 -1
  686. package/react/esm/components/interactive-viz-item/index.js +0 -1
  687. package/react/esm/components/interactive-viz-item/types.d.ts +0 -117
  688. package/react/esm/components/interactive-viz-item/types.js +0 -16
  689. package/react/esm/components/interactive-viz-item.component.d.ts +0 -16
  690. package/react/esm/components/interactive-viz-item.component.js +0 -21
  691. package/react/esm/components/slot-menu/index.d.ts +0 -1
  692. package/react/esm/components/slot-menu/index.js +0 -1
  693. package/react/esm/components/slot-menu/types.d.ts +0 -24
  694. package/react/esm/components/slot-menu/types.js +0 -1
  695. package/react/esm/components/slot-menu-list.component.d.ts +0 -12
  696. package/react/esm/components/slot-menu-list.component.js +0 -17
  697. package/react/esm/components/slot-menu.component.d.ts +0 -22
  698. package/react/esm/components/slot-menu.component.js +0 -27
  699. package/react/esm/components/viz-item-menu/index.d.ts +0 -1
  700. package/react/esm/components/viz-item-menu/index.js +0 -1
  701. package/react/esm/components/viz-item-menu/types.d.ts +0 -9
  702. package/react/esm/components/viz-item-menu/types.js +0 -1
  703. package/react/esm/components/viz-item-menu.component.d.ts +0 -16
  704. package/react/esm/components/viz-item-menu.component.js +0 -21
  705. package/storybook/inject-global-vars.d.ts +0 -1
  706. package/storybook/register-components.d.ts +0 -51
  707. package/types/ai-chat.types.d.ts +0 -63
  708. package/types/data-field-events.types.d.ts +0 -7
  709. /package/react/{esm/components/ai-chat/empty-state/types.js → utils/formula/config/tests/build-datasets.test.d.ts} +0 -0
  710. /package/react/{esm/components/ai-chat/stream/types.js → utils/slot-content/tests/ad-hoc-slot-content.test.d.ts} +0 -0
  711. /package/{react/esm/components/ai-interaction-textarea/types.js → utils/formula/config/tests/build-datasets.test.d.ts} +0 -0
  712. /package/{react/esm/components/data-fields-select/types.js → utils/slot-content/tests/ad-hoc-slot-content.test.d.ts} +0 -0
@@ -1,3715 +0,0 @@
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-DYkpEuMf.js";
21
- import { t } from "./decorate-CaYbmmmm.js";
22
- import "./ai-interaction-textarea-DSrZkuh9.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
- nn(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), wt = !0, Tt = M, Et = N;
745
- }, t.clearConfig = function() {
746
- H = null, wt = !1, Tt = null, Et = null, m = le, _ = "";
747
- }, t.isValidAttribute = function(e, t, n) {
748
- return H || nn({}), gn(V(e), V(t), n);
749
- }, t.addHook = function(e, t) {
750
- typeof t == "function" && y(O, e) && me(O[e], t);
751
- }, t.removeHook = function(e, t) {
752
- if (y(O, e)) {
753
- if (t !== void 0) {
754
- let n = fe(O[e], t);
755
- return n === -1 ? void 0 : he(O[e], n, 1)[0];
756
- }
757
- return pe(O[e]);
758
- }
759
- }, t.removeHooks = function(e) {
760
- y(O, e) && (O[e] = []);
761
- }, t.removeAllHooks = function() {
762
- O = at();
763
- }, t;
764
- }
765
- var st = ot();
766
- //#endregion
767
- //#region node_modules/marked/lib/marked.esm.js
768
- function ct() {
769
- return {
770
- async: !1,
771
- breaks: !1,
772
- extensions: null,
773
- gfm: !0,
774
- hooks: null,
775
- pedantic: !1,
776
- renderer: null,
777
- silent: !1,
778
- tokenizer: null,
779
- walkTokens: null
780
- };
781
- }
782
- var D = ct();
783
- function O(e) {
784
- D = e;
785
- }
786
- var k = { exec: () => null };
787
- function lt(e) {
788
- let t = [];
789
- return (n) => {
790
- let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
791
- return i || (i = e(r), t[r] = i), i;
792
- };
793
- }
794
- function A(e, t = "") {
795
- let n = typeof e == "string" ? e : e.source, r = {
796
- replace: (e, t) => {
797
- let i = typeof t == "string" ? t : t.source;
798
- return i = i.replace(j.caret, "$1"), n = n.replace(e, i), r;
799
- },
800
- getRegex: () => new RegExp(n, t)
801
- };
802
- return r;
803
- }
804
- var ut = ((e = "") => {
805
- try {
806
- return !!RegExp("(?<=1)(?<!1)" + e);
807
- } catch {
808
- return !1;
809
- }
810
- })(), j = {
811
- codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
812
- outputLinkReplace: /\\([\[\]])/g,
813
- indentCodeCompensation: /^(\s+)(?:```)/,
814
- beginningSpace: /^\s+/,
815
- endingHash: /#$/,
816
- startingSpaceChar: /^ /,
817
- endingSpaceChar: / $/,
818
- nonSpaceChar: /[^ ]/,
819
- newLineCharGlobal: /\n/g,
820
- tabCharGlobal: /\t/g,
821
- multipleSpaceGlobal: /\s+/g,
822
- blankLine: /^[ \t]*$/,
823
- doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
824
- blockquoteStart: /^ {0,3}>/,
825
- blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
826
- blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
827
- listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
828
- listIsTask: /^\[[ xX]\] +\S/,
829
- listReplaceTask: /^\[[ xX]\] +/,
830
- listTaskCheckbox: /\[[ xX]\]/,
831
- anyLine: /\n.*\n/,
832
- hrefBrackets: /^<(.*)>$/,
833
- tableDelimiter: /[:|]/,
834
- tableAlignChars: /^\||\| *$/g,
835
- tableRowBlankLine: /\n[ \t]*$/,
836
- tableAlignRight: /^ *-+: *$/,
837
- tableAlignCenter: /^ *:-+: *$/,
838
- tableAlignLeft: /^ *:-+ *$/,
839
- startATag: /^<a /i,
840
- endATag: /^<\/a>/i,
841
- startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
842
- endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
843
- startAngleBracket: /^</,
844
- endAngleBracket: />$/,
845
- pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
846
- unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
847
- escapeTest: /[&<>"']/,
848
- escapeReplace: /[&<>"']/g,
849
- escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
850
- escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
851
- caret: /(^|[^\[])\^/g,
852
- percentDecode: /%25/g,
853
- findPipe: /\|/g,
854
- splitPipe: / \|/,
855
- slashPipe: /\\\|/g,
856
- carriageReturn: /\r\n|\r/g,
857
- spaceLine: /^ +$/gm,
858
- notSpaceStart: /^\S*/,
859
- endingNewline: /\n$/,
860
- listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
861
- nextBulletRegex: lt((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
862
- hrRegex: lt((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
863
- fencesBeginRegex: lt((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
864
- headingBeginRegex: lt((e) => RegExp(`^ {0,${e}}#`)),
865
- htmlBeginRegex: lt((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
866
- blockquoteBeginRegex: lt((e) => RegExp(`^ {0,${e}}>`))
867
- }, 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 = {
868
- blockquote: A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ct).getRegex(),
869
- code: ft,
870
- def: yt,
871
- fences: pt,
872
- heading: M,
873
- hr: mt,
874
- html: I,
875
- lheading: gt,
876
- list: bt,
877
- newline: dt,
878
- paragraph: Ct,
879
- table: k,
880
- text: vt
881
- }, 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 = {
882
- ...L,
883
- lheading: P,
884
- table: wt,
885
- 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()
886
- }, Et = {
887
- ...L,
888
- 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(),
889
- def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
890
- heading: /^(#{1,6})(.*)(?:\n+|$)/,
891
- fences: k,
892
- lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
893
- 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()
894
- }, 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 = {
895
- _backpedal: k,
896
- anyPunctuation: Gt,
897
- autolink: Kt,
898
- blockSkip: It,
899
- br: kt,
900
- code: Ot,
901
- del: k,
902
- delLDelim: k,
903
- delRDelim: k,
904
- emStrongLDelim: Rt,
905
- emStrongRDelimAst: Vt,
906
- emStrongRDelimUnd: B,
907
- escape: Dt,
908
- link: Xt,
909
- nolink: Qt,
910
- punctuation: Nt,
911
- reflink: Zt,
912
- reflinkSearch: $t,
913
- tag: Jt,
914
- text: At,
915
- url: k
916
- }, en = {
917
- ...H,
918
- link: A(/^!?\[(label)\]\((.*?)\)/).replace("label", Yt).getRegex(),
919
- reflink: A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Yt).getRegex()
920
- }, tn = {
921
- ...H,
922
- emStrongRDelimAst: Ht,
923
- emStrongLDelim: zt,
924
- delLDelim: Ut,
925
- delRDelim: Wt,
926
- 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(),
927
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
928
- del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
929
- 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()
930
- }, nn = {
931
- ...tn,
932
- br: A(kt).replace("{2,}", "*").getRegex(),
933
- text: A(tn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
934
- }, rn = {
935
- normal: L,
936
- gfm: Tt,
937
- pedantic: Et
938
- }, an = {
939
- normal: H,
940
- gfm: tn,
941
- breaks: nn,
942
- pedantic: en
943
- }, on = {
944
- "&": "&amp;",
945
- "<": "&lt;",
946
- ">": "&gt;",
947
- "\"": "&quot;",
948
- "'": "&#39;"
949
- }, sn = (e) => on[e];
950
- function U(e, t) {
951
- if (t) {
952
- if (j.escapeTest.test(e)) return e.replace(j.escapeReplace, sn);
953
- } else if (j.escapeTestNoEncode.test(e)) return e.replace(j.escapeReplaceNoEncode, sn);
954
- return e;
955
- }
956
- function cn(e) {
957
- try {
958
- e = encodeURI(e).replace(j.percentDecode, "%");
959
- } catch {
960
- return null;
961
- }
962
- return e;
963
- }
964
- function W(e, t) {
965
- let n = e.replace(j.findPipe, (e, t, n) => {
966
- let r = !1, i = t;
967
- for (; --i >= 0 && n[i] === "\\";) r = !r;
968
- return r ? "|" : " |";
969
- }).split(j.splitPipe), r = 0;
970
- if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
971
- else for (; n.length < t;) n.push("");
972
- for (; r < n.length; r++) n[r] = n[r].trim().replace(j.slashPipe, "|");
973
- return n;
974
- }
975
- function G(e, t, n) {
976
- let r = e.length;
977
- if (r === 0) return "";
978
- let i = 0;
979
- for (; i < r;) {
980
- let a = e.charAt(r - i - 1);
981
- if (a === t && !n) i++;
982
- else if (a !== t && n) i++;
983
- else break;
984
- }
985
- return e.slice(0, r - i);
986
- }
987
- function K(e) {
988
- let t = e.split("\n"), n = t.length - 1;
989
- for (; n >= 0 && j.blankLine.test(t[n]);) n--;
990
- return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
991
- }
992
- function ln(e, t) {
993
- if (e.indexOf(t[1]) === -1) return -1;
994
- let n = 0;
995
- for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
996
- else if (e[r] === t[0]) n++;
997
- else if (e[r] === t[1] && (n--, n < 0)) return r;
998
- return n > 0 ? -2 : -1;
999
- }
1000
- function un(e, t = 0) {
1001
- let n = t, r = "";
1002
- for (let t of e) if (t === " ") {
1003
- let e = 4 - n % 4;
1004
- r += " ".repeat(e), n += e;
1005
- } else r += t, n++;
1006
- return r;
1007
- }
1008
- function dn(e, t, n, r, i) {
1009
- let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
1010
- r.state.inLink = !0;
1011
- let c = {
1012
- type: e[0].charAt(0) === "!" ? "image" : "link",
1013
- raw: n,
1014
- href: a,
1015
- title: o,
1016
- text: s,
1017
- tokens: r.inlineTokens(s)
1018
- };
1019
- return r.state.inLink = !1, c;
1020
- }
1021
- function fn(e, t, n) {
1022
- let r = e.match(n.other.indentCodeCompensation);
1023
- if (r === null) return t;
1024
- let i = r[1];
1025
- return t.split("\n").map((e) => {
1026
- let t = e.match(n.other.beginningSpace);
1027
- if (t === null) return e;
1028
- let [r] = t;
1029
- return r.length >= i.length ? e.slice(i.length) : e;
1030
- }).join("\n");
1031
- }
1032
- var pn = class {
1033
- options;
1034
- rules;
1035
- lexer;
1036
- constructor(e) {
1037
- this.options = e || D;
1038
- }
1039
- space(e) {
1040
- let t = this.rules.block.newline.exec(e);
1041
- if (t && t[0].length > 0) return {
1042
- type: "space",
1043
- raw: t[0]
1044
- };
1045
- }
1046
- code(e) {
1047
- let t = this.rules.block.code.exec(e);
1048
- if (t) {
1049
- let e = this.options.pedantic ? t[0] : K(t[0]);
1050
- return {
1051
- type: "code",
1052
- raw: e,
1053
- codeBlockStyle: "indented",
1054
- text: e.replace(this.rules.other.codeRemoveIndent, "")
1055
- };
1056
- }
1057
- }
1058
- fences(e) {
1059
- let t = this.rules.block.fences.exec(e);
1060
- if (t) {
1061
- let e = t[0], n = fn(e, t[3] || "", this.rules);
1062
- return {
1063
- type: "code",
1064
- raw: e,
1065
- lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
1066
- text: n
1067
- };
1068
- }
1069
- }
1070
- heading(e) {
1071
- let t = this.rules.block.heading.exec(e);
1072
- if (t) {
1073
- let e = t[2].trim();
1074
- if (this.rules.other.endingHash.test(e)) {
1075
- let t = G(e, "#");
1076
- (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
1077
- }
1078
- return {
1079
- type: "heading",
1080
- raw: G(t[0], "\n"),
1081
- depth: t[1].length,
1082
- text: e,
1083
- tokens: this.lexer.inline(e)
1084
- };
1085
- }
1086
- }
1087
- hr(e) {
1088
- let t = this.rules.block.hr.exec(e);
1089
- if (t) return {
1090
- type: "hr",
1091
- raw: G(t[0], "\n")
1092
- };
1093
- }
1094
- blockquote(e) {
1095
- let t = this.rules.block.blockquote.exec(e);
1096
- if (t) {
1097
- let e = G(t[0], "\n").split("\n"), n = "", r = "", i = [];
1098
- for (; e.length > 0;) {
1099
- let t = !1, a = [], o;
1100
- for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
1101
- else if (!t) a.push(e[o]);
1102
- else break;
1103
- e = e.slice(o);
1104
- let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
1105
- n = n ? `${n}
1106
- ${s}` : s, r = r ? `${r}
1107
- ${c}` : c;
1108
- let l = this.lexer.state.top;
1109
- if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
1110
- let u = i.at(-1);
1111
- if (u?.type === "code") break;
1112
- if (u?.type === "blockquote") {
1113
- let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
1114
- 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;
1115
- break;
1116
- } else if (u?.type === "list") {
1117
- let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
1118
- 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");
1119
- continue;
1120
- }
1121
- }
1122
- return {
1123
- type: "blockquote",
1124
- raw: n,
1125
- tokens: i,
1126
- text: r
1127
- };
1128
- }
1129
- }
1130
- list(e) {
1131
- let t = this.rules.block.list.exec(e);
1132
- if (t) {
1133
- let n = t[1].trim(), r = n.length > 1, i = {
1134
- type: "list",
1135
- raw: "",
1136
- ordered: r,
1137
- start: r ? +n.slice(0, -1) : "",
1138
- loose: !1,
1139
- items: []
1140
- };
1141
- n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
1142
- let a = this.rules.other.listItemRegex(n), o = !1;
1143
- for (; e;) {
1144
- let n = !1, r = "", s = "";
1145
- if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
1146
- r = t[0], e = e.substring(r.length);
1147
- let c = un(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
1148
- 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) {
1149
- 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);
1150
- for (; e;) {
1151
- let te = e.split("\n", 1)[0], ne;
1152
- 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;
1153
- if (ne.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + ne.slice(d);
1154
- else {
1155
- if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
1156
- s += "\n" + l;
1157
- }
1158
- u = !l.trim(), r += te + "\n", e = e.substring(te.length + 1), c = ne.slice(d);
1159
- }
1160
- }
1161
- i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
1162
- type: "list_item",
1163
- raw: r,
1164
- task: !!this.options.gfm && this.rules.other.listIsTask.test(s),
1165
- loose: !1,
1166
- text: s,
1167
- tokens: []
1168
- }), i.raw += r;
1169
- }
1170
- let s = i.items.at(-1);
1171
- if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
1172
- else return;
1173
- i.raw = i.raw.trimEnd();
1174
- for (let e of i.items) {
1175
- this.lexer.state.top = !1, e.tokens = this.lexer.blockTokens(e.text, []);
1176
- let t = e.tokens[0];
1177
- if (e.task && (t?.type === "text" || t?.type === "paragraph")) {
1178
- 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, "");
1179
- for (let e = this.lexer.inlineQueue.length - 1; e >= 0; e--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)) {
1180
- this.lexer.inlineQueue[e].src = this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask, "");
1181
- break;
1182
- }
1183
- let n = this.rules.other.listTaskCheckbox.exec(e.raw);
1184
- if (n) {
1185
- let t = {
1186
- type: "checkbox",
1187
- raw: n[0] + " ",
1188
- checked: n[0] !== "[ ]"
1189
- };
1190
- 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({
1191
- type: "paragraph",
1192
- raw: t.raw,
1193
- text: t.raw,
1194
- tokens: [t]
1195
- }) : e.tokens.unshift(t);
1196
- }
1197
- } else e.task &&= !1;
1198
- if (!i.loose) {
1199
- let t = e.tokens.filter((e) => e.type === "space");
1200
- i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
1201
- }
1202
- }
1203
- if (i.loose) for (let e of i.items) {
1204
- e.loose = !0;
1205
- for (let t of e.tokens) t.type === "text" && (t.type = "paragraph");
1206
- }
1207
- return i;
1208
- }
1209
- }
1210
- html(e) {
1211
- let t = this.rules.block.html.exec(e);
1212
- if (t) {
1213
- let e = K(t[0]);
1214
- return {
1215
- type: "html",
1216
- block: !0,
1217
- raw: e,
1218
- pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
1219
- text: e
1220
- };
1221
- }
1222
- }
1223
- def(e) {
1224
- let t = this.rules.block.def.exec(e);
1225
- if (t) {
1226
- 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];
1227
- return {
1228
- type: "def",
1229
- tag: e,
1230
- raw: G(t[0], "\n"),
1231
- href: n,
1232
- title: r
1233
- };
1234
- }
1235
- }
1236
- table(e) {
1237
- let t = this.rules.block.table.exec(e);
1238
- if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1239
- 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 = {
1240
- type: "table",
1241
- raw: G(t[0], "\n"),
1242
- header: [],
1243
- align: [],
1244
- rows: []
1245
- };
1246
- if (n.length === r.length) {
1247
- 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);
1248
- for (let e = 0; e < n.length; e++) a.header.push({
1249
- text: n[e],
1250
- tokens: this.lexer.inline(n[e]),
1251
- header: !0,
1252
- align: a.align[e]
1253
- });
1254
- for (let e of i) a.rows.push(W(e, a.header.length).map((e, t) => ({
1255
- text: e,
1256
- tokens: this.lexer.inline(e),
1257
- header: !1,
1258
- align: a.align[t]
1259
- })));
1260
- return a;
1261
- }
1262
- }
1263
- lheading(e) {
1264
- let t = this.rules.block.lheading.exec(e);
1265
- if (t) {
1266
- let e = t[1].trim();
1267
- return {
1268
- type: "heading",
1269
- raw: G(t[0], "\n"),
1270
- depth: t[2].charAt(0) === "=" ? 1 : 2,
1271
- text: e,
1272
- tokens: this.lexer.inline(e)
1273
- };
1274
- }
1275
- }
1276
- paragraph(e) {
1277
- let t = this.rules.block.paragraph.exec(e);
1278
- if (t) {
1279
- let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
1280
- return {
1281
- type: "paragraph",
1282
- raw: t[0],
1283
- text: e,
1284
- tokens: this.lexer.inline(e)
1285
- };
1286
- }
1287
- }
1288
- text(e) {
1289
- let t = this.rules.block.text.exec(e);
1290
- if (t) return {
1291
- type: "text",
1292
- raw: t[0],
1293
- text: t[0],
1294
- tokens: this.lexer.inline(t[0])
1295
- };
1296
- }
1297
- escape(e) {
1298
- let t = this.rules.inline.escape.exec(e);
1299
- if (t) return {
1300
- type: "escape",
1301
- raw: t[0],
1302
- text: t[1]
1303
- };
1304
- }
1305
- tag(e) {
1306
- let t = this.rules.inline.tag.exec(e);
1307
- 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), {
1308
- type: "html",
1309
- raw: t[0],
1310
- inLink: this.lexer.state.inLink,
1311
- inRawBlock: this.lexer.state.inRawBlock,
1312
- block: !1,
1313
- text: t[0]
1314
- };
1315
- }
1316
- link(e) {
1317
- let t = this.rules.inline.link.exec(e);
1318
- if (t) {
1319
- let e = t[2].trim();
1320
- if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
1321
- if (!this.rules.other.endAngleBracket.test(e)) return;
1322
- let t = G(e.slice(0, -1), "\\");
1323
- if ((e.length - t.length) % 2 == 0) return;
1324
- } else {
1325
- let e = ln(t[2], "()");
1326
- if (e === -2) return;
1327
- if (e > -1) {
1328
- let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
1329
- t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
1330
- }
1331
- }
1332
- let n = t[2], r = "";
1333
- if (this.options.pedantic) {
1334
- let e = this.rules.other.pedanticHrefTitle.exec(n);
1335
- e && (n = e[1], r = e[3]);
1336
- } else r = t[3] ? t[3].slice(1, -1) : "";
1337
- 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, {
1338
- href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
1339
- title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
1340
- }, t[0], this.lexer, this.rules);
1341
- }
1342
- }
1343
- reflink(e, t) {
1344
- let n;
1345
- if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1346
- let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
1347
- if (!e) {
1348
- let e = n[0].charAt(0);
1349
- return {
1350
- type: "text",
1351
- raw: e,
1352
- text: e
1353
- };
1354
- }
1355
- return dn(n, e, n[0], this.lexer, this.rules);
1356
- }
1357
- }
1358
- emStrong(e, t, n = "") {
1359
- let r = this.rules.inline.emStrongLDelim.exec(e);
1360
- 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))) {
1361
- let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1362
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) !== null;) {
1363
- if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
1364
- if (a = [...i].length, r[3] || r[4]) {
1365
- o += a;
1366
- continue;
1367
- } else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
1368
- s += a;
1369
- continue;
1370
- }
1371
- if (o -= a, o > 0) continue;
1372
- a = Math.min(a, a + o + s);
1373
- let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
1374
- if (Math.min(n, a) % 2) {
1375
- let e = c.slice(1, -1);
1376
- return {
1377
- type: "em",
1378
- raw: c,
1379
- text: e,
1380
- tokens: this.lexer.inlineTokens(e)
1381
- };
1382
- }
1383
- let l = c.slice(2, -2);
1384
- return {
1385
- type: "strong",
1386
- raw: c,
1387
- text: l,
1388
- tokens: this.lexer.inlineTokens(l)
1389
- };
1390
- }
1391
- }
1392
- }
1393
- codespan(e) {
1394
- let t = this.rules.inline.code.exec(e);
1395
- if (t) {
1396
- 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);
1397
- return n && r && (e = e.substring(1, e.length - 1)), {
1398
- type: "codespan",
1399
- raw: t[0],
1400
- text: e
1401
- };
1402
- }
1403
- }
1404
- br(e) {
1405
- let t = this.rules.inline.br.exec(e);
1406
- if (t) return {
1407
- type: "br",
1408
- raw: t[0]
1409
- };
1410
- }
1411
- del(e, t, n = "") {
1412
- let r = this.rules.inline.delLDelim.exec(e);
1413
- if (r && (!r[1] || !n || this.rules.inline.punctuation.exec(n))) {
1414
- let n = [...r[0]].length - 1, i, a, o = n, s = this.rules.inline.delRDelim;
1415
- for (s.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = s.exec(t)) !== null;) {
1416
- if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i || (a = [...i].length, a !== n)) continue;
1417
- if (r[3] || r[4]) {
1418
- o += a;
1419
- continue;
1420
- }
1421
- if (o -= a, o > 0) continue;
1422
- a = Math.min(a, a + o);
1423
- let t = [...r[0]][0].length, s = e.slice(0, n + r.index + t + a), c = s.slice(n, -n);
1424
- return {
1425
- type: "del",
1426
- raw: s,
1427
- text: c,
1428
- tokens: this.lexer.inlineTokens(c)
1429
- };
1430
- }
1431
- }
1432
- }
1433
- autolink(e) {
1434
- let t = this.rules.inline.autolink.exec(e);
1435
- if (t) {
1436
- let e, n;
1437
- return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
1438
- type: "link",
1439
- raw: t[0],
1440
- text: e,
1441
- href: n,
1442
- tokens: [{
1443
- type: "text",
1444
- raw: e,
1445
- text: e
1446
- }]
1447
- };
1448
- }
1449
- }
1450
- url(e) {
1451
- let t;
1452
- if (t = this.rules.inline.url.exec(e)) {
1453
- let e, n;
1454
- if (t[2] === "@") e = t[0], n = "mailto:" + e;
1455
- else {
1456
- let r;
1457
- do
1458
- r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
1459
- while (r !== t[0]);
1460
- e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
1461
- }
1462
- return {
1463
- type: "link",
1464
- raw: t[0],
1465
- text: e,
1466
- href: n,
1467
- tokens: [{
1468
- type: "text",
1469
- raw: e,
1470
- text: e
1471
- }]
1472
- };
1473
- }
1474
- }
1475
- inlineText(e) {
1476
- let t = this.rules.inline.text.exec(e);
1477
- if (t) {
1478
- let e = this.lexer.state.inRawBlock;
1479
- return {
1480
- type: "text",
1481
- raw: t[0],
1482
- text: t[0],
1483
- escaped: e
1484
- };
1485
- }
1486
- }
1487
- }, q = class e {
1488
- tokens;
1489
- options;
1490
- state;
1491
- inlineQueue;
1492
- tokenizer;
1493
- constructor(e) {
1494
- 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 = {
1495
- inLink: !1,
1496
- inRawBlock: !1,
1497
- top: !0
1498
- };
1499
- let t = {
1500
- other: j,
1501
- block: rn.normal,
1502
- inline: an.normal
1503
- };
1504
- 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;
1505
- }
1506
- static get rules() {
1507
- return {
1508
- block: rn,
1509
- inline: an
1510
- };
1511
- }
1512
- static lex(t, n) {
1513
- return new e(n).lex(t);
1514
- }
1515
- static lexInline(t, n) {
1516
- return new e(n).inlineTokens(t);
1517
- }
1518
- lex(e) {
1519
- e = e.replace(j.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
1520
- for (let e = 0; e < this.inlineQueue.length; e++) {
1521
- let t = this.inlineQueue[e];
1522
- this.inlineTokens(t.src, t.tokens);
1523
- }
1524
- return this.inlineQueue = [], this.tokens;
1525
- }
1526
- blockTokens(e, t = [], n = !1) {
1527
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(j.tabCharGlobal, " ").replace(j.spaceLine, ""));
1528
- let r = Infinity;
1529
- for (; e;) {
1530
- if (e.length < r) r = e.length;
1531
- else {
1532
- this.infiniteLoopError(e.charCodeAt(0));
1533
- break;
1534
- }
1535
- let i;
1536
- 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;
1537
- if (i = this.tokenizer.space(e)) {
1538
- e = e.substring(i.raw.length);
1539
- let n = t.at(-1);
1540
- i.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(i);
1541
- continue;
1542
- }
1543
- if (i = this.tokenizer.code(e)) {
1544
- e = e.substring(i.raw.length);
1545
- let n = t.at(-1);
1546
- 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);
1547
- continue;
1548
- }
1549
- if (i = this.tokenizer.fences(e)) {
1550
- e = e.substring(i.raw.length), t.push(i);
1551
- continue;
1552
- }
1553
- if (i = this.tokenizer.heading(e)) {
1554
- e = e.substring(i.raw.length), t.push(i);
1555
- continue;
1556
- }
1557
- if (i = this.tokenizer.hr(e)) {
1558
- e = e.substring(i.raw.length), t.push(i);
1559
- continue;
1560
- }
1561
- if (i = this.tokenizer.blockquote(e)) {
1562
- e = e.substring(i.raw.length), t.push(i);
1563
- continue;
1564
- }
1565
- if (i = this.tokenizer.list(e)) {
1566
- e = e.substring(i.raw.length), t.push(i);
1567
- continue;
1568
- }
1569
- if (i = this.tokenizer.html(e)) {
1570
- e = e.substring(i.raw.length), t.push(i);
1571
- continue;
1572
- }
1573
- if (i = this.tokenizer.def(e)) {
1574
- e = e.substring(i.raw.length);
1575
- let n = t.at(-1);
1576
- 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] = {
1577
- href: i.href,
1578
- title: i.title
1579
- }, t.push(i));
1580
- continue;
1581
- }
1582
- if (i = this.tokenizer.table(e)) {
1583
- e = e.substring(i.raw.length), t.push(i);
1584
- continue;
1585
- }
1586
- if (i = this.tokenizer.lheading(e)) {
1587
- e = e.substring(i.raw.length), t.push(i);
1588
- continue;
1589
- }
1590
- let a = e;
1591
- if (this.options.extensions?.startBlock) {
1592
- let t = Infinity, n = e.slice(1), r;
1593
- this.options.extensions.startBlock.forEach((e) => {
1594
- r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1595
- }), t < Infinity && t >= 0 && (a = e.substring(0, t + 1));
1596
- }
1597
- if (this.state.top && (i = this.tokenizer.paragraph(a))) {
1598
- let r = t.at(-1);
1599
- 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);
1600
- continue;
1601
- }
1602
- if (i = this.tokenizer.text(e)) {
1603
- e = e.substring(i.raw.length);
1604
- let n = t.at(-1);
1605
- 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);
1606
- continue;
1607
- }
1608
- if (e) {
1609
- this.infiniteLoopError(e.charCodeAt(0));
1610
- break;
1611
- }
1612
- }
1613
- return this.state.top = !0, t;
1614
- }
1615
- inline(e, t = []) {
1616
- return this.inlineQueue.push({
1617
- src: e,
1618
- tokens: t
1619
- }), t;
1620
- }
1621
- inlineTokens(e, t = []) {
1622
- this.tokenizer.lexer = this;
1623
- let n = e, r = null;
1624
- if (this.tokens.links) {
1625
- let e = Object.keys(this.tokens.links);
1626
- 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));
1627
- }
1628
- for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1629
- let i;
1630
- 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);
1631
- n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
1632
- let a = !1, o = "", s = Infinity;
1633
- for (; e;) {
1634
- if (e.length < s) s = e.length;
1635
- else {
1636
- this.infiniteLoopError(e.charCodeAt(0));
1637
- break;
1638
- }
1639
- a || (o = ""), a = !1;
1640
- let r;
1641
- 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;
1642
- if (r = this.tokenizer.escape(e)) {
1643
- e = e.substring(r.raw.length), t.push(r);
1644
- continue;
1645
- }
1646
- if (r = this.tokenizer.tag(e)) {
1647
- e = e.substring(r.raw.length), t.push(r);
1648
- continue;
1649
- }
1650
- if (r = this.tokenizer.link(e)) {
1651
- e = e.substring(r.raw.length), t.push(r);
1652
- continue;
1653
- }
1654
- if (r = this.tokenizer.reflink(e, this.tokens.links)) {
1655
- e = e.substring(r.raw.length);
1656
- let n = t.at(-1);
1657
- r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1658
- continue;
1659
- }
1660
- if (r = this.tokenizer.emStrong(e, n, o)) {
1661
- e = e.substring(r.raw.length), t.push(r);
1662
- continue;
1663
- }
1664
- if (r = this.tokenizer.codespan(e)) {
1665
- e = e.substring(r.raw.length), t.push(r);
1666
- continue;
1667
- }
1668
- if (r = this.tokenizer.br(e)) {
1669
- e = e.substring(r.raw.length), t.push(r);
1670
- continue;
1671
- }
1672
- if (r = this.tokenizer.del(e, n, o)) {
1673
- e = e.substring(r.raw.length), t.push(r);
1674
- continue;
1675
- }
1676
- if (r = this.tokenizer.autolink(e)) {
1677
- e = e.substring(r.raw.length), t.push(r);
1678
- continue;
1679
- }
1680
- if (!this.state.inLink && (r = this.tokenizer.url(e))) {
1681
- e = e.substring(r.raw.length), t.push(r);
1682
- continue;
1683
- }
1684
- let i = e;
1685
- if (this.options.extensions?.startInline) {
1686
- let t = Infinity, n = e.slice(1), r;
1687
- this.options.extensions.startInline.forEach((e) => {
1688
- r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1689
- }), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
1690
- }
1691
- if (r = this.tokenizer.inlineText(i)) {
1692
- e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (o = r.raw.slice(-1)), a = !0;
1693
- let n = t.at(-1);
1694
- n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1695
- continue;
1696
- }
1697
- if (e) {
1698
- this.infiniteLoopError(e.charCodeAt(0));
1699
- break;
1700
- }
1701
- }
1702
- return t;
1703
- }
1704
- infiniteLoopError(e) {
1705
- let t = "Infinite loop on byte: " + e;
1706
- if (this.options.silent) console.error(t);
1707
- else throw Error(t);
1708
- }
1709
- }, J = class {
1710
- options;
1711
- parser;
1712
- constructor(e) {
1713
- this.options = e || D;
1714
- }
1715
- space(e) {
1716
- return "";
1717
- }
1718
- code({ text: e, lang: t, escaped: n }) {
1719
- let r = (t || "").match(j.notSpaceStart)?.[0], i = e.replace(j.endingNewline, "") + "\n";
1720
- 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";
1721
- }
1722
- blockquote({ tokens: e }) {
1723
- return `<blockquote>
1724
- ${this.parser.parse(e)}</blockquote>
1725
- `;
1726
- }
1727
- html({ text: e }) {
1728
- return e;
1729
- }
1730
- def(e) {
1731
- return "";
1732
- }
1733
- heading({ tokens: e, depth: t }) {
1734
- return `<h${t}>${this.parser.parseInline(e)}</h${t}>
1735
- `;
1736
- }
1737
- hr(e) {
1738
- return "<hr>\n";
1739
- }
1740
- list(e) {
1741
- let t = e.ordered, n = e.start, r = "";
1742
- for (let t = 0; t < e.items.length; t++) {
1743
- let n = e.items[t];
1744
- r += this.listitem(n);
1745
- }
1746
- let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
1747
- return "<" + i + a + ">\n" + r + "</" + i + ">\n";
1748
- }
1749
- listitem(e) {
1750
- return `<li>${this.parser.parse(e.tokens)}</li>
1751
- `;
1752
- }
1753
- checkbox({ checked: e }) {
1754
- return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
1755
- }
1756
- paragraph({ tokens: e }) {
1757
- return `<p>${this.parser.parseInline(e)}</p>
1758
- `;
1759
- }
1760
- table(e) {
1761
- let t = "", n = "";
1762
- for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
1763
- t += this.tablerow({ text: n });
1764
- let r = "";
1765
- for (let t = 0; t < e.rows.length; t++) {
1766
- let i = e.rows[t];
1767
- n = "";
1768
- for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
1769
- r += this.tablerow({ text: n });
1770
- }
1771
- return r &&= `<tbody>${r}</tbody>`, "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
1772
- }
1773
- tablerow({ text: e }) {
1774
- return `<tr>
1775
- ${e}</tr>
1776
- `;
1777
- }
1778
- tablecell(e) {
1779
- let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1780
- return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1781
- `;
1782
- }
1783
- strong({ tokens: e }) {
1784
- return `<strong>${this.parser.parseInline(e)}</strong>`;
1785
- }
1786
- em({ tokens: e }) {
1787
- return `<em>${this.parser.parseInline(e)}</em>`;
1788
- }
1789
- codespan({ text: e }) {
1790
- return `<code>${U(e, !0)}</code>`;
1791
- }
1792
- br(e) {
1793
- return "<br>";
1794
- }
1795
- del({ tokens: e }) {
1796
- return `<del>${this.parser.parseInline(e)}</del>`;
1797
- }
1798
- link({ href: e, title: t, tokens: n }) {
1799
- let r = this.parser.parseInline(n), i = cn(e);
1800
- if (i === null) return r;
1801
- e = i;
1802
- let a = "<a href=\"" + e + "\"";
1803
- return t && (a += " title=\"" + U(t) + "\""), a += ">" + r + "</a>", a;
1804
- }
1805
- image({ href: e, title: t, text: n, tokens: r }) {
1806
- r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1807
- let i = cn(e);
1808
- if (i === null) return U(n);
1809
- e = i;
1810
- let a = `<img src="${e}" alt="${U(n)}"`;
1811
- return t && (a += ` title="${U(t)}"`), a += ">", a;
1812
- }
1813
- text(e) {
1814
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : U(e.text);
1815
- }
1816
- }, Y = class {
1817
- strong({ text: e }) {
1818
- return e;
1819
- }
1820
- em({ text: e }) {
1821
- return e;
1822
- }
1823
- codespan({ text: e }) {
1824
- return e;
1825
- }
1826
- del({ text: e }) {
1827
- return e;
1828
- }
1829
- html({ text: e }) {
1830
- return e;
1831
- }
1832
- text({ text: e }) {
1833
- return e;
1834
- }
1835
- link({ text: e }) {
1836
- return "" + e;
1837
- }
1838
- image({ text: e }) {
1839
- return "" + e;
1840
- }
1841
- br() {
1842
- return "";
1843
- }
1844
- checkbox({ raw: e }) {
1845
- return e;
1846
- }
1847
- }, X = class e {
1848
- options;
1849
- renderer;
1850
- textRenderer;
1851
- constructor(e) {
1852
- 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();
1853
- }
1854
- static parse(t, n) {
1855
- return new e(n).parse(t);
1856
- }
1857
- static parseInline(t, n) {
1858
- return new e(n).parseInline(t);
1859
- }
1860
- parse(e) {
1861
- this.renderer.parser = this;
1862
- let t = "";
1863
- for (let n = 0; n < e.length; n++) {
1864
- let r = e[n];
1865
- if (this.options.extensions?.renderers?.[r.type]) {
1866
- let e = r, n = this.options.extensions.renderers[e.type].call({ parser: this }, e);
1867
- if (n !== !1 || ![
1868
- "space",
1869
- "hr",
1870
- "heading",
1871
- "code",
1872
- "table",
1873
- "blockquote",
1874
- "list",
1875
- "html",
1876
- "def",
1877
- "paragraph",
1878
- "text"
1879
- ].includes(e.type)) {
1880
- t += n || "";
1881
- continue;
1882
- }
1883
- }
1884
- let i = r;
1885
- switch (i.type) {
1886
- case "space":
1887
- t += this.renderer.space(i);
1888
- break;
1889
- case "hr":
1890
- t += this.renderer.hr(i);
1891
- break;
1892
- case "heading":
1893
- t += this.renderer.heading(i);
1894
- break;
1895
- case "code":
1896
- t += this.renderer.code(i);
1897
- break;
1898
- case "table":
1899
- t += this.renderer.table(i);
1900
- break;
1901
- case "blockquote":
1902
- t += this.renderer.blockquote(i);
1903
- break;
1904
- case "list":
1905
- t += this.renderer.list(i);
1906
- break;
1907
- case "checkbox":
1908
- t += this.renderer.checkbox(i);
1909
- break;
1910
- case "html":
1911
- t += this.renderer.html(i);
1912
- break;
1913
- case "def":
1914
- t += this.renderer.def(i);
1915
- break;
1916
- case "paragraph":
1917
- t += this.renderer.paragraph(i);
1918
- break;
1919
- case "text":
1920
- t += this.renderer.text(i);
1921
- break;
1922
- default: {
1923
- let e = "Token with \"" + i.type + "\" type was not found.";
1924
- if (this.options.silent) return console.error(e), "";
1925
- throw Error(e);
1926
- }
1927
- }
1928
- }
1929
- return t;
1930
- }
1931
- parseInline(e, t = this.renderer) {
1932
- this.renderer.parser = this;
1933
- let n = "";
1934
- for (let r = 0; r < e.length; r++) {
1935
- let i = e[r];
1936
- if (this.options.extensions?.renderers?.[i.type]) {
1937
- let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1938
- if (e !== !1 || ![
1939
- "escape",
1940
- "html",
1941
- "link",
1942
- "image",
1943
- "strong",
1944
- "em",
1945
- "codespan",
1946
- "br",
1947
- "del",
1948
- "text"
1949
- ].includes(i.type)) {
1950
- n += e || "";
1951
- continue;
1952
- }
1953
- }
1954
- let a = i;
1955
- switch (a.type) {
1956
- case "escape":
1957
- n += t.text(a);
1958
- break;
1959
- case "html":
1960
- n += t.html(a);
1961
- break;
1962
- case "link":
1963
- n += t.link(a);
1964
- break;
1965
- case "image":
1966
- n += t.image(a);
1967
- break;
1968
- case "checkbox":
1969
- n += t.checkbox(a);
1970
- break;
1971
- case "strong":
1972
- n += t.strong(a);
1973
- break;
1974
- case "em":
1975
- n += t.em(a);
1976
- break;
1977
- case "codespan":
1978
- n += t.codespan(a);
1979
- break;
1980
- case "br":
1981
- n += t.br(a);
1982
- break;
1983
- case "del":
1984
- n += t.del(a);
1985
- break;
1986
- case "text":
1987
- n += t.text(a);
1988
- break;
1989
- default: {
1990
- let e = "Token with \"" + a.type + "\" type was not found.";
1991
- if (this.options.silent) return console.error(e), "";
1992
- throw Error(e);
1993
- }
1994
- }
1995
- }
1996
- return n;
1997
- }
1998
- }, Z = class {
1999
- options;
2000
- block;
2001
- constructor(e) {
2002
- this.options = e || D;
2003
- }
2004
- static passThroughHooks = new Set([
2005
- "preprocess",
2006
- "postprocess",
2007
- "processAllTokens",
2008
- "emStrongMask"
2009
- ]);
2010
- static passThroughHooksRespectAsync = new Set([
2011
- "preprocess",
2012
- "postprocess",
2013
- "processAllTokens"
2014
- ]);
2015
- preprocess(e) {
2016
- return e;
2017
- }
2018
- postprocess(e) {
2019
- return e;
2020
- }
2021
- processAllTokens(e) {
2022
- return e;
2023
- }
2024
- emStrongMask(e) {
2025
- return e;
2026
- }
2027
- provideLexer(e = this.block) {
2028
- return e ? q.lex : q.lexInline;
2029
- }
2030
- provideParser(e = this.block) {
2031
- return e ? X.parse : X.parseInline;
2032
- }
2033
- }, mn = new class {
2034
- defaults = ct();
2035
- options = this.setOptions;
2036
- parse = this.parseMarkdown(!0);
2037
- parseInline = this.parseMarkdown(!1);
2038
- Parser = X;
2039
- Renderer = J;
2040
- TextRenderer = Y;
2041
- Lexer = q;
2042
- Tokenizer = pn;
2043
- Hooks = Z;
2044
- constructor(...e) {
2045
- this.use(...e);
2046
- }
2047
- walkTokens(e, t) {
2048
- let n = [];
2049
- for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
2050
- case "table": {
2051
- let e = r;
2052
- for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
2053
- for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
2054
- break;
2055
- }
2056
- case "list": {
2057
- let e = r;
2058
- n = n.concat(this.walkTokens(e.items, t));
2059
- break;
2060
- }
2061
- default: {
2062
- let e = r;
2063
- this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
2064
- let i = e[r].flat(Infinity);
2065
- n = n.concat(this.walkTokens(i, t));
2066
- }) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
2067
- }
2068
- }
2069
- return n;
2070
- }
2071
- use(...e) {
2072
- let t = this.defaults.extensions || {
2073
- renderers: {},
2074
- childTokens: {}
2075
- };
2076
- return e.forEach((e) => {
2077
- let n = { ...e };
2078
- if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
2079
- if (!e.name) throw Error("extension name required");
2080
- if ("renderer" in e) {
2081
- let n = t.renderers[e.name];
2082
- n ? t.renderers[e.name] = function(...t) {
2083
- let r = e.renderer.apply(this, t);
2084
- return r === !1 && (r = n.apply(this, t)), r;
2085
- } : t.renderers[e.name] = e.renderer;
2086
- }
2087
- if ("tokenizer" in e) {
2088
- if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
2089
- let n = t[e.level];
2090
- 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]));
2091
- }
2092
- "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2093
- }), n.extensions = t), e.renderer) {
2094
- let t = this.defaults.renderer || new J(this.defaults);
2095
- for (let n in e.renderer) {
2096
- if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2097
- if (["options", "parser"].includes(n)) continue;
2098
- let r = n, i = e.renderer[r], a = t[r];
2099
- t[r] = (...e) => {
2100
- let n = i.apply(t, e);
2101
- return n === !1 && (n = a.apply(t, e)), n || "";
2102
- };
2103
- }
2104
- n.renderer = t;
2105
- }
2106
- if (e.tokenizer) {
2107
- let t = this.defaults.tokenizer || new pn(this.defaults);
2108
- for (let n in e.tokenizer) {
2109
- if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2110
- if ([
2111
- "options",
2112
- "rules",
2113
- "lexer"
2114
- ].includes(n)) continue;
2115
- let r = n, i = e.tokenizer[r], a = t[r];
2116
- t[r] = (...e) => {
2117
- let n = i.apply(t, e);
2118
- return n === !1 && (n = a.apply(t, e)), n;
2119
- };
2120
- }
2121
- n.tokenizer = t;
2122
- }
2123
- if (e.hooks) {
2124
- let t = this.defaults.hooks || new Z();
2125
- for (let n in e.hooks) {
2126
- if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2127
- if (["options", "block"].includes(n)) continue;
2128
- let r = n, i = e.hooks[r], a = t[r];
2129
- Z.passThroughHooks.has(n) ? t[r] = (e) => {
2130
- if (this.defaults.async && Z.passThroughHooksRespectAsync.has(n)) return (async () => {
2131
- let n = await i.call(t, e);
2132
- return a.call(t, n);
2133
- })();
2134
- let r = i.call(t, e);
2135
- return a.call(t, r);
2136
- } : t[r] = (...e) => {
2137
- if (this.defaults.async) return (async () => {
2138
- let n = await i.apply(t, e);
2139
- return n === !1 && (n = await a.apply(t, e)), n;
2140
- })();
2141
- let n = i.apply(t, e);
2142
- return n === !1 && (n = a.apply(t, e)), n;
2143
- };
2144
- }
2145
- n.hooks = t;
2146
- }
2147
- if (e.walkTokens) {
2148
- let t = this.defaults.walkTokens, r = e.walkTokens;
2149
- n.walkTokens = function(e) {
2150
- let n = [];
2151
- return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
2152
- };
2153
- }
2154
- this.defaults = {
2155
- ...this.defaults,
2156
- ...n
2157
- };
2158
- }), this;
2159
- }
2160
- setOptions(e) {
2161
- return this.defaults = {
2162
- ...this.defaults,
2163
- ...e
2164
- }, this;
2165
- }
2166
- lexer(e, t) {
2167
- return q.lex(e, t ?? this.defaults);
2168
- }
2169
- parser(e, t) {
2170
- return X.parse(e, t ?? this.defaults);
2171
- }
2172
- parseMarkdown(e) {
2173
- return (t, n) => {
2174
- let r = { ...n }, i = {
2175
- ...this.defaults,
2176
- ...r
2177
- }, a = this.onError(!!i.silent, !!i.async);
2178
- 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."));
2179
- if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
2180
- if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
2181
- if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
2182
- 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;
2183
- i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
2184
- let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(a, i);
2185
- return i.hooks ? await i.hooks.postprocess(o) : o;
2186
- })().catch(a);
2187
- try {
2188
- i.hooks && (t = i.hooks.preprocess(t));
2189
- let n = (i.hooks ? i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(t, i);
2190
- i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
2191
- let r = (i.hooks ? i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(n, i);
2192
- return i.hooks && (r = i.hooks.postprocess(r)), r;
2193
- } catch (e) {
2194
- return a(e);
2195
- }
2196
- };
2197
- }
2198
- onError(e, t) {
2199
- return (n) => {
2200
- if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
2201
- let e = "<p>An error occurred:</p><pre>" + U(n.message + "", !0) + "</pre>";
2202
- return t ? Promise.resolve(e) : e;
2203
- }
2204
- if (t) return Promise.reject(n);
2205
- throw n;
2206
- };
2207
- }
2208
- }();
2209
- function Q(e, t) {
2210
- return mn.parse(e, t);
2211
- }
2212
- Q.options = Q.setOptions = function(e) {
2213
- return mn.setOptions(e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2214
- }, Q.getDefaults = ct, Q.defaults = D, Q.use = function(...e) {
2215
- return mn.use(...e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2216
- }, Q.walkTokens = function(e, t) {
2217
- return mn.walkTokens(e, t);
2218
- }, 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;
2219
- //#endregion
2220
- //#region src/components/ai-chat/empty-state/ai-chat-empty-state.module.scss?inline
2221
- 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 {
2222
- constructor(...e) {
2223
- 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;
2224
- }
2225
- static {
2226
- this.styles = c(hn);
2227
- }
2228
- static {
2229
- this.tagName = "luzmo-ai-chat-empty-state";
2230
- }
2231
- _handleSuggestionActivate(e) {
2232
- if (this.disabled) return;
2233
- let t = e.prompt ?? e.label;
2234
- this.dispatchEvent(new CustomEvent("luzmo-suggestion-selected", {
2235
- detail: {
2236
- label: e.label,
2237
- prompt: t,
2238
- selectedDatasets: e.selectedDatasets
2239
- },
2240
- bubbles: !0,
2241
- composed: !0
2242
- }));
2243
- }
2244
- render() {
2245
- let e = this.suggestions.length > 0;
2246
- return o`
2247
- <section class="empty-state" aria-labelledby="ai-chat-empty-state-title">
2248
- <header class="header">
2249
- <h2 id="ai-chat-empty-state-title" class="title">${this.title}</h2>
2250
- </header>
2251
-
2252
- ${e ? o`
2253
- <div class="actions">
2254
- ${this.subtitle ? o`<p class="subtitle">${this.subtitle}</p>` : s}
2255
- <div
2256
- class="suggestions"
2257
- role="group"
2258
- aria-label=${n("Prompt suggestions", { desc: "Accessible label for the AI chat empty state suggestion list" })}
2259
- >
2260
- ${this.suggestions.map((e) => o`
2261
- <luzmo-action-button
2262
- variant="accent"
2263
- size="s"
2264
- ?disabled=${this.disabled}
2265
- @click=${() => this._handleSuggestionActivate(e)}
2266
- >
2267
- ${e.label}
2268
- </luzmo-action-button>
2269
- `)}
2270
- </div>
2271
- </div>
2272
- ` : s}
2273
- </section>
2274
- `;
2275
- }
2276
- };
2277
- //#endregion
2278
- //#region src/components/ai-chat/empty-state/index.ts
2279
- 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({
2280
- type: Boolean,
2281
- reflect: !0
2282
- })], gn.prototype, "disabled", void 0), customElements.get("luzmo-ai-chat-empty-state") || customElements.define("luzmo-ai-chat-empty-state", gn);
2283
- //#endregion
2284
- //#region src/components/ai-chat/ai-chat-request.ts
2285
- function _n(e, t) {
2286
- return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+|\/+$/g, "")}/aiprompt`;
2287
- }
2288
- function vn(e) {
2289
- return e.type === "placeholder" ? null : {
2290
- ...e,
2291
- version: e.version || "",
2292
- title: e.title || e.options?.title,
2293
- filters: e.filterGroups || [],
2294
- aichartId: e.aichartId || ""
2295
- };
2296
- }
2297
- function yn(e, t) {
2298
- return [{
2299
- type: "text",
2300
- text: e
2301
- }, ...t.map((e) => ({
2302
- type: "dataset",
2303
- id: e
2304
- }))];
2305
- }
2306
- function bn(e, t, n) {
2307
- return {
2308
- agent: e,
2309
- task: t,
2310
- stream: n.stream ?? !0,
2311
- response_mode: "mixed",
2312
- ...n.conversationId ? { conversation_id: n.conversationId } : {},
2313
- ...n.localeId ? { locale_id: n.localeId } : {}
2314
- };
2315
- }
2316
- function xn(e) {
2317
- let t = yn(e.prompt, e.datasetIds), n = e.chart ? vn(e.chart) : null;
2318
- return n && t.push({
2319
- type: "item",
2320
- value: n
2321
- }), {
2322
- ...bn("item", e.task ?? "generate", e),
2323
- input: t
2324
- };
2325
- }
2326
- function Sn(e) {
2327
- let t = yn(e.prompt, e.datasetIds);
2328
- return e.dashboard && t.push({
2329
- type: "dashboard",
2330
- value: e.dashboard,
2331
- ...e.currentScreenMode ? { current_screen_mode: e.currentScreenMode } : {}
2332
- }), {
2333
- ...bn("dashboard", "generate", e),
2334
- timezone_id: e.timezoneId ?? "UTC",
2335
- input: t
2336
- };
2337
- }
2338
- function Cn(e) {
2339
- return {
2340
- ...bn("analyst", "generate", e),
2341
- input: yn(e.prompt, e.datasetIds)
2342
- };
2343
- }
2344
- function wn(e, t) {
2345
- switch (e) {
2346
- case "dashboard": return Sn(t);
2347
- case "analyst": return Cn(t);
2348
- default: return xn(t);
2349
- }
2350
- }
2351
- function Tn(e, t) {
2352
- let { authKey: n, authToken: r, apiVersion: i = "0.1.0" } = t;
2353
- return {
2354
- key: n,
2355
- token: r,
2356
- action: "create",
2357
- version: i,
2358
- properties: wn(e, t)
2359
- };
2360
- }
2361
- function En(e, t, n, r = "0.1.0", i = null) {
2362
- return {
2363
- key: t,
2364
- token: n,
2365
- action: "delete",
2366
- version: r,
2367
- properties: {
2368
- agent: "item",
2369
- restore_to_message_id: e,
2370
- ...i ? { conversation_id: i } : {}
2371
- }
2372
- };
2373
- }
2374
- //#endregion
2375
- //#region src/components/ai-chat/stream/transport.ts
2376
- async function Dn(e) {
2377
- let t = await fetch(e.url, {
2378
- method: "POST",
2379
- headers: { "Content-Type": "application/json" },
2380
- mode: "cors",
2381
- body: JSON.stringify(e.body),
2382
- signal: e.signal
2383
- });
2384
- if (!t.ok) {
2385
- let e = await t.json().catch(() => null);
2386
- throw Error(e?.message || `API request failed with status ${t.status}`);
2387
- }
2388
- if (!t.body) throw Error("Response body is not readable");
2389
- return {
2390
- body: t.body,
2391
- conversationId: t.headers.get("x-conversation-id")
2392
- };
2393
- }
2394
- function On(e) {
2395
- let t = e.trim();
2396
- if (!t || t.startsWith(":") || t.startsWith("event:") || t.startsWith("id:")) return null;
2397
- let n = t;
2398
- return n.startsWith("data:") && (n = n.slice(5).trimStart()), !n || n === "[DONE]" ? null : JSON.parse(n);
2399
- }
2400
- function kn(e, t) {
2401
- try {
2402
- let n = On(e);
2403
- n && t(n);
2404
- } catch {
2405
- console.error("Failed to parse stream line");
2406
- }
2407
- }
2408
- async function An(e, t) {
2409
- let n = e.getReader(), r = new TextDecoder(), i = "";
2410
- try {
2411
- for (;;) {
2412
- let { done: e, value: a } = await n.read();
2413
- if (e) break;
2414
- i += r.decode(a, { stream: !0 });
2415
- let o = i.split(/\r?\n/);
2416
- i = o.pop() ?? "";
2417
- for (let e of o) kn(e, t);
2418
- }
2419
- i += r.decode();
2420
- let e = i.trim();
2421
- e && kn(e, t);
2422
- } finally {
2423
- n.releaseLock();
2424
- }
2425
- }
2426
- //#endregion
2427
- //#region src/components/ai-chat/stream/progress.ts
2428
- function jn() {
2429
- return {
2430
- id: "root",
2431
- step: "root",
2432
- status: "pending",
2433
- children: [{
2434
- id: "client-init",
2435
- step: "iqInit",
2436
- status: "inProgress",
2437
- description: n("Thinking", { desc: "Label shown in the AI chat progress tree while the assistant starts processing a prompt" })
2438
- }]
2439
- };
2440
- }
2441
- function Mn(e) {
2442
- let t = e.progress;
2443
- return typeof t != "object" || !t ? !1 : "id" in t && "step" in t && "status" in t;
2444
- }
2445
- //#endregion
2446
- //#region src/components/ai-chat/stream/chunk-extractors.ts
2447
- function Nn(e) {
2448
- if (!e || typeof e != "object") return "";
2449
- let t = e.assistant_message;
2450
- if (!t || typeof t != "object") return "";
2451
- if (typeof t.message == "string") return t.message;
2452
- if (typeof t.text == "string") return t.text;
2453
- if (typeof t.summary == "string") return t.summary;
2454
- let n = t.content;
2455
- return typeof n == "string" ? n : n && typeof n == "object" && typeof n.text == "string" ? n.text : "";
2456
- }
2457
- function Pn(e) {
2458
- 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 : "";
2459
- }
2460
- function Fn(e) {
2461
- return Nn(e.result);
2462
- }
2463
- function In(e) {
2464
- return !!e.done || e.type === "finish" || e.type === "done" || "question" in e;
2465
- }
2466
- function Ln(e, t) {
2467
- let n = typeof e.conversation_id == "string" && e.conversation_id || typeof e.conversationId == "string" && e.conversationId;
2468
- n && t.callbacks.onConversationIdChange(n);
2469
- }
2470
- function Rn(e) {
2471
- for (let t of e) if (t && typeof t == "object" && t.type === "item") {
2472
- let e = t.value;
2473
- if (e && typeof e == "object") return e;
2474
- }
2475
- return null;
2476
- }
2477
- function zn(e) {
2478
- let t = e.chart ?? e.generatedChart;
2479
- if (t && typeof t == "object") return t;
2480
- let n = e.aiMessageAssets ?? e.ai_message_assets;
2481
- if (Array.isArray(n)) {
2482
- let e = Rn(n);
2483
- if (e) return e;
2484
- }
2485
- let r = e.result;
2486
- if (r && typeof r == "object") {
2487
- let e = r.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2488
- if (Array.isArray(t)) return Rn(t);
2489
- }
2490
- return null;
2491
- }
2492
- function Bn(e) {
2493
- for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2494
- let e = t.value;
2495
- if (e && typeof e == "object" && Array.isArray(e.views)) return e;
2496
- }
2497
- return null;
2498
- }
2499
- function Vn(e) {
2500
- for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2501
- let e = t.name;
2502
- if (e && typeof e == "object") return e;
2503
- }
2504
- }
2505
- function Hn(...e) {
2506
- return e.find(Array.isArray);
2507
- }
2508
- function Un(e) {
2509
- if (e.views && Array.isArray(e.views)) return e;
2510
- let t = e.aiMessageAssets ?? e.ai_message_assets;
2511
- if (Array.isArray(t)) return Bn(t);
2512
- let n = e.result;
2513
- if (n && typeof n == "object") {
2514
- let e = n.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2515
- if (Array.isArray(t)) return Bn(t);
2516
- }
2517
- return null;
2518
- }
2519
- function Wn(e) {
2520
- let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r = Hn(t, n?.aiMessageAssets ?? n?.ai_message_assets);
2521
- return r ? Vn(r) : void 0;
2522
- }
2523
- //#endregion
2524
- //#region src/components/ai-chat/stream/stream-processor.ts
2525
- var Gn = new Set([
2526
- "conversation-id",
2527
- "conversation_id",
2528
- "keepalive",
2529
- "ping",
2530
- "finish",
2531
- "done"
2532
- ]);
2533
- function Kn(e, t, n) {
2534
- return {
2535
- agent: n.agent,
2536
- conversationId: t.callbacks.getConversationId(),
2537
- ...typeof e.messageId == "string" ? { messageId: e.messageId } : {},
2538
- raw: e
2539
- };
2540
- }
2541
- function qn(e, t, n, r, i) {
2542
- let a = {
2543
- ...Kn(n, e, t),
2544
- recognized: !0,
2545
- type: r,
2546
- data: i
2547
- };
2548
- e.callbacks.onStep(a);
2549
- }
2550
- function Jn(e, t, n, r, i) {
2551
- let a = {
2552
- ...Kn(n, e, t),
2553
- recognized: !1,
2554
- type: r,
2555
- data: i
2556
- };
2557
- e.callbacks.onStep(a);
2558
- }
2559
- function Yn(e) {
2560
- e.state.progressCollapsed || (e.state.progressCollapsed = !0, e.callbacks.onProgressCollapsed(!0));
2561
- }
2562
- function Xn(e, t) {
2563
- Yn(e), e.aiMessage.message = (e.aiMessage.message || "") + t, e.callbacks.onMessageUpdate(e.aiMessage);
2564
- }
2565
- function Zn(e) {
2566
- if (!e) return null;
2567
- let t = e.descriptionMetadata?.decision;
2568
- if (t === "create" || t === "edit" || t === "question") return t;
2569
- for (let t of e.children ?? []) {
2570
- let e = Zn(t);
2571
- if (e) return e;
2572
- }
2573
- return null;
2574
- }
2575
- function Qn(e, t, n) {
2576
- if (!Mn(e)) return !1;
2577
- let r = e.progress;
2578
- if (t.callbacks.onProgress(r), qn(t, n, e, "progress", r), t.state.decision === null) {
2579
- let i = Zn(r);
2580
- i && (t.state.decision = i, qn(t, n, e, "decision", { decision: i }));
2581
- }
2582
- return !0;
2583
- }
2584
- function $n(e) {
2585
- return !!e.error || e.type === "error" || typeof e.error_text == "string";
2586
- }
2587
- function er(e) {
2588
- 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" });
2589
- }
2590
- function tr(e, t, n) {
2591
- if (!$n(e)) return !1;
2592
- let r = er(e);
2593
- return t.aiMessage.message = r, t.aiMessage.isError = !0, t.callbacks.onMessageUpdate(t.aiMessage), Sr(e, t, n, e.error ?? r), !0;
2594
- }
2595
- function nr(e) {
2596
- return typeof e.question == "string" && e.question ? e.question : typeof e.text == "string" && e.text ? e.text : "";
2597
- }
2598
- function rr(e, t, n) {
2599
- if (e.type !== "interrupt") return !1;
2600
- let r = nr(e);
2601
- return r && (t.state.interruptQuestion = r, Xn(t, r), qn(t, n, e, "interrupt", { question: r })), Sr(e, t, n), !0;
2602
- }
2603
- function ir(e) {
2604
- return typeof e.asset_id == "string" ? e.asset_id : typeof e.asset_type == "string" ? e.asset_type : "default";
2605
- }
2606
- function ar(e) {
2607
- return typeof e.asset_type == "string" ? e.asset_type : "";
2608
- }
2609
- function or(e) {
2610
- return {
2611
- assetType: ar(e),
2612
- snapshot: {}
2613
- };
2614
- }
2615
- function sr(e, t) {
2616
- return {
2617
- ...e,
2618
- ...t
2619
- };
2620
- }
2621
- function cr(e) {
2622
- let t = e.asset_delta ?? e.delta;
2623
- return t && typeof t == "object" ? t : null;
2624
- }
2625
- function lr(e, t) {
2626
- t.state.assets[ir(e)] = or(e);
2627
- }
2628
- function ur(e, t) {
2629
- let n = ir(e), r = t.state.assets[n] ?? or(e), i = cr(e);
2630
- i && (r.snapshot = sr(r.snapshot, i)), t.state.assets[n] = r;
2631
- }
2632
- function dr(e, t) {
2633
- let n = e.asset ?? e.value ?? e.asset_delta ?? e.delta;
2634
- return n && typeof n == "object" ? sr(t?.snapshot ?? {}, n) : t?.snapshot ?? {};
2635
- }
2636
- function fr(e, t, n) {
2637
- let r = ir(e), i = t.state.assets[r], a = i?.assetType || ar(e), o = dr(e, i);
2638
- delete t.state.assets[r], hr(a, o, e, t, n);
2639
- }
2640
- function pr(e, t, n) {
2641
- switch (e.type) {
2642
- case "asset_start": return lr(e, t), !0;
2643
- case "asset_delta": return ur(e, t), !0;
2644
- case "asset_end": return fr(e, t, n), !0;
2645
- default: return !1;
2646
- }
2647
- }
2648
- function mr(e, t, n, r) {
2649
- 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);
2650
- }
2651
- function hr(e, t, n, r, i) {
2652
- switch (e) {
2653
- case "dashboard-title": {
2654
- let e = t.name;
2655
- e && typeof e == "object" && (r.state.dashboardName = e, qn(r, i, n, "dashboard-title", { name: e }));
2656
- return;
2657
- }
2658
- case "dashboard-layout":
2659
- qn(r, i, n, "dashboard-layout", t);
2660
- return;
2661
- case "dashboard-item":
2662
- qn(r, i, n, "dashboard-item", {
2663
- slot: Number(t.slot),
2664
- chart: t.chart ?? t
2665
- });
2666
- return;
2667
- case "dashboard":
2668
- r.state.dashboardSnapshot = t;
2669
- return;
2670
- default: gr(e, t, n, r, i);
2671
- }
2672
- }
2673
- function gr(e, t, n, r, i) {
2674
- if (i.chartAssetType && e === i.chartAssetType) {
2675
- mr(t, n, r, i);
2676
- return;
2677
- }
2678
- if (i.dashboardAssetType && e === i.dashboardAssetType) {
2679
- r.state.dashboardSnapshot = t;
2680
- return;
2681
- }
2682
- Jn(r, i, n, e || "asset", t);
2683
- }
2684
- function _r(e, t, n) {
2685
- let r = !1;
2686
- if (n.dashboardAssetType) {
2687
- let n = Un(e);
2688
- if (n) {
2689
- t.state.dashboardSnapshot = n;
2690
- let i = Wn(e);
2691
- i && (t.state.dashboardName = i), r = !0;
2692
- }
2693
- }
2694
- if (n.chartAssetType && !t.state.chartSnapshot) {
2695
- let i = zn(e);
2696
- i && (mr(i, e, t, n), r = !0);
2697
- }
2698
- return r;
2699
- }
2700
- function vr(e, t, n) {
2701
- return {
2702
- ...e,
2703
- generatedChart: t,
2704
- conversationId: n.callbacks.getConversationId()
2705
- };
2706
- }
2707
- function yr(e, t, n) {
2708
- for (let r of Object.keys(t.state.assets)) {
2709
- let i = t.state.assets[r];
2710
- 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);
2711
- }
2712
- }
2713
- function br(e, t) {
2714
- let n = Fn(e);
2715
- !n || t.aiMessage.message === n || (t.aiMessage.message = n, t.callbacks.onMessageUpdate(t.aiMessage));
2716
- }
2717
- function xr(e, t, n) {
2718
- let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ? Un(e) : null), i = t.state.chartSnapshot ?? (n.chartAssetType ? zn(e) : null);
2719
- return {
2720
- agent: n.agent,
2721
- conversationId: t.callbacks.getConversationId(),
2722
- message: t.aiMessage,
2723
- ...r ? { dashboard: r } : {},
2724
- ...i ? { chart: vr(e, i, t) } : {},
2725
- ...t.state.dashboardName ? { name: t.state.dashboardName } : {},
2726
- raw: e
2727
- };
2728
- }
2729
- function Sr(e, t, n, r) {
2730
- if (!t.state.completed) {
2731
- if (t.state.completed = !0, yr(e, t, n), Yn(t), r !== void 0) {
2732
- t.callbacks.onComplete({
2733
- agent: n.agent,
2734
- conversationId: t.callbacks.getConversationId(),
2735
- message: t.aiMessage,
2736
- error: r,
2737
- raw: e
2738
- });
2739
- return;
2740
- }
2741
- br(e, t), t.callbacks.onComplete(xr(e, t, n));
2742
- }
2743
- }
2744
- function Cr(e) {
2745
- return typeof e.type == "string" && e.type ? e.type : typeof e.asset_type == "string" && e.asset_type ? e.asset_type : "";
2746
- }
2747
- function wr(e, t, n) {
2748
- let r = Pn(e);
2749
- return r ? (t.state.accumulatedText += r, Xn(t, r), qn(t, n, e, "text", {
2750
- delta: r,
2751
- text: t.state.accumulatedText
2752
- }), !0) : !1;
2753
- }
2754
- function Tr(e, t, n, r, i) {
2755
- if (r || i) return;
2756
- let a = Cr(e);
2757
- a && !Gn.has(a) && Jn(t, n, e, a, e);
2758
- }
2759
- function Er(e, t, n) {
2760
- if (Ln(e, t), Qn(e, t, n) || tr(e, t, n) || rr(e, t, n) || pr(e, t, n)) return;
2761
- let r = wr(e, t, n), i = _r(e, t, n), a = r || i, o = In(e);
2762
- Tr(e, t, n, a, o), o && Sr(e, t, n);
2763
- }
2764
- //#endregion
2765
- //#region src/components/ai-chat/stream/registry.ts
2766
- function Dr(e) {
2767
- switch (e) {
2768
- case "dashboard": return {
2769
- agent: e,
2770
- dashboardAssetType: "dashboard"
2771
- };
2772
- case "item": return {
2773
- agent: e,
2774
- chartAssetType: "item"
2775
- };
2776
- default: return { agent: e };
2777
- }
2778
- }
2779
- function Or(e) {
2780
- let t = Dr(e);
2781
- return (e, n) => Er(e, n, t);
2782
- }
2783
- function kr() {
2784
- return {
2785
- progressCollapsed: !1,
2786
- accumulatedText: "",
2787
- decision: null,
2788
- assets: {},
2789
- dashboardSnapshot: null,
2790
- dashboardName: void 0,
2791
- chartSnapshot: null,
2792
- interruptQuestion: null,
2793
- completed: !1
2794
- };
2795
- }
2796
- //#endregion
2797
- //#region src/components/ai-chat/session/ai-chat-session.ts
2798
- function Ar() {
2799
- return `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
2800
- }
2801
- var jr = class {
2802
- constructor(e, t = {}) {
2803
- this._uiBridgeCallbacks = {}, this._subscribers = /* @__PURE__ */ new Set(), this._state = {
2804
- messages: [],
2805
- selectedDatasets: [],
2806
- isGenerating: !1,
2807
- progress: null,
2808
- progressCollapsed: !1,
2809
- conversationId: null,
2810
- inflightMessage: null
2811
- }, this._abortController = null, this._inflightMessage = null, this._receivedProgress = !1, this._config = {
2812
- apiUrl: "https://api.luzmo.com",
2813
- apiVersion: "0.1.0",
2814
- stream: !0,
2815
- ...e
2816
- }, this._hostCallbacks = t, this._state = {
2817
- ...this._state,
2818
- messages: e.messages ? [...e.messages] : [],
2819
- selectedDatasets: e.selectedDatasets ? [...e.selectedDatasets] : [],
2820
- conversationId: e.conversationId ?? null,
2821
- isGenerating: e.isGenerating ?? !1,
2822
- progress: e.progress ?? null,
2823
- progressCollapsed: e.progressCollapsed ?? !1
2824
- };
2825
- }
2826
- get state() {
2827
- return this._state;
2828
- }
2829
- get isGenerating() {
2830
- return this._state.isGenerating;
2831
- }
2832
- subscribe(e) {
2833
- return this._subscribers.add(e), e(this._state), () => {
2834
- this._subscribers.delete(e);
2835
- };
2836
- }
2837
- setUiBridge(e) {
2838
- this._uiBridgeCallbacks = e;
2839
- }
2840
- updateConfig(e) {
2841
- this._config = {
2842
- ...this._config,
2843
- ...e
2844
- };
2845
- let t = {};
2846
- if ("conversationId" in e) {
2847
- let n = e.conversationId ?? null;
2848
- n !== this._state.conversationId && (t.conversationId = n);
2849
- }
2850
- if ("selectedDatasets" in e && e.selectedDatasets) {
2851
- let n = [...e.selectedDatasets];
2852
- this._areSelectedDatasetsEqual(n, this._state.selectedDatasets) || (t.selectedDatasets = n);
2853
- }
2854
- if ("messages" in e && e.messages) {
2855
- let n = [...e.messages];
2856
- this._areChatMessagesEqual(n, this._state.messages) || (t.messages = n);
2857
- }
2858
- "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);
2859
- }
2860
- setSelectedDatasets(e) {
2861
- this._patchState({ selectedDatasets: [...e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets);
2862
- }
2863
- addDataset(e) {
2864
- this._state.selectedDatasets.some((t) => t.id === e.id) || (this._patchState({ selectedDatasets: [...this._state.selectedDatasets, e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2865
- }
2866
- removeDataset(e) {
2867
- let t = this._state.selectedDatasets.filter((t) => t.id !== e);
2868
- t.length !== this._state.selectedDatasets.length && (this._patchState({ selectedDatasets: t }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2869
- }
2870
- isDatasetRequirementMet() {
2871
- return !this._config.requireDataset || this._state.selectedDatasets.length > 0;
2872
- }
2873
- getAiPromptUrl() {
2874
- return _n(this._config.apiUrl ?? "https://api.luzmo.com", this._config.apiVersion ?? "0.1.0");
2875
- }
2876
- buildRequestBody(e, t) {
2877
- return Tn(this._config.agent, {
2878
- prompt: e,
2879
- datasetIds: t,
2880
- authKey: this._config.authKey,
2881
- authToken: this._config.authToken,
2882
- conversationId: this._state.conversationId,
2883
- chart: this._config.chart ?? null,
2884
- dashboard: this._config.dashboard ?? null,
2885
- currentScreenMode: this._config.currentScreenMode,
2886
- localeId: this._config.localeId,
2887
- timezoneId: this._config.timezoneId,
2888
- task: this._config.task,
2889
- modelPreference: this._config.modelPreference,
2890
- apiVersion: this._config.apiVersion,
2891
- stream: this._config.stream
2892
- });
2893
- }
2894
- buildPromptSubmittedDetail(e, t, n, r) {
2895
- return {
2896
- prompt: e,
2897
- selectedDatasets: t,
2898
- datasetIds: n,
2899
- agent: this._config.agent,
2900
- request: this.buildRequestBody(e, n),
2901
- url: this.getAiPromptUrl(),
2902
- ...r ? { signal: r } : {}
2903
- };
2904
- }
2905
- async submit(e) {
2906
- let t = e.datasetIds ?? this._state.selectedDatasets.map((e) => e.id);
2907
- if (!this.isDatasetRequirementMet()) return;
2908
- this._abortInflight();
2909
- let n = {
2910
- id: e.aiMessageId ?? Ar(),
2911
- type: "ai",
2912
- message: ""
2913
- }, r = [...this._state.messages];
2914
- if (!e.skipUserMessage) {
2915
- let t = {
2916
- id: Ar(),
2917
- type: "user",
2918
- message: e.prompt
2919
- };
2920
- r = [...r, t], this._emit("onMessageSent", t, [...this._state.selectedDatasets]);
2921
- }
2922
- r = [...r, n], this._inflightMessage = n, this._receivedProgress = !1;
2923
- let i = new AbortController();
2924
- this._abortController = i, this._patchState({
2925
- messages: r,
2926
- isGenerating: !0,
2927
- progress: jn(),
2928
- progressCollapsed: !1,
2929
- inflightMessage: n
2930
- });
2931
- let a = t, o = [...this._state.selectedDatasets];
2932
- if (this._hasCallback("onPromptSubmitted")) {
2933
- let t = this.buildPromptSubmittedDetail(e.prompt, o, a, i.signal);
2934
- try {
2935
- await this._invokeCallback("onPromptSubmitted", t);
2936
- } catch (e) {
2937
- e.name === "AbortError" ? this.abort() : (this._handleSubmitError(e, n), this._finalizeInflightMessage()), this._patchState({ isGenerating: !1 });
2938
- }
2939
- return;
2940
- }
2941
- let s = this.buildRequestBody(e.prompt, t), c = Or(this._config.agent), l = {
2942
- aiMessage: n,
2943
- callbacks: this._createStreamCallbacks(),
2944
- state: kr()
2945
- }, u = this._config.fetchStreaming ?? Dn, d = !1;
2946
- try {
2947
- let { body: e, conversationId: t } = await u({
2948
- url: this.getAiPromptUrl(),
2949
- body: s,
2950
- signal: i.signal
2951
- });
2952
- t && this._setConversationId(t), await An(e, (e) => c(e, l)), d = !0;
2953
- } catch (e) {
2954
- e.name !== "AbortError" && (this._handleSubmitError(e, n), d = !0);
2955
- } finally {
2956
- this._abortController === i && (d ? this._finalizeInflightMessage() : this._discardInflightMessage(), this._patchState({ isGenerating: !1 }), this._abortController = null);
2957
- }
2958
- }
2959
- async restore(e) {
2960
- if (this._config.agent !== "item") return {};
2961
- let t = En(e.restoreToMessageId, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
2962
- if (this._patchState({
2963
- isGenerating: !0,
2964
- progress: null,
2965
- progressCollapsed: !1
2966
- }), this._hasCallback("onRestoreRequested")) {
2967
- let n = {
2968
- apiMessageId: e.restoreToMessageId,
2969
- messageIndex: e.messageIndex,
2970
- request: t,
2971
- url: this.getAiPromptUrl()
2972
- };
2973
- try {
2974
- await this._invokeCallback("onRestoreRequested", n);
2975
- } finally {
2976
- this._patchState({ isGenerating: !1 });
2977
- }
2978
- return {};
2979
- }
2980
- try {
2981
- let n = await fetch(this.getAiPromptUrl(), {
2982
- method: "POST",
2983
- headers: { "Content-Type": "application/json" },
2984
- mode: "cors",
2985
- body: JSON.stringify(t)
2986
- });
2987
- if (!n.ok) {
2988
- let e = await n.json().catch(() => null);
2989
- throw Error(e?.message || `API request failed with status ${n.status}`);
2990
- }
2991
- let r = await n.json().catch(() => null), i = r?.generatedChart ?? (r ? zn(r) : null), a = {
2992
- ...typeof r?.message == "string" ? { message: r.message } : {},
2993
- ...i ? { chart: {
2994
- ...r,
2995
- generatedChart: i
2996
- } } : {}
2997
- }, o = e.messageIndex >= 0 && e.messageIndex < this._state.messages.length ? this._state.messages.slice(0, e.messageIndex + 1) : this._state.messages;
2998
- if (a.message && o[e.messageIndex]?.type === "ai" && (o[e.messageIndex] = {
2999
- ...o[e.messageIndex],
3000
- message: a.message
3001
- }), this._patchState({ messages: [...o] }), a.chart || a.message) {
3002
- let t = o[e.messageIndex], n = t?.type === "ai" ? t : {
3003
- id: Ar(),
3004
- type: "ai",
3005
- message: a.message ?? ""
3006
- };
3007
- this._emit("onComplete", {
3008
- agent: this._config.agent,
3009
- conversationId: this._state.conversationId,
3010
- message: n,
3011
- ...a.chart ? { chart: a.chart } : {},
3012
- ...r ? { raw: r } : {}
3013
- });
3014
- }
3015
- return a;
3016
- } finally {
3017
- this._patchState({ isGenerating: !1 });
3018
- }
3019
- }
3020
- buildRestoreRequest(e) {
3021
- return En(e, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
3022
- }
3023
- abort(e = {}) {
3024
- this._abortController?.abort(), this._abortController = null, e.notify && this._inflightMessage ? this._markInflightCancelled(e.cancelledMessage) : this._discardInflightMessage(), this._patchState({
3025
- isGenerating: !1,
3026
- progress: null,
3027
- progressCollapsed: !1
3028
- }), e.notify && this._emit("onPromptStopped");
3029
- }
3030
- _abortInflight() {
3031
- this._abortController?.abort(), this._abortController = null, this._discardInflightMessage();
3032
- }
3033
- _createStreamCallbacks() {
3034
- return {
3035
- onConversationIdChange: (e) => this._setConversationId(e),
3036
- onProgress: (e) => {
3037
- this._receivedProgress = !0, this._patchState({ progress: e });
3038
- },
3039
- onProgressCollapsed: (e) => {
3040
- this._patchState({ progressCollapsed: e });
3041
- },
3042
- onMessageUpdate: (e) => {
3043
- this._inflightMessage = e, this._upsertMessage(e), this._patchState({ inflightMessage: { ...e } });
3044
- },
3045
- getConversationId: () => this._state.conversationId,
3046
- onStep: (e) => {
3047
- this._emit("onStep", e);
3048
- },
3049
- onComplete: (e) => {
3050
- this._emit("onComplete", e);
3051
- }
3052
- };
3053
- }
3054
- _setConversationId(e) {
3055
- this._config = {
3056
- ...this._config,
3057
- conversationId: e
3058
- }, this._patchState({ conversationId: e }), this._emit("onConversationIdChange", e);
3059
- }
3060
- _upsertMessage(e) {
3061
- let t = this._state.messages.findIndex((t) => t.id === e.id);
3062
- if (t === -1) {
3063
- this._patchState({ messages: [...this._state.messages, { ...e }] });
3064
- return;
3065
- }
3066
- let n = this._state.messages.map((n, r) => r === t ? { ...e } : n);
3067
- this._patchState({ messages: n });
3068
- }
3069
- _finalizeInflightMessage() {
3070
- 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({
3071
- progress: null,
3072
- progressCollapsed: !1,
3073
- inflightMessage: null
3074
- }));
3075
- }
3076
- _removeInflightFromMessages() {
3077
- this._inflightMessage && this._patchState({ messages: this._state.messages.filter((e) => e.id !== this._inflightMessage.id) });
3078
- }
3079
- _markInflightCancelled(e) {
3080
- 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 }));
3081
- }
3082
- _discardInflightMessage() {
3083
- let e = !!(this._inflightMessage || this._state.inflightMessage);
3084
- this._removeInflightFromMessages(), this._inflightMessage = null, this._receivedProgress = !1, e && this._patchState({ inflightMessage: null });
3085
- }
3086
- _handleSubmitError(e, t) {
3087
- 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({
3088
- inflightMessage: { ...t },
3089
- progress: null,
3090
- progressCollapsed: !1
3091
- }), this._emit("onComplete", {
3092
- agent: this._config.agent,
3093
- conversationId: this._state.conversationId,
3094
- message: t,
3095
- error: e
3096
- });
3097
- }
3098
- _hasCallback(e) {
3099
- return typeof this._hostCallbacks[e] == "function" || typeof this._uiBridgeCallbacks[e] == "function";
3100
- }
3101
- _emit(e, ...t) {
3102
- this._invokeCallback(e, ...t);
3103
- }
3104
- async _invokeCallback(e, ...t) {
3105
- let n = this._hostCallbacks[e], r = this._uiBridgeCallbacks[e];
3106
- typeof n == "function" && await n(...t), typeof r == "function" && await r(...t);
3107
- }
3108
- _patchState(e) {
3109
- this._state = {
3110
- ...this._state,
3111
- ...e
3112
- }, this._emit("onStateChange", this._state);
3113
- for (let e of this._subscribers) e(this._state);
3114
- }
3115
- _areSelectedDatasetsEqual(e, t) {
3116
- return e.length === t.length ? e.every((e, n) => e.id === t[n]?.id) : !1;
3117
- }
3118
- _areChatMessagesEqual(e, t) {
3119
- return e.length === t.length ? e.every((e, n) => {
3120
- let r = t[n];
3121
- 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);
3122
- }) : !1;
3123
- }
3124
- };
3125
- function Mr(e, t) {
3126
- return new jr(e, t);
3127
- }
3128
- //#endregion
3129
- //#region src/components/ai-chat/session/ai-chat-session-controller.ts
3130
- var Nr = class {
3131
- constructor(e) {
3132
- this.options = e, this._session = null, this._ownsSession = !1, this._seededFromProps = !1, this._unsubscribe = null;
3133
- }
3134
- get current() {
3135
- return this._session;
3136
- }
3137
- get state() {
3138
- if (this._session) return this._session.state;
3139
- let e = this.options.getSeed();
3140
- return {
3141
- messages: e.messages,
3142
- selectedDatasets: e.selectedDatasets,
3143
- isGenerating: !1,
3144
- progress: null,
3145
- progressCollapsed: !1,
3146
- conversationId: e.conversationId,
3147
- inflightMessage: null
3148
- };
3149
- }
3150
- get ownsCurrentSession() {
3151
- return this._ownsSession;
3152
- }
3153
- setSession(e) {
3154
- if (!e) {
3155
- this._clearSession();
3156
- return;
3157
- }
3158
- this._ownsSession && this._session !== e && this._session?.abort(), this._ownsSession = !1, this._session = e, e.updateConfig(this.options.getConfig()), this._wire(e);
3159
- }
3160
- syncProperties(e) {
3161
- if (!e.has("chatSession")) {
3162
- if (this._createSessionIfMissing(), this._session) {
3163
- let t = this.options.getConfig();
3164
- Object.keys(t).some((t) => e.has(t)) && this._session.updateConfig(t);
3165
- }
3166
- (e.has("messages") || e.has("selectedDatasets")) && this._seedFromPropsOnce();
3167
- }
3168
- }
3169
- requireSession() {
3170
- return this._createSessionIfMissing(), this._session.updateConfig(this.options.getConfig()), this._session;
3171
- }
3172
- connect() {
3173
- this._session && this._wire(this._session);
3174
- }
3175
- teardown() {
3176
- this._unwire(), this._ownsSession &&= (this._session?.abort(), this._session = null, !1), this._seededFromProps = !1;
3177
- }
3178
- _createSessionIfMissing() {
3179
- if (this._session) return;
3180
- let e = this.options.getSeed();
3181
- this._session = Mr({
3182
- ...this.options.getConfig(),
3183
- messages: e.messages.length > 0 ? [...e.messages] : void 0,
3184
- selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
3185
- }), this._ownsSession = !0, this._seededFromProps = e.messages.length > 0 || e.selectedDatasets.length > 0, this._wire(this._session);
3186
- }
3187
- _clearSession() {
3188
- this._unwire(), this._ownsSession && this._session?.abort(), this._session = null, this._ownsSession = !1;
3189
- }
3190
- _seedFromPropsOnce() {
3191
- if (!this._ownsSession || this._seededFromProps) return;
3192
- let e = this.requireSession(), t = this.options.getSeed(), n = {};
3193
- 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);
3194
- }
3195
- _wire(e) {
3196
- this._unwire(), e.setUiBridge(this.options.createDomBridge()), this._unsubscribe = e.subscribe(() => {
3197
- this.options.onRenderNeeded();
3198
- });
3199
- }
3200
- _unwire() {
3201
- this._unsubscribe?.(), this._unsubscribe = null;
3202
- }
3203
- }, 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{gap:var(--luzmo-ai-chat-assistant-message-actions-margin-top,var(--ai-chat-assistant-message-actions-margin-top));font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height));--chat-message-font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));--luzmo-chat-message-font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));--chat-message-font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));--luzmo-chat-message-font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));--chat-message-line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height));--luzmo-chat-message-line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height));flex-direction:column;display:flex}:host .assistant-message-body{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}:host .assistant-message-actions{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:none}:host .assistant-message-actions.assistant-message-actions--has-content{display:flex}:host .assistant-message-actions slot::slotted(luzmo-button),:host .assistant-message-actions slot::slotted(button),:host .assistant-message-actions slot::slotted(a),:host .assistant-message-actions slot::slotted(input),:host .assistant-message-actions slot::slotted(select),:host .assistant-message-actions slot::slotted(textarea){font-style:normal}:host .assistant-message-actions slot::slotted(:not(luzmo-button):not(button):not(a):not(input):not(select):not(textarea)){font-style:var(--luzmo-ai-chat-assistant-message-actions-font-style,var(--ai-chat-assistant-message-actions-font-style));color:var(--luzmo-ai-chat-assistant-message-actions-color,var(--ai-chat-assistant-message-actions-color))}: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);--ai-chat-assistant-message-actions-gap:var(--luzmo-spacing-2);--ai-chat-assistant-message-actions-margin-top:var(--luzmo-spacing-2);--ai-chat-assistant-message-actions-color:var(--luzmo-font-color-extra-dimmed);--ai-chat-assistant-message-actions-font-style:italic;--ai-chat-assistant-message-font-family:var(--luzmo-font-family);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-s,12px);--ai-chat-assistant-message-line-height:var(--ai-chat-markdown-line-height)}", $ = class t extends e {
3204
- constructor(...e) {
3205
- 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._assistantMessageActionsHasContent = !1, this._lastProcessedInitialPrompt = null, this._session = new Nr({
3206
- getConfig: () => this._buildSessionConfig(),
3207
- getSeed: () => ({
3208
- messages: this.messages,
3209
- selectedDatasets: this.selectedDatasets,
3210
- conversationId: this.conversationId
3211
- }),
3212
- createDomBridge: () => this._createDomBridgeCallbacks(),
3213
- onRenderNeeded: () => {
3214
- this.requestUpdate(), this.updateComplete.then(() => this._scrollToBottom());
3215
- }
3216
- }), this._handleAssistantMessageActionsSlotChange = (e) => {
3217
- let t = e.target;
3218
- this._setAssistantMessageActionsHasContent(t.assignedElements({ flatten: !0 }).length > 0);
3219
- };
3220
- }
3221
- static {
3222
- this.styles = c(Pr);
3223
- }
3224
- static {
3225
- this.tagName = "luzmo-ai-chat";
3226
- }
3227
- static {
3228
- this.assistantMessageActionsSlot = "assistant-message-actions";
3229
- }
3230
- get session() {
3231
- return this._session.current;
3232
- }
3233
- _getRenderState() {
3234
- return this._session.state;
3235
- }
3236
- _createDomBridgeCallbacks() {
3237
- return {
3238
- onMessageSent: (e, t) => {
3239
- this.dispatchEvent(new CustomEvent("luzmo-message-sent", {
3240
- detail: {
3241
- message: e,
3242
- selectedDatasets: t
3243
- },
3244
- bubbles: !0,
3245
- composed: !0
3246
- }));
3247
- },
3248
- onDatasetsChanged: (e) => {
3249
- this.dispatchEvent(new CustomEvent("luzmo-datasets-changed", {
3250
- detail: { selectedDatasets: e },
3251
- bubbles: !0,
3252
- composed: !0
3253
- }));
3254
- },
3255
- onConversationIdChange: (e) => this._emitConversationIdChanged(e),
3256
- onStep: (e) => {
3257
- this.dispatchEvent(new CustomEvent("luzmo-step", {
3258
- detail: e,
3259
- bubbles: !0,
3260
- composed: !0
3261
- }));
3262
- },
3263
- onComplete: (e) => {
3264
- this.dispatchEvent(new CustomEvent("luzmo-complete", {
3265
- detail: e,
3266
- bubbles: !0,
3267
- composed: !0
3268
- }));
3269
- },
3270
- onPromptStopped: () => {
3271
- this.dispatchEvent(new CustomEvent("luzmo-stop", {
3272
- bubbles: !0,
3273
- composed: !0
3274
- }));
3275
- }
3276
- };
3277
- }
3278
- _buildSessionConfig() {
3279
- return {
3280
- agent: this.agent,
3281
- authKey: this.authKey,
3282
- authToken: this.authToken,
3283
- apiUrl: this.apiUrl,
3284
- apiVersion: this.apiVersion,
3285
- stream: this.stream,
3286
- conversationId: this.conversationId,
3287
- chart: this.chart,
3288
- dashboard: this.dashboard,
3289
- currentScreenMode: this.currentScreenMode,
3290
- localeId: this.localeId,
3291
- timezoneId: this.timezoneId,
3292
- task: this.task,
3293
- modelPreference: this.modelPreference,
3294
- requireDataset: this.requireDataset
3295
- };
3296
- }
3297
- _emitConversationIdChanged(e) {
3298
- this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
3299
- detail: { conversationId: e },
3300
- bubbles: !0,
3301
- composed: !0
3302
- }));
3303
- }
3304
- async _restoreViaSession(e, t) {
3305
- await this._session.requireSession().restore({
3306
- restoreToMessageId: e,
3307
- messageIndex: t
3308
- });
3309
- }
3310
- async _handleRestoreState(e, t) {
3311
- if (e.apiMessageId && this.agent === "item") try {
3312
- await this._restoreViaSession(e.apiMessageId, t);
3313
- } catch (e) {
3314
- console.error("AI restore error:", e);
3315
- }
3316
- }
3317
- _handleDatasetSelected(e) {
3318
- this._session.requireSession().addDataset(e.detail);
3319
- }
3320
- _handleDatasetRemoved(e) {
3321
- this._session.requireSession().removeDataset(e.detail.id);
3322
- }
3323
- async _submitViaSession(e, t = {}) {
3324
- let n = this._session.requireSession();
3325
- if (n.isDatasetRequirementMet()) {
3326
- this._textareaValue = "";
3327
- try {
3328
- await n.submit({
3329
- prompt: e,
3330
- ...t
3331
- });
3332
- } catch (e) {
3333
- e.name !== "AbortError" && console.error("AI prompt session error:", e);
3334
- }
3335
- }
3336
- }
3337
- async _handlePromptSubmitted(e) {
3338
- await this._submitViaSession(e.detail.prompt);
3339
- }
3340
- _handlePromptStopped() {
3341
- let e = this._session.current;
3342
- if (this._textareaValue = "", e) {
3343
- e.abort({
3344
- notify: !0,
3345
- cancelledMessage: this.cancelledMessage ?? void 0
3346
- });
3347
- return;
3348
- }
3349
- this.dispatchEvent(new CustomEvent("luzmo-stop", {
3350
- bubbles: !0,
3351
- composed: !0
3352
- }));
3353
- }
3354
- async _handleEmptyStateSuggestionSelected(e) {
3355
- let { prompt: t, selectedDatasets: n } = e.detail, r = this._session.requireSession();
3356
- n?.length && r.setSelectedDatasets(n), await this._submitViaSession(t);
3357
- }
3358
- async _processInitialPrompt() {
3359
- !this.initialPrompt || this.initialPrompt === this._lastProcessedInitialPrompt || this._session.requireSession().isDatasetRequirementMet() && (this._lastProcessedInitialPrompt = this.initialPrompt, await this._submitViaSession(this.initialPrompt, { skipUserMessage: !0 }));
3360
- }
3361
- connectedCallback() {
3362
- super.connectedCallback(), this._session.connect();
3363
- }
3364
- disconnectedCallback() {
3365
- super.disconnectedCallback(), this._session.teardown();
3366
- }
3367
- _scrollToBottom() {
3368
- let e = this.shadowRoot?.querySelector(".chat-messages-container");
3369
- e && requestAnimationFrame(() => {
3370
- requestAnimationFrame(() => {
3371
- e.scrollTop = e.scrollHeight;
3372
- });
3373
- });
3374
- }
3375
- updated(e) {
3376
- super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange(), this.updateComplete.then(() => this._syncAssistantMessageActionsVisibility());
3377
- }
3378
- _syncSession(e) {
3379
- if (e.has("chatSession")) {
3380
- this._session.setSession(this.chatSession);
3381
- return;
3382
- }
3383
- this._session.syncProperties(e);
3384
- }
3385
- _handleInitialPromptChange() {
3386
- this.initialPrompt && this.initialPrompt !== this._lastProcessedInitialPrompt ? this._processInitialPrompt() : this.initialPrompt || (this._lastProcessedInitialPrompt = null);
3387
- }
3388
- _renderMarkdown(e) {
3389
- let t = String(Q.parse(e, { async: !1 }));
3390
- return st.sanitize(t, {
3391
- 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("."),
3392
- ALLOWED_ATTR: [
3393
- "href",
3394
- "title",
3395
- "target",
3396
- "rel"
3397
- ],
3398
- ALLOW_DATA_ATTR: !1,
3399
- FORBID_TAGS: [
3400
- "script",
3401
- "style",
3402
- "iframe",
3403
- "object",
3404
- "embed",
3405
- "link",
3406
- "form",
3407
- "input",
3408
- "button"
3409
- ],
3410
- FORBID_ATTR: [
3411
- "onerror",
3412
- "onload",
3413
- "onclick",
3414
- "onmouseover",
3415
- "onfocus",
3416
- "onblur"
3417
- ]
3418
- });
3419
- }
3420
- _renderProgress() {
3421
- let { progress: e, progressCollapsed: t } = this._getRenderState();
3422
- return e?.children?.length ? o`
3423
- <luzmo-progress-steps
3424
- .progress=${e}
3425
- ?collapsed=${t}
3426
- size="s"
3427
- ></luzmo-progress-steps>
3428
- ` : s;
3429
- }
3430
- _isLastAiMessageWithProgress(e, t) {
3431
- 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;
3432
- return !1;
3433
- }
3434
- _syncAssistantMessageActionsVisibility() {
3435
- let e = this.shadowRoot?.querySelector(`slot[name="${t.assistantMessageActionsSlot}"]`);
3436
- if (!e) {
3437
- this._setAssistantMessageActionsHasContent(!1);
3438
- return;
3439
- }
3440
- this._setAssistantMessageActionsHasContent(e.assignedElements({ flatten: !0 }).length > 0);
3441
- }
3442
- _setAssistantMessageActionsHasContent(e) {
3443
- e !== this._assistantMessageActionsHasContent && (this._assistantMessageActionsHasContent = e);
3444
- }
3445
- _renderAssistantMessageActions(e, n) {
3446
- return !n || e.id !== n ? s : o`
3447
- <div
3448
- class="assistant-message-actions ${this._assistantMessageActionsHasContent ? "assistant-message-actions--has-content" : ""}"
3449
- >
3450
- <slot
3451
- name=${t.assistantMessageActionsSlot}
3452
- @slotchange=${this._handleAssistantMessageActionsSlotChange}
3453
- ></slot>
3454
- </div>
3455
- `;
3456
- }
3457
- _renderRestoreMenu(e, t, a, c = !1) {
3458
- if (!(this.agent === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== a)) return s;
3459
- let l = `context-menu-trigger-${e.apiMessageId}`;
3460
- return o`
3461
- <div class="assistant-context-menu">
3462
- <button
3463
- id=${l}
3464
- class="assistant-context-menu-trigger"
3465
- type="button"
3466
- aria-label=${n("Open restore menu", { desc: "Accessible label for the ai chat restore menu trigger" })}
3467
- aria-haspopup="menu"
3468
- ?disabled=${c}
3469
- >
3470
- ${i(r)}
3471
- </button>
3472
- <luzmo-overlay
3473
- trigger="${l}@click"
3474
- placement="bottom-end"
3475
- >
3476
- <luzmo-popover>
3477
- <button
3478
- class="assistant-context-menu-item"
3479
- type="button"
3480
- ?disabled=${c}
3481
- @click=${() => this._handleRestoreState(e, t)}
3482
- >
3483
- ${n("Restore state", { desc: "Context menu action that restores the chart to this message state" })}
3484
- </button>
3485
- </luzmo-popover>
3486
- </luzmo-overlay>
3487
- </div>
3488
- `;
3489
- }
3490
- _renderMessages() {
3491
- 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);
3492
- return a.map((t) => {
3493
- let c = !!t.progress?.children?.length, l = c && this._isLastAiMessageWithProgress(t, a), u = c && (r || n || !l), ee = c ? o`
3494
- <luzmo-progress-steps
3495
- .progress=${t.progress}
3496
- ?condensed=${u}
3497
- collapsed
3498
- no-animate
3499
- size="s"
3500
- ></luzmo-progress-steps>
3501
- ` : s;
3502
- if (t.type === "user") return o`
3503
- <luzmo-chat-message
3504
- avatar-placement="bottom"
3505
- position="right"
3506
- variant="primary"
3507
- size="s"
3508
- >
3509
- ${t.message}
3510
- </luzmo-chat-message>
3511
- `;
3512
- 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>`;
3513
- return o`
3514
- ${ee}
3515
- <div class="assistant-message-wrapper">
3516
- <div class="assistant-message-body">
3517
- <luzmo-chat-message
3518
- class=${ne}
3519
- role=${t.isError ? "alert" : s}
3520
- avatar-placement="bottom"
3521
- position="left"
3522
- quiet
3523
- size="s"
3524
- >
3525
- ${re}
3526
- </luzmo-chat-message>
3527
-
3528
- ${this._renderRestoreMenu(t, te, i, r)}
3529
- </div>
3530
-
3531
- ${this._renderAssistantMessageActions(t, i)}
3532
- </div>
3533
- `;
3534
- });
3535
- }
3536
- _renderStreamingResponse() {
3537
- let { inflightMessage: e } = this._getRenderState();
3538
- return e?.message ? o`
3539
- <luzmo-chat-message
3540
- avatar-placement="bottom"
3541
- position="left"
3542
- quiet
3543
- size="s"
3544
- >
3545
- <div class="markdown-content">${d(this._renderMarkdown(e.message))}</div>
3546
- </luzmo-chat-message>
3547
- ` : s;
3548
- }
3549
- _renderLoadingMessage() {
3550
- let { isGenerating: e, progress: t, inflightMessage: r } = this._getRenderState();
3551
- if (!e || t?.children?.length || r?.message) return s;
3552
- 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" });
3553
- return o`
3554
- <luzmo-chat-message
3555
- avatar-placement="bottom"
3556
- position="left"
3557
- quiet
3558
- size="s"
3559
- >
3560
- <div class="loading-message" role="status" aria-live="polite">
3561
- <span class="icon-lg">${i(a, { className: "spin" })}</span>
3562
- <span class="loading-message-text">${this.loadingMessage || l}</span>
3563
- </div>
3564
- </luzmo-chat-message>
3565
- `;
3566
- }
3567
- _renderEmptyState() {
3568
- if (this._getRenderState().messages.length > 0) return s;
3569
- let e = n("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
3570
- return o`
3571
- <luzmo-ai-chat-empty-state
3572
- .title=${this.emptyStateTitle || e}
3573
- .subtitle=${t ? this.emptyStateSubtitle : ""}
3574
- .suggestions=${this.emptyStateSuggestions}
3575
- ?disabled=${this.disabled || this._getRenderState().isGenerating}
3576
- @luzmo-suggestion-selected=${this._handleEmptyStateSuggestionSelected}
3577
- ></luzmo-ai-chat-empty-state>
3578
- `;
3579
- }
3580
- render() {
3581
- let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
3582
- return o`
3583
- <div class="chat-container" role="region" aria-label=${n("AI Chat", { desc: "Accessible label for AI chat region" })}>
3584
- <div class="chat-messages-container" role="log" aria-live="polite">
3585
- ${this._renderEmptyState()}
3586
- ${this._renderMessages()}
3587
- ${this._renderProgress()}
3588
- ${this._renderStreamingResponse()}
3589
- ${this._renderLoadingMessage()}
3590
- </div>
3591
-
3592
- <luzmo-ai-interaction-textarea
3593
- role="group"
3594
- aria-label=${n("AI prompt input", { desc: "Accessible label for the ai chat prompt input area" })}
3595
- .value=${this._textareaValue}
3596
- .selectedDatasets=${e}
3597
- .placeholder=${this.placeholder}
3598
- ?disabled=${this.disabled}
3599
- ?is-generating=${t}
3600
- ?stoppable=${this.stoppable}
3601
- ?hide-dataset-button=${this.hideDatasetButton}
3602
- ?hide-dataset-icons=${this.hideDatasetIcons}
3603
- ?disable-dataset-modification=${this.disableDatasetModification}
3604
- ?hide-selected-datasets=${this.hideSelectedDatasets}
3605
- ?disable-column-mentions=${this.disableColumnMentions}
3606
- ?require-dataset=${this.requireDataset}
3607
- auth-key=${this.authKey}
3608
- auth-token=${this.authToken}
3609
- api-url=${this.apiUrl}
3610
- app-server=${this.appServer}
3611
- ?flag-opendata=${this.flagOpendata}
3612
- @prompt-submitted=${this._handlePromptSubmitted}
3613
- @prompt-stopped=${this._handlePromptStopped}
3614
- @dataset-selected=${this._handleDatasetSelected}
3615
- @dataset-removed=${this._handleDatasetRemoved}
3616
- ></luzmo-ai-interaction-textarea>
3617
- </div>
3618
- `;
3619
- }
3620
- };
3621
- t([l({ type: Array })], $.prototype, "messages", void 0), t([l({
3622
- type: Array,
3623
- attribute: "selected-datasets"
3624
- })], $.prototype, "selectedDatasets", void 0), t([l({ type: String })], $.prototype, "placeholder", void 0), t([l({
3625
- type: Boolean,
3626
- reflect: !0
3627
- })], $.prototype, "disabled", void 0), t([l({
3628
- type: Boolean,
3629
- reflect: !0
3630
- })], $.prototype, "stoppable", void 0), t([l({
3631
- type: Boolean,
3632
- attribute: "show-assistant-context-menu"
3633
- })], $.prototype, "showAssistantContextMenu", void 0), t([l({
3634
- type: String,
3635
- attribute: "auth-key"
3636
- })], $.prototype, "authKey", void 0), t([l({
3637
- type: String,
3638
- attribute: "auth-token"
3639
- })], $.prototype, "authToken", void 0), t([l({
3640
- type: String,
3641
- attribute: "api-url"
3642
- })], $.prototype, "apiUrl", void 0), t([l({
3643
- type: String,
3644
- attribute: "app-server"
3645
- })], $.prototype, "appServer", void 0), t([l({
3646
- type: Boolean,
3647
- attribute: "flag-opendata"
3648
- })], $.prototype, "flagOpendata", void 0), t([l({
3649
- type: Boolean,
3650
- attribute: "hide-dataset-button"
3651
- })], $.prototype, "hideDatasetButton", void 0), t([l({
3652
- type: Boolean,
3653
- attribute: "hide-dataset-icons"
3654
- })], $.prototype, "hideDatasetIcons", void 0), t([l({
3655
- type: Boolean,
3656
- attribute: "disable-dataset-modification"
3657
- })], $.prototype, "disableDatasetModification", void 0), t([l({
3658
- type: Boolean,
3659
- attribute: "hide-selected-datasets"
3660
- })], $.prototype, "hideSelectedDatasets", void 0), t([l({
3661
- type: Boolean,
3662
- attribute: "disable-column-mentions"
3663
- })], $.prototype, "disableColumnMentions", void 0), t([l({
3664
- type: Boolean,
3665
- attribute: "require-dataset"
3666
- })], $.prototype, "requireDataset", void 0), t([l({ type: String })], $.prototype, "agent", void 0), t([l({ type: String })], $.prototype, "task", void 0), t([l({
3667
- type: String,
3668
- attribute: "model-preference"
3669
- })], $.prototype, "modelPreference", void 0), t([l({ attribute: !1 })], $.prototype, "chatSession", void 0), t([l({
3670
- type: String,
3671
- attribute: "conversation-id"
3672
- })], $.prototype, "conversationId", void 0), t([l({
3673
- type: Object,
3674
- attribute: "chart"
3675
- })], $.prototype, "chart", void 0), t([l({ type: Object })], $.prototype, "dashboard", void 0), t([l({
3676
- type: String,
3677
- attribute: "current-screen-mode"
3678
- })], $.prototype, "currentScreenMode", void 0), t([l({
3679
- type: String,
3680
- attribute: "locale-id"
3681
- })], $.prototype, "localeId", void 0), t([l({
3682
- type: String,
3683
- attribute: "timezone-id"
3684
- })], $.prototype, "timezoneId", void 0), t([l({
3685
- type: String,
3686
- attribute: "api-version"
3687
- })], $.prototype, "apiVersion", void 0), t([l({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], $.prototype, "stream", void 0), t([l({
3688
- type: String,
3689
- attribute: "loading-message"
3690
- })], $.prototype, "loadingMessage", void 0), t([l({
3691
- type: String,
3692
- attribute: "cancelled-message"
3693
- })], $.prototype, "cancelledMessage", void 0), t([l({
3694
- type: String,
3695
- attribute: "initial-prompt"
3696
- })], $.prototype, "initialPrompt", void 0), t([l({
3697
- type: String,
3698
- attribute: "empty-state-title"
3699
- })], $.prototype, "emptyStateTitle", void 0), t([l({
3700
- type: String,
3701
- attribute: "empty-state-subtitle"
3702
- })], $.prototype, "emptyStateSubtitle", void 0), t([l({
3703
- type: Array,
3704
- attribute: !1
3705
- })], $.prototype, "emptyStateSuggestions", void 0), t([u()], $.prototype, "_textareaValue", void 0), t([u()], $.prototype, "_assistantMessageActionsHasContent", void 0);
3706
- //#endregion
3707
- //#region src/components/ai-chat/ai-chat-events.ts
3708
- function Fr(e) {
3709
- return e.recognized === !0;
3710
- }
3711
- //#endregion
3712
- //#region src/components/ai-chat/index.ts
3713
- customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", $);
3714
- //#endregion
3715
- 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 };