reke-ui 0.3.0 → 0.4.1
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 +6 -0
- package/custom-elements.json +1888 -445
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/components/reke-chip/reke-chip.d.ts +7 -0
- package/dist/components/reke-chip/reke-chip.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.js +8 -2
- package/dist/components/reke-chip/reke-chip.styles.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.styles.js +32 -0
- package/dist/components/reke-combobox/reke-combobox.d.ts +21 -1
- package/dist/components/reke-combobox/reke-combobox.d.ts.map +1 -1
- package/dist/components/reke-combobox/reke-combobox.js +76 -16
- package/dist/components/reke-combobox/reke-combobox.styles.d.ts.map +1 -1
- package/dist/components/reke-combobox/reke-combobox.styles.js +128 -0
- package/dist/components/reke-input/reke-input.d.ts +14 -0
- package/dist/components/reke-input/reke-input.d.ts.map +1 -1
- package/dist/components/reke-input/reke-input.js +41 -22
- package/dist/components/reke-input/reke-input.styles.d.ts.map +1 -1
- package/dist/components/reke-input/reke-input.styles.js +44 -16
- package/dist/components/reke-menu/reke-menu.d.ts +51 -0
- package/dist/components/reke-menu/reke-menu.d.ts.map +1 -0
- package/dist/components/reke-menu/reke-menu.js +106 -0
- package/dist/components/reke-menu/reke-menu.styles.d.ts +2 -0
- package/dist/components/reke-menu/reke-menu.styles.d.ts.map +1 -0
- package/dist/components/reke-menu/reke-menu.styles.js +25 -0
- package/dist/components/reke-menu-item/reke-menu-item.d.ts +32 -0
- package/dist/components/reke-menu-item/reke-menu-item.d.ts.map +1 -0
- package/dist/components/reke-menu-item/reke-menu-item.js +49 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.d.ts +2 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.d.ts.map +1 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.js +53 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts +59 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts.map +1 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.js +117 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts +2 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts.map +1 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.js +28 -0
- package/dist/components/reke-table/reke-table.d.ts +202 -3
- package/dist/components/reke-table/reke-table.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.js +244 -64
- package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.styles.js +29 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -7
- package/dist/node_modules/echarts/lib/animation/basicTransition.js +70 -0
- package/dist/node_modules/echarts/lib/chart/custom/customSeriesRegister.js +7 -0
- package/dist/node_modules/echarts/lib/chart/helper/createRenderPlanner.js +11 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +11 -0
- package/dist/node_modules/echarts/lib/chart/helper/sectorHelper.js +19 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieSeries.js +112 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieView.js +119 -0
- package/dist/node_modules/echarts/lib/chart/pie/install.js +12 -0
- package/dist/node_modules/echarts/lib/chart/pie/labelLayout.js +190 -0
- package/dist/node_modules/echarts/lib/chart/pie/pieLayout.js +72 -0
- package/dist/node_modules/echarts/lib/component/axis/AxisBuilder.js +554 -0
- package/dist/node_modules/echarts/lib/component/axis/AxisView.js +36 -0
- package/dist/node_modules/echarts/lib/component/axis/axisAction.js +4 -0
- package/dist/node_modules/echarts/lib/component/axis/axisBreakHelper.js +5 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js +57 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/AxisPointerView.js +28 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +174 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +65 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/axisTrigger.js +189 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js +27 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/globalListener.js +56 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/install.js +25 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/modelHelper.js +117 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/viewHelper.js +103 -0
- package/dist/node_modules/echarts/lib/component/helper/listComponent.js +20 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendModel.js +184 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendView.js +227 -0
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendModel.js +45 -0
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +145 -0
- package/dist/node_modules/echarts/lib/component/legend/install.js +9 -0
- package/dist/node_modules/echarts/lib/component/legend/installLegendPlain.js +12 -0
- package/dist/node_modules/echarts/lib/component/legend/installLegendScroll.js +11 -0
- package/dist/node_modules/echarts/lib/component/legend/legendAction.js +38 -0
- package/dist/node_modules/echarts/lib/component/legend/legendFilter.js +12 -0
- package/dist/node_modules/echarts/lib/component/legend/scrollableLegendAction.js +15 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js +170 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipModel.js +55 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +102 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipView.js +367 -0
- package/dist/node_modules/echarts/lib/component/tooltip/helper.js +37 -0
- package/dist/node_modules/echarts/lib/component/tooltip/install.js +19 -0
- package/dist/node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.js +56 -0
- package/dist/node_modules/echarts/lib/component/tooltip/tooltipMarkup.js +173 -0
- package/dist/node_modules/echarts/lib/coord/axisBand.js +31 -0
- package/dist/node_modules/echarts/lib/coord/axisHelper.js +21 -0
- package/dist/node_modules/echarts/lib/coord/axisStatistics.js +38 -0
- package/dist/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +14 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +31 -0
- package/dist/node_modules/echarts/lib/core/CoordinateSystem.js +50 -0
- package/dist/node_modules/echarts/lib/core/ExtensionAPI.js +32 -0
- package/dist/node_modules/echarts/lib/core/Scheduler.js +203 -0
- package/dist/node_modules/echarts/lib/core/echarts.js +986 -0
- package/dist/node_modules/echarts/lib/core/impl.js +11 -0
- package/dist/node_modules/echarts/lib/core/lifecycle.js +5 -0
- package/dist/node_modules/echarts/lib/core/locale.js +27 -0
- package/dist/node_modules/echarts/lib/core/task.js +81 -0
- package/dist/node_modules/echarts/lib/data/DataDiffer.js +68 -0
- package/dist/node_modules/echarts/lib/data/DataStore.js +359 -0
- package/dist/node_modules/echarts/lib/data/SeriesData.js +328 -0
- package/dist/node_modules/echarts/lib/data/SeriesDimensionDefine.js +10 -0
- package/dist/node_modules/echarts/lib/data/Source.js +132 -0
- package/dist/node_modules/echarts/lib/data/helper/SeriesDataSchema.js +80 -0
- package/dist/node_modules/echarts/lib/data/helper/createDimensions.js +105 -0
- package/dist/node_modules/echarts/lib/data/helper/dataProvider.js +155 -0
- package/dist/node_modules/echarts/lib/data/helper/dataValueHelper.js +87 -0
- package/dist/node_modules/echarts/lib/data/helper/dimensionHelper.js +50 -0
- package/dist/node_modules/echarts/lib/data/helper/sourceHelper.js +98 -0
- package/dist/node_modules/echarts/lib/data/helper/sourceManager.js +115 -0
- package/dist/node_modules/echarts/lib/data/helper/transform.js +145 -0
- package/dist/node_modules/echarts/lib/extension.js +62 -0
- package/dist/node_modules/echarts/lib/i18n/langEN.js +148 -0
- package/dist/node_modules/echarts/lib/i18n/langZH.js +148 -0
- package/dist/node_modules/echarts/lib/label/labelGuideHelper.js +106 -0
- package/dist/node_modules/echarts/lib/label/labelLayoutHelper.js +152 -0
- package/dist/node_modules/echarts/lib/label/labelStyle.js +190 -0
- package/dist/node_modules/echarts/lib/legacy/dataSelectAction.js +53 -0
- package/dist/node_modules/echarts/lib/loading/default.js +85 -0
- package/dist/node_modules/echarts/lib/model/Component.js +64 -0
- package/dist/node_modules/echarts/lib/model/Global.js +320 -0
- package/dist/node_modules/echarts/lib/model/Model.js +50 -0
- package/dist/node_modules/echarts/lib/model/OptionManager.js +78 -0
- package/dist/node_modules/echarts/lib/model/Series.js +216 -0
- package/dist/node_modules/echarts/lib/model/globalDefault.js +94 -0
- package/dist/node_modules/echarts/lib/model/internalComponentCreator.js +14 -0
- package/dist/node_modules/echarts/lib/model/mixin/areaStyle.js +16 -0
- package/dist/node_modules/echarts/lib/model/mixin/dataFormat.js +63 -0
- package/dist/node_modules/echarts/lib/model/mixin/itemStyle.js +24 -0
- package/dist/node_modules/echarts/lib/model/mixin/lineStyle.js +23 -0
- package/dist/node_modules/echarts/lib/model/mixin/makeStyleMapper.js +17 -0
- package/dist/node_modules/echarts/lib/model/mixin/palette.js +32 -0
- package/dist/node_modules/echarts/lib/model/mixin/textStyle.js +36 -0
- package/dist/node_modules/echarts/lib/preprocessor/backwardCompat.js +89 -0
- package/dist/node_modules/echarts/lib/preprocessor/helper/compatStyle.js +118 -0
- package/dist/node_modules/echarts/lib/processor/dataFilter.js +18 -0
- package/dist/node_modules/echarts/lib/processor/dataStack.js +52 -0
- package/dist/node_modules/echarts/lib/processor/negativeDataFilter.js +16 -0
- package/dist/node_modules/echarts/lib/renderer/installCanvasRenderer.js +7 -0
- package/dist/node_modules/echarts/lib/scale/break.js +9 -0
- package/dist/node_modules/echarts/lib/scale/helper.js +9 -0
- package/dist/node_modules/echarts/lib/scale/scaleMapper.js +26 -0
- package/dist/node_modules/echarts/lib/theme/dark.js +159 -0
- package/dist/node_modules/echarts/lib/util/ECEventProcessor.js +52 -0
- package/dist/node_modules/echarts/lib/util/clazz.js +99 -0
- package/dist/node_modules/echarts/lib/util/component.js +75 -0
- package/dist/node_modules/echarts/lib/util/cycleCache.js +14 -0
- package/dist/node_modules/echarts/lib/util/decal.js +162 -0
- package/dist/node_modules/echarts/lib/util/event.js +7 -0
- package/dist/node_modules/echarts/lib/util/format.js +87 -0
- package/dist/node_modules/echarts/lib/util/graphic.js +361 -0
- package/dist/node_modules/echarts/lib/util/innerStore.js +13 -0
- package/dist/node_modules/echarts/lib/util/layout.js +174 -0
- package/dist/node_modules/echarts/lib/util/log.js +54 -0
- package/dist/node_modules/echarts/lib/util/model.js +296 -0
- package/dist/node_modules/echarts/lib/util/number.js +132 -0
- package/dist/node_modules/echarts/lib/util/states.js +323 -0
- package/dist/node_modules/echarts/lib/util/symbol.js +146 -0
- package/dist/node_modules/echarts/lib/util/throttle.js +37 -0
- package/dist/node_modules/echarts/lib/util/time.js +43 -0
- package/dist/node_modules/echarts/lib/util/types.js +13 -0
- package/dist/node_modules/echarts/lib/view/Chart.js +81 -0
- package/dist/node_modules/echarts/lib/view/Component.js +16 -0
- package/dist/node_modules/echarts/lib/visual/LegendVisualProvider.js +18 -0
- package/dist/node_modules/echarts/lib/visual/decal.js +25 -0
- package/dist/node_modules/echarts/lib/visual/helper.js +23 -0
- package/dist/node_modules/echarts/lib/visual/style.js +79 -0
- package/dist/node_modules/echarts/lib/visual/symbol.js +47 -0
- package/dist/node_modules/echarts/lib/visual/tokens.js +108 -0
- package/dist/node_modules/echarts/node_modules/tslib/tslib.es6.js +18 -0
- package/dist/node_modules/zrender/lib/Element.js +442 -0
- package/dist/node_modules/zrender/lib/Handler.js +167 -0
- package/dist/node_modules/zrender/lib/Storage.js +68 -0
- package/dist/node_modules/zrender/lib/animation/Animation.js +65 -0
- package/dist/node_modules/zrender/lib/animation/Animator.js +348 -0
- package/dist/node_modules/zrender/lib/animation/Clip.js +31 -0
- package/dist/node_modules/zrender/lib/animation/cubicEasing.js +17 -0
- package/dist/node_modules/zrender/lib/animation/easing.js +104 -0
- package/dist/node_modules/zrender/lib/animation/requestAnimationFrame.js +7 -0
- package/dist/node_modules/zrender/lib/canvas/Layer.js +135 -0
- package/dist/node_modules/zrender/lib/canvas/Painter.js +352 -0
- package/dist/node_modules/zrender/lib/canvas/dashStyle.js +17 -0
- package/dist/node_modules/zrender/lib/canvas/graphic.js +199 -0
- package/dist/node_modules/zrender/lib/canvas/helper.js +33 -0
- package/dist/node_modules/zrender/lib/config.js +7 -0
- package/dist/node_modules/zrender/lib/contain/arc.js +20 -0
- package/dist/node_modules/zrender/lib/contain/cubic.js +9 -0
- package/dist/node_modules/zrender/lib/contain/line.js +12 -0
- package/dist/node_modules/zrender/lib/contain/path.js +133 -0
- package/dist/node_modules/zrender/lib/contain/quadratic.js +9 -0
- package/dist/node_modules/zrender/lib/contain/text.js +106 -0
- package/dist/node_modules/zrender/lib/contain/util.js +7 -0
- package/dist/node_modules/zrender/lib/contain/windingLine.js +10 -0
- package/dist/node_modules/zrender/lib/core/BoundingRect.js +111 -0
- package/dist/node_modules/zrender/lib/core/Eventful.js +82 -0
- package/dist/node_modules/zrender/lib/core/GestureMgr.js +56 -0
- package/dist/node_modules/zrender/lib/core/LRU.js +49 -0
- package/dist/node_modules/zrender/lib/core/OrientedBoundingRect.js +41 -0
- package/dist/node_modules/zrender/lib/core/PathProxy.js +288 -0
- package/dist/node_modules/zrender/lib/core/Point.js +72 -0
- package/dist/node_modules/zrender/lib/core/Transformable.js +96 -0
- package/dist/node_modules/zrender/lib/core/WeakMap.js +25 -0
- package/dist/node_modules/zrender/lib/core/bbox.js +40 -0
- package/dist/node_modules/zrender/lib/core/curve.js +142 -0
- package/dist/node_modules/zrender/lib/core/dom.js +74 -0
- package/dist/node_modules/zrender/lib/core/env.js +22 -0
- package/dist/node_modules/zrender/lib/core/event.js +58 -0
- package/dist/node_modules/zrender/lib/core/fourPointsTransform.js +109 -0
- package/dist/node_modules/zrender/lib/core/matrix.js +39 -0
- package/dist/node_modules/zrender/lib/core/platform.js +42 -0
- package/dist/node_modules/zrender/lib/core/timsort.js +246 -0
- package/dist/node_modules/zrender/lib/core/util.js +314 -0
- package/dist/node_modules/zrender/lib/core/vector.js +52 -0
- package/dist/node_modules/zrender/lib/dom/HandlerProxy.js +190 -0
- package/dist/node_modules/zrender/lib/graphic/CompoundPath.js +25 -0
- package/dist/node_modules/zrender/lib/graphic/Displayable.js +133 -0
- package/dist/node_modules/zrender/lib/graphic/Gradient.js +14 -0
- package/dist/node_modules/zrender/lib/graphic/Group.js +86 -0
- package/dist/node_modules/zrender/lib/graphic/Image.js +49 -0
- package/dist/node_modules/zrender/lib/graphic/IncrementalDisplayable.js +65 -0
- package/dist/node_modules/zrender/lib/graphic/LinearGradient.js +13 -0
- package/dist/node_modules/zrender/lib/graphic/Path.js +200 -0
- package/dist/node_modules/zrender/lib/graphic/RadialGradient.js +13 -0
- package/dist/node_modules/zrender/lib/graphic/TSpan.js +39 -0
- package/dist/node_modules/zrender/lib/graphic/Text.js +216 -0
- package/dist/node_modules/zrender/lib/graphic/helper/image.js +39 -0
- package/dist/node_modules/zrender/lib/graphic/helper/parseText.js +226 -0
- package/dist/node_modules/zrender/lib/graphic/helper/poly.js +21 -0
- package/dist/node_modules/zrender/lib/graphic/helper/roundRect.js +9 -0
- package/dist/node_modules/zrender/lib/graphic/helper/roundSector.js +85 -0
- package/dist/node_modules/zrender/lib/graphic/helper/smoothBezier.js +26 -0
- package/dist/node_modules/zrender/lib/graphic/helper/subPixelOptimize.js +25 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Arc.js +28 -0
- package/dist/node_modules/zrender/lib/graphic/shape/BezierCurve.js +40 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Circle.js +22 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Ellipse.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Line.js +37 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Polygon.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Polyline.js +28 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Rect.js +31 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Ring.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Sector.js +25 -0
- package/dist/node_modules/zrender/lib/mixin/Draggable.js +28 -0
- package/dist/node_modules/zrender/lib/svg/helper.js +19 -0
- package/dist/node_modules/zrender/lib/tool/color.js +1039 -0
- package/dist/node_modules/zrender/lib/tool/path.js +153 -0
- package/dist/node_modules/zrender/lib/tool/transformPath.js +41 -0
- package/dist/node_modules/zrender/lib/zrender.js +124 -0
- package/dist/node_modules/zrender/node_modules/tslib/tslib.es6.js +18 -0
- package/dist/react-bridge/table.d.ts.map +1 -1
- package/dist/react-bridge/table.js +36 -21
- package/dist/react.d.ts +8 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +58 -46
- package/dist/shared/base-element.d.ts +1 -0
- package/dist/shared/base-element.d.ts.map +1 -1
- package/dist/shared/base-element.js +6 -0
- package/dist/shared/tailwind.js +1 -1
- package/dist/tokens/reke-tokens.css +15 -0
- package/package.json +15 -1
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import "../core/platform.js";
|
|
2
|
+
import { RADIAN_TO_DEGREE as e } from "../core/util.js";
|
|
3
|
+
import { DEFAULT_COMMON_STYLE as t } from "../graphic/Displayable.js";
|
|
4
|
+
import n from "../core/PathProxy.js";
|
|
5
|
+
import r from "../graphic/Path.js";
|
|
6
|
+
import i from "../graphic/Image.js";
|
|
7
|
+
import { createOrUpdateImage as a, isImageReady as o } from "../graphic/helper/image.js";
|
|
8
|
+
import s from "../graphic/TSpan.js";
|
|
9
|
+
import { getCanvasGradient as c, isClipPathChanged as l } from "./helper.js";
|
|
10
|
+
import { getLineDash as u } from "./dashStyle.js";
|
|
11
|
+
//#region node_modules/zrender/lib/canvas/graphic.js
|
|
12
|
+
var d = new n(!0);
|
|
13
|
+
function f(e) {
|
|
14
|
+
var t = e.stroke;
|
|
15
|
+
return !(t == null || t === "none" || !(e.lineWidth > 0));
|
|
16
|
+
}
|
|
17
|
+
function p(e) {
|
|
18
|
+
return typeof e == "string" && e !== "none";
|
|
19
|
+
}
|
|
20
|
+
function m(e) {
|
|
21
|
+
var t = e.fill;
|
|
22
|
+
return t != null && t !== "none";
|
|
23
|
+
}
|
|
24
|
+
function h(e, t) {
|
|
25
|
+
if (t.fillOpacity != null && t.fillOpacity !== 1) {
|
|
26
|
+
var n = e.globalAlpha;
|
|
27
|
+
e.globalAlpha = t.fillOpacity * t.opacity, e.fill(), e.globalAlpha = n;
|
|
28
|
+
} else e.fill();
|
|
29
|
+
}
|
|
30
|
+
function g(e, t) {
|
|
31
|
+
if (t.strokeOpacity != null && t.strokeOpacity !== 1) {
|
|
32
|
+
var n = e.globalAlpha;
|
|
33
|
+
e.globalAlpha = t.strokeOpacity * t.opacity, e.stroke(), e.globalAlpha = n;
|
|
34
|
+
} else e.stroke();
|
|
35
|
+
}
|
|
36
|
+
function _(t, n, r) {
|
|
37
|
+
var i = a(n.image, n.__image, r);
|
|
38
|
+
if (o(i)) {
|
|
39
|
+
var s = t.createPattern(i, n.repeat || "repeat");
|
|
40
|
+
if (typeof DOMMatrix == "function" && s && s.setTransform) {
|
|
41
|
+
var c = new DOMMatrix();
|
|
42
|
+
c.translateSelf(n.x || 0, n.y || 0), c.rotateSelf(0, 0, (n.rotation || 0) * e), c.scaleSelf(n.scaleX || 1, n.scaleY || 1), s.setTransform(c);
|
|
43
|
+
}
|
|
44
|
+
return s;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function v(e, t, n, r, i) {
|
|
48
|
+
var a, o = f(n), s = m(n), l = n.strokePercent, p = l < 1, v = !t.path;
|
|
49
|
+
(!t.silent || p) && v && t.createPathProxy();
|
|
50
|
+
var y = t.path || d, b = t.__dirty;
|
|
51
|
+
if (!r) {
|
|
52
|
+
var x = n.fill, S = n.stroke, C = s && !!x.colorStops, w = o && !!S.colorStops, T = s && !!x.image, E = o && !!S.image, D = void 0, O = void 0, k = void 0, A = void 0, j = void 0;
|
|
53
|
+
(C || w) && (j = t.getBoundingRect()), C && (D = b ? c(e, x, j) : t.__canvasFillGradient, t.__canvasFillGradient = D), w && (O = b ? c(e, S, j) : t.__canvasStrokeGradient, t.__canvasStrokeGradient = O), T && (k = b || !t.__canvasFillPattern ? _(e, x, t) : t.__canvasFillPattern, t.__canvasFillPattern = k), E && (A = b || !t.__canvasStrokePattern ? _(e, S, t) : t.__canvasStrokePattern, t.__canvasStrokePattern = A), C ? e.fillStyle = D : T && (k ? e.fillStyle = k : s = !1), w ? e.strokeStyle = O : E && (A ? e.strokeStyle = A : o = !1);
|
|
54
|
+
}
|
|
55
|
+
var M = t.getGlobalScale();
|
|
56
|
+
y.setScale(M[0], M[1], t.segmentIgnoreThreshold);
|
|
57
|
+
var N, P;
|
|
58
|
+
e.setLineDash && n.lineDash && (a = u(t), N = a[0], P = a[1]);
|
|
59
|
+
var F = !0;
|
|
60
|
+
(v || b & 4) && (y.setDPR(e.dpr), p ? y.setContext(null) : (y.setContext(e), F = !1), y.reset(), t.buildPath(y, t.shape, r), y.toStatic(), t.pathUpdated()), F && y.rebuildPath(e, p ? l : 1), N && (e.setLineDash(N), e.lineDashOffset = P), r ? (i.batchFill = s, i.batchStroke = o) : n.strokeFirst ? (o && g(e, n), s && h(e, n)) : (s && h(e, n), o && g(e, n)), N && e.setLineDash([]);
|
|
61
|
+
}
|
|
62
|
+
function y(e, t, n) {
|
|
63
|
+
var r = t.__image = a(n.image, t.__image, t, t.onload);
|
|
64
|
+
if (!(!r || !o(r))) {
|
|
65
|
+
var i = n.x || 0, s = n.y || 0, c = t.getWidth(), l = t.getHeight(), u = r.width / r.height;
|
|
66
|
+
if (c == null && l != null ? c = l * u : l == null && c != null ? l = c / u : c == null && l == null && (c = r.width, l = r.height), n.sWidth && n.sHeight) {
|
|
67
|
+
var d = n.sx || 0, f = n.sy || 0;
|
|
68
|
+
e.drawImage(r, d, f, n.sWidth, n.sHeight, i, s, c, l);
|
|
69
|
+
} else if (n.sx && n.sy) {
|
|
70
|
+
var d = n.sx, f = n.sy, p = c - d, m = l - f;
|
|
71
|
+
e.drawImage(r, d, f, p, m, i, s, c, l);
|
|
72
|
+
} else e.drawImage(r, i, s, c, l);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function b(e, t, n) {
|
|
76
|
+
var r, i = n.text;
|
|
77
|
+
if (i != null && (i += ""), i) {
|
|
78
|
+
e.font = n.font || "12px sans-serif", e.textAlign = n.textAlign, e.textBaseline = n.textBaseline;
|
|
79
|
+
var a = void 0, o = void 0;
|
|
80
|
+
e.setLineDash && n.lineDash && (r = u(t), a = r[0], o = r[1]), a && (e.setLineDash(a), e.lineDashOffset = o), n.strokeFirst ? (f(n) && e.strokeText(i, n.x, n.y), m(n) && e.fillText(i, n.x, n.y)) : (m(n) && e.fillText(i, n.x, n.y), f(n) && e.strokeText(i, n.x, n.y)), a && e.setLineDash([]);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
var x = [
|
|
84
|
+
"shadowBlur",
|
|
85
|
+
"shadowOffsetX",
|
|
86
|
+
"shadowOffsetY"
|
|
87
|
+
], S = [
|
|
88
|
+
["lineCap", "butt"],
|
|
89
|
+
["lineJoin", "miter"],
|
|
90
|
+
["miterLimit", 10]
|
|
91
|
+
];
|
|
92
|
+
function C(e, n, r, i, a) {
|
|
93
|
+
var o = !1;
|
|
94
|
+
if (!i && (r ||= {}, n === r)) return !1;
|
|
95
|
+
if (i || n.opacity !== r.opacity) {
|
|
96
|
+
P(e, a), o = !0;
|
|
97
|
+
var s = Math.max(Math.min(n.opacity, 1), 0);
|
|
98
|
+
e.globalAlpha = isNaN(s) ? t.opacity : s;
|
|
99
|
+
}
|
|
100
|
+
(i || n.blend !== r.blend) && (o ||= (P(e, a), !0), e.globalCompositeOperation = n.blend || t.blend);
|
|
101
|
+
for (var c = 0; c < x.length; c++) {
|
|
102
|
+
var l = x[c];
|
|
103
|
+
(i || n[l] !== r[l]) && (o ||= (P(e, a), !0), e[l] = e.dpr * (n[l] || 0));
|
|
104
|
+
}
|
|
105
|
+
return (i || n.shadowColor !== r.shadowColor) && (o ||= (P(e, a), !0), e.shadowColor = n.shadowColor || t.shadowColor), o;
|
|
106
|
+
}
|
|
107
|
+
function w(e, t, n, r, i) {
|
|
108
|
+
var a = t.style, o = r ? null : n && n.style || {};
|
|
109
|
+
if (a === o) return !1;
|
|
110
|
+
var s = C(e, a, o, r, i);
|
|
111
|
+
if ((r || a.fill !== o.fill) && (s ||= (P(e, i), !0), p(a.fill) && (e.fillStyle = a.fill)), (r || a.stroke !== o.stroke) && (s ||= (P(e, i), !0), p(a.stroke) && (e.strokeStyle = a.stroke)), (r || a.opacity !== o.opacity) && (s ||= (P(e, i), !0), e.globalAlpha = a.opacity == null ? 1 : a.opacity), t.hasStroke()) {
|
|
112
|
+
var c = a.lineWidth / (a.strokeNoScale && t.getLineScale ? t.getLineScale() : 1);
|
|
113
|
+
e.lineWidth !== c && (s ||= (P(e, i), !0), e.lineWidth = c);
|
|
114
|
+
}
|
|
115
|
+
for (var l = 0; l < S.length; l++) {
|
|
116
|
+
var u = S[l], d = u[0];
|
|
117
|
+
(r || a[d] !== o[d]) && (s ||= (P(e, i), !0), e[d] = a[d] || u[1]);
|
|
118
|
+
}
|
|
119
|
+
return s;
|
|
120
|
+
}
|
|
121
|
+
function T(e, t, n, r, i) {
|
|
122
|
+
return C(e, t.style, n && n.style, r, i);
|
|
123
|
+
}
|
|
124
|
+
function E(e, t) {
|
|
125
|
+
var n = t.transform, r = e.dpr || 1;
|
|
126
|
+
n ? e.setTransform(r * n[0], r * n[1], r * n[2], r * n[3], r * n[4], r * n[5]) : e.setTransform(r, 0, 0, r, 0, 0);
|
|
127
|
+
}
|
|
128
|
+
function D(e, t, n) {
|
|
129
|
+
for (var r = !1, i = 0; i < e.length; i++) {
|
|
130
|
+
var a = e[i];
|
|
131
|
+
r ||= a.isZeroArea(), E(t, a), t.beginPath(), a.buildPath(t, a.shape), t.clip();
|
|
132
|
+
}
|
|
133
|
+
n.allClipped = r;
|
|
134
|
+
}
|
|
135
|
+
function O(e, t) {
|
|
136
|
+
return e && t ? e[0] !== t[0] || e[1] !== t[1] || e[2] !== t[2] || e[3] !== t[3] || e[4] !== t[4] || e[5] !== t[5] : !(!e && !t);
|
|
137
|
+
}
|
|
138
|
+
var k = 1, A = 2, j = 3, M = 4;
|
|
139
|
+
function N(e) {
|
|
140
|
+
var t = m(e), n = f(e);
|
|
141
|
+
return !(e.lineDash || !(t ^ +n) || t && typeof e.fill != "string" || n && typeof e.stroke != "string" || e.strokePercent < 1 || e.strokeOpacity < 1 || e.fillOpacity < 1);
|
|
142
|
+
}
|
|
143
|
+
function P(e, t) {
|
|
144
|
+
t.batchFill && (t.batchFill = !1, e.fill()), t.batchStroke && (t.batchStroke = !1, e.stroke());
|
|
145
|
+
}
|
|
146
|
+
function F(e, t) {
|
|
147
|
+
var n = {
|
|
148
|
+
inHover: !1,
|
|
149
|
+
viewWidth: 0,
|
|
150
|
+
viewHeight: 0,
|
|
151
|
+
beforeBrushParam: {}
|
|
152
|
+
};
|
|
153
|
+
I(e, t, n), L(e, n);
|
|
154
|
+
}
|
|
155
|
+
function I(e, t, n) {
|
|
156
|
+
var a = t.transform;
|
|
157
|
+
if (!t.shouldBePainted(n.viewWidth, n.viewHeight, !1, !1)) {
|
|
158
|
+
t.__dirty &= -2, t.__isRendered = !1;
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
var o = t.__clipPaths, c = n.prevElClipPaths, u = t.style, d = !1, f = !1;
|
|
162
|
+
if ((!c || l(o, c)) && (c && (P(e, n), e.restore(), f = d = !0, n.prevElClipPaths = null, n.allClipped = !1, n.prevEl = null), o && o.length && (P(e, n), e.save(), D(o, e, n), d = !0, n.prevElClipPaths = o)), n.allClipped) {
|
|
163
|
+
t.__dirty &= -2, t.__isRendered = !1;
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
t.beforeBrush && t.beforeBrush(n.beforeBrushParam), t.innerBeforeBrush();
|
|
167
|
+
var p = n.prevEl;
|
|
168
|
+
p || (f = d = !0);
|
|
169
|
+
var m = t instanceof r && t.autoBatch && N(u);
|
|
170
|
+
d || O(a, p.transform) ? (P(e, n), E(e, t)) : m || P(e, n), t instanceof r ? (n.lastDrawType !== k && (f = !0, n.lastDrawType = k), w(e, t, p, f, n), (!m || !n.batchFill && !n.batchStroke) && e.beginPath(), v(e, t, u, m, n)) : t instanceof s ? (n.lastDrawType !== j && (f = !0, n.lastDrawType = j), w(e, t, p, f, n), b(e, t, u)) : t instanceof i ? (n.lastDrawType !== A && (f = !0, n.lastDrawType = A), T(e, t, p, f, n), y(e, t, u)) : t.getTemporalDisplayables && (n.lastDrawType !== M && (f = !0, n.lastDrawType = M), R(e, t, n)), t.innerAfterBrush(), t.afterBrush && (m && P(e, n), t.afterBrush()), n.prevEl = t, t.__dirty = 0, t.__isRendered = !0;
|
|
171
|
+
}
|
|
172
|
+
function L(e, t) {
|
|
173
|
+
P(e, t), t.prevElClipPaths && e.restore();
|
|
174
|
+
}
|
|
175
|
+
function R(e, t, n) {
|
|
176
|
+
var r = t.getDisplayables(), i = t.getTemporalDisplayables();
|
|
177
|
+
e.save();
|
|
178
|
+
var a = {
|
|
179
|
+
prevElClipPaths: null,
|
|
180
|
+
prevEl: null,
|
|
181
|
+
allClipped: !1,
|
|
182
|
+
viewWidth: n.viewWidth,
|
|
183
|
+
viewHeight: n.viewHeight,
|
|
184
|
+
inHover: n.inHover,
|
|
185
|
+
beforeBrushParam: {}
|
|
186
|
+
}, o, s;
|
|
187
|
+
for (o = t.getCursor(), s = r.length; o < s; o++) {
|
|
188
|
+
var c = r[o];
|
|
189
|
+
c.beforeBrush && c.beforeBrush(n.beforeBrushParam), c.innerBeforeBrush(), I(e, c, a), c.innerAfterBrush(), c.afterBrush && c.afterBrush(), a.prevEl = c;
|
|
190
|
+
}
|
|
191
|
+
L(e, a);
|
|
192
|
+
for (var l = 0, u = i.length; l < u; l++) {
|
|
193
|
+
var c = i[l];
|
|
194
|
+
c.beforeBrush && c.beforeBrush(n.beforeBrushParam), c.innerBeforeBrush(), I(e, c, a), c.innerAfterBrush(), c.afterBrush && c.afterBrush(), a.prevEl = c;
|
|
195
|
+
}
|
|
196
|
+
L(e, a), t.clearTemporalDisplayables(), t.notClear = !0, e.restore();
|
|
197
|
+
}
|
|
198
|
+
//#endregion
|
|
199
|
+
export { I as brush, L as brushLoopFinalize, F as brushSingle, _ as createCanvasPattern };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region node_modules/zrender/lib/canvas/helper.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
return isFinite(e);
|
|
4
|
+
}
|
|
5
|
+
function t(t, n, r) {
|
|
6
|
+
var i = n.x == null ? 0 : n.x, a = n.x2 == null ? 1 : n.x2, o = n.y == null ? 0 : n.y, s = n.y2 == null ? 0 : n.y2;
|
|
7
|
+
return n.global || (i = i * r.width + r.x, a = a * r.width + r.x, o = o * r.height + r.y, s = s * r.height + r.y), i = e(i) ? i : 0, a = e(a) ? a : 1, o = e(o) ? o : 0, s = e(s) ? s : 0, t.createLinearGradient(i, o, a, s);
|
|
8
|
+
}
|
|
9
|
+
function n(t, n, r) {
|
|
10
|
+
var i = r.width, a = r.height, o = Math.min(i, a), s = n.x == null ? .5 : n.x, c = n.y == null ? .5 : n.y, l = n.r == null ? .5 : n.r;
|
|
11
|
+
return n.global || (s = s * i + r.x, c = c * a + r.y, l *= o), s = e(s) ? s : .5, c = e(c) ? c : .5, l = l >= 0 && e(l) ? l : .5, t.createRadialGradient(s, c, 0, s, c, l);
|
|
12
|
+
}
|
|
13
|
+
function r(e, r, i) {
|
|
14
|
+
for (var a = r.type === "radial" ? n(e, r, i) : t(e, r, i), o = r.colorStops, s = 0; s < o.length; s++) a.addColorStop(o[s].offset, o[s].color);
|
|
15
|
+
return a;
|
|
16
|
+
}
|
|
17
|
+
function i(e, t) {
|
|
18
|
+
if (e === t || !e && !t) return !1;
|
|
19
|
+
if (!e || !t || e.length !== t.length) return !0;
|
|
20
|
+
for (var n = 0; n < e.length; n++) if (e[n] !== t[n]) return !0;
|
|
21
|
+
return !1;
|
|
22
|
+
}
|
|
23
|
+
function a(e) {
|
|
24
|
+
return parseInt(e, 10);
|
|
25
|
+
}
|
|
26
|
+
function o(e, t, n) {
|
|
27
|
+
var r = ["width", "height"][t], i = ["clientWidth", "clientHeight"][t], o = ["paddingLeft", "paddingTop"][t], s = ["paddingRight", "paddingBottom"][t];
|
|
28
|
+
if (n[r] != null && n[r] !== "auto") return parseFloat(n[r]);
|
|
29
|
+
var c = document.defaultView.getComputedStyle(e);
|
|
30
|
+
return (e[i] || a(c[r]) || a(e.style[r])) - (a(c[o]) || 0) - (a(c[s]) || 0) || 0;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { r as getCanvasGradient, o as getSize, i as isClipPathChanged };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./core/env.js";
|
|
2
|
+
//#region node_modules/zrender/lib/config.js
|
|
3
|
+
var t = 1;
|
|
4
|
+
e.hasGlobalWindow && (t = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
|
|
5
|
+
var n = t, r = .4, i = "#333", a = "#ccc", o = "#eee";
|
|
6
|
+
//#endregion
|
|
7
|
+
export { i as DARK_LABEL_COLOR, r as DARK_MODE_THRESHOLD, o as LIGHTER_LABEL_COLOR, a as LIGHT_LABEL_COLOR, n as devicePixelRatio };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { normalizeRadian as e } from "./util.js";
|
|
2
|
+
//#region node_modules/zrender/lib/contain/arc.js
|
|
3
|
+
var t = Math.PI * 2;
|
|
4
|
+
function n(n, r, i, a, o, s, c, l, u) {
|
|
5
|
+
if (c === 0) return !1;
|
|
6
|
+
var d = c;
|
|
7
|
+
l -= n, u -= r;
|
|
8
|
+
var f = Math.sqrt(l * l + u * u);
|
|
9
|
+
if (f - d > i || f + d < i) return !1;
|
|
10
|
+
if (Math.abs(a - o) % t < 1e-4) return !0;
|
|
11
|
+
if (s) {
|
|
12
|
+
var p = a;
|
|
13
|
+
a = e(o), o = e(p);
|
|
14
|
+
} else a = e(a), o = e(o);
|
|
15
|
+
a > o && (o += t);
|
|
16
|
+
var m = Math.atan2(u, l);
|
|
17
|
+
return m < 0 && (m += t), m >= a && m <= o || m + t >= a && m + t <= o;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { n as containStroke };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { cubicProjectPoint as e } from "../core/curve.js";
|
|
2
|
+
//#region node_modules/zrender/lib/contain/cubic.js
|
|
3
|
+
function t(t, n, r, i, a, o, s, c, l, u, d) {
|
|
4
|
+
if (l === 0) return !1;
|
|
5
|
+
var f = l;
|
|
6
|
+
return d > n + f && d > i + f && d > o + f && d > c + f || d < n - f && d < i - f && d < o - f && d < c - f || u > t + f && u > r + f && u > a + f && u > s + f || u < t - f && u < r - f && u < a - f && u < s - f ? !1 : e(t, n, r, i, a, o, s, c, u, d, null) <= f / 2;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { t as containStroke };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region node_modules/zrender/lib/contain/line.js
|
|
2
|
+
function e(e, t, n, r, i, a, o) {
|
|
3
|
+
if (i === 0) return !1;
|
|
4
|
+
var s = i, c = 0, l = e;
|
|
5
|
+
if (o > t + s && o > r + s || o < t - s && o < r - s || a > e + s && a > n + s || a < e - s && a < n - s) return !1;
|
|
6
|
+
if (e !== n) c = (t - r) / (e - n), l = (e * r - n * t) / (e - n);
|
|
7
|
+
else return Math.abs(a - e) <= s / 2;
|
|
8
|
+
var u = c * a - o + l;
|
|
9
|
+
return u * u / (c * c + 1) <= s / 2 * s / 2;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as containStroke };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { cubicAt as e, cubicExtrema as t, cubicRootAt as n, quadraticAt as r, quadraticExtremum as i, quadraticRootAt as a } from "../core/curve.js";
|
|
2
|
+
import o from "../core/PathProxy.js";
|
|
3
|
+
import { containStroke as s } from "./line.js";
|
|
4
|
+
import { containStroke as c } from "./cubic.js";
|
|
5
|
+
import { containStroke as l } from "./quadratic.js";
|
|
6
|
+
import { containStroke as u } from "./arc.js";
|
|
7
|
+
import d from "./windingLine.js";
|
|
8
|
+
//#region node_modules/zrender/lib/contain/path.js
|
|
9
|
+
var f = o.CMD, p = Math.PI * 2, m = 1e-4;
|
|
10
|
+
function h(e, t) {
|
|
11
|
+
return Math.abs(e - t) < m;
|
|
12
|
+
}
|
|
13
|
+
var g = [
|
|
14
|
+
-1,
|
|
15
|
+
-1,
|
|
16
|
+
-1
|
|
17
|
+
], _ = [-1, -1];
|
|
18
|
+
function v() {
|
|
19
|
+
var e = _[0];
|
|
20
|
+
_[0] = _[1], _[1] = e;
|
|
21
|
+
}
|
|
22
|
+
function y(r, i, a, o, s, c, l, u, d, f) {
|
|
23
|
+
if (f > i && f > o && f > c && f > u || f < i && f < o && f < c && f < u) return 0;
|
|
24
|
+
var p = n(i, o, c, u, f, g);
|
|
25
|
+
if (p === 0) return 0;
|
|
26
|
+
for (var m = 0, h = -1, y = void 0, b = void 0, x = 0; x < p; x++) {
|
|
27
|
+
var S = g[x], C = S === 0 || S === 1 ? .5 : 1;
|
|
28
|
+
e(r, a, s, l, S) < d || (h < 0 && (h = t(i, o, c, u, _), _[1] < _[0] && h > 1 && v(), y = e(i, o, c, u, _[0]), h > 1 && (b = e(i, o, c, u, _[1]))), h === 2 ? S < _[0] ? m += y < i ? C : -C : S < _[1] ? m += b < y ? C : -C : m += u < b ? C : -C : S < _[0] ? m += y < i ? C : -C : m += u < y ? C : -C);
|
|
29
|
+
}
|
|
30
|
+
return m;
|
|
31
|
+
}
|
|
32
|
+
function b(e, t, n, o, s, c, l, u) {
|
|
33
|
+
if (u > t && u > o && u > c || u < t && u < o && u < c) return 0;
|
|
34
|
+
var d = a(t, o, c, u, g);
|
|
35
|
+
if (d === 0) return 0;
|
|
36
|
+
var f = i(t, o, c);
|
|
37
|
+
if (f >= 0 && f <= 1) {
|
|
38
|
+
for (var p = 0, m = r(t, o, c, f), h = 0; h < d; h++) {
|
|
39
|
+
var _ = g[h] === 0 || g[h] === 1 ? .5 : 1, v = r(e, n, s, g[h]);
|
|
40
|
+
v < l || (g[h] < f ? p += m < t ? _ : -_ : p += c < m ? _ : -_);
|
|
41
|
+
}
|
|
42
|
+
return p;
|
|
43
|
+
} else {
|
|
44
|
+
var _ = g[0] === 0 || g[0] === 1 ? .5 : 1, v = r(e, n, s, g[0]);
|
|
45
|
+
return v < l ? 0 : c < t ? _ : -_;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function x(e, t, n, r, i, a, o, s) {
|
|
49
|
+
if (s -= t, s > n || s < -n) return 0;
|
|
50
|
+
var c = Math.sqrt(n * n - s * s);
|
|
51
|
+
g[0] = -c, g[1] = c;
|
|
52
|
+
var l = Math.abs(r - i);
|
|
53
|
+
if (l < 1e-4) return 0;
|
|
54
|
+
if (l >= p - 1e-4) {
|
|
55
|
+
r = 0, i = p;
|
|
56
|
+
var u = a ? 1 : -1;
|
|
57
|
+
return o >= g[0] + e && o <= g[1] + e ? u : 0;
|
|
58
|
+
}
|
|
59
|
+
if (r > i) {
|
|
60
|
+
var d = r;
|
|
61
|
+
r = i, i = d;
|
|
62
|
+
}
|
|
63
|
+
r < 0 && (r += p, i += p);
|
|
64
|
+
for (var f = 0, m = 0; m < 2; m++) {
|
|
65
|
+
var h = g[m];
|
|
66
|
+
if (h + e > o) {
|
|
67
|
+
var _ = Math.atan2(s, h), u = a ? 1 : -1;
|
|
68
|
+
_ < 0 && (_ = p + _), (_ >= r && _ <= i || _ + p >= r && _ + p <= i) && (_ > Math.PI / 2 && _ < Math.PI * 1.5 && (u = -u), f += u);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return f;
|
|
72
|
+
}
|
|
73
|
+
function S(e, t, n, r, i) {
|
|
74
|
+
for (var a = e.data, o = e.len(), p = 0, m = 0, g = 0, _ = 0, v = 0, S, C, w = 0; w < o;) {
|
|
75
|
+
var T = a[w++], E = w === 1;
|
|
76
|
+
switch (T === f.M && w > 1 && (n || (p += d(m, g, _, v, r, i))), E && (m = a[w], g = a[w + 1], _ = m, v = g), T) {
|
|
77
|
+
case f.M:
|
|
78
|
+
_ = a[w++], v = a[w++], m = _, g = v;
|
|
79
|
+
break;
|
|
80
|
+
case f.L:
|
|
81
|
+
if (n) {
|
|
82
|
+
if (s(m, g, a[w], a[w + 1], t, r, i)) return !0;
|
|
83
|
+
} else p += d(m, g, a[w], a[w + 1], r, i) || 0;
|
|
84
|
+
m = a[w++], g = a[w++];
|
|
85
|
+
break;
|
|
86
|
+
case f.C:
|
|
87
|
+
if (n) {
|
|
88
|
+
if (c(m, g, a[w++], a[w++], a[w++], a[w++], a[w], a[w + 1], t, r, i)) return !0;
|
|
89
|
+
} else p += y(m, g, a[w++], a[w++], a[w++], a[w++], a[w], a[w + 1], r, i) || 0;
|
|
90
|
+
m = a[w++], g = a[w++];
|
|
91
|
+
break;
|
|
92
|
+
case f.Q:
|
|
93
|
+
if (n) {
|
|
94
|
+
if (l(m, g, a[w++], a[w++], a[w], a[w + 1], t, r, i)) return !0;
|
|
95
|
+
} else p += b(m, g, a[w++], a[w++], a[w], a[w + 1], r, i) || 0;
|
|
96
|
+
m = a[w++], g = a[w++];
|
|
97
|
+
break;
|
|
98
|
+
case f.A:
|
|
99
|
+
var D = a[w++], O = a[w++], k = a[w++], A = a[w++], j = a[w++], M = a[w++];
|
|
100
|
+
w += 1;
|
|
101
|
+
var N = !!(1 - a[w++]);
|
|
102
|
+
S = Math.cos(j) * k + D, C = Math.sin(j) * A + O, E ? (_ = S, v = C) : p += d(m, g, S, C, r, i);
|
|
103
|
+
var P = (r - D) * A / k + D;
|
|
104
|
+
if (n) {
|
|
105
|
+
if (u(D, O, A, j, j + M, N, t, P, i)) return !0;
|
|
106
|
+
} else p += x(D, O, A, j, j + M, N, P, i);
|
|
107
|
+
m = Math.cos(j + M) * k + D, g = Math.sin(j + M) * A + O;
|
|
108
|
+
break;
|
|
109
|
+
case f.R:
|
|
110
|
+
_ = m = a[w++], v = g = a[w++];
|
|
111
|
+
var F = a[w++], I = a[w++];
|
|
112
|
+
if (S = _ + F, C = v + I, n) {
|
|
113
|
+
if (s(_, v, S, v, t, r, i) || s(S, v, S, C, t, r, i) || s(S, C, _, C, t, r, i) || s(_, C, _, v, t, r, i)) return !0;
|
|
114
|
+
} else p += d(S, v, S, C, r, i), p += d(_, C, _, v, r, i);
|
|
115
|
+
break;
|
|
116
|
+
case f.Z:
|
|
117
|
+
if (n) {
|
|
118
|
+
if (s(m, g, _, v, t, r, i)) return !0;
|
|
119
|
+
} else p += d(m, g, _, v, r, i);
|
|
120
|
+
m = _, g = v;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return !n && !h(g, v) && (p += d(m, g, _, v, r, i) || 0), p !== 0;
|
|
125
|
+
}
|
|
126
|
+
function C(e, t, n) {
|
|
127
|
+
return S(e, 0, !1, t, n);
|
|
128
|
+
}
|
|
129
|
+
function w(e, t, n, r) {
|
|
130
|
+
return S(e, t, !0, n, r);
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
export { C as contain, w as containStroke };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { quadraticProjectPoint as e } from "../core/curve.js";
|
|
2
|
+
//#region node_modules/zrender/lib/contain/quadratic.js
|
|
3
|
+
function t(t, n, r, i, a, o, s, c, l) {
|
|
4
|
+
if (s === 0) return !1;
|
|
5
|
+
var u = s;
|
|
6
|
+
return l > n + u && l > i + u && l > o + u || l < n - u && l < i - u && l < o - u || c > t + u && c > r + u && c > a + u || c < t - u && c < r - u && c < a - u ? !1 : e(t, n, r, i, a, o, c, l, null) <= u / 2;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { t as containStroke };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { platformApi as e } from "../core/platform.js";
|
|
2
|
+
import t from "../core/LRU.js";
|
|
3
|
+
import n from "../core/BoundingRect.js";
|
|
4
|
+
//#region node_modules/zrender/lib/contain/text.js
|
|
5
|
+
function r(n) {
|
|
6
|
+
i ||= new t(100), n ||= "12px sans-serif";
|
|
7
|
+
var r = i.get(n);
|
|
8
|
+
return r || (r = {
|
|
9
|
+
font: n,
|
|
10
|
+
strWidthCache: new t(500),
|
|
11
|
+
asciiWidthMap: null,
|
|
12
|
+
asciiWidthMapTried: !1,
|
|
13
|
+
stWideCharWidth: e.measureText("国", n).width,
|
|
14
|
+
asciiCharWidth: e.measureText("a", n).width
|
|
15
|
+
}, i.put(n, r)), r;
|
|
16
|
+
}
|
|
17
|
+
var i;
|
|
18
|
+
function a(t) {
|
|
19
|
+
if (!(o >= s)) {
|
|
20
|
+
t ||= "12px sans-serif";
|
|
21
|
+
for (var n = [], r = +/* @__PURE__ */ new Date(), i = 0; i <= 127; i++) n[i] = e.measureText(String.fromCharCode(i), t).width;
|
|
22
|
+
var a = +/* @__PURE__ */ new Date() - r;
|
|
23
|
+
return a > 16 ? o = s : a > 2 && o++, n;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
var o = 0, s = 5;
|
|
27
|
+
function c(e, t) {
|
|
28
|
+
return e.asciiWidthMapTried ||= (e.asciiWidthMap = a(e.font), !0), 0 <= t && t <= 127 ? e.asciiWidthMap == null ? e.asciiCharWidth : e.asciiWidthMap[t] : e.stWideCharWidth;
|
|
29
|
+
}
|
|
30
|
+
function l(t, n) {
|
|
31
|
+
var r = t.strWidthCache, i = r.get(n);
|
|
32
|
+
return i ?? (i = e.measureText(n, t.font).width, r.put(n, i)), i;
|
|
33
|
+
}
|
|
34
|
+
function u(e, t, i, a) {
|
|
35
|
+
var o = l(r(t), e), s = m(t);
|
|
36
|
+
return new n(f(0, o, i), p(0, s, a), o, s);
|
|
37
|
+
}
|
|
38
|
+
function d(e, t, r, i) {
|
|
39
|
+
var a = ((e || "") + "").split("\n");
|
|
40
|
+
if (a.length === 1) return u(a[0], t, r, i);
|
|
41
|
+
for (var o = new n(0, 0, 0, 0), s = 0; s < a.length; s++) {
|
|
42
|
+
var c = u(a[s], t, r, i);
|
|
43
|
+
s === 0 ? o.copy(c) : o.union(c);
|
|
44
|
+
}
|
|
45
|
+
return o;
|
|
46
|
+
}
|
|
47
|
+
function f(e, t, n, r) {
|
|
48
|
+
return n === "right" ? r ? e += t : e -= t : n === "center" && (r ? e += t / 2 : e -= t / 2), e;
|
|
49
|
+
}
|
|
50
|
+
function p(e, t, n, r) {
|
|
51
|
+
return n === "middle" ? r ? e += t / 2 : e -= t / 2 : n === "bottom" && (r ? e += t : e -= t), e;
|
|
52
|
+
}
|
|
53
|
+
function m(e) {
|
|
54
|
+
return r(e).stWideCharWidth;
|
|
55
|
+
}
|
|
56
|
+
function h(e, t) {
|
|
57
|
+
return typeof e == "string" ? e.lastIndexOf("%") >= 0 ? parseFloat(e) / 100 * t : parseFloat(e) : e;
|
|
58
|
+
}
|
|
59
|
+
function g(e, t, n) {
|
|
60
|
+
var r = t.position || "inside", i = t.distance == null ? 5 : t.distance, a = n.height, o = n.width, s = a / 2, c = n.x, l = n.y, u = "left", d = "top";
|
|
61
|
+
if (r instanceof Array) c += h(r[0], n.width), l += h(r[1], n.height), u = null, d = null;
|
|
62
|
+
else switch (r) {
|
|
63
|
+
case "left":
|
|
64
|
+
c -= i, l += s, u = "right", d = "middle";
|
|
65
|
+
break;
|
|
66
|
+
case "right":
|
|
67
|
+
c += i + o, l += s, d = "middle";
|
|
68
|
+
break;
|
|
69
|
+
case "top":
|
|
70
|
+
c += o / 2, l -= i, u = "center", d = "bottom";
|
|
71
|
+
break;
|
|
72
|
+
case "bottom":
|
|
73
|
+
c += o / 2, l += a + i, u = "center";
|
|
74
|
+
break;
|
|
75
|
+
case "inside":
|
|
76
|
+
c += o / 2, l += s, u = "center", d = "middle";
|
|
77
|
+
break;
|
|
78
|
+
case "insideLeft":
|
|
79
|
+
c += i, l += s, d = "middle";
|
|
80
|
+
break;
|
|
81
|
+
case "insideRight":
|
|
82
|
+
c += o - i, l += s, u = "right", d = "middle";
|
|
83
|
+
break;
|
|
84
|
+
case "insideTop":
|
|
85
|
+
c += o / 2, l += i, u = "center";
|
|
86
|
+
break;
|
|
87
|
+
case "insideBottom":
|
|
88
|
+
c += o / 2, l += a - i, u = "center", d = "bottom";
|
|
89
|
+
break;
|
|
90
|
+
case "insideTopLeft":
|
|
91
|
+
c += i, l += i;
|
|
92
|
+
break;
|
|
93
|
+
case "insideTopRight":
|
|
94
|
+
c += o - i, l += i, u = "right";
|
|
95
|
+
break;
|
|
96
|
+
case "insideBottomLeft":
|
|
97
|
+
c += i, l += a - i, d = "bottom";
|
|
98
|
+
break;
|
|
99
|
+
case "insideBottomRight":
|
|
100
|
+
c += o - i, l += a - i, u = "right", d = "bottom";
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
return e ||= {}, e.x = c, e.y = l, e.align = u, e.verticalAlign = d, e;
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { f as adjustTextX, p as adjustTextY, g as calculateTextPosition, r as ensureFontMeasureInfo, d as getBoundingRect, m as getLineHeight, c as measureCharWidth, l as measureWidth, h as parsePercent };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region node_modules/zrender/lib/contain/windingLine.js
|
|
2
|
+
function e(e, t, n, r, i, a) {
|
|
3
|
+
if (a > t && a > r || a < t && a < r || r === t) return 0;
|
|
4
|
+
var o = (a - t) / (r - t), s = r < t ? 1 : -1;
|
|
5
|
+
(o === 1 || o === 0) && (s = r < t ? .5 : -.5);
|
|
6
|
+
var c = o * (n - e) + e;
|
|
7
|
+
return c === i ? Infinity : c > i ? s : 0;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as default };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { create as e, identity as t, scale as n, translate as r } from "./matrix.js";
|
|
2
|
+
import { set as i } from "./vector.js";
|
|
3
|
+
import a from "./Point.js";
|
|
4
|
+
//#region node_modules/zrender/lib/core/BoundingRect.js
|
|
5
|
+
var o = Math.min, s = Math.max, c = Math.abs, l = ["x", "y"], u = ["width", "height"], d = new a(), f = new a(), p = new a(), m = new a(), h = D(), g = h.minTv, _ = h.maxTv, v = [0, 0], y = function() {
|
|
6
|
+
function c(e, t, n, r) {
|
|
7
|
+
b(this, e, t, n, r);
|
|
8
|
+
}
|
|
9
|
+
return c.set = function(e, t, n, r, i) {
|
|
10
|
+
return r < 0 && (t += r, r = -r), i < 0 && (n += i, i = -i), e.x = t, e.y = n, e.width = r, e.height = i, e;
|
|
11
|
+
}, c.prototype.union = function(e) {
|
|
12
|
+
var t = o(e.x, this.x), n = o(e.y, this.y);
|
|
13
|
+
isFinite(this.x) && isFinite(this.width) ? this.width = s(e.x + e.width, this.x + this.width) - t : this.width = e.width, isFinite(this.y) && isFinite(this.height) ? this.height = s(e.y + e.height, this.y + this.height) - n : this.height = e.height, this.x = t, this.y = n;
|
|
14
|
+
}, c.prototype.applyTransform = function(e) {
|
|
15
|
+
c.applyTransform(this, this, e);
|
|
16
|
+
}, c.prototype.calculateTransform = function(t) {
|
|
17
|
+
return S(e(), this, t);
|
|
18
|
+
}, c.prototype.intersect = function(e, t, n) {
|
|
19
|
+
return c.intersect(this, e, t, n);
|
|
20
|
+
}, c.intersect = function(e, t, n, r) {
|
|
21
|
+
n && a.set(n, 0, 0);
|
|
22
|
+
var i = r && r.outIntersectRect || null, o = r && r.clamp;
|
|
23
|
+
if (i && (i.x = i.y = i.width = i.height = NaN), !e || !t) return !1;
|
|
24
|
+
e instanceof c || (e = b(C, e.x, e.y, e.width, e.height)), t instanceof c || (t = b(w, t.x, t.y, t.width, t.height));
|
|
25
|
+
var s = !!n;
|
|
26
|
+
h.reset(r, s);
|
|
27
|
+
var l = h.touchThreshold, u = e.x + l, d = e.x + e.width - l, f = e.y + l, p = e.y + e.height - l, m = t.x + l, y = t.x + t.width - l, x = t.y + l, S = t.y + t.height - l;
|
|
28
|
+
if (u > d || f > p || m > y || x > S) return !1;
|
|
29
|
+
var T = !(d < m || y < u || p < x || S < f);
|
|
30
|
+
return (s || i) && (v[0] = Infinity, v[1] = 0, E(u, d, m, y, 0, s, i, o), E(f, p, x, S, 1, s, i, o), s && a.copy(n, T ? h.useDir ? h.dirMinTv : g : _)), T;
|
|
31
|
+
}, c.contain = function(e, t, n) {
|
|
32
|
+
return t >= e.x && t <= e.x + e.width && n >= e.y && n <= e.y + e.height;
|
|
33
|
+
}, c.prototype.contain = function(e, t) {
|
|
34
|
+
return c.contain(this, e, t);
|
|
35
|
+
}, c.prototype.clone = function() {
|
|
36
|
+
return new c(this.x, this.y, this.width, this.height);
|
|
37
|
+
}, c.prototype.copy = function(e) {
|
|
38
|
+
x(this, e);
|
|
39
|
+
}, c.prototype.plain = function() {
|
|
40
|
+
return {
|
|
41
|
+
x: this.x,
|
|
42
|
+
y: this.y,
|
|
43
|
+
width: this.width,
|
|
44
|
+
height: this.height
|
|
45
|
+
};
|
|
46
|
+
}, c.prototype.isFinite = function() {
|
|
47
|
+
return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);
|
|
48
|
+
}, c.prototype.isZero = function() {
|
|
49
|
+
return this.width === 0 || this.height === 0;
|
|
50
|
+
}, c.create = function(e) {
|
|
51
|
+
return new c(e ? e.x : 0, e ? e.y : 0, e ? e.width : 0, e ? e.height : 0);
|
|
52
|
+
}, c.copy = function(e, t) {
|
|
53
|
+
return e.x = t.x, e.y = t.y, e.width = t.width, e.height = t.height, e;
|
|
54
|
+
}, c.applyTransform = function(e, t, n) {
|
|
55
|
+
if (!n) {
|
|
56
|
+
e !== t && x(e, t);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (n[1] < 1e-5 && n[1] > -1e-5 && n[2] < 1e-5 && n[2] > -1e-5) {
|
|
60
|
+
var r = n[0], i = n[3], a = n[4], c = n[5];
|
|
61
|
+
e.x = t.x * r + a, e.y = t.y * i + c, e.width = t.width * r, e.height = t.height * i, e.width < 0 && (e.x += e.width, e.width = -e.width), e.height < 0 && (e.y += e.height, e.height = -e.height);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
d.x = p.x = t.x, d.y = m.y = t.y, f.x = m.x = t.x + t.width, f.y = p.y = t.y + t.height, d.transform(n), m.transform(n), f.transform(n), p.transform(n), e.x = o(d.x, f.x, p.x, m.x), e.y = o(d.y, f.y, p.y, m.y);
|
|
65
|
+
var l = s(d.x, f.x, p.x, m.x), u = s(d.y, f.y, p.y, m.y);
|
|
66
|
+
e.width = l - e.x, e.height = u - e.y;
|
|
67
|
+
}, c.calculateTransform = function(e, a, o) {
|
|
68
|
+
var s = o.width / a.width, c = o.height / a.height;
|
|
69
|
+
return e = t(e || []), r(e, e, i(T, -a.x, -a.y)), n(e, e, i(T, s, c)), r(e, e, i(T, o.x, o.y)), e;
|
|
70
|
+
}, c;
|
|
71
|
+
}();
|
|
72
|
+
y.create;
|
|
73
|
+
var b = y.set, x = y.copy, S = y.calculateTransform;
|
|
74
|
+
y.applyTransform, y.contain;
|
|
75
|
+
var C = new y(0, 0, 0, 0), w = new y(0, 0, 0, 0), T = [];
|
|
76
|
+
function E(e, t, n, r, i, a, d, f) {
|
|
77
|
+
var p = c(t - n), m = c(r - e), y = o(p, m), b = l[i], x = l[1 - i], S = u[i];
|
|
78
|
+
t < n || r < e ? p < m ? (a && (_[b] = -p), f && (d[b] = t, d[S] = 0)) : (a && (_[b] = m), f && (d[b] = e, d[S] = 0)) : (d && (d[b] = s(e, n), d[S] = o(t, r) - d[b]), a && (y < v[0] || h.useDir) && (v[0] = o(y, v[0]), (p < m || !h.bidirectional) && (g[b] = p, g[x] = 0, h.useDir && h.calcDirMTV()), (p >= m || !h.bidirectional) && (g[b] = -m, g[x] = 0, h.useDir && h.calcDirMTV())));
|
|
79
|
+
}
|
|
80
|
+
function D() {
|
|
81
|
+
var e = 0, t = new a(), n = new a(), r = {
|
|
82
|
+
minTv: new a(),
|
|
83
|
+
maxTv: new a(),
|
|
84
|
+
useDir: !1,
|
|
85
|
+
dirMinTv: new a(),
|
|
86
|
+
touchThreshold: 0,
|
|
87
|
+
bidirectional: !0,
|
|
88
|
+
negativeSize: !1,
|
|
89
|
+
reset: function(i, a) {
|
|
90
|
+
r.touchThreshold = 0, i && i.touchThreshold != null && (r.touchThreshold = s(0, i.touchThreshold)), r.negativeSize = !1, a && (r.minTv.set(Infinity, Infinity), r.maxTv.set(0, 0), r.useDir = !1, i && i.direction != null && (r.useDir = !0, r.dirMinTv.copy(r.minTv), n.copy(r.minTv), e = i.direction, r.bidirectional = i.bidirectional == null || !!i.bidirectional, r.bidirectional || t.set(Math.cos(e), Math.sin(e))));
|
|
91
|
+
},
|
|
92
|
+
calcDirMTV: function() {
|
|
93
|
+
var a = r.minTv, o = r.dirMinTv, s = a.y * a.y + a.x * a.x, c = Math.sin(e), l = Math.cos(e), u = c * a.y + l * a.x;
|
|
94
|
+
if (i(u)) {
|
|
95
|
+
i(a.x) && i(a.y) && o.set(0, 0);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (n.x = s * l / u, n.y = s * c / u, i(n.x) && i(n.y)) {
|
|
99
|
+
o.set(0, 0);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
(r.bidirectional || t.dot(n) > 0) && n.len() < o.len() && o.copy(n);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
function i(e) {
|
|
106
|
+
return c(e) < 1e-10;
|
|
107
|
+
}
|
|
108
|
+
return r;
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
export { D as createIntersectContext, y as default };
|