vue-data-ui 3.17.13 → 3.18.0
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/README.md +1 -1
- package/dist/A11yDataTable-q2-8fSlJ.js +45 -0
- package/dist/Arrow-BU2Z7mfz.js +116 -0
- package/dist/BaseDraggableDialog-LE75fWYz.js +272 -0
- package/dist/BaseIcon-CL6Y7alf.js +499 -0
- package/dist/BaseLegendToggle-BvPOFMVZ.js +56 -0
- package/dist/BaseScanner-C7dmAref.js +27 -0
- package/dist/BaseZoomControls-DSwf4HhS.js +111 -0
- package/dist/ColorPicker-BGbMrtup.js +255 -0
- package/dist/DataTable-ZG4GX2Zg.js +150 -0
- package/dist/Legend-BPb8i4aC.js +114 -0
- package/dist/NonSvgPenAndPaper-BT3YMjgo.js +577 -0
- package/dist/PackageVersion-B1cPtZ3Q.js +11 -0
- package/dist/PenAndPaper-DxBCVZAx.js +461 -0
- package/dist/RecursiveCircles-DPpLel6f.js +117 -0
- package/dist/RecursiveLabels-DBMJf_to.js +56 -0
- package/dist/RecursiveLinks-D06dBL4a.js +78 -0
- package/dist/Shape-Dbug7CtK.js +141 -0
- package/dist/Slicer-SEdaKYPX.js +1144 -0
- package/dist/SlicerPreview-BLlQTUI_.js +1523 -0
- package/dist/SparkTooltip-BaONR2nq.js +93 -0
- package/dist/Title-ByyzJzpc.js +87 -0
- package/dist/Tooltip-V6Z0Ko-1.js +307 -0
- package/dist/UserOptions-Gaw1761w.js +1407 -0
- package/dist/_plugin-vue_export-helper-Dq1MygBL.js +8 -0
- package/dist/canvas-lib-DTaADQOK.js +79 -0
- package/dist/components/arrow.js +2 -5
- package/dist/components/vue-ui-3d-bar.js +2 -5
- package/dist/components/vue-ui-accordion.js +2 -5
- package/dist/components/vue-ui-age-pyramid.js +2 -5
- package/dist/components/vue-ui-annotator.js +2 -5
- package/dist/components/vue-ui-bullet.js +2 -5
- package/dist/components/vue-ui-bump.js +2 -5
- package/dist/components/vue-ui-candlestick.js +2 -5
- package/dist/components/vue-ui-carousel-table.js +2 -5
- package/dist/components/vue-ui-chestnut.js +2 -5
- package/dist/components/vue-ui-chord.js +2 -5
- package/dist/components/vue-ui-circle-pack.js +2 -5
- package/dist/components/vue-ui-cursor.js +2 -5
- package/dist/components/vue-ui-dag.js +2 -5
- package/dist/components/vue-ui-dashboard.js +2 -5
- package/dist/components/vue-ui-digits.js +2 -5
- package/dist/components/vue-ui-donut-evolution.js +2 -5
- package/dist/components/vue-ui-donut.js +2 -5
- package/dist/components/vue-ui-dumbbell.js +2 -5
- package/dist/components/vue-ui-flow.js +2 -5
- package/dist/components/vue-ui-funnel.js +2 -5
- package/dist/components/vue-ui-galaxy.js +2 -5
- package/dist/components/vue-ui-gauge.js +2 -5
- package/dist/components/vue-ui-geo.js +2 -5
- package/dist/components/vue-ui-gizmo.js +2 -5
- package/dist/components/vue-ui-heatmap.js +2 -5
- package/dist/components/vue-ui-history-plot.js +2 -5
- package/dist/components/vue-ui-horizontal-bar.js +2 -5
- package/dist/components/vue-ui-icon.js +2 -5
- package/dist/components/vue-ui-kpi.js +2 -5
- package/dist/components/vue-ui-mini-loader.js +2 -5
- package/dist/components/vue-ui-molecule.js +2 -5
- package/dist/components/vue-ui-mood-radar.js +2 -5
- package/dist/components/vue-ui-nested-donuts.js +2 -5
- package/dist/components/vue-ui-onion.js +2 -5
- package/dist/components/vue-ui-parallel-coordinate-plot.js +2 -5
- package/dist/components/vue-ui-pattern-seed.js +2 -5
- package/dist/components/vue-ui-pattern.js +2 -5
- package/dist/components/vue-ui-quadrant.js +2 -5
- package/dist/components/vue-ui-quick-chart.js +2 -5
- package/dist/components/vue-ui-radar.js +2 -5
- package/dist/components/vue-ui-rating.js +2 -5
- package/dist/components/vue-ui-relation-circle.js +2 -5
- package/dist/components/vue-ui-ridgeline.js +2 -5
- package/dist/components/vue-ui-rings.js +2 -5
- package/dist/components/vue-ui-scatter.js +2 -5
- package/dist/components/vue-ui-skeleton.js +2 -5
- package/dist/components/vue-ui-smiley.js +2 -5
- package/dist/components/vue-ui-spark-trend.js +2 -5
- package/dist/components/vue-ui-sparkbar.js +2 -5
- package/dist/components/vue-ui-sparkgauge.js +2 -5
- package/dist/components/vue-ui-sparkhistogram.js +2 -5
- package/dist/components/vue-ui-sparkline.js +2 -5
- package/dist/components/vue-ui-sparkstackbar.js +2 -5
- package/dist/components/vue-ui-stackbar.js +2 -5
- package/dist/components/vue-ui-stackline.js +2 -5
- package/dist/components/vue-ui-strip-plot.js +2 -5
- package/dist/components/vue-ui-table-heatmap.js +2 -5
- package/dist/components/vue-ui-table-sparkline.js +2 -5
- package/dist/components/vue-ui-table.js +2 -5
- package/dist/components/vue-ui-thermometer.js +2 -5
- package/dist/components/vue-ui-timer.js +2 -5
- package/dist/components/vue-ui-tiremarks.js +2 -5
- package/dist/components/vue-ui-treemap.js +2 -5
- package/dist/components/vue-ui-vertical-bar.js +2 -5
- package/dist/components/vue-ui-waffle.js +2 -5
- package/dist/components/vue-ui-wheel.js +2 -5
- package/dist/components/vue-ui-word-cloud.js +2 -5
- package/dist/components/vue-ui-world.js +2 -5
- package/dist/components/vue-ui-xy-canvas.js +2 -5
- package/dist/components/vue-ui-xy.js +2 -5
- package/dist/dom-to-png-C9UOX1d2.js +237 -0
- package/dist/exposedLib-BQjH823l.js +19 -0
- package/dist/geoProjections-CQIkC70z.js +146 -0
- package/dist/img-NMY-_LiJ.js +74 -0
- package/dist/labelUtils-BiSegLOT.js +19 -0
- package/dist/lib-B83ZCydz.js +1879 -0
- package/dist/patternUtils-B7BWu5bV.js +258 -0
- package/dist/pdf-Ey2KFETK.js +90 -0
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/style.css +2 -1
- package/dist/types/arrow.d.ts +1 -1
- package/dist/types/utils.d.ts +23 -0
- package/dist/types/vue-data-ui.d.ts +4766 -630
- package/dist/types/vue-ui-3d-bar.d.ts +64 -9
- package/dist/types/vue-ui-accordion.d.ts +4 -3
- package/dist/types/vue-ui-age-pyramid.d.ts +79 -9
- package/dist/types/vue-ui-annotator.d.ts +3 -5
- package/dist/types/vue-ui-bullet.d.ts +60 -9
- package/dist/types/vue-ui-bump.d.ts +65 -9
- package/dist/types/vue-ui-candlestick.d.ts +83 -9
- package/dist/types/vue-ui-carousel-table.d.ts +36 -6
- package/dist/types/vue-ui-chestnut.d.ts +66 -9
- package/dist/types/vue-ui-chord.d.ts +78 -9
- package/dist/types/vue-ui-circle-pack.d.ts +86 -9
- package/dist/types/vue-ui-cursor.d.ts +4 -2
- package/dist/types/vue-ui-dag.d.ts +92 -9
- package/dist/types/vue-ui-dashboard.d.ts +43 -6
- package/dist/types/vue-ui-digits.d.ts +4 -2
- package/dist/types/vue-ui-donut-evolution.d.ts +70 -9
- package/dist/types/vue-ui-donut.d.ts +92 -9
- package/dist/types/vue-ui-dumbbell.d.ts +65 -9
- package/dist/types/vue-ui-flow.d.ts +79 -9
- package/dist/types/vue-ui-funnel.d.ts +55 -9
- package/dist/types/vue-ui-galaxy.d.ts +83 -9
- package/dist/types/vue-ui-gauge.d.ts +64 -9
- package/dist/types/vue-ui-geo.d.ts +71 -9
- package/dist/types/vue-ui-gizmo.d.ts +17 -6
- package/dist/types/vue-ui-heatmap.d.ts +73 -9
- package/dist/types/vue-ui-history-plot.d.ts +82 -9
- package/dist/types/vue-ui-horizontal-bar.d.ts +84 -9
- package/dist/types/vue-ui-icon.d.ts +2 -2
- package/dist/types/vue-ui-kpi.d.ts +21 -7
- package/dist/types/vue-ui-mini-loader.d.ts +5 -3
- package/dist/types/vue-ui-molecule.d.ts +86 -9
- package/dist/types/vue-ui-mood-radar.d.ts +66 -9
- package/dist/types/vue-ui-nested-donuts.d.ts +80 -9
- package/dist/types/vue-ui-onion.d.ts +77 -9
- package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +92 -9
- package/dist/types/vue-ui-pattern-seed.d.ts +1 -1
- package/dist/types/vue-ui-pattern.d.ts +2 -2
- package/dist/types/vue-ui-quadrant.d.ts +86 -9
- package/dist/types/vue-ui-quick-chart.d.ts +79 -9
- package/dist/types/vue-ui-radar.d.ts +83 -9
- package/dist/types/vue-ui-rating.d.ts +22 -6
- package/dist/types/vue-ui-relation-circle.d.ts +66 -9
- package/dist/types/vue-ui-ridgeline.d.ts +69 -9
- package/dist/types/vue-ui-rings.d.ts +70 -9
- package/dist/types/vue-ui-scatter.d.ts +67 -9
- package/dist/types/vue-ui-skeleton.d.ts +3 -2
- package/dist/types/vue-ui-smiley.d.ts +3 -2
- package/dist/types/vue-ui-spark-trend.d.ts +14 -6
- package/dist/types/vue-ui-sparkbar.d.ts +27 -6
- package/dist/types/vue-ui-sparkgauge.d.ts +20 -6
- package/dist/types/vue-ui-sparkhistogram.d.ts +24 -6
- package/dist/types/vue-ui-sparkline.d.ts +35 -6
- package/dist/types/vue-ui-sparkstackbar.d.ts +35 -6
- package/dist/types/vue-ui-stackbar.d.ts +85 -9
- package/dist/types/vue-ui-stackline.d.ts +81 -9
- package/dist/types/vue-ui-strip-plot.d.ts +66 -9
- package/dist/types/vue-ui-table-heatmap.d.ts +52 -6
- package/dist/types/vue-ui-table-sparkline.d.ts +30 -6
- package/dist/types/vue-ui-table.d.ts +10 -2
- package/dist/types/vue-ui-thermometer.d.ts +46 -9
- package/dist/types/vue-ui-timer.d.ts +31 -5
- package/dist/types/vue-ui-tiremarks.d.ts +46 -9
- package/dist/types/vue-ui-treemap.d.ts +73 -9
- package/dist/types/vue-ui-vertical-bar.d.ts +2 -2
- package/dist/types/vue-ui-waffle.d.ts +72 -9
- package/dist/types/vue-ui-wheel.d.ts +46 -9
- package/dist/types/vue-ui-word-cloud.d.ts +73 -9
- package/dist/types/vue-ui-world.d.ts +68 -9
- package/dist/types/vue-ui-xy-canvas.d.ts +75 -9
- package/dist/types/vue-ui-xy.d.ts +108 -10
- package/dist/useAutoSizeLabelsInsideViewbox-De0rTecW.js +50 -0
- package/dist/useChartAccessibility-Do37qcw2.js +12 -0
- package/dist/useConfig-KnOLHtlJ.js +7419 -0
- package/dist/useFitSvgText-C-MEdAfe.js +63 -0
- package/dist/useNestedProp-CcxL1gUU.js +10 -0
- package/dist/useObjectBindings-Dc8Rf6Qy.js +189 -0
- package/dist/usePanZoom-B-4M_gmY.js +157 -0
- package/dist/usePrefersMotion-BywLbIko.js +15 -0
- package/dist/usePrinter-CMLF900n.js +49 -0
- package/dist/useResponsive-CrAInupd.js +19 -0
- package/dist/useStableElementSize-0I1IpHPl.js +77 -0
- package/dist/useSvgExport-Dtu973wa.js +755 -0
- package/dist/useTableResponsive-DrM1xqII.js +24 -0
- package/dist/useThemeCheck-rFK9Zlb_.js +24 -0
- package/dist/useTimeLabelCollider-Dm55Emzg.js +57 -0
- package/dist/useTimeLabels-C0x7zUXP.js +272 -0
- package/dist/useUserOptionState-CjPJPTg2.js +15 -0
- package/dist/utils.js +27 -44
- package/dist/vClickOutside-CbX_bC9A.js +13 -0
- package/dist/vue-data-ui-D1REqS_k.js +274 -0
- package/dist/vue-data-ui.js +76 -167
- package/dist/vue-ui-3d-bar-vO_kSCd6.js +1747 -0
- package/dist/vue-ui-accordion-Cf-jZELj.js +81 -0
- package/dist/vue-ui-age-pyramid-DHXhrP_3.js +1226 -0
- package/dist/vue-ui-annotator-B0o6czmF.js +2899 -0
- package/dist/vue-ui-bullet-C93-cf0H.js +700 -0
- package/dist/vue-ui-bump-C_Szk9AZ.js +1239 -0
- package/dist/vue-ui-candlestick-6JdMEJKO.js +1802 -0
- package/dist/vue-ui-carousel-table-CZ_HK0Iw.js +445 -0
- package/dist/vue-ui-chestnut-B8ixU585.js +2000 -0
- package/dist/vue-ui-chord-DC5sLapz.js +1381 -0
- package/dist/vue-ui-circle-pack-CsmSEwt3.js +1183 -0
- package/dist/vue-ui-cursor-B-QODIL3.js +283 -0
- package/dist/vue-ui-dag-C9LYfjS_.js +2899 -0
- package/dist/vue-ui-dashboard-D-f4ZaLi.js +503 -0
- package/dist/vue-ui-digits-CcB3odN7.js +209 -0
- package/dist/vue-ui-donut-DR0ngnZC.js +2396 -0
- package/dist/vue-ui-donut-evolution-BXpOscCe.js +1490 -0
- package/dist/vue-ui-dumbbell-CB_clJWA.js +1517 -0
- package/dist/vue-ui-flow-CUiOAEy1.js +1223 -0
- package/dist/vue-ui-funnel-BAlGDK0o.js +767 -0
- package/dist/vue-ui-galaxy-DbYNfSHb.js +1062 -0
- package/dist/vue-ui-gauge-Cie7jykM.js +910 -0
- package/dist/vue-ui-geo-Ce_gBRye.js +1504 -0
- package/dist/vue-ui-gizmo-B9POi_SN.js +225 -0
- package/dist/vue-ui-heatmap-DFfRSbnk.js +1556 -0
- package/dist/vue-ui-history-plot-DHp5WFgx.js +1551 -0
- package/dist/vue-ui-horizontal-bar-DI4yoARv.js +1669 -0
- package/dist/vue-ui-kpi-oUfso4UP.js +96 -0
- package/dist/vue-ui-mini-loader-aZMi1_uX.js +125 -0
- package/dist/vue-ui-molecule-D72kzel_.js +912 -0
- package/dist/vue-ui-mood-radar-Tw2ZFP7Y.js +1138 -0
- package/dist/vue-ui-nested-donuts-Bza1LczX.js +1472 -0
- package/dist/vue-ui-onion-BOuuib5d.js +1188 -0
- package/dist/vue-ui-parallel-coordinate-plot-BuQUq6-o.js +1413 -0
- package/dist/vue-ui-pattern-Bj-IPFr2.js +154 -0
- package/dist/vue-ui-pattern-seed-abRweCDE.js +61 -0
- package/dist/vue-ui-quadrant-zNFIXNt9.js +1966 -0
- package/dist/vue-ui-quick-chart-B1a8QVUn.js +2459 -0
- package/dist/vue-ui-radar-VFn-YP_2.js +1214 -0
- package/dist/vue-ui-rating-Dxgn21FA.js +343 -0
- package/dist/vue-ui-relation-circle-B0sZaCgX.js +914 -0
- package/dist/vue-ui-ridgeline-BsBAbg5V.js +1612 -0
- package/dist/vue-ui-rings-CDwUzMF-.js +1231 -0
- package/dist/vue-ui-scatter-Du_b-zM8.js +2380 -0
- package/dist/vue-ui-skeleton-BAq6J_6G.js +2556 -0
- package/dist/vue-ui-smiley-CoHvkS0c.js +356 -0
- package/dist/vue-ui-spark-trend-BmCcJ17C.js +438 -0
- package/dist/vue-ui-sparkbar-9z05IMx8.js +393 -0
- package/dist/vue-ui-sparkgauge-BlWri9DP.js +255 -0
- package/dist/vue-ui-sparkhistogram-CHZTt8d8.js +560 -0
- package/dist/vue-ui-sparkline-DirLW9Nd.js +1503 -0
- package/dist/vue-ui-sparkstackbar-Dk6cEI2o.js +660 -0
- package/dist/vue-ui-stackbar-DNIrGHkt.js +2235 -0
- package/dist/vue-ui-stackline-HoWn_ur2.js +2362 -0
- package/dist/vue-ui-strip-plot-Bi8u_fLr.js +1328 -0
- package/dist/vue-ui-table-XLjOOfdI.js +1338 -0
- package/dist/vue-ui-table-heatmap-DvnFiveI.js +334 -0
- package/dist/vue-ui-table-sparkline-CSZf8XxP.js +697 -0
- package/dist/vue-ui-thermometer-7eUO_7CP.js +753 -0
- package/dist/vue-ui-timer-DCbxsREb.js +439 -0
- package/dist/vue-ui-tiremarks-p_sfTufv.js +542 -0
- package/dist/vue-ui-treemap-BdZOW7TM.js +1575 -0
- package/dist/vue-ui-waffle-Bf9dWWCM.js +1350 -0
- package/dist/vue-ui-wheel-CZrIiB0K.js +875 -0
- package/dist/vue-ui-word-cloud-BeLjxoRe.js +1644 -0
- package/dist/vue-ui-world-D9ahzEQ2.js +14252 -0
- package/dist/vue-ui-xy-DrvbVuHO.js +4063 -0
- package/dist/vue-ui-xy-canvas-DU7vFrQr.js +1774 -0
- package/dist/vue_ui_3d_bar-CXKqO5Ej.js +185 -0
- package/dist/vue_ui_age_pyramid-BON8QI6X.js +301 -0
- package/dist/vue_ui_bullet-CE5sFT7u.js +186 -0
- package/dist/vue_ui_bump-frnXaXul.js +201 -0
- package/dist/vue_ui_candlestick-sY6UtOop.js +374 -0
- package/dist/vue_ui_chestnut-BiUZFv40.js +305 -0
- package/dist/vue_ui_chord-DpyR_b9A.js +275 -0
- package/dist/vue_ui_circle_pack-DBKz_Fi_.js +130 -0
- package/dist/vue_ui_dag-Ci_MOnvd.js +258 -0
- package/dist/vue_ui_donut-Cx2_BGcQ.js +358 -0
- package/dist/vue_ui_donut_evolution-CAJefrHs.js +717 -0
- package/dist/vue_ui_dumbbell-CClzAZTN.js +304 -0
- package/dist/vue_ui_flow-CCHO1Lo9.js +238 -0
- package/dist/vue_ui_funnel-h8q2mRpC.js +234 -0
- package/dist/vue_ui_galaxy-70vtkEBw.js +265 -0
- package/dist/vue_ui_gauge-C17CgfzN.js +178 -0
- package/dist/vue_ui_geo-C0UbQ0Lc.js +248 -0
- package/dist/vue_ui_heatmap-BqPP3J4M.js +319 -0
- package/dist/vue_ui_history_plot-C5nytDHh.js +413 -0
- package/dist/vue_ui_horizontal_bar-Bqxorkc_.js +341 -0
- package/dist/vue_ui_molecule-Dka4JBOp.js +231 -0
- package/dist/vue_ui_mood_radar-Dg4ijm53.js +281 -0
- package/dist/vue_ui_nested_donuts-BY9cOoHF.js +273 -0
- package/dist/vue_ui_onion-DTV9cup-.js +293 -0
- package/dist/vue_ui_parallel_coordinate_plot-CNWrDh96.js +278 -0
- package/dist/vue_ui_quadrant-3kjYvxpj.js +428 -0
- package/dist/vue_ui_quick_chart--VaYQuM4.js +139 -0
- package/dist/vue_ui_radar-Dxx9GJmj.js +306 -0
- package/dist/vue_ui_relation_circle-Cr0I2SoU.js +98 -0
- package/dist/vue_ui_ridgeline-CAtYca4b.js +767 -0
- package/dist/vue_ui_rings-DXC1VeX5.js +320 -0
- package/dist/vue_ui_scatter-D2S2j0ap.js +479 -0
- package/dist/vue_ui_spark_trend-BHMQ6_1p.js +82 -0
- package/dist/vue_ui_sparkbar-BR6hbuDE.js +64 -0
- package/dist/vue_ui_sparkgauge-xfPRHnMv.js +90 -0
- package/dist/vue_ui_sparkhistogram-CJRENZ1C.js +123 -0
- package/dist/vue_ui_sparkline-wgk7yO7E.js +151 -0
- package/dist/vue_ui_sparkstackbar-C5qZMmAl.js +175 -0
- package/dist/vue_ui_stackbar-BW_C3MXw.js +412 -0
- package/dist/vue_ui_stackline-DpI2LnjO.js +426 -0
- package/dist/vue_ui_strip_plot-8ZelqC5b.js +301 -0
- package/dist/vue_ui_table_heatmap-BGUjA0WA.js +80 -0
- package/dist/vue_ui_table_sparkline-i0Q-N_we.js +124 -0
- package/dist/vue_ui_thermometer-CuN7Gpez.js +123 -0
- package/dist/vue_ui_tiremarks-A6UHC0c3.js +122 -0
- package/dist/vue_ui_treemap-BQp06q-g.js +328 -0
- package/dist/vue_ui_vertical_bar-CJSD1FZS.js +247 -0
- package/dist/vue_ui_waffle-C_Ev4l7B.js +292 -0
- package/dist/vue_ui_wheel-DdkTPXJU.js +133 -0
- package/dist/vue_ui_word_cloud-B1PbsYPc.js +254 -0
- package/dist/vue_ui_xy-BYPqfYyx.js +482 -0
- package/dist/vue_ui_xy_canvas-CMHGNrLf.js +408 -0
- package/package.json +7 -7
- package/dist/A11yDataTable-BpmuNomI.js +0 -54
- package/dist/Arrow-dSvLFssU.js +0 -101
- package/dist/BaseDraggableDialog-Di8Hlru3.js +0 -249
- package/dist/BaseIcon-DX0hTWa-.js +0 -476
- package/dist/BaseLegendToggle-cMP8M2u0.js +0 -47
- package/dist/BaseScanner-C2j3TsSY.js +0 -36
- package/dist/BaseZoomControls-CVSC1-SU.js +0 -123
- package/dist/ColorPicker-bAxGcXK0.js +0 -271
- package/dist/DataTable-cMnb68Ik.js +0 -145
- package/dist/Legend-DGN5lY60.js +0 -104
- package/dist/NonSvgPenAndPaper-B6E0zEYe.js +0 -573
- package/dist/PackageVersion-BfrCAH6_.js +0 -10
- package/dist/PenAndPaper-CJDoB5H9.js +0 -527
- package/dist/RecursiveCircles-BE6GoMmo.js +0 -101
- package/dist/RecursiveLabels-BhQMS9Sm.js +0 -55
- package/dist/RecursiveLinks-BDwyYfP-.js +0 -83
- package/dist/Shape-CxJ5_Rre.js +0 -116
- package/dist/Slicer-D7UcO8sN.js +0 -1145
- package/dist/SlicerPreview-D_CgrN_7.js +0 -1580
- package/dist/SparkTooltip-D4bM-kfz.js +0 -68
- package/dist/Title-BbKoiBk2.js +0 -88
- package/dist/Tooltip-Cvt7Fi0Q.js +0 -299
- package/dist/UserOptions-DVduN6X7.js +0 -1474
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/dom-to-png-DGvx6i5V.js +0 -262
- package/dist/exposedLib-sJvY1pST.js +0 -22
- package/dist/geoProjections-BFq2sOBY.js +0 -162
- package/dist/img-CjTQXS0U.js +0 -57
- package/dist/labelUtils-DX9oyq3C.js +0 -26
- package/dist/lib-DMzrGQHK.js +0 -2477
- package/dist/patternUtils-BINhU4Ky.js +0 -615
- package/dist/pdf-C4H4o1Cj.js +0 -88
- package/dist/useAutoSizeLabelsInsideViewbox-izlGDfwu.js +0 -55
- package/dist/useChartAccessibility-cp6XQtqi.js +0 -15
- package/dist/useConfig-CG4HT3wS.js +0 -7901
- package/dist/useFitSvgText-2crs6Fv5.js +0 -69
- package/dist/useNestedProp-DH0BEVVS.js +0 -13
- package/dist/useObjectBindings-Dixg-RIe.js +0 -228
- package/dist/usePanZoom-BbDhcKWf.js +0 -141
- package/dist/usePrefersMotion-Co0nj1eS.js +0 -17
- package/dist/usePrinter-C4t8DdQ-.js +0 -51
- package/dist/useResponsive-DfdjqQps.js +0 -195
- package/dist/useStableElementSize-C48ZVcZQ.js +0 -77
- package/dist/useSvgExport-BTG4hVPO.js +0 -870
- package/dist/useTableResponsive-BpfiEtzR.js +0 -26
- package/dist/useThemeCheck-C9Ccl7U9.js +0 -36
- package/dist/useTimeLabelCollider-D3JeJ6Ye.js +0 -86
- package/dist/useTimeLabels-Cv0tD9In.js +0 -307
- package/dist/useUserOptionState-B7Ej974k.js +0 -19
- package/dist/vClickOutside-C6WiFswA.js +0 -13
- package/dist/vue-data-ui-D1ZI7Y4l.js +0 -433
- package/dist/vue-ui-3d-bar-DEjKYzI5.js +0 -1824
- package/dist/vue-ui-accordion-DFtpH_16.js +0 -92
- package/dist/vue-ui-age-pyramid-LiC9hTjP.js +0 -1179
- package/dist/vue-ui-annotator-DrKnQoHf.js +0 -2991
- package/dist/vue-ui-bullet-DdxEINdq.js +0 -769
- package/dist/vue-ui-bump-CdgO1V7z.js +0 -1250
- package/dist/vue-ui-candlestick-DxJnPwto.js +0 -1775
- package/dist/vue-ui-carousel-table-CMefu5TI.js +0 -487
- package/dist/vue-ui-chestnut-BnGN72PO.js +0 -2001
- package/dist/vue-ui-chord-DWyar45U.js +0 -1457
- package/dist/vue-ui-circle-pack-CQ8vF2XH.js +0 -1076
- package/dist/vue-ui-cursor-HHOdkmyB.js +0 -260
- package/dist/vue-ui-dag-BDWPBElq.js +0 -3209
- package/dist/vue-ui-dashboard-Dg_I3X2a.js +0 -627
- package/dist/vue-ui-digits-CZmdir8V.js +0 -211
- package/dist/vue-ui-donut-BKegKHxj.js +0 -2608
- package/dist/vue-ui-donut-evolution-047dE4Lu.js +0 -1578
- package/dist/vue-ui-dumbbell-BL4ZMChj.js +0 -1552
- package/dist/vue-ui-flow-BAqtyunQ.js +0 -1279
- package/dist/vue-ui-funnel-Pl2sEOZs.js +0 -823
- package/dist/vue-ui-galaxy-CBF5Wsax.js +0 -1108
- package/dist/vue-ui-gauge-COV_S0Vp.js +0 -955
- package/dist/vue-ui-geo-CaPXElPf.js +0 -1510
- package/dist/vue-ui-gizmo-Csn7up96.js +0 -238
- package/dist/vue-ui-heatmap-Cpb0BYLa.js +0 -1694
- package/dist/vue-ui-history-plot-ZZEdzFCE.js +0 -1564
- package/dist/vue-ui-horizontal-bar-BonPYUZf.js +0 -1735
- package/dist/vue-ui-kpi-DoHhSsDK.js +0 -130
- package/dist/vue-ui-mini-loader-DOTBVCLE.js +0 -138
- package/dist/vue-ui-molecule-mVYnXouV.js +0 -945
- package/dist/vue-ui-mood-radar-DPvwnc3z.js +0 -1197
- package/dist/vue-ui-nested-donuts-C7E6TXrZ.js +0 -1702
- package/dist/vue-ui-onion-BGIlFhGB.js +0 -1207
- package/dist/vue-ui-parallel-coordinate-plot-C6G_A9ua.js +0 -1432
- package/dist/vue-ui-pattern-mXZW_pvA.js +0 -146
- package/dist/vue-ui-pattern-seed-BcNlxb2i.js +0 -36
- package/dist/vue-ui-quadrant-CVpIeYOB.js +0 -1918
- package/dist/vue-ui-quick-chart-CcV8qn9-.js +0 -2514
- package/dist/vue-ui-radar-G4AV1rBo.js +0 -1259
- package/dist/vue-ui-rating-CqPlP88P.js +0 -370
- package/dist/vue-ui-relation-circle-CkZ8oFVV.js +0 -856
- package/dist/vue-ui-ridgeline-CBTyYn6Q.js +0 -1737
- package/dist/vue-ui-rings-CSIOqFiP.js +0 -1256
- package/dist/vue-ui-scatter-AuC46ufT.js +0 -2345
- package/dist/vue-ui-skeleton-YD6rZjY_.js +0 -2475
- package/dist/vue-ui-smiley-CY0WFv2j.js +0 -391
- package/dist/vue-ui-spark-trend-D8KGIt-R.js +0 -423
- package/dist/vue-ui-sparkbar-BjWGJjzN.js +0 -424
- package/dist/vue-ui-sparkgauge-Dab5mss7.js +0 -285
- package/dist/vue-ui-sparkhistogram-D0rsmiPh.js +0 -559
- package/dist/vue-ui-sparkline-BCaauQuX.js +0 -1550
- package/dist/vue-ui-sparkstackbar-NT5yD6xA.js +0 -672
- package/dist/vue-ui-stackbar-ChBk_A1c.js +0 -2393
- package/dist/vue-ui-stackline-Cujamlze.js +0 -2490
- package/dist/vue-ui-strip-plot-CGBumG6I.js +0 -1293
- package/dist/vue-ui-table-BX2iMku4.js +0 -1726
- package/dist/vue-ui-table-heatmap-KXgXYVXm.js +0 -353
- package/dist/vue-ui-table-sparkline-C3NWnry0.js +0 -803
- package/dist/vue-ui-thermometer-DvdceZB1.js +0 -743
- package/dist/vue-ui-timer-XWAbvuAY.js +0 -504
- package/dist/vue-ui-tiremarks-B-YI1RlT.js +0 -578
- package/dist/vue-ui-treemap-AzorGfmd.js +0 -1757
- package/dist/vue-ui-waffle-CKtUvdTE.js +0 -1442
- package/dist/vue-ui-wheel-CnsLEArZ.js +0 -908
- package/dist/vue-ui-word-cloud-iAme2ihe.js +0 -1644
- package/dist/vue-ui-world-D5rrC9rw.js +0 -14452
- package/dist/vue-ui-xy-C_Q9chQe.js +0 -4468
- package/dist/vue-ui-xy-canvas-DG0299qE.js +0 -2107
- package/dist/vue_ui_3d_bar-CL0iX8Qi.js +0 -22
- package/dist/vue_ui_age_pyramid-8H8WSL7J.js +0 -22
- package/dist/vue_ui_bullet-Ckqieba5.js +0 -22
- package/dist/vue_ui_bump-CIht647H.js +0 -22
- package/dist/vue_ui_candlestick-BAMn-VGw.js +0 -22
- package/dist/vue_ui_chestnut-BloFvDuV.js +0 -22
- package/dist/vue_ui_chord-Bc1_ocwK.js +0 -22
- package/dist/vue_ui_circle_pack-CLmw8nHe.js +0 -22
- package/dist/vue_ui_dag-ZOwuDBZ8.js +0 -22
- package/dist/vue_ui_donut-CA4dgV8J.js +0 -22
- package/dist/vue_ui_donut_evolution-DFQU-rqE.js +0 -22
- package/dist/vue_ui_dumbbell-BCOHDiPk.js +0 -22
- package/dist/vue_ui_flow-BErINgox.js +0 -22
- package/dist/vue_ui_funnel-yuaMZ-yb.js +0 -22
- package/dist/vue_ui_galaxy-D95AN4FT.js +0 -22
- package/dist/vue_ui_gauge-BMEuRC4J.js +0 -22
- package/dist/vue_ui_geo--kg4VoVX.js +0 -22
- package/dist/vue_ui_heatmap-C9u993qE.js +0 -22
- package/dist/vue_ui_history_plot-BCKk1CrQ.js +0 -22
- package/dist/vue_ui_horizontal_bar-BEagrV0T.js +0 -22
- package/dist/vue_ui_molecule-BtvlINUh.js +0 -22
- package/dist/vue_ui_mood_radar-BUs6Fdn8.js +0 -22
- package/dist/vue_ui_nested_donuts-DvTrWT_C.js +0 -22
- package/dist/vue_ui_onion-CxWH9_OZ.js +0 -22
- package/dist/vue_ui_parallel_coordinate_plot-DH3cFJ3n.js +0 -22
- package/dist/vue_ui_quadrant-DjRs--Uz.js +0 -22
- package/dist/vue_ui_quick_chart-DMCjEjPe.js +0 -22
- package/dist/vue_ui_radar-DryGBOrz.js +0 -22
- package/dist/vue_ui_relation_circle-CCroen7h.js +0 -22
- package/dist/vue_ui_ridgeline-j4rVmpEp.js +0 -22
- package/dist/vue_ui_rings-CxOrekqA.js +0 -22
- package/dist/vue_ui_scatter-Bu1EAy9H.js +0 -22
- package/dist/vue_ui_spark_trend-3BjrSprO.js +0 -22
- package/dist/vue_ui_sparkbar-BsMzz5Um.js +0 -22
- package/dist/vue_ui_sparkgauge-KnjASOZs.js +0 -22
- package/dist/vue_ui_sparkhistogram-GBdzIVvS.js +0 -22
- package/dist/vue_ui_sparkline-CQ8DJVJx.js +0 -22
- package/dist/vue_ui_sparkstackbar-BSexvOuM.js +0 -22
- package/dist/vue_ui_stackbar-CuDC4O4b.js +0 -22
- package/dist/vue_ui_stackline-QTh-nuxE.js +0 -22
- package/dist/vue_ui_strip_plot-B9ypi_F3.js +0 -22
- package/dist/vue_ui_table_heatmap-CkvipPVy.js +0 -16
- package/dist/vue_ui_table_sparkline-yQdijcyJ.js +0 -22
- package/dist/vue_ui_thermometer-BTmjRBH8.js +0 -22
- package/dist/vue_ui_tiremarks-DBotWfi8.js +0 -22
- package/dist/vue_ui_treemap-D9-AIkT-.js +0 -22
- package/dist/vue_ui_vertical_bar-CELc39b8.js +0 -18
- package/dist/vue_ui_waffle-M2h-uJQ_.js +0 -22
- package/dist/vue_ui_wheel-LqBz3lv4.js +0 -22
- package/dist/vue_ui_word_cloud-mKAtBxHR.js +0 -22
- package/dist/vue_ui_xy-esktmpg-.js +0 -22
- package/dist/vue_ui_xy_canvas-6BBDSowT.js +0 -22
|
@@ -1,870 +0,0 @@
|
|
|
1
|
-
import { isRef as Lt, ref as Ct, onMounted as Pt, watch as Rt, nextTick as Wt, unref as Vt } from "vue";
|
|
2
|
-
const et = "http://www.w3.org/2000/svg", yt = "http://www.w3.org/1999/xlink", Bt = 'system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif';
|
|
3
|
-
let At = /* @__PURE__ */ new WeakMap();
|
|
4
|
-
function gt(N) {
|
|
5
|
-
let v = At.get(N);
|
|
6
|
-
return v || (v = getComputedStyle(N), At.set(N, v)), v;
|
|
7
|
-
}
|
|
8
|
-
function Mt() {
|
|
9
|
-
At = /* @__PURE__ */ new WeakMap();
|
|
10
|
-
}
|
|
11
|
-
function P(N) {
|
|
12
|
-
return document.createElementNS(et, N);
|
|
13
|
-
}
|
|
14
|
-
function wt(N) {
|
|
15
|
-
return `${N}, ${Bt}`;
|
|
16
|
-
}
|
|
17
|
-
function Ot({
|
|
18
|
-
svg: N,
|
|
19
|
-
// ref
|
|
20
|
-
title: v,
|
|
21
|
-
// computed
|
|
22
|
-
legend: F,
|
|
23
|
-
// computed
|
|
24
|
-
legendItems: rt,
|
|
25
|
-
// computed
|
|
26
|
-
backgroundColor: ot,
|
|
27
|
-
// computed
|
|
28
|
-
stretchTitle: I = !1,
|
|
29
|
-
// bool (when rotateX is applied on the svg like in VueUiWheel, title transform style needs to be compensated)
|
|
30
|
-
titleEmbedded: at = !1
|
|
31
|
-
// when title is already part of the svg (VueUiChestnut)
|
|
32
|
-
}) {
|
|
33
|
-
const lt = Lt(N) ? N : Ct(N), nt = Ct(!1), W = [
|
|
34
|
-
"fill",
|
|
35
|
-
"fill-opacity",
|
|
36
|
-
"stroke",
|
|
37
|
-
"stroke-width",
|
|
38
|
-
"stroke-opacity",
|
|
39
|
-
"opacity",
|
|
40
|
-
"color",
|
|
41
|
-
"stroke-linecap",
|
|
42
|
-
"stroke-linejoin",
|
|
43
|
-
"stroke-miterlimit",
|
|
44
|
-
"stroke-dasharray",
|
|
45
|
-
"stroke-dashoffset",
|
|
46
|
-
"font-family",
|
|
47
|
-
"font-size",
|
|
48
|
-
"font-style",
|
|
49
|
-
"font-weight",
|
|
50
|
-
"font-variant",
|
|
51
|
-
"letter-spacing",
|
|
52
|
-
"word-spacing",
|
|
53
|
-
"text-anchor",
|
|
54
|
-
"dominant-baseline",
|
|
55
|
-
"shape-rendering",
|
|
56
|
-
"vector-effect",
|
|
57
|
-
"paint-order",
|
|
58
|
-
"mix-blend-mode",
|
|
59
|
-
"isolation",
|
|
60
|
-
"filter",
|
|
61
|
-
"clip-path",
|
|
62
|
-
"mask",
|
|
63
|
-
"transform",
|
|
64
|
-
"transform-origin",
|
|
65
|
-
"visibility",
|
|
66
|
-
"display"
|
|
67
|
-
], j = /* @__PURE__ */ new Set(["font-family"]);
|
|
68
|
-
async function b({ timeoutMs: e = 4e3, log: o = "warn" } = {}) {
|
|
69
|
-
if (typeof window > "u" || typeof document > "u")
|
|
70
|
-
return console.warn("SVG export only works in the browser."), null;
|
|
71
|
-
const h = performance.now() + e, u = () => {
|
|
72
|
-
const C = Vt(lt);
|
|
73
|
-
return C && document.contains(C) ? C : null;
|
|
74
|
-
};
|
|
75
|
-
let c = u();
|
|
76
|
-
if (c)
|
|
77
|
-
return c;
|
|
78
|
-
let t = !1;
|
|
79
|
-
const S = (C) => {
|
|
80
|
-
if (!t && C)
|
|
81
|
-
try {
|
|
82
|
-
C.disconnect();
|
|
83
|
-
} catch {
|
|
84
|
-
}
|
|
85
|
-
t = !0;
|
|
86
|
-
};
|
|
87
|
-
let w;
|
|
88
|
-
const A = new Promise((C) => {
|
|
89
|
-
try {
|
|
90
|
-
w = new MutationObserver(() => {
|
|
91
|
-
const M = u();
|
|
92
|
-
M && (S(w), C(M));
|
|
93
|
-
}), w.observe(document.documentElement, {
|
|
94
|
-
childList: !0,
|
|
95
|
-
subtree: !0
|
|
96
|
-
});
|
|
97
|
-
} catch {
|
|
98
|
-
C(null);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
for (; performance.now() < h; ) {
|
|
102
|
-
const C = await Promise.race([
|
|
103
|
-
A,
|
|
104
|
-
new Promise((M) => requestAnimationFrame(M))
|
|
105
|
-
]);
|
|
106
|
-
if (await Wt(), c = u() || C, c)
|
|
107
|
-
return S(w), c;
|
|
108
|
-
}
|
|
109
|
-
return S(w), console.warn("SVG element not found or not mounted (timed out)."), null;
|
|
110
|
-
}
|
|
111
|
-
Pt(async () => {
|
|
112
|
-
try {
|
|
113
|
-
await b(), nt.value = !0;
|
|
114
|
-
} catch {
|
|
115
|
-
nt.value = !1;
|
|
116
|
-
}
|
|
117
|
-
}), Rt(lt, async () => {
|
|
118
|
-
try {
|
|
119
|
-
await b(), nt.value = !0;
|
|
120
|
-
} catch {
|
|
121
|
-
nt.value = !1;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
const f = /* @__PURE__ */ new Map();
|
|
125
|
-
function y(e) {
|
|
126
|
-
if (f.has(e))
|
|
127
|
-
return f.get(e);
|
|
128
|
-
const o = P("svg");
|
|
129
|
-
o.setAttribute("width", "0"), o.setAttribute("height", "0"), o.style.position = "absolute", o.style.left = "-99999px", o.style.top = "-99999px";
|
|
130
|
-
const h = P(e);
|
|
131
|
-
o.appendChild(h), document.body.appendChild(o);
|
|
132
|
-
const u = window.getComputedStyle(h), c = {};
|
|
133
|
-
for (const t of W)
|
|
134
|
-
c[t] = u.getPropertyValue(t);
|
|
135
|
-
return document.body.removeChild(o), f.set(e, c), c;
|
|
136
|
-
}
|
|
137
|
-
function $(e) {
|
|
138
|
-
const o = gt(e), h = y(e.tagName.toLowerCase()), u = [];
|
|
139
|
-
for (const c of W) {
|
|
140
|
-
let t = o.getPropertyValue(c) || "";
|
|
141
|
-
const S = h[c] || "";
|
|
142
|
-
if (j.has(c)) {
|
|
143
|
-
c === "font-family" && t && (t = wt(t)), t && u.push(`${c}:${t};`);
|
|
144
|
-
continue;
|
|
145
|
-
}
|
|
146
|
-
t && t !== S && u.push(`${c}:${t};`);
|
|
147
|
-
}
|
|
148
|
-
return u.join("");
|
|
149
|
-
}
|
|
150
|
-
function z(e, o) {
|
|
151
|
-
e.getAttribute("width") && o.setAttribute("width", e.getAttribute("width")), e.getAttribute("height") && o.setAttribute("height", e.getAttribute("height")), e.getAttribute("viewBox") && o.setAttribute("viewBox", e.getAttribute("viewBox"));
|
|
152
|
-
const h = [
|
|
153
|
-
e,
|
|
154
|
-
...Array.from(e.querySelectorAll("*"))
|
|
155
|
-
], u = [
|
|
156
|
-
o,
|
|
157
|
-
...Array.from(o.querySelectorAll("*"))
|
|
158
|
-
];
|
|
159
|
-
for (let c = 0; c < h.length; c += 1) {
|
|
160
|
-
const t = h[c], S = u[c], w = $(t);
|
|
161
|
-
w && S.setAttribute("style", w), ["fill", "stroke", "filter", "clip-path", "mask"].forEach((A) => {
|
|
162
|
-
const C = t.getAttribute(A);
|
|
163
|
-
C && S.setAttribute(A, C);
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
function L(e) {
|
|
168
|
-
const o = e.getAttribute("viewBox");
|
|
169
|
-
if (!o)
|
|
170
|
-
return null;
|
|
171
|
-
const [h, u, c, t] = o.split(/\s+|,/).map(Number);
|
|
172
|
-
return [h, u, c, t].some((S) => Number.isNaN(S)) ? null : { minX: h, minY: u, width: c, height: t };
|
|
173
|
-
}
|
|
174
|
-
function O(e) {
|
|
175
|
-
e.getAttribute("xmlns") || e.setAttribute("xmlns", et), e.getAttribute("xmlns:xlink") || e.setAttribute("xmlns:xlink", yt), e.getAttribute("xml:space") || e.setAttribute("xml:space", "preserve");
|
|
176
|
-
}
|
|
177
|
-
function it(e) {
|
|
178
|
-
const o = document.createElement("div");
|
|
179
|
-
return o.style.position = "absolute", o.style.left = "-99999px", o.style.top = "-99999px", o.style.width = "0", o.style.height = "0", document.body.appendChild(o), o.appendChild(e), o;
|
|
180
|
-
}
|
|
181
|
-
function st(e) {
|
|
182
|
-
try {
|
|
183
|
-
e.remove();
|
|
184
|
-
} catch {
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
function dt(e, o, h, u, c) {
|
|
188
|
-
if (!v.value || !v.value.text)
|
|
189
|
-
return 0;
|
|
190
|
-
const t = {
|
|
191
|
-
text: v.value.text || "",
|
|
192
|
-
color: v.value.color || "#111",
|
|
193
|
-
fontSize: v.value.fontSize || 20,
|
|
194
|
-
bold: !!v.value.bold,
|
|
195
|
-
textAlign: (v.value?.textAlign || "center").toLowerCase(),
|
|
196
|
-
paddingLeft: v.value.paddingLeft ?? 0,
|
|
197
|
-
paddingRight: v.value.paddingRight ?? 0,
|
|
198
|
-
subtitle: v.value.subtitle || null
|
|
199
|
-
}, S = P("g");
|
|
200
|
-
S.setAttribute("id", "__vdu_export_title"), e.appendChild(S);
|
|
201
|
-
const w = h + t.paddingLeft, A = h + o - (t.paddingRight || 0), C = h + o / 2;
|
|
202
|
-
let M = "start", X = w;
|
|
203
|
-
t.textAlign === "center" ? (M = "middle", X = C) : t.textAlign === "right" && (M = "end", X = A);
|
|
204
|
-
const D = u, T = Math.round(t.fontSize * 0.4), R = P("text");
|
|
205
|
-
R.setAttribute("x", String(X)), R.setAttribute("y", String(D + t.fontSize)), R.setAttribute("text-anchor", M), R.setAttribute("dominant-baseline", "ideographic"), R.setAttribute(
|
|
206
|
-
"style",
|
|
207
|
-
`font-family:${c}; font-size:${t.fontSize}px; font-weight:${t.bold ? "700" : "400"}; fill:${t.color}; ${I ? "transform: scale(0.65, 1); transform-origin: center;" : ""}`
|
|
208
|
-
), R.textContent = t.text, S.appendChild(R);
|
|
209
|
-
let J = t.fontSize;
|
|
210
|
-
if (t.subtitle && t.subtitle.text) {
|
|
211
|
-
const E = {
|
|
212
|
-
color: t.subtitle.color || "#666",
|
|
213
|
-
text: t.subtitle.text,
|
|
214
|
-
fontSize: t.subtitle.fontSize || Math.max(12, Math.round(t.fontSize * 0.8)),
|
|
215
|
-
bold: !!t.subtitle.bold
|
|
216
|
-
}, V = P("text");
|
|
217
|
-
V.setAttribute("x", String(X)), V.setAttribute("y", String(D + t.fontSize + T + E.fontSize)), V.setAttribute("text-anchor", M), V.setAttribute("dominant-baseline", "ideographic"), V.setAttribute(
|
|
218
|
-
"style",
|
|
219
|
-
`font-family:${c}; font-size:${E.fontSize}px; font-weight:${E.bold ? "600" : "400"}; fill:${E.color}; ${I ? "transform: scale(0.65, 1); transform-origin: center;" : ""}`
|
|
220
|
-
), V.textContent = E.text, S.appendChild(V), J += T + E.fontSize;
|
|
221
|
-
}
|
|
222
|
-
return J + Math.round(t.fontSize * 0.4);
|
|
223
|
-
}
|
|
224
|
-
function q(e, o, h, u, c) {
|
|
225
|
-
if (!F.value || !F.value.show || !Array.isArray(rt.value) || !rt.value.length)
|
|
226
|
-
return 0;
|
|
227
|
-
const t = {
|
|
228
|
-
bold: !!F.value.bold,
|
|
229
|
-
backgroundColor: F.value.backgroundColor || "transparent",
|
|
230
|
-
color: F.value.color || "#111",
|
|
231
|
-
fontSize: F.value.fontSize || 14,
|
|
232
|
-
paddingX: 14,
|
|
233
|
-
paddingY: 10,
|
|
234
|
-
itemGapX: 18,
|
|
235
|
-
itemGapY: 12,
|
|
236
|
-
markerSize: Math.max(
|
|
237
|
-
8,
|
|
238
|
-
Math.round((F.value.fontSize || 14) * 0.9)
|
|
239
|
-
),
|
|
240
|
-
markerTextGap: 8,
|
|
241
|
-
lineHeight: Math.round((F.value.fontSize || 14) * 1.2),
|
|
242
|
-
maxWidth: o
|
|
243
|
-
}, S = P("g");
|
|
244
|
-
S.setAttribute("id", "__vdu_export_legend"), S.setAttribute("transform", `translate(${h}, ${u})`), e.appendChild(S);
|
|
245
|
-
const w = P("rect");
|
|
246
|
-
w.setAttribute("rx", "6"), w.setAttribute("ry", "6"), w.setAttribute("fill", t.backgroundColor), S.appendChild(w);
|
|
247
|
-
const A = P("g");
|
|
248
|
-
S.appendChild(A);
|
|
249
|
-
const C = P("text");
|
|
250
|
-
C.setAttribute("x", "0"), C.setAttribute("y", "0"), C.setAttribute(
|
|
251
|
-
"style",
|
|
252
|
-
`font-family:${c}; font-size:${t.fontSize}px; font-weight:${t.bold ? "600" : "400"}; opacity:0;`
|
|
253
|
-
), A.appendChild(C);
|
|
254
|
-
const M = (s) => (C.textContent = s || "", C.getComputedTextLength()), X = Math.max(1, t.maxWidth - t.paddingX * 2);
|
|
255
|
-
function D(s, a) {
|
|
256
|
-
const l = String(s || "").split(/\s+/).filter(Boolean), m = [];
|
|
257
|
-
if (!l.length)
|
|
258
|
-
return [""];
|
|
259
|
-
let d = l.shift();
|
|
260
|
-
for (; l.length; ) {
|
|
261
|
-
const g = `${d} ${l[0]}`;
|
|
262
|
-
if (M(g) <= a)
|
|
263
|
-
d = g, l.shift();
|
|
264
|
-
else if (M(d) > a && d.length > 1) {
|
|
265
|
-
let x = "";
|
|
266
|
-
for (const H of d) {
|
|
267
|
-
const Q = x + H;
|
|
268
|
-
if (M(Q) <= a)
|
|
269
|
-
x = Q;
|
|
270
|
-
else break;
|
|
271
|
-
}
|
|
272
|
-
const _ = d.slice(x.length);
|
|
273
|
-
m.push(x), d = _.length ? _ : l.shift() || "";
|
|
274
|
-
} else
|
|
275
|
-
m.push(d), d = l.shift() || "";
|
|
276
|
-
}
|
|
277
|
-
d && m.push(d);
|
|
278
|
-
const k = m[m.length - 1] || "";
|
|
279
|
-
if (M(k) > a && k.length > 1) {
|
|
280
|
-
let g = "";
|
|
281
|
-
for (const _ of k) {
|
|
282
|
-
const H = g + _;
|
|
283
|
-
if (M(H) <= a)
|
|
284
|
-
g = H;
|
|
285
|
-
else break;
|
|
286
|
-
}
|
|
287
|
-
const x = k.slice(g.length);
|
|
288
|
-
m[m.length - 1] = g, x && m.push(x);
|
|
289
|
-
}
|
|
290
|
-
return m;
|
|
291
|
-
}
|
|
292
|
-
const T = Math.PI / 180;
|
|
293
|
-
function R(s, a, l, m, d = -90) {
|
|
294
|
-
const k = d * T;
|
|
295
|
-
let g = "";
|
|
296
|
-
for (let x = 0; x < l; x += 1) {
|
|
297
|
-
const _ = k + x * 2 * Math.PI / l, H = s + Math.cos(_) * m, Q = a + Math.sin(_) * m;
|
|
298
|
-
g += (x === 0 ? "M" : "L") + H + "," + Q;
|
|
299
|
-
}
|
|
300
|
-
return g + "Z";
|
|
301
|
-
}
|
|
302
|
-
function J(s, a, l = 5, m, d) {
|
|
303
|
-
const k = -90 * T;
|
|
304
|
-
let g = "";
|
|
305
|
-
for (let x = 0; x < l * 2; x += 1) {
|
|
306
|
-
const _ = x % 2 === 0 ? m : d, H = k + x * Math.PI / l, Q = s + Math.cos(H) * _, Y = a + Math.sin(H) * _;
|
|
307
|
-
g += (x === 0 ? "M" : "L") + Q + "," + Y;
|
|
308
|
-
}
|
|
309
|
-
return g + "Z";
|
|
310
|
-
}
|
|
311
|
-
const E = rt.value.map((s) => {
|
|
312
|
-
const a = Math.max(
|
|
313
|
-
1,
|
|
314
|
-
X - (t.markerSize + t.markerTextGap)
|
|
315
|
-
), l = D(s.name || "", a), m = Math.max(...l.map(M), 0), d = t.markerSize + t.markerTextGap + m, k = Math.max(
|
|
316
|
-
t.markerSize,
|
|
317
|
-
l.length * t.lineHeight
|
|
318
|
-
);
|
|
319
|
-
return {
|
|
320
|
-
...s,
|
|
321
|
-
lines: l,
|
|
322
|
-
itemW: d,
|
|
323
|
-
itemH: k
|
|
324
|
-
};
|
|
325
|
-
}), V = [];
|
|
326
|
-
let n = {
|
|
327
|
-
items: [],
|
|
328
|
-
width: 0,
|
|
329
|
-
height: 0
|
|
330
|
-
};
|
|
331
|
-
for (const s of E) {
|
|
332
|
-
const a = (n.items.length ? t.itemGapX : 0) + s.itemW;
|
|
333
|
-
n.items.length && n.width + a > X ? (V.push(n), n = {
|
|
334
|
-
items: [s],
|
|
335
|
-
width: s.itemW,
|
|
336
|
-
height: s.itemH
|
|
337
|
-
}) : (n.items.push(s), n.width += a, n.height = Math.max(n.height, s.itemH));
|
|
338
|
-
}
|
|
339
|
-
n.items.length && V.push(n);
|
|
340
|
-
let r = t.paddingY;
|
|
341
|
-
for (const s of V) {
|
|
342
|
-
let l = Math.max(t.paddingX, (t.maxWidth - s.width) / 2);
|
|
343
|
-
for (let m = 0; m < s.items.length; m += 1) {
|
|
344
|
-
const d = s.items[m], k = l + t.markerSize / 2, g = r + s.height / 2.5, x = t.markerSize / 2, _ = String(d.shape || "rect").toLowerCase();
|
|
345
|
-
if (_ === "circle") {
|
|
346
|
-
const p = P("circle");
|
|
347
|
-
p.setAttribute("cx", String(k)), p.setAttribute("cy", String(g)), p.setAttribute("r", String(x * 0.8)), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
|
|
348
|
-
} else if (_ === "rect" || _ === "square") {
|
|
349
|
-
const p = P("path");
|
|
350
|
-
p.setAttribute(
|
|
351
|
-
"d",
|
|
352
|
-
R(k, g, 4, x, -45)
|
|
353
|
-
), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
|
|
354
|
-
} else if (_ === "diamond") {
|
|
355
|
-
const p = P("path");
|
|
356
|
-
p.setAttribute(
|
|
357
|
-
"d",
|
|
358
|
-
R(k, g, 4, x, 45)
|
|
359
|
-
), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
|
|
360
|
-
} else if (_ === "triangle") {
|
|
361
|
-
const p = P("path");
|
|
362
|
-
p.setAttribute(
|
|
363
|
-
"d",
|
|
364
|
-
R(k, g, 3, x, -90)
|
|
365
|
-
), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
|
|
366
|
-
} else if (_ === "pentagon") {
|
|
367
|
-
const p = P("path");
|
|
368
|
-
p.setAttribute(
|
|
369
|
-
"d",
|
|
370
|
-
R(k, g, 5, x, -90)
|
|
371
|
-
), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
|
|
372
|
-
} else if (_ === "hexagon") {
|
|
373
|
-
const p = P("path");
|
|
374
|
-
p.setAttribute(
|
|
375
|
-
"d",
|
|
376
|
-
R(k, g, 6, x, 0)
|
|
377
|
-
), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
|
|
378
|
-
} else if (_ === "star") {
|
|
379
|
-
const p = P("path"), tt = x, pt = x * 0.5;
|
|
380
|
-
p.setAttribute(
|
|
381
|
-
"d",
|
|
382
|
-
J(k, g, 5, tt, pt)
|
|
383
|
-
), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
|
|
384
|
-
} else {
|
|
385
|
-
const p = P("rect");
|
|
386
|
-
p.setAttribute("x", String(l)), p.setAttribute(
|
|
387
|
-
"y",
|
|
388
|
-
String(r + (s.height - t.markerSize) / 2)
|
|
389
|
-
), p.setAttribute("width", String(t.markerSize)), p.setAttribute("height", String(t.markerSize)), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
|
|
390
|
-
}
|
|
391
|
-
const H = l + t.markerSize + t.markerTextGap, Q = r + (s.height - d.lines.length * t.lineHeight) / 2 + t.fontSize, Y = P("text");
|
|
392
|
-
Y.setAttribute("x", String(H)), Y.setAttribute("y", String(Q)), Y.setAttribute(
|
|
393
|
-
"style",
|
|
394
|
-
`font-family:${c}; font-size:${t.fontSize}px; font-weight:${t.bold ? "600" : "400"}; fill:${t.color};`
|
|
395
|
-
), Y.setAttribute("dominant-baseline", "ideographic");
|
|
396
|
-
let mt = !0;
|
|
397
|
-
for (const p of d.lines) {
|
|
398
|
-
const tt = P("tspan");
|
|
399
|
-
mt || tt.setAttribute("dy", String(t.lineHeight)), tt.setAttribute("x", String(H)), tt.textContent = p, Y.appendChild(tt), mt = !1;
|
|
400
|
-
}
|
|
401
|
-
A.appendChild(Y), l += d.itemW + (m < s.items.length - 1 ? t.itemGapX : 0);
|
|
402
|
-
}
|
|
403
|
-
r += s.height + t.itemGapY;
|
|
404
|
-
}
|
|
405
|
-
V.length && (r -= t.itemGapY);
|
|
406
|
-
const i = r + t.paddingY;
|
|
407
|
-
return w.setAttribute("x", "0"), w.setAttribute("y", "0"), w.setAttribute("width", String(t.maxWidth)), w.setAttribute("height", String(i)), C.remove(), i + Math.round(t.fontSize * 0.4);
|
|
408
|
-
}
|
|
409
|
-
function ht(e) {
|
|
410
|
-
const o = e.cloneNode(!0);
|
|
411
|
-
return o.querySelectorAll("script").forEach((h) => h.remove()), z(e, o), O(o), o;
|
|
412
|
-
}
|
|
413
|
-
function B(e) {
|
|
414
|
-
const o = Array.from(e.childNodes).filter(
|
|
415
|
-
(c) => c.nodeType === 1 && c.nodeName.toLowerCase() === "defs"
|
|
416
|
-
), h = Array.from(e.childNodes).filter(
|
|
417
|
-
(c) => !(c.nodeType === 1 && c.nodeName.toLowerCase() === "defs")
|
|
418
|
-
), u = document.createElementNS(et, "g");
|
|
419
|
-
u.setAttribute("id", "__vdu_export_content");
|
|
420
|
-
for (const c of h) u.appendChild(c);
|
|
421
|
-
for (const c of o) e.appendChild(c);
|
|
422
|
-
return e.appendChild(u), u;
|
|
423
|
-
}
|
|
424
|
-
function K(e, o) {
|
|
425
|
-
o <= 0 || e.setAttribute("transform", `translate(0, ${o})`);
|
|
426
|
-
}
|
|
427
|
-
function ct(e, o) {
|
|
428
|
-
if (o <= 0) return;
|
|
429
|
-
const h = L(e), u = e.getAttribute("height");
|
|
430
|
-
if (h)
|
|
431
|
-
e.setAttribute(
|
|
432
|
-
"viewBox",
|
|
433
|
-
`${h.minX} ${h.minY} ${h.width} ${h.height + o}`
|
|
434
|
-
), u && e.setAttribute(
|
|
435
|
-
"height",
|
|
436
|
-
String(Number(u) + o)
|
|
437
|
-
);
|
|
438
|
-
else if (u)
|
|
439
|
-
e.setAttribute("height", String(Number(u) + o));
|
|
440
|
-
else {
|
|
441
|
-
const c = e.getBBox();
|
|
442
|
-
e.setAttribute(
|
|
443
|
-
"viewBox",
|
|
444
|
-
`0 0 ${Math.max(1, c.width)} ${Math.max(1, c.height + o)}`
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
function U(e) {
|
|
449
|
-
const o = L(e);
|
|
450
|
-
if (o)
|
|
451
|
-
return o.width;
|
|
452
|
-
const h = Number(e.getAttribute("width"));
|
|
453
|
-
return !Number.isNaN(h) && h > 0 ? h : e.getBBox().width || 0;
|
|
454
|
-
}
|
|
455
|
-
function G(e) {
|
|
456
|
-
const o = L(e);
|
|
457
|
-
if (o) return o.height;
|
|
458
|
-
const h = Number(e.getAttribute("height"));
|
|
459
|
-
return !Number.isNaN(h) && h > 0 ? h : e.getBBox().height || 0;
|
|
460
|
-
}
|
|
461
|
-
async function ut(e) {
|
|
462
|
-
const o = it(e);
|
|
463
|
-
Mt();
|
|
464
|
-
try {
|
|
465
|
-
if (document.fonts?.ready)
|
|
466
|
-
try {
|
|
467
|
-
await Promise.race([
|
|
468
|
-
document.fonts.ready,
|
|
469
|
-
new Promise((T) => setTimeout(T, 4e3))
|
|
470
|
-
]);
|
|
471
|
-
} catch {
|
|
472
|
-
}
|
|
473
|
-
const h = B(e), u = L(e), c = u ? u.minX : 0, t = u ? u.minY : 0, S = Math.max(1, U(e)), w = Math.max(1, G(e)), A = wt(
|
|
474
|
-
gt(e).getPropertyValue("font-family") || ""
|
|
475
|
-
);
|
|
476
|
-
let M = (at ? null : dt(e, S, c, t, A)) ?? 0;
|
|
477
|
-
const X = F && F.value && F.value.position ? String(F.value.position).toLowerCase() : "top";
|
|
478
|
-
F && F.value && F.value.show && X === "top" && (M += q(
|
|
479
|
-
e,
|
|
480
|
-
S,
|
|
481
|
-
c,
|
|
482
|
-
t + M,
|
|
483
|
-
A
|
|
484
|
-
)), K(h, M);
|
|
485
|
-
let D = 0;
|
|
486
|
-
F && F.value && F.value.show && X === "bottom" && (D += q(
|
|
487
|
-
e,
|
|
488
|
-
S,
|
|
489
|
-
c,
|
|
490
|
-
t + M + w,
|
|
491
|
-
A
|
|
492
|
-
)), ct(e, M + D), e.style.backgroundColor = ot.value ?? "#FFF", await Et(e, { mode: "raster" }), Tt(e, v.value.text ? -6 : -48);
|
|
493
|
-
} finally {
|
|
494
|
-
st(o), Mt();
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
async function Z() {
|
|
498
|
-
const e = await b(), o = ht(e);
|
|
499
|
-
await ut(o);
|
|
500
|
-
const u = `<?xml version="1.0" standalone="no"?>
|
|
501
|
-
${new XMLSerializer().serializeToString(o)}`, c = new Blob([u], { type: "image/svg+xml;charset=utf-8" }), t = URL.createObjectURL(c), S = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(u)}`;
|
|
502
|
-
return { blob: c, url: t, text: u, dataUrl: S };
|
|
503
|
-
}
|
|
504
|
-
async function ft(e) {
|
|
505
|
-
const { url: o } = await Z(), h = e || v.value?.text || "chart", u = document.createElement("a");
|
|
506
|
-
u.href = o, u.download = h.endsWith(".svg") ? h : `${h}.svg`, document.body.appendChild(u), u.click(), document.body.removeChild(u), URL.revokeObjectURL(o);
|
|
507
|
-
}
|
|
508
|
-
return { ready: nt, getSvg: Z, exportSvg: ft };
|
|
509
|
-
}
|
|
510
|
-
function Tt(N, v = -50) {
|
|
511
|
-
if (!v) return;
|
|
512
|
-
const F = N.getAttribute("viewBox"), rt = (W) => {
|
|
513
|
-
if (!W) return;
|
|
514
|
-
const j = N.getAttribute("height");
|
|
515
|
-
if (!j) return;
|
|
516
|
-
const b = /^(\d+(\.\d+)?)(px)?$/.exec(j.trim());
|
|
517
|
-
if (!b) return;
|
|
518
|
-
const f = parseFloat(b[1]) || 0, y = Math.max(1, f + W);
|
|
519
|
-
N.setAttribute("height", String(y));
|
|
520
|
-
};
|
|
521
|
-
if (F) {
|
|
522
|
-
const W = F.trim().split(/\s+|,/).map(Number);
|
|
523
|
-
if (W.length !== 4 || W.some((O) => !Number.isFinite(O)))
|
|
524
|
-
return;
|
|
525
|
-
const [j, b, f, y] = W, $ = b + v, z = -v, L = Math.max(1, y + z);
|
|
526
|
-
N.setAttribute("viewBox", `${j} ${$} ${f} ${L}`), rt(z);
|
|
527
|
-
return;
|
|
528
|
-
}
|
|
529
|
-
let ot = Number(N.getAttribute("width")), I = Number(N.getAttribute("height"));
|
|
530
|
-
if (!(ot > 0 && I > 0)) {
|
|
531
|
-
const W = N.getBBox();
|
|
532
|
-
ot = Math.max(1, W.width || 1), I = Math.max(1, W.height || 1);
|
|
533
|
-
}
|
|
534
|
-
const at = v, lt = -v, nt = Math.max(1, I + lt);
|
|
535
|
-
N.setAttribute("viewBox", `0 ${at} ${ot} ${nt}`), (function() {
|
|
536
|
-
const j = N.getAttribute("height");
|
|
537
|
-
if (!j) return;
|
|
538
|
-
const b = /^(\d+(\.\d+)?)(px)?$/.exec(j.trim());
|
|
539
|
-
if (!b) return;
|
|
540
|
-
const f = parseFloat(b[1]) || 0, y = Math.max(1, f + lt);
|
|
541
|
-
N.setAttribute("height", String(y));
|
|
542
|
-
})();
|
|
543
|
-
}
|
|
544
|
-
async function Et(N, { mode: v = "raster" } = {}) {
|
|
545
|
-
const F = Array.from(N.querySelectorAll("foreignObject"));
|
|
546
|
-
if (!F.length)
|
|
547
|
-
return { converted: 0, rasterized: 0, skipped: 0, errors: 0 };
|
|
548
|
-
let rt = 0, ot = 0, I = 0, at = 0;
|
|
549
|
-
const lt = (b) => ["div", "p", "span", "strong", "em", "b", "i", "br"].includes(b), nt = (b) => {
|
|
550
|
-
try {
|
|
551
|
-
const f = b.firstElementChild;
|
|
552
|
-
if (!f) return !1;
|
|
553
|
-
const y = [f];
|
|
554
|
-
for (; y.length; ) {
|
|
555
|
-
const $ = y.pop();
|
|
556
|
-
if ($.nodeType === 3)
|
|
557
|
-
continue;
|
|
558
|
-
if ($.nodeType !== 1)
|
|
559
|
-
return !1;
|
|
560
|
-
const z = ($.tagName || "").toLowerCase();
|
|
561
|
-
if (!lt(z) || $.querySelector?.("img,svg,canvas,video,foreignObject"))
|
|
562
|
-
return !1;
|
|
563
|
-
for (const L of Array.from($.childNodes))
|
|
564
|
-
y.push(L);
|
|
565
|
-
}
|
|
566
|
-
return !0;
|
|
567
|
-
} catch {
|
|
568
|
-
return !1;
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
function W(b) {
|
|
572
|
-
try {
|
|
573
|
-
const f = b.firstElementChild;
|
|
574
|
-
if (!f) return null;
|
|
575
|
-
const y = (n, r = 0) => Number.isFinite(+n) ? +n : r, $ = y(b.getAttribute("x"), 0), z = y(b.getAttribute("y"), 0);
|
|
576
|
-
let L = y(b.getAttribute("width"), NaN);
|
|
577
|
-
if (!Number.isFinite(L) || L <= 0) {
|
|
578
|
-
const n = b.getBBox?.();
|
|
579
|
-
L = Math.max(1, y(n?.width, 0));
|
|
580
|
-
}
|
|
581
|
-
const O = (n, r) => {
|
|
582
|
-
if (!n) return Math.round(r * 1.2);
|
|
583
|
-
const i = n.trim().toLowerCase();
|
|
584
|
-
if (i === "normal") return Math.round(r * 1.2);
|
|
585
|
-
if (i.endsWith("px"))
|
|
586
|
-
return parseFloat(i) || Math.round(r * 1.2);
|
|
587
|
-
if (i.endsWith("%"))
|
|
588
|
-
return parseFloat(i) / 100 * r || Math.round(r * 1.2);
|
|
589
|
-
if (i.endsWith("em")) return (parseFloat(i) || 1) * r;
|
|
590
|
-
if (i.endsWith("rem")) {
|
|
591
|
-
const a = parseFloat(
|
|
592
|
-
getComputedStyle(document.documentElement).fontSize
|
|
593
|
-
) || r;
|
|
594
|
-
return (parseFloat(i) || 1) * a;
|
|
595
|
-
}
|
|
596
|
-
const s = Number(i);
|
|
597
|
-
return Number.isFinite(s) ? s * r : Math.round(r * 1.2);
|
|
598
|
-
}, it = (n) => {
|
|
599
|
-
const r = (s) => {
|
|
600
|
-
const a = (s || "").trim().toLowerCase();
|
|
601
|
-
if (a.endsWith("px")) return parseFloat(a) || 0;
|
|
602
|
-
if (a.endsWith("rem")) {
|
|
603
|
-
const m = parseFloat(
|
|
604
|
-
getComputedStyle(document.documentElement).fontSize
|
|
605
|
-
) || 16;
|
|
606
|
-
return (parseFloat(a) || 0) * m;
|
|
607
|
-
}
|
|
608
|
-
if (a.endsWith("em")) {
|
|
609
|
-
const m = parseFloat(
|
|
610
|
-
getComputedStyle(document.body).fontSize
|
|
611
|
-
) || 16;
|
|
612
|
-
return (parseFloat(a) || 0) * m;
|
|
613
|
-
}
|
|
614
|
-
const l = Number(a);
|
|
615
|
-
return Number.isFinite(l) ? l : 0;
|
|
616
|
-
}, i = (n || "").split(/\s+/).map(r).filter(Number.isFinite);
|
|
617
|
-
return i.length ? i.length === 1 ? [i[0], i[0], i[0], i[0]] : i.length === 2 ? [i[0], i[1], i[0], i[1]] : i.length === 3 ? [i[0], i[1], i[2], i[1]] : [i[0], i[1], i[2], i[3]] : [0, 0, 0, 0];
|
|
618
|
-
}, st = (n, r) => {
|
|
619
|
-
const i = gt(n);
|
|
620
|
-
let s = i.getPropertyValue("font-family") || r?.ff || "system-ui";
|
|
621
|
-
s = wt(s);
|
|
622
|
-
let a = parseFloat(i.getPropertyValue("font-size"));
|
|
623
|
-
Number.isFinite(a) || (a = r?.fs || 14);
|
|
624
|
-
const l = i.getPropertyValue("font-weight") || r?.fw || "400", m = i.getPropertyValue("font-style") || r?.fsty || "normal", d = i.getPropertyValue("font-stretch") || r?.fstc || "normal", k = i.getPropertyValue("letter-spacing") || r?.lsp || "normal", g = i.getPropertyValue("word-spacing") || r?.wsp || "0px", x = i.getPropertyValue("font-kerning") || r?.kern || "auto", _ = i.getPropertyValue("font-variant-ligatures") || r?.liga || "normal", H = i.getPropertyValue("text-transform") || r?.ttfm || "none", Q = i.getPropertyValue("color") || r?.fill || "#000", Y = i.getPropertyValue("line-height"), mt = !Y || Y.trim().toLowerCase() === "normal" ? r?.lh ?? Math.round(a * 1.2) : O(Y, a), p = (i.getPropertyValue("text-align") || r?.ta || "start").trim().toLowerCase();
|
|
625
|
-
let tt = parseFloat(i.getPropertyValue("padding-top")) || 0, pt = parseFloat(i.getPropertyValue("padding-right")) || 0, bt = parseFloat(i.getPropertyValue("padding-bottom")) || 0, xt = parseFloat(i.getPropertyValue("padding-left")) || 0;
|
|
626
|
-
const St = i.getPropertyValue("padding");
|
|
627
|
-
if (St && tt === 0 && pt === 0 && bt === 0 && xt === 0) {
|
|
628
|
-
const [kt, Ft, _t, zt] = it(St);
|
|
629
|
-
tt = kt, pt = Ft, bt = _t, xt = zt;
|
|
630
|
-
}
|
|
631
|
-
const Nt = parseFloat(i.getPropertyValue("border-left-width")) || 0, vt = parseFloat(i.getPropertyValue("border-right-width")) || 0, $t = i.getPropertyValue("box-sizing") || "content-box";
|
|
632
|
-
return {
|
|
633
|
-
ff: s,
|
|
634
|
-
fs: a,
|
|
635
|
-
fw: l,
|
|
636
|
-
fsty: m,
|
|
637
|
-
fstc: d,
|
|
638
|
-
lsp: k,
|
|
639
|
-
wsp: g,
|
|
640
|
-
kern: x,
|
|
641
|
-
liga: _,
|
|
642
|
-
ttfm: H,
|
|
643
|
-
fill: Q,
|
|
644
|
-
lh: mt,
|
|
645
|
-
ta: p,
|
|
646
|
-
padL: xt,
|
|
647
|
-
padR: pt,
|
|
648
|
-
padT: tt,
|
|
649
|
-
padB: bt,
|
|
650
|
-
bL: Nt,
|
|
651
|
-
bR: vt,
|
|
652
|
-
box: $t
|
|
653
|
-
};
|
|
654
|
-
}, dt = (n) => /^(div|p|section|article|ul|ol|li|h[1-6])$/.test(n), q = { __para__: !0 }, ht = { __br__: !0 }, B = [], K = st(f), ct = (n, r, i) => {
|
|
655
|
-
if (n.nodeType === 3) {
|
|
656
|
-
const m = (n.nodeValue || "").replace(/\s+/g, " ").trim();
|
|
657
|
-
m && B.push({ text: m, style: r, path: i.slice() });
|
|
658
|
-
return;
|
|
659
|
-
}
|
|
660
|
-
if (n.nodeType !== 1) return;
|
|
661
|
-
const s = n.tagName.toLowerCase();
|
|
662
|
-
if (s === "br") {
|
|
663
|
-
B.push({ ...ht, path: i.slice() });
|
|
664
|
-
return;
|
|
665
|
-
}
|
|
666
|
-
const a = st(n, r);
|
|
667
|
-
i.push(n);
|
|
668
|
-
for (const l of Array.from(n.childNodes))
|
|
669
|
-
ct(l, a, i);
|
|
670
|
-
i.pop(), dt(s) && B.push({ ...q, path: i.slice() });
|
|
671
|
-
};
|
|
672
|
-
for (ct(f, K, [f]); B.length && (B.at(-1).__para__ || B.at(-1).__br__); )
|
|
673
|
-
B.pop();
|
|
674
|
-
if (!B.length) return null;
|
|
675
|
-
const U = B.filter((n) => !n.__para__ && !n.__br__), G = (() => {
|
|
676
|
-
if (!U.length) return [f];
|
|
677
|
-
const n = U.map((s) => s.path), r = Math.min(...n.map((s) => s.length));
|
|
678
|
-
let i = 0;
|
|
679
|
-
for (; i < r; ) {
|
|
680
|
-
const s = n[0][i];
|
|
681
|
-
if (n.every((a) => a[i] === s)) i += 1;
|
|
682
|
-
else break;
|
|
683
|
-
}
|
|
684
|
-
return n[0].slice(0, Math.max(1, i));
|
|
685
|
-
})(), ut = G[G.length - 1] || f, Z = st(ut);
|
|
686
|
-
let ft = 0, e = 0, o = 0;
|
|
687
|
-
for (const n of G) {
|
|
688
|
-
const r = st(n);
|
|
689
|
-
ft += r.padL, e += r.padR, o += r.padT;
|
|
690
|
-
}
|
|
691
|
-
const h = [Math.max(1, L - ft - e)];
|
|
692
|
-
for (const n of G)
|
|
693
|
-
try {
|
|
694
|
-
const r = gt(n);
|
|
695
|
-
if (n.clientWidth && n.clientWidth > 0) {
|
|
696
|
-
const a = parseFloat(r.paddingLeft) || 0, l = parseFloat(r.paddingRight) || 0, m = Math.max(1, n.clientWidth - a - l);
|
|
697
|
-
h.push(m);
|
|
698
|
-
}
|
|
699
|
-
const i = r.width, s = parseFloat(i);
|
|
700
|
-
if (Number.isFinite(s) && s > 0) {
|
|
701
|
-
const a = r.boxSizing || r.getPropertyValue("box-sizing") || "content-box", l = parseFloat(r.paddingLeft) || 0, m = parseFloat(r.paddingRight) || 0, d = parseFloat(r.borderLeftWidth) || 0, k = parseFloat(r.borderRightWidth) || 0, g = a === "border-box" ? Math.max(1, s - l - m - d - k) : Math.max(1, s);
|
|
702
|
-
h.push(g);
|
|
703
|
-
}
|
|
704
|
-
} catch {
|
|
705
|
-
}
|
|
706
|
-
let u = Math.floor(Math.min(...h.filter(Number.isFinite))) - 1;
|
|
707
|
-
u > 0 || (u = 1);
|
|
708
|
-
let c = "start", t = $ + ft;
|
|
709
|
-
Z.ta === "center" ? (c = "middle", t = $ + ft + u / 2) : (Z.ta === "right" || Z.ta === "end") && (c = "end", t = $ + (L - e));
|
|
710
|
-
const S = b.ownerSVGElement || b.closest("svg"), w = document.createElementNS(et, "text");
|
|
711
|
-
w.setAttribute("x", String(t)), w.setAttribute("y", String(z + o)), w.setAttribute("text-anchor", c), w.setAttribute("dominant-baseline", "text-before-edge"), w.setAttribute("xml:space", "preserve");
|
|
712
|
-
const A = document.createElementNS(et, "text");
|
|
713
|
-
A.setAttribute("x", "0"), A.setAttribute("y", "0"), A.setAttribute("opacity", "0"), (S || b).appendChild(A);
|
|
714
|
-
const C = (n) => `font-family:${n.ff}; font-size:${n.fs}px; font-weight:${n.fw}; font-style:${n.fsty}; font-stretch:${n.fstc}; letter-spacing:${n.lsp}; word-spacing:${n.wsp}; font-kerning:${n.kern}; font-variant-ligatures:${n.liga}; text-transform:${n.ttfm};`, M = (n, r) => (A.textContent = n || "", A.setAttribute("style", C(r)), A.getComputedTextLength()), X = (n) => M(" ", n), D = [];
|
|
715
|
-
let T = [], R = 0;
|
|
716
|
-
const J = () => {
|
|
717
|
-
T.length && D.push({ segs: T.slice() }), T = [], R = 0;
|
|
718
|
-
}, E = (n, r, i) => {
|
|
719
|
-
let s = M(n, r);
|
|
720
|
-
if (i) {
|
|
721
|
-
const a = X(r);
|
|
722
|
-
s += a, T.push({ text: " ", ...r, w: a, isSpace: !0 });
|
|
723
|
-
}
|
|
724
|
-
T.push({ text: n, ...r, w: s }), R += s;
|
|
725
|
-
}, V = (n, r, i) => {
|
|
726
|
-
let s = "";
|
|
727
|
-
for (const a of n) {
|
|
728
|
-
const l = s + a;
|
|
729
|
-
if (M(l, r) <= i) s = l;
|
|
730
|
-
else break;
|
|
731
|
-
}
|
|
732
|
-
return s || n[0] || "";
|
|
733
|
-
};
|
|
734
|
-
for (const n of B) {
|
|
735
|
-
if (n.__para__ || n.__br__) {
|
|
736
|
-
J();
|
|
737
|
-
continue;
|
|
738
|
-
}
|
|
739
|
-
const r = n.style, i = n.text.split(/(\s+)/).filter((l) => l.length > 0), s = (l, m) => {
|
|
740
|
-
if (!l) return;
|
|
741
|
-
const d = Math.max(1, u), k = M(l, r) + (m ? X(r) : 0);
|
|
742
|
-
if (T.length === 0)
|
|
743
|
-
if (k <= d)
|
|
744
|
-
E(l, r, !1);
|
|
745
|
-
else {
|
|
746
|
-
let g = l;
|
|
747
|
-
for (; g; ) {
|
|
748
|
-
const x = V(g, r, d);
|
|
749
|
-
E(x, r, !1), g = g.slice(x.length), g && J();
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
else if (R + k <= d)
|
|
753
|
-
E(l, r, m);
|
|
754
|
-
else if (J(), M(l, r) <= d)
|
|
755
|
-
E(l, r, !1);
|
|
756
|
-
else {
|
|
757
|
-
let g = l;
|
|
758
|
-
for (; g; ) {
|
|
759
|
-
const x = V(g, r, d);
|
|
760
|
-
E(x, r, !1), g = g.slice(x.length), g && J();
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
};
|
|
764
|
-
let a = !1;
|
|
765
|
-
for (const l of i) {
|
|
766
|
-
if (/^\s+$/.test(l)) {
|
|
767
|
-
a = !0;
|
|
768
|
-
continue;
|
|
769
|
-
}
|
|
770
|
-
s(l, a), a = !1;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
J();
|
|
774
|
-
for (let n = 0; n < D.length; n += 1) {
|
|
775
|
-
const r = D[n].segs, i = Math.max(
|
|
776
|
-
...r.map((a) => a.fs || Z.fs),
|
|
777
|
-
Z.fs
|
|
778
|
-
);
|
|
779
|
-
let s = !0;
|
|
780
|
-
for (const a of r) {
|
|
781
|
-
const l = document.createElementNS(et, "tspan");
|
|
782
|
-
s && (l.setAttribute("x", String(t)), n > 0 && l.setAttribute("dy", String(i)), s = !1), l.setAttribute(
|
|
783
|
-
"style",
|
|
784
|
-
`${C(a)} fill:${a.fill};`
|
|
785
|
-
), l.textContent = a.text, w.appendChild(l);
|
|
786
|
-
}
|
|
787
|
-
if (!r.length && n > 0) {
|
|
788
|
-
const a = document.createElementNS(et, "tspan");
|
|
789
|
-
a.setAttribute("x", String(t)), a.setAttribute("dy", String(i)), a.textContent = "", w.appendChild(a);
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
try {
|
|
793
|
-
A.remove();
|
|
794
|
-
} catch {
|
|
795
|
-
}
|
|
796
|
-
return w;
|
|
797
|
-
} catch {
|
|
798
|
-
return null;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
const j = (b) => {
|
|
802
|
-
try {
|
|
803
|
-
const f = document.createElement("div");
|
|
804
|
-
f.style.position = "absolute", f.style.left = "-99999px", f.style.top = "-99999px", f.style.visibility = "hidden", f.style.pointerEvents = "none", f.style.width = "auto", f.style.height = "auto";
|
|
805
|
-
const y = b.cloneNode(!0);
|
|
806
|
-
y.style.width = "auto", y.style.height = "auto", y.style.display = "inline-block", y.style.maxWidth = "none", y.style.maxHeight = "none", y.style.boxSizing = "content-box", document.body.appendChild(f), f.appendChild(y);
|
|
807
|
-
const $ = y.getBoundingClientRect(), z = Math.ceil($.width || y.scrollWidth || 0), L = Math.ceil($.height || y.scrollHeight || 0);
|
|
808
|
-
return f.remove(), { w: Math.max(1, z), h: Math.max(1, L) };
|
|
809
|
-
} catch {
|
|
810
|
-
return { w: 0, h: 0 };
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
for (const b of F)
|
|
814
|
-
try {
|
|
815
|
-
if (b.hasAttribute("data-no-svg-export")) {
|
|
816
|
-
b.remove(), I += 1;
|
|
817
|
-
continue;
|
|
818
|
-
}
|
|
819
|
-
if (nt(b)) {
|
|
820
|
-
const f = W(b);
|
|
821
|
-
if (f) {
|
|
822
|
-
b.parentNode.replaceChild(f, b), rt += 1;
|
|
823
|
-
continue;
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
I += 1;
|
|
827
|
-
} catch {
|
|
828
|
-
at += 1;
|
|
829
|
-
}
|
|
830
|
-
if (v === "raster") {
|
|
831
|
-
const b = Array.from(N.querySelectorAll("foreignObject"));
|
|
832
|
-
for (const f of b)
|
|
833
|
-
try {
|
|
834
|
-
if (f.hasAttribute("data-no-svg-export")) {
|
|
835
|
-
f.remove(), I += 1;
|
|
836
|
-
continue;
|
|
837
|
-
}
|
|
838
|
-
await new Promise((G) => requestAnimationFrame(G));
|
|
839
|
-
const y = f.getBBox();
|
|
840
|
-
let $ = Math.max(1, Math.ceil(y.width)), z = Math.max(1, Math.ceil(y.height));
|
|
841
|
-
const L = f.firstElementChild;
|
|
842
|
-
if (L) {
|
|
843
|
-
const G = j(L), ut = parseFloat(f.getAttribute("width") || "0") || 0, Z = parseFloat(f.getAttribute("height") || "0") || 0;
|
|
844
|
-
$ = Math.max($, ut, G.w), z = Math.max(z, Z, G.h);
|
|
845
|
-
}
|
|
846
|
-
if (!($ > 0 && z > 0)) {
|
|
847
|
-
I += 1;
|
|
848
|
-
continue;
|
|
849
|
-
}
|
|
850
|
-
const O = document.createElementNS(et, "svg");
|
|
851
|
-
O.setAttribute("xmlns", et), O.setAttribute("xmlns:xlink", yt), O.setAttribute("width", String($)), O.setAttribute("height", String(z)), O.setAttribute("viewBox", `0 0 ${$} ${z}`);
|
|
852
|
-
const it = f.cloneNode(!0);
|
|
853
|
-
it.setAttribute("x", "0"), it.setAttribute("y", "0"), it.setAttribute("width", String($)), it.setAttribute("height", String(z)), O.appendChild(it);
|
|
854
|
-
const st = new XMLSerializer().serializeToString(O), dt = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(st), q = document.createElement("canvas"), ht = 2;
|
|
855
|
-
q.width = Math.max(1, Math.floor($ * ht)), q.height = Math.max(1, Math.floor(z * ht));
|
|
856
|
-
const B = q.getContext("2d"), K = new Image();
|
|
857
|
-
K.decoding = "sync", K.crossOrigin = "anonymous", await new Promise((G, ut) => {
|
|
858
|
-
K.onload = G, K.onerror = ut, K.src = dt;
|
|
859
|
-
}), B.drawImage(K, 0, 0, q.width, q.height);
|
|
860
|
-
const ct = q.toDataURL("image/png"), U = document.createElementNS(et, "image");
|
|
861
|
-
U.setAttributeNS(yt, "href", ct), U.setAttribute("href", ct), U.setAttribute("x", f.getAttribute("x") || String(y.x)), U.setAttribute("y", f.getAttribute("y") || String(y.y)), U.setAttribute("width", String($)), U.setAttribute("height", String(z)), f.parentNode.replaceChild(U, f), ot += 1;
|
|
862
|
-
} catch {
|
|
863
|
-
at += 1;
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
return { converted: rt, rasterized: ot, skipped: I, errors: at };
|
|
867
|
-
}
|
|
868
|
-
export {
|
|
869
|
-
Ot as u
|
|
870
|
-
};
|