@antv/g2 5.0.0-beta.4 → 5.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/g2-lite.min.js +5 -2
- package/dist/g2.min.js +5 -2
- package/esm/api/chart.d.ts +4 -0
- package/esm/api/chart.js +26 -4
- package/esm/api/chart.js.map +1 -1
- package/esm/api/mark/mark.js +1 -2
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +1 -2
- package/esm/component/axis.js +23 -9
- package/esm/component/axis.js.map +1 -1
- package/esm/component/index.d.ts +2 -0
- package/esm/component/index.js +2 -0
- package/esm/component/index.js.map +1 -1
- package/esm/component/scrollbar.d.ts +9 -0
- package/esm/component/scrollbar.js +36 -0
- package/esm/component/scrollbar.js.map +1 -0
- package/esm/component/scrollbarX.d.ts +7 -0
- package/esm/component/scrollbarX.js +9 -0
- package/esm/component/scrollbarX.js.map +1 -0
- package/esm/component/scrollbarY.d.ts +7 -0
- package/esm/component/scrollbarY.js +9 -0
- package/esm/component/scrollbarY.js.map +1 -0
- package/esm/component/slider.js +2 -4
- package/esm/component/slider.js.map +1 -1
- package/esm/component/title.js +46 -22
- package/esm/component/title.js.map +1 -1
- package/esm/composition/mark.js +2 -1
- package/esm/composition/mark.js.map +1 -1
- package/esm/data/fold.js +4 -10
- package/esm/data/fold.js.map +1 -1
- package/esm/data/index.d.ts +2 -2
- package/esm/data/index.js +1 -1
- package/esm/data/index.js.map +1 -1
- package/esm/data/pick.js +10 -2
- package/esm/data/pick.js.map +1 -1
- package/esm/data/slice.d.ts +8 -0
- package/esm/data/slice.js +10 -0
- package/esm/data/slice.js.map +1 -0
- package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
- package/esm/interaction/index.d.ts +8 -0
- package/esm/interaction/index.js +7 -30
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/native/brushAxisHighlight.d.ts +26 -0
- package/esm/interaction/native/brushAxisHighlight.js +159 -0
- package/esm/interaction/native/brushAxisHighlight.js.map +1 -0
- package/esm/interaction/native/brushFilter.d.ts +12 -0
- package/esm/interaction/native/brushFilter.js +147 -0
- package/esm/interaction/native/brushFilter.js.map +1 -0
- package/esm/interaction/native/brushHighlight.d.ts +40 -0
- package/esm/interaction/native/brushHighlight.js +341 -0
- package/esm/interaction/native/brushHighlight.js.map +1 -0
- package/esm/interaction/native/brushXFilter.d.ts +1 -0
- package/esm/interaction/native/brushXFilter.js +6 -0
- package/esm/interaction/native/brushXFilter.js.map +1 -0
- package/esm/interaction/native/brushXHighlight.d.ts +6 -0
- package/esm/interaction/native/brushXHighlight.js +9 -0
- package/esm/interaction/native/brushXHighlight.js.map +1 -0
- package/esm/interaction/native/brushYFilter.d.ts +1 -0
- package/esm/interaction/native/brushYFilter.js +6 -0
- package/esm/interaction/native/brushYFilter.js.map +1 -0
- package/esm/interaction/native/brushYHighlight.d.ts +6 -0
- package/esm/interaction/native/brushYHighlight.js +9 -0
- package/esm/interaction/native/brushYHighlight.js.map +1 -0
- package/esm/interaction/native/legendFilter.js +3 -12
- package/esm/interaction/native/legendFilter.js.map +1 -1
- package/esm/interaction/native/tooltip.js +101 -32
- package/esm/interaction/native/tooltip.js.map +1 -1
- package/esm/interaction/native/utils.d.ts +8 -0
- package/esm/interaction/native/utils.js +31 -0
- package/esm/interaction/native/utils.js.map +1 -1
- package/esm/label-transform/contrastReverse.d.ts +9 -0
- package/esm/label-transform/contrastReverse.js +48 -0
- package/esm/label-transform/contrastReverse.js.map +1 -0
- package/esm/label-transform/index.d.ts +8 -8
- package/esm/label-transform/index.js +4 -4
- package/esm/label-transform/index.js.map +1 -1
- package/esm/label-transform/overflowHide.d.ts +7 -0
- package/esm/label-transform/overflowHide.js +18 -0
- package/esm/label-transform/overflowHide.js.map +1 -0
- package/esm/label-transform/overlapDodgeY.d.ts +7 -0
- package/esm/label-transform/{dodgeY.js → overlapDodgeY.js} +4 -4
- package/esm/label-transform/overlapDodgeY.js.map +1 -0
- package/esm/label-transform/overlapHide.d.ts +7 -0
- package/esm/label-transform/overlapHide.js +24 -0
- package/esm/label-transform/overlapHide.js.map +1 -0
- package/esm/mark/area.js +1 -1
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/boxplot.js +5 -18
- package/esm/mark/boxplot.js.map +1 -1
- package/esm/runtime/component.js +33 -38
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/layout.js +7 -7
- package/esm/runtime/layout.js.map +1 -1
- package/esm/runtime/plot.js +28 -6
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.d.ts +0 -1
- package/esm/runtime/render.js +4 -34
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.js +17 -5
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.js +16 -6
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +27 -9
- package/esm/runtime/types/options.d.ts +3 -5
- package/esm/runtime/types/theme.d.ts +2 -5
- package/esm/shape/area/curve.js +15 -8
- package/esm/shape/area/curve.js.map +1 -1
- package/esm/shape/box/box.js +1 -1
- package/esm/shape/box/box.js.map +1 -1
- package/esm/shape/connector/connector.js +2 -2
- package/esm/shape/connector/connector.js.map +1 -1
- package/esm/shape/image/image.js +2 -2
- package/esm/shape/image/image.js.map +1 -1
- package/esm/shape/interval/color.js +3 -1
- package/esm/shape/interval/color.js.map +1 -1
- package/esm/shape/label/label.js +3 -3
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/label/position/area.d.ts +13 -0
- package/esm/shape/label/position/area.js +28 -0
- package/esm/shape/label/position/area.js.map +1 -0
- package/esm/shape/label/position/bottom.d.ts +1 -0
- package/esm/shape/label/position/bottom.js +2 -0
- package/esm/shape/label/position/bottom.js.map +1 -0
- package/esm/shape/label/position/bottomLeft.d.ts +1 -0
- package/esm/shape/label/position/bottomLeft.js +2 -0
- package/esm/shape/label/position/bottomLeft.js.map +1 -0
- package/esm/shape/label/position/bottomRight.d.ts +1 -0
- package/esm/shape/label/position/bottomRight.js +2 -0
- package/esm/shape/label/position/bottomRight.js.map +1 -0
- package/esm/shape/label/position/default.d.ts +18 -0
- package/esm/shape/label/position/default.js +107 -0
- package/esm/shape/label/position/default.js.map +1 -0
- package/esm/shape/label/position/index.d.ts +13 -0
- package/esm/shape/label/position/index.js +14 -0
- package/esm/shape/label/position/index.js.map +1 -0
- package/esm/shape/label/position/inside.d.ts +1 -0
- package/esm/shape/label/position/inside.js +2 -0
- package/esm/shape/label/position/inside.js.map +1 -0
- package/esm/shape/label/position/left.d.ts +1 -0
- package/esm/shape/label/position/left.js +2 -0
- package/esm/shape/label/position/left.js.map +1 -0
- package/esm/shape/label/position/outside.d.ts +18 -0
- package/esm/shape/label/position/outside.js +67 -0
- package/esm/shape/label/position/outside.js.map +1 -0
- package/esm/shape/label/position/right.d.ts +1 -0
- package/esm/shape/label/position/right.js +2 -0
- package/esm/shape/label/position/right.js.map +1 -0
- package/esm/shape/label/position/spider.d.ts +7 -0
- package/esm/shape/label/position/spider.js +34 -0
- package/esm/shape/label/position/spider.js.map +1 -0
- package/esm/shape/label/position/surround.d.ts +7 -0
- package/esm/shape/label/position/surround.js +35 -0
- package/esm/shape/label/position/surround.js.map +1 -0
- package/esm/shape/label/position/top.d.ts +1 -0
- package/esm/shape/label/position/top.js +2 -0
- package/esm/shape/label/position/top.js.map +1 -0
- package/esm/shape/label/position/topLeft.d.ts +1 -0
- package/esm/shape/label/position/topLeft.js +2 -0
- package/esm/shape/label/position/topLeft.js.map +1 -0
- package/esm/shape/label/position/topRight.d.ts +1 -0
- package/esm/shape/label/position/topRight.js +2 -0
- package/esm/shape/label/position/topRight.js.map +1 -0
- package/esm/shape/line/curve.js +1 -1
- package/esm/shape/line/curve.js.map +1 -1
- package/esm/shape/lineXY/line.js +2 -2
- package/esm/shape/lineXY/line.js.map +1 -1
- package/esm/shape/link/arc.js +2 -2
- package/esm/shape/link/arc.js.map +1 -1
- package/esm/shape/link/link.js +2 -2
- package/esm/shape/link/link.js.map +1 -1
- package/esm/shape/link/smooth.js +2 -2
- package/esm/shape/link/smooth.js.map +1 -1
- package/esm/shape/link/vhv.js +2 -2
- package/esm/shape/link/vhv.js.map +1 -1
- package/esm/shape/point/color.js +1 -1
- package/esm/shape/point/color.js.map +1 -1
- package/esm/shape/polygon/polygon.js +3 -3
- package/esm/shape/polygon/polygon.js.map +1 -1
- package/esm/shape/polygon/ribbon.js +3 -3
- package/esm/shape/polygon/ribbon.js.map +1 -1
- package/esm/shape/text/advance.js +1 -1
- package/esm/shape/text/advance.js.map +1 -1
- package/esm/shape/text/badge.js +3 -3
- package/esm/shape/text/badge.js.map +1 -1
- package/esm/shape/text/text.js +1 -1
- package/esm/shape/text/text.js.map +1 -1
- package/esm/shape/utils.d.ts +4 -0
- package/esm/shape/utils.js +6 -1
- package/esm/shape/utils.js.map +1 -1
- package/esm/shape/vector/vector.js +3 -3
- package/esm/shape/vector/vector.js.map +1 -1
- package/esm/spec/composition.d.ts +2 -0
- package/esm/spec/data.d.ts +24 -9
- package/esm/spec/geometry.d.ts +2 -1
- package/esm/spec/interaction.d.ts +41 -6
- package/esm/spec/labelTransform.d.ts +24 -11
- package/esm/spec/theme.d.ts +5 -2
- package/esm/stdlib/index.js +8 -9
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/academy.d.ts +3 -0
- package/esm/theme/academy.js +398 -0
- package/esm/theme/academy.js.map +1 -0
- package/esm/theme/dark.js +14 -20
- package/esm/theme/dark.js.map +1 -1
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/light.js +29 -22
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/maybeTooltip.js +3 -1
- package/esm/transform/maybeTooltip.js.map +1 -1
- package/esm/utils/bounds.d.ts +26 -0
- package/esm/utils/bounds.js +41 -0
- package/esm/utils/bounds.js.map +1 -0
- package/esm/utils/color.d.ts +6 -0
- package/esm/utils/color.js +7 -0
- package/esm/utils/color.js.map +1 -0
- package/esm/utils/coordinate.d.ts +1 -0
- package/esm/utils/coordinate.js +12 -0
- package/esm/utils/coordinate.js.map +1 -1
- package/esm/utils/helper.d.ts +1 -0
- package/esm/utils/helper.js +3 -0
- package/esm/utils/helper.js.map +1 -1
- package/lib/api/chart.d.ts +4 -0
- package/lib/api/chart.js +26 -4
- package/lib/api/chart.js.map +1 -1
- package/lib/api/mark/mark.js +1 -2
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +1 -2
- package/lib/component/axis.js +23 -9
- package/lib/component/axis.js.map +1 -1
- package/lib/component/index.d.ts +2 -0
- package/lib/component/index.js +5 -1
- package/lib/component/index.js.map +1 -1
- package/lib/component/scrollbar.d.ts +9 -0
- package/lib/component/scrollbar.js +40 -0
- package/lib/component/scrollbar.js.map +1 -0
- package/lib/component/scrollbarX.d.ts +7 -0
- package/lib/component/scrollbarX.js +13 -0
- package/lib/component/scrollbarX.js.map +1 -0
- package/lib/component/scrollbarY.d.ts +7 -0
- package/lib/component/scrollbarY.js +13 -0
- package/lib/component/scrollbarY.js.map +1 -0
- package/lib/component/slider.js +2 -4
- package/lib/component/slider.js.map +1 -1
- package/lib/component/title.js +46 -22
- package/lib/component/title.js.map +1 -1
- package/lib/composition/mark.js +2 -1
- package/lib/composition/mark.js.map +1 -1
- package/lib/data/fold.js +4 -10
- package/lib/data/fold.js.map +1 -1
- package/lib/data/index.d.ts +2 -2
- package/lib/data/index.js +3 -3
- package/lib/data/index.js.map +1 -1
- package/lib/data/pick.js +10 -2
- package/lib/data/pick.js.map +1 -1
- package/lib/data/slice.d.ts +8 -0
- package/lib/data/slice.js +14 -0
- package/lib/data/slice.js.map +1 -0
- package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
- package/lib/interaction/index.d.ts +8 -0
- package/lib/interaction/index.js +15 -31
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/native/brushAxisHighlight.d.ts +26 -0
- package/lib/interaction/native/brushAxisHighlight.js +164 -0
- package/lib/interaction/native/brushAxisHighlight.js.map +1 -0
- package/lib/interaction/native/brushFilter.d.ts +12 -0
- package/lib/interaction/native/brushFilter.js +152 -0
- package/lib/interaction/native/brushFilter.js.map +1 -0
- package/lib/interaction/native/brushHighlight.d.ts +40 -0
- package/lib/interaction/native/brushHighlight.js +347 -0
- package/lib/interaction/native/brushHighlight.js.map +1 -0
- package/lib/interaction/native/brushXFilter.d.ts +1 -0
- package/lib/interaction/native/brushXFilter.js +10 -0
- package/lib/interaction/native/brushXFilter.js.map +1 -0
- package/lib/interaction/native/brushXHighlight.d.ts +6 -0
- package/lib/interaction/native/brushXHighlight.js +14 -0
- package/lib/interaction/native/brushXHighlight.js.map +1 -0
- package/lib/interaction/native/brushYFilter.d.ts +1 -0
- package/lib/interaction/native/brushYFilter.js +10 -0
- package/lib/interaction/native/brushYFilter.js.map +1 -0
- package/lib/interaction/native/brushYHighlight.d.ts +6 -0
- package/lib/interaction/native/brushYHighlight.js +14 -0
- package/lib/interaction/native/brushYHighlight.js.map +1 -0
- package/lib/interaction/native/legendFilter.js +4 -13
- package/lib/interaction/native/legendFilter.js.map +1 -1
- package/lib/interaction/native/tooltip.js +98 -29
- package/lib/interaction/native/tooltip.js.map +1 -1
- package/lib/interaction/native/utils.d.ts +8 -0
- package/lib/interaction/native/utils.js +37 -1
- package/lib/interaction/native/utils.js.map +1 -1
- package/lib/label-transform/contrastReverse.d.ts +9 -0
- package/lib/label-transform/contrastReverse.js +52 -0
- package/lib/label-transform/contrastReverse.js.map +1 -0
- package/lib/label-transform/index.d.ts +8 -8
- package/lib/label-transform/index.js +9 -9
- package/lib/label-transform/index.js.map +1 -1
- package/lib/label-transform/overflowHide.d.ts +7 -0
- package/lib/label-transform/overflowHide.js +22 -0
- package/lib/label-transform/overflowHide.js.map +1 -0
- package/lib/label-transform/overlapDodgeY.d.ts +7 -0
- package/lib/label-transform/{dodgeY.js → overlapDodgeY.js} +6 -6
- package/lib/label-transform/overlapDodgeY.js.map +1 -0
- package/lib/label-transform/overlapHide.d.ts +7 -0
- package/lib/label-transform/overlapHide.js +28 -0
- package/lib/label-transform/overlapHide.js.map +1 -0
- package/lib/mark/area.js +1 -1
- package/lib/mark/area.js.map +1 -1
- package/lib/mark/boxplot.js +5 -18
- package/lib/mark/boxplot.js.map +1 -1
- package/lib/runtime/component.js +33 -38
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/layout.js +7 -7
- package/lib/runtime/layout.js.map +1 -1
- package/lib/runtime/plot.js +28 -6
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.d.ts +0 -1
- package/lib/runtime/render.js +4 -35
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.js +16 -4
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.js +16 -6
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +27 -9
- package/lib/runtime/types/options.d.ts +3 -5
- package/lib/runtime/types/theme.d.ts +2 -5
- package/lib/shape/area/curve.js +14 -7
- package/lib/shape/area/curve.js.map +1 -1
- package/lib/shape/box/box.js +1 -1
- package/lib/shape/box/box.js.map +1 -1
- package/lib/shape/connector/connector.js +2 -2
- package/lib/shape/connector/connector.js.map +1 -1
- package/lib/shape/image/image.js +2 -2
- package/lib/shape/image/image.js.map +1 -1
- package/lib/shape/interval/color.js +3 -1
- package/lib/shape/interval/color.js.map +1 -1
- package/lib/shape/label/label.js +3 -3
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/label/position/area.d.ts +13 -0
- package/lib/shape/label/position/area.js +32 -0
- package/lib/shape/label/position/area.js.map +1 -0
- package/lib/shape/label/position/bottom.d.ts +1 -0
- package/lib/shape/label/position/bottom.js +6 -0
- package/lib/shape/label/position/bottom.js.map +1 -0
- package/lib/shape/label/position/bottomLeft.d.ts +1 -0
- package/lib/shape/label/position/bottomLeft.js +6 -0
- package/lib/shape/label/position/bottomLeft.js.map +1 -0
- package/lib/shape/label/position/bottomRight.d.ts +1 -0
- package/lib/shape/label/position/bottomRight.js +6 -0
- package/lib/shape/label/position/bottomRight.js.map +1 -0
- package/lib/shape/label/position/default.d.ts +18 -0
- package/lib/shape/label/{position.js → position/default.js} +24 -81
- package/lib/shape/label/position/default.js.map +1 -0
- package/lib/shape/label/position/index.d.ts +13 -0
- package/lib/shape/label/position/index.js +30 -0
- package/lib/shape/label/position/index.js.map +1 -0
- package/lib/shape/label/position/inside.d.ts +1 -0
- package/lib/shape/label/position/inside.js +6 -0
- package/lib/shape/label/position/inside.js.map +1 -0
- package/lib/shape/label/position/left.d.ts +1 -0
- package/lib/shape/label/position/left.js +6 -0
- package/lib/shape/label/position/left.js.map +1 -0
- package/lib/shape/label/position/outside.d.ts +18 -0
- package/lib/shape/label/position/outside.js +75 -0
- package/lib/shape/label/position/outside.js.map +1 -0
- package/lib/shape/label/position/right.d.ts +1 -0
- package/lib/shape/label/position/right.js +6 -0
- package/lib/shape/label/position/right.js.map +1 -0
- package/lib/shape/label/position/spider.d.ts +7 -0
- package/lib/shape/label/position/spider.js +38 -0
- package/lib/shape/label/position/spider.js.map +1 -0
- package/lib/shape/label/position/surround.d.ts +7 -0
- package/lib/shape/label/position/surround.js +39 -0
- package/lib/shape/label/position/surround.js.map +1 -0
- package/lib/shape/label/position/top.d.ts +1 -0
- package/lib/shape/label/position/top.js +6 -0
- package/lib/shape/label/position/top.js.map +1 -0
- package/lib/shape/label/position/topLeft.d.ts +1 -0
- package/lib/shape/label/position/topLeft.js +6 -0
- package/lib/shape/label/position/topLeft.js.map +1 -0
- package/lib/shape/label/position/topRight.d.ts +1 -0
- package/lib/shape/label/position/topRight.js +6 -0
- package/lib/shape/label/position/topRight.js.map +1 -0
- package/lib/shape/line/curve.js +1 -1
- package/lib/shape/line/curve.js.map +1 -1
- package/lib/shape/lineXY/line.js +2 -2
- package/lib/shape/lineXY/line.js.map +1 -1
- package/lib/shape/link/arc.js +2 -2
- package/lib/shape/link/arc.js.map +1 -1
- package/lib/shape/link/link.js +2 -2
- package/lib/shape/link/link.js.map +1 -1
- package/lib/shape/link/smooth.js +2 -2
- package/lib/shape/link/smooth.js.map +1 -1
- package/lib/shape/link/vhv.js +2 -2
- package/lib/shape/link/vhv.js.map +1 -1
- package/lib/shape/point/color.js +1 -1
- package/lib/shape/point/color.js.map +1 -1
- package/lib/shape/polygon/polygon.js +3 -3
- package/lib/shape/polygon/polygon.js.map +1 -1
- package/lib/shape/polygon/ribbon.js +3 -3
- package/lib/shape/polygon/ribbon.js.map +1 -1
- package/lib/shape/text/advance.js +1 -1
- package/lib/shape/text/advance.js.map +1 -1
- package/lib/shape/text/badge.js +3 -3
- package/lib/shape/text/badge.js.map +1 -1
- package/lib/shape/text/text.js +1 -1
- package/lib/shape/text/text.js.map +1 -1
- package/lib/shape/utils.d.ts +4 -0
- package/lib/shape/utils.js +6 -1
- package/lib/shape/utils.js.map +1 -1
- package/lib/shape/vector/vector.js +3 -3
- package/lib/shape/vector/vector.js.map +1 -1
- package/lib/spec/composition.d.ts +2 -0
- package/lib/spec/data.d.ts +24 -9
- package/lib/spec/geometry.d.ts +2 -1
- package/lib/spec/interaction.d.ts +41 -6
- package/lib/spec/labelTransform.d.ts +24 -11
- package/lib/spec/theme.d.ts +5 -2
- package/lib/stdlib/index.js +3 -4
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/academy.d.ts +3 -0
- package/lib/theme/academy.js +402 -0
- package/lib/theme/academy.js.map +1 -0
- package/lib/theme/dark.js +14 -20
- package/lib/theme/dark.js.map +1 -1
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +3 -1
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/light.js +29 -22
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/maybeTooltip.js +3 -1
- package/lib/transform/maybeTooltip.js.map +1 -1
- package/lib/utils/bounds.d.ts +26 -0
- package/lib/utils/bounds.js +48 -0
- package/lib/utils/bounds.js.map +1 -0
- package/lib/utils/color.d.ts +6 -0
- package/lib/utils/color.js +11 -0
- package/lib/utils/color.js.map +1 -0
- package/lib/utils/coordinate.d.ts +1 -0
- package/lib/utils/coordinate.js +14 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/lib/utils/helper.d.ts +1 -0
- package/lib/utils/helper.js +5 -1
- package/lib/utils/helper.js.map +1 -1
- package/package.json +2 -2
- package/src/api/chart.ts +29 -8
- package/src/api/mark/mark.ts +1 -2
- package/src/api/mark/types.ts +1 -2
- package/src/component/axis.ts +38 -16
- package/src/component/index.ts +2 -0
- package/src/component/scrollbar.ts +41 -0
- package/src/component/scrollbarX.ts +16 -0
- package/src/component/scrollbarY.ts +16 -0
- package/src/component/slider.ts +1 -3
- package/src/component/title.ts +69 -30
- package/src/composition/mark.ts +2 -0
- package/src/data/fold.ts +6 -10
- package/src/data/index.ts +2 -2
- package/src/data/pick.ts +11 -2
- package/src/data/slice.ts +15 -0
- package/src/interaction/index.ts +23 -16
- package/src/interaction/native/brushAxisHighlight.ts +194 -0
- package/src/interaction/native/brushFilter.ts +163 -0
- package/src/interaction/native/brushHighlight.ts +419 -0
- package/src/interaction/native/brushXFilter.ts +9 -0
- package/src/interaction/native/brushXHighlight.ts +13 -0
- package/src/interaction/native/brushYFilter.ts +9 -0
- package/src/interaction/native/brushYHighlight.ts +13 -0
- package/src/interaction/native/legendFilter.ts +3 -14
- package/src/interaction/native/tooltip.ts +128 -38
- package/src/interaction/native/utils.ts +40 -0
- package/src/label-transform/contrastReverse.ts +56 -0
- package/src/label-transform/index.ts +8 -8
- package/src/label-transform/overflowHide.ts +23 -0
- package/src/label-transform/{dodgeY.ts → overlapDodgeY.ts} +6 -6
- package/src/label-transform/overlapHide.ts +32 -0
- package/src/mark/area.ts +1 -1
- package/src/mark/boxplot.ts +3 -1
- package/src/runtime/component.ts +46 -47
- package/src/runtime/layout.ts +6 -6
- package/src/runtime/plot.ts +40 -6
- package/src/runtime/render.ts +6 -58
- package/src/runtime/scale.ts +15 -7
- package/src/runtime/transform.ts +19 -6
- package/src/runtime/types/common.ts +27 -10
- package/src/runtime/types/options.ts +3 -5
- package/src/runtime/types/theme.ts +2 -5
- package/src/shape/area/curve.ts +15 -8
- package/src/shape/box/box.ts +6 -6
- package/src/shape/connector/connector.ts +2 -3
- package/src/shape/image/image.ts +2 -2
- package/src/shape/interval/color.ts +2 -1
- package/src/shape/label/label.ts +4 -3
- package/src/shape/label/position/area.ts +39 -0
- package/src/shape/label/position/bottom.ts +1 -0
- package/src/shape/label/position/bottomLeft.ts +1 -0
- package/src/shape/label/position/bottomRight.ts +1 -0
- package/src/shape/label/{position.ts → position/default.ts} +26 -110
- package/src/shape/label/position/index.ts +13 -0
- package/src/shape/label/position/inside.ts +1 -0
- package/src/shape/label/position/left.ts +1 -0
- package/src/shape/label/position/outside.ts +121 -0
- package/src/shape/label/position/right.ts +1 -0
- package/src/shape/label/position/spider.ts +39 -0
- package/src/shape/label/position/surround.ts +40 -0
- package/src/shape/label/position/top.ts +1 -0
- package/src/shape/label/position/topLeft.ts +1 -0
- package/src/shape/label/position/topRight.ts +1 -0
- package/src/shape/line/curve.ts +1 -1
- package/src/shape/lineXY/line.ts +2 -2
- package/src/shape/link/arc.ts +2 -2
- package/src/shape/link/link.ts +2 -2
- package/src/shape/link/smooth.ts +2 -2
- package/src/shape/link/vhv.ts +2 -2
- package/src/shape/point/color.ts +6 -5
- package/src/shape/polygon/polygon.ts +3 -3
- package/src/shape/polygon/ribbon.ts +3 -3
- package/src/shape/text/advance.ts +4 -1
- package/src/shape/text/badge.ts +8 -3
- package/src/shape/text/text.ts +1 -1
- package/src/shape/utils.ts +6 -5
- package/src/shape/vector/vector.ts +3 -3
- package/src/spec/action.ts +0 -1
- package/src/spec/composition.ts +2 -0
- package/src/spec/data.ts +25 -10
- package/src/spec/geometry.ts +3 -1
- package/src/spec/interaction.ts +59 -5
- package/src/spec/labelTransform.ts +29 -11
- package/src/spec/theme.ts +6 -2
- package/src/stdlib/index.ts +33 -9
- package/src/theme/academy.ts +404 -0
- package/src/theme/dark.ts +14 -20
- package/src/theme/index.ts +1 -0
- package/src/theme/light.ts +29 -22
- package/src/transform/maybeTooltip.ts +3 -1
- package/src/utils/bounds.ts +52 -0
- package/src/utils/color.ts +12 -0
- package/src/utils/coordinate.ts +12 -0
- package/src/utils/helper.ts +4 -0
- package/esm/data/subset.d.ts +0 -7
- package/esm/data/subset.js +0 -26
- package/esm/data/subset.js.map +0 -1
- package/esm/label-transform/dodgeY.d.ts +0 -7
- package/esm/label-transform/dodgeY.js.map +0 -1
- package/esm/label-transform/hideOverlap.d.ts +0 -4
- package/esm/label-transform/hideOverlap.js +0 -48
- package/esm/label-transform/hideOverlap.js.map +0 -1
- package/esm/label-transform/spider.d.ts +0 -7
- package/esm/label-transform/spider.js +0 -30
- package/esm/label-transform/spider.js.map +0 -1
- package/esm/label-transform/surround.d.ts +0 -7
- package/esm/label-transform/surround.js +0 -30
- package/esm/label-transform/surround.js.map +0 -1
- package/esm/shape/label/position.d.ts +0 -25
- package/esm/shape/label/position.js +0 -169
- package/esm/shape/label/position.js.map +0 -1
- package/lib/data/subset.d.ts +0 -7
- package/lib/data/subset.js +0 -30
- package/lib/data/subset.js.map +0 -1
- package/lib/label-transform/dodgeY.d.ts +0 -7
- package/lib/label-transform/dodgeY.js.map +0 -1
- package/lib/label-transform/hideOverlap.d.ts +0 -4
- package/lib/label-transform/hideOverlap.js +0 -52
- package/lib/label-transform/hideOverlap.js.map +0 -1
- package/lib/label-transform/spider.d.ts +0 -7
- package/lib/label-transform/spider.js +0 -34
- package/lib/label-transform/spider.js.map +0 -1
- package/lib/label-transform/surround.d.ts +0 -7
- package/lib/label-transform/surround.js +0 -34
- package/lib/label-transform/surround.js.map +0 -1
- package/lib/shape/label/position.d.ts +0 -25
- package/lib/shape/label/position.js.map +0 -1
- package/src/data/subset.ts +0 -35
- package/src/label-transform/hideOverlap.ts +0 -62
- package/src/label-transform/spider.ts +0 -37
- package/src/label-transform/surround.ts +0 -37
package/dist/g2-lite.min.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(y,F,g){"use strict";const j="main-layer",tt="label-layer",et="element",L="view",nt="plot",rt="component",it="label",at="area";var C="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function R(t,e,n,r,i){!function t(e,n,r,i,a){for(;r<i;){600<i-r&&(o=i-r+1,u=n-r+1,l=Math.log(o),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(o-s)/o)*(u-o/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/o+l)),u=Math.min(i,Math.floor(n+(o-u)*s/o+l)),t(e,n,c,u,a));var o,s,l,c,u,f=e[n],h=r,d=i;for(D(e,r,n),0<a(e[i],f)&&D(e,r,i);h<d;){for(D(e,h,d),h++,d--;a(e[h],f)<0;)h++;for(;0<a(e[d],f);)d--}0===a(e[r],f)?D(e,r,d):D(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||z)}function D(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function z(t,e){return t<e?-1:e<t?1:0}function G(t,e){W(t,0,t.children.length,e,t)}function W(t,e,n,r,i){(i=i||$(null)).minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var o=t.children[a];V(i,t.leaf?r(o):o)}return i}function V(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function H(t,e){return t.minX-e.minX}function q(t,e){return t.minY-e.minY}function Y(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function U(t){return t.maxX-t.minX+(t.maxY-t.minY)}function X(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function K(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function $(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ot(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(R(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if(K(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],s=e.leaf?r(o):o;K(t,s)&&(e.leaf?n.push(o):X(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},e.prototype.collides=function(t){var e=this.data;if(K(t,e))for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if(K(t,a)){if(e.leaf||X(t,a))return!0;n.push(i)}}e=n.pop()}return!1},e.prototype.load=function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0;e<t.length;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},e.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},e.prototype.clear=function(){return this.data=$([]),this},e.prototype.remove=function(t,e){if(t)for(var n,r,i,a=this.data,o=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),a.leaf){var c=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}(t,a.children,e);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}i||a.leaf||!X(a,o)?r?(n++,a=r.children[n],i=!1):a=null:(s.push(a),l.push(n),a=(r=a).children[n=0])}return this},e.prototype.toBBox=function(t){return t},e.prototype.compareMinX=function(t,e){return t.minX-e.minX},e.prototype.compareMinY=function(t,e){return t.minY-e.minY},e.prototype.toJSON=function(){return this.data},e.prototype.fromJSON=function(t){return this.data=t,this},e.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},e.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)G(i=$(t.slice(e,n+1)),this.toBBox);else{r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(i=$([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));ot(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);ot(t,c,u,s,this.compareMinY);for(var f=c;f<=u;f+=s){var h=Math.min(f+s-1,u);i.children.push(this._build(t,f,h,r-1))}}G(i,this.toBBox)}return i},e.prototype._chooseSubtree=function(t,e,n,r){for(;;){if(r.push(e),e.leaf||r.length-1===n)break;for(var i=1/0,a=1/0,o=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=Y(l),u=(f=t,u=l,(Math.max(u.maxX,f.maxX)-Math.min(u.minX,f.minX))*(Math.max(u.maxY,f.maxY)-Math.min(u.minY,f.minY))-c);u<a?(a=u,i=c<i?c:i,o=l):u===a&&c<i&&(i=c,o=l)}e=o||e.children[0]}var f,u;return e},e.prototype._insert=function(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),V(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=$(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,G(n,this.toBBox),G(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=$([t,e]),this.data.height=t.height+1,this.data.leaf=!1,G(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=W(t,0,c,this.toBBox),f=W(t,c,n,this.toBBox),h=(i=u,h=f,d=o=a=void 0,a=Math.max(i.minX,h.minX),o=Math.max(i.minY,h.minY),d=Math.min(i.maxX,h.maxX),i=Math.min(i.maxY,h.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=Y(u)+Y(f);h<s?(s=h,r=c,l=d<l?d:l):h===s&&d<l&&(l=d,r=c)}return r||n-e},e.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:H,i=t.leaf?this.compareMinY:q;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},e.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=W(t,0,e,i),o=W(t,n-e,n,i),s=U(a)+U(o),l=e;l<n-e;l++){var c=t.children[l];V(a,t.leaf?i(c):c),s+=U(a)}for(var u=n-e-1;e<=u;u--){var f=t.children[u];V(o,t.leaf?i(f):f),s+=U(o)}return s},e.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)V(e[r],t)},e.prototype._condense=function(t){for(var e=t.length-1,n=void 0;0<=e;e--)0===t[e].children.length?0<e?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():G(t[e],this.toBBox)};var st=1e-6,lt="undefined"!=typeof Float32Array?Float32Array:Array;function ct(){var t=new lt(9);return lt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ut=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],y=n[4],g=n[5],v=n[6],m=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+y*o+g*c,t[4]=p*i+y*s+g*u,t[5]=p*a+y*l+g*e,t[6]=v*r+m*o+n*c,t[7]=v*i+m*s+n*u,t[8]=v*a+m*l+n*e,t};function ft(){var t=new lt(16);return lt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ht(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function dt(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=y,t[15]=g,t}function pt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function yt(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function gt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15],v=n*s-r*o,m=n*l-i*o,b=n*c-a*o,x=r*l-i*s,k=r*c-a*s,w=i*c-a*l,M=u*y-f*p,O=u*g-h*p,_=u*e-d*p,S=f*g-h*y,E=f*e-d*y,A=h*e-d*g,T=v*A-m*E+b*S+x*_-k*O+w*M;return T?(t[0]=(s*A-l*E+c*S)*(T=1/T),t[1]=(i*E-r*A-a*S)*T,t[2]=(y*w-g*k+e*x)*T,t[3]=(h*k-f*w-d*x)*T,t[4]=(l*_-o*A-c*O)*T,t[5]=(n*A-i*_+a*O)*T,t[6]=(g*b-p*w-e*m)*T,t[7]=(u*w-h*b+d*m)*T,t[8]=(o*E-s*_+c*M)*T,t[9]=(r*_-n*E-a*M)*T,t[10]=(p*k-y*b+e*v)*T,t[11]=(f*b-u*k-d*v)*T,t[12]=(s*O-o*S-l*M)*T,t[13]=(n*S-r*O+i*M)*T,t[14]=(y*m-p*x-g*v)*T,t[15]=(u*x-f*m+h*v)*T,t):null}function vt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],y=t[14],t=t[15];return(e*o-n*a)*(f*t-h*y)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*y-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*y-f*d)+(r*l-i*s)*(c*p-u*d)}function mt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],y=e[12],g=e[13],v=e[14],e=e[15],m=n[0],b=n[1],x=n[2],k=n[3];return t[0]=m*r+b*s+x*f+k*y,t[1]=m*i+b*l+x*h+k*g,t[2]=m*a+b*c+x*d+k*v,t[3]=m*o+b*u+x*p+k*e,m=n[4],b=n[5],x=n[6],k=n[7],t[4]=m*r+b*s+x*f+k*y,t[5]=m*i+b*l+x*h+k*g,t[6]=m*a+b*c+x*d+k*v,t[7]=m*o+b*u+x*p+k*e,m=n[8],b=n[9],x=n[10],k=n[11],t[8]=m*r+b*s+x*f+k*y,t[9]=m*i+b*l+x*h+k*g,t[10]=m*a+b*c+x*d+k*v,t[11]=m*o+b*u+x*p+k*e,m=n[12],b=n[13],x=n[14],k=n[15],t[12]=m*r+b*s+x*f+k*y,t[13]=m*i+b*l+x*h+k*g,t[14]=m*a+b*c+x*d+k*v,t[15]=m*o+b*u+x*p+k*e,t}function bt(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,y=n[0],g=n[1],n=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*n+e[12],t[13]=e[1]*y+e[5]*g+e[9]*n+e[13],t[14]=e[2]*y+e[6]*g+e[10]*n+e[14],t[15]=e[3]*y+e[7]*g+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*y+s*g+f*n+e[12],t[13]=i*y+l*g+h*n+e[13],t[14]=a*y+c*g+d*n+e[14],t[15]=o*y+u*g+p*n+e[15]),t}function xt(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function kt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function wt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*n,t}function Mt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Ot(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function St(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function Et(t,e){var n=new lt(3),r=(St(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function At(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,f=a*l,h=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],y=i[0],g=i[1],i=i[2],v=(1-(d+s))*u,m=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=v,t[1]=m,t[2]=u,t[3]=0,t[4]=h,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+y-(v*y+h*g+p*i),t[13]=n[1]+g-(m*y+e*g+a*i),t[14]=n[2]+i-(u*y+s*g+c*i),t[15]=1,t}function Tt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Pt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function Nt(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var jt=Nt;function Lt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<st&&Math.abs(c-d)<st&&Math.abs(e-n)<st?pt(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function Ct(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var Ft=Object.freeze({__proto__:null,create:ft,clone:function(t){var e=new lt(16);return 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[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:ht,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y){var g=new lt(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=a,g[6]=o,g[7]=s,g[8]=l,g[9]=c,g[10]=u,g[11]=f,g[12]=h,g[13]=d,g[14]=p,g[15]=y,g},set:dt,identity:pt,transpose:yt,invert:gt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15];return t[0]=s*(h*e-d*g)-f*(l*e-c*g)+y*(l*d-c*h),t[1]=-(r*(h*e-d*g)-f*(i*e-a*g)+y*(i*d-a*h)),t[2]=r*(l*e-c*g)-s*(i*e-a*g)+y*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*g)-u*(l*e-c*g)+p*(l*d-c*h)),t[5]=n*(h*e-d*g)-u*(i*e-a*g)+p*(i*d-a*h),t[6]=-(n*(l*e-c*g)-o*(i*e-a*g)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*y)-u*(s*e-c*y)+p*(s*d-c*f),t[9]=-(n*(f*e-d*y)-u*(r*e-a*y)+p*(r*d-a*f)),t[10]=n*(s*e-c*y)-o*(r*e-a*y)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*g-h*y)-u*(s*g-l*y)+p*(s*h-l*f)),t[13]=n*(f*g-h*y)-u*(r*g-i*y)+p*(r*h-i*f),t[14]=-(n*(s*g-l*y)-o*(r*g-i*y)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:vt,multiply:mt,translate:bt,scale:xt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,y,g,v,m,b,x,k,w,M,O=r[0],_=r[1],r=r[2],S=Math.hypot(O,_,r);return S<st?null:(O*=S=1/S,_*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7],d=e[8],p=e[9],y=e[10],g=e[11],m=O*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+O*S,k=O*r*i+_*S,w=_*r*i-O*S,M=r*r*i+n,t[0]=a*(n=O*O*i+n)+c*(v=_*O*i+r*S)+d*(r=r*O*i-_*S),t[1]=o*n+u*v+p*r,t[2]=s*n+f*v+y*r,t[3]=l*n+h*v+g*r,t[4]=a*m+c*b+d*x,t[5]=o*m+u*b+p*x,t[6]=s*m+f*b+y*x,t[7]=l*m+h*b+g*x,t[8]=a*k+c*w+d*M,t[9]=o*k+u*w+p*M,t[10]=s*k+f*w+y*M,t[11]=l*k+h*w+g*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:kt,rotateY:wt,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:Mt,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<st?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:Ot,fromQuat2:function(t,e){var n=new lt(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),Ot(t,e,n),t},getTranslation:_t,getScaling:St,getRotation:Et,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+f)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:At,fromQuat:Tt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:Pt,perspective:Pt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Nt,ortho:jt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:Lt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:Ct,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],y=t[13],g=t[14],t=t[15],v=e[0],m=e[1],b=e[2],x=e[3],k=e[4],w=e[5],M=e[6],O=e[7],_=e[8],S=e[9],E=e[10],A=e[11],T=e[12],P=e[13],N=e[14],e=e[15];return Math.abs(n-v)<=st*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(r-m)<=st*Math.max(1,Math.abs(r),Math.abs(m))&&Math.abs(i-b)<=st*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=st*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-k)<=st*Math.max(1,Math.abs(o),Math.abs(k))&&Math.abs(s-w)<=st*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(l-M)<=st*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-O)<=st*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(u-_)<=st*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=st*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=st*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=st*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-T)<=st*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(y-P)<=st*Math.max(1,Math.abs(y),Math.abs(P))&&Math.abs(g-N)<=st*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(t-e)<=st*Math.max(1,Math.abs(t),Math.abs(e))},mul:mt,sub:Ct});function v(){var t=new lt(3);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Bt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function b(t,e,n){var r=new lt(3);return r[0]=t,r[1]=e,r[2]=n,r}function It(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Rt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Dt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function zt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Gt(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Wt(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Vt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ht(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function qt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function Yt(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Ut(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=st*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=st*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=st*Math.max(1,Math.abs(t),Math.abs(e))}var Xt=zt,Kt=Bt;function $t(){var t=new lt(4);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function Jt(){var t=new lt(4);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Qt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function te(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function ee(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function ne(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}v(),$t();var re=function(t,e,n,r){var i=new lt(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ie=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ae=te,oe=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function se(t,e){var n=new lt(2);return n[0]=t,n[1]=e,n}function le(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ce(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ue(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function fe(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function he(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function de(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}v(),b(1,0,0),b(0,1,0),Jt(),Jt(),ct();var pe=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function ye(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new lt(2),lt!=Float32Array&&(e[0]=0,e[1]=0);var ge=function(t,e){return(ge=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function ve(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ge(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var m=function(){return(m=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Z(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function me(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function be(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function k(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function xe(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t===e&&r:e.has(t))return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t);throw new TypeError("Cannot read private member from an object whose class did not declare it")}var ke={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var we={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Me(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return we[e]===t.length-1&&"achlmqstvz".includes(e)})}function Oe(t){return Me(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function _e(t){return Oe(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function Se(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=we[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,we[n]))),we[n]););}function Ee(t){return 48<=t&&t<=57}function Ae(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function Te(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=we[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,Ae(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(Ee(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&Ee(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&Ee(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;Ee(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&Ee(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&Ee(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),Ae(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,Ae(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}Se(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var Pe=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Ne(t){var o,s,l,c;return Oe(t)?ye(t):(t=function(t){if(Me(t))return ye(t);var e=new Pe(t);for(Ae(e);e.index<e.max&&!e.err.length;)Te(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function je(t){if(_e(t))return ye(t);for(var e,n,r,i,a,o,s,l=Ne(t),c=m({},ke),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function Le(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Ce(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function Fe(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Be(t,e,n,r,i){var a=Fe([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=Ce([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Ie(t,e,n,r){var t=[t,e],e=[n,r],i=Ce(t,e,.5),e=Ce(e,i,.5),a=Ce(i,e,.5),o=Ce(e,a,.5),s=Ce(a,o,.5),t=Be(t[0],t[1],i[0],i[1],a[0]).point,i=Be(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Re(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=e.x1,d=e.y1,p=e.x,y=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],k=u[1],m=u[2],b=u[3]):(e=(g=Le(e,n,-h)).x,n=g.y,1<(p=(y=(e-(l=(g=Le(l,c,-h)).x))/2)*y/(r*r)+(g=(n-(c=g.y))/2)*g/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,v=i*i,m=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*v-p*g*g-v*y*y)/(p*g*g+v*y*y))))*r*g/i+(e+l)/2,b=o*-i*y/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),k=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<m?Math.PI-x:x,k=l<m?Math.PI-k:k,x<0&&(x=2*Math.PI+x),k<0&&(k=2*Math.PI+k),s&&k<x&&(x-=2*Math.PI),!s&&x<k&&(k-=2*Math.PI)),k-x),y=(Math.abs(p)>f&&(v=k,g=l,o=c,k=x+f*(s&&x<k?1:-1),d=t(l=m+r*Math.cos(k),c=b+i*Math.sin(k),r,i,a,0,s,g,o,[k,v,m,b])),p=k-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(k),s=Math.sin(k),g=Math.tan(p/4),o=4/3*r*g,v=4/3*i*g,m=[e,n],b=[e+o*f,n-v*y],x=[l+o*s,c-v*a],k=[l,c];if(b[0]=2*m[0]-b[0],b[1]=2*m[1]-b[1],u)return b.concat(x,k,d);for(var w=[],M=0,O=(d=b.concat(x,k,d)).length;M<O;M+=1)w[M]=M%2?Le(d[M-1],d[M],h).y:Le(d[M],d[M+1],h).x;return w}(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=f,s=[h,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(Ie(h,d,u,f));case"Z":return h===p&&d===y?["C",h,d,p,y,p,y]:["C"].concat(Ie(h,d,p,y))}return t}function De(t,e){var n;if(void 0===e&&(e=!1),_e(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=ye(t),e?[n,[]]:n;for(var r,i=je(t),a=m({},ke),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=Re(i[u],a),h=(i[u]=f,g=y=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var y=h[p],g=p;y.length;)d[p]="A",h.splice(g+=1,0,["C"].concat(y.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function ze(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,y=t,g=e,v=0,m=[y,g,v],b=[y,g],x={x:0,y:0},k=[{x:y,y:g}];p&&l<=0&&(x={x:y,y:g});for(var w,M,O,_,S,E,A,T,P,N,j=0;j<=d;j+=1)w=t,M=e,O=n,_=r,S=i,E=a,A=o,T=s,N=void 0,N=1-(P=j/d),y=(w={x:Math.pow(N,3)*w+3*Math.pow(N,2)*P*O+3*N*Math.pow(P,2)*S+Math.pow(P,3)*A,y:Math.pow(N,3)*M+3*Math.pow(N,2)*P*_+3*N*Math.pow(P,2)*E+Math.pow(P,3)*T}).x,g=w.y,f&&k.push({x:y,y:g}),h&&(v+=Fe(b,[y,g])),b=[y,g],p&&l<=v&&l>m[2]&&(O=(v-l)/(v-m[2]),x={x:b[0]*(1-O)+m[0]*O,y:b[1]*(1-O)+m[1]*O}),m=[y,g,v];return{length:v,point:x=p&&v<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,k.map(function(t){return t.x})),y:Math.min.apply(null,k.map(function(t){return t.y}))},max:{x:Math.max.apply(null,k.map(function(t){return t.x})),y:Math.max.apply(null,k.map(function(t){return t.y}))}}}function Ge(t){return(c=l=s=0)<=De(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function We(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?ze(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=Ce(n,i,r),i=Ce(i,a,r),a=Ce(a,e,r),o=Ce(n,i,r),i=Ce(i,a,r),r=Ce(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var Ve=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},He=function(t){return"function"==typeof t},qe=function(t){return null==t},Ye={}.toString,Ue=function(t,e){return Ye.call(t)==="[object "+e+"]"},Xe=function(t){return Array.isArray?Array.isArray(t):Ue(t,"Array")},Ke=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function $e(t,e){if(t)if(Xe(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(Ke(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var Ze=function(t){return"object"==typeof t&&null!==t},Je=function(t){if(!Ze(t)||!Ue(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},Qe=function(t){if(Xe(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},tn=function(t){if(Xe(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},en=function(t){return Ue(t,"String")},nn=function(t,e,n){return t<e?e:n<t?n:t},rn=function(t){return Ue(t,"Number")};var an=function(t,e){return(t%e+e)%e},on=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return $e(n,function(t,e){He(n)&&"prototype"===e||r.push(t)}),r};var sn=function(t){return Ue(t,"Boolean")},ln=function(t){return void 0===t},cn=function(t){return t instanceof Element||t instanceof HTMLDocument};function un(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function fn(t,e,n,r){return e&&un(t,e),n&&un(t,n),r&&un(t,r),t}function hn(t){if("object"!=typeof t||null===t)return t;if(Xe(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=hn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=hn(t[i]):e[i]=t[i];return e}function dn(a,o){var s;if(He(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var pn=hn,yn=5;function gn(t,e){if(t===e)return!0;if(t&&e&&!en(t)&&!en(e)){if(Ve(t)||Ve(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=gn(t[r],e[r]));r++);return n}if(Ze(t)||Ze(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=gn(t[i[r]],e[i[r]]));r++);return n}}return!1}function vn(t,e,n){for(var r=0,i=en(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function mn(e,t){var n;return null!==e&&Je(e)?(n={},$e(t,function(t){Mn.call(e,t)&&(n[t]=e[t])}),n):{}}function bn(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;return i=i||{},t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t}function xn(){}var kn=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||yn,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Je(o)?(Je(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Xe(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},wn=gn,Mn=Object.prototype.hasOwnProperty;function On(t,e,n){(t.prototype=e.prototype=n).constructor=t}function _n(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function Sn(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",En=/^#([0-9a-f]{3,8})$/,An=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Tn=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),Pn=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),Nn=new RegExp("^rgba\\("+[r,r,r,n]+"\\)$"),jn=new RegExp("^hsl\\("+[n,r,r]+"\\)$"),Ln=new RegExp("^hsla\\("+[n,r,r,n]+"\\)$"),Cn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Fn(){return this.rgb().formatHex()}function Bn(){return this.rgb().formatRgb()}function In(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=En.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Rn(e):3===n?new zn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Dn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Dn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=An.exec(t))?new zn(e[1],e[2],e[3],1):(e=Tn.exec(t))?new zn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Pn.exec(t))?Dn(e[1],e[2],e[3],e[4]):(e=Nn.exec(t))?Dn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=jn.exec(t))?Hn(e[1],e[2]/100,e[3]/100,1):(e=Ln.exec(t))?Hn(e[1],e[2]/100,e[3]/100,e[4]):Cn.hasOwnProperty(t)?Rn(Cn[t]):"transparent"===t?new zn(NaN,NaN,NaN,0):null}function Rn(t){return new zn(t>>16&255,t>>8&255,255&t,1)}function Dn(t,e,n,r){return new zn(t=r<=0?e=n=NaN:t,e,n,r)}function zn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Gn(){return"#"+Vn(this.r)+Vn(this.g)+Vn(this.b)}function Wn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Vn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Hn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new Yn(t,e,n,r)}function qn(t){var e,n,r,i,a,o,s,l;return t instanceof Yn?new Yn(t.h,t.s,t.l,t.opacity):(t=t instanceof Sn?t:In(t))?t instanceof Yn?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new Yn(o,s,l,t.opacity)):new Yn}function Yn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Un(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Xn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||$n(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kn(t){return function(t){if(Array.isArray(t))return Zn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||$n(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $n(t,e){var n;if(t)return"string"==typeof t?Zn(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zn(t,e):void 0}function Zn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Jn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Qn(t,e){return Math.abs(t-e)<.001}function tr(t,e){var n=Math.min.apply(Math,Kn(t)),r=Math.min.apply(Math,Kn(e));return{x:n,y:r,width:Math.max.apply(Math,Kn(t))-n,height:Math.max.apply(Math,Kn(e))-r}}function er(t){return(t+2*Math.PI)%(2*Math.PI)}On(Sn,In,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Fn,formatHex:Fn,formatHsl:function(){return qn(this).formatHsl()},formatRgb:Bn,toString:Bn}),On(zn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof Sn?i:In(i))?new zn((i=i.rgb()).r,i.g,i.b,i.opacity):new zn:new zn(t,e,n,null==r?1:r);var i},_n(Sn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new zn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new zn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Gn,formatHex:Gn,formatRgb:Wn,toString:Wn})),On(Yn,function(t,e,n,r){return 1===arguments.length?qn(t):new Yn(t,e,n,null==r?1:r)},_n(Sn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Yn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Yn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new zn(Un(240<=t?t-240:120+t,n,e),Un(t,n,e),Un(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var nr={box:function(t,e,n,r){return tr([t,n],[e,r])},length:Jn,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?Jn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Jn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(de(r=[-n[1],n[0]],r),o=[i-t,a-e],Math.abs(o[0]*r[0]+o[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function rr(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,Kn(t.concat([d]))),i.apply(void 0,Kn(e.concat([d])))],p=Jn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,y=0;y<32&&!(f<1e-4);y++){var g=o-f,v=o+f,m=[i.apply(void 0,Kn(t.concat([g]))),i.apply(void 0,Kn(e.concat([g])))],m=Jn(l[0],l[1],m[0],m[1]);0<=g&&m<s?(o=g,s=m):(g=[i.apply(void 0,Kn(t.concat([v]))),i.apply(void 0,Kn(e.concat([v])))],m=Jn(l[0],l[1],g[0],g[1]),v<=1&&m<s?(o=v,s=m):f*=.5)}return{x:i.apply(void 0,Kn(t.concat([o]))),y:i.apply(void 0,Kn(e.concat([o])))}}function ir(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function ar(t,e,n){n=t+n-2*e;return Qn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function or(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function sr(t,e,n,r,i,a,o){var s=ir(t,n,i,o),l=ir(e,r,a,o),c=nr.pointAt(t,e,n,r,o),n=nr.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function lr(t,e,n,r,i,a,o){return 0===o?(Jn(t,e,n,r)+Jn(n,r,i,a)+Jn(t,e,i,a))/2:(e=(t=sr(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),lr.apply(void 0,Kn(e))+lr.apply(void 0,Kn(n)))}var cr={box:function(t,e,n,r,i,a){var o=ar(t,n,i)[0],s=ar(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(ir(t,n,i,o)),void 0!==s&&c.push(ir(e,r,a,s)),tr(l,c)},length:function(t,e,n,r,i,a){return lr(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return rr([t,n,i],[e,r,a],o,s,ir)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Jn(t.x,t.y,o,s)},interpolationAt:ir,pointAt:function(t,e,n,r,i,a,o){return{x:ir(t,n,i,o),y:ir(e,r,a,o)}},divide:sr,tangentAngle:function(t,e,n,r,i,a,o){t=or(t,n,i,o),n=or(e,r,a,o);return er(Math.atan2(n,t))}};function ur(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function fr(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function hr(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return Qn(r,0)?Qn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Qn(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function dr(t,e,n,r,i,a,o,s,l){var c=ur(t,n,i,o,l),u=ur(e,r,a,s,l),f=nr.pointAt(t,e,n,r,l),n=nr.pointAt(n,r,i,a,l),r=nr.pointAt(i,a,o,s,l),i=nr.pointAt(f.x,f.y,n.x,n.y,l),a=nr.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function pr(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=Jn(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=dr(t,e,n,r,i,a,o,s,.5),e=[].concat(Kn(t[0]),[l-1]),n=[].concat(Kn(t[1]),[l-1]);return pr.apply(void 0,Kn(e))+pr.apply(void 0,Kn(n))}var yr={extrema:hr,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=hr(t,n,i,o),f=hr(e,r,a,s),h=0;h<u.length;h++)l.push(ur(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(ur(e,r,a,s,f[d]));return tr(l,c)},length:function(t,e,n,r,i,a,o,s){return pr(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return rr([t,n,i,o],[e,r,a,s],l,c,ur,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return Jn(t.x,t.y,l,c)},interpolationAt:ur,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:ur(t,n,i,o,l),y:ur(e,r,a,s,l)}},divide:dr,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=fr(t,n,i,o,l),n=fr(e,r,a,s,l);return er(Math.atan2(n,t))}};function gr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var vr=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,f=s*s,h=Math.PI/4,d=0,p=0,y=0;y<4;y++){var d=o*Math.cos(h),p=s*Math.sin(h),g=(u-f)*Math.pow(Math.cos(h),3)/o,v=(f-u)*Math.pow(Math.sin(h),3)/s,m=d-g,b=p-v,g=l-g,v=c-v,x=Math.hypot(b,m),k=Math.hypot(v,g);h+=x*Math.asin((m*v-b*g)/(x*k))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}return{x:t+gr(d,n),y:e+gr(p,r)}};function mr(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function br(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function xr(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function kr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var wr={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}for(var d=0;d<u.length;d++){var p=mr(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var y=Math.atan(r/(n*Math.tan(i))),g=1/0,v=-1/0,m=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=y+b;a<o?a<x&&x<o&&m.push(x):o<x&&x<a&&m.push(x)}for(var k=0;k<m.length;k++){var w=br(0,e,n,r,i,m[k]);w<g&&(g=w),v<w&&(v=w)}return{x:l,y:g,width:c-l,height:v-g}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=Xn(kr(s-t,l-e,-i),2),l=s[0],s=s[1],l=vr(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=xr(n,r,a):o<c&&(l=xr(n,r,o)),kr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return Jn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:mr(t,0,n,r,i,o),y:br(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return er(Math.atan2(i,s))}};function Mr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=Jn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var Or,_r,Sr={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return tr(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=Jn(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=Mr(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=nr.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=nr.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=Mr(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function Er(){}function Ar(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Tr(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new Ar(n,r||t,i),r=_r?_r+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function Pr(t,e){0==--t._eventsCount?t._events=new Er:delete t._events[e]}function Nr(){this._events=new Er,this._eventsCount=0}r=e,Or=Object.prototype.hasOwnProperty,_r="~",Object.create&&(Er.prototype=Object.create(null),(new Er).__proto__||(_r=!1)),Nr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)Or.call(t,e)&&n.push(_r?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Nr.prototype.listeners=function(t){var t=_r?_r+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},Nr.prototype.listenerCount=function(t){t=_r?_r+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Nr.prototype.emit=function(t,e,n,r,i,a){var o=_r?_r+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[h].fn.apply(l[h].context,s)}return!0},Nr.prototype.on=function(t,e,n){return Tr(this,t,e,n,!1)},Nr.prototype.once=function(t,e,n){return Tr(this,t,e,n,!0)},Nr.prototype.removeListener=function(t,e,n,r){t=_r?_r+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||Pr(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:Pr(this,t)}}else Pr(this,t);return this},Nr.prototype.removeAllListeners=function(t){return t?(t=_r?_r+t:t,this._events[t]&&Pr(this,t)):(this._events=new Er,this._eventsCount=0),this},Nr.prototype.off=Nr.prototype.removeListener,Nr.prototype.addListener=Nr.prototype.on,Nr.prefixed=_r,r.exports=Nr.EventEmitter=Nr;var jr=e.exports;function Lr(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function Cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lr(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fr(t){return(Fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Br(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Xr(r.key),r)}}function l(t,e,n){return e&&Br(t.prototype,e),n&&Br(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e,n){return(e=Xr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ir(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dr(t,e)}function Rr(t){return(Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Dr(t,e){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function zr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=Rr(n),e=(t=r?(t=Rr(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return zr(e)}}function Wr(){return(Wr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Rr(t)););return t}(t,e);if(r)return(r=Object.getOwnPropertyDescriptor(r,e)).get?r.get.call(arguments.length<3?t:n):r.value}).apply(this,arguments)}function Vr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||qr(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hr(t){return function(t){if(Array.isArray(t))return Yr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||qr(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qr(t,e){var n;if(t)return"string"==typeof t?Yr(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yr(t,e):void 0}function Yr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ur(t,e){var n,r,i,a,o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return r=!(n=!0),{s:function(){o=o.call(t)},n:function(){var t=o.next();return n=t.done,t},e:function(t){r=!0,i=t},f:function(){try{n||null==o.return||o.return()}finally{if(r)throw i}}};if(Array.isArray(t)||(o=qr(t))||e&&t&&"number"==typeof t.length)return o&&(t=o),a=0,{s:e=function(){},n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Xr(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=typeof(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(n=u=u||{}).COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>";var M,Kr=function(){function g(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[0,0,0],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[0,0,0];w(this,g),this.center=v(),this.halfExtents=v(),this.min=v(),this.max=v(),this.update(t,e)}return l(g,[{key:"update",value:function(t,e){It(this.center,t),It(this.halfExtents,e),Xt(this.min,this.center,this.halfExtents),Dt(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(t,e){Dt(this.center,e,t),Gt(this.center,this.center,.5),Xt(this.halfExtents,e,t),Gt(this.halfExtents,this.halfExtents,.5),It(this.min,t),It(this.max,e)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(t){var e,n,r,i,a,o,s,l,c,u,f,h,d,p,y;g.isEmpty(t)||(g.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],y=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=y-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=y+u)&&(d=p),(y=h-(f=t[2]))<(u=a-o)&&(u=y),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(y=l-c)<(a=n-i)?y:a)+(o=(o=n+i)<(h=l+c)?h:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))}},{key:"setFromTransformedAABB",value:function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],f=e[2],h=e[6],d=e[10],p=Math.abs(a),y=Math.abs(o),g=Math.abs(s),v=Math.abs(l),m=Math.abs(c),b=Math.abs(u),x=Math.abs(f),k=Math.abs(h),w=Math.abs(d);Rt(n,e[12]+a*i[0]+o*i[1]+s*i[2],e[13]+l*i[0]+c*i[1]+u*i[2],e[14]+f*i[0]+h*i[1]+d*i[2]),Rt(r,p*t[0]+y*t[1]+g*t[2],v*t[0]+m*t[1]+b*t[2],x*t[0]+k*t[1]+w*t[2]),this.min=Xt(this.min,n,r),this.max=Dt(this.max,n,r)}},{key:"intersects",value:function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]}},{key:"intersection",value:function(t){var e,n,r,i;return this.intersects(t)?(e=new g,i=v(),n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=v(),i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null}},{key:"containsPoint",value:function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])}},{key:"getNegativeFarPoint",value:function(t){return 273===t.pnVertexFlag?It(v(),this.min):272===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):b(this.max[0],this.max[1],this.max[2])}},{key:"getPositiveFarPoint",value:function(t){return 273===t.pnVertexFlag?It(v(),this.max):272===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):b(this.min[0],this.min[1],this.min[2])}}],[{key:"isEmpty",value:function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]}}]),g}(),$r=function(){function n(t,e){w(this,n),this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||b(0,1,0),this.updatePNVertexFlag()}return l(n,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])}},{key:"distanceToPoint",value:function(t){return Vt(t,this.normal)-this.distance}},{key:"normalize",value:function(){var t=1/Kt(this.normal);Gt(this.normal,this.normal,t),this.distance*=t}},{key:"intersectsLine",value:function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o}}]),n}(),Zr=(0,function(){function n(t){if(w(this,n),this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new $r)}return l(n,[{key:"extractFromVPMatrix",value:function(t){var t=Vr(t,16),e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],y=t[14],t=t[15];Rt(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,Rt(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,Rt(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,Rt(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,Rt(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-y,Rt(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+y,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})}}]),n}()),Jr=function(){function n(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;w(this,n),this.x=0,this.y=0,this.x=t,this.y=e}return l(n,[{key:"clone",value:function(){return new n(this.x,this.y)}},{key:"copyFrom",value:function(t){this.x=t.x,this.y=t.y}}]),n}(),Qr=function(){function i(t,e,n,r){w(this,i),this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return l(i,[{key:"toJSON",value:function(){}}]),i}(),ti=((r=M=M||{}).GROUP="g",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",dn(function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}));function ei(t){if(!t)throw new Error}function ni(t,e){if(t===e)throw new Error}function ri(t){return"function"==typeof t}var ii={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},ai=dn(function(t){var t=ti(t),e=ii[t];return(null==e?void 0:e.alias)||t});function oi(t){return t?"number"===t?c.kNumber:"percent"===t||"%"===t?c.kPercentage:(e=t,vi.find(function(t){return t.name===e}).unit_type):c.kUnknown;var e}function si(t){var e=1;switch(t){case c.kPixels:case c.kDegrees:case c.kSeconds:break;case c.kMilliseconds:e=.001;break;case c.kRadians:e=180/Math.PI;break;case c.kGradians:e=.9;break;case c.kTurns:e=360}return e}function li(t){switch(t){case c.kNumber:case c.kInteger:return"";case c.kPercentage:return"%";case c.kEms:return"em";case c.kRems:return"rem";case c.kPixels:return"px";case c.kDegrees:return"deg";case c.kRadians:return"rad";case c.kGradians:return"grad";case c.kMilliseconds:return"ms";case c.kSeconds:return"s";case c.kTurns:return"turn"}return""}var c,ci,ui,fi,hi,di,pi,yi,gi="Method not implemented.",vi=((e=c=c||{})[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger",(n=ci=ci||{})[n.kUNumber=0]="kUNumber",n[n.kUPercent=1]="kUPercent",n[n.kULength=2]="kULength",n[n.kUAngle=3]="kUAngle",n[n.kUTime=4]="kUTime",n[n.kUOther=5]="kUOther",0,(r=ui=ui||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo",(e=fi=fi||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo",[{name:"em",unit_type:c.kEms},{name:"px",unit_type:c.kPixels},{name:"deg",unit_type:c.kDegrees},{name:"rad",unit_type:c.kRadians},{name:"grad",unit_type:c.kGradians},{name:"ms",unit_type:c.kMilliseconds},{name:"s",unit_type:c.kSeconds},{name:"rem",unit_type:c.kRems},{name:"turn",unit_type:c.kTurns}]),mi=((n=hi=hi||{})[n.kUnknownType=0]="kUnknownType",n[n.kUnparsedType=1]="kUnparsedType",n[n.kKeywordType=2]="kKeywordType",n[n.kUnitType=3]="kUnitType",n[n.kSumType=4]="kSumType",n[n.kProductType=5]="kProductType",n[n.kNegateType=6]="kNegateType",n[n.kInvertType=7]="kInvertType",n[n.kMinType=8]="kMinType",n[n.kMaxType=9]="kMaxType",n[n.kClampType=10]="kClampType",n[n.kTransformType=11]="kTransformType",n[n.kPositionType=12]="kPositionType",n[n.kURLImageType=13]="kURLImageType",n[n.kColorType=14]="kColorType",n[n.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){w(this,t)}return l(t,[{key:"toString",value:function(){return this.buildCSSText(ui.kNo,fi.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=hi.kUnitType&&this.getType()<=hi.kClampType}}],[{key:"isAngle",value:function(t){return t===c.kDegrees||t===c.kRadians||t===c.kGradians||t===c.kTurns}},{key:"isLength",value:function(t){return t>=c.kEms&&t<c.kDegrees}},{key:"isRelativeUnit",value:function(t){return t===c.kPercentage||t===c.kEms||t===c.kRems}},{key:"isTime",value:function(t){return t===c.kSeconds||t===c.kMilliseconds}}]),t}()),bi=function(){Ir(r,mi);var n=Gr(r);function r(t){var e;return w(this,r),(e=n.call(this)).colorSpace=void 0,e.colorSpace=t,e}return l(r,[{key:"getType",value:function(){return hi.kColorType}},{key:"to",value:function(t){return this}}]),r}(),xi=((r=di=di||{})[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",function(){Ir(i,mi);var r=Gr(i);function i(t,e){var n;return w(this,i),(n=r.call(this)).type=void 0,n.value=void 0,n.type=t,n.value=e,n}return l(i,[{key:"clone",value:function(){return new i(this.type,this.value)}},{key:"buildCSSText",value:function(t,e,n){return n}},{key:"getType",value:function(){return hi.kColorType}}]),i}()),ki=function(){Ir(r,mi);var n=Gr(r);function r(t){var e;return w(this,r),(e=n.call(this)).value=void 0,e.value=t,e}return l(r,[{key:"clone",value:function(){return new r(this.value)}},{key:"getType",value:function(){return hi.kKeywordType}},{key:"buildCSSText",value:function(t,e,n){return n+this.value}}]),r}();(e=pi=pi||{}).kAdd="+",e.kSubtract="-",e.kMultiply="*",e.kDivide="/",e.kMin="min",e.kMax="max",e.kClamp="clamp",e.kInvalid="",(n=yi=yi||{})[n.kLength=0]="kLength",n[n.kAngle=1]="kAngle",n[n.kTime=2]="kTime",n[n.kFrequency=3]="kFrequency",n[n.kResolution=4]="kResolution",n[n.kFlex=5]="kFlex",n[n.kPercent=6]="kPercent",n[n.kNumBaseTypes=7]="kNumBaseTypes";function wi(t){return"number"==typeof t?new Ni(t,c.kNumber):t}var Mi=function(){function n(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:c.kNumber,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;w(this,n),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=yi.kPercent,this.hasPercentHint=!1,this.exponents=new Array(yi.kNumBaseTypes).fill(0),t!==c.kNumber&&this.setExponent(function(t){switch(ni(t,c.kNumber),t){case c.kEms:case c.kPixels:case c.kRems:return yi.kLength;case c.kMilliseconds:case c.kSeconds:return yi.kTime;case c.kDegrees:case c.kRadians:case c.kGradians:case c.kTurns:return yi.kAngle;case c.kPercentage:return yi.kPercent;default:return yi.kLength}}(t),e)}return l(n,[{key:"applyPercentHint",value:function(t){ni(t,yi.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(yi.kPercent)),this.setExponent(yi.kPercent,0),this.percentHint=t,this.hasPercentHint=!0}},{key:"hasNonZeroEntries",value:function(){return 0<this.numNonZeroEntries}},{key:"isOnlyNonZeroEntry",value:function(t,e){return ni(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e}},{key:"exponent",value:function(t){return this.exponents[t]}},{key:"setExponent",value:function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e}},{key:"matchesBaseType",value:function(t){return ni(t,yi.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint}},{key:"matchesPercentage",value:function(){return this.isOnlyNonZeroEntry(yi.kPercent,1)}},{key:"matchesBaseTypePercentage",value:function(t){return ni(t,yi.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(yi.kPercent,1)}},{key:"matchesNumber",value:function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint}},{key:"matchesNumberPercentage",value:function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(yi.kPercent,1)}}],[{key:"negateExponents",value:function(t){return t.exponents.forEach(function(t){return-1*t}),t}},{key:"add",value:function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);var r=t.percentHint,i=e.percentHint;if(r!==i)throw new Error;for(var a=0;a<yi.kNumBaseTypes;++a){var o=a;if(t.exponents[a]!==e.exponents[a]&&(o!==yi.kPercent&&(t.applyPercentHint(o),e.applyPercentHint(o)),t.exponents[a]!==e.exponents[a]))return t}}return t}},{key:"multiply",value:function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<yi.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t}}]),n}(),Oi=function(){Ir(p,mi);var n=Gr(p);function p(t){var e;return w(this,p),(e=n.call(this)).type_=void 0,e.type_=t,e}return l(p,[{key:"getType",value:function(){return hi.kUnknownType}},{key:"equals",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _i(n).every(function(t){return e.equals(t)})}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=_i(e),i=(Si(hi.kSumType,r,this),Ai(r,pi.kAdd));return i||zi.create(r)}},{key:"sub",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=_i(e)).map(function(t){return t.negate()}),i=(Si(hi.kSumType,r,this),Ai(r,pi.kAdd));return i||zi.create(r)}},{key:"mul",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=_i(e),i=(Si(hi.kProductType,r,this),Ti(r));return i||Gi.create(r)}},{key:"div",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=_i(e)).map(function(t){return t.invert()}),i=(Si(hi.kProductType,r,this),Ti(r));return i||Gi.create(r)}},{key:"min",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=_i(e),i=(Si(hi.kMinType,r,this),Ai(r,pi.kMin));return i||Ri.create(r)}},{key:"max",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=_i(e),i=(Si(hi.kMaxType,r,this),Ai(r,pi.kMax));return i||Di.create(r)}},{key:"to",value:function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=Ei(e[0]))?(t="string"==typeof t?oi(t):t,e.convertTo(t)):null}},{key:"toSum",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a=i[r];if(!p.isValidUnit(oi(a)))return null}var o=this.sumValue();if(!o.length)return null;var s,l=[],c=Ur(o);try{for(c.s();!(s=c.n()).done;){var u=Ei(s.value);if(!u)return null;l.push(u)}}catch(t){c.e(t)}finally{c.f()}if(0===e.length)return l.sort(function(t,e){return t.unit-e.unit}),ei(!!(o=zi.create(l))),o;for(var f=[],h=0,d=e;h<d.length;h++)!function(){var t=d[h],r=oi(t),t=(ei(p.isValidUnit(r)),l.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,l[n]=null),t},0));f.push(new Ni(t,r))}();if(l.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return zi.create(f)}},{key:"type",value:function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(yi.kLength);return e&&(t.length=e),(e=this.type_.exponent(yi.kAngle))&&(t.angle=e),(e=this.type_.exponent(yi.kTime))&&(t.time=e),(e=this.type_.exponent(yi.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(yi.kResolution))&&(t.resolution=e),(e=this.type_.exponent(yi.kFlex))&&(t.flex=e),(e=this.type_.exponent(yi.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case yi.kLength:return"length";case yi.kAngle:return"angle";case yi.kTime:return"time";case yi.kFrequency:return"frequency";case yi.kResolution:return"resolution";case yi.kFlex:return"flex";case yi.kPercent:return"percent"}return""}(this.type_.percentHint)),t}},{key:"negate",value:function(){return Ci.create(this)}},{key:"invert",value:function(){return Li.create(this)}}],[{key:"isValidUnit",value:function(t){return!!(t===c.kNumber||t==c.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))}}]),p}();function _i(t){return t.map(wi)}function Si(t,e,n){ei(!!n),n.getType()===t?e.unshift.apply(e,Hr(n.numericValues())):e.unshift(n)}function Ei(t){return 0===Object.keys(t.units).length?new Ni(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Ni(t.value,Number(Object.keys(t.units)[0])):null}function Ai(t,e){ei(!!t.length);var n=t[0]instanceof Ni?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var a=t[i]instanceof Ni?t[i]:null;if(!a||a.unit!==n.unit)return null;e===pi.kAdd?r+=a.value:e===pi.kMax?r=Math.max(r,a.value):e===pi.kMin&&(r=Math.min(r,a.value))}return new Ni(r,n.unit)}function Ti(t){ei(!!t.length);for(var e=c.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof Ni?t[r]:null;if(!i)return null;if(i.unit!==c.kNumber){if(e!==c.kNumber)return null;e=i.unit}n*=i.value}return new Ni(n,e)}function Pi(t){switch(function(t){switch(t){case c.kNumber:case c.kInteger:return ci.kUNumber;case c.kPercentage:return ci.kUPercent;case c.kPixels:return ci.kULength;case c.kMilliseconds:case c.kSeconds:return ci.kUTime;case c.kDegrees:case c.kRadians:case c.kGradians:case c.kTurns:return ci.kUAngle;default:return ci.kUOther}}(t)){case ci.kUNumber:return c.kNumber;case ci.kULength:return c.kPixels;case ci.kUPercent:return c.kPercentage;case ci.kUTime:return c.kSeconds;case ci.kUAngle:return c.kDegrees;default:return c.kUnknown}}var Ni=function(){Ir(i,Oi);var r=Gr(i);function i(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:c.kNumber;return w(this,i),n="string"==typeof n?oi(n):n,(e=r.call(this,new Mi(n))).unit=void 0,e.value=void 0,e.unit=n,e.value=t,e}return l(i,[{key:"clone",value:function(){return new i(this.value,this.unit)}},{key:"convertTo",value:function(t){var e;return this.unit===t?new i(this.value,this.unit):(e=Pi(this.unit))!==Pi(t)||e===c.kUnknown?null:(e=si(this.unit)/si(t),new i(this.value*e,t))}},{key:"equals",value:function(t){return this.value===t.value&&this.unit===t.unit}},{key:"getType",value:function(){return hi.kUnitType}},{key:"sumValue",value:function(){var t,e,n=[],r={};return this.unit!==c.kNumber&&(r[t=this.unit,(e=Pi(t))===c.kUnknown?t:e]=1),n.push({value:this.value*si(this.unit),units:r}),n}},{key:"negate",value:function(){return new i(-this.value,this.unit)}},{key:"invert",value:function(){return this.unit===c.kNumber?0===this.value?null:new i(1/this.value,this.unit):Li.create(this)}},{key:"buildCSSText",value:function(t,e,n){switch(this.unit){case c.kUnknown:break;case c.kInteger:i=Number(this.value).toFixed(0);break;case c.kNumber:case c.kPercentage:case c.kEms:case c.kRems:case c.kPixels:case c.kDegrees:case c.kRadians:case c.kGradians:case c.kMilliseconds:case c.kSeconds:case c.kTurns:var r,i,a=this.value,o=li(this.unit);i=a<-999999||999999<a?(r=li(this.unit),!Number.isFinite(a)||Number.isNaN(a)?function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return(Number.isFinite(t)?(ei(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(a,r):a+(r||"")):"".concat(a).concat(o)}return n+=i}}]),i}(),ji=function(){Ir(e,Oi);var t=Gr(e);function e(){return w(this,e),t.apply(this,arguments)}return l(e,[{key:"isUnitValue",value:function(){return!1}}]),e}(),Li=function(){Ir(r,ji);var n=Gr(r);function r(t,e){return w(this,r),(e=n.call(this,e)).value=void 0,e.operator="invert",e.value=t,e}return l(r,[{key:"clone",value:function(){return new r(this.value,this.type_)}},{key:"getType",value:function(){return hi.kInvertType}},{key:"equals",value:function(t){return t.getType()===hi.kInvertType&&this.value.equals(t.value)}},{key:"sumValue",value:function(){var e=this.value.sumValue();return 0===e.length||1!==e.length||0===e[0].value?null:(Object.keys(e[0].units).forEach(function(t){e[0].units[t]*=-1}),e[0].value=1/e[0].value,e)}},{key:"buildCSSText",value:function(t,e,n){return e==fi.kNo&&(n+=t===ui.kYes?"(":"calc("),n=this.value.buildCSSText(ui.kYes,fi.kNo,n+="1 / "),e===fi.kNo&&(n+=")"),n}}],[{key:"create",value:function(t){return new r(t,Mi.negateExponents(t.type_))}}]),r}(),Ci=function(){Ir(r,ji);var n=Gr(r);function r(t,e){return w(this,r),(e=n.call(this,e)).value=void 0,e.operator="negate",e.value=t,e}return l(r,[{key:"clone",value:function(){return new r(this.value,this.type_)}},{key:"getType",value:function(){return hi.kNegateType}},{key:"equals",value:function(t){return t.getType()===hi.kNegateType&&this.value.equals(t.value)}},{key:"sumValue",value:function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach(function(t){t.value*=-1}),t)}},{key:"buildCSSText",value:function(t,e,n){return e==fi.kNo&&(n+=t===ui.kYes?"(":"calc("),n=this.value.buildCSSText(ui.kYes,fi.kNo,n+="-"),e===fi.kNo&&(n+=")"),n}}],[{key:"create",value:function(t){return new r(t,t.type_)}}]),r}();function Fi(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function Bi(t){return Yi[t]||(Yi[t]=new ki(t)),Yi[t]}var Ii=function(){Ir(r,ji);var n=Gr(r);function r(t,e){return w(this,r),(e=n.call(this,e)).values=void 0,e.values=t,e}return l(r,[{key:"numericValues",value:function(){return this.values}},{key:"equals",value:function(n){return this.getType()===n.getType()&&this.values.every(function(t,e){return t.equals(n.values[e])})}}]),r}(),Ri=function(){Ir(a,Ii);var i=Gr(a);function a(){var t;w(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).operator="min",t}return l(a,[{key:"clone",value:function(){return new a(this.values,this.type_)}},{key:"getType",value:function(){return hi.kMinType}},{key:"sumValue",value:function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;var e,n=Ur(this.numericValues());try{for(n.s();!(e=n.n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;r[0].value<t[0].value&&(t=r)}}catch(t){n.e(t)}finally{n.f()}return t}},{key:"buildCSSText",value:function(t,e,n){n+="min(";var r,i=!0,a=Ur(this.numericValues());try{for(a.s();!(r=a.n()).done;){var o=r.value;i||(n+=", "),i=!1,n=o.buildCSSText(ui.kYes,fi.kYes,n)}}catch(t){a.e(t)}finally{a.f()}return n+=")"}}],[{key:"create",value:function(t){return new a(t,Fi(t,Mi.add))}}]),a}(),Di=function(){Ir(a,Ii);var i=Gr(a);function a(){var t;w(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).operator="max",t}return l(a,[{key:"clone",value:function(){return new a(this.values,this.type_)}},{key:"getType",value:function(){return hi.kMaxType}},{key:"sumValue",value:function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;var e,n=Ur(this.numericValues());try{for(n.s();!(e=n.n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;r[0].value<t[0].value&&(t=r)}}catch(t){n.e(t)}finally{n.f()}return t}},{key:"buildCSSText",value:function(t,e,n){n+="max(";var r,i=!0,a=Ur(this.numericValues());try{for(a.s();!(r=a.n()).done;){var o=r.value;i||(n+=", "),i=!1,n=o.buildCSSText(ui.kYes,fi.kYes,n)}}catch(t){a.e(t)}finally{a.f()}return n+=")"}}],[{key:"create",value:function(t){return new a(t,Fi(t,Mi.add))}}]),a}(),zi=function(){Ir(a,Ii);var i=Gr(a);function a(){var t;w(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).operator="sum",t}return l(a,[{key:"clone",value:function(){return new a(this.values,this.type_)}},{key:"getType",value:function(){return hi.kSumType}},{key:"sumValue",value:function(){var n=[];return this.numericValues().forEach(function(t){t=t.sumValue();if(!t.length)return null;t.forEach(function(e){var t=n.findIndex(function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)});-1===t?n.push(Cr({},e)):n[t].value+=e.value})}),a.canCreateNumericTypeFromSumValue(n)?n:null}},{key:"buildCSSText",value:function(t,e,n){e==fi.kNo&&(n+=t===ui.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(ui.kYes,fi.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===hi.kNegateType?(n+=" - ",a.value):(n+=" + ",a)).buildCSSText(ui.kYes,fi.kNo,n)}return e===fi.kNo&&(n+=")"),n}}],[{key:"create",value:function(t){return new a(t,Fi(t,Mi.add))}},{key:"numericTypeFromUnitMap",value:function(n){var r=new Mi;return Object.keys(n).forEach(function(t){var e=n[t];r=Mi.multiply(r,new Mi(Number(t),e),!1),ei(!0)}),r}},{key:"canCreateNumericTypeFromSumValue",value:function(t){var e=this,n=(ei(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return Mi.add(n,e.numericTypeFromUnitMap(t.units),!1),!0})}}]),a}(),Gi=function(){Ir(a,Ii);var i=Gr(a);function a(){var t;w(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).operator="product",t}return l(a,[{key:"clone",value:function(){return new a(this.values,this.type_)}},{key:"getType",value:function(){return hi.kProductType}},{key:"sumValue",value:function(){var e=[{value:1,units:{}}];return this.numericValues().forEach(function(t){var n=t.sumValue();if(!n.length)return null;var r=[];e.forEach(function(e){n.forEach(function(t){r.push({value:e.value*t.value,units:a.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e}},{key:"buildCSSText",value:function(t,e,n){e==fi.kNo&&(n+=t===ui.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(ui.kYes,fi.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===hi.kInvertType?(n+=" / ",a.value):(n+=" * ",a)).buildCSSText(ui.kYes,fi.kNo,n)}return e===fi.kNo&&(n+=")"),n}}],[{key:"create",value:function(t){return new a(t,Fi(t,Mi.multiply))}},{key:"multiplyUnitMaps",value:function(n,r){return Object.keys(r).forEach(function(t){ni(r[t].value,0);var e=t in n?n[t].value:0;e+r[t].value===0?delete n[t]:n[t]=e+r[t].value}),n}}]),a}(),Wi=new Ni(0,"px"),Vi=(new Ni(1,"px"),new Ni(0,"deg")),Hi=function(){Ir(s,bi);var o=Gr(s);function s(t,e,n){var r,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,a=4<arguments.length&&void 0!==arguments[4]&&arguments[4];return w(this,s),(r=o.call(this,"rgb")).r=void 0,r.g=void 0,r.b=void 0,r.alpha=void 0,r.isNone=void 0,r.r=t,r.g=e,r.b=n,r.alpha=i,r.isNone=a,r}return l(s,[{key:"clone",value:function(){return new s(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}]),s}(),qi=new ki("unset"),r=new ki("initial"),e=new ki("inherit"),Yi={"":qi,unset:qi,initial:r,inherit:e},Ui=new Hi(0,0,0,0,!0),Xi=new Hi(0,0,0,0),Ki=dn(function(t,e,n,r){return new Hi(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),$i=dn(function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:c.kNumber;return new Ni(t,e)},function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:c.kNumber;return"".concat(t).concat(e)}),Zi=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Ji=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Qi=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,ta=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var ea={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},na=dn(function(t){t="angular"===t.type?Number(t.value):ea[t.value]||0;return $i(t,"deg")}),ra=dn(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:$i(n,i),cy:$i(r,a)}}),ia=dn(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Vo(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!qe(c)&&!qe(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:"".concat(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var f,h=t.map(function(t){return{offset:$i(t.length.value,"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#".concat(t):"literal"===e?t:("rgb"===e?"rgb(":"rgba(").concat(t.join(","),")"))};var e});return"linear-gradient"===e?new xi(di.LinearGradient,{angle:n?na(n):Vi,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=ra(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?Bi(n):$i(n,f)),new xi(di.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=Zi.exec(t);if(n)return r=(null==(r=n[2].match(ta))?void 0:r.map(function(t){return t.split(":")}))||[],[new xi(di.LinearGradient,{angle:$i(parseFloat(n[1]),"deg"),steps:r.map(function(t){var t=Vr(t,2),e=t[0],t=t[1];return{offset:$i(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=Ji.exec(t);if(t)return t=(null==(t=t[4].match(ta))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:$i(50,"%"),cy:$i(50,"%"),steps:t.map(function(t){var t=Vr(t,2),e=t[0],t=t[1];return{offset:$i(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!en(n))return[new xi(di.RadialGradient,n)]}else if("p"===e){var r=t;if(r=Qi.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});var aa=dn(function(t){var e;return Ke(e=t)&&e.image?Cr({repetition:"repeat"},t):"transparent"===(t=qe(t)?"":t)?Xi:ia(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=In(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),Ki.apply(void 0,e))});function oa(t,e){if(t instanceof Hi&&e instanceof Hi)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(nn(e[n],0,255));return e[3]=nn(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function sa(t,e){if(qe(e))return $i(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return $i(Number(e),"px");if(0<="deg".search(t))return $i(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return $i(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var la=dn(function(t){return sa(new RegExp("px","g"),t)}),ca=(dn(function(t){return sa(new RegExp("%","g"),t)}),dn(function(t){return rn(t)||isFinite(Number(t))?$i(Number(t),"px"):sa(new RegExp("px|%|em|rem","g"),t)})),ua=dn(function(t){return sa(new RegExp("deg|rad|grad|turn","g"),t)});function fa(t){var e=0;return t.unit===c.kDegrees?e=t.value:t.unit===c.kRadians?e=jo(Number(t.value)):t.unit===c.kTurns&&(e=360*Number(t.value)),e}function ha(t){return en(t)?t.split(" ").map(function(t){return ca(t)}):t.map(function(t){return ca(t.toString())})}function da(t,e,n){var r;return t.unit===c.kPixels?Number(t.value):t.unit===c.kPercentage&&n?(n=n.nodeName===M.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,Kr.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var pa=function(t){return sa(/deg|rad|grad|turn|px|%/g,t)},ya=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function ga(){var t=(t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").toLowerCase().trim();if("none"!==t)for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<ya.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return pa(t)||aa(t)})}),n.lastIndex===t.length)return r}return[]}function va(t){return t.toString()}var ma=dn(function(t){return"number"==typeof t?$i(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?$i(Number(t)):$i(0)});function ba(t,e){return[t,e,va]}function xa(n,r){return function(t,e){return[t,e,function(t){return va(nn(t,n,r))}]}}function ka(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}dn(function(t){return(en(t)?t.split(" "):t).map(ma)});var wa=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=je(e)}catch(t){n=je(""),console.error("[g]: Invalid SVG Path definition: ".concat(e))}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=an(No(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=ms([1,0],p),f=ms(p,u);vs(p,u)<=-1&&(f=Math.PI);1<=vs(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:us(t,[c,e])?0:n,ry:us(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):(m=l.length,n=[l[m-2],l[m-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&us(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,y,g,v,m=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=m,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=hs((h=e[s-1]).currentPoint,b),"Q"===h.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(y=hs((p=e[s-1]).currentPoint,b),g=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-y[0],b[1]-y[1]]):(u.command="SQ",u.startTangent=[b[0]-g[0],b[1]-g[1]]),u.endTangent=[n[0]-g[0],n[1]-g[1]]):"A"===c&&(y=ys(u,0),b=y.x,g=y.y,c=ys(u,1,!1),v=c.x,c=c.y,u.startTangent=[b,g],u.endTangent=[v,c]),e.push(u)}return e}(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=cr.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=yr.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=wr.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var h=tn(n),d=tn(r),p=Qe(n),y=Qe(r);if(0!==i.length)for(var g=0;g<i.length;g++){var v=i[g],m=v.currentPoint,b=void 0;m[0]===h?(b=fs(v,e),h-=b.xExtra):m[0]===p&&(b=fs(v,e),p+=b.xExtra),m[1]===d?(b=fs(v,e),d-=b.yExtra):m[1]===y&&(b=fs(v,e),y+=b.yExtra)}return{x:h,y:d,width:p-h,height:y-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},Ma=dn(wa);function Oa(t,e){t=(en(t)?Ma:wa)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function _a(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=De(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=De(e.absolutePath,!1),e.curve=d),[h,d]),h=Ge((t=h.length!==d.length?function t(e,n,r){var i,e=We(e),n=We(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],f=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==Ge(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):ye(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){f+=Fe(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function Sa(t,e){var n,r,i=en(t)?t.split(" ").map(function(t){var t=Vr(t.split(","),2),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=Sr.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=nr.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,Hr(i.map(function(t){return t[0]})))),l=Math.min.apply(Math,Hr(i.map(function(t){return t[1]})));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}var Ea=null;function Aa(t){return function(e){var n=0;return t.map(function(t){return t===Ea?e[n++]:t})}}function Ta(t){return t}var Pa={matrix:["NNNNNN",[Ea,Ea,0,0,Ea,Ea,0,0,0,0,1,0,Ea,Ea,0,1],Ta],matrix3d:["NNNNNNNNNNNNNNNN",Ta],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Aa([Ea,Ea,new Ni(1)]),Ta],scalex:["N",Aa([Ea,new Ni(1),new Ni(1)]),Aa([Ea,new Ni(1)])],scaley:["N",Aa([new Ni(1),Ea,new Ni(1)]),Aa([new Ni(1),Ea])],scalez:["N",Aa([new Ni(1),new Ni(1),Ea])],scale3d:["NNN",Ta],skew:["Aa",null,Ta],skewx:["A",null,Aa([Ea,Vi])],skewy:["A",null,Aa([Vi,Ea])],translate:["Tt",Aa([Ea,Ea,Wi]),Ta],translatex:["T",Aa([Ea,Wi,Wi]),Aa([Ea,Wi])],translatey:["T",Aa([Wi,Ea,Wi]),Aa([Wi,Ea])],translatez:["L",Aa([Wi,Wi,Ea])],translate3d:["TTL",Ta]};function Na(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=Pa[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?Vi:ua(t)},N:ma,T:ca,L:la}[h.toUpperCase()](f):{a:Vi,n:c[0],t:Wi}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function ja(t){switch(t.t){case"rotatex":return i=No(fa(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=No(fa(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=No(fa(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=No(fa(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":o=No(fa(t.d[0])),a=No(fa(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=No(fa(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=No(fa(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=da(t.d[0],0,null)||0,n=da(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=da(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=da(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=da(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=da(t.d[0],0,null)||0,n=da(t.d[1],0,null)||0,r=da(t.d[2],0,null)||0,1];case"perspective":a=da(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function La(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function Ca(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return function(t,e,n,r,i,a){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(Fo,t))return;if(ht(Bo,Fo),Bo[3]=0,Bo[7]=0,Bo[11]=0,Bo[15]=1,Math.abs(vt(Bo))<1e-8)return;var t=Fo[3],o=Fo[7],s=Fo[11],l=Fo[12],c=Fo[13],u=Fo[14],f=Fo[15];if(0!==t||0!==o||0!==s){if(Io[0]=t,Io[1]=o,Io[2]=s,Io[3]=f,!gt(Bo,Bo))return;yt(Bo,Bo),Zt(i,Io,Bo)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,Fo),n[0]=Bt(d[0]),Wt(d[0],d[0]),r[0]=Vt(d[0],d[1]),Do(d[1],d[1],d[0],1,-r[0]),n[1]=Bt(d[1]),Wt(d[1],d[1]),r[0]/=n[1],r[1]=Vt(d[0],d[2]),Do(d[2],d[2],d[0],1,-r[1]),r[2]=Vt(d[1],d[2]),Do(d[2],d[2],d[1],1,-r[2]),n[2]=Bt(d[2]),Wt(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Ht(Ro,d[1],d[2]),Vt(d[0],Ro)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]);d[0][2]>d[2][0]&&(a[1]=-a[1]);d[1][0]>d[0][1]&&(a[2]=-a[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(ja).reduce(La),e,n,r,i,a),[[e,n,r,a,i]]}var Fa=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=Ba(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=Ba(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=Ba(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=Ba(a,f));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function Ba(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function Ia(t){return t.toFixed(6).replace(".000000","")}function Ra(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Ca(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Ca(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=nn(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return Fa(t[0],t[1],t[2],e,t[4]).map(Ia).join(",")}])}function Da(t){return t.replace(/[xy]/,"")}function za(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var Ga=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function Wa(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?$i(n):$i(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var l=Ra(r,i),a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,f=i[c].t,h=r[c].d,d=i[c].d,p=Pa[u],y=Pa[f],g=void 0;if(Ga(u,f)){var v=Ra([r[c]],[i[c]]);a.push(v[0]),o.push(v[1]),s.push(["matrix",[v[2]]])}else{if(u===f)g=u;else if(p[2]&&y[2]&&Da(u)===Da(f))g=Da(u),h=p[2](h),d=y[2](d);else{if(!p[1]||!y[1]||za(u)!==za(f)){v=Ra(r,i);a=[v[0]],o=[v[1]],s=[["matrix",[v[2]]]];break}g=za(u),h=p[1](h),d=y[1](d)}for(var m=[],b=[],x=[],k=0;k<h.length;k++){var w=function(t,e,n,r,i){var i=4<arguments.length&&void 0!==i?i:0,a="",o=t.value||0,s=e.value||0,l=Pi(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=li(t.unit)):(Ni.isLength(t.unit)||Ni.isLength(e.unit))&&(o=da(t,i,n),s=da(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[k],d[k],t,!1,k);m[k]=w[0],b[k]=w[1],x.push(w[2])}a.push(m),o.push(b),s.push([g,x])}}return e&&(l=a,a=o,o=l),[a,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var Va=dn(function(t){var e;return en(t)?"text-anchor"===t?[$i(0,"px"),$i(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[ca(Ha(e[0])),ca(Ha(e[1]))]):[$i(t[0]||0,"px"),$i(t[1]||0,"px")]});function Ha(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var n=function(){function t(){w(this,t),this.parser=ua,this.mixer=ba}return l(t,[{key:"calculator",value:function(t,e,n,r){return fa(n)}}]),t}(),r=function(){function t(){w(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof ki&&(n=null),O.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&O.sceneGraphService.dirtifyToRoot(t)}),n}}]),t}(),e=function(){function t(){w(this,t),this.parser=aa,this.mixer=oa}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof ki?"none"===n.value?Ui:Xi:n}}]),t}(),qa=function(){function t(){w(this,t),this.parser=ga}return l(t,[{key:"calculator",value:function(t,e,n){return n instanceof ki?[]:n}}]),t}();function Ya(t){t=t.parsedStyle.fontSize;return qe(t)?null:t}var Ua,Xa,Ka=function(){function t(){w(this,t),this.parser=ca,this.mixer=ba}return l(t,[{key:"calculator",value:function(t,e,n,r,i){if(!Ni.isRelativeUnit(n.unit))return n.value;if(n.unit===c.kPercentage)return 0;if(n.unit===c.kEms){if(r.parentNode){var a=Ya(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===c.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=Ya(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}}}]),t}(),$a=function(){function t(){w(this,t),this.mixer=ka}return l(t,[{key:"parser",value:function(t){t=ha(rn(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t}},{key:"calculator",value:function(t,e,n){return n.map(function(t){return t.value})}}]),t}(),Za=function(){function t(){w(this,t),this.mixer=ka}return l(t,[{key:"parser",value:function(t){t=ha(rn(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t}},{key:"calculator",value:function(t,e,n){return n.map(function(t){return t.value})}}]),t}(),Ja=function(){Ir(e,Ka);var t=Gr(e);function e(){return w(this,e),t.apply(this,arguments)}return l(e,[{key:"postProcessor",value:function(t){var e,n,r;switch(t.nodeName){case M.CIRCLE:case M.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;qe(a)||(l=a),qe(i)||(c=i);break;case M.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case M.RECT:case M.IMAGE:case M.GROUP:case M.HTML:case M.TEXT:case M.MESH:qe(t.parsedStyle.x)||(l=t.parsedStyle.x),qe(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&t.nodeName!==M.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),qe(l)&&qe(c)&&qe(u)||(e=(r=Vr(t.getLocalPosition(),3))[0],n=r[1],r=r[2],t.setLocalPosition(qe(l)?e:l,qe(c)?n:c,qe(u)?r:u))}}]),e}(),Qa=function(){function t(){w(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){n=null==(n=n=n instanceof ki?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n}}]),t}(),to=function(){function t(){w(this,t),this.mixer=ba,this.parser=ma}return l(t,[{key:"calculator",value:function(t,e,n){return n.value}}]),t}(),i=function(){function t(){w(this,t),this.parser=ma,this.mixer=xa(0,1)}return l(t,[{key:"calculator",value:function(t,e,n){return n.value}},{key:"postProcessor",value:function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==M.LINE&&e!==M.PATH&&e!==M.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))}}]),t}(),eo=function(){function t(){w(this,t),this.parser=ma,this.mixer=xa(0,1)}return l(t,[{key:"calculator",value:function(t,e,n){return n.value}}]),t}(),no=function(){function t(){w(this,t),this.parser=Oa,this.mixer=_a}return l(t,[{key:"calculator",value:function(t,e,n){return n instanceof ki&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Qr(0,0,0,0)}:n}},{key:"postProcessor",value:function(t){var e,n;t.nodeName===M.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))}}]),t}(),ro=function(){function t(){w(this,t),this.parser=Sa}return l(t,[{key:"postProcessor",value:function(t){var e,n;t.nodeName!==M.POLYGON&&t.nodeName!==M.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))}}]),t}(),io=function(){Ir(a,Ka);var i=Gr(a);function a(){var t;w(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).mixer=xa(0,1/0),t}return l(a)}(),ao=function(){function t(){w(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof ki?"unset"===n.value?"":n.value:"".concat(n)}},{key:"postProcessor",value:function(t){t.nodeValue="".concat(t.parsedStyle.text)||""}}]),t}(),oo=function(){function t(){w(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value}}]),t}(),so=function(){function t(){w(this,t),this.parser=Na,this.mixer=Wa}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof ki?[]:n}},{key:"postProcessor",value:function(t){var l,c,e=t.parsedStyle.transform,u=t;e&&e.length&&(c=l=0,u?(l=u.parsedStyle.defX||0,c=u.parsedStyle.defY||0,u.resetLocalTransform(),u.setLocalPosition(l,c)):u=new _o({}),e.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],u.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],u.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],u.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],u.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],u.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[Wi,Wi],u.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[Wi],u.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[Wi],u.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[Wi],u.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[Wi,Wi,Wi],u.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[Vi],u.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[Vi],u.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[Vi],u.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[Vi],u.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],u.setLocalSkew(No(o[0]),No(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],u.setLocalSkew(No(o[0]),u.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],u.setLocalSkew(u.getLocalSkew()[0],No(o[0]))):"matrix"===s?(e=(o=Vr(t.map(function(t){return t.value}),6))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],u.setLocalTransform(dt(zo,e,n,0,0,r,i,0,0,0,0,1,0,a+l,o+c,0,1))):"matrix3d"===s&&(dt.apply(Ft,[zo].concat(Hr(t.map(function(t){return t.value})))),zo[12]+=l,zo[13]+=c,u.setLocalTransform(zo)))})),u.getLocalTransform()}}]),t}(),lo=l(function t(){w(this,t),this.parser=Va}),co=function(){function t(){w(this,t),this.parser=ma}return l(t,[{key:"calculator",value:function(t,e,n,r){return n.value}},{key:"postProcessor",value:function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)}}]),t}(),uo=function(){function e(t){w(this,e),this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new Jr,this.page=new Jr,this.canvas=new Jr,this.viewport=new Jr,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}return l(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(gi)}}]),e}(),fo=function(){Ir(i,uo);var r=Gr(i);function i(t,e){var n;return w(this,i),(n=r.call(this,null)).type=t,n.detail=e,Object.assign(zr(n),e),n}return l(i)}(),ho=function(){function t(){w(this,t),this.emitter=new jr}return l(t,[{key:"on",value:function(t,e,n){return this.addEventListener(t,e,n),this}},{key:"addEventListener",value:function(t,e,n){var r,i,a,o=sn(n)&&n||Ke(n)&&n.capture,n=Ke(n)&&n.once,s=ri(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=Vr(t.split(":"),2))[0],t=r[1],c=i,l=!0),t=o?"".concat(t,"capture"):t,e=ri(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this}},{key:"off",value:function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){this.emitter.removeAllListeners()}},{key:"removeEventListener",value:function(t,e,n){var n=sn(n)&&n||Ke(n)&&n.capture,r=ri(e)?void 0:e;return t=n?"".concat(t,"capture"):t,e=ri(e)?e:null==(n=e)?void 0:n.handleEvent,this.emitter.off(t,e,r),this}},{key:"emit",value:function(t,e){this.dispatchEvent(new fo(t,e))}},{key:"dispatchEvent",value:function(t){var e,n=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!(t instanceof uo))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");if(e=this.document?this:this.defaultView||(null==(e=this.ownerDocument)?void 0:e.defaultView)){if(t.manager=e.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],n||(t.target=this),null!=(e=t.manager)&&e.dispatchEvent(t,t.type,n)}return!t.defaultPrevented}}]),t}(),po=function(){Ir(d,ho);var i=Gr(d);function d(){var t;w(this,d);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}return l(d,[{key:"textContent",get:function(){var t,e="",n=(this.nodeName===M.TEXT&&(e+=this.style.text),Ur(this.childNodes));try{for(n.s();!(t=n.n()).done;){var r=t.value;r.nodeName===M.TEXT?e+=r.nodeValue:e+=r.textContent}}catch(t){n.e(t)}finally{n.f()}return e},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===M.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return 0<this.childNodes.length}},{key:"isDefaultNamespace",value:function(t){throw new Error(gi)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(gi)}},{key:"lookupPrefix",value:function(t){throw new Error(gi)}},{key:"normalize",value:function(){throw new Error(gi)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e}},{key:"getAncestor",value:function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e}},{key:"forEach",value:function(e){e(this)||this.childNodes.forEach(function(t){t.forEach(e)})}}],[{key:"isNode",value:function(t){return!!t.childNodes}}]),d}(),yo=(po.DOCUMENT_POSITION_DISCONNECTED=1,po.DOCUMENT_POSITION_PRECEDING=2,po.DOCUMENT_POSITION_FOLLOWING=4,po.DOCUMENT_POSITION_CONTAINS=8,po.DOCUMENT_POSITION_CONTAINED_BY=16,po.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,Ua=Ua||{},Ua[Ua.Standard=0]="Standard",(Ao=Xa=Xa||{}).DESTROY="destroy",Ao.ATTR_MODIFIED="DOMAttrModified",Ao.INSERTED="DOMNodeInserted",Ao.REMOVED="removed",Ao.MOUNTED="DOMNodeInsertedIntoDocument",Ao.UNMOUNTED="DOMNodeRemovedFromDocument",Ao.BOUNDS_CHANGED="bounds-changed",Ao.RENDER_ORDER_CHANGED="render-order-changed",Ao.CULLED="culled",function(){Ir(u,uo);var c=Gr(u);function u(t,e,n,r,i,a,o,s){var l;return w(this,u),(l=c.call(this,null)).relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return l(u)}()),go=(yo.ADDITION=2,yo.MODIFICATION=1,yo.REMOVAL=3,0),vo=new yo(Xa.INSERTED,null,"","","",0,"",""),mo=new yo(Xa.REMOVED,null,"","","",0,"",""),bo=new fo(Xa.DESTROY),xo=function(){Ir(a,po);var i=Gr(a);function a(){var t;w(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).entity=go++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Ua.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:b(0,0,0),localRotation:re(0,0,0,1),localScale:b(1,1,1),localTransform:ft(),localSkew:se(0,0),position:b(0,0,0),rotation:re(0,0,0,1),scaling:b(1,1,1),worldTransform:ft(),origin:b(0,0,0)},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:qi,opacity:qi,fillOpacity:qi,strokeOpacity:qi,fill:qi,stroke:qi,transform:qi,transformOrigin:qi,visibility:qi,pointerEvents:qi,lineWidth:qi,lineCap:qi,lineJoin:qi,increasedLineWidthForHitTesting:qi,fontSize:qi,fontFamily:qi,fontStyle:qi,fontWeight:qi,fontVariant:qi,textAlign:qi,textBaseline:qi,textTransform:qi,zIndex:qi,filter:qi,shadowType:qi},t.parsedStyle={},t.attributes={},t}return l(a,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}},{key:"cloneNode",value:function(t){throw new Error(gi)}},{key:"appendChild",value:function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return O.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),vo.relatedNode=this,t.dispatchEvent(vo),t}},{key:"insertBefore",value:function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t}},{key:"replaceChild",value:function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e}},{key:"removeChild",value:function(t){var e;return mo.relatedNode=this,t.dispatchEvent(mo),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),O.sceneGraphService.detach(t),t}},{key:"removeChildren",value:function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)})}},{key:"destroyChildren",value:function(){this.childNodes.slice().forEach(function(t){t.destroyChildren(),t.destroy()})}},{key:"matches",value:function(t){return O.sceneGraphService.matches(t,this)}},{key:"getElementById",value:function(t){return O.sceneGraphService.querySelector("#".concat(t),this)}},{key:"getElementsByName",value:function(t){return O.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)}},{key:"getElementsByClassName",value:function(t){return O.sceneGraphService.querySelectorAll(".".concat(t),this)}},{key:"getElementsByTagName",value:function(t){return O.sceneGraphService.querySelectorAll(t,this)}},{key:"querySelector",value:function(t){return O.sceneGraphService.querySelector(t,this)}},{key:"querySelectorAll",value:function(t){return O.sceneGraphService.querySelectorAll(t,this)}},{key:"closest",value:function(t){var e=this;do{if(O.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null}},{key:"find",value:function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r}},{key:"findAll",value:function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r}},{key:"after",value:function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,Hr(a))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})}},{key:"prepend",value:function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.dispatchEvent(bo),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return O.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return O.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return O.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return O.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return O.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(t){var e=this.attributes[t];return void 0===e&&(t=ai(t),e=this.attributes[t],qe(e))?null:e}},{key:"hasAttribute",value:function(t){return this.getAttributeNames().includes(t)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(t){this.setAttribute(t,null),delete this.attributes[t]}},{key:"setAttribute",value:function(t,e){this.attributes[t]=e}},{key:"getAttributeNS",value:function(t,e){throw new Error(gi)}},{key:"getAttributeNode",value:function(t){throw new Error(gi)}},{key:"getAttributeNodeNS",value:function(t,e){throw new Error(gi)}},{key:"hasAttributeNS",value:function(t,e){throw new Error(gi)}},{key:"removeAttributeNS",value:function(t,e){throw new Error(gi)}},{key:"removeAttributeNode",value:function(t){throw new Error(gi)}},{key:"setAttributeNS",value:function(t,e,n){throw new Error(gi)}},{key:"setAttributeNode",value:function(t){throw new Error(gi)}},{key:"setAttributeNodeNS",value:function(t){throw new Error(gi)}},{key:"toggleAttribute",value:function(t,e){throw new Error(gi)}}],[{key:"isElement",value:function(t){return!!t.getAttribute}}]),a}(),ko=new yo(Xa.ATTR_MODIFIED,null,null,null,null,yo.MODIFICATION,null,null),wo={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},Mo={anchor:[0,0],fill:Ui,stroke:Ui,transform:[],zIndex:0,filter:[],shadowType:"outer"},Oo=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],_o=function(){Ir(o,xo);var e=Gr(o);function o(t){var r;return w(this,o),(r=e.call(this)).config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||M.GROUP,r.config.style=Cr(Cr({},r.config.style),r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,Mo,r.config.initialParsedStyle),Object.assign(r.attributes,wo),r.initAttributes(r.config.style),r.style=new Proxy({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}}),O.displayObjectPool.add(r.entity,zr(r)),r}return l(o,[{key:"destroy",value:function(){Wr(Rr(o.prototype),"destroy",this).call(this),O.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})}},{key:"cloneNode",value:function(e,t){var n,r=Cr({},this.attributes);for(n in r){var i=r[n];i instanceof o&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),a.appendChild(t))}),a}},{key:"initAttributes",value:function(){var t=this.renderable;O.styleValueRegistry.processProperties(this,0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},{forceUpdateGeometry:!0,usedAttributes:Oo}),t.dirty=!0}},{key:"setAttribute",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],t=ai(t);ln(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),Wr(Rr(o.prototype),"setAttribute",this).call(this,t,e))}},{key:"internalSetAttribute",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],n=(O.styleValueRegistry.processProperties(this,s({},t,e),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(ko.relatedNode=this,ko.prevValue=i,ko.newValue=e,ko.attrName=t,ko.prevParsedValue=a,ko.newParsedValue=n,this.isMutationObserved?this.dispatchEvent(ko):(ko.target=this).ownerDocument.defaultView.dispatchEvent(ko,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,n)}},{key:"getBBox",value:function(){var t=this.getBounds(),e=Vr(t.getMin(),2),n=e[0],e=e[1],t=Vr(t.getMax(),2),r=t[0],t=t[1];return new Qr(n,e,r-n,t-e)}},{key:"setOrigin",value:function(t){return O.sceneGraphService.setOrigin(this,Po(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"getOrigin",value:function(){return O.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(t){return O.sceneGraphService.setPosition(this,Po(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"setLocalPosition",value:function(t){return O.sceneGraphService.setLocalPosition(this,Po(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"translate",value:function(t){return O.sceneGraphService.translate(this,Po(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"translateLocal",value:function(t){return O.sceneGraphService.translateLocal(this,Po(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"getPosition",value:function(){return O.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return O.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(t,e,n){return this.scaleLocal(t,e,n)}},{key:"scaleLocal",value:function(t,e,n){return"number"==typeof t&&(t=Po(t,e=e||t,n=n||t)),O.sceneGraphService.scaleLocal(this,t),this}},{key:"setLocalScale",value:function(t,e,n){return"number"==typeof t&&(t=Po(t,e=e||t,n=n||t)),O.sceneGraphService.setLocalScale(this,t),this}},{key:"getLocalScale",value:function(){return O.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return O.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){return jo(Vr(Lo(v(),O.sceneGraphService.getWorldTransform(this)),3)[2])}},{key:"getLocalEulerAngles",value:function(){return jo(Vr(Lo(v(),O.sceneGraphService.getLocalRotation(this)),3)[2])}},{key:"setEulerAngles",value:function(t){return O.sceneGraphService.setEulerAngles(this,0,0,t),this}},{key:"setLocalEulerAngles",value:function(t){return O.sceneGraphService.setLocalEulerAngles(this,0,0,t),this}},{key:"rotateLocal",value:function(t,e,n){return qe(e)&&qe(n)?O.sceneGraphService.rotateLocal(this,0,0,t):O.sceneGraphService.rotateLocal(this,t,e,n),this}},{key:"rotate",value:function(t,e,n){return qe(e)&&qe(n)?O.sceneGraphService.rotate(this,0,0,t):O.sceneGraphService.rotate(this,t,e,n),this}},{key:"setRotation",value:function(t,e,n,r){return O.sceneGraphService.setRotation(this,t,e,n,r),this}},{key:"setLocalRotation",value:function(t,e,n,r){return O.sceneGraphService.setLocalRotation(this,t,e,n,r),this}},{key:"setLocalSkew",value:function(t,e){return O.sceneGraphService.setLocalSkew(this,t,e),this}},{key:"getRotation",value:function(){return O.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return O.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return O.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return O.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return O.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(t){return O.sceneGraphService.setLocalTransform(this,t),this}},{key:"resetLocalTransform",value:function(){O.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null}},{key:"isVisible",value:function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)}},{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}},{key:"isInteractive",value:function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)}},{key:"isCulled",value:function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,Hr(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,Hr(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?Ke(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes}},{key:"getMatrix",value:function(t){var t=t||this.getWorldTransform(),e=Vr(_t(v(),t),2),n=e[0],e=e[1],r=Vr(St(v(),t),2),i=r[0],r=r[1],t=Et(Jt(),t),t=Vr(Lo(v(),t),3),a=t[0],t=t[2],o=(a=a||t,t=n,n=e,e=i,i=r,r=Math.cos(a),a=Math.sin(a),e*r),s=i*a,l=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,c=new lt(9);return c[0]=o,c[1]=s,c[2]=l,c[3]=e,c[4]=a,c[5]=i,c[6]=r,c[7]=t,c[8]=n,c}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(t){var t=Vr(Co(t),5),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)}},{key:"setLocalMatrix",value:function(t){var t=Vr(Co(t),5),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)}},{key:"show",value:function(){this.style.visibility="visible"}},{key:"hide",value:function(){this.style.visibility="hidden"}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(t){return this.children[t]||null}},{key:"add",value:function(t,e){return this.appendChild(t,e)}},{key:"setClip",value:function(t){this.style.clipPath=t}},{key:"set",value:function(t,e){this.config[t]=e}},{key:"get",value:function(t){return this.config[t]}},{key:"moveTo",value:function(t){return this.setPosition(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0),this}},{key:"move",value:function(t){return this.setPosition(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0),this}},{key:"setZIndex",value:function(t){return this.style.zIndex=t,this}}]),o}(),So={},Eo=[],Ao=function(){function t(){w(this,t)}return l(t,[{key:"getByEntity",value:function(t){return So[t]}},{key:"getAll",value:function(){return Object.keys(So).map(function(t){return So[t]})}},{key:"add",value:function(t,e){(So[t]=e).nodeName===M.HTML&&Eo.push(e)}},{key:"remove",value:function(t){var e=So[t];e&&(delete So[t],e.nodeName===M.HTML)&&(t=Eo.indexOf(e),Eo.splice(t,1))}},{key:"getHTMLs",value:function(){return Eo}}]),t}();function To(t){return void 0===t?0:360<t||t<-360?t%360:t}function Po(t,e,n){var r,i,e=1<arguments.length&&void 0!==e?e:0,n=2<arguments.length&&void 0!==n?n:0;return rn(t)?b(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new lt(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):b(t[0],t[1]||e,t[2]||n)}function No(t){return t*(Math.PI/180)}function jo(t){return t*(180/Math.PI)}function Lo(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=Vr(St(v(),r),3))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function Co(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=jo(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var Fo=ft(),Bo=ft(),Io=$t(),d=[v(),v(),v()],Ro=v();function Do(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var zo=ft();Go={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},Wo="";var Go,Wo,Vo=function(t){return Wo=t,qo()};function Ho(t){throw new Error(Wo+": "+t)}function qo(){var t=es(Yo);return 0<Wo.length&&Ho("Invalid input not EOF"),t}function Yo(){return Uo("linear-gradient",Go.linearGradient,Ko)||Uo("repeating-linear-gradient",Go.repeatingLinearGradient,Ko)||Uo("radial-gradient",Go.radialGradient,$o)||Uo("repeating-radial-gradient",Go.repeatingRadialGradient,$o)||Uo("conic-gradient",Go.conicGradient,$o)}function Uo(n,t,r){return Xo(t,function(t){var e=r();return e&&!ls(Go.comma)&&Ho("Missing comma before color stops"),{type:n,orientation:e,colorStops:es(ns)}})}function Xo(t,e){t=ls(t);if(t)return ls(Go.startCall)||Ho("Missing ("),e=e(t),ls(Go.endCall)||Ho("Missing )"),e}function Ko(){return ss("directional",Go.sideOrCorner,1)||ss("angular",Go.angleValue,1)}function $o(){var t,e,n=Zo();return n&&((t=[]).push(n),e=Wo,ls(Go.comma))&&((n=Zo())?t.push(n):Wo=e),t}function Zo(){var t,e=function(){var t=ss("shape",/^(circle)/i,0);t&&(t.style=os()||Jo());return t}()||function(){var t=ss("shape",/^(ellipse)/i,0);t&&(t.style=is()||Jo());return t}();return e?e.at=Qo():(t=Jo())?(e=t,(t=Qo())&&(e.at=t)):(t=ts())&&(e={type:"default-radial",at:t}),e}function Jo(){return ss("extent-keyword",Go.extentKeywords,1)}function Qo(){var t;if(ss("position",/^at/,0))return(t=ts())||Ho("Missing positioning value"),t}function ts(){var t={x:is(),y:is()};if(t.x||t.y)return{type:"position",value:t}}function es(t){var e=t(),n=[];if(e)for(n.push(e);ls(Go.comma);)(e=t())?n.push(e):Ho("One extra comma");return n}function ns(){var t=ss("hex",Go.hexColor,1)||Xo(Go.rgbaColor,function(){return{type:"rgba",value:es(rs)}})||Xo(Go.rgbColor,function(){return{type:"rgb",value:es(rs)}})||ss("literal",Go.literalColor,0);return t||Ho("Expected color definition"),t.length=is(),t}function rs(){return ls(Go.number)[1]}function is(){return ss("%",Go.percentageValue,1)||as()||os()}function as(){return ss("position-keyword",Go.positionKeywords,1)}function os(){return ss("px",Go.pixelValue,1)||ss("em",Go.emValue,1)}function ss(t,e,n){e=ls(e);if(e)return{type:t,value:e[n]}}function ls(t){var e=/^[\n\r\t\s]+/.exec(Wo),e=(e&&cs(e[0].length),t.exec(Wo));return e&&cs(e[0].length),e}function cs(t){Wo=Wo.substring(t)}function us(t,e){return t[0]===e[0]&&t[1]===e[1]}function fs(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function hs(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function ds(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=No(r=an(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=ps({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=ps(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var ps=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function ys(t,e,n){var n=!(2<arguments.length&&void 0!==n)||n,r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=ds({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=ds({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function gs(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function vs(t,e){return gs(t)*gs(e)?(t[0]*e[0]+t[1]*e[1])/(gs(t)*gs(e)):1}function ms(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(vs(t,e))}var bs=function(){function e(t){w(this,e),this.config=t,this.options=void 0,this._args=void 0}return l(e,[{key:"create",value:function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw ".concat(t,";\n")},onResult:function(t){return"return ".concat(t,";\n")},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback(".concat(t,");\n")},onResult:function(t){return"_callback(null, ".concat(t,");\n")},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error(".concat(t,");\n")},onResult:function(t){return"_resolve(".concat(t,");\n")},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e}},{key:"setup",value:function(t,e){t._x=e.taps.map(function(t){return t.fn})}},{key:"init",value:function(t){this.options=t,this._args=t.args.slice()}},{key:"deinit",value:function(){this.options=void 0,this._args=void 0}},{key:"contentWithInterceptors",value:function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+="".concat(this.getInterceptor(o),".call(").concat(this.args({before:s.context?"_context":void 0}),");\n"))}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+="".concat(r.getInterceptor(n),".error(").concat(t,");\n"));return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+="".concat(r.getInterceptor(n),".result(").concat(t,");\n"));return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+="".concat(r.getInterceptor(e),".done();\n"));return t+=n()}}))}return this.content(t)}},{key:"header",value:function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t}},{key:"needContext",value:function(){var t,e=Ur(this.options.taps);try{for(e.s();!(t=e.n()).done;)if(t.value.context)return!0}catch(t){e.e(t)}finally{e.f()}return!1}},{key:"callTap",value:function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap".concat(t," = ").concat(this.getTap(t),";\n"),s=!0),o+="".concat(this.getInterceptor(l),".tap(").concat(c.context?"_context, ":"","_tap").concat(t,");\n"))}o+="var _fn".concat(t," = ").concat(this.getTapFn(t),";\n");var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError".concat(t," = false;\n")+"try {\n"),o+=(r?"var _result".concat(t," = _fn"):"_fn").concat(t,"(").concat(this.args({before:u.context?"_context":void 0}),");\n"),a||(o=(o=(o=(o+="} catch(_err) {\n")+"_hasError".concat(t," = true;\n"))+n("_err")+"}\n")+"if(!_hasError".concat(t,") {\n")),r&&(o+=r("_result".concat(t))),i&&(o+=i()),a||(o+="}\n");break;case"async":var f="",f=(f=(f+=(r?"(function(_err".concat(t,", _result"):"(function(_err").concat(t,") {\n"))+"if(_err".concat(t,") {\n"))+n("_err".concat(t))+"} else {\n";r&&(f+=r("_result".concat(t))),i&&(f+=i()),f=f+"}\n"+"})",o+="_fn".concat(t,"(").concat(this.args({before:u.context?"_context":void 0,after:f}),");\n");break;case"promise":o=(o=(o=(o=(o=(o+="var _hasResult".concat(t," = false;\n"))+"var _promise".concat(t," = _fn").concat(t,"(").concat(this.args({before:u.context?"_context":void 0}),");\n"))+"if (!_promise".concat(t," || !_promise").concat(t,".then)\n"))+" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise".concat(t," + ')');\n"))+"_promise".concat(t,".then((function(_result").concat(t,") {\n"))+"_hasResult".concat(t," = true;\n"),r&&(o+=r("_result".concat(t))),i&&(o+=i()),o=(o=(o+="}), function(_err".concat(t,") {\n"))+"if(_hasResult".concat(t,") throw _err").concat(t,";\n"))+n("_err".concat(t))+"});\n"}return o}},{key:"callTapsSeries",value:function(t){var a=this,o=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),f=e||n,h="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,h=(h+="function _next".concat(n,"() {\n"))+d()+"}\n",d=function(){return"".concat(f?"return ":"","_next").concat(n,"();\n")}),d),i=a.callTap(n,{onError:function(t){return o(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return h+=d()}},{key:"callTapsLooping",value:function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+="".concat(this.getInterceptor(i),".loop(").concat(this.args({before:o.context?"_context":void 0}),");\n"))}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+"if(".concat(e," !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r}},{key:"callTapsParallel",value:function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+"var _counter = ".concat(this.options.taps.length,";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"}},{key:"args",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")}},{key:"getTapFn",value:function(t){return"_x[".concat(t,"]")}},{key:"getTap",value:function(t){return"_taps[".concat(t,"]")}},{key:"getInterceptor",value:function(t){return"_interceptors[".concat(t,"]")}}]),e}();new(function(){Ir(e,bs);var t=Gr(e);function e(){return w(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})}}]),e}()),new(function(){Ir(e,bs);var t=Gr(e);function e(){return w(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if(".concat(e," !== undefined) {\n"))+"".concat(i._args[0]," = ").concat(e,";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})}}]),e}()),new(function(){Ir(e,bs);var t=Gr(e);function e(){return w(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})}}]),e}());new(function(){Ir(e,bs);var t=Gr(e);function e(){return w(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if(".concat(e," !== undefined) {\n"))+"".concat(i._args[0]," = ").concat(e,";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})}}]),e}());var xs=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],ks=/([\"\'])[^\'\"]+\1/;function ws(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-Cs)?0:16-e,r=Ts();return Ls[r]=t,1<Object.keys(Ls).length||setTimeout(function(){Cs=n;var e=Ls;Ls={},Object.keys(e).forEach(function(t){return e[t](js())})},e),r}function Ms(t){delete Ls[t]}function Os(t){return"string"!=typeof t?ws:""===t?Ps.requestAnimationFrame:Ps[t+"RequestAnimationFrame"]}var _s,Ss,Es,As=1,Ts=function(){return As++},Ps="object"===("undefined"==typeof self?"undefined":Fr(self))&&self.self==self?self:"object"===(void 0===C?"undefined":Fr(C))&&C.global==C?C:{},Ns=Date.now(),js=function(){return Ps.performance&&"function"==typeof Ps.performance.now?Ps.performance.now():Date.now()-Ns},Ls={},Cs=Date.now(),Fs=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],Os),Bs=Os(Fs),Fs="string"!=typeof(Fs=Fs)?Ms:""===Fs?Ps.cancelAnimationFrame:Ps[Fs+"CancelAnimationFrame"]||Ps[Fs+"CancelRequestAnimationFrame"],Is=(Ps.requestAnimationFrame=Bs,Ps.cancelAnimationFrame=Fs,[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:u.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:u.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:u.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:u.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:u.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:u.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:u.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:u.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:u.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:u.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:u.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:u.FILTER},{n:"clipPath",syntax:u.DEFINED_PATH},{n:"textPath",syntax:u.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:u.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"center":t===M.TEXT?"text-anchor":"left top"},l:!0,syntax:u.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:u.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:u.COORDINATE},{n:"cy",int:!0,d:"0",syntax:u.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:u.COORDINATE},{n:"y",int:!0,d:"0",syntax:u.COORDINATE},{n:"z",int:!0,d:"0",syntax:u.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:u.COORDINATE},{n:"y1",int:!0,l:!0,syntax:u.COORDINATE},{n:"z1",int:!0,l:!0,syntax:u.COORDINATE},{n:"x2",int:!0,l:!0,syntax:u.COORDINATE},{n:"y2",int:!0,l:!0,syntax:u.COORDINATE},{n:"z2",int:!0,l:!0,syntax:u.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:u.PATH,p:50},{n:"points",l:!0,syntax:u.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:u.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:u.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:u.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:u.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:u.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:u.NUMBER,d:function(t){return t===M.PATH||t===M.POLYGON||t===M.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:u.MARKER},{n:"markerEnd",syntax:u.MARKER},{n:"markerMid",syntax:u.MARKER},{n:"markerStartOffset",syntax:u.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:u.LENGTH,l:!0,int:!0,d:"0"}]),Rs={},Ds=new WeakMap,zs={},Gs=dn(function(t){return t.sort(function(t,e){return zs[t]-zs[e]})}),Ws=v(),Vs=v(),Hs=v(),Bs=function(){function t(){var e=this;w(this,t),Is.forEach(function(t){e.registerMetadata(t)})}return l(t,[{key:"registerMetadata",value:function(e){[e.n].concat(Hr(e.a||[])).forEach(function(t){zs[t]=(Rs[t]=e).p||0})}},{key:"unregisterMetadata",value:function(t){delete Rs[t]}},{key:"getPropertySyntax",value:function(t){return O.CSSPropertySyntaxFactory[t]}},{key:"processProperties",value:function(n,r){var i=this,t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]},a=t.skipUpdateAttribute,e=t.skipParse,o=t.forceUpdateGeometry,t=t.usedAttributes,s=o,o=Object.keys(r);o.forEach(function(t){var e=ai(t);a||(n.attributes[e]=r[t]),!s&&null!=(t=Rs[e])&&t.l&&(s=!0)}),e||o.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(o=Gs(null!=t&&t.length?Array.from(new Set(o.concat(t))):o)).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),o.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),n.children.length&&o.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})}},{key:"parseProperty",value:function(t,e,n){var r,t=Rs[t],i=e;return"unset"===(e=""!==e&&!qe(e)?e:"unset")||"initial"===e||"inherit"===e?i=Bi(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=Bi(e):t&&t.parser&&(i=t.parser(e,n))),i}},{key:"computeProperty",value:function(t,e,n){var r=Rs[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof ki){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))qe(r)||(e=this.parseProperty(t,ri(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),qe(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof ki?e.value:e}return a}},{key:"postProcessProperty",value:function(t,e){var t=Rs[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)}},{key:"addUnresolveProperty",value:function(t,e){var n=Ds.get(t);n||(Ds.set(t,[]),n=Ds.get(t)),-1===n.indexOf(e)&&n.push(e)}},{key:"tryToResolveProperty",value:function(t,e){var n=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).inherited;if(n&&(t.parentElement&&function(t,e){t=Ds.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n}},{key:"recalc",value:function(e){var n,t=Ds.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),Ds.delete(e))}},{key:"updateGeometry",value:function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,y,g,v,m=O.geometryUpdaterFactory[t.nodeName];m&&((s=t.geometry).contentBounds||(s.contentBounds=new Kr),s.renderBounds||(s.renderBounds=new Kr),e=t.parsedStyle,d=(m=m.update(e,t)).width,h=m.height,p=void 0===(p=m.depth)?0:p,f=void 0===(f=m.offsetX)?0:f,v=void 0===(v=m.offsetY)?0:v,m=void 0===(m=m.offsetZ)?0:m,n=d<0,r=h<0,p=Rt(Ws,Math.abs(d)/2,Math.abs(h)/2,p/2),l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,g=e.shadowType,y=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,t.nodeName===M.TEXT&&delete e.anchor,d=Rt(Vs,(1-2*(o&&o[0]||0))*d/2+f,(1-2*(o&&o[1]||0))*h/2+v,(1-2*(o&&o[2]||0))*p[2]+m),s.contentBounds.update(d,p),f=t.nodeName===M.POLYLINE||t.nodeName===M.POLYGON||t.nodeName===M.PATH?Math.SQRT2:.5,l&&!l.isNone&&Dt(p,p,Rt(Hs,h=((c||0)+(u||0))*f,h,0)),s.renderBounds.update(d,p),y&&g&&"inner"!==g&&(m=(v=s.renderBounds).min,l=v.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,f=e.shadowOffsetY||0,h=m[0]-c+u,d=l[0]+c+u,p=m[1]-c+f,y=l[1]+c+f,m[0]=Math.min(m[0],h),l[0]=Math.max(l[0],d),m[1]=Math.min(m[1],p),l[1]=Math.max(l[1],y),s.renderBounds.setMinMax(m,l)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Dt(s.renderBounds.halfExtents,s.renderBounds.halfExtents,b(i,i,0)))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,g=(n?-1:1)*da(a[0],0,t),v=(r?-1:1)*da(a[1],1,t),g-=(n?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,v-=(r?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,v),O.sceneGraphService.dirtifyToRoot(t))}},{key:"isPropertyInheritable",value:function(t){t=Rs[t];return!!t&&t.inh}}]),t}();(Fs=_s=_s||{})[Fs.ORBITING=0]="ORBITING",Fs[Fs.EXPLORING=1]="EXPLORING",Fs[Fs.TRACKING=2]="TRACKING",(Fs=Ss=Ss||{})[Fs.DEFAULT=0]="DEFAULT",Fs[Fs.ROTATIONAL=1]="ROTATIONAL",Fs[Fs.TRANSLATIONAL=2]="TRANSLATIONAL",Fs[Fs.CINEMATIC=3]="CINEMATIC",(Fs=Es=Es||{})[Fs.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Fs[Fs.PERSPECTIVE=1]="PERSPECTIVE";var qs="updated",Fs=function(){function t(){w(this,t),this.canvas=void 0,this.eventEmitter=new jr,this.matrix=ft(),this.right=b(1,0,0),this.up=b(0,1,0),this.forward=b(0,0,1),this.position=b(0,0,1),this.focalPoint=b(0,0,0),this.distanceVector=b(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ft(),this.projectionMatrixInverse=ft(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=_s.EXPLORING,this.trackingMode=Ss.DEFAULT,this.projectionMode=Es.PERSPECTIVE,this.frustum=new Zr,this.orthoMatrix=ft()}return l(t,[{key:"isOrtho",value:function(){return this.projectionMode===Es.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(t){this.enableUpdate=t}},{key:"setType",value:function(t,e){return this.type=t,this.type===_s.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===_s.TRACKING&&void 0!==e&&this.setTrackingMode(e),this}},{key:"setProjectionMode",value:function(t){return this.projectionMode=t,this}},{key:"setTrackingMode",value:function(t){if(this.type!==_s.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this}},{key:"setWorldRotation",value:function(t){return this.rotateWorld=t,this._getAngles(),this}},{key:"getViewTransform",value:function(){return gt(ft(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(t,e){t=Mt(ft(),[t,e,0]);this.jitteredProjectionMatrix=mt(ft(),t,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(t){return this.matrix=t,this._update(),this}},{key:"setFov",value:function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this}},{key:"setAspect",value:function(t){return this.setPerspective(this.near,this.far,this.fov,t),this}},{key:"setNear",value:function(t){return this.projectionMode===Es.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this}},{key:"setFar",value:function(t){return this.projectionMode===Es.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this}},{key:"setViewOffset",value:function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===Es.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Es.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(t){return this.zoom=t,this.projectionMode===Es.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Es.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=b(t.x-r,t.y-n,0),e=Vt(i,this.right)/Bt(this.right),r=Vt(i,this.up)/Bt(this.up);return this.pan(-e,-r),this}},{key:"setPerspective",value:function(t,e,n,r){this.projectionMode=Es.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(No(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,xt(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),gt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(t,e,n,r,i,a){this.projectionMode=Es.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),jt(this.projectionMatrix,s,n,r,e,i,a),xt(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),gt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(t){t=Po(t,(1<arguments.length&&void 0!==arguments[1]?arguments:this.position)[1],(2<arguments.length&&void 0!==arguments[2]?arguments:this.position)[2]);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(t){var e,n=(1<arguments.length&&void 0!==arguments[1]?arguments:this.focalPoint)[1],r=(2<arguments.length&&void 0!==arguments[2]?arguments:this.focalPoint)[2],i=b(0,1,0);return this.focalPoint=Po(t,n,r),this.trackingMode===Ss.CINEMATIC&&(t=(e=zt(v(),this.focalPoint,this.position))[0],n=e[1],r=e[2],e=Bt(e),n=jo(Math.asin(n/e)),e=90+jo(Math.atan2(r,t)),wt(r=ft(),r,No(e)),kt(r,r,No(n)),i=qt(v(),[0,1,0],r)),gt(this.matrix,Lt(ft(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=v(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this}},{key:"setMaxDistance",value:function(t){return this.maxDistance=t,this}},{key:"setMinDistance",value:function(t){return this.minDistance=t,this}},{key:"setAzimuth",value:function(t){return this.azimuth=To(t),this.computeMatrix(),this._getAxes(),this.type===_s.ORBITING||this.type===_s.EXPLORING?this._getPosition():this.type===_s.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(t){return this.elevation=To(t),this.computeMatrix(),this._getAxes(),this.type===_s.ORBITING||this.type===_s.EXPLORING?this._getPosition():this.type===_s.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(t){return this.roll=To(t),this.computeMatrix(),this._getAxes(),this.type===_s.ORBITING||this.type===_s.EXPLORING?this._getPosition():this.type===_s.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var t=Qt(Jt(),[0,0,1],No(this.roll)),e=(pt(this.matrix),Qt(Jt(),[1,0,0],No((this.rotateWorld&&this.type!==_s.TRACKING||this.type===_s.TRACKING?1:-1)*this.elevation))),n=Qt(Jt(),[0,1,0],No((this.rotateWorld&&this.type!==_s.TRACKING||this.type===_s.TRACKING?1:-1)*this.azimuth)),n=te(Jt(),n,e),n=te(Jt(),n,t),e=Tt(ft(),n);this.type===_s.ORBITING||this.type===_s.EXPLORING?(bt(this.matrix,this.matrix,this.focalPoint),mt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])):this.type===_s.TRACKING&&(bt(this.matrix,this.matrix,this.position),mt(this.matrix,this.matrix,e))}},{key:"_setPosition",value:function(t,e,n){this.position=Po(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){It(this.right,Po(Zt($t(),[1,0,0,0],this.matrix))),It(this.up,Po(Zt($t(),[0,1,0,0],this.matrix))),It(this.forward,Po(Zt($t(),[0,0,1,0],this.matrix))),Wt(this.right,this.right),Wt(this.up,this.up),Wt(this.forward,this.forward)}},{key:"_getAngles",value:function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=Bt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===_s.TRACKING||this.rotateWorld?(this.elevation=jo(Math.asin(e/r)),this.azimuth=jo(Math.atan2(-t,-n))):(this.elevation=-jo(Math.asin(e/r)),this.azimuth=-jo(Math.atan2(-t,-n)))}},{key:"_getPosition",value:function(){It(this.position,Po(Zt($t(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){var t,e;Yt(this.distanceVector,[0,0,-this.distance],(t=ct(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Dt(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=zt(v(),this.focalPoint,this.position),this.distance=Bt(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){var t,e;this.projectionMode===Es.ORTHOGRAPHIC&&(t=this.position,e=Qt(Jt(),[0,0,1],-this.roll*Math.PI/180),At(this.orthoMatrix,e,b((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),b(this.zoom,this.zoom,1),t))}},{key:"triggerUpdate",value:function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=mt(ft(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(qs))}},{key:"rotate",value:function(t,e,n){throw new Error(gi)}},{key:"pan",value:function(t,e){throw new Error(gi)}},{key:"dolly",value:function(t){throw new Error(gi)}},{key:"createLandmark",value:function(t,e){throw new Error(gi)}},{key:"gotoLandmark",value:function(t,e){throw new Error(gi)}}]),t}(),Ys=function(){function t(){w(this,t)}return l(t,[{key:"update",value:function(t,e){t=t.r;return{width:2*t,height:2*t}}}]),t}(),Us=function(){function t(){w(this,t)}return l(t,[{key:"update",value:function(t,e){return{width:2*t.rx,height:2*t.ry}}}]),t}(),Xs=function(){function t(){w(this,t)}return l(t,[{key:"update",value:function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}}}]),t}(),Ks=function(){function t(){w(this,t)}return l(t,[{key:"update",value:function(t){t=t.path.rect;return{width:t.width,height:t.height}}}]),t}(),$s=function(){function t(){w(this,t)}return l(t,[{key:"update",value:function(t){var t=t.points.points,e=Math.min.apply(Math,Hr(t.map(function(t){return t[0]}))),n=Math.max.apply(Math,Hr(t.map(function(t){return t[0]}))),r=Math.min.apply(Math,Hr(t.map(function(t){return t[1]})));return{width:n-e,height:Math.max.apply(Math,Hr(t.map(function(t){return t[1]})))-r}}}]),t}(),a=function(){function t(){w(this,t)}return l(t,[{key:"update",value:function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!en(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}}}]),t}(),Zs=function(){function e(t){w(this,e),this.globalRuntime=void 0,this.globalRuntime=t}return l(e,[{key:"isReadyToMeasure",value:function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!qe(t)}},{key:"update",value:function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})}}]),e}(),Js=function(){function t(){w(this,t),this.canvas=void 0,this.context=void 0}return l(t,[{key:"getOrCreateCanvas",value:function(t){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}this.canvas.width=10,this.canvas.height=10}return this.canvas}},{key:"getOrCreateContext",value:function(t){return this.context||this.getOrCreateCanvas(t),this.context}}]),t}(),Qs=(0,/\[\s*(.*)=(.*)\s*\]/),tl=function(){function t(){w(this,t)}return l(t,[{key:"selectOne",value:function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})}},{key:"selectAll",value:function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})}},{key:"is",value:function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t}},{key:"getIdOrClassname",value:function(t){return t.substring(1)}},{key:"getAttribute",value:function(t){var t=t.match(Qs),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}}},{key:"attributeToString",value:function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!qe(t))&&t.toString?t.toString():""}}]),t}(),el=function(){function e(t){var o,r,i,a,s,l,n,c,u,f,h,d,y=this;w(this,e),this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new fo(Xa.BOUNDS_CHANGED),this.rotate=(o=Jt(),function(t,e){"number"==typeof e&&(e=b(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n,r,i,a=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(n=Jt(),e[0],e[1],e[2]),r=y.getRotation(t),i=y.getRotation(t.parentNode),ie(o,i),ee(o,o),te(n,o,n),te(a.localRotation,n,r),oe(a.localRotation,a.localRotation),y.dirtifyLocal(t,a)):y.rotateLocal(t,e)}),this.rotateLocal=(r=Jt(),function(t,e){"number"==typeof e&&(e=b(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n=t.transformable;ne(r,e[0],e[1],e[2]),ae(n.localRotation,n.localRotation,r),y.dirtifyLocal(t,n)}),this.setEulerAngles=(i=Jt(),function(t,e){"number"==typeof e&&(e=b(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n,r=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(r.localRotation,e[0],e[1],e[2]),n=y.getRotation(t.parentNode),ie(i,ee(Jt(),n)),ae(r.localRotation,r.localRotation,i),y.dirtifyLocal(t,r)):y.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e){"number"==typeof e&&(e=b(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n,r,i,a,o,s,l,c,u,f,h,d,p=t.transformable;Ut(e,v())||(r=n=e,i=p.localRotation,a=i[0],o=i[1],s=i[2],i=i[3],l=r[0],c=r[1],r=r[2],d=o*(h=a*c-o*l)-s*(f=s*l-a*r),s=s*(u=o*r-s*c)-a*h,a=a*f-o*u,f*=o=2*i,h*=o,s*=2,a*=2,n[0]=l+(u*=o)+(d*=2),n[1]=c+f+s,n[2]=r+h+a,Dt(p.localPosition,p.localPosition,e),y.dirtifyLocal(t,p))},this.setPosition=(a=ft(),s=v(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Ut(y.getPosition(t),s)||(It(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ht(a,e.worldTransform),gt(a,a),qt(n.localPosition,s,a)):It(n.localPosition,s),y.dirtifyLocal(t,n))}),this.setLocalPosition=(l=v(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Ut(n.localPosition,l)||(It(n.localPosition,l),y.dirtifyLocal(t,n))}),this.translate=(n=v(),c=v(),u=v(),function(t,e){Ut(e="number"==typeof e?Rt(c,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0):e,n)||(Dt(u,y.getPosition(t),e),y.setPosition(t,u))}),this.setRotation=function(){var o=Jt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=re(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=y.getRotation(t.parentNode),ie(o,n),ee(o,o),te(a.localRotation,o,e),oe(a.localRotation,a.localRotation),y.dirtifyLocal(t,a)):y.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(f=ft(),h=v(),d=re(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(At(t.localTransform,t.localRotation,t.localPosition,b(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=pt(f))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),mt(t.localTransform,t.localTransform,e)),e=At(f,d,h,t.localScale,t.origin),mt(t.localTransform,t.localTransform,e)):At(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}return l(e,[{key:"matches",value:function(t,e){return this.runtime.sceneGraphSelector.is(t,e)}},{key:"querySelector",value:function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)}},{key:"querySelectorAll",value:function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)}},{key:"attach",value:function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,qe(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)}},{key:"detach",value:function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)}},{key:"getOrigin",value:function(t){return t.transformable.origin}},{key:"setOrigin",value:function(t,e){"number"==typeof e&&(e=b(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n,r=t.transformable;Ut(e,r.origin)||((n=r.origin)[0]=e[0],n[1]=e[1],n[2]=e[2]||0,this.dirtifyLocal(t,r))}},{key:"setLocalEulerAngles",value:function(t,e){"number"==typeof e&&(e=b(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n=t.transformable;ne(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)}},{key:"scaleLocal",value:function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=b(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)}},{key:"setLocalScale",value:function(t,e){var n=t.transformable,e=b(e[0],e[1],e[2]||n.localScale[2]);Ut(e,n.localScale)||(It(n.localScale,e),this.dirtifyLocal(t,n))}},{key:"setLocalRotation",value:function(t,e,n,r,i){"number"==typeof e&&(e=re(e,n,r,i));n=t.transformable;ie(n.localRotation,e),this.dirtifyLocal(t,n)}},{key:"setLocalSkew",value:function(t,e,n){"number"==typeof e&&(e=se(e,n));var r,n=t.transformable;r=n.localSkew,e=e,r[0]=e[0],r[1]=e[1],this.dirtifyLocal(t,n)}},{key:"dirtifyLocal",value:function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)}},{key:"dirtifyWorld",value:function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)}},{key:"triggerPendingEvents",value:function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var t=Vr(t,2),e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.pendingEvents=[],i.clear()}},{key:"dirtifyToRoot",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])}},{key:"updateDisplayObjectDependency",value:function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))}},{key:"informDependentDisplayObjects",value:function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t),t.dispatchEvent(new yo(Xa.ATTR_MODIFIED,t,n,n,e,yo.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})}},{key:"getPosition",value:function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))}},{key:"getRotation",value:function(t){var e=t.transformable;return Et(e.rotation,this.getWorldTransform(t,e))}},{key:"getScale",value:function(t){var e=t.transformable;return St(e.scaling,this.getWorldTransform(t,e))}},{key:"getWorldTransform",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t.transformable;return(e.localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform}},{key:"getLocalPosition",value:function(t){return t.transformable.localPosition}},{key:"getLocalRotation",value:function(t){return t.transformable.localRotation}},{key:"getLocalScale",value:function(t){return t.transformable.localScale}},{key:"getLocalSkew",value:function(t){return t.transformable.localSkew}},{key:"getLocalTransform",value:function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(t,e){var n=_t(v(),e),r=Et(Jt(),e),e=St(v(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)}},{key:"resetLocalTransform",value:function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])}},{key:"getTransformedGeometryBounds",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=2<arguments.length?arguments[2]:void 0,e=this.getGeometryBounds(t,e);return Kr.isEmpty(e)?null:((n=n||new Kr).setFromTransformedAABB(e,this.getWorldTransform(t)),n)}},{key:"getGeometryBounds",value:function(t){t=t.geometry;return(1<arguments.length&&void 0!==arguments[1]&&arguments[1]?t.renderBounds:t.contentBounds||null)||new Kr}},{key:"getBounds",value:function(t){var e,n,r=this,i=1<arguments.length&&void 0!==arguments[1]&&arguments[1],a=t.renderable;return a.boundsDirty||i||!a.bounds?!a.renderBoundsDirty&&i&&a.renderBounds?a.renderBounds:(e=i?a.renderBounds:a.bounds,n=this.getTransformedGeometryBounds(t,i,e),t.childNodes.forEach(function(t){t=r.getBounds(t,i);t&&(n?n.add(t):(n=e||new Kr).update(t.center,t.halfExtents))}),i&&(t=function(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.style.clipPath.getBounds(i),n?t&&(n=t.intersection(n)):n=t),(n=n||new Kr)&&(i?a.renderBounds=n:a.bounds=n),i?a.renderBoundsDirty=!1:a.boundsDirty=!1,n):a.bounds}},{key:"getLocalBounds",value:function(t){if(t.parentNode){var e,n=ft(),r=(t.parentNode.transformable&&(n=gt(ft(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!Kr.isEmpty(r))return(e=new Kr).setFromTransformedAABB(r,n),e}return this.getBounds(t)}},{key:"getBoundingClientRect",value:function(t){var e,n,r,i=this.getGeometryBounds(t),i=(Kr.isEmpty(i)||(r=new Kr).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=Vr(r.getMin(),2))[0],t=t[1],n=(r=Vr(r.getMax(),2))[0],r=r[1],new Qr(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Qr((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)}},{key:"syncHierarchy",value:function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}}},{key:"sync",value:function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?mt(e.worldTransform,n.worldTransform,e.localTransform):ht(e.worldTransform,e.localTransform),e.dirtyFlag=!1)}},{key:"unfreezeParentToRoot",value:function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}}}]),e}(),nl={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},rl=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,il=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),al=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),ol=function(){function e(t){var n=this;w(this,e),this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!al.exec(e)&&!il.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=Hr(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}return l(e,[{key:"measureFont",value:function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,nl.MetricsString+nl.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(nl.BaselineSymbol).width),s=nl.HeightMultiplier*o,o=o*nl.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n}},{key:"measureText",value:function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=rn(e)&&"".concat(e,"px")||"16px",a=en(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!ks.test(s)&&xs.indexOf(s)<0&&(s='"'.concat(s,'"')),a[o]=s}return"".concat(r," ").concat(i," ").concat(t," ").concat(e," ").concat(a.join(","))}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var y=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),g=new Array(y.length),v=0;if(!u){for(var m=0;m<y.length;m++){var b=p.measureText(y[m]).width+(y[m].length-1)*c;g[m]=b,v=Math.max(v,b)}var r=v+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(y.length-1)*(x+f),k=0;return"middle"===s?k=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?k=-i:"top"!==s&&"hanging"!==s||(k=0),{font:h,width:r,height:i,lines:y,lineWidths:g,lineHeight:x+=f,maxLineWidth:v,fontProperties:d,lineMetrics:g.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Qr(n-o/2,k+e*x,t+o,x)})}}u.getTotalLength(),u.getPoint(0);for(var w=0;w<y.length;w++)p.measureText(y[w]).width,y[w].length}},{key:"setGraphemeOnPath",value:function(){}},{key:"wordWrap",value:function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},y=function(t){return r.getFromCache(t,a,p,l)},g=Array.from(u).reduce(function(t,e){return t+y(e)},0),v=Array.from(t),m=0;m<v.length;m++){var b=v[m],x=t[m-1],k=t[m+1],w=y(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+w){if(s<=h+1){if(e.isOverflowing=!0,0<g&&g<=c){for(var M=f[h].length,O=0,_=M,S=0;S<M;S++){var E=y(f[h][S]);if(c<O+E+g){_=S;break}O+=E}f[h]=(f[h]||"").slice(0,_)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,k)&&(f=this.trimByKinsokuShorui(f),d+=y(x||""))}d+=w,f[h]=(f[h]||"")+b}}return f.join("\n")}},{key:"isBreakingSpace",value:function(t){return"string"==typeof t&&0<=nl.BreakingSpaces.indexOf(t.charCodeAt(0))}},{key:"isNewline",value:function(t){return"string"==typeof t&&0<=nl.Newlines.indexOf(t.charCodeAt(0))}},{key:"trimToBreakable",value:function(t){var e,t=Hr(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t}},{key:"canBreakInLastChar",value:function(t){return!t||!rl.test(t)}},{key:"sumTextWidthByCache",value:function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)}},{key:"findBreakableIndex",value:function(t){for(var e=t.length-1;0<=e;e--)if(!rl.test(t[e]))return e;return-1}},{key:"getFromCache",value:function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i}}]),e}(),O={},Ys=(a=new a,$s=new $s,s(Au={},M.CIRCLE,new Ys),s(Au,M.ELLIPSE,new Us),s(Au,M.RECT,a),s(Au,M.IMAGE,a),s(Au,M.GROUP,a),s(Au,M.LINE,new Xs),s(Au,M.TEXT,new Zs(O)),s(Au,M.POLYLINE,$s),s(Au,M.POLYGON,$s),s(Au,M.PATH,new Ks),s(Au,M.HTML,null),s(Au,M.MESH,null),Au),Zs=(Us=new e,a=new Ka,s(Xs={},u.PERCENTAGE,null),s(Xs,u.NUMBER,new to),s(Xs,u.ANGLE,new n),s(Xs,u.DEFINED_PATH,new r),s(Xs,u.PAINT,Us),s(Xs,u.COLOR,Us),s(Xs,u.FILTER,new qa),s(Xs,u.LENGTH,a),s(Xs,u.LENGTH_PERCENTAGE,a),s(Xs,u.LENGTH_PERCENTAGE_12,new $a),s(Xs,u.LENGTH_PERCENTAGE_14,new Za),s(Xs,u.COORDINATE,new Ja),s(Xs,u.OFFSET_DISTANCE,new i),s(Xs,u.OPACITY_VALUE,new eo),s(Xs,u.PATH,new no),s(Xs,u.LIST_OF_POINTS,new ro),s(Xs,u.SHADOW_BLUR,new io),s(Xs,u.TEXT,new ao),s(Xs,u.TEXT_TRANSFORM,new oo),s(Xs,u.TRANSFORM,new so),s(Xs,u.TRANSFORM_ORIGIN,new lo),s(Xs,u.Z_INDEX,new co),s(Xs,u.MARKER,new Qa),Xs),sl=(O.CameraContribution=Fs,O.AnimationTimeline=null,O.EasingFunction=null,O.offscreenCanvas=new Js,O.displayObjectPool=new Ao,O.sceneGraphSelector=new tl,O.sceneGraphService=new el(O),O.textService=new ol(O),O.geometryUpdaterFactory=Ys,O.CSSPropertySyntaxFactory=Zs,O.styleValueRegistry=new Bs,O.layoutRegistry=null,function(){function t(){w(this,t),this.context=void 0,this.plugins=[]}return l(t,[{key:"addRenderingPlugin",value:function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})}}]),t}());function ll(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function cl(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ll(Object(i),!0).forEach(function(t){var e,n;e=r,n=i[t=t],(t=xl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):ll(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function ul(){ul=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new k(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(w([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function v(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function m(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function w(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},o.awrap=function(t){return{__await:t}},v(m.prototype),a(m.prototype,n,function(){return this}),o.AsyncIterator=m,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new m(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},v(g),a(g,i,"Generator"),a(g,r,function(){return this}),a(g,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=w,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function fl(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function hl(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){fl(r,e,n,i,a,"next",t)}function a(t){fl(r,e,n,i,a,"throw",t)}i(void 0)})}}function dl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xl(r.key),r)}}function yl(t,e,n){e&&pl(t.prototype,e),n&&pl(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function gl(t){return(gl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function vl(t,e){return(vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ml(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bl(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=gl(n);return ml(this,r?(t=gl(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function xl(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=typeof(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}M.CIRCLE,M.ELLIPSE,M.IMAGE,M.RECT,M.LINE,M.POLYLINE,M.POLYGON,M.TEXT,M.PATH,M.HTML,($s=s2=s2||{}).READY="ready",$s.BEFORE_RENDER="beforerender",$s.AFTER_RENDER="afterrender",$s.BEFORE_DESTROY="beforedestroy",$s.AFTER_DESTROY="afterdestroy",$s.RESIZE="resize",$s.DIRTY_RECTANGLE="dirtyrectangle",new fo(Xa.MOUNTED),new fo(Xa.UNMOUNTED),new fo(s2.BEFORE_RENDER),new fo(s2.AFTER_RENDER);function kl(t){return Sl(t,"Function")}var wl=function(){function a(t){dl(this,a),this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return yl(a,[{key:"apply",value:function(t){function e(t){var e,a,o,s,l,c,u=t.target,f=u===d,h=f&&i?d:u.closest&&u.closest("[draggable=true]");h&&(e=function(){var e=hl(ul().mark(function t(e){var n,r,i;return ul().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=Fe([e.clientX,e.clientY],s),n<=v||r<=g)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){t.next=21;break}return n="pointer"===p?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,d.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(y?d:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",h.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var n=t.renderingService,d=t.renderingContext.root.ownerDocument,r=d.defaultView,t=this.dragndropPluginOptions,p=t.overlap,i=t.isDocumentDraggable,y=t.isDocumentDroppable,g=t.dragstartDistanceThreshold,v=t.dragstartTimeThreshold;n.hooks.init.tapPromise(a.tag,hl(ul().mark(function t(){return ul().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(a.tag,function(){r.removeEventListener("pointerdown",e)})}}]),a}(),Ml=(wl.tag="Dragndrop",function(){var t=r,e=sl;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vl(t,e);var n=bl(r);function r(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return dl(this,r),(t=n.call(this)).options=void 0,t.name="dragndrop",t.options=e,t}return yl(r,[{key:"init",value:function(){this.addRenderingPlugin(new wl(cl({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}]),r}()),Ol=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},_l={}.toString,Sl=function(t,e){return _l.call(t)==="[object "+e+"]"},El=function(t){return null==t},Al=function(t){return Array.isArray?Array.isArray(t):Sl(t,"Array")};function Tl(t){if(!Nl(t)||!Sl(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Pl(t){return(t=Cl(t)).charAt(0).toLowerCase()+t.substring(1)}var Nl=function(t){return"object"==typeof t&&null!==t},jl=function(t){return Sl(t,"Number")},Ll=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){kl(n)&&"prototype"===e||r.push(t)};if(e)if(Al(e))for(var a=0,o=e.length;a<o&&!1!==i(e[a],a);a++);else if(t=typeof e,null!==e&&"object"==t||"function"==t)for(var s in e)if(e.hasOwnProperty(s)&&!1===i(e[s],s))break;return r},Cl=function(t){return El(t)?"":t.toString()},Fl=function(t){t=Cl(t);return t.charAt(0).toUpperCase()+t.substring(1)},Bl={}.toString,Il=function(t){return Bl.call(t).replace(/^\[object /,"").replace(/]$/,"")},Rl=Object.prototype,Dl=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Rl)};var zl=5;var B=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||zl,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Tl(o)?(Tl(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Al(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Gl=function(t,e){if(!Ol(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},Wl=Object.prototype.hasOwnProperty;function Vl(t){return t}var Hl,ql=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function Yl(t){return El(t)?0:(Ol(t)?t:Object.keys(t)).length}!function(a,o){var s;if(kl(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Hl=Hl||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),Hl.measureText(Sl(t,"String")?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],Ll(e=void 0===e?{}:e)).join("")});const Ul=()=>[["cartesian"]],Xl=(Ul.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]),Kl=(Xl.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),$l=(Kl.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Zl=($l.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),Jl=(Zl.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Ql=(Jl.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),tc=(Ql.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...$l(),...Xl({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),ec=(tc.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...Zl(),...Xl({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),nc=(ec.props={},()=>[["parallel",0,1,0,1]]),rc=(nc.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),ic=(rc.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),ac=(ic.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),oc=(ac.props={},({value:e})=>t=>t.map(()=>e)),sc=(oc.props={},({value:e})=>t=>t.map(e)),lc=(sc.props={},({value:e})=>t=>t.map(t=>t[e])),cc=(lc.props={},({value:t})=>()=>t);function uc(t,e){return t.parent===e.parent?1:2}function fc(t,e){return t+e.x}function hc(t,e){return Math.max(t,e.y)}function dc(){var s=uc,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(fc,0)/e.length,t.y=1+n.reduce(hc,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function pc(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function yc(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=vc)):void 0===e&&(e=gc);for(var n,r,i,a,o,t=new xc(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new xc(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(bc)}function gc(t){return t.children}function vc(t){return Array.isArray(t)?t[1]:null}function mc(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function bc(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function xc(t){this.data=t,this.depth=this.height=0,this.parent=null}function kc(t){return null==t?null:wc(t)}function wc(t){if("function"!=typeof t)throw new Error;return t}function Mc(){return 0}function Oc(t){return function(){return t}}cc.props={},xc.prototype=yc.prototype={constructor:xc,count:function(){return this.eachAfter(pc)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return yc(this).eachBefore(mc)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const _c=4294967296;function Sc(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Ac(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Pc(t[0],t[1]);case 3:return Nc(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Tc(e,t))return[e];for(n=0;n<t.length;++n)if(Ec(e,t[n])&&Tc(Pc(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Ec(Pc(t[n],t[r]),e)&&Ec(Pc(t[n],e),t[r])&&Ec(Pc(t[r],e),t[n])&&Tc(Nc(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Ec(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function Ac(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Tc(t,e){for(var n=0;n<e.length;++n)if(!Ac(t,e[n]))return;return 1}function Pc(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function Nc(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,f=i-o,h=i-l,d=e-t,p=n-t,y=r*r+i*i-t*t,a=y-a*a-o*o+e*e,o=y-s*s-l*l+n*n,e=u*f-c*h,y=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+y*s+l*n),a=y*y+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+y+s*o,y:i+l+n*o,r:o}}function jc(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Lc(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Cc(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function Fc(t){this._=t,this.next=null,this.previous=null}function Bc(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,f,h,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;jc(r,d,i=t[2]),d=new Fc(d),r=new Fc(r),i=new Fc(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){jc(d._,r._,i=t[l]),i=new Fc(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(Lc(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(Lc(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Cc(d);(i=i.next)!==r;)(s=Cc(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=Sc(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function Ic(t){return Math.sqrt(t.value)}function Rc(){var n=null,r=1,i=1,a=Mc;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%_c)/_c}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Dc(n)).eachAfter(zc(a,.5,e)).eachBefore(Gc(1)):t.eachBefore(Dc(Ic)).eachAfter(zc(Mc,1,e)).eachAfter(zc(a,t.r/Math.min(r,i),e)).eachBefore(Gc(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=kc(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:Oc(+t),e):a},e}function Dc(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function zc(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=Bc(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function Gc(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function Wc(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Vc(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var Hc={depth:-1},qc={},Yc={};function Uc(t){return t.id}function Xc(t){return t.parentId}function Kc(){var g,v=Uc,m=Xc;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=v,f=m,h=new Map;if(null!=g){const p=c.map((t,e)=>{t=g(t,e,n),e=(t=""+t).length;return"/"===(t=Zc(t,e-1)&&!Zc(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),y=p.map($c);var d=new Set(p).add("");for(const r of y)d.has(r)||(d.add(r),p.push(r),y.push($c(r)),c.push(Yc));u=(t,e)=>p[e],f=(t,e)=>y[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new xc(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?qc:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===qc)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=g){for(;i.data===Yc&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===Yc;--t)o.data=null}if(i.parent=Hc,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(bc),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(v=kc(t),e):v},e.parentId=function(t){return arguments.length?(m=kc(t),e):m},e.path=function(t){return arguments.length?(g=kc(t),e):g},e}function $c(t){let e=t.length;if(e<2)return"";for(;1<--e&&!Zc(t,e););return t.slice(0,e)}function Zc(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function Jc(t,e){return t.parent===e.parent?1:2}function Qc(t){var e=t.children;return e?e[0]:t.t}function tu(t){var e=t.children;return e?e[e.length-1]:t.t}function eu(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function nu(){var h=Jc,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new eu(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new eu(r[i],i)),n.parent=e;return(t.parent=new eu(null,0)).children=[t],t}(t);return s.eachAfter(f),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:h(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function f(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,f=s.m;o=tu(o),i=Qc(i),o&&i;)s=Qc(s),(a=tu(a)).a=t,0<(r=o.z+u-i.z-l+h(o._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,f+=s.m,c+=a.m;o&&!tu(a)&&(a.t=o,a.m+=u-c),i&&!Qc(s)&&(s.t=i,s.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function ru(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}eu.prototype=Object.create(xc.prototype);Ks=(1+Math.sqrt(5))/2;function iu(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,y,g,v=[],m=e.children,b=0,x=0,k=m.length,w=e.value;b<k;){for(l=i-n,c=a-r;!(u=m[x++].value)&&x<k;);for(g=(f=h=u)*u*(y=Math.max(c/l,l/c)/(w*t)),p=Math.max(h/g,g/f);x<k;++x){if(u+=s=m[x].value,s<f&&(f=s),h<s&&(h=s),g=u*u*y,p<(d=Math.max(h/g,g/f))){u-=s;break}p=d}v.push(o={value:u,dice:l<c,children:m.slice(b,x)}),o.dice?Vc(o,n,r,i,w?r+=c*u/w:a):ru(o,n,r,w?n+=l*u/w:i,a),w-=u,b=x}return v}var au=function e(a){function t(t,e,n,r,i){iu(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(Ks);function ou(t,e,n,r,i){var a,o,y=t.children,s=y.length,g=new Array(s+1);for(g[0]=o=a=0;a<s;++a)g[a+1]=o+=y[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=y[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=g[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;g[h]<c?u=1+h:f=h}c-g[u-1]<g[u]-c&&e+1<u&&--u;var l=g[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function su(t,e,n,r,i){(1&t.depth?ru:Vc)(t,e,n,r,i)}var lu=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?Vc(o,e,n,r,h?n+=(i-n)*o.value/h:i):ru(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=iu(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(Ks);function cu(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function uu(t={}){return[...cu(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function fu(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function hu(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function du(t={}){return cu(t)}function pu(){return[{type:"maybeKey"}]}function yu(t,e){return t.getBandWidth(t.invert(e))}function gu(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:f=r,bandOffsetY:h=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),y=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?yu(l,a[e]):0;var r=p?yu(c,o[e]):0,e=y&&s?(yu(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function vu(t){return parseFloat(t)/100}function mu(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?vu(e)*o:+e,"string"==typeof t?vu(t)*s:+t]]})]}function bu(e){return"function"==typeof e?e:t=>t[e]}function xu(t,e){return Array.from(t,bu(e))}function ku(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=xu(t,e),o=xu(t,n),s=xu(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function wu(t,e){return t.getBandWidth(t.invert(e))}const Mu=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=wu(c,a[t]),n=e*(u?wu(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};Mu.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...uu({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...pu(),...hu()],interaction:{shareTooltip:!0}};const Ou=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function _u(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Su(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=_u,o=(t,e)=>_u(n(t),e),(t,e)=>n(t)-e):(a=n===_u||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Eu,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function Eu(){return 0}Ou.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...uu({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...pu(),...hu()],interaction:{shareTooltip:!0}};var Au=Su(_u).right;const Tu=Su(function(t){return null===t?NaN:+t}).center;var Pu=Au;function Nu(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function ju(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function Lu(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class Cu{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Fu extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Bu(this,t))}has(t){return super.has(Bu(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Bu({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Iu(t){return t}function Ru(t,...e){return Gu(t,Iu,Iu,e)}function Du(t,e,...n){return Gu(t,Iu,e,n)}function zu(t,e,...n){return Gu(t,Array.from,e,n)}function Gu(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new Fu,i=h[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Wu(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=Hu(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Hu(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Vu(n))}function Vu(r=_u){if(r===_u)return Hu;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function Hu(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var qu=Array.prototype.slice;function Yu(t){return()=>t}var Uu=Math.sqrt(50),Xu=Math.sqrt(10),Ku=Math.sqrt(2);function $u(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/Math.pow(10,t);return 0<=t?(Uu<=n?10:Xu<=n?5:Ku<=n?2:1)*Math.pow(10,t):-Math.pow(10,-t)/(Uu<=n?10:Xu<=n?5:Ku<=n?2:1)}function Zu(t){return Math.ceil(Math.log(Nu(t))/Math.LN2)+1}function Ju(){var v=Iu,m=Lu,b=Zu;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=v(t[a],a,t);var o=m(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(m===Lu&&([s,l]=function(t,e,n){let r;for(;;){var i=$u(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(n,r,t){var e,i,a,o,s=-1;if(t=+t,(n=+n)===(r=+r)&&0<t)return[n];if((e=r<n)&&(i=n,n=r,r=i),0===(o=$u(n,r,t))||!isFinite(o))return[];if(0<o){let t=Math.round(n/o),e=Math.round(r/o);for(t*o<n&&++t,e*o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)*o}else{o=-o;let t=Math.round(n*o),e=Math.round(r*o);for(t/o<n&&++t,e/o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)/o}return e&&a.reverse(),a}(s,l,u))[0]<=s&&(n=$u(s,l,u)),c[c.length-1]>=l)if(l<=o&&m===Lu){const n=$u(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var f=c.length,h=0,d=f;c[h]<=s;)++h;for(;c[d-1]>l;)--d;(h||d<f)&&(c=c.slice(h,d),f=d-h);var p,y,g=new Array(f+1);for(a=0;a<=f;++a)(p=g[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&g[Math.min(f,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(y=Math.floor((s-e)*n),g[Math.min(f,y+(c[y]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&g[Pu(c,e,0,f)].push(t[a]);return g}return e.value=function(t){return arguments.length?(v="function"==typeof t?t:Yu(t),e):v},e.domain=function(t){return arguments.length?(m="function"==typeof t?t:Yu([t[0],t[1]]),e):m},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:Yu(Array.isArray(t)?qu.call(t):t),e):b},e}function Qu(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function tf(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function ef(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function nf(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function rf(t,e,n){var r;if((n=(t=Float64Array.from(function*(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?ef(t):1<=e?Qu(t):(n=(n-1)*e,(r=Qu(function n(r,i,a=0,o=1/0,s){if(i=Math.floor(i),a=Math.floor(Math.max(0,a)),o=Math.floor(Math.min(r.length-1,o)),a<=i&&i<=o)for(s=void 0===s?Hu:Vu(s);a<o;){600<o-a&&(l=o-a+1,c=i-a+1,f=Math.log(l),u=.5*Math.exp(2*f/3),f=.5*Math.sqrt(f*u*(l-u)/l)*(c-l/2<0?-1:1),n(r,i,Math.max(a,Math.floor(i-c*u/l+f)),Math.min(o,Math.floor(i+(l-c)*u/l+f)),s));var l,c,u,f,h=r[i];let t=a,e=o;for(nf(r,a,i),0<s(r[o],h)&&nf(r,a,o);t<e;){for(nf(r,t,e),++t,--e;s(r[t],h)<0;)++t;for(;0<s(r[e],h);)--e}0===s(r[a],h)?nf(r,a,e):nf(r,++e,o),e<=i&&(a=e+1),i<=e&&(o=e-1)}return r}(t,e=Math.floor(n)).subarray(0,e+1)))+(ef(t.subarray(e+1))-r)*(n-e))}function af(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function of(t,e){return rf(t,.5,e)}function sf(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function lf(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function cf(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function uf(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function ff(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function hf(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function df(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function pf(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function yf(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function gf(t){return df(t)||ff(t)}const vf=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(Ru(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},mf=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},bf=()=>(t,e,n,r)=>{return(pf(r)?mf:vf)(t,e,n,r)};bf.props={defaultShape:"line",defaultLabelShape:"label",channels:[...uu({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...pu(),...hu(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const xf=y=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=gu(e,n,y),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/f,r=r/h,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};xf.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...uu({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...pu(),{type:"maybeSize"},...fu()]};const kf=s=>{const{cartesian:l=!1}=s;return l?mu:(t,e,n,r)=>{if(l)return mu(t,0,n,r);const{x:i,y:a}=n,o=gu(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};kf.props={defaultShape:"text",defaultLabelShape:"label",channels:[...uu({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...pu(),...fu()]};const wf=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};wf.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...uu({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...pu(),...fu()]};const Mf=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(Ru(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};Mf.props={defaultShape:"area",defaultLabelShape:"label",channels:[...uu({shapes:["area","smooth"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...pu(),...hu()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Of=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=gu(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Of.props={defaultShape:"link",defaultLabelShape:"label",channels:[...uu({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...pu(),...fu()]};const _f=s=>{var t=s["cartesian"];return t?mu:(t,e,n,r)=>{const{x:i,y:a}=n,o=gu(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};_f.props={defaultShape:"image",defaultLabelShape:"label",channels:[...uu({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...pu(),...fu()]};const Sf=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};Sf.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...uu({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...pu(),...fu()]};const Ef=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,y=e.x,g=e.series;return[t,Array.from(t,t=>{var e=y.getBandWidth(y.invert(+l[t])),n=e*(g?g.getBandWidth(g.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+f[t],+h[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},Af=(Ef.props={defaultShape:"box",defaultLabelShape:"label",channels:[...uu({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...pu(),...hu()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});Af.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...uu({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...pu(),...fu()]};const Tf=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};Tf.props={defaultShape:"line",defaultLabelShape:"label",channels:[...du({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...pu()]};const Pf=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};Pf.props={defaultShape:"line",defaultLabelShape:"label",channels:[...du({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...pu()]};const Nf=(...t)=>Of(...t);function jf(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function Lf(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=jf("x",r,n,e.x),o=jf("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Nf.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...du({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...pu()]};const Cf=()=>Lf();Cf.props={defaultShape:"range",defaultLabelShape:"label",channels:[...du({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...pu()]};const Ff=()=>Lf({extendY:!0});Ff.props={defaultShape:"range",defaultLabelShape:"label",channels:[...du({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...pu()]};const Bf=()=>Lf({extendX:!0});function If(t){return t.target.depth}function Rf(t,e){return t.sourceLinks.length?t.depth:e-1}function Df(t){return function(){return t}}function zf(t,e){return Wf(t.source,e.source)||t.index-e.index}function Gf(t,e){return Wf(t.target,e.target)||t.index-e.index}function Wf(t,e){return t.y0-e.y0}function Vf(t){return t.value}function Hf(t){return t.index}function qf(t){return t.nodes}function Yf(t){return t.links}function Uf(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function Xf({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function Kf(){let x=0,k=0,w=1,M=1,O=24,_=8,S,E=Hf,A=Rf,T,P,N,j=qf,L=Yf,C=6;function e(e){e={nodes:j(e),links:L(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const y=new Map(i.map(t=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=Uf(y,n)),"object"!=typeof r&&(r=t.target=Uf(y,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=N)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(N),r.sort(N)}t=e.nodes;for(const g of t)g.value=void 0===g.fixedValue?Math.max(cf(g.sourceLinks,Vf),cf(g.targetLinks,Vf)):g.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(T){var s,l=Math.max(Qu(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=T.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(Qu(t,t=>t.depth)+1,0),n=(w-x-O)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+O,r[i]?r[i].push(a):r[i]=[a]}if(P)for(const o of r)o.sort(P);return r}(e),t=(S=Math.min(_,(M-k)/(Qu(u,t=>t.length)-1)),u),f=ef(t,t=>(M-k-(t.length-1)*S)/cf(t,Vf));for(const v of t){let e=k;for(const m of v){m.y0=e,m.y1=e+m.value*f,e=m.y1+S;for(const b of m.sourceLinks)b.width=b.value*f}e=(M-e+S)/(v.length+1);for(let t=0;t<v.length;++t){var h=v[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===N)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(Gf),n.sort(zf)}(v)}for(let t=0;t<C;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/C);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,B(c))}void 0===P&&o.sort(Wf),o.length&&F(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,B(c))}void 0===P&&o.sort(Wf),o.length&&F(o,i)}}(u,d,p)}return Xf(e),e}function F(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,M,t.length-1,e),i(t,k,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function B({sourceLinks:t,targetLinks:e}){if(void 0===N){for(const{source:{sourceLinks:t}}of e)t.sort(Gf);for(const{target:{targetLinks:e}}of t)e.sort(zf)}}return e.update=function(t){return Xf(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:Df(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Df(t),e):A},e.nodeDepth=function(t){return arguments.length?(T=t,e):T},e.nodeSort=function(t){return arguments.length?(P=t,e):P},e.nodeWidth=function(t){return arguments.length?(O=+t,e):O},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(j="function"==typeof t?t:Df(t),e):j},e.links=function(t){return arguments.length?(L="function"==typeof t?t:Df(t),e):L},e.linkSort=function(t){return arguments.length?(N=t,e):N},e.size=function(t){return arguments.length?(x=k=0,w=+t[0],M=+t[1],e):[w-x,M-k]},e.extent=function(t){return arguments.length?(x=+t[0][0],w=+t[1][0],k=+t[0][1],M=+t[1][1],e):[[x,k],[w,M]]},e.iterations=function(t){return arguments.length?(C=+t,e):C},e}Bf.props={defaultShape:"range",defaultLabelShape:"label",channels:[...du({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...pu()]};const $f={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},Zf={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ef(t.sourceLinks,If)-1:0},justify:Rf};const Jf=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},$f,f),l=Kf().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?Zf[n]||Rf:"function"==c?n:Rf).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function Qf(t){return t}function th(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function eh(t=""){throw new Error(t)}function nh(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function rh(t){return null!=t&&!Number.isNaN(t)}function J(t,e){return ih(t,e)||{}}function ih(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Pl(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function ah(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}Jf.props={};const oh=g=>{const v={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},m={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},b={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},x={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=g,{links:t,nodes:l}=ku(t,e),c=J(e,"node"),e=J(e,"link"),{key:u=t=>t.key,color:f=u}=c,{links:i,nodes:t}=Jf(Object.assign(Object.assign(Object.assign({},v),{nodeId:bu(u)}),i))({links:t,nodes:l});const h=J(r,"label"),{text:d=u,spacing:p=5}=h,y=Z(h,["text","spacing"]);return[B({},m,{data:t,encode:Object.assign(Object.assign({},c),{color:f}),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},x),{text:d,dx:t=>t.x[0]<.5?p:-p}),y),...a],animate:"object"==typeof s?J(s,"node"):s,axis:!1}),B({},b,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s})]}},sh=(oh.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);sh.props={defaultShape:"path",defaultLabelShape:"label",channels:[...uu({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...pu()]};const lh=t=>t?parseInt(t):0;function ch(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||lh(t.width),e=e.clientHeight||lh(t.height),{width:(i={width:i-(lh(t.paddingLeft)+lh(t.paddingRight)),height:e-(lh(t.paddingTop)+lh(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function uh(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function fh(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:ou,treemapDice:Vc,treemapSlice:ru,treemapSliceDice:su,treemapSquarify:au,treemapResquarify:lu};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?Kc().path(p):Kc():yc)(t));function y(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(g),l=[0],i&&t.eachBefore(Wc),t}function g(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:t[r]).sort(e.sort):p.count(),o=au,i=!1,s=a=1,l=[0],d=h=f=u=c=Mc,y.round=function(t){return arguments.length?(i=!!t,y):i},y.size=function(t){return arguments.length?(a=+t[0],s=+t[1],y):[a,s]},y.tile=function(t){return arguments.length?(o=wc(t),y):o},y.padding=function(t){return arguments.length?y.paddingInner(t).paddingOuter(t):y.paddingInner()},y.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Oc(+t),y):c},y.paddingOuter=function(t){return arguments.length?y.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):y.paddingTop()},y.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Oc(+t),y):u},y.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:Oc(+t),y):f},y.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:Oc(+t),y):h},y.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Oc(+t),y):d},y.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const hh=u=>t=>{var{width:t,height:e}=uh(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,l=Z(u,["data","encode","scale","style","layout","labels"]),c={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=fh(n,B({},c,o),r),n=J(a,"label");return[B({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,lineHeight:t=>t.y1-t.y0}),n),...s]},l),{axis:!1}))]},dh=(hh.props={composite:!0},u=>t=>{var{width:t,height:e}=uh(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,l=Z(u,["data","encode","scale","style","layout","labels"]),c={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(Al(t)?Kc().path(e.path):yc)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),Rc().size(e.size).padding(e.padding)(n),n.descendants()})(n,B({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),B({},c.encode,r)),t=J(a,"label");return[B({},c,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r,lineHeight:t=>2*t.r}),t),...s]},l),{axis:!1}))]});function ph(t,e){return ef(t,t=>e[t])}function yh(t,e){return Qu(t,t=>e[t])}function gh(t,e){const n=2.5*vh(t,e)-1.5*bh(t,e);return ef(t,t=>e[t]>=n?e[t]:NaN)}function vh(t,e){return rf(t,.25,t=>e[t])}function mh(t,e){return rf(t,.5,t=>e[t])}function bh(t,e){return rf(t,.75,t=>e[t])}function xh(t,e){const n=2.5*bh(t,e)-1.5*vh(t,e);return Qu(t,t=>e[t]<=n?e[t]:NaN)}function kh(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Ru(t,t=>a[+t]).values()).flatMap(t=>{const e=gh(t,i),n=xh(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}dh.props={composite:!0};const wh=o=>()=>{var{data:t,encode:e,style:n={}}=o,{extend:r=!1}=n,n=Z(n,["extend"]),i=e["y"],i={y:i,y1:i,y2:i,y3:i,y4:i},a={y1:vh,y2:mh,y3:bh};return r?[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:ph},a),{y4:yh})],encode:Object.assign(Object.assign({},e),i),style:n}]:(r=J(n,"box"),n=J(n,"point"),[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:gh},a),{y4:xh})],encode:Object.assign(Object.assign({},e),i),style:r},{type:"point",data:t,transform:[{type:kh}],encode:e,style:Object.assign({},n)}])},Mh=(wh.props={composite:!0},s=>{var t=s["cartesian"];return t?mu:(t,e,n,r)=>{const{x:i,y:a}=n,o=gu(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function Oh(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},y=t._x0,g=t._y0,v=t._x1,m=t._y1;if(d){for(;d.length;)if((c=e>=(a=(y+v)/2))?y=a:v=a,(u=n>=(o=(g+m)/2))?g=o:m=o,!(d=(i=d)[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(y+v)/2))?y=a:v=a,(u=n>=(o=(g+m)/2))?g=o:m=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function _h(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Sh(t){return t[0]}function Eh(t){return t[1]}function Ah(t,e,n){e=new Th(null==e?Sh:e,null==n?Eh:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Th(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Ph(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Mh.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};e=Ah.prototype=Th.prototype;function Nh(t){return function(){return t}}function jh(t){return 1e-6*(t()-.5)}function Lh(t){return t.index}function Ch(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Fh(c){var u,f,a,o,h,d,s=Lh,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Nh(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||jh(d),o=i.y+i.vy-r.y-r.vy||jh(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Ch(r,t.source)),"object"!=typeof t.target&&(t.target=Ch(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=new Array(n),y()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function y(){if(a)for(var t=0,e=c.length;t<e;++t)f[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Nh(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Nh(+t),y(),e):r},e}e.copy=function(){var t,e,n=new Th(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Ph(e));else n._root=Ph(r);return n},e.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Oh(this.cover(e,n),e,n,t)},e.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)Oh(this,i[u],a[u],t[u]);return this},e.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},e.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},e.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},e.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,y=[],g=this._root;for(g&&y.push(new _h(g,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=y.pop();)!(g=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(g.length?(y.push(new _h(g[3],a=(s+o)/2,c=(l+i)/2,o,i),new _h(g[2],s,c,a,i),new _h(g[1],a,l,o,c),new _h(g[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=y[y.length-1],y[y.length-1]=y[y.length-1-i],y[y.length-1-i]=r)):(l=(o=t-+this._x.call(null,g.data))*o+(s=e-+this._y.call(null,g.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=g.data));return u},e.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,f,h=this._root,d=this._x0,p=this._y0,y=this._x1,g=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+y)/2))?d=s:y=s,(c=o>=(s=(p+g)/2))?p=s:g=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},e.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},e.root=function(){return this._root},e.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},e.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new _h(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new _h(e,o,s,i,a)),(e=c[2])&&l.push(new _h(e,n,s,o,a)),(e=c[1])&&l.push(new _h(e,o,r,i,s)),e=c[0])&&l.push(new _h(e,n,r,o,s));return this},e.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new _h(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new _h(i,a,o,c,u)),(i=f[1])&&n.push(new _h(i,c,o,s,u)),(i=f[2])&&n.push(new _h(i,a,u,c,l)),i=f[3])&&n.push(new _h(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},e.x=function(t){return arguments.length?(this._x=t,this):this._x},e.y=function(t){return arguments.length?(this._y=t,this):this._y};var Bh={value:()=>{}};function Ih(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Rh(r)}function Rh(t){this._=t}function Dh(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Bh,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Rh.prototype=Ih.prototype={constructor:Rh,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=Dh(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Dh(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new Rh(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var zh,Gh,Wh=0,Vh=0,Hh=0,qh=1e3,Yh=0,Uh=0,Xh=0,Kh="object"==typeof performance&&performance.now?performance:Date,$h="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zh(){return Uh||($h(Jh),Uh=Kh.now()+Xh)}function Jh(){Uh=0}function Qh(){this._call=this._time=this._next=null}function td(t,e,n){var r=new Qh;return r.restart(t,e,n),r}function ed(){Uh=(Yh=Kh.now())+Xh,Wh=Vh=0;try{Zh(),++Wh;for(var t,e=zh;e;)0<=(t=Uh-e._time)&&e._call.call(void 0,t),e=e._next;--Wh}finally{for(var n,r,i=zh,a=1/(Wh=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:zh=r);Gh=n,rd(a),Uh=0}}function nd(){var t=Kh.now(),e=t-Yh;qh<e&&(Xh-=e,Yh=t)}function rd(t){Wh||(Vh=Vh&&clearTimeout(Vh),24<t-Uh?(t<1/0&&(Vh=setTimeout(ed,t-Kh.now()-Xh)),Hh=Hh&&clearInterval(Hh)):(Hh||(Yh=Kh.now(),Hh=setInterval(nd,qh)),Wh=1,$h(ed)))}Qh.prototype=td.prototype={constructor:Qh,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Zh():+n)+(null==e?0:+e),this._next||Gh===this||(Gh?Gh._next=this:zh=this,Gh=this),this._call=t,this._time=n,rd()},stop:function(){this._call&&(this._call=null,this._time=1/0,rd())}};const id=4294967296;function ad(t){return t.x}function od(t){return t.y}var sd=10,ld=Math.PI*(3-Math.sqrt(5));function cd(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=td(i),n=Ih("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%id)/id}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=sd*Math.sqrt(.5+r),e=r*ld,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function ud(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,B=(r=Nh(-30),d=(h=1)/0,p=.81,y.initialize=function(t,e){i=t,c=e,I()},y.strength=function(t){return arguments.length?(r="function"==typeof t?t:Nh(+t),I(),y):r},y.distanceMin=function(t){return arguments.length?(h=t*t,y):Math.sqrt(h)},y.distanceMax=function(t){return arguments.length?(d=t*t,y):Math.sqrt(d)},y.theta=function(t){return arguments.length?(p=t*t,y):Math.sqrt(p)},y);function y(t){var e,n=i.length,r=Ah(i,ad,od).visitAfter(R);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function I(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function R(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=f[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=jh(c))*i),0===a&&(s+=(a=jh(c))*a),s<h&&(s=Math.sqrt(h*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=jh(c))*i),0===a&&(s+=(a=jh(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var g,v,m,b,x,k,w,M,O,_,S,E,A,T,n=Fh(a).id(bu(n)),P=("function"==typeof o&&B.strength(o),"function"==typeof s&&n.strength(s),cd(t).force("link",n).force("charge",B));function N(t){for(var e,n=0,r=v.length;n<r;++n)(e=v[n]).vy+=(b[n]-e.y)*m[n]*t}function j(){if(v){var t,e=v.length;for(m=new Array(e),b=new Array(e),t=0;t<e;++t)m[t]=isNaN(b[t]=+g(v[t],t,v))?0:+x(v[t],t,v)}}function L(t){for(var e,n=0,r=w.length;n<r;++n)(e=w[n]).vx+=(O[n]-e.x)*M[n]*t}function C(){if(w){var t,e=w.length;for(M=new Array(e),O=new Array(e),t=0;t<e;++t)M[t]=isNaN(O[t]=+k(w[t],t,w))?0:+_(w[t],t,w)}}function F(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*T,r=(r/e-E)*T,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?P.force("center",(T=1,null==S&&(S=0),null==E&&(E=0),F.initialize=function(t){A=t},F.x=function(t){return arguments.length?(S=+t,F):S},F.y=function(t){return arguments.length?(E=+t,F):E},F.strength=function(t){return arguments.length?(T=+t,F):T},F)):P.force("x",(_=Nh(.1),"function"!=typeof k&&(k=Nh(null==k?0:+k)),L.initialize=function(t){w=t,C()},L.strength=function(t){return arguments.length?(_="function"==typeof t?t:Nh(+t),C(),L):_},L.x=function(t){return arguments.length?(k="function"==typeof t?t:Nh(+t),C(),L):k},L)).force("y",(x=Nh(.1),"function"!=typeof g&&(g=Nh(null==g?0:+g)),N.initialize=function(t){v=t,j()},N.strength=function(t){return arguments.length?(x="function"==typeof t?t:Nh(+t),j(),N):x},N.y=function(t){return arguments.length?(g="function"==typeof t?t:Nh(+t),j(),N):g},N)),P.stop();var z=Math.ceil(Math.log(P.alphaMin())/Math.log(1-P.alphaDecay()));for(let t=0;t<z;t++)P.tick();return{nodesData:t,linksData:a}}const fd=f=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=f,l=J(e,"node"),c=J(e,"link"),{links:t,nodes:u}=ku(t,e),{nodesData:t,linksData:u}=ud({links:t,nodes:u},B({},{joint:!0},i),e);return[B({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:u,encode:c,labels:o,style:J(r,"link"),animate:"object"==typeof s?J(s,"link"):s}),B({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},l),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),J(r,"label")),...a],animate:"object"==typeof s?J(s,"node"):s})]},hd=(fd.props={composite:!0},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=yc(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),dd=t=>hd(dc)(t),pd=(dd.props={},t=>hd(nu)(t)),yd=(pd.props={},c=>{const u={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},h={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},d={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=c,l=null==e?void 0:e.value,{nodes:i,edges:l}=pd(Object.assign(Object.assign(Object.assign({},u),i),{field:l}))(t);return[B({},h,{data:l,encode:J(e,"link"),scale:J(n,"link"),labels:o,style:Object.assign({stroke:"#999"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s}),B({},f,{data:i,scale:J(n,"node"),encode:J(e,"node"),labels:[Object.assign(Object.assign({},d),J(r,"label")),...a],style:Object.assign({},J(r,"node")),animate:"object"==typeof s?J(s,"node"):s})]}});yd.props={composite:!0};var gd={},vd={},md=34,bd=10,xd=13;function kd(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function wd(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function Md(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function Od(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Md(-e,6):9999<e?"+"+Md(e,6):Md(e,4))+"-"+Md(t.getUTCMonth()+1,2)+"-"+Md(t.getUTCDate(),2)+(a?"T"+Md(n,2)+":"+Md(r,2)+":"+Md(i,2)+"."+Md(a,3)+"Z":i?"T"+Md(n,2)+":"+Md(r,2)+":"+Md(i,2)+"Z":r||n?"T"+Md(n,2)+":"+Md(r,2)+"Z":"")}function _d(r){var e=new RegExp('["'+r+"\n\r]"),f=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return vd;if(l)return l=!1,gd;var t,e,n=a;if(r.charCodeAt(n)===md){for(;a++<i&&r.charCodeAt(a)!==md||r.charCodeAt(++a)===md;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===bd?l=!0:e===xd&&(l=!0,r.charCodeAt(a)===bd)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===bd)l=!0;else if(e===xd)l=!0,r.charCodeAt(a)===bd&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===bd&&--i,r.charCodeAt(i-1)===xd&&--i;(e=c())!==vd;){for(var u=[];e!==gd&&e!==vd;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?Od(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=kd(n=t),function(t,e){return r(i(t),e,n)}):kd(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?wd(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?wd(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function Sd(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Ed&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const Ed=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),Ad=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>me(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),_d(i).parse(t,a?Sd:Qf);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};Ad.props={};const Td=t=>{const{fields:a,as:n=[]}=t;return t=>{if(!a||(e=a,0===Object.keys(e).length))return t;var e;const[r="key",i="value"]=n;return t.reduce((e,n)=>{for(let t=0;t<a.length;t++)e.push(Object.assign(Object.assign({},n),{[r]:a[t],[i]:n[a[t]]}));return e},[])}};Td.props={};const Pd=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},Nd=(Pd.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});function jd(t,e,n){return Math.min(n,Math.max(e,t))}Nd.props={};const Ld=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=jd(n,0,t.length-1),r=jd(r,1,t.length),n>r&&([n,r]=[r,n]);return t.filter((t,e)=>e>=n&&e<r).map(n=>e.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{}))},Cd=(Ld.props={},t=>{t=t.fields;return Ld({fields:t})});Cd.props={};const Fd=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};Fd.props={};const Bd=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},Id=(Bd.props={},t=>{const e=t["value"];return()=>e}),Rd=(Id.props={},t=>{const{callback:e=Qf}=t;return t=>e(t)}),Dd=(Rd.props={},t=>{const{callback:e=Qf}=t;return t=>Array.isArray(t)?t.map(e):t});Dd.props={};var zd=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const Gd={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function Wd(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:y,sourceWeight:g,targetWeight:v,sortBy:m}=Object.assign(Object.assign({},Gd),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=y(t),t.sourceWeight=g(t),t.targetWeight=v(t)});const i=Ru(r,t=>t.source),a=Ru(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=cf(e,t=>t.sourceWeight)+cf(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof m?m:zd[m])&&r.sort(n),!(n=(r=e).length))throw eh("Invalid nodes: it's empty!");if(f){const o=h/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-h),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!f)return e.forEach(t=>{var e=p(t),n=y(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=Ru(e,t=>t.source),l=Ru(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const Vd=e=>t=>Wd(e)(t),Hd=(Vd.props={},Math.PI/180),qd=64,Yd=2048;function Ud(t){return t.text}function Xd(){return"serif"}function Kd(){return"normal"}function $d(t){return t.value}function Zd(){return 90*~~(2*Math.random())}function Jd(){return 1}function Qd(){}function tp(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(qd<<5)/c,Yd/c);let i=0,a=0,n=0;var u,f,h,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*Hd),h=Math.cos(o.rotate*Hd),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=qd<<5&&(i=0,a+=n,n=0),a+e>=Yd)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*Hd),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(qd<<5)/c,Yd/c).data,y=[];0<=--s;)if((o=r[s]).hasText){var g=o.width,v=g>>5;let n=o.y1-o.y0;for(let t=0;t<n*v;t++)y[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<g;t++){var m=v*e+(t>>5),b=p[(a+e)*(qd<<5)+(i+t)<<2]?1<<31-t%32:0;y[m]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=y.slice(0,(o.y1-o.y0)*v)}}}function ep(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function np(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function rp(){return document.createElement("canvas")}function ip(t){return"function"==typeof t?t:function(){return t}}const ap={archimedean:ep,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function op(){let b=[256,256],r=Ud,i=Xd,p=$d,y=Kd,g=Zd,v=Jd,x=ep,k=Math.random,m=Qd,w=[],M=null,O=1/0;const _=Kd,S=rp,E={};return E.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(qd<<5)/e,t.height=Yd/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||np((b[0]>>5)*b[1]),c=w.length,u=[],f=w.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=y.call(this,t,e,n),t.rotate=g.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=v.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<O&&++h<c;){var i=f[h];i.x=a*(k()+.5)>>1,i.y=o*(k()+.5)>>1,tp(s,i,f,h),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=k()<.5?1:-1;let l,c=-s,u,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var h=t.sprite,d=t.width>>5,p=b[0]>>5,y=t.x-(d<<4),g=127&y,v=32-g,m=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(y>>5);for(let e=0;e<m;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<v|(t<d?(n=h[e*d+t])>>>g:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(m.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),m.call(null,"end",{cloud:E,words:u,bounds:d}))}return M&&clearInterval(M),M=setInterval(n,0),n(),E},E.stop=function(){return M&&(clearInterval(M),M=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=np((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){O=null==t?1/0:t},E.words=function(t){w=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=ip(t)},E.font=function(t){i=ip(t)},E.fontWeight=function(t){y=ip(t)},E.rotate=function(t){g=ip(t)},E.spiral=function(t){x=ap[t]||t},E.fontSize=function(t){p=ip(t)},E.padding=function(t){v=ip(t)},E.random=function(t){k=ip(t)},E.on=function(t){m=ip(t)},E}const sp={size:[500,500],fontSize:[14,28]};function lp(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const cp=h=>f=>me(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},sp,h),e=op(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return me(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=f.map(t=>t.value),n=t,t=[ef(e),Qu(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",lp,e.createMask),e.words([...f]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=Z(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function up(e){return"string"==typeof e?t=>t[e]:e}cp.props={};const fp=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=up(r),l=up(t),c=Du(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})};fp.props={};const hp=u=>c=>me(void 0,void 0,void 0,function*(){var{width:t,height:e}=uh(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=Z(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield cp(Object.assign(Object.assign({},l),o))(e);return[B({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]}),dp=(hp.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),pp=(dp.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),yp=(pp.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),gp=(yp.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),vp=(gp.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),mp=(vp.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),bp=(mp.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),xp=(bp.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),kp=(xp.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),wp=(kp.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),Mp=(wp.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),Op=(Mp.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),_p=(Op.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),Sp=(_p.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Ep=(Sp.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Ap=(Ep.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),Tp=(Ap.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),Pp=(Tp.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),Np=(Pp.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),jp=(Np.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function Lp(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Cp(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Fp(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}jp.props={};const Bp=Math.sqrt(50),Ip=Math.sqrt(10),Rp=Math.sqrt(2);function Dp(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=Bp?10:n>=Ip?5:n>=Rp?2:1)*10**t:-(10**-t)/(n>=Bp?10:n>=Ip?5:n>=Rp?2:1)}function zp(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=Bp?r*=10:n>=Ip?r*=5:n>=Rp&&(r*=2),e<t?-r:r}const Gp=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=Dp(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=Dp(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=Dp(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},Wp=36e5,Vp=864e5,Hp=7*Vp;Vp,Vp;function qp(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}to=qp(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),n=qp(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),r=qp(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),Us=qp(Wp,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Wp*e)},t=>t.getHours()),qa=qp(Vp,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Vp*e)},t=>t.getDate()-1);const Yp=qp(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());a=qp(Hp,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Hp*e)},t=>{var e=Yp.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Hp)}),$a=qp(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const Up={millisecond:to,second:n,minute:r,hour:Us,day:qa,week:a,month:Yp,year:$a};Za=qp(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Ja=qp(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),i=qp(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),eo=qp(Wp,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Wp*e)},t=>t.getUTCHours()),no=qp(Vp,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Vp*e)},t=>t.getUTCDate()-1);const Xp=qp(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());ro=qp(Hp,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Hp*e)},t=>{var e=Xp.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Hp)}),io=qp(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const Kp={millisecond:Za,second:Ja,minute:i,hour:eo,day:no,week:ro,month:Xp,year:io};function $p(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?Kp:Up;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Fp(i,l,0,c,s);let f;return f=u===c?[a,zp(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(zp(t,e,n),1)]}const Zp=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=$p(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function Jp(t){return null!=t&&!Number.isNaN(t)}const Qp=e=>t=>-e(-t),t0=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?Qp(t):t},e0=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?Qp(n):n},n0=(t,e,n,r)=>{var i=t<0,a=t0(r,i),r=e0(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function r0(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return jl(t)?Math.round(t):t}):i;this.output=Lp(a,r,e,t)},t.prototype.invert=void 0}}var i0,ao={exports:{}},oo={exports:{}},a0=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},o0=Array.prototype.concat,s0=Array.prototype.slice,l0=oo.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];a0(i)?e=o0.call(e,s0.call(i)):e.push(i)}return e},c0=(l0.wrap=function(t){return function(){return t(l0(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),u0=oo.exports,f0=Object.hasOwnProperty,h0=Object.create(null);for(i0 in c0)f0.call(c0,i0)&&(h0[c0[i0]]=i0);var d0=ao.exports={to:{},get:{}};function p0(t,e,n){return Math.min(Math.max(e,t),n)}function y0(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}d0.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=d0.get.hsl(t),n="hsl";break;case"hwb":e=d0.get.hwb(t),n="hwb";break;default:e=d0.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},d0.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:f0.call(c0,e[1])?((i=c0[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=p0(i[n],0,255);return i[3]=p0(i[3],0,1),i},d0.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,p0(parseFloat(t[2]),0,100),p0(parseFloat(t[3]),0,100),p0(isNaN(e)?1:e,0,1)]):null},d0.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,p0(parseFloat(t[2]),0,100),p0(parseFloat(t[3]),0,100),p0(isNaN(e)?1:e,0,1)]):null},d0.to.hex=function(){var t=u0(arguments);return"#"+y0(t[0])+y0(t[1])+y0(t[2])+(t[3]<1?y0(Math.round(255*t[3])):"")},d0.to.rgb=function(){var t=u0(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},d0.to.rgb.percent=function(){var t=u0(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},d0.to.hsl=function(){var t=u0(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},d0.to.hwb=function(){var t=u0(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},d0.to.keyword=function(t){return h0[t.slice(0,3)]};var g0=ao.exports;function v0(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function m0(t){var e,n,r,t=g0.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*v0(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*v0(n,r,e),255*v0(n,r,e-1/3),t]):null):null}const b0=(e,n)=>t=>e*(1-t)+n*t,x0=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return b0(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=m0(n),c=m0(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},k0=(t,e)=>{const n=b0(t,e);return t=>Math.round(n(t))};function w0({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function M0(t){return"object"==typeof t?t.valueOf():t}class O0 extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=M0,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(w0({map:this.map,initKey:this.initKey},t))}has(t){return super.has(w0({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class _0{constructor(t){this.options=B({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=B({},this.options,t),this.rescale(t)}rescale(t){}}const S0=Symbol("defaultUnknown");function E0(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function A0(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==S0)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function T0(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class P0 extends _0{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:S0}}map(t){return 0===this.domainIndexMap.size&&E0(this.domainIndexMap,this.getDomain(),this.domainKey),A0({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&E0(this.rangeIndexMap,this.getRange(),this.rangeKey),A0({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=T0(e),this.rangeKey=T0(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new P0(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function N0(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new O0(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),y=new O0(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(y.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let g=o?Math.round(t):t;var v=new Array(l);for(let t=0;t<l;t+=1){v[t]=(m=g,Math.round(1e12*m)/1e12);var m=e[t];g+=y.get(m)}return{valueBandWidth:c,valueStep:y,adjustedRange:v}}class j0 extends P0{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:S0,flex:[]}}clone(){return new j0(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return N0(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const L0=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=Dp(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};function C0(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const F0=[1,5,2,2.5,4,3],B0=100*Number.EPSILON;const I0=(n,r,t=5,i=!0,a=F0,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,f,h,d,p,y={score:-2,lmin:0,lmax:0,lstep:0};let g=1;for(;g<1/0;){for(let t=0;t<a.length;t+=1){var v=a[t],m=(f=v,h=a,d=g,p=void 0,p=Yl(h),1-Gl(h,f)/(p-1)-d+1);if(o[0]*m+o[1]+o[2]+o[3]<y.score){g=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*m+o[1]+o[2]*b+o[3]<y.score)break;var x=(r-n)/(e+1)/g/v;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var k=g*v*10**t,w=(O=r,w=k*(e-1),(O-=n)<w?1-((w-O)/2)**2/(.1*O)**2:1);if(o[0]*m+o[1]*w+o[2]*b+o[3]<y.score)break;var M=Math.floor(r/k)*g-(e-1)*g,O=Math.ceil(n/k)*g;if(M<=O){var _=O-M;for(let t=0;t<=_;t+=1){var S=(M+t)*(k/g),E=S+k*(e-1),A=k,T=function(t,e,n,r,i,a){var o=Yl(e),e=Gl(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<B0||a-t<B0)&&r<=0&&0<=i?1:s)}(v,a,g,S,E,A),P=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,N=(l=e,N=n,l=(l-1)/(E-(j=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(N,j)),2-Math.max(l/c,c/l)),j=o[0]*T+o[1]*P+o[2]*N+ +o[3];y.score<j&&(!i||S<=n&&r<=E)&&(y.lmin=S,y.lmax=E,y.lstep=A,y.score=j)}}t+=1}e+=1}}g+=1}var t=C0(y.lmax),e=C0(y.lmin),L=C0(y.lstep),C=Math.floor((t=(t-e)/L,Math.round(1e12*t)/1e12))+1,F=new Array(C);F[0]=C0(e);for(let t=1;t<C;t+=1)F[t]=C0(F[t-1]+L);return F};class R0 extends _0{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:I0}}map(t){return Jp(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new R0(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return jl(t)&&jl(r)?n(t,r,e):[]}}const D0=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return Lp(o=t<r?(a=Cp(t,r),n(e,i)):(a=Cp(r,t),n(i,e)),a)},z0=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Cp(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Fp(r,t,1,i)-1,n=a[e];return Lp(o[e],n)(t)}},G0=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?z0:D0)(t,e,r?k0:n)};class W0 extends _0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:b0,tickCount:5}}map(t){return Jp(t)?this.output(t):this.options.unknown}invert(t){return Jp(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return Gp}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return Vl}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=G0(n.map(t),r,a,i);this.output=Lp(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=G0(i,r.map(t),b0);this.input=Lp(e,n,i)}}class V0 extends W0{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:x0,tickMethod:L0,tickCount:5}}chooseTransforms(){return[Vl,Vl]}clone(){return new V0(this.options)}}class H0 extends j0{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:S0,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new H0(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const q0=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class Y0 extends W0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:x0,tickMethod:L0,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[Vl,Vl]:(t=.5===r?q0:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new Y0(this.options)}}class U0 extends Y0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:x0,tickMethod:L0,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new U0(this.options)}}class X0 extends _0{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return Jp(t)?(t=Fp(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new X0(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const K0=(t,e,n,r=10)=>{var i=t<0,a=e0(r,i),o=t0(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var y=a(u);for(let t=1;t<r;t+=1){var g=y*t;if(c<g)break;l<=g&&h.push(g)}}2*h.length<n&&(h=L0(l,c,n))}else h=L0(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class $0 extends W0{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:x0,tickMethod:K0,tickCount:5}}chooseNice(){return n0}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[t0(t,e),e0(t,e)]}clone(){return new $0(this.options)}}class Z0 extends X0{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:I0}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Gp(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new Z0(this.options)}}function J0(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class Q0 extends X0{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:I0}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=J0(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new Q0(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var t1=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,e1=/\[([^]*?)\]/gm;function n1(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function r1(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function i1(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var a1,so=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],lo=["January","February","March","April","May","June","July","August","September","October","November","December"],co=n1(lo,3),o1=r1({},{dayNamesShort:n1(so,3),dayNames:so,monthNamesShort:co,monthNames:lo,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),s1={D:function(t){return String(t.getDate())},DD:function(t){return i1(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return i1(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return i1(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return i1(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return i1(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return i1(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return i1(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return i1(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return i1(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return i1(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return i1(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+i1(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+i1(Math.floor(Math.abs(t)/60),2)+":"+i1(Math.abs(t)%60,2)}},l1={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const c1=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=$p(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function u1(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class f1 extends W0{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:c1,interpolate:b0,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Zp}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?Kp:Up,s=t?u1:Vl;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=l1.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=l1[t]||t).replace(e1,function(t,e){return r.push(e),"@@@"}),r1(r1({},o1),n));return(t=t.replace(t1,function(t){return s1[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new f1(this.options)}}var h1;let d1=a1=class extends V0{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Vl,tickMethod:L0,tickCount:5}}constructor(t){super(t)}clone(){return new a1(this.options)}};d1=a1=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([r0(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return Lp(b0(0,1),Cp(t,e))})],d1);let p1=h1=class extends V0{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Vl,tickMethod:L0,tickCount:5}}constructor(t){super(t)}clone(){return new h1(this.options)}};p1=h1=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([r0(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=Lp(b0(0,.5),Cp(e,n)),a=Lp(b0(.5,1),Cp(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],p1);const y1=t=>new j0(t),g1=(y1.props={},t=>new V0(t)),v1=(g1.props={},t=>new P0(t)),m1=(v1.props={},t=>new R0(t)),b1=(m1.props={},t=>new H0(t)),x1=(b1.props={},t=>new f1(t)),k1=(x1.props={},t=>new $0(t)),w1=(k1.props={},t=>new Y0(t)),M1=(w1.props={},t=>new X0(t)),O1=(M1.props={},t=>new Q0(t)),_1=(O1.props={},t=>new Z0(t)),S1=(_1.props={},t=>new U0(t)),E1=(S1.props={},t=>new d1(t)),A1=(E1.props={},Math.PI),T1=2*A1,P1=1e-6,N1=T1-P1;function j1(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function L1(){return new j1}function C1(t){return function(){return t}}j1.prototype=L1.prototype={constructor:j1,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){var a,o,s=this._x1,l=this._y1,c=(n=+n)-(t=+t),u=(r=+r)-(e=+e),f=s-t,h=l-e,d=f*f+h*h;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):d>P1&&(Math.abs(h*c-u*f)>P1&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((A1-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>P1&&(this._+="L"+(t+d*f)+","+(e+d*h)),this._+="A"+i+","+i+",0,0,"+ +(f*s<h*n)+","+(this._x1=t+r*c)+","+(this._y1=e+r*u)):this._+="L"+(this._x1=t)+","+(this._y1=e))},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,a=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>P1||Math.abs(this._y1-c)>P1)&&(this._+="L"+l+","+c),n&&((a=a<0?a%T1+T1:a)>N1?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):a>P1&&(this._+="A"+n+","+n+",0,"+ +(a>=A1)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const F1=Math.abs,B1=Math.atan2,I1=Math.cos,R1=Math.max,D1=Math.min,z1=Math.sin,G1=Math.sqrt,W1=1e-12,V1=Math.PI,H1=V1/2,q1=2*V1;function Y1(t){return 1<=t?H1:t<=-1?-H1:Math.asin(t)}function U1(t){return t.innerRadius}function X1(t){return t.outerRadius}function K1(t){return t.startAngle}function $1(t){return t.endAngle}function Z1(t){return t&&t.padAngle}function J1(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/G1(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*G1(R1(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function Q1(){var A=U1,T=X1,P=C1(0),N=null,j=K1,L=$1,C=Z1,F=null;function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y,g,v,m,b,x,k,w=+A.apply(this,arguments),M=+T.apply(this,arguments),O=j.apply(this,arguments)-H1,_=L.apply(this,arguments)-H1,S=F1(_-O),E=O<_;if(F=F||(t=L1()),M<w&&(e=M,M=w,w=e),M>W1?S>q1-W1?(F.moveTo(M*I1(O),M*z1(O)),F.arc(0,0,M,O,_,!E),w>W1&&(F.moveTo(w*I1(_),w*z1(_)),F.arc(0,0,w,_,O,E))):(r=e=O,i=n=_,o=a=S,h=(u=C.apply(this,arguments)/2)>W1&&(N?+N.apply(this,arguments):G1(w*w+M*M)),k=x=s=D1(F1(M-w)/2,+P.apply(this,arguments)),h>W1&&(f=Y1(h/w*z1(u)),h=Y1(h/M*z1(u)),(a-=2*f)>W1?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(O+_)/2),(o-=2*h)>W1?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(O+_)/2)),u=M*I1(e),f=M*z1(e),h=w*I1(i),O=w*z1(i),s>W1&&(d=M*I1(n),p=M*z1(n),y=w*I1(r),g=w*z1(r),S<V1)&&(_=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<W1))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,y,g,d,p,h,O))&&(S=u-_[0],m=f-_[1],b=d-_[0],v=p-_[1],m=1/z1((1<(S=(S*b+m*v)/(G1(S*S+m*m)*G1(b*b+v*v)))?0:S<-1?V1:Math.acos(S))/2),b=G1(_[0]*_[0]+_[1]*_[1]),x=D1(s,(w-b)/(m-1)),k=D1(s,(M-b)/(1+m))),o>W1?k>W1?(l=J1(y,g,u,f,M,k,E),c=J1(d,p,h,O,M,k,E),F.moveTo(l.cx+l.x01,l.cy+l.y01),k<s?F.arc(l.cx,l.cy,k,B1(l.y01,l.x01),B1(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,k,B1(l.y01,l.x01),B1(l.y11,l.x11),!E),F.arc(0,0,M,B1(l.cy+l.y11,l.cx+l.x11),B1(c.cy+c.y11,c.cx+c.x11),!E),F.arc(c.cx,c.cy,k,B1(c.y11,c.x11),B1(c.y01,c.x01),!E))):(F.moveTo(u,f),F.arc(0,0,M,e,n,!E)):F.moveTo(u,f),w>W1&&a>W1?x>W1?(l=J1(h,O,d,p,w,-x,E),c=J1(u,f,y,g,w,-x,E),F.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?F.arc(l.cx,l.cy,x,B1(l.y01,l.x01),B1(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,x,B1(l.y01,l.x01),B1(l.y11,l.x11),!E),F.arc(0,0,w,B1(l.cy+l.y11,l.cx+l.x11),B1(c.cy+c.y11,c.cx+c.x11),E),F.arc(c.cx,c.cy,x,B1(c.y11,c.x11),B1(c.y01,c.x01),!E))):F.arc(0,0,w,i,r,E):F.lineTo(h,O)):F.moveTo(0,0),F.closePath(),t)return F=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +T.apply(this,arguments))/2,e=(+j.apply(this,arguments)+ +L.apply(this,arguments))/2-V1/2;return[I1(e)*t,z1(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:C1(+t),e):A},e.outerRadius=function(t){return arguments.length?(T="function"==typeof t?t:C1(+t),e):T},e.cornerRadius=function(t){return arguments.length?(P="function"==typeof t?t:C1(+t),e):P},e.padRadius=function(t){return arguments.length?(N=null==t?null:"function"==typeof t?t:C1(+t),e):N},e.startAngle=function(t){return arguments.length?(j="function"==typeof t?t:C1(+t),e):j},e.endAngle=function(t){return arguments.length?(L="function"==typeof t?t:C1(+t),e):L},e.padAngle=function(t){return arguments.length?(C="function"==typeof t?t:C1(+t),e):C},e.context=function(t){return arguments.length?(F=null==t?null:t,e):F},e}function ty(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ey(t){this._context=t}function ny(t){return new ey(t)}function ry(t){return t[0]}function iy(t){return t[1]}function ay(o,s){var l=C1(!0),c=null,u=ny,f=null;function e(t){var e,n,r,i=(t=ty(t)).length,a=!1;for(null==c&&(f=u(r=L1())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?ry:C1(o),s="function"==typeof s?s:void 0===s?iy:C1(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:C1(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:C1(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:C1(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function oy(u,f,h){var d=null,p=C1(!0),y=null,g=ny,v=null;function e(t){var e,n,r,i,a,o=(t=ty(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==y&&(v=g(a=L1())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,v.areaStart(),v.lineStart();else{for(v.lineEnd(),v.lineStart(),r=e-1;n<=r;--r)v.point(l[r],c[r]);v.lineEnd(),v.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),v.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return v=null,a+""||null}function t(){return ay().defined(p).curve(g).context(y)}return u="function"==typeof u?u:void 0===u?ry:C1(+u),f="function"==typeof f?f:C1(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?iy:C1(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:C1(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:C1(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:C1(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:C1(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:C1(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:C1(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:C1(!!t),e):p},e.curve=function(t){return arguments.length?(g=t,null!=y&&(v=g(y)),e):g},e.context=function(t){return arguments.length?(null==t?y=v=null:v=g(y=t),e):y},e}ey.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var sy=cy(ny);function ly(t){this._curve=t}function cy(e){function t(t){return new ly(e(t))}return t._curve=e,t}function uy(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(cy(t)):e()._curve},t}function fy(){}function hy(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function dy(t,e){this._context=t,this._k=(1-e)/6}function py(t,e){this._context=t,this._k=(1-e)/6}function yy(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>W1&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>W1&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function gy(t,e){this._context=t,this._alpha=e}ly.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},dy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:hy(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:hy(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new dy(t,n)}return t.tension=function(t){return e(+t)},t}(0),py.prototype={areaStart:fy,areaEnd:fy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:hy(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new py(t,n)}return t.tension=function(t){return e(+t)},t}(0),gy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:yy(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vy=function e(n){function t(t){return n?new gy(t,n):new dy(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function my(t,e){this._context=t,this._alpha=e}my.prototype={areaStart:fy,areaEnd:fy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:yy(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var by=function e(n){function t(t){return n?new my(t,n):new py(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function xy(t){this._context=t}function ky(t){return new xy(t)}function wy(t,e){this._context=t,this._t=e}function My(t){return new wy(t,.5)}function Oy(t){return new wy(t,0)}function _y(t){return new wy(t,1)}function Q(t){return new Sy([t],null,t,t.ownerDocument)}xy.prototype={areaStart:fy,areaEnd:fy,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},wy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};class Sy{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new Sy(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new Sy(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new Sy([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new Sy(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new Sy(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new Sy([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),f=Ru(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var y=c.get(d);y.__data__=h,y.__facet__=!1,a.push(y),o.delete(y),c.delete(d)}else if(u.has(d)){y=u.get(d);y.__data__=h,y.__facet__=!0,a.push(y),u.delete(d)}else if(f.has(d)){const Ru=f.get(d);s.push([h,Ru]);for(const g of Ru)o.delete(g);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new Sy([],i,this._parent,this._document),new Sy(a,null,this._parent,this._document),new Sy(o,null,this._parent,this._document),new Sy([],s,this._parent,this._document),new Sy(l,null,this._parent,this._document)];return new Sy(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new Sy(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=Sy.registry[t])?new e:eh("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._elements[t];var e=this._transitions[t];e?(Array.isArray(e)?e:[e]).map(t=>t.finished.then(()=>n.remove())):n.remove()}return new Sy([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function Ey([t,e],[n,r]){return[t-n,e-r]}function Ay([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function Ty([t,e]){return Math.atan2(e,t)}function Py([t,e]){return Ty([t,e])+Math.PI/2}function Ny(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function jy([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function Ly(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function Cy(t){return t.map((t,e)=>e)}function I(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function Fy(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*Ay(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function By(t,e,n,r,i){e=Ty(Ey(r,e))+Math.PI,n=Ty(Ey(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function Iy(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=Cy(a),[r,o]=Lu(t,t=>a[t]);const s=new V0({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function Ry(t){var[t,e,n,r]=t;return[r,t,e,n]}function Dy(t,e,n){var[e,r,,i]=uf(t)?Ry(e):e,[n,a]=n,t=t.getCenter(),o=Py(Ey(e,t)),r=Py(Ey(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:Ay(i,t),outerRadius:Ay(e,t)}}function zy(t,e,n,r){var i=t["defaultColor"],t=t[e]||{};return Object.assign({},{fill:i,stroke:i},t[n]||t[r])}function Gy(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function Wy(t,e){return ff(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}Sy.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};const Vy=P=>{const{colorAttribute:N,first:j=!0,last:L=!0}=P,C=Z(P,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=zy(r,i,a,o),i=N,a=r[i],{radius:o=0}=r,r=Z(r,["symbol"==typeof i?i:i+"","radius"]),i=r.lineWidth||1,{stroke:s,radius:o=o,radiusTopLeft:l=o,radiusTopRight:c=o,radiusBottomRight:u=o,radiusBottomLeft:f=o,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:y=h,innerRadiusBottomLeft:h=h,inset:g=0,insetLeft:v=g,insetRight:m=g,insetBottom:b=g,insetTop:x=g,lineWidth:i="stroke"===N||s?i:0}=C,k=Z(C,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","inset","insetLeft","insetRight","insetBottom","insetTop","lineWidth"]),{color:a=a,opacity:w}=e;if(!ff(n)&&!df(n)){var[M,,O]=!!uf(n)?Ry(t):t;const[T,E]=M;var[O,M]=Ey(O,M),_=(0<O?T:T+O)+v,S=(0<M?E:E+M)+x,O=Math.abs(O)-(v+m),v=Math.abs(M)-(x+b);return Q(new F.Rect({})).call(I,r).style("lineWidth",i).style("x",_).style("y",S).style("width",O).style("height",v).style("stroke",void 0===s?a:s).style(Gy(P),w).style(N,a).style("radius",[j?l:d,j?c:p,L?u:y,L?f:h]).call(I,k).node()}const{y:E,y1:A}=e;m=n.getCenter(),M=Dy(n,t,[E,A]),x=Q1().cornerRadius(o).padAngle(g*Math.PI/180);return Q(new F.Path({})).call(I,r).style("path",x(M)).style("transform",`translate(${m[0]}, ${m[1]})`).style("stroke",a||s).style("lineWidth",i).style(N,a).style(Gy(P),w).call(I,C).node()}},Hy=(Vy.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Vy(Object.assign({colorAttribute:"fill"},t))),qy=(Hy.props=Object.assign({},Vy.props),t=>Vy(Object.assign({colorAttribute:"stroke"},t)));qy.props=Object.assign({},Vy.props);const Yy=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(uf(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=Z(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return Vy(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function Uy(t,e,n){var[t,r,i,a]=t;if(uf(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}Yy.props=Object.assign({},Vy.props);const Xy=t=>Yy(Object.assign({adjustPoints:Uy},t));function Ky(t){const e="function"==typeof t?t:t.render;return class extends F.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}Xy.props=Object.assign({},Vy.props);const $y=Ky(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;Q(t).maybeAppend("line",()=>new F.Path({})).style("d",e).call(I,r),Q(t).maybeAppend("line1",()=>new F.Path({})).style("d",n).call(I,i)});const Zy=t=>{const{curve:f,gradient:h=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connectNulls:y=!1}=t,g=Z(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=zy(r,i,a,o),{stroke:i,lineWidth:a}=r,o=Z(r,["stroke","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=h&&a?Iy(a,s,l,h,d):r,s=Wy(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),g);let c;if(ff(n)){const u=n.getCenter();c=n=>uy(ay().curve(sy)).angle((t,e)=>Py(Ey(n[e],u))).radius((t,e)=>Ay(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(f)(n)}else c=ay().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(f);var[r,e]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,p),o=J(l,"connect"),a=!!e.length;return(!a||y&&!Object.keys(o).length?Q(new F.Path({})).style("d",c(r)).call(I,l):a&&!y?Q(new F.Path({})).style("d",c(t)).call(I,l):Q(new $y).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},Jy=(Zy.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=ff(n)?ky:ny;return Zy(Object.assign({curve:i},a))(t,e,n,r)}),Qy=(Jy.props=Object.assign({},Zy.props),t=>{const{alpha:a=.5}=t,o=Z(t,["alpha"]);return(t,e,n,r)=>{var i=ff(n)?by:vy;return Zy(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),tg=(Qy.props=Object.assign({},Zy.props),t=>Zy(Object.assign({curve:_y},t))),eg=(tg.props=Object.assign({},Zy.props),t=>Zy(Object.assign({curve:Oy},t))),ng=(eg.props=Object.assign({},Zy.props),t=>Zy(Object.assign({curve:My},t)));function rg(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}ng.props=Object.assign({},Zy.props);var ig,ag=Object.freeze({__proto__:null,point:rg,square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const o=h=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=h,y=Z(h,["colorAttribute","symbol","mode"]),g=ag[t]||rg;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=zy(r,a,o,s),a=d,o=r[a],s=r["lineWidth"],r=Z(r,["symbol"==typeof a?a:a+"","lineWidth"]),a=y.stroke?s||1:s,{color:s=o,transform:o,opacity:l}=e,[c,u]=1===(c=t).length?c[0]:([[c,f],[u,i]]=c,[(c+u)/2,(f+i)/2]),f=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||yf(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(p,t,e,n)||y.r||r.r;return Q(new F.Path).call(I,r).style("d",g(c,u,f)).style("lineWidth",a).style("transform",o).style("stroke",s).style(Gy(h),l).style(d,s).call(I,y).node()}},og=(o.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>o(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),sg=(og.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),lg=(sg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),cg=(lg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),ug=(cg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),fg=(ug.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),hg=(fg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),dg=(hg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),pg=(dg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),yg=(pg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),gg=(yg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),vg=(gg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),mg=(vg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),bg=(mg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),xg=(bg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"point"},t))),kg=(xg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"square"},t))),wg=(kg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),Mg=(wg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Og=(Mg.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),_g=(Og.props=Object.assign({},o.props),t=>{const{arrowSize:f="40%"}=t,h=Z(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=zy(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),[r,t]=t,[l,c]=Fy(r,t,{arrowSize:f}),u=L1();return u.moveTo(...r),u.lineTo(...t),u.moveTo(...t),u.lineTo(...l),u.moveTo(...t),u.lineTo(...c),Q(new F.Path).call(I,a).style("d",u.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(I,h).node()}});function Sg(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,Sg)}function Eg(){this.constructor=ig}_g.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},ig=Sg,u=Error,Eg.prototype=u.prototype,ig.prototype=new Eg,Sg.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var Ag;function Tg(t,e,n,r){var i,a,o,s=Pg(r=void 0===r?"...":r,n),l=en(t)?t:qe(i=t)?"":i.toString(),c=e,u=[];if(Pg(t,n)<=e)return t;for(;;){if(a=l.substr(0,16),c<(o=Pg(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(16)))return u.join("")}for(;;){if(a=l.substr(0,1),c<(o=Pg(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var Pg=dn(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Ag=Ag||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),Ag.measureText(en(t)?t:"").width},function(t,e){return k([t],x(on(e=void 0===e?{}:e)),!1).join("")});function Ng(t,e){return"string"==typeof t?Pg(t,e):t}function jg(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function Lg(t,e){e=Math.pow(10,e);return~~(t*e)/e}function Cg(t){if(rn(t))return[t,t,t,t];if(Xe(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var Fg=["default","active","selected","disabled","inactive"],Bg={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function Ig(t){var e;return t?null==t?void 0:t.default:(e=pn(t)||{},Fg.forEach(function(t){t in e&&delete e[t]}),e)}function Rg(t,e,n){return void 0===n&&(n=!1),e?(e=vn(t,e),n?kn({},Ig(t),e):e):Ig(t)||{}}function Dg(r,i,a){void 0===a&&(a=!1);return Object.keys(r).reduce(function(t,e){var n;return n=e,new RegExp("^".concat(i,"[A-Z].*")).test(n)!==a&&(a?t[e]=r[e]:t[(n=e.slice(i.length)).charAt(0).toLowerCase()+n.slice(1)]=r[e]),t},{})}function zg(t,r){var i=t,t=Object.keys(t).reduce(function(t,e,n){return n>=r.length||(n=r[n],t.push(Dg(i,n)),i=Dg(i,n,!0)),t},[]);return t.push(i),t}function Gg(r,i){return Object.keys(r).reduce(function(t,e){var n;return t["".concat(i).concat((n=e).charAt(0).toUpperCase()+n.slice(1))]=r[e],t},{})}function Wg(t){var n=["x","y"],r=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],i={},a={};return Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function Vg(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}_.prototype.selectAll=function(t){return new _("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},_.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new _(this._elements,null,this._parent,this._document,void 0,void 0,t)},_.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new _([t],null,t,this._document)},_.prototype.append=function(t){var e=this,n="function"==typeof t?t:function(){return e.createElement(t)},r=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],a=x(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new _(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new _(r,null,r[0],this._document)},_.prototype.maybeAppend=function(t,e){e=xe(this,Hg,"m",qg).call(this,t.startsWith("#")?t:"#".concat(t),e);return e.attr("id",t),e},_.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=xe(this,Hg,"m",qg).call(this,t.startsWith(".")?t:".".concat(t),e);return e.attr("className",t),e},_.prototype.maybeAppendByName=function(t,e){e=xe(this,Hg,"m",qg).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},_.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),f=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),h=Ru(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],y=n(p,d),g=e(p,d);if(u.has(y))(x=u.get(y)).__data__=p,x.__facet__=!1,o.push(x),s.delete(x),u.delete(y);else if(f.has(y))(x=f.get(y)).__data__=p,x.__facet__=!0,o.push(x),f.delete(y);else if(h.has(y)){var v=h.get(y);l.push([p,v]);try{r=void 0;for(var m=be(v),b=m.next();!b.done;b=m.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}h.delete(y)}else u.has(g)?((x=u.get(g)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var k=[new _([],a,this._parent,this._document),new _(o,null,this._parent,this._document),new _(s,null,this._parent,this._document),new _([],l,this._parent,this._document),new _(c,null,this._parent,this._document)];return new _(this._elements,null,this._parent,this._document,k)},_.prototype.merge=function(t){var e=k(k([],x(this._elements),!1),x(t._elements),!1),t=k(k([],x(this._transitions),!1),x(t._transitions),!1);return new _(e,null,this._parent,this._document,void 0,t)},_.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=_.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},_.prototype.join=function(t,e,n,r,i){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)},_.prototype.remove=function(){for(var n=this,t=0;t<this._elements.length;t++)!function(t){var e=n._elements[t],t=n._transitions[t];t?t.then(function(){return e.remove()}):e.remove()}(t);return new _([],null,this._parent,this._document,void 0,this._transitions)},_.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},_.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})},_.prototype.style=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},_.prototype.update=function(n){var r="function"!=typeof n?function(){return n}:n;return this.each(function(t,e){n&&this.update(r.call(this,t,e))})},_.prototype.transition=function(t){var n="function"!=typeof t?function(){return t}:t,r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},_.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},_.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,k([this._parent,this],x(e),!1)),this},_.prototype.node=function(){return this._elements[0]},_.prototype.nodes=function(){return this._elements},_.prototype.transitions=function(){return this._transitions},_.prototype.parent=function(){return this._parent},Hg=new WeakSet,qg=function(t,e){var n=this._elements[0],t=n.querySelector(t);return t||(t="string"==typeof e?this.createElement(e):e(),n.appendChild(t)),new _([t],null,this._parent,this._document)},_.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};var Hg,qg,Yg=_;function _(t,e,n,r,i,a,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===o&&(o=[]),Hg.add(this),this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}function S(t,e){var n,r;if(e)try{for(var i=be(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],l=o[1];t.style(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function E(t){return new Yg([t],null,t,t.ownerDocument)}function Ug(t,e,n){return t.querySelector(e)?E(t).select(e):E(t).append(n)}function Xg(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function Kg(t){var t=t.getLocalBounds(),t=x([t.min,t.max],2),e=x(t[0],2),n=e[0],e=e[1],t=x(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function $g(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),n=e[0]-n,e=e[1]-t;return Math.sqrt(n*n+e*e)}function Zg(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}function Jg(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)tv(t,e[r]);return t}var Qg=5,tv=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=Qg),Object.entries(i).forEach(function(t){var t=x(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?Je(t)?(Je(r[e])||(n[e]={}),a<o?tv(r[e],t,a+1,o):n[e]=i[e]):Xe(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function ev(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function nv(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function rv(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function iv(a){return void 0===a&&(a=0),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,r=window.setTimeout(function(){i.apply(t,e),r=null},a))})}}var av,ov=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function sv(t){return en(t)||rn(t)?new F.Text({style:{text:String(t)}}):t}function lv(t){return t*Math.PI/180}function cv(t){return Number((180*t/Math.PI).toPrecision(5))}function uv(t,e){var t=(t instanceof F.DisplayObject?t:t.node()).computedStyleMap().get("transform");return!t||"unset"===t.value||null==(t=null==t?void 0:t.find(function(t){return t.t===e}))?void 0:t.d.map(function(t){return t.value})}function fv(t,e){if(e)try{var o=t instanceof F.DisplayObject?t:t.node(),n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=((r=o)instanceof F.DisplayObject?r:r.node()).getBBox()).width,a=r.height,[(r=x([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?i:a):t}),2))[0],r[1]]),")");var r,i,a});o.attr("transform",n)}catch(t){}}function hv(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}function dv(t,e){return He(t)?t.apply(void 0,k([],x(e),!1)):t}function pv(t,e,n,r){void 0===r&&(r=!0),t?n(e):r&&e.node().removeChildren()}function yv(){return null!==av&&av.apply(this,arguments)||this}function gv(e,n){return ve(t,r=F.CustomElement),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t){var e;this.attr(kn({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t.prototype.attributeChangedCallback=function(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,Jg({},{style:n},t))||this;return t.descriptor=e,t}var r}ve(yv,av=F.CustomElement);function vv(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=x(t,2),e=t[0],t=t[1],n=r(t);return[e,{name:n,class:".".concat(n),id:"#".concat(n),toString:function(){return n}}]})),Object.assign(t,{prefix:r}),t}function mv(t){var r=m({},t),i=new RegExp(/^(f|[\S]+F)(ilter|iltrate)$/),a={},o={iltrate:"ilter",ilter:"iltrate"};return Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];i.test(e)&&(a[e]=t)}),Object.keys(a).forEach(function(t){delete r[t]}),Object.keys(a).forEach(function(t){var e,n;(t.endsWith("iltrate")&&"function"!=typeof a[t]||t.endsWith("ilter")&&"function"==typeof a[t])&&(n=t.replace(i,function(t,e,n){return"".concat(e).concat(o[n])}),Object.assign(r,((e={})[n]=a[t],e)))}),r}function bv(t,e){"text"===t.node().nodeName&&t.call(S,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:"..."})}function xv(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=r.width,r=r.height,e=e/Math.max(i,r);n&&t.scale(e)}ve(wv,kv=F.CustomElement),wv.prototype.connectedCallback=function(){var t=this.style,e=t.x,t=t.y;this.setLocalPosition([+(void 0===e?0:e),+(void 0===t?0:t)]),this.render(this.attributes,this),this.bindEvents(this.attributes,this)},wv.prototype.update=function(t){this.attr(Jg({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},wv.prototype.clear=function(){this.removeChildren()},wv.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},wv.prototype.attributeChangedCallback=function(){},wv.prototype.bindEvents=function(t,e){};var kv,Qa=wv;function wv(t){return kv.call(this,t)||this}function Mv(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}function Ov(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function _v(t,e,n){return[["M",t-n,e],["L",t+n,e]]}Xs=Mv,Fs=_v;function Sv(t){n="default",Ke(e=t)&&e instanceof Image?n="image":He(e)?n="symbol":en(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}ve(Tv,Ev=Qa),Tv.prototype.render=function(t,e){var r=t.x,i=t.y,a=t.symbol,n=t.size,o=void 0===n?16:n,s=Z(t,["x","y","symbol","size"]),l=Sv(a);l?Ug(e,".".concat(l,"-marker"),l).attr("className","marker ".concat(l,"-marker")).call(function(t){var e,n;"image"===l?(e=2*o,t.style("img",a).style("width",e).style("height",e).style("x",-o).style("y",-o)):(e=o/2,n=He(a)?a:Tv.getSymbol(a),t.style("path",null==n?void 0:n(r,i,e)).call(S,s))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},Tv.MARKER_SYMBOL_MAP=new Map,Tv.registerSymbol=function(t,e){Tv.MARKER_SYMBOL_MAP.set(t,e)},Tv.getSymbol=function(t){return Tv.MARKER_SYMBOL_MAP.get(t)};var Ev,Av=Tv;function Tv(){return null!==Ev&&Ev.apply(this,arguments)||this}Av.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),Av.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),Av.registerSymbol("line",Ov),Av.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),Av.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),Av.registerSymbol("circle",Mv),Av.registerSymbol("point",Xs),Av.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),Av.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),Av.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),Av.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),Av.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),Av.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),Av.registerSymbol("line",Ov),Av.registerSymbol("dot",_v),Av.registerSymbol("dash",Fs),Av.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),Av.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),Av.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),Av.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),Av.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});ve(jv,Pv=Qa),jv.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,f=t.align,t=t.verticalAlign,i=x(Cg(void 0===i?0:i),4),h=i[0],d=i[1],p=i[2],i=i[3],y=Ug(e,".tag-content","g").attr("className","tag-content").node(),g=Ug(y,".tag-marker",function(){return new Av({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(a||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(v=(g=g).getLocalBounds()).halfExtents[0]?v.max[0]+(u||0):g.style.x,y:v.halfExtents[1]?(v.min[1]+v.max[1])/2:g.style.y}),v=u.x,g=u.y,g=(Ug(y,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",v).style("y",g).style("text",qe(o)?"":"".concat(o)).call(S,s).style("textBaseline","middle").call(function(t){o||t.remove()}),u=i,v=h,g=f||"start",s=t||"top",t=(f=y).getLocalBounds(),r=n=0,"start"===g&&(n=u),"center"===g&&(n=-t.halfExtents[0]),"end"===g&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=v+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=v-2*t.halfExtents[1]),f.setLocalPosition([n,r]),y.getLocalBounds());Ug(e,".tag-background","rect").attr("className","tag-background").style("zIndex",(y.style.zIndex||0)-1).style("x",g.min[0]-i).style("y",g.min[1]-h).style("width",null!==c?i+d+2*g.halfExtents[0]:0).style("height",null!==c?h+p+2*g.halfExtents[1]:0).style("radius",null!=l?l:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(S,c)},jv.defaultOptions={type:jv.tag="tag",style:{padding:4,spacing:4}};var Pv,Nv=jv;function jv(t){return Pv.call(this,kn({},jv.defaultOptions,t))||this}var Lv,Cv,Fv={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},Bv={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},Iv={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}};function Rv(t){var n=Lv.call(this,Jg({},Rv.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function Dv(t){return Cv.call(this,kn({},Dv.defaultOptions,t))||this}ve(Rv,Lv=Qa),Object.defineProperty(Rv.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(Rv.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,Tg(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(Rv.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=ln(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Rv.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),Rv.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=kn({},vn(Fv,[n,e]),Rg(vn(Bv,[t,e]),r),Rg(vn(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Iv[e]&&(i[t]=vn(Iv,[e,t]))}),Object.keys(Iv.strict[e]).forEach(function(t){i[t]=vn(Iv,["strict",e,t])}),kn(i,Rg(vn(this.attributes,e),"disabled"))),i},Rv.prototype.render=function(t,e){var n=t.padding,n=void 0===n?0:n,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),x(Cg(n),4)),i=(n[0],n[1]),a=(n[2],n[3]),o=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=Ug(e,".marker",function(){return new Av({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(m(m({},s),{symbol:r,x:a+l/2,y:o/2,size:l}))}).node().getLocalBounds(),c=this.text,c=void 0===c?"":c,u=this.getStyle("textStyle"),n=(this.textShape=Ug(e,".text","text").attr("className","text").style("x",l?n.max[0]+t:a).style("y",o/2).style("text",c).style("textAlign","left").style("textBaseline","middle").call(S,u).node(),this.textShape.getLocalBounds()),c=this.getStyle("buttonStyle");Ug(e,".background","rect").attr("className","background").style("zIndex",-1).call(S,c).style("height",o).style("width",a+(l?l+t:0)+2*n.halfExtents[0]+i).node()},Rv.prototype.update=function(t){this.attr(kn({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},Rv.prototype.setState=function(t){this.update({state:t})},Rv.prototype.hide=function(){this.style.visibility="hidden"},Rv.prototype.show=function(){this.style.visibility="visible"},Rv.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},Rv.defaultOptions={type:Rv.tag="button",style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},ve(Dv,Cv=Qa),Dv.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=x(Cg(void 0===i?0:i),3),i=t[0],f=t[1],t=t[2],h=Ug(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),d=0,p=0,y=(h.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new Nv({className:"breadcrumb-item",style:m(m({x:d,y:p,text:qe(n.text)?n.id:n.text,textStyle:l},mn(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(h.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,qe(c)||c-f<d&&(r.attr({x:0,y:p+i}),d=a,p+=i),y.bindInnerEvents(r,n),u||{}),n=a.spacing,n=void 0===n?0:n,o=a.text,o=void 0===o?"/":o,a=a.style;t!==s.length-1&&(e=new F.Text({className:"".concat(Dv.tag,"-separator"),id:"".concat(Dv.tag,"-separator-").concat(t),style:m(m(m(m({},Bg),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),h.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},Dv.prototype.update=function(t){this.attr(kn({},this.attributes,t)),this.render(this.attributes,this)},Dv.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},Dv.defaultOptions={type:Dv.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:m(m({},Bg),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};ve(Wv,zv=F.DisplayObject),Wv.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},Wv.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Wv.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},Wv.prototype.createLines=function(t){E(this.linesGroup).selectAll("line").data(t).join(function(t){return t.append("path").each(function(t){E(this).call(S,t)})},function(t){return t.each(function(t){E(this).call(S,t)})},function(t){return t.remove()})},Wv.prototype.createAreas=function(t){E(this.linesGroup).selectAll("area").data(t).join(function(t){return t.append("path").each(function(t){E(this).call(S,t)})},function(t){return t.each(function(t){E(this).call(S,t)})},function(t){return t.remove()})};var zv,Gv=Wv;function Wv(t){var e=this,n=t.style,t=Z(t,["style"]);return(e=zv.call(this,kn({},{type:"lines",style:{width:0,height:0}},m({style:n},t)))||this).linesGroup=e.appendChild(new F.Group({name:"lines"})),e.areasGroup=e.appendChild(new F.Group({name:"areas"})),e.render(),e}ve(qv,Vv=F.DisplayObject),qv.prototype.render=function(){var t=this.attributes.columns;E(this.columnsGroup).selectAll("column-group").data(t.flat()).join(function(t){return t.append("rect").each(function(t){E(this).call(S,t)})},function(t){return t.each(function(t){E(this).call(S,t)})},function(t){return t.remove()})},qv.prototype.update=function(t){this.attr(kn({},this.attributes,t)),t.columns&&(this.clear(),this.render())},qv.prototype.clear=function(){this.removeChildren()};var Vv,Hv=qv;function qv(t){var e=this,n=t.style,t=Z(t,["style"]);return(e=Vv.call(this,kn({},{type:"column",style:{width:0,height:0}},m({style:n},t)))||this).columnsGroup=new F.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Yv(t){return 0===t.length?[0,0]:[tn(function(t,e){if(Xe(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=He(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return tn(t)||0})),Qe(function(t,e){if(Xe(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=He(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return Qe(t)||0}))]}function Uv(t){for(var e=pn(t),n=e[0].length,t=x([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}function Xv(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r;if(o){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=ce([0,0],c,x=t[s]),u=ue([0,0],u,x)}for(var s=0,f=t.length;s<f;s+=1){var h,d,p,y,g,v,m,b,x=t[s];0!==s||n?s!==f-1||n?(h=t[[s?s-1:f-1,s-1][n?0:1]],d=t[n?(s+1)%f:s+1],v=fe(v=pe([0,0],d,h),v,e),0!==(g=(p=he(x,h))+(y=he(x,d)))&&(p/=g,y/=g),g=fe([0,0],v,-p),v=fe([0,0],v,y),m=le([0,0],x,g),b=ce([0,0],b=le([0,0],x,v),ue([0,0],d,x)),b=ue([0,0],b,ce([0,0],d,x)),m=ce([0,0],m=le([0,0],x,g=fe([0,0],g=pe([0,0],b,x),-p/y)),ue([0,0],h,x)),m=ue([0,0],m,ce([0,0],h,x)),b=le([0,0],x,v=fe([0,0],v=pe([0,0],x,m),y/p)),o&&(m=ce([0,0],m=ue([0,0],m,c),u),b=ce([0,0],b=ue([0,0],b,c),u)),a.push(i),a.push(m),i=b):(m=x,a.push(i),a.push(m)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[0])[0],l[1]])),f}function Kv(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return k([e===n?"M":"L"],x(t),!1)});return e?t.reverse():t}function $v(t,e){if(void 0===e&&(e=!1),t.length<=2)return Kv(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];wn(a,n.slice(-2))||n.push.apply(n,k([],x(a),!1))}var o=Xv(n,!1);return e?o.unshift(k(["M"],x(t[r-1]),!1)):o.unshift(k(["M"],x(t[0]),!1)),o}function Zv(t,e,n){t=pn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}ve(tm,Jv=Qa),Object.defineProperty(tm.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=pn(t),rn(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(tm.prototype,"data",{get:function(){return this.attributes.isStack?Uv(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(tm.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(tm.prototype,"baseline",{get:function(){var t=this.scales.y,e=x(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(tm.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(tm.prototype,"linesCfg",{get:function(){var n=this;if("line"!==this.attributes.type)throw new Error("linesCfg can only be used in line type");var t,r,i,a,o,e,s,l,c,u=this.attributes,f=u.isStack,h=u.smooth,d=Dg(this.attributes,"area"),p=Dg(this.attributes,"line"),u=this.containerCfg.width,y=this.data;return 0===y[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,y=y,r=(e={type:"line",x:e,y:t}).x,i=e.y,a=(e=x(i.getOptions().range||[0,0],2))[0],o=e[1],a<o&&(e=x([a,o],2),o=e[0],a=e[1]),t=y.map(function(t){return t.map(function(t,e){return[r.map(e),nn(i.map(t),o,a)]})}),e=[],d&&(y=this.baseline,e=f?(h?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=$v(o),l=void 0,l=0===i?Zv(s,e,n):(a=$v(t[i-1],!0),o=o[0],a[0][0]="L",k(k(k([],x(s),!1),x(a),!1),[k(["M"],x(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=Kv(t[i]),s=void 0,s=0===i?Zv(o,e,n):((a=Kv(t[i-1],!0))[0][0]="L",k(k(k([],x(o),!1),x(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,y):(s=h,l=u,c=y,t.map(function(t){return Zv((s?$v:Kv)(t),l,c)}))),{lines:t.map(function(t,e){return m({stroke:n.getColor(e),path:(h?$v:Kv)(t)},p)}),areas:e.map(function(t,e){return m({path:t,fill:n.getColor(e)},d)})})},enumerable:!1,configurable:!0}),Object.defineProperty(tm.prototype,"columnsCfg",{get:function(){var i=this;if("column"!==this.attributes.type)throw new Error("columnsCfg can only be used in column type");var a=Dg(this.attributes,"column"),o=this.attributes.isStack,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=Uv(s));var e=this.createScales(s),l=e.x,c=e.y,e=x(Yv(s),2),n=e[0],e=e[1],u=new V0({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return m(m({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),tm.prototype.render=function(t,e){this.containerShape=Ug(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=Ug(e,".".concat(r),function(){return new("line"===n?Gv:Hv)({className:r,style:i})}).call(S,i).node()},tm.prototype.update=function(t){this.attr(kn({},this.attributes,t)),this.render(this.attributes,this)},tm.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},tm.prototype.getColor=function(t){var e=this.attributes.color;return Xe(e)?e[t%e.length]:He(e)?e.call(null,t):e},tm.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,n=n.range,n=void 0===n?[]:n,i=this.containerCfg,a=i.width,i=i.height,o=x(Yv(t),2),s=o[0],o=o[1],s=new V0({domain:[null!=(e=n[0])?e:s,null!=(e=n[1])?e:o],range:[i,0]});return"line"===r?{type:r,x:new V0({domain:[0,t[0].length-1],range:[0,a]}),y:s}:(e=(n=this.attributes).isGroup,o=n.spacing,{type:r,x:new j0({domain:t[0].map(function(t,e){return e}),range:[0,a],paddingInner:e?o:0}),y:s})},tm.tag="sparkline",tm.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,nice:!0,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",columnPadding:.1}};var Jv,Qv=tm;function tm(t){return Jv.call(this,kn({},tm.defaultOptions,t))||this}var em,nm={fill:"#fff",stroke:"#bfbfbf",lineWidth:1,size:10,radius:2,strokeOpacity:1},rm={fontSize:12,fill:"#000",fillOpacity:.45,textAlign:"center",textBaseline:"middle"},im={orient:"horizontal",type:"start"},am=vv({label:"label",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),om=gv({render:function(t,e){var n=t.size,n=void 0===n?10:n,r=t.radius,r=void 0===r?n/4:r,i=t.orient,t=(t.class,Z(t,["size","radius","orient","class"])),a=2.4*n,r=E(e).maybeAppendByClassName(am.iconRect,"rect").call(S,m(m({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,l=.25*a,c=.75*a;r.maybeAppendByClassName("".concat(am.iconLine,"-1"),"line").call(S,{x1:o,x2:o,y1:l,y2:c}).call(S,t),r.maybeAppendByClassName("".concat(am.iconLine,"-2"),"line").call(S,{x1:s,x2:s,y1:l,y2:c}).call(S,t),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}}),sm=(ve(lm,em=Qa),lm.prototype.renderLabel=function(t){var e=Dg(this.attributes,"label");E(t).maybeAppendByClassName(am.label,"text").call(S,m(m({},rm),e))},lm.prototype.renderIcon=function(t){var e=this.attributes.orient,n=m(m({orient:e},nm),Dg(this.attributes,"icon"));E(t).maybeAppendByClassName(am.icon,function(){return new om({style:n})}).update(n)},lm.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},lm);function lm(t){return em.call(this,Jg({},{style:im},t))||this}ve(hm,cm=Qa),Object.defineProperty(hm.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.clampValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(hm.prototype,"sparklineShapeCfg",{get:function(){var t,e,n,r,i,a,o,s;return"horizontal"!==this.attributes.orient?null:(i=(t=Dg(this.attributes,"sparkline")).padding,t=Z(t,["padding"]),e=(i=x(Cg(i),4))[0],n=i[1],r=i[2],i=i[3],a=(o=this.availableSpace).width,o=o.height,s=this.attributes.backgroundLineWidth,m(m({x:(s=+(void 0===s?0:s))/2+i,y:s/2+e},t),{zIndex:0,width:a-s-i-n,height:o-s-e-r}))},enumerable:!1,configurable:!0}),Object.defineProperty(hm.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.length,t=t.size,e=x(Cg(e),4),r=e[0],i=e[1],a=e[2],e=e[3],t=x(this.getOrientVal([[n,t],[t,n]]),2);return{x:e,y:r,width:t[0]-(e+i),height:t[1]-(r+a)}},enumerable:!1,configurable:!0}),hm.prototype.getValues=function(){return this.values},hm.prototype.setValues=function(t){this.values=t,this.update({values:t})},hm.prototype.render=function(t,e){var o=this,n=t.orient,t=x(zg(t,["selection","background"]),2),r=t[0],t=t[1];this.backgroundShape=E(e).maybeAppendByClassName("slider-background","rect").call(S,this.availableSpace).call(S,t);function i(t){var e="".concat(t,"-handle"),n=o.getHandleShapeCfg(t),r=n.x,i=n.y,a=Z(n,["x","y"]);return(n=o.foregroundGroup.maybeAppendByClassName(e,function(){return new sm({style:a})}).style("type",t).update(a)).node().setLocalPosition(+r,+i),n}pv("horizontal"===n,E(e).maybeAppendByClassName("slider-sparkline-group","group"),function(t){var e=o.sparklineShapeCfg;t.maybeAppendByClassName("slider-sparkline",function(){return new Qv({style:e})}).call(function(t){t.node().update(e)})}),this.foregroundGroup=E(e).maybeAppendByClassName("slider-foreground","group"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName("slider-selection","rect").call(S,this.calcMask()).call(S,r);this.startHandle=i("start"),this.endHandle=i("end")},hm.prototype.clampValues=function(t,e){void 0===t&&(t=this.getValues()),void 0===e&&(e=4);var n,r=x(this.range,2),i=r[0],r=r[1],a=x(this.getValues(),2),o=a[0],a=a[1],t=x(t||[o,a],2),s=t[0],t=t[1],l=t-s;return t<s&&(s=(n=x([t,s],2))[0],t=n[1]),r-i<l?[i,r]:s<i?o===i&&a===t?[i,t]:[i,l+i]:r<t?a===r&&o===s?[s,r]:[r-l,r]:[Lg(s,e),Lg(t,e)]},hm.prototype.calcMask=function(t){var t=x(this.clampValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.width,n=n.height;return this.getOrientVal([{y:0,height:n,x:e*r,width:(t-e)*r},{x:0,width:r,y:e*n,height:(t-e)*n}])},hm.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=x(this.clampValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},hm.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orient,n=n.formatter,i=Dg(this.attributes,"handle"),a=Dg(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.height,u=this.calcMask(),f=u.x,h=u.y,d=u.width,u=u.height,n=n("start"===t?s[0]:s[1]),s=this.appendChild(new F.Text({style:m(m(m({visibility:"hidden"},Bg),a),{text:n})})),a=s.getBBox(),p=a.width,a=a.height,s=(s.destroy(),0),y=0;return"horizontal"===r?(e=(r=i+o)+p/2,s="start"===t?0<f-r-p?-e:e:p<c-f-d-r?e:-e):(e=i+o,y="start"===t?a<h-o?-e:e:a<l-h-u-o?e:-e),{x:s,y:y,text:n}},hm.prototype.getHandleLabelShapeCfg=function(t){var e=Dg(this.attributes,"handleLabel");return m(m({},e),this.calcHandleText(t))},hm.prototype.getHandleIconShapeCfg=function(){var t=this.attributes.orient,e=Dg(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return m(m({},e),{orient:t,cursor:n,size:r})},hm.prototype.getHandleShapeCfg=function(t){var e=this.attributes.showHandle,n=this.calcHandlePosition(t),r=n.x,n=n.y,i=this.calcHandleText(t);return m(m(m({zIndex:3,visibility:e?"visible":"hidden"},Gg(this.getHandleIconShapeCfg(),"icon")),Gg(m(m({},this.getHandleLabelShapeCfg(t)),i),"label")),{x:r,y:n})},hm.prototype.getHandleSize=function(){var t,e=this.attributes.handleIconSize;return e||(t=(e=this.attributes).width,e=e.height,Math.floor((this.getOrientVal([+e,+t])+4)/2.4))},hm.prototype.getOrientVal=function(t){var t=x(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},hm.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=x(this.getValues(),2),r=n[0],n=n[1],t=[r+t,n+e].sort();this.setValues(t),this.onValueChange([r,n])},hm.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},hm.prototype.bindEvents=function(){function n(t){return t&&".handle-text"!==t.className}var r=this,t=this.attributes,e=t.onBackgroundMouseenter,i=void 0===e?xn:e,e=t.onBackgroundMouseleave,a=void 0===e?xn:e,e=t.onSelectionMouseenter,o=void 0===e?xn:e,e=t.onSelectionMouseleave,s=void 0===e?xn:e,l=this.selectionShape,c=(l.on("mousedown",this.onDragStart("selection")),l.on("touchstart",this.onDragStart("selection")),this.dispatchEvent(new F.CustomEvent("selectionMouseenter")),l.on("mouseenter",function(){o(l),r.dispatchEvent(new F.CustomEvent("selectionMouseenter"))}),l.on("mouseleave",function(){s(l),r.dispatchEvent(new F.CustomEvent("selectionMouseleave"))}),[this.startHandle,this.endHandle].forEach(function(t){var e=t.node().attr("type");t.on("mousedown",function(t){n(t.target)&&r.onDragStart(e)(t)}),t.on("touchstart",function(t){n(t.target)&&r.onDragStart(e)(t)})}),this.backgroundShape);c.on("mousedown",this.onDragStart("background")),c.on("touchstart",this.onDragStart("background")),c.on("mouseenter",function(){i(c),r.dispatchEvent(new F.CustomEvent("backgroundMouseenter"))}),c.on("mouseleave",function(){a(c),r.dispatchEvent(new F.CustomEvent("backgroundMouseleave"))})},hm.defaultOptions={type:hm.tag="slider",style:m(m(m({values:[0,1],length:200,size:20,orient:"horizontal",backgroundZIndex:-1,backgroundCursor:"crosshair",backgroundFill:"#416180",backgroundOpacity:.05,selectionCursor:"move",selectionZIndex:2,selectionFill:"#5B8FF9",selectionFillOpacity:.45,sparklinePadding:1,padding:0,showHandle:!0,handleSpacing:2,formatter:function(t){return t}},Gg(im,"handle")),Gg(nm,"handleIcon")),Gg(rm,"handleLabel"))};var cm,um,fm=hm;function hm(t){var a=cm.call(this,kn({},hm.defaultOptions,t))||this;return a.range=[0,1],a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(Vg(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([+r,+n])),a.selectionWidth=0,a.addEventListener("mousemove",a.onDragging),a.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){t.stopPropagation();var t=a.getOrientVal(Vg(t)),e=t-a.prevPos;if(e){var n=a.getRatio(e);switch(a.target){case"start":a.setValuesOffset(n);break;case"end":a.setValuesOffset(0,n);break;case"selection":a.setValuesOffset(n,n);break;case"background":a.selectionWidth+=n,a.setValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort())}a.prevPos=t}},a.onDragEnd=function(){a.removeEventListener("mousemove",a.onDragging),a.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChange=function(t){var e=a.attributes.onValueChange,e=((void 0===e?xn:e)(a.getValues(),t),new F.CustomEvent("valueChange",{detail:{oldValue:t,value:a.getValues()}}));a.dispatchEvent(e)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}function dm(t){var o=um.call(this,kn({},dm.defaultOptions,t))||this;return o.onValueChanged=function(t){var e=o.style.value;t!==e&&(e=new F.CustomEvent("scroll",t={detail:{oldValue:t,value:e}}),o.dispatchEvent(e),e=new F.CustomEvent("valueChanged",t),o.dispatchEvent(e))},o.onTrackClick=function(t){var e=o.attributes.thumbLen,n=x(o.getLocalPosition(),2),r=n[0],n=n[1],i=x(o.padding,4),a=i[0],i=i[3],r=o.getOrientVal([r+i,n+a]),i=o.getOrientVal(Vg(t))-e/2,n=o.valueOffset(i-r,!0);o.setValue(n)},o.onThumbMouseenter=function(){o.thumbShape.attr(o.getStyle("thumbStyle","active"))},o.onTrackMouseenter=function(){o.trackShape.attr(o.getStyle("trackStyle","active"))},o.onThumbMouseleave=function(){o.thumbShape.attr(o.getStyle("thumbStyle"))},o.onTrackMouseleave=function(){o.trackShape.attr(o.getStyle("trackStyle"))},o.onDragStart=function(t){t.stopPropagation(),o.prevPos=o.getOrientVal(Vg(t)),document.addEventListener("mousemove",o.onDragging),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchmove",o.onDragging),document.addEventListener("touchcancel",o.onDragEnd)},o.onDragging=function(t){t.stopPropagation();var t=o.getOrientVal(Vg(t)),e=t-o.prevPos;o.setOffset(e),o.prevPos=t},o.onDragEnd=function(t){t.preventDefault(),document.removeEventListener("mousemove",o.onDragging),document.removeEventListener("mouseup",o.onDragEnd),document.removeEventListener("touchmove",o.onDragging),document.removeEventListener("touchcancel",o.onDragEnd)},o}ve(dm,um=Qa),Object.defineProperty(dm.prototype,"padding",{get:function(){return Cg(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(dm.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,t=t.height,n=x(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3];return{x:n,y:r,width:e-(n+i),height:t-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(dm.prototype,"trackLen",{get:function(){var t=this.availableSpace,e=t.width,t=t.height;return this.getOrientVal([e,t])},enumerable:!1,configurable:!0}),Object.defineProperty(dm.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=vn(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),dm.prototype.render=function(t,e){var n=t.width,r=t.height,i=t.trackStyle,a=t.thumbStyle,o=t.value,s=t.thumbLen,t=t.orient,e=Ug(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(S,Rg(i)).node(),n=this.valueOffset(o||0),r=this.availableSpace;this.thumbShape=Ug(e,".thumb","rect").attr("className","thumb").style("x","vertical"===t?r.x:r.x+n).style("y","vertical"===t?r.y+n:r.y).style("width","vertical"===t?r.width:s).style("height","vertical"===t?s:r.height).style("radius",this.thumbRadius).call(S,Rg(a)).node(),this.trackShape=e},dm.prototype.getValue=function(){return this.style.value},dm.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:nn(t,r,e)}),this.onValueChanged(n)},dm.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},dm.prototype.valueOffset=function(t,e){var n=this.attributes,r=n.thumbLen,i=n.min,n=n.max,r=this.trackLen-r;return(e=void 0!==e&&e)?t/r:r*nn(t,i,n)},dm.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),Rg(vn(this.attributes,t),e)},dm.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},dm.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},dm.prototype.onHover=function(){this.thumbShape.addEventListener("mouseenter",this.onThumbMouseenter),this.trackShape.addEventListener("mouseenter",this.onTrackMouseenter),this.thumbShape.addEventListener("mouseleave",this.onThumbMouseleave),this.trackShape.addEventListener("mouseleave",this.onTrackMouseleave)},dm.defaultOptions={type:dm.tag="scrollbar",style:{orient:"vertical",min:0,max:1,isRound:!0,thumbLen:20,padding:[2,2,2,2],trackStyle:{default:{fill:"#fafafa",lineWidth:1,stroke:"#e8e8e8"},active:{}},thumbStyle:{default:{fill:"#c1c1c1"},active:{opacity:.8}}}};var Js={style:{data:[],dataThreshold:100,showTitle:!0,titlePosition:"lb",titleFill:"black",titleFontSize:12,titleTextAlign:"center",titleSpacing:0,titleTextBaseline:"middle",showLine:!0,lineLineWidth:1,lineStroke:"black",lineArrow:new F.Path({style:{path:"M 10,10 L -10,0 L 10,-10 L0,0 L10,10Z",anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}}),lineArrowOffset:15,lineArrowSize:10,showTick:!0,tickDirection:"positive",tickStroke:"black",tickLength:5,tickLineWidth:1,tickStrokeOpacity:.65,showLabel:!0,labelSpacing:0,labelDirection:"positive",labelAlign:"parallel",labelTransforms:[],showGrid:!0,gridType:"segment",gridConnect:"line",gridDirection:"positive",gridLength:0,gridControlAngles:[]}},pm=(kn({},Js,{style:{type:"arc"}}),kn({},Js,{style:{}}),vv({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis"));function ym(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function gm(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=x(t,2);return[t[0],dv(t[1],e)]}))}function vm(t,e){return e&&He(e)?t.filter(e):t}function mm(t){return t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},"")}function bm(t,e,n){var r,i,a,o;return"surround"===e.type?(r=t,n=n,o=(e=e).connect,e=e.center,"line"===(void 0===o?"line":o)?mm(r):e?(i=$g(r[0],e),a=n?0:1,r.reduce(function(t,e,n){var e=x(e,2),r=e[0],e=e[1];return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(a,",")).concat(r,",").concat(e)},"")):""):mm(t)}function xm(t,e,n){function r(t,e){return"".concat(l," ").concat(t," ").concat(c," ").concat(e," ").concat(s)}var i=n.type,a=n.connect,o=n.center,s=n.closed?" Z":"",n=x([bm(t,n),bm(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=x([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r("L".concat(e.join()),"L".concat(t.join()));if(o)return a=(n=x([$g(e,o),$g(t,o)],2))[0],i=n[1],r("A".concat(a,",").concat(a,",0,0,1,").concat(e.join(" ")," L").concat(e.join()),"A".concat(i,",").concat(i,",0,0,0,").concat(t.join(" ")));throw new Error("Arc grid need to specified center")}function km(t,e,n){n.type,n.center;var r=n.connect,i=n.areaFill;if(n.closed,!(e.length<2)&&i&&r){for(var a=Array.isArray(i)?i:[i,"transparent"],o=[],s=0;s<e.length-1;s++){var l=x([e[s].points,e[s+1].points],2),l=xm(l[0],l[1],n);o.push({path:l,fill:a[s%a.length]})}E(t).selectAll(".grid-region").data(o,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){this.attr(t),ym(this,e,o,t)}).attr("className","grid-region")},function(t){return t.each(function(t,e){this.attr(t),ym(this,e,o,t)})},function(t){return t.remove()})}}ve(Om,wm=Qa),Om.prototype.render=function(t,e){t.className;var n,r,i,a,o=t.items,o=void 0===o?[]:o,s=(t.type,t.center,t.areaFill,t.closed,Z(t,["className","items","type","center","areaFill","closed"])),o=(o=o,t.closed?o.map(function(t){var e=t.points,n=x(e),r=n[0];return n.slice(1),m(m({},t),{points:k(k([],x(e),!1),[r],!1)})}):o);n=e,r=t,i=s,a=o.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:bm(t.points,r)}}),E(n).selectAll(".grid-line").data(a,function(t){return t.id}).join(function(t){return t.append("path").style("stroke","#D9D9D9").style("lineWidth",1).style("lineDash",[4,4]).each(function(t,e){t=t.path;this.attr(m(m({},i),{path:t})),ym(this,e,a,m({path:t},i))}).attr("className","grid-line")},function(t){return t.each(function(t,e){this.attr(t),ym(this,e,a,t)})},function(t){return t.remove()}),km(e,o,t)};var wm,Mm=Om;function Om(){return null!==wm&&wm.apply(this,arguments)||this}var _m=dn(function(t,e){var e=x(e.angleRange,2),n=e[0];return(e[1]-n)*t+n},function(t,e){return k([t],x(e.angleRange),!1).join()}),Sm=dn(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=x(e.startPos,2))[0],n=n[1],i=x(e.endPos,2),de([0,0],[(r=x([i[0]-r,i[1]-n],2))[0],r[1]])):(i=lv(_m(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n="linear"===(n=e).type?k(k([],x(n.startPos),!1),x(n.endPos),!1):k(k(k([],x(n.angleRange),!1),x(n.center),!1),[n.radius],!1);return"arc"===e.type&&n.push(t),n.join()});function Em(t,e,n){var t=Sm(t,n);return n=[],t=t,"positive"!==e?(n[0]=t[1],n[1]=-1*t[0]):(n[0]=-1*t[1],n[1]=t[0]),n}var Am=dn(function(t,e){var n=x(e.startPos,2),r=n[0],n=n[1],e=x(e.endPos,2),e=x([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return k(k([t],x(e.startPos),!1),x(e.endPos),!1).join()}),Tm=dn(function(t,e){var n=e.radius,r=x(e.center,2),i=r[0],r=r[1],t=lv(_m(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return k(k(k([t],x(e.angleRange),!1),[e.radius],!1),x(e.center),!1).join()});function Pm(t,e){return("linear"===e.type?Am:Tm)(t,e)}function Nm(a,t,o){function e(t,e){var e=x(e,2),n=(r=x(e[0],2))[0],r=r[1],i=(e=x(e[1],2))[0],e=e[1];a.maybeAppendByClassName(t,"line").attr("className","".concat(pm.line.name," ").concat(t)).call(S,m(m({},o),{x1:n,y1:r,x2:i,y2:e}))}var n,r,i,s=t.startPos,l=t.endPos,c=t.truncRange,u=t.lineExtension,f=x([s,l],2),h=x(f[0],2),d=h[0],h=h[1],f=x(f[1],2),p=f[0],f=f[1],l=x(u?(s=x([s=s,l=l,u=void 0===(u=u)?[0,0]:u],3),u=(l=x(s[0],2))[0],l=l[1],y=(n=x(s[1],2))[0],n=n[1],g=(s=x(s[2],2))[0],s=s[1],u=(y=x([y-u,n-l],2))[0],n=y[1],l=Math.sqrt(Math.pow(u,2)+Math.pow(n,2)),g=(y=x([-g/l,s/l],2))[0],s=y[1],[g*u,g*n,s*u,s*n]):new Array(4).fill(0),4),y=l[0],g=l[1],u=l[2],s=l[3];a.node().removeChildren();c?(l=(n=x(c,2))[0],c=n[1],i=(l=x([d+(p-d)*l,h+(f-h)*l],2))[0],l=l[1],r=(c=x([d+(p-d)*c,h+(f-h)*c],2))[0],c=c[1],e(pm.lineFirst.name,[[d+y,h+g],[i,l]]),e(pm.lineSecond.name,[[r,c],[p+u,f+s]]),i=a,t.truncRange,t.truncShape,t.lineExtension,i.select(pm.lineFirst.class).node(),i.select(pm.lineSecond.class).node()):e("axis-line",[[d+y,h+g],[p+u,f+s]])}function jm(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,y,g=e.type;"linear"===g?Nm(t,e,n):(r=t,a=n,u=(c=x((i=e).angleRange,2))[0],c=c[1],o=(s=x(i.center,2))[0],s=s[1],i=i.radius,console.assert(u<c,"end angle should be greater than start angle"),(360==(l=c-u)?r.maybeAppendByClassName(pm.line,"circle").style("cx",o).style("cy",s).style("r",i):(d=(p=x([i,i],2))[0],p=p[1],f=(y=x([u*Math.PI/180,c*Math.PI/180],2))[0],y=y[1],h=(f=x([o+i*Math.cos(f),s+i*Math.sin(f)],2))[0],f=f[1],s=(o=x([o+i*Math.cos(y),s+i*Math.sin(y)],2))[0],i=o[1],y=180<l?1:0,o=c<u?0:1,l="M".concat(h,",").concat(f,",A").concat(d,",").concat(p,",0,").concat(y,",").concat(o,",").concat(s,",").concat(i),r.maybeAppendByClassName(pm.line,"path").style("path",l))).call(S,a)),c=t,u=g,h=n,d=(f=e).lineArrow,p=e.truncRange,y=void 0===(y=e.lineArrowOffset)?0:y,f=e.lineArrowSize,d&&(E(d=sv(d)).call(S,m({},h)),xv(d,f,!0),("arc"!==u&&p?c.select(pm.lineSecond.class):c.select(pm.line.class)).style("markerEnd",d).style("markerEndOffset",-y))}function Lm(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function Cm(t,r){var e=r.gridLength,i=void 0===e?0:e;return t.map(function(t){var t=t.value,e=x(Pm(t,r),2),n=e[0],e=e[1],t=x(fe([0,0],Em(t,r.gridDirection,r),i),2);return{points:[[n,e],[n+t[0],e+t[1]]]}})}function Fm(t,e,n,r){var i=r.type,a=r.closed,o=r.areaFill,s=r.connect,l=Lm(n),c=vm(e,n.gridFilter),e="segment"===i?Cm(c,n):function(t,o,e){var s,l,c=e.controlAngles;if(!(e=Lm(o)))throw new Error("grid center is not provid");if(t.length<2)throw new Error("Invalid grid data");if(c&&0!==c.length)return e=x(e,2),s=e[0],l=e[1],t.map(function(t){var t=x(Pm(t.value,o),2),e=t[0],t=t[1],n=x([e-s,t-l],2),r=n[0],i=n[1],a=[[e,t]];return c.forEach(function(t){var t=lv(t),t=x([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];a.push([r*e-i*t+s,r*t+i*e+l])}),{points:a}});throw new Error("Invalid gridControlAngles")}(c,n,r);t.maybeAppendByClassName(pm.grid,function(){return new Mm({})}).update(m(m({type:i,connect:s,closed:a,center:l},r),{items:e,areaFill:He(o)?c.map(function(t,e){return dv(o,[t,e,c])}):o}))}Object.defineProperty(Im.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Im.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Im.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Im.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Im.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Im.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Im.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},Im.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Im.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},Im.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},Im.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},Im.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},Im.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Im.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var Bm=Im;function Im(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function Rm(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=x(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=x(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function Dm(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),a=i.min,o=i.max,i=i.halfExtents,s=a[0],l=2*i[0],i=2*i[1],a=a[1],c=o[0],o=o[1],u=0,f=0,h=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,y=e.style.textBaseline,u=+e.style.dx,f=+e.style.dy,"center"===p?h=(s+c)/2:"right"!==p&&"end"!==p||(h=c),"middle"===y?d=(a+o)/2:"bottom"!==y&&"baseline"!==y||(d=o)),x(n,4)),c=p[0],y=void 0===c?0:c,o=p[1],n=void 0===o?0:o,c=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(f+=a)-y,u+l+n,f+i+(void 0===c?y:c)),e.setEulerAngles(r),t.rotatedPoints(lv(r),h,d)}function zm(t,a){var o;return k([],x(t.reduce(function(t,e,n){return n&&o&&(n=o,r=e,i=a,n=Dm(new Bm,n,i),Rm(r=Dm(new Bm,r,i),[n[0],n[1],n[2],n[3]])||Rm(r,[n[0],n[1],n[4],n[5]])||Rm(r,[n[4],n[5],n[6],n[7]])||Rm(r,[n[2],n[3],n[6],n[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}var Gm=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};var Wm=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c,u=Gm,f=2,h=t.slice(),d=t.slice(),p=Date.now(),y=Math.min.apply(Math,k([1],x(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==Sm(0,n)[1]&&0!==Sm(0,n)[0]||(n=Kg(t[0]).left,t=Kg(t[i-1]).right,t=Math.abs(t-n)||1,f=Math.max(Math.floor(i*y/t),f)),a&&(s=h.splice(0,1)[0]),o&&(l=h.splice(-1,1)[0],h.reverse());zm((l?k(k([l],x(d),!1),[s],!1):k([s],x(d),!1)).filter(function(t){return ov(t)}),null==e?void 0:e.margin).length;)if((l&&!s&&f%2==0||l&&s)&&h.splice(0,1).forEach(r.hide),d=u(((c=h).forEach(r.show),c),{seq:f}),f++,200<Date.now()-p)return}}],["rotate",function(t,e,n,r){function i(){return zm(t,s).length<1}function a(n){t.forEach(function(t,e){e=Xe(n)?n[e]:n;qe(e)||r.rotate(t,e)})}var o=void 0===(l=e.optionalAngles)?[0,45,90]:l,s=e.margin,l=e.recoverWhenFailed,e=t.map(function(t){return+(uv(t,"rotate")||0)});if(!i()){for(var c=0;c<o.length;c++)if(a(o[c]),i())return;l&&a(e)}}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i,a,o=void 0===(s=e.suffix)?"...":s,s=e.minLength,l=e.maxLength,c=e.step,u=void 0===(e=e.margin)?[0,0,0,0]:e,e=(e=t[0],d=e.style.fontFamily||"sans-serif",g=e.style.fontWeight||"normal",i=e.style.fontStyle||"normal",a=e.style.fontVariant,{fontSize:"object"==typeof(e=e.style.fontSize)?e.value:e,fontFamily:d,fontWeight:g,fontStyle:i,fontVariant:a}),f=Ng(c,e)||1,h=Ng(s,e)||1,d=Ng(l,e),p=(!qe(d)&&d!==1/0||(d=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),Date.now()),y=t.slice(),g=x(u,4),v=(g[0],g[1],g[2],g[3],d);h+f<v;v-=f){var m=function(e){return y.forEach(function(t){r.ellipsis(t,e,o)}),(y=zm(t,u)).length<1||300<Date.now()-p?{value:void 0}:void 0}(v);if("object"==typeof m)return m.value}}]]);function Vm(i,a,o){var t=a.labelTransforms,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e,n=t.type,r=Wm.get(n);e=i,n=n,a.labelTransforms&&("ellipsis"!==n||1<e.map(function(t){return t.querySelector("text")}).length)&&null!=r&&r(i,t,a,o)})}function Hm(t){for(var e=t;e<0;)e+=360;return e%360}var qm=dn(function(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),r=e[0],e=e[1],n=x([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return k(k([],x(t),!1),x(e),!1).join()});function Ym(t,e){return Em(t,e.labelDirection,e)}function Um(t,e,n){var r,i=n.labelAlign,e=uv(e,"rotate");return e?+e%180:(e=0,r=Ym(t.value,n),t=Sm(t.value,n),"horizontal"===i?0:(e="perpendicular"===i?qm([1,0],r):qm([t[0]<0?-1:1,0],t),hv(n=((n=cv(e))+360)%180,-90,90)||(n+=180),n))}function Xm(t,e,n){e.setLocalEulerAngles(+t);t=function(t,e,n){var r=n.type,i=n.labelAlign,t=Ym(t,n),n=Hm(e),e=Hm(cv(qm([1,0],t)));if([90,270].includes(e)&&!n)return"middle";if(!(e%180)&&[90,270].includes(n))return"middle";if("linear"!==r)return"parallel"===i?"middle":hv(n,90,270)?hv(e,90,270)?"start":"end":hv(e,90,270)?"end":"start";if(0===e){if(hv(n,0,90,!1,!0))return"start";if(hv(n,0,90)||hv(n,270,360))return"start"}if(90===e){if(hv(n,0,90,!1,!0))return"start";if(hv(n,90,180)||hv(n,270,360))return"end"}if(270===e){if(hv(n,0,90,!1,!0))return"end";if(hv(n,90,180)||hv(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(hv(n,0,90)||hv(n,270,360))return"end"}return"start"}(e.__data__.value,t,n),n=e.querySelector(".axis-label-item");"text"===(null==n?void 0:n.nodeName)&&E(n).style("textAlign",t)}function Km(t,e,n,r){var i=r.showTick,a=r.tickLength,o=r.tickDirection,s=r.labelDirection,l=dv(r.labelSpacing,[t,e,n]),s=x([Ym(t.value,r),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(s,o)],2),o=x(le([0,0],fe([0,0],s[0],l+(1===s[1]?dv(i?a:0,[t,e,n]):0)),Pm(t.value,r)),2);return{x:o[0],y:o[1]}}function $m(t,e,n,r,i){var a=i.labelFormatter,o=Ym(e.value,i),i=function(){return sv(e.label||"")};return en(a)?i=function(){return sv(a)}:He(a)&&(i=function(){return sv(dv(a,[e,n,r,o]))}),t.append(i).attr("className",pm.labelItem.name)}function Zm(t,e,n,r,i,a){var o=null==(o=r.getElementsByClassName(pm.labelItem.toString()))?void 0:o[0],a=x(Wg(gm(a,[t,e,n])),2),s=a[0],a=a[1],l=a.transform,a=Z(a,["transform"]);"text"===(null==o?void 0:o.nodeName)&&E(o).call(S,m({fontSize:12,fontFamily:"sans-serif",fontWeight:"normal",textBaseline:"middle"},s)),r.attr(m(m({},Km(t,e,n,i)),a)),fv(r,l),Xm(Um(t,r,i),r,i)}function Jm(n){Vm(this.node().childNodes,n,{hide:function(t){t.style.visibility="hidden"},show:function(t){t.style.visibility="visible"},rotate:function(t,e){Xm(+e,t,n)},ellipsis:function(t,e,n){null!=(t=t.querySelector("text"))&&t.attr("wordWrap",!0).attr("wordWrapWidth",e).attr("maxLines",1).attr("textOverflow",n)}})}function Qm(t,e){return Em(t,e.tickDirection,e)}var tb=dn(function(t,e){t=x(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return k(k([],x(t),!1),[e],!1).join()});function eb(t,e,n,r,i){var a=i.tickFormatter,o=Qm(e.value,i),i="line";return a instanceof F.DisplayObject?i=function(){return a}:He(a)&&(i=function(){return dv(a,[e,n,r,o])}),t.append(i).attr("className",pm.tickItem.name)}function nb(t,e,n,r,i,a,o){var s=Qm(t.value,a),l=(u=t,f=e,h=n,s=s,l=(a=a).tickLength,c=(a=x(Pm(u.value,a),2))[0],a=a[1],s=x(tb(s,dv(l,[u,f,h])),2),u=(l=x(s[0],2))[0],f=l[1],h=x(s[1],2),{x:c,y:a,x1:u,x2:h[0],y1:f,y2:h[1]}),s=l.x1,c=l.x2,a=l.y1,u=l.y2,f=l.x,h=l.y,l=x(Wg(gm(o,[t,e,n])),2),o=l[0],t=l[1];"line"===r.node().nodeName&&r.call(S,m({x1:s,x2:c,y1:a,y2:u},o)),i.attr(m({x:f,y:h},t)),S(r,o)}var rb={text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"left-top"},ib=vv({text:"text"},"title");function ab(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}).join(""):2<t.length?t[0]:t}function ob(t,e){var n,r;try{for(var i=be(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],l=o[1];t.node().attr(s)||t.style(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}ve(cb,sb=Qa),cb.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,t=t.inset,a=this.querySelector(ib.text.class);if(!a)return{x:0,y:0,width:+e,height:+n};var a=a.getBBox().height,i=x(Cg(i),3),o=i[0],i=i[2],s=x([0,+n-a],2),l=s[0],s=s[1],r=ab(r);if("i"===r)return{x:0,y:l,width:+e,height:+n};r.includes("t")&&(l=(o=x([a+o,+n-a-o],2))[0],s=o[1]),r.includes("b")&&(s=x([+n-a-i],1)[0]);o=x(Cg(t),4),r=o[0],n=o[1],a=o[2],i=o[3],t=x([i+n,r+a],2);return{x:i,y:l+r,width:+e-t[0],height:s-t[1]}},cb.prototype.render=function(t,e){t.width,t.height,t.position,t.spacing,t.class;var n,r,i,a=Z(t,["width","height","position","spacing","class"]),o=x(Wg(a),2),s=o[0],t=(o[1],t=(o=t).width,l=o.height,o=o.position,n=x([+t/2,+l/2],2),u=(n=x([+n[0],+n[1],"center","middle"],4))[0],r=n[1],i=n[2],n=n[3],(o=ab(o)).includes("l")&&(u=(c=x([0,"start"],2))[0],i=c[1]),o.includes("r")&&(u=(c=x([+t,"end"],2))[0],i=c[1]),o.includes("t")&&(r=(t=x([0,"top"],2))[0],n=t[1]),o.includes("b")&&(r=(c=x([+l,"bottom"],2))[0],n=c[1]),{x:u,y:r,textAlign:i,textBaseline:n}),o=t.x,l=t.y,c=t.textAlign,u=t.textBaseline;a.text?E(e).maybeAppendByClassName(ib.text,"text").call(S,s).call(ob,{x:o,y:l,textAlign:c,textBaseline:u}):e.removeChildren()};var sb,lb=cb;function cb(t){return sb.call(this,Jg({},{style:rb},t=void 0===t?{}:t))||this}function ub(t,e,n){var r,i,a,o,s,t=t.select(pm.mainGroup.class);return t=t,e=e,r=(n=n).titlePosition,n=void 0===(n=n.titleSpacing)?0:n,r=ab(void 0===r?"lb":r),i=(a=t.node().getBBox()).x,a=a.y,o=(t=x(t.node().getBounds().halfExtents,2))[0],t=t[1],s=(e=x(e.node().getBounds().halfExtents,2))[0],e=e[1],i=x([i+o,a+t],2),i=(a=x([i[0],i[1]],2))[0],a=a[1],r.includes("l")&&(i-=o+s+n),r.includes("r")&&(i+=o+s+n),r.includes("t")&&(a-=t+e+n),r.includes("b")&&(a+=t+e+n),{x:i,y:a}}function fb(t,e,n,r){var i,a,o,s;n.title&&(a=(t=x((t=t,i=(a=n).title,a=t.maybeAppendByClassName(pm.title,function(){return sv(i)}),[t,a]),2))[0],t=t[1],a=a,e=e,n=n,o=(r=x(Wg(r=r),2))[0],r=r[1],s=void 0===(s=r.transform)?"":s,r=Z(r,["transform"]),t.call(S,o),e=(o=ub(e,a,n)).x,n=o.y,a.node().attr(r),a.node().setPosition(e,n),fv(t,s))}var hb,db=gv({render:function(n,e){var t=mv(n),r=t.type,i=t.data,a=t.dataThreshold,a=void 0===a?100:a,o=(t.crossSize,t.animation,t.title,t.showTitle),s=(t.titleSpacing,t.truncRange),l=(t.truncShape,t.showLine),c=(t.lineExtension,t.lineArrow,t.lineArrowOffset,t.lineArrowSize,t.showTick),u=(t.tickDirection,t.tickLength,t.tickFilter,t.tickFormatter,t.showLabel),f=(t.labelAlign,t.labelDirection,t.labelSpacing,t.labelFilter,t.labelFormatter,t.labelTransforms,t.showGrid),t=(t.gridFilter,t.gridLength,Z(t,["type","data","dataThreshold","crossSize","animation","title","showTitle","titleSpacing","truncRange","truncShape","showLine","lineExtension","lineArrow","lineArrowOffset","lineArrowSize","showTick","tickDirection","tickLength","tickFilter","tickFormatter","showLabel","labelAlign","labelDirection","labelSpacing","labelFilter","labelFormatter","labelTransforms","showGrid","gridFilter","gridLength"])),r=x(zg("linear"===r?(t.startPos,t.endPos,Z(t,["startPos","endPos"])):(t.angleRange,t.radius,t.center,Z(t,["angleRange","radius","center"])),["title","line","tick","label","grid"]),5),h=r[0],d=r[1],p=r[2],y=r[3],t=r[4],g=function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r}(i,a).filter(function(t){t=t.value;return!(s&&t>s[0]&&t<s[1])}),r=E(e).maybeAppendByClassName(pm.gridGroup,"g"),i=(r.node().removeChildren(),f&&Fm(r,g,n,t),E(e).maybeAppendByClassName(pm.mainGroup,"g")),a=(pv(l,i.maybeAppendByClassName(pm.lineGroup,"g"),function(t){jm(t,n,d)}),i.maybeAppendByClassName(pm.tickGroup,"g")),f=(pv(c,a,function(t){var r,i,a;t=t,i=p,a=vm(g,(r=n).tickFilter),t.selectAll(".axis-tick").data(a).join(function(t){return t.append("g").attr("className",pm.tick.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=eb.apply(void 0,k(k([E(this)],x(t),!1),[a,r],!1));nb.apply(void 0,k(k([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.removeChildren();var n=eb.apply(void 0,k(k([E(this)],x(t),!1),[a,r],!1));nb.apply(void 0,k(k([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.remove()})}),i.maybeAppendByClassName(pm.labelGroup,"g")),r=(pv(u,f,function(t){var e,r,i,a;e=t,i=y,a=vm(g,(r=n).labelFilter),e.selectAll(pm.label.class).data(a).join(function(t){return t.append("g").attr("className",pm.label.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];$m.apply(void 0,k(k([E(this)],x(t),!1),[a,r],!1)),Zm.apply(void 0,k(k([],x(t),!1),[a,this,r,i],!1))}).call(function(){Jm.call(e,r)})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=E(this);n.node().removeChildren(),$m.apply(void 0,k(k([n],x(t),!1),[a,r],!1)),Zm.apply(void 0,k(k([],x(t),!1),[a,this,r,i],!1))}).call(function(){Jm.call(e,r)})},function(t){return t.remove()})}),E(e).maybeAppendByClassName(pm.titleGroup,"g"));pv(o,r,function(t){fb(t,E(e),n,h)})}},m({},Js.style)),pb={pageViews:[],effect:"linear",duration:200,orient:"horizontal",initPage:0,loop:!1,buttonPath:[["M",(Ao=0)-(tl=6),(el=0)-tl],["L",Ao+tl,el],["L",Ao-tl,el+tl],["Z"]],buttonFill:"black",buttonSize:12,buttonCursor:"pointer",formatter:function(t,e){return"".concat(t,"/").concat(e)},pageNumFontSize:12,pageNumFill:"black",pageNumTextAlign:"start",pageNumTextBaseline:"middle",controllerPadding:5,controllerSpacing:5},yb=vv({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),gb=(ve(vb,hb=Qa),Object.defineProperty(vb.prototype,"pageShape",{get:function(){var n,t=this.attributes.pageViews,t=x((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}))[0].map(function(t,e){return n.map(function(t){return t[e]})}).map(function(t){return Math.max.apply(Math,k([],x(t),!1))}),2),e=t[0],t=t[1],r=this.attributes,i=r.pageWidth,r=r.pageHeight;return{pageWidth:void 0===i?e:i,pageHeight:void 0===r?t:r}},enumerable:!1,configurable:!0}),Object.defineProperty(vb.prototype,"currPage",{get:function(){return this._currPage},enumerable:!1,configurable:!0}),Object.defineProperty(vb.prototype,"finished",{get:function(){var t,n=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){n.finishedPromise=null,t(n.currPage)}})),"idle"===this.playState&&null!=(t=this.resolveFinishedPromise)&&t.call(this),this.finishedPromise},enumerable:!1,configurable:!0}),vb.prototype.setVisiblePages=function(n){this.attributes.pageViews.forEach(function(t,e){n.includes(e)?t.attr("visibility","visible"):t.attr("visibility","hidden")})},vb.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orient,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,x("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=x(i.offset,3),o=x(a[0],2),s=o[0],c=o[1],l=x(a[1],2),r=l[0],o=l[1],l=x(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},vb.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.attributes,r=n.formatter,n=n.pageViews;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(yb.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},vb.prototype.getFollowingPageDiff=function(t){var e=this.attributes.orient,n=this.pageShape,r=n.pageWidth,n=n.pageHeight,t=t<this.currPage?-1:1;return"horizontal"===e?[t*r,0]:[0,t*n]},vb.prototype.prepareFollowingPage=function(t){var e=this.attributes.pageViews,n=(this.setVisiblePages([t,this.currPage]),x(this.getFollowingPageDiff(t),2)),r=n[0],n=n[1];e[t].setLocalPosition(r,n)},vb.prototype.renderController=function(t){var e,n,r,i,a=this,o=this.attributes,s=o.controllerSpacing,o=o.pageViews,l=this.pageShape,c=l.pageWidth,l=l.pageHeight;o.length<2||(r=(o=x(zg(this.attributes,["button","pageNum"]),2))[0],o=o[1],i=(r=x(Wg(r),2))[0],r=r[1],e=i.size,i=Z(i,["size"]),n=t.maybeAppendByClassName(yb.prevBtnGroup,"g").call(S,r),this.prevBtnGroup=n.node(),n.maybeAppendByClassName(yb.prevBtn,"path").attr("className","btn"),r=t.maybeAppendByClassName(yb.nextBtnGroup,"g").call(S,r),this.nextBtnGroup=r.node(),r.maybeAppendByClassName(yb.nextBtn,"path").attr("className","btn"),t.selectAll(".btn").call(S,i).each(function(){E(this).style("transformOrigin","center"),xv(E(this).node(),e,!0)}),i=t.maybeAppendByClassName(yb.pageInfoGroup,"g"),this.pageInfoGroup=i.node(),i.maybeAppendByClassName(yb.pageInfo,"text").style("text","").call(S,m(m({},Bg),o)),this.updatePageInfo(),t.node().setLocalPosition(c+s,l/2),n.on("click",function(){a.prev()}),r.on("click",function(){a.next()}))},vb.prototype.goTo=function(e){var n=this,t=this.attributes,r=t.duration,i=t.effect,t=t.pageViews,a=this.currPage,o=this.playState,s=this.finished,l=this.playWindow;return e===a||"idle"!==o||e<0||e>=t.length||(t[a].setLocalPosition(0,0),this.prepareFollowingPage(e),o={duration:r,easing:i,fill:"both"},a=(t=x(this.getFollowingPageDiff(e),2))[0],r=t[1],this.playState="running",Promise.all([l.animate([{transform:"translate(0, 0)"},{transform:"translate(".concat(-a,", ").concat(-r,")")}],o)].map(function(t){return null==t?void 0:t.finished})).then(function(){var t;n._currPage=e,n.playState="idle",n.setVisiblePages([e]),n.updatePageInfo(),null!=(t=n.resolveFinishedPromise)&&t.call(n)})),{finished:s}},vb.prototype.prev=function(){var t=this.attributes,e=t.loop,t=t.pageViews.length,n=this.currPage,e=e?(n-1+t)%t:nn(n-1,0,t);return this.goTo(e)},vb.prototype.next=function(){var t=this.attributes,e=t.loop,t=t.pageViews.length,n=this.currPage,e=e?(n+1)%t:nn(n+1,0,t);return this.goTo(e)},vb.prototype.render=function(t,e){var n=this,r=t.pageViews,t=t.initPage,i=(this.clipPath=E(e).maybeAppendByClassName(yb.clipPath,function(){return new F.Rect({style:{x:0,y:0,width:0,height:0}})}),E(e).maybeAppendByClassName(yb.contentGroup,"g").style("x",0).style("y",0).style("clipPath",this.clipPath.node())),i=(this.clipPath.style("width",this.pageShape.pageWidth).style("height",this.pageShape.pageHeight),this.playWindow=i.maybeAppendByClassName(yb.playWindow,"g").node(),this.playWindow.removeChildren(),r.forEach(function(t){return n.playWindow.appendChild(t)}),this.setVisiblePages([t]),E(e).maybeAppendByClassName(yb.controller,"g"));this.renderController(i),this.goTo(t)},vb);function vb(t){t=hb.call(this,Jg({},{style:pb},t))||this;return t._currPage=0,t.finishedPromise=null,t.resolveFinishedPromise=null,t.playState="idle",t}function mb(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}Av.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),Av.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),Av.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});var bb,xb=vv({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),kb={span:[1,1],marker:"path",markerD:Mv(6,6,6),markerFill:"#d3d2d3",markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelFontFamily:"sans-serif",valueFontFamily:"sans-serif",labelTextAlign:"start",valueTextAlign:"start",labelTextBaseline:"middle",valueTextBaseline:"middle"},wb=(ve(Mb,bb=Qa),Object.defineProperty(Mb.prototype,"showValue",{get:function(){var t=this.attributes.value;return!!t&&(en(t)||rn(t)?""!==t:""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(Mb.prototype,"actualSpace",{get:function(){var t=this.markerGroup,e=this.labelGroup,n=this.valueGroup,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height,n=n.node().getBBox(),a=n.width,n=n.height;return{markerWidth:r,labelWidth:i,valueWidth:a,height:Math.max(t,e,n)}},enumerable:!1,configurable:!0}),Object.defineProperty(Mb.prototype,"span",{get:function(){var t,e=this.attributes;return"span"in e?(t=(e=x(Cg(e.span),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(Mb.prototype,"shape",{get:function(){var t=this.attributes,e=t.markerSize,t=t.width,n=this.actualSpace,r=n.markerWidth,n=n.height,i=this.actualSpace,a=i.labelWidth,i=i.valueWidth,o=x(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=x(this.span,2),a=(e=x([e[0]*t,e[1]*t],2))[0],i=e[1]),{width:r+a+i+s+o,height:n,markerWidth:r,labelWidth:a,valueWidth:i}},enumerable:!1,configurable:!0}),Object.defineProperty(Mb.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=x(Cg(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(Mb.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=x(this.spacing,2),o=a[0];return{height:t,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+o,e+n+o+a[1]]}},enumerable:!1,configurable:!0}),Mb.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=Dg(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(xb.markerGroup,"g"),pv(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(xb.marker,r).call(S,m({anchor:"0.5 0.5"},a)),xv(e.markerGroup.node(),i,!0)})},Mb.prototype.renderLabel=function(t){var e=this.attributes.label,n=Dg(this.attributes,"label");this.labelGroup=t.maybeAppendByClassName(xb.labelGroup,"g"),this.labelGroup.maybeAppendByClassName(xb.label,function(){return sv(e)}).call(S,n)},Mb.prototype.renderValue=function(t){var e=this,n=this.attributes.value,r=Dg(this.attributes,"value");this.valueGroup=t.maybeAppendByClassName(xb.valueGroup,"g"),pv(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(xb.value,function(){return sv(n)}).call(S,r)})},Mb.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=Dg(this.attributes,"background");this.background=t.maybeAppendByClassName(xb.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(xb.background,"rect").call(S,m({width:n,height:e},r))},Mb.prototype.adjustLayout=function(){var t=this.layout,e=(t.markerWidth,t.labelWidth),n=t.valueWidth,r=(t.width,t.height),t=x(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.call(S,{x:i,y:r}),this.labelGroup.call(S,{x:a,y:r}),bv(this.labelGroup.select(xb.label.class),e),this.showValue&&(this.valueGroup.call(S,{x:t,y:r}),bv(this.valueGroup.select(xb.value.class),n))},Mb.prototype.render=function(t,e){e=E(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},Mb);function Mb(t){return bb.call(this,Jg({},{style:kb},t))||this}function Ob(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var _b,Sb=vv({itemPage:"item-page",navigator:"navigator",pageView:"page-view",item:"item"},"items"),Eb={data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orient:"horizontal",click:xn,mouseenter:xn,mouseleave:xn},Ab=(ve(Tb,_b=Qa),Object.defineProperty(Tb.prototype,"attrs",{get:function(){return mv(this.attributes)},enumerable:!1,configurable:!0}),Object.defineProperty(Tb.prototype,"grid",{get:function(){var t=this.attrs,e=t.gridRow,n=t.gridCol,t=t.data;if(e||n)return e&&n?[e,n]:e?[e,t.length]:[t.length,n];throw new Error("gridRow and gridCol can not be set null at the same time")},enumerable:!1,configurable:!0}),Object.defineProperty(Tb.prototype,"renderData",{get:function(){var t=this.attrs,a=t.data,o=t.layout,s=Dg(this.attrs,"item");return a.map(function(e,n){var t=e.id,r=e.label,i=e.value;return{id:"".concat(void 0===t?n:t),index:n,style:m({layout:o,label:r,value:i},Object.fromEntries(Object.entries(s).map(function(t){t=x(t,2);return[t[0],dv(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),Tb.prototype.getGridLayout=function(){var u=this,t=this.attrs,f=t.orient,h=t.width,d=t.rowPadding,p=t.colPadding,y=x(this.navigatorShape,1)[0],t=x(this.grid,2),g=t[0],v=t[1],m=v*g,b=0;return this.itemsCache.children.map(function(t,e){var n,r=Math.floor(e/m),i=e%m,a=u.ifHorizontal(v,g),a=[Math.floor(i/a),i%a],a=("vertical"===f&&a.reverse(),x(a,2)),o=a[0],a=a[1],s=(h-y-(v-1)*p)/v,t=t.getBBox().height,l=x([0,0],2),c=l[0],l=l[1];return b="horizontal"===f?(c=(n=x([b,o*(t+d)],2))[0],l=n[1],a===v-1?0:b+s+p):(c=(n=x([a*(s+p),b],2))[0],l=n[1],o===g-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},Tb.prototype.getFlexLayout=function(){var t=this.attrs,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=x(this.navigatorShape,1)[0],r=x(this.grid,2),s=r[0],l=r[1],r=x([e-t,n],2),c=r[0],u=r[1],e=x([0,0,0,0,0,0,0,0],8),f=e[0],h=e[1],d=e[2],p=e[3],y=e[4],g=e[5],v=e[6],m=e[7];return this.itemsCache.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===v?0:o,i=v+r+n;return i<=c&&Ob(y,function(t){return t<l})?(r=x([v+r,m,i],3),f=r[0],h=r[1],v=r[2]):(i=x([g+1,0,0,m+t+a],4),g=i[0],y=i[1],v=i[2],(m=i[3])+a+t<=u&&Ob(g,function(t){return t<s})?(r=x([v,m,n],3),f=r[0],h=r[1],v=r[2]):(i=x([0,0,n,0,d+1,0,0,0],8),f=i[0],h=i[1],v=i[2],m=i[3],d=i[4],p=i[5],g=i[6],y=i[7])),{width:n,height:t,x:f,y:h,page:d,index:e,pageIndex:p++,row:g,col:y++}})},Object.defineProperty(Tb.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return 0<e.slice(-1)[0].page?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),Tb.prototype.ifHorizontal=function(t,e){return mb(this.attrs.orient,t,e)},Tb.prototype.renderItems=function(){var t=this.attrs,e=t.click,n=t.mouseenter,r=t.mouseleave,i=(this.items=[],this.itemsCache.removeChildren(),this.items);E(this.itemsCache).selectAll(Sb.itemPage.class).data(this.renderData).join(function(t){return t.append(function(t){t=t.style,t=new wb({style:t});return i.push(t),t}).attr("className",Sb.item.name).on("click",function(){null!=e&&e(this)}).on("mouseenter",function(){null!=n&&n(this)}).on("mouseleave",function(){null!=r&&r(this)})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()}),this.appendChild(this.itemsCache).style.visibility="hidden"},Tb.prototype.adjustLayout=function(){var n,u=this.items,t=this.itemsLayout;E(this.pageViews).selectAll(Sb.itemPage.class).data(Object.entries((n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=x(t,2);return{page:t[0],items:t[1]}})).join(function(t){return t.append("g").attr("className",Sb.itemPage.name).each(function(t){var c=this;t.items.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=c.appendChild(u[o]);n=t,r=o,(i=en(t="__data__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(Ke(r[t])||(r[t]=rn(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})})},function(t){return t},function(t){return t.remove()}),this.removeChild(this.itemsCache)},Tb.prototype.renderNavigator=function(t){var e=this.attrs,n=e.orient,r=e.layout,e=e.width,i=x(this.navigatorShape,2),a=i[0],i=i[1],o=Dg(this.attrs,"nav"),s=(null==(s=this.pageViews.children[0])?void 0:s.getBBox().height)||0,r="grid"===r?{pageWidth:e-a,pageHeight:s-i}:{},l=m(m(m({},o),r),{orient:n,pageViews:this.pageViews.children});t.maybeAppendByClassName(Sb.navigator,function(){return new gb({style:l})}).update(o)},Tb.prototype.render=function(t,e){e=E(e);this.renderItems(),this.adjustLayout(),this.renderNavigator(e)},Tb);function Tb(t){t=_b.call(this,Jg({},{style:Eb},t))||this;return t.items=[],t.itemsCache=new F.Group,t.pageViews=new F.Group({className:Sb.pageView.name}),t.navigatorShape=[0,0],t}var Pb,ol={style:{padding:0,orient:"horizontal",backgroundFill:"transparent",titleText:"",showTitle:!0,titleSpacing:4,titlePosition:"left-top",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12}},Nb=kn({},ol,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),jb=kn({},ol,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],slidable:!0,showHandle:!0,showLabel:!0,showIndicator:!0,labelSpacing:5,indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorBackgroundFill:"#262626"}}),Lb=vv({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),Cb=(ve(Fb,Pb=Qa),Fb.prototype.renderTitle=function(t,e,n){var r=this.attributes.showTitle,i=x(Wg(Dg(this.attributes,"title")),2),a=i[0],i=i[1];this.titleGroup=t.maybeAppendByClassName(Lb.titleGroup,"g").call(S,i),pv(!!r,this.titleGroup,function(t){t.maybeAppendByClassName(Lb.title,function(){return new lb({style:m({width:e,height:n},a)})}).update(a)})},Fb.prototype.renderItems=function(t,e,n){var r=this,i=x(zg(this.attributes,["title"]),2),i=x(Wg(i[1]),2),a=i[0],i=i[1],o=m(m({},a),{width:e,height:n});this.itemsGroup=t.maybeAppendByClassName(Lb.itemsGroup,"g").call(S,i),this.itemsGroup.maybeAppendByClassName(Lb.items,function(){return new Ab({style:o})}).update(i),Object.entries(o).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];return r.itemsGroup.attr(e,t)})},Fb.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.titleGroup.select(Lb.title.class).node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(Fb.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?[(e=this.titleGroup.select(Lb.title.class).node().getAvailableSpace()).width,e.height]:[n,t]},enumerable:!1,configurable:!0}),Fb.prototype.render=function(t,e){var n=t.width,t=t.height,e=E(e);this.renderTitle(e,n,t),this.renderItems.apply(this,k([e],x(this.availableSpace),!1)),this.adjustLayout()},Fb);function Fb(t){return Pb.call(this,Jg({},Nb,t))||this}var Bb,Ib={formatter:function(t){return t},padding:[2,4],position:"right",labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",backgroundZIndex:-1,backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333"},Rb=vv({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Db=(ve(zb,Bb=Qa),zb.prototype.renderBackground=function(){var t=this.style,e=t.position,t=x(Cg(t.padding),4),n=t[0],r=t[1],i=t[2],t=t[3],a=this.label.node().getLocalBounds(),o=a.min,a=a.max,t=[[o[0]-t,o[1]-n],[a[0]+r,a[1]+i]],o=this.getPath(e,t),n=Dg(this.attributes,"background");this.background=E(this.group).maybeAppendByClassName(Rb.background,"path").call(S,n).style("path",o),this.group.appendChild(this.label.node())},zb.prototype.renderLabel=function(){var t=this.attributes,e=t.value,n=t.formatter,t=x(Wg(Dg(this.attributes,"label")),2),r=t[0],t=t[1];this.label=E(this.group).maybeAppendByClassName(Rb.labelGroup,"g").call(S,t),e&&this.label.maybeAppendByClassName(Rb.label,function(){return sv(n(e))}).style("text",n(e).toString()).selectAll("text").call(S,m(m({},Bg),r))},zb.prototype.adjustLayout=function(){var t=x(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},zb.prototype.getPath=function(n,t){var r=this,t=x(t,2),e=x(t[0],2),i=e[0],e=e[1],t=x(t[1],2),a=t[0],t=t[1],o={top:"bottom",right:"left",bottom:"top",left:"right"},a=Object.entries({top:[[i,e],[a,e]],right:[[a,e],[a,t]],bottom:[[a,t],[i,t]],left:[[i,t],[i,e]]}).map(function(t){var t=x(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[k(["M"],x(t[0]),!1),k(["L"],x(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},zb.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=x(t,2))[0],t=t[1],r=(e=x(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,k([],x(t),!1)),t=x(t,2),r=x(t[0],2),i=r[0],r=r[1],t=x(t[1],2),a=t[0],t=t[1],a=x(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=x(a[1],2),o=a[0],a=a[1],s=t/2,e=e*(t/Math.abs(t)),t=e/2,e=e*Math.sqrt(3)/2*.8,o=x([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},zb.prototype.bindEvents=function(){this.label.on(F.ElementEvent.BOUNDS_CHANGED,this.renderBackground)},zb.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},zb);function zb(t){void 0===t&&(t={});t=Bb.call(this,Jg({},{style:m({visibility:"hidden"},Ib)},t))||this;return t.point=[0,0],t.group=t.appendChild(new F.Group({})),t}var Gb=vv({marker:"marker",labelGroup:"labelGroup",label:"label"},"handle"),Wb=gv({render:function(t,e){var a,o=t.orient,n=t.visibility,r=t.spacing,s=void 0===r?0:r,r=t.showLabel,l=t.formatter,i=t.markerSymbol,i=void 0===i?mb(o,"horizontalHandle","verticalHandle"):i,t=x(zg(t,["label","marker"]),2),c=t[0],t=t[1],u=c.text,f=Z(c,["text"]);i&&"hidden"!==n?(c=m({symbol:i},t),a=E(e).maybeAppend(Gb.marker.name,function(){return new Av({})}).update(c),pv(r,E(e).maybeAppendByClassName(Gb.labelGroup,"g"),function(t){var t=t.maybeAppendByClassName(Gb.label,"text").call(S,m({text:l(u).toString()},f)),e=a.node().getBBox(),n=e.width,e=e.height,e=x(mb(o,[0,e+s,"center","top"],[n+s,0,"start","middle"]),4),n=e[0],r=e[1],i=e[2],e=e[3];t.node().setLocalPosition(n,r),t.style("textAlign",i).style("textBaseline",e)})):(null!=(n=e.querySelector(Gb.marker.class))&&n.remove(),null!=(i=e.querySelector(Gb.label.class))&&i.remove())}},m({},{markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orient:"vertical",spacing:0,showLabel:!0,formatter:function(t){return t.toString()}}));function Vb(t,e){var t=x(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}var Hb=vv({backgroundGroup:"background-group",background:"background",ribbonGroup:"ribbon-group",ribbon:"ribbon",clipPath:"clip-path"},"ribbon");function qb(t){var e=t.orient,n=t.size,t=t.len;return mb(e,[t,n],[n,t])}function Yb(t){var e=t.type,t=x(qb(t),2),n=t[0],t=t[1];return"size"===e?[["M",0,t],["L",0+n,0],["L",0+n,t],["Z"]]:[["M",0,t],["L",0,0],["L",0+n,0],["L",0+n,t],["Z"]]}function Ub(t){var e,n,i,a,r=t.orient,o=t.color,s=t.block,t=t.blocks,l=(e=He(o)?new Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length;return l?s?(s=t,t=e,n=r,i=Array.from(t),a=s+1,new Array(a).fill(0).reduce(function(t,e,n){var r=i[n%i.length];return t+" ".concat(n/(a-1),":").concat(r).concat(n<a-1?" ".concat((n+1)/(a-1),":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):e.reduce(function(t,e,n){return t+" ".concat(n/(l-1),":").concat(e)},"l(".concat(mb(r,"0","270"),")")):""}function Xb(t,e,n){var r,i,a,o=Ub(e),t=t.maybeAppendByClassName(Hb.ribbon,"path").call(S,m({path:Yb(e),fill:o},n)),n=t.maybeAppendByClassName(Hb.clipPath,"path").call(S,{path:(n=(o=e).orient,(e=o.range)?(i=(o=x(qb(o),2))[0],o=o[1],r=(e=x(e,2))[0],e=e[1],a=mb(n,r*i,0),r=mb(n,0,r*o),i=mb(n,e*i,i),[["M",a,r],["L",a,a=mb(n,o,e*o)],["L",i,a],["L",i,r],["Z"]]):[])}).node();t.style("clip-path",n)}var Kb,$b,Zb,Jb,Qb=gv({render:function(t,e){var n,r=x(zg(t,["ribbon","background"]),2),i=r[0],r=r[1],a=E(e).maybeAppendByClassName(Hb.backgroundGroup,"g");n=t,r=r,a.maybeAppendByClassName(Hb.background,"path").call(S,m({path:Yb(n)},r)),Xb(E(e).maybeAppendByClassName(Hb.ribbonGroup,"g"),t,i)}},m({},{type:"color",orient:"horizontal",size:30,range:[0,1],len:200,block:!1,blocks:0,color:["#fff","#000"],backgroundFill:"#e5e5e5"})),t2=dn(function(t){return{min:Math.min.apply(Math,k([],x(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,k([],x(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),e2=(ve(n2,Kb=Qa),n2.prototype.render=function(t,e){var n=this,r=(t.data,t.width),i=t.height,a=(t.orient,t.defaultValue,t.color,t.block,t.type,t.slidable,t.step,t.showTitle),o=(t.showHandle,t.showLabel),t=(t.showIndicator,x(zg(mv(t),["title","label","indicator","ribbon","handle"]),5)),s=t[0],l=(t[1],t[2]),c=t[3],t=(t[4],E(e).maybeAppendByClassName(Lb.title,function(){return new lb({style:m({width:r,height:i},s)})})),a=(pv(a,E(e),function(t){}),t.node().getAvailableSpace()),t=a.x,u=a.y,a=(a.width,a.height,E(e).maybeAppendByClassName(Lb.contentGroup,"g").call(S,{x:t,y:u})),f=a.maybeAppendByClassName(Lb.ribbonGroup,"g");this.renderRibbon(f,c),this.handlesGroup=f.maybeAppendByClassName(Lb.handlesGroup,"g"),this.renderHandles(),this.renderIndicator(a,l),pv(o,E(e).maybeAppendByClassName(Lb.labelGroup,"g").call(S,{x:t,y:u}),function(t){n.renderLabel(t)})},Object.defineProperty(n2.prototype,"range",{get:function(){var t=this.attributes.data;return t2(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n2.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this._ribbonScale.update({domain:[e,t],range:[0,1]}),this._ribbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(n2.prototype,"ribbonRange",{get:function(){var t=x(this.selection,2),e=t[0],t=t[1],n=this.ribbonScale;return[n.map(e),n.map(t)]},enumerable:!1,configurable:!0}),Object.defineProperty(n2.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=x(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),n2.prototype.ifHorizontal=function(t,e){return mb(this.style.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},n2.prototype.renderRibbon=function(t,e){var n=this.attributes,r=n.type,i=n.orient,a=n.color,o=n.block,n=n.data;this.ribbon=t.maybeAppendByClassName(Lb.ribbon,function(){return new Qb({})}).update(m({type:r,orient:i,color:a,block:o,blocks:n.length-1,range:this.ribbonRange},e))},n2.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,t=t.slidable,n=x(this.selection,2),r=n[0],n=n[1];this.startHandle=this.renderHandle("start",r),this.endHandle=this.renderHandle("end",n),e&&t?this.handlesGroup.style("visibility","visible"):this.handlesGroup.style("visibility","hidden")},n2.prototype.renderHandle=function(t,e){var n=this.attributes.orient,r=Dg(this.attributes,"handle"),r=(r.formatter,Z(r,["formatter"])),n=this.handlesGroup.maybeAppendByClassName(Lb.prefix("".concat(t,"-handle")),function(){return new Wb({})}).call(S,m({orient:n,labelText:e},r));return this.setHandlePosition(t,e),n},n2.prototype.setHandlePosition=function(t,e){var n=this.attributes,r=n.ribbonSize,n=n.handleFormatter,e=this.getOffset(e),r=x(this.ifHorizontal([e,.7*r],[r/2,e]),2),e=r[0],r=r[1],t=this.handlesGroup.select(".".concat(Lb.prefix("".concat(t,"-handle")))).node(),n=(null!=t&&t.attr("formatter",n),x(t.getLocalPosition(),2)),i=n[0],n=n[1];Math.abs(e+r-i-n)<100?null!=t&&t.setLocalPosition(e,r):null!=t&&t.animate([{transform:"translate(".concat(t.getLocalPosition().slice(0,2).join(","),")")},{transform:"translate(".concat(e,", ").concat(r,")")}],{duration:200,fill:"both"})},n2.prototype.renderIndicator=function(t,e){this.indicator=t.maybeAppendByClassName(Lb.indicator,function(){return new Db({style:e})}).update(e)},Object.defineProperty(n2.prototype,"labelData",{get:function(){var o=this,t=this.attributes,e=t.data,s=t.labelAlign;return e.reduce(function(t,e,n,r){var i,a=null!=(a=null==e?void 0:e.id)?a:n.toString();return"value"===s?t.push(m(m({},e),{id:a,label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:o.ribbonScale.map(e.value)})):n<r.length-1&&(i=r[n+1],r=((n=(r=x([e.value,i.value],2))[0])+(i=r[1]))/2,t.push(m(m({},e),{id:a,range:[n,i],label:[n,i].join("~"),value:o.ribbonScale.map(r)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(n2.prototype,"labelStyle",{get:function(){var t=this.attributes,e=t.orient,t=t.labelDirection,t=void 0===t?"positive":t,n=x(["center","middle"],2),r=n[0],n=n[1];return"horizontal"===e?n="positive"===t?"top":"bottom":r="positive"===t?"end":"start",{labelTextAlign:r,labelTextBaseline:n}},enumerable:!1,configurable:!0}),n2.prototype.renderLabel=function(t){var e=this.attributes,n=e.ribbonSize,e=e.ribbonLen,r=Dg(this.attributes,"label"),i=r.spacing,a=(r.align,r.formatter),o=r.filter,r=Z(r,["spacing","align","formatter","filter"]),e=x(this.ifHorizontal([[0,n/2],[e,n/2]],[[n/2,0],[n/2,e]]),2),s=e[0],e=e[1],l=m(m({type:"linear",startPos:s,endPos:e,data:this.labelData,showLine:!1,showGrid:!1,showTick:!1,labelSpacing:i+n/2,labelTransform:"rotate(0)"},this.labelStyle),Object.fromEntries(Object.entries(r).map(function(t){var t=x(t,2),e=t[0],t=t[1];return["label".concat((e=e).charAt(0).toUpperCase()+e.slice(1)),t]}))),s=t.maybeAppendByClassName(Lb.label,function(){return new db({style:l})}).call(S,l).node();s.attr("labelFormatter",a),s.attr("labelFilter",o)},n2.prototype.bindEvents=function(){var n=this,t=new Map;t.set("ribbon",this.ribbon),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){null!=t&&t.on("mousedown",n.onDragStart(e)),null!=t&&t.on("touchstart",n.onDragStart(e))}),null!=(t=this.startHandle)&&t.on("mouseover",function(){return n.updateMouse()}),null!=(t=this.endHandle)&&t.on("mouseover",function(){return n.updateMouse()}),this.ribbon.on("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},n2.prototype.showIndicator=function(t,e){void 0===e&&(e="".concat(t));var n,r=this.attributes,i=r.orient;r.showIndicator&&"number"==typeof t?(n=(r=this.range).min,r=r.max,t=nn(t,n,r),n=[this.getOffset(t),0],"vertical"===i&&n.reverse(),this.indicator.update({visibility:"visible",position:this.ifHorizontal("top","left"),value:e}),(r=this.indicator.node()).setLocalPosition.apply(r,k([],x(n),!1))):this.hideIndicator()},n2.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.style("visibility","hidden")},n2.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},n2.prototype.setSelection=function(t,e){this.updateSelection(t,e)},n2.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=x(this.selection,2),c=l[0],l=l[1],t=x([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=x((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=x(n,2))[0],n=n[1],a=(c=x(c,2))[0],c=c[1],o=(l=x(l,2))[0],l=l[1],c=(a=x([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=x([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[Lg(c,r),Lg(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(n2.prototype,"step",{get:function(){var t=this.attributes.step,t=void 0===t?1:t,e=this.range,n=e.min,e=e.max;return ln(t)?Lg(.01*(e-n),0):t},enumerable:!1,configurable:!0}),n2.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?Vb(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},n2.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=x(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,k([],x(Vg(t)),!1));return nn(this.getOffset(i-a,!0)+r,r,n)},n2.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.attributes.ribbonLen,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},n2.prototype.dispatchSelection=function(){var t=new F.CustomEvent("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},n2.prototype.dispatchIndicated=function(t,e){t=new F.CustomEvent("indicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([iv(100)],n2.prototype,"dispatchSelection",null),t([iv(100)],n2.prototype,"dispatchIndicated",null),n2);function n2(t){var a=Kb.call(this,Jg({},jb,t))||this;return a.eventToOffsetScale=new V0({}),a._ribbonScale=new V0({}),a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=Vb(n.map(function(t){return t.value}),t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(n=a.getTickValue(t),a.showIndicator(n),a.dispatchIndicated(n))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.attributes.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseleave",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),x(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"ribbon"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a.onDragEnd=function(){a.style.cursor="default",document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a}function r2(t){$b||($b=document.createElement("table"),Jb=document.createElement("tr"),Zb=/^\s*<(\w+|!)[^>]*>/,Jb={tr:document.createElement("tbody"),tbody:$b,thead:$b,tfoot:$b,td:Jb,th:Jb,"*":document.createElement("div")});var e=Zb.test(t)&&RegExp.$1,e=(e&&e in Jb||(e="*"),Jb[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var i2,Ys="tooltip",a2="tooltip-title",o2="tooltip-list",Zs="tooltip-list-item",Bs="tooltip-list-item-name",$s="tooltip-list-item-marker",s2="tooltip-list-item-name-label",Ks="tooltip-list-item-value",Au="tooltip-crosshair-x",e="tooltip-crosshair-y",to={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},r=((n={})[".".concat(Ys)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},n[".".concat(a2)]={color:"rgba(0, 0, 0, 0.45)"},n[".".concat(o2)]={margin:"0px","list-style-type":"none",padding:"0px"},n[".".concat(Zs)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},n[".".concat($s)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},n[".".concat(Bs)]={display:"flex","align-items":"center","max-width":"216px"},n[".".concat(s2)]=m({flex:1},to),n[".".concat(Ks)]=m({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},to),n[".".concat(Au)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},n[".".concat(e)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},n),l2=(ve(c2,i2=Qa),Object.defineProperty(c2.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty(c2.prototype,"position",{set:function(t){var t=x(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(c2.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(c2.prototype,"items",{get:function(){var t=this.attributes.items;return this.sort(this.filter(t.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,a=t.index,t=Z(t,["name","value","color","index"]);return m({name:n,value:r,color:i,index:void 0===a?e:a},t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(c2.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(r2((n=t,(t=e)&&n?t.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):t)))}),r},enumerable:!1,configurable:!0}),Object.defineProperty(c2.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return en(t)?Zg(t):cn(t)?t:He(t)?Zg(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),c2.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},c2.prototype.update=function(t){this.attr(kn({},this.attributes,t)),this.render(this.attributes,this)},c2.prototype.clear=function(){this.element.innerHTML=""},c2.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},c2.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},c2.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},c2.prototype.initShape=function(){var t=this.attributes.template.container;this.element=r2(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},c2.prototype.updateHTMLTooltipElement=function(){var e,r,t=this.attributes.title,n=this.element,i=this.customContent,t=(this.clear(),i?n.appendChild(i):(i=this.attributes.template.title,n.innerHTML=i,n.getElementsByClassName(a2)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=o2,i.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=n,Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],n=t[1];k([r],x(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},c2.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,e=x(e.offset,2),i=e[0],a=e[1],e=(t||n).split("-"),o={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,s=t.width,l=t.height,c=[-s/2,-l/2];return e.forEach(function(t){var e=x(c,2),n=e[0],e=e[1],t=x(o[t],2),r=t[0],t=t[1];c=[n+(s/2+i)*r,e+(l/2+a)*t]}),c},c2.prototype.setOffsetPosition=function(t){var t=x(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat(r+a+e,"px"),this.element.style.top="".concat(i+n+t,"px")},c2.prototype.updatePosition=function(){this.throttleUpdatePosition()},c2.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=x(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,f=c.y,h=c.autoPosition,c=c.bounding;return h?(e=(h=this.element).offsetWidth,h=h.offsetHeight,f=(u=x([u+l,f+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,a={left:f<s,right:s+c.width<f+e,top:u<i,bottom:i+c.height<u+h},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},c2.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},c2.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},c2.tag="tooltip",c2.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],throttleFrequency:50,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(Ys,'"></div>'),title:'<div class="'.concat(a2,'"></div>'),item:'<li class="'.concat(Zs,'" data-index={index}>\n <span class="').concat(Bs,'">\n <span class="').concat($s,'" style="background:{color}"></span>\n <span class="').concat(s2,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(Ks,'" title="{value}">{value}</span>\n </li>')},style:r}},c2);function c2(t){var e=i2.call(this,kn({},c2.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=bn(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}var u2,f2={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function h2(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function d2(t){return u2.call(this,kn({},d2.defaultOptions,t))||this}ve(d2,u2=Qa),d2.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=Ug(e,".switch-content","g").attr("className","switch-content").node(),l=e.getLocalBounds(),n=vn(f2,n,f2.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&Ug(e,".switch-tag",function(){return new Nv({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(kn({cursor:f,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=m(m({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),Ug(e,".switch-background","rect").attr("className","switch-background").style("zIndex",(e.style.zIndex||0)-1).style("x",l.min[0]).style("y",l.min[1]).style("fill",n).style("cursor",f).style("fillOpacity",r?.4:1).call(S,h).node()),y=Ug(e,".switch-background-stroke","rect").attr("className","switch-background-stroke").style("zIndex",(e.style.zIndex||0)-2).style("x",l.min[0]).style("y",l.min[1]).style("stroke",n).style("lineWidth",0).call(S,h).node();Ug(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",f).call(function(t){var e,t=t.node(),n=h2(p,a,o),r=h2(p,a,!o);t.attr("x")&&!wn(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=y.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),y.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},d2.defaultOptions={type:d2.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var p2,y2,g2,v2,Us={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},qa=Jg({},Us,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),a=Jg({},Us,{type:"circle",defaultRadius:0}),$a=Jg({},Us,{type:"polygon",defaultRadius:0,startAngle:0}),Za=(ve(m2,p2=Qa),Object.defineProperty(m2.prototype,"localPointer",{get:function(){var t=x(this.getPosition(),2),e=t[0],t=t[1],n=x(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(m2.prototype,"tagCfg",{get:function(){var t=Dg(this.attributes,"tag");return t.position,Z(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(m2.prototype,"crosshairCfg",{get:function(){var t=Dg(this.attributes,"line");return m(m({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),m2.prototype.render=function(t,e){var n=this,e=Ug(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=Ug(e,".crosshair-tag",function(){return new Nv({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=Ug(e,".crosshair-path","path").attr("className","crosshair-path").call(S,this.crosshairCfg).node(),this.adjustLayout()},m2.prototype.update=function(t){this.attr(kn({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},m2.prototype.setPointer=function(t){this.pointer=t},m2.tag="crosshair-base",m2.defaultOptions={style:Us},m2);function m2(t){return p2.call(this,kn({},m2.defaultOptions,t))||this}function b2(t){return y2.call(this,Jg({},b2.defaultOptions,t))||this}function x2(t){return g2.call(this,Jg({},x2.defaultOptions,t))||this}function k2(t){return v2.call(this,Jg({},k2.defaultOptions,t))||this}ve(b2,y2=Za),Object.defineProperty(b2.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=x(t.startPos,2),n=e[0],e=e[1],t=x(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(b2.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=x(this.getPosition(),2))[0],e=e[1],[(n=x(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(b2.prototype,"isVertical",{get:function(){var t=this.attributes,e=x(t.startPos,2),n=e[0],e=e[1],t=x(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(b2.prototype,"tagShapeSpace",{get:function(){var t=Xg(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),b2.prototype.update=function(t){y2.prototype.update.call(this,t)},b2.prototype.setPointer=function(t){y2.prototype.setPointer.call(this,t),this.adjustPosition()},b2.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},b2.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},b2.prototype.adjustPosition=function(){var t=x(this.localPointer,2),e=t[0],t=t[1],n=x(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},b2.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=x(e.startPos,2),a=i[0],i=i[1],e=x(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(this.tagShape.show(),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=x(this.getOrientVal({start:[-t/2,n/2],end:[o-a+t/2,n/2]},{start:[0,0],end:[0,e-i+n]})[r],2))[0],t=o[1],this.tagShape.setLocalPosition(a,t)):this.tagShape.hide()},b2.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},b2.tag="line-crosshair",b2.defaultOptions={style:qa},t([iv(20)],b2.prototype,"setPointer",null),ve(x2,g2=Za),Object.defineProperty(x2.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),x2.prototype.update=function(t){g2.prototype.update.call(this,t)},x2.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(g2.prototype.setPointer.call(this,[e,t]),x(this.localPointer,2)),t=e[0],e=e[1],n=x(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},x2.prototype.adjustLayout=function(){this.tagShape.hide()},x2.prototype.createCirclePath=function(t){var e=this.attributes,n=x(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return Mv(r,n,t||e)},x2.tag="circle-crosshair",x2.defaultOptions={style:a},t([iv(20)],x2.prototype,"setPointer",null),ve(k2,v2=Za),Object.defineProperty(k2.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),k2.prototype.update=function(t){v2.prototype.update.call(this,t)},Object.defineProperty(k2.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*h,a=i=void 0,i=e[0]-n[0],e=e[1]-n[1],a=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*a+n[0],t[1]=i*a+e*r+n[1],t));return f},enumerable:!1,configurable:!0}),k2.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(v2.prototype.setPointer.call(this,[e,t]),x(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=x(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=rv(n,[t,e])/rv(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},k2.prototype.adjustLayout=function(){this.tagShape.hide()},k2.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=x(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=x(t,2),t=x(fe([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},k2.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=x(t,2),c=t[0],u=t[1],f=this.points,t=x(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var y=x(f[p-1],2),g=y[0],y=y[1],v=x(f[p%f.length],2),m=v[0],v=v[1],g=(i=[h,d],g=[g+h,y+d],y=[m+h,v+d],l=s=o=a=v=m=void 0,v=(r=x(r=[c,u],2))[0],r=r[1],a=(i=x(i,2))[0],i=i[1],o=(g=x(g,2))[0],g=g[1],s=(y=x(y,2))[0],y=y[1],l=[],(y-g)*(a-v)==(i-r)*(s-o)?(i-r)*(o-v)==(g-r)*(a-v)&&(ev(v,a,r,i,o,g)&&nv(l,o,g),ev(v,a,r,i,s,y)&&nv(l,s,y),ev(o,s,g,y,v,r)&&nv(l,v,r),ev(o,s,g,y,a,i))&&nv(l,a,i):(m=(v*(i-r)+g*(a-v)-r*(a-v)-o*(i-r))/((s-o)*(i-r)-(a-v)*(y-g)),0<=(y=(o*(y-g)+r*(s-o)-g*(s-o)-v*(y-g))/((a-v)*(y-g)-(s-o)*(i-r)))&&y<=1&&0<=m&&m<=1&&(l[0]=v+y*(a-v),l[1]=r+y*(i-r))),l);0!==g.length&&(e=(s=x(g,2))[0],n=s[1])}return[e,n]},k2.tag="polygon-crosshair",k2.defaultOptions={style:$a},t([iv(20)],k2.prototype,"setPointer",null);ve(_2,w2=F.DisplayObject),Object.defineProperty(_2.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&Xe(t)?t.map(function(t){return Xe(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(_2.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(_2.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(_2.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(_2.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(_2.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(_2.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=x(t,2),n=t[0],t=t[1];return"wavy"===t?m({path:r.getWavyPath(n)},i):"double"===t?m({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},m(m({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),_2.prototype.update=function(t){var e=this;this.attr(Jg({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new F.Path({style:t}))})},_2.prototype.clear=function(){this.removeChildren()},_2.prototype.getLinePos=function(t){var e=x(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,a=i.height,i=i.fontSize,o=x([0,0],2),s=o[0],o=o[1],o=("overline"===t?(s=(n=x([0,a*n-i/2],2))[0],n):"line-through"===t?(s=(n=x([0,a*r],2))[0],n):(s=(t=x([0,a*e+i/2],2))[0],t))[1];return[s,o]},_2.prototype.getLinePath=function(t){var e=this.attributes.width,t=x(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},_2.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=x(this.getLinePos(t),2),a=i[0],i=i[1],o=x([0,0],2),s=o[0],o=o[1];return"line-through"===t&&(s=(e=x([-.5,.5],2))[0],o=e[1]),"underline"===t?(s=(e=x([0,1],2))[0],o=e[1]):"overline"===t&&(s=(e=x([1,0],2))[0],o=e[1]),[["M",a,i+n*s],["L",a+r,i+n*s],["M",a,i+n*o],["L",a+r,i+n*o]]},_2.prototype.getWavyPath=function(t){return[]},_2.tag="decoration",_2.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var w2,M2,O2=_2;function _2(t){t=w2.call(this,Jg({},_2.defaultOptions,t))||this;return t.update({}),t}function S2(t){t=M2.call(this,Jg({},S2.defaultOptions,t))||this;return t.init(),t}ve(S2,M2=Qa),Object.defineProperty(S2.prototype,"textWidth",{get:function(){var e=this;return Qe(this.renderText.split("\n").map(function(t){return Pg(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"textHeight",{get:function(){return Xg(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"height",{get:function(){var t=this.attributes.height;return rn(t)&&0!==t?t:Xg(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return jg(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:jg(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return Tg(t,rn(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&rn(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"font",{get:function(){return mn(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return m(m(m({},Bg),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return m({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return Jg({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),S2.prototype.init=function(){this.initShape(),this.update({})},S2.prototype.update=function(t){this.attr(Jg({},this.attributes,t)),this.render()},S2.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new O2({style:t}))})},S2.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},S2.prototype.initShape=function(){this.backgroundShape=new F.Rect({name:"background",style:{width:0,height:0}}),this.decorationGroup=new F.Group({name:"decoration-group"}),this.textShape=new F.Text({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},S2.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&rn(n)&&"clip"===e&&(this.clipRect=new F.Rect({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},S2.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;rn(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},S2.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},S2.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},S2.defaultOptions={type:S2.tag="paragraph",style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var E2,Ja=m(m({},Bg),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),A2={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},T2={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function P2(t){return E2.call(this,kn({},P2.defaultOptions,t))||this}ve(P2,E2=Qa),P2.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,a=t.checked,t=t.spacing,a=(this.checked=!!a,Ug(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=fn({},this.checked?A2.selected:A2.default,r),r=fn({},T2,i),t=(this.checkboxBoxShape=Ug(a,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(a.style.zIndex||0)-1).call(S,e).node(),Ug(this.checkboxBoxShape,".checkbox-checked","path").attr("className","checkbox-box-checked").style("stroke","#ffffff").call(S,r),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;Ug(a,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(S,n)},P2.defaultOptions={type:P2.tag="checkbox",style:{x:0,y:0,label:m({text:""},Ja),spacing:4,checked:!1}};var N2="gui-poptip",j2="gui-poptip-arrow",L2="gui-poptip-text",C2=((i={})[".".concat(N2)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},i[".".concat(L2)]={"text-align":"center"},i[".".concat(N2,"[data-position='top']")]={transform:"translate(-50%, -100%)"},i[".".concat(N2,"[data-position='left']")]={transform:"translate(-100%, -50%)"},i[".".concat(N2,"[data-position='right']")]={transform:"translate(0, -50%)"},i[".".concat(N2,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},i[".".concat(N2,"[data-position='top-left']")]={transform:"translate(0,-100%)"},i[".".concat(N2,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},i[".".concat(N2,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},i[".".concat(N2,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},i[".".concat(N2,"[data-position='right-top']")]={transform:"translate(0, 0)"},i[".".concat(N2,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},i[".".concat(N2,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},i[".".concat(N2,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},i[".".concat(j2)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},i[".".concat(N2,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},i["[data-position='top'] .".concat(j2)]={bottom:"-2px"},i[".".concat(N2,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},i["[data-position='left'] .".concat(j2)]={right:"-2px"},i[".".concat(N2,"[data-position='right']")]={transform:"translate(5px, -50%)"},i["[data-position='right'] .".concat(j2)]={left:"-2px"},i[".".concat(N2,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},i["[data-position='bottom'] .".concat(j2)]={top:"-2px"},i[".".concat(N2,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},i["[data-position='top-left'] .".concat(j2)]={left:"10px",bottom:"-2px"},i[".".concat(N2,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},i["[data-position='top-right'] .".concat(j2)]={right:"10px",bottom:"-2px"},i[".".concat(N2,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},i["[data-position='left-top'] .".concat(j2)]={right:"-2px",top:"8px"},i[".".concat(N2,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},i["[data-position='left-bottom'] .".concat(j2)]={right:"-2px",bottom:"8px"},i[".".concat(N2,"[data-position='right-top']")]={transform:"translate(5px, 0)"},i["[data-position='right-top'] .".concat(j2)]={left:"-2px",top:"8px"},i[".".concat(N2,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},i["[data-position='right-bottom'] .".concat(j2)]={left:"-2px",bottom:"8px"},i[".".concat(N2,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},i["[data-position='bottom-left'] .".concat(j2)]={top:"-2px",left:"8px"},i[".".concat(N2,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},i["[data-position='bottom-right'] .".concat(j2)]={top:"-2px",right:"8px"},i),F2=void 0;var B2;function I2(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function R2(t){var n,r;return n=I2,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(F2,t)}(t)}function D2(t){t=B2.call(this,kn({style:{id:"gui-poptip"}},D2.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}ve(D2,B2=Qa),Object.defineProperty(D2.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),D2.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},D2.prototype.update=function(t){this.attr(kn({},this.style,t)),this.render(this.attributes,this)},D2.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(o=(i="function"==typeof l?l.call(null,t):l).html,a=i.target,i=Z(i,["html","target"]),n=fn({},u.style,i),!a&&!1!==a||(e=a),"string"==typeof o)&&(r=o),n.position),a=n.arrowPointAtCenter,o=n.follow,n=n.offset;e?(e=(t=x(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,e,i,a,o),2))[0],a=t[1],u.showTip(e,a,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},D2.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=x(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},D2.prototype.clear=function(){this.container.innerHTML=""},D2.prototype.destroy=function(){var t,e=this;k([],x(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},D2.prototype.showTip=function(t,e,n){var r,i=vn(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(L2)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},D2.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},D2.prototype.getContainer=function(){return this.container},D2.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(N2).concat(t?" ".concat(t):"")},D2.prototype.initShape=function(){var t=this,e=this.style.id;this.container=R2(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},D2.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(j2,'"></span>'));t.innerHTML=n,en(r)?t.innerHTML+=r:r&&cn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(L2)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},D2.prototype.applyStyles=function(){var t,e=Jg({},C2,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=x(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=x(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},D2.prototype.setOffsetPosition=function(t,e,n){var n=x(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},D2.tag="poptip",D2.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:C2,template:'<div class="'.concat(L2,'"></div>')}};function z2(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return ay()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e).concat([[0,0]]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=Ay(l,t),t=Ay(t,i),i=Ay(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),ay()(s)}const G2=Ky(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=Z(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=J(e,"background"),h=f["padding"],f=Z(f,["padding"]),d=J(e,"connector"),{points:p=[]}=d,d=Z(d,["points"]),i=[[+i,+a],[+n,+r]],a=Q(t).maybeAppend("text","text").call(I,e).node(),n=z2(Q(t).maybeAppend("background","rect").style("zIndex",-1).call(I,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,h)).call(I,o?f:{}).node(),i,p,u),r=l&&new Av({id:"startMarker",style:Object.assign({x:0,y:0},J(e,"startMarker"))}),a=c&&new Av({id:"endMarker",style:Object.assign({x:0,y:0},J(e,"endMarker"))});Q(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",a).call(I,s?d:{})}),W2=t=>{const l=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=zy(r,i,a,o),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return Q(new G2).style("x",i).style("y",o).call(I,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(I,a).call(I,l).node()}};W2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const V2=Ky(t=>{var e=Z(t.attributes,["class","x","y"]);const n=J(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(Q(t).maybeAppend("marker",()=>new Av({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());Q(t).maybeAppend("text","text").style("x",i).style("y",a).call(I,e)}),H2=t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=zy(r,i,a,o),{color:i,text:a=""}=e,o={text:String(a),stroke:i,fill:i},[[e,a]]=t;return Q(new V2).call(I,r).style("x",e).style("y",a).call(I,o).call(I,s).node()}},q2=(H2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Ky(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;Q(t).maybeAppend("connect-path",()=>new F.Path({})).style("d",n).call(I,i),Q(t).maybeAppend("area-path",()=>new F.Path({})).style("d",e).call(I,r)}));const Y2=t=>{const{curve:u,gradient:l=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connectNulls:h=!1}=t,d=Z(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=zy(n,r,i,a),r=n["fill"],i=Z(n,["fill"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=Wy(c,e),n=l&&n?Iy(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,f),a=J(s,"connect"),i=!!o.length,n=t=>Q(new F.Path({})).style("d",t).call(I,s).node();return ff(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=oy().curve(sy),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return uy(a())},delete t.lineX0,t.lineEndAngle=function(){return uy(o())},delete t.lineX1,t.lineInnerRadius=function(){return uy(s())},delete t.lineY0,t.lineOuterRadius=function(){return uy(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(cy(t)):e()._curve},t.angle((t,e)=>Py(Ey(r[e],n))).outerRadius((t,e)=>Ay(r[e],n)).innerRadius((t,e)=>Ay(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,a,o,s,l},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):Q(new q2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node()):(e=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return oy().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(f)).curve(u)(n)},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):Q(new q2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},U2=(Y2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=ff(n)?ky:ny;return Y2(Object.assign({curve:i},a))(t,e,n,r)}),X2=(U2.props=Object.assign({},Y2.props),t=>{const{alpha:a=.5}=t,o=Z(t,["alpha"]);return(t,e,n,r)=>{var i=ff(n)?by:vy;return Y2(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),K2=(X2.props=Object.assign({},Y2.props),i=>(t,e,n,r)=>Y2(Object.assign({curve:My},i))(t,e,n,r)),$2=(K2.props=Object.assign({},Y2.props),t=>{const l=t["arrowSize"],c=Z(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=zy(r,a,o,s),a=r["stroke"],o=Z(r,["stroke"]),{color:s=a,transform:r}=e,[e,a]=t,t=L1();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=Fy(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),Q(new F.Path).call(I,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(I,c).node()}}),Z2=($2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=zy(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=L1();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),Q(new F.Path).call(I,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(I,s).node()}});Z2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const J2=t=>{const{cornerRatio:u=1/3}=t,f=Z(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=zy(r,o,s,l),o=r["stroke"],s=Z(r,["stroke"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=L1(),ff(o)?(i=Ay(t,c=o.getCenter()),i=(Ay(e,c)-i)*n+i,a.moveTo(t[0],t[1]),By(a,t,e,c,i)):uf(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return Q(new F.Path).call(I,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(I,f).node()}},Q2=(J2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=zy(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=L1();return t.moveTo(e[0],e[1]),ff(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):By(t,e,i,jy(e,i),Ay(e,i)/2),Q(new F.Path).call(I,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(I,s).node()}}),tx=(Q2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=zy(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return Q(new F.Image).call(I,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(I,u).node()}});tx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ex=t=>{const l=Z(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=zy(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),r=function(i,t){const a=L1();if(ff(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>Ay(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?By(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return Q(new F.Path).call(I,a).style("d",r.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(I,l).node()}};ex.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nx=t=>{const l=Z(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=zy(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),r=function(t,e){var n,[t,r,i,a]=t,o=L1();return ff(e)?(n=Ay(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),By(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),By(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return Q(new F.Path).call(I,a).style("d",r.toString()).style("fill",o||e).style("stroke",o||i).style("transform",s).call(I,l).node()}};nx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const rx=t=>{const g=Z(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=zy(r,e,f,h),{fill:e,stroke:f}=r,h=Z(r,["fill","stroke"]),y=(r=t,t=n,n=L1(),ff(t)?([i,a]=t=t.getCenter(),o=Ty(Ey(r[0],t)),s=Ty(Ey(r[1],t)),y=Ay(t,r[2]),l=Ay(t,r[3]),c=Ay(t,r[8]),u=Ay(t,r[10]),t=Ay(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,y,o,s),n.arc(i,a,y,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return Q(new F.Path).call(I,h).style("d",y.toString()).style("stroke",f).style("fill",d||e).style("transform",p).call(I,g).node()}};rx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ix=t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=zy(r,i,a,o),{stroke:i,lineWidth:a}=r,o=Z(r,["stroke","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,ff(t=n)?(t=t.getCenter(),Q1()({startAngle:0,endAngle:2*Math.PI,outerRadius:Ay(a[0],t),innerRadius:Ay(a[1],t)})):ay().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,ff(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return Q(new F.Path({})).call(I,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(I,s).node()}};function ax(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}ix.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ox=Ky(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=Z(e,["points","class","endMarker","direction"]),i=J(e,"endMarker"),n=(n=n,ay().x(t=>t[0]).y(t=>t[1])(n));Q(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new Av({className:"marker",style:Object.assign(Object.assign({},i),{symbol:ax})}):null).call(I,e)});const sx=t=>{const{offset:s=0,connectLength1:l}=t,c=Z(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=zy(r,i,a,o),{fill:i,stroke:a=i,connectLength1:o=l}=r,i=Z(r,["fill","stroke","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(uf(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,o);return Q(new ox).call(I,i).style("points",n).style("stroke",r||a).style("transform",e).call(I,c).node()}};function lx(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=ah(a.x,c),i=ah(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function cx(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:f}=Dy(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=fx(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?ux(s,h,n):jy(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function ux(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function fx(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function hx(r,t,e,n){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,connector:l=!0,connectorLength2:c=0,connectorDistance:u=0,radius:f=.5,offset:h=0}=e,d=Dy(n,t,[i,a]);var{startAngle:e,endAngle:t}=d;const p=n.getCenter(),y=(e+t)/2;var[e,t]=(()=>{var t="inside"===r?f:1,{innerRadius:e,outerRadius:n}=d,n=e+(n-e)*t;return[n,n+h]})();const g=0<Math.sin(y)?1:-1;var[e,t,...v]=((t,e)=>{var[t,n]=ux(p,y,t),[e,r]=ux(p,y,e),i=l?g*c:0;return[[t,n],[e+i,r],[-i,0]]})(e,t),v={connector:l,connectorPoints:v,dx:l?+u*g:0},m=(t,e="x",n="y")=>({[e]:t[0],[n]:t[1]});return Object.assign(Object.assign(Object.assign(Object.assign({},m(e,"x0","y0")),m(t)),(e=r,m=0<g||hf(n),t=fx(y,o,s),"inside"===e?{textAlign:"center",textBaseline:"middle",rotate:t}:{textAlign:m?"start":"end",textBaseline:"middle",rotate:t})),v)}function dx(t,e,n,r){var i=n["bounds"];return 1===i.length?([i]=i=(i=n).bounds,{x:i[0],y:i[1]}):(hf(r)?cx:gf(r)?hx:lx)(t,e,n,r)}sx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var px=Object.freeze({__proto__:null,top:dx,bottom:dx,right:dx,left:dx,topLeft:dx,topRight:dx,bottomLeft:dx,bottomRight:dx,inside:dx,outside:dx,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=tf(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=Ty(Ey(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}}});function yx(t,e,n,r){var i=e["position"],i=(a=n,void 0!==(i=i)?i:gf(a)?"inside":uf(a)?"right":"top"),a=r["inside"===i?"innerLabel":"label"],r=Object.assign({},a,e),e=px[i.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},a),e(i,t,r,n));throw new Error("Unknown position: "+i)}const gx=t=>(t,e,n,r)=>{var i=e["text"],a=Z(e,["text","x","y"]),t=yx(t,e,n,r),{rotate:e=0,transform:r=""}=t,t=Z(t,["rotate","transform"]);return Q(new G2).call(I,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(I,a).node()},vx=(gx.props={},t=>{const s=t["colorAttribute"],l=Z(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Z(zy(r,i,a,o),["stroke"]),{d:i,color:a}=e;return Q(new F.Path).call(I,r).style("d",i).style(s,a).call(I,l).node()}}),mx=(vx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>vx(Object.assign({colorAttribute:"fill"},t))),bx=(mx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>vx(Object.assign({fill:"none",colorAttribute:"stroke"},t))),xx=(bx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=Z(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),kx=(xx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),wx=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:kx.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:kx.BLACK,connectFillOpacity:.1}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:kx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:kx.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:kx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:kx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:kx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:kx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:kx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:kx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:kx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:kx.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:kx.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:kx.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:kx.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:kx.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:kx.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisArcY:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridControlAngles:[90,180,360],gridType:"surround",girdClosed:!0},legend:{padding:8,showTitle:!1,titleFill:kx.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:kx.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:kx.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:kx.BLACK,navButtonFillOpacity:.45,navPageNumFill:kx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:kx.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:kx.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:kx.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:kx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:kx.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:kx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:kx.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railSize:16,backgroundFill:kx.STROKE,backgroundFillOpacity:1,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:kx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:kx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{fill:kx.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:kx.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)},Mx=(wx.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),Ox=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:Mx.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#666"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:Mx.BLACK,connectFillOpacity:.1}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:Mx.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:Mx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:Mx.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:Mx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:Mx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:Mx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:Mx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:Mx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:Mx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:Mx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:Mx.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:Mx.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:Mx.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:Mx.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:Mx.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:Mx.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisArcY:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridControlAngles:[90,180,360],gridType:"surround",girdClosed:!0},legend:{padding:8,showTitle:!1,titleFill:Mx.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:Mx.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:Mx.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:Mx.BLACK,navButtonFillOpacity:.45,navPageNumFill:Mx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:Mx.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:Mx.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:Mx.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:Mx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:Mx.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:Mx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:Mx.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railSize:16,backgroundFill:Mx.STROKE,backgroundFillOpacity:1,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:Mx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:Mx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{fill:Mx.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:Mx.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)};function _x(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}Ox.props={},Ox.props={};var Sx,Ex=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ax(t){var e;if(e=Ex.exec(t))return new Tx({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function Tx(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Px(t,e){var n,e=_x(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}Ax.prototype=Tx.prototype,Tx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Nx={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Px(100*t,e),r:Px,s:function(t,e){var n,r,i=_x(t,e);return i?(n=i[0],(i=(i=i[1])-(Sx=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+_x(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function jx(t){return t}var Lx,Cx,Fx=Array.prototype.map,Bx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ix(t){var e,s,l,w=void 0===t.grouping||void 0===t.thousands?jx:(s=Fx.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",M=void 0===t.decimal?".":t.decimal+"",O=void 0===t.numerals?jx:(e=Fx.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=Ax(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,y=t.precision,g=t.trim,v=t.type,m=("n"===v?(p=!0,v="g"):Nx[v]||(void 0===y&&(y=12),g=!0,v="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),b="$"===e?i:/[%p]/.test(v)?a:"",x=Nx[v],k=/[defgprs%]/.test(v);function n(t){var e,n,r,i=m,a=b;if("c"===v)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),y),g&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===v?Bx[8+Sx/3]:"")+a+(o&&"("===f?")":""),k)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?M+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=w(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=w(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return O(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=Ax(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=_x(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=Bx[8+e/3];return function(t){return n(r*t)+i}}}}function Rx(t,e,n){return t.querySelector(e)?Q(t).select(e):Q(t).append(n)}function Dx(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function zx(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function Gx(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=Lu(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new V0({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),h=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return yf(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new V0({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new V0({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return ff(s)||uf(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:uf(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:u(t,e,n),id:String(e)}}),hf(s)&&"arcY"===o?i.map(t=>{var e=t["value"],t=Z(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:h(f(a.map(t)+r)),label:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n),id:String(e)}})}function Wx(t,e,n){var r;return!(ff(r=e)&&uf(r)||pf(e))&&(void 0===t?!!n.getTicks:t)}eo=Ix({thousands:",",grouping:[3],currency:["$",""]}),Lx=eo.format,eo.formatPrefix;const Vx=t=>{const{position:c,labelFormatter:u=t=>""+t,tickFilter:f,tickCount:h,tickMethod:d,title:p,grid:y=!1}=t,g=Z(t,["order","size","position","labelFormatter","tickFilter","tickCount","tickMethod","title","grid"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{x:i,y:a,width:o,height:s}=i,i=[i+o/2,a+s/2],a=Gx(t,e,h,u,f,d,c,n),t=Math.min(o,s)/2,[e,o]=function(t){var[,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}(n),[s,l]=function(t){var[,,,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[+t,+e]}(n),s=function(t,e,n,r){var[i,a]=zx(r),n={titleFillOpacity:0,titlePosition:"inner",showLine:!1,showTick:!0,gridLength:(n-e)*(Math.min(i,a)/2)};return"arcInner"===t?(zx(r),Object.assign(Object.assign({},n),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},n),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",gridDirection:"positive"})}(c,s,l,n),l=r["axis"];return new db({style:B({},l,s,Object.assign({type:"arc",center:i,radius:t,angleRange:[e,o],data:a,title:Dx(p),showGrid:y},g))})}};const Hx=c=>{const{position:u,title:f,labelFormatter:h=t=>""+t,direction:d="left",tickCount:p,tickFilter:y,tickMethod:g,labelAutoHide:v=!1,labelAutoRotate:m=!0,grid:b,label:x=!0,tick:k=!0}=c,w=Z(c,["order","size","transform","position","title","labelFormatter","direction","tickCount","tickFilter","tickMethod","labelAutoHide","labelAutoRotate","grid","label","tick"]);return(t,e,n,r)=>{var i,a,{domain:e,bbox:o}=e,e=Gx(t,e,p,h,y,g,u,n),s=Wx(b,n,t),l=function(t,e){var[e,n]=zx(e);return"bottom"===t||"top"===t?n:e}(u,n),o=function(t,e,n){var[,n]=n.getCenter(),{x:r,y:i,width:a,height:o}=e;return"bottom"===t?{startPos:[r,i],endPos:[r+a,i]}:"left"===t||"centerHorizontal"===t?{startPos:[r+a,i],endPos:[r+a,i+o],showLine:"centerHorizontal"===t||void 0}:"right"===t?{endPos:[r,i+o],startPos:[r,i]}:"arcY"===t?{startPos:[r,i],endPos:[r+a,i+o],gridCenter:[e.x,n+e.y]}:{startPos:[r,i+o],endPos:[r+a,i+o],showLine:"centerVertical"===t||void 0}}(u,o,n),{showLine:n=void 0!==c.line&&c.line}=o,o=Z(o,["showLine"]),t=(t=t,r=r,i=u,a=d,r=Object.assign({},r.axis,r["axis"+th("centerHorizontal"===i?"left":i)]||r.axisTop),"bottom"===i?Object.assign(Object.assign({},r),{titlePosition:t.getTicks?"right-bottom":"bottom",titleTransformOrigin:"center",titleTransform:t.getTicks?"translate(-100%, 0)":void 0}):"arcY"===i?Object.assign(Object.assign({},r),{labelDirection:"right"===a?"negative":"positive",labelTransform:"center"===a?"translate(50%, 0)":"",tickDirection:"right"===a?"negative":"positive",labelSpacing:"center"===a?0:4}):r),t=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),{type:"linear",data:e,title:Dx(f),showLabel:x,labelTransforms:(i=v,a=m,r=[],i&&r.push({type:"hide"}),a&&r.push({type:"rotate",optionalAngles:[0,30,45,60,90]}),r),showGrid:s,showTick:k,gridLength:l}),w),{showLine:!0}),n?null:{lineOpacity:0}),o);return new db({style:t})}},qx=t=>{const{position:i,labelFormatter:e=t=>""+t}=t;var n="string"==typeof e?Lx(e):e;const a=Object.assign(Object.assign({},t),{labelFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?Vx:Hx)(a)(t,e,n,r)},Yx=(qx.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>qx(t)),Ux=(Yx.props=Object.assign(Object.assign({},qx.props),{defaultPosition:"bottom"}),t=>qx(t));Ux.props=Object.assign(Object.assign({},qx.props),{defaultPosition:"left"});const Xx=t=>{const{position:u,labelFormatter:f=t=>""+t,dx:h=0,dy:d=0,title:p,gridCol:y,gridRow:g}=t,v=Z(t,["order","size","position","labelFormatter","dx","dy","title","gridCol","gridRow"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a,width:o,height:s}=i,t=t.map(t=>({id:t,label:f(t),value:"",color:e.map(t)})),[l,c]=function(t,e,n){var[r,i]=[e||100,n||100];return{top:[1,i],bottom:[1,i],left:[r,1],right:[r,1],arcCenter:[r,1]}[t]||[e,n]}(u,g,y),t={data:t,x:i+h,y:a+d,orient:["right","left","arcCenter"].includes(u)?"vertical":"horizontal",width:o,height:s,gridCol:c,gridRow:l,rowPadding:0,colPadding:8,titleText:Dx(p),itemMarkerFill:t=>t?t.color:"#fff"},{legend:i={}}=r;return new Cb({className:"legend-category",style:Object.assign({},i,t,v)})}},Kx=(Xx.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const l=t["title"],c=Z(t,["title"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a}=i,[o,s]=t,{continuousLegend:r={}}=r;return new e2({style:Object.assign({},r,{x:i,y:a,width:400,height:300,data:[{value:o},{value:s}],titleText:Dx(l),titleFontSize:12,ribbonLen:120,ribbonSize:12,ribbonColor:t.map(t=>e.map(t)),showHandle:!1,showIndicator:!1,labelAlign:"value"},c)})}}),$x=(Kx.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},Cx={render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:a}=t;t=Rx(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(I,r||{}).node().getLocalBounds();Rx(e,".sub-title","text").attr("className","sub-title").style("y",t.max[1]+((null===a||void 0===a?void 0:a.spacing)||0)).style("fontSize",12).style("textBaseline","top").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign({text:i},a))})}},class extends F.CustomElement{constructor(t){super(t),this.descriptor=Cx}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(B({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}}),Zx=t=>{const{text:a,style:o,subtitle:s,subtitleStyle:l}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new $x({style:B({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:o,text:a,subtitle:s,subtitleStyle:l})})}},Jx=(Zx.props={defaultPosition:"top",defaultOrder:2,defaultSize:30},t=>{const{orient:u,labelFormatter:f}=t,h=Z(t,["orient","labelFormatter","size"]);return(e,t,n,r)=>{var i,t=t["bbox"],{x:t,y:a,width:o,height:s}=t,{slider:r={}}=r;const l=(null==(i=e.getFormatter)?void 0:i.call(e))||(t=>t),c="string"==typeof f?Lx(f):f;return new fm({className:"slider",style:Object.assign({},r,Object.assign({x:t,y:a,length:"horizontal"===u?o:s,orient:u,formatter:t=>{return(c||l)(function(t,n){if(!t.getBandWidth)return t.invert(n);const e=t.adjustedRange,r=t=>Math.abs(t);return t.invert(function(e,n){let r,i=!1;if(1===n.length){let t;for(const o of e){var a=n(o);(i?_u(a,t)<0:0===_u(a,a))&&(r=o,t=a,i=!0)}}else for(const t of e)(i?n(t,r)<0:0===n(t,t))&&(r=t,i=!0);return r}(e,(t,e)=>r(t-n)-r(e-n)))}(e,t))},size:r.railSize},h))})}});Jx.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1};const Qx=t=>Jx(Object.assign(Object.assign({},t),{orient:"horizontal"})),tk=(Qx.props=Object.assign(Object.assign({},Jx.props),{defaultPosition:"bottom"}),t=>Jx(Object.assign(Object.assign({},t),{orient:"vertical"})));tk.props=Object.assign(Object.assign({},Jx.props),{defaultPosition:"left"});class ek{constructor(t){this.$value=t}static of(t){return new ek(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function nk(t,e,n){return ek.of({}).call(rk,t).call(rk,e).call(rk,n).value()}function rk(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function ik(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const ak=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],ok=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=uf(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,nk(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},sk=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=uf(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,nk(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},lk=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=uf(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,nk(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},ck=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=uf(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,nk(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},uk=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],nk(i,n,l))},fk=(uk.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],nk(i,n,l))});function hk(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function dk(t,e){var[n,r,i,t]=hk(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(y,F,L){"use strict";const N="main-layer",et="label-layer",nt="element",C="view",rt="plot",it="component",at="label",ot="area";var j="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function I(t,e,n,r,i){!function t(e,n,r,i,a){for(;r<i;){600<i-r&&(o=i-r+1,u=n-r+1,l=Math.log(o),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(o-s)/o)*(u-o/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/o+l)),u=Math.min(i,Math.floor(n+(o-u)*s/o+l)),t(e,n,c,u,a));var o,s,l,c,u,f=e[n],h=r,d=i;for(D(e,r,n),0<a(e[i],f)&&D(e,r,i);h<d;){for(D(e,h,d),h++,d--;a(e[h],f)<0;)h++;for(;0<a(e[d],f);)d--}0===a(e[r],f)?D(e,r,d):D(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||z)}function D(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function z(t,e){return t<e?-1:e<t?1:0}function W(t,e){G(t,0,t.children.length,e,t)}function G(t,e,n,r,i){(i=i||K(null)).minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var o=t.children[a];H(i,t.leaf?r(o):o)}return i}function H(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function V(t,e){return t.minX-e.minX}function Y(t,e){return t.minY-e.minY}function q(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function U(t){return t.maxX-t.minX+(t.maxY-t.minY)}function $(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function X(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function K(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Z(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(I(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if(X(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],s=e.leaf?r(o):o;X(t,s)&&(e.leaf?n.push(o):$(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},e.prototype.collides=function(t){var e=this.data;if(X(t,e))for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if(X(t,a)){if(e.leaf||$(t,a))return!0;n.push(i)}}e=n.pop()}return!1},e.prototype.load=function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0;e<t.length;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},e.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},e.prototype.clear=function(){return this.data=K([]),this},e.prototype.remove=function(t,e){if(t)for(var n,r,i,a=this.data,o=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),a.leaf){var c=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}(t,a.children,e);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}i||a.leaf||!$(a,o)?r?(n++,a=r.children[n],i=!1):a=null:(s.push(a),l.push(n),a=(r=a).children[n=0])}return this},e.prototype.toBBox=function(t){return t},e.prototype.compareMinX=function(t,e){return t.minX-e.minX},e.prototype.compareMinY=function(t,e){return t.minY-e.minY},e.prototype.toJSON=function(){return this.data},e.prototype.fromJSON=function(t){return this.data=t,this},e.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},e.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)W(i=K(t.slice(e,n+1)),this.toBBox);else{r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(i=K([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));Z(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);Z(t,c,u,s,this.compareMinY);for(var f=c;f<=u;f+=s){var h=Math.min(f+s-1,u);i.children.push(this._build(t,f,h,r-1))}}W(i,this.toBBox)}return i},e.prototype._chooseSubtree=function(t,e,n,r){for(;;){if(r.push(e),e.leaf||r.length-1===n)break;for(var i=1/0,a=1/0,o=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=q(l),u=(f=t,u=l,(Math.max(u.maxX,f.maxX)-Math.min(u.minX,f.minX))*(Math.max(u.maxY,f.maxY)-Math.min(u.minY,f.minY))-c);u<a?(a=u,i=c<i?c:i,o=l):u===a&&c<i&&(i=c,o=l)}e=o||e.children[0]}var f,u;return e},e.prototype._insert=function(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),H(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=K(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,W(n,this.toBBox),W(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=K([t,e]),this.data.height=t.height+1,this.data.leaf=!1,W(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=G(t,0,c,this.toBBox),f=G(t,c,n,this.toBBox),h=(i=u,h=f,d=o=a=void 0,a=Math.max(i.minX,h.minX),o=Math.max(i.minY,h.minY),d=Math.min(i.maxX,h.maxX),i=Math.min(i.maxY,h.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=q(u)+q(f);h<s?(s=h,r=c,l=d<l?d:l):h===s&&d<l&&(l=d,r=c)}return r||n-e},e.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:V,i=t.leaf?this.compareMinY:Y;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},e.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=G(t,0,e,i),o=G(t,n-e,n,i),s=U(a)+U(o),l=e;l<n-e;l++){var c=t.children[l];H(a,t.leaf?i(c):c),s+=U(a)}for(var u=n-e-1;e<=u;u--){var f=t.children[u];H(o,t.leaf?i(f):f),s+=U(o)}return s},e.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)H(e[r],t)},e.prototype._condense=function(t){for(var e=t.length-1,n=void 0;0<=e;e--)0===t[e].children.length?0<e?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():W(t[e],this.toBBox)};var st=1e-6,lt="undefined"!=typeof Float32Array?Float32Array:Array;function ct(){var t=new lt(9);return lt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ut=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],g=n[4],y=n[5],m=n[6],v=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+g*o+y*c,t[4]=p*i+g*s+y*u,t[5]=p*a+g*l+y*e,t[6]=m*r+v*o+n*c,t[7]=m*i+v*s+n*u,t[8]=m*a+v*l+n*e,t};function ft(){var t=new lt(16);return lt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ht(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function dt(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function pt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function gt(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function yt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15],m=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,k=i*c-a*l,M=u*g-f*p,O=u*y-h*p,_=u*e-d*p,S=f*y-h*g,E=f*e-d*g,A=h*e-d*y,T=m*A-v*E+b*S+x*_-w*O+k*M;return T?(t[0]=(s*A-l*E+c*S)*(T=1/T),t[1]=(i*E-r*A-a*S)*T,t[2]=(g*k-y*w+e*x)*T,t[3]=(h*w-f*k-d*x)*T,t[4]=(l*_-o*A-c*O)*T,t[5]=(n*A-i*_+a*O)*T,t[6]=(y*b-p*k-e*v)*T,t[7]=(u*k-h*b+d*v)*T,t[8]=(o*E-s*_+c*M)*T,t[9]=(r*_-n*E-a*M)*T,t[10]=(p*w-g*b+e*m)*T,t[11]=(f*b-u*w-d*m)*T,t[12]=(s*O-o*S-l*M)*T,t[13]=(n*S-r*O+i*M)*T,t[14]=(g*v-p*x-y*m)*T,t[15]=(u*x-f*v+h*m)*T,t):null}function mt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(f*t-h*g)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*g-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*g-f*d)+(r*l-i*s)*(c*p-u*d)}function vt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],g=e[12],y=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*f+w*g,t[1]=v*i+b*l+x*h+w*y,t[2]=v*a+b*c+x*d+w*m,t[3]=v*o+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*f+w*g,t[5]=v*i+b*l+x*h+w*y,t[6]=v*a+b*c+x*d+w*m,t[7]=v*o+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*f+w*g,t[9]=v*i+b*l+x*h+w*y,t[10]=v*a+b*c+x*d+w*m,t[11]=v*o+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*f+w*g,t[13]=v*i+b*l+x*h+w*y,t[14]=v*a+b*c+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function bt(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,g=n[0],y=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*y+e[8]*n+e[12],t[13]=e[1]*g+e[5]*y+e[9]*n+e[13],t[14]=e[2]*g+e[6]*y+e[10]*n+e[14],t[15]=e[3]*g+e[7]*y+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*g+s*y+f*n+e[12],t[13]=i*g+l*y+h*n+e[13],t[14]=a*g+c*y+d*n+e[14],t[15]=o*g+u*y+p*n+e[15]),t}function xt(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function wt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function kt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*n,t}function Mt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Ot(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function St(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function Et(t,e){var n=new lt(3),r=(St(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function At(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,f=a*l,h=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],g=i[0],y=i[1],i=i[2],m=(1-(d+s))*u,v=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=h,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+g-(m*g+h*y+p*i),t[13]=n[1]+y-(v*g+e*y+a*i),t[14]=n[2]+i-(u*g+s*y+c*i),t[15]=1,t}function Tt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Pt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function Lt(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var Nt=Lt;function Ct(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<st&&Math.abs(c-d)<st&&Math.abs(e-n)<st?pt(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function jt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var Ft=Object.freeze({__proto__:null,create:ft,clone:function(t){var e=new lt(16);return 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[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:ht,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g){var y=new lt(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=a,y[6]=o,y[7]=s,y[8]=l,y[9]=c,y[10]=u,y[11]=f,y[12]=h,y[13]=d,y[14]=p,y[15]=g,y},set:dt,identity:pt,transpose:gt,invert:yt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15];return t[0]=s*(h*e-d*y)-f*(l*e-c*y)+g*(l*d-c*h),t[1]=-(r*(h*e-d*y)-f*(i*e-a*y)+g*(i*d-a*h)),t[2]=r*(l*e-c*y)-s*(i*e-a*y)+g*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*y)-u*(l*e-c*y)+p*(l*d-c*h)),t[5]=n*(h*e-d*y)-u*(i*e-a*y)+p*(i*d-a*h),t[6]=-(n*(l*e-c*y)-o*(i*e-a*y)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*g)-u*(s*e-c*g)+p*(s*d-c*f),t[9]=-(n*(f*e-d*g)-u*(r*e-a*g)+p*(r*d-a*f)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*y-h*g)-u*(s*y-l*g)+p*(s*h-l*f)),t[13]=n*(f*y-h*g)-u*(r*y-i*g)+p*(r*h-i*f),t[14]=-(n*(s*y-l*g)-o*(r*y-i*g)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:mt,multiply:vt,translate:bt,scale:xt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,k,M,O=r[0],_=r[1],r=r[2],S=Math.hypot(O,_,r);return S<st?null:(O*=S=1/S,_*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7],d=e[8],p=e[9],g=e[10],y=e[11],v=O*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+O*S,w=O*r*i+_*S,k=_*r*i-O*S,M=r*r*i+n,t[0]=a*(n=O*O*i+n)+c*(m=_*O*i+r*S)+d*(r=r*O*i-_*S),t[1]=o*n+u*m+p*r,t[2]=s*n+f*m+g*r,t[3]=l*n+h*m+y*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+f*b+g*x,t[7]=l*v+h*b+y*x,t[8]=a*w+c*k+d*M,t[9]=o*w+u*k+p*M,t[10]=s*w+f*k+g*M,t[11]=l*w+h*k+y*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:wt,rotateY:kt,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:Mt,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<st?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:Ot,fromQuat2:function(t,e){var n=new lt(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),Ot(t,e,n),t},getTranslation:_t,getScaling:St,getRotation:Et,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+f)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:At,fromQuat:Tt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:Pt,perspective:Pt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Lt,ortho:Nt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:Ct,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:jt,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],g=t[13],y=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],k=e[5],M=e[6],O=e[7],_=e[8],S=e[9],E=e[10],A=e[11],T=e[12],P=e[13],L=e[14],e=e[15];return Math.abs(n-m)<=st*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=st*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=st*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=st*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=st*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=st*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-M)<=st*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-O)<=st*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(u-_)<=st*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=st*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=st*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=st*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-T)<=st*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(g-P)<=st*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(y-L)<=st*Math.max(1,Math.abs(y),Math.abs(L))&&Math.abs(t-e)<=st*Math.max(1,Math.abs(t),Math.abs(e))},mul:vt,sub:jt});function m(){var t=new lt(3);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Bt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function b(t,e,n){var r=new lt(3);return r[0]=t,r[1]=e,r[2]=n,r}function Rt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function It(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Dt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function zt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Wt(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Gt(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Ht(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Vt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function Yt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function qt(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Ut(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=st*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=st*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=st*Math.max(1,Math.abs(t),Math.abs(e))}var $t=zt,Xt=Bt;function Kt(){var t=new lt(4);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function Jt(){var t=new lt(4);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Qt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function te(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function ee(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function ne(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}m(),Kt();var re=function(t,e,n,r){var i=new lt(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ie=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ae=te,oe=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function se(t,e){var n=new lt(2);return n[0]=t,n[1]=e,n}function le(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ce(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ue(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function fe(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function he(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function de(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}m(),b(1,0,0),b(0,1,0),Jt(),Jt(),ct();var pe=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function ge(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new lt(2),lt!=Float32Array&&(e[0]=0,e[1]=0);var ye=function(t,e){return(ye=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function me(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ye(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function J(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function ve(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function w(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function be(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t===e&&r:e.has(t))return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t);throw new TypeError("Cannot read private member from an object whose class did not declare it")}var xe={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var we={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ke(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return we[e]===t.length-1&&"achlmqstvz".includes(e)})}function Me(t){return ke(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Oe(t){return Me(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function _e(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=we[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,we[n]))),we[n]););}function Se(t){return 48<=t&&t<=57}function Ee(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function Ae(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=we[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,Ee(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(Se(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&Se(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&Se(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;Se(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&Se(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&Se(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),Ee(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,Ee(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}_e(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var Te=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Pe(t){var o,s,l,c;return Me(t)?ge(t):(t=function(t){if(ke(t))return ge(t);var e=new Te(t);for(Ee(e);e.index<e.max&&!e.err.length;)Ae(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function Le(t){if(Oe(t))return ge(t);for(var e,n,r,i,a,o,s,l=Pe(t),c=v({},xe),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function Ne(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Ce(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function je(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Fe(t,e,n,r,i){var a=je([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=Ce([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Be(t,e,n,r){var t=[t,e],e=[n,r],i=Ce(t,e,.5),e=Ce(e,i,.5),a=Ce(i,e,.5),o=Ce(e,a,.5),s=Ce(a,o,.5),t=Fe(t[0],t[1],i[0],i[1],a[0]).point,i=Fe(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Re(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],w=u[1],v=u[2],b=u[3]):(e=(y=Ne(e,n,-h)).x,n=y.y,1<(p=(g=(e-(l=(y=Ne(l,c,-h)).x))/2)*g/(r*r)+(y=(n-(c=y.y))/2)*y/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,m=i*i,v=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*m-p*y*y-m*g*g)/(p*y*y+m*g*g))))*r*y/i+(e+l)/2,b=o*-i*g/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<v?Math.PI-x:x,w=l<v?Math.PI-w:w,x<0&&(x=2*Math.PI+x),w<0&&(w=2*Math.PI+w),s&&w<x&&(x-=2*Math.PI),!s&&x<w&&(w-=2*Math.PI)),w-x),g=(Math.abs(p)>f&&(m=w,y=l,o=c,w=x+f*(s&&x<w?1:-1),d=t(l=v+r*Math.cos(w),c=b+i*Math.sin(w),r,i,a,0,s,y,o,[w,m,v,b])),p=w-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(w),s=Math.sin(w),y=Math.tan(p/4),o=4/3*r*y,m=4/3*i*y,v=[e,n],b=[e+o*f,n-m*g],x=[l+o*s,c-m*a],w=[l,c];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],u)return b.concat(x,w,d);for(var k=[],M=0,O=(d=b.concat(x,w,d)).length;M<O;M+=1)k[M]=M%2?Ne(d[M-1],d[M],h).y:Ne(d[M],d[M+1],h).x;return k}(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=f,s=[h,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(Be(h,d,u,f));case"Z":return h===p&&d===g?["C",h,d,p,g,p,g]:["C"].concat(Be(h,d,p,g))}return t}function Ie(t,e){var n;if(void 0===e&&(e=!1),Oe(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=ge(t),e?[n,[]]:n;for(var r,i=Le(t),a=v({},xe),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=Re(i[u],a),h=(i[u]=f,y=g=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var g=h[p],y=p;g.length;)d[p]="A",h.splice(y+=1,0,["C"].concat(g.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function De(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,y=e,m=0,v=[g,y,m],b=[g,y],x={x:0,y:0},w=[{x:g,y:y}];p&&l<=0&&(x={x:g,y:y});for(var k,M,O,_,S,E,A,T,P,L,N=0;N<=d;N+=1)k=t,M=e,O=n,_=r,S=i,E=a,A=o,T=s,L=void 0,L=1-(P=N/d),g=(k={x:Math.pow(L,3)*k+3*Math.pow(L,2)*P*O+3*L*Math.pow(P,2)*S+Math.pow(P,3)*A,y:Math.pow(L,3)*M+3*Math.pow(L,2)*P*_+3*L*Math.pow(P,2)*E+Math.pow(P,3)*T}).x,y=k.y,f&&w.push({x:g,y:y}),h&&(m+=je(b,[g,y])),b=[g,y],p&&l<=m&&l>v[2]&&(O=(m-l)/(m-v[2]),x={x:b[0]*(1-O)+v[0]*O,y:b[1]*(1-O)+v[1]*O}),v=[g,y,m];return{length:m,point:x=p&&m<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function ze(t){return(c=l=s=0)<=Ie(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function We(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?De(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=Ce(n,i,r),i=Ce(i,a,r),a=Ce(a,e,r),o=Ce(n,i,r),i=Ce(i,a,r),r=Ce(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var Ge=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},He=function(t){return"function"==typeof t},k=function(t){return null==t},Ve={}.toString,Ye=function(t,e){return Ve.call(t)==="[object "+e+"]"},qe=function(t){return Array.isArray?Array.isArray(t):Ye(t,"Array")},Ue=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function $e(t,e){if(t)if(qe(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(Ue(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var Xe=function(t){return"object"==typeof t&&null!==t},Ke=function(t){if(!Xe(t)||!Ye(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},Ze=function(t){if(qe(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},Je=function(t){if(qe(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},Qe=function(t){return Ye(t,"String")},tn=function(t,e,n){return t<e?e:n<t?n:t},en=function(t){return Ye(t,"Number")};var nn=function(t,e){return(t%e+e)%e},rn=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return $e(n,function(t,e){He(n)&&"prototype"===e||r.push(t)}),r};var an=function(t){return Ye(t,"Boolean")},on=function(t){return void 0===t},sn=function(t){return t instanceof Element||t instanceof HTMLDocument};function ln(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function cn(t,e,n,r){return e&&ln(t,e),n&&ln(t,n),r&&ln(t,r),t}function un(t){if("object"!=typeof t||null===t)return t;if(qe(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=un(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=un(t[i]):e[i]=t[i];return e}var fn=un;function hn(a,o){var s;if(He(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var dn=5;function pn(t,e){if(t===e)return!0;if(t&&e&&!Qe(t)&&!Qe(e)){if(Ge(t)||Ge(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=pn(t[r],e[r]));r++);return n}if(Xe(t)||Xe(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=pn(t[i[r]],e[i[r]]));r++);return n}}return!1}function gn(t,e,n){for(var r=0,i=Qe(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function yn(e,t){var n;return null!==e&&Ke(e)?(n={},$e(t,function(t){xn.call(e,t)&&(n[t]=e[t])}),n):{}}function mn(){}var vn=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||dn,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Ke(o)?(Ke(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):qe(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},bn=pn,xn=Object.prototype.hasOwnProperty;function wn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function kn(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function Mn(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",On=/^#([0-9a-f]{3,8})$/,_n=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Sn=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),En=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),An=new RegExp("^rgba\\("+[r,r,r,n]+"\\)$"),Tn=new RegExp("^hsl\\("+[n,r,r]+"\\)$"),Pn=new RegExp("^hsla\\("+[n,r,r,n]+"\\)$"),Ln={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Nn(){return this.rgb().formatHex()}function Cn(){return this.rgb().formatRgb()}function jn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=On.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Fn(e):3===n?new Rn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Bn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Bn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=_n.exec(t))?new Rn(e[1],e[2],e[3],1):(e=Sn.exec(t))?new Rn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=En.exec(t))?Bn(e[1],e[2],e[3],e[4]):(e=An.exec(t))?Bn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Tn.exec(t))?Wn(e[1],e[2]/100,e[3]/100,1):(e=Pn.exec(t))?Wn(e[1],e[2]/100,e[3]/100,e[4]):Ln.hasOwnProperty(t)?Fn(Ln[t]):"transparent"===t?new Rn(NaN,NaN,NaN,0):null}function Fn(t){return new Rn(t>>16&255,t>>8&255,255&t,1)}function Bn(t,e,n,r){return new Rn(t=r<=0?e=n=NaN:t,e,n,r)}function Rn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function In(){return"#"+zn(this.r)+zn(this.g)+zn(this.b)}function Dn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function zn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Wn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new Hn(t,e,n,r)}function Gn(t){var e,n,r,i,a,o,s,l;return t instanceof Hn?new Hn(t.h,t.s,t.l,t.opacity):(t=t instanceof Mn?t:jn(t))?t instanceof Hn?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new Hn(o,s,l,t.opacity)):new Hn}function Hn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Vn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Yn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function qn(t,e){return Math.abs(t-e)<.001}function Un(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function $n(t){return(t+2*Math.PI)%(2*Math.PI)}wn(Mn,jn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Nn,formatHex:Nn,formatHsl:function(){return Gn(this).formatHsl()},formatRgb:Cn,toString:Cn}),wn(Rn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof Mn?i:jn(i))?new Rn((i=i.rgb()).r,i.g,i.b,i.opacity):new Rn:new Rn(t,e,n,null==r?1:r);var i},kn(Mn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:In,formatHex:In,formatRgb:Dn,toString:Dn})),wn(Hn,function(t,e,n,r){return 1===arguments.length?Gn(t):new Hn(t,e,n,null==r?1:r)},kn(Mn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Hn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Hn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new Rn(Vn(240<=t?t-240:120+t,n,e),Vn(t,n,e),Vn(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Xn={box:function(t,e,n,r){return Un([t,n],[e,r])},length:Yn,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?Yn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Yn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(de(r=[-n[1],n[0]],r),o=[i-t,a-e],Math.abs(o[0]*r[0]+o[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Kn(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Yn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(f<1e-4);g++){var y=o-f,m=o+f,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=Yn(l[0],l[1],v[0],v[1]);0<=y&&v<s?(o=y,s=v):(y=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=Yn(l[0],l[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):f*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Zn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Jn(t,e,n){n=t+n-2*e;return qn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Qn(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function tr(t,e,n,r,i,a,o){var s=Zn(t,n,i,o),l=Zn(e,r,a,o),c=Xn.pointAt(t,e,n,r,o),n=Xn.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function er(t,e,n,r,i,a,o){return 0===o?(Yn(t,e,n,r)+Yn(n,r,i,a)+Yn(t,e,i,a))/2:(e=(t=tr(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),er.apply(void 0,e)+er.apply(void 0,n))}var nr={box:function(t,e,n,r,i,a){var o=Jn(t,n,i)[0],s=Jn(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(Zn(t,n,i,o)),void 0!==s&&c.push(Zn(e,r,a,s)),Un(l,c)},length:function(t,e,n,r,i,a){return er(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Kn([t,n,i],[e,r,a],o,s,Zn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Yn(t.x,t.y,o,s)},interpolationAt:Zn,pointAt:function(t,e,n,r,i,a,o){return{x:Zn(t,n,i,o),y:Zn(e,r,a,o)}},divide:tr,tangentAngle:function(t,e,n,r,i,a,o){t=Qn(t,n,i,o),n=Qn(e,r,a,o);return $n(Math.atan2(n,t))}};function rr(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function ir(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function ar(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return qn(r,0)?qn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):qn(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function or(t,e,n,r,i,a,o,s,l){var c=rr(t,n,i,o,l),u=rr(e,r,a,s,l),f=Xn.pointAt(t,e,n,r,l),n=Xn.pointAt(n,r,i,a,l),r=Xn.pointAt(i,a,o,s,l),i=Xn.pointAt(f.x,f.y,n.x,n.y,l),a=Xn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function sr(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=Yn(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=or(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return sr.apply(void 0,e)+sr.apply(void 0,n)}var lr={extrema:ar,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=ar(t,n,i,o),f=ar(e,r,a,s),h=0;h<u.length;h++)l.push(rr(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(rr(e,r,a,s,f[d]));return Un(l,c)},length:function(t,e,n,r,i,a,o,s){return sr(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return Kn([t,n,i,o],[e,r,a,s],l,c,rr,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return Yn(t.x,t.y,l,c)},interpolationAt:rr,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:rr(t,n,i,o,l),y:rr(e,r,a,s,l)}},divide:or,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=ir(t,n,i,o,l),n=ir(e,r,a,s,l);return $n(Math.atan2(n,t))}};function cr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var ur=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,f=s*s,h=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(h),p=s*Math.sin(h),y=(u-f)*Math.pow(Math.cos(h),3)/o,m=(f-u)*Math.pow(Math.sin(h),3)/s,v=d-y,b=p-m,y=l-y,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,y);h+=x*Math.asin((v*m-b*y)/(x*w))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}return{x:t+cr(d,n),y:e+cr(p,r)}};function fr(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function hr(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function dr(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function pr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var gr={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}for(var d=0;d<u.length;d++){var p=fr(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var g=Math.atan(r/(n*Math.tan(i))),y=1/0,m=-1/0,v=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;a<o?a<x&&x<o&&v.push(x):o<x&&x<a&&v.push(x)}for(var w=0;w<v.length;w++){var k=hr(0,e,n,r,i,v[w]);k<y&&(y=k),m<k&&(m=k)}return{x:l,y:y,width:c-l,height:m-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=pr(s-t,l-e,-i),l=s[0],s=s[1],l=ur(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=dr(n,r,a):o<c&&(l=dr(n,r,o)),pr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return Yn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:fr(t,0,n,r,i,o),y:hr(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return $n(Math.atan2(i,s))}};function yr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=Yn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var mr,vr,br={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return Un(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=Yn(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=yr(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Xn.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=Xn.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=yr(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function xr(){}function wr(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function kr(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new wr(n,r||t,i),r=vr?vr+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function Mr(t,e){0==--t._eventsCount?t._events=new xr:delete t._events[e]}function Or(){this._events=new xr,this._eventsCount=0}r=e,mr=Object.prototype.hasOwnProperty,vr="~",Object.create&&(xr.prototype=Object.create(null),(new xr).__proto__||(vr=!1)),Or.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)mr.call(t,e)&&n.push(vr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Or.prototype.listeners=function(t){var t=vr?vr+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},Or.prototype.listenerCount=function(t){t=vr?vr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Or.prototype.emit=function(t,e,n,r,i,a){var o=vr?vr+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[h].fn.apply(l[h].context,s)}return!0},Or.prototype.on=function(t,e,n){return kr(this,t,e,n,!1)},Or.prototype.once=function(t,e,n){return kr(this,t,e,n,!0)},Or.prototype.removeListener=function(t,e,n,r){t=vr?vr+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||Mr(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:Mr(this,t)}}else Mr(this,t);return this},Or.prototype.removeAllListeners=function(t){return t?(t=vr?vr+t:t,this._events[t]&&Mr(this,t)):(this._events=new xr,this._eventsCount=0),this},Or.prototype.off=Or.prototype.removeListener,Or.prototype.addListener=Or.prototype.on,Or.prefixed=vr,r.exports=Or.EventEmitter=Or;var M,_r=e.exports,Sr=((n=c=c||{}).COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>",function(){function y(t,e){void 0===t&&(t=[0,0,0]),void 0===e&&(e=[0,0,0]),this.center=m(),this.halfExtents=m(),this.min=m(),this.max=m(),this.update(t,e)}y.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=y.prototype;return t.update=function(t,e){Rt(this.center,t),Rt(this.halfExtents,e),$t(this.min,this.center,this.halfExtents),Dt(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Dt(this.center,e,t),Wt(this.center,this.center,.5),$t(this.halfExtents,e,t),Wt(this.halfExtents,this.halfExtents,.5),Rt(this.min,t),Rt(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,f,h,d,p,g;y.isEmpty(t)||(y.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],g=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=g+u)&&(d=p),(g=h-(f=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(g=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(h=l+c)?h:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],f=e[2],h=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),y=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),k=Math.abs(d);It(n,e[12]+a*i[0]+o*i[1]+s*i[2],e[13]+l*i[0]+c*i[1]+u*i[2],e[14]+f*i[0]+h*i[1]+d*i[2]),It(r,p*t[0]+g*t[1]+y*t[2],m*t[0]+v*t[1]+b*t[2],x*t[0]+w*t[1]+k*t[2]),this.min=$t(this.min,n,r),this.max=Dt(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new y,i=m(),n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=m(),i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Rt(m(),this.min):272===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):b(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Rt(m(),this.max):272===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):b(this.min[0],this.min[1],this.min[2])},y}()),Er=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||b(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return Ht(t,this.normal)-this.distance},e.normalize=function(){var t=1/Xt(this.normal);Wt(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o},t}(),Ar=(0,function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Er)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];It(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,It(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,It(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,It(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,It(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-g,It(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Tr=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Pr=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}();function Lr(o,s){if("function"!=typeof o||null!=s&&"function"!=typeof s)throw new TypeError("Expected a function");function l(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=s?s.apply(this,e):e[0],a=l.cache;return a.has(i)?a.get(i):(r=o.apply(this,e),l.cache=a.set(i,r)||a,r)}return l.cache=new(Lr.Cache||Map),l}(r=M=M||{}).GROUP="g",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",Lr.Cache=Map;var Nr=Lr(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function Cr(t){if(!t)throw new Error}function jr(t,e){if(t===e)throw new Error}function Fr(t){return"function"==typeof t}var Br={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},Rr=Lr(function(t){var t=Nr(t),e=Br[t];return(null==e?void 0:e.alias)||t});var s,Ir,Dr,zr,Wr="Method not implemented.";function Gr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function Hr(t,e,n){e&&Gr(t.prototype,e),n&&Gr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Vr(){return(Vr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Yr(t,e){t.prototype=Object.create(e.prototype),qr(t.prototype.constructor=t,e)}function qr(t,e){return(qr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ur(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Xr(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?$r(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$r(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e=s=s||{})[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger",(n=Ir=Ir||{})[n.kUNumber=0]="kUNumber",n[n.kUPercent=1]="kUPercent",n[n.kULength=2]="kULength",n[n.kUAngle=3]="kUAngle",n[n.kUTime=4]="kUTime",n[n.kUOther=5]="kUOther",(r=Dr=Dr||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo",(e=zr=zr||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo";function Kr(t){return t?"number"===t?s.kNumber:"percent"===t||"%"===t?s.kPercentage:(e=t,ni.find(function(t){return t.name===e}).unit_type):s.kUnknown;var e}function Zr(t){var e=1;switch(t){case s.kPixels:case s.kDegrees:case s.kSeconds:break;case s.kMilliseconds:e=.001;break;case s.kRadians:e=180/Math.PI;break;case s.kGradians:e=.9;break;case s.kTurns:e=360}return e}function Jr(t){switch(t){case s.kNumber:case s.kInteger:return"";case s.kPercentage:return"%";case s.kEms:return"em";case s.kRems:return"rem";case s.kPixels:return"px";case s.kDegrees:return"deg";case s.kRadians:return"rad";case s.kGradians:return"grad";case s.kMilliseconds:return"ms";case s.kSeconds:return"s";case s.kTurns:return"turn"}return""}var Qr,ti,ei,l,ni=[{name:"em",unit_type:s.kEms},{name:"px",unit_type:s.kPixels},{name:"deg",unit_type:s.kDegrees},{name:"rad",unit_type:s.kRadians},{name:"grad",unit_type:s.kGradians},{name:"ms",unit_type:s.kMilliseconds},{name:"s",unit_type:s.kSeconds},{name:"rem",unit_type:s.kRems},{name:"turn",unit_type:s.kTurns}],r=((n=Qr=Qr||{})[n.kUnknownType=0]="kUnknownType",n[n.kUnparsedType=1]="kUnparsedType",n[n.kKeywordType=2]="kKeywordType",n[n.kUnitType=3]="kUnitType",n[n.kSumType=4]="kSumType",n[n.kProductType=5]="kProductType",n[n.kNegateType=6]="kNegateType",n[n.kInvertType=7]="kInvertType",n[n.kMinType=8]="kMinType",n[n.kMaxType=9]="kMaxType",n[n.kClampType=10]="kClampType",n[n.kTransformType=11]="kTransformType",n[n.kPositionType=12]="kPositionType",n[n.kURLImageType=13]="kURLImageType",n[n.kColorType=14]="kColorType",n[n.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){}t.isAngle=function(t){return t===s.kDegrees||t===s.kRadians||t===s.kGradians||t===s.kTurns},t.isLength=function(t){return t>=s.kEms&&t<s.kDegrees},t.isRelativeUnit=function(t){return t===s.kPercentage||t===s.kEms||t===s.kRems},t.isTime=function(t){return t===s.kSeconds||t===s.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(Dr.kNo,zr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Qr.kUnitType&&this.getType()<=Qr.kClampType},t}()),e=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}Yr(t,n);var e=t.prototype;return e.getType=function(){return Qr.kColorType},e.to=function(t){return this},t}(r),ri=((n=ti=ti||{})[n.Constant=0]="Constant",n[n.LinearGradient=1]="LinearGradient",n[n.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}Yr(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return Qr.kColorType},t}(r)),ii=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}Yr(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Qr.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(r);(n=ei=ei||{}).kAdd="+",n.kSubtract="-",n.kMultiply="*",n.kDivide="/",n.kMin="min",n.kMax="max",n.kClamp="clamp",n.kInvalid="",(n=l=l||{})[n.kLength=0]="kLength",n[n.kAngle=1]="kAngle",n[n.kTime=2]="kTime",n[n.kFrequency=3]="kFrequency",n[n.kResolution=4]="kResolution",n[n.kFlex=5]="kFlex",n[n.kPercent=6]="kPercent",n[n.kNumBaseTypes=7]="kNumBaseTypes";function ai(t){return"number"==typeof t?new di(t,s.kNumber):t}var oi=function(){function t(t,e){void 0===t&&(t=s.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=l.kPercent,this.hasPercentHint=!1,this.exponents=new Array(l.kNumBaseTypes).fill(0),t!==s.kNumber&&this.setExponent(function(t){switch(jr(t,s.kNumber),t){case s.kEms:case s.kPixels:case s.kRems:return l.kLength;case s.kMilliseconds:case s.kSeconds:return l.kTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return l.kAngle;case s.kPercentage:return l.kPercent;default:return l.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){jr(t,l.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(l.kPercent)),this.setExponent(l.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return jr(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},e.exponent=function(t){return this.exponents[t]},e.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach(function(t){return-1*t}),t},e.matchesBaseType=function(t){return jr(t,l.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(l.kPercent,1)},e.matchesBaseTypePercentage=function(t){return jr(t,l.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(l.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(l.kPercent,1)},t.add=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);var r=t.percentHint,i=e.percentHint;if(r!==i)throw new Error;for(var a=0;a<l.kNumBaseTypes;++a){var o=a;if(t.exponents[a]!==e.exponents[a]&&(o!==l.kPercent&&(t.applyPercentHint(o),e.applyPercentHint(o)),t.exponents[a]!==e.exponents[a]))return t}}return t},t.multiply=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<l.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),n=function(n){function d(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}Yr(d,n);var t=d.prototype;return t.getType=function(){return Qr.kUnknownType},t.equals=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return si(n).every(function(t){return e.equals(t)})},t.add=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=si(e),i=(li(Qr.kSumType,r,this),ui(r,ei.kAdd));return i||xi.create(r)},t.sub=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=si(e)).map(function(t){return t.negate()}),i=(li(Qr.kSumType,r,this),ui(r,ei.kAdd));return i||xi.create(r)},t.mul=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=si(e),i=(li(Qr.kProductType,r,this),fi(r));return i||wi.create(r)},t.div=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=si(e)).map(function(t){return t.invert()}),i=(li(Qr.kProductType,r,this),fi(r));return i||wi.create(r)},t.min=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=si(e),i=(li(Qr.kMinType,r,this),ui(r,ei.kMin));return i||vi.create(r)},t.max=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=si(e),i=(li(Qr.kMaxType,r,this),ui(r,ei.kMax));return i||bi.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=ci(e[0]))?(t="string"==typeof t?Kr(t):t,e.convertTo(t)):null},t.toSum=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a=i[r];if(!d.isValidUnit(Kr(a)))return null}var o=this.sumValue();if(!o.length)return null;for(var s=[],l=Xr(o);!(c=l()).done;){var c=ci(c.value);if(!c)return null;s.push(c)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),Cr(!!(o=xi.create(s))),o;for(var u=[],f=0,h=e;f<h.length;f++)!function(){var t=h[f],r=Kr(t),t=(Cr(d.isValidUnit(r)),s.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,s[n]=null),t},0));u.push(new di(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return xi.create(u)},t.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(l.kLength);return e&&(t.length=e),(e=this.type_.exponent(l.kAngle))&&(t.angle=e),(e=this.type_.exponent(l.kTime))&&(t.time=e),(e=this.type_.exponent(l.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(l.kResolution))&&(t.resolution=e),(e=this.type_.exponent(l.kFlex))&&(t.flex=e),(e=this.type_.exponent(l.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case l.kLength:return"length";case l.kAngle:return"angle";case l.kTime:return"time";case l.kFrequency:return"frequency";case l.kResolution:return"resolution";case l.kFlex:return"flex";case l.kPercent:return"percent"}return""}(this.type_.percentHint)),t},d.isValidUnit=function(t){return!!(t===s.kNumber||t==s.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return gi.create(this)},t.invert=function(){return pi.create(this)},d}(r);function si(t){return t.map(ai)}function li(t,e,n){Cr(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function ci(t){return 0===Object.keys(t.units).length?new di(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new di(t.value,Number(Object.keys(t.units)[0])):null}function ui(t,e){Cr(!!t.length);var n=t[0]instanceof di?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var a=t[i]instanceof di?t[i]:null;if(!a||a.unit!==n.unit)return null;e===ei.kAdd?r+=a.value:e===ei.kMax?r=Math.max(r,a.value):e===ei.kMin&&(r=Math.min(r,a.value))}return new di(r,n.unit)}function fi(t){Cr(!!t.length);for(var e=s.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof di?t[r]:null;if(!i)return null;if(i.unit!==s.kNumber){if(e!==s.kNumber)return null;e=i.unit}n*=i.value}return new di(n,e)}function hi(t){switch(function(t){switch(t){case s.kNumber:case s.kInteger:return Ir.kUNumber;case s.kPercentage:return Ir.kUPercent;case s.kPixels:return Ir.kULength;case s.kMilliseconds:case s.kSeconds:return Ir.kUTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return Ir.kUAngle;default:return Ir.kUOther}}(t)){case Ir.kUNumber:return s.kNumber;case Ir.kULength:return s.kPixels;case Ir.kUPercent:return s.kPercentage;case Ir.kUTime:return s.kSeconds;case Ir.kUAngle:return s.kDegrees;default:return s.kUnknown}}var di=function(r){function n(t,e){var n,e="string"==typeof(e=void 0===e?s.kNumber:e)?Kr(e):e;return(n=r.call(this,new oi(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}Yr(n,r);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=hi(this.unit))!==hi(t)||e===s.kUnknown?null:(e=Zr(this.unit)/Zr(t),new n(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Qr.kUnitType},t.sumValue=function(){var t,e,n=[],r={};return this.unit!==s.kNumber&&(r[t=this.unit,(e=hi(t))===s.kUnknown?t:e]=1),n.push({value:this.value*Zr(this.unit),units:r}),n},t.negate=function(){return new n(-this.value,this.unit)},t.invert=function(){return this.unit===s.kNumber?0===this.value?null:new n(1/this.value,this.unit):pi.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case s.kUnknown:break;case s.kInteger:i=Number(this.value).toFixed(0);break;case s.kNumber:case s.kPercentage:case s.kEms:case s.kRems:case s.kPixels:case s.kDegrees:case s.kRadians:case s.kGradians:case s.kMilliseconds:case s.kSeconds:case s.kTurns:var r,i,a=this.value,o=Jr(this.unit);i=a<-999999||999999<a?(r=Jr(this.unit),!Number.isFinite(a)||Number.isNaN(a)?function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(Cr(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(a,r):a+(r||"")):""+a+o}return n+=i},n}(n),r=function(t){function e(){return t.apply(this,arguments)||this}return Yr(e,t),e.prototype.isUnitValue=function(){return!1},e}(n),pi=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}Yr(e,n),e.create=function(t){return new e(t,oi.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Qr.kInvertType},t.equals=function(t){return t.getType()===Qr.kInvertType&&this.value.equals(t.value)},t.sumValue=function(){var e=this.value.sumValue();return 0===e.length||1!==e.length||0===e[0].value?null:(Object.keys(e[0].units).forEach(function(t){e[0].units[t]*=-1}),e[0].value=1/e[0].value,e)},t.buildCSSText=function(t,e,n){return e==zr.kNo&&(n+=t===Dr.kYes?"(":"calc("),n=this.value.buildCSSText(Dr.kYes,zr.kNo,n+="1 / "),e===zr.kNo&&(n+=")"),n},e}(r),gi=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}Yr(e,n),e.create=function(t){return new e(t,t.type_)};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Qr.kNegateType},t.equals=function(t){return t.getType()===Qr.kNegateType&&this.value.equals(t.value)},t.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach(function(t){t.value*=-1}),t)},t.buildCSSText=function(t,e,n){return e==zr.kNo&&(n+=t===Dr.kYes?"(":"calc("),n=this.value.buildCSSText(Dr.kYes,zr.kNo,n+="-"),e===zr.kNo&&(n+=")"),n},e}(r);function yi(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function mi(t){return Si[t]||(Si[t]=new ii(t)),Si[t]}var n=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}Yr(t,n);var e=t.prototype;return e.numericValues=function(){return this.values},e.equals=function(n){return this.getType()===n.getType()&&this.values.every(function(t,e){return t.equals(n.values[e])})},t}(r),vi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="min",t}Yr(e,i),e.create=function(t){return new e(t,yi(t,oi.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Qr.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=Xr(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="min(";for(var r,i=!0,a=Xr(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Dr.kYes,zr.kYes,n);return n+=")"},e}(n),bi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="max",t}Yr(e,i),e.create=function(t){return new e(t,yi(t,oi.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Qr.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=Xr(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="max(";for(var r,i=!0,a=Xr(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Dr.kYes,zr.kYes,n);return n+=")"},e}(n),xi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="sum",t}Yr(e,i),e.create=function(t){return new e(t,yi(t,oi.add))},e.numericTypeFromUnitMap=function(n){var r=new oi;return Object.keys(n).forEach(function(t){var e=n[t];r=oi.multiply(r,new oi(Number(t),e),!1),Cr(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(Cr(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return oi.add(n,e.numericTypeFromUnitMap(t.units),!1),!0})};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Qr.kSumType},t.sumValue=function(){var n=[];return this.numericValues().forEach(function(t){t=t.sumValue();if(!t.length)return null;t.forEach(function(e){var t=n.findIndex(function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)});-1===t?n.push(Vr({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==zr.kNo&&(n+=t===Dr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Dr.kYes,zr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Qr.kNegateType?(n+=" - ",a.value):(n+=" + ",a)).buildCSSText(Dr.kYes,zr.kNo,n)}return e===zr.kNo&&(n+=")"),n},e}(n),wi=function(i){function a(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="product",t}Yr(a,i),a.create=function(t){return new a(t,yi(t,oi.multiply))},a.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){jr(r[t].value,0);var e=t in n?n[t].value:0;e+r[t].value===0?delete n[t]:n[t]=e+r[t].value}),n};var t=a.prototype;return t.clone=function(){return new a(this.values,this.type_)},t.getType=function(){return Qr.kProductType},t.sumValue=function(){var e=[{value:1,units:{}}];return this.numericValues().forEach(function(t){var n=t.sumValue();if(!n.length)return null;var r=[];e.forEach(function(e){n.forEach(function(t){r.push({value:e.value*t.value,units:a.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e},t.buildCSSText=function(t,e,n){e==zr.kNo&&(n+=t===Dr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Dr.kYes,zr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Qr.kInvertType?(n+=" / ",a.value):(n+=" * ",a)).buildCSSText(Dr.kYes,zr.kNo,n)}return e===zr.kNo&&(n+=")"),n},a}(n),ki=new di(0,"px"),Mi=(new di(1,"px"),new di(0,"deg")),Oi=function(o){function t(t,e,n,r,i){var a;return void 0===r&&(r=1),void 0===i&&(i=!1),(a=o.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=t,a.g=e,a.b=n,a.alpha=r,a.isNone=i,a}Yr(t,o);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(e),_i=new ii("unset"),r=new ii("initial"),n=new ii("inherit"),Si={"":_i,unset:_i,initial:r,inherit:n},Ei=new Oi(0,0,0,0,!0),Ai=new Oi(0,0,0,0),Ti=Lr(function(t,e,n,r){return new Oi(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),Pi=Lr(function(t,e){return void 0===e&&(e=s.kNumber),new di(t,e)},function(t,e){return""+t+(e=void 0===e?s.kNumber:e)}),Li=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Ni=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Ci=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,ji=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var Fi={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},Bi=Lr(function(t){t="angular"===t.type?Number(t.value):Fi[t.value]||0;return Pi(t,"deg")}),Ri=Lr(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:Pi(n,i),cy:Pi(r,a)}}),Ii=Lr(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return bo(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!k(c)&&!k(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var f,h=t.map(function(t){return{offset:Pi(t.length.value,"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new ri(ti.LinearGradient,{angle:n?Bi(n):Mi,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=Ri(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?mi(n):Pi(n,f)),new ri(ti.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=Li.exec(t);if(n)return r=(null==(r=n[2].match(ji))?void 0:r.map(function(t){return t.split(":")}))||[],[new ri(ti.LinearGradient,{angle:Pi(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:Pi(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=Ni.exec(t);if(t)return t=(null==(t=t[4].match(ji))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:Pi(50,"%"),cy:Pi(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:Pi(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!Qe(n))return[new ri(ti.RadialGradient,n)]}else if("p"===e){var r=t;if(r=Ci.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});var Di=Lr(function(t){var e;return Ue(e=t)&&e.image?Vr({repetition:"repeat"},t):"transparent"===(t=k(t)?"":t)?Ai:Ii(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=jn(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),Ti.apply(void 0,e))});function zi(t,e){if(t instanceof Oi&&e instanceof Oi)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(tn(e[n],0,255));return e[3]=tn(e[3],0,1),"rgba("+e.join(",")+")"}]}function Wi(t,e){if(k(e))return Pi(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return Pi(Number(e),"px");if(0<="deg".search(t))return Pi(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return Pi(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var Gi=Lr(function(t){return Wi(new RegExp("px","g"),t)}),Hi=(Lr(function(t){return Wi(new RegExp("%","g"),t)}),Lr(function(t){return en(t)||isFinite(Number(t))?Pi(Number(t),"px"):Wi(new RegExp("px|%|em|rem","g"),t)})),Vi=Lr(function(t){return Wi(new RegExp("deg|rad|grad|turn","g"),t)});function Yi(t){var e=0;return t.unit===s.kDegrees?e=t.value:t.unit===s.kRadians?e=so(Number(t.value)):t.unit===s.kTurns&&(e=360*Number(t.value)),e}function qi(t){return Qe(t)?t.split(" ").map(function(t){return Hi(t)}):t.map(function(t){return Hi(t.toString())})}function Ui(t,e,n){var r;return t.unit===s.kPixels?Number(t.value):t.unit===s.kPercentage&&n?(n=n.nodeName===M.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,Sr.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var $i=function(t){return Wi(/deg|rad|grad|turn|px|%/g,t)},Xi=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Ki(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<Xi.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return $i(t)||Di(t)})}),n.lastIndex===t.length)return r}return[]}function Zi(t){return t.toString()}var Ji=Lr(function(t){return"number"==typeof t?Pi(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?Pi(Number(t)):Pi(0)});function Qi(t,e){return[t,e,Zi]}function ta(n,r){return function(t,e){return[t,e,function(t){return Zi(tn(t,n,r))}]}}function ea(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Lr(function(t){return(Qe(t)?t.split(" "):t).map(Ji)});var na=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=Le(e)}catch(t){n=Le(""),console.error("[g]: Invalid SVG Path definition: "+e)}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=nn(oo(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=$o([1,0],p),f=$o(p,u);Uo(p,u)<=-1&&(f=Math.PI);1<=Uo(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:zo(t,[c,e])?0:n,ry:zo(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):(v=l.length,n=[l[v-2],l[v-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&zo(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,g,y,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=Go((h=e[s-1]).currentPoint,b),"Q"===h.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(g=Go((p=e[s-1]).currentPoint,b),y=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-g[0],b[1]-g[1]]):(u.command="SQ",u.startTangent=[b[0]-y[0],b[1]-y[1]]),u.endTangent=[n[0]-y[0],n[1]-y[1]]):"A"===c&&(g=Yo(u,0),b=g.x,y=g.y,c=Yo(u,1,!1),m=c.x,c=c.y,u.startTangent=[b,y],u.endTangent=[m,c]),e.push(u)}return e}(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=nr.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=lr.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=gr.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var h=Je(n),d=Je(r),p=Ze(n),g=Ze(r);if(0!==i.length)for(var y=0;y<i.length;y++){var m=i[y],v=m.currentPoint,b=void 0;v[0]===h?(b=Wo(m,e),h-=b.xExtra):v[0]===p&&(b=Wo(m,e),p+=b.xExtra),v[1]===d?(b=Wo(m,e),d-=b.yExtra):v[1]===g&&(b=Wo(m,e),g+=b.yExtra)}return{x:h,y:d,width:p-h,height:g-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},ra=Lr(na);function ia(t,e){t=(Qe(t)?ra:na)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function aa(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=Ie(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=Ie(e.absolutePath,!1),e.curve=d),[h,d]),h=ze((t=h.length!==d.length?function t(e,n,r){var i,e=We(e),n=We(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],f=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==ze(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):ge(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){f+=je(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function oa(t,e){var n,r,i=Qe(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=br.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=Xn.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}var sa=null;function la(t){return function(e){var n=0;return t.map(function(t){return t===sa?e[n++]:t})}}function ca(t){return t}var ua={matrix:["NNNNNN",[sa,sa,0,0,sa,sa,0,0,0,0,1,0,sa,sa,0,1],ca],matrix3d:["NNNNNNNNNNNNNNNN",ca],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",la([sa,sa,new di(1)]),ca],scalex:["N",la([sa,new di(1),new di(1)]),la([sa,new di(1)])],scaley:["N",la([new di(1),sa,new di(1)]),la([new di(1),sa])],scalez:["N",la([new di(1),new di(1),sa])],scale3d:["NNN",ca],skew:["Aa",null,ca],skewx:["A",null,la([sa,Mi])],skewy:["A",null,la([Mi,sa])],translate:["Tt",la([sa,sa,ki]),ca],translatex:["T",la([sa,ki,ki]),la([sa,ki])],translatey:["T",la([ki,sa,ki]),la([ki,sa])],translatez:["L",la([ki,ki,sa])],translate3d:["TTL",ca]};function fa(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=ua[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?Mi:Vi(t)},N:Ji,T:Hi,L:Gi}[h.toUpperCase()](f):{a:Mi,n:c[0],t:ki}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function ha(t){switch(t.t){case"rotatex":return i=oo(Yi(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=oo(Yi(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=oo(Yi(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=oo(Yi(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":o=oo(Yi(t.d[0])),a=oo(Yi(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=oo(Yi(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=oo(Yi(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ui(t.d[0],0,null)||0,n=Ui(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ui(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=Ui(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=Ui(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ui(t.d[0],0,null)||0,n=Ui(t.d[1],0,null)||0,r=Ui(t.d[2],0,null)||0,1];case"perspective":a=Ui(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function da(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function pa(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return function(t,e,n,r,i,a){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(uo,t))return;if(ht(fo,uo),fo[3]=0,fo[7]=0,fo[11]=0,fo[15]=1,Math.abs(mt(fo))<1e-8)return;var t=uo[3],o=uo[7],s=uo[11],l=uo[12],c=uo[13],u=uo[14],f=uo[15];if(0!==t||0!==o||0!==s){if(ho[0]=t,ho[1]=o,ho[2]=s,ho[3]=f,!yt(fo,fo))return;gt(fo,fo),Zt(i,ho,fo)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,uo),n[0]=Bt(d[0]),Gt(d[0],d[0]),r[0]=Ht(d[0],d[1]),go(d[1],d[1],d[0],1,-r[0]),n[1]=Bt(d[1]),Gt(d[1],d[1]),r[0]/=n[1],r[1]=Ht(d[0],d[2]),go(d[2],d[2],d[0],1,-r[1]),r[2]=Ht(d[1],d[2]),go(d[2],d[2],d[1],1,-r[2]),n[2]=Bt(d[2]),Gt(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Vt(po,d[1],d[2]),Ht(d[0],po)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]);d[0][2]>d[2][0]&&(a[1]=-a[1]);d[1][0]>d[0][1]&&(a[2]=-a[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(ha).reduce(da),e,n,r,i,a),[[e,n,r,a,i]]}var ga=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=ya(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=ya(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=ya(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=ya(a,f));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function ya(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function ma(t){return t.toFixed(6).replace(".000000","")}function va(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=pa(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=pa(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=tn(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return ga(t[0],t[1],t[2],e,t[4]).map(ma).join(",")}])}function ba(t){return t.replace(/[xy]/,"")}function xa(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var wa=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function ka(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?Pi(n):Pi(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var l=va(r,i),a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,f=i[c].t,h=r[c].d,d=i[c].d,p=ua[u],g=ua[f],y=void 0;if(wa(u,f)){var m=va([r[c]],[i[c]]);a.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===f)y=u;else if(p[2]&&g[2]&&ba(u)===ba(f))y=ba(u),h=p[2](h),d=g[2](d);else{if(!p[1]||!g[1]||xa(u)!==xa(f)){m=va(r,i);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}y=xa(u),h=p[1](h),d=g[1](d)}for(var v=[],b=[],x=[],w=0;w<h.length;w++){var k=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=hi(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=Jr(t.unit)):(di.isLength(t.unit)||di.isLength(e.unit))&&(o=Ui(t,i,n),s=Ui(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[w],d[w],t,!1,w);v[w]=k[0],b[w]=k[1],x.push(k[2])}a.push(v),o.push(b),s.push([y,x])}}return e&&(l=a,a=o,o=l),[a,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var Ma=Lr(function(t){var e;return Qe(t)?"text-anchor"===t?[Pi(0,"px"),Pi(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Hi(Oa(e[0])),Hi(Oa(e[1]))]):[Pi(t[0]||0,"px"),Pi(t[1]||0,"px")]});function Oa(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var e=function(){function t(){this.parser=Vi,this.mixer=Qi}return t.prototype.calculator=function(t,e,n,r){return Yi(n)},t}(),r=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof ii&&(n=null),O.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&O.sceneGraphService.dirtifyToRoot(t)}),n},t}(),n=function(){function t(){this.parser=Di,this.mixer=zi}return t.prototype.calculator=function(t,e,n,r){return n instanceof ii?"none"===n.value?Ei:Ai:n},t}(),_a=function(){function t(){this.parser=Ki}return t.prototype.calculator=function(t,e,n){return n instanceof ii?[]:n},t}();function Sa(t){t=t.parsedStyle.fontSize;return k(t)?null:t}function Ea(){this.parser=Ma}var Aa,Ta,i=function(){function t(){this.parser=Hi,this.mixer=Qi}return t.prototype.calculator=function(t,e,n,r,i){if(!di.isRelativeUnit(n.unit))return n.value;if(n.unit===s.kPercentage)return 0;if(n.unit===s.kEms){if(r.parentNode){var a=Sa(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===s.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=Sa(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),Pa=function(){function t(){this.mixer=ea}var e=t.prototype;return e.parser=function(t){t=qi(en(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),La=function(){function t(){this.mixer=ea}var e=t.prototype;return e.parser=function(t){t=qi(en(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),Na=function(t){function e(){return t.apply(this,arguments)||this}return Yr(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case M.CIRCLE:case M.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;k(a)||(l=a),k(i)||(c=i);break;case M.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case M.RECT:case M.IMAGE:case M.GROUP:case M.HTML:case M.TEXT:case M.MESH:k(t.parsedStyle.x)||(l=t.parsedStyle.x),k(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&t.nodeName!==M.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),k(l)&&k(c)&&k(u)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(k(l)?e:l,k(c)?n:c,k(u)?r:u))},e}(i),Ca=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof ii?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),ja=function(){function t(){this.mixer=Qi,this.parser=Ji}return t.prototype.calculator=function(t,e,n){return n.value},t}(),Fa=function(){function t(){this.parser=Ji,this.mixer=ta(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==M.LINE&&e!==M.PATH&&e!==M.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),a=function(){function t(){this.parser=Ji,this.mixer=ta(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),Ba=function(){function t(){this.parser=ia,this.mixer=aa}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof ii&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Pr(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===M.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),Ra=function(){function t(){this.parser=oa}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==M.POLYGON&&t.nodeName!==M.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),Ia=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=ta(0,1/0),t}return Yr(t,i),t}(i),Da=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof ii?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),za=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),Wa=function(){function t(){this.parser=fa,this.mixer=ka}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof ii?[]:n},e.postProcessor=function(t){var l,c,e=t.parsedStyle.transform,u=t;e&&e.length&&(c=l=0,u?(l=u.parsedStyle.defX||0,c=u.parsedStyle.defY||0,u.resetLocalTransform(),u.setLocalPosition(l,c)):u=new eo({}),e.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],u.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],u.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],u.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],u.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],u.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[ki,ki],u.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[ki],u.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[ki],u.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[ki],u.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[ki,ki,ki],u.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[Mi],u.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[Mi],u.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[Mi],u.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[Mi],u.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],u.setLocalSkew(oo(o[0]),oo(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],u.setLocalSkew(oo(o[0]),u.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],u.setLocalSkew(u.getLocalSkew()[0],oo(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],u.setLocalTransform(dt(yo,e,n,0,0,r,i,0,0,0,0,1,0,a+l,o+c,0,1))):"matrix3d"===s&&(dt.apply(Ft,[yo].concat(t.map(function(t){return t.value}))),yo[12]+=l,yo[13]+=c,u.setLocalTransform(yo)))})),u.getLocalTransform()},t}(),Ga=function(){function t(){this.parser=Ji}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)},t}(),Ha=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new Tr,this.page=new Tr,this.canvas=new Tr,this.viewport=new Tr,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(Wr)},Hr(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),Va=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Ur(n),e),n}return Yr(t,r),t}(Ha),Ya=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}Yr(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(Wr)},t.lookupNamespaceURI=function(t){throw new Error(Wr)},t.lookupPrefix=function(t){throw new Error(Wr)},t.normalize=function(){throw new Error(Wr)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e){e(this)||this.childNodes.forEach(function(t){t.forEach(e)})},Hr(d,[{key:"textContent",get:function(){var t="";this.nodeName===M.TEXT&&(t+=this.style.text);for(var e=Xr(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===M.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===M.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(function(){function t(){this.emitter=new _r}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,a,o=an(n)&&n||Ue(n)&&n.capture,n=Ue(n)&&n.once,s=Fr(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=Fr(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=an(n)&&n||Ue(n)&&n.capture,i=Fr(e)?void 0:e;return e=Fr(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new Va(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!(t instanceof Ha))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var n;if(n=this.document?this:this.defaultView||(null==(n=this.ownerDocument)?void 0:n.defaultView)){if(t.manager=n.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null!=(n=t.manager)&&n.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}()),qa=(Ya.DOCUMENT_POSITION_DISCONNECTED=1,Ya.DOCUMENT_POSITION_PRECEDING=2,Ya.DOCUMENT_POSITION_FOLLOWING=4,Ya.DOCUMENT_POSITION_CONTAINS=8,Ya.DOCUMENT_POSITION_CONTAINED_BY=16,Ya.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,Aa=Aa||{},Aa[Aa.Standard=0]="Standard",(o=Ta=Ta||{}).DESTROY="destroy",o.ATTR_MODIFIED="DOMAttrModified",o.INSERTED="DOMNodeInserted",o.REMOVED="removed",o.MOUNTED="DOMNodeInsertedIntoDocument",o.UNMOUNTED="DOMNodeRemovedFromDocument",o.BOUNDS_CHANGED="bounds-changed",o.RENDER_ORDER_CHANGED="render-order-changed",o.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return Yr(t,c),t}(Ha)),Ua=(qa.ADDITION=2,qa.MODIFICATION=1,qa.REMOVAL=3,0),$a=new qa(Ta.INSERTED,null,"","","",0,"",""),Xa=new qa(Ta.REMOVED,null,"","","",0,"",""),Ka=new Va(Ta.DESTROY),o=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).entity=Ua++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Aa.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:b(0,0,0),localRotation:re(0,0,0,1),localScale:b(1,1,1),localTransform:ft(),localSkew:se(0,0),position:b(0,0,0),rotation:re(0,0,0,1),scaling:b(1,1,1),worldTransform:ft(),origin:b(0,0,0)},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:_i,opacity:_i,fillOpacity:_i,strokeOpacity:_i,fill:_i,stroke:_i,transform:_i,transformOrigin:_i,visibility:_i,pointerEvents:_i,lineWidth:_i,lineCap:_i,lineJoin:_i,increasedLineWidthForHitTesting:_i,fontSize:_i,fontFamily:_i,fontStyle:_i,fontWeight:_i,fontVariant:_i,textAlign:_i,textBaseline:_i,textTransform:_i,zIndex:_i,filter:_i,shadowType:_i},t.parsedStyle={},t.attributes={},t}Yr(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(Wr)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return O.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),$a.relatedNode=this,t.dispatchEvent($a),t},e.insertBefore=function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t},e.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.removeChild=function(t){var e;return Xa.relatedNode=this,t.dispatchEvent(Xa),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),O.sceneGraphService.detach(t),t},e.removeChildren=function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)})},e.destroyChildren=function(){this.childNodes.slice().forEach(function(t){t.destroyChildren(),t.destroy()})},e.matches=function(t){return O.sceneGraphService.matches(t,this)},e.getElementById=function(t){return O.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return O.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return O.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return O.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return O.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return O.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(O.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null},e.find=function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r},e.findAll=function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r},e.after=function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}},e.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,a)}},e.replaceWith=function(){this.after.apply(this,arguments),this.remove()},e.append=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})},e.prepend=function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})},e.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},e.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.destroy=function(){this.dispatchEvent(Ka),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return O.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return O.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return O.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return O.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return O.sceneGraphService.getBoundingClientRect(this)},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.getAttributeNames=function(){return Object.keys(this.attributes)},e.getAttribute=function(t){var e=this.attributes[t];return void 0===e&&(t=Rr(t),e=this.attributes[t],k(e))?null:e},e.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.hasAttributes=function(){return!!this.getAttributeNames().length},e.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.setAttribute=function(t,e,n){this.attributes[t]=e},e.getAttributeNS=function(t,e){throw new Error(Wr)},e.getAttributeNode=function(t){throw new Error(Wr)},e.getAttributeNodeNS=function(t,e){throw new Error(Wr)},e.hasAttributeNS=function(t,e){throw new Error(Wr)},e.removeAttributeNS=function(t,e){throw new Error(Wr)},e.removeAttributeNode=function(t){throw new Error(Wr)},e.setAttributeNS=function(t,e,n){throw new Error(Wr)},e.setAttributeNode=function(t){throw new Error(Wr)},e.setAttributeNodeNS=function(t){throw new Error(Wr)},e.toggleAttribute=function(t,e){throw new Error(Wr)},Hr(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}}]),t}(Ya),Za=new qa(Ta.ATTR_MODIFIED,null,null,null,null,qa.MODIFICATION,null,null),Ja={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},Qa={anchor:[0,0],fill:Ei,stroke:Ei,transform:[],zIndex:0,filter:[],shadowType:"outer"},to=[].concat(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]),eo=function(i){function o(t){var r=i.call(this)||this;return r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||M.GROUP,r.config.style=Vr({},r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,Qa,r.config.initialParsedStyle),Object.assign(r.attributes,Ja),r.initAttributes(r.config.style),r.style=new Proxy({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}}),O.displayObjectPool.add(r.entity,Ur(r)),r}Yr(o,i);var t=o.prototype;return t.destroy=function(){i.prototype.destroy.call(this),O.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},t.cloneNode=function(e,t){var n,r=Vr({},this.attributes);for(n in r){var i=r[n];i instanceof o&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),a.appendChild(t))}),a},t.initAttributes=function(t){var e=this.renderable;O.styleValueRegistry.processProperties(this,t=void 0===t?{}:t,{forceUpdateGeometry:!0,usedAttributes:to}),e.dirty=!0},t.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=Rr(t);on(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},t.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],o=(O.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(Za.relatedNode=this,Za.prevValue=i,Za.newValue=e,Za.attrName=t,Za.prevParsedValue=a,Za.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(Za):(Za.target=this).ownerDocument.defaultView.dispatchEvent(Za,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,o)},t.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return new Pr(n,e,r-n,t-e)},t.setOrigin=function(t,e,n){return O.sceneGraphService.setOrigin(this,ao(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getOrigin=function(){return O.sceneGraphService.getOrigin(this)},t.setPosition=function(t,e,n){return O.sceneGraphService.setPosition(this,ao(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.setLocalPosition=function(t,e,n){return O.sceneGraphService.setLocalPosition(this,ao(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translate=function(t,e,n){return O.sceneGraphService.translate(this,ao(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translateLocal=function(t,e,n){return O.sceneGraphService.translateLocal(this,ao(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getPosition=function(){return O.sceneGraphService.getPosition(this)},t.getLocalPosition=function(){return O.sceneGraphService.getLocalPosition(this)},t.scale=function(t,e,n){return this.scaleLocal(t,e,n)},t.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=ao(t,e=e||t,n=n||t)),O.sceneGraphService.scaleLocal(this,t),this},t.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=ao(t,e=e||t,n=n||t)),O.sceneGraphService.setLocalScale(this,t),this},t.getLocalScale=function(){return O.sceneGraphService.getLocalScale(this)},t.getScale=function(){return O.sceneGraphService.getScale(this)},t.getEulerAngles=function(){return so(lo(m(),O.sceneGraphService.getWorldTransform(this))[2])},t.getLocalEulerAngles=function(){return so(lo(m(),O.sceneGraphService.getLocalRotation(this))[2])},t.setEulerAngles=function(t){return O.sceneGraphService.setEulerAngles(this,0,0,t),this},t.setLocalEulerAngles=function(t){return O.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},t.rotateLocal=function(t,e,n){return k(e)&&k(n)?O.sceneGraphService.rotateLocal(this,0,0,t):O.sceneGraphService.rotateLocal(this,t,e,n),this},t.rotate=function(t,e,n){return k(e)&&k(n)?O.sceneGraphService.rotate(this,0,0,t):O.sceneGraphService.rotate(this,t,e,n),this},t.setRotation=function(t,e,n,r){return O.sceneGraphService.setRotation(this,t,e,n,r),this},t.setLocalRotation=function(t,e,n,r){return O.sceneGraphService.setLocalRotation(this,t,e,n,r),this},t.setLocalSkew=function(t,e){return O.sceneGraphService.setLocalSkew(this,t,e),this},t.getRotation=function(){return O.sceneGraphService.getRotation(this)},t.getLocalRotation=function(){return O.sceneGraphService.getLocalRotation(this)},t.getLocalSkew=function(){return O.sceneGraphService.getLocalSkew(this)},t.getLocalTransform=function(){return O.sceneGraphService.getLocalTransform(this)},t.getWorldTransform=function(){return O.sceneGraphService.getWorldTransform(this)},t.setLocalTransform=function(t){return O.sceneGraphService.setLocalTransform(this,t),this},t.resetLocalTransform=function(){O.sceneGraphService.resetLocalTransform(this)},t.getAnimations=function(){return this.activeAnimations},t.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},t.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},t.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},t.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},t.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))+1),this},t.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))-1),this},t.getConfig=function(){return this.config},t.attr=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?Ue(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes},t.getMatrix=function(t){var t=t||this.getWorldTransform(),e=_t(m(),t),n=e[0],e=e[1],r=St(m(),t),i=r[0],r=r[1],t=Et(Jt(),t),t=lo(m(),t),a=t[0],t=t[2],o=(a=a||t,t=n,n=e,e=i,i=r,r=Math.cos(a),a=Math.sin(a),e*r),s=i*a,l=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,c=new lt(9);return c[0]=o,c[1]=s,c[2]=l,c[3]=e,c[4]=a,c[5]=i,c[6]=r,c[7]=t,c[8]=n,c},t.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.setMatrix=function(t){var t=co(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)},t.setLocalMatrix=function(t){var t=co(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)},t.show=function(){this.style.visibility="visible"},t.hide=function(){this.style.visibility="hidden"},t.getCount=function(){return this.childElementCount},t.getParent=function(){return this.parentElement},t.getChildren=function(){return this.children},t.getFirst=function(){return this.firstElementChild},t.getLast=function(){return this.lastElementChild},t.getChildByIndex=function(t){return this.children[t]||null},t.add=function(t,e){return this.appendChild(t,e)},t.setClip=function(t){this.style.clipPath=t},t.set=function(t,e){this.config[t]=e},t.get=function(t){return this.config[t]},t.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.setZIndex=function(t){return this.style.zIndex=t,this},Hr(o,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),o}(o),no={},ro=[],Ya=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return no[t]},e.getAll=function(){return Object.keys(no).map(function(t){return no[t]})},e.add=function(t,e){(no[t]=e).nodeName===M.HTML&&ro.push(e)},e.remove=function(t){var e=no[t];e&&(delete no[t],e.nodeName===M.HTML)&&(t=ro.indexOf(e),ro.splice(t,1))},e.getHTMLs=function(){return ro},t}();function io(t){return void 0===t?0:360<t||t<-360?t%360:t}function ao(t,e,n){var r,i;return void 0===e&&(e=0),void 0===n&&(n=0),en(t)?b(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new lt(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):b(t[0],t[1]||e,t[2]||n)}function oo(t){return t*(Math.PI/180)}function so(t){return t*(180/Math.PI)}function lo(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=St(m(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function co(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=so(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var uo=ft(),fo=ft(),ho=Kt(),d=[m(),m(),m()],po=m();function go(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var yo=ft();mo={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},vo="";var mo,vo,bo=function(t){return vo=t,wo()};function xo(t){throw new Error(vo+": "+t)}function wo(){var t=Lo(ko);return 0<vo.length&&xo("Invalid input not EOF"),t}function ko(){return Mo("linear-gradient",mo.linearGradient,_o)||Mo("repeating-linear-gradient",mo.repeatingLinearGradient,_o)||Mo("radial-gradient",mo.radialGradient,So)||Mo("repeating-radial-gradient",mo.repeatingRadialGradient,So)||Mo("conic-gradient",mo.conicGradient,So)}function Mo(n,t,r){return Oo(t,function(t){var e=r();return e&&!Io(mo.comma)&&xo("Missing comma before color stops"),{type:n,orientation:e,colorStops:Lo(No)}})}function Oo(t,e){t=Io(t);if(t)return Io(mo.startCall)||xo("Missing ("),e=e(t),Io(mo.endCall)||xo("Missing )"),e}function _o(){return Ro("directional",mo.sideOrCorner,1)||Ro("angular",mo.angleValue,1)}function So(){var t,e,n=Eo();return n&&((t=[]).push(n),e=vo,Io(mo.comma))&&((n=Eo())?t.push(n):vo=e),t}function Eo(){var t,e=function(){var t=Ro("shape",/^(circle)/i,0);t&&(t.style=Bo()||Ao());return t}()||function(){var t=Ro("shape",/^(ellipse)/i,0);t&&(t.style=jo()||Ao());return t}();return e?e.at=To():(t=Ao())?(e=t,(t=To())&&(e.at=t)):(t=Po())&&(e={type:"default-radial",at:t}),e}function Ao(){return Ro("extent-keyword",mo.extentKeywords,1)}function To(){var t;if(Ro("position",/^at/,0))return(t=Po())||xo("Missing positioning value"),t}function Po(){var t={x:jo(),y:jo()};if(t.x||t.y)return{type:"position",value:t}}function Lo(t){var e=t(),n=[];if(e)for(n.push(e);Io(mo.comma);)(e=t())?n.push(e):xo("One extra comma");return n}function No(){var t=Ro("hex",mo.hexColor,1)||Oo(mo.rgbaColor,function(){return{type:"rgba",value:Lo(Co)}})||Oo(mo.rgbColor,function(){return{type:"rgb",value:Lo(Co)}})||Ro("literal",mo.literalColor,0);return t||xo("Expected color definition"),t.length=jo(),t}function Co(){return Io(mo.number)[1]}function jo(){return Ro("%",mo.percentageValue,1)||Fo()||Bo()}function Fo(){return Ro("position-keyword",mo.positionKeywords,1)}function Bo(){return Ro("px",mo.pixelValue,1)||Ro("em",mo.emValue,1)}function Ro(t,e,n){e=Io(e);if(e)return{type:t,value:e[n]}}function Io(t){var e=/^[\n\r\t\s]+/.exec(vo),e=(e&&Do(e[0].length),t.exec(vo));return e&&Do(e[0].length),e}function Do(t){vo=vo.substring(t)}function zo(t,e){return t[0]===e[0]&&t[1]===e[1]}function Wo(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function Go(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Ho(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=oo(r=nn(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=Vo({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=Vo(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var Vo=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function Yo(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=Ho({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=Ho({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function qo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Uo(t,e){return qo(t)*qo(e)?(t[0]*e[0]+t[1]*e[1])/(qo(t)*qo(e)):1}function $o(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Uo(t,e))}o=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Xr(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var f=(f=(f="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(f+=r("_result"+t)),i&&(f+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:f=f+"}\n"+"})"})+");\n";break;case"promise":o=(o=(o=(o+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),o=(o=o+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return o},e.callTapsSeries=function(t){var a=this,o=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),f=e||n,h="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,h=(h+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(f?"return ":"")+"_next"+n+"();\n"}),d),i=a.callTap(n,{onError:function(t){return o(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return h+=d()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}();new(function(t){function e(){return t.apply(this,arguments)||this}return Yr(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(o)),new(function(t){function e(){return t.apply(this,arguments)||this}return Yr(e,t),e.prototype.content=function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(o)),new(function(t){function e(){return t.apply(this,arguments)||this}return Yr(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(o));new(function(t){function e(){return t.apply(this,arguments)||this}return Yr(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(o));var Xo=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Ko=/([\"\'])[^\'\"]+\1/;function Zo(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-cs)?0:16-e,r=is();return ls[r]=t,1<Object.keys(ls).length||setTimeout(function(){cs=n;var e=ls;ls={},Object.keys(e).forEach(function(t){return e[t](ss())})},e),r}function Jo(t){delete ls[t]}function Qo(t){return"string"!=typeof t?Zo:""===t?as.requestAnimationFrame:as[t+"RequestAnimationFrame"]}var ts,es,ns,rs=1,is=function(){return rs++},as="object"==typeof self&&self.self==self?self:"object"==typeof j&&j.global==j?j:{},os=Date.now(),ss=function(){return as.performance&&"function"==typeof as.performance.now?as.performance.now():Date.now()-os},ls={},cs=Date.now(),o=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],Qo),us=Qo(o),o="string"!=typeof(o=o)?Jo:""===o?as.cancelAnimationFrame:as[o+"CancelAnimationFrame"]||as[o+"CancelRequestAnimationFrame"],fs=(as.requestAnimationFrame=us,as.cancelAnimationFrame=o,[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:c.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:c.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:c.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:c.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:c.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:c.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:c.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:c.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:c.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:c.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:c.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:c.FILTER},{n:"clipPath",syntax:c.DEFINED_PATH},{n:"textPath",syntax:c.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:c.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"center":t===M.TEXT?"text-anchor":"left top"},l:!0,syntax:c.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:c.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:c.COORDINATE},{n:"cy",int:!0,d:"0",syntax:c.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:c.COORDINATE},{n:"y",int:!0,d:"0",syntax:c.COORDINATE},{n:"z",int:!0,d:"0",syntax:c.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:c.COORDINATE},{n:"y1",int:!0,l:!0,syntax:c.COORDINATE},{n:"z1",int:!0,l:!0,syntax:c.COORDINATE},{n:"x2",int:!0,l:!0,syntax:c.COORDINATE},{n:"y2",int:!0,l:!0,syntax:c.COORDINATE},{n:"z2",int:!0,l:!0,syntax:c.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:c.PATH,p:50},{n:"points",l:!0,syntax:c.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:c.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:c.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:c.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:c.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:c.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:c.NUMBER,d:function(t){return t===M.PATH||t===M.POLYGON||t===M.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:c.MARKER},{n:"markerEnd",syntax:c.MARKER},{n:"markerMid",syntax:c.MARKER},{n:"markerStartOffset",syntax:c.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:c.LENGTH,l:!0,int:!0,d:"0"}]),hs={},ds=new WeakMap,ps=m(),gs=m(),ys=m(),us=function(){function t(){var e=this;fs.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){hs[t]=e})},e.unregisterMetadata=function(t){delete hs[t]},e.getPropertySyntax=function(t){return O.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i=this,t=t=void 0===t?{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}:t,a=t.skipUpdateAttribute,e=t.skipParse,o=t.forceUpdateGeometry,t=t.usedAttributes,s=o,l=Object.keys(r);l.forEach(function(t){var e=Rr(t);a||(n.attributes[e]=r[t]),!s&&null!=(t=hs[e])&&t.l&&(s=!0)}),e||l.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),null!=t&&t.length&&(l=Array.from(new Set(l.concat(t)))),["path","points","text","textTransform","anchor","transform","transformOrigin"].forEach(function(t){var e=l.indexOf(t);-1<e&&(l.splice(e,1),l.push(t))}),l.forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),l.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),n.children.length&&l.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},e.parseProperty=function(t,e,n){var r,t=hs[t],i=e;return"unset"===(e=""!==e&&!k(e)?e:"unset")||"initial"===e||"inherit"===e?i=mi(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=mi(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=hs[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof ii){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))k(r)||(e=this.parseProperty(t,Fr(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),k(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof ii?e.value:e}return a},e.postProcessProperty=function(t,e){var t=hs[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)},e.addUnresolveProperty=function(t,e){var n=ds.get(t);n||(ds.set(t,[]),n=ds.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=ds.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=ds.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),ds.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,g,y,m,v=O.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new Sr),s.renderBounds||(s.renderBounds=new Sr),e=t.parsedStyle,d=(v=v.update(e,t)).width,h=v.height,p=void 0===(p=v.depth)?0:p,f=void 0===(f=v.offsetX)?0:f,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=h<0,p=It(ps,Math.abs(d)/2,Math.abs(h)/2,p/2),l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,y=e.shadowType,g=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,t.nodeName===M.TEXT&&delete e.anchor,d=It(gs,(1-2*(o&&o[0]||0))*d/2+f,(1-2*(o&&o[1]||0))*h/2+m,(1-2*(o&&o[2]||0))*p[2]+v),s.contentBounds.update(d,p),f=t.nodeName===M.POLYLINE||t.nodeName===M.POLYGON||t.nodeName===M.PATH?Math.SQRT2:.5,l&&!l.isNone&&Dt(p,p,It(ys,h=((c||0)+(u||0))*f,h,0)),s.renderBounds.update(d,p),g&&y&&"inner"!==y&&(v=(m=s.renderBounds).min,l=m.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,f=e.shadowOffsetY||0,h=v[0]-c+u,d=l[0]+c+u,p=v[1]-c+f,g=l[1]+c+f,v[0]=Math.min(v[0],h),l[0]=Math.max(l[0],d),v[1]=Math.min(v[1],p),l[1]=Math.max(l[1],g),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Dt(s.renderBounds.halfExtents,s.renderBounds.halfExtents,b(i,i,0)))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,y=(n?-1:1)*Ui(a[0],0,t),m=(r?-1:1)*Ui(a[1],1,t),y-=(n?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(y,m),O.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=hs[t];return!!t&&t.inh},t}();(o=ts=ts||{})[o.ORBITING=0]="ORBITING",o[o.EXPLORING=1]="EXPLORING",o[o.TRACKING=2]="TRACKING",(o=es=es||{})[o.DEFAULT=0]="DEFAULT",o[o.ROTATIONAL=1]="ROTATIONAL",o[o.TRANSLATIONAL=2]="TRANSLATIONAL",o[o.CINEMATIC=3]="CINEMATIC",(o=ns=ns||{})[o.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",o[o.PERSPECTIVE=1]="PERSPECTIVE";var ms="updated",o=function(){function t(){this.canvas=void 0,this.eventEmitter=new _r,this.matrix=ft(),this.right=b(1,0,0),this.up=b(0,1,0),this.forward=b(0,0,1),this.position=b(0,0,1),this.focalPoint=b(0,0,0),this.distanceVector=b(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ft(),this.projectionMatrixInverse=ft(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=ts.EXPLORING,this.trackingMode=es.DEFAULT,this.projectionMode=ns.PERSPECTIVE,this.frustum=new Ar,this.orthoMatrix=ft()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===ns.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===ts.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===ts.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==ts.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return yt(ft(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=Mt(ft(),[t,e,0]);this.jitteredProjectionMatrix=vt(ft(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===ns.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===ns.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===ns.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===ns.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.setZoom=function(t){return this.zoom=t,this.projectionMode===ns.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===ns.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=b(t.x-r,t.y-n,0),e=Ht(i,this.right)/Bt(this.right),r=Ht(i,this.up)/Bt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=ns.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(oo(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,xt(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=ns.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),Nt(this.projectionMatrix,s,n,r,e,i,a),xt(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=ao(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=b(0,1,0);return this.focalPoint=ao(t,e,n),this.trackingMode===es.CINEMATIC&&(t=(r=zt(m(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=Bt(r),e=so(Math.asin(e/r)),r=90+so(Math.atan2(n,t)),kt(n=ft(),n,oo(r)),wt(n,n,oo(e)),i=Yt(m(),[0,1,0],n)),yt(this.matrix,Ct(ft(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=m(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=io(t),this.computeMatrix(),this._getAxes(),this.type===ts.ORBITING||this.type===ts.EXPLORING?this._getPosition():this.type===ts.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=io(t),this.computeMatrix(),this._getAxes(),this.type===ts.ORBITING||this.type===ts.EXPLORING?this._getPosition():this.type===ts.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=io(t),this.computeMatrix(),this._getAxes(),this.type===ts.ORBITING||this.type===ts.EXPLORING?this._getPosition():this.type===ts.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=Qt(Jt(),[0,0,1],oo(this.roll)),e=(pt(this.matrix),Qt(Jt(),[1,0,0],oo((this.rotateWorld&&this.type!==ts.TRACKING||this.type===ts.TRACKING?1:-1)*this.elevation))),n=Qt(Jt(),[0,1,0],oo((this.rotateWorld&&this.type!==ts.TRACKING||this.type===ts.TRACKING?1:-1)*this.azimuth)),n=te(Jt(),n,e),n=te(Jt(),n,t),e=Tt(ft(),n);this.type===ts.ORBITING||this.type===ts.EXPLORING?(bt(this.matrix,this.matrix,this.focalPoint),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])):this.type===ts.TRACKING&&(bt(this.matrix,this.matrix,this.position),vt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=ao(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){Rt(this.right,ao(Zt(Kt(),[1,0,0,0],this.matrix))),Rt(this.up,ao(Zt(Kt(),[0,1,0,0],this.matrix))),Rt(this.forward,ao(Zt(Kt(),[0,0,1,0],this.matrix))),Gt(this.right,this.right),Gt(this.up,this.up),Gt(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=Bt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===ts.TRACKING||this.rotateWorld?(this.elevation=so(Math.asin(e/r)),this.azimuth=so(Math.atan2(-t,-n))):(this.elevation=-so(Math.asin(e/r)),this.azimuth=-so(Math.atan2(-t,-n)))},e._getPosition=function(){Rt(this.position,ao(Zt(Kt(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;qt(this.distanceVector,[0,0,-this.distance],(t=ct(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Dt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=zt(m(),this.focalPoint,this.position),this.distance=Bt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===ns.ORTHOGRAPHIC&&(t=this.position,e=Qt(Jt(),[0,0,1],-this.roll*Math.PI/180),At(this.orthoMatrix,e,b((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),b(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=vt(ft(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(ms))},e.rotate=function(t,e,n){throw new Error(Wr)},e.pan=function(t,e){throw new Error(Wr)},e.dolly=function(t){throw new Error(Wr)},e.createLandmark=function(t,e){throw new Error(Wr)},e.gotoLandmark=function(t,e){throw new Error(Wr)},t}(),vs=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),bs=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),xs=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),ws=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),ks=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),Ms=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!Qe(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),Os=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!k(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),_s=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),Ss=(0,/\[\s*(.*)=(.*)\s*\]/),Es=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(Ss),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!k(t))&&t.toString?t.toString():""},t}();function As(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var Ts=function(){function t(t){var o,i,a,r,s,l,c,u,f,n,h,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Va(Ta.BOUNDS_CHANGED),this.rotate=(o=Jt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(r=Jt(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),ie(o,a),ee(o,o),te(r,o,r),te(n.localRotation,r,i),oe(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=Jt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;ne(i,e[0],e[1],e[2]),ae(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=Jt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),ie(a,ee(Jt(),r)),ae(n.localRotation,n.localRotation,a),g.dirtifyLocal(t,n)):g.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,o,s,l,c,u,f,h,d,p,n=t.transformable;Ut(e,m())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(h=l*c-o*i),l=l*(f=s*i-l*u)-o*d,o=o*h-s*f,h*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(f*=s)+(p*=2),r[1]=u+h+l,r[2]=i+d+o,Dt(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=ft(),s=m(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Ut(g.getPosition(t),s)||(Rt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ht(r,e.worldTransform),yt(r,r),Yt(n.localPosition,s,r)):Rt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=m(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Ut(n.localPosition,l)||(Rt(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(c=m(),u=m(),f=m(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Ut(e="number"==typeof e?It(u,e,n,r):e,c)||(Dt(f,g.getPosition(t),e),g.setPosition(t,f))}),this.setRotation=function(){var o=Jt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=re(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ie(o,n),ee(o,o),te(a.localRotation,o,e),oe(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ft(),h=m(),d=re(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(At(t.localTransform,t.localRotation,t.localPosition,b(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=pt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),vt(t.localTransform,t.localTransform,e)),e=At(n,d,h,t.localScale,t.origin),vt(t.localTransform,t.localTransform,e)):At(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,k(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Ut(e,n.origin)||((r=n.origin)[0]=e[0],r[1]=e[1],r[2]=e[2]||0,this.dirtifyLocal(t,n))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;ne(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=b(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=b(e[0],e[1],e[2]||n.localScale[2]);Ut(e,n.localScale)||(Rt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=re(e,n,r,i));n=t.transformable;ie(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=se(e,n));var r,n=t.transformable;r=n.localSkew,e=e,r[0]=e[0],r[1]=e[1],this.dirtifyLocal(t,n)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.pendingEvents=[],i.clear()},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)As(n),n=n.parentNode;e&&t.forEach(function(t){As(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t,!0),t.dispatchEvent(new qa(Ta.ATTR_MODIFIED,t,n,n,e,qa.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return Et(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return St(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=_t(m(),e),r=Et(Jt(),e),e=St(m(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return Sr.isEmpty(e)?null:((n=n||new Sr).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new Sr},e.getBounds=function(t,e){var n,r,i=this,a=(void 0===e&&(e=!1),t.renderable);return a.boundsDirty||e||!a.bounds?!a.renderBoundsDirty&&e&&a.renderBounds?a.renderBounds:(n=e?a.renderBounds:a.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new Sr).update(t.center,t.halfExtents))}),e&&(t=function(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new Sr)&&(e?a.renderBounds=r:a.bounds=r),e?a.renderBoundsDirty=!1:a.boundsDirty=!1,r):a.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=ft(),r=(t.parentNode.transformable&&(n=yt(ft(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!Sr.isEmpty(r))return(e=new Sr).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(Sr.isEmpty(i)||(r=new Sr).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new Pr(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Pr((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?vt(e.worldTransform,n.worldTransform,e.localTransform):ht(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),Ps={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Ls=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Ns=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),Cs=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),js=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!Cs.exec(e)&&!Ns.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,Ps.MetricsString+Ps.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(Ps.BaselineSymbol).width),s=Ps.HeightMultiplier*o,o=o*Ps.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=en(e)&&e+"px"||"16px",a=Qe(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!Ko.test(s)&&Xo.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(g.length),m=0;if(!u){for(var v=0;v<g.length;v++){var b=p.measureText(g[v]).width+(g[v].length-1)*c;y[v]=b,m=Math.max(m,b)}var r=m+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(g.length-1)*(x+f),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:h,width:r,height:i,lines:g,lineWidths:y,lineHeight:x+=f,maxLineWidth:m,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Pr(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength();for(var k=0;k<g.length;k++)p.measureText(g[k]).width,g[k].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},y=Array.from(u).reduce(function(t,e){return t+g(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],k=g(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+k){if(s<=h+1){if(e.isOverflowing=!0,0<y&&y<=c){for(var M=f[h].length,O=0,_=M,S=0;S<M;S++){var E=g(f[h][S]);if(c<O+E+y){_=S;break}O+=E}f[h]=(f[h]||"").slice(0,_)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(f=this.trimByKinsokuShorui(f),d+=g(x||""))}d+=k,f[h]=(f[h]||"")+b}}return f.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=Ps.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=Ps.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!Ls.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!Ls.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),O={},vs=(Ms=new Ms,ks=new ks,(vc={})[M.CIRCLE]=new vs,vc[M.ELLIPSE]=new bs,vc[M.RECT]=Ms,vc[M.IMAGE]=Ms,vc[M.GROUP]=Ms,vc[M.LINE]=new xs,vc[M.TEXT]=new Os(O),vc[M.POLYLINE]=ks,vc[M.POLYGON]=ks,vc[M.PATH]=new ws,vc[M.HTML]=null,vc[M.MESH]=null,vc),Os=(bs=new n,Ms=new i,(xs={})[c.PERCENTAGE]=null,xs[c.NUMBER]=new ja,xs[c.ANGLE]=new e,xs[c.DEFINED_PATH]=new r,xs[c.PAINT]=bs,xs[c.COLOR]=bs,xs[c.FILTER]=new _a,xs[c.LENGTH]=Ms,xs[c.LENGTH_PERCENTAGE]=Ms,xs[c.LENGTH_PERCENTAGE_12]=new Pa,xs[c.LENGTH_PERCENTAGE_14]=new La,xs[c.COORDINATE]=new Na,xs[c.OFFSET_DISTANCE]=new Fa,xs[c.OPACITY_VALUE]=new a,xs[c.PATH]=new Ba,xs[c.LIST_OF_POINTS]=new Ra,xs[c.SHADOW_BLUR]=new Ia,xs[c.TEXT]=new Da,xs[c.TEXT_TRANSFORM]=new za,xs[c.TRANSFORM]=new Wa,xs[c.TRANSFORM_ORIGIN]=new Ea,xs[c.Z_INDEX]=new Ga,xs[c.MARKER]=new Ca,xs),ks=(O.CameraContribution=o,O.AnimationTimeline=null,O.EasingFunction=null,O.offscreenCanvas=new _s,O.displayObjectPool=new Ya,O.sceneGraphSelector=new Es,O.sceneGraphService=new Ts(O),O.textService=new js(O),O.geometryUpdaterFactory=vs,O.CSSPropertySyntaxFactory=Os,O.styleValueRegistry=new us,O.layoutRegistry=null,O.globalThis=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==j)return j;throw new Error("Unable to locate global `this`")}(),function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}());function Fs(){Fs=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=h.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Bs(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Rs(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Bs(r,e,n,i,a,"next",t)}function a(t){Bs(r,e,n,i,a,"throw",t)}i(void 0)})}}function Is(){return(Is=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Ds(t,e){return(Ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}M.CIRCLE,M.ELLIPSE,M.IMAGE,M.RECT,M.LINE,M.POLYLINE,M.POLYGON,M.TEXT,M.PATH,M.HTML,(ws=Sb=Sb||{}).READY="ready",ws.BEFORE_RENDER="beforerender",ws.AFTER_RENDER="afterrender",ws.BEFORE_DESTROY="beforedestroy",ws.AFTER_DESTROY="afterdestroy",ws.RESIZE="resize",ws.DIRTY_RECTANGLE="dirtyrectangle",new Va(Ta.MOUNTED),new Va(Ta.UNMOUNTED),new Va(Sb.BEFORE_RENDER),new Va(Sb.AFTER_RENDER);function zs(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}function Ws(t){return qs(t,"Function")}function Gs(t){return null==t}var Hs=function(){function i(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return i.prototype.apply=function(t){function e(t){var a,o,s,l,c,e,u=t.target,f=u===p,h=f&&d.dragndropPluginOptions.isDocumentDraggable?p:u.closest&&u.closest("[draggable=true]");h&&(a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],e=function(){var e=Rs(Fs().mark(function t(e){var n,r,i;return Fs().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=je([e.clientX,e.clientY],s),n<=d.dragndropPluginOptions.dragstartTimeThreshold||r<=d.dragndropPluginOptions.dragstartDistanceThreshold)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){t.next=21;break}return n="pointer"===d.dragndropPluginOptions.overlap?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,p.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(d.dragndropPluginOptions.isDocumentDroppable?p:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",h.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var d=this,n=t.renderingService,p=t.renderingContext.root.ownerDocument,r=p.defaultView;n.hooks.init.tapPromise(i.tag,Rs(Fs().mark(function t(){return Fs().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(i.tag,function(){r.removeEventListener("pointerdown",e)})},i}(),Vs=(Hs.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),Ds(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new Hs(Is({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},r.setOptions=function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)},e}(ks)),Ys={}.toString,qs=function(t,e){return Ys.call(t)==="[object "+e+"]"},Us=function(t){return Array.isArray?Array.isArray(t):qs(t,"Array")};function $s(t){if(!Ks(t)||!qs(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Xs(t){return(t=Qs(t)).charAt(0).toLowerCase()+t.substring(1)}var Ks=function(t){return"object"==typeof t&&null!==t},Zs=function(t){return qs(t,"Number")},Js=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){Ws(n)&&"prototype"===e||r.push(t)};if(e)if(Us(e))for(var a=0,o=e.length;a<o&&!1!==i(e[a],a);a++);else if(t=typeof e,null!==e&&"object"==t||"function"==t)for(var s in e)if(e.hasOwnProperty(s)&&!1===i(e[s],s))break;return r},Qs=function(t){return Gs(t)?"":t.toString()},tl=function(t){t=Qs(t);return t.charAt(0).toUpperCase()+t.substring(1)};var el=5;function nl(t){return t}var rl,B=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||el,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&$s(o)?($s(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Us(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},il=function(t,e){if(!zs(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},al=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function ol(t){return Gs(t)?0:(zs(t)?t:Object.keys(t)).length}!function(a,o){var s;if(Ws(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(rl=rl||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),rl.measureText(qs(t,"String")?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],Js(e=void 0===e?{}:e)).join("")});const sl=()=>[["cartesian"]],ll=(sl.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]),cl=(ll.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),ul=(cl.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),fl=(ul.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),hl=(fl.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),dl=(hl.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),pl=(dl.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...ul(),...ll({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),gl=(pl.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...fl(),...ll({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),yl=(gl.props={},()=>[["parallel",0,1,0,1]]),ml=(yl.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),vl=(ml.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),bl=(vl.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),xl=(bl.props={},({value:e})=>t=>t.map(()=>e)),wl=(xl.props={},({value:e})=>t=>t.map(e)),kl=(wl.props={},({value:e})=>t=>t.map(t=>t[e])),Ml=(kl.props={},({value:t})=>()=>t);function Ol(t,e){return t.parent===e.parent?1:2}function _l(t,e){return t+e.x}function Sl(t,e){return Math.max(t,e.y)}function El(){var s=Ol,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(_l,0)/e.length,t.y=1+n.reduce(Sl,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function Al(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function Tl(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Ll)):void 0===e&&(e=Pl);for(var n,r,i,a,o,t=new jl(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new jl(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(Cl)}function Pl(t){return t.children}function Ll(t){return Array.isArray(t)?t[1]:null}function Nl(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Cl(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function jl(t){this.data=t,this.depth=this.height=0,this.parent=null}function Fl(t){return null==t?null:Bl(t)}function Bl(t){if("function"!=typeof t)throw new Error;return t}function Rl(){return 0}function Il(t){return function(){return t}}Ml.props={},jl.prototype=Tl.prototype={constructor:jl,count:function(){return this.eachAfter(Al)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return Tl(this).eachBefore(Nl)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const Dl=4294967296;function zl(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Gl(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Vl(t[0],t[1]);case 3:return Yl(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Hl(e,t))return[e];for(n=0;n<t.length;++n)if(Wl(e,t[n])&&Hl(Vl(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Wl(Vl(t[n],t[r]),e)&&Wl(Vl(t[n],e),t[r])&&Wl(Vl(t[r],e),t[n])&&Hl(Yl(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Wl(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function Gl(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Hl(t,e){for(var n=0;n<e.length;++n)if(!Gl(t,e[n]))return;return 1}function Vl(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function Yl(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,f=i-o,h=i-l,d=e-t,p=n-t,g=r*r+i*i-t*t,a=g-a*a-o*o+e*e,o=g-s*s-l*l+n*n,e=u*f-c*h,g=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+g*s+l*n),a=g*g+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+g+s*o,y:i+l+n*o,r:o}}function ql(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Ul(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function $l(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function Xl(t){this._=t,this.next=null,this.previous=null}function Kl(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,f,h,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;ql(r,d,i=t[2]),d=new Xl(d),r=new Xl(r),i=new Xl(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){ql(d._,r._,i=t[l]),i=new Xl(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(Ul(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(Ul(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=$l(d);(i=i.next)!==r;)(s=$l(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=zl(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function Zl(t){return Math.sqrt(t.value)}function Jl(){var n=null,r=1,i=1,a=Rl;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Dl)/Dl}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Ql(n)).eachAfter(tc(a,.5,e)).eachBefore(ec(1)):t.eachBefore(Ql(Zl)).eachAfter(tc(Rl,1,e)).eachAfter(tc(a,t.r/Math.min(r,i),e)).eachBefore(ec(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=Fl(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:Il(+t),e):a},e}function Ql(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function tc(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=Kl(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function ec(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function nc(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function rc(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var ic={depth:-1},ac={},oc={};function sc(t){return t.id}function lc(t){return t.parentId}function cc(){var y,m=sc,v=lc;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=m,f=v,h=new Map;if(null!=y){const p=c.map((t,e)=>{t=y(t,e,n),e=(t=""+t).length;return"/"===(t=fc(t,e-1)&&!fc(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(uc);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(uc(r)),c.push(oc));u=(t,e)=>p[e],f=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new jl(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?ac:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===ac)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=y){for(;i.data===oc&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===oc;--t)o.data=null}if(i.parent=ic,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(Cl),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=Fl(t),e):m},e.parentId=function(t){return arguments.length?(v=Fl(t),e):v},e.path=function(t){return arguments.length?(y=Fl(t),e):y},e}function uc(t){let e=t.length;if(e<2)return"";for(;1<--e&&!fc(t,e););return t.slice(0,e)}function fc(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function hc(t,e){return t.parent===e.parent?1:2}function dc(t){var e=t.children;return e?e[0]:t.t}function pc(t){var e=t.children;return e?e[e.length-1]:t.t}function gc(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function yc(){var h=hc,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new gc(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new gc(r[i],i)),n.parent=e;return(t.parent=new gc(null,0)).children=[t],t}(t);return s.eachAfter(f),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:h(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function f(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,f=s.m;o=pc(o),i=dc(i),o&&i;)s=dc(s),(a=pc(a)).a=t,0<(r=o.z+u-i.z-l+h(o._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,f+=s.m,c+=a.m;o&&!pc(a)&&(a.t=o,a.m+=u-c),i&&!dc(s)&&(s.t=i,s.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function mc(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}gc.prototype=Object.create(jl.prototype);var vc=(1+Math.sqrt(5))/2;function bc(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,g,y,m=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(y=(f=h=u)*u*(g=Math.max(c/l,l/c)/(k*t)),p=Math.max(h/y,y/f);x<w;++x){if(u+=s=v[x].value,s<f&&(f=s),h<s&&(h=s),y=u*u*g,p<(d=Math.max(h/y,y/f))){u-=s;break}p=d}m.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?rc(o,n,r,i,k?r+=c*u/k:a):mc(o,n,r,k?n+=l*u/k:i,a),k-=u,b=x}return m}var xc=function e(a){function t(t,e,n,r,i){bc(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(vc);function wc(t,e,n,r,i){var a,o,g=t.children,s=g.length,y=new Array(s+1);for(y[0]=o=a=0;a<s;++a)y[a+1]=o+=g[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=g[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=y[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;y[h]<c?u=1+h:f=h}c-y[u-1]<y[u]-c&&e+1<u&&--u;var l=y[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function kc(t,e,n,r,i){(1&t.depth?mc:rc)(t,e,n,r,i)}var Mc=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?rc(o,e,n,r,h?n+=(i-n)*o.value/h:i):mc(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=bc(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(vc);function Oc(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function _c(t={}){return[...Oc(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function Sc(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function Ec(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function Ac(t={}){return Oc(t)}function Tc(){return[{type:"maybeKey"}]}function Pc(t,e){return t.getBandWidth(t.invert(e))}function Lc(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:f=r,bandOffsetY:h=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?Pc(l,a[e]):0;var r=p?Pc(c,o[e]):0,e=g&&s?(Pc(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function Nc(t){return parseFloat(t)/100}function Cc(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?Nc(e)*o:+e,"string"==typeof t?Nc(t)*s:+t]]})]}function jc(e){return"function"==typeof e?e:t=>t[e]}function Fc(t,e){return Array.from(t,jc(e))}function Bc(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=Fc(t,e),o=Fc(t,n),s=Fc(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function Rc(t,e){return t.getBandWidth(t.invert(e))}const Ic=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=Rc(c,a[t]),n=e*(u?Rc(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};Ic.props={defaultShape:"rect",defaultLabelShape:"label",channels:[..._c({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...Tc(),...Ec()],interaction:{shareTooltip:!0}};const Dc=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function zc(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Wc(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=zc,o=(t,e)=>zc(n(t),e),(t,e)=>n(t)-e):(a=n===zc||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Gc,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function Gc(){return 0}Dc.props={defaultShape:"rect",defaultLabelShape:"label",channels:[..._c({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...Tc(),...Ec()],interaction:{shareTooltip:!0}};n=Wc(zc),i=n.right;const Hc=n.left,Vc=Wc(function(t){return null===t?NaN:+t}).center;var Yc=i;function qc(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function Uc(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function $c(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class Xc{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Kc extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Zc(this,t))}has(t){return super.has(Zc(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Zc({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Jc(t){return t}function Qc(t,...e){return nu(t,Jc,Jc,e)}function tu(t,e,...n){return nu(t,Jc,e,n)}function eu(t,e,...n){return nu(t,Array.from,e,n)}function nu(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new Kc,i=h[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function ru(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=au(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>au(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(iu(n))}function iu(r=zc){if(r===zc)return au;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function au(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var ou=Array.prototype.slice;function su(t){return()=>t}var lu=Math.sqrt(50),cu=Math.sqrt(10),uu=Math.sqrt(2);function fu(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/Math.pow(10,t);return 0<=t?(lu<=n?10:cu<=n?5:uu<=n?2:1)*Math.pow(10,t):-Math.pow(10,-t)/(lu<=n?10:cu<=n?5:uu<=n?2:1)}function hu(t){return Math.ceil(Math.log(qc(t))/Math.LN2)+1}function du(){var m=Jc,v=$c,b=hu;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=m(t[a],a,t);var o=v(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(v===$c&&([s,l]=function(t,e,n){let r;for(;;){var i=fu(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(n,r,t){var e,i,a,o,s=-1;if(t=+t,(n=+n)===(r=+r)&&0<t)return[n];if((e=r<n)&&(i=n,n=r,r=i),0===(o=fu(n,r,t))||!isFinite(o))return[];if(0<o){let t=Math.round(n/o),e=Math.round(r/o);for(t*o<n&&++t,e*o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)*o}else{o=-o;let t=Math.round(n*o),e=Math.round(r*o);for(t/o<n&&++t,e/o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)/o}return e&&a.reverse(),a}(s,l,u))[0]<=s&&(n=fu(s,l,u)),c[c.length-1]>=l)if(l<=o&&v===$c){const n=fu(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var f=c.length,h=0,d=f;c[h]<=s;)++h;for(;c[d-1]>l;)--d;(h||d<f)&&(c=c.slice(h,d),f=d-h);var p,g,y=new Array(f+1);for(a=0;a<=f;++a)(p=y[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Math.min(f,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(g=Math.floor((s-e)*n),y[Math.min(f,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Yc(c,e,0,f)].push(t[a]);return y}return e.value=function(t){return arguments.length?(m="function"==typeof t?t:su(t),e):m},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:su([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:su(Array.isArray(t)?ou.call(t):t),e):b},e}function pu(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function gu(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function yu(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function mu(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function vu(t,e,n){var r;if((n=(t=Float64Array.from(function*(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?yu(t):1<=e?pu(t):(n=(n-1)*e,(r=pu(function n(r,i,a=0,o=1/0,s){if(i=Math.floor(i),a=Math.floor(Math.max(0,a)),o=Math.floor(Math.min(r.length-1,o)),a<=i&&i<=o)for(s=void 0===s?au:iu(s);a<o;){600<o-a&&(l=o-a+1,c=i-a+1,f=Math.log(l),u=.5*Math.exp(2*f/3),f=.5*Math.sqrt(f*u*(l-u)/l)*(c-l/2<0?-1:1),n(r,i,Math.max(a,Math.floor(i-c*u/l+f)),Math.min(o,Math.floor(i+(l-c)*u/l+f)),s));var l,c,u,f,h=r[i];let t=a,e=o;for(mu(r,a,i),0<s(r[o],h)&&mu(r,a,o);t<e;){for(mu(r,t,e),++t,--e;s(r[t],h)<0;)++t;for(;0<s(r[e],h);)--e}0===s(r[a],h)?mu(r,a,e):mu(r,++e,o),e<=i&&(a=e+1),i<=e&&(o=e-1)}return r}(t,e=Math.floor(n)).subarray(0,e+1)))+(yu(t.subarray(e+1))-r)*(n-e))}function bu(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function xu(t,e){return vu(t,.5,e)}function wu(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function ku(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function Mu(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function Ou(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function _u(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function Su(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function Eu(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function Au(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function Tu(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function Pu(t){return Eu(t)||_u(t)}const Lu=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(Qc(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},Nu=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},Cu=()=>(t,e,n,r)=>{return(Au(r)?Nu:Lu)(t,e,n,r)};Cu.props={defaultShape:"line",defaultLabelShape:"label",channels:[..._c({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...Tc(),...Ec(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const ju=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=Lc(e,n,g),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/f,r=r/h,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};ju.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[..._c({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...Tc(),{type:"maybeSize"},...Sc()]};const Fu=s=>{const{cartesian:l=!1}=s;return l?Cc:(t,e,n,r)=>{if(l)return Cc(t,0,n,r);const{x:i,y:a}=n,o=Lc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Fu.props={defaultShape:"text",defaultLabelShape:"label",channels:[..._c({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...Tc(),...Sc()]};const Bu=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};Bu.props={defaultShape:"cell",defaultLabelShape:"label",channels:[..._c({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...Tc(),...Sc()]};const Ru=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(Qc(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};Ru.props={defaultShape:"area",defaultLabelShape:"label",channels:[..._c({shapes:["area","smooth","step"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...Tc(),...Ec()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Iu=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=Lc(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Iu.props={defaultShape:"link",defaultLabelShape:"label",channels:[..._c({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...Tc(),...Sc()]};const Du=s=>{var t=s["cartesian"];return t?Cc:(t,e,n,r)=>{const{x:i,y:a}=n,o=Lc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Du.props={defaultShape:"image",defaultLabelShape:"label",channels:[..._c({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...Tc(),...Sc()]};const zu=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};zu.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[..._c({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...Tc(),...Sc()]};const Wu=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,g=e.x,y=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(y?y.getBandWidth(y.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+f[t],+h[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},Gu=(Wu.props={defaultShape:"box",defaultLabelShape:"label",channels:[..._c({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...Tc(),...Ec()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});Gu.props={defaultShape:"vector",defaultLabelShape:"label",channels:[..._c({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...Tc(),...Sc()]};const Hu=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};Hu.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Ac({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...Tc()]};const Vu=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};Vu.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Ac({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...Tc()]};const Yu=(...t)=>Iu(...t);function qu(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function Uu(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=qu("x",r,n,e.x),o=qu("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Yu.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...Ac({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...Tc()]};const $u=()=>Uu();$u.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Ac({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...Tc()]};const Xu=()=>Uu({extendY:!0});Xu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Ac({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...Tc()]};const Ku=()=>Uu({extendX:!0});function Zu(t){return t.target.depth}function Ju(t,e){return t.sourceLinks.length?t.depth:e-1}function Qu(t){return function(){return t}}function tf(t,e){return nf(t.source,e.source)||t.index-e.index}function ef(t,e){return nf(t.target,e.target)||t.index-e.index}function nf(t,e){return t.y0-e.y0}function rf(t){return t.value}function af(t){return t.index}function of(t){return t.nodes}function sf(t){return t.links}function lf(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function cf({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function uf(){let x=0,w=0,k=1,M=1,O=24,_=8,S,E=af,A=Ju,T,P,L,N=of,C=sf,j=6;function e(e){e={nodes:N(e),links:C(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const g=new Map(i.map(t=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=lf(g,n)),"object"!=typeof r&&(r=t.target=lf(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=L)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(L),r.sort(L)}t=e.nodes;for(const y of t)y.value=void 0===y.fixedValue?Math.max(Mu(y.sourceLinks,rf),Mu(y.targetLinks,rf)):y.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(T){var s,l=Math.max(pu(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=T.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(pu(t,t=>t.depth)+1,0),n=(k-x-O)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+O,r[i]?r[i].push(a):r[i]=[a]}if(P)for(const o of r)o.sort(P);return r}(e),t=(S=Math.min(_,(M-w)/(pu(u,t=>t.length)-1)),u),f=yu(t,t=>(M-w-(t.length-1)*S)/Mu(t,rf));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*f,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*f}e=(M-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var h=m[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===L)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(ef),n.sort(tf)}(m)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,B(c))}void 0===P&&o.sort(nf),o.length&&F(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,B(c))}void 0===P&&o.sort(nf),o.length&&F(o,i)}}(u,d,p)}return cf(e),e}function F(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,M,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function B({sourceLinks:t,targetLinks:e}){if(void 0===L){for(const{source:{sourceLinks:t}}of e)t.sort(ef);for(const{target:{targetLinks:e}}of t)e.sort(tf)}}return e.update=function(t){return cf(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:Qu(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Qu(t),e):A},e.nodeDepth=function(t){return arguments.length?(T=t,e):T},e.nodeSort=function(t){return arguments.length?(P=t,e):P},e.nodeWidth=function(t){return arguments.length?(O=+t,e):O},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(N="function"==typeof t?t:Qu(t),e):N},e.links=function(t){return arguments.length?(C="function"==typeof t?t:Qu(t),e):C},e.linkSort=function(t){return arguments.length?(L=t,e):L},e.size=function(t){return arguments.length?(x=w=0,k=+t[0],M=+t[1],e):[k-x,M-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],k=+t[1][0],w=+t[0][1],M=+t[1][1],e):[[x,w],[k,M]]},e.iterations=function(t){return arguments.length?(j=+t,e):j},e}Ku.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Ac({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...Tc()]};const ff={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},hf={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?yu(t.sourceLinks,Zu)-1:0},justify:Ju};const df=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},ff,f),l=uf().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?hf[n]||Ju:"function"==c?n:Ju).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function pf(t){return t}function gf(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function yf(t=""){throw new Error(t)}function mf(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function vf(t){return null!=t&&!Number.isNaN(t)}function Q(t,e){return bf(t,e)||{}}function bf(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Xs(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function xf(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function wf(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t}df.props={};const kf=y=>{const m={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},v={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},b={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},x={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=y,{links:t,nodes:l}=Bc(t,e),c=Q(e,"node"),e=Q(e,"link"),{key:u=t=>t.key,color:f=u}=c,{links:i,nodes:t}=df(Object.assign(Object.assign(Object.assign({},m),{nodeId:jc(u)}),i))({links:t,nodes:l});const h=Q(r,"label"),{text:d=u,spacing:p=5}=h,g=J(h,["text","spacing"]);return[B({},v,{data:t,encode:Object.assign(Object.assign({},c),{color:f}),scale:n,style:Q(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},x),{text:d,dx:t=>t.x[0]<.5?p:-p}),g),...a],animate:"object"==typeof s?Q(s,"node"):s,axis:!1}),B({},b,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa"},Q(r,"link")),animate:"object"==typeof s?Q(s,"link"):s})]}},Mf=(kf.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);Mf.props={defaultShape:"path",defaultLabelShape:"label",channels:[..._c({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...Tc()]};const Of=t=>t?parseInt(t):0;function _f(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||Of(t.width),e=e.clientHeight||Of(t.height),{width:(i={width:i-(Of(t.paddingLeft)+Of(t.paddingRight)),height:e-(Of(t.paddingTop)+Of(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function Sf(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function Ef(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:wc,treemapDice:rc,treemapSlice:mc,treemapSliceDice:kc,treemapSquarify:xc,treemapResquarify:Mc};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?cc().path(p):cc():Tl)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(y),l=[0],i&&t.eachBefore(nc),t}function y(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:t[r]).sort(e.sort):p.count(),o=xc,i=!1,s=a=1,l=[0],d=h=f=u=c=Rl,g.round=function(t){return arguments.length?(i=!!t,g):i},g.size=function(t){return arguments.length?(a=+t[0],s=+t[1],g):[a,s]},g.tile=function(t){return arguments.length?(o=Bl(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Il(+t),g):c},g.paddingOuter=function(t){return arguments.length?g.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):g.paddingTop()},g.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Il(+t),g):u},g.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:Il(+t),g):f},g.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:Il(+t),g):h},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Il(+t),g):d},g.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const Af=u=>t=>{var{width:t,height:e}=Sf(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,l=J(u,["data","encode","scale","style","layout","labels"]),c={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=Ef(n,B({},c,o),r),n=Q(a,"label");return[B({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,lineHeight:t=>t.y1-t.y0}),n),...s]},l),{axis:!1}))]},Tf=(Af.props={composite:!0},u=>t=>{var{width:t,height:e}=Sf(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,l=J(u,["data","encode","scale","style","layout","labels"]),c={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(Us(t)?cc().path(e.path):Tl)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),Jl().size(e.size).padding(e.padding)(n),n.descendants()})(n,B({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),B({},c.encode,r)),t=Q(a,"label");return[B({},c,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r,lineHeight:t=>2*t.r}),t),...s]},l),{axis:!1}))]});function Pf(t,e){return yu(t,t=>e[t])}function Lf(t,e){return pu(t,t=>e[t])}function Nf(t,e){const n=2.5*Cf(t,e)-1.5*Ff(t,e);return yu(t,t=>e[t]>=n?e[t]:NaN)}function Cf(t,e){return vu(t,.25,t=>e[t])}function jf(t,e){return vu(t,.5,t=>e[t])}function Ff(t,e){return vu(t,.75,t=>e[t])}function Bf(t,e){const n=2.5*Ff(t,e)-1.5*Cf(t,e);return pu(t,t=>e[t]<=n?e[t]:NaN)}function Rf(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Qc(t,t=>a[+t]).values()).flatMap(t=>{const e=Nf(t,i),n=Bf(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}Tf.props={composite:!0};const If=s=>()=>{var{data:t,encode:e,style:n={}}=s,r=J(s,["data","encode","style"]),{extend:i=!1}=n,n=J(n,["extend"]),a=e["y"],a={y:a,y1:a,y2:a,y3:a,y4:a},o={y1:Cf,y2:jf,y3:Ff};return i?[Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Pf},o),{y4:Lf})],encode:Object.assign(Object.assign({},e),a),style:n},r)]:(i=Q(n,"box"),n=Q(n,"point"),[Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Nf},o),{y4:Bf})],encode:Object.assign(Object.assign({},e),a),style:i},r),{type:"point",data:t,transform:[{type:Rf}],encode:e,style:Object.assign({},n)}])},Df=(If.props={composite:!0},s=>{var t=s["cartesian"];return t?Cc:(t,e,n,r)=>{const{x:i,y:a}=n,o=Lc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function zf(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,!(d=(i=d)[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function Wf(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Gf(t){return t[0]}function Hf(t){return t[1]}function Vf(t,e,n){e=new Yf(null==e?Gf:e,null==n?Hf:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Yf(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function qf(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Df.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};ja=Vf.prototype=Yf.prototype;function Uf(t){return function(){return t}}function $f(t){return 1e-6*(t()-.5)}function Xf(t){return t.index}function Kf(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Zf(c){var u,f,a,o,h,d,s=Xf,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Uf(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||$f(d),o=i.y+i.vy-r.y-r.vy||$f(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Kf(r,t.source)),"object"!=typeof t.target&&(t.target=Kf(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=new Array(n),g()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function g(){if(a)for(var t=0,e=c.length;t<e;++t)f[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Uf(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Uf(+t),g(),e):r},e}ja.copy=function(){var t,e,n=new Yf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=qf(e));else n._root=qf(r);return n},ja.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return zf(this.cover(e,n),e,n,t)},ja.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)zf(this,i[u],a[u],t[u]);return this},ja.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},ja.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},ja.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},ja.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new Wf(y,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(y=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(y.length?(g.push(new Wf(y[3],a=(s+o)/2,c=(l+i)/2,o,i),new Wf(y[2],s,c,a,i),new Wf(y[1],a,l,o,c),new Wf(y[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(l=(o=t-+this._x.call(null,y.data))*o+(s=e-+this._y.call(null,y.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=y.data));return u},ja.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,f,h=this._root,d=this._x0,p=this._y0,g=this._x1,y=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+y)/2))?p=s:y=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},ja.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},ja.root=function(){return this._root},ja.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},ja.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new Wf(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new Wf(e,o,s,i,a)),(e=c[2])&&l.push(new Wf(e,n,s,o,a)),(e=c[1])&&l.push(new Wf(e,o,r,i,s)),e=c[0])&&l.push(new Wf(e,n,r,o,s));return this},ja.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Wf(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new Wf(i,a,o,c,u)),(i=f[1])&&n.push(new Wf(i,c,o,s,u)),(i=f[2])&&n.push(new Wf(i,a,u,c,l)),i=f[3])&&n.push(new Wf(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},ja.x=function(t){return arguments.length?(this._x=t,this):this._x},ja.y=function(t){return arguments.length?(this._y=t,this):this._y};var Jf={value:()=>{}};function Qf(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new th(r)}function th(t){this._=t}function eh(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Jf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}th.prototype=Qf.prototype={constructor:th,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=eh(i[n],t.name,e);else if(null==e)for(n in i)i[n]=eh(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new th(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var nh,rh,ih=0,ah=0,oh=0,sh=1e3,lh=0,ch=0,uh=0,fh="object"==typeof performance&&performance.now?performance:Date,hh="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function dh(){return ch||(hh(ph),ch=fh.now()+uh)}function ph(){ch=0}function gh(){this._call=this._time=this._next=null}function yh(t,e,n){var r=new gh;return r.restart(t,e,n),r}function mh(){ch=(lh=fh.now())+uh,ih=ah=0;try{dh(),++ih;for(var t,e=nh;e;)0<=(t=ch-e._time)&&e._call.call(void 0,t),e=e._next;--ih}finally{for(var n,r,i=nh,a=1/(ih=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:nh=r);rh=n,bh(a),ch=0}}function vh(){var t=fh.now(),e=t-lh;sh<e&&(uh-=e,lh=t)}function bh(t){ih||(ah=ah&&clearTimeout(ah),24<t-ch?(t<1/0&&(ah=setTimeout(mh,t-fh.now()-uh)),oh=oh&&clearInterval(oh)):(oh||(lh=fh.now(),oh=setInterval(vh,sh)),ih=1,hh(mh)))}gh.prototype=yh.prototype={constructor:gh,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?dh():+n)+(null==e?0:+e),this._next||rh===this||(rh?rh._next=this:nh=this,rh=this),this._call=t,this._time=n,bh()},stop:function(){this._call&&(this._call=null,this._time=1/0,bh())}};const xh=4294967296;function wh(t){return t.x}function kh(t){return t.y}var Mh=10,Oh=Math.PI*(3-Math.sqrt(5));function _h(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=yh(i),n=Qf("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%xh)/xh}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=Mh*Math.sqrt(.5+r),e=r*Oh,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function Sh(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,B=(r=Uf(-30),d=(h=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,R()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:Uf(+t),R(),g):r},g.distanceMin=function(t){return arguments.length?(h=t*t,g):Math.sqrt(h)},g.distanceMax=function(t){return arguments.length?(d=t*t,g):Math.sqrt(d)},g.theta=function(t){return arguments.length?(p=t*t,g):Math.sqrt(p)},g);function g(t){var e,n=i.length,r=Vf(i,wh,kh).visitAfter(I);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function R(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function I(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=f[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=$f(c))*i),0===a&&(s+=(a=$f(c))*a),s<h&&(s=Math.sqrt(h*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=$f(c))*i),0===a&&(s+=(a=$f(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var y,m,v,b,x,w,k,M,O,_,S,E,A,T,n=Zf(a).id(jc(n)),P=("function"==typeof o&&B.strength(o),"function"==typeof s&&n.strength(s),_h(t).force("link",n).force("charge",B));function L(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function N(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+y(m[t],t,m))?0:+x(m[t],t,m)}}function C(t){for(var e,n=0,r=k.length;n<r;++n)(e=k[n]).vx+=(O[n]-e.x)*M[n]*t}function j(){if(k){var t,e=k.length;for(M=new Array(e),O=new Array(e),t=0;t<e;++t)M[t]=isNaN(O[t]=+w(k[t],t,k))?0:+_(k[t],t,k)}}function F(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*T,r=(r/e-E)*T,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?P.force("center",(T=1,null==S&&(S=0),null==E&&(E=0),F.initialize=function(t){A=t},F.x=function(t){return arguments.length?(S=+t,F):S},F.y=function(t){return arguments.length?(E=+t,F):E},F.strength=function(t){return arguments.length?(T=+t,F):T},F)):P.force("x",(_=Uf(.1),"function"!=typeof w&&(w=Uf(null==w?0:+w)),C.initialize=function(t){k=t,j()},C.strength=function(t){return arguments.length?(_="function"==typeof t?t:Uf(+t),j(),C):_},C.x=function(t){return arguments.length?(w="function"==typeof t?t:Uf(+t),j(),C):w},C)).force("y",(x=Uf(.1),"function"!=typeof y&&(y=Uf(null==y?0:+y)),L.initialize=function(t){m=t,N()},L.strength=function(t){return arguments.length?(x="function"==typeof t?t:Uf(+t),N(),L):x},L.y=function(t){return arguments.length?(y="function"==typeof t?t:Uf(+t),N(),L):y},L)),P.stop();var z=Math.ceil(Math.log(P.alphaMin())/Math.log(1-P.alphaDecay()));for(let t=0;t<z;t++)P.tick();return{nodesData:t,linksData:a}}const Eh=f=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=f,l=Q(e,"node"),c=Q(e,"link"),{links:t,nodes:u}=Bc(t,e),{nodesData:t,linksData:u}=Sh({links:t,nodes:u},B({},{joint:!0},i),e);return[B({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:u,encode:c,labels:o,style:Q(r,"link"),animate:"object"==typeof s?Q(s,"link"):s}),B({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},l),scale:n,style:Q(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),Q(r,"label")),...a],animate:"object"==typeof s?Q(s,"node"):s})]},Ah=(Eh.props={composite:!0},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=Tl(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),Th=t=>Ah(El)(t),Ph=(Th.props={},t=>Ah(yc)(t)),Lh=(Ph.props={},c=>{const u={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},h={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},d={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=c,l=null==e?void 0:e.value,{nodes:i,edges:l}=Ph(Object.assign(Object.assign(Object.assign({},u),i),{field:l}))(t);return[B({},h,{data:l,encode:Q(e,"link"),scale:Q(n,"link"),labels:o,style:Object.assign({stroke:"#999"},Q(r,"link")),animate:"object"==typeof s?Q(s,"link"):s}),B({},f,{data:i,scale:Q(n,"node"),encode:Q(e,"node"),labels:[Object.assign(Object.assign({},d),Q(r,"label")),...a],style:Object.assign({},Q(r,"node")),animate:"object"==typeof s?Q(s,"node"):s})]}});Lh.props={composite:!0};var Nh={},Ch={},jh=34,Fh=10,Bh=13;function Rh(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Ih(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function Dh(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function zh(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Dh(-e,6):9999<e?"+"+Dh(e,6):Dh(e,4))+"-"+Dh(t.getUTCMonth()+1,2)+"-"+Dh(t.getUTCDate(),2)+(a?"T"+Dh(n,2)+":"+Dh(r,2)+":"+Dh(i,2)+"."+Dh(a,3)+"Z":i?"T"+Dh(n,2)+":"+Dh(r,2)+":"+Dh(i,2)+"Z":r||n?"T"+Dh(n,2)+":"+Dh(r,2)+"Z":"")}function Wh(r){var e=new RegExp('["'+r+"\n\r]"),f=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return Ch;if(l)return l=!1,Nh;var t,e,n=a;if(r.charCodeAt(n)===jh){for(;a++<i&&r.charCodeAt(a)!==jh||r.charCodeAt(++a)===jh;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===Fh?l=!0:e===Bh&&(l=!0,r.charCodeAt(a)===Fh)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===Fh)l=!0;else if(e===Bh)l=!0,r.charCodeAt(a)===Fh&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===Fh&&--i,r.charCodeAt(i-1)===Bh&&--i;(e=c())!==Ch;){for(var u=[];e!==Nh&&e!==Ch;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?zh(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=Rh(n=t),function(t,e){return r(i(t),e,n)}):Rh(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?Ih(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?Ih(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function Gh(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Hh&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const Hh=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),Vh=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ve(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),Wh(i).parse(t,a?Gh:pf);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};Vh.props={};const Yh=t=>{const{fields:n,key:r="key",value:i="value"}=t;return t=>{var e;return(e=n)&&0!==Object.keys(e).length?t.flatMap(e=>n.map(t=>Object.assign(Object.assign({},e),{[r]:t,[i]:e[t]}))):t}};Yh.props={};const qh=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},Uh=(qh.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});Uh.props={};const $h=t=>{const e=t["fields"];return t=>t.map(t=>{return[n,t=[]]=[t,e],t.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{});var n})};$h.props={};const Xh=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};Xh.props={};const Kh=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},Zh=(Kh.props={},t=>{const e=t["value"];return()=>e}),Jh=(Zh.props={},t=>{const{callback:e=pf}=t;return t=>e(t)}),Qh=(Jh.props={},t=>{const{callback:e=pf}=t;return t=>Array.isArray(t)?t.map(e):t});Qh.props={};var td=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const ed={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function nd(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:g,sourceWeight:y,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},ed),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=g(t),t.sourceWeight=y(t),t.targetWeight=m(t)});const i=Qc(r,t=>t.source),a=Qc(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=Mu(e,t=>t.sourceWeight)+Mu(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:td[v])&&r.sort(n),!(n=(r=e).length))throw yf("Invalid nodes: it's empty!");if(f){const o=h/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-h),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!f)return e.forEach(t=>{var e=p(t),n=g(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=Qc(e,t=>t.source),l=Qc(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const rd=e=>t=>nd(e)(t),id=(rd.props={},Math.PI/180),ad=64,od=2048;function sd(t){return t.text}function ld(){return"serif"}function cd(){return"normal"}function ud(t){return t.value}function fd(){return 90*~~(2*Math.random())}function hd(){return 1}function dd(){}function pd(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(ad<<5)/c,od/c);let i=0,a=0,n=0;var u,f,h,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*id),h=Math.cos(o.rotate*id),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=ad<<5&&(i=0,a+=n,n=0),a+e>=od)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*id),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(ad<<5)/c,od/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var y=o.width,m=y>>5;let n=o.y1-o.y0;for(let t=0;t<n*m;t++)g[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<y;t++){var v=m*e+(t>>5),b=p[(a+e)*(ad<<5)+(i+t)<<2]?1<<31-t%32:0;g[v]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=g.slice(0,(o.y1-o.y0)*m)}}}function gd(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function yd(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function md(){return document.createElement("canvas")}function vd(t){return"function"==typeof t?t:function(){return t}}const bd={archimedean:gd,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function xd(){let b=[256,256],r=sd,i=ld,p=ud,g=cd,y=fd,m=hd,x=gd,w=Math.random,v=dd,k=[],M=null,O=1/0;const _=cd,S=md,E={};return E.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(ad<<5)/e,t.height=od/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||yd((b[0]>>5)*b[1]),c=k.length,u=[],f=k.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=g.call(this,t,e,n),t.rotate=y.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<O&&++h<c;){var i=f[h];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,pd(s,i,f,h),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var h=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),y=127&g,m=32-y,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(g>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=h[e*d+t])>>>y:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),v.call(null,"end",{cloud:E,words:u,bounds:d}))}return M&&clearInterval(M),M=setInterval(n,0),n(),E},E.stop=function(){return M&&(clearInterval(M),M=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=yd((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){O=null==t?1/0:t},E.words=function(t){k=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=vd(t)},E.font=function(t){i=vd(t)},E.fontWeight=function(t){g=vd(t)},E.rotate=function(t){y=vd(t)},E.spiral=function(t){x=bd[t]||t},E.fontSize=function(t){p=vd(t)},E.padding=function(t){m=vd(t)},E.random=function(t){w=vd(t)},E.on=function(t){v=vd(t)},E}const wd={size:[500,500],fontSize:[14,28]};function kd(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const Md=h=>f=>ve(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},wd,h),e=xd(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return ve(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=f.map(t=>t.value),n=t,t=[yu(e),pu(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",kd,e.createMask),e.words([...f]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=J(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function Od(e){return"string"==typeof e?t=>t[e]:e}Md.props={};const _d=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=Od(r),l=Od(t),c=tu(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})},Sd=(_d.props={},t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)});Sd.props={};const Ed=u=>c=>ve(void 0,void 0,void 0,function*(){var{width:t,height:e}=Sf(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=J(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield Md(Object.assign(Object.assign({},l),o))(e);return[B({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]}),Ad=(Ed.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),Td=(Ad.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),Pd=(Td.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),Ld=(Pd.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),Nd=(Ld.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),Cd=(Nd.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),jd=(Cd.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),Fd=(jd.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),Bd=(Fd.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),Rd=(Bd.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),Id=(Rd.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),Dd=(Id.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),zd=(Dd.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),Wd=(zd.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Gd=(Wd.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Hd=(Gd.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),Vd=(Hd.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),Yd=(Vd.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),qd=(Yd.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),Ud=(qd.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function $d(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Xd(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Kd(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Ud.props={};const Zd=Math.sqrt(50),Jd=Math.sqrt(10),Qd=Math.sqrt(2);function tp(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=Zd?10:n>=Jd?5:n>=Qd?2:1)*10**t:-(10**-t)/(n>=Zd?10:n>=Jd?5:n>=Qd?2:1)}function ep(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=Zd?r*=10:n>=Jd?r*=5:n>=Qd&&(r*=2),e<t?-r:r}const np=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=tp(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=tp(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=tp(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},rp=36e5,ip=864e5,ap=7*ip;ip,ip;function op(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}e=op(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),r=op(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),bs=op(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),_a=op(rp,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+rp*e)},t=>t.getHours()),Ms=op(ip,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ip*e)},t=>t.getDate()-1);const sp=op(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());Pa=op(ap,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ap*e)},t=>{var e=sp.floor(t),t=new Date(+t);return Math.floor((+t-+e)/ap)}),La=op(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const lp={millisecond:e,second:r,minute:bs,hour:_a,day:Ms,week:Pa,month:sp,year:La};Na=op(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Fa=op(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),a=op(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),Ba=op(rp,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+rp*e)},t=>t.getUTCHours()),Ra=op(ip,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ip*e)},t=>t.getUTCDate()-1);const cp=op(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());Ia=op(ap,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ap*e)},t=>{var e=cp.floor(t),t=new Date(+t);return Math.floor((+t-+e)/ap)}),Da=op(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const up={millisecond:Na,second:Fa,minute:a,hour:Ba,day:Ra,week:Ia,month:cp,year:Da};function fp(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?up:lp;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Kd(i,l,0,c,s);let f;return f=u===c?[a,ep(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(ep(t,e,n),1)]}const hp=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=fp(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function dp(t){return null!=t&&!Number.isNaN(t)}const pp=e=>t=>-e(-t),gp=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?pp(t):t},yp=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?pp(n):n},mp=(t,e,n,r)=>{var i=t<0,a=gp(r,i),r=yp(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function vp(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return Zs(t)?Math.round(t):t}):i;this.output=$d(a,r,e,t)},t.prototype.invert=void 0}}var bp,za={exports:{}},Wa={exports:{}},xp=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},wp=Array.prototype.concat,kp=Array.prototype.slice,Mp=Wa.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];xp(i)?e=wp.call(e,kp.call(i)):e.push(i)}return e},Op=(Mp.wrap=function(t){return function(){return t(Mp(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),_p=Wa.exports,Sp=Object.hasOwnProperty,Ep=Object.create(null);for(bp in Op)Sp.call(Op,bp)&&(Ep[Op[bp]]=bp);var Ap=za.exports={to:{},get:{}};function Tp(t,e,n){return Math.min(Math.max(e,t),n)}function Pp(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}Ap.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=Ap.get.hsl(t),n="hsl";break;case"hwb":e=Ap.get.hwb(t),n="hwb";break;default:e=Ap.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},Ap.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:Sp.call(Op,e[1])?((i=Op[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=Tp(i[n],0,255);return i[3]=Tp(i[3],0,1),i},Ap.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,Tp(parseFloat(t[2]),0,100),Tp(parseFloat(t[3]),0,100),Tp(isNaN(e)?1:e,0,1)]):null},Ap.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,Tp(parseFloat(t[2]),0,100),Tp(parseFloat(t[3]),0,100),Tp(isNaN(e)?1:e,0,1)]):null},Ap.to.hex=function(){var t=_p(arguments);return"#"+Pp(t[0])+Pp(t[1])+Pp(t[2])+(t[3]<1?Pp(Math.round(255*t[3])):"")},Ap.to.rgb=function(){var t=_p(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},Ap.to.rgb.percent=function(){var t=_p(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},Ap.to.hsl=function(){var t=_p(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},Ap.to.hwb=function(){var t=_p(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},Ap.to.keyword=function(t){return Ep[t.slice(0,3)]};var Lp=za.exports;function Np(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Cp(t){var e,n,r,t=Lp.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*Np(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*Np(n,r,e),255*Np(n,r,e-1/3),t]):null):null}const jp=(e,n)=>t=>e*(1-t)+n*t,Fp=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return jp(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=Cp(n),c=Cp(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},Bp=(t,e)=>{const n=jp(t,e);return t=>Math.round(n(t))};function Rp({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function Ip(t){return"object"==typeof t?t.valueOf():t}class Dp extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=Ip,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Rp({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Rp({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class zp{constructor(t){this.options=B({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=B({},this.options,t),this.rescale(t)}rescale(t){}}const Wp=Symbol("defaultUnknown");function Gp(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Hp(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==Wp)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Vp(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Yp extends zp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:Wp}}map(t){return 0===this.domainIndexMap.size&&Gp(this.domainIndexMap,this.getDomain(),this.domainKey),Hp({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&Gp(this.rangeIndexMap,this.getRange(),this.rangeKey),Hp({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=Vp(e),this.rangeKey=Vp(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new Yp(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function qp(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new Dp(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new Dp(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let y=o?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=y,Math.round(1e12*v)/1e12);var v=e[t];y+=g.get(v)}return{valueBandWidth:c,valueStep:g,adjustedRange:m}}class Up extends Yp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Wp,flex:[]}}clone(){return new Up(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return qp(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const $p=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=tp(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};function Xp(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Kp=[1,5,2,2.5,4,3],Zp=100*Number.EPSILON;const Jp=(n,r,t=5,i=!0,a=Kp,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,f,h,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let y=1;for(;y<1/0;){for(let t=0;t<a.length;t+=1){var m=a[t],v=(f=m,h=a,d=y,p=void 0,p=ol(h),1-il(h,f)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<g.score){y=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*v+o[1]+o[2]*b+o[3]<g.score)break;var x=(r-n)/(e+1)/y/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=y*m*10**t,k=(O=r,k=w*(e-1),(O-=n)<k?1-((k-O)/2)**2/(.1*O)**2:1);if(o[0]*v+o[1]*k+o[2]*b+o[3]<g.score)break;var M=Math.floor(r/w)*y-(e-1)*y,O=Math.ceil(n/w)*y;if(M<=O){var _=O-M;for(let t=0;t<=_;t+=1){var S=(M+t)*(w/y),E=S+w*(e-1),A=w,T=function(t,e,n,r,i,a){var o=ol(e),e=il(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Zp||a-t<Zp)&&r<=0&&0<=i?1:s)}(m,a,y,S,E,A),P=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,L=(l=e,L=n,l=(l-1)/(E-(N=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(L,N)),2-Math.max(l/c,c/l)),N=o[0]*T+o[1]*P+o[2]*L+ +o[3];g.score<N&&(!i||S<=n&&r<=E)&&(g.lmin=S,g.lmax=E,g.lstep=A,g.score=N)}}t+=1}e+=1}}y+=1}var t=Xp(g.lmax),e=Xp(g.lmin),C=Xp(g.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,F=new Array(j);F[0]=Xp(e);for(let t=1;t<j;t+=1)F[t]=Xp(F[t-1]+C);return F};class Qp extends zp{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Jp}}map(t){return dp(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Qp(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return Zs(t)&&Zs(r)?n(t,r,e):[]}}const t0=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return $d(o=t<r?(a=Xd(t,r),n(e,i)):(a=Xd(r,t),n(i,e)),a)},e0=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Xd(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Kd(r,t,1,i)-1,n=a[e];return $d(o[e],n)(t)}},n0=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?e0:t0)(t,e,r?Bp:n)};class r0 extends zp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:jp,tickCount:5}}map(t){return dp(t)?this.output(t):this.options.unknown}invert(t){return dp(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return np}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return nl}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=n0(n.map(t),r,a,i);this.output=$d(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=n0(i,r.map(t),jp);this.input=$d(e,n,i)}}class i0 extends r0{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Fp,tickMethod:$p,tickCount:5}}chooseTransforms(){return[nl,nl]}clone(){return new i0(this.options)}}class a0 extends Up{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Wp,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new a0(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const o0=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class s0 extends r0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Fp,tickMethod:$p,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[nl,nl]:(t=.5===r?o0:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new s0(this.options)}}class l0 extends s0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Fp,tickMethod:$p,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new l0(this.options)}}class c0 extends zp{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return dp(t)?(t=Kd(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new c0(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const u0=(t,e,n,r=10)=>{var i=t<0,a=yp(r,i),o=gp(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var y=g*t;if(c<y)break;l<=y&&h.push(y)}}2*h.length<n&&(h=$p(l,c,n))}else h=$p(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class f0 extends r0{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Fp,tickMethod:u0,tickCount:5}}chooseNice(){return mp}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[gp(t,e),yp(t,e)]}clone(){return new f0(this.options)}}class h0 extends c0{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Jp}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=np(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new h0(this.options)}}function d0(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class p0 extends c0{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Jp}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=d0(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new p0(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var g0=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,y0=/\[([^]*?)\]/gm;function m0(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function v0(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function b0(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var x0,Ga=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"],Ca=m0(c,3),w0=v0({},{dayNamesShort:m0(Ga,3),dayNames:Ga,monthNamesShort:Ca,monthNames:c,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),k0={D:function(t){return String(t.getDate())},DD:function(t){return b0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return b0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return b0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return b0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return b0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return b0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return b0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return b0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return b0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return b0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return b0(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+b0(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+b0(Math.floor(Math.abs(t)/60),2)+":"+b0(Math.abs(t)%60,2)}},M0={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const O0=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=fp(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function _0(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class S0 extends r0{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:O0,interpolate:jp,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return hp}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?up:lp,s=t?_0:nl;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=M0.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=M0[t]||t).replace(y0,function(t,e){return r.push(e),"@@@"}),v0(v0({},w0),n));return(t=t.replace(g0,function(t){return k0[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new S0(this.options)}}var E0;let A0=x0=class extends i0{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:nl,tickMethod:$p,tickCount:5}}constructor(t){super(t)}clone(){return new x0(this.options)}};A0=x0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([vp(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return $d(jp(0,1),Xd(t,e))})],A0);let T0=E0=class extends i0{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:nl,tickMethod:$p,tickCount:5}}constructor(t){super(t)}clone(){return new E0(this.options)}};T0=E0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([vp(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=$d(jp(0,.5),Xd(e,n)),a=$d(jp(.5,1),Xd(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],T0);const P0=t=>new Up(t),L0=(P0.props={},t=>new i0(t)),N0=(L0.props={},t=>new Yp(t)),C0=(N0.props={},t=>new Qp(t)),j0=(C0.props={},t=>new a0(t)),F0=(j0.props={},t=>new S0(t)),B0=(F0.props={},t=>new f0(t)),R0=(B0.props={},t=>new s0(t)),I0=(R0.props={},t=>new c0(t)),D0=(I0.props={},t=>new p0(t)),z0=(D0.props={},t=>new h0(t)),W0=(z0.props={},t=>new l0(t)),G0=(W0.props={},t=>new A0(t));function H0(t){return function(){return t}}G0.props={};const V0=Math.abs,Y0=Math.atan2,q0=Math.cos,U0=Math.max,$0=Math.min,X0=Math.sin,K0=Math.sqrt,Z0=1e-12,J0=Math.PI,Q0=J0/2,t1=2*J0;function e1(t){return 1<=t?Q0:t<=-1?-Q0:Math.asin(t)}const n1=Math.PI,r1=2*n1,i1=1e-6,a1=r1-i1;function o1(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=arguments[t]+n[t]}class s1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?o1:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return o1;const r=10**e;return function(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=Math.round(arguments[t]*r)/r+n[t]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: "+i);var a,o,s=this._x1,l=this._y1,c=n-t,u=r-e,f=s-t,h=l-e,d=f*f+h*h;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:d>i1&&(Math.abs(h*c-u*f)>i1&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((n1-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>i1&&this._append`L${t+d*f},${e+d*h}`,this._append`A${i},${i},0,0,${+(f*s<h*n)},${this._x1=t+r*c},${this._y1=e+r*u}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: "+n);let o=n*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,f=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>i1||Math.abs(this._y1-c)>i1)&&this._append`L${l},${c}`,n&&((f=f<0?f%r1+r1:f)>a1?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:f>i1&&this._append`A${n},${n},0,${+(f>=n1)},${u},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function l1(){return new s1}function c1(n){let r=3;return n.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return n},()=>new s1(r)}function u1(t){return t.innerRadius}function f1(t){return t.outerRadius}function h1(t){return t.startAngle}function d1(t){return t.endAngle}function p1(t){return t&&t.padAngle}function g1(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/K0(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*K0(U0(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function y1(){var A=u1,T=f1,P=H0(0),L=null,N=h1,C=d1,j=p1,F=null,B=c1(e);function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,k=+A.apply(this,arguments),M=+T.apply(this,arguments),O=N.apply(this,arguments)-Q0,_=C.apply(this,arguments)-Q0,S=V0(_-O),E=O<_;if(F=F||(t=B()),M<k&&(e=M,M=k,k=e),M>Z0?S>t1-Z0?(F.moveTo(M*q0(O),M*X0(O)),F.arc(0,0,M,O,_,!E),k>Z0&&(F.moveTo(k*q0(_),k*X0(_)),F.arc(0,0,k,_,O,E))):(r=e=O,i=n=_,o=a=S,h=(u=j.apply(this,arguments)/2)>Z0&&(L?+L.apply(this,arguments):K0(k*k+M*M)),w=x=s=$0(V0(M-k)/2,+P.apply(this,arguments)),h>Z0&&(f=e1(h/k*X0(u)),h=e1(h/M*X0(u)),(a-=2*f)>Z0?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(O+_)/2),(o-=2*h)>Z0?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(O+_)/2)),u=M*q0(e),f=M*X0(e),h=k*q0(i),O=k*X0(i),s>Z0&&(d=M*q0(n),p=M*X0(n),g=k*q0(r),y=k*X0(r),S<J0)&&((_=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<Z0))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,g,y,d,p,h,O))?(S=u-_[0],v=f-_[1],b=d-_[0],m=p-_[1],v=1/X0((1<(S=(S*b+v*m)/(K0(S*S+v*v)*K0(b*b+m*m)))?0:S<-1?J0:Math.acos(S))/2),b=K0(_[0]*_[0]+_[1]*_[1]),x=$0(s,(k-b)/(v-1)),w=$0(s,(M-b)/(1+v))):x=w=0),o>Z0?w>Z0?(l=g1(g,y,u,f,M,w,E),c=g1(d,p,h,O,M,w,E),F.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?F.arc(l.cx,l.cy,w,Y0(l.y01,l.x01),Y0(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,w,Y0(l.y01,l.x01),Y0(l.y11,l.x11),!E),F.arc(0,0,M,Y0(l.cy+l.y11,l.cx+l.x11),Y0(c.cy+c.y11,c.cx+c.x11),!E),F.arc(c.cx,c.cy,w,Y0(c.y11,c.x11),Y0(c.y01,c.x01),!E))):(F.moveTo(u,f),F.arc(0,0,M,e,n,!E)):F.moveTo(u,f),k>Z0&&a>Z0?x>Z0?(l=g1(h,O,d,p,k,-x,E),c=g1(u,f,g,y,k,-x,E),F.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?F.arc(l.cx,l.cy,x,Y0(l.y01,l.x01),Y0(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,x,Y0(l.y01,l.x01),Y0(l.y11,l.x11),!E),F.arc(0,0,k,Y0(l.cy+l.y11,l.cx+l.x11),Y0(c.cy+c.y11,c.cx+c.x11),E),F.arc(c.cx,c.cy,x,Y0(c.y11,c.x11),Y0(c.y01,c.x01),!E))):F.arc(0,0,k,i,r,E):F.lineTo(h,O)):F.moveTo(0,0),F.closePath(),t)return F=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +T.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +C.apply(this,arguments))/2-J0/2;return[q0(e)*t,X0(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:H0(+t),e):A},e.outerRadius=function(t){return arguments.length?(T="function"==typeof t?t:H0(+t),e):T},e.cornerRadius=function(t){return arguments.length?(P="function"==typeof t?t:H0(+t),e):P},e.padRadius=function(t){return arguments.length?(L=null==t?null:"function"==typeof t?t:H0(+t),e):L},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:H0(+t),e):N},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:H0(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:H0(+t),e):j},e.context=function(t){return arguments.length?(F=null==t?null:t,e):F},e}function m1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function v1(t){this._context=t}function b1(t){return new v1(t)}function x1(t){return t[0]}function w1(t){return t[1]}function k1(o,s){var l=H0(!0),c=null,u=b1,f=null,h=c1(e);function e(t){var e,n,r,i=(t=m1(t)).length,a=!1;for(null==c&&(f=u(r=h())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?x1:H0(o),s="function"==typeof s?s:void 0===s?w1:H0(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:H0(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:H0(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:H0(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function M1(u,f,h){var d=null,p=H0(!0),g=null,y=b1,m=null,v=c1(e);function e(t){var e,n,r,i,a,o=(t=m1(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(m=y(a=v())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),m.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return m=null,a+""||null}function t(){return k1().defined(p).curve(y).context(g)}return u="function"==typeof u?u:void 0===u?x1:H0(+u),f="function"==typeof f?f:H0(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?w1:H0(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:H0(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:H0(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:H0(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:H0(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:H0(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:H0(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:H0(!!t),e):p},e.curve=function(t){return arguments.length?(y=t,null!=g&&(m=y(g)),e):y},e.context=function(t){return arguments.length?(null==t?g=m=null:m=y(g=t),e):g},e}l1.prototype=s1.prototype,v1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var O1=S1(b1);function _1(t){this._curve=t}function S1(e){function t(t){return new _1(e(t))}return t._curve=e,t}function E1(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(S1(t)):e()._curve},t}function A1(){}function T1(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function P1(t,e){this._context=t,this._k=(1-e)/6}function L1(t,e){this._context=t,this._k=(1-e)/6}function N1(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>Z0&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>Z0&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function C1(t,e){this._context=t,this._alpha=e}_1.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},P1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:T1(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:T1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new P1(t,n)}return t.tension=function(t){return e(+t)},t}(0),L1.prototype={areaStart:A1,areaEnd:A1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:T1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new L1(t,n)}return t.tension=function(t){return e(+t)},t}(0),C1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:N1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var j1=function e(n){function t(t){return n?new C1(t,n):new P1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function F1(t,e){this._context=t,this._alpha=e}F1.prototype={areaStart:A1,areaEnd:A1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:N1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var B1=function e(n){function t(t){return n?new F1(t,n):new L1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function R1(t){this._context=t}function I1(t){return new R1(t)}function D1(t,e){this._context=t,this._t=e}function z1(t){return new D1(t,.5)}function W1(t){return new D1(t,0)}function G1(t){return new D1(t,1)}function tt(t){return new H1([t],null,t,t.ownerDocument)}R1.prototype={areaStart:A1,areaEnd:A1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},D1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};class H1{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new H1(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new H1(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new H1([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new H1(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new H1(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new H1([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),f=Qc(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var g=c.get(d);g.__data__=h,g.__facet__=!1,a.push(g),o.delete(g),c.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=h,g.__facet__=!0,a.push(g),u.delete(d)}else if(f.has(d)){const Qc=f.get(d);s.push([h,Qc]);for(const y of Qc)o.delete(y);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new H1([],i,this._parent,this._document),new H1(a,null,this._parent,this._document),new H1(o,null,this._parent,this._document),new H1([],s,this._parent,this._document),new H1(l,null,this._parent,this._document)];return new H1(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new H1(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=H1.registry[t])?new e:yf("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._elements[t];var e=this._transitions[t];e?(Array.isArray(e)?e:[e]).map(t=>t.finished.then(()=>n.remove())):n.remove()}return new H1([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function V1([t,e],[n,r]){return[t-n,e-r]}function Y1([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function q1([t,e]){return Math.atan2(e,t)}function U1([t,e]){return q1([t,e])+Math.PI/2}function $1(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function X1([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function K1(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function Z1(t){return t.map((t,e)=>e)}function R(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function J1(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*Y1(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function Q1(t,e,n,r,i){e=q1(V1(r,e))+Math.PI,n=q1(V1(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function tg(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=Z1(a),[r,o]=$c(t,t=>a[t]);const s=new i0({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function eg(t){var[t,e,n,r]=t;return[r,t,e,n]}function ng(t,e,n){var[e,r,,i]=Ou(t)?eg(e):e,[n,a]=n,t=t.getCenter(),o=U1(V1(e,t)),r=U1(V1(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:Y1(i,t),outerRadius:Y1(e,t)}}function rg(t,e,n,r){var i=t["defaultColor"],t=t[e]||{},e=t[n]||t[r];return Object.assign({defaultColor:i},e)}function ig(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function ag(t,e){return _u(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}H1.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};const og=P=>{const{colorAttribute:L,first:N=!0,last:C=!0}=P,j=J(P,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rg(r,i,a,o),{defaultColor:i,radius:a=0}=r,o=J(r,["defaultColor","radius"]),r=o.lineWidth||1,{stroke:s,radius:a=a,radiusTopLeft:l=a,radiusTopRight:c=a,radiusBottomRight:u=a,radiusBottomLeft:f=a,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:g=h,innerRadiusBottomLeft:h=h,inset:y=0,insetLeft:m=y,insetRight:v=y,insetBottom:b=y,insetTop:x=y,lineWidth:r="stroke"===L||s?r:0}=j,w=J(j,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","inset","insetLeft","insetRight","insetBottom","insetTop","lineWidth"]),{color:i=i,opacity:k}=e;if(!_u(n)&&!Eu(n)){var[M,,O]=!!Ou(n)?eg(t):t;const[T,E]=M;var[O,M]=V1(O,M),_=(0<O?T:T+O)+m,S=(0<M?E:E+M)+x,O=Math.abs(O)-(m+v),m=Math.abs(M)-(x+b);return tt(new F.Rect({})).call(R,o).style("lineWidth",r).style("x",_).style("y",S).style("width",O).style("height",m).style("stroke",void 0===s?i:s).style(ig(P),k).style(L,i).style("radius",[N?l:d,N?c:p,C?u:g,C?f:h]).call(R,w).node()}const{y:E,y1:A}=e;v=n.getCenter(),M=ng(n,t,[E,A]),x=y1().cornerRadius(a).padAngle(y*Math.PI/180);return tt(new F.Path({})).call(R,o).style("path",x(M)).style("transform",`translate(${v[0]}, ${v[1]})`).style("stroke",i||s).style("lineWidth",r).style(L,i).style(ig(P),k).call(R,j).node()}},sg=(og.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>og(Object.assign({colorAttribute:"fill"},t))),lg=(sg.props=Object.assign({},og.props),t=>og(Object.assign({colorAttribute:"stroke"},t)));lg.props=Object.assign({},og.props);const cg=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(Ou(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=J(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return og(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function ug(t,e,n){var[t,r,i,a]=t;if(Ou(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}cg.props=Object.assign({},og.props);const fg=t=>cg(Object.assign({adjustPoints:ug},t));function hg(t){const e="function"==typeof t?t:t.render;return class extends F.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}fg.props=Object.assign({},og.props);const dg=hg(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;tt(t).maybeAppend("line",()=>new F.Path({})).style("d",e).call(R,r),tt(t).maybeAppend("line1",()=>new F.Path({})).style("d",n).call(R,i)});const pg=t=>{const{curve:f,gradient:h=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connectNulls:g=!1}=t,y=J(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rg(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=J(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=h&&a?tg(a,s,l,h,d):r,s=ag(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),y);let c;if(_u(n)){const u=n.getCenter();c=n=>E1(k1().curve(O1)).angle((t,e)=>U1(V1(n[e],u))).radius((t,e)=>Y1(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(f)(n)}else c=k1().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(f);var[r,e]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,p),o=Q(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?tt(new F.Path({})).style("d",c(r)).call(R,l):a&&!g?tt(new F.Path({})).style("d",c(t)).call(R,l):tt(new dg).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},gg=(pg.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=_u(n)?I1:b1;return pg(Object.assign({curve:i},a))(t,e,n,r)}),yg=(gg.props=Object.assign({},pg.props),t=>{const{alpha:a=.5}=t,o=J(t,["alpha"]);return(t,e,n,r)=>{var i=_u(n)?B1:j1;return pg(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),mg=(yg.props=Object.assign({},pg.props),t=>pg(Object.assign({curve:G1},t))),vg=(mg.props=Object.assign({},pg.props),t=>pg(Object.assign({curve:W1},t))),bg=(vg.props=Object.assign({},pg.props),t=>pg(Object.assign({curve:z1},t)));function xg(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}bg.props=Object.assign({},pg.props);var wg,kg=Object.freeze({__proto__:null,point:xg,square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const u=h=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=h,g=J(h,["colorAttribute","symbol","mode"]),y=kg[t]||xg;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=rg(r,a,o,s),{defaultColor:a,lineWidth:o}=r,s=J(r,["defaultColor","lineWidth"]),r=g.stroke?o||1:o,{color:o=a,transform:a,opacity:l}=e,[c,u]=1===(c=t).length?c[0]:([[c,f],[u,i]]=c,[(c+u)/2,(f+i)/2]),f=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||Tu(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(p,t,e,n)||g.r||s.r;return tt(new F.Path).call(R,s).style("d",y(c,u,f)).style("lineWidth",r).style("transform",a).style("stroke",o).style(ig(h),l).style(d,o).call(R,g).node()}},Mg=(u.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>u(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),Og=(Mg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),_g=(Og.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),Sg=(_g.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),Eg=(Sg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),Ag=(Eg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),Tg=(Ag.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),Pg=(Tg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),Lg=(Pg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),Ng=(Lg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),Cg=(Ng.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),jg=(Cg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),Fg=(jg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),Bg=(Fg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),Rg=(Bg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"point"},t))),Ig=(Rg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"square"},t))),Dg=(Ig.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),zg=(Dg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Wg=(zg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),Gg=(Wg.props=Object.assign({},u.props),t=>{const{arrowSize:u="40%"}=t,f=J(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=rg(r,e,i,a),e=r["defaultColor"],i=J(r,["defaultColor"]),[a,r]=t,[t,l]=J1(a,r,{arrowSize:u}),c=l1();return c.moveTo(...a),c.lineTo(...r),c.moveTo(...r),c.lineTo(...t),c.moveTo(...r),c.lineTo(...l),tt(new F.Path).call(R,i).style("d",c.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(R,f).node()}});function Hg(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,Hg)}function Vg(){this.constructor=wg}Gg.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},wg=Hg,xs=Error,Vg.prototype=xs.prototype,wg.prototype=new Vg,Hg.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var Yg;function qg(t,e,n,r){var i,a,o,s=Ug(r=void 0===r?"...":r,n),l=Qe(t)?t:k(i=t)?"":i.toString(),c=e,u=[];if(Ug(t,n)<=e)return t;for(;;){if(a=l.substr(0,16),c<(o=Ug(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(16)))return u.join("")}for(;;){if(a=l.substr(0,1),c<(o=Ug(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var Ug=hn(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Yg=Yg||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),Yg.measureText(Qe(t)?t:"").width},function(t,e){return w([t],x(rn(e=void 0===e?{}:e)),!1).join("")});function $g(t,e){return"string"==typeof t?Ug(t,e):t}function Xg(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function Kg(t,e){e=Math.pow(10,e);return~~(t*e)/e}function Zg(t){if(en(t))return[t,t,t,t];if(qe(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var Jg=["default","active","selected","disabled","inactive"],Qg={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function ty(t){var e;return t?null==t?void 0:t.default:(e=fn(t)||{},Jg.forEach(function(t){t in e&&delete e[t]}),e)}function ey(t,e,n){return void 0===n&&(n=!1),e?(e=gn(t,e),n?vn({},ty(t),e):e):ty(t)||{}}function ny(r,i,a){void 0===a&&(a=!1);return Object.keys(r).reduce(function(t,e){var n;return n=e,new RegExp("^".concat(i,"[A-Z].*")).test(n)!==a&&(a?t[e]=r[e]:t[(n=e.slice(i.length)).charAt(0).toLowerCase()+n.slice(1)]=r[e]),t},{})}function ry(t,r){var i=t,t=Object.keys(t).reduce(function(t,e,n){return n>=r.length||(n=r[n],t.push(ny(i,n)),i=ny(i,n,!0)),t},[]);return t.push(i),t}function iy(r,i){return Object.keys(r).reduce(function(t,e){var n;return t["".concat(i).concat((n=e).charAt(0).toUpperCase()+n.slice(1))]=r[e],t},{})}function ay(t,n){void 0===n&&(n=["x","y","class"]);var r=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],i={},a={};return Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function oy(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}_.prototype.selectAll=function(t){return new _("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},_.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new _(this._elements,null,this._parent,this._document,void 0,void 0,t)},_.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new _([t],null,t,this._document)},_.prototype.append=function(t){var e=this,n="function"==typeof t?t:function(){return e.createElement(t)},r=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],a=x(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new _(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new _(r,null,r[0],this._document)},_.prototype.maybeAppend=function(t,e){e=be(this,sy,"m",ly).call(this,t.startsWith("#")?t:"#".concat(t),e);return e.attr("id",t),e},_.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=be(this,sy,"m",ly).call(this,t.startsWith(".")?t:".".concat(t),e);return e.attr("className",t),e},_.prototype.maybeAppendByName=function(t,e){e=be(this,sy,"m",ly).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},_.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),f=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),h=Qc(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],g=n(p,d),y=e(p,d);if(u.has(g))(x=u.get(g)).__data__=p,x.__facet__=!1,o.push(x),s.delete(x),u.delete(g);else if(f.has(g))(x=f.get(g)).__data__=p,x.__facet__=!0,o.push(x),f.delete(g);else if(h.has(g)){var m=h.get(g);l.push([p,m]);try{r=void 0;for(var v=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),b=v.next();!b.done;b=v.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}h.delete(g)}else u.has(y)?((x=u.get(y)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new _([],a,this._parent,this._document),new _(o,null,this._parent,this._document),new _(s,null,this._parent,this._document),new _([],l,this._parent,this._document),new _(c,null,this._parent,this._document)];return new _(this._elements,null,this._parent,this._document,w)},_.prototype.merge=function(t){var e=w(w([],x(this._elements),!1),x(t._elements),!1),t=w(w([],x(this._transitions),!1),x(t._transitions),!1);return new _(e,null,this._parent,this._document,void 0,t)},_.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=_.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},_.prototype.join=function(t,e,n,r,i){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)},_.prototype.remove=function(){for(var n=this,t=0;t<this._elements.length;t++)!function(t){var e=n._elements[t],t=n._transitions[t];t?t.then(function(){return e.remove()}):e.remove()}(t);return new _([],null,this._parent,this._document,void 0,this._transitions)},_.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},_.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})},_.prototype.style=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},_.prototype.styles=function(e){return this.each(function(i,a){var o=this,t=Object.entries(e).reduce(function(t,e){var e=x(e,2),n=e[0],r=e[1],e="function"!=typeof r?function(){return r}:r;return void 0!==r&&(t[n]=e.call(o,i,a)),t},{});this.attr(t)})},_.prototype.update=function(n){var r="function"!=typeof n?function(){return n}:n;return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},_.prototype.transition=function(t){var n="function"!=typeof t?function(){return t}:t,r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},_.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},_.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,w([this._parent,this],x(e),!1)),this},_.prototype.node=function(){return this._elements[0]},_.prototype.nodes=function(){return this._elements},_.prototype.transitions=function(){return this._transitions},_.prototype.parent=function(){return this._parent},sy=new WeakSet,ly=function(t,e){var n=this._elements[0],t=n.querySelector(t);return t||(t="string"==typeof e?this.createElement(e):e(),n.appendChild(t)),new _([t],null,this._parent,this._document)},_.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};var sy,ly,cy=_;function _(t,e,n,r,i,a,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===o&&(o=[]),sy.add(this),this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}function S(t){return new cy([t],null,t,t.ownerDocument)}function uy(t,e,n){return t.querySelector(e)?S(t).select(e):S(t).append(n)}function fy(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function hy(t){var t=t.getLocalBounds(),t=x([t.min,t.max],2),e=x(t[0],2),n=e[0],e=e[1],t=x(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function dy(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),n=e[0]-n,e=e[1]-t;return Math.sqrt(n*n+e*e)}function py(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}function gy(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)my(t,e[r]);return t}var yy=5,my=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=yy),Object.entries(i).forEach(function(t){var t=x(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?Ke(t)?(Ke(r[e])||(n[e]={}),a<o?my(r[e],t,a+1,o):n[e]=i[e]):qe(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function vy(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function by(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function xy(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function wy(a){return void 0===a&&(a=0),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,r=window.setTimeout(function(){i.apply(t,e),r=null},a))})}}var ky,My=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function Oy(t){return Qe(t)||en(t)?new F.Text({style:{text:String(t)}}):t}function _y(t){return t*Math.PI/180}function Sy(t){return Number((180*t/Math.PI).toPrecision(5))}function Ey(t,e){var t=(t instanceof F.DisplayObject?t:t.node()).computedStyleMap().get("transform");return!t||"unset"===t.value||null==(t=null==t?void 0:t.find(function(t){return t.t===e}))?void 0:t.d.map(function(t){return t.value})}function Ay(t,e){if(e)try{var o=t instanceof F.DisplayObject?t:t.node(),n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=((r=o)instanceof F.DisplayObject?r:r.node()).getBBox()).width,a=r.height,[(r=x([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?i:a):t}),2))[0],r[1]]),")");var r,i,a});o.attr("transform",n)}catch(t){}}function Ty(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}function Py(t,e){return He(t)?t.apply(void 0,w([],x(e),!1)):t}function Ly(t,e,n,r,i){void 0===r&&(r=!0),void 0===i&&(i=function(t){t instanceof cy?t.node().removeChildren():t instanceof F.DisplayObject?t.removeChildren():t instanceof HTMLElement&&(t.innerHTML="")}),t?n(e):r&&i(e)}function Ny(){return null!==ky&&ky.apply(this,arguments)||this}function Cy(e,n){return me(t,r=F.CustomElement),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t){var e;this.attr(vn({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t.prototype.attributeChangedCallback=function(){var t,e;null!=(e=null==(t=this.descriptor)?void 0:t.render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,gy({},{style:n},t))||this;return t.descriptor=e,t}var r}me(Ny,ky=F.CustomElement);function jy(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=x(t,2),e=t[0],t=t[1],n=r(t);return[e,{name:n,class:".".concat(n),id:"#".concat(n),toString:function(){return n}}]})),Object.assign(t,{prefix:r}),t}function Fy(t){var r=v({},t),i=new RegExp(/^(f|[\S]+F)(ilter|iltrate)$/),a={},o={iltrate:"ilter",ilter:"iltrate"};return Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];i.test(e)&&(a[e]=t)}),Object.keys(a).forEach(function(t){delete r[t]}),Object.keys(a).forEach(function(t){var e,n;(t.endsWith("iltrate")&&"function"!=typeof a[t]||t.endsWith("ilter")&&"function"==typeof a[t])&&(n=t.replace(i,function(t,e,n){return"".concat(e).concat(o[n])}),Object.assign(r,((e={})[n]=a[t],e)))}),r}function By(t,e,n){void 0===n&&(n="...");t=t instanceof F.Text?t:t.node();"text"===t.nodeName&&t.attr({wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function Ry(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=r.width,r=r.height,e=e/Math.max(i,r);n&&t.scale(e)}function Iy(r,t,e,n,i){function a(){return"update"in r?r.update(t):r.attr(t),Promise.resolve()}void 0===e&&(e={}),void 0===n&&(n=!0),void 0===i&&(i=50);var o={},s={},l=["x","y","width","height","opacity","radius"];Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],t=t[1],n=r.attr(e);l.includes(e)&&!k(t)&&!k(n)&&n!==t&&Math.abs(+n-+t)>=i&&(o[e]=n,s[e]=t)});return n?0<Object.keys(o).length?(null==(n=r.animate([o,s],v({fill:"both"},e)))?void 0:n.finished.then(a))||Promise.resolve():void Promise.resolve():a()}me(zy,Dy=F.CustomElement),zy.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},zy.prototype.update=function(t){this.attr(gy({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},zy.prototype.clear=function(){this.removeChildren()},zy.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},zy.prototype.attributeChangedCallback=function(){},zy.prototype.bindEvents=function(t,e){};var Dy,o=zy;function zy(t){return Dy.call(this,t)||this}function Wy(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}function Gy(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function Hy(t,e,n){return[["M",t-n,e],["L",t+n,e]]}_s=Wy,Ya=Hy;function Vy(t){n="default",Ue(e=t)&&e instanceof Image?n="image":He(e)?n="symbol":Qe(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}me(Uy,Yy=o),Uy.prototype.render=function(t,e){var r=t.x,i=t.y,a=t.symbol,n=t.size,o=void 0===n?16:n,s=J(t,["x","y","symbol","size"]),l=Vy(a);l?uy(e,".".concat(l,"-marker"),l).attr("className","marker ".concat(l,"-marker")).call(function(t){var e,n;"image"===l?t.styles({img:a,width:e=2*o,height:e,x:-o,y:-o}):(e=o/2,n=He(a)?a:Uy.getSymbol(a),t.styles(v({path:null==n?void 0:n(r,i,e)},s)))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},Uy.MARKER_SYMBOL_MAP=new Map,Uy.registerSymbol=function(t,e){Uy.MARKER_SYMBOL_MAP.set(t,e)},Uy.getSymbol=function(t){return Uy.MARKER_SYMBOL_MAP.get(t)};var Yy,qy=Uy;function Uy(){return null!==Yy&&Yy.apply(this,arguments)||this}qy.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),qy.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),qy.registerSymbol("line",Gy),qy.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),qy.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),qy.registerSymbol("circle",Wy),qy.registerSymbol("point",_s),qy.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),qy.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),qy.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),qy.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),qy.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),qy.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),qy.registerSymbol("line",Gy),qy.registerSymbol("dot",Hy),qy.registerSymbol("dash",Ya),qy.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),qy.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),qy.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),qy.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),qy.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});me(Ky,$y=o),Ky.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,f=t.align,t=t.verticalAlign,i=x(Zg(void 0===i?0:i),4),h=i[0],d=i[1],p=i[2],i=i[3],g=uy(e,".tag-content","g").attr("className","tag-content").node(),y=uy(g,".tag-marker",function(){return new qy({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(a||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(m=(y=y).getLocalBounds()).halfExtents[0]?m.max[0]+(u||0):y.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:y.style.y}),m=u.x,y=u.y,y=(S(g).maybeAppendByClassName("tag-text","text").styles(v(v({fontFamily:"sans-serif",fontSize:12,text:k(o)?"":"".concat(o),x:m,y:y},s),{textBaseline:"middle"})).call(function(t){o||t.remove()}),u=i,m=h,y=f||"start",s=t||"top",t=(f=g).getLocalBounds(),r=n=0,"start"===y&&(n=u),"center"===y&&(n=-t.halfExtents[0]),"end"===y&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),f.setLocalPosition([n,r]),g.getLocalBounds());S(e).maybeAppendByClassName("tag-background","rect").styles(v({zIndex:(g.style.zIndex||0)-1,y:y.min[1]-h,x:y.min[0]-i,width:null!==c?i+d+2*y.halfExtents[0]:0,height:null!==c?h+p+2*y.halfExtents[1]:0,radius:null!=l?l:2,fill:"#fafafa",stroke:"#d9d9d9",lineWidth:1},c))},Ky.tag="tag",Ky.defaultOptions={style:{padding:4,spacing:4}};var $y,Xy=Ky;function Ky(t){return $y.call(this,vn({},Ky.defaultOptions,t))||this}var Zy,Jy,Qy={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},tm={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},em={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}};function nm(t){var n=Zy.call(this,gy({},nm.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function rm(t){return Jy.call(this,vn({},rm.defaultOptions,t))||this}me(nm,Zy=o),Object.defineProperty(nm.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(nm.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,qg(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(nm.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=on(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(nm.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),nm.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=vn({},gn(Qy,[n,e]),ey(gn(tm,[t,e]),r),ey(gn(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in em[e]&&(i[t]=gn(em,[e,t]))}),Object.keys(em.strict[e]).forEach(function(t){i[t]=gn(em,["strict",e,t])}),vn(i,ey(gn(this.attributes,e),"disabled"))),i},nm.prototype.render=function(t,e){var n=t.padding,n=void 0===n?0:n,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),x(Zg(n),4)),i=(n[0],n[1]),a=(n[2],n[3]),o=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=uy(e,".marker",function(){return new qy({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(v(v({},s),{symbol:r,x:a+l/2,y:o/2,size:l}))}).node().getLocalBounds(),c=this.text,c=void 0===c?"":c,u=this.getStyle("textStyle"),n=(this.textShape=uy(e,".text","text").attr("className","text").styles(v({x:l?n.max[0]+t:a,y:o/2,text:c,textAlign:"left",textBaseline:"middle"},u)).node(),this.textShape.getLocalBounds()),c=this.getStyle("buttonStyle");S(e).maybeAppendByClassName(".background","rect").styles(v(v({zIndex:-1},c),{height:o,width:a+(l?l+t:0)+2*n.halfExtents[0]+i}))},nm.prototype.update=function(t){this.attr(vn({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},nm.prototype.setState=function(t){this.update({state:t})},nm.prototype.hide=function(){this.style.visibility="hidden"},nm.prototype.show=function(){this.style.visibility="visible"},nm.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},nm.tag="button",nm.defaultOptions={style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},me(rm,Jy=o),rm.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=x(Zg(void 0===i?0:i),3),i=t[0],f=t[1],t=t[2],h=uy(e,".container","g").styles({className:"container",x:n+t,y:r+i}),d=0,p=0,g=(h.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new Xy({className:"breadcrumb-item",style:v(v({x:d,y:p,text:k(n.text)?n.id:n.text,textStyle:l},yn(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(h.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,k(c)||c-f<d&&(r.attr({x:0,y:p+i}),d=a,p+=i),g.bindInnerEvents(r,n),u||{}),n=a.spacing,n=void 0===n?0:n,o=a.text,o=void 0===o?"/":o,a=a.style;t!==s.length-1&&(e=new F.Text({className:"".concat(rm.tag,"-separator"),id:"".concat(rm.tag,"-separator-").concat(t),style:v(v(v(v({},Qg),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),h.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},rm.prototype.update=function(t){this.attr(vn({},this.attributes,t)),this.render(this.attributes,this)},rm.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},rm.tag="breadcrumb",rm.defaultOptions={style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:v(v({},Qg),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};me(om,im=F.DisplayObject),om.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},om.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},om.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},om.prototype.createLines=function(t){S(this.linesGroup).selectAll("line").data(t).join(function(t){return t.append("path").each(function(t){S(this).styles(t)})},function(t){return t.each(function(t){S(this).styles(t)})},function(t){return t.remove()})},om.prototype.createAreas=function(t){S(this.linesGroup).selectAll("area").data(t).join(function(t){return t.append("path").each(function(t){S(this).styles(t)})},function(t){return t.each(function(t){S(this).styles(t)})},function(t){return t.remove()})};var im,am=om;function om(t){var e=this,n=t.style,t=J(t,["style"]);return(e=im.call(this,vn({},{type:"lines",style:{width:0,height:0}},v({style:n},t)))||this).linesGroup=e.appendChild(new F.Group({name:"lines"})),e.areasGroup=e.appendChild(new F.Group({name:"areas"})),e.render(),e}me(cm,sm=F.DisplayObject),cm.prototype.render=function(){var t=this.attributes.columns;S(this.columnsGroup).selectAll("column-group").data(t.flat()).join(function(t){return t.append("rect").each(function(t){S(this).styles(t)})},function(t){return t.each(function(t){S(this).styles(t)})},function(t){return t.remove()})},cm.prototype.update=function(t){this.attr(vn({},this.attributes,t)),t.columns&&(this.clear(),this.render())},cm.prototype.clear=function(){this.removeChildren()};var sm,lm=cm;function cm(t){var e=this,n=t.style,t=J(t,["style"]);return(e=sm.call(this,vn({},{type:"column",style:{width:0,height:0}},v({style:n},t)))||this).columnsGroup=new F.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function um(t){return 0===t.length?[0,0]:[Je(function(t,e){if(qe(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=He(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return Je(t)||0})),Ze(function(t,e){if(qe(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=He(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return Ze(t)||0}))]}function fm(t){for(var e=fn(t),n=e[0].length,t=x([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}function hm(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r;if(o){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=ce([0,0],c,x=t[s]),u=ue([0,0],u,x)}for(var s=0,f=t.length;s<f;s+=1){var h,d,p,g,y,m,v,b,x=t[s];0!==s||n?s!==f-1||n?(h=t[[s?s-1:f-1,s-1][n?0:1]],d=t[n?(s+1)%f:s+1],m=fe(m=pe([0,0],d,h),m,e),0!==(y=(p=he(x,h))+(g=he(x,d)))&&(p/=y,g/=y),y=fe([0,0],m,-p),m=fe([0,0],m,g),v=le([0,0],x,y),b=ce([0,0],b=le([0,0],x,m),ue([0,0],d,x)),b=ue([0,0],b,ce([0,0],d,x)),v=ce([0,0],v=le([0,0],x,y=fe([0,0],y=pe([0,0],b,x),-p/g)),ue([0,0],h,x)),v=ue([0,0],v,ce([0,0],h,x)),b=le([0,0],x,m=fe([0,0],m=pe([0,0],x,v),g/p)),o&&(v=ce([0,0],v=ue([0,0],v,c),u),b=ce([0,0],b=ue([0,0],b,c),u)),a.push(i),a.push(v),i=b):(v=x,a.push(i),a.push(v)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[0])[0],l[1]])),f}function dm(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return w([e===n?"M":"L"],x(t),!1)});return e?t.reverse():t}function pm(t,e){if(void 0===e&&(e=!1),t.length<=2)return dm(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];bn(a,n.slice(-2))||n.push.apply(n,w([],x(a),!1))}var o=hm(n,!1);return e?o.unshift(w(["M"],x(t[r-1]),!1)):o.unshift(w(["M"],x(t[0]),!1)),o}function gm(t,e,n){t=fn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}me(vm,ym=o),Object.defineProperty(vm.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=fn(t),en(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(vm.prototype,"data",{get:function(){return this.attributes.isStack?fm(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(vm.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(vm.prototype,"baseline",{get:function(){var t=this.scales.y,e=x(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(vm.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(vm.prototype,"linesCfg",{get:function(){var n=this;if("line"!==this.attributes.type)throw new Error("linesCfg can only be used in line type");var t,r,i,a,o,e,s,l,c,u=this.attributes,f=u.isStack,h=u.smooth,d=ny(this.attributes,"area"),p=ny(this.attributes,"line"),u=this.containerCfg.width,g=this.data;return 0===g[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,g=g,r=(e={type:"line",x:e,y:t}).x,i=e.y,a=(e=x(i.getOptions().range||[0,0],2))[0],o=e[1],a<o&&(e=x([a,o],2),o=e[0],a=e[1]),t=g.map(function(t){return t.map(function(t,e){return[r.map(e),tn(i.map(t),o,a)]})}),e=[],d&&(g=this.baseline,e=f?(h?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=pm(o),l=void 0,l=0===i?gm(s,e,n):(a=pm(t[i-1],!0),o=o[0],a[0][0]="L",w(w(w([],x(s),!1),x(a),!1),[w(["M"],x(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=dm(t[i]),s=void 0,s=0===i?gm(o,e,n):((a=dm(t[i-1],!0))[0][0]="L",w(w(w([],x(o),!1),x(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,g):(s=h,l=u,c=g,t.map(function(t){return gm((s?pm:dm)(t),l,c)}))),{lines:t.map(function(t,e){return v({stroke:n.getColor(e),path:(h?pm:dm)(t)},p)}),areas:e.map(function(t,e){return v({path:t,fill:n.getColor(e)},d)})})},enumerable:!1,configurable:!0}),Object.defineProperty(vm.prototype,"columnsCfg",{get:function(){var i=this;if("column"!==this.attributes.type)throw new Error("columnsCfg can only be used in column type");var a=ny(this.attributes,"column"),o=this.attributes.isStack,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=fm(s));var e=this.createScales(s),l=e.x,c=e.y,e=x(um(s),2),n=e[0],e=e[1],u=new i0({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return v(v({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),vm.prototype.render=function(t,e){this.containerShape=uy(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=uy(e,".".concat(r),function(){return new("line"===n?am:lm)({className:r,style:i})}).styles(i).node()},vm.prototype.update=function(t){this.attr(vn({},this.attributes,t)),this.render(this.attributes,this)},vm.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},vm.prototype.getColor=function(t){var e=this.attributes.color;return qe(e)?e[t%e.length]:He(e)?e.call(null,t):e},vm.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,n=n.range,n=void 0===n?[]:n,i=this.containerCfg,a=i.width,i=i.height,o=x(um(t),2),s=o[0],o=o[1],s=new i0({domain:[null!=(e=n[0])?e:s,null!=(e=n[1])?e:o],range:[i,0]});return"line"===r?{type:r,x:new i0({domain:[0,t[0].length-1],range:[0,a]}),y:s}:(e=(n=this.attributes).isGroup,o=n.spacing,{type:r,x:new Up({domain:t[0].map(function(t,e){return e}),range:[0,a],paddingInner:e?o:0}),y:s})},vm.tag="sparkline",vm.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,nice:!0,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",columnPadding:.1}};var ym,mm=vm;function vm(t){return ym.call(this,vn({},vm.defaultOptions,t))||this}var bm,xm={fill:"#fff",stroke:"#bfbfbf",lineWidth:1,size:10,radius:2,strokeOpacity:1},wm={fontSize:12,fill:"#000",fillOpacity:.45,textAlign:"center",textBaseline:"middle"},km={orient:"horizontal",type:"start",showLabel:!0},Mm=jy({labelGroup:"label-group",label:"label",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),Om=Cy({render:function(t,e){var n=t.size,n=void 0===n?10:n,r=t.radius,r=void 0===r?n/4:r,i=t.orient,t=(t.class,J(t,["size","radius","orient","class"])),a=2.4*n,r=S(e).maybeAppendByClassName(Mm.iconRect,"rect").styles(v(v({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,l=.25*a,c=.75*a;r.maybeAppendByClassName("".concat(Mm.iconLine,"-1"),"line").styles(v({x1:o,x2:o,y1:l,y2:c},t)),r.maybeAppendByClassName("".concat(Mm.iconLine,"-2"),"line").styles(v({x1:s,x2:s,y1:l,y2:c},t)),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}}),_m=(me(Sm,bm=o),Sm.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=x(ay(ny(this.attributes,"label"),[]),2),i=r[0],r=r[1];Ly(!!n,S(t).maybeAppendByClassName(Mm.labelGroup,"g").styles(r),function(t){e.label=t.maybeAppendByClassName(Mm.label,"text").styles(v(v({},wm),i)),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},Sm.prototype.renderIcon=function(t){var e=this.attributes,n=e.iconShape,n=void 0===n?function(){return new Om({style:r})}:n,e=e.orient,r=v(v({orient:e},xm),ny(this.attributes,"icon"));this.icon=S(t).maybeAppendByClassName(Mm.icon,n).update(r)},Sm.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},Sm);function Sm(t){return bm.call(this,gy({},{style:km},t))||this}me(Tm,Em=o),Object.defineProperty(Tm.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.clampValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(Tm.prototype,"sparklineShapeCfg",{get:function(){var t,e,n,r,i,a,o,s;return"horizontal"!==this.attributes.orient?null:(i=(t=ny(this.attributes,"sparkline")).padding,t=J(t,["padding"]),e=(i=x(Zg(i),4))[0],n=i[1],r=i[2],i=i[3],a=(o=this.availableSpace).width,o=o.height,s=this.attributes.trackLineWidth,v(v({x:(s=+(void 0===s?0:s))/2+i,y:s/2+e},t),{zIndex:0,width:a-s-i-n,height:o-s-e-r}))},enumerable:!1,configurable:!0}),Object.defineProperty(Tm.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,t=t.trackSize,t=x(this.getOrientVal([[e,t],[t,e]]),2);return{width:t[0],height:t[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(Tm.prototype,"availableSpace",{get:function(){var t=x(Zg(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],t=t[3],i=this.shape;return{x:t,y:e,width:i.width-(t+n),height:i.height-(e+r)}},enumerable:!1,configurable:!0}),Tm.prototype.getValues=function(){return this.values},Tm.prototype.setValues=function(t,e){void 0===e&&(e=!1),this.attr("values",t=void 0===t?[0,0]:t),Iy(this.selectionShape.node(),this.selectionCfg,this.animation,e),Iy(this.startHandle.node(),this.getHandleShapeCfg("start"),this.animation,e),Iy(this.endHandle.node(),this.getHandleShapeCfg("end"),this.animation,e)},Tm.prototype.innerSetValues=function(t,e){void 0===e&&(e=!1);var n=this.values,t=this.clampValues(t=void 0===t?[0,0]:t);this.update({values:t}),e&&this.onValueChange(n)},Tm.prototype.renderTrack=function(t){var e=this.attributes.brushable,n=ny(this.attributes,"track");this.trackShape=S(t).maybeAppendByClassName("slider-track","rect").styles(v(v(v({},this.shape),n),{cursor:e?"crosshair":"default"}))},Tm.prototype.renderSparkline=function(t){var n=this;Ly("horizontal"===this.attributes.orient,S(t).maybeAppendByClassName("slider-sparkline-group","g"),function(t){var e=n.sparklineShapeCfg;t.maybeAppendByClassName("slider-sparkline",function(){return new mm({style:e})}).call(function(t){t.node().update(e)})})},Object.defineProperty(Tm.prototype,"selectionCfg",{get:function(){var t=ny(this.attributes,"selection");return v(v({},t),this.calcMask())},enumerable:!1,configurable:!0}),Tm.prototype.renderSelection=function(t){function e(t){var e="".concat(t,"-handle"),n=r.getHandleShapeCfg(t);return r.foregroundGroup.maybeAppendByClassName(e,function(){return new _m({style:n})}).style("type",t).update(n)}var r=this;this.foregroundGroup=S(t).maybeAppendByClassName("slider-foreground","g"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName("slider-selection","rect").styles(this.selectionCfg);this.startHandle=e("start"),this.endHandle=e("end")},Tm.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderSelection(e)},Tm.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n=x(this.range,2),r=n[0],n=n[1],i=x(this.getValues().map(function(t){return Kg(t,e)}),2),a=i[0],i=i[1],t=x((t||[a,i]).map(function(t){return Kg(t,e)}),2),o=t[0],t=t[1],s=(t<o&&(o=(s=x([t,o],2))[0],t=s[1]),t-o);return n-r<s?[r,n]:o<r?a===r&&i===t?[r,t]:[r,s+r]:n<t?i===n&&a===o?[o,n]:[n-s,n]:[o,t]},Tm.prototype.calcMask=function(t){var t=x(this.clampValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.x,i=n.y,a=n.width,n=n.height;return this.getOrientVal([{y:i,height:n,x:e*a+r,width:(t-e)*a},{x:r,width:a,y:e*n+i,height:(t-e)*n}])},Tm.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=x(this.clampValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},Tm.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orient,n=n.formatter,i=ny(this.attributes,"handle"),a=ny(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.height,u=this.calcMask(),f=u.x,h=u.y,d=u.width,u=u.height,n=n("start"===t?s[0]:s[1]),s=this.appendChild(new F.Text({style:v(v(v({visibility:"hidden"},Qg),a),{text:n})})),a=s.getBBox(),p=a.width,a=a.height,s=(s.destroy(),0),g=0;return"horizontal"===r?(e=(r=i+o)+p/2,s="start"===t?0<f-r-p?-e:e:p<c-f-d-r?e:-e):(e=i+o,g="start"===t?a<h-o?-e:e:a<l-h-u-o?e:-e),{x:s,y:g,text:n}},Tm.prototype.getHandleLabelShapeCfg=function(t){var e;return this.attributes.showLabel?(e=ny(this.attributes,"handleLabel"),v(v({},e),this.calcHandleText(t))):{}},Tm.prototype.getHandleIconShapeCfg=function(){var t=this.attributes,e=t.orient,t=t.handleIconShape,n=ny(this.attributes,"handleIcon"),r=this.getOrientVal(["ew-resize","ns-resize"]),i=this.getHandleSize();return v(v({},n),{shape:t,orient:e,cursor:r,size:i})},Tm.prototype.getHandleShapeCfg=function(t){var e=this.attributes,n=e.showHandle,e=e.showLabel,r=this.calcHandlePosition(t),i=r.x,r=r.y,a=this.calcHandleText(t);return v(v(v({zIndex:3,showLabel:e,visibility:n?"visible":"hidden"},iy(this.getHandleIconShapeCfg(),"icon")),iy(v(v({},this.getHandleLabelShapeCfg(t)),a),"label")),{x:i,y:r})},Tm.prototype.getHandleSize=function(){var t,e=this.attributes.handleIconSize;return e||(t=(e=this.attributes).width,e=e.height,Math.floor((this.getOrientVal([+e,+t])+4)/2.4))},Tm.prototype.getOrientVal=function(t){var t=x(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},Tm.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=x(this.getValues(),2),t=[r[0]+t,r[1]+e].sort();n?this.setValues(t):this.innerSetValues(t,!0)},Tm.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},Tm.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new F.CustomEvent(n,{detail:t}))})},Tm.prototype.bindEvents=function(){var n=this,t=this.selectionShape,t=(this.addEventListener("wheel",this.onScroll),t.on("mousedown",this.onDragStart("selection")),t.on("touchstart",this.onDragStart("selection")),this.dispatchCustomEvent(t,"mouseenter","selectionMouseenter"),this.dispatchCustomEvent(t,"mouseleave","selectionMouseleave"),this.dispatchCustomEvent(t,"click","selectionClick"),[this.startHandle,this.endHandle].forEach(function(t){var e=t.node().attr("type");t.on("mousedown",function(t){n.onDragStart(e)(t)}),t.on("touchstart",function(t){n.onDragStart(e)(t)})}),this.trackShape);this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"mouseenter","trackMouseenter"),this.dispatchCustomEvent(t,"mouseleave","trackMouseleave"),t.on("mousedown",this.onDragStart("track")),t.on("touchstart",this.onDragStart("track"))},Tm.prototype.onScroll=function(t){var e;this.attributes.scrollable&&(e=t.deltaX,t=t.deltaY,t=this.getRatio(t||e),this.setValuesOffset(t,t,!0))},Tm.tag="slider",Tm.defaultOptions={style:v(v(v({values:[0,1],trackLength:200,trackSize:20,slidable:!0,brushable:!0,scrollable:!0,orient:"horizontal",trackZIndex:-1,trackFill:"#416180",trackOpacity:.05,selectionCursor:"move",selectionZIndex:2,selectionFill:"#5B8FF9",selectionFillOpacity:.45,sparklinePadding:1,padding:0,showHandle:!0,showLabel:!0,handleSpacing:2,formatter:function(t){return t}},iy(km,"handle")),iy(xm,"handleIcon")),iy(wm,"handleLabel"))};var Em,Am=Tm;function Tm(t){var a=Em.call(this,vn({},Tm.defaultOptions,t))||this;return a.range=[0,1],a.animation={duration:100,fill:"both"},a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(oy(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([+r,+n])),a.selectionWidth=0,document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){var e=a.attributes,n=e.slidable,r=e.brushable,e=(t.stopPropagation(),a.getOrientVal(oy(t))),t=e-a.prevPos;if(t){var i=a.getRatio(t);switch(a.target){case"start":n&&a.setValuesOffset(i);break;case"end":n&&a.setValuesOffset(0,i);break;case"selection":n&&a.setValuesOffset(i,i);break;case"track":if(!r)return;a.selectionWidth+=i,a.innerSetValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort(),!0)}a.prevPos=e}},a.onDragEnd=function(){document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChange=function(t){t=new F.CustomEvent("valuechange",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}me(Nm,Pm=o),Object.defineProperty(Nm.prototype,"padding",{get:function(){return Zg(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(Nm.prototype,"value",{get:function(){var t=this.attributes.value,e=x(this.range,2),n=e[0],e=e[1];return tn(t,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(Nm.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,t=t.trackLength;return void 0===t?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(Nm.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=x(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3],t=x(this.getOrientVal([[e,t],[t,e]]),2);return{x:n,y:r,width:+t[0]-(n+i),height:+t[1]-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(Nm.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,t=t.trackSize;return e?t/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(Nm.prototype,"thumbRadius",{get:function(){var t,e;return this.attributes.isRound?(t=(e=this.availableSpace).width,e=e.height,this.attributes.thumbRadius||this.getOrientVal([e,t])/2):0},enumerable:!1,configurable:!0}),Nm.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,e=e.viewportLength/e.contentLength,n=x(this.range,2),r=n[0],t=t*(n[1]-r-e);return[t,t+e]},Nm.prototype.getValue=function(){return this.value},Nm.prototype.renderSlider=function(t){var e=this.attributes,n=e.orient,r=e.trackSize,i=e.padding,e=e.slidable,a=x(ry(this.attributes,["track","thumb"]),2),o=a[0],a=a[1],s=v(v({orient:n,padding:i,slidable:e,trackSize:r,brushable:!1,showHandle:!1,values:this.getValues(),trackLength:this.trackLength,trackRadius:this.trackRadius,selectionRadius:this.thumbRadius},iy(o,"track")),iy(a,"selection"));this.slider=S(t).maybeAppendByClassName("scrollbar",function(){return new Am({style:s})}).update(s).node()},Nm.prototype.render=function(t,e){this.renderSlider(e)},Nm.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.style.value,r=x(this.range,2),i=r[0],r=r[1];this.slider.setValues(this.getValues(tn(t,i,r)),e),this.onValueChange(n)},Nm.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(t){t.stopPropagation(),e.onTrackClick(t.detail)}),this.onHover()},Nm.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},Nm.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},Nm.tag="scrollbar",Nm.defaultOptions={style:{value:0,trackSize:10,isRound:!0,slidable:!0,scrollable:!0,orient:"vertical",padding:[2,2,2,2]}};var Pm,Lm=Nm;function Nm(t){var a=Pm.call(this,vn({},Nm.defaultOptions,t))||this;return a.range=[0,1],a.onValueChange=function(t){var e=a.style.value;t!==e&&(a.dispatchEvent(new F.CustomEvent("scroll",t={detail:{oldValue:t,value:e}})),a.dispatchEvent(new F.CustomEvent("valuechange",t)))},a.onTrackClick=function(t){var e,n,r,i;a.attributes.slidable&&(r=(e=x(a.getLocalPosition(),2))[0],e=e[1],n=(i=x(a.padding,4))[0],i=i[3],r=a.getOrientVal([r+i,e+n]),i=(a.getOrientVal(oy(t))-r)/a.trackLength,a.setValue(i,!0))},a.onThumbMouseenter=function(t){a.dispatchEvent(new F.CustomEvent("thumbMouseenter",{detail:t.detail}))},a.onTrackMouseenter=function(t){a.dispatchEvent(new F.CustomEvent("trackMouseenter",{detail:t.detail}))},a.onThumbMouseleave=function(t){a.dispatchEvent(new F.CustomEvent("thumbMouseleave",{detail:t.detail}))},a.onTrackMouseleave=function(t){a.dispatchEvent(new F.CustomEvent("trackMouseleave",{detail:t.detail}))},a}var Es={style:{data:[],dataThreshold:100,showTitle:!0,titlePosition:"lb",titleFill:"black",titleFontSize:12,titleTextAlign:"center",titleSpacing:0,titleTextBaseline:"middle",showLine:!0,lineLineWidth:1,lineStroke:"black",lineArrow:new F.Path({style:{path:"M 10,10 L -10,0 L 10,-10 L0,0 L10,10Z",anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}}),lineArrowOffset:15,lineArrowSize:10,showTick:!0,tickDirection:"positive",tickStroke:"black",tickLength:5,tickLineWidth:1,tickStrokeOpacity:.65,showLabel:!0,labelSpacing:0,labelDirection:"positive",labelAlign:"parallel",labelTransforms:[],showGrid:!0,gridType:"segment",gridConnect:"line",gridDirection:"positive",gridLength:0,gridControlAngles:[]}},Cm=(vn({},Es,{style:{type:"arc"}}),vn({},Es,{style:{}}),jy({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis"));function jm(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function Fm(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=x(t,2);return[t[0],Py(t[1],e)]}))}function Bm(t,e){return e&&He(e)?t.filter(e):t}function Rm(t){return t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},"")}function Im(t,e,n){var r,i,a,o;return"surround"===e.type?(r=t,n=n,o=(e=e).connect,e=e.center,"line"===(void 0===o?"line":o)?Rm(r):e?(i=dy(r[0],e),a=n?0:1,r.reduce(function(t,e,n){var e=x(e,2),r=e[0],e=e[1];return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(a,",")).concat(r,",").concat(e)},"")):""):Rm(t)}function Dm(t,e,n){function r(t,e){return"".concat(l," ").concat(t," ").concat(c," ").concat(e," ").concat(s)}var i=n.type,a=n.connect,o=n.center,s=n.closed?" Z":"",n=x([Im(t,n),Im(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=x([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r("L".concat(e.join()),"L".concat(t.join()));if(o)return a=(n=x([dy(e,o),dy(t,o)],2))[0],i=n[1],r("A".concat(a,",").concat(a,",0,0,1,").concat(e.join(" ")," L").concat(e.join()),"A".concat(i,",").concat(i,",0,0,0,").concat(t.join(" ")));throw new Error("Arc grid need to specified center")}function zm(t,e,n){n.type,n.center;var r=n.connect,i=n.areaFill;if(n.closed,!(e.length<2)&&i&&r){for(var a=Array.isArray(i)?i:[i,"transparent"],o=[],s=0;s<e.length-1;s++){var l=x([e[s].points,e[s+1].points],2),l=Dm(l[0],l[1],n);o.push({path:l,fill:a[s%a.length]})}S(t).selectAll(".grid-region").data(o,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){jm(this,e,o,t)}).attr("className","grid-region")},function(t){return t.each(function(t,e){jm(this,e,o,t)})},function(t){return t.remove()})}}me(Hm,Wm=o),Hm.prototype.render=function(t,e){t.className;var n,r,i,a,o=t.items,o=void 0===o?[]:o,s=(t.type,t.center,t.areaFill,t.closed,J(t,["className","items","type","center","areaFill","closed"])),o=(o=o,t.closed?o.map(function(t){var e=t.points,n=x(e),r=n[0];return n.slice(1),v(v({},t),{points:w(w([],x(e),!1),[r],!1)})}):o);n=e,r=t,i=s,a=o.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:Im(t.points,r)}}),S(n).selectAll(".grid-line").data(a,function(t){return t.id}).join(function(t){return t.append("path").styles({stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4]}).each(function(t,e){t=t.path;jm(this,e,a,v({path:t},i))}).attr("className","grid-line")},function(t){return t.each(function(t,e){jm(this,e,a,t)})},function(t){return t.remove()}),zm(e,o,t)};var Wm,Gm=Hm;function Hm(){return null!==Wm&&Wm.apply(this,arguments)||this}var Vm=hn(function(t,e){var e=x(e.angleRange,2),n=e[0];return(e[1]-n)*t+n},function(t,e){return w([t],x(e.angleRange),!1).join()}),Ym=hn(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=x(e.startPos,2))[0],n=n[1],i=x(e.endPos,2),de([0,0],[(r=x([i[0]-r,i[1]-n],2))[0],r[1]])):(i=_y(Vm(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n="linear"===(n=e).type?w(w([],x(n.startPos),!1),x(n.endPos),!1):w(w(w([],x(n.angleRange),!1),x(n.center),!1),[n.radius],!1);return"arc"===e.type&&n.push(t),n.join()});function qm(t,e,n){var t=Ym(t,n);return n=[],t=t,"positive"!==e?(n[0]=t[1],n[1]=-1*t[0]):(n[0]=-1*t[1],n[1]=t[0]),n}var Um=hn(function(t,e){var n=x(e.startPos,2),r=n[0],n=n[1],e=x(e.endPos,2),e=x([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return w(w([t],x(e.startPos),!1),x(e.endPos),!1).join()}),$m=hn(function(t,e){var n=e.radius,r=x(e.center,2),i=r[0],r=r[1],t=_y(Vm(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return w(w(w([t],x(e.angleRange),!1),[e.radius],!1),x(e.center),!1).join()});function Xm(t,e){return("linear"===e.type?Um:$m)(t,e)}function Km(a,t,o){function e(t,e){var e=x(e,2),n=(r=x(e[0],2))[0],r=r[1],i=(e=x(e[1],2))[0],e=e[1];a.maybeAppendByClassName(t,"line").attr("className","".concat(Cm.line.name," ").concat(t)).styles(v(v({},o),{x1:n,y1:r,x2:i,y2:e}))}var n,r,i,s=t.startPos,l=t.endPos,c=t.truncRange,u=t.lineExtension,f=x([s,l],2),h=x(f[0],2),d=h[0],h=h[1],f=x(f[1],2),p=f[0],f=f[1],l=x(u?(s=x([s=s,l=l,u=void 0===(u=u)?[0,0]:u],3),u=(l=x(s[0],2))[0],l=l[1],g=(n=x(s[1],2))[0],n=n[1],y=(s=x(s[2],2))[0],s=s[1],u=(g=x([g-u,n-l],2))[0],n=g[1],l=Math.sqrt(Math.pow(u,2)+Math.pow(n,2)),y=(g=x([-y/l,s/l],2))[0],s=g[1],[y*u,y*n,s*u,s*n]):new Array(4).fill(0),4),g=l[0],y=l[1],u=l[2],s=l[3];a.node().removeChildren();c?(l=(n=x(c,2))[0],c=n[1],i=(l=x([d+(p-d)*l,h+(f-h)*l],2))[0],l=l[1],r=(c=x([d+(p-d)*c,h+(f-h)*c],2))[0],c=c[1],e(Cm.lineFirst.name,[[d+g,h+y],[i,l]]),e(Cm.lineSecond.name,[[r,c],[p+u,f+s]]),i=a,t.truncRange,t.truncShape,t.lineExtension,i.select(Cm.lineFirst.class).node(),i.select(Cm.lineSecond.class).node()):e("axis-line",[[d+g,h+y],[p+u,f+s]])}function Zm(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,g,y=e.type;"linear"===y?Km(t,e,n):(r=t,a=n,u=(c=x((i=e).angleRange,2))[0],c=c[1],o=(s=x(i.center,2))[0],s=s[1],i=i.radius,console.assert(u<c,"end angle should be greater than start angle"),360==(l=c-u)?r.maybeAppendByClassName(Cm.line,"circle").styles(v({cx:o,cy:s,r:i},a)):(d=(p=x([i,i],2))[0],p=p[1],f=(g=x([u*Math.PI/180,c*Math.PI/180],2))[0],g=g[1],h=(f=x([o+i*Math.cos(f),s+i*Math.sin(f)],2))[0],f=f[1],s=(o=x([o+i*Math.cos(g),s+i*Math.sin(g)],2))[0],i=o[1],g=180<l?1:0,o=c<u?0:1,l="M".concat(h,",").concat(f,",A").concat(d,",").concat(p,",0,").concat(g,",").concat(o,",").concat(s,",").concat(i),r.maybeAppendByClassName(Cm.line,"path").styles(v({path:l},a)))),c=t,u=y,h=n,d=(f=e).lineArrow,p=e.truncRange,g=void 0===(g=e.lineArrowOffset)?0:g,f=e.lineArrowSize,d&&((d=Oy(d)).attr(h),Ry(d,f,!0),("arc"!==u&&p?c.select(Cm.lineSecond.class):c.select(Cm.line.class)).style("markerEnd",d).style("markerEndOffset",-g))}function Jm(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function Qm(t,r){var e=r.gridLength,i=void 0===e?0:e;return t.map(function(t){var t=t.value,e=x(Xm(t,r),2),n=e[0],e=e[1],t=x(fe([0,0],qm(t,r.gridDirection,r),i),2);return{points:[[n,e],[n+t[0],e+t[1]]]}})}function tv(t,e,n,r){var i=r.type,a=r.closed,o=r.areaFill,s=r.connect,l=Jm(n),c=Bm(e,n.gridFilter),e="segment"===i?Qm(c,n):function(t,o,e){var s,l,c=e.controlAngles;if(!(e=Jm(o)))throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(c&&0!==c.length)return e=x(e,2),s=e[0],l=e[1],t.map(function(t){var t=x(Xm(t.value,o),2),e=t[0],t=t[1],n=x([e-s,t-l],2),r=n[0],i=n[1],a=[[e,t]];return c.forEach(function(t){var t=_y(t),t=x([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];a.push([r*e-i*t+s,r*t+i*e+l])}),{points:a}});throw new Error("Invalid gridControlAngles")}(c,n,r);t.maybeAppendByClassName(Cm.grid,function(){return new Gm({})}).update(v(v({type:i,connect:s,closed:a,center:l},r),{items:e,areaFill:He(o)?c.map(function(t,e){return Py(o,[t,e,c])}):o}))}Object.defineProperty(nv.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(nv.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(nv.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(nv.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(nv.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(nv.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),nv.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},nv.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},nv.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},nv.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},nv.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},nv.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},nv.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},nv.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var ev=nv;function nv(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function rv(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=x(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=x(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function iv(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),a=i.min,o=i.max,i=i.halfExtents,s=a[0],l=2*i[0],i=2*i[1],a=a[1],c=o[0],o=o[1],u=0,f=0,h=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,g=e.style.textBaseline,u=+e.style.dx,f=+e.style.dy,"center"===p?h=(s+c)/2:"right"!==p&&"end"!==p||(h=c),"middle"===g?d=(a+o)/2:"bottom"!==g&&"baseline"!==g||(d=o)),x(n,4)),c=p[0],g=void 0===c?0:c,o=p[1],n=void 0===o?0:o,c=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(f+=a)-g,u+l+n,f+i+(void 0===c?g:c)),e.setEulerAngles(r),t.rotatedPoints(_y(r),h,d)}function av(t,a){var o;return w([],x(t.reduce(function(t,e,n){return n&&o&&(n=o,r=e,i=a,n=iv(new ev,n,i),rv(r=iv(new ev,r,i),[n[0],n[1],n[2],n[3]])||rv(r,[n[0],n[1],n[4],n[5]])||rv(r,[n[4],n[5],n[6],n[7]])||rv(r,[n[2],n[3],n[6],n[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}var ov=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};var sv=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c,u=ov,f=2,h=t.slice(),d=t.slice(),p=Date.now(),g=Math.min.apply(Math,w([1],x(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==Ym(0,n)[1]&&0!==Ym(0,n)[0]||(n=hy(t[0]).left,t=hy(t[i-1]).right,t=Math.abs(t-n)||1,f=Math.max(Math.floor(i*g/t),f)),a&&(s=h.splice(0,1)[0]),o&&(l=h.splice(-1,1)[0],h.reverse());av((l?w(w([l],x(d),!1),[s],!1):w([s],x(d),!1)).filter(function(t){return My(t)}),null==e?void 0:e.margin).length;)if((l&&!s&&f%2==0||l&&s)&&h.splice(0,1).forEach(r.hide),d=u(((c=h).forEach(r.show),c),{seq:f}),f++,200<Date.now()-p)return}}],["rotate",function(t,e,n,r){function i(){return av(t,s).length<1}function a(n){t.forEach(function(t,e){e=qe(n)?n[e]:n;k(e)||r.rotate(t,e)})}var o=void 0===(l=e.optionalAngles)?[0,45,90]:l,s=e.margin,e=void 0===(l=e.recoverWhenFailed)||l,l=t.map(function(t){return+(Ey(t,"rotate")||0)});if(!i()){for(var c=0;c<o.length;c++)if(a(o[c]),i())return;e&&a(l)}}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i,a,o=void 0===(s=e.suffix)?"...":s,s=e.minLength,l=e.maxLength,c=e.step,u=void 0===(e=e.margin)?[0,0,0,0]:e,e=(e=r.getTextShape(t[0]),d=e.style.fontFamily||"sans-serif",y=e.style.fontWeight||"normal",i=e.style.fontStyle||"normal",a=e.style.fontVariant,{fontSize:"object"==typeof(e=e.style.fontSize)?e.value:e,fontFamily:d,fontWeight:y,fontStyle:i,fontVariant:a}),f=$g(c,e)||1,h=$g(s,e)||1,d=$g(l,e),p=(!k(d)&&d!==1/0||(d=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),Date.now()),g=t.slice(),y=x(u,4),m=(y[0],y[1],y[2],y[3],d);h+f<m;m-=f){var v=function(e){return g.forEach(function(t){r.ellipsis(r.getTextShape(t),e,o)}),(g=av(t,u)).length<1||300<Date.now()-p?{value:void 0}:void 0}(m);if("object"==typeof v)return v.value}}]]);function lv(i,a,o){var t=a.labelTransforms,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e,n=t.type,r=sv.get(n);e=i,n=n,a.labelTransforms&&("ellipsis"!==n||1<e.map(function(t){return t.querySelector("text")}).length)&&null!=r&&r(i,t,a,o)})}function cv(t){for(var e=t;e<0;)e+=360;return e%360}var uv=hn(function(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),r=e[0],e=e[1],n=x([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return w(w([],x(t),!1),x(e),!1).join()});function fv(t,e){return qm(t,e.labelDirection,e)}function hv(t,e,n){var r,i=n.labelAlign,e=Ey(e,"rotate");return e?+e%180:(e=0,r=fv(t.value,n),t=Ym(t.value,n),"horizontal"===i?0:(e="perpendicular"===i?uv([1,0],r):uv([t[0]<0?-1:1,0],t),Ty(n=((n=Sy(e))+360)%180,-90,90)||(n+=180),n))}function dv(t,e,n){e.setLocalEulerAngles(+t);t=function(t,e,n){var r=n.type,i=n.labelAlign,t=fv(t,n),n=cv(e),e=cv(Sy(uv([1,0],t)));if([90,270].includes(e)&&!n)return"middle";if(!(e%180)&&[90,270].includes(n))return"middle";if("linear"!==r)return"parallel"===i?"middle":Ty(n,90,270)?Ty(e,90,270)?"start":"end":Ty(e,90,270)?"end":"start";if(0===e){if(Ty(n,0,90,!1,!0))return"start";if(Ty(n,0,90)||Ty(n,270,360))return"start"}if(90===e){if(Ty(n,0,90,!1,!0))return"start";if(Ty(n,90,180)||Ty(n,270,360))return"end"}if(270===e){if(Ty(n,0,90,!1,!0))return"end";if(Ty(n,90,180)||Ty(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(Ty(n,0,90)||Ty(n,270,360))return"end"}return"start"}(e.__data__.value,t,n),n=e.querySelector(".axis-label-item");"text"===(null==n?void 0:n.nodeName)&&S(n).style("textAlign",t)}function pv(t,e,n,r){var i=r.showTick,a=r.tickLength,o=r.tickDirection,s=r.labelDirection,l=Py(r.labelSpacing,[t,e,n]),s=x([fv(t.value,r),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(s,o)],2),o=x(le([0,0],fe([0,0],s[0],l+(1===s[1]?Py(i?a:0,[t,e,n]):0)),Xm(t.value,r)),2);return{x:o[0],y:o[1]}}function gv(t,e,n,r,i){var a=i.labelFormatter,o=fv(e.value,i),i=function(){return Oy(e.label||"")};return Qe(a)?i=function(){return Oy(a)}:He(a)&&(i=function(){return Oy(Py(a,[e,n,r,o]))}),t.append(i).attr("className",Cm.labelItem.name)}function yv(t,e,n,r,i,a){var o=null==(o=r.getElementsByClassName(Cm.labelItem.toString()))?void 0:o[0],a=x(ay(Fm(a,[t,e,n])),2),s=a[0],a=a[1],l=a.transform,a=J(a,["transform"]);"text"===(null==o?void 0:o.nodeName)&&o.attr(v({fontSize:12,fontFamily:"sans-serif",fontWeight:"normal",textBaseline:"middle"},s)),r.attr(v(v({},pv(t,e,n,i)),a)),Ay(r,l),dv(hv(t,r,i),r,i)}function mv(n){lv(this.node().childNodes,n,{hide:function(t){t.style.visibility="hidden"},show:function(t){t.style.visibility="visible"},rotate:function(t,e){dv(+e,t,n)},ellipsis:function(t,e,n){void 0===e&&(e=1/0),t&&By(t,e,n)},getTextShape:function(t){return t.querySelector("text")}})}function vv(t,e){return qm(t,e.tickDirection,e)}var bv=hn(function(t,e){t=x(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return w(w([],x(t),!1),[e],!1).join()});function xv(t,e,n,r,i){var a=i.tickFormatter,o=vv(e.value,i),i="line";return a instanceof F.DisplayObject?i=function(){return a}:He(a)&&(i=function(){return Py(a,[e,n,r,o])}),t.append(i).attr("className",Cm.tickItem.name)}function wv(t,e,n,r,i,a,o){var s=vv(t.value,a),l=(u=t,f=e,h=n,s=s,l=(a=a).tickLength,c=(a=x(Xm(u.value,a),2))[0],a=a[1],s=x(bv(s,Py(l,[u,f,h])),2),u=(l=x(s[0],2))[0],f=l[1],h=x(s[1],2),{x:c,y:a,x1:u,x2:h[0],y1:f,y2:h[1]}),s=l.x1,c=l.x2,a=l.y1,u=l.y2,f=l.x,h=l.y,l=x(ay(Fm(o,[t,e,n])),2),o=l[0],t=l[1];"line"===r.node().nodeName&&r.styles(v({x1:s,x2:c,y1:a,y2:u},o)),i.attr(v({x:f,y:h},t)),r.styles(o)}var kv={text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"left-top"},Mv=jy({text:"text"},"title");function Ov(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}).join(""):2<t.length?t[0]:t}function _v(r,t){t=Object.entries(t).reduce(function(t,e){var e=x(e,2),n=e[0],e=e[1];return r.node().attr(n)||(t[n]=e),t},{});r.styles(t)}me(Av,Sv=o),Av.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,t=t.inset,a=this.querySelector(Mv.text.class);if(!a)return{x:0,y:0,width:+e,height:+n};var a=a.getBBox().height,i=x(Zg(i),3),o=i[0],i=i[2],s=x([0,+n-a],2),l=s[0],s=s[1],r=Ov(r);if("i"===r)return{x:0,y:l,width:+e,height:+n};r.includes("t")&&(l=(o=x([a+o,+n-a-o],2))[0],s=o[1]),r.includes("b")&&(s=x([+n-a-i],1)[0]);o=x(Zg(t),4),r=o[0],n=o[1],a=o[2],i=o[3],t=x([i+n,r+a],2);return{x:i,y:l+r,width:+e-t[0],height:s-t[1]}},Av.prototype.render=function(t,e){t.width,t.height,t.position,t.spacing,t.class;var n,r,i,a=J(t,["width","height","position","spacing","class"]),o=x(ay(a),1)[0],s=(s=(t=t).width,l=t.height,t=t.position,n=x([+s/2,+l/2],2),u=(n=x([+n[0],+n[1],"center","middle"],4))[0],r=n[1],i=n[2],n=n[3],(t=Ov(t)).includes("l")&&(u=(c=x([0,"start"],2))[0],i=c[1]),t.includes("r")&&(u=(c=x([+s,"end"],2))[0],i=c[1]),t.includes("t")&&(r=(s=x([0,"top"],2))[0],n=s[1]),t.includes("b")&&(r=(c=x([+l,"bottom"],2))[0],n=c[1]),{x:u,y:r,textAlign:i,textBaseline:n}),t=s.x,l=s.y,c=s.textAlign,u=s.textBaseline;a.text?S(e).maybeAppendByClassName(Mv.text,"text").styles(o).call(_v,{x:t,y:l,textAlign:c,textBaseline:u}):e.removeChildren()};var Sv,Ev=Av;function Av(t){return Sv.call(this,gy({},{style:kv},t=void 0===t?{}:t))||this}function Tv(t,e,n){var r,i,a,o,s,t=t.select(Cm.mainGroup.class);return t=t,e=e,r=(n=n).titlePosition,n=void 0===(n=n.titleSpacing)?0:n,r=Ov(void 0===r?"lb":r),i=(a=t.node().getBBox()).x,a=a.y,o=(t=x(t.node().getBounds().halfExtents,2))[0],t=t[1],s=(e=x(e.node().getBounds().halfExtents,2))[0],e=e[1],i=x([i+o,a+t],2),i=(a=x([i[0],i[1]],2))[0],a=a[1],r.includes("l")&&(i-=o+s+n),r.includes("r")&&(i+=o+s+n),r.includes("t")&&(a-=t+e+n),r.includes("b")&&(a+=t+e+n),{x:i,y:a}}function Pv(t,e,n,r){var i,a,o,s;n.title&&(a=(t=x((t=t,i=(a=n).title,a=t.maybeAppendByClassName(Cm.title,function(){return Oy(i)}),[t,a]),2))[0],t=t[1],a=a,e=e,n=n,o=(r=x(ay(r=r),2))[0],r=r[1],s=void 0===(s=r.transform)?"":s,r=J(r,["transform"]),t.styles(o),e=(o=Tv(e,a,n)).x,n=o.y,a.styles(r),a.node().setPosition(e,n),Ay(t,s))}var Lv,Nv=Cy({render:function(n,e){var t=Fy(n),r=t.type,i=t.data,a=(t.class,t.dataThreshold),a=void 0===a?100:a,o=(t.crossSize,t.animation,t.title,t.showTitle),s=(t.titleSpacing,t.truncRange),l=(t.truncShape,t.showLine),c=(t.lineExtension,t.lineArrow,t.lineArrowOffset,t.lineArrowSize,t.showTick),u=(t.tickDirection,t.tickLength,t.tickFilter,t.tickFormatter,t.showLabel),f=(t.labelAlign,t.labelDirection,t.labelSpacing,t.labelFilter,t.labelFormatter,t.labelTransforms,t.showGrid),t=(t.gridFilter,t.gridLength,J(t,["type","data","class","dataThreshold","crossSize","animation","title","showTitle","titleSpacing","truncRange","truncShape","showLine","lineExtension","lineArrow","lineArrowOffset","lineArrowSize","showTick","tickDirection","tickLength","tickFilter","tickFormatter","showLabel","labelAlign","labelDirection","labelSpacing","labelFilter","labelFormatter","labelTransforms","showGrid","gridFilter","gridLength"])),r=x(ry("linear"===r?(t.startPos,t.endPos,J(t,["startPos","endPos"])):(t.angleRange,t.radius,t.center,J(t,["angleRange","radius","center"])),["title","line","tick","label","grid"]),5),h=r[0],d=r[1],p=r[2],g=r[3],y=r[4],m=function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r}(i,a).filter(function(t){t=t.value;return!(s&&t>s[0]&&t<s[1])}),t=(Ly(f,S(e).maybeAppendByClassName(Cm.gridGroup,"g"),function(t){tv(t,m,n,y)}),S(e).maybeAppendByClassName(Cm.mainGroup,"g")),r=(Ly(l,t.maybeAppendByClassName(Cm.lineGroup,"g"),function(t){Zm(t,n,d)}),t.maybeAppendByClassName(Cm.tickGroup,"g")),i=(Ly(c,r,function(t){var r,i,a;t=t,i=p,a=Bm(m,(r=n).tickFilter),t.selectAll(".axis-tick").data(a).join(function(t){return t.append("g").attr("className",Cm.tick.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=xv.apply(void 0,w(w([S(this)],x(t),!1),[a,r],!1));wv.apply(void 0,w(w([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.removeChildren();var n=xv.apply(void 0,w(w([S(this)],x(t),!1),[a,r],!1));wv.apply(void 0,w(w([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.remove()})}),t.maybeAppendByClassName(Cm.labelGroup,"g")),a=(Ly(u,i,function(t){var e,r,i,a;e=t,i=g,a=Bm(m,(r=n).labelFilter),e.selectAll(Cm.label.class).data(a).join(function(t){return t.append("g").attr("className",Cm.label.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];gv.apply(void 0,w(w([S(this)],x(t),!1),[a,r],!1)),yv.apply(void 0,w(w([],x(t),!1),[a,this,r,i],!1))}).call(function(){mv.call(e,r)})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=S(this);n.node().removeChildren(),gv.apply(void 0,w(w([n],x(t),!1),[a,r],!1)),yv.apply(void 0,w(w([],x(t),!1),[a,this,r,i],!1))}).call(function(){mv.call(e,r)})},function(t){return t.remove()})}),S(e).maybeAppendByClassName(Cm.titleGroup,"g"));Ly(o,a,function(t){Pv(t,S(e),n,h)})}},v({},Es.style)),Cv={effect:"linear",duration:200,orient:"horizontal",initPage:0,loop:!1,buttonPath:[["M",(Ts=0)-(js=6),(vs=0)-js],["L",Ts+js,vs],["L",Ts-js,vs+js],["Z"]],buttonFill:"black",buttonSize:12,buttonCursor:"pointer",formatter:function(t,e){return"".concat(t,"/").concat(e)},pageNumFontSize:12,pageNumFill:"black",pageNumTextAlign:"start",pageNumTextBaseline:"middle",controllerPadding:5,controllerSpacing:5},jv=jy({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),Fv=(me(Bv,Lv=o),Object.defineProperty(Bv.prototype,"defaultPage",{get:function(){var t=this.attributes.initPage;return tn(void 0===t?0:t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(Bv.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(Bv.prototype,"pageShape",{get:function(){var n,t=this.pageViews,t=x((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}),((null==(t=n[0])?void 0:t.map(function(t,e){return n.map(function(t){return t[e]})}))||[]).map(function(t){return Math.max.apply(Math,w([],x(t),!1))})),2),e=t[0],t=t[1],r=this.attributes,i=r.pageWidth,r=r.pageHeight;return{pageWidth:void 0===i?e:i,pageHeight:void 0===r?t:r}},enumerable:!1,configurable:!0}),Bv.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(Bv.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),Object.defineProperty(Bv.prototype,"finished",{get:function(){var t,e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&null!=(t=this.resolveFinishedPromise)&&t.call(this),this.finishedPromise},enumerable:!1,configurable:!0}),Bv.prototype.goTo=function(e){var n=this,t=this.attributes,r=t.duration,t=t.effect,i=this.currPage,a=this.playState,o=(this.finished,this.playWindow),s=this.pageViews;return"idle"!==a||e<0||s.length<=0||e>=s.length||(s[i].setLocalPosition(0,0),this.prepareFollowingPage(e),a={duration:r,easing:t,fill:"both"},i=(s=x(this.getFollowingPageDiff(e),2))[0],r=s[1],this.playState="running",Promise.all([o.animate([{transform:"translate(0, 0)"},{transform:"translate(".concat(-i,", ").concat(-r,")")}],a)].map(function(t){return null==t?void 0:t.finished})).then(function(){var t;n.innerCurrPage=e,n.playState="idle",n.setVisiblePages([e]),n.updatePageInfo(),null!=(t=n.resolveFinishedPromise)&&t.call(n)})),{finished:this.finished}},Bv.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&n<=0?{finished:this.finished}:(t=t?(n-1+e)%e:tn(n-1,0,e),this.goTo(t))},Bv.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&e-1<=n?{finished:this.finished}:(t=t?(n+1)%e:tn(n+1,0,e),this.goTo(t))},Bv.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;this.clipPath=t.maybeAppendByClassName(jv.clipPath,"rect").styles({width:n,height:e}),this.contentGroup.attr("clipPath",this.clipPath.node())},Bv.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){n.includes(e)?t.attr("visibility","visible"):t.attr("visibility","hidden")})},Bv.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orient,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,x("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=x(i.offset,3),o=x(a[0],2),s=o[0],c=o[1],l=x(a[1],2),r=l[0],o=l[1],l=x(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},Bv.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(jv.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},Bv.prototype.getFollowingPageDiff=function(t){var e,n,r,i=this.currPage;return i===t?[0,0]:(e=this.attributes.orient,n=(r=this.pageShape).pageWidth,r=r.pageHeight,t=t<i?-1:1,"horizontal"===e?[t*n,0]:[0,t*r])},Bv.prototype.prepareFollowingPage=function(t){var e,n=this.currPage,r=this.pageViews;this.setVisiblePages([t,n]),t!==n&&(e=(n=x(this.getFollowingPageDiff(t),2))[0],n=n[1],r[t].setLocalPosition(e,n))},Bv.prototype.renderController=function(t){var e,n,r,i,a,o=this,s=this.attributes.controllerSpacing,l=this.pageShape,c=l.pageWidth,l=l.pageHeight,u=2<=this.pageViews.length,t=t.maybeAppendByClassName(jv.controller,"g").style("visibility",u?"visible":"hidden");u&&(i=(u=x(ry(this.attributes,["button","pageNum"]),2))[0],u=u[1],r=(i=x(ay(i),2))[0],i=i[1],e=r.size,n=J(r,["size"]),r=t.maybeAppendByClassName(jv.prevBtnGroup,"g").styles(i),this.prevBtnGroup=r.node(),a=r.maybeAppendByClassName(jv.prevBtn,"path"),i=t.maybeAppendByClassName(jv.nextBtnGroup,"g").styles(i),this.nextBtnGroup=i.node(),[a,i.maybeAppendByClassName(jv.nextBtn,"path")].forEach(function(t){t.styles(v(v({},n),{transformOrigin:"center"})),Ry(t.node(),e,!0)}),a=t.maybeAppendByClassName(jv.pageInfoGroup,"g"),this.pageInfoGroup=a.node(),a.maybeAppendByClassName(jv.pageInfo,"text").styles(v(v({},Qg),u)),this.updatePageInfo(),t.node().setLocalPosition(c+s,l/2),r.on("click",function(){o.prev()}),i.on("click",function(){o.next()}))},Bv.prototype.render=function(t,e){e=S(e);this.renderClipPath(e),this.renderController(e),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},Bv.prototype.bindEvents=function(){function t(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}var r,i,a,o,e=this;r=function(){return e.render(e.attributes,e)},i=50;this.playWindow.addEventListener(F.ElementEvent.INSERTED,t),this.playWindow.addEventListener(F.ElementEvent.REMOVED,t)},Bv);function Bv(t){t=Lv.call(this,gy({},{style:Cv},t))||this;return t.finishedPromise=null,t.resolveFinishedPromise=null,t.playState="idle",t.contentGroup=t.appendChild(new F.Group({class:jv.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new F.Group({class:jv.playWindow.name})),t.innerCurrPage=t.defaultPage,t}function Rv(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}qy.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),qy.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),qy.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});var Iv,Dv=jy({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),zv={span:[1,1],marker:"path",markerD:Wy(6,6,6),markerFill:"#d3d2d3",markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelFontFamily:"sans-serif",valueFontFamily:"sans-serif",labelTextAlign:"start",valueTextAlign:"start",labelTextBaseline:"middle",valueTextBaseline:"middle"},Wv=(me(Gv,Iv=o),Object.defineProperty(Gv.prototype,"showValue",{get:function(){var t=this.attributes.value;return!!t&&(Qe(t)||en(t)?""!==t:""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(Gv.prototype,"actualSpace",{get:function(){var t=this.markerGroup,e=this.labelGroup,n=this.valueGroup,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height,n=n.node().getBBox(),a=n.width,n=n.height;return{markerWidth:r,labelWidth:i,valueWidth:a,height:Math.max(t,e,n)}},enumerable:!1,configurable:!0}),Object.defineProperty(Gv.prototype,"span",{get:function(){var t,e=this.attributes;return"span"in e?(t=(e=x(Zg(e.span),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(Gv.prototype,"shape",{get:function(){var t=this.attributes,e=t.markerSize,t=t.width,n=this.actualSpace,r=n.markerWidth,n=n.height,i=this.actualSpace,a=i.labelWidth,i=i.valueWidth,o=x(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=x(this.span,2),a=(e=x([e[0]*t,e[1]*t],2))[0],i=e[1]),{width:r+a+i+s+o,height:n,markerWidth:r,labelWidth:a,valueWidth:i}},enumerable:!1,configurable:!0}),Object.defineProperty(Gv.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=x(Zg(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(Gv.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=x(this.spacing,2),o=a[0];return{height:t,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+o,e+n+o+a[1]]}},enumerable:!1,configurable:!0}),Gv.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=ny(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(Dv.markerGroup,"g"),Ly(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(Dv.marker,r).styles(v({anchor:"0.5 0.5"},a)),Ry(e.markerGroup.node(),i,!0)})},Gv.prototype.renderLabel=function(t){var e=this.attributes.label,n=ny(this.attributes,"label");this.labelGroup=t.maybeAppendByClassName(Dv.labelGroup,"g"),this.labelGroup.maybeAppendByClassName(Dv.label,function(){return Oy(e)}).styles(n)},Gv.prototype.renderValue=function(t){var e=this,n=this.attributes.value,r=ny(this.attributes,"value");this.valueGroup=t.maybeAppendByClassName(Dv.valueGroup,"g"),Ly(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(Dv.value,function(){return Oy(n)}).styles(r)})},Gv.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=ny(this.attributes,"background");this.background=t.maybeAppendByClassName(Dv.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(Dv.background,"rect").styles(v({width:n,height:e},r))},Gv.prototype.adjustLayout=function(){var t=this.layout,e=(t.markerWidth,t.labelWidth),n=t.valueWidth,r=(t.width,t.height),t=x(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.styles({x:i,y:r}),this.labelGroup.styles({x:a,y:r}),By(this.labelGroup.select(Dv.label.class),e),this.showValue&&(this.valueGroup.styles({x:t,y:r}),By(this.valueGroup.select(Dv.value.class),n))},Gv.prototype.render=function(t,e){e=S(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},Gv);function Gv(t){return Iv.call(this,gy({},{style:zv},t))||this}function Hv(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var Vv,Yv=jy({page:"item-page",navigator:"navigator",item:"item"},"items"),qv={data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orient:"horizontal",click:mn,mouseenter:mn,mouseleave:mn},Uv=(me($v,Vv=o),Object.defineProperty($v.prototype,"attrs",{get:function(){return Fy(this.attributes)},enumerable:!1,configurable:!0}),Object.defineProperty($v.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty($v.prototype,"grid",{get:function(){var t=this.attrs,e=t.gridRow,n=t.gridCol,t=t.data;if(e||n)return e&&n?[e,n]:e?[e,t.length]:[t.length,n];throw new Error("gridRow and gridCol can not be set null at the same time")},enumerable:!1,configurable:!0}),Object.defineProperty($v.prototype,"renderData",{get:function(){var t=this.attrs,a=t.data,o=t.layout,s=ny(this.attrs,"item");return a.map(function(e,n){var t=e.id,r=e.label,i=e.value;return{id:"".concat(void 0===t?n:t),index:n,style:v({layout:o,label:r,value:i},Object.fromEntries(Object.entries(s).map(function(t){t=x(t,2);return[t[0],Py(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),$v.prototype.getGridLayout=function(){var u=this,t=this.attrs,f=t.orient,h=t.width,d=t.rowPadding,p=t.colPadding,g=x(this.navigatorShape,1)[0],t=x(this.grid,2),y=t[0],m=t[1],v=m*y,b=0;return this.pageViews.children.map(function(t,e){var n,r=Math.floor(e/v),i=e%v,a=u.ifHorizontal(m,y),a=[Math.floor(i/a),i%a],a=("vertical"===f&&a.reverse(),x(a,2)),o=a[0],a=a[1],s=(h-g-(m-1)*p)/m,t=t.getBBox().height,l=x([0,0],2),c=l[0],l=l[1];return b="horizontal"===f?(c=(n=x([b,o*(t+d)],2))[0],l=n[1],a===m-1?0:b+s+p):(c=(n=x([a*(s+p),b],2))[0],l=n[1],o===y-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},$v.prototype.getFlexLayout=function(){var t=this.attrs,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=x(this.navigatorShape,1)[0],r=x(this.grid,2),s=r[0],l=r[1],r=x([e-t,n],2),c=r[0],u=r[1],e=x([0,0,0,0,0,0,0,0],8),f=e[0],h=e[1],d=e[2],p=e[3],g=e[4],y=e[5],m=e[6],v=e[7];return this.pageViews.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===m?0:o,i=m+r+n;return i<=c&&Hv(g,function(t){return t<l})?(r=x([m+r,v,i],3),f=r[0],h=r[1],m=r[2]):(i=x([y+1,0,0,v+t+a],4),y=i[0],g=i[1],m=i[2],(v=i[3])+a+t<=u&&Hv(y,function(t){return t<s})?(r=x([m,v,n],3),f=r[0],h=r[1],m=r[2]):(i=x([0,0,n,0,d+1,0,0,0],8),f=i[0],h=i[1],m=i[2],v=i[3],d=i[4],p=i[5],y=i[6],g=i[7])),{width:n,height:t,x:f,y:h,page:d,index:e,pageIndex:p++,row:y,col:g++}})},Object.defineProperty($v.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return 0<e.slice(-1)[0].page?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),$v.prototype.ifHorizontal=function(t,e){return Rv(this.attrs.orient,t,e)},$v.prototype.flattenPage=function(e){e.querySelectorAll(Yv.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(Yv.page.class).forEach(function(t){e.removeChild(t).destroy()})},$v.prototype.renderItems=function(t){var e=this.attrs,n=e.click,r=e.mouseenter,i=e.mouseleave,a=(this.flattenPage(t),this.dispatchCustomEvent.bind(this));S(t).selectAll(Yv.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){t=t.style;return new Wv({style:t})}).attr("className",Yv.item.name).on("click",function(){null!=n&&n(this),a("itemClick",{item:this})}).on("mouseenter",function(){null!=r&&r(this),a("itemMouseenter",{item:this})}).on("mouseleave",function(){null!=i&&i(this),a("itemMouseleave",{item:this})})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()})},$v.prototype.relayoutNavigator=function(){var t=this.attrs,e=t.layout,t=t.width,n=(null==(n=this.pageViews.children[0])?void 0:n.getBBox().height)||0,r=x(this.navigatorShape,2),i=r[0],r=r[1];this.navigator.update(v({},"grid"===e?{pageWidth:t-i,pageHeight:n-r}:{}))},$v.prototype.adjustLayout=function(){var n,e=this,t=Object.entries((t=this.itemsLayout,n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=x(t,2);return{page:t[0],layouts:t[1]}}),u=w([],x(this.navigator.getContainer().children),!1);t.forEach(function(t){var t=t.layouts,c=e.pageViews.appendChild(new F.Group({className:Yv.page.name}));t.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=u[o];c.appendChild(o),n=t,r=o,(i=Qe(t="__layout__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(Ue(r[t])||(r[t]=en(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})}),this.relayoutNavigator()},$v.prototype.renderNavigator=function(t){var e=this.attrs.orient,n=ny(this.attrs,"nav"),n=v(v({},n),{orient:e});return this.navigator=t.maybeAppendByClassName(Yv.navigator,function(){return new Fv({})}).update(n).node(),this.navigator},$v.prototype.render=function(t,e){var n=this.attributes.data;n&&0!==n.length&&(n=this.renderNavigator(S(e)),this.renderItems(n.getContainer()),this.adjustLayout())},$v.prototype.dispatchCustomEvent=function(t,e){t=new F.CustomEvent(t,{detail:e});this.dispatchEvent(t)},$v);function $v(t){t=Vv.call(this,gy({},{style:qv},t))||this;return t.navigatorShape=[0,0],t}var Xv,Os={style:{padding:0,orient:"horizontal",backgroundFill:"transparent",titleText:"",showTitle:!0,titleSpacing:4,titlePosition:"left-top",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12}},Kv=vn({},Os,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),Zv=vn({},Os,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],slidable:!0,showHandle:!0,showLabel:!0,showIndicator:!0,labelSpacing:5,indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorBackgroundFill:"#262626"}}),Jv=jy({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),Qv=(me(tb,Xv=o),tb.prototype.renderTitle=function(t,n,r){var e=this.attributes.showTitle,i=x(ay(ny(this.attributes,"title")),2),a=i[0],i=i[1];this.titleGroup=t.maybeAppendByClassName(Jv.titleGroup,"g").styles(i),Ly(!!e,this.titleGroup,function(t){var e=v({width:n,height:r},a);t.maybeAppendByClassName(Jv.title,function(){return new Ev({style:e})}).update(e)})},tb.prototype.renderItems=function(t,e,n){var r=this,i=x(ry(this.attributes,["title"]),2),i=x(ay(i[1]),2),a=i[0],i=i[1],a=v(v({},a),{width:e,height:n});this.itemsGroup=t.maybeAppendByClassName(Jv.itemsGroup,"g").styles(i),this.itemsGroup.maybeAppendByClassName(Jv.items,function(){return new Uv({style:{data:[]}})}).update(a),Object.entries(a).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];return r.itemsGroup.attr(e,t)})},tb.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.titleGroup.select(Jv.title.class).node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(tb.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?[(e=this.titleGroup.select(Jv.title.class).node().getAvailableSpace()).width,e.height]:[n,t]},enumerable:!1,configurable:!0}),tb.prototype.render=function(t,e){var n=t.width,t=t.height,e=S(e);this.renderTitle(e,n,t),this.renderItems.apply(this,w([e],x(this.availableSpace),!1)),this.adjustLayout()},tb);function tb(t){return Xv.call(this,gy({},Kv,t))||this}var eb,nb={formatter:function(t){return t},padding:[2,4],position:"right",labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",backgroundZIndex:-1,backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333"},rb=jy({background:"background",labelGroup:"label-group",label:"label"},"indicator"),ib=(me(ab,eb=o),ab.prototype.renderBackground=function(){var t=this.style,e=t.position,t=x(Zg(t.padding),4),n=t[0],r=t[1],i=t[2],t=t[3],a=this.label.node().getLocalBounds(),o=a.min,a=a.max,t=[[o[0]-t,o[1]-n],[a[0]+r,a[1]+i]],o=this.getPath(e,t),n=ny(this.attributes,"background");this.background=S(this.group).maybeAppendByClassName(rb.background,"path").styles(v(v({},n),{path:o})),this.group.appendChild(this.label.node())},ab.prototype.renderLabel=function(){var t=this.attributes,e=t.value,n=t.formatter,t=x(ay(ny(this.attributes,"label")),2),r=t[0],t=t[1];this.label=S(this.group).maybeAppendByClassName(rb.labelGroup,"g").styles(t),e&&this.label.maybeAppendByClassName(rb.label,function(){return Oy(n(e))}).style("text",n(e).toString()).selectAll("text").styles(v(v({},Qg),r))},ab.prototype.adjustLayout=function(){var t=x(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},ab.prototype.getPath=function(n,t){var r=this,t=x(t,2),e=x(t[0],2),i=e[0],e=e[1],t=x(t[1],2),a=t[0],t=t[1],o={top:"bottom",right:"left",bottom:"top",left:"right"},a=Object.entries({top:[[i,e],[a,e]],right:[[a,e],[a,t]],bottom:[[a,t],[i,t]],left:[[i,t],[i,e]]}).map(function(t){var t=x(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[w(["M"],x(t[0]),!1),w(["L"],x(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},ab.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=x(t,2))[0],t=t[1],r=(e=x(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,w([],x(t),!1)),t=x(t,2),r=x(t[0],2),i=r[0],r=r[1],t=x(t[1],2),a=t[0],t=t[1],a=x(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=x(a[1],2),o=a[0],a=a[1],s=t/2,e=e*(t/Math.abs(t)),t=e/2,e=e*Math.sqrt(3)/2*.8,o=x([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},ab.prototype.bindEvents=function(){this.label.on(F.ElementEvent.BOUNDS_CHANGED,this.renderBackground)},ab.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},ab);function ab(t){void 0===t&&(t={});t=eb.call(this,gy({},{style:v({visibility:"hidden"},nb)},t))||this;return t.point=[0,0],t.group=t.appendChild(new F.Group({})),t}var ob=jy({marker:"marker",labelGroup:"labelGroup",label:"label"},"handle"),sb=Cy({render:function(t,e){var a,o=t.orient,n=t.visibility,r=t.spacing,s=void 0===r?0:r,r=t.showLabel,l=t.formatter,i=t.markerSymbol,i=void 0===i?Rv(o,"horizontalHandle","verticalHandle"):i,t=x(ry(t,["label","marker"]),2),c=t[0],t=t[1],u=c.text,f=J(c,["text"]);i&&"hidden"!==n?(c=v({symbol:i},t),a=S(e).maybeAppend(ob.marker.name,function(){return new qy({})}).update(c),Ly(r,S(e).maybeAppendByClassName(ob.labelGroup,"g"),function(t){var t=t.maybeAppendByClassName(ob.label,"text").styles(v({text:l(u).toString()},f)),e=a.node().getBBox(),n=e.width,e=e.height,e=x(Rv(o,[0,e+s,"center","top"],[n+s,0,"start","middle"]),4),n=e[0],r=e[1],i=e[2],e=e[3];t.node().setLocalPosition(n,r),t.style("textAlign",i).style("textBaseline",e)})):(null!=(n=e.querySelector(ob.marker.class))&&n.remove(),null!=(i=e.querySelector(ob.label.class))&&i.remove())}},v({},{markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orient:"vertical",spacing:0,showLabel:!0,formatter:function(t){return t.toString()}}));function lb(t,e){var t=x(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}var cb=jy({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function ub(t){var e=t.orient,n=t.size,t=t.len;return Rv(e,[t,n],[n,t])}function fb(t){var e=t.type,t=x(ub(t),2),n=t[0],t=t[1];return"size"===e?[["M",0,t],["L",0+n,0],["L",0+n,t],["Z"]]:[["M",0,t],["L",0,0],["L",0+n,0],["L",0+n,t],["Z"]]}function hb(t){var e,n,i,a,r=t.orient,o=t.color,s=t.block,t=t.blocks,l=(e=He(o)?new Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length;return l?s?(s=t,t=e,n=r,i=Array.from(t),a=s+1,new Array(a).fill(0).reduce(function(t,e,n){var r=i[n%i.length];return t+" ".concat(n/(a-1),":").concat(r).concat(n<a-1?" ".concat((n+1)/(a-1),":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):e.reduce(function(t,e,n){return t+" ".concat(n/(l-1),":").concat(e)},"l(".concat(Rv(r,"0","270"),")")):""}function db(t,e,n){var r,i,a,o=hb(e),t=t.maybeAppendByClassName(cb.selection,"path").styles(v({path:fb(e),fill:o},n)),n=t.maybeAppendByClassName(cb.clipPath,"path").styles({path:(n=(o=e).orient,(e=o.range)?(i=(o=x(ub(o),2))[0],o=o[1],r=(e=x(e,2))[0],e=e[1],a=Rv(n,r*i,0),r=Rv(n,0,r*o),i=Rv(n,e*i,i),[["M",a,r],["L",a,a=Rv(n,o,e*o)],["L",i,a],["L",i,r],["Z"]]):[])}).node();t.style("clip-path",n)}var pb,gb,yb,mb,vb=Cy({render:function(t,e){var n,r=x(ry(t,["selection","track"]),2),i=r[0],r=r[1],a=S(e).maybeAppendByClassName(cb.trackGroup,"g");n=t,r=r,a.maybeAppendByClassName(cb.track,"path").styles(v({path:fb(n)},r)),db(S(e).maybeAppendByClassName(cb.selectionGroup,"g"),t,i)}},v({},{type:"color",orient:"horizontal",size:30,range:[0,1],len:200,block:!1,blocks:0,color:["#fff","#000"],trackFill:"#e5e5e5"})),bb=hn(function(t){return{min:Math.min.apply(Math,w([],x(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,w([],x(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),xb=(me(wb,pb=o),wb.prototype.render=function(t,e){var n=this,r=(t.data,t.width),i=t.height,a=(t.orient,t.defaultValue,t.color,t.block,t.type,t.slidable,t.step,t.showTitle),o=(t.showHandle,t.showLabel),t=(t.showIndicator,x(ry(Fy(t),["title","label","indicator","ribbon","handle"]),5)),s=t[0],l=(t[1],t[2]),c=t[3],t=(t[4],S(e).maybeAppendByClassName(Jv.title,function(){return new Ev({style:v({width:r,height:i},s)})})),a=(Ly(a,S(e),function(t){}),t.node().getAvailableSpace()),t=a.x,u=a.y,a=(a.width,a.height,S(e).maybeAppendByClassName(Jv.contentGroup,"g").styles({x:t,y:u})),f=a.maybeAppendByClassName(Jv.ribbonGroup,"g");this.renderRibbon(f,c),this.handlesGroup=f.maybeAppendByClassName(Jv.handlesGroup,"g"),this.renderHandles(),this.renderIndicator(a,l),Ly(o,S(e).maybeAppendByClassName(Jv.labelGroup,"g").styles({x:t,y:u}),function(t){n.renderLabel(t)})},Object.defineProperty(wb.prototype,"range",{get:function(){var t=this.attributes.data;return bb(t)},enumerable:!1,configurable:!0}),Object.defineProperty(wb.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this.innerRibbonScale.update({domain:[e,t],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(wb.prototype,"ribbonRange",{get:function(){var t=x(this.selection,2),e=t[0],t=t[1],n=this.ribbonScale;return[n.map(e),n.map(t)]},enumerable:!1,configurable:!0}),Object.defineProperty(wb.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=x(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),wb.prototype.ifHorizontal=function(t,e){return Rv(this.style.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},wb.prototype.renderRibbon=function(t,e){var n=this.attributes,r=n.type,i=n.orient,a=n.color,o=n.block,n=n.data;this.ribbon=t.maybeAppendByClassName(Jv.ribbon,function(){return new vb({})}).update(v({type:r,orient:i,color:a,block:o,blocks:n.length-1,range:this.ribbonRange},e))},wb.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,t=t.slidable,n=x(this.selection,2),r=n[0],n=n[1];this.startHandle=this.renderHandle("start",r),this.endHandle=this.renderHandle("end",n),e&&t?this.handlesGroup.style("visibility","visible"):this.handlesGroup.style("visibility","hidden")},wb.prototype.renderHandle=function(t,e){var n=this.attributes.orient,r=ny(this.attributes,"handle"),r=(r.formatter,J(r,["formatter"])),n=this.handlesGroup.maybeAppendByClassName(Jv.prefix("".concat(t,"-handle")),function(){return new sb({})}).styles(v({orient:n,labelText:e},r));return this.setHandlePosition(t,e),n},wb.prototype.setHandlePosition=function(t,e){var n=this.attributes,r=n.ribbonSize,n=n.handleFormatter,e=this.getOffset(e),r=x(this.ifHorizontal([e,.7*r],[r/2,e]),2),e=r[0],r=r[1],t=this.handlesGroup.select(".".concat(Jv.prefix("".concat(t,"-handle")))).node(),n=(null!=t&&t.attr("formatter",n),x(t.getLocalPosition(),2)),i=n[0],n=n[1];Math.abs(e+r-i-n)<100?null!=t&&t.setLocalPosition(e,r):null!=t&&t.animate([{transform:"translate(".concat(t.getLocalPosition().slice(0,2).join(","),")")},{transform:"translate(".concat(e,", ").concat(r,")")}],{duration:200,fill:"both"})},wb.prototype.renderIndicator=function(t,e){this.indicator=t.maybeAppendByClassName(Jv.indicator,function(){return new ib({style:e})}).update(e)},Object.defineProperty(wb.prototype,"labelData",{get:function(){var o=this,t=this.attributes,e=t.data,s=t.labelAlign;return e.reduce(function(t,e,n,r){var i,a=null!=(a=null==e?void 0:e.id)?a:n.toString();return"value"===s?t.push(v(v({},e),{id:a,label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:o.ribbonScale.map(e.value)})):n<r.length-1&&(i=r[n+1],r=((n=(r=x([e.value,i.value],2))[0])+(i=r[1]))/2,t.push(v(v({},e),{id:a,range:[n,i],label:[n,i].join("~"),value:o.ribbonScale.map(r)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(wb.prototype,"labelStyle",{get:function(){var t=this.attributes,e=t.orient,t=t.labelDirection,t=void 0===t?"positive":t,n=x(["center","middle"],2),r=n[0],n=n[1];return"horizontal"===e?n="positive"===t?"top":"bottom":r="positive"===t?"end":"start",{labelTextAlign:r,labelTextBaseline:n}},enumerable:!1,configurable:!0}),wb.prototype.renderLabel=function(t){var e=this.attributes,n=e.ribbonSize,e=e.ribbonLen,r=ny(this.attributes,"label"),i=r.spacing,a=(r.align,r.formatter),o=r.filter,r=J(r,["spacing","align","formatter","filter"]),e=x(this.ifHorizontal([[0,n/2],[e,n/2]],[[n/2,0],[n/2,e]]),2),s=e[0],e=e[1],l=v(v({type:"linear",startPos:s,endPos:e,data:this.labelData,showLine:!1,showGrid:!1,showTick:!1,labelSpacing:i+n/2,labelTransform:"rotate(0)"},this.labelStyle),Object.fromEntries(Object.entries(r).map(function(t){var t=x(t,2),e=t[0],t=t[1];return["label".concat((e=e).charAt(0).toUpperCase()+e.slice(1)),t]}))),s=t.maybeAppendByClassName(Jv.label,function(){return new Nv({style:l})}).styles(l).node();s.attr("labelFormatter",a),s.attr("labelFilter",o)},wb.prototype.bindEvents=function(){var n=this,t=new Map;t.set("ribbon",this.ribbon),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){null!=t&&t.on("mousedown",n.onDragStart(e)),null!=t&&t.on("touchstart",n.onDragStart(e))}),null!=(t=this.startHandle)&&t.on("mouseover",function(){return n.updateMouse()}),null!=(t=this.endHandle)&&t.on("mouseover",function(){return n.updateMouse()}),this.ribbon.on("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},wb.prototype.showIndicator=function(t,e){void 0===e&&(e="".concat(t));var n,r=this.attributes,i=r.orient;r.showIndicator&&"number"==typeof t?(n=(r=this.range).min,r=r.max,t=tn(t,n,r),n=[this.getOffset(t),0],"vertical"===i&&n.reverse(),this.indicator.update({visibility:"visible",position:this.ifHorizontal("top","left"),value:e}),(r=this.indicator.node()).setLocalPosition.apply(r,w([],x(n),!1))):this.hideIndicator()},wb.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.style("visibility","hidden")},wb.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},wb.prototype.setSelection=function(t,e){this.updateSelection(t,e)},wb.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=x(this.selection,2),c=l[0],l=l[1],t=x([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=x((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=x(n,2))[0],n=n[1],a=(c=x(c,2))[0],c=c[1],o=(l=x(l,2))[0],l=l[1],c=(a=x([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=x([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[Kg(c,r),Kg(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(wb.prototype,"step",{get:function(){var t=this.attributes.step,t=void 0===t?1:t,e=this.range,n=e.min,e=e.max;return on(t)?Kg(.01*(e-n),0):t},enumerable:!1,configurable:!0}),wb.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?lb(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},wb.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=x(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,w([],x(oy(t)),!1));return tn(this.getOffset(i-a,!0)+r,r,n)},wb.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.attributes.ribbonLen,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},wb.prototype.dispatchSelection=function(){var t=new F.CustomEvent("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},wb.prototype.dispatchIndicated=function(t,e){t=new F.CustomEvent("indicate",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([wy(100)],wb.prototype,"dispatchSelection",null),t([wy(100)],wb.prototype,"dispatchIndicated",null),wb);function wb(t){var a=pb.call(this,gy({},Zv,t))||this;return a.eventToOffsetScale=new i0({}),a.innerRibbonScale=new i0({}),a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=lb(n.map(function(t){return t.value}),t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(n=a.getTickValue(t),a.showIndicator(n),a.dispatchIndicated(n))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.attributes.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseleave",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),x(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"ribbon"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a.onDragEnd=function(){a.style.cursor="default",document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a}function kb(t){gb||(gb=document.createElement("table"),mb=document.createElement("tr"),yb=/^\s*<(\w+|!)[^>]*>/,mb={tr:document.createElement("tbody"),tbody:gb,thead:gb,tfoot:gb,td:mb,th:mb,"*":document.createElement("div")});var e=yb.test(t)&&RegExp.$1,e=(e&&e in mb||(e="*"),mb[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var Mb,us="tooltip",Ob="tooltip-title",_b="tooltip-list",ws="tooltip-list-item",Sb="tooltip-list-item-name",ks="tooltip-list-item-marker",vc="tooltip-list-item-name-label",n="tooltip-list-item-value",i="tooltip-crosshair-x",ja="tooltip-crosshair-y",e={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},bs=((r={})[".".concat(us)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},r[".".concat(Ob)]={color:"rgba(0, 0, 0, 0.45)"},r[".".concat(_b)]={margin:"0px","list-style-type":"none",padding:"0px"},r[".".concat(ws)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},r[".".concat(ks)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},r[".".concat(Sb)]={display:"flex","align-items":"center","max-width":"216px"},r[".".concat(vc)]=v({flex:1},e),r[".".concat(n)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},e),r[".".concat(i)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r[".".concat(ja)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r),Eb=(me(Ab,Mb=o),Object.defineProperty(Ab.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Ab.prototype.getContainer=function(){return this.element},Object.defineProperty(Ab.prototype,"position",{set:function(t){var t=x(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(Ab.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(Ab.prototype,"items",{get:function(){return this.attributes.items.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,a=t.index,t=J(t,["name","value","color","index"]);return v({name:n,value:r,color:i,index:null!=a?a:e},t)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ab.prototype,"HTMLTooltipItemsElements",{get:function(){var r=this.attributes.template,i=[];return this.items.forEach(function(t){var e,n;i.push(kb((e=r.item,n=t,e&&n?e.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):e)))}),i},enumerable:!1,configurable:!0}),Object.defineProperty(Ab.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return Qe(t)?py(t):sn(t)?t:void 0},enumerable:!1,configurable:!0}),Ab.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},Ab.prototype.update=function(t){this.attr(vn({},this.attributes,t)),this.render(this.attributes,this)},Ab.prototype.clear=function(){this.element.innerHTML=""},Ab.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},Ab.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},Ab.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},Ab.prototype.initShape=function(){var t=this.attributes.template;this.element=kb(t.container),this.id&&this.element.setAttribute("id",this.id)},Ab.prototype.renderHTMLTooltipElement=function(){var e,r,t=this.attributes,n=t.title,t=t.enterable,i=this.element,a=this.customContent,a=(this.element.style.pointerEvents=t?"auto":"none",this.clear(),a?i.appendChild(a):(t=this.attributes.template,n?(i.innerHTML=t.title,i.getElementsByClassName(Ob)[0].innerHTML=n):null!=(t=null==(a=i.getElementsByClassName(Ob))?void 0:a[0])&&t.remove(),n=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=_b,n.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=i,Object.entries(a).forEach(function(t){var t=x(t,2),e=t[0],n=t[1];w([r],x(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},Ab.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,o=t.width,s=t.height,l=[-o/2,-s/2];return e.forEach(function(t){var e=x(l,2),n=e[0],e=e[1],t=x(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},Ab.prototype.setOffsetPosition=function(t){var t=x(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,i=void 0===i?0:i,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat((void 0===r?0:r)+a+e,"px"),this.element.style.top="".concat(i+n+t,"px")},Ab.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},Ab.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=x(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,f=c.y,h=c.autoPosition,c=c.bounding;return h?(e=(h=this.element).offsetWidth,h=h.offsetHeight,f=(u=x([u+l,f+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,a={left:f<s,right:s+c.width<f+e,top:u<i,bottom:i+c.height<u+h},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},Ab.tag="tooltip",Ab.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(us,'"></div>'),title:'<div class="'.concat(Ob,'"></div>'),item:'<li class="'.concat(ws,'" data-index={index}>\n <span class="').concat(Sb,'">\n <span class="').concat(ks,'" style="background:{color}"></span>\n <span class="').concat(vc,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(n,'" title="{value}">{value}</span>\n </li>')},style:bs}},t([wy(100)],Ab.prototype,"updatePosition",null),Ab);function Ab(t){t=Mb.call(this,vn({},Ab.defaultOptions,t))||this;return t.visibility="visible",t.initShape(),t.render(t.attributes,t),t}var Tb,Pb={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function Lb(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function Nb(t){return Tb.call(this,vn({},Nb.defaultOptions,t))||this}me(Nb,Tb=o),Nb.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=S(e).maybeAppendByClassName("switch-content","g").node(),l=e.getLocalBounds(),n=gn(Pb,n,Pb.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&S(e).maybeAppendByClassName("switch-tag",function(){return new Xy({})}).call(function(t){var e,t=t.node(),n=(t.update(vn({cursor:f,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=v(v({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),S(e).maybeAppendByClassName("switch-background","rect").styles(v({zIndex:(e.style.zIndex||0)-1,x:l.min[0],y:l.min[1],fill:n,cursor:f,fillOpacity:r?.4:1},h)).node()),g=S(e).maybeAppendByClassName("switch-background-stroke","rect").styles(v({zIndex:(e.style.zIndex||0)-2,x:l.min[0],y:l.min[1],stroke:n,lineWidth:0},h)).node();S(e).maybeAppendByClassName("switch-handle","rect").styles({fill:"#fff",cursor:f}).call(function(t){var e,t=t.node(),n=Lb(p,a,o),r=Lb(p,a,!o);t.attr("x")&&!bn(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=g.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),g.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},Nb.tag="switch",Nb.defaultOptions={style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var Cb,jb,Fb,Bb,_a={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},Ms=gy({},_a,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),Pa=gy({},_a,{type:"circle",defaultRadius:0}),La=gy({},_a,{type:"polygon",defaultRadius:0,startAngle:0}),Na=(me(Rb,Cb=o),Object.defineProperty(Rb.prototype,"localPointer",{get:function(){var t=x(this.getPosition(),2),e=t[0],t=t[1],n=x(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(Rb.prototype,"tagCfg",{get:function(){var t=ny(this.attributes,"tag");return t.position,J(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(Rb.prototype,"crosshairCfg",{get:function(){var t=ny(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),Rb.prototype.render=function(t,e){var n=this,e=S(e).maybeAppendByClassName(".crosshair-group","g").node();this.shapesGroup=e,this.tagShape=S(e).maybeAppend(".crosshair-tag",function(){return new Xy({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=S(e).maybeAppendByClassName(".crosshair-path","path").node().attr(this.crosshairCfg),this.adjustLayout()},Rb.prototype.update=function(t){this.attr(vn({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},Rb.prototype.setPointer=function(t){this.pointer=t},Rb.tag="crosshair-base",Rb.defaultOptions={style:_a},Rb);function Rb(t){return Cb.call(this,vn({},Rb.defaultOptions,t))||this}function Ib(t){return jb.call(this,gy({},Ib.defaultOptions,t))||this}function Db(t){return Fb.call(this,gy({},Db.defaultOptions,t))||this}function zb(t){return Bb.call(this,gy({},zb.defaultOptions,t))||this}me(Ib,jb=Na),Object.defineProperty(Ib.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=x(t.startPos,2),n=e[0],e=e[1],t=x(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=x(this.getPosition(),2))[0],e=e[1],[(n=x(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"isVertical",{get:function(){var t=this.attributes,e=x(t.startPos,2),n=e[0],e=e[1],t=x(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"tagShapeSpace",{get:function(){var t=fy(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Ib.prototype.update=function(t){jb.prototype.update.call(this,t)},Ib.prototype.setPointer=function(t){jb.prototype.setPointer.call(this,t),this.adjustPosition()},Ib.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},Ib.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},Ib.prototype.adjustPosition=function(){var t=x(this.localPointer,2),e=t[0],t=t[1],n=x(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},Ib.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=x(e.startPos,2),a=i[0],i=i[1],e=x(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(this.tagShape.show(),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=x(this.getOrientVal({start:[-t/2,n/2],end:[o-a+t/2,n/2]},{start:[0,0],end:[0,e-i+n]})[r],2))[0],t=o[1],this.tagShape.setLocalPosition(a,t)):this.tagShape.hide()},Ib.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},Ib.tag="line-crosshair",Ib.defaultOptions={style:Ms},t([wy(20)],Ib.prototype,"setPointer",null),me(Db,Fb=Na),Object.defineProperty(Db.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),Db.prototype.update=function(t){Fb.prototype.update.call(this,t)},Db.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(Fb.prototype.setPointer.call(this,[e,t]),x(this.localPointer,2)),t=e[0],e=e[1],n=x(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},Db.prototype.adjustLayout=function(){this.tagShape.hide()},Db.prototype.createCirclePath=function(t){var e=this.attributes,n=x(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return Wy(r,n,t||e)},Db.tag="circle-crosshair",Db.defaultOptions={style:Pa},t([wy(20)],Db.prototype,"setPointer",null),me(zb,Bb=Na),Object.defineProperty(zb.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),zb.prototype.update=function(t){Bb.prototype.update.call(this,t)},Object.defineProperty(zb.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*h,a=i=void 0,i=e[0]-n[0],e=e[1]-n[1],a=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*a+n[0],t[1]=i*a+e*r+n[1],t));return f},enumerable:!1,configurable:!0}),zb.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(Bb.prototype.setPointer.call(this,[e,t]),x(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=x(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=xy(n,[t,e])/xy(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},zb.prototype.adjustLayout=function(){this.tagShape.hide()},zb.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=x(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=x(t,2),t=x(fe([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},zb.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=x(t,2),c=t[0],u=t[1],f=this.points,t=x(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var g=x(f[p-1],2),y=g[0],g=g[1],m=x(f[p%f.length],2),v=m[0],m=m[1],y=(i=[h,d],y=[y+h,g+d],g=[v+h,m+d],l=s=o=a=m=v=void 0,m=(r=x(r=[c,u],2))[0],r=r[1],a=(i=x(i,2))[0],i=i[1],o=(y=x(y,2))[0],y=y[1],s=(g=x(g,2))[0],g=g[1],l=[],(g-y)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(y-r)*(a-m)&&(vy(m,a,r,i,o,y)&&by(l,o,y),vy(m,a,r,i,s,g)&&by(l,s,g),vy(o,s,y,g,m,r)&&by(l,m,r),vy(o,s,y,g,a,i))&&by(l,a,i):(v=(m*(i-r)+y*(a-m)-r*(a-m)-o*(i-r))/((s-o)*(i-r)-(a-m)*(g-y)),0<=(g=(o*(g-y)+r*(s-o)-y*(s-o)-m*(g-y))/((a-m)*(g-y)-(s-o)*(i-r)))&&g<=1&&0<=v&&v<=1&&(l[0]=m+g*(a-m),l[1]=r+g*(i-r))),l);0!==y.length&&(e=(s=x(y,2))[0],n=s[1])}return[e,n]},zb.tag="polygon-crosshair",zb.defaultOptions={style:La},t([wy(20)],zb.prototype,"setPointer",null);me(Vb,Wb=F.DisplayObject),Object.defineProperty(Vb.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&qe(t)?t.map(function(t){return qe(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(Vb.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(Vb.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(Vb.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(Vb.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(Vb.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(Vb.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=x(t,2),n=t[0],t=t[1];return"wavy"===t?v({path:r.getWavyPath(n)},i):"double"===t?v({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},v(v({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),Vb.prototype.update=function(t){var e=this;this.attr(gy({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new F.Path({style:t}))})},Vb.prototype.clear=function(){this.removeChildren()},Vb.prototype.getLinePos=function(t){var e=x(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,a=i.height,i=i.fontSize,o=x([0,0],2),s=o[0],o=o[1],o=("overline"===t?(s=(n=x([0,a*n-i/2],2))[0],n):"line-through"===t?(s=(n=x([0,a*r],2))[0],n):(s=(t=x([0,a*e+i/2],2))[0],t))[1];return[s,o]},Vb.prototype.getLinePath=function(t){var e=this.attributes.width,t=x(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},Vb.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=x(this.getLinePos(t),2),a=i[0],i=i[1],o=x([0,0],2),s=o[0],o=o[1];return"line-through"===t&&(s=(e=x([-.5,.5],2))[0],o=e[1]),"underline"===t?(s=(e=x([0,1],2))[0],o=e[1]):"overline"===t&&(s=(e=x([1,0],2))[0],o=e[1]),[["M",a,i+n*s],["L",a+r,i+n*s],["M",a,i+n*o],["L",a+r,i+n*o]]},Vb.prototype.getWavyPath=function(t){return[]},Vb.tag="decoration",Vb.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var Wb,Gb,Hb=Vb;function Vb(t){t=Wb.call(this,gy({},Vb.defaultOptions,t))||this;return t.update({}),t}function Yb(t){t=Gb.call(this,gy({},Yb.defaultOptions,t))||this;return t.init(),t}me(Yb,Gb=o),Object.defineProperty(Yb.prototype,"textWidth",{get:function(){var e=this;return Ze(this.renderText.split("\n").map(function(t){return Ug(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"textHeight",{get:function(){return fy(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"height",{get:function(){var t=this.attributes.height;return en(t)&&0!==t?t:fy(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return Xg(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:Xg(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return qg(t,en(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&en(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"font",{get:function(){return yn(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return v(v(v({},Qg),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return v({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return gy({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(Yb.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),Yb.prototype.init=function(){this.initShape(),this.update({})},Yb.prototype.update=function(t){this.attr(gy({},this.attributes,t)),this.render()},Yb.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new Hb({style:t}))})},Yb.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},Yb.prototype.initShape=function(){this.backgroundShape=new F.Rect({name:"background",style:{width:0,height:0}}),this.decorationGroup=new F.Group({name:"decoration-group"}),this.textShape=new F.Text({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},Yb.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&en(n)&&"clip"===e&&(this.clipRect=new F.Rect({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},Yb.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;en(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},Yb.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},Yb.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},Yb.tag="paragraph",Yb.defaultOptions={style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var qb,Fa=v(v({},Qg),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),Ub={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},$b={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function Xb(t){return qb.call(this,vn({},Xb.defaultOptions,t))||this}me(Xb,qb=o),Xb.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,a=t.checked,t=t.spacing,a=(this.checked=!!a,uy(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=cn({},this.checked?Ub.selected:Ub.default,r),r=cn({},$b,i),t=(this.checkboxBoxShape=uy(a,".checkbox-box","rect").styles(v({className:"checkbox-box",zIndex:(a.style.zIndex||0)-1},e)).node(),uy(this.checkboxBoxShape,".checkbox-checked","path").styles(v({className:"checkbox-box-checked",stroke:"#fff"},r)),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;uy(a,".checkbox-label","text").styles(v({className:"checkbox-label",x:e,y:r},n))},Xb.tag="checkbox",Xb.defaultOptions={style:{x:0,y:0,label:v({text:""},Fa),spacing:4,checked:!1}};var Kb="gui-poptip",Zb="gui-poptip-arrow",Jb="gui-poptip-text",Qb=((a={})[".".concat(Kb)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},a[".".concat(Jb)]={"text-align":"center"},a[".".concat(Kb,"[data-position='top']")]={transform:"translate(-50%, -100%)"},a[".".concat(Kb,"[data-position='left']")]={transform:"translate(-100%, -50%)"},a[".".concat(Kb,"[data-position='right']")]={transform:"translate(0, -50%)"},a[".".concat(Kb,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},a[".".concat(Kb,"[data-position='top-left']")]={transform:"translate(0,-100%)"},a[".".concat(Kb,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},a[".".concat(Kb,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},a[".".concat(Kb,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},a[".".concat(Kb,"[data-position='right-top']")]={transform:"translate(0, 0)"},a[".".concat(Kb,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},a[".".concat(Kb,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},a[".".concat(Kb,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},a[".".concat(Zb)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},a[".".concat(Kb,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},a["[data-position='top'] .".concat(Zb)]={bottom:"-2px"},a[".".concat(Kb,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},a["[data-position='left'] .".concat(Zb)]={right:"-2px"},a[".".concat(Kb,"[data-position='right']")]={transform:"translate(5px, -50%)"},a["[data-position='right'] .".concat(Zb)]={left:"-2px"},a[".".concat(Kb,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},a["[data-position='bottom'] .".concat(Zb)]={top:"-2px"},a[".".concat(Kb,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},a["[data-position='top-left'] .".concat(Zb)]={left:"10px",bottom:"-2px"},a[".".concat(Kb,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},a["[data-position='top-right'] .".concat(Zb)]={right:"10px",bottom:"-2px"},a[".".concat(Kb,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},a["[data-position='left-top'] .".concat(Zb)]={right:"-2px",top:"8px"},a[".".concat(Kb,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},a["[data-position='left-bottom'] .".concat(Zb)]={right:"-2px",bottom:"8px"},a[".".concat(Kb,"[data-position='right-top']")]={transform:"translate(5px, 0)"},a["[data-position='right-top'] .".concat(Zb)]={left:"-2px",top:"8px"},a[".".concat(Kb,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},a["[data-position='right-bottom'] .".concat(Zb)]={left:"-2px",bottom:"8px"},a[".".concat(Kb,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},a["[data-position='bottom-left'] .".concat(Zb)]={top:"-2px",left:"8px"},a[".".concat(Kb,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},a["[data-position='bottom-right'] .".concat(Zb)]={top:"-2px",right:"8px"},a),t2=void 0;var e2;function n2(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function r2(t){var n,r;return n=n2,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(t2,t)}(t)}function i2(t){t=e2.call(this,vn({style:{id:"gui-poptip"}},i2.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}me(i2,e2=o),Object.defineProperty(i2.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),i2.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},i2.prototype.update=function(t){this.attr(vn({},this.style,t)),this.render(this.attributes,this)},i2.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(o=(i="function"==typeof l?l.call(null,t):l).html,a=i.target,i=J(i,["html","target"]),n=cn({},u.style,i),!a&&!1!==a||(e=a),"string"==typeof o)&&(r=o),n.position),a=n.arrowPointAtCenter,o=n.follow,n=n.offset;e?(e=(t=x(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,e,i,a,o),2))[0],a=t[1],u.showTip(e,a,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},i2.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=x(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},i2.prototype.clear=function(){this.container.innerHTML=""},i2.prototype.destroy=function(){var t,e=this;w([],x(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},i2.prototype.showTip=function(t,e,n){var r,i=gn(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(Jb)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},i2.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},i2.prototype.getContainer=function(){return this.container},i2.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(Kb).concat(t?" ".concat(t):"")},i2.prototype.initShape=function(){var t=this,e=this.style.id;this.container=r2(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},i2.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(Zb,'"></span>'));t.innerHTML=n,Qe(r)?t.innerHTML+=r:r&&sn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(Jb)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},i2.prototype.applyStyles=function(){var t,e=gy({},Qb,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=x(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=x(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},i2.prototype.setOffsetPosition=function(t,e,n){var n=x(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},i2.tag="poptip",i2.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:Qb,template:'<div class="'.concat(Jb,'"></div>')}};function a2(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return k1()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e.length?e:[0,0]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=Y1(l,t),t=Y1(t,i),i=Y1(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),k1()(s)}const o2=hg(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=J(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=Q(e,"background"),h=f["padding"],f=J(f,["padding"]),d=Q(e,"connector"),{points:p=[]}=d,d=J(d,["points"]),i=[[+i,+a],[+n,+r]],a=tt(t).maybeAppend("text","text").call(R,e).node(),n=a2(tt(t).maybeAppend("background","rect").style("zIndex",-1).call(R,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,h)).call(R,o?f:{}).node(),i,p,u),r=l&&new qy({id:"startMarker",style:Object.assign({x:0,y:0},Q(e,"startMarker"))}),a=c&&new qy({id:"endMarker",style:Object.assign({x:0,y:0},Q(e,"endMarker"))});tt(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",a).call(R,s?d:{})}),s2=t=>{const l=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=J(rg(r,i,a,o),[]),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return tt(new o2).style("x",i).style("y",o).call(R,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(R,a).call(R,l).node()}};s2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const l2=hg(t=>{var e=J(t.attributes,["class","x","y"]);const n=Q(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(tt(t).maybeAppend("marker",()=>new qy({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());tt(t).maybeAppend("text","text").style("x",i).style("y",a).call(R,e)}),c2=t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rg(r,i,a,o),i=r["defaultColor"],a=J(r,["defaultColor"]),{color:o,text:r=""}=e,e={text:String(r),stroke:o||i,fill:o||i},[[r,o]]=t;return tt(new l2).call(R,a).style("x",r).style("y",o).call(R,e).call(R,s).node()}},u2=(c2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},hg(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;tt(t).maybeAppend("connect-path",()=>new F.Path({})).style("d",n).call(R,i),tt(t).maybeAppend("area-path",()=>new F.Path({})).style("d",e).call(R,r)}));const f2=t=>{const{curve:u,gradient:l=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connectNulls:h=!1}=t,d=J(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=rg(n,r,i,a),r=n["defaultColor"],i=J(n,["defaultColor"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=ag(c,e),n=l&&n?tg(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,f),a=Q(s,"connect"),i=!!o.length,n=t=>tt(new F.Path({})).style("d",t).call(R,s).node();return _u(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=M1().curve(O1),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return E1(a())},delete t.lineX0,t.lineEndAngle=function(){return E1(o())},delete t.lineX1,t.lineInnerRadius=function(){return E1(s())},delete t.lineY0,t.lineOuterRadius=function(){return E1(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(S1(t)):e()._curve},t.angle((t,e)=>U1(V1(r[e],n))).outerRadius((t,e)=>Y1(r[e],n)).innerRadius((t,e)=>Y1(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,a,o,s,l},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):tt(new u2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node()):(e=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return(Ou(c)?M1().y((t,e)=>n[e][1]).x1((t,e)=>n[e][0]).x0((t,e)=>r[e][0]).defined((t,e)=>[...n[e],...r[e]].every(f)):M1().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(f))).curve(u)(n)},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):tt(new u2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},h2=(f2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=_u(n)?I1:b1;return f2(Object.assign({curve:i},a))(t,e,n,r)}),d2=(h2.props=Object.assign({},f2.props),t=>{const{alpha:a=.5}=t,o=J(t,["alpha"]);return(t,e,n,r)=>{var i=_u(n)?B1:j1;return f2(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),p2=(d2.props=Object.assign({},f2.props),i=>(t,e,n,r)=>f2(Object.assign({curve:z1},i))(t,e,n,r)),g2=(p2.props=Object.assign({},f2.props),t=>{const l=t["arrowSize"],c=J(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=rg(r,a,o,s),a=r["defaultColor"],o=J(r,["defaultColor"]),{color:s=a,transform:r}=e,[e,a]=t,t=l1();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=J1(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),tt(new F.Path).call(R,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(R,c).node()}}),y2=(g2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rg(r,i,a,o),i=r["defaultColor"],a=J(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=l1();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),tt(new F.Path).call(R,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(R,s).node()}});y2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const m2=t=>{const{cornerRatio:u=1/3}=t,f=J(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=rg(r,o,s,l),o=r["defaultColor"],s=J(r,["defaultColor"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=l1(),_u(o)?(i=Y1(t,c=o.getCenter()),i=(Y1(e,c)-i)*n+i,a.moveTo(t[0],t[1]),Q1(a,t,e,c,i)):Ou(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return tt(new F.Path).call(R,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(R,f).node()}},v2=(m2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rg(r,i,a,o),i=r["defaultColor"],a=J(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=l1();return t.moveTo(e[0],e[1]),_u(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):Q1(t,e,i,X1(e,i),Y1(e,i)/2),tt(new F.Path).call(R,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(R,s).node()}}),b2=(v2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rg(r,i,a,o),i=r["defaultColor"],a=J(r,["defaultColor"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return tt(new F.Image).call(R,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(R,u).node()}});b2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const x2=t=>{const l=J(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=rg(r,e,i,a),e=r["defaultColor"],i=J(r,["defaultColor"]),a=function(i,t){const a=l1();if(_u(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>Y1(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?Q1(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return tt(new F.Path).call(R,i).style("d",a.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(R,l).node()}};x2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const w2=t=>{const l=J(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=rg(r,e,i,a),e=r["defaultColor"],i=J(r,["defaultColor"]),a=function(t,e){var n,[t,r,i,a]=t,o=l1();return _u(e)?(n=Y1(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),Q1(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),Q1(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return tt(new F.Path).call(R,i).style("d",a.toString()).style("fill",o||e).style("stroke",o||e).style("transform",s).call(R,l).node()}};w2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const k2=t=>{const y=J(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=rg(r,e,f,h),{defaultColor:e,fill:f=e,stroke:h=e}=r,e=J(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=l1(),_u(t)?([i,a]=t=t.getCenter(),o=q1(V1(r[0],t)),s=q1(V1(r[1],t)),g=Y1(t,r[2]),l=Y1(t,r[3]),c=Y1(t,r[8]),u=Y1(t,r[10]),t=Y1(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,g,o,s),n.arc(i,a,g,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return tt(new F.Path).call(R,e).style("d",g.toString()).style("stroke",h).style("fill",d||f).style("transform",p).call(R,y).node()}};k2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const M2=t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rg(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=J(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,_u(t=n)?(t=t.getCenter(),y1()({startAngle:0,endAngle:2*Math.PI,outerRadius:Y1(a[0],t),innerRadius:Y1(a[1],t)})):k1().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,_u(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return tt(new F.Path({})).call(R,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(R,s).node()}};function O2(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}M2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const _2=hg(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=J(e,["points","class","endMarker","direction"]),i=Q(e,"endMarker"),n=(n=n,k1().x(t=>t[0]).y(t=>t[1])(n));tt(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new qy({className:"marker",style:Object.assign(Object.assign({},i),{symbol:O2})}):null).call(R,e)});const S2=t=>{const{offset:s=0,connectLength1:l}=t,c=J(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rg(r,i,a,o),{defaultColor:i,connectLength1:a=l}=r,o=J(r,["defaultColor","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(Ou(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,a);return tt(new _2).call(R,o).style("points",n).style("stroke",r||i).style("transform",e).call(R,c).node()}};function E2(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=xf(a.x,c),i=xf(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function A2(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:f}=ng(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=P2(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?T2(s,h,n):X1(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function T2(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function P2(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function L2(t,e,n,r){var{y:n,y1:i,autoRotate:a,rotateToAlignArc:o,radius:s=.5,offset:l=0}=n,e=ng(r,e,[n,i]),{startAngle:n,endAngle:i}=e,r=r.getCenter(),n=(n+i)/2,i={textAlign:"center",textBaseline:"middle",rotate:P2(n,a,o)},{innerRadius:a,outerRadius:o}=e,[e,r]=T2(r,n,a+(o-a)*s+l);return Object.assign({x:e,y:r},i)}function N2(t,e,n){var n=n["bounds"],[n]=n;return{x:n[0],y:n[1]}}function C2(t,e,n,r){var i=n["bounds"];return 1===i.length?N2(0,0,n):(Su(r)?A2:Pu(r)?L2:E2)(t,e,n,r)}function j2(t,e,n){var{innerRadius:n,outerRadius:t}=ng(n,t,[e.y,e.y1]);return n+(t-n)}function F2(t,e,n){var{startAngle:n,endAngle:t}=ng(n,t,[e.y,e.y1]);return(n+t)/2}function B2(t,e,n,r){var{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=n,f=r.getCenter(),h=F2(e,n,r),d=0<Math.sin(h)?1:-1,i=P2(h,i,a),a={textAlign:0<d||Su(r)?"start":"end",textBaseline:"middle",rotate:i},i=j2(e,n,r),[[e,n],[r,f],[h,i]]=function(t,e,n,r,i){var[n,a]=T2(t,e,n),[t,r]=T2(t,e,r);return[[n,a],[t,r],[t+(0<Math.sin(e)?1:-1)*i,r]]}(f,h,i,i+(s?l:o),s?c:0),l=s?+u*d:0,o=h+l,c={connector:s,connectorPoints:[[r-o,f-i],[h-o,i-i]]};return Object.assign(Object.assign({x0:e,y0:n,x:h+l,y:i},a),c)}S2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var R2=Object.freeze({__proto__:null,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=gu(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=q1(V1(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}},bottom:C2,bottomLeft:C2,bottomRight:C2,inside:C2,left:C2,outside:function(t,e,n,r){var i=n["bounds"];return 1===i.length?N2(0,0,n):(Su(r)?A2:Pu(r)?B2:E2)(t,e,n,r)},right:C2,spider:function(t,e,n,r){var i,a,o,s,l,c;return Pu(r)?({connectorLength:c,connectorLength2:i,connectorDistance:a}=n,o=J(B2(0,e,n,r),[]),s=r.getCenter(),l=j2(e,n,r),e=F2(e,n,r),n=l+c+i,r=0<Math.sin(e)?1:-1,l=o["x"],c=s[0]+(n+ +a)*r-l,o.x+=c,o.connectorPoints[0][0]-=c,o):{}},surround:function(t,e,n,r){var i,a,o,s,l;return Pu(r)?({connectorLength:o,connectorLength2:i,connectorDistance:a}=n,{x0:n,y0:s}=e=J(B2(0,e,n,r),[]),l=r.getCenter(),r=function(t){if(Pu(t)){var[e,n]=t.getSize(),t=t.getOptions().transformations.find(t=>"polar"===t[0]);if(t)return Math.max(e,n)/2*t[4]}return 0}(r)+o,o=U1([n-l[0],s-l[1]]),n=0<Math.sin(o)?1:-1,[s,l]=T2(l,o,r),e.x=s+(i+a)*n,e.y=l,e):{}},top:C2,topLeft:C2,topRight:C2});function I2(t,e,n,r,i){var a=e["position"],a=(o=n,void 0!==(a=a)?a:Pu(o)?"inside":Ou(o)?"right":"top"),o=r["inside"===a?"innerLabel":"label"],r=Object.assign({},o,e),e=R2[a.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},o),e(a,t,r,n,i));throw new Error("Unknown position: "+a)}const D2=o=>(t,e,n,r)=>{var i=e["text"],a=J(e,["text","x","y"]),t=I2(t,e,n,r,o),{rotate:e=0,transform:r=""}=t,t=J(t,["rotate","transform"]);return tt(new o2).call(R,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(R,a).node()},z2=(D2.props={},t=>{const s=t["colorAttribute"],l=J(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=J(rg(r,i,a,o),["stroke"]),{d:i,color:a}=e;return tt(new F.Path).call(R,r).style("d",i).style(s,a).call(R,l).node()}}),W2=(z2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>z2(Object.assign({colorAttribute:"fill"},t))),G2=(W2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>z2(Object.assign({fill:"none",colorAttribute:"stroke"},t))),H2=(G2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=J(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),V2=(H2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),Y2=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:V2.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:V2.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:V2.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:V2.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:V2.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:V2.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:V2.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:V2.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:V2.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:V2.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:V2.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:V2.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:V2.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:V2.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:V2.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:V2.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:V2.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",labelAutoRotate:!1,tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisArcY:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridControlAngles:[90,180,360],gridType:"surround",girdClosed:!0},legend:{padding:8,showTitle:!1,titleFill:V2.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:V2.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:V2.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:V2.BLACK,navButtonFillOpacity:.65,navPageNumFill:V2.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:V2.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:V2.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:V2.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:V2.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:V2.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:V2.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:V2.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:V2.STROKE,backgroundFillOpacity:1,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:V2.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:V2.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[2,2,2,2],trackSize:10,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,trackStroke:"none",thumbFill:"#000",thumbFillOpacity:.15,thumbStroke:"none",thumbHighlightedFillOpacity:.2},title:{titleFill:V2.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:V2.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},f=(Y2.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),q2=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:f.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:f.BLACK,lineWidth:1}},text:{text:{fill:f.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:f.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:f.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:f.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:f.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:f.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:f.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:f.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:f.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:f.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:f.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:f.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:f.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:f.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:f.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:f.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",labelAutoRotate:!1,tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisArcY:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridControlAngles:[90,180,360],gridType:"surround",girdClosed:!0},legend:{padding:8,showTitle:!1,titleFill:f.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:f.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:f.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:f.BLACK,navButtonFillOpacity:.45,navPageNumFill:f.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:f.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:f.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:f.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:f.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:f.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:f.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:f.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:f.STROKE,backgroundFillOpacity:1,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:f.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:f.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:f.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:f.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},U2=(q2.props={},q2.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),$2=t=>{var e="#4e79a7",e={defaultColor:e,defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:U2.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:U2.BLACK,connectFillOpacity:.1}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:10,strokeWidth:0,connectorStroke:U2.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:U2.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:U2.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:U2.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:U2.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:U2.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:U2.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:U2.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:U2.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:U2.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:U2.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,line:!0,lineStroke:"#888",lineStrokeOpacity:1,lineLineWidth:1,lineArrow:null,tickStroke:U2.STROKE,tickStrokeOpacity:1,tickLineWidth:1,tickLength:5,labelFill:U2.BLACK,labelFillOpacity:1,labelFontSize:10,labelAutoRotate:!1,labelFontWeight:"normal",labelSpacing:4,labelAlign:"horizontal",gridStroke:"#ddd",gridStrokeOpacity:1,gridLineWidth:1,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:4,titleTextBaseline:"bottom",labelSpacing:8,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:4,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90) translate(0, -50%)",labelSpacing:4,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisArcY:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridControlAngles:[90,180,360],gridType:"surround",girdClosed:!0},legend:{padding:8,showTitle:!1,titleFill:U2.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemLabelFill:U2.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemValueFill:U2.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:U2.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:U2.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,backgroundFill:"transparent"},continuousLegend:{showTitle:!1,labelFill:U2.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:U2.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:U2.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:U2.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},label:{fill:U2.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:null,offset:12,connectorStroke:U2.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:U2.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:U2.STROKE,backgroundFillOpacity:.05,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:U2.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:U2.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:U2.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:U2.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)};function X2(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}$2.props={};var K2,Z2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function J2(t){var e;if(e=Z2.exec(t))return new Q2({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function Q2(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function tx(t,e){var n,e=X2(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}J2.prototype=Q2.prototype,Q2.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ex={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>tx(100*t,e),r:tx,s:function(t,e){var n,r,i=X2(t,e);return i?(n=i[0],(i=(i=i[1])-(K2=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+X2(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function nx(t){return t}var rx,ix,ax=Array.prototype.map,ox=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function sx(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?nx:(s=ax.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",M=void 0===t.decimal?".":t.decimal+"",O=void 0===t.numerals?nx:(e=ax.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=J2(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):ex[m]||(void 0===g&&(g=12),y=!0,m="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=ex[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,a=b;if("c"===m)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===m?ox[8+K2/3]:"")+a+(o&&"("===f?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?M+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=k(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=k(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return O(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=J2(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=X2(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=ox[8+e/3];return function(t){return n(r*t)+i}}}}function lx(t,e,n){return t.querySelector(e)?tt(t).select(e):tt(t).append(n)}function cx(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function ux(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function fx(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=$c(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new i0({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),h=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return Tu(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new i0({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new i0({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return _u(s)||Ou(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:Ou(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:u(t,e,n),id:String(e)}}),Su(s)&&"arcY"===o?i.map(t=>{var e=t["value"],t=J(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:h(f(a.map(t)+r)),label:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n),id:String(e)}})}function hx(t,e,n){var r;return!(_u(r=e)&&Ou(r)||Au(e))&&(void 0===t?!!n.getTicks:t)}Ba=sx({thousands:",",grouping:[3],currency:["$",""]}),rx=Ba.format,Ba.formatPrefix;const dx=t=>{const{position:c,labelFormatter:u=t=>""+t,tickFilter:f,tickCount:h,tickMethod:d,title:p,grid:g=!1}=t,y=J(t,["order","size","position","labelFormatter","tickFilter","tickCount","tickMethod","title","grid"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{x:i,y:a,width:o,height:s}=i,i=[i+o/2,a+s/2],a=fx(t,e,h,u,f,d,c,n),t=Math.min(o,s)/2,[e,o]=function(t){var[,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}(n),[s,l]=function(t){var[,,,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[+t,+e]}(n),s=function(t,e,n,r){var[i,a]=ux(r),n={titleFillOpacity:0,titlePosition:"inner",showLine:!1,showTick:!0,gridLength:(n-e)*(Math.min(i,a)/2)};return"arcInner"===t?(ux(r),Object.assign(Object.assign({},n),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},n),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",gridDirection:"positive"})}(c,s,l,n),l=r["axis"];return new Nv({style:B({},l,s,Object.assign({type:"arc",center:i,radius:t,angleRange:[e,o],data:a,title:cx(p),showGrid:g},y))})}};const px=t=>{const{position:f,title:h,labelFormatter:d=t=>""+t,direction:p="left",tickCount:g,tickFilter:y,tickMethod:m}=t,v=J(t,["order","size","transform","position","title","labelFormatter","direction","tickCount","tickFilter","tickMethod"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,e=fx(t,e,g,d,y,m,f,n),a=(a=t,r=r,o=f,s=p,r=Object.assign({},r.axis,r["axis"+gf("centerVertical"===o?"left":o)]||r.axisTop),"bottom"===o?Object.assign(Object.assign({},r),{titlePosition:a.getTicks?"right-bottom":"bottom",titleTransformOrigin:"center",titleTransform:a.getTicks?"translate(-100%, 0)":void 0}):"arcY"===o?Object.assign(Object.assign({},r),{labelDirection:"right"===s?"negative":"positive",labelTransform:"center"===s?"translate(50%, 0)":"",tickDirection:"right"===s?"negative":"positive",labelSpacing:"center"===s?0:4,tick:"center"!==s&&void 0}):r),{labelAutoRotate:o=!0,labelAutoHide:s=!1,label:r=!0,tick:l=!0,line:c=!1,grid:u}=Object.assign({},a,v),u=hx(u,n,t),t=function(t,e){var[e,n]=ux(e);return"bottom"===t||"top"===t?n:e}(f,n),i=function(t,e,n){var[,n]=n.getCenter(),{x:r,y:i,width:a,height:o}=e;return"bottom"===t?{startPos:[r,i],endPos:[r+a,i]}:"left"===t||"centerVertical"===t?{startPos:[r+a,i],endPos:[r+a,i+o],showLine:"centerVertical"===t||void 0}:"right"===t?{endPos:[r,i+o],startPos:[r,i]}:"arcY"===t?{startPos:[r,i],endPos:[r+a,i+o],gridCenter:[e.x,n+e.y]}:{startPos:[r,i+o],endPos:[r+a,i+o],showLine:"centerHorizontal"===t||void 0}}(f,i,n),{showLine:n=c}=i,c=J(i,["showLine"]),e=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a),{type:"linear",data:e,title:cx(h),showLabel:r,labelTransforms:(i=o,a=[],s&&a.push({type:"hide"}),i&&a.push({type:"rotate",optionalAngles:[0,30,45,60,90]}),a),showGrid:u,showTick:l,gridLength:t}),v),{showLine:!0}),n?null:{lineOpacity:0}),c);return new Nv({className:"axis",style:Object.assign(Object.assign({},e),{horizontal:function(t){switch(t){case"top":case"bottom":case"centerHorizontal":return!0;default:return!1}}(f)})})}},gx=t=>{const{position:i,labelFormatter:e=t=>""+t}=t;var n="string"==typeof e?rx(e):e;const a=Object.assign(Object.assign({},t),{labelFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?dx:px)(a)(t,e,n,r)},yx=(gx.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>gx(t)),mx=(yx.props=Object.assign(Object.assign({},gx.props),{defaultPosition:"bottom"}),t=>gx(t));mx.props=Object.assign(Object.assign({},gx.props),{defaultPosition:"left"});const vx=t=>{const{position:u,labelFormatter:f=t=>""+t,dx:h=0,dy:d=0,title:p,gridCol:g,gridRow:y}=t,m=J(t,["order","size","position","labelFormatter","dx","dy","title","gridCol","gridRow"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a,width:o,height:s}=i,t=t.map(t=>({id:t,label:f(t),value:"",color:e.map(t)})),[l,c]=function(t,e,n){var[r,i]=[e||100,n||100];return{top:[1,i],bottom:[1,i],left:[r,1],right:[r,1],arcCenter:[r,1]}[t]||[e,n]}(u,y,g),t={data:t,x:i+h,y:a+d,orient:["right","left","arcCenter"].includes(u)?"vertical":"horizontal",width:o,height:s,gridCol:c,gridRow:l,rowPadding:0,colPadding:8,titleText:cx(p),itemMarkerFill:t=>t?t.color:"#fff"},{legend:i={}}=r;return new Qv({className:"legend-category",style:Object.assign({},i,t,m)})}},bx=(vx.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const l=t["title"],c=J(t,["title"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a}=i,[o,s]=t,{continuousLegend:r={}}=r;return new xb({style:Object.assign({},r,{x:i,y:a,width:400,height:300,data:[{value:o},{value:s}],titleText:cx(l),titleFontSize:12,ribbonLen:120,ribbonSize:12,ribbonColor:t.map(t=>e.map(t)),showHandle:!1,showIndicator:!1,labelAlign:"value"},c)})}});function xx(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}bx.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};ix={render(t,e){const{y:n,width:r,title:i,subtitle:a,spacing:o=2,align:s="left"}=t,l=J(t,["x","y","width","title","subtitle","spacing","align"]);t=Q(l,"title");const c=Q(l,"subtitle"),u=lx(e,".title","text").attr("className","title").call(R,Object.assign(Object.assign(Object.assign({},xx(0,n,r,s)),{fontSize:14,textBaseline:"top",text:i}),t)).node().getLocalBounds();lx(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!a)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},xx(0,u.max[1]+o,r,s)),{fontSize:12,textBaseline:"top",text:a}),c))})}};const wx=class extends F.CustomElement{constructor(t){super(t),this.descriptor=ix}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(B({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},kx=s=>(t,e,n,r)=>{var{x:e,y:i,width:a,height:o}=e.bbox;return new wx({style:B({},{style:r.title},Object.assign({x:e,y:i,width:a,height:o},s))})},Mx=(kx.props={defaultPosition:"top",defaultOrder:2,defaultSize:36},t=>{const{orient:u,labelFormatter:f}=t,h=J(t,["orient","labelFormatter","size"]);return(e,t,n,r)=>{var i,t=t["bbox"],{x:t,y:a,width:o,height:s}=t,{slider:r={}}=r;const l=(null==(i=e.getFormatter)?void 0:i.call(e))||(t=>t),c="string"==typeof f?rx(f):f;return new Am({className:"slider",style:Object.assign({},r,Object.assign({x:t,y:a,trackLength:"horizontal"===u?o:s,orient:u,formatter:t=>{return(c||l)(function(t,n){if(!t.getBandWidth)return t.invert(n);const e=t.adjustedRange,r=t=>Math.abs(t);return t.invert(function(e,n){let r,i=!1;if(1===n.length){let t;for(const o of e){var a=n(o);(i?zc(a,t)<0:0===zc(a,a))&&(r=o,t=a,i=!0)}}else for(const t of e)(i?n(t,r)<0:0===n(t,t))&&(r=t,i=!0);return r}(e,(t,e)=>r(t-n)-r(e-n)))}(e,t))}},h))})}});Mx.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1};const Ox=t=>Mx(Object.assign(Object.assign({},t),{orient:"horizontal"})),_x=(Ox.props=Object.assign(Object.assign({},Mx.props),{defaultPosition:"bottom"}),t=>Mx(Object.assign(Object.assign({},t),{orient:"vertical"}))),Sx=(_x.props=Object.assign(Object.assign({},Mx.props),{defaultPosition:"left"}),t=>{const s=t["orient"],l=J(t,["orient","labelFormatter"]);return(t,e,n,r)=>{var e=e["bbox"],{x:e,y:i,width:a,height:o}=e,{scrollbar:r={}}=r;return new Lm({className:"scrollbar",style:Object.assign({},r,Object.assign(Object.assign({x:e,y:i,trackLength:"horizontal"===s?a:o},l),{orient:s,value:0,contentLength:1500,viewportLength:"horizontal"===s?a:o}))})}}),Ex=(Sx.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>Sx(Object.assign(Object.assign({},t),{orient:"horizontal"}))),Ax=(Ex.props=Object.assign(Object.assign({},Sx.props),{defaultPosition:"bottom"}),t=>Sx(Object.assign(Object.assign({},t),{orient:"vertical"})));Ax.props=Object.assign(Object.assign({},Sx.props),{defaultPosition:"left"});class Tx{constructor(t){this.$value=t}static of(t){return new Tx(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function Px(t,e,n){return Tx.of({}).call(Lx,t).call(Lx,e).call(Lx,n).value()}function Lx(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function Nx(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const Cx=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],jx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=Ou(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Px(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},Fx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=Ou(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Px(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Bx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=Ou(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Px(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},Rx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=Ou(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Px(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Ix=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],Px(i,n,l))},Dx=(Ix.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],Px(i,n,l))});function zx(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function Wx(t,e){var[n,r,i,t]=zx(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
2
2
|
M ${t} ${e}
|
|
3
3
|
L ${t+n} ${e}
|
|
4
4
|
L ${t+n} ${e+r}
|
|
5
5
|
L ${t} ${e+r}
|
|
6
6
|
Z
|
|
7
|
-
`}([h,d,f,s]))}c-=u,l+=1}return o}function pk(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function yk(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],y=F.convertToPath(e),g=F.convertToPath(n);return d===p&&"path"!==d||(void 0===y||void 0===g)?(p=n,d=r,[o,l,s,h]=hk(i=e),[c,u,f,a]=(pk(p,i),hk(p)),o=[Object.assign({transform:`translate(${o-c}, ${l-u}) scale(${s/f}, ${h/a})`},ik(i,ak)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},ik(p,ak))],p.animate(o,d)):(c=y,s="path"===(u=(l=t)["nodeName"])?l:(pk(u=new F.Path({style:Object.assign(Object.assign({},ik(l,ak)),{d:c})}),l),u),f=[Object.assign({path:y},ik(e,ak)),Object.assign({path:g},ik(n,ak))],h=s.animate(f,r),s.style.transform="scale(1, 1)",s.style.transform="none",h)}fk.props={};const gk=y=>(t,e,n,r,i)=>{[a="pack"]=[y.split];var a="function"==typeof a?a:dk,i=nk(i,n,y),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,yk(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return yk(t,new F.Path({style:Object.assign({path:d[e]},ik(l,ak))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return yk(t,t,new F.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},vk=(gk.props={},b=>{return F.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:F.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!ff(r))return ok(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:s=0,inset:l=0,fillOpacity:c,strokeOpacity:u,opacity:f}=e,{points:e,y:t,y1:h}=(Z(e,["radius","inset","fillOpacity","strokeOpacity","opacity"]),t);const d=Q1().cornerRadius(s).padAngle(l*Math.PI/180),p=Dy(r,e,[t,h]),{startAngle:y,endAngle:g}=p,v=new F.Path({}),m=t=>{v.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=F.convertToPath(v);return v.style.transform="none",t};s=[{waveInArcAngle:y+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:y+1e-4,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.01},{waveInArcAngle:g,fillOpacity:c,strokeOpacity:u,opacity:f}],l=a.animate(s,nk(i,n,b));return l.onframe=function(){a.style.path=m(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},l.onfinish=function(){a.style.path=m(Object.assign(Object.assign({},p),{endAngle:g}))},l}}),mk=(vk.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,nk(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),bk=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,nk(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},xk=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],nk(i,n,o))},kk=(xk.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=ok(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),wk=(kk.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=lk(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function Mk(t){return Q(t).selectAll("."+et).nodes()}function Ok(t){return Q(t).select("."+nt).node()}function _k(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function Sk(t){return t&&0!==Object.keys(t).length?t:{highlightedLineWidth:1,highlightedStroke:"#000"}}function Ek(){return t=>t.__data__.color}function Ak(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function Tk(t){t=Array.from(t.markState.keys());const n=new Map(t.map(t=>[t.key,t.data]));return t=>{var{index:t,markKey:e}=t.__data__;return n.get(e)[t]}}function Pk(o,s=(t,e)=>t,l=(t,e,n)=>t.setAttribute(e,n)){const c="__states__",u="__ordinal__",i=t=>{var{[c]:e=[],[u]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),J(o,e)),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var a=t.getAttribute(r),i=s(i,t);l(t,r,i),r in n||(n[r]=a)}t[u]=n}},a=t=>{t[c]||(t[c]=[])};return{setState:(t,...e)=>{a(t),t[c]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[c].indexOf(r);-1!==r&&t[c].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[c].indexOf(e))}}function Nk(r,i){const a=new Map(r.map((t,e)=>[t,e]));return(t,e)=>{var n;return"function"!=typeof t?t:(n=a.get(e),t(i?i(e):e,n,i?r.map(i):r))}}function jk(l,t){var{valueof:c=(t,e)=>t}=t,u=Z(t,["valueof"]);const f="element-link";return[(t,e)=>{if(!(t.length<=1)){var n=t.map(t=>[t,t.getBBox()]);n.sort(([,t],[,e])=>{var{x:t,y:n}=t,{x:e,y:r}=e;return t-e==0?n-r:t-e});for(let t=1;t<n.length;t++){var r=L1();const[o,s]=n[t-1];var[,i]=n[t],i=(r.moveTo(s.x+s.width,s.y),r.lineTo(i.x,i.y),r.lineTo(i.x,i.y+i.height),r.lineTo(s.x+s.width,s.y+s.height),r.closePath(),Ly(u,t=>c(t,o))),{fill:a=o.getAttribute("fill")}=i,i=Z(i,["fill"]),r=new F.Path({className:f+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:a},i)});l.appendChild(r)}}},t=>{t=t||f;for(const e of l.getElementsByClassName(t)||[])e.remove()}]}function Lk(t,e){var{elements:n,datum:r,groupKey:i=t=>t,link:a=!1}=e,e=Z(e,["elements","datum","groupKey","link"]);const o=n(t),s=new Set(o),l=Ru(o,i);n=Nk(o,r);const[c,u]=jk(t,Object.assign({elements:o,valueof:n},J(e,"link"))),{setState:f,removeState:h}=Pk(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=l.get(t),e=new Set(t);for(const n of o)e.has(n)?f(n,"highlighted"):f(n,"unhighlighted");a&&c(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of o)h(e,"unhighlighted","highlighted");a&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function Ck(n){return t=>{var{container:t,view:e}=t;return Lk(t,Object.assign(Object.assign({},Sk(n)),{elements:Mk,datum:Tk(e)}))}}function Fk(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return Lk(t,Object.assign(Object.assign({},Sk(n)),{elements:Mk,datum:Tk(e),groupKey:Ak(e)}))}}function Bk(n){return t=>{var{container:t,view:e}=t;return Lk(t,Object.assign(Object.assign(Object.assign({},n),Sk(n)),{elements:Mk,datum:Tk(e),groupKey:Ek()}))}}function Ik(t,e){var{elements:n,datum:r,groupKey:l=t=>t,link:c=!1,single:u=!1}=e,e=Z(e,["elements","datum","groupKey","link","single"]);const f=n(t),h=new Set(f),d=Ru(f,l);n=Nk(f,r);const[p,y]=jk(t,Object.assign({elements:f,valueof:n},J(e,"link"))),{setState:g,removeState:i,hasState:v}=Pk(e,n),m=()=>{for(const t of f)i(t,"selected","unselected");c&&y()},a=t=>{t=t.target;if(!h.has(t))return m();if(u){var e=t;if(v(e,"selected"))m();else{var e=l(e),e=d.get(e),n=new Set(e);for(const i of f)n.has(i)?g(i,"selected"):g(i,"unselected");c&&(y(),p(e))}}else{e=t;var t=l(e),r=d.get(t);const a=new Set(r);if(v(e,"selected")){if(!f.some(t=>!a.has(t)&&v(t,"selected")))return m();for(const o of r)g(o,"unselected");c&&y(t)}else{e=r.some(t=>v(t,"selected"));for(const s of f)a.has(s)?g(s,"selected"):v(s,"selected")||g(s,"unselected");!e&&c&&p(r,t)}}};return t.addEventListener("click",a),()=>{t.removeEventListener("click",a)}}function Rk(n){return t=>{var{container:t,view:e}=t;return Ik(t,Object.assign(Object.assign({},Sk(n)),{elements:Mk,datum:Tk(e)}))}}function Dk(n){return t=>{var{container:t,view:e}=t;return Ik(t,Object.assign(Object.assign({},Sk(n)),{elements:Mk,datum:Tk(e),groupKey:Ak(e)}))}}function zk(n){return t=>{var{container:t,view:e}=t;return Ik(t,Object.assign(Object.assign({},Sk(n)),{elements:Mk,datum:Tk(e),groupKey:Ek()}))}}function Gk(t){var{wait:O=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=Z(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=Wu(t.map(t=>d[t])),u=B({},e),f=u.marks.find(t=>"line"===t.type);t=Qu(Du(t,t=>Qu(t,t=>+h[t])/ef(t,t=>+h[t]),t=>l[t]).values());B(f,{scale:{y:{domain:[1/t,t]}}});const p=Ok(r),y=r.getElementsByClassName(et);const g=Ru(r.getElementsByClassName(it),t=>t.__data__.key.split("-")[0]),v=new F.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},J(A,"rule"))}),m=new F.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},J(A,"label"))}),b=(v.append(m),p.appendChild(v),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Tu(c,n)]}),x=(t,e)=>{v.setAttribute("x1",t[0]),v.setAttribute("x2",t[0]),m.setAttribute("text",E(e))};let k;var w;const M=ql(t=>{t=_k(p,t);if(t){var{scale:e,coordinate:n}=k,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of y){var{seriesIndex:a,key:o}=u.__data__,s=a[Su(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),g.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},O,{leading:_,trailing:S});return w=[0,0],me(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,w);x(w,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[Su(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);k=t.view}),p.addEventListener("pointerenter",M),p.addEventListener("pointermove",M),p.addEventListener("pointerleave",M),()=>{v.remove(),p.removeEventListener("pointerenter",M),p.removeEventListener("pointermove",M),p.removeEventListener("pointerleave",M)}}}function Wk({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=Ok(n),a=B({},e);for(const s of a.marks)s.animate=!1;const o=ql(t=>{var e,n,t=_k(i,t);t&&([t,e]=t,(n=function(t){var{coordinates:e=[]}=t,n=e.find(t=>"fisheye"===t.type);return n||(e.push(n={type:"fisheye"}),t.coordinates=e,n)}(a)).focusX=t,n.focusY=e,n.isVisual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function Vk(t,e,n,r){var i=t.tooltipElement||function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new l2({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:a-r,height:o-i},position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return t.getRootNode().defaultView.getConfig().container.appendChild(e.HTMLTooltipElement),e}(t,n,r),{items:e,title:a}=e;i.show(),i.update({x:n,y:r,items:e,title:a}),t.tooltipElement=i}function Hk(t){t=t.tooltipElement;t&&t.hide()}function qk(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>rh(t)))}function Yk(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function Uk(n,a,o,t=n.map(t=>t.__data__)){e=t.map(t=>t.title);var e=Array.from(new Set(e)).filter(rh),t=t.flatMap((r,t)=>{var t=n[t],e=Z(r,["title"]);const i=Yk(t);return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=o[t].getOptions();return Object.assign({color:i,name:function(t,e){var{color:t,series:n}=t,{color:e,series:r}=e;return t&&t.invert?t.invert(e):n&&n.invert?n.invert(r):null}(o,r)||n,value:void 0===e?e:""+e},qk(a({channel:t,value:e})))}).filter(({value:t})=>void 0!==t)});return Object.assign(Object.assign({},0<e.length&&{title:e.join(",")}),{items:t})}function Xk(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function Kk(t,e){return void 0===t?e:t}function $k(f,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:h,coordinate:d,crosshairs:p,item:y,startX:g=0,startY:v=0}=t,t=Z(t,["elements","wait","leading","trailing","scale","coordinate","crosshairs","item","startX","startY"]);const m=e(f),[,b]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(f),x=new Map(m.map(t=>{var e=t["__data__"],e=e["seriesX"];return[t,Wu(e)]})),k=J(t,"crosshairs"),a=ql(t=>{var t=_k(f,t),e=f.getBounds(),n=e.min[0],e=e.min[1];const r=[t[0]-g,t[1]-v];r;var i=m.map(t=>{var e=x.get(t),t=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")).map(([t,e])=>{e=e[n];return[Pl(t.replace("series","")),e]}))})(t,((t,e)=>{var[t]=d.invert(t);return Tu(e,t)})(r,e)),{x:e,y:n}=t;return[t,d.map([e,n])]}),a=i.map(t=>t[0]),i=i.map(t=>t[1]),a=Uk(m,y,h,a);if(Vk(f,a,t[0]+n,t[1]+e),p){a=f;n=i;t=Object.assign(Object.assign({},k),{height:b,startX:g,startY:v});var{height:e,startX:i,startY:o}=t,t=Z(t,["height","startX","startY"]);const s=(n=af(n.map(t=>t[0])))+i,l=n+i,c=o,u=e-o;(i=a.ruleY||(n=new F.Line({style:Object.assign({x1:s,x2:l,y1:c,y2:u,lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t)}),a.appendChild(n),n)).style.x1=s,i.style.x2=l,i.style.y1=c,i.style.y2=u,a.ruleY=i}},n,{leading:r,trailing:i}),o=()=>{var t;Hk(f),p&&(t=f).ruleY&&(t.ruleY.remove(),t.ruleY=void 0)};return f.addEventListener("pointerenter",a),f.addEventListener("pointermove",a),f.addEventListener("pointerleave",o),()=>{f.removeEventListener("pointerover",a),f.removeEventListener("pointerout",a),f.removeEventListener("pointerleave",o)}}function Zk(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const l=new Set(t),c=Ru(t,o),u=ql(t=>{var e,n=t["target"];l.has(n)&&(n=o(n),n=1===(n=c.get(n)).length?function(t,r,i){var e=(n=t["__data__"])["title"],n=Z(n,["title"]);const a=Yk(t);return t=Object.entries(n).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=i[t].getOptions();return Object.assign({color:a,name:n,value:void 0===e?e:""+e},qk(r({channel:t,value:e})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):Uk(n,s,i),{offsetX:t,offsetY:e}=t,Vk(r,n,t,e))},e,{leading:n,trailing:a}),f=t=>{t=t.target;l.has(t)&&Hk(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",f),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",f)}}function Jk(t){const{shared:u,crosshairs:f,series:h,item:d=()=>({}),facet:p=!1}=t,y=Z(t,["shared","crosshairs","series","name","item","facet"]);return(e,t)=>{var{container:n,view:r}=e;const{scale:i,markState:a,coordinate:o}=r;var s=Xk(a,"seriesTooltip"),l=Xk(a,"crosshairs"),n=Ok(n),s=Kk(h,s);if(s&&!p)return $k(n,Object.assign(Object.assign({},y),{elements:Mk,scale:i,coordinate:o,crosshairs:Kk(f,l),item:d}));if(s&&p){s=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const c=s.flatMap(({container:t})=>Mk(t)),i=s[0].view.scale;t=n.getBounds(),s=t.min[0],t=t.min[1];return $k(n.parentNode.parentNode,Object.assign(Object.assign({},y),{elements:()=>c,scale:i,coordinate:o,crosshairs:Kk(f,l),item:d,startX:s,startY:t}))}return Zk(n,Object.assign(Object.assign({},y),{elements:Mk,scale:i,coordinate:o,groupKey:u?Ak(r):void 0,item:d}))}}wk.props={};const Qk="legend-category";function t5(t,e){t.getRootNode().defaultView.getContextService().getDomElement().style.cursor=e}function e5(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function n5(t){return t.getElementsByClassName("legend-category-item-label")[0]}function r5(t){return t.getElementsByClassName("items-item")}function i5(t,e){var{legends:n,marker:i,label:a,datum:o,filter:r,setAttribute:s}=e,e=Z(e,["legends","marker","label","datum","filter","setAttribute"]);const l=new Map,c=new Map,u=new Map;var e=0===Object.keys(e).length?{labelUnselectedFill:"#aaa",markerUnselectedFill:"#aaa"}:e,f=J(e,"marker"),e=J(e,"label");const{setState:h,removeState:d}=Pk(f,void 0,s),{setState:p,removeState:y}=Pk(e,void 0,s),g=Array.from(n(t)),v=g.map(o),m=()=>{for(const r of g){var t=o(r),e=i(r),n=a(r);(v.includes(t)?(d(e,"unselected"),y):(h(e,"unselected"),p))(n,"unselected")}};for(const w of g){var b=()=>{t5(t,"pointer")},x=()=>{t5(t,"default")},k=()=>me(this,void 0,void 0,function*(){var t=o(w),e=v.indexOf(t);-1===e?v.push(t):v.splice(e,1),0===v.length&&v.push(...g.map(o)),yield r(v),m()});w.addEventListener("click",k),w.addEventListener("pointerenter",b),w.addEventListener("pointerout",x),l.set(w,k),c.set(w,b),u.set(w,x)}return()=>{for(const t of g)t.removeEventListener("click",l.get(t)),t.removeEventListener("pointerenter",c.get(t)),t.removeEventListener("pointerout",u.get(t))}}function a5(t){var s=t["channel"],r=Z(t,["channel"]);return t=>{const{container:e,view:i,options:a,update:o}=t;var t=e.getElementsByClassName(Qk),t=s?t.find(t=>{t=t.parentNode.__data__;return t.scale.name===s}):t[0],[t,n]=t?function(t){const e=t.attributes["data"];return[t=(t=t.parentNode.__data__).scale.name,{legends:r5,marker:n5,label:e5,datum:t=>{t=t.__data__,t=t.index;return e[t].label}}]}(t):[null,{}];return t&&(s=t),i5(e,Object.assign(Object.assign(Object.assign({},n),{filter:r=>me(this,void 0,void 0,function*(){var t=i["scale"];const{[s]:n}=t;t=a.marks,t=t.map(t=>{var{transform:e=[]}=t,e=[{type:"filter",[s]:r},...e];return B({},t,{transform:e,scale:{[s]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},a),{marks:t});return o(t)})}),r))}}function o5(n){return(t,...e)=>B({},n(t,...e),t)}function s5(n){return(t,...e)=>B({},t,n(t,...e))}function l5(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=Z(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const c5=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(t=>{var e=t["data"],t=Z(t,["data"]);return Object.assign(Object.assign({},t),{data:l5(e,o),x:n,y:r,width:i,height:a})})},u5=(c5.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var y=n[t],g=y["data"],y=Z(y,["data"]),g=l5(g,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:g},y)),p+=h[t]+i}return d}),f5=(u5.props={},()=>t=>{var e=t["children"],t=Z(t,["children"]);if(!Array.isArray(e))return[];const{data:a,scale:o={},axis:s={},legend:l={}}=t,n=Z(t,["data","scale","axis","legend"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={}}=t,t=Z(t,["data","scale","axis","legend"]);return Object.assign({data:l5(e,a),scale:B({},o,n),axis:!(!r||!s)&&B({},s,r),legend:!(!i||!l)&&B({},l,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),h5=(f5.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:v,data:m,coordinates:b,theme:x,component:k,interactions:w,x:M,y:O,key:_,frame:S,title:E,labelTransform:A,parentKey:T}=t,t=Z(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinates","theme","component","interactions","x","y","key","frame","title","labelTransform","parentKey"]);return[{type:"standardView",x:M,y:O,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinates:b,component:k,interactions:w,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:v,parentKey:T,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:m})]}]}),d5=(h5.props={},o5(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=Ru(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),p5=o5(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:B({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:B({title:i},o)}}}),y5=o5(()=>({animate:{enterType:"fadeIn"}})),g5=s5(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),v5=s5(()=>({type:"cell"})),m5=s5(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),b5=s5((t,c=function(t){t=t.points;return Ny(t)},k=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?x5(a,e):(t=e.length?void 0:null,B({title:r===i-1&&void 0,grid:t},a))}},w=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?x5(r,e):(n=e.length?void 0:null,B({title:0===t&&void 0,grid:n},r))}},M={})=>{const{data:e,encode:n,children:u,scale:r,x:O=0,y:_=0,shareData:f=!1,key:S}=t,E=e["value"],{x:A,y:T}=n;t=r.color;const P=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:g,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Cy(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[T]:e}=t,t=void 0===A||t===n,e=void 0===T||e===r;return t&&e}).map(t=>E.filter(t)),m=f?Qu(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:T,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],y=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=Z(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:T?5:void 0}},r=r?y:0===y.length?[]:E,l={color:{domain:P}},o={x:k5(o,k)(p,r),y:k5(a,w)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+g+O,y:f+v+_,parentKey:S,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:m,scale:B(s,e,l),axis:B({},i,o),legend:!1},t),M)})})}}});function x5(t,e){return e.length?B({title:!1,tick:null,label:null},t):B({title:!1,tick:null,label:null,grid:null},t)}function k5(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const w5=()=>t=>{return[ek.of(t).call(v5).call(p5).call(y5).call(d5).call(g5).call(m5).call(b5).value()]},M5=(w5.props={},o5(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),O5=s5(t=>{const{data:k,children:c,x:w=0,y:M=0,key:O}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:v,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Cy(t);const s=t.map(({points:t})=>Ny(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,y]=l[c],g=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=Z(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return x5(r,e)})(g,k),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return x5(n,e)})(g,k)};return Object.assign({data:k,parentKey:O,key:i+"-"+c,x:u+v+w,y:f+m+M,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:B({x:{facet:!1},y:{facet:!1}},e),axis:B({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:B({},a,{x:p,y:y})},t)})})}}}),_5=s5(t=>{var e=t["encode"],t=Z(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=Z(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const S5=()=>t=>{return[ek.of(t).call(v5).call(p5).call(O5).call(_5).call(y5).call(g5).call(M5).value()]},E5=o5(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),A5=o5(t=>({coordinates:[{type:"polar"}]})),T5=t=>{var e=t["encode"],t=Z(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function P5(t){return t=>null}function N5(t){var t=t["points"],[t,e,n,r]=t,i=Ay(t,r),t=Ey(t,r),r=Ey(e,n),r=(e=r,r=Ty(r=t),e=Ty(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=Py(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const j5=()=>t=>{return[ek.of(t).call(v5).call(T5).call(p5).call(A5).call(m5).call(b5,N5,P5,P5,{frame:!1}).call(y5).call(g5).call(E5).value()]};const L5=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=B({enterDuration:e,updateDuration:e,exitDuration:e,updateEasing:n,updateType:"morphing",updateFill:"both",exitType:"fadeOut"},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function C5(t,e){if(null!==t)return{type:"column",value:t,field:e}}function F5(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function B5(t,e){var n=[];for(const r of t)n[r]=e;return n}function I5(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function R5(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=I5(t,i);if(null!==n)return[n,r]}return[null,null]}function D5(t){return!(t instanceof Date)&&"object"==typeof t}L5.props={};const z5=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,B({},e,{encode:{y1:C5(B5(t,0))}})]};function G5(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=I5(r,t))?void 0:t[0]]}).filter(([,t])=>rh(t));return Array.from(Ru(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function W5(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:_u(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>K5(t=>r(e[t]))):"series"===t?q5:"value"===t?Y5:"sum"===t?U5:"maxIndex"===t?X5:()=>null}function V5(t,e){for(const n of t)n.sort(e)}function H5(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function q5(t,e,n){return K5(t=>n[t])}function Y5(t,e,n){return K5(t=>e[t])}function U5(t,n,e){t=Cy(t),t=Array.from(Ru(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return K5(t=>r.get(e[t]))}function X5(t,n,e){t=Cy(t),t=Array.from(Ru(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,tf(e,t=>n[t])]));return K5(t=>r.get(e[t]))}function K5(n){return(t,e)=>_u(n(t),n(e))}z5.props={};const $5=(t={})=>{const{groupBy:T="x",orderBy:P=null,reverse:N=!1,y:j="y",y1:L="y1",series:C=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=I5(r,"y"),[s,l]=I5(r,"y1"),[r]=C?R5(r,"series","color"):I5(r,"color"),c=G5(T,t,e),n=W5(P)(n,a,r),u=(n&&V5(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){N&&_.reverse();var y=s?+s[_[0]]:0,g=[],v=[];for(const S of _){var m=h[S]=+a[S]-y;m<0?v.push(S):0<=m&&g.push(S)}var b=0<g.length?g:v,x=0<v.length?v:g;let t=g.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=y;for(const E of v.reverse()){var k=h[E];n=u[E]=(f[E]=n)+k}let r=y;for(const A of g){var w=h[A];0<w?r=u[A]=(f[A]=r)+w:u[A]=f[A]=r}}const M=new Set(d),O=new Set(p);r="y"===j?u:f,n="y"===L?u:f;return[t,B({},e,{encode:{y:C5(r,o),y1:C5(n,l)},style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>O.has(e)},i)})]}};function Z5(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}$5.props={};const J5=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(Z5)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",$5({groupBy:r})(t,e,n))},Q5=(J5.props={},(t={})=>{const{channel:i="x"}=t;return(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=I5(n,i),[t,B({},e,{encode:{title:C5(r,n)}})])}}),tw=(Q5.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,B({},e,{encode:{x:C5(B5(t,0))},scale:{x:{guide:null}}})]}),ew=(tw.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,B({},e,{encode:{y:C5(B5(t,0))},scale:{y:{guide:null}}})]}),nw=(ew.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,B({},e,{encode:{size:F5(B5(t,3))}})]}),rw=(nw.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=Z(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,B({},e,{encode:{key:C5(r)}})]}),iw=(rw.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=I5(n,"color"),[t,B({},e,{encode:{series:C5(r,i)}})])}),aw=(iw.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(D5)?[t,e]:[t,B({},e,{encode:{y:C5(n)}})]}),ow=(aw.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(D5)?[t,e]:[t,B({},e,{encode:{x:C5(n)}})]}),sw=(ow.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=I5(n,"y"),[t,B({},e,{encode:{y1:C5([...r])}})])}),lw=(sw.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=I5(n,"x"),[t,B({},e,{encode:{x1:C5([...r])}})])}),cw=(lw.props={},t=>{const a=t["channel"];return(t,e)=>{const r=e["encode"];var n=r["tooltip"];if(void 0!==n)return[t,e];n=Array.isArray(a)?a:[a];let i=0;n=n.flatMap(e=>Object.entries(r).filter(([t])=>t.startsWith(e)).flatMap(([t])=>{var[e,n]=I5(r,t),t=[[t,C5(e)]];return e&&null!==n&&(t.push(["tooltip"+(0===i?"":i),C5(e,n)]),i++),t}));return[t,B({},e,{encode:Object.fromEntries(n)})]}}),uw=(cw.props={},()=>(t,e)=>[t,B({scale:{x:{padding:0},y:{padding:0}}},e)]),fw=(uw.props={},()=>(t,e)=>{var{style:n={}}=e,r=Z(e,["data","style"]),{x:i,y:a}=n,n=Z(n,["x","y"]);return null==i||null==a?[t,e]:[[0],B({},r,{data:[0],cartesian:!0,encode:{x:C5([i||0]),y:C5([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),hw=(fw.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,B({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),dw=(hw.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(D5)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,B({},e,{encode:{x:C5(n),y:C5(r)}})])}),pw=(dw.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,B({},e,{encode:{series:F5(B5(t,void 0))}})]:[t,e]}),yw=(pw.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return Z(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=I5(r,"y"),[r]=R5(r,"series","color"),o=H5(r,i),i=G5(c,t,e),n=W5(f)(n,a,r),s=(n&&V5(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,B({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:C5(s)}})]}}),gw=(yw.props={},t=>{const{groupBy:p=["x"],reducer:y=(t,e)=>e[t[0]],orderBy:g=null,reverse:v=!1,duration:m}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,I5(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(Ru(n,t=>f[t]).values());a.push(...o)}i=a}if(g){const[h]=I5(e,g);h&&i.sort((t,e)=>y(t,h)-y(e,h)),v&&i.reverse()}r=(m||3e3)/i.length;const[s]=m?[B5(n,r)]:R5(e,"enterDuration",B5(n,r));var[l]=R5(e,"enterDelay",B5(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=Qu(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,B({},t,{encode:{enterDuration:F5(s),enterDelay:F5(c)}})]}});gw.props={};const vw=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=Z(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,I5(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=G5(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>ef(t,t=>e[+t]),max:(t,e)=>Qu(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>af(t,t=>e[+t]),median:(t,e)=>of(t,t=>e[+t]),sum:(t,e)=>cf(t,t=>e[+t]),deviation:(t,e)=>ju(t,t=>e[+t])}[r]||Qu;for(const e of i){var c=l(e,o);for(const h of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[h]=+u[h]/c}}return[e,B({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,C5(e,I5(n,t)[1])]))})]}};function mw(t,e,n){return null===t?[-.5,.5]:(t=H5(t,e),[-(e=new j0({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function bw(t,e,n){return e*(1-t)+n*t}vw.props={};const xw=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=I5(n,"x"),[n]=I5(n,"y");const o=mw(a,r,l),s=mw(n,i,c);a=t.map(()=>bw(u(),...s)),r=t.map(()=>bw(u(),...o));return[t,B({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:C5(a),dx:C5(r)}})]}},kw=(xw.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=I5(n,"x");const i=mw(n,r,a);n=t.map(()=>bw(o(),...i));return[t,B({scale:{x:{padding:.5}}},e,{encode:{dx:C5(n)}})]}}),ww=(kw.props={},(t={})=>{const{groupBy:y="x"}=t;return(e,t)=>{const n=t["encode"];var r=Z(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,I5(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=G5(y,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=Lu(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,B({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,C5(e,I5(n,t)[1])]))})]}}),Mw=(ww.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=I5(n,"y");var[,i]=I5(n,"y1"),n=(f?R5(n,"series","color"):I5(n,"color"),G5(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,B({},e,{encode:{y1:C5(a,i)}})]}});function Ow(t,e){return[t[0]]}function _w(t,e){return[t[t.length-1]]}function Sw(t,e){return[t[tf(t,t=>e[t])]]}function Ew(t,e){return[t[function(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}(t,t=>e[t])]]}Mw.props={};const Aw=(t={})=>{const{groupBy:s="series"}=t,l=Z(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=G5(s,t,e),[r,i]=Object.entries(l)[0];const[a]=I5(n,r),o="function"==typeof(n=i)?n:{first:Ow,last:_w,max:Sw,min:Ew}[n]||Ow;return[t.flatMap(t=>o(t,a)),e]}},Tw=(Aw.props={},(t={})=>{var e=t["selector"],t=Z(t,["selector"]);return Aw(Object.assign({x:e},t))}),Pw=(Tw.props={},(t={})=>{var e=t["selector"],t=Z(t,["selector"]);return Aw(Object.assign({y:e},t))});function Nw(e){return t=>null===t?e:e+" of "+t}function jw(){return[(t,e)=>af(t,t=>+e[t]),Nw("mean")]}function Lw(){return[(t,e)=>of(t,t=>+e[t]),Nw("median")]}function Cw(){return[(t,e)=>Qu(t,t=>+e[t]),Nw("max")]}function Fw(){return[(t,e)=>ef(t,t=>+e[t]),Nw("min")]}function Bw(){return[(t,e)=>t.length,Nw("count")]}function Iw(){return[(t,e)=>cf(t,t=>+e[t]),Nw("sum")]}function Rw(){return[(t,e)=>e[t[0]],Nw("first")]}function Dw(){return[(t,e)=>e[t[t.length-1]],Nw("last")]}Pw.props={};const zw=(t={})=>{const a=t["groupBy"],c=Z(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,l=a(t,e);var n,r,i;return l?(n=Object.entries(c).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:jw,max:Cw,count:Bw,first:Rw,last:Dw,sum:Iw,min:Fw,median:Lw}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=I5(s,t);return[t,C5(l.map(t=>n(t,null!==i&&void 0!==i?i:o)),(null==r?void 0:r(a))||a)]}),r=Object.keys(s).map(t=>{const[e,n]=I5(s,t);return[t,C5(l.map(t=>e[t[0]]),n)]}),i=l.map(t=>o[t[0]]),[Cy(l),B({},e,{data:i,encode:Object.fromEntries([...r,...n])})]):[t,e]}},Gw=(zw.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=Z(t,["channels"]);return zw(Object.assign(Object.assign({},e),{groupBy:(t,e)=>G5(n,t,e)}))}),Ww=(Gw.props={},(t={})=>Gw(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),Vw=(Ww.props={},(t={})=>Gw(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),Hw=(Vw.props={},(t={})=>Gw(Object.assign(Object.assign({},t),{channels:["color"]})));function qw(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=Z(n,["reverse","slice","channel"]),o=e["encode"];const[s]=I5(o,a);var l,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=I5(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>Qu(t,t=>+a[t]);if("min"===i)return t=>ef(t,t=>+a[t]);if("sum"===i)return t=>cf(t,t=>+a[t]);if("median"===i)return t=>of(t,t=>+a[t]);if("mean"===i)return t=>af(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),n=(o=t,c=t=>s[t],(2!==(l=n).length?Wu(Du(o,l,c),([t,e],[n,r])=>_u(e,r)||_u(t,n)):Wu(Ru(o,c),([t,e],[n,r])=>l(e,r)||_u(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),c=i?n.slice(...o):n;return[t,B(e,{scale:{[a]:{domain:c}}})]}Hw.props={};const Yw=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=Z(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return qw(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=I5(i,r);return i=Wu(t,t=>a[t]),n&&i.reverse(),[i,e]}}},Uw=(Yw.props={},(t={})=>Yw(Object.assign(Object.assign({},t),{channel:"x"}))),Xw=(Uw.props={},(t={})=>Yw(Object.assign(Object.assign({},t),{channel:"color"}))),Kw=(Xw.props={},(t={})=>Yw(Object.assign(Object.assign({},t),{channel:"y"})));Kw.props={};const $w=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=I5(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):I5(r,s)[0],r=zu(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>cf(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,B({},e,{scale:{x:{flex:r}}})]}};function Zw(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=Ny(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}$w.props={};const Jw=()=>(t,e)=>[t,B({},e,{modifier:Zw,axis:!1})],Qw=(Jw.props={},"thresholds");function t3(t){var[e,n]=Lu(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(Nu(t))/(3.49*ju(t)))))}const e3=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=Z(t,["groupChannels","binChannels"]),u={};return zw(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(Qw)))),Object.fromEntries(l.flatMap(e=>[[e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",([t])=>+u[e].get(t).split(",")[1]]]))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=I5(n,t);return t}),a=J(c,Qw),o=t.filter(e=>i.every(t=>rh(t[e]))),r=[...s.map(t=>{var[t]=I5(n,t);return t}).filter(rh).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||t3(n),e=Ju().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(Ru(o,e=>r.map(t=>t(e)).join("-")).values())}}))},n3=(e3.props={},(t={})=>{var e=t["thresholds"];return e3(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});n3.props={};const r3=(t={})=>{const{groupBy:n,thresholds:o=2e3}=t,e=Z(t,["groupBy","thresholds"]);return zw(Object.assign(Object.assign({},e),{groupBy:(t,e)=>{t=G5(n,t,e);return t.every(t=>t.length<=o)?null:t.flatMap(e=>{{var n=e,r=Math.max(1,Math.floor(e.length/o)),i=n.length,a=[];let t=0;for(;t<i;)a.push(n.slice(t,t+=r));return a}})}}))},i3=(r3.props={},(s={})=>(t,e)=>{const i=e["encode"],n=Object.entries(s).map(([t,e])=>{const[n]=I5(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(rh);if(0===n.length)return[t,e];const r=t.filter(e=>n.every(t=>t(e))),a=r.map((t,e)=>e);var o=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:a.map(t=>e.value[r[t]])})]);return[t,B({},e,{encode:Object.fromEntries(o)})]});i3.props={};var no="object"==typeof C&&C&&C.Object===Object&&C,ro="object"==typeof self&&self&&self.Object===Object&&self,io=no||ro||Function("return this")(),oo=io.Symbol,ao=Object.prototype,a3=ao.hasOwnProperty,o3=ao.toString,s3=oo?oo.toStringTag:void 0;var l3=Object.prototype.toString;var c3="[object Null]",u3="[object Undefined]",f3=oo?oo.toStringTag:void 0;function h3(t){if(null==t)return void 0===t?u3:c3;if(f3&&f3 in Object(t)){var e=t,n=a3.call(e,s3),r=e[s3];try{var i=!(e[s3]=void 0)}catch(t){}var a=o3.call(e);return i&&(n?e[s3]=r:delete e[s3]),a}return l3.call(t)}function d3(t){return null!=t&&"object"==typeof t}var p3=Array.isArray;function y3(t){return t}var g3="[object AsyncFunction]",v3="[object Function]",m3="[object GeneratorFunction]",b3="[object Proxy]";function x3(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}var k3=/^(?:0|[1-9]\d*)$/;var w3=9007199254740991;function M3(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=w3}function O3(t){return null!=t&&M3(t.length)&&!function(t){var e;if(e=typeof t,null!=t&&("object"==e||"function"==e))return(e=h3(t))==v3||e==m3||e==g3||e==b3}(t)}var _3=Object.prototype;function S3(t){return d3(t)&&"[object Arguments]"==h3(t)}var so=Object.prototype,E3=so.hasOwnProperty,A3=so.propertyIsEnumerable,T3=S3(function(){return arguments}())?S3:function(t){return d3(t)&&E3.call(t,"callee")&&!A3.call(t,"callee")};var co="object"==typeof y&&y&&!y.nodeType&&y,lo=co&&"object"==typeof module&&module&&!module.nodeType&&module,u=lo&&lo.exports===co?io.Buffer:void 0,P3=(u?u.isBuffer:void 0)||function(){return!1},N3={};N3["[object Float32Array]"]=N3["[object Float64Array]"]=N3["[object Int8Array]"]=N3["[object Int16Array]"]=N3["[object Int32Array]"]=N3["[object Uint8Array]"]=N3["[object Uint8ClampedArray]"]=N3["[object Uint16Array]"]=N3["[object Uint32Array]"]=!0,N3["[object Arguments]"]=N3["[object Array]"]=N3["[object ArrayBuffer]"]=N3["[object Boolean]"]=N3["[object DataView]"]=N3["[object Date]"]=N3["[object Error]"]=N3["[object Function]"]=N3["[object Map]"]=N3["[object Number]"]=N3["[object Object]"]=N3["[object RegExp]"]=N3["[object Set]"]=N3["[object String]"]=N3["[object WeakMap]"]=!1;var j3,Xs="object"==typeof y&&y&&!y.nodeType&&y,L3=Xs&&"object"==typeof module&&module&&!module.nodeType&&module,C3=L3&&L3.exports===Xs&&no.process,Fs=function(){try{var t=L3&&L3.require&&L3.require("util").types;return t?t:C3&&C3.binding&&C3.binding("util")}catch(t){}}(),Js=Fs&&Fs.isTypedArray,F3=Js?(j3=Js,function(t){return j3(t)}):function(t){return d3(t)&&M3(t.length)&&!!N3[h3(t)]},B3=Object.prototype.hasOwnProperty;function I3(t,e){var n,r,i,a,o=p3(t),s=!o&&T3(t),l=!o&&!s&&P3(t),c=!o&&!s&&!l&&F3(t),u=o||s||l||c,f=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(n in t)!e&&!B3.call(t,n)||u&&("length"==n||l&&("offset"==n||"parent"==n)||c&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(a=void 0,a=typeof(r=n),(i=null==(i=h)?9007199254740991:i)&&("number"==a||"symbol"!=a&&k3.test(r))&&-1<r&&r%1==0&&r<i))||f.push(n);return f}R3=Object.keys,D3=Object;var R3,D3,z3=function(t){return R3(D3(t))},G3=Object.prototype.hasOwnProperty;function W3(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||_3))return z3(t);var e,n,r,i=[];for(r in Object(t))G3.call(t,r)&&"constructor"!=r&&i.push(r);return i}function V3(t){return(O3(t)?I3:W3)(t)}var H3,q3=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[H3?o:++r];if(!1===e(i[s],s,i))break}return t};U3=function(t,e){return t&&q3(t,e,V3)};function Y3(t,e){if(null!=t){if(!O3(t))return U3(t,e);for(var n=t.length,r=X3?n:-1,i=Object(t);(X3?r--:++r<n)&&!1!==e(i[r],r,i););}return t}var U3,X3;function K3(t,e){(p3(t)?x3:Y3)(t,"function"==typeof(t=e)?t:y3)}function $3(t,e,n){return e<=t&&t<=n}function Z3(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function J3(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var a,o,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(o=u,((s=[e,n])[0]-(a=c)[0])*(o[1]-a[1])==(o[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],o[0])<=s[0]&&s[0]<=Math.max(a[0],o[0])&&Math.min(a[1],o[1])<=s[1]&&s[1]<=Math.max(a[1],o[1]))return 1;0<Z3(c[1]-n)!=0<Z3(u[1]-n)&&Z3(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}}function Q3(t){for(var e,n,r=[],i=t.length,a=0;a<i-1;a++){var o=t[a],s=t[a+1];r.push({from:{x:o[0],y:o[1]},to:{x:s[0],y:s[1]}})}return 1<r.length&&(e=t[0],n=t[i-1],r.push({from:{x:n[0],y:n[1]},to:{x:e[0],y:e[1]}})),r}function tM(t,c){var u=!1;return K3(t,function(t){if(e=t.from,t=t.to,n=c.from,r=c.to,i=n.x-e.x,a=n.y-e.y,o=t.x-e.x,t=t.y-e.y,s=r.x-n.x,r=r.y-n.y,l=null,l=.001*(o*o+t*t)*(s*s+r*r)<(n=o*r-t*s)*n&&$3(r=(i*r-a*s)/n,0,1)&&$3((i*t-a*o)/n,0,1)?{x:e.x+r*o,y:e.y+r*t}:l)return!(u=!0);var e,n,r,i,a,o,s,l}),u}function eM(t){var e=t.map(function(t){return t[0]}),t=t.map(function(t){return t[1]});return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,t),maxY:Math.max.apply(null,t)}}function nM(t){var{min:t,max:e}=t.getRenderBounds(),[t,n]=t,[e,r]=e;return[[t,n],[t,r],[e,r],[e,n]]}function rM(t){return t.style.priority||0}const iM=()=>(n,t)=>{var r=[];n.sort((t,e)=>_u(rM(t),rM(e)));for(let t=0;t<n.length;t++){var i=n[t];let e=!(i.style.visibility="visible");for(let t=0;t<r.length;t++){var a=r[t];if(function(e,n){if(!(e.length<2||n.length<2)){var r,i,a,t=eM(e),o=eM(n);if(t=t,!((o=o).minX>t.maxX||o.maxX<t.minX||o.minY>t.maxY||o.maxY<t.minY))return r=!1,K3(n,function(t){if(J3(e,t[0],t[1]))return!(r=!0)}),r?1:(K3(e,function(t){if(J3(n,t[0],t[1]))return!(r=!0)}),r||(i=Q3(e),o=Q3(n),a=!1,K3(o,function(t){if(tM(i,t))return!(a=!0)}),a))}}(nM(i),nM(a))){i.style.visibility="hidden",e=!0;break}}e||r.push(i)}return n};function aM(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const oM=t=>{const{maxIter:w=10,maxError:M=.1,padding:O=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[y,g]=aM(),[v,m]=aM();var a,o,s,l,[c,t]=aM(),[u,n]=aM();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,y]=r;var[r,f]=f;g(b,y),m(b,y),t(b,f-y),n(b,[x,r])}for(let t=0;t<w;t++){i.sort((t,e)=>_u(v(t),v(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const y=v(h);var d=c(h),p=v(e),d=p-(y+d);d<O&&(d=(O-d)/2,r=Math.max(r,d),m(h,y-d),m(e,p+d))}}if(r<M)break}for(const k of i)k.style.y+=v(k)-y(k)}return i}},sM=t=>{const{edgeDistance:i=0}=t;return(t,e)=>{if(gf(e)){var{x:n,width:r}=e.getOptions();const a=e.getCenter();e=ah(i,r);const o=n+e,s=n+r-e;t.forEach(t=>{var{x:e,x0:n,y0:r}=t.style,e=e<=a[0]?o-e:s-e,{x:e,y:i}=(t.style.x+=e,t.style),n=Ey([n,r],a),r=Ey([0,i],a),i=n[1]?n[0]*r[1]/n[1]+a[0]:e;t.style.connectorPoints=[[i-e,0]]})}return t}},lM=t=>(t,e)=>{if(gf(e)){const a=e.getCenter(),o=t.reduce((t,e)=>{var{x0:e,y0:n,offset:r=0}=e.style;return Math.max(t,Ay(a,[e,n])+r)},0);t.forEach(t=>{var{x0:e,y0:n,connector:r,connectorLength2:i=0}=t.style,e=Py([e-a[0],n-a[1]]),n=r?i*(Math.sin(e)<0?-1:1):0,r=a[0]+Math.sin(e)*o,i=a[1]-Math.cos(e)*o;t.style.x=r+n,t.style.y=i,t.style.connectorPoints=[[-n,0]]})}return t};var P=1e-6,cM=1e-12,A=Math.PI,uM=A/2,fM=A/4,hM=2*A,dM=180/A,pM=A/180,yM=Math.abs,gM=Math.atan,vM=Math.atan2,T=Math.cos,mM=Math.ceil,bM=Math.exp,xM=Math.log,kM=Math.pow,N=Math.sin,wM=Math.sign||function(t){return 0<t?1:t<0?-1:0},MM=Math.sqrt,OM=Math.tan;function _M(t){return 1<t?0:t<-1?A:Math.acos(t)}function SM(t){return 1<t?uM:t<-1?-uM:Math.asin(t)}function EM(){}function AM(t,e){t&&PM.hasOwnProperty(t.type)&&PM[t.type](t,e)}var TM={Feature:function(t,e){AM(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)AM(n[r].geometry,e)}},PM={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){NM(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)NM(n[r],e,0)},Polygon:function(t,e){jM(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)jM(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)AM(n[r],e)}};function NM(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function jM(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)NM(t[n],e,1);e.polygonEnd()}function LM(t,e){t&&TM.hasOwnProperty(t.type)?TM[t.type](t,e):AM(t,e)}function CM(t){return[vM(t[1],t[0]),SM(t[2])]}function FM(t){var e=t[0],t=t[1],n=T(t);return[n*T(e),n*N(e),N(t)]}function BM(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function IM(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function RM(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function DM(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function zM(t){var e=MM(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function GM(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function WM(t,e){return[yM(t)>A?t+Math.round(-t/hM)*hM:t,e]}function VM(t,e,n){return(t%=hM)?e||n?GM(qM(t),YM(e,n)):qM(t):e||n?YM(e,n):WM}function HM(n){return function(t,e){return[A<(t+=n)?t-hM:t<-A?t+hM:t,e]}}function qM(t){var e=HM(t);return e.invert=HM(-t),e}function YM(t,e){var i=T(t),a=N(t),o=T(e),s=N(e);function n(t,e){var n=T(e),r=T(t)*n,t=N(t)*n,n=N(e),e=n*i+r*a;return[vM(t*o-e*s,r*i-n*a),SM(e*o+t*s)]}return n.invert=function(t,e){var n=T(e),r=T(t)*n,t=N(t)*n,n=N(e),e=n*o-t*s;return[vM(t*o+n*s,r*i+e*a),SM(e*i-r*a)]},n}function UM(t,e){(e=FM(e))[0]-=t,zM(e);t=_M(-e[1]);return((-e[2]<0?-t:t)+hM-P)%hM}function XM(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:EM,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function KM(t,e){return yM(t[0]-e[0])<P&&yM(t[1]-e[1])<P}function $M(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function ZM(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(KM(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*P}s.push(n=new $M(r,t,null,!0)),l.push(n.o=new $M(r,null,n,!1)),s.push(n=new $M(i,t,null,!1)),l.push(n.o=new $M(i,null,n,!0))}}),s.length){for(l.sort(e),JM(s),JM(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function JM(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function QM(t){return yM(t[0])<=A?t[0]:wM(t[0])*((yM(t[0])+A)%hM-A)}function t4(g,v,m,b){return function(s){var l,c,u,n=v(s),f=XM(),h=v(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=y,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=sf(c);var t=function(t,e){var n=QM(e),r=e[1],e=N(r),i=[N(n),-T(n),0],a=0,o=0,s=new Cu;1===e?r=uM+P:-1===e&&(r=-uM-P);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=QM(h),p=h[1]/2+fM,y=N(p),g=T(p),v=0;v<f;++v,d=b,y=k,g=x,h=m){var m=u[v],b=QM(m),x=m[1]/2+fM,k=N(x),x=T(x),w=b-d,M=0<=w?1:-1,O=M*w,_=A<O,S=y*k;s.add(vM(S*M*N(O),g*x+S*T(O))),a+=_?w+M*hM:w,_^n<=d^n<=b&&(zM(S=IM(FM(h),FM(m))),zM(O=IM(i,S)),(M=(_^0<=w?-1:1)*SM(O[2]))<r||r===M&&(S[0]||S[1]))&&(o+=_^0<=w?1:-1)}return(a<-P||a<P&&s<-cM)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),ZM(c,n4,t,m,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),m(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),m(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){g(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function y(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(e4))}return e}}function e4(t){return 1<t.length}function n4(t,e){return((t=t.x)[0]<0?t[1]-uM-P:uM-t[1])-((e=e.x)[0]<0?e[1]-uM-P:uM-e[1])}WM.invert=WM;var r4=t4(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?A:-A,l=yM(t-f);yM(l-A)<P?(c.point(f,h=0<(h+e)/2?uM:-uM),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&A<=l&&(yM(f-d)<P&&(f-=d*P),yM(t-s)<P&&(t-=s*P),l=h,i=e,o=N((n=f)-(r=t)),h=yM(o)>P?gM((N(l)*(a=T(i))*N(r)-N(i)*(r=T(l))*N(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*uM,r.point(-A,i),r.point(0,i),r.point(A,i),r.point(A,0),r.point(A,-i),r.point(0,-i),r.point(-A,-i),r.point(-A,0),r.point(-A,i)):yM(t[0]-e[0])>P?(t=t[0]<e[0]?A:-A,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-A,-uM]);function i4(d){var y=T(d),p=6*pM,f=0<y,h=yM(y)>P;function g(t,e){return T(t)*T(e)>y}function v(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=IM(FM(t),FM(e)),h=BM(f,f),d=f[0],p=h-d*d;return p?(r=IM(u,f),RM(u=DM(u,y*h/p),DM(f,-y*d/p)),(p=(f=BM(u,h=r))*f-(d=BM(h,h))*(BM(u,u)-1))<0?void 0:(RM(p=DM(h,(-f-(r=MM(p)))/d),u),p=CM(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=yM((s=a-i)-A)<P)&&e<o&&(c=o,o=e,e=c),(l||s<P?l?0<o+e^p[1]<(yM(p[0]-i)<P?o:e):o<=p[1]&&p[1]<=e:A<s^(i<=p[0]&&p[0]<=a))?(RM(c=DM(h,(-f+r)/d),u),[p,CM(c)]):void 0):p)):!n&&t}function m(t,e){var n=f?d:A-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return t4(g,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=g(t,e),t=f?i?0:m(t,e):i?m(t+(t<0?A:-A),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=v(o,r))&&!KM(o,n)&&!KM(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=v(r,o),a.point(n[0],n[1])):(n=v(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=v(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&KM(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=T(r),c=N(r),u=o*a;null==n?(n=r+o*hM,s=r-u/2):(n=UM(l,n),s=UM(l,s),(0<o?n<s:s<n)&&(n+=o*hM));for(var f,h=n;0<o?s<h:h<s;h-=u)f=CM([l,-c*T(h),-c*N(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-A,d-A])}var a4=1e9,o4=-a4;function s4(v,m,b,x){function k(t,e){return v<=t&&t<=b&&m<=e&&e<=x}function w(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?v:b,1<i?x:m),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return yM(t[0]-v)<P?0<e?0:3:yM(t[0]-b)<P?0<e?2:1:yM(t[1]-m)<P?0<e?1:0:0<e?3:2}function M(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,y=r,t=XM(),e={point:n,lineStart:function(){e.point=g,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(g(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&y.lineEnd()},polygonStart:function(){y=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(v-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(v-r)&&--t;return t}(),e=p&&t,n=(i=sf(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),w(null,null,1,r),r.lineEnd()),n&&ZM(i,M,t,w,r),r.polygonEnd());y=r,i=f=a=null}};function n(t,e){k(t,e)&&y.point(t,e)}function g(t,e){var n,r,i=k(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(y.lineStart(),y.point(t,e))):i&&h?y.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(o4,Math.min(a4,c)),u=Math.max(o4,Math.min(a4,u))],r=[t=Math.max(o4,Math.min(a4,t)),e=Math.max(o4,Math.min(a4,e))],v,m,b,x)?i&&(y.lineStart(),y.point(t,e),p=!1):(h||(y.lineStart(),y.point(n[0],n[1])),y.point(r[0],r[1]),i||y.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function l4(t,e,n){var r=lf(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function c4(t,e,n){var r=lf(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function u4(){return y=p=10,g=90,v=360,m=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(m)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(m)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(g=+t[0],v=+t[1],e):[g,v]},e.stepMinor=function(t){return arguments.length?(p=+t[0],y=+t[1],e):[p,y]},e.precision=function(t){return arguments.length?(m=+t,u=l4(s,o,90),f=c4(r,n,m),h=l4(c,l,90),d=c4(a,i,m),e):m},e.extentMajor([[-180,-90+P],[180,90-P]]).extentMinor([[-180,-80-P],[180,80+P]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return lf(mM(a/g)*g,i,g).map(h).concat(lf(mM(c/v)*v,l,v).map(d)).concat(lf(mM(r/p)*p,n,p).filter(function(t){return yM(t%g)>P}).map(u)).concat(lf(mM(s/y)*y,o,y).filter(function(t){return yM(t%v)>P}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,y,g,v,m}var f4,h4,d4,p4,y4=t=>t,g4=new Cu,v4=new Cu,m4={point:EM,lineStart:EM,lineEnd:EM,polygonStart:function(){m4.lineStart=b4,m4.lineEnd=w4},polygonEnd:function(){m4.lineStart=m4.lineEnd=m4.point=EM,g4.add(yM(v4)),v4=new Cu},result:function(){var t=g4/2;return g4=new Cu,t}};function b4(){m4.point=x4}function x4(t,e){m4.point=k4,f4=d4=t,h4=p4=e}function k4(t,e){v4.add(p4*t-d4*e),d4=t,p4=e}function w4(){k4(f4,h4)}var M4=m4,O4=1/0,_4=O4,S4=-O4,E4=S4;var A4,T4,P4,N4,j4={point:function(t,e){t<O4&&(O4=t);S4<t&&(S4=t);e<_4&&(_4=e);E4<e&&(E4=e)},lineStart:EM,lineEnd:EM,polygonStart:EM,polygonEnd:EM,result:function(){var t=[[O4,_4],[S4,E4]];return S4=E4=-(_4=O4=1/0),t}},L4=0,C4=0,F4=0,B4=0,I4=0,R4=0,D4=0,z4=0,G4=0,W4={point:V4,lineStart:H4,lineEnd:U4,polygonStart:function(){W4.lineStart=X4,W4.lineEnd=K4},polygonEnd:function(){W4.point=V4,W4.lineStart=H4,W4.lineEnd=U4},result:function(){var t=G4?[D4/G4,z4/G4]:R4?[B4/R4,I4/R4]:F4?[L4/F4,C4/F4]:[NaN,NaN];return L4=C4=F4=B4=I4=R4=D4=z4=G4=0,t}};function V4(t,e){L4+=t,C4+=e,++F4}function H4(){W4.point=q4}function q4(t,e){W4.point=Y4,V4(P4=t,N4=e)}function Y4(t,e){var n=t-P4,r=e-N4,n=MM(n*n+r*r);B4+=n*(P4+t)/2,I4+=n*(N4+e)/2,R4+=n,V4(P4=t,N4=e)}function U4(){W4.point=V4}function X4(){W4.point=$4}function K4(){Z4(A4,T4)}function $4(t,e){W4.point=Z4,V4(A4=P4=t,T4=N4=e)}function Z4(t,e){var n=t-P4,r=e-N4,n=MM(n*n+r*r);B4+=n*(P4+t)/2,I4+=n*(N4+e)/2,R4+=n,D4+=(n=N4*t-P4*e)*(P4+t),z4+=n*(N4+e),G4+=3*n,V4(P4=t,N4=e)}var J4=W4;function Q4(t){this._context=t}Q4.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,hM)}},result:EM};var t6,e6,n6,r6,i6,a6=new Cu,o6={point:EM,lineStart:function(){o6.point=s6},lineEnd:function(){t6&&l6(e6,n6),o6.point=EM},polygonStart:function(){t6=!0},polygonEnd:function(){t6=null},result:function(){var t=+a6;return a6=new Cu,t}};function s6(t,e){o6.point=l6,e6=r6=t,n6=i6=e}function l6(t,e){r6-=t,i6-=e,a6.add(MM(r6*r6+i6*i6)),r6=t,i6=e}var c6=o6;function u6(){this._string=[]}function f6(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function h6(e,n){var r,i,a=4.5;function o(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),LM(t,r(i))),i.result()}return o.area=function(t){return LM(t,r(M4)),M4.result()},o.measure=function(t){return LM(t,r(c6)),c6.result()},o.bounds=function(t){return LM(t,r(j4)),j4.result()},o.centroid=function(t){return LM(t,r(J4)),J4.result()},o.projection=function(t){return arguments.length?(r=null==t?(e=null,y4):(e=t).stream,o):e},o.context=function(t){return arguments.length?(i=null==t?(n=null,new u6):new Q4(n=t),"function"!=typeof a&&i.pointRadius(a),o):n},o.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),o):a},o.projection(e).context(n)}function d6(r){return function(t){var e,n=new p6;for(e in r)n[e]=r[e];return n.stream=t,n}}function p6(){}function y6(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),LM(n,t.stream(j4)),e(j4.result()),null!=r&&t.clipExtent(r),t}function g6(i,a,t){return y6(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function v6(t,e,n){return g6(t,[[0,0],e],n)}function m6(r,i,t){return y6(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function b6(i,a,t){return y6(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}u6.prototype={_radius:4.5,_circle:f6(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=f6(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){var t;return this._string.length?(t=this._string.join(""),this._string=[],t):null}},p6.prototype={constructor:p6,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var x6=16,k6=T(30*pM);function w6(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,y={point:t,lineStart:e,lineEnd:v,polygonStart:function(){r.polygonStart(),y.lineStart=m},polygonEnd:function(){r.polygonEnd(),y.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,y.point=g,r.lineStart()}function g(t,e){var n=FM([t,e]),e=E(t,e);T(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],x6,r),r.point(u,f)}function v(){y.point=t,r.lineEnd()}function m(){e(),y.point=b,y.lineEnd=x}function b(t,e){g(n=t,e),i=u,a=f,o=h,s=d,l=p,y.point=g}function x(){T(u,f,c,h,d,p,i,a,n,o,s,l,x6,r),y.lineEnd=v,v()}return y}):(n=t,d6({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function T(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,y,g,v,m,b,x,k,w,M,O=o-t,_=s-e,S=O*O+_*_;4*A<S&&h--&&(g=a+f,x=SM(g/=v=MM((p=r+c)*p+(y=i+u)*y+g*g)),m=yM(yM(g)-1)<P||yM(n-l)<P?(n+l)/2:vM(y,p),b=(x=E(m,x))[0],x=x[1],A<(M=_*(k=b-t)-O*(w=x-e))*M/S||.3<yM((O*k+_*w)/S-.5)||r*c+i*u+a*f<k6)&&(T(t,e,n,r,i,a,b,x,m,p/=v,y/=v,g,h,d),d.point(b,x),T(b,x,m,p,y,g,o,s,l,c,u,f,h,d))}}var M6=d6({point:function(t,e){this.stream.point(t*pM,e*pM)}});function O6(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,y,g,v;return e?(f=T(e),e=N(e),h=f*t,d=e*t,p=f/t,y=e/t,g=(e*r-f*n)/t,v=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-y*e+g),a*(v-y*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,m.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},m);function m(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function _6(t){return S6(function(){return t})()}function S6(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,y=0,g=0,v=0,m=0,b=0,x=1,k=1,w=null,M=r4,O=null,_=y4,S=.5;function E(t){return l(t[0]*pM,t[1]*pM)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*dM,t[1]*dM]}function T(){var t=O6(f,0,0,x,k,b).apply(null,e(p,y)),t=O6(f,h-t[0],d-t[1],x,k,b);return r=VM(g,v,m),s=GM(e,t),l=GM(r,s),o=w6(s,S),P()}function P(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=M6((n=r,d6({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(M(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(M=t,w=void 0,P()):M},E.postclip=function(t){return arguments.length?(_=t,O=n=i=a=null,P()):_},E.clipAngle=function(t){return arguments.length?(M=+t?i4(w=t*pM):(w=null,r4),P()):w*dM},E.clipExtent=function(t){return arguments.length?(_=null==t?(O=n=i=a=null,y4):s4(O=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),P()):null==O?null:[[O,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,T()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],T()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*pM,y=t[1]%360*pM,T()):[p*dM,y*dM]},E.rotate=function(t){return arguments.length?(g=t[0]%360*pM,v=t[1]%360*pM,m=2<t.length?t[2]%360*pM:0,T()):[g*dM,v*dM,m*dM]},E.angle=function(t){return arguments.length?(b=t%360*pM,T()):b*dM},E.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},E.reflectY=function(t){return arguments.length?(k=t?-1:1,T()):k<0},E.precision=function(t){return arguments.length?(o=w6(s,S=t*t),P()):MM(S)},E.fitExtent=function(t,e){return g6(E,t,e)},E.fitSize=function(t,e){return v6(E,t,e)},E.fitWidth=function(t,e){return m6(E,t,e)},E.fitHeight=function(t,e){return b6(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,T()}}function E6(t){var e=0,n=A/3,r=S6(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*pM,n=t[1]*pM):[e*dM,n*dM]},t}function A6(t,e){var n,r,i,a=N(t),o=(a+N(e))/2;return yM(o)<P?(n=T(t),s.invert=function(t,e){return[t/n,SM(e*n)]},s):(i=MM(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=vM(t,yM(e))*wM(e);return e*o<0&&(n-=A*wM(t)*wM(e)),[n/o,SM((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,N(e)/n]}function l(t,e){e=MM(r-2*o*N(e))/o;return[e*N(t*=o),i-e*T(t)]}}function T6(){return E6(A6).scale(155.424).center([0,33.6442])}function P6(){return T6().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function N6(i){return function(t,e){var n=T(t),r=T(e),n=i(n*r);return n===1/0?[2,0]:[n*r*N(t),n*N(e)]}}function j6(a){return function(t,e){var n=MM(t*t+e*e),r=a(n),i=N(r),r=T(r);return[vM(t*i,n*r),SM(n&&e*i/n)]}}var L6=N6(function(t){return MM(2/(1+t))});L6.invert=j6(function(t){return 2*SM(t/2)});var C6=N6(function(t){return(t=_M(t))&&t/N(t)});function F6(t,e){return[t,xM(OM((uM+e)/2))]}function B6(r){var i,a,o,s=_6(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=A*l(),n=s((e=VM((e=s.rotate())[0]*pM,e[1]*pM,2<e.length?e[2]*pM:0),function(t){return(t=e.invert(t[0]*pM,t[1]*pM))[0]*=dM,t[1]*=dM,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===F6?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function I6(t){return OM((uM+t)/2)}function R6(t,e){var n=T(t),i=t===e?N(t):xM(n/T(e))/xM(I6(e)/I6(t)),a=n*kM(I6(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=wM(i)*MM(t*t+e*e),r=vM(t,yM(e))*wM(e);return e*i<0&&(r-=A*wM(t)*wM(e)),[r/i,2*gM(kM(a/n,1/i))-uM]},r):F6;function r(t,e){0<a?e<-uM+P&&(e=-uM+P):uM-P<e&&(e=uM-P);e=a/kM(I6(e),i);return[e*N(i*t),a-e*T(i*t)]}}function D6(t,e){return[t,e]}function z6(t,e){var n=T(t),r=t===e?N(t):(n-T(e))/(e-t),i=n/r+t;return yM(r)<P?D6:(a.invert=function(t,e){var e=i-e,n=vM(t,yM(e))*wM(e);return e*r<0&&(n-=A*wM(t)*wM(e)),[n/r,i-wM(r)*MM(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*N(t),i-e*T(t)]}}C6.invert=j6(function(t){return t}),F6.invert=function(t,e){return[t,2*gM(bM(e))-uM]},D6.invert=D6;var G6=1.340264,W6=-.081106,V6=893e-6,H6=.003796,q6=MM(3)/2;function Y6(t,e){var e=SM(q6*N(e)),n=e*e,r=n*n*n;return[t*T(e)/(q6*(G6+3*W6*n+r*(7*V6+9*H6*n))),e*(G6+W6*n+r*(V6+H6*n))]}function U6(t,e){var n=T(e),r=T(t)*n;return[n*N(t)/r,N(e)/r]}function X6(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function K6(t,e){return[T(e)*N(t),N(e)]}function $6(t,e){var n=T(e),r=1+T(t)*n;return[n*N(t)/r,N(e)/r]}function Z6(t,e){return[xM(OM((uM+e)/2)),-t]}Y6.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(G6+W6*i+a*(V6+H6*i))-e)/(G6+3*W6*i+a*(7*V6+9*H6*i)))*r)*i*i,!(yM(n)<cM));++o);return[q6*t*(G6+3*W6*i+a*(7*V6+9*H6*i))/T(r),SM(N(r)/q6)]},U6.invert=j6(gM),X6.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),yM(a)>P&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},K6.invert=j6(SM),$6.invert=j6(function(t){return 2*gM(t)}),Z6.invert=function(t,e){return[-e,2*gM(bM(t))-uM]};var J6=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=P6(),l=T6().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=T6().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+P,r+.12*e+P],[n-.214*e-P,r+.234*e-P]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+P,r+.166*e+P],[n-.115*e-P,r+.234*e-P]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return g6(f,t,e)},f.fitSize=function(t,e){return v6(f,t,e)},f.fitWidth=function(t,e){return m6(f,t,e)},f.fitHeight=function(t,e){return b6(f,t,e)},f.scale(1070)},geoAlbers:P6,geoAzimuthalEqualArea:function(){return _6(L6).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:L6,geoAzimuthalEquidistant:function(){return _6(C6).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:C6,geoConicConformal:function(){return E6(R6).scale(109.5).parallels([30,30])},geoConicConformalRaw:R6,geoConicEqualArea:T6,geoConicEqualAreaRaw:A6,geoConicEquidistant:function(){return E6(z6).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:z6,geoEqualEarth:function(){return _6(Y6).scale(177.158)},geoEqualEarthRaw:Y6,geoEquirectangular:function(){return _6(D6).scale(152.63)},geoEquirectangularRaw:D6,geoGnomonic:function(){return _6(U6).scale(144.049).clipAngle(60)},geoGnomonicRaw:U6,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,y=1,g=1,v=d6({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),m=y4;function b(){return y=l*f,g=l*h,o=s=null,x}function x(t){var e,n=t[0]*y,t=t[1]*g;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/y,t/g]},x.stream=function(t){return o&&s===t?o:o=v(m(s=t))},x.postclip=function(t){return arguments.length?(m=t,p=e=n=a=null,b()):m},x.clipExtent=function(t){return arguments.length?(m=null==t?(p=e=n=a=null,y4):s4(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=N(d=t%360*pM),r=T(d),b()):d*dM},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return g6(x,t,e)},x.fitSize=function(t,e){return v6(x,t,e)},x.fitWidth=function(t,e){return m6(x,t,e)},x.fitHeight=function(t,e){return b6(x,t,e)},x},geoProjection:_6,geoProjectionMutator:S6,geoMercator:function(){return B6(F6).scale(961/hM)},geoMercatorRaw:F6,geoNaturalEarth1:function(){return _6(X6).scale(175.295)},geoNaturalEarth1Raw:X6,geoOrthographic:function(){return _6(K6).scale(249.5).clipAngle(90+P)},geoOrthographicRaw:K6,geoStereographic:function(){return _6($6).scale(250).clipAngle(142)},geoStereographicRaw:$6,geoTransverseMercator:function(){var t=B6(Z6),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:Z6});function Q6(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function tO(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(nO),e.find(t=>t.sphere)?{type:"Sphere"}:Q6(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=h6(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function eO(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[u4()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function nO(t){return"geoPath"===t.type}var rO,Ao=()=>t=>{var{children:e,projection:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=Z(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Fl(t);if(e=J6[e])return e;throw new Error("Unknown projection: "+t)}(r),p=e.map(eO);let y;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinates:[{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(tO(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);y=h6(i);const u=new V0({domain:[t,t+n]}),f=new V0({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}}],children:p.flatMap(t=>{return nO(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>y(t)})})):t;var e})})]},el=(Ao.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=Z(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]});el.props={};const iO={"composition.geoView":Ao,"composition.geoPath":el};function aO(){return Object.assign({"data.fetch":Ad,"data.inline":Id,"data.sortBy":Bd,"data.sort":Nd,"data.filter":Pd,"data.pick":Cd,"data.rename":Fd,"data.subset":Ld,"data.fold":Td,"data.custom":Rd,"data.map":Dd,"data.cluster":dd,"data.tree":pd,"data.sankey":Jf,"data.arc":Vd,"data.wordCloud":cp,"data.join":fp,"transform.maybeZeroY1":z5,"transform.maybeZeroX":tw,"transform.maybeStackY":J5,"transform.maybeTitle":Q5,"transform.maybeSeries":iw,"transform.maybeZeroPadding":uw,"transform.stackY":$5,"transform.binX":n3,"transform.bin":e3,"transform.dodgeX":yw,"transform.jitter":xw,"transform.jitterX":kw,"transform.symmetryY":ww,"transform.diffY":Mw,"transform.stackEnter":gw,"transform.normalizeY":vw,"transform.select":Aw,"transform.selectX":Tw,"transform.selectY":Pw,"transform.groupX":Ww,"transform.groupY":Vw,"transform.groupColor":Hw,"transform.group":Gw,"transform.maybeSize":nw,"transform.maybeZeroY":ew,"transform.maybeKey":rw,"transform.sortX":Uw,"transform.sortY":Kw,"transform.sortColor":Xw,"transform.flexX":$w,"transform.maybeTupleY":aw,"transform.maybeTupleX":ow,"transform.maybeIdentityY":sw,"transform.maybeIdentityX":lw,"transform.maybeTuple":dw,"transform.maybeVisualPosition":fw,"transform.maybeFunctionAttribute":hw,"transform.maybeGradient":pw,"transform.maybeTooltip":cw,"transform.pack":Jw,"transform.sample":r3,"transform.filter":i3,"coordinate.cartesian":Ul,"coordinate.polar":Xl,"coordinate.helix":Kl,"coordinate.transpose":$l,"coordinate.theta":tc,"coordinate.reflect":Zl,"coordinate.reflectX":Jl,"coordinate.reflectY":Ql,"coordinate.parallel":nc,"coordinate.fisheye":rc,"coordinate.fisheyeX":ic,"coordinate.fisheyeY":ac,"coordinate.radial":ec,"encode.constant":oc,"encode.field":lc,"encode.transform":sc,"encode.column":cc,"mark.interval":Mu,"mark.rect":Ou,"mark.line":bf,"mark.point":xf,"mark.text":kf,"mark.cell":wf,"mark.area":Mf,"mark.link":Of,"mark.image":_f,"mark.polygon":Sf,"mark.box":Ef,"mark.vector":Af,"mark.lineX":Pf,"mark.lineY":Tf,"mark.connector":Nf,"mark.range":Cf,"mark.rangeX":Ff,"mark.rangeY":Bf,"mark.sankey":oh,"mark.path":sh,"mark.treemap":hh,"mark.pack":dh,"mark.boxplot":wh,"mark.shape":Mh,"mark.forceGraph":fd,"mark.tree":yd,"mark.wordCloud":hp,"palette.category10":dp,"palette.category20":pp,"palette.sequentialBlue":yp,"palette.sequentialDarkBlue":gp,"palette.sequentialGreen":vp,"palette.sequentialDarkGreen":mp,"palette.sequentialGrey":bp,"palette.sequentialOrange":xp,"palette.sequentialPink":kp,"palette.sequentialRed":wp,"palette.sequentialYellow":Mp,"palette.sequentialPurple":Op,"palette.sequentialYellowOrange":_p,"palette.sequentialYellowGreen":Sp,"palette.sequentialPinkPurple":Ep,"palette.sequentialGreenBlue":Ap,"palette.divergingGreenYellow":Tp,"palette.divergingRedBlue":Pp,"palette.divergingGreenRed":Np,"palette.divergingRedPurple":jp,"scale.linear":g1,"scale.ordinal":v1,"scale.band":y1,"scale.identity":m1,"scale.point":b1,"scale.time":x1,"scale.log":k1,"scale.pow":w1,"scale.sqrt":S1,"scale.threshold":M1,"scale.quantile":O1,"scale.quantize":_1,"scale.sequential":E1,"shape.interval.rect":Hy,"shape.interval.hollow":qy,"shape.interval.funnel":Yy,"shape.interval.pyramid":Xy,"shape.rect.rect":Hy,"shape.rect.hollow":qy,"shape.cell.cell":Hy,"shape.cell.hollow":qy,"shape.line.line":Jy,"shape.line.hv":tg,"shape.line.vh":eg,"shape.line.hvh":ng,"shape.line.smooth":Qy,"shape.point.bowtie":og,"shape.point.cross":sg,"shape.point.diamond":lg,"shape.point.hexagon":cg,"shape.point.hollowBowtie":ug,"shape.point.hollowDiamond":fg,"shape.point.hollowHexagon":hg,"shape.point.hollow":dg,"shape.point.hollowSquare":pg,"shape.point.hollowTriangle":yg,"shape.point.hollowTriangleDown":gg,"shape.point.hyphen":vg,"shape.point.line":mg,"shape.point.plus":bg,"shape.point.point":xg,"shape.point.square":kg,"shape.point.tick":wg,"shape.point.triangle":Mg,"shape.point.triangleDown":Og,"shape.text.text":W2,"shape.area.area":U2,"shape.area.smooth":X2,"shape.area.step":K2,"shape.link.smooth":Z2,"shape.link.vhv":J2,"shape.link.arc":Q2,"shape.link.link":$2,"shape.image.image":tx,"shape.polygon.polygon":ex,"shape.polygon.ribbon":nx,"shape.box.box":rx,"shape.vector.vector":_g,"shape.label.label":gx,"shape.text.badge":H2,"shape.lineX.line":ix,"shape.lineY.line":ix,"shape.shape.shape":xx,"shape.connector.connector":sx,"shape.range.range":Hy,"shape.rangeX.range":Hy,"shape.rangeY.range":Hy,"shape.path.path":mx,"shape.path.hollow":bx,"theme.light":wx,"theme.dark":Ox,"component.axisX":Yx,"component.axisY":Ux,"component.legendCategory":Xx,"component.legendContinuous":Kx,"component.title":Zx,"component.sliderX":Qx,"component.sliderY":tk,"animation.scaleInX":ok,"animation.scaleOutX":sk,"animation.scaleInY":lk,"animation.scaleOutY":ck,"animation.waveIn":vk,"animation.fadeIn":uk,"animation.fadeOut":fk,"animation.zoomIn":mk,"animation.zoomOut":bk,"animation.pathIn":xk,"animation.morphing":gk,"animation.growInX":kk,"animation.growInY":wk,"interaction.elementHighlight":Ck,"interaction.elementHighlightByX":Fk,"interaction.elementHighlightByColor":Bk,"interaction.elementSelect":Rk,"interaction.elementSelectByX":Dk,"interaction.elementSelectByColor":zk,"interaction.fisheye":Wk,"interaction.chartIndex":Gk,"interaction.tooltip":Jk,"interaction.legendFilter":a5,"composition.spaceLayer":c5,"composition.spaceFlex":u5,"composition.mark":h5,"composition.view":f5,"composition.facetRect":w5,"composition.repeatMatrix":S5,"composition.facetCircle":j5,"composition.timingKeyframe":L5,"labelTransform.hideOverlap":iM,"labelTransform.dodgeY":oM,"labelTransform.spider":sM,"labelTransform.surround":lM},iO)}function oO(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}function sO(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||eh("Unknown Component: "+t)};return[t=>{var e=t["type"],t=Z(t,["type"]);return r(e)(Object.assign({},t))},r]}function f(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}(tl=rO=rO||{}).BEFORE_RENDER="beforerender",tl.AFTER_RENDER="afterrender",tl.BEFORE_PAINT="beforepaint",tl.AFTER_PAINT="afterpaint",tl.BEFORE_CHANGE_DATA="beforechangedata",tl.AFTER_CHANGE_DATA="afterchangedata",tl.BEFORE_CLEAR="beforeclear",tl.AFTER_CLEAR="afterclear",tl.BEFORE_DESTROY="beforedestroy",tl.AFTER_DESTROY="afterdestroy",tl.BEFORE_CHANGE_SIZE="beforechangesize",tl.AFTER_CHANGE_SIZE="afterchangesize";ol=f("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),to=f("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Au=f("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),e=f("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),n=f("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Ys=f("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Zs=f("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Bs=f("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),$s=f("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),s2=f("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function lO(t,e,n){(t.prototype=e.prototype=n).constructor=t}function cO(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function uO(){}var fO=1/.7,Ks="\\s*([+-]?\\d+)\\s*",r="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Us="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hO=/^#([0-9a-f]{3,8})$/,dO=new RegExp(`^rgb\\(${Ks},${Ks},${Ks}\\)$`),pO=new RegExp(`^rgb\\(${Us},${Us},${Us}\\)$`),yO=new RegExp(`^rgba\\(${Ks},${Ks},${Ks},${r}\\)$`),gO=new RegExp(`^rgba\\(${Us},${Us},${Us},${r}\\)$`),vO=new RegExp(`^hsl\\(${r},${Us},${Us}\\)$`),mO=new RegExp(`^hsla\\(${r},${Us},${Us},${r}\\)$`),bO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function xO(){return this.rgb().formatHex()}function kO(){return this.rgb().formatRgb()}function wO(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=hO.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?MO(e):3===n?new EO(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?OO(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?OO(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=dO.exec(t))?new EO(e[1],e[2],e[3],1):(e=pO.exec(t))?new EO(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=yO.exec(t))?OO(e[1],e[2],e[3],e[4]):(e=gO.exec(t))?OO(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=vO.exec(t))?LO(e[1],e[2]/100,e[3]/100,1):(e=mO.exec(t))?LO(e[1],e[2]/100,e[3]/100,e[4]):bO.hasOwnProperty(t)?MO(bO[t]):"transparent"===t?new EO(NaN,NaN,NaN,0):null}function MO(t){return new EO(t>>16&255,t>>8&255,255&t,1)}function OO(t,e,n,r){return new EO(t=r<=0?e=n=NaN:t,e,n,r)}function _O(t){return(t=t instanceof uO?t:wO(t))?new EO((t=t.rgb()).r,t.g,t.b,t.opacity):new EO}function SO(t,e,n,r){return 1===arguments.length?_O(t):new EO(t,e,n,null==r?1:r)}function EO(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function AO(){return"#"+jO(this.r)+jO(this.g)+jO(this.b)}function TO(){var t=PO(this.opacity);return(1===t?"rgb(":"rgba(")+NO(this.r)+`, ${NO(this.g)}, `+NO(this.b)+(1===t?")":`, ${t})`)}function PO(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function NO(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function jO(t){return((t=NO(t))<16?"0":"")+t.toString(16)}function LO(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new FO(t,e,n,r)}function CO(t){var e,n,r,i,a,o,s,l;return t instanceof FO?new FO(t.h,t.s,t.l,t.opacity):(t=t instanceof uO?t:wO(t))?t instanceof FO?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new FO(o,s,l,t.opacity)):new FO}function FO(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function BO(t){return(t=(t||0)%360)<0?t+360:t}function IO(t){return Math.max(0,Math.min(1,t||0))}function RO(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}lO(uO,wO,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:xO,formatHex:xO,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return CO(this).formatHsl()},formatRgb:kO,toString:kO}),lO(EO,SO,cO(uO,{brighter(t){return t=null==t?fO:Math.pow(fO,t),new EO(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new EO(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new EO(NO(this.r),NO(this.g),NO(this.b),PO(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:AO,formatHex:AO,formatHex8:function(){return"#"+jO(this.r)+jO(this.g)+jO(this.b)+jO(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:TO,toString:TO})),lO(FO,function(t,e,n,r){return 1===arguments.length?CO(t):new FO(t,e,n,null==r?1:r)},cO(uO,{brighter(t){return t=null==t?fO:Math.pow(fO,t),new FO(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new FO(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new EO(RO(240<=t?t-240:120+t,n,e),RO(t,n,e),RO(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new FO(BO(this.h),IO(this.s),IO(this.l),PO(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=PO(this.opacity);return(1===t?"hsl(":"hsla(")+BO(this.h)+`, ${100*IO(this.s)}%, ${100*IO(this.l)}%`+(1===t?")":`, ${t})`)}}));const DO=Math.PI/180,zO=180/Math.PI;var GO=1.78277,WO=-.29227,VO=-.90649,HO=1.97294,qO=HO*VO,YO=HO*GO,UO=GO*WO- -.14861*VO;function XO(t,e,n,r){return 1===arguments.length?(i=t)instanceof KO?new KO(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof EO?i:_O(i)).r/255,o=i.g/255,l=i.b/255,l=(HO*(o-(a=(UO*l+qO*a-YO*o)/(UO+qO-YO)))-WO*(o=l-a))/VO,new KO((l=(s=Math.sqrt(l*l+o*o)/(HO*a*(1-a)))?Math.atan2(l,o)*zO-120:NaN)<0?l+360:l,s,a,i.opacity)):new KO(t,e,n,null==r?1:r);var i,a,o,s,l}function KO(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}lO(KO,XO,cO(uO,{brighter(t){return t=null==t?fO:Math.pow(fO,t),new KO(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new KO(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*DO,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new EO(255*(e+n*(-.14861*r+GO*t)),255*(e+n*(WO*r+VO*t)),255*(e+HO*r*n),this.opacity)}}));var $O=t=>()=>t;function ZO(e,n){return function(t){return e+t*n}}function JO(a){return 1==(a=+a)?QO:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):$O(isNaN(t)?e:t);var n,r,i}}function QO(t,e){var n=e-t;return n?ZO(t,n):$O(isNaN(t)?e:t)}!function t(e){var o=JO(e);function n(e,t){var n=o((e=SO(e)).r,(t=SO(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=QO(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);t8=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var t8,e8=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=SO(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=t8(r),i=t8(i),a=t8(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function n8(s){return function t(o){function e(e,t){var n=s((e=XO(e)).h,(t=XO(t)).h),r=QO(e.s,t.s),i=QO(e.l,t.l),a=QO(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}n8(function(t,e){var n=e-t;return n?ZO(t,180<n||n<-180?n-360*Math.round(n/360):n):$O(isNaN(t)?e:t)});var qa=n8(QO),a=t=>e8(t[t.length-1]),Za=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(f),$a=a(Za),Ja=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(f),i=a(Ja),Qa=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(f),eo=a(Qa),C=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(f),ro=a(C),ao=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(f),oo=a(ao),so=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(f),lo=a(so),co=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(f),io=a(co),u=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(f),Xs=a(u),no=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(f),Fs=a(no),Js=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(f),Ao=a(Js),el=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(f),tl=a(el),Ks=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(f),Us=a(Ks),r=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(f),r8=a(r),i8=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(f),a8=a(i8),o8=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(f),s8=a(o8),l8=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(f),c8=a(l8),u8=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(f),f8=a(u8),h8=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(f),d8=a(h8),p8=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(f),y8=a(p8),g8=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(f),v8=a(g8),m8=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(f),b8=a(m8),x8=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(f),k8=a(x8),w8=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(f),M8=a(w8),O8=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(f),_8=a(O8),S8=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(f),E8=a(S8),A8=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(f),T8=a(A8),P8=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(f),a=a(P8);var N8=qa(XO(300,.5,0),XO(-240,.5,1)),j8=qa(XO(-100,.75,.35),XO(80,1.5,.8)),qa=qa(XO(260,.75,.35),XO(80,1.5,.8)),L8=XO();var C8=SO(),F8=Math.PI/3,B8=2*Math.PI/3;function I8(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var R8=I8(f("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),D8=I8(f("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),z8=I8(f("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),G8=I8(f("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),W8=Object.freeze({__proto__:null,schemeCategory10:ol,schemeAccent:to,schemeDark2:Au,schemePaired:e,schemePastel1:n,schemePastel2:Ys,schemeSet1:Zs,schemeSet2:Bs,schemeSet3:$s,schemeTableau10:s2,interpolateBrBG:$a,schemeBrBG:Za,interpolatePRGn:i,schemePRGn:Ja,interpolatePiYG:eo,schemePiYG:Qa,interpolatePuOr:ro,schemePuOr:C,interpolateRdBu:oo,schemeRdBu:ao,interpolateRdGy:lo,schemeRdGy:so,interpolateRdYlBu:io,schemeRdYlBu:co,interpolateRdYlGn:Xs,schemeRdYlGn:u,interpolateSpectral:Fs,schemeSpectral:no,interpolateBuGn:Ao,schemeBuGn:Js,interpolateBuPu:tl,schemeBuPu:el,interpolateGnBu:Us,schemeGnBu:Ks,interpolateOrRd:r8,schemeOrRd:r,interpolatePuBuGn:a8,schemePuBuGn:i8,interpolatePuBu:s8,schemePuBu:o8,interpolatePuRd:c8,schemePuRd:l8,interpolateRdPu:f8,schemeRdPu:u8,interpolateYlGnBu:d8,schemeYlGnBu:h8,interpolateYlGn:y8,schemeYlGn:p8,interpolateYlOrBr:v8,schemeYlOrBr:g8,interpolateYlOrRd:b8,schemeYlOrRd:m8,interpolateBlues:k8,schemeBlues:x8,interpolateGreens:M8,schemeGreens:w8,interpolateGreys:_8,schemeGreys:O8,interpolatePurples:E8,schemePurples:S8,interpolateReds:T8,schemeReds:A8,interpolateOranges:a,schemeOranges:P8,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:N8,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return L8.h=360*t-100,L8.s=1.5-1.5*e,L8.l=.8-.9*e,L8+""},interpolateWarm:j8,interpolateCool:qa,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,C8.r=255*(e=Math.sin(t))*e,C8.g=255*(e=Math.sin(t+F8))*e,C8.b=255*(e=Math.sin(t+B8))*e,C8+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:R8,interpolateMagma:D8,interpolateInferno:z8,interpolatePlasma:G8});function V8(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function H8(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function q8(t,e,n,r,i){var a=new V0({range:[e,e+r]}),o=new V0({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function Y8(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function U8(t,e,n,r,i){return t[0]}function X8(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new V0({range:[s,t]}),c=new V0({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=V8(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function K8(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function $8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return n_.apply(void 0,r_([[-1,-1]],e,!1))}function Z8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return n_.apply(void 0,r_([[-1,1]],e,!1))}function J8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return n_.apply(void 0,r_([[1,-1]],e,!1))}function Q8(t,e,n,r,i){var a,t=t[0],o=ct();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function t_(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new V0({range:[s,s+.99*l]}),f=new V0({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=V8(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function e_(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new V0({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new H0({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var n_=function(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},r_=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i_(t){return 1/Math.tan(t)}function a_(t,e,n,r,i){var a=i_(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function o_(t,e,n,r,i){var a=i_(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function s_(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function l_(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function c_(t,e,n){return n?new V0({range:[0,1],domain:[0,e]}).map(t):t}function u_(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=c_(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[s_(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[l_(e,s,o,0,1),t]}}}function f_(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=c_(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],s_(t[1],s,o,0,1)]},untransform:function(t){return[t[0],l_(t[1],s,o,0,1)]}}}function h_(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=c_(a,r,t=void 0!==t&&t),u=c_(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[s_(e,c,s,0,1),s_(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[l_(e,c,s,0,1),l_(t,u,l,0,1)]}}}function d_(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new V0({range:[0,r]}),u=new V0({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=s_(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=l_(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var p_=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},y_=(g_.prototype.update=function(t){this.options=B({},this.options,t),this.recoordinate()},g_.prototype.clone=function(){return new g_(this.options)},g_.prototype.getOptions=function(){return this.options},g_.prototype.clear=function(){this.update({transformations:[]})},g_.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},g_.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},g_.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:p_(p_([],n,!0),[p_([],t,!0)],!1)}),this},g_.prototype.map=function(t){return this.output(t)},g_.prototype.invert=function(t){return this.input(t)},g_.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},g_.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?p_([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(p_([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||Vl,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):Vl}.apply(void 0,a)},g_.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=ct();return e&&t.reverse(),t.forEach(function(t){return ut(p,p,t)}),e&&(e=t=p,(d=new lt(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return Yt(t,t,p),[t[0],t[1]]}},g_);function g_(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:q8,translate:H8,custom:Y8,matrix:U8,polar:X8,transpose:K8,scale:n_,"shear.x":a_,"shear.y":o_,reflect:$8,"reflect.x":Z8,"reflect.y":J8,rotate:Q8,helix:t_,parallel:e_,fisheye:h_,"fisheye.x":u_,"fisheye.y":f_,"fisheye.circular":d_},this.update(t)}function v_(t){return void 0!==t.find(t=>"polar"===t.type)}function m_(t){return void 0!==t.find(t=>"helix"===t.type)}function b_(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function x_(t){return void 0!==t.find(t=>"theta"===t.type)}function k_(t){return void 0!==t.find(t=>"radial"===t.type)}function w_(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:"string"==typeof i?"linear":2<(r||i||[]).length?E_(t):void 0===r?P_(e)?E_(t):N_(e)?"time":A_(t,i):P_([r])?E_(t):N_(e)?"time":A_(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)rh(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return T_(e);case"quantile":return function(t){return T_(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)rh(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=x0,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:x_(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Fl(e),i=W8["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"sqrt":var u=S_(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return S_(n,r,i,a,o);case"sequential":return;default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function M_(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(O_)?Lu(e):t.every(__)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function O_(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function __(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function S_(t,e,n,r,i){var[i]=sO("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r,offset:a}=e;return function(t,n,r=t=>t){if(!t)return null;const e=Fl(t),i=W8["scheme"+e],a=W8["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a)||i({type:r||t})}function E_(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function A_(t,e){return"color"!==t||e?"linear":"sequential"}function T_(t){return Array.from(new Set(t.flat()))}function P_(t){return j_(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function N_(t){return j_(t,t=>t instanceof Date)}function j_(t,e){for(const n of t)if(n.some(e))return!0;return!1}function L_(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=Z(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function C_(t,i,a){return me(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=sO("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=Z(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>me(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),Qf)}([Z(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?Cy(n):[],Object.assign(Object.assign({},i),{data:n})]})}function F_(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function B_(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=Ly(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date)return;t=t.type;return rh(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"!=typeof n||void 0===(null==(e=null==e?void 0:e[0])?void 0:e[n])?"constant":"field",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function I_(t,e,n){var r=e["encode"];return r?(r=Ly(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{visual:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function R_(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=sO("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=Ly(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function D_(l,t,e){var n,r=t["encode"],i=Z(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=Z(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function z_(t,e,n){const{axis:r={},legend:i={}}=e,a=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var o="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return B(e,{scale:Object.assign(Object.assign({},Object.fromEntries(o.map(t=>[t,{guide:a(r,t)}]))),{color:{guide:a(i,"color")},size:{guide:a(i,"size")}})}),[t,e]}function G_(t,e,n){var r=e["animate"];return r||void 0===r||B(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function W_(s,l,c){return me(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return me(this,void 0,void 0,function*(){var t=c["library"],[t]=sO("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[L_,C_,F_,B_,I_,R_,D_,G_,z_,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(s,l,{library:c});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=l["channels"],a=zu(Object.entries(n).filter(([,t])=>rh(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=i.find(t=>t.name===e);return null!=n&&n.independent?t:e});var o=i.filter(t=>{const{name:e,required:n}=t;if(a.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:s,scaleKey:l,range:c}=t;return a.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=u[t]||{},{independent:a=!1,key:o=l||t,type:r=r?"identity":s}=i,i=Z(i,["independent","key","type"]);return{name:t,values:e,scaleKey:a?Symbol("independent"):o,scale:Object.assign({type:r,range:c},i)}})});return[e,Object.assign(Object.assign({},l),{index:t,channels:o})]})}function V_(t,e,n){var{component:r=[],coordinates:i=[],title:a,theme:o}=e,[,s]=sO("component",n),l=t.filter(({guide:t})=>null!==t),e=function(t,e,n){const[,o]=sO("component",n),{marks:r,coordinates:s}=t,l=new Map(e.map(t=>[t.name,t]));return r.filter(t=>t.slider).flatMap(t=>{t=t.slider;return Object.entries(t).map(([t,e])=>{var n,r,i,a=l.get(t),t=([t,n=[]]=[t,s],"x"===t?b_(n)?"sliderY":"sliderX":"y"===t?b_(n)?"sliderX":"sliderY":null);if(a&&t)return n=o(t)["props"],{defaultPosition:n,defaultSize:r,defaultOrder:i}=n,Object.assign(Object.assign({position:n,size:r,order:i,type:t},e),{scale:a})})}).filter(t=>!!t)}(e,t,n),c=[...r,...e];a&&(t=s("title")["props"],{defaultPosition:n,defaultOrder:r,defaultSize:e}=t,e=function(t){var{size:t,text:e,subtitle:n,style:r,subtitleStyle:i}=t;if(t)return t;r=null!=(t=null==r?void 0:r.fontSize)?t:14,t=null!=(t=null==i?void 0:i.fontSize)?t:12,i=(null==i?void 0:i.spacing)||0;return(e?r+4:0)+(n?t+i:0)}(B({size:e},o,t="string"==typeof a?{text:a}:a)),c.push(Object.assign({type:"title",position:n,order:r,size:e},t)));for(const x of l){var u=function(t,e){var{name:t,guide:n,type:r}=t,n=n["type"];if(void 0!==n)return n;if("color"===t)switch(r){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return b_(e)&&v_(e)||m_(e)||x_(e)?null:t.startsWith("x")?b_(e)?"axisY":"axisX":t.startsWith("y")?b_(e)?"axisX":"axisY":t.startsWith("position")&&!v_(e)?"axisY":null}(x,i);if(null!==u){var f=s(u)["props"],{defaultPosition:h,defaultSize:d,defaultOrder:p}=f,{guide:f,name:y,field:g}=x;for(const k of Array.isArray(f)?f:[f]){var v=function(t,e,n,r,i){n=["left","right","top","bottom","centerHorizontal","center"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(t=/position(\d*)/g.exec(t))?n:(t=+t[1],b_(i)?0==t?"top":"centerVertical":0==t?n:"centerHorizontal");if("axisX"===e&&v_(i)&&!b_(i)||"axisY"===e&&v_(i)&&b_(i)||"axisY"===e&&x_(i)||"axisY"===e&&m_(i)||"axisY"===e&&k_(i))return"bottom"===r.position?"arcInner":"arc";if(v_(i)&&("axisX"===e||"axisY"===e))return"arcY";if(k_(i)&&"axisX"===e)return"arcY";if("axisX"===e&&function(t){return void 0!==t.find(t=>"reflect"===t.type)}(i)||"axisX"===e&&function(t){return void 0!==t.find(t=>"reflectY"===t.type)}(i))return"top";if("string"==typeof e&&e.startsWith("legend")&&v_(i)&&"center"===r.position)return"arcCenter"}return n}(y,u,h,k,i),{size:m=d,order:b=p}=k;c.push(Object.assign(Object.assign({title:g},k),{position:v,order:b,size:m,type:u,scale:x}))}}}return c}function H_(t,e,n,r){var[i]=sO("scale",r),[r]=sO("component",r),{scale:a,bbox:o}=t,t=Z(t,["scale","bbox"]),i=a?i(a):null,{field:a,domain:s}=a||{},a={field:a,domain:s,bbox:o};return r(t)(i,a,e,n)}function q_(t,e){var t=function(t,e){var n=Ru(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom"]){var o="padding"+th(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:y=d,marginTop:g=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-g-y,marginLeft:p,marginBottom:y,marginTop:g,marginRight:d,x:s,y:l})}function Y_(t,e,n){var B=Ru(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:I,marginLeft:i,marginTop:a,marginBottom:R,marginRight:D,innerHeight:o,innerWidth:s,height:z,width:G}=n,t=t+i,i=r+a,r=n+D,a=I+R,W={top:[t,0,s,i,0,!0,_u],right:[G-r,i,r,o,1,!1,_u],bottom:[t,z-a,s,a,0,!1,_u],left:[0,i,t,o,1,!0,_u],centerHorizontal:[t,i,s,o,-1,null,null],centerVertical:[t,i,s,o,-1,null,null],arc:[t,i,s,o,-1,null,null],arcY:[t,i,s,o,-1,null,null],arcInner:[t,i,s,o,-1,null,null],center:[t,i,s,o,-1,null,null],arcCenter:[t,i,s,o,-1,null,null]};for(const[F,t]of B.entries()){var l=W[F];if("centerHorizontal"===F)!function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(t,e,l);else if("centerVertical"===F)!function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(t,e,l);else if("arc"===F){p=d=h=f=u=c=void 0;var c=t,u=l,[f,h,d,p]=u;for(let t=0;t<c.length;t++)c[t].bbox={x:f,y:h,width:d,height:p}}else if("arcY"===F){M=w=k=x=b=v=g=m=u=y=void 0;var y=t,u=e,[g,v,,m]=m=l,[b,x]=u.getCenter(),[u,k]=U_(u),w=x-k*(m=m/2),M=(k-u)*m;for(let t=0;t<y.length;t++)y[t].bbox={x:b+g,y:w+v,width:0,height:M}}else if("arcInner"===F){P=T=A=E=m=S=_=k=x=O=void 0;var O=t,x=e,[_,S,,k]=k=l,[m,E]=x.getCenter(),[x]=U_(x),A=x*(k=k/2),T=m-A,P=E-A;for(let t=0;t<O.length;t++)O[t].bbox={x:_+T,y:S+P,width:2*A,height:2*A}}else if("arcCenter"===F){Y=q=C=L=H=V=j=E=N=void 0;var N=t,E=e,[j,V,H,L]=j=l,[E]=U_(E),C=L/2*E/Math.sqrt(2),q=j+H/2,Y=V+L/2;for(let t=0;t<N.length;t++)N[t].bbox={x:q-C,y:Y-C,width:2*C,height:2*C}}else!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,y,g]=0===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],v=(n.sort((t,e)=>l(t.order,e.order)),s?u+p:u);for(let t=0,e=v;t<n.length;t++){var m=n[t],b=m["size"];m.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[y]:g},e+=b*(s?-1:1)}}(t,l)}}function U_(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function X_(T,P,N,j){return me(this,void 0,void 0,function*(){const[n]=sO("composition",N);var[t]=sO("interaction",N);const e=new Set(Object.keys(N).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(rh)),r=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const i=t=>"standardView"===r(t);var a=t=>{var e;return i(t)?[t]:(e=r(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[T],u=[];c.length;){var f=c.shift();if(i(f)){var h=l.get(f),[h,d]=h?J_(h,f,N):yield $_(f,N),p=(s.set(h,f),o.push(h),d.flatMap(a));if(c.push(...p),p.every(i)){var y=yield Promise.all(p.map(t=>Z_(t,N)));M_(h=(h=y).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),M_(h,"y");for(let t=0;t<p.length;t++){var g=p[t],v=y[t];l.set(g,v)}}}else{d="mark"===r(f)?f:yield iS(f,N),h=a(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}var m=T["on"];oO(m,rO.BEFORE_PAINT);const b=new Map,x=[];P.selectAll(lS(L)).data(o,t=>t.key).join(t=>t.append("g").attr("className",L).attr("id",t=>t.key).call(K_).each(function(t){Q_(t,Q(this),x,N),b.set(t,this)}),t=>t.call(K_).each(function(t){Q_(t,Q(this),x,N)}),t=>t.remove());var k=Array.from(b.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,a,o){return r=>me(this,void 0,void 0,function*(){var[t,e]=yield $_(r,a);Q_(t,i,[],a);for(const n of e)X_(n,i,a,o);return{options:r,view:t}})}(Q(e),N,j)}));for(const S of k){const T=S["options"];for(const E of function(t){var{interactions:t=[]}=t;return t}(T))t(E)(S,k)}const{width:w,height:M}=T;var O=[];for(const A of u){var _=new Promise(e=>me(this,void 0,void 0,function*(){for(const t of A)yield X_(Object.assign({width:w,height:M},t),P,N,j);e()}));O.push(_)}j.animations=x,oO(m,rO.AFTER_PAINT);m=x.filter(rh).map(nS).map(t=>t.finished);return Promise.all([...m,...O])})}function K_(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function $_(t,e){return me(this,void 0,void 0,function*(){return J_(yield Z_(t,e),t,e)})}function Z_(m,b){return me(this,void 0,void 0,function*(){var[t]=sO("theme",b);const[i,a]=sO("mark",b);var{theme:e,marks:n,coordinates:r=[]}=m,o=t(rS(e)),s=new Map,l=[];for(const p of n){var c=yield iS(p,b);l.push(c)}for(const y of yield Promise.all(l.map(r=>me(this,void 0,void 0,function*(){const{type:t=eh("G2Mark type is required."),key:n}=r;var e=a(t)["props"],{composite:e=!1}=e;return e?(yield i(r)(m)).map((t,e)=>Object.assign({key:n+"-"+e},t)):r}))).then(t=>t.flat())){var u,f=y["type"],f=a(f)["props"],f=yield W_(y,f,b);f&&([f,u]=f,s.set(f,u))}for(const g of Ru(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var h=g.reduce((t,{scale:e})=>B(t,e),{}),d=g[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter(rh)));const m=B({guide:{title:0===d.length?void 0:d},field:d[0]},h);d=g[0]["name"];const v=w_(d,g.flatMap(({values:t})=>t.map(t=>t.value)),m,r,o,b);g.forEach(t=>t.scale=v)}return s})}function J_(t,e,n){var[r]=sO("mark",n);const[i]=sO("scale",n);var a,o,[s]=sO("theme",n),{key:l,frame:c=!1,theme:u,style:f={}}=e,s=s(rS(u)),u=Array.from(t.values()),u=Array.from(new Set(u.flatMap(t=>t.channels.map(t=>t.scale)))),u=V_(Array.from(u),e,n),h=q_(u,e),d=function(t,e,n){var[n]=sO("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new y_(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(h,e,n),e=c?B({mainLineWidth:1,mainStroke:"#000"},f):f,p=(Y_(u,d,h),{}),y=[];for([a,o]of t.entries()){const{children:b,dataDomain:x,modifier:k,key:w}=a;var{index:g,channels:v}=o,m=Ly(Object.fromEntries(v.map(({name:t,scale:e})=>[t,e])),t=>{var e=t["relations"],[e]=function(o){if(!o||!Array.isArray(o))return[Qf,Qf];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(e);return e(i(t))});Object.assign(p,m);const M=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(v,m),[O,_,S]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>rh(t)&&rh(e))&&(r.push(a),i.push(o))}return[r,i]}(r(a)(g,m,M,d));v=x||O.length;const E=k?k(_,v,h):[];g=O.map((t,e)=>{var n={points:_[e],transform:E[e],index:t,markKey:w};for(const[r,i]of Object.entries(M))n[r]=i[t],S&&(n["series"+Fl(r)]=S[e].map(t=>i[t]));return S&&(n.seriesIndex=S[e]),n}),v=(o.data=g,o.index=O,null==b?void 0:b(g,m,h));y.push(...v||[])}return[{layout:h,theme:s,coordinate:d,components:u,markState:t,key:l,scale:p,style:e},y]}function Q_(U,X,K,$){me(this,void 0,void 0,function*(){const{components:B,theme:n,layout:t,markState:e,coordinate:r,key:i,style:I}=U,{width:R,height:D}=t,z=Z(t,["x","y","width","height"]),a=["view","plot","main","content"];var o,s,l,c=a.map((t,e)=>e);const u=a.map(t=>ih(Object.assign({},n,I),t)),G=["a","margin","padding","inset"].map(t=>J(z,t)),f=t=>t.style("x",t=>g[t].x).style("y",t=>g[t].y).style("width",t=>g[t].width).style("height",t=>g[t].height).each(function(t){var e,n,r=Q(this),t=u[t];for([e,n]of Object.entries(t))r.style(e,n)});let h=0,d=0,p=R,y=D;const g=c.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=G[t];return h+=t,d+=e,p-=t+r,y-=e+n,{x:h,y:d,width:p,height:y}}),v=(X.selectAll(lS(at)).data(c.filter(t=>rh(u[t])),t=>a[t]).join(t=>t.append("rect").attr("className",at).style("zIndex",-2).call(f),t=>t.call(f),t=>t.remove()),X.selectAll(lS(rt)).data(B,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",rt).append(t=>H_(t,r,n,$)),t=>t.each(function(t){var t=H_(t,r,n,$)["attributes"],[e]=this.childNodes;e.update(Object.assign({},t))})),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{updateType:a,updateDuration:o=300,updateDelay:s=0,enterType:l,enterDuration:c=300,enterDelay:u=0,exitType:f,exitDuration:h=300,exitDelay:d=0}=r;for(const M of i){var{updateType:p=a,updateDuration:y=o,updateDelay:g=s,enterType:v=l,enterDuration:m=c,enterDelay:b=u,exitDuration:x=h,exitDelay:k=d,exitType:w=f}=M;void 0!==p&&!p||(e=Math.max(e,y+g),n=Math.min(n,g)),void 0!==w&&!w||(e=Math.max(e,x+k),n=Math.min(n,k)),void 0!==v&&!v||(e=Math.max(e,m+b),n=Math.min(n,b))}}return e===-1/0?null:[n,e-n]}(e)),m=X.selectAll(lS(nt)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",nt).call(aS).call(sS,Array.from(e.keys())),t=>t.call(sS,Array.from(e.keys())).call(t=>{if(!v)return aS(t);{const[l,c]=v;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}})).transitions();K.push(...m.flat());for([o,s]of e.entries()){var W=s["data"];const{key:i,class:_}=o,S=function(l,t,e,n){const[c]=sO("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:y,style:g={}}=l;return(t,e)=>{var{shape:n=f}=g,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=Z(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:y,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=Ly(g,t=>tS(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:oS(l,n)}))(r,t,p,d,h)}}(o,s,U,$),E=(b=o,l=s,eS("enter",b,l,U,$)),A=(b=o,l=s,eS("update",b,l,U,$)),T=(b=o,l=s,eS("exit",b,l,U,$));var b=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(X,_,"element");const m=X.select("#"+i).selectAll(lS(et)).selectFacetAll(b).data(W,t=>t.key,t=>t.groupKey).join(t=>t.append(S).attr("className",et).transition(function(t){return E(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(a=n.parentNode.parentNode,s=r.parentNode,[a,o]=i(a),[i,s]=i(s),a=`translate(${a-i}, ${o-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+a).trimStart(),r.append(n));var n,r,i,a,o=S(t,e),s=A(t,[this],[o]);return null===s&&nh(this,o),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return T(t,[this])}).remove(),t=>t.append(S).attr("className",et).transition(function(t){var e=this["__fromElements__"],t=A(t,e,[this]);return new Sy(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new Sy([],this.__toData__,this.parentNode).append(S).attr("className",et).nodes();return A(t,[this],e)}).remove()).transitions();K.push(...m.flat())}{var x=U,k=X,w=$,M,O;const[P]=sO("labelTransform",w),{markState:V,labelTransform:N}=x,H=k.select(lS(tt)).node(),j=new Map,L=new Map,q=Array.from(V.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=sO("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t}=t,t=Ly(Z(t,["formatter"]),t=>tS(t,r,e,l)),{shape:a=c,text:o}=t,t=Z(t,["shape","text"]),i="string"==typeof i?Lx(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,x,w),a=k.select("#"+r).selectAll(lS(et)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=Z(e,["transform"]);return a.flatMap(t=>{t=function(n,r,t){const{seriesIndex:e,seriesKey:i,points:a,key:o,index:s}=t.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(t);if(!e)return[Object.assign(Object.assign({},n),{key:o+"-"+r,bounds:l,index:s,points:a})];var t=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),c=e.map((t,e)=>Object.assign(Object.assign({},n),{key:i[e]+"-"+r,bounds:[a[e]],index:t,points:a}));return t?t(c):c}(r,n,t);return t.forEach(t=>{j.set(t,i),L.set(t,e)}),t})})}),C=Q(H).selectAll(lS(it)).data(q,t=>t.key).join(t=>t.append(t=>j.get(t)(t)).attr("className",it),t=>t.each(function(t){nh(this,j.get(t)(t))}),t=>t.remove()).nodes(),Y=Ru(C,t=>L.get(t.__data__)),F=x["coordinate"];for([M,O]of Y){var{transform:M=[]}=M;(function(t){return t.reduce((n,r)=>(t,...e)=>r(n(t,...e),...e),Qf)})(M.map(P))(O,F)}N&&N(C,F)}})}function tS(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function eS(o,t,e,n,r){var[,i]=sO("shape",r);const[s]=sO("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Fl(o)}Animation`;const{[e]:c}=i(oS(t,r)).props,{[o]:u={}}=a,f=J(t.animate||{},o);return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function nS(t){return t.finished.then(()=>{t.cancel()}),t}function rS(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function iS(r,i){return me(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=Z(r,["data"]);return null==e?r:([,{data:e}]=yield C_(0,{data:e},t),Object.assign({data:e},n))})}function aS(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function oS(t,e){t=t.type;return t+"."+e}function sS(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.selectAll(lS(j)).data(e,t=>t.key).join(t=>t.append("g").attr("className",j).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(lS(tt)).node()||t.append("g").attr("className",tt)}function lS(...t){return t.map(t=>"."+t).join("")}function cS(t){for(var t=B({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function uS(t,e={},n){const{width:r=640,height:i=480,autoFit:a=!1,on:o}=t,s=cS(t),{canvas:l=(u=r,f=i,h=new g.Renderer,h.registerPlugin(new Ml),new F.Canvas({width:u,height:f,container:document.createElement("div"),renderer:h})),library:c=aO()}=e;var u,f,h;e.canvas=l,e.library=c,a&&!e.bindAutoFit&&([u,f={}]=[t,e],u.autoFit&&window.addEventListener("resize",hS(u,f)),e.bindAutoFit=!0),l.resize(r,i),oO(o,rO.BEFORE_RENDER);const d=Q(l.document.documentElement);return l.ready.then(()=>X_(Object.assign(Object.assign({},s),{width:r,height:i}),d,c,e)).then(n).then(()=>oO(o,rO.AFTER_RENDER)),"string"==typeof(h=l.getConfig().container)?document.getElementById(h):h}function fS(t,e={}){var n,r=t["on"],i=e["canvas"];i&&i.destroy(),[i,t={}]=[t,e],i.autoFit&&window.removeEventListener("resize",hS(i,t)),(e=r)&&(n?delete e[n]:e={})}const hS=(i,a={})=>{return r=()=>{var{width:t,height:e,autoFit:n}=i,r=a["canvas"],{width:r,height:n}=ch(r.getConfig().container,n,t,e),t=Object.assign(Object.assign({},i),{width:r,height:n});t.width&&t.height&&uS(t,a)},o=300,function(){var t=this,e=arguments,n=s&&!l;clearTimeout(l),l=setTimeout(function(){l=null,s||r.apply(t,e)},o),n&&r.apply(t,e)};var r,o,s,l};function dS(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class h{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return dS(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return dS(this,t=>{e===t.type&&n.push(t)}),n}changeData(t){let e=this;for(;e&&e.parentNode;)e=e.parentNode;this.attr("data",t),e.render()}call(t,...e){return t(this.map(),...e),this}}function pS(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function yS(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function gS(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length?this.attr(r,t):((n=this.attr(r)||{})[t]=e,this.attr(r,n))}}function vS(t,{name:e,key:i=e}){t.prototype[e]=function(t,e){var n,r=this.attr(i)||{};return 0===arguments.length?r:1===arguments.length?r[t]:((n=r[t])?Al(e)?n.concat(e):n.push(e):r[t]=Al(e)?e:[e],this.attr(i,r))}}function p(r){return t=>{for(const n of r){var e=n["type"];"value"===e?pS(t,n):"array"===e?yS(t,n):"object"===e?gS(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"event"===e&&vS(t,n)}return t}}function mS(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}ol=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"}];let bS=class extends h{constructor(){super({},"interval")}},xS=(bS=t([p(ol)],bS),class extends h{constructor(){super({},"rect")}}),kS=(xS=t([p(ol)],xS),class extends h{constructor(){super({},"point")}}),wS=(kS=t([p(ol)],kS),class extends h{constructor(){super({},"area")}}),MS=(wS=t([p(ol)],wS),class extends h{constructor(){super({},"line")}}),OS=(MS=t([p(ol)],MS),class extends h{constructor(){super({},"cell")}}),_S=(OS=t([p(ol)],OS),class extends h{constructor(){super({},"vector")}}),SS=(_S=t([p(ol)],_S),class extends h{constructor(){super({},"link")}}),ES=(SS=t([p(ol)],SS),class extends h{constructor(){super({},"polygon")}});ES=t([p(ol)],ES);to=t([p(ol)],class extends h{constructor(){super({},"image")}});let AS=class extends h{constructor(){super({},"text")}},TS=(AS=t([p(ol)],AS),class extends h{constructor(){super({},"box")}}),PS=(TS=t([p(ol)],TS),class extends h{constructor(){super({},"lineX")}}),NS=(PS=t([p(ol)],PS),class extends h{constructor(){super({},"lineY")}}),jS=(NS=t([p(ol)],NS),class extends h{constructor(){super({},"range")}}),LS=(jS=t([p(ol)],jS),class extends h{constructor(){super({},"rangeX")}}),CS=(LS=t([p(ol)],LS),class extends h{constructor(){super({},"rangeY")}}),FS=(CS=t([p(ol)],CS),class extends h{constructor(){super({},"connector")}}),BS=(FS=t([p(ol)],FS),class extends h{constructor(){super({},"shape")}}),IS=(BS=t([p(ol)],BS),class extends h{constructor(){super({},"sankey")}}),RS=(IS=t([p([...ol,{name:"layout",type:"value"}])],IS),class extends h{constructor(){super({},"treemap")}}),DS=(RS=t([p([...ol,{name:"layout",type:"value"}])],RS),class extends h{constructor(){super({},"boxplot")}}),zS=(DS=t([p(ol)],DS),class extends h{constructor(){super({},"pack")}}),GS=(zS=t([p([...ol,{name:"layout",type:"value"}])],zS),class extends h{constructor(){super({},"forceGraph")}}),WS=(GS=t([p([...ol,{name:"layout",type:"value"}])],GS),class extends h{constructor(){super({},"tree")}}),VS=(WS=t([p([...ol,{name:"layout",type:"value"}])],WS),class extends h{constructor(){super({},"wordCloud")}});VS=t([p([...ol,{name:"layout",type:"object"}])],VS);Au={interval:bS,rect:xS,point:kS,area:wS,line:MS,cell:OS,vector:_S,link:SS,polygon:ES,image:to,text:AS,box:TS,lineX:PS,lineY:NS,range:jS,rangeX:LS,rangeY:CS,connector:FS,sankey:IS,treemap:RS,boxplot:DS,shape:BS,pack:zS,forceGraph:GS,tree:WS,wordCloud:VS};let HS=class extends h{constructor(){super({},"view")}},qS=(HS=t([p([{type:"value",name:"data"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...mS(Au)])],HS),class extends h{constructor(){super({},"spaceLayer")}}),YS=(qS=t([p([{type:"value",name:"data"},...mS(Au)])],qS),class extends h{constructor(){super({},"spaceFlex")}}),US=(YS=t([p([{type:"value",name:"data"},...mS(Au)])],YS),class extends h{constructor(){super({},"facetRect")}}),XS=(US=t([p([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...mS(Au)])],US),class extends h{constructor(){super({},"facetCircle")}}),KS=(XS=t([p([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...mS(Au)])],XS),class extends h{constructor(){super({},"repeatMatrix")}}),$S=(KS=t([p([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...mS(Au)])],KS),class extends h{constructor(){super({},"timingKeyframe")}}),ZS=($S=t([p([...mS(Au)])],$S),class extends h{constructor(){super({},"geoView")}}),JS=(ZS=t([p([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...mS(Au)])],ZS),class extends h{constructor(){super({},"geoPath")}});JS=t([p([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...mS(Au)])],JS);var QS={view:HS,spaceLayer:qS,spaceFlex:YS,facetRect:US,facetCircle:XS,repeatMatrix:KS,timingKeyframe:$S,geoView:ZS,geoPath:JS};for(const n7 of Object.values(QS))p(mS(QS))(n7);const t7=aO();function e7(t){return Object.assign(Object.assign({},t.value),{type:t.type})}e=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"theme",type:"object"},{name:"title",type:"object"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"on",type:"event"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...mS(Au),...Object.entries(QS).map(([t,e])=>({type:"container",name:t,ctor:e}))];y.Chart=class extends h{constructor(t={}){var e=t["container"];super(Z(t,["container"]),"view"),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._context={library:t7}}render(){var t,e,n,r,i,a,o;return this._context.canvas||({width:i=640,height:o=480,renderer:t,plugins:e,autoFit:n}=this.options(),{width:n,height:r}=ch(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new g.Renderer,o=[]]=[this._container,i,o,t,e],o.push(new Ml),o.forEach(t=>a.registerPlugin(t)),new F.Canvas({container:n,width:r,height:i,renderer:a}))),uS(this.options(),this._context),this}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t.attr("insetLeft",e.attr("insetLeft")),t.attr("insetRight",e.attr("insetRight")),t.attr("insetBottom",e.attr("insetBottom")),t.attr("insetTop",e.attr("insetTop")),t.attr("marginLeft",e.attr("marginLeft")),t.attr("marginBottom",e.attr("marginBottom")),t.attr("marginTop",e.attr("marginTop")),t.attr("marginRight",e.attr("marginRight")),t.attr("autoFit",e.attr("autoFit")),t.attr("padding",e.attr("padding")),t.attr("margin",e.attr("margin")),t.attr("inset",e.attr("inset")),t),n=[e],r=new Map;for(r.set(e,e7(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=e7(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(e)}node(){return this._container}context(){return this._context}destroy(){var t,e=this.options(),n=e["on"];oO(n,rO.BEFORE_DESTROY),fS(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),oO(n,rO.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];oO(e,rO.BEFORE_CLEAR),fS(t,this._context),oO(e,rO.AFTER_CLEAR)}forceFit(){var{width:t,height:e}=this.options(),{width:t,height:e}=ch(this._container,!0,t,e);this.changeSize(t,e)}changeSize(t,e){var{width:n,height:r,on:i}=this.options();if(n===t&&r===e)return this;oO(i,rO.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),oO(i,rO.AFTER_CHANGE_SIZE)}},y.Chart=t([p(e)],y.Chart),y.AREA_CLASS_NAME=at,y.COMPONENT_CLASS_NAME=rt,y.ELEMENT_CLASS_NAME=et,y.LABEL_CLASS_NAME=it,y.LABEL_LAYER_CLASS_NAME=tt,y.MAIN_LAYER_CLASS_NAME=j,y.PLOT_CLASS_NAME=nt,y.VIEW_CLASS_NAME=L,y.createLibrary=aO,y.destroy=fS,y.register=function(t,e){Object.assign(t7,{[t]:e})},y.render=uS,y.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:a}=t;var t=cS(t),{library:o=aO(),group:s=new F.Group}=e;if(function(t){if(!El(t)){if(Ol(t))return!t.length;var e,n=Il(t);if("Map"===n||"Set"===n)return!t.size;if(Dl(t))return!Object.keys(t).length;for(e in t)if(Wl.call(t,e))return}return 1}(null==s?void 0:s.parentElement))throw new Error("Unmounted group");var l=Q(s);return e.group=s,e.library=o,oO(a,rO.BEFORE_RENDER),X_(Object.assign(Object.assign({},t),{width:r,height:i}),l,o,e).then(n).then(()=>oO(a,rO.AFTER_RENDER)),s},Object.defineProperty(y,"__esModule",{value:!0})});
|
|
7
|
+
`}([h,d,f,s]))}c-=u,l+=1}return o}function Gx(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function Hx(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],g=F.convertToPath(e),y=F.convertToPath(n);return d===p&&"path"!==d||(void 0===g||void 0===y)?(p=n,d=r,[o,l,s,h]=zx(i=e),[c,u,f,a]=(Gx(p,i),zx(p)),o=[Object.assign({transform:`translate(${o-c}, ${l-u}) scale(${s/f}, ${h/a})`},Nx(i,Cx)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},Nx(p,Cx))],p.animate(o,d)):(c=g,s="path"===(u=(l=t)["nodeName"])?l:(Gx(u=new F.Path({style:Object.assign(Object.assign({},Nx(l,Cx)),{d:c})}),l),u),f=[Object.assign({path:g},Nx(e,Cx)),Object.assign({path:y},Nx(n,Cx))],h=s.animate(f,r),s.style.transform="scale(1, 1)",s.style.transform="none",h)}Dx.props={};const Vx=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:Wx,i=Px(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,Hx(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return Hx(t,new F.Path({style:Object.assign({path:d[e]},Nx(l,Cx))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return Hx(t,t,new F.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},Yx=(Vx.props={},b=>{return F.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:F.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!_u(r))return jx(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:s=0,inset:l=0,fillOpacity:c,strokeOpacity:u,opacity:f}=e,{points:e,y:t,y1:h}=(J(e,["radius","inset","fillOpacity","strokeOpacity","opacity"]),t);const d=y1().cornerRadius(s).padAngle(l*Math.PI/180),p=ng(r,e,[t,h]),{startAngle:g,endAngle:y}=p,m=new F.Path({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=F.convertToPath(m);return m.style.transform="none",t};s=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.01},{waveInArcAngle:y,fillOpacity:c,strokeOpacity:u,opacity:f}],l=a.animate(s,Px(i,n,b));return l.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},l.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:y}))},l}}),qx=(Yx.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,Px(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),Ux=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,Px(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},$x=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],Px(i,n,o))},Xx=($x.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=jx(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),Kx=(Xx.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=Bx(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function Zx(t){return tt(t).selectAll("."+nt).nodes()}function Jx(e,t){return t.filter(t=>t!==e&&t.options.parentKey===e.options.key).flatMap(({container:t})=>Zx(t))}function Qx(t){return tt(t).select("."+rt).node()}function t5(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function e5(t,e){var{offsetX:e,offsetY:n}=e,[t,r,i,a]=function(t){var t=t.getRenderBounds(),{min:[t,e],max:[n,r]}=t;return[t,e,n,r]}(t);return[Math.min(i,Math.max(t,e))-t,Math.min(a,Math.max(r,n))-r]}function n5(t){return t&&0!==Object.keys(t).length?t:{highlightedLineWidth:1,highlightedStroke:"#000"}}function r5(){return t=>t.__data__.color}function i5(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function a5(t){t=Array.from(t.markState.keys());const n=new Map(t.map(t=>[t.key,t.data]));return t=>{var{index:t,markKey:e}=t.__data__;return n.get(e)[t]}}function o5(o,s=(t,e)=>t,l=(t,e,n)=>t.setAttribute(e,n)){const c="__states__",u="__ordinal__",i=t=>{var{[c]:e=[],[u]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),Q(o,e)),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var a=t.getAttribute(r),i=s(i,t);l(t,r,i),r in n||(n[r]=a)}t[u]=n}},a=t=>{t[c]||(t[c]=[])};return{setState:(t,...e)=>{a(t),t[c]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[c].indexOf(r);-1!==r&&t[c].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[c].indexOf(e))}}function s5(r,i){const a=new Map(r.map((t,e)=>[t,e]));return(t,e)=>{var n;return"function"!=typeof t?t:(n=a.get(e),t(i?i(e):e,n,i?r.map(i):r))}}function l5(l,t){var{valueof:c=(t,e)=>t}=t,u=J(t,["valueof"]);const f="element-link";return[(t,e)=>{if(!(t.length<=1)){var n=t.map(t=>[t,t.getBBox()]);n.sort(([,t],[,e])=>{var{x:t,y:n}=t,{x:e,y:r}=e;return t-e==0?n-r:t-e});for(let t=1;t<n.length;t++){var r=l1();const[o,s]=n[t-1];var[,i]=n[t],i=(r.moveTo(s.x+s.width,s.y),r.lineTo(i.x,i.y),r.lineTo(i.x,i.y+i.height),r.lineTo(s.x+s.width,s.y+s.height),r.closePath(),K1(u,t=>c(t,o))),{fill:a=o.getAttribute("fill")}=i,i=J(i,["fill"]),r=new F.Path({className:f+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:a},i)});l.appendChild(r)}}},t=>{t=t||f;for(const e of l.getElementsByClassName(t)||[])e.remove()}]}function c5(t,e){t=t.getRootNode().defaultView.getContextService().getDomElement();null!=t&&t.style&&(t.style.cursor=e)}function u5(t,e){var{elements:n,datum:r,groupKey:i=t=>t,link:a=!1}=e,e=J(e,["elements","datum","groupKey","link"]);const o=n(t),s=new Set(o),l=Qc(o,i);n=s5(o,r);const[c,u]=l5(t,Object.assign({elements:o,valueof:n},Q(e,"link"))),{setState:f,removeState:h}=o5(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=l.get(t),e=new Set(t);for(const n of o)e.has(n)?f(n,"highlighted"):f(n,"unhighlighted");a&&c(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of o)h(e,"unhighlighted","highlighted");a&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function f5(n){return t=>{var{container:t,view:e}=t;return u5(t,Object.assign(Object.assign({},n5(n)),{elements:Zx,datum:a5(e)}))}}function h5(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return u5(t,Object.assign(Object.assign({},n5(n)),{elements:Zx,datum:a5(e),groupKey:i5(e)}))}}function d5(n){return t=>{var{container:t,view:e}=t;return u5(t,Object.assign(Object.assign(Object.assign({},n),n5(n)),{elements:Zx,datum:a5(e),groupKey:r5()}))}}function p5(t,e){var{elements:n,datum:r,groupKey:l=t=>t,link:c=!1,single:u=!1}=e,e=J(e,["elements","datum","groupKey","link","single"]);const f=n(t),h=new Set(f),d=Qc(f,l);n=s5(f,r);const[p,g]=l5(t,Object.assign({elements:f,valueof:n},Q(e,"link"))),{setState:y,removeState:i,hasState:m}=o5(e,n),v=()=>{for(const t of f)i(t,"selected","unselected");c&&g()},a=t=>{t=t.target;if(!h.has(t))return v();if(u){var e=t;if(m(e,"selected"))v();else{var e=l(e),e=d.get(e),n=new Set(e);for(const i of f)n.has(i)?y(i,"selected"):y(i,"unselected");c&&(g(),p(e))}}else{e=t;var t=l(e),r=d.get(t);const a=new Set(r);if(m(e,"selected")){if(!f.some(t=>!a.has(t)&&m(t,"selected")))return v();for(const o of r)y(o,"unselected");c&&g(t)}else{e=r.some(t=>m(t,"selected"));for(const s of f)a.has(s)?y(s,"selected"):m(s,"selected")||y(s,"unselected");!e&&c&&p(r,t)}}};return t.addEventListener("click",a),()=>{t.removeEventListener("click",a)}}function g5(n){return t=>{var{container:t,view:e}=t;return p5(t,Object.assign(Object.assign({},n5(n)),{elements:Zx,datum:a5(e)}))}}function y5(n){return t=>{var{container:t,view:e}=t;return p5(t,Object.assign(Object.assign({},n5(n)),{elements:Zx,datum:a5(e),groupKey:i5(e)}))}}function m5(n){return t=>{var{container:t,view:e}=t;return p5(t,Object.assign(Object.assign({},n5(n)),{elements:Zx,datum:a5(e),groupKey:r5()}))}}function v5(t){var{wait:O=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=J(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=ru(t.map(t=>d[t])),u=B({},e),f=u.marks.find(t=>"line"===t.type);t=pu(tu(t,t=>pu(t,t=>+h[t])/yu(t,t=>+h[t]),t=>l[t]).values());B(f,{scale:{y:{domain:[1/t,t]}}});const p=Qx(r),g=r.getElementsByClassName(nt);const y=Qc(r.getElementsByClassName(at),t=>t.__data__.key.split("-")[0]),m=new F.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},Q(A,"rule"))}),v=new F.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},Q(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Vc(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",E(e))};let w;var k;const M=al(t=>{t=t5(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of g){var{seriesIndex:a,key:o}=u.__data__,s=a[Wc(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),y.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},O,{leading:_,trailing:S});return k=[0,0],ve(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,k);x(k,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[Wc(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",M),p.addEventListener("pointermove",M),p.addEventListener("pointerleave",M),()=>{m.remove(),p.removeEventListener("pointerenter",M),p.removeEventListener("pointermove",M),p.removeEventListener("pointerleave",M)}}}function b5({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=Qx(n),a=B({},e);for(const s of a.marks)s.animate=!1;const o=al(t=>{var e,n,t=t5(i,t);t&&([t,e]=t,(n=function(t){var{coordinates:e=[]}=t,n=e.find(t=>"fisheye"===t.type);return n||(e.push(n={type:"fisheye"}),t.coordinates=e,n)}(a)).focusX=t,n.focusY=e,n.isVisual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function x5(t,e,n,r){var{tooltipElement:i=function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new Eb({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:a-r,height:o-i},title:" ",position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return t.getRootNode().defaultView.getConfig().container.appendChild(e.HTMLTooltipElement),e}(t,n,r)}=t,{items:e,title:a}=e;i.show(),i.position=[n,r],i.update({items:e,title:a}),t.tooltipElement=i}function w5(t){t=t.tooltipElement;t&&t.hide()}function k5(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>vf(t)))}function M5(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function O5(t){return wf(t)?t:{value:void 0===t?t:""+t}}function _5(n,s,l,t=n.map(t=>t.__data__)){e=t.map(t=>t.title),e=new Map(e.map(t=>[t instanceof Date?+t:t,t]));var e=Array.from(e.values()).filter(vf),t=t.flatMap((a,t)=>{var t=n[t],e=J(a,["title"]);const o=M5(t);return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=l[t].getOptions(),e=O5(e),{field:r=void 0,color:i=o,name:r=function(t,e){var{color:t,series:n}=t,{color:e,series:r}=e,i=t=>t&&t.invert&&!(t instanceof Qp);return i(t)?t.invert(e):i(n)?n.invert(r):null}(l,a)||r||n,value:n}=e,e=J(e,["field","color","name","value"]);return Object.assign(Object.assign(Object.assign({},e),{name:r,color:i,value:n}),k5(s({channel:t,value:n})))}).filter(({value:t})=>void 0!==t)});return Object.assign(Object.assign({},0<e.length&&{title:e.join(",")}),{items:t})}function S5(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function E5(t,e){return void 0===t?e:t}function A5(f,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:h,coordinate:d,crosshairs:p,item:g,startX:y=0,startY:m=0}=t,t=J(t,["elements","wait","leading","trailing","scale","coordinate","crosshairs","item","startX","startY"]),e=e(f);const[,v]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(f),b=[],x=[];for(const l of e){var a=l["__data__"],a=a["seriesX"];(a?b:x).push(l)}const w=new Map(b.map(t=>{var e=t["__data__"];const n=e["seriesX"];return[t,[ru(n.map((t,e)=>e),t=>n[+t]),n]]}));e=x.map((t,e)=>e);const k=x.map(t=>{t=t.__data__;return t.x}),M=ru(e,t=>k[t]),O=Q(t,"crosshairs");e=h.x;const _=null!=e&&e.getBandWidth?e.getBandWidth()/2:0,o=al(t=>{t=t5(f,t);if(t){var e=f.getBounds(),n=e.min[0],e=e.min[1];const o=[t[0]-y,t[1]-m];o;var r=((t,e,n)=>{var r=e.length;if(0===r)return[];var[t]=d.invert(t),t=t-_,i=(0,Wc(t=>n[+t]).center)(e,t);let a=i,o=i;for(;0<a-1&&n[e[a-1]]==n[e[i]];)a--;for(;o+1<r&&n[e[o+1]]===n[e[i]];)o++;return ku(a,o+1).map(t=>e[t])})(o,M,k).map(t=>x[t]),i=b.map(t=>{var[e,n]=w.get(t),t=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")).map(([t,e])=>{e=e[n];return[Xs(t.replace("series","")),e]}))})(t,((t,e,n)=>{var[t]=d.invert(t);return e[(0,Wc(t=>n[+t]).center)(e,t-_)]})(o,e,n)),{x:e,y:n}=t;return[t,d.map([e+_,n])]}),a=[...i.map(t=>t[0]),...r.map(t=>t.__data__)],r=_5([...b,...r],g,h,a);if(x5(f,r,t[0]+n,t[1]+e),p){a=i.map(t=>t[1]);{var r=f,n=a,{height:e,startX:i,startY:a}=t=Object.assign(Object.assign({},O),{height:v,startX:y,startY:m}),t=J(t,["height","startX","startY"]);const s=(n=bu(n.map(t=>t[0])))+i,l=n+i,c=a,u=e-a;(i=r.ruleY||(n=new F.Line({style:Object.assign({x1:s,x2:l,y1:c,y2:u,lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t)}),r.appendChild(n),n)).style.x1=s,i.style.x2=l,i.style.y1=c,i.style.y2=u,r.ruleY=i}}}},n,{leading:r,trailing:i}),s=()=>{var t;w5(f),p&&(t=f).ruleY&&(t.ruleY.remove(),t.ruleY=void 0)};return f.addEventListener("pointerenter",o),f.addEventListener("pointermove",o),f.addEventListener("pointerleave",s),()=>{f.removeEventListener("pointerover",o),f.removeEventListener("pointerout",o),f.removeEventListener("pointerleave",s)}}function T5(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const l=new Set(t),c=Qc(t,o),u=al(t=>{var e,n=t["target"];l.has(n)&&(n=o(n),n=1===(n=c.get(n)).length?function(t,a,o){var e=(n=t["__data__"])["title"],n=J(n,["title"]);const s=M5(t);return t=Object.entries(n).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=o[t].getOptions(),e=O5(e),{field:r=void 0,color:i=s,name:r=r||n,value:n}=e,e=J(e,["field","color","name","value"]);return Object.assign(Object.assign(Object.assign({},e),{color:i,name:r,value:n}),k5(a({channel:t,value:n})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):_5(n,s,i),{offsetX:t,offsetY:e}=t,x5(r,n,t,e))},e,{leading:n,trailing:a}),f=t=>{t=t.target;l.has(t)&&w5(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",f),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",f)}}function P5(t){const{shared:u,crosshairs:f,series:h,item:d=()=>({}),facet:p=!1}=t,g=J(t,["shared","crosshairs","series","name","item","facet"]);return(e,t)=>{var{container:n,view:r}=e;const{scale:i,markState:a,coordinate:o}=r;var s=S5(a,"seriesTooltip"),l=S5(a,"crosshairs"),n=Qx(n),s=E5(h,s);if(s&&!p)return A5(n,Object.assign(Object.assign({},g),{elements:Zx,scale:i,coordinate:o,crosshairs:E5(f,l),item:d}));if(s&&p){s=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const c=Jx(e,t),i=s[0].view.scale;t=n.getBounds(),s=t.min[0],t=t.min[1];return A5(n.parentNode.parentNode,Object.assign(Object.assign({},g),{elements:()=>c,scale:i,coordinate:o,crosshairs:E5(f,l),item:d,startX:s,startY:t}))}return T5(n,Object.assign(Object.assign({},g),{elements:Zx,scale:i,coordinate:o,groupKey:u?i5(r):void 0,item:d}))}}Kx.props={};const L5="legend-category";function N5(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function C5(t){return t.getElementsByClassName("legend-category-item-label")[0]}function j5(t){return t.getElementsByClassName("items-item")}function F5(t,e){var{legends:n,marker:i,label:a,datum:o,filter:r,setAttribute:s}=e,e=J(e,["legends","marker","label","datum","filter","setAttribute"]);const l=new Map,c=new Map,u=new Map;var e=0===Object.keys(e).length?{labelUnselectedFill:"#aaa",markerUnselectedFill:"#aaa"}:e,f=Q(e,"marker"),e=Q(e,"label");const{setState:h,removeState:d}=o5(f,void 0,s),{setState:p,removeState:g}=o5(e,void 0,s),y=Array.from(n(t)),m=y.map(o),v=()=>{for(const r of y){var t=o(r),e=i(r),n=a(r);(m.includes(t)?(d(e,"unselected"),g):(h(e,"unselected"),p))(n,"unselected")}};for(const k of y){var b=()=>{c5(t,"pointer")},x=()=>{c5(t,"default")},w=()=>ve(this,void 0,void 0,function*(){var t=o(k),e=m.indexOf(t);-1===e?m.push(t):m.splice(e,1),0===m.length&&m.push(...y.map(o)),yield r(m),v()});k.addEventListener("click",w),k.addEventListener("pointerenter",b),k.addEventListener("pointerout",x),l.set(k,w),c.set(k,b),u.set(k,x)}return()=>{for(const t of y)t.removeEventListener("click",l.get(t)),t.removeEventListener("pointerenter",c.get(t)),t.removeEventListener("pointerout",u.get(t))}}function B5(t){var s=t["channel"],r=J(t,["channel"]);return t=>{const{container:e,view:i,options:a,update:o}=t;var t=e.getElementsByClassName(L5),t=s?t.find(t=>{t=t.parentNode.__data__;return t.scale.name===s}):t[0],[t,n]=t?function(t){const e=t.attributes["data"];return[t=(t=t.parentNode.__data__).scale.name,{legends:j5,marker:N5,label:C5,datum:t=>{t=t.__data__,t=t.index;return e[t].label}}]}(t):[null,{}];return t&&(s=t),F5(e,Object.assign(Object.assign(Object.assign({},n),{filter:r=>ve(this,void 0,void 0,function*(){var t=i["scale"];const{[s]:n}=t;t=a.marks,t=t.map(t=>{var{transform:e=[]}=t,e=[{type:"filter",[s]:r},...e];return B({},t,{transform:e,scale:{[s]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},a),{marks:t});return o(t)})}),r))}}function R5(a,t){var{brushed:i=()=>{},brushended:e=()=>{},brushcreated:o=()=>{},extent:s=function(t){var{width:t,height:e}=t.getBBox();return[0,0,t,e]}(a),brushRegion:l=(t,e,n,r,i)=>[t,e,n,r],reverse:c=!1,fill:n="#777",fillOpacity:r="0.3",stroke:u="#fff"}=t,f=J(t,["brushed","brushended","brushcreated","extent","brushRegion","reverse","fill","fillOpacity","stroke"]);let h=null,d=null,p=null,g=null,y=null,m=!1;const[v,b,x,w]=s,k=(c5(a,"crosshair"),a.style.draggable=!0,()=>{y=new F.Path({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:u,pointerEvents:"none"})}),g=new F.Rect({style:{draggable:!0,fill:"transparent"},className:"mask"}),a.appendChild(y),a.appendChild(g)}),M=()=>{g=new F.Rect({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:u,draggable:!0}),className:"mask"}),a.appendChild(g)},O=()=>{g&&g.remove(),y&&y.remove(),h=null,d=null,p=null,m=!1,g=null,y=null,e()},_=(t,e)=>{var[t,e,n,r]=function(t,e,n,r,i){var[i,a,o,s]=i;return[Math.max(i,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(o,Math.max(t,n)),Math.min(s,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[t,e,n,r]=l(t,e,n,r,s);return(c?E:S)(t,e,n,r),i(t,e,n,r),[t,e,n,r]},S=(t,e,n,r)=>{g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},E=(t,e,n,r)=>{y.style.d=`
|
|
8
|
+
M${v},${b}L${x},${b}L${x},${w}L${v},${w}Z
|
|
9
|
+
M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z
|
|
10
|
+
`,g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},A=t=>{var e=t["target"],[t,n]=e5(a,t);e===g?p=[t,n]:(((t,e)=>{if(g&&g.remove(),y&&y.remove(),h=[t,e],c)return k();M()})(t,n),m=!0)},T=t=>{var e,n,r,t=e5(a,t);h&&(p?(n=(t,e,n,r,i)=>t+e<r?r-e:i<t+n?i-n:t,r=(e=t)[0]-p[0],e=e[1]-p[1],r=n(r,h[0],d[0],v,x),n=n(e,h[1],d[1],b,w),e=[h[0]+r,h[1]+n],r=[d[0]+r,d[1]+n],_(e,r)):_(h,t))},P=t=>{var e,n,r,i;p?(p=null,{x:e,y:r,width:n,height:i}=g.style,h=[e,r],d=[e+n,r+i]):(d=e5(a,t),[e,n,r,i]=_(h,d),m=!1,o(e,n,r,i))},L=t=>{t=t.target;g&&t!==g&&O()},N=t=>{t=t.target;t!==g||m?c5(a,"crosshair"):c5(a,"move")},C=()=>{c5(a,"default")};return a.addEventListener("dragstart",A),a.addEventListener("drag",T),a.addEventListener("dragend",P),a.addEventListener("click",L),a.addEventListener("pointermove",N),a.addEventListener("pointerleave",C),{mask:g,remove(){g&&O()},destroy(){g&&O(),a.removeEventListener("dragstart",A),a.removeEventListener("drag",T),a.removeEventListener("dragend",P),a.removeEventListener("click",L),a.removeEventListener("pointermove",N),a.removeEventListener("pointerleave",C)}}}function I5(t,e){var{elements:n,siblings:r=t=>[],datum:i,brushRegion:a,extent:o,reverse:s,series:l=!1,key:d=t=>t,bboxOf:c=t=>{var{x:t,y:e,width:n,height:r}=t.style;return{x:t,y:e,width:n,height:r}}}=e,e=J(e,["elements","siblings","datum","brushRegion","extent","reverse","series","key","bboxOf"]);const p=n(t),g=r(t),y=g.flatMap(n);r=s5(p,i),n=Q(e,"mask");const{setState:m,removeState:u}=o5(e,r),f=new Map,{width:h,height:v,x:b,y:x}=c(t);i=o||[0,0,h,v];return R5(t,Object.assign(Object.assign({},n),{extent:i,brushRegion:a,reverse:s,brushended:l?()=>{for(const t of p)u(t,"unhighlighted");for(const e of f.values())e.remove();f.clear()}:()=>{for(const t of[...p,...y])u(t,"highlighted","unhighlighted")},brushed:l?(t,e,n,r)=>{var i;for(const o of p){var a=f.get(o)||(a=o,i=void 0,i=a.cloneNode(),a.parentNode.appendChild(i),f.set(a,i),i);a.style.clipPath=new F.Rect({style:{x:t+b,y:e+x,width:n-t,height:r-e}}),m(o,"unhighlighted"),m(a,"highlighted")}}:(t,e,n,r)=>{var i;for(const u of g)null!=(i=u.brush)&&i.remove();var a=new Set;for(const f of p){var{min:o,max:s}=f.getLocalBounds(),[o,l]=o,[s,c]=s;!function(t,e){var[t,n,r,i]=t,[e,a,o,s]=e;return!(r<e||o<t||i<a||s<n)}([o,l,s,c],[t,e,n,r])?m(f,"unhighlighted"):(m(f,"highlighted"),a.add(d(f)))}for(const h of y)a.has(d(h))?m(h,"highlighted"):m(h,"unhighlighted")}}))}function D5(t){var{facet:u,brushKey:f}=t,h=J(t,["facet","brushKey"]);return(t,r)=>{var e,n,i,a,{container:o,view:s}=t,o=Qx(o),l={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1};if(u)return e=(a=o.getBounds()).min[0],n=a.min[1],i=a.max[0],a=a.max[1],I5(o.parentNode.parentNode,Object.assign(Object.assign({elements:()=>Jx(t,r),datum:a5(s),brushRegion:(t,e,n,r)=>[t,e,n,r],maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,extent:[e,n,i,a]},l),h));const c=I5(o,Object.assign(Object.assign({elements:Zx,key:t=>t.__data__.key,siblings:()=>{return e=t,n=f,r.filter(t=>{return t!==e&&({interactions:t=[]}=t.options,t.find(t=>t.brushKey===n))}).map(t=>Qx(t.container));var e,n},datum:a5(s),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0},l),h));return o.brush=c,()=>c.destroy()}}function z5(t,e,n,r,i){var[,i,,a]=i;return[t,i,n,a]}function W5(t){return D5(Object.assign(Object.assign({},t),{brushRegion:z5}))}function G5(t,e,n,r,i){var[i,,a]=i;return[i,e,a,r]}function H5(t){return D5(Object.assign(Object.assign({},t),{brushRegion:G5}))}const V5="axis",Y5="axis-hot-area";function q5(t){return t.getElementsByClassName(V5)}function U5(t){return t.getElementsByClassName("axis-line")[0]}function $5(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function X5(t,e){var{cross:n,offsetX:i}=e,e=J(e,["cross","offsetX","offsetY"]),r=$5(t),[t]=U5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=2*(s-a);return{brushRegion:G5,hotZone:new F.Rect({className:Y5,style:Object.assign({x:n?a:t-r/2,width:n?r/2:r,y:o,height:l-o},e)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,r)=>[Math.floor(a-i),e,Math.ceil(s-i),r]}}function K5(t,e){var{offsetY:i,cross:n=!1}=e,e=J(e,["offsetY","offsetX","cross"]),r=$5(t),[,t]=U5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=l-o;return{brushRegion:z5,hotZone:new F.Rect({className:Y5,style:Object.assign({x:a,width:s-a,y:n?o:t-r,height:n?r:2*r},e)}),extent:n?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,n,r)=>[t,Math.floor(o-i),n,Math.ceil(l-i)]}}function Z5(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1}=e,e=J(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse"]);const u=r(t);r=n(t);const f=o5(e,s5(u,o))["setState"],h=new Map;var d=Q(e,"mask");const p=()=>{for(const t of u)(t=>Array.from(h.values()).every(([n,r,i,a])=>t.some(([t,e])=>n<=t&&t<=i&&r<=e&&e<=a)))(i(t))?f(t,"highlighted"):f(t,"unhighlighted")};var g=r.some(a)&&r.some(t=>!a(t));for(const y of r){const{hotZone:m,brushRegion:v,extent:b}=(a(y)?K5:X5)(y,{offsetY:s,offsetX:l,cross:g,zIndex:999,fill:"transparent"});y.parentNode.appendChild(m),R5(m,Object.assign(Object.assign({},d),{reverse:c,brushRegion:v,brushended(){h.delete(y),p()},brushed(t,e,n,r){h.set(y,b(t,e,n,r)),p()}}))}}function J5(i){return t=>{var{container:t,view:e}=t,{x:n,y:r}=Qx(t).getBBox();return Z5(t,Object.assign({elements:Zx,axes:q5,offsetY:r,offsetX:n,points:t=>t.__data__.points,horizontal:t=>t.attributes.horizontal,datum:a5(e),unhighlightedOpacity:.5},i))}}function Q5(t,e){var{filter:i,reset:n,brushRegion:r,extent:a,reverse:o}=e,e=Q(J(e,["filter","reset","brushRegion","extent","reverse","series"]),"mask"),{width:s,height:l}=t.getBBox(),a=a||[0,0,s,l];const c=function(e=300){let n=null;return t=>{t=t.timeStamp;return null!==n&&t-n<e?(n=t,!0):(n=t,!1)}}(),u=R5(t,Object.assign(Object.assign({},e),{extent:a,brushRegion:r,reverse:o,brushcreated:function(t,e,n,r){i(t,e,n,r),u.remove()}}));function f(t){c(t)&&n()}return t.addEventListener("click",f),()=>{u.destroy(),t.removeEventListener("dblclick",f)}}function tw(t){return t.getBandWidth}function ew(t,e,n){if(!tw(t))return t.invert(e);var r=t["adjustedRange"],i=t.getOptions()["domain"],a=n?-1:0;const o=t.getStep();var t=n?r:r.map(t=>t+o),n=Hc(t,e);return r=n+a,t=0,e=i.length-1,i[Math.min(e,Math.max(t,r))]}function nw(t,e){var n,r;return tw(t)?(t=t.getOptions()["domain"],[n,r]=e,n=t.indexOf(n),r=t.indexOf(r),t.slice(n,r+1)):ru(e)}function rw(t){var i=J(t,[]);return(t,e)=>{const{container:n,view:r,options:f,update:h}=t;t=Qx(n);let d=!1,p=!1,g=r;return Q5(t,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],filter:(s,l,c,u)=>ve(this,void 0,void 0,function*(){if(!p){p=!0;const{scale:e,coordinate:r}=g,{x:i,y:a}=e;var t=(t,e)=>{var[t,n]=r.invert(t);return[ew(i,t,e),ew(a,n,e)]};const n=t([s,l],!0),o=t([c,u],!1);t=f["marks"],t=t.map(t=>B({},t,{scale:{x:{domain:nw(i,[n[0],o[0]])},y:{domain:nw(a,[n[1],o[1]])}}})),t=Object.assign(Object.assign({},f),{marks:t,clip:!0}),t=yield h(t);g=t.view,p=!1,d=!0}}),reset:()=>{!p&&d&&(d=!1,g=r,h(f))},extent:void 0},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),i))}}function iw(t){return rw(Object.assign(Object.assign({},t),{brushRegion:z5}))}function aw(t){return rw(Object.assign(Object.assign({},t),{brushRegion:G5}))}function ow(n){return(t,...e)=>B({},n(t,...e),t)}function sw(n){return(t,...e)=>B({},t,n(t,...e))}function lw(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=J(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const cw=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(t=>{var e=t["data"],t=J(t,["data"]);return Object.assign(Object.assign({},t),{data:lw(e,o),x:n,y:r,width:i,height:a})})},uw=(cw.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var g=n[t],y=g["data"],g=J(g,["data"]),y=lw(y,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:y},g)),p+=h[t]+i}return d}),fw=(uw.props={},()=>t=>{var e=t["children"],t=J(t,["children"]);if(!Array.isArray(e))return[];const{data:a,scale:o={},axis:s={},legend:l={}}=t,n=J(t,["data","scale","axis","legend"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={}}=t,t=J(t,["data","scale","axis","legend"]);return Object.assign({data:lw(e,a),scale:B({},o,n),axis:!(!r||!s)&&B({},s,r),legend:!(!i||!l)&&B({},l,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),hw=(fw.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinates:b,theme:x,component:w,interactions:k,x:M,y:O,key:_,frame:S,title:E,labelTransform:A,parentKey:T,clip:P}=t,t=J(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinates","theme","component","interactions","x","y","key","frame","title","labelTransform","parentKey","clip"]);return[{type:"standardView",x:M,y:O,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinates:b,component:w,interactions:k,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,parentKey:T,clip:P,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),dw=(hw.props={},ow(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=Qc(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),pw=ow(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:B({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:B({title:i},o)}}}),gw=ow(()=>({animate:{enterType:"fadeIn"}})),yw=sw(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),mw=sw(()=>({type:"cell"})),vw=sw(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),bw=sw((t,c=function(t){t=t.points;return $1(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?xw(a,e):(t=e.length?void 0:null,B({title:r===i-1&&void 0,grid:t},a))}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?xw(r,e):(n=e.length?void 0:null,B({title:0===t&&void 0,grid:n},r))}},M={})=>{const{data:e,encode:n,children:u,scale:r,x:O=0,y:_=0,shareData:f=!1,key:S}=t,E=e["value"],{x:A,y:T}=n;t=r.color;const P=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:y,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Z1(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[T]:e}=t,t=void 0===A||t===n,e=void 0===T||e===r;return t&&e}).map(t=>E.filter(t)),v=f?pu(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:T,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],g=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=J(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:T?5:void 0}},r=r?g:0===g.length?[]:E,l={color:{domain:P}},o={x:ww(o,w)(p,r),y:ww(a,k)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+y+O,y:f+m+_,parentKey:S,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:B(s,e,l),axis:B({},i,o),legend:!1},t),M)})})}}});function xw(t,e){return e.length?B({title:!1,tick:null,label:null},t):B({title:!1,tick:null,label:null,grid:null},t)}function ww(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const kw=()=>t=>{return[Tx.of(t).call(mw).call(pw).call(gw).call(dw).call(yw).call(vw).call(bw).value()]},Mw=(kw.props={},ow(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),Ow=sw(t=>{const{data:w,children:c,x:k=0,y:M=0,key:O}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Z1(t);const s=t.map(({points:t})=>$1(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,g]=l[c],y=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=J(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return xw(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return xw(n,e)})(y,w)};return Object.assign({data:w,parentKey:O,key:i+"-"+c,x:u+m+k,y:f+v+M,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:B({x:{facet:!1},y:{facet:!1}},e),axis:B({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:B({},a,{x:p,y:g})},t)})})}}}),_w=sw(t=>{var e=t["encode"],t=J(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=J(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const Sw=()=>t=>{return[Tx.of(t).call(mw).call(pw).call(Ow).call(_w).call(gw).call(yw).call(Mw).value()]},Ew=ow(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Aw=ow(t=>({coordinates:[{type:"polar"}]})),Tw=t=>{var e=t["encode"],t=J(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function Pw(t){return t=>null}function Lw(t){var t=t["points"],[t,e,n,r]=t,i=Y1(t,r),t=V1(t,r),r=V1(e,n),r=(e=r,r=q1(r=t),e=q1(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=U1(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const Nw=()=>t=>{return[Tx.of(t).call(mw).call(Tw).call(pw).call(Aw).call(vw).call(bw,Lw,Pw,Pw,{frame:!1}).call(gw).call(yw).call(Ew).value()]};const Cw=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=B({enterDuration:e,updateDuration:e,exitDuration:e,updateEasing:n,updateType:"morphing",updateFill:"both",exitType:"fadeOut"},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function jw(t,e){if(null!==t)return{type:"column",value:t,field:e}}function Fw(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function Bw(t,e){var n=[];for(const r of t)n[r]=e;return n}function Rw(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function Iw(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=Rw(t,i);if(null!==n)return[n,r]}return[null,null]}function Dw(t){return!(t instanceof Date)&&"object"==typeof t}Cw.props={};const zw=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,B({},e,{encode:{y1:jw(Bw(t,0))}})]};function Ww(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=Rw(r,t))?void 0:t[0]]}).filter(([,t])=>vf(t));return Array.from(Qc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function Gw(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:zc(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>Xw(t=>r(e[t]))):"series"===t?Yw:"value"===t?qw:"sum"===t?Uw:"maxIndex"===t?$w:()=>null}function Hw(t,e){for(const n of t)n.sort(e)}function Vw(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function Yw(t,e,n){return Xw(t=>n[t])}function qw(t,e,n){return Xw(t=>e[t])}function Uw(t,n,e){t=Z1(t),t=Array.from(Qc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return Xw(t=>r.get(e[t]))}function $w(t,n,e){t=Z1(t),t=Array.from(Qc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,gu(e,t=>n[t])]));return Xw(t=>r.get(e[t]))}function Xw(n){return(t,e)=>zc(n(t),n(e))}zw.props={};const Kw=(t={})=>{const{groupBy:T="x",orderBy:P=null,reverse:L=!1,y:N="y",y1:C="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=Rw(r,"y"),[s,l]=Rw(r,"y1"),[r]=j?Iw(r,"series","color"):Rw(r,"color"),c=Ww(T,t,e),n=Gw(P)(n,a,r),u=(n&&Hw(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){L&&_.reverse();var g=s?+s[_[0]]:0,y=[],m=[];for(const S of _){var v=h[S]=+a[S]-g;v<0?m.push(S):0<=v&&y.push(S)}var b=0<y.length?y:m,x=0<m.length?m:y;let t=y.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=g;for(const E of m.reverse()){var w=h[E];n=u[E]=(f[E]=n)+w}let r=g;for(const A of y){var k=h[A];0<k?r=u[A]=(f[A]=r)+k:u[A]=f[A]=r}}const M=new Set(d),O=new Set(p);r="y"===N?u:f,n="y"===C?u:f;return[t,B({},e,{encode:{y:jw(r,o),y1:jw(n,l)},style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>O.has(e)},i)})]}};function Zw(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}Kw.props={};const Jw=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(Zw)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",Kw({groupBy:r})(t,e,n))},Qw=(Jw.props={},(t={})=>{const{channel:i="x"}=t;return(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=Rw(n,i),[t,B({},e,{encode:{title:jw(r,n)}})])}}),t3=(Qw.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,B({},e,{encode:{x:jw(Bw(t,0))},scale:{x:{guide:null}}})]}),e3=(t3.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,B({},e,{encode:{y:jw(Bw(t,0))},scale:{y:{guide:null}}})]}),n3=(e3.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,B({},e,{encode:{size:Fw(Bw(t,3))}})]}),r3=(n3.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=J(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,B({},e,{encode:{key:jw(r)}})]}),i3=(r3.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=Rw(n,"color"),[t,B({},e,{encode:{series:jw(r,i)}})])}),a3=(i3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(Dw)?[t,e]:[t,B({},e,{encode:{y:jw(n)}})]}),o3=(a3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(Dw)?[t,e]:[t,B({},e,{encode:{x:jw(n)}})]}),s3=(o3.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=Rw(n,"y"),[t,B({},e,{encode:{y1:jw([...r])}})])}),l3=(s3.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=Rw(n,"x"),[t,B({},e,{encode:{x1:jw([...r])}})])}),c3=(l3.props={},t=>{const r=t["channel"];return(t,e)=>{const i=e["encode"];var n=i["tooltip"];if(void 0!==n)return[t,e];n=Array.isArray(r)?r:[r];let a=0;n=n.flatMap(e=>Object.entries(i).filter(([t])=>t.startsWith(e)).flatMap(([t])=>{const[e,n]=Rw(i,t);var r,t=[[t,jw(e)]];return e&&null!==n&&(r=e.map(t=>({value:t,field:n})),t.push(["tooltip"+(0===a?"":a),jw(r,n)]),a++),t}));return[t,B({},e,{encode:Object.fromEntries(n)})]}}),u3=(c3.props={},()=>(t,e)=>[t,B({scale:{x:{padding:0},y:{padding:0}}},e)]),f3=(u3.props={},()=>(t,e)=>{var{style:n={}}=e,r=J(e,["data","style"]),{x:i,y:a}=n,n=J(n,["x","y"]);return null==i||null==a?[t,e]:[[0],B({},r,{data:[0],cartesian:!0,encode:{x:jw([i||0]),y:jw([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),h3=(f3.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,B({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),d3=(h3.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(Dw)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,B({},e,{encode:{x:jw(n),y:jw(r)}})])}),p3=(d3.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,B({},e,{encode:{series:Fw(Bw(t,void 0))}})]:[t,e]}),g3=(p3.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return J(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=Rw(r,"y"),[r]=Iw(r,"series","color"),o=Vw(r,i),i=Ww(c,t,e),n=Gw(f)(n,a,r),s=(n&&Hw(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,B({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:jw(s)}})]}}),y3=(g3.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:y=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,Rw(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(Qc(n,t=>f[t]).values());a.push(...o)}i=a}if(y){const[h]=Rw(e,y);h&&i.sort((t,e)=>g(t,h)-g(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[Bw(n,r)]:Iw(e,"enterDuration",Bw(n,r));var[l]=Iw(e,"enterDelay",Bw(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=pu(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,B({},t,{encode:{enterDuration:Fw(s),enterDelay:Fw(c)}})]}});y3.props={};const m3=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=J(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Rw(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=Ww(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>yu(t,t=>e[+t]),max:(t,e)=>pu(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>bu(t,t=>e[+t]),median:(t,e)=>xu(t,t=>e[+t]),sum:(t,e)=>Mu(t,t=>e[+t]),deviation:(t,e)=>Uc(t,t=>e[+t])}[r]||pu;for(const e of i){var c=l(e,o);for(const h of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[h]=+u[h]/c}}return[e,B({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,jw(e,Rw(n,t)[1])]))})]}};function v3(t,e,n){return null===t?[-.5,.5]:(t=Vw(t,e),[-(e=new Up({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function b3(t,e,n){return e*(1-t)+n*t}m3.props={};const x3=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=Rw(n,"x"),[n]=Rw(n,"y");const o=v3(a,r,l),s=v3(n,i,c);a=t.map(()=>b3(u(),...s)),r=t.map(()=>b3(u(),...o));return[t,B({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:jw(a),dx:jw(r)}})]}},w3=(x3.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=Rw(n,"x");const i=v3(n,r,a);n=t.map(()=>b3(o(),...i));return[t,B({scale:{x:{padding:.5}}},e,{encode:{dx:jw(n)}})]}}),k3=(w3.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=J(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Rw(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=Ww(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=$c(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,B({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,jw(e,Rw(n,t)[1])]))})]}}),M3=(k3.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=Rw(n,"y");var[,i]=Rw(n,"y1"),n=(f?Iw(n,"series","color"):Rw(n,"color"),Ww(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,B({},e,{encode:{y1:jw(a,i)}})]}});function O3(t,e){return[t[0]]}function _3(t,e){return[t[t.length-1]]}function S3(t,e){return[t[gu(t,t=>e[t])]]}function E3(t,e){return[t[function(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}(t,t=>e[t])]]}M3.props={};const A3=(t={})=>{const{groupBy:s="series"}=t,l=J(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=Ww(s,t,e),[r,i]=Object.entries(l)[0];const[a]=Rw(n,r),o="function"==typeof(n=i)?n:{first:O3,last:_3,max:S3,min:E3}[n]||O3;return[t.flatMap(t=>o(t,a)),e]}},T3=(A3.props={},(t={})=>{var e=t["selector"],t=J(t,["selector"]);return A3(Object.assign({x:e},t))}),P3=(T3.props={},(t={})=>{var e=t["selector"],t=J(t,["selector"]);return A3(Object.assign({y:e},t))});function L3(e){return t=>null===t?e:e+" of "+t}function N3(){return[(t,e)=>bu(t,t=>+e[t]),L3("mean")]}function C3(){return[(t,e)=>xu(t,t=>+e[t]),L3("median")]}function j3(){return[(t,e)=>pu(t,t=>+e[t]),L3("max")]}function F3(){return[(t,e)=>yu(t,t=>+e[t]),L3("min")]}function B3(){return[(t,e)=>t.length,L3("count")]}function R3(){return[(t,e)=>Mu(t,t=>+e[t]),L3("sum")]}function I3(){return[(t,e)=>e[t[0]],L3("first")]}function D3(){return[(t,e)=>e[t[t.length-1]],L3("last")]}P3.props={};const z3=(t={})=>{const a=t["groupBy"],c=J(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,l=a(t,e);var n,r,i;return l?(n=Object.entries(c).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:N3,max:j3,count:B3,first:I3,last:D3,sum:R3,min:F3,median:C3}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=Rw(s,t);return[t,jw(l.map(t=>n(t,null!==i&&void 0!==i?i:o)),(null==r?void 0:r(a))||a)]}),r=Object.keys(s).map(t=>{const[e,n]=Rw(s,t);return[t,jw(l.map(t=>e[t[0]]),n)]}),i=l.map(t=>o[t[0]]),[Z1(l),B({},e,{data:i,encode:Object.fromEntries([...r,...n])})]):[t,e]}},W3=(z3.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=J(t,["channels"]);return z3(Object.assign(Object.assign({},e),{groupBy:(t,e)=>Ww(n,t,e)}))}),G3=(W3.props={},(t={})=>W3(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),H3=(G3.props={},(t={})=>W3(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),V3=(H3.props={},(t={})=>W3(Object.assign(Object.assign({},t),{channels:["color"]})));function Y3(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=J(n,["reverse","slice","channel"]),o=e["encode"];const[s]=Rw(o,a);var l,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=Rw(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>pu(t,t=>+a[t]);if("min"===i)return t=>yu(t,t=>+a[t]);if("sum"===i)return t=>Mu(t,t=>+a[t]);if("median"===i)return t=>xu(t,t=>+a[t]);if("mean"===i)return t=>bu(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),n=(o=t,c=t=>s[t],(2!==(l=n).length?ru(tu(o,l,c),([t,e],[n,r])=>zc(e,r)||zc(t,n)):ru(Qc(o,c),([t,e],[n,r])=>l(e,r)||zc(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),c=i?n.slice(...o):n;return[t,B(e,{scale:{[a]:{domain:c}}})]}V3.props={};const q3=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=J(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return Y3(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=Rw(i,r);return i=ru(t,t=>a[t]),n&&i.reverse(),[i,e]}}},U3=(q3.props={},(t={})=>q3(Object.assign(Object.assign({},t),{channel:"x"}))),$3=(U3.props={},(t={})=>q3(Object.assign(Object.assign({},t),{channel:"color"}))),X3=($3.props={},(t={})=>q3(Object.assign(Object.assign({},t),{channel:"y"})));X3.props={};const K3=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=Rw(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):Rw(r,s)[0],r=eu(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>Mu(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,B({},e,{scale:{x:{flex:r}}})]}};function Z3(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=$1(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}K3.props={};const J3=()=>(t,e)=>[t,B({},e,{modifier:Z3,axis:!1})],Q3=(J3.props={},"thresholds");function tk(t){var[e,n]=$c(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(qc(t))/(3.49*Uc(t)))))}const ek=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=J(t,["groupChannels","binChannels"]),u={};return z3(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(Q3)))),Object.fromEntries(l.flatMap(e=>[[e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",([t])=>+u[e].get(t).split(",")[1]]]))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=Rw(n,t);return t}),a=Q(c,Q3),o=t.filter(e=>i.every(t=>vf(t[e]))),r=[...s.map(t=>{var[t]=Rw(n,t);return t}).filter(vf).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||tk(n),e=du().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(Qc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},nk=(ek.props={},(t={})=>{var e=t["thresholds"];return ek(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});nk.props={};const rk=(t={})=>{const{groupBy:n,thresholds:o=2e3}=t,e=J(t,["groupBy","thresholds"]);return z3(Object.assign(Object.assign({},e),{groupBy:(t,e)=>{t=Ww(n,t,e);return t.every(t=>t.length<=o)?null:t.flatMap(e=>{{var n=e,r=Math.max(1,Math.floor(e.length/o)),i=n.length,a=[];let t=0;for(;t<i;)a.push(n.slice(t,t+=r));return a}})}}))},ik=(rk.props={},(s={})=>(t,e)=>{const i=e["encode"],n=Object.entries(s).map(([t,e])=>{const[n]=Rw(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(vf);if(0===n.length)return[t,e];const r=t.filter(e=>n.every(t=>t(e))),a=r.map((t,e)=>e);var o=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:a.map(t=>e.value[r[t]])})]);return[t,B({},e,{encode:Object.fromEntries(o)})]});function ak(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function ok(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}ik.props={};const sk=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{t.attr("visibility","visible");const i=t.getLocalBounds();n.some(t=>{var e=ak(i),t=ak(t.getLocalBounds()),[e,n]=e,[t,r]=t;return e[0]<r[0]&&n[0]>t[0]&&e[1]<r[1]&&n[1]>t[1]})?t.attr("visibility","hidden"):n.push(t)}),t}};function lk(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const ck=t=>{const{maxIterations:k=10,maxError:M=.1,padding:O=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=lk(),[m,v]=lk();var a,o,s,l,[c,t]=lk(),[u,n]=lk();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,g]=r;var[r,f]=f;y(b,g),v(b,g),t(b,f-g),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>zc(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=m(h);var d=c(h),p=m(e),d=p-(g+d);d<O&&(d=(O-d)/2,r=Math.max(r,d),v(h,g-d),v(e,p+d))}}if(r<M)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}};function uk(t){t/=255;return t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4)}function fk(t,e,n){return.2126*uk(t)+.7152*uk(e)+.0722*uk(n)}function hk(t,e){var{r:t,g:n,b:r}=t,{r:e,g:i,b:a}=e,t=fk(t,n,r),n=fk(e,i,a);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function dk(e,t){return t[gu(t,t=>{return hk(e,"object"==typeof(t=t)?t:F.parseColor(t))})]}const pk=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;hk(t.parsedStyle.fill,e)<n&&t.attr("fill",dk(e,r))}),t)},gk=t=>(t,e)=>(t.forEach(t=>{t.attr("visibility","visible");var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!(ok(t,e)&&ok(n,e))}(ak(t.getLocalBounds()),e)||t.attr("visibility","hidden")}),t);var P=1e-6,yk=1e-12,E=Math.PI,mk=E/2,vk=E/4,bk=2*E,xk=180/E,wk=E/180,kk=Math.abs,Mk=Math.atan,Ok=Math.atan2,A=Math.cos,_k=Math.ceil,Sk=Math.exp,Ek=Math.log,Ak=Math.pow,T=Math.sin,Tk=Math.sign||function(t){return 0<t?1:t<0?-1:0},Pk=Math.sqrt,Lk=Math.tan;function Nk(t){return 1<t?0:t<-1?E:Math.acos(t)}function Ck(t){return 1<t?mk:t<-1?-mk:Math.asin(t)}function jk(){}function Fk(t,e){t&&Rk.hasOwnProperty(t.type)&&Rk[t.type](t,e)}var Bk={Feature:function(t,e){Fk(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Fk(n[r].geometry,e)}},Rk={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ik(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ik(n[r],e,0)},Polygon:function(t,e){Dk(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Dk(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Fk(n[r],e)}};function Ik(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Dk(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ik(t[n],e,1);e.polygonEnd()}function zk(t,e){t&&Bk.hasOwnProperty(t.type)?Bk[t.type](t,e):Fk(t,e)}function Wk(t){return[Ok(t[1],t[0]),Ck(t[2])]}function Gk(t){var e=t[0],t=t[1],n=A(t);return[n*A(e),n*T(e),T(t)]}function Hk(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Vk(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Yk(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function qk(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Uk(t){var e=Pk(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function $k(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function Xk(t,e){return kk(t)>E&&(t-=Math.round(t/bk)*bk),[t,e]}function Kk(t,e,n){return(t%=bk)?e||n?$k(Jk(t),Qk(e,n)):Jk(t):e||n?Qk(e,n):Xk}function Zk(n){return function(t,e){return kk(t+=n)>E&&(t-=Math.round(t/bk)*bk),[t,e]}}function Jk(t){var e=Zk(t);return e.invert=Zk(-t),e}function Qk(t,e){var i=A(t),a=T(t),o=A(e),s=T(e);function n(t,e){var n=A(e),r=A(t)*n,t=T(t)*n,n=T(e),e=n*i+r*a;return[Ok(t*o-e*s,r*i-n*a),Ck(e*o+t*s)]}return n.invert=function(t,e){var n=A(e),r=A(t)*n,t=T(t)*n,n=T(e),e=n*o-t*s;return[Ok(t*o+n*s,r*i+e*a),Ck(e*i-r*a)]},n}function tM(t,e){(e=Gk(e))[0]-=t,Uk(e);t=Nk(-e[1]);return((-e[2]<0?-t:t)+bk-P)%bk}function eM(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:jk,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function nM(t,e){return kk(t[0]-e[0])<P&&kk(t[1]-e[1])<P}function rM(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function iM(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(nM(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*P}s.push(n=new rM(r,t,null,!0)),l.push(n.o=new rM(r,null,n,!1)),s.push(n=new rM(i,t,null,!1)),l.push(n.o=new rM(i,null,n,!0))}}),s.length){for(l.sort(e),aM(s),aM(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function aM(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function oM(t){return kk(t[0])<=E?t[0]:Tk(t[0])*((kk(t[0])+E)%bk-E)}function sM(y,m,v,b){return function(s){var l,c,u,n=m(s),f=eM(),h=m(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=wu(c);var t=function(t,e){var n=oM(e),r=e[1],e=T(r),i=[T(n),-A(n),0],a=0,o=0,s=new Xc;1===e?r=mk+P:-1===e&&(r=-mk-P);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=oM(h),p=h[1]/2+vk,g=T(p),y=A(p),m=0;m<f;++m,d=b,g=w,y=x,h=v){var v=u[m],b=oM(v),x=v[1]/2+vk,w=T(x),x=A(x),k=b-d,M=0<=k?1:-1,O=M*k,_=E<O,S=g*w;s.add(Ok(S*M*T(O),y*x+S*A(O))),a+=_?k+M*bk:k,_^n<=d^n<=b&&(Uk(S=Vk(Gk(h),Gk(v))),Uk(O=Vk(i,S)),(M=(_^0<=k?-1:1)*Ck(O[2]))<r||r===M&&(S[0]||S[1]))&&(o+=_^0<=k?1:-1)}return(a<-P||a<P&&s<-yk)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),iM(c,cM,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){y(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(lM))}return e}}function lM(t){return 1<t.length}function cM(t,e){return((t=t.x)[0]<0?t[1]-mk-P:mk-t[1])-((e=e.x)[0]<0?e[1]-mk-P:mk-e[1])}Xk.invert=Xk;var uM=sM(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?E:-E,l=kk(t-f);kk(l-E)<P?(c.point(f,h=0<(h+e)/2?mk:-mk),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&E<=l&&(kk(f-d)<P&&(f-=d*P),kk(t-s)<P&&(t-=s*P),l=h,i=e,o=T((n=f)-(r=t)),h=kk(o)>P?Mk((T(l)*(a=A(i))*T(r)-T(i)*(r=A(l))*T(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*mk,r.point(-E,i),r.point(0,i),r.point(E,i),r.point(E,0),r.point(E,-i),r.point(0,-i),r.point(-E,-i),r.point(-E,0),r.point(-E,i)):kk(t[0]-e[0])>P?(t=t[0]<e[0]?E:-E,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-E,-mk]);function fM(d){var g=A(d),p=6*wk,f=0<g,h=kk(g)>P;function y(t,e){return A(t)*A(e)>g}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=Vk(Gk(t),Gk(e)),h=Hk(f,f),d=f[0],p=h-d*d;return p?(r=Vk(u,f),Yk(u=qk(u,g*h/p),qk(f,-g*d/p)),(p=(f=Hk(u,h=r))*f-(d=Hk(h,h))*(Hk(u,u)-1))<0?void 0:(Yk(p=qk(h,(-f-(r=Pk(p)))/d),u),p=Wk(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=kk((s=a-i)-E)<P)&&e<o&&(c=o,o=e,e=c),(l||s<P?l?0<o+e^p[1]<(kk(p[0]-i)<P?o:e):o<=p[1]&&p[1]<=e:E<s^(i<=p[0]&&p[0]<=a))?(Yk(c=qk(h,(-f+r)/d),u),[p,Wk(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:E-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return sM(y,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=y(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?E:-E),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!nM(o,n)&&!nM(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&nM(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=A(r),c=T(r),u=o*a;null==n?(n=r+o*bk,s=r-u/2):(n=tM(l,n),s=tM(l,s),(0<o?n<s:s<n)&&(n+=o*bk));for(var f,h=n;0<o?s<h:h<s;h-=u)f=Wk([l,-c*A(h),-c*T(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-E,d-E])}var hM=1e9,dM=-hM;function pM(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function k(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return kk(t[0]-m)<P?0<e?0:3:kk(t[0]-b)<P?0<e?2:1:kk(t[1]-v)<P?0<e?1:0:0<e?3:2}function M(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,g=r,t=eM(),e={point:n,lineStart:function(){e.point=y,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(y(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&g.lineEnd()},polygonStart:function(){g=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=wu(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),k(null,null,1,r),r.lineEnd()),n&&iM(i,M,t,k,r),r.polygonEnd());g=r,i=f=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&h?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(dM,Math.min(hM,c)),u=Math.max(dM,Math.min(hM,u))],r=[t=Math.max(dM,Math.min(hM,t)),e=Math.max(dM,Math.min(hM,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(h||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function gM(t,e,n){var r=ku(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function yM(t,e,n){var r=ku(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function mM(){return g=p=10,y=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(v)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(y=+t[0],m=+t[1],e):[y,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(v=+t,u=gM(s,o,90),f=yM(r,n,v),h=gM(c,l,90),d=yM(a,i,v),e):v},e.extentMajor([[-180,-90+P],[180,90-P]]).extentMinor([[-180,-80-P],[180,80+P]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return ku(_k(a/y)*y,i,y).map(h).concat(ku(_k(c/m)*m,l,m).map(d)).concat(ku(_k(r/p)*p,n,p).filter(function(t){return kk(t%y)>P}).map(u)).concat(ku(_k(s/g)*g,o,g).filter(function(t){return kk(t%m)>P}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v}var vM,bM,xM,wM,kM=t=>t,MM=new Xc,OM=new Xc,_M={point:jk,lineStart:jk,lineEnd:jk,polygonStart:function(){_M.lineStart=SM,_M.lineEnd=TM},polygonEnd:function(){_M.lineStart=_M.lineEnd=_M.point=jk,MM.add(kk(OM)),OM=new Xc},result:function(){var t=MM/2;return MM=new Xc,t}};function SM(){_M.point=EM}function EM(t,e){_M.point=AM,vM=xM=t,bM=wM=e}function AM(t,e){OM.add(wM*t-xM*e),xM=t,wM=e}function TM(){AM(vM,bM)}var PM=_M,LM=1/0,NM=LM,CM=-LM,jM=CM;var FM,BM,RM,IM,DM={point:function(t,e){t<LM&&(LM=t);CM<t&&(CM=t);e<NM&&(NM=e);jM<e&&(jM=e)},lineStart:jk,lineEnd:jk,polygonStart:jk,polygonEnd:jk,result:function(){var t=[[LM,NM],[CM,jM]];return CM=jM=-(NM=LM=1/0),t}},zM=0,WM=0,GM=0,HM=0,VM=0,YM=0,qM=0,UM=0,$M=0,XM={point:KM,lineStart:ZM,lineEnd:t4,polygonStart:function(){XM.lineStart=e4,XM.lineEnd=n4},polygonEnd:function(){XM.point=KM,XM.lineStart=ZM,XM.lineEnd=t4},result:function(){var t=$M?[qM/$M,UM/$M]:YM?[HM/YM,VM/YM]:GM?[zM/GM,WM/GM]:[NaN,NaN];return zM=WM=GM=HM=VM=YM=qM=UM=$M=0,t}};function KM(t,e){zM+=t,WM+=e,++GM}function ZM(){XM.point=JM}function JM(t,e){XM.point=QM,KM(RM=t,IM=e)}function QM(t,e){var n=t-RM,r=e-IM,n=Pk(n*n+r*r);HM+=n*(RM+t)/2,VM+=n*(IM+e)/2,YM+=n,KM(RM=t,IM=e)}function t4(){XM.point=KM}function e4(){XM.point=r4}function n4(){i4(FM,BM)}function r4(t,e){XM.point=i4,KM(FM=RM=t,BM=IM=e)}function i4(t,e){var n=t-RM,r=e-IM,n=Pk(n*n+r*r);HM+=n*(RM+t)/2,VM+=n*(IM+e)/2,YM+=n,qM+=(n=IM*t-RM*e)*(RM+t),UM+=n*(IM+e),$M+=3*n,KM(RM=t,IM=e)}var a4=XM;function o4(t){this._context=t}o4.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,bk)}},result:jk};var s4,l4,c4,u4,f4,h4=new Xc,d4={point:jk,lineStart:function(){d4.point=p4},lineEnd:function(){s4&&g4(l4,c4),d4.point=jk},polygonStart:function(){s4=!0},polygonEnd:function(){s4=null},result:function(){var t=+h4;return h4=new Xc,t}};function p4(t,e){d4.point=g4,l4=u4=t,c4=f4=e}function g4(t,e){u4-=t,f4-=e,h4.add(Pk(u4*u4+f4*f4)),u4=t,f4=e}var y4=d4;let m4,v4,b4,x4;class w4{constructor(t){this._append=null==t?k4:function(t){var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);if(15<e)return k4;if(e!==m4){const r=10**e;m4=e,v4=function(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}return v4}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:var n,r;this._append`M${t},${e}`,this._radius===b4&&this._append===v4||(n=this._radius,r=this._,this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,b4=n,v4=this._append,x4=this._,this._=r),this._+=x4}}result(){var t=this._;return this._="",t.length?t:null}}function k4(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function M4(e,n){let r=3,i=4.5,a,o;function s(t){return t&&("function"==typeof i&&o.pointRadius(+i.apply(this,arguments)),zk(t,a(o))),o.result()}return s.area=function(t){return zk(t,a(PM)),PM.result()},s.measure=function(t){return zk(t,a(y4)),y4.result()},s.bounds=function(t){return zk(t,a(DM)),DM.result()},s.centroid=function(t){return zk(t,a(a4)),a4.result()},s.projection=function(t){return arguments.length?(a=null==t?(e=null,kM):(e=t).stream,s):e},s.context=function(t){return arguments.length?(o=null==t?(n=null,new w4(r)):new o4(n=t),"function"!=typeof i&&o.pointRadius(i),s):n},s.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(o.pointRadius(+t),+t),s):i},s.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return null===n&&(o=new w4(r)),s},s.projection(e).digits(r).context(n)}function O4(r){return function(t){var e,n=new _4;for(e in r)n[e]=r[e];return n.stream=t,n}}function _4(){}function S4(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),zk(n,t.stream(DM)),e(DM.result()),null!=r&&t.clipExtent(r),t}function E4(i,a,t){return S4(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function A4(t,e,n){return E4(t,[[0,0],e],n)}function T4(r,i,t){return S4(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function P4(i,a,t){return S4(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}_4.prototype={constructor:_4,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var L4=16,N4=A(30*wk);function C4(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,g={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),g.lineStart=v},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=Gk([t,e]),e=E(t,e);T(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],L4,r),r.point(u,f)}function m(){g.point=t,r.lineEnd()}function v(){e(),g.point=b,g.lineEnd=x}function b(t,e){y(n=t,e),i=u,a=f,o=h,s=d,l=p,g.point=y}function x(){T(u,f,c,h,d,p,i,a,n,o,s,l,L4,r),g.lineEnd=m,m()}return g}):(n=t,O4({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function T(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,g,y,m,v,b,x,w,k,M,O=o-t,_=s-e,S=O*O+_*_;4*A<S&&h--&&(y=a+f,x=Ck(y/=m=Pk((p=r+c)*p+(g=i+u)*g+y*y)),v=kk(kk(y)-1)<P||kk(n-l)<P?(n+l)/2:Ok(g,p),b=(x=E(v,x))[0],x=x[1],A<(M=_*(w=b-t)-O*(k=x-e))*M/S||.3<kk((O*w+_*k)/S-.5)||r*c+i*u+a*f<N4)&&(T(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,h,d),d.point(b,x),T(b,x,v,p,g,y,o,s,l,c,u,f,h,d))}}var j4=O4({point:function(t,e){this.stream.point(t*wk,e*wk)}});function F4(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,g,y,m;return e?(f=A(e),e=T(e),h=f*t,d=e*t,p=f/t,g=e/t,y=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+y),a*(m-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function B4(t){return R4(function(){return t})()}function R4(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,k=null,M=uM,O=null,_=kM,S=.5;function E(t){return l(t[0]*wk,t[1]*wk)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*xk,t[1]*xk]}function T(){var t=F4(f,0,0,x,w,b).apply(null,e(p,g)),t=F4(f,h-t[0],d-t[1],x,w,b);return r=Kk(y,m,v),s=$k(e,t),l=$k(r,s),o=C4(s,S),P()}function P(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=j4((n=r,O4({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(M(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(M=t,k=void 0,P()):M},E.postclip=function(t){return arguments.length?(_=t,O=n=i=a=null,P()):_},E.clipAngle=function(t){return arguments.length?(M=+t?fM(k=t*wk):(k=null,uM),P()):k*xk},E.clipExtent=function(t){return arguments.length?(_=null==t?(O=n=i=a=null,kM):pM(O=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),P()):null==O?null:[[O,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,T()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],T()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*wk,g=t[1]%360*wk,T()):[p*xk,g*xk]},E.rotate=function(t){return arguments.length?(y=t[0]%360*wk,m=t[1]%360*wk,v=2<t.length?t[2]%360*wk:0,T()):[y*xk,m*xk,v*xk]},E.angle=function(t){return arguments.length?(b=t%360*wk,T()):b*xk},E.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},E.precision=function(t){return arguments.length?(o=C4(s,S=t*t),P()):Pk(S)},E.fitExtent=function(t,e){return E4(E,t,e)},E.fitSize=function(t,e){return A4(E,t,e)},E.fitWidth=function(t,e){return T4(E,t,e)},E.fitHeight=function(t,e){return P4(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,T()}}function I4(t){var e=0,n=E/3,r=R4(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*wk,n=t[1]*wk):[e*xk,n*xk]},t}function D4(t,e){var n,r,i,a=T(t),o=(a+T(e))/2;return kk(o)<P?(n=A(t),s.invert=function(t,e){return[t/n,Ck(e*n)]},s):(i=Pk(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=Ok(t,kk(e))*Tk(e);return e*o<0&&(n-=E*Tk(t)*Tk(e)),[n/o,Ck((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,T(e)/n]}function l(t,e){e=Pk(r-2*o*T(e))/o;return[e*T(t*=o),i-e*A(t)]}}function z4(){return I4(D4).scale(155.424).center([0,33.6442])}function W4(){return z4().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function G4(i){return function(t,e){var n=A(t),r=A(e),n=i(n*r);return n===1/0?[2,0]:[n*r*T(t),n*T(e)]}}function H4(a){return function(t,e){var n=Pk(t*t+e*e),r=a(n),i=T(r),r=A(r);return[Ok(t*i,n*r),Ck(n&&e*i/n)]}}var V4=G4(function(t){return Pk(2/(1+t))});V4.invert=H4(function(t){return 2*Ck(t/2)});var Y4=G4(function(t){return(t=Nk(t))&&t/T(t)});function q4(t,e){return[t,Ek(Lk((mk+e)/2))]}function U4(r){var i,a,o,s=B4(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=E*l(),n=s((e=Kk((e=s.rotate())[0]*wk,e[1]*wk,2<e.length?e[2]*wk:0),function(t){return(t=e.invert(t[0]*wk,t[1]*wk))[0]*=xk,t[1]*=xk,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===q4?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function $4(t){return Lk((mk+t)/2)}function X4(t,e){var n=A(t),i=t===e?T(t):Ek(n/A(e))/Ek($4(e)/$4(t)),a=n*Ak($4(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=Tk(i)*Pk(t*t+e*e),r=Ok(t,kk(e))*Tk(e);return e*i<0&&(r-=E*Tk(t)*Tk(e)),[r/i,2*Mk(Ak(a/n,1/i))-mk]},r):q4;function r(t,e){0<a?e<-mk+P&&(e=-mk+P):mk-P<e&&(e=mk-P);e=a/Ak($4(e),i);return[e*T(i*t),a-e*A(i*t)]}}function K4(t,e){return[t,e]}function Z4(t,e){var n=A(t),r=t===e?T(t):(n-A(e))/(e-t),i=n/r+t;return kk(r)<P?K4:(a.invert=function(t,e){var e=i-e,n=Ok(t,kk(e))*Tk(e);return e*r<0&&(n-=E*Tk(t)*Tk(e)),[n/r,i-Tk(r)*Pk(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*T(t),i-e*A(t)]}}Y4.invert=H4(function(t){return t}),q4.invert=function(t,e){return[t,2*Mk(Sk(e))-mk]},K4.invert=K4;var J4=1.340264,Q4=-.081106,tO=893e-6,eO=.003796,nO=Pk(3)/2;function rO(t,e){var e=Ck(nO*T(e)),n=e*e,r=n*n*n;return[t*A(e)/(nO*(J4+3*Q4*n+r*(7*tO+9*eO*n))),e*(J4+Q4*n+r*(tO+eO*n))]}function iO(t,e){var n=A(e),r=A(t)*n;return[n*T(t)/r,T(e)/r]}function aO(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function oO(t,e){return[A(e)*T(t),T(e)]}function sO(t,e){var n=A(e),r=1+A(t)*n;return[n*T(t)/r,T(e)/r]}function lO(t,e){return[Ek(Lk((mk+e)/2)),-t]}rO.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(J4+Q4*i+a*(tO+eO*i))-e)/(J4+3*Q4*i+a*(7*tO+9*eO*i)))*r)*i*i,!(kk(n)<yk));++o);return[nO*t*(J4+3*Q4*i+a*(7*tO+9*eO*i))/A(r),Ck(T(r)/nO)]},iO.invert=H4(Mk),aO.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),kk(a)>P&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},oO.invert=H4(Ck),sO.invert=H4(function(t){return 2*Mk(t)}),lO.invert=function(t,e){return[-e,2*Mk(Sk(t))-mk]};var cO=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=W4(),l=z4().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=z4().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+P,r+.12*e+P],[n-.214*e-P,r+.234*e-P]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+P,r+.166*e+P],[n-.115*e-P,r+.234*e-P]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return E4(f,t,e)},f.fitSize=function(t,e){return A4(f,t,e)},f.fitWidth=function(t,e){return T4(f,t,e)},f.fitHeight=function(t,e){return P4(f,t,e)},f.scale(1070)},geoAlbers:W4,geoAzimuthalEqualArea:function(){return B4(V4).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:V4,geoAzimuthalEquidistant:function(){return B4(Y4).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Y4,geoConicConformal:function(){return I4(X4).scale(109.5).parallels([30,30])},geoConicConformalRaw:X4,geoConicEqualArea:z4,geoConicEqualAreaRaw:D4,geoConicEquidistant:function(){return I4(Z4).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:Z4,geoEqualEarth:function(){return B4(rO).scale(177.158)},geoEqualEarthRaw:rO,geoEquirectangular:function(){return B4(K4).scale(152.63)},geoEquirectangularRaw:K4,geoGnomonic:function(){return B4(iO).scale(144.049).clipAngle(60)},geoGnomonicRaw:iO,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,g=1,y=1,m=O4({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=kM;function b(){return g=l*f,y=l*h,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*y;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/g,t/y]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,kM):pM(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=T(d=t%360*wk),r=A(d),b()):d*xk},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return E4(x,t,e)},x.fitSize=function(t,e){return A4(x,t,e)},x.fitWidth=function(t,e){return T4(x,t,e)},x.fitHeight=function(t,e){return P4(x,t,e)},x},geoProjection:B4,geoProjectionMutator:R4,geoMercator:function(){return U4(q4).scale(961/bk)},geoMercatorRaw:q4,geoNaturalEarth1:function(){return B4(aO).scale(175.295)},geoNaturalEarth1Raw:aO,geoOrthographic:function(){return B4(oO).scale(249.5).clipAngle(90+P)},geoOrthographicRaw:oO,geoStereographic:function(){return B4(sO).scale(250).clipAngle(142)},geoStereographicRaw:sO,geoTransverseMercator:function(){var t=U4(lO),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:lO});function uO(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function fO(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(dO),e.find(t=>t.sphere)?{type:"Sphere"}:uO(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=M4(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function hO(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[mM()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function dO(t){return"geoPath"===t.type}var pO,Ra=()=>t=>{var{children:e,projection:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=J(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+tl(t);if(e=cO[e])return e;throw new Error("Unknown projection: "+t)}(r),p=e.map(hO);let g;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinates:[{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(fO(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=M4(i);const u=new i0({domain:[t,t+n]}),f=new i0({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}}],children:p.flatMap(t=>{return dO(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>g(t)})})):t;var e})})]},Ia=(Ra.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=J(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]});Ia.props={};const gO={"composition.geoView":Ra,"composition.geoPath":Ia};function yO(){return Object.assign({"data.fetch":Vh,"data.inline":Zh,"data.sortBy":Kh,"data.sort":Uh,"data.filter":qh,"data.pick":$h,"data.rename":Xh,"data.fold":Yh,"data.slice":Sd,"data.custom":Jh,"data.map":Qh,"data.cluster":Th,"data.tree":Ph,"data.sankey":df,"data.arc":rd,"data.wordCloud":Md,"data.join":_d,"transform.maybeZeroY1":zw,"transform.maybeZeroX":t3,"transform.maybeStackY":Jw,"transform.maybeTitle":Qw,"transform.maybeSeries":i3,"transform.maybeZeroPadding":u3,"transform.stackY":Kw,"transform.binX":nk,"transform.bin":ek,"transform.dodgeX":g3,"transform.jitter":x3,"transform.jitterX":w3,"transform.symmetryY":k3,"transform.diffY":M3,"transform.stackEnter":y3,"transform.normalizeY":m3,"transform.select":A3,"transform.selectX":T3,"transform.selectY":P3,"transform.groupX":G3,"transform.groupY":H3,"transform.groupColor":V3,"transform.group":W3,"transform.maybeSize":n3,"transform.maybeZeroY":e3,"transform.maybeKey":r3,"transform.sortX":U3,"transform.sortY":X3,"transform.sortColor":$3,"transform.flexX":K3,"transform.maybeTupleY":a3,"transform.maybeTupleX":o3,"transform.maybeIdentityY":s3,"transform.maybeIdentityX":l3,"transform.maybeTuple":d3,"transform.maybeVisualPosition":f3,"transform.maybeFunctionAttribute":h3,"transform.maybeGradient":p3,"transform.maybeTooltip":c3,"transform.pack":J3,"transform.sample":rk,"transform.filter":ik,"coordinate.cartesian":sl,"coordinate.polar":ll,"coordinate.helix":cl,"coordinate.transpose":ul,"coordinate.theta":pl,"coordinate.reflect":fl,"coordinate.reflectX":hl,"coordinate.reflectY":dl,"coordinate.parallel":yl,"coordinate.fisheye":ml,"coordinate.fisheyeX":vl,"coordinate.fisheyeY":bl,"coordinate.radial":gl,"encode.constant":xl,"encode.field":kl,"encode.transform":wl,"encode.column":Ml,"mark.interval":Ic,"mark.rect":Dc,"mark.line":Cu,"mark.point":ju,"mark.text":Fu,"mark.cell":Bu,"mark.area":Ru,"mark.link":Iu,"mark.image":Du,"mark.polygon":zu,"mark.box":Wu,"mark.vector":Gu,"mark.lineX":Vu,"mark.lineY":Hu,"mark.connector":Yu,"mark.range":$u,"mark.rangeX":Xu,"mark.rangeY":Ku,"mark.sankey":kf,"mark.path":Mf,"mark.treemap":Af,"mark.pack":Tf,"mark.boxplot":If,"mark.shape":Df,"mark.forceGraph":Eh,"mark.tree":Lh,"mark.wordCloud":Ed,"palette.category10":Ad,"palette.category20":Td,"palette.sequentialBlue":Pd,"palette.sequentialDarkBlue":Ld,"palette.sequentialGreen":Nd,"palette.sequentialDarkGreen":Cd,"palette.sequentialGrey":jd,"palette.sequentialOrange":Fd,"palette.sequentialPink":Bd,"palette.sequentialRed":Rd,"palette.sequentialYellow":Id,"palette.sequentialPurple":Dd,"palette.sequentialYellowOrange":zd,"palette.sequentialYellowGreen":Wd,"palette.sequentialPinkPurple":Gd,"palette.sequentialGreenBlue":Hd,"palette.divergingGreenYellow":Vd,"palette.divergingRedBlue":Yd,"palette.divergingGreenRed":qd,"palette.divergingRedPurple":Ud,"scale.linear":L0,"scale.ordinal":N0,"scale.band":P0,"scale.identity":C0,"scale.point":j0,"scale.time":F0,"scale.log":B0,"scale.pow":R0,"scale.sqrt":W0,"scale.threshold":I0,"scale.quantile":D0,"scale.quantize":z0,"scale.sequential":G0,"shape.interval.rect":sg,"shape.interval.hollow":lg,"shape.interval.funnel":cg,"shape.interval.pyramid":fg,"shape.rect.rect":sg,"shape.rect.hollow":lg,"shape.cell.cell":sg,"shape.cell.hollow":lg,"shape.line.line":gg,"shape.line.hv":mg,"shape.line.vh":vg,"shape.line.hvh":bg,"shape.line.smooth":yg,"shape.point.bowtie":Mg,"shape.point.cross":Og,"shape.point.diamond":_g,"shape.point.hexagon":Sg,"shape.point.hollowBowtie":Eg,"shape.point.hollowDiamond":Ag,"shape.point.hollowHexagon":Tg,"shape.point.hollow":Pg,"shape.point.hollowSquare":Lg,"shape.point.hollowTriangle":Ng,"shape.point.hollowTriangleDown":Cg,"shape.point.hyphen":jg,"shape.point.line":Fg,"shape.point.plus":Bg,"shape.point.point":Rg,"shape.point.square":Ig,"shape.point.tick":Dg,"shape.point.triangle":zg,"shape.point.triangleDown":Wg,"shape.text.text":s2,"shape.area.area":h2,"shape.area.smooth":d2,"shape.area.step":p2,"shape.link.smooth":y2,"shape.link.vhv":m2,"shape.link.arc":v2,"shape.link.link":g2,"shape.image.image":b2,"shape.polygon.polygon":x2,"shape.polygon.ribbon":w2,"shape.box.box":k2,"shape.vector.vector":Gg,"shape.label.label":D2,"shape.text.badge":c2,"shape.lineX.line":M2,"shape.lineY.line":M2,"shape.shape.shape":H2,"shape.connector.connector":S2,"shape.range.range":sg,"shape.rangeX.range":sg,"shape.rangeY.range":sg,"shape.path.path":W2,"shape.path.hollow":G2,"theme.light":Y2,"theme.dark":q2,"theme.academy":$2,"component.axisX":yx,"component.axisY":mx,"component.legendCategory":vx,"component.legendContinuous":bx,"component.title":kx,"component.sliderX":Ox,"component.sliderY":_x,"component.scrollbarX":Ex,"component.scrollbarY":Ax,"animation.scaleInX":jx,"animation.scaleOutX":Fx,"animation.scaleInY":Bx,"animation.scaleOutY":Rx,"animation.waveIn":Yx,"animation.fadeIn":Ix,"animation.fadeOut":Dx,"animation.zoomIn":qx,"animation.zoomOut":Ux,"animation.pathIn":$x,"animation.morphing":Vx,"animation.growInX":Xx,"animation.growInY":Kx,"interaction.elementHighlight":f5,"interaction.elementHighlightByX":h5,"interaction.elementHighlightByColor":d5,"interaction.elementSelect":g5,"interaction.elementSelectByX":y5,"interaction.elementSelectByColor":m5,"interaction.fisheye":b5,"interaction.chartIndex":v5,"interaction.tooltip":P5,"interaction.legendFilter":B5,"interaction.brushHighlight":D5,"interaction.brushXHighlight":W5,"interaction.brushYHighlight":H5,"interaction.brushAxisHighlight":J5,"interaction.brushFilter":rw,"interaction.brushXFilter":iw,"interaction.brushYFilter":aw,"composition.spaceLayer":cw,"composition.spaceFlex":uw,"composition.mark":hw,"composition.view":fw,"composition.facetRect":kw,"composition.repeatMatrix":Sw,"composition.facetCircle":Nw,"composition.timingKeyframe":Cw,"labelTransform.overlapHide":sk,"labelTransform.overlapDodgeY":ck,"labelTransform.overflowHide":gk,"labelTransform.contrastReverse":pk},gO)}function mO(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}function vO(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||yf("Unknown Component: "+t)};return[t=>{var e=t["type"],t=J(t,["type"]);return r(e)(Object.assign({},t))},r]}function h(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}(Da=pO=pO||{}).BEFORE_RENDER="beforerender",Da.AFTER_RENDER="afterrender",Da.BEFORE_PAINT="beforepaint",Da.AFTER_PAINT="afterpaint",Da.BEFORE_CHANGE_DATA="beforechangedata",Da.AFTER_CHANGE_DATA="afterchangedata",Da.BEFORE_CLEAR="beforeclear",Da.AFTER_CLEAR="afterclear",Da.BEFORE_DESTROY="beforedestroy",Da.AFTER_DESTROY="afterdestroy",Da.BEFORE_CHANGE_SIZE="beforechangesize",Da.AFTER_CHANGE_SIZE="afterchangesize";Wa=h("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),za=h("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Ga=h("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Ca=h("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),c=h("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),xs=h("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),_s=h("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ya=h("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Es=h("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Ts=h("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function bO(t,e,n){(t.prototype=e.prototype=n).constructor=t}function xO(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function wO(){}var kO=1/.7,vs="\\s*([+-]?\\d+)\\s*",js="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Os="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",MO=/^#([0-9a-f]{3,8})$/,OO=new RegExp(`^rgb\\(${vs},${vs},${vs}\\)$`),_O=new RegExp(`^rgb\\(${Os},${Os},${Os}\\)$`),SO=new RegExp(`^rgba\\(${vs},${vs},${vs},${js}\\)$`),EO=new RegExp(`^rgba\\(${Os},${Os},${Os},${js}\\)$`),AO=new RegExp(`^hsl\\(${js},${Os},${Os}\\)$`),TO=new RegExp(`^hsla\\(${js},${Os},${Os},${js}\\)$`),PO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function LO(){return this.rgb().formatHex()}function NO(){return this.rgb().formatRgb()}function CO(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=MO.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?jO(e):3===n?new IO(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?FO(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?FO(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=OO.exec(t))?new IO(e[1],e[2],e[3],1):(e=_O.exec(t))?new IO(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=SO.exec(t))?FO(e[1],e[2],e[3],e[4]):(e=EO.exec(t))?FO(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=AO.exec(t))?VO(e[1],e[2]/100,e[3]/100,1):(e=TO.exec(t))?VO(e[1],e[2]/100,e[3]/100,e[4]):PO.hasOwnProperty(t)?jO(PO[t]):"transparent"===t?new IO(NaN,NaN,NaN,0):null}function jO(t){return new IO(t>>16&255,t>>8&255,255&t,1)}function FO(t,e,n,r){return new IO(t=r<=0?e=n=NaN:t,e,n,r)}function BO(t){return(t=t instanceof wO?t:CO(t))?new IO((t=t.rgb()).r,t.g,t.b,t.opacity):new IO}function RO(t,e,n,r){return 1===arguments.length?BO(t):new IO(t,e,n,null==r?1:r)}function IO(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function DO(){return"#"+HO(this.r)+HO(this.g)+HO(this.b)}function zO(){var t=WO(this.opacity);return(1===t?"rgb(":"rgba(")+GO(this.r)+`, ${GO(this.g)}, `+GO(this.b)+(1===t?")":`, ${t})`)}function WO(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function GO(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function HO(t){return((t=GO(t))<16?"0":"")+t.toString(16)}function VO(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new qO(t,e,n,r)}function YO(t){var e,n,r,i,a,o,s,l;return t instanceof qO?new qO(t.h,t.s,t.l,t.opacity):(t=t instanceof wO?t:CO(t))?t instanceof qO?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new qO(o,s,l,t.opacity)):new qO}function qO(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function UO(t){return(t=(t||0)%360)<0?t+360:t}function $O(t){return Math.max(0,Math.min(1,t||0))}function XO(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}bO(wO,CO,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:LO,formatHex:LO,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return YO(this).formatHsl()},formatRgb:NO,toString:NO}),bO(IO,RO,xO(wO,{brighter(t){return t=null==t?kO:Math.pow(kO,t),new IO(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new IO(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new IO(GO(this.r),GO(this.g),GO(this.b),WO(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:DO,formatHex:DO,formatHex8:function(){return"#"+HO(this.r)+HO(this.g)+HO(this.b)+HO(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:zO,toString:zO})),bO(qO,function(t,e,n,r){return 1===arguments.length?YO(t):new qO(t,e,n,null==r?1:r)},xO(wO,{brighter(t){return t=null==t?kO:Math.pow(kO,t),new qO(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new qO(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new IO(XO(240<=t?t-240:120+t,n,e),XO(t,n,e),XO(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new qO(UO(this.h),$O(this.s),$O(this.l),WO(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=WO(this.opacity);return(1===t?"hsl(":"hsla(")+UO(this.h)+`, ${100*$O(this.s)}%, ${100*$O(this.l)}%`+(1===t?")":`, ${t})`)}}));const KO=Math.PI/180,ZO=180/Math.PI;var JO=1.78277,QO=-.29227,t6=-.90649,e6=1.97294,n6=e6*t6,r6=e6*JO,i6=JO*QO- -.14861*t6;function a6(t,e,n,r){return 1===arguments.length?(i=t)instanceof o6?new o6(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof IO?i:BO(i)).r/255,o=i.g/255,l=i.b/255,l=(e6*(o-(a=(i6*l+n6*a-r6*o)/(i6+n6-r6)))-QO*(o=l-a))/t6,new o6((l=(s=Math.sqrt(l*l+o*o)/(e6*a*(1-a)))?Math.atan2(l,o)*ZO-120:NaN)<0?l+360:l,s,a,i.opacity)):new o6(t,e,n,null==r?1:r);var i,a,o,s,l}function o6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}bO(o6,a6,xO(wO,{brighter(t){return t=null==t?kO:Math.pow(kO,t),new o6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new o6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*KO,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new IO(255*(e+n*(-.14861*r+JO*t)),255*(e+n*(QO*r+t6*t)),255*(e+e6*r*n),this.opacity)}}));var s6=t=>()=>t;function l6(e,n){return function(t){return e+t*n}}function c6(a){return 1==(a=+a)?u6:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):s6(isNaN(t)?e:t);var n,r,i}}function u6(t,e){var n=e-t;return n?l6(t,n):s6(isNaN(t)?e:t)}!function t(e){var o=c6(e);function n(e,t){var n=o((e=RO(e)).r,(t=RO(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=u6(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);f6=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var f6,h6=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=RO(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=f6(r),i=f6(i),a=f6(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function d6(s){return function t(o){function e(e,t){var n=s((e=a6(e)).h,(t=a6(t)).h),r=u6(e.s,t.s),i=u6(e.l,t.l),a=u6(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}d6(function(t,e){var n=e-t;return n?l6(t,180<n||n<-180?n-360*Math.round(n/360):n):s6(isNaN(t)?e:t)});var e=d6(u6),i=t=>h6(t[t.length-1]),ja=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(h),r=i(ja),us=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(h),ws=i(us),Sb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(h),ks=i(Sb),vc=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(h),n=i(vc),bs=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(h),_a=i(bs),Ms=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(h),Pa=i(Ms),Na=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(h),La=i(Na),Fa=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(h),a=i(Fa),o=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(h),Ba=i(o),Ra=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(h),Ia=i(Ra),Da=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(h),vs=i(Da),Os=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(h),js=i(Os),p6=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(h),g6=i(p6),y6=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(h),m6=i(y6),v6=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(h),b6=i(v6),x6=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(h),w6=i(x6),k6=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(h),M6=i(k6),O6=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(h),_6=i(O6),S6=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(h),E6=i(S6),A6=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(h),T6=i(A6),P6=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(h),L6=i(P6),N6=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(h),C6=i(N6),j6=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(h),F6=i(j6),B6=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(h),R6=i(B6),I6=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(h),D6=i(I6),z6=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(h),W6=i(z6),G6=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(h),i=i(G6);var H6=e(a6(300,.5,0),a6(-240,.5,1)),V6=e(a6(-100,.75,.35),a6(80,1.5,.8)),e=e(a6(260,.75,.35),a6(80,1.5,.8)),Y6=a6();var q6=RO(),U6=Math.PI/3,$6=2*Math.PI/3;function X6(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var K6=X6(h("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Z6=X6(h("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),J6=X6(h("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Q6=X6(h("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),t8=Object.freeze({__proto__:null,schemeCategory10:Wa,schemeAccent:za,schemeDark2:Ga,schemePaired:Ca,schemePastel1:c,schemePastel2:xs,schemeSet1:_s,schemeSet2:Ya,schemeSet3:Es,schemeTableau10:Ts,interpolateBrBG:r,schemeBrBG:ja,interpolatePRGn:ws,schemePRGn:us,interpolatePiYG:ks,schemePiYG:Sb,interpolatePuOr:n,schemePuOr:vc,interpolateRdBu:_a,schemeRdBu:bs,interpolateRdGy:Pa,schemeRdGy:Ms,interpolateRdYlBu:La,schemeRdYlBu:Na,interpolateRdYlGn:a,schemeRdYlGn:Fa,interpolateSpectral:Ba,schemeSpectral:o,interpolateBuGn:Ia,schemeBuGn:Ra,interpolateBuPu:vs,schemeBuPu:Da,interpolateGnBu:js,schemeGnBu:Os,interpolateOrRd:g6,schemeOrRd:p6,interpolatePuBuGn:m6,schemePuBuGn:y6,interpolatePuBu:b6,schemePuBu:v6,interpolatePuRd:w6,schemePuRd:x6,interpolateRdPu:M6,schemeRdPu:k6,interpolateYlGnBu:_6,schemeYlGnBu:O6,interpolateYlGn:E6,schemeYlGn:S6,interpolateYlOrBr:T6,schemeYlOrBr:A6,interpolateYlOrRd:L6,schemeYlOrRd:P6,interpolateBlues:C6,schemeBlues:N6,interpolateGreens:F6,schemeGreens:j6,interpolateGreys:R6,schemeGreys:B6,interpolatePurples:D6,schemePurples:I6,interpolateReds:W6,schemeReds:z6,interpolateOranges:i,schemeOranges:G6,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:H6,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Y6.h=360*t-100,Y6.s=1.5-1.5*e,Y6.l=.8-.9*e,Y6+""},interpolateWarm:V6,interpolateCool:e,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,q6.r=255*(e=Math.sin(t))*e,q6.g=255*(e=Math.sin(t+U6))*e,q6.b=255*(e=Math.sin(t+$6))*e,q6+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:K6,interpolateMagma:Z6,interpolateInferno:J6,interpolatePlasma:Q6});function e8(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function n8(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function r8(t,e,n,r,i){var a=new i0({range:[e,e+r]}),o=new i0({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function i8(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function a8(t,e,n,r,i){return t[0]}function o8(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new i0({range:[s,t]}),c=new i0({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=e8(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function s8(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function l8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return p8.apply(void 0,g8([[-1,-1]],e,!1))}function c8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return p8.apply(void 0,g8([[-1,1]],e,!1))}function u8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return p8.apply(void 0,g8([[1,-1]],e,!1))}function f8(t,e,n,r,i){var a,t=t[0],o=ct();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function h8(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new i0({range:[s,s+.99*l]}),f=new i0({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=e8(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function d8(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new i0({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new a0({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var p8=function(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},g8=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function y8(t){return 1/Math.tan(t)}function m8(t,e,n,r,i){var a=y8(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function v8(t,e,n,r,i){var a=y8(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function b8(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function x8(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function w8(t,e,n){return n?new i0({range:[0,1],domain:[0,e]}).map(t):t}function k8(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=w8(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[b8(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[x8(e,s,o,0,1),t]}}}function M8(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=w8(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],b8(t[1],s,o,0,1)]},untransform:function(t){return[t[0],x8(t[1],s,o,0,1)]}}}function O8(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=w8(a,r,t=void 0!==t&&t),u=w8(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[b8(e,c,s,0,1),b8(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[x8(e,c,s,0,1),x8(t,u,l,0,1)]}}}function _8(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new i0({range:[0,r]}),u=new i0({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=b8(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=x8(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var S8=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},E8=(A8.prototype.update=function(t){this.options=B({},this.options,t),this.recoordinate()},A8.prototype.clone=function(){return new A8(this.options)},A8.prototype.getOptions=function(){return this.options},A8.prototype.clear=function(){this.update({transformations:[]})},A8.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},A8.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},A8.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:S8(S8([],n,!0),[S8([],t,!0)],!1)}),this},A8.prototype.map=function(t){return this.output(t)},A8.prototype.invert=function(t){return this.input(t)},A8.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},A8.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?S8([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(S8([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||nl,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):nl}.apply(void 0,a)},A8.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=ct();return e&&t.reverse(),t.forEach(function(t){return ut(p,p,t)}),e&&(e=t=p,(d=new lt(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return qt(t,t,p),[t[0],t[1]]}},A8);function A8(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:r8,translate:n8,custom:i8,matrix:a8,polar:o8,transpose:s8,scale:p8,"shear.x":m8,"shear.y":v8,reflect:l8,"reflect.x":c8,"reflect.y":u8,rotate:f8,helix:h8,parallel:d8,fisheye:O8,"fisheye.x":k8,"fisheye.y":M8,"fisheye.circular":_8},this.update(t)}function T8(t){return void 0!==t.find(t=>"polar"===t.type)}function P8(t){return void 0!==t.find(t=>"helix"===t.type)}function L8(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function N8(t){return void 0!==t.find(t=>"theta"===t.type)}function C8(t){return void 0!==t.find(t=>"radial"===t.type)}function j8(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:function(t){return V8(t,wf)}(e)?"identity":"string"==typeof i?"linear":2<(r||i||[]).length?D8(t):void 0===r?G8(e)?D8(t):H8(e)?"time":z8(t,i):G8([r])?D8(t):H8(e)?"time":z8(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)vf(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return W8(e);case"quantile":return function(t){return W8(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)vf(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=Fp,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:N8(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=tl(e),i=t8["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"sqrt":var u=I8(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return I8(n,r,i,a,o);case"sequential":return;default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function F8(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(B8)?$c(e):t.every(R8)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function B8(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function R8(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function I8(t,e,n,r,i){var[i]=vO("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r=t,offset:a}=e;try{return i({type:r})}catch(t){e=function(t,n,r=t=>t){if(!t)return null;const e=tl(t),i=t8["scheme"+e],a=t8["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a);if(e)return e;throw new Error(`Unknown Component: ${r} `)}}function D8(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function z8(t,e){return"color"!==t||e?"linear":"sequential"}function W8(t){return Array.from(new Set(t.flat()))}function G8(t){return V8(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function H8(t){return V8(t,t=>t instanceof Date)}function V8(t,e){for(const n of t)if(n.some(e))return!0;return!1}function Y8(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=J(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function q8(t,i,a){return ve(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=vO("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=J(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>ve(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),pf)}([J(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?Z1(n):[],Object.assign(Object.assign({},i),{data:n})]})}function U8(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function $8(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=K1(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return vf(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"==typeof n&&function(t,e){return Array.isArray(t)&&t.some(t=>void 0!==t[e])}(e,n)?"field":"constant",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function X8(t,e,n){var r=e["encode"];return r?(r=K1(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{visual:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function K8(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=vO("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=K1(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function Z8(l,t,e){var n,r=t["encode"],i=J(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=J(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function J8(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var l="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return B(e,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(t=>[t,{guide:s(r,t),slider:s(a,t),scrollbar:s(o,t)}]))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")}})}),[t,e]}function Q8(t,e,n){var r=e["animate"];return r||void 0===r||B(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function t_(s,l,c){return ve(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ve(this,void 0,void 0,function*(){var t=c["library"],[t]=vO("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[Y8,q8,U8,$8,X8,K8,Z8,Q8,J8,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(s,l,{library:c});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=l["channels"],a=eu(Object.entries(n).filter(([,t])=>vf(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=i.find(t=>t.name===e);return null!=n&&n.independent?t:e});var o=i.filter(t=>{const{name:e,required:n}=t;if(a.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:s,scaleKey:l,range:c}=t;return a.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=u[t]||{},{independent:a=!1,key:o=l||t,type:r=r?"identity":s}=i,i=J(i,["independent","key","type"]);return{name:t,values:e,scaleKey:a?Symbol("independent"):o,scale:Object.assign({type:r,range:c},i)}})});return[e,Object.assign(Object.assign({},l),{index:t,channels:o})]})}function e_(t,e,n){var{component:r=[],coordinates:i=[],title:a}=e,[,o]=vO("component",n),s=t.filter(({guide:t})=>null!==t),e=function(t,e,n){const[,o]=vO("component",n),s=t["coordinates"];function i(t,e,n,r){[e,t,i=[]]=[e,t,s];var i,a,e="x"===e?L8(i)?t+"Y":t+"X":"y"===e?L8(i)?t+"X":t+"Y":null;if(r&&e)return i=o(e)["props"],{defaultPosition:t,defaultSize:i,defaultOrder:a}=i,Object.assign(Object.assign({position:t,size:i,order:a,type:e},r),{scale:n})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{var{slider:e,scrollbar:n,name:r}=t;return[i("slider",r,t,e),i("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n),l=[...r,...e];a&&(t=o("title")["props"],{defaultPosition:n,defaultOrder:r,defaultSize:e}=t,l.push(Object.assign({type:"title",position:n,order:r,size:e},"string"==typeof a?{title:a}:a)));for(const b of s){var c=function(t,e){var{name:t,guide:n,type:r}=t,n=n["type"];if(void 0!==n)return n;if("color"===t)switch(r){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return L8(e)&&T8(e)||P8(e)||N8(e)?null:t.startsWith("x")?L8(e)?"axisY":"axisX":t.startsWith("y")?L8(e)?"axisX":"axisY":t.startsWith("position")&&!T8(e)?"axisY":null}(b,i);if(null!==c){var u=o(c)["props"],{defaultPosition:f,defaultSize:h,defaultOrder:d}=u,{guide:u,name:p,field:g}=b;for(const x of Array.isArray(u)?u:[u]){var y=function(t,e,n,r,i){n=["left","right","top","bottom","centerVertical","center"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(t=/position(\d*)/g.exec(t))?n:(t=+t[1],L8(i)?0==t?"top":"centerHorizontal":0==t?n:"centerVertical");if("axisX"===e&&T8(i)&&!L8(i)||"axisY"===e&&T8(i)&&L8(i)||"axisY"===e&&N8(i)||"axisY"===e&&P8(i)||"axisY"===e&&C8(i))return"bottom"===r.position?"arcInner":"arc";if(T8(i)&&("axisX"===e||"axisY"===e))return"arcY";if(C8(i)&&"axisX"===e)return"arcY";if("axisX"===e&&function(t){return void 0!==t.find(t=>"reflect"===t.type)}(i)||"axisX"===e&&function(t){return void 0!==t.find(t=>"reflectY"===t.type)}(i))return"top";if("string"==typeof e&&e.startsWith("legend")&&T8(i)&&"center"===r.position)return"arcCenter"}return n}(p,c,f,x,i),{size:m=h,order:v=d}=x;l.push(Object.assign(Object.assign({title:g},x),{position:y,order:v,size:m,type:c,scale:b}))}}}return l}function n_(t,e,n,r){var[i]=vO("scale",r),[r]=vO("component",r),{scale:a,bbox:o}=t,t=J(t,["scale","bbox"]),i=a?i(a):null,{field:a,domain:s}=a||{},a={field:a,domain:s,bbox:o};return r(t)(i,a,e,n)}function r_(t,e){var t=function(t,e){var n=Qc(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom"]){var o="padding"+gf(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:g=d,marginTop:y=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-y-g,marginLeft:p,marginBottom:g,marginTop:y,marginRight:d,x:s,y:l})}function i_(t,e,n){var B=Qc(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:R,marginLeft:i,marginTop:a,marginBottom:I,marginRight:D,innerHeight:o,innerWidth:s,height:z,width:W}=n,t=t+i,i=r+a,r=n+D,a=R+I,G={top:[t,0,s,i,0,!0,zc],right:[W-r,i,r,o,1,!1,zc],bottom:[t,z-a,s,a,0,!1,zc],left:[0,i,t,o,1,!0,zc],centerVertical:[t,i,s,o,-1,null,null],centerHorizontal:[t,i,s,o,-1,null,null],arc:[t,i,s,o,-1,null,null],arcY:[t,i,s,o,-1,null,null],arcInner:[t,i,s,o,-1,null,null],center:[t,i,s,o,-1,null,null],arcCenter:[t,i,s,o,-1,null,null]};for(const[F,t]of B.entries()){var l=G[F];if("centerVertical"===F)!function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(t,e,l);else if("centerHorizontal"===F)!function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(t,e,l);else if("arc"===F){p=d=h=f=u=c=void 0;var c=t,u=l,[f,h,d,p]=u;for(let t=0;t<c.length;t++)c[t].bbox={x:f,y:h,width:d,height:p}}else if("arcY"===F){M=k=w=x=b=m=y=v=u=g=void 0;var g=t,u=e,[y,m,,v]=v=l,[b,x]=u.getCenter(),[u,w]=a_(u),k=x-w*(v=v/2),M=(w-u)*v;for(let t=0;t<g.length;t++)g[t].bbox={x:b+y,y:k+m,width:0,height:M}}else if("arcInner"===F){P=T=A=E=v=S=_=w=x=O=void 0;var O=t,x=e,[_,S,,w]=w=l,[v,E]=x.getCenter(),[x]=a_(x),A=x*(w=w/2),T=v-A,P=E-A;for(let t=0;t<O.length;t++)O[t].bbox={x:_+T,y:S+P,width:2*A,height:2*A}}else if("arcCenter"===F){q=Y=j=C=V=H=N=E=L=void 0;var L=t,E=e,[N,H,V,C]=N=l,[E]=a_(E),j=C/2*E/Math.sqrt(2),Y=N+V/2,q=H+C/2;for(let t=0;t<L.length;t++)L[t].bbox={x:Y-j,y:q-j,width:2*j,height:2*j}}else!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,g,y]=0===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(n.sort((t,e)=>l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,l)}}function a_(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function o_(T,P,L,N){return ve(this,void 0,void 0,function*(){const[n]=vO("composition",L);var[t]=vO("interaction",L);const e=new Set(Object.keys(L).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(vf)),r=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const i=t=>"standardView"===r(t);var a=t=>{var e;return i(t)?[t]:(e=r(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[T],u=[];c.length;){var f=c.shift();if(i(f)){var h=l.get(f),[h,d]=h?u_(h,f,L):yield l_(f,L),p=(s.set(h,f),o.push(h),d.flatMap(a));if(c.push(...p),p.every(i)){var g=yield Promise.all(p.map(t=>c_(t,L)));F8(h=(h=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),F8(h,"y");for(let t=0;t<p.length;t++){var y=p[t],m=g[t];l.set(y,m)}}}else{d="mark"===r(f)?f:yield y_(f,L),h=a(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}var v=T["on"];mO(v,pO.BEFORE_PAINT);const b=new Map,x=[];P.selectAll(x_(C)).data(o,t=>t.key).join(t=>t.append("g").attr("className",C).attr("id",t=>t.key).call(s_).each(function(t){f_(t,tt(this),x,L),b.set(t,this)}),t=>t.call(s_).each(function(t){f_(t,tt(this),x,L)}),t=>t.remove());var w=Array.from(b.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,a,o){return r=>ve(this,void 0,void 0,function*(){var[t,e]=yield l_(r,a);f_(t,i,[],a);for(const n of e)o_(n,i,a,o);return{options:r,view:t}})}(tt(e),L,N)}));for(const S of w){const T=S["options"];for(const E of function(t){var{interactions:t=[]}=t;return t}(T))t(E)(S,w)}const{width:k,height:M}=T;var O=[];for(const A of u){var _=new Promise(e=>ve(this,void 0,void 0,function*(){for(const t of A)yield o_(Object.assign({width:k,height:M},t),P,L,N);e()}));O.push(_)}N.animations=x,mO(v,pO.AFTER_PAINT);v=x.filter(vf).map(p_).map(t=>t.finished);return Promise.all([...v,...O])})}function s_(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function l_(t,e){return ve(this,void 0,void 0,function*(){return u_(yield c_(t,e),t,e)})}function c_(v,b){return ve(this,void 0,void 0,function*(){var[t]=vO("theme",b);const[i,a]=vO("mark",b);var{theme:e,marks:n,coordinates:r=[]}=v,o=t(g_(e)),s=new Map,l=[];for(const p of n){var c=yield y_(p,b);l.push(c)}for(const g of yield Promise.all(l.map(r=>ve(this,void 0,void 0,function*(){const{type:t=yf("G2Mark type is required."),key:n}=r;var e=a(t)["props"],{composite:e=!1}=e;return e?(yield i(r)(v)).map((t,e)=>Object.assign({key:n+"-"+e},t)):r}))).then(t=>t.flat())){var u,f=g["type"],f=a(f)["props"],f=yield t_(g,f,b);f&&([f,u]=f,s.set(f,u))}for(const y of Qc(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var h=y.reduce((t,{scale:e})=>B(t,e),{}),d=y[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter(vf)));const v=B({guide:{title:0===d.length?void 0:d},field:d[0]},h);d=y[0]["name"];const m=j8(d,y.flatMap(({values:t})=>t.map(t=>t.value)),v,r,o,b);y.forEach(t=>t.scale=m)}return s})}function u_(t,e,n){var[r]=vO("mark",n);const[i]=vO("scale",n);var a,o,[s]=vO("theme",n),{key:l,frame:c=!1,theme:u,clip:f,style:h={}}=e,s=s(g_(u)),u=Array.from(t.values()),u=Array.from(new Set(u.flatMap(t=>t.channels.map(t=>t.scale)))),u=e_(Array.from(u),e,n),d=r_(u,e),p=function(t,e,n){var[n]=vO("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new E8(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(d,e,n),e=c?B({mainLineWidth:1,mainStroke:"#000"},h):h,g=(i_(u,p,d),{}),y=[];for([a,o]of t.entries()){const{children:x,dataDomain:w,modifier:k,key:M}=a;var{index:m,channels:v}=o,b=K1(Object.fromEntries(v.map(({name:t,scale:e})=>[t,e])),t=>{var e=t["relations"],[e]=function(o){if(!o||!Array.isArray(o))return[pf,pf];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(e);return e(i(t))});Object.assign(g,b);const O=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(v,b),[_,S,E]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>vf(t)&&vf(e))&&(r.push(a),i.push(o))}return[r,i]}(r(a)(m,b,O,p));v=w||_.length;const A=k?k(S,v,d):[];m=_.map((t,e)=>{var n={points:S[e],transform:A[e],index:t,markKey:M};for(const[r,i]of Object.entries(O))n[r]=i[t],E&&(n["series"+tl(r)]=E[e].map(t=>i[t]));return E&&(n.seriesIndex=E[e]),n}),v=(o.data=m,o.index=_,null==x?void 0:x(m,b,d));y.push(...v||[])}return[{layout:d,theme:s,coordinate:p,components:u,markState:t,key:l,clip:f,scale:g,style:e},y]}function f_($,X,K,Z){ve(this,void 0,void 0,function*(){const{components:B,theme:n,layout:t,markState:e,coordinate:r,key:i,style:R,clip:a}=$,{width:I,height:D}=t,z=J(t,["x","y","width","height"]),o=["view","plot","main","content"];var s,l,c,u=o.map((t,e)=>e);const f=o.map(t=>bf(Object.assign({},n,R),t)),W=["a","margin","padding","inset"].map(t=>Q(z,t)),h=t=>t.style("x",t=>m[t].x).style("y",t=>m[t].y).style("width",t=>m[t].width).style("height",t=>m[t].height).each(function(t){var e,n,r=tt(this),t=f[t];for([e,n]of Object.entries(t))r.style(e,n)});let d=0,p=0,g=I,y=D;const m=u.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return d+=t,p+=e,g-=t+r,y-=e+n,{x:d,y:p,width:g,height:y}}),v=(X.selectAll(x_(ot)).data(u.filter(t=>vf(f[t])),t=>o[t]).join(t=>t.append("rect").attr("className",ot).style("zIndex",-2).call(h),t=>t.call(h),t=>t.remove()),X.selectAll(x_(it)).data(B,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",it).append(t=>n_(t,r,n,Z)),t=>t.each(function(t){var t=n_(t,r,n,Z)["attributes"],[e]=this.childNodes;e.update(Object.assign({},t))})),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{updateType:a,updateDuration:o=300,updateDelay:s=0,enterType:l,enterDuration:c=300,enterDelay:u=0,exitType:f,exitDuration:h=300,exitDelay:d=0}=r;for(const M of i){var{updateType:p=a,updateDuration:g=o,updateDelay:y=s,enterType:m=l,enterDuration:v=c,enterDelay:b=u,exitDuration:x=h,exitDelay:w=d,exitType:k=f}=M;void 0!==p&&!p||(e=Math.max(e,g+y),n=Math.min(n,y)),void 0!==k&&!k||(e=Math.max(e,x+w),n=Math.min(n,w)),void 0!==m&&!m||(e=Math.max(e,v+b),n=Math.min(n,b))}}return e===-1/0?null:[n,e-n]}(e)),b=X.selectAll(x_(rt)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",rt).call(m_).call(b_,Array.from(e.keys())).call(w_,a),t=>t.call(b_,Array.from(e.keys())).call(t=>{if(!v)return m_(t);{const[l,c]=v;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}}).call(w_,a)).transitions();K.push(...b.flat());for([s,l]of e.entries()){var G=l["data"];const{key:i,class:S}=s,E=function(l,t,e,n){const[c]=vO("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:y={}}=l;return(t,e)=>{var{shape:n=f}=y,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=J(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:g,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=K1(y,t=>h_(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:v_(l,n)}))(r,t,p,d,h)}}(s,l,$,Z),A=(x=s,c=l,d_("enter",x,c,$,Z)),T=(x=s,c=l,d_("update",x,c,$,Z)),P=(x=s,c=l,d_("exit",x,c,$,Z));var x=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(X,S,"element");const b=X.select("#"+i).selectAll(x_(nt)).selectFacetAll(x).data(G,t=>t.key,t=>t.groupKey).join(t=>t.append(E).attr("className",nt).transition(function(t){return A(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(a=n.parentNode.parentNode,s=r.parentNode,[a,o]=i(a),[i,s]=i(s),a=`translate(${a-i}, ${o-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+a).trimStart(),r.append(n));var n,r,i,a,o=E(t,e),s=T(t,[this],[o]);return null===s&&mf(this,o),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return P(t,[this])}).remove(),t=>t.append(E).attr("className",nt).transition(function(t){var e=this["__fromElements__"],t=T(t,e,[this]);return new H1(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new H1([],this.__toData__,this.parentNode).append(E).attr("className",nt).nodes();return T(t,[this],e)}).remove()).transitions();K.push(...b.flat())}{var w=$,k=X,M=Z,O,_;const[H]=vO("labelTransform",M),{markState:V,labelTransform:L}=w,Y=k.select(x_(et)).node(),N=new Map,C=new Map,q=Array.from(V.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=vO("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t}=t,t=K1(J(t,["formatter"]),t=>h_(t,r,e,l)),{shape:a=c,text:o}=t,t=J(t,["shape","text"]),i="string"==typeof i?rx(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,w,M),a=k.select("#"+r).selectAll(x_(nt)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=J(e,["transform"]);return a.flatMap(t=>{t=function(n,r,i){const{seriesIndex:t,seriesKey:a,points:o,key:e,index:s}=i.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(i);if(!t)return[Object.assign(Object.assign({},n),{key:e+"-"+r,bounds:l,index:s,points:o,dependentElement:i})];var c=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),u=t.map((t,e)=>Object.assign(Object.assign({},n),{key:a[e]+"-"+r,bounds:[o[e]],index:t,points:o,dependentElement:i}));return c?c(u):u}(r,n,t);return t.forEach(t=>{N.set(t,i),C.set(t,e)}),t})})}),j=tt(Y).selectAll(x_(at)).data(q,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",at),t=>t.each(function(t){mf(this,N.get(t)(t))}),t=>t.remove()).nodes(),U=Qc(j,t=>C.get(t.__data__)),F=w["coordinate"];for([O,_]of U){var{transform:O=[]}=O;(function(t){return t.reduce((n,r)=>(t,...e)=>r(n(t,...e),...e),pf)})(O.map(H))(_,F)}L&&L(j,F)}})}function h_(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function d_(o,t,e,n,r){var[,i]=vO("shape",r);const[s]=vO("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${tl(o)}Animation`;const{[e]:c}=i(v_(t,r)).props,{[o]:u={}}=a,f=Q(t.animate||{},o);return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function p_(t){return t.finished.then(()=>{t.cancel()}),t}function g_(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function y_(r,i){return ve(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=J(r,["data"]);return null==e?r:([,{data:e}]=yield q8(0,{data:e},t),Object.assign({data:e},n))})}function m_(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function v_(t,e){t=t.type;return t+"."+e}function b_(t,e){const n=t=>void 0!==t.class?""+t.class:"";0===t.nodes().length||(t.selectAll(x_(N)).data(e,t=>t.key).join(t=>t.append("g").attr("className",N).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(x_(et)).node())||t.append("g").attr("className",et)}function x_(...t){return t.map(t=>"."+t).join("")}function w_(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;return i?({paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new F.Rect({style:{x:e,y:t,width:n,height:r}})):null})}function k_(t){for(var t=B({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function M_(t,e={},n){const{width:r=640,height:i=480,on:a}=t,o=k_(t),{canvas:s=(t=r,c=i,u=new L.Renderer,u.registerPlugin(new Vs),new F.Canvas({width:t,height:c,container:document.createElement("div"),renderer:u})),library:l=yO()}=e;var c,u;e.canvas=s,e.library=l,s.resize(r,i),mO(a,pO.BEFORE_RENDER);const f=tt(s.document.documentElement);return s.ready.then(()=>o_(Object.assign(Object.assign({},o),{width:r,height:i}),f,l,e)).then(n).then(()=>mO(a,pO.AFTER_RENDER)),"string"==typeof(t=s.getConfig().container)?document.getElementById(t):t}function O_(t,e={}){var n,t=t["on"],e=e["canvas"];e&&e.destroy(),(e=t)&&(n?delete e[n]:e={})}function __(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class p{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return __(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return __(this,t=>{e===t.type&&n.push(t)}),n}changeData(t){let e=this;for(;e&&e.parentNode;)e=e.parentNode;this.attr("data",t),e.render()}call(t,...e){return t(this.map(),...e),this}}function S_(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function E_(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function A_(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length?this.attr(r,t):((n=this.attr(r)||{})[t]=e,this.attr(r,n))}}function T_(t,{name:e,key:i=e}){t.prototype[e]=function(t,e){var n,r=this.attr(i)||{};return 0===arguments.length?r:1===arguments.length?r[t]:((n=r[t])?Us(e)?n.concat(e):n.push(e):r[t]=Us(e)?e:[e],this.attr(i,r))}}function g(r){return t=>{for(const n of r){var e=n["type"];"value"===e?S_(t,n):"array"===e?E_(t,n):"object"===e?A_(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"event"===e&&T_(t,n)}return t}}function P_(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}Wa=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"},{name:"scrollbar",type:"object"}];let L_=class extends p{constructor(){super({},"interval")}},N_=(L_=t([g(Wa)],L_),class extends p{constructor(){super({},"rect")}}),C_=(N_=t([g(Wa)],N_),class extends p{constructor(){super({},"point")}}),j_=(C_=t([g(Wa)],C_),class extends p{constructor(){super({},"area")}}),F_=(j_=t([g(Wa)],j_),class extends p{constructor(){super({},"line")}}),B_=(F_=t([g(Wa)],F_),class extends p{constructor(){super({},"cell")}}),R_=(B_=t([g(Wa)],B_),class extends p{constructor(){super({},"vector")}}),I_=(R_=t([g(Wa)],R_),class extends p{constructor(){super({},"link")}}),D_=(I_=t([g(Wa)],I_),class extends p{constructor(){super({},"polygon")}});D_=t([g(Wa)],D_);za=t([g(Wa)],class extends p{constructor(){super({},"image")}});let z_=class extends p{constructor(){super({},"text")}},W_=(z_=t([g(Wa)],z_),class extends p{constructor(){super({},"box")}}),G_=(W_=t([g(Wa)],W_),class extends p{constructor(){super({},"lineX")}}),H_=(G_=t([g(Wa)],G_),class extends p{constructor(){super({},"lineY")}}),V_=(H_=t([g(Wa)],H_),class extends p{constructor(){super({},"range")}}),Y_=(V_=t([g(Wa)],V_),class extends p{constructor(){super({},"rangeX")}}),q_=(Y_=t([g(Wa)],Y_),class extends p{constructor(){super({},"rangeY")}}),U_=(q_=t([g(Wa)],q_),class extends p{constructor(){super({},"connector")}}),$_=(U_=t([g(Wa)],U_),class extends p{constructor(){super({},"shape")}}),X_=($_=t([g(Wa)],$_),class extends p{constructor(){super({},"sankey")}}),K_=(X_=t([g([...Wa,{name:"layout",type:"value"}])],X_),class extends p{constructor(){super({},"treemap")}}),Z_=(K_=t([g([...Wa,{name:"layout",type:"value"}])],K_),class extends p{constructor(){super({},"boxplot")}}),J_=(Z_=t([g(Wa)],Z_),class extends p{constructor(){super({},"pack")}}),Q_=(J_=t([g([...Wa,{name:"layout",type:"value"}])],J_),class extends p{constructor(){super({},"forceGraph")}}),tS=(Q_=t([g([...Wa,{name:"layout",type:"value"}])],Q_),class extends p{constructor(){super({},"tree")}}),eS=(tS=t([g([...Wa,{name:"layout",type:"value"}])],tS),class extends p{constructor(){super({},"wordCloud")}});eS=t([g([...Wa,{name:"layout",type:"object"}])],eS);Ga={interval:L_,rect:N_,point:C_,area:j_,line:F_,cell:B_,vector:R_,link:I_,polygon:D_,image:za,text:z_,box:W_,lineX:G_,lineY:H_,range:V_,rangeX:Y_,rangeY:q_,connector:U_,sankey:X_,treemap:K_,boxplot:Z_,shape:$_,pack:J_,forceGraph:Q_,tree:tS,wordCloud:eS};let nS=class extends p{constructor(){super({},"view")}},rS=(nS=t([g([{type:"value",name:"data"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...P_(Ga)])],nS),class extends p{constructor(){super({},"spaceLayer")}}),iS=(rS=t([g([{type:"value",name:"data"},...P_(Ga)])],rS),class extends p{constructor(){super({},"spaceFlex")}}),aS=(iS=t([g([{type:"value",name:"data"},...P_(Ga)])],iS),class extends p{constructor(){super({},"facetRect")}}),oS=(aS=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...P_(Ga)])],aS),class extends p{constructor(){super({},"facetCircle")}}),sS=(oS=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...P_(Ga)])],oS),class extends p{constructor(){super({},"repeatMatrix")}}),lS=(sS=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...P_(Ga)])],sS),class extends p{constructor(){super({},"timingKeyframe")}}),cS=(lS=t([g([...P_(Ga)])],lS),class extends p{constructor(){super({},"geoView")}}),uS=(cS=t([g([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...P_(Ga)])],cS),class extends p{constructor(){super({},"geoPath")}});uS=t([g([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...P_(Ga)])],uS);var fS={view:nS,spaceLayer:rS,spaceFlex:iS,facetRect:aS,facetCircle:oS,repeatMatrix:sS,timingKeyframe:lS,geoView:cS,geoPath:uS};for(const pS of Object.values(fS))g(P_(fS))(pS);const hS=yO();function dS(t){return Object.assign(Object.assign({},t.value),{type:t.type})}Ca=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"theme",type:"object"},{name:"title",type:"value"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"on",type:"event"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...P_(Ga),...Object.entries(fS).map(([t,e])=>({type:"container",name:t,ctor:e}))];y.Chart=class extends p{constructor(t={}){var r,i,a,o,e=t["container"];super(J(t,["container"]),"view"),this.onResize=(r=()=>{this.forceFit()},i=300,function(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._context={library:hS},this.bindAutoFit()}render(){var t,e,n,r,i,a,o;return this._context.canvas||({width:i=640,height:o=480,renderer:t,plugins:e,autoFit:n}=this.options(),{width:n,height:r}=_f(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new L.Renderer,o=[]]=[this._container,i,o,t,e],o.push(new Vs),o.forEach(t=>a.registerPlugin(t)),new F.Canvas({container:n,width:r,height:i,renderer:a}))),M_(this.options(),this._context),this}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t.attr("insetLeft",e.attr("insetLeft")),t.attr("insetRight",e.attr("insetRight")),t.attr("insetBottom",e.attr("insetBottom")),t.attr("insetTop",e.attr("insetTop")),t.attr("marginLeft",e.attr("marginLeft")),t.attr("marginBottom",e.attr("marginBottom")),t.attr("marginTop",e.attr("marginTop")),t.attr("marginRight",e.attr("marginRight")),t.attr("autoFit",e.attr("autoFit")),t.attr("padding",e.attr("padding")),t.attr("margin",e.attr("margin")),t.attr("inset",e.attr("inset")),t),n=[e],r=new Map;for(r.set(e,dS(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=dS(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(e)}node(){return this._container}context(){return this._context}destroy(){var t,e=this.options(),n=e["on"];mO(n,pO.BEFORE_DESTROY),this.unbindAutoFit(),O_(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),mO(n,pO.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];mO(e,pO.BEFORE_CLEAR),O_(t,this._context),mO(e,pO.AFTER_CLEAR)}forceFit(){var{width:t,height:e,autoFit:n}=this.options(),{width:n,height:t}=_f(this._container,n,t,e);t&&n&&this.changeSize(n,t)}changeSize(t,e){var{width:n,height:r,on:i}=this.options();if(n===t&&r===e)return this;mO(i,pO.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),mO(i,pO.AFTER_CHANGE_SIZE)}bindAutoFit(){var t=this.options()["autoFit"];t&&window.addEventListener("resize",this.onResize)}unbindAutoFit(){var t=this.options()["autoFit"];t&&window.removeEventListener("resize",this.onResize)}},y.Chart=t([g(Ca)],y.Chart),y.AREA_CLASS_NAME=ot,y.COMPONENT_CLASS_NAME=it,y.ELEMENT_CLASS_NAME=nt,y.LABEL_CLASS_NAME=at,y.LABEL_LAYER_CLASS_NAME=et,y.MAIN_LAYER_CLASS_NAME=N,y.PLOT_CLASS_NAME=rt,y.VIEW_CLASS_NAME=C,y.createLibrary=yO,y.destroy=O_,y.register=function(t,e){Object.assign(hS,{[t]:e})},y.render=M_,y.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:a}=t;var o,t=k_(t),{library:s=yO(),group:l=new F.Group}=e;if(null!=l&&l.parentElement)return o=tt(l),e.group=l,e.library=s,mO(a,pO.BEFORE_RENDER),o_(Object.assign(Object.assign({},t),{width:r,height:i}),o,s,e).then(n).then(()=>mO(a,pO.AFTER_RENDER)),l;throw new Error("renderToMountedElement can't render chart to unmounted group.")},Object.defineProperty(y,"__esModule",{value:!0})});
|