drizzle-cube 0.4.29 → 0.4.30
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/dist/adapters/anthropic-BIva8k1r.cjs +1 -0
- package/dist/adapters/anthropic-B_rg0BhK.js +140 -0
- package/dist/adapters/dist-Boc63-1q.cjs +2 -0
- package/dist/adapters/dist-De5fzUEM.js +581 -0
- package/dist/adapters/express/index.cjs +2 -10
- package/dist/adapters/express/index.js +232 -342
- package/dist/adapters/fastify/index.cjs +2 -10
- package/dist/adapters/fastify/index.js +275 -424
- package/dist/adapters/google-CT4kgmBf.js +154 -0
- package/dist/adapters/google-Dgo9-Kb5.cjs +2 -0
- package/dist/adapters/handler-B8vuFQYP.cjs +25 -0
- package/dist/adapters/handler-D-2-6uLM.js +2951 -0
- package/dist/adapters/hono/index.cjs +2 -10
- package/dist/adapters/hono/index.js +307 -402
- package/dist/adapters/mcp-prompts-BAutSQYA.js +344 -0
- package/dist/adapters/mcp-prompts-DsAkafVn.cjs +5 -0
- package/dist/adapters/mcp-transport-CuugoG8t.js +7821 -0
- package/dist/adapters/mcp-transport-Dpp6hdZe.cjs +253 -0
- package/dist/adapters/nextjs/index.cjs +1 -9
- package/dist/adapters/nextjs/index.js +377 -600
- package/dist/adapters/openai-CjBvA6mK.js +4114 -0
- package/dist/adapters/openai-DhLE0A9Z.cjs +1 -0
- package/dist/adapters/openai-Zjw4Zo4R.js +153 -0
- package/dist/adapters/openai-eJBw3LfQ.cjs +16 -0
- package/dist/adapters/types.cjs +0 -1
- package/dist/adapters/types.js +0 -1
- package/dist/adapters/utils-ChhNGUOF.js +5396 -0
- package/dist/adapters/utils-CwJplXR5.cjs +15 -0
- package/dist/adapters/utils.cjs +1 -19
- package/dist/adapters/utils.js +2 -21333
- package/dist/client/charts.js +15 -186
- package/dist/client/chunks/DashboardEditModal-C076pscL.js +6678 -0
- package/dist/client/chunks/DashboardEditModal-C076pscL.js.map +1 -0
- package/dist/client/chunks/FieldSearchModal-C0DjSWk3.js +2631 -0
- package/dist/client/chunks/FieldSearchModal-C0DjSWk3.js.map +1 -0
- package/dist/client/chunks/RetentionCombinedChart-DuGXc-AP.js +270 -0
- package/dist/client/chunks/RetentionCombinedChart-DuGXc-AP.js.map +1 -0
- package/dist/client/chunks/RetentionCombinedChart.config-DprbXd1N.js +56 -0
- package/dist/client/chunks/RetentionCombinedChart.config-DprbXd1N.js.map +1 -0
- package/dist/client/chunks/RetentionHeatmap-BoGY6mlZ.js +193 -0
- package/dist/client/chunks/RetentionHeatmap-BoGY6mlZ.js.map +1 -0
- package/dist/client/chunks/RetentionHeatmap.config-cbaNExVy.js +25 -0
- package/dist/client/chunks/RetentionHeatmap.config-cbaNExVy.js.map +1 -0
- package/dist/client/chunks/analysis-builder-DF0XntqC.js +6111 -0
- package/dist/client/chunks/analysis-builder-DF0XntqC.js.map +1 -0
- package/dist/client/chunks/analysis-builder-shared-2QhKYbs6.js +3114 -0
- package/dist/client/chunks/analysis-builder-shared-2QhKYbs6.js.map +1 -0
- package/dist/client/chunks/chart-activity-grid-CNES9VBk.js +803 -0
- package/dist/client/chunks/chart-activity-grid-CNES9VBk.js.map +1 -0
- package/dist/client/chunks/chart-area-CRJc3KOu.js +449 -0
- package/dist/client/chunks/chart-area-CRJc3KOu.js.map +1 -0
- package/dist/client/chunks/chart-bar-DD2PjJ5n.js +270 -0
- package/dist/client/chunks/chart-bar-DD2PjJ5n.js.map +1 -0
- package/dist/client/chunks/chart-box-plot-BcqleldJ.js +377 -0
- package/dist/client/chunks/chart-box-plot-BcqleldJ.js.map +1 -0
- package/dist/client/chunks/chart-bubble-BmQkVk4K.js +273 -0
- package/dist/client/chunks/chart-bubble-BmQkVk4K.js.map +1 -0
- package/dist/client/chunks/chart-candlestick-C3Rep469.js +306 -0
- package/dist/client/chunks/chart-candlestick-C3Rep469.js.map +1 -0
- package/dist/client/chunks/chart-config-activity-grid-USo7JrPh.js +51 -0
- package/dist/client/chunks/chart-config-activity-grid-USo7JrPh.js.map +1 -0
- package/dist/client/chunks/chart-config-area-D_ZufYzg.js +93 -0
- package/dist/client/chunks/chart-config-area-D_ZufYzg.js.map +1 -0
- package/dist/client/chunks/chart-config-bar-BCi2Wmd6.js +87 -0
- package/dist/client/chunks/chart-config-bar-BCi2Wmd6.js.map +1 -0
- package/dist/client/chunks/chart-config-box-plot-afKLzJSp.js +35 -0
- package/dist/client/chunks/chart-config-box-plot-afKLzJSp.js.map +1 -0
- package/dist/client/chunks/chart-config-bubble-CgbBjPv8.js +82 -0
- package/dist/client/chunks/chart-config-bubble-CgbBjPv8.js.map +1 -0
- package/dist/client/chunks/chart-config-candlestick-7boGjZ-A.js +72 -0
- package/dist/client/chunks/chart-config-candlestick-7boGjZ-A.js.map +1 -0
- package/dist/client/chunks/chart-config-data-table-Cl7sBasW.js +30 -0
- package/dist/client/chunks/chart-config-data-table-Cl7sBasW.js.map +1 -0
- package/dist/client/chunks/chart-config-funnel-CXPYQtTl.js +93 -0
- package/dist/client/chunks/chart-config-funnel-CXPYQtTl.js.map +1 -0
- package/dist/client/chunks/chart-config-gauge-DUNEUCvh.js +64 -0
- package/dist/client/chunks/chart-config-gauge-DUNEUCvh.js.map +1 -0
- package/dist/client/chunks/chart-config-heat-map-BFf1tO11.js +91 -0
- package/dist/client/chunks/chart-config-heat-map-BFf1tO11.js.map +1 -0
- package/dist/client/chunks/chart-config-kpi-delta-C5k2waIJ.js +94 -0
- package/dist/client/chunks/chart-config-kpi-delta-C5k2waIJ.js.map +1 -0
- package/dist/client/chunks/chart-config-kpi-number-DptOyhk0.js +75 -0
- package/dist/client/chunks/chart-config-kpi-number-DptOyhk0.js.map +1 -0
- package/dist/client/chunks/chart-config-kpi-text-D9DdVWqd.js +47 -0
- package/dist/client/chunks/chart-config-kpi-text-D9DdVWqd.js.map +1 -0
- package/dist/client/chunks/chart-config-line-B3NgLF7K.js +104 -0
- package/dist/client/chunks/chart-config-line-B3NgLF7K.js.map +1 -0
- package/dist/client/chunks/chart-config-markdown-tlfivQTt.js +117 -0
- package/dist/client/chunks/chart-config-markdown-tlfivQTt.js.map +1 -0
- package/dist/client/chunks/chart-config-measure-profile-D7XDwrU2.js +82 -0
- package/dist/client/chunks/chart-config-measure-profile-D7XDwrU2.js.map +1 -0
- package/dist/client/chunks/chart-config-pie-wY0B52PC.js +68 -0
- package/dist/client/chunks/chart-config-pie-wY0B52PC.js.map +1 -0
- package/dist/client/chunks/chart-config-radar-DRpJBy1M.js +49 -0
- package/dist/client/chunks/chart-config-radar-DRpJBy1M.js.map +1 -0
- package/dist/client/chunks/chart-config-radial-bar-DCUpXv9G.js +38 -0
- package/dist/client/chunks/chart-config-radial-bar-DCUpXv9G.js.map +1 -0
- package/dist/client/chunks/chart-config-sankey-CdOhlm4h.js +66 -0
- package/dist/client/chunks/chart-config-sankey-CdOhlm4h.js.map +1 -0
- package/dist/client/chunks/chart-config-scatter-B2su_x8f.js +61 -0
- package/dist/client/chunks/chart-config-scatter-B2su_x8f.js.map +1 -0
- package/dist/client/chunks/chart-config-sunburst-BPdjbk18.js +45 -0
- package/dist/client/chunks/chart-config-sunburst-BPdjbk18.js.map +1 -0
- package/dist/client/chunks/chart-config-tree-map-Cbsh2fe2.js +51 -0
- package/dist/client/chunks/chart-config-tree-map-Cbsh2fe2.js.map +1 -0
- package/dist/client/chunks/chart-config-waterfall-DGmuZfQF.js +59 -0
- package/dist/client/chunks/chart-config-waterfall-DGmuZfQF.js.map +1 -0
- package/dist/client/chunks/chart-data-table-DehW1C1G.js +4088 -0
- package/dist/client/chunks/chart-data-table-DehW1C1G.js.map +1 -0
- package/dist/client/chunks/chart-funnel-BjkpnG5g.js +447 -0
- package/dist/client/chunks/chart-funnel-BjkpnG5g.js.map +1 -0
- package/dist/client/chunks/chart-gauge-BWW_HEfg.js +424 -0
- package/dist/client/chunks/chart-gauge-BWW_HEfg.js.map +1 -0
- package/dist/client/chunks/chart-heat-map-BWuOuDcm.js +236 -0
- package/dist/client/chunks/chart-heat-map-BWuOuDcm.js.map +1 -0
- package/dist/client/chunks/chart-kpi-delta-D5OHtDJx.js +343 -0
- package/dist/client/chunks/chart-kpi-delta-D5OHtDJx.js.map +1 -0
- package/dist/client/chunks/chart-kpi-number-C9zH-aKC.js +326 -0
- package/dist/client/chunks/chart-kpi-number-C9zH-aKC.js.map +1 -0
- package/dist/client/chunks/chart-kpi-text-ChVn3S7j.js +149 -0
- package/dist/client/chunks/chart-kpi-text-ChVn3S7j.js.map +1 -0
- package/dist/client/chunks/chart-line-DOIMkP0b.js +431 -0
- package/dist/client/chunks/chart-line-DOIMkP0b.js.map +1 -0
- package/dist/client/chunks/chart-markdown-DXxc43w1.js +3457 -0
- package/dist/client/chunks/chart-markdown-DXxc43w1.js.map +1 -0
- package/dist/client/chunks/chart-measure-profile-C6wrr9il.js +179 -0
- package/dist/client/chunks/chart-measure-profile-C6wrr9il.js.map +1 -0
- package/dist/client/chunks/chart-pie-BU_FgwDc.js +172 -0
- package/dist/client/chunks/chart-pie-BU_FgwDc.js.map +1 -0
- package/dist/client/chunks/chart-radar-DlufwnAX.js +154 -0
- package/dist/client/chunks/chart-radar-DlufwnAX.js.map +1 -0
- package/dist/client/chunks/chart-radial-bar-B5vS_Aw5.js +148 -0
- package/dist/client/chunks/chart-radial-bar-B5vS_Aw5.js.map +1 -0
- package/dist/client/chunks/chart-sankey-FChb26UX.js +222 -0
- package/dist/client/chunks/chart-sankey-FChb26UX.js.map +1 -0
- package/dist/client/chunks/chart-scatter-DW0cAZ2H.js +255 -0
- package/dist/client/chunks/chart-scatter-DW0cAZ2H.js.map +1 -0
- package/dist/client/chunks/chart-sunburst-Clf-6WxW.js +221 -0
- package/dist/client/chunks/chart-sunburst-Clf-6WxW.js.map +1 -0
- package/dist/client/chunks/chart-tree-map-p_VwUJPF.js +298 -0
- package/dist/client/chunks/chart-tree-map-p_VwUJPF.js.map +1 -0
- package/dist/client/chunks/chart-waterfall-jt44IQ-w.js +237 -0
- package/dist/client/chunks/chart-waterfall-jt44IQ-w.js.map +1 -0
- package/dist/client/chunks/charts-core-CUVzf4cV.js +215 -0
- package/dist/client/chunks/charts-core-CUVzf4cV.js.map +1 -0
- package/dist/client/chunks/charts-loader-AGpph8_I.js +259 -0
- package/dist/client/chunks/charts-loader-AGpph8_I.js.map +1 -0
- package/dist/client/chunks/core-D1TOj17W.js +845 -0
- package/dist/client/chunks/core-D1TOj17W.js.map +1 -0
- package/dist/client/chunks/dist-DDBeV_JI.js +847 -0
- package/dist/client/chunks/dist-DDBeV_JI.js.map +1 -0
- package/dist/client/chunks/javascript-BBwTSo6e.js +438 -0
- package/dist/client/chunks/javascript-BBwTSo6e.js.map +1 -0
- package/dist/client/chunks/json-BpTrLZSh.js +38 -0
- package/dist/client/chunks/json-BpTrLZSh.js.map +1 -0
- package/dist/client/chunks/lazyChartConfigRegistry-BjhxDaSf.js +149 -0
- package/dist/client/chunks/lazyChartConfigRegistry-BjhxDaSf.js.map +1 -0
- package/dist/client/chunks/providers-DX3Vw5kc.js +7 -0
- package/dist/client/chunks/providers-DX3Vw5kc.js.map +1 -0
- package/dist/client/chunks/retention-UEXlSdZ-.js +132 -0
- package/dist/client/chunks/retention-UEXlSdZ-.js.map +1 -0
- package/dist/client/chunks/rolldown-runtime-lc2dmIiU.js +20 -0
- package/dist/client/chunks/schema-visualization-ZugB4Io9.js +1073 -0
- package/dist/client/chunks/schema-visualization-ZugB4Io9.js.map +1 -0
- package/dist/client/chunks/sql-B0chxcEK.js +120 -0
- package/dist/client/chunks/sql-B0chxcEK.js.map +1 -0
- package/dist/client/chunks/syntaxHighlighting-87bOwTxj.js +30 -0
- package/dist/client/chunks/syntaxHighlighting-87bOwTxj.js.map +1 -0
- package/dist/client/chunks/useDebounce-BQjNWndQ.js +1394 -0
- package/dist/client/chunks/useDebounce-BQjNWndQ.js.map +1 -0
- package/dist/client/chunks/useDirtyStateTracking-CgKZWkel.js +66 -0
- package/dist/client/chunks/useDirtyStateTracking-CgKZWkel.js.map +1 -0
- package/dist/client/chunks/useExplainAI-c_bHxZe5.js +203 -0
- package/dist/client/chunks/useExplainAI-c_bHxZe5.js.map +1 -0
- package/dist/client/chunks/useNotebookLayout-BFZ_33Kb.js +37 -0
- package/dist/client/chunks/useNotebookLayout-BFZ_33Kb.js.map +1 -0
- package/dist/client/chunks/utils-A54Ny29G.js +128 -0
- package/dist/client/chunks/utils-A54Ny29G.js.map +1 -0
- package/dist/client/chunks/vendor-CoPBRumI.js +828 -0
- package/dist/client/chunks/vendor-CoPBRumI.js.map +1 -0
- package/dist/client/components.js +4 -18
- package/dist/client/hooks.js +6 -58
- package/dist/client/icons.js +2 -15
- package/dist/client/index.js +1061 -1295
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +3 -9
- package/dist/client/styles.css +2 -1
- package/dist/client/types.d.ts +1 -0
- package/dist/client/utils.js +7 -74
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/anthropic-BsNspi1r.js +140 -0
- package/dist/server/anthropic-DsCEX6Fm.cjs +1 -0
- package/dist/server/dist-CMWZC51B.js +581 -0
- package/dist/server/dist-DxegvyZF.cjs +2 -0
- package/dist/server/google-BXwMolCu.js +154 -0
- package/dist/server/google-DzQWXFwF.cjs +2 -0
- package/dist/server/index.cjs +109 -129
- package/dist/server/index.js +15089 -34394
- package/dist/server/openai-BPhmb8mi.js +4114 -0
- package/dist/server/openai-CLsoLaue.cjs +1 -0
- package/dist/server/openai-D1kZ5sdM.js +153 -0
- package/dist/server/openai-DkOKbVLC.cjs +16 -0
- package/package.json +5 -5
- package/dist/adapters/anthropic-BTkjgFpT.cjs +0 -1
- package/dist/adapters/anthropic-CTu9E801.js +0 -126
- package/dist/adapters/google-BAK9pnQf.cjs +0 -2
- package/dist/adapters/google-DficVAsJ.js +0 -146
- package/dist/adapters/handler-BHguLZOY.js +0 -2713
- package/dist/adapters/handler-DOIyiFPg.cjs +0 -39
- package/dist/adapters/index-BgCeQBuN.cjs +0 -2
- package/dist/adapters/index-C3PskWTr.js +0 -5353
- package/dist/adapters/index-C45_meK_.js +0 -719
- package/dist/adapters/index-ht4NPca9.cjs +0 -23
- package/dist/adapters/mcp-transport-CWGqDQSI.cjs +0 -259
- package/dist/adapters/mcp-transport-CyeHMDPl.js +0 -11055
- package/dist/adapters/openai-BvA6eLs8.cjs +0 -1
- package/dist/adapters/openai-mcE24du8.js +0 -131
- package/dist/client/charts.js.map +0 -1
- package/dist/client/chunks/RetentionCombinedChart--SnU4Y_I.js +0 -256
- package/dist/client/chunks/RetentionCombinedChart--SnU4Y_I.js.map +0 -1
- package/dist/client/chunks/RetentionCombinedChart.config-Bbp2ghim.js +0 -48
- package/dist/client/chunks/RetentionCombinedChart.config-Bbp2ghim.js.map +0 -1
- package/dist/client/chunks/RetentionHeatmap-BHYU8MXY.js +0 -178
- package/dist/client/chunks/RetentionHeatmap-BHYU8MXY.js.map +0 -1
- package/dist/client/chunks/RetentionHeatmap.config-BWf_-vdj.js +0 -29
- package/dist/client/chunks/RetentionHeatmap.config-BWf_-vdj.js.map +0 -1
- package/dist/client/chunks/analysis-builder-DMFoAkjT.js +0 -6203
- package/dist/client/chunks/analysis-builder-DMFoAkjT.js.map +0 -1
- package/dist/client/chunks/analysis-builder-shared-CunrT3gi.js +0 -3140
- package/dist/client/chunks/analysis-builder-shared-CunrT3gi.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-DCznpK6N.js +0 -347
- package/dist/client/chunks/chart-activity-grid-DCznpK6N.js.map +0 -1
- package/dist/client/chunks/chart-area-CqKRIUpj.js +0 -234
- package/dist/client/chunks/chart-area-CqKRIUpj.js.map +0 -1
- package/dist/client/chunks/chart-bar-Bl5jvrU_.js +0 -267
- package/dist/client/chunks/chart-bar-Bl5jvrU_.js.map +0 -1
- package/dist/client/chunks/chart-box-plot-CzMb00z_.js +0 -322
- package/dist/client/chunks/chart-box-plot-CzMb00z_.js.map +0 -1
- package/dist/client/chunks/chart-bubble-BF8Z52eW.js +0 -249
- package/dist/client/chunks/chart-bubble-BF8Z52eW.js.map +0 -1
- package/dist/client/chunks/chart-candlestick-ByWS945g.js +0 -269
- package/dist/client/chunks/chart-candlestick-ByWS945g.js.map +0 -1
- package/dist/client/chunks/chart-config-activity-grid-CmOqDuOT.js +0 -50
- package/dist/client/chunks/chart-config-activity-grid-CmOqDuOT.js.map +0 -1
- package/dist/client/chunks/chart-config-area-CK_GVApT.js +0 -77
- package/dist/client/chunks/chart-config-area-CK_GVApT.js.map +0 -1
- package/dist/client/chunks/chart-config-bar-C8uzktxl.js +0 -71
- package/dist/client/chunks/chart-config-bar-C8uzktxl.js.map +0 -1
- package/dist/client/chunks/chart-config-box-plot-D_E_SSc2.js +0 -38
- package/dist/client/chunks/chart-config-box-plot-D_E_SSc2.js.map +0 -1
- package/dist/client/chunks/chart-config-bubble-q3DoQX5F.js +0 -71
- package/dist/client/chunks/chart-config-bubble-q3DoQX5F.js.map +0 -1
- package/dist/client/chunks/chart-config-candlestick-CRCpD43-.js +0 -70
- package/dist/client/chunks/chart-config-candlestick-CRCpD43-.js.map +0 -1
- package/dist/client/chunks/chart-config-data-table-B20Y5JCm.js +0 -28
- package/dist/client/chunks/chart-config-data-table-B20Y5JCm.js.map +0 -1
- package/dist/client/chunks/chart-config-funnel-3eYnGg8M.js +0 -92
- package/dist/client/chunks/chart-config-funnel-3eYnGg8M.js.map +0 -1
- package/dist/client/chunks/chart-config-gauge-CQx9w3d4.js +0 -64
- package/dist/client/chunks/chart-config-gauge-CQx9w3d4.js.map +0 -1
- package/dist/client/chunks/chart-config-heat-map-_wEnTnRA.js +0 -77
- package/dist/client/chunks/chart-config-heat-map-_wEnTnRA.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-delta-DLGZ2A3X.js +0 -97
- package/dist/client/chunks/chart-config-kpi-delta-DLGZ2A3X.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-number-K-wzviXF.js +0 -75
- package/dist/client/chunks/chart-config-kpi-number-K-wzviXF.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-text-BjYqwqaJ.js +0 -47
- package/dist/client/chunks/chart-config-kpi-text-BjYqwqaJ.js.map +0 -1
- package/dist/client/chunks/chart-config-line-JNagi9tf.js +0 -88
- package/dist/client/chunks/chart-config-line-JNagi9tf.js.map +0 -1
- package/dist/client/chunks/chart-config-markdown-BWQSjJpy.js +0 -97
- package/dist/client/chunks/chart-config-markdown-BWQSjJpy.js.map +0 -1
- package/dist/client/chunks/chart-config-measure-profile-ZYaMrtws.js +0 -70
- package/dist/client/chunks/chart-config-measure-profile-ZYaMrtws.js.map +0 -1
- package/dist/client/chunks/chart-config-pie-CNLXb-fr.js +0 -39
- package/dist/client/chunks/chart-config-pie-CNLXb-fr.js.map +0 -1
- package/dist/client/chunks/chart-config-radar-oxHfRAa3.js +0 -44
- package/dist/client/chunks/chart-config-radar-oxHfRAa3.js.map +0 -1
- package/dist/client/chunks/chart-config-radial-bar-_Aw3jAEm.js +0 -37
- package/dist/client/chunks/chart-config-radial-bar-_Aw3jAEm.js.map +0 -1
- package/dist/client/chunks/chart-config-sankey-C8FX9hGF.js +0 -61
- package/dist/client/chunks/chart-config-sankey-C8FX9hGF.js.map +0 -1
- package/dist/client/chunks/chart-config-scatter-DFKM80eO.js +0 -53
- package/dist/client/chunks/chart-config-scatter-DFKM80eO.js.map +0 -1
- package/dist/client/chunks/chart-config-sunburst-BmC0NLTU.js +0 -50
- package/dist/client/chunks/chart-config-sunburst-BmC0NLTU.js.map +0 -1
- package/dist/client/chunks/chart-config-tree-map-DGMbNTaa.js +0 -47
- package/dist/client/chunks/chart-config-tree-map-DGMbNTaa.js.map +0 -1
- package/dist/client/chunks/chart-config-waterfall-DTyXV_fo.js +0 -60
- package/dist/client/chunks/chart-config-waterfall-DTyXV_fo.js.map +0 -1
- package/dist/client/chunks/chart-data-table-HwfF-Ujv.js +0 -293
- package/dist/client/chunks/chart-data-table-HwfF-Ujv.js.map +0 -1
- package/dist/client/chunks/chart-funnel-WmuoWlCq.js +0 -259
- package/dist/client/chunks/chart-funnel-WmuoWlCq.js.map +0 -1
- package/dist/client/chunks/chart-gauge-Cot4By-w.js +0 -374
- package/dist/client/chunks/chart-gauge-Cot4By-w.js.map +0 -1
- package/dist/client/chunks/chart-heat-map-bGNtsZMr.js +0 -231
- package/dist/client/chunks/chart-heat-map-bGNtsZMr.js.map +0 -1
- package/dist/client/chunks/chart-kpi-delta-DeyKMxgq.js +0 -351
- package/dist/client/chunks/chart-kpi-delta-DeyKMxgq.js.map +0 -1
- package/dist/client/chunks/chart-kpi-number-D1z1gxXO.js +0 -476
- package/dist/client/chunks/chart-kpi-number-D1z1gxXO.js.map +0 -1
- package/dist/client/chunks/chart-kpi-text-b7q6KWc0.js +0 -165
- package/dist/client/chunks/chart-kpi-text-b7q6KWc0.js.map +0 -1
- package/dist/client/chunks/chart-line-3Nf-EPqJ.js +0 -450
- package/dist/client/chunks/chart-line-3Nf-EPqJ.js.map +0 -1
- package/dist/client/chunks/chart-markdown-BT_-MBq1.js +0 -2721
- package/dist/client/chunks/chart-markdown-BT_-MBq1.js.map +0 -1
- package/dist/client/chunks/chart-measure-profile-BVjUonqU.js +0 -114
- package/dist/client/chunks/chart-measure-profile-BVjUonqU.js.map +0 -1
- package/dist/client/chunks/chart-pie-DblG6w7g.js +0 -137
- package/dist/client/chunks/chart-pie-DblG6w7g.js.map +0 -1
- package/dist/client/chunks/chart-radar-BHZbeeTg.js +0 -129
- package/dist/client/chunks/chart-radar-BHZbeeTg.js.map +0 -1
- package/dist/client/chunks/chart-radial-bar-AlEJC1Jo.js +0 -119
- package/dist/client/chunks/chart-radial-bar-AlEJC1Jo.js.map +0 -1
- package/dist/client/chunks/chart-sankey-E8vYKjQF.js +0 -189
- package/dist/client/chunks/chart-sankey-E8vYKjQF.js.map +0 -1
- package/dist/client/chunks/chart-scatter-Bbxqi0iw.js +0 -202
- package/dist/client/chunks/chart-scatter-Bbxqi0iw.js.map +0 -1
- package/dist/client/chunks/chart-sunburst-BgnTKolT.js +0 -188
- package/dist/client/chunks/chart-sunburst-BgnTKolT.js.map +0 -1
- package/dist/client/chunks/chart-tree-map-i9LGCLwl.js +0 -284
- package/dist/client/chunks/chart-tree-map-i9LGCLwl.js.map +0 -1
- package/dist/client/chunks/chart-waterfall-BeIhCm83.js +0 -191
- package/dist/client/chunks/chart-waterfall-BeIhCm83.js.map +0 -1
- package/dist/client/chunks/charts-core-BUUO36OM.js +0 -692
- package/dist/client/chunks/charts-core-BUUO36OM.js.map +0 -1
- package/dist/client/chunks/charts-loader-goTYnavu.js +0 -258
- package/dist/client/chunks/charts-loader-goTYnavu.js.map +0 -1
- package/dist/client/chunks/components-BFgYvFq6.js +0 -10066
- package/dist/client/chunks/components-BFgYvFq6.js.map +0 -1
- package/dist/client/chunks/core-Y9e-sNfb.js +0 -1068
- package/dist/client/chunks/core-Y9e-sNfb.js.map +0 -1
- package/dist/client/chunks/flow-utils-CjQZG5qq.js +0 -16
- package/dist/client/chunks/flow-utils-CjQZG5qq.js.map +0 -1
- package/dist/client/chunks/funnel-utils-CyonoNeC.js +0 -135
- package/dist/client/chunks/funnel-utils-CyonoNeC.js.map +0 -1
- package/dist/client/chunks/icons-CwvgmdIP.js +0 -1636
- package/dist/client/chunks/icons-CwvgmdIP.js.map +0 -1
- package/dist/client/chunks/index-CApFCBF9.js +0 -81
- package/dist/client/chunks/index-CApFCBF9.js.map +0 -1
- package/dist/client/chunks/index-_2PSgbkC.js +0 -1046
- package/dist/client/chunks/index-_2PSgbkC.js.map +0 -1
- package/dist/client/chunks/javascript-DII1YQGr.js +0 -659
- package/dist/client/chunks/javascript-DII1YQGr.js.map +0 -1
- package/dist/client/chunks/json-C_6Prymp.js +0 -39
- package/dist/client/chunks/json-C_6Prymp.js.map +0 -1
- package/dist/client/chunks/providers-Ds7DRmnO.js +0 -554
- package/dist/client/chunks/providers-Ds7DRmnO.js.map +0 -1
- package/dist/client/chunks/retention-CzCo8262.js +0 -120
- package/dist/client/chunks/retention-CzCo8262.js.map +0 -1
- package/dist/client/chunks/schema-visualization-B97a1Ybu.js +0 -772
- package/dist/client/chunks/schema-visualization-B97a1Ybu.js.map +0 -1
- package/dist/client/chunks/sql-IeKX8fQ8.js +0 -616
- package/dist/client/chunks/sql-IeKX8fQ8.js.map +0 -1
- package/dist/client/chunks/syntaxHighlighting-DAMSW_A6.js +0 -34
- package/dist/client/chunks/syntaxHighlighting-DAMSW_A6.js.map +0 -1
- package/dist/client/chunks/theme-Dp3hFed1.js +0 -112
- package/dist/client/chunks/theme-Dp3hFed1.js.map +0 -1
- package/dist/client/chunks/useDirtyStateTracking-CyAXd07d.js +0 -1231
- package/dist/client/chunks/useDirtyStateTracking-CyAXd07d.js.map +0 -1
- package/dist/client/chunks/useExplainAI-CfQ_JmF1.js +0 -182
- package/dist/client/chunks/useExplainAI-CfQ_JmF1.js.map +0 -1
- package/dist/client/chunks/vendor-B2EH3V58.js +0 -2892
- package/dist/client/chunks/vendor-B2EH3V58.js.map +0 -1
- package/dist/client/components.js.map +0 -1
- package/dist/client/hooks.js.map +0 -1
- package/dist/client/icons.js.map +0 -1
- package/dist/client/providers.js.map +0 -1
- package/dist/client/utils.js.map +0 -1
- package/dist/server/anthropic-BTkjgFpT.cjs +0 -1
- package/dist/server/anthropic-CTu9E801.js +0 -126
- package/dist/server/google-BAK9pnQf.cjs +0 -2
- package/dist/server/google-DficVAsJ.js +0 -146
- package/dist/server/index-BgCeQBuN.cjs +0 -2
- package/dist/server/index-C3PskWTr.js +0 -5353
- package/dist/server/index-C45_meK_.js +0 -719
- package/dist/server/index-ht4NPca9.cjs +0 -23
- package/dist/server/openai-BvA6eLs8.cjs +0 -1
- package/dist/server/openai-mcE24du8.js +0 -131
|
@@ -0,0 +1,847 @@
|
|
|
1
|
+
//#region node_modules/modern-screenshot/dist/index.mjs
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
return e[13] = 1, e[14] = t >> 8, e[15] = t & 255, e[16] = t >> 8, e[17] = t & 255, e;
|
|
4
|
+
}
|
|
5
|
+
var t = 112, n = 72, r = 89, i = 115, a;
|
|
6
|
+
function o() {
|
|
7
|
+
let e = new Int32Array(256);
|
|
8
|
+
for (let t = 0; t < 256; t++) {
|
|
9
|
+
let n = t;
|
|
10
|
+
for (let e = 0; e < 8; e++) n = n & 1 ? 3988292384 ^ n >>> 1 : n >>> 1;
|
|
11
|
+
e[t] = n;
|
|
12
|
+
}
|
|
13
|
+
return e;
|
|
14
|
+
}
|
|
15
|
+
function s(e) {
|
|
16
|
+
let t = -1;
|
|
17
|
+
a ||= o();
|
|
18
|
+
for (let n = 0; n < e.length; n++) t = a[(t ^ e[n]) & 255] ^ t >>> 8;
|
|
19
|
+
return t ^ -1;
|
|
20
|
+
}
|
|
21
|
+
function c(e) {
|
|
22
|
+
let a = e.length - 1;
|
|
23
|
+
for (let o = a; o >= 4; o--) if (e[o - 4] === 9 && e[o - 3] === t && e[o - 2] === n && e[o - 1] === r && e[o] === i) return o - 3;
|
|
24
|
+
return 0;
|
|
25
|
+
}
|
|
26
|
+
function l(e, a, o = !1) {
|
|
27
|
+
let l = new Uint8Array(13);
|
|
28
|
+
a *= 39.3701, l[0] = t, l[1] = n, l[2] = r, l[3] = i, l[4] = a >>> 24, l[5] = a >>> 16, l[6] = a >>> 8, l[7] = a & 255, l[8] = l[4], l[9] = l[5], l[10] = l[6], l[11] = l[7], l[12] = 1;
|
|
29
|
+
let u = s(l), d = new Uint8Array(4);
|
|
30
|
+
if (d[0] = u >>> 24, d[1] = u >>> 16, d[2] = u >>> 8, d[3] = u & 255, o) {
|
|
31
|
+
let t = c(e);
|
|
32
|
+
return e.set(l, t), e.set(d, t + 13), e;
|
|
33
|
+
} else {
|
|
34
|
+
let t = new Uint8Array(4);
|
|
35
|
+
t[0] = 0, t[1] = 0, t[2] = 0, t[3] = 9;
|
|
36
|
+
let n = new Uint8Array(54);
|
|
37
|
+
return n.set(e, 0), n.set(t, 33), n.set(l, 37), n.set(d, 50), n;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
var u = "AAlwSFlz", d = "AAAJcEhZ", f = "AAAACXBI";
|
|
41
|
+
function p(e) {
|
|
42
|
+
let t = e.indexOf(u);
|
|
43
|
+
return t === -1 && (t = e.indexOf(d)), t === -1 && (t = e.indexOf(f)), t;
|
|
44
|
+
}
|
|
45
|
+
var m = "[modern-screenshot]", h = typeof window < "u", g = h && "Worker" in window, _ = h && "atob" in window, v = h && "btoa" in window, y = h ? window.navigator?.userAgent : "", b = y.includes("Chrome"), x = y.includes("AppleWebKit") && !b, S = y.includes("Firefox"), ee = (e) => e && "__CONTEXT__" in e, te = (e) => e.constructor.name === "CSSFontFaceRule", ne = (e) => e.constructor.name === "CSSImportRule", re = (e) => e.constructor.name === "CSSLayerBlockRule", C = (e) => e.nodeType === 1, w = (e) => typeof e.className == "object", T = (e) => e.tagName === "image", ie = (e) => e.tagName === "use", E = (e) => C(e) && e.style !== void 0 && !w(e), ae = (e) => e.nodeType === 8, oe = (e) => e.nodeType === 3, D = (e) => e.tagName === "IMG", O = (e) => e.tagName === "VIDEO", se = (e) => e.tagName === "CANVAS", ce = (e) => e.tagName === "TEXTAREA", le = (e) => e.tagName === "INPUT", ue = (e) => e.tagName === "STYLE", de = (e) => e.tagName === "SCRIPT", fe = (e) => e.tagName === "SELECT", pe = (e) => e.tagName === "SLOT", me = (e) => e.tagName === "IFRAME", he = (...e) => console.warn(m, ...e);
|
|
46
|
+
function ge(e) {
|
|
47
|
+
let t = e?.createElement?.("canvas");
|
|
48
|
+
return t && (t.height = t.width = 1), !!t && "toDataURL" in t && !!t.toDataURL("image/webp").includes("image/webp");
|
|
49
|
+
}
|
|
50
|
+
var k = (e) => e.startsWith("data:");
|
|
51
|
+
function A(e, t) {
|
|
52
|
+
if (e.match(/^[a-z]+:\/\//i)) return e;
|
|
53
|
+
if (h && e.match(/^\/\//)) return window.location.protocol + e;
|
|
54
|
+
if (e.match(/^[a-z]+:/i) || !h) return e;
|
|
55
|
+
let n = j().implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
|
|
56
|
+
return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
|
|
57
|
+
}
|
|
58
|
+
function j(e) {
|
|
59
|
+
return (e && C(e) ? e?.ownerDocument : e) ?? window.document;
|
|
60
|
+
}
|
|
61
|
+
var M = "http://www.w3.org/2000/svg";
|
|
62
|
+
function N(e, t, n) {
|
|
63
|
+
let r = j(n).createElementNS(M, "svg");
|
|
64
|
+
return r.setAttributeNS(null, "width", e.toString()), r.setAttributeNS(null, "height", t.toString()), r.setAttributeNS(null, "viewBox", `0 0 ${e} ${t}`), r;
|
|
65
|
+
}
|
|
66
|
+
function P(e, t) {
|
|
67
|
+
let n = new XMLSerializer().serializeToString(e);
|
|
68
|
+
return t && (n = n.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu, "")), `data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`;
|
|
69
|
+
}
|
|
70
|
+
async function _e(e, t = "image/png", n = 1) {
|
|
71
|
+
try {
|
|
72
|
+
return await new Promise((r, i) => {
|
|
73
|
+
e.toBlob((e) => {
|
|
74
|
+
e ? r(e) : i(/* @__PURE__ */ Error("Blob is null"));
|
|
75
|
+
}, t, n);
|
|
76
|
+
});
|
|
77
|
+
} catch (r) {
|
|
78
|
+
if (_) return ve(e.toDataURL(t, n));
|
|
79
|
+
throw r;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function ve(e) {
|
|
83
|
+
let [t, n] = e.split(","), r = t.match(/data:(.+);/)?.[1] ?? void 0, i = window.atob(n), a = i.length, o = new Uint8Array(a);
|
|
84
|
+
for (let e = 0; e < a; e += 1) o[e] = i.charCodeAt(e);
|
|
85
|
+
return new Blob([o], { type: r });
|
|
86
|
+
}
|
|
87
|
+
function F(e, t) {
|
|
88
|
+
return new Promise((n, r) => {
|
|
89
|
+
let i = new FileReader();
|
|
90
|
+
i.onload = () => n(i.result), i.onerror = () => r(i.error), i.onabort = () => r(/* @__PURE__ */ Error(`Failed read blob to ${t}`)), t === "dataUrl" ? i.readAsDataURL(e) : t === "arrayBuffer" && i.readAsArrayBuffer(e);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
var ye = (e) => F(e, "dataUrl"), be = (e) => F(e, "arrayBuffer");
|
|
94
|
+
function I(e, t) {
|
|
95
|
+
let n = j(t).createElement("img");
|
|
96
|
+
return n.decoding = "sync", n.loading = "eager", n.src = e, n;
|
|
97
|
+
}
|
|
98
|
+
function L(e, t) {
|
|
99
|
+
return new Promise((n) => {
|
|
100
|
+
let { timeout: r, ownerDocument: i, onError: a, onWarn: o } = t ?? {}, s = typeof e == "string" ? I(e, j(i)) : e, c = null, l = null;
|
|
101
|
+
function u() {
|
|
102
|
+
n(s), c && clearTimeout(c), l?.();
|
|
103
|
+
}
|
|
104
|
+
if (r && (c = setTimeout(u, r)), O(s)) {
|
|
105
|
+
let e = s.currentSrc || s.src;
|
|
106
|
+
if (!e) return s.poster ? L(s.poster, t).then(n) : u();
|
|
107
|
+
if (s.readyState >= 2) return u();
|
|
108
|
+
let r = u, i = (t) => {
|
|
109
|
+
o?.("Failed video load", e, t), a?.(t), u();
|
|
110
|
+
};
|
|
111
|
+
l = () => {
|
|
112
|
+
s.removeEventListener("loadeddata", r), s.removeEventListener("error", i);
|
|
113
|
+
}, s.addEventListener("loadeddata", r, { once: !0 }), s.addEventListener("error", i, { once: !0 });
|
|
114
|
+
} else {
|
|
115
|
+
let e = T(s) ? s.href.baseVal : s.currentSrc || s.src;
|
|
116
|
+
if (!e) return u();
|
|
117
|
+
let t = async () => {
|
|
118
|
+
if (D(s) && "decode" in s) try {
|
|
119
|
+
await s.decode();
|
|
120
|
+
} catch (t) {
|
|
121
|
+
o?.("Failed to decode image, trying to render anyway", s.dataset.originalSrc || e, t);
|
|
122
|
+
}
|
|
123
|
+
u();
|
|
124
|
+
}, n = (t) => {
|
|
125
|
+
o?.("Failed image load", s.dataset.originalSrc || e, t), u();
|
|
126
|
+
};
|
|
127
|
+
if (D(s) && s.complete) return t();
|
|
128
|
+
l = () => {
|
|
129
|
+
s.removeEventListener("load", t), s.removeEventListener("error", n);
|
|
130
|
+
}, s.addEventListener("load", t, { once: !0 }), s.addEventListener("error", n, { once: !0 });
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
async function R(e, t) {
|
|
135
|
+
E(e) && (D(e) || O(e) ? await L(e, t) : await Promise.all(["img", "video"].flatMap((n) => Array.from(e.querySelectorAll(n)).map((e) => L(e, t)))));
|
|
136
|
+
}
|
|
137
|
+
var z = /* @__PURE__ */ function() {
|
|
138
|
+
let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
|
|
139
|
+
return () => (e += 1, `u${t()}${e}`);
|
|
140
|
+
}();
|
|
141
|
+
function B(e) {
|
|
142
|
+
return e?.split(",").map((e) => e.trim().replace(/"|'/g, "").toLowerCase()).filter(Boolean);
|
|
143
|
+
}
|
|
144
|
+
var V = 0;
|
|
145
|
+
function xe(e) {
|
|
146
|
+
let t = `${m}[#${V}]`;
|
|
147
|
+
return V++, {
|
|
148
|
+
time: (n) => e && console.time(`${t} ${n}`),
|
|
149
|
+
timeEnd: (n) => e && console.timeEnd(`${t} ${n}`),
|
|
150
|
+
warn: (...t) => e && he(...t)
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function Se(e) {
|
|
154
|
+
return { cache: e ? "no-cache" : "force-cache" };
|
|
155
|
+
}
|
|
156
|
+
async function H(e, t) {
|
|
157
|
+
return ee(e) ? e : U(e, {
|
|
158
|
+
...t,
|
|
159
|
+
autoDestruct: !0
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
async function U(e, t) {
|
|
163
|
+
let { scale: n = 1, workerUrl: r, workerNumber: i = 1 } = t || {}, a = !!t?.debug, o = t?.features ?? !0, s = e.ownerDocument ?? (h ? window.document : void 0), c = e.ownerDocument?.defaultView ?? (h ? window : void 0), l = /* @__PURE__ */ new Map(), u = {
|
|
164
|
+
width: 0,
|
|
165
|
+
height: 0,
|
|
166
|
+
quality: 1,
|
|
167
|
+
type: "image/png",
|
|
168
|
+
scale: n,
|
|
169
|
+
backgroundColor: null,
|
|
170
|
+
style: null,
|
|
171
|
+
filter: null,
|
|
172
|
+
maximumCanvasSize: 0,
|
|
173
|
+
timeout: 3e4,
|
|
174
|
+
progress: null,
|
|
175
|
+
debug: a,
|
|
176
|
+
fetch: {
|
|
177
|
+
requestInit: Se(t?.fetch?.bypassingCache),
|
|
178
|
+
placeholderImage: "data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
|
179
|
+
bypassingCache: !1,
|
|
180
|
+
...t?.fetch
|
|
181
|
+
},
|
|
182
|
+
fetchFn: null,
|
|
183
|
+
font: {},
|
|
184
|
+
drawImageInterval: 100,
|
|
185
|
+
workerUrl: null,
|
|
186
|
+
workerNumber: i,
|
|
187
|
+
onCloneEachNode: null,
|
|
188
|
+
onCloneNode: null,
|
|
189
|
+
onEmbedNode: null,
|
|
190
|
+
onCreateForeignObjectSvg: null,
|
|
191
|
+
includeStyleProperties: null,
|
|
192
|
+
autoDestruct: !1,
|
|
193
|
+
...t,
|
|
194
|
+
__CONTEXT__: !0,
|
|
195
|
+
log: xe(a),
|
|
196
|
+
node: e,
|
|
197
|
+
ownerDocument: s,
|
|
198
|
+
ownerWindow: c,
|
|
199
|
+
dpi: n === 1 ? null : 96 * n,
|
|
200
|
+
svgStyleElement: W(s),
|
|
201
|
+
svgDefsElement: s?.createElementNS(M, "defs"),
|
|
202
|
+
svgStyles: /* @__PURE__ */ new Map(),
|
|
203
|
+
defaultComputedStyles: /* @__PURE__ */ new Map(),
|
|
204
|
+
workers: [...Array.from({ length: g && r && i ? i : 0 })].map(() => {
|
|
205
|
+
try {
|
|
206
|
+
let e = new Worker(r);
|
|
207
|
+
return e.onmessage = async (e) => {
|
|
208
|
+
let { url: t, result: n } = e.data;
|
|
209
|
+
n ? l.get(t)?.resolve?.(n) : l.get(t)?.reject?.(/* @__PURE__ */ Error(`Error receiving message from worker: ${t}`));
|
|
210
|
+
}, e.onmessageerror = (e) => {
|
|
211
|
+
let { url: t } = e.data;
|
|
212
|
+
l.get(t)?.reject?.(/* @__PURE__ */ Error(`Error receiving message from worker: ${t}`));
|
|
213
|
+
}, e;
|
|
214
|
+
} catch (e) {
|
|
215
|
+
return u.log.warn("Failed to new Worker", e), null;
|
|
216
|
+
}
|
|
217
|
+
}).filter(Boolean),
|
|
218
|
+
fontFamilies: /* @__PURE__ */ new Map(),
|
|
219
|
+
fontCssTexts: /* @__PURE__ */ new Map(),
|
|
220
|
+
acceptOfImage: `${[
|
|
221
|
+
ge(s) && "image/webp",
|
|
222
|
+
"image/svg+xml",
|
|
223
|
+
"image/*",
|
|
224
|
+
"*/*"
|
|
225
|
+
].filter(Boolean).join(",")};q=0.8`,
|
|
226
|
+
requests: l,
|
|
227
|
+
drawImageCount: 0,
|
|
228
|
+
tasks: [],
|
|
229
|
+
features: o,
|
|
230
|
+
isEnable: (e) => e === "restoreScrollPosition" ? typeof o == "boolean" ? !1 : o[e] ?? !1 : typeof o == "boolean" ? o : o[e] ?? !0,
|
|
231
|
+
shadowRoots: []
|
|
232
|
+
};
|
|
233
|
+
u.log.time("wait until load"), await R(e, {
|
|
234
|
+
timeout: u.timeout,
|
|
235
|
+
onWarn: u.log.warn
|
|
236
|
+
}), u.log.timeEnd("wait until load");
|
|
237
|
+
let { width: d, height: f } = Ce(e, u);
|
|
238
|
+
return u.width = d, u.height = f, u;
|
|
239
|
+
}
|
|
240
|
+
function W(e) {
|
|
241
|
+
if (!e) return;
|
|
242
|
+
let t = e.createElement("style"), n = t.ownerDocument.createTextNode("\n.______background-clip--text {\n background-clip: text;\n -webkit-background-clip: text;\n}\n");
|
|
243
|
+
return t.appendChild(n), t;
|
|
244
|
+
}
|
|
245
|
+
function Ce(e, t) {
|
|
246
|
+
let { width: n, height: r } = t;
|
|
247
|
+
if (C(e) && (!n || !r)) {
|
|
248
|
+
let t = e.getBoundingClientRect();
|
|
249
|
+
n = n || t.width || Number(e.getAttribute("width")) || 0, r = r || t.height || Number(e.getAttribute("height")) || 0;
|
|
250
|
+
}
|
|
251
|
+
return {
|
|
252
|
+
width: n,
|
|
253
|
+
height: r
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
async function we(e, t) {
|
|
257
|
+
let { log: n, timeout: r, drawImageCount: i, drawImageInterval: a } = t;
|
|
258
|
+
n.time("image to canvas");
|
|
259
|
+
let o = await L(e, {
|
|
260
|
+
timeout: r,
|
|
261
|
+
onWarn: t.log.warn
|
|
262
|
+
}), { canvas: s, context2d: c } = Te(e.ownerDocument, t), l = () => {
|
|
263
|
+
try {
|
|
264
|
+
c?.drawImage(o, 0, 0, s.width, s.height);
|
|
265
|
+
} catch (e) {
|
|
266
|
+
t.log.warn("Failed to drawImage", e);
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
if (l(), t.isEnable("fixSvgXmlDecode")) for (let e = 0; e < i; e++) await new Promise((t) => {
|
|
270
|
+
setTimeout(() => {
|
|
271
|
+
c?.clearRect(0, 0, s.width, s.height), l(), t();
|
|
272
|
+
}, e + a);
|
|
273
|
+
});
|
|
274
|
+
return t.drawImageCount = 0, n.timeEnd("image to canvas"), s;
|
|
275
|
+
}
|
|
276
|
+
function Te(e, t) {
|
|
277
|
+
let { width: n, height: r, scale: i, backgroundColor: a, maximumCanvasSize: o } = t, s = e.createElement("canvas");
|
|
278
|
+
s.width = Math.floor(n * i), s.height = Math.floor(r * i), s.style.width = `${n}px`, s.style.height = `${r}px`, o && (s.width > o || s.height > o) && (s.width > o && s.height > o ? s.width > s.height ? (s.height *= o / s.width, s.width = o) : (s.width *= o / s.height, s.height = o) : s.width > o ? (s.height *= o / s.width, s.width = o) : (s.width *= o / s.height, s.height = o));
|
|
279
|
+
let c = s.getContext("2d");
|
|
280
|
+
return c && a && (c.fillStyle = a, c.fillRect(0, 0, s.width, s.height)), {
|
|
281
|
+
canvas: s,
|
|
282
|
+
context2d: c
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
function G(e, t) {
|
|
286
|
+
if (e.ownerDocument) try {
|
|
287
|
+
let t = e.toDataURL();
|
|
288
|
+
if (t !== "data:,") return I(t, e.ownerDocument);
|
|
289
|
+
} catch (e) {
|
|
290
|
+
t.log.warn("Failed to clone canvas", e);
|
|
291
|
+
}
|
|
292
|
+
let n = e.cloneNode(!1), r = e.getContext("2d"), i = n.getContext("2d");
|
|
293
|
+
try {
|
|
294
|
+
return r && i && i.putImageData(r.getImageData(0, 0, e.width, e.height), 0, 0), n;
|
|
295
|
+
} catch (e) {
|
|
296
|
+
t.log.warn("Failed to clone canvas", e);
|
|
297
|
+
}
|
|
298
|
+
return n;
|
|
299
|
+
}
|
|
300
|
+
function Ee(e, t) {
|
|
301
|
+
try {
|
|
302
|
+
if (e?.contentDocument?.body) return q(e.contentDocument.body, t);
|
|
303
|
+
} catch (e) {
|
|
304
|
+
t.log.warn("Failed to clone iframe", e);
|
|
305
|
+
}
|
|
306
|
+
return e.cloneNode(!1);
|
|
307
|
+
}
|
|
308
|
+
function De(e) {
|
|
309
|
+
let t = e.cloneNode(!1);
|
|
310
|
+
return e.currentSrc && e.currentSrc !== e.src && (t.src = e.currentSrc, t.srcset = ""), t.loading === "lazy" && (t.loading = "eager"), t;
|
|
311
|
+
}
|
|
312
|
+
async function Oe(e, t) {
|
|
313
|
+
if (e.ownerDocument && !e.currentSrc && e.poster) return I(e.poster, e.ownerDocument);
|
|
314
|
+
let n = e.cloneNode(!1);
|
|
315
|
+
n.crossOrigin = "anonymous", e.currentSrc && e.currentSrc !== e.src && (n.src = e.currentSrc);
|
|
316
|
+
let r = n.ownerDocument;
|
|
317
|
+
if (r) {
|
|
318
|
+
let i = !0;
|
|
319
|
+
if (await L(n, {
|
|
320
|
+
onError: () => i = !1,
|
|
321
|
+
onWarn: t.log.warn
|
|
322
|
+
}), !i) return e.poster ? I(e.poster, e.ownerDocument) : n;
|
|
323
|
+
n.currentTime = e.currentTime, await new Promise((e) => {
|
|
324
|
+
n.addEventListener("seeked", e, { once: !0 });
|
|
325
|
+
});
|
|
326
|
+
let a = r.createElement("canvas");
|
|
327
|
+
a.width = e.offsetWidth, a.height = e.offsetHeight;
|
|
328
|
+
try {
|
|
329
|
+
let e = a.getContext("2d");
|
|
330
|
+
e && e.drawImage(n, 0, 0, a.width, a.height);
|
|
331
|
+
} catch (r) {
|
|
332
|
+
return t.log.warn("Failed to clone video", r), e.poster ? I(e.poster, e.ownerDocument) : n;
|
|
333
|
+
}
|
|
334
|
+
return G(a, t);
|
|
335
|
+
}
|
|
336
|
+
return n;
|
|
337
|
+
}
|
|
338
|
+
function ke(e, t) {
|
|
339
|
+
return se(e) ? G(e, t) : me(e) ? Ee(e, t) : D(e) ? De(e) : O(e) ? Oe(e, t) : e.cloneNode(!1);
|
|
340
|
+
}
|
|
341
|
+
function Ae(e) {
|
|
342
|
+
let t = e.sandbox;
|
|
343
|
+
if (!t) {
|
|
344
|
+
let { ownerDocument: n } = e;
|
|
345
|
+
try {
|
|
346
|
+
n && (t = n.createElement("iframe"), t.id = `__SANDBOX__${z()}`, t.width = "0", t.height = "0", t.style.visibility = "hidden", t.style.position = "fixed", n.body.appendChild(t), t.srcdoc = "<!DOCTYPE html><meta charset=\"UTF-8\"><title></title><body>", e.sandbox = t);
|
|
347
|
+
} catch (t) {
|
|
348
|
+
e.log.warn("Failed to getSandBox", t);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return t;
|
|
352
|
+
}
|
|
353
|
+
var je = [
|
|
354
|
+
"width",
|
|
355
|
+
"height",
|
|
356
|
+
"-webkit-text-fill-color"
|
|
357
|
+
], Me = ["stroke", "fill"];
|
|
358
|
+
function K(e, t, n) {
|
|
359
|
+
let { defaultComputedStyles: r } = n, i = e.nodeName.toLowerCase(), a = w(e) && i !== "svg", o = a ? Me.map((t) => [t, e.getAttribute(t)]).filter(([, e]) => e !== null) : [], s = [
|
|
360
|
+
a && "svg",
|
|
361
|
+
i,
|
|
362
|
+
o.map((e, t) => `${e}=${t}`).join(","),
|
|
363
|
+
t
|
|
364
|
+
].filter(Boolean).join(":");
|
|
365
|
+
if (r.has(s)) return r.get(s);
|
|
366
|
+
let c = Ae(n)?.contentWindow;
|
|
367
|
+
if (!c) return /* @__PURE__ */ new Map();
|
|
368
|
+
let l = c?.document, u, d;
|
|
369
|
+
a ? (u = l.createElementNS(M, "svg"), d = u.ownerDocument.createElementNS(u.namespaceURI, i), o.forEach(([e, t]) => {
|
|
370
|
+
d.setAttributeNS(null, e, t);
|
|
371
|
+
}), u.appendChild(d)) : u = d = l.createElement(i), d.textContent = " ", l.body.appendChild(u);
|
|
372
|
+
let f = c.getComputedStyle(d, t), p = /* @__PURE__ */ new Map();
|
|
373
|
+
for (let e = f.length, t = 0; t < e; t++) {
|
|
374
|
+
let e = f.item(t);
|
|
375
|
+
je.includes(e) || p.set(e, f.getPropertyValue(e));
|
|
376
|
+
}
|
|
377
|
+
return l.body.removeChild(u), r.set(s, p), p;
|
|
378
|
+
}
|
|
379
|
+
function Ne(e, t, n) {
|
|
380
|
+
let r = /* @__PURE__ */ new Map(), i = [], a = /* @__PURE__ */ new Map();
|
|
381
|
+
if (n) for (let e of n) o(e);
|
|
382
|
+
else for (let t = e.length, n = 0; n < t; n++) o(e.item(n));
|
|
383
|
+
for (let e = i.length, t = 0; t < e; t++) a.get(i[t])?.forEach((e, t) => r.set(t, e));
|
|
384
|
+
function o(n) {
|
|
385
|
+
let o = e.getPropertyValue(n), s = e.getPropertyPriority(n), c = n.lastIndexOf("-"), l = c > -1 ? n.substring(0, c) : void 0;
|
|
386
|
+
if (l) {
|
|
387
|
+
let e = a.get(l);
|
|
388
|
+
e || (e = /* @__PURE__ */ new Map(), a.set(l, e)), e.set(n, [o, s]);
|
|
389
|
+
}
|
|
390
|
+
t.get(n) === o && !s || (l ? i.push(l) : r.set(n, [o, s]));
|
|
391
|
+
}
|
|
392
|
+
return r;
|
|
393
|
+
}
|
|
394
|
+
function Pe(e, t, n, r) {
|
|
395
|
+
let { ownerWindow: i, includeStyleProperties: a, currentParentNodeStyle: o } = r, s = t.style, c = i.getComputedStyle(e), l = K(e, null, r);
|
|
396
|
+
o?.forEach((e, t) => {
|
|
397
|
+
l.delete(t);
|
|
398
|
+
});
|
|
399
|
+
let u = Ne(c, l, a);
|
|
400
|
+
u.delete("transition-property"), u.delete("all"), u.delete("d"), u.delete("content"), n && (u.delete("margin-top"), u.delete("margin-right"), u.delete("margin-bottom"), u.delete("margin-left"), u.delete("margin-block-start"), u.delete("margin-block-end"), u.delete("margin-inline-start"), u.delete("margin-inline-end"), u.set("box-sizing", ["border-box", ""])), u.get("background-clip")?.[0] === "text" && t.classList.add("______background-clip--text"), b && (u.has("font-kerning") || u.set("font-kerning", ["normal", ""]), (u.get("overflow-x")?.[0] === "hidden" || u.get("overflow-y")?.[0] === "hidden") && u.get("text-overflow")?.[0] === "ellipsis" && e.scrollWidth === e.clientWidth && u.set("text-overflow", ["clip", ""]));
|
|
401
|
+
for (let e = s.length, t = 0; t < e; t++) s.removeProperty(s.item(t));
|
|
402
|
+
return u.forEach(([e, t], n) => {
|
|
403
|
+
s.setProperty(n, e, t);
|
|
404
|
+
}), u;
|
|
405
|
+
}
|
|
406
|
+
function Fe(e, t) {
|
|
407
|
+
(ce(e) || le(e) || fe(e)) && t.setAttribute("value", e.value);
|
|
408
|
+
}
|
|
409
|
+
var Ie = ["::before", "::after"], Le = [
|
|
410
|
+
"::-webkit-scrollbar",
|
|
411
|
+
"::-webkit-scrollbar-button",
|
|
412
|
+
"::-webkit-scrollbar-thumb",
|
|
413
|
+
"::-webkit-scrollbar-track",
|
|
414
|
+
"::-webkit-scrollbar-track-piece",
|
|
415
|
+
"::-webkit-scrollbar-corner",
|
|
416
|
+
"::-webkit-resizer"
|
|
417
|
+
];
|
|
418
|
+
function Re(e, t, n, r, i) {
|
|
419
|
+
let { ownerWindow: a, svgStyleElement: o, svgStyles: s, currentNodeStyle: c } = r;
|
|
420
|
+
if (!o || !a) return;
|
|
421
|
+
function l(n) {
|
|
422
|
+
let o = a.getComputedStyle(e, n), l = o.getPropertyValue("content");
|
|
423
|
+
if (!l || l === "none") return;
|
|
424
|
+
i?.(l), l = l.replace(/(')|(")|(counter\(.+\))/g, "");
|
|
425
|
+
let u = [z()], d = K(e, n, r);
|
|
426
|
+
c?.forEach((e, t) => {
|
|
427
|
+
d.delete(t);
|
|
428
|
+
});
|
|
429
|
+
let f = Ne(o, d, r.includeStyleProperties);
|
|
430
|
+
f.delete("content"), f.delete("-webkit-locale"), f.get("background-clip")?.[0] === "text" && t.classList.add("______background-clip--text");
|
|
431
|
+
let p = [`content: '${l}';`];
|
|
432
|
+
if (f.forEach(([e, t], n) => {
|
|
433
|
+
p.push(`${n}: ${e}${t ? " !important" : ""};`);
|
|
434
|
+
}), p.length === 1) return;
|
|
435
|
+
try {
|
|
436
|
+
t.className = [t.className, ...u].join(" ");
|
|
437
|
+
} catch (e) {
|
|
438
|
+
r.log.warn("Failed to copyPseudoClass", e);
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
let m = p.join("\n "), h = s.get(m);
|
|
442
|
+
h || (h = [], s.set(m, h)), h.push(`.${u[0]}${n}`);
|
|
443
|
+
}
|
|
444
|
+
Ie.forEach(l), n && Le.forEach(l);
|
|
445
|
+
}
|
|
446
|
+
var ze = /* @__PURE__ */ new Set(["symbol"]);
|
|
447
|
+
async function Be(e, t, n, r, i) {
|
|
448
|
+
if (C(n) && (ue(n) || de(n)) || r.filter && !r.filter(n)) return;
|
|
449
|
+
ze.has(t.nodeName) || ze.has(n.nodeName) ? r.currentParentNodeStyle = void 0 : r.currentParentNodeStyle = r.currentNodeStyle;
|
|
450
|
+
let a = await q(n, r, !1, i);
|
|
451
|
+
r.isEnable("restoreScrollPosition") && He(e, a), t.appendChild(a);
|
|
452
|
+
}
|
|
453
|
+
async function Ve(e, t, n, r) {
|
|
454
|
+
let i = e.firstChild;
|
|
455
|
+
C(e) && e.shadowRoot && (i = e.shadowRoot?.firstChild, n.shadowRoots.push(e.shadowRoot));
|
|
456
|
+
for (let a = i; a; a = a.nextSibling) if (!ae(a)) if (C(a) && pe(a) && typeof a.assignedNodes == "function") {
|
|
457
|
+
let i = a.assignedNodes();
|
|
458
|
+
for (let a = 0; a < i.length; a++) await Be(e, t, i[a], n, r);
|
|
459
|
+
} else await Be(e, t, a, n, r);
|
|
460
|
+
}
|
|
461
|
+
function He(e, t) {
|
|
462
|
+
if (!E(e) || !E(t)) return;
|
|
463
|
+
let { scrollTop: n, scrollLeft: r } = e;
|
|
464
|
+
if (!n && !r) return;
|
|
465
|
+
let { transform: i } = t.style, a = new DOMMatrix(i), { a: o, b: s, c, d: l } = a;
|
|
466
|
+
a.a = 1, a.b = 0, a.c = 0, a.d = 1, a.translateSelf(-r, -n), a.a = o, a.b = s, a.c = c, a.d = l, t.style.transform = a.toString();
|
|
467
|
+
}
|
|
468
|
+
function Ue(e, t) {
|
|
469
|
+
let { backgroundColor: n, width: r, height: i, style: a } = t, o = e.style;
|
|
470
|
+
if (n && o.setProperty("background-color", n, "important"), r && o.setProperty("width", `${r}px`, "important"), i && o.setProperty("height", `${i}px`, "important"), a) for (let e in a) o[e] = a[e];
|
|
471
|
+
}
|
|
472
|
+
var We = /^[\w-:]+$/;
|
|
473
|
+
async function q(e, t, n = !1, r) {
|
|
474
|
+
let { ownerDocument: i, ownerWindow: a, fontFamilies: o, onCloneEachNode: s } = t;
|
|
475
|
+
if (i && oe(e)) return r && /\S/.test(e.data) && r(e.data), i.createTextNode(e.data);
|
|
476
|
+
if (i && a && C(e) && (E(e) || w(e))) {
|
|
477
|
+
let r = await ke(e, t);
|
|
478
|
+
if (t.isEnable("removeAbnormalAttributes")) {
|
|
479
|
+
let e = r.getAttributeNames();
|
|
480
|
+
for (let t = e.length, n = 0; n < t; n++) {
|
|
481
|
+
let t = e[n];
|
|
482
|
+
We.test(t) || r.removeAttribute(t);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
let i = t.currentNodeStyle = Pe(e, r, n, t);
|
|
486
|
+
n && Ue(r, t);
|
|
487
|
+
let a = !1;
|
|
488
|
+
if (t.isEnable("copyScrollbar")) {
|
|
489
|
+
let t = [i.get("overflow-x")?.[0], i.get("overflow-y")?.[0]];
|
|
490
|
+
a = t.includes("scroll") || (t.includes("auto") || t.includes("overlay")) && (e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth);
|
|
491
|
+
}
|
|
492
|
+
let c = i.get("text-transform")?.[0], l = B(i.get("font-family")?.[0]), u = l ? (e) => {
|
|
493
|
+
c === "uppercase" ? e = e.toUpperCase() : c === "lowercase" ? e = e.toLowerCase() : c === "capitalize" && (e = e[0].toUpperCase() + e.substring(1)), l.forEach((t) => {
|
|
494
|
+
let n = o.get(t);
|
|
495
|
+
n || o.set(t, n = /* @__PURE__ */ new Set()), e.split("").forEach((e) => n.add(e));
|
|
496
|
+
});
|
|
497
|
+
} : void 0;
|
|
498
|
+
return Re(e, r, a, t, u), Fe(e, r), O(e) || await Ve(e, r, t, u), await s?.(r), r;
|
|
499
|
+
}
|
|
500
|
+
let c = e.cloneNode(!1);
|
|
501
|
+
return await Ve(e, c, t), await s?.(c), c;
|
|
502
|
+
}
|
|
503
|
+
function Ge(e) {
|
|
504
|
+
if (e.ownerDocument = void 0, e.ownerWindow = void 0, e.svgStyleElement = void 0, e.svgDefsElement = void 0, e.svgStyles.clear(), e.defaultComputedStyles.clear(), e.sandbox) {
|
|
505
|
+
try {
|
|
506
|
+
e.sandbox.remove();
|
|
507
|
+
} catch (t) {
|
|
508
|
+
e.log.warn("Failed to destroyContext", t);
|
|
509
|
+
}
|
|
510
|
+
e.sandbox = void 0;
|
|
511
|
+
}
|
|
512
|
+
e.workers = [], e.fontFamilies.clear(), e.fontCssTexts.clear(), e.requests.clear(), e.tasks = [], e.shadowRoots = [];
|
|
513
|
+
}
|
|
514
|
+
function Ke(e) {
|
|
515
|
+
let { url: t, timeout: n, responseType: r, ...i } = e, a = new AbortController(), o = n ? setTimeout(() => a.abort(), n) : void 0;
|
|
516
|
+
return fetch(t, {
|
|
517
|
+
signal: a.signal,
|
|
518
|
+
...i
|
|
519
|
+
}).then((e) => {
|
|
520
|
+
if (!e.ok) throw Error("Failed fetch, not 2xx response", { cause: e });
|
|
521
|
+
switch (r) {
|
|
522
|
+
case "arrayBuffer": return e.arrayBuffer();
|
|
523
|
+
case "dataUrl": return e.blob().then(ye);
|
|
524
|
+
default: return e.text();
|
|
525
|
+
}
|
|
526
|
+
}).finally(() => clearTimeout(o));
|
|
527
|
+
}
|
|
528
|
+
function J(e, t) {
|
|
529
|
+
let { url: n, requestType: r = "text", responseType: i = "text", imageDom: a } = t, o = n, { timeout: s, acceptOfImage: c, requests: l, fetchFn: u, fetch: { requestInit: d, bypassingCache: f, placeholderImage: p }, font: m, workers: h, fontFamilies: g } = e;
|
|
530
|
+
r === "image" && (x || S) && e.drawImageCount++;
|
|
531
|
+
let _ = l.get(n);
|
|
532
|
+
if (!_) {
|
|
533
|
+
f && f instanceof RegExp && f.test(o) && (o += (/\?/.test(o) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
534
|
+
let t = r.startsWith("font") && m && m.minify, v = /* @__PURE__ */ new Set();
|
|
535
|
+
t && r.split(";")[1].split(",").forEach((e) => {
|
|
536
|
+
g.has(e) && g.get(e).forEach((e) => v.add(e));
|
|
537
|
+
});
|
|
538
|
+
let y = {
|
|
539
|
+
url: o,
|
|
540
|
+
timeout: s,
|
|
541
|
+
responseType: t && v.size ? "arrayBuffer" : i,
|
|
542
|
+
headers: r === "image" ? { accept: c } : void 0,
|
|
543
|
+
...d
|
|
544
|
+
};
|
|
545
|
+
_ = {
|
|
546
|
+
type: r,
|
|
547
|
+
resolve: void 0,
|
|
548
|
+
reject: void 0,
|
|
549
|
+
response: null
|
|
550
|
+
}, _.response = (async () => {
|
|
551
|
+
if (u && r === "image") {
|
|
552
|
+
let e = await u(n);
|
|
553
|
+
if (e) return e;
|
|
554
|
+
}
|
|
555
|
+
return !x && n.startsWith("http") && h.length ? new Promise((e, t) => {
|
|
556
|
+
h[l.size & h.length - 1].postMessage({
|
|
557
|
+
rawUrl: n,
|
|
558
|
+
...y
|
|
559
|
+
}), _.resolve = e, _.reject = t;
|
|
560
|
+
}) : Ke(y);
|
|
561
|
+
})().catch((t) => {
|
|
562
|
+
if (l.delete(n), r === "image" && p) return e.log.warn("Failed to fetch image base64, trying to use placeholder image", o), typeof p == "string" ? p : p(a);
|
|
563
|
+
throw t;
|
|
564
|
+
}), l.set(n, _);
|
|
565
|
+
}
|
|
566
|
+
return _.response;
|
|
567
|
+
}
|
|
568
|
+
async function qe(e, t, n, r) {
|
|
569
|
+
if (!Je(e)) return e;
|
|
570
|
+
for (let [i, a] of Xe(e, t)) try {
|
|
571
|
+
let t = await J(n, {
|
|
572
|
+
url: a,
|
|
573
|
+
requestType: r ? "image" : "text",
|
|
574
|
+
responseType: "dataUrl"
|
|
575
|
+
});
|
|
576
|
+
e = e.replace(Ze(i), `$1${t}$3`);
|
|
577
|
+
} catch (e) {
|
|
578
|
+
n.log.warn("Failed to fetch css data url", i, e);
|
|
579
|
+
}
|
|
580
|
+
return e;
|
|
581
|
+
}
|
|
582
|
+
function Je(e) {
|
|
583
|
+
return /url\((['"]?)([^'"]+?)\1\)/.test(e);
|
|
584
|
+
}
|
|
585
|
+
var Ye = /url\((['"]?)([^'"]+?)\1\)/g;
|
|
586
|
+
function Xe(e, t) {
|
|
587
|
+
let n = [];
|
|
588
|
+
return e.replace(Ye, (e, r, i) => (n.push([i, A(i, t)]), e)), n.filter(([e]) => !k(e));
|
|
589
|
+
}
|
|
590
|
+
function Ze(e) {
|
|
591
|
+
let t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
592
|
+
return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
|
|
593
|
+
}
|
|
594
|
+
var Qe = [
|
|
595
|
+
"background-image",
|
|
596
|
+
"border-image-source",
|
|
597
|
+
"-webkit-border-image",
|
|
598
|
+
"-webkit-mask-image",
|
|
599
|
+
"list-style-image"
|
|
600
|
+
];
|
|
601
|
+
function $e(e, t) {
|
|
602
|
+
return Qe.map((n) => {
|
|
603
|
+
let r = e.getPropertyValue(n);
|
|
604
|
+
return !r || r === "none" ? null : ((x || S) && t.drawImageCount++, qe(r, null, t, !0).then((t) => {
|
|
605
|
+
!t || r === t || e.setProperty(n, t, e.getPropertyPriority(n));
|
|
606
|
+
}));
|
|
607
|
+
}).filter(Boolean);
|
|
608
|
+
}
|
|
609
|
+
function et(e, t) {
|
|
610
|
+
if (D(e)) {
|
|
611
|
+
let n = e.currentSrc || e.src;
|
|
612
|
+
if (!k(n)) return [J(t, {
|
|
613
|
+
url: n,
|
|
614
|
+
imageDom: e,
|
|
615
|
+
requestType: "image",
|
|
616
|
+
responseType: "dataUrl"
|
|
617
|
+
}).then((t) => {
|
|
618
|
+
t && (e.srcset = "", e.dataset.originalSrc = n, e.src = t || "");
|
|
619
|
+
})];
|
|
620
|
+
(x || S) && t.drawImageCount++;
|
|
621
|
+
} else if (w(e) && !k(e.href.baseVal)) {
|
|
622
|
+
let n = e.href.baseVal;
|
|
623
|
+
return [J(t, {
|
|
624
|
+
url: n,
|
|
625
|
+
imageDom: e,
|
|
626
|
+
requestType: "image",
|
|
627
|
+
responseType: "dataUrl"
|
|
628
|
+
}).then((t) => {
|
|
629
|
+
t && (e.dataset.originalSrc = n, e.href.baseVal = t || "");
|
|
630
|
+
})];
|
|
631
|
+
}
|
|
632
|
+
return [];
|
|
633
|
+
}
|
|
634
|
+
function tt(e, t) {
|
|
635
|
+
let { ownerDocument: n, svgDefsElement: r } = t, i = e.getAttribute("href") ?? e.getAttribute("xlink:href");
|
|
636
|
+
if (!i) return [];
|
|
637
|
+
let [a, o] = i.split("#");
|
|
638
|
+
if (o) {
|
|
639
|
+
let i = `#${o}`, s = t.shadowRoots.reduce((e, t) => e ?? t.querySelector(`svg ${i}`), n?.querySelector(`svg ${i}`));
|
|
640
|
+
if (a && e.setAttribute("href", i), r?.querySelector(i)) return [];
|
|
641
|
+
if (s) return r?.appendChild(s.cloneNode(!0)), [];
|
|
642
|
+
if (a) return [J(t, {
|
|
643
|
+
url: a,
|
|
644
|
+
responseType: "text"
|
|
645
|
+
}).then((e) => {
|
|
646
|
+
r?.insertAdjacentHTML("beforeend", e);
|
|
647
|
+
})];
|
|
648
|
+
}
|
|
649
|
+
return [];
|
|
650
|
+
}
|
|
651
|
+
function Y(e, t) {
|
|
652
|
+
let { tasks: n } = t;
|
|
653
|
+
C(e) && ((D(e) || T(e)) && n.push(...et(e, t)), ie(e) && n.push(...tt(e, t))), E(e) && n.push(...$e(e.style, t)), e.childNodes.forEach((e) => {
|
|
654
|
+
Y(e, t);
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
async function nt(e, t) {
|
|
658
|
+
let { ownerDocument: n, svgStyleElement: r, fontFamilies: i, fontCssTexts: a, tasks: o, font: s } = t;
|
|
659
|
+
if (!(!n || !r || !i.size)) if (s && s.cssText) {
|
|
660
|
+
let e = ct(s.cssText, t);
|
|
661
|
+
r.appendChild(n.createTextNode(`${e}
|
|
662
|
+
`));
|
|
663
|
+
} else {
|
|
664
|
+
let e = Array.from(n.styleSheets).filter((e) => {
|
|
665
|
+
try {
|
|
666
|
+
return "cssRules" in e && !!e.cssRules.length;
|
|
667
|
+
} catch (n) {
|
|
668
|
+
return t.log.warn(`Error while reading CSS rules from ${e.href}`, n), !1;
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
await Promise.all(e.flatMap((e) => Array.from(e.cssRules).map(async (n, r) => {
|
|
672
|
+
if (ne(n)) {
|
|
673
|
+
let i = r + 1, a = n.href, o = "";
|
|
674
|
+
try {
|
|
675
|
+
o = await J(t, {
|
|
676
|
+
url: a,
|
|
677
|
+
requestType: "text",
|
|
678
|
+
responseType: "text"
|
|
679
|
+
});
|
|
680
|
+
} catch (e) {
|
|
681
|
+
t.log.warn(`Error fetch remote css import from ${a}`, e);
|
|
682
|
+
}
|
|
683
|
+
let s = o.replace(Ye, (e, t, n) => e.replace(n, A(n, a)));
|
|
684
|
+
for (let n of at(s)) try {
|
|
685
|
+
e.insertRule(n, n.startsWith("@import") ? i += 1 : e.cssRules.length);
|
|
686
|
+
} catch (e) {
|
|
687
|
+
t.log.warn("Error inserting rule from remote css import", {
|
|
688
|
+
rule: n,
|
|
689
|
+
error: e
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
})));
|
|
694
|
+
let s = [];
|
|
695
|
+
e.forEach((e) => {
|
|
696
|
+
X(e.cssRules, s);
|
|
697
|
+
}), s.filter((e) => te(e) && Je(e.style.getPropertyValue("src")) && B(e.style.getPropertyValue("font-family"))?.some((e) => i.has(e))).forEach((e) => {
|
|
698
|
+
let i = e, s = a.get(i.cssText);
|
|
699
|
+
s ? r.appendChild(n.createTextNode(`${s}
|
|
700
|
+
`)) : o.push(qe(i.cssText, i.parentStyleSheet ? i.parentStyleSheet.href : null, t).then((e) => {
|
|
701
|
+
e = ct(e, t), a.set(i.cssText, e), r.appendChild(n.createTextNode(`${e}
|
|
702
|
+
`));
|
|
703
|
+
}));
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
var rt = /(\/\*[\s\S]*?\*\/)/g, it = /((@.*?keyframes [\s\S]*?){([\s\S]*?}\s*?)})/gi;
|
|
708
|
+
function at(e) {
|
|
709
|
+
if (e == null) return [];
|
|
710
|
+
let t = [], n = e.replace(rt, "");
|
|
711
|
+
for (;;) {
|
|
712
|
+
let e = it.exec(n);
|
|
713
|
+
if (!e) break;
|
|
714
|
+
t.push(e[0]);
|
|
715
|
+
}
|
|
716
|
+
n = n.replace(it, "");
|
|
717
|
+
let r = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, i = /* @__PURE__ */ RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", "gi");
|
|
718
|
+
for (;;) {
|
|
719
|
+
let e = r.exec(n);
|
|
720
|
+
if (e) i.lastIndex = r.lastIndex;
|
|
721
|
+
else if (e = i.exec(n), e) r.lastIndex = i.lastIndex;
|
|
722
|
+
else break;
|
|
723
|
+
t.push(e[0]);
|
|
724
|
+
}
|
|
725
|
+
return t;
|
|
726
|
+
}
|
|
727
|
+
var ot = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, st = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
728
|
+
function ct(e, t) {
|
|
729
|
+
let { font: n } = t, r = n ? n?.preferredFormat : void 0;
|
|
730
|
+
return r ? e.replace(st, (e) => {
|
|
731
|
+
for (;;) {
|
|
732
|
+
let [t, , n] = ot.exec(e) || [];
|
|
733
|
+
if (!n) return "";
|
|
734
|
+
if (n === r) return `src: ${t};`;
|
|
735
|
+
}
|
|
736
|
+
}) : e;
|
|
737
|
+
}
|
|
738
|
+
function X(e, t = []) {
|
|
739
|
+
for (let n of Array.from(e)) re(n) ? t.push(...X(n.cssRules)) : "cssRules" in n ? X(n.cssRules, t) : t.push(n);
|
|
740
|
+
return t;
|
|
741
|
+
}
|
|
742
|
+
async function lt(e, t) {
|
|
743
|
+
let n = await H(e, t);
|
|
744
|
+
if (C(n.node) && w(n.node)) return n.node;
|
|
745
|
+
let { ownerDocument: r, log: i, tasks: a, svgStyleElement: o, svgDefsElement: s, svgStyles: c, font: l, progress: u, autoDestruct: d, onCloneNode: f, onEmbedNode: p, onCreateForeignObjectSvg: m } = n;
|
|
746
|
+
i.time("clone node");
|
|
747
|
+
let h = await q(n.node, n, !0);
|
|
748
|
+
if (o && r) {
|
|
749
|
+
let e = "";
|
|
750
|
+
c.forEach((t, n) => {
|
|
751
|
+
e += `${t.join(",\n")} {
|
|
752
|
+
${n}
|
|
753
|
+
}
|
|
754
|
+
`;
|
|
755
|
+
}), o.appendChild(r.createTextNode(e));
|
|
756
|
+
}
|
|
757
|
+
i.timeEnd("clone node"), await f?.(h), l !== !1 && C(h) && (i.time("embed web font"), await nt(h, n), i.timeEnd("embed web font")), i.time("embed node"), Y(h, n);
|
|
758
|
+
let g = a.length, _ = 0, v = async () => {
|
|
759
|
+
for (;;) {
|
|
760
|
+
let e = a.pop();
|
|
761
|
+
if (!e) break;
|
|
762
|
+
try {
|
|
763
|
+
await e;
|
|
764
|
+
} catch (e) {
|
|
765
|
+
n.log.warn("Failed to run task", e);
|
|
766
|
+
}
|
|
767
|
+
u?.(++_, g);
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
u?.(_, g), await Promise.all([...Array.from({ length: 4 })].map(v)), i.timeEnd("embed node"), await p?.(h);
|
|
771
|
+
let y = ut(h, n);
|
|
772
|
+
return s && y.insertBefore(s, y.children[0]), o && y.insertBefore(o, y.children[0]), d && Ge(n), await m?.(y), y;
|
|
773
|
+
}
|
|
774
|
+
function ut(e, t) {
|
|
775
|
+
let { width: n, height: r } = t, i = N(n, r, e.ownerDocument), a = i.ownerDocument.createElementNS(i.namespaceURI, "foreignObject");
|
|
776
|
+
return a.setAttributeNS(null, "x", "0%"), a.setAttributeNS(null, "y", "0%"), a.setAttributeNS(null, "width", "100%"), a.setAttributeNS(null, "height", "100%"), a.append(e), i.appendChild(a), i;
|
|
777
|
+
}
|
|
778
|
+
async function Z(e, t) {
|
|
779
|
+
let n = await H(e, t), r = await lt(n), i = P(r, n.isEnable("removeControlCharacter"));
|
|
780
|
+
return n.autoDestruct || (n.svgStyleElement = W(n.ownerDocument), n.svgDefsElement = n.ownerDocument?.createElementNS(M, "defs"), n.svgStyles.clear()), await we(I(i, r.ownerDocument), n);
|
|
781
|
+
}
|
|
782
|
+
async function dt(t, n) {
|
|
783
|
+
let r = await H(t, n), { log: i, type: a, quality: o, dpi: s } = r, c = await Z(r);
|
|
784
|
+
i.time("canvas to blob");
|
|
785
|
+
let u = await _e(c, a, o);
|
|
786
|
+
if (["image/png", "image/jpeg"].includes(a) && s) {
|
|
787
|
+
let t = await be(u.slice(0, 33)), n = new Uint8Array(t);
|
|
788
|
+
return a === "image/png" ? n = l(n, s) : a === "image/jpeg" && (n = e(n, s)), i.timeEnd("canvas to blob"), new Blob([n, u.slice(33)], { type: a });
|
|
789
|
+
}
|
|
790
|
+
return i.timeEnd("canvas to blob"), u;
|
|
791
|
+
}
|
|
792
|
+
async function Q(t, n) {
|
|
793
|
+
let r = await H(t, n), { log: i, quality: a, type: o, dpi: s } = r, c = await Z(r);
|
|
794
|
+
i.time("canvas to data url");
|
|
795
|
+
let u = c.toDataURL(o, a);
|
|
796
|
+
if (["image/png", "image/jpeg"].includes(o) && s && _ && v) {
|
|
797
|
+
let [t, n] = u.split(","), r = 0, i = !1;
|
|
798
|
+
if (o === "image/png") {
|
|
799
|
+
let e = p(n);
|
|
800
|
+
e >= 0 ? (r = Math.ceil((e + 28) / 3) * 4, i = !0) : r = 33 / 3 * 4;
|
|
801
|
+
} else o === "image/jpeg" && (r = 18 / 3 * 4);
|
|
802
|
+
let a = n.substring(0, r), c = n.substring(r), d = window.atob(a), f = new Uint8Array(d.length);
|
|
803
|
+
for (let e = 0; e < f.length; e++) f[e] = d.charCodeAt(e);
|
|
804
|
+
let m = o === "image/png" ? l(f, s, i) : e(f, s);
|
|
805
|
+
u = [
|
|
806
|
+
t,
|
|
807
|
+
",",
|
|
808
|
+
window.btoa(String.fromCharCode(...m)),
|
|
809
|
+
c
|
|
810
|
+
].join("");
|
|
811
|
+
}
|
|
812
|
+
return i.timeEnd("canvas to data url"), u;
|
|
813
|
+
}
|
|
814
|
+
async function $(e, t) {
|
|
815
|
+
let n = await H(e, t), { width: r, height: i, ownerDocument: a } = n, o = await Q(n), s = N(r, i, a), c = s.ownerDocument.createElementNS(s.namespaceURI, "image");
|
|
816
|
+
return c.setAttributeNS(null, "href", o), c.setAttributeNS(null, "height", "100%"), c.setAttributeNS(null, "width", "100%"), s.appendChild(c), P(s, n.isEnable("removeControlCharacter"));
|
|
817
|
+
}
|
|
818
|
+
async function ft(e, t) {
|
|
819
|
+
let n = await H(e, t), { ownerDocument: r, width: i, height: a, scale: o, type: s } = n, c = I(s === "image/svg+xml" ? await $(n) : await Q(n), r);
|
|
820
|
+
return c.width = Math.floor(i * o), c.height = Math.floor(a * o), c.style.width = `${i}px`, c.style.height = `${a}px`, c;
|
|
821
|
+
}
|
|
822
|
+
async function pt(e, t) {
|
|
823
|
+
return Q(await H(e, {
|
|
824
|
+
...t,
|
|
825
|
+
type: "image/jpeg"
|
|
826
|
+
}));
|
|
827
|
+
}
|
|
828
|
+
async function mt(e, t) {
|
|
829
|
+
let n = await Z(await H(e, t));
|
|
830
|
+
return n.getContext("2d").getImageData(0, 0, n.width, n.height).data;
|
|
831
|
+
}
|
|
832
|
+
async function ht(e, t) {
|
|
833
|
+
return Q(await H(e, {
|
|
834
|
+
...t,
|
|
835
|
+
type: "image/png"
|
|
836
|
+
}));
|
|
837
|
+
}
|
|
838
|
+
async function gt(e, t) {
|
|
839
|
+
return Q(await H(e, {
|
|
840
|
+
...t,
|
|
841
|
+
type: "image/webp"
|
|
842
|
+
}));
|
|
843
|
+
}
|
|
844
|
+
//#endregion
|
|
845
|
+
export { U as createContext, Ge as destroyContext, dt as domToBlob, Z as domToCanvas, Q as domToDataUrl, lt as domToForeignObjectSvg, ft as domToImage, pt as domToJpeg, mt as domToPixel, ht as domToPng, $ as domToSvg, gt as domToWebp, L as loadMedia, R as waitUntilLoad };
|
|
846
|
+
|
|
847
|
+
//# sourceMappingURL=dist-DDBeV_JI.js.map
|