@luzmo/analytics-components-kit 1.0.9-beta.11 → 1.0.9-beta.12
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.
- package/components/add-to-dashboard/index.cjs +1 -1
- package/components/add-to-dashboard/index.js +1 -1
- package/components/{add-to-dashboard-nYUaDghN.cjs → add-to-dashboard-D11b-HS7.cjs} +1 -1
- package/components/{add-to-dashboard-BY70QBzE.js → add-to-dashboard-KLYGiqKE.js} +4 -4
- package/components/ai-chat/ai-chat-events.d.ts +5 -1
- package/components/ai-chat/ai-chat.d.ts +36 -1
- package/components/ai-chat/helpers/assistant-message-feedback.d.ts +26 -0
- package/components/ai-chat/index.cjs +1 -1
- package/components/ai-chat/index.d.ts +1 -1
- package/components/ai-chat/index.js +2 -2
- package/components/ai-chat/session/ai-chat-session.d.ts +8 -1
- package/components/ai-chat/stream/chunk-extractors.d.ts +8 -0
- package/components/ai-chat/stream/index.d.ts +1 -1
- package/components/ai-chat/stream/types.d.ts +6 -0
- package/components/ai-chat-C0XZ_pvG.cjs +393 -0
- package/components/{ai-chat-DmDtBF47.js → ai-chat-CYrWJ8Wa.js} +873 -734
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +1 -1
- package/components/{ai-interaction-textarea-6ECwAdeT.js → ai-interaction-textarea-CT698Pph.js} +5 -5
- package/components/{ai-interaction-textarea-CRyyTj_B.cjs → ai-interaction-textarea-Da1ErRHy.cjs} +1 -1
- package/components/{area-chart-positioning.config-CoCdjr2E.cjs → area-chart-positioning.config-DWLy-uS1.cjs} +1 -1
- package/components/{area-chart-positioning.config-o-uJPEr5.js → area-chart-positioning.config-Dpi4gakJ.js} +1 -1
- package/components/{bar-chart-positioning.config-fsB82756.cjs → bar-chart-positioning.config-B3U1-22D.cjs} +1 -1
- package/components/{bar-chart-positioning.config-CZgrS6lc.js → bar-chart-positioning.config-DDv8hNyi.js} +1 -1
- package/components/{base-BmvsQ-s1.cjs → base-BdkFbMZR.cjs} +1 -1
- package/components/{base-CrpOMVeU.js → base-Cvcpdy0h.js} +1 -1
- package/components/{box-plot-positioning.config-CDq460FI.js → box-plot-positioning.config-1BuF6Gjj.js} +1 -1
- package/components/{box-plot-positioning.config-BMfGGDfe.cjs → box-plot-positioning.config-lfqDTCdY.cjs} +1 -1
- package/components/{bubble-chart-positioning.config-C9MmTtTX.cjs → bubble-chart-positioning.config-DVBuVeSs.cjs} +1 -1
- package/components/{bubble-chart-positioning.config-DWfz4tud.js → bubble-chart-positioning.config-V8KfvCkY.js} +1 -1
- package/components/{bullet-chart-positioning.config-BwHPM5ui.cjs → bullet-chart-positioning.config-CtlmKdzp.cjs} +1 -1
- package/components/{bullet-chart-positioning.config-DmSlVIjL.js → bullet-chart-positioning.config-IrK6KYbE.js} +1 -1
- package/components/{choropleth-map-positioning.config-cjBzi_Db.js → choropleth-map-positioning.config-BSb0ig5Y.js} +1 -1
- package/components/{choropleth-map-positioning.config-C0m6zzD3.cjs → choropleth-map-positioning.config-ahRkoZNv.cjs} +1 -1
- package/components/{circle-pack-chart-positioning.config-BAFFQSHe.cjs → circle-pack-chart-positioning.config-CS1dbWgR.cjs} +1 -1
- package/components/{circle-pack-chart-positioning.config-CY2rLb57.js → circle-pack-chart-positioning.config-DfQztqxL.js} +1 -1
- package/components/{circular-gauge-positioning.config-6pZUNxYa.js → circular-gauge-positioning.config-1HH3Rw2L.js} +1 -1
- package/components/{circular-gauge-positioning.config-BfWAjAY2.cjs → circular-gauge-positioning.config-BeLsxbow.cjs} +1 -1
- package/components/{column-chart-positioning.config-xgRuA_l5.cjs → column-chart-positioning.config-CLZuZiVa.cjs} +1 -1
- package/components/{column-chart-positioning.config-hrAvNd7T.js → column-chart-positioning.config-DVeVPtzS.js} +1 -1
- package/components/{combination-chart-positioning.config-BI8HroaG.js → combination-chart-positioning.config-BPXqur2s.js} +1 -1
- package/components/{combination-chart-positioning.config-D0TU4hge.cjs → combination-chart-positioning.config-DKNRMoZN.cjs} +1 -1
- package/components/{conditional-number-positioning.config-CWaDhMLA.js → conditional-number-positioning.config-BWJAnFTq.js} +1 -1
- package/components/{conditional-number-positioning.config-B_yISWne.cjs → conditional-number-positioning.config-HXcO-Ej5.cjs} +1 -1
- package/components/data-field/index.cjs +1 -1
- package/components/data-field/index.js +1 -1
- package/components/{data-field-D4YFqg1H.js → data-field-BMeV_pUL.js} +3 -3
- package/components/{data-field-Hi-ITTzx.cjs → data-field-C204ZKd3.cjs} +1 -1
- package/components/data-field-level/index.cjs +1 -1
- package/components/data-field-level/index.js +1 -1
- package/components/{data-field-level-BWQPtFP5.cjs → data-field-level-Cv4Vgi_o.cjs} +1 -1
- package/components/{data-field-level-CB5GtdU5.js → data-field-level-Dpta9m5I.js} +2 -2
- package/components/data-field-panel/index.cjs +1 -1
- package/components/data-field-panel/index.js +1 -1
- package/components/{data-field-panel-64HoViNT.js → data-field-panel-Beg-fx10.js} +3 -3
- package/components/{data-field-panel-DzKwmQi_.cjs → data-field-panel-D71J7_IE.cjs} +1 -1
- package/components/data-fields-select/data-fields-select.d.ts +2 -0
- package/components/data-fields-select/index.cjs +1 -1
- package/components/data-fields-select/index.js +1 -1
- package/components/{data-fields-select-BOwoWq0j.js → data-fields-select-BKoQMwZd.js} +4 -1
- package/components/{data-fields-select-DXv6PQHG.cjs → data-fields-select-CBTGcYRL.cjs} +1 -1
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +1 -1
- package/components/{dataset-selector-list-_AL1-GWw.cjs → dataset-selector-list-D9ZmjTyU.cjs} +1 -1
- package/components/{dataset-selector-list-DFC2bvn0.js → dataset-selector-list-DFMfknD5.js} +1 -1
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +1 -1
- package/components/{dataset-selector-row-By2ko-Rd.cjs → dataset-selector-row-Bq_yYpb9.cjs} +1 -1
- package/components/{dataset-selector-row-DC6mrVyF.js → dataset-selector-row-DFPwXde5.js} +5 -5
- package/components/{de-Yl3kqB03.js → de-DPhR2zPG.js} +4 -0
- package/components/de-DUAXVtRS.cjs +20 -0
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +1 -1
- package/components/display-settings-BkbdgMvh.cjs +143 -0
- package/components/{display-settings-BsCKV9ae.js → display-settings-MnSyqIog.js} +17 -16
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +1 -1
- package/components/{display-settings-binning-CkrbhPVB.js → display-settings-binning-BQYxWvFI.js} +3 -3
- package/components/{display-settings-binning-BdtxayZT.cjs → display-settings-binning-DqcCzBrG.cjs} +1 -1
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +1 -1
- package/components/{display-settings-datetime-CpFyrcGk.cjs → display-settings-datetime-9WraOyqr.cjs} +1 -1
- package/components/{display-settings-datetime-mVh5Tjrx.js → display-settings-datetime-D5UwdwAI.js} +3 -3
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +1 -1
- package/components/{display-settings-grand-totals-D7unOEKl.js → display-settings-grand-totals-DYSVU-9G.js} +3 -3
- package/components/{display-settings-grand-totals-CwOGoE06.cjs → display-settings-grand-totals-w2Zbxwt4.cjs} +1 -1
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +1 -1
- package/components/{display-settings-numeric-DhiXPU3f.cjs → display-settings-numeric-DGyMDswg.cjs} +1 -1
- package/components/{display-settings-numeric-DDZyFNFF.js → display-settings-numeric-YOsAAqyJ.js} +4 -4
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +1 -1
- package/components/{display-settings-period-over-period-Hd172SzT.js → display-settings-period-over-period-CYwQ6KQI.js} +3 -3
- package/components/{display-settings-period-over-period-BNFjbgP0.cjs → display-settings-period-over-period-zme6yEAi.cjs} +1 -1
- package/components/{donut-chart-positioning.config-B2CrxOig.js → donut-chart-positioning.config-ovPyzL2x.js} +1 -1
- package/components/{donut-chart-positioning.config-DQb53kWI.cjs → donut-chart-positioning.config-xwoqdu-c.cjs} +1 -1
- package/components/{es-Ctf1SIsp.js → es-C9faREu_.js} +4 -0
- package/components/es-DKP3YRmv.cjs +20 -0
- package/components/{evolution-number-positioning.config-BdH8pv6_.js → evolution-number-positioning.config-B-H5aEXI.js} +1 -1
- package/components/{evolution-number-positioning.config-BzBsGcD4.cjs → evolution-number-positioning.config-CfcajD4B.cjs} +1 -1
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +1 -1
- package/components/{filter-expression-picker-Bn_jAdQX.cjs → filter-expression-picker-BBZ7KHqG.cjs} +1 -1
- package/components/{filter-expression-picker-Cjr8xWxy.js → filter-expression-picker-kLhzHUEW.js} +1 -1
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +1 -1
- package/components/{filter-item-D6y8eCmG.js → filter-item-Dgh9nHGz.js} +6 -6
- package/components/{filter-item-CHJDVOju.cjs → filter-item-DnYGrUzZ.cjs} +1 -1
- package/components/filter-parameter-picker/index.cjs +1 -1
- package/components/filter-parameter-picker/index.js +1 -1
- package/components/{filter-parameter-picker-C955tF0T.js → filter-parameter-picker-DhTMuymq.js} +3 -3
- package/components/{filter-parameter-picker-jyrh3POQ.cjs → filter-parameter-picker-UwSmMkoB.cjs} +1 -1
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +1 -1
- package/components/{filter-value-picker-DmWiNLZH.cjs → filter-value-picker-CPuUfjLo.cjs} +1 -1
- package/components/{filter-value-picker-B8nA8hTV.js → filter-value-picker-Ch4k6xIK.js} +4 -4
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +1 -1
- package/components/{filter-value-picker-datetime-U4XWKSFx.cjs → filter-value-picker-datetime-BHtjVhx1.cjs} +1 -1
- package/components/{filter-value-picker-datetime-BAhXn1BS.js → filter-value-picker-datetime-hTOIBHMi.js} +1 -1
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +1 -1
- package/components/{filter-value-picker-hierarchy-CUPz5Ggs.js → filter-value-picker-hierarchy-Bu1OiV4T.js} +2 -2
- package/components/{filter-value-picker-hierarchy-1ya1_rS3.cjs → filter-value-picker-hierarchy-CTZQfWEJ.cjs} +1 -1
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +1 -1
- package/components/{filter-value-picker-numeric-DrHdHj31.cjs → filter-value-picker-numeric-BOY9I-y3.cjs} +1 -1
- package/components/{filter-value-picker-numeric-D8mLaxzj.js → filter-value-picker-numeric-tstYPaES.js} +1 -1
- package/components/filters/index.cjs +1 -1
- package/components/filters/index.js +1 -1
- package/components/filters-B_43Qb_P.cjs +199 -0
- package/components/{filters-Byy8HE19.js → filters-ESeCEQPQ.js} +4 -4
- package/components/formula/index.cjs +1 -1
- package/components/formula/index.js +1 -1
- package/components/{formula-D_ipR6d1.js → formula--lmxX7EE.js} +2 -2
- package/components/{formula-C6dPJyKm.cjs → formula-CC33nJ0T.cjs} +1 -1
- package/components/{formula-codemirror-CdlIly66.js → formula-codemirror-CD2ejhzw.js} +6 -6
- package/components/{formula-codemirror-C1UFMf6i.cjs → formula-codemirror-za5kEnKc.cjs} +1 -1
- package/components/{formula-display-store-B0ifmvCi.cjs → formula-display-store-B1qQtQbU.cjs} +1 -1
- package/components/{formula-display-store-CfObcBCd.js → formula-display-store-dxzteJ_B.js} +3 -3
- package/components/formula-editor/index.cjs +1 -1
- package/components/formula-editor/index.js +3 -3
- package/components/{formula-editor-B9ikCsLK.cjs → formula-editor-BDckEUnh.cjs} +1 -1
- package/components/{formula-editor-DJ-0AVCl.js → formula-editor-DNduncPi.js} +6 -6
- package/components/formula-field/index.cjs +1 -1
- package/components/formula-field/index.js +1 -1
- package/components/{formula-field-CNqn6Xbh.cjs → formula-field-Cs7SaL-J.cjs} +1 -1
- package/components/{formula-field-Bq-RYt0H.js → formula-field-dSYKahSQ.js} +1 -1
- package/components/{formula-input-base-Dple-9bo.js → formula-input-base-CzMOxMBx.js} +1 -1
- package/components/{formula-input-base-KSmmN1uI.cjs → formula-input-base-DCI3s_eW.cjs} +1 -1
- package/components/fr-BNVUrX6D.cjs +20 -0
- package/components/{fr-zWhjQv4B.js → fr-Dfp7e-Vj.js} +4 -0
- package/components/{funnel-chart-positioning.config-DleNZIG-.cjs → funnel-chart-positioning.config-2mR2EyN4.cjs} +1 -1
- package/components/{funnel-chart-positioning.config-DgRle8n1.js → funnel-chart-positioning.config-Bth5tggl.js} +1 -1
- package/components/{get-dataset-name-trrlomzY.js → get-dataset-name-CSvAYeJM.js} +1 -1
- package/components/{get-dataset-name-3UfKdy0m.cjs → get-dataset-name-DhYRY3e-.cjs} +1 -1
- package/components/{groupings-B55Oba6e.js → groupings-14w1cCc3.js} +1 -1
- package/components/{groupings-DEpTt8DV.cjs → groupings-DxuknvWu.cjs} +1 -1
- package/components/{heat-map-positioning.config-BTabq_f9.js → heat-map-positioning.config-B4bGYbFk.js} +1 -1
- package/components/{heat-map-positioning.config-DCB3Eagz.cjs → heat-map-positioning.config-CwcQrF53.cjs} +1 -1
- package/components/{heat-table-positioning.config-pK8Wn1dw.js → heat-table-positioning.config-BXCOZwaN.js} +1 -1
- package/components/{heat-table-positioning.config-Dnu133l4.cjs → heat-table-positioning.config-D8UNVnTk.cjs} +1 -1
- package/components/{hexbin-map-positioning.config-DjYp-lX8.js → hexbin-map-positioning.config-B-WZWfLq.js} +1 -1
- package/components/{hexbin-map-positioning.config-IqRt8f29.cjs → hexbin-map-positioning.config-Dn-bgQZ8.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +55 -55
- package/components/interactive-viz-item/index.cjs +1 -1
- package/components/interactive-viz-item/index.js +1 -1
- package/components/{interactive-viz-item-D6lWVMHb.js → interactive-viz-item-CMxReAvq.js} +3 -3
- package/components/{interactive-viz-item-CM-LoEa5.cjs → interactive-viz-item-CQz2XYj8.cjs} +1 -1
- package/components/item-grid/index.cjs +1 -1
- package/components/item-grid/index.js +2 -2
- package/components/{item-grid-CbXKsQm4.js → item-grid-BYqUrmJa.js} +2 -2
- package/components/{item-grid-DTishUCb.cjs → item-grid-DKpxUsMo.cjs} +1 -1
- package/components/item-grid-item-actions-menu/index.cjs +1 -1
- package/components/item-grid-item-actions-menu/index.js +1 -1
- package/components/{item-grid-item-actions-menu-B7ylgTwO.js → item-grid-item-actions-menu-D3WeDgxI.js} +2 -2
- package/components/item-grid-item-actions-menu-Dhv9sTNi.cjs +52 -0
- package/components/item-option/index.cjs +1 -1
- package/components/item-option/index.js +1 -1
- package/components/{item-option-BTSV33ft.cjs → item-option-BWGwUzLt.cjs} +1 -1
- package/components/{item-option-BUju6ZE1.js → item-option-DYXzQ13_.js} +1 -1
- package/components/item-option-action-button-group/index.cjs +1 -1
- package/components/item-option-action-button-group/index.js +1 -1
- package/components/{item-option-action-button-group-DnTBh3R4.js → item-option-action-button-group-B3PD2K1l.js} +2 -2
- package/components/{item-option-action-button-group-CuDeyDRi.cjs → item-option-action-button-group-Bc26loDM.cjs} +1 -1
- package/components/{item-option-base-C6RQH9M8.cjs → item-option-base-B6axTng-.cjs} +1 -1
- package/components/{item-option-base-BIDIiNfI.js → item-option-base-BJdtApx5.js} +2 -2
- package/components/item-option-color-palette-picker/index.cjs +1 -1
- package/components/item-option-color-palette-picker/index.js +1 -1
- package/components/{item-option-color-palette-picker-DbsqP2zA.js → item-option-color-palette-picker-BxIWdQLy.js} +1 -1
- package/components/{item-option-color-palette-picker-DsG-wxGB.cjs → item-option-color-palette-picker-C1t_nY1O.cjs} +1 -1
- package/components/item-option-color-picker/index.cjs +1 -1
- package/components/item-option-color-picker/index.js +1 -1
- package/components/{item-option-color-picker-BUN5YK-t.cjs → item-option-color-picker-1BzUBXz-.cjs} +1 -1
- package/components/{item-option-color-picker-CKGUj3cW.js → item-option-color-picker-9DEx5w-z.js} +1 -1
- package/components/item-option-color-range/index.cjs +1 -1
- package/components/item-option-color-range/index.js +1 -1
- package/components/{item-option-color-range-BN81ePAI.cjs → item-option-color-range-B_gmxlEl.cjs} +1 -1
- package/components/{item-option-color-range-dMehrwqA.js → item-option-color-range-DBtnzfJa.js} +2 -2
- package/components/item-option-guidelines/index.cjs +1 -1
- package/components/item-option-guidelines/index.js +1 -1
- package/components/{item-option-guidelines-Bn1HSCgL.js → item-option-guidelines-DhuU5VZu.js} +4 -4
- package/components/item-option-guidelines-Dv4EoY3s.cjs +135 -0
- package/components/item-option-multi-language-field/index.cjs +1 -1
- package/components/item-option-multi-language-field/index.js +1 -1
- package/components/{item-option-multi-language-field-BFgbOzMM.js → item-option-multi-language-field-BoXUM6-u.js} +1 -1
- package/components/{item-option-multi-language-field-Du609wC_.cjs → item-option-multi-language-field-C_eP2I2u.cjs} +1 -1
- package/components/item-option-number-field/index.cjs +1 -1
- package/components/item-option-number-field/index.js +1 -1
- package/components/{item-option-number-field-CDcf6_4D.js → item-option-number-field-BrEXkjWl.js} +1 -1
- package/components/{item-option-number-field-CVAtj0UX.cjs → item-option-number-field-kXpCE4FI.cjs} +1 -1
- package/components/item-option-panel/index.cjs +1 -1
- package/components/item-option-panel/index.js +1 -1
- package/components/{item-option-panel-0iHLl9-q.cjs → item-option-panel-CB338Rgo.cjs} +1 -1
- package/components/{item-option-panel-DUlIB6qj.js → item-option-panel-CUoozNxD.js} +2 -2
- package/components/item-option-picker/index.cjs +1 -1
- package/components/item-option-picker/index.js +1 -1
- package/components/{item-option-picker-Dkc3nd3x.cjs → item-option-picker-BvT4ITzX.cjs} +1 -1
- package/components/{item-option-picker-ClKAGpgs.js → item-option-picker-fKn763j4.js} +1 -1
- package/components/item-option-position-picker/index.cjs +1 -1
- package/components/item-option-position-picker/index.js +1 -1
- package/components/{item-option-position-picker-O8PpyiRv.js → item-option-position-picker-D7smHuW7.js} +1 -1
- package/components/{item-option-position-picker-qCKh0Mfs.cjs → item-option-position-picker-D96vKNTF.cjs} +1 -1
- package/components/item-option-positions-number-field/index.cjs +1 -1
- package/components/item-option-positions-number-field/index.js +1 -1
- package/components/{item-option-positions-number-field-CBx4uQ39.js → item-option-positions-number-field-BPEATH4R.js} +1 -1
- package/components/{item-option-positions-number-field-Dfe4ufnF.cjs → item-option-positions-number-field-C4IOForB.cjs} +1 -1
- package/components/item-option-radio-button-group/index.cjs +1 -1
- package/components/item-option-radio-button-group/index.js +1 -1
- package/components/{item-option-radio-button-group-B5OVbLRg.cjs → item-option-radio-button-group-Bb-Rc5nv.cjs} +1 -1
- package/components/{item-option-radio-button-group-J_ZusHOP.js → item-option-radio-button-group-DQ0knjcY.js} +2 -2
- package/components/item-option-slider/index.cjs +1 -1
- package/components/item-option-slider/index.js +1 -1
- package/components/{item-option-slider-V9z4qqyE.js → item-option-slider-BuA7tdbc.js} +1 -1
- package/components/{item-option-slider-BDAEs7Fk.cjs → item-option-slider-CLqtmYAE.cjs} +1 -1
- package/components/item-option-switch/index.cjs +1 -1
- package/components/item-option-switch/index.js +1 -1
- package/components/{item-option-switch-BA4ifIHK.js → item-option-switch-CvzS-KN9.js} +1 -1
- package/components/{item-option-switch-Bzy2VRLg.cjs → item-option-switch-DtRz_zTM.cjs} +1 -1
- package/components/item-option-text-field/index.cjs +1 -1
- package/components/item-option-text-field/index.js +1 -1
- package/components/{item-option-text-field-Cf0khC48.js → item-option-text-field-CW3R8voC.js} +1 -1
- package/components/{item-option-text-field-C-sTkUre.cjs → item-option-text-field-D1NFqoms.cjs} +1 -1
- package/components/item-slot-drop/index.cjs +1 -1
- package/components/item-slot-drop/index.js +1 -1
- package/components/{item-slot-drop-DrJRtG7b.cjs → item-slot-drop-B7JmgKMJ.cjs} +1 -1
- package/components/{item-slot-drop-D2VDgqYS.js → item-slot-drop-DaTJ-Gym.js} +6 -6
- package/components/item-slot-drop-panel/index.cjs +1 -1
- package/components/item-slot-drop-panel/index.js +1 -1
- package/components/{item-slot-drop-panel-CCCOwtYM.js → item-slot-drop-panel-0wUkaWiM.js} +39 -39
- package/components/{item-slot-drop-panel-CFerKcdH.cjs → item-slot-drop-panel-CdCEWBGb.cjs} +1 -1
- package/components/item-slot-picker/index.cjs +1 -1
- package/components/item-slot-picker/index.js +1 -1
- package/components/item-slot-picker/item-slot-picker.d.ts +8 -2
- package/components/{item-slot-picker-BdfYcBKT.js → item-slot-picker-BiHy7QX1.js} +142 -121
- package/components/{item-slot-picker-aqePvZ9B.cjs → item-slot-picker-BvrK1U4h.cjs} +42 -47
- package/components/item-slot-picker-panel/index.cjs +1 -1
- package/components/item-slot-picker-panel/index.js +1 -1
- package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +1 -1
- package/components/{item-slot-picker-panel-DC3i7XZP.js → item-slot-picker-panel-BmlCimZ9.js} +5 -5
- package/components/{item-slot-picker-panel-dU6NywBo.cjs → item-slot-picker-panel-CeT847QM.cjs} +2 -2
- package/components/{line-chart-positioning.config-DX5mLAP7.cjs → line-chart-positioning.config-DaDYXk9Z.cjs} +1 -1
- package/components/{line-chart-positioning.config-BW19v66B.js → line-chart-positioning.config-Imvzv3EC.js} +1 -1
- package/components/{localized-mixin-CYMFnS-n.js → localized-mixin-BLUbrY_Z.js} +1 -1
- package/components/{localized-mixin-Bt25Frg1.cjs → localized-mixin-DceE4W-d.cjs} +1 -1
- package/components/{marker-map-positioning.config-C0V5LZG-.cjs → marker-map-positioning.config-BGDRklk5.cjs} +1 -1
- package/components/{marker-map-positioning.config-BJGwlWKz.js → marker-map-positioning.config-DouILqTQ.js} +1 -1
- package/components/nl-BFAURMxk.cjs +20 -0
- package/components/{nl-TUFktGm6.js → nl-Cs2_7YBI.js} +4 -0
- package/components/{ohlc-chart-positioning.config-CFvbZzCR.js → ohlc-chart-positioning.config-Bcpj8NAt.js} +1 -1
- package/components/{ohlc-chart-positioning.config-Bu1_IBVK.cjs → ohlc-chart-positioning.config-CHJbhqWA.cjs} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-Bc3qCyxq.js → parallel-coordinates-plot-positioning.config-BRPawZLg.js} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-EJz1XA1k.cjs → parallel-coordinates-plot-positioning.config-CnyUP9E-.cjs} +1 -1
- package/components/{pivot-table-positioning.config-Bay8gxV-.js → pivot-table-positioning.config-8rROPmIw.js} +1 -1
- package/components/{pivot-table-positioning.config-CMzGb-BR.cjs → pivot-table-positioning.config-BvD825Uc.cjs} +1 -1
- package/components/{pyramid-chart-positioning.config-BUSeYxYH.js → pyramid-chart-positioning.config-CqL_Z0Ok.js} +1 -1
- package/components/{pyramid-chart-positioning.config-CrU2vKM-.cjs → pyramid-chart-positioning.config-DKd65Pdf.cjs} +1 -1
- package/components/{radar-chart-positioning.config-DOLpdn-d.js → radar-chart-positioning.config-CpYbMIeY.js} +1 -1
- package/components/{radar-chart-positioning.config-BEzqTXyr.cjs → radar-chart-positioning.config-oPyZCdrF.cjs} +1 -1
- package/components/{route-map-positioning.config-BgjizdWh.cjs → route-map-positioning.config-BCOVbseo.cjs} +1 -1
- package/components/{route-map-positioning.config-Brg6_eCi.js → route-map-positioning.config-DPspLTzr.js} +1 -1
- package/components/{sankey-diagram-positioning.config-DJlWiNYL.js → sankey-diagram-positioning.config-BVNDJhvU.js} +1 -1
- package/components/{sankey-diagram-positioning.config-vccTz1pG.cjs → sankey-diagram-positioning.config-Da0e_DAS.cjs} +1 -1
- package/components/{scatter-plot-positioning.config-BKqPHMrS.js → scatter-plot-positioning.config-DMZuAjXU.js} +1 -1
- package/components/{scatter-plot-positioning.config-D7uFFBVZ.cjs → scatter-plot-positioning.config-vR2_9XYh.cjs} +1 -1
- package/components/{set-locale-s-1X7Jce.js → set-locale-B9greCq4.js} +4 -4
- package/components/{set-locale-Bgz1WNGE.cjs → set-locale-BkbSlaQk.cjs} +1 -1
- package/components/{slicer-filter-positioning.config-D1kR4xly.cjs → slicer-filter-positioning.config-Byf9Q8gT.cjs} +1 -1
- package/components/{slicer-filter-positioning.config-Gl9jhO_G.js → slicer-filter-positioning.config-CzzuCQDP.js} +1 -1
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +1 -1
- package/components/{slot-menu-Dw53Y-iu.js → slot-menu-BAtOYWxs.js} +3 -3
- package/components/{slot-menu-CAhxaK5-.cjs → slot-menu-C_iIcdDw.cjs} +1 -1
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +1 -1
- package/components/{slot-menu-list-5NsRo9XD.js → slot-menu-list-DoRLtT2d.js} +1 -1
- package/components/{slot-menu-list-CUsmYkiV.cjs → slot-menu-list-K4_pghrC.cjs} +1 -1
- package/components/{speedometer-chart-positioning.config-fa90zZdb.cjs → speedometer-chart-positioning.config-DfnWIx7U.cjs} +1 -1
- package/components/{speedometer-chart-positioning.config-VBLrLNmO.js → speedometer-chart-positioning.config-DsCodDVP.js} +1 -1
- package/components/{spike-map-positioning.config-DrxdeFsj.cjs → spike-map-positioning.config-DPbVWLF7.cjs} +1 -1
- package/components/{spike-map-positioning.config-oYjk3n9a.js → spike-map-positioning.config-sSSQuxIm.js} +1 -1
- package/components/{strip-plot-positioning.config-lMn33cM4.js → strip-plot-positioning.config-C01KV7Er.js} +1 -1
- package/components/{strip-plot-positioning.config-Bx_fqmEj.cjs → strip-plot-positioning.config-Czz4B-U5.cjs} +1 -1
- package/components/{sunburst-chart-positioning.config-C-We-zZF.js → sunburst-chart-positioning.config-C4u-zAIV.js} +1 -1
- package/components/{sunburst-chart-positioning.config-D-GRWmyF.cjs → sunburst-chart-positioning.config-g8eXAhP4.cjs} +1 -1
- package/components/{symbol-map-positioning.config-B0sLlLzK.cjs → symbol-map-positioning.config-Be2wvwUD.cjs} +1 -1
- package/components/{symbol-map-positioning.config-_TJSfpVj.js → symbol-map-positioning.config-CRZwvQS5.js} +1 -1
- package/components/{treemap-chart-positioning.config-CO05Gv7X.cjs → treemap-chart-positioning.config-CvMw2lMe.cjs} +1 -1
- package/components/{treemap-chart-positioning.config-DAdvoS2I.js → treemap-chart-positioning.config-Dq1nuvca.js} +1 -1
- package/components/utils/base.cjs +1 -1
- package/components/utils/base.js +2 -2
- package/components/{utils-CGJh0jrq.cjs → utils-Bkykodi1.cjs} +1 -1
- package/components/{utils-Dk4dM9xv.js → utils-C3-82TMs.js} +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +2 -2
- package/components/{venn-diagram-positioning.config-DKXWVaUI.cjs → venn-diagram-positioning.config-CJbmXy8r.cjs} +1 -1
- package/components/{venn-diagram-positioning.config-DUwmPQ1A.js → venn-diagram-positioning.config-DoYvs8k_.js} +1 -1
- package/components/{wordcloud-chart-positioning.config-CgbB_SI0.cjs → wordcloud-chart-positioning.config-BYz4mqOF.cjs} +1 -1
- package/components/{wordcloud-chart-positioning.config-qK5_CF7v.js → wordcloud-chart-positioning.config-C5gc4v7C.js} +1 -1
- package/custom-elements.json +180 -5
- package/package.json +1 -1
- package/react/components/ai-chat.component.ts +5 -2
- package/react/esm/components/ai-chat.component.d.ts +3 -1
- package/react/esm/components/ai-chat.component.js +3 -1
- package/react/luzmo-stub.d.ts +1 -0
- package/react/package.json +2 -2
- package/standalone/chunks/{add-to-dashboard-BrWieRxp.js → add-to-dashboard-BitIAbse.js} +1 -1
- package/standalone/chunks/{base-CLcNr-fQ.js → base-DetXzglI.js} +1 -1
- package/standalone/chunks/de-DasXCtPF.js +2 -0
- package/standalone/chunks/{display-settings-binning-B_lKObyP.js → display-settings-binning-D7udCQZB.js} +1 -1
- package/standalone/chunks/{display-settings-datetime-CTmJyEOX.js → display-settings-datetime-DoDqA4cJ.js} +1 -1
- package/standalone/chunks/{display-settings-grand-totals-IjcbBoyZ.js → display-settings-grand-totals-LZT2gYJu.js} +1 -1
- package/standalone/chunks/{display-settings-numeric-D9hvRtfN.js → display-settings-numeric-7Vq_f1D0.js} +1 -1
- package/standalone/chunks/{display-settings-period-over-period-Dnstsyqe.js → display-settings-period-over-period-CBjYIyKC.js} +1 -1
- package/standalone/chunks/es-cQV58zLc.js +2 -0
- package/standalone/chunks/{filters-CBmZhipt.js → filters-CF1JZIC1.js} +1 -1
- package/standalone/chunks/{formula-codemirror-D2F6Aj2h.js → formula-codemirror-DSKNnuLg.js} +1 -1
- package/standalone/chunks/fr-DzRE2NaZ.js +2 -0
- package/standalone/chunks/{item-option-action-button-group-BZyiRTfe.js → item-option-action-button-group-CM3q7mFJ.js} +1 -1
- package/standalone/chunks/{item-option-base-Bk5qxdcQ.js → item-option-base-BoBGd2zN.js} +1 -1
- package/standalone/chunks/{item-option-color-palette-picker-O8kT0i8p.js → item-option-color-palette-picker-BTGLKRU6.js} +1 -1
- package/standalone/chunks/{item-option-color-picker-CUTCc_yN.js → item-option-color-picker-WIaAaoWa.js} +1 -1
- package/standalone/chunks/{item-option-color-range-DsKPvjLj.js → item-option-color-range-DP8KXyD7.js} +1 -1
- package/standalone/chunks/{item-option-guidelines-CZyvhgtN.js → item-option-guidelines-CvvRU02d.js} +1 -1
- package/standalone/chunks/{item-option-multi-language-field-DlC-cCD7.js → item-option-multi-language-field-DOc_5pUa.js} +1 -1
- package/standalone/chunks/{item-option-number-field-BW9VpN9_.js → item-option-number-field-fj7jIBZ4.js} +1 -1
- package/standalone/chunks/{item-option-panel-BXA3sIYG.js → item-option-panel-C1GmQ9SW.js} +2 -2
- package/standalone/chunks/{item-option-picker-B2KmO7a6.js → item-option-picker-D0d0BXk7.js} +1 -1
- package/standalone/chunks/{item-option-position-picker-C9C9SKDD.js → item-option-position-picker-BpYLyMS7.js} +1 -1
- package/standalone/chunks/{item-option-positions-number-field-C2ahVlxe.js → item-option-positions-number-field-p6ghB0uD.js} +1 -1
- package/standalone/chunks/{item-option-radio-button-group-2q3doUXH.js → item-option-radio-button-group-DinqecBS.js} +1 -1
- package/standalone/chunks/{item-option-slider-C7TT3CqL.js → item-option-slider--YXct33p.js} +1 -1
- package/standalone/chunks/{item-option-switch-CZR2_Bs9.js → item-option-switch-BRuMJhT2.js} +1 -1
- package/standalone/chunks/{item-option-text-field-DBUOD_fv.js → item-option-text-field-Cvu0fi5x.js} +1 -1
- package/standalone/chunks/{item-slot-picker-panel-CTePASjI.js → item-slot-picker-panel-4ATGR7nP.js} +58 -62
- package/standalone/chunks/{load-data-fields-for-datasets-CPf_Q7p4.js → load-data-fields-for-datasets-DWys6Xqn.js} +1 -1
- package/standalone/chunks/{load-formula-codemirror-CA7NW4Zq.js → load-formula-codemirror-BP6dGYyV.js} +1 -1
- package/standalone/chunks/{localized-mixin-DN2aV3CC.js → localized-mixin-D3GVo182.js} +1 -1
- package/standalone/chunks/nl-Bzvdbvjs.js +2 -0
- package/standalone/interactive-viz-item.js +1 -1
- package/standalone/item-grid.js +1 -1
- package/standalone/manifest.json +33 -33
- package/types/ai-chat.types.d.ts +39 -2
- package/components/ai-chat-DfuJOWao.cjs +0 -338
- package/components/de-CjQMTFtl.cjs +0 -20
- package/components/display-settings-B2V_F_CU.cjs +0 -142
- package/components/es-DmmTP7D0.cjs +0 -20
- package/components/filters-C8xz8DV-.cjs +0 -199
- package/components/fr-DKDPLLAZ.cjs +0 -20
- package/components/item-grid-item-actions-menu-C3BUxZJc.cjs +0 -52
- package/components/item-option-guidelines-CmPaMdqb.cjs +0 -135
- package/components/nl-BrjaaktE.cjs +0 -20
- package/standalone/chunks/de-BtQ1ecN1.js +0 -2
- package/standalone/chunks/es-CAWreooi.js +0 -2
- package/standalone/chunks/fr-BG0nQk8g.js +0 -2
- package/standalone/chunks/nl-BXPduS2Q.js +0 -2
|
@@ -18,38 +18,39 @@
|
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
20
|
import "./tokens-Ov1pCR4Y.js";
|
|
21
|
-
import { c as e, d as t, s as n, u as r } from "./ai-interaction-textarea-
|
|
22
|
-
import { i, n as a } from "./base-
|
|
21
|
+
import { c as e, d as t, s as n, u as r } from "./ai-interaction-textarea-CT698Pph.js";
|
|
22
|
+
import { i, n as a } from "./base-Cvcpdy0h.js";
|
|
23
23
|
import { t as o } from "./decorate-DyMgX_Uh.js";
|
|
24
24
|
import { t as s } from "./defineProperty-AldSMFEH.js";
|
|
25
25
|
import { msg as c } from "@lit/localize/lit-localize";
|
|
26
|
-
import {
|
|
26
|
+
import { luzmoArrowRotateLeft as l, luzmoEllipsisVertical as u, luzmoIcon as d, luzmoSpin as f, luzmoThumbsDown as p, luzmoThumbsUp as ee } from "@luzmo/icons";
|
|
27
|
+
import "@luzmo/lucero/action-button";
|
|
27
28
|
import "@luzmo/lucero/button";
|
|
28
29
|
import "@luzmo/lucero/chat-message";
|
|
29
30
|
import "@luzmo/lucero/icon";
|
|
30
31
|
import "@luzmo/lucero/overlay";
|
|
31
32
|
import "@luzmo/lucero/popover";
|
|
32
33
|
import "@luzmo/lucero/progress-steps";
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import "
|
|
34
|
+
import "@luzmo/lucero/tooltip";
|
|
35
|
+
import { html as m, nothing as h, unsafeCSS as te } from "lit";
|
|
36
|
+
import { property as g, state as ne } from "lit/decorators.js";
|
|
37
|
+
import { unsafeHTML as _ } from "lit/directives/unsafe-html.js";
|
|
37
38
|
import "@luzmo/lucero/question-box";
|
|
38
|
-
import { guard as
|
|
39
|
-
import { keyed as
|
|
39
|
+
import { guard as re } from "lit/directives/guard.js";
|
|
40
|
+
import { keyed as ie } from "lit/directives/keyed.js";
|
|
40
41
|
//#region node_modules/dompurify/dist/purify.es.mjs
|
|
41
|
-
function
|
|
42
|
+
function ae(e, t) {
|
|
42
43
|
this.v = e, this.k = t;
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function oe(e, t) {
|
|
45
46
|
(t == null || t > e.length) && (t = e.length);
|
|
46
47
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
47
48
|
return r;
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
+
function v(e) {
|
|
50
51
|
if (Array.isArray(e)) return e;
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function se(e, t) {
|
|
53
54
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
54
55
|
if (n != null) {
|
|
55
56
|
var r, i, a, o, s = [], c = !0, l = !1;
|
|
@@ -70,24 +71,24 @@ function ae(e, t) {
|
|
|
70
71
|
return s;
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
+
function ce() {
|
|
74
75
|
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
return
|
|
77
|
+
function le(e, t) {
|
|
78
|
+
return v(e) || se(e, t) || ue(e, t) || ce();
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function ue(e, t) {
|
|
80
81
|
if (e) {
|
|
81
|
-
if (typeof e == "string") return
|
|
82
|
+
if (typeof e == "string") return oe(e, t);
|
|
82
83
|
var n = {}.toString.call(e).slice(8, -1);
|
|
83
|
-
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) ?
|
|
84
|
+
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) ? oe(e, t) : void 0;
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
+
function de(e) {
|
|
87
88
|
var t, n;
|
|
88
89
|
function r(t, n) {
|
|
89
90
|
try {
|
|
90
|
-
var a = e[t](n), o = a.value, s = o instanceof
|
|
91
|
+
var a = e[t](n), o = a.value, s = o instanceof ae;
|
|
91
92
|
Promise.resolve(s ? o.v : o).then(function(n) {
|
|
92
93
|
if (s) {
|
|
93
94
|
var c = t === "return" && o.k ? t : "next";
|
|
@@ -121,113 +122,113 @@ function ce(e) {
|
|
|
121
122
|
});
|
|
122
123
|
}, typeof e.return != "function" && (this.return = void 0);
|
|
123
124
|
}
|
|
124
|
-
|
|
125
|
+
de.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
|
|
125
126
|
return this;
|
|
126
|
-
},
|
|
127
|
+
}, de.prototype.next = function(e) {
|
|
127
128
|
return this._invoke("next", e);
|
|
128
|
-
},
|
|
129
|
+
}, de.prototype.throw = function(e) {
|
|
129
130
|
return this._invoke("throw", e);
|
|
130
|
-
},
|
|
131
|
+
}, de.prototype.return = function(e) {
|
|
131
132
|
return this._invoke("return", e);
|
|
132
133
|
};
|
|
133
|
-
var
|
|
134
|
+
var fe = Object.entries, pe = Object.setPrototypeOf, me = Object.isFrozen, he = Object.getPrototypeOf, ge = Object.getOwnPropertyDescriptor, y = Object.freeze, b = Object.seal, _e = Object.create, ve = typeof Reflect < "u" && Reflect, ye = ve.apply, be = ve.construct;
|
|
134
135
|
y ||= function(e) {
|
|
135
136
|
return e;
|
|
136
137
|
}, b ||= function(e) {
|
|
137
138
|
return e;
|
|
138
|
-
},
|
|
139
|
+
}, ye ||= function(e, t) {
|
|
139
140
|
var n = [...arguments].slice(2);
|
|
140
141
|
return e.apply(t, n);
|
|
141
|
-
},
|
|
142
|
+
}, be ||= function(e) {
|
|
142
143
|
return new e(...[...arguments].slice(1));
|
|
143
144
|
};
|
|
144
|
-
var
|
|
145
|
+
var xe = w(Array.prototype.forEach);
|
|
145
146
|
Array.prototype.indexOf;
|
|
146
|
-
var
|
|
147
|
+
var Se = w(Array.prototype.lastIndexOf), Ce = w(Array.prototype.pop), we = w(Array.prototype.push);
|
|
147
148
|
Array.prototype.slice;
|
|
148
|
-
var
|
|
149
|
-
function
|
|
149
|
+
var Te = w(Array.prototype.splice), Ee = Array.isArray, De = w(String.prototype.toLowerCase), Oe = w(String.prototype.toString), ke = w(String.prototype.match), Ae = w(String.prototype.replace), je = w(String.prototype.indexOf), Me = w(String.prototype.trim), Ne = w(Number.prototype.toString), Pe = w(Boolean.prototype.toString), x = typeof BigInt > "u" ? null : w(BigInt.prototype.toString), Fe = typeof Symbol > "u" ? null : w(Symbol.prototype.toString), S = w(Object.prototype.hasOwnProperty), Ie = w(Object.prototype.toString), C = w(RegExp.prototype.test), Le = Re(TypeError);
|
|
150
|
+
function w(e) {
|
|
150
151
|
return function(t) {
|
|
151
152
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
152
153
|
var n = [...arguments].slice(1);
|
|
153
|
-
return
|
|
154
|
+
return ye(e, t, n);
|
|
154
155
|
};
|
|
155
156
|
}
|
|
156
|
-
function
|
|
157
|
+
function Re(e) {
|
|
157
158
|
return function() {
|
|
158
|
-
return
|
|
159
|
+
return be(e, [...arguments]);
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
|
-
function
|
|
162
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
163
|
-
if (
|
|
162
|
+
function T(e, t) {
|
|
163
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : De;
|
|
164
|
+
if (pe && pe(e, null), !Ee(t)) return e;
|
|
164
165
|
let r = t.length;
|
|
165
166
|
for (; r--;) {
|
|
166
167
|
let i = t[r];
|
|
167
168
|
if (typeof i == "string") {
|
|
168
169
|
let e = n(i);
|
|
169
|
-
e !== i && (
|
|
170
|
+
e !== i && (me(t) || (t[r] = e), i = e);
|
|
170
171
|
}
|
|
171
172
|
e[i] = !0;
|
|
172
173
|
}
|
|
173
174
|
return e;
|
|
174
175
|
}
|
|
175
|
-
function
|
|
176
|
-
for (let t = 0; t < e.length; t++)
|
|
176
|
+
function ze(e) {
|
|
177
|
+
for (let t = 0; t < e.length; t++) S(e, t) || (e[t] = null);
|
|
177
178
|
return e;
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
-
let t =
|
|
181
|
-
for (let r of
|
|
182
|
-
var n =
|
|
180
|
+
function E(e) {
|
|
181
|
+
let t = _e(null);
|
|
182
|
+
for (let r of fe(e)) {
|
|
183
|
+
var n = le(r, 2);
|
|
183
184
|
let i = n[0], a = n[1];
|
|
184
|
-
|
|
185
|
+
S(e, i) && (Ee(a) ? t[i] = ze(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = E(a) : t[i] = a);
|
|
185
186
|
}
|
|
186
187
|
return t;
|
|
187
188
|
}
|
|
188
|
-
function
|
|
189
|
+
function Be(e) {
|
|
189
190
|
switch (typeof e) {
|
|
190
191
|
case "string": return e;
|
|
191
|
-
case "number": return
|
|
192
|
-
case "boolean": return
|
|
193
|
-
case "bigint": return
|
|
194
|
-
case "symbol": return
|
|
195
|
-
case "undefined": return
|
|
192
|
+
case "number": return Ne(e);
|
|
193
|
+
case "boolean": return Pe(e);
|
|
194
|
+
case "bigint": return x ? x(e) : "0";
|
|
195
|
+
case "symbol": return Fe ? Fe(e) : "Symbol()";
|
|
196
|
+
case "undefined": return Ie(e);
|
|
196
197
|
case "function":
|
|
197
198
|
case "object": {
|
|
198
|
-
if (e === null) return
|
|
199
|
-
let t = e, n =
|
|
199
|
+
if (e === null) return Ie(e);
|
|
200
|
+
let t = e, n = D(t, "toString");
|
|
200
201
|
if (typeof n == "function") {
|
|
201
202
|
let e = n(t);
|
|
202
|
-
return typeof e == "string" ? e :
|
|
203
|
+
return typeof e == "string" ? e : Ie(e);
|
|
203
204
|
}
|
|
204
|
-
return
|
|
205
|
+
return Ie(e);
|
|
205
206
|
}
|
|
206
|
-
default: return
|
|
207
|
+
default: return Ie(e);
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
|
-
function
|
|
210
|
+
function D(e, t) {
|
|
210
211
|
for (; e !== null;) {
|
|
211
|
-
let n =
|
|
212
|
+
let n = ge(e, t);
|
|
212
213
|
if (n) {
|
|
213
|
-
if (n.get) return
|
|
214
|
-
if (typeof n.value == "function") return
|
|
214
|
+
if (n.get) return w(n.get);
|
|
215
|
+
if (typeof n.value == "function") return w(n.value);
|
|
215
216
|
}
|
|
216
|
-
e =
|
|
217
|
+
e = he(e);
|
|
217
218
|
}
|
|
218
219
|
function n() {
|
|
219
220
|
return null;
|
|
220
221
|
}
|
|
221
222
|
return n;
|
|
222
223
|
}
|
|
223
|
-
function
|
|
224
|
+
function Ve(e) {
|
|
224
225
|
try {
|
|
225
|
-
return
|
|
226
|
+
return C(e, ""), !0;
|
|
226
227
|
} catch {
|
|
227
228
|
return !1;
|
|
228
229
|
}
|
|
229
230
|
}
|
|
230
|
-
var
|
|
231
|
+
var He = y(/* @__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(".")), Ue = y(/* @__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(".")), We = y([
|
|
231
232
|
"feBlend",
|
|
232
233
|
"feColorMatrix",
|
|
233
234
|
"feComponentTransfer",
|
|
@@ -253,7 +254,7 @@ var Be = y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
253
254
|
"feSpotLight",
|
|
254
255
|
"feTile",
|
|
255
256
|
"feTurbulence"
|
|
256
|
-
]),
|
|
257
|
+
]), Ge = y([
|
|
257
258
|
"animate",
|
|
258
259
|
"color-profile",
|
|
259
260
|
"cursor",
|
|
@@ -276,7 +277,7 @@ var Be = y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
276
277
|
"solidcolor",
|
|
277
278
|
"unknown",
|
|
278
279
|
"use"
|
|
279
|
-
]),
|
|
280
|
+
]), Ke = y(/* @__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(".")), qe = y([
|
|
280
281
|
"maction",
|
|
281
282
|
"maligngroup",
|
|
282
283
|
"malignmark",
|
|
@@ -292,13 +293,13 @@ var Be = y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
292
293
|
"annotation-xml",
|
|
293
294
|
"mprescripts",
|
|
294
295
|
"none"
|
|
295
|
-
]),
|
|
296
|
+
]), Je = y(["#text"]), Ye = y(/* @__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(".")), Xe = y(/* @__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.dominant-baseline.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.pointer-events.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-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.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(".")), Ze = y(/* @__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(".")), Qe = y([
|
|
296
297
|
"xlink:href",
|
|
297
298
|
"xml:id",
|
|
298
299
|
"xlink:title",
|
|
299
300
|
"xml:space",
|
|
300
301
|
"xmlns:xlink"
|
|
301
|
-
]),
|
|
302
|
+
]), $e = b(/{{[\w\W]*|^[\w\W]*}}/g), et = b(/<%[\w\W]*|^[\w\W]*%>/g), tt = b(/\${[\w\W]*/g), nt = b(/^data-[\-\w.\u00B7-\uFFFF]+$/), rt = b(/^aria-[\-\w]+$/), it = b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), at = b(/^(?:\w+script|data):/i), ot = b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), st = b(/^html$/i), ct = b(/^[a-z][.\w]*(-[.\w]+)+$/i), lt = b(/<[/\w!]/g), ut = b(/<[/\w]/g), dt = b(/<\/no(script|embed|frames)/i), ft = b(/\/>/i), O = {
|
|
302
303
|
element: 1,
|
|
303
304
|
attribute: 2,
|
|
304
305
|
text: 3,
|
|
@@ -311,7 +312,7 @@ var Be = y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
311
312
|
documentType: 10,
|
|
312
313
|
documentFragment: 11,
|
|
313
314
|
notation: 12
|
|
314
|
-
},
|
|
315
|
+
}, pt = [
|
|
315
316
|
"style",
|
|
316
317
|
"script",
|
|
317
318
|
"xmp",
|
|
@@ -320,14 +321,14 @@ var Be = y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
320
321
|
"noframes",
|
|
321
322
|
"plaintext",
|
|
322
323
|
"noscript"
|
|
323
|
-
],
|
|
324
|
+
], mt = y(T({}, pt)), ht = function() {
|
|
324
325
|
let e = {};
|
|
325
|
-
return
|
|
326
|
+
return xe(pt, (t) => {
|
|
326
327
|
e[t] = b(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
327
328
|
}), y(e);
|
|
328
|
-
}(),
|
|
329
|
+
}(), gt = function() {
|
|
329
330
|
return typeof window > "u" ? null : window;
|
|
330
|
-
},
|
|
331
|
+
}, _t = function(e, t) {
|
|
331
332
|
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
332
333
|
let n = null, r = "data-tt-policy-suffix";
|
|
333
334
|
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
@@ -344,7 +345,7 @@ var Be = y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
344
345
|
} catch {
|
|
345
346
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
346
347
|
}
|
|
347
|
-
},
|
|
348
|
+
}, vt = function() {
|
|
348
349
|
return {
|
|
349
350
|
afterSanitizeAttributes: [],
|
|
350
351
|
afterSanitizeElements: [],
|
|
@@ -356,20 +357,20 @@ var Be = y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
356
357
|
uponSanitizeElement: [],
|
|
357
358
|
uponSanitizeShadowNode: []
|
|
358
359
|
};
|
|
359
|
-
},
|
|
360
|
-
return
|
|
361
|
-
},
|
|
362
|
-
let r =
|
|
363
|
-
return r && typeof r == "object" ?
|
|
360
|
+
}, yt = function(e, t, n, r) {
|
|
361
|
+
return S(e, t) && Ee(e[t]) ? T(r.base ? E(r.base) : {}, e[t], r.transform) : n;
|
|
362
|
+
}, bt = function(e, t, n) {
|
|
363
|
+
let r = S(e, t) ? e[t] : void 0;
|
|
364
|
+
return r && typeof r == "object" ? E(r) : n();
|
|
364
365
|
};
|
|
365
|
-
function
|
|
366
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
367
|
-
if (t.version = "3.4.16", t.removed = [], !e || !e.document || e.document.nodeType !==
|
|
366
|
+
function xt() {
|
|
367
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : gt(), t = (e) => xt(e);
|
|
368
|
+
if (t.version = "3.4.16", t.removed = [], !e || !e.document || e.document.nodeType !== O.document || !e.Element) return t.isSupported = !1, t;
|
|
368
369
|
let n = e.document, r = n, i = r.currentScript;
|
|
369
370
|
e.DocumentFragment;
|
|
370
371
|
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
|
|
371
372
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
372
|
-
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f =
|
|
373
|
+
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = D(d, "cloneNode"), p = D(d, "remove"), ee = D(d, "removeAttributeNode"), m = D(d, "nextSibling"), h = D(d, "childNodes"), te = D(d, "parentNode"), g = D(d, "shadowRoot"), ne = D(d, "attributes"), _ = o && o.prototype ? D(o.prototype, "nodeType") : null, re = o && o.prototype ? D(o.prototype, "nodeName") : null, ie = o && o.prototype ? D(o.prototype, "ownerDocument") : null, ae = function(e) {
|
|
373
374
|
return _ ? _(e) : e.nodeType;
|
|
374
375
|
}, oe = function(e) {
|
|
375
376
|
return re ? re(e) : e.nodeName;
|
|
@@ -378,38 +379,38 @@ function yt() {
|
|
|
378
379
|
let e = n.createElement("template");
|
|
379
380
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
380
381
|
}
|
|
381
|
-
let v, se = "", ce,
|
|
382
|
-
if (
|
|
382
|
+
let v, se = "", ce, le = !1, ue = 0, de = function() {
|
|
383
|
+
if (ue > 0) throw Le("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.");
|
|
383
384
|
}, pe = function(e) {
|
|
384
|
-
|
|
385
|
+
de(), ue++;
|
|
385
386
|
try {
|
|
386
387
|
return v.createHTML(e);
|
|
387
388
|
} finally {
|
|
388
|
-
|
|
389
|
+
ue--;
|
|
389
390
|
}
|
|
390
|
-
},
|
|
391
|
-
|
|
391
|
+
}, me = function(e) {
|
|
392
|
+
de(), ue++;
|
|
392
393
|
try {
|
|
393
394
|
return v.createScriptURL(e);
|
|
394
395
|
} finally {
|
|
395
|
-
|
|
396
|
+
ue--;
|
|
396
397
|
}
|
|
397
|
-
},
|
|
398
|
-
return
|
|
399
|
-
},
|
|
400
|
-
t.isSupported = typeof
|
|
401
|
-
let
|
|
402
|
-
...Be,
|
|
403
|
-
...Ve,
|
|
398
|
+
}, he = function() {
|
|
399
|
+
return le ||= (ce = _t(u, i), !0), ce;
|
|
400
|
+
}, ge = n, ve = ge.implementation, ye = ge.createNodeIterator, be = ge.createDocumentFragment, Ne = ge.getElementsByTagName, Pe = r.importNode, x = vt();
|
|
401
|
+
t.isSupported = typeof fe == "function" && typeof te == "function" && ve && ve.createHTMLDocument !== void 0;
|
|
402
|
+
let Fe = $e, Ie = et, w = tt, Re = nt, ze = rt, pt = at, St = ot, Ct = ct, wt = it, k = null, Tt = T({}, [
|
|
404
403
|
...He,
|
|
404
|
+
...Ue,
|
|
405
405
|
...We,
|
|
406
|
-
...Ke
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
...Je,
|
|
406
|
+
...Ke,
|
|
407
|
+
...Je
|
|
408
|
+
]), A = null, j = T({}, [
|
|
410
409
|
...Ye,
|
|
411
|
-
...Xe
|
|
412
|
-
|
|
410
|
+
...Xe,
|
|
411
|
+
...Ze,
|
|
412
|
+
...Qe
|
|
413
|
+
]), M = Object.seal(_e(null, {
|
|
413
414
|
tagNameCheck: {
|
|
414
415
|
writable: !0,
|
|
415
416
|
configurable: !1,
|
|
@@ -428,7 +429,7 @@ function yt() {
|
|
|
428
429
|
enumerable: !0,
|
|
429
430
|
value: !1
|
|
430
431
|
}
|
|
431
|
-
})),
|
|
432
|
+
})), Et = null, N = null, P = Object.seal(_e(null, {
|
|
432
433
|
tagCheck: {
|
|
433
434
|
writable: !0,
|
|
434
435
|
configurable: !1,
|
|
@@ -441,14 +442,14 @@ function yt() {
|
|
|
441
442
|
enumerable: !0,
|
|
442
443
|
value: null
|
|
443
444
|
}
|
|
444
|
-
})),
|
|
445
|
+
})), Dt = !0, Ot = !0, kt = !1, At = !0, F = !1, I = !0, L = !1, jt = !1, Mt = null, Nt = null, Pt = !1, Ft = !1, It = !1, Lt = !1, Rt = !0, zt = !1, Bt = "user-content-", Vt = !0, Ht = !1, Ut = {}, Wt = null, Gt = T({}, /* @__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(".")), Kt = null, qt = T({}, [
|
|
445
446
|
"audio",
|
|
446
447
|
"video",
|
|
447
448
|
"img",
|
|
448
449
|
"source",
|
|
449
450
|
"image",
|
|
450
451
|
"track"
|
|
451
|
-
]),
|
|
452
|
+
]), Jt = null, Yt = T({}, [
|
|
452
453
|
"alt",
|
|
453
454
|
"class",
|
|
454
455
|
"for",
|
|
@@ -463,42 +464,42 @@ function yt() {
|
|
|
463
464
|
"value",
|
|
464
465
|
"style",
|
|
465
466
|
"xmlns"
|
|
466
|
-
]),
|
|
467
|
-
Yt,
|
|
467
|
+
]), Xt = "http://www.w3.org/1998/Math/MathML", Zt = "http://www.w3.org/2000/svg", R = "http://www.w3.org/1999/xhtml", Qt = R, $t = !1, en = null, tn = T({}, [
|
|
468
468
|
Xt,
|
|
469
|
-
|
|
470
|
-
|
|
469
|
+
Zt,
|
|
470
|
+
R
|
|
471
|
+
], Oe), nn = y([
|
|
471
472
|
"mi",
|
|
472
473
|
"mo",
|
|
473
474
|
"mn",
|
|
474
475
|
"ms",
|
|
475
476
|
"mtext"
|
|
476
|
-
]),
|
|
477
|
+
]), rn = T({}, nn), an = y(["annotation-xml"]), on = T({}, an), sn = T({}, [
|
|
477
478
|
"title",
|
|
478
479
|
"style",
|
|
479
480
|
"font",
|
|
480
481
|
"a",
|
|
481
482
|
"script"
|
|
482
|
-
]),
|
|
483
|
+
]), cn = null, ln = ["application/xhtml+xml", "text/html"], z = null, un = null, dn = n.createElement("form"), fn = function(e) {
|
|
483
484
|
return e instanceof RegExp || e instanceof Function;
|
|
484
|
-
},
|
|
485
|
+
}, pn = function() {
|
|
485
486
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
486
|
-
if (
|
|
487
|
-
(!e || typeof e != "object") && (e = {}), e =
|
|
488
|
-
transform:
|
|
489
|
-
base:
|
|
490
|
-
}),
|
|
491
|
-
transform:
|
|
492
|
-
base:
|
|
493
|
-
}),
|
|
494
|
-
let t =
|
|
495
|
-
if (
|
|
487
|
+
if (un && un === e) return;
|
|
488
|
+
(!e || typeof e != "object") && (e = {}), e = E(e), cn = ln.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, z = cn === "application/xhtml+xml" ? Oe : De, k = yt(e, "ALLOWED_TAGS", Tt, { transform: z }), A = yt(e, "ALLOWED_ATTR", j, { transform: z }), en = yt(e, "ALLOWED_NAMESPACES", tn, { transform: Oe }), Jt = yt(e, "ADD_URI_SAFE_ATTR", Yt, {
|
|
489
|
+
transform: z,
|
|
490
|
+
base: Yt
|
|
491
|
+
}), Kt = yt(e, "ADD_DATA_URI_TAGS", qt, {
|
|
492
|
+
transform: z,
|
|
493
|
+
base: qt
|
|
494
|
+
}), Wt = yt(e, "FORBID_CONTENTS", Gt, { transform: z }), Et = yt(e, "FORBID_TAGS", E({}), { transform: z }), N = yt(e, "FORBID_ATTR", E({}), { transform: z }), Ut = S(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? E(e.USE_PROFILES) : e.USE_PROFILES : !1, Dt = e.ALLOW_ARIA_ATTR !== !1, Ot = e.ALLOW_DATA_ATTR !== !1, kt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, At = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, F = e.SAFE_FOR_TEMPLATES || !1, I = e.SAFE_FOR_XML !== !1, L = e.WHOLE_DOCUMENT || !1, Ft = e.RETURN_DOM || !1, It = e.RETURN_DOM_FRAGMENT || !1, Lt = e.RETURN_TRUSTED_TYPE || !1, Pt = e.FORCE_BODY || !1, Rt = e.SANITIZE_DOM !== !1, zt = e.SANITIZE_NAMED_PROPS || !1, Vt = e.KEEP_CONTENT !== !1, Ht = e.IN_PLACE || !1, wt = Ve(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : it, Qt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : R, rn = bt(e, "MATHML_TEXT_INTEGRATION_POINTS", () => T({}, nn)), on = bt(e, "HTML_INTEGRATION_POINTS", () => T({}, an));
|
|
495
|
+
let t = bt(e, "CUSTOM_ELEMENT_HANDLING", () => _e(null));
|
|
496
|
+
if (M = _e(null), S(t, "tagNameCheck") && fn(t.tagNameCheck) && (M.tagNameCheck = t.tagNameCheck), S(t, "attributeNameCheck") && fn(t.attributeNameCheck) && (M.attributeNameCheck = t.attributeNameCheck), S(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (M.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), b(M), F && (Ot = !1), It && (Ft = !0), Ut && (k = T({}, Je), A = _e(null), Ut.html === !0 && (T(k, He), T(A, Ye)), Ut.svg === !0 && (T(k, Ue), T(A, Xe), T(A, Qe)), Ut.svgFilters === !0 && (T(k, We), T(A, Xe), T(A, Qe)), Ut.mathMl === !0 && (T(k, Ke), T(A, Ze), T(A, Qe))), P.tagCheck = null, P.attributeCheck = null, S(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? P.tagCheck = e.ADD_TAGS : Ee(e.ADD_TAGS) && (k === Tt && (k = E(k)), T(k, e.ADD_TAGS, z))), S(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? P.attributeCheck = e.ADD_ATTR : Ee(e.ADD_ATTR) && (A === j && (A = E(A)), T(A, e.ADD_ATTR, z))), S(e, "ADD_FORBID_CONTENTS") && Ee(e.ADD_FORBID_CONTENTS) && (Wt === Gt && (Wt = E(Wt)), T(Wt, e.ADD_FORBID_CONTENTS, z)), Vt && (k["#text"] = !0), L && T(k, [
|
|
496
497
|
"html",
|
|
497
498
|
"head",
|
|
498
499
|
"body"
|
|
499
|
-
]),
|
|
500
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
501
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
500
|
+
]), k.table && (T(k, ["tbody"]), delete Et.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
501
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Le("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
502
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Le("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
502
503
|
let t = v;
|
|
503
504
|
v = e.TRUSTED_TYPES_POLICY;
|
|
504
505
|
try {
|
|
@@ -506,49 +507,49 @@ function yt() {
|
|
|
506
507
|
} catch (e) {
|
|
507
508
|
throw v = t, e;
|
|
508
509
|
}
|
|
509
|
-
} else e.TRUSTED_TYPES_POLICY === null ? (v = void 0, se = "") : (v === void 0 && (v =
|
|
510
|
-
y && y(e),
|
|
511
|
-
},
|
|
512
|
-
...
|
|
513
|
-
...
|
|
514
|
-
...
|
|
515
|
-
]),
|
|
516
|
-
return t.namespaceURI ===
|
|
517
|
-
}, gn = function(e, t, n) {
|
|
518
|
-
return t.namespaceURI === z ? e === "math" : t.namespaceURI === Xt ? e === "math" && an[n] : !!mn[e];
|
|
510
|
+
} else e.TRUSTED_TYPES_POLICY === null ? (v = void 0, se = "") : (v === void 0 && (v = he()), v && typeof se == "string" && (se = pe("")));
|
|
511
|
+
y && y(e), un = e;
|
|
512
|
+
}, mn = T({}, [
|
|
513
|
+
...Ue,
|
|
514
|
+
...We,
|
|
515
|
+
...Ge
|
|
516
|
+
]), hn = T({}, [...Ke, ...qe]), gn = function(e, t, n) {
|
|
517
|
+
return t.namespaceURI === R ? e === "svg" : t.namespaceURI === Xt ? e === "svg" && (n === "annotation-xml" || rn[n]) : !!mn[e];
|
|
519
518
|
}, _n = function(e, t, n) {
|
|
520
|
-
return t.namespaceURI ===
|
|
521
|
-
}, vn = function(e) {
|
|
522
|
-
|
|
519
|
+
return t.namespaceURI === R ? e === "math" : t.namespaceURI === Zt ? e === "math" && on[n] : !!hn[e];
|
|
520
|
+
}, vn = function(e, t, n) {
|
|
521
|
+
return t.namespaceURI === Zt && !on[n] || t.namespaceURI === Xt && !rn[n] ? !1 : !hn[e] && (sn[e] || !mn[e]);
|
|
522
|
+
}, yn = function(e) {
|
|
523
|
+
let t = te(e);
|
|
523
524
|
(!t || !t.tagName) && (t = {
|
|
524
|
-
namespaceURI:
|
|
525
|
+
namespaceURI: Qt,
|
|
525
526
|
tagName: "template"
|
|
526
527
|
});
|
|
527
|
-
let n =
|
|
528
|
-
return
|
|
529
|
-
},
|
|
530
|
-
|
|
528
|
+
let n = De(e.tagName), r = De(t.tagName);
|
|
529
|
+
return en[e.namespaceURI] ? e.namespaceURI === Zt ? gn(n, t, r) : e.namespaceURI === Xt ? _n(n, t, r) : e.namespaceURI === R ? vn(n, t, r) : !!(cn === "application/xhtml+xml" && en[e.namespaceURI]) : !1;
|
|
530
|
+
}, B = function(e) {
|
|
531
|
+
we(t.removed, { element: e });
|
|
531
532
|
try {
|
|
532
|
-
|
|
533
|
+
te(e).removeChild(e);
|
|
533
534
|
} catch {
|
|
534
|
-
if (p(e), !
|
|
535
|
+
if (p(e), !te(e)) throw Le("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
535
536
|
}
|
|
536
|
-
},
|
|
537
|
+
}, bn = function(e, t, n) {
|
|
537
538
|
try {
|
|
538
|
-
|
|
539
|
+
ee(e, t);
|
|
539
540
|
} catch {
|
|
540
541
|
try {
|
|
541
542
|
e.removeAttribute(n);
|
|
542
543
|
} catch {}
|
|
543
544
|
}
|
|
544
|
-
},
|
|
545
|
-
|
|
546
|
-
let t =
|
|
545
|
+
}, xn = function(e) {
|
|
546
|
+
H(e);
|
|
547
|
+
let t = h(e);
|
|
547
548
|
if (t) {
|
|
548
549
|
let e = [];
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
}),
|
|
550
|
+
xe(t, (t) => {
|
|
551
|
+
we(e, t);
|
|
552
|
+
}), xe(e, (e) => {
|
|
552
553
|
try {
|
|
553
554
|
p(e);
|
|
554
555
|
} catch {}
|
|
@@ -557,111 +558,111 @@ function yt() {
|
|
|
557
558
|
let n = ne(e);
|
|
558
559
|
if (n) for (let t = n.length - 1; t >= 0; --t) {
|
|
559
560
|
let r = n[t], i = r && r.name;
|
|
560
|
-
typeof i == "string" &&
|
|
561
|
+
typeof i == "string" && bn(e, r, i);
|
|
561
562
|
}
|
|
562
|
-
},
|
|
563
|
+
}, V = function(e, n, r) {
|
|
563
564
|
if (!r) try {
|
|
564
565
|
r = n.getAttributeNode(e);
|
|
565
566
|
} catch {
|
|
566
567
|
r = null;
|
|
567
568
|
}
|
|
568
|
-
|
|
569
|
+
we(t.removed, {
|
|
569
570
|
attribute: r || null,
|
|
570
571
|
from: n
|
|
571
572
|
});
|
|
572
573
|
try {
|
|
573
|
-
r ?
|
|
574
|
+
r ? ee(n, r) : n.removeAttribute(e);
|
|
574
575
|
} catch {
|
|
575
576
|
try {
|
|
576
577
|
n.removeAttribute(e);
|
|
577
578
|
} catch {}
|
|
578
579
|
}
|
|
579
|
-
if (e === "is") if (
|
|
580
|
-
|
|
580
|
+
if (e === "is") if (Ft || It) try {
|
|
581
|
+
B(n);
|
|
581
582
|
} catch {}
|
|
582
583
|
else try {
|
|
583
584
|
n.setAttribute(e, "");
|
|
584
585
|
} catch {}
|
|
585
|
-
},
|
|
586
|
+
}, Sn = function(e) {
|
|
586
587
|
let t = ne(e);
|
|
587
588
|
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
588
589
|
let r = t[n], i = r && r.name;
|
|
589
|
-
typeof i != "string" ||
|
|
590
|
+
typeof i != "string" || A[z(i)] || bn(e, r, i);
|
|
590
591
|
}
|
|
591
|
-
},
|
|
592
|
+
}, H = function(e) {
|
|
592
593
|
let t = [e];
|
|
593
594
|
for (; t.length > 0;) {
|
|
594
595
|
let e = t.pop();
|
|
595
|
-
ae(e) ===
|
|
596
|
-
let n =
|
|
596
|
+
ae(e) === O.element && Sn(e);
|
|
597
|
+
let n = h(e);
|
|
597
598
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
598
599
|
}
|
|
599
|
-
},
|
|
600
|
-
return
|
|
601
|
-
},
|
|
602
|
-
if (!
|
|
600
|
+
}, Cn = function(e, t) {
|
|
601
|
+
return I ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
|
|
602
|
+
}, wn = function(e) {
|
|
603
|
+
if (!I) return;
|
|
603
604
|
let t = [e];
|
|
604
605
|
for (; t.length > 0;) {
|
|
605
606
|
let e = t.pop(), n = ae(e);
|
|
606
|
-
if (n ===
|
|
607
|
+
if (n === O.processingInstruction || n === O.comment && C(ut, e.data)) {
|
|
607
608
|
try {
|
|
608
609
|
p(e);
|
|
609
610
|
} catch {}
|
|
610
611
|
continue;
|
|
611
612
|
}
|
|
612
|
-
if (n ===
|
|
613
|
-
let t = e, n =
|
|
613
|
+
if (n === O.element) {
|
|
614
|
+
let t = e, n = z(oe(e));
|
|
614
615
|
try {
|
|
615
|
-
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") &&
|
|
616
|
+
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && Cn("for", n) && t.removeAttribute("for");
|
|
616
617
|
} catch {}
|
|
617
618
|
}
|
|
618
|
-
let r =
|
|
619
|
+
let r = h(e);
|
|
619
620
|
if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
|
|
620
621
|
}
|
|
621
|
-
},
|
|
622
|
+
}, Tn = function(e) {
|
|
622
623
|
let t = null, r = null;
|
|
623
624
|
if (Pt) e = "<remove></remove>" + e;
|
|
624
625
|
else {
|
|
625
|
-
let t =
|
|
626
|
+
let t = ke(e, /^[\r\n\t ]+/);
|
|
626
627
|
r = t && t[0];
|
|
627
628
|
}
|
|
628
|
-
|
|
629
|
+
cn === "application/xhtml+xml" && Qt === R && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
629
630
|
let i = v ? pe(e) : e;
|
|
630
|
-
if (
|
|
631
|
-
t = new l().parseFromString(i,
|
|
631
|
+
if (Qt === R) try {
|
|
632
|
+
t = new l().parseFromString(i, cn);
|
|
632
633
|
} catch {}
|
|
633
634
|
if (!t || !t.documentElement) {
|
|
634
|
-
t =
|
|
635
|
+
t = ve.createDocument(Qt, "template", null);
|
|
635
636
|
try {
|
|
636
|
-
t.documentElement.innerHTML =
|
|
637
|
+
t.documentElement.innerHTML = $t ? se : i;
|
|
637
638
|
} catch {}
|
|
638
639
|
}
|
|
639
640
|
let a = t.body || t.documentElement;
|
|
640
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null),
|
|
641
|
-
},
|
|
641
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Qt === R ? Ne.call(t, L ? "html" : "body")[0] : L ? t.documentElement : a;
|
|
642
|
+
}, U = function(e) {
|
|
642
643
|
let t = ie ? ie(e) : e.ownerDocument;
|
|
643
|
-
return
|
|
644
|
-
}, Tn = function(e) {
|
|
645
|
-
return e = De(e, Ie, " "), e = De(e, Le, " "), e = De(e, dt, " "), e;
|
|
644
|
+
return ye.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
646
645
|
}, En = function(e) {
|
|
646
|
+
return e = Ae(e, Fe, " "), e = Ae(e, Ie, " "), e = Ae(e, w, " "), e;
|
|
647
|
+
}, Dn = function(e) {
|
|
647
648
|
e.normalize();
|
|
648
|
-
let t = ie ? ie(e) : e.ownerDocument, n =
|
|
649
|
-
for (; r;) r.data =
|
|
649
|
+
let t = ie ? ie(e) : e.ownerDocument, n = ye.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
650
|
+
for (; r;) r.data = En(r.data), r = n.nextNode();
|
|
650
651
|
let i = e.querySelectorAll?.call(e, "template");
|
|
651
|
-
i &&
|
|
652
|
-
|
|
652
|
+
i && xe(i, (e) => {
|
|
653
|
+
G(e.content) && Dn(e.content);
|
|
653
654
|
});
|
|
654
|
-
},
|
|
655
|
+
}, W = function(e) {
|
|
655
656
|
let t = re ? re(e) : null;
|
|
656
|
-
return typeof t != "string" ||
|
|
657
|
-
},
|
|
657
|
+
return typeof t != "string" || z(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ne(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== _(e) || e.childNodes !== h(e);
|
|
658
|
+
}, G = function(e) {
|
|
658
659
|
if (!_ || typeof e != "object" || !e) return !1;
|
|
659
660
|
try {
|
|
660
|
-
return _(e) ===
|
|
661
|
+
return _(e) === O.documentFragment;
|
|
661
662
|
} catch {
|
|
662
663
|
return !1;
|
|
663
664
|
}
|
|
664
|
-
},
|
|
665
|
+
}, On = function(e) {
|
|
665
666
|
if (!_ || typeof e != "object" || !e) return !1;
|
|
666
667
|
try {
|
|
667
668
|
return typeof _(e) == "number";
|
|
@@ -669,56 +670,56 @@ function yt() {
|
|
|
669
670
|
return !1;
|
|
670
671
|
}
|
|
671
672
|
};
|
|
672
|
-
function
|
|
673
|
-
e.length !== 0 &&
|
|
674
|
-
e.call(t, n, r,
|
|
673
|
+
function K(e, n, r) {
|
|
674
|
+
e.length !== 0 && xe(e, (e) => {
|
|
675
|
+
e.call(t, n, r, un);
|
|
675
676
|
});
|
|
676
677
|
}
|
|
677
|
-
let
|
|
678
|
-
return !!(
|
|
678
|
+
let kn = function(e, t) {
|
|
679
|
+
return !!(I && e.hasChildNodes() && !On(e.firstElementChild) && C(lt, e.textContent) && C(lt, e.innerHTML) || I && e.namespaceURI === R && mt[t] && (On(e.firstElementChild) || typeof e.textContent == "string" && C(ht[t], e.textContent)) || e.nodeType === O.processingInstruction || I && e.nodeType === O.comment && C(ut, e.data));
|
|
679
680
|
}, An = function(e, t) {
|
|
680
|
-
return e instanceof RegExp ?
|
|
681
|
+
return e instanceof RegExp ? C(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
|
|
681
682
|
}, jn = function(e, t, n) {
|
|
682
|
-
if (!
|
|
683
|
-
if (
|
|
684
|
-
let t =
|
|
683
|
+
if (!Et[t] && X(t) && An(M.tagNameCheck, t)) return !1;
|
|
684
|
+
if (Vt && !Wt[t]) {
|
|
685
|
+
let t = te(e), r = h(e);
|
|
685
686
|
if (r && t) {
|
|
686
687
|
let i = r.length;
|
|
687
688
|
for (let a = i - 1; a >= 0; --a) {
|
|
688
689
|
let i = e === n ? f(r[a], !0) : r[a];
|
|
689
|
-
t.insertBefore(i,
|
|
690
|
+
t.insertBefore(i, m(e));
|
|
690
691
|
}
|
|
691
692
|
}
|
|
692
693
|
}
|
|
693
|
-
return
|
|
694
|
+
return B(e), !0;
|
|
694
695
|
}, q = function(e, t, n, r) {
|
|
695
|
-
return e.length === 0 ? t : t === n || t === r ?
|
|
696
|
+
return e.length === 0 ? t : t === n || t === r ? E(t) : t;
|
|
696
697
|
}, J = function(e, t) {
|
|
697
|
-
return e === t ||
|
|
698
|
-
},
|
|
699
|
-
if (
|
|
700
|
-
if (
|
|
701
|
-
let r =
|
|
702
|
-
if (
|
|
698
|
+
return e === t || te(e) !== null ? !1 : (Ht && H(e), !0);
|
|
699
|
+
}, Mn = function(e, n) {
|
|
700
|
+
if (K(x.beforeSanitizeElements, e, null), J(e, n)) return !0;
|
|
701
|
+
if (W(e)) return B(e), !0;
|
|
702
|
+
let r = z(oe(e));
|
|
703
|
+
if (k = q(x.uponSanitizeElement, k, Tt, Mt), K(x.uponSanitizeElement, e, {
|
|
703
704
|
tagName: r,
|
|
704
|
-
allowedTags:
|
|
705
|
+
allowedTags: k
|
|
705
706
|
}), J(e, n)) return !0;
|
|
706
|
-
if (
|
|
707
|
-
if (
|
|
707
|
+
if (kn(e, r)) return B(e), !0;
|
|
708
|
+
if (Et[r] || !(P.tagCheck instanceof Function && P.tagCheck(r)) && !k[r]) {
|
|
708
709
|
let t = jn(e, r, n);
|
|
709
|
-
return t === !1 && (
|
|
710
|
+
return t === !1 && (K(x.afterSanitizeElements, e, null), J(e, n)) ? !0 : t;
|
|
710
711
|
}
|
|
711
|
-
if (ae(e) ===
|
|
712
|
-
if (
|
|
713
|
-
let n =
|
|
714
|
-
e.textContent !== n && (
|
|
712
|
+
if (ae(e) === O.element && !yn(e) || (r === "noscript" || r === "noembed" || r === "noframes") && C(dt, e.innerHTML)) return B(e), !0;
|
|
713
|
+
if (F && e.nodeType === O.text) {
|
|
714
|
+
let n = En(e.textContent);
|
|
715
|
+
e.textContent !== n && (we(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
715
716
|
}
|
|
716
|
-
return
|
|
717
|
-
},
|
|
718
|
-
if (
|
|
719
|
-
let i =
|
|
720
|
-
return
|
|
721
|
-
},
|
|
717
|
+
return K(x.afterSanitizeElements, e, null), J(e, n);
|
|
718
|
+
}, Y = function(e, t, r) {
|
|
719
|
+
if (N[t] || Cn(t, e) || Rt && (t === "id" || t === "name") && (r in n || r in dn)) return !1;
|
|
720
|
+
let i = A[t] || P.attributeCheck instanceof Function && P.attributeCheck(t, e);
|
|
721
|
+
return Ot && C(Re, t) || Dt && C(ze, t) ? !0 : i ? Jt[t] || C(wt, Ae(r, St, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && je(r, "data:") === 0 && Kt[e] || kt && !C(pt, Ae(r, St, "")) ? !0 : !r : X(e) && An(M.tagNameCheck, e) && An(M.attributeNameCheck, t, e) || t === "is" && M.allowCustomizedBuiltInElements && An(M.tagNameCheck, r);
|
|
722
|
+
}, Nn = T({}, [
|
|
722
723
|
"annotation-xml",
|
|
723
724
|
"color-profile",
|
|
724
725
|
"font-face",
|
|
@@ -727,66 +728,66 @@ function yt() {
|
|
|
727
728
|
"font-face-src",
|
|
728
729
|
"font-face-uri",
|
|
729
730
|
"missing-glyph"
|
|
730
|
-
]),
|
|
731
|
-
return !
|
|
732
|
-
},
|
|
731
|
+
]), X = function(e) {
|
|
732
|
+
return !Nn[De(e)] && C(Ct, e);
|
|
733
|
+
}, Z = function(e, t, n, r) {
|
|
733
734
|
if (v && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
734
735
|
case "TrustedHTML": return pe(r);
|
|
735
|
-
case "TrustedScriptURL": return
|
|
736
|
+
case "TrustedScriptURL": return me(r);
|
|
736
737
|
}
|
|
737
738
|
return r;
|
|
738
|
-
},
|
|
739
|
+
}, Pn = function(e, t, n, r) {
|
|
739
740
|
try {
|
|
740
|
-
return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r),
|
|
741
|
+
return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), W(e) ? (B(e), !1) : !0;
|
|
741
742
|
} catch {
|
|
742
|
-
return
|
|
743
|
+
return V(t, e), !1;
|
|
743
744
|
}
|
|
744
|
-
},
|
|
745
|
-
if (
|
|
745
|
+
}, Fn = function(e, n) {
|
|
746
|
+
if (K(x.beforeSanitizeAttributes, e, null), J(e, n)) return;
|
|
746
747
|
let r = e.attributes;
|
|
747
|
-
if (!r ||
|
|
748
|
-
|
|
748
|
+
if (!r || W(e)) return;
|
|
749
|
+
A = q(x.uponSanitizeAttribute, A, j, Nt);
|
|
749
750
|
let i = {
|
|
750
751
|
attrName: "",
|
|
751
752
|
attrValue: "",
|
|
752
753
|
keepAttr: !0,
|
|
753
|
-
allowedAttributes:
|
|
754
|
+
allowedAttributes: A,
|
|
754
755
|
forceKeepAttr: void 0
|
|
755
|
-
}, a = r.length, o =
|
|
756
|
+
}, a = r.length, o = z(e.nodeName);
|
|
756
757
|
for (; a--;) {
|
|
757
|
-
let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u =
|
|
758
|
-
if (i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0,
|
|
759
|
-
|
|
758
|
+
let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = z(s), d = l, f = s === "value" ? d : Me(d), p = !1;
|
|
759
|
+
if (i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, K(x.uponSanitizeAttribute, e, i), f = i.attrValue, zt && (u === "id" || u === "name") && je(f, Bt) !== 0 && (V(s, e, n), f = Bt + f, p = !0), I && C(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
|
|
760
|
+
V(s, e, n);
|
|
760
761
|
continue;
|
|
761
762
|
}
|
|
762
|
-
if (u === "attributename" &&
|
|
763
|
-
|
|
763
|
+
if (u === "attributename" && ke(f, "href")) {
|
|
764
|
+
V(s, e, n);
|
|
764
765
|
continue;
|
|
765
766
|
}
|
|
766
767
|
if (!i.forceKeepAttr) {
|
|
767
768
|
if (!i.keepAttr) {
|
|
768
|
-
|
|
769
|
+
V(s, e, n);
|
|
769
770
|
continue;
|
|
770
771
|
}
|
|
771
|
-
if (!
|
|
772
|
-
|
|
772
|
+
if (!At && C(ft, f)) {
|
|
773
|
+
V(s, e, n);
|
|
773
774
|
continue;
|
|
774
775
|
}
|
|
775
|
-
if (
|
|
776
|
-
|
|
776
|
+
if (F && (f = En(f)), !Y(o, u, f)) {
|
|
777
|
+
V(s, e, n);
|
|
777
778
|
continue;
|
|
778
779
|
}
|
|
779
|
-
f =
|
|
780
|
+
f = Z(o, u, c, f), f !== d && Pn(e, s, c, f) && p && Ce(t.removed);
|
|
780
781
|
}
|
|
781
782
|
}
|
|
782
|
-
|
|
783
|
-
},
|
|
784
|
-
let t = null, n =
|
|
785
|
-
for (
|
|
786
|
-
let e =
|
|
787
|
-
|
|
783
|
+
K(x.afterSanitizeAttributes, e, null), J(e, n);
|
|
784
|
+
}, In = function(e) {
|
|
785
|
+
let t = null, n = U(e);
|
|
786
|
+
for (K(x.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (K(x.uponSanitizeShadowNode, t, null), Mn(t, e), Fn(t, e), G(t.content) && In(t.content), ae(t) === O.element) {
|
|
787
|
+
let e = g(t);
|
|
788
|
+
G(e) && (Ln(e), In(e));
|
|
788
789
|
}
|
|
789
|
-
|
|
790
|
+
K(x.afterSanitizeShadowDOM, e, null);
|
|
790
791
|
}, Ln = function(e) {
|
|
791
792
|
let t = [{
|
|
792
793
|
node: e,
|
|
@@ -795,27 +796,27 @@ function yt() {
|
|
|
795
796
|
for (; t.length > 0;) {
|
|
796
797
|
let e = t.pop();
|
|
797
798
|
if (e.shadow) {
|
|
798
|
-
|
|
799
|
+
In(e.shadow);
|
|
799
800
|
continue;
|
|
800
801
|
}
|
|
801
|
-
let n = e.node, r = ae(n) ===
|
|
802
|
+
let n = e.node, r = ae(n) === O.element, i = h(n);
|
|
802
803
|
if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
|
|
803
804
|
node: i[e],
|
|
804
805
|
shadow: null
|
|
805
806
|
});
|
|
806
807
|
if (r) {
|
|
807
808
|
let e = re ? re(n) : null;
|
|
808
|
-
if (typeof e == "string" &&
|
|
809
|
+
if (typeof e == "string" && z(e) === "template") {
|
|
809
810
|
let e = n.content;
|
|
810
|
-
|
|
811
|
+
G(e) && t.push({
|
|
811
812
|
node: e,
|
|
812
813
|
shadow: null
|
|
813
814
|
});
|
|
814
815
|
}
|
|
815
816
|
}
|
|
816
817
|
if (r) {
|
|
817
|
-
let e =
|
|
818
|
-
|
|
818
|
+
let e = g(n);
|
|
819
|
+
G(e) && t.push({
|
|
819
820
|
node: null,
|
|
820
821
|
shadow: e
|
|
821
822
|
}, {
|
|
@@ -827,79 +828,79 @@ function yt() {
|
|
|
827
828
|
};
|
|
828
829
|
return t.sanitize = function(e) {
|
|
829
830
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
830
|
-
if (
|
|
831
|
+
if ($t = !e, $t && (e = "<!-->"), typeof e != "string" && !On(e) && (e = Be(e), typeof e != "string")) throw Le("dirty is not a string, aborting");
|
|
831
832
|
if (!t.isSupported) return e;
|
|
832
|
-
jt ? (
|
|
833
|
-
let c =
|
|
833
|
+
jt ? (k = Mt, A = Nt) : pn(n), (x.uponSanitizeElement.length > 0 || x.uponSanitizeAttribute.length > 0) && (k = E(k)), x.uponSanitizeAttribute.length > 0 && (A = E(A)), t.removed = [];
|
|
834
|
+
let c = Ht && typeof e != "string" && On(e);
|
|
834
835
|
if (c) {
|
|
835
|
-
|
|
836
|
+
wn(e);
|
|
836
837
|
let t = oe(e);
|
|
837
838
|
if (typeof t == "string") {
|
|
838
|
-
let n =
|
|
839
|
-
if (!
|
|
839
|
+
let n = z(t);
|
|
840
|
+
if (!k[n] || Et[n]) throw xn(e), Le("root node is forbidden and cannot be sanitized in-place");
|
|
840
841
|
}
|
|
841
|
-
if (
|
|
842
|
+
if (W(e)) throw xn(e), Le("root node is clobbered and cannot be sanitized in-place");
|
|
842
843
|
try {
|
|
843
844
|
Ln(e);
|
|
844
845
|
} catch (t) {
|
|
845
|
-
throw
|
|
846
|
+
throw xn(e), t;
|
|
846
847
|
}
|
|
847
|
-
} else if (
|
|
848
|
+
} else if (On(e)) i = Tn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === O.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Ln(i);
|
|
848
849
|
else {
|
|
849
|
-
if (!
|
|
850
|
-
if (i =
|
|
850
|
+
if (!Ft && !F && !L && e.indexOf("<") === -1) return v && Lt ? pe(e) : e;
|
|
851
|
+
if (i = Tn(e), !i) return Ft ? null : Lt ? se : "";
|
|
851
852
|
}
|
|
852
|
-
i && Pt &&
|
|
853
|
+
i && Pt && B(i.firstChild);
|
|
853
854
|
let l = c ? e : i;
|
|
854
855
|
try {
|
|
855
|
-
let e =
|
|
856
|
-
for (; o = e.nextNode();)
|
|
856
|
+
let e = U(l);
|
|
857
|
+
for (; o = e.nextNode();) Mn(o, l), Fn(o, l), G(o.content) && In(o.content);
|
|
857
858
|
} catch (n) {
|
|
858
|
-
throw c && (
|
|
859
|
-
e.element &&
|
|
859
|
+
throw c && (xn(e), xe(t.removed, (e) => {
|
|
860
|
+
e.element && H(e.element);
|
|
860
861
|
})), n;
|
|
861
862
|
}
|
|
862
863
|
if (c) {
|
|
863
864
|
let n = !1;
|
|
864
|
-
if (
|
|
865
|
-
t.element && (t.element === e && (n = !0),
|
|
866
|
-
}), n) throw
|
|
867
|
-
return
|
|
865
|
+
if (xe(t.removed, (t) => {
|
|
866
|
+
t.element && (t.element === e && (n = !0), H(t.element));
|
|
867
|
+
}), n) throw Le("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
868
|
+
return F && Dn(e), e;
|
|
868
869
|
}
|
|
869
|
-
if (
|
|
870
|
-
if (
|
|
870
|
+
if (Ft) {
|
|
871
|
+
if (F && Dn(i), It) for (s = be.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
871
872
|
else s = i;
|
|
872
|
-
return (
|
|
873
|
+
return (A.shadowroot || A.shadowrootmode) && (s = Pe.call(r, s, !0)), s;
|
|
873
874
|
}
|
|
874
|
-
let u =
|
|
875
|
-
return
|
|
875
|
+
let u = L ? i.outerHTML : i.innerHTML;
|
|
876
|
+
return L && k["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && C(st, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), F && (u = En(u)), v && Lt ? pe(u) : u;
|
|
876
877
|
}, t.setConfig = function() {
|
|
877
878
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
878
|
-
|
|
879
|
+
pn(e), jt = !0, Mt = k, Nt = A;
|
|
879
880
|
}, t.clearConfig = function() {
|
|
880
|
-
|
|
881
|
+
un = null, jt = !1, Mt = null, Nt = null, v = ce, se = "";
|
|
881
882
|
}, t.isValidAttribute = function(e, t, n) {
|
|
882
|
-
|
|
883
|
-
let r =
|
|
884
|
-
return
|
|
883
|
+
un || pn({});
|
|
884
|
+
let r = z(e), i = z(t);
|
|
885
|
+
return Y(r, i, n);
|
|
885
886
|
}, t.addHook = function(e, t) {
|
|
886
|
-
typeof t == "function" && x
|
|
887
|
+
typeof t == "function" && S(x, e) && we(x[e], t);
|
|
887
888
|
}, t.removeHook = function(e, t) {
|
|
888
|
-
if (x
|
|
889
|
+
if (S(x, e)) {
|
|
889
890
|
if (t !== void 0) {
|
|
890
|
-
let n =
|
|
891
|
-
return n === -1 ? void 0 :
|
|
891
|
+
let n = Se(x[e], t);
|
|
892
|
+
return n === -1 ? void 0 : Te(x[e], n, 1)[0];
|
|
892
893
|
}
|
|
893
|
-
return
|
|
894
|
+
return Ce(x[e]);
|
|
894
895
|
}
|
|
895
896
|
}, t.removeHooks = function(e) {
|
|
896
|
-
x
|
|
897
|
+
S(x, e) && (x[e] = []);
|
|
897
898
|
}, t.removeAllHooks = function() {
|
|
898
|
-
|
|
899
|
+
x = vt();
|
|
899
900
|
}, t;
|
|
900
901
|
}
|
|
901
|
-
var
|
|
902
|
-
function
|
|
902
|
+
var St = xt(), Ct;
|
|
903
|
+
function wt() {
|
|
903
904
|
return {
|
|
904
905
|
async: !1,
|
|
905
906
|
breaks: !1,
|
|
@@ -913,19 +914,19 @@ function St() {
|
|
|
913
914
|
walkTokens: null
|
|
914
915
|
};
|
|
915
916
|
}
|
|
916
|
-
var
|
|
917
|
-
function
|
|
918
|
-
|
|
917
|
+
var k = wt();
|
|
918
|
+
function Tt(e) {
|
|
919
|
+
k = e;
|
|
919
920
|
}
|
|
920
|
-
var
|
|
921
|
-
function
|
|
921
|
+
var A = { exec: () => null };
|
|
922
|
+
function j(e) {
|
|
922
923
|
let t = [];
|
|
923
924
|
return (n) => {
|
|
924
925
|
let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
|
|
925
926
|
return i || (i = e(r), t[r] = i), i;
|
|
926
927
|
};
|
|
927
928
|
}
|
|
928
|
-
function
|
|
929
|
+
function M(e, t = "") {
|
|
929
930
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
930
931
|
replace: (e, t) => {
|
|
931
932
|
let i = typeof t == "string" ? t : t.source;
|
|
@@ -935,7 +936,7 @@ function j(e, t = "") {
|
|
|
935
936
|
};
|
|
936
937
|
return r;
|
|
937
938
|
}
|
|
938
|
-
var
|
|
939
|
+
var Et = ((e = "") => {
|
|
939
940
|
try {
|
|
940
941
|
return !!RegExp("(?<=1)(?<!1)" + e);
|
|
941
942
|
} catch {
|
|
@@ -992,102 +993,102 @@ var M = ((e = "") => {
|
|
|
992
993
|
notSpaceStart: /^\S*/,
|
|
993
994
|
endingNewline: /\n$/,
|
|
994
995
|
listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
995
|
-
nextBulletRegex:
|
|
996
|
-
hrRegex:
|
|
997
|
-
fencesBeginRegex:
|
|
998
|
-
headingBeginRegex:
|
|
999
|
-
htmlBeginRegex:
|
|
1000
|
-
blockquoteBeginRegex:
|
|
1001
|
-
}, P = /^(?:[ \t]*(?:\n|$))+/,
|
|
1002
|
-
blockquote:
|
|
1003
|
-
code:
|
|
1004
|
-
def:
|
|
1005
|
-
fences:
|
|
1006
|
-
heading:
|
|
1007
|
-
hr:
|
|
1008
|
-
html:
|
|
1009
|
-
lheading:
|
|
1010
|
-
list:
|
|
996
|
+
nextBulletRegex: j((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
|
|
997
|
+
hrRegex: j((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
|
|
998
|
+
fencesBeginRegex: j((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
|
|
999
|
+
headingBeginRegex: j((e) => RegExp(`^ {0,${e}}#`)),
|
|
1000
|
+
htmlBeginRegex: j((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
|
|
1001
|
+
blockquoteBeginRegex: j((e) => RegExp(`^ {0,${e}}>`))
|
|
1002
|
+
}, P = /^(?:[ \t]*(?:\n|$))+/, Dt = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ot = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, kt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, At = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, F = / {0,3}(?:[*+-]|\d{1,9}[.)])/, I = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, L = M(I).replace(/bull/g, F).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(), jt = M(I).replace(/bull/g, F).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(), Mt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Nt = /^[^\n]+/, Pt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ft = M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Pt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), It = M(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, F).getRegex(), Lt = "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", Rt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, zt = M("^ {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", Rt).replace("tag", Lt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Bt = M(Mt).replace("hr", kt).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", Lt).getRegex(), Vt = {
|
|
1003
|
+
blockquote: M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Bt).getRegex(),
|
|
1004
|
+
code: Dt,
|
|
1005
|
+
def: Ft,
|
|
1006
|
+
fences: Ot,
|
|
1007
|
+
heading: At,
|
|
1008
|
+
hr: kt,
|
|
1009
|
+
html: zt,
|
|
1010
|
+
lheading: L,
|
|
1011
|
+
list: It,
|
|
1011
1012
|
newline: P,
|
|
1012
|
-
paragraph:
|
|
1013
|
-
table:
|
|
1014
|
-
text:
|
|
1015
|
-
},
|
|
1016
|
-
...
|
|
1017
|
-
lheading:
|
|
1018
|
-
table:
|
|
1019
|
-
paragraph:
|
|
1020
|
-
},
|
|
1021
|
-
...
|
|
1022
|
-
html:
|
|
1013
|
+
paragraph: Bt,
|
|
1014
|
+
table: A,
|
|
1015
|
+
text: Nt
|
|
1016
|
+
}, Ht = M("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", kt).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", Lt).getRegex(), Ut = {
|
|
1017
|
+
...Vt,
|
|
1018
|
+
lheading: jt,
|
|
1019
|
+
table: Ht,
|
|
1020
|
+
paragraph: M(Mt).replace("hr", kt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ht).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", Lt).getRegex()
|
|
1021
|
+
}, Wt = {
|
|
1022
|
+
...Vt,
|
|
1023
|
+
html: M("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Rt).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(),
|
|
1023
1024
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
1024
1025
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
1025
|
-
fences:
|
|
1026
|
+
fences: A,
|
|
1026
1027
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
1027
|
-
paragraph:
|
|
1028
|
-
},
|
|
1029
|
-
_backpedal:
|
|
1030
|
-
anyPunctuation:
|
|
1031
|
-
autolink:
|
|
1032
|
-
blockSkip:
|
|
1033
|
-
br:
|
|
1034
|
-
code:
|
|
1035
|
-
del:
|
|
1036
|
-
delLDelim:
|
|
1037
|
-
delRDelim:
|
|
1038
|
-
emStrongLDelim:
|
|
1039
|
-
emStrongRDelimAst:
|
|
1040
|
-
emStrongRDelimUnd:
|
|
1041
|
-
escape:
|
|
1042
|
-
link:
|
|
1043
|
-
nolink:
|
|
1044
|
-
punctuation:
|
|
1045
|
-
reflink:
|
|
1046
|
-
reflinkSearch:
|
|
1047
|
-
tag:
|
|
1048
|
-
text:
|
|
1049
|
-
url:
|
|
1050
|
-
},
|
|
1051
|
-
...
|
|
1052
|
-
link:
|
|
1053
|
-
reflink:
|
|
1028
|
+
paragraph: M(Mt).replace("hr", kt).replace("heading", " *#{1,6} *[^\n]").replace("lheading", L).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
1029
|
+
}, Gt = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Kt = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, qt = /^( {2,}|\\)\n(?!\s*$)/, Jt = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Yt = /[\p{P}\p{S}]/u, Xt = /[\s\p{P}\p{S}]/u, Zt = /[^\s\p{P}\p{S}]/u, R = M(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Xt).getRegex(), Qt = /(?!~)[\p{P}\p{S}]/u, $t = /(?!~)[\s\p{P}\p{S}]/u, en = /(?:[^\s\p{P}\p{S}]|~)/u, tn = M(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Et ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), nn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, rn = M(nn, "u").replace(/punct/g, Yt).getRegex(), an = M(nn, "u").replace(/punct/g, Qt).getRegex(), on = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", sn = M(on, "gu").replace(/notPunctSpace/g, Zt).replace(/punctSpace/g, Xt).replace(/punct/g, Yt).getRegex(), cn = M(on, "gu").replace(/notPunctSpace/g, en).replace(/punctSpace/g, $t).replace(/punct/g, Qt).getRegex(), ln = M("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Zt).replace(/punctSpace/g, Xt).replace(/punct/g, Yt).getRegex(), z = M(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Yt).getRegex(), un = M("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Zt).replace(/punctSpace/g, Xt).replace(/punct/g, Yt).getRegex(), dn = M(/\\(punct)/, "gu").replace(/punct/g, Yt).getRegex(), fn = M(/^<(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(), pn = M(Rt).replace("(?:-->|$)", "-->").getRegex(), mn = M("^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", pn).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), hn = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, gn = M(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", hn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), _n = M(/^!?\[(label)\]\[(ref)\]/).replace("label", hn).replace("ref", Pt).getRegex(), vn = M(/^!?\[(ref)\](?:\[\])?/).replace("ref", Pt).getRegex(), yn = M("reflink|nolink(?!\\()", "g").replace("reflink", _n).replace("nolink", vn).getRegex(), B = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, bn = {
|
|
1030
|
+
_backpedal: A,
|
|
1031
|
+
anyPunctuation: dn,
|
|
1032
|
+
autolink: fn,
|
|
1033
|
+
blockSkip: tn,
|
|
1034
|
+
br: qt,
|
|
1035
|
+
code: Kt,
|
|
1036
|
+
del: A,
|
|
1037
|
+
delLDelim: A,
|
|
1038
|
+
delRDelim: A,
|
|
1039
|
+
emStrongLDelim: rn,
|
|
1040
|
+
emStrongRDelimAst: sn,
|
|
1041
|
+
emStrongRDelimUnd: ln,
|
|
1042
|
+
escape: Gt,
|
|
1043
|
+
link: gn,
|
|
1044
|
+
nolink: vn,
|
|
1045
|
+
punctuation: R,
|
|
1046
|
+
reflink: _n,
|
|
1047
|
+
reflinkSearch: yn,
|
|
1048
|
+
tag: mn,
|
|
1049
|
+
text: Jt,
|
|
1050
|
+
url: A
|
|
1051
|
+
}, xn = {
|
|
1052
|
+
...bn,
|
|
1053
|
+
link: M(/^!?\[(label)\]\((.*?)\)/).replace("label", hn).getRegex(),
|
|
1054
|
+
reflink: M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", hn).getRegex()
|
|
1054
1055
|
}, V = {
|
|
1055
|
-
...
|
|
1056
|
-
emStrongRDelimAst:
|
|
1057
|
-
emStrongLDelim:
|
|
1058
|
-
delLDelim:
|
|
1059
|
-
delRDelim:
|
|
1060
|
-
url:
|
|
1056
|
+
...bn,
|
|
1057
|
+
emStrongRDelimAst: cn,
|
|
1058
|
+
emStrongLDelim: an,
|
|
1059
|
+
delLDelim: z,
|
|
1060
|
+
delRDelim: un,
|
|
1061
|
+
url: M(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", B).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
1061
1062
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
1062
1063
|
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
1063
|
-
text:
|
|
1064
|
-
},
|
|
1064
|
+
text: M(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", B).getRegex()
|
|
1065
|
+
}, Sn = {
|
|
1065
1066
|
...V,
|
|
1066
|
-
br:
|
|
1067
|
-
text:
|
|
1068
|
-
}, bn = {
|
|
1069
|
-
normal: Lt,
|
|
1070
|
-
gfm: zt,
|
|
1071
|
-
pedantic: Bt
|
|
1067
|
+
br: M(qt).replace("{2,}", "*").getRegex(),
|
|
1068
|
+
text: M(V.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
1072
1069
|
}, H = {
|
|
1073
|
-
normal:
|
|
1070
|
+
normal: Vt,
|
|
1071
|
+
gfm: Ut,
|
|
1072
|
+
pedantic: Wt
|
|
1073
|
+
}, Cn = {
|
|
1074
|
+
normal: bn,
|
|
1074
1075
|
gfm: V,
|
|
1075
|
-
breaks:
|
|
1076
|
-
pedantic:
|
|
1077
|
-
},
|
|
1076
|
+
breaks: Sn,
|
|
1077
|
+
pedantic: xn
|
|
1078
|
+
}, wn = {
|
|
1078
1079
|
"&": "&",
|
|
1079
1080
|
"<": "<",
|
|
1080
1081
|
">": ">",
|
|
1081
1082
|
"\"": """,
|
|
1082
1083
|
"'": "'"
|
|
1083
|
-
},
|
|
1084
|
+
}, Tn = (e) => wn[e];
|
|
1084
1085
|
function U(e, t) {
|
|
1085
1086
|
if (t) {
|
|
1086
|
-
if (N.escapeTest.test(e)) return e.replace(N.escapeReplace,
|
|
1087
|
-
} else if (N.escapeTestNoEncode.test(e)) return e.replace(N.escapeReplaceNoEncode,
|
|
1087
|
+
if (N.escapeTest.test(e)) return e.replace(N.escapeReplace, Tn);
|
|
1088
|
+
} else if (N.escapeTestNoEncode.test(e)) return e.replace(N.escapeReplaceNoEncode, Tn);
|
|
1088
1089
|
return e;
|
|
1089
1090
|
}
|
|
1090
|
-
function
|
|
1091
|
+
function En(e) {
|
|
1091
1092
|
try {
|
|
1092
1093
|
e = encodeURI(e).replace(N.percentDecode, "%");
|
|
1093
1094
|
} catch {
|
|
@@ -1095,7 +1096,7 @@ function Cn(e) {
|
|
|
1095
1096
|
}
|
|
1096
1097
|
return e;
|
|
1097
1098
|
}
|
|
1098
|
-
function
|
|
1099
|
+
function Dn(e, t) {
|
|
1099
1100
|
let n = e.replace(N.findPipe, (e, t, n) => {
|
|
1100
1101
|
let r = !1, i = t;
|
|
1101
1102
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
@@ -1118,12 +1119,12 @@ function W(e, t, n) {
|
|
|
1118
1119
|
}
|
|
1119
1120
|
return e.slice(0, r - i);
|
|
1120
1121
|
}
|
|
1121
|
-
function
|
|
1122
|
+
function G(e) {
|
|
1122
1123
|
let t = e.split("\n"), n = t.length - 1;
|
|
1123
1124
|
for (; n >= 0 && N.blankLine.test(t[n]);) n--;
|
|
1124
1125
|
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
1125
1126
|
}
|
|
1126
|
-
function
|
|
1127
|
+
function On(e, t) {
|
|
1127
1128
|
if (e.indexOf(t[1]) === -1) return -1;
|
|
1128
1129
|
let n = 0;
|
|
1129
1130
|
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
@@ -1131,7 +1132,7 @@ function En(e, t) {
|
|
|
1131
1132
|
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
1132
1133
|
return n > 0 ? -2 : -1;
|
|
1133
1134
|
}
|
|
1134
|
-
function
|
|
1135
|
+
function K(e, t = 0) {
|
|
1135
1136
|
let n = t, r = "";
|
|
1136
1137
|
for (let t of e) if (t === " ") {
|
|
1137
1138
|
let e = 4 - n % 4;
|
|
@@ -1139,7 +1140,7 @@ function Dn(e, t = 0) {
|
|
|
1139
1140
|
} else r += t, n++;
|
|
1140
1141
|
return r;
|
|
1141
1142
|
}
|
|
1142
|
-
function
|
|
1143
|
+
function kn(e, t, n, r, i) {
|
|
1143
1144
|
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
1144
1145
|
r.state.inLink = !0;
|
|
1145
1146
|
let c = {
|
|
@@ -1152,7 +1153,7 @@ function On(e, t, n, r, i) {
|
|
|
1152
1153
|
};
|
|
1153
1154
|
return r.state.inLink = !1, c;
|
|
1154
1155
|
}
|
|
1155
|
-
function
|
|
1156
|
+
function An(e, t, n) {
|
|
1156
1157
|
let r = e.match(n.other.indentCodeCompensation);
|
|
1157
1158
|
if (r === null) return t;
|
|
1158
1159
|
let i = r[1];
|
|
@@ -1163,9 +1164,9 @@ function kn(e, t, n) {
|
|
|
1163
1164
|
return r.length >= i.length ? e.slice(i.length) : e;
|
|
1164
1165
|
}).join("\n");
|
|
1165
1166
|
}
|
|
1166
|
-
var
|
|
1167
|
+
var jn = class {
|
|
1167
1168
|
constructor(e) {
|
|
1168
|
-
s(this, "options", void 0), s(this, "rules", void 0), s(this, "lexer", void 0), this.options = e ||
|
|
1169
|
+
s(this, "options", void 0), s(this, "rules", void 0), s(this, "lexer", void 0), this.options = e || k;
|
|
1169
1170
|
}
|
|
1170
1171
|
space(e) {
|
|
1171
1172
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -1177,7 +1178,7 @@ var G = class {
|
|
|
1177
1178
|
code(e) {
|
|
1178
1179
|
let t = this.rules.block.code.exec(e);
|
|
1179
1180
|
if (t) {
|
|
1180
|
-
let e = this.options.pedantic ? t[0] :
|
|
1181
|
+
let e = this.options.pedantic ? t[0] : G(t[0]);
|
|
1181
1182
|
return {
|
|
1182
1183
|
type: "code",
|
|
1183
1184
|
raw: e,
|
|
@@ -1189,7 +1190,7 @@ var G = class {
|
|
|
1189
1190
|
fences(e) {
|
|
1190
1191
|
let t = this.rules.block.fences.exec(e);
|
|
1191
1192
|
if (t) {
|
|
1192
|
-
let e = t[0], n =
|
|
1193
|
+
let e = t[0], n = An(e, t[3] || "", this.rules);
|
|
1193
1194
|
return {
|
|
1194
1195
|
type: "code",
|
|
1195
1196
|
raw: e,
|
|
@@ -1275,18 +1276,18 @@ ${c}` : c;
|
|
|
1275
1276
|
let n = !1, r = "", s = "";
|
|
1276
1277
|
if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
1277
1278
|
r = t[0], e = e.substring(r.length);
|
|
1278
|
-
let c =
|
|
1279
|
+
let c = K(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
|
|
1279
1280
|
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) {
|
|
1280
1281
|
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), f = this.rules.other.blockquoteBeginRegex(d);
|
|
1281
1282
|
for (; e;) {
|
|
1282
|
-
let p = e.split("\n", 1)[0],
|
|
1283
|
-
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "),
|
|
1284
|
-
if (
|
|
1283
|
+
let p = e.split("\n", 1)[0], ee;
|
|
1284
|
+
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), ee = l) : ee = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || f.test(l) || t.test(l) || n.test(l)) break;
|
|
1285
|
+
if (ee.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + ee.slice(d);
|
|
1285
1286
|
else {
|
|
1286
1287
|
if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
|
|
1287
1288
|
s += "\n" + l;
|
|
1288
1289
|
}
|
|
1289
|
-
u = !l.trim(), r += p + "\n", e = e.substring(p.length + 1), c =
|
|
1290
|
+
u = !l.trim(), r += p + "\n", e = e.substring(p.length + 1), c = ee.slice(d);
|
|
1290
1291
|
}
|
|
1291
1292
|
}
|
|
1292
1293
|
i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
|
|
@@ -1341,7 +1342,7 @@ ${c}` : c;
|
|
|
1341
1342
|
html(e) {
|
|
1342
1343
|
let t = this.rules.block.html.exec(e);
|
|
1343
1344
|
if (t) {
|
|
1344
|
-
let e =
|
|
1345
|
+
let e = G(t[0]);
|
|
1345
1346
|
return {
|
|
1346
1347
|
type: "html",
|
|
1347
1348
|
block: !0,
|
|
@@ -1367,7 +1368,7 @@ ${c}` : c;
|
|
|
1367
1368
|
table(e) {
|
|
1368
1369
|
let t = this.rules.block.table.exec(e);
|
|
1369
1370
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
1370
|
-
let n =
|
|
1371
|
+
let n = Dn(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 = {
|
|
1371
1372
|
type: "table",
|
|
1372
1373
|
raw: W(t[0], "\n"),
|
|
1373
1374
|
header: [],
|
|
@@ -1382,7 +1383,7 @@ ${c}` : c;
|
|
|
1382
1383
|
header: !0,
|
|
1383
1384
|
align: a.align[e]
|
|
1384
1385
|
});
|
|
1385
|
-
for (let e of i) a.rows.push(
|
|
1386
|
+
for (let e of i) a.rows.push(Dn(e, a.header.length).map((e, t) => ({
|
|
1386
1387
|
text: e,
|
|
1387
1388
|
tokens: this.lexer.inline(e),
|
|
1388
1389
|
header: !1,
|
|
@@ -1453,7 +1454,7 @@ ${c}` : c;
|
|
|
1453
1454
|
let t = W(e.slice(0, -1), "\\");
|
|
1454
1455
|
if ((e.length - t.length) % 2 == 0) return;
|
|
1455
1456
|
} else {
|
|
1456
|
-
let e =
|
|
1457
|
+
let e = On(t[2], "()");
|
|
1457
1458
|
if (e === -2) return;
|
|
1458
1459
|
if (e > -1) {
|
|
1459
1460
|
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
@@ -1465,7 +1466,7 @@ ${c}` : c;
|
|
|
1465
1466
|
let e = this.rules.other.pedanticHrefTitle.exec(n);
|
|
1466
1467
|
e && (n = e[1], r = e[3]);
|
|
1467
1468
|
} else r = t[3] ? t[3].slice(1, -1) : "";
|
|
1468
|
-
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)),
|
|
1469
|
+
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)), kn(t, {
|
|
1469
1470
|
href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
1470
1471
|
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
1471
1472
|
}, t[0], this.lexer, this.rules);
|
|
@@ -1483,7 +1484,7 @@ ${c}` : c;
|
|
|
1483
1484
|
text: e
|
|
1484
1485
|
};
|
|
1485
1486
|
}
|
|
1486
|
-
return
|
|
1487
|
+
return kn(n, e, n[0], this.lexer, this.rules);
|
|
1487
1488
|
}
|
|
1488
1489
|
}
|
|
1489
1490
|
emStrong(e, t, n = "") {
|
|
@@ -1615,24 +1616,24 @@ ${c}` : c;
|
|
|
1615
1616
|
};
|
|
1616
1617
|
}
|
|
1617
1618
|
}
|
|
1618
|
-
},
|
|
1619
|
+
}, q = class e {
|
|
1619
1620
|
constructor(e) {
|
|
1620
|
-
s(this, "tokens", void 0), s(this, "options", void 0), s(this, "state", void 0), s(this, "inlineQueue", void 0), s(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e ||
|
|
1621
|
+
s(this, "tokens", void 0), s(this, "options", void 0), s(this, "state", void 0), s(this, "inlineQueue", void 0), s(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e || k, this.options.tokenizer = this.options.tokenizer || new jn(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
1621
1622
|
inLink: !1,
|
|
1622
1623
|
inRawBlock: !1,
|
|
1623
1624
|
top: !0
|
|
1624
1625
|
};
|
|
1625
1626
|
let t = {
|
|
1626
1627
|
other: N,
|
|
1627
|
-
block:
|
|
1628
|
-
inline:
|
|
1628
|
+
block: H.normal,
|
|
1629
|
+
inline: Cn.normal
|
|
1629
1630
|
};
|
|
1630
|
-
this.options.pedantic ? (t.block =
|
|
1631
|
+
this.options.pedantic ? (t.block = H.pedantic, t.inline = Cn.pedantic) : this.options.gfm && (t.block = H.gfm, this.options.breaks ? t.inline = Cn.breaks : t.inline = Cn.gfm), this.tokenizer.rules = t;
|
|
1631
1632
|
}
|
|
1632
1633
|
static get rules() {
|
|
1633
1634
|
return {
|
|
1634
|
-
block:
|
|
1635
|
-
inline:
|
|
1635
|
+
block: H,
|
|
1636
|
+
inline: Cn
|
|
1636
1637
|
};
|
|
1637
1638
|
}
|
|
1638
1639
|
static lex(t, n) {
|
|
@@ -1832,9 +1833,9 @@ ${c}` : c;
|
|
|
1832
1833
|
if (this.options.silent) console.error(t);
|
|
1833
1834
|
else throw Error(t);
|
|
1834
1835
|
}
|
|
1835
|
-
},
|
|
1836
|
+
}, J = class {
|
|
1836
1837
|
constructor(e) {
|
|
1837
|
-
s(this, "options", void 0), s(this, "parser", void 0), this.options = e ||
|
|
1838
|
+
s(this, "options", void 0), s(this, "parser", void 0), this.options = e || k;
|
|
1838
1839
|
}
|
|
1839
1840
|
space(e) {
|
|
1840
1841
|
return "";
|
|
@@ -1920,7 +1921,7 @@ ${e}</tr>
|
|
|
1920
1921
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
1921
1922
|
}
|
|
1922
1923
|
link({ href: e, title: t, tokens: n }) {
|
|
1923
|
-
let r = this.parser.parseInline(n), i =
|
|
1924
|
+
let r = this.parser.parseInline(n), i = En(e);
|
|
1924
1925
|
if (i === null) return r;
|
|
1925
1926
|
e = i;
|
|
1926
1927
|
let a = "<a href=\"" + e + "\"";
|
|
@@ -1928,7 +1929,7 @@ ${e}</tr>
|
|
|
1928
1929
|
}
|
|
1929
1930
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
1930
1931
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
1931
|
-
let i =
|
|
1932
|
+
let i = En(e);
|
|
1932
1933
|
if (i === null) return U(n);
|
|
1933
1934
|
e = i;
|
|
1934
1935
|
let a = `<img src="${e}" alt="${U(n)}"`;
|
|
@@ -1937,7 +1938,7 @@ ${e}</tr>
|
|
|
1937
1938
|
text(e) {
|
|
1938
1939
|
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : U(e.text);
|
|
1939
1940
|
}
|
|
1940
|
-
},
|
|
1941
|
+
}, Mn = class {
|
|
1941
1942
|
strong({ text: e }) {
|
|
1942
1943
|
return e;
|
|
1943
1944
|
}
|
|
@@ -1968,9 +1969,9 @@ ${e}</tr>
|
|
|
1968
1969
|
checkbox({ raw: e }) {
|
|
1969
1970
|
return e;
|
|
1970
1971
|
}
|
|
1971
|
-
},
|
|
1972
|
+
}, Y = class e {
|
|
1972
1973
|
constructor(e) {
|
|
1973
|
-
s(this, "options", void 0), s(this, "renderer", void 0), s(this, "textRenderer", void 0), this.options = e ||
|
|
1974
|
+
s(this, "options", void 0), s(this, "renderer", void 0), s(this, "textRenderer", void 0), this.options = e || k, 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 Mn();
|
|
1974
1975
|
}
|
|
1975
1976
|
static parse(t, n) {
|
|
1976
1977
|
return new e(n).parse(t);
|
|
@@ -2116,9 +2117,9 @@ ${e}</tr>
|
|
|
2116
2117
|
}
|
|
2117
2118
|
return n;
|
|
2118
2119
|
}
|
|
2119
|
-
},
|
|
2120
|
+
}, Nn = (Ct = class {
|
|
2120
2121
|
constructor(e) {
|
|
2121
|
-
s(this, "options", void 0), s(this, "block", void 0), this.options = e ||
|
|
2122
|
+
s(this, "options", void 0), s(this, "block", void 0), this.options = e || k;
|
|
2122
2123
|
}
|
|
2123
2124
|
preprocess(e) {
|
|
2124
2125
|
return e;
|
|
@@ -2133,23 +2134,23 @@ ${e}</tr>
|
|
|
2133
2134
|
return e;
|
|
2134
2135
|
}
|
|
2135
2136
|
provideLexer(e = this.block) {
|
|
2136
|
-
return e ?
|
|
2137
|
+
return e ? q.lex : q.lexInline;
|
|
2137
2138
|
}
|
|
2138
2139
|
provideParser(e = this.block) {
|
|
2139
|
-
return e ?
|
|
2140
|
+
return e ? Y.parse : Y.parseInline;
|
|
2140
2141
|
}
|
|
2141
|
-
}, s(
|
|
2142
|
+
}, s(Ct, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
2142
2143
|
"preprocess",
|
|
2143
2144
|
"postprocess",
|
|
2144
2145
|
"processAllTokens",
|
|
2145
2146
|
"emStrongMask"
|
|
2146
|
-
])), s(
|
|
2147
|
+
])), s(Ct, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set([
|
|
2147
2148
|
"preprocess",
|
|
2148
2149
|
"postprocess",
|
|
2149
2150
|
"processAllTokens"
|
|
2150
|
-
])),
|
|
2151
|
+
])), Ct), X = new class {
|
|
2151
2152
|
constructor(...e) {
|
|
2152
|
-
s(this, "defaults",
|
|
2153
|
+
s(this, "defaults", wt()), s(this, "options", this.setOptions), s(this, "parse", this.parseMarkdown(!0)), s(this, "parseInline", this.parseMarkdown(!1)), s(this, "Parser", Y), s(this, "Renderer", J), s(this, "TextRenderer", Mn), s(this, "Lexer", q), s(this, "Tokenizer", jn), s(this, "Hooks", Nn), this.use(...e);
|
|
2153
2154
|
}
|
|
2154
2155
|
walkTokens(e, t) {
|
|
2155
2156
|
let n = [];
|
|
@@ -2198,7 +2199,7 @@ ${e}</tr>
|
|
|
2198
2199
|
}
|
|
2199
2200
|
"childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
|
|
2200
2201
|
}), n.extensions = t), e.renderer) {
|
|
2201
|
-
let t = this.defaults.renderer || new
|
|
2202
|
+
let t = this.defaults.renderer || new J(this.defaults);
|
|
2202
2203
|
for (let n in e.renderer) {
|
|
2203
2204
|
if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
|
|
2204
2205
|
if (["options", "parser"].includes(n)) continue;
|
|
@@ -2211,7 +2212,7 @@ ${e}</tr>
|
|
|
2211
2212
|
n.renderer = t;
|
|
2212
2213
|
}
|
|
2213
2214
|
if (e.tokenizer) {
|
|
2214
|
-
let t = this.defaults.tokenizer || new
|
|
2215
|
+
let t = this.defaults.tokenizer || new jn(this.defaults);
|
|
2215
2216
|
for (let n in e.tokenizer) {
|
|
2216
2217
|
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
2217
2218
|
if ([
|
|
@@ -2228,13 +2229,13 @@ ${e}</tr>
|
|
|
2228
2229
|
n.tokenizer = t;
|
|
2229
2230
|
}
|
|
2230
2231
|
if (e.hooks) {
|
|
2231
|
-
let t = this.defaults.hooks || new
|
|
2232
|
+
let t = this.defaults.hooks || new Nn();
|
|
2232
2233
|
for (let n in e.hooks) {
|
|
2233
2234
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
2234
2235
|
if (["options", "block"].includes(n)) continue;
|
|
2235
2236
|
let r = n, i = e.hooks[r], a = t[r];
|
|
2236
|
-
|
|
2237
|
-
if (this.defaults.async &&
|
|
2237
|
+
Nn.passThroughHooks.has(n) ? t[r] = (e) => {
|
|
2238
|
+
if (this.defaults.async && Nn.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
2238
2239
|
let n = await i.call(t, e);
|
|
2239
2240
|
return a.call(t, n);
|
|
2240
2241
|
})();
|
|
@@ -2271,10 +2272,10 @@ ${e}</tr>
|
|
|
2271
2272
|
}, this;
|
|
2272
2273
|
}
|
|
2273
2274
|
lexer(e, t) {
|
|
2274
|
-
return
|
|
2275
|
+
return q.lex(e, t ?? this.defaults);
|
|
2275
2276
|
}
|
|
2276
2277
|
parser(e, t) {
|
|
2277
|
-
return
|
|
2278
|
+
return Y.parse(e, t ?? this.defaults);
|
|
2278
2279
|
}
|
|
2279
2280
|
parseMarkdown(e) {
|
|
2280
2281
|
return (t, n) => {
|
|
@@ -2286,16 +2287,16 @@ ${e}</tr>
|
|
|
2286
2287
|
if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
2287
2288
|
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
2288
2289
|
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
2289
|
-
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ?
|
|
2290
|
+
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;
|
|
2290
2291
|
i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
|
|
2291
|
-
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ?
|
|
2292
|
+
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? Y.parse : Y.parseInline)(a, i);
|
|
2292
2293
|
return i.hooks ? await i.hooks.postprocess(o) : o;
|
|
2293
2294
|
})().catch(a);
|
|
2294
2295
|
try {
|
|
2295
2296
|
i.hooks && (t = i.hooks.preprocess(t));
|
|
2296
|
-
let n = (i.hooks ? i.hooks.provideLexer(e) : e ?
|
|
2297
|
+
let n = (i.hooks ? i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(t, i);
|
|
2297
2298
|
i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
|
|
2298
|
-
let r = (i.hooks ? i.hooks.provideParser(e) : e ?
|
|
2299
|
+
let r = (i.hooks ? i.hooks.provideParser(e) : e ? Y.parse : Y.parseInline)(n, i);
|
|
2299
2300
|
return i.hooks && (r = i.hooks.postprocess(r)), r;
|
|
2300
2301
|
} catch (e) {
|
|
2301
2302
|
return a(e);
|
|
@@ -2313,24 +2314,24 @@ ${e}</tr>
|
|
|
2313
2314
|
};
|
|
2314
2315
|
}
|
|
2315
2316
|
}();
|
|
2316
|
-
function
|
|
2317
|
-
return
|
|
2317
|
+
function Z(e, t) {
|
|
2318
|
+
return X.parse(e, t);
|
|
2318
2319
|
}
|
|
2319
|
-
|
|
2320
|
-
return
|
|
2321
|
-
},
|
|
2322
|
-
return
|
|
2323
|
-
},
|
|
2324
|
-
return
|
|
2325
|
-
},
|
|
2320
|
+
Z.options = Z.setOptions = function(e) {
|
|
2321
|
+
return X.setOptions(e), Z.defaults = X.defaults, Tt(Z.defaults), Z;
|
|
2322
|
+
}, Z.getDefaults = wt, Z.defaults = k, Z.use = function(...e) {
|
|
2323
|
+
return X.use(...e), Z.defaults = X.defaults, Tt(Z.defaults), Z;
|
|
2324
|
+
}, Z.walkTokens = function(e, t) {
|
|
2325
|
+
return X.walkTokens(e, t);
|
|
2326
|
+
}, Z.parseInline = X.parseInline, Z.Parser = Y, Z.parser = Y.parse, Z.Renderer = J, Z.TextRenderer = Mn, Z.Lexer = q, Z.lexer = q.lex, Z.Tokenizer = jn, Z.Hooks = Nn, Z.parse = Z, Z.options, Z.setOptions, Z.use, Z.walkTokens, Z.parseInline, Y.parse, q.lex;
|
|
2326
2327
|
//#endregion
|
|
2327
2328
|
//#region src/components/ai-chat/ai-chat.module.scss?inline
|
|
2328
|
-
var Mn = ":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 .user-message-content{gap:var(--luzmo-spacing-3,8px);flex-direction:column;display:flex}:host .user-message-attachments{gap:var(--luzmo-spacing-2,4px);flex-wrap:wrap;display:flex}:host .user-message-attachment{width:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));height:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));object-fit:cover;object-position:center;border-radius:var(--luzmo-border-radius-s,4px);pointer-events:none;display:block}:host .user-message-text{white-space:pre-wrap;overflow-wrap:anywhere}: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));flex-direction:column;display:flex}:host luzmo-chat-message[position=left]{--luzmo-chat-message-font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));--luzmo-chat-message-font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));--luzmo-chat-message-line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height))}: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.assistant-message-actions--confirming{flex-direction:column;align-items:flex-start}:host .assistant-message-actions .assistant-message-action-confirm-message{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));white-space:pre-line}:host .assistant-message-actions .assistant-message-action-confirm-controls{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:flex}:host .assistant-message-actions luzmo-button.assistant-message-action,: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;font-size:var(--ai-chat-context-menu-trigger-icon-size);justify-content:center;align-items:center;padding:0;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 .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));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:var(--luzmo-spacing-5);--ai-chat-border:none;--ai-chat-box-shadow:none;--ai-chat-loading-message-color:var(--luzmo-primary);--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-m);--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:var(--luzmo-component-height-xs);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-s);--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-3);--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-m);--ai-chat-assistant-message-line-height:var(--ai-chat-markdown-line-height);--ai-chat-user-message-attachment-size:64px}:host([size=s]){--ai-chat-gap:var(--luzmo-spacing-4);--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-s);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-xs);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-s)}:host([size=l]){--ai-chat-gap:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-l);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height-s);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-m);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-l)}:host([size=xl]){--ai-chat-gap:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-xl);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-l);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-xl)}";
|
|
2329
|
+
var Pn = ":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:var(--ai-chat-user-message-background);--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 .user-message-content{gap:var(--luzmo-spacing-3,8px);flex-direction:column;display:flex}:host .user-message-attachments{gap:var(--luzmo-spacing-2,4px);flex-wrap:wrap;display:flex}:host .user-message-attachment{width:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));height:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));object-fit:cover;object-position:center;border-radius:var(--luzmo-border-radius-s,4px);pointer-events:none;display:block}:host .user-message-text{white-space:pre-wrap;overflow-wrap:anywhere}: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));flex-direction:column;display:flex}:host luzmo-chat-message[position=left]{--luzmo-chat-message-font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));--luzmo-chat-message-font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));--luzmo-chat-message-line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height))}:host .assistant-message-body{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}:host .assistant-message-feedback{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));display:flex}:host .assistant-message-feedback luzmo-action-button{--luzmo-action-button-background-color-default-selected:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-hover:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-focus-selected:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-down-selected:var(--ai-chat-user-message-background)}:host .assistant-message-feedback luzmo-action-button[value=up]{--luzmo-action-button-content-color-default-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-hover-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-focus-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-down-selected:var(--luzmo-positive-color)}:host .assistant-message-feedback luzmo-action-button[value=down]{--luzmo-action-button-content-color-default-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-hover-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-focus-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-down-selected:var(--luzmo-negative-color)}:host .assistant-message-footer{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-footer.assistant-message-footer--has-content{margin-block-start:var(--luzmo-ai-chat-assistant-message-actions-margin-top,var(--ai-chat-assistant-message-actions-margin-top));display:flex}:host luzmo-action-button.assistant-message-action{--luzmo-action-button-background-color-hover:var(--ai-chat-user-message-background)}: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:contents}:host .assistant-message-actions.assistant-message-actions--confirming{flex-direction:column;flex-basis:100%;align-items:flex-start;display:flex}:host .assistant-message-actions .assistant-message-action-confirm-message{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));white-space:pre-line}:host .assistant-message-actions .assistant-message-action-confirm-controls{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:flex}:host .assistant-message-actions luzmo-button.assistant-message-action,: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;font-size:var(--ai-chat-context-menu-trigger-icon-size);justify-content:center;align-items:center;padding:0;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 .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));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([dir=rtl]) .assistant-message-footer{direction:rtl}:host{--ai-chat-background:var(--luzmo-background-color);--ai-chat-border-radius:0;--ai-chat-padding:0;--ai-chat-gap:var(--luzmo-spacing-5);--ai-chat-border:none;--ai-chat-box-shadow:none;--ai-chat-loading-message-color:var(--luzmo-primary);--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-m);--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:var(--luzmo-component-height-xs);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-s);--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-3);--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-m);--ai-chat-assistant-message-line-height:var(--ai-chat-markdown-line-height);--ai-chat-user-message-background:rgba(var(--luzmo-primary-rgb), .08);--ai-chat-user-message-attachment-size:64px}:host([size=s]){--ai-chat-gap:var(--luzmo-spacing-4);--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-s);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-xs);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-s)}:host([size=l]){--ai-chat-gap:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-l);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height-s);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-m);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-l)}:host([size=xl]){--ai-chat-gap:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-xl);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-l);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-xl)}";
|
|
2329
2330
|
//#endregion
|
|
2330
2331
|
//#region src/components/ai-chat/helpers/agent-config.ts
|
|
2331
|
-
function
|
|
2332
|
+
function Fn(e, t) {
|
|
2332
2333
|
if (e.agentConfig) {
|
|
2333
|
-
let n = e.agentConfig, r = t ??
|
|
2334
|
+
let n = e.agentConfig, r = t ?? Fn({
|
|
2334
2335
|
...e,
|
|
2335
2336
|
agentConfig: void 0
|
|
2336
2337
|
});
|
|
@@ -2366,7 +2367,7 @@ function Nn(e, t) {
|
|
|
2366
2367
|
case "analyst": return { type: "analyst" };
|
|
2367
2368
|
}
|
|
2368
2369
|
}
|
|
2369
|
-
function
|
|
2370
|
+
function In(e) {
|
|
2370
2371
|
return {
|
|
2371
2372
|
chart: null,
|
|
2372
2373
|
dashboard: null,
|
|
@@ -2377,8 +2378,63 @@ function Pn(e) {
|
|
|
2377
2378
|
};
|
|
2378
2379
|
}
|
|
2379
2380
|
//#endregion
|
|
2381
|
+
//#region src/components/ai-chat/helpers/assistant-message-feedback.ts
|
|
2382
|
+
function Ln(e, t) {
|
|
2383
|
+
return e === t ? 0 : t;
|
|
2384
|
+
}
|
|
2385
|
+
var Rn = /* @__PURE__ */ new Set(["feedback", "hideFeedback"]);
|
|
2386
|
+
function zn(e, t) {
|
|
2387
|
+
return e === t || [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].every((n) => Rn.has(n) || e[n] === t[n] || JSON.stringify(e[n] ?? null) === JSON.stringify(t[n] ?? null));
|
|
2388
|
+
}
|
|
2389
|
+
function Bn(e, t) {
|
|
2390
|
+
return !e || e === t || e.messages === t.messages || e.messages.length !== t.messages.length ? !1 : [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].every((n) => n === "messages" || e[n] === t[n]) && e.messages.every((e, n) => zn(e, t.messages[n]));
|
|
2391
|
+
}
|
|
2392
|
+
function Vn({ labelId: e, rating: t, size: n, disabled: r, onRate: i }) {
|
|
2393
|
+
let a = (e) => (t) => {
|
|
2394
|
+
t.preventDefault(), t.stopPropagation(), i(e);
|
|
2395
|
+
};
|
|
2396
|
+
return m`
|
|
2397
|
+
<div
|
|
2398
|
+
class="assistant-message-feedback"
|
|
2399
|
+
role="group"
|
|
2400
|
+
aria-labelledby=${e}
|
|
2401
|
+
>
|
|
2402
|
+
<span
|
|
2403
|
+
id=${e}
|
|
2404
|
+
hidden
|
|
2405
|
+
>
|
|
2406
|
+
${c("Rate this response", { desc: "Accessible label for the thumbs up and down buttons on an AI chat response" })}
|
|
2407
|
+
</span>
|
|
2408
|
+
<luzmo-action-button
|
|
2409
|
+
value="up"
|
|
2410
|
+
toggles
|
|
2411
|
+
quiet
|
|
2412
|
+
label=${c("Good response", { desc: "Accessible label for the positive feedback button" })}
|
|
2413
|
+
.size=${n}
|
|
2414
|
+
.selected=${t === 1}
|
|
2415
|
+
?disabled=${r}
|
|
2416
|
+
@change=${a(1)}
|
|
2417
|
+
>
|
|
2418
|
+
<luzmo-icon slot="icon" .icon=${ee} .size=${n}></luzmo-icon>
|
|
2419
|
+
</luzmo-action-button>
|
|
2420
|
+
<luzmo-action-button
|
|
2421
|
+
value="down"
|
|
2422
|
+
toggles
|
|
2423
|
+
quiet
|
|
2424
|
+
label=${c("Bad response", { desc: "Accessible label for the negative feedback button" })}
|
|
2425
|
+
.size=${n}
|
|
2426
|
+
.selected=${t === -1}
|
|
2427
|
+
?disabled=${r}
|
|
2428
|
+
@change=${a(-1)}
|
|
2429
|
+
>
|
|
2430
|
+
<luzmo-icon slot="icon" .icon=${p} .size=${n}></luzmo-icon>
|
|
2431
|
+
</luzmo-action-button>
|
|
2432
|
+
</div>
|
|
2433
|
+
`;
|
|
2434
|
+
}
|
|
2435
|
+
//#endregion
|
|
2380
2436
|
//#region src/components/ai-chat/empty-state/ai-chat-empty-state.module.scss?inline
|
|
2381
|
-
var
|
|
2437
|
+
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);--ai-chat-empty-state-title-line-height:1.4;--ai-chat-empty-state-title-color:var(--luzmo-font-color-hard);--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))}:host([size=s]){--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-m)}:host([size=l]){--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-xl);--ai-chat-empty-state-subtitle-font-size:var(--luzmo-font-size-m)}:host([size=xl]){--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-xxl);--ai-chat-empty-state-subtitle-font-size:var(--luzmo-font-size-l)}", Un, Wn = class extends a(i, { validSizes: [
|
|
2382
2438
|
"s",
|
|
2383
2439
|
"m",
|
|
2384
2440
|
"l",
|
|
@@ -2402,21 +2458,21 @@ var Fn = ":host{box-sizing:border-box;width:100%;min-height:0;padding-block:var(
|
|
|
2402
2458
|
}
|
|
2403
2459
|
render() {
|
|
2404
2460
|
let e = this.suggestions.length > 0;
|
|
2405
|
-
return
|
|
2461
|
+
return m`
|
|
2406
2462
|
<section class="empty-state" aria-labelledby="ai-chat-empty-state-title">
|
|
2407
2463
|
<header class="header">
|
|
2408
2464
|
<h2 id="ai-chat-empty-state-title" class="title">${this.title}</h2>
|
|
2409
2465
|
</header>
|
|
2410
2466
|
|
|
2411
|
-
${e ?
|
|
2467
|
+
${e ? m`
|
|
2412
2468
|
<div class="actions">
|
|
2413
|
-
${this.subtitle ?
|
|
2469
|
+
${this.subtitle ? m`<p class="subtitle">${this.subtitle}</p>` : h}
|
|
2414
2470
|
<div
|
|
2415
2471
|
class="suggestions"
|
|
2416
2472
|
role="group"
|
|
2417
2473
|
aria-label=${c("Prompt suggestions", { desc: "Accessible label for the AI chat empty state suggestion list" })}
|
|
2418
2474
|
>
|
|
2419
|
-
${this.suggestions.map((e) =>
|
|
2475
|
+
${this.suggestions.map((e) => m`
|
|
2420
2476
|
<luzmo-action-button
|
|
2421
2477
|
variant="accent"
|
|
2422
2478
|
.size=${this.size}
|
|
@@ -2428,34 +2484,34 @@ var Fn = ":host{box-sizing:border-box;width:100%;min-height:0;padding-block:var(
|
|
|
2428
2484
|
`)}
|
|
2429
2485
|
</div>
|
|
2430
2486
|
</div>
|
|
2431
|
-
` :
|
|
2487
|
+
` : h}
|
|
2432
2488
|
</section>
|
|
2433
2489
|
`;
|
|
2434
2490
|
}
|
|
2435
2491
|
};
|
|
2436
2492
|
//#endregion
|
|
2437
2493
|
//#region src/components/ai-chat/empty-state/index.ts
|
|
2438
|
-
|
|
2494
|
+
Un = Wn, Un.styles = te(Hn), Un.tagName = "luzmo-ai-chat-empty-state", o([g({ type: String })], Wn.prototype, "title", void 0), o([g({ type: String })], Wn.prototype, "subtitle", void 0), o([g({ type: Array })], Wn.prototype, "suggestions", void 0), o([g({
|
|
2439
2495
|
type: Boolean,
|
|
2440
2496
|
reflect: !0
|
|
2441
|
-
})],
|
|
2497
|
+
})], Wn.prototype, "disabled", void 0), customElements.get("luzmo-ai-chat-empty-state") || customElements.define("luzmo-ai-chat-empty-state", Wn);
|
|
2442
2498
|
//#endregion
|
|
2443
2499
|
//#region src/components/ai-chat/helpers/elicitation-template.ts
|
|
2444
|
-
var
|
|
2445
|
-
function
|
|
2446
|
-
let t = e.content?.[
|
|
2500
|
+
var Gn = "answer", Kn = (e) => e.stopPropagation();
|
|
2501
|
+
function qn(e) {
|
|
2502
|
+
let t = e.content?.[Gn];
|
|
2447
2503
|
return typeof t == "string" ? t : void 0;
|
|
2448
2504
|
}
|
|
2449
|
-
async function
|
|
2505
|
+
async function Jn(e) {
|
|
2450
2506
|
e.stopPropagation();
|
|
2451
2507
|
let t = e.currentTarget;
|
|
2452
2508
|
await t.updateComplete, t.submit();
|
|
2453
2509
|
}
|
|
2454
|
-
function
|
|
2510
|
+
function Yn({ message: e, state: t, size: n, onSubmit: r }) {
|
|
2455
2511
|
let i = e.elicitation;
|
|
2456
|
-
if (!i) return
|
|
2512
|
+
if (!i) return h;
|
|
2457
2513
|
let a = [{
|
|
2458
|
-
id:
|
|
2514
|
+
id: Gn,
|
|
2459
2515
|
type: "single",
|
|
2460
2516
|
title: i.question,
|
|
2461
2517
|
required: !0,
|
|
@@ -2464,11 +2520,11 @@ function Vn({ message: e, state: t, size: n, onSubmit: r }) {
|
|
|
2464
2520
|
label: e
|
|
2465
2521
|
}))
|
|
2466
2522
|
}];
|
|
2467
|
-
return
|
|
2523
|
+
return ie(`${e.id}:${t}`, m`
|
|
2468
2524
|
<luzmo-question-box
|
|
2469
2525
|
.size=${n}
|
|
2470
2526
|
.questions=${a}
|
|
2471
|
-
.value=${
|
|
2527
|
+
.value=${re([i.answer], () => i.answer ? { [Gn]: i.answer } : {})}
|
|
2472
2528
|
.labels=${{
|
|
2473
2529
|
submit: c("Submit", { desc: "Button that sends the chosen answer to an AI agent question" }),
|
|
2474
2530
|
answerTitle: c("Answer", { desc: "Heading above the answer chosen for an AI agent question" }),
|
|
@@ -2479,18 +2535,18 @@ function Vn({ message: e, state: t, size: n, onSubmit: r }) {
|
|
|
2479
2535
|
hide-close
|
|
2480
2536
|
hide-skip
|
|
2481
2537
|
@luzmo-submit=${r}
|
|
2482
|
-
@input=${
|
|
2483
|
-
@change=${
|
|
2484
|
-
@luzmo-cancel=${
|
|
2538
|
+
@input=${Kn}
|
|
2539
|
+
@change=${Jn}
|
|
2540
|
+
@luzmo-cancel=${Kn}
|
|
2485
2541
|
></luzmo-question-box>
|
|
2486
2542
|
`);
|
|
2487
2543
|
}
|
|
2488
2544
|
//#endregion
|
|
2489
2545
|
//#region src/components/ai-chat/ai-chat-request.ts
|
|
2490
|
-
function
|
|
2546
|
+
function Xn(e, t) {
|
|
2491
2547
|
return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+|\/+$/g, "")}/aiprompt`;
|
|
2492
2548
|
}
|
|
2493
|
-
function
|
|
2549
|
+
function Zn(e) {
|
|
2494
2550
|
return e.type === "placeholder" ? null : {
|
|
2495
2551
|
...e,
|
|
2496
2552
|
version: e.version || "",
|
|
@@ -2499,7 +2555,7 @@ function Un(e) {
|
|
|
2499
2555
|
aichartId: e.aichartId || ""
|
|
2500
2556
|
};
|
|
2501
2557
|
}
|
|
2502
|
-
function
|
|
2558
|
+
function Qn(e, t, n = []) {
|
|
2503
2559
|
return [
|
|
2504
2560
|
{
|
|
2505
2561
|
type: "text",
|
|
@@ -2515,7 +2571,7 @@ function Wn(e, t, n = []) {
|
|
|
2515
2571
|
}))
|
|
2516
2572
|
];
|
|
2517
2573
|
}
|
|
2518
|
-
function
|
|
2574
|
+
function $n(e) {
|
|
2519
2575
|
return {
|
|
2520
2576
|
stream: e.stream ?? !0,
|
|
2521
2577
|
response_mode: "mixed",
|
|
@@ -2523,55 +2579,55 @@ function Gn(e) {
|
|
|
2523
2579
|
...e.localeId ? { locale_id: e.localeId } : {}
|
|
2524
2580
|
};
|
|
2525
2581
|
}
|
|
2526
|
-
function
|
|
2582
|
+
function er(e, t, n) {
|
|
2527
2583
|
return {
|
|
2528
2584
|
agent: e,
|
|
2529
2585
|
task: t,
|
|
2530
|
-
|
|
2586
|
+
...$n(n)
|
|
2531
2587
|
};
|
|
2532
2588
|
}
|
|
2533
|
-
function
|
|
2534
|
-
let t =
|
|
2589
|
+
function tr(e) {
|
|
2590
|
+
let t = Qn(e.prompt, e.datasetIds, e.attachmentUrls), n = e.chart ? Zn(e.chart) : null;
|
|
2535
2591
|
return n && t.push({
|
|
2536
2592
|
type: "item",
|
|
2537
2593
|
value: n
|
|
2538
2594
|
}), {
|
|
2539
|
-
...
|
|
2595
|
+
...er("item", e.task ?? "generate", e),
|
|
2540
2596
|
input: t
|
|
2541
2597
|
};
|
|
2542
2598
|
}
|
|
2543
|
-
function
|
|
2544
|
-
let t =
|
|
2599
|
+
function nr(e) {
|
|
2600
|
+
let t = Qn(e.prompt, e.datasetIds, e.attachmentUrls);
|
|
2545
2601
|
return e.dashboard && t.push({
|
|
2546
2602
|
type: "dashboard",
|
|
2547
2603
|
value: e.dashboard,
|
|
2548
2604
|
...e.currentScreenMode ? { current_screen_mode: e.currentScreenMode } : {}
|
|
2549
2605
|
}), {
|
|
2550
|
-
...
|
|
2606
|
+
...er("dashboard", "generate", e),
|
|
2551
2607
|
timezone_id: e.timezoneId ?? "UTC",
|
|
2552
2608
|
input: t
|
|
2553
2609
|
};
|
|
2554
2610
|
}
|
|
2555
|
-
function
|
|
2611
|
+
function rr(e) {
|
|
2556
2612
|
return {
|
|
2557
|
-
...
|
|
2558
|
-
input:
|
|
2613
|
+
...er("analyst", "generate", e),
|
|
2614
|
+
input: Qn(e.prompt, e.datasetIds, e.attachmentUrls)
|
|
2559
2615
|
};
|
|
2560
2616
|
}
|
|
2561
|
-
function
|
|
2562
|
-
let t =
|
|
2617
|
+
function ir(e) {
|
|
2618
|
+
let t = Qn(e.prompt, [], e.attachmentUrls);
|
|
2563
2619
|
return e.customItem && t.push({
|
|
2564
2620
|
type: "custom-item",
|
|
2565
2621
|
value: e.customItem
|
|
2566
2622
|
}), {
|
|
2567
|
-
...
|
|
2623
|
+
...er("custom-item", "generate", e),
|
|
2568
2624
|
text_format: "markdown",
|
|
2569
2625
|
...e.internal ? { internal: !0 } : {},
|
|
2570
2626
|
input: t
|
|
2571
2627
|
};
|
|
2572
2628
|
}
|
|
2573
|
-
function
|
|
2574
|
-
let n =
|
|
2629
|
+
function ar(e, t) {
|
|
2630
|
+
let n = Qn(t.prompt, t.datasetIds, t.attachmentUrls), r = t.chart ? Zn(t.chart) : null;
|
|
2575
2631
|
return r && n.push({
|
|
2576
2632
|
type: "item",
|
|
2577
2633
|
value: r
|
|
@@ -2581,30 +2637,30 @@ function Zn(e, t) {
|
|
|
2581
2637
|
...t.currentScreenMode ? { current_screen_mode: t.currentScreenMode } : {}
|
|
2582
2638
|
}), {
|
|
2583
2639
|
agent_id: e,
|
|
2584
|
-
|
|
2640
|
+
...$n(t),
|
|
2585
2641
|
input: n
|
|
2586
2642
|
};
|
|
2587
2643
|
}
|
|
2588
|
-
function
|
|
2589
|
-
if (t.agentId) return
|
|
2644
|
+
function or(e, t) {
|
|
2645
|
+
if (t.agentId) return ar(t.agentId, t);
|
|
2590
2646
|
switch (e) {
|
|
2591
|
-
case "dashboard": return
|
|
2592
|
-
case "analyst": return
|
|
2593
|
-
case "custom-item": return
|
|
2594
|
-
default: return
|
|
2647
|
+
case "dashboard": return nr(t);
|
|
2648
|
+
case "analyst": return rr(t);
|
|
2649
|
+
case "custom-item": return ir(t);
|
|
2650
|
+
default: return tr(t);
|
|
2595
2651
|
}
|
|
2596
2652
|
}
|
|
2597
|
-
function
|
|
2653
|
+
function sr(e, n) {
|
|
2598
2654
|
let { authKey: r, authToken: i, apiVersion: a = "0.1.0" } = n;
|
|
2599
2655
|
return n.attachmentUrls?.length && t(n.attachmentUrls), {
|
|
2600
2656
|
key: r,
|
|
2601
2657
|
token: i,
|
|
2602
2658
|
action: "create",
|
|
2603
2659
|
version: a,
|
|
2604
|
-
properties:
|
|
2660
|
+
properties: or(e, n)
|
|
2605
2661
|
};
|
|
2606
2662
|
}
|
|
2607
|
-
function
|
|
2663
|
+
function cr(e, t, n, r = "0.1.0", i = null) {
|
|
2608
2664
|
return {
|
|
2609
2665
|
key: t,
|
|
2610
2666
|
token: n,
|
|
@@ -2619,7 +2675,7 @@ function er(e, t, n, r = "0.1.0", i = null) {
|
|
|
2619
2675
|
}
|
|
2620
2676
|
//#endregion
|
|
2621
2677
|
//#region src/components/ai-chat/stream/transport.ts
|
|
2622
|
-
async function
|
|
2678
|
+
async function lr(e) {
|
|
2623
2679
|
let t = await fetch(e.url, {
|
|
2624
2680
|
method: "POST",
|
|
2625
2681
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2637,21 +2693,21 @@ async function tr(e) {
|
|
|
2637
2693
|
conversationId: t.headers.get("x-conversation-id")
|
|
2638
2694
|
};
|
|
2639
2695
|
}
|
|
2640
|
-
function
|
|
2696
|
+
function ur(e) {
|
|
2641
2697
|
let t = e.trim();
|
|
2642
2698
|
if (!t || t.startsWith(":") || t.startsWith("event:") || t.startsWith("id:")) return null;
|
|
2643
2699
|
let n = t;
|
|
2644
2700
|
return n.startsWith("data:") && (n = n.slice(5).trimStart()), !n || n === "[DONE]" ? null : JSON.parse(n);
|
|
2645
2701
|
}
|
|
2646
|
-
function
|
|
2702
|
+
function dr(e, t) {
|
|
2647
2703
|
try {
|
|
2648
|
-
let n =
|
|
2704
|
+
let n = ur(e);
|
|
2649
2705
|
n && t(n);
|
|
2650
2706
|
} catch {
|
|
2651
2707
|
console.error("Failed to parse stream line");
|
|
2652
2708
|
}
|
|
2653
2709
|
}
|
|
2654
|
-
async function
|
|
2710
|
+
async function fr(e, t) {
|
|
2655
2711
|
let n = e.getReader(), r = new TextDecoder(), i = "";
|
|
2656
2712
|
try {
|
|
2657
2713
|
for (;;) {
|
|
@@ -2660,18 +2716,18 @@ async function ir(e, t) {
|
|
|
2660
2716
|
i += r.decode(a, { stream: !0 });
|
|
2661
2717
|
let o = i.split(/\r?\n/);
|
|
2662
2718
|
i = o.pop() ?? "";
|
|
2663
|
-
for (let e of o)
|
|
2719
|
+
for (let e of o) dr(e, t);
|
|
2664
2720
|
}
|
|
2665
2721
|
i += r.decode();
|
|
2666
2722
|
let e = i.trim();
|
|
2667
|
-
e &&
|
|
2723
|
+
e && dr(e, t);
|
|
2668
2724
|
} finally {
|
|
2669
2725
|
n.releaseLock();
|
|
2670
2726
|
}
|
|
2671
2727
|
}
|
|
2672
2728
|
//#endregion
|
|
2673
2729
|
//#region src/components/ai-chat/stream/progress.ts
|
|
2674
|
-
function
|
|
2730
|
+
function pr() {
|
|
2675
2731
|
return {
|
|
2676
2732
|
id: "root",
|
|
2677
2733
|
step: "root",
|
|
@@ -2684,13 +2740,13 @@ function ar() {
|
|
|
2684
2740
|
}]
|
|
2685
2741
|
};
|
|
2686
2742
|
}
|
|
2687
|
-
function
|
|
2743
|
+
function mr(e) {
|
|
2688
2744
|
let t = e.progress;
|
|
2689
2745
|
return typeof t != "object" || !t ? !1 : "id" in t && "step" in t && "status" in t;
|
|
2690
2746
|
}
|
|
2691
2747
|
//#endregion
|
|
2692
2748
|
//#region src/components/ai-chat/stream/chunk-extractors.ts
|
|
2693
|
-
function
|
|
2749
|
+
function hr(e) {
|
|
2694
2750
|
if (!e || typeof e != "object") return "";
|
|
2695
2751
|
let t = e.assistant_message;
|
|
2696
2752
|
if (!t || typeof t != "object") return "";
|
|
@@ -2700,73 +2756,76 @@ function sr(e) {
|
|
|
2700
2756
|
let n = t.content;
|
|
2701
2757
|
return typeof n == "string" ? n : n && typeof n == "object" && typeof n.text == "string" ? n.text : "";
|
|
2702
2758
|
}
|
|
2703
|
-
function
|
|
2759
|
+
function gr(e) {
|
|
2704
2760
|
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 : "";
|
|
2705
2761
|
}
|
|
2706
|
-
function
|
|
2707
|
-
return
|
|
2762
|
+
function _r(e) {
|
|
2763
|
+
return hr(e.result);
|
|
2708
2764
|
}
|
|
2709
|
-
function
|
|
2765
|
+
function vr(e) {
|
|
2710
2766
|
return !!e.done || e.type === "finish" || e.type === "done" || "question" in e;
|
|
2711
2767
|
}
|
|
2712
|
-
function
|
|
2768
|
+
function yr(e, t) {
|
|
2713
2769
|
let n = typeof e.conversation_id == "string" && e.conversation_id || typeof e.conversationId == "string" && e.conversationId;
|
|
2714
2770
|
n && t.callbacks.onConversationIdChange(n);
|
|
2715
2771
|
}
|
|
2716
|
-
function
|
|
2772
|
+
function br(e) {
|
|
2773
|
+
return typeof e.assistant_message_id == "string" && e.assistant_message_id ? e.assistant_message_id : null;
|
|
2774
|
+
}
|
|
2775
|
+
function xr(e) {
|
|
2717
2776
|
for (let t of e) if (t && typeof t == "object" && t.type === "item") {
|
|
2718
2777
|
let e = t.value;
|
|
2719
2778
|
if (e && typeof e == "object") return e;
|
|
2720
2779
|
}
|
|
2721
2780
|
return null;
|
|
2722
2781
|
}
|
|
2723
|
-
function
|
|
2782
|
+
function Sr(e) {
|
|
2724
2783
|
let t = e.chart ?? e.generatedChart;
|
|
2725
2784
|
if (t && typeof t == "object") return t;
|
|
2726
2785
|
let n = e.aiMessageAssets ?? e.ai_message_assets;
|
|
2727
2786
|
if (Array.isArray(n)) {
|
|
2728
|
-
let e =
|
|
2787
|
+
let e = xr(n);
|
|
2729
2788
|
if (e) return e;
|
|
2730
2789
|
}
|
|
2731
2790
|
let r = e.result;
|
|
2732
2791
|
if (r && typeof r == "object") {
|
|
2733
2792
|
let e = r.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
|
|
2734
|
-
if (Array.isArray(t)) return
|
|
2793
|
+
if (Array.isArray(t)) return xr(t);
|
|
2735
2794
|
}
|
|
2736
2795
|
return null;
|
|
2737
2796
|
}
|
|
2738
|
-
function
|
|
2797
|
+
function Cr(e) {
|
|
2739
2798
|
for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
|
|
2740
2799
|
let e = t.value;
|
|
2741
2800
|
if (e && typeof e == "object" && Array.isArray(e.views)) return e;
|
|
2742
2801
|
}
|
|
2743
2802
|
return null;
|
|
2744
2803
|
}
|
|
2745
|
-
function
|
|
2804
|
+
function wr(e) {
|
|
2746
2805
|
for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
|
|
2747
2806
|
let e = t.name;
|
|
2748
2807
|
if (e && typeof e == "object") return e;
|
|
2749
2808
|
}
|
|
2750
2809
|
}
|
|
2751
|
-
function
|
|
2810
|
+
function Tr(...e) {
|
|
2752
2811
|
return e.find(Array.isArray);
|
|
2753
2812
|
}
|
|
2754
|
-
function
|
|
2813
|
+
function Er(e) {
|
|
2755
2814
|
if (e.views && Array.isArray(e.views)) return e;
|
|
2756
2815
|
let t = e.aiMessageAssets ?? e.ai_message_assets;
|
|
2757
|
-
if (Array.isArray(t)) return
|
|
2816
|
+
if (Array.isArray(t)) return Cr(t);
|
|
2758
2817
|
let n = e.result;
|
|
2759
2818
|
if (n && typeof n == "object") {
|
|
2760
2819
|
let e = n.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
|
|
2761
|
-
if (Array.isArray(t)) return
|
|
2820
|
+
if (Array.isArray(t)) return Cr(t);
|
|
2762
2821
|
}
|
|
2763
2822
|
return null;
|
|
2764
2823
|
}
|
|
2765
|
-
function
|
|
2766
|
-
let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r =
|
|
2767
|
-
return r ?
|
|
2824
|
+
function Dr(e) {
|
|
2825
|
+
let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r = Tr(t, n?.aiMessageAssets ?? n?.ai_message_assets);
|
|
2826
|
+
return r ? wr(r) : void 0;
|
|
2768
2827
|
}
|
|
2769
|
-
function
|
|
2828
|
+
function Or(e) {
|
|
2770
2829
|
let t = e.result?.assistant_message;
|
|
2771
2830
|
for (let n of [e.aiMessageAssets ?? e.ai_message_assets, t?.aiMessageAssets ?? t?.ai_message_assets]) if (Array.isArray(n)) {
|
|
2772
2831
|
for (let e of n) if (e && typeof e == "object" && e.type === "custom-item" && e.value && typeof e.value == "object" && !Array.isArray(e.value)) return e.value;
|
|
@@ -2775,7 +2834,7 @@ function yr(e) {
|
|
|
2775
2834
|
}
|
|
2776
2835
|
//#endregion
|
|
2777
2836
|
//#region src/components/ai-chat/stream/stream-processor.ts
|
|
2778
|
-
var
|
|
2837
|
+
var kr = /* @__PURE__ */ new Set([
|
|
2779
2838
|
"conversation-id",
|
|
2780
2839
|
"conversation_id",
|
|
2781
2840
|
"keepalive",
|
|
@@ -2783,77 +2842,85 @@ var br = /* @__PURE__ */ new Set([
|
|
|
2783
2842
|
"finish",
|
|
2784
2843
|
"done"
|
|
2785
2844
|
]);
|
|
2786
|
-
function
|
|
2845
|
+
function Ar(e, t) {
|
|
2846
|
+
return (br(e) ?? t.state.assistantMessageId) || (typeof e.messageId == "string" ? e.messageId : void 0);
|
|
2847
|
+
}
|
|
2848
|
+
function jr(e, t, n) {
|
|
2849
|
+
let r = Ar(e, t);
|
|
2787
2850
|
return {
|
|
2788
2851
|
agent: n.agent,
|
|
2789
2852
|
conversationId: t.callbacks.getConversationId(),
|
|
2790
|
-
...
|
|
2853
|
+
...r ? { messageId: r } : {},
|
|
2791
2854
|
raw: e
|
|
2792
2855
|
};
|
|
2793
2856
|
}
|
|
2794
2857
|
function Q(e, t, n, r, i) {
|
|
2795
2858
|
let a = {
|
|
2796
|
-
...
|
|
2859
|
+
...jr(n, e, t),
|
|
2797
2860
|
recognized: !0,
|
|
2798
2861
|
type: r,
|
|
2799
2862
|
data: i
|
|
2800
2863
|
};
|
|
2801
2864
|
e.callbacks.onStep(a);
|
|
2802
2865
|
}
|
|
2803
|
-
function
|
|
2866
|
+
function Mr(e, t, n, r, i) {
|
|
2804
2867
|
let a = {
|
|
2805
|
-
...
|
|
2868
|
+
...jr(n, e, t),
|
|
2806
2869
|
recognized: !1,
|
|
2807
2870
|
type: r,
|
|
2808
2871
|
data: i
|
|
2809
2872
|
};
|
|
2810
2873
|
e.callbacks.onStep(a);
|
|
2811
2874
|
}
|
|
2812
|
-
function
|
|
2875
|
+
function Nr(e, t) {
|
|
2876
|
+
let n = br(e);
|
|
2877
|
+
n && (t.state.assistantMessageId = n, t.aiMessage.apiMessageId !== n && (t.aiMessage.apiMessageId = n, t.callbacks.onMessageUpdate(t.aiMessage)));
|
|
2878
|
+
}
|
|
2879
|
+
function Pr(e) {
|
|
2813
2880
|
e.state.progressCollapsed || (e.state.progressCollapsed = !0, e.callbacks.onProgressCollapsed(!0));
|
|
2814
2881
|
}
|
|
2815
|
-
function
|
|
2816
|
-
|
|
2882
|
+
function Fr(e, t) {
|
|
2883
|
+
Pr(e), e.aiMessage.message = (e.aiMessage.message || "") + t, e.callbacks.onMessageUpdate(e.aiMessage);
|
|
2817
2884
|
}
|
|
2818
|
-
function
|
|
2885
|
+
function Ir(e) {
|
|
2819
2886
|
if (!e) return null;
|
|
2820
2887
|
let t = e.descriptionMetadata?.decision;
|
|
2821
2888
|
if (t === "create" || t === "edit" || t === "question") return t;
|
|
2822
2889
|
for (let t of e.children ?? []) {
|
|
2823
|
-
let e =
|
|
2890
|
+
let e = Ir(t);
|
|
2824
2891
|
if (e) return e;
|
|
2825
2892
|
}
|
|
2826
2893
|
return null;
|
|
2827
2894
|
}
|
|
2828
|
-
function
|
|
2829
|
-
if (!
|
|
2895
|
+
function Lr(e, t, n) {
|
|
2896
|
+
if (!mr(e)) return !1;
|
|
2830
2897
|
let r = e.progress;
|
|
2831
2898
|
if (t.callbacks.onProgress(r), Q(t, n, e, "progress", r), t.state.decision === null) {
|
|
2832
|
-
let i =
|
|
2899
|
+
let i = Ir(r);
|
|
2833
2900
|
i && (t.state.decision = i, Q(t, n, e, "decision", { decision: i }));
|
|
2834
2901
|
}
|
|
2835
2902
|
return !0;
|
|
2836
2903
|
}
|
|
2837
|
-
function
|
|
2904
|
+
function Rr(e) {
|
|
2838
2905
|
return !!e.error || e.type === "error" || typeof e.error_text == "string";
|
|
2839
2906
|
}
|
|
2840
|
-
function
|
|
2907
|
+
function zr(e) {
|
|
2841
2908
|
return typeof e.error_text == "string" && e.error_text ? e.error_text : typeof e.error == "string" && e.error ? e.error : c("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" });
|
|
2842
2909
|
}
|
|
2843
|
-
function
|
|
2844
|
-
if (!
|
|
2845
|
-
let r =
|
|
2846
|
-
return t.aiMessage.message = r, t.aiMessage.isError = !0, delete t.aiMessage.elicitation, t.callbacks.onMessageUpdate(t.aiMessage),
|
|
2910
|
+
function Br(e, t, n) {
|
|
2911
|
+
if (!Rr(e)) return !1;
|
|
2912
|
+
let r = zr(e);
|
|
2913
|
+
return t.aiMessage.message = r, t.aiMessage.isError = !0, delete t.aiMessage.elicitation, t.callbacks.onMessageUpdate(t.aiMessage), ui(e, t, n, e.error ?? r), !0;
|
|
2847
2914
|
}
|
|
2848
|
-
function
|
|
2915
|
+
function Vr(e) {
|
|
2849
2916
|
return typeof e.question == "string" && e.question ? e.question : typeof e.text == "string" && e.text ? e.text : "";
|
|
2850
2917
|
}
|
|
2851
|
-
function
|
|
2918
|
+
function Hr(e, t, n) {
|
|
2852
2919
|
if (e.type !== "interrupt") return !1;
|
|
2853
|
-
let r =
|
|
2854
|
-
return r && (t.state.interruptQuestion = r,
|
|
2920
|
+
let r = Vr(e);
|
|
2921
|
+
return r && (t.state.interruptQuestion = r, Fr(t, r), Q(t, n, e, "interrupt", { question: r })), ui(e, t, n), !0;
|
|
2855
2922
|
}
|
|
2856
|
-
function
|
|
2923
|
+
function Ur(e) {
|
|
2857
2924
|
let t = e.elicitation;
|
|
2858
2925
|
if (!t || typeof t != "object") return null;
|
|
2859
2926
|
let { question: n, options: r } = t, i = typeof n == "string" ? n.trim() : "", a = Array.isArray(r) ? [...new Set(r.filter((e) => typeof e == "string").map((e) => e.trim()))].filter(Boolean) : [];
|
|
@@ -2862,66 +2929,66 @@ function Mr(e) {
|
|
|
2862
2929
|
options: a
|
|
2863
2930
|
} : null;
|
|
2864
2931
|
}
|
|
2865
|
-
function
|
|
2932
|
+
function Wr(e, t, n) {
|
|
2866
2933
|
if (e.type !== "elicitation") return !1;
|
|
2867
|
-
let r =
|
|
2868
|
-
return r ? (
|
|
2934
|
+
let r = Ur(e);
|
|
2935
|
+
return r ? (Pr(t), t.aiMessage.elicitation = r, t.callbacks.onMessageUpdate(t.aiMessage), Q(t, n, e, "elicitation", {
|
|
2869
2936
|
question: r.question,
|
|
2870
2937
|
options: r.options
|
|
2871
|
-
}), !0) : (
|
|
2938
|
+
}), !0) : (Mr(t, n, e, "elicitation", e), !0);
|
|
2872
2939
|
}
|
|
2873
|
-
function
|
|
2940
|
+
function Gr(e) {
|
|
2874
2941
|
return typeof e.asset_id == "string" ? e.asset_id : typeof e.asset_type == "string" ? e.asset_type : "default";
|
|
2875
2942
|
}
|
|
2876
|
-
function
|
|
2943
|
+
function Kr(e) {
|
|
2877
2944
|
return typeof e.asset_type == "string" ? e.asset_type : "";
|
|
2878
2945
|
}
|
|
2879
|
-
function
|
|
2946
|
+
function qr(e) {
|
|
2880
2947
|
return {
|
|
2881
|
-
assetType:
|
|
2948
|
+
assetType: Kr(e),
|
|
2882
2949
|
snapshot: {}
|
|
2883
2950
|
};
|
|
2884
2951
|
}
|
|
2885
|
-
function
|
|
2952
|
+
function Jr(e, t) {
|
|
2886
2953
|
return {
|
|
2887
2954
|
...e,
|
|
2888
2955
|
...t
|
|
2889
2956
|
};
|
|
2890
2957
|
}
|
|
2891
|
-
function
|
|
2958
|
+
function Yr(e) {
|
|
2892
2959
|
let t = e.asset_delta ?? e.delta;
|
|
2893
2960
|
return t && typeof t == "object" ? t : null;
|
|
2894
2961
|
}
|
|
2895
|
-
function
|
|
2896
|
-
t.state.assets[
|
|
2962
|
+
function Xr(e, t) {
|
|
2963
|
+
t.state.assets[Gr(e)] = qr(e);
|
|
2897
2964
|
}
|
|
2898
|
-
function
|
|
2899
|
-
let n =
|
|
2900
|
-
i && (r.snapshot =
|
|
2965
|
+
function Zr(e, t) {
|
|
2966
|
+
let n = Gr(e), r = t.state.assets[n] ?? qr(e), i = Yr(e);
|
|
2967
|
+
i && (r.snapshot = Jr(r.snapshot, i)), t.state.assets[n] = r;
|
|
2901
2968
|
}
|
|
2902
|
-
function
|
|
2969
|
+
function Qr(e, t) {
|
|
2903
2970
|
let n = e.asset ?? e.value ?? e.asset_delta ?? e.delta;
|
|
2904
|
-
return n && typeof n == "object" ?
|
|
2971
|
+
return n && typeof n == "object" ? Jr(t?.snapshot ?? {}, n) : t?.snapshot ?? {};
|
|
2905
2972
|
}
|
|
2906
|
-
function
|
|
2907
|
-
let r =
|
|
2908
|
-
delete t.state.assets[r],
|
|
2973
|
+
function $r(e, t, n) {
|
|
2974
|
+
let r = Gr(e), i = t.state.assets[r], a = i?.assetType || Kr(e), o = Qr(e, i);
|
|
2975
|
+
delete t.state.assets[r], ri(a, o, e, t, n);
|
|
2909
2976
|
}
|
|
2910
|
-
function
|
|
2977
|
+
function ei(e, t, n) {
|
|
2911
2978
|
switch (e.type) {
|
|
2912
|
-
case "asset_start": return
|
|
2913
|
-
case "asset_delta": return
|
|
2914
|
-
case "asset_end": return
|
|
2979
|
+
case "asset_start": return Xr(e, t), !0;
|
|
2980
|
+
case "asset_delta": return Zr(e, t), !0;
|
|
2981
|
+
case "asset_end": return $r(e, t, n), !0;
|
|
2915
2982
|
default: return !1;
|
|
2916
2983
|
}
|
|
2917
2984
|
}
|
|
2918
|
-
function
|
|
2919
|
-
n.state.chartSnapshot = e, n.aiMessage.hasChart = !0, typeof t.messageId == "string" && (n.aiMessage.apiMessageId = t.messageId), n.callbacks.onMessageUpdate(n.aiMessage), Q(n, r, t, "chart", e);
|
|
2985
|
+
function ti(e, t, n, r) {
|
|
2986
|
+
n.state.chartSnapshot = e, n.aiMessage.hasChart = !0, !n.state.assistantMessageId && typeof t.messageId == "string" && (n.aiMessage.apiMessageId = t.messageId), n.callbacks.onMessageUpdate(n.aiMessage), Q(n, r, t, "chart", e);
|
|
2920
2987
|
}
|
|
2921
|
-
function
|
|
2988
|
+
function ni(e, t, n, r) {
|
|
2922
2989
|
n.state.customItemSnapshot = e, Q(n, r, t, "custom-item", e);
|
|
2923
2990
|
}
|
|
2924
|
-
function
|
|
2991
|
+
function ri(e, t, n, r, i) {
|
|
2925
2992
|
switch (e) {
|
|
2926
2993
|
case "dashboard-title": {
|
|
2927
2994
|
let e = t.name;
|
|
@@ -2940,12 +3007,12 @@ function Kr(e, t, n, r, i) {
|
|
|
2940
3007
|
case "dashboard":
|
|
2941
3008
|
r.state.dashboardSnapshot = t;
|
|
2942
3009
|
return;
|
|
2943
|
-
default:
|
|
3010
|
+
default: ii(e, t, n, r, i);
|
|
2944
3011
|
}
|
|
2945
3012
|
}
|
|
2946
|
-
function
|
|
3013
|
+
function ii(e, t, n, r, i) {
|
|
2947
3014
|
if (i.chartAssetType && e === i.chartAssetType) {
|
|
2948
|
-
|
|
3015
|
+
ti(t, n, r, i);
|
|
2949
3016
|
return;
|
|
2950
3017
|
}
|
|
2951
3018
|
if (i.dashboardAssetType && e === i.dashboardAssetType) {
|
|
@@ -2953,64 +3020,64 @@ function qr(e, t, n, r, i) {
|
|
|
2953
3020
|
return;
|
|
2954
3021
|
}
|
|
2955
3022
|
if (i.customItemAssetType && e === i.customItemAssetType) {
|
|
2956
|
-
|
|
3023
|
+
ni(t, n, r, i);
|
|
2957
3024
|
return;
|
|
2958
3025
|
}
|
|
2959
|
-
|
|
3026
|
+
Mr(r, i, n, e || "asset", t);
|
|
2960
3027
|
}
|
|
2961
|
-
function
|
|
3028
|
+
function ai(e, t, n) {
|
|
2962
3029
|
let r = !1;
|
|
2963
3030
|
if (n.dashboardAssetType) {
|
|
2964
|
-
let n =
|
|
3031
|
+
let n = Er(e);
|
|
2965
3032
|
if (n) {
|
|
2966
3033
|
t.state.dashboardSnapshot = n;
|
|
2967
|
-
let i =
|
|
3034
|
+
let i = Dr(e);
|
|
2968
3035
|
i && (t.state.dashboardName = i), r = !0;
|
|
2969
3036
|
}
|
|
2970
3037
|
}
|
|
2971
3038
|
if (n.chartAssetType && !t.state.chartSnapshot) {
|
|
2972
|
-
let i =
|
|
2973
|
-
i && (
|
|
3039
|
+
let i = Sr(e);
|
|
3040
|
+
i && (ti(i, e, t, n), r = !0);
|
|
2974
3041
|
}
|
|
2975
3042
|
if (n.customItemAssetType && !t.state.customItemSnapshot) {
|
|
2976
|
-
let i =
|
|
2977
|
-
i && (
|
|
3043
|
+
let i = Or(e);
|
|
3044
|
+
i && (ni(i, e, t, n), r = !0);
|
|
2978
3045
|
}
|
|
2979
3046
|
return r;
|
|
2980
3047
|
}
|
|
2981
|
-
function
|
|
3048
|
+
function oi(e, t, n) {
|
|
2982
3049
|
return {
|
|
2983
3050
|
...e,
|
|
2984
3051
|
generatedChart: t,
|
|
2985
3052
|
conversationId: n.callbacks.getConversationId()
|
|
2986
3053
|
};
|
|
2987
3054
|
}
|
|
2988
|
-
function
|
|
3055
|
+
function si(e, t, n) {
|
|
2989
3056
|
for (let r of Object.keys(t.state.assets)) {
|
|
2990
3057
|
let i = t.state.assets[r];
|
|
2991
|
-
delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot || n.customItemAssetType && i.assetType === n.customItemAssetType && t.state.customItemSnapshot) &&
|
|
3058
|
+
delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot || n.customItemAssetType && i.assetType === n.customItemAssetType && t.state.customItemSnapshot) && ri(i.assetType, i.snapshot, e, t, n);
|
|
2992
3059
|
}
|
|
2993
3060
|
}
|
|
2994
|
-
function
|
|
2995
|
-
let n =
|
|
3061
|
+
function ci(e, t) {
|
|
3062
|
+
let n = _r(e);
|
|
2996
3063
|
!n || t.aiMessage.message === n || (t.aiMessage.message = n, t.callbacks.onMessageUpdate(t.aiMessage));
|
|
2997
3064
|
}
|
|
2998
|
-
function
|
|
2999
|
-
let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ?
|
|
3065
|
+
function li(e, t, n) {
|
|
3066
|
+
let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ? Er(e) : null), i = t.state.chartSnapshot ?? (n.chartAssetType ? Sr(e) : null);
|
|
3000
3067
|
return {
|
|
3001
3068
|
agent: n.agent,
|
|
3002
3069
|
conversationId: t.callbacks.getConversationId(),
|
|
3003
3070
|
message: t.aiMessage,
|
|
3004
3071
|
...r ? { dashboard: r } : {},
|
|
3005
|
-
...i ? { chart:
|
|
3072
|
+
...i ? { chart: oi(e, i, t) } : {},
|
|
3006
3073
|
...t.state.customItemSnapshot ? { customItem: t.state.customItemSnapshot } : {},
|
|
3007
3074
|
...t.state.dashboardName ? { name: t.state.dashboardName } : {},
|
|
3008
3075
|
raw: e
|
|
3009
3076
|
};
|
|
3010
3077
|
}
|
|
3011
|
-
function
|
|
3078
|
+
function ui(e, t, n, r) {
|
|
3012
3079
|
if (!t.state.completed) {
|
|
3013
|
-
if (t.state.completed = !0,
|
|
3080
|
+
if (t.state.completed = !0, si(e, t, n), Pr(t), r !== void 0) {
|
|
3014
3081
|
t.callbacks.onComplete({
|
|
3015
3082
|
agent: n.agent,
|
|
3016
3083
|
conversationId: t.callbacks.getConversationId(),
|
|
@@ -3020,32 +3087,32 @@ function $r(e, t, n, r) {
|
|
|
3020
3087
|
});
|
|
3021
3088
|
return;
|
|
3022
3089
|
}
|
|
3023
|
-
|
|
3090
|
+
ci(e, t), t.callbacks.onComplete(li(e, t, n));
|
|
3024
3091
|
}
|
|
3025
3092
|
}
|
|
3026
|
-
function
|
|
3093
|
+
function di(e) {
|
|
3027
3094
|
return typeof e.type == "string" && e.type ? e.type : typeof e.asset_type == "string" && e.asset_type ? e.asset_type : "";
|
|
3028
3095
|
}
|
|
3029
|
-
function
|
|
3030
|
-
let r =
|
|
3031
|
-
return r ? (t.state.accumulatedText += r,
|
|
3096
|
+
function fi(e, t, n) {
|
|
3097
|
+
let r = gr(e);
|
|
3098
|
+
return r ? (t.state.accumulatedText += r, Fr(t, r), Q(t, n, e, "text", {
|
|
3032
3099
|
delta: r,
|
|
3033
3100
|
text: t.state.accumulatedText
|
|
3034
3101
|
}), !0) : !1;
|
|
3035
3102
|
}
|
|
3036
|
-
function
|
|
3103
|
+
function pi(e, t, n, r, i) {
|
|
3037
3104
|
if (r || i) return;
|
|
3038
|
-
let a =
|
|
3039
|
-
a && !
|
|
3105
|
+
let a = di(e);
|
|
3106
|
+
a && !kr.has(a) && Mr(t, n, e, a, e);
|
|
3040
3107
|
}
|
|
3041
|
-
function
|
|
3042
|
-
if (
|
|
3043
|
-
let r =
|
|
3044
|
-
|
|
3108
|
+
function mi(e, t, n) {
|
|
3109
|
+
if (yr(e, t), Nr(e, t), Lr(e, t, n) || Br(e, t, n) || Hr(e, t, n) || Wr(e, t, n) || ei(e, t, n)) return;
|
|
3110
|
+
let r = fi(e, t, n), i = ai(e, t, n), a = r || i, o = vr(e);
|
|
3111
|
+
pi(e, t, n, a, o), o && ui(e, t, n);
|
|
3045
3112
|
}
|
|
3046
3113
|
//#endregion
|
|
3047
3114
|
//#region src/components/ai-chat/stream/registry.ts
|
|
3048
|
-
function
|
|
3115
|
+
function hi(e) {
|
|
3049
3116
|
switch (e) {
|
|
3050
3117
|
case "dashboard": return {
|
|
3051
3118
|
agent: e,
|
|
@@ -3062,11 +3129,11 @@ function ii(e) {
|
|
|
3062
3129
|
default: return { agent: e };
|
|
3063
3130
|
}
|
|
3064
3131
|
}
|
|
3065
|
-
function
|
|
3066
|
-
let t =
|
|
3067
|
-
return (e, n) =>
|
|
3132
|
+
function gi(e) {
|
|
3133
|
+
let t = hi(e);
|
|
3134
|
+
return (e, n) => mi(e, n, t);
|
|
3068
3135
|
}
|
|
3069
|
-
function
|
|
3136
|
+
function _i() {
|
|
3070
3137
|
return {
|
|
3071
3138
|
progressCollapsed: !1,
|
|
3072
3139
|
accumulatedText: "",
|
|
@@ -3082,10 +3149,10 @@ function oi() {
|
|
|
3082
3149
|
}
|
|
3083
3150
|
//#endregion
|
|
3084
3151
|
//#region src/components/ai-chat/session/ai-chat-session.ts
|
|
3085
|
-
function
|
|
3152
|
+
function vi() {
|
|
3086
3153
|
return `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
3087
3154
|
}
|
|
3088
|
-
var
|
|
3155
|
+
var yi = class {
|
|
3089
3156
|
constructor(e, t = {}) {
|
|
3090
3157
|
this._uiBridgeCallbacks = {}, this._subscribers = /* @__PURE__ */ new Set(), this._state = {
|
|
3091
3158
|
messages: [],
|
|
@@ -3100,7 +3167,7 @@ var ci = class {
|
|
|
3100
3167
|
apiVersion: "0.1.0",
|
|
3101
3168
|
stream: !0,
|
|
3102
3169
|
...e
|
|
3103
|
-
}, e.agentConfig && (this._config.agentConfig =
|
|
3170
|
+
}, e.agentConfig && (this._config.agentConfig = Fn(e)), this._hostCallbacks = t, this._state = {
|
|
3104
3171
|
...this._state,
|
|
3105
3172
|
messages: e.messages ? [...e.messages] : [],
|
|
3106
3173
|
selectedDatasets: e.selectedDatasets ? [...e.selectedDatasets] : [],
|
|
@@ -3117,7 +3184,7 @@ var ci = class {
|
|
|
3117
3184
|
return this._state.isGenerating;
|
|
3118
3185
|
}
|
|
3119
3186
|
get agentConfig() {
|
|
3120
|
-
return
|
|
3187
|
+
return Fn(this._config);
|
|
3121
3188
|
}
|
|
3122
3189
|
subscribe(e) {
|
|
3123
3190
|
return this._subscribers.add(e), e(this._state), () => {
|
|
@@ -3132,7 +3199,7 @@ var ci = class {
|
|
|
3132
3199
|
this._config = {
|
|
3133
3200
|
...this._config,
|
|
3134
3201
|
...e
|
|
3135
|
-
}, e.agentConfig && (this._config.agentConfig =
|
|
3202
|
+
}, e.agentConfig && (this._config.agentConfig = Fn(this._config, t));
|
|
3136
3203
|
let r = {};
|
|
3137
3204
|
if ("conversationId" in e) {
|
|
3138
3205
|
let t = e.conversationId ?? null;
|
|
@@ -3166,10 +3233,10 @@ var ci = class {
|
|
|
3166
3233
|
return !this._config.requireDataset || this._state.selectedDatasets.length > 0 || !!e;
|
|
3167
3234
|
}
|
|
3168
3235
|
getAiPromptUrl() {
|
|
3169
|
-
return
|
|
3236
|
+
return Xn(this._config.apiUrl ?? "https://api.luzmo.com", this._config.apiVersion ?? "0.1.0");
|
|
3170
3237
|
}
|
|
3171
3238
|
buildRequestBody(e, t, n = [], r = this._config.agentId, i = {}) {
|
|
3172
|
-
return
|
|
3239
|
+
return sr(this.agentConfig.type, {
|
|
3173
3240
|
prompt: e,
|
|
3174
3241
|
datasetIds: t,
|
|
3175
3242
|
authKey: this._config.authKey,
|
|
@@ -3183,7 +3250,7 @@ var ci = class {
|
|
|
3183
3250
|
localeId: this._config.localeId,
|
|
3184
3251
|
timezoneId: this._config.timezoneId,
|
|
3185
3252
|
task: this._config.task,
|
|
3186
|
-
...this._config.agentConfig ?
|
|
3253
|
+
...this._config.agentConfig ? In(this.agentConfig) : {},
|
|
3187
3254
|
modelPreference: this._config.modelPreference,
|
|
3188
3255
|
apiVersion: this._config.apiVersion,
|
|
3189
3256
|
stream: this._config.stream,
|
|
@@ -3249,13 +3316,13 @@ var ci = class {
|
|
|
3249
3316
|
}
|
|
3250
3317
|
if (n.signal.aborted || this._abortController !== n) return !1;
|
|
3251
3318
|
let i = {
|
|
3252
|
-
id: e.aiMessageId ??
|
|
3319
|
+
id: e.aiMessageId ?? vi(),
|
|
3253
3320
|
type: "ai",
|
|
3254
3321
|
message: ""
|
|
3255
3322
|
}, a = [...this._state.messages];
|
|
3256
3323
|
if (!e.skipUserMessage) {
|
|
3257
3324
|
let t = {
|
|
3258
|
-
id:
|
|
3325
|
+
id: vi(),
|
|
3259
3326
|
type: "user",
|
|
3260
3327
|
message: e.prompt,
|
|
3261
3328
|
...r.length ? { attachmentUrls: r } : {}
|
|
@@ -3265,7 +3332,7 @@ var ci = class {
|
|
|
3265
3332
|
a = [...a, i], this._inflightMessage = i, this._receivedProgress = !1, this._patchState({
|
|
3266
3333
|
messages: a,
|
|
3267
3334
|
isGenerating: !0,
|
|
3268
|
-
progress:
|
|
3335
|
+
progress: pr(),
|
|
3269
3336
|
progressCollapsed: !1,
|
|
3270
3337
|
inflightMessage: i
|
|
3271
3338
|
});
|
|
@@ -3288,18 +3355,18 @@ var ci = class {
|
|
|
3288
3355
|
}
|
|
3289
3356
|
return !0;
|
|
3290
3357
|
}
|
|
3291
|
-
let c = this.buildRequestBody(e.prompt, t, r, e.agentId, { internal: e.internal }), l = this.agentConfig.type, u =
|
|
3358
|
+
let c = this.buildRequestBody(e.prompt, t, r, e.agentId, { internal: e.internal }), l = this.agentConfig.type, u = gi(l), d = {
|
|
3292
3359
|
aiMessage: i,
|
|
3293
3360
|
callbacks: this._createStreamCallbacks(),
|
|
3294
|
-
state:
|
|
3295
|
-
}, f = this._config.fetchStreaming ??
|
|
3361
|
+
state: _i()
|
|
3362
|
+
}, f = this._config.fetchStreaming ?? lr, p = !1;
|
|
3296
3363
|
try {
|
|
3297
3364
|
let { body: e, conversationId: t } = await f({
|
|
3298
3365
|
url: this.getAiPromptUrl(),
|
|
3299
3366
|
body: c,
|
|
3300
3367
|
signal: n.signal
|
|
3301
3368
|
});
|
|
3302
|
-
t && this._setConversationId(t), await
|
|
3369
|
+
t && this._setConversationId(t), await fr(e, (e) => u(e, d)), p = !0;
|
|
3303
3370
|
} catch (e) {
|
|
3304
3371
|
e.name !== "AbortError" && (this._handleSubmitError(e, i, l), p = !0);
|
|
3305
3372
|
} finally {
|
|
@@ -3331,10 +3398,18 @@ var ci = class {
|
|
|
3331
3398
|
}
|
|
3332
3399
|
return o;
|
|
3333
3400
|
}
|
|
3401
|
+
setMessageFeedback(e, t) {
|
|
3402
|
+
if (t !== -1 && t !== 0 && t !== 1 || e === this._inflightMessage?.id || e === this._state.inflightMessage?.id) return !1;
|
|
3403
|
+
let n = this._state.messages.find((t) => t.id === e);
|
|
3404
|
+
return n?.type !== "ai" || (n.feedback ?? 0) === t ? !1 : (this._patchState({ messages: this._state.messages.map((e) => e === n ? {
|
|
3405
|
+
...e,
|
|
3406
|
+
feedback: t
|
|
3407
|
+
} : e) }), !0);
|
|
3408
|
+
}
|
|
3334
3409
|
async restore(e) {
|
|
3335
3410
|
let t = this.agentConfig.type;
|
|
3336
3411
|
if (t !== "item") return {};
|
|
3337
|
-
let n =
|
|
3412
|
+
let n = cr(e.restoreToMessageId, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
|
|
3338
3413
|
if (this._patchState({
|
|
3339
3414
|
isGenerating: !0,
|
|
3340
3415
|
progress: null,
|
|
@@ -3364,7 +3439,7 @@ var ci = class {
|
|
|
3364
3439
|
let e = await r.json().catch(() => null);
|
|
3365
3440
|
throw Error(e?.message || `API request failed with status ${r.status}`);
|
|
3366
3441
|
}
|
|
3367
|
-
let i = await r.json().catch(() => null), a = i?.generatedChart ?? (i ?
|
|
3442
|
+
let i = await r.json().catch(() => null), a = i?.generatedChart ?? (i ? Sr(i) : null), o = {
|
|
3368
3443
|
...typeof i?.message == "string" ? { message: i.message } : {},
|
|
3369
3444
|
...a ? { chart: {
|
|
3370
3445
|
...i,
|
|
@@ -3376,7 +3451,7 @@ var ci = class {
|
|
|
3376
3451
|
message: o.message
|
|
3377
3452
|
}), this._patchState({ messages: [...s] }), o.chart || o.message) {
|
|
3378
3453
|
let n = s[e.messageIndex], r = n?.type === "ai" ? n : {
|
|
3379
|
-
id:
|
|
3454
|
+
id: vi(),
|
|
3380
3455
|
type: "ai",
|
|
3381
3456
|
message: o.message ?? ""
|
|
3382
3457
|
};
|
|
@@ -3394,7 +3469,7 @@ var ci = class {
|
|
|
3394
3469
|
}
|
|
3395
3470
|
}
|
|
3396
3471
|
buildRestoreRequest(e) {
|
|
3397
|
-
return
|
|
3472
|
+
return cr(e, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
|
|
3398
3473
|
}
|
|
3399
3474
|
abort(e = {}) {
|
|
3400
3475
|
this._abortController?.abort(), this._abortController = null, e.notify && this._inflightMessage ? this._markInflightCancelled(e.cancelledMessage) : this._discardInflightMessage(), this._patchState({
|
|
@@ -3496,16 +3571,16 @@ var ci = class {
|
|
|
3496
3571
|
_areChatMessagesEqual(e, t) {
|
|
3497
3572
|
return e.length === t.length && e.every((e, n) => {
|
|
3498
3573
|
let r = t[n];
|
|
3499
|
-
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) && JSON.stringify(e.actions ?? null) === JSON.stringify(r?.actions ?? null) && JSON.stringify(e.attachmentUrls ?? null) === JSON.stringify(r?.attachmentUrls ?? null) && JSON.stringify(e.elicitation ?? null) === JSON.stringify(r?.elicitation ?? null);
|
|
3574
|
+
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 && e.feedback === r?.feedback && e.hideFeedback === r?.hideFeedback && JSON.stringify(e.progress ?? null) === JSON.stringify(r?.progress ?? null) && JSON.stringify(e.actions ?? null) === JSON.stringify(r?.actions ?? null) && JSON.stringify(e.attachmentUrls ?? null) === JSON.stringify(r?.attachmentUrls ?? null) && JSON.stringify(e.elicitation ?? null) === JSON.stringify(r?.elicitation ?? null);
|
|
3500
3575
|
});
|
|
3501
3576
|
}
|
|
3502
3577
|
};
|
|
3503
|
-
function
|
|
3504
|
-
return new
|
|
3578
|
+
function bi(e, t) {
|
|
3579
|
+
return new yi(e, t);
|
|
3505
3580
|
}
|
|
3506
3581
|
//#endregion
|
|
3507
3582
|
//#region src/components/ai-chat/session/ai-chat-session-controller.ts
|
|
3508
|
-
var
|
|
3583
|
+
var xi = class {
|
|
3509
3584
|
constructor(e) {
|
|
3510
3585
|
this.options = e, this._session = null, this._ownsSession = !1, this._customItemFromProps = !1, this._seededFromProps = !1, this._unsubscribe = null;
|
|
3511
3586
|
}
|
|
@@ -3574,7 +3649,7 @@ var ui = class {
|
|
|
3574
3649
|
_createSessionIfMissing() {
|
|
3575
3650
|
if (this._session) return;
|
|
3576
3651
|
let e = this.options.getSeed();
|
|
3577
|
-
this._session =
|
|
3652
|
+
this._session = bi({
|
|
3578
3653
|
...this.options.getConfig(),
|
|
3579
3654
|
messages: e.messages.length > 0 ? [...e.messages] : void 0,
|
|
3580
3655
|
selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
|
|
@@ -3596,14 +3671,14 @@ var ui = class {
|
|
|
3596
3671
|
_unwire() {
|
|
3597
3672
|
this._unsubscribe?.(), this._unsubscribe = null;
|
|
3598
3673
|
}
|
|
3599
|
-
},
|
|
3674
|
+
}, Si, $ = class t extends a(i, { validSizes: [
|
|
3600
3675
|
"s",
|
|
3601
3676
|
"m",
|
|
3602
3677
|
"l",
|
|
3603
3678
|
"xl"
|
|
3604
3679
|
] }) {
|
|
3605
3680
|
constructor(...e) {
|
|
3606
|
-
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.includePublicDatasets = !1, this.hideDatasetButton = !1, this.hideDatasetIcons = !1, this.disableDatasetModification = !1, this.hideSelectedDatasets = !1, this.hideAgents = !1, this.disableColumnMentions = !1, this.requireDataset = !1, this.allowImages = !1, this.allowVoiceInput = !1, this.acceptedFileTypes = [], this.agent = "item", this.task = "generate", this.modelPreference = "performance", this.chatSession = null, this.conversationId = null, this.chart = null, this.dashboard = null, this.customItem = 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._assistantMessageActionsSlotHasContent = !1, this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1, this._lastProcessedInitialPrompt = null, this._session = new
|
|
3681
|
+
super(...e), this.messages = [], this.selectedDatasets = [], this.placeholder = "Describe your change", this.disabled = !1, this.stoppable = !1, this.showAssistantContextMenu = !1, this.showAssistantMessageFeedback = !1, this.authKey = "", this.authToken = "", this.apiUrl = "https://api.luzmo.com", this.appServer = "https://app.luzmo.com", this.includePublicDatasets = !1, this.hideDatasetButton = !1, this.hideDatasetIcons = !1, this.disableDatasetModification = !1, this.hideSelectedDatasets = !1, this.hideAgents = !1, this.disableColumnMentions = !1, this.requireDataset = !1, this.allowImages = !1, this.allowVoiceInput = !1, this.acceptedFileTypes = [], this.agent = "item", this.task = "generate", this.modelPreference = "performance", this.chatSession = null, this.conversationId = null, this.chart = null, this.dashboard = null, this.customItem = 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._assistantMessageActionsSlotHasContent = !1, this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1, this._focusedFeedbackWrapper = null, this._lastProcessedInitialPrompt = null, this._lastNotifiedState = null, this._session = new xi({
|
|
3607
3682
|
getConfig: () => this._buildSessionConfig(),
|
|
3608
3683
|
getSeed: () => ({
|
|
3609
3684
|
messages: this.messages,
|
|
@@ -3612,7 +3687,8 @@ var ui = class {
|
|
|
3612
3687
|
}),
|
|
3613
3688
|
createDomBridge: () => this._createDomBridgeCallbacks(),
|
|
3614
3689
|
onRenderNeeded: () => {
|
|
3615
|
-
|
|
3690
|
+
let e = this._session.state, t = Bn(this._lastNotifiedState, e);
|
|
3691
|
+
this._lastNotifiedState = e, this.requestUpdate(), t || this.updateComplete.then(() => this._scrollToBottom());
|
|
3616
3692
|
}
|
|
3617
3693
|
}), this._handleAssistantMessageActionsSlotChange = (e) => {
|
|
3618
3694
|
let t = e.target.assignedElements({ flatten: !0 }).length > 0;
|
|
@@ -3714,7 +3790,7 @@ var ui = class {
|
|
|
3714
3790
|
}
|
|
3715
3791
|
_getAgentConfig() {
|
|
3716
3792
|
let e = this._session.current?.agentConfig;
|
|
3717
|
-
return this.agentConfig === void 0 && this.chatSession && e ? e :
|
|
3793
|
+
return this.agentConfig === void 0 && this.chatSession && e ? e : Fn(this._buildSessionConfig(), e);
|
|
3718
3794
|
}
|
|
3719
3795
|
_emitConversationIdChanged(e) {
|
|
3720
3796
|
this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
|
|
@@ -3807,10 +3883,10 @@ var ui = class {
|
|
|
3807
3883
|
});
|
|
3808
3884
|
}
|
|
3809
3885
|
willUpdate(e) {
|
|
3810
|
-
super.willUpdate?.(e), this._syncPendingAssistantMessageAction();
|
|
3886
|
+
super.willUpdate?.(e), this._syncPendingAssistantMessageAction(), this._focusedFeedbackWrapper = this.shadowRoot?.activeElement?.closest(".assistant-message-feedback")?.closest(".assistant-message-wrapper") ?? null;
|
|
3811
3887
|
}
|
|
3812
3888
|
updated(e) {
|
|
3813
|
-
super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange(), e.has("uploadAttachments") && this._session.current?.setUiBridge(this._createDomBridgeCallbacks()), this.updateComplete.then(() => {
|
|
3889
|
+
super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange(), this._restoreFocusFromRemovedFeedback(), e.has("uploadAttachments") && this._session.current?.setUiBridge(this._createDomBridgeCallbacks()), this.updateComplete.then(() => {
|
|
3814
3890
|
this._syncAssistantMessageActionsVisibility(), this._focusPendingAssistantMessageActionConfirm();
|
|
3815
3891
|
});
|
|
3816
3892
|
}
|
|
@@ -3825,8 +3901,8 @@ var ui = class {
|
|
|
3825
3901
|
this.initialPrompt && this.initialPrompt !== this._lastProcessedInitialPrompt ? this._processInitialPrompt() : this.initialPrompt || (this._lastProcessedInitialPrompt = null);
|
|
3826
3902
|
}
|
|
3827
3903
|
_renderMarkdown(e) {
|
|
3828
|
-
let t = String(
|
|
3829
|
-
return
|
|
3904
|
+
let t = String(Z.parse(e, { async: !1 }));
|
|
3905
|
+
return St.sanitize(t, {
|
|
3830
3906
|
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("."),
|
|
3831
3907
|
ALLOWED_ATTR: [
|
|
3832
3908
|
"href",
|
|
@@ -3858,13 +3934,13 @@ var ui = class {
|
|
|
3858
3934
|
}
|
|
3859
3935
|
_renderProgress() {
|
|
3860
3936
|
let { progress: e, progressCollapsed: t } = this._getRenderState();
|
|
3861
|
-
return e?.children?.length ?
|
|
3937
|
+
return e?.children?.length ? m`
|
|
3862
3938
|
<luzmo-progress-steps
|
|
3863
3939
|
.progress=${e}
|
|
3864
3940
|
?collapsed=${t}
|
|
3865
3941
|
.size=${this.size}
|
|
3866
3942
|
></luzmo-progress-steps>
|
|
3867
|
-
` :
|
|
3943
|
+
` : h;
|
|
3868
3944
|
}
|
|
3869
3945
|
_syncAssistantMessageActionsVisibility() {
|
|
3870
3946
|
let e = ((this.shadowRoot?.querySelector(`slot[name="${t.assistantMessageActionsSlot}"]`) ?? null)?.assignedElements({ flatten: !0 }).length ?? 0) > 0;
|
|
@@ -3933,9 +4009,39 @@ var ui = class {
|
|
|
3933
4009
|
_focusPendingAssistantMessageActionConfirm() {
|
|
3934
4010
|
!this._shouldFocusAssistantMessageActionConfirm || !this._pendingAssistantMessageAction || (this._shouldFocusAssistantMessageActionConfirm = !1, (this.shadowRoot?.querySelector("luzmo-button.assistant-message-action-confirm-cancel"))?.focus?.());
|
|
3935
4011
|
}
|
|
4012
|
+
_restoreFocusFromRemovedFeedback() {
|
|
4013
|
+
let e = this._focusedFeedbackWrapper;
|
|
4014
|
+
this._focusedFeedbackWrapper = null;
|
|
4015
|
+
let t = !this.shadowRoot?.activeElement && (!document.activeElement || document.activeElement === document.body);
|
|
4016
|
+
!e || !t || e.querySelector(".assistant-message-feedback") || e.isConnected && this._focusFirstAssistantMessageAction(e) || this.shadowRoot?.querySelector("luzmo-ai-interaction-textarea")?.shadowRoot?.querySelector("luzmo-prompt-box")?.focus();
|
|
4017
|
+
}
|
|
4018
|
+
_focusFirstAssistantMessageAction(e) {
|
|
4019
|
+
return Array.from(e.querySelector(".assistant-message-actions")?.children ?? []).flatMap((e) => e instanceof HTMLSlotElement ? e.assignedElements({ flatten: !0 }) : [e]).flatMap((e) => [e, ...e.querySelectorAll("*")]).some((e) => {
|
|
4020
|
+
let t = e;
|
|
4021
|
+
return t.tabIndex < 0 || t.disabled || t.matches(":disabled") || t.getAttribute("aria-disabled") === "true" ? !1 : (t.focus({ preventScroll: !0 }), t.matches(":focus-within"));
|
|
4022
|
+
});
|
|
4023
|
+
}
|
|
3936
4024
|
_renderBuiltInAssistantMessageAction(e, t) {
|
|
3937
|
-
let n = this.disabled || t.disabled || !e.id;
|
|
3938
|
-
return
|
|
4025
|
+
let n = this.disabled || t.disabled || !e.id, r = t.icon ?? (t.id === "undo" ? l : void 0);
|
|
4026
|
+
return r ? m`
|
|
4027
|
+
<luzmo-action-button
|
|
4028
|
+
class="assistant-message-action"
|
|
4029
|
+
quiet
|
|
4030
|
+
label=${t.label}
|
|
4031
|
+
.size=${this._oneSizeSmaller}
|
|
4032
|
+
?disabled=${n}
|
|
4033
|
+
@click=${() => this._handleAssistantMessageActionClick(e, t)}
|
|
4034
|
+
>
|
|
4035
|
+
<luzmo-icon slot="icon" .icon=${r} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
4036
|
+
<luzmo-tooltip
|
|
4037
|
+
self-managed
|
|
4038
|
+
placement="top"
|
|
4039
|
+
size=${this._oneSizeSmaller}
|
|
4040
|
+
>
|
|
4041
|
+
${t.label}
|
|
4042
|
+
</luzmo-tooltip>
|
|
4043
|
+
</luzmo-action-button>
|
|
4044
|
+
` : m`
|
|
3939
4045
|
<luzmo-button
|
|
3940
4046
|
class="assistant-message-action"
|
|
3941
4047
|
.size=${this._oneSizeSmaller}
|
|
@@ -3944,16 +4050,15 @@ var ui = class {
|
|
|
3944
4050
|
?disabled=${n}
|
|
3945
4051
|
@click=${() => this._handleAssistantMessageActionClick(e, t)}
|
|
3946
4052
|
>
|
|
3947
|
-
${t.icon ? f`<luzmo-icon slot="icon" .icon=${t.icon} .size=${this._oneSizeSmaller}></luzmo-icon>` : p}
|
|
3948
4053
|
${t.label}
|
|
3949
4054
|
</luzmo-button>
|
|
3950
4055
|
`;
|
|
3951
4056
|
}
|
|
3952
4057
|
_renderAssistantMessageActionConfirm(e) {
|
|
3953
4058
|
let t = this._getPendingAssistantMessageAction(e);
|
|
3954
|
-
if (!t) return
|
|
4059
|
+
if (!t) return h;
|
|
3955
4060
|
let n = t.confirmMessage ?? this._getDefaultAssistantMessageActionConfirmMessage(), r = this.disabled || t.disabled || !e.id;
|
|
3956
|
-
return
|
|
4061
|
+
return m`
|
|
3957
4062
|
<span class="assistant-message-action-confirm-message" role="status" aria-live="polite">${n}</span>
|
|
3958
4063
|
<div class="assistant-message-action-confirm-controls">
|
|
3959
4064
|
<luzmo-button
|
|
@@ -3980,27 +4085,58 @@ var ui = class {
|
|
|
3980
4085
|
}
|
|
3981
4086
|
_renderAssistantMessageActions(e, n) {
|
|
3982
4087
|
let r = e.actions ?? [], i = r.length > 0, a = this._isLatestAssistantMessage(e, n), o = this._isAssistantMessageActionConfirming(e);
|
|
3983
|
-
return !i && !a ?
|
|
4088
|
+
return !i && !a ? h : m`
|
|
3984
4089
|
<div
|
|
3985
4090
|
class="assistant-message-actions ${this._assistantMessageActionsFooterHasContent(e, a) ? "assistant-message-actions--has-content" : ""} ${o ? "assistant-message-actions--confirming" : ""}"
|
|
3986
|
-
@keydown=${o ? this._handleAssistantMessageActionConfirmKeydown :
|
|
4091
|
+
@keydown=${o ? this._handleAssistantMessageActionConfirmKeydown : h}
|
|
3987
4092
|
>
|
|
3988
|
-
${o ? this._renderAssistantMessageActionConfirm(e) :
|
|
4093
|
+
${o ? this._renderAssistantMessageActionConfirm(e) : m`
|
|
3989
4094
|
${r.map((t) => this._renderBuiltInAssistantMessageAction(e, t))}
|
|
3990
|
-
${a ?
|
|
4095
|
+
${a ? m`
|
|
3991
4096
|
<slot
|
|
3992
4097
|
name=${t.assistantMessageActionsSlot}
|
|
3993
4098
|
@slotchange=${this._handleAssistantMessageActionsSlotChange}
|
|
3994
4099
|
></slot>
|
|
3995
|
-
` :
|
|
4100
|
+
` : h}
|
|
3996
4101
|
`}
|
|
3997
4102
|
</div>
|
|
3998
4103
|
`;
|
|
3999
4104
|
}
|
|
4105
|
+
_renderAssistantMessageFooter(e, t, n) {
|
|
4106
|
+
let r = this._renderAssistantMessageFeedback(e, t), i = this._renderAssistantMessageActions(e, n);
|
|
4107
|
+
return r === h && i === h ? h : m`
|
|
4108
|
+
<div class="assistant-message-footer ${r !== h || this._assistantMessageActionsFooterHasContent(e, this._isLatestAssistantMessage(e, n)) ? "assistant-message-footer--has-content" : ""}">${r} ${i}</div>
|
|
4109
|
+
`;
|
|
4110
|
+
}
|
|
4111
|
+
_handleAssistantMessageFeedback(e, t) {
|
|
4112
|
+
let n = e.id;
|
|
4113
|
+
if (!n || this.disabled) return;
|
|
4114
|
+
let r = this._session.requireSession(), i = Ln(r.state.messages.find((e) => e.id === n)?.feedback, t);
|
|
4115
|
+
if (!r.setMessageFeedback(n, i)) return;
|
|
4116
|
+
let a = r.state.messages.find((e) => e.id === n);
|
|
4117
|
+
this.dispatchEvent(new CustomEvent("luzmo-assistant-message-feedback", {
|
|
4118
|
+
detail: {
|
|
4119
|
+
messageId: n,
|
|
4120
|
+
rating: i,
|
|
4121
|
+
message: a
|
|
4122
|
+
},
|
|
4123
|
+
bubbles: !0,
|
|
4124
|
+
composed: !0
|
|
4125
|
+
}));
|
|
4126
|
+
}
|
|
4127
|
+
_renderAssistantMessageFeedback(e, t) {
|
|
4128
|
+
return !this.showAssistantMessageFeedback || e.hideFeedback ? h : Vn({
|
|
4129
|
+
labelId: `assistant-message-feedback-label-${t}`,
|
|
4130
|
+
rating: e.feedback ?? 0,
|
|
4131
|
+
size: this._oneSizeSmaller,
|
|
4132
|
+
disabled: this.disabled || !e.id,
|
|
4133
|
+
onRate: (t) => this._handleAssistantMessageFeedback(e, t)
|
|
4134
|
+
});
|
|
4135
|
+
}
|
|
4000
4136
|
_renderRestoreMenu(e, t, n, r = !1) {
|
|
4001
|
-
if (!(this._getAgentConfig().type === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== n)) return
|
|
4137
|
+
if (!(this._getAgentConfig().type === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== n)) return h;
|
|
4002
4138
|
let i = `context-menu-trigger-${e.apiMessageId}`;
|
|
4003
|
-
return
|
|
4139
|
+
return m`
|
|
4004
4140
|
<div class="assistant-context-menu">
|
|
4005
4141
|
<button
|
|
4006
4142
|
id=${i}
|
|
@@ -4010,7 +4146,7 @@ var ui = class {
|
|
|
4010
4146
|
aria-haspopup="menu"
|
|
4011
4147
|
?disabled=${r}
|
|
4012
4148
|
>
|
|
4013
|
-
${u
|
|
4149
|
+
${d(u)}
|
|
4014
4150
|
</button>
|
|
4015
4151
|
<luzmo-overlay
|
|
4016
4152
|
trigger="${i}@click"
|
|
@@ -4033,17 +4169,17 @@ var ui = class {
|
|
|
4033
4169
|
_renderMessages() {
|
|
4034
4170
|
let { messages: e, inflightMessage: t, isGenerating: n } = this._getRenderState(), r = t !== null, i = e.filter((e) => !t || e.id !== t.id), a = [...i].reverse().find((e) => e.type === "ai"), o = a?.id;
|
|
4035
4171
|
return i.map((t) => {
|
|
4036
|
-
let s = t.progress?.children?.length ?
|
|
4172
|
+
let s = t.progress?.children?.length ? m`
|
|
4037
4173
|
<luzmo-progress-steps
|
|
4038
4174
|
.progress=${t.progress}
|
|
4039
4175
|
collapsed
|
|
4040
4176
|
no-animate
|
|
4041
4177
|
.size=${this.size}
|
|
4042
4178
|
></luzmo-progress-steps>
|
|
4043
|
-
` :
|
|
4179
|
+
` : h;
|
|
4044
4180
|
if (t.type === "user") {
|
|
4045
4181
|
let e = t.attachmentUrls ?? [];
|
|
4046
|
-
return
|
|
4182
|
+
return m`
|
|
4047
4183
|
<luzmo-chat-message
|
|
4048
4184
|
avatar-placement="bottom"
|
|
4049
4185
|
position="right"
|
|
@@ -4051,9 +4187,9 @@ var ui = class {
|
|
|
4051
4187
|
.size=${this.size}
|
|
4052
4188
|
>
|
|
4053
4189
|
<div class="user-message-content">
|
|
4054
|
-
${e.length > 0 ?
|
|
4190
|
+
${e.length > 0 ? m`
|
|
4055
4191
|
<div class="user-message-attachments">
|
|
4056
|
-
${e.map((e) =>
|
|
4192
|
+
${e.map((e) => m`
|
|
4057
4193
|
<img
|
|
4058
4194
|
class="user-message-attachment"
|
|
4059
4195
|
src=${e}
|
|
@@ -4063,45 +4199,44 @@ var ui = class {
|
|
|
4063
4199
|
/>
|
|
4064
4200
|
`)}
|
|
4065
4201
|
</div>
|
|
4066
|
-
` :
|
|
4202
|
+
` : h}
|
|
4067
4203
|
<div class="user-message-text">${t.message}</div>
|
|
4068
4204
|
</div>
|
|
4069
4205
|
</luzmo-chat-message>
|
|
4070
4206
|
`;
|
|
4071
4207
|
}
|
|
4072
|
-
let l = e.indexOf(t), u = t.isError ? "error" : t.isCancelled ? "cancelled" : "", d = !!t.elicitation && (!t.message.trim() || t.message.trim() === t.elicitation?.question),
|
|
4073
|
-
return
|
|
4208
|
+
let l = e.indexOf(t), u = t.isError ? "error" : t.isCancelled ? "cancelled" : "", d = !!t.elicitation && (!t.message.trim() || t.message.trim() === t.elicitation?.question), f = t.isCancelled ? t.message : d ? h : m`<div class="markdown-content">${_(this._renderMarkdown(t.message))}</div>`;
|
|
4209
|
+
return m`
|
|
4074
4210
|
${s}
|
|
4075
4211
|
<div class="assistant-message-wrapper">
|
|
4076
4212
|
<div class="assistant-message-body">
|
|
4077
4213
|
<luzmo-chat-message
|
|
4078
4214
|
class=${u}
|
|
4079
|
-
role=${t.isError ? "alert" :
|
|
4215
|
+
role=${t.isError ? "alert" : h}
|
|
4080
4216
|
avatar-placement="bottom"
|
|
4081
4217
|
position="left"
|
|
4082
4218
|
quiet
|
|
4083
4219
|
.size=${this.size}
|
|
4084
4220
|
>
|
|
4085
|
-
${
|
|
4086
|
-
${
|
|
4221
|
+
${f}
|
|
4222
|
+
${Yn({
|
|
4087
4223
|
message: t,
|
|
4088
4224
|
size: this.size,
|
|
4089
4225
|
state: t.elicitation?.answer ? "answered" : t.id && t === i.at(-1) && !n && !this.disabled ? "open" : "closed",
|
|
4090
4226
|
onSubmit: (e) => this._handleElicitationSubmit(t, e)
|
|
4091
4227
|
})}
|
|
4228
|
+
${this._renderAssistantMessageFooter(t, l, a)}
|
|
4092
4229
|
</luzmo-chat-message>
|
|
4093
4230
|
|
|
4094
4231
|
${this._renderRestoreMenu(t, l, o, r)}
|
|
4095
4232
|
</div>
|
|
4096
|
-
|
|
4097
|
-
${this._renderAssistantMessageActions(t, a)}
|
|
4098
4233
|
</div>
|
|
4099
4234
|
`;
|
|
4100
4235
|
});
|
|
4101
4236
|
}
|
|
4102
4237
|
async _handleElicitationSubmit(e, t) {
|
|
4103
4238
|
t.stopPropagation();
|
|
4104
|
-
let n = t.currentTarget, r = n.parentElement, i =
|
|
4239
|
+
let n = t.currentTarget, r = n.parentElement, i = qn(t.detail), a = !1;
|
|
4105
4240
|
if (e.id && i) try {
|
|
4106
4241
|
let t = this._session.requireSession().answerElicitation(e.id, i, { agentId: this._pickedAgentId });
|
|
4107
4242
|
await this.updateComplete;
|
|
@@ -4114,22 +4249,22 @@ var ui = class {
|
|
|
4114
4249
|
}
|
|
4115
4250
|
_renderStreamingResponse() {
|
|
4116
4251
|
let { inflightMessage: e } = this._getRenderState();
|
|
4117
|
-
return e?.message ?
|
|
4252
|
+
return e?.message ? m`
|
|
4118
4253
|
<luzmo-chat-message
|
|
4119
4254
|
avatar-placement="bottom"
|
|
4120
4255
|
position="left"
|
|
4121
4256
|
quiet
|
|
4122
4257
|
.size=${this.size}
|
|
4123
4258
|
>
|
|
4124
|
-
<div class="markdown-content">${
|
|
4259
|
+
<div class="markdown-content">${_(this._renderMarkdown(e.message))}</div>
|
|
4125
4260
|
</luzmo-chat-message>
|
|
4126
|
-
` :
|
|
4261
|
+
` : h;
|
|
4127
4262
|
}
|
|
4128
4263
|
_renderLoadingMessage() {
|
|
4129
4264
|
let { isGenerating: e, progress: t, inflightMessage: n } = this._getRenderState();
|
|
4130
|
-
if (!e || t?.children?.length || n?.message) return
|
|
4131
|
-
let r = this._getAgentConfig(), i =
|
|
4132
|
-
return
|
|
4265
|
+
if (!e || t?.children?.length || n?.message) return h;
|
|
4266
|
+
let r = this._getAgentConfig(), i = In(r), a = r.type === "dashboard" ? !i.dashboard : i.chart?.type === "placeholder", o = r.type === "dashboard" ? a ? c("Creating dashboard...", { desc: "Label for ai chat creating dashboard message" }) : c("Updating dashboard...", { desc: "Label for ai chat updating dashboard message" }) : a ? c("Creating item...", { desc: "Label for ai chat creating item message" }) : c("Updating item...", { desc: "Label for ai chat updating item message" });
|
|
4267
|
+
return m`
|
|
4133
4268
|
<luzmo-chat-message
|
|
4134
4269
|
avatar-placement="bottom"
|
|
4135
4270
|
position="left"
|
|
@@ -4137,16 +4272,16 @@ var ui = class {
|
|
|
4137
4272
|
.size=${this.size}
|
|
4138
4273
|
>
|
|
4139
4274
|
<div class="loading-message" role="status" aria-live="polite">
|
|
4140
|
-
<span class="icon-lg">${
|
|
4275
|
+
<span class="icon-lg">${d(f, { className: "spin" })}</span>
|
|
4141
4276
|
<span class="loading-message-text">${this.loadingMessage || o}</span>
|
|
4142
4277
|
</div>
|
|
4143
4278
|
</luzmo-chat-message>
|
|
4144
4279
|
`;
|
|
4145
4280
|
}
|
|
4146
4281
|
_renderEmptyState() {
|
|
4147
|
-
if (this._getRenderState().messages.length > 0) return
|
|
4282
|
+
if (this._getRenderState().messages.length > 0) return h;
|
|
4148
4283
|
let e = c("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
|
|
4149
|
-
return
|
|
4284
|
+
return m`
|
|
4150
4285
|
<luzmo-ai-chat-empty-state
|
|
4151
4286
|
.title=${this.emptyStateTitle || e}
|
|
4152
4287
|
.subtitle=${t ? this.emptyStateSubtitle : ""}
|
|
@@ -4159,7 +4294,7 @@ var ui = class {
|
|
|
4159
4294
|
}
|
|
4160
4295
|
render() {
|
|
4161
4296
|
let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
|
|
4162
|
-
return
|
|
4297
|
+
return m`
|
|
4163
4298
|
<div class="chat-container" role="region" aria-label=${c("AI Chat", { desc: "Accessible label for AI chat region" })}>
|
|
4164
4299
|
<div class="chat-messages-container" role="log" aria-live="polite">
|
|
4165
4300
|
${this._renderEmptyState()}
|
|
@@ -4206,120 +4341,124 @@ var ui = class {
|
|
|
4206
4341
|
`;
|
|
4207
4342
|
}
|
|
4208
4343
|
};
|
|
4209
|
-
|
|
4344
|
+
Si = $, Si.styles = te(Pn), Si.tagName = "luzmo-ai-chat", Si.assistantMessageActionsSlot = "assistant-message-actions", o([g({ type: Array })], $.prototype, "messages", void 0), o([g({
|
|
4210
4345
|
type: Array,
|
|
4211
4346
|
attribute: "selected-datasets"
|
|
4212
|
-
})], $.prototype, "selectedDatasets", void 0), o([
|
|
4347
|
+
})], $.prototype, "selectedDatasets", void 0), o([g({ type: String })], $.prototype, "placeholder", void 0), o([g({
|
|
4213
4348
|
type: Boolean,
|
|
4214
4349
|
reflect: !0
|
|
4215
|
-
})], $.prototype, "disabled", void 0), o([
|
|
4350
|
+
})], $.prototype, "disabled", void 0), o([g({
|
|
4216
4351
|
type: Boolean,
|
|
4217
4352
|
reflect: !0
|
|
4218
|
-
})], $.prototype, "stoppable", void 0), o([
|
|
4353
|
+
})], $.prototype, "stoppable", void 0), o([g({
|
|
4219
4354
|
type: Boolean,
|
|
4220
4355
|
attribute: "show-assistant-context-menu"
|
|
4221
|
-
})], $.prototype, "showAssistantContextMenu", void 0), o([
|
|
4356
|
+
})], $.prototype, "showAssistantContextMenu", void 0), o([g({
|
|
4357
|
+
type: Boolean,
|
|
4358
|
+
reflect: !0,
|
|
4359
|
+
attribute: "show-assistant-message-feedback"
|
|
4360
|
+
})], $.prototype, "showAssistantMessageFeedback", void 0), o([g({
|
|
4222
4361
|
type: String,
|
|
4223
4362
|
attribute: "auth-key"
|
|
4224
|
-
})], $.prototype, "authKey", void 0), o([
|
|
4363
|
+
})], $.prototype, "authKey", void 0), o([g({
|
|
4225
4364
|
type: String,
|
|
4226
4365
|
attribute: "auth-token"
|
|
4227
|
-
})], $.prototype, "authToken", void 0), o([
|
|
4366
|
+
})], $.prototype, "authToken", void 0), o([g({
|
|
4228
4367
|
type: String,
|
|
4229
4368
|
attribute: "api-url"
|
|
4230
|
-
})], $.prototype, "apiUrl", void 0), o([
|
|
4369
|
+
})], $.prototype, "apiUrl", void 0), o([g({
|
|
4231
4370
|
type: String,
|
|
4232
4371
|
attribute: "app-server"
|
|
4233
|
-
})], $.prototype, "appServer", void 0), o([
|
|
4372
|
+
})], $.prototype, "appServer", void 0), o([g({
|
|
4234
4373
|
type: Boolean,
|
|
4235
4374
|
reflect: !0,
|
|
4236
4375
|
attribute: "include-public-datasets"
|
|
4237
|
-
})], $.prototype, "includePublicDatasets", void 0), o([
|
|
4376
|
+
})], $.prototype, "includePublicDatasets", void 0), o([g({
|
|
4238
4377
|
type: Boolean,
|
|
4239
4378
|
attribute: "flag-opendata"
|
|
4240
|
-
})], $.prototype, "flagOpendata", null), o([
|
|
4379
|
+
})], $.prototype, "flagOpendata", null), o([g({
|
|
4241
4380
|
type: Boolean,
|
|
4242
4381
|
attribute: "hide-dataset-button"
|
|
4243
|
-
})], $.prototype, "hideDatasetButton", void 0), o([
|
|
4382
|
+
})], $.prototype, "hideDatasetButton", void 0), o([g({
|
|
4244
4383
|
type: Boolean,
|
|
4245
4384
|
attribute: "hide-dataset-icons"
|
|
4246
|
-
})], $.prototype, "hideDatasetIcons", void 0), o([
|
|
4385
|
+
})], $.prototype, "hideDatasetIcons", void 0), o([g({
|
|
4247
4386
|
type: Boolean,
|
|
4248
4387
|
attribute: "disable-dataset-modification"
|
|
4249
|
-
})], $.prototype, "disableDatasetModification", void 0), o([
|
|
4388
|
+
})], $.prototype, "disableDatasetModification", void 0), o([g({
|
|
4250
4389
|
type: Boolean,
|
|
4251
4390
|
attribute: "hide-selected-datasets"
|
|
4252
|
-
})], $.prototype, "hideSelectedDatasets", void 0), o([
|
|
4391
|
+
})], $.prototype, "hideSelectedDatasets", void 0), o([g({
|
|
4253
4392
|
type: Boolean,
|
|
4254
4393
|
reflect: !0,
|
|
4255
4394
|
attribute: "hide-agents"
|
|
4256
|
-
})], $.prototype, "hideAgents", void 0), o([
|
|
4395
|
+
})], $.prototype, "hideAgents", void 0), o([g({
|
|
4257
4396
|
type: Boolean,
|
|
4258
4397
|
attribute: "disable-column-mentions"
|
|
4259
|
-
})], $.prototype, "disableColumnMentions", void 0), o([
|
|
4398
|
+
})], $.prototype, "disableColumnMentions", void 0), o([g({
|
|
4260
4399
|
type: Boolean,
|
|
4261
4400
|
attribute: "require-dataset"
|
|
4262
|
-
})], $.prototype, "requireDataset", void 0), o([
|
|
4401
|
+
})], $.prototype, "requireDataset", void 0), o([g({
|
|
4263
4402
|
type: Boolean,
|
|
4264
4403
|
reflect: !0,
|
|
4265
4404
|
attribute: "allow-images"
|
|
4266
|
-
})], $.prototype, "allowImages", void 0), o([
|
|
4405
|
+
})], $.prototype, "allowImages", void 0), o([g({
|
|
4267
4406
|
type: Boolean,
|
|
4268
4407
|
reflect: !0,
|
|
4269
4408
|
attribute: "allow-voice-input"
|
|
4270
|
-
})], $.prototype, "allowVoiceInput", void 0), o([
|
|
4409
|
+
})], $.prototype, "allowVoiceInput", void 0), o([g({
|
|
4271
4410
|
type: Array,
|
|
4272
4411
|
attribute: "accepted-file-types"
|
|
4273
|
-
})], $.prototype, "acceptedFileTypes", void 0), o([
|
|
4412
|
+
})], $.prototype, "acceptedFileTypes", void 0), o([g({ attribute: !1 })], $.prototype, "uploadAttachments", void 0), o([g({ type: String })], $.prototype, "agent", void 0), o([g({ attribute: !1 })], $.prototype, "agentConfig", void 0), o([g({
|
|
4274
4413
|
type: String,
|
|
4275
4414
|
attribute: "agent-id"
|
|
4276
|
-
})], $.prototype, "agentId", void 0), o([
|
|
4415
|
+
})], $.prototype, "agentId", void 0), o([g({ type: String })], $.prototype, "task", void 0), o([g({
|
|
4277
4416
|
type: String,
|
|
4278
4417
|
attribute: "model-preference"
|
|
4279
|
-
})], $.prototype, "modelPreference", void 0), o([
|
|
4418
|
+
})], $.prototype, "modelPreference", void 0), o([g({ attribute: !1 })], $.prototype, "chatSession", void 0), o([g({
|
|
4280
4419
|
type: String,
|
|
4281
4420
|
attribute: "conversation-id"
|
|
4282
|
-
})], $.prototype, "conversationId", void 0), o([
|
|
4421
|
+
})], $.prototype, "conversationId", void 0), o([g({
|
|
4283
4422
|
type: Object,
|
|
4284
4423
|
attribute: "chart"
|
|
4285
|
-
})], $.prototype, "chart", void 0), o([
|
|
4424
|
+
})], $.prototype, "chart", void 0), o([g({ type: Object })], $.prototype, "dashboard", void 0), o([g({ attribute: !1 })], $.prototype, "customItem", void 0), o([g({
|
|
4286
4425
|
type: String,
|
|
4287
4426
|
attribute: "current-screen-mode"
|
|
4288
|
-
})], $.prototype, "currentScreenMode", void 0), o([
|
|
4427
|
+
})], $.prototype, "currentScreenMode", void 0), o([g({
|
|
4289
4428
|
type: String,
|
|
4290
4429
|
attribute: "locale-id"
|
|
4291
|
-
})], $.prototype, "localeId", void 0), o([
|
|
4430
|
+
})], $.prototype, "localeId", void 0), o([g({
|
|
4292
4431
|
type: String,
|
|
4293
4432
|
attribute: "timezone-id"
|
|
4294
|
-
})], $.prototype, "timezoneId", void 0), o([
|
|
4433
|
+
})], $.prototype, "timezoneId", void 0), o([g({
|
|
4295
4434
|
type: String,
|
|
4296
4435
|
attribute: "api-version"
|
|
4297
|
-
})], $.prototype, "apiVersion", void 0), o([
|
|
4436
|
+
})], $.prototype, "apiVersion", void 0), o([g({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], $.prototype, "stream", void 0), o([g({
|
|
4298
4437
|
type: String,
|
|
4299
4438
|
attribute: "loading-message"
|
|
4300
|
-
})], $.prototype, "loadingMessage", void 0), o([
|
|
4439
|
+
})], $.prototype, "loadingMessage", void 0), o([g({
|
|
4301
4440
|
type: String,
|
|
4302
4441
|
attribute: "cancelled-message"
|
|
4303
|
-
})], $.prototype, "cancelledMessage", void 0), o([
|
|
4442
|
+
})], $.prototype, "cancelledMessage", void 0), o([g({
|
|
4304
4443
|
type: String,
|
|
4305
4444
|
attribute: "initial-prompt"
|
|
4306
|
-
})], $.prototype, "initialPrompt", void 0), o([
|
|
4445
|
+
})], $.prototype, "initialPrompt", void 0), o([g({
|
|
4307
4446
|
type: String,
|
|
4308
4447
|
attribute: "empty-state-title"
|
|
4309
|
-
})], $.prototype, "emptyStateTitle", void 0), o([
|
|
4448
|
+
})], $.prototype, "emptyStateTitle", void 0), o([g({
|
|
4310
4449
|
type: String,
|
|
4311
4450
|
attribute: "empty-state-subtitle"
|
|
4312
|
-
})], $.prototype, "emptyStateSubtitle", void 0), o([
|
|
4451
|
+
})], $.prototype, "emptyStateSubtitle", void 0), o([g({
|
|
4313
4452
|
type: Array,
|
|
4314
4453
|
attribute: !1
|
|
4315
|
-
})], $.prototype, "emptyStateSuggestions", void 0), o([
|
|
4454
|
+
})], $.prototype, "emptyStateSuggestions", void 0), o([ne()], $.prototype, "_textareaValue", void 0), o([ne()], $.prototype, "_assistantMessageActionsSlotHasContent", void 0), o([ne()], $.prototype, "_pendingAssistantMessageAction", void 0);
|
|
4316
4455
|
//#endregion
|
|
4317
4456
|
//#region src/components/ai-chat/ai-chat-events.ts
|
|
4318
|
-
function
|
|
4457
|
+
function Ci(e) {
|
|
4319
4458
|
return e.recognized === !0;
|
|
4320
4459
|
}
|
|
4321
4460
|
//#endregion
|
|
4322
4461
|
//#region src/components/ai-chat/index.ts
|
|
4323
4462
|
customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", $);
|
|
4324
4463
|
//#endregion
|
|
4325
|
-
export {
|
|
4464
|
+
export { tr as C, Wn as D, Xn as E, nr as S, Zn as T, cr as _, bi as a, rr as b, hi as c, Er as d, pr as f, fr as g, ur as h, yi as i, mi as l, lr as m, $ as n, _i as o, mr as p, xi as r, gi as s, Ci as t, Sr as u, or as v, ar as w, ir as x, sr as y };
|